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
49,500
my_open_parent_dir_nosymlinks
eloqsql/mysys/my_symlink.c
const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd) { char buf[FN_REFLEN + 1]; char *s= buf, *e= buf+1, *end= strnmov(buf, pathname, sizeof(buf)); int fd, dfd= -1; if (*end) { errno= ENAMETOOLONG; return NULL; } if (*s != '/') /* not an absolute path */ { errno= ENOENT; return NULL; } for (;;) { if (*e == '/') /* '//' in the path */ { errno= ENOENT; goto err; } while (*e && *e != '/') e++; *e= 0; if (!memcmp(s, ".", 2) || !memcmp(s, "..", 3)) { errno= ENOENT; goto err; } if (++e >= end) { *pdfd= dfd; return pathname + (s - buf); } fd = openat(dfd, s, O_NOFOLLOW | O_PATH | O_CLOEXEC); if (fd < 0) goto err; if (dfd >= 0) close(dfd); dfd= fd; s= e; } err: if (dfd >= 0) close(dfd); return NULL; }
O0
c
my_open_parent_dir_nosymlinks: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x220(%rbp) movq %rsi, -0x228(%rbp) leaq -0x210(%rbp), %rax movq %rax, -0x230(%rbp) leaq -0x210(%rbp), %rax addq $0x1, %rax movq %rax, -0x238(%rbp) leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi movl $0x201, %edx # imm = 0x201 callq 0x154900 movq %rax, -0x240(%rbp) movl $0xffffffff, -0x248(%rbp) # imm = 0xFFFFFFFF movq -0x240(%rbp), %rax cmpb $0x0, (%rax) je 0xfb366 callq 0x2a750 movl $0x24, (%rax) movq $0x0, -0x218(%rbp) jmp 0xfb51a movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax je 0xfb390 callq 0x2a750 movl $0x2, (%rax) movq $0x0, -0x218(%rbp) jmp 0xfb51a jmp 0xfb392 movq -0x238(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0xfb3b1 callq 0x2a750 movl $0x2, (%rax) jmp 0xfb4fb jmp 0xfb3b3 movq -0x238(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x249(%rbp) je 0xfb3e0 movq -0x238(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax setne %al movb %al, -0x249(%rbp) movb -0x249(%rbp), %al testb $0x1, %al jne 0xfb3ec jmp 0xfb400 movq -0x238(%rbp), %rax addq $0x1, %rax movq %rax, -0x238(%rbp) jmp 0xfb3b3 movq -0x238(%rbp), %rax movb $0x0, (%rax) movq -0x230(%rbp), %rax movw (%rax), %ax subw $0x2e, %ax setne %al movzbl %al, %eax cmpl $0x0, %eax je 0xfb440 movq -0x230(%rbp), %rdi leaq 0x5f1f6(%rip), %rsi # 0x15a627 movl $0x3, %edx callq 0x2a840 cmpl $0x0, %eax jne 0xfb450 callq 0x2a750 movl $0x2, (%rax) jmp 0xfb4fb movq -0x238(%rbp), %rax addq $0x1, %rax movq %rax, -0x238(%rbp) cmpq -0x240(%rbp), %rax jb 0xfb49e movl -0x248(%rbp), %ecx movq -0x228(%rbp), %rax movl %ecx, (%rax) movq -0x220(%rbp), %rax movq -0x230(%rbp), %rcx leaq -0x210(%rbp), %rdx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x218(%rbp) jmp 0xfb51a movl -0x248(%rbp), %edi movq -0x230(%rbp), %rsi movl $0x2a0000, %edx # imm = 0x2A0000 movb $0x0, %al callq 0x2a530 movl %eax, -0x244(%rbp) cmpl $0x0, -0x244(%rbp) jge 0xfb4c8 jmp 0xfb4fb cmpl $0x0, -0x248(%rbp) jl 0xfb4dc movl -0x248(%rbp), %edi callq 0x2a1b0 movl -0x244(%rbp), %eax movl %eax, -0x248(%rbp) movq -0x238(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0xfb392 cmpl $0x0, -0x248(%rbp) jl 0xfb50f movl -0x248(%rbp), %edi callq 0x2a1b0 movq $0x0, -0x218(%rbp) movq -0x218(%rbp), %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xfb54a movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x2a250 nop
my_open_parent_dir_nosymlinks: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_220], rdi mov [rbp+var_228], rsi lea rax, [rbp+var_210] mov [rbp+var_230], rax lea rax, [rbp+var_210] add rax, 1 mov [rbp+var_238], rax lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] mov edx, 201h call strnmov mov [rbp+var_240], rax mov [rbp+var_248], 0FFFFFFFFh mov rax, [rbp+var_240] cmp byte ptr [rax], 0 jz short loc_FB366 call ___errno_location mov dword ptr [rax], 24h ; '$' mov [rbp+var_218], 0 jmp loc_FB51A loc_FB366: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jz short loc_FB390 call ___errno_location mov dword ptr [rax], 2 mov [rbp+var_218], 0 jmp loc_FB51A loc_FB390: jmp short $+2 loc_FB392: mov rax, [rbp+var_238] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_FB3B1 call ___errno_location mov dword ptr [rax], 2 jmp loc_FB4FB loc_FB3B1: jmp short $+2 loc_FB3B3: mov rax, [rbp+var_238] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_249], al jz short loc_FB3E0 mov rax, [rbp+var_238] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' setnz al mov [rbp+var_249], al loc_FB3E0: mov al, [rbp+var_249] test al, 1 jnz short loc_FB3EC jmp short loc_FB400 loc_FB3EC: mov rax, [rbp+var_238] add rax, 1 mov [rbp+var_238], rax jmp short loc_FB3B3 loc_FB400: mov rax, [rbp+var_238] mov byte ptr [rax], 0 mov rax, [rbp+var_230] mov ax, [rax] sub ax, 2Eh ; '.' setnz al movzx eax, al cmp eax, 0 jz short loc_FB440 mov rdi, [rbp+var_230] lea rsi, asc_15A627; ".." mov edx, 3 call _memcmp cmp eax, 0 jnz short loc_FB450 loc_FB440: call ___errno_location mov dword ptr [rax], 2 jmp loc_FB4FB loc_FB450: mov rax, [rbp+var_238] add rax, 1 mov [rbp+var_238], rax cmp rax, [rbp+var_240] jb short loc_FB49E mov ecx, [rbp+var_248] mov rax, [rbp+var_228] mov [rax], ecx mov rax, [rbp+var_220] mov rcx, [rbp+var_230] lea rdx, [rbp+var_210] sub rcx, rdx add rax, rcx mov [rbp+var_218], rax jmp short loc_FB51A loc_FB49E: mov edi, [rbp+var_248] mov rsi, [rbp+var_230] mov edx, offset unk_2A0000 mov al, 0 call _openat64 mov [rbp+var_244], eax cmp [rbp+var_244], 0 jge short loc_FB4C8 jmp short loc_FB4FB loc_FB4C8: cmp [rbp+var_248], 0 jl short loc_FB4DC mov edi, [rbp+var_248] call _close loc_FB4DC: mov eax, [rbp+var_244] mov [rbp+var_248], eax mov rax, [rbp+var_238] mov [rbp+var_230], rax jmp loc_FB392 loc_FB4FB: cmp [rbp+var_248], 0 jl short loc_FB50F mov edi, [rbp+var_248] call _close loc_FB50F: mov [rbp+var_218], 0 loc_FB51A: mov rax, [rbp+var_218] mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_FB54A mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_FB54A: call ___stack_chk_fail
long long my_open_parent_dir_nosymlinks(long long a1, int *a2) { long long v2; // rcx bool v4; // [rsp+17h] [rbp-249h] int v5; // [rsp+18h] [rbp-248h] int v6; // [rsp+1Ch] [rbp-244h] const char *v7; // [rsp+20h] [rbp-240h] const char *v8; // [rsp+28h] [rbp-238h] const char *v9; // [rsp+30h] [rbp-230h] char v11; // [rsp+50h] [rbp-210h] BYREF _BYTE v12[527]; // [rsp+51h] [rbp-20Fh] BYREF *(_QWORD *)&v12[519] = __readfsqword(0x28u); v9 = &v11; v8 = v12; v7 = (const char *)strnmov(&v11, a1, 513LL); v5 = -1; if ( *v7 ) { *(_DWORD *)__errno_location() = 36; return 0LL; } else if ( v11 == 47 ) { while ( *v8 != 47 ) { while ( 1 ) { v2 = (unsigned int)*v8; v4 = 0; if ( *v8 ) v4 = *v8 != 47; if ( !v4 ) break; ++v8; } *v8 = 0; if ( *(_WORD *)v9 == 46 || !(unsigned int)strcmp(v9, "..") ) break; if ( ++v8 >= v7 ) { *a2 = v5; return v9 - &v11 + a1; } v6 = openat64((unsigned int)v5, v9, &unk_2A0000, v2); if ( v6 < 0 ) goto LABEL_20; if ( v5 >= 0 ) close((unsigned int)v5); v5 = v6; v9 = v8; } *(_DWORD *)__errno_location() = 2; LABEL_20: if ( v5 >= 0 ) close((unsigned int)v5); return 0LL; } else { *(_DWORD *)__errno_location() = 2; return 0LL; } }
my_open_parent_dir_nosymlinks: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x220],RDI MOV qword ptr [RBP + -0x228],RSI LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x230],RAX LEA RAX,[RBP + -0x210] ADD RAX,0x1 MOV qword ptr [RBP + -0x238],RAX LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] MOV EDX,0x201 CALL 0x00254900 MOV qword ptr [RBP + -0x240],RAX MOV dword ptr [RBP + -0x248],0xffffffff MOV RAX,qword ptr [RBP + -0x240] CMP byte ptr [RAX],0x0 JZ 0x001fb366 CALL 0x0012a750 MOV dword ptr [RAX],0x24 MOV qword ptr [RBP + -0x218],0x0 JMP 0x001fb51a LAB_001fb366: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JZ 0x001fb390 CALL 0x0012a750 MOV dword ptr [RAX],0x2 MOV qword ptr [RBP + -0x218],0x0 JMP 0x001fb51a LAB_001fb390: JMP 0x001fb392 LAB_001fb392: MOV RAX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001fb3b1 CALL 0x0012a750 MOV dword ptr [RAX],0x2 JMP 0x001fb4fb LAB_001fb3b1: JMP 0x001fb3b3 LAB_001fb3b3: MOV RAX,qword ptr [RBP + -0x238] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x249],AL JZ 0x001fb3e0 MOV RAX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f SETNZ AL MOV byte ptr [RBP + -0x249],AL LAB_001fb3e0: MOV AL,byte ptr [RBP + -0x249] TEST AL,0x1 JNZ 0x001fb3ec JMP 0x001fb400 LAB_001fb3ec: MOV RAX,qword ptr [RBP + -0x238] ADD RAX,0x1 MOV qword ptr [RBP + -0x238],RAX JMP 0x001fb3b3 LAB_001fb400: MOV RAX,qword ptr [RBP + -0x238] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x230] MOV AX,word ptr [RAX] SUB AX,0x2e SETNZ AL MOVZX EAX,AL CMP EAX,0x0 JZ 0x001fb440 MOV RDI,qword ptr [RBP + -0x230] LEA RSI,[0x25a627] MOV EDX,0x3 CALL 0x0012a840 CMP EAX,0x0 JNZ 0x001fb450 LAB_001fb440: CALL 0x0012a750 MOV dword ptr [RAX],0x2 JMP 0x001fb4fb LAB_001fb450: MOV RAX,qword ptr [RBP + -0x238] ADD RAX,0x1 MOV qword ptr [RBP + -0x238],RAX CMP RAX,qword ptr [RBP + -0x240] JC 0x001fb49e MOV ECX,dword ptr [RBP + -0x248] MOV RAX,qword ptr [RBP + -0x228] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x230] LEA RDX,[RBP + -0x210] SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x218],RAX JMP 0x001fb51a LAB_001fb49e: MOV EDI,dword ptr [RBP + -0x248] MOV RSI,qword ptr [RBP + -0x230] MOV EDX,0x2a0000 MOV AL,0x0 CALL 0x0012a530 MOV dword ptr [RBP + -0x244],EAX CMP dword ptr [RBP + -0x244],0x0 JGE 0x001fb4c8 JMP 0x001fb4fb LAB_001fb4c8: CMP dword ptr [RBP + -0x248],0x0 JL 0x001fb4dc MOV EDI,dword ptr [RBP + -0x248] CALL 0x0012a1b0 LAB_001fb4dc: MOV EAX,dword ptr [RBP + -0x244] MOV dword ptr [RBP + -0x248],EAX MOV RAX,qword ptr [RBP + -0x238] MOV qword ptr [RBP + -0x230],RAX JMP 0x001fb392 LAB_001fb4fb: CMP dword ptr [RBP + -0x248],0x0 JL 0x001fb50f MOV EDI,dword ptr [RBP + -0x248] CALL 0x0012a1b0 LAB_001fb50f: MOV qword ptr [RBP + -0x218],0x0 LAB_001fb51a: MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001fb54a MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET LAB_001fb54a: CALL 0x0012a250
long my_open_parent_dir_nosymlinks(long param_1,int *param_2) { int iVar1; short *psVar2; int *piVar3; long in_FS_OFFSET; bool bVar4; int local_250; short *local_240; short *local_238; long local_220; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_238 = (short *)local_218; local_240 = (short *)(local_218 + 1); psVar2 = (short *)strnmov(local_218,param_1,0x201); local_250 = -1; if ((char)*psVar2 == '\0') { iVar1 = local_250; if (local_218[0] == '/') { while (local_250 = iVar1, (char)*local_240 != '/') { while( true ) { bVar4 = false; if ((char)*local_240 != '\0') { bVar4 = (char)*local_240 != '/'; } if (!bVar4) break; local_240 = (short *)((long)local_240 + 1); } *(char *)local_240 = '\0'; if ((*local_238 == 0x2e) || (iVar1 = memcmp(local_238,&DAT_0025a627,3), iVar1 == 0)) { piVar3 = __errno_location(); *piVar3 = 2; goto LAB_001fb4fb; } local_240 = (short *)((long)local_240 + 1); if (psVar2 <= local_240) { *param_2 = local_250; local_220 = (long)local_238 + (param_1 - (long)local_218); goto LAB_001fb51a; } iVar1 = openat64(local_250,(char *)local_238,0x2a0000); if (iVar1 < 0) goto LAB_001fb4fb; local_238 = local_240; if (-1 < local_250) { close(local_250); } } piVar3 = __errno_location(); *piVar3 = 2; LAB_001fb4fb: if (-1 < local_250) { close(local_250); } local_220 = 0; } else { piVar3 = __errno_location(); *piVar3 = 2; local_220 = 0; } } else { piVar3 = __errno_location(); *piVar3 = 0x24; local_220 = 0; } LAB_001fb51a: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_220; }
49,501
stmt_buffered_fetch
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static int stmt_buffered_fetch(MYSQL_STMT *stmt, uchar **row) { if (!stmt->result_cursor) { *row= NULL; stmt->state= MYSQL_STMT_FETCH_DONE; return MYSQL_NO_DATA; } stmt->state= MYSQL_STMT_USER_FETCHING; *row= (uchar *)stmt->result_cursor->data; stmt->result_cursor= stmt->result_cursor->next; return 0; }
O0
c
stmt_buffered_fetch: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0xe0(%rax) jne 0x5cec9 movq -0x18(%rbp), %rax movq $0x0, (%rax) movq -0x10(%rbp), %rax movl $0x6, 0x50(%rax) movl $0x64, -0x4(%rbp) jmp 0x5cf0a movq -0x10(%rbp), %rax movl $0x5, 0x50(%rax) movq -0x10(%rbp), %rax movq 0xe0(%rax), %rax movq 0x8(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0xe0(%rax), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xe0(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nop
stmt_buffered_fetch: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+0E0h], 0 jnz short loc_5CEC9 mov rax, [rbp+var_18] mov qword ptr [rax], 0 mov rax, [rbp+var_10] mov dword ptr [rax+50h], 6 mov [rbp+var_4], 64h ; 'd' jmp short loc_5CF0A loc_5CEC9: mov rax, [rbp+var_10] mov dword ptr [rax+50h], 5 mov rax, [rbp+var_10] mov rax, [rax+0E0h] mov rcx, [rax+8] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax+0E0h] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+0E0h], rcx mov [rbp+var_4], 0 loc_5CF0A: mov eax, [rbp+var_4] pop rbp retn
long long stmt_buffered_fetch(long long a1, _QWORD *a2) { if ( *(_QWORD *)(a1 + 224) ) { *(_DWORD *)(a1 + 80) = 5; *a2 = *(_QWORD *)(*(_QWORD *)(a1 + 224) + 8LL); *(_QWORD *)(a1 + 224) = **(_QWORD **)(a1 + 224); return 0; } else { *a2 = 0LL; *(_DWORD *)(a1 + 80) = 6; return 100; } }
stmt_buffered_fetch: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0xe0],0x0 JNZ 0x0015cec9 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x6 MOV dword ptr [RBP + -0x4],0x64 JMP 0x0015cf0a LAB_0015cec9: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x5 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xe0] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xe0] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],RCX MOV dword ptr [RBP + -0x4],0x0 LAB_0015cf0a: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 stmt_buffered_fetch(long param_1,int8 *param_2) { int4 local_c; if (*(long *)(param_1 + 0xe0) == 0) { *param_2 = 0; *(int4 *)(param_1 + 0x50) = 6; local_c = 100; } else { *(int4 *)(param_1 + 0x50) = 5; *param_2 = *(int8 *)(*(long *)(param_1 + 0xe0) + 8); *(int8 *)(param_1 + 0xe0) = **(int8 **)(param_1 + 0xe0); local_c = 0; } return local_c; }
49,502
gguf_set_val_i64
ngxson[P]ggml-easy/ggml/src/gguf.cpp
void gguf_set_val_i64(struct gguf_context * ctx, const char * key, int64_t val) { gguf_check_reserved_keys(key, val); gguf_remove_key(ctx, key); ctx->kv.emplace_back(key, val); }
O2
cpp
gguf_set_val_i64: pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) leaq 0x20(%rsp), %r15 leaq 0xf(%rsp), %rdx movq %r15, %rdi callq 0x1e820 leaq 0x1a670(%rip), %rsi # 0x5a982 movq %r15, %rdi callq 0x1efa0 testb %al, %al jne 0x40353 leaq 0x20(%rsp), %rdi callq 0x1c9a0 movq %rbx, %rdi movq %r14, %rsi callq 0x1def0 addq $0x8, %rbx leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x1cfe0 addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x1a5bb(%rip), %rdi # 0x5a915 leaq 0x1ae15(%rip), %rdx # 0x5b176 movl $0x3a8, %esi # imm = 0x3A8 xorl %eax, %eax callq 0x1e770 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x1c9a0 movq %rbx, %rdi callq 0x1e9b0
gguf_set_val_i64: push r15 push r14 push rbx sub rsp, 40h mov r14, rsi mov rbx, rdi mov [rsp+58h+var_40], rsi mov [rsp+58h+var_48], rdx lea r15, [rsp+58h+var_38] lea rdx, [rsp+58h+var_49] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" mov rdi, r15 call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_40353 lea rdi, [rsp+58h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx mov rsi, r14 call _gguf_remove_key add rbx, 8 lea rsi, [rsp+58h+var_40] lea rdx, [rsp+58h+var_48] mov rdi, rbx call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRlEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,long &>(char const*&,long &) add rsp, 40h pop rbx pop r14 pop r15 retn loc_40353: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A8h xor eax, eax call _ggml_abort mov rbx, rax lea rdi, [rsp+58h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long gguf_set_val_i64( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rcx long long v12; // r8 long long v13; // r9 __m128 v14; // xmm4 __m128 v15; // xmm5 long long v16; // rdx char v18; // [rsp+0h] [rbp-58h] char v19; // [rsp+Fh] [rbp-49h] BYREF long long v20; // [rsp+10h] [rbp-48h] BYREF long long v21; // [rsp+18h] [rbp-40h] BYREF _BYTE v22[56]; // [rsp+20h] [rbp-38h] BYREF v21 = a2; v20 = a3; std::string::basic_string<std::allocator<char>>(v22, a2, &v19); if ( (unsigned __int8)std::operator==<char>(v22, "general.alignment") ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp", 936, (long long)"general.alignment must be type u32", v11, v12, v13, a4, a5, a6, a7, v14, v15, a10, a11, v18); std::string::~string(v22); gguf_remove_key(a1, a2, v16); return std::vector<gguf_kv>::emplace_back<char const*&,long &>(a1 + 8, &v21, &v20); }
gguf_set_val_i64: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX LEA R15,[RSP + 0x20] LEA RDX,[RSP + 0xf] MOV RDI,R15 CALL 0x0011e820 LEA RSI,[0x15a982] MOV RDI,R15 CALL 0x0011efa0 TEST AL,AL JNZ 0x00140353 LEA RDI,[RSP + 0x20] CALL 0x0011c9a0 MOV RDI,RBX MOV RSI,R14 CALL 0x0011def0 ADD RBX,0x8 LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] MOV RDI,RBX CALL 0x0011cfe0 ADD RSP,0x40 POP RBX POP R14 POP R15 RET LAB_00140353: LEA RDI,[0x15a915] LEA RDX,[0x15b176] MOV ESI,0x3a8 XOR EAX,EAX CALL 0x0011e770
void gguf_set_val_i64(long param_1,char *param_2,long param_3) { bool bVar1; allocator local_49; long local_48; char *local_40; string local_38 [32]; local_48 = param_3; local_40 = param_2; std::__cxx11::string::string<std::allocator<char>>(local_38,param_2,&local_49); bVar1 = std::operator==(local_38,"general.alignment"); if (!bVar1) { std::__cxx11::string::~string(local_38); gguf_remove_key(param_1,param_2); std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,long&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_40,&local_48); return; } /* try { // try from 00140353 to 0014036c has its CatchHandler @ 0014036d */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",0x3a8, "general.alignment must be type u32"); }
49,503
unicode_case1
bluesky950520[P]quickjs/libunicode.c
static int unicode_case1(CharRange *cr, int case_mask) { #define MR(x) (1 << RUN_TYPE_ ## x) const uint32_t tab_run_mask[3] = { MR(U) | MR(UF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(U_EXT) | MR(UF_EXT2) | MR(UF_EXT3), MR(L) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2), MR(UF) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(LF_EXT) | MR(UF_EXT2) | MR(UF_EXT3), }; #undef MR uint32_t mask, v, code, type, len, i, idx; if (case_mask == 0) return 0; mask = 0; for(i = 0; i < 3; i++) { if ((case_mask >> i) & 1) mask |= tab_run_mask[i]; } for(idx = 0; idx < countof(case_conv_table1); idx++) { v = case_conv_table1[idx]; type = (v >> (32 - 17 - 7 - 4)) & 0xf; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; if ((mask >> type) & 1) { // printf("%d: type=%d %04x %04x\n", idx, type, code, code + len - 1); switch(type) { case RUN_TYPE_UL: if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F))) goto def_case; code += ((case_mask & CASE_U) != 0); for(i = 0; i < len; i += 2) { if (cr_add_interval(cr, code + i, code + i + 1)) return -1; } break; case RUN_TYPE_LSU: if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F))) goto def_case; if (!(case_mask & CASE_U)) { if (cr_add_interval(cr, code, code + 1)) return -1; } if (cr_add_interval(cr, code + 1, code + 2)) return -1; if (case_mask & CASE_U) { if (cr_add_interval(cr, code + 2, code + 3)) return -1; } break; default: def_case: if (cr_add_interval(cr, code, code + len)) return -1; break; } } } return 0; }
O1
c
unicode_case1: testl %esi, %esi je 0x98e9e pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 xorl %eax, %eax leaq 0x10ab5(%rip), %rcx # 0xa976c xorl %ebp, %ebp btl %eax, %esi jae 0x98cc0 orl (%rcx), %ebp incq %rax addq $0x4, %rcx cmpq $0x3, %rax jne 0x98cb9 movl %esi, %eax andl $0x1, %eax movl %eax, 0x10(%rsp) sete %al movl %esi, 0x14(%rsp) testb $0x6, %sil sete %cl orb %al, %cl movb %cl, 0xf(%rsp) xorl %r13d, %r13d leaq 0x944c(%rip), %rax # 0xa2140 movl (%rax,%r13,4), %r12d movl %r12d, %eax shrl $0x4, %eax andl $0xf, %eax btl %eax, %ebp jae 0x98e8a movl %r12d, %r15d shrl $0xf, %r15d shrl $0x8, %r12d andl $0x7f, %r12d cmpl $0x5, %eax je 0x98d91 cmpl $0x4, %eax jne 0x98e44 cmpb $0x0, 0xf(%rsp) je 0x98e44 testl %r12d, %r12d je 0x98e8a addl 0x10(%rsp), %r15d xorl %ebx, %ebx movl (%r14), %esi addl $0x2, %esi cmpl 0x4(%r14), %esi jle 0x98d5e movq %r14, %rdi callq 0x97a5c testl %eax, %eax jne 0x98ea1 leal (%r15,%rbx), %eax leal (%r15,%rbx), %ecx incl %ecx movq 0x8(%r14), %rdx movslq (%r14), %rsi leal 0x1(%rsi), %edi movl %edi, (%r14) movl %eax, (%rdx,%rsi,4) movslq (%r14), %rax leal 0x1(%rax), %esi movl %esi, (%r14) movl %ecx, (%rdx,%rax,4) addl $0x2, %ebx cmpl %r12d, %ebx jb 0x98d42 jmp 0x98e8a cmpb $0x0, 0xf(%rsp) je 0x98e44 movl 0x14(%rsp), %r12d testb $0x1, %r12b jne 0x98de4 movl (%r14), %esi addl $0x2, %esi cmpl 0x4(%r14), %esi jle 0x98dc3 movq %r14, %rdi callq 0x97a5c testl %eax, %eax jne 0x98ea1 leal 0x1(%r15), %eax movq 0x8(%r14), %rcx movslq (%r14), %rdx leal 0x1(%rdx), %esi movl %esi, (%r14) movl %r15d, (%rcx,%rdx,4) movslq (%r14), %rdx leal 0x1(%rdx), %esi movl %esi, (%r14) movl %eax, (%rcx,%rdx,4) movl (%r14), %esi addl $0x2, %esi cmpl 0x4(%r14), %esi jle 0x98e00 movq %r14, %rdi callq 0x97a5c testl %eax, %eax jne 0x98ea1 leal 0x1(%r15), %eax leal 0x2(%r15), %ebx movq 0x8(%r14), %rcx movslq (%r14), %rdx leal 0x1(%rdx), %esi movl %esi, (%r14) movl %eax, (%rcx,%rdx,4) movslq (%r14), %rax leal 0x1(%rax), %edx movl %edx, (%r14) movl %ebx, (%rcx,%rax,4) testb $0x1, %r12b je 0x98e8a addl $0x3, %r15d movl (%r14), %esi addl $0x2, %esi cmpl 0x4(%r14), %esi jle 0x98e6d movq %r14, %rdi callq 0x97a5c jmp 0x98e61 addl %r15d, %r12d movl (%r14), %esi addl $0x2, %esi cmpl 0x4(%r14), %esi jle 0x98e67 movq %r14, %rdi callq 0x97a5c movl %r15d, %ebx movl %r12d, %r15d testl %eax, %eax je 0x98e6d jmp 0x98ea1 movl %r15d, %ebx movl %r12d, %r15d movq 0x8(%r14), %rax movslq (%r14), %rcx leal 0x1(%rcx), %edx movl %edx, (%r14) movl %ebx, (%rax,%rcx,4) movslq (%r14), %rcx leal 0x1(%rcx), %edx movl %edx, (%r14) movl %r15d, (%rax,%rcx,4) incq %r13 cmpq $0x17a, %r13 # imm = 0x17A jne 0x98ced xorl %eax, %eax jmp 0x98ea6 xorl %eax, %eax retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
unicode_case1: test esi, esi jz loc_98E9E push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdi xor eax, eax lea rcx, unk_A976C xor ebp, ebp loc_98CB9: bt esi, eax jnb short loc_98CC0 or ebp, [rcx] loc_98CC0: inc rax add rcx, 4 cmp rax, 3 jnz short loc_98CB9 mov eax, esi and eax, 1 mov [rsp+48h+var_38], eax setz al mov [rsp+48h+var_34], esi test sil, 6 setz cl or cl, al mov [rsp+48h+var_39], cl xor r13d, r13d loc_98CED: lea rax, case_conv_table1 mov r12d, [rax+r13*4] mov eax, r12d shr eax, 4 and eax, 0Fh bt ebp, eax jnb loc_98E8A mov r15d, r12d shr r15d, 0Fh shr r12d, 8 and r12d, 7Fh cmp eax, 5 jz short loc_98D91 cmp eax, 4 jnz loc_98E44 cmp [rsp+48h+var_39], 0 jz loc_98E44 test r12d, r12d jz loc_98E8A add r15d, [rsp+48h+var_38] xor ebx, ebx loc_98D42: mov esi, [r14] add esi, 2 cmp esi, [r14+4] jle short loc_98D5E mov rdi, r14 call cr_realloc test eax, eax jnz loc_98EA1 loc_98D5E: lea eax, [r15+rbx] lea ecx, [r15+rbx] inc ecx mov rdx, [r14+8] movsxd rsi, dword ptr [r14] lea edi, [rsi+1] mov [r14], edi mov [rdx+rsi*4], eax movsxd rax, dword ptr [r14] lea esi, [rax+1] mov [r14], esi mov [rdx+rax*4], ecx add ebx, 2 cmp ebx, r12d jb short loc_98D42 jmp loc_98E8A loc_98D91: cmp [rsp+48h+var_39], 0 jz loc_98E44 mov r12d, [rsp+48h+var_34] test r12b, 1 jnz short loc_98DE4 mov esi, [r14] add esi, 2 cmp esi, [r14+4] jle short loc_98DC3 mov rdi, r14 call cr_realloc test eax, eax jnz loc_98EA1 loc_98DC3: lea eax, [r15+1] mov rcx, [r14+8] movsxd rdx, dword ptr [r14] lea esi, [rdx+1] mov [r14], esi mov [rcx+rdx*4], r15d movsxd rdx, dword ptr [r14] lea esi, [rdx+1] mov [r14], esi mov [rcx+rdx*4], eax loc_98DE4: mov esi, [r14] add esi, 2 cmp esi, [r14+4] jle short loc_98E00 mov rdi, r14 call cr_realloc test eax, eax jnz loc_98EA1 loc_98E00: lea eax, [r15+1] lea ebx, [r15+2] mov rcx, [r14+8] movsxd rdx, dword ptr [r14] lea esi, [rdx+1] mov [r14], esi mov [rcx+rdx*4], eax movsxd rax, dword ptr [r14] lea edx, [rax+1] mov [r14], edx mov [rcx+rax*4], ebx test r12b, 1 jz short loc_98E8A add r15d, 3 mov esi, [r14] add esi, 2 cmp esi, [r14+4] jle short loc_98E6D mov rdi, r14 call cr_realloc jmp short loc_98E61 loc_98E44: add r12d, r15d mov esi, [r14] add esi, 2 cmp esi, [r14+4] jle short loc_98E67 mov rdi, r14 call cr_realloc mov ebx, r15d mov r15d, r12d loc_98E61: test eax, eax jz short loc_98E6D jmp short loc_98EA1 loc_98E67: mov ebx, r15d mov r15d, r12d loc_98E6D: mov rax, [r14+8] movsxd rcx, dword ptr [r14] lea edx, [rcx+1] mov [r14], edx mov [rax+rcx*4], ebx movsxd rcx, dword ptr [r14] lea edx, [rcx+1] mov [r14], edx mov [rax+rcx*4], r15d loc_98E8A: inc r13 cmp r13, 17Ah jnz loc_98CED xor eax, eax jmp short loc_98EA6 loc_98E9E: xor eax, eax retn loc_98EA1: mov eax, 0FFFFFFFFh loc_98EA6: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long unicode_case1(int *a1, int a2) { long long v2; // rax _DWORD *v3; // rcx int v4; // ebp long long v5; // r13 unsigned int v6; // r12d unsigned int v7; // eax unsigned int v8; // r15d unsigned int v9; // r12d unsigned int v10; // r15d unsigned int v11; // ebx int v12; // esi long long v13; // rdx long long v14; // rsi long long v15; // rax int v16; // esi long long v17; // rcx long long v18; // rdx long long v19; // rdx int v20; // esi unsigned int v21; // ebx long long v22; // rcx long long v23; // rdx long long v24; // rax unsigned int v25; // r15d int v26; // esi int v27; // eax unsigned int v28; // r12d int v29; // esi long long v30; // rax long long v31; // rcx long long v32; // rcx bool v34; // [rsp+1h] [rbp-39h] int v35; // [rsp+2h] [rbp-38h] char v36; // [rsp+6h] [rbp-34h] if ( !a2 ) return 0LL; v2 = 0LL; v3 = &unk_A976C; v4 = 0; do { if ( _bittest(&a2, v2) ) v4 |= *v3; ++v2; ++v3; } while ( v2 != 3 ); v35 = a2 & 1; v36 = a2; v34 = v35 == 0 || (a2 & 6) == 0; v5 = 0LL; while ( 1 ) { v6 = case_conv_table1[v5]; v7 = (unsigned __int8)v6 >> 4; if ( !_bittest(&v4, v7) ) goto LABEL_33; v8 = v6 >> 15; v9 = (v6 >> 8) & 0x7F; if ( v7 != 5 ) break; if ( !v34 ) goto LABEL_27; if ( (v36 & 1) == 0 ) { v16 = *a1 + 2; if ( v16 > a1[1] && (unsigned int)cr_realloc((long long)a1, v16) ) return 0xFFFFFFFFLL; v17 = *((_QWORD *)a1 + 1); v18 = *a1; *a1 = v18 + 1; *(_DWORD *)(v17 + 4 * v18) = v8; v19 = *a1; *a1 = v19 + 1; *(_DWORD *)(v17 + 4 * v19) = v8 + 1; } v20 = *a1 + 2; if ( v20 > a1[1] && (unsigned int)cr_realloc((long long)a1, v20) ) return 0xFFFFFFFFLL; v21 = v8 + 2; v22 = *((_QWORD *)a1 + 1); v23 = *a1; *a1 = v23 + 1; *(_DWORD *)(v22 + 4 * v23) = v8 + 1; v24 = *a1; *a1 = v24 + 1; *(_DWORD *)(v22 + 4 * v24) = v8 + 2; if ( (v36 & 1) != 0 ) { v25 = v8 + 3; v26 = *a1 + 2; if ( v26 > a1[1] ) { v27 = cr_realloc((long long)a1, v26); LABEL_29: if ( v27 ) return 0xFFFFFFFFLL; } LABEL_32: v30 = *((_QWORD *)a1 + 1); v31 = *a1; *a1 = v31 + 1; *(_DWORD *)(v30 + 4 * v31) = v21; v32 = *a1; *a1 = v32 + 1; *(_DWORD *)(v30 + 4 * v32) = v25; } LABEL_33: if ( ++v5 == 378 ) return 0LL; } if ( v7 != 4 || !v34 ) { LABEL_27: v28 = v8 + v9; v29 = *a1 + 2; if ( v29 > a1[1] ) { v27 = cr_realloc((long long)a1, v29); v21 = v8; v25 = v28; goto LABEL_29; } v21 = v8; v25 = v28; goto LABEL_32; } if ( !v9 ) goto LABEL_33; v10 = v35 + v8; v11 = 0; while ( 1 ) { v12 = *a1 + 2; if ( v12 > a1[1] ) { if ( (unsigned int)cr_realloc((long long)a1, v12) ) return 0xFFFFFFFFLL; } v13 = *((_QWORD *)a1 + 1); v14 = *a1; *a1 = v14 + 1; *(_DWORD *)(v13 + 4 * v14) = v10 + v11; v15 = *a1; *a1 = v15 + 1; *(_DWORD *)(v13 + 4 * v15) = v10 + v11 + 1; v11 += 2; if ( v11 >= v9 ) goto LABEL_33; } }
unicode_case1: TEST ESI,ESI JZ 0x00198e9e PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDI XOR EAX,EAX LEA RCX,[0x1a976c] XOR EBP,EBP LAB_00198cb9: BT ESI,EAX JNC 0x00198cc0 OR EBP,dword ptr [RCX] LAB_00198cc0: INC RAX ADD RCX,0x4 CMP RAX,0x3 JNZ 0x00198cb9 MOV EAX,ESI AND EAX,0x1 MOV dword ptr [RSP + 0x10],EAX SETZ AL MOV dword ptr [RSP + 0x14],ESI TEST SIL,0x6 SETZ CL OR CL,AL MOV byte ptr [RSP + 0xf],CL XOR R13D,R13D LAB_00198ced: LEA RAX,[0x1a2140] MOV R12D,dword ptr [RAX + R13*0x4] MOV EAX,R12D SHR EAX,0x4 AND EAX,0xf BT EBP,EAX JNC 0x00198e8a MOV R15D,R12D SHR R15D,0xf SHR R12D,0x8 AND R12D,0x7f CMP EAX,0x5 JZ 0x00198d91 CMP EAX,0x4 JNZ 0x00198e44 CMP byte ptr [RSP + 0xf],0x0 JZ 0x00198e44 TEST R12D,R12D JZ 0x00198e8a ADD R15D,dword ptr [RSP + 0x10] XOR EBX,EBX LAB_00198d42: MOV ESI,dword ptr [R14] ADD ESI,0x2 CMP ESI,dword ptr [R14 + 0x4] JLE 0x00198d5e MOV RDI,R14 CALL 0x00197a5c TEST EAX,EAX JNZ 0x00198ea1 LAB_00198d5e: LEA EAX,[R15 + RBX*0x1] LEA ECX,[R15 + RBX*0x1] INC ECX MOV RDX,qword ptr [R14 + 0x8] MOVSXD RSI,dword ptr [R14] LEA EDI,[RSI + 0x1] MOV dword ptr [R14],EDI MOV dword ptr [RDX + RSI*0x4],EAX MOVSXD RAX,dword ptr [R14] LEA ESI,[RAX + 0x1] MOV dword ptr [R14],ESI MOV dword ptr [RDX + RAX*0x4],ECX ADD EBX,0x2 CMP EBX,R12D JC 0x00198d42 JMP 0x00198e8a LAB_00198d91: CMP byte ptr [RSP + 0xf],0x0 JZ 0x00198e44 MOV R12D,dword ptr [RSP + 0x14] TEST R12B,0x1 JNZ 0x00198de4 MOV ESI,dword ptr [R14] ADD ESI,0x2 CMP ESI,dword ptr [R14 + 0x4] JLE 0x00198dc3 MOV RDI,R14 CALL 0x00197a5c TEST EAX,EAX JNZ 0x00198ea1 LAB_00198dc3: LEA EAX,[R15 + 0x1] MOV RCX,qword ptr [R14 + 0x8] MOVSXD RDX,dword ptr [R14] LEA ESI,[RDX + 0x1] MOV dword ptr [R14],ESI MOV dword ptr [RCX + RDX*0x4],R15D MOVSXD RDX,dword ptr [R14] LEA ESI,[RDX + 0x1] MOV dword ptr [R14],ESI MOV dword ptr [RCX + RDX*0x4],EAX LAB_00198de4: MOV ESI,dword ptr [R14] ADD ESI,0x2 CMP ESI,dword ptr [R14 + 0x4] JLE 0x00198e00 MOV RDI,R14 CALL 0x00197a5c TEST EAX,EAX JNZ 0x00198ea1 LAB_00198e00: LEA EAX,[R15 + 0x1] LEA EBX,[R15 + 0x2] MOV RCX,qword ptr [R14 + 0x8] MOVSXD RDX,dword ptr [R14] LEA ESI,[RDX + 0x1] MOV dword ptr [R14],ESI MOV dword ptr [RCX + RDX*0x4],EAX MOVSXD RAX,dword ptr [R14] LEA EDX,[RAX + 0x1] MOV dword ptr [R14],EDX MOV dword ptr [RCX + RAX*0x4],EBX TEST R12B,0x1 JZ 0x00198e8a ADD R15D,0x3 MOV ESI,dword ptr [R14] ADD ESI,0x2 CMP ESI,dword ptr [R14 + 0x4] JLE 0x00198e6d MOV RDI,R14 CALL 0x00197a5c JMP 0x00198e61 LAB_00198e44: ADD R12D,R15D MOV ESI,dword ptr [R14] ADD ESI,0x2 CMP ESI,dword ptr [R14 + 0x4] JLE 0x00198e67 MOV RDI,R14 CALL 0x00197a5c MOV EBX,R15D MOV R15D,R12D LAB_00198e61: TEST EAX,EAX JZ 0x00198e6d JMP 0x00198ea1 LAB_00198e67: MOV EBX,R15D MOV R15D,R12D LAB_00198e6d: MOV RAX,qword ptr [R14 + 0x8] MOVSXD RCX,dword ptr [R14] LEA EDX,[RCX + 0x1] MOV dword ptr [R14],EDX MOV dword ptr [RAX + RCX*0x4],EBX MOVSXD RCX,dword ptr [R14] LEA EDX,[RCX + 0x1] MOV dword ptr [R14],EDX MOV dword ptr [RAX + RCX*0x4],R15D LAB_00198e8a: INC R13 CMP R13,0x17a JNZ 0x00198ced XOR EAX,EAX JMP 0x00198ea6 LAB_00198e9e: XOR EAX,EAX RET LAB_00198ea1: MOV EAX,0xffffffff LAB_00198ea6: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 unicode_case1(int *param_1,uint param_2) { long lVar1; uint uVar2; uint uVar3; int iVar4; int iVar5; long lVar6; uint *puVar7; uint uVar8; uint uVar9; uint uVar10; bool bVar11; if (param_2 == 0) { return 0; } lVar6 = 0; puVar7 = &DAT_001a976c; uVar8 = 0; do { if ((param_2 >> ((uint)lVar6 & 0x1f) & 1) != 0) { uVar8 = uVar8 | *puVar7; } lVar6 = lVar6 + 1; puVar7 = puVar7 + 1; } while (lVar6 != 3); uVar2 = param_2 & 1; bVar11 = (param_2 & 6) == 0; lVar6 = 0; do { uVar9 = (&case_conv_table1)[lVar6]; uVar3 = uVar9 >> 4 & 0xf; if ((uVar8 >> uVar3 & 1) != 0) { uVar10 = uVar9 >> 0xf; uVar9 = uVar9 >> 8 & 0x7f; if (uVar3 == 5) { if (!bVar11 && uVar2 != 0) goto LAB_00198e44; if ((param_2 & 1) == 0) { if ((param_1[1] < *param_1 + 2) && (iVar4 = cr_realloc(param_1), iVar4 != 0)) { return 0xffffffff; } lVar1 = *(long *)(param_1 + 2); iVar4 = *param_1; *param_1 = iVar4 + 1; *(uint *)(lVar1 + (long)iVar4 * 4) = uVar10; iVar4 = *param_1; *param_1 = iVar4 + 1; *(uint *)(lVar1 + (long)iVar4 * 4) = uVar10 + 1; } if ((param_1[1] < *param_1 + 2) && (iVar4 = cr_realloc(param_1), iVar4 != 0)) { return 0xffffffff; } uVar9 = uVar10 + 2; lVar1 = *(long *)(param_1 + 2); iVar4 = *param_1; *param_1 = iVar4 + 1; *(uint *)(lVar1 + (long)iVar4 * 4) = uVar10 + 1; iVar4 = *param_1; *param_1 = iVar4 + 1; *(uint *)(lVar1 + (long)iVar4 * 4) = uVar9; if ((param_2 & 1) == 0) goto LAB_00198e8a; iVar4 = uVar10 + 3; uVar10 = uVar9; if (param_1[1] < *param_1 + 2) { iVar5 = cr_realloc(param_1); goto LAB_00198e61; } } else { if ((uVar3 == 4) && (bVar11 || uVar2 == 0)) { if (uVar9 != 0) { uVar3 = 0; do { if ((param_1[1] < *param_1 + 2) && (iVar4 = cr_realloc(param_1), iVar4 != 0)) { return 0xffffffff; } lVar1 = *(long *)(param_1 + 2); iVar4 = *param_1; *param_1 = iVar4 + 1; *(uint *)(lVar1 + (long)iVar4 * 4) = uVar10 + uVar2 + uVar3; iVar4 = *param_1; *param_1 = iVar4 + 1; *(uint *)(lVar1 + (long)iVar4 * 4) = uVar10 + uVar2 + uVar3 + 1; uVar3 = uVar3 + 2; } while (uVar3 < uVar9); } goto LAB_00198e8a; } LAB_00198e44: iVar4 = uVar9 + uVar10; if (param_1[1] < *param_1 + 2) { iVar5 = cr_realloc(param_1); uVar9 = uVar10; LAB_00198e61: uVar10 = uVar9; if (iVar5 != 0) { return 0xffffffff; } } } lVar1 = *(long *)(param_1 + 2); iVar5 = *param_1; *param_1 = iVar5 + 1; *(uint *)(lVar1 + (long)iVar5 * 4) = uVar10; iVar5 = *param_1; *param_1 = iVar5 + 1; *(int *)(lVar1 + (long)iVar5 * 4) = iVar4; } LAB_00198e8a: lVar6 = lVar6 + 1; if (lVar6 == 0x17a) { return 0; } } while( true ); }
49,504
unicode_case1
bluesky950520[P]quickjs/libunicode.c
static int unicode_case1(CharRange *cr, int case_mask) { #define MR(x) (1 << RUN_TYPE_ ## x) const uint32_t tab_run_mask[3] = { MR(U) | MR(UF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(U_EXT) | MR(UF_EXT2) | MR(UF_EXT3), MR(L) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2), MR(UF) | MR(LF) | MR(UL) | MR(LSU) | MR(U2L_399_EXT2) | MR(LF_EXT) | MR(LF_EXT2) | MR(UF_D20) | MR(UF_D1_EXT) | MR(LF_EXT) | MR(UF_EXT2) | MR(UF_EXT3), }; #undef MR uint32_t mask, v, code, type, len, i, idx; if (case_mask == 0) return 0; mask = 0; for(i = 0; i < 3; i++) { if ((case_mask >> i) & 1) mask |= tab_run_mask[i]; } for(idx = 0; idx < countof(case_conv_table1); idx++) { v = case_conv_table1[idx]; type = (v >> (32 - 17 - 7 - 4)) & 0xf; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; if ((mask >> type) & 1) { // printf("%d: type=%d %04x %04x\n", idx, type, code, code + len - 1); switch(type) { case RUN_TYPE_UL: if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F))) goto def_case; code += ((case_mask & CASE_U) != 0); for(i = 0; i < len; i += 2) { if (cr_add_interval(cr, code + i, code + i + 1)) return -1; } break; case RUN_TYPE_LSU: if ((case_mask & CASE_U) && (case_mask & (CASE_L | CASE_F))) goto def_case; if (!(case_mask & CASE_U)) { if (cr_add_interval(cr, code, code + 1)) return -1; } if (cr_add_interval(cr, code + 1, code + 2)) return -1; if (case_mask & CASE_U) { if (cr_add_interval(cr, code + 2, code + 3)) return -1; } break; default: def_case: if (cr_add_interval(cr, code, code + len)) return -1; break; } } } return 0; }
O3
c
unicode_case1: testl %esi, %esi je 0x9b80f pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx xorl %eax, %eax leaq 0x110e7(%rip), %rcx # 0xac71c xorl %ebp, %ebp btl %eax, %esi jae 0x9b63e orl (%rcx), %ebp incq %rax addq $0x4, %rcx cmpq $0x3, %rax jne 0x9b637 movl %esi, %eax andl $0x1, %eax movl %eax, 0x4(%rsp) sete %al testb $0x6, %sil sete %cl orb %al, %cl movb %cl, 0x3(%rsp) xorl %r12d, %r12d leaq 0x9a82(%rip), %rax # 0xa50f0 movl (%rax,%r12,4), %r13d movl %r13d, %eax shrl $0x4, %eax andl $0xf, %eax btl %eax, %ebp jae 0x9b7fb movl %r13d, %r14d shrl $0xf, %r14d shrl $0x8, %r13d andl $0x7f, %r13d cmpl $0x5, %eax je 0x9b70a cmpl $0x4, %eax jne 0x9b7b2 cmpb $0x0, 0x3(%rsp) je 0x9b7b2 testl %r13d, %r13d je 0x9b7fb addl 0x4(%rsp), %r14d xorl %r15d, %r15d movl (%rbx), %eax leal 0x2(%rax), %esi cmpl 0x4(%rbx), %esi jle 0x9b6d9 movq %rbx, %rdi callq 0x9a333 testl %eax, %eax jne 0x9b812 movl (%rbx), %eax leal (%r14,%r15), %ecx leal (%r14,%r15), %edx incl %edx movq 0x8(%rbx), %rsi leal 0x1(%rax), %edi movl %edi, (%rbx) cltq movl %ecx, (%rsi,%rax,4) movslq (%rbx), %rax leal 0x1(%rax), %ecx movl %ecx, (%rbx) movl %edx, (%rsi,%rax,4) addl $0x2, %r15d cmpl %r13d, %r15d jb 0x9b6bd jmp 0x9b7fb cmpb $0x0, 0x3(%rsp) je 0x9b7b2 leal 0x1(%r14), %r13d cmpl $0x0, 0x4(%rsp) jne 0x9b757 movl (%rbx), %eax leal 0x2(%rax), %esi cmpl 0x4(%rbx), %esi jle 0x9b73c movq %rbx, %rdi callq 0x9a333 testl %eax, %eax jne 0x9b812 movl (%rbx), %eax movq 0x8(%rbx), %rcx leal 0x1(%rax), %edx movl %edx, (%rbx) cltq movl %r14d, (%rcx,%rax,4) movslq (%rbx), %rax leal 0x1(%rax), %edx movl %edx, (%rbx) movl %r13d, (%rcx,%rax,4) movl (%rbx), %ecx leal 0x2(%rcx), %esi cmpl 0x4(%rbx), %esi jle 0x9b773 movq %rbx, %rdi callq 0x9a333 testl %eax, %eax jne 0x9b812 movl (%rbx), %ecx leal 0x2(%r14), %r15d movq 0x8(%rbx), %rax leal 0x1(%rcx), %edx movl %edx, (%rbx) movslq %ecx, %rcx movl %r13d, (%rax,%rcx,4) movslq (%rbx), %rcx leal 0x1(%rcx), %edx movl %edx, (%rbx) movl %r15d, (%rax,%rcx,4) cmpl $0x0, 0x4(%rsp) je 0x9b7fb addl $0x3, %r14d movl (%rbx), %ecx leal 0x2(%rcx), %esi cmpl 0x4(%rbx), %esi jle 0x9b7e3 movq %rbx, %rdi callq 0x9a333 jmp 0x9b7cd addl %r14d, %r13d movl (%rbx), %ecx leal 0x2(%rcx), %esi cmpl 0x4(%rbx), %esi jle 0x9b7d9 movq %rbx, %rdi callq 0x9a333 movl %r14d, %r15d movl %r13d, %r14d testl %eax, %eax jne 0x9b812 movl %r14d, %r13d movl (%rbx), %ecx movl %r15d, %r14d movq 0x8(%rbx), %rax movl %r14d, %r15d movl %r13d, %r14d leal 0x1(%rcx), %edx movl %edx, (%rbx) movslq %ecx, %rcx movl %r15d, (%rax,%rcx,4) movslq (%rbx), %rcx leal 0x1(%rcx), %edx movl %edx, (%rbx) movl %r14d, (%rax,%rcx,4) incq %r12 cmpq $0x17a, %r12 # imm = 0x17A jne 0x9b667 xorl %eax, %eax jmp 0x9b817 xorl %eax, %eax retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
unicode_case1: test esi, esi jz loc_9B80F push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi xor eax, eax lea rcx, unk_AC71C xor ebp, ebp loc_9B637: bt esi, eax jnb short loc_9B63E or ebp, [rcx] loc_9B63E: inc rax add rcx, 4 cmp rax, 3 jnz short loc_9B637 mov eax, esi and eax, 1 mov [rsp+38h+var_34], eax setz al test sil, 6 setz cl or cl, al mov [rsp+38h+var_35], cl xor r12d, r12d loc_9B667: lea rax, case_conv_table1 mov r13d, [rax+r12*4] mov eax, r13d shr eax, 4 and eax, 0Fh bt ebp, eax jnb loc_9B7FB mov r14d, r13d shr r14d, 0Fh shr r13d, 8 and r13d, 7Fh cmp eax, 5 jz short loc_9B70A cmp eax, 4 jnz loc_9B7B2 cmp [rsp+38h+var_35], 0 jz loc_9B7B2 test r13d, r13d jz loc_9B7FB add r14d, [rsp+38h+var_34] xor r15d, r15d loc_9B6BD: mov eax, [rbx] lea esi, [rax+2] cmp esi, [rbx+4] jle short loc_9B6D9 mov rdi, rbx call cr_realloc test eax, eax jnz loc_9B812 mov eax, [rbx] loc_9B6D9: lea ecx, [r14+r15] lea edx, [r14+r15] inc edx mov rsi, [rbx+8] lea edi, [rax+1] mov [rbx], edi cdqe mov [rsi+rax*4], ecx movsxd rax, dword ptr [rbx] lea ecx, [rax+1] mov [rbx], ecx mov [rsi+rax*4], edx add r15d, 2 cmp r15d, r13d jb short loc_9B6BD jmp loc_9B7FB loc_9B70A: cmp [rsp+38h+var_35], 0 jz loc_9B7B2 lea r13d, [r14+1] cmp [rsp+38h+var_34], 0 jnz short loc_9B757 mov eax, [rbx] lea esi, [rax+2] cmp esi, [rbx+4] jle short loc_9B73C mov rdi, rbx call cr_realloc test eax, eax jnz loc_9B812 mov eax, [rbx] loc_9B73C: mov rcx, [rbx+8] lea edx, [rax+1] mov [rbx], edx cdqe mov [rcx+rax*4], r14d movsxd rax, dword ptr [rbx] lea edx, [rax+1] mov [rbx], edx mov [rcx+rax*4], r13d loc_9B757: mov ecx, [rbx] lea esi, [rcx+2] cmp esi, [rbx+4] jle short loc_9B773 mov rdi, rbx call cr_realloc test eax, eax jnz loc_9B812 mov ecx, [rbx] loc_9B773: lea r15d, [r14+2] mov rax, [rbx+8] lea edx, [rcx+1] mov [rbx], edx movsxd rcx, ecx mov [rax+rcx*4], r13d movsxd rcx, dword ptr [rbx] lea edx, [rcx+1] mov [rbx], edx mov [rax+rcx*4], r15d cmp [rsp+38h+var_34], 0 jz short loc_9B7FB add r14d, 3 mov ecx, [rbx] lea esi, [rcx+2] cmp esi, [rbx+4] jle short loc_9B7E3 mov rdi, rbx call cr_realloc jmp short loc_9B7CD loc_9B7B2: add r13d, r14d mov ecx, [rbx] lea esi, [rcx+2] cmp esi, [rbx+4] jle short loc_9B7D9 mov rdi, rbx call cr_realloc mov r15d, r14d mov r14d, r13d loc_9B7CD: test eax, eax jnz short loc_9B812 mov r13d, r14d mov ecx, [rbx] mov r14d, r15d loc_9B7D9: mov rax, [rbx+8] mov r15d, r14d mov r14d, r13d loc_9B7E3: lea edx, [rcx+1] mov [rbx], edx movsxd rcx, ecx mov [rax+rcx*4], r15d movsxd rcx, dword ptr [rbx] lea edx, [rcx+1] mov [rbx], edx mov [rax+rcx*4], r14d loc_9B7FB: inc r12 cmp r12, 17Ah jnz loc_9B667 xor eax, eax jmp short loc_9B817 loc_9B80F: xor eax, eax retn loc_9B812: mov eax, 0FFFFFFFFh loc_9B817: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long unicode_case1(int *a1, int a2) { long long v2; // rax _DWORD *v3; // rcx int v4; // ebp long long v5; // r12 unsigned int v6; // r13d unsigned int v7; // eax unsigned int v8; // r14d unsigned int v9; // r13d unsigned int v10; // r14d unsigned int i; // r15d int v12; // eax int v13; // esi long long v14; // rsi long long v15; // rax unsigned int v16; // r13d int v17; // eax int v18; // esi long long v19; // rcx long long v20; // rax int v21; // ecx int v22; // esi unsigned int v23; // r15d long long v24; // rax long long v25; // rcx unsigned int v26; // r14d int v27; // ecx int v28; // esi int v29; // eax unsigned int v30; // r13d int v31; // esi long long v32; // rcx bool v34; // [rsp+1h] [rbp-35h] int v35; // [rsp+2h] [rbp-34h] if ( !a2 ) return 0LL; v2 = 0LL; v3 = &unk_AC71C; v4 = 0; do { if ( _bittest(&a2, v2) ) v4 |= *v3; ++v2; ++v3; } while ( v2 != 3 ); v35 = a2 & 1; v34 = v35 == 0 || (a2 & 6) == 0; v5 = 0LL; while ( 1 ) { v6 = case_conv_table1[v5]; v7 = (unsigned __int8)v6 >> 4; if ( !_bittest(&v4, v7) ) goto LABEL_36; v8 = v6 >> 15; v9 = (v6 >> 8) & 0x7F; if ( v7 != 5 ) break; if ( !v34 ) goto LABEL_30; v16 = v8 + 1; if ( !v35 ) { v17 = *a1; v18 = *a1 + 2; if ( v18 > a1[1] ) { if ( (unsigned int)cr_realloc((long long)a1, v18) ) return 0xFFFFFFFFLL; v17 = *a1; } v19 = *((_QWORD *)a1 + 1); *a1 = v17 + 1; *(_DWORD *)(v19 + 4LL * v17) = v8; v20 = *a1; *a1 = v20 + 1; *(_DWORD *)(v19 + 4 * v20) = v16; } v21 = *a1; v22 = *a1 + 2; if ( v22 > a1[1] ) { if ( (unsigned int)cr_realloc((long long)a1, v22) ) return 0xFFFFFFFFLL; v21 = *a1; } v23 = v8 + 2; v24 = *((_QWORD *)a1 + 1); *a1 = v21 + 1; *(_DWORD *)(v24 + 4LL * v21) = v16; v25 = *a1; *a1 = v25 + 1; *(_DWORD *)(v24 + 4 * v25) = v8 + 2; if ( v35 ) { v26 = v8 + 3; v27 = *a1; v28 = *a1 + 2; if ( v28 > a1[1] ) { v29 = cr_realloc((long long)a1, v28); goto LABEL_32; } LABEL_35: *a1 = v27 + 1; *(_DWORD *)(v24 + 4LL * v27) = v23; v32 = *a1; *a1 = v32 + 1; *(_DWORD *)(v24 + 4 * v32) = v26; } LABEL_36: if ( ++v5 == 378 ) return 0LL; } if ( v7 == 4 && v34 ) { if ( v9 ) { v10 = v35 + v8; for ( i = 0; i < v9; i += 2 ) { v12 = *a1; v13 = *a1 + 2; if ( v13 > a1[1] ) { if ( (unsigned int)cr_realloc((long long)a1, v13) ) return 0xFFFFFFFFLL; v12 = *a1; } v14 = *((_QWORD *)a1 + 1); *a1 = v12 + 1; *(_DWORD *)(v14 + 4LL * v12) = v10 + i; v15 = *a1; *a1 = v15 + 1; *(_DWORD *)(v14 + 4 * v15) = v10 + i + 1; } } goto LABEL_36; } LABEL_30: v30 = v8 + v9; v27 = *a1; v31 = *a1 + 2; if ( v31 <= a1[1] ) goto LABEL_34; v29 = cr_realloc((long long)a1, v31); v23 = v8; v26 = v30; LABEL_32: if ( !v29 ) { v30 = v26; v27 = *a1; v8 = v23; LABEL_34: v24 = *((_QWORD *)a1 + 1); v23 = v8; v26 = v30; goto LABEL_35; } return 0xFFFFFFFFLL; }
unicode_case1: TEST ESI,ESI JZ 0x0019b80f PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI XOR EAX,EAX LEA RCX,[0x1ac71c] XOR EBP,EBP LAB_0019b637: BT ESI,EAX JNC 0x0019b63e OR EBP,dword ptr [RCX] LAB_0019b63e: INC RAX ADD RCX,0x4 CMP RAX,0x3 JNZ 0x0019b637 MOV EAX,ESI AND EAX,0x1 MOV dword ptr [RSP + 0x4],EAX SETZ AL TEST SIL,0x6 SETZ CL OR CL,AL MOV byte ptr [RSP + 0x3],CL XOR R12D,R12D LAB_0019b667: LEA RAX,[0x1a50f0] MOV R13D,dword ptr [RAX + R12*0x4] MOV EAX,R13D SHR EAX,0x4 AND EAX,0xf BT EBP,EAX JNC 0x0019b7fb MOV R14D,R13D SHR R14D,0xf SHR R13D,0x8 AND R13D,0x7f CMP EAX,0x5 JZ 0x0019b70a CMP EAX,0x4 JNZ 0x0019b7b2 CMP byte ptr [RSP + 0x3],0x0 JZ 0x0019b7b2 TEST R13D,R13D JZ 0x0019b7fb ADD R14D,dword ptr [RSP + 0x4] XOR R15D,R15D LAB_0019b6bd: MOV EAX,dword ptr [RBX] LEA ESI,[RAX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019b6d9 MOV RDI,RBX CALL 0x0019a333 TEST EAX,EAX JNZ 0x0019b812 MOV EAX,dword ptr [RBX] LAB_0019b6d9: LEA ECX,[R14 + R15*0x1] LEA EDX,[R14 + R15*0x1] INC EDX MOV RSI,qword ptr [RBX + 0x8] LEA EDI,[RAX + 0x1] MOV dword ptr [RBX],EDI CDQE MOV dword ptr [RSI + RAX*0x4],ECX MOVSXD RAX,dword ptr [RBX] LEA ECX,[RAX + 0x1] MOV dword ptr [RBX],ECX MOV dword ptr [RSI + RAX*0x4],EDX ADD R15D,0x2 CMP R15D,R13D JC 0x0019b6bd JMP 0x0019b7fb LAB_0019b70a: CMP byte ptr [RSP + 0x3],0x0 JZ 0x0019b7b2 LEA R13D,[R14 + 0x1] CMP dword ptr [RSP + 0x4],0x0 JNZ 0x0019b757 MOV EAX,dword ptr [RBX] LEA ESI,[RAX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019b73c MOV RDI,RBX CALL 0x0019a333 TEST EAX,EAX JNZ 0x0019b812 MOV EAX,dword ptr [RBX] LAB_0019b73c: MOV RCX,qword ptr [RBX + 0x8] LEA EDX,[RAX + 0x1] MOV dword ptr [RBX],EDX CDQE MOV dword ptr [RCX + RAX*0x4],R14D MOVSXD RAX,dword ptr [RBX] LEA EDX,[RAX + 0x1] MOV dword ptr [RBX],EDX MOV dword ptr [RCX + RAX*0x4],R13D LAB_0019b757: MOV ECX,dword ptr [RBX] LEA ESI,[RCX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019b773 MOV RDI,RBX CALL 0x0019a333 TEST EAX,EAX JNZ 0x0019b812 MOV ECX,dword ptr [RBX] LAB_0019b773: LEA R15D,[R14 + 0x2] MOV RAX,qword ptr [RBX + 0x8] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX],EDX MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4],R13D MOVSXD RCX,dword ptr [RBX] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX],EDX MOV dword ptr [RAX + RCX*0x4],R15D CMP dword ptr [RSP + 0x4],0x0 JZ 0x0019b7fb ADD R14D,0x3 MOV ECX,dword ptr [RBX] LEA ESI,[RCX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019b7e3 MOV RDI,RBX CALL 0x0019a333 JMP 0x0019b7cd LAB_0019b7b2: ADD R13D,R14D MOV ECX,dword ptr [RBX] LEA ESI,[RCX + 0x2] CMP ESI,dword ptr [RBX + 0x4] JLE 0x0019b7d9 MOV RDI,RBX CALL 0x0019a333 MOV R15D,R14D MOV R14D,R13D LAB_0019b7cd: TEST EAX,EAX JNZ 0x0019b812 MOV R13D,R14D MOV ECX,dword ptr [RBX] MOV R14D,R15D LAB_0019b7d9: MOV RAX,qword ptr [RBX + 0x8] MOV R15D,R14D MOV R14D,R13D LAB_0019b7e3: LEA EDX,[RCX + 0x1] MOV dword ptr [RBX],EDX MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4],R15D MOVSXD RCX,dword ptr [RBX] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX],EDX MOV dword ptr [RAX + RCX*0x4],R14D LAB_0019b7fb: INC R12 CMP R12,0x17a JNZ 0x0019b667 XOR EAX,EAX JMP 0x0019b817 LAB_0019b80f: XOR EAX,EAX RET LAB_0019b812: MOV EAX,0xffffffff LAB_0019b817: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 unicode_case1(int *param_1,uint param_2) { uint uVar1; int iVar2; long lVar3; long lVar4; uint *puVar5; uint uVar6; uint uVar7; int iVar8; uint uVar9; bool bVar10; bool bVar11; uint local_34; if (param_2 == 0) { return 0; } lVar3 = 0; puVar5 = &DAT_001ac71c; uVar6 = 0; do { if ((param_2 >> ((uint)lVar3 & 0x1f) & 1) != 0) { uVar6 = uVar6 | *puVar5; } lVar3 = lVar3 + 1; puVar5 = puVar5 + 1; } while (lVar3 != 3); bVar10 = (param_2 & 1) == 0; local_34 = param_2 & 1; bVar11 = (param_2 & 6) == 0; lVar3 = 0; do { uVar7 = (&case_conv_table1)[lVar3]; uVar1 = uVar7 >> 4 & 0xf; if ((uVar6 >> uVar1 & 1) != 0) { uVar9 = uVar7 >> 0xf; uVar7 = uVar7 >> 8 & 0x7f; if (uVar1 == 5) { if (!bVar11 && !bVar10) goto LAB_0019b7b2; if (local_34 == 0) { iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); if (iVar2 != 0) { return 0xffffffff; } iVar2 = *param_1; } lVar4 = *(long *)(param_1 + 2); *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9; iVar2 = *param_1; *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + 1; } iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); if (iVar2 != 0) { return 0xffffffff; } iVar2 = *param_1; } uVar7 = uVar9 + 2; lVar4 = *(long *)(param_1 + 2); *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + 1; iVar2 = *param_1; *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar7; if (local_34 == 0) goto LAB_0019b7fb; iVar8 = uVar9 + 3; iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); uVar9 = uVar7; goto LAB_0019b7cd; } } else { if ((uVar1 == 4) && (bVar11 || bVar10)) { if (uVar7 != 0) { uVar1 = 0; do { iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); if (iVar2 != 0) { return 0xffffffff; } iVar2 = *param_1; } lVar4 = *(long *)(param_1 + 2); *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + local_34 + uVar1; iVar2 = *param_1; *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar9 + local_34 + uVar1 + 1; uVar1 = uVar1 + 2; } while (uVar1 < uVar7); } goto LAB_0019b7fb; } LAB_0019b7b2: iVar8 = uVar7 + uVar9; iVar2 = *param_1; if (param_1[1] < iVar2 + 2) { iVar2 = cr_realloc(param_1); LAB_0019b7cd: if (iVar2 != 0) { return 0xffffffff; } iVar2 = *param_1; } lVar4 = *(long *)(param_1 + 2); uVar7 = uVar9; } *param_1 = iVar2 + 1; *(uint *)(lVar4 + (long)iVar2 * 4) = uVar7; iVar2 = *param_1; *param_1 = iVar2 + 1; *(int *)(lVar4 + (long)iVar2 * 4) = iVar8; } LAB_0019b7fb: lVar3 = lVar3 + 1; if (lVar3 == 0x17a) { return 0; } } while( true ); }
49,505
blst_fp12_in_group
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/pairing.c
int blst_fp12_in_group(const vec384fp12 f) { vec384fp12 a, b; if (vec_is_zero(f, sizeof(vec384fp12)) || !is_cyclotomic(f)) return 0; frobenius_map_fp12(a, f, 1); raise_to_z(b, f); return (int)vec_is_equal(a, b, sizeof(a)); }
O1
c
blst_fp12_in_group: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x480, %rsp # imm = 0x480 movq %rdi, %rbx movl $0x240, %esi # imm = 0x240 callq 0x30680 xorl %r14d, %r14d testq %rax, %rax jne 0x20fc7 leaq -0x4a0(%rbp), %r15 movl $0x2, %edx movq %r15, %rdi movq %rbx, %rsi callq 0x201f2 leaq -0x260(%rbp), %r12 movl $0x2, %edx movq %r12, %rdi movq %r15, %rsi callq 0x201f2 movq %r12, %rdi movq %r12, %rsi movq %rbx, %rdx callq 0x1f662 movl $0x240, %edx # imm = 0x240 movq %r15, %rdi movq %r12, %rsi callq 0x306c0 testq %rax, %rax je 0x20fc7 leaq -0x4a0(%rbp), %r14 movl $0x1, %edx movq %r14, %rdi movq %rbx, %rsi callq 0x201f2 leaq -0x260(%rbp), %r15 movq %r15, %rdi movq %rbx, %rsi callq 0x20fda movq %r15, %rdi movq %r15, %rsi callq 0x1f433 movl $0x240, %edx # imm = 0x240 movq %r14, %rdi movq %r15, %rsi callq 0x306c0 movq %rax, %r14 movl %r14d, %eax addq $0x480, %rsp # imm = 0x480 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
blst_fp12_in_group: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 480h mov rbx, rdi mov esi, 240h call vec_is_zero_16x xor r14d, r14d test rax, rax jnz loc_20FC7 lea r15, [rbp+var_4A0] mov edx, 2 mov rdi, r15 mov rsi, rbx call frobenius_map_fp12 lea r12, [rbp+var_260] mov edx, 2 mov rdi, r12 mov rsi, r15 call frobenius_map_fp12 mov rdi, r12 mov rsi, r12 mov rdx, rbx call mul_fp12 mov edx, 240h mov rdi, r15 mov rsi, r12 call vec_is_equal_16x test rax, rax jz short loc_20FC7 lea r14, [rbp+var_4A0] mov edx, 1 mov rdi, r14 mov rsi, rbx call frobenius_map_fp12 lea r15, [rbp+var_260] mov rdi, r15 mov rsi, rbx call raise_to_z_div_by_2 mov rdi, r15 mov rsi, r15 call cyclotomic_sqr_fp12 mov edx, 240h mov rdi, r14 mov rsi, r15 call vec_is_equal_16x mov r14, rax loc_20FC7: mov eax, r14d add rsp, 480h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long blst_fp12_in_group(long long a1) { unsigned int v1; // r14d _BYTE v3[576]; // [rsp+0h] [rbp-4A0h] BYREF _BYTE v4[608]; // [rsp+240h] [rbp-260h] BYREF v1 = 0; if ( !vec_is_zero_16x(a1, 576LL) ) { frobenius_map_fp12((long long)v3, a1, 2LL); frobenius_map_fp12((long long)v4, (long long)v3, 2LL); mul_fp12((long long)v4, (long long)v4, a1); if ( vec_is_equal_16x(v3, v4, 576LL) ) { frobenius_map_fp12((long long)v3, a1, 1LL); raise_to_z_div_by_2(v4, a1); cyclotomic_sqr_fp12((long long)v4, (long long)v4); return (unsigned int)vec_is_equal_16x(v3, v4, 576LL); } } return v1; }
blst_fp12_in_group: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x480 MOV RBX,RDI MOV ESI,0x240 CALL 0x00130680 XOR R14D,R14D TEST RAX,RAX JNZ 0x00120fc7 LEA R15,[RBP + -0x4a0] MOV EDX,0x2 MOV RDI,R15 MOV RSI,RBX CALL 0x001201f2 LEA R12,[RBP + -0x260] MOV EDX,0x2 MOV RDI,R12 MOV RSI,R15 CALL 0x001201f2 MOV RDI,R12 MOV RSI,R12 MOV RDX,RBX CALL 0x0011f662 MOV EDX,0x240 MOV RDI,R15 MOV RSI,R12 CALL 0x001306c0 TEST RAX,RAX JZ 0x00120fc7 LEA R14,[RBP + -0x4a0] MOV EDX,0x1 MOV RDI,R14 MOV RSI,RBX CALL 0x001201f2 LEA R15,[RBP + -0x260] MOV RDI,R15 MOV RSI,RBX CALL 0x00120fda MOV RDI,R15 MOV RSI,R15 CALL 0x0011f433 MOV EDX,0x240 MOV RDI,R14 MOV RSI,R15 CALL 0x001306c0 MOV R14,RAX LAB_00120fc7: MOV EAX,R14D ADD RSP,0x480 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 blst_fp12_in_group(int8 param_1) { int4 uVar1; long lVar2; int1 local_4a8 [576]; int1 local_268 [576]; lVar2 = vec_is_zero_16x(param_1,0x240); uVar1 = 0; if (lVar2 == 0) { frobenius_map_fp12(local_4a8,param_1,2); frobenius_map_fp12(local_268,local_4a8,2); mul_fp12(local_268,local_268,param_1); lVar2 = vec_is_equal_16x(local_4a8,local_268,0x240); if (lVar2 != 0) { frobenius_map_fp12(local_4a8,param_1,1); raise_to_z_div_by_2(local_268,param_1); cyclotomic_sqr_fp12(local_268,local_268); uVar1 = vec_is_equal_16x(local_4a8,local_268,0x240); } } return uVar1; }
49,506
minja::Parser::parseLogicalAnd()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseLogicalAnd() { auto left = parseLogicalNot(); if (!left) throw std::runtime_error("Expected left side of 'logical and' expression"); static std::regex and_tok(R"(and\b)"); auto location = get_location(); while (!consumeToken(and_tok).empty()) { auto right = parseLogicalNot(); if (!right) throw std::runtime_error("Expected right side of 'and' expression"); left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::And); } return left; }
O2
cpp
minja::Parser::parseLogicalAnd(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x7e30a cmpq $0x0, (%rbx) je 0x7e1f7 leaq 0xa43ae(%rip), %rax # 0x1224b8 movb (%rax), %al testb %al, %al je 0x7e227 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x7c618 leaq 0x28(%rsp), %rbp leaq 0x48(%rsp), %r12 leaq 0xc(%rsp), %r13 movq %rbp, %rdi movq %r14, %rsi leaq 0xa435b(%rip), %rdx # 0x122498 pushq $0x1 popq %rcx callq 0x7ca3c movq 0x30(%rsp), %r15 movq %rbp, %rdi callq 0x27998 testq %r15, %r15 je 0x7e1a9 movq %rbp, %rdi movq %r14, %rsi callq 0x7e30a cmpq $0x0, 0x28(%rsp) je 0x7e1c5 movl $0xe, 0xc(%rsp) movq %r12, %rdi leaq 0x10(%rsp), %rsi movq %rbx, %rdx movq %rbp, %rcx movq %r13, %r8 callq 0x7e2e2 movq %rbx, %rdi movq %r12, %rsi callq 0x8d2ec leaq 0x50(%rsp), %rdi callq 0x4dd26 leaq 0x30(%rsp), %rdi callq 0x4dd26 jmp 0x7e130 leaq 0x18(%rsp), %rdi callq 0x4dd26 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x265e0 movq %rax, %r15 leaq 0x52e6f(%rip), %rsi # 0xd1046 movq %rax, %rdi callq 0x26420 movq 0xa2e0a(%rip), %rsi # 0x120ff0 movq 0xa2d6b(%rip), %rdx # 0x120f58 movq %r15, %rdi callq 0x275b0 jmp 0x7e227 pushq $0x10 popq %rdi callq 0x265e0 movq %rax, %r15 leaq 0x52e08(%rip), %rsi # 0xd1011 movq %rax, %rdi callq 0x26420 movq 0xa2dd8(%rip), %rsi # 0x120ff0 movq 0xa2d39(%rip), %rdx # 0x120f58 movq %r15, %rdi callq 0x275b0 leaq 0xa428a(%rip), %rdi # 0x1224b8 callq 0x27700 testl %eax, %eax je 0x7e114 leaq 0xa4256(%rip), %rdi # 0x122498 leaq 0x52df7(%rip), %rsi # 0xd1040 pushq $0x10 popq %rdx callq 0x6d972 leaq -0x3b97a(%rip), %rdi # 0x428de leaq 0xa4239(%rip), %rsi # 0x122498 leaq 0xa3a72(%rip), %rdx # 0x121cd8 callq 0x26aa0 leaq 0xa4246(%rip), %rdi # 0x1224b8 callq 0x26800 jmp 0x7e114 movq %rax, %r14 leaq 0xa4232(%rip), %rdi # 0x1224b8 callq 0x267e0 jmp 0x7e2ce jmp 0x7e29c movq %rax, %r14 movq %r15, %rdi callq 0x268f0 jmp 0x7e2ce movq %rax, %r14 jmp 0x7e2ce jmp 0x7e2b2 movq %rax, %r14 movq %r15, %rdi callq 0x268f0 jmp 0x7e2b5 jmp 0x7e2c1 movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x4dd26 jmp 0x7e2c4 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x4dd26 addq $0x8, %rbx movq %rbx, %rdi callq 0x4dd26 movq %r14, %rdi callq 0x27660
_ZN5minja6Parser15parseLogicalAndEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp qword ptr [rbx], 0 jz loc_7E1F7 lea rax, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok mov al, [rax] test al, al jz loc_7E227 loc_7E114: lea rdi, [rsp+88h+var_78]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) lea rbp, [rsp+88h+var_60] lea r12, [rsp+88h+var_40] lea r13, [rsp+88h+var_7C] loc_7E130: mov rdi, rbp mov rsi, r14 lea rdx, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok push 1 pop rcx call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov r15, [rsp+88h+var_58] mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r15, r15 jz short loc_7E1A9 mov rdi, rbp; this mov rsi, r14 call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp [rsp+88h+var_60], 0 jz short loc_7E1C5 mov [rsp+88h+var_7C], 0Eh mov rdi, r12 lea rsi, [rsp+88h+var_78] mov rdx, rbx mov rcx, rbp mov r8, r13 call _ZSt11make_sharedIN5minja12BinaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_NS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&) mov rdi, rbx mov rsi, r12 call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE lea rdi, [rsp+88h+var_38] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_7E130 loc_7E1A9: lea rdi, [rsp+88h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7E1C5: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_0; "Expected right side of 'and' expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_7E227 loc_7E1F7: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_0; "Expected left side of 'logical and' exp"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_7E227: lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_7E114 lea rdi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; minja::Parser::parseLogicalAnd(void)::and_tok lea rsi, aAndB; "and\\b" push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_7E114 mov r14, rax lea rdi, _ZGVZN5minja6Parser15parseLogicalAndEvE7and_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_7E2CE jmp short loc_7E29C mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_7E2CE loc_7E29C: mov r14, rax jmp short loc_7E2CE jmp short loc_7E2B2 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_7E2B5 jmp short loc_7E2C1 loc_7E2B2: mov r14, rax loc_7E2B5: lea rdi, [rsp+arg_28] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_7E2C4 loc_7E2C1: mov r14, rax loc_7E2C4: lea rdi, [rsp+arg_10] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_7E2CE: add rbx, 8 mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseLogicalAnd(minja::Parser *this, _QWORD *a2) { long long v2; // r15 std::runtime_error *v4; // r15 std::runtime_error *exception; // r15 int v6; // [rsp+Ch] [rbp-7Ch] BYREF _BYTE v7[8]; // [rsp+10h] [rbp-78h] BYREF long long v8; // [rsp+18h] [rbp-70h] BYREF long long v9; // [rsp+28h] [rbp-60h] BYREF _QWORD v10[3]; // [rsp+30h] [rbp-58h] BYREF _BYTE v11[8]; // [rsp+48h] [rbp-40h] BYREF _QWORD v12[7]; // [rsp+50h] [rbp-38h] BYREF minja::Parser::parseLogicalNot(this); if ( !*(_QWORD *)this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'logical and' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], (long long)"and\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11]); } minja::Parser::get_location((minja::Parser *)v7, a2); while ( 1 ) { minja::Parser::consumeToken( &v9, (long long)a2, (long long)&minja::Parser::parseLogicalAnd(void)::and_tok[abi:cxx11], 1u); v2 = v10[0]; std::string::~string(&v9); if ( !v2 ) break; minja::Parser::parseLogicalNot((minja::Parser *)&v9); if ( !v9 ) { v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v4, "Expected right side of 'and' expression"); __cxa_throw( v4, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 = 14; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>( v11, v7, this, &v9, &v6); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v11); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v10); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v8); return this; }
parseLogicalAnd: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RSI MOV RBX,RDI CALL 0x0017e30a CMP qword ptr [RBX],0x0 JZ 0x0017e1f7 LEA RAX,[0x2224b8] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0017e227 LAB_0017e114: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x0017c618 LEA RBP,[RSP + 0x28] LEA R12,[RSP + 0x48] LEA R13,[RSP + 0xc] LAB_0017e130: MOV RDI,RBP MOV RSI,R14 LEA RDX,[0x222498] PUSH 0x1 POP RCX CALL 0x0017ca3c MOV R15,qword ptr [RSP + 0x30] MOV RDI,RBP CALL 0x00127998 TEST R15,R15 JZ 0x0017e1a9 LAB_0017e157: MOV RDI,RBP MOV RSI,R14 CALL 0x0017e30a CMP qword ptr [RSP + 0x28],0x0 JZ 0x0017e1c5 MOV dword ptr [RSP + 0xc],0xe LAB_0017e172: MOV RDI,R12 LEA RSI,[RSP + 0x10] MOV RDX,RBX MOV RCX,RBP MOV R8,R13 CALL 0x0017e2e2 LAB_0017e188: MOV RDI,RBX MOV RSI,R12 CALL 0x0018d2ec LEA RDI,[RSP + 0x50] CALL 0x0014dd26 LEA RDI,[RSP + 0x30] CALL 0x0014dd26 JMP 0x0017e130 LAB_0017e1a9: LEA RDI,[RSP + 0x18] CALL 0x0014dd26 MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017e1c5: PUSH 0x10 POP RDI CALL 0x001265e0 MOV R15,RAX LAB_0017e1d0: LEA RSI,[0x1d1046] MOV RDI,RAX CALL 0x00126420 LAB_0017e1df: MOV RSI,qword ptr [0x00220ff0] MOV RDX,qword ptr [0x00220f58] MOV RDI,R15 CALL 0x001275b0 LAB_0017e1f7: PUSH 0x10 POP RDI CALL 0x001265e0 MOV R15,RAX LAB_0017e202: LEA RSI,[0x1d1011] MOV RDI,RAX CALL 0x00126420 LAB_0017e211: MOV RSI,qword ptr [0x00220ff0] MOV RDX,qword ptr [0x00220f58] MOV RDI,R15 CALL 0x001275b0 LAB_0017e227: LEA RDI,[0x2224b8] CALL 0x00127700 TEST EAX,EAX JZ 0x0017e114 LAB_0017e23b: LEA RDI,[0x222498] LEA RSI,[0x1d1040] PUSH 0x10 POP RDX CALL 0x0016d972 LAB_0017e251: LEA RDI,[0x1428de] LEA RSI,[0x222498] LEA RDX,[0x221cd8] CALL 0x00126aa0 LEA RDI,[0x2224b8] CALL 0x00126800 JMP 0x0017e114
/* minja::Parser::parseLogicalAnd() */ void minja::Parser::parseLogicalAnd(void) { long lVar1; int iVar2; runtime_error *prVar3; __shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI; shared_ptr local_78 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_70 [16]; long local_60; long local_58 [3]; Location local_40 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_38 [8]; parseLogicalNot(); if (*(long *)in_RDI == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017e202 to 0017e210 has its CatchHandler @ 0017e28f */ std::runtime_error::runtime_error(prVar3,"Expected left side of \'logical and\' expression"); /* try { // try from 0017e211 to 0017e226 has its CatchHandler @ 0017e28d */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00220ff0,PTR__runtime_error_00220f58); } if (parseLogicalAnd()::and_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseLogicalAnd()::and_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 0017e23b to 0017e250 has its CatchHandler @ 0017e27c */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseLogicalAnd()::and_tok_abi_cxx11_,"and\\b",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseLogicalAnd()::and_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseLogicalAnd()::and_tok_abi_cxx11_); } } /* try { // try from 0017e114 to 0017e120 has its CatchHandler @ 0017e29c */ get_location(); while( true ) { /* try { // try from 0017e130 to 0017e144 has its CatchHandler @ 0017e2c1 */ consumeToken((string *)&local_60); lVar1 = local_58[0]; std::__cxx11::string::~string((string *)&local_60); if (lVar1 == 0) { std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_70); return; } /* try { // try from 0017e157 to 0017e161 has its CatchHandler @ 0017e2b0 */ parseLogicalNot(); if (local_60 == 0) break; /* try { // try from 0017e172 to 0017e187 has its CatchHandler @ 0017e2b2 */ std:: make_shared<minja::BinaryOpExpr,minja::Location&,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op> (local_40,local_78,in_RDI,(Op *)&local_60); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator= (in_RDI,(__shared_ptr *)local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_38); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_58); } prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017e1d0 to 0017e1de has its CatchHandler @ 0017e2a3 */ std::runtime_error::runtime_error(prVar3,"Expected right side of \'and\' expression"); /* try { // try from 0017e1df to 0017e1f4 has its CatchHandler @ 0017e2a1 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00220ff0,PTR__runtime_error_00220f58); }
49,507
mi_calc_blob_length
eloqsql/storage/myisam/mi_dynrec.c
ulong _mi_calc_blob_length(uint length, const uchar *pos) { switch (length) { case 1: return (uint) (uchar) *pos; case 2: return (uint) uint2korr(pos); case 3: return uint3korr(pos); case 4: return uint4korr(pos); default: break; } return 0; /* Impossible */ }
O0
c
mi_calc_blob_length: pushq %rbp movq %rsp, %rbp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movl -0xc(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x20(%rbp) subl $0x3, %eax ja 0x367d2 movq -0x20(%rbp), %rax leaq 0xab7f6(%rip), %rcx # 0xe1f6c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0x367dc movq -0x18(%rbp), %rax movzwl (%rax), %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0x367dc movq -0x18(%rbp), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0x367dc movq -0x18(%rbp), %rax movl (%rax), %eax movq %rax, -0x8(%rbp) jmp 0x367dc jmp 0x367d4 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
_mi_calc_blob_length: push rbp mov rbp, rsp mov [rbp+var_C], edi mov [rbp+var_18], rsi mov eax, [rbp+var_C] dec eax; switch 4 cases mov ecx, eax mov [rbp+var_20], rcx sub eax, 3 ja short def_3677D; jumptable 000000000003677D default case mov rax, [rbp+var_20] lea rcx, jpt_3677D movsxd rax, ds:(jpt_3677D - 0E1F6Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_3677F: mov rax, [rbp+var_18]; jumptable 000000000003677D case 1 movzx eax, byte ptr [rax] mov eax, eax mov [rbp+var_8], rax jmp short loc_367DC loc_3678E: mov rax, [rbp+var_18]; jumptable 000000000003677D case 2 movzx eax, word ptr [rax] mov eax, eax mov [rbp+var_8], rax jmp short loc_367DC loc_3679D: mov rax, [rbp+var_18]; jumptable 000000000003677D case 3 movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax mov [rbp+var_8], rax jmp short loc_367DC loc_367C6: mov rax, [rbp+var_18]; jumptable 000000000003677D case 4 mov eax, [rax] mov [rbp+var_8], rax jmp short loc_367DC def_3677D: jmp short $+2; jumptable 000000000003677D default case loc_367D4: mov [rbp+var_8], 0 loc_367DC: mov rax, [rbp+var_8] pop rbp retn
long long mi_calc_blob_length(int a1, unsigned __int8 *a2) { long long v3; // [rsp+18h] [rbp-8h] switch ( a1 ) { case 1: v3 = *a2; break; case 2: v3 = *(unsigned __int16 *)a2; break; case 3: v3 = (a2[2] << 16) | (unsigned int)*(unsigned __int16 *)a2; break; case 4: v3 = *(unsigned int *)a2; break; default: v3 = 0LL; break; } return v3; }
_mi_calc_blob_length: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV EAX,dword ptr [RBP + -0xc] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x20],RCX SUB EAX,0x3 JA 0x001367d2 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x1e1f6c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001367dc caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001367dc caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001367dc caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x001367dc default: JMP 0x001367d4 LAB_001367d4: MOV qword ptr [RBP + -0x8],0x0 LAB_001367dc: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
uint _mi_calc_blob_length(int4 param_1,uint *param_2) { uint uVar1; switch(param_1) { case 1: uVar1 = (uint)(byte)*param_2; break; case 2: uVar1 = (uint)(ushort)*param_2; break; case 3: uVar1 = (uint)(uint3)*param_2; break; case 4: uVar1 = *param_2; break; default: uVar1 = 0; } return uVar1; }
49,508
LefDefParser::defiNonDefault::layerWireExtVal(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp
int defiNonDefault::layerWireExtVal(int index) const { char msg[160]; if (index < 0 || index >= numLayers_) { sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.", index, numLayers_); defiError(0, 6090, msg, defData); return 0; } return (int)wireExt_[index]; }
O0
cpp
LefDefParser::defiNonDefault::layerWireExtVal(int) const: subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movl %esi, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xb4(%rsp) jl 0x452ce movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0xc(%rcx), %eax jl 0x4531a movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0xc(%rax), %ecx leaq 0x2d281(%rip), %rsi # 0x7256a movb $0x0, %al callq 0x7060 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdx movq 0xb8(%rax), %rcx xorl %edi, %edi movl $0x17ca, %esi # imm = 0x17CA callq 0x277e0 movl $0x0, 0xc4(%rsp) jmp 0x45337 movq 0x8(%rsp), %rax movq 0x50(%rax), %rax movslq 0xb4(%rsp), %rcx cvttsd2si (%rax,%rcx,8), %eax movl %eax, 0xc4(%rsp) movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nopw %cs:(%rax,%rax)
_ZNK12LefDefParser14defiNonDefault15layerWireExtValEi: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_14], esi mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_C0], rax cmp [rsp+0C8h+var_14], 0 jl short loc_452CE mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+0Ch] jl short loc_4531A loc_452CE: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+0Ch] lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "... mov al, 0 call _sprintf mov rax, [rsp+0C8h+var_C0] lea rdx, [rsp+0C8h+var_B8]; int mov rcx, [rax+0B8h]; char * xor edi, edi; this mov esi, 17CAh; int call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) mov [rsp+0C8h+var_4], 0 jmp short loc_45337 loc_4531A: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+50h] movsxd rcx, [rsp+0C8h+var_14] cvttsd2si eax, qword ptr [rax+rcx*8] mov [rsp+0C8h+var_4], eax loc_45337: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
long long LefDefParser::defiNonDefault::layerWireExtVal(LefDefParser::defrData **this, int a2) { LefDefParser::defrData *v2; // r8 char v4[164]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::defiNonDefault *v6; // [rsp+B8h] [rbp-10h] v6 = (LefDefParser::defiNonDefault *)this; v5 = a2; if ( a2 >= 0 && v5 < *((_DWORD *)this + 3) ) { return (unsigned int)(int)*((double *)this[10] + v5); } else { sprintf( v4, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n" "Valid index is from 0 to %d. Specify a valid index number and then try again.", v5, *((_DWORD *)this + 3)); LefDefParser::defiError(0LL, 6090, v4, this[23], v2); return 0; } }
layerWireExtVal: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb8],RDI MOV dword ptr [RSP + 0xb4],ESI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xb4],0x0 JL 0x001452ce MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0xc] JL 0x0014531a LAB_001452ce: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0xc] LEA RSI,[0x17256a] MOV AL,0x0 CALL 0x00107060 MOV RAX,qword ptr [RSP + 0x8] LEA RDX,[RSP + 0x10] MOV RCX,qword ptr [RAX + 0xb8] XOR EDI,EDI MOV ESI,0x17ca CALL 0x001277e0 MOV dword ptr [RSP + 0xc4],0x0 JMP 0x00145337 LAB_0014531a: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x50] MOVSXD RCX,dword ptr [RSP + 0xb4] CVTTSD2SI EAX,qword ptr [RAX + RCX*0x8] MOV dword ptr [RSP + 0xc4],EAX LAB_00145337: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
/* LefDefParser::defiNonDefault::layerWireExtVal(int) const */ int __thiscall LefDefParser::defiNonDefault::layerWireExtVal(defiNonDefault *this,int param_1) { char local_b8 [164]; int local_14; defiNonDefault *local_10; int local_4; if ((param_1 < 0) || (*(int *)(this + 0xc) <= param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again." ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0xc)); defiError(0,0x17ca,local_b8,*(defrData **)(this + 0xb8)); local_4 = 0; } else { local_4 = (int)*(double *)(*(long *)(this + 0x50) + (long)param_1 * 8); } return local_4; }
49,509
LefDefParser::defiNonDefault::layerWireExtVal(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp
int defiNonDefault::layerWireExtVal(int index) const { char msg[160]; if (index < 0 || index >= numLayers_) { sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.", index, numLayers_); defiError(0, 6090, msg, defData); return 0; } return (int)wireExt_[index]; }
O3
cpp
LefDefParser::defiNonDefault::layerWireExtVal(int) const: pushq %rbp pushq %r14 pushq %rbx subq $0xa0, %rsp movl %esi, %edx movq %rdi, %rbx testl %esi, %esi setns %al movl 0xc(%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0x29194 movq 0x50(%rbx), %rax movl %edx, %ecx cvttsd2si (%rax,%rcx,8), %ebp jmp 0x291c0 leaq 0x1a450(%rip), %rsi # 0x435eb xorl %ebp, %ebp movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x6060 movq 0xb8(%rbx), %rcx xorl %edi, %edi movl $0x17ca, %esi # imm = 0x17CA movq %r14, %rdx callq 0x18f80 movl %ebp, %eax addq $0xa0, %rsp popq %rbx popq %r14 popq %rbp retq
_ZNK12LefDefParser14defiNonDefault15layerWireExtValEi: push rbp push r14 push rbx sub rsp, 0A0h mov edx, esi mov rbx, rdi test esi, esi setns al mov ecx, [rdi+0Ch] cmp ecx, esi setnle sil test al, sil jz short loc_29194 mov rax, [rbx+50h] mov ecx, edx cvttsd2si ebp, qword ptr [rax+rcx*8] jmp short loc_291C0 loc_29194: lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "... xor ebp, ebp mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf mov rcx, [rbx+0B8h]; LefDefParser::defrData * xor edi, edi; this mov esi, 17CAh; int mov rdx, r14; char * call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) loc_291C0: mov eax, ebp add rsp, 0A0h pop rbx pop r14 pop rbp retn
long long LefDefParser::defiNonDefault::layerWireExtVal(LefDefParser::defiNonDefault *this, signed int a2) { int v2; // ecx unsigned int v3; // ebp LefDefParser::defrData *v4; // r8 char v6[184]; // [rsp+0h] [rbp-B8h] BYREF v2 = *((_DWORD *)this + 3); if ( v2 > a2 && a2 >= 0 ) { return (unsigned int)(int)*(double *)(*((_QWORD *)this + 10) + 8LL * (unsigned int)a2); } else { v3 = 0; sprintf( v6, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n" "Valid index is from 0 to %d. Specify a valid index number and then try again.", a2, v2); LefDefParser::defiError(0LL, 6090, v6, *((LefDefParser::defrData **)this + 23), v4); } return v3; }
layerWireExtVal: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0xa0 MOV EDX,ESI MOV RBX,RDI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI + 0xc] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x00129194 MOV RAX,qword ptr [RBX + 0x50] MOV ECX,EDX CVTTSD2SI EBP,qword ptr [RAX + RCX*0x8] JMP 0x001291c0 LAB_00129194: LEA RSI,[0x1435eb] XOR EBP,EBP MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00106060 MOV RCX,qword ptr [RBX + 0xb8] XOR EDI,EDI MOV ESI,0x17ca MOV RDX,R14 CALL 0x00118f80 LAB_001291c0: MOV EAX,EBP ADD RSP,0xa0 POP RBX POP R14 POP RBP RET
/* LefDefParser::defiNonDefault::layerWireExtVal(int) const */ int __thiscall LefDefParser::defiNonDefault::layerWireExtVal(defiNonDefault *this,int param_1) { int iVar1; char acStack_b8 [160]; if (param_1 < 0 || *(int *)(this + 0xc) <= param_1) { iVar1 = 0; sprintf(acStack_b8, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again." ); defiError(0,0x17ca,acStack_b8,*(defrData **)(this + 0xb8)); } else { iVar1 = (int)*(double *)(*(long *)(this + 0x50) + (ulong)(uint)param_1 * 8); } return iVar1; }
49,510
my_8bit_collation_flags_from_data
eloqsql/strings/ctype-simple.c
uint my_8bit_collation_flags_from_data(CHARSET_INFO *cs) { uint flags= 0; if (cs->sort_order && cs->sort_order['A'] < cs->sort_order['a'] && cs->sort_order['a'] < cs->sort_order['B']) flags|= MY_CS_CSSORT; return flags; }
O0
c
my_8bit_collation_flags_from_data: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x58(%rax) je 0x43b6d movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movzbl 0x41(%rax), %eax movq -0x8(%rbp), %rcx movq 0x58(%rcx), %rcx movzbl 0x61(%rcx), %ecx cmpl %ecx, %eax jge 0x43b6d movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movzbl 0x61(%rax), %eax movq -0x8(%rbp), %rcx movq 0x58(%rcx), %rcx movzbl 0x42(%rcx), %ecx cmpl %ecx, %eax jge 0x43b6d movl -0xc(%rbp), %eax orl $0x400, %eax # imm = 0x400 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_8bit_collation_flags_from_data: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+58h], 0 jz short loc_43B6D mov rax, [rbp+var_8] mov rax, [rax+58h] movzx eax, byte ptr [rax+41h] mov rcx, [rbp+var_8] mov rcx, [rcx+58h] movzx ecx, byte ptr [rcx+61h] cmp eax, ecx jge short loc_43B6D mov rax, [rbp+var_8] mov rax, [rax+58h] movzx eax, byte ptr [rax+61h] mov rcx, [rbp+var_8] mov rcx, [rcx+58h] movzx ecx, byte ptr [rcx+42h] cmp eax, ecx jge short loc_43B6D mov eax, [rbp+var_C] or eax, 400h mov [rbp+var_C], eax loc_43B6D: mov eax, [rbp+var_C] pop rbp retn
long long my_8bit_collation_flags_from_data(long long a1) { unsigned int v2; // [rsp+0h] [rbp-Ch] v2 = 0; if ( *(_QWORD *)(a1 + 88) && *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 65LL) < (int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 97LL) && *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 97LL) < (int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 66LL) ) { return 1024; } return v2; }
my_8bit_collation_flags_from_data: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x58],0x0 JZ 0x00143b6d MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOVZX EAX,byte ptr [RAX + 0x41] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x58] MOVZX ECX,byte ptr [RCX + 0x61] CMP EAX,ECX JGE 0x00143b6d MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOVZX EAX,byte ptr [RAX + 0x61] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x58] MOVZX ECX,byte ptr [RCX + 0x42] CMP EAX,ECX JGE 0x00143b6d MOV EAX,dword ptr [RBP + -0xc] OR EAX,0x400 MOV dword ptr [RBP + -0xc],EAX LAB_00143b6d: MOV EAX,dword ptr [RBP + -0xc] POP RBP RET
int4 my_8bit_collation_flags_from_data(long param_1) { int4 local_14; local_14 = 0; if (((*(long *)(param_1 + 0x58) != 0) && (*(byte *)(*(long *)(param_1 + 0x58) + 0x41) < *(byte *)(*(long *)(param_1 + 0x58) + 0x61))) && (*(byte *)(*(long *)(param_1 + 0x58) + 0x61) < *(byte *)(*(long *)(param_1 + 0x58) + 0x42))) { local_14 = 0x400; } return local_14; }
49,511
Workspaces::Workspaces()
mihussein[P]Hlemon/src/workspaces.cpp
Workspaces::Workspaces() { exec(); }
O1
cpp
Workspaces::Workspaces(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) leaq 0x4844(%rip), %rdx # 0xc40a movq %rdx, %rsi callq 0x5fca movq %rbx, %rdi callq 0x7bfa popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x7bf2 movq (%r15), %rsi incq %rsi callq 0x4380 movq %r14, %rdi callq 0x4660
_ZN10WorkspacesC2Ev: push r15; Alternative name is 'Workspaces::Workspaces(void)' push r14 push rbx mov rbx, rdi lea r15, [rdi+10h] mov [rdi], r15 lea rdx, aErrorInitializ+1Ch; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rbx; this call _ZN10Workspaces4execEv; Workspaces::exec(void) pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_7BF2 mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7BF2: mov rdi, r14 call __Unwind_Resume
void Workspaces::Workspaces(Workspaces *this) { *(_QWORD *)this = (char *)this + 16; std::string::_M_construct<char const*>(this, "", (long long)""); Workspaces::exec(this); }
Workspaces: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 LEA RDX,[0x10c40a] MOV RSI,RDX CALL 0x00105fca LAB_00107bce: MOV RDI,RBX CALL 0x00107bfa LAB_00107bd6: POP RBX POP R14 POP R15 RET
/* Workspaces::Workspaces() */ void __thiscall Workspaces::Workspaces(Workspaces *this) { *(Workspaces **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,""); /* try { // try from 00107bce to 00107bd5 has its CatchHandler @ 00107bdc */ exec(this); return; }
49,512
minja::Parser::parseMathUnaryPlusMinus()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseMathUnaryPlusMinus() { static std::regex unary_plus_minus_tok(R"(\+|-(?![}%#]\}))"); auto op_str = consumeToken(unary_plus_minus_tok); auto expr = parseExpansion(); if (!expr) throw std::runtime_error("Expected expr of 'unary plus/minus/expansion' expression"); if (!op_str.empty()) { auto op = op_str == "+" ? UnaryOpExpr::Op::Plus : UnaryOpExpr::Op::Minus; return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op); } return expr; }
O2
cpp
minja::Parser::parseMathUnaryPlusMinus(): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x9bcfc(%rip), %rax # 0x1051e0 movb (%rax), %al testb %al, %al je 0x695bf leaq 0x9bccb(%rip), %rdx # 0x1051c0 leaq 0x30(%rsp), %rdi pushq $0x1 popq %rcx movq %r14, %rsi callq 0x65288 movq %rsp, %rdi movq %r14, %rsi callq 0x69730 movq (%rsp), %rax testq %rax, %rax je 0x69614 cmpq $0x0, 0x38(%rsp) je 0x69589 leaq 0x50689(%rip), %rsi # 0xb9bb5 leaq 0x30(%rsp), %rdi callq 0x2cbe9 xorb $0x1, %al movzbl %al, %eax movl %eax, 0x14(%rsp) leaq 0x18(%rsp), %rdi movq %r14, %rsi callq 0x64e64 leaq 0x50(%rsp), %rdi leaq 0x18(%rsp), %rsi movq %rsp, %rdx leaq 0x14(%rsp), %rcx callq 0x698f8 leaq 0x58(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x37354 leaq 0x20(%rsp), %rdi callq 0x37354 jmp 0x695a0 movq %rax, (%rbx) movq 0x8(%rsp), %rax andq $0x0, 0x8(%rsp) movq %rax, 0x8(%rbx) andq $0x0, (%rsp) leaq 0x8(%rsp), %rdi callq 0x37354 leaq 0x30(%rsp), %rdi callq 0x25258 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r14 retq leaq 0x9bc1a(%rip), %rdi # 0x1051e0 callq 0x25060 testl %eax, %eax je 0x694ee leaq 0x9bbe6(%rip), %rdi # 0x1051c0 leaq 0x4fa3c(%rip), %rsi # 0xb901d pushq $0x10 popq %rdx callq 0x2b33e leaq -0x3e1fc(%rip), %rdi # 0x2b3f4 leaq 0x9bbc9(%rip), %rsi # 0x1051c0 leaq 0x9b33a(%rip), %rdx # 0x104938 callq 0x24800 leaq 0x9bbd6(%rip), %rdi # 0x1051e0 callq 0x245f0 jmp 0x694ee pushq $0x10 popq %rdi callq 0x24470 movq %rax, %r14 leaq 0x4fae1(%rip), %rsi # 0xb9107 movq %rax, %rdi callq 0x24330 movq 0x9a9bb(%rip), %rsi # 0x103ff0 movq 0x9a91c(%rip), %rdx # 0x103f58 movq %r14, %rdi callq 0x24f50 movq %rax, %rbx leaq 0x9bb92(%rip), %rdi # 0x1051e0 callq 0x245e0 jmp 0x6968f jmp 0x69673 movq %rax, %rbx movq %r14, %rdi callq 0x246b0 jmp 0x69676 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x37354 jmp 0x69676 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x37354 jmp 0x69685 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x25258 movq %rbx, %rdi callq 0x24fe0 nop
_ZN5minja6Parser23parseMathUnaryPlusMinusEv: push r14 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok mov al, [rax] test al, al jz loc_695BF loc_694EE: lea rdx, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok lea rdi, [rsp+78h+var_48] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, rsp; this mov rsi, r14 call _ZN5minja6Parser14parseExpansionEv; minja::Parser::parseExpansion(void) mov rax, [rsp+78h+var_78] test rax, rax jz loc_69614 cmp [rsp+78h+var_40], 0 jz short loc_69589 lea rsi, aSRN_0+0Bh; "+" lea rdi, [rsp+78h+var_48] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) xor al, 1 movzx eax, al mov [rsp+78h+var_64], eax lea rdi, [rsp+78h+var_60]; this mov rsi, r14 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) lea rdi, [rsp+78h+var_28] lea rsi, [rsp+78h+var_60] mov rdx, rsp lea rcx, [rsp+78h+var_64] call _ZSt11make_sharedIN5minja11UnaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEERNS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &) lea rdi, [rsp+78h+var_20] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+78h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_695A0 loc_69589: mov [rbx], rax mov rax, [rsp+78h+var_70] and [rsp+78h+var_70], 0 mov [rbx+8], rax and [rsp+78h+var_78], 0 loc_695A0: lea rdi, [rsp+78h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+78h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 68h pop rbx pop r14 retn loc_695BF: lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_694EE lea rdi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok lea rsi, asc_B901D; "\\+|-(?![}%#]\\})" push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_694EE loc_69614: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExprOf; "Expected expr of 'unary plus/minus/expa"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_6968F jmp short loc_69673 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_69676 mov rbx, rax lea rdi, [rsp+78h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_69676 loc_69673: mov rbx, rax loc_69676: lea rdi, [rsp+78h+var_70] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_69685 mov rbx, rax loc_69685: lea rdi, [rsp+78h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_6968F: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseMathUnaryPlusMinus(minja::Parser *this, _QWORD *a2) { __int128 v2; // xmm0 long long v3; // rax std::runtime_error *exception; // r14 long long v6; // [rsp+0h] [rbp-78h] BYREF long long v7; // [rsp+8h] [rbp-70h] BYREF BOOL v8; // [rsp+14h] [rbp-64h] BYREF _BYTE v9[8]; // [rsp+18h] [rbp-60h] BYREF long long v10; // [rsp+20h] [rbp-58h] BYREF _QWORD v11[4]; // [rsp+30h] [rbp-48h] BYREF _OWORD v12[2]; // [rsp+50h] [rbp-28h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], (long long)"\\+|-(?![}%#]\\})", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]); } minja::Parser::consumeToken( v11, (long long)a2, (long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11], 1u); minja::Parser::parseExpansion((minja::Parser *)&v6); if ( !v6 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expr of 'unary plus/minus/expansion' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v11[1] ) { v8 = !std::operator==<char>((long long)v11); minja::Parser::get_location((minja::Parser *)v9, a2); std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>( v12, v9, &v6, &v8); v2 = v12[0]; *((_QWORD *)&v12[0] + 1) = 0LL; *(_OWORD *)this = v2; *(_QWORD *)&v12[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v12 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10); } else { *(_QWORD *)this = v6; v3 = v7; v7 = 0LL; *((_QWORD *)this + 1) = v3; v6 = 0LL; } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7); std::string::~string(v11); return this; }
parseMathUnaryPlusMinus: PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x2051e0] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x001695bf LAB_001694ee: LEA RDX,[0x2051c0] LEA RDI,[RSP + 0x30] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x00165288 LAB_00169505: MOV RDI,RSP MOV RSI,R14 CALL 0x00169730 MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x00169614 CMP qword ptr [RSP + 0x38],0x0 JZ 0x00169589 LEA RSI,[0x1b9bb5] LEA RDI,[RSP + 0x30] CALL 0x0012cbe9 XOR AL,0x1 MOVZX EAX,AL MOV dword ptr [RSP + 0x14],EAX LAB_0016953f: LEA RDI,[RSP + 0x18] MOV RSI,R14 CALL 0x00164e64 LAB_0016954c: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x18] MOV RDX,RSP LEA RCX,[RSP + 0x14] CALL 0x001698f8 LEA RDI,[RSP + 0x58] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x00137354 LEA RDI,[RSP + 0x20] CALL 0x00137354 JMP 0x001695a0 LAB_00169589: MOV qword ptr [RBX],RAX MOV RAX,qword ptr [RSP + 0x8] AND qword ptr [RSP + 0x8],0x0 MOV qword ptr [RBX + 0x8],RAX AND qword ptr [RSP],0x0 LAB_001695a0: LEA RDI,[RSP + 0x8] CALL 0x00137354 LEA RDI,[RSP + 0x30] CALL 0x00125258 MOV RAX,RBX ADD RSP,0x68 POP RBX POP R14 RET LAB_001695bf: LEA RDI,[0x2051e0] CALL 0x00125060 TEST EAX,EAX JZ 0x001694ee LAB_001695d3: LEA RDI,[0x2051c0] LEA RSI,[0x1b901d] PUSH 0x10 POP RDX CALL 0x0012b33e LAB_001695e9: LEA RDI,[0x12b3f4] LEA RSI,[0x2051c0] LEA RDX,[0x204938] CALL 0x00124800 LEA RDI,[0x2051e0] CALL 0x001245f0 JMP 0x001694ee LAB_00169614: PUSH 0x10 POP RDI CALL 0x00124470 MOV R14,RAX LAB_0016961f: LEA RSI,[0x1b9107] MOV RDI,RAX CALL 0x00124330 LAB_0016962e: MOV RSI,qword ptr [0x00203ff0] MOV RDX,qword ptr [0x00203f58] MOV RDI,R14 CALL 0x00124f50
/* minja::Parser::parseMathUnaryPlusMinus() */ void minja::Parser::parseMathUnaryPlusMinus(void) { long lVar1; bool bVar2; int iVar3; runtime_error *this; long *in_RDI; long local_78; long local_70; uint local_64; shared_ptr local_60 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16]; string local_48 [8]; long local_40; long local_28; long alStack_20 [2]; if (parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 001695d3 to 001695e8 has its CatchHandler @ 00169644 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10 ); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_); } } consumeToken(local_48); /* try { // try from 00169505 to 0016950f has its CatchHandler @ 00169682 */ parseExpansion(); lVar1 = local_70; if (local_78 != 0) { if (local_40 == 0) { *in_RDI = local_78; local_70 = 0; in_RDI[1] = lVar1; local_78 = 0; } else { bVar2 = std::operator==(local_48,"+"); local_64 = (uint)!bVar2; /* try { // try from 0016953f to 0016954b has its CatchHandler @ 00169673 */ get_location(); /* try { // try from 0016954c to 00169562 has its CatchHandler @ 00169664 */ std:: make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op&> ((Location *)&local_28,local_60,(Op *)&local_78); lVar1 = alStack_20[0]; alStack_20[0] = 0; *in_RDI = local_28; in_RDI[1] = lVar1; local_28 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_20); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70); std::__cxx11::string::~string(local_48); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016961f to 0016962d has its CatchHandler @ 00169657 */ std::runtime_error::runtime_error (this,"Expected expr of \'unary plus/minus/expansion\' expression"); /* try { // try from 0016962e to 00169643 has its CatchHandler @ 00169655 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00203ff0,PTR__runtime_error_00203f58); }
49,513
init_available_charsets
eloqsql/mysys/charset.c
static void init_available_charsets(void) { char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; struct charset_info_st **cs; MY_CHARSET_LOADER loader; DBUG_ENTER("init_available_charsets"); bzero((char*) &all_charsets,sizeof(all_charsets)); bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics)); my_hash_init2(key_memory_charsets, &charset_name_hash, 16, &my_charset_latin1, 64, 0, 0, get_charset_key, 0, 0, HASH_UNIQUE); init_compiled_charsets(MYF(0)); /* Copy compiled charsets */ for (cs= (struct charset_info_st**) all_charsets; cs < (struct charset_info_st**) all_charsets + array_elements(all_charsets)-1 ; cs++) { if (*cs) { DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN); if (cs[0]->m_ctype) if (init_state_maps(*cs)) *cs= NULL; } } my_charset_loader_init_mysys(&loader); strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); my_read_charset_file(&loader, fname, MYF(0)); DBUG_VOID_RETURN; }
O0
c
init_available_charsets: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq 0x35cab1(%rip), %rdi # 0x386670 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x24190 leaq 0x360b0e(%rip), %rdi # 0x38a6e0 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x24190 leaq 0x35ca77(%rip), %rax # 0x38665c movl (%rax), %edi leaq 0x360a82(%rip), %rsi # 0x38a670 movl $0x10, %edx leaq 0x24ac46(%rip), %rcx # 0x274840 movl $0x40, %r8d xorl %eax, %eax movl %eax, %r9d leaq 0x1ab4(%rip), %rax # 0x2b6c0 movq $0x0, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movl $0x1, 0x20(%rsp) callq 0x2c0e0 xorl %eax, %eax movl %eax, %edi callq 0x311a0 leaq 0x35ca28(%rip), %rax # 0x386670 movq %rax, -0x2d8(%rbp) leaq 0x35ca1a(%rip), %rax # 0x386670 addq $0x4000, %rax # imm = 0x4000 addq $-0x8, %rax cmpq %rax, -0x2d8(%rbp) jae 0x29cc6 movq -0x2d8(%rbp), %rax cmpq $0x0, (%rax) je 0x29cb0 jmp 0x29c78 jmp 0x29c7a movq -0x2d8(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x40(%rax) je 0x29cae movq -0x2d8(%rbp), %rax movq (%rax), %rdi callq 0x2b220 cmpb $0x0, %al je 0x29cac movq -0x2d8(%rbp), %rax movq $0x0, (%rax) jmp 0x29cae jmp 0x29cb0 jmp 0x29cb2 movq -0x2d8(%rbp), %rax addq $0x8, %rax movq %rax, -0x2d8(%rbp) jmp 0x29c4f leaq -0x2d0(%rbp), %rdi callq 0x291c0 leaq -0x220(%rbp), %rdi callq 0x29860 movq %rax, %rdi leaq 0x4fbd8(%rip), %rsi # 0x798c0 callq 0x242f0 leaq -0x220(%rbp), %rsi leaq -0x2d0(%rbp), %rdi xorl %eax, %eax movl %eax, %edx callq 0x2b700 jmp 0x29d06 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x29d21 addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x24320 nopw %cs:(%rax,%rax)
init_available_charsets: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, all_charsets xor esi, esi mov edx, 4000h call _memset lea rdi, my_collation_statistics xor esi, esi mov edx, 4000h call _memset lea rax, key_memory_charsets mov edi, [rax] lea rsi, charset_name_hash mov edx, 10h lea rcx, my_charset_latin1 mov r8d, 40h ; '@' xor eax, eax mov r9d, eax lea rax, get_charset_key mov [rsp+300h+var_300], 0 mov [rsp+300h+var_2F8], rax mov [rsp+300h+var_2F0], 0 mov [rsp+300h+var_2E8], 0 mov [rsp+300h+var_2E0], 1 call my_hash_init2 xor eax, eax mov edi, eax call init_compiled_charsets lea rax, all_charsets mov [rbp+var_2D8], rax loc_29C4F: lea rax, all_charsets add rax, 4000h add rax, 0FFFFFFFFFFFFFFF8h cmp [rbp+var_2D8], rax jnb short loc_29CC6 mov rax, [rbp+var_2D8] cmp qword ptr [rax], 0 jz short loc_29CB0 jmp short $+2 loc_29C78: jmp short $+2 loc_29C7A: mov rax, [rbp+var_2D8] mov rax, [rax] cmp qword ptr [rax+40h], 0 jz short loc_29CAE mov rax, [rbp+var_2D8] mov rdi, [rax] call init_state_maps cmp al, 0 jz short loc_29CAC mov rax, [rbp+var_2D8] mov qword ptr [rax], 0 loc_29CAC: jmp short $+2 loc_29CAE: jmp short $+2 loc_29CB0: jmp short $+2 loc_29CB2: mov rax, [rbp+var_2D8] add rax, 8 mov [rbp+var_2D8], rax jmp short loc_29C4F loc_29CC6: lea rdi, [rbp+var_2D0] call my_charset_loader_init_mysys lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy lea rsi, [rbp+var_220] lea rdi, [rbp+var_2D0] xor eax, eax mov edx, eax call my_read_charset_file jmp short $+2 loc_29D06: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_29D21 add rsp, 300h pop rbp retn loc_29D21: call ___stack_chk_fail
unsigned long long init_available_charsets() { long long charsets_dir; // rax _QWORD *i; // [rsp+28h] [rbp-2D8h] _BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF _BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF unsigned long long v5; // [rsp+2F8h] [rbp-8h] v5 = __readfsqword(0x28u); memset(all_charsets, 0LL, sizeof(all_charsets)); memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics)); my_hash_init2( key_memory_charsets, (unsigned int)&charset_name_hash, 16, (unsigned int)&my_charset_latin1, 64, 0, 0LL, (long long)get_charset_key, 0LL, 0LL, 1); init_compiled_charsets(0LL); for ( i = all_charsets; i < &all_charsets[2047]; ++i ) { if ( *i && *(_QWORD *)(*i + 64LL) ) { if ( (unsigned __int8)init_state_maps(*i) ) *i = 0LL; } } my_charset_loader_init_mysys((long long)v3); charsets_dir = get_charsets_dir((long long)v4); stpcpy(charsets_dir, "Index.xml"); my_read_charset_file(v3, v4, 0LL); return __readfsqword(0x28u); }
init_available_charsets: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[0x486670] XOR ESI,ESI MOV EDX,0x4000 CALL 0x00124190 LEA RDI,[0x48a6e0] XOR ESI,ESI MOV EDX,0x4000 CALL 0x00124190 LEA RAX,[0x48665c] MOV EDI,dword ptr [RAX] LEA RSI,[0x48a670] MOV EDX,0x10 LEA RCX,[0x374840] MOV R8D,0x40 XOR EAX,EAX MOV R9D,EAX LEA RAX,[0x12b6c0] MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x20],0x1 CALL 0x0012c0e0 XOR EAX,EAX MOV EDI,EAX CALL 0x001311a0 LEA RAX,[0x486670] MOV qword ptr [RBP + -0x2d8],RAX LAB_00129c4f: LEA RAX,[0x486670] ADD RAX,0x4000 ADD RAX,-0x8 CMP qword ptr [RBP + -0x2d8],RAX JNC 0x00129cc6 MOV RAX,qword ptr [RBP + -0x2d8] CMP qword ptr [RAX],0x0 JZ 0x00129cb0 JMP 0x00129c78 LAB_00129c78: JMP 0x00129c7a LAB_00129c7a: MOV RAX,qword ptr [RBP + -0x2d8] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00129cae MOV RAX,qword ptr [RBP + -0x2d8] MOV RDI,qword ptr [RAX] CALL 0x0012b220 CMP AL,0x0 JZ 0x00129cac MOV RAX,qword ptr [RBP + -0x2d8] MOV qword ptr [RAX],0x0 LAB_00129cac: JMP 0x00129cae LAB_00129cae: JMP 0x00129cb0 LAB_00129cb0: JMP 0x00129cb2 LAB_00129cb2: MOV RAX,qword ptr [RBP + -0x2d8] ADD RAX,0x8 MOV qword ptr [RBP + -0x2d8],RAX JMP 0x00129c4f LAB_00129cc6: LEA RDI,[RBP + -0x2d0] CALL 0x001291c0 LEA RDI,[RBP + -0x220] CALL 0x00129860 MOV RDI,RAX LEA RSI,[0x1798c0] CALL 0x001242f0 LEA RSI,[RBP + -0x220] LEA RDI,[RBP + -0x2d0] XOR EAX,EAX MOV EDX,EAX CALL 0x0012b700 JMP 0x00129d06 LAB_00129d06: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00129d21 ADD RSP,0x300 POP RBP RET LAB_00129d21: CALL 0x00124320
void init_available_charsets(void) { char cVar1; char *__dest; long in_FS_OFFSET; long *local_2e0; int1 local_2d8 [176]; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(&all_charsets,0,0x4000); memset(my_collation_statistics,0,0x4000); my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0, get_charset_key,0,0,1); init_compiled_charsets(0); for (local_2e0 = &all_charsets; local_2e0 < (long *)0x48a668; local_2e0 = local_2e0 + 1) { if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) && (cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) { *local_2e0 = 0; } } my_charset_loader_init_mysys(local_2d8); __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_read_charset_file(local_2d8,local_228,0); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
49,514
init_available_charsets
eloqsql/mysys/charset.c
static void init_available_charsets(void) { char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; struct charset_info_st **cs; MY_CHARSET_LOADER loader; DBUG_ENTER("init_available_charsets"); bzero((char*) &all_charsets,sizeof(all_charsets)); bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics)); my_hash_init2(key_memory_charsets, &charset_name_hash, 16, &my_charset_latin1, 64, 0, 0, get_charset_key, 0, 0, HASH_UNIQUE); init_compiled_charsets(MYF(0)); /* Copy compiled charsets */ for (cs= (struct charset_info_st**) all_charsets; cs < (struct charset_info_st**) all_charsets + array_elements(all_charsets)-1 ; cs++) { if (*cs) { DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN); if (cs[0]->m_ctype) if (init_state_maps(*cs)) *cs= NULL; } } my_charset_loader_init_mysys(&loader); strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); my_read_charset_file(&loader, fname, MYF(0)); DBUG_VOID_RETURN; }
O3
c
init_available_charsets: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x18(%rbp) leaq 0x33e79f(%rip), %rbx # 0x366a50 movl $0x4000, %edx # imm = 0x4000 movq %rbx, %rdi xorl %esi, %esi callq 0x24190 leaq 0x3427f9(%rip), %rdi # 0x36aac0 movl $0x4000, %edx # imm = 0x4000 xorl %esi, %esi callq 0x24190 leaq 0x33e762(%rip), %rax # 0x366a3c movl (%rax), %edi xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsp) leaq 0x10fc(%rip), %rax # 0x293e7 movq %rax, 0x8(%rsp) movl $0x1, 0x20(%rsp) movq $0x0, (%rsp) leaq 0x342749(%rip), %rsi # 0x36aa50 leaq 0x2ed462(%rip), %rcx # 0x315770 movl $0x40, %r8d movl $0x10, %edx xorl %r9d, %r9d callq 0x29745 xorl %edi, %edi callq 0x2c71c movq $-0x8, %r14 movq 0x8(%rbx,%r14), %rdi testq %rdi, %rdi je 0x28352 cmpq $0x0, 0x40(%rdi) je 0x28352 callq 0x29232 testb %al, %al je 0x28352 movq $0x0, 0x8(%rbx,%r14) addq $0x8, %r14 cmpq $0x3ff0, %r14 # imm = 0x3FF0 jb 0x2832f leaq -0x2e0(%rbp), %rbx movb $0x0, (%rbx) leaq -0x8ae(%rip), %rax # 0x27ac2 movq %rax, 0x80(%rbx) leaq -0x8ad(%rip), %rax # 0x27ad1 movq %rax, 0x88(%rbx) leaq -0x8a0(%rip), %rax # 0x27aec movq %rax, 0x90(%rbx) leaq 0x342c(%rip), %rax # 0x2b7c6 movq %rax, 0x98(%rbx) leaq 0x2c7488(%rip), %rax # 0x2ef830 movq (%rax), %rax movq %rax, 0xa0(%rbx) leaq -0x8af(%rip), %rax # 0x27b0a movq %rax, 0xa8(%rbx) leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x2804f movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x293f8 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x2840a addq $0x300, %rsp # imm = 0x300 popq %rbx popq %r14 popq %rbp retq callq 0x24360
init_available_charsets: push rbp mov rbp, rsp push r14 push rbx sub rsp, 300h mov rax, fs:28h mov [rbp+var_18], rax lea rbx, all_charsets mov edx, 4000h mov rdi, rbx xor esi, esi call _memset lea rdi, my_collation_statistics mov edx, 4000h xor esi, esi call _memset lea rax, key_memory_charsets mov edi, [rax] xorps xmm0, xmm0 movups [rsp+310h+var_300], xmm0 lea rax, get_charset_key mov [rsp+310h+var_308], rax mov [rsp+310h+var_2F0], 1 mov [rsp+310h+var_310], 0 lea rsi, charset_name_hash lea rcx, my_charset_latin1 mov r8d, 40h ; '@' mov edx, 10h xor r9d, r9d call my_hash_init2 xor edi, edi call init_compiled_charsets mov r14, 0FFFFFFFFFFFFFFF8h loc_2832F: mov rdi, [rbx+r14+8] test rdi, rdi jz short loc_28352 cmp qword ptr [rdi+40h], 0 jz short loc_28352 call init_state_maps test al, al jz short loc_28352 mov qword ptr [rbx+r14+8], 0 loc_28352: add r14, 8 cmp r14, 3FF0h jb short loc_2832F lea rbx, [rbp+var_2E0] mov byte ptr [rbx], 0 lea rax, my_once_alloc_c mov [rbx+80h], rax lea rax, my_malloc_c mov [rbx+88h], rax lea rax, my_realloc_c mov [rbx+90h], rax lea rax, my_free mov [rbx+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rbx+0A0h], rax lea rax, add_collation mov [rbx+0A8h], rax lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' mov rdi, rbx mov rsi, r14 xor edx, edx call my_read_charset_file mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_2840A add rsp, 300h pop rbx pop r14 pop rbp retn loc_2840A: call ___stack_chk_fail
unsigned long long init_available_charsets() { unsigned long long v0; // r14 long long v1; // rdi _BYTE v3[128]; // [rsp+30h] [rbp-2E0h] BYREF long long ( *v4)(long long); // [rsp+B0h] [rbp-260h] long long ( *v5)(long long); // [rsp+B8h] [rbp-258h] long long ( *v6)(long long, long long); // [rsp+C0h] [rbp-250h] long long ( *v7)(); // [rsp+C8h] [rbp-248h] long long ( *v8)(); // [rsp+D0h] [rbp-240h] long long ( *v9)(unsigned int *); // [rsp+D8h] [rbp-238h] _BYTE v10[536]; // [rsp+E0h] [rbp-230h] BYREF unsigned long long v11; // [rsp+2F8h] [rbp-18h] v11 = __readfsqword(0x28u); memset(all_charsets, 0LL, sizeof(all_charsets)); memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics)); my_hash_init2( key_memory_charsets, (unsigned int)&charset_name_hash, 16, (unsigned int)&my_charset_latin1, 64, 0, 0LL, (long long)get_charset_key, 0LL, 0LL, 1); init_compiled_charsets(0LL); v0 = 0x1FFFFFFFFFFFFFFFLL; do { v1 = all_charsets[v0 + 1]; if ( v1 && *(_QWORD *)(v1 + 64) && (unsigned __int8)init_state_maps(v1) ) all_charsets[v0 + 1] = 0LL; ++v0; } while ( v0 < 2046 ); v3[0] = 0; v4 = my_once_alloc_c; v5 = my_malloc_c; v6 = my_realloc_c; v7 = my_free; v8 = my_charset_error_reporter; v9 = add_collation; strcpy((char *)get_charsets_dir((long long)v10), "Index.xml"); my_read_charset_file(v3, v10, 0LL); return __readfsqword(0x28u); }
init_available_charsets: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX LEA RBX,[0x466a50] MOV EDX,0x4000 MOV RDI,RBX XOR ESI,ESI CALL 0x00124190 LEA RDI,[0x46aac0] MOV EDX,0x4000 XOR ESI,ESI CALL 0x00124190 LEA RAX,[0x466a3c] MOV EDI,dword ptr [RAX] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x10],XMM0 LEA RAX,[0x1293e7] MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x20],0x1 MOV qword ptr [RSP],0x0 LEA RSI,[0x46aa50] LEA RCX,[0x415770] MOV R8D,0x40 MOV EDX,0x10 XOR R9D,R9D CALL 0x00129745 XOR EDI,EDI CALL 0x0012c71c MOV R14,-0x8 LAB_0012832f: MOV RDI,qword ptr [RBX + R14*0x1 + 0x8] TEST RDI,RDI JZ 0x00128352 CMP qword ptr [RDI + 0x40],0x0 JZ 0x00128352 CALL 0x00129232 TEST AL,AL JZ 0x00128352 MOV qword ptr [RBX + R14*0x1 + 0x8],0x0 LAB_00128352: ADD R14,0x8 CMP R14,0x3ff0 JC 0x0012832f LEA RBX,[RBP + -0x2e0] MOV byte ptr [RBX],0x0 LEA RAX,[0x127ac2] MOV qword ptr [RBX + 0x80],RAX LEA RAX,[0x127ad1] MOV qword ptr [RBX + 0x88],RAX LEA RAX,[0x127aec] MOV qword ptr [RBX + 0x90],RAX LEA RAX,[0x12b7c6] MOV qword ptr [RBX + 0x98],RAX LEA RAX,[0x3ef830] MOV RAX,qword ptr [RAX] MOV qword ptr [RBX + 0xa0],RAX LEA RAX,[0x127b0a] MOV qword ptr [RBX + 0xa8],RAX LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x0012804f MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x001293f8 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0012840a ADD RSP,0x300 POP RBX POP R14 POP RBP RET LAB_0012840a: CALL 0x00124360
void init_available_charsets(void) { char cVar1; int8 *puVar2; ulong uVar3; long in_FS_OFFSET; int1 local_2e8 [128]; code *local_268; code *local_260; code *local_258; code *local_250; int *local_248; code *local_240; int1 local_238 [536]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); memset(&all_charsets,0,0x4000); memset(my_collation_statistics,0,0x4000); my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0, get_charset_key,0,0,1); init_compiled_charsets(0); uVar3 = 0xfffffffffffffff8; do { if ((*(long *)((long)&DAT_00466a58 + uVar3) != 0) && (*(long *)(*(long *)((long)&DAT_00466a58 + uVar3) + 0x40) != 0)) { cVar1 = init_state_maps(); if (cVar1 != '\0') { *(int8 *)((long)&DAT_00466a58 + uVar3) = 0; } } uVar3 = uVar3 + 8; } while (uVar3 < 0x3ff0); local_2e8[0] = 0; local_268 = my_once_alloc_c; local_260 = my_malloc_c; local_258 = my_realloc_c; local_250 = my_free; local_248 = my_charset_error_reporter; local_240 = add_collation; puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; my_read_charset_file(local_2e8,local_238,0); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,515
my_uca_coll_init_utf8mb3
eloqsql/strings/ctype-uca.c
static my_bool my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { if (my_coll_init_uca(cs, loader)) return TRUE; if (my_uca_collation_can_optimize_no_contractions(cs)) my_uca_handler_map(cs, &my_uca_package_utf8mb3, &my_uca_package_no_contractions_utf8mb3); return FALSE; }
O3
c
my_uca_coll_init_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0xb8458 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0xba36c movzbl 0xb2(%rbx), %ecx testq %rcx, %rcx je 0xba31b movq 0x60(%rbx), %rax imulq $0x38, %rcx, %rcx xorl %edx, %edx cmpq $0x0, 0x18(%rax,%rdx) jne 0xba36a addq $0x38, %rdx cmpq %rdx, %rcx jne 0xba30a movq 0xc0(%rbx), %rcx leaq 0x2fca57(%rip), %rdx # 0x3b6d80 cmpq (%rdx), %rcx je 0xba34d leaq 0x2fca6b(%rip), %rax # 0x3b6da0 cmpq 0x8(%rdx), %rcx je 0xba356 cmpq 0x10(%rdx), %rcx je 0xba35c cmpq 0x18(%rdx), %rcx jne 0xba36a addq $0x18, %rax jmp 0xba360 leaq 0x2fca4c(%rip), %rax # 0x3b6da0 jmp 0xba360 addq $0x8, %rax jmp 0xba360 addq $0x10, %rax movq (%rax), %rax movq %rax, 0xc0(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
my_uca_coll_init_utf8mb3: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call my_coll_init_uca mov ecx, eax mov al, 1 test cl, cl jnz short loc_BA36C movzx ecx, byte ptr [rbx+0B2h] test rcx, rcx jz short loc_BA31B mov rax, [rbx+60h] imul rcx, 38h ; '8' xor edx, edx loc_BA30A: cmp qword ptr [rax+rdx+18h], 0 jnz short loc_BA36A add rdx, 38h ; '8' cmp rcx, rdx jnz short loc_BA30A loc_BA31B: mov rcx, [rbx+0C0h] lea rdx, my_uca_package_utf8mb3 cmp rcx, [rdx] jz short loc_BA34D lea rax, my_uca_package_no_contractions_utf8mb3 cmp rcx, [rdx+8] jz short loc_BA356 cmp rcx, [rdx+10h] jz short loc_BA35C cmp rcx, [rdx+18h] jnz short loc_BA36A add rax, 18h jmp short loc_BA360 loc_BA34D: lea rax, my_uca_package_no_contractions_utf8mb3 jmp short loc_BA360 loc_BA356: add rax, 8 jmp short loc_BA360 loc_BA35C: add rax, 10h loc_BA360: mov rax, [rax] mov [rbx+0C0h], rax loc_BA36A: xor eax, eax loc_BA36C: add rsp, 8 pop rbx pop rbp retn
char my_uca_coll_init_utf8mb3( long long a1, long long ( **a2)(unsigned long long, unsigned long long, const char *)) { char inited; // cl char result; // al long long v4; // rdx long long ( **v5)(); // rcx long long ( ***v6)(); // rax inited = my_coll_init_uca(a1, a2); result = 1; if ( !inited ) { if ( *(_BYTE *)(a1 + 178) ) { v4 = 0LL; while ( !*(_QWORD *)(*(_QWORD *)(a1 + 96) + v4 + 24) ) { v4 += 56LL; if ( 56LL * *(unsigned __int8 *)(a1 + 178) == v4 ) goto LABEL_6; } return 0; } LABEL_6: v5 = *(long long ( ***)())(a1 + 192); if ( v5 == my_uca_package_utf8mb3[0] ) { v6 = my_uca_package_no_contractions_utf8mb3; } else if ( v5 == my_uca_package_utf8mb3[1] ) { v6 = &my_uca_package_no_contractions_utf8mb3[1]; } else if ( v5 == my_uca_package_utf8mb3[2] ) { v6 = &my_uca_package_no_contractions_utf8mb3[2]; } else { if ( v5 != my_uca_package_utf8mb3[3] ) return 0; v6 = &my_uca_package_no_contractions_utf8mb3[3]; } *(_QWORD *)(a1 + 192) = *v6; return 0; } return result; }
my_uca_coll_init_utf8mb3: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x001b8458 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x001ba36c MOVZX ECX,byte ptr [RBX + 0xb2] TEST RCX,RCX JZ 0x001ba31b MOV RAX,qword ptr [RBX + 0x60] IMUL RCX,RCX,0x38 XOR EDX,EDX LAB_001ba30a: CMP qword ptr [RAX + RDX*0x1 + 0x18],0x0 JNZ 0x001ba36a ADD RDX,0x38 CMP RCX,RDX JNZ 0x001ba30a LAB_001ba31b: MOV RCX,qword ptr [RBX + 0xc0] LEA RDX,[0x4b6d80] CMP RCX,qword ptr [RDX] JZ 0x001ba34d LEA RAX,[0x4b6da0] CMP RCX,qword ptr [RDX + 0x8] JZ 0x001ba356 CMP RCX,qword ptr [RDX + 0x10] JZ 0x001ba35c CMP RCX,qword ptr [RDX + 0x18] JNZ 0x001ba36a ADD RAX,0x18 JMP 0x001ba360 LAB_001ba34d: LEA RAX,[0x4b6da0] JMP 0x001ba360 LAB_001ba356: ADD RAX,0x8 JMP 0x001ba360 LAB_001ba35c: ADD RAX,0x10 LAB_001ba360: MOV RAX,qword ptr [RAX] MOV qword ptr [RBX + 0xc0],RAX LAB_001ba36a: XOR EAX,EAX LAB_001ba36c: ADD RSP,0x8 POP RBX POP RBP RET
int8 my_uca_coll_init_utf8mb3(long param_1) { int *puVar1; char cVar2; int **ppuVar3; long lVar4; cVar2 = my_coll_init_uca(); if (cVar2 != '\0') { return 1; } if ((ulong)*(byte *)(param_1 + 0xb2) != 0) { lVar4 = 0; do { if (*(long *)(*(long *)(param_1 + 0x60) + 0x18 + lVar4) != 0) { return 0; } lVar4 = lVar4 + 0x38; } while ((ulong)*(byte *)(param_1 + 0xb2) * 0x38 - lVar4 != 0); } puVar1 = *(int **)(param_1 + 0xc0); if (puVar1 == my_uca_package_utf8mb3) { ppuVar3 = &my_uca_package_no_contractions_utf8mb3; } else if (puVar1 == PTR_my_uca_collation_handler_nopad_utf8mb3_004b6d88) { ppuVar3 = &PTR_my_uca_collation_handler_nopad_no_contractions_utf8mb3_004b6da8; } else if (puVar1 == PTR_my_uca_collation_handler_multilevel_utf8mb3_004b6d90) { ppuVar3 = &PTR_my_uca_collation_handler_multilevel_no_contractions_utf8mb3_004b6db0; } else { if (puVar1 != PTR_my_uca_collation_handler_nopad_multilevel_utf8mb3_004b6d98) { return 0; } ppuVar3 = &PTR_my_uca_collation_handler_nopad_multilevel_no_contractions_utf8mb3_004b6db8; } *(int **)(param_1 + 0xc0) = *ppuVar3; return 0; }
49,516
my_mb_wc_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */ { if (s + 2 > e) return MY_CS_TOOSMALL2; return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 : (s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2; } /* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */ if (hi == 0x8E) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (s[1] < 0xA1 || s[1] > 0xDF) return MY_CS_ILSEQ; *pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */ return 2; } if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */ { if (s + 3 > e) return MY_CS_TOOSMALL3; return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ? 3 : (s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ? MY_CS_ILSEQ : -3; } return MY_CS_ILSEQ; }
O3
c
my_mb_wc_euc_jp: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x6e5fb movzbl (%rdx), %edi testb %dil, %dil js 0x6e5fd movq %rdi, (%rsi) movl $0x1, %eax popq %rbp retq leal 0x5f(%rdi), %eax cmpb $0x5d, %al ja 0x6e649 leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x6e5fb movzbl 0x1(%rdx), %eax shll $0x9, %edi leal (%rdi,%rax,2), %eax leaq 0x2087ad(%rip), %rcx # 0x276dd0 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0x6e5fb movb 0x1(%rdx), %al incb %al xorl %ecx, %ecx cmpb $-0x5e, %al setb %cl leal -0x2(,%rcx,2), %eax jmp 0x6e5fb cmpq $0x8f, %rdi je 0x6e68d cmpl $0x8e, %edi jne 0x6e6cf leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x6e5fb movzbl 0x1(%rdx), %ecx leal 0x20(%rcx), %edx movl $0x0, %eax cmpb $-0x3f, %dl jb 0x6e5fb addq $0xfec0, %rcx # imm = 0xFEC0 movq %rcx, (%rsi) movl $0x2, %eax jmp 0x6e5fb leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0x6e5fb movzwl 0x1(%rdx), %eax rolw $0x8, %ax movzwl %ax, %eax leaq 0x22871f(%rip), %rcx # 0x296dd0 movzwl (%rcx,%rax,2), %ecx movq %rcx, (%rsi) movl $0x3, %eax testq %rcx, %rcx jne 0x6e5fb movb 0x1(%rdx), %al incb %al cmpb $-0x5e, %al jae 0x6e6d6 xorl %eax, %eax jmp 0x6e5fb movb 0x2(%rdx), %cl movl $0x0, %eax cmpb $-0x5f, %cl jb 0x6e5fb xorl %eax, %eax cmpb $-0x1, %cl sete %al leal (%rax,%rax,2), %eax addl $-0x3, %eax jmp 0x6e5fb
my_mb_wc_euc_jp: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_6E5FB movzx edi, byte ptr [rdx] test dil, dil js short loc_6E5FD mov [rsi], rdi mov eax, 1 loc_6E5FB: pop rbp retn loc_6E5FD: lea eax, [rdi+5Fh] cmp al, 5Dh ; ']' ja short loc_6E649 lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_6E5FB movzx eax, byte ptr [rdx+1] shl edi, 9 lea eax, [rdi+rax*2] lea rcx, jisx0208_eucjp_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_6E5FB mov al, [rdx+1] inc al xor ecx, ecx cmp al, 0A2h setb cl lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2] jmp short loc_6E5FB loc_6E649: cmp rdi, 8Fh jz short loc_6E68D cmp edi, 8Eh jnz short loc_6E6CF lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_6E5FB movzx ecx, byte ptr [rdx+1] lea edx, [rcx+20h] mov eax, 0 cmp dl, 0C1h jb short loc_6E5FB add rcx, 0FEC0h mov [rsi], rcx mov eax, 2 jmp loc_6E5FB loc_6E68D: lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja loc_6E5FB movzx eax, word ptr [rdx+1] rol ax, 8 movzx eax, ax lea rcx, jisx0212_eucjp_to_unicode movzx ecx, word ptr [rcx+rax*2] mov [rsi], rcx mov eax, 3 test rcx, rcx jnz loc_6E5FB mov al, [rdx+1] inc al cmp al, 0A2h jnb short loc_6E6D6 loc_6E6CF: xor eax, eax jmp loc_6E5FB loc_6E6D6: mov cl, [rdx+2] mov eax, 0 cmp cl, 0A1h jb loc_6E5FB xor eax, eax cmp cl, 0FFh setz al lea eax, [rax+rax*2] add eax, 0FFFFFFFDh jmp loc_6E5FB
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx long long v7; // rcx long long v8; // rcx unsigned __int8 v9; // cl result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x5Du ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = jisx0208_eucjp_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2; } return result; } if ( v5 != 143 ) { if ( (_DWORD)v5 == 142 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v7 = a3[1]; result = 0LL; if ( (unsigned __int8)(v7 + 32) >= 0xC1u ) { *a2 = v7 + 65216; return 2LL; } } return result; } return 0LL; } result = 4294967193LL; if ( (unsigned long long)(a3 + 3) > a4 ) return result; v8 = jisx0212_eucjp_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)]; *a2 = v8; result = 3LL; if ( v8 ) return result; if ( (unsigned __int8)(a3[1] + 1) < 0xA2u ) return 0LL; v9 = a3[2]; result = 0LL; if ( v9 >= 0xA1u ) return 3 * (unsigned int)(v9 == 0xFF) - 3; return result; }
my_mb_wc_euc_jp: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0016e5fb MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x0016e5fd MOV qword ptr [RSI],RDI MOV EAX,0x1 LAB_0016e5fb: POP RBP RET LAB_0016e5fd: LEA EAX,[RDI + 0x5f] CMP AL,0x5d JA 0x0016e649 LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x0016e5fb MOVZX EAX,byte ptr [RDX + 0x1] SHL EDI,0x9 LEA EAX,[RDI + RAX*0x2] LEA RCX,[0x376dd0] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x0016e5fb MOV AL,byte ptr [RDX + 0x1] INC AL XOR ECX,ECX CMP AL,0xa2 SETC CL LEA EAX,[-0x2 + RCX*0x2] JMP 0x0016e5fb LAB_0016e649: CMP RDI,0x8f JZ 0x0016e68d CMP EDI,0x8e JNZ 0x0016e6cf LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x0016e5fb MOVZX ECX,byte ptr [RDX + 0x1] LEA EDX,[RCX + 0x20] MOV EAX,0x0 CMP DL,0xc1 JC 0x0016e5fb ADD RCX,0xfec0 MOV qword ptr [RSI],RCX MOV EAX,0x2 JMP 0x0016e5fb LAB_0016e68d: LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x0016e5fb MOVZX EAX,word ptr [RDX + 0x1] ROL AX,0x8 MOVZX EAX,AX LEA RCX,[0x396dd0] MOVZX ECX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RCX MOV EAX,0x3 TEST RCX,RCX JNZ 0x0016e5fb MOV AL,byte ptr [RDX + 0x1] INC AL CMP AL,0xa2 JNC 0x0016e6d6 LAB_0016e6cf: XOR EAX,EAX JMP 0x0016e5fb LAB_0016e6d6: MOV CL,byte ptr [RDX + 0x2] MOV EAX,0x0 CMP CL,0xa1 JC 0x0016e5fb XOR EAX,EAX CMP CL,0xff SETZ AL LEA EAX,[RAX + RAX*0x2] ADD EAX,-0x3 JMP 0x0016e5fb
int my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if ((byte)(bVar1 + 0x5f) < 0x5e) { iVar3 = -0x66; if (param_3 + 2 <= param_4) { uVar2 = *(ushort *) (jisx0208_eucjp_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; iVar3 = 2; if ((ulong)uVar2 == 0) { iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2; } } } else { if ((ulong)bVar1 == 0x8f) { if (param_4 < param_3 + 3) { return -0x67; } uVar2 = *(ushort *) (&jisx0212_eucjp_to_unicode + (ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) * 2); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 3; } if (0xa1 < (byte)(param_3[1] + 1)) { if (param_3[2] < 0xa1) { return 0; } return (uint)(param_3[2] == 0xff) * 3 + -3; } } else if (bVar1 == 0x8e) { if (param_4 < param_3 + 2) { return -0x66; } if ((byte)(param_3[1] + 0x20) < 0xc1) { return 0; } *param_2 = (ulong)param_3[1] + 0xfec0; return 2; } iVar3 = 0; } } else { *param_2 = (ulong)bVar1; iVar3 = 1; } } return iVar3; }
49,517
testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, int /*iteration*/) { ColoredPrintf(GTestColor::kGreen, "[==========] "); printf("%s from %s ran.", FormatTestCount(unit_test.test_to_run_count()).c_str(), FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str()); if (GTEST_FLAG_GET(print_time)) { printf(" (%s ms total)", internal::StreamableToString(unit_test.elapsed_time()).c_str()); } printf("\n"); ColoredPrintf(GTestColor::kGreen, "[ PASSED ] "); printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str()); const int skipped_test_count = unit_test.skipped_test_count(); if (skipped_test_count > 0) { ColoredPrintf(GTestColor::kGreen, "[ SKIPPED ] "); printf("%s, listed below:\n", FormatTestCount(skipped_test_count).c_str()); PrintSkippedTests(unit_test); } if (!unit_test.Passed()) { PrintFailedTests(unit_test); PrintFailedTestSuites(unit_test); } int num_disabled = unit_test.reportable_disabled_test_count(); if (num_disabled && !GTEST_FLAG_GET(also_run_disabled_tests)) { if (unit_test.Passed()) { printf("\n"); // Add a spacer if no FAILURE banner is displayed. } ColoredPrintf(GTestColor::kYellow, " YOU HAVE %d DISABLED %s\n\n", num_disabled, num_disabled == 1 ? "TEST" : "TESTS"); } // Ensure that Google Test output is printed before, e.g., heapchecker output. fflush(stdout); }
O3
cpp
testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx leaq 0x1ffed(%rip), %rsi # 0x432c7 xorl %ebp, %ebp movl $0x2, %edi xorl %eax, %eax callq 0x22129 movq 0x40(%rbx), %rdi callq 0x1c862 leaq 0x1efb6(%rip), %rdx # 0x422ae leaq 0x1f3bb(%rip), %rcx # 0x426ba leaq 0x8(%rsp), %rdi movl %eax, %esi callq 0x228b2 movq 0x40(%rbx), %rcx movq 0xb8(%rcx), %rax movq 0xc0(%rcx), %rcx cmpq %rcx, %rax je 0x23336 xorl %ebp, %ebp movq (%rax), %rdx movzbl 0x70(%rdx), %edx addl %edx, %ebp addq $0x8, %rax cmpq %rcx, %rax jne 0x23324 movq 0x8(%rsp), %r14 leaq 0x20faa(%rip), %rdx # 0x442ec leaq 0x20fae(%rip), %rcx # 0x442f7 leaq 0x28(%rsp), %rdi movl %ebp, %esi callq 0x228b2 leaq 0x38(%rsp), %r15 movq -0x10(%r15), %rdx leaq 0x20099(%rip), %rdi # 0x433fe movq %r14, %rsi xorl %eax, %eax callq 0x8080 movq -0x10(%r15), %rdi cmpq %r15, %rdi je 0x23385 movq 0x38(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x18(%rsp), %r15 movq -0x10(%r15), %rdi cmpq %r15, %rdi je 0x233a0 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 cmpb $0x1, 0x3634a(%rip) # 0x596f1 jne 0x233ef movq 0x40(%rbx), %rax movq 0x2a0(%rax), %rax leaq 0x28(%rsp), %rsi movq %rax, (%rsi) leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x3471e movq (%r14), %rsi leaq 0x2003b(%rip), %rdi # 0x4340e xorl %eax, %eax callq 0x8080 movq (%r14), %rdi cmpq %r15, %rdi je 0x233ef movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movl $0xa, %edi callq 0x8790 leaq 0x2001d(%rip), %rsi # 0x4341d movl $0x2, %edi xorl %eax, %eax callq 0x22129 movq 0x40(%rbx), %rdi callq 0x1c45c leaq 0x1ee92(%rip), %rdx # 0x422ae leaq 0x1f297(%rip), %rcx # 0x426ba leaq 0x8(%rsp), %r14 movq %r14, %rdi movl %eax, %esi callq 0x228b2 movq (%r14), %rsi leaq 0x1fe51(%rip), %rdi # 0x4328d xorl %eax, %eax callq 0x8080 movq (%r14), %rdi cmpq %r15, %rdi je 0x23458 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x40(%rbx), %rdi callq 0x1c4e2 testl %eax, %eax jle 0x234c5 movl %eax, %ebp leaq 0x1fed0(%rip), %rsi # 0x4333e movl $0x2, %edi xorl %eax, %eax callq 0x22129 leaq 0x1ee2d(%rip), %rdx # 0x422ae leaq 0x1f232(%rip), %rcx # 0x426ba leaq 0x8(%rsp), %r14 movq %r14, %rdi movl %ebp, %esi callq 0x228b2 movq (%r14), %rsi leaq 0x1fede(%rip), %rdi # 0x4337f xorl %eax, %eax callq 0x8080 movq (%r14), %rdi cmpq %r15, %rdi je 0x234bd movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x23142 movq 0x40(%rbx), %rdi callq 0x34788 testb %al, %al jne 0x234e2 movq %rbx, %rdi callq 0x22dd4 movq %rbx, %rdi callq 0x2302e movq 0x40(%rbx), %r14 movq %r14, %rdi callq 0x1c622 testl %eax, %eax je 0x2353d cmpb $0x0, 0x3618a(%rip) # 0x59683 jne 0x2353d movl %eax, %ebx movq %r14, %rdi callq 0x34788 testb %al, %al je 0x23513 movl $0xa, %edi callq 0x8790 cmpl $0x1, %ebx leaq 0x1fe8b(%rip), %rax # 0x433a8 leaq 0x1fe89(%rip), %rcx # 0x433ad cmoveq %rax, %rcx leaq 0x1fefc(%rip), %rsi # 0x4342b movl $0x3, %edi movl %ebx, %edx xorl %eax, %eax callq 0x22129 movq 0x35a3c(%rip), %rax # 0x58f80 movq (%rax), %rdi callq 0x8600 addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x23575 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal27PrettyUnitTestResultPrinter18OnTestIterationEndERKNS_8UnitTestEi: push rbp push r15 push r14 push rbx sub rsp, 48h mov rbx, rsi lea rsi, asc_432C7; "[==========] " xor ebp, ebp mov edi, 2 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl17test_to_run_countEv; testing::internal::UnitTestImpl::test_to_run_count(void) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea rdi, [rsp+68h+var_60]; int mov esi, eax; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rcx, [rbx+40h] mov rax, [rcx+0B8h] mov rcx, [rcx+0C0h] cmp rax, rcx jz short loc_23336 xor ebp, ebp loc_23324: mov rdx, [rax] movzx edx, byte ptr [rdx+70h] add ebp, edx add rax, 8 cmp rax, rcx jnz short loc_23324 loc_23336: mov r14, qword ptr [rsp+68h+var_60] lea rdx, aTestSuite; "test suite" lea rcx, aTestSuites; "test suites" lea rdi, [rsp+68h+var_40]; int mov esi, ebp; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) lea r15, [rsp+68h+var_30] mov rdx, [r15-10h] lea rdi, aSFromSRan; "%s from %s ran." mov rsi, r14 xor eax, eax call _printf mov rdi, [r15-10h]; void * cmp rdi, r15 jz short loc_23385 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_23385: lea r15, [rsp+68h+var_50] mov rdi, [r15-10h]; void * cmp rdi, r15 jz short loc_233A0 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_233A0: cmp cs:_ZN7testing22FLAGS_gtest_print_timeE, 1; testing::FLAGS_gtest_print_time jnz short loc_233EF mov rax, [rbx+40h] mov rax, [rax+2A0h] lea rsi, [rsp+68h+var_40] mov [rsi], rax lea r14, [rsp+68h+var_60] mov rdi, r14 call _ZN7testing8internal18StreamableToStringIlEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<long>(long const&) mov rsi, [r14] lea rdi, aSMsTotal; " (%s ms total)" xor eax, eax call _printf mov rdi, [r14]; void * cmp rdi, r15 jz short loc_233EF mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_233EF: mov edi, 0Ah call _putchar lea rsi, aPassed; "[ PASSED ] " mov edi, 2 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl21successful_test_countEv; testing::internal::UnitTestImpl::successful_test_count(void) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea r14, [rsp+68h+var_60] mov rdi, r14; int mov esi, eax; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rsi, [r14] lea rdi, aNoteThisIsTest+1Fh; "%s.\n" xor eax, eax call _printf mov rdi, [r14]; void * cmp rdi, r15 jz short loc_23458 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_23458: mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl18skipped_test_countEv; testing::internal::UnitTestImpl::skipped_test_count(void) test eax, eax jle short loc_234C5 mov ebp, eax lea rsi, aSkipped_0; "[ SKIPPED ] " mov edi, 2 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea r14, [rsp+68h+var_60] mov rdi, r14; int mov esi, ebp; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rsi, [r14] lea rdi, aSListedBelow; "%s, listed below:\n" xor eax, eax call _printf mov rdi, [r14]; void * cmp rdi, r15 jz short loc_234BD mov rsi, [rsp+68h+var_50] inc rsi; testing::UnitTest * call __ZdlPvm; operator delete(void *,ulong) loc_234BD: mov rdi, rbx; this call _ZN7testing8internal27PrettyUnitTestResultPrinter17PrintSkippedTestsERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&) loc_234C5: mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void) test al, al jnz short loc_234E2 mov rdi, rbx; this call _ZN7testing8internal27PrettyUnitTestResultPrinter16PrintFailedTestsERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(testing::UnitTest const&) mov rdi, rbx; this call _ZN7testing8internal27PrettyUnitTestResultPrinter21PrintFailedTestSuitesERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintFailedTestSuites(testing::UnitTest const&) loc_234E2: mov r14, [rbx+40h] mov rdi, r14; this call _ZNK7testing8internal12UnitTestImpl30reportable_disabled_test_countEv; testing::internal::UnitTestImpl::reportable_disabled_test_count(void) test eax, eax jz short loc_2353D cmp cs:_ZN7testing35FLAGS_gtest_also_run_disabled_testsE, 0; testing::FLAGS_gtest_also_run_disabled_tests jnz short loc_2353D mov ebx, eax mov rdi, r14; this call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void) test al, al jz short loc_23513 mov edi, 0Ah call _putchar loc_23513: cmp ebx, 1 lea rax, aTest_0; "TEST" lea rcx, aTests; "TESTS" cmovz rcx, rax lea rsi, aYouHaveDDisabl; " YOU HAVE %d DISABLED %s\n\n" mov edi, 3 mov edx, ebx xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) loc_2353D: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_23575 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_23575: mov rdi, rbx call __Unwind_Resume
long long testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd( testing::internal::PrettyUnitTestResultPrinter *this, testing::internal::UnitTestImpl **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) { int v15; // ebp int v16; // eax testing::internal::UnitTestImpl *v17; // rcx long long v18; // rax long long v19; // rcx const char *v20; // r14 long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 int v27; // eax const testing::UnitTest *v28; // rsi int v29; // eax long long v30; // rdx long long v31; // rcx long long v32; // r8 long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 int v36; // ebp double v37; // xmm4_8 double v38; // xmm5_8 double v39; // xmm4_8 double v40; // xmm5_8 double v41; // xmm4_8 double v42; // xmm5_8 testing::internal::UnitTestImpl *v43; // r14 unsigned int v44; // eax unsigned int v45; // ebx long long v46; // r8 long long v47; // r9 __m128 v48; // xmm4 __m128 v49; // xmm5 const char *v50; // rcx char v52; // [rsp+0h] [rbp-68h] char v53; // [rsp+0h] [rbp-68h] char v54; // [rsp+0h] [rbp-68h] int v55[2]; // [rsp+8h] [rbp-60h] BYREF _QWORD v56[2]; // [rsp+18h] [rbp-50h] BYREF char *v57; // [rsp+28h] [rbp-40h] BYREF long long v58; // [rsp+38h] [rbp-30h] BYREF v15 = 0; testing::internal::ColoredPrintf( 2, (long long)"[==========] ", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v52); v16 = testing::internal::UnitTestImpl::test_to_run_count(a2[8]); testing::FormatCountableNoun[abi:cxx11]((long long)v55, v16, "test", "tests"); v17 = a2[8]; v18 = *((_QWORD *)v17 + 23); v19 = *((_QWORD *)v17 + 24); if ( v18 != v19 ) { v15 = 0; do { v15 += *(unsigned __int8 *)(*(_QWORD *)v18 + 112LL); v18 += 8LL; } while ( v18 != v19 ); } v20 = *(const char **)v55; testing::FormatCountableNoun[abi:cxx11]((long long)&v57, v15, "test suite", "test suites"); printf("%s from %s ran.", v20, v57); if ( v57 != (char *)&v58 ) operator delete(v57, v58 + 1); if ( *(_QWORD **)v55 != v56 ) operator delete(*(void **)v55, v56[0] + 1LL); if ( testing::FLAGS_gtest_print_time == 1 ) { v57 = (char *)*((_QWORD *)a2[8] + 84); testing::internal::StreamableToString<long>(v55); printf(" (%s ms total)", *(const char **)v55); if ( *(_QWORD **)v55 != v56 ) operator delete(*(void **)v55, v56[0] + 1LL); } putchar(10LL); testing::internal::ColoredPrintf( 2, (long long)"[ PASSED ] ", v21, v22, v23, v24, a7, a8, a9, a10, v25, v26, a13, a14, v53); v27 = testing::internal::UnitTestImpl::successful_test_count(a2[8]); testing::FormatCountableNoun[abi:cxx11]((long long)v55, v27, "test", "tests"); v28 = *(const testing::UnitTest **)v55; printf("%s.\n", *(const char **)v55); if ( *(_QWORD **)v55 != v56 ) { v28 = (const testing::UnitTest *)(v56[0] + 1LL); operator delete(*(void **)v55, v56[0] + 1LL); } v29 = testing::internal::UnitTestImpl::skipped_test_count(a2[8]); if ( v29 > 0 ) { v36 = v29; testing::internal::ColoredPrintf( 2, (long long)"[ SKIPPED ] ", v30, v31, v32, v33, a7, a8, a9, a10, v34, v35, a13, a14, v54); testing::FormatCountableNoun[abi:cxx11]((long long)v55, v36, "test", "tests"); v28 = *(const testing::UnitTest **)v55; printf("%s, listed below:\n", *(const char **)v55); if ( *(_QWORD **)v55 != v56 ) { v28 = (const testing::UnitTest *)(v56[0] + 1LL); operator delete(*(void **)v55, v56[0] + 1LL); } testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(a2, v28, a7, a8, a9, a10, v37, v38, a13, a14); } if ( !(unsigned __int8)testing::internal::UnitTestImpl::Passed(a2[8]) ) { testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(a2, v28, a7, a8, a9, a10, v39, v40, a13, a14); testing::internal::PrettyUnitTestResultPrinter::PrintFailedTestSuites( (testing::internal::PrettyUnitTestResultPrinter *)a2, v28, a7, a8, a9, a10, v41, v42, a13, a14); } v43 = a2[8]; v44 = testing::internal::UnitTestImpl::reportable_disabled_test_count(v43); if ( v44 && !testing::FLAGS_gtest_also_run_disabled_tests ) { v45 = v44; if ( (unsigned __int8)testing::internal::UnitTestImpl::Passed(v43) ) putchar(10LL); v50 = "TESTS"; if ( v45 == 1 ) v50 = "TEST"; testing::internal::ColoredPrintf( 3, (long long)" YOU HAVE %d DISABLED %s\n\n", v45, (long long)v50, v46, v47, a7, a8, a9, a10, v48, v49, a13, a14, v54); } return fflush(stdout); }
OnTestIterationEnd: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RSI LEA RSI,[0x1432c7] XOR EBP,EBP MOV EDI,0x2 XOR EAX,EAX CALL 0x00122129 MOV RDI,qword ptr [RBX + 0x40] CALL 0x0011c862 LEA RDX,[0x1422ae] LEA RCX,[0x1426ba] LEA RDI,[RSP + 0x8] MOV ESI,EAX CALL 0x001228b2 MOV RCX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RCX + 0xb8] MOV RCX,qword ptr [RCX + 0xc0] CMP RAX,RCX JZ 0x00123336 XOR EBP,EBP LAB_00123324: MOV RDX,qword ptr [RAX] MOVZX EDX,byte ptr [RDX + 0x70] ADD EBP,EDX ADD RAX,0x8 CMP RAX,RCX JNZ 0x00123324 LAB_00123336: MOV R14,qword ptr [RSP + 0x8] LAB_0012333b: LEA RDX,[0x1442ec] LEA RCX,[0x1442f7] LEA RDI,[RSP + 0x28] MOV ESI,EBP CALL 0x001228b2 LAB_00123355: LEA R15,[RSP + 0x38] MOV RDX,qword ptr [R15 + -0x10] LEA RDI,[0x1433fe] MOV RSI,R14 XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R15 + -0x10] CMP RDI,R15 JZ 0x00123385 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001084e0 LAB_00123385: LEA R15,[RSP + 0x18] MOV RDI,qword ptr [R15 + -0x10] CMP RDI,R15 JZ 0x001233a0 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001233a0: CMP byte ptr [0x001596f1],0x1 JNZ 0x001233ef MOV RAX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RAX + 0x2a0] LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RAX LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x0013471e MOV RSI,qword ptr [R14] LEA RDI,[0x14340e] XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x001233ef MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001233ef: MOV EDI,0xa CALL 0x00108790 LEA RSI,[0x14341d] MOV EDI,0x2 XOR EAX,EAX CALL 0x00122129 MOV RDI,qword ptr [RBX + 0x40] CALL 0x0011c45c LEA RDX,[0x1422ae] LEA RCX,[0x1426ba] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV ESI,EAX CALL 0x001228b2 MOV RSI,qword ptr [R14] LEA RDI,[0x14328d] XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x00123458 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_00123458: MOV RDI,qword ptr [RBX + 0x40] CALL 0x0011c4e2 TEST EAX,EAX JLE 0x001234c5 MOV EBP,EAX LEA RSI,[0x14333e] MOV EDI,0x2 XOR EAX,EAX CALL 0x00122129 LEA RDX,[0x1422ae] LEA RCX,[0x1426ba] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV ESI,EBP CALL 0x001228b2 MOV RSI,qword ptr [R14] LEA RDI,[0x14337f] XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x001234bd MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001234bd: MOV RDI,RBX CALL 0x00123142 LAB_001234c5: MOV RDI,qword ptr [RBX + 0x40] CALL 0x00134788 TEST AL,AL JNZ 0x001234e2 MOV RDI,RBX CALL 0x00122dd4 MOV RDI,RBX CALL 0x0012302e LAB_001234e2: MOV R14,qword ptr [RBX + 0x40] MOV RDI,R14 CALL 0x0011c622 TEST EAX,EAX JZ 0x0012353d CMP byte ptr [0x00159683],0x0 JNZ 0x0012353d MOV EBX,EAX MOV RDI,R14 CALL 0x00134788 TEST AL,AL JZ 0x00123513 MOV EDI,0xa CALL 0x00108790 LAB_00123513: CMP EBX,0x1 LEA RAX,[0x1433a8] LEA RCX,[0x1433ad] CMOVZ RCX,RAX LEA RSI,[0x14342b] MOV EDI,0x3 MOV EDX,EBX XOR EAX,EAX CALL 0x00122129 LAB_0012353d: MOV RAX,qword ptr [0x00158f80] MOV RDI,qword ptr [RAX] CALL 0x00108600 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET
/* testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int) */ void testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd (UnitTest *param_1,int param_2) { long *plVar1; UnitTestImpl *this; long *plVar2; char cVar3; uint uVar4; int iVar5; long *plVar6; char *pcVar7; uint uVar8; int4 in_register_00000034; UnitTest *pUVar9; long *local_60 [2]; long local_50 [2]; long *local_40 [2]; long local_30 [2]; pUVar9 = (UnitTest *)CONCAT44(in_register_00000034,param_2); uVar8 = 0; ColoredPrintf(2,"[==========] "); uVar4 = UnitTestImpl::test_to_run_count(*(UnitTestImpl **)(pUVar9 + 0x40)); FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test"); plVar2 = local_60[0]; plVar6 = *(long **)(*(long *)(pUVar9 + 0x40) + 0xb8); plVar1 = *(long **)(*(long *)(pUVar9 + 0x40) + 0xc0); if (plVar6 != plVar1) { uVar8 = 0; do { uVar8 = uVar8 + *(byte *)(*plVar6 + 0x70); plVar6 = plVar6 + 1; } while (plVar6 != plVar1); } /* try { // try from 0012333b to 00123354 has its CatchHandler @ 00123557 */ FormatCountableNoun_abi_cxx11_((int)local_40,(char *)(ulong)uVar8,"test suite"); printf("%s from %s ran.",plVar2,local_40[0]); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } if (FLAGS_gtest_print_time == '\x01') { local_40[0] = *(long **)(*(long *)(pUVar9 + 0x40) + 0x2a0); StreamableToString<long>((long *)local_60); printf(" (%s ms total)",local_60[0]); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } } putchar(10); ColoredPrintf(2,"[ PASSED ] "); uVar4 = UnitTestImpl::successful_test_count(*(UnitTestImpl **)(pUVar9 + 0x40)); FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test"); printf("%s.\n",local_60[0]); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } uVar4 = UnitTestImpl::skipped_test_count(*(UnitTestImpl **)(pUVar9 + 0x40)); if (0 < (int)uVar4) { ColoredPrintf(2,"[ SKIPPED ] "); FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test"); printf("%s, listed below:\n",local_60[0]); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } PrintSkippedTests(pUVar9); } cVar3 = UnitTestImpl::Passed(*(UnitTestImpl **)(pUVar9 + 0x40)); if (cVar3 == '\0') { PrintFailedTests(pUVar9); PrintFailedTestSuites(pUVar9); } this = *(UnitTestImpl **)(pUVar9 + 0x40); iVar5 = UnitTestImpl::reportable_disabled_test_count(this); if ((iVar5 != 0) && (FLAGS_gtest_also_run_disabled_tests == '\0')) { cVar3 = UnitTestImpl::Passed(this); if (cVar3 != '\0') { putchar(10); } pcVar7 = "TESTS"; if (iVar5 == 1) { pcVar7 = "TEST"; } ColoredPrintf(3," YOU HAVE %d DISABLED %s\n\n",iVar5,pcVar7); } fflush(*(FILE **)PTR_stdout_00158f80); return; }
49,518
js_array_indexOf
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_indexOf(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, val; int64_t len, n; JSValue *arrp; uint32_t count; obj = JS_ToObject(ctx, this_val); if (js_get_length64(ctx, &len, obj)) goto exception; if (len > 0) { n = 0; if (argc > 1) { if (JS_ToInt64Clamp(ctx, &n, argv[1], 0, len, len)) goto exception; } if (js_get_fast_array(ctx, obj, &arrp, &count)) { for (; n < count; n++) { if (js_strict_eq2(ctx, js_dup(argv[0]), js_dup(arrp[n]), JS_EQ_STRICT)) { goto done; } } } for (; n < len; n++) { int present = JS_TryGetPropertyInt64(ctx, obj, n, &val); if (present < 0) goto exception; if (present) { if (js_strict_eq2(ctx, js_dup(argv[0]), val, JS_EQ_STRICT)) { goto done; } } } } n = -1; done: JS_FreeValue(ctx, obj); return js_int64(n); exception: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O0
c
js_array_indexOf: subq $0xd8, %rsp movq %rsi, 0xb8(%rsp) movq %rdx, 0xc0(%rsp) movq %rdi, 0xb0(%rsp) movl %ecx, 0xac(%rsp) movq %r8, 0xa0(%rsp) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi movq 0xc0(%rsp), %rdx callq 0x364b0 movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x98(%rsp) movq 0xb0(%rsp), %rdi movq 0x90(%rsp), %rdx movq 0x98(%rsp), %rcx leaq 0x78(%rsp), %rsi callq 0x2cca0 cmpl $0x0, %eax je 0xc8eab jmp 0xc90e8 cmpq $0x0, 0x78(%rsp) jle 0xc90a6 movq $0x0, 0x70(%rsp) cmpl $0x1, 0xac(%rsp) jle 0xc8f09 movq 0xb0(%rsp), %rdi movq 0xa0(%rsp), %rcx movq 0x78(%rsp), %r9 movq 0x78(%rsp), %rax movq 0x10(%rcx), %rdx movq 0x18(%rcx), %rcx leaq 0x70(%rsp), %rsi xorl %r8d, %r8d movq %rax, (%rsp) callq 0x37850 cmpl $0x0, %eax je 0xc8f07 jmp 0xc90e8 jmp 0xc8f09 movq 0xb0(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx leaq 0x68(%rsp), %rcx leaq 0x64(%rsp), %r8 callq 0x6f480 cmpl $0x0, %eax je 0xc8fe1 jmp 0xc8f3b movq 0x70(%rsp), %rax movl 0x64(%rsp), %ecx cmpq %rcx, %rax jge 0xc8fdf movq 0xb0(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xa0(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x20410 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x20410 movq 0x10(%rsp), %rdi movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0x30(%rsp), %rcx movq 0x38(%rsp), %r8 xorl %r9d, %r9d callq 0x58d40 cmpl $0x0, %eax je 0xc8fca jmp 0xc90af jmp 0xc8fcc movq 0x70(%rsp), %rax addq $0x1, %rax movq %rax, 0x70(%rsp) jmp 0xc8f3b jmp 0xc8fe1 jmp 0xc8fe3 movq 0x70(%rsp), %rax cmpq 0x78(%rsp), %rax jge 0xc90a4 movq 0xb0(%rsp), %rdi movq 0x70(%rsp), %rcx movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx leaq 0x80(%rsp), %r8 callq 0x868e0 movl %eax, 0x2c(%rsp) cmpl $0x0, 0x2c(%rsp) jge 0xc902d jmp 0xc90e8 cmpl $0x0, 0x2c(%rsp) je 0xc908f movq 0xb0(%rsp), %rax movq %rax, 0x8(%rsp) movq 0xa0(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x20410 movq 0x8(%rsp), %rdi movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x80(%rsp), %rcx movq 0x88(%rsp), %r8 xorl %r9d, %r9d callq 0x58d40 cmpl $0x0, %eax je 0xc908d jmp 0xc90af jmp 0xc908f jmp 0xc9091 movq 0x70(%rsp), %rax addq $0x1, %rax movq %rax, 0x70(%rsp) jmp 0xc8fe3 jmp 0xc90a6 movq $-0x1, 0x70(%rsp) movq 0xb0(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x229d0 movq 0x70(%rsp), %rdi callq 0x361c0 movq %rax, 0xc8(%rsp) movq %rdx, 0xd0(%rsp) jmp 0xc911c movq 0xb0(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x229d0 movl $0x0, 0xc8(%rsp) movq $0x6, 0xd0(%rsp) movq 0xc8(%rsp), %rax movq 0xd0(%rsp), %rdx addq $0xd8, %rsp retq nopw %cs:(%rax,%rax)
js_array_indexOf: sub rsp, 0D8h mov [rsp+0D8h+var_20], rsi mov [rsp+0D8h+var_18], rdx mov [rsp+0D8h+var_28], rdi mov [rsp+0D8h+var_2C], ecx mov [rsp+0D8h+var_38], r8 mov rdi, [rsp+0D8h+var_28] mov rsi, [rsp+0D8h+var_20] mov rdx, [rsp+0D8h+var_18] call JS_ToObject mov [rsp+0D8h+var_88], rax mov [rsp+0D8h+var_80], rdx mov rax, [rsp+0D8h+var_88] mov [rsp+0D8h+var_48], rax mov rax, [rsp+0D8h+var_80] mov [rsp+0D8h+var_40], rax mov rdi, [rsp+0D8h+var_28] mov rdx, [rsp+0D8h+var_48] mov rcx, [rsp+0D8h+var_40] lea rsi, [rsp+0D8h+var_60] call js_get_length64 cmp eax, 0 jz short loc_C8EAB jmp loc_C90E8 loc_C8EAB: cmp [rsp+0D8h+var_60], 0 jle loc_C90A6 mov [rsp+0D8h+var_68], 0 cmp [rsp+0D8h+var_2C], 1 jle short loc_C8F09 mov rdi, [rsp+0D8h+var_28] mov rcx, [rsp+0D8h+var_38] mov r9, [rsp+0D8h+var_60] mov rax, [rsp+0D8h+var_60] mov rdx, [rcx+10h] mov rcx, [rcx+18h] lea rsi, [rsp+0D8h+var_68] xor r8d, r8d mov [rsp+0D8h+var_D8], rax call JS_ToInt64Clamp cmp eax, 0 jz short loc_C8F07 jmp loc_C90E8 loc_C8F07: jmp short $+2 loc_C8F09: mov rdi, [rsp+0D8h+var_28] mov rsi, [rsp+0D8h+var_48] mov rdx, [rsp+0D8h+var_40] lea rcx, [rsp+0D8h+var_70] lea r8, [rsp+0D8h+var_74] call js_get_fast_array cmp eax, 0 jz loc_C8FE1 jmp short $+2 loc_C8F3B: mov rax, [rsp+0D8h+var_68] mov ecx, [rsp+0D8h+var_74] cmp rax, rcx jge loc_C8FDF mov rax, [rsp+0D8h+var_28] mov [rsp+0D8h+var_C8], rax mov rax, [rsp+0D8h+var_38] mov rdi, [rax] mov rsi, [rax+8] call js_dup mov [rsp+0D8h+var_98], rax mov [rsp+0D8h+var_90], rdx mov rax, [rsp+0D8h+var_70] mov rcx, [rsp+0D8h+var_68] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rsi, [rax+8] call js_dup mov rdi, [rsp+0D8h+var_C8] mov [rsp+0D8h+var_A8], rax mov [rsp+0D8h+var_A0], rdx mov rsi, [rsp+0D8h+var_98] mov rdx, [rsp+0D8h+var_90] mov rcx, [rsp+0D8h+var_A8] mov r8, [rsp+0D8h+var_A0] xor r9d, r9d call js_strict_eq2 cmp eax, 0 jz short loc_C8FCA jmp loc_C90AF loc_C8FCA: jmp short $+2 loc_C8FCC: mov rax, [rsp+0D8h+var_68] add rax, 1 mov [rsp+0D8h+var_68], rax jmp loc_C8F3B loc_C8FDF: jmp short $+2 loc_C8FE1: jmp short $+2 loc_C8FE3: mov rax, [rsp+0D8h+var_68] cmp rax, [rsp+0D8h+var_60] jge loc_C90A4 mov rdi, [rsp+0D8h+var_28] mov rcx, [rsp+0D8h+var_68] mov rsi, [rsp+0D8h+var_48] mov rdx, [rsp+0D8h+var_40] lea r8, [rsp+0D8h+var_58] call JS_TryGetPropertyInt64 mov [rsp+0D8h+var_AC], eax cmp [rsp+0D8h+var_AC], 0 jge short loc_C902D jmp loc_C90E8 loc_C902D: cmp [rsp+0D8h+var_AC], 0 jz short loc_C908F mov rax, [rsp+0D8h+var_28] mov [rsp+0D8h+var_D0], rax mov rax, [rsp+0D8h+var_38] mov rdi, [rax] mov rsi, [rax+8] call js_dup mov rdi, [rsp+0D8h+var_D0] mov [rsp+0D8h+var_C0], rax mov [rsp+0D8h+var_B8], rdx mov rsi, [rsp+0D8h+var_C0] mov rdx, [rsp+0D8h+var_B8] mov rcx, [rsp+0D8h+var_58] mov r8, [rsp+0D8h+var_50] xor r9d, r9d call js_strict_eq2 cmp eax, 0 jz short loc_C908D jmp short loc_C90AF loc_C908D: jmp short $+2 loc_C908F: jmp short $+2 loc_C9091: mov rax, [rsp+0D8h+var_68] add rax, 1 mov [rsp+0D8h+var_68], rax jmp loc_C8FE3 loc_C90A4: jmp short $+2 loc_C90A6: mov [rsp+0D8h+var_68], 0FFFFFFFFFFFFFFFFh loc_C90AF: mov rdi, [rsp+0D8h+var_28] mov rsi, [rsp+0D8h+var_48] mov rdx, [rsp+0D8h+var_40] call JS_FreeValue mov rdi, [rsp+0D8h+var_68] call js_int64 mov [rsp+0D8h+var_10], rax mov [rsp+0D8h+var_8], rdx jmp short loc_C911C loc_C90E8: mov rdi, [rsp+0D8h+var_28] mov rsi, [rsp+0D8h+var_48] mov rdx, [rsp+0D8h+var_40] call JS_FreeValue mov dword ptr [rsp+0D8h+var_10], 0 mov [rsp+0D8h+var_8], 6 loc_C911C: mov rax, [rsp+0D8h+var_10] mov rdx, [rsp+0D8h+var_8] add rsp, 0D8h retn
long long js_array_indexOf( long long a1, _DWORD *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; // rdx long long v15; // rdx long long v16; // rdx long long v17; // rdx long long v18; // rdx long long v20; // [rsp+8h] [rbp-D0h] long long v21; // [rsp+10h] [rbp-C8h] _DWORD *v22; // [rsp+18h] [rbp-C0h] int PropertyInt64; // [rsp+2Ch] [rbp-ACh] _DWORD *v24; // [rsp+30h] [rbp-A8h] _DWORD *v25; // [rsp+40h] [rbp-98h] long long v26; // [rsp+48h] [rbp-90h] unsigned int v27; // [rsp+64h] [rbp-74h] BYREF long long v28; // [rsp+68h] [rbp-70h] BYREF long long v29; // [rsp+70h] [rbp-68h] BYREF long long v30; // [rsp+78h] [rbp-60h] BYREF long long v31[2]; // [rsp+80h] [rbp-58h] BYREF _DWORD *v32; // [rsp+90h] [rbp-48h] long long v33; // [rsp+98h] [rbp-40h] _DWORD **v34; // [rsp+A0h] [rbp-38h] int v35; // [rsp+ACh] [rbp-2Ch] long long v36; // [rsp+B0h] [rbp-28h] _DWORD *v37; // [rsp+B8h] [rbp-20h] long long v38; // [rsp+C0h] [rbp-18h] long long v39; // [rsp+C8h] [rbp-10h] long long v40; // [rsp+D0h] [rbp-8h] v37 = a2; v38 = a3; v36 = a1; v35 = a4; v34 = (_DWORD **)a5; v32 = JS_ToObject(a1, a2, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6); v33 = v14; if ( (unsigned int)js_get_length64(a1, &v30, (int)v32, v14) ) goto LABEL_16; if ( v30 > 0 ) { v29 = 0LL; if ( v35 <= 1 || !(unsigned int)JS_ToInt64Clamp(v36, &v29, v34[2], (unsigned int)v34[3], 0LL, v30, v30) ) { if ( !(unsigned int)js_get_fast_array(v36, (long long)v32, v33, &v28, &v27) ) goto LABEL_9; while ( v29 < v27 ) { v21 = v36; v25 = js_dup(*v34, (unsigned int)v34[1]); v26 = v15; v24 = js_dup(*(_DWORD **)(16 * v29 + v28), *(_QWORD *)(16 * v29 + v28 + 8)); if ( (unsigned int)js_strict_eq2(v21, (long long)v25, v26, (long long)v24, v16, 0) ) goto LABEL_15; ++v29; } LABEL_9: while ( v29 < v30 ) { PropertyInt64 = JS_TryGetPropertyInt64(v36, (long long)v32, v33, v29, v31); if ( PropertyInt64 < 0 ) goto LABEL_16; if ( PropertyInt64 ) { v20 = v36; v22 = js_dup(*v34, (unsigned int)v34[1]); if ( (unsigned int)js_strict_eq2(v20, (long long)v22, v17, v31[0], v31[1], 0) ) goto LABEL_15; } ++v29; } goto LABEL_14; } LABEL_16: JS_FreeValue(v36, (long long)v32, v33); LODWORD(v39) = 0; v40 = 6LL; return v39; } LABEL_14: v29 = -1LL; LABEL_15: JS_FreeValue(v36, (long long)v32, v33); v39 = js_int64(v29); v40 = v18; return v39; }
js_array_indexOf: SUB RSP,0xd8 MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xc0],RDX MOV qword ptr [RSP + 0xb0],RDI MOV dword ptr [RSP + 0xac],ECX MOV qword ptr [RSP + 0xa0],R8 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] CALL 0x001364b0 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RSP + 0x98] LEA RSI,[RSP + 0x78] CALL 0x0012cca0 CMP EAX,0x0 JZ 0x001c8eab JMP 0x001c90e8 LAB_001c8eab: CMP qword ptr [RSP + 0x78],0x0 JLE 0x001c90a6 MOV qword ptr [RSP + 0x70],0x0 CMP dword ptr [RSP + 0xac],0x1 JLE 0x001c8f09 MOV RDI,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RSP + 0xa0] MOV R9,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RCX + 0x18] LEA RSI,[RSP + 0x70] XOR R8D,R8D MOV qword ptr [RSP],RAX CALL 0x00137850 CMP EAX,0x0 JZ 0x001c8f07 JMP 0x001c90e8 LAB_001c8f07: JMP 0x001c8f09 LAB_001c8f09: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] LEA RCX,[RSP + 0x68] LEA R8,[RSP + 0x64] CALL 0x0016f480 CMP EAX,0x0 JZ 0x001c8fe1 JMP 0x001c8f3b LAB_001c8f3b: MOV RAX,qword ptr [RSP + 0x70] MOV ECX,dword ptr [RSP + 0x64] CMP RAX,RCX JGE 0x001c8fdf MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00120410 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x70] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00120410 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x38] XOR R9D,R9D CALL 0x00158d40 CMP EAX,0x0 JZ 0x001c8fca JMP 0x001c90af LAB_001c8fca: JMP 0x001c8fcc LAB_001c8fcc: MOV RAX,qword ptr [RSP + 0x70] ADD RAX,0x1 MOV qword ptr [RSP + 0x70],RAX JMP 0x001c8f3b LAB_001c8fdf: JMP 0x001c8fe1 LAB_001c8fe1: JMP 0x001c8fe3 LAB_001c8fe3: MOV RAX,qword ptr [RSP + 0x70] CMP RAX,qword ptr [RSP + 0x78] JGE 0x001c90a4 MOV RDI,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] LEA R8,[RSP + 0x80] CALL 0x001868e0 MOV dword ptr [RSP + 0x2c],EAX CMP dword ptr [RSP + 0x2c],0x0 JGE 0x001c902d JMP 0x001c90e8 LAB_001c902d: CMP dword ptr [RSP + 0x2c],0x0 JZ 0x001c908f MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00120410 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x80] MOV R8,qword ptr [RSP + 0x88] XOR R9D,R9D CALL 0x00158d40 CMP EAX,0x0 JZ 0x001c908d JMP 0x001c90af LAB_001c908d: JMP 0x001c908f LAB_001c908f: JMP 0x001c9091 LAB_001c9091: MOV RAX,qword ptr [RSP + 0x70] ADD RAX,0x1 MOV qword ptr [RSP + 0x70],RAX JMP 0x001c8fe3 LAB_001c90a4: JMP 0x001c90a6 LAB_001c90a6: MOV qword ptr [RSP + 0x70],-0x1 LAB_001c90af: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0x70] CALL 0x001361c0 MOV qword ptr [RSP + 0xc8],RAX MOV qword ptr [RSP + 0xd0],RDX JMP 0x001c911c LAB_001c90e8: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x001229d0 MOV dword ptr [RSP + 0xc8],0x0 MOV qword ptr [RSP + 0xd0],0x6 LAB_001c911c: MOV RAX,qword ptr [RSP + 0xc8] MOV RDX,qword ptr [RSP + 0xd0] ADD RSP,0xd8 RET
int1 [16] js_array_indexOf(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int8 uVar1; int iVar2; int8 *puVar3; int1 auVar4 [16]; int1 auVar5 [16]; uint local_74; long local_70; long local_68; long local_60; int8 local_58; int8 local_50; 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; local_48 = JS_ToObject(param_1,param_2,param_3); iVar2 = js_get_length64(local_28,&local_60,local_48._0_8_,local_48._8_8_); if (iVar2 == 0) { if (0 < local_60) { local_68 = 0; if (1 < local_2c) { iVar2 = JS_ToInt64Clamp(local_28,&local_68,local_38[2],local_38[3],0,local_60,local_60); if (iVar2 != 0) goto LAB_001c90e8; } iVar2 = js_get_fast_array(local_28,local_48._0_8_,local_48._8_8_,&local_70,&local_74); if (iVar2 != 0) { for (; uVar1 = local_28, local_68 < (long)(ulong)local_74; local_68 = local_68 + 1) { auVar4 = js_dup(*local_38,local_38[1]); puVar3 = (int8 *)(local_70 + local_68 * 0x10); auVar5 = js_dup(*puVar3,puVar3[1]); iVar2 = js_strict_eq2(uVar1,auVar4._0_8_,auVar4._8_8_,auVar5._0_8_,auVar5._8_8_,0); if (iVar2 != 0) goto LAB_001c90af; } } while( true ) { if (local_60 <= local_68) break; iVar2 = JS_TryGetPropertyInt64(local_28,local_48._0_8_,local_48._8_8_,local_68,&local_58); uVar1 = local_28; if (iVar2 < 0) goto LAB_001c90e8; if (iVar2 != 0) { auVar4 = js_dup(*local_38,local_38[1]); iVar2 = js_strict_eq2(uVar1,auVar4._0_8_,auVar4._8_8_,local_58,local_50,0); if (iVar2 != 0) goto LAB_001c90af; } local_68 = local_68 + 1; } } local_68 = -1; LAB_001c90af: JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_); auVar4 = js_int64(local_68); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } else { LAB_001c90e8: JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_); local_10 = 0; local_8 = 6; } auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
49,519
js_array_indexOf
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_indexOf(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, val; int64_t len, n; JSValue *arrp; uint32_t count; obj = JS_ToObject(ctx, this_val); if (js_get_length64(ctx, &len, obj)) goto exception; if (len > 0) { n = 0; if (argc > 1) { if (JS_ToInt64Clamp(ctx, &n, argv[1], 0, len, len)) goto exception; } if (js_get_fast_array(ctx, obj, &arrp, &count)) { for (; n < count; n++) { if (js_strict_eq2(ctx, js_dup(argv[0]), js_dup(arrp[n]), JS_EQ_STRICT)) { goto done; } } } for (; n < len; n++) { int present = JS_TryGetPropertyInt64(ctx, obj, n, &val); if (present < 0) goto exception; if (present) { if (js_strict_eq2(ctx, js_dup(argv[0]), val, JS_EQ_STRICT)) { goto done; } } } } n = -1; done: JS_FreeValue(ctx, obj); return js_int64(n); exception: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O3
c
js_array_indexOf: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r12 movl %ecx, %ebp movq %rdi, %r15 callq 0x268d8 movq %rax, %r14 movq %rdx, %rbx leaq 0x20(%rsp), %rsi movq %r15, %rdi movq %rax, %rdx movq %rbx, %rcx callq 0x226df testl %eax, %eax je 0x77869 movl $0x6, %r12d cmpl $-0x9, %ebx jb 0x77860 movq 0x18(%r15), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x77860 movq %r14, %rsi movq %rbx, %rdx callq 0x20d90 xorl %eax, %eax xorl %ecx, %ecx jmp 0x779ff movq 0x20(%rsp), %rax movq $-0x1, %r13 movq %rax, 0x10(%rsp) testq %rax, %rax jle 0x779ac movq $0x0, 0x8(%rsp) cmpl $0x2, %ebp jl 0x778b8 movq 0x10(%r12), %rdx movq 0x18(%r12), %rcx movq 0x10(%rsp), %r9 movq %r9, (%rsp) leaq 0x8(%rsp), %rsi movq %r15, %rdi xorl %r8d, %r8d callq 0x272da testl %eax, %eax jne 0x77838 cmpl $-0x1, %ebx jne 0x77948 cmpw $0x2, 0x6(%r14) jne 0x77948 testb $0x8, 0x5(%r14) je 0x77948 movl 0x40(%r14), %eax movq 0x8(%rsp), %rbp movq %rax, 0x18(%rsp) cmpq %rax, %rbp jge 0x77943 movq 0x38(%r14), %rax movq %rbp, %rcx shlq $0x4, %rcx leaq (%rcx,%rax), %r13 addq $0x8, %r13 movq (%r12), %rsi movq 0x8(%r12), %rdx cmpl $-0x9, %edx jb 0x77906 incl (%rsi) movq -0x8(%r13), %rcx movq (%r13), %r8 cmpl $-0x9, %r8d jb 0x77916 incl (%rcx) movq %r15, %rdi xorl %r9d, %r9d callq 0x3a9f9 testl %eax, %eax jne 0x779a9 incq %rbp addq $0x10, %r13 cmpq %rbp, 0x18(%rsp) jne 0x778f6 movq 0x18(%rsp), %rbp movq $-0x1, %r13 movq %rbp, 0x8(%rsp) movq 0x8(%rsp), %rbp cmpq 0x10(%rsp), %rbp jge 0x779ac movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq %rbp, %rcx leaq 0x28(%rsp), %r8 callq 0x4e98a testl %eax, %eax js 0x77838 je 0x7799d movq (%r12), %rsi movq 0x8(%r12), %rdx cmpl $-0x9, %edx jb 0x77984 incl (%rsi) movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movq %r15, %rdi xorl %r9d, %r9d callq 0x3a9f9 testl %eax, %eax jne 0x779a9 incq %rbp cmpq %rbp, 0x10(%rsp) jne 0x77954 jmp 0x779ac movq %rbp, %r13 cmpl $-0x9, %ebx jb 0x779ce movq 0x18(%r15), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x779ce movq %r14, %rsi movq %rbx, %rdx callq 0x20d90 movslq %r13d, %rax xorl %ecx, %ecx cmpq %r13, %rax cvtsi2sd %r13, %xmm0 movl %eax, %eax movq %xmm0, %rdx cmoveq %rax, %rdx movl $0x7, %r12d cmoveq %rcx, %r12 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rdx, %rcx movl %edx, %eax orq %rcx, %rax movq %r12, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_array_indexOf: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, r8 mov ebp, ecx mov r15, rdi call JS_ToObject mov r14, rax mov rbx, rdx lea rsi, [rsp+68h+var_48] mov rdi, r15 mov rdx, rax mov rcx, rbx call js_get_length64 test eax, eax jz short loc_77869 loc_77838: mov r12d, 6 cmp ebx, 0FFFFFFF7h jb short loc_77860 mov rdi, [r15+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_77860 mov rsi, r14 mov rdx, rbx call js_free_value_rt loc_77860: xor eax, eax xor ecx, ecx jmp loc_779FF loc_77869: mov rax, [rsp+68h+var_48] mov r13, 0FFFFFFFFFFFFFFFFh mov [rsp+68h+var_58], rax test rax, rax jle loc_779AC mov [rsp+68h+var_60], 0 cmp ebp, 2 jl short loc_778B8 mov rdx, [r12+10h] mov rcx, [r12+18h] mov r9, [rsp+68h+var_58] mov [rsp+68h+var_68], r9 lea rsi, [rsp+68h+var_60] mov rdi, r15 xor r8d, r8d call JS_ToInt64Clamp test eax, eax jnz short loc_77838 loc_778B8: cmp ebx, 0FFFFFFFFh jnz loc_77948 cmp word ptr [r14+6], 2 jnz short loc_77948 test byte ptr [r14+5], 8 jz short loc_77948 mov eax, [r14+40h] mov rbp, [rsp+68h+var_60] mov [rsp+68h+var_50], rax cmp rbp, rax jge short loc_77943 mov rax, [r14+38h] mov rcx, rbp shl rcx, 4 lea r13, [rcx+rax] add r13, 8 loc_778F6: mov rsi, [r12] mov rdx, [r12+8] cmp edx, 0FFFFFFF7h jb short loc_77906 inc dword ptr [rsi] loc_77906: mov rcx, [r13-8] mov r8, [r13+0] cmp r8d, 0FFFFFFF7h jb short loc_77916 inc dword ptr [rcx] loc_77916: mov rdi, r15 xor r9d, r9d call js_strict_eq2 test eax, eax jnz loc_779A9 inc rbp add r13, 10h cmp [rsp+68h+var_50], rbp jnz short loc_778F6 mov rbp, [rsp+68h+var_50] mov r13, 0FFFFFFFFFFFFFFFFh loc_77943: mov [rsp+68h+var_60], rbp loc_77948: mov rbp, [rsp+68h+var_60] cmp rbp, [rsp+68h+var_58] jge short loc_779AC loc_77954: mov rdi, r15 mov rsi, r14 mov rdx, rbx mov rcx, rbp lea r8, [rsp+68h+var_40] call JS_TryGetPropertyInt64 test eax, eax js loc_77838 jz short loc_7799D mov rsi, [r12] mov rdx, [r12+8] cmp edx, 0FFFFFFF7h jb short loc_77984 inc dword ptr [rsi] loc_77984: mov rcx, [rsp+68h+var_40] mov r8, [rsp+68h+var_38] mov rdi, r15 xor r9d, r9d call js_strict_eq2 test eax, eax jnz short loc_779A9 loc_7799D: inc rbp cmp [rsp+68h+var_58], rbp jnz short loc_77954 jmp short loc_779AC loc_779A9: mov r13, rbp loc_779AC: cmp ebx, 0FFFFFFF7h jb short loc_779CE mov rdi, [r15+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_779CE mov rsi, r14 mov rdx, rbx call js_free_value_rt loc_779CE: movsxd rax, r13d xor ecx, ecx cmp rax, r13 cvtsi2sd xmm0, r13 mov eax, eax movq rdx, xmm0 cmovz rdx, rax mov r12d, 7 cmovz r12, rcx mov rcx, 0FFFFFFFF00000000h and rcx, rdx mov eax, edx loc_779FF: or rax, rcx mov rdx, r12 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_array_indexOf( 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) { int v15; // ebp long long v16; // r14 long long v17; // rdx long long v18; // rbx long long v19; // r8 long long v20; // r9 long long v21; // rdi int v22; // eax long long v23; // rcx long long v24; // rax unsigned long long v25; // rcx long long v26; // r13 unsigned long long v27; // rbp long long *v28; // r13 int *v29; // rsi long long v30; // rdx int *v31; // rcx long long v32; // r8 int PropertyInt64; // eax int *v34; // rsi long long v35; // rdx long long v36; // rdi int v37; // eax long long v38; // rcx double v39; // rdx long long v41; // [rsp+8h] [rbp-60h] BYREF long long v42; // [rsp+10h] [rbp-58h] signed long long v43; // [rsp+18h] [rbp-50h] long long v44; // [rsp+20h] [rbp-48h] BYREF int *v45[8]; // [rsp+28h] [rbp-40h] BYREF v15 = a4; v16 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v18 = v17; if ( (unsigned int)js_get_length64(a1, &v44, v16, v17) ) goto LABEL_2; v26 = -1LL; v42 = v44; if ( v44 > 0 ) { v41 = 0LL; if ( v15 >= 2 && (unsigned int)JS_ToInt64Clamp( a1, (unsigned long long *)&v41, *(_DWORD **)(a5 + 16), *(_QWORD *)(a5 + 24), 0LL, v42, v42) ) { LABEL_2: if ( (unsigned int)v18 >= 0xFFFFFFF7 ) { v21 = *(_QWORD *)(a1 + 24); v22 = *(_DWORD *)v16; v23 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v23; if ( v22 <= 1 ) js_free_value_rt(v21, (_QWORD *)v16, v18, v23, v19, v20); } v24 = 0LL; v25 = 0LL; return v25 | v24; } if ( (_DWORD)v18 == -1 && *(_WORD *)(v16 + 6) == 2 && (*(_BYTE *)(v16 + 5) & 8) != 0 ) { v27 = v41; v43 = *(unsigned int *)(v16 + 64); if ( v41 < v43 ) { v28 = (long long *)(16 * v41 + *(_QWORD *)(v16 + 56) + 8); while ( 1 ) { v29 = *(int **)a5; v30 = *(_QWORD *)(a5 + 8); if ( (unsigned int)v30 >= 0xFFFFFFF7 ) ++*v29; v31 = (int *)*(v28 - 1); v32 = *v28; if ( (unsigned int)*v28 >= 0xFFFFFFF7 ) ++*v31; if ( js_strict_eq2(a1, v29, v30, v31, v32, 0LL, *(double *)a7.m128_u64, (__m128d)a8) ) break; ++v27; v28 += 2; if ( v43 == v27 ) { v27 = v43; v26 = -1LL; goto LABEL_21; } } LABEL_30: v26 = v27; goto LABEL_31; } LABEL_21: v41 = v27; } v27 = v41; if ( v41 < v42 ) { do { PropertyInt64 = JS_TryGetPropertyInt64(a1, v16, v18, v27, (long long)v45); if ( PropertyInt64 < 0 ) goto LABEL_2; if ( PropertyInt64 ) { v34 = *(int **)a5; v35 = *(_QWORD *)(a5 + 8); if ( (unsigned int)v35 >= 0xFFFFFFF7 ) ++*v34; if ( js_strict_eq2(a1, v34, v35, v45[0], (long long)v45[1], 0LL, *(double *)a7.m128_u64, (__m128d)a8) ) goto LABEL_30; } } while ( v42 != ++v27 ); } } LABEL_31: if ( (unsigned int)v18 >= 0xFFFFFFF7 ) { v36 = *(_QWORD *)(a1 + 24); v37 = *(_DWORD *)v16; v38 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v38; if ( v37 <= 1 ) js_free_value_rt(v36, (_QWORD *)v16, v18, v38, v19, v20); } v39 = (double)(int)v26; if ( (int)v26 == v26 ) *(_QWORD *)&v39 = (unsigned int)v26; v25 = *(_QWORD *)&v39 & 0xFFFFFFFF00000000LL; v24 = LODWORD(v39); return v25 | v24; }
js_array_indexOf: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,R8 MOV EBP,ECX MOV R15,RDI CALL 0x001268d8 MOV R14,RAX MOV RBX,RDX LEA RSI,[RSP + 0x20] MOV RDI,R15 MOV RDX,RAX MOV RCX,RBX CALL 0x001226df TEST EAX,EAX JZ 0x00177869 LAB_00177838: MOV R12D,0x6 CMP EBX,-0x9 JC 0x00177860 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x00177860 MOV RSI,R14 MOV RDX,RBX CALL 0x00120d90 LAB_00177860: XOR EAX,EAX XOR ECX,ECX JMP 0x001779ff LAB_00177869: MOV RAX,qword ptr [RSP + 0x20] MOV R13,-0x1 MOV qword ptr [RSP + 0x10],RAX TEST RAX,RAX JLE 0x001779ac MOV qword ptr [RSP + 0x8],0x0 CMP EBP,0x2 JL 0x001778b8 MOV RDX,qword ptr [R12 + 0x10] MOV RCX,qword ptr [R12 + 0x18] MOV R9,qword ptr [RSP + 0x10] MOV qword ptr [RSP],R9 LEA RSI,[RSP + 0x8] MOV RDI,R15 XOR R8D,R8D CALL 0x001272da TEST EAX,EAX JNZ 0x00177838 LAB_001778b8: CMP EBX,-0x1 JNZ 0x00177948 CMP word ptr [R14 + 0x6],0x2 JNZ 0x00177948 TEST byte ptr [R14 + 0x5],0x8 JZ 0x00177948 MOV EAX,dword ptr [R14 + 0x40] MOV RBP,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX CMP RBP,RAX JGE 0x00177943 MOV RAX,qword ptr [R14 + 0x38] MOV RCX,RBP SHL RCX,0x4 LEA R13,[RCX + RAX*0x1] ADD R13,0x8 LAB_001778f6: MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] CMP EDX,-0x9 JC 0x00177906 INC dword ptr [RSI] LAB_00177906: MOV RCX,qword ptr [R13 + -0x8] MOV R8,qword ptr [R13] CMP R8D,-0x9 JC 0x00177916 INC dword ptr [RCX] LAB_00177916: MOV RDI,R15 XOR R9D,R9D CALL 0x0013a9f9 TEST EAX,EAX JNZ 0x001779a9 INC RBP ADD R13,0x10 CMP qword ptr [RSP + 0x18],RBP JNZ 0x001778f6 MOV RBP,qword ptr [RSP + 0x18] MOV R13,-0x1 LAB_00177943: MOV qword ptr [RSP + 0x8],RBP LAB_00177948: MOV RBP,qword ptr [RSP + 0x8] CMP RBP,qword ptr [RSP + 0x10] JGE 0x001779ac LAB_00177954: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX MOV RCX,RBP LEA R8,[RSP + 0x28] CALL 0x0014e98a TEST EAX,EAX JS 0x00177838 JZ 0x0017799d MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] CMP EDX,-0x9 JC 0x00177984 INC dword ptr [RSI] LAB_00177984: MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] MOV RDI,R15 XOR R9D,R9D CALL 0x0013a9f9 TEST EAX,EAX JNZ 0x001779a9 LAB_0017799d: INC RBP CMP qword ptr [RSP + 0x10],RBP JNZ 0x00177954 JMP 0x001779ac LAB_001779a9: MOV R13,RBP LAB_001779ac: CMP EBX,-0x9 JC 0x001779ce MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x001779ce MOV RSI,R14 MOV RDX,RBX CALL 0x00120d90 LAB_001779ce: MOVSXD RAX,R13D XOR ECX,ECX CMP RAX,R13 CVTSI2SD XMM0,R13 MOV EAX,EAX MOVQ RDX,XMM0 CMOVZ RDX,RAX MOV R12D,0x7 CMOVZ R12,RCX MOV RCX,-0x100000000 AND RCX,RDX MOV EAX,EDX LAB_001779ff: OR RAX,RCX MOV RDX,R12 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_array_indexOf(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5) { int8 uVar1; int *piVar2; int iVar3; int *piVar4; double dVar6; uint uVar7; ulong uVar8; ulong uVar9; int8 uVar10; int8 *puVar11; bool bVar12; int1 auVar13 [16]; ulong local_60; ulong local_58; ulong local_50; ulong local_48; int8 local_40; int8 local_38; int8 uVar5; auVar13 = JS_ToObject(); uVar5 = auVar13._8_8_; piVar4 = auVar13._0_8_; iVar3 = js_get_length64(param_1,&local_48,piVar4,uVar5); uVar7 = auVar13._8_4_; if (iVar3 == 0) { local_58 = local_48; uVar8 = 0xffffffffffffffff; if (0 < (long)local_48) { local_60 = 0; if ((1 < param_4) && (iVar3 = JS_ToInt64Clamp(param_1,&local_60,param_5[2],param_5[3],0,local_48,local_48), iVar3 != 0)) goto LAB_00177838; uVar9 = local_60; if ((uVar7 == 0xffffffff) && (((*(short *)((long)piVar4 + 6) == 2 && ((*(byte *)((long)piVar4 + 5) & 8) != 0)) && (local_50 = (ulong)(uint)piVar4[0x10], (long)local_60 < (long)local_50)))) { puVar11 = (int8 *)(local_60 * 0x10 + *(long *)(piVar4 + 0xe) + 8); uVar8 = local_60; do { if (0xfffffff6 < (uint)param_5[1]) { *(int *)*param_5 = *(int *)*param_5 + 1; } if (0xfffffff6 < (uint)*puVar11) { *(int *)puVar11[-1] = *(int *)puVar11[-1] + 1; } iVar3 = js_strict_eq2(param_1); if (iVar3 != 0) goto LAB_001779ac; uVar8 = uVar8 + 1; puVar11 = puVar11 + 2; uVar9 = local_50; } while (local_50 != uVar8); } local_60 = uVar9; uVar9 = local_60; uVar8 = 0xffffffffffffffff; if ((long)local_60 < (long)local_58) { do { iVar3 = JS_TryGetPropertyInt64(param_1,piVar4,uVar5,uVar9,&local_40); if (iVar3 < 0) goto LAB_00177838; if (iVar3 != 0) { piVar2 = (int *)*param_5; uVar10 = param_5[1]; if (0xfffffff6 < (uint)uVar10) { *piVar2 = *piVar2 + 1; } iVar3 = js_strict_eq2(param_1,piVar2,uVar10,local_40,local_38,0); uVar8 = uVar9; if (iVar3 != 0) break; } uVar9 = uVar9 + 1; uVar8 = 0xffffffffffffffff; } while (local_58 != uVar9); } } LAB_001779ac: if (0xfffffff6 < uVar7) { uVar10 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar4; *piVar4 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar10,piVar4,uVar5); } } bVar12 = (long)(int)uVar8 == uVar8; dVar6 = (double)(long)uVar8; if (bVar12) { dVar6 = (double)(uVar8 & 0xffffffff); } uVar10 = 7; if (bVar12) { uVar10 = 0; } uVar9 = (ulong)dVar6 & 0xffffffff00000000; uVar8 = (ulong)dVar6 & 0xffffffff; } else { LAB_00177838: uVar10 = 6; if (0xfffffff6 < uVar7) { uVar1 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar4; *piVar4 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar1,piVar4,uVar5); } } uVar8 = 0; uVar9 = 0; } auVar13._0_8_ = uVar8 | uVar9; auVar13._8_8_ = uVar10; return auVar13; }
49,520
testing::internal::DeathTestThreadWarning[abi:cxx11](unsigned long)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
static std::string DeathTestThreadWarning(size_t thread_count) { Message msg; msg << "Death tests use fork(), which is unsafe particularly" << " in a threaded context. For this test, " << GTEST_NAME_ << " "; if (thread_count == 0) { msg << "couldn't detect the number of threads."; } else { msg << "detected " << thread_count << " threads."; } msg << " See " "https://github.com/google/googletest/blob/main/docs/" "advanced.md#death-tests-and-threads" << " for more explanation and suggested solutions, especially if" << " this is the last message you see before your test times out."; return msg.GetString(); }
O0
cpp
testing::internal::DeathTestThreadWarning[abi:cxx11](unsigned long): subq $0x78, %rsp movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) leaq 0x60(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0x101550 movq 0x40(%rsp), %rdi leaq 0x6217c(%rip), %rsi # 0x156842 callq 0x12e090 movq %rax, 0x48(%rsp) jmp 0xf46d2 movq 0x48(%rsp), %rdi leaq 0x62199(%rip), %rsi # 0x156877 callq 0x12e0d0 movq %rax, 0x28(%rsp) jmp 0xf46ea movq 0x28(%rsp), %rdi leaq 0x61781(%rip), %rsi # 0x155e77 callq 0x54d20 movq %rax, 0x20(%rsp) jmp 0xf4702 movq 0x20(%rsp), %rdi leaq 0x61115(%rip), %rsi # 0x155823 callq 0x1238f0 jmp 0xf4715 cmpq $0x0, 0x68(%rsp) jne 0xf474f leaq 0x6217b(%rip), %rsi # 0x15689f leaq 0x60(%rsp), %rdi callq 0x128950 jmp 0xf4730 jmp 0xf4792 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x60(%rsp), %rdi callq 0x1e140 jmp 0xf47f8 leaq 0x62170(%rip), %rsi # 0x1568c6 leaq 0x60(%rsp), %rdi callq 0x124f90 movq %rax, 0x18(%rsp) jmp 0xf4767 movq 0x18(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x12e110 movq %rax, 0x10(%rsp) jmp 0xf477d movq 0x10(%rsp), %rdi leaq 0x62133(%rip), %rsi # 0x1568bc callq 0x124f90 jmp 0xf4790 jmp 0xf4792 leaq 0x62137(%rip), %rsi # 0x1568d0 leaq 0x60(%rsp), %rdi callq 0x12e150 movq %rax, 0x8(%rsp) jmp 0xf47aa movq 0x8(%rsp), %rdi leaq 0x62177(%rip), %rsi # 0x15692d callq 0x12e190 movq %rax, (%rsp) jmp 0xf47c1 movq (%rsp), %rdi leaq 0x6219e(%rip), %rsi # 0x15696a callq 0x128990 jmp 0xf47d3 movq 0x30(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0xf3560 jmp 0xf47e4 leaq 0x60(%rsp), %rdi callq 0x1e140 movq 0x38(%rsp), %rax addq $0x78, %rsp retq movq 0x58(%rsp), %rdi callq 0x15dd0 nopw %cs:(%rax,%rax)
_ZN7testing8internalL22DeathTestThreadWarningB5cxx11Em: sub rsp, 78h mov qword ptr [rsp+78h+var_48], rdi mov rax, rdi mov [rsp+78h+var_40], rax mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi lea rdi, [rsp+78h+var_18]; this mov [rsp+78h+var_38], rdi call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rdi, [rsp+78h+var_38] lea rsi, aDeathTestsUseF; "Death tests use fork(), which is unsafe"... call _ZN7testing7MessagelsIA53_cEERS0_RKT_; testing::Message::operator<<<char [53]>(char [53] const&) mov [rsp+78h+var_30], rax jmp short $+2 loc_F46D2: mov rdi, [rsp+78h+var_30] lea rsi, aInAThreadedCon; " in a threaded context. For this test, " call _ZN7testing7MessagelsIA40_cEERS0_RKT_; testing::Message::operator<<<char [40]>(char [40] const&) mov [rsp+78h+var_50], rax jmp short $+2 loc_F46EA: mov rdi, [rsp+78h+var_50] lea rsi, aGoogleTest; "Google Test" call _ZN7testing7MessagelsIA12_cEERS0_RKT_; testing::Message::operator<<<char [12]>(char [12] const&) mov [rsp+78h+var_58], rax jmp short $+2 loc_F4702: mov rdi, [rsp+78h+var_58] lea rsi, asc_155821+2; " " call _ZN7testing7MessagelsIA2_cEERS0_RKT_; testing::Message::operator<<<char [2]>(char [2] const&) jmp short $+2 loc_F4715: cmp [rsp+78h+var_10], 0 jnz short loc_F474F lea rsi, aCouldnTDetectT; "couldn't detect the number of threads." lea rdi, [rsp+78h+var_18] call _ZN7testing7MessagelsIA39_cEERS0_RKT_; testing::Message::operator<<<char [39]>(char [39] const&) jmp short $+2 loc_F4730: jmp short loc_F4792 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_58]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp loc_F47F8 loc_F474F: lea rsi, aDetected; "detected " lea rdi, [rsp+78h+var_18] call _ZN7testing7MessagelsIA10_cEERS0_RKT_; testing::Message::operator<<<char [10]>(char [10] const&) mov [rsp+78h+var_60], rax jmp short $+2 loc_F4767: mov rdi, [rsp+78h+var_60] lea rsi, [rsp+78h+var_10] call _ZN7testing7MessagelsImEERS0_RKT_; testing::Message::operator<<<ulong>(ulong const&) mov [rsp+78h+var_68], rax jmp short $+2 loc_F477D: mov rdi, [rsp+78h+var_68] lea rsi, aCouldnTDetectT+1Dh; " threads." call _ZN7testing7MessagelsIA10_cEERS0_RKT_; testing::Message::operator<<<char [10]>(char [10] const&) jmp short $+2 loc_F4790: jmp short $+2 loc_F4792: lea rsi, aSeeHttpsGithub; " See https://github.com/google/googlete"... lea rdi, [rsp+78h+var_18] call _ZN7testing7MessagelsIA93_cEERS0_RKT_; testing::Message::operator<<<char [93]>(char [93] const&) mov [rsp+78h+var_70], rax jmp short $+2 loc_F47AA: mov rdi, [rsp+78h+var_70] lea rsi, aForMoreExplana; " for more explanation and suggested sol"... call _ZN7testing7MessagelsIA61_cEERS0_RKT_; testing::Message::operator<<<char [61]>(char [61] const&) mov [rsp+78h+var_78], rax jmp short $+2 loc_F47C1: mov rdi, [rsp+78h+var_78] lea rsi, aThisIsTheLastM; " this is the last message you see befor"... call _ZN7testing7MessagelsIA62_cEERS0_RKT_; testing::Message::operator<<<char [62]>(char [62] const&) jmp short $+2 loc_F47D3: mov rdi, qword ptr [rsp+78h+var_48]; int lea rsi, [rsp+78h+var_18]; int call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void) jmp short $+2 loc_F47E4: lea rdi, [rsp+78h+var_18]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() mov rax, [rsp+78h+var_40] add rsp, 78h retn loc_F47F8: mov rdi, [rsp+arg_50] call __Unwind_Resume
long long testing::internal::DeathTestThreadWarning[abi:cxx11](long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-78h] long long v4; // [rsp+8h] [rbp-70h] long long v5; // [rsp+10h] [rbp-68h] long long v6; // [rsp+18h] [rbp-60h] long long v7; // [rsp+20h] [rbp-58h] long long v8; // [rsp+28h] [rbp-50h] long long v9; // [rsp+48h] [rbp-30h] int v10; // [rsp+60h] [rbp-18h] BYREF _QWORD v11[2]; // [rsp+68h] [rbp-10h] BYREF v11[1] = a1; v11[0] = a2; testing::Message::Message((testing::Message *)&v10); v9 = testing::Message::operator<<<char [53]>(&v10, "Death tests use fork(), which is unsafe particularly"); v8 = testing::Message::operator<<<char [40]>(v9, " in a threaded context. For this test, "); v7 = testing::Message::operator<<<char [12]>(v8, (long long)"Google Test"); testing::Message::operator<<<char [2]>(v7, " "); if ( v11[0] ) { v6 = testing::Message::operator<<<char [10]>(&v10, "detected "); v5 = testing::Message::operator<<<unsigned long>(v6, v11); testing::Message::operator<<<char [10]>(v5, " threads."); } else { testing::Message::operator<<<char [39]>(&v10, "couldn't detect the number of threads."); } v4 = testing::Message::operator<<<char [93]>( &v10, " See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads"); v3 = testing::Message::operator<<<char [61]>(v4, " for more explanation and suggested solutions, especially if"); testing::Message::operator<<<char [62]>(v3, " this is the last message you see before your test times out."); testing::Message::GetString[abi:cxx11](a1, (int)&v10); testing::Message::~Message((testing::Message *)&v10); return a1; }
DeathTestThreadWarning[abi:cxx11]: SUB RSP,0x78 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI LEA RDI,[RSP + 0x60] MOV qword ptr [RSP + 0x40],RDI CALL 0x00201550 MOV RDI,qword ptr [RSP + 0x40] LAB_001f46bf: LEA RSI,[0x256842] CALL 0x0022e090 MOV qword ptr [RSP + 0x48],RAX JMP 0x001f46d2 LAB_001f46d2: MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[0x256877] CALL 0x0022e0d0 MOV qword ptr [RSP + 0x28],RAX JMP 0x001f46ea LAB_001f46ea: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[0x255e77] CALL 0x00154d20 MOV qword ptr [RSP + 0x20],RAX JMP 0x001f4702 LAB_001f4702: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x255823] CALL 0x002238f0 JMP 0x001f4715 LAB_001f4715: CMP qword ptr [RSP + 0x68],0x0 JNZ 0x001f474f LEA RSI,[0x25689f] LEA RDI,[RSP + 0x60] CALL 0x00228950 JMP 0x001f4730 LAB_001f4730: JMP 0x001f4792 LAB_001f474f: LEA RSI,[0x2568c6] LEA RDI,[RSP + 0x60] CALL 0x00224f90 MOV qword ptr [RSP + 0x18],RAX JMP 0x001f4767 LAB_001f4767: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x68] CALL 0x0022e110 MOV qword ptr [RSP + 0x10],RAX JMP 0x001f477d LAB_001f477d: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[0x2568bc] CALL 0x00224f90 JMP 0x001f4790 LAB_001f4790: JMP 0x001f4792 LAB_001f4792: LEA RSI,[0x2568d0] LEA RDI,[RSP + 0x60] CALL 0x0022e150 MOV qword ptr [RSP + 0x8],RAX JMP 0x001f47aa LAB_001f47aa: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x25692d] CALL 0x0022e190 MOV qword ptr [RSP],RAX JMP 0x001f47c1 LAB_001f47c1: MOV RDI,qword ptr [RSP] LEA RSI,[0x25696a] CALL 0x00228990 JMP 0x001f47d3 LAB_001f47d3: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x60] CALL 0x001f3560 LAB_001f47e2: JMP 0x001f47e4 LAB_001f47e4: LEA RDI,[RSP + 0x60] CALL 0x0011e140 MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x78 RET
/* testing::internal::DeathTestThreadWarning[abi:cxx11](unsigned long) */ internal * __thiscall testing::internal::DeathTestThreadWarning_abi_cxx11_(internal *this,ulong param_1) { Message *pMVar1; Message local_18 [8]; ulong local_10; internal *local_8; local_10 = param_1; local_8 = this; Message::Message(local_18); /* try { // try from 001f46bf to 001f47e1 has its CatchHandler @ 001f4732 */ pMVar1 = Message::operator<<(local_18,"Death tests use fork(), which is unsafe particularly"); pMVar1 = Message::operator<<(pMVar1," in a threaded context. For this test, "); pMVar1 = Message::operator<<(pMVar1,"Google Test"); Message::operator<<(pMVar1," "); if (local_10 == 0) { Message::operator<<(local_18,"couldn\'t detect the number of threads."); } else { pMVar1 = Message::operator<<(local_18,"detected "); pMVar1 = Message::operator<<(pMVar1,&local_10); Message::operator<<(pMVar1," threads."); } pMVar1 = Message::operator<<(local_18, " See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads" ); pMVar1 = Message::operator<<(pMVar1," for more explanation and suggested solutions, especially if" ); Message::operator<<(pMVar1," this is the last message you see before your test times out."); Message::GetString_abi_cxx11_(); Message::~Message(local_18); return this; }
49,521
ma_bitmap_flush
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_flush(MARIA_SHARE *share) { my_bool res= 0; DBUG_ENTER("_ma_bitmap_flush"); if (share->bitmap.changed) { mysql_mutex_lock(&share->bitmap.bitmap_lock); if (share->bitmap.changed) { /* We have to mark the file changed here, as otherwise the following 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(share, 1); res= write_changed_bitmap(share, &share->bitmap); share->bitmap.changed= 0; } mysql_mutex_unlock(&share->bitmap.bitmap_lock); } DBUG_RETURN(res); }
O0
c
ma_bitmap_flush: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movb $0x0, -0x9(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0xa30(%rax) je 0x42ef4 movq -0x8(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi leaq 0x10fad8(%rip), %rsi # 0x15296e movl $0x1a9, %edx # imm = 0x1A9 callq 0x42fd0 movq -0x8(%rbp), %rax cmpb $0x0, 0xa30(%rax) je 0x42edd movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0x43040 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0xa10, %rsi # imm = 0xA10 callq 0x43110 movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movb $0x0, 0xa30(%rax) movq -0x8(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x43280 jmp 0x42ef6 movb -0x9(%rbp), %al movb %al, -0xa(%rbp) movb -0xa(%rbp), %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_bitmap_flush: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_9], 0 mov rax, [rbp+var_8] cmp byte ptr [rax+0A30h], 0 jz short loc_42EF4 mov rdi, [rbp+var_8] add rdi, 0A10h add rdi, 88h lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1A9h call inline_mysql_mutex_lock_4 mov rax, [rbp+var_8] cmp byte ptr [rax+0A30h], 0 jz short loc_42EDD mov rdi, [rbp+var_8] mov esi, 1 call _ma_bitmap_mark_file_changed mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] add rsi, 0A10h call write_changed_bitmap mov [rbp+var_9], al mov rax, [rbp+var_8] mov byte ptr [rax+0A30h], 0 loc_42EDD: mov rdi, [rbp+var_8] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_unlock_4 loc_42EF4: jmp short $+2 loc_42EF6: mov al, [rbp+var_9] mov [rbp+var_A], al mov al, [rbp+var_A] add rsp, 10h pop rbp retn
char ma_bitmap_flush(long long a1) { char v2; // [rsp+7h] [rbp-9h] v2 = 0; if ( *(_BYTE *)(a1 + 2608) ) { inline_mysql_mutex_lock_4(a1 + 2712, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 425LL); if ( *(_BYTE *)(a1 + 2608) ) { ma_bitmap_mark_file_changed(a1, 1LL); v2 = write_changed_bitmap(a1, a1 + 2576); *(_BYTE *)(a1 + 2608) = 0; } inline_mysql_mutex_unlock_4(a1 + 2712); } return v2; }
_ma_bitmap_flush: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0xa30],0x0 JZ 0x00142ef4 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xa10 ADD RDI,0x88 LEA RSI,[0x25296e] MOV EDX,0x1a9 CALL 0x00142fd0 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0xa30],0x0 JZ 0x00142edd MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x00143040 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xa10 CALL 0x00143110 MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xa30],0x0 LAB_00142edd: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x00143280 LAB_00142ef4: JMP 0x00142ef6 LAB_00142ef6: MOV AL,byte ptr [RBP + -0x9] MOV byte ptr [RBP + -0xa],AL MOV AL,byte ptr [RBP + -0xa] ADD RSP,0x10 POP RBP RET
int1 _ma_bitmap_flush(long param_1) { int1 local_11; local_11 = 0; if (*(char *)(param_1 + 0xa30) != '\0') { inline_mysql_mutex_lock (param_1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x1a9); if (*(char *)(param_1 + 0xa30) != '\0') { _ma_bitmap_mark_file_changed(param_1,1); local_11 = write_changed_bitmap(param_1,param_1 + 0xa10); *(int1 *)(param_1 + 0xa30) = 0; } inline_mysql_mutex_unlock(param_1 + 0xa98); } return local_11; }
49,522
frobenius_map_fp12
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/fp12_tower.c
static void frobenius_map_fp12(vec384fp12 ret, const vec384fp12 a, size_t n) { static const vec384x coeffs[] = { /* (u + 1)^((P^n - 1) / 6) */ { { TO_LIMB_T(0x07089552b319d465), TO_LIMB_T(0xc6695f92b50a8313), TO_LIMB_T(0x97e83cccd117228f), TO_LIMB_T(0xa35baecab2dc29ee), TO_LIMB_T(0x1ce393ea5daace4d), TO_LIMB_T(0x08f2220fb0fb66eb) }, { TO_LIMB_T(0xb2f66aad4ce5d646), TO_LIMB_T(0x5842a06bfc497cec), TO_LIMB_T(0xcf4895d42599d394), TO_LIMB_T(0xc11b9cba40a8e8d0), TO_LIMB_T(0x2e3813cbe5a0de89), TO_LIMB_T(0x110eefda88847faf) } }, { { TO_LIMB_T(0xecfb361b798dba3a), TO_LIMB_T(0xc100ddb891865a2c), TO_LIMB_T(0x0ec08ff1232bda8e), TO_LIMB_T(0xd5c13cc6f1ca4721), TO_LIMB_T(0x47222a47bf7b5c04), TO_LIMB_T(0x0110f184e51c5f59) } }, { { TO_LIMB_T(0x3e2f585da55c9ad1), TO_LIMB_T(0x4294213d86c18183), TO_LIMB_T(0x382844c88b623732), TO_LIMB_T(0x92ad2afd19103e18), TO_LIMB_T(0x1d794e4fac7cf0b9), TO_LIMB_T(0x0bd592fc7d825ec8) }, { TO_LIMB_T(0x7bcfa7a25aa30fda), TO_LIMB_T(0xdc17dec12a927e7c), TO_LIMB_T(0x2f088dd86b4ebef1), TO_LIMB_T(0xd1ca2087da74d4a7), TO_LIMB_T(0x2da2596696cebc1d), TO_LIMB_T(0x0e2b7eedbbfd87d2) } }, }; frobenius_map_fp6(ret[0], a[0], n); frobenius_map_fp6(ret[1], a[1], n); --n; /* implied ONE_MONT_P at index 0 */ mul_fp2(ret[1][0], ret[1][0], coeffs[n]); mul_fp2(ret[1][1], ret[1][1], coeffs[n]); mul_fp2(ret[1][2], ret[1][2], coeffs[n]); }
O2
c
frobenius_map_fp12: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x5d40c movl $0x120, %eax # imm = 0x120 leaq (%rbx,%rax), %r12 addq %rax, %r15 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x5d40c imulq $0x60, %r14, %rax leaq 0x2b10b(%rip), %rcx # 0x815a0 leaq (%rax,%rcx), %r14 addq $-0x60, %r14 movq %r12, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x5ad73 leaq 0x180(%rbx), %rdi movq %rdi, %rsi movq %r14, %rdx callq 0x5ad73 addq $0x1e0, %rbx # imm = 0x1E0 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x5ad73
frobenius_map_fp12: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi call frobenius_map_fp6 mov eax, 120h lea r12, [rbx+rax] add r15, rax mov rdi, r12 mov rsi, r15 mov rdx, r14 call frobenius_map_fp6 imul rax, r14, 60h ; '`' lea rcx, frobenius_map_fp12_coeffs lea r14, [rax+rcx] add r14, 0FFFFFFFFFFFFFFA0h mov rdi, r12 mov rsi, r12 mov rdx, r14 call mul_fp2 lea rdi, [rbx+180h] mov rsi, rdi mov rdx, r14 call mul_fp2 add rbx, 1E0h mov rdi, rbx mov rsi, rbx mov rdx, r14 pop rbx pop r12 pop r14 pop r15 pop rbp jmp mul_fp2
long long frobenius_map_fp12(long long a1, long long a2, long long a3) { char *v5; // r14 ((void (*)(void))frobenius_map_fp6)(); frobenius_map_fp6(a1 + 288, a2 + 288, a3); v5 = (char *)&frobenius_map_fp12_coeffs + 96 * a3 - 96; mul_fp2(a1 + 288, a1 + 288, v5); mul_fp2(a1 + 384, a1 + 384, v5); return mul_fp2(a1 + 480, a1 + 480, v5); }
frobenius_map_fp12: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI CALL 0x0015d40c MOV EAX,0x120 LEA R12,[RBX + RAX*0x1] ADD R15,RAX MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 CALL 0x0015d40c IMUL RAX,R14,0x60 LEA RCX,[0x1815a0] LEA R14,[RAX + RCX*0x1] ADD R14,-0x60 MOV RDI,R12 MOV RSI,R12 MOV RDX,R14 CALL 0x0015ad73 LEA RDI,[RBX + 0x180] MOV RSI,RDI MOV RDX,R14 CALL 0x0015ad73 ADD RBX,0x1e0 MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0015ad73
void frobenius_map_fp12(long param_1,long param_2,long param_3) { long lVar1; long lVar2; frobenius_map_fp6(); lVar1 = param_1 + 0x120; frobenius_map_fp6(lVar1,param_2 + 0x120,param_3); lVar2 = param_3 * 0x60 + 0x181540; mul_fp2(lVar1,lVar1,lVar2); mul_fp2(param_1 + 0x180,param_1 + 0x180,lVar2); mul_fp2(param_1 + 0x1e0,param_1 + 0x1e0,lVar2); return; }
49,523
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::end() const
monkey531[P]llama/common/./json.hpp
iteration_proxy_value<IteratorType> end() const noexcept { return iteration_proxy_value<IteratorType>(container->end()); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::end() const: pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq (%rsi), %rax movq %rax, (%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsp) movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 movq %rcx, 0x18(%rsp) movzbl (%rax), %ecx cmpl $0x2, %ecx je 0x94a5e cmpl $0x1, %ecx jne 0x94a6d movq 0x8(%rax), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) jmp 0x94a76 movq 0x8(%rax), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0x94a76 movq $0x1, 0x18(%rsp) movq %rsp, %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x70d92 movq %rbx, %rax addq $0x20, %rsp popq %rbx retq
_ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3endEv: push rbx sub rsp, 20h mov rbx, rdi mov rax, [rsi] mov [rsp+28h+var_28], rax xorps xmm0, xmm0 movups [rsp+28h+var_20], xmm0 mov rcx, 8000000000000000h mov [rsp+28h+var_10], rcx movzx ecx, byte ptr [rax] cmp ecx, 2 jz short loc_94A5E cmp ecx, 1 jnz short loc_94A6D mov rax, [rax+8] mov rax, [rax+8] mov qword ptr [rsp+28h+var_20], rax jmp short loc_94A76 loc_94A5E: mov rax, [rax+8] mov rax, [rax+8] mov qword ptr [rsp+28h+var_20+8], rax jmp short loc_94A76 loc_94A6D: mov [rsp+28h+var_10], 1 loc_94A76: mov rsi, rsp mov rdi, rbx xor edx, edx call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESH_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,ulong) mov rax, rbx add rsp, 20h pop rbx retn
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end( long long a1, unsigned __int8 **a2) { unsigned __int8 *v2; // rax int v3; // ecx unsigned __int8 *v5; // [rsp+0h] [rbp-28h] BYREF __int128 v6; // [rsp+8h] [rbp-20h] long long v7; // [rsp+18h] [rbp-10h] v2 = *a2; v5 = v2; v6 = 0LL; v7 = 0x8000000000000000LL; v3 = *v2; if ( v3 == 2 ) { *((_QWORD *)&v6 + 1) = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL); } else if ( v3 == 1 ) { *(_QWORD *)&v6 = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL); } else { v7 = 1LL; } nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::iteration_proxy_value( a1, (__int128 *)&v5, 0LL); return a1; }
end: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RAX,qword ptr [RSI] MOV qword ptr [RSP],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV RCX,-0x8000000000000000 MOV qword ptr [RSP + 0x18],RCX MOVZX ECX,byte ptr [RAX] CMP ECX,0x2 JZ 0x00194a5e CMP ECX,0x1 JNZ 0x00194a6d MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX JMP 0x00194a76 LAB_00194a5e: MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x00194a76 LAB_00194a6d: MOV qword ptr [RSP + 0x18],0x1 LAB_00194a76: MOV RSI,RSP MOV RDI,RBX XOR EDX,EDX CALL 0x00170d92 MOV RAX,RBX ADD RSP,0x20 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::end() const */ void nlohmann::json_abi_v3_11_3::detail:: iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::end(void) { iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::iteration_proxy_value(); return; }
49,524
check_and_set_lsn
eloqsql/storage/maria/ma_pagecache.c
static void check_and_set_lsn(PAGECACHE *pagecache, LSN lsn, PAGECACHE_BLOCK_LINK *block) { LSN old; DBUG_ENTER("check_and_set_lsn"); /* In recovery, we can _ma_unpin_all_pages() to put a LSN on page, though page would be PAGECACHE_PLAIN_PAGE (transactionality temporarily disabled to not log REDOs). */ DBUG_ASSERT((block->type == PAGECACHE_LSN_PAGE) || maria_in_recovery); old= lsn_korr(block->buffer); DBUG_PRINT("info", ("old lsn: " LSN_FMT " new lsn: " LSN_FMT, LSN_IN_PARTS(old), LSN_IN_PARTS(lsn))); if (cmp_translog_addr(lsn, old) > 0) { DBUG_ASSERT(block->type != PAGECACHE_READ_UNKNOWN_PAGE); lsn_store(block->buffer, lsn); /* we stored LSN in page so we dirtied it */ if (!(block->status & PCBLOCK_CHANGED)) link_to_changed_list(pagecache, block); } DBUG_VOID_RETURN; }
O3
c
check_and_set_lsn: pushq %rbp movq %rsp, %rbp movq 0x30(%rdx), %rax movzwl (%rax), %ecx shlq $0x20, %rcx movzbl 0x2(%rax), %r8d shlq $0x30, %r8 orq %rcx, %r8 movl 0x3(%rax), %ecx orq %r8, %rcx cmpq %rsi, %rcx jge 0x6e345 movq %rsi, %rcx shrq $0x20, %rcx movb %cl, (%rax) movq %rsi, %rax shrq $0x28, %rax movq 0x30(%rdx), %rcx movb %al, 0x1(%rcx) movq %rsi, %rax shrq $0x30, %rax movq 0x30(%rdx), %rcx movb %al, 0x2(%rcx) movq 0x30(%rdx), %rax movl %esi, 0x3(%rax) testb $0x20, 0x74(%rdx) jne 0x6e345 leaq 0x10(%rdx), %rax movq 0x10(%rdx), %rsi movq 0x18(%rdx), %rcx testq %rsi, %rsi je 0x6e300 movq %rcx, 0x18(%rsi) movq (%rax), %rsi jmp 0x6e302 xorl %esi, %esi movq %rsi, (%rcx) movq 0x128(%rdi), %rcx movq 0x20(%rdx), %rsi movl 0x28(%rdi), %r8d decl %r8d andl 0x28(%rsi), %r8d leaq (%rcx,%r8,8), %rcx movq %rcx, 0x18(%rdx) movq (%rcx), %rsi movq %rsi, 0x10(%rdx) testq %rsi, %rsi je 0x6e333 movq %rax, 0x18(%rsi) movq %rdx, (%rcx) orb $0x20, 0x74(%rdx) incq 0x58(%rdi) incq 0x168(%rdi) popq %rbp retq
check_and_set_lsn: push rbp mov rbp, rsp mov rax, [rdx+30h] movzx ecx, word ptr [rax] shl rcx, 20h movzx r8d, byte ptr [rax+2] shl r8, 30h or r8, rcx mov ecx, [rax+3] or rcx, r8 cmp rcx, rsi jge loc_6E345 mov rcx, rsi shr rcx, 20h mov [rax], cl mov rax, rsi shr rax, 28h mov rcx, [rdx+30h] mov [rcx+1], al mov rax, rsi shr rax, 30h mov rcx, [rdx+30h] mov [rcx+2], al mov rax, [rdx+30h] mov [rax+3], esi test byte ptr [rdx+74h], 20h jnz short loc_6E345 lea rax, [rdx+10h] mov rsi, [rdx+10h] mov rcx, [rdx+18h] test rsi, rsi jz short loc_6E300 mov [rsi+18h], rcx mov rsi, [rax] jmp short loc_6E302 loc_6E300: xor esi, esi loc_6E302: mov [rcx], rsi mov rcx, [rdi+128h] mov rsi, [rdx+20h] mov r8d, [rdi+28h] dec r8d and r8d, [rsi+28h] lea rcx, [rcx+r8*8] mov [rdx+18h], rcx mov rsi, [rcx] mov [rdx+10h], rsi test rsi, rsi jz short loc_6E333 mov [rsi+18h], rax loc_6E333: mov [rcx], rdx or byte ptr [rdx+74h], 20h inc qword ptr [rdi+58h] inc qword ptr [rdi+168h] loc_6E345: pop rbp retn
unsigned __int16 * check_and_set_lsn(long long a1, signed long long a2, long long a3) { unsigned __int16 *result; // rax long long v4; // rsi _QWORD *v5; // rcx long long v6; // rsi long long *v7; // rcx long long v8; // rsi result = *(unsigned __int16 **)(a3 + 48); if ( (long long)(((unsigned long long)*result << 32) | ((unsigned long long)*((unsigned __int8 *)result + 2) << 48) | *(unsigned int *)((char *)result + 3)) < a2 ) { *(_BYTE *)result = BYTE4(a2); *(_BYTE *)(*(_QWORD *)(a3 + 48) + 1LL) = BYTE5(a2); *(_BYTE *)(*(_QWORD *)(a3 + 48) + 2LL) = BYTE6(a2); result = *(unsigned __int16 **)(a3 + 48); *(_DWORD *)((char *)result + 3) = a2; if ( (*(_BYTE *)(a3 + 116) & 0x20) == 0 ) { result = (unsigned __int16 *)(a3 + 16); v4 = *(_QWORD *)(a3 + 16); v5 = *(_QWORD **)(a3 + 24); if ( v4 ) { *(_QWORD *)(v4 + 24) = v5; v6 = *(_QWORD *)result; } else { v6 = 0LL; } *v5 = v6; v7 = (long long *)(*(_QWORD *)(a1 + 296) + 8LL * (*(_DWORD *)(*(_QWORD *)(a3 + 32) + 40LL) & (unsigned int)(*(_DWORD *)(a1 + 40) - 1))); *(_QWORD *)(a3 + 24) = v7; v8 = *v7; *(_QWORD *)(a3 + 16) = *v7; if ( v8 ) *(_QWORD *)(v8 + 24) = result; *v7 = a3; *(_BYTE *)(a3 + 116) |= 0x20u; ++*(_QWORD *)(a1 + 88); ++*(_QWORD *)(a1 + 360); } } return result; }
check_and_set_lsn: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDX + 0x30] MOVZX ECX,word ptr [RAX] SHL RCX,0x20 MOVZX R8D,byte ptr [RAX + 0x2] SHL R8,0x30 OR R8,RCX MOV ECX,dword ptr [RAX + 0x3] OR RCX,R8 CMP RCX,RSI JGE 0x0016e345 MOV RCX,RSI SHR RCX,0x20 MOV byte ptr [RAX],CL MOV RAX,RSI SHR RAX,0x28 MOV RCX,qword ptr [RDX + 0x30] MOV byte ptr [RCX + 0x1],AL MOV RAX,RSI SHR RAX,0x30 MOV RCX,qword ptr [RDX + 0x30] MOV byte ptr [RCX + 0x2],AL MOV RAX,qword ptr [RDX + 0x30] MOV dword ptr [RAX + 0x3],ESI TEST byte ptr [RDX + 0x74],0x20 JNZ 0x0016e345 LEA RAX,[RDX + 0x10] MOV RSI,qword ptr [RDX + 0x10] MOV RCX,qword ptr [RDX + 0x18] TEST RSI,RSI JZ 0x0016e300 MOV qword ptr [RSI + 0x18],RCX MOV RSI,qword ptr [RAX] JMP 0x0016e302 LAB_0016e300: XOR ESI,ESI LAB_0016e302: MOV qword ptr [RCX],RSI MOV RCX,qword ptr [RDI + 0x128] MOV RSI,qword ptr [RDX + 0x20] MOV R8D,dword ptr [RDI + 0x28] DEC R8D AND R8D,dword ptr [RSI + 0x28] LEA RCX,[RCX + R8*0x8] MOV qword ptr [RDX + 0x18],RCX MOV RSI,qword ptr [RCX] MOV qword ptr [RDX + 0x10],RSI TEST RSI,RSI JZ 0x0016e333 MOV qword ptr [RSI + 0x18],RAX LAB_0016e333: MOV qword ptr [RCX],RDX OR byte ptr [RDX + 0x74],0x20 INC qword ptr [RDI + 0x58] INC qword ptr [RDI + 0x168] LAB_0016e345: POP RBP RET
void check_and_set_lsn(long param_1,long param_2,long param_3) { long *plVar1; ushort *puVar2; int8 *puVar3; long lVar4; int8 uVar5; puVar2 = *(ushort **)(param_3 + 0x30); if ((long)((ulong)*(uint *)((long)puVar2 + 3) | (ulong)(byte)puVar2[1] << 0x30 | (ulong)*puVar2 << 0x20) < param_2) { *(char *)puVar2 = (char)((ulong)param_2 >> 0x20); *(char *)(*(long *)(param_3 + 0x30) + 1) = (char)((ulong)param_2 >> 0x28); *(char *)(*(long *)(param_3 + 0x30) + 2) = (char)((ulong)param_2 >> 0x30); *(int *)(*(long *)(param_3 + 0x30) + 3) = (int)param_2; if ((*(byte *)(param_3 + 0x74) & 0x20) == 0) { puVar3 = *(int8 **)(param_3 + 0x18); if (*(long *)(param_3 + 0x10) == 0) { uVar5 = 0; } else { *(int8 **)(*(long *)(param_3 + 0x10) + 0x18) = puVar3; uVar5 = *(int8 *)(param_3 + 0x10); } *puVar3 = uVar5; plVar1 = (long *)(*(long *)(param_1 + 0x128) + (ulong)(*(int *)(param_1 + 0x28) - 1U & *(uint *)(*(long *)(param_3 + 0x20) + 0x28)) * 8); *(long **)(param_3 + 0x18) = plVar1; lVar4 = *plVar1; *(long *)(param_3 + 0x10) = lVar4; if (lVar4 != 0) { *(int8 **)(lVar4 + 0x18) = (int8 *)(param_3 + 0x10); } *plVar1 = param_3; *(byte *)(param_3 + 0x74) = *(byte *)(param_3 + 0x74) | 0x20; *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1; *(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + 1; } } return; }
49,525
TraceLog
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/utils.c
void TraceLog(int logType, const char *text, ...) { #if defined(SUPPORT_TRACELOG) // Message has level below current threshold, don't emit if (logType < logTypeLevel) return; va_list args; va_start(args, text); if (traceLog) { traceLog(logType, text, args); va_end(args); return; } #if defined(PLATFORM_ANDROID) switch (logType) { case LOG_TRACE: __android_log_vprint(ANDROID_LOG_VERBOSE, "raylib", text, args); break; case LOG_DEBUG: __android_log_vprint(ANDROID_LOG_DEBUG, "raylib", text, args); break; case LOG_INFO: __android_log_vprint(ANDROID_LOG_INFO, "raylib", text, args); break; case LOG_WARNING: __android_log_vprint(ANDROID_LOG_WARN, "raylib", text, args); break; case LOG_ERROR: __android_log_vprint(ANDROID_LOG_ERROR, "raylib", text, args); break; case LOG_FATAL: __android_log_vprint(ANDROID_LOG_FATAL, "raylib", text, args); break; default: break; } #else char buffer[MAX_TRACELOG_MSG_LENGTH] = { 0 }; switch (logType) { case LOG_TRACE: strcpy(buffer, "TRACE: "); break; case LOG_DEBUG: strcpy(buffer, "DEBUG: "); break; case LOG_INFO: strcpy(buffer, "INFO: "); break; case LOG_WARNING: strcpy(buffer, "WARNING: "); break; case LOG_ERROR: strcpy(buffer, "ERROR: "); break; case LOG_FATAL: strcpy(buffer, "FATAL: "); break; default: break; } unsigned int textSize = (unsigned int)strlen(text); memcpy(buffer + strlen(buffer), text, (textSize < (MAX_TRACELOG_MSG_LENGTH - 12))? textSize : (MAX_TRACELOG_MSG_LENGTH - 12)); strcat(buffer, "\n"); vprintf(buffer, args); fflush(stdout); #endif va_end(args); if (logType == LOG_FATAL) exit(EXIT_FAILURE); // If fatal logging, exit program #endif // SUPPORT_TRACELOG }
O2
c
TraceLog: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1d8, %rsp # imm = 0x1D8 testb %al, %al je 0xa12dd movaps %xmm0, 0x150(%rsp) movaps %xmm1, 0x160(%rsp) movaps %xmm2, 0x170(%rsp) movaps %xmm3, 0x180(%rsp) movaps %xmm4, 0x190(%rsp) movaps %xmm5, 0x1a0(%rsp) movaps %xmm6, 0x1b0(%rsp) movaps %xmm7, 0x1c0(%rsp) movq %rdx, 0x130(%rsp) movq %rcx, 0x138(%rsp) movq %r8, 0x140(%rsp) movq %r9, 0x148(%rsp) cmpl %edi, 0x818dd(%rip) # 0x122be0 jg 0xa1439 movq %rsi, %r14 movl %edi, %ebx leaq 0x120(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x200(%rsp), %rax movq %rax, 0x8(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rsp) movq 0x8fa43(%rip), %rax # 0x130d80 testq %rax, %rax je 0xa1351 movq %rsp, %rdx movl %ebx, %edi movq %r14, %rsi callq *%rax jmp 0xa1439 leaq 0x20(%rsp), %rdi movl $0x100, %edx # imm = 0x100 xorl %esi, %esi callq 0x92c0 leal -0x1(%rbx), %eax cmpl $0x5, %eax ja 0xa13d7 leaq 0x33baf(%rip), %rcx # 0xd4f20 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movabsq $0x203a4543415254, %rax # imm = 0x203A4543415254 jmp 0xa13d2 movabsq $0x203a524f525245, %rax # imm = 0x203A524F525245 jmp 0xa13d2 movl $0x203a4f, 0x23(%rsp) # imm = 0x203A4F movl $0x4f464e49, 0x20(%rsp) # imm = 0x4F464E49 jmp 0xa13d7 movabsq $0x3a474e494e524157, %rax # imm = 0x3A474E494E524157 movq %rax, 0x20(%rsp) movw $0x20, 0x28(%rsp) jmp 0xa13d7 movabsq $0x203a4755424544, %rax # imm = 0x203A4755424544 jmp 0xa13d2 movabsq $0x203a4c41544146, %rax # imm = 0x203A4C41544146 movq %rax, 0x20(%rsp) movq %r14, %rdi callq 0x9210 movq %rax, %r15 leaq 0x20(%rsp), %r12 movq %r12, %rdi callq 0x9210 leaq (%rsp,%rax), %rdi addq $0x20, %rdi movl $0xf4, %edx cmpl %edx, %r15d cmovbl %r15d, %edx movq %r14, %rsi callq 0x9400 movq %r12, %rdi callq 0x9210 movw $0xa, 0x20(%rsp,%rax) movq %rsp, %rsi movq %r12, %rdi callq 0x9560 movq 0x80b7c(%rip), %rax # 0x121fa8 movq (%rax), %rdi callq 0x9610 cmpl $0x6, %ebx je 0xa1448 addq $0x1d8, %rsp # imm = 0x1D8 popq %rbx popq %r12 popq %r14 popq %r15 retq pushq $0x1 popq %rdi callq 0x9660
TraceLog: push r15 push r14 push r12 push rbx sub rsp, 1D8h test al, al jz short loc_A12DD movaps [rsp+1F8h+var_A8], xmm0 movaps [rsp+1F8h+var_98], xmm1 movaps [rsp+1F8h+var_88], xmm2 movaps [rsp+1F8h+var_78], xmm3 movaps [rsp+1F8h+var_68], xmm4 movaps [rsp+1F8h+var_58], xmm5 movaps [rsp+1F8h+var_48], xmm6 movaps [rsp+1F8h+var_38], xmm7 loc_A12DD: mov [rsp+1F8h+var_C8], rdx mov [rsp+1F8h+var_C0], rcx mov [rsp+1F8h+var_B8], r8 mov [rsp+1F8h+var_B0], r9 cmp cs:logTypeLevel, edi jg loc_A1439 mov r14, rsi mov ebx, edi lea rax, [rsp+1F8h+var_D8] mov [rsp+1F8h+var_1E8], rax lea rax, [rsp+1F8h+arg_0] mov [rsp+1F8h+var_1F0], rax mov rax, 3000000010h mov [rsp+1F8h+var_1F8], rax mov rax, cs:traceLog test rax, rax jz short loc_A1351 mov rdx, rsp mov edi, ebx mov rsi, r14 call rax ; traceLog jmp loc_A1439 loc_A1351: lea rdi, [rsp+1F8h+var_1D8] mov edx, 100h xor esi, esi call _memset lea eax, [rbx-1]; switch 6 cases cmp eax, 5 ja short def_A1378; jumptable 00000000000A1378 default case lea rcx, jpt_A1378 movsxd rax, ds:(jpt_A1378 - 0D4F20h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_A137A: mov rax, 203A4543415254h; jumptable 00000000000A1378 case 1 jmp short loc_A13D2 loc_A1386: mov rax, 203A524F525245h; jumptable 00000000000A1378 case 5 jmp short loc_A13D2 loc_A1392: mov dword ptr [rsp+1F8h+var_1D8+3], 203A4Fh; jumptable 00000000000A1378 case 3 mov dword ptr [rsp+1F8h+var_1D8], 4F464E49h jmp short def_A1378; jumptable 00000000000A1378 default case loc_A13A4: mov rax, 3A474E494E524157h; jumptable 00000000000A1378 case 4 mov [rsp+1F8h+var_1D8], rax mov [rsp+1F8h+var_1D0], 20h ; ' ' jmp short def_A1378; jumptable 00000000000A1378 default case loc_A13BC: mov rax, 203A4755424544h; jumptable 00000000000A1378 case 2 jmp short loc_A13D2 loc_A13C8: mov rax, 203A4C41544146h; jumptable 00000000000A1378 case 6 loc_A13D2: mov [rsp+1F8h+var_1D8], rax def_A1378: mov rdi, r14; jumptable 00000000000A1378 default case call _strlen mov r15, rax lea r12, [rsp+1F8h+var_1D8] mov rdi, r12 call _strlen lea rdi, [rsp+rax+1F8h+var_1F8] add rdi, 20h ; ' ' mov edx, 0F4h cmp r15d, edx cmovb edx, r15d mov rsi, r14 call _memcpy mov rdi, r12 call _strlen mov word ptr [rsp+rax+1F8h+var_1D8], 0Ah mov rsi, rsp mov rdi, r12 call _vprintf mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush cmp ebx, 6 jz short loc_A1448 loc_A1439: add rsp, 1D8h pop rbx pop r12 pop r14 pop r15 retn loc_A1448: push 1 pop rdi call _exit
void TraceLog(int a1, long long a2, ...) { long long v3; // rax unsigned int v4; // r15d char *v5; // rdi long long v6; // rdx va_list va; // [rsp+0h] [rbp-1F8h] BYREF char v8[256]; // [rsp+20h] [rbp-1D8h] BYREF if ( logTypeLevel <= a1 ) { va_start(va, a2); if ( traceLog ) { ((void ( *)(_QWORD, long long, __va_list_tag *))traceLog)((unsigned int)a1, a2, va); } else { memset(v8, 0LL, sizeof(v8)); switch ( a1 ) { case 1: v3 = 0x203A4543415254LL; goto LABEL_11; case 2: v3 = 0x203A4755424544LL; goto LABEL_11; case 3: strcpy(v8, "INFO: "); break; case 4: strcpy(v8, "WARNING: "); break; case 5: v3 = 0x203A524F525245LL; goto LABEL_11; case 6: v3 = 0x203A4C41544146LL; LABEL_11: *(_QWORD *)v8 = v3; break; default: break; } v4 = strlen(a2); v5 = &v8[strlen(v8)]; v6 = 244LL; if ( v4 < 0xF4 ) v6 = v4; memcpy(v5, a2, v6); *(_WORD *)&v8[strlen(v8)] = 10; ((void ( *)(char *, __va_list_tag *))vprintf)(v8, va); fflush(stdout); if ( a1 == 6 ) exit(1LL); } } }
TraceLog: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1d8 TEST AL,AL JZ 0x001a12dd MOVAPS xmmword ptr [RSP + 0x150],XMM0 MOVAPS xmmword ptr [RSP + 0x160],XMM1 MOVAPS xmmword ptr [RSP + 0x170],XMM2 MOVAPS xmmword ptr [RSP + 0x180],XMM3 MOVAPS xmmword ptr [RSP + 0x190],XMM4 MOVAPS xmmword ptr [RSP + 0x1a0],XMM5 MOVAPS xmmword ptr [RSP + 0x1b0],XMM6 MOVAPS xmmword ptr [RSP + 0x1c0],XMM7 LAB_001a12dd: MOV qword ptr [RSP + 0x130],RDX MOV qword ptr [RSP + 0x138],RCX MOV qword ptr [RSP + 0x140],R8 MOV qword ptr [RSP + 0x148],R9 CMP dword ptr [0x00222be0],EDI JG 0x001a1439 MOV R14,RSI MOV EBX,EDI LEA RAX,[RSP + 0x120] MOV qword ptr [RSP + 0x10],RAX LEA RAX,[RSP + 0x200] MOV qword ptr [RSP + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RSP],RAX MOV RAX,qword ptr [0x00230d80] TEST RAX,RAX JZ 0x001a1351 MOV RDX,RSP MOV EDI,EBX MOV RSI,R14 CALL RAX JMP 0x001a1439 LAB_001a1351: LEA RDI,[RSP + 0x20] MOV EDX,0x100 XOR ESI,ESI CALL 0x001092c0 LEA EAX,[RBX + -0x1] CMP EAX,0x5 JA 0x001a13d7 LEA RCX,[0x1d4f20] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,0x203a4543415254 JMP 0x001a13d2 caseD_5: MOV RAX,0x203a524f525245 JMP 0x001a13d2 caseD_3: MOV dword ptr [RSP + 0x23],0x203a4f MOV dword ptr [RSP + 0x20],0x4f464e49 JMP 0x001a13d7 caseD_4: MOV RAX,0x3a474e494e524157 MOV qword ptr [RSP + 0x20],RAX MOV word ptr [RSP + 0x28],0x20 JMP 0x001a13d7 caseD_2: MOV RAX,0x203a4755424544 JMP 0x001a13d2 caseD_6: MOV RAX,0x203a4c41544146 LAB_001a13d2: MOV qword ptr [RSP + 0x20],RAX default: MOV RDI,R14 CALL 0x00109210 MOV R15,RAX LEA R12,[RSP + 0x20] MOV RDI,R12 CALL 0x00109210 LEA RDI,[RSP + RAX*0x1] ADD RDI,0x20 MOV EDX,0xf4 CMP R15D,EDX CMOVC EDX,R15D MOV RSI,R14 CALL 0x00109400 MOV RDI,R12 CALL 0x00109210 MOV word ptr [RSP + RAX*0x1 + 0x20],0xa MOV RSI,RSP MOV RDI,R12 CALL 0x00109560 MOV RAX,qword ptr [0x00221fa8] MOV RDI,qword ptr [RAX] CALL 0x00109610 CMP EBX,0x6 JZ 0x001a1448 LAB_001a1439: ADD RSP,0x1d8 POP RBX POP R12 POP R14 POP R15 RET LAB_001a1448: PUSH 0x1 POP RDI CALL 0x00109660
void TraceLog(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9 ,char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { char in_AL; size_t sVar1; size_t sVar2; size_t __n; int8 local_1f8; int1 *local_1f0; int1 *local_1e8; int8 local_1d8; int2 local_1d0; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } if (logTypeLevel <= param_9) { local_1e8 = local_d8; local_1f0 = &stack0x00000008; local_1f8 = 0x3000000010; local_c8 = param_11; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; if (traceLog == (code *)0x0) { memset(&local_1d8,0,0x100); switch(param_9) { case 1: local_1d8 = 0x203a4543415254; break; case 2: local_1d8 = 0x203a4755424544; break; case 3: local_1d8 = CONCAT17(local_1d8._7_1_,0x203a4f000000); local_1d8 = CONCAT44(local_1d8._4_4_,0x4f464e49); break; case 4: local_1d8 = 0x3a474e494e524157; local_1d0 = 0x20; break; case 5: local_1d8 = 0x203a524f525245; break; case 6: local_1d8 = 0x203a4c41544146; } sVar1 = strlen(param_10); sVar2 = strlen((char *)&local_1d8); __n = 0xf4; if ((uint)sVar1 < 0xf4) { __n = sVar1 & 0xffffffff; } memcpy((void *)((long)&local_1d8 + sVar2),param_10,__n); sVar1 = strlen((char *)&local_1d8); *(int2 *)((long)&local_1d8 + sVar1) = 10; vprintf((char *)&local_1d8,&local_1f8); fflush(*(FILE **)PTR_stdout_00221fa8); if (param_9 == 6) { /* WARNING: Subroutine does not return */ exit(1); } } else { (*traceLog)(param_9,param_10,&local_1f8); } } return; }
49,526
maria_delete_all_rows
eloqsql/storage/maria/ma_delete_all.c
int maria_delete_all_rows(MARIA_HA *info) { MARIA_SHARE *share= info->s; my_bool log_record; LSN lsn; #ifdef HAVE_MMAP my_bool mmap_file= share->file_map != 0; #endif DBUG_ENTER("maria_delete_all_rows"); if (share->options & HA_OPTION_READ_ONLY_DATA) { DBUG_RETURN(my_errno=EACCES); } /** @todo LOCK take X-lock on table here. When we have versioning, if some other thread is looking at this table, we cannot shrink the file like this. */ if (_ma_readinfo(info,F_WRLCK,1)) DBUG_RETURN(my_errno); log_record= share->now_transactional && !share->temporary; if (log_record) { /* This record will be used by Recovery to finish the deletion if it crashed. We force it to have a complete history in the log. */ LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; uchar log_data[FILEID_STORE_SIZE]; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); if (unlikely(translog_write_record(&lsn, LOGREC_REDO_DELETE_ALL, info->trn, info, 0, sizeof(log_array)/sizeof(log_array[0]), log_array, log_data, NULL) || translog_flush(lsn))) goto err; /* If we fail in this function after this point, log and table will be inconsistent. */ if (_ma_mark_file_changed(share)) goto err; } else { if (_ma_mark_file_changed(share)) goto err; /* Other branch called function below when writing log record, in hook */ _ma_reset_status(info); } /* Remove old history as the table is now empty for everyone */ _ma_reset_state(info); share->state.changed= 0; /* If we are using delayed keys or if the user has done changes to the tables since it was locked then there may be key blocks in the page cache. Or there may be data blocks there. We need to throw them away or they may re-enter the emptied table or another table later. */ #ifdef HAVE_MMAP if (mmap_file) _ma_unmap_file(info); #endif if (_ma_flush_table_files(info, MARIA_FLUSH_DATA|MARIA_FLUSH_INDEX, FLUSH_IGNORE_CHANGED, FLUSH_IGNORE_CHANGED) || mysql_file_chsize(info->dfile.file, 0, 0, MYF(MY_WME)) || mysql_file_chsize(share->kfile.file, share->base.keystart, 0, MYF(MY_WME))) goto err; if (_ma_initialize_data_file(share, info->dfile.file)) goto err; if (log_record) { /* Because LOGREC_REDO_DELETE_ALL does not operate on pages, it has the following problem: delete_all; inserts (redo_insert); all pages get flushed; checkpoint: the dirty pages list will be empty. In recovery, delete_all is executed, but redo_insert are skipped (dirty pages list is empty). To avoid this, we need to set skip_redo_lsn now, and thus need to sync files. Also fixes the problem of: bulk insert; insert; delete_all; crash: "bulk insert" is skipped (no REDOs), so if "insert" would not be skipped (if we didn't update skip_redo_lsn below) then "insert" would be tried and fail, saying that it sees that the first page has to be created though the inserted row has rownr>0. */ my_bool error= _ma_state_info_write(share, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET | MA_STATE_INFO_WRITE_LOCK) || _ma_update_state_lsns(share, lsn, info->trn->trid, FALSE, FALSE) || _ma_sync_table_files(info); info->trn->rec_lsn= LSN_IMPOSSIBLE; if (error) goto err; } if (info->opt_flag & WRITE_CACHE_USED) reinit_io_cache(&info->rec_cache, WRITE_CACHE, 0, 1, 1); _ma_writeinfo(info, WRITEINFO_UPDATE_KEYFILE); #ifdef HAVE_MMAP /* Map again */ if (mmap_file) _ma_dynmap_file(info, (my_off_t) 0); #endif DBUG_RETURN(0); err: { int save_errno=my_errno; _ma_writeinfo(info, WRITEINFO_UPDATE_KEYFILE); info->update|=HA_STATE_WRITTEN; /* Buffer changed */ DBUG_RETURN(my_errno=save_errno); } }
O3
c
maria_delete_all_rows: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq (%rdi), %r14 testb $0x1, 0x722(%r14) jne 0x5a7a8 movq %rdi, %rbx movq 0x5f0(%r14), %r13 movl $0x1, %esi movl $0x1, %edx callq 0x3d7f6 testl %eax, %eax je 0x5a7be callq 0xa319a movl (%rax), %r14d jmp 0x5a983 callq 0xa319a movl $0xd, (%rax) movl $0xd, %r14d jmp 0x5a983 cmpb $0x0, 0x7e7(%r14) je 0x5a7d6 cmpb $0x0, 0x7d9(%r14) je 0x5a903 movq %r14, %rdi callq 0x3d876 testl %eax, %eax jne 0x5a95f movq %rbx, %rdi callq 0x5aa1d movb $0x1, %r12b movq %rbx, %rdi callq 0x3e01c movl $0x0, 0x170(%r14) testq %r13, %r13 je 0x5a811 movq %rbx, %rdi callq 0x409c6 movq %rbx, %rdi movl $0x3, %esi movl $0x2, %edx movl $0x2, %ecx callq 0x36b3c testl %eax, %eax jne 0x5a95f movl 0x480(%rbx), %r15d leaq 0x32c812(%rip), %rax # 0x387050 movq (%rax), %rax leaq -0x80(%rbp), %rdi movl %r15d, %esi movl $0xd, %edx callq *0x158(%rax) testq %rax, %rax jne 0x5aa00 movl $0x10, %ecx movl %r15d, %edi xorl %esi, %esi xorl %edx, %edx callq 0x9f350 testl %eax, %eax jne 0x5a95f movl 0x760(%r14), %esi movq 0x360(%r14), %rdx movl $0x6c, %edi callq 0x5aabd testl %eax, %eax jne 0x5a95f movl 0x480(%rbx), %esi movq %r14, %rdi callq 0x5a43b testl %eax, %eax jne 0x5a95f testb %r12b, %r12b je 0x5a99d testb $0x10, 0x61c(%rbx) je 0x5a8db leaq 0x4b8(%rbx), %rdi movl $0x2, %esi xorl %edx, %edx movl $0x1, %ecx movl $0x1, %r8d callq 0x968d8 movq %rbx, %rdi movl $0x1, %esi callq 0x3d7fe xorl %r14d, %r14d testq %r13, %r13 je 0x5a983 movq %rbx, %rdi xorl %esi, %esi callq 0x423c4 jmp 0x5a983 leaq -0x2c(%rbp), %rax leaq -0x80(%rbp), %r10 movq %rax, 0x20(%r10) movq $0x2, 0x28(%r10) movq 0x8(%rbx), %rdx subq $0x8, %rsp leaq -0x38(%rbp), %rdi movl $0x21, %esi movq %rbx, %rcx xorl %r8d, %r8d movl $0x3, %r9d pushq $0x0 pushq %rax pushq %r10 callq 0x2ad29 addq $0x20, %rsp testb %al, %al jne 0x5a95f movq -0x38(%rbp), %rdi callq 0x68763 testb %al, %al jne 0x5a95f movq %r14, %rdi callq 0x3d876 testl %eax, %eax je 0x5a995 callq 0xa319a movl (%rax), %r14d movq %rbx, %rdi movl $0x1, %esi callq 0x3d7fe orb $0x4, 0x624(%rbx) callq 0xa319a movl %r14d, (%rax) movl %r14d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r12d, %r12d jmp 0x5a7f1 movq %r14, %rdi movl $0x5, %esi callq 0x34e5e testl %eax, %eax jne 0x5a9cb movq -0x38(%rbp), %rsi movq 0x8(%rbx), %rax movq 0x78(%rax), %rdx movq %r14, %rdi xorl %ecx, %ecx xorl %r8d, %r8d callq 0x5a586 testl %eax, %eax je 0x5a9dc movq 0x8(%rbx), %rax movq $0x0, 0x90(%rax) jmp 0x5a95f movq %rbx, %rdi callq 0x36d56 movq 0x8(%rbx), %rcx movq $0x0, 0x90(%rcx) testl %eax, %eax jne 0x5a95f jmp 0x5a8b4 leaq -0x2c(%rbp), %rcx movq %rax, %rdi movl %r15d, %esi movq %rcx, %r15 movq %rcx, %rdx callq 0x2a772 movl (%r15), %eax jmp 0x5a86d
maria_delete_all_rows: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, [rdi] test byte ptr [r14+722h], 1 jnz short loc_5A7A8 mov rbx, rdi mov r13, [r14+5F0h] mov esi, 1 mov edx, 1 call _ma_readinfo test eax, eax jz short loc_5A7BE call _my_thread_var mov r14d, [rax] jmp loc_5A983 loc_5A7A8: call _my_thread_var mov dword ptr [rax], 0Dh mov r14d, 0Dh jmp loc_5A983 loc_5A7BE: cmp byte ptr [r14+7E7h], 0 jz short loc_5A7D6 cmp byte ptr [r14+7D9h], 0 jz loc_5A903 loc_5A7D6: mov rdi, r14 call _ma_mark_file_changed test eax, eax jnz loc_5A95F mov rdi, rbx call _ma_reset_status mov r12b, 1 loc_5A7F1: mov rdi, rbx call _ma_reset_state mov dword ptr [r14+170h], 0 test r13, r13 jz short loc_5A811 mov rdi, rbx call _ma_unmap_file loc_5A811: mov rdi, rbx mov esi, 3 mov edx, 2 mov ecx, 2 call _ma_flush_table_files test eax, eax jnz loc_5A95F mov r15d, [rbx+480h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] mov esi, r15d mov edx, 0Dh call qword ptr [rax+158h] test rax, rax jnz loc_5AA00 mov ecx, 10h mov edi, r15d xor esi, esi xor edx, edx call my_chsize loc_5A86D: test eax, eax jnz loc_5A95F mov esi, [r14+760h] mov rdx, [r14+360h] mov edi, 6Ch ; 'l' call inline_mysql_file_chsize_0 test eax, eax jnz loc_5A95F mov esi, [rbx+480h] mov rdi, r14 call _ma_initialize_data_file test eax, eax jnz loc_5A95F test r12b, r12b jz loc_5A99D loc_5A8B4: test byte ptr [rbx+61Ch], 10h jz short loc_5A8DB lea rdi, [rbx+4B8h] mov esi, 2 xor edx, edx mov ecx, 1 mov r8d, 1 call reinit_io_cache loc_5A8DB: mov rdi, rbx mov esi, 1 call _ma_writeinfo xor r14d, r14d test r13, r13 jz loc_5A983 mov rdi, rbx xor esi, esi call _ma_dynmap_file jmp loc_5A983 loc_5A903: lea rax, [rbp+var_2C] lea r10, [rbp+var_80] mov [r10+20h], rax mov qword ptr [r10+28h], 2 mov rdx, [rbx+8] sub rsp, 8 lea rdi, [rbp+var_38] mov esi, 21h ; '!' mov rcx, rbx xor r8d, r8d mov r9d, 3 push 0 push rax push r10 call translog_write_record add rsp, 20h test al, al jnz short loc_5A95F mov rdi, [rbp+var_38] call translog_flush test al, al jnz short loc_5A95F mov rdi, r14 call _ma_mark_file_changed test eax, eax jz short loc_5A995 loc_5A95F: call _my_thread_var mov r14d, [rax] mov rdi, rbx mov esi, 1 call _ma_writeinfo or byte ptr [rbx+624h], 4 call _my_thread_var mov [rax], r14d loc_5A983: mov eax, r14d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5A995: xor r12d, r12d jmp loc_5A7F1 loc_5A99D: mov rdi, r14 mov esi, 5 call _ma_state_info_write test eax, eax jnz short loc_5A9CB mov rsi, [rbp+var_38] mov rax, [rbx+8] mov rdx, [rax+78h] mov rdi, r14 xor ecx, ecx xor r8d, r8d call _ma_update_state_lsns test eax, eax jz short loc_5A9DC loc_5A9CB: mov rax, [rbx+8] mov qword ptr [rax+90h], 0 jmp short loc_5A95F loc_5A9DC: mov rdi, rbx call _ma_sync_table_files mov rcx, [rbx+8] mov qword ptr [rcx+90h], 0 test eax, eax jnz loc_5A95F jmp loc_5A8B4 loc_5AA00: lea rcx, [rbp+var_2C] mov rdi, rax mov esi, r15d mov r15, rcx mov rdx, rcx call maria_delete_all_rows_cold_1 mov eax, [r15] jmp loc_5A86D
long long maria_delete_all_rows(_QWORD *a1) { long long v1; // r14 long long v3; // r13 unsigned int v4; // r14d long long v5; // rdi char v6; // r12 unsigned int v7; // r15d long long v8; // rax int v9; // eax long long v10; // rdx BOOL v12; // eax _OWORD v13[2]; // [rsp+0h] [rbp-80h] BYREF _DWORD *v14; // [rsp+20h] [rbp-60h] long long v15; // [rsp+28h] [rbp-58h] long long v16; // [rsp+48h] [rbp-38h] BYREF _DWORD v17[11]; // [rsp+54h] [rbp-2Ch] BYREF v1 = *a1; if ( (*(_BYTE *)(*a1 + 1826LL) & 1) != 0 ) { *(_DWORD *)my_thread_var(a1) = 13; return 13; } v3 = *(_QWORD *)(v1 + 1520); if ( (unsigned int)ma_readinfo() ) return *(unsigned int *)my_thread_var(a1); if ( *(_BYTE *)(v1 + 2023) && !*(_BYTE *)(v1 + 2009) ) { v14 = v17; v15 = 2LL; v10 = a1[1]; v5 = (long long)&v16; if ( (unsigned __int8)translog_write_record( (unsigned long long)&v16, (long long *)((char *)&qword_20 + 1), v10, a1, 0, 3, v13, v17, 0LL) ) goto LABEL_25; v5 = v16; if ( (unsigned __int8)translog_flush(v16) ) goto LABEL_25; v5 = v1; if ( (unsigned int)ma_mark_file_changed(v1) ) goto LABEL_25; v6 = 0; } else { v5 = v1; if ( (unsigned int)ma_mark_file_changed(v1) ) goto LABEL_25; ma_reset_status(a1); v6 = 1; } ma_reset_state(a1); *(_DWORD *)(v1 + 368) = 0; if ( v3 ) ma_unmap_file(a1); v5 = (long long)a1; if ( (unsigned int)ma_flush_table_files(a1, 3, 2u, 2u) ) goto LABEL_25; v7 = *((_DWORD *)a1 + 288); v8 = ((long long ( *)(_OWORD *, _QWORD, long long))PSI_server[43])(v13, v7, 13LL); if ( v8 ) { v5 = v8; maria_delete_all_rows_cold_1(v8, v7, v17); v9 = v17[0]; } else { v5 = v7; v9 = my_chsize(v7, 0LL, 0LL, 16LL); } if ( v9 ) goto LABEL_25; v5 = 108LL; if ( (unsigned int)inline_mysql_file_chsize_0(108LL, *(unsigned int *)(v1 + 1888), *(_QWORD *)(v1 + 864)) ) goto LABEL_25; v5 = v1; if ( (unsigned int)ma_initialize_data_file(v1, *((_DWORD *)a1 + 288)) ) goto LABEL_25; if ( !v6 ) { v5 = v1; if ( (unsigned int)ma_state_info_write(v1, 5u) || (v5 = v1, (unsigned int)ma_update_state_lsns(v1, v16, *(_QWORD *)(a1[1] + 120LL), 0, 0)) ) { *(_QWORD *)(a1[1] + 144LL) = 0LL; } else { v5 = (long long)a1; v12 = ma_sync_table_files(a1); *(_QWORD *)(a1[1] + 144LL) = 0LL; if ( !v12 ) goto LABEL_18; } LABEL_25: v4 = *(_DWORD *)my_thread_var(v5); ma_writeinfo(a1, 1); *((_BYTE *)a1 + 1572) |= 4u; *(_DWORD *)my_thread_var(a1) = v4; return v4; } LABEL_18: if ( (*((_BYTE *)a1 + 1564) & 0x10) != 0 ) reinit_io_cache(a1 + 151, 2LL, 0LL, 1LL, 1LL); ma_writeinfo(a1, 1); v4 = 0; if ( v3 ) ma_dynmap_file((unsigned int *)a1, 0LL); return v4; }
maria_delete_all_rows: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,qword ptr [RDI] TEST byte ptr [R14 + 0x722],0x1 JNZ 0x0015a7a8 MOV RBX,RDI MOV R13,qword ptr [R14 + 0x5f0] MOV ESI,0x1 MOV EDX,0x1 CALL 0x0013d7f6 TEST EAX,EAX JZ 0x0015a7be CALL 0x001a319a MOV R14D,dword ptr [RAX] JMP 0x0015a983 LAB_0015a7a8: CALL 0x001a319a MOV dword ptr [RAX],0xd MOV R14D,0xd JMP 0x0015a983 LAB_0015a7be: CMP byte ptr [R14 + 0x7e7],0x0 JZ 0x0015a7d6 CMP byte ptr [R14 + 0x7d9],0x0 JZ 0x0015a903 LAB_0015a7d6: MOV RDI,R14 CALL 0x0013d876 TEST EAX,EAX JNZ 0x0015a95f MOV RDI,RBX CALL 0x0015aa1d MOV R12B,0x1 LAB_0015a7f1: MOV RDI,RBX CALL 0x0013e01c MOV dword ptr [R14 + 0x170],0x0 TEST R13,R13 JZ 0x0015a811 MOV RDI,RBX CALL 0x001409c6 LAB_0015a811: MOV RDI,RBX MOV ESI,0x3 MOV EDX,0x2 MOV ECX,0x2 CALL 0x00136b3c TEST EAX,EAX JNZ 0x0015a95f MOV R15D,dword ptr [RBX + 0x480] LEA RAX,[0x487050] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] MOV ESI,R15D MOV EDX,0xd CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0015aa00 MOV ECX,0x10 MOV EDI,R15D XOR ESI,ESI XOR EDX,EDX CALL 0x0019f350 LAB_0015a86d: TEST EAX,EAX JNZ 0x0015a95f MOV ESI,dword ptr [R14 + 0x760] MOV RDX,qword ptr [R14 + 0x360] MOV EDI,0x6c CALL 0x0015aabd TEST EAX,EAX JNZ 0x0015a95f MOV ESI,dword ptr [RBX + 0x480] MOV RDI,R14 CALL 0x0015a43b TEST EAX,EAX JNZ 0x0015a95f TEST R12B,R12B JZ 0x0015a99d LAB_0015a8b4: TEST byte ptr [RBX + 0x61c],0x10 JZ 0x0015a8db LEA RDI,[RBX + 0x4b8] MOV ESI,0x2 XOR EDX,EDX MOV ECX,0x1 MOV R8D,0x1 CALL 0x001968d8 LAB_0015a8db: MOV RDI,RBX MOV ESI,0x1 CALL 0x0013d7fe XOR R14D,R14D TEST R13,R13 JZ 0x0015a983 MOV RDI,RBX XOR ESI,ESI CALL 0x001423c4 JMP 0x0015a983 LAB_0015a903: LEA RAX,[RBP + -0x2c] LEA R10,[RBP + -0x80] MOV qword ptr [R10 + 0x20],RAX MOV qword ptr [R10 + 0x28],0x2 MOV RDX,qword ptr [RBX + 0x8] SUB RSP,0x8 LEA RDI,[RBP + -0x38] MOV ESI,0x21 MOV RCX,RBX XOR R8D,R8D MOV R9D,0x3 PUSH 0x0 PUSH RAX PUSH R10 CALL 0x0012ad29 ADD RSP,0x20 TEST AL,AL JNZ 0x0015a95f MOV RDI,qword ptr [RBP + -0x38] CALL 0x00168763 TEST AL,AL JNZ 0x0015a95f MOV RDI,R14 CALL 0x0013d876 TEST EAX,EAX JZ 0x0015a995 LAB_0015a95f: CALL 0x001a319a MOV R14D,dword ptr [RAX] MOV RDI,RBX MOV ESI,0x1 CALL 0x0013d7fe OR byte ptr [RBX + 0x624],0x4 CALL 0x001a319a MOV dword ptr [RAX],R14D LAB_0015a983: MOV EAX,R14D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015a995: XOR R12D,R12D JMP 0x0015a7f1 LAB_0015a99d: MOV RDI,R14 MOV ESI,0x5 CALL 0x00134e5e TEST EAX,EAX JNZ 0x0015a9cb MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBX + 0x8] MOV RDX,qword ptr [RAX + 0x78] MOV RDI,R14 XOR ECX,ECX XOR R8D,R8D CALL 0x0015a586 TEST EAX,EAX JZ 0x0015a9dc LAB_0015a9cb: MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RAX + 0x90],0x0 JMP 0x0015a95f LAB_0015a9dc: MOV RDI,RBX CALL 0x00136d56 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RCX + 0x90],0x0 TEST EAX,EAX JNZ 0x0015a95f JMP 0x0015a8b4 LAB_0015aa00: LEA RCX,[RBP + -0x2c] MOV RDI,RAX MOV ESI,R15D MOV R15,RCX MOV RDX,RCX CALL 0x0012a772 MOV EAX,dword ptr [R15] JMP 0x0015a86d
int4 maria_delete_all_rows(long *param_1) { int4 uVar1; long lVar2; long lVar3; bool bVar4; char cVar5; int iVar6; int4 *puVar7; long lVar8; int1 local_88 [32]; int *local_68; int8 local_60; int8 local_40; int local_34; lVar2 = *param_1; if ((*(byte *)(lVar2 + 0x722) & 1) != 0) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0xd; return 0xd; } lVar3 = *(long *)(lVar2 + 0x5f0); iVar6 = _ma_readinfo(param_1,1,1); if (iVar6 != 0) { puVar7 = (int4 *)_my_thread_var(); return *puVar7; } if ((*(char *)(lVar2 + 0x7e7) == '\0') || (*(char *)(lVar2 + 0x7d9) != '\0')) { iVar6 = _ma_mark_file_changed(lVar2); if (iVar6 != 0) goto LAB_0015a95f; _ma_reset_status(param_1); bVar4 = true; } else { local_68 = &local_34; local_60 = 2; cVar5 = translog_write_record(&local_40,0x21,param_1[1],param_1,0,3,local_88,local_68,0); if (((cVar5 != '\0') || (cVar5 = translog_flush(local_40), cVar5 != '\0')) || (iVar6 = _ma_mark_file_changed(lVar2), iVar6 != 0)) goto LAB_0015a95f; bVar4 = false; } _ma_reset_state(param_1); *(int4 *)(lVar2 + 0x170) = 0; if (lVar3 != 0) { _ma_unmap_file(param_1); } iVar6 = _ma_flush_table_files(param_1,3,2,2); if (iVar6 == 0) { uVar1 = (int4)param_1[0x90]; lVar8 = (**(code **)(PSI_server + 0x158))(local_88,uVar1,0xd); if (lVar8 == 0) { local_34 = my_chsize(uVar1,0,0,0x10); } else { maria_delete_all_rows_cold_1(lVar8,uVar1,&local_34); } if (((local_34 == 0) && (iVar6 = inline_mysql_file_chsize (0x6c,*(int4 *)(lVar2 + 0x760),*(int8 *)(lVar2 + 0x360)), iVar6 == 0)) && (iVar6 = _ma_initialize_data_file(lVar2,(int)param_1[0x90]), iVar6 == 0)) { if (bVar4) { LAB_0015a8b4: if ((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) { reinit_io_cache(param_1 + 0x97,2,0,1,1); } _ma_writeinfo(param_1,1); if (lVar3 == 0) { return 0; } _ma_dynmap_file(param_1,0); return 0; } iVar6 = _ma_state_info_write(lVar2,5); if ((iVar6 == 0) && (iVar6 = _ma_update_state_lsns(lVar2,local_40,*(int8 *)(param_1[1] + 0x78),0,0), iVar6 == 0)) { iVar6 = _ma_sync_table_files(param_1); *(int8 *)(param_1[1] + 0x90) = 0; if (iVar6 == 0) goto LAB_0015a8b4; } else { *(int8 *)(param_1[1] + 0x90) = 0; } } } LAB_0015a95f: puVar7 = (int4 *)_my_thread_var(); uVar1 = *puVar7; _ma_writeinfo(param_1,1); *(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 4; puVar7 = (int4 *)_my_thread_var(); *puVar7 = uVar1; return uVar1; }
49,527
LefDefParser::defiOrdered::addOrdered(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiScanchain.cpp
void defiOrdered::addOrdered(const char* inst) { if (num_ == allocated_) bump(); inst_[num_] = (char*)malloc(strlen(inst)+1); strcpy(inst_[num_], defData->DEFCASE(inst)); in_[num_] = 0; out_[num_] = 0; bits_[num_] = -1; num_ += 1; }
O0
cpp
LefDefParser::defiOrdered::addOrdered(char const*): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x10(%rsp) movl (%rcx), %eax cmpl 0x4(%rcx), %eax jne 0x3e7f9 movq 0x10(%rsp), %rdi callq 0x3e660 movq 0x18(%rsp), %rdi callq 0x70e0 movq %rax, %rdi addq $0x1, %rdi callq 0x72d0 movq %rax, %rsi movq 0x10(%rsp), %rax movq 0x8(%rax), %rcx movslq (%rax), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x8(%rax), %rcx movslq (%rax), %rdx movq (%rcx,%rdx,8), %rcx movq %rcx, 0x8(%rsp) movq 0x28(%rax), %rdi movq 0x18(%rsp), %rsi callq 0x250b0 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x7220 movq 0x10(%rsp), %rax movq 0x10(%rax), %rcx movslq (%rax), %rdx movq $0x0, (%rcx,%rdx,8) movq 0x18(%rax), %rcx movslq (%rax), %rdx movq $0x0, (%rcx,%rdx,8) movq 0x20(%rax), %rcx movslq (%rax), %rdx movl $0xffffffff, (%rcx,%rdx,4) # imm = 0xFFFFFFFF movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) addq $0x28, %rsp retq nopw (%rax,%rax)
_ZN12LefDefParser11defiOrdered10addOrderedEPKc: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rcx, [rsp+28h+var_8] mov [rsp+28h+var_18], rcx mov eax, [rcx] cmp eax, [rcx+4] jnz short loc_3E7F9 mov rdi, [rsp+28h+var_18]; this call _ZN12LefDefParser11defiOrdered4bumpEv; LefDefParser::defiOrdered::bump(void) loc_3E7F9: mov rdi, [rsp+28h+var_10] call _strlen mov rdi, rax add rdi, 1 call _malloc mov rsi, rax mov rax, [rsp+28h+var_18] mov rcx, [rax+8] movsxd rdx, dword ptr [rax] mov [rcx+rdx*8], rsi mov rcx, [rax+8] movsxd rdx, dword ptr [rax] mov rcx, [rcx+rdx*8] mov [rsp+28h+var_20], rcx mov rdi, [rax+28h]; this mov rsi, [rsp+28h+var_10]; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, [rsp+28h+var_20] mov rsi, rax call _strcpy mov rax, [rsp+28h+var_18] mov rcx, [rax+10h] movsxd rdx, dword ptr [rax] mov qword ptr [rcx+rdx*8], 0 mov rcx, [rax+18h] movsxd rdx, dword ptr [rax] mov qword ptr [rcx+rdx*8], 0 mov rcx, [rax+20h] movsxd rdx, dword ptr [rax] mov dword ptr [rcx+rdx*4], 0FFFFFFFFh mov ecx, [rax] add ecx, 1 mov [rax], ecx add rsp, 28h retn
LefDefParser::defrData ** LefDefParser::defiOrdered::addOrdered( LefDefParser::defrData **this, const char *a2) { long long v2; // rax const char *v3; // rax LefDefParser::defrData **result; // rax long long v5; // [rsp+8h] [rbp-20h] if ( *(_DWORD *)this == *((_DWORD *)this + 1) ) LefDefParser::defiOrdered::bump((LefDefParser::defiOrdered *)this); v2 = strlen(a2); *((_QWORD *)this[1] + *(int *)this) = malloc(v2 + 1); v5 = *((_QWORD *)this[1] + *(int *)this); v3 = LefDefParser::defrData::DEFCASE(this[5], a2); strcpy(v5, v3); result = this; *((_QWORD *)this[2] + *(int *)this) = 0LL; *((_QWORD *)this[3] + *(int *)this) = 0LL; *((_DWORD *)this[4] + (int)(*(_DWORD *)this)++) = -1; return result; }
addOrdered: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RCX MOV EAX,dword ptr [RCX] CMP EAX,dword ptr [RCX + 0x4] JNZ 0x0013e7f9 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0013e660 LAB_0013e7f9: MOV RDI,qword ptr [RSP + 0x18] CALL 0x001070e0 MOV RDI,RAX ADD RDI,0x1 CALL 0x001072d0 MOV RSI,RAX MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,dword ptr [RAX] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,dword ptr [RAX] MOV RCX,qword ptr [RCX + RDX*0x8] MOV qword ptr [RSP + 0x8],RCX MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001250b0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX CALL 0x00107220 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0x10] MOVSXD RDX,dword ptr [RAX] MOV qword ptr [RCX + RDX*0x8],0x0 MOV RCX,qword ptr [RAX + 0x18] MOVSXD RDX,dword ptr [RAX] MOV qword ptr [RCX + RDX*0x8],0x0 MOV RCX,qword ptr [RAX + 0x20] MOVSXD RDX,dword ptr [RAX] MOV dword ptr [RCX + RDX*0x4],0xffffffff MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX ADD RSP,0x28 RET
/* LefDefParser::defiOrdered::addOrdered(char const*) */ void __thiscall LefDefParser::defiOrdered::addOrdered(defiOrdered *this,char *param_1) { char *__dest; size_t sVar1; void *pvVar2; char *__src; if (*(int *)this == *(int *)(this + 4)) { bump(this); } sVar1 = strlen(param_1); pvVar2 = malloc(sVar1 + 1); *(void **)(*(long *)(this + 8) + (long)*(int *)this * 8) = pvVar2; __dest = *(char **)(*(long *)(this + 8) + (long)*(int *)this * 8); __src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x28),param_1); strcpy(__dest,__src); *(int8 *)(*(long *)(this + 0x10) + (long)*(int *)this * 8) = 0; *(int8 *)(*(long *)(this + 0x18) + (long)*(int *)this * 8) = 0; *(int4 *)(*(long *)(this + 0x20) + (long)*(int *)this * 4) = 0xffffffff; *(int *)this = *(int *)this + 1; return; }
49,528
ftxui::(anonymous namespace)::InputBase::HandleArrowDown()
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/input.cpp
bool HandleArrowDown() { if (cursor_position() == (int)content->size()) { return false; } const size_t columns = CursorColumn(); // Move cursor at the beginning of the next line while (true) { if (content()[cursor_position()] == '\n') { break; } cursor_position() = GlyphNext(content(), cursor_position()); if (cursor_position() == (int)content().size()) { return true; } } cursor_position() = GlyphNext(content(), cursor_position()); MoveCursorColumn(columns); return true; }
O1
cpp
ftxui::(anonymous namespace)::InputBase::HandleArrowDown(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x28(%rdi), %r14 leaq 0xf8(%rdi), %r15 movq %r15, %rdi callq 0x2cdc2 movl (%rax), %ebp movq %r14, %rdi callq 0x2c944 movl 0x8(%rax), %r12d movl %ebp, 0xc(%rsp) cmpl %r12d, %ebp je 0x2c240 movq %rbx, %rdi callq 0x2c4ba movq %rax, 0x10(%rsp) movq %r14, %rdi callq 0x2c944 movq %rax, %r13 movq %r15, %rdi callq 0x2cdc2 movslq (%rax), %rax movq (%r13), %rcx movb (%rcx,%rax), %bpl movq %r14, %rdi callq 0x2c944 movq %rax, %r13 movq %r15, %rdi callq 0x2cdc2 movslq (%rax), %rsi movq %r13, %rdi callq 0x3b991 movq %rax, %r13 movq %r15, %rdi callq 0x2cdc2 movl %r13d, (%rax) cmpb $0xa, %bpl je 0x2c233 movq %r15, %rdi callq 0x2cdc2 movl (%rax), %ebp movq %r14, %rdi callq 0x2c944 cmpl 0x8(%rax), %ebp jne 0x2c1ca jmp 0x2c240 movq %rbx, %rdi movq 0x10(%rsp), %rsi callq 0x2c52a cmpl %r12d, 0xc(%rsp) setne %al addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN5ftxui12_GLOBAL__N_19InputBase15HandleArrowDownEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi lea r14, [rdi+28h] lea r15, [rdi+0F8h] mov rdi, r15 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov ebp, [rax] mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r12d, [rax+8] mov [rsp+48h+var_3C], ebp cmp ebp, r12d jz loc_2C240 mov rdi, rbx; this call _ZN5ftxui12_GLOBAL__N_19InputBase12CursorColumnEv; ftxui::`anonymous namespace'::InputBase::CursorColumn(void) mov qword ptr [rsp+48h+var_38], rax loc_2C1CA: mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r13, rax mov rdi, r15 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rax, dword ptr [rax] mov rcx, [r13+0] mov bpl, [rcx+rax] mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r13, rax mov rdi, r15 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rsi, dword ptr [rax] mov rdi, r13 call _ZN5ftxui9GlyphNextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; ftxui::GlyphNext(std::string const&,ulong) mov r13, rax mov rdi, r15 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov [rax], r13d cmp bpl, 0Ah jz short loc_2C233 mov rdi, r15 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov ebp, [rax] mov rdi, r14 call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) cmp ebp, [rax+8] jnz short loc_2C1CA jmp short loc_2C240 loc_2C233: mov rdi, rbx; this mov rsi, qword ptr [rsp+48h+var_38]; int call _ZN5ftxui12_GLOBAL__N_19InputBase16MoveCursorColumnEi; ftxui::`anonymous namespace'::InputBase::MoveCursorColumn(int) loc_2C240: cmp [rsp+48h+var_3C], r12d setnz al add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool ftxui::`anonymous namespace'::InputBase::HandleArrowDown(ftxui::_anonymous_namespace_::InputBase *this) { char *v1; // r14 char *v2; // r15 int v3; // ebp int v4; // r12d _QWORD *v5; // r13 char v6; // bp long long v7; // r13 int *v8; // rax int v9; // ebp int v11; // [rsp+Ch] [rbp-3Ch] int v12; // [rsp+10h] [rbp-38h] v1 = (char *)this + 40; v2 = (char *)this + 248; v3 = *(_DWORD *)ftxui::Ref<int>::Address((char *)this + 248); v4 = *(_DWORD *)(ftxui::Ref<std::string>::Address((char *)this + 40) + 8); v11 = v3; if ( v3 != v4 ) { v12 = ftxui::`anonymous namespace'::InputBase::CursorColumn(this); while ( 1 ) { v5 = (_QWORD *)ftxui::Ref<std::string>::Address(v1); v6 = *(_BYTE *)(*v5 + *(int *)ftxui::Ref<int>::Address(v2)); v7 = ftxui::Ref<std::string>::Address(v1); v8 = (int *)ftxui::Ref<int>::Address(v2); LODWORD(v7) = ftxui::GlyphNext(v7, *v8); *(_DWORD *)ftxui::Ref<int>::Address(v2) = v7; if ( v6 == 10 ) break; v9 = *(_DWORD *)ftxui::Ref<int>::Address(v2); if ( v9 == *(_DWORD *)(ftxui::Ref<std::string>::Address(v1) + 8) ) return v11 != v4; } ftxui::`anonymous namespace'::InputBase::MoveCursorColumn(this, v12); } return v11 != v4; }
HandleArrowDown: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R14,[RDI + 0x28] LEA R15,[RDI + 0xf8] MOV RDI,R15 CALL 0x0012cdc2 MOV EBP,dword ptr [RAX] MOV RDI,R14 CALL 0x0012c944 MOV R12D,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0xc],EBP CMP EBP,R12D JZ 0x0012c240 MOV RDI,RBX CALL 0x0012c4ba MOV qword ptr [RSP + 0x10],RAX LAB_0012c1ca: MOV RDI,R14 CALL 0x0012c944 MOV R13,RAX MOV RDI,R15 CALL 0x0012cdc2 MOVSXD RAX,dword ptr [RAX] MOV RCX,qword ptr [R13] MOV BPL,byte ptr [RCX + RAX*0x1] MOV RDI,R14 CALL 0x0012c944 MOV R13,RAX MOV RDI,R15 CALL 0x0012cdc2 MOVSXD RSI,dword ptr [RAX] MOV RDI,R13 CALL 0x0013b991 MOV R13,RAX MOV RDI,R15 CALL 0x0012cdc2 MOV dword ptr [RAX],R13D CMP BPL,0xa JZ 0x0012c233 MOV RDI,R15 CALL 0x0012cdc2 MOV EBP,dword ptr [RAX] MOV RDI,R14 CALL 0x0012c944 CMP EBP,dword ptr [RAX + 0x8] JNZ 0x0012c1ca JMP 0x0012c240 LAB_0012c233: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x10] CALL 0x0012c52a LAB_0012c240: CMP dword ptr [RSP + 0xc],R12D SETNZ AL ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ftxui::(anonymous namespace)::InputBase::HandleArrowDown() */ bool __thiscall ftxui::(anonymous_namespace)::InputBase::HandleArrowDown(InputBase *this) { Ref<std::__cxx11::string> *this_00; Ref<int> *this_01; char cVar1; int iVar2; int iVar3; int iVar4; int iVar5; int4 uVar6; int *piVar7; long lVar8; long *plVar9; string *psVar10; int4 *puVar11; this_00 = (Ref<std::__cxx11::string> *)(this + 0x28); this_01 = (Ref<int> *)(this + 0xf8); piVar7 = (int *)Ref<int>::Address(this_01); iVar2 = *piVar7; lVar8 = Ref<std::__cxx11::string>::Address(this_00); iVar3 = *(int *)(lVar8 + 8); if (iVar2 != iVar3) { iVar5 = CursorColumn(this); do { plVar9 = (long *)Ref<std::__cxx11::string>::Address(this_00); piVar7 = (int *)Ref<int>::Address(this_01); cVar1 = *(char *)(*plVar9 + (long)*piVar7); psVar10 = (string *)Ref<std::__cxx11::string>::Address(this_00); piVar7 = (int *)Ref<int>::Address(this_01); uVar6 = GlyphNext(psVar10,(long)*piVar7); puVar11 = (int4 *)Ref<int>::Address(this_01); *puVar11 = uVar6; if (cVar1 == '\n') { MoveCursorColumn(this,iVar5); break; } piVar7 = (int *)Ref<int>::Address(this_01); iVar4 = *piVar7; lVar8 = Ref<std::__cxx11::string>::Address(this_00); } while (iVar4 != *(int *)(lVar8 + 8)); } return iVar2 != iVar3; }
49,529
httplib::detail::escape_abstract_namespace_unix_domain(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/common/httplib.h
inline std::string escape_abstract_namespace_unix_domain(const std::string &s) { if (s.size() > 1 && s[0] == '\0') { auto ret = s; ret[0] = '@'; return ret; } return s; }
O0
c
httplib::detail::escape_abstract_namespace_unix_domain(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x48, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x38(%rsp), %rdi callq 0xb590 cmpq $0x1, %rax jbe 0xa44f6 movq 0x38(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xb910 movsbl (%rax), %eax cmpl $0x0, %eax jne 0xa44f6 movq 0x10(%rsp), %rdi movb $0x0, 0x37(%rsp) movq 0x38(%rsp), %rsi callq 0xb310 movq 0x10(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xbf50 movq %rax, 0x8(%rsp) jmp 0xa44ba movq 0x8(%rsp), %rax movb $0x40, (%rax) movb $0x1, 0x37(%rsp) testb $0x1, 0x37(%rsp) jne 0xa44f4 jmp 0xa44ea movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) callq 0xbfb0 jmp 0xa450f movq 0x10(%rsp), %rdi callq 0xbfb0 jmp 0xa4505 movq 0x10(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0xb310 movq 0x18(%rsp), %rax addq $0x48, %rsp retq movq 0x28(%rsp), %rdi callq 0xbe10 nopl (%rax)
_ZN7httplib6detail37escape_abstract_namespace_unix_domainERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 48h mov [rsp+48h+var_38], rdi mov rax, rdi mov [rsp+48h+var_30], rax mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov rdi, [rsp+48h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) cmp rax, 1 jbe short loc_A44F6 mov rdi, [rsp+48h+var_10] xor eax, eax mov esi, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_A44F6 mov rdi, [rsp+48h+var_38] mov [rsp+48h+var_11], 0 mov rsi, [rsp+48h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) mov rdi, [rsp+48h+var_38] xor eax, eax mov esi, eax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov [rsp+48h+var_40], rax jmp short $+2 loc_A44BA: mov rax, [rsp+48h+var_40] mov byte ptr [rax], 40h ; '@' mov [rsp+48h+var_11], 1 test [rsp+48h+var_11], 1 jnz short loc_A44F4 jmp short loc_A44EA mov rdi, [rsp+arg_8]; void * mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_A450F loc_A44EA: mov rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_A44F4: jmp short loc_A4505 loc_A44F6: mov rdi, [rsp+48h+var_38] mov rsi, [rsp+48h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) loc_A4505: mov rax, [rsp+48h+var_30] add rsp, 48h retn loc_A450F: mov rdi, [rsp+arg_20] call __Unwind_Resume
long long httplib::detail::escape_abstract_namespace_unix_domain(long long a1, long long a2) { if ( (unsigned long long)std::string::size(a2) <= 1 || *(_BYTE *)std::string::operator[](a2, 0LL) ) { std::string::basic_string(a1, a2); } else { std::string::basic_string(a1, a2); *(_BYTE *)std::string::operator[](a1, 0LL) = 64; } return a1; }
escape_abstract_namespace_unix_domain: SUB RSP,0x48 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV RDI,qword ptr [RSP + 0x38] CALL 0x0010b590 CMP RAX,0x1 JBE 0x001a44f6 MOV RDI,qword ptr [RSP + 0x38] XOR EAX,EAX MOV ESI,EAX CALL 0x0010b910 MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x001a44f6 MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0x37],0x0 MOV RSI,qword ptr [RSP + 0x38] CALL 0x0010b310 MOV RDI,qword ptr [RSP + 0x10] LAB_001a44aa: XOR EAX,EAX MOV ESI,EAX CALL 0x0010bf50 LAB_001a44b3: MOV qword ptr [RSP + 0x8],RAX JMP 0x001a44ba LAB_001a44ba: MOV RAX,qword ptr [RSP + 0x8] MOV byte ptr [RAX],0x40 MOV byte ptr [RSP + 0x37],0x1 TEST byte ptr [RSP + 0x37],0x1 JNZ 0x001a44f4 JMP 0x001a44ea LAB_001a44ea: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0010bfb0 LAB_001a44f4: JMP 0x001a4505 LAB_001a44f6: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x38] CALL 0x0010b310 LAB_001a4505: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x48 RET
/* WARNING: Removing unreachable block (ram,0x001a44ce) */ /* httplib::detail::escape_abstract_namespace_unix_domain(std::__cxx11::string const&) */ detail * __thiscall httplib::detail::escape_abstract_namespace_unix_domain(detail *this,string *param_1) { ulong uVar1; char *pcVar2; int1 *puVar3; uVar1 = std::__cxx11::string::size(); if ((uVar1 < 2) || (pcVar2 = (char *)std::__cxx11::string::operator[]((ulong)param_1), *pcVar2 != '\0')) { std::__cxx11::string::string((string *)this,param_1); } else { std::__cxx11::string::string((string *)this,param_1); /* try { // try from 001a44aa to 001a44b2 has its CatchHandler @ 001a44d0 */ puVar3 = (int1 *)std::__cxx11::string::operator[]((ulong)this); *puVar3 = 0x40; } return this; }
49,530
cs_leave
eloqsql/strings/ctype.c
static int cs_leave(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; int rc; switch(state){ case _CS_COLLATION: if (i->tailoring_length) i->cs.tailoring= i->tailoring; rc= i->loader->add_collation ? i->loader->add_collation(&i->cs) : MY_XML_OK; break; /* Rules: Logical Reset Positions */ case _CS_RESET_FIRST_NON_IGNORABLE: rc= tailoring_append(st, "[first non-ignorable]", 0, NULL); break; case _CS_RESET_LAST_NON_IGNORABLE: rc= tailoring_append(st, "[last non-ignorable]", 0, NULL); break; case _CS_RESET_FIRST_PRIMARY_IGNORABLE: rc= tailoring_append(st, "[first primary ignorable]", 0, NULL); break; case _CS_RESET_LAST_PRIMARY_IGNORABLE: rc= tailoring_append(st, "[last primary ignorable]", 0, NULL); break; case _CS_RESET_FIRST_SECONDARY_IGNORABLE: rc= tailoring_append(st, "[first secondary ignorable]", 0, NULL); break; case _CS_RESET_LAST_SECONDARY_IGNORABLE: rc= tailoring_append(st, "[last secondary ignorable]", 0, NULL); break; case _CS_RESET_FIRST_TERTIARY_IGNORABLE: rc= tailoring_append(st, "[first tertiary ignorable]", 0, NULL); break; case _CS_RESET_LAST_TERTIARY_IGNORABLE: rc= tailoring_append(st, "[last tertiary ignorable]", 0, NULL); break; case _CS_RESET_FIRST_TRAILING: rc= tailoring_append(st, "[first trailing]", 0, NULL); break; case _CS_RESET_LAST_TRAILING: rc= tailoring_append(st, "[last trailing]", 0, NULL); break; case _CS_RESET_FIRST_VARIABLE: rc= tailoring_append(st, "[first variable]", 0, NULL); break; case _CS_RESET_LAST_VARIABLE: rc= tailoring_append(st, "[last variable]", 0, NULL); break; default: rc=MY_XML_OK; } return rc; }
O0
c
cs_leave: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x76600 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x753f6 movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x34(%rbp) jmp 0x753fd xorl %eax, %eax movl %eax, -0x34(%rbp) jmp 0x753fd movl -0x34(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x38(%rbp) subl $0x9, %eax je 0x754d7 jmp 0x75414 movl -0x38(%rbp), %eax subl $0x191, %eax # imm = 0x191 je 0x75584 jmp 0x75424 movl -0x38(%rbp), %eax subl $0x192, %eax # imm = 0x192 je 0x755a3 jmp 0x75434 movl -0x38(%rbp), %eax subl $0x193, %eax # imm = 0x193 je 0x755c2 jmp 0x75444 movl -0x38(%rbp), %eax subl $0x194, %eax # imm = 0x194 je 0x755e1 jmp 0x75454 movl -0x38(%rbp), %eax subl $0x195, %eax # imm = 0x195 je 0x75600 jmp 0x75464 movl -0x38(%rbp), %eax subl $0x196, %eax # imm = 0x196 je 0x7561f jmp 0x75474 movl -0x38(%rbp), %eax subl $0x197, %eax # imm = 0x197 je 0x7563b jmp 0x75484 movl -0x38(%rbp), %eax subl $0x198, %eax # imm = 0x198 je 0x75657 jmp 0x75494 movl -0x38(%rbp), %eax subl $0x199, %eax # imm = 0x199 je 0x75673 jmp 0x754a4 movl -0x38(%rbp), %eax subl $0x19a, %eax # imm = 0x19A je 0x7568f jmp 0x754b4 movl -0x38(%rbp), %eax subl $0x19b, %eax # imm = 0x19B je 0x75546 jmp 0x754c4 movl -0x38(%rbp), %eax subl $0x19c, %eax # imm = 0x19C je 0x75565 jmp 0x756ab movq -0x20(%rbp), %rax cmpq $0x0, 0x690(%rax) je 0x754fb movq -0x20(%rbp), %rax movq 0x688(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x718(%rax) movq -0x20(%rbp), %rax movq 0x7a8(%rax), %rax cmpq $0x0, 0xa8(%rax) je 0x75534 movq -0x20(%rbp), %rax movq 0x7a8(%rax), %rax movq 0xa8(%rax), %rax movq -0x20(%rbp), %rdi addq $0x6e0, %rdi # imm = 0x6E0 callq *%rax movl %eax, -0x3c(%rbp) jmp 0x7553b xorl %eax, %eax movl %eax, -0x3c(%rbp) jmp 0x7553b movl -0x3c(%rbp), %eax movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x10699(%rip), %rsi # 0x85bea xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x10690(%rip), %rsi # 0x85c00 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x10686(%rip), %rsi # 0x85c15 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x10681(%rip), %rsi # 0x85c2f xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x1067b(%rip), %rsi # 0x85c48 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x10678(%rip), %rsi # 0x85c64 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x10674(%rip), %rsi # 0x85c7f xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x10670(%rip), %rsi # 0x85c9a xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x1066e(%rip), %rsi # 0x85cb4 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x10663(%rip), %rsi # 0x85cc5 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x10657(%rip), %rsi # 0x85cd5 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movq -0x8(%rbp), %rdi leaq 0x1064c(%rip), %rsi # 0x85ce6 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0x76690 movl %eax, -0x30(%rbp) jmp 0x756b2 movl $0x0, -0x30(%rbp) movl -0x30(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
cs_leave: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax+140h] mov [rbp+var_20], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call cs_file_sec mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_753F6 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_34], eax jmp short loc_753FD loc_753F6: xor eax, eax mov [rbp+var_34], eax jmp short $+2 loc_753FD: mov eax, [rbp+var_34] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov [rbp+var_38], eax sub eax, 9 jz loc_754D7 jmp short $+2 loc_75414: mov eax, [rbp+var_38] sub eax, 191h jz loc_75584 jmp short $+2 loc_75424: mov eax, [rbp+var_38] sub eax, 192h jz loc_755A3 jmp short $+2 loc_75434: mov eax, [rbp+var_38] sub eax, 193h jz loc_755C2 jmp short $+2 loc_75444: mov eax, [rbp+var_38] sub eax, 194h jz loc_755E1 jmp short $+2 loc_75454: mov eax, [rbp+var_38] sub eax, 195h jz loc_75600 jmp short $+2 loc_75464: mov eax, [rbp+var_38] sub eax, 196h jz loc_7561F jmp short $+2 loc_75474: mov eax, [rbp+var_38] sub eax, 197h jz loc_7563B jmp short $+2 loc_75484: mov eax, [rbp+var_38] sub eax, 198h jz loc_75657 jmp short $+2 loc_75494: mov eax, [rbp+var_38] sub eax, 199h jz loc_75673 jmp short $+2 loc_754A4: mov eax, [rbp+var_38] sub eax, 19Ah jz loc_7568F jmp short $+2 loc_754B4: mov eax, [rbp+var_38] sub eax, 19Bh jz loc_75546 jmp short $+2 loc_754C4: mov eax, [rbp+var_38] sub eax, 19Ch jz loc_75565 jmp loc_756AB loc_754D7: mov rax, [rbp+var_20] cmp qword ptr [rax+690h], 0 jz short loc_754FB mov rax, [rbp+var_20] mov rcx, [rax+688h] mov rax, [rbp+var_20] mov [rax+718h], rcx loc_754FB: mov rax, [rbp+var_20] mov rax, [rax+7A8h] cmp qword ptr [rax+0A8h], 0 jz short loc_75534 mov rax, [rbp+var_20] mov rax, [rax+7A8h] mov rax, [rax+0A8h] mov rdi, [rbp+var_20] add rdi, 6E0h call rax mov [rbp+var_3C], eax jmp short loc_7553B loc_75534: xor eax, eax mov [rbp+var_3C], eax jmp short $+2 loc_7553B: mov eax, [rbp+var_3C] mov [rbp+var_30], eax jmp loc_756B2 loc_75546: mov rdi, [rbp+var_8] lea rsi, aFirstNonIgnora; "[first non-ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_756B2 loc_75565: mov rdi, [rbp+var_8] lea rsi, aLastNonIgnorab; "[last non-ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_756B2 loc_75584: mov rdi, [rbp+var_8] lea rsi, aFirstPrimaryIg; "[first primary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_756B2 loc_755A3: mov rdi, [rbp+var_8] lea rsi, aLastPrimaryIgn; "[last primary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_756B2 loc_755C2: mov rdi, [rbp+var_8] lea rsi, aFirstSecondary; "[first secondary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_756B2 loc_755E1: mov rdi, [rbp+var_8] lea rsi, aLastSecondaryI; "[last secondary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_756B2 loc_75600: mov rdi, [rbp+var_8] lea rsi, aFirstTertiaryI; "[first tertiary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_756B2 loc_7561F: mov rdi, [rbp+var_8] lea rsi, aLastTertiaryIg; "[last tertiary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_756B2 loc_7563B: mov rdi, [rbp+var_8] lea rsi, aFirstTrailing; "[first trailing]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_756B2 loc_75657: mov rdi, [rbp+var_8] lea rsi, aLastTrailing; "[last trailing]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_756B2 loc_75673: mov rdi, [rbp+var_8] lea rsi, aFirstVariable; "[first variable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_756B2 loc_7568F: mov rdi, [rbp+var_8] lea rsi, aLastVariable; "[last variable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_756B2 loc_756AB: mov [rbp+var_30], 0 loc_756B2: mov eax, [rbp+var_30] add rsp, 40h pop rbp retn
long long cs_leave(long long a1, long long a2, long long a3) { int v5; // [rsp+Ch] [rbp-34h] int *v7; // [rsp+18h] [rbp-28h] _QWORD *v8; // [rsp+20h] [rbp-20h] v8 = *(_QWORD **)(a1 + 320); v7 = (int *)cs_file_sec(a2, a3); if ( v7 ) v5 = *v7; else v5 = 0; switch ( v5 ) { case 9: if ( v8[210] ) v8[227] = v8[209]; if ( *(_QWORD *)(v8[245] + 168LL) ) return (unsigned int)(*(long long ( **)(_QWORD *))(v8[245] + 168LL))(v8 + 220); else return 0; case 401: return (unsigned int)tailoring_append(a1, "[first primary ignorable]", 0LL); case 402: return (unsigned int)tailoring_append(a1, "[last primary ignorable]", 0LL); case 403: return (unsigned int)tailoring_append(a1, "[first secondary ignorable]", 0LL); case 404: return (unsigned int)tailoring_append(a1, "[last secondary ignorable]", 0LL); case 405: return (unsigned int)tailoring_append(a1, "[first tertiary ignorable]", 0LL); case 406: return (unsigned int)tailoring_append(a1, "[last tertiary ignorable]", 0LL); case 407: return (unsigned int)tailoring_append(a1, "[first trailing]", 0LL); case 408: return (unsigned int)tailoring_append(a1, "[last trailing]", 0LL); case 409: return (unsigned int)tailoring_append(a1, "[first variable]", 0LL); case 410: return (unsigned int)tailoring_append(a1, "[last variable]", 0LL); case 411: return (unsigned int)tailoring_append(a1, "[first non-ignorable]", 0LL); case 412: return (unsigned int)tailoring_append(a1, "[last non-ignorable]", 0LL); default: return 0; } }
cs_leave: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00176600 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x001753f6 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX JMP 0x001753fd LAB_001753f6: XOR EAX,EAX MOV dword ptr [RBP + -0x34],EAX JMP 0x001753fd LAB_001753fd: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x38],EAX SUB EAX,0x9 JZ 0x001754d7 JMP 0x00175414 LAB_00175414: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x191 JZ 0x00175584 JMP 0x00175424 LAB_00175424: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x192 JZ 0x001755a3 JMP 0x00175434 LAB_00175434: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x193 JZ 0x001755c2 JMP 0x00175444 LAB_00175444: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x194 JZ 0x001755e1 JMP 0x00175454 LAB_00175454: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x195 JZ 0x00175600 JMP 0x00175464 LAB_00175464: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x196 JZ 0x0017561f JMP 0x00175474 LAB_00175474: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x197 JZ 0x0017563b JMP 0x00175484 LAB_00175484: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x198 JZ 0x00175657 JMP 0x00175494 LAB_00175494: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x199 JZ 0x00175673 JMP 0x001754a4 LAB_001754a4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x19a JZ 0x0017568f JMP 0x001754b4 LAB_001754b4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x19b JZ 0x00175546 JMP 0x001754c4 LAB_001754c4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x19c JZ 0x00175565 JMP 0x001756ab LAB_001754d7: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x690],0x0 JZ 0x001754fb MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x688] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x718],RCX LAB_001754fb: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x7a8] CMP qword ptr [RAX + 0xa8],0x0 JZ 0x00175534 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x7a8] MOV RAX,qword ptr [RAX + 0xa8] MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x6e0 CALL RAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x0017553b LAB_00175534: XOR EAX,EAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x0017553b LAB_0017553b: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_00175546: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185bea] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_00175565: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185c00] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_00175584: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185c15] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_001755a3: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185c2f] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_001755c2: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185c48] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_001755e1: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185c64] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_00175600: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185c7f] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_0017561f: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185c9a] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_0017563b: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185cb4] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_00175657: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185cc5] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_00175673: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185cd5] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_0017568f: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x185ce6] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x00176690 MOV dword ptr [RBP + -0x30],EAX JMP 0x001756b2 LAB_001756ab: MOV dword ptr [RBP + -0x30],0x0 LAB_001756b2: MOV EAX,dword ptr [RBP + -0x30] ADD RSP,0x40 POP RBP RET
int4 cs_leave(long param_1,int8 param_2,int8 param_3) { long lVar1; int *piVar2; int4 local_44; int local_3c; int4 local_38; lVar1 = *(long *)(param_1 + 0x140); piVar2 = (int *)cs_file_sec(param_2,param_3); if (piVar2 == (int *)0x0) { local_3c = 0; } else { local_3c = *piVar2; } if (local_3c == 9) { if (*(long *)(lVar1 + 0x690) != 0) { *(int8 *)(lVar1 + 0x718) = *(int8 *)(lVar1 + 0x688); } if (*(long *)(*(long *)(lVar1 + 0x7a8) + 0xa8) == 0) { local_44 = 0; } else { local_44 = (**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa8))(lVar1 + 0x6e0); } local_38 = local_44; } else if (local_3c == 0x191) { local_38 = tailoring_append(param_1,"[first primary ignorable]",0); } else if (local_3c == 0x192) { local_38 = tailoring_append(param_1,"[last primary ignorable]",0); } else if (local_3c == 0x193) { local_38 = tailoring_append(param_1,"[first secondary ignorable]",0); } else if (local_3c == 0x194) { local_38 = tailoring_append(param_1,"[last secondary ignorable]",0); } else if (local_3c == 0x195) { local_38 = tailoring_append(param_1,"[first tertiary ignorable]",0); } else if (local_3c == 0x196) { local_38 = tailoring_append(param_1,"[last tertiary ignorable]",0); } else if (local_3c == 0x197) { local_38 = tailoring_append(param_1,"[first trailing]",0); } else if (local_3c == 0x198) { local_38 = tailoring_append(param_1,"[last trailing]",0); } else if (local_3c == 0x199) { local_38 = tailoring_append(param_1,"[first variable]",0); } else if (local_3c == 0x19a) { local_38 = tailoring_append(param_1,"[last variable]",0); } else if (local_3c == 0x19b) { local_38 = tailoring_append(param_1,"[first non-ignorable]",0); } else if (local_3c == 0x19c) { local_38 = tailoring_append(param_1,"[last non-ignorable]",0); } else { local_38 = 0; } return local_38; }
49,531
google::protobuf::MapValueConstRef::GetInt64Value() const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h
int64_t GetInt64Value() const { TYPE_CHECK(FieldDescriptor::CPPTYPE_INT64, "MapValueConstRef::GetInt64Value"); return *reinterpret_cast<int64_t*>(data_); }
O3
c
google::protobuf::MapValueConstRef::GetInt64Value() const: pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %rbx callq 0x98410 cmpl $0x2, %eax je 0x9bd25 leaq 0xcd254(%rip), %rdx # 0x168ec5 leaq 0x8(%rsp), %r14 movq %r14, %rdi movl $0x3, %esi movl $0x2c6, %ecx # imm = 0x2C6 callq 0x857c2 leaq 0xcd29b(%rip), %rsi # 0x168f2a movq %r14, %rdi callq 0x852c0 leaq 0xcd706(%rip), %rsi # 0x1693a4 movq %rax, %rdi callq 0x852c0 leaq 0xcd2c0(%rip), %rsi # 0x168f6d movq %rax, %rdi callq 0x852c0 leaq 0xcd2c7(%rip), %rsi # 0x168f83 movq %rax, %rdi callq 0x852c0 leaq 0x1708c5(%rip), %r15 # 0x20c590 movq 0x10(%r15), %rsi movq %rax, %rdi callq 0x852c0 leaq 0xd0381(%rip), %rsi # 0x16c05f movq %rax, %rdi callq 0x852c0 leaq 0xcd2a4(%rip), %rsi # 0x168f91 movq %rax, %rdi callq 0x852c0 movq %rax, %r14 movq %rbx, %rdi callq 0x98410 movl %eax, %eax movq (%r15,%rax,8), %rsi movq %r14, %rdi callq 0x852c0 leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x8539a leaq 0x8(%rsp), %rdi callq 0x857e0 movq (%rbx), %rax movq (%rax), %rax addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x9bd37 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x857e0 movq %rbx, %rdi callq 0x2e220
_ZNK6google8protobuf16MapValueConstRef13GetInt64ValueEv: push r15 push r14 push rbx sub rsp, 40h mov rbx, rdi call _ZNK6google8protobuf16MapValueConstRef4typeEv; google::protobuf::MapValueConstRef::type(void) cmp eax, 2 jz loc_9BD25 lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/aimrt_"... lea r14, [rsp+58h+var_50] mov rdi, r14 mov esi, 3 mov ecx, 2C6h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aProtocolBuffer_0; "Protocol Buffer map usage error:\n" mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aMapvalueconstr_1; "MapValueConstRef::GetInt64Value" mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aTypeDoesNotMat; " type does not match\n" mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aExpected; " Expected : " mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea r15, _ZN6google8protobuf15FieldDescriptor14kCppTypeToNameE; google::protobuf::FieldDescriptor::kCppTypeToName mov rsi, [r15+10h] mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aSyntax0+0Fh; "\n" mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aActual_0; " Actual : " mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov r14, rax mov rdi, rbx; this call _ZNK6google8protobuf16MapValueConstRef4typeEv; google::protobuf::MapValueConstRef::type(void) mov eax, eax mov rsi, [r15+rax*8] mov rdi, r14 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+58h+var_51] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_9BD25: mov rax, [rbx] mov rax, [rax] add rsp, 40h pop rbx pop r14 pop r15 retn jmp short $+2 loc_9BD37: mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, rbx call __Unwind_Resume
long long google::protobuf::MapValueConstRef::GetInt64Value(google::protobuf::MapValueConstRef *this) { long long v1; // rax long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // r14 unsigned int v8; // eax google::protobuf::internal::LogMessage *v9; // rax char v11; // [rsp+7h] [rbp-51h] BYREF _BYTE v12[80]; // [rsp+8h] [rbp-50h] BYREF if ( (unsigned int)google::protobuf::MapValueConstRef::type(this) != 2 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v12, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h", 710); v1 = google::protobuf::internal::LogMessage::operator<<((long long)v12, (long long)"Protocol Buffer map usage error:\n"); v2 = google::protobuf::internal::LogMessage::operator<<(v1, (long long)"MapValueConstRef::GetInt64Value"); v3 = google::protobuf::internal::LogMessage::operator<<(v2, (long long)" type does not match\n"); v4 = google::protobuf::internal::LogMessage::operator<<(v3, (long long)" Expected : "); v5 = google::protobuf::internal::LogMessage::operator<<( v4, (long long)*(&google::protobuf::FieldDescriptor::kCppTypeToName + 2)); v6 = google::protobuf::internal::LogMessage::operator<<(v5, (long long)"\n"); v7 = google::protobuf::internal::LogMessage::operator<<(v6, (long long)" Actual : "); v8 = google::protobuf::MapValueConstRef::type(this); v9 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( v7, (long long)*(&google::protobuf::FieldDescriptor::kCppTypeToName + v8)); google::protobuf::internal::LogFinisher::operator=((long long)&v11, v9); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v12); } return **(_QWORD **)this; }
GetInt64Value: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV RBX,RDI CALL 0x00198410 CMP EAX,0x2 JZ 0x0019bd25 LEA RDX,[0x268ec5] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV ESI,0x3 MOV ECX,0x2c6 CALL 0x001857c2 LAB_0019bc88: LEA RSI,[0x268f2a] MOV RDI,R14 CALL 0x001852c0 LEA RSI,[0x2693a4] MOV RDI,RAX CALL 0x001852c0 LEA RSI,[0x268f6d] MOV RDI,RAX CALL 0x001852c0 LEA RSI,[0x268f83] MOV RDI,RAX CALL 0x001852c0 LEA R15,[0x30c590] MOV RSI,qword ptr [R15 + 0x10] MOV RDI,RAX CALL 0x001852c0 LEA RSI,[0x26c05f] MOV RDI,RAX CALL 0x001852c0 LEA RSI,[0x268f91] MOV RDI,RAX CALL 0x001852c0 MOV R14,RAX MOV RDI,RBX CALL 0x00198410 MOV EAX,EAX MOV RSI,qword ptr [R15 + RAX*0x8] MOV RDI,R14 CALL 0x001852c0 LAB_0019bd0e: LEA RDI,[RSP + 0x7] MOV RSI,RAX CALL 0x0018539a LAB_0019bd1b: LEA RDI,[RSP + 0x8] CALL 0x001857e0 LAB_0019bd25: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX] ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* google::protobuf::MapValueConstRef::GetInt64Value() const */ int8 __thiscall google::protobuf::MapValueConstRef::GetInt64Value(MapValueConstRef *this) { int iVar1; uint uVar2; LogMessage *pLVar3; LogFinisher local_51; LogMessage local_50 [56]; iVar1 = type(this); if (iVar1 != 2) { internal::LogMessage::LogMessage (local_50,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h" ,0x2c6); /* try { // try from 0019bc88 to 0019bd0d has its CatchHandler @ 0019bd37 */ pLVar3 = (LogMessage *) internal::LogMessage::operator<<(local_50,"Protocol Buffer map usage error:\n"); pLVar3 = (LogMessage *) internal::LogMessage::operator<<(pLVar3,"MapValueConstRef::GetInt64Value"); pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3," type does not match\n"); pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3," Expected : "); pLVar3 = (LogMessage *) internal::LogMessage::operator<<(pLVar3,(char *)FieldDescriptor::kCppTypeToName._16_8_) ; pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3,"\n"); pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3," Actual : "); uVar2 = type(this); pLVar3 = (LogMessage *) internal::LogMessage::operator<< (pLVar3,*(char **)(FieldDescriptor::kCppTypeToName + (ulong)uVar2 * 8)); /* try { // try from 0019bd0e to 0019bd1a has its CatchHandler @ 0019bd35 */ internal::LogFinisher::operator=(&local_51,pLVar3); internal::LogMessage::~LogMessage(local_50); } return **(int8 **)this; }
49,532
gguf_find_tensor
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
int64_t gguf_find_tensor(const struct gguf_context * ctx, const char * name) { // return -1 if tensor not found int64_t tensor_id = -1; const int64_t n_tensors = gguf_get_n_tensors(ctx); for (int64_t i = 0; i < n_tensors; ++i) { if (strcmp(name, gguf_get_tensor_name(ctx, i)) == 0) { tensor_id = i; break; } } return tensor_id; }
O0
cpp
gguf_find_tensor: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq $-0x1, -0x18(%rbp) movq -0x8(%rbp), %rdi callq 0x49d90 movq %rax, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jge 0x8ca07 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x47e90 movq -0x30(%rbp), %rdi movq %rax, %rsi callq 0x47770 cmpl $0x0, %eax jne 0x8c9f7 movq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x8ca07 jmp 0x8c9f9 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x8c9bd movq -0x18(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
gguf_find_tensor: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], 0FFFFFFFFFFFFFFFFh mov rdi, [rbp+var_8] call _gguf_get_n_tensors mov [rbp+var_20], rax mov [rbp+var_28], 0 loc_8C9BD: mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jge short loc_8CA07 mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_28] call _gguf_get_tensor_name mov rdi, [rbp+var_30] mov rsi, rax call _strcmp cmp eax, 0 jnz short loc_8C9F7 mov rax, [rbp+var_28] mov [rbp+var_18], rax jmp short loc_8CA07 loc_8C9F7: jmp short $+2 loc_8C9F9: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_8C9BD loc_8CA07: mov rax, [rbp+var_18] add rsp, 30h pop rbp retn
long long gguf_find_tensor(long long a1, long long a2) { long long tensor_name; // rax long long i; // [rsp+8h] [rbp-28h] long long n_tensors; // [rsp+10h] [rbp-20h] long long v6; // [rsp+18h] [rbp-18h] v6 = -1LL; n_tensors = gguf_get_n_tensors(a1); for ( i = 0LL; i < n_tensors; ++i ) { tensor_name = gguf_get_tensor_name(a1, i); if ( !(unsigned int)strcmp(a2, tensor_name) ) return i; } return v6; }
gguf_find_tensor: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],-0x1 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00149d90 MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x28],0x0 LAB_0018c9bd: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JGE 0x0018ca07 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00147e90 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,RAX CALL 0x00147770 CMP EAX,0x0 JNZ 0x0018c9f7 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX JMP 0x0018ca07 LAB_0018c9f7: JMP 0x0018c9f9 LAB_0018c9f9: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0018c9bd LAB_0018ca07: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x30 POP RBP RET
long gguf_find_tensor(int8 param_1,char *param_2) { int iVar1; long lVar2; char *__s2; long local_30; lVar2 = gguf_get_n_tensors(param_1); local_30 = 0; while( true ) { if (lVar2 <= local_30) { return -1; } __s2 = (char *)gguf_get_tensor_name(param_1,local_30); iVar1 = strcmp(param_2,__s2); if (iVar1 == 0) break; local_30 = local_30 + 1; } return local_30; }
49,533
gguf_find_tensor
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
int64_t gguf_find_tensor(const struct gguf_context * ctx, const char * name) { // return -1 if tensor not found int64_t tensor_id = -1; const int64_t n_tensors = gguf_get_n_tensors(ctx); for (int64_t i = 0; i < n_tensors; ++i) { if (strcmp(name, gguf_get_tensor_name(ctx, i)) == 0) { tensor_id = i; break; } } return tensor_id; }
O1
cpp
gguf_find_tensor: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0x28(%rdi), %rax subq 0x20(%rdi), %rax movq $-0x1, %rbx testq %rax, %rax jle 0x3f61f movq %rsi, %r14 movq %rdi, %r15 movabsq $-0x417d05f417d05f41, %rcx # imm = 0xBE82FA0BE82FA0BF mulq %rcx shrq $0x8, %rdx cmpq $0x2, %rdx movl $0x1, %r13d cmovgeq %rdx, %r13 xorl %r12d, %r12d movq %r15, %rdi movq %r12, %rsi callq 0x189d0 movq %r14, %rdi movq %rax, %rsi callq 0x18810 testl %eax, %eax je 0x3f61c incq %r12 cmpq %r12, %r13 jne 0x3f5f8 jmp 0x3f61f movq %r12, %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
gguf_find_tensor: push r15 push r14 push r13 push r12 push rbx mov rax, [rdi+28h] sub rax, [rdi+20h] mov rbx, 0FFFFFFFFFFFFFFFFh test rax, rax jle short loc_3F61F mov r14, rsi mov r15, rdi mov rcx, 0BE82FA0BE82FA0BFh mul rcx shr rdx, 8 cmp rdx, 2 mov r13d, 1 cmovge r13, rdx xor r12d, r12d loc_3F5F8: mov rdi, r15 mov rsi, r12 call _gguf_get_tensor_name mov rdi, r14 mov rsi, rax call _strcmp test eax, eax jz short loc_3F61C inc r12 cmp r13, r12 jnz short loc_3F5F8 jmp short loc_3F61F loc_3F61C: mov rbx, r12 loc_3F61F: mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long gguf_find_tensor(long long a1, long long a2) { long long v2; // rax long long v3; // rbx unsigned long long v4; // r13 long long v5; // r12 long long tensor_name; // rax v2 = *(_QWORD *)(a1 + 40) - *(_QWORD *)(a1 + 32); v3 = -1LL; if ( v2 > 0 ) { v4 = 1LL; if ( (long long)(v2 / 0x158uLL) >= 2 ) v4 = v2 / 0x158uLL; v5 = 0LL; while ( 1 ) { tensor_name = gguf_get_tensor_name(a1, v5); if ( !(unsigned int)strcmp(a2, tensor_name) ) break; if ( v4 == ++v5 ) return v3; } return v5; } return v3; }
gguf_find_tensor: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RAX,qword ptr [RDI + 0x28] SUB RAX,qword ptr [RDI + 0x20] MOV RBX,-0x1 TEST RAX,RAX JLE 0x0013f61f MOV R14,RSI MOV R15,RDI MOV RCX,-0x417d05f417d05f41 MUL RCX SHR RDX,0x8 CMP RDX,0x2 MOV R13D,0x1 CMOVGE R13,RDX XOR R12D,R12D LAB_0013f5f8: MOV RDI,R15 MOV RSI,R12 CALL 0x001189d0 MOV RDI,R14 MOV RSI,RAX CALL 0x00118810 TEST EAX,EAX JZ 0x0013f61c INC R12 CMP R13,R12 JNZ 0x0013f5f8 JMP 0x0013f61f LAB_0013f61c: MOV RBX,R12 LAB_0013f61f: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
ulong gguf_find_tensor(long param_1,char *param_2) { int iVar1; ulong uVar2; char *__s2; ulong uVar3; uVar2 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20); if (0 < (long)uVar2) { uVar2 = uVar2 / 0x158; uVar3 = 1; if (1 < uVar2) { uVar3 = uVar2; } uVar2 = 0; do { __s2 = (char *)gguf_get_tensor_name(param_1,uVar2); iVar1 = strcmp(param_2,__s2); if (iVar1 == 0) { return uVar2; } uVar2 = uVar2 + 1; } while (uVar3 != uVar2); } return 0xffffffffffffffff; }
49,534
gguf_find_tensor
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
int64_t gguf_find_tensor(const struct gguf_context * ctx, const char * name) { // return -1 if tensor not found int64_t tensor_id = -1; const int64_t n_tensors = gguf_get_n_tensors(ctx); for (int64_t i = 0; i < n_tensors; ++i) { if (strcmp(name, gguf_get_tensor_name(ctx, i)) == 0) { tensor_id = i; break; } } return tensor_id; }
O3
cpp
gguf_find_tensor: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0x28(%rdi), %rax subq 0x20(%rdi), %rax movq $-0x1, %rbx testq %rax, %rax jle 0x3ed10 movq %rsi, %r14 movq %rdi, %r15 movabsq $-0x417d05f417d05f41, %rcx # imm = 0xBE82FA0BE82FA0BF mulq %rcx movq %rdx, %r12 shrq $0x8, %r12 cmpq $0x1, %r12 adcq $0x0, %r12 xorl %r13d, %r13d movq %r15, %rdi movq %r13, %rsi callq 0x179c0 movq %r14, %rdi movq %rax, %rsi callq 0x17800 testl %eax, %eax je 0x3ed0d incq %r13 cmpq %r13, %r12 jne 0x3ece9 jmp 0x3ed10 movq %r13, %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
gguf_find_tensor: push r15 push r14 push r13 push r12 push rbx mov rax, [rdi+28h] sub rax, [rdi+20h] mov rbx, 0FFFFFFFFFFFFFFFFh test rax, rax jle short loc_3ED10 mov r14, rsi mov r15, rdi mov rcx, 0BE82FA0BE82FA0BFh mul rcx mov r12, rdx shr r12, 8 cmp r12, 1 adc r12, 0 xor r13d, r13d loc_3ECE9: mov rdi, r15 mov rsi, r13 call _gguf_get_tensor_name mov rdi, r14 mov rsi, rax call _strcmp test eax, eax jz short loc_3ED0D inc r13 cmp r12, r13 jnz short loc_3ECE9 jmp short loc_3ED10 loc_3ED0D: mov rbx, r13 loc_3ED10: mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long gguf_find_tensor(long long a1, long long a2) { unsigned long long v2; // rax long long v3; // rbx unsigned long long v4; // r12 long long v5; // r13 long long tensor_name; // rax v3 = -1LL; if ( (long long)(*(_QWORD *)(a1 + 40) - *(_QWORD *)(a1 + 32)) > 0 ) { v2 = *(_QWORD *)(a1 + 40) - *(_QWORD *)(a1 + 32); v4 = (v2 / 0x158 == 0) + v2 / 0x158; v5 = 0LL; while ( 1 ) { tensor_name = gguf_get_tensor_name(a1, v5); if ( !(unsigned int)strcmp(a2, tensor_name) ) break; if ( v4 == ++v5 ) return v3; } return v5; } return v3; }
gguf_find_tensor: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RAX,qword ptr [RDI + 0x28] SUB RAX,qword ptr [RDI + 0x20] MOV RBX,-0x1 TEST RAX,RAX JLE 0x0013ed10 MOV R14,RSI MOV R15,RDI MOV RCX,-0x417d05f417d05f41 MUL RCX MOV R12,RDX SHR R12,0x8 CMP R12,0x1 ADC R12,0x0 XOR R13D,R13D LAB_0013ece9: MOV RDI,R15 MOV RSI,R13 CALL 0x001179c0 MOV RDI,R14 MOV RSI,RAX CALL 0x00117800 TEST EAX,EAX JZ 0x0013ed0d INC R13 CMP R12,R13 JNZ 0x0013ece9 JMP 0x0013ed10 LAB_0013ed0d: MOV RBX,R13 LAB_0013ed10: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
long gguf_find_tensor(long param_1,char *param_2) { int iVar1; ulong uVar2; char *__s2; long lVar3; uVar2 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20); if (0 < (long)uVar2) { uVar2 = uVar2 / 0x158; lVar3 = 0; do { __s2 = (char *)gguf_get_tensor_name(param_1,lVar3); iVar1 = strcmp(param_2,__s2); if (iVar1 == 0) { return lVar3; } lVar3 = lVar3 + 1; } while (uVar2 + (uVar2 == 0) != lVar3); } return -1; }
49,535
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O3
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x97018 testb %al, %al je 0xa07df movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x96e06 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0xa07fe movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax movl $0x10, %edi callq 0x1b4d0 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x8a0c8 leaq 0x537b4(%rip), %rsi # 0xf3fda leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x7c85d movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1c0a0 xorl %ebp, %ebp movq 0x8f79a(%rip), %rsi # 0x12ffe8 movq 0x8f6fb(%rip), %rdx # 0x12ff50 movq %rbx, %rdi callq 0x1c1c0 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa087b movq 0x38(%rsp), %rsi incq %rsi callq 0x1ba60 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa0896 movq 0x18(%rsp), %rsi incq %rsi callq 0x1ba60 testb %bpl, %bpl jne 0xa08c0 jmp 0xa08c8 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa08c0 movq 0x18(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0xa08c0 movq %rax, %r14 movq %rbx, %rdi callq 0x1b760 movq %r14, %rdi callq 0x1c250
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_A07DF mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_A07DF: mov rdi, [rbx+68h] test rdi, rdi jz short loc_A07FE mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_A07FE: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUndefinedVaria; "Undefined variable: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+68h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A087B mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A087B: lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A0896 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A0896: test bpl, bpl jnz short loc_A08C0 jmp short loc_A08C8 mov r14, rax lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A08C0 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A08C0 mov r14, rax loc_A08C0: mov rdi, rbx; void * call ___cxa_free_exception loc_A08C8: mov rdi, r14 call __Unwind_Resume
unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3) { long long v4; // rdi void *exception; // rbx _BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF if ( minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) ) return minja::Value::at((minja::Context *)((char *)this + 24), a2); v4 = *((_QWORD *)this + 13); if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2); }
at: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x18] MOV RDI,R15 CALL 0x00197018 TEST AL,AL JZ 0x001a07df MOV RDI,R15 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x00196e06 LAB_001a07df: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x001a07fe MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP RAX LAB_001a07fe: MOV EDI,0x10 CALL 0x0011b4d0 MOV RBX,RAX LAB_001a080b: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0018a0c8 LAB_001a081f: LEA RSI,[0x1f3fda] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0017c85d MOV BPL,0x1 LAB_001a0838: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0011c0a0 XOR EBP,EBP MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,RBX CALL 0x0011c1c0
/* minja::Context::at(minja::Value const&) */ void __thiscall minja::Context::at(Context *this,Value *param_1) { long *plVar1; char cVar2; runtime_error *this_00; int1 local_60 [32]; string local_40 [32]; cVar2 = Value::contains((Value *)(this + 0x18),param_1); if (cVar2 != '\0') { Value::at((Value *)(this + 0x18),param_1); return; } plVar1 = *(long **)(this + 0x68); if (plVar1 != (long *)0x0) { /* WARNING: Could not recover jumptable at 0x001a07fc. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 0x18))(plVar1,param_1); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a080b to 001a081e has its CatchHandler @ 001a08bd */ Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 001a081f to 001a0834 has its CatchHandler @ 001a089d */ std::operator+((char *)local_40,(string *)"Undefined variable: "); /* try { // try from 001a0838 to 001a085c has its CatchHandler @ 001a085d */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); }
49,536
my_copy_fix_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_copy_fix_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { size_t length2, src_offset= src_length % cs->mbminlen; my_char_copy_status_t padstatus; if (!src_offset) return my_copy_fix_mb(cs, dst, dst_length, src, src_length, nchars, status); if ((padstatus= my_copy_incomplete_char(cs, dst, dst_length, src, src_length, nchars, TRUE)) == MY_CHAR_COPY_ERROR) { status->m_source_end_pos= status->m_well_formed_error_pos= src; return 0; } length2= my_copy_fix_mb(cs, dst + cs->mbminlen, dst_length - cs->mbminlen, src + src_offset, src_length - src_offset, nchars - 1, status); if (padstatus == MY_CHAR_COPY_FIXED) status->m_well_formed_error_pos= src; return cs->mbminlen /* The left-padded character */ + length2; }
O3
c
my_copy_fix_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r12 movq %rdx, %r10 movq %rsi, %rbx movq %rdi, %r14 movl 0x98(%rdi), %r13d movq %r8, %rax xorl %edx, %edx divq %r13 testq %rdx, %rdx je 0x2a78d cmpq %r10, %r13 seta %al movq 0x10(%rbp), %rsi testq %r9, %r9 sete %cl orb %al, %cl jne 0x2a81c movq %rdx, %r15 movq %rsi, -0x38(%rbp) movq %r10, -0x40(%rbp) movq %r8, -0x48(%rbp) movq %r9, -0x50(%rbp) subq %rdx, %r13 movq %rbx, %rdi xorl %esi, %esi movq %r13, %rdx callq 0x25180 addq %rbx, %r13 movq %r13, %rdi movq %r12, -0x58(%rbp) movq %r12, %rsi movq %r15, %rdx callq 0x25510 movl 0x98(%r14), %edx addq %rbx, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0xc0(%rax) movl 0x98(%r14), %r13d cmpl %r13d, %eax movl %eax, -0x2c(%rbp) jne 0x2a7ac movq -0x58(%rbp), %r12 movq -0x50(%rbp), %r9 movq -0x48(%rbp), %r8 movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi jmp 0x2a7e2 movq %r14, %rdi movq %rbx, %rsi movq %r10, %rdx movq %r12, %rcx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3ad66 movq 0xb8(%r14), %rax leaq (%rbx,%r13), %rcx movl $0x3f, %esi movq %r14, %rdi movq %rbx, %rdx callq *0x30(%rax) cmpl 0x98(%r14), %eax movq -0x58(%rbp), %r12 movq -0x50(%rbp), %r9 movq -0x48(%rbp), %r8 movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi jne 0x2a81c movl %eax, %eax addq %rax, %rbx subq %rax, %rdx leaq (%r12,%r15), %rcx subq %r15, %r8 decq %r9 movq %rsi, (%rsp) movq %r14, %rdi movq %rsi, %r15 movq %rbx, %rsi callq 0x3ad66 cmpl %r13d, -0x2c(%rbp) je 0x2a810 movq %r12, 0x8(%r15) movl 0x98(%r14), %ecx addq %rcx, %rax jmp 0x2a825 movq %r12, 0x8(%rsi) movq %r12, (%rsi) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_copy_fix_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rcx mov r10, rdx mov rbx, rsi mov r14, rdi mov r13d, [rdi+98h] mov rax, r8 xor edx, edx div r13 test rdx, rdx jz loc_2A78D cmp r13, r10 setnbe al mov rsi, [rbp+arg_0] test r9, r9 setz cl or cl, al jnz loc_2A81C mov r15, rdx mov [rbp+var_38], rsi mov [rbp+var_40], r10 mov [rbp+var_48], r8 mov [rbp+var_50], r9 sub r13, rdx mov rdi, rbx xor esi, esi mov rdx, r13 call _memset add r13, rbx mov rdi, r13 mov [rbp+var_58], r12 mov rsi, r12 mov rdx, r15 call _memmove mov edx, [r14+98h] add rdx, rbx mov rax, [r14+0B8h] mov rdi, r14 mov rsi, rbx call qword ptr [rax+0C0h] mov r13d, [r14+98h] cmp eax, r13d mov [rbp+var_2C], eax jnz short loc_2A7AC mov r12, [rbp+var_58] mov r9, [rbp+var_50] mov r8, [rbp+var_48] mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] jmp short loc_2A7E2 loc_2A78D: mov rdi, r14 mov rsi, rbx mov rdx, r10 mov rcx, r12 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_copy_fix_mb loc_2A7AC: mov rax, [r14+0B8h] lea rcx, [rbx+r13] mov esi, 3Fh ; '?' mov rdi, r14 mov rdx, rbx call qword ptr [rax+30h] cmp eax, [r14+98h] mov r12, [rbp+var_58] mov r9, [rbp+var_50] mov r8, [rbp+var_48] mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] jnz short loc_2A81C loc_2A7E2: mov eax, eax add rbx, rax sub rdx, rax lea rcx, [r12+r15] sub r8, r15 dec r9 mov [rsp+60h+var_60], rsi mov rdi, r14 mov r15, rsi mov rsi, rbx call my_copy_fix_mb cmp [rbp+var_2C], r13d jz short loc_2A810 mov [r15+8], r12 loc_2A810: mov ecx, [r14+98h] add rax, rcx jmp short loc_2A825 loc_2A81C: mov [rsi+8], r12 mov [rsi], r12 xor eax, eax loc_2A825: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_copy_fix_mb2_or_mb4( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, long long a6, _QWORD *a7) { unsigned long long v9; // r13 _QWORD *v10; // rsi unsigned long long v11; // r15 unsigned long long v12; // r13 int v13; // eax long long v14; // r13 int v15; // r9d int v16; // r8d int v17; // edx long long fixed; // rax int v20; // [rsp+10h] [rbp-50h] int v21; // [rsp+18h] [rbp-48h] int v22; // [rsp+20h] [rbp-40h] int v23; // [rsp+34h] [rbp-2Ch] v9 = *(unsigned int *)(a1 + 152); if ( !(a5 % v9) ) return my_copy_fix_mb(a1, a2, a3, a4, a5, a6, (long long)a7); v10 = a7; if ( v9 > a3 || a6 == 0 ) goto LABEL_10; v11 = a5 % *(unsigned int *)(a1 + 152); v22 = a3; v21 = a5; v20 = a6; v12 = v9 - a5 % v9; memset(a2, 0LL, v12); memmove(a2 + v12, a4, v11); v13 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, a2, a2 + *(unsigned int *)(a1 + 152)); v14 = *(unsigned int *)(a1 + 152); v23 = v13; if ( v13 != (_DWORD)v14 ) { v13 = (*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, 63LL, a2, a2 + v14); v15 = v20; v16 = v21; v17 = v22; v10 = a7; if ( v13 == *(_DWORD *)(a1 + 152) ) goto LABEL_7; LABEL_10: v10[1] = a4; *v10 = a4; return 0LL; } v15 = v20; v16 = v21; v17 = v22; v10 = a7; LABEL_7: fixed = my_copy_fix_mb(a1, v13 + (int)a2, v17 - v13, (int)a4 + (int)v11, v16 - (int)v11, v15 - 1, (long long)v10); if ( v23 != (_DWORD)v14 ) v10[1] = a4; return *(unsigned int *)(a1 + 152) + fixed; }
my_copy_fix_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RCX MOV R10,RDX MOV RBX,RSI MOV R14,RDI MOV R13D,dword ptr [RDI + 0x98] MOV RAX,R8 XOR EDX,EDX DIV R13 TEST RDX,RDX JZ 0x0012a78d CMP R13,R10 SETA AL MOV RSI,qword ptr [RBP + 0x10] TEST R9,R9 SETZ CL OR CL,AL JNZ 0x0012a81c MOV R15,RDX MOV qword ptr [RBP + -0x38],RSI MOV qword ptr [RBP + -0x40],R10 MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RBP + -0x50],R9 SUB R13,RDX MOV RDI,RBX XOR ESI,ESI MOV RDX,R13 CALL 0x00125180 ADD R13,RBX MOV RDI,R13 MOV qword ptr [RBP + -0x58],R12 MOV RSI,R12 MOV RDX,R15 CALL 0x00125510 MOV EDX,dword ptr [R14 + 0x98] ADD RDX,RBX MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0xc0] MOV R13D,dword ptr [R14 + 0x98] CMP EAX,R13D MOV dword ptr [RBP + -0x2c],EAX JNZ 0x0012a7ac MOV R12,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] JMP 0x0012a7e2 LAB_0012a78d: MOV RDI,R14 MOV RSI,RBX MOV RDX,R10 MOV RCX,R12 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013ad66 LAB_0012a7ac: MOV RAX,qword ptr [R14 + 0xb8] LEA RCX,[RBX + R13*0x1] MOV ESI,0x3f MOV RDI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x30] CMP EAX,dword ptr [R14 + 0x98] MOV R12,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] JNZ 0x0012a81c LAB_0012a7e2: MOV EAX,EAX ADD RBX,RAX SUB RDX,RAX LEA RCX,[R12 + R15*0x1] SUB R8,R15 DEC R9 MOV qword ptr [RSP],RSI MOV RDI,R14 MOV R15,RSI MOV RSI,RBX CALL 0x0013ad66 CMP dword ptr [RBP + -0x2c],R13D JZ 0x0012a810 MOV qword ptr [R15 + 0x8],R12 LAB_0012a810: MOV ECX,dword ptr [R14 + 0x98] ADD RAX,RCX JMP 0x0012a825 LAB_0012a81c: MOV qword ptr [RSI + 0x8],R12 MOV qword ptr [RSI],R12 XOR EAX,EAX LAB_0012a825: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_copy_fix_mb2_or_mb4 (long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,long param_6, int8 *param_7) { uint uVar1; uint uVar2; uint uVar3; long lVar4; ulong __n; ulong uVar5; uVar5 = (ulong)*(uint *)(param_1 + 0x98); __n = param_5 % uVar5; if (__n == 0) { lVar4 = my_copy_fix_mb(param_1,param_2,param_3,param_4); return lVar4; } if (param_6 != 0 && uVar5 <= param_3) { memset(param_2,0,uVar5 - __n); memmove((void *)((uVar5 - __n) + (long)param_2),param_4,__n); uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,param_2,(ulong)*(uint *)(param_1 + 0x98) + (long)param_2); uVar1 = *(uint *)(param_1 + 0x98); uVar3 = uVar2; if ((uVar2 == uVar1) || (uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,0x3f,param_2,(long)param_2 + (ulong)uVar1), uVar3 == *(uint *)(param_1 + 0x98))) { lVar4 = my_copy_fix_mb(param_1,(long)param_2 + (ulong)uVar3,param_3 - uVar3, (long)param_4 + __n,param_5 - __n,param_6 + -1,param_7); if (uVar2 != uVar1) { param_7[1] = param_4; } return lVar4 + (ulong)*(uint *)(param_1 + 0x98); } } param_7[1] = param_4; *param_7 = param_4; return 0; }
49,537
read_block_primary
eloqsql/mysys/mf_keycache.c
static void read_block_primary(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, uint read_length, uint min_length) { size_t got_length; /* On entry cache_lock is locked */ KEYCACHE_THREAD_TRACE("read_block_primary"); /* This code is executed only by threads that submitted primary requests. Until block->status contains BLOCK_READ, all other request for the block become secondary requests. For a primary request the block must be properly initialized. */ DBUG_ASSERT(((block->status & ~BLOCK_FOR_UPDATE) == BLOCK_IN_USE) || fail_block(block)); DBUG_ASSERT((block->length == 0) || fail_block(block)); DBUG_ASSERT((block->offset == keycache->key_cache_block_size) || fail_block(block)); DBUG_ASSERT((block->requests > 0) || fail_block(block)); KEYCACHE_DBUG_PRINT("read_block_primary", ("page to be read by primary request")); keycache->global_cache_read++; /* Page is not in buffer yet, is to be read from disk */ keycache_pthread_mutex_unlock(&keycache->cache_lock); /* Here other threads may step in and register as secondary readers. They will register in block->wqueue[COND_FOR_REQUESTED]. */ got_length= my_pread(block->hash_link->file, block->buffer, read_length, block->hash_link->diskpos, MYF(0)); keycache_pthread_mutex_lock(&keycache->cache_lock); /* The block can now have been marked for free (in case of FLUSH_RELEASE). Otherwise the state must be unchanged. */ DBUG_ASSERT(((block->status & ~(BLOCK_REASSIGNED | BLOCK_FOR_UPDATE)) == BLOCK_IN_USE) || fail_block(block)); DBUG_ASSERT((block->length == 0) || fail_block(block)); DBUG_ASSERT((block->offset == keycache->key_cache_block_size) || fail_block(block)); DBUG_ASSERT((block->requests > 0) || fail_block(block)); if (got_length < min_length) block->status|= BLOCK_ERROR; else { block->status|= BLOCK_READ; block->length= (uint)got_length; /* Do not set block->offset here. If this block is marked BLOCK_CHANGED later, we want to flush only the modified part. So only a writer may set block->offset down from keycache->key_cache_block_size. */ } KEYCACHE_DBUG_PRINT("read_block_primary", ("primary request: new page in cache")); /* Signal that all pending requests for this page now can be processed */ release_whole_queue(&block->wqueue[COND_FOR_REQUESTED]); DBUG_ASSERT(keycache->can_be_used); }
O0
c
read_block_primary: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) jmp 0xe40b8 jmp 0xe40ba jmp 0xe40bc jmp 0xe40be jmp 0xe40c0 jmp 0xe40c2 jmp 0xe40c4 jmp 0xe40c6 jmp 0xe40c8 movq -0x8(%rbp), %rax movq 0x158(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x158(%rax) movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe4040 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rax movq 0x40(%rax), %rsi movl -0x14(%rbp), %eax movl %eax, %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq 0x20(%rax), %rcx xorl %eax, %eax movl %eax, %r8d callq 0xf4660 movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x700b8(%rip), %rsi # 0x1541ea movl $0xa63, %edx # imm = 0xA63 callq 0xe3620 jmp 0xe413e jmp 0xe4140 jmp 0xe4142 jmp 0xe4144 jmp 0xe4146 jmp 0xe4148 jmp 0xe414a movq -0x20(%rbp), %rax movl -0x18(%rbp), %ecx cmpq %rcx, %rax jae 0xe4165 movq -0x10(%rbp), %rax movl 0x50(%rax), %ecx orl $0x1, %ecx movl %ecx, 0x50(%rax) jmp 0xe417f movq -0x10(%rbp), %rax movl 0x50(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x50(%rax) movq -0x20(%rbp), %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4c(%rax) jmp 0xe4181 jmp 0xe4183 movq -0x10(%rbp), %rdi addq $0x28, %rdi callq 0xe5440 jmp 0xe4192 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
read_block_primary: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx jmp short $+2 loc_E40B8: jmp short $+2 loc_E40BA: jmp short $+2 loc_E40BC: jmp short $+2 loc_E40BE: jmp short $+2 loc_E40C0: jmp short $+2 loc_E40C2: jmp short $+2 loc_E40C4: jmp short $+2 loc_E40C6: jmp short $+2 loc_E40C8: mov rax, [rbp+var_8] mov rcx, [rax+158h] add rcx, 1 mov [rax+158h], rcx mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_25 mov rax, [rbp+var_10] mov rax, [rax+20h] mov edi, [rax+18h] mov rax, [rbp+var_10] mov rsi, [rax+40h] mov eax, [rbp+var_14] mov edx, eax mov rax, [rbp+var_10] mov rax, [rax+20h] mov rcx, [rax+20h] xor eax, eax mov r8d, eax call my_pread mov [rbp+var_20], rax mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0A63h call inline_mysql_mutex_lock_24 jmp short $+2 loc_E413E: jmp short $+2 loc_E4140: jmp short $+2 loc_E4142: jmp short $+2 loc_E4144: jmp short $+2 loc_E4146: jmp short $+2 loc_E4148: jmp short $+2 loc_E414A: mov rax, [rbp+var_20] mov ecx, [rbp+var_18] cmp rax, rcx jnb short loc_E4165 mov rax, [rbp+var_10] mov ecx, [rax+50h] or ecx, 1 mov [rax+50h], ecx jmp short loc_E417F loc_E4165: mov rax, [rbp+var_10] mov ecx, [rax+50h] or ecx, 2 mov [rax+50h], ecx mov rax, [rbp+var_20] mov ecx, eax mov rax, [rbp+var_10] mov [rax+4Ch], ecx loc_E417F: jmp short $+2 loc_E4181: jmp short $+2 loc_E4183: mov rdi, [rbp+var_10] add rdi, 28h ; '(' call release_whole_queue jmp short $+2 loc_E4192: add rsp, 20h pop rbp retn
long long read_block_primary(long long a1, long long a2, unsigned int a3, unsigned int a4) { unsigned long long v5; // [rsp+0h] [rbp-20h] ++*(_QWORD *)(a1 + 344); inline_mysql_mutex_unlock_25(a1 + 192); v5 = my_pread( *(unsigned int *)(*(_QWORD *)(a2 + 32) + 24LL), *(_QWORD *)(a2 + 64), a3, *(_QWORD *)(*(_QWORD *)(a2 + 32) + 32LL), 0LL); inline_mysql_mutex_lock_24(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xA63u); if ( v5 >= a4 ) { *(_DWORD *)(a2 + 80) |= 2u; *(_DWORD *)(a2 + 76) = v5; } else { *(_DWORD *)(a2 + 80) |= 1u; } return release_whole_queue(a2 + 40); }
read_block_primary: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX JMP 0x001e40b8 LAB_001e40b8: JMP 0x001e40ba LAB_001e40ba: JMP 0x001e40bc LAB_001e40bc: JMP 0x001e40be LAB_001e40be: JMP 0x001e40c0 LAB_001e40c0: JMP 0x001e40c2 LAB_001e40c2: JMP 0x001e40c4 LAB_001e40c4: JMP 0x001e40c6 LAB_001e40c6: JMP 0x001e40c8 LAB_001e40c8: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x158] ADD RCX,0x1 MOV qword ptr [RAX + 0x158],RCX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e4040 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x40] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x20] XOR EAX,EAX MOV R8D,EAX CALL 0x001f4660 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x2541ea] MOV EDX,0xa63 CALL 0x001e3620 JMP 0x001e413e LAB_001e413e: JMP 0x001e4140 LAB_001e4140: JMP 0x001e4142 LAB_001e4142: JMP 0x001e4144 LAB_001e4144: JMP 0x001e4146 LAB_001e4146: JMP 0x001e4148 LAB_001e4148: JMP 0x001e414a LAB_001e414a: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x18] CMP RAX,RCX JNC 0x001e4165 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x50] OR ECX,0x1 MOV dword ptr [RAX + 0x50],ECX JMP 0x001e417f LAB_001e4165: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x50] OR ECX,0x2 MOV dword ptr [RAX + 0x50],ECX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4c],ECX LAB_001e417f: JMP 0x001e4181 LAB_001e4181: JMP 0x001e4183 LAB_001e4183: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 CALL 0x001e5440 JMP 0x001e4192 LAB_001e4192: ADD RSP,0x20 POP RBP RET
void read_block_primary(long param_1,long param_2,int4 param_3,uint param_4) { ulong uVar1; *(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1; inline_mysql_mutex_unlock(param_1 + 0xc0); uVar1 = my_pread(*(int4 *)(*(long *)(param_2 + 0x20) + 0x18),*(int8 *)(param_2 + 0x40) ,param_3,*(int8 *)(*(long *)(param_2 + 0x20) + 0x20),0); inline_mysql_mutex_lock (param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xa63); if (uVar1 < param_4) { *(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) | 1; } else { *(uint *)(param_2 + 0x50) = *(uint *)(param_2 + 0x50) | 2; *(int *)(param_2 + 0x4c) = (int)uVar1; } release_whole_queue(param_2 + 0x28); return; }
49,538
mi_dynmap_file
eloqsql/storage/myisam/mi_dynrec.c
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size) { DBUG_ENTER("mi_dynmap_file"); if (size == 0 || size > (my_off_t) (~((size_t) 0))) { if (size) DBUG_PRINT("warning", ("File is too large for mmap")); else DBUG_PRINT("warning", ("Do not mmap zero-length")); DBUG_RETURN(1); } /* I wonder if it is good to use MAP_NORESERVE. From the Linux man page: MAP_NORESERVE Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible to modify the mapping. When swap space is not reserved one might get SIGSEGV upon a write if no physical memory is available. */ info->s->file_map= (uchar*) my_mmap(0, (size_t) size, info->s->mode==O_RDONLY ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NORESERVE, info->dfile, 0L); if (info->s->file_map == (uchar*) MAP_FAILED) { info->s->file_map= NULL; DBUG_RETURN(1); } #if defined(HAVE_MADVISE) madvise((char*) info->s->file_map, size, MADV_RANDOM); #endif info->s->mmaped_length= (size_t) size; info->s->file_read= mi_mmap_pread; info->s->file_write= mi_mmap_pwrite; DBUG_RETURN(0); }
O0
c
mi_dynmap_file: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x2cf5e cmpq $-0x1, -0x18(%rbp) jbe 0x2cf7c cmpq $0x0, -0x18(%rbp) je 0x2cf6b jmp 0x2cf67 jmp 0x2cf69 jmp 0x2cf71 jmp 0x2cf6d jmp 0x2cf6f jmp 0x2cf71 jmp 0x2cf73 movb $0x1, -0x1(%rbp) jmp 0x2d056 movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x358(%rax), %ecx movl $0x3, %edx movl $0x1, %eax cmpl $0x0, %ecx cmovel %eax, %edx movq -0x10(%rbp), %rax movl 0x1c0(%rax), %r8d xorl %eax, %eax movl %eax, %r9d movl $0x4001, %ecx # imm = 0x4001 movq %r9, %rdi callq 0x28340 movq %rax, %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x270(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq $-0x1, %rcx cmpq %rcx, 0x270(%rax) jne 0x2cffa movq -0x10(%rbp), %rax movq (%rax), %rax movq $0x0, 0x270(%rax) movb $0x1, -0x1(%rbp) jmp 0x2d056 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x270(%rax), %rdi movq -0x18(%rbp), %rsi movl $0x1, %edx callq 0x28430 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x4d0(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax leaq 0x2a(%rip), %rcx # 0x2d060 movq %rcx, 0x2e0(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax leaq 0x135(%rip), %rcx # 0x2d180 movq %rcx, 0x2e8(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nop
mi_dynmap_file: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_18], 0 jz short loc_2CF5E cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jbe short loc_2CF7C loc_2CF5E: cmp [rbp+var_18], 0 jz short loc_2CF6B jmp short $+2 loc_2CF67: jmp short $+2 loc_2CF69: jmp short loc_2CF71 loc_2CF6B: jmp short $+2 loc_2CF6D: jmp short $+2 loc_2CF6F: jmp short $+2 loc_2CF71: jmp short $+2 loc_2CF73: mov [rbp+var_1], 1 jmp loc_2D056 loc_2CF7C: mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax] mov ecx, [rax+358h] mov edx, 3 mov eax, 1 cmp ecx, 0 cmovz edx, eax mov rax, [rbp+var_10] mov r8d, [rax+1C0h] xor eax, eax mov r9d, eax mov ecx, 4001h mov rdi, r9 call _mmap64 mov rcx, rax mov rax, [rbp+var_10] mov rax, [rax] mov [rax+270h], rcx mov rax, [rbp+var_10] mov rax, [rax] mov rcx, 0FFFFFFFFFFFFFFFFh cmp [rax+270h], rcx jnz short loc_2CFFA mov rax, [rbp+var_10] mov rax, [rax] mov qword ptr [rax+270h], 0 mov [rbp+var_1], 1 jmp short loc_2D056 loc_2CFFA: mov rax, [rbp+var_10] mov rax, [rax] mov rdi, [rax+270h] mov rsi, [rbp+var_18] mov edx, 1 call _madvise mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+4D0h], rcx mov rax, [rbp+var_10] mov rax, [rax] lea rcx, mi_mmap_pread mov [rax+2E0h], rcx mov rax, [rbp+var_10] mov rax, [rax] lea rcx, mi_mmap_pwrite mov [rax+2E8h], rcx mov [rbp+var_1], 0 loc_2D056: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char mi_dynmap_file(unsigned int *a1, long long a2) { long long v2; // rdx if ( !a2 ) return 1; v2 = 3LL; if ( !*(_DWORD *)(*(_QWORD *)a1 + 856LL) ) v2 = 1LL; *(_QWORD *)(*(_QWORD *)a1 + 624LL) = mmap64(0LL, a2, v2, 16385LL, a1[112]); if ( *(_QWORD *)(*(_QWORD *)a1 + 624LL) == -1LL ) { *(_QWORD *)(*(_QWORD *)a1 + 624LL) = 0LL; return 1; } else { madvise(*(_QWORD *)(*(_QWORD *)a1 + 624LL), a2, 1LL); *(_QWORD *)(*(_QWORD *)a1 + 1232LL) = a2; *(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_mmap_pread; *(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_mmap_pwrite; return 0; } }
mi_dynmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x18],0x0 JZ 0x0012cf5e CMP qword ptr [RBP + -0x18],-0x1 JBE 0x0012cf7c LAB_0012cf5e: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0012cf6b JMP 0x0012cf67 LAB_0012cf67: JMP 0x0012cf69 LAB_0012cf69: JMP 0x0012cf71 LAB_0012cf6b: JMP 0x0012cf6d LAB_0012cf6d: JMP 0x0012cf6f LAB_0012cf6f: JMP 0x0012cf71 LAB_0012cf71: JMP 0x0012cf73 LAB_0012cf73: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012d056 LAB_0012cf7c: MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x358] MOV EDX,0x3 MOV EAX,0x1 CMP ECX,0x0 CMOVZ EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RAX + 0x1c0] XOR EAX,EAX MOV R9D,EAX MOV ECX,0x4001 MOV RDI,R9 CALL 0x00128340 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x270],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,-0x1 CMP qword ptr [RAX + 0x270],RCX JNZ 0x0012cffa MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x270],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012d056 LAB_0012cffa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x270] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x1 CALL 0x00128430 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x4d0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] LEA RCX,[0x12d060] MOV qword ptr [RAX + 0x2e0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] LEA RCX,[0x12d180] MOV qword ptr [RAX + 0x2e8],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_0012d056: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x0012cf65) */ int1 mi_dynmap_file(long *param_1,size_t param_2) { void *pvVar1; int __prot; int1 local_9; if (param_2 == 0) { local_9 = 1; } else { __prot = 3; if (*(int *)(*param_1 + 0x358) == 0) { __prot = 1; } pvVar1 = mmap64((void *)0x0,param_2,__prot,0x4001,(int)param_1[0x38],0); *(void **)(*param_1 + 0x270) = pvVar1; if (*(long *)(*param_1 + 0x270) == -1) { *(int8 *)(*param_1 + 0x270) = 0; local_9 = 1; } else { madvise(*(void **)(*param_1 + 0x270),param_2,1); *(size_t *)(*param_1 + 0x4d0) = param_2; *(code **)(*param_1 + 0x2e0) = mi_mmap_pread; *(code **)(*param_1 + 0x2e8) = mi_mmap_pwrite; local_9 = 0; } } return local_9; }
49,539
google::protobuf::TextFormat::FieldValuePrinter::PrintEnum(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/text_format.cc
std::string TextFormat::FieldValuePrinter::PrintEnum( int32_t val, const std::string& name) const { FORWARD_IMPL(PrintEnum, val, name); }
O3
cpp
google::protobuf::TextFormat::FieldValuePrinter::PrintEnum(int, 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 leaq 0x837cb(%rip), %r15 # 0x100bd8 leaq 0x10(%rsp), %rdi movq %r15, -0x8(%rdi) leaq 0x20(%rsp), %r14 movq %r14, -0x10(%r14) movq $0x0, -0x8(%r14) movb $0x0, (%r14) movq (%rcx), %rsi movq 0x8(%rcx), %rdx callq 0x13c5a leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx addq %rsi, %rdx movq %rbx, %rdi callq 0x13ffc movq %r15, 0x8(%rsp) movq 0x10(%rsp), %rdi cmpq %r14, %rdi je 0x7d467 callq 0xf330 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %r15, 0x8(%rsp) movq 0x10(%rsp), %rdi cmpq %r14, %rdi je 0x7d48b callq 0xf330 movq %rbx, %rdi callq 0xf570 nop
_ZNK6google8protobuf10TextFormat17FieldValuePrinter9PrintEnumEiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdi lea r15, off_100BD8 lea rdi, [rsp+48h+var_38] mov [rdi-8], r15 lea r14, [rsp+48h+var_28] mov [r14-10h], r14 mov qword ptr [r14-8], 0 mov byte ptr [r14], 0 mov rsi, [rcx] mov rdx, [rcx+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) lea rax, [rbx+10h] mov [rbx], rax mov rsi, [rsp+48h+var_38] mov rdx, [rsp+48h+var_30] add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov [rsp+48h+var_40], r15 mov rdi, [rsp+48h+var_38]; void * cmp rdi, r14 jz short loc_7D467 call __ZdlPv; operator delete(void *) loc_7D467: mov rax, rbx add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax mov [rsp+arg_0], r15 mov rdi, [rsp+arg_8]; void * cmp rdi, r14 jz short loc_7D48B call __ZdlPv; operator delete(void *) loc_7D48B: mov rdi, rbx call __Unwind_Resume
_QWORD * google::protobuf::TextFormat::FieldValuePrinter::PrintEnum(_QWORD *a1, int a2, int a3, long long a4) { void *v5; // [rsp+10h] [rbp-38h] BYREF long long v6; // [rsp+18h] [rbp-30h] _BYTE v7[40]; // [rsp+20h] [rbp-28h] BYREF v5 = v7; v6 = 0LL; v7[0] = 0; std::string::append(&v5, *(_BYTE **)a4, *(_QWORD *)(a4 + 8)); *a1 = a1 + 2; std::string::_M_construct<char *>(a1, v5, (long long)v5 + v6); if ( v5 != v7 ) operator delete(v5); return a1; }
PrintEnum: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI LEA R15,[0x200bd8] LEA RDI,[RSP + 0x10] MOV qword ptr [RDI + -0x8],R15 LEA R14,[RSP + 0x20] MOV qword ptr [R14 + -0x10],R14 MOV qword ptr [R14 + -0x8],0x0 MOV byte ptr [R14],0x0 MOV RSI,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x8] LAB_0017d432: CALL 0x00113c5a LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] ADD RDX,RSI MOV RDI,RBX CALL 0x00113ffc LAB_0017d453: MOV qword ptr [RSP + 0x8],R15 MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R14 JZ 0x0017d467 CALL 0x0010f330 LAB_0017d467: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* google::protobuf::TextFormat::FieldValuePrinter::PrintEnum(int, std::__cxx11::string const&) const */ long * google::protobuf::TextFormat::FieldValuePrinter::PrintEnum(int param_1,string *param_2) { int8 *in_RCX; int4 in_register_0000003c; long *plVar1; int1 *local_38; long local_30; int1 local_28 [16]; plVar1 = (long *)CONCAT44(in_register_0000003c,param_1); local_30 = 0; local_28[0] = 0; local_38 = local_28; /* try { // try from 0017d432 to 0017d452 has its CatchHandler @ 0017d474 */ std::__cxx11::string::append((string *)&local_38,(char *)*in_RCX,in_RCX[1]); *plVar1 = (long)(plVar1 + 2); std::__cxx11::string::_M_construct<char*>(plVar1,local_38,local_38 + local_30); if (local_38 != local_28) { operator_delete(local_38); } return plVar1; }
49,540
patricia_node_free
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
INTERNAL void patricia_node_free(node_t* node) { if (!node) return; if (node->type == NODE_TYPE_BRANCH) { for (int i = 0; i < 16; i++) patricia_node_free(node->values.branch.children[i]); if (node->values.branch.value.data) safe_free(node->values.branch.value.data); } else if (node->type == NODE_TYPE_EXTENSION) { if (node->values.extension.path.data) safe_free(node->values.extension.path.data); patricia_node_free(node->values.extension.child); } else if (node->type == NODE_TYPE_LEAF) { if (node->values.leaf.value.data) safe_free(node->values.leaf.value.data); if (node->values.leaf.path.data) safe_free(node->values.leaf.path.data); } safe_free(node); }
O0
c
patricia_node_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x14118 jmp 0x141e6 movq -0x8(%rbp), %rax cmpl $0x2, 0x30(%rax) jne 0x1416c movl $0x0, -0xc(%rbp) cmpl $0x10, -0xc(%rbp) jge 0x1414c movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx movq 0x38(%rax,%rcx,8), %rdi callq 0x14100 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x14129 movq -0x8(%rbp), %rax cmpq $0x0, 0xc0(%rax) je 0x1416a movq -0x8(%rbp), %rax movq 0xc0(%rax), %rdi callq 0x18740 jmp 0x141dd movq -0x8(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0x1419d movq -0x8(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x1418e movq -0x8(%rbp), %rax movq 0x40(%rax), %rdi callq 0x18740 movq -0x8(%rbp), %rax movq 0x48(%rax), %rdi callq 0x14100 jmp 0x141db movq -0x8(%rbp), %rax cmpl $0x0, 0x30(%rax) jne 0x141d9 movq -0x8(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x141bf movq -0x8(%rbp), %rax movq 0x50(%rax), %rdi callq 0x18740 movq -0x8(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x141d7 movq -0x8(%rbp), %rax movq 0x40(%rax), %rdi callq 0x18740 jmp 0x141d9 jmp 0x141db jmp 0x141dd movq -0x8(%rbp), %rdi callq 0x18740 addq $0x10, %rsp popq %rbp retq nopl (%rax)
patricia_node_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jnz short loc_14118 jmp loc_141E6 loc_14118: mov rax, [rbp+var_8] cmp dword ptr [rax+30h], 2 jnz short loc_1416C mov [rbp+var_C], 0 loc_14129: cmp [rbp+var_C], 10h jge short loc_1414C mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] mov rdi, [rax+rcx*8+38h] call patricia_node_free mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_14129 loc_1414C: mov rax, [rbp+var_8] cmp qword ptr [rax+0C0h], 0 jz short loc_1416A mov rax, [rbp+var_8] mov rdi, [rax+0C0h] call safe_free loc_1416A: jmp short loc_141DD loc_1416C: mov rax, [rbp+var_8] cmp dword ptr [rax+30h], 1 jnz short loc_1419D mov rax, [rbp+var_8] cmp qword ptr [rax+40h], 0 jz short loc_1418E mov rax, [rbp+var_8] mov rdi, [rax+40h] call safe_free loc_1418E: mov rax, [rbp+var_8] mov rdi, [rax+48h] call patricia_node_free jmp short loc_141DB loc_1419D: mov rax, [rbp+var_8] cmp dword ptr [rax+30h], 0 jnz short loc_141D9 mov rax, [rbp+var_8] cmp qword ptr [rax+50h], 0 jz short loc_141BF mov rax, [rbp+var_8] mov rdi, [rax+50h] call safe_free loc_141BF: mov rax, [rbp+var_8] cmp qword ptr [rax+40h], 0 jz short loc_141D7 mov rax, [rbp+var_8] mov rdi, [rax+40h] call safe_free loc_141D7: jmp short $+2 loc_141D9: jmp short $+2 loc_141DB: jmp short $+2 loc_141DD: mov rdi, [rbp+var_8] call safe_free loc_141E6: add rsp, 10h pop rbp retn
long long patricia_node_free(long long a1) { long long result; // rax int i; // [rsp+4h] [rbp-Ch] if ( a1 ) { switch ( *(_DWORD *)(a1 + 48) ) { case 2: for ( i = 0; i < 16; ++i ) patricia_node_free(*(_QWORD *)(a1 + 8LL * i + 56)); if ( *(_QWORD *)(a1 + 192) ) safe_free(*(_QWORD *)(a1 + 192)); break; case 1: if ( *(_QWORD *)(a1 + 64) ) safe_free(*(_QWORD *)(a1 + 64)); patricia_node_free(*(_QWORD *)(a1 + 72)); break; case 0: if ( *(_QWORD *)(a1 + 80) ) safe_free(*(_QWORD *)(a1 + 80)); if ( *(_QWORD *)(a1 + 64) ) safe_free(*(_QWORD *)(a1 + 64)); break; } return safe_free(a1); } return result; }
patricia_node_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x00114118 JMP 0x001141e6 LAB_00114118: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x30],0x2 JNZ 0x0011416c MOV dword ptr [RBP + -0xc],0x0 LAB_00114129: CMP dword ptr [RBP + -0xc],0x10 JGE 0x0011414c MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] MOV RDI,qword ptr [RAX + RCX*0x8 + 0x38] CALL 0x00114100 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x00114129 LAB_0011414c: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0xc0],0x0 JZ 0x0011416a MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0xc0] CALL 0x00118740 LAB_0011416a: JMP 0x001141dd LAB_0011416c: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x0011419d MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0011418e MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x40] CALL 0x00118740 LAB_0011418e: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x48] CALL 0x00114100 JMP 0x001141db LAB_0011419d: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x30],0x0 JNZ 0x001141d9 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x50],0x0 JZ 0x001141bf MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x50] CALL 0x00118740 LAB_001141bf: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x40],0x0 JZ 0x001141d7 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x40] CALL 0x00118740 LAB_001141d7: JMP 0x001141d9 LAB_001141d9: JMP 0x001141db LAB_001141db: JMP 0x001141dd LAB_001141dd: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00118740 LAB_001141e6: ADD RSP,0x10 POP RBP RET
void patricia_node_free(long param_1) { int4 local_14; if (param_1 != 0) { if (*(int *)(param_1 + 0x30) == 2) { for (local_14 = 0; local_14 < 0x10; local_14 = local_14 + 1) { patricia_node_free(*(int8 *)(param_1 + 0x38 + (long)local_14 * 8)); } if (*(long *)(param_1 + 0xc0) != 0) { safe_free(*(int8 *)(param_1 + 0xc0)); } } else if (*(int *)(param_1 + 0x30) == 1) { if (*(long *)(param_1 + 0x40) != 0) { safe_free(*(int8 *)(param_1 + 0x40)); } patricia_node_free(*(int8 *)(param_1 + 0x48)); } else if (*(int *)(param_1 + 0x30) == 0) { if (*(long *)(param_1 + 0x50) != 0) { safe_free(*(int8 *)(param_1 + 0x50)); } if (*(long *)(param_1 + 0x40) != 0) { safe_free(*(int8 *)(param_1 + 0x40)); } } safe_free(param_1); } return; }
49,541
patricia_node_free
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
INTERNAL void patricia_node_free(node_t* node) { if (!node) return; if (node->type == NODE_TYPE_BRANCH) { for (int i = 0; i < 16; i++) patricia_node_free(node->values.branch.children[i]); if (node->values.branch.value.data) safe_free(node->values.branch.value.data); } else if (node->type == NODE_TYPE_EXTENSION) { if (node->values.extension.path.data) safe_free(node->values.extension.path.data); patricia_node_free(node->values.extension.child); } else if (node->type == NODE_TYPE_LEAF) { if (node->values.leaf.value.data) safe_free(node->values.leaf.value.data); if (node->values.leaf.path.data) safe_free(node->values.leaf.path.data); } safe_free(node); }
O1
c
patricia_node_free: testq %rdi, %rdi je 0xfe1c pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x30(%rdi), %eax testl %eax, %eax je 0xfe36 cmpl $0x1, %eax je 0xfe1d cmpl $0x2, %eax jne 0xfe52 xorl %r14d, %r14d movq 0x38(%rbx,%r14,8), %rdi callq 0xfde0 incq %r14 cmpq $0x10, %r14 jne 0xfe00 movq 0xc0(%rbx), %rdi jmp 0xfe48 retq movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0xfe2b callq 0x128b8 movq 0x48(%rbx), %rdi callq 0xfde0 jmp 0xfe52 movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0xfe44 callq 0x128b8 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0xfe52 callq 0x128b8 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x128b8
patricia_node_free: test rdi, rdi jz short locret_FE1C push r14 push rbx push rax mov rbx, rdi mov eax, [rdi+30h] test eax, eax jz short loc_FE36 cmp eax, 1 jz short loc_FE1D cmp eax, 2 jnz short loc_FE52 xor r14d, r14d loc_FE00: mov rdi, [rbx+r14*8+38h] call patricia_node_free inc r14 cmp r14, 10h jnz short loc_FE00 mov rdi, [rbx+0C0h] jmp short loc_FE48 locret_FE1C: retn loc_FE1D: mov rdi, [rbx+40h] test rdi, rdi jz short loc_FE2B call safe_free loc_FE2B: mov rdi, [rbx+48h] call patricia_node_free jmp short loc_FE52 loc_FE36: mov rdi, [rbx+50h] test rdi, rdi jz short loc_FE44 call safe_free loc_FE44: mov rdi, [rbx+40h] loc_FE48: test rdi, rdi jz short loc_FE52 call safe_free loc_FE52: mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp safe_free
long long patricia_node_free(long long a1) { long long result; // rax int v3; // eax long long i; // r14 long long v5; // rdi long long v6; // rdi long long v7; // rdi if ( a1 ) { v3 = *(_DWORD *)(a1 + 48); if ( v3 ) { if ( v3 == 1 ) { v6 = *(_QWORD *)(a1 + 64); if ( v6 ) safe_free(v6); patricia_node_free(*(_QWORD *)(a1 + 72)); return safe_free(a1); } if ( v3 != 2 ) return safe_free(a1); for ( i = 0LL; i != 16; ++i ) patricia_node_free(*(_QWORD *)(a1 + 8 * i + 56)); v5 = *(_QWORD *)(a1 + 192); } else { v7 = *(_QWORD *)(a1 + 80); if ( v7 ) safe_free(v7); v5 = *(_QWORD *)(a1 + 64); } if ( v5 ) safe_free(v5); return safe_free(a1); } return result; }
patricia_node_free: TEST RDI,RDI JZ 0x0010fe1c PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x30] TEST EAX,EAX JZ 0x0010fe36 CMP EAX,0x1 JZ 0x0010fe1d CMP EAX,0x2 JNZ 0x0010fe52 XOR R14D,R14D LAB_0010fe00: MOV RDI,qword ptr [RBX + R14*0x8 + 0x38] CALL 0x0010fde0 INC R14 CMP R14,0x10 JNZ 0x0010fe00 MOV RDI,qword ptr [RBX + 0xc0] JMP 0x0010fe48 LAB_0010fe1c: RET LAB_0010fe1d: MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x0010fe2b CALL 0x001128b8 LAB_0010fe2b: MOV RDI,qword ptr [RBX + 0x48] CALL 0x0010fde0 JMP 0x0010fe52 LAB_0010fe36: MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x0010fe44 CALL 0x001128b8 LAB_0010fe44: MOV RDI,qword ptr [RBX + 0x40] LAB_0010fe48: TEST RDI,RDI JZ 0x0010fe52 CALL 0x001128b8 LAB_0010fe52: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001128b8
void patricia_node_free(void *param_1) { int iVar1; void *__ptr; long lVar2; if (param_1 == (void *)0x0) { return; } iVar1 = *(int *)((long)param_1 + 0x30); if (iVar1 == 0) { if (*(void **)((long)param_1 + 0x50) != (void *)0x0) { safe_free(*(void **)((long)param_1 + 0x50)); } __ptr = *(void **)((long)param_1 + 0x40); } else { if (iVar1 == 1) { if (*(void **)((long)param_1 + 0x40) != (void *)0x0) { safe_free(*(void **)((long)param_1 + 0x40)); } patricia_node_free(*(int8 *)((long)param_1 + 0x48)); goto LAB_0010fe52; } if (iVar1 != 2) goto LAB_0010fe52; lVar2 = 0; do { patricia_node_free(*(int8 *)((long)param_1 + lVar2 * 8 + 0x38)); lVar2 = lVar2 + 1; } while (lVar2 != 0x10); __ptr = *(void **)((long)param_1 + 0xc0); } if (__ptr != (void *)0x0) { safe_free(__ptr); } LAB_0010fe52: safe_free(param_1); return; }
49,542
patricia_node_free
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
INTERNAL void patricia_node_free(node_t* node) { if (!node) return; if (node->type == NODE_TYPE_BRANCH) { for (int i = 0; i < 16; i++) patricia_node_free(node->values.branch.children[i]); if (node->values.branch.value.data) safe_free(node->values.branch.value.data); } else if (node->type == NODE_TYPE_EXTENSION) { if (node->values.extension.path.data) safe_free(node->values.extension.path.data); patricia_node_free(node->values.extension.child); } else if (node->type == NODE_TYPE_LEAF) { if (node->values.leaf.value.data) safe_free(node->values.leaf.value.data); if (node->values.leaf.path.data) safe_free(node->values.leaf.path.data); } safe_free(node); }
O3
c
patricia_node_free: testq %rdi, %rdi je 0xfb94 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x30(%rdi), %eax testl %eax, %eax je 0xfbae cmpl $0x1, %eax je 0xfb95 cmpl $0x2, %eax jne 0xfbca xorl %r14d, %r14d movq 0x38(%rbx,%r14,8), %rdi callq 0xfb58 incq %r14 cmpq $0x10, %r14 jne 0xfb78 movq 0xc0(%rbx), %rdi jmp 0xfbc0 retq movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0xfba3 callq 0x125c0 movq 0x48(%rbx), %rdi callq 0xfb58 jmp 0xfbca movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0xfbbc callq 0x125c0 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0xfbca callq 0x125c0 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x125c0
patricia_node_free: test rdi, rdi jz short locret_FB94 push r14 push rbx push rax mov rbx, rdi mov eax, [rdi+30h] test eax, eax jz short loc_FBAE cmp eax, 1 jz short loc_FB95 cmp eax, 2 jnz short loc_FBCA xor r14d, r14d loc_FB78: mov rdi, [rbx+r14*8+38h] call patricia_node_free inc r14 cmp r14, 10h jnz short loc_FB78 mov rdi, [rbx+0C0h] jmp short loc_FBC0 locret_FB94: retn loc_FB95: mov rdi, [rbx+40h] test rdi, rdi jz short loc_FBA3 call safe_free loc_FBA3: mov rdi, [rbx+48h] call patricia_node_free jmp short loc_FBCA loc_FBAE: mov rdi, [rbx+50h] test rdi, rdi jz short loc_FBBC call safe_free loc_FBBC: mov rdi, [rbx+40h] loc_FBC0: test rdi, rdi jz short loc_FBCA call safe_free loc_FBCA: mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp safe_free
long long patricia_node_free(long long a1) { long long result; // rax int v3; // eax long long i; // r14 long long v5; // rdi long long v6; // rdi long long v7; // rdi if ( a1 ) { v3 = *(_DWORD *)(a1 + 48); if ( v3 ) { if ( v3 == 1 ) { v6 = *(_QWORD *)(a1 + 64); if ( v6 ) safe_free(v6); patricia_node_free(*(_QWORD *)(a1 + 72)); return safe_free(a1); } if ( v3 != 2 ) return safe_free(a1); for ( i = 0LL; i != 16; ++i ) patricia_node_free(*(_QWORD *)(a1 + 8 * i + 56)); v5 = *(_QWORD *)(a1 + 192); } else { v7 = *(_QWORD *)(a1 + 80); if ( v7 ) safe_free(v7); v5 = *(_QWORD *)(a1 + 64); } if ( v5 ) safe_free(v5); return safe_free(a1); } return result; }
patricia_node_free: TEST RDI,RDI JZ 0x0010fb94 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x30] TEST EAX,EAX JZ 0x0010fbae CMP EAX,0x1 JZ 0x0010fb95 CMP EAX,0x2 JNZ 0x0010fbca XOR R14D,R14D LAB_0010fb78: MOV RDI,qword ptr [RBX + R14*0x8 + 0x38] CALL 0x0010fb58 INC R14 CMP R14,0x10 JNZ 0x0010fb78 MOV RDI,qword ptr [RBX + 0xc0] JMP 0x0010fbc0 LAB_0010fb94: RET LAB_0010fb95: MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x0010fba3 CALL 0x001125c0 LAB_0010fba3: MOV RDI,qword ptr [RBX + 0x48] CALL 0x0010fb58 JMP 0x0010fbca LAB_0010fbae: MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x0010fbbc CALL 0x001125c0 LAB_0010fbbc: MOV RDI,qword ptr [RBX + 0x40] LAB_0010fbc0: TEST RDI,RDI JZ 0x0010fbca CALL 0x001125c0 LAB_0010fbca: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001125c0
void patricia_node_free(void *param_1) { int iVar1; void *__ptr; long lVar2; if (param_1 == (void *)0x0) { return; } iVar1 = *(int *)((long)param_1 + 0x30); if (iVar1 == 0) { if (*(void **)((long)param_1 + 0x50) != (void *)0x0) { safe_free(*(void **)((long)param_1 + 0x50)); } __ptr = *(void **)((long)param_1 + 0x40); } else { if (iVar1 == 1) { if (*(void **)((long)param_1 + 0x40) != (void *)0x0) { safe_free(*(void **)((long)param_1 + 0x40)); } patricia_node_free(*(int8 *)((long)param_1 + 0x48)); goto LAB_0010fbca; } if (iVar1 != 2) goto LAB_0010fbca; lVar2 = 0; do { patricia_node_free(*(int8 *)((long)param_1 + lVar2 * 8 + 0x38)); lVar2 = lVar2 + 1; } while (lVar2 != 0x10); __ptr = *(void **)((long)param_1 + 0xc0); } if (__ptr != (void *)0x0) { safe_free(__ptr); } LAB_0010fbca: safe_free(param_1); return; }
49,543
copy_uca_collation
eloqsql/mysys/charset.c
static void copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from, CHARSET_INFO *loaded) { to->cset= from->cset; to->coll= from->coll; /* Single-level UCA collation have strnxfrm_multiple=8. In case of a multi-level UCA collation we use strnxfrm_multiply=4. That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller to allocate a buffer smaller size for each level, for performance purpose, and to fit longer VARCHARs to @@max_sort_length. This makes filesort produce non-precise order for some rare Unicode characters that produce more than 4 weights (long expansions). UCA requires 2 bytes per weight multiplied by the number of levels. In case of a 2-level collation, each character requires 4*2=8 bytes. Therefore, the longest VARCHAR that fits into the default @@max_sort_length is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64) would fit. Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4, for the same purpose. TODO: we could add a new LDML syntax to choose strxfrm_multiply value. */ to->strxfrm_multiply= loaded->levels_for_order > 1 ? 4 : from->strxfrm_multiply; to->min_sort_char= from->min_sort_char; to->max_sort_char= from->max_sort_char; to->mbminlen= from->mbminlen; to->mbmaxlen= from->mbmaxlen; to->caseup_multiply= from->caseup_multiply; to->casedn_multiply= from->casedn_multiply; to->state|= MY_CS_AVAILABLE | MY_CS_LOADED | MY_CS_STRNXFRM | MY_CS_UNICODE; }
O3
c
copy_uca_collation: pushq %rbp movq %rsp, %rbp movq 0xb8(%rsi), %rax movq %rax, 0xb8(%rdi) movq 0xc0(%rsi), %rax movq %rax, 0xc0(%rdi) movl $0x4, %eax cmpb $0x1, 0xb2(%rdx) ja 0x4ece7 movl 0x90(%rsi), %eax movl %eax, 0x90(%rdi) movq 0xa0(%rsi), %rax movq %rax, 0xa0(%rdi) movq 0xa8(%rsi), %rax movq %rax, 0xa8(%rdi) movl 0x98(%rsi), %eax movl %eax, 0x98(%rdi) movl 0x9c(%rsi), %eax movl %eax, 0x9c(%rdi) movb 0x94(%rsi), %al movb %al, 0x94(%rdi) movb 0x95(%rsi), %al movb %al, 0x95(%rdi) orl $0x2c8, 0xc(%rdi) # imm = 0x2C8 popq %rbp retq
copy_uca_collation: push rbp mov rbp, rsp mov rax, [rsi+0B8h] mov [rdi+0B8h], rax mov rax, [rsi+0C0h] mov [rdi+0C0h], rax mov eax, 4 cmp byte ptr [rdx+0B2h], 1 ja short loc_4ECE7 mov eax, [rsi+90h] loc_4ECE7: mov [rdi+90h], eax mov rax, [rsi+0A0h] mov [rdi+0A0h], rax mov rax, [rsi+0A8h] mov [rdi+0A8h], rax mov eax, [rsi+98h] mov [rdi+98h], eax mov eax, [rsi+9Ch] mov [rdi+9Ch], eax mov al, [rsi+94h] mov [rdi+94h], al mov al, [rsi+95h] mov [rdi+95h], al or dword ptr [rdi+0Ch], 2C8h pop rbp retn
char copy_uca_collation(long long a1, long long a2, long long a3) { int v3; // eax char result; // al *(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184); *(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192); v3 = 4; if ( *(_BYTE *)(a3 + 178) <= 1u ) v3 = *(_DWORD *)(a2 + 144); *(_DWORD *)(a1 + 144) = v3; *(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160); *(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168); *(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152); *(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156); *(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148); result = *(_BYTE *)(a2 + 149); *(_BYTE *)(a1 + 149) = result; *(_DWORD *)(a1 + 12) |= 0x2C8u; return result; }
copy_uca_collation: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RSI + 0xb8] MOV qword ptr [RDI + 0xb8],RAX MOV RAX,qword ptr [RSI + 0xc0] MOV qword ptr [RDI + 0xc0],RAX MOV EAX,0x4 CMP byte ptr [RDX + 0xb2],0x1 JA 0x0014ece7 MOV EAX,dword ptr [RSI + 0x90] LAB_0014ece7: MOV dword ptr [RDI + 0x90],EAX MOV RAX,qword ptr [RSI + 0xa0] MOV qword ptr [RDI + 0xa0],RAX MOV RAX,qword ptr [RSI + 0xa8] MOV qword ptr [RDI + 0xa8],RAX MOV EAX,dword ptr [RSI + 0x98] MOV dword ptr [RDI + 0x98],EAX MOV EAX,dword ptr [RSI + 0x9c] MOV dword ptr [RDI + 0x9c],EAX MOV AL,byte ptr [RSI + 0x94] MOV byte ptr [RDI + 0x94],AL MOV AL,byte ptr [RSI + 0x95] MOV byte ptr [RDI + 0x95],AL OR dword ptr [RDI + 0xc],0x2c8 POP RBP RET
void copy_uca_collation(long param_1,long param_2,long param_3) { int4 uVar1; *(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8); *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0); uVar1 = 4; if (*(byte *)(param_3 + 0xb2) < 2) { uVar1 = *(int4 *)(param_2 + 0x90); } *(int4 *)(param_1 + 0x90) = uVar1; *(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0); *(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8); *(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98); *(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c); *(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94); *(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95); *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8; return; }
49,544
nglog::LogMessage::WriteToStringAndLog()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->message_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); // Omit prefix of message and trailing newline when writing to message_. const char* start = data_->message_text_ + data_->num_prefix_chars_; size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1; data_->message_->assign(start, len); } SendToLog(); }
O1
cpp
nglog::LogMessage::WriteToStringAndLog(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax cmpq $0x0, 0x76b0(%rax) je 0xc8c7 movq 0x76c0(%rax), %rcx testq %rcx, %rcx je 0xc86b cmpb $0xa, 0x3(%rcx,%rax) je 0xc898 leaq 0x17ed0(%rip), %rsi # 0x24742 leaq 0x17f10(%rip), %rcx # 0x24789 leaq 0x17f1d(%rip), %r8 # 0x2479d leaq 0x1842c(%rip), %r9 # 0x24cb3 movl $0x3, %edi movl $0x78c, %edx # imm = 0x78C xorl %eax, %eax callq 0x21190 movq 0x8(%rbx), %rax movq 0x76b0(%rax), %rdi movq 0x76b8(%rax), %r8 leaq (%rax,%r8), %rcx addq $0x4, %rcx notq %r8 addq 0x76c0(%rax), %r8 movq 0x8(%rdi), %rdx xorl %esi, %esi callq 0x7830 movq %rbx, %rdi popq %rbx jmp 0xc026
_ZN5nglog10LogMessage19WriteToStringAndLogEv: push rbx mov rbx, rdi mov rax, [rdi+8] cmp qword ptr [rax+76B0h], 0 jz short loc_C8C7 mov rcx, [rax+76C0h] test rcx, rcx jz short loc_C86B cmp byte ptr [rcx+rax+3], 0Ah jz short loc_C898 loc_C86B: lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_24CB1+2; "" mov edi, 3 mov edx, 78Ch xor eax, eax call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) loc_C898: mov rax, [rbx+8] mov rdi, [rax+76B0h] mov r8, [rax+76B8h] lea rcx, [rax+r8] add rcx, 4 not r8 add r8, [rax+76C0h] mov rdx, [rdi+8] xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_C8C7: mov rdi, rbx; this pop rbx jmp _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
long long nglog::LogMessage::WriteToStringAndLog(nglog::LogMessage *this) { long long v1; // rax long long v2; // rcx _QWORD *v3; // rax v1 = *((_QWORD *)this + 1); if ( *(_QWORD *)(v1 + 30384) ) { v2 = *(_QWORD *)(v1 + 30400); if ( !v2 || *(_BYTE *)(v2 + v1 + 3) != 10 ) nglog::RawLog( 3, (unsigned int)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1932, (unsigned int)"Check %s failed: %s", (unsigned int)"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", (unsigned int)""); v3 = (_QWORD *)*((_QWORD *)this + 1); std::string::_M_replace(v3[3798], 0LL, *(_QWORD *)(v3[3798] + 8LL), (char *)v3 + v3[3799] + 4, v3[3800] + ~v3[3799]); } return nglog::LogMessage::SendToLog(this); }
WriteToStringAndLog: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] CMP qword ptr [RAX + 0x76b0],0x0 JZ 0x0010c8c7 MOV RCX,qword ptr [RAX + 0x76c0] TEST RCX,RCX JZ 0x0010c86b CMP byte ptr [RCX + RAX*0x1 + 0x3],0xa JZ 0x0010c898 LAB_0010c86b: LEA RSI,[0x124742] LEA RCX,[0x124789] LEA R8,[0x12479d] LEA R9,[0x124cb3] MOV EDI,0x3 MOV EDX,0x78c XOR EAX,EAX CALL 0x00121190 LAB_0010c898: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] MOV R8,qword ptr [RAX + 0x76b8] LEA RCX,[RAX + R8*0x1] ADD RCX,0x4 NOT R8 ADD R8,qword ptr [RAX + 0x76c0] MOV RDX,qword ptr [RDI + 0x8] XOR ESI,ESI CALL 0x00107830 LAB_0010c8c7: MOV RDI,RBX POP RBX JMP 0x0010c026
/* nglog::LogMessage::WriteToStringAndLog() */ void __thiscall nglog::LogMessage::WriteToStringAndLog(LogMessage *this) { long lVar1; lVar1 = *(long *)(this + 8); if (*(long *)(lVar1 + 0x76b0) != 0) { if ((*(long *)(lVar1 + 0x76c0) == 0) || (*(char *)(*(long *)(lVar1 + 0x76c0) + 3 + lVar1) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x78c, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_00124cb3); } lVar1 = *(long *)(this + 8); std::__cxx11::string::_M_replace (*(ulong *)(lVar1 + 0x76b0),0,*(char **)(*(ulong *)(lVar1 + 0x76b0) + 8), lVar1 + *(long *)(lVar1 + 0x76b8) + 4); } SendToLog(this); return; }
49,545
nglog::LogMessage::WriteToStringAndLog()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->message_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); // Omit prefix of message and trailing newline when writing to message_. const char* start = data_->message_text_ + data_->num_prefix_chars_; size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1; data_->message_->assign(start, len); } SendToLog(); }
O2
cpp
nglog::LogMessage::WriteToStringAndLog(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x76b0(%rax), %rdi testq %rdi, %rdi je 0xba04 movq 0x76c0(%rax), %rcx testq %rcx, %rcx je 0xb9ad cmpb $0xa, 0x3(%rcx,%rax) je 0xb9ea leaq 0x13d66(%rip), %rsi # 0x1f71a leaq 0x13da6(%rip), %rcx # 0x1f761 leaq 0x13db3(%rip), %r8 # 0x1f775 leaq 0x142c2(%rip), %r9 # 0x1fc8b pushq $0x3 popq %rdi movl $0x78c, %edx # imm = 0x78C xorl %eax, %eax callq 0x1c924 movq 0x8(%rbx), %rax movq 0x76b0(%rax), %rdi movq 0x76c0(%rax), %rcx movq 0x76b8(%rax), %rdx leaq (%rax,%rdx), %rsi addq $0x4, %rsi notq %rdx addq %rcx, %rdx callq 0x7780 movq %rbx, %rdi popq %rbx jmp 0xb39c nop
_ZN5nglog10LogMessage19WriteToStringAndLogEv: push rbx mov rbx, rdi mov rax, [rdi+8] mov rdi, [rax+76B0h] test rdi, rdi jz short loc_BA04 mov rcx, [rax+76C0h] test rcx, rcx jz short loc_B9AD cmp byte ptr [rcx+rax+3], 0Ah jz short loc_B9EA loc_B9AD: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_1FC89+2; "" push 3 pop rdi mov edx, 78Ch xor eax, eax call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) mov rax, [rbx+8] mov rdi, [rax+76B0h] mov rcx, [rax+76C0h] loc_B9EA: mov rdx, [rax+76B8h] lea rsi, [rax+rdx] add rsi, 4 not rdx add rdx, rcx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm; std::string::assign(char const*,ulong) loc_BA04: mov rdi, rbx; this pop rbx jmp _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
long long nglog::LogMessage::WriteToStringAndLog(nglog::LogMessage *this) { _QWORD *v2; // rax long long v3; // rdi long long v4; // rcx v2 = (_QWORD *)*((_QWORD *)this + 1); v3 = v2[3798]; if ( v3 ) { v4 = v2[3800]; if ( !v4 || *((_BYTE *)v2 + v4 + 3) != 10 ) { nglog::RawLog( 3LL, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1932LL, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", ""); v2 = (_QWORD *)*((_QWORD *)this + 1); v3 = v2[3798]; v4 = v2[3800]; } std::string::assign(v3, (char *)v2 + v2[3799] + 4, v4 + ~v2[3799]); } return nglog::LogMessage::SendToLog(this); }
WriteToStringAndLog: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] TEST RDI,RDI JZ 0x0010ba04 MOV RCX,qword ptr [RAX + 0x76c0] TEST RCX,RCX JZ 0x0010b9ad CMP byte ptr [RCX + RAX*0x1 + 0x3],0xa JZ 0x0010b9ea LAB_0010b9ad: LEA RSI,[0x11f71a] LEA RCX,[0x11f761] LEA R8,[0x11f775] LEA R9,[0x11fc8b] PUSH 0x3 POP RDI MOV EDX,0x78c XOR EAX,EAX CALL 0x0011c924 MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] MOV RCX,qword ptr [RAX + 0x76c0] LAB_0010b9ea: MOV RDX,qword ptr [RAX + 0x76b8] LEA RSI,[RAX + RDX*0x1] ADD RSI,0x4 NOT RDX ADD RDX,RCX CALL 0x00107780 LAB_0010ba04: MOV RDI,RBX POP RBX JMP 0x0010b39c
/* nglog::LogMessage::WriteToStringAndLog() */ void __thiscall nglog::LogMessage::WriteToStringAndLog(LogMessage *this) { long lVar1; char *pcVar2; lVar1 = *(long *)(this + 8); pcVar2 = *(char **)(lVar1 + 0x76b0); if (pcVar2 != (char *)0x0) { if ((*(long *)(lVar1 + 0x76c0) == 0) || (*(char *)(*(long *)(lVar1 + 0x76c0) + 3 + lVar1) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x78c, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_0011fc8b); lVar1 = *(long *)(this + 8); pcVar2 = *(char **)(lVar1 + 0x76b0); } std::__cxx11::string::assign(pcVar2,lVar1 + *(long *)(lVar1 + 0x76b8) + 4); } SendToLog(this); return; }
49,546
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_codepoint()
llama.cpp/common/json.hpp
int get_codepoint() { // this function only makes sense after reading `\u` JSON_ASSERT(current == 'u'); int codepoint = 0; const auto factors = { 12u, 8u, 4u, 0u }; for (const auto factor : factors) { get(); if (current >= '0' && current <= '9') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); } else if (current >= 'A' && current <= 'F') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); } else if (current >= 'a' && current <= 'f') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); } else { return -1; } } JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); return codepoint; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_codepoint(): pushq %rbx subq $0x10, %rsp cmpl $0x75, 0x14(%rdi) jne 0x750f2 leaq 0x14(%rdi), %rsi leaq 0xc(%rsp), %rbx movq %rbx, %rdx callq 0x218de movl (%rbx), %eax addq $0x10, %rsp popq %rbx retq leaq 0xa47bf(%rip), %rdi # 0x1198b8 leaq 0x9d10d(%rip), %rdx # 0x11220d leaq 0xa54ba(%rip), %rcx # 0x11a5c1 movl $0x1d79, %esi # imm = 0x1D79 xorl %eax, %eax callq 0x20e60 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE13get_codepointEv: push rbx sub rsp, 10h cmp dword ptr [rdi+14h], 75h ; 'u' jnz short loc_750F2 lea rsi, [rdi+14h] lea rbx, [rsp+18h+var_C] mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE13get_codepointEv_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_codepoint(void) [clone] mov eax, [rbx] add rsp, 10h pop rbx retn loc_750F2: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov esi, 1D79h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_codepoint( __m128i *a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { long long v10; // rdx long long v11; // rcx long long v12; // r8 long long v13; // r9 unsigned int v14[3]; // [rsp+Ch] [rbp-Ch] BYREF if ( a1[1].m128i_i32[1] == 117 ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_codepoint( a1, &a1[1].m128i_u32[1], v14); return v14[0]; } else { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::next_byte_in_range( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7545LL, v10, v11, v12, v13, a7, a8, a9); } }
get_codepoint: PUSH RBX SUB RSP,0x10 CMP dword ptr [RDI + 0x14],0x75 JNZ 0x001750f2 LEA RSI,[RDI + 0x14] LEA RBX,[RSP + 0xc] MOV RDX,RBX CALL 0x001218de MOV EAX,dword ptr [RBX] ADD RSP,0x10 POP RBX RET LAB_001750f2: LEA RDI,[0x2198b8] LEA RDX,[0x21220d] LEA RCX,[0x21a5c1] MOV ESI,0x1d79 XOR EAX,EAX CALL 0x00120e60
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get_codepoint() */ int4 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::get_codepoint(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *this) { int4 local_c; if (*(int *)(this + 0x14) == 0x75) { get_codepoint(); return local_c; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1d79, "GGML_ASSERT(%s) failed","current == \'u\'"); }
49,547
set_max_sort_char
eloqsql/strings/ctype-simple.c
static void set_max_sort_char(struct charset_info_st *cs) { uchar max_char; uint i; if (!cs->sort_order) return; max_char=cs->sort_order[(uchar) cs->max_sort_char]; for (i= 0; i < 256; i++) { if ((uchar) cs->sort_order[i] > max_char) { max_char=(uchar) cs->sort_order[i]; cs->max_sort_char= i; } } }
O0
c
set_max_sort_char: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x58(%rax) jne 0x4f215 jmp 0x4f286 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq -0x8(%rbp), %rcx movq 0xa8(%rcx), %rcx movzbl %cl, %ecx movb (%rax,%rcx), %al movb %al, -0x9(%rbp) movl $0x0, -0x10(%rbp) cmpl $0x100, -0x10(%rbp) # imm = 0x100 jae 0x4f286 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movl -0x10(%rbp), %ecx movzbl (%rax,%rcx), %eax movzbl -0x9(%rbp), %ecx cmpl %ecx, %eax jle 0x4f279 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movl -0x10(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x9(%rbp) movl -0x10(%rbp), %eax movl %eax, %ecx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) jmp 0x4f27b movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x4f238 popq %rbp retq nopl (%rax,%rax)
set_max_sort_char: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+58h], 0 jnz short loc_4F215 jmp short loc_4F286 loc_4F215: mov rax, [rbp+var_8] mov rax, [rax+58h] mov rcx, [rbp+var_8] mov rcx, [rcx+0A8h] movzx ecx, cl mov al, [rax+rcx] mov [rbp+var_9], al mov [rbp+var_10], 0 loc_4F238: cmp [rbp+var_10], 100h jnb short loc_4F286 mov rax, [rbp+var_8] mov rax, [rax+58h] mov ecx, [rbp+var_10] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_9] cmp eax, ecx jle short loc_4F279 mov rax, [rbp+var_8] mov rax, [rax+58h] mov ecx, [rbp+var_10] mov al, [rax+rcx] mov [rbp+var_9], al mov eax, [rbp+var_10] mov ecx, eax mov rax, [rbp+var_8] mov [rax+0A8h], rcx loc_4F279: jmp short $+2 loc_4F27B: mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp short loc_4F238 loc_4F286: pop rbp retn
unsigned __int8 set_max_sort_char(long long a1) { unsigned __int8 result; // al unsigned int i; // [rsp+0h] [rbp-10h] unsigned __int8 v3; // [rsp+7h] [rbp-9h] result = a1; if ( *(_QWORD *)(a1 + 88) ) { result = *(_BYTE *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*(_QWORD *)(a1 + 168)); v3 = result; for ( i = 0; i < 0x100; ++i ) { if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + i) > (int)v3 ) { v3 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + i); *(_QWORD *)(a1 + 168) = i; } result = i + 1; } } return result; }
set_max_sort_char: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x58],0x0 JNZ 0x0014f215 JMP 0x0014f286 LAB_0014f215: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0xa8] MOVZX ECX,CL MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x9],AL MOV dword ptr [RBP + -0x10],0x0 LAB_0014f238: CMP dword ptr [RBP + -0x10],0x100 JNC 0x0014f286 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV ECX,dword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,byte ptr [RBP + -0x9] CMP EAX,ECX JLE 0x0014f279 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV ECX,dword ptr [RBP + -0x10] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x9],AL MOV EAX,dword ptr [RBP + -0x10] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX LAB_0014f279: JMP 0x0014f27b LAB_0014f27b: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x0014f238 LAB_0014f286: POP RBP RET
void set_max_sort_char(long param_1) { int4 local_18; int1 local_11; if (*(long *)(param_1 + 0x58) != 0) { local_11 = *(byte *)(*(long *)(param_1 + 0x58) + (*(ulong *)(param_1 + 0xa8) & 0xff)); for (local_18 = 0; local_18 < 0x100; local_18 = local_18 + 1) { if (local_11 < *(byte *)(*(long *)(param_1 + 0x58) + (ulong)local_18)) { local_11 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)local_18); *(ulong *)(param_1 + 0xa8) = (ulong)local_18; } } } return; }
49,548
freeze_size
eloqsql/mysys/array.c
void freeze_size(DYNAMIC_ARRAY *array) { uint elements; /* Do nothing if we are using a static buffer */ if (array->malloc_flags & MY_INIT_BUFFER_USED) return; elements= MY_MAX(array->elements, 1); if (array->buffer && array->max_element > elements) { array->buffer=(uchar*) my_realloc(array->m_psi_key, array->buffer, elements * array->size_of_element, MYF(MY_WME | array->malloc_flags)); array->max_element= elements; } }
O0
c
freeze_size: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x20(%rax), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax je 0x66332 jmp 0x663b0 movq -0x8(%rbp), %rax cmpl $0x1, 0x8(%rax) jbe 0x66348 movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x10(%rbp) jmp 0x66352 movl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x66352 movl -0x10(%rbp), %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x663b0 movq -0x8(%rbp), %rax movl 0xc(%rax), %eax cmpl -0xc(%rbp), %eax jbe 0x663b0 movq -0x8(%rbp), %rax movl 0x18(%rax), %edi movq -0x8(%rbp), %rax movq (%rax), %rsi movl -0xc(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx movq -0x8(%rbp), %rax movq 0x20(%rax), %rcx orq $0x10, %rcx callq 0x5b7f0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xc(%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
freeze_size: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+20h] and rax, 100h cmp rax, 0 jz short loc_66332 jmp short loc_663B0 loc_66332: mov rax, [rbp+var_8] cmp dword ptr [rax+8], 1 jbe short loc_66348 mov rax, [rbp+var_8] mov eax, [rax+8] mov [rbp+var_10], eax jmp short loc_66352 loc_66348: mov eax, 1 mov [rbp+var_10], eax jmp short $+2 loc_66352: mov eax, [rbp+var_10] mov [rbp+var_C], eax mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_663B0 mov rax, [rbp+var_8] mov eax, [rax+0Ch] cmp eax, [rbp+var_C] jbe short loc_663B0 mov rax, [rbp+var_8] mov edi, [rax+18h] mov rax, [rbp+var_8] mov rsi, [rax] mov eax, [rbp+var_C] mov rcx, [rbp+var_8] imul eax, [rcx+14h] mov eax, eax mov edx, eax mov rax, [rbp+var_8] mov rcx, [rax+20h] or rcx, 10h call my_realloc mov rcx, rax mov rax, [rbp+var_8] mov [rax], rcx mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+0Ch], ecx loc_663B0: add rsp, 10h pop rbp retn
long long freeze_size(long long a1) { long long result; // rax unsigned int v2; // [rsp+0h] [rbp-10h] result = *(_QWORD *)(a1 + 32) & 0x100LL; if ( !result ) { if ( *(_DWORD *)(a1 + 8) <= 1u ) v2 = 1; else v2 = *(_DWORD *)(a1 + 8); result = a1; if ( *(_QWORD *)a1 ) { result = *(unsigned int *)(a1 + 12); if ( (unsigned int)result > v2 ) { *(_QWORD *)a1 = my_realloc( *(_DWORD *)(a1 + 24), *(_QWORD *)a1, *(_DWORD *)(a1 + 20) * v2, *(_BYTE *)(a1 + 32) | 0x10u); result = a1; *(_DWORD *)(a1 + 12) = v2; } } } return result; }
freeze_size: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x100 CMP RAX,0x0 JZ 0x00166332 JMP 0x001663b0 LAB_00166332: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x8],0x1 JBE 0x00166348 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x10],EAX JMP 0x00166352 LAB_00166348: MOV EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x00166352 LAB_00166352: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x001663b0 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] CMP EAX,dword ptr [RBP + -0xc] JBE 0x001663b0 MOV RAX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x20] OR RCX,0x10 CALL 0x0015b7f0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],ECX LAB_001663b0: ADD RSP,0x10 POP RBP RET
void freeze_size(long *param_1) { long lVar1; uint local_18; if ((param_1[4] & 0x100U) == 0) { if (*(uint *)(param_1 + 1) < 2) { local_18 = 1; } else { local_18 = *(uint *)(param_1 + 1); } if ((*param_1 != 0) && (local_18 < *(uint *)((long)param_1 + 0xc))) { lVar1 = my_realloc((int)param_1[3],*param_1,local_18 * *(int *)((long)param_1 + 0x14), param_1[4] | 0x10); *param_1 = lVar1; *(uint *)((long)param_1 + 0xc) = local_18; } } return; }
49,549
ma_field_extension_init_type_info
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void ma_field_extension_init_type_info(MA_MEM_ROOT *memroot, MA_FIELD_EXTENSION *ext, const char *ptr, size_t length) { const char *end= ptr + length; for ( ; ptr < end; ) { uint itype= (uchar) *ptr++; uint len= (uchar) *ptr++; if (ptr + len > end || len > 127) break; /*Badly encoded data*/ if (itype <= 127 && itype <= MARIADB_FIELD_ATTR_LAST) ext->metadata[itype]= ma_const_string_copy_root(memroot, ptr, len); ptr+= len; } }
O0
c
ma_field_extension_init_type_info: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x17507 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x30(%rbp) movq -0x18(%rbp), %rax movl -0x30(%rbp), %ecx addq %rcx, %rax cmpq -0x28(%rbp), %rax ja 0x174a2 cmpl $0x7f, -0x30(%rbp) jbe 0x174a4 jmp 0x17507 cmpl $0x7f, -0x2c(%rbp) ja 0x174f2 cmpl $0x1, -0x2c(%rbp) ja 0x174f2 movq -0x10(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x30(%rbp), %eax movl %eax, %edx callq 0x16f30 movq %rax, %rcx movq -0x48(%rbp), %rax movq %rcx, -0x40(%rbp) movq %rdx, -0x38(%rbp) movq -0x40(%rbp), %rcx movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq %rcx, 0x8(%rax) movl -0x30(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x17454 addq $0x50, %rsp popq %rbp retq nopl (%rax)
ma_field_extension_init_type_info: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_28], rax loc_17454: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb loc_17507 mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_2C], eax mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_30], eax mov rax, [rbp+var_18] mov ecx, [rbp+var_30] add rax, rcx cmp rax, [rbp+var_28] ja short loc_174A2 cmp [rbp+var_30], 7Fh jbe short loc_174A4 loc_174A2: jmp short loc_17507 loc_174A4: cmp [rbp+var_2C], 7Fh ja short loc_174F2 cmp [rbp+var_2C], 1 ja short loc_174F2 mov rax, [rbp+var_10] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov [rbp+var_48], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov eax, [rbp+var_30] mov edx, eax call ma_const_string_copy_root mov rcx, rax mov rax, [rbp+var_48] mov [rbp+var_40], rcx mov [rbp+var_38], rdx mov rcx, [rbp+var_40] mov [rax], rcx mov rcx, [rbp+var_38] mov [rax+8], rcx loc_174F2: mov ecx, [rbp+var_30] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax jmp loc_17454 loc_17507: add rsp, 50h pop rbp retn
unsigned __int8 * ma_field_extension_init_type_info(long long a1, long long a2, unsigned __int8 *a3, long long a4) { unsigned __int8 *result; // rax unsigned __int8 *v5; // rax long long v6; // rdx long long *v7; // [rsp+8h] [rbp-48h] unsigned int v8; // [rsp+20h] [rbp-30h] unsigned int v9; // [rsp+24h] [rbp-2Ch] unsigned long long v10; // [rsp+28h] [rbp-28h] unsigned __int8 *v11; // [rsp+38h] [rbp-18h] long long v12; // [rsp+38h] [rbp-18h] v11 = a3; v10 = (unsigned long long)&a3[a4]; while ( 1 ) { result = v11; if ( (unsigned long long)v11 >= v10 ) break; v9 = *v11; v5 = v11 + 1; v12 = (long long)(v11 + 2); v8 = *v5; result = (unsigned __int8 *)(*v5 + v12); if ( (unsigned long long)result > v10 || v8 > 0x7F ) break; if ( v9 <= 1 ) { v7 = (long long *)(16LL * v9 + a2); *v7 = ma_const_string_copy_root(a1, v12, v8); v7[1] = v6; } v11 = (unsigned __int8 *)(v8 + v12); } return result; }
ma_field_extension_init_type_info: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX LAB_00117454: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x00117507 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x30] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x28] JA 0x001174a2 CMP dword ptr [RBP + -0x30],0x7f JBE 0x001174a4 LAB_001174a2: JMP 0x00117507 LAB_001174a4: CMP dword ptr [RBP + -0x2c],0x7f JA 0x001174f2 CMP dword ptr [RBP + -0x2c],0x1 JA 0x001174f2 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x30] MOV EDX,EAX CALL 0x00116f30 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RCX MOV qword ptr [RBP + -0x38],RDX MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX LAB_001174f2: MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x00117454 LAB_00117507: ADD RSP,0x50 POP RBP RET
void ma_field_extension_init_type_info(int8 param_1,long param_2,byte *param_3,long param_4) { uint uVar1; uint uVar2; byte *pbVar3; int1 auVar4 [16]; byte *local_20; local_20 = param_3; while( true ) { if (param_3 + param_4 <= local_20) { return; } uVar1 = (uint)*local_20; pbVar3 = local_20 + 2; uVar2 = (uint)local_20[1]; if (param_3 + param_4 < pbVar3 + uVar2) break; if (0x7f < uVar2) { return; } if ((uVar1 < 0x80) && (uVar1 < 2)) { auVar4 = ma_const_string_copy_root(param_1,pbVar3,uVar2); *(int1 (*) [16])(param_2 + (ulong)uVar1 * 0x10) = auVar4; } local_20 = pbVar3 + uVar2; } return; }
49,550
main
eloqsql/client/mariadb-conv.cc
int main(int argc, char *argv[]) { Session session(argv[0]); CHARSET_INFO *charset_info_from= NULL; CHARSET_INFO *charset_info_to= NULL; if (handle_options(&argc, &argv, long_options, get_one_option)) { session.usage(); return 1; } if (!(charset_info_from= opt.csinfo_from())) { fprintf(stderr, "Character set %s is not supported\n", opt.m_charset_from); return 1; } if (!(charset_info_to= opt.csinfo_to())) { fprintf(stderr, "Character set %s is not supported\n", opt.m_charset_to); return 1; } Conv conv(charset_info_to, charset_info_from, opt.m_continue); if (opt.m_delimiter) { if (charset_info_from->mbminlen > 1 || charset_info_to->mbminlen > 1) { fprintf(stderr, "--delimiter cannot be used with %s to %s conversion\n", charset_info_from->cs_name.str, charset_info_to->cs_name.str); return 1; } if (conv.set_delimiter_unescape(opt.m_delimiter)) { fprintf(stderr, "Bad --delimiter value\n"); return 1; } } if (argc == 0) { if (conv.convert_binary_stream(stdin)) return 1; } else { for (int i= 0; i < argc; i++) { if (conv.convert_binary_file_by_name(argv[i])) return 1; } } return 0; }
O0
cpp
main: pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl $0x0, -0xbc(%rbp) movl %edi, -0xc0(%rbp) movq %rsi, -0xc8(%rbp) movq -0xc8(%rbp), %rax movq (%rax), %rsi leaq -0xc9(%rbp), %rdi callq 0x26770 movq $0x0, -0xd8(%rbp) movq $0x0, -0xe0(%rbp) leaq 0x1bb1ee(%rip), %rdx # 0x1e1010 leaq -0x639(%rip), %rcx # 0x257f0 leaq -0xc0(%rbp), %rdi leaq -0xc8(%rbp), %rsi callq 0x32640 movl %eax, -0xf8(%rbp) jmp 0x25e44 movl -0xf8(%rbp), %eax cmpl $0x0, %eax je 0x25e99 leaq -0xc9(%rbp), %rdi callq 0x267a0 jmp 0x25e5d movl $0x1, -0xbc(%rbp) movl $0x1, -0xf0(%rbp) jmp 0x2612b movq %rax, %rcx movl %edx, %eax movq %rcx, -0xe8(%rbp) movl %eax, -0xec(%rbp) leaq -0xc9(%rbp), %rdi callq 0x26b70 jmp 0x26164 leaq 0x372be8(%rip), %rdi # 0x398a88 callq 0x26830 movq %rax, -0x100(%rbp) jmp 0x25eae movq -0x100(%rbp), %rax movq %rax, -0xd8(%rbp) cmpq $0x0, %rax jne 0x25efa movq 0x1bb117(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq 0x372bb5(%rip), %rdx # 0x398a88 leaq 0x631c5(%rip), %rsi # 0x8909f movb $0x0, %al callq 0x254a0 movl $0x1, -0xbc(%rbp) movl $0x1, -0xf0(%rbp) jmp 0x2612b leaq 0x372b87(%rip), %rdi # 0x398a88 callq 0x26870 movq %rax, -0x108(%rbp) jmp 0x25f0f movq -0x108(%rbp), %rax movq %rax, -0xe0(%rbp) cmpq $0x0, %rax jne 0x25f5b movq 0x1bb0b6(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq 0x372b5c(%rip), %rdx # 0x398a90 leaq 0x63164(%rip), %rsi # 0x8909f movb $0x0, %al callq 0x254a0 movl $0x1, -0xbc(%rbp) movl $0x1, -0xf0(%rbp) jmp 0x2612b movq -0xe0(%rbp), %rsi movq -0xd8(%rbp), %rdx movb 0x372b31(%rip), %al # 0x398aa0 testb %al, %al setne %al movzbl %al, %ecx leaq -0xb8(%rbp), %rdi callq 0x268b0 jmp 0x25f85 cmpq $0x0, 0x372b0b(%rip) # 0x398a98 je 0x26054 movq -0xd8(%rbp), %rax cmpl $0x1, 0x98(%rax) ja 0x25fb3 movq -0xe0(%rbp), %rax cmpl $0x1, 0x98(%rax) jbe 0x25ffa movq 0x1bb026(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq -0xd8(%rbp), %rax movq 0x10(%rax), %rdx movq -0xe0(%rbp), %rax movq 0x10(%rax), %rcx leaq 0x630e8(%rip), %rsi # 0x890c2 movb $0x0, %al callq 0x254a0 movl $0x1, -0xbc(%rbp) movl $0x1, -0xf0(%rbp) jmp 0x2612b leaq -0xa0(%rbp), %rdi movq 0x372a90(%rip), %rsi # 0x398a98 callq 0x26910 movb %al, -0x109(%rbp) jmp 0x26015 movb -0x109(%rbp), %al testb $0x1, %al jne 0x26021 jmp 0x26052 movq 0x1bafb8(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi leaq 0x630c5(%rip), %rsi # 0x890f7 movb $0x0, %al callq 0x254a0 movl $0x1, -0xbc(%rbp) movl $0x1, -0xf0(%rbp) jmp 0x2612b jmp 0x26054 cmpl $0x0, -0xc0(%rbp) jne 0x260a2 movq 0x1baf74(%rip), %rax # 0x1e0fd8 movq (%rax), %rsi leaq -0xb8(%rbp), %rdi callq 0x269f0 movb %al, -0x10a(%rbp) jmp 0x2607b movb -0x10a(%rbp), %al testb $0x1, %al jne 0x26087 jmp 0x260a0 movl $0x1, -0xbc(%rbp) movl $0x1, -0xf0(%rbp) jmp 0x2612b jmp 0x26117 movl $0x0, -0xf4(%rbp) movl -0xf4(%rbp), %eax cmpl -0xc0(%rbp), %eax jge 0x26115 movq -0xc8(%rbp), %rax movslq -0xf4(%rbp), %rcx movq (%rax,%rcx,8), %rsi leaq -0xb8(%rbp), %rdi callq 0x26ab0 movb %al, -0x10b(%rbp) jmp 0x260e0 movb -0x10b(%rbp), %al testb $0x1, %al jne 0x260ec jmp 0x26102 movl $0x1, -0xbc(%rbp) movl $0x1, -0xf0(%rbp) jmp 0x2612b jmp 0x26104 movl -0xf4(%rbp), %eax addl $0x1, %eax movl %eax, -0xf4(%rbp) jmp 0x260ac jmp 0x26117 movl $0x0, -0xbc(%rbp) movl $0x1, -0xf0(%rbp) leaq -0xc9(%rbp), %rdi callq 0x26b70 movl -0xbc(%rbp), %eax movl %eax, -0x110(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x26190 movl -0x110(%rbp), %eax addq $0x120, %rsp # imm = 0x120 popq %rbp retq movq -0xe8(%rbp), %rax movq %rax, -0x118(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x26190 movq -0x118(%rbp), %rdi callq 0x25620 callq 0x25380 nopw %cs:(%rax,%rax) nop
main: push rbp mov rbp, rsp sub rsp, 120h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_BC], 0 mov [rbp+var_C0], edi mov [rbp+var_C8], rsi mov rax, [rbp+var_C8] mov rsi, [rax]; char * lea rdi, [rbp+var_C9]; this call _ZN7SessionC2EPKc; Session::Session(char const*) mov [rbp+var_D8], 0 mov [rbp+var_E0], 0 lea rdx, _ZL12long_options; long_options lea rcx, _Z14get_one_optionPK9my_optionPKcS3_; get_one_option(my_option const*,char const*,char const*) lea rdi, [rbp+var_C0] lea rsi, [rbp+var_C8] call handle_options mov [rbp+var_F8], eax jmp short $+2 loc_25E44: mov eax, [rbp+var_F8] cmp eax, 0 jz short loc_25E99 lea rdi, [rbp+var_C9]; this call _ZN7Session5usageEv; Session::usage(void) jmp short $+2 loc_25E5D: mov [rbp+var_BC], 1 mov [rbp+var_F0], 1 jmp loc_2612B mov rcx, rax mov eax, edx mov [rbp+var_E8], rcx mov [rbp+var_EC], eax lea rdi, [rbp+var_C9]; this call _ZN7SessionD2Ev; Session::~Session() jmp loc_26164 loc_25E99: lea rdi, _ZL3opt; this call _ZNK6CmdOpt11csinfo_fromEv; CmdOpt::csinfo_from(void) mov [rbp+var_100], rax jmp short $+2 loc_25EAE: mov rax, [rbp+var_100] mov [rbp+var_D8], rax cmp rax, 0 jnz short loc_25EFA mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, cs:_ZL3opt; opt lea rsi, aCharacterSetSI; "Character set %s is not supported\n" mov al, 0 call _fprintf mov [rbp+var_BC], 1 mov [rbp+var_F0], 1 jmp loc_2612B loc_25EFA: lea rdi, _ZL3opt; this call _ZNK6CmdOpt9csinfo_toEv; CmdOpt::csinfo_to(void) mov [rbp+var_108], rax jmp short $+2 loc_25F0F: mov rax, [rbp+var_108] mov [rbp+var_E0], rax cmp rax, 0 jnz short loc_25F5B mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, cs:qword_398A90 lea rsi, aCharacterSetSI; "Character set %s is not supported\n" mov al, 0 call _fprintf mov [rbp+var_BC], 1 mov [rbp+var_F0], 1 jmp loc_2612B loc_25F5B: mov rsi, [rbp+var_E0]; charset_info_st * mov rdx, [rbp+var_D8]; charset_info_st * mov al, cs:byte_398AA0 test al, al setnz al movzx ecx, al; bool lea rdi, [rbp+var_B8]; this call _ZN4ConvC2EPK15charset_info_stS2_b; Conv::Conv(charset_info_st const*,charset_info_st const*,bool) jmp short $+2 loc_25F85: cmp cs:qword_398A98, 0 jz loc_26054 mov rax, [rbp+var_D8] cmp dword ptr [rax+98h], 1 ja short loc_25FB3 mov rax, [rbp+var_E0] cmp dword ptr [rax+98h], 1 jbe short loc_25FFA loc_25FB3: mov rax, cs:stderr_ptr mov rdi, [rax] mov rax, [rbp+var_D8] mov rdx, [rax+10h] mov rax, [rbp+var_E0] mov rcx, [rax+10h] lea rsi, aDelimiterCanno; "--delimiter cannot be used with %s to %"... mov al, 0 call _fprintf mov [rbp+var_BC], 1 mov [rbp+var_F0], 1 jmp loc_2612B loc_25FFA: lea rdi, [rbp+var_A0]; this mov rsi, cs:qword_398A98; char * call _ZN9Delimiter22set_delimiter_unescapeEPKc; Delimiter::set_delimiter_unescape(char const*) mov [rbp+var_109], al jmp short $+2 loc_26015: mov al, [rbp+var_109] test al, 1 jnz short loc_26021 jmp short loc_26052 loc_26021: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aBadDelimiterVa; "Bad --delimiter value\n" mov al, 0 call _fprintf mov [rbp+var_BC], 1 mov [rbp+var_F0], 1 jmp loc_2612B loc_26052: jmp short $+2 loc_26054: cmp [rbp+var_C0], 0 jnz short loc_260A2 mov rax, cs:stdin_ptr mov rsi, [rax] lea rdi, [rbp+var_B8] call _ZN4Conv21convert_binary_streamEP8_IO_FILE; Conv::convert_binary_stream(_IO_FILE *) mov [rbp+var_10A], al jmp short $+2 loc_2607B: mov al, [rbp+var_10A] test al, 1 jnz short loc_26087 jmp short loc_260A0 loc_26087: mov [rbp+var_BC], 1 mov [rbp+var_F0], 1 jmp loc_2612B loc_260A0: jmp short loc_26117 loc_260A2: mov [rbp+var_F4], 0 loc_260AC: mov eax, [rbp+var_F4] cmp eax, [rbp+var_C0] jge short loc_26115 mov rax, [rbp+var_C8] movsxd rcx, [rbp+var_F4] mov rsi, [rax+rcx*8]; char * lea rdi, [rbp+var_B8]; this call _ZN4Conv27convert_binary_file_by_nameEPKc; Conv::convert_binary_file_by_name(char const*) mov [rbp+var_10B], al jmp short $+2 loc_260E0: mov al, [rbp+var_10B] test al, 1 jnz short loc_260EC jmp short loc_26102 loc_260EC: mov [rbp+var_BC], 1 mov [rbp+var_F0], 1 jmp short loc_2612B loc_26102: jmp short $+2 loc_26104: mov eax, [rbp+var_F4] add eax, 1 mov [rbp+var_F4], eax jmp short loc_260AC loc_26115: jmp short $+2 loc_26117: mov [rbp+var_BC], 0 mov [rbp+var_F0], 1 loc_2612B: lea rdi, [rbp+var_C9]; this call _ZN7SessionD2Ev; Session::~Session() mov eax, [rbp+var_BC] mov [rbp+var_110], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_26190 mov eax, [rbp+var_110] add rsp, 120h pop rbp retn loc_26164: mov rax, [rbp+var_E8] mov [rbp+var_118], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_26190 mov rdi, [rbp+var_118] call __Unwind_Resume loc_26190: call ___stack_chk_fail
int main(int argc, const char **argv, const char **envp) { int i; // [rsp+2Ch] [rbp-F4h] charset_info_st *v5; // [rsp+40h] [rbp-E0h] charset_info_st *v6; // [rsp+48h] [rbp-D8h] char v7; // [rsp+57h] [rbp-C9h] BYREF const char **v8; // [rsp+58h] [rbp-C8h] BYREF int v9; // [rsp+60h] [rbp-C0h] BYREF int v10; // [rsp+64h] [rbp-BCh] _BYTE v11[24]; // [rsp+68h] [rbp-B8h] BYREF _BYTE v12[152]; // [rsp+80h] [rbp-A0h] BYREF unsigned long long v13; // [rsp+118h] [rbp-8h] v13 = __readfsqword(0x28u); v10 = 0; v9 = argc; v8 = argv; Session::Session((Session *)&v7, *argv); if ( (unsigned int)handle_options(&v9, &v8, &long_options, get_one_option) ) { Session::usage((Session *)&v7); v10 = 1; } else { v6 = (charset_info_st *)CmdOpt::csinfo_from((CmdOpt *)&opt); if ( v6 ) { v5 = (charset_info_st *)CmdOpt::csinfo_to((CmdOpt *)&opt); if ( v5 ) { Conv::Conv((Conv *)v11, v5, v6, byte_398AA0 != 0); if ( qword_398A98 ) { if ( *((_DWORD *)v6 + 38) > 1u || *((_DWORD *)v5 + 38) > 1u ) { fprintf( stderr, "--delimiter cannot be used with %s to %s conversion\n", *((const char **)v6 + 2), *((const char **)v5 + 2)); v10 = 1; goto LABEL_23; } if ( (Delimiter::set_delimiter_unescape((Delimiter *)v12, qword_398A98) & 1) != 0 ) { fprintf(stderr, "Bad --delimiter value\n"); v10 = 1; goto LABEL_23; } } if ( v9 ) { for ( i = 0; i < v9; ++i ) { if ( (Conv::convert_binary_file_by_name((Conv *)v11, v8[i]) & 1) != 0 ) { v10 = 1; goto LABEL_23; } } } else if ( (Conv::convert_binary_stream(v11, stdin) & 1) != 0 ) { v10 = 1; goto LABEL_23; } v10 = 0; goto LABEL_23; } fprintf(stderr, "Character set %s is not supported\n", (const char *)qword_398A90); v10 = 1; } else { fprintf(stderr, "Character set %s is not supported\n", (const char *)opt); v10 = 1; } } LABEL_23: Session::~Session((Session *)&v7); return v10; }
main: PUSH RBP MOV RBP,RSP SUB RSP,0x120 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xbc],0x0 MOV dword ptr [RBP + -0xc0],EDI MOV qword ptr [RBP + -0xc8],RSI MOV RAX,qword ptr [RBP + -0xc8] MOV RSI,qword ptr [RAX] LEA RDI,[RBP + -0xc9] CALL 0x00126770 MOV qword ptr [RBP + -0xd8],0x0 MOV qword ptr [RBP + -0xe0],0x0 LAB_00125e1b: LEA RDX,[0x2e1010] LEA RCX,[0x1257f0] LEA RDI,[RBP + -0xc0] LEA RSI,[RBP + -0xc8] CALL 0x00132640 MOV dword ptr [RBP + -0xf8],EAX JMP 0x00125e44 LAB_00125e44: MOV EAX,dword ptr [RBP + -0xf8] CMP EAX,0x0 JZ 0x00125e99 LEA RDI,[RBP + -0xc9] CALL 0x001267a0 JMP 0x00125e5d LAB_00125e5d: MOV dword ptr [RBP + -0xbc],0x1 MOV dword ptr [RBP + -0xf0],0x1 JMP 0x0012612b LAB_00125e99: LEA RDI,[0x498a88] CALL 0x00126830 MOV qword ptr [RBP + -0x100],RAX JMP 0x00125eae LAB_00125eae: MOV RAX,qword ptr [RBP + -0x100] MOV qword ptr [RBP + -0xd8],RAX CMP RAX,0x0 JNZ 0x00125efa MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [0x00498a88] LEA RSI,[0x18909f] MOV AL,0x0 CALL 0x001254a0 MOV dword ptr [RBP + -0xbc],0x1 MOV dword ptr [RBP + -0xf0],0x1 JMP 0x0012612b LAB_00125efa: LEA RDI,[0x498a88] CALL 0x00126870 MOV qword ptr [RBP + -0x108],RAX JMP 0x00125f0f LAB_00125f0f: MOV RAX,qword ptr [RBP + -0x108] MOV qword ptr [RBP + -0xe0],RAX CMP RAX,0x0 JNZ 0x00125f5b MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [0x00498a90] LEA RSI,[0x18909f] MOV AL,0x0 CALL 0x001254a0 MOV dword ptr [RBP + -0xbc],0x1 MOV dword ptr [RBP + -0xf0],0x1 JMP 0x0012612b LAB_00125f5b: MOV RSI,qword ptr [RBP + -0xe0] MOV RDX,qword ptr [RBP + -0xd8] MOV AL,byte ptr [0x00498aa0] TEST AL,AL SETNZ AL MOVZX ECX,AL LEA RDI,[RBP + -0xb8] CALL 0x001268b0 JMP 0x00125f85 LAB_00125f85: CMP qword ptr [0x00498a98],0x0 JZ 0x00126054 MOV RAX,qword ptr [RBP + -0xd8] CMP dword ptr [RAX + 0x98],0x1 JA 0x00125fb3 MOV RAX,qword ptr [RBP + -0xe0] CMP dword ptr [RAX + 0x98],0x1 JBE 0x00125ffa LAB_00125fb3: MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0xd8] MOV RDX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0xe0] MOV RCX,qword ptr [RAX + 0x10] LEA RSI,[0x1890c2] MOV AL,0x0 CALL 0x001254a0 MOV dword ptr [RBP + -0xbc],0x1 MOV dword ptr [RBP + -0xf0],0x1 JMP 0x0012612b LAB_00125ffa: LEA RDI,[RBP + -0xa0] MOV RSI,qword ptr [0x00498a98] CALL 0x00126910 MOV byte ptr [RBP + -0x109],AL JMP 0x00126015 LAB_00126015: MOV AL,byte ptr [RBP + -0x109] TEST AL,0x1 JNZ 0x00126021 JMP 0x00126052 LAB_00126021: MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x1890f7] MOV AL,0x0 CALL 0x001254a0 MOV dword ptr [RBP + -0xbc],0x1 MOV dword ptr [RBP + -0xf0],0x1 JMP 0x0012612b LAB_00126052: JMP 0x00126054 LAB_00126054: CMP dword ptr [RBP + -0xc0],0x0 JNZ 0x001260a2 MOV RAX,qword ptr [0x002e0fd8] MOV RSI,qword ptr [RAX] LEA RDI,[RBP + -0xb8] CALL 0x001269f0 MOV byte ptr [RBP + -0x10a],AL JMP 0x0012607b LAB_0012607b: MOV AL,byte ptr [RBP + -0x10a] TEST AL,0x1 JNZ 0x00126087 JMP 0x001260a0 LAB_00126087: MOV dword ptr [RBP + -0xbc],0x1 MOV dword ptr [RBP + -0xf0],0x1 JMP 0x0012612b LAB_001260a0: JMP 0x00126117 LAB_001260a2: MOV dword ptr [RBP + -0xf4],0x0 LAB_001260ac: MOV EAX,dword ptr [RBP + -0xf4] CMP EAX,dword ptr [RBP + -0xc0] JGE 0x00126115 MOV RAX,qword ptr [RBP + -0xc8] MOVSXD RCX,dword ptr [RBP + -0xf4] MOV RSI,qword ptr [RAX + RCX*0x8] LEA RDI,[RBP + -0xb8] CALL 0x00126ab0 LAB_001260d8: MOV byte ptr [RBP + -0x10b],AL JMP 0x001260e0 LAB_001260e0: MOV AL,byte ptr [RBP + -0x10b] TEST AL,0x1 JNZ 0x001260ec JMP 0x00126102 LAB_001260ec: MOV dword ptr [RBP + -0xbc],0x1 MOV dword ptr [RBP + -0xf0],0x1 JMP 0x0012612b LAB_00126102: JMP 0x00126104 LAB_00126104: MOV EAX,dword ptr [RBP + -0xf4] ADD EAX,0x1 MOV dword ptr [RBP + -0xf4],EAX JMP 0x001260ac LAB_00126115: JMP 0x00126117 LAB_00126117: MOV dword ptr [RBP + -0xbc],0x0 MOV dword ptr [RBP + -0xf0],0x1 LAB_0012612b: LEA RDI,[RBP + -0xc9] CALL 0x00126b70 MOV EAX,dword ptr [RBP + -0xbc] MOV dword ptr [RBP + -0x110],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00126190 MOV EAX,dword ptr [RBP + -0x110] ADD RSP,0x120 POP RBP RET LAB_00126190: CALL 0x00125380
int4 main(int param_1,int8 *param_2) { byte bVar1; int iVar2; charset_info_st *pcVar3; charset_info_st *pcVar4; long in_FS_OFFSET; int local_fc; Session local_d1; int8 *local_d0; int local_c8; int4 local_c4; Conv local_c0 [24]; Delimiter local_a8 [152]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_c4 = 0; local_d0 = param_2; local_c8 = param_1; Session::Session(&local_d1,(char *)*param_2); /* try { // try from 00125e1b to 001260d7 has its CatchHandler @ 00125e76 */ iVar2 = handle_options(&local_c8,&local_d0,long_options,get_one_option); if (iVar2 == 0) { pcVar3 = (charset_info_st *)CmdOpt::csinfo_from((CmdOpt *)&opt); if (pcVar3 == (charset_info_st *)0x0) { fprintf(*(FILE **)PTR_stderr_002e0fe0,"Character set %s is not supported\n",opt); local_c4 = 1; } else { pcVar4 = (charset_info_st *)CmdOpt::csinfo_to((CmdOpt *)&opt); if (pcVar4 == (charset_info_st *)0x0) { fprintf(*(FILE **)PTR_stderr_002e0fe0,"Character set %s is not supported\n",DAT_00498a90); local_c4 = 1; } else { Conv::Conv(local_c0,pcVar4,pcVar3,DAT_00498aa0 != '\0'); if (DAT_00498a98 != (char *)0x0) { if ((1 < *(uint *)(pcVar3 + 0x98)) || (1 < *(uint *)(pcVar4 + 0x98))) { fprintf(*(FILE **)PTR_stderr_002e0fe0, "--delimiter cannot be used with %s to %s conversion\n", *(int8 *)(pcVar3 + 0x10),*(int8 *)(pcVar4 + 0x10)); local_c4 = 1; goto LAB_0012612b; } bVar1 = Delimiter::set_delimiter_unescape(local_a8,DAT_00498a98); if ((bVar1 & 1) != 0) { fprintf(*(FILE **)PTR_stderr_002e0fe0,"Bad --delimiter value\n"); local_c4 = 1; goto LAB_0012612b; } } if (local_c8 == 0) { bVar1 = Conv::convert_binary_stream(local_c0,*(_IO_FILE **)PTR_stdin_002e0fd8); if ((bVar1 & 1) != 0) { local_c4 = 1; goto LAB_0012612b; } } else { for (local_fc = 0; local_fc < local_c8; local_fc = local_fc + 1) { bVar1 = Conv::convert_binary_file_by_name(local_c0,(char *)local_d0[local_fc]); if ((bVar1 & 1) != 0) { local_c4 = 1; goto LAB_0012612b; } } } local_c4 = 0; } } } else { Session::usage(); local_c4 = 1; } LAB_0012612b: Session::~Session(&local_d1); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_c4; }
49,551
LefDefParser::lefiLayer::hasMinstepMinBetLength(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
int lefiLayer::hasMinstepMinBetLength(int index) const { char msg[160]; if (index < 0 || index > numMinstep_) { sprintf(msg, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d", index, numMinstep_); lefiError(0, 1302, msg); return 0; } return minstepMinBetLength_[index] == -1 ? 0 : 1; }
O3
cpp
LefDefParser::lefiLayer::hasMinstepMinBetLength(int) const: pushq %r14 pushq %rbx subq $0xa8, %rsp movl %esi, %edx testl %esi, %esi sets %al movl 0x278(%rdi), %ecx cmpl %esi, %ecx setl %sil orb %al, %sil cmpb $0x1, %sil jne 0x1d0b7 leaq 0x30f9a(%rip), %rsi # 0x4e031 xorl %ebx, %ebx movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x2050 xorl %edi, %edi movl $0x516, %esi # imm = 0x516 movq %r14, %rdx callq 0x27ae8 jmp 0x1d0d6 movq 0x2a8(%rdi), %rax movl %edx, %ecx movsd 0x2dfe0(%rip), %xmm0 # 0x4b0a8 cmpneqsd (%rax,%rcx,8), %xmm0 movq %xmm0, %rbx andl $0x1, %ebx movl %ebx, %eax addq $0xa8, %rsp popq %rbx popq %r14 retq nop
_ZNK12LefDefParser9lefiLayer22hasMinstepMinBetLengthEi: push r14 push rbx sub rsp, 0A8h mov edx, esi test esi, esi sets al mov ecx, [rdi+278h] cmp ecx, esi setl sil or sil, al cmp sil, 1 jnz short loc_1D0B7 lea rsi, aErrorLefpars13_19; "ERROR (LEFPARS-1302): The index number "... xor ebx, ebx mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf xor edi, edi; this mov esi, 516h; int mov rdx, r14; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) jmp short loc_1D0D6 loc_1D0B7: mov rax, [rdi+2A8h] mov ecx, edx movsd xmm0, cs:dbl_4B0A8 cmpneqsd xmm0, qword ptr [rax+rcx*8] movq rbx, xmm0 and ebx, 1 loc_1D0D6: mov eax, ebx add rsp, 0A8h pop rbx pop r14 retn
long long LefDefParser::lefiLayer::hasMinstepMinBetLength(LefDefParser::lefiLayer *this, int a2) { int v2; // ecx unsigned int v3; // ebx const char *v4; // rcx __m128d v5; // rt1 _BYTE v7[184]; // [rsp+0h] [rbp-B8h] BYREF v2 = *((_DWORD *)this + 158); if ( a2 < 0 || v2 < a2 ) { v3 = 0; sprintf( v7, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d", a2, v2); LefDefParser::lefiError(0LL, 1302, (int)v7, v4); } else { v5.m128d_f64[0] = *(double *)(*((_QWORD *)this + 85) + 8LL * (unsigned int)a2); return *(_OWORD *)&_mm_cmpneq_sd((__m128d)0xBFF0000000000000LL, v5) & 1; } return v3; }
hasMinstepMinBetLength: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV EDX,ESI TEST ESI,ESI SETS AL MOV ECX,dword ptr [RDI + 0x278] CMP ECX,ESI SETL SIL OR SIL,AL CMP SIL,0x1 JNZ 0x0011d0b7 LEA RSI,[0x14e031] XOR EBX,EBX MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00102050 XOR EDI,EDI MOV ESI,0x516 MOV RDX,R14 CALL 0x00127ae8 JMP 0x0011d0d6 LAB_0011d0b7: MOV RAX,qword ptr [RDI + 0x2a8] MOV ECX,EDX MOVSD XMM0,qword ptr [0x0014b0a8] CMPNEQSD XMM0,qword ptr [RAX + RCX*0x8] MOVQ RBX,XMM0 AND EBX,0x1 LAB_0011d0d6: MOV EAX,EBX ADD RSP,0xa8 POP RBX POP R14 RET
/* LefDefParser::lefiLayer::hasMinstepMinBetLength(int) const */ byte __thiscall LefDefParser::lefiLayer::hasMinstepMinBetLength(lefiLayer *this,int param_1) { byte bVar1; char acStack_b8 [168]; if (*(int *)(this + 0x278) < param_1 || param_1 < 0) { bVar1 = 0; sprintf(acStack_b8, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d" ); lefiError(0,0x516,acStack_b8); } else { bVar1 = -(DAT_0014b0a8 != *(double *)(*(long *)(this + 0x2a8) + (ulong)(uint)param_1 * 8)) & 1; } return bVar1; }
49,552
flux::parser::Parser::comparison()
kvthweatt[P]FluxLang/src/parser/parser.cpp
std::unique_ptr<Expr> Parser::comparison() { auto expr = bitShift(); while (match({ lexer::TokenType::LESS, lexer::TokenType::LESS_EQUAL, lexer::TokenType::GREATER, lexer::TokenType::GREATER_EQUAL })) { auto op = previous_; auto right = bitShift(); expr = std::make_unique<BinaryExpr>( std::move(expr), op, std::move(right), makeRange(op, previous_) ); } return expr; }
O3
cpp
flux::parser::Parser::comparison(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x23e74 leaq 0x68(%r14), %r13 leaq 0x70(%rsp), %r15 leaq 0x20(%rsp), %r12 movaps 0x6e5b(%rip), %xmm0 # 0x2ab00 movaps %xmm0, 0x20(%rsp) movl $0x4, %edx movq %r14, %rdi movq %r12, %rsi callq 0x14610 testb %al, %al je 0x23de4 movups (%r13), %xmm0 movups 0x10(%r13), %xmm1 movups 0x20(%r13), %xmm2 movups 0x30(%r13), %xmm3 movaps %xmm3, 0x50(%rsp) movaps %xmm2, 0x40(%rsp) movaps %xmm1, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movq %r15, 0x60(%rsp) movq 0xa8(%r14), %rsi movq 0xb0(%r14), %rdx addq %rsi, %rdx leaq 0x60(%rsp), %rdi callq 0x91b8 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x23e74 movups 0x38(%rsp), %xmm0 movaps %xmm0, 0x80(%rsp) movups 0x90(%r14), %xmm0 movaps %xmm0, 0x90(%rsp) movl $0x98, %edi callq 0x6270 movq %rax, %rbp movq (%rbx), %rax movq %rax, 0x18(%rsp) xorl %ecx, %ecx movq %rcx, (%rbx) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) movq %rcx, 0x10(%rsp) movq %rbp, %rdi leaq 0x18(%rsp), %rsi movq %r12, %rdx leaq 0x8(%rsp), %rcx leaq 0x80(%rsp), %r8 callq 0x11e60 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x23d8a movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x8(%rsp) movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x23da3 movq (%rdi), %rax callq *0x8(%rax) movq (%rbx), %rdi movq %rbp, (%rbx) testq %rdi, %rdi je 0x23db4 movq (%rdi), %rax callq *0x8(%rax) movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x23dc4 movq (%rdi), %rax callq *0x8(%rax) movq 0x60(%rsp), %rdi cmpq %r15, %rdi je 0x23c9e movq 0x70(%rsp), %rsi incq %rsi callq 0x6280 jmp 0x23c9e movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x23e0c movq (%rdi), %rax callq *0x8(%rax) leaq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rsi movq %rbp, %rdx callq 0x692a jmp 0x23e23 movq %rax, %r14 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x23e3a movq (%rdi), %rax callq *0x8(%rax) jmp 0x23e3a jmp 0x23e53 movq %rax, %r14 movq 0x60(%rsp), %rdi cmpq %r15, %rdi je 0x23e56 movq 0x70(%rsp), %rsi incq %rsi callq 0x6280 jmp 0x23e56 movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x23e64 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, (%rbx) movq %r14, %rdi callq 0x6440 nop
_ZN4flux6parser6Parser10comparisonEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r14, rsi mov rbx, rdi call _ZN4flux6parser6Parser8bitShiftEv; flux::parser::Parser::bitShift(void) lea r13, [r14+68h] lea r15, [rsp+0D8h+var_68] lea r12, [rsp+0D8h+var_B8] loc_23C9E: movaps xmm0, cs:xmmword_2AB00 movaps [rsp+0D8h+var_B8], xmm0 mov edx, 4 mov rdi, r14 mov rsi, r12 call _ZN4flux6parser6Parser5matchESt16initializer_listINS_5lexer9TokenTypeEE; flux::parser::Parser::match(std::initializer_list<flux::lexer::TokenType>) test al, al jz loc_23DE4 movups xmm0, xmmword ptr [r13+0] movups xmm1, xmmword ptr [r13+10h] movups xmm2, xmmword ptr [r13+20h] movups xmm3, xmmword ptr [r13+30h] movaps [rsp+0D8h+var_88], xmm3 movaps [rsp+0D8h+var_98], xmm2 movaps [rsp+0D8h+var_A8], xmm1 movaps [rsp+0D8h+var_B8], xmm0 mov [rsp+0D8h+var_78], r15 mov rsi, [r14+0A8h] mov rdx, [r14+0B0h] add rdx, rsi lea rdi, [rsp+0D8h+var_78] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rsp+0D8h+var_C8]; this mov rsi, r14 call _ZN4flux6parser6Parser8bitShiftEv; flux::parser::Parser::bitShift(void) movups xmm0, [rsp+0D8h+var_A8+8] movaps [rsp+0D8h+var_58], xmm0 movups xmm0, xmmword ptr [r14+90h] movaps [rsp+0D8h+var_48], xmm0 mov edi, 98h; unsigned __int64 call __Znwm; operator new(ulong) mov rbp, rax mov rax, [rbx] mov [rsp+0D8h+var_C0], rax xor ecx, ecx mov [rbx], rcx mov rax, [rsp+0D8h+var_C8] mov [rsp+0D8h+var_D0], rax mov [rsp+0D8h+var_C8], rcx mov rdi, rbp lea rsi, [rsp+0D8h+var_C0] mov rdx, r12 lea rcx, [rsp+0D8h+var_D0] lea r8, [rsp+0D8h+var_58] call _ZN4flux6parser10BinaryExprC2ESt10unique_ptrINS0_4ExprESt14default_deleteIS3_EERKNS_5lexer5TokenES6_RKNS_6common11SourceRangeE; flux::parser::BinaryExpr::BinaryExpr(std::unique_ptr<flux::parser::Expr>,flux::lexer::Token const&,std::unique_ptr<flux::parser::Expr>,flux::common::SourceRange const&) mov rdi, [rsp+0D8h+var_D0] test rdi, rdi jz short loc_23D8A mov rax, [rdi] call qword ptr [rax+8] loc_23D8A: mov [rsp+0D8h+var_D0], 0 mov rdi, [rsp+0D8h+var_C0] test rdi, rdi jz short loc_23DA3 mov rax, [rdi] call qword ptr [rax+8] loc_23DA3: mov rdi, [rbx] mov [rbx], rbp test rdi, rdi jz short loc_23DB4 mov rax, [rdi] call qword ptr [rax+8] loc_23DB4: mov rdi, [rsp+0D8h+var_C8] test rdi, rdi jz short loc_23DC4 mov rax, [rdi] call qword ptr [rax+8] loc_23DC4: mov rdi, [rsp+0D8h+var_78]; void * cmp rdi, r15 jz loc_23C9E mov rsi, [rsp+0D8h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_23C9E loc_23DE4: mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_23E0C mov rax, [rdi] call qword ptr [rax+8] loc_23E0C: lea rdi, [rsp+arg_0] lea rsi, [rsp+arg_10] mov rdx, rbp call _ZN4flux6parser6Parser10comparisonEv_cold_1; flux::parser::Parser::comparison(void) [clone] jmp short loc_23E23 mov r14, rax loc_23E23: mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_23E3A mov rax, [rdi] call qword ptr [rax+8] jmp short loc_23E3A jmp short loc_23E53 mov r14, rax loc_23E3A: mov rdi, [rsp+arg_58]; void * cmp rdi, r15 jz short loc_23E56 mov rsi, [rsp+arg_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_23E56 loc_23E53: mov r14, rax loc_23E56: mov rdi, [rbx] test rdi, rdi jz short loc_23E64 mov rax, [rdi] call qword ptr [rax+8] loc_23E64: mov qword ptr [rbx], 0 mov rdi, r14 call __Unwind_Resume
flux::parser::Parser * flux::parser::Parser::comparison(flux::parser::Parser *this, long long a2) { __int128 v3; // xmm0 __int128 v4; // xmm1 __int128 v5; // xmm2 long long v6; // rbp long long v7; // rdi long long v9; // [rsp+8h] [rbp-D0h] BYREF long long v10; // [rsp+10h] [rbp-C8h] BYREF long long v11; // [rsp+18h] [rbp-C0h] BYREF __int128 v12; // [rsp+20h] [rbp-B8h] BYREF __m256i v13; // [rsp+30h] [rbp-A8h] __int128 v14; // [rsp+50h] [rbp-88h] void *v15; // [rsp+60h] [rbp-78h] BYREF _QWORD v16[2]; // [rsp+70h] [rbp-68h] BYREF _OWORD v17[5]; // [rsp+80h] [rbp-58h] BYREF flux::parser::Parser::bitShift(this); while ( 1 ) { v12 = xmmword_2AB00; if ( !(unsigned __int8)flux::parser::Parser::match(a2, (long long)&v12, 4LL) ) break; v3 = *(_OWORD *)(a2 + 104); v4 = *(_OWORD *)(a2 + 120); v5 = *(_OWORD *)(a2 + 136); v14 = *(_OWORD *)(a2 + 152); *(_OWORD *)&v13.m256i_u64[2] = v5; *(_OWORD *)v13.m256i_i8 = v4; v12 = v3; v15 = v16; std::string::_M_construct<char *>( (long long)&v15, *(_BYTE **)(a2 + 168), *(_QWORD *)(a2 + 168) + *(_QWORD *)(a2 + 176)); flux::parser::Parser::bitShift((flux::parser::Parser *)&v10); v17[0] = *(_OWORD *)&v13.m256i_u64[1]; v17[1] = *(_OWORD *)(a2 + 144); v6 = operator new(0x98uLL); v11 = *(_QWORD *)this; *(_QWORD *)this = 0LL; v9 = v10; v10 = 0LL; flux::parser::BinaryExpr::BinaryExpr(v6, &v11, &v12, &v9, v17); if ( v9 ) (*(void ( **)(long long))(*(_QWORD *)v9 + 8LL))(v9); v9 = 0LL; if ( v11 ) (*(void ( **)(long long))(*(_QWORD *)v11 + 8LL))(v11); v7 = *(_QWORD *)this; *(_QWORD *)this = v6; if ( v7 ) (*(void ( **)(long long))(*(_QWORD *)v7 + 8LL))(v7); if ( v10 ) (*(void ( **)(long long))(*(_QWORD *)v10 + 8LL))(v10); if ( v15 != v16 ) operator delete(v15, v16[0] + 1LL); } return this; }
comparison: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV RBX,RDI CALL 0x00123e74 LEA R13,[R14 + 0x68] LEA R15,[RSP + 0x70] LEA R12,[RSP + 0x20] LAB_00123c9e: MOVAPS XMM0,xmmword ptr [0x0012ab00] MOVAPS xmmword ptr [RSP + 0x20],XMM0 LAB_00123caa: MOV EDX,0x4 MOV RDI,R14 MOV RSI,R12 CALL 0x00114610 TEST AL,AL JZ 0x00123de4 MOVUPS XMM0,xmmword ptr [R13] MOVUPS XMM1,xmmword ptr [R13 + 0x10] MOVUPS XMM2,xmmword ptr [R13 + 0x20] MOVUPS XMM3,xmmword ptr [R13 + 0x30] MOVAPS xmmword ptr [RSP + 0x50],XMM3 MOVAPS xmmword ptr [RSP + 0x40],XMM2 MOVAPS xmmword ptr [RSP + 0x30],XMM1 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV qword ptr [RSP + 0x60],R15 MOV RSI,qword ptr [R14 + 0xa8] MOV RDX,qword ptr [R14 + 0xb0] ADD RDX,RSI LAB_00123d00: LEA RDI,[RSP + 0x60] CALL 0x001091b8 LAB_00123d0a: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x00123e74 MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVAPS xmmword ptr [RSP + 0x80],XMM0 MOVUPS XMM0,xmmword ptr [R14 + 0x90] MOVAPS xmmword ptr [RSP + 0x90],XMM0 LAB_00123d34: MOV EDI,0x98 CALL 0x00106270 MOV RBP,RAX MOV RAX,qword ptr [RBX] MOV qword ptr [RSP + 0x18],RAX XOR ECX,ECX MOV qword ptr [RBX],RCX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RCX LAB_00123d5d: MOV RDI,RBP LEA RSI,[RSP + 0x18] MOV RDX,R12 LEA RCX,[RSP + 0x8] LEA R8,[RSP + 0x80] CALL 0x00111e60 LAB_00123d7a: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00123d8a MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_00123d8a: MOV qword ptr [RSP + 0x8],0x0 MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x00123da3 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_00123da3: MOV RDI,qword ptr [RBX] MOV qword ptr [RBX],RBP TEST RDI,RDI JZ 0x00123db4 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_00123db4: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x00123dc4 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_00123dc4: MOV RDI,qword ptr [RSP + 0x60] CMP RDI,R15 JZ 0x00123c9e MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x00106280 JMP 0x00123c9e LAB_00123de4: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* flux::parser::Parser::comparison() */ void flux::parser::Parser::comparison(void) { long *plVar1; char cVar2; BinaryExpr *pBVar3; long in_RSI; long *in_RDI; long *local_d0; long *local_c8; long *local_c0; int4 local_b8; int4 uStack_b4; int4 uStack_b0; int4 uStack_ac; int4 local_a8; int4 uStack_a4; int4 uStack_a0; int4 uStack_9c; int4 local_98; int4 uStack_94; int4 uStack_90; int4 uStack_8c; int4 local_88; int4 uStack_84; int4 uStack_80; int4 uStack_7c; long *local_78 [2]; long local_68 [2]; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; bitShift(); while( true ) { local_b8 = _DAT_0012ab00; uStack_b4 = _UNK_0012ab04; uStack_b0 = _UNK_0012ab08; uStack_ac = _UNK_0012ab0c; /* try { // try from 00123caa to 00123cb9 has its CatchHandler @ 00123e53 */ cVar2 = match(); if (cVar2 == '\0') break; local_b8 = *(int4 *)(in_RSI + 0x68); uStack_b4 = *(int4 *)(in_RSI + 0x6c); uStack_b0 = *(int4 *)(in_RSI + 0x70); uStack_ac = *(int4 *)(in_RSI + 0x74); local_a8 = *(int4 *)(in_RSI + 0x78); uStack_a4 = *(int4 *)(in_RSI + 0x7c); uStack_a0 = *(int4 *)(in_RSI + 0x80); uStack_9c = *(int4 *)(in_RSI + 0x84); local_98 = *(int4 *)(in_RSI + 0x88); uStack_94 = *(int4 *)(in_RSI + 0x8c); uStack_90 = *(int4 *)(in_RSI + 0x90); uStack_8c = *(int4 *)(in_RSI + 0x94); local_88 = *(int4 *)(in_RSI + 0x98); uStack_84 = *(int4 *)(in_RSI + 0x9c); uStack_80 = *(int4 *)(in_RSI + 0xa0); uStack_7c = *(int4 *)(in_RSI + 0xa4); /* try { // try from 00123d00 to 00123d09 has its CatchHandler @ 00123e35 */ local_78[0] = local_68; std::__cxx11::string::_M_construct<char*> (local_78,*(long *)(in_RSI + 0xa8),*(long *)(in_RSI + 0xb0) + *(long *)(in_RSI + 0xa8) ); /* try { // try from 00123d0a to 00123d16 has its CatchHandler @ 00123e37 */ bitShift(); local_58 = CONCAT44(uStack_9c,uStack_a0); uStack_50 = CONCAT44(uStack_94,local_98); local_48 = *(int8 *)(in_RSI + 0x90); uStack_40 = *(int8 *)(in_RSI + 0x98); /* try { // try from 00123d34 to 00123d3d has its CatchHandler @ 00123e20 */ pBVar3 = (BinaryExpr *)operator_new(0x98); local_c0 = (long *)*in_RDI; *in_RDI = 0; local_d0 = local_c8; local_c8 = (long *)0x0; /* try { // try from 00123d5d to 00123d79 has its CatchHandler @ 00123df9 */ BinaryExpr::BinaryExpr(pBVar3,&local_c0,&local_b8,&local_d0,&local_58); if (local_d0 != (long *)0x0) { (**(code **)(*local_d0 + 8))(); } local_d0 = (long *)0x0; if (local_c0 != (long *)0x0) { (**(code **)(*local_c0 + 8))(); } plVar1 = (long *)*in_RDI; *in_RDI = (long)pBVar3; if (plVar1 != (long *)0x0) { (**(code **)(*plVar1 + 8))(); } if (local_c8 != (long *)0x0) { (**(code **)(*local_c8 + 8))(); } if (local_78[0] != local_68) { operator_delete(local_78[0],local_68[0] + 1); } } return; }
49,553
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O0
cpp
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq %rdx, 0x140(%rsp) movq %rcx, 0x138(%rsp) leaq 0x108(%rsp), %rdi callq 0x172370 movq $0x0, 0x100(%rsp) movq 0x140(%rsp), %rdi callq 0x91b00 movq %rax, 0xf8(%rsp) movq 0x100(%rsp), %rax cmpq 0xf8(%rsp), %rax jae 0xf9031 movq 0x100(%rsp), %rsi movq %rsi, 0x20(%rsp) movq 0x140(%rsp), %rdi callq 0xfac80 movq %rax, %rsi leaq 0x108(%rsp), %rdi callq 0x172380 movq %rax, 0x28(%rsp) jmp 0xf8ff5 movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, (%rax) movq 0x100(%rsp), %rax addq $0x1, %rax movq %rax, 0x100(%rsp) jmp 0xf8fb2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf918d leaq 0x40(%rsp), %rdi movq %rdi, 0x18(%rsp) movq 0x140(%rsp), %rsi callq 0x922b0 jmp 0xf904a leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) movq 0x148(%rsp), %rsi callq 0x5a1f0 jmp 0xf9063 leaq 0x78(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0x108(%rsp), %rsi callq 0x172470 jmp 0xf907c leaq 0xa8(%rsp), %rdi movq 0x138(%rsp), %rsi callq 0x1724a0 jmp 0xf9093 leaq 0xc8(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0xf91b0 jmp 0xf90a7 movq 0x30(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0x13db30 jmp 0xf90bb leaq 0xc8(%rsp), %rdi callq 0x13dc60 leaq 0x40(%rsp), %rdi callq 0xf9260 leaq 0x108(%rsp), %rdi callq 0x172550 movq 0x38(%rsp), %rax addq $0x158, %rsp # imm = 0x158 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf9140 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf9136 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) callq 0x172550 movq 0x10(%rsp), %rdi callq 0x5b648 movq 0x18(%rsp), %rdi callq 0x65630 jmp 0xf918d movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf9183 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xc8(%rsp), %rdi callq 0x13dc60 leaq 0x40(%rsp), %rdi callq 0xf9260 leaq 0x108(%rsp), %rdi callq 0x172550 movq 0xf0(%rsp), %rdi callq 0x5ac00 nopw (%rax,%rax)
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE: sub rsp, 158h mov [rsp+158h+var_128], rdi mov rax, rdi mov [rsp+158h+var_120], rax mov [rsp+158h+var_8], rdi mov [rsp+158h+var_10], rsi mov [rsp+158h+var_18], rdx mov [rsp+158h+var_20], rcx lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2Ev; std::map<std::string,ulong>::map(void) mov [rsp+158h+var_58], 0 mov rdi, [rsp+158h+var_18] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov [rsp+158h+var_60], rax loc_F8FB2: mov rax, [rsp+158h+var_58] cmp rax, [rsp+158h+var_60] jnb short loc_F9031 mov rsi, [rsp+158h+var_58] mov [rsp+158h+var_138], rsi mov rdi, [rsp+158h+var_18] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rsp+158h+var_130], rax jmp short $+2 loc_F8FF5: mov rax, [rsp+158h+var_130] mov rcx, [rsp+158h+var_138] mov [rax], rcx mov rax, [rsp+158h+var_58] add rax, 1 mov [rsp+158h+var_58], rax jmp short loc_F8FB2 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp loc_F918D loc_F9031: lea rdi, [rsp+158h+var_118] mov [rsp+158h+var_140], rdi mov rsi, [rsp+158h+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) jmp short $+2 loc_F904A: lea rdi, [rsp+158h+var_100] mov [rsp+158h+var_148], rdi mov rsi, [rsp+158h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_F9063: lea rdi, [rsp+158h+var_E0] mov [rsp+158h+var_150], rdi lea rsi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2ERKSC_; std::map<std::string,ulong>::map(std::map<std::string,ulong> const&) jmp short $+2 loc_F907C: lea rdi, [rsp+158h+var_B0] mov rsi, [rsp+158h+var_20] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) jmp short $+2 loc_F9093: lea rdi, [rsp+158h+var_90] lea rsi, [rsp+158h+var_118] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISH_SaISH_EERKS_IFS1_S6_RS1_EEE3$_0vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>(minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0 &&) jmp short $+2 loc_F90A7: mov rdi, [rsp+158h+var_128] lea rsi, [rsp+158h+var_90] call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) jmp short $+2 loc_F90BB: lea rdi, [rsp+158h+var_90] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function() lea rdi, [rsp+158h+var_118] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() mov rax, [rsp+158h+var_120] add rsp, 158h retn mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F9140 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F9136 mov rdi, [rsp+arg_0] mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() loc_F9136: mov rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F9140: mov rdi, [rsp+arg_10] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_F918D mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F9183 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_C0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function() loc_F9183: lea rdi, [rsp+arg_38] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() loc_F918D: lea rdi, [rsp+arg_100] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() mov rdi, [rsp+arg_E8] call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v4; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d int v13; // edx int v14; // ecx int v15; // r8d int v16; // r9d _QWORD v18[3]; // [rsp+40h] [rbp-118h] BYREF _BYTE v19[32]; // [rsp+58h] [rbp-100h] BYREF _BYTE v20[48]; // [rsp+78h] [rbp-E0h] BYREF char v21; // [rsp+A8h] [rbp-B0h] BYREF _BYTE v22[48]; // [rsp+C8h] [rbp-90h] BYREF unsigned long long v23; // [rsp+F8h] [rbp-60h] unsigned long long v24; // [rsp+100h] [rbp-58h] _BYTE v25[48]; // [rsp+108h] [rbp-50h] BYREF long long v26; // [rsp+138h] [rbp-20h] _QWORD *v27; // [rsp+140h] [rbp-18h] long long v28; // [rsp+148h] [rbp-10h] long long v29; // [rsp+150h] [rbp-8h] v29 = a1; v28 = a2; v27 = a3; v26 = a4; std::map<std::string,unsigned long>::map(v25); v24 = 0LL; v23 = std::vector<std::string>::size(v27); while ( v24 < v23 ) { v4 = std::vector<std::string>::operator[](v27, v24); *(_QWORD *)std::map<std::string,unsigned long>::operator[](v25, v4) = v24++; } std::vector<std::string>::vector(v18, v27); std::string::basic_string(v19, v28); std::map<std::string,unsigned long>::map(v20, v25); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function( (unsigned int)&v21, v26, v5, v6, v7, v8); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>( (unsigned int)v22, (unsigned int)v18, v9, v10, v11, v12); minja::Value::callable(a1, (unsigned int)v22, v13, v14, v15, v16); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function(v22); minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v18); std::map<std::string,unsigned long>::~map(v25); return a1; }
simple_function: SUB RSP,0x158 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x150],RDI MOV qword ptr [RSP + 0x148],RSI MOV qword ptr [RSP + 0x140],RDX MOV qword ptr [RSP + 0x138],RCX LEA RDI,[RSP + 0x108] CALL 0x00272370 MOV qword ptr [RSP + 0x100],0x0 MOV RDI,qword ptr [RSP + 0x140] CALL 0x00191b00 MOV qword ptr [RSP + 0xf8],RAX LAB_001f8fb2: MOV RAX,qword ptr [RSP + 0x100] CMP RAX,qword ptr [RSP + 0xf8] JNC 0x001f9031 MOV RSI,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x20],RSI MOV RDI,qword ptr [RSP + 0x140] CALL 0x001fac80 MOV RSI,RAX LAB_001f8fe1: LEA RDI,[RSP + 0x108] CALL 0x00272380 MOV qword ptr [RSP + 0x28],RAX JMP 0x001f8ff5 LAB_001f8ff5: MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x100] ADD RAX,0x1 MOV qword ptr [RSP + 0x100],RAX JMP 0x001f8fb2 LAB_001f9031: LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x18],RDI MOV RSI,qword ptr [RSP + 0x140] CALL 0x001922b0 JMP 0x001f904a LAB_001f904a: LEA RDI,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RDI MOV RSI,qword ptr [RSP + 0x148] LAB_001f905c: CALL 0x0015a1f0 JMP 0x001f9063 LAB_001f9063: LEA RDI,[RSP + 0x78] MOV qword ptr [RSP + 0x8],RDI LAB_001f906d: LEA RSI,[RSP + 0x108] CALL 0x00272470 JMP 0x001f907c LAB_001f907c: LEA RDI,[RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x138] LAB_001f908c: CALL 0x002724a0 JMP 0x001f9093 LAB_001f9093: LEA RDI,[RSP + 0xc8] LEA RSI,[RSP + 0x40] CALL 0x001f91b0 JMP 0x001f90a7 LAB_001f90a7: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0xc8] CALL 0x0023db30 LAB_001f90b9: JMP 0x001f90bb LAB_001f90bb: LEA RDI,[RSP + 0xc8] CALL 0x0023dc60 LEA RDI,[RSP + 0x40] CALL 0x001f9260 LEA RDI,[RSP + 0x108] CALL 0x00272550 MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x158 RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */ minja * __thiscall minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3) { ulong uVar1; string *psVar2; ulong *puVar3; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_118 [24]; string local_100 [32]; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_e0 [48]; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_b0 [32]; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> local_90 [48] ; ulong local_60; ulong local_58; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_50 [48]; function *local_20; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18; string *local_10; minja *local_8; local_20 = param_3; local_18 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_2; local_10 = param_1; local_8 = this; std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::map(local_50); local_58 = 0; local_60 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_18); for (; uVar1 = local_58, local_58 < local_60; local_58 = local_58 + 1) { psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] (local_18,local_58); /* try { // try from 001f8fe1 to 001f9047 has its CatchHandler @ 001f9018 */ puVar3 = (ulong *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[](local_50,psVar2); *puVar3 = uVar1; } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (local_118,(vector *)local_18); /* try { // try from 001f905c to 001f9060 has its CatchHandler @ 001f90ec */ std::__cxx11::string::string(local_100,local_10); /* try { // try from 001f906d to 001f9079 has its CatchHandler @ 001f9102 */ std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::map(local_e0,(map *)local_50); /* try { // try from 001f908c to 001f9090 has its CatchHandler @ 001f9118 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function (local_b0,local_20); /* try { // try from 001f9093 to 001f90a4 has its CatchHandler @ 001f914c */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: function<minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::__0,void> (local_90,(__0 *)local_118); /* try { // try from 001f90a7 to 001f90b8 has its CatchHandler @ 001f9162 */ Value::callable((Value *)this,(function *)local_90); std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: ~function(local_90); simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&) ::$_0::~__0((__0 *)local_118); std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~map(local_50); return this; }
49,554
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O1
cpp
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, 0x28(%rsp) movq %rdx, %r15 movq %rsi, %r14 movq %rdi, 0x20(%rsp) leaq 0xc0(%rsp), %rax movl $0x0, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) movq %rcx, 0x20(%rax) movq 0x8(%rdx), %rbp subq (%rdx), %rbp je 0x7a4a4 sarq $0x5, %rbp cmpq $0x1, %rbp adcq $0x0, %rbp xorl %ebx, %ebx leaq 0xb8(%rsp), %r13 xorl %r12d, %r12d movq (%r15), %rsi addq %rbx, %rsi movq %r13, %rdi callq 0xaf108 movq %r12, (%rax) incq %r12 addq $0x20, %rbx cmpq %r12, %rbp jne 0x7a487 leaq 0x30(%rsp), %rdi movq %r15, %rsi callq 0x56c24 leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r13 movq %r13, -0x10(%r13) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx callq 0x2437a leaq 0x68(%rsp), %r14 leaq 0xb8(%rsp), %rsi movq %r14, %rdi callq 0xaf562 leaq 0x98(%rsp), %r15 movq %r15, %rdi movq 0x28(%rsp), %rsi callq 0xaf184 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movl $0x88, %edi callq 0x1b8b0 movq %rax, %r12 leaq 0x30(%rsp), %rsi movq %rax, %rdi callq 0x56c24 leaq 0x18(%r12), %rdi leaq 0x28(%r12), %rbp movq %rbp, 0x18(%r12) movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx addq %rsi, %rdx callq 0x2437a leaq 0x40(%r12), %rax movq 0x78(%rsp), %rcx testq %rcx, %rcx je 0x7a58f leaq 0x70(%rsp), %rdx movl (%rdx), %esi movl %esi, 0x40(%r12) movq %rcx, 0x48(%r12) movups 0x10(%rdx), %xmm0 movups %xmm0, 0x50(%r12) movq %rax, 0x8(%rcx) leaq 0x90(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x60(%r12) movq $0x0, -0x18(%rax) movq %rdx, -0x10(%rax) movq %rdx, -0x8(%rax) jmp 0x7a5b0 movl $0x0, 0x40(%r12) movq $0x0, 0x48(%r12) movq %rax, 0x50(%r12) movq %rax, 0x58(%r12) leaq 0x60(%r12), %rax movq $0x0, (%rax) leaq 0x68(%r12), %rdi movq %r15, %rsi callq 0xaf184 movq %rsp, %rsi movq %r12, (%rsi) leaq 0x1d5(%rip), %rax # 0x7a7a6 movq %rax, 0x18(%rsi) leaq 0x858(%rip), %rax # 0x7ae34 movq %rax, 0x10(%rsi) movq 0x20(%rsp), %rbx movq %rbx, %rdi callq 0x98b5e movq 0x10(%rsp), %rax testq %rax, %rax je 0x7a604 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0xa8(%rsp), %rax testq %rax, %rax je 0x7a61e movq %r15, %rdi movq %r15, %rsi movl $0x3, %edx callq *%rax movq %r14, %rdi callq 0xaf7c4 movq 0x48(%rsp), %rdi cmpq %r13, %rdi je 0x7a63d movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8e0 leaq 0x30(%rsp), %rdi callq 0x23eea leaq 0xb8(%rsp), %rdi callq 0xaf7c4 movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x7a6fd jmp 0x7a6fd movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x7a6f1 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x7a6f1 jmp 0x7a6fd movq %rax, %rbx movq %r12, %rdi addq $0x38, %rdi callq 0xaf7c4 movq 0x18(%r12), %rdi cmpq %rbp, %rdi je 0x7a6bb movq (%rbp), %rsi incq %rsi callq 0x1b8e0 jmp 0x7a6bb movq %rax, %rbx movq %r12, %rdi callq 0x23eea jmp 0x7a6c8 movq %rax, %rbx movl $0x88, %esi movq %r12, %rdi callq 0x1b8e0 jmp 0x7a6da movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x7a6f1 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x30(%rsp), %rdi callq 0x7a758 jmp 0x7a742 movq %rax, %rdi callq 0x242ab movq %rax, %rbx movq %r14, %rdi callq 0xaf7c4 jmp 0x7a715 movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r13, %rdi je 0x7a731 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x7a731 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x23eea jmp 0x7a742 jmp 0x7a73f movq %rax, %rbx leaq 0xb8(%rsp), %rdi callq 0xaf7c4 movq %rbx, %rdi callq 0x1c030 nop
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rsp+118h+var_F0], rcx mov r15, rdx mov r14, rsi mov [rsp+118h+var_F8], rdi lea rax, [rsp+118h+var_58] mov dword ptr [rax], 0 xor ecx, ecx mov [rax+8], rcx mov [rax+10h], rax mov [rax+18h], rax mov [rax+20h], rcx mov rbp, [rdx+8] sub rbp, [rdx] jz short loc_7A4A4 sar rbp, 5 cmp rbp, 1 adc rbp, 0 xor ebx, ebx lea r13, [rsp+118h+var_60] xor r12d, r12d loc_7A487: mov rsi, [r15] add rsi, rbx mov rdi, r13 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rax], r12 inc r12 add rbx, 20h ; ' ' cmp rbp, r12 jnz short loc_7A487 loc_7A4A4: lea rdi, [rsp+118h+var_E8] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea rdi, [rsp+118h+var_D0] lea r13, [rsp+118h+var_C0] mov [r13-10h], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea r14, [rsp+118h+var_B0] lea rsi, [rsp+118h+var_60] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&) lea r15, [rsp+118h+var_80] mov rdi, r15 mov rsi, [rsp+118h+var_F0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) xorps xmm0, xmm0 movaps [rsp+118h+var_108], xmm0 movaps [rsp+118h+var_118], xmm0 mov edi, 88h; unsigned __int64 call __Znwm; operator new(ulong) mov r12, rax lea rsi, [rsp+118h+var_E8] mov rdi, rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea rdi, [r12+18h] lea rbp, [r12+28h] mov [r12+18h], rbp mov rsi, [rsp+118h+var_D0] mov rdx, [rsp+118h+var_C8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, [r12+40h] mov rcx, [rsp+118h+var_A0] test rcx, rcx jz short loc_7A58F lea rdx, [rsp+118h+var_A8] mov esi, [rdx] mov [r12+40h], esi mov [r12+48h], rcx movups xmm0, xmmword ptr [rdx+10h] movups xmmword ptr [r12+50h], xmm0 mov [rcx+8], rax lea rax, [rsp+118h+var_88] mov rcx, [rax] mov [r12+60h], rcx mov qword ptr [rax-18h], 0 mov [rax-10h], rdx mov [rax-8], rdx jmp short loc_7A5B0 loc_7A58F: mov dword ptr [r12+40h], 0 mov qword ptr [r12+48h], 0 mov [r12+50h], rax mov [r12+58h], rax lea rax, [r12+60h] loc_7A5B0: mov qword ptr [rax], 0 lea rdi, [r12+68h] mov rsi, r15 call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) mov rsi, rsp mov [rsi], r12 lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8_; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax mov rbx, [rsp+118h+var_F8] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) mov rax, qword ptr [rsp+118h+var_108] test rax, rax jz short loc_7A604 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_7A604: mov rax, [rsp+118h+var_70] test rax, rax jz short loc_7A61E mov rdi, r15 mov rsi, r15 mov edx, 3 call rax loc_7A61E: mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, [rsp+118h+var_D0]; void * cmp rdi, r13 jz short loc_7A63D mov rsi, [rsp+118h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7A63D: lea rdi, [rsp+118h+var_E8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+118h+var_60] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_7A6FD jmp loc_7A6FD mov rbx, rax mov rax, qword ptr [rsp+118h+var_108] test rax, rax jz short loc_7A6F1 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_7A6F1 jmp short loc_7A6FD mov rbx, rax mov rdi, r12 add rdi, 38h ; '8' call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, [r12+18h]; void * cmp rdi, rbp jz short loc_7A6BB mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7A6BB mov rbx, rax loc_7A6BB: mov rdi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_7A6C8 mov rbx, rax loc_7A6C8: mov esi, 88h; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7A6DA mov rbx, rax loc_7A6DA: mov rax, qword ptr [rsp+118h+var_108] test rax, rax jz short loc_7A6F1 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_7A6F1: lea rdi, [rsp+118h+var_E8] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() jmp short loc_7A742 loc_7A6FD: mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() jmp short loc_7A715 mov rbx, rax loc_7A715: mov rdi, [rsp+118h+var_D0]; void * cmp rdi, r13 jz short loc_7A731 mov rsi, [rsp+118h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7A731 mov rbx, rax loc_7A731: lea rdi, [rsp+118h+var_E8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_7A742 jmp short $+2 loc_7A73F: mov rbx, rax loc_7A742: lea rdi, [rsp+118h+var_60] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v5; // rbp long long v6; // rbp long long v7; // rbx long long v8; // r12 long long v9; // r12 long long v10; // rax long long v11; // rcx long long *v12; // rax long long v13; // rbx int v14; // edx int v15; // ecx int v16; // r8d int v17; // r9d __int128 v19; // [rsp+0h] [rbp-118h] BYREF __int128 v20; // [rsp+10h] [rbp-108h] long long v21; // [rsp+20h] [rbp-F8h] long long v22; // [rsp+28h] [rbp-F0h] _QWORD v23[3]; // [rsp+30h] [rbp-E8h] BYREF void *v24[2]; // [rsp+48h] [rbp-D0h] BYREF _QWORD v25[2]; // [rsp+58h] [rbp-C0h] BYREF _BYTE v26[8]; // [rsp+68h] [rbp-B0h] BYREF int v27; // [rsp+70h] [rbp-A8h] BYREF long long v28; // [rsp+78h] [rbp-A0h] __int128 v29; // [rsp+80h] [rbp-98h] long long v30; // [rsp+90h] [rbp-88h] BYREF _BYTE v31[16]; // [rsp+98h] [rbp-80h] BYREF void ( *v32)(_BYTE *, _BYTE *, long long); // [rsp+A8h] [rbp-70h] _BYTE v33[8]; // [rsp+B8h] [rbp-60h] BYREF int v34; // [rsp+C0h] [rbp-58h] BYREF long long v35; // [rsp+C8h] [rbp-50h] int *v36; // [rsp+D0h] [rbp-48h] int *v37; // [rsp+D8h] [rbp-40h] long long v38; // [rsp+E0h] [rbp-38h] v22 = a4; v21 = a1; v34 = 0; v35 = 0LL; v36 = &v34; v37 = &v34; v38 = 0LL; v5 = a3[1] - *a3; if ( v5 ) { v6 = (v5 >> 5 == 0) + (v5 >> 5); v7 = 0LL; v8 = 0LL; do { *(_QWORD *)std::map<std::string,unsigned long>::operator[](v33, v7 + *a3) = v8++; v7 += 32LL; } while ( v6 != v8 ); } std::vector<std::string>::vector((long long)v23, a3); v24[0] = v25; std::string::_M_construct<char *>(v24, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree( v26, v33); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v31, v22); v20 = 0LL; v19 = 0LL; v9 = operator new(0x88uLL); std::vector<std::string>::vector(v9, v23); *(_QWORD *)(v9 + 24) = v9 + 40; std::string::_M_construct<char *>((_QWORD *)(v9 + 24), (_BYTE *)v24[0], (long long)v24[0] + (unsigned long long)v24[1]); v10 = v9 + 64; v11 = v28; if ( v28 ) { *(_DWORD *)(v9 + 64) = v27; *(_QWORD *)(v9 + 72) = v11; *(_OWORD *)(v9 + 80) = v29; *(_QWORD *)(v11 + 8) = v10; v12 = &v30; *(_QWORD *)(v9 + 96) = v30; v28 = 0LL; *(_QWORD *)&v29 = &v27; *((_QWORD *)&v29 + 1) = &v27; } else { *(_DWORD *)(v9 + 64) = 0; *(_QWORD *)(v9 + 72) = 0LL; *(_QWORD *)(v9 + 80) = v10; *(_QWORD *)(v9 + 88) = v10; v12 = (long long *)(v9 + 96); } *v12 = 0LL; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v9 + 104, v31); *((_QWORD *)&v20 + 1) = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke; *(_QWORD *)&v20 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager; v13 = v21; minja::Value::callable(v21, (unsigned int)&v19, v14, v15, v16, v17, v9, *((long long *)&v19 + 1)); if ( (_QWORD)v20 ) ((void ( *)(__int128 *, __int128 *, long long))v20)(&v19, &v19, 3LL); if ( v32 ) v32(v31, v31, 3LL); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree(v26); if ( v24[0] != v25 ) operator delete(v24[0], v25[0] + 1LL); std::vector<std::string>::~vector(v23); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree(v33); return v13; }
simple_function: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV qword ptr [RSP + 0x28],RCX MOV R15,RDX MOV R14,RSI MOV qword ptr [RSP + 0x20],RDI LEA RAX,[RSP + 0xc0] MOV dword ptr [RAX],0x0 XOR ECX,ECX MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX + 0x10],RAX MOV qword ptr [RAX + 0x18],RAX MOV qword ptr [RAX + 0x20],RCX MOV RBP,qword ptr [RDX + 0x8] SUB RBP,qword ptr [RDX] JZ 0x0017a4a4 SAR RBP,0x5 CMP RBP,0x1 ADC RBP,0x0 XOR EBX,EBX LEA R13,[RSP + 0xb8] XOR R12D,R12D LAB_0017a487: MOV RSI,qword ptr [R15] ADD RSI,RBX LAB_0017a48d: MOV RDI,R13 CALL 0x001af108 MOV qword ptr [RAX],R12 INC R12 ADD RBX,0x20 CMP RBP,R12 JNZ 0x0017a487 LAB_0017a4a4: LEA RDI,[RSP + 0x30] MOV RSI,R15 CALL 0x00156c24 LEA RDI,[RSP + 0x48] LEA R13,[RSP + 0x58] MOV qword ptr [R13 + -0x10],R13 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] ADD RDX,RSI LAB_0017a4c9: CALL 0x0012437a LEA R14,[RSP + 0x68] LAB_0017a4d3: LEA RSI,[RSP + 0xb8] MOV RDI,R14 CALL 0x001af562 LEA R15,[RSP + 0x98] LAB_0017a4eb: MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x28] CALL 0x001af184 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 LAB_0017a504: MOV EDI,0x88 CALL 0x0011b8b0 LAB_0017a50e: MOV R12,RAX LEA RSI,[RSP + 0x30] MOV RDI,RAX CALL 0x00156c24 LEA RDI,[R12 + 0x18] LEA RBP,[R12 + 0x28] MOV qword ptr [R12 + 0x18],RBP MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] ADD RDX,RSI LAB_0017a53a: CALL 0x0012437a LEA RAX,[R12 + 0x40] MOV RCX,qword ptr [RSP + 0x78] TEST RCX,RCX JZ 0x0017a58f LEA RDX,[RSP + 0x70] MOV ESI,dword ptr [RDX] MOV dword ptr [R12 + 0x40],ESI MOV qword ptr [R12 + 0x48],RCX MOVUPS XMM0,xmmword ptr [RDX + 0x10] MOVUPS xmmword ptr [R12 + 0x50],XMM0 MOV qword ptr [RCX + 0x8],RAX LEA RAX,[RSP + 0x90] MOV RCX,qword ptr [RAX] MOV qword ptr [R12 + 0x60],RCX MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RDX MOV qword ptr [RAX + -0x8],RDX JMP 0x0017a5b0 LAB_0017a58f: MOV dword ptr [R12 + 0x40],0x0 MOV qword ptr [R12 + 0x48],0x0 MOV qword ptr [R12 + 0x50],RAX MOV qword ptr [R12 + 0x58],RAX LEA RAX,[R12 + 0x60] LAB_0017a5b0: MOV qword ptr [RAX],0x0 LEA RDI,[R12 + 0x68] LAB_0017a5bc: MOV RSI,R15 CALL 0x001af184 MOV RSI,RSP MOV qword ptr [RSI],R12 LEA RAX,[0x17a7a6] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x17ae34] MOV qword ptr [RSI + 0x10],RAX LAB_0017a5e0: MOV RBX,qword ptr [RSP + 0x20] MOV RDI,RBX CALL 0x00198b5e MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0017a604 LAB_0017a5f7: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0017a604: MOV RAX,qword ptr [RSP + 0xa8] TEST RAX,RAX JZ 0x0017a61e LAB_0017a611: MOV RDI,R15 MOV RSI,R15 MOV EDX,0x3 CALL RAX LAB_0017a61e: MOV RDI,R14 CALL 0x001af7c4 MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R13 JZ 0x0017a63d MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011b8e0 LAB_0017a63d: LEA RDI,[RSP + 0x30] CALL 0x00123eea LEA RDI,[RSP + 0xb8] CALL 0x001af7c4 MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */ Value * __thiscall minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3) { minja *pmVar1; long *plVar2; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar3; long lVar4; long lVar5; long lVar6; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_118; int8 uStack_110; code *local_108; code *pcStack_100; minja *local_f8; function *local_f0; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_e8 [24]; long *local_d0; long local_c8; long local_c0 [2]; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_b0 [8]; int4 local_a8 [2]; long local_a0; int4 *local_98; int4 *puStack_90; int8 local_88; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_80 [16]; code *local_70; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_60 [8]; int4 local_58 [2]; int8 local_50; int4 *local_48; int4 *local_40; int8 local_38; local_48 = local_58; local_58[0] = 0; local_50 = 0; local_38 = 0; local_f8 = this; local_f0 = param_3; local_40 = local_48; if (*(long *)(param_2 + 8) - *(long *)param_2 != 0) { lVar5 = *(long *)(param_2 + 8) - *(long *)param_2 >> 5; lVar4 = 0; lVar6 = 0; do { /* try { // try from 0017a48d to 0017a494 has its CatchHandler @ 0017a73f */ plVar2 = (long *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[](local_60,(string *)(*(long *)param_2 + lVar4)); *plVar2 = lVar6; lVar6 = lVar6 + 1; lVar4 = lVar4 + 0x20; } while (lVar5 + (ulong)(lVar5 == 0) != lVar6); } /* try { // try from 0017a4a4 to 0017a4b0 has its CatchHandler @ 0017a73d */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_e8,param_2); local_d0 = local_c0; /* try { // try from 0017a4c9 to 0017a4cd has its CatchHandler @ 0017a72e */ std::__cxx11::string::_M_construct<char*> (&local_d0,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); /* try { // try from 0017a4d3 to 0017a4e2 has its CatchHandler @ 0017a712 */ std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::_Rb_tree(local_b0,(_Rb_tree *)local_60); /* try { // try from 0017a4eb to 0017a4f7 has its CatchHandler @ 0017a705 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function (local_80,local_f0); local_108 = (code *)0x0; pcStack_100 = (code *)0x0; local_118 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0; uStack_110 = 0; /* try { // try from 0017a504 to 0017a50d has its CatchHandler @ 0017a6d7 */ this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88); /* try { // try from 0017a50e to 0017a51d has its CatchHandler @ 0017a6c5 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (this_00,(vector *)local_e8); *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x18) = this_00 + 0x28; /* try { // try from 0017a53a to 0017a53e has its CatchHandler @ 0017a6b8 */ std::__cxx11::string::_M_construct<char*>(this_00 + 0x18,local_d0,local_c8 + (long)local_d0); pvVar3 = this_00 + 0x40; if (local_a0 == 0) { *(int4 *)(this_00 + 0x40) = 0; *(int8 *)(this_00 + 0x48) = 0; *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x50) = pvVar3 ; *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x58) = pvVar3 ; pvVar3 = this_00 + 0x60; } else { *(int4 *)(this_00 + 0x40) = local_a8[0]; *(long *)(this_00 + 0x48) = local_a0; *(int4 **)(this_00 + 0x50) = local_98; *(int4 **)(this_00 + 0x58) = puStack_90; *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(local_a0 + 8) = pvVar3; pvVar3 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88; *(int8 *)(this_00 + 0x60) = local_88; local_a0 = 0; local_98 = local_a8; puStack_90 = local_a8; } *(int8 *)pvVar3 = 0; /* try { // try from 0017a5bc to 0017a5c3 has its CatchHandler @ 0017a691 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function ((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *) (this_00 + 0x68),local_80); pmVar1 = local_f8; pcStack_100 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_invoke; local_108 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_manager; local_118 = this_00; /* try { // try from 0017a5e0 to 0017a5ec has its CatchHandler @ 0017a673 */ Value::callable((Value *)local_f8,(function *)&local_118); if (local_108 != (code *)0x0) { /* try { // try from 0017a5f7 to 0017a603 has its CatchHandler @ 0017a66e */ (*local_108)(&local_118,&local_118,3); } if (local_70 != (code *)0x0) { /* try { // try from 0017a611 to 0017a61d has its CatchHandler @ 0017a669 */ (*local_70)(local_80,local_80,3); } std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~_Rb_tree(local_b0); if (local_d0 != local_c0) { operator_delete(local_d0,local_c0[0] + 1); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_e8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)local_60); return (Value *)pmVar1; }
49,555
psi_prlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_prlock_wrlock(mysql_prlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line); int result= rw_pr_wrlock(&that->m_prlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O3
c
psi_prlock_wrlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x2cbe61(%rip), %r15 # 0x2f0848 movq (%r15), %rax movq 0x68(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x1 popq %rdx callq *0x1b0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0x29f6d movl %eax, %r14d testq %rbx, %rbx je 0x24a1d movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1b8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_prlock_wrlock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+68h] lea rdi, [rbp+var_48] push 1 pop rdx call qword ptr [rax+1B0h] mov rbx, rax mov rdi, r14 call rw_pr_wrlock mov r14d, eax test rbx, rbx jz short loc_24A1D mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1B8h] loc_24A1D: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_prlock_wrlock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 54))( v6, *(_QWORD *)(a1 + 104), 1LL, a2, a3); v4 = rw_pr_wrlock(a1); if ( v3 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v3, v4); return v4; }
psi_prlock_wrlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x3f0848] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x68] LEA RDI,[RBP + -0x48] PUSH 0x1 POP RDX CALL qword ptr [RAX + 0x1b0] MOV RBX,RAX MOV RDI,R14 CALL 0x00129f6d MOV R14D,EAX TEST RBX,RBX JZ 0x00124a1d MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1b8] LAB_00124a1d: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_prlock_wrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x68),1,param_2,param_3); uVar1 = rw_pr_wrlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
49,556
mysql_stmt_store_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_store_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_store_result, (parms->stmt), parms->stmt->mysql, int, r_int) }
O0
c
mysql_stmt_store_result_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x8f740 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_stmt_store_result_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_stmt_store_result mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_stmt_store_result_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL); v2[2] = mysql_stmt_store_result(*a1); result = v2; *v2 = 0; return result; }
mysql_stmt_store_result_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0018f740 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_stmt_store_result_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_store_result(*param_1); puVar1[2] = uVar2; *puVar1 = 0; return; }
49,557
minja::Parser::unexpected(minja::TemplateToken const&) const
monkey531[P]llama/common/minja.hpp
std::runtime_error unexpected(const TemplateToken & token) const { return std::runtime_error("Unexpected " + TemplateToken::typeToString(token.type) + error_location_suffix(*template_str, token.location.pos)); }
O2
cpp
minja::Parser::unexpected(minja::TemplateToken const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rdx), %esi leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x72d94 leaq 0x442a7(%rip), %rsi # 0xb6c09 leaq 0x28(%rsp), %rdi movq %r12, %rdx callq 0x58a46 movq (%r15), %rsi movq 0x20(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x57f7a leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdx callq 0x39627 leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x24e10 leaq 0x48(%rsp), %rdi callq 0x251b8 leaq 0x8(%rsp), %rdi callq 0x251b8 leaq 0x28(%rsp), %rdi callq 0x251b8 leaq 0x68(%rsp), %rdi callq 0x251b8 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x251b8 jmp 0x729ed movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x251b8 jmp 0x729fc movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x251b8 jmp 0x72a0b movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x251b8 movq %rbx, %rdi callq 0x24f60
_ZNK5minja6Parser10unexpectedERKNS_13TemplateTokenE: push r15 push r14 push r12 push rbx sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov esi, [rdx+8] lea r12, [rsp+0A8h+var_40] mov rdi, r12 call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type) lea rsi, aUnexpected_0; "Unexpected " lea rdi, [rsp+0A8h+var_80] mov rdx, r12 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov rsi, [r15] mov rdx, [r14+20h] lea rdi, [rsp+0A8h+var_A0] call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong) lea rdi, [rsp+0A8h+var_60] lea rsi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, [rsp+0A8h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_729ED mov rbx, rax loc_729ED: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_729FC mov rbx, rax loc_729FC: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_72A0B mov rbx, rax loc_72A0B: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::unexpected(minja::Parser *this, const minja::TemplateToken *a2, long long a3) { _QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF _BYTE v8[64]; // [rsp+68h] [rbp-40h] BYREF minja::TemplateToken::typeToString[abi:cxx11](v8, *(unsigned int *)(a3 + 8)); std::operator+<char>((long long)v6, (long long)"Unexpected ", (long long)v8); minja::error_location_suffix((long long)v5, *(_QWORD *)a2, *(_QWORD *)(a3 + 32)); std::operator+<char>((long long)v7, v6, v5); std::runtime_error::runtime_error(this, v7); std::string::~string(v7); std::string::~string(v5); std::string::~string(v6); std::string::~string(v8); return this; }
unexpected: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV ESI,dword ptr [RDX + 0x8] LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x00172d94 LAB_0017295b: LEA RSI,[0x1b6c09] LEA RDI,[RSP + 0x28] MOV RDX,R12 CALL 0x00158a46 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R14 + 0x20] LAB_00172976: LEA RDI,[RSP + 0x8] CALL 0x00157f7a LAB_00172980: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00139627 LAB_00172994: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00124e10 LAB_001729a1: LEA RDI,[RSP + 0x48] CALL 0x001251b8 LEA RDI,[RSP + 0x8] CALL 0x001251b8 LEA RDI,[RSP + 0x28] CALL 0x001251b8 LEA RDI,[RSP + 0x68] CALL 0x001251b8 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Parser::unexpected(minja::TemplateToken const&) const */ TemplateToken * minja::Parser::unexpected(TemplateToken *param_1) { long in_RDX; int8 *in_RSI; minja local_a0 [32]; string local_80 [32]; string local_60 [32]; TemplateToken local_40 [32]; TemplateToken::typeToString_abi_cxx11_(local_40,*(int4 *)(in_RDX + 8)); /* try { // try from 0017295b to 0017296e has its CatchHandler @ 00172a08 */ std::operator+((char *)local_80,(string *)"Unexpected "); /* try { // try from 00172976 to 0017297f has its CatchHandler @ 001729f9 */ error_location_suffix(local_a0,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20)); /* try { // try from 00172980 to 00172993 has its CatchHandler @ 001729ea */ std::operator+(local_60,local_80); /* try { // try from 00172994 to 001729a0 has its CatchHandler @ 001729db */ std::runtime_error::runtime_error((runtime_error *)param_1,local_60); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string((string *)local_a0); std::__cxx11::string::~string(local_80); std::__cxx11::string::~string((string *)local_40); return param_1; }
49,558
minja::Parser::unexpected(minja::TemplateToken const&) const
monkey531[P]llama/common/minja.hpp
std::runtime_error unexpected(const TemplateToken & token) const { return std::runtime_error("Unexpected " + TemplateToken::typeToString(token.type) + error_location_suffix(*template_str, token.location.pos)); }
O3
cpp
minja::Parser::unexpected(minja::TemplateToken const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rdx), %esi leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x9988e leaq 0x598fd(%rip), %rcx # 0xf2c19 movl $0xb, %r8d movq %r12, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1b9a0 leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x99356 movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0x9935e movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx movq %rdx, 0x30(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq (%r15), %rsi movq 0x20(%r14), %rdx leaq 0x48(%rsp), %rdi callq 0x778b0 movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movq 0x50(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r12, %rcx je 0x993a9 movq 0x38(%rsp), %rdi movq 0x48(%rsp), %rsi cmpq %rdi, %rax jbe 0x993cc leaq 0x58(%rsp), %r9 movl $0xf, %edi cmpq %r9, %rsi je 0x993c7 movq 0x58(%rsp), %rdi cmpq %rdi, %rax jbe 0x993d8 leaq 0x28(%rsp), %rdi callq 0x1b260 jmp 0x993e6 leaq 0x48(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1b9a0 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x9940a movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x99410 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1be00 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99455 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8b0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x99470 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x99487 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8b0 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x994a2 movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8b0 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x994d7 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x994d7 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x994f7 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x994f7 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x99513 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x99513 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9952e movq 0x78(%rsp), %rsi incq %rsi callq 0x1b8b0 movq %rbx, %rdi callq 0x1bf70
_ZNK5minja6Parser10unexpectedERKNS_13TemplateTokenE: push r15; int push r14; int push r12; int push rbx; int sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov esi, [rdx+8] lea r12, [rsp+0A8h+var_40] mov rdi, r12 call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type) lea rcx, aUnexpected_0; "Unexpected " mov r8d, 0Bh mov rdi, r12 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r12, [rsp+0A8h+var_70] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h; int cmp rdx, rcx jz short loc_99356 mov [rsp+0A8h+var_80], rdx mov rdx, [rcx] mov [rsp+0A8h+var_70], rdx jmp short loc_9935E loc_99356: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_9935E: mov rdx, [rax+8] mov qword ptr [rsp+0A8h+var_78], rdx; int mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rsi, [r15]; int mov rdx, [r14+20h]; int lea rdi, [rsp+0A8h+var_60]; int call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong) mov rcx, [rsp+0A8h+var_80] mov r8, qword ptr [rsp+0A8h+var_78] mov rdx, [rsp+0A8h+var_58] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r12 jz short loc_993A9 mov rdi, [rsp+0A8h+var_70] loc_993A9: mov rsi, qword ptr [rsp+0A8h+var_60] cmp rax, rdi jbe short loc_993CC lea r9, [rsp+0A8h+var_50] mov edi, 0Fh cmp rsi, r9 jz short loc_993C7 mov rdi, [rsp+0A8h+var_50] loc_993C7: cmp rax, rdi jbe short loc_993D8 loc_993CC: lea rdi, [rsp+0A8h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_993E6 loc_993D8: lea rdi, [rsp+0A8h+var_60] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_993E6: lea rdx, [rsp+0A8h+var_90] mov [rdx-10h], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_9940A mov [rsp+0A8h+var_A0], rsi mov rdx, [rcx] mov [rsp+0A8h+var_90], rdx jmp short loc_99410 loc_9940A: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_99410: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+0A8h+var_98], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rax, [rsp+0A8h+var_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_99455 mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_99455: lea rax, [rsp+0A8h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_99470 mov rsi, [rsp+0A8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_99470: mov rdi, [rsp+0A8h+var_80]; void * cmp rdi, r12 jz short loc_99487 mov rsi, [rsp+0A8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_99487: lea rax, [rsp+0A8h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_994A2 mov rsi, [rsp+0A8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_994A2: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_994D7 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_994D7 mov rbx, rax loc_994D7: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_994F7 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_994F7 mov rbx, rax loc_994F7: mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_99513 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_99513 mov rbx, rax loc_99513: lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9952E mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9952E: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::unexpected(minja::Parser *this, const minja::TemplateToken *a2, long long a3) { long long v5; // rax __int128 *v6; // rcx unsigned long long v7; // rax unsigned long long v8; // rdi unsigned long long v9; // rdi void **v10; // rax __int128 *v11; // rcx void *v13[2]; // [rsp+8h] [rbp-A0h] BYREF __int128 v14; // [rsp+18h] [rbp-90h] BYREF void *v15; // [rsp+28h] [rbp-80h] BYREF int v16[2]; // [rsp+30h] [rbp-78h] __int128 v17; // [rsp+38h] [rbp-70h] BYREF int v18[2]; // [rsp+48h] [rbp-60h] BYREF long long v19; // [rsp+50h] [rbp-58h] _QWORD v20[2]; // [rsp+58h] [rbp-50h] BYREF void *v21[2]; // [rsp+68h] [rbp-40h] BYREF long long v22; // [rsp+78h] [rbp-30h] BYREF minja::TemplateToken::typeToString[abi:cxx11](v21, *(unsigned int *)(a3 + 8)); v5 = std::string::replace(v21, 0LL, 0LL, "Unexpected ", 11LL); v15 = &v17; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v17 = *v6; } else { v15 = *(void **)v5; *(_QWORD *)&v17 = *(_QWORD *)v6; } *(_QWORD *)v16 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; minja::error_location_suffix((long long)v18, *(_QWORD *)a2, *(_QWORD *)(a3 + 32)); v7 = v19 + *(_QWORD *)v16; v8 = 15LL; if ( v15 != &v17 ) v8 = v17; if ( v7 <= v8 ) goto LABEL_10; v9 = 15LL; if ( *(_QWORD **)v18 != v20 ) v9 = v20[0]; if ( v7 <= v9 ) v10 = (void **)std::string::replace(v18, 0LL, 0LL, v15, *(_QWORD *)v16); else LABEL_10: v10 = (void **)std::string::_M_append(&v15, *(_QWORD *)v18, v19); v13[0] = &v14; v11 = (__int128 *)(v10 + 2); if ( *v10 == v10 + 2 ) { v14 = *v11; } else { v13[0] = *v10; *(_QWORD *)&v14 = *(_QWORD *)v11; } v13[1] = v10[1]; *v10 = v11; v10[1] = 0LL; *(_BYTE *)v11 = 0; std::runtime_error::runtime_error(this, v13); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); if ( *(_QWORD **)v18 != v20 ) operator delete(*(void **)v18, v20[0] + 1LL); if ( v15 != &v17 ) operator delete(v15, v17 + 1); if ( v21[0] != &v22 ) operator delete(v21[0], v22 + 1); return this; }
49,559
ggml::cpu::aarch64::tensor_traits<block_q4_0, 8l, 4l>::~tensor_traits()
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
bool work_size(int /* n_threads */, const struct ggml_tensor * op, size_t & size) override { // not realy a GGML_TYPE_Q8_0 but same size. switch (op->op) { case GGML_OP_MUL_MAT: size = ggml_row_size(GGML_TYPE_Q8_0, ggml_nelements(op->src[1])); return true; case GGML_OP_MUL_MAT_ID: size = ggml_row_size(GGML_TYPE_Q8_0, ggml_nelements(op->src[1])); size = GGML_PAD(size, sizeof(int64_t)); // + padding for next bloc. size += sizeof(int64_t) * (1+op->src[0]->ne[2]) * op->src[1]->ne[2]; return true; default: // GGML_ABORT("fatal error"); break; } return false; }
O0
cpp
ggml::cpu::aarch64::tensor_traits<block_q4_0, 8l, 4l>::~tensor_traits(): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax movl 0x50(%rax), %eax movl %eax, -0x2c(%rbp) subl $0x1a, %eax je 0x516f5 jmp 0x516e8 movl -0x2c(%rbp), %eax subl $0x1b, %eax je 0x51722 jmp 0x5179a movq -0x20(%rbp), %rax movq 0xa0(%rax), %rdi callq 0xdb10 movq %rax, %rsi movl $0x8, %edi callq 0xdf40 movq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x517a0 movq -0x20(%rbp), %rax movq 0xa0(%rax), %rdi callq 0xdb10 movq %rax, %rsi movl $0x8, %edi callq 0xdf40 movq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax movq (%rax), %rcx addq $0x8, %rcx subq $0x1, %rcx andq $-0x8, %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rax movq 0x98(%rax), %rax movq 0x20(%rax), %rcx addq $0x1, %rcx shlq $0x3, %rcx movq -0x20(%rbp), %rax movq 0xa0(%rax), %rax imulq 0x20(%rax), %rcx movq -0x28(%rbp), %rax addq (%rax), %rcx movq %rcx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x517a0 jmp 0x5179c movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN4ggml3cpu7aarch6413tensor_traitsI12block_iq4_nlLl4ELl4EE9work_sizeEiPK11ggml_tensorRm: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] mov eax, [rax+50h] mov [rbp+var_2C], eax sub eax, 1Ah jz short loc_516F5 jmp short $+2 loc_516E8: mov eax, [rbp+var_2C] sub eax, 1Bh jz short loc_51722 jmp loc_5179A loc_516F5: mov rax, [rbp+var_20] mov rdi, [rax+0A0h] call _ggml_nelements mov rsi, rax mov edi, 8 call _ggml_row_size mov rcx, rax mov rax, [rbp+var_28] mov [rax], rcx mov [rbp+var_1], 1 jmp short loc_517A0 loc_51722: mov rax, [rbp+var_20] mov rdi, [rax+0A0h] call _ggml_nelements mov rsi, rax mov edi, 8 call _ggml_row_size mov rcx, rax mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_28] mov rcx, [rax] add rcx, 8 sub rcx, 1 and rcx, 0FFFFFFFFFFFFFFF8h mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_20] mov rax, [rax+98h] mov rcx, [rax+20h] add rcx, 1 shl rcx, 3 mov rax, [rbp+var_20] mov rax, [rax+0A0h] imul rcx, [rax+20h] mov rax, [rbp+var_28] add rcx, [rax] mov [rax], rcx mov [rbp+var_1], 1 jmp short loc_517A0 loc_5179A: jmp short $+2 loc_5179C: mov [rbp+var_1], 0 loc_517A0: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char ggml::cpu::aarch64::tensor_traits<block_iq4_nl,4l,4l>::work_size( long long a1, long long a2, long long a3, unsigned long long *a4) { long long v4; // rax long long v5; // rax int v7; // [rsp+4h] [rbp-2Ch] v7 = *(_DWORD *)(a3 + 80); if ( v7 == 26 ) { v4 = ggml_nelements(*(_QWORD *)(a3 + 160)); *a4 = ggml_row_size(8LL, v4); return 1; } else if ( v7 == 27 ) { v5 = ggml_nelements(*(_QWORD *)(a3 + 160)); *a4 = ggml_row_size(8LL, v5); *a4 = (*a4 + 7) & 0xFFFFFFFFFFFFFFF8LL; *a4 += *(_QWORD *)(*(_QWORD *)(a3 + 160) + 32LL) * 8 * (*(_QWORD *)(*(_QWORD *)(a3 + 152) + 32LL) + 1LL); return 1; } else { return 0; } }
work_size: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x50] MOV dword ptr [RBP + -0x2c],EAX SUB EAX,0x1a JZ 0x001516f5 JMP 0x001516e8 LAB_001516e8: MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x1b JZ 0x00151722 JMP 0x0015179a LAB_001516f5: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0xa0] CALL 0x0010db10 MOV RSI,RAX MOV EDI,0x8 CALL 0x0010df40 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x001517a0 LAB_00151722: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0xa0] CALL 0x0010db10 MOV RSI,RAX MOV EDI,0x8 CALL 0x0010df40 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] ADD RCX,0x8 SUB RCX,0x1 AND RCX,-0x8 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x98] MOV RCX,qword ptr [RAX + 0x20] ADD RCX,0x1 SHL RCX,0x3 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xa0] IMUL RCX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x28] ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x001517a0 LAB_0015179a: JMP 0x0015179c LAB_0015179c: MOV byte ptr [RBP + -0x1],0x0 LAB_001517a0: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x30 POP RBP RET
/* ggml::cpu::aarch64::tensor_traits<block_iq4_nl, 4l, 4l>::work_size(int, ggml_tensor const*, unsigned long&) */ int1 __thiscall ggml::cpu::aarch64::tensor_traits<block_iq4_nl,4l,4l>::work_size (tensor_traits<block_iq4_nl,4l,4l> *this,int param_1,ggml_tensor *param_2,ulong *param_3) { int8 uVar1; ulong uVar2; int1 local_9; if (*(int *)(param_2 + 0x50) == 0x1a) { uVar1 = ggml_nelements(*(int8 *)(param_2 + 0xa0)); uVar2 = ggml_row_size(8,uVar1); *param_3 = uVar2; local_9 = 1; } else if (*(int *)(param_2 + 0x50) == 0x1b) { uVar1 = ggml_nelements(*(int8 *)(param_2 + 0xa0)); uVar2 = ggml_row_size(8,uVar1); *param_3 = uVar2; *param_3 = *param_3 + 7 & 0xfffffffffffffff8; *param_3 = (*(long *)(*(long *)(param_2 + 0x98) + 0x20) + 1) * 8 * *(long *)(*(long *)(param_2 + 0xa0) + 0x20) + *param_3; local_9 = 1; } else { local_9 = 0; } return local_9; }
49,560
ggml::cpu::aarch64::tensor_traits<block_q4_0, 8l, 4l>::~tensor_traits()
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
bool work_size(int /* n_threads */, const struct ggml_tensor * op, size_t & size) override { // not realy a GGML_TYPE_Q8_0 but same size. switch (op->op) { case GGML_OP_MUL_MAT: size = ggml_row_size(GGML_TYPE_Q8_0, ggml_nelements(op->src[1])); return true; case GGML_OP_MUL_MAT_ID: size = ggml_row_size(GGML_TYPE_Q8_0, ggml_nelements(op->src[1])); size = GGML_PAD(size, sizeof(int64_t)); // + padding for next bloc. size += sizeof(int64_t) * (1+op->src[0]->ne[2]) * op->src[1]->ne[2]; return true; default: // GGML_ABORT("fatal error"); break; } return false; }
O1
cpp
ggml::cpu::aarch64::tensor_traits<block_q4_0, 8l, 4l>::~tensor_traits(): pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movl 0x50(%rdx), %eax cmpl $0x1b, %eax je 0x2dfb6 cmpl $0x1a, %eax jne 0x2e006 movq 0xa0(%r14), %rdi callq 0x8650 movl $0x8, %edi movq %rax, %rsi callq 0x8840 jmp 0x2dfff movq 0xa0(%r14), %rdi callq 0x8650 movl $0x8, %edi movq %rax, %rsi callq 0x8840 movq %rax, %rcx addq $0x7, %rcx andq $-0x8, %rcx movq %rcx, (%rbx) movq 0x98(%r14), %rax movq 0xa0(%r14), %rdx movq 0x20(%rax), %rax leaq 0x8(,%rax,8), %rax imulq 0x20(%rdx), %rax addq %rcx, %rax movq %rax, (%rbx) movb $0x1, %al jmp 0x2e008 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN4ggml3cpu7aarch6413tensor_traitsI12block_iq4_nlLl4ELl4EE9work_sizeEiPK11ggml_tensorRm: push r14 push rbx push rax mov rbx, rcx mov r14, rdx mov eax, [rdx+50h] cmp eax, 1Bh jz short loc_2DFB6 cmp eax, 1Ah jnz short loc_2E006 mov rdi, [r14+0A0h] call _ggml_nelements mov edi, 8 mov rsi, rax call _ggml_row_size jmp short loc_2DFFF loc_2DFB6: mov rdi, [r14+0A0h] call _ggml_nelements mov edi, 8 mov rsi, rax call _ggml_row_size mov rcx, rax add rcx, 7 and rcx, 0FFFFFFFFFFFFFFF8h mov [rbx], rcx mov rax, [r14+98h] mov rdx, [r14+0A0h] mov rax, [rax+20h] lea rax, ds:8[rax*8] imul rax, [rdx+20h] add rax, rcx loc_2DFFF: mov [rbx], rax mov al, 1 jmp short loc_2E008 loc_2E006: xor eax, eax loc_2E008: add rsp, 8 pop rbx pop r14 retn
char ggml::cpu::aarch64::tensor_traits<block_iq4_nl,4l,4l>::work_size( long long a1, long long a2, long long a3, _QWORD *a4) { int v6; // eax long long v7; // rax long long v8; // rax long long v9; // rax unsigned long long v10; // rcx v6 = *(_DWORD *)(a3 + 80); if ( v6 == 27 ) { v9 = ggml_nelements(*(_QWORD *)(a3 + 160)); v10 = (ggml_row_size(8LL, v9) + 7) & 0xFFFFFFFFFFFFFFF8LL; *a4 = v10; v8 = v10 + *(_QWORD *)(*(_QWORD *)(a3 + 160) + 32LL) * (8LL * *(_QWORD *)(*(_QWORD *)(a3 + 152) + 32LL) + 8); goto LABEL_5; } if ( v6 == 26 ) { v7 = ggml_nelements(*(_QWORD *)(a3 + 160)); v8 = ggml_row_size(8LL, v7); LABEL_5: *a4 = v8; return 1; } return 0; }
work_size: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV EAX,dword ptr [RDX + 0x50] CMP EAX,0x1b JZ 0x0012dfb6 CMP EAX,0x1a JNZ 0x0012e006 MOV RDI,qword ptr [R14 + 0xa0] CALL 0x00108650 MOV EDI,0x8 MOV RSI,RAX CALL 0x00108840 JMP 0x0012dfff LAB_0012dfb6: MOV RDI,qword ptr [R14 + 0xa0] CALL 0x00108650 MOV EDI,0x8 MOV RSI,RAX CALL 0x00108840 MOV RCX,RAX ADD RCX,0x7 AND RCX,-0x8 MOV qword ptr [RBX],RCX MOV RAX,qword ptr [R14 + 0x98] MOV RDX,qword ptr [R14 + 0xa0] MOV RAX,qword ptr [RAX + 0x20] LEA RAX,[0x8 + RAX*0x8] IMUL RAX,qword ptr [RDX + 0x20] ADD RAX,RCX LAB_0012dfff: MOV qword ptr [RBX],RAX MOV AL,0x1 JMP 0x0012e008 LAB_0012e006: XOR EAX,EAX LAB_0012e008: ADD RSP,0x8 POP RBX POP R14 RET
/* ggml::cpu::aarch64::tensor_traits<block_iq4_nl, 4l, 4l>::work_size(int, ggml_tensor const*, unsigned long&) */ int8 __thiscall ggml::cpu::aarch64::tensor_traits<block_iq4_nl,4l,4l>::work_size (tensor_traits<block_iq4_nl,4l,4l> *this,int param_1,ggml_tensor *param_2,ulong *param_3) { int8 uVar1; ulong uVar2; long lVar3; int4 in_register_00000034; if (*(int *)(param_2 + 0x50) == 0x1b) { uVar1 = ggml_nelements(*(int8 *)(param_2 + 0xa0),CONCAT44(in_register_00000034,param_1)); lVar3 = ggml_row_size(8,uVar1); uVar2 = lVar3 + 7U & 0xfffffffffffffff8; *param_3 = uVar2; uVar2 = (*(long *)(*(long *)(param_2 + 0x98) + 0x20) * 8 + 8) * *(long *)(*(long *)(param_2 + 0xa0) + 0x20) + uVar2; } else { if (*(int *)(param_2 + 0x50) != 0x1a) { return 0; } uVar1 = ggml_nelements(*(int8 *)(param_2 + 0xa0),CONCAT44(in_register_00000034,param_1)); uVar2 = ggml_row_size(8,uVar1); } *param_3 = uVar2; return 1; }
49,561
ggml::cpu::aarch64::tensor_traits<block_q4_0, 8l, 4l>::~tensor_traits()
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
bool work_size(int /* n_threads */, const struct ggml_tensor * op, size_t & size) override { // not realy a GGML_TYPE_Q8_0 but same size. switch (op->op) { case GGML_OP_MUL_MAT: size = ggml_row_size(GGML_TYPE_Q8_0, ggml_nelements(op->src[1])); return true; case GGML_OP_MUL_MAT_ID: size = ggml_row_size(GGML_TYPE_Q8_0, ggml_nelements(op->src[1])); size = GGML_PAD(size, sizeof(int64_t)); // + padding for next bloc. size += sizeof(int64_t) * (1+op->src[0]->ne[2]) * op->src[1]->ne[2]; return true; default: // GGML_ABORT("fatal error"); break; } return false; }
O2
cpp
ggml::cpu::aarch64::tensor_traits<block_q4_0, 8l, 4l>::~tensor_traits(): pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movl 0x50(%rdx), %eax cmpl $0x1b, %eax je 0x2bd7c cmpl $0x1a, %eax jne 0x2bdca movq 0xa0(%r14), %rdi callq 0x8730 pushq $0x8 popq %rdi movq %rax, %rsi callq 0x8960 jmp 0x2bdc3 movq 0xa0(%r14), %rdi callq 0x8730 pushq $0x8 popq %rdi movq %rax, %rsi callq 0x8960 movq %rax, %rcx addq $0x7, %rcx andq $-0x8, %rcx movq %rcx, (%rbx) movq 0x98(%r14), %rax movq 0xa0(%r14), %rdx movq 0x20(%rax), %rax leaq 0x8(,%rax,8), %rax imulq 0x20(%rdx), %rax addq %rcx, %rax movq %rax, (%rbx) movb $0x1, %al jmp 0x2bdcc xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN4ggml3cpu7aarch6413tensor_traitsI12block_iq4_nlLl4ELl4EE9work_sizeEiPK11ggml_tensorRm: push r14 push rbx push rax mov rbx, rcx mov r14, rdx mov eax, [rdx+50h] cmp eax, 1Bh jz short loc_2BD7C cmp eax, 1Ah jnz short loc_2BDCA mov rdi, [r14+0A0h] call _ggml_nelements push 8 pop rdi mov rsi, rax call _ggml_row_size jmp short loc_2BDC3 loc_2BD7C: mov rdi, [r14+0A0h] call _ggml_nelements push 8 pop rdi mov rsi, rax call _ggml_row_size mov rcx, rax add rcx, 7 and rcx, 0FFFFFFFFFFFFFFF8h mov [rbx], rcx mov rax, [r14+98h] mov rdx, [r14+0A0h] mov rax, [rax+20h] lea rax, ds:8[rax*8] imul rax, [rdx+20h] add rax, rcx loc_2BDC3: mov [rbx], rax mov al, 1 jmp short loc_2BDCC loc_2BDCA: xor eax, eax loc_2BDCC: add rsp, 8 pop rbx pop r14 retn
char ggml::cpu::aarch64::tensor_traits<block_iq4_nl,4l,4l>::work_size( long long a1, long long a2, long long a3, _QWORD *a4) { int v6; // eax long long v7; // rax long long v8; // rax long long v9; // rax unsigned long long v10; // rcx v6 = *(_DWORD *)(a3 + 80); if ( v6 == 27 ) { v9 = ggml_nelements(*(_QWORD *)(a3 + 160)); v10 = (ggml_row_size(8LL, v9) + 7) & 0xFFFFFFFFFFFFFFF8LL; *a4 = v10; v8 = v10 + *(_QWORD *)(*(_QWORD *)(a3 + 160) + 32LL) * (8LL * *(_QWORD *)(*(_QWORD *)(a3 + 152) + 32LL) + 8); goto LABEL_5; } if ( v6 == 26 ) { v7 = ggml_nelements(*(_QWORD *)(a3 + 160)); v8 = ggml_row_size(8LL, v7); LABEL_5: *a4 = v8; return 1; } return 0; }
work_size: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV EAX,dword ptr [RDX + 0x50] CMP EAX,0x1b JZ 0x0012bd7c CMP EAX,0x1a JNZ 0x0012bdca MOV RDI,qword ptr [R14 + 0xa0] CALL 0x00108730 PUSH 0x8 POP RDI MOV RSI,RAX CALL 0x00108960 JMP 0x0012bdc3 LAB_0012bd7c: MOV RDI,qword ptr [R14 + 0xa0] CALL 0x00108730 PUSH 0x8 POP RDI MOV RSI,RAX CALL 0x00108960 MOV RCX,RAX ADD RCX,0x7 AND RCX,-0x8 MOV qword ptr [RBX],RCX MOV RAX,qword ptr [R14 + 0x98] MOV RDX,qword ptr [R14 + 0xa0] MOV RAX,qword ptr [RAX + 0x20] LEA RAX,[0x8 + RAX*0x8] IMUL RAX,qword ptr [RDX + 0x20] ADD RAX,RCX LAB_0012bdc3: MOV qword ptr [RBX],RAX MOV AL,0x1 JMP 0x0012bdcc LAB_0012bdca: XOR EAX,EAX LAB_0012bdcc: ADD RSP,0x8 POP RBX POP R14 RET
/* ggml::cpu::aarch64::tensor_traits<block_iq4_nl, 4l, 4l>::work_size(int, ggml_tensor const*, unsigned long&) */ int8 __thiscall ggml::cpu::aarch64::tensor_traits<block_iq4_nl,4l,4l>::work_size (tensor_traits<block_iq4_nl,4l,4l> *this,int param_1,ggml_tensor *param_2,ulong *param_3) { int8 uVar1; ulong uVar2; long lVar3; int4 in_register_00000034; if (*(int *)(param_2 + 0x50) == 0x1b) { uVar1 = ggml_nelements(*(int8 *)(param_2 + 0xa0),CONCAT44(in_register_00000034,param_1)); lVar3 = ggml_row_size(8,uVar1); uVar2 = lVar3 + 7U & 0xfffffffffffffff8; *param_3 = uVar2; uVar2 = (*(long *)(*(long *)(param_2 + 0x98) + 0x20) * 8 + 8) * *(long *)(*(long *)(param_2 + 0xa0) + 0x20) + uVar2; } else { if (*(int *)(param_2 + 0x50) != 0x1a) { return 0; } uVar1 = ggml_nelements(*(int8 *)(param_2 + 0xa0),CONCAT44(in_register_00000034,param_1)); uVar2 = ggml_row_size(8,uVar1); } *param_3 = uVar2; return 1; }
49,562
ggml::cpu::aarch64::tensor_traits<block_q4_0, 8l, 4l>::~tensor_traits()
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
bool work_size(int /* n_threads */, const struct ggml_tensor * op, size_t & size) override { // not realy a GGML_TYPE_Q8_0 but same size. switch (op->op) { case GGML_OP_MUL_MAT: size = ggml_row_size(GGML_TYPE_Q8_0, ggml_nelements(op->src[1])); return true; case GGML_OP_MUL_MAT_ID: size = ggml_row_size(GGML_TYPE_Q8_0, ggml_nelements(op->src[1])); size = GGML_PAD(size, sizeof(int64_t)); // + padding for next bloc. size += sizeof(int64_t) * (1+op->src[0]->ne[2]) * op->src[1]->ne[2]; return true; default: // GGML_ABORT("fatal error"); break; } return false; }
O3
cpp
ggml::cpu::aarch64::tensor_traits<block_q4_0, 8l, 4l>::~tensor_traits(): pushq %rbx movq %rdi, %rbx callq 0x8c50 movl $0x8, %esi movq %rbx, %rdi popq %rbx jmp 0x8640 nop
_ZN4ggml3cpu7aarch6413tensor_traitsI12block_iq4_nlLl4ELl4EED0Ev: push rbx mov rbx, rdi call j__ZN4ggml3cpu13tensor_traitsD2Ev; ggml::cpu::tensor_traits::~tensor_traits() mov esi, 8; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void ggml::cpu::aarch64::tensor_traits<block_iq4_nl,4l,4l>::~tensor_traits(void *a1) { ggml::cpu::tensor_traits::~tensor_traits(a1); operator delete(a1, 8uLL); }
~tensor_traits: PUSH RBX MOV RBX,RDI CALL 0x00108c50 MOV ESI,0x8 MOV RDI,RBX POP RBX JMP 0x00108640
/* ggml::cpu::aarch64::tensor_traits<block_iq4_nl, 4l, 4l>::~tensor_traits() */ void __thiscall ggml::cpu::aarch64::tensor_traits<block_iq4_nl,4l,4l>::~tensor_traits (tensor_traits<block_iq4_nl,4l,4l> *this) { tensor_traits::~tensor_traits((tensor_traits *)this); operator_delete(this,8); return; }
49,563
sort_locks
eloqsql/mysys/thr_lock.c
static void sort_locks(THR_LOCK_DATA **data,uint count) { THR_LOCK_DATA **pos,**end,**prev,*tmp; /* Sort locks with insertion sort (fast because almost always few locks) */ for (pos=data+1,end=data+count; pos < end ; pos++) { tmp= *pos; if (LOCK_CMP(tmp,pos[-1])) { prev=pos; do { prev[0]=prev[-1]; } while (--prev != data && LOCK_CMP(tmp,prev[-1])); prev[0]=tmp; } } }
O0
c
sort_locks: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xf9d69 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi movq -0x18(%rbp), %rax movq -0x8(%rax), %rsi callq 0xfb5b0 cmpl $0x0, %eax je 0xf9d56 movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x8(%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx addq $-0x8, %rcx movq %rcx, -0x28(%rbp) xorl %eax, %eax cmpq -0x8(%rbp), %rcx movb %al, -0x31(%rbp) je 0xf9d44 movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rax movq -0x8(%rax), %rsi callq 0xfb5b0 cmpl $0x0, %eax setne %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al testb $0x1, %al jne 0xf9d04 movq -0x30(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xf9d58 movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xf9ccd addq $0x40, %rsp popq %rbp retq nop
sort_locks: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] add rax, 8 mov [rbp+var_18], rax mov rax, [rbp+var_8] mov ecx, [rbp+var_C] shl rcx, 3 add rax, rcx mov [rbp+var_20], rax loc_F9CCD: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb loc_F9D69 mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_30], rax mov rdi, [rbp+var_30] mov rax, [rbp+var_18] mov rsi, [rax-8] call LOCK_CMP cmp eax, 0 jz short loc_F9D56 mov rax, [rbp+var_18] mov [rbp+var_28], rax loc_F9D04: mov rax, [rbp+var_28] mov rcx, [rax-8] mov rax, [rbp+var_28] mov [rax], rcx mov rcx, [rbp+var_28] add rcx, 0FFFFFFFFFFFFFFF8h mov [rbp+var_28], rcx xor eax, eax cmp rcx, [rbp+var_8] mov [rbp+var_31], al jz short loc_F9D44 mov rdi, [rbp+var_30] mov rax, [rbp+var_28] mov rsi, [rax-8] call LOCK_CMP cmp eax, 0 setnz al mov [rbp+var_31], al loc_F9D44: mov al, [rbp+var_31] test al, 1 jnz short loc_F9D04 mov rcx, [rbp+var_30] mov rax, [rbp+var_28] mov [rax], rcx loc_F9D56: jmp short $+2 loc_F9D58: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp loc_F9CCD loc_F9D69: add rsp, 40h pop rbp retn
_QWORD * sort_locks(_QWORD *a1, int a2) { _QWORD *result; // rax bool v3; // [rsp+Fh] [rbp-31h] long long v4; // [rsp+10h] [rbp-30h] _QWORD *v5; // [rsp+18h] [rbp-28h] _QWORD *i; // [rsp+28h] [rbp-18h] for ( i = a1 + 1; ; ++i ) { result = i; if ( i >= &a1[a2] ) break; v4 = *i; if ( (unsigned int)LOCK_CMP(*i, *(i - 1)) ) { v5 = i; do { *v5 = *(v5 - 1); --v5; v3 = 0; if ( v5 != a1 ) v3 = (unsigned int)LOCK_CMP(v4, *(v5 - 1)) != 0; } while ( v3 ); *v5 = v4; } } return result; }
sort_locks: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001f9ccd: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001f9d69 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + -0x8] CALL 0x001fb5b0 CMP EAX,0x0 JZ 0x001f9d56 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX LAB_001f9d04: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,-0x8 MOV qword ptr [RBP + -0x28],RCX XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x8] MOV byte ptr [RBP + -0x31],AL JZ 0x001f9d44 MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + -0x8] CALL 0x001fb5b0 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x31],AL LAB_001f9d44: MOV AL,byte ptr [RBP + -0x31] TEST AL,0x1 JNZ 0x001f9d04 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX LAB_001f9d56: JMP 0x001f9d58 LAB_001f9d58: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001f9ccd LAB_001f9d69: ADD RSP,0x40 POP RBP RET
void sort_locks(int8 *param_1,uint param_2) { int8 uVar1; int iVar2; int8 *puVar3; bool bVar4; int8 *local_30; int8 *local_20; for (local_20 = param_1 + 1; local_20 < param_1 + param_2; local_20 = local_20 + 1) { uVar1 = *local_20; iVar2 = LOCK_CMP(uVar1,local_20[-1]); if (iVar2 != 0) { local_30 = local_20; do { *local_30 = local_30[-1]; puVar3 = local_30 + -1; bVar4 = false; if (puVar3 != param_1) { iVar2 = LOCK_CMP(uVar1,local_30[-2]); bVar4 = iVar2 != 0; } local_30 = puVar3; } while (bVar4); *puVar3 = uVar1; } } return; }
49,564
my_strnncoll_simple
eloqsql/strings/ctype-simple.c
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len = ( slen > tlen ) ? tlen : slen; const uchar *map= cs->sort_order; if (t_is_prefix && slen > tlen) slen=tlen; while (len--) { if (map[*s++] != map[*t++]) return ((int) map[s[-1]] - (int) map[t[-1]]); } /* We can't use (slen - tlen) here as the result may be outside of the precision of a signed int */ return slen > tlen ? 1 : slen < tlen ? -1 : 0 ; }
O0
c
my_strnncoll_simple: pushq %rbp movq %rsp, %rbp movb %r9b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movb %al, -0x31(%rbp) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x125a02 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x125a0a movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x48(%rbp) movsbl -0x31(%rbp), %eax cmpl $0x0, %eax je 0x125a39 movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x125a39 movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x125a3b movq -0x40(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x40(%rbp) cmpq $0x0, %rax je 0x125ab1 movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rbp) movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rdx movq %rdx, %rsi addq $0x1, %rsi movq %rsi, -0x28(%rbp) movzbl (%rdx), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x125aaf movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rdx movzbl -0x1(%rdx), %edx movzbl (%rcx,%rdx), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x125ae3 jmp 0x125a3b movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x125ac5 movl $0x1, %eax movl %eax, -0x54(%rbp) jmp 0x125add movq -0x20(%rbp), %rdx movq -0x30(%rbp), %rsi xorl %eax, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rsi, %rdx cmovbl %ecx, %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_strnncoll_simple: push rbp mov rbp, rsp mov al, r9b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_31], al mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_125A02 mov rax, [rbp+var_30] mov [rbp+var_50], rax jmp short loc_125A0A loc_125A02: mov rax, [rbp+var_20] mov [rbp+var_50], rax loc_125A0A: mov rax, [rbp+var_50] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+58h] mov [rbp+var_48], rax movsx eax, [rbp+var_31] cmp eax, 0 jz short loc_125A39 mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_125A39 mov rax, [rbp+var_30] mov [rbp+var_20], rax loc_125A39: jmp short $+2 loc_125A3B: mov rax, [rbp+var_40] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_40], rcx cmp rax, 0 jz short loc_125AB1 mov rax, [rbp+var_48] mov rcx, [rbp+var_18] mov rdx, rcx add rdx, 1 mov [rbp+var_18], rdx movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_48] mov rdx, [rbp+var_28] mov rsi, rdx add rsi, 1 mov [rbp+var_28], rsi movzx edx, byte ptr [rdx] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_125AAF mov rax, [rbp+var_48] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_48] mov rdx, [rbp+var_28] movzx edx, byte ptr [rdx-1] movzx ecx, byte ptr [rcx+rdx] sub eax, ecx mov [rbp+var_4], eax jmp short loc_125AE3 loc_125AAF: jmp short loc_125A3B loc_125AB1: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jbe short loc_125AC5 mov eax, 1 mov [rbp+var_54], eax jmp short loc_125ADD loc_125AC5: mov rdx, [rbp+var_20] mov rsi, [rbp+var_30] xor eax, eax mov ecx, 0FFFFFFFFh cmp rdx, rsi cmovb eax, ecx mov [rbp+var_54], eax loc_125ADD: mov eax, [rbp+var_54] mov [rbp+var_4], eax loc_125AE3: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncoll_simple( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, char a6) { unsigned __int8 *v7; // rcx unsigned __int8 *v8; // rdx unsigned int v9; // eax unsigned long long v12; // [rsp+4h] [rbp-50h] long long v13; // [rsp+Ch] [rbp-48h] unsigned long long v14; // [rsp+14h] [rbp-40h] unsigned long long v16; // [rsp+34h] [rbp-20h] v16 = a3; if ( a3 <= a5 ) v12 = a3; else v12 = a5; v14 = v12; v13 = *(_QWORD *)(a1 + 88); if ( a6 && a3 > a5 ) v16 = a5; while ( v14-- ) { v7 = a2++; v8 = a4++; if ( *(unsigned __int8 *)(v13 + *v7) != *(unsigned __int8 *)(v13 + *v8) ) return (unsigned int)(*(unsigned __int8 *)(v13 + *(a2 - 1)) - *(unsigned __int8 *)(v13 + *(a4 - 1))); } if ( v16 <= a5 ) { v9 = 0; if ( v16 < a5 ) v9 = -1; return v9; } else { return 1; } }
49,565
my_strnncoll_simple
eloqsql/strings/ctype-simple.c
int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len = ( slen > tlen ) ? tlen : slen; const uchar *map= cs->sort_order; if (t_is_prefix && slen > tlen) slen=tlen; while (len--) { if (map[*s++] != map[*t++]) return ((int) map[s[-1]] - (int) map[t[-1]]); } /* We can't use (slen - tlen) here as the result may be outside of the precision of a signed int */ return slen > tlen ? 1 : slen < tlen ? -1 : 0 ; }
O3
c
my_strnncoll_simple: pushq %rbp movq %rsp, %rbp cmpq %r8, %rdx movq %r8, %r10 cmovbq %rdx, %r10 movq 0x58(%rdi), %rdi testb %r9b, %r9b cmovneq %r10, %rdx xorl %r9d, %r9d cmpq %r9, %r10 je 0xbd916 movzbl (%rsi,%r9), %eax movzbl (%rdi,%rax), %eax movzbl (%rcx,%r9), %r11d movzbl (%rdi,%r11), %r11d incq %r9 cmpb %r11b, %al je 0xbd8f1 subl %r11d, %eax jmp 0xbd928 xorl %ecx, %ecx cmpq %r8, %rdx sbbl %ecx, %ecx cmpq %r8, %rdx movl $0x1, %eax cmovbel %ecx, %eax popq %rbp retq
my_strnncoll_simple: push rbp mov rbp, rsp cmp rdx, r8 mov r10, r8 cmovb r10, rdx mov rdi, [rdi+58h] test r9b, r9b cmovnz rdx, r10 xor r9d, r9d loc_BD8F1: cmp r10, r9 jz short loc_BD916 movzx eax, byte ptr [rsi+r9] movzx eax, byte ptr [rdi+rax] movzx r11d, byte ptr [rcx+r9] movzx r11d, byte ptr [rdi+r11] inc r9 cmp al, r11b jz short loc_BD8F1 sub eax, r11d jmp short loc_BD928 loc_BD916: xor ecx, ecx cmp rdx, r8 sbb ecx, ecx cmp rdx, r8 mov eax, 1 cmovbe eax, ecx loc_BD928: pop rbp retn
long long my_strnncoll_simple( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, char a6) { unsigned long long v6; // r10 long long v7; // rdi long long v8; // r9 int v9; // eax int v10; // r11d long long result; // rax v6 = a5; if ( a3 < a5 ) v6 = a3; v7 = *(_QWORD *)(a1 + 88); if ( a6 ) a3 = v6; v8 = 0LL; while ( v6 != v8 ) { v9 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a2 + v8)); v10 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a4 + v8++)); if ( (_BYTE)v9 != (_BYTE)v10 ) return (unsigned int)(v9 - v10); } result = 1LL; if ( a3 <= a5 ) return (unsigned int)-(a3 < a5); return result; }
my_strnncoll_simple: PUSH RBP MOV RBP,RSP CMP RDX,R8 MOV R10,R8 CMOVC R10,RDX MOV RDI,qword ptr [RDI + 0x58] TEST R9B,R9B CMOVNZ RDX,R10 XOR R9D,R9D LAB_001bd8f1: CMP R10,R9 JZ 0x001bd916 MOVZX EAX,byte ptr [RSI + R9*0x1] MOVZX EAX,byte ptr [RDI + RAX*0x1] MOVZX R11D,byte ptr [RCX + R9*0x1] MOVZX R11D,byte ptr [RDI + R11*0x1] INC R9 CMP AL,R11B JZ 0x001bd8f1 SUB EAX,R11D JMP 0x001bd928 LAB_001bd916: XOR ECX,ECX CMP RDX,R8 SBB ECX,ECX CMP RDX,R8 MOV EAX,0x1 CMOVBE EAX,ECX LAB_001bd928: POP RBP RET
int my_strnncoll_simple(long param_1,long param_2,ulong param_3,long param_4,ulong param_5, char param_6) { byte bVar1; byte bVar2; ulong uVar3; ulong uVar4; uVar4 = param_5; if (param_3 < param_5) { uVar4 = param_3; } if (param_6 != '\0') { param_3 = uVar4; } uVar3 = 0; do { if (uVar4 == uVar3) { if (param_5 < param_3) { return 1; } return -(uint)(param_3 < param_5); } bVar1 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_2 + uVar3)); bVar2 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_4 + uVar3)); uVar3 = uVar3 + 1; } while (bVar1 == bVar2); return (uint)bVar1 - (uint)bVar2; }
49,566
main
shubhamoy[P]dir2txt/src/main.cpp
int main(int argc, char* argv[]) { std::cout << R"( _ _ ____ _ _ _ _ _ _ __| (_)_ _|___ \| |___ _| |_ | |__ _ _ ___| |__ _ _| |__ | |__ __ _ _ __ ___ ___ _ _ / _ | | __|__) | __\ \/ / __| | _ \| | | | / __| _ \| | | | _ \| _ \ / _ | _ _ \ / _ \| | | | | (_| | | | / __/| |_ > <| |_ | |_) | |_| | \__ \ | | | |_| | |_) | | | | (_| | | | | | | (_) | |_| | \____|_|_| |_____|\__/_/\_\\__| |____/ \__/ / |___/_| |_|\____|____/|_| |_|\__,_|_| |_| |_|\___/ \__/ / |___/ |___/ )" << "\n\n"; Config config(argc, argv); auto filter = std::make_shared<FileFilter>( config.shouldIncludeDotfiles(), config.getIgnoredDirs(), config.getRootPath() ); std::string outputFilename = Utils::generateOutputFilename(config.getRootPath()); std::shared_ptr<IWriter> writer; if (config.outputAsJson()) { outputFilename = outputFilename.substr(0, outputFilename.find_last_of('.')) + ".json"; writer = std::make_shared<FileWriterJson>(outputFilename, config.shouldStripComments()); } else { writer = std::make_shared<FileWriterText>(outputFilename, config.shouldStripComments()); } DirectoryWalker walker( config.getRootPath(), filter, writer ); walker.walk(); std::cout << "✅ Done! Output written to: " << outputFilename << "\n"; return 0; }
O2
cpp
main: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x138, %rsp # imm = 0x138 movq %rsi, %rbx movl %edi, %ebp movq 0x47563(%rip), %rdi # 0x4ff98 leaq 0x265c8(%rip), %rsi # 0x2f004 callq 0x8390 leaq 0x284ff(%rip), %rsi # 0x30f47 movq %rax, %rdi callq 0x8390 leaq 0xd8(%rsp), %r14 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx callq 0x9ca8 movq %r14, %rdi callq 0xab7a movb %al, 0x88(%rsp) leaq 0xd8(%rsp), %rdi callq 0xab74 movq %rax, %rbx leaq 0xd8(%rsp), %rdi callq 0xab70 leaq 0x38(%rsp), %rdi leaq 0x88(%rsp), %rsi movq %rbx, %rdx movq %rax, %rcx callq 0x8d21 leaq 0xd8(%rsp), %rdi callq 0xab70 leaq 0x18(%rsp), %rdi movq %rax, %rsi callq 0x2d3eb xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) leaq 0xd8(%rsp), %rdi callq 0xab82 testb %al, %al je 0x8b7c leaq 0x18(%rsp), %rbx pushq $0x2e popq %rsi pushq $-0x1 popq %rdx movq %rbx, %rdi callq 0x96c8 leaq 0x68(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx movq %rax, %rcx callq 0x8d64 leaq 0x26784(%rip), %rdx # 0x2f28f leaq 0x88(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x8d45 leaq 0x18(%rsp), %rdi leaq 0x88(%rsp), %rbx movq %rbx, %rsi callq 0x8da2 movq %rbx, %rdi callq 0x8e46 leaq 0x68(%rsp), %rdi callq 0x8e46 leaq 0xd8(%rsp), %rdi callq 0xab7e leaq 0x68(%rsp), %rdx movb %al, (%rdx) leaq 0x88(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x8e56 movq %rsp, %rdi leaq 0x88(%rsp), %rsi callq 0x9a9c jmp 0x8bb2 leaq 0xd8(%rsp), %rdi callq 0xab7e leaq 0x68(%rsp), %rdx movb %al, (%rdx) leaq 0x88(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x8e77 movq %rsp, %rdi leaq 0x88(%rsp), %rsi callq 0x9c64 leaq 0x90(%rsp), %rdi callq 0x8ee0 leaq 0xd8(%rsp), %rdi callq 0xab70 movq %rax, %rbx leaq 0x58(%rsp), %r14 leaq 0x38(%rsp), %rsi movq %r14, %rdi callq 0x9c92 leaq 0x48(%rsp), %r15 movq %rsp, %rsi movq %r15, %rdi callq 0x8f66 leaq 0x88(%rsp), %rdi movq %rbx, %rsi movq %r14, %rdx movq %r15, %rcx callq 0x221cc leaq 0x50(%rsp), %rdi callq 0x8ee0 leaq 0x60(%rsp), %rdi callq 0x8ee0 leaq 0x88(%rsp), %rdi callq 0x22220 movq 0x47369(%rip), %rdi # 0x4ff98 leaq 0x2665f(%rip), %rsi # 0x2f295 callq 0x8390 leaq 0x18(%rsp), %rsi movq %rax, %rdi callq 0x8370 leaq 0x282f9(%rip), %rsi # 0x30f48 movq %rax, %rdi callq 0x8390 leaq 0x88(%rsp), %rdi callq 0x8e98 leaq 0x8(%rsp), %rdi callq 0x8ee0 leaq 0x18(%rsp), %rdi callq 0x8e46 leaq 0x40(%rsp), %rdi callq 0x8ee0 leaq 0xd8(%rsp), %rdi callq 0x8eca xorl %eax, %eax addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x8e46 jmp 0x8ce9 jmp 0x8ccf movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x8ee0 leaq 0x60(%rsp), %rdi callq 0x8ee0 jmp 0x8ce9 jmp 0x8ccf jmp 0x8ccf jmp 0x8ccf movq %rax, %rbx jmp 0x8ce9 movq %rax, %rbx jmp 0x8cfd movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x8e98 leaq 0x8(%rsp), %rdi callq 0x8ee0 leaq 0x18(%rsp), %rdi callq 0x8e46 leaq 0x40(%rsp), %rdi callq 0x8ee0 jmp 0x8d0c movq %rax, %rbx leaq 0xd8(%rsp), %rdi callq 0x8eca movq %rbx, %rdi callq 0x85e0
main: push rbp push r15 push r14 push rbx sub rsp, 138h mov rbx, rsi mov ebp, edi mov rdi, cs:_ZSt4cout_ptr lea rsi, asc_2F004; "\n _ _ ____ _ _ _"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, asc_30F29+1Eh; "\n\n" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea r14, [rsp+158h+var_80] mov rdi, r14; this mov esi, ebp; int mov rdx, rbx; char ** call _ZN6ConfigC2EiPPc; Config::Config(int,char **) mov rdi, r14; this call _ZNK6Config21shouldIncludeDotfilesEv; Config::shouldIncludeDotfiles(void) mov [rsp+158h+var_D0], al lea rdi, [rsp+158h+var_80] call _ZNK6Config14getIgnoredDirsB5cxx11Ev; Config::getIgnoredDirs(void) mov rbx, rax lea rdi, [rsp+158h+var_80] call _ZNK6Config11getRootPathB5cxx11Ev; Config::getRootPath(void) lea rdi, [rsp+158h+var_120] lea rsi, [rsp+158h+var_D0] mov rdx, rbx mov rcx, rax call _ZSt11make_sharedI10FileFilterJbRKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS7_ESaIS7_EERKNSt10filesystem7__cxx114pathEEESt10shared_ptrIT_EDpOT0_; std::make_shared<FileFilter,bool,std::set<std::string> const&,std::filesystem::__cxx11::path const&>(bool,std::set<std::string> const&,std::filesystem::__cxx11::path const&) lea rdi, [rsp+158h+var_80] call _ZNK6Config11getRootPathB5cxx11Ev; Config::getRootPath(void) lea rdi, [rsp+158h+var_140]; this mov rsi, rax; std::filesystem::__cxx11::path * call _ZN5Utils22generateOutputFilenameERKNSt10filesystem7__cxx114pathE; Utils::generateOutputFilename(std::filesystem::__cxx11::path const&) xorps xmm0, xmm0 movaps [rsp+158h+var_158], xmm0 lea rdi, [rsp+158h+var_80]; this call _ZNK6Config12outputAsJsonEv; Config::outputAsJson(void) test al, al jz loc_8B7C lea rbx, [rsp+158h+var_140] push 2Eh ; '.' pop rsi push 0FFFFFFFFFFFFFFFFh pop rdx mov rdi, rbx call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) lea rdi, [rsp+158h+var_F0] mov rsi, rbx xor edx, edx mov rcx, rax call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdx, aJson; ".json" lea rdi, [rsp+158h+var_D0] lea rsi, [rsp+158h+var_F0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+158h+var_140] lea rbx, [rsp+158h+var_D0] mov rsi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+158h+var_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+158h+var_80]; this call _ZNK6Config19shouldStripCommentsEv; Config::shouldStripComments(void) lea rdx, [rsp+158h+var_F0] mov [rdx], al lea rdi, [rsp+158h+var_D0] lea rsi, [rsp+158h+var_140] call _ZSt11make_sharedI14FileWriterJsonJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEESt10shared_ptrIT_EDpOT0_; std::make_shared<FileWriterJson,std::string &,bool>(std::string &,bool &&) mov rdi, rsp lea rsi, [rsp+158h+var_D0] call _ZNSt12__shared_ptrI7IWriterLN9__gnu_cxx12_Lock_policyE2EEaSI14FileWriterJsonEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS0_EE5valueERS3_E4typeEOS_IS7_LS2_2EE jmp short loc_8BB2 loc_8B7C: lea rdi, [rsp+158h+var_80]; this call _ZNK6Config19shouldStripCommentsEv; Config::shouldStripComments(void) lea rdx, [rsp+158h+var_F0] mov [rdx], al lea rdi, [rsp+158h+var_D0] lea rsi, [rsp+158h+var_140] call _ZSt11make_sharedI14FileWriterTextJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEESt10shared_ptrIT_EDpOT0_; std::make_shared<FileWriterText,std::string &,bool>(std::string &,bool &&) mov rdi, rsp lea rsi, [rsp+158h+var_D0] call _ZNSt12__shared_ptrI7IWriterLN9__gnu_cxx12_Lock_policyE2EEaSI14FileWriterTextEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS0_EE5valueERS3_E4typeEOS_IS7_LS2_2EE loc_8BB2: lea rdi, [rsp+158h+var_C8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+158h+var_80] call _ZNK6Config11getRootPathB5cxx11Ev; Config::getRootPath(void) mov rbx, rax lea r14, [rsp+158h+var_100] lea rsi, [rsp+158h+var_120] mov rdi, r14 call _ZNSt12__shared_ptrI11IFileFilterLN9__gnu_cxx12_Lock_policyE2EEC2I10FileFiltervEERKS_IT_LS2_2EE; std::__shared_ptr<IFileFilter,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<FileFilter,void>(std::__shared_ptr const&<FileFilter,(__gnu_cxx::_Lock_policy)2>) lea r15, [rsp+158h+var_110] mov rsi, rsp mov rdi, r15 call _ZNSt12__shared_ptrI7IWriterLN9__gnu_cxx12_Lock_policyE2EEC2ERKS3_; std::__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2> const&) lea rdi, [rsp+158h+var_D0] mov rsi, rbx mov rdx, r14 mov rcx, r15 call _ZN15DirectoryWalkerC2ERKNSt10filesystem7__cxx114pathESt10shared_ptrI11IFileFilterES5_I7IWriterE; DirectoryWalker::DirectoryWalker(std::filesystem::__cxx11::path const&,std::shared_ptr<IFileFilter>,std::shared_ptr<IWriter>) lea rdi, [rsp+158h+var_108] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+158h+var_F8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+158h+var_D0]; this call _ZN15DirectoryWalker4walkEv; DirectoryWalker::walk(void) mov rdi, cs:_ZSt4cout_ptr lea rsi, unk_2F295 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [rsp+158h+var_140] mov rdi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rsi, asc_30F29+1Fh; "\n" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rdi, [rsp+158h+var_D0]; this call _ZN15DirectoryWalkerD2Ev; DirectoryWalker::~DirectoryWalker() lea rdi, [rsp+158h+var_158+8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+158h+var_140]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+158h+var_118] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+158h+var_80]; this call _ZN6ConfigD2Ev; Config::~Config() xor eax, eax add rsp, 138h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8CE9 jmp short loc_8CCF mov rbx, rax lea rdi, [rsp+arg_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+arg_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_8CE9 jmp short loc_8CCF jmp short loc_8CCF jmp short $+2 loc_8CCF: mov rbx, rax jmp short loc_8CE9 mov rbx, rax jmp short loc_8CFD mov rbx, rax lea rdi, [rsp+arg_80]; this call _ZN15DirectoryWalkerD2Ev; DirectoryWalker::~DirectoryWalker() loc_8CE9: lea rdi, [rsp+arg_0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_8CFD: lea rdi, [rsp+arg_38] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_8D0C mov rbx, rax loc_8D0C: lea rdi, [rsp+arg_D0]; this call _ZN6ConfigD2Ev; Config::~Config() mov rdi, rbx call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { long long v3; // rax long long v4; // rdx long long v5; // rbx long long v6; // rax const std::filesystem::__cxx11::path *v7; // rax long long v8; // rax long long v9; // rbx long long v10; // rdx long long v11; // rax long long v12; // rax long long v13; // rdx __int128 v15; // [rsp+0h] [rbp-158h] BYREF _BYTE v16[32]; // [rsp+18h] [rbp-140h] BYREF _BYTE v17[8]; // [rsp+38h] [rbp-120h] BYREF _BYTE v18[8]; // [rsp+40h] [rbp-118h] BYREF _BYTE v19[8]; // [rsp+48h] [rbp-110h] BYREF _BYTE v20[8]; // [rsp+50h] [rbp-108h] BYREF _BYTE v21[8]; // [rsp+58h] [rbp-100h] BYREF _BYTE v22[8]; // [rsp+60h] [rbp-F8h] BYREF _BYTE v23[32]; // [rsp+68h] [rbp-F0h] BYREF _BYTE v24[8]; // [rsp+88h] [rbp-D0h] BYREF _BYTE v25[72]; // [rsp+90h] [rbp-C8h] BYREF _BYTE v26[128]; // [rsp+D8h] [rbp-80h] BYREF v3 = std::operator<<<std::char_traits<char>>( &std::cout, "\n" " _ _ ____ _ _ _ _ _ _ \n" " __| (_)_ _|___ \\| |___ _| |_ | |__ _ _ ___| |__ _ _| |__ | |__ __ _ _ __ ___ ___ _ _ \n" " / _ | | __|__) | __\\ \\/ / __| | _ \\| | | | / __| _ \\| | | | _ \\| _ \\ / _ | _ _ \\ / _ \\| | " "| |\n" " | (_| | | | / __/| |_ > <| |_ | |_) | |_| | \\__ \\ | | | |_| | |_) | | | | (_| | | | | | | (_) | |_| |\n" " \\____|_|_| |_____|\\__/_/\\_\\\\__| |____/ \\__/ / |___/_| |_|\\____|____/|_| |_|\\__,_|_| |_| |_|\\___/ \\" "__/ /\n" " |___/ |___/ \n" " ", envp); std::operator<<<std::char_traits<char>>(v3, "\n\n", v4); Config::Config((Config *)v26, argc, (char **)argv); v24[0] = Config::shouldIncludeDotfiles((Config *)v26); v5 = Config::getIgnoredDirs[abi:cxx11](v26); v6 = Config::getRootPath[abi:cxx11](v26); std::make_shared<FileFilter,bool,std::set<std::string> const&,std::filesystem::__cxx11::path const&>(v17, v24, v5, v6); v7 = (const std::filesystem::__cxx11::path *)Config::getRootPath[abi:cxx11](v26); Utils::generateOutputFilename((Utils *)v16, v7); v15 = 0LL; if ( (unsigned __int8)Config::outputAsJson((Config *)v26) ) { v8 = std::string::rfind(v16, 46LL, -1LL); std::string::substr(v23, v16, 0LL, v8); std::operator+<char>(v24, v23, ".json"); std::string::operator=(v16, v24); std::string::~string(v24); std::string::~string(v23); v23[0] = Config::shouldStripComments((Config *)v26); std::make_shared<FileWriterJson,std::string &,bool>(v24, v16); std::__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2>::operator=<FileWriterJson>(&v15, v24); } else { v23[0] = Config::shouldStripComments((Config *)v26); std::make_shared<FileWriterText,std::string &,bool>(v24, v16); std::__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2>::operator=<FileWriterText>(&v15, v24); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v25); v9 = Config::getRootPath[abi:cxx11](v26); std::__shared_ptr<IFileFilter,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<FileFilter,void>(v21, v17); std::__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(v19, &v15); DirectoryWalker::DirectoryWalker(v24, v9, v21, v19); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v20); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v22); DirectoryWalker::walk((DirectoryWalker *)v24); v11 = std::operator<<<std::char_traits<char>>(&std::cout, &unk_2F295, v10); v12 = std::operator<<<char>(v11, v16); std::operator<<<std::char_traits<char>>(v12, "\n", v13); DirectoryWalker::~DirectoryWalker((DirectoryWalker *)v24); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((char *)&v15 + 8); std::string::~string(v16); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v18); Config::~Config((Config *)v26); return 0; }
main: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x138 MOV RBX,RSI MOV EBP,EDI MOV RDI,qword ptr [0x0014ff98] LEA RSI,[0x12f004] CALL 0x00108390 LEA RSI,[0x130f47] MOV RDI,RAX CALL 0x00108390 LEA R14,[RSP + 0xd8] MOV RDI,R14 MOV ESI,EBP MOV RDX,RBX CALL 0x00109ca8 LAB_00108a65: MOV RDI,R14 CALL 0x0010ab7a MOV byte ptr [RSP + 0x88],AL LEA RDI,[RSP + 0xd8] CALL 0x0010ab74 MOV RBX,RAX LEA RDI,[RSP + 0xd8] CALL 0x0010ab70 LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x88] MOV RDX,RBX MOV RCX,RAX CALL 0x00108d21 LAB_00108aa9: LEA RDI,[RSP + 0xd8] CALL 0x0010ab70 LEA RDI,[RSP + 0x18] MOV RSI,RAX CALL 0x0012d3eb XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 LAB_00108aca: LEA RDI,[RSP + 0xd8] CALL 0x0010ab82 TEST AL,AL JZ 0x00108b7c LEA RBX,[RSP + 0x18] PUSH 0x2e POP RSI PUSH -0x1 POP RDX MOV RDI,RBX CALL 0x001096c8 LAB_00108af2: LEA RDI,[RSP + 0x68] MOV RSI,RBX XOR EDX,EDX MOV RCX,RAX CALL 0x00108d64 LAB_00108b04: LEA RDX,[0x12f28f] LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x68] CALL 0x00108d45 LEA RDI,[RSP + 0x18] LEA RBX,[RSP + 0x88] MOV RSI,RBX CALL 0x00108da2 MOV RDI,RBX CALL 0x00108e46 LEA RDI,[RSP + 0x68] CALL 0x00108e46 LAB_00108b44: LEA RDI,[RSP + 0xd8] CALL 0x0010ab7e LEA RDX,[RSP + 0x68] MOV byte ptr [RDX],AL LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x18] CALL 0x00108e56 MOV RDI,RSP LEA RSI,[RSP + 0x88] CALL 0x00109a9c JMP 0x00108bb2 LAB_00108b7c: LEA RDI,[RSP + 0xd8] CALL 0x0010ab7e LEA RDX,[RSP + 0x68] MOV byte ptr [RDX],AL LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x18] CALL 0x00108e77 MOV RDI,RSP LEA RSI,[RSP + 0x88] CALL 0x00109c64 LAB_00108bb2: LEA RDI,[RSP + 0x90] CALL 0x00108ee0 LAB_00108bbf: LEA RDI,[RSP + 0xd8] CALL 0x0010ab70 MOV RBX,RAX LEA R14,[RSP + 0x58] LEA RSI,[RSP + 0x38] MOV RDI,R14 CALL 0x00109c92 LEA R15,[RSP + 0x48] MOV RSI,RSP MOV RDI,R15 CALL 0x00108f66 LAB_00108bf1: LEA RDI,[RSP + 0x88] MOV RSI,RBX MOV RDX,R14 MOV RCX,R15 CALL 0x001221cc LEA RDI,[RSP + 0x50] CALL 0x00108ee0 LEA RDI,[RSP + 0x60] CALL 0x00108ee0 LAB_00108c1b: LEA RDI,[RSP + 0x88] CALL 0x00122220 MOV RDI,qword ptr [0x0014ff98] LEA RSI,[0x12f295] CALL 0x00108390 LEA RSI,[RSP + 0x18] MOV RDI,RAX CALL 0x00108370 LEA RSI,[0x130f48] MOV RDI,RAX CALL 0x00108390 LAB_00108c57: LEA RDI,[RSP + 0x88] CALL 0x00108e98 LEA RDI,[RSP + 0x8] CALL 0x00108ee0 LEA RDI,[RSP + 0x18] CALL 0x00108e46 LEA RDI,[RSP + 0x40] CALL 0x00108ee0 LEA RDI,[RSP + 0xd8] CALL 0x00108eca XOR EAX,EAX ADD RSP,0x138 POP RBX POP R14 POP R15 POP RBP RET
int8 main(int param_1,char **param_2) { char cVar1; ostream *poVar2; path *ppVar3; int8 uVar4; int8 local_158; int8 auStack_150 [2]; Utils local_140 [32]; __shared_ptr local_120 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_118 [8]; __shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2> local_110 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_108 [8]; __shared_ptr<IFileFilter,(__gnu_cxx::_Lock_policy)2> local_100 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_f8 [8]; string local_f0 [32]; set local_d0 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_c8 [72]; Config local_80 [96]; poVar2 = std::operator<<((ostream *)PTR_cout_0014ff98, "\n _ _ ____ _ _ _ _ _ _ \n __| (_)_ _|___ \\| |___ _| |_ | |__ _ _ ___| |__ _ _| |__ | |__ __ _ _ __ ___ ___ _ _ \n / _ | | __|__) | __\\ \\/ / __| | _ \\| | | | / __| _ \\| | | | _ \\| _ \\ / _ | _ _ \\ / _ \\| | | |\n | (_| | | | / __/| |_ > <| |_ | |_) | |_| | \\__ \\ | | | |_| | |_) | | | | (_| | | | | | | (_) | |_| |\n \\____|_|_| |_____|\\__/_/\\_\\\\__| |____/ \\__/ / |___/_| |_|\\____|____/|_| |_|\\__,_|_| |_| |_|\\___/ \\__/ /\n |___/ |___/ \n " ); std::operator<<(poVar2,"\n\n"); Config::Config(local_80,param_1,param_2); /* try { // try from 00108a65 to 00108aa8 has its CatchHandler @ 00108d09 */ local_d0[0] = (set)Config::shouldIncludeDotfiles(local_80); ppVar3 = (path *)Config::getIgnoredDirs_abi_cxx11_(local_80); Config::getRootPath_abi_cxx11_(local_80); std:: make_shared<FileFilter,bool,std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>const&,std::filesystem::__cxx11::path_const&> ((bool *)local_120,local_d0,ppVar3); /* try { // try from 00108aa9 to 00108ac2 has its CatchHandler @ 00108cd4 */ ppVar3 = (path *)Config::getRootPath_abi_cxx11_(local_80); Utils::generateOutputFilename(local_140,ppVar3); local_158 = 0; auStack_150[0] = 0; /* try { // try from 00108aca to 00108ad6 has its CatchHandler @ 00108ccf */ cVar1 = Config::outputAsJson(local_80); if (cVar1 == '\0') { /* try { // try from 00108b7c to 00108ba1 has its CatchHandler @ 00108ccd */ local_f0[0] = (string)Config::shouldStripComments(local_80); std::make_shared<FileWriterText,std::__cxx11::string&,bool> ((string *)local_d0,(bool *)local_140); std::__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2> *)&local_158, (__shared_ptr *)local_d0); } else { std::__cxx11::string::rfind((string *)local_140,'.',0xffffffffffffffff); /* try { // try from 00108af2 to 00108b03 has its CatchHandler @ 00108cae */ std::__cxx11::string::substr((ulong)local_f0,(ulong)local_140); /* try { // try from 00108b04 to 00108b1c has its CatchHandler @ 00108c9f */ std::operator+((string *)local_d0,(char *)local_f0); std::__cxx11::string::operator=((string *)local_140,(string *)local_d0); std::__cxx11::string::~string((string *)local_d0); std::__cxx11::string::~string(local_f0); /* try { // try from 00108b44 to 00108b69 has its CatchHandler @ 00108ccb */ local_f0[0] = (string)Config::shouldStripComments(local_80); std::make_shared<FileWriterJson,std::__cxx11::string&,bool> ((string *)local_d0,(bool *)local_140); std::__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2> *)&local_158, (__shared_ptr *)local_d0); } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_c8); /* try { // try from 00108bbf to 00108bcb has its CatchHandler @ 00108cc9 */ uVar4 = Config::getRootPath_abi_cxx11_(local_80); std::__shared_ptr<IFileFilter,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<FileFilter,void> (local_100,local_120); std::__shared_ptr<IWriter,(__gnu_cxx::_Lock_policy)2>::__shared_ptr (local_110,(__shared_ptr *)&local_158); /* try { // try from 00108bf1 to 00108c06 has its CatchHandler @ 00108cb0 */ DirectoryWalker::DirectoryWalker((DirectoryWalker *)local_d0,uVar4,local_100,local_110); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_108); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_f8); /* try { // try from 00108c1b to 00108c56 has its CatchHandler @ 00108cd9 */ DirectoryWalker::walk((DirectoryWalker *)local_d0); poVar2 = std::operator<<((ostream *)PTR_cout_0014ff98,&DAT_0012f295); poVar2 = std::operator<<(poVar2,(string *)local_140); std::operator<<(poVar2,"\n"); DirectoryWalker::~DirectoryWalker((DirectoryWalker *)local_d0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_150); std::__cxx11::string::~string((string *)local_140); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_118); Config::~Config(local_80); return 0; }
49,567
main
shubhamoy[P]dir2txt/src/main.cpp
int main(int argc, char* argv[]) { std::cout << R"( _ _ ____ _ _ _ _ _ _ __| (_)_ _|___ \| |___ _| |_ | |__ _ _ ___| |__ _ _| |__ | |__ __ _ _ __ ___ ___ _ _ / _ | | __|__) | __\ \/ / __| | _ \| | | | / __| _ \| | | | _ \| _ \ / _ | _ _ \ / _ \| | | | | (_| | | | / __/| |_ > <| |_ | |_) | |_| | \__ \ | | | |_| | |_) | | | | (_| | | | | | | (_) | |_| | \____|_|_| |_____|\__/_/\_\\__| |____/ \__/ / |___/_| |_|\____|____/|_| |_|\__,_|_| |_| |_|\___/ \__/ / |___/ |___/ )" << "\n\n"; Config config(argc, argv); auto filter = std::make_shared<FileFilter>( config.shouldIncludeDotfiles(), config.getIgnoredDirs(), config.getRootPath() ); std::string outputFilename = Utils::generateOutputFilename(config.getRootPath()); std::shared_ptr<IWriter> writer; if (config.outputAsJson()) { outputFilename = outputFilename.substr(0, outputFilename.find_last_of('.')) + ".json"; writer = std::make_shared<FileWriterJson>(outputFilename, config.shouldStripComments()); } else { writer = std::make_shared<FileWriterText>(outputFilename, config.shouldStripComments()); } DirectoryWalker walker( config.getRootPath(), filter, writer ); walker.walk(); std::cout << "✅ Done! Output written to: " << outputFilename << "\n"; return 0; }
O3
cpp
main: pushq %rbp pushq %r14 pushq %rbx subq $0x140, %rsp # imm = 0x140 movq %rsi, %rbx movl %edi, %ebp movq 0x44b7d(%rip), %r14 # 0x4dfa0 leaq 0x2bbf6(%rip), %rsi # 0x35020 movl $0x28a, %edx # imm = 0x28A movq %r14, %rdi callq 0x8400 leaq 0x2daff(%rip), %rsi # 0x36f3d movl $0x2, %edx movq %r14, %rdi callq 0x8400 leaq 0xe0(%rsp), %r14 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx callq 0xa2fc movq %r14, %rdi callq 0xb95e movb %al, 0x10(%rsp) leaq 0xe0(%rsp), %rdi callq 0xb958 movq %rax, %rbx leaq 0xe0(%rsp), %rdi callq 0xb954 leaq 0x38(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x30(%rsp), %rsi leaq 0x90(%rsp), %rdx leaq 0x10(%rsp), %rcx movq %rbx, %r8 movq %rax, %r9 callq 0x9b7a leaq 0xe0(%rsp), %rdi callq 0xb954 leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x32451 leaq 0xe0(%rsp), %rdi callq 0xb966 testb %al, %al jne 0x96c2 leaq 0xe0(%rsp), %rdi callq 0xb962 leaq 0xf(%rsp), %r8 movb %al, (%r8) leaq 0x98(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x90(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x10(%rsp), %rcx callq 0xa21a movdqa 0x90(%rsp), %xmm0 movdqa %xmm0, 0x50(%rsp) leaq 0xe0(%rsp), %rdi callq 0xb954 movq 0x30(%rsp), %rdx movq 0x38(%rsp), %rcx movq %rdx, 0x40(%rsp) movq %rcx, 0x48(%rsp) testq %rcx, %rcx je 0x9568 movq 0x44a3e(%rip), %rdx # 0x4df98 cmpb $0x0, (%rdx) je 0x9564 incl 0x8(%rcx) jmp 0x9568 lock incl 0x8(%rcx) movdqa 0x50(%rsp), %xmm0 movdqa %xmm0, 0x60(%rsp) pshufd $0xee, %xmm0, %xmm0 # xmm0 = xmm0[2,3,2,3] movq %xmm0, %rbx testq %rbx, %rbx je 0x9598 movq 0x44a0e(%rip), %rcx # 0x4df98 cmpb $0x0, (%rcx) je 0x9594 incl 0x8(%rbx) jmp 0x9598 lock incl 0x8(%rbx) leaq 0x90(%rsp), %rdi leaq 0x40(%rsp), %rdx leaq 0x60(%rsp), %rcx movq %rax, %rsi callq 0x26720 movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x95c1 callq 0x9930 movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x95d0 callq 0x9930 leaq 0x90(%rsp), %rdi callq 0x26770 movq 0x449bc(%rip), %rdi # 0x4dfa0 leaq 0x2bcc6(%rip), %rsi # 0x352b1 movl $0x1d, %edx callq 0x8400 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x4499a(%rip), %rdi # 0x4dfa0 callq 0x8400 leaq 0x2d92c(%rip), %rsi # 0x36f3e movl $0x1, %edx movq %rax, %rdi callq 0x8400 leaq 0x4443a(%rip), %rax # 0x4da60 addq $0x10, %rax movq %rax, 0x90(%rsp) movq 0xd8(%rsp), %rdi testq %rdi, %rdi je 0x9644 callq 0x9930 movq 0xc8(%rsp), %rdi testq %rdi, %rdi je 0x9656 callq 0x9930 leaq 0x98(%rsp), %rdi callq 0x99aa testq %rbx, %rbx je 0x9670 movq %rbx, %rdi callq 0x9930 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x968b movq 0x20(%rsp), %rsi incq %rsi callq 0x8380 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x969a callq 0x9930 leaq 0x108(%rsp), %rdi callq 0x99e2 leaq 0xe0(%rsp), %rdi callq 0x99aa xorl %eax, %eax addq $0x140, %rsp # imm = 0x140 popq %rbx popq %r14 popq %rbp retq movq 0x18(%rsp), %rax testq %rax, %rax jne 0x96d5 movq $-0x1, %rcx jmp 0x96ed movq 0x10(%rsp), %rdx movq %rax, %rcx subq $0x1, %rcx jb 0x96cc cmpb $0x2e, -0x1(%rdx,%rax) movq %rcx, %rax jne 0x96dd leaq 0x70(%rsp), %rdi leaq 0x10(%rsp), %rsi xorl %edx, %edx callq 0x98c4 leaq 0x2bba6(%rip), %rsi # 0x352ab leaq 0x70(%rsp), %rdi callq 0x9f6e leaq 0xa0(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x9735 movdqu (%rcx), %xmm0 movdqu %xmm0, (%r14) jmp 0x9748 movq %rdx, 0x90(%rsp) movq (%rcx), %rdx movq %rdx, 0xa0(%rsp) movq 0x8(%rax), %rdx leaq 0x90(%rsp), %rbx movq %rdx, 0x8(%rbx) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x10(%rsp), %rdi movq %rbx, %rsi callq 0x86c0 movq (%rbx), %rdi cmpq %r14, %rdi je 0x978c movq 0xa0(%rsp), %rsi incq %rsi callq 0x8380 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x97ad movq 0x80(%rsp), %rsi incq %rsi callq 0x8380 leaq 0xe0(%rsp), %rdi callq 0xb962 leaq 0xf(%rsp), %r8 movb %al, (%r8) leaq 0x98(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x90(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x10(%rsp), %rcx callq 0xa13a jmp 0x951e jmp 0x9842 movq %rax, %rbx leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9872 movq 0x80(%rsp), %rsi incq %rsi callq 0x8380 jmp 0x9872 jmp 0x9842 movq %rax, %rbx movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x982a callq 0x9930 movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x985c callq 0x9930 jmp 0x985c movq %rax, %rbx jmp 0x985c jmp 0x9842 movq %rax, %rbx jmp 0x9872 movq %rax, %rbx jmp 0x988d movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0x98f4 pshufd $0xee, 0x50(%rsp), %xmm0 # xmm0 = mem[2,3,2,3] movq %xmm0, %rdi testq %rdi, %rdi je 0x9872 callq 0x9930 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x988d movq 0x20(%rsp), %rsi incq %rsi callq 0x8380 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x98a1 callq 0x9930 jmp 0x98a1 movq %rax, %rbx leaq 0x108(%rsp), %rdi callq 0x99e2 leaq 0xe0(%rsp), %rdi callq 0x99aa movq %rbx, %rdi callq 0x85d0 nop
main: push rbp push r14 push rbx sub rsp, 140h mov rbx, rsi mov ebp, edi mov r14, cs:_ZSt4cout_ptr lea rsi, asc_35020; "\n _ _ ____ _ _ _"... mov edx, 28Ah mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, asc_36F1F+1Eh; "\n\n" mov edx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea r14, [rsp+158h+var_78] mov rdi, r14; this mov esi, ebp; int mov rdx, rbx; char ** call _ZN6ConfigC2EiPPc; Config::Config(int,char **) mov rdi, r14; this call _ZNK6Config21shouldIncludeDotfilesEv; Config::shouldIncludeDotfiles(void) mov byte ptr [rsp+158h+var_148], al lea rdi, [rsp+158h+var_78] call _ZNK6Config14getIgnoredDirsB5cxx11Ev; Config::getIgnoredDirs(void) mov rbx, rax lea rdi, [rsp+158h+var_78] call _ZNK6Config11getRootPathB5cxx11Ev; Config::getRootPath(void) lea rdi, [rsp+158h+var_120] mov qword ptr [rdi-8], 0 lea rsi, [rsp+158h+var_128] lea rdx, [rsp+158h+var_C8] lea rcx, [rsp+158h+var_148] mov r8, rbx mov r9, rax call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I10FileFilterSaIS4_EJbRKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessISC_ESaISC_EERKNSt10filesystem7__cxx114pathEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<FileFilter,std::allocator<FileFilter>,bool,std::set<std::string> const&,std::filesystem::__cxx11::path const&>(FileFilter *&,std::_Sp_alloc_shared_tag<std::allocator<FileFilter>>,bool,std::set<std::string> const&,std::filesystem::__cxx11::path const&) lea rdi, [rsp+158h+var_78] call _ZNK6Config11getRootPathB5cxx11Ev; Config::getRootPath(void) lea rdi, [rsp+158h+var_148]; this mov rsi, rax; std::filesystem::__cxx11::path * call _ZN5Utils22generateOutputFilenameERKNSt10filesystem7__cxx114pathE; Utils::generateOutputFilename(std::filesystem::__cxx11::path const&) lea rdi, [rsp+158h+var_78]; this call _ZNK6Config12outputAsJsonEv; Config::outputAsJson(void) test al, al jnz loc_96C2 lea rdi, [rsp+158h+var_78]; this call _ZNK6Config19shouldStripCommentsEv; Config::shouldStripComments(void) lea r8, [rsp+158h+var_149] mov [r8], al lea rdi, [rsp+158h+var_C8+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+158h+var_C8] lea rdx, [rsp+158h+var_E8] lea rcx, [rsp+158h+var_148] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I14FileWriterTextSaIS4_EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<FileWriterText,std::allocator<FileWriterText>,std::string &,bool>(FileWriterText *&,std::_Sp_alloc_shared_tag<std::allocator<FileWriterText>>,std::string &,bool &&) loc_951E: movdqa xmm0, [rsp+158h+var_C8] movdqa [rsp+158h+var_108], xmm0 lea rdi, [rsp+158h+var_78] call _ZNK6Config11getRootPathB5cxx11Ev; Config::getRootPath(void) mov rdx, [rsp+158h+var_128] mov rcx, [rsp+158h+var_120] mov [rsp+158h+var_118], rdx mov [rsp+158h+var_110], rcx test rcx, rcx jz short loc_9568 mov rdx, cs:__libc_single_threaded_ptr cmp byte ptr [rdx], 0 jz short loc_9564 inc dword ptr [rcx+8] jmp short loc_9568 loc_9564: lock inc dword ptr [rcx+8] loc_9568: movdqa xmm0, [rsp+158h+var_108] movdqa [rsp+158h+var_F8], xmm0 pshufd xmm0, xmm0, 0EEh movq rbx, xmm0 test rbx, rbx jz short loc_9598 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_9594 inc dword ptr [rbx+8] jmp short loc_9598 loc_9594: lock inc dword ptr [rbx+8] loc_9598: lea rdi, [rsp+158h+var_C8] lea rdx, [rsp+158h+var_118] lea rcx, [rsp+158h+var_F8] mov rsi, rax call _ZN15DirectoryWalkerC2ERKNSt10filesystem7__cxx114pathESt10shared_ptrI11IFileFilterES5_I7IWriterE; DirectoryWalker::DirectoryWalker(std::filesystem::__cxx11::path const&,std::shared_ptr<IFileFilter>,std::shared_ptr<IWriter>) mov rdi, qword ptr [rsp+158h+var_F8+8] test rdi, rdi jz short loc_95C1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_95C1: mov rdi, [rsp+158h+var_110] test rdi, rdi jz short loc_95D0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_95D0: lea rdi, [rsp+158h+var_C8]; this call _ZN15DirectoryWalker4walkEv; DirectoryWalker::walk(void) mov rdi, cs:_ZSt4cout_ptr lea rsi, unk_352B1 mov edx, 1Dh call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rsp+158h+var_148] mov rdx, [rsp+158h+var_140] mov rdi, cs:_ZSt4cout_ptr call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, asc_36F1F+1Fh; "\n" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, _ZTV15DirectoryWalker; `vtable for'DirectoryWalker add rax, 10h mov qword ptr [rsp+158h+var_C8], rax mov rdi, [rsp+158h+var_80] test rdi, rdi jz short loc_9644 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9644: mov rdi, [rsp+158h+var_90] test rdi, rdi jz short loc_9656 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9656: lea rdi, [rsp+158h+var_C8+8]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() test rbx, rbx jz short loc_9670 mov rdi, rbx call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9670: lea rax, [rsp+158h+var_138] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_968B mov rsi, [rsp+158h+var_138] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_968B: mov rdi, [rsp+158h+var_120] test rdi, rdi jz short loc_969A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_969A: lea rdi, [rsp+158h+var_50] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree() lea rdi, [rsp+158h+var_78]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() xor eax, eax add rsp, 140h pop rbx pop r14 pop rbp retn loc_96C2: mov rax, [rsp+158h+var_140] test rax, rax jnz short loc_96D5 loc_96CC: mov rcx, 0FFFFFFFFFFFFFFFFh jmp short loc_96ED loc_96D5: mov rdx, [rsp+158h+var_148] mov rcx, rax loc_96DD: sub rcx, 1 jb short loc_96CC cmp byte ptr [rdx+rax-1], 2Eh ; '.' mov rax, rcx jnz short loc_96DD loc_96ED: lea rdi, [rsp+158h+var_E8] lea rsi, [rsp+158h+var_148] xor edx, edx call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, aJson; ".json" lea rdi, [rsp+158h+var_E8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r14, [rsp+158h+var_B8] mov [r14-10h], r14 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_9735 movdqu xmm0, xmmword ptr [rcx] movdqu xmmword ptr [r14], xmm0 jmp short loc_9748 loc_9735: mov qword ptr [rsp+158h+var_C8], rdx mov rdx, [rcx] mov [rsp+158h+var_B8], rdx loc_9748: mov rdx, [rax+8] lea rbx, [rsp+158h+var_C8] mov [rbx+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+158h+var_148] mov rsi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbx]; void * cmp rdi, r14 jz short loc_978C mov rsi, [rsp+158h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_978C: lea rax, [rsp+158h+var_D8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_97AD mov rsi, [rsp+158h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_97AD: lea rdi, [rsp+158h+var_78]; this call _ZNK6Config19shouldStripCommentsEv; Config::shouldStripComments(void) lea r8, [rsp+158h+var_149] mov [r8], al lea rdi, [rsp+158h+var_C8+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+158h+var_C8] lea rdx, [rsp+158h+var_E8] lea rcx, [rsp+158h+var_148] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2I14FileWriterJsonSaIS4_EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<FileWriterJson,std::allocator<FileWriterJson>,std::string &,bool>(FileWriterJson *&,std::_Sp_alloc_shared_tag<std::allocator<FileWriterJson>>,std::string &,bool &&) jmp loc_951E jmp short loc_9842 mov rbx, rax lea rax, [rsp+arg_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9872 mov rsi, [rsp+arg_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9872 jmp short loc_9842 mov rbx, rax mov rdi, [rsp+arg_60] test rdi, rdi jz short loc_982A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_982A: mov rdi, [rsp+arg_40] test rdi, rdi jz short loc_985C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_985C mov rbx, rax jmp short loc_985C jmp short $+2 loc_9842: mov rbx, rax jmp short loc_9872 mov rbx, rax jmp short loc_988D mov rbx, rax lea rdi, [rsp+arg_88]; this call _ZN15DirectoryWalkerD2Ev; DirectoryWalker::~DirectoryWalker() loc_985C: pshufd xmm0, [rsp+arg_48], 0EEh movq rdi, xmm0 test rdi, rdi jz short loc_9872 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9872: lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_988D mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_988D: mov rdi, [rsp+arg_30] test rdi, rdi jz short loc_98A1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_98A1 mov rbx, rax loc_98A1: lea rdi, [rsp+arg_100] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree() lea rdi, [rsp+arg_D8]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() mov rdi, rbx call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { long long v3; // rbx long long v4; // rax const std::filesystem::__cxx11::path *v5; // rax long long v6; // rax unsigned long long v7; // xmm0_8 long long v8; // rax long long v10; // rax long long v11; // rcx bool v13; // zf long long v14; // rax const __m128i *v15; // rcx char *v16; // [rsp+10h] [rbp-148h] BYREF long long v17; // [rsp+18h] [rbp-140h] long long v18; // [rsp+20h] [rbp-138h] BYREF long long v19; // [rsp+30h] [rbp-128h] BYREF long long v20; // [rsp+38h] [rbp-120h] BYREF long long v21; // [rsp+40h] [rbp-118h] BYREF long long v22; // [rsp+48h] [rbp-110h] __m128i v23; // [rsp+50h] [rbp-108h] BYREF __m128i v24; // [rsp+60h] [rbp-F8h] BYREF void *v25[2]; // [rsp+70h] [rbp-E8h] BYREF long long v26; // [rsp+80h] [rbp-D8h] BYREF __m128i v27; // [rsp+90h] [rbp-C8h] BYREF __m128i v28[2]; // [rsp+A0h] [rbp-B8h] BYREF long long v29; // [rsp+C8h] [rbp-90h] long long v30; // [rsp+D8h] [rbp-80h] _BYTE v31[40]; // [rsp+E0h] [rbp-78h] BYREF _BYTE v32[80]; // [rsp+108h] [rbp-50h] BYREF std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "\n" " _ _ ____ _ _ _ _ _ _ \n" " __| (_)_ _|___ \\| |___ _| |_ | |__ _ _ ___| |__ _ _| |__ | |__ __ _ _ __ ___ ___ _ _ \n" " / _ | | __|__) | __\\ \\/ / __| | _ \\| | | | / __| _ \\| | | | _ \\| _ \\ / _ | _ _ \\ / _ \\| | | |\n" " | (_| | | | / __/| |_ > <| |_ | |_) | |_| | \\__ \\ | | | |_| | |_) | | | | (_| | | | | | | (_) | |_| |\n" " \\____|_|_| |_____|\\__/_/\\_\\\\__| |____/ \\__/ / |___/_| |_|\\____|____/|_| |_|\\__,_|_| |_| |_|\\___/ \\__/ /" "\n" " |___/ |___/ \n" " ", 650LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "\n\n", 2LL); Config::Config((Config *)v31, argc, (char **)argv); LOBYTE(v16) = Config::shouldIncludeDotfiles((Config *)v31); v3 = Config::getIgnoredDirs[abi:cxx11](v31); v4 = Config::getRootPath[abi:cxx11](v31); v19 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<FileFilter,std::allocator<FileFilter>,bool,std::set<std::string> const&,std::filesystem::__cxx11::path const&>( &v20, &v19, &v27, &v16, v3, v4); v5 = (const std::filesystem::__cxx11::path *)Config::getRootPath[abi:cxx11](v31); Utils::generateOutputFilename((Utils *)&v16, v5); if ( (unsigned __int8)Config::outputAsJson((Config *)v31) ) { v10 = v17; if ( v17 ) { v11 = v17; while ( v11-- != 0 ) { v13 = v16[v10 - 1] == 46; v10 = v11; if ( v13 ) goto LABEL_31; } } v11 = -1LL; LABEL_31: std::string::substr(v25, &v16, 0LL, v11); v14 = std::string::append(v25, ".json"); v27.m128i_i64[0] = (long long)v28; v15 = (const __m128i *)(v14 + 16); if ( *(_QWORD *)v14 == v14 + 16 ) { v28[0] = _mm_loadu_si128(v15); } else { v27.m128i_i64[0] = *(_QWORD *)v14; v28[0].m128i_i64[0] = v15->m128i_i64[0]; } v27.m128i_i64[1] = *(_QWORD *)(v14 + 8); *(_QWORD *)v14 = v15; *(_QWORD *)(v14 + 8) = 0LL; *(_BYTE *)(v14 + 16) = 0; std::string::operator=(&v16, (long long)&v27); if ( (__m128i *)v27.m128i_i64[0] != v28 ) operator delete((void *)v27.m128i_i64[0], v28[0].m128i_i64[0] + 1); if ( v25[0] != &v26 ) operator delete(v25[0], v26 + 1); Config::shouldStripComments((Config *)v31); v27.m128i_i64[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<FileWriterJson,std::allocator<FileWriterJson>,std::string &,bool>( &v27.m128i_u64[1], &v27, v25, &v16); } else { Config::shouldStripComments((Config *)v31); v27.m128i_i64[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<FileWriterText,std::allocator<FileWriterText>,std::string &,bool>( &v27.m128i_u64[1], &v27, v25, &v16); } v23 = _mm_load_si128(&v27); v6 = Config::getRootPath[abi:cxx11](v31); v21 = v19; v22 = v20; if ( v20 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v20 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v20 + 8)); } v24 = _mm_load_si128(&v23); v7 = _mm_shuffle_epi32(v24, 238).m128i_u64[0]; if ( v7 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v7 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v7 + 8)); } DirectoryWalker::DirectoryWalker(&v27, v6, &v21, &v24); if ( v24.m128i_i64[1] ) ((void (*)(void))std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release)(); if ( v22 ) ((void (*)(void))std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release)(); DirectoryWalker::walk((DirectoryWalker *)&v27); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, &unk_352B1, 29LL); v8 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v16, v17); std::__ostream_insert<char,std::char_traits<char>>(v8, "\n", 1LL); v27.m128i_i64[0] = (long long)(&`vtable for'DirectoryWalker + 2); if ( v30 ) ((void (*)(void))std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release)(); if ( v29 ) ((void (*)(void))std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release)(); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)&v27.m128i_u64[1]); if ( v7 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); if ( v16 != (char *)&v18 ) operator delete(v16, v18 + 1); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(v32); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v31); return 0; }
main: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x140 MOV RBX,RSI MOV EBP,EDI MOV R14,qword ptr [0x0014dfa0] LEA RSI,[0x135020] MOV EDX,0x28a MOV RDI,R14 CALL 0x00108400 LEA RSI,[0x136f3d] MOV EDX,0x2 MOV RDI,R14 CALL 0x00108400 LEA R14,[RSP + 0xe0] MOV RDI,R14 MOV ESI,EBP MOV RDX,RBX CALL 0x0010a2fc LAB_00109460: MOV RDI,R14 CALL 0x0010b95e MOV byte ptr [RSP + 0x10],AL LEA RDI,[RSP + 0xe0] CALL 0x0010b958 MOV RBX,RAX LEA RDI,[RSP + 0xe0] CALL 0x0010b954 LEA RDI,[RSP + 0x38] MOV qword ptr [RDI + -0x8],0x0 LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x90] LEA RCX,[RSP + 0x10] MOV R8,RBX MOV R9,RAX CALL 0x00109b7a LAB_001094b3: LEA RDI,[RSP + 0xe0] CALL 0x0010b954 LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x00132451 LAB_001094cd: LEA RDI,[RSP + 0xe0] CALL 0x0010b966 TEST AL,AL JNZ 0x001096c2 LAB_001094e2: LEA RDI,[RSP + 0xe0] CALL 0x0010b962 LEA R8,[RSP + 0xf] MOV byte ptr [R8],AL LEA RDI,[RSP + 0x98] MOV qword ptr [RDI + -0x8],0x0 LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x10] CALL 0x0010a21a LAB_0010951e: MOVDQA XMM0,xmmword ptr [RSP + 0x90] MOVDQA xmmword ptr [RSP + 0x50],XMM0 LAB_0010952d: LEA RDI,[RSP + 0xe0] CALL 0x0010b954 MOV RDX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x48],RCX TEST RCX,RCX JZ 0x00109568 MOV RDX,qword ptr [0x0014df98] CMP byte ptr [RDX],0x0 JZ 0x00109564 INC dword ptr [RCX + 0x8] JMP 0x00109568 LAB_00109564: INC.LOCK dword ptr [RCX + 0x8] LAB_00109568: MOVDQA XMM0,xmmword ptr [RSP + 0x50] MOVDQA xmmword ptr [RSP + 0x60],XMM0 PSHUFD XMM0,XMM0,0xee MOVQ RBX,XMM0 TEST RBX,RBX JZ 0x00109598 MOV RCX,qword ptr [0x0014df98] CMP byte ptr [RCX],0x0 JZ 0x00109594 INC dword ptr [RBX + 0x8] JMP 0x00109598 LAB_00109594: INC.LOCK dword ptr [RBX + 0x8] LAB_00109598: LEA RDI,[RSP + 0x90] LEA RDX,[RSP + 0x40] LEA RCX,[RSP + 0x60] MOV RSI,RAX CALL 0x00126720 MOV RDI,qword ptr [RSP + 0x68] TEST RDI,RDI JZ 0x001095c1 CALL 0x00109930 LAB_001095c1: MOV RDI,qword ptr [RSP + 0x48] TEST RDI,RDI JZ 0x001095d0 CALL 0x00109930 LAB_001095d0: LEA RDI,[RSP + 0x90] CALL 0x00126770 MOV RDI,qword ptr [0x0014dfa0] LEA RSI,[0x1352b1] MOV EDX,0x1d CALL 0x00108400 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [0x0014dfa0] CALL 0x00108400 LEA RSI,[0x136f3e] MOV EDX,0x1 MOV RDI,RAX CALL 0x00108400 LEA RAX,[0x14da60] ADD RAX,0x10 MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0xd8] TEST RDI,RDI JZ 0x00109644 CALL 0x00109930 LAB_00109644: MOV RDI,qword ptr [RSP + 0xc8] TEST RDI,RDI JZ 0x00109656 CALL 0x00109930 LAB_00109656: LEA RDI,[RSP + 0x98] CALL 0x001099aa TEST RBX,RBX JZ 0x00109670 MOV RDI,RBX CALL 0x00109930 LAB_00109670: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010968b MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00108380 LAB_0010968b: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0010969a CALL 0x00109930 LAB_0010969a: LEA RDI,[RSP + 0x108] CALL 0x001099e2 LEA RDI,[RSP + 0xe0] CALL 0x001099aa XOR EAX,EAX ADD RSP,0x140 POP RBX POP R14 POP RBP RET LAB_001096c2: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JNZ 0x001096d5 LAB_001096cc: MOV RCX,-0x1 JMP 0x001096ed LAB_001096d5: MOV RDX,qword ptr [RSP + 0x10] MOV RCX,RAX LAB_001096dd: SUB RCX,0x1 JC 0x001096cc CMP byte ptr [RDX + RAX*0x1 + -0x1],0x2e MOV RAX,RCX JNZ 0x001096dd LAB_001096ed: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x10] XOR EDX,EDX CALL 0x001098c4 LAB_001096fe: LEA RSI,[0x1352ab] LEA RDI,[RSP + 0x70] CALL 0x00109f6e LEA R14,[RSP + 0xa0] MOV qword ptr [R14 + -0x10],R14 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JNZ 0x00109735 MOVDQU XMM0,xmmword ptr [RCX] MOVDQU xmmword ptr [R14],XMM0 JMP 0x00109748 LAB_00109735: MOV qword ptr [RSP + 0x90],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0xa0],RDX LAB_00109748: MOV RDX,qword ptr [RAX + 0x8] LEA RBX,[RSP + 0x90] MOV qword ptr [RBX + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RDI,[RSP + 0x10] MOV RSI,RBX CALL 0x001086c0 MOV RDI,qword ptr [RBX] CMP RDI,R14 JZ 0x0010978c MOV RSI,qword ptr [RSP + 0xa0] INC RSI CALL 0x00108380 LAB_0010978c: LEA RAX,[RSP + 0x80] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001097ad MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x00108380 LAB_001097ad: LEA RDI,[RSP + 0xe0] CALL 0x0010b962 LEA R8,[RSP + 0xf] MOV byte ptr [R8],AL LEA RDI,[RSP + 0x98] MOV qword ptr [RDI + -0x8],0x0 LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x10] CALL 0x0010a13a LAB_001097e9: JMP 0x0010951e
int8 main(int param_1,char **param_2) { char *pcVar1; int *puVar2; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this; char cVar3; int8 uVar4; int8 uVar5; path *ppVar6; ostream *poVar7; long *plVar8; long lVar9; int **ppuVar10; Utils local_148; int7 uStack_147; long local_140; long local_138 [2]; int8 local_128; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_120; int8 local_118; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_110; int **local_108; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_100; int **local_f8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_f0; long *local_e8 [2]; long local_d8 [2]; int **local_c8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_c0; int *local_b8; long lStack_b0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_90; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_80; Config local_78 [40]; _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> local_50 [56]; puVar2 = PTR_cout_0014dfa0; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_0014dfa0, "\n _ _ ____ _ _ _ _ _ _ \n __| (_)_ _|___ \\| |___ _| |_ | |__ _ _ ___| |__ _ _| |__ | |__ __ _ _ __ ___ ___ _ _ \n / _ | | __|__) | __\\ \\/ / __| | _ \\| | | | / __| _ \\| | | | _ \\| _ \\ / _ | _ _ \\ / _ \\| | | |\n | (_| | | | / __/| |_ > <| |_ | |_) | |_| | \\__ \\ | | | |_| | |_) | | | | (_| | | | | | | (_) | |_| |\n \\____|_|_| |_____|\\__/_/\\_\\\\__| |____/ \\__/ / |___/_| |_|\\____|____/|_| |_|\\__,_|_| |_| |_|\\___/ \\__/ /\n |___/ |___/ \n " ,0x28a); std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar2,"\n\n",2); Config::Config(local_78,param_1,param_2); /* try { // try from 00109460 to 001094b2 has its CatchHandler @ 0010989e */ local_148 = (Utils)Config::shouldIncludeDotfiles(local_78); uVar4 = Config::getIgnoredDirs_abi_cxx11_(local_78); uVar5 = Config::getRootPath_abi_cxx11_(local_78); local_128 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<FileFilter,std::allocator<FileFilter>,bool,std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>const&,std::filesystem::__cxx11::path_const&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_120,&local_128,&local_c8, &local_148,uVar4,uVar5); /* try { // try from 001094b3 to 001094cc has its CatchHandler @ 00109847 */ ppVar6 = (path *)Config::getRootPath_abi_cxx11_(local_78); Utils::generateOutputFilename(&local_148,ppVar6); /* try { // try from 001094cd to 001094d9 has its CatchHandler @ 00109840 */ cVar3 = Config::outputAsJson(local_78); if (cVar3 == '\0') { /* try { // try from 001094e2 to 0010951d has its CatchHandler @ 00109842 */ Config::shouldStripComments(local_78); local_c8 = (int **)0x0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<FileWriterText,std::allocator<FileWriterText>,std::__cxx11::string&,bool> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&p_Stack_c0,&local_c8,local_e8, &local_148); } else { if (local_140 != 0) { lVar9 = local_140; do { if (lVar9 == 0) break; pcVar1 = (char *)(CONCAT71(uStack_147,local_148) + -1 + lVar9); lVar9 = lVar9 + -1; } while (*pcVar1 != '.'); } /* try { // try from 001096ed to 001096fd has its CatchHandler @ 00109816 */ std::__cxx11::string::substr((ulong)local_e8,(ulong)&local_148); /* try { // try from 001096fe to 0010970e has its CatchHandler @ 001097f0 */ plVar8 = (long *)std::__cxx11::string::append((string *)local_e8,".json"); local_c8 = (int **)*plVar8; ppuVar10 = (int **)(plVar8 + 2); if (local_c8 == ppuVar10) { local_b8 = *ppuVar10; lStack_b0 = plVar8[3]; local_c8 = &local_b8; } else { local_b8 = *ppuVar10; } p_Stack_c0 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)plVar8[1]; *plVar8 = (long)ppuVar10; plVar8[1] = 0; *(int1 *)(plVar8 + 2) = 0; std::__cxx11::string::operator=((string *)&local_148,(string *)&local_c8); if (local_c8 != &local_b8) { operator_delete(local_c8,(ulong)(local_b8 + 1)); } if (local_e8[0] != local_d8) { operator_delete(local_e8[0],local_d8[0] + 1); } /* try { // try from 001097ad to 001097e8 has its CatchHandler @ 001097ee */ Config::shouldStripComments(local_78); local_c8 = (int **)0x0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<FileWriterJson,std::allocator<FileWriterJson>,std::__cxx11::string&,bool> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&p_Stack_c0,&local_c8,local_e8, &local_148); } local_108 = local_c8; p_Stack_100 = p_Stack_c0; /* try { // try from 0010952d to 00109539 has its CatchHandler @ 0010983b */ uVar4 = Config::getRootPath_abi_cxx11_(local_78); this = p_Stack_100; local_118 = local_128; local_110 = local_120; if (local_120 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0014df98 == '\0') { LOCK(); *(int *)(local_120 + 8) = *(int *)(local_120 + 8) + 1; UNLOCK(); } else { *(int *)(local_120 + 8) = *(int *)(local_120 + 8) + 1; } } local_f8 = local_108; p_Stack_f0 = p_Stack_100; if (p_Stack_100 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0014df98 == '\0') { LOCK(); *(int *)(p_Stack_100 + 8) = *(int *)(p_Stack_100 + 8) + 1; UNLOCK(); } else { *(int *)(p_Stack_100 + 8) = *(int *)(p_Stack_100 + 8) + 1; } } /* try { // try from 00109598 to 001095b1 has its CatchHandler @ 00109818 */ DirectoryWalker::DirectoryWalker((DirectoryWalker *)&local_c8,uVar4,&local_118,&local_f8); if (p_Stack_f0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_f0); } if (local_110 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_110); } /* try { // try from 001095d0 to 0010961e has its CatchHandler @ 0010984c */ DirectoryWalker::walk((DirectoryWalker *)&local_c8); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_0014dfa0,&DAT_001352b1,0x1d); poVar7 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_0014dfa0,(char *)CONCAT71(uStack_147,local_148),local_140) ; std::__ostream_insert<char,std::char_traits<char>>(poVar7,"\n",1); local_c8 = &PTR__DirectoryWalker_0014da70; if (local_80 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_80); } if (local_90 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_90); } std::filesystem::__cxx11::path::~path((path *)&p_Stack_c0); if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); } if ((long *)CONCAT71(uStack_147,local_148) != local_138) { operator_delete((long *)CONCAT71(uStack_147,local_148),local_138[0] + 1); } if (local_120 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_120); } std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::~_Rb_tree(local_50); std::filesystem::__cxx11::path::~path((path *)local_78); return 0; }
49,568
my_strnxfrm_uca_pad
eloqsql/strings/ctype-uca.c
static uchar * my_strnxfrm_uca_pad(uchar *dst, uchar *de, int weight) { for ( ; dst < de; ) { *dst++= weight >> 8; if (dst < de) *dst++= weight & 0xFF; } return dst; }
O0
c
my_strnxfrm_uca_pad: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x50ae9 movl -0x14(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x50ae7 movl -0x14(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) jmp 0x50a9f movq -0x8(%rbp), %rax popq %rbp retq nop
my_strnxfrm_uca_pad: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx loc_50A9F: mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_50AE9 mov eax, [rbp+var_14] sar eax, 8 mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_50AE7 mov eax, [rbp+var_14] and eax, 0FFh mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl loc_50AE7: jmp short loc_50A9F loc_50AE9: mov rax, [rbp+var_8] pop rbp retn
_BYTE * my_strnxfrm_uca_pad(_BYTE *a1, unsigned long long a2, __int16 a3) { _BYTE *v3; // rax _BYTE *v4; // rax while ( (unsigned long long)a1 < a2 ) { v3 = a1++; *v3 = HIBYTE(a3); if ( (unsigned long long)a1 < a2 ) { v4 = a1++; *v4 = a3; } } return a1; }
my_strnxfrm_uca_pad: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LAB_00150a9f: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00150ae9 MOV EAX,dword ptr [RBP + -0x14] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00150ae7 MOV EAX,dword ptr [RBP + -0x14] AND EAX,0xff 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 LAB_00150ae7: JMP 0x00150a9f LAB_00150ae9: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int1 * my_strnxfrm_uca_pad(int1 *param_1,int1 *param_2,int4 param_3) { int1 *puVar1; int1 *local_10; puVar1 = param_1; while (local_10 = puVar1, local_10 < param_2) { puVar1 = local_10 + 1; *local_10 = (char)((uint)param_3 >> 8); if (puVar1 < param_2) { *puVar1 = (char)param_3; puVar1 = local_10 + 2; } } return local_10; }
49,569
string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::string string_join(const std::vector<std::string> & values, const std::string & separator) { std::ostringstream result; for (size_t i = 0; i < values.size(); ++i) { if (i > 0) { result << separator; } result << values[i]; } return result.str(); }
O3
cpp
string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x178, %rsp # imm = 0x178 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rsp, %rdi callq 0x1bb80 movq (%r15), %rax cmpq %rax, 0x8(%r15) je 0x72b59 movl $0x8, %r13d xorl %ebp, %ebp movq %rsp, %r12 testq %rbp, %rbp je 0x72b2e movq (%r14), %rsi movq 0x8(%r14), %rdx movq %r12, %rdi callq 0x1b9d0 movq (%r15), %rax movq -0x8(%rax,%r13), %rsi movq (%rax,%r13), %rdx movq %r12, %rdi callq 0x1b9d0 incq %rbp movq (%r15), %rax movq 0x8(%r15), %rcx subq %rax, %rcx sarq $0x5, %rcx addq $0x20, %r13 cmpq %rcx, %rbp jb 0x72b17 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1bda0 movq 0xbb3fb(%rip), %rsi # 0x12df68 movq %rsp, %rdi callq 0x1b490 leaq 0x70(%rsp), %rdi callq 0x1b2b0 movq %rbx, %rax addq $0x178, %rsp # imm = 0x178 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x72b96 movq %rax, %rbx movq 0xbb3c8(%rip), %rsi # 0x12df68 movq %rsp, %rdi callq 0x1b490 leaq 0x70(%rsp), %rdi callq 0x1b2b0 movq %rbx, %rdi callq 0x1bf90
_Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 178h mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, rsp call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [r15] cmp [r15+8], rax jz short loc_72B59 mov r13d, 8 xor ebp, ebp mov r12, rsp loc_72B17: test rbp, rbp jz short loc_72B2E mov rsi, [r14] mov rdx, [r14+8] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [r15] loc_72B2E: mov rsi, [rax+r13-8] mov rdx, [rax+r13] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) inc rbp mov rax, [r15] mov rcx, [r15+8] sub rcx, rax sar rcx, 5 add r13, 20h ; ' ' cmp rbp, rcx jb short loc_72B17 loc_72B59: lea rsi, [rsp+1A8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+1A8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 178h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_72B96: mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_68]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long string_join(long long a1, long long *a2, _QWORD *a3) { long long v4; // rax long long v5; // r13 unsigned long long v6; // rbp long long v8; // [rsp+0h] [rbp-1A8h] BYREF _BYTE v9[104]; // [rsp+8h] [rbp-1A0h] BYREF _BYTE v10[312]; // [rsp+70h] [rbp-138h] BYREF std::ostringstream::basic_ostringstream(&v8); v4 = *a2; if ( a2[1] != *a2 ) { v5 = 8LL; v6 = 0LL; do { if ( v6 ) { std::__ostream_insert<char,std::char_traits<char>>(&v8, *a3, a3[1]); v4 = *a2; } std::__ostream_insert<char,std::char_traits<char>>(&v8, *(_QWORD *)(v4 + v5 - 8), *(_QWORD *)(v4 + v5)); ++v6; v4 = *a2; v5 += 32LL; } while ( v6 < (a2[1] - *a2) >> 5 ); } std::stringbuf::str(a1, v9); std::ostringstream::~ostringstream(&v8, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v10); return a1; }
string_join: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x178 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RSP CALL 0x0011bb80 MOV RAX,qword ptr [R15] CMP qword ptr [R15 + 0x8],RAX JZ 0x00172b59 MOV R13D,0x8 XOR EBP,EBP MOV R12,RSP LAB_00172b17: TEST RBP,RBP JZ 0x00172b2e MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_00172b23: MOV RDI,R12 CALL 0x0011b9d0 MOV RAX,qword ptr [R15] LAB_00172b2e: MOV RSI,qword ptr [RAX + R13*0x1 + -0x8] MOV RDX,qword ptr [RAX + R13*0x1] MOV RDI,R12 CALL 0x0011b9d0 INC RBP MOV RAX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] SUB RCX,RAX SAR RCX,0x5 ADD R13,0x20 CMP RBP,RCX JC 0x00172b17 LAB_00172b59: LEA RSI,[RSP + 0x8] LAB_00172b5e: MOV RDI,RBX CALL 0x0011bda0 LAB_00172b66: MOV RSI,qword ptr [0x0022df68] MOV RDI,RSP CALL 0x0011b490 LEA RDI,[RSP + 0x70] CALL 0x0011b2b0 MOV RAX,RBX ADD RSP,0x178 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_join(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::__cxx11::string const&) */ vector * string_join(vector *param_1,string *param_2) { long lVar1; int8 *in_RDX; ulong uVar2; long lVar3; ostringstream aoStack_1a8 [112]; ios_base local_138 [264]; std::__cxx11::ostringstream::ostringstream(aoStack_1a8); lVar1 = *(long *)param_2; if (*(long *)(param_2 + 8) != lVar1) { lVar3 = 8; uVar2 = 0; do { if (uVar2 != 0) { /* try { // try from 00172b23 to 00172b3e has its CatchHandler @ 00172b96 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)aoStack_1a8,(char *)*in_RDX,in_RDX[1]); lVar1 = *(long *)param_2; } std::__ostream_insert<char,std::char_traits<char>> ((ostream *)aoStack_1a8,*(char **)(lVar1 + -8 + lVar3),*(long *)(lVar1 + lVar3)); uVar2 = uVar2 + 1; lVar1 = *(long *)param_2; lVar3 = lVar3 + 0x20; } while (uVar2 < (ulong)(*(long *)(param_2 + 8) - lVar1 >> 5)); } /* try { // try from 00172b5e to 00172b65 has its CatchHandler @ 00172b94 */ std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream(aoStack_1a8); std::ios_base::~ios_base(local_138); return param_1; }
49,570
check_bulk
eloqsql/libmariadb/unittest/libmariadb/bulk1.c
static int check_bulk(MYSQL *mysql) { bulk_enabled= (!(mysql->server_capabilities & CLIENT_MYSQL) && (mysql->extension->mariadb_server_capabilities & (MARIADB_CLIENT_STMT_BULK_OPERATIONS >> 32))); diag("bulk %ssupported", bulk_enabled ? "" : "not "); return OK; }
O0
c
check_bulk: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x370(%rax), %rcx andq $0x1, %rcx xorl %eax, %eax cmpq $0x0, %rcx movb %al, -0x9(%rbp) jne 0x15063 movq -0x8(%rbp), %rax movq 0x4f0(%rax), %rax movq 0x70(%rax), %rax andq $0x4, %rax cmpq $0x0, %rax setne %al movb %al, -0x9(%rbp) movb -0x9(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, 0x505b1(%rip) # 0x65622 movsbl 0x505aa(%rip), %ecx # 0x65622 leaq 0x3ab85(%rip), %rsi # 0x4fc04 leaq 0x3aac7(%rip), %rax # 0x4fb4d cmpl $0x0, %ecx cmovneq %rax, %rsi leaq 0x3ab5f(%rip), %rdi # 0x4fbf3 movb $0x0, %al callq 0x19ac0 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
check_bulk: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rcx, [rax+370h] and rcx, 1 xor eax, eax cmp rcx, 0 mov [rbp+var_9], al jnz short loc_15063 mov rax, [rbp+var_8] mov rax, [rax+4F0h] mov rax, [rax+70h] and rax, 4 cmp rax, 0 setnz al mov [rbp+var_9], al loc_15063: mov al, [rbp+var_9] and al, 1 movzx eax, al mov cs:bulk_enabled, al movsx ecx, cs:bulk_enabled lea rsi, aNot; "not " lea rax, aExecuteTestWit+29h; "" cmp ecx, 0 cmovnz rsi, rax lea rdi, aBulkSsupported; "bulk %ssupported" mov al, 0 call diag xor eax, eax add rsp, 10h pop rbp retn
long long check_bulk(long long a1, long long a2, int a3, long long a4, int a5, int a6) { char *v6; // rsi bool v8; // [rsp+7h] [rbp-9h] v8 = 0; if ( (*(_QWORD *)(a1 + 880) & 1LL) == 0 ) v8 = (*(_QWORD *)(*(_QWORD *)(a1 + 1264) + 112LL) & 4LL) != 0; bulk_enabled = v8; v6 = "not "; if ( v8 ) v6 = ""; diag((unsigned int)"bulk %ssupported", (_DWORD)v6, a3, v8, a5, a6); return 0LL; }
check_bulk: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x370] AND RCX,0x1 XOR EAX,EAX CMP RCX,0x0 MOV byte ptr [RBP + -0x9],AL JNZ 0x00115063 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX + 0x70] AND RAX,0x4 CMP RAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x9],AL LAB_00115063: MOV AL,byte ptr [RBP + -0x9] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [0x00165622],AL MOVSX ECX,byte ptr [0x00165622] LEA RSI,[0x14fc04] LEA RAX,[0x14fb4d] CMP ECX,0x0 CMOVNZ RSI,RAX LEA RDI,[0x14fbf3] MOV AL,0x0 CALL 0x00119ac0 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 check_bulk(long param_1) { char *pcVar1; bool local_11; local_11 = false; if ((*(ulong *)(param_1 + 0x370) & 1) == 0) { local_11 = (*(ulong *)(*(long *)(param_1 + 0x4f0) + 0x70) & 4) != 0; } bulk_enabled = local_11; pcVar1 = "not "; if (local_11 != false) { pcVar1 = ""; } diag("bulk %ssupported",pcVar1); return 0; }
49,571
ma_apply_undo_key_insert
eloqsql/storage/maria/ma_key_recover.c
my_bool _ma_apply_undo_key_insert(MARIA_HA *info, LSN undo_lsn, const uchar *header, uint length) { LSN lsn; my_bool res; uint keynr; uchar key_buff[MARIA_MAX_KEY_BUFF]; MARIA_SHARE *share= info->s; MARIA_KEY key; my_off_t new_root; struct st_msg_to_write_hook_for_undo_key msg; DBUG_ENTER("_ma_apply_undo_key_insert"); share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS | STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE); keynr= key_nr_korr(header); length-= KEY_NR_STORE_SIZE; /* We have to copy key as _ma_ck_real_delete() may change it */ memcpy(key_buff, header + KEY_NR_STORE_SIZE, length); DBUG_DUMP("key_buff", key_buff, length); new_root= share->state.key_root[keynr]; /* Change the key to an internal structure. It's safe to have SEARCH_USER_KEY_HAS_TRANSID even if there isn't a transaction id, as ha_key_cmp() will stop comparison when key length is reached. For index with transid flag, the ref_length of the key is not correct. This should however be safe as long as this key is only used for comparsion against other keys (not for packing or for read-next etc as in this case we use data_length + ref_length, which is correct. */ key.keyinfo= share->keyinfo + keynr; key.data= key_buff; key.data_length= length - share->rec_reflength; key.ref_length= share->rec_reflength; key.flag= SEARCH_USER_KEY_HAS_TRANSID; res= ((share->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE) ? maria_rtree_real_delete(info, &key, &new_root) : _ma_ck_real_delete(info, &key, &new_root)); if (res) _ma_mark_file_crashed(share); msg.root= &share->state.key_root[keynr]; msg.value= new_root; msg.keynr= keynr; if (_ma_write_clr(info, undo_lsn, *msg.root == msg.value ? LOGREC_UNDO_KEY_INSERT : LOGREC_UNDO_KEY_INSERT_WITH_ROOT, 0, 0, &lsn, (void*) &msg)) res= 1; _ma_fast_unlock_key_del(info); _ma_unpin_all_pages_and_finalize_row(info, lsn); DBUG_RETURN(res); }
O3
c
ma_apply_undo_key_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa48, %rsp # imm = 0xA48 movl %ecx, %r12d movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %r15 orl $0x1b1, 0x170(%r15) # imm = 0x1B1 movq %rsi, -0xa20(%rbp) movzbl (%rdx), %r14d decl %r12d leaq 0x1(%rdx), %rsi leaq -0xa10(%rbp), %r13 movl $0x9d3, %ecx # imm = 0x9D3 movq %r13, %rdi movq %r12, %rdx callq 0x2b4b0 movq 0x118(%r15), %rax movq (%rax,%r14,8), %rax movq %rax, -0xa18(%rbp) movq 0x570(%r15), %rax imulq $0x118, %r14, %rcx # imm = 0x118 leaq (%rax,%rcx), %rdx movq %rdx, -0xa40(%rbp) movq %r13, -0xa48(%rbp) movl 0x740(%r15), %edx subl %edx, %r12d movl %r12d, -0xa38(%rbp) movl %edx, -0xa34(%rbp) movl $0x80000, -0xa30(%rbp) # imm = 0x80000 cmpb $0x2, 0xa4(%rax,%rcx) jne 0x429a5 leaq -0xa48(%rbp), %rsi leaq -0xa18(%rbp), %rdx movq %rbx, %rdi callq 0x74e17 jmp 0x429bb leaq -0xa48(%rbp), %rsi leaq -0xa18(%rbp), %rdx movq %rbx, %rdi callq 0x5b2d0 movl %eax, %r12d testb %al, %al je 0x429ca movq %r15, %rdi callq 0x445e2 movq 0x118(%r15), %rax leaq (%rax,%r14,8), %rax leaq -0xa68(%rbp), %rcx movq %rax, (%rcx) movq -0xa18(%rbp), %rsi movq %rsi, 0x8(%rcx) movl %r14d, 0x10(%rcx) xorl %edx, %edx cmpq %rsi, (%rax) setne %dl addl $0x15, %edx movq %rcx, (%rsp) leaq -0xa28(%rbp), %r9 movq %rbx, %rdi movq -0xa20(%rbp), %rsi xorl %ecx, %ecx xorl %r8d, %r8d callq 0x4176d movl %eax, %r14d cmpb $0x0, 0x67e(%rbx) je 0x42a2c movq %rbx, %rdi callq 0x42daa testb %r14b, %r14b movzbl %r12b, %eax movl $0x1, %r14d cmovel %eax, %r14d movq -0xa28(%rbp), %rsi movq %rbx, %rdi callq 0x416f0 movq 0x8(%rbx), %rax movq $0x0, 0x90(%rax) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x42a7f movl %r14d, %eax addq $0xa48, %rsp # imm = 0xA48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2b280
_ma_apply_undo_key_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A48h mov r12d, ecx mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r15, [rdi] or dword ptr [r15+170h], 1B1h mov [rbp+var_A20], rsi movzx r14d, byte ptr [rdx] dec r12d lea rsi, [rdx+1] lea r13, [rbp+var_A10] mov ecx, 9D3h mov rdi, r13 mov rdx, r12 call ___memcpy_chk mov rax, [r15+118h] mov rax, [rax+r14*8] mov [rbp+var_A18], rax mov rax, [r15+570h] imul rcx, r14, 118h lea rdx, [rax+rcx] mov [rbp+var_A40], rdx mov [rbp+var_A48], r13 mov edx, [r15+740h] sub r12d, edx mov [rbp+var_A38], r12d mov [rbp+var_A34], edx mov [rbp+var_A30], 80000h cmp byte ptr [rax+rcx+0A4h], 2 jnz short loc_429A5 lea rsi, [rbp+var_A48] lea rdx, [rbp+var_A18] mov rdi, rbx call maria_rtree_real_delete jmp short loc_429BB loc_429A5: lea rsi, [rbp+var_A48] lea rdx, [rbp+var_A18] mov rdi, rbx call _ma_ck_real_delete loc_429BB: mov r12d, eax test al, al jz short loc_429CA mov rdi, r15 call _ma_mark_file_crashed loc_429CA: mov rax, [r15+118h] lea rax, [rax+r14*8] lea rcx, [rbp+var_A68] mov [rcx], rax mov rsi, [rbp+var_A18] mov [rcx+8], rsi mov [rcx+10h], r14d xor edx, edx cmp [rax], rsi setnz dl add edx, 15h mov [rsp+0A70h+var_A70], rcx lea r9, [rbp+var_A28] mov rdi, rbx mov rsi, [rbp+var_A20] xor ecx, ecx xor r8d, r8d call _ma_write_clr mov r14d, eax cmp byte ptr [rbx+67Eh], 0 jz short loc_42A2C mov rdi, rbx call _ma_unlock_key_del loc_42A2C: test r14b, r14b movzx eax, r12b mov r14d, 1 cmovz r14d, eax mov rsi, [rbp+var_A28] mov rdi, rbx call _ma_unpin_all_pages mov rax, [rbx+8] mov qword ptr [rax+90h], 0 mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_42A7F mov eax, r14d add rsp, 0A48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_42A7F: call ___stack_chk_fail
long long ma_apply_undo_key_insert(long long a1, long long a2, unsigned __int8 *a3, int a4) { long long v4; // r15 long long v5; // r14 long long v6; // r12 int v7; // edx unsigned __int8 v8; // al unsigned __int8 v9; // r12 char v10; // r14 bool v11; // zf unsigned int v12; // r14d _QWORD v14[2]; // [rsp+8h] [rbp-A68h] BYREF int v15; // [rsp+18h] [rbp-A58h] _BYTE *v16; // [rsp+28h] [rbp-A48h] BYREF long long v17; // [rsp+30h] [rbp-A40h] int v18; // [rsp+38h] [rbp-A38h] int v19; // [rsp+3Ch] [rbp-A34h] int v20; // [rsp+40h] [rbp-A30h] long long v21; // [rsp+48h] [rbp-A28h] BYREF long long v22; // [rsp+50h] [rbp-A20h] long long v23; // [rsp+58h] [rbp-A18h] BYREF _BYTE v24[2528]; // [rsp+60h] [rbp-A10h] BYREF unsigned long long v25; // [rsp+A40h] [rbp-30h] v25 = __readfsqword(0x28u); v4 = *(_QWORD *)a1; *(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x1B1u; v22 = a2; v5 = *a3; v6 = (unsigned int)(a4 - 1); __memcpy_chk(v24, a3 + 1, v6, 2515LL); v23 = *(_QWORD *)(*(_QWORD *)(v4 + 280) + 8 * v5); v17 = *(_QWORD *)(v4 + 1392) + 280 * v5; v16 = v24; v7 = *(_DWORD *)(v4 + 1856); v18 = v6 - v7; v19 = v7; v20 = 0x80000; if ( *(_BYTE *)(v17 + 164) == 2 ) v8 = maria_rtree_real_delete(a1, &v16, &v23); else v8 = ma_ck_real_delete(a1, &v16, &v23); v9 = v8; if ( v8 ) ma_mark_file_crashed(v4); v14[0] = *(_QWORD *)(v4 + 280) + 8 * v5; v14[1] = v23; v15 = v5; v10 = ma_write_clr( (long long *)a1, v22, (unsigned int)(*(_QWORD *)v14[0] != v23) + 21, 0, 0, (unsigned long long)&v21, (long long)v14); if ( *(_BYTE *)(a1 + 1662) ) ma_unlock_key_del(a1); v11 = v10 == 0; v12 = 1; if ( v11 ) v12 = v9; ma_unpin_all_pages(a1, v21); *(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL; return v12; }
_ma_apply_undo_key_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa48 MOV R12D,ECX MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R15,qword ptr [RDI] OR dword ptr [R15 + 0x170],0x1b1 MOV qword ptr [RBP + -0xa20],RSI MOVZX R14D,byte ptr [RDX] DEC R12D LEA RSI,[RDX + 0x1] LEA R13,[RBP + -0xa10] MOV ECX,0x9d3 MOV RDI,R13 MOV RDX,R12 CALL 0x0012b4b0 MOV RAX,qword ptr [R15 + 0x118] MOV RAX,qword ptr [RAX + R14*0x8] MOV qword ptr [RBP + -0xa18],RAX MOV RAX,qword ptr [R15 + 0x570] IMUL RCX,R14,0x118 LEA RDX,[RAX + RCX*0x1] MOV qword ptr [RBP + -0xa40],RDX MOV qword ptr [RBP + -0xa48],R13 MOV EDX,dword ptr [R15 + 0x740] SUB R12D,EDX MOV dword ptr [RBP + -0xa38],R12D MOV dword ptr [RBP + -0xa34],EDX MOV dword ptr [RBP + -0xa30],0x80000 CMP byte ptr [RAX + RCX*0x1 + 0xa4],0x2 JNZ 0x001429a5 LEA RSI,[RBP + -0xa48] LEA RDX,[RBP + -0xa18] MOV RDI,RBX CALL 0x00174e17 JMP 0x001429bb LAB_001429a5: LEA RSI,[RBP + -0xa48] LEA RDX,[RBP + -0xa18] MOV RDI,RBX CALL 0x0015b2d0 LAB_001429bb: MOV R12D,EAX TEST AL,AL JZ 0x001429ca MOV RDI,R15 CALL 0x001445e2 LAB_001429ca: MOV RAX,qword ptr [R15 + 0x118] LEA RAX,[RAX + R14*0x8] LEA RCX,[RBP + -0xa68] MOV qword ptr [RCX],RAX MOV RSI,qword ptr [RBP + -0xa18] MOV qword ptr [RCX + 0x8],RSI MOV dword ptr [RCX + 0x10],R14D XOR EDX,EDX CMP qword ptr [RAX],RSI SETNZ DL ADD EDX,0x15 MOV qword ptr [RSP],RCX LEA R9,[RBP + -0xa28] MOV RDI,RBX MOV RSI,qword ptr [RBP + -0xa20] XOR ECX,ECX XOR R8D,R8D CALL 0x0014176d MOV R14D,EAX CMP byte ptr [RBX + 0x67e],0x0 JZ 0x00142a2c MOV RDI,RBX CALL 0x00142daa LAB_00142a2c: TEST R14B,R14B MOVZX EAX,R12B MOV R14D,0x1 CMOVZ R14D,EAX MOV RSI,qword ptr [RBP + -0xa28] MOV RDI,RBX CALL 0x001416f0 MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00142a7f MOV EAX,R14D ADD RSP,0xa48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00142a7f: CALL 0x0012b280
char _ma_apply_undo_key_insert(long *param_1,int8 param_2,byte *param_3,int param_4) { byte bVar1; long lVar2; char cVar3; char cVar4; char cVar5; ulong uVar6; long in_FS_OFFSET; long *local_a70; long local_a68; uint local_a60; int1 *local_a50; long local_a48; int local_a40; int local_a3c; int4 local_a38; int8 local_a30; int8 local_a28; long local_a20; int1 local_a18 [2528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar2 = *param_1; *(uint *)(lVar2 + 0x170) = *(uint *)(lVar2 + 0x170) | 0x1b1; bVar1 = *param_3; uVar6 = (ulong)bVar1; local_a28 = param_2; __memcpy_chk(local_a18,param_3 + 1,param_4 + -1,0x9d3); local_a20 = *(long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8); local_a48 = *(long *)(lVar2 + 0x570) + uVar6 * 0x118; local_a3c = *(int *)(lVar2 + 0x740); local_a40 = (param_4 + -1) - local_a3c; local_a38 = 0x80000; local_a50 = local_a18; if (*(char *)(*(long *)(lVar2 + 0x570) + 0xa4 + uVar6 * 0x118) == '\x02') { cVar3 = maria_rtree_real_delete(param_1,&local_a50,&local_a20); } else { cVar3 = _ma_ck_real_delete(param_1,&local_a50,&local_a20); } if (cVar3 != '\0') { _ma_mark_file_crashed(lVar2); } local_a70 = (long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8); local_a68 = local_a20; local_a60 = (uint)bVar1; cVar4 = _ma_write_clr(param_1,local_a28,(*local_a70 != local_a20) + '\x15',0,0,&local_a30, &local_a70); if (*(char *)((long)param_1 + 0x67e) != '\0') { _ma_unlock_key_del(param_1); } cVar5 = '\x01'; if (cVar4 == '\0') { cVar5 = cVar3; } _ma_unpin_all_pages(param_1,local_a30); *(int8 *)(param_1[1] + 0x90) = 0; if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return cVar5; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,572
add_closure_var
bluesky950520[P]quickjs/quickjs.c
static int add_closure_var(JSContext *ctx, JSFunctionDef *s, BOOL is_local, BOOL is_arg, int var_idx, JSAtom var_name, BOOL is_const, BOOL is_lexical, JSVarKindEnum var_kind) { JSClosureVar *cv; /* the closure variable indexes are currently stored on 16 bits */ if (s->closure_var_count >= JS_MAX_LOCAL_VARS) { // XXX: add_closure_var() should take JSParseState *s and use js_parse_error JS_ThrowSyntaxError(ctx, "too many closure variables used (only %d allowed)", JS_MAX_LOCAL_VARS - 1); return -1; } if (js_resize_array(ctx, (void **)&s->closure_var, sizeof(s->closure_var[0]), &s->closure_var_size, s->closure_var_count + 1)) return -1; cv = &s->closure_var[s->closure_var_count++]; cv->is_local = is_local; cv->is_arg = is_arg; cv->is_const = is_const; cv->is_lexical = is_lexical; cv->var_kind = var_kind; cv->var_idx = var_idx; cv->var_name = JS_DupAtom(ctx, var_name); return s->closure_var_count - 1; }
O0
c
add_closure_var: subq $0x48, %rsp movl 0x60(%rsp), %eax movl 0x58(%rsp), %eax movl 0x50(%rsp), %eax movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movl %edx, 0x2c(%rsp) movl %ecx, 0x28(%rsp) movl %r8d, 0x24(%rsp) movl %r9d, 0x20(%rsp) movq 0x30(%rsp), %rax cmpl $0xffff, 0x198(%rax) # imm = 0xFFFF jl 0xb7f1c movq 0x38(%rsp), %rdi leaq 0x5e6e9(%rip), %rsi # 0x1165e2 movl $0xfffe, %edx # imm = 0xFFFE movb $0x0, %al callq 0x33500 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0xb804e movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi addq $0x1a0, %rsi # imm = 0x1A0 movq 0x30(%rsp), %rcx addq $0x19c, %rcx # imm = 0x19C movq 0x30(%rsp), %rax movl 0x198(%rax), %r8d addl $0x1, %r8d movl $0x8, %edx callq 0x79430 cmpl $0x0, %eax je 0xb7f65 movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0xb804e movq 0x30(%rsp), %rax movq 0x1a0(%rax), %rax movq 0x30(%rsp), %rdx movl 0x198(%rdx), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, 0x198(%rdx) movslq %ecx, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, 0x18(%rsp) movl 0x2c(%rsp), %eax movb %al, %dl movq 0x18(%rsp), %rax movb (%rax), %cl andb $0x1, %dl andb $-0x2, %cl orb %dl, %cl movb %cl, (%rax) movl 0x28(%rsp), %eax movb %al, %dl movq 0x18(%rsp), %rax movb (%rax), %cl andb $0x1, %dl shlb %dl andb $-0x3, %cl orb %dl, %cl movb %cl, (%rax) movl 0x50(%rsp), %eax movb %al, %dl movq 0x18(%rsp), %rax movb (%rax), %cl andb $0x1, %dl shlb $0x2, %dl andb $-0x5, %cl orb %dl, %cl movb %cl, (%rax) movl 0x58(%rsp), %eax movb %al, %dl movq 0x18(%rsp), %rax movb (%rax), %cl andb $0x1, %dl shlb $0x3, %dl andb $-0x9, %cl orb %dl, %cl movb %cl, (%rax) movl 0x60(%rsp), %eax movb %al, %dl movq 0x18(%rsp), %rax movb (%rax), %cl andb $0xf, %dl shlb $0x4, %dl andb $0xf, %cl orb %dl, %cl movb %cl, (%rax) movl 0x24(%rsp), %eax movw %ax, %cx movq 0x18(%rsp), %rax movw %cx, 0x2(%rax) movq 0x38(%rsp), %rdi movl 0x20(%rsp), %esi callq 0x2e290 movl %eax, %ecx movq 0x18(%rsp), %rax movl %ecx, 0x4(%rax) movq 0x30(%rsp), %rax movl 0x198(%rax), %eax subl $0x1, %eax movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopw (%rax,%rax)
add_closure_var: sub rsp, 48h mov eax, [rsp+48h+arg_10] mov eax, [rsp+48h+arg_8] mov eax, [rsp+48h+arg_0] mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_1C], edx mov [rsp+48h+var_20], ecx mov [rsp+48h+var_24], r8d mov [rsp+48h+var_28], r9d mov rax, [rsp+48h+var_18] cmp dword ptr [rax+198h], 0FFFFh jl short loc_B7F1C mov rdi, [rsp+48h+var_10] lea rsi, aTooManyClosure; "too many closure variables used (only %"... mov edx, 0FFFEh mov al, 0 call JS_ThrowSyntaxError mov [rsp+48h+var_40], rax mov [rsp+48h+var_38], rdx mov [rsp+48h+var_4], 0FFFFFFFFh jmp loc_B804E loc_B7F1C: mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_18] add rsi, 1A0h mov rcx, [rsp+48h+var_18] add rcx, 19Ch mov rax, [rsp+48h+var_18] mov r8d, [rax+198h] add r8d, 1 mov edx, 8 call js_resize_array cmp eax, 0 jz short loc_B7F65 mov [rsp+48h+var_4], 0FFFFFFFFh jmp loc_B804E loc_B7F65: mov rax, [rsp+48h+var_18] mov rax, [rax+1A0h] mov rdx, [rsp+48h+var_18] mov ecx, [rdx+198h] mov esi, ecx add esi, 1 mov [rdx+198h], esi movsxd rcx, ecx shl rcx, 3 add rax, rcx mov [rsp+48h+var_30], rax mov eax, [rsp+48h+var_1C] mov dl, al mov rax, [rsp+48h+var_30] mov cl, [rax] and dl, 1 and cl, 0FEh or cl, dl mov [rax], cl mov eax, [rsp+48h+var_20] mov dl, al mov rax, [rsp+48h+var_30] mov cl, [rax] and dl, 1 shl dl, 1 and cl, 0FDh or cl, dl mov [rax], cl mov eax, [rsp+48h+arg_0] mov dl, al mov rax, [rsp+48h+var_30] mov cl, [rax] and dl, 1 shl dl, 2 and cl, 0FBh or cl, dl mov [rax], cl mov eax, [rsp+48h+arg_8] mov dl, al mov rax, [rsp+48h+var_30] mov cl, [rax] and dl, 1 shl dl, 3 and cl, 0F7h or cl, dl mov [rax], cl mov eax, [rsp+48h+arg_10] mov dl, al mov rax, [rsp+48h+var_30] mov cl, [rax] and dl, 0Fh shl dl, 4 and cl, 0Fh or cl, dl mov [rax], cl mov eax, [rsp+48h+var_24] mov cx, ax mov rax, [rsp+48h+var_30] mov [rax+2], cx mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_28] call JS_DupAtom mov ecx, eax mov rax, [rsp+48h+var_30] mov [rax+4], ecx mov rax, [rsp+48h+var_18] mov eax, [rax+198h] sub eax, 1 mov [rsp+48h+var_4], eax loc_B804E: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long add_closure_var( long long a1, long long a2, char 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 a16, char a17) { long long v17; // rax int v18; // ecx char v20; // [rsp+0h] [rbp-48h] long long v21; // [rsp+18h] [rbp-30h] unsigned int v22; // [rsp+20h] [rbp-28h] __int16 v23; // [rsp+24h] [rbp-24h] char v24; // [rsp+28h] [rbp-20h] v24 = a4; v23 = a5; v22 = a6; if ( *(int *)(a2 + 408) < 0xFFFF ) { if ( (unsigned int)js_resize_array(a1, a2 + 416, 8u, (_DWORD *)(a2 + 412), *(_DWORD *)(a2 + 408) + 1) ) { return (unsigned int)-1; } else { v17 = *(_QWORD *)(a2 + 416); v18 = *(_DWORD *)(a2 + 408); *(_DWORD *)(a2 + 408) = v18 + 1; v21 = 8LL * v18 + v17; *(_BYTE *)v21 = a3 & 1 | *(_BYTE *)v21 & 0xFE; *(_BYTE *)v21 = (2 * (v24 & 1)) | *(_BYTE *)v21 & 0xFD; *(_BYTE *)v21 = (4 * (a15 & 1)) | *(_BYTE *)v21 & 0xFB; *(_BYTE *)v21 = (8 * (a16 & 1)) | *(_BYTE *)v21 & 0xF7; *(_BYTE *)v21 = (16 * (a17 & 0xF)) | *(_BYTE *)v21 & 0xF; *(_WORD *)(v21 + 2) = v23; *(_DWORD *)(v21 + 4) = JS_DupAtom(a1, v22); return (unsigned int)(*(_DWORD *)(a2 + 408) - 1); } } else { JS_ThrowSyntaxError( a1, (long long)"too many closure variables used (only %d allowed)", 65534LL, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20); return (unsigned int)-1; } }
add_closure_var: SUB RSP,0x48 MOV EAX,dword ptr [RSP + 0x60] MOV EAX,dword ptr [RSP + 0x58] MOV EAX,dword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV dword ptr [RSP + 0x2c],EDX MOV dword ptr [RSP + 0x28],ECX MOV dword ptr [RSP + 0x24],R8D MOV dword ptr [RSP + 0x20],R9D MOV RAX,qword ptr [RSP + 0x30] CMP dword ptr [RAX + 0x198],0xffff JL 0x001b7f1c MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[0x2165e2] MOV EDX,0xfffe MOV AL,0x0 CALL 0x00133500 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x001b804e LAB_001b7f1c: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x1a0 MOV RCX,qword ptr [RSP + 0x30] ADD RCX,0x19c MOV RAX,qword ptr [RSP + 0x30] MOV R8D,dword ptr [RAX + 0x198] ADD R8D,0x1 MOV EDX,0x8 CALL 0x00179430 CMP EAX,0x0 JZ 0x001b7f65 MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x001b804e LAB_001b7f65: MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x1a0] MOV RDX,qword ptr [RSP + 0x30] MOV ECX,dword ptr [RDX + 0x198] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RDX + 0x198],ESI MOVSXD RCX,ECX SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x2c] MOV DL,AL MOV RAX,qword ptr [RSP + 0x18] MOV CL,byte ptr [RAX] AND DL,0x1 AND CL,0xfe OR CL,DL MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + 0x28] MOV DL,AL MOV RAX,qword ptr [RSP + 0x18] MOV CL,byte ptr [RAX] AND DL,0x1 SHL DL,0x1 AND CL,0xfd OR CL,DL MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + 0x50] MOV DL,AL MOV RAX,qword ptr [RSP + 0x18] MOV CL,byte ptr [RAX] AND DL,0x1 SHL DL,0x2 AND CL,0xfb OR CL,DL MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + 0x58] MOV DL,AL MOV RAX,qword ptr [RSP + 0x18] MOV CL,byte ptr [RAX] AND DL,0x1 SHL DL,0x3 AND CL,0xf7 OR CL,DL MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + 0x60] MOV DL,AL MOV RAX,qword ptr [RSP + 0x18] MOV CL,byte ptr [RAX] AND DL,0xf SHL DL,0x4 AND CL,0xf OR CL,DL MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + 0x24] MOV CX,AX MOV RAX,qword ptr [RSP + 0x18] MOV word ptr [RAX + 0x2],CX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x20] CALL 0x0012e290 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX + 0x198] SUB EAX,0x1 MOV dword ptr [RSP + 0x44],EAX LAB_001b804e: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int add_closure_var(int8 param_1,long param_2,byte param_3,byte param_4,int2 param_5, int4 param_6,byte param_7,byte param_8,char param_9) { int iVar1; int4 uVar2; byte *pbVar3; int local_4; if (*(int *)(param_2 + 0x198) < 0xffff) { iVar1 = js_resize_array(param_1,param_2 + 0x1a0,8,param_2 + 0x19c,*(int *)(param_2 + 0x198) + 1) ; if (iVar1 == 0) { iVar1 = *(int *)(param_2 + 0x198); *(int *)(param_2 + 0x198) = iVar1 + 1; pbVar3 = (byte *)(*(long *)(param_2 + 0x1a0) + (long)iVar1 * 8); *pbVar3 = *pbVar3 & 0xfe | param_3 & 1; *pbVar3 = *pbVar3 & 0xfd | (param_4 & 1) << 1; *pbVar3 = *pbVar3 & 0xfb | (param_7 & 1) << 2; *pbVar3 = *pbVar3 & 0xf7 | (param_8 & 1) << 3; *pbVar3 = *pbVar3 & 0xf | param_9 << 4; *(int2 *)(pbVar3 + 2) = param_5; uVar2 = JS_DupAtom(param_1,param_6); *(int4 *)(pbVar3 + 4) = uVar2; local_4 = *(int *)(param_2 + 0x198) + -1; } else { local_4 = -1; } } else { JS_ThrowSyntaxError(param_1,"too many closure variables used (only %d allowed)",0xfffe); local_4 = -1; } return local_4; }
49,573
add_closure_var
bluesky950520[P]quickjs/quickjs.c
static int add_closure_var(JSContext *ctx, JSFunctionDef *s, BOOL is_local, BOOL is_arg, int var_idx, JSAtom var_name, BOOL is_const, BOOL is_lexical, JSVarKindEnum var_kind) { JSClosureVar *cv; /* the closure variable indexes are currently stored on 16 bits */ if (s->closure_var_count >= JS_MAX_LOCAL_VARS) { // XXX: add_closure_var() should take JSParseState *s and use js_parse_error JS_ThrowSyntaxError(ctx, "too many closure variables used (only %d allowed)", JS_MAX_LOCAL_VARS - 1); return -1; } if (js_resize_array(ctx, (void **)&s->closure_var, sizeof(s->closure_var[0]), &s->closure_var_size, s->closure_var_count + 1)) return -1; cv = &s->closure_var[s->closure_var_count++]; cv->is_local = is_local; cv->is_arg = is_arg; cv->is_const = is_const; cv->is_lexical = is_lexical; cv->var_kind = var_kind; cv->var_idx = var_idx; cv->var_name = JS_DupAtom(ctx, var_name); return s->closure_var_count - 1; }
O2
c
add_closure_var: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r8d, %ebp movq %rdi, %r15 movl 0x198(%rsi), %r8d cmpl $0xffff, %r8d # imm = 0xFFFF jl 0x5f9e6 leaq 0x2bb5b(%rip), %rsi # 0x8b530 movq %r15, %rdi movl $0xfffe, %edx # imm = 0xFFFE xorl %eax, %eax callq 0x2016b jmp 0x5fa12 movl %r9d, %ebx movl %ecx, %r12d movl %edx, %r13d movq %rsi, %r14 addq $0x1a0, %rsi # imm = 0x1A0 leaq 0x19c(%r14), %rcx incl %r8d pushq $0x8 popq %rdx movq %r15, %rdi callq 0x3ec9f testl %eax, %eax je 0x5fa24 pushq $-0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x50(%rsp), %esi movl 0x48(%rsp), %edx movl 0x40(%rsp), %edi movq 0x1a0(%r14), %rax movslq 0x198(%r14), %rcx leal 0x1(%rcx), %r8d movl %r8d, 0x198(%r14) andb $0x1, %r13b addb %r12b, %r12b andb $0x2, %r12b orb %r13b, %r12b shlb $0x2, %dil andb $0x4, %dil orb %r12b, %dil shlb $0x3, %dl shlb $0x4, %sil andb $0x8, %dl orb %dil, %dl orb %sil, %dl movb %dl, (%rax,%rcx,8) movw %bp, 0x2(%rax,%rcx,8) cmpl $0xe0, %ebx jl 0x5fa92 movq 0x18(%r15), %rdx movq 0x68(%rdx), %rdx movl %ebx, %esi movq (%rdx,%rsi,8), %rdx incl (%rdx) movl %ebx, 0x4(%rax,%rcx,8) movl 0x198(%r14), %eax decl %eax jmp 0x5fa15
add_closure_var: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, r8d mov r15, rdi mov r8d, [rsi+198h] cmp r8d, 0FFFFh jl short loc_5F9E6 lea rsi, aTooManyClosure; "too many closure variables used (only %"... mov rdi, r15 mov edx, 0FFFEh xor eax, eax call JS_ThrowSyntaxError jmp short loc_5FA12 loc_5F9E6: mov ebx, r9d mov r12d, ecx mov r13d, edx mov r14, rsi add rsi, 1A0h lea rcx, [r14+19Ch] inc r8d push 8 pop rdx mov rdi, r15 call js_resize_array test eax, eax jz short loc_5FA24 loc_5FA12: push 0FFFFFFFFFFFFFFFFh pop rax loc_5FA15: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5FA24: mov esi, [rsp+38h+arg_10] mov edx, [rsp+38h+arg_8] mov edi, [rsp+38h+arg_0] mov rax, [r14+1A0h] movsxd rcx, dword ptr [r14+198h] lea r8d, [rcx+1] mov [r14+198h], r8d and r13b, 1 add r12b, r12b and r12b, 2 or r12b, r13b shl dil, 2 and dil, 4 or dil, r12b shl dl, 3 shl sil, 4 and dl, 8 or dl, dil or dl, sil mov [rax+rcx*8], dl mov [rax+rcx*8+2], bp cmp ebx, 0E0h jl short loc_5FA92 mov rdx, [r15+18h] mov rdx, [rdx+68h] mov esi, ebx mov rdx, [rdx+rsi*8] inc dword ptr [rdx] loc_5FA92: mov [rax+rcx*8+4], ebx mov eax, [r14+198h] dec eax jmp loc_5FA15
long long add_closure_var( long long a1, long long a2, char a3, long long a4, __int16 a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15, char a16, char a17) { char v17; // al long long v19; // r8 int v20; // ebx char v21; // r12 long long v24; // rax long long v25; // rcx _DWORD *v26; // rdx v19 = *(unsigned int *)(a2 + 408); if ( (int)v19 >= 0xFFFF ) { JS_ThrowSyntaxError( a1, (long long)"too many closure variables used (only %d allowed)", 65534LL, a4, v19, a6, a7, a8, a9, a10, a11, a12, a13, a14, v17); return -1LL; } v20 = a6; v21 = a4; if ( (unsigned int)js_resize_array(a1, a2 + 416, 8LL, (_DWORD *)(a2 + 412), (int)v19 + 1) ) return -1LL; v24 = *(_QWORD *)(a2 + 416); v25 = *(int *)(a2 + 408); *(_DWORD *)(a2 + 408) = v25 + 1; *(_BYTE *)(v24 + 8 * v25) = (16 * a17) | a3 & 1 | (2 * v21) & 2 | (4 * a15) & 4 | (8 * a16) & 8; *(_WORD *)(v24 + 8 * v25 + 2) = a5; if ( v20 >= 224 ) { v26 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)v20); ++*v26; } *(_DWORD *)(v24 + 8 * v25 + 4) = v20; return (unsigned int)(*(_DWORD *)(a2 + 408) - 1); }
add_closure_var: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,R8D MOV R15,RDI MOV R8D,dword ptr [RSI + 0x198] CMP R8D,0xffff JL 0x0015f9e6 LEA RSI,[0x18b530] MOV RDI,R15 MOV EDX,0xfffe XOR EAX,EAX CALL 0x0012016b JMP 0x0015fa12 LAB_0015f9e6: MOV EBX,R9D MOV R12D,ECX MOV R13D,EDX MOV R14,RSI ADD RSI,0x1a0 LEA RCX,[R14 + 0x19c] INC R8D PUSH 0x8 POP RDX MOV RDI,R15 CALL 0x0013ec9f TEST EAX,EAX JZ 0x0015fa24 LAB_0015fa12: PUSH -0x1 POP RAX LAB_0015fa15: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015fa24: MOV ESI,dword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x48] MOV EDI,dword ptr [RSP + 0x40] MOV RAX,qword ptr [R14 + 0x1a0] MOVSXD RCX,dword ptr [R14 + 0x198] LEA R8D,[RCX + 0x1] MOV dword ptr [R14 + 0x198],R8D AND R13B,0x1 ADD R12B,R12B AND R12B,0x2 OR R12B,R13B SHL DIL,0x2 AND DIL,0x4 OR DIL,R12B SHL DL,0x3 SHL SIL,0x4 AND DL,0x8 OR DL,DIL OR DL,SIL MOV byte ptr [RAX + RCX*0x8],DL MOV word ptr [RAX + RCX*0x8 + 0x2],BP CMP EBX,0xe0 JL 0x0015fa92 MOV RDX,qword ptr [R15 + 0x18] MOV RDX,qword ptr [RDX + 0x68] MOV ESI,EBX MOV RDX,qword ptr [RDX + RSI*0x8] INC dword ptr [RDX] LAB_0015fa92: MOV dword ptr [RAX + RCX*0x8 + 0x4],EBX MOV EAX,dword ptr [R14 + 0x198] DEC EAX JMP 0x0015fa15
ulong add_closure_var(long param_1,long param_2,byte param_3,char param_4,int2 param_5, uint param_6,byte param_7,byte param_8,char param_9) { long lVar1; int *piVar2; int iVar3; long lVar4; if (*(int *)(param_2 + 0x198) < 0xffff) { iVar3 = js_resize_array(param_1,param_2 + 0x1a0,8,param_2 + 0x19c,*(int *)(param_2 + 0x198) + 1) ; if (iVar3 == 0) { lVar1 = *(long *)(param_2 + 0x1a0); lVar4 = (long)*(int *)(param_2 + 0x198); *(int *)(param_2 + 0x198) = *(int *)(param_2 + 0x198) + 1; *(byte *)(lVar1 + lVar4 * 8) = (param_8 & 1) << 3 | (param_7 & 1) << 2 | param_4 * '\x02' & 2U | param_3 & 1 | param_9 << 4; *(int2 *)(lVar1 + 2 + lVar4 * 8) = param_5; if (0xdf < (int)param_6) { piVar2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_6 * 8); *piVar2 = *piVar2 + 1; } *(uint *)(lVar1 + 4 + lVar4 * 8) = param_6; return (ulong)(*(int *)(param_2 + 0x198) - 1); } } else { JS_ThrowSyntaxError(param_1,"too many closure variables used (only %d allowed)",0xfffe); } return 0xffffffffffffffff; }
49,574
mthd_my_read_rows
eloqsql/libmariadb/libmariadb/mariadb_lib.c
MYSQL_DATA *mthd_my_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields, uint fields) { uint field; ulong pkt_len; ulong len; uchar *cp; char *to, *end_to; MYSQL_DATA *result; MYSQL_ROWS **prev_ptr,*cur; NET *net = &mysql->net; if ((pkt_len= ma_net_safe_read(mysql)) == packet_error) return(0); if (!(result=(MYSQL_DATA*) calloc(1, sizeof(MYSQL_DATA)))) { SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(0); } ma_init_alloc_root(&result->alloc,8192,0); /* Assume rowlength < 8192 */ result->alloc.min_malloc=sizeof(MYSQL_ROWS); prev_ptr= &result->data; result->rows=0; result->fields=fields; while (*(cp=net->read_pos) != 254 || pkt_len >= 8) { result->rows++; if (!(cur= (MYSQL_ROWS*) ma_alloc_root(&result->alloc, sizeof(MYSQL_ROWS))) || !(cur->data= ((MYSQL_ROW) ma_alloc_root(&result->alloc, (fields+1)*sizeof(char *)+fields+pkt_len)))) { free_rows(result); SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(0); } *prev_ptr=cur; prev_ptr= &cur->next; to= (char*) (cur->data+fields+1); end_to=to+fields+pkt_len-1; for (field=0 ; field < fields ; field++) { if ((len=(ulong) net_field_length(&cp)) == NULL_LENGTH) { /* null field */ cur->data[field] = 0; } else { cur->data[field] = to; if (len > (ulong)(end_to - to) || to > end_to) { free_rows(result); SET_CLIENT_ERROR(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0); return(0); } memcpy(to,(char*) cp,len); to[len]=0; to+=len+1; cp+=len; if (mysql_fields) { if (mysql_fields[field].max_length < len) mysql_fields[field].max_length=len; } } } cur->data[field]=to; /* End of last field */ if ((pkt_len=ma_net_safe_read(mysql)) == packet_error) { free_rows(result); return(0); } } *prev_ptr=0; /* last pointer is null */ /* save status */ if (pkt_len > 1) { cp++; mysql->warning_count= uint2korr(cp); cp+= 2; mysql->server_status= uint2korr(cp); } return(result); }
O0
c
mthd_my_read_rows: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi callq 0x15b30 movq %rax, -0x28(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x1a11f movq $0x0, -0x8(%rbp) jmp 0x1a566 movl $0x1, %edi movl $0x60, %esi callq 0x132c0 movq %rax, -0x50(%rbp) cmpq $0x0, %rax jne 0x1a1aa jmp 0x1a13a movq -0x10(%rbp), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x45d86(%rip), %rax # 0x5fee0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rdi addq $0x97, %rdi leaq 0x45d6c(%rip), %rax # 0x5fef0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x296(%rax) movq $0x0, -0x8(%rbp) jmp 0x1a566 movq -0x50(%rbp), %rdi addq $0x10, %rdi movl $0x2000, %esi # imm = 0x2000 xorl %eax, %eax movl %eax, %edx callq 0x24750 movq -0x50(%rbp), %rax movq $0x18, 0x28(%rax) movq -0x50(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movq $0x0, 0x48(%rax) movl -0x1c(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x68(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x38(%rbp) movzbl (%rax), %ecx movb $0x1, %al cmpl $0xfe, %ecx movb %al, -0x69(%rbp) jne 0x1a211 cmpq $0x8, -0x28(%rbp) setae %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al testb $0x1, %al jne 0x1a21d jmp 0x1a4e6 movq -0x50(%rbp), %rax movq 0x48(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x48(%rax) movq -0x50(%rbp), %rdi addq $0x10, %rdi movl $0x18, %esi callq 0x24830 movq %rax, -0x60(%rbp) cmpq $0x0, %rax je 0x1a27c movq -0x50(%rbp), %rdi addq $0x10, %rdi movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, %eax movl %eax, %esi shlq $0x3, %rsi movl -0x1c(%rbp), %eax addq %rax, %rsi addq -0x28(%rbp), %rsi callq 0x24830 movq -0x60(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax jne 0x1a2f5 movq -0x50(%rbp), %rdi callq 0x16290 movq -0x10(%rbp), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x45c3b(%rip), %rax # 0x5fee0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rdi addq $0x97, %rdi leaq 0x45c21(%rip), %rax # 0x5fef0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x296(%rax) movq $0x0, -0x8(%rbp) jmp 0x1a566 movq -0x60(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, (%rax) movq -0x60(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x60(%rbp), %rax movq 0x8(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x3, %rcx addq %rcx, %rax addq $0x8, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movl -0x1c(%rbp), %ecx addq %rcx, %rax addq -0x28(%rbp), %rax addq $-0x1, %rax movq %rax, -0x48(%rbp) movl $0x0, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x1c(%rbp), %eax jae 0x1a4a1 leaq -0x38(%rbp), %rdi callq 0x16150 movq %rax, -0x30(%rbp) cmpq $-0x1, %rax jne 0x1a376 movq -0x60(%rbp), %rax movq 0x8(%rax), %rax movl -0x20(%rbp), %ecx movq $0x0, (%rax,%rcx,8) jmp 0x1a491 movq -0x40(%rbp), %rdx movq -0x60(%rbp), %rax movq 0x8(%rax), %rax movl -0x20(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x30(%rbp), %rax movq -0x48(%rbp), %rcx movq -0x40(%rbp), %rdx subq %rdx, %rcx cmpq %rcx, %rax ja 0x1a3a7 movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jbe 0x1a41f movq -0x50(%rbp), %rdi callq 0x16290 movq -0x10(%rbp), %rax movl $0x7d0, 0x90(%rax) # imm = 0x7D0 movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x45b10(%rip), %rax # 0x5fee0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rdi addq $0x97, %rdi leaq 0x45af6(%rip), %rax # 0x5fef0 movq (%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x296(%rax) movq $0x0, -0x8(%rbp) jmp 0x1a566 movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x13360 movq -0x40(%rbp), %rax movq -0x30(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x30(%rbp), %rax addq $0x1, %rax addq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x18(%rbp) je 0x1a48f movq -0x18(%rbp), %rax movl -0x20(%rbp), %ecx shlq $0x7, %rcx addq %rcx, %rax movq 0x40(%rax), %rax cmpq -0x30(%rbp), %rax jae 0x1a48d movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movl -0x20(%rbp), %edx shlq $0x7, %rdx addq %rdx, %rax movq %rcx, 0x40(%rax) jmp 0x1a48f jmp 0x1a491 jmp 0x1a493 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0x1a33f movq -0x40(%rbp), %rdx movq -0x60(%rbp), %rax movq 0x8(%rax), %rax movl -0x20(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x10(%rbp), %rdi callq 0x15b30 movq %rax, -0x28(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x1a4e1 movq -0x50(%rbp), %rdi callq 0x16290 movq $0x0, -0x8(%rbp) jmp 0x1a566 jmp 0x1a1ea movq -0x58(%rbp), %rax movq $0x0, (%rax) cmpq $0x1, -0x28(%rbp) jbe 0x1a55e movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x38(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x388(%rax) movq -0x38(%rbp), %rax addq $0x2, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x38(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x380(%rax) movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq
mthd_my_read_rows: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov [rbp+var_68], rax mov rdi, [rbp+var_10] call ma_net_safe_read mov [rbp+var_28], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_1A11F mov [rbp+var_8], 0 jmp loc_1A566 loc_1A11F: mov edi, 1 mov esi, 60h ; '`' call _calloc mov [rbp+var_50], rax cmp rax, 0 jnz short loc_1A1AA jmp short $+2 loc_1A13A: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D8h mov rdi, [rbp+var_10] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_10] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+296h], 0 mov [rbp+var_8], 0 jmp loc_1A566 loc_1A1AA: mov rdi, [rbp+var_50] add rdi, 10h mov esi, 2000h xor eax, eax mov edx, eax call ma_init_alloc_root mov rax, [rbp+var_50] mov qword ptr [rax+28h], 18h mov rax, [rbp+var_50] mov [rbp+var_58], rax mov rax, [rbp+var_50] mov qword ptr [rax+48h], 0 mov ecx, [rbp+var_1C] mov rax, [rbp+var_50] mov [rax+50h], ecx loc_1A1EA: mov rax, [rbp+var_68] mov rax, [rax+20h] mov [rbp+var_38], rax movzx ecx, byte ptr [rax] mov al, 1 cmp ecx, 0FEh mov [rbp+var_69], al jnz short loc_1A211 cmp [rbp+var_28], 8 setnb al mov [rbp+var_69], al loc_1A211: mov al, [rbp+var_69] test al, 1 jnz short loc_1A21D jmp loc_1A4E6 loc_1A21D: mov rax, [rbp+var_50] mov rcx, [rax+48h] add rcx, 1 mov [rax+48h], rcx mov rdi, [rbp+var_50] add rdi, 10h mov esi, 18h call ma_alloc_root mov [rbp+var_60], rax cmp rax, 0 jz short loc_1A27C mov rdi, [rbp+var_50] add rdi, 10h mov eax, [rbp+var_1C] add eax, 1 mov eax, eax mov esi, eax shl rsi, 3 mov eax, [rbp+var_1C] add rsi, rax add rsi, [rbp+var_28] call ma_alloc_root mov rcx, [rbp+var_60] mov [rcx+8], rax cmp rax, 0 jnz short loc_1A2F5 loc_1A27C: mov rdi, [rbp+var_50] call free_rows mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D8h mov rdi, [rbp+var_10] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_10] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+296h], 0 mov [rbp+var_8], 0 jmp loc_1A566 loc_1A2F5: mov rcx, [rbp+var_60] mov rax, [rbp+var_58] mov [rax], rcx mov rax, [rbp+var_60] mov [rbp+var_58], rax mov rax, [rbp+var_60] mov rax, [rax+8] mov ecx, [rbp+var_1C] shl rcx, 3 add rax, rcx add rax, 8 mov [rbp+var_40], rax mov rax, [rbp+var_40] mov ecx, [rbp+var_1C] add rax, rcx add rax, [rbp+var_28] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_48], rax mov [rbp+var_20], 0 loc_1A33F: mov eax, [rbp+var_20] cmp eax, [rbp+var_1C] jnb loc_1A4A1 lea rdi, [rbp+var_38] call net_field_length mov [rbp+var_30], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_1A376 mov rax, [rbp+var_60] mov rax, [rax+8] mov ecx, [rbp+var_20] mov qword ptr [rax+rcx*8], 0 jmp loc_1A491 loc_1A376: mov rdx, [rbp+var_40] mov rax, [rbp+var_60] mov rax, [rax+8] mov ecx, [rbp+var_20] mov [rax+rcx*8], rdx mov rax, [rbp+var_30] mov rcx, [rbp+var_48] mov rdx, [rbp+var_40] sub rcx, rdx cmp rax, rcx ja short loc_1A3A7 mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jbe short loc_1A41F loc_1A3A7: mov rdi, [rbp+var_50] call free_rows mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D0h mov rdi, [rbp+var_10] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_10] add rdi, 97h lea rax, client_errors mov rsi, [rax] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+296h], 0 mov [rbp+var_8], 0 jmp loc_1A566 loc_1A41F: mov rdi, [rbp+var_40] mov rsi, [rbp+var_38] mov rdx, [rbp+var_30] call _memcpy mov rax, [rbp+var_40] mov rcx, [rbp+var_30] mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_30] add rax, 1 add rax, [rbp+var_40] mov [rbp+var_40], rax mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_38], rax cmp [rbp+var_18], 0 jz short loc_1A48F mov rax, [rbp+var_18] mov ecx, [rbp+var_20] shl rcx, 7 add rax, rcx mov rax, [rax+40h] cmp rax, [rbp+var_30] jnb short loc_1A48D mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov edx, [rbp+var_20] shl rdx, 7 add rax, rdx mov [rax+40h], rcx loc_1A48D: jmp short $+2 loc_1A48F: jmp short $+2 loc_1A491: jmp short $+2 loc_1A493: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp loc_1A33F loc_1A4A1: mov rdx, [rbp+var_40] mov rax, [rbp+var_60] mov rax, [rax+8] mov ecx, [rbp+var_20] mov [rax+rcx*8], rdx mov rdi, [rbp+var_10] call ma_net_safe_read mov [rbp+var_28], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_1A4E1 mov rdi, [rbp+var_50] call free_rows mov [rbp+var_8], 0 jmp loc_1A566 loc_1A4E1: jmp loc_1A1EA loc_1A4E6: mov rax, [rbp+var_58] mov qword ptr [rax], 0 cmp [rbp+var_28], 1 jbe short loc_1A55E mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax mov rax, [rbp+var_38] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+388h], ecx mov rax, [rbp+var_38] add rax, 2 mov [rbp+var_38], rax mov rax, [rbp+var_38] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+380h], ecx loc_1A55E: mov rax, [rbp+var_50] mov [rbp+var_8], rax loc_1A566: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
long long mthd_my_read_rows(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { unsigned __int8 *v6; // rsi long long v7; // rax int v8; // r8d int v9; // r9d long long v10; // rcx bool v12; // [rsp+7h] [rbp-69h] long long v13; // [rsp+10h] [rbp-60h] _QWORD *v14; // [rsp+18h] [rbp-58h] long long v15; // [rsp+20h] [rbp-50h] unsigned long long v16; // [rsp+28h] [rbp-48h] unsigned long long v17; // [rsp+30h] [rbp-40h] unsigned __int8 *v18; // [rsp+38h] [rbp-38h] BYREF unsigned long long v19; // [rsp+40h] [rbp-30h] unsigned long long v20; // [rsp+48h] [rbp-28h] unsigned int i; // [rsp+50h] [rbp-20h] unsigned int v22; // [rsp+54h] [rbp-1Ch] long long v23; // [rsp+58h] [rbp-18h] long long v24; // [rsp+60h] [rbp-10h] v24 = a1; v23 = a2; v22 = a3; v20 = ma_net_safe_read(a1, a2, a3, a4, a5, a6); if ( v20 == 0xFFFFFFFF ) return 0LL; v15 = calloc(1LL, 96LL); if ( v15 ) { ma_init_alloc_root(v15 + 16, 0x2000LL, 0LL); *(_QWORD *)(v15 + 40) = 24LL; v14 = (_QWORD *)v15; *(_QWORD *)(v15 + 72) = 0LL; *(_DWORD *)(v15 + 80) = v22; while ( 1 ) { v18 = *(unsigned __int8 **)(a1 + 32); v12 = 1; if ( *v18 == 254 ) v12 = v20 >= 8; if ( !v12 ) break; ++*(_QWORD *)(v15 + 72); v13 = ma_alloc_root(v15 + 16, 24LL); if ( !v13 || (v6 = (unsigned __int8 *)(v20 + v22 + 8LL * (v22 + 1)), v7 = ma_alloc_root(v15 + 16, v6), (*(_QWORD *)(v13 + 8) = v7) == 0LL) ) { free_rows(v15); *(_DWORD *)(v24 + 144) = 2008; strncpy(v24 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v24 + 668) = 0; strncpy(v24 + 151, client_errors[8], 511LL); *(_BYTE *)(v24 + 662) = 0; return 0LL; } *v14 = v13; v14 = (_QWORD *)v13; v17 = 8LL * v22 + *(_QWORD *)(v13 + 8) + 8; v16 = v20 + v22 + v17 - 1; for ( i = 0; i < v22; ++i ) { v19 = net_field_length(&v18); if ( v19 == -1LL ) { *(_QWORD *)(*(_QWORD *)(v13 + 8) + 8LL * i) = 0LL; } else { *(_QWORD *)(*(_QWORD *)(v13 + 8) + 8LL * i) = v17; if ( v19 > v16 - v17 || v17 > v16 ) { free_rows(v15); *(_DWORD *)(v24 + 144) = 2000; strncpy(v24 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v24 + 668) = 0; strncpy(v24 + 151, client_errors[0], 511LL); *(_BYTE *)(v24 + 662) = 0; return 0LL; } v6 = v18; memcpy(v17, v18, v19); *(_BYTE *)(v17 + v19) = 0; v17 += v19 + 1; v18 += v19; if ( v23 && *(_QWORD *)(((unsigned long long)i << 7) + v23 + 64) < v19 ) *(_QWORD *)(((unsigned long long)i << 7) + v23 + 64) = v19; } } v10 = i; *(_QWORD *)(*(_QWORD *)(v13 + 8) + 8LL * i) = v17; v20 = ma_net_safe_read(v24, (long long)v6, v17, v10, v8, v9); if ( v20 == 0xFFFFFFFF ) { free_rows(v15); return 0LL; } } *v14 = 0LL; if ( v20 > 1 ) { ++v18; *(_DWORD *)(v24 + 904) = (unsigned __int16)((v18[1] << 8) + *v18); v18 += 2; *(_DWORD *)(v24 + 896) = (unsigned __int16)((v18[1] << 8) + *v18); } return v15; } else { *(_DWORD *)(v24 + 144) = 2008; strncpy(v24 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v24 + 668) = 0; strncpy(v24 + 151, client_errors[8], 511LL); *(_BYTE *)(v24 + 662) = 0; return 0LL; } }
mthd_my_read_rows: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00115b30 MOV qword ptr [RBP + -0x28],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x0011a11f MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011a566 LAB_0011a11f: MOV EDI,0x1 MOV ESI,0x60 CALL 0x001132c0 MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JNZ 0x0011a1aa JMP 0x0011a13a LAB_0011a13a: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d8 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x15fee0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x15fef0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011a566 LAB_0011a1aa: MOV RDI,qword ptr [RBP + -0x50] ADD RDI,0x10 MOV ESI,0x2000 XOR EAX,EAX MOV EDX,EAX CALL 0x00124750 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x28],0x18 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x48],0x0 MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x50],ECX LAB_0011a1ea: MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x38],RAX MOVZX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0xfe MOV byte ptr [RBP + -0x69],AL JNZ 0x0011a211 CMP qword ptr [RBP + -0x28],0x8 SETNC AL MOV byte ptr [RBP + -0x69],AL LAB_0011a211: MOV AL,byte ptr [RBP + -0x69] TEST AL,0x1 JNZ 0x0011a21d JMP 0x0011a4e6 LAB_0011a21d: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RAX + 0x48] ADD RCX,0x1 MOV qword ptr [RAX + 0x48],RCX MOV RDI,qword ptr [RBP + -0x50] ADD RDI,0x10 MOV ESI,0x18 CALL 0x00124830 MOV qword ptr [RBP + -0x60],RAX CMP RAX,0x0 JZ 0x0011a27c MOV RDI,qword ptr [RBP + -0x50] ADD RDI,0x10 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV EAX,EAX MOV ESI,EAX SHL RSI,0x3 MOV EAX,dword ptr [RBP + -0x1c] ADD RSI,RAX ADD RSI,qword ptr [RBP + -0x28] CALL 0x00124830 MOV RCX,qword ptr [RBP + -0x60] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JNZ 0x0011a2f5 LAB_0011a27c: MOV RDI,qword ptr [RBP + -0x50] CALL 0x00116290 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d8 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x15fee0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x15fef0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011a566 LAB_0011a2f5: MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x3 ADD RAX,RCX ADD RAX,0x8 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x1c] ADD RAX,RCX ADD RAX,qword ptr [RBP + -0x28] ADD RAX,-0x1 MOV qword ptr [RBP + -0x48],RAX MOV dword ptr [RBP + -0x20],0x0 LAB_0011a33f: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x1c] JNC 0x0011a4a1 LEA RDI,[RBP + -0x38] CALL 0x00116150 MOV qword ptr [RBP + -0x30],RAX CMP RAX,-0x1 JNZ 0x0011a376 MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x20] MOV qword ptr [RAX + RCX*0x8],0x0 JMP 0x0011a491 LAB_0011a376: MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x20] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] SUB RCX,RDX CMP RAX,RCX JA 0x0011a3a7 MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JBE 0x0011a41f LAB_0011a3a7: MOV RDI,qword ptr [RBP + -0x50] CALL 0x00116290 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x15fee0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x15fef0] MOV RSI,qword ptr [RAX] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011a566 LAB_0011a41f: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x30] CALL 0x00113360 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0011a48f MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x20] SHL RCX,0x7 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x40] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0011a48d MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x20] SHL RDX,0x7 ADD RAX,RDX MOV qword ptr [RAX + 0x40],RCX LAB_0011a48d: JMP 0x0011a48f LAB_0011a48f: JMP 0x0011a491 LAB_0011a491: JMP 0x0011a493 LAB_0011a493: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x0011a33f LAB_0011a4a1: MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x20] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00115b30 MOV qword ptr [RBP + -0x28],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x0011a4e1 MOV RDI,qword ptr [RBP + -0x50] CALL 0x00116290 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011a566 LAB_0011a4e1: JMP 0x0011a1ea LAB_0011a4e6: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],0x0 CMP qword ptr [RBP + -0x28],0x1 JBE 0x0011a55e MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x388],ECX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x380],ECX LAB_0011a55e: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX LAB_0011a566: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
int8 * mthd_my_read_rows(long param_1,long param_2,uint param_3) { int8 *puVar1; int8 *puVar2; long lVar3; void *pvVar4; int8 *local_60; void *local_48; char *local_40; ulong local_38; ulong local_30; uint local_28; uint local_24; long local_20; long local_18; local_24 = param_3; local_20 = param_2; local_18 = param_1; local_30 = ma_net_safe_read(param_1); if (local_30 != 0xffffffff) { puVar1 = (int8 *)calloc(1,0x60); if (puVar1 == (int8 *)0x0) { *(int4 *)(local_18 + 0x90) = 0x7d8; strncpy((char *)(local_18 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(local_18 + 0x29c) = 0; strncpy((char *)(local_18 + 0x97),PTR_s_Client_run_out_of_memory_0015ff30,0x1ff); *(int1 *)(local_18 + 0x296) = 0; } else { ma_init_alloc_root(puVar1 + 2,0x2000,0); puVar1[5] = 0x18; puVar1[9] = 0; *(uint *)(puVar1 + 10) = local_24; local_60 = puVar1; do { local_40 = *(char **)(param_1 + 0x20); if (*local_40 == -2 && local_30 < 8) { *local_60 = 0; if (1 < local_30) { *(uint *)(local_18 + 0x388) = (uint)(byte)local_40[1] + (uint)(byte)local_40[2] * 0x100 & 0xffff; *(uint *)(local_18 + 0x380) = (uint)(byte)local_40[3] + (uint)(byte)local_40[4] * 0x100 & 0xffff; return puVar1; } return puVar1; } puVar1[9] = puVar1[9] + 1; puVar2 = (int8 *)ma_alloc_root(puVar1 + 2,0x18); if (puVar2 == (int8 *)0x0) { LAB_0011a27c: free_rows(puVar1); *(int4 *)(local_18 + 0x90) = 0x7d8; strncpy((char *)(local_18 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(local_18 + 0x29c) = 0; strncpy((char *)(local_18 + 0x97),PTR_s_Client_run_out_of_memory_0015ff30,0x1ff); *(int1 *)(local_18 + 0x296) = 0; return (int8 *)0x0; } lVar3 = ma_alloc_root(puVar1 + 2,(ulong)(local_24 + 1) * 8 + (ulong)local_24 + local_30); puVar2[1] = lVar3; if (lVar3 == 0) goto LAB_0011a27c; *local_60 = puVar2; local_48 = (void *)(puVar2[1] + (ulong)local_24 * 8 + 8); pvVar4 = (void *)((long)local_48 + local_30 + local_24 + -1); for (local_28 = 0; local_28 < local_24; local_28 = local_28 + 1) { local_38 = net_field_length(&local_40); if (local_38 == 0xffffffffffffffff) { *(int8 *)(puVar2[1] + (ulong)local_28 * 8) = 0; } else { *(void **)(puVar2[1] + (ulong)local_28 * 8) = local_48; if (((ulong)((long)pvVar4 - (long)local_48) < local_38) || (pvVar4 < local_48)) { free_rows(puVar1); *(int4 *)(local_18 + 0x90) = 2000; strncpy((char *)(local_18 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(local_18 + 0x29c) = 0; strncpy((char *)(local_18 + 0x97),client_errors,0x1ff); *(int1 *)(local_18 + 0x296) = 0; return (int8 *)0x0; } memcpy(local_48,local_40,local_38); *(int1 *)((long)local_48 + local_38) = 0; local_48 = (void *)(local_38 + 1 + (long)local_48); local_40 = local_40 + local_38; if ((local_20 != 0) && (*(ulong *)(local_20 + (ulong)local_28 * 0x80 + 0x40) < local_38) ) { *(ulong *)(local_20 + (ulong)local_28 * 0x80 + 0x40) = local_38; } } } *(void **)(puVar2[1] + (ulong)local_28 * 8) = local_48; local_30 = ma_net_safe_read(local_18); local_60 = puVar2; } while (local_30 != 0xffffffff); free_rows(puVar1); } } return (int8 *)0x0; }
49,575
my_caseup_str_mb
eloqsql/strings/ctype-mb.c
size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str) { register uint32 l; register const uchar *map= cs->to_upper; char *str_orig= str; while (*str) { /* Pointing after the '\0' is safe here. */ if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen))) str+= l; else { *str= (char) map[(uchar)*str]; str++; } } return (size_t) (str - str_orig); }
O3
c
my_caseup_str_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %rax je 0x3d9a0 movq %rdi, %r14 movq 0x50(%rdi), %r12 movq %rbx, %r15 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0x3d990 movzbl (%r15), %eax movb (%r12,%rax), %al movb %al, (%r15) movl $0x1, %ecx jmp 0x3d992 movl %eax, %ecx leaq (%r15,%rcx), %rax cmpb $0x0, (%r15,%rcx) movq %rax, %r15 jne 0x3d95c subq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_caseup_str_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi cmp byte ptr [rsi], 0 mov rax, rsi jz short loc_3D9A0 mov r14, rdi mov r12, [rdi+50h] mov r15, rbx loc_3D95C: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_3D990 movzx eax, byte ptr [r15] mov al, [r12+rax] mov [r15], al mov ecx, 1 jmp short loc_3D992 loc_3D990: mov ecx, eax loc_3D992: lea rax, [r15+rcx] cmp byte ptr [r15+rcx], 0 mov r15, rax jnz short loc_3D95C loc_3D9A0: sub rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_caseup_str_mb(long long a1, _BYTE *a2) { _BYTE *v2; // rax long long v3; // r12 _BYTE *v4; // r15 int v5; // eax long long v6; // rcx bool v7; // zf v2 = a2; if ( *a2 ) { v3 = *(_QWORD *)(a1 + 80); v4 = a2; do { v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, &v4[*(unsigned int *)(a1 + 156)]); if ( v5 >= 2 ) { v6 = (unsigned int)v5; } else { *v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4); v6 = 1LL; } v2 = &v4[v6]; v7 = v4[v6] == 0; v4 += v6; } while ( !v7 ); } return v2 - a2; }
my_caseup_str_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV RAX,RSI JZ 0x0013d9a0 MOV R14,RDI MOV R12,qword ptr [RDI + 0x50] MOV R15,RBX LAB_0013d95c: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x0013d990 MOVZX EAX,byte ptr [R15] MOV AL,byte ptr [R12 + RAX*0x1] MOV byte ptr [R15],AL MOV ECX,0x1 JMP 0x0013d992 LAB_0013d990: MOV ECX,EAX LAB_0013d992: LEA RAX,[R15 + RCX*0x1] CMP byte ptr [R15 + RCX*0x1],0x0 MOV R15,RAX JNZ 0x0013d95c LAB_0013d9a0: SUB RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_caseup_str_mb(long param_1,byte *param_2) { byte *pbVar1; long lVar2; uint uVar3; byte *pbVar4; ulong uVar5; byte *pbVar6; pbVar4 = param_2; if (*param_2 != 0) { lVar2 = *(long *)(param_1 + 0x50); pbVar6 = param_2; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c)); if ((int)uVar3 < 2) { *pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6); uVar5 = 1; } else { uVar5 = (ulong)uVar3; } pbVar4 = pbVar6 + uVar5; pbVar1 = pbVar6 + uVar5; pbVar6 = pbVar4; } while (*pbVar1 != 0); } return (long)pbVar4 - (long)param_2; }
49,576
my_hash_sort_8bit_bin
eloqsql/strings/ctype-bin.c
void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len, ulong *nr1, ulong *nr2) { /* Remove trailing spaces. We have to do this to be able to compare 'A ' and 'A' as identical */ const uchar *end= skip_trailing_space(key, len); my_hash_sort_bin(cs, key, end - key, nr1, nr2); }
O3
c
my_hash_sort_8bit_bin: pushq %rbp movq %rsp, %rbp leaq (%rsi,%rdx), %r9 cmpq $0x15, %rdx jb 0x30e74 movq %r9, %rdi andq $-0x4, %rdi cmpq %rsi, %rdi jbe 0x30e74 leaq 0x3(%rsi), %rdx andq $-0x4, %rdx movq %r9, %rax movb -0x1(%r9), %r10b cmpq %rdi, %r9 jbe 0x30ed4 leaq -0x1(%rax), %r9 cmpb $0x20, %r10b je 0x30e5c jmp 0x30e77 movq %r9, %rax movq %rax, %rdi subq %rsi, %rdi movq %rax, %rdx movq %rdi, %r9 cmpq %rsi, %rax jbe 0x30e96 leaq -0x1(%rdx), %rax leaq -0x1(%r9), %rdi cmpb $0x20, -0x1(%rdx) je 0x30e7d movq (%rcx), %rax movq (%r8), %rdi testq %r9, %r9 jle 0x30ecc movl %eax, %r9d andl $0x3f, %r9d addq %rdi, %r9 movzbl (%rsi), %r10d imulq %r9, %r10 movq %rax, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r9, %rax addq $0x3, %rdi incq %rsi cmpq %rdx, %rsi jb 0x30ea1 movq %rax, (%rcx) movq %rdi, (%r8) popq %rbp retq cmpb $0x20, %r10b setne %r9b cmpq %rdi, %rdx setae %dil orb %r9b, %dil jne 0x30e77 movq %rax, %rdi movq %rdi, %rax cmpq %rdx, %rdi jbe 0x30e77 leaq -0x4(%rax), %rdi cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 je 0x30eeb jmp 0x30e77
my_hash_sort_8bit_bin: push rbp mov rbp, rsp lea r9, [rsi+rdx] cmp rdx, 15h jb short loc_30E74 mov rdi, r9 and rdi, 0FFFFFFFFFFFFFFFCh cmp rdi, rsi jbe short loc_30E74 lea rdx, [rsi+3] and rdx, 0FFFFFFFFFFFFFFFCh loc_30E5C: mov rax, r9 mov r10b, [r9-1] cmp r9, rdi jbe short loc_30ED4 lea r9, [rax-1] cmp r10b, 20h ; ' ' jz short loc_30E5C jmp short loc_30E77 loc_30E74: mov rax, r9 loc_30E77: mov rdi, rax sub rdi, rsi loc_30E7D: mov rdx, rax mov r9, rdi cmp rax, rsi jbe short loc_30E96 lea rax, [rdx-1] lea rdi, [r9-1] cmp byte ptr [rdx-1], 20h ; ' ' jz short loc_30E7D loc_30E96: mov rax, [rcx] mov rdi, [r8] test r9, r9 jle short loc_30ECC loc_30EA1: mov r9d, eax and r9d, 3Fh add r9, rdi movzx r10d, byte ptr [rsi] imul r10, r9 mov r9, rax shl r9, 8 add r9, r10 xor rax, r9 add rdi, 3 inc rsi cmp rsi, rdx jb short loc_30EA1 loc_30ECC: mov [rcx], rax mov [r8], rdi pop rbp retn loc_30ED4: cmp r10b, 20h ; ' ' setnz r9b cmp rdx, rdi setnb dil or dil, r9b jnz short loc_30E77 mov rdi, rax loc_30EEB: mov rax, rdi cmp rdi, rdx jbe short loc_30E77 lea rdi, [rax-4] cmp dword ptr [rax-4], 20202020h jz short loc_30EEB jmp loc_30E77
long long my_hash_sort_8bit_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, long long *a5) { unsigned long long v5; // r9 unsigned long long v6; // rdi unsigned long long v7; // rdx unsigned __int8 *v8; // rax char v9; // r10 long long v10; // rdi unsigned long long v11; // rdx long long v12; // r9 long long result; // rax long long v14; // rdi unsigned long long v15; // rdi v5 = (unsigned long long)&a2[a3]; if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= (unsigned long long)a2) ) { v8 = &a2[a3]; } else { v7 = (unsigned long long)(a2 + 3) & 0xFFFFFFFFFFFFFFFCLL; while ( 1 ) { v8 = (unsigned __int8 *)v5; v9 = *(_BYTE *)(v5 - 1); if ( v5 <= v6 ) break; --v5; if ( v9 != 32 ) goto LABEL_8; } if ( v9 == 32 && v7 < v6 ) { v15 = v5; do { v8 = (unsigned __int8 *)v15; if ( v15 <= v7 ) break; v15 -= 4LL; } while ( *((_DWORD *)v8 - 1) == 538976288 ); } } LABEL_8: v10 = v8 - a2; do { v11 = (unsigned long long)v8; v12 = v10; if ( v8 <= a2 ) break; --v8; --v10; } while ( *(_BYTE *)(v11 - 1) == 32 ); result = *a4; v14 = *a5; if ( v12 > 0 ) { do { result ^= (v14 + (result & 0x3F)) * *a2 + (result << 8); v14 += 3LL; ++a2; } while ( (unsigned long long)a2 < v11 ); } *a4 = result; *a5 = v14; return result; }
my_hash_sort_8bit_bin: PUSH RBP MOV RBP,RSP LEA R9,[RSI + RDX*0x1] CMP RDX,0x15 JC 0x00130e74 MOV RDI,R9 AND RDI,-0x4 CMP RDI,RSI JBE 0x00130e74 LEA RDX,[RSI + 0x3] AND RDX,-0x4 LAB_00130e5c: MOV RAX,R9 MOV R10B,byte ptr [R9 + -0x1] CMP R9,RDI JBE 0x00130ed4 LEA R9,[RAX + -0x1] CMP R10B,0x20 JZ 0x00130e5c JMP 0x00130e77 LAB_00130e74: MOV RAX,R9 LAB_00130e77: MOV RDI,RAX SUB RDI,RSI LAB_00130e7d: MOV RDX,RAX MOV R9,RDI CMP RAX,RSI JBE 0x00130e96 LEA RAX,[RDX + -0x1] LEA RDI,[R9 + -0x1] CMP byte ptr [RDX + -0x1],0x20 JZ 0x00130e7d LAB_00130e96: MOV RAX,qword ptr [RCX] MOV RDI,qword ptr [R8] TEST R9,R9 JLE 0x00130ecc LAB_00130ea1: MOV R9D,EAX AND R9D,0x3f ADD R9,RDI MOVZX R10D,byte ptr [RSI] IMUL R10,R9 MOV R9,RAX SHL R9,0x8 ADD R9,R10 XOR RAX,R9 ADD RDI,0x3 INC RSI CMP RSI,RDX JC 0x00130ea1 LAB_00130ecc: MOV qword ptr [RCX],RAX MOV qword ptr [R8],RDI POP RBP RET LAB_00130ed4: CMP R10B,0x20 SETNZ R9B CMP RDX,RDI SETNC DIL OR DIL,R9B JNZ 0x00130e77 MOV RDI,RAX LAB_00130eeb: MOV RAX,RDI CMP RDI,RDX JBE 0x00130e77 LEA RDI,[RAX + -0x4] CMP dword ptr [RAX + -0x4],0x20202020 JZ 0x00130eeb JMP 0x00130e77
void my_hash_sort_8bit_bin (int8 param_1,byte *param_2,ulong param_3,ulong *param_4,long *param_5) { byte *pbVar1; byte *pbVar2; ulong uVar3; byte *pbVar4; long lVar5; long lVar6; pbVar2 = param_2 + param_3; if ((0x14 < param_3) && (pbVar4 = (byte *)((ulong)pbVar2 & 0xfffffffffffffffc), param_2 < pbVar4)) { pbVar1 = pbVar2; do { pbVar2 = pbVar1; if (pbVar2 <= pbVar4) { pbVar1 = pbVar2; if ((byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc) < pbVar4 && pbVar2[-1] == 0x20) goto LAB_00130eeb; break; } pbVar1 = pbVar2 + -1; } while (pbVar2[-1] == 0x20); } goto LAB_00130e77; while (pbVar1 = pbVar2 + -4, *(int *)(pbVar2 + -4) == 0x20202020) { LAB_00130eeb: pbVar2 = pbVar1; if (pbVar2 <= (byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc)) break; } LAB_00130e77: lVar6 = (long)pbVar2 - (long)param_2; do { lVar5 = lVar6; pbVar4 = pbVar2; if (pbVar4 <= param_2) break; pbVar2 = pbVar4 + -1; lVar6 = lVar5 + -1; } while (pbVar4[-1] == 0x20); uVar3 = *param_4; lVar6 = *param_5; if (0 < lVar5) { do { uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar6); lVar6 = lVar6 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar4); } *param_4 = uVar3; *param_5 = lVar6; return; }
49,577
translog_write_variable_record
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_variable_record(LSN *lsn, enum translog_record_type type, MARIA_HA *tbl_info, SHORT_TRANSACTION_ID short_trid, struct st_translog_parts *parts, TRN *trn, void *hook_arg) { struct st_translog_buffer *buffer_to_flush= NULL; uint header_length1= 1 + 2 + 2 + translog_variable_record_length_bytes(parts->record_length); ulong buffer_rest; uint page_rest; /* Max number of such LSNs per record is 2 */ uchar compressed_LSNs[MAX_NUMBER_OF_LSNS_PER_RECORD * COMPRESSED_LSN_MAX_STORE_SIZE]; my_bool res; DBUG_ENTER("translog_write_variable_record"); translog_lock(); DBUG_PRINT("info", ("horizon: " LSN_FMT, LSN_IN_PARTS(log_descriptor.horizon))); page_rest= TRANSLOG_PAGE_SIZE - log_descriptor.bc.current_page_fill; DBUG_PRINT("info", ("header length: %u page_rest: %u", header_length1, page_rest)); /* header and part which we should read have to fit in one chunk TODO: allow to divide readable header */ if (page_rest < (header_length1 + log_record_type_descriptor[type].read_header_len)) { DBUG_PRINT("info", ("Next page, size: %u header: %u + %u", log_descriptor.bc.current_page_fill, header_length1, log_record_type_descriptor[type].read_header_len)); translog_page_next(&log_descriptor.horizon, &log_descriptor.bc, &buffer_to_flush); /* Chunk 2 header is 1 byte, so full page capacity will be one uchar more */ page_rest= log_descriptor.page_capacity_chunk_2 + 1; DBUG_PRINT("info", ("page_rest: %u", page_rest)); } /* To minimize compressed size we will compress always relative to very first chunk address (log_descriptor.horizon for now) */ if (log_record_type_descriptor[type].compressed_LSN > 0) { translog_relative_LSN_encode(parts, log_descriptor.horizon, log_record_type_descriptor[type]. compressed_LSN, compressed_LSNs); /* recalculate header length after compression */ header_length1= 1 + 2 + 2 + translog_variable_record_length_bytes(parts->record_length); DBUG_PRINT("info", ("after compressing LSN(s) header length: %u " "record length: %lu", header_length1, (ulong)parts->record_length)); } /* TODO: check space on current page for header + few bytes */ if (page_rest >= parts->record_length + header_length1) { /* following function makes translog_unlock(); */ res= translog_write_variable_record_1chunk(lsn, type, tbl_info, short_trid, parts, buffer_to_flush, header_length1, trn, hook_arg); DBUG_RETURN(res); } buffer_rest= translog_get_current_group_size(); if (buffer_rest >= parts->record_length + header_length1 - page_rest) { /* following function makes translog_unlock(); */ res= translog_write_variable_record_1group(lsn, type, tbl_info, short_trid, parts, buffer_to_flush, header_length1, trn, hook_arg); DBUG_RETURN(res); } /* following function makes translog_unlock(); */ res= translog_write_variable_record_mgroup(lsn, type, tbl_info, short_trid, parts, buffer_to_flush, header_length1, buffer_rest, trn, hook_arg); DBUG_RETURN(res); }
O0
c
translog_write_variable_record: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0xa8, %rsp movw %cx, %ax movq 0x10(%rbp), %rcx movq %fs:0x28, %rcx movq %rcx, -0x10(%rbp) movq %rdi, -0x40(%rbp) movl %esi, -0x44(%rbp) movq %rdx, -0x50(%rbp) movw %ax, -0x52(%rbp) movq %r8, -0x60(%rbp) movq %r9, -0x68(%rbp) movq $0x0, -0x70(%rbp) movq -0x60(%rbp), %rax movl (%rax), %edi callq 0x37a70 addl $0x5, %eax movl %eax, -0x74(%rbp) callq 0x2e150 jmp 0x32737 movzwl 0xc471b2(%rip), %ecx # 0xc798f0 movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movl %eax, -0x84(%rbp) jmp 0x3274d movl -0x84(%rbp), %eax movl -0x74(%rbp), %ecx movl -0x44(%rbp), %edx movl %edx, %esi leaq 0x44530e(%rip), %rdx # 0x477a70 imulq $0x48, %rsi, %rsi addq %rsi, %rdx movzwl 0x6(%rdx), %edx addl %edx, %ecx cmpl %ecx, %eax jae 0x327ac jmp 0x32775 jmp 0x32777 leaq 0x4464f2(%rip), %rsi # 0x478c70 movq %rsi, %rdi addq $0x800c48, %rdi # imm = 0x800C48 addq $0x800c50, %rsi # imm = 0x800C50 leaq -0x70(%rbp), %rdx callq 0x37ac0 movzwl 0x4464f7(%rip), %eax # 0x478c96 addl $0x1, %eax movl %eax, -0x84(%rbp) jmp 0x327aa jmp 0x327ac movl -0x44(%rbp), %eax movl %eax, %ecx leaq 0x4452b8(%rip), %rax # 0x477a70 imulq $0x48, %rcx, %rcx addq %rcx, %rax movswl 0x20(%rax), %eax cmpl $0x0, %eax jle 0x32808 movq -0x60(%rbp), %rdi movq 0xc470e5(%rip), %rsi # 0xc798b8 movl -0x44(%rbp), %eax movl %eax, %ecx leaq 0x445291(%rip), %rax # 0x477a70 imulq $0x48, %rcx, %rcx addq %rcx, %rax movswl 0x20(%rax), %edx leaq -0x30(%rbp), %rcx callq 0x37bc0 movq -0x60(%rbp), %rax movl (%rax), %edi callq 0x37a70 addl $0x5, %eax movl %eax, -0x74(%rbp) jmp 0x32806 jmp 0x32808 movl -0x84(%rbp), %eax movq -0x60(%rbp), %rcx movl (%rcx), %ecx addl -0x74(%rbp), %ecx cmpl %ecx, %eax jb 0x3286f movq -0x40(%rbp), %rdi movl -0x44(%rbp), %esi movq -0x50(%rbp), %rdx movw -0x52(%rbp), %cx movq -0x60(%rbp), %r8 movq -0x70(%rbp), %r9 movl -0x74(%rbp), %eax movw %ax, %r11w movq -0x68(%rbp), %r10 movq 0x10(%rbp), %rax movzwl %cx, %ecx movzwl %r11w, %r11d movl %r11d, (%rsp) movq %r10, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x37ee0 movb %al, -0x85(%rbp) movb -0x85(%rbp), %al movb %al, -0x31(%rbp) jmp 0x3293d callq 0x39880 movl %eax, %eax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movq -0x60(%rbp), %rcx movl (%rcx), %ecx addl -0x74(%rbp), %ecx subl -0x84(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jb 0x328e5 movq -0x40(%rbp), %rdi movl -0x44(%rbp), %esi movq -0x50(%rbp), %rdx movw -0x52(%rbp), %cx movq -0x60(%rbp), %r8 movq -0x70(%rbp), %r9 movl -0x74(%rbp), %eax movw %ax, %r11w movq -0x68(%rbp), %r10 movq 0x10(%rbp), %rax movzwl %cx, %ecx movzwl %r11w, %r11d movl %r11d, (%rsp) movq %r10, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x38080 movb %al, -0x85(%rbp) movb -0x85(%rbp), %al movb %al, -0x31(%rbp) jmp 0x3293d movq -0x40(%rbp), %rdi movl -0x44(%rbp), %esi movq -0x50(%rbp), %rdx movw -0x52(%rbp), %cx movq -0x60(%rbp), %r8 movq -0x70(%rbp), %r9 movl -0x74(%rbp), %eax movw %ax, %bx movq -0x80(%rbp), %rax movl %eax, %r11d movq -0x68(%rbp), %r10 movq 0x10(%rbp), %rax movzwl %cx, %ecx movzwl %bx, %ebx movl %ebx, (%rsp) movl %r11d, 0x8(%rsp) movq %r10, 0x10(%rsp) movq %rax, 0x18(%rsp) callq 0x38460 movb %al, -0x85(%rbp) movb -0x85(%rbp), %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al movb %al, -0x86(%rbp) movq %fs:0x28, %rax movq -0x10(%rbp), %rcx cmpq %rcx, %rax jne 0x32968 movb -0x86(%rbp), %al addq $0xa8, %rsp popq %rbx popq %rbp retq callq 0x2a250 nopl (%rax)
translog_write_variable_record: push rbp mov rbp, rsp push rbx sub rsp, 0A8h mov ax, cx mov rcx, [rbp+arg_0] mov rcx, fs:28h mov [rbp+var_10], rcx mov [rbp+var_40], rdi mov [rbp+var_44], esi mov [rbp+var_50], rdx mov [rbp+var_52], ax mov [rbp+var_60], r8 mov [rbp+var_68], r9 mov [rbp+var_70], 0 mov rax, [rbp+var_60] mov edi, [rax] call translog_variable_record_length_bytes add eax, 5 mov [rbp+var_74], eax call translog_lock jmp short $+2 loc_32737: movzx ecx, cs:word_C798F0 mov eax, 2000h sub eax, ecx mov [rbp+var_84], eax jmp short $+2 loc_3274D: mov eax, [rbp+var_84] mov ecx, [rbp+var_74] mov edx, [rbp+var_44] mov esi, edx lea rdx, log_record_type_descriptor imul rsi, 48h ; 'H' add rdx, rsi movzx edx, word ptr [rdx+6] add ecx, edx cmp eax, ecx jnb short loc_327AC jmp short $+2 loc_32775: jmp short $+2 loc_32777: lea rsi, log_descriptor mov rdi, rsi add rdi, 800C48h add rsi, 800C50h lea rdx, [rbp+var_70] call translog_page_next movzx eax, cs:word_478C96 add eax, 1 mov [rbp+var_84], eax jmp short $+2 loc_327AA: jmp short $+2 loc_327AC: mov eax, [rbp+var_44] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movsx eax, word ptr [rax+20h] cmp eax, 0 jle short loc_32808 mov rdi, [rbp+var_60] mov rsi, cs:qword_C798B8 mov eax, [rbp+var_44] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movsx edx, word ptr [rax+20h] lea rcx, [rbp+var_30] call translog_relative_LSN_encode mov rax, [rbp+var_60] mov edi, [rax] call translog_variable_record_length_bytes add eax, 5 mov [rbp+var_74], eax jmp short $+2 loc_32806: jmp short $+2 loc_32808: mov eax, [rbp+var_84] mov rcx, [rbp+var_60] mov ecx, [rcx] add ecx, [rbp+var_74] cmp eax, ecx jb short loc_3286F mov rdi, [rbp+var_40] mov esi, [rbp+var_44] mov rdx, [rbp+var_50] mov cx, [rbp+var_52] mov r8, [rbp+var_60] mov r9, [rbp+var_70] mov eax, [rbp+var_74] mov r11w, ax mov r10, [rbp+var_68] mov rax, [rbp+arg_0] movzx ecx, cx movzx r11d, r11w mov [rsp+0B0h+var_B0], r11d mov [rsp+0B0h+var_A8], r10 mov [rsp+0B0h+var_A0], rax call translog_write_variable_record_1chunk mov [rbp+var_85], al mov al, [rbp+var_85] mov [rbp+var_31], al jmp loc_3293D loc_3286F: call translog_get_current_group_size mov eax, eax mov [rbp+var_80], rax mov rax, [rbp+var_80] mov rcx, [rbp+var_60] mov ecx, [rcx] add ecx, [rbp+var_74] sub ecx, [rbp+var_84] mov ecx, ecx cmp rax, rcx jb short loc_328E5 mov rdi, [rbp+var_40] mov esi, [rbp+var_44] mov rdx, [rbp+var_50] mov cx, [rbp+var_52] mov r8, [rbp+var_60] mov r9, [rbp+var_70] mov eax, [rbp+var_74] mov r11w, ax mov r10, [rbp+var_68] mov rax, [rbp+arg_0] movzx ecx, cx movzx r11d, r11w mov [rsp+0B0h+var_B0], r11d mov [rsp+0B0h+var_A8], r10 mov [rsp+0B0h+var_A0], rax call translog_write_variable_record_1group mov [rbp+var_85], al mov al, [rbp+var_85] mov [rbp+var_31], al jmp short loc_3293D loc_328E5: mov rdi, [rbp+var_40] mov esi, [rbp+var_44] mov rdx, [rbp+var_50] mov cx, [rbp+var_52] mov r8, [rbp+var_60] mov r9, [rbp+var_70] mov eax, [rbp+var_74] mov bx, ax mov rax, [rbp+var_80] mov r11d, eax mov r10, [rbp+var_68] mov rax, [rbp+arg_0] movzx ecx, cx movzx ebx, bx mov [rsp+0B0h+var_B0], ebx mov dword ptr [rsp+0B0h+var_A8], r11d mov [rsp+0B0h+var_A0], r10 mov [rsp+0B0h+var_98], rax call translog_write_variable_record_mgroup mov [rbp+var_85], al mov al, [rbp+var_85] mov [rbp+var_31], al loc_3293D: mov al, [rbp+var_31] mov [rbp+var_86], al mov rax, fs:28h mov rcx, [rbp+var_10] cmp rax, rcx jnz short loc_32968 mov al, [rbp+var_86] add rsp, 0A8h pop rbx pop rbp retn loc_32968: call ___stack_chk_fail
char translog_write_variable_record( long long a1, int a2, long long a3, unsigned __int16 a4, unsigned int *a5, long long a6, long long a7) { unsigned int v8; // [rsp+2Ch] [rbp-84h] unsigned long long current_group_size; // [rsp+30h] [rbp-80h] _BYTE v10[12]; // [rsp+3Ch] [rbp-74h] BYREF long long v11; // [rsp+48h] [rbp-68h] _DWORD *v12; // [rsp+50h] [rbp-60h] unsigned __int16 v13; // [rsp+5Eh] [rbp-52h] long long v14; // [rsp+60h] [rbp-50h] int v15; // [rsp+6Ch] [rbp-44h] long long v16; // [rsp+70h] [rbp-40h] _BYTE v18[32]; // [rsp+80h] [rbp-30h] BYREF unsigned long long v19; // [rsp+A0h] [rbp-10h] v19 = __readfsqword(0x28u); v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; v11 = a6; *(_QWORD *)&v10[4] = 0LL; *(_QWORD *)v10 = (unsigned int)translog_variable_record_length_bytes(*a5) + 5; translog_lock(); v8 = 0x2000 - (unsigned __int16)word_C798F0; if ( v8 < (unsigned int)HIWORD(log_record_type_descriptor[18 * a2 + 1]) + *(_DWORD *)v10 ) { translog_page_next(&log_descriptor[1048969], &log_descriptor[1048970], &v10[4]); v8 = (unsigned __int16)word_478C96 + 1; } if ( SLOWORD(log_record_type_descriptor[18 * v15 + 8]) > 0 ) { translog_relative_LSN_encode( v12, qword_C798B8, (unsigned int)SLOWORD(log_record_type_descriptor[18 * v15 + 8]), v18); *(_DWORD *)v10 = translog_variable_record_length_bytes((unsigned int)*v12) + 5; } if ( v8 >= *(_DWORD *)v10 + *v12 ) return translog_write_variable_record_1chunk( v16, v15, v14, v13, (_DWORD)v12, *(_DWORD *)&v10[4], *(__int16 *)v10, v11, a7); current_group_size = (unsigned int)translog_get_current_group_size(); if ( current_group_size < *(_DWORD *)v10 + *v12 - v8 ) return translog_write_variable_record_mgroup( v16, v15, v14, v13, (_DWORD)v12, *(_DWORD *)&v10[4], *(__int16 *)v10, current_group_size, v11, a7); else return translog_write_variable_record_1group( v16, v15, v14, v13, (_DWORD)v12, *(_DWORD *)&v10[4], *(__int16 *)v10, v11, a7); }
translog_write_variable_record: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xa8 MOV AX,CX MOV RCX,qword ptr [RBP + 0x10] MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RCX MOV qword ptr [RBP + -0x40],RDI MOV dword ptr [RBP + -0x44],ESI MOV qword ptr [RBP + -0x50],RDX MOV word ptr [RBP + -0x52],AX MOV qword ptr [RBP + -0x60],R8 MOV qword ptr [RBP + -0x68],R9 MOV qword ptr [RBP + -0x70],0x0 MOV RAX,qword ptr [RBP + -0x60] MOV EDI,dword ptr [RAX] CALL 0x00137a70 ADD EAX,0x5 MOV dword ptr [RBP + -0x74],EAX CALL 0x0012e150 JMP 0x00132737 LAB_00132737: MOVZX ECX,word ptr [0x00d798f0] MOV EAX,0x2000 SUB EAX,ECX MOV dword ptr [RBP + -0x84],EAX JMP 0x0013274d LAB_0013274d: MOV EAX,dword ptr [RBP + -0x84] MOV ECX,dword ptr [RBP + -0x74] MOV EDX,dword ptr [RBP + -0x44] MOV ESI,EDX LEA RDX,[0x577a70] IMUL RSI,RSI,0x48 ADD RDX,RSI MOVZX EDX,word ptr [RDX + 0x6] ADD ECX,EDX CMP EAX,ECX JNC 0x001327ac JMP 0x00132775 LAB_00132775: JMP 0x00132777 LAB_00132777: LEA RSI,[0x578c70] MOV RDI,RSI ADD RDI,0x800c48 ADD RSI,0x800c50 LEA RDX,[RBP + -0x70] CALL 0x00137ac0 MOVZX EAX,word ptr [0x00578c96] ADD EAX,0x1 MOV dword ptr [RBP + -0x84],EAX JMP 0x001327aa LAB_001327aa: JMP 0x001327ac LAB_001327ac: MOV EAX,dword ptr [RBP + -0x44] MOV ECX,EAX LEA RAX,[0x577a70] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVSX EAX,word ptr [RAX + 0x20] CMP EAX,0x0 JLE 0x00132808 MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [0x00d798b8] MOV EAX,dword ptr [RBP + -0x44] MOV ECX,EAX LEA RAX,[0x577a70] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVSX EDX,word ptr [RAX + 0x20] LEA RCX,[RBP + -0x30] CALL 0x00137bc0 MOV RAX,qword ptr [RBP + -0x60] MOV EDI,dword ptr [RAX] CALL 0x00137a70 ADD EAX,0x5 MOV dword ptr [RBP + -0x74],EAX JMP 0x00132806 LAB_00132806: JMP 0x00132808 LAB_00132808: MOV EAX,dword ptr [RBP + -0x84] MOV RCX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RCX] ADD ECX,dword ptr [RBP + -0x74] CMP EAX,ECX JC 0x0013286f MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x50] MOV CX,word ptr [RBP + -0x52] MOV R8,qword ptr [RBP + -0x60] MOV R9,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x74] MOV R11W,AX MOV R10,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + 0x10] MOVZX ECX,CX MOVZX R11D,R11W MOV dword ptr [RSP],R11D MOV qword ptr [RSP + 0x8],R10 MOV qword ptr [RSP + 0x10],RAX CALL 0x00137ee0 MOV byte ptr [RBP + -0x85],AL MOV AL,byte ptr [RBP + -0x85] MOV byte ptr [RBP + -0x31],AL JMP 0x0013293d LAB_0013286f: CALL 0x00139880 MOV EAX,EAX MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RCX] ADD ECX,dword ptr [RBP + -0x74] SUB ECX,dword ptr [RBP + -0x84] MOV ECX,ECX CMP RAX,RCX JC 0x001328e5 MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x50] MOV CX,word ptr [RBP + -0x52] MOV R8,qword ptr [RBP + -0x60] MOV R9,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x74] MOV R11W,AX MOV R10,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + 0x10] MOVZX ECX,CX MOVZX R11D,R11W MOV dword ptr [RSP],R11D MOV qword ptr [RSP + 0x8],R10 MOV qword ptr [RSP + 0x10],RAX CALL 0x00138080 MOV byte ptr [RBP + -0x85],AL MOV AL,byte ptr [RBP + -0x85] MOV byte ptr [RBP + -0x31],AL JMP 0x0013293d LAB_001328e5: MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x50] MOV CX,word ptr [RBP + -0x52] MOV R8,qword ptr [RBP + -0x60] MOV R9,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x74] MOV BX,AX MOV RAX,qword ptr [RBP + -0x80] MOV R11D,EAX MOV R10,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + 0x10] MOVZX ECX,CX MOVZX EBX,BX MOV dword ptr [RSP],EBX MOV dword ptr [RSP + 0x8],R11D MOV qword ptr [RSP + 0x10],R10 MOV qword ptr [RSP + 0x18],RAX CALL 0x00138460 MOV byte ptr [RBP + -0x85],AL MOV AL,byte ptr [RBP + -0x85] MOV byte ptr [RBP + -0x31],AL LAB_0013293d: MOV AL,byte ptr [RBP + -0x31] MOV byte ptr [RBP + -0x86],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,RCX JNZ 0x00132968 MOV AL,byte ptr [RBP + -0x86] ADD RSP,0xa8 POP RBX POP RBP RET LAB_00132968: CALL 0x0012a250
int8 translog_write_variable_record (int8 param_1,uint param_2,int8 param_3,int2 param_4,int *param_5, int8 param_6,int8 param_7) { int iVar1; uint uVar2; long in_FS_OFFSET; int8 in_stack_ffffffffffffff50; int4 uVar3; uint local_8c; uint local_7c; int8 local_78; int8 local_70; int *local_68; int2 local_5a; int8 local_58; uint local_4c; int8 local_48; int1 local_39; int1 local_38 [32]; long local_18; uVar3 = (int4)((ulong)in_stack_ffffffffffffff50 >> 0x20); local_18 = *(long *)(in_FS_OFFSET + 0x28); local_78 = 0; local_70 = param_6; local_68 = param_5; local_5a = param_4; local_58 = param_3; local_4c = param_2; local_48 = param_1; iVar1 = translog_variable_record_length_bytes(*param_5); local_7c = iVar1 + 5; translog_lock(); local_8c = 0x2000 - DAT_00d798f0; if (local_8c < local_7c + *(ushort *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 6)) { translog_page_next(&DAT_00d798b8,&DAT_00d798c0,&local_78); local_8c = DAT_00578c96 + 1; } if (0 < *(short *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 0x20)) { translog_relative_LSN_encode (local_68,DAT_00d798b8, (int)*(short *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 0x20),local_38) ; iVar1 = translog_variable_record_length_bytes(*local_68); local_7c = iVar1 + 5; } if (local_8c < *local_68 + local_7c) { uVar2 = translog_get_current_group_size(); if (uVar2 < (*local_68 + local_7c) - local_8c) { local_39 = translog_write_variable_record_mgroup (local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff, CONCAT44(uVar3,uVar2),local_70,param_7); } else { local_39 = translog_write_variable_record_1group (local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff, local_70,param_7); } } else { local_39 = translog_write_variable_record_1chunk (local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff, local_70,param_7); } if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_39); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,578
mysql_server_init
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) { #ifdef _WIN32 BOOL ret = InitOnceExecuteOnce(&init_once, win_init_once, NULL, NULL); return ret? 0: 1; #else return pthread_once(&init_once, mysql_once_init); #endif }
O0
c
mysql_server_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x3ab7ce(%rip), %rdi # 0x3e8e38 leaq 0x809f(%rip), %rsi # 0x45710 callq 0x36290 addq $0x20, %rsp popq %rbp retq nopl (%rax)
mysql_server_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rdi, init_once lea rsi, mysql_once_init call _pthread_once add rsp, 20h pop rbp retn
long long mysql_server_init() { return pthread_once(&init_once, mysql_once_init); }
mysql_server_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RDI,[0x4e8e38] LEA RSI,[0x145710] CALL 0x00136290 ADD RSP,0x20 POP RBP RET
void mysql_server_init(void) { pthread_once(&init_once,mysql_once_init); return; }
49,579
my_wildcmp_bin_impl
eloqsql/strings/ctype-bin.c
static int my_wildcmp_bin_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, int recurse_level) { int result= -1; /* Not found, using wildcards */ if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (*wildstr != w_many && *wildstr != w_one) { if (*wildstr == escape && wildstr+1 != wildend) wildstr++; if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) return(1); /* No match */ if (wildstr == wildend) return(str != str_end); /* Match if both are at end */ result=1; /* Found an anchor char */ } if (*wildstr == w_one) { do { if (str == str_end) /* Skip one char if possible */ return(result); INC_PTR(cs,str,str_end); } while (++wildstr < wildend && *wildstr == w_one); if (wildstr == wildend) break; } if (*wildstr == w_many) { /* Found w_many */ uchar cmp; wildstr++; /* Remove any '%' and '_' from the wild search string */ for (; wildstr != wildend ; wildstr++) { if (*wildstr == w_many) continue; if (*wildstr == w_one) { if (str == str_end) return(-1); INC_PTR(cs,str,str_end); continue; } break; /* Not a wild character */ } if (wildstr == wildend) return(0); /* match if w_many is last */ if (str == str_end) return(-1); if ((cmp= *wildstr) == escape && wildstr+1 != wildend) cmp= *++wildstr; INC_PTR(cs,wildstr,wildend); /* This is compared through cmp */ cmp=likeconv(cs,cmp); do { while (str != str_end && (uchar) likeconv(cs,*str) != cmp) str++; if (str++ == str_end) return(-1); { int tmp=my_wildcmp_bin_impl(cs,str,str_end,wildstr,wildend,escape,w_one, w_many, recurse_level + 1); if (tmp <= 0) return(tmp); } } while (str != str_end); return(-1); } } return(str != str_end ? 1 : 0); }
O3
c
my_wildcmp_bin_impl: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, %r15d movq %rcx, %r13 movq %rdx, %rbx movq %rdi, %r12 movl 0x18(%rbp), %r10d leaq 0x341b56(%rip), %rax # 0x37a110 movq (%rax), %rax testq %rax, %rax je 0x385ed movl %r10d, %edi movq %rsi, %r14 movl %r15d, -0x30(%rbp) movl %r8d, %r15d callq *%rax movl 0x18(%rbp), %r10d movl %r15d, %r8d movl -0x30(%rbp), %r15d movq %r14, %rsi movl $0x1, %r14d testl %eax, %eax jne 0x386f9 movl 0x10(%rbp), %r11d movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpq %r13, %rbx je 0x386ef movb (%rbx), %al movsbl %al, %ecx cmpl %r11d, %ecx sete %dil cmpl %r15d, %ecx sete %dl orb %dl, %dil je 0x38660 testb %dl, %dl je 0x38656 incq %rbx movq %rbx, %rax cmpq %rsi, %r12 je 0x386f9 movq %r12, %rcx movq %rax, %rbx cmpq %r13, %rax jae 0x38645 leaq 0x1(%rcx), %r12 movsbl (%rbx), %edx leaq 0x1(%rbx), %rax cmpl %r15d, %edx je 0x38621 incq %rcx cmpq %r13, %rbx je 0x386ec movb (%rbx), %al movq %rcx, %r12 movsbl %al, %eax cmpl %r11d, %eax jne 0x385f7 jmp 0x386b2 movl $0x1, %r14d cmpq %rsi, %r12 je 0x386f9 leaq 0x1(%rbx), %rax cmpq %r13, %rax cmoveq %rbx, %rax cmpl %r8d, %ecx cmoveq %rax, %rbx movb (%rbx), %al cmpb (%r12), %al jne 0x386f9 incq %r12 incq %rbx cmpq %r13, %rbx je 0x386ef movb (%rbx), %al movsbl %al, %ecx cmpl %r15d, %ecx sete %dl cmpl %r11d, %ecx je 0x38617 cmpl %r15d, %ecx jne 0x38660 jmp 0x38617 leaq 0x1(%rbx), %rax xorl %r14d, %r14d cmpq %r13, %rax je 0x386f9 addq $0x2, %rbx movb -0x1(%rbx), %cl movsbl %cl, %eax cmpl %r11d, %eax je 0x386de cmpl %r15d, %eax jne 0x3870b cmpq %rsi, %r12 je 0x38791 incq %r12 leaq 0x1(%rbx), %rax cmpq %r13, %rbx movq %rax, %rbx jne 0x386c2 jmp 0x386f9 movq %rcx, %r12 xorl %r14d, %r14d cmpq %rsi, %r12 setne %r14b movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpq %rsi, %r12 je 0x386f9 movzbl %cl, %eax leaq -0x1(%rbx), %rdx cmpl %r8d, %eax jne 0x3872c cmpq %r13, %rbx je 0x3872c movb (%rbx), %cl movq %rbx, %rdx incq %rdx incl %r10d cmpq %rsi, %r12 je 0x386f9 cmpb %cl, (%r12) je 0x38742 incq %r12 jmp 0x38732 movb %cl, -0x29(%rbp) incq %r12 movq %r12, %rdi movq %rdx, -0x38(%rbp) movq %r13, %rcx movq %rsi, %rbx movl %r8d, -0x30(%rbp) movl %r15d, %r9d movq %r10, -0x40(%rbp) pushq %r10 pushq %r11 callq 0x38592 addq $0x10, %rsp testl %eax, %eax jle 0x3879c cmpq %rbx, %r12 movq %rbx, %rsi movl -0x30(%rbp), %r8d movq -0x40(%rbp), %r10 movl 0x10(%rbp), %r11d movb -0x29(%rbp), %cl movq -0x38(%rbp), %rdx jne 0x38732 jmp 0x386f9 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x386f9 movl %eax, %r14d jmp 0x386f9
my_wildcmp_bin_impl: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15d, r9d mov r13, rcx mov rbx, rdx mov r12, rdi mov r10d, [rbp+arg_8] lea rax, my_string_stack_guard mov rax, [rax] test rax, rax jz short loc_385ED mov edi, r10d mov r14, rsi mov [rbp+var_30], r15d mov r15d, r8d call rax mov r10d, [rbp+arg_8] mov r8d, r15d mov r15d, [rbp+var_30] mov rsi, r14 mov r14d, 1 test eax, eax jnz loc_386F9 loc_385ED: mov r11d, [rbp+arg_0] mov r14d, 0FFFFFFFFh loc_385F7: cmp rbx, r13 jz loc_386EF mov al, [rbx] movsx ecx, al cmp ecx, r11d setz dil cmp ecx, r15d setz dl or dil, dl jz short loc_38660 loc_38617: test dl, dl jz short loc_38656 inc rbx mov rax, rbx loc_38621: cmp r12, rsi jz loc_386F9 mov rcx, r12 mov rbx, rax cmp rax, r13 jnb short loc_38645 lea r12, [rcx+1] movsx edx, byte ptr [rbx] lea rax, [rbx+1] cmp edx, r15d jz short loc_38621 loc_38645: inc rcx cmp rbx, r13 jz loc_386EC mov al, [rbx] mov r12, rcx loc_38656: movsx eax, al cmp eax, r11d jnz short loc_385F7 jmp short loc_386B2 loc_38660: mov r14d, 1 cmp r12, rsi jz loc_386F9 lea rax, [rbx+1] cmp rax, r13 cmovz rax, rbx cmp ecx, r8d cmovz rbx, rax mov al, [rbx] cmp al, [r12] jnz short loc_386F9 inc r12 inc rbx cmp rbx, r13 jz short loc_386EF mov al, [rbx] movsx ecx, al cmp ecx, r15d setz dl cmp ecx, r11d jz loc_38617 cmp ecx, r15d jnz short loc_38660 jmp loc_38617 loc_386B2: lea rax, [rbx+1] xor r14d, r14d cmp rax, r13 jz short loc_386F9 add rbx, 2 loc_386C2: mov cl, [rbx-1] movsx eax, cl cmp eax, r11d jz short loc_386DE cmp eax, r15d jnz short loc_3870B cmp r12, rsi jz loc_38791 inc r12 loc_386DE: lea rax, [rbx+1] cmp rbx, r13 mov rbx, rax jnz short loc_386C2 jmp short loc_386F9 loc_386EC: mov r12, rcx loc_386EF: xor r14d, r14d cmp r12, rsi setnz r14b loc_386F9: mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3870B: mov r14d, 0FFFFFFFFh cmp r12, rsi jz short loc_386F9 movzx eax, cl lea rdx, [rbx-1] cmp eax, r8d jnz short loc_3872C cmp rbx, r13 jz short loc_3872C mov cl, [rbx] mov rdx, rbx loc_3872C: inc rdx inc r10d loc_38732: cmp r12, rsi jz short loc_386F9 cmp [r12], cl jz short loc_38742 inc r12 jmp short loc_38732 loc_38742: mov [rbp+var_29], cl inc r12 mov rdi, r12 mov [rbp+var_38], rdx mov rcx, r13 mov rbx, rsi mov [rbp+var_30], r8d mov r9d, r15d mov [rbp+var_40], r10 push r10 push r11 call my_wildcmp_bin_impl add rsp, 10h test eax, eax jle short loc_3879C cmp r12, rbx mov rsi, rbx mov r8d, [rbp+var_30] mov r10, [rbp+var_40] mov r11d, [rbp+arg_0] mov cl, [rbp+var_29] mov rdx, [rbp+var_38] jnz short loc_38732 jmp loc_386F9 loc_38791: mov r14d, 0FFFFFFFFh jmp loc_386F9 loc_3879C: mov r14d, eax jmp loc_386F9
long long my_wildcmp_bin_impl( _BYTE *a1, _BYTE *a2, char *a3, char *a4, int a5, int a6, int a7, unsigned int a8) { int v8; // r15d unsigned int v12; // r10d int v13; // r15d int v14; // eax unsigned int v15; // r14d int v16; // r11d char v17; // al int v18; // ecx bool v19; // dl char *v20; // rax _BYTE *v21; // rcx int v22; // edx _BYTE *v23; // rcx char *v24; // rax char *v25; // rbx unsigned __int8 v26; // cl char *v29; // rdx _BYTE *v30; // rdx long long v31; // r10 int v32; // eax long long v33; // [rsp+0h] [rbp-40h] _BYTE *v34; // [rsp+8h] [rbp-38h] int v36; // [rsp+10h] [rbp-30h] unsigned __int8 v37; // [rsp+17h] [rbp-29h] v8 = a6; v12 = a8; if ( my_string_stack_guard ) { v13 = a5; v14 = my_string_stack_guard(a8); v12 = a8; a5 = v13; v8 = a6; v15 = 1; if ( v14 ) return v15; } v16 = a7; v15 = -1; do { if ( a3 == a4 ) return a1 != a2; v17 = *a3; v18 = *a3; v19 = v18 == v8; if ( v18 != v8 && v18 != a7 ) { do { v15 = 1; if ( a1 == a2 ) return v15; v24 = a3 + 1; if ( a3 + 1 == a4 ) v24 = a3; if ( v18 == a5 ) a3 = v24; if ( *a3 != *a1 ) return v15; ++a1; if ( ++a3 == a4 ) return a1 != a2; v17 = *a3; v18 = *a3; v19 = v18 == v8; } while ( v18 != a7 && v18 != v8 ); } if ( v19 ) { v20 = a3 + 1; do { if ( a1 == a2 ) return v15; v21 = a1; a3 = v20; if ( v20 >= a4 ) break; ++a1; v22 = *v20++; } while ( v22 == v8 ); v23 = v21 + 1; if ( a3 == a4 ) { a1 = v23; return a1 != a2; } v17 = *a3; a1 = v23; } } while ( v17 != a7 ); v15 = 0; if ( a3 + 1 == a4 ) return v15; v25 = a3 + 2; while ( 1 ) { v26 = *(v25 - 1); if ( (char)v26 == a7 ) goto LABEL_31; if ( (char)v26 != v8 ) break; if ( a1 == a2 ) return (unsigned int)-1; ++a1; LABEL_31: if ( v25++ == a4 ) return v15; } v15 = -1; if ( a1 != a2 ) { v29 = v25 - 1; if ( v26 == a5 && v25 != a4 ) { v26 = *v25; v29 = v25; } v30 = v29 + 1; v31 = v12 + 1; while ( a1 != a2 ) { if ( *a1 == v26 ) { v37 = v26; ++a1; v34 = v30; v36 = a5; v33 = v31; v32 = my_wildcmp_bin_impl((_DWORD)a1, (_DWORD)a2, (_DWORD)v30, (_DWORD)a4, a5, v8, v16, v31); if ( v32 <= 0 ) return (unsigned int)v32; a5 = v36; v31 = v33; v16 = a7; v26 = v37; v30 = v34; if ( a1 == a2 ) return v15; } else { ++a1; } } } return v15; }
my_wildcmp_bin_impl: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15D,R9D MOV R13,RCX MOV RBX,RDX MOV R12,RDI MOV R10D,dword ptr [RBP + 0x18] LEA RAX,[0x47a110] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001385ed MOV EDI,R10D MOV R14,RSI MOV dword ptr [RBP + -0x30],R15D MOV R15D,R8D CALL RAX MOV R10D,dword ptr [RBP + 0x18] MOV R8D,R15D MOV R15D,dword ptr [RBP + -0x30] MOV RSI,R14 MOV R14D,0x1 TEST EAX,EAX JNZ 0x001386f9 LAB_001385ed: MOV R11D,dword ptr [RBP + 0x10] MOV R14D,0xffffffff LAB_001385f7: CMP RBX,R13 JZ 0x001386ef MOV AL,byte ptr [RBX] MOVSX ECX,AL CMP ECX,R11D SETZ DIL CMP ECX,R15D SETZ DL OR DIL,DL JZ 0x00138660 LAB_00138617: TEST DL,DL JZ 0x00138656 INC RBX MOV RAX,RBX LAB_00138621: CMP R12,RSI JZ 0x001386f9 MOV RCX,R12 MOV RBX,RAX CMP RAX,R13 JNC 0x00138645 LEA R12,[RCX + 0x1] MOVSX EDX,byte ptr [RBX] LEA RAX,[RBX + 0x1] CMP EDX,R15D JZ 0x00138621 LAB_00138645: INC RCX CMP RBX,R13 JZ 0x001386ec MOV AL,byte ptr [RBX] MOV R12,RCX LAB_00138656: MOVSX EAX,AL CMP EAX,R11D JNZ 0x001385f7 JMP 0x001386b2 LAB_00138660: MOV R14D,0x1 CMP R12,RSI JZ 0x001386f9 LEA RAX,[RBX + 0x1] CMP RAX,R13 CMOVZ RAX,RBX CMP ECX,R8D CMOVZ RBX,RAX MOV AL,byte ptr [RBX] CMP AL,byte ptr [R12] JNZ 0x001386f9 INC R12 INC RBX CMP RBX,R13 JZ 0x001386ef MOV AL,byte ptr [RBX] MOVSX ECX,AL CMP ECX,R15D SETZ DL CMP ECX,R11D JZ 0x00138617 CMP ECX,R15D JNZ 0x00138660 JMP 0x00138617 LAB_001386b2: LEA RAX,[RBX + 0x1] XOR R14D,R14D CMP RAX,R13 JZ 0x001386f9 ADD RBX,0x2 LAB_001386c2: MOV CL,byte ptr [RBX + -0x1] MOVSX EAX,CL CMP EAX,R11D JZ 0x001386de CMP EAX,R15D JNZ 0x0013870b CMP R12,RSI JZ 0x00138791 INC R12 LAB_001386de: LEA RAX,[RBX + 0x1] CMP RBX,R13 MOV RBX,RAX JNZ 0x001386c2 JMP 0x001386f9 LAB_001386ec: MOV R12,RCX LAB_001386ef: XOR R14D,R14D CMP R12,RSI SETNZ R14B LAB_001386f9: MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013870b: MOV R14D,0xffffffff CMP R12,RSI JZ 0x001386f9 MOVZX EAX,CL LEA RDX,[RBX + -0x1] CMP EAX,R8D JNZ 0x0013872c CMP RBX,R13 JZ 0x0013872c MOV CL,byte ptr [RBX] MOV RDX,RBX LAB_0013872c: INC RDX INC R10D LAB_00138732: CMP R12,RSI JZ 0x001386f9 CMP byte ptr [R12],CL JZ 0x00138742 INC R12 JMP 0x00138732 LAB_00138742: MOV byte ptr [RBP + -0x29],CL INC R12 MOV RDI,R12 MOV qword ptr [RBP + -0x38],RDX MOV RCX,R13 MOV RBX,RSI MOV dword ptr [RBP + -0x30],R8D MOV R9D,R15D MOV qword ptr [RBP + -0x40],R10 PUSH R10 PUSH R11 CALL 0x00138592 ADD RSP,0x10 TEST EAX,EAX JLE 0x0013879c CMP R12,RBX MOV RSI,RBX MOV R8D,dword ptr [RBP + -0x30] MOV R10,qword ptr [RBP + -0x40] MOV R11D,dword ptr [RBP + 0x10] MOV CL,byte ptr [RBP + -0x29] MOV RDX,qword ptr [RBP + -0x38] JNZ 0x00138732 JMP 0x001386f9 LAB_00138791: MOV R14D,0xffffffff JMP 0x001386f9 LAB_0013879c: MOV R14D,EAX JMP 0x001386f9
uint my_wildcmp_bin_impl(byte *param_1,byte *param_2,byte *param_3,byte *param_4,ulong param_5, uint param_6,uint param_7,int param_8) { byte bVar1; int iVar2; uint uVar3; byte *pbVar4; uint uVar5; byte *pbVar6; ulong uVar7; bool bVar8; if (my_string_stack_guard != (code *)0x0) { param_5 = param_5 & 0xffffffff; iVar2 = (*my_string_stack_guard)(param_8); if (iVar2 != 0) { return 1; } } uVar3 = 0xffffffff; while (param_3 != param_4) { bVar1 = *param_3; uVar5 = (uint)(char)bVar1; bVar8 = uVar5 == param_6; if (uVar5 != param_7 && !bVar8) { do { uVar3 = 1; if (param_1 == param_2) { return 1; } pbVar4 = param_3 + 1; if (param_3 + 1 == param_4) { pbVar4 = param_3; } if (uVar5 == (uint)param_5) { param_3 = pbVar4; } if (*param_3 != *param_1) { return 1; } param_1 = param_1 + 1; param_3 = param_3 + 1; if (param_3 == param_4) goto LAB_001386ef; bVar1 = *param_3; uVar5 = (uint)(char)bVar1; bVar8 = uVar5 == param_6; } while ((uVar5 != param_7) && (uVar5 != param_6)); } if (bVar8) { do { pbVar4 = param_1; param_3 = param_3 + 1; if (pbVar4 == param_2) { return uVar3; } } while ((param_3 < param_4) && (param_1 = pbVar4 + 1, (int)(char)*param_3 == param_6)); param_1 = pbVar4 + 1; if (param_3 == param_4) break; bVar1 = *param_3; } if ((int)(char)bVar1 == param_7) { if (param_3 + 1 != param_4) { pbVar4 = param_3 + 2; do { bVar1 = pbVar4[-1]; if ((int)(char)bVar1 != param_7) { if ((int)(char)bVar1 != param_6) { if (param_1 == param_2) { return 0xffffffff; } pbVar6 = pbVar4 + -1; if (((uint)bVar1 == (uint)param_5) && (pbVar4 != param_4)) { bVar1 = *pbVar4; pbVar6 = pbVar4; } pbVar6 = pbVar6 + 1; uVar7 = (ulong)(param_8 + 1); while( true ) { while( true ) { if (param_1 == param_2) { return 0xffffffff; } if (*param_1 == bVar1) break; param_1 = param_1 + 1; } param_1 = param_1 + 1; uVar5 = (uint)param_5; uVar3 = my_wildcmp_bin_impl(param_1,param_2,pbVar6,param_4,param_5,param_6,param_7, uVar7,uVar7,pbVar6,uVar5); if ((int)uVar3 < 1) break; param_5 = (ulong)uVar5; if (param_1 == param_2) { return 0xffffffff; } } return uVar3; } if (param_1 == param_2) { return 0xffffffff; } param_1 = param_1 + 1; } bVar8 = pbVar4 != param_4; pbVar4 = pbVar4 + 1; } while (bVar8); } return 0; } } LAB_001386ef: return (uint)(param_1 != param_2); }
49,580
stbi__grow_buffer_unsafe(stbi__jpeg*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static void stbi__grow_buffer_unsafe(stbi__jpeg *j) { do { unsigned int b = j->nomore ? 0 : stbi__get8(j->s); if (b == 0xff) { int c = stbi__get8(j->s); while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes if (c != 0) { j->marker = (unsigned char) c; j->nomore = 1; return; } } j->code_buffer |= b << (24 - j->code_bits); j->code_bits += 8; } while (j->code_bits <= 24); }
O3
c
stbi__grow_buffer_unsafe(stbi__jpeg*): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx cmpl $0x0, 0x482c(%rbx) je 0x41998 xorl %eax, %eax jmp 0x41a41 movq (%rbx), %r14 movq 0xc0(%r14), %rax cmpq 0xc8(%r14), %rax jb 0x419c1 cmpl $0x0, 0x30(%r14) je 0x41991 movq %r14, %rdi callq 0x3ba17 movq 0xc0(%r14), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%r14) movb (%rax), %al cmpb $-0x1, %al jne 0x41a41 movq (%rbx), %r14 leaq 0xc0(%r14), %r15 movq 0xc0(%r14), %rax cmpq 0xc8(%r14), %rax jb 0x419f7 cmpl $0x0, 0x30(%r14) jne 0x41a27 xorl %eax, %eax jmp 0x41a00 leaq 0x1(%rax), %rcx movq %rcx, (%r15) movb (%rax), %al cmpb $-0x1, %al jne 0x41a38 movq (%rbx), %r14 movq 0xc0(%r14), %rax cmpq 0xc8(%r14), %rax jb 0x41a6a xorl %eax, %eax cmpl $0x0, 0x30(%r14) je 0x41a00 leaq 0xc0(%r14), %r15 movq %r14, %rdi callq 0x3ba17 movq 0xc0(%r14), %rax jmp 0x419f7 movzbl %al, %ecx testl %ecx, %ecx jne 0x41a76 movb $-0x1, %al movzbl %al, %eax movl 0x4824(%rbx), %edx movb $0x18, %cl subb %dl, %cl shll %cl, %eax orl %eax, 0x4820(%rbx) leal 0x8(%rdx), %eax movl %eax, 0x4824(%rbx) cmpl $0x11, %edx jl 0x41988 jmp 0x41a86 addq $0xc0, %r14 movq %r14, %r15 jmp 0x419f7 movb %al, 0x4828(%rbx) movl $0x1, 0x482c(%rbx) popq %rbx popq %r14 popq %r15 retq
_ZL24stbi__grow_buffer_unsafeP10stbi__jpeg: push r15 push r14 push rbx mov rbx, rdi loc_41988: cmp dword ptr [rbx+482Ch], 0 jz short loc_41998 loc_41991: xor eax, eax jmp loc_41A41 loc_41998: mov r14, [rbx] mov rax, [r14+0C0h] cmp rax, [r14+0C8h] jb short loc_419C1 cmp dword ptr [r14+30h], 0 jz short loc_41991 mov rdi, r14 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r14+0C0h] loc_419C1: lea rcx, [rax+1] mov [r14+0C0h], rcx mov al, [rax] cmp al, 0FFh jnz short loc_41A41 mov r14, [rbx] lea r15, [r14+0C0h] mov rax, [r14+0C0h] cmp rax, [r14+0C8h] jb short loc_419F7 cmp dword ptr [r14+30h], 0 jnz short loc_41A27 xor eax, eax jmp short loc_41A00 loc_419F7: lea rcx, [rax+1] mov [r15], rcx mov al, [rax] loc_41A00: cmp al, 0FFh jnz short loc_41A38 mov r14, [rbx] mov rax, [r14+0C0h] cmp rax, [r14+0C8h] jb short loc_41A6A xor eax, eax cmp dword ptr [r14+30h], 0 jz short loc_41A00 lea r15, [r14+0C0h] loc_41A27: mov rdi, r14 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r14+0C0h] jmp short loc_419F7 loc_41A38: movzx ecx, al test ecx, ecx jnz short loc_41A76 mov al, 0FFh loc_41A41: movzx eax, al mov edx, [rbx+4824h] mov cl, 18h sub cl, dl shl eax, cl or [rbx+4820h], eax lea eax, [rdx+8] mov [rbx+4824h], eax cmp edx, 11h jl loc_41988 jmp short loc_41A86 loc_41A6A: add r14, 0C0h mov r15, r14 jmp short loc_419F7 loc_41A76: mov [rbx+4828h], al mov dword ptr [rbx+482Ch], 1 loc_41A86: pop rbx pop r14 pop r15 retn
char stbi__grow_buffer_unsafe(_DWORD *a1) { unsigned __int8 v1; // al long long v2; // r14 unsigned __int8 *v3; // rax long long v4; // r14 char **v5; // r15 char *v6; // rax char result; // al int v8; // edx while ( 1 ) { if ( !a1[4619] ) { v2 = *(_QWORD *)a1; v3 = *(unsigned __int8 **)(*(_QWORD *)a1 + 192LL); if ( (unsigned long long)v3 < *(_QWORD *)(*(_QWORD *)a1 + 200LL) ) goto LABEL_6; if ( *(_DWORD *)(v2 + 48) ) break; } v1 = 0; LABEL_18: v8 = a1[4617]; a1[4616] |= v1 << (24 - v8); result = v8 + 8; a1[4617] = v8 + 8; if ( v8 >= 17 ) return result; } stbi__refill_buffer(*(_QWORD *)a1); v3 = *(unsigned __int8 **)(v2 + 192); LABEL_6: *(_QWORD *)(v2 + 192) = v3 + 1; v1 = *v3; if ( v1 != 0xFF ) goto LABEL_18; v4 = *(_QWORD *)a1; v5 = (char **)(*(_QWORD *)a1 + 192LL); v6 = *v5; if ( (unsigned long long)*v5 >= *(_QWORD *)(*(_QWORD *)a1 + 200LL) ) { if ( !*(_DWORD *)(v4 + 48) ) { result = 0; goto LABEL_11; } LABEL_15: stbi__refill_buffer(v4); v6 = *(char **)(v4 + 192); } LABEL_10: *v5 = v6 + 1; result = *v6; LABEL_11: while ( result == -1 ) { v4 = *(_QWORD *)a1; v6 = *(char **)(*(_QWORD *)a1 + 192LL); if ( (unsigned long long)v6 < *(_QWORD *)(*(_QWORD *)a1 + 200LL) ) { v5 = (char **)(v4 + 192); goto LABEL_10; } result = 0; if ( *(_DWORD *)(v4 + 48) ) { v5 = (char **)(v4 + 192); goto LABEL_15; } } if ( !result ) { v1 = -1; goto LABEL_18; } *((_BYTE *)a1 + 18472) = result; a1[4619] = 1; return result; }
stbi__grow_buffer_unsafe: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LAB_00141988: CMP dword ptr [RBX + 0x482c],0x0 JZ 0x00141998 LAB_00141991: XOR EAX,EAX JMP 0x00141a41 LAB_00141998: MOV R14,qword ptr [RBX] MOV RAX,qword ptr [R14 + 0xc0] CMP RAX,qword ptr [R14 + 0xc8] JC 0x001419c1 CMP dword ptr [R14 + 0x30],0x0 JZ 0x00141991 MOV RDI,R14 CALL 0x0013ba17 MOV RAX,qword ptr [R14 + 0xc0] LAB_001419c1: LEA RCX,[RAX + 0x1] MOV qword ptr [R14 + 0xc0],RCX MOV AL,byte ptr [RAX] CMP AL,0xff JNZ 0x00141a41 MOV R14,qword ptr [RBX] LEA R15,[R14 + 0xc0] MOV RAX,qword ptr [R14 + 0xc0] CMP RAX,qword ptr [R14 + 0xc8] JC 0x001419f7 CMP dword ptr [R14 + 0x30],0x0 JNZ 0x00141a27 XOR EAX,EAX JMP 0x00141a00 LAB_001419f7: LEA RCX,[RAX + 0x1] MOV qword ptr [R15],RCX MOV AL,byte ptr [RAX] LAB_00141a00: CMP AL,0xff JNZ 0x00141a38 MOV R14,qword ptr [RBX] MOV RAX,qword ptr [R14 + 0xc0] CMP RAX,qword ptr [R14 + 0xc8] JC 0x00141a6a XOR EAX,EAX CMP dword ptr [R14 + 0x30],0x0 JZ 0x00141a00 LEA R15,[R14 + 0xc0] LAB_00141a27: MOV RDI,R14 CALL 0x0013ba17 MOV RAX,qword ptr [R14 + 0xc0] JMP 0x001419f7 LAB_00141a38: MOVZX ECX,AL TEST ECX,ECX JNZ 0x00141a76 MOV AL,0xff LAB_00141a41: MOVZX EAX,AL MOV EDX,dword ptr [RBX + 0x4824] MOV CL,0x18 SUB CL,DL SHL EAX,CL OR dword ptr [RBX + 0x4820],EAX LEA EAX,[RDX + 0x8] MOV dword ptr [RBX + 0x4824],EAX CMP EDX,0x11 JL 0x00141988 JMP 0x00141a86 LAB_00141a6a: ADD R14,0xc0 MOV R15,R14 JMP 0x001419f7 LAB_00141a76: MOV byte ptr [RBX + 0x4828],AL MOV dword ptr [RBX + 0x482c],0x1 LAB_00141a86: POP RBX POP R14 POP R15 RET
/* stbi__grow_buffer_unsafe(stbi__jpeg*) */ void stbi__grow_buffer_unsafe(stbi__jpeg *param_1) { int iVar1; stbi__jpeg sVar2; byte bVar3; byte *pbVar4; stbi__jpeg *psVar5; stbi__context *psVar6; stbi__context *psVar7; do { if (*(int *)(param_1 + 0x482c) == 0) { psVar7 = *(stbi__context **)param_1; pbVar4 = *(byte **)(psVar7 + 0xc0); if (*(byte **)(psVar7 + 200) <= pbVar4) { if (*(int *)(psVar7 + 0x30) == 0) goto LAB_00141991; stbi__refill_buffer(psVar7); pbVar4 = *(byte **)(psVar7 + 0xc0); } *(byte **)(psVar7 + 0xc0) = pbVar4 + 1; bVar3 = *pbVar4; if (bVar3 == 0xff) { psVar6 = *(stbi__context **)param_1; psVar7 = psVar6 + 0xc0; psVar5 = *(stbi__jpeg **)(psVar6 + 0xc0); if (psVar5 < *(stbi__jpeg **)(psVar6 + 200)) goto LAB_001419f7; if (*(int *)(psVar6 + 0x30) != 0) goto LAB_00141a27; sVar2 = (stbi__jpeg)0x0; LAB_00141a00: if (sVar2 == (stbi__jpeg)0xff) { psVar6 = *(stbi__context **)param_1; psVar5 = *(stbi__jpeg **)(psVar6 + 0xc0); if (*(stbi__jpeg **)(psVar6 + 200) <= psVar5) break; psVar7 = psVar6 + 0xc0; goto LAB_001419f7; } if (sVar2 != (stbi__jpeg)0x0) { param_1[0x4828] = sVar2; *(int4 *)(param_1 + 0x482c) = 1; return; } bVar3 = 0xff; } } else { LAB_00141991: bVar3 = 0; } iVar1 = *(int *)(param_1 + 0x4824); *(uint *)(param_1 + 0x4820) = *(uint *)(param_1 + 0x4820) | (uint)bVar3 << (0x18U - (char)iVar1 & 0x1f); *(int *)(param_1 + 0x4824) = iVar1 + 8; if (0x10 < iVar1) { return; } } while( true ); sVar2 = (stbi__jpeg)0x0; if (*(int *)(psVar6 + 0x30) != 0) { psVar7 = psVar6 + 0xc0; LAB_00141a27: stbi__refill_buffer(psVar6); psVar5 = *(stbi__jpeg **)(psVar6 + 0xc0); LAB_001419f7: *(stbi__jpeg **)psVar7 = psVar5 + 1; sVar2 = *psVar5; } goto LAB_00141a00; }
49,581
mark_blocks_free
eloqsql/mysys/my_alloc.c
static inline void mark_blocks_free(MEM_ROOT* root) { reg1 USED_MEM *next; reg2 USED_MEM **last; /* iterate through (partially) free blocks, mark them free */ last= &root->free; for (next= root->free; next; next= *(last= &next->next)) { next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM)); TRASH_MEM(next); } /* Combine the free and the used list */ *last= next=root->used; /* now go through the used blocks and mark them free */ for (; next; next= next->next) { next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM)); TRASH_MEM(next); } /* Now everything is set; Indicate that nothing is used anymore */ root->used= 0; root->first_block_usage= 0; root->block_num= 4; }
O0
c
mark_blocks_free: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0xedb7f movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx subq $0x18, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) jmp 0xedb68 jmp 0xedb6a jmp 0xedb6c jmp 0xedb6e movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq (%rax), %rax movq %rax, -0x10(%rbp) jmp 0xedb4b movq -0x8(%rbp), %rax movq 0x8(%rax), %rcx movq %rcx, -0x10(%rbp) movq -0x18(%rbp), %rax movq %rcx, (%rax) cmpq $0x0, -0x10(%rbp) je 0xedbc2 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx subq $0x18, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) jmp 0xedbaf jmp 0xedbb1 jmp 0xedbb3 jmp 0xedbb5 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) jmp 0xedb92 movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x8(%rbp), %rax movl $0x4, 0x28(%rax) popq %rbp retq nopw %cs:(%rax,%rax)
mark_blocks_free: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax loc_EDB4B: cmp [rbp+var_10], 0 jz short loc_EDB7F mov rax, [rbp+var_10] mov rcx, [rax+10h] sub rcx, 18h mov rax, [rbp+var_10] mov [rax+8], rcx jmp short $+2 loc_EDB68: jmp short $+2 loc_EDB6A: jmp short $+2 loc_EDB6C: jmp short $+2 loc_EDB6E: mov rax, [rbp+var_10] mov [rbp+var_18], rax mov rax, [rax] mov [rbp+var_10], rax jmp short loc_EDB4B loc_EDB7F: mov rax, [rbp+var_8] mov rcx, [rax+8] mov [rbp+var_10], rcx mov rax, [rbp+var_18] mov [rax], rcx loc_EDB92: cmp [rbp+var_10], 0 jz short loc_EDBC2 mov rax, [rbp+var_10] mov rcx, [rax+10h] sub rcx, 18h mov rax, [rbp+var_10] mov [rax+8], rcx jmp short $+2 loc_EDBAF: jmp short $+2 loc_EDBB1: jmp short $+2 loc_EDBB3: jmp short $+2 loc_EDBB5: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_10], rax jmp short loc_EDB92 loc_EDBC2: mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] mov dword ptr [rax+2Ch], 0 mov rax, [rbp+var_8] mov dword ptr [rax+28h], 4 pop rbp retn
long long mark_blocks_free(long long a1) { long long result; // rax _QWORD *v2; // [rsp+0h] [rbp-18h] _QWORD *i; // [rsp+8h] [rbp-10h] _QWORD *v4; // [rsp+8h] [rbp-10h] v2 = (_QWORD *)a1; for ( i = *(_QWORD **)a1; i; i = (_QWORD *)*i ) { i[1] = i[2] - 24LL; v2 = i; } v4 = *(_QWORD **)(a1 + 8); *v2 = v4; while ( v4 ) { v4[1] = v4[2] - 24LL; v4 = (_QWORD *)*v4; } *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 44) = 0; result = a1; *(_DWORD *)(a1 + 40) = 4; return result; }
mark_blocks_free: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX LAB_001edb4b: CMP qword ptr [RBP + -0x10],0x0 JZ 0x001edb7f MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX JMP 0x001edb68 LAB_001edb68: JMP 0x001edb6a LAB_001edb6a: JMP 0x001edb6c LAB_001edb6c: JMP 0x001edb6e LAB_001edb6e: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX JMP 0x001edb4b LAB_001edb7f: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x10],RCX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX LAB_001edb92: CMP qword ptr [RBP + -0x10],0x0 JZ 0x001edbc2 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX JMP 0x001edbaf LAB_001edbaf: JMP 0x001edbb1 LAB_001edbb1: JMP 0x001edbb3 LAB_001edbb3: JMP 0x001edbb5 LAB_001edbb5: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX JMP 0x001edb92 LAB_001edbc2: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x2c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x28],0x4 POP RBP RET
void mark_blocks_free(int8 *param_1) { int8 *local_20; int8 *local_18; local_20 = param_1; for (local_18 = (int8 *)*param_1; local_18 != (int8 *)0x0; local_18 = (int8 *)*local_18) { local_18[1] = local_18[2] + -0x18; local_20 = local_18; } local_18 = (int8 *)param_1[1]; *local_20 = local_18; for (; local_18 != (int8 *)0x0; local_18 = (int8 *)*local_18) { local_18[1] = local_18[2] + -0x18; } param_1[1] = 0; *(int4 *)((long)param_1 + 0x2c) = 0; *(int4 *)(param_1 + 5) = 4; return; }
49,582
QuaternionFromEuler
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Quaternion QuaternionFromEuler(float pitch, float yaw, float roll) { Quaternion result = { 0 }; float x0 = cosf(pitch*0.5f); float x1 = sinf(pitch*0.5f); float y0 = cosf(yaw*0.5f); float y1 = sinf(yaw*0.5f); float z0 = cosf(roll*0.5f); float z1 = sinf(roll*0.5f); result.x = x1*y0*z0 - x0*y1*z1; result.y = x0*y1*z0 + x1*y0*z1; result.z = x0*y0*z1 - x1*y1*z0; result.w = x0*y0*z0 + x1*y1*z1; return result; }
O2
c
QuaternionFromEuler: subq $0x68, %rsp movss %xmm2, 0xc(%rsp) movss %xmm1, 0x10(%rsp) mulss 0x5f819(%rip), %xmm0 # 0xb96d8 movss %xmm0, 0x20(%rsp) callq 0x9390 movaps %xmm0, 0x50(%rsp) movss 0x20(%rsp), %xmm0 callq 0x9410 movaps %xmm0, 0x20(%rsp) movss 0x10(%rsp), %xmm0 mulss 0x5f7eb(%rip), %xmm0 # 0xb96d8 movss %xmm0, 0x10(%rsp) callq 0x9390 movaps %xmm0, 0x40(%rsp) movss 0x10(%rsp), %xmm0 callq 0x9410 movaps %xmm0, 0x30(%rsp) movss 0xc(%rsp), %xmm0 mulss 0x5f7bd(%rip), %xmm0 # 0xb96d8 movss %xmm0, 0xc(%rsp) callq 0x9390 movaps %xmm0, 0x10(%rsp) movss 0xc(%rsp), %xmm0 callq 0x9410 movaps 0x20(%rsp), %xmm4 movaps %xmm4, %xmm1 movaps 0x40(%rsp), %xmm3 mulss %xmm3, %xmm1 movaps 0x50(%rsp), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps 0x30(%rsp), %xmm5 mulss %xmm5, %xmm4 unpcklps %xmm3, %xmm5 # xmm5 = xmm5[0],xmm3[0],xmm5[1],xmm3[1] mulps %xmm2, %xmm5 movaps 0x5b1da(%rip), %xmm2 # 0xb5140 movaps %xmm5, %xmm3 xorps %xmm2, %xmm3 xorps %xmm4, %xmm2 unpcklps %xmm1, %xmm3 # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1] movaps 0x10(%rsp), %xmm6 movlhps %xmm6, %xmm4 # xmm4 = xmm4[0],xmm6[0] shufps $0x24, %xmm4, %xmm3 # xmm3 = xmm3[0,1],xmm4[2,0] movaps %xmm0, %xmm4 unpcklps %xmm2, %xmm4 # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1] shufps $0x10, %xmm4, %xmm4 # xmm4 = xmm4[0,0,1,0] mulps %xmm3, %xmm4 movlhps %xmm5, %xmm1 # xmm1 = xmm1[0],xmm5[0] shufps $0x58, %xmm5, %xmm1 # xmm1 = xmm1[0,2],xmm5[1,1] movaps %xmm6, %xmm2 movlhps %xmm6, %xmm0 # xmm0 = xmm0[0],xmm6[0] shufps $0x80, %xmm0, %xmm2 # xmm2 = xmm2[0,0],xmm0[0,2] mulps %xmm1, %xmm2 addps %xmm4, %xmm2 movaps %xmm2, %xmm1 movaps %xmm2, %xmm0 unpckhpd %xmm2, %xmm1 # xmm1 = xmm1[1],xmm2[1] addq $0x68, %rsp retq
QuaternionFromEuler: sub rsp, 68h movss [rsp+68h+var_5C], xmm2 movss dword ptr [rsp+68h+var_58], xmm1 mulss xmm0, cs:dword_B96D8 movss dword ptr [rsp+68h+var_48], xmm0 call _cosf movaps [rsp+68h+var_18], xmm0 movss xmm0, dword ptr [rsp+68h+var_48] call _sinf movaps [rsp+68h+var_48], xmm0 movss xmm0, dword ptr [rsp+68h+var_58] mulss xmm0, cs:dword_B96D8 movss dword ptr [rsp+68h+var_58], xmm0 call _cosf movaps [rsp+68h+var_28], xmm0 movss xmm0, dword ptr [rsp+68h+var_58] call _sinf movaps [rsp+68h+var_38], xmm0 movss xmm0, [rsp+68h+var_5C] mulss xmm0, cs:dword_B96D8 movss [rsp+68h+var_5C], xmm0 call _cosf movaps [rsp+68h+var_58], xmm0 movss xmm0, [rsp+68h+var_5C] call _sinf movaps xmm4, [rsp+68h+var_48] movaps xmm1, xmm4 movaps xmm3, [rsp+68h+var_28] mulss xmm1, xmm3 movaps xmm2, [rsp+68h+var_18] shufps xmm2, xmm2, 0 movaps xmm5, [rsp+68h+var_38] mulss xmm4, xmm5 unpcklps xmm5, xmm3 mulps xmm5, xmm2 movaps xmm2, cs:xmmword_B5140 movaps xmm3, xmm5 xorps xmm3, xmm2 xorps xmm2, xmm4 unpcklps xmm3, xmm1 movaps xmm6, [rsp+68h+var_58] movlhps xmm4, xmm6 shufps xmm3, xmm4, 24h ; '$' movaps xmm4, xmm0 unpcklps xmm4, xmm2 shufps xmm4, xmm4, 10h mulps xmm4, xmm3 movlhps xmm1, xmm5 shufps xmm1, xmm5, 58h ; 'X' movaps xmm2, xmm6 movlhps xmm0, xmm6 shufps xmm2, xmm0, 80h mulps xmm2, xmm1 addps xmm2, xmm4 movaps xmm1, xmm2 movaps xmm0, xmm2 unpckhpd xmm1, xmm2 add rsp, 68h retn
__m128 QuaternionFromEuler(__m128 a1, float a2, float a3) { __m128 v3; // xmm0 __m128 v4; // xmm0 __m128 v5; // xmm0 __m128 v6; // xmm0 __m128 v7; // xmm0 __m128 v8; // xmm4 __m128 v9; // xmm1 __m128 v10; // xmm5 __m128 v11; // xmm3 __m128 v12; // xmm4 __m128 v14; // [rsp+10h] [rbp-58h] float v15; // [rsp+20h] [rbp-48h] __m128 v16; // [rsp+20h] [rbp-48h] __m128 v17; // [rsp+30h] [rbp-38h] __m128 v18; // [rsp+40h] [rbp-28h] __m128 v19; // [rsp+50h] [rbp-18h] v15 = a1.m128_f32[0] * 0.5; *(double *)a1.m128_u64 = cosf(a1.m128_f32[0] * 0.5); v19 = a1; v3 = (__m128)LODWORD(v15); *(double *)v3.m128_u64 = sinf(v15); v16 = v3; v4 = (__m128)LODWORD(a2); *(double *)v4.m128_u64 = cosf(a2 * 0.5); v18 = v4; v5 = (__m128)COERCE_UNSIGNED_INT(a2 * 0.5); *(double *)v5.m128_u64 = sinf(a2 * 0.5); v17 = v5; v6 = (__m128)LODWORD(a3); *(double *)v6.m128_u64 = cosf(a3 * 0.5); v14 = v6; v7 = (__m128)COERCE_UNSIGNED_INT(a3 * 0.5); *(double *)v7.m128_u64 = sinf(a3 * 0.5); v8 = v16; v9 = v16; v9.m128_f32[0] = v16.m128_f32[0] * v18.m128_f32[0]; v8.m128_f32[0] = v16.m128_f32[0] * v17.m128_f32[0]; v10 = _mm_mul_ps(_mm_unpacklo_ps(v17, v18), _mm_shuffle_ps(v19, v19, 0)); v11 = _mm_shuffle_ps(_mm_unpacklo_ps(_mm_xor_ps(v10, (__m128)xmmword_B5140), v9), _mm_movelh_ps(v8, v14), 36); v12 = _mm_unpacklo_ps(v7, _mm_xor_ps((__m128)xmmword_B5140, v8)); return _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(v14, _mm_movelh_ps(v7, v14), 128), _mm_shuffle_ps(_mm_movelh_ps(v9, v10), v10, 88)), _mm_mul_ps(_mm_shuffle_ps(v12, v12, 16), v11)); }
QuaternionFromEuler: SUB RSP,0x68 MOVSS dword ptr [RSP + 0xc],XMM2 MOVSS dword ptr [RSP + 0x10],XMM1 MULSS XMM0,dword ptr [0x001b96d8] MOVSS dword ptr [RSP + 0x20],XMM0 CALL 0x00109390 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVSS XMM0,dword ptr [RSP + 0x20] CALL 0x00109410 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVSS XMM0,dword ptr [RSP + 0x10] MULSS XMM0,dword ptr [0x001b96d8] MOVSS dword ptr [RSP + 0x10],XMM0 CALL 0x00109390 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVSS XMM0,dword ptr [RSP + 0x10] CALL 0x00109410 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] MULSS XMM0,dword ptr [0x001b96d8] MOVSS dword ptr [RSP + 0xc],XMM0 CALL 0x00109390 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x00109410 MOVAPS XMM4,xmmword ptr [RSP + 0x20] MOVAPS XMM1,XMM4 MOVAPS XMM3,xmmword ptr [RSP + 0x40] MULSS XMM1,XMM3 MOVAPS XMM2,xmmword ptr [RSP + 0x50] SHUFPS XMM2,XMM2,0x0 MOVAPS XMM5,xmmword ptr [RSP + 0x30] MULSS XMM4,XMM5 UNPCKLPS XMM5,XMM3 MULPS XMM5,XMM2 MOVAPS XMM2,xmmword ptr [0x001b5140] MOVAPS XMM3,XMM5 XORPS XMM3,XMM2 XORPS XMM2,XMM4 UNPCKLPS XMM3,XMM1 MOVAPS XMM6,xmmword ptr [RSP + 0x10] MOVLHPS XMM4,XMM6 SHUFPS XMM3,XMM4,0x24 MOVAPS XMM4,XMM0 UNPCKLPS XMM4,XMM2 SHUFPS XMM4,XMM4,0x10 MULPS XMM4,XMM3 MOVLHPS XMM1,XMM5 SHUFPS XMM1,XMM5,0x58 MOVAPS XMM2,XMM6 MOVLHPS XMM0,XMM6 SHUFPS XMM2,XMM0,0x80 MULPS XMM2,XMM1 ADDPS XMM2,XMM4 MOVAPS XMM1,XMM2 MOVAPS XMM0,XMM2 UNPCKHPD XMM1,XMM2 ADD RSP,0x68 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 QuaternionFromEuler(float param_1,float param_2,float param_3) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; param_1 = param_1 * DAT_001b96d8; fVar1 = cosf(param_1); fVar2 = sinf(param_1); param_2 = param_2 * DAT_001b96d8; fVar3 = cosf(param_2); fVar4 = sinf(param_2); param_3 = param_3 * DAT_001b96d8; fVar5 = cosf(param_3); fVar6 = sinf(param_3); return CONCAT44(fVar5 * fVar4 * fVar1 + fVar6 * fVar2 * fVar3, fVar5 * fVar2 * fVar3 + fVar6 * (float)((uint)(fVar4 * fVar1) ^ _DAT_001b5140)); }
49,583
QuaternionFromEuler
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Quaternion QuaternionFromEuler(float pitch, float yaw, float roll) { Quaternion result = { 0 }; float x0 = cosf(pitch*0.5f); float x1 = sinf(pitch*0.5f); float y0 = cosf(yaw*0.5f); float y1 = sinf(yaw*0.5f); float z0 = cosf(roll*0.5f); float z1 = sinf(roll*0.5f); result.x = x1*y0*z0 - x0*y1*z1; result.y = x0*y1*z0 + x1*y0*z1; result.z = x0*y0*z1 - x1*y1*z0; result.w = x0*y0*z0 + x1*y1*z1; return result; }
O3
c
QuaternionFromEuler: subq $0x68, %rsp movss %xmm2, 0xc(%rsp) movss %xmm1, 0x10(%rsp) mulss 0x69c75(%rip), %xmm0 # 0xd3b58 movss %xmm0, 0x20(%rsp) callq 0xa3b0 movaps %xmm0, 0x50(%rsp) movss 0x20(%rsp), %xmm0 callq 0xa420 movaps %xmm0, 0x20(%rsp) movss 0x10(%rsp), %xmm0 mulss 0x69c47(%rip), %xmm0 # 0xd3b58 movss %xmm0, 0x10(%rsp) callq 0xa3b0 movaps %xmm0, 0x40(%rsp) movss 0x10(%rsp), %xmm0 callq 0xa420 movaps %xmm0, 0x30(%rsp) movss 0xc(%rsp), %xmm0 mulss 0x69c19(%rip), %xmm0 # 0xd3b58 movss %xmm0, 0xc(%rsp) callq 0xa3b0 movaps %xmm0, 0x10(%rsp) movss 0xc(%rsp), %xmm0 callq 0xa420 movaps 0x20(%rsp), %xmm4 movaps %xmm4, %xmm1 movaps 0x40(%rsp), %xmm3 mulss %xmm3, %xmm1 movaps 0x50(%rsp), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movaps 0x30(%rsp), %xmm5 mulss %xmm5, %xmm4 unpcklps %xmm3, %xmm5 # xmm5 = xmm5[0],xmm3[0],xmm5[1],xmm3[1] mulps %xmm2, %xmm5 movaps 0x651c6(%rip), %xmm2 # 0xcf150 movaps %xmm5, %xmm3 xorps %xmm2, %xmm3 xorps %xmm4, %xmm2 unpcklps %xmm1, %xmm3 # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1] movaps 0x10(%rsp), %xmm6 movlhps %xmm6, %xmm4 # xmm4 = xmm4[0],xmm6[0] shufps $0x24, %xmm4, %xmm3 # xmm3 = xmm3[0,1],xmm4[2,0] movaps %xmm0, %xmm4 unpcklps %xmm2, %xmm4 # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1] shufps $0x10, %xmm4, %xmm4 # xmm4 = xmm4[0,0,1,0] mulps %xmm3, %xmm4 movlhps %xmm5, %xmm1 # xmm1 = xmm1[0],xmm5[0] shufps $0x58, %xmm5, %xmm1 # xmm1 = xmm1[0,2],xmm5[1,1] movaps %xmm6, %xmm2 movlhps %xmm6, %xmm0 # xmm0 = xmm0[0],xmm6[0] shufps $0x80, %xmm0, %xmm2 # xmm2 = xmm2[0,0],xmm0[0,2] mulps %xmm1, %xmm2 addps %xmm4, %xmm2 movaps %xmm2, %xmm1 movaps %xmm2, %xmm0 unpckhpd %xmm2, %xmm1 # xmm1 = xmm1[1],xmm2[1] addq $0x68, %rsp retq
QuaternionFromEuler: sub rsp, 68h movss [rsp+68h+var_5C], xmm2 movss dword ptr [rsp+68h+var_58], xmm1 mulss xmm0, cs:dword_D3B58 movss dword ptr [rsp+68h+var_48], xmm0 call _cosf movaps [rsp+68h+var_18], xmm0 movss xmm0, dword ptr [rsp+68h+var_48] call _sinf movaps [rsp+68h+var_48], xmm0 movss xmm0, dword ptr [rsp+68h+var_58] mulss xmm0, cs:dword_D3B58 movss dword ptr [rsp+68h+var_58], xmm0 call _cosf movaps [rsp+68h+var_28], xmm0 movss xmm0, dword ptr [rsp+68h+var_58] call _sinf movaps [rsp+68h+var_38], xmm0 movss xmm0, [rsp+68h+var_5C] mulss xmm0, cs:dword_D3B58 movss [rsp+68h+var_5C], xmm0 call _cosf movaps [rsp+68h+var_58], xmm0 movss xmm0, [rsp+68h+var_5C] call _sinf movaps xmm4, [rsp+68h+var_48] movaps xmm1, xmm4 movaps xmm3, [rsp+68h+var_28] mulss xmm1, xmm3 movaps xmm2, [rsp+68h+var_18] shufps xmm2, xmm2, 0 movaps xmm5, [rsp+68h+var_38] mulss xmm4, xmm5 unpcklps xmm5, xmm3 mulps xmm5, xmm2 movaps xmm2, cs:xmmword_CF150 movaps xmm3, xmm5 xorps xmm3, xmm2 xorps xmm2, xmm4 unpcklps xmm3, xmm1 movaps xmm6, [rsp+68h+var_58] movlhps xmm4, xmm6 shufps xmm3, xmm4, 24h ; '$' movaps xmm4, xmm0 unpcklps xmm4, xmm2 shufps xmm4, xmm4, 10h mulps xmm4, xmm3 movlhps xmm1, xmm5 shufps xmm1, xmm5, 58h ; 'X' movaps xmm2, xmm6 movlhps xmm0, xmm6 shufps xmm2, xmm0, 80h mulps xmm2, xmm1 addps xmm2, xmm4 movaps xmm1, xmm2 movaps xmm0, xmm2 unpckhpd xmm1, xmm2 add rsp, 68h retn
__m128 QuaternionFromEuler(__m128 a1, float a2, float a3) { __m128 v3; // xmm0 __m128 v4; // xmm0 __m128 v5; // xmm0 __m128 v6; // xmm0 __m128 v7; // xmm0 __m128 v8; // xmm4 __m128 v9; // xmm1 __m128 v10; // xmm5 __m128 v11; // xmm3 __m128 v12; // xmm4 __m128 v14; // [rsp+10h] [rbp-58h] float v15; // [rsp+20h] [rbp-48h] __m128 v16; // [rsp+20h] [rbp-48h] __m128 v17; // [rsp+30h] [rbp-38h] __m128 v18; // [rsp+40h] [rbp-28h] __m128 v19; // [rsp+50h] [rbp-18h] v15 = a1.m128_f32[0] * 0.5; *(double *)a1.m128_u64 = cosf(a1.m128_f32[0] * 0.5); v19 = a1; v3 = (__m128)LODWORD(v15); *(double *)v3.m128_u64 = sinf(v15); v16 = v3; v4 = (__m128)LODWORD(a2); *(double *)v4.m128_u64 = cosf(a2 * 0.5); v18 = v4; v5 = (__m128)COERCE_UNSIGNED_INT(a2 * 0.5); *(double *)v5.m128_u64 = sinf(a2 * 0.5); v17 = v5; v6 = (__m128)LODWORD(a3); *(double *)v6.m128_u64 = cosf(a3 * 0.5); v14 = v6; v7 = (__m128)COERCE_UNSIGNED_INT(a3 * 0.5); *(double *)v7.m128_u64 = sinf(a3 * 0.5); v8 = v16; v9 = v16; v9.m128_f32[0] = v16.m128_f32[0] * v18.m128_f32[0]; v8.m128_f32[0] = v16.m128_f32[0] * v17.m128_f32[0]; v10 = _mm_mul_ps(_mm_unpacklo_ps(v17, v18), _mm_shuffle_ps(v19, v19, 0)); v11 = _mm_shuffle_ps(_mm_unpacklo_ps(_mm_xor_ps(v10, (__m128)xmmword_CF150), v9), _mm_movelh_ps(v8, v14), 36); v12 = _mm_unpacklo_ps(v7, _mm_xor_ps((__m128)xmmword_CF150, v8)); return _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(v14, _mm_movelh_ps(v7, v14), 128), _mm_shuffle_ps(_mm_movelh_ps(v9, v10), v10, 88)), _mm_mul_ps(_mm_shuffle_ps(v12, v12, 16), v11)); }
QuaternionFromEuler: SUB RSP,0x68 MOVSS dword ptr [RSP + 0xc],XMM2 MOVSS dword ptr [RSP + 0x10],XMM1 MULSS XMM0,dword ptr [0x001d3b58] MOVSS dword ptr [RSP + 0x20],XMM0 CALL 0x0010a3b0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVSS XMM0,dword ptr [RSP + 0x20] CALL 0x0010a420 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVSS XMM0,dword ptr [RSP + 0x10] MULSS XMM0,dword ptr [0x001d3b58] MOVSS dword ptr [RSP + 0x10],XMM0 CALL 0x0010a3b0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVSS XMM0,dword ptr [RSP + 0x10] CALL 0x0010a420 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] MULSS XMM0,dword ptr [0x001d3b58] MOVSS dword ptr [RSP + 0xc],XMM0 CALL 0x0010a3b0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x0010a420 MOVAPS XMM4,xmmword ptr [RSP + 0x20] MOVAPS XMM1,XMM4 MOVAPS XMM3,xmmword ptr [RSP + 0x40] MULSS XMM1,XMM3 MOVAPS XMM2,xmmword ptr [RSP + 0x50] SHUFPS XMM2,XMM2,0x0 MOVAPS XMM5,xmmword ptr [RSP + 0x30] MULSS XMM4,XMM5 UNPCKLPS XMM5,XMM3 MULPS XMM5,XMM2 MOVAPS XMM2,xmmword ptr [0x001cf150] MOVAPS XMM3,XMM5 XORPS XMM3,XMM2 XORPS XMM2,XMM4 UNPCKLPS XMM3,XMM1 MOVAPS XMM6,xmmword ptr [RSP + 0x10] MOVLHPS XMM4,XMM6 SHUFPS XMM3,XMM4,0x24 MOVAPS XMM4,XMM0 UNPCKLPS XMM4,XMM2 SHUFPS XMM4,XMM4,0x10 MULPS XMM4,XMM3 MOVLHPS XMM1,XMM5 SHUFPS XMM1,XMM5,0x58 MOVAPS XMM2,XMM6 MOVLHPS XMM0,XMM6 SHUFPS XMM2,XMM0,0x80 MULPS XMM2,XMM1 ADDPS XMM2,XMM4 MOVAPS XMM1,XMM2 MOVAPS XMM0,XMM2 UNPCKHPD XMM1,XMM2 ADD RSP,0x68 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 QuaternionFromEuler(float param_1,float param_2,float param_3) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; param_1 = param_1 * DAT_001d3b58; fVar1 = cosf(param_1); fVar2 = sinf(param_1); param_2 = param_2 * DAT_001d3b58; fVar3 = cosf(param_2); fVar4 = sinf(param_2); param_3 = param_3 * DAT_001d3b58; fVar5 = cosf(param_3); fVar6 = sinf(param_3); return CONCAT44(fVar5 * fVar4 * fVar1 + fVar6 * fVar2 * fVar3, fVar5 * fVar2 * fVar3 + fVar6 * (float)((uint)(fVar4 * fVar1) ^ _DAT_001cf150)); }
49,584
mi_update_static_record
eloqsql/storage/myisam/mi_statrec.c
int _mi_update_static_record(MI_INFO *info, my_off_t pos, const uchar *record) { info->rec_cache.seek_not_done=1; /* We have done a seek */ return (info->s->file_write(info, record, info->s->base.reclength, pos, MYF(MY_NABP)) != 0); }
O0
c
mi_update_static_record: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl $0x1, 0x300(%rax) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x2e8(%rax), %rax movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movq 0x140(%rcx), %rdx movq -0x10(%rbp), %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax setne %al andb $0x1, %al movzbl %al, %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_update_static_record: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov dword ptr [rax+300h], 1 mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+2E8h] mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rcx, [rbp+var_8] mov rcx, [rcx] mov rdx, [rcx+140h] mov rcx, [rbp+var_10] mov r8d, 4 call rax cmp rax, 0 setnz al and al, 1 movzx eax, al add rsp, 20h pop rbp retn
_BOOL8 mi_update_static_record(_DWORD *a1, long long a2, long long a3) { a1[192] = 1; return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long))(*(_QWORD *)a1 + 744LL))( a1, a3, *(_QWORD *)(*(_QWORD *)a1 + 320LL), a2, 4LL) != 0; }
_mi_update_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x300],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x2e8] MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x140] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,0x4 CALL RAX CMP RAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL ADD RSP,0x20 POP RBP RET
bool _mi_update_static_record(long *param_1,int8 param_2,int8 param_3) { long lVar1; *(int4 *)(param_1 + 0x60) = 1; lVar1 = (**(code **)(*param_1 + 0x2e8)) (param_1,param_3,*(int8 *)(*param_1 + 0x140),param_2,4); return lVar1 != 0; }
49,585
init_myisam_psi_keys
eloqsql/storage/myisam/mi_static.c
void init_myisam_psi_keys() { const char* category= "myisam"; int count; count= array_elements(all_myisam_mutexes); mysql_mutex_register(category, all_myisam_mutexes, count); count= array_elements(all_myisam_rwlocks); mysql_rwlock_register(category, all_myisam_rwlocks, count); count= array_elements(all_myisam_conds); mysql_cond_register(category, all_myisam_conds, count); count= array_elements(all_myisam_files); mysql_file_register(category, all_myisam_files, count); count= array_elements(all_myisam_threads); mysql_thread_register(category, all_myisam_threads, count); count= array_elements(all_myisam_memory); mysql_memory_register(category, all_myisam_memory, count); }
O0
c
init_myisam_psi_keys: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0xb699d(%rip), %rax # 0x15c36c movq %rax, -0x8(%rbp) movl $0x3, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x221888(%rip), %rsi # 0x2c7270 callq 0xa5a80 movl $0x2, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x2218be(%rip), %rsi # 0x2c72c0 callq 0xa5ac0 movl $0x1, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x2218d4(%rip), %rsi # 0x2c72f0 callq 0xa5b00 movl $0x4, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x2218da(%rip), %rsi # 0x2c7310 callq 0xa5b40 movl $0x1, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x221920(%rip), %rsi # 0x2c7370 callq 0xa5b80 movl $0x15, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x221926(%rip), %rsi # 0x2c7390 callq 0xa5bc0 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
init_myisam_psi_keys: push rbp mov rbp, rsp sub rsp, 10h lea rax, aThrLockMyisam+9; "myisam" mov [rbp+var_8], rax mov [rbp+var_C], 3 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_myisam_mutexes call inline_mysql_mutex_register mov [rbp+var_C], 2 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_myisam_rwlocks call inline_mysql_rwlock_register mov [rbp+var_C], 1 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_myisam_conds call inline_mysql_cond_register mov [rbp+var_C], 4 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_myisam_files call inline_mysql_file_register mov [rbp+var_C], 1 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_myisam_threads call inline_mysql_thread_register mov [rbp+var_C], 15h mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_myisam_memory call inline_mysql_memory_register add rsp, 10h pop rbp retn
long long init_myisam_psi_keys() { inline_mysql_mutex_register("myisam", &all_myisam_mutexes, 3LL); inline_mysql_rwlock_register("myisam", &all_myisam_rwlocks, 2LL); inline_mysql_cond_register("myisam", &all_myisam_conds, 1LL); inline_mysql_file_register("myisam", &all_myisam_files, 4LL); inline_mysql_thread_register("myisam", &all_myisam_threads, 1LL); return inline_mysql_memory_register("myisam", &all_myisam_memory, 21LL); }
init_myisam_psi_keys: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RAX,[0x25c36c] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xc],0x3 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x3c7270] CALL 0x001a5a80 MOV dword ptr [RBP + -0xc],0x2 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x3c72c0] CALL 0x001a5ac0 MOV dword ptr [RBP + -0xc],0x1 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x3c72f0] CALL 0x001a5b00 MOV dword ptr [RBP + -0xc],0x4 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x3c7310] CALL 0x001a5b40 MOV dword ptr [RBP + -0xc],0x1 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x3c7370] CALL 0x001a5b80 MOV dword ptr [RBP + -0xc],0x15 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x3c7390] CALL 0x001a5bc0 ADD RSP,0x10 POP RBP RET
void init_myisam_psi_keys(void) { inline_mysql_mutex_register("myisam",all_myisam_mutexes,3); inline_mysql_rwlock_register("myisam",all_myisam_rwlocks,2); inline_mysql_cond_register("myisam",all_myisam_conds,1); inline_mysql_file_register("myisam",all_myisam_files,4); inline_mysql_thread_register("myisam",all_myisam_threads,1); inline_mysql_memory_register("myisam",all_myisam_memory,0x15); return; }
49,586
Settings::stopGame[abi:cxx11]()
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
std::string Settings::stopGame() { std::lock_guard<std::mutex> lock(settings_mutex); if (stop) { return "game has already been stopped"; } stop = true; return "ok"; }
O1
cpp
Settings::stopGame[abi:cxx11](): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x5520 testl %eax, %eax jne 0x6cf7 cmpb $0x1, 0x59(%rbx) jne 0x6cc3 leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x136f2(%rip), %rsi # 0x1a3a4 leaq 0x13708(%rip), %rdx # 0x1a3c1 movq %r14, %rdi callq 0x603a jmp 0x6ce4 movb $0x1, 0x59(%rbx) leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x13530(%rip), %rsi # 0x1a205 leaq 0x1352b(%rip), %rdx # 0x1a207 movq %r14, %rdi callq 0x603a movq %rbx, %rdi callq 0x52f0 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl %eax, %edi callq 0x5260 jmp 0x6d00 movq %rax, %r14 movq %rbx, %rdi callq 0x52f0 movq %r14, %rdi callq 0x5600 nop
_ZN8Settings8stopGameB5cxx11Ev: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, rsi call _pthread_mutex_lock test eax, eax jnz short loc_6CF7 cmp byte ptr [rbx+59h], 1 jnz short loc_6CC3 lea rax, [r14+10h] mov [r14], rax lea rsi, aGameHasAlready_0; "game has already been stopped" lea rdx, aGameHasAlready_0+1Dh; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) jmp short loc_6CE4 loc_6CC3: mov byte ptr [rbx+59h], 1 lea rax, [r14+10h] mov [r14], rax lea rsi, aOk; "ok" lea rdx, aOk+2; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_6CE4: mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 add rsp, 8 pop rbx pop r14 retn loc_6CF7: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp short $+2 loc_6D00: mov r14, rax mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
_QWORD * Settings::stopGame[abi:cxx11](_QWORD *a1, long long a2) { int v2; // eax v2 = pthread_mutex_lock(a2); if ( v2 ) std::__throw_system_error(v2); if ( *(_BYTE *)(a2 + 89) == 1 ) { *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "game has already been stopped", (long long)""); } else { *(_BYTE *)(a2 + 89) = 1; *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "ok", (long long)""); } pthread_mutex_unlock(a2); return a1; }
stopGame[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00105520 TEST EAX,EAX JNZ 0x00106cf7 CMP byte ptr [RBX + 0x59],0x1 JNZ 0x00106cc3 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX LAB_00106cab: LEA RSI,[0x11a3a4] LEA RDX,[0x11a3c1] MOV RDI,R14 CALL 0x0010603a JMP 0x00106ce4 LAB_00106cc3: MOV byte ptr [RBX + 0x59],0x1 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX LAB_00106cce: LEA RSI,[0x11a205] LEA RDX,[0x11a207] MOV RDI,R14 CALL 0x0010603a LAB_00106ce4: MOV RDI,RBX CALL 0x001052f0 MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET LAB_00106cf7: MOV EDI,EAX CALL 0x00105260
/* Settings::stopGame[abi:cxx11]() */ void Settings::stopGame_abi_cxx11_(void) { int iVar1; pthread_mutex_t *in_RSI; long *in_RDI; iVar1 = pthread_mutex_lock(in_RSI); if (iVar1 == 0) { if (*(char *)((long)in_RSI + 0x59) == '\x01') { *in_RDI = (long)(in_RDI + 2); /* try { // try from 00106cab to 00106cc0 has its CatchHandler @ 00106d00 */ std::__cxx11::string::_M_construct<char_const*>(); } else { *(int1 *)((long)in_RSI + 0x59) = 1; *in_RDI = (long)(in_RDI + 2); /* try { // try from 00106cce to 00106ce3 has its CatchHandler @ 00106cfe */ std::__cxx11::string::_M_construct<char_const*>(); } pthread_mutex_unlock(in_RSI); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); }
49,587
string_buffer_init2
bluesky950520[P]quickjs/quickjs.c
static int string_buffer_init2(JSContext *ctx, StringBuffer *s, int size, int is_wide) { s->ctx = ctx; s->size = size; s->len = 0; s->is_wide_char = is_wide; s->error_status = 0; s->str = js_alloc_string(ctx, size, is_wide); if (unlikely(!s->str)) { s->size = 0; return s->error_status = -1; } #ifdef DUMP_LEAKS /* the StringBuffer may reallocate the JSString, only link it at the end */ list_del(&s->str->link); #endif return 0; }
O0
c
string_buffer_init2: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movl %edx, 0xc(%rsp) movl %ecx, 0x8(%rsp) movq 0x18(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, (%rax) movl 0xc(%rsp), %ecx movq 0x10(%rsp), %rax movl %ecx, 0x14(%rax) movq 0x10(%rsp), %rax movl $0x0, 0x10(%rax) movl 0x8(%rsp), %ecx movq 0x10(%rsp), %rax movl %ecx, 0x18(%rax) movq 0x10(%rsp), %rax movl $0x0, 0x1c(%rax) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi movl 0x8(%rsp), %edx callq 0x284a0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x10(%rsp), %rax cmpq $0x0, 0x8(%rax) setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x4c7a3 movq 0x10(%rsp), %rax movl $0x0, 0x14(%rax) movq 0x10(%rsp), %rax movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x4c7ab movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
string_buffer_init2: 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 rcx, [rsp+28h+var_10] mov rax, [rsp+28h+var_18] mov [rax], rcx mov ecx, [rsp+28h+var_1C] mov rax, [rsp+28h+var_18] mov [rax+14h], ecx mov rax, [rsp+28h+var_18] mov dword ptr [rax+10h], 0 mov ecx, [rsp+28h+var_20] mov rax, [rsp+28h+var_18] mov [rax+18h], ecx mov rax, [rsp+28h+var_18] mov dword ptr [rax+1Ch], 0 mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_1C] mov edx, [rsp+28h+var_20] call js_alloc_string mov rcx, rax mov rax, [rsp+28h+var_18] mov [rax+8], rcx mov rax, [rsp+28h+var_18] cmp qword ptr [rax+8], 0 setnz al xor al, 0FFh xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_4C7A3 mov rax, [rsp+28h+var_18] mov dword ptr [rax+14h], 0 mov rax, [rsp+28h+var_18] mov dword ptr [rax+1Ch], 0FFFFFFFFh mov [rsp+28h+var_4], 0FFFFFFFFh jmp short loc_4C7AB loc_4C7A3: mov [rsp+28h+var_4], 0 loc_4C7AB: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long string_buffer_init2(long long a1, long long a2, unsigned int a3, unsigned int a4) { *(_QWORD *)a2 = a1; *(_DWORD *)(a2 + 20) = a3; *(_DWORD *)(a2 + 16) = 0; *(_DWORD *)(a2 + 24) = a4; *(_DWORD *)(a2 + 28) = 0; *(_QWORD *)(a2 + 8) = js_alloc_string(a1, a3, a4); if ( *(_QWORD *)(a2 + 8) ) { return 0; } else { *(_DWORD *)(a2 + 20) = 0; *(_DWORD *)(a2 + 28) = -1; return (unsigned int)-1; } }
string_buffer_init2: 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 RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x10],0x0 MOV ECX,dword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x18],ECX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x1c],0x0 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] MOV EDX,dword ptr [RSP + 0x8] CALL 0x001284a0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x8],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0014c7a3 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x1c],0xffffffff MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x0014c7ab LAB_0014c7a3: MOV dword ptr [RSP + 0x24],0x0 LAB_0014c7ab: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 string_buffer_init2(int8 param_1,int8 *param_2,int4 param_3,int4 param_4) { int8 uVar1; int4 local_4; *param_2 = param_1; *(int4 *)((long)param_2 + 0x14) = param_3; *(int4 *)(param_2 + 2) = 0; *(int4 *)(param_2 + 3) = param_4; *(int4 *)((long)param_2 + 0x1c) = 0; uVar1 = js_alloc_string(param_1,param_3,param_4); param_2[1] = uVar1; if (param_2[1] == 0) { *(int4 *)((long)param_2 + 0x14) = 0; *(int4 *)((long)param_2 + 0x1c) = 0xffffffff; local_4 = 0xffffffff; } else { local_4 = 0; } return local_4; }
49,588
pcmp
eloqsql/strings/ctype-simple.c
static int pcmp(const void * f, const void * s) { const uni_idx *F= (const uni_idx*) f; const uni_idx *S= (const uni_idx*) s; int res; if (!(res=((S->nchars)-(F->nchars)))) res=((F->uidx.from)-(S->uidx.to)); return res; }
O3
c
pcmp: pushq %rbp movq %rsp, %rbp movl (%rsi), %eax subl (%rdi), %eax jne 0xbc7bd movzwl 0x8(%rdi), %eax movzwl 0xa(%rsi), %ecx subl %ecx, %eax popq %rbp retq nop
pcmp: push rbp mov rbp, rsp mov eax, [rsi] sub eax, [rdi] jnz short loc_BC7BD movzx eax, word ptr [rdi+8] movzx ecx, word ptr [rsi+0Ah] sub eax, ecx loc_BC7BD: pop rbp retn
long long pcmp(long long a1, long long a2) { long long result; // rax result = (unsigned int)(*(_DWORD *)a2 - *(_DWORD *)a1); if ( *(_DWORD *)a2 == *(_DWORD *)a1 ) return *(unsigned __int16 *)(a1 + 8) - (unsigned int)*(unsigned __int16 *)(a2 + 10); return result; }
pcmp: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RSI] SUB EAX,dword ptr [RDI] JNZ 0x001bc7bd MOVZX EAX,word ptr [RDI + 0x8] MOVZX ECX,word ptr [RSI + 0xa] SUB EAX,ECX LAB_001bc7bd: POP RBP RET
int pcmp(int *param_1,int *param_2) { int iVar1; iVar1 = *param_2 - *param_1; if (iVar1 == 0) { iVar1 = (uint)*(ushort *)(param_1 + 2) - (uint)*(ushort *)((long)param_2 + 10); } return iVar1; }
49,589
addUniqueExtension(std::vector<char const*, std::allocator<char const*>>&, std::vector<VkExtensionProperties, std::allocator<VkExtensionProperties>> const&, char const*)
HansKristian-Work[P]pyroveil/layer-util/dispatch_helper.cpp
void addUniqueExtension(std::vector<const char *> &extensions, const std::vector<VkExtensionProperties> &allowed, const char *name) { for (auto *ext : extensions) if (strcmp(ext, name) == 0) return; for (auto &ext : allowed) { if (strcmp(ext.extensionName, name) == 0) { extensions.push_back(name); break; } } }
O0
cpp
addUniqueExtension(std::vector<char const*, std::allocator<char const*>>&, std::vector<VkExtensionProperties, std::allocator<VkExtensionProperties>> const&, char const*): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x16fe40 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x17c0e0 movq %rax, -0x30(%rbp) leaq -0x28(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x179660 testb $0x1, %al jne 0x28eb49 jmp 0x28eb7a leaq -0x28(%rbp), %rdi callq 0x177da0 movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x176050 cmpl $0x0, %eax jne 0x28eb6d jmp 0x28ebea jmp 0x28eb6f leaq -0x28(%rbp), %rdi callq 0x16a3b0 jmp 0x28eb36 movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi callq 0x28ee30 movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi callq 0x28ee60 movq %rax, -0x50(%rbp) leaq -0x48(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x28ee90 testb $0x1, %al jne 0x28ebaf jmp 0x28ebea leaq -0x48(%rbp), %rdi callq 0x28eed0 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x176050 cmpl $0x0, %eax jne 0x28ebdd movq -0x8(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0x173780 jmp 0x28ebea jmp 0x28ebdf leaq -0x48(%rbp), %rdi callq 0x28eef0 jmp 0x28eb9c addq $0x60, %rsp popq %rbp retq
_Z18addUniqueExtensionRSt6vectorIPKcSaIS1_EERKS_I21VkExtensionPropertiesSaIS5_EES1_: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rdi, [rbp+var_20] call __ZNSt6vectorIPKcSaIS1_EE5beginEv; std::vector<char const*>::begin(void) mov [rbp+var_28], rax mov rdi, [rbp+var_20] call __ZNSt6vectorIPKcSaIS1_EE3endEv; std::vector<char const*>::end(void) mov [rbp+var_30], rax loc_28EB36: lea rdi, [rbp+var_28] lea rsi, [rbp+var_30] call __ZN9__gnu_cxxneIPPKcSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<char const**,std::vector<char const*>>(__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&,__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&) test al, 1 jnz short loc_28EB49 jmp short loc_28EB7A loc_28EB49: lea rdi, [rbp+var_28] call __ZNK9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(void) mov rax, [rax] mov [rbp+var_38], rax mov rdi, [rbp+var_38] mov rsi, [rbp+var_18] call _strcmp cmp eax, 0 jnz short loc_28EB6D jmp short loc_28EBEA loc_28EB6D: jmp short $+2 loc_28EB6F: lea rdi, [rbp+var_28] call __ZN9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(void) jmp short loc_28EB36 loc_28EB7A: mov rax, [rbp+var_10] mov [rbp+var_40], rax mov rdi, [rbp+var_40] call _ZNKSt6vectorI21VkExtensionPropertiesSaIS0_EE5beginEv; std::vector<VkExtensionProperties>::begin(void) mov [rbp+var_48], rax mov rdi, [rbp+var_40] call _ZNKSt6vectorI21VkExtensionPropertiesSaIS0_EE3endEv; std::vector<VkExtensionProperties>::end(void) mov [rbp+var_50], rax loc_28EB9C: lea rdi, [rbp+var_48] lea rsi, [rbp+var_50] call _ZN9__gnu_cxxneIPK21VkExtensionPropertiesSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<VkExtensionProperties const*,std::vector<VkExtensionProperties>>(__gnu_cxx::__normal_iterator<VkExtensionProperties const*,std::vector<VkExtensionProperties>> const&,__gnu_cxx::__normal_iterator<VkExtensionProperties const*,std::vector<VkExtensionProperties>> const&) test al, 1 jnz short loc_28EBAF jmp short loc_28EBEA loc_28EBAF: lea rdi, [rbp+var_48] call _ZNK9__gnu_cxx17__normal_iteratorIPK21VkExtensionPropertiesSt6vectorIS1_SaIS1_EEEdeEv; __gnu_cxx::__normal_iterator<VkExtensionProperties const*,std::vector<VkExtensionProperties>>::operator*(void) mov [rbp+var_58], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_18] call _strcmp cmp eax, 0 jnz short loc_28EBDD mov rdi, [rbp+var_8] lea rsi, [rbp+var_18] call __ZNSt6vectorIPKcSaIS1_EE9push_backERKS1_; std::vector<char const*>::push_back(char const* const&) jmp short loc_28EBEA loc_28EBDD: jmp short $+2 loc_28EBDF: lea rdi, [rbp+var_48] call _ZN9__gnu_cxx17__normal_iteratorIPK21VkExtensionPropertiesSt6vectorIS1_SaIS1_EEEppEv; __gnu_cxx::__normal_iterator<VkExtensionProperties const*,std::vector<VkExtensionProperties>>::operator++(void) jmp short loc_28EB9C loc_28EBEA: add rsp, 60h pop rbp retn
long long addUniqueExtension(long long a1, long long a2, long long a3) { long long result; // rax long long v4; // [rsp+8h] [rbp-58h] long long v5; // [rsp+10h] [rbp-50h] BYREF long long v6; // [rsp+18h] [rbp-48h] BYREF long long v7; // [rsp+20h] [rbp-40h] long long v8; // [rsp+28h] [rbp-38h] long long v9; // [rsp+30h] [rbp-30h] BYREF _QWORD v10[2]; // [rsp+38h] [rbp-28h] BYREF long long v11; // [rsp+48h] [rbp-18h] BYREF long long v12; // [rsp+50h] [rbp-10h] long long v13; // [rsp+58h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10[1] = a1; v10[0] = std::vector<char const*>::begin(a1); v9 = std::vector<char const*>::end(a1); while ( (__gnu_cxx::operator!=<char const**,std::vector<char const*>>(v10, &v9) & 1) != 0 ) { v8 = *(_QWORD *)__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(v10); result = strcmp(v8, v11); if ( !(_DWORD)result ) return result; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(v10); } v7 = v12; v6 = std::vector<VkExtensionProperties>::begin(v12); v5 = std::vector<VkExtensionProperties>::end(v7); while ( 1 ) { result = __gnu_cxx::operator!=<VkExtensionProperties const*,std::vector<VkExtensionProperties>>(&v6, &v5); if ( (result & 1) == 0 ) break; v4 = __gnu_cxx::__normal_iterator<VkExtensionProperties const*,std::vector<VkExtensionProperties>>::operator*(&v6); if ( !(unsigned int)strcmp(v4, v11) ) return std::vector<char const*>::push_back(v13, &v11); __gnu_cxx::__normal_iterator<VkExtensionProperties const*,std::vector<VkExtensionProperties>>::operator++(&v6); } return result; }
~new_allocator: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI POP RBP RET
/* __gnu_cxx::new_allocator<std::__detail::_Hash_node<unsigned long, false> >::~new_allocator() */ void __thiscall __gnu_cxx::new_allocator<std::__detail::_Hash_node<unsigned_long,false>>::~new_allocator (new_allocator<std::__detail::_Hash_node<unsigned_long,false>> *this) { return; }
49,590
addUniqueExtension(std::vector<char const*, std::allocator<char const*>>&, std::vector<VkExtensionProperties, std::allocator<VkExtensionProperties>> const&, char const*)
HansKristian-Work[P]pyroveil/layer-util/dispatch_helper.cpp
void addUniqueExtension(std::vector<const char *> &extensions, const std::vector<VkExtensionProperties> &allowed, const char *name) { for (auto *ext : extensions) if (strcmp(ext, name) == 0) return; for (auto &ext : allowed) { if (strcmp(ext.extensionName, name) == 0) { extensions.push_back(name); break; } } }
O1
cpp
addUniqueExtension(std::vector<char const*, std::allocator<char const*>>&, std::vector<VkExtensionProperties, std::allocator<VkExtensionProperties>> const&, char const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r14 movq %rsi, %r12 movq %rdx, -0x38(%rbp) movq (%rdi), %r13 movq %rdi, -0x30(%rbp) movq 0x8(%rdi), %r15 cmpq %r15, %r13 sete %bl je 0x11b4d9 movq (%r13), %rdi movq %r14, %rsi callq 0x80010 testl %eax, %eax je 0x11b4d5 addq $0x8, %r13 cmpq %r15, %r13 sete %bl je 0x11b4d9 movq (%r13), %rdi movq %r14, %rsi callq 0x80010 addq $0x8, %r13 testl %eax, %eax jne 0x11b4b9 testb %bl, %bl je 0x11b51f movq (%r12), %r13 movq 0x8(%r12), %rbx cmpq %rbx, %r13 je 0x11b51f movq %r13, %rdi movq %r14, %rsi callq 0x80010 testl %eax, %eax je 0x11b4ff addq $0x104, %r13 # imm = 0x104 jmp 0x11b4e2 movq -0x30(%rbp), %rdi cmpq 0x10(%rdi), %r15 je 0x11b513 movq %r14, (%r15) addq $0x8, 0x8(%rdi) jmp 0x11b51f leaq -0x38(%rbp), %rdx movq %r15, %rsi callq 0x80c40 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z18addUniqueExtensionRSt6vectorIPKcSaIS1_EERKS_I21VkExtensionPropertiesSaIS5_EES1_: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdx mov r12, rsi mov [rbp+var_38], rdx mov r13, [rdi] mov [rbp+var_30], rdi mov r15, [rdi+8] cmp r13, r15 setz bl jz short loc_11B4D9 mov rdi, [r13+0] mov rsi, r14 call _strcmp test eax, eax jz short loc_11B4D5 add r13, 8 loc_11B4B9: cmp r13, r15 setz bl jz short loc_11B4D9 mov rdi, [r13+0] mov rsi, r14 call _strcmp add r13, 8 test eax, eax jnz short loc_11B4B9 loc_11B4D5: test bl, bl jz short loc_11B51F loc_11B4D9: mov r13, [r12] mov rbx, [r12+8] loc_11B4E2: cmp r13, rbx jz short loc_11B51F mov rdi, r13 mov rsi, r14 call _strcmp test eax, eax jz short loc_11B4FF add r13, 104h jmp short loc_11B4E2 loc_11B4FF: mov rdi, [rbp+var_30] cmp r15, [rdi+10h] jz short loc_11B513 mov [r15], r14 add qword ptr [rdi+8], 8 jmp short loc_11B51F loc_11B513: lea rdx, [rbp+var_38] mov rsi, r15 call __ZNSt6vectorIPKcSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<char const*>::_M_realloc_insert<char const* const&>(__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>,char const* const&) loc_11B51F: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void addUniqueExtension(_QWORD *a1, long long *a2, long long a3) { _QWORD *v4; // r13 _QWORD *v5; // r15 bool v6; // bl _QWORD *v7; // r13 int v8; // eax long long v9; // r13 long long v10; // rbx _QWORD *v11; // rdi long long v12; // [rsp+8h] [rbp-38h] BYREF _QWORD *v13; // [rsp+10h] [rbp-30h] v12 = a3; v4 = (_QWORD *)*a1; v13 = a1; v5 = (_QWORD *)a1[1]; v6 = v4 == v5; if ( v4 != v5 ) { if ( !(unsigned int)strcmp(*v4, a3) ) { LABEL_6: if ( !v6 ) return; } else { v7 = v4 + 1; while ( 1 ) { v6 = v7 == v5; if ( v7 == v5 ) break; v8 = strcmp(*v7++, a3); if ( !v8 ) goto LABEL_6; } } } v9 = *a2; v10 = a2[1]; while ( v9 != v10 ) { if ( !(unsigned int)strcmp(v9, a3) ) { v11 = v13; if ( v5 == (_QWORD *)v13[2] ) { std::vector<char const*>::_M_realloc_insert<char const* const&>(v13, v5, &v12); } else { *v5 = a3; v11[1] += 8LL; } return; } v9 += 260LL; } }
49,591
addUniqueExtension(std::vector<char const*, std::allocator<char const*>>&, std::vector<VkExtensionProperties, std::allocator<VkExtensionProperties>> const&, char const*)
HansKristian-Work[P]pyroveil/layer-util/dispatch_helper.cpp
void addUniqueExtension(std::vector<const char *> &extensions, const std::vector<VkExtensionProperties> &allowed, const char *name) { for (auto *ext : extensions) if (strcmp(ext, name) == 0) return; for (auto &ext : allowed) { if (strcmp(ext.extensionName, name) == 0) { extensions.push_back(name); break; } } }
O2
cpp
addUniqueExtension(std::vector<char const*, std::allocator<char const*>>&, std::vector<VkExtensionProperties, std::allocator<VkExtensionProperties>> const&, char const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rdx, -0x30(%rbp) movq (%rdi), %r12 movq 0x8(%rdi), %r13 cmpq %r13, %r12 je 0x1251ac movq (%r12), %rdi movq %r14, %rsi callq 0xa4260 addq $0x8, %r12 testl %eax, %eax jne 0x125191 jmp 0x1251da movq (%r15), %r12 movq 0x8(%r15), %r15 cmpq %r15, %r12 je 0x1251da movq %r12, %rdi movq %r14, %rsi callq 0xa4260 addq $0x104, %r12 # imm = 0x104 testl %eax, %eax jne 0x1251b3 leaq -0x30(%rbp), %rsi movq %rbx, %rdi callq 0xa5710 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z18addUniqueExtensionRSt6vectorIPKcSaIS1_EERKS_I21VkExtensionPropertiesSaIS5_EES1_: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi mov [rbp+var_30], rdx mov r12, [rdi] mov r13, [rdi+8] loc_125191: cmp r12, r13 jz short loc_1251AC mov rdi, [r12] mov rsi, r14 call _strcmp add r12, 8 test eax, eax jnz short loc_125191 jmp short loc_1251DA loc_1251AC: mov r12, [r15] mov r15, [r15+8] loc_1251B3: cmp r12, r15 jz short loc_1251DA mov rdi, r12 mov rsi, r14 call _strcmp add r12, 104h test eax, eax jnz short loc_1251B3 lea rsi, [rbp+var_30] mov rdi, rbx call __ZNSt6vectorIPKcSaIS1_EE9push_backERKS1_; std::vector<char const*>::push_back(char const* const&) loc_1251DA: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void addUniqueExtension(_QWORD *a1, long long *a2, long long a3) { _QWORD *v4; // r12 _QWORD *v5; // r13 int v6; // eax long long v7; // r12 long long v8; // r15 int v9; // eax _QWORD v10[6]; // [rsp+0h] [rbp-30h] BYREF v10[0] = a3; v4 = (_QWORD *)*a1; v5 = (_QWORD *)a1[1]; while ( v4 != v5 ) { v6 = strcmp(*v4++, a3); if ( !v6 ) return; } v7 = *a2; v8 = a2[1]; while ( v7 != v8 ) { v9 = strcmp(v7, a3); v7 += 260LL; if ( !v9 ) { std::vector<char const*>::push_back(a1, v10); return; } } }
49,592
addUniqueExtension(std::vector<char const*, std::allocator<char const*>>&, std::vector<VkExtensionProperties, std::allocator<VkExtensionProperties>> const&, char const*)
HansKristian-Work[P]pyroveil/layer-util/dispatch_helper.cpp
void addUniqueExtension(std::vector<const char *> &extensions, const std::vector<VkExtensionProperties> &allowed, const char *name) { for (auto *ext : extensions) if (strcmp(ext, name) == 0) return; for (auto &ext : allowed) { if (strcmp(ext.extensionName, name) == 0) { extensions.push_back(name); break; } } }
O3
cpp
addUniqueExtension(std::vector<char const*, std::allocator<char const*>>&, std::vector<VkExtensionProperties, std::allocator<VkExtensionProperties>> const&, char const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movq %rdx, -0x30(%rbp) movq (%rdi), %r13 movq 0x8(%rdi), %r15 cmpq %r15, %r13 je 0x118a3b movq (%r13), %rdi movq %r14, %rsi callq 0x7efd0 testl %eax, %eax je 0x118a80 addq $0x8, %r13 jmp 0x118a20 movq (%r12), %r13 movq 0x8(%r12), %r12 cmpq %r12, %r13 je 0x118a80 movq %r13, %rdi movq %r14, %rsi callq 0x7efd0 testl %eax, %eax je 0x118a61 addq $0x104, %r13 # imm = 0x104 jmp 0x118a44 cmpq 0x10(%rbx), %r15 je 0x118a71 movq %r14, (%r15) addq $0x8, 0x8(%rbx) jmp 0x118a80 leaq -0x30(%rbp), %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x7fb90 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z18addUniqueExtensionRSt6vectorIPKcSaIS1_EERKS_I21VkExtensionPropertiesSaIS5_EES1_: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov r12, rsi mov rbx, rdi mov [rbp+var_30], rdx mov r13, [rdi] mov r15, [rdi+8] loc_118A20: cmp r13, r15 jz short loc_118A3B mov rdi, [r13+0] mov rsi, r14 call _strcmp test eax, eax jz short loc_118A80 add r13, 8 jmp short loc_118A20 loc_118A3B: mov r13, [r12] mov r12, [r12+8] loc_118A44: cmp r13, r12 jz short loc_118A80 mov rdi, r13 mov rsi, r14 call _strcmp test eax, eax jz short loc_118A61 add r13, 104h jmp short loc_118A44 loc_118A61: cmp r15, [rbx+10h] jz short loc_118A71 mov [r15], r14 add qword ptr [rbx+8], 8 jmp short loc_118A80 loc_118A71: lea rdx, [rbp+var_30] mov rdi, rbx mov rsi, r15 call __ZNSt6vectorIPKcSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<char const*>::_M_realloc_insert<char const* const&>(__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>,char const* const&) loc_118A80: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void addUniqueExtension(_QWORD *a1, long long *a2, long long a3) { _QWORD *v4; // r13 _QWORD *v5; // r15 long long v6; // r13 long long v7; // r12 _QWORD v8[6]; // [rsp+0h] [rbp-30h] BYREF v8[0] = a3; v4 = (_QWORD *)*a1; v5 = (_QWORD *)a1[1]; while ( v4 != v5 ) { if ( !(unsigned int)strcmp(*v4, a3) ) return; ++v4; } v6 = *a2; v7 = a2[1]; while ( v6 != v7 ) { if ( !(unsigned int)strcmp(v6, a3) ) { if ( v5 == (_QWORD *)a1[2] ) { std::vector<char const*>::_M_realloc_insert<char const* const&>(a1, v5, v8); } else { *v5 = a3; a1[1] += 8LL; } return; } v6 += 260LL; } }
49,593
ma_crypt_index_pre_write_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_index_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint block_size= share->block_size; const uint page_used= _ma_get_page_used(share, args->page); uint key_version; uchar *crypt_buf= my_malloc(PSI_INSTRUMENT_ME, block_size, MYF(0)); if (crypt_buf == NULL) { args->crypt_buf= NULL; /* for post-hook */ return 1; } if (!share->base.born_transactional) { /* store a random number instead of LSN (for counter block) */ store_rand_lsn(args->page); } maria_page_crc_set_index(args); { const uchar *src= args->page; uchar* dst= crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uint head= share->keypage_header; const uint tail= CRC_SIZE; /* page_used includes header (but not trailer) */ const uint size= page_used - head; /* 1 - copy head */ memcpy(dst, src, head); /* 2 - encrypt page */ if (ma_encrypt(share, share->crypt_data, src + head, dst + head, size, pageno, lsn, &key_version)) { my_free(crypt_buf); return 1; } /* 3 - copy tail */ memcpy(dst + block_size - tail, src + block_size - tail, tail); /* 4 - store key version */ _ma_store_key_version(share, dst, key_version); #ifdef HAVE_valgrind /* 5 - keep valgrind happy by zeroing not used bytes */ bzero(dst+head+size, block_size - size - tail - head); #endif } /* swap pointers to instead write out the encrypted block */ args->crypt_buf= args->page; args->page= crypt_buf; return 0; }
O0
c
ma_crypt_index_pre_write_hook: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x18(%rbp), %rcx movl 0x744(%rcx), %ecx movzbl -0x1(%rax,%rcx), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movq -0x18(%rbp), %rdx movl 0x744(%rdx), %edx movzbl -0x2(%rcx,%rdx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax movl %eax, %esi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0xf3820 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x89a55 movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movb $0x1, -0x1(%rbp) jmp 0x89ba4 movq -0x18(%rbp), %rax cmpb $0x0, 0x44c(%rax) jne 0x89a6e movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x89d70 movq -0x10(%rbp), %rdi callq 0x41240 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl %eax, -0x44(%rbp) movq -0x38(%rbp), %rax movzbl (%rax), %eax movq -0x38(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x38(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x38(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax movl 0x744(%rax), %eax movl %eax, -0x54(%rbp) movl $0x4, -0x58(%rbp) movl -0x20(%rbp), %eax subl -0x54(%rbp), %eax movl %eax, -0x5c(%rbp) movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rsi movl -0x54(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x18(%rbp), %rdi movq -0x18(%rbp), %rax movq 0xc20(%rax), %rsi movq -0x38(%rbp), %rdx movl -0x54(%rbp), %eax addq %rax, %rdx movq -0x40(%rbp), %rcx movl -0x54(%rbp), %eax addq %rax, %rcx movl -0x5c(%rbp), %r8d movl -0x44(%rbp), %r9d movq -0x50(%rbp), %r10 leaq -0x24(%rbp), %rax movq %r10, (%rsp) movq %rax, 0x8(%rsp) callq 0x89e20 cmpl $0x0, %eax je 0x89b4e movq -0x30(%rbp), %rdi callq 0xf3ba0 movb $0x1, -0x1(%rbp) jmp 0x89ba4 movq -0x40(%rbp), %rax movl -0x1c(%rbp), %ecx movq -0x38(%rbp), %rdx movl -0x1c(%rbp), %esi movl -0x4(%rdx,%rsi), %edx movl %edx, -0x4(%rax,%rcx) movq -0x40(%rbp), %rax movq -0x18(%rbp), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax addq $-0x8, %rax movq %rax, -0x68(%rbp) movl -0x24(%rbp), %ecx movq -0x68(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x80, %rsp popq %rbp retq
ma_crypt_index_pre_write_hook: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_18] mov ecx, [rcx+744h] movzx eax, byte ptr [rax+rcx-1] movzx eax, ax mov rcx, [rbp+var_10] mov rcx, [rcx] mov rdx, [rbp+var_18] mov edx, [rdx+744h] movzx ecx, byte ptr [rcx+rdx-2] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_20], eax mov eax, [rbp+var_1C] mov esi, eax xor edi, edi xor eax, eax mov edx, eax call my_malloc mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_89A55 mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov [rbp+var_1], 1 jmp loc_89BA4 loc_89A55: mov rax, [rbp+var_18] cmp byte ptr [rax+44Ch], 0 jnz short loc_89A6E mov rax, [rbp+var_10] mov rdi, [rax] call store_rand_lsn loc_89A6E: mov rdi, [rbp+var_10] call maria_page_crc_set_index mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_30] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_44], eax mov rax, [rbp+var_38] movzx eax, byte ptr [rax] mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_38] mov ecx, [rcx+3] or rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_18] mov eax, [rax+744h] mov [rbp+var_54], eax mov [rbp+var_58], 4 mov eax, [rbp+var_20] sub eax, [rbp+var_54] mov [rbp+var_5C], eax mov rdi, [rbp+var_40] mov rsi, [rbp+var_38] mov eax, [rbp+var_54] mov edx, eax call _memcpy mov rdi, [rbp+var_18] mov rax, [rbp+var_18] mov rsi, [rax+0C20h] mov rdx, [rbp+var_38] mov eax, [rbp+var_54] add rdx, rax mov rcx, [rbp+var_40] mov eax, [rbp+var_54] add rcx, rax mov r8d, [rbp+var_5C] mov r9d, [rbp+var_44] mov r10, [rbp+var_50] lea rax, [rbp+var_24] mov [rsp+80h+var_80], r10 mov [rsp+80h+var_78], rax call ma_encrypt cmp eax, 0 jz short loc_89B4E mov rdi, [rbp+var_30] call my_free mov [rbp+var_1], 1 jmp short loc_89BA4 loc_89B4E: mov rax, [rbp+var_40] mov ecx, [rbp+var_1C] mov rdx, [rbp+var_38] mov esi, [rbp+var_1C] mov edx, [rdx+rsi-4] mov [rax+rcx-4], edx mov rax, [rbp+var_40] mov rcx, [rbp+var_18] mov ecx, [rcx+744h] add rax, rcx add rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_68], rax mov ecx, [rbp+var_24] mov rax, [rbp+var_68] mov [rax], ecx mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_1], 0 loc_89BA4: mov al, [rbp+var_1] add rsp, 80h pop rbp retn
char ma_crypt_index_pre_write_hook(long long *a1) { unsigned int v2; // [rsp+2Ch] [rbp-54h] unsigned long long v3; // [rsp+30h] [rbp-50h] int v4; // [rsp+3Ch] [rbp-44h] unsigned __int16 *v5; // [rsp+48h] [rbp-38h] long long v6; // [rsp+50h] [rbp-30h] int v7; // [rsp+5Ch] [rbp-24h] BYREF int v8; // [rsp+60h] [rbp-20h] unsigned int v9; // [rsp+64h] [rbp-1Ch] long long v10; // [rsp+68h] [rbp-18h] long long *v11; // [rsp+70h] [rbp-10h] v11 = a1; v10 = a1[2]; v9 = *(_DWORD *)(v10 + 1980); v8 = _byteswap_ushort(*(_WORD *)(*a1 + *(unsigned int *)(v10 + 1860) - 2)); v6 = my_malloc(0LL, v9, 0LL); if ( v6 ) { if ( !*(_BYTE *)(v10 + 1100) ) store_rand_lsn(*v11); maria_page_crc_set_index(v11); v5 = (unsigned __int16 *)*v11; v4 = v11[1]; v3 = *(unsigned int *)(*v11 + 3) | ((unsigned long long)((*((unsigned __int8 *)v5 + 2) << 16) | (unsigned int)*v5) << 32); v2 = *(_DWORD *)(v10 + 1860); memcpy(v6, *v11, v2); if ( (unsigned int)ma_encrypt( v10, *(_QWORD *)(v10 + 3104), v2 + (unsigned int)v5, v2 + (unsigned int)v6, v8 - v2, v4, v3, (long long)&v7) ) { my_free(v6); return 1; } else { *(_DWORD *)(v6 + v9 - 4) = *(_DWORD *)((char *)v5 + v9 - 4); *(_DWORD *)(*(unsigned int *)(v10 + 1860) + v6 - 8) = v7; v11[3] = *v11; *v11 = v6; return 0; } } else { v11[3] = 0LL; return 1; } }
ma_crypt_index_pre_write_hook: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x744] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RDX + 0x744] MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV ESI,EAX XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x001f3820 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x00189a55 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00189ba4 LAB_00189a55: MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x44c],0x0 JNZ 0x00189a6e MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00189d70 LAB_00189a6e: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00141240 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x744] MOV dword ptr [RBP + -0x54],EAX MOV dword ptr [RBP + -0x58],0x4 MOV EAX,dword ptr [RBP + -0x20] SUB EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x5c],EAX MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x54] MOV EDX,EAX CALL 0x0012a090 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0xc20] MOV RDX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x54] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x54] ADD RCX,RAX MOV R8D,dword ptr [RBP + -0x5c] MOV R9D,dword ptr [RBP + -0x44] MOV R10,qword ptr [RBP + -0x50] LEA RAX,[RBP + -0x24] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX CALL 0x00189e20 CMP EAX,0x0 JZ 0x00189b4e MOV RDI,qword ptr [RBP + -0x30] CALL 0x001f3ba0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00189ba4 LAB_00189b4e: MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4] MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX ADD RAX,-0x8 MOV qword ptr [RBP + -0x68],RAX MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x68] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_00189ba4: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x80 POP RBP RET
int1 ma_crypt_index_pre_write_hook(long *param_1) { int4 uVar1; uint uVar2; int3 *__src; ulong uVar3; int3 uVar4; int iVar5; void *__dest; int4 local_2c; uint local_28; uint local_24; long local_20; long *local_18; int1 local_9; local_20 = param_1[2]; local_24 = *(uint *)(local_20 + 0x7bc); local_28 = (uint)CONCAT11(*(int1 *)(*param_1 + -2 + (ulong)*(uint *)(local_20 + 0x744)), *(int1 *)(*param_1 + -1 + (ulong)*(uint *)(local_20 + 0x744))); local_18 = param_1; __dest = (void *)my_malloc(0,local_24,0); if (__dest == (void *)0x0) { local_18[3] = 0; local_9 = 1; } else { if (*(char *)(local_20 + 0x44c) == '\0') { store_rand_lsn(*local_18); } maria_page_crc_set_index(local_18); __src = (int3 *)*local_18; uVar3 = local_18[1]; uVar4 = *__src; uVar1 = *(int4 *)((long)__src + 3); uVar2 = *(uint *)(local_20 + 0x744); iVar5 = local_28 - uVar2; memcpy(__dest,__src,(ulong)uVar2); iVar5 = ma_encrypt(local_20,*(int8 *)(local_20 + 0xc20),(long)__src + (ulong)uVar2, (long)__dest + (ulong)uVar2,iVar5,uVar3 & 0xffffffff, (ulong)CONCAT34(uVar4,uVar1),&local_2c); if (iVar5 == 0) { *(int4 *)((long)__dest + ((ulong)local_24 - 4)) = *(int4 *)((long)__src + ((ulong)local_24 - 4)); *(int4 *)((long)__dest + ((ulong)*(uint *)(local_20 + 0x744) - 8)) = local_2c; local_18[3] = *local_18; *local_18 = (long)__dest; local_9 = 0; } else { my_free(__dest); local_9 = 1; } } return local_9; }
49,594
ftxui::ComponentBase::~ComponentBase()
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/component.cpp
ComponentBase::~ComponentBase() { DetachAllChildren(); }
O1
cpp
ftxui::ComponentBase::~ComponentBase(): pushq %rbx movq %rdi, %rbx leaq 0x319e5(%rip), %rax # 0x58cc8 movq %rax, (%rdi) movq 0x8(%rdi), %rax cmpq 0x10(%rdi), %rax je 0x27302 movq (%rax), %rdi callq 0x273d2 movq 0x8(%rbx), %rax cmpq 0x10(%rbx), %rax jne 0x272f0 addq $0x8, %rbx movq %rbx, %rdi popq %rbx jmp 0x14b3c movq %rax, %rdi callq 0x106a9 nop
_ZN5ftxui13ComponentBaseD2Ev: push rbx; Alternative name is 'ftxui::ComponentBase::~ComponentBase()' mov rbx, rdi lea rax, off_58CC8 mov [rdi], rax mov rax, [rdi+8] cmp rax, [rdi+10h] jz short loc_27302 loc_272F0: mov rdi, [rax]; this call _ZN5ftxui13ComponentBase6DetachEv; ftxui::ComponentBase::Detach(void) mov rax, [rbx+8] cmp rax, [rbx+10h] jnz short loc_272F0 loc_27302: add rbx, 8 mov rdi, rbx pop rbx jmp _ZNSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::ComponentBase>>::~vector() mov rdi, rax call __clang_call_terminate
void ftxui::ComponentBase::~ComponentBase(ftxui::ComponentBase *this) { ftxui::ComponentBase **i; // rax *(_QWORD *)this = off_58CC8; for ( i = (ftxui::ComponentBase **)*((_QWORD *)this + 1); i != *((ftxui::ComponentBase ***)this + 2); i = (ftxui::ComponentBase **)*((_QWORD *)this + 1) ) { ftxui::ComponentBase::Detach(*i); } std::vector<std::shared_ptr<ftxui::ComponentBase>>::~vector((long long)this + 8); }
~ComponentBase: PUSH RBX MOV RBX,RDI LEA RAX,[0x158cc8] MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RDI + 0x8] CMP RAX,qword ptr [RDI + 0x10] JZ 0x00127302 LAB_001272f0: MOV RDI,qword ptr [RAX] LAB_001272f3: CALL 0x001273d2 MOV RAX,qword ptr [RBX + 0x8] CMP RAX,qword ptr [RBX + 0x10] JNZ 0x001272f0 LAB_00127302: ADD RBX,0x8 MOV RDI,RBX POP RBX JMP 0x00114b3c
/* ftxui::ComponentBase::~ComponentBase() */ void __thiscall ftxui::ComponentBase::~ComponentBase(ComponentBase *this) { int8 *puVar1; *(int ***)this = &PTR__ComponentBase_00158cc8; puVar1 = *(int8 **)(this + 8); if (puVar1 != *(int8 **)(this + 0x10)) { do { /* try { // try from 001272f3 to 001272f7 has its CatchHandler @ 0012730f */ Detach((ComponentBase *)*puVar1); puVar1 = *(int8 **)(this + 8); } while (puVar1 != *(int8 **)(this + 0x10)); } std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::~vector((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)(this + 8)); return; }
49,595
my_uca_add_contraction
eloqsql/strings/ctype-uca.c
static MY_CONTRACTION * my_uca_add_contraction(MY_CONTRACTIONS *list, my_wc_t *wc, size_t len, my_bool with_context) { MY_CONTRACTION *next= &list->item[list->nitems]; size_t i; /* Contraction is always at least 2 characters. Contraction is never longer than MY_UCA_MAX_CONTRACTION, which is guaranteed by using my_coll_rule_expand() with proper limit. */ DBUG_ASSERT(len > 1 && len <= MY_UCA_MAX_CONTRACTION); for (i= 0; i < len; i++) { /* We don't support contractions with U+0000. my_coll_rule_expand() guarantees there're no U+0000 in a contraction. */ DBUG_ASSERT(wc[i] != 0); next->ch[i]= wc[i]; } if (i < MY_UCA_MAX_CONTRACTION) next->ch[i]= 0; /* Add end-of-line marker */ next->with_context= with_context; list->nitems++; return next; }
O0
c
my_uca_add_contraction: pushq %rbp movq %rsp, %rbp movb %cl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movb %al, -0x19(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx imulq $0x58, (%rcx), %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x56d7e movq $0x0, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x56dba jmp 0x56d92 jmp 0x56d94 movq -0x10(%rbp), %rax movq -0x30(%rbp), %rcx movq (%rax,%rcx,8), %rdx movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x56d86 cmpq $0x6, -0x30(%rbp) jae 0x56dd1 movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movq $0x0, (%rax,%rcx,8) movb -0x19(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, 0x52(%rax) movq -0x8(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x28(%rbp), %rax popq %rbp retq nop
my_uca_add_contraction: push rbp mov rbp, rsp mov al, cl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_19], al mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] imul rcx, [rcx], 58h ; 'X' add rax, rcx mov [rbp+var_28], rax jmp short $+2 loc_56D7E: mov [rbp+var_30], 0 loc_56D86: mov rax, [rbp+var_30] cmp rax, [rbp+var_18] jnb short loc_56DBA jmp short $+2 loc_56D92: jmp short $+2 loc_56D94: mov rax, [rbp+var_10] mov rcx, [rbp+var_30] mov rdx, [rax+rcx*8] mov rax, [rbp+var_28] mov rcx, [rbp+var_30] mov [rax+rcx*8], rdx mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_56D86 loc_56DBA: cmp [rbp+var_30], 6 jnb short loc_56DD1 mov rax, [rbp+var_28] mov rcx, [rbp+var_30] mov qword ptr [rax+rcx*8], 0 loc_56DD1: mov cl, [rbp+var_19] mov rax, [rbp+var_28] mov [rax+52h], cl mov rax, [rbp+var_8] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_28] pop rbp retn
long long my_uca_add_contraction(_QWORD *a1, long long a2, unsigned long long a3, char a4) { unsigned long long i; // [rsp+0h] [rbp-30h] long long v6; // [rsp+8h] [rbp-28h] v6 = 88LL * *a1 + a1[1]; for ( i = 0LL; i < a3; ++i ) *(_QWORD *)(v6 + 8 * i) = *(_QWORD *)(a2 + 8 * i); if ( i < 6 ) *(_QWORD *)(v6 + 8 * i) = 0LL; *(_BYTE *)(v6 + 82) = a4; ++*a1; return v6; }
my_uca_add_contraction: PUSH RBP MOV RBP,RSP MOV AL,CL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] IMUL RCX,qword ptr [RCX],0x58 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x00156d7e LAB_00156d7e: MOV qword ptr [RBP + -0x30],0x0 LAB_00156d86: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x18] JNC 0x00156dba JMP 0x00156d92 LAB_00156d92: JMP 0x00156d94 LAB_00156d94: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x00156d86 LAB_00156dba: CMP qword ptr [RBP + -0x30],0x6 JNC 0x00156dd1 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + RCX*0x8],0x0 LAB_00156dd1: MOV CL,byte ptr [RBP + -0x19] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x52],CL MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] POP RBP RET
long my_uca_add_contraction(long *param_1,long param_2,ulong param_3,int1 param_4) { long lVar1; ulong local_38; lVar1 = param_1[1] + *param_1 * 0x58; for (local_38 = 0; local_38 < param_3; local_38 = local_38 + 1) { *(int8 *)(lVar1 + local_38 * 8) = *(int8 *)(param_2 + local_38 * 8); } if (local_38 < 6) { *(int8 *)(lVar1 + local_38 * 8) = 0; } *(int1 *)(lVar1 + 0x52) = param_4; *param_1 = *param_1 + 1; return lVar1; }
49,596
add_cfg_dir
eloqsql/libmariadb/libmariadb/ma_default.c
static int add_cfg_dir(char **cfg_dirs, const char *directory) { int i; for (i = 0; i < MAX_CONFIG_DIRS && cfg_dirs[i]; i++) if (!strcmp(cfg_dirs[i], directory)) /* already present */ return 0; if (i < MAX_CONFIG_DIRS) { cfg_dirs[i]= strdup(directory); return 0; } return 1; }
O0
c
add_cfg_dir: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl $0x0, -0x1c(%rbp) xorl %eax, %eax cmpl $0x6, -0x1c(%rbp) movb %al, -0x1d(%rbp) jge 0x46e75 movq -0x10(%rbp), %rax movslq -0x1c(%rbp), %rcx cmpq $0x0, (%rax,%rcx,8) setne %al movb %al, -0x1d(%rbp) movb -0x1d(%rbp), %al testb $0x1, %al jne 0x46e7e jmp 0x46eae movq -0x10(%rbp), %rax movslq -0x1c(%rbp), %rcx movq (%rax,%rcx,8), %rdi movq -0x18(%rbp), %rsi callq 0x135f0 cmpl $0x0, %eax jne 0x46ea1 movl $0x0, -0x4(%rbp) jmp 0x46edc jmp 0x46ea3 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x46e57 cmpl $0x6, -0x1c(%rbp) jge 0x46ed5 movq -0x18(%rbp), %rdi callq 0x137a0 movq %rax, %rdx movq -0x10(%rbp), %rax movslq -0x1c(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movl $0x0, -0x4(%rbp) jmp 0x46edc movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
add_cfg_dir: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], 0 loc_46E57: xor eax, eax cmp [rbp+var_1C], 6 mov [rbp+var_1D], al jge short loc_46E75 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1C] cmp qword ptr [rax+rcx*8], 0 setnz al mov [rbp+var_1D], al loc_46E75: mov al, [rbp+var_1D] test al, 1 jnz short loc_46E7E jmp short loc_46EAE loc_46E7E: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1C] mov rdi, [rax+rcx*8] mov rsi, [rbp+var_18] call _strcmp cmp eax, 0 jnz short loc_46EA1 mov [rbp+var_4], 0 jmp short loc_46EDC loc_46EA1: jmp short $+2 loc_46EA3: mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_46E57 loc_46EAE: cmp [rbp+var_1C], 6 jge short loc_46ED5 mov rdi, [rbp+var_18] call _strdup mov rdx, rax mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1C] mov [rax+rcx*8], rdx mov [rbp+var_4], 0 jmp short loc_46EDC loc_46ED5: mov [rbp+var_4], 1 loc_46EDC: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long add_cfg_dir(long long a1, long long a2) { bool v3; // [rsp+3h] [rbp-1Dh] int i; // [rsp+4h] [rbp-1Ch] for ( i = 0; ; ++i ) { v3 = 0; if ( i < 6 ) v3 = *(_QWORD *)(a1 + 8LL * i) != 0LL; if ( !v3 ) break; if ( !(unsigned int)strcmp(*(_QWORD *)(a1 + 8LL * i), a2) ) return 0; } if ( i >= 6 ) { return 1; } else { *(_QWORD *)(a1 + 8LL * i) = strdup(a2); return 0; } }
add_cfg_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],0x0 LAB_00146e57: XOR EAX,EAX CMP dword ptr [RBP + -0x1c],0x6 MOV byte ptr [RBP + -0x1d],AL JGE 0x00146e75 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 SETNZ AL MOV byte ptr [RBP + -0x1d],AL LAB_00146e75: MOV AL,byte ptr [RBP + -0x1d] TEST AL,0x1 JNZ 0x00146e7e JMP 0x00146eae LAB_00146e7e: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001135f0 CMP EAX,0x0 JNZ 0x00146ea1 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00146edc LAB_00146ea1: JMP 0x00146ea3 LAB_00146ea3: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x00146e57 LAB_00146eae: CMP dword ptr [RBP + -0x1c],0x6 JGE 0x00146ed5 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001137a0 MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x1c] MOV qword ptr [RAX + RCX*0x8],RDX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00146edc LAB_00146ed5: MOV dword ptr [RBP + -0x4],0x1 LAB_00146edc: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 add_cfg_dir(long param_1,char *param_2) { int iVar1; char *pcVar2; bool bVar3; int local_24; local_24 = 0; while( true ) { bVar3 = false; if (local_24 < 6) { bVar3 = *(long *)(param_1 + (long)local_24 * 8) != 0; } if (!bVar3) break; iVar1 = strcmp(*(char **)(param_1 + (long)local_24 * 8),param_2); if (iVar1 == 0) { return 0; } local_24 = local_24 + 1; } if (local_24 < 6) { pcVar2 = strdup(param_2); *(char **)(param_1 + (long)local_24 * 8) = pcVar2; return 0; } return 1; }
49,597
get_head_or_tail_page
eloqsql/storage/maria/ma_blockrec.c
static my_bool get_head_or_tail_page(MARIA_HA *info, const MARIA_BITMAP_BLOCK *block, uchar *buff, uint length, uint page_type, enum pagecache_page_lock lock, struct st_row_pos_info *res) { uint block_size; MARIA_PINNED_PAGE page_link; MARIA_SHARE *share= info->s; DBUG_ENTER("get_head_or_tail_page"); DBUG_PRINT("enter", ("page_type: %u length: %u", page_type, length)); block_size= share->block_size; if (block->org_bitmap_value == 0) /* Empty block */ { /* New page */ make_empty_page(info, buff, page_type, 1); res->buff= buff; res->empty_space= res->length= (block_size - PAGE_OVERHEAD_SIZE(share)); res->data= (buff + PAGE_HEADER_SIZE(share)); res->dir= res->data + res->length; res->rownr= 0; DBUG_ASSERT(length <= res->length); } else { uchar *dir; /* Read old page */ page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; res->buff= pagecache_read(share->pagecache, &info->dfile, block->page, 0, 0, share->page_type, lock, &page_link.link); page_link.changed= res->buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!page_link.changed) { _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type); if (!(dir= find_free_position(info, res->buff, block_size, &res->rownr, &res->length, &res->empty_space, page_type == HEAD_PAGE))) goto crashed; if (res->length < length) { if (res->empty_space + res->length >= length) { _ma_compact_block_page(share, res->buff, res->rownr, 1, (page_type == HEAD_PAGE ? info->trn->min_read_from : 0), (page_type == HEAD_PAGE ? share->base.min_block_length : 0)); /* All empty space are now after current position */ dir= dir_entry_pos(res->buff, block_size, res->rownr); res->length= res->empty_space= uint2korr(dir+2); } if (res->length < length) { DBUG_PRINT("error", ("length: %u res->length: %u empty_space: %u", length, res->length, res->empty_space)); goto crashed; /* Wrong bitmap information */ } } res->dir= dir; res->data= res->buff + uint2korr(dir); } DBUG_RETURN(0); crashed: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); /* File crashed */ DBUG_RETURN(1); }
O3
c
get_head_or_tail_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %rbx movl %ecx, %r12d movq %rdi, %r14 movq (%rdi), %rcx movl 0x7bc(%rcx), %r13d cmpb $0x0, 0x15(%rsi) je 0x62b89 movl %r8d, -0x2c(%rbp) leaq -0x58(%rbp), %r15 movl $0x6, 0x8(%r15) movq 0x600(%rcx), %rdi leaq 0x470(%r14), %rax movq (%rsi), %rdx movq %rcx, -0x38(%rbp) movl 0x7d4(%rcx), %r9d movq %rax, %rsi xorl %ecx, %ecx xorl %r8d, %r8d pushq %r15 pushq $0x4 callq 0x32206 addq $0x10, %rsp movq %rax, (%rbx) testq %rax, %rax setne 0x10(%r15) leaq 0x2e8(%r14), %rdi movq %r15, %rsi callq 0x91792 cmpb $0x0, 0x10(%r15) je 0x62bdc movl %r12d, -0x30(%rbp) movq (%rbx), %r15 movq (%r14), %rdx movzbl 0x8(%r15), %r10d movzbl 0x9(%r15), %ecx leaq (%r15,%r13), %r12 movzwl 0xa(%r15), %eax movl %eax, 0x20(%rbx) cmpl $0xff, %ecx je 0x62beb cmpb %r10b, %cl jae 0x62d65 leal (,%rcx,4), %esi movq %r12, %rax subq %rsi, %rax movq $-0x8, %rdi subq %rsi, %rdi movzbl -0x5(%rax), %eax movb %al, 0x9(%r15) cmpq $0xff, %rax je 0x62b5e shll $0x2, %eax movq %r12, %r8 subq %rax, %r8 movb $-0x1, -0x6(%r8) leaq (%r12,%rdi), %rax cmpq $-0x9, %rdi jg 0x62c52 movzwl 0x4(%r12,%rdi), %r8d addq $0x4, %rdi testl %r8d, %r8d je 0x62b62 movzwl 0x2(%r12,%rdi), %edi addl %r8d, %edi jmp 0x62c5b movq %rdx, %r15 movq %r14, %rdi movq %rdx, %rsi movl %r8d, %edx movq %rcx, %r14 movl $0x1, %ecx callq 0x5f052 movq %r15, (%rbx) subl 0xc18(%r14), %r13d addl $-0x14, %r13d movl %r13d, 0x18(%rbx) movl %r13d, 0x20(%rbx) movl 0xc18(%r14), %eax addl $0xc, %eax addq %r15, %rax movq %rax, 0x8(%rbx) addq %rax, %r13 movq %r13, 0x10(%rbx) movl $0x0, 0x1c(%rbx) jmp 0x62d84 callq 0xa16ee movl (%rax), %esi movq %r14, %rdi jmp 0x62d6d cmpl $0xff, %r10d je 0x62d65 leal -0x4(,%r10,4), %ecx subq %rcx, %r12 movq (%r14), %rdi testl %r10d, %r10d je 0x62d95 leaq -0x8(%r12), %rsi movzwl -0x8(%r12), %edx movzwl -0x6(%r12), %ecx subl %r15d, %esi leal (%rcx,%rdx), %r8d addl $0x4, %r8d cmpl %esi, %r8d jbe 0x62c8d leal -0x1(%r10), %edx cmpl $0x1, -0x2c(%rbp) movq %r10, -0x40(%rbp) jne 0x62c91 movq 0x8(%r14), %rax movq 0x80(%rax), %r8 movl 0x3b8(%rdi), %r9d jmp 0x62c97 movl 0xc18(%rdx), %edi addl $0xc, %edi movq %r13, %rdx subq %rsi, %rdx leaq (%rdx,%r15), %rsi addq $-0xb, %rsi movq %rsi, %rdx cmpb $0x0, -0x1(%rsi) jne 0x62c7b leaq -0x4(%rdx), %rsi cmpb $0x0, (%rdx) je 0x62c69 movzwl -0x1(%rdx), %edx subl %edi, %edx movw %di, (%rax) leaq 0x2(%rax), %r12 movl %ecx, %r10d jmp 0x62ce9 addl %edx, %ecx jmp 0x62cc4 xorl %r8d, %r8d xorl %r9d, %r9d movq %r15, %rsi xorl %ecx, %ecx callq 0x5bcf0 movzwl -0x8(%r12), %edx movzwl -0x6(%r12), %ecx movzwl 0xa(%r15), %eax movl %eax, 0x20(%rbx) cmpl $0x4, %eax movq -0x40(%rbp), %r10 jb 0x62d65 addl %edx, %ecx addl $-0x4, %eax movl %eax, 0x20(%rbx) leal 0x1(%r10), %eax movb %al, 0x8(%r15) leaq -0xc(%r12), %rax addl %ecx, %r15d movl %eax, %edx subl %r15d, %edx movw %cx, -0xc(%r12) addq $-0xa, %r12 movw $0x0, (%r12) movl %r10d, 0x1c(%rbx) movl %edx, 0x18(%rbx) movl -0x30(%rbp), %r15d cmpl %r15d, %edx jae 0x62d76 movl 0x20(%rbx), %ecx addl %edx, %ecx cmpl %r15d, %ecx jb 0x62d60 movq (%rbx), %rsi cmpl $0x1, -0x2c(%rbp) jne 0x62d2b movq 0x8(%r14), %rax movq 0x80(%rax), %r8 movq -0x38(%rbp), %rdi movl 0x3b8(%rdi), %r9d jmp 0x62d35 xorl %r8d, %r8d xorl %r9d, %r9d movq -0x38(%rbp), %rdi movl %r10d, %edx movl $0x1, %ecx callq 0x5bcf0 addq (%rbx), %r13 movl 0x1c(%rbx), %eax shll $0x2, %eax subq %rax, %r13 movzwl -0x6(%r13), %edx addq $-0x8, %r13 movl %edx, 0x20(%rbx) movl %edx, 0x18(%rbx) movq %r13, %rax cmpl %r15d, %edx jae 0x62d76 movq %r14, %rdi movl $0x7f, %esi callq 0x36618 movb $0x1, %al jmp 0x62d86 movq %rax, 0x10(%rbx) movzwl (%rax), %eax addq (%rbx), %rax movq %rax, 0x8(%rbx) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0xc18(%rdi), %ecx addl $0xc, %ecx jmp 0x62cc4
get_head_or_tail_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, r9 mov r12d, ecx mov r14, rdi mov rcx, [rdi] mov r13d, [rcx+7BCh] cmp byte ptr [rsi+15h], 0 jz loc_62B89 mov [rbp+var_2C], r8d lea r15, [rbp+var_58] mov dword ptr [r15+8], 6 mov rdi, [rcx+600h] lea rax, [r14+470h] mov rdx, [rsi] mov [rbp+var_38], rcx mov r9d, [rcx+7D4h] mov rsi, rax xor ecx, ecx xor r8d, r8d push r15 push 4 call pagecache_read add rsp, 10h mov [rbx], rax test rax, rax setnz byte ptr [r15+10h] lea rdi, [r14+2E8h] mov rsi, r15 call insert_dynamic cmp byte ptr [r15+10h], 0 jz loc_62BDC mov [rbp+var_30], r12d mov r15, [rbx] mov rdx, [r14] movzx r10d, byte ptr [r15+8] movzx ecx, byte ptr [r15+9] lea r12, [r15+r13] movzx eax, word ptr [r15+0Ah] mov [rbx+20h], eax cmp ecx, 0FFh jz loc_62BEB cmp cl, r10b jnb loc_62D65 lea esi, ds:0[rcx*4] mov rax, r12 sub rax, rsi mov rdi, 0FFFFFFFFFFFFFFF8h sub rdi, rsi movzx eax, byte ptr [rax-5] mov [r15+9], al cmp rax, 0FFh jz short loc_62B5E shl eax, 2 mov r8, r12 sub r8, rax mov byte ptr [r8-6], 0FFh loc_62B5E: lea rax, [r12+rdi] loc_62B62: cmp rdi, 0FFFFFFFFFFFFFFF7h jg loc_62C52 movzx r8d, word ptr [r12+rdi+4] add rdi, 4 test r8d, r8d jz short loc_62B62 movzx edi, word ptr [r12+rdi+2] add edi, r8d jmp loc_62C5B loc_62B89: mov r15, rdx mov rdi, r14 mov rsi, rdx mov edx, r8d mov r14, rcx mov ecx, 1 call make_empty_page mov [rbx], r15 sub r13d, [r14+0C18h] add r13d, 0FFFFFFECh mov [rbx+18h], r13d mov [rbx+20h], r13d mov eax, [r14+0C18h] add eax, 0Ch add rax, r15 mov [rbx+8], rax add r13, rax mov [rbx+10h], r13 mov dword ptr [rbx+1Ch], 0 jmp loc_62D84 loc_62BDC: call _my_thread_var mov esi, [rax] mov rdi, r14 jmp loc_62D6D loc_62BEB: cmp r10d, 0FFh jz loc_62D65 lea ecx, ds:0FFFFFFFFFFFFFFFCh[r10*4] sub r12, rcx mov rdi, [r14] test r10d, r10d jz loc_62D95 lea rsi, [r12-8] movzx edx, word ptr [r12-8] movzx ecx, word ptr [r12-6] sub esi, r15d lea r8d, [rcx+rdx] add r8d, 4 cmp r8d, esi jbe short loc_62C8D lea edx, [r10-1] cmp [rbp+var_2C], 1 mov [rbp+var_40], r10 jnz short loc_62C91 mov rax, [r14+8] mov r8, [rax+80h] mov r9d, [rdi+3B8h] jmp short loc_62C97 loc_62C52: mov edi, [rdx+0C18h] add edi, 0Ch loc_62C5B: mov rdx, r13 sub rdx, rsi lea rsi, [rdx+r15] add rsi, 0FFFFFFFFFFFFFFF5h loc_62C69: mov rdx, rsi cmp byte ptr [rsi-1], 0 jnz short loc_62C7B lea rsi, [rdx-4] cmp byte ptr [rdx], 0 jz short loc_62C69 loc_62C7B: movzx edx, word ptr [rdx-1] sub edx, edi mov [rax], di lea r12, [rax+2] mov r10d, ecx jmp short loc_62CE9 loc_62C8D: add ecx, edx jmp short loc_62CC4 loc_62C91: xor r8d, r8d xor r9d, r9d loc_62C97: mov rsi, r15 xor ecx, ecx call _ma_compact_block_page movzx edx, word ptr [r12-8] movzx ecx, word ptr [r12-6] movzx eax, word ptr [r15+0Ah] mov [rbx+20h], eax cmp eax, 4 mov r10, [rbp+var_40] jb loc_62D65 add ecx, edx loc_62CC4: add eax, 0FFFFFFFCh mov [rbx+20h], eax lea eax, [r10+1] mov [r15+8], al lea rax, [r12-0Ch] add r15d, ecx mov edx, eax sub edx, r15d mov [r12-0Ch], cx add r12, 0FFFFFFFFFFFFFFF6h loc_62CE9: mov word ptr [r12], 0 mov [rbx+1Ch], r10d mov [rbx+18h], edx mov r15d, [rbp+var_30] cmp edx, r15d jnb short loc_62D76 mov ecx, [rbx+20h] add ecx, edx cmp ecx, r15d jb short loc_62D60 mov rsi, [rbx] cmp [rbp+var_2C], 1 jnz short loc_62D2B mov rax, [r14+8] mov r8, [rax+80h] mov rdi, [rbp+var_38] mov r9d, [rdi+3B8h] jmp short loc_62D35 loc_62D2B: xor r8d, r8d xor r9d, r9d mov rdi, [rbp+var_38] loc_62D35: mov edx, r10d mov ecx, 1 call _ma_compact_block_page add r13, [rbx] mov eax, [rbx+1Ch] shl eax, 2 sub r13, rax movzx edx, word ptr [r13-6] add r13, 0FFFFFFFFFFFFFFF8h mov [rbx+20h], edx mov [rbx+18h], edx mov rax, r13 loc_62D60: cmp edx, r15d jnb short loc_62D76 loc_62D65: mov rdi, r14 mov esi, 7Fh loc_62D6D: call _ma_set_fatal_error mov al, 1 jmp short loc_62D86 loc_62D76: mov [rbx+10h], rax movzx eax, word ptr [rax] add rax, [rbx] mov [rbx+8], rax loc_62D84: xor eax, eax loc_62D86: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_62D95: mov ecx, [rdi+0C18h] add ecx, 0Ch jmp loc_62CC4
char get_head_or_tail_page(long long *a1, long long a2, _BYTE *a3, unsigned int a4, int a5, long long a6) { long long v9; // rcx long long v10; // r13 long long v11; // rdi long long v12; // rdx long long v13; // rax long long v14; // r8 int v15; // r9d long long v16; // r15 long long v17; // rdx long long v18; // r10 long long v19; // rcx long long v20; // r12 unsigned int v21; // eax long long v22; // rsi long long v23; // rdi long long v24; // rax _WORD *v25; // rax int v26; // edi long long v28; // r14 long long v29; // r13 _BYTE *v30; // rax long long v31; // rsi long long *v32; // rdi long long v33; // r12 long long v34; // rdi int v35; // edx int v36; // ecx unsigned long long v37; // r8 unsigned int v38; // r9d long long v39; // rsi _BYTE *v40; // rdx _WORD *v41; // r12 int v42; // ecx unsigned int v43; // r15d unsigned long long v44; // r8 long long v45; // rdi unsigned int v46; // r9d long long v47; // r13 long long v49; // [rsp+8h] [rbp-58h] BYREF int v50; // [rsp+10h] [rbp-50h] bool v51; // [rsp+18h] [rbp-48h] long long v52; // [rsp+20h] [rbp-40h] long long v53; // [rsp+28h] [rbp-38h] unsigned int v54; // [rsp+30h] [rbp-30h] int v55; // [rsp+34h] [rbp-2Ch] v9 = *a1; v10 = *(unsigned int *)(*a1 + 1980); if ( !*(_BYTE *)(a2 + 21) ) { v28 = *a1; make_empty_page((long long)a1, a3, a5, 1); *(_QWORD *)a6 = a3; v29 = (unsigned int)(v10 - *(_DWORD *)(v28 + 3096) - 20); *(_DWORD *)(a6 + 24) = v29; *(_DWORD *)(a6 + 32) = v29; v30 = &a3[*(_DWORD *)(v28 + 3096) + 12]; *(_QWORD *)(a6 + 8) = v30; *(_QWORD *)(a6 + 16) = &v30[v29]; *(_DWORD *)(a6 + 28) = 0; return 0; } v55 = a5; v50 = 6; v11 = *(_QWORD *)(v9 + 1536); v12 = *(_QWORD *)a2; v53 = v9; v13 = pagecache_read(v11, (long long)(a1 + 142), v12, 0, 0LL, *(_DWORD *)(v9 + 2004), 4u, &v49); *(_QWORD *)a6 = v13; v51 = v13 != 0; insert_dynamic(a1 + 93, &v49); if ( !v51 ) { v31 = *(unsigned int *)my_thread_var(a1 + 93, (const char *)&v49); v32 = a1; LABEL_36: ma_set_fatal_error(v32, v31, v17, v19, v14, v15); return 1; } v54 = a4; v16 = *(_QWORD *)a6; v17 = *a1; v18 = *(unsigned __int8 *)(*(_QWORD *)a6 + 8LL); v19 = *(unsigned __int8 *)(*(_QWORD *)a6 + 9LL); v20 = *(_QWORD *)a6 + v10; v21 = *(unsigned __int16 *)(*(_QWORD *)a6 + 10LL); *(_DWORD *)(a6 + 32) = v21; if ( (_DWORD)v19 != 255 ) { if ( (unsigned __int8)v19 < (unsigned __int8)v18 ) { v22 = (unsigned int)(4 * v19); v23 = -8 - v22; v24 = *(unsigned __int8 *)(v20 - v22 - 5); *(_BYTE *)(v16 + 9) = v24; if ( v24 != 255 ) { v14 = v20 - (unsigned int)(4 * v24); *(_BYTE *)(v14 - 6) = -1; } v25 = (_WORD *)(v20 + v23); while ( v23 <= -9 ) { v14 = *(unsigned __int16 *)(v20 + v23 + 4); v23 += 4LL; if ( (_DWORD)v14 ) { v26 = v14 + *(unsigned __int16 *)(v20 + v23 + 2); goto LABEL_19; } } v26 = *(_DWORD *)(v17 + 3096) + 12; LABEL_19: v39 = v10 - v22 + v16 - 11; do { v40 = (_BYTE *)v39; if ( *(_BYTE *)(v39 - 1) ) break; v39 -= 4LL; } while ( !*v40 ); v17 = (unsigned int)*(unsigned __int16 *)(v40 - 1) - v26; *v25 = v26; v41 = v25 + 1; LODWORD(v18) = v19; goto LABEL_28; } LABEL_35: v32 = a1; v31 = 127LL; goto LABEL_36; } if ( (_DWORD)v18 == 255 ) goto LABEL_35; v33 = v20 - (unsigned int)(4 * v18 - 4); v34 = *a1; if ( (_DWORD)v18 ) { v35 = *(unsigned __int16 *)(v33 - 8); v36 = *(unsigned __int16 *)(v33 - 6); v14 = (unsigned int)(v36 + v35 + 4); if ( (unsigned int)v14 <= (int)v33 - 8 - (int)v16 ) { v42 = v35 + v36; } else { v52 = v18; if ( v55 == 1 ) { v37 = *(_QWORD *)(a1[1] + 128); v38 = *(_DWORD *)(v34 + 952); } else { v37 = 0LL; v38 = 0; } ma_compact_block_page(v34, v16, v18 - 1, 0, v37, v38); v17 = *(unsigned __int16 *)(v33 - 8); v19 = *(unsigned __int16 *)(v33 - 6); v21 = *(unsigned __int16 *)(v16 + 10); *(_DWORD *)(a6 + 32) = v21; LODWORD(v18) = v52; if ( v21 < 4 ) goto LABEL_35; v42 = v17 + v19; } } else { v42 = *(_DWORD *)(v34 + 3096) + 12; } *(_DWORD *)(a6 + 32) = v21 - 4; *(_BYTE *)(v16 + 8) = v18 + 1; v25 = (_WORD *)(v33 - 12); v17 = (unsigned int)(v33 - 12 - (v42 + v16)); *(_WORD *)(v33 - 12) = v42; v41 = (_WORD *)(v33 - 10); LABEL_28: *v41 = 0; *(_DWORD *)(a6 + 28) = v18; *(_DWORD *)(a6 + 24) = v17; v43 = v54; if ( (unsigned int)v17 < v54 ) { v19 = (unsigned int)(v17 + *(_DWORD *)(a6 + 32)); if ( (unsigned int)v19 >= v54 ) { if ( v55 == 1 ) { v44 = *(_QWORD *)(a1[1] + 128); v45 = v53; v46 = *(_DWORD *)(v53 + 952); } else { v44 = 0LL; v46 = 0; v45 = v53; } ma_compact_block_page(v45, *(_QWORD *)a6, v18, 1, v44, v46); v47 = *(_QWORD *)a6 + v10 - (unsigned int)(4 * *(_DWORD *)(a6 + 28)); v17 = *(unsigned __int16 *)(v47 - 6); *(_DWORD *)(a6 + 32) = v17; *(_DWORD *)(a6 + 24) = v17; v25 = (_WORD *)(v47 - 8); } if ( (unsigned int)v17 < v43 ) goto LABEL_35; } *(_QWORD *)(a6 + 16) = v25; *(_QWORD *)(a6 + 8) = *(_QWORD *)a6 + (unsigned __int16)*v25; return 0; }
get_head_or_tail_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,R9 MOV R12D,ECX MOV R14,RDI MOV RCX,qword ptr [RDI] MOV R13D,dword ptr [RCX + 0x7bc] CMP byte ptr [RSI + 0x15],0x0 JZ 0x00162b89 MOV dword ptr [RBP + -0x2c],R8D LEA R15,[RBP + -0x58] MOV dword ptr [R15 + 0x8],0x6 MOV RDI,qword ptr [RCX + 0x600] LEA RAX,[R14 + 0x470] MOV RDX,qword ptr [RSI] MOV qword ptr [RBP + -0x38],RCX MOV R9D,dword ptr [RCX + 0x7d4] MOV RSI,RAX XOR ECX,ECX XOR R8D,R8D PUSH R15 PUSH 0x4 CALL 0x00132206 ADD RSP,0x10 MOV qword ptr [RBX],RAX TEST RAX,RAX SETNZ byte ptr [R15 + 0x10] LEA RDI,[R14 + 0x2e8] MOV RSI,R15 CALL 0x00191792 CMP byte ptr [R15 + 0x10],0x0 JZ 0x00162bdc MOV dword ptr [RBP + -0x30],R12D MOV R15,qword ptr [RBX] MOV RDX,qword ptr [R14] MOVZX R10D,byte ptr [R15 + 0x8] MOVZX ECX,byte ptr [R15 + 0x9] LEA R12,[R15 + R13*0x1] MOVZX EAX,word ptr [R15 + 0xa] MOV dword ptr [RBX + 0x20],EAX CMP ECX,0xff JZ 0x00162beb CMP CL,R10B JNC 0x00162d65 LEA ESI,[RCX*0x4] MOV RAX,R12 SUB RAX,RSI MOV RDI,-0x8 SUB RDI,RSI MOVZX EAX,byte ptr [RAX + -0x5] MOV byte ptr [R15 + 0x9],AL CMP RAX,0xff JZ 0x00162b5e SHL EAX,0x2 MOV R8,R12 SUB R8,RAX MOV byte ptr [R8 + -0x6],0xff LAB_00162b5e: LEA RAX,[R12 + RDI*0x1] LAB_00162b62: CMP RDI,-0x9 JG 0x00162c52 MOVZX R8D,word ptr [R12 + RDI*0x1 + 0x4] ADD RDI,0x4 TEST R8D,R8D JZ 0x00162b62 MOVZX EDI,word ptr [R12 + RDI*0x1 + 0x2] ADD EDI,R8D JMP 0x00162c5b LAB_00162b89: MOV R15,RDX MOV RDI,R14 MOV RSI,RDX MOV EDX,R8D MOV R14,RCX MOV ECX,0x1 CALL 0x0015f052 MOV qword ptr [RBX],R15 SUB R13D,dword ptr [R14 + 0xc18] ADD R13D,-0x14 MOV dword ptr [RBX + 0x18],R13D MOV dword ptr [RBX + 0x20],R13D MOV EAX,dword ptr [R14 + 0xc18] ADD EAX,0xc ADD RAX,R15 MOV qword ptr [RBX + 0x8],RAX ADD R13,RAX MOV qword ptr [RBX + 0x10],R13 MOV dword ptr [RBX + 0x1c],0x0 JMP 0x00162d84 LAB_00162bdc: CALL 0x001a16ee MOV ESI,dword ptr [RAX] MOV RDI,R14 JMP 0x00162d6d LAB_00162beb: CMP R10D,0xff JZ 0x00162d65 LEA ECX,[-0x4 + R10*0x4] SUB R12,RCX MOV RDI,qword ptr [R14] TEST R10D,R10D JZ 0x00162d95 LEA RSI,[R12 + -0x8] MOVZX EDX,word ptr [R12 + -0x8] MOVZX ECX,word ptr [R12 + -0x6] SUB ESI,R15D LEA R8D,[RCX + RDX*0x1] ADD R8D,0x4 CMP R8D,ESI JBE 0x00162c8d LEA EDX,[R10 + -0x1] CMP dword ptr [RBP + -0x2c],0x1 MOV qword ptr [RBP + -0x40],R10 JNZ 0x00162c91 MOV RAX,qword ptr [R14 + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x00162c97 LAB_00162c52: MOV EDI,dword ptr [RDX + 0xc18] ADD EDI,0xc LAB_00162c5b: MOV RDX,R13 SUB RDX,RSI LEA RSI,[RDX + R15*0x1] ADD RSI,-0xb LAB_00162c69: MOV RDX,RSI CMP byte ptr [RSI + -0x1],0x0 JNZ 0x00162c7b LEA RSI,[RDX + -0x4] CMP byte ptr [RDX],0x0 JZ 0x00162c69 LAB_00162c7b: MOVZX EDX,word ptr [RDX + -0x1] SUB EDX,EDI MOV word ptr [RAX],DI LEA R12,[RAX + 0x2] MOV R10D,ECX JMP 0x00162ce9 LAB_00162c8d: ADD ECX,EDX JMP 0x00162cc4 LAB_00162c91: XOR R8D,R8D XOR R9D,R9D LAB_00162c97: MOV RSI,R15 XOR ECX,ECX CALL 0x0015bcf0 MOVZX EDX,word ptr [R12 + -0x8] MOVZX ECX,word ptr [R12 + -0x6] MOVZX EAX,word ptr [R15 + 0xa] MOV dword ptr [RBX + 0x20],EAX CMP EAX,0x4 MOV R10,qword ptr [RBP + -0x40] JC 0x00162d65 ADD ECX,EDX LAB_00162cc4: ADD EAX,-0x4 MOV dword ptr [RBX + 0x20],EAX LEA EAX,[R10 + 0x1] MOV byte ptr [R15 + 0x8],AL LEA RAX,[R12 + -0xc] ADD R15D,ECX MOV EDX,EAX SUB EDX,R15D MOV word ptr [R12 + -0xc],CX ADD R12,-0xa LAB_00162ce9: MOV word ptr [R12],0x0 MOV dword ptr [RBX + 0x1c],R10D MOV dword ptr [RBX + 0x18],EDX MOV R15D,dword ptr [RBP + -0x30] CMP EDX,R15D JNC 0x00162d76 MOV ECX,dword ptr [RBX + 0x20] ADD ECX,EDX CMP ECX,R15D JC 0x00162d60 MOV RSI,qword ptr [RBX] CMP dword ptr [RBP + -0x2c],0x1 JNZ 0x00162d2b MOV RAX,qword ptr [R14 + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x38] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x00162d35 LAB_00162d2b: XOR R8D,R8D XOR R9D,R9D MOV RDI,qword ptr [RBP + -0x38] LAB_00162d35: MOV EDX,R10D MOV ECX,0x1 CALL 0x0015bcf0 ADD R13,qword ptr [RBX] MOV EAX,dword ptr [RBX + 0x1c] SHL EAX,0x2 SUB R13,RAX MOVZX EDX,word ptr [R13 + -0x6] ADD R13,-0x8 MOV dword ptr [RBX + 0x20],EDX MOV dword ptr [RBX + 0x18],EDX MOV RAX,R13 LAB_00162d60: CMP EDX,R15D JNC 0x00162d76 LAB_00162d65: MOV RDI,R14 MOV ESI,0x7f LAB_00162d6d: CALL 0x00136618 MOV AL,0x1 JMP 0x00162d86 LAB_00162d76: MOV qword ptr [RBX + 0x10],RAX MOVZX EAX,word ptr [RAX] ADD RAX,qword ptr [RBX] MOV qword ptr [RBX + 0x8],RAX LAB_00162d84: XOR EAX,EAX LAB_00162d86: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00162d95: MOV ECX,dword ptr [RDI + 0xc18] ADD ECX,0xc JMP 0x00162cc4
int8 get_head_or_tail_page (long *param_1,int8 *param_2,long param_3,uint param_4,int param_5,long *param_6) { byte bVar1; byte bVar2; ushort uVar3; ushort uVar4; ushort uVar5; long lVar6; long lVar7; uint uVar8; char *pcVar9; long lVar10; int4 *puVar11; int8 uVar12; uint uVar13; int4 uVar14; ulong uVar15; char *pcVar16; int iVar17; long lVar18; ushort *puVar19; uint uVar20; ulong uVar21; ushort *puVar22; int1 local_60 [8]; int4 local_58; char local_50; ulong local_48; long local_40; uint local_38; int local_34; lVar10 = *param_1; uVar20 = *(uint *)(lVar10 + 0x7bc); uVar21 = (ulong)uVar20; if (*(char *)((long)param_2 + 0x15) == '\0') { make_empty_page(param_1,param_3,param_5,1); *param_6 = param_3; uVar20 = (uVar20 - *(int *)(lVar10 + 0xc18)) - 0x14; *(uint *)(param_6 + 3) = uVar20; *(uint *)(param_6 + 4) = uVar20; param_3 = (ulong)(*(int *)(lVar10 + 0xc18) + 0xc) + param_3; param_6[1] = param_3; param_6[2] = (ulong)uVar20 + param_3; *(int4 *)((long)param_6 + 0x1c) = 0; LAB_00162d84: uVar12 = 0; } else { local_58 = 6; local_40 = lVar10; local_34 = param_5; lVar10 = pagecache_read(*(int8 *)(lVar10 + 0x600),param_1 + 0x8e,*param_2,0,0, *(int4 *)(lVar10 + 0x7d4),4,local_60); *param_6 = lVar10; local_50 = lVar10 != 0; insert_dynamic(param_1 + 0x5d,local_60); if (local_50 == '\0') { puVar11 = (int4 *)_my_thread_var(); uVar14 = *puVar11; } else { lVar6 = *param_6; lVar7 = *param_1; bVar1 = *(byte *)(lVar6 + 8); bVar2 = *(byte *)(lVar6 + 9); lVar10 = lVar6 + uVar21; uVar13 = (uint)*(ushort *)(lVar6 + 10); *(uint *)(param_6 + 4) = (uint)*(ushort *)(lVar6 + 10); uVar20 = (uint)bVar2; local_38 = param_4; if (uVar20 == 0xff) { if (bVar1 != 0xff) { lVar10 = lVar10 - (ulong)((uint)bVar1 * 4 - 4); lVar7 = *param_1; uVar20 = (uint)bVar1; if (bVar1 == 0) { iVar17 = *(int *)(lVar7 + 0xc18) + 0xc; } else if ((uint)(((int)lVar10 + -8) - (int)lVar6) < (uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8) + 4) { if (local_34 == 1) { uVar12 = *(int8 *)(param_1[1] + 0x80); uVar14 = *(int4 *)(lVar7 + 0x3b8); } else { uVar12 = 0; uVar14 = 0; } local_48 = (ulong)bVar1; _ma_compact_block_page(lVar7,lVar6,bVar1 - 1,0,uVar12,uVar14); uVar3 = *(ushort *)(lVar10 + -8); uVar4 = *(ushort *)(lVar10 + -6); uVar5 = *(ushort *)(lVar6 + 10); uVar13 = (uint)uVar5; *(uint *)(param_6 + 4) = (uint)uVar5; if (uVar5 < 4) goto LAB_00162d65; iVar17 = (uint)uVar4 + (uint)uVar3; uVar20 = (uint)local_48; } else { iVar17 = (uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8); } *(uint *)(param_6 + 4) = uVar13 - 4; *(char *)(lVar6 + 8) = (char)uVar20 + '\x01'; puVar22 = (ushort *)(lVar10 + -0xc); uVar13 = (int)puVar22 - ((int)lVar6 + iVar17); *(short *)(lVar10 + -0xc) = (short)iVar17; puVar19 = (ushort *)(lVar10 + -10); goto LAB_00162ce9; } } else if (bVar2 < bVar1) { uVar15 = (ulong)((uint)bVar2 * 4); lVar18 = -8 - uVar15; bVar1 = *(byte *)((lVar10 - uVar15) + -5); *(byte *)(lVar6 + 9) = bVar1; if (bVar1 != 0xff) { *(int1 *)(lVar10 + (ulong)bVar1 * -4 + -6) = 0xff; } puVar22 = (ushort *)(lVar10 + lVar18); do { if (-9 < lVar18) { iVar17 = *(int *)(lVar7 + 0xc18) + 0xc; goto LAB_00162c5b; } uVar3 = *(ushort *)(lVar10 + 4 + lVar18); lVar18 = lVar18 + 4; } while (uVar3 == 0); iVar17 = (uint)*(ushort *)(lVar10 + 2 + lVar18) + (uint)uVar3; LAB_00162c5b: pcVar9 = (char *)((uVar21 - uVar15) + lVar6 + -0xb); do { pcVar16 = pcVar9; if (pcVar16[-1] != '\0') break; pcVar9 = pcVar16 + -4; } while (*pcVar16 == '\0'); uVar13 = (uint)*(ushort *)(pcVar16 + -1) - iVar17; *puVar22 = (ushort)iVar17; puVar19 = puVar22 + 1; LAB_00162ce9: uVar8 = local_38; *puVar19 = 0; *(uint *)((long)param_6 + 0x1c) = uVar20; *(uint *)(param_6 + 3) = uVar13; if (uVar13 < local_38) { if (local_38 <= (int)param_6[4] + uVar13) { if (local_34 == 1) { uVar12 = *(int8 *)(param_1[1] + 0x80); uVar14 = *(int4 *)(local_40 + 0x3b8); } else { uVar12 = 0; uVar14 = 0; } _ma_compact_block_page(local_40,*param_6,uVar20,1,uVar12,uVar14); lVar10 = (uVar21 + *param_6) - (ulong)(uint)(*(int *)((long)param_6 + 0x1c) << 2); uVar3 = *(ushort *)(lVar10 + -6); uVar13 = (uint)uVar3; puVar22 = (ushort *)(lVar10 + -8); *(uint *)(param_6 + 4) = (uint)uVar3; *(uint *)(param_6 + 3) = (uint)uVar3; } if (uVar13 < uVar8) goto LAB_00162d65; } param_6[2] = (long)puVar22; param_6[1] = (ulong)*puVar22 + *param_6; goto LAB_00162d84; } LAB_00162d65: uVar14 = 0x7f; } _ma_set_fatal_error(param_1,uVar14); uVar12 = 1; } return uVar12; }
49,598
trnman_new_trn
eloqsql/storage/maria/trnman.c
TRN *trnman_new_trn(WT_THD *wt) { int res; TRN *trn; union { TRN *trn; void *v; } tmp; DBUG_ENTER("trnman_new_trn"); /* we have a mutex, to do simple things under it - allocate a TRN, increment trnman_active_transactions, set trn->min_read_from. Note that all the above is fast. generating short_id may be slow, as it involves scanning a large array - so it's done outside of the mutex. */ DBUG_PRINT("info", ("mysql_mutex_lock LOCK_trn_list")); mysql_mutex_lock(&LOCK_trn_list); /* Allocating a new TRN structure */ tmp.trn= pool; /* Popping an unused TRN from the pool (ABA isn't possible, we're behind a mutex */ while (tmp.trn && !my_atomic_casptr((void **)(char*) &pool, &tmp.v, (void *)tmp.trn->next)) /* no-op */; /* Nothing in the pool ? Allocate a new one */ if (!(trn= tmp.trn)) { /* trn should be completely initialized at create time to allow one to keep a known state on it. (Like redo_lns, which is assumed to be 0 at start of row handling and reset to zero before end of row handling) */ trn= (TRN *)my_malloc(PSI_INSTRUMENT_ME, sizeof(TRN), MYF(MY_WME | MY_ZEROFILL)); if (unlikely(!trn)) { DBUG_PRINT("info", ("mysql_mutex_unlock LOCK_trn_list")); mysql_mutex_unlock(&LOCK_trn_list); return 0; } trnman_allocated_transactions++; mysql_mutex_init(key_TRN_state_lock, &trn->state_lock, MY_MUTEX_INIT_FAST); } trn->wt= wt; trn->pins= lf_hash_get_pins(&trid_to_trn); if (!trn->pins) { trnman_free_trn(trn); mysql_mutex_unlock(&LOCK_trn_list); return 0; } trnman_active_transactions++; trn->min_read_from= active_list_min.next->trid; trn->trid= new_trid(); trn->next= &active_list_max; trn->prev= active_list_max.prev; active_list_max.prev= trn->prev->next= trn; trid_min_read_from= active_list_min.next->min_read_from; DBUG_PRINT("info", ("mysql_mutex_unlock LOCK_trn_list")); mysql_mutex_unlock(&LOCK_trn_list); if (unlikely(!trn->min_read_from)) { /* We are the only transaction. Set min_read_from so that we can read our own rows */ trn->min_read_from= trn->trid + 1; } /* no other transaction can read changes done by this one */ trn->commit_trid= MAX_TRID; trn->rec_lsn= trn->undo_lsn= trn->first_undo_lsn= 0; trn->used_tables= 0; trn->used_instances= 0; trn->locked_tables= 0; trn->flags= 0; /* only after the following function TRN is considered initialized, so it must be done the last */ mysql_mutex_lock(&trn->state_lock); trn->short_id= get_short_trid(trn); mysql_mutex_unlock(&trn->state_lock); res= lf_hash_insert(&trid_to_trn, trn->pins, &trn); DBUG_ASSERT(res <= 0); if (res) { trnman_end_trn(trn, 0); return 0; } DBUG_PRINT("exit", ("trn: %p trid: 0x%lu min_read_from: 0x%lu", trn, (ulong) trn->trid, (ulong) trn->min_read_from)); DBUG_RETURN(trn); }
O0
c
trnman_new_trn: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) jmp 0x79d7e leaq 0x40952b(%rip), %rdi # 0x4832b0 leaq 0xdfa1b(%rip), %rsi # 0x1597a7 movl $0x128, %edx # imm = 0x128 callq 0x7a0b0 movq 0x40943b(%rip), %rax # 0x4831d8 movq %rax, -0x28(%rbp) xorl %eax, %eax cmpq $0x0, -0x28(%rbp) movb %al, -0x32(%rbp) je 0x79df3 movq -0x28(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx lock cmpxchgq %rcx, 0x40940e(%rip) # 0x4831d8 movq %rax, %rcx sete %al movb %al, -0x41(%rbp) movq %rcx, -0x40(%rbp) testb $0x1, %al jne 0x79de3 movq -0x40(%rbp), %rax movq %rax, -0x28(%rbp) movb -0x41(%rbp), %al andb $0x1, %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al xorb $-0x1, %al movb %al, -0x32(%rbp) movb -0x32(%rbp), %al testb $0x1, %al jne 0x79dfc jmp 0x79dfe jmp 0x79da1 movq -0x28(%rbp), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x79e90 xorl %edi, %edi movl $0xb0, %esi movl $0x30, %edx callq 0xfb390 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x79e64 jmp 0x79e49 jmp 0x79e4b leaq 0x40945e(%rip), %rdi # 0x4832b0 callq 0x7a120 movq $0x0, -0x8(%rbp) jmp 0x7a0a0 movl 0x409366(%rip), %eax # 0x4831d0 addl $0x1, %eax movl %eax, 0x40935d(%rip) # 0x4831d0 leaq 0x408fea(%rip), %rax # 0x482e64 movl (%rax), %edi movq -0x20(%rbp), %rsi addq $0x10, %rsi leaq 0xc14945(%rip), %rdx # 0xc8e7d0 callq 0x79bf0 movq -0x10(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x8(%rax) leaq 0x409345(%rip), %rdi # 0x4831e8 addq $0x28, %rdi callq 0x103e40 movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x79ee2 movq -0x20(%rbp), %rdi callq 0x7a180 leaq 0x4093e0(%rip), %rdi # 0x4832b0 callq 0x7a120 movq $0x0, -0x8(%rbp) jmp 0x7a0a0 movl 0x4092e0(%rip), %eax # 0x4831c8 addl $0x1, %eax movl %eax, 0x4092d7(%rip) # 0x4831c8 movq 0x409078(%rip), %rax # 0x482f70 movq 0x78(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x80(%rax) callq 0x7b1c0 movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x20(%rbp), %rax leaq 0x409096(%rip), %rcx # 0x482fb8 movq %rcx, 0x68(%rax) movq 0x4090fb(%rip), %rcx # 0x483028 movq -0x20(%rbp), %rax movq %rcx, 0x70(%rax) movq -0x20(%rbp), %rax movq -0x20(%rbp), %rcx movq 0x70(%rcx), %rcx movq %rax, 0x68(%rcx) movq %rax, 0x4090dc(%rip) # 0x483028 movq 0x40901d(%rip), %rax # 0x482f70 movq 0x80(%rax), %rax movq %rax, 0x24b2d7(%rip) # 0x2c5238 jmp 0x79f63 leaq 0x409346(%rip), %rdi # 0x4832b0 callq 0x7a120 movq -0x20(%rbp), %rax cmpq $0x0, 0x80(%rax) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x79faf movq -0x20(%rbp), %rax movq 0x78(%rax), %rcx addq $0x1, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x80(%rax) movq -0x20(%rbp), %rax movq $-0x1, 0x88(%rax) movq -0x20(%rbp), %rax movq $0x0, 0xa0(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x98(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x90(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x58(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x60(%rax) movq -0x20(%rbp), %rax movl $0x0, 0xa8(%rax) movq -0x20(%rbp), %rax movw $0x0, 0xae(%rax) movq -0x20(%rbp), %rdi addq $0x10, %rdi leaq 0xdf77a(%rip), %rsi # 0x1597a7 movl $0x173, %edx # imm = 0x173 callq 0x7a0b0 movq -0x20(%rbp), %rdi callq 0x7a230 movw %ax, %cx movq -0x20(%rbp), %rax movw %cx, 0xac(%rax) movq -0x20(%rbp), %rdi addq $0x10, %rdi callq 0x7a120 movq -0x20(%rbp), %rax movq (%rax), %rsi leaq 0x40917f(%rip), %rdi # 0x4831e8 leaq -0x20(%rbp), %rdx callq 0x1051d0 movl %eax, -0x14(%rbp) jmp 0x7a077 cmpl $0x0, -0x14(%rbp) je 0x7a092 movq -0x20(%rbp), %rdi xorl %esi, %esi callq 0x7a310 movq $0x0, -0x8(%rbp) jmp 0x7a0a0 jmp 0x7a094 jmp 0x7a096 jmp 0x7a098 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
trnman_new_trn: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi jmp short $+2 loc_79D7E: lea rdi, LOCK_trn_list lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 128h call inline_mysql_mutex_lock_11 mov rax, cs:pool mov [rbp+var_28], rax loc_79DA1: xor eax, eax cmp [rbp+var_28], 0 mov [rbp+var_32], al jz short loc_79DF3 mov rax, [rbp+var_28] mov rax, [rax+68h] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_30] lock cmpxchg cs:pool, rcx mov rcx, rax setz al mov [rbp+var_41], al mov [rbp+var_40], rcx test al, 1 jnz short loc_79DE3 mov rax, [rbp+var_40] mov [rbp+var_28], rax loc_79DE3: mov al, [rbp+var_41] and al, 1 mov [rbp+var_31], al mov al, [rbp+var_31] xor al, 0FFh mov [rbp+var_32], al loc_79DF3: mov al, [rbp+var_32] test al, 1 jnz short loc_79DFC jmp short loc_79DFE loc_79DFC: jmp short loc_79DA1 loc_79DFE: mov rax, [rbp+var_28] mov [rbp+var_20], rax cmp rax, 0 jnz loc_79E90 xor edi, edi mov esi, 0B0h mov edx, 30h ; '0' call my_malloc mov [rbp+var_20], rax cmp [rbp+var_20], 0 setnz al xor al, 0FFh and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_79E64 jmp short $+2 loc_79E49: jmp short $+2 loc_79E4B: lea rdi, LOCK_trn_list call inline_mysql_mutex_unlock_12 mov [rbp+var_8], 0 jmp loc_7A0A0 loc_79E64: mov eax, cs:trnman_allocated_transactions add eax, 1 mov cs:trnman_allocated_transactions, eax lea rax, key_TRN_state_lock mov edi, [rax] mov rsi, [rbp+var_20] add rsi, 10h lea rdx, my_fast_mutexattr call inline_mysql_mutex_init_2 loc_79E90: mov rcx, [rbp+var_10] mov rax, [rbp+var_20] mov [rax+8], rcx lea rdi, trid_to_trn add rdi, 28h ; '(' call lf_pinbox_get_pins mov rcx, rax mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jnz short loc_79EE2 mov rdi, [rbp+var_20] call trnman_free_trn lea rdi, LOCK_trn_list call inline_mysql_mutex_unlock_12 mov [rbp+var_8], 0 jmp loc_7A0A0 loc_79EE2: mov eax, cs:trnman_active_transactions add eax, 1 mov cs:trnman_active_transactions, eax mov rax, cs:qword_482F70 mov rcx, [rax+78h] mov rax, [rbp+var_20] mov [rax+80h], rcx call new_trid mov rcx, rax mov rax, [rbp+var_20] mov [rax+78h], rcx mov rax, [rbp+var_20] lea rcx, active_list_max mov [rax+68h], rcx mov rcx, cs:qword_483028 mov rax, [rbp+var_20] mov [rax+70h], rcx mov rax, [rbp+var_20] mov rcx, [rbp+var_20] mov rcx, [rcx+70h] mov [rcx+68h], rax mov cs:qword_483028, rax mov rax, cs:qword_482F70 mov rax, [rax+80h] mov cs:trid_min_read_from, rax jmp short $+2 loc_79F63: lea rdi, LOCK_trn_list call inline_mysql_mutex_unlock_12 mov rax, [rbp+var_20] cmp qword ptr [rax+80h], 0 setnz al xor al, 0FFh and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_79FAF mov rax, [rbp+var_20] mov rcx, [rax+78h] add rcx, 1 mov rax, [rbp+var_20] mov [rax+80h], rcx loc_79FAF: mov rax, [rbp+var_20] mov qword ptr [rax+88h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_20] mov qword ptr [rax+0A0h], 0 mov rax, [rbp+var_20] mov qword ptr [rax+98h], 0 mov rax, [rbp+var_20] mov qword ptr [rax+90h], 0 mov rax, [rbp+var_20] mov qword ptr [rax+58h], 0 mov rax, [rbp+var_20] mov qword ptr [rax+60h], 0 mov rax, [rbp+var_20] mov dword ptr [rax+0A8h], 0 mov rax, [rbp+var_20] mov word ptr [rax+0AEh], 0 mov rdi, [rbp+var_20] add rdi, 10h lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 173h call inline_mysql_mutex_lock_11 mov rdi, [rbp+var_20] call get_short_trid mov cx, ax mov rax, [rbp+var_20] mov [rax+0ACh], cx mov rdi, [rbp+var_20] add rdi, 10h call inline_mysql_mutex_unlock_12 mov rax, [rbp+var_20] mov rsi, [rax] lea rdi, trid_to_trn lea rdx, [rbp+var_20] call lf_hash_insert mov [rbp+var_14], eax jmp short $+2 loc_7A077: cmp [rbp+var_14], 0 jz short loc_7A092 mov rdi, [rbp+var_20] xor esi, esi call trnman_end_trn mov [rbp+var_8], 0 jmp short loc_7A0A0 loc_7A092: jmp short $+2 loc_7A094: jmp short $+2 loc_7A096: jmp short $+2 loc_7A098: mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_7A0A0: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long trnman_new_trn(long long a1) { signed long long v1; // rcx long long v2; // rax bool v4; // [rsp+Fh] [rbp-41h] char v5; // [rsp+1Eh] [rbp-32h] signed long long v6; // [rsp+28h] [rbp-28h] long long v7; // [rsp+30h] [rbp-20h] BYREF long long v9; // [rsp+40h] [rbp-10h] v9 = a1; inline_mysql_mutex_lock_11(&LOCK_trn_list, "/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 296LL); v6 = pool; do { v5 = 0; if ( v6 ) { v1 = _InterlockedCompareExchange64(&pool, *(_QWORD *)(v6 + 104), v6); v4 = v6 == v1; if ( v6 != v1 ) v6 = v1; v5 = ~v4; } } while ( (v5 & 1) != 0 ); v7 = v6; if ( !v6 ) { v7 = my_malloc(0LL, 176LL, 48LL); if ( !v7 ) { inline_mysql_mutex_unlock_12(&LOCK_trn_list); return 0LL; } ++trnman_allocated_transactions; inline_mysql_mutex_init_2(key_TRN_state_lock, (_QWORD *)(v7 + 16), (long long)&my_fast_mutexattr); } *(_QWORD *)(v7 + 8) = v9; *(_QWORD *)v7 = lf_pinbox_get_pins((char *)&trid_to_trn + 40); if ( *(_QWORD *)v7 ) { ++trnman_active_transactions; *(_QWORD *)(v7 + 128) = *(_QWORD *)(qword_482F70 + 120); *(_QWORD *)(v7 + 120) = new_trid(); *(_QWORD *)(v7 + 104) = &active_list_max; *(_QWORD *)(v7 + 112) = qword_483028; v2 = v7; *(_QWORD *)(*(_QWORD *)(v7 + 112) + 104LL) = v7; qword_483028 = v2; trid_min_read_from = *(_QWORD *)(qword_482F70 + 128); inline_mysql_mutex_unlock_12(&LOCK_trn_list); if ( !*(_QWORD *)(v7 + 128) ) *(_QWORD *)(v7 + 128) = *(_QWORD *)(v7 + 120) + 1LL; *(_QWORD *)(v7 + 136) = -1LL; *(_QWORD *)(v7 + 160) = 0LL; *(_QWORD *)(v7 + 152) = 0LL; *(_QWORD *)(v7 + 144) = 0LL; *(_QWORD *)(v7 + 88) = 0LL; *(_QWORD *)(v7 + 96) = 0LL; *(_DWORD *)(v7 + 168) = 0; *(_WORD *)(v7 + 174) = 0; inline_mysql_mutex_lock_11(v7 + 16, "/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 371LL); *(_WORD *)(v7 + 172) = get_short_trid(v7); inline_mysql_mutex_unlock_12(v7 + 16); if ( (unsigned int)lf_hash_insert(&trid_to_trn, *(_QWORD *)v7, &v7) ) { trnman_end_trn(v7, 0LL); return 0LL; } else { return v7; } } else { trnman_free_trn(v7); inline_mysql_mutex_unlock_12(&LOCK_trn_list); return 0LL; } }
trnman_new_trn: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI JMP 0x00179d7e LAB_00179d7e: LEA RDI,[0x5832b0] LEA RSI,[0x2597a7] MOV EDX,0x128 CALL 0x0017a0b0 MOV RAX,qword ptr [0x005831d8] MOV qword ptr [RBP + -0x28],RAX LAB_00179da1: XOR EAX,EAX CMP qword ptr [RBP + -0x28],0x0 MOV byte ptr [RBP + -0x32],AL JZ 0x00179df3 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CMPXCHG.LOCK qword ptr [0x005831d8],RCX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x41],AL MOV qword ptr [RBP + -0x40],RCX TEST AL,0x1 JNZ 0x00179de3 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x28],RAX LAB_00179de3: MOV AL,byte ptr [RBP + -0x41] AND AL,0x1 MOV byte ptr [RBP + -0x31],AL MOV AL,byte ptr [RBP + -0x31] XOR AL,0xff MOV byte ptr [RBP + -0x32],AL LAB_00179df3: MOV AL,byte ptr [RBP + -0x32] TEST AL,0x1 JNZ 0x00179dfc JMP 0x00179dfe LAB_00179dfc: JMP 0x00179da1 LAB_00179dfe: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x00179e90 XOR EDI,EDI MOV ESI,0xb0 MOV EDX,0x30 CALL 0x001fb390 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00179e64 JMP 0x00179e49 LAB_00179e49: JMP 0x00179e4b LAB_00179e4b: LEA RDI,[0x5832b0] CALL 0x0017a120 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017a0a0 LAB_00179e64: MOV EAX,dword ptr [0x005831d0] ADD EAX,0x1 MOV dword ptr [0x005831d0],EAX LEA RAX,[0x582e64] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x10 LEA RDX,[0xd8e7d0] CALL 0x00179bf0 LAB_00179e90: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],RCX LEA RDI,[0x5831e8] ADD RDI,0x28 CALL 0x00203e40 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JNZ 0x00179ee2 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0017a180 LEA RDI,[0x5832b0] CALL 0x0017a120 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017a0a0 LAB_00179ee2: MOV EAX,dword ptr [0x005831c8] ADD EAX,0x1 MOV dword ptr [0x005831c8],EAX MOV RAX,qword ptr [0x00582f70] MOV RCX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x80],RCX CALL 0x0017b1c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x78],RCX MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x582fb8] MOV qword ptr [RAX + 0x68],RCX MOV RCX,qword ptr [0x00583028] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x70],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x70] MOV qword ptr [RCX + 0x68],RAX MOV qword ptr [0x00583028],RAX MOV RAX,qword ptr [0x00582f70] MOV RAX,qword ptr [RAX + 0x80] MOV qword ptr [0x003c5238],RAX JMP 0x00179f63 LAB_00179f63: LEA RDI,[0x5832b0] CALL 0x0017a120 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x80],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00179faf MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x78] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x80],RCX LAB_00179faf: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x88],-0x1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0xa0],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x98],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0xa8],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV word ptr [RAX + 0xae],0x0 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x10 LEA RSI,[0x2597a7] MOV EDX,0x173 CALL 0x0017a0b0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0017a230 MOV CX,AX MOV RAX,qword ptr [RBP + -0x20] MOV word ptr [RAX + 0xac],CX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x10 CALL 0x0017a120 MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] LEA RDI,[0x5831e8] LEA RDX,[RBP + -0x20] CALL 0x002051d0 MOV dword ptr [RBP + -0x14],EAX JMP 0x0017a077 LAB_0017a077: CMP dword ptr [RBP + -0x14],0x0 JZ 0x0017a092 MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x0017a310 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017a0a0 LAB_0017a092: JMP 0x0017a094 LAB_0017a094: JMP 0x0017a096 LAB_0017a096: JMP 0x0017a098 LAB_0017a098: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_0017a0a0: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long * trnman_new_trn(long param_1) { long *plVar1; int2 uVar2; long *plVar3; long lVar4; bool bVar5; long *local_30; long *local_28; int local_1c; long local_18; long *local_10; local_18 = param_1; inline_mysql_mutex_lock (LOCK_trn_list,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x128); local_30 = pool; do { bVar5 = false; if (local_30 != (long *)0x0) { LOCK(); bVar5 = local_30 != pool; plVar3 = local_30; plVar1 = (long *)local_30[0xd]; if (bVar5) { plVar3 = pool; plVar1 = pool; } pool = plVar1; UNLOCK(); if (bVar5) { local_30 = plVar3; } } } while (bVar5); local_28 = local_30; if (local_30 == (long *)0x0) { local_28 = (long *)my_malloc(0,0xb0,0x30); if (local_28 == (long *)0x0) { inline_mysql_mutex_unlock(LOCK_trn_list); return (long *)0x0; } trnman_allocated_transactions = trnman_allocated_transactions + 1; inline_mysql_mutex_init(key_TRN_state_lock,local_28 + 2,&my_fast_mutexattr); } local_28[1] = local_18; lVar4 = lf_pinbox_get_pins(0x583210); *local_28 = lVar4; if (*local_28 == 0) { trnman_free_trn(local_28); inline_mysql_mutex_unlock(LOCK_trn_list); local_10 = (long *)0x0; } else { trnman_active_transactions = trnman_active_transactions + 1; local_28[0x10] = *(long *)(active_list_min._104_8_ + 0x78); lVar4 = new_trid(); local_28[0xf] = lVar4; local_28[0xd] = (long)active_list_max; local_28[0xe] = active_list_max._112_8_; *(long **)(local_28[0xe] + 0x68) = local_28; active_list_max._112_8_ = local_28; trid_min_read_from = *(int8 *)(active_list_min._104_8_ + 0x80); inline_mysql_mutex_unlock(LOCK_trn_list); if (local_28[0x10] == 0) { local_28[0x10] = local_28[0xf] + 1; } local_28[0x11] = -1; local_28[0x14] = 0; local_28[0x13] = 0; local_28[0x12] = 0; local_28[0xb] = 0; local_28[0xc] = 0; *(int4 *)(local_28 + 0x15) = 0; *(int2 *)((long)local_28 + 0xae) = 0; inline_mysql_mutex_lock (local_28 + 2,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x173) ; uVar2 = get_short_trid(local_28); *(int2 *)((long)local_28 + 0xac) = uVar2; inline_mysql_mutex_unlock(local_28 + 2); local_1c = lf_hash_insert(trid_to_trn,*local_28,&local_28); if (local_1c == 0) { local_10 = local_28; } else { trnman_end_trn(local_28,0); local_10 = (long *)0x0; } } return local_10; }
49,599
fct_reset_status_by_thread(PFS_thread*)
eloqsql/storage/perfschema/pfs_status.cc
static void fct_reset_status_by_thread(PFS_thread *thread) { PFS_account *account; PFS_user *user; PFS_host *host; if (thread->m_lock.is_populated()) { account= sanitize_account(thread->m_account); user= sanitize_user(thread->m_user); host= sanitize_host(thread->m_host); aggregate_thread_status(thread, account, user, host); } }
O0
cpp
fct_reset_status_by_thread(PFS_thread*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi addq $0x800, %rdi # imm = 0x800 callq 0x2d950 testb $0x1, %al jne 0x4a482 jmp 0x4a4d3 movq -0x8(%rbp), %rax movq 0x1620(%rax), %rdi callq 0x2c150 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x1618(%rax), %rdi callq 0x4b790 movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x1610(%rax), %rdi callq 0x36330 movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x3a100 addq $0x20, %rsp popq %rbp retq nopl (%rax)
_ZL26fct_reset_status_by_threadP10PFS_thread: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] add rdi, 800h; this call _ZN8pfs_lock12is_populatedEv; pfs_lock::is_populated(void) test al, 1 jnz short loc_4A482 jmp short loc_4A4D3 loc_4A482: mov rax, [rbp+var_8] mov rdi, [rax+1620h]; PFS_account * call _Z16sanitize_accountP11PFS_account; sanitize_account(PFS_account *) mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rdi, [rax+1618h]; PFS_user * call _Z13sanitize_userP8PFS_user; sanitize_user(PFS_user *) mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rdi, [rax+1610h]; PFS_host * call _Z13sanitize_hostP8PFS_host; sanitize_host(PFS_host *) mov [rbp+var_20], rax mov rdi, [rbp+var_8]; PFS_thread * mov rsi, [rbp+var_10]; PFS_account * mov rdx, [rbp+var_18]; PFS_user * mov rcx, [rbp+var_20]; PFS_host * call _Z23aggregate_thread_statusP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host; aggregate_thread_status(PFS_thread *,PFS_account *,PFS_user *,PFS_host *) loc_4A4D3: add rsp, 20h pop rbp retn
char fct_reset_status_by_thread(PFS_account **a1, unsigned int *a2) { char result; // al PFS_host *v3; // [rsp+0h] [rbp-20h] PFS_user *v4; // [rsp+8h] [rbp-18h] PFS_account *v5; // [rsp+10h] [rbp-10h] result = pfs_lock::is_populated((pfs_lock *)(a1 + 256), a2); if ( (result & 1) != 0 ) { v5 = (PFS_account *)sanitize_account(a1[708]); v4 = (PFS_user *)sanitize_user(a1[707]); v3 = (PFS_host *)sanitize_host(a1[706]); return aggregate_thread_status((PFS_thread *)a1, v5, v4, v3); } return result; }
fct_reset_status_by_thread: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x800 CALL 0x0012d950 TEST AL,0x1 JNZ 0x0014a482 JMP 0x0014a4d3 LAB_0014a482: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x1620] CALL 0x0012c150 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x1618] CALL 0x0014b790 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x1610] CALL 0x00136330 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x0013a100 LAB_0014a4d3: ADD RSP,0x20 POP RBP RET
/* fct_reset_status_by_thread(PFS_thread*) */ void fct_reset_status_by_thread(PFS_thread *param_1) { ulong uVar1; PFS_account *pPVar2; PFS_user *pPVar3; PFS_host *pPVar4; uVar1 = pfs_lock::is_populated((pfs_lock *)(param_1 + 0x800)); if ((uVar1 & 1) != 0) { pPVar2 = (PFS_account *)sanitize_account(*(PFS_account **)(param_1 + 0x1620)); pPVar3 = (PFS_user *)sanitize_user(*(PFS_user **)(param_1 + 0x1618)); pPVar4 = (PFS_host *)sanitize_host(*(PFS_host **)(param_1 + 0x1610)); aggregate_thread_status(param_1,pPVar2,pPVar3,pPVar4); } return; }