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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
44,600 | ggml_ftype_to_ggml_type | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | enum ggml_type ggml_ftype_to_ggml_type(enum ggml_ftype ftype) {
enum ggml_type wtype = GGML_TYPE_COUNT;
switch (ftype) {
case GGML_FTYPE_ALL_F32: wtype = GGML_TYPE_F32; break;
case GGML_FTYPE_MOSTLY_F16: wtype = GGML_TYPE_F16; break;
case GGML_FTYPE_MOSTLY_Q4_0: wtype = GGML_TYPE_Q4_0; break;
case GGML_FTYPE_MOSTLY_Q4_1: wtype = GGML_TYPE_Q4_1; break;
case GGML_FTYPE_MOSTLY_Q5_0: wtype = GGML_TYPE_Q5_0; break;
case GGML_FTYPE_MOSTLY_Q5_1: wtype = GGML_TYPE_Q5_1; break;
case GGML_FTYPE_MOSTLY_Q8_0: wtype = GGML_TYPE_Q8_0; break;
case GGML_FTYPE_MOSTLY_Q2_K: wtype = GGML_TYPE_Q2_K; break;
case GGML_FTYPE_MOSTLY_Q3_K: wtype = GGML_TYPE_Q3_K; break;
case GGML_FTYPE_MOSTLY_Q4_K: wtype = GGML_TYPE_Q4_K; break;
case GGML_FTYPE_MOSTLY_Q5_K: wtype = GGML_TYPE_Q5_K; break;
case GGML_FTYPE_MOSTLY_Q6_K: wtype = GGML_TYPE_Q6_K; break;
case GGML_FTYPE_UNKNOWN: wtype = GGML_TYPE_COUNT; break;
case GGML_FTYPE_MOSTLY_Q4_1_SOME_F16: wtype = GGML_TYPE_COUNT; break;
}
GGML_ASSERT(wtype != GGML_TYPE_COUNT);
return wtype;
} | O1 | c | ggml_ftype_to_ggml_type:
movl $0x13, %eax
movb $0x1, %cl
cmpl $0xe, %edi
ja 0x8e317
movl %edi, %edx
leaq 0x3700d(%rip), %rsi # 0xc5300
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
xorl %ecx, %ecx
movl %edi, %eax
jmp 0x8e317
movl $0x7, %eax
jmp 0x8e315
movl $0x8, %eax
jmp 0x8e315
movl $0x6, %eax
xorl %ecx, %ecx
testb %cl, %cl
jne 0x8e31c
retq
pushq %rax
callq 0xc1df
| ggml_ftype_to_ggml_type:
mov eax, 13h
mov cl, 1
cmp edi, 0Eh; switch 15 cases
ja short def_8E2FA; jumptable 000000000008E2FA default case, cases 4-6
mov edx, edi
lea rsi, jpt_8E2FA
movsxd rdx, ds:(jpt_8E2FA - 0C5300h)[rsi+rdx*4]
add rdx, rsi
jmp rdx; switch jump
loc_8E2FC:
xor ecx, ecx; jumptable 000000000008E2FA cases 0-3,10-14
mov eax, edi
jmp short def_8E2FA; jumptable 000000000008E2FA default case, cases 4-6
loc_8E302:
mov eax, 7; jumptable 000000000008E2FA case 9
jmp short loc_8E315
loc_8E309:
mov eax, 8; jumptable 000000000008E2FA case 7
jmp short loc_8E315
loc_8E310:
mov eax, 6; jumptable 000000000008E2FA case 8
loc_8E315:
xor ecx, ecx
def_8E2FA:
test cl, cl; jumptable 000000000008E2FA default case, cases 4-6
jnz short loc_8E31C
retn
loc_8E31C:
push rax
call ggml_ftype_to_ggml_type_cold_1
| long long ggml_ftype_to_ggml_type(long long a1)
{
long long result; // rax
char v2; // cl
result = 19LL;
v2 = 1;
switch ( (int)a1 )
{
case 0:
case 1:
case 2:
case 3:
case 10:
case 11:
case 12:
case 13:
case 14:
v2 = 0;
result = (unsigned int)a1;
break;
case 7:
result = 8LL;
goto LABEL_6;
case 8:
result = 6LL;
goto LABEL_6;
case 9:
result = 7LL;
LABEL_6:
v2 = 0;
break;
default:
break;
}
if ( v2 )
ggml_ftype_to_ggml_type_cold_1(a1);
return result;
}
| |||
44,601 | ggml_ftype_to_ggml_type | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | enum ggml_type ggml_ftype_to_ggml_type(enum ggml_ftype ftype) {
enum ggml_type wtype = GGML_TYPE_COUNT;
switch (ftype) {
case GGML_FTYPE_ALL_F32: wtype = GGML_TYPE_F32; break;
case GGML_FTYPE_MOSTLY_F16: wtype = GGML_TYPE_F16; break;
case GGML_FTYPE_MOSTLY_Q4_0: wtype = GGML_TYPE_Q4_0; break;
case GGML_FTYPE_MOSTLY_Q4_1: wtype = GGML_TYPE_Q4_1; break;
case GGML_FTYPE_MOSTLY_Q5_0: wtype = GGML_TYPE_Q5_0; break;
case GGML_FTYPE_MOSTLY_Q5_1: wtype = GGML_TYPE_Q5_1; break;
case GGML_FTYPE_MOSTLY_Q8_0: wtype = GGML_TYPE_Q8_0; break;
case GGML_FTYPE_MOSTLY_Q2_K: wtype = GGML_TYPE_Q2_K; break;
case GGML_FTYPE_MOSTLY_Q3_K: wtype = GGML_TYPE_Q3_K; break;
case GGML_FTYPE_MOSTLY_Q4_K: wtype = GGML_TYPE_Q4_K; break;
case GGML_FTYPE_MOSTLY_Q5_K: wtype = GGML_TYPE_Q5_K; break;
case GGML_FTYPE_MOSTLY_Q6_K: wtype = GGML_TYPE_Q6_K; break;
case GGML_FTYPE_UNKNOWN: wtype = GGML_TYPE_COUNT; break;
case GGML_FTYPE_MOSTLY_Q4_1_SOME_F16: wtype = GGML_TYPE_COUNT; break;
}
GGML_ASSERT(wtype != GGML_TYPE_COUNT);
return wtype;
} | O2 | c | ggml_ftype_to_ggml_type:
cmpl $0xf, %edi
jae 0x67d62
movl $0x7f8f, %eax # imm = 0x7F8F
btl %edi, %eax
jae 0x67d62
movl %edi, %eax
leaq 0x39a22(%rip), %rcx # 0xa1780
movl (%rcx,%rax,4), %eax
retq
pushq %rax
movq 0x6e1de(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6e22f(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x3249b(%rip), %rsi # 0x9a21e
leaq 0x39af4(%rip), %rdx # 0xa187e
leaq 0x39cae(%rip), %r8 # 0xa1a3f
movl $0x846, %ecx # imm = 0x846
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
| ggml_ftype_to_ggml_type:
cmp edi, 0Fh
jnb short loc_67D62
mov eax, 7F8Fh
bt eax, edi
jnb short loc_67D62
mov eax, edi
lea rcx, unk_A1780
mov eax, [rcx+rax*4]
retn
loc_67D62:
push rax
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aWtypeGgmlTypeC; "wtype != GGML_TYPE_COUNT"
mov ecx, 846h
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
| long long ggml_ftype_to_ggml_type(unsigned int a1)
{
int v1; // eax
long long v3; // rdi
if ( a1 >= 0xF || (v1 = 32655, !_bittest(&v1, a1)) )
{
fflush(stdout);
v3 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2118,
"wtype != GGML_TYPE_COUNT");
ggml_print_backtrace();
abort(v3);
}
return dword_A1780[a1];
}
| ggml_ftype_to_ggml_type:
CMP EDI,0xf
JNC 0x00167d62
MOV EAX,0x7f8f
BT EAX,EDI
JNC 0x00167d62
MOV EAX,EDI
LEA RCX,[0x1a1780]
MOV EAX,dword ptr [RCX + RAX*0x4]
RET
LAB_00167d62:
PUSH RAX
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a1a3f]
MOV ECX,0x846
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
int4 ggml_ftype_to_ggml_type(uint param_1)
{
int8 in_RAX;
int8 in_R9;
if ((param_1 < 0xf) && (in_RAX = 0x7f8f, (0x7f8fU >> (param_1 & 0x1f) & 1) != 0)) {
return *(int4 *)(&DAT_001a1780 + (ulong)param_1 * 4);
}
fflush(*(FILE **)PTR_stdout_001d5f48);
fprintf(*(FILE **)PTR_stderr_001d5fa8,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
0x846,"wtype != GGML_TYPE_COUNT",in_R9,in_RAX);
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
| |
44,602 | translog_wait_for_closing | eloqsql/storage/maria/ma_loghandler.c | static void translog_wait_for_closing(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_wait_for_closing");
DBUG_PRINT("enter", ("Buffer #%u %p copies in progress: %u "
"is closing %u File: %d size: %lu",
(uint) buffer->buffer_no, buffer,
(uint) buffer->copy_to_buffer_in_progress,
(uint) buffer->is_closing_buffer,
(buffer->file ? buffer->file->handler.file : -1),
(ulong) buffer->size));
translog_buffer_lock_assert_owner(buffer);
while (buffer->is_closing_buffer)
{
DBUG_PRINT("info", ("wait for writers... buffer: #%u %p",
(uint) buffer->buffer_no, buffer));
DBUG_ASSERT(buffer->file != NULL);
mysql_cond_wait(&buffer->waiting_filling_buffer, &buffer->mutex);
DBUG_PRINT("info", ("wait for writers done buffer: #%u %p",
(uint) buffer->buffer_no, buffer));
}
DBUG_VOID_RETURN;
} | O0 | c | translog_wait_for_closing:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x5ccbe
jmp 0x5ccc0
movq -0x8(%rbp), %rax
cmpb $0x0, 0x1000d8(%rax)
je 0x5cd00
jmp 0x5cccf
jmp 0x5ccd1
jmp 0x5ccd3
jmp 0x5ccd5
movq -0x8(%rbp), %rdi
addq $0x100040, %rdi # imm = 0x100040
movq -0x8(%rbp), %rsi
addq $0x100090, %rsi # imm = 0x100090
leaq 0xf4fe5(%rip), %rdx # 0x151cd7
movl $0x7e6, %ecx # imm = 0x7E6
callq 0x50080
jmp 0x5ccfe
jmp 0x5ccc0
jmp 0x5cd02
jmp 0x5cd04
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| translog_wait_for_closing:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_5CCBE:
jmp short $+2
loc_5CCC0:
mov rax, [rbp+var_8]
cmp byte ptr [rax+1000D8h], 0
jz short loc_5CD00
jmp short $+2
loc_5CCCF:
jmp short $+2
loc_5CCD1:
jmp short $+2
loc_5CCD3:
jmp short $+2
loc_5CCD5:
mov rdi, [rbp+var_8]
add rdi, 100040h
mov rsi, [rbp+var_8]
add rsi, 100090h
lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 7E6h
call inline_mysql_cond_wait_1
jmp short $+2
loc_5CCFE:
jmp short loc_5CCC0
loc_5CD00:
jmp short $+2
loc_5CD02:
jmp short $+2
loc_5CD04:
add rsp, 10h
pop rbp
retn
| long long translog_wait_for_closing(long long a1)
{
long long result; // rax
while ( 1 )
{
result = a1;
if ( !*(_BYTE *)(a1 + 1048792) )
break;
inline_mysql_cond_wait_1(
a1 + 1048640,
a1 + 1048720,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x7E6u);
}
return result;
}
| translog_wait_for_closing:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0015ccbe
LAB_0015ccbe:
JMP 0x0015ccc0
LAB_0015ccc0:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x1000d8],0x0
JZ 0x0015cd00
JMP 0x0015cccf
LAB_0015cccf:
JMP 0x0015ccd1
LAB_0015ccd1:
JMP 0x0015ccd3
LAB_0015ccd3:
JMP 0x0015ccd5
LAB_0015ccd5:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100040
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x100090
LEA RDX,[0x251cd7]
MOV ECX,0x7e6
CALL 0x00150080
JMP 0x0015ccfe
LAB_0015ccfe:
JMP 0x0015ccc0
LAB_0015cd00:
JMP 0x0015cd02
LAB_0015cd02:
JMP 0x0015cd04
LAB_0015cd04:
ADD RSP,0x10
POP RBP
RET
|
void translog_wait_for_closing(long param_1)
{
while (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1) != '\0') {
inline_mysql_cond_wait
((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1,param_1 + 0x100090,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x7e6);
}
return;
}
| |
44,603 | file_set | corpus-core[P]colibri-stateless/src/util/plugin.c | static void file_set(char* key, bytes_t value) {
char* full_path = combine_filename(key);
if (full_path == NULL) return;
FILE* file = fopen(full_path, "wb");
safe_free(full_path);
if (!file) return;
fwrite(value.data, 1, value.len, file);
fclose(file);
} | O0 | c | file_set:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %esi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa5130
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xa5049
jmp 0xa508f
movq -0x20(%rbp), %rdi
leaq 0x42c7c(%rip), %rsi # 0xe7cd0
callq 0x23560
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x9dbf0
cmpq $0x0, -0x28(%rbp)
jne 0xa506f
jmp 0xa508f
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, %edx
movq -0x28(%rbp), %rcx
movl $0x1, %esi
callq 0x23530
movq -0x28(%rbp), %rdi
callq 0x23230
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| file_set:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], esi
mov [rbp+var_8], rdx
mov [rbp+var_18], rdi
mov rdi, [rbp+var_18]
call combine_filename
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_A5049
jmp short loc_A508F
loc_A5049:
mov rdi, [rbp+var_20]
lea rsi, aWb; "wb"
call _fopen
mov [rbp+var_28], rax
mov rdi, [rbp+var_20]
call safe_free
cmp [rbp+var_28], 0
jnz short loc_A506F
jmp short loc_A508F
loc_A506F:
mov rdi, [rbp+var_8]
mov eax, [rbp+var_10]
mov edx, eax
mov rcx, [rbp+var_28]
mov esi, 1
call _fwrite
mov rdi, [rbp+var_28]
call _fclose
loc_A508F:
add rsp, 30h
pop rbp
retn
| long long file_set(long long a1, unsigned int a2, long long a3)
{
long long result; // rax
long long v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
result = combine_filename(a1);
v5 = result;
if ( result )
{
v4 = fopen(result, "wb");
result = safe_free(v5);
if ( v4 )
{
fwrite(a3, 1LL, a2, v4);
return fclose(v4);
}
}
return result;
}
| file_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x10],ESI
MOV qword ptr [RBP + -0x8],RDX
MOV qword ptr [RBP + -0x18],RDI
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001a5130
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001a5049
JMP 0x001a508f
LAB_001a5049:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x1e7cd0]
CALL 0x00123560
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0019dbf0
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001a506f
JMP 0x001a508f
LAB_001a506f:
MOV RDI,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0x10]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x28]
MOV ESI,0x1
CALL 0x00123530
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00123230
LAB_001a508f:
ADD RSP,0x30
POP RBP
RET
|
void file_set(int8 param_1,uint param_2,void *param_3)
{
char *__filename;
FILE *__s;
__filename = (char *)combine_filename(param_1);
if (__filename != (char *)0x0) {
__s = fopen(__filename,"wb");
safe_free(__filename);
if (__s != (FILE *)0x0) {
fwrite(param_3,1,(ulong)param_2,__s);
fclose(__s);
}
}
return;
}
| |
44,604 | file_set | corpus-core[P]colibri-stateless/src/util/plugin.c | static void file_set(char* key, bytes_t value) {
char* full_path = combine_filename(key);
if (full_path == NULL) return;
FILE* file = fopen(full_path, "wb");
safe_free(full_path);
if (!file) return;
fwrite(value.data, 1, value.len, file);
fclose(file);
} | O1 | c | file_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
callq 0x5b6bd
testq %rax, %rax
je 0x5b667
movq %rax, %r15
leaq 0x34f95(%rip), %rsi # 0x905c0
movq %rax, %rdi
callq 0x22500
movq %rax, %r14
movq %r15, %rdi
callq 0x56f8c
testq %r14, %r14
je 0x5b667
movl %ebp, %edx
movl $0x1, %esi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x224d0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x22220
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| file_set:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov ebp, esi
call combine_filename
test rax, rax
jz short loc_5B667
mov r15, rax
lea rsi, aWb; "wb"
mov rdi, rax
call _fopen
mov r14, rax
mov rdi, r15
call safe_free
test r14, r14
jz short loc_5B667
mov edx, ebp
mov esi, 1
mov rdi, rbx
mov rcx, r14
call _fwrite
mov rdi, r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _fclose
loc_5B667:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long file_set(long long a1, unsigned int a2, long long a3)
{
long long result; // rax
long long v5; // r15
long long v6; // r14
result = combine_filename(a1);
if ( result )
{
v5 = result;
v6 = fopen(result, "wb");
result = safe_free(v5);
if ( v6 )
{
fwrite(a3, 1LL, a2, v6);
return fclose(v6);
}
}
return result;
}
| file_set:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV EBP,ESI
CALL 0x0015b6bd
TEST RAX,RAX
JZ 0x0015b667
MOV R15,RAX
LEA RSI,[0x1905c0]
MOV RDI,RAX
CALL 0x00122500
MOV R14,RAX
MOV RDI,R15
CALL 0x00156f8c
TEST R14,R14
JZ 0x0015b667
MOV EDX,EBP
MOV ESI,0x1
MOV RDI,RBX
MOV RCX,R14
CALL 0x001224d0
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00122220
LAB_0015b667:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void file_set(int8 param_1,ulong param_2,void *param_3)
{
char *__filename;
FILE *__s;
__filename = (char *)combine_filename();
if (__filename != (char *)0x0) {
__s = fopen(__filename,"wb");
safe_free(__filename);
if (__s != (FILE *)0x0) {
fwrite(param_3,1,param_2 & 0xffffffff,__s);
fclose(__s);
return;
}
}
return;
}
| |
44,605 | file_set | corpus-core[P]colibri-stateless/src/util/plugin.c | static void file_set(char* key, bytes_t value) {
char* full_path = combine_filename(key);
if (full_path == NULL) return;
FILE* file = fopen(full_path, "wb");
safe_free(full_path);
if (!file) return;
fwrite(value.data, 1, value.len, file);
fclose(file);
} | O3 | c | file_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
callq 0x57292
testq %rax, %rax
je 0x5723c
movq %rax, %r15
leaq 0x35420(%rip), %rsi # 0x8c620
movq %rax, %rdi
callq 0x22500
movq %rax, %r14
movq %r15, %rdi
callq 0x52f98
testq %r14, %r14
je 0x5723c
movl %ebp, %edx
movl $0x1, %esi
movq %rbx, %rdi
movq %r14, %rcx
callq 0x224d0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x22220
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| file_set:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov ebp, esi
call combine_filename
test rax, rax
jz short loc_5723C
mov r15, rax
lea rsi, aWb; "wb"
mov rdi, rax
call _fopen
mov r14, rax
mov rdi, r15
call safe_free
test r14, r14
jz short loc_5723C
mov edx, ebp
mov esi, 1
mov rdi, rbx
mov rcx, r14
call _fwrite
mov rdi, r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _fclose
loc_5723C:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long file_set(long long a1, unsigned int a2, long long a3)
{
long long result; // rax
long long v5; // r15
long long v6; // r14
result = combine_filename(a1);
if ( result )
{
v5 = result;
v6 = fopen(result, "wb");
result = safe_free(v5);
if ( v6 )
{
fwrite(a3, 1LL, a2, v6);
return fclose(v6);
}
}
return result;
}
| file_set:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV EBP,ESI
CALL 0x00157292
TEST RAX,RAX
JZ 0x0015723c
MOV R15,RAX
LEA RSI,[0x18c620]
MOV RDI,RAX
CALL 0x00122500
MOV R14,RAX
MOV RDI,R15
CALL 0x00152f98
TEST R14,R14
JZ 0x0015723c
MOV EDX,EBP
MOV ESI,0x1
MOV RDI,RBX
MOV RCX,R14
CALL 0x001224d0
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00122220
LAB_0015723c:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void file_set(int8 param_1,ulong param_2,void *param_3)
{
char *__filename;
FILE *__s;
__filename = (char *)combine_filename();
if (__filename != (char *)0x0) {
__s = fopen(__filename,"wb");
safe_free(__filename);
if (__s != (FILE *)0x0) {
fwrite(param_3,1,param_2 & 0xffffffff,__s);
fclose(__s);
return;
}
}
return;
}
| |
44,606 | my_rw_rdlock | eloqsql/mysys/thr_rwlock.c | int my_rw_rdlock(my_rw_lock_t *rwp)
{
pthread_mutex_lock(&rwp->lock);
/* active or queued writers */
while (( rwp->state < 0 ) || rwp->waiters)
pthread_cond_wait( &rwp->readers, &rwp->lock);
rwp->state++;
pthread_mutex_unlock(&rwp->lock);
return(0);
} | O3 | c | my_rw_rdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x28570
leaq 0x28(%rbx), %r14
movl 0x88(%rbx), %eax
testl %eax, %eax
js 0x615ba
cmpl $0x0, 0x8c(%rbx)
je 0x615c7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x285f0
jmp 0x615a7
incl %eax
movl %eax, 0x88(%rbx)
movq %rbx, %rdi
callq 0x28280
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| my_rw_rdlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
lea r14, [rbx+28h]
loc_615A7:
mov eax, [rbx+88h]
test eax, eax
js short loc_615BA
cmp dword ptr [rbx+8Ch], 0
jz short loc_615C7
loc_615BA:
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
jmp short loc_615A7
loc_615C7:
inc eax
mov [rbx+88h], eax
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
pop rbx
pop r14
pop rbp
retn
| long long my_rw_rdlock(long long a1)
{
int v1; // eax
pthread_mutex_lock(a1);
while ( 1 )
{
v1 = *(_DWORD *)(a1 + 136);
if ( v1 >= 0 && !*(_DWORD *)(a1 + 140) )
break;
pthread_cond_wait(a1 + 40, a1);
}
*(_DWORD *)(a1 + 136) = v1 + 1;
pthread_mutex_unlock(a1);
return 0LL;
}
| my_rw_rdlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00128570
LEA R14,[RBX + 0x28]
LAB_001615a7:
MOV EAX,dword ptr [RBX + 0x88]
TEST EAX,EAX
JS 0x001615ba
CMP dword ptr [RBX + 0x8c],0x0
JZ 0x001615c7
LAB_001615ba:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001285f0
JMP 0x001615a7
LAB_001615c7:
INC EAX
MOV dword ptr [RBX + 0x88],EAX
MOV RDI,RBX
CALL 0x00128280
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_rdlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
while ((*(int *)((long)param_1 + 0x88) < 0 || (*(int *)((long)param_1 + 0x8c) != 0))) {
pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1);
}
*(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1;
pthread_mutex_unlock(param_1);
return 0;
}
| |
44,607 | resize_queue | eloqsql/mysys/queues.c | int resize_queue(QUEUE *queue, uint max_elements)
{
uchar **new_root;
DBUG_ENTER("resize_queue");
if (queue->max_elements == max_elements)
DBUG_RETURN(0);
if ((new_root= (uchar **) my_realloc(key_memory_QUEUE, (void *)queue->root,
(max_elements + 1)* sizeof(void*),
MYF(MY_WME))) == 0)
DBUG_RETURN(1);
set_if_smaller(queue->elements, max_elements);
queue->max_elements= max_elements;
queue->root= new_root;
DBUG_RETURN(0);
} | O3 | c | resize_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl %esi, 0x14(%rdi)
je 0xa359f
movl %esi, %r15d
movq %rdi, %r14
leaq 0xb66ca5(%rip), %rax # 0xc0a210
movl (%rax), %edi
movq (%r14), %rsi
leal 0x1(%r15), %edx
shlq $0x3, %rdx
movl $0x10, %ecx
callq 0xa1308
testq %rax, %rax
je 0xa359a
cmpl %r15d, 0x10(%r14)
jbe 0xa3591
movl %r15d, 0x10(%r14)
movl %r15d, 0x14(%r14)
movq %rax, (%r14)
jmp 0xa359f
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| resize_queue:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
xor ebx, ebx
cmp [rdi+14h], esi
jz short loc_A359F
mov r15d, esi
mov r14, rdi
lea rax, key_memory_QUEUE
mov edi, [rax]
mov rsi, [r14]
lea edx, [r15+1]
shl rdx, 3
mov ecx, 10h
call my_realloc
test rax, rax
jz short loc_A359A
cmp [r14+10h], r15d
jbe short loc_A3591
mov [r14+10h], r15d
loc_A3591:
mov [r14+14h], r15d
mov [r14], rax
jmp short loc_A359F
loc_A359A:
mov ebx, 1
loc_A359F:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long resize_queue(long long a1, unsigned int a2)
{
unsigned int v2; // ebx
long long v3; // rax
v2 = 0;
if ( *(_DWORD *)(a1 + 20) != a2 )
{
v3 = my_realloc(key_memory_QUEUE, *(_QWORD *)a1, 8LL * (a2 + 1), 16);
if ( v3 )
{
if ( *(_DWORD *)(a1 + 16) > a2 )
*(_DWORD *)(a1 + 16) = a2;
*(_DWORD *)(a1 + 20) = a2;
*(_QWORD *)a1 = v3;
}
else
{
return 1;
}
}
return v2;
}
| resize_queue:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
XOR EBX,EBX
CMP dword ptr [RDI + 0x14],ESI
JZ 0x001a359f
MOV R15D,ESI
MOV R14,RDI
LEA RAX,[0xd0a210]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [R14]
LEA EDX,[R15 + 0x1]
SHL RDX,0x3
MOV ECX,0x10
CALL 0x001a1308
TEST RAX,RAX
JZ 0x001a359a
CMP dword ptr [R14 + 0x10],R15D
JBE 0x001a3591
MOV dword ptr [R14 + 0x10],R15D
LAB_001a3591:
MOV dword ptr [R14 + 0x14],R15D
MOV qword ptr [R14],RAX
JMP 0x001a359f
LAB_001a359a:
MOV EBX,0x1
LAB_001a359f:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 resize_queue(long *param_1,uint param_2)
{
long lVar1;
int8 uVar2;
uVar2 = 0;
if (*(uint *)((long)param_1 + 0x14) != param_2) {
lVar1 = my_realloc(key_memory_QUEUE,*param_1,(ulong)(param_2 + 1) << 3,0x10);
if (lVar1 == 0) {
uVar2 = 1;
}
else {
if (param_2 < *(uint *)(param_1 + 2)) {
*(uint *)(param_1 + 2) = param_2;
}
*(uint *)((long)param_1 + 0x14) = param_2;
*param_1 = lVar1;
}
}
return uVar2;
}
| |
44,608 | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) | ng-log[P]ng-log/src/utilities.cc | static void DumpStackTrace(int skip_count, DebugWriter* writerfn, void* arg) {
// Print stack trace
void* stack[32];
int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count + 1);
for (int i = 0; i < depth; i++) {
# if defined(HAVE_SYMBOLIZE)
if (FLAGS_symbolize_stacktrace) {
DumpPCAndSymbol(writerfn, arg, stack[i], " ");
} else {
DumpPC(writerfn, arg, stack[i], " ");
}
# else
DumpPC(writerfn, arg, stack[i], " ");
# endif
}
} | O1 | cpp | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x918, %rsp # imm = 0x918
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %rdi
movl $0x20, %esi
movl $0x2, %edx
callq 0x20234
testl %eax, %eax
jle 0x21440
movl %eax, %r13d
leaq 0x110(%rsp), %r15
xorl %ebp, %ebp
movq 0x10(%rsp,%rbp,8), %r12
leaq 0xe73b(%rip), %rax # 0x2fac9
cmpb $0x1, (%rax)
jne 0x21405
leaq -0x1(%r12), %rdi
movl $0x400, %edx # imm = 0x400
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x204da
testb %al, %al
leaq 0x11f0(%rip), %rax # 0x225a0
cmovneq %r15, %rax
movq %rax, (%rsp)
movl $0x400, %esi # imm = 0x400
movq %r13, %r15
movq %r14, %r13
movq %rbx, %r14
leaq 0x510(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2ba3(%rip), %rdx # 0x23f7b
leaq 0x28fd(%rip), %rcx # 0x23cdc
movl $0x12, %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x78b0
movq %rbx, %rdi
movq %r14, %rbx
movq %r13, %r14
movq %r15, %r13
leaq 0x110(%rsp), %r15
jmp 0x2142e
movl $0x64, %esi
movq %r15, %rdi
leaq 0x2b74(%rip), %rdx # 0x23f88
leaq 0x28c1(%rip), %rcx # 0x23cdc
movl $0x12, %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x78b0
movq %r15, %rdi
movq %rbx, %rsi
callq *%r14
incq %rbp
cmpq %rbp, %r13
jne 0x21382
addq $0x918, %rsp # imm = 0x918
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 918h
mov rbx, rsi
mov r14, rdi
lea rdi, [rsp+948h+var_938]; this
mov esi, offset qword_20; void **
mov edx, 2; int
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
test eax, eax
jle loc_21440
mov r13d, eax
lea r15, [rsp+948h+var_838]
xor ebp, ebp
loc_21382:
mov r12, [rsp+rbp*8+948h+var_938]
lea rax, _ZN3fLB26FLAGS_symbolize_stacktraceE; fLB::FLAGS_symbolize_stacktrace
cmp byte ptr [rax], 1
jnz short loc_21405
lea rdi, [r12-1]
mov edx, 400h
mov rsi, r15
xor ecx, ecx
call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions)
test al, al
lea rax, aUnknown; "(unknown)"
cmovnz rax, r15
mov [rsp+948h+var_948], rax
mov esi, 400h
mov r15, r13
mov r13, r14
mov r14, rbx
lea rbx, [rsp+948h+var_438]
mov rdi, rbx
lea rdx, aSPS; "%s@ %*p %s\n"
lea rcx, asc_23CDC; " "
mov r8d, 12h
mov r9, r12
xor eax, eax
call _snprintf
mov rdi, rbx
mov rbx, r14
mov r14, r13
mov r13, r15
lea r15, [rsp+948h+var_838]
jmp short loc_2142E
loc_21405:
mov esi, 64h ; 'd'
mov rdi, r15
lea rdx, aSP; "%s@ %*p\n"
lea rcx, asc_23CDC; " "
mov r8d, 12h
mov r9, r12
xor eax, eax
call _snprintf
mov rdi, r15
loc_2142E:
mov rsi, rbx
call r14
inc rbp
cmp r13, rbp
jnz loc_21382
loc_21440:
add rsp, 918h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nglog::DumpStackTrace(nglog *this, long long a2, void (*a3)(const char *, void *), void *a4)
{
long long result; // rax
long long v5; // r13
long long i; // rbp
const void *v7; // r12
bool v8; // zf
const char *v9; // rax
_QWORD v10[32]; // [rsp+10h] [rbp-938h] BYREF
_BYTE v11[1024]; // [rsp+110h] [rbp-838h] BYREF
_BYTE v12[1080]; // [rsp+510h] [rbp-438h] BYREF
result = nglog::tools::GetStackTrace((nglog::tools *)v10, (void **)&qword_20, 2);
if ( (int)result > 0 )
{
v5 = (unsigned int)result;
for ( i = 0LL; i != v5; ++i )
{
v7 = (const void *)v10[i];
if ( fLB::FLAGS_symbolize_stacktrace == 1 )
{
v8 = (unsigned __int8)nglog::tools::Symbolize(
(unsigned long long)v7 - 1,
(nglog::tools::_anonymous_namespace_ *)v11,
(char *)&stru_400) == 0;
v9 = "(unknown)";
if ( !v8 )
v9 = v11;
snprintf(v12, 1024LL, "%s@ %*p %s\n", " ", 18, v7, v9);
result = ((long long ( *)(_BYTE *, long long))this)(v12, a2);
}
else
{
snprintf(v11, 100LL, "%s@ %*p\n", " ", 18, (const void *)v10[i]);
result = ((long long ( *)(_BYTE *, long long))this)(v11, a2);
}
}
}
return result;
}
| DumpStackTrace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x918
MOV RBX,RSI
MOV R14,RDI
LEA RDI,[RSP + 0x10]
MOV ESI,0x20
MOV EDX,0x2
CALL 0x00120234
TEST EAX,EAX
JLE 0x00121440
MOV R13D,EAX
LEA R15,[RSP + 0x110]
XOR EBP,EBP
LAB_00121382:
MOV R12,qword ptr [RSP + RBP*0x8 + 0x10]
LEA RAX,[0x12fac9]
CMP byte ptr [RAX],0x1
JNZ 0x00121405
LEA RDI,[R12 + -0x1]
MOV EDX,0x400
MOV RSI,R15
XOR ECX,ECX
CALL 0x001204da
TEST AL,AL
LEA RAX,[0x1225a0]
CMOVNZ RAX,R15
MOV qword ptr [RSP],RAX
MOV ESI,0x400
MOV R15,R13
MOV R13,R14
MOV R14,RBX
LEA RBX,[RSP + 0x510]
MOV RDI,RBX
LEA RDX,[0x123f7b]
LEA RCX,[0x123cdc]
MOV R8D,0x12
MOV R9,R12
XOR EAX,EAX
CALL 0x001078b0
MOV RDI,RBX
MOV RBX,R14
MOV R14,R13
MOV R13,R15
LEA R15,[RSP + 0x110]
JMP 0x0012142e
LAB_00121405:
MOV ESI,0x64
MOV RDI,R15
LEA RDX,[0x123f88]
LEA RCX,[0x123cdc]
MOV R8D,0x12
MOV R9,R12
XOR EAX,EAX
CALL 0x001078b0
MOV RDI,R15
LAB_0012142e:
MOV RSI,RBX
CALL R14
INC RBP
CMP R13,RBP
JNZ 0x00121382
LAB_00121440:
ADD RSP,0x918
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) */
void nglog::DumpStackTrace(int param_1,_func_void_char_ptr_void_ptr *param_2,void *param_3)
{
void *pvVar1;
char cVar2;
uint uVar3;
char *pcVar4;
ulong uVar5;
int4 in_register_0000003c;
char *__s;
void *local_938 [32];
char local_838 [1024];
char local_438 [1032];
uVar3 = tools::GetStackTrace(local_938,0x20,2);
if (0 < (int)uVar3) {
uVar5 = 0;
do {
__s = local_838;
pvVar1 = local_938[uVar5];
if (fLB::FLAGS_symbolize_stacktrace == '\x01') {
cVar2 = tools::Symbolize((long)pvVar1 + -1,__s,0x400,0);
pcVar4 = "(unknown)";
if (cVar2 != '\0') {
pcVar4 = __s;
}
__s = local_438;
snprintf(__s,0x400,"%s@ %*p %s\n",&DAT_00123cdc,0x12,pvVar1,pcVar4);
}
else {
snprintf(__s,100,"%s@ %*p\n",&DAT_00123cdc,0x12,pvVar1);
}
(*(code *)CONCAT44(in_register_0000003c,param_1))(__s,param_2);
uVar5 = uVar5 + 1;
} while (uVar3 != uVar5);
}
return;
}
| |
44,609 | walk_and_copy | eloqsql/storage/myisam/ft_nlq_search.c | static int walk_and_copy(FT_SUPERDOC *from,
uint32 count __attribute__((unused)), FT_DOC **to)
{
DBUG_ENTER("walk_and_copy");
from->doc.weight+=from->tmp_weight*from->word_ptr->weight;
(*to)->dpos=from->doc.dpos;
(*to)->weight=from->doc.weight;
(*to)++;
DBUG_RETURN(0);
} | O0 | c | walk_and_copy:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movsd 0x18(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movsd 0x8(%rax), %xmm2
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movsd %xmm0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq %rcx, (%rax)
jmp 0xa1771
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| walk_and_copy_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax+18h]
mov rax, [rbp+var_8]
mov rax, [rax+10h]
movsd xmm2, qword ptr [rax+8]
mov rax, [rbp+var_8]
movsd xmm1, qword ptr [rax+8]
mulsd xmm0, xmm2
addsd xmm0, xmm1
movsd qword ptr [rax+8], xmm0
mov rax, [rbp+var_8]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_18]
mov rax, [rax]
movsd qword ptr [rax+8], xmm0
mov rax, [rbp+var_18]
mov rcx, [rax]
add rcx, 10h
mov [rax], rcx
jmp short $+2
loc_A1771:
xor eax, eax
pop rbp
retn
| long long walk_and_copy_0(long long a1, long long a2, long long a3)
{
*(double *)(a1 + 8) = *(double *)(a1 + 24) * *(double *)(*(_QWORD *)(a1 + 16) + 8LL) + *(double *)(a1 + 8);
**(_QWORD **)a3 = *(_QWORD *)a1;
*(_QWORD *)(*(_QWORD *)a3 + 8LL) = *(_QWORD *)(a1 + 8);
*(_QWORD *)a3 += 16LL;
return 0LL;
}
| walk_and_copy:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOVSD XMM2,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [RAX + 0x8]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
MOVSD qword ptr [RAX + 0x8],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVSD qword ptr [RAX + 0x8],XMM0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
JMP 0x001a1771
LAB_001a1771:
XOR EAX,EAX
POP RBP
RET
|
int8 walk_and_copy(int8 *param_1,int8 param_2,long *param_3)
{
param_1[1] = (double)param_1[3] * *(double *)(param_1[2] + 8) + (double)param_1[1];
*(int8 *)*param_3 = *param_1;
*(int8 *)(*param_3 + 8) = param_1[1];
*param_3 = *param_3 + 0x10;
return 0;
}
| |
44,610 | walk_and_copy | eloqsql/storage/myisam/ft_nlq_search.c | static int walk_and_copy(FT_SUPERDOC *from,
uint32 count __attribute__((unused)), FT_DOC **to)
{
DBUG_ENTER("walk_and_copy");
from->doc.weight+=from->tmp_weight*from->word_ptr->weight;
(*to)->dpos=from->doc.dpos;
(*to)->weight=from->doc.weight;
(*to)++;
DBUG_RETURN(0);
} | O3 | c | walk_and_copy:
pushq %rbp
movq %rsp, %rbp
movsd 0x18(%rdi), %xmm0
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
mulsd 0x8(%rcx), %xmm0
addsd 0x8(%rdi), %xmm0
movsd %xmm0, 0x8(%rdi)
movq (%rdx), %rcx
movq %rax, (%rcx)
movsd 0x8(%rdi), %xmm0
movq (%rdx), %rax
movsd %xmm0, 0x8(%rax)
addq $0x10, (%rdx)
xorl %eax, %eax
popq %rbp
retq
| walk_and_copy_0:
push rbp
mov rbp, rsp
movsd xmm0, qword ptr [rdi+18h]
mov rax, [rdi]
mov rcx, [rdi+10h]
mulsd xmm0, qword ptr [rcx+8]
addsd xmm0, qword ptr [rdi+8]
movsd qword ptr [rdi+8], xmm0
mov rcx, [rdx]
mov [rcx], rax
movsd xmm0, qword ptr [rdi+8]
mov rax, [rdx]
movsd qword ptr [rax+8], xmm0
add qword ptr [rdx], 10h
xor eax, eax
pop rbp
retn
| long long walk_and_copy_0(double *a1, long long a2, long long a3)
{
long long v3; // rax
v3 = *(_QWORD *)a1;
a1[1] = a1[3] * *(double *)(*((_QWORD *)a1 + 2) + 8LL) + a1[1];
**(_QWORD **)a3 = v3;
*(double *)(*(_QWORD *)a3 + 8LL) = a1[1];
*(_QWORD *)a3 += 16LL;
return 0LL;
}
| walk_and_copy:
PUSH RBP
MOV RBP,RSP
MOVSD XMM0,qword ptr [RDI + 0x18]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x10]
MULSD XMM0,qword ptr [RCX + 0x8]
ADDSD XMM0,qword ptr [RDI + 0x8]
MOVSD qword ptr [RDI + 0x8],XMM0
MOV RCX,qword ptr [RDX]
MOV qword ptr [RCX],RAX
MOVSD XMM0,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDX]
MOVSD qword ptr [RAX + 0x8],XMM0
ADD qword ptr [RDX],0x10
XOR EAX,EAX
POP RBP
RET
|
int8 walk_and_copy(int8 *param_1,int8 param_2,long *param_3)
{
param_1[1] = (double)param_1[3] * *(double *)(param_1[2] + 8) + (double)param_1[1];
*(int8 *)*param_3 = *param_1;
*(int8 *)(*param_3 + 8) = param_1[1];
*param_3 = *param_3 + 0x10;
return 0;
}
| |
44,611 | nglog::(anonymous namespace)::LogCleaner::IsLogLastModifiedOver(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&) const | ng-log[P]ng-log/src/logging.cc | bool LogCleaner::IsLogLastModifiedOver(
const string& filepath,
const std::chrono::system_clock::time_point& current_time) const {
// Try to get the last modified time of this file.
struct stat file_stat;
if (stat(filepath.c_str(), &file_stat) == 0) {
const auto last_modified_time =
std::chrono::system_clock::from_time_t(file_stat.st_mtime);
const auto diff = current_time - last_modified_time;
return diff >= overdue_;
}
// If failed to get file stat, don't return true!
return false;
} | O0 | cpp | nglog::(anonymous namespace)::LogCleaner::IsLogLastModifiedOver(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&) const:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92c0
movq %rax, %rdi
leaq -0xb0(%rbp), %rsi
callq 0x9630
cmpl $0x0, %eax
jne 0x15bc4
movq -0x58(%rbp), %rdi
callq 0x18b40
movq %rax, -0xb8(%rbp)
movq -0x20(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x18af0
movq -0xc8(%rbp), %rsi
movq %rax, -0xc0(%rbp)
addq $0x8, %rsi
leaq -0xc0(%rbp), %rdi
callq 0x1b440
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x15bc8
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZNK5nglog12_GLOBAL__N_110LogCleaner21IsLogLastModifiedOverERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNSt6chrono10time_pointINSA_3_V212system_clockENSA_8durationIlSt5ratioILl1ELl1000000000EEEEEE:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov [rbp+var_C8], rax
mov rdi, [rbp+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
lea rsi, [rbp+var_B0]; __int64
call _stat
cmp eax, 0
jnz short loc_15BC4
mov rdi, [rbp+var_58]; this
call _ZNSt6chrono3_V212system_clock11from_time_tEl; std::chrono::_V2::system_clock::from_time_t(long)
mov [rbp+var_B8], rax
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_B8]
call _ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE; std::chrono::operator-<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&)
mov rsi, [rbp+var_C8]
mov [rbp+var_C0], rax
add rsi, 8
lea rdi, [rbp+var_C0]
call _ZNSt6chronogeIlSt5ratioILl1ELl1000000000EElS1_ILl60ELl1EEEEbRKNS_8durationIT_T0_EERKNS4_IT1_T2_EE; std::chrono::operator>=<long,std::ratio<1l,1000000000l>,long,std::ratio<60l,1l>>(std::chrono::duration<long,std::ratio<1l,1000000000l>> const&,std::chrono::duration<long,std::ratio<60l,1l>> const&)
and al, 1
mov [rbp+var_1], al
jmp short loc_15BC8
loc_15BC4:
mov [rbp+var_1], 0
loc_15BC8:
mov al, [rbp+var_1]
and al, 1
add rsp, 0D0h
pop rbp
retn
| char nglog::`anonymous namespace'::LogCleaner::IsLogLastModifiedOver(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v5; // [rsp+10h] [rbp-C0h] BYREF
long long v6; // [rsp+18h] [rbp-B8h] BYREF
long long v7[18]; // [rsp+20h] [rbp-B0h] BYREF
long long v8; // [rsp+B0h] [rbp-20h]
long long v9; // [rsp+B8h] [rbp-18h]
long long v10; // [rsp+C0h] [rbp-10h]
v10 = a1;
v9 = a2;
v8 = a3;
v3 = std::string::c_str(a2);
if ( (unsigned int)stat(v3, v7) )
return 0;
v6 = std::chrono::_V2::system_clock::from_time_t((std::chrono::_V2::system_clock *)v7[11], (long long)v7);
v5 = std::chrono::operator-<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>(
v8,
&v6);
return std::chrono::operator>=<long,std::ratio<1l,1000000000l>,long,std::ratio<60l,1l>>(&v5, a1 + 8) & 1;
}
| IsLogLastModifiedOver:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xc8],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001092c0
MOV RDI,RAX
LEA RSI,[RBP + -0xb0]
CALL 0x00109630
CMP EAX,0x0
JNZ 0x00115bc4
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00118b40
MOV qword ptr [RBP + -0xb8],RAX
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0xb8]
CALL 0x00118af0
MOV RSI,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0xc0],RAX
ADD RSI,0x8
LEA RDI,[RBP + -0xc0]
CALL 0x0011b440
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
JMP 0x00115bc8
LAB_00115bc4:
MOV byte ptr [RBP + -0x1],0x0
LAB_00115bc8:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0xd0
POP RBP
RET
|
/* nglog::(anonymous namespace)::LogCleaner::IsLogLastModifiedOver(std::__cxx11::string const&,
std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long,
std::ratio<1l, 1000000000l> > > const&) const */
int8 __thiscall
nglog::(anonymous_namespace)::LogCleaner::IsLogLastModifiedOver
(LogCleaner *this,string *param_1,time_point *param_2)
{
int iVar1;
char *__file;
int4 extraout_var_00;
int7 extraout_var;
int8 uVar2;
int8 local_c8;
int8 local_c0;
stat local_b8;
time_point *local_28;
string *local_20;
LogCleaner *local_18;
bool local_9;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
__file = (char *)std::__cxx11::string::c_str();
iVar1 = stat(__file,&local_b8);
uVar2 = CONCAT44(extraout_var_00,iVar1);
if (iVar1 == 0) {
local_c0 = std::chrono::_V2::system_clock::from_time_t(local_b8.st_mtim.tv_sec);
local_c8 = std::chrono::operator-(local_28,(time_point *)&local_c0);
local_9 = std::chrono::operator>=((duration *)&local_c8,(duration *)(this + 8));
uVar2 = CONCAT71(extraout_var,local_9);
}
else {
local_9 = false;
}
return CONCAT71((int7)((ulong)uVar2 >> 8),local_9);
}
| |
44,612 | my_fill_mb2 | eloqsql/strings/ctype-ucs2.c | static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
} | O0 | c | my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
jmp 0x628b6
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
leaq -0x12(%rbp), %rdx
leaq -0x12(%rbp), %rcx
addq $0xa, %rcx
callq *%rax
cltq
movq %rax, -0x48(%rbp)
jmp 0x628e3
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
xorl %ecx, %ecx
subq -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x62921
movq -0x28(%rbp), %rdi
leaq -0x12(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x25270
movq -0x48(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x628f8
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
jbe 0x62949
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rdx
xorl %esi, %esi
callq 0x251d0
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x62961
addq $0x50, %rsp
popq %rbp
retq
callq 0x25390
nopw %cs:(%rax,%rax)
| my_fill_mb2:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_34], ecx
jmp short $+2
loc_628B6:
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov rdi, [rbp+var_20]
movsxd rsi, [rbp+var_34]
lea rdx, [rbp+var_12]
lea rcx, [rbp+var_12]
add rcx, 0Ah
call rax
cdqe
mov [rbp+var_48], rax
jmp short $+2
loc_628E3:
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
xor ecx, ecx
sub rcx, [rbp+var_48]
add rax, rcx
mov [rbp+var_40], rax
loc_628F8:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_40]
ja short loc_62921
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_12]
mov rdx, [rbp+var_48]
call _memcpy
mov rax, [rbp+var_48]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
jmp short loc_628F8
loc_62921:
mov rax, [rbp+var_40]
add rax, [rbp+var_48]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_50], rax
cmp rax, 0
jbe short loc_62949
mov rdi, [rbp+var_28]
mov rdx, [rbp+var_50]
xor esi, esi
call _memset
loc_62949:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_62961
add rsp, 50h
pop rbp
retn
loc_62961:
call ___stack_chk_fail
| unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
long long i; // [rsp+8h] [rbp-48h]
unsigned long long v7; // [rsp+28h] [rbp-28h]
_BYTE v8[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v9; // [rsp+48h] [rbp-8h] BYREF
v9 = __readfsqword(0x28u);
v7 = a2;
for ( i = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v8,
&v9); v7 <= a3 + a2 - i; v7 += i )
memcpy(v7, v8, i);
if ( a3 + a2 != v7 )
memset(v7, 0LL, a3 + a2 - v7);
return __readfsqword(0x28u);
}
| my_fill_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV dword ptr [RBP + -0x34],ECX
JMP 0x001628b6
LAB_001628b6:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x20]
MOVSXD RSI,dword ptr [RBP + -0x34]
LEA RDX,[RBP + -0x12]
LEA RCX,[RBP + -0x12]
ADD RCX,0xa
CALL RAX
CDQE
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001628e3
LAB_001628e3:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x48]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_001628f8:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x00162921
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x12]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00125270
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001628f8
LAB_00162921:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JBE 0x00162949
MOV RDI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x50]
XOR ESI,ESI
CALL 0x001251d0
LAB_00162949:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00162961
ADD RSP,0x50
POP RBP
RET
LAB_00162961:
CALL 0x00125390
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
size_t sVar2;
void *pvVar3;
long in_FS_OFFSET;
void *local_30;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_1a);
sVar2 = (size_t)iVar1;
pvVar3 = (void *)((long)param_2 + (param_3 - sVar2));
for (local_30 = param_2; local_30 <= pvVar3; local_30 = (void *)(sVar2 + (long)local_30)) {
memcpy(local_30,local_1a,sVar2);
}
sVar2 = (long)pvVar3 + (sVar2 - (long)local_30);
if (sVar2 != 0) {
memset(local_30,0,sVar2);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
44,613 | resolve_collation | eloqsql/mysys/charset.c | my_bool resolve_collation(const char *cl_name,
CHARSET_INFO *default_cl,
CHARSET_INFO **cl,
myf my_flags)
{
*cl= get_charset_by_name(cl_name, my_flags);
if (*cl == NULL)
{
*cl= default_cl;
return TRUE;
}
return FALSE;
} | O3 | c | resolve_collation:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq -0xc8(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0x13af(%rip), %rax # 0x91f7e
movq %rax, 0x80(%rdi)
leaq -0x13ae(%rip), %rax # 0x91f8d
movq %rax, 0x88(%rdi)
leaq -0x13a1(%rip), %rax # 0x91fa8
movq %rax, 0x90(%rdi)
leaq 0xcc87(%rip), %rax # 0x9ffde
movq %rax, 0x98(%rdi)
leaq 0x2f238b(%rip), %rax # 0x3856f0
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0x13b0(%rip), %rax # 0x91fc6
movq %rax, 0xa8(%rdi)
movq %rcx, %rdx
callq 0x92ef8
movq %rax, %rcx
testq %rax, %rax
sete %al
cmovneq %rcx, %r14
movq %r14, (%rbx)
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x933b0
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x29270
| resolve_collation:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0C0h
mov rbx, rdx
mov r14, rsi
mov rsi, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, [rbp+var_C8]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
mov rdx, rcx
call my_collation_get_by_name
mov rcx, rax
test rax, rax
setz al
cmovnz r14, rcx
mov [rbx], r14
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_933B0
add rsp, 0C0h
pop rbx
pop r14
pop rbp
retn
loc_933B0:
call ___stack_chk_fail
| bool resolve_collation(long long a1, long long a2, long long *a3, long long a4)
{
long long v6; // rcx
bool result; // al
char v8[128]; // [rsp+8h] [rbp-C8h] BYREF
long long ( *v9)(long long); // [rsp+88h] [rbp-48h]
long long ( *v10)(long long); // [rsp+90h] [rbp-40h]
long long ( *v11)(long long, long long, long long, long long, long long, long long); // [rsp+98h] [rbp-38h]
long long ( *v12)(_QWORD); // [rsp+A0h] [rbp-30h]
long long ( *v13)(); // [rsp+A8h] [rbp-28h]
long long ( *v14)(unsigned int *); // [rsp+B0h] [rbp-20h]
unsigned long long v15; // [rsp+B8h] [rbp-18h]
v15 = __readfsqword(0x28u);
v8[0] = 0;
v9 = my_once_alloc_c;
v10 = my_malloc_c;
v11 = my_realloc_c;
v12 = my_free;
v13 = my_charset_error_reporter;
v14 = add_collation;
v6 = my_collation_get_by_name((long long)v8, a1, a4);
result = v6 == 0;
if ( v6 )
a2 = v6;
*a3 = a2;
return result;
}
| resolve_collation:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xc0
MOV RBX,RDX
MOV R14,RSI
MOV RSI,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0xc8]
MOV byte ptr [RDI],0x0
LEA RAX,[0x191f7e]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x191f8d]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x191fa8]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x19ffde]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x4856f0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x191fc6]
MOV qword ptr [RDI + 0xa8],RAX
MOV RDX,RCX
CALL 0x00192ef8
MOV RCX,RAX
TEST RAX,RAX
SETZ AL
CMOVNZ R14,RCX
MOV qword ptr [RBX],R14
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x001933b0
ADD RSP,0xc0
POP RBX
POP R14
POP RBP
RET
LAB_001933b0:
CALL 0x00129270
|
bool resolve_collation(int8 param_1,long param_2,long *param_3,int8 param_4)
{
long lVar1;
long in_FS_OFFSET;
int1 local_d0 [128];
code *local_50;
code *local_48;
code *local_40;
code *local_38;
int *local_30;
code *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_d0[0] = 0;
local_50 = my_once_alloc_c;
local_48 = my_malloc_c;
local_40 = my_realloc_c;
local_38 = my_free;
local_30 = my_charset_error_reporter;
local_28 = add_collation;
lVar1 = my_collation_get_by_name(local_d0,param_1,param_4);
if (lVar1 != 0) {
param_2 = lVar1;
}
*param_3 = param_2;
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return lVar1 == 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
44,614 | ftxui::Terminal::Size() | Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/terminal.cpp | Dimensions Size() {
#if defined(__EMSCRIPTEN__)
// This dimension was chosen arbitrarily to be able to display:
// https://arthursonzogni.com/FTXUI/examples
// This will have to be improved when someone has time to implement and need
// it.
return FallbackSize();
#elif defined(_WIN32)
CONSOLE_SCREEN_BUFFER_INFO csbi;
if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi)) {
return Dimensions{csbi.srWindow.Right - csbi.srWindow.Left + 1,
csbi.srWindow.Bottom - csbi.srWindow.Top + 1};
}
return FallbackSize();
#else
winsize w{};
const int status = ioctl(STDOUT_FILENO, TIOCGWINSZ, &w); // NOLINT
// The ioctl return value result should be checked. Some operating systems
// don't support TIOCGWINSZ.
if (w.ws_col == 0 || w.ws_row == 0 || status < 0) {
return FallbackSize();
}
return Dimensions{w.ws_col, w.ws_row};
#endif
} | O0 | cpp | ftxui::Terminal::Size():
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0xd2d0
movl $0x1, %edi
movl $0x5413, %esi # imm = 0x5413
leaq -0x10(%rbp), %rdx
movb $0x0, %al
callq 0xd890
movl %eax, -0x14(%rbp)
movzwl -0xe(%rbp), %eax
cmpl $0x0, %eax
je 0x392a8
movzwl -0x10(%rbp), %eax
cmpl $0x0, %eax
je 0x392a8
cmpl $0x0, -0x14(%rbp)
jge 0x392b6
callq 0x392d0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x392c4
movzwl -0xe(%rbp), %eax
movl %eax, -0x8(%rbp)
movzwl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
| _ZN5ftxui8Terminal4SizeEv:
push rbp
mov rbp, rsp
sub rsp, 20h
lea rdi, [rbp+var_10]
xor esi, esi
mov edx, 8
call _memset
mov edi, (offset dword_0+1); this
mov esi, 5413h
lea rdx, [rbp+var_10]
mov al, 0
call _ioctl
mov [rbp+var_14], eax
movzx eax, [rbp+var_E]
cmp eax, 0
jz short loc_392A8
movzx eax, [rbp+var_10]
cmp eax, 0
jz short loc_392A8
cmp [rbp+var_14], 0
jge short loc_392B6
loc_392A8:
call _ZN5ftxui12_GLOBAL__N_112FallbackSizeEv; ftxui::`anonymous namespace'::FallbackSize(void)
mov rax, [rax]
mov [rbp+var_8], rax
jmp short loc_392C4
loc_392B6:
movzx eax, [rbp+var_E]
mov dword ptr [rbp+var_8], eax
movzx eax, [rbp+var_10]
mov dword ptr [rbp+var_8+4], eax
loc_392C4:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ftxui::Terminal::Size(ftxui::Terminal *this)
{
int v2; // [rsp+Ch] [rbp-14h]
unsigned __int16 v3; // [rsp+10h] [rbp-10h] BYREF
unsigned __int16 v4; // [rsp+12h] [rbp-Eh]
long long v5; // [rsp+18h] [rbp-8h]
memset(&v3, 0LL, 8LL);
v2 = ioctl((char *)&dword_0 + 1, 21523LL, &v3);
if ( !v4 || !v3 || v2 < 0 )
return *(_QWORD *)ftxui::`anonymous namespace'::FallbackSize((ftxui::_anonymous_namespace_ *)((char *)&dword_0 + 1));
LODWORD(v5) = v4;
HIDWORD(v5) = v3;
return v5;
}
| Size:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
LEA RDI,[RBP + -0x10]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x0010d2d0
MOV EDI,0x1
MOV ESI,0x5413
LEA RDX,[RBP + -0x10]
MOV AL,0x0
CALL 0x0010d890
MOV dword ptr [RBP + -0x14],EAX
MOVZX EAX,word ptr [RBP + -0xe]
CMP EAX,0x0
JZ 0x001392a8
MOVZX EAX,word ptr [RBP + -0x10]
CMP EAX,0x0
JZ 0x001392a8
CMP dword ptr [RBP + -0x14],0x0
JGE 0x001392b6
LAB_001392a8:
CALL 0x001392d0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001392c4
LAB_001392b6:
MOVZX EAX,word ptr [RBP + -0xe]
MOV dword ptr [RBP + -0x8],EAX
MOVZX EAX,word ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x4],EAX
LAB_001392c4:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
/* ftxui::Terminal::Size() */
ulong ftxui::Terminal::Size(void)
{
int iVar1;
ulong *puVar2;
short local_18;
ushort local_16;
ulong local_10;
memset(&local_18,0,8);
iVar1 = ioctl(1,0x5413,&local_18);
if (((local_16 == 0) || (local_18 == 0)) || (iVar1 < 0)) {
puVar2 = (ulong *)(anonymous_namespace)::FallbackSize();
local_10 = *puVar2;
}
else {
local_10 = (ulong)CONCAT24(local_18,(uint)local_16);
}
return local_10;
}
| |
44,615 | 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 0x98204
testb %al, %al
je 0xa19cb
movq %r15, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x97ff2
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0xa19ea
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 0x1b460
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8b2b4
leaq 0x536f7(%rip), %rsi # 0xf5109
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x7db09
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x1beb0
xorl %ebp, %ebp
movq 0x8f5ae(%rip), %rsi # 0x130fe8
movq 0x8f517(%rip), %rdx # 0x130f58
movq %rbx, %rdi
callq 0x1bfb0
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1a67
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1a82
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
testb %bpl, %bpl
jne 0xa1aac
jmp 0xa1ab4
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1aac
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xa1aac
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b6a0
movq %r14, %rdi
callq 0x1c030
| _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_A19CB
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_A19CB:
mov rdi, [rbx+68h]
test rdi, rdi
jz short loc_A19EA
mov rax, [rdi]
mov rax, [rax+18h]
mov rsi, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp rax
loc_A19EA:
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_A1A67
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A1A67:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A1A82
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A1A82:
test bpl, bpl
jnz short loc_A1AAC
jmp short loc_A1AB4
mov r14, rax
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A1AAC
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A1AAC
mov r14, rax
loc_A1AAC:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A1AB4:
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 0x00198204
TEST AL,AL
JZ 0x001a19cb
MOV RDI,R15
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00197ff2
LAB_001a19cb:
MOV RDI,qword ptr [RBX + 0x68]
TEST RDI,RDI
JZ 0x001a19ea
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_001a19ea:
MOV EDI,0x10
CALL 0x0011b460
MOV RBX,RAX
LAB_001a19f7:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018b2b4
LAB_001a1a0b:
LEA RSI,[0x1f5109]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0017db09
MOV BPL,0x1
LAB_001a1a24:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0011beb0
XOR EBP,EBP
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f58]
MOV RDI,RBX
CALL 0x0011bfb0
|
/* 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 0x001a19e8. 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 001a19f7 to 001a1a0a has its CatchHandler @ 001a1aa9 */
Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0));
/* try { // try from 001a1a0b to 001a1a20 has its CatchHandler @ 001a1a89 */
std::operator+((char *)local_40,(string *)"Undefined variable: ");
/* try { // try from 001a1a24 to 001a1a48 has its CatchHandler @ 001a1a49 */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58);
}
| |
44,616 | Ship::contains(unsigned long, unsigned long) const | 666mxvbee[P]BattleShip/lib/Ship/Ship.cpp | bool Ship::contains(uint64_t shotX, uint64_t shotY) const {
if (orientation == 'h') {
return (shotY == y && shotX >= x && shotX < x + len);
}
else {
return (shotX == x && shotY >= y && shotY < y + len);
}
} | O0 | cpp | Ship::contains(unsigned long, unsigned long) const:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movsbl 0x4(%rax), %eax
cmpl $0x68, %eax
jne 0x3886c
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
movb %al, -0x29(%rbp)
jne 0x38862
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x29(%rbp)
jb 0x38862
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rdx), %rcx
movslq (%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
setb %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x388b5
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x2a(%rbp)
jne 0x388ad
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
movb %al, -0x2a(%rbp)
jb 0x388ad
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x10(%rdx), %rcx
movslq (%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
setb %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
| _ZNK4Ship8containsEmm:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
movsx eax, byte ptr [rax+4]
cmp eax, 68h ; 'h'
jnz short loc_3886C
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_20]
xor eax, eax
cmp rcx, [rdx+10h]
mov [rbp+var_29], al
jnz short loc_38862
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rdx+8]
mov [rbp+var_29], al
jb short loc_38862
mov rdx, [rbp+var_28]
mov rax, [rbp+var_18]
mov rcx, [rdx+8]
movsxd rdx, dword ptr [rdx]
add rcx, rdx
cmp rax, rcx
setb al
mov [rbp+var_29], al
loc_38862:
mov al, [rbp+var_29]
and al, 1
mov [rbp+var_1], al
jmp short loc_388B5
loc_3886C:
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rdx+8]
mov [rbp+var_2A], al
jnz short loc_388AD
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_20]
xor eax, eax
cmp rcx, [rdx+10h]
mov [rbp+var_2A], al
jb short loc_388AD
mov rdx, [rbp+var_28]
mov rax, [rbp+var_20]
mov rcx, [rdx+10h]
movsxd rdx, dword ptr [rdx]
add rcx, rdx
cmp rax, rcx
setb al
mov [rbp+var_2A], al
loc_388AD:
mov al, [rbp+var_2A]
and al, 1
mov [rbp+var_1], al
loc_388B5:
mov al, [rbp+var_1]
and al, 1
pop rbp
retn
| bool Ship::contains(Ship *this, unsigned long long a2, unsigned long long a3)
{
bool v4; // [rsp+0h] [rbp-2Ah]
bool v5; // [rsp+1h] [rbp-29h]
if ( *((_BYTE *)this + 4) == 104 )
{
v5 = 0;
if ( a3 == *((_QWORD *)this + 2) )
{
v5 = 0;
if ( a2 >= *((_QWORD *)this + 1) )
return a2 < *(int *)this + *((_QWORD *)this + 1);
}
return v5;
}
else
{
v4 = 0;
if ( a2 == *((_QWORD *)this + 1) )
{
v4 = 0;
if ( a3 >= *((_QWORD *)this + 2) )
return a3 < *(int *)this + *((_QWORD *)this + 2);
}
return v4;
}
}
| contains:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOVSX EAX,byte ptr [RAX + 0x4]
CMP EAX,0x68
JNZ 0x0013886c
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x10]
MOV byte ptr [RBP + -0x29],AL
JNZ 0x00138862
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x8]
MOV byte ptr [RBP + -0x29],AL
JC 0x00138862
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RDX + 0x8]
MOVSXD RDX,dword ptr [RDX]
ADD RCX,RDX
CMP RAX,RCX
SETC AL
MOV byte ptr [RBP + -0x29],AL
LAB_00138862:
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
JMP 0x001388b5
LAB_0013886c:
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x8]
MOV byte ptr [RBP + -0x2a],AL
JNZ 0x001388ad
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x10]
MOV byte ptr [RBP + -0x2a],AL
JC 0x001388ad
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RDX + 0x10]
MOVSXD RDX,dword ptr [RDX]
ADD RCX,RDX
CMP RAX,RCX
SETC AL
MOV byte ptr [RBP + -0x2a],AL
LAB_001388ad:
MOV AL,byte ptr [RBP + -0x2a]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_001388b5:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
POP RBP
RET
|
/* Ship::contains(unsigned long, unsigned long) const */
int8 __thiscall Ship::contains(Ship *this,ulong param_1,ulong param_2)
{
int7 uVar1;
bool local_32;
bool local_31;
bool local_9;
if (this[4] == (Ship)0x68) {
uVar1 = 0;
local_31 = false;
if (param_2 == *(ulong *)(this + 0x10)) {
uVar1 = 0;
local_31 = false;
if (*(ulong *)(this + 8) <= param_1) {
local_31 = param_1 < (ulong)(*(long *)(this + 8) + (long)*(int *)this);
uVar1 = (int7)(param_1 >> 8);
}
}
local_9 = local_31;
}
else {
uVar1 = 0;
local_32 = false;
if (param_1 == *(ulong *)(this + 8)) {
uVar1 = 0;
local_32 = false;
if (*(ulong *)(this + 0x10) <= param_2) {
local_32 = param_2 < (ulong)(*(long *)(this + 0x10) + (long)*(int *)this);
uVar1 = (int7)(param_2 >> 8);
}
}
local_9 = local_32;
}
return CONCAT71(uVar1,local_9);
}
| |
44,617 | cleanup_dirname | eloqsql/mysys/mf_pack.c | size_t cleanup_dirname(register char *to, const char *from)
{
reg5 size_t length;
reg2 char * pos;
reg3 char * from_ptr;
reg4 char * start;
char parent[5], /* for "FN_PARENTDIR" */
buff[FN_REFLEN + 1],*end_parentdir;
#ifdef BACKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
DBUG_ENTER("cleanup_dirname");
DBUG_PRINT("enter",("from: '%s'",from));
start=buff;
from_ptr=(char *) from;
#ifdef FN_DEVCHAR
if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0)
{ /* Skip device part */
length=(size_t) (pos-from_ptr)+1;
start=strnmov(buff,from_ptr,length); from_ptr+=length;
}
#endif
parent[0]=FN_LIBCHAR;
length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent);
for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++)
{
#ifdef BACKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2)))
{
for (l-- ; l ; *++pos= *from_ptr++, l--);
start= pos + 1; /* Don't look inside multi-byte char */
continue;
}
#endif
if (*pos == '/')
*pos = FN_LIBCHAR;
if (*pos == FN_LIBCHAR)
{
if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0)
{ /* If .../../; skip prev */
pos-=length;
if (pos != start)
{ /* not /../ */
pos--;
if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (!home_dir)
{
pos+=length+1; /* Don't unpack ~/.. */
continue;
}
pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (my_getwd(curr_dir,FN_REFLEN,MYF(0)))
{
pos+=length+1; /* Don't unpack ./.. */
continue;
}
pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
end_parentdir=pos;
while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */
pos--;
if (pos[1] == FN_HOMELIB ||
(pos >= start && memcmp(pos, parent, length) == 0))
{ /* Don't remove ~user/ */
pos=strmov(end_parentdir+1,parent);
*pos=FN_LIBCHAR;
continue;
}
}
}
else if ((size_t) (pos-start) == length-1 &&
!memcmp(start,parent+1,length-1))
start=pos; /* Starts with "../" */
else if (pos-start > 0 && pos[-1] == FN_LIBCHAR)
{
#ifdef FN_NETWORK_DRIVES
if (pos-start != 1)
#endif
pos--; /* Remove dupplicate '/' */
}
else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR)
pos-=2; /* Skip /./ */
}
}
(void) strmov(to,buff);
DBUG_PRINT("exit",("to: '%s'",to));
DBUG_RETURN((size_t) (pos-buff));
} | O0 | c | cleanup_dirname:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
jmp 0x83b28
leaq -0x210(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x238(%rbp)
movb $0x2f, -0xd(%rbp)
leaq -0xd(%rbp), %rdi
addq $0x1, %rdi
leaq 0x57cd3(%rip), %rsi # 0xdb82a
callq 0x389c0
leaq -0xd(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x238(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x238(%rbp)
movb (%rax), %al
movq -0x230(%rbp), %rcx
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x83f71
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x83bbd
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x83f58
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq -0x228(%rbp), %rax
jbe 0x83e74
movq -0x230(%rbp), %rdi
xorl %eax, %eax
subq -0x228(%rbp), %rax
addq %rax, %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x38b10
cmpl $0x0, %eax
jne 0x83e74
movq -0x228(%rbp), %rdx
movq -0x230(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0x83e6f
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0x83cff
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0x83c90
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x83cff
leaq 0x388f31(%rip), %rax # 0x40cbc8
cmpq $0x0, (%rax)
jne 0x83cbb
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x83f5a
leaq -0x210(%rbp), %rdi
leaq 0x388eff(%rip), %rax # 0x40cbc8
movq (%rax), %rsi
callq 0x389c0
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x83cfd
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x83cff
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x83dab
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0x83d32
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x83dab
leaq 0x388ea7(%rip), %rdi # 0x40cbe0
movl $0x200, %esi # imm = 0x200
xorl %eax, %eax
movl %eax, %edx
callq 0x89db0
cmpl $0x0, %eax
je 0x83d6a
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x83f5a
leaq -0x210(%rbp), %rdi
leaq 0x388e68(%rip), %rsi # 0x40cbe0
callq 0x389c0
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x83da9
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x83dab
movq -0x230(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x230(%rbp), %rcx
xorl %eax, %eax
cmpq -0x240(%rbp), %rcx
movb %al, -0x249(%rbp)
jb 0x83de7
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x249(%rbp)
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0x83df3
jmp 0x83e07
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x83db9
movq -0x230(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x7e, %eax
je 0x83e43
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
jb 0x83e6d
movq -0x230(%rbp), %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x38b10
cmpl $0x0, %eax
jne 0x83e6d
movq -0x248(%rbp), %rdi
addq $0x1, %rdi
leaq -0xd(%rbp), %rsi
callq 0x389c0
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
jmp 0x83f5a
jmp 0x83e6f
jmp 0x83f56
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
movq -0x228(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x83ecc
movq -0x240(%rbp), %rdi
leaq -0xd(%rbp), %rsi
addq $0x1, %rsi
movq -0x228(%rbp), %rdx
subq $0x1, %rdx
callq 0x38b10
cmpl $0x0, %eax
jne 0x83ecc
movq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
jmp 0x83f54
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x0, %rax
jle 0x83f07
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x83f07
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x83f52
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x83f50
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2e, %eax
jne 0x83f50
movq -0x230(%rbp), %rax
movsbl -0x2(%rax), %eax
cmpl $0x2f, %eax
jne 0x83f50
movq -0x230(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x230(%rbp)
jmp 0x83f52
jmp 0x83f54
jmp 0x83f56
jmp 0x83f58
jmp 0x83f5a
movq -0x230(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x83b78
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x389c0
jmp 0x83f86
jmp 0x83f88
movq -0x230(%rbp), %rax
leaq -0x210(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x83fc2
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x382c0
nopw (%rax,%rax)
| cleanup_dirname:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
jmp short $+2
loc_83B28:
lea rax, [rbp+var_210]
mov [rbp+var_240], rax
mov rax, [rbp+var_220]
mov [rbp+var_238], rax
mov [rbp+var_D], 2Fh ; '/'
lea rdi, [rbp+var_D]
add rdi, 1
lea rsi, asc_DB829+1; ".."
call _stpcpy
lea rcx, [rbp+var_D]
sub rax, rcx
mov [rbp+var_228], rax
mov rax, [rbp+var_240]
mov [rbp+var_230], rax
loc_83B78:
mov rax, [rbp+var_238]
mov rcx, rax
add rcx, 1
mov [rbp+var_238], rcx
mov al, [rax]
mov rcx, [rbp+var_230]
mov [rcx], al
movsx eax, al
cmp eax, 0
jz loc_83F71
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_83BBD
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
loc_83BBD:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz loc_83F58
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, [rbp+var_228]
jbe loc_83E74
mov rdi, [rbp+var_230]
xor eax, eax
sub rax, [rbp+var_228]
add rdi, rax
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz loc_83E74
mov rdx, [rbp+var_228]
mov rax, [rbp+var_230]
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz loc_83E6F
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jnz loc_83CFF
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_83C90
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_83CFF
loc_83C90:
lea rax, home_dir
cmp qword ptr [rax], 0
jnz short loc_83CBB
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_83F5A
loc_83CBB:
lea rdi, [rbp+var_210]
lea rax, home_dir
mov rsi, [rax]
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_83CFD
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_83CFD:
jmp short $+2
loc_83CFF:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz loc_83DAB
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_83D32
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_83DAB
loc_83D32:
lea rdi, curr_dir
mov esi, 200h
xor eax, eax
mov edx, eax
call my_getwd
cmp eax, 0
jz short loc_83D6A
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_83F5A
loc_83D6A:
lea rdi, [rbp+var_210]
lea rsi, curr_dir
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_83DA9
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_83DA9:
jmp short $+2
loc_83DAB:
mov rax, [rbp+var_230]
mov [rbp+var_248], rax
loc_83DB9:
mov rcx, [rbp+var_230]
xor eax, eax
cmp rcx, [rbp+var_240]
mov [rbp+var_249], al
jb short loc_83DE7
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
setnz al
mov [rbp+var_249], al
loc_83DE7:
mov al, [rbp+var_249]
test al, 1
jnz short loc_83DF3
jmp short loc_83E07
loc_83DF3:
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_83DB9
loc_83E07:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax+1]
cmp eax, 7Eh ; '~'
jz short loc_83E43
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jb short loc_83E6D
mov rdi, [rbp+var_230]
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz short loc_83E6D
loc_83E43:
mov rdi, [rbp+var_248]
add rdi, 1
lea rsi, [rbp+var_D]
call _stpcpy
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
jmp loc_83F5A
loc_83E6D:
jmp short $+2
loc_83E6F:
jmp loc_83F56
loc_83E74:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
mov rcx, [rbp+var_228]
sub rcx, 1
cmp rax, rcx
jnz short loc_83ECC
mov rdi, [rbp+var_240]
lea rsi, [rbp+var_D]
add rsi, 1
mov rdx, [rbp+var_228]
sub rdx, 1
call _memcmp
cmp eax, 0
jnz short loc_83ECC
mov rax, [rbp+var_230]
mov [rbp+var_240], rax
jmp loc_83F54
loc_83ECC:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 0
jle short loc_83F07
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_83F07
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_83F52
loc_83F07:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 1
jle short loc_83F50
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Eh ; '.'
jnz short loc_83F50
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-2]
cmp eax, 2Fh ; '/'
jnz short loc_83F50
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_230], rax
loc_83F50:
jmp short $+2
loc_83F52:
jmp short $+2
loc_83F54:
jmp short $+2
loc_83F56:
jmp short $+2
loc_83F58:
jmp short $+2
loc_83F5A:
mov rax, [rbp+var_230]
add rax, 1
mov [rbp+var_230], rax
jmp loc_83B78
loc_83F71:
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call _stpcpy
jmp short $+2
loc_83F86:
jmp short $+2
loc_83F88:
mov rax, [rbp+var_230]
lea rcx, [rbp+var_210]
sub rax, rcx
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_83FC2
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_83FC2:
call ___stack_chk_fail
| long long cleanup_dirname(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
bool v4; // [rsp+17h] [rbp-249h]
_BYTE *v5; // [rsp+18h] [rbp-248h]
_BYTE *v6; // [rsp+20h] [rbp-240h]
_BYTE *i; // [rsp+30h] [rbp-230h]
unsigned long long v9; // [rsp+38h] [rbp-228h]
long long v10; // [rsp+48h] [rbp-218h]
_BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF
char v12; // [rsp+253h] [rbp-Dh] BYREF
_BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF
*(_QWORD *)&v13[4] = __readfsqword(0x28u);
v10 = a1;
v6 = v11;
v12 = 47;
v9 = stpcpy(v13, "..") - (_QWORD)&v12;
for ( i = v11; ; ++i )
{
v2 = a2++;
LOBYTE(v2) = *v2;
*i = (_BYTE)v2;
if ( !(_BYTE)v2 )
break;
if ( *i == 47 )
*i = 47;
if ( *i == 47 )
{
if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) )
{
i -= v9;
if ( i != v6 )
{
if ( *--i == 126 && (i == v6 || *(i - 1) == 47) )
{
if ( !home_dir )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, home_dir) - 1);
if ( *i == 47 )
--i;
}
if ( *i == 46 && (i == v6 || *(i - 1) == 47) )
{
if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1);
if ( *i == 47 )
--i;
}
v5 = i;
while ( 1 )
{
v4 = 0;
if ( i >= v6 )
v4 = *i != 47;
if ( !v4 )
break;
--i;
}
if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) )
{
i = (_BYTE *)stpcpy(v5 + 1, &v12);
*i = 47;
}
}
}
else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) )
{
v6 = i;
}
else if ( i - v6 > 0 && *(i - 1) == 47 )
{
--i;
}
else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 )
{
i -= 2;
}
}
}
stpcpy(v10, v11);
return i - v11;
}
| cleanup_dirname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
JMP 0x00183b28
LAB_00183b28:
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x240],RAX
MOV RAX,qword ptr [RBP + -0x220]
MOV qword ptr [RBP + -0x238],RAX
MOV byte ptr [RBP + -0xd],0x2f
LEA RDI,[RBP + -0xd]
ADD RDI,0x1
LEA RSI,[0x1db82a]
CALL 0x001389c0
LEA RCX,[RBP + -0xd]
SUB RAX,RCX
MOV qword ptr [RBP + -0x228],RAX
MOV RAX,qword ptr [RBP + -0x240]
MOV qword ptr [RBP + -0x230],RAX
LAB_00183b78:
MOV RAX,qword ptr [RBP + -0x238]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x238],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x230]
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00183f71
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x00183bbd
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
LAB_00183bbd:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x00183f58
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,qword ptr [RBP + -0x228]
JBE 0x00183e74
MOV RDI,qword ptr [RBP + -0x230]
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x228]
ADD RDI,RAX
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x00138b10
CMP EAX,0x0
JNZ 0x00183e74
MOV RDX,qword ptr [RBP + -0x228]
MOV RAX,qword ptr [RBP + -0x230]
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x00183e6f
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JNZ 0x00183cff
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x00183c90
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x00183cff
LAB_00183c90:
LEA RAX,[0x50cbc8]
CMP qword ptr [RAX],0x0
JNZ 0x00183cbb
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x00183f5a
LAB_00183cbb:
LEA RDI,[RBP + -0x210]
LEA RAX,[0x50cbc8]
MOV RSI,qword ptr [RAX]
CALL 0x001389c0
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x00183cfd
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_00183cfd:
JMP 0x00183cff
LAB_00183cff:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x00183dab
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x00183d32
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x00183dab
LAB_00183d32:
LEA RDI,[0x50cbe0]
MOV ESI,0x200
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00189db0
CMP EAX,0x0
JZ 0x00183d6a
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x00183f5a
LAB_00183d6a:
LEA RDI,[RBP + -0x210]
LEA RSI,[0x50cbe0]
CALL 0x001389c0
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x00183da9
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_00183da9:
JMP 0x00183dab
LAB_00183dab:
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x248],RAX
LAB_00183db9:
MOV RCX,qword ptr [RBP + -0x230]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x240]
MOV byte ptr [RBP + -0x249],AL
JC 0x00183de7
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
SETNZ AL
MOV byte ptr [RBP + -0x249],AL
LAB_00183de7:
MOV AL,byte ptr [RBP + -0x249]
TEST AL,0x1
JNZ 0x00183df3
JMP 0x00183e07
LAB_00183df3:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x00183db9
LAB_00183e07:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7e
JZ 0x00183e43
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JC 0x00183e6d
MOV RDI,qword ptr [RBP + -0x230]
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x00138b10
CMP EAX,0x0
JNZ 0x00183e6d
LAB_00183e43:
MOV RDI,qword ptr [RBP + -0x248]
ADD RDI,0x1
LEA RSI,[RBP + -0xd]
CALL 0x001389c0
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
JMP 0x00183f5a
LAB_00183e6d:
JMP 0x00183e6f
LAB_00183e6f:
JMP 0x00183f56
LAB_00183e74:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x228]
SUB RCX,0x1
CMP RAX,RCX
JNZ 0x00183ecc
MOV RDI,qword ptr [RBP + -0x240]
LEA RSI,[RBP + -0xd]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x228]
SUB RDX,0x1
CALL 0x00138b10
CMP EAX,0x0
JNZ 0x00183ecc
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x00183f54
LAB_00183ecc:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x0
JLE 0x00183f07
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x00183f07
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x00183f52
LAB_00183f07:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x00183f50
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2e
JNZ 0x00183f50
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x2]
CMP EAX,0x2f
JNZ 0x00183f50
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x2
MOV qword ptr [RBP + -0x230],RAX
LAB_00183f50:
JMP 0x00183f52
LAB_00183f52:
JMP 0x00183f54
LAB_00183f54:
JMP 0x00183f56
LAB_00183f56:
JMP 0x00183f58
LAB_00183f58:
JMP 0x00183f5a
LAB_00183f5a:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x00183b78
LAB_00183f71:
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x001389c0
JMP 0x00183f86
LAB_00183f86:
JMP 0x00183f88
LAB_00183f88:
MOV RAX,qword ptr [RBP + -0x230]
LEA RCX,[RBP + -0x210]
SUB RAX,RCX
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00183fc2
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_00183fc2:
CALL 0x001382c0
|
long cleanup_dirname(char *param_1,char *param_2)
{
char cVar1;
int iVar2;
char *pcVar3;
ulong __n;
char *pcVar4;
long in_FS_OFFSET;
bool bVar5;
char *local_248;
char *local_240;
char *local_238;
char local_218 [515];
char local_15;
char acStack_14 [4];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_248 = local_218;
local_15 = '/';
pcVar3 = stpcpy(acStack_14,"..");
__n = (long)pcVar3 - (long)&local_15;
local_240 = param_2;
local_238 = local_248;
do {
cVar1 = *local_240;
*local_238 = cVar1;
if (cVar1 == '\0') {
stpcpy(param_1,local_218);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)local_238 - (long)local_218;
}
if (*local_238 == '/') {
*local_238 = '/';
}
if (*local_238 == '/') {
if ((__n < (ulong)((long)local_238 - (long)local_248)) &&
(iVar2 = memcmp(local_238 + -__n,&local_15,__n), iVar2 == 0)) {
local_238 = local_238 + -__n;
if (local_238 != local_248) {
pcVar3 = local_238 + -1;
if ((*pcVar3 == '~') && ((pcVar3 == local_248 || (local_238[-2] == '/')))) {
if (home_dir == (char *)0x0) {
local_238 = pcVar3 + __n + 1;
goto LAB_00183f5a;
}
pcVar4 = stpcpy(local_218,home_dir);
pcVar3 = pcVar4 + -1;
if (pcVar4[-1] == '/') {
pcVar3 = pcVar4 + -2;
}
}
local_238 = pcVar3;
pcVar3 = local_238;
if ((*local_238 == '.') && ((local_238 == local_248 || (local_238[-1] == '/')))) {
iVar2 = my_getwd(&curr_dir,0x200,0);
if (iVar2 != 0) {
local_238 = local_238 + __n + 1;
goto LAB_00183f5a;
}
pcVar4 = stpcpy(local_218,&curr_dir);
local_238 = pcVar4 + -1;
pcVar3 = local_238;
if (*local_238 == '/') {
local_238 = pcVar4 + -2;
pcVar3 = local_238;
}
}
while( true ) {
bVar5 = false;
if (local_248 <= local_238) {
bVar5 = *local_238 != '/';
}
if (!bVar5) break;
local_238 = local_238 + -1;
}
if ((local_238[1] == '~') ||
((local_248 <= local_238 && (iVar2 = memcmp(local_238,&local_15,__n), iVar2 == 0)))) {
local_238 = stpcpy(pcVar3 + 1,&local_15);
*local_238 = '/';
}
}
}
else if (((long)local_238 - (long)local_248 == __n - 1) &&
(iVar2 = memcmp(local_248,acStack_14,__n - 1), iVar2 == 0)) {
local_248 = local_238;
}
else if (((long)local_238 - (long)local_248 < 1) || (local_238[-1] != '/')) {
if ((1 < (long)local_238 - (long)local_248) &&
((local_238[-1] == '.' && (local_238[-2] == '/')))) {
local_238 = local_238 + -2;
}
}
else {
local_238 = local_238 + -1;
}
}
LAB_00183f5a:
local_238 = local_238 + 1;
local_240 = local_240 + 1;
} while( true );
}
| |
44,618 | minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json.hpp | T & operator[](KeyType && key)
{
return emplace(std::forward<KeyType>(key), T{}).first->second;
} | O3 | cpp | minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x40(%rsp), %r14
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x40bf2
movq %r14, %rdi
movl $0x1, %esi
callq 0x40bf2
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5181a
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x40bf2
movq %r14, %rdi
callq 0x4d7e0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x50eff
callq 0x32e06
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x50f0e
callq 0x32e06
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x50f1d
callq 0x32e06
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x50f53
movq 0x9006a(%rip), %rax # 0xe0f98
cmpb $0x0, (%rax)
je 0x50f3e
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x50f48
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x50f53
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x40b66
movq %rbx, %rdi
callq 0x18c10
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r15, rdi
lea r14, [rsp+68h+var_28]
mov qword ptr [r14+8], 0
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdx, rsp
mov rdi, r15
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_
mov rbx, rax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+68h+var_30]
test rdi, rdi
jz short loc_50EFF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50EFF:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_50F0E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50F0E:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_50F1D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50F1D:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_50F53
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_50F3E
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_50F48
loc_50F3E:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_50F48:
cmp eax, 1
jnz short loc_50F53
mov rax, [rdi]
call qword ptr [rax+18h]
loc_50F53:
add rbx, 10h
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_(
long long a1,
long long a2)
{
long long v2; // rbx
long long v3; // rdi
signed __int32 v4; // eax
__int128 v6; // [rsp+0h] [rbp-68h] BYREF
__int128 v7; // [rsp+10h] [rbp-58h]
__int128 v8; // [rsp+20h] [rbp-48h]
__int128 v9; // [rsp+30h] [rbp-38h]
void **v10[5]; // [rsp+40h] [rbp-28h] BYREF
v10[1] = 0LL;
v6 = 0LL;
v7 = 0LL;
v8 = 0LL;
v9 = 0LL;
LOBYTE(v10[0]) = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v10);
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_(
a1,
a2,
&v6);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10);
if ( *((_QWORD *)&v9 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1));
if ( *((_QWORD *)&v8 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1));
if ( *((_QWORD *)&v7 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1));
v3 = *((_QWORD *)&v6 + 1);
if ( *((_QWORD *)&v6 + 1) )
{
if ( _libc_single_threaded )
{
v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1;
}
else
{
v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v4 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL);
}
return v2 + 16;
}
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RSP + 0x40]
MOV qword ptr [R14 + 0x8],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00140bf2
MOV RDI,R14
MOV ESI,0x1
CALL 0x00140bf2
LAB_00150ecd:
MOV RDX,RSP
MOV RDI,R15
MOV RSI,RBX
CALL 0x0015181a
LAB_00150edb:
MOV RBX,RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00140bf2
MOV RDI,R14
CALL 0x0014d7e0
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x00150eff
CALL 0x00132e06
LAB_00150eff:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00150f0e
CALL 0x00132e06
LAB_00150f0e:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00150f1d
CALL 0x00132e06
LAB_00150f1d:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00150f53
MOV RAX,qword ptr [0x001e0f98]
CMP byte ptr [RAX],0x0
JZ 0x00150f3e
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00150f48
LAB_00150f3e:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00150f48:
CMP EAX,0x1
JNZ 0x00150f53
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00150f53:
ADD RBX,0x10
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_
(int8 param_1,int8 param_2)
{
int *piVar1;
int iVar2;
long lVar3;
bool bVar4;
int8 local_68;
long *plStack_60;
int8 local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50;
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
data local_28 [8];
int8 local_20;
local_20 = 0;
local_68 = 0;
plStack_60 = (long *)0x0;
local_58 = 0;
p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_48 = 0;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
/* try { // try from 00150ecd to 00150eda has its CatchHandler @ 00150f64 */
lVar3 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_
(param_1,param_2,&local_68);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50);
}
if (plStack_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_001e0f98 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_60 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)plStack_60 + 0xc);
*(int *)((long)plStack_60 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*plStack_60 + 0x18))();
}
}
return lVar3 + 0x10;
}
| |
44,619 | my_hash_sort_utf8mb3_nopad | eloqsql/strings/ctype-utf8.c | static void my_hash_sort_utf8mb3_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e= s+slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res=my_utf8mb3_uni(cs,&wc, (uchar *)s, (uchar*)e))>0 )
{
my_tosort_unicode(uni_plane, &wc, cs->state);
MY_HASH_ADD_16(m1, m2, wc);
s+= res;
}
*nr1= m1;
*nr2= m2;
} | O3 | c | my_hash_sort_utf8mb3_nopad:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x38(%rbp)
movq (%rcx), %r13
movq %r8, -0x40(%rbp)
movq (%r8), %r14
testq %rdx, %rdx
jle 0x4ff3a
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq %rdi, -0x48(%rbp)
movq 0x78(%rdi), %rbx
leaq -0x30(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x4e68f
testl %eax, %eax
jle 0x4ff3a
movq -0x30(%rbp), %rdx
movl $0xfffd, %esi # imm = 0xFFFD
cmpq (%rbx), %rdx
ja 0x4fee2
movq 0x8(%rbx), %rsi
movq %rdx, %rcx
shrq $0x8, %rcx
movq (%rsi,%rcx,8), %rsi
testq %rsi, %rsi
je 0x4feee
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
xorl %edi, %edi
testw %cx, %cx
setns %dil
movzbl %dl, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,4), %rcx
movl 0x4(%rcx,%rdi,4), %esi
movq %rsi, -0x30(%rbp)
movl %esi, %ecx
shrl $0x8, %ecx
movq %rsi, %rdx
movl %r13d, %esi
andl $0x3f, %esi
addq %r14, %rsi
movzbl %dl, %edx
imulq %rsi, %rdx
movq %r13, %rsi
shlq $0x8, %rsi
addq %rdx, %rsi
xorq %r13, %rsi
movl %esi, %edx
andl $0x3f, %edx
addq %r14, %rdx
addq $0x3, %rdx
imulq %rcx, %rdx
movq %rsi, %r13
shlq $0x8, %r13
addq %rdx, %r13
xorq %rsi, %r13
addq $0x6, %r14
movl %eax, %eax
addq %rax, %r12
cmpq %r15, %r12
jb 0x4fe8a
movq -0x38(%rbp), %rax
movq %r13, (%rax)
movq -0x40(%rbp), %rax
movq %r14, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_hash_sort_utf8mb3_nopad:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_38], rcx
mov r13, [rcx]
mov [rbp+var_40], r8
mov r14, [r8]
test rdx, rdx
jle loc_4FF3A
mov r15, rdx
mov r12, rsi
add r15, rsi
mov [rbp+var_48], rdi
mov rbx, [rdi+78h]
loc_4FE8A:
lea rsi, [rbp+var_30]
mov rdx, r12
mov rcx, r15
call my_utf8mb3_uni
test eax, eax
jle loc_4FF3A
mov rdx, [rbp+var_30]
mov esi, 0FFFDh
cmp rdx, [rbx]
ja short loc_4FEE2
mov rsi, [rbx+8]
mov rcx, rdx
shr rcx, 8
mov rsi, [rsi+rcx*8]
test rsi, rsi
jz short loc_4FEEE
mov rcx, [rbp+var_48]
mov ecx, [rcx+0Ch]
xor edi, edi
test cx, cx
setns dil
movzx ecx, dl
lea rcx, [rcx+rcx*2]
lea rcx, [rsi+rcx*4]
mov esi, [rcx+rdi*4+4]
loc_4FEE2:
mov [rbp+var_30], rsi
mov ecx, esi
shr ecx, 8
mov rdx, rsi
loc_4FEEE:
mov esi, r13d
and esi, 3Fh
add rsi, r14
movzx edx, dl
imul rdx, rsi
mov rsi, r13
shl rsi, 8
add rsi, rdx
xor rsi, r13
mov edx, esi
and edx, 3Fh
add rdx, r14
add rdx, 3
imul rdx, rcx
mov r13, rsi
shl r13, 8
add r13, rdx
xor r13, rsi
add r14, 6
mov eax, eax
add r12, rax
cmp r12, r15
jb loc_4FE8A
loc_4FF3A:
mov rax, [rbp+var_38]
mov [rax], r13
mov rax, [rbp+var_40]
mov [rax], r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * my_hash_sort_utf8mb3_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
long long v5; // r13
long long v6; // r14
unsigned __int8 *v7; // r12
unsigned long long v8; // r15
_QWORD *v9; // rbx
int v10; // eax
unsigned __int8 v11; // dl
long long v12; // rsi
unsigned long long v13; // rcx
long long v14; // rsi
long long v15; // rsi
_QWORD *result; // rax
long long v17; // [rsp+8h] [rbp-48h]
unsigned long long v20[6]; // [rsp+20h] [rbp-30h] BYREF
v5 = *a4;
v6 = *a5;
if ( a3 > 0 )
{
v7 = a2;
v8 = (unsigned long long)&a2[a3];
v17 = a1;
v9 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
v10 = my_utf8mb3_uni(a1, v20, v7, v8);
if ( v10 <= 0 )
goto LABEL_9;
v11 = v20[0];
v12 = 65533LL;
if ( v20[0] > *v9 )
goto LABEL_7;
v13 = v20[0] >> 8;
v14 = *(_QWORD *)(v9[1] + 8 * (v20[0] >> 8));
if ( v14 )
break;
LABEL_8:
v15 = v5 ^ ((v6 + (v5 & 0x3F)) * v11 + (v5 << 8));
v5 = v15 ^ (v13 * (v6 + (((unsigned __int8)v5 ^ (unsigned __int8)((v6 + (v5 & 0x3F)) * v11)) & 0x3F) + 3)
+ (v15 << 8));
v6 += 6LL;
v7 += (unsigned int)v10;
if ( (unsigned long long)v7 >= v8 )
goto LABEL_9;
}
a1 = (*(_DWORD *)(v17 + 12) & 0x8000u) == 0;
v12 = *(unsigned int *)(v14 + 12LL * LOBYTE(v20[0]) + 4 * a1 + 4);
LABEL_7:
v20[0] = v12;
v13 = (unsigned int)v12 >> 8;
v11 = v12;
goto LABEL_8;
}
LABEL_9:
*a4 = v5;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_utf8mb3_nopad:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x38],RCX
MOV R13,qword ptr [RCX]
MOV qword ptr [RBP + -0x40],R8
MOV R14,qword ptr [R8]
TEST RDX,RDX
JLE 0x0014ff3a
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV qword ptr [RBP + -0x48],RDI
MOV RBX,qword ptr [RDI + 0x78]
LAB_0014fe8a:
LEA RSI,[RBP + -0x30]
MOV RDX,R12
MOV RCX,R15
CALL 0x0014e68f
TEST EAX,EAX
JLE 0x0014ff3a
MOV RDX,qword ptr [RBP + -0x30]
MOV ESI,0xfffd
CMP RDX,qword ptr [RBX]
JA 0x0014fee2
MOV RSI,qword ptr [RBX + 0x8]
MOV RCX,RDX
SHR RCX,0x8
MOV RSI,qword ptr [RSI + RCX*0x8]
TEST RSI,RSI
JZ 0x0014feee
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX + 0xc]
XOR EDI,EDI
TEST CX,CX
SETNS DIL
MOVZX ECX,DL
LEA RCX,[RCX + RCX*0x2]
LEA RCX,[RSI + RCX*0x4]
MOV ESI,dword ptr [RCX + RDI*0x4 + 0x4]
LAB_0014fee2:
MOV qword ptr [RBP + -0x30],RSI
MOV ECX,ESI
SHR ECX,0x8
MOV RDX,RSI
LAB_0014feee:
MOV ESI,R13D
AND ESI,0x3f
ADD RSI,R14
MOVZX EDX,DL
IMUL RDX,RSI
MOV RSI,R13
SHL RSI,0x8
ADD RSI,RDX
XOR RSI,R13
MOV EDX,ESI
AND EDX,0x3f
ADD RDX,R14
ADD RDX,0x3
IMUL RDX,RCX
MOV R13,RSI
SHL R13,0x8
ADD R13,RDX
XOR R13,RSI
ADD R14,0x6
MOV EAX,EAX
ADD R12,RAX
CMP R12,R15
JC 0x0014fe8a
LAB_0014ff3a:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],R13
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_hash_sort_utf8mb3_nopad
(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5)
{
ulong *puVar1;
long lVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
ulong local_38;
uVar6 = *param_4;
lVar7 = *param_5;
if (0 < param_3) {
uVar8 = param_3 + param_2;
puVar1 = *(ulong **)(param_1 + 0x78);
do {
uVar3 = my_utf8mb3_uni();
if ((int)uVar3 < 1) break;
uVar5 = 0xfffd;
if (*puVar1 < local_38) {
LAB_0014fee2:
uVar4 = uVar5 >> 8;
local_38 = uVar5;
}
else {
uVar4 = local_38 >> 8;
lVar2 = *(long *)(puVar1[1] + uVar4 * 8);
if (lVar2 != 0) {
uVar5 = (ulong)*(uint *)(lVar2 + (local_38 & 0xff) * 0xc + 4 +
(ulong)(-1 < (short)*(int4 *)(param_1 + 0xc)) * 4);
goto LAB_0014fee2;
}
}
uVar6 = uVar6 * 0x100 + (local_38 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar7) ^ uVar6;
uVar6 = uVar6 * 0x100 + ((ulong)((uint)uVar6 & 0x3f) + lVar7 + 3) * uVar4 ^ uVar6;
lVar7 = lVar7 + 6;
param_2 = param_2 + uVar3;
} while (param_2 < uVar8);
}
*param_4 = uVar6;
*param_5 = lVar7;
return;
}
| |
44,620 | ZNK5chess6SquarecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] operator std::string() const {
std::string str;
str += static_cast<std::string>(file());
str += static_cast<std::string>(rank());
return str;
} | O0 | cpp | ZNK5chess6SquarecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x3410
movq -0x80(%rbp), %rdi
callq 0x4d00
movb %al, -0x39(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x39(%rbp), %rsi
callq 0x11f80
jmp 0x1e390
movq -0x90(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x33c0
jmp 0x1e3a2
leaq -0x38(%rbp), %rdi
callq 0x3180
movq -0x80(%rbp), %rdi
callq 0x4bd0
movl %eax, -0x74(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x74(%rbp), %rsi
callq 0x1a270
jmp 0x1e3c6
movq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x33c0
jmp 0x1e3d8
leaq -0x70(%rbp), %rdi
callq 0x3180
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x1e435
jmp 0x1e429
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1e445
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3180
jmp 0x1e445
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3180
jmp 0x1e445
movq -0x90(%rbp), %rdi
callq 0x3180
movq -0x88(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x3180
movq -0x48(%rbp), %rdi
callq 0x34d0
nopw (%rax,%rax)
| _ZNK5chess6SquarecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_90], rdi
mov rax, rdi
mov [rbp+var_88], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_80], rax
mov [rbp+var_11], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rbp+var_80]; this
call _ZNK5chess6Square4fileEv; chess::Square::file(void)
mov [rbp+var_39], al
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_39]
call _ZNK5chess4FilecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; chess::File::operator std::string(void)
jmp short $+2
loc_1E390:
mov rdi, [rbp+var_90]
lea rsi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_1E3A2:
lea rdi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_80]; this
call _ZNK5chess6Square4rankEv; chess::Square::rank(void)
mov [rbp+var_74], eax
lea rdi, [rbp+var_70]
lea rsi, [rbp+var_74]
call _ZNK5chess4RankcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; chess::Rank::operator std::string(void)
jmp short $+2
loc_1E3C6:
mov rdi, [rbp+var_90]
lea rsi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_1E3D8:
lea rdi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov [rbp+var_11], 1
test [rbp+var_11], 1
jnz short loc_1E435
jmp short loc_1E429
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_1E445
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_1E445
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_1E445
loc_1E429:
mov rdi, [rbp+var_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1E435:
mov rax, [rbp+var_88]
add rsp, 90h
pop rbp
retn
loc_1E445:
mov rdi, [rbp+var_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_48]
call __Unwind_Resume
| long long chess::Square::operator std::string(long long a1, chess::Square *a2)
{
int v3; // [rsp+1Ch] [rbp-74h] BYREF
_BYTE v4[36]; // [rsp+20h] [rbp-70h] BYREF
char v5; // [rsp+57h] [rbp-39h] BYREF
_BYTE v6[40]; // [rsp+58h] [rbp-38h] BYREF
chess::Square *v7; // [rsp+80h] [rbp-10h]
long long v8; // [rsp+88h] [rbp-8h]
v8 = a1;
v7 = a2;
v6[39] = 0;
std::string::basic_string(a1);
v5 = chess::Square::file(a2);
chess::File::operator std::string((long long)v6, &v5);
std::string::operator+=(a1, v6);
std::string::~string(v6);
v3 = chess::Square::rank(a2);
chess::Rank::operator std::string((long long)v4, &v3);
std::string::operator+=(a1, v4);
std::string::~string(v4);
return a1;
}
| operator.cast.to.string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x90],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x88],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x80],RAX
MOV byte ptr [RBP + -0x11],0x0
CALL 0x00103410
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x00104d00
MOV byte ptr [RBP + -0x39],AL
LAB_0011e381:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x39]
CALL 0x00111f80
JMP 0x0011e390
LAB_0011e390:
MOV RDI,qword ptr [RBP + -0x90]
LEA RSI,[RBP + -0x38]
CALL 0x001033c0
JMP 0x0011e3a2
LAB_0011e3a2:
LEA RDI,[RBP + -0x38]
CALL 0x00103180
MOV RDI,qword ptr [RBP + -0x80]
CALL 0x00104bd0
MOV dword ptr [RBP + -0x74],EAX
LAB_0011e3b7:
LEA RDI,[RBP + -0x70]
LEA RSI,[RBP + -0x74]
CALL 0x0011a270
JMP 0x0011e3c6
LAB_0011e3c6:
MOV RDI,qword ptr [RBP + -0x90]
LEA RSI,[RBP + -0x70]
CALL 0x001033c0
LAB_0011e3d6:
JMP 0x0011e3d8
LAB_0011e3d8:
LEA RDI,[RBP + -0x70]
CALL 0x00103180
MOV byte ptr [RBP + -0x11],0x1
TEST byte ptr [RBP + -0x11],0x1
JNZ 0x0011e435
JMP 0x0011e429
LAB_0011e429:
MOV RDI,qword ptr [RBP + -0x90]
CALL 0x00103180
LAB_0011e435:
MOV RAX,qword ptr [RBP + -0x88]
ADD RSP,0x90
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0011e3eb) */
/* chess::Square::operator std::__cxx11::string() const */
Square * __thiscall chess::Square::operator_cast_to_string(Square *this)
{
Square *in_RSI;
Rank local_78 [55];
int1 local_41;
File local_40 [39];
int1 local_19;
Square *local_10;
local_19 = 0;
local_10 = this;
std::__cxx11::string::string((string *)this);
local_41 = file(in_RSI);
/* try { // try from 0011e381 to 0011e38d has its CatchHandler @ 0011e3ed */
File::operator_cast_to_string(local_40);
/* try { // try from 0011e390 to 0011e39f has its CatchHandler @ 0011e3fb */
std::__cxx11::string::operator+=((string *)this,(string *)local_40);
std::__cxx11::string::~string((string *)local_40);
rank(in_RSI);
/* try { // try from 0011e3b7 to 0011e3c3 has its CatchHandler @ 0011e3ed */
Rank::operator_cast_to_string(local_78);
/* try { // try from 0011e3c6 to 0011e3d5 has its CatchHandler @ 0011e412 */
std::__cxx11::string::operator+=((string *)this,(string *)local_78);
std::__cxx11::string::~string((string *)local_78);
return this;
}
| |
44,621 | ZNK5chess6SquarecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] operator std::string() const {
std::string str;
str += static_cast<std::string>(file());
str += static_cast<std::string>(rank());
return str;
} | O1 | cpp | ZNK5chess6SquarecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movb (%rsi), %al
andb $0x7, %al
addb $0x61, %al
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movzbl %al, %edx
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x3260
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3070
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xc1af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3210
movl (%r14), %eax
shrl $0x3, %eax
addb $0x31, %al
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
movsbl %al, %edx
movl $0x1, %esi
callq 0x3260
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3070
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xc1f5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3210
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xc208
jmp 0xc224
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xc227
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0xc227
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xc23a
movq (%r15), %rsi
incq %rsi
callq 0x3210
movq %r14, %rdi
callq 0x3360
| _ZNK5chess6SquarecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov al, [rsi]
and al, 7
add al, 61h ; 'a'
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
movzx edx, al
lea rdi, [rsp+48h+var_40]
mov esi, 1
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rsi, [rsp+48h+var_40]
mov rdx, [rsp+48h+var_38]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_C1AF
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C1AF:
mov eax, [r14]
shr eax, 3
add al, 31h ; '1'
lea rdi, [rsp+48h+var_40]
mov [rdi], r12
movsx edx, al
mov esi, 1
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rsi, [rsp+48h+var_40]
mov rdx, [rsp+48h+var_38]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_C1F5
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C1F5:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short loc_C208
jmp short loc_C224
loc_C208:
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_C227
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C227
loc_C224:
mov r14, rax
loc_C227:
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_C23A
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C23A:
mov rdi, r14
call __Unwind_Resume
| long long chess::Square::operator std::string(long long a1, _BYTE *a2)
{
unsigned __int8 v2; // al
char v3; // al
void *v5; // [rsp+8h] [rbp-40h] BYREF
long long v6; // [rsp+10h] [rbp-38h]
_QWORD v7[6]; // [rsp+18h] [rbp-30h] BYREF
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v2 = (*a2 & 7) + 97;
v5 = v7;
std::string::_M_construct(&v5, 1LL, v2);
std::string::_M_append(a1, v5, v6);
if ( v5 != v7 )
operator delete(v5, v7[0] + 1LL);
v3 = (*(_DWORD *)a2 >> 3) + 49;
v5 = v7;
std::string::_M_construct(&v5, 1LL, (unsigned int)v3);
std::string::_M_append(a1, v5, v6);
if ( v5 != v7 )
operator delete(v5, v7[0] + 1LL);
return a1;
}
| operator.cast.to.string:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV AL,byte ptr [RSI]
AND AL,0x7
ADD AL,0x61
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LAB_0010c174:
MOVZX EDX,AL
LEA RDI,[RSP + 0x8]
MOV ESI,0x1
CALL 0x00103260
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0010c190:
MOV RDI,RBX
CALL 0x00103070
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0010c1af
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00103210
LAB_0010c1af:
MOV EAX,dword ptr [R14]
SHR EAX,0x3
ADD AL,0x31
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R12
LAB_0010c1bf:
MOVSX EDX,AL
MOV ESI,0x1
CALL 0x00103260
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0010c1d6:
MOV RDI,RBX
CALL 0x00103070
LAB_0010c1de:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0010c1f5
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00103210
LAB_0010c1f5:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* chess::Square::operator std::__cxx11::string() const */
Square * __thiscall chess::Square::operator_cast_to_string(Square *this)
{
long *local_40 [2];
long local_30 [2];
*(Square **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (Square)0x0;
/* try { // try from 0010c174 to 0010c185 has its CatchHandler @ 0010c224 */
local_40[0] = local_30;
std::__cxx11::string::_M_construct((ulong)local_40,'\x01');
/* try { // try from 0010c190 to 0010c197 has its CatchHandler @ 0010c208 */
std::__cxx11::string::_M_append((char *)this,(ulong)local_40[0]);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
local_40[0] = local_30;
/* try { // try from 0010c1bf to 0010c1cb has its CatchHandler @ 0010c206 */
std::__cxx11::string::_M_construct((ulong)local_40,'\x01');
/* try { // try from 0010c1d6 to 0010c1dd has its CatchHandler @ 0010c204 */
std::__cxx11::string::_M_append((char *)this,(ulong)local_40[0]);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return this;
}
| |
44,622 | ZNK5chess6SquarecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] operator std::string() const {
std::string str;
str += static_cast<std::string>(file());
str += static_cast<std::string>(rank());
return str;
} | O3 | cpp | ZNK5chess6SquarecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movb (%rsi), %al
andb $0x7, %al
addb $0x61, %al
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movzbl %al, %edx
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x2250
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x2070
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xaf21
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movl (%r14), %eax
shrl $0x3, %eax
addb $0x31, %al
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
movsbl %al, %edx
movl $0x1, %esi
callq 0x2250
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x2070
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xaf67
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xaf7a
jmp 0xaf96
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xaf99
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0xaf99
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xafac
movq (%r15), %rsi
incq %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2350
| _ZNK5chess6SquarecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov al, [rsi]
and al, 7
add al, 61h ; 'a'
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
movzx edx, al
lea rdi, [rsp+48h+var_40]
mov esi, 1
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rsi, [rsp+48h+var_40]
mov rdx, [rsp+48h+var_38]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_AF21
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AF21:
mov eax, [r14]
shr eax, 3
add al, 31h ; '1'
lea rdi, [rsp+48h+var_40]
mov [rdi], r12
movsx edx, al
mov esi, 1
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rsi, [rsp+48h+var_40]
mov rdx, [rsp+48h+var_38]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_AF67
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AF67:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short loc_AF7A
jmp short loc_AF96
loc_AF7A:
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_AF99
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_AF99
loc_AF96:
mov r14, rax
loc_AF99:
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_AFAC
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AFAC:
mov rdi, r14
call __Unwind_Resume
| long long chess::Square::operator std::string(long long a1, _BYTE *a2)
{
unsigned __int8 v2; // al
char v3; // al
void *v5; // [rsp+8h] [rbp-40h] BYREF
long long v6; // [rsp+10h] [rbp-38h]
_QWORD v7[6]; // [rsp+18h] [rbp-30h] BYREF
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v2 = (*a2 & 7) + 97;
v5 = v7;
std::string::_M_construct(&v5, 1LL, v2);
std::string::_M_append(a1, v5, v6);
if ( v5 != v7 )
operator delete(v5, v7[0] + 1LL);
v3 = (*(_DWORD *)a2 >> 3) + 49;
v5 = v7;
std::string::_M_construct(&v5, 1LL, (unsigned int)v3);
std::string::_M_append(a1, v5, v6);
if ( v5 != v7 )
operator delete(v5, v7[0] + 1LL);
return a1;
}
| operator.cast.to.string:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV AL,byte ptr [RSI]
AND AL,0x7
ADD AL,0x61
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LAB_0010aee6:
MOVZX EDX,AL
LEA RDI,[RSP + 0x8]
MOV ESI,0x1
CALL 0x00102250
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0010af02:
MOV RDI,RBX
CALL 0x00102070
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0010af21
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102210
LAB_0010af21:
MOV EAX,dword ptr [R14]
SHR EAX,0x3
ADD AL,0x31
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R12
LAB_0010af31:
MOVSX EDX,AL
MOV ESI,0x1
CALL 0x00102250
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0010af48:
MOV RDI,RBX
CALL 0x00102070
LAB_0010af50:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0010af67
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102210
LAB_0010af67:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* chess::Square::operator std::__cxx11::string() const */
Square * __thiscall chess::Square::operator_cast_to_string(Square *this)
{
long *local_40 [2];
long local_30 [2];
*(Square **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (Square)0x0;
/* try { // try from 0010aee6 to 0010aef7 has its CatchHandler @ 0010af96 */
local_40[0] = local_30;
std::__cxx11::string::_M_construct((ulong)local_40,'\x01');
/* try { // try from 0010af02 to 0010af09 has its CatchHandler @ 0010af7a */
std::__cxx11::string::_M_append((char *)this,(ulong)local_40[0]);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
local_40[0] = local_30;
/* try { // try from 0010af31 to 0010af3d has its CatchHandler @ 0010af78 */
std::__cxx11::string::_M_construct((ulong)local_40,'\x01');
/* try { // try from 0010af48 to 0010af4f has its CatchHandler @ 0010af76 */
std::__cxx11::string::_M_append((char *)this,(ulong)local_40[0]);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return this;
}
| |
44,623 | js_array_includes | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_includes(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, val;
int64_t len, n;
JSValue *arrp;
uint32_t count;
int res;
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &len, obj))
goto exception;
res = TRUE;
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_SAME_VALUE_ZERO)) {
goto done;
}
}
}
for (; n < len; n++) {
val = JS_GetPropertyInt64(ctx, obj, n);
if (JS_IsException(val))
goto exception;
if (js_strict_eq2(ctx, js_dup(argv[0]), val,
JS_EQ_SAME_VALUE_ZERO)) {
goto done;
}
}
}
res = FALSE;
done:
JS_FreeValue(ctx, obj);
return js_bool(res);
exception:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O2 | c | js_array_includes:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r13
movl %ecx, %ebp
movq %rdi, %rbx
callq 0x24742
movq %rax, %r14
movq %rdx, %r15
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %rdx
movq %r15, %rcx
callq 0x207f3
pushq $0x6
popq %r12
testl %eax, %eax
jne 0x31da1
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
jle 0x31cc0
andq $0x0, 0x20(%rsp)
cmpl $0x2, %ebp
jl 0x31cc7
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
movq 0x18(%rsp), %r9
movq %r9, (%rsp)
xorl %ebp, %ebp
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0x25067
testl %eax, %eax
jne 0x31da3
movq 0x20(%rsp), %rbp
jmp 0x31cc9
pushq $0x1
jmp 0x31d9f
xorl %ebp, %ebp
leaq 0x28(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3de1c
testl %eax, %eax
je 0x31d41
movq %r14, 0x10(%rsp)
movl 0xc(%rsp), %r12d
movq 0x28(%rsp), %rax
movq %rbp, %rcx
shlq $0x4, %rcx
leaq (%rcx,%rax), %r14
addq $0x8, %r14
cmpq %r12, %rbp
jge 0x31d3c
movq (%r13), %rsi
movq 0x8(%r13), %rdx
cmpl $-0x9, %edx
jb 0x31d14
incl (%rsi)
movq -0x8(%r14), %rcx
movq (%r14), %r8
cmpl $-0x9, %r8d
jb 0x31d23
incl (%rcx)
movq %rbx, %rdi
pushq $0x2
popq %r9
callq 0x36e42
testl %eax, %eax
jne 0x31d90
incq %rbp
addq $0x10, %r14
jmp 0x31d00
movq 0x10(%rsp), %r14
pushq $0x1
popq %r12
cmpq 0x18(%rsp), %rbp
jge 0x31da1
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbp, %rcx
callq 0x21d28
movq %rdx, %r8
cmpl $0x6, %r8d
je 0x31d9d
movq (%r13), %rsi
movq 0x8(%r13), %rdx
cmpl $-0x9, %edx
jb 0x31d75
incl (%rsi)
movq %rbx, %rdi
movq %rax, %rcx
pushq $0x2
popq %r9
callq 0x36e42
incq %rbp
testl %eax, %eax
je 0x31d45
movq %r12, %rbp
jmp 0x31da3
pushq $0x1
popq %rbp
movq %rbp, %r12
movq 0x10(%rsp), %r14
jmp 0x31da3
pushq $0x6
popq %r12
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1bbce
movq %rbp, %rax
movq %r12, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_array_includes:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, r8
mov ebp, ecx
mov rbx, rdi
call JS_ToObject
mov r14, rax
mov r15, rdx
lea rsi, [rsp+68h+var_38]
mov rdi, rbx
mov rdx, rax
mov rcx, r15
call js_get_length64
push 6
pop r12
test eax, eax
jnz loc_31DA1
mov rax, [rsp+68h+var_38]
mov [rsp+68h+var_50], rax
test rax, rax
jle short loc_31CC0
and [rsp+68h+var_48], 0
cmp ebp, 2
jl short loc_31CC7
mov rdx, [r13+10h]
mov rcx, [r13+18h]
mov r9, [rsp+68h+var_50]
mov [rsp+68h+var_68], r9
xor ebp, ebp
lea rsi, [rsp+68h+var_48]
mov rdi, rbx
xor r8d, r8d
call JS_ToInt64Clamp
test eax, eax
jnz loc_31DA3
mov rbp, [rsp+68h+var_48]
jmp short loc_31CC9
loc_31CC0:
push 1
jmp loc_31D9F
loc_31CC7:
xor ebp, ebp
loc_31CC9:
lea rdx, [rsp+68h+var_40]
lea rcx, [rsp+68h+var_5C]
mov rdi, r14
mov rsi, r15
call js_get_fast_array
test eax, eax
jz short loc_31D41
mov [rsp+68h+var_58], r14
mov r12d, [rsp+68h+var_5C]
mov rax, [rsp+68h+var_40]
mov rcx, rbp
shl rcx, 4
lea r14, [rcx+rax]
add r14, 8
loc_31D00:
cmp rbp, r12
jge short loc_31D3C
mov rsi, [r13+0]
mov rdx, [r13+8]
cmp edx, 0FFFFFFF7h
jb short loc_31D14
inc dword ptr [rsi]
loc_31D14:
mov rcx, [r14-8]
mov r8, [r14]
cmp r8d, 0FFFFFFF7h
jb short loc_31D23
inc dword ptr [rcx]
loc_31D23:
mov rdi, rbx
push 2
pop r9
call js_strict_eq2
test eax, eax
jnz short loc_31D90
inc rbp
add r14, 10h
jmp short loc_31D00
loc_31D3C:
mov r14, [rsp+68h+var_58]
loc_31D41:
push 1
pop r12
loc_31D45:
cmp rbp, [rsp+68h+var_50]
jge short loc_31DA1
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, rbp
call JS_GetPropertyInt64
mov r8, rdx
cmp r8d, 6
jz short loc_31D9D
mov rsi, [r13+0]
mov rdx, [r13+8]
cmp edx, 0FFFFFFF7h
jb short loc_31D75
inc dword ptr [rsi]
loc_31D75:
mov rdi, rbx
mov rcx, rax
push 2
pop r9
call js_strict_eq2
inc rbp
test eax, eax
jz short loc_31D45
mov rbp, r12
jmp short loc_31DA3
loc_31D90:
push 1
pop rbp
mov r12, rbp
mov r14, [rsp+68h+var_58]
jmp short loc_31DA3
loc_31D9D:
push 6
loc_31D9F:
pop r12
loc_31DA1:
xor ebp, ebp
loc_31DA3:
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_FreeValue
mov rax, rbp
mov rdx, r12
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_array_includes(
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; // r15
long long v19; // rbp
signed long long v20; // rbp
signed long long v21; // r12
long long *i; // r14
_DWORD *v23; // rsi
long long v24; // rdx
_DWORD *v25; // rcx
long long v26; // r8
unsigned long long PropertyInt64; // rax
long long v28; // rdx
long long v29; // r8
_DWORD *v30; // rsi
long long v31; // rdx
unsigned int v33; // [rsp+Ch] [rbp-5Ch] BYREF
long long v34; // [rsp+10h] [rbp-58h]
long long v35; // [rsp+18h] [rbp-50h]
signed long long v36; // [rsp+20h] [rbp-48h] BYREF
long long v37; // [rsp+28h] [rbp-40h] BYREF
long long v38[7]; // [rsp+30h] [rbp-38h] 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, v38, v16, v17) || (v35 = v38[0], v38[0] <= 0) )
{
LABEL_25:
v19 = 0LL;
goto LABEL_26;
}
v36 = 0LL;
if ( v15 < 2 )
{
v20 = 0LL;
}
else
{
v19 = 0LL;
if ( (unsigned int)JS_ToInt64Clamp(
a1,
(unsigned long long *)&v36,
*(_DWORD **)(a5 + 16),
*(_QWORD *)(a5 + 24),
0LL,
v35,
v35) )
goto LABEL_26;
v20 = v36;
}
if ( !(unsigned int)js_get_fast_array(v16, v18, &v37, &v33) )
{
LABEL_18:
while ( v20 < v35 )
{
PropertyInt64 = JS_GetPropertyInt64(a1, v16, v18, v20);
v29 = v28;
if ( (_DWORD)v28 == 6 )
break;
v30 = *(_DWORD **)a5;
v31 = *(_QWORD *)(a5 + 8);
if ( (unsigned int)v31 >= 0xFFFFFFF7 )
++*v30;
++v20;
if ( (unsigned int)js_strict_eq2(a1, v30, v31, PropertyInt64, v29, 2LL) )
{
v19 = 1LL;
goto LABEL_26;
}
}
goto LABEL_25;
}
v34 = v16;
v21 = v33;
for ( i = (long long *)(16 * v20 + v37 + 8); ; i += 2 )
{
if ( v20 >= v21 )
{
v16 = v34;
goto LABEL_18;
}
v23 = *(_DWORD **)a5;
v24 = *(_QWORD *)(a5 + 8);
if ( (unsigned int)v24 >= 0xFFFFFFF7 )
++*v23;
v25 = (_DWORD *)*(i - 1);
v26 = *i;
if ( (unsigned int)*i >= 0xFFFFFFF7 )
++*v25;
if ( (unsigned int)js_strict_eq2(a1, v23, v24, v25, v26, 2LL) )
break;
++v20;
}
v19 = 1LL;
v16 = v34;
LABEL_26:
JS_FreeValue(a1, v16, v18);
return v19;
}
| js_array_includes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,R8
MOV EBP,ECX
MOV RBX,RDI
CALL 0x00124742
MOV R14,RAX
MOV R15,RDX
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
MOV RDX,RAX
MOV RCX,R15
CALL 0x001207f3
PUSH 0x6
POP R12
TEST EAX,EAX
JNZ 0x00131da1
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JLE 0x00131cc0
AND qword ptr [RSP + 0x20],0x0
CMP EBP,0x2
JL 0x00131cc7
MOV RDX,qword ptr [R13 + 0x10]
MOV RCX,qword ptr [R13 + 0x18]
MOV R9,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],R9
XOR EBP,EBP
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
XOR R8D,R8D
CALL 0x00125067
TEST EAX,EAX
JNZ 0x00131da3
MOV RBP,qword ptr [RSP + 0x20]
JMP 0x00131cc9
LAB_00131cc0:
PUSH 0x1
JMP 0x00131d9f
LAB_00131cc7:
XOR EBP,EBP
LAB_00131cc9:
LEA RDX,[RSP + 0x28]
LEA RCX,[RSP + 0xc]
MOV RDI,R14
MOV RSI,R15
CALL 0x0013de1c
TEST EAX,EAX
JZ 0x00131d41
MOV qword ptr [RSP + 0x10],R14
MOV R12D,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,RBP
SHL RCX,0x4
LEA R14,[RCX + RAX*0x1]
ADD R14,0x8
LAB_00131d00:
CMP RBP,R12
JGE 0x00131d3c
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
CMP EDX,-0x9
JC 0x00131d14
INC dword ptr [RSI]
LAB_00131d14:
MOV RCX,qword ptr [R14 + -0x8]
MOV R8,qword ptr [R14]
CMP R8D,-0x9
JC 0x00131d23
INC dword ptr [RCX]
LAB_00131d23:
MOV RDI,RBX
PUSH 0x2
POP R9
CALL 0x00136e42
TEST EAX,EAX
JNZ 0x00131d90
INC RBP
ADD R14,0x10
JMP 0x00131d00
LAB_00131d3c:
MOV R14,qword ptr [RSP + 0x10]
LAB_00131d41:
PUSH 0x1
POP R12
LAB_00131d45:
CMP RBP,qword ptr [RSP + 0x18]
JGE 0x00131da1
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,RBP
CALL 0x00121d28
MOV R8,RDX
CMP R8D,0x6
JZ 0x00131d9d
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
CMP EDX,-0x9
JC 0x00131d75
INC dword ptr [RSI]
LAB_00131d75:
MOV RDI,RBX
MOV RCX,RAX
PUSH 0x2
POP R9
CALL 0x00136e42
INC RBP
TEST EAX,EAX
JZ 0x00131d45
MOV RBP,R12
JMP 0x00131da3
LAB_00131d90:
PUSH 0x1
POP RBP
MOV R12,RBP
MOV R14,qword ptr [RSP + 0x10]
JMP 0x00131da3
LAB_00131d9d:
PUSH 0x6
LAB_00131d9f:
POP R12
LAB_00131da1:
XOR EBP,EBP
LAB_00131da3:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011bbce
MOV RAX,RBP
MOV RDX,R12
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_array_includes(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int *piVar1;
int8 uVar2;
int iVar3;
long lVar5;
int8 uVar6;
int8 *puVar7;
int8 uVar8;
int1 auVar9 [16];
int8 uStackY_70;
uint local_5c;
int8 local_58;
long local_50;
long local_48;
long local_40;
long local_38;
int8 uVar4;
auVar9 = JS_ToObject();
uVar4 = auVar9._8_8_;
uVar8 = auVar9._0_8_;
iVar3 = js_get_length64(param_1,&local_38,uVar8,uVar4);
uStackY_70 = 6;
if (iVar3 == 0) {
local_50 = local_38;
if (0 < local_38) {
local_48 = 0;
if (1 < param_4) {
uVar6 = 0;
iVar3 = JS_ToInt64Clamp(param_1,&local_48,param_5[2],param_5[3],0,local_38,local_38);
if (iVar3 != 0) goto LAB_00131da3;
}
lVar5 = local_48;
iVar3 = js_get_fast_array(uVar8,uVar4,&local_40,&local_5c);
if (iVar3 != 0) {
puVar7 = (int8 *)(lVar5 * 0x10 + local_40 + 8);
local_58 = uVar8;
for (; uVar8 = local_58, lVar5 < (long)(ulong)local_5c; lVar5 = lVar5 + 1) {
if (0xfffffff6 < (uint)param_5[1]) {
*(int *)*param_5 = *(int *)*param_5 + 1;
}
if (0xfffffff6 < (uint)*puVar7) {
*(int *)puVar7[-1] = *(int *)puVar7[-1] + 1;
}
iVar3 = js_strict_eq2(param_1);
if (iVar3 != 0) {
uVar6 = 1;
uStackY_70 = uVar6;
uVar8 = local_58;
goto LAB_00131da3;
}
puVar7 = puVar7 + 2;
}
}
uVar6 = 1;
do {
uStackY_70 = uVar6;
if (local_50 <= lVar5) goto LAB_00131da1;
auVar9 = JS_GetPropertyInt64(param_1,uVar8,uVar4,lVar5);
if (auVar9._8_4_ == 6) {
uStackY_70 = 6;
goto LAB_00131da1;
}
piVar1 = (int *)*param_5;
uVar2 = param_5[1];
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
iVar3 = js_strict_eq2(param_1,piVar1,uVar2,auVar9._0_8_,auVar9._8_8_,2);
lVar5 = lVar5 + 1;
} while (iVar3 == 0);
goto LAB_00131da3;
}
uStackY_70 = 1;
}
LAB_00131da1:
uVar6 = 0;
LAB_00131da3:
JS_FreeValue(param_1,uVar8,uVar4);
auVar9._8_8_ = uStackY_70;
auVar9._0_8_ = uVar6;
return auVar9;
}
| |
44,624 | glfwGetJoystickUserPointer | aimrt_mujoco_sim/_deps/glfw3-src/src/input.c | GLFWAPI void* glfwGetJoystickUserPointer(int jid)
{
_GLFWjoystick* js;
assert(jid >= GLFW_JOYSTICK_1);
assert(jid <= GLFW_JOYSTICK_LAST);
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
js = _glfw.joysticks + jid;
if (!js->allocated)
return NULL;
return js->userPointer;
} | O3 | c | glfwGetJoystickUserPointer:
pushq %rbx
leaq 0xc1b10(%rip), %rax # 0x215300
cmpl $0x0, (%rax)
je 0x15381b
movslq %edi, %rcx
imulq $0x2018, %rcx, %rcx # imm = 0x2018
cmpl $0x0, 0x408(%rax,%rcx)
je 0x15382d
addq %rcx, %rax
addq $0x408, %rax # imm = 0x408
movq 0xb8(%rax), %rbx
jmp 0x15382f
xorl %ebx, %ebx
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
callq 0x1519f2
jmp 0x15382f
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
| glfwGetJoystickUserPointer:
push rbx
lea rax, _glfw
cmp dword ptr [rax], 0
jz short loc_15381B
movsxd rcx, edi
imul rcx, 2018h
cmp dword ptr [rax+rcx+408h], 0
jz short loc_15382D
add rax, rcx
add rax, 408h
mov rbx, [rax+0B8h]
jmp short loc_15382F
loc_15381B:
xor ebx, ebx
mov edi, 10001h
xor esi, esi
xor eax, eax
call _glfwInputError
jmp short loc_15382F
loc_15382D:
xor ebx, ebx
loc_15382F:
mov rax, rbx
pop rbx
retn
| long long glfwGetJoystickUserPointer(int a1)
{
long long v1; // rcx
long long v2; // rbx
if ( glfw[0] )
{
v1 = 2054LL * a1;
if ( glfw[v1 + 258] )
return *(_QWORD *)&glfw[v1 + 304];
else
return 0LL;
}
else
{
v2 = 0LL;
glfwInputError(0x10001u, 0LL);
}
return v2;
}
| __invoke:
MOV AL,byte ptr [RDI + 0x298]
RET
|
/* __invoke(void*) */
int1 aimrt::channel::Context::GenOpsBase()::{lambda(void*)#1}::__invoke(void *param_1)
{
return *(int1 *)((long)param_1 + 0x298);
}
| |
44,625 | dirname_part | eloqsql/mysys/mf_dirname.c | size_t dirname_part(char *to, const char *name, size_t *to_res_length)
{
size_t length;
DBUG_ENTER("dirname_part");
DBUG_PRINT("enter",("'%s'",name));
length=dirname_length(name);
*to_res_length= (size_t) (convert_dirname(to, name, name+length) - to);
DBUG_RETURN(length);
} | O0 | c | dirname_part:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x3bb16
movq -0x10(%rbp), %rdi
callq 0x3ba80
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x20(%rbp), %rdx
callq 0x3bb60
movq %rax, %rcx
movq -0x8(%rbp), %rax
subq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| dirname_part:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_3BB16:
mov rdi, [rbp+var_10]
call dirname_length
mov [rbp+var_20], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_20]
call convert_dirname
mov rcx, rax
mov rax, [rbp+var_8]
sub rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
| long long dirname_part(long long a1, _BYTE *a2, _QWORD *a3)
{
long long v4; // [rsp+10h] [rbp-20h]
v4 = dirname_length(a2);
*a3 = convert_dirname(a1, a2, &a2[v4]) - a1;
return v4;
}
| dirname_part:
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],RDX
JMP 0x0013bb16
LAB_0013bb16:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013ba80
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x20]
CALL 0x0013bb60
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
long dirname_part(long param_1,long param_2,long *param_3)
{
long lVar1;
long lVar2;
lVar1 = dirname_length(param_2);
lVar2 = convert_dirname(param_1,param_2,param_2 + lVar1);
*param_3 = lVar2 - param_1;
return lVar1;
}
| |
44,626 | get_collation_name_alias | eloqsql/mysys/charset.c | static const char*
get_collation_name_alias(const char *name, char *buf, size_t bufsize, myf flags)
{
if (!strncasecmp(name, "utf8_", 5))
{
my_snprintf(buf, bufsize, "utf8mb%c_%s",
flags & MY_UTF8_IS_UTF8MB3 ? '3' : '4', name + 5);
return buf;
}
return NULL;
} | O0 | c | get_collation_name_alias:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x50432(%rip), %rsi # 0x83975
movl $0x5, %edx
callq 0x25460
cmpl $0x0, %eax
jne 0x33596
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
andq $0x400, %rdx # imm = 0x400
movl $0x34, %ecx
movl $0x33, %eax
cmpq $0x0, %rdx
cmovnel %eax, %ecx
movq -0x10(%rbp), %r8
addq $0x5, %r8
leaq 0x503f6(%rip), %rdx # 0x8397b
movb $0x0, %al
callq 0x7fa30
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3359e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| get_collation_name_alias:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_10]
lea rsi, aUtf8_0; "utf8_"
mov edx, 5
call _strncasecmp
cmp eax, 0
jnz short loc_33596
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
and rdx, 400h
mov ecx, 34h ; '4'
mov eax, 33h ; '3'
cmp rdx, 0
cmovnz ecx, eax
mov r8, [rbp+var_10]
add r8, 5
lea rdx, aUtf8mbCS; "utf8mb%c_%s"
mov al, 0
call my_snprintf
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_3359E
loc_33596:
mov [rbp+var_8], 0
loc_3359E:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long get_collation_name_alias(long long a1, long long a2, int a3, __int16 a4)
{
int v4; // r9d
int v5; // ecx
if ( (unsigned int)strncasecmp(a1, "utf8_", 5LL) )
return 0LL;
v5 = 52;
if ( (a4 & 0x400) != 0 )
v5 = 51;
my_snprintf(a2, a3, (unsigned int)"utf8mb%c_%s", v5, a1 + 5, v4);
return a2;
}
| get_collation_name_alias:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x183975]
MOV EDX,0x5
CALL 0x00125460
CMP EAX,0x0
JNZ 0x00133596
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
AND RDX,0x400
MOV ECX,0x34
MOV EAX,0x33
CMP RDX,0x0
CMOVNZ ECX,EAX
MOV R8,qword ptr [RBP + -0x10]
ADD R8,0x5
LEA RDX,[0x18397b]
MOV AL,0x0
CALL 0x0017fa30
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0013359e
LAB_00133596:
MOV qword ptr [RBP + -0x8],0x0
LAB_0013359e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8
get_collation_name_alias(char *param_1,int8 param_2,int8 param_3,ulong param_4)
{
int iVar1;
int8 uVar2;
int8 local_10;
iVar1 = strncasecmp(param_1,"utf8_",5);
if (iVar1 == 0) {
uVar2 = 0x34;
if ((param_4 & 0x400) != 0) {
uVar2 = 0x33;
}
my_snprintf(param_2,param_3,"utf8mb%c_%s",uVar2,param_1 + 5);
local_10 = param_2;
}
else {
local_10 = 0;
}
return local_10;
}
| |
44,627 | nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]() | ng-log[P]ng-log/src/logging.cc | std::unique_ptr<string> CheckOpMessageBuilder::NewString() {
*stream_ << ")";
return std::make_unique<std::string>(stream_->str());
} | O1 | cpp | nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x14bf7(%rip), %rsi # 0x22adc
movl $0x1, %edx
callq 0x7610
movq (%r14), %rsi
addq $0x8, %rsi
leaq 0x8(%rsp), %rdi
callq 0x78a0
movl $0x20, %edi
callq 0x7530
movq %rax, %rdx
addq $0x10, %rdx
movq %rdx, (%rax)
leaq 0x18(%rsp), %rcx
movq -0x10(%rcx), %rsi
cmpq %rcx, %rsi
je 0xdf30
movq %rsi, (%rax)
movq 0x18(%rsp), %rdx
movq %rdx, 0x10(%rax)
jmp 0xdf36
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x10(%rsp), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xdf7e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7540
movq %rbx, %rdi
callq 0x7980
| _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev:
push r14
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rsi]
lea rsi, aVoidNglogAnony+86h; ")"
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
add rsi, 8
lea rdi, [rsp+38h+var_30]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov rdx, rax
add rdx, 10h
mov [rax], rdx
lea rcx, [rsp+38h+var_20]
mov rsi, [rcx-10h]
cmp rsi, rcx
jz short loc_DF30
mov [rax], rsi
mov rdx, [rsp+38h+var_20]
mov [rax+10h], rdx
jmp short loc_DF36
loc_DF30:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_DF36:
mov rdx, [rsp+38h+var_28]
mov [rax+8], rdx
mov [rsp+38h+var_30], rcx
mov [rsp+38h+var_28], 0
mov byte ptr [rsp+38h+var_20], 0
mov [rbx], rax
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_DF7E
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DF7E:
mov rdi, rbx
call __Unwind_Resume
| _QWORD * nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](_QWORD *a1, _QWORD *a2)
{
long long v2; // rax
_QWORD v4[2]; // [rsp+8h] [rbp-30h] BYREF
__int128 v5; // [rsp+18h] [rbp-20h] BYREF
std::__ostream_insert<char,std::char_traits<char>>(*a2, ")", 1LL);
std::stringbuf::str(v4, *a2 + 8LL);
v2 = operator new(0x20uLL);
*(_QWORD *)v2 = v2 + 16;
if ( (__int128 *)v4[0] == &v5 )
{
*(_OWORD *)(v2 + 16) = v5;
}
else
{
*(_QWORD *)v2 = v4[0];
*(_QWORD *)(v2 + 16) = v5;
}
*(_QWORD *)(v2 + 8) = v4[1];
*a1 = v2;
return a1;
}
| NewString[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RSI]
LEA RSI,[0x122adc]
MOV EDX,0x1
CALL 0x00107610
MOV RSI,qword ptr [R14]
ADD RSI,0x8
LEA RDI,[RSP + 0x8]
CALL 0x001078a0
LAB_0010df00:
MOV EDI,0x20
CALL 0x00107530
LAB_0010df0a:
MOV RDX,RAX
ADD RDX,0x10
MOV qword ptr [RAX],RDX
LEA RCX,[RSP + 0x18]
MOV RSI,qword ptr [RCX + -0x10]
CMP RSI,RCX
JZ 0x0010df30
MOV qword ptr [RAX],RSI
MOV RDX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x10],RDX
JMP 0x0010df36
LAB_0010df30:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0010df36:
MOV RDX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],0x0
MOV byte ptr [RSP + 0x18],0x0
MOV qword ptr [RBX],RAX
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]() */
void nglog::internal::CheckOpMessageBuilder::NewString_abi_cxx11_(void)
{
int8 *puVar1;
int8 *in_RSI;
int8 *in_RDI;
int1 *local_30;
int8 local_28;
int1 local_20;
int7 uStack_1f;
int8 uStack_18;
std::__ostream_insert<char,std::char_traits<char>>((ostream *)*in_RSI,")",1);
std::__cxx11::stringbuf::str();
/* try { // try from 0010df00 to 0010df09 has its CatchHandler @ 0010df60 */
puVar1 = (int8 *)operator_new(0x20);
*puVar1 = puVar1 + 2;
if (local_30 == &local_20) {
puVar1[2] = CONCAT71(uStack_1f,local_20);
puVar1[3] = uStack_18;
}
else {
*puVar1 = local_30;
puVar1[2] = CONCAT71(uStack_1f,local_20);
}
puVar1[1] = local_28;
*in_RDI = puVar1;
return;
}
| |
44,628 | nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]() | ng-log[P]ng-log/src/logging.cc | std::unique_ptr<string> CheckOpMessageBuilder::NewString() {
*stream_ << ")";
return std::make_unique<std::string>(stream_->str());
} | O2 | cpp | nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x12911(%rip), %rsi # 0x1eac4
callq 0x7580
movq (%r14), %rsi
addq $0x8, %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x7920
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe6cb
leaq 0x8(%rsp), %rdi
callq 0x7b38
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7b38
movq %rbx, %rdi
callq 0x7a00
| _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev:
push r14
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rsi]
lea rsi, aVoidNglogAnony+86h; ")"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14]
add rsi, 8
lea r14, [rsp+38h+var_30]
mov rdi, r14
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rdi, rbx
mov rsi, r14
call _ZSt11make_uniqueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::string,std::string>(std::string &&)
lea rdi, [rsp+38h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](
long long a1,
_QWORD *a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
_BYTE v7[48]; // [rsp+8h] [rbp-30h] BYREF
std::operator<<<std::char_traits<char>>(*a2, ")", a3, a4, a5, a6);
std::stringbuf::str(v7, *a2 + 8LL);
std::make_unique<std::string,std::string>(a1, v7);
std::string::~string(v7);
return a1;
}
| NewString[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RSI]
LEA RSI,[0x11eac4]
CALL 0x00107580
MOV RSI,qword ptr [R14]
ADD RSI,0x8
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00107920
LAB_0010c1cc:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010e6cb
LAB_0010c1d7:
LEA RDI,[RSP + 0x8]
CALL 0x00107b38
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]() */
void nglog::internal::CheckOpMessageBuilder::NewString_abi_cxx11_(void)
{
int8 *in_RSI;
string *in_RDI;
string local_30 [32];
std::operator<<((ostream *)*in_RSI,")");
std::__cxx11::stringbuf::str();
/* try { // try from 0010c1cc to 0010c1d6 has its CatchHandler @ 0010c1ec */
std::make_unique<std::__cxx11::string,std::__cxx11::string>(in_RDI);
std::__cxx11::string::~string(local_30);
return;
}
| |
44,629 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++() | llama.cpp/common/json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++():
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0xeb17c
movq %rdi, %rbx
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0xeb16c
cmpl $0x1, %eax
jne 0xeb173
movq 0x8(%rbx), %rdi
callq 0x26330
movq %rax, 0x8(%rbx)
jmp 0xeb177
addq $0x10, 0x10(%rbx)
jmp 0xeb177
incq 0x18(%rbx)
movq %rbx, %rax
popq %rbx
retq
leaq 0x970c1(%rip), %rdi # 0x182244
leaq 0x87c88(%rip), %rdx # 0x172e12
leaq 0x8a1ec(%rip), %rcx # 0x17537d
movl $0x33c0, %esi # imm = 0x33C0
xorl %eax, %eax
callq 0x26090
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
push rbx
mov rax, [rdi]
test rax, rax
jz short loc_EB17C
mov rbx, rdi
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_EB16C
cmp eax, 1
jnz short loc_EB173
mov rdi, [rbx+8]
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov [rbx+8], rax
jmp short loc_EB177
loc_EB16C:
add qword ptr [rbx+10h], 10h
jmp short loc_EB177
loc_EB173:
inc qword ptr [rbx+18h]
loc_EB177:
mov rax, rbx
pop rbx
retn
loc_EB17C:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 33C0h
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::operator++(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 2 )
{
a1[2] += 16;
}
else if ( v1 == 1 )
{
a1[1] = (unsigned __int8 *)std::_Rb_tree_increment(a1[1]);
}
else
{
++a1[3];
}
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
return 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>::data::~data("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp");
}
}
| operator++:
PUSH RBX
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001eb17c
MOV RBX,RDI
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001eb16c
CMP EAX,0x1
JNZ 0x001eb173
MOV RDI,qword ptr [RBX + 0x8]
CALL 0x00126330
MOV qword ptr [RBX + 0x8],RAX
JMP 0x001eb177
LAB_001eb16c:
ADD qword ptr [RBX + 0x10],0x10
JMP 0x001eb177
LAB_001eb173:
INC qword ptr [RBX + 0x18]
LAB_001eb177:
MOV RAX,RBX
POP RBX
RET
LAB_001eb17c:
LEA RDI,[0x282244]
LEA RDX,[0x272e12]
LEA RCX,[0x27537d]
MOV ESI,0x33c0
XOR EAX,EAX
CALL 0x00126090
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<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> >::TEMPNAMEPLACEHOLDERVALUE() */
iter_impl<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>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<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>>
::operator++(iter_impl<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>>
*this)
{
char cVar1;
int8 uVar2;
if (*(char **)this != (char *)0x0) {
cVar1 = **(char **)this;
if (cVar1 == '\x02') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10;
}
else if (cVar1 == '\x01') {
uVar2 = std::_Rb_tree_increment(*(_Rb_tree_node_base **)(this + 8));
*(int8 *)(this + 8) = uVar2;
}
else {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
}
return this;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr");
}
| |
44,630 | prop(LefDefParser::defrCallbackType_e, LefDefParser::defiProp*, void*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/defdiff/diffDefRW.cpp | int prop(defrCallbackType_e c, defiProp* p, defiUserData ud) {
checkType(c);
if (ud != userData) dataError();
if (strcmp(p->propType(), "design") == 0)
fprintf(fout, "PROPDEF DESIGN %s ", p->propName());
else if (strcmp(p->propType(), "net") == 0)
fprintf(fout, "PROPDEF NET %s ", p->propName());
else if (strcmp(p->propType(), "component") == 0)
fprintf(fout, "PROPDEF COMP %s ", p->propName());
else if (strcmp(p->propType(), "specialnet") == 0)
fprintf(fout, "PROPDEF SNET %s ", p->propName());
else if (strcmp(p->propType(), "group") == 0)
fprintf(fout, "PROPDEF GROUP %s ", p->propName());
else if (strcmp(p->propType(), "row") == 0)
fprintf(fout, "PROPDEF ROW %s ", p->propName());
else if (strcmp(p->propType(), "componentpin") == 0)
fprintf(fout, "PROPDEF COMPPIN %s ", p->propName());
else if (strcmp(p->propType(), "region") == 0)
fprintf(fout, "PROPDEF REGION %s ", p->propName());
else if (strcmp(p->propType(), "nondefaultrule") == 0)
fprintf(fout, "PROPDEF NONDEFAULTRULE %s ", p->propName());
if (p->dataType() == 'I')
fprintf(fout, "INT ");
if (p->dataType() == 'R')
fprintf(fout, "REAL ");
if (p->dataType() == 'S')
fprintf(fout, "STR ");
if (p->dataType() == 'Q')
fprintf(fout, "STR ");
if (p->hasRange()) {
fprintf(fout, "RANGE %g %g ", checkDouble(p->left()),
checkDouble(p->right()));
}
if (p->hasNumber())
fprintf(fout, "%g ", checkDouble(p->number()));
if (p->hasString())
fprintf(fout, "\"%s\" ", p->string());
fprintf(fout, "\n");
return 0;
} | O3 | cpp | prop(LefDefParser::defrCallbackType_e, LefDefParser::defiProp*, void*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
cmpl $0x68, %edi
jb 0xa82f
movq 0x58a37(%rip), %rcx # 0x63250
leaq 0x33c6f(%rip), %rdi # 0x3e48f
movl $0x27, %esi
movl $0x1, %edx
callq 0x6350
cmpq %r14, 0x58a22(%rip) # 0x63258
je 0xa855
movq 0x58a11(%rip), %rcx # 0x63250
leaq 0x33c1e(%rip), %rdi # 0x3e464
movl $0x2a, %esi
movl $0x1, %edx
callq 0x6350
movq %rbx, %rdi
callq 0x29f52
leaq 0x3cf69(%rip), %rsi # 0x477cd
movq %rax, %rdi
callq 0x6280
testl %eax, %eax
je 0xa969
movq %rbx, %rdi
callq 0x29f52
leaq 0x3d57e(%rip), %rsi # 0x47e01
movq %rax, %rdi
callq 0x6280
testl %eax, %eax
je 0xa972
movq %rbx, %rdi
callq 0x29f52
leaq 0x34382(%rip), %rsi # 0x3ec24
movq %rax, %rdi
callq 0x6280
testl %eax, %eax
je 0xa97b
movq %rbx, %rdi
callq 0x29f52
leaq 0x3437e(%rip), %rsi # 0x3ec3f
movq %rax, %rdi
callq 0x6280
testl %eax, %eax
je 0xa984
movq %rbx, %rdi
callq 0x29f52
leaq 0x3d883(%rip), %rsi # 0x48163
movq %rax, %rdi
callq 0x6280
testl %eax, %eax
je 0xa98d
movq %rbx, %rdi
callq 0x29f52
leaq 0x3436e(%rip), %rsi # 0x3ec6d
movq %rax, %rdi
callq 0x6280
testl %eax, %eax
je 0xa996
movq %rbx, %rdi
callq 0x29f52
leaq 0x34363(%rip), %rsi # 0x3ec81
movq %rax, %rdi
callq 0x6280
testl %eax, %eax
je 0xa99f
movq %rbx, %rdi
callq 0x29f52
leaq 0x3d3ec(%rip), %rsi # 0x47d25
movq %rax, %rdi
callq 0x6280
testl %eax, %eax
je 0xa9a8
movq %rbx, %rdi
callq 0x29f52
leaq 0x34361(%rip), %rsi # 0x3ecb5
movq %rax, %rdi
callq 0x6280
testl %eax, %eax
jne 0xa9ce
leaq 0x3435d(%rip), %r14 # 0x3ecc4
jmp 0xa9af
leaq 0x34291(%rip), %r14 # 0x3ec01
jmp 0xa9af
leaq 0x3429b(%rip), %r14 # 0x3ec14
jmp 0xa9af
leaq 0x342ac(%rip), %r14 # 0x3ec2e
jmp 0xa9af
leaq 0x342bf(%rip), %r14 # 0x3ec4a
jmp 0xa9af
leaq 0x342c7(%rip), %r14 # 0x3ec5b
jmp 0xa9af
leaq 0x342d4(%rip), %r14 # 0x3ec71
jmp 0xa9af
leaq 0x342e8(%rip), %r14 # 0x3ec8e
jmp 0xa9af
leaq 0x342f3(%rip), %r14 # 0x3eca2
movq 0x5889a(%rip), %r15 # 0x63250
movq %rbx, %rdi
callq 0x29f88
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6290
movq %rbx, %rdi
callq 0x29f8e
cmpb $0x49, %al
jne 0xa9f7
movq 0x5886f(%rip), %rcx # 0x63250
leaq 0x33c44(%rip), %rdi # 0x3e62c
movl $0x4, %esi
movl $0x1, %edx
callq 0x6350
movq %rbx, %rdi
callq 0x29f8e
cmpb $0x52, %al
jne 0xaa20
movq 0x58846(%rip), %rcx # 0x63250
leaq 0x33c15(%rip), %rdi # 0x3e626
movl $0x5, %esi
movl $0x1, %edx
callq 0x6350
movq %rbx, %rdi
callq 0x29f8e
cmpb $0x53, %al
jne 0xaa49
movq 0x5881d(%rip), %rcx # 0x63250
leaq 0x34150(%rip), %rdi # 0x3eb8a
movl $0x4, %esi
movl $0x1, %edx
callq 0x6350
movq %rbx, %rdi
callq 0x29f8e
cmpb $0x51, %al
jne 0xaa72
movq 0x587f4(%rip), %rcx # 0x63250
leaq 0x34127(%rip), %rdi # 0x3eb8a
movl $0x4, %esi
movl $0x1, %edx
callq 0x6350
movq %rbx, %rdi
callq 0x29f62
testl %eax, %eax
je 0xab34
movq 0x587c7(%rip), %r14 # 0x63250
movq %rbx, %rdi
callq 0x29f6e
movapd 0x33577(%rip), %xmm1 # 0x3e010
andpd %xmm0, %xmm1
ucomisd 0x3369b(%rip), %xmm1 # 0x3e140
movabsq $-0x3333333333333333, %r13 # imm = 0xCCCCCCCCCCCCCCCD
movabsq $0x1999999999999999, %r15 # imm = 0x1999999999999999
movabsq $0x3333333333333332, %r12 # imm = 0x3333333333333332
jbe 0xaade
cvttsd2si %xmm0, %rax
imulq %r13, %rax
addq %r15, %rax
cmpq %r12, %rax
ja 0xaade
addsd 0x3366a(%rip), %xmm0 # 0x3e148
movapd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x29f74
movapd %xmm0, %xmm1
movapd 0x33519(%rip), %xmm0 # 0x3e010
andpd %xmm1, %xmm0
ucomisd 0x3363d(%rip), %xmm0 # 0x3e140
jbe 0xab1e
cvttsd2si %xmm1, %rax
imulq %r13, %rax
addq %r15, %rax
cmpq %r12, %rax
ja 0xab1e
addsd 0x3362a(%rip), %xmm1 # 0x3e148
leaq 0x33ee6(%rip), %rsi # 0x3ea0b
movq %r14, %rdi
movapd (%rsp), %xmm0
movb $0x2, %al
callq 0x6290
movq %rbx, %rdi
callq 0x29f5c
testl %eax, %eax
je 0xabad
movq 0x58709(%rip), %r14 # 0x63250
movq %rbx, %rdi
callq 0x29f68
movapd 0x334b9(%rip), %xmm1 # 0x3e010
andpd %xmm0, %xmm1
ucomisd 0x335dd(%rip), %xmm1 # 0x3e140
jbe 0xab9c
cvttsd2si %xmm0, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rcx
movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999
addq %rcx, %rax
movabsq $0x3333333333333332, %rcx # imm = 0x3333333333333332
cmpq %rcx, %rax
ja 0xab9c
addsd 0x335ac(%rip), %xmm0 # 0x3e148
leaq 0x3404d(%rip), %rsi # 0x3ebf0
movq %r14, %rdi
movb $0x1, %al
callq 0x6290
movq %rbx, %rdi
callq 0x29f7a
testl %eax, %eax
je 0xabdc
movq 0x58690(%rip), %r14 # 0x63250
movq %rbx, %rdi
callq 0x29f4c
leaq 0x34110(%rip), %rsi # 0x3ecdf
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6290
movq 0x5866d(%rip), %rsi # 0x63250
movl $0xa, %edi
callq 0x6240
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _Z4propN12LefDefParser18defrCallbackType_eEPNS_8defiPropEPv:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r14, rdx
mov rbx, rsi
cmp edi, 68h ; 'h'
jb short loc_A82F
mov rcx, cs:fout
lea rdi, aErrorCallbackT; "ERROR: callback type is out of bounds!"...
mov esi, 27h ; '''
mov edx, 1
call _fwrite
loc_A82F:
cmp cs:userData, r14
jz short loc_A855
mov rcx, cs:fout
lea rdi, aErrorReturnedU; "ERROR: returned user data is not correc"...
mov esi, 2Ah ; '*'
mov edx, 1
call _fwrite
loc_A855:
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
lea rsi, aEndDesign_0+4; "design"
mov rdi, rax
call _strcmp
test eax, eax
jz loc_A969
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
lea rsi, aOneNet+4; "net"
mov rdi, rax
call _strcmp
test eax, eax
jz loc_A972
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
lea rsi, aComponent; "component"
mov rdi, rax
call _strcmp
test eax, eax
jz loc_A97B
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
lea rsi, aSpecialnet; "specialnet"
mov rdi, rax
call _strcmp
test eax, eax
jz loc_A984
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
lea rsi, aStartGroup+6; "group"
mov rdi, rax
call _strcmp
test eax, eax
jz loc_A98D
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
lea rsi, aRow; "row"
mov rdi, rax
call _strcmp
test eax, eax
jz loc_A996
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
lea rsi, aComponentpin; "componentpin"
mov rdi, rax
call _strcmp
test eax, eax
jz short loc_A99F
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
lea rsi, aCompRegion+5; "region"
mov rdi, rax
call _strcmp
test eax, eax
jz short loc_A9A8
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
lea rsi, aNondefaultrule; "nondefaultrule"
mov rdi, rax
call _strcmp
test eax, eax
jnz short loc_A9CE
lea r14, aPropdefNondefa; "PROPDEF NONDEFAULTRULE %s "
jmp short loc_A9AF
loc_A969:
lea r14, aPropdefDesignS; "PROPDEF DESIGN %s "
jmp short loc_A9AF
loc_A972:
lea r14, aPropdefNetS; "PROPDEF NET %s "
jmp short loc_A9AF
loc_A97B:
lea r14, aPropdefCompS; "PROPDEF COMP %s "
jmp short loc_A9AF
loc_A984:
lea r14, aPropdefSnetS; "PROPDEF SNET %s "
jmp short loc_A9AF
loc_A98D:
lea r14, aPropdefGroupS; "PROPDEF GROUP %s "
jmp short loc_A9AF
loc_A996:
lea r14, aPropdefRowS; "PROPDEF ROW %s "
jmp short loc_A9AF
loc_A99F:
lea r14, aPropdefComppin; "PROPDEF COMPPIN %s "
jmp short loc_A9AF
loc_A9A8:
lea r14, aPropdefRegionS; "PROPDEF REGION %s "
loc_A9AF:
mov r15, cs:fout
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8propNameEv; LefDefParser::defiProp::propName(void)
mov rdi, r15
mov rsi, r14
mov rdx, rax
xor eax, eax
call _fprintf
loc_A9CE:
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8dataTypeEv; LefDefParser::defiProp::dataType(void)
cmp al, 49h ; 'I'
jnz short loc_A9F7
mov rcx, cs:fout
lea rdi, aInt; "INT "
mov esi, 4
mov edx, 1
call _fwrite
loc_A9F7:
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8dataTypeEv; LefDefParser::defiProp::dataType(void)
cmp al, 52h ; 'R'
jnz short loc_AA20
mov rcx, cs:fout
lea rdi, aReal; "REAL "
mov esi, 5
mov edx, 1
call _fwrite
loc_AA20:
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8dataTypeEv; LefDefParser::defiProp::dataType(void)
cmp al, 53h ; 'S'
jnz short loc_AA49
mov rcx, cs:fout
lea rdi, aAssrtConstr+9; "STR "
mov esi, 4
mov edx, 1
call _fwrite
loc_AA49:
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8dataTypeEv; LefDefParser::defiProp::dataType(void)
cmp al, 51h ; 'Q'
jnz short loc_AA72
mov rcx, cs:fout
lea rdi, aAssrtConstr+9; "STR "
mov esi, 4
mov edx, 1
call _fwrite
loc_AA72:
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp8hasRangeEv; LefDefParser::defiProp::hasRange(void)
test eax, eax
jz loc_AB34
mov r14, cs:fout
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp4leftEv; LefDefParser::defiProp::left(void)
movapd xmm1, cs:xmmword_3E010
andpd xmm1, xmm0
ucomisd xmm1, cs:qword_3E140
mov r13, 0CCCCCCCCCCCCCCCDh
mov r15, 1999999999999999h
mov r12, 3333333333333332h
jbe short loc_AADE
cvttsd2si rax, xmm0
imul rax, r13
add rax, r15
cmp rax, r12
ja short loc_AADE
addsd xmm0, cs:qword_3E148
loc_AADE:
movapd [rsp+38h+var_38], xmm0
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp5rightEv; LefDefParser::defiProp::right(void)
movapd xmm1, xmm0
movapd xmm0, cs:xmmword_3E010
andpd xmm0, xmm1
ucomisd xmm0, cs:qword_3E140
jbe short loc_AB1E
cvttsd2si rax, xmm1
imul rax, r13
add rax, r15
cmp rax, r12
ja short loc_AB1E
addsd xmm1, cs:qword_3E148
loc_AB1E:
lea rsi, aSpacingSGRange+0Fh; "RANGE %g %g "
mov rdi, r14
movapd xmm0, [rsp+38h+var_38]
mov al, 2
call _fprintf
loc_AB34:
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp9hasNumberEv; LefDefParser::defiProp::hasNumber(void)
test eax, eax
jz short loc_ABAD
mov r14, cs:fout
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp6numberEv; LefDefParser::defiProp::number(void)
movapd xmm1, cs:xmmword_3E010
andpd xmm1, xmm0
ucomisd xmm1, cs:qword_3E140
jbe short loc_AB9C
cvttsd2si rax, xmm0
mov rcx, 0CCCCCCCCCCCCCCCDh
imul rcx, rax
mov rax, 1999999999999999h
add rax, rcx
mov rcx, 3333333333333332h
cmp rax, rcx
ja short loc_AB9C
addsd xmm0, cs:qword_3E148
loc_AB9C:
lea rsi, aRiseminG+9; "%g "
mov rdi, r14
mov al, 1
call _fprintf
loc_ABAD:
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp9hasStringEv; LefDefParser::defiProp::hasString(void)
test eax, eax
jz short loc_ABDC
mov r14, cs:fout
mov rdi, rbx; this
call _ZNK12LefDefParser8defiProp6stringEv; LefDefParser::defiProp::string(void)
lea rsi, aS; "\"%s\" "
mov rdi, r14
mov rdx, rax
xor eax, eax
call _fprintf
loc_ABDC:
mov rsi, cs:fout
mov edi, 0Ah
call _fputc
xor eax, eax
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long prop(unsigned int a1, LefDefParser::defiProp *a2, long long a3, double a4)
{
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
const char *v14; // r14
long long v15; // r15
long long v16; // rax
long long v17; // r14
double v18; // xmm1_8
long long v19; // r14
long long v20; // r14
const char *v21; // rax
if ( a1 >= 0x68 )
fwrite("ERROR: callback type is out of bounds!\n", 39LL, 1LL, fout);
if ( userData != a3 )
fwrite("ERROR: returned user data is not correct!\n", 42LL, 1LL, fout);
v5 = LefDefParser::defiProp::propType(a2);
if ( !(unsigned int)strcmp(v5, "design") )
{
v14 = "PROPDEF DESIGN %s ";
}
else
{
v6 = LefDefParser::defiProp::propType(a2);
if ( !(unsigned int)strcmp(v6, "net") )
{
v14 = "PROPDEF NET %s ";
}
else
{
v7 = LefDefParser::defiProp::propType(a2);
if ( !(unsigned int)strcmp(v7, "component") )
{
v14 = "PROPDEF COMP %s ";
}
else
{
v8 = LefDefParser::defiProp::propType(a2);
if ( !(unsigned int)strcmp(v8, "specialnet") )
{
v14 = "PROPDEF SNET %s ";
}
else
{
v9 = LefDefParser::defiProp::propType(a2);
if ( !(unsigned int)strcmp(v9, "group") )
{
v14 = "PROPDEF GROUP %s ";
}
else
{
v10 = LefDefParser::defiProp::propType(a2);
if ( !(unsigned int)strcmp(v10, "row") )
{
v14 = "PROPDEF ROW %s ";
}
else
{
v11 = LefDefParser::defiProp::propType(a2);
if ( !(unsigned int)strcmp(v11, "componentpin") )
{
v14 = "PROPDEF COMPPIN %s ";
}
else
{
v12 = LefDefParser::defiProp::propType(a2);
if ( !(unsigned int)strcmp(v12, "region") )
{
v14 = "PROPDEF REGION %s ";
}
else
{
v13 = LefDefParser::defiProp::propType(a2);
if ( (unsigned int)strcmp(v13, "nondefaultrule") )
goto LABEL_24;
v14 = "PROPDEF NONDEFAULTRULE %s ";
}
}
}
}
}
}
}
}
v15 = fout;
v16 = LefDefParser::defiProp::propName(a2);
fprintf(v15, v14, v16);
LABEL_24:
if ( (unsigned __int8)LefDefParser::defiProp::dataType(a2) == 73 )
fwrite("INT ", 4LL, 1LL, fout);
if ( (unsigned __int8)LefDefParser::defiProp::dataType(a2) == 82 )
fwrite("REAL ", 5LL, 1LL, fout);
if ( (unsigned __int8)LefDefParser::defiProp::dataType(a2) == 83 )
fwrite("STR ", 4LL, 1LL, fout);
if ( (unsigned __int8)LefDefParser::defiProp::dataType(a2) == 81 )
fwrite("STR ", 4LL, 1LL, fout);
if ( (unsigned int)LefDefParser::defiProp::hasRange(a2) )
{
v17 = fout;
LefDefParser::defiProp::left(a2);
if ( fabs(a4) > 1000004.0
&& 0x1999999999999999LL - 0x3333333333333333LL * (unsigned long long)(unsigned int)(int)a4 <= 0x3333333333333332LL )
{
a4 = a4 + 3.0;
}
LefDefParser::defiProp::right(a2);
v18 = a4;
if ( fabs(a4) > 1000004.0
&& 0x1999999999999999LL - 0x3333333333333333LL * (unsigned long long)(unsigned int)(int)a4 <= 0x3333333333333332LL )
{
v18 = a4 + 3.0;
}
fprintf(v17, "RANGE %g %g ", a4, v18);
}
if ( (unsigned int)LefDefParser::defiProp::hasNumber(a2) )
{
v19 = fout;
LefDefParser::defiProp::number(a2);
if ( fabs(a4) > 1000004.0
&& 0xCCCCCCCCCCCCCCCDLL * (unsigned int)(int)a4 + 0x1999999999999999LL <= 0x3333333333333332LL )
{
a4 = a4 + 3.0;
}
fprintf(v19, "%g ", a4);
}
if ( (unsigned int)LefDefParser::defiProp::hasString(a2) )
{
v20 = fout;
v21 = (const char *)LefDefParser::defiProp::string(a2);
fprintf(v20, "\"%s\" ", v21);
}
fputc(10LL, fout);
return 0LL;
}
| prop:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV RBX,RSI
CMP EDI,0x68
JC 0x0010a82f
MOV RCX,qword ptr [0x00163250]
LEA RDI,[0x13e48f]
MOV ESI,0x27
MOV EDX,0x1
CALL 0x00106350
LAB_0010a82f:
CMP qword ptr [0x00163258],R14
JZ 0x0010a855
MOV RCX,qword ptr [0x00163250]
LEA RDI,[0x13e464]
MOV ESI,0x2a
MOV EDX,0x1
CALL 0x00106350
LAB_0010a855:
MOV RDI,RBX
CALL 0x00129f52
LEA RSI,[0x1477cd]
MOV RDI,RAX
CALL 0x00106280
TEST EAX,EAX
JZ 0x0010a969
MOV RDI,RBX
CALL 0x00129f52
LEA RSI,[0x147e01]
MOV RDI,RAX
CALL 0x00106280
TEST EAX,EAX
JZ 0x0010a972
MOV RDI,RBX
CALL 0x00129f52
LEA RSI,[0x13ec24]
MOV RDI,RAX
CALL 0x00106280
TEST EAX,EAX
JZ 0x0010a97b
MOV RDI,RBX
CALL 0x00129f52
LEA RSI,[0x13ec3f]
MOV RDI,RAX
CALL 0x00106280
TEST EAX,EAX
JZ 0x0010a984
MOV RDI,RBX
CALL 0x00129f52
LEA RSI,[0x148163]
MOV RDI,RAX
CALL 0x00106280
TEST EAX,EAX
JZ 0x0010a98d
MOV RDI,RBX
CALL 0x00129f52
LEA RSI,[0x13ec6d]
MOV RDI,RAX
CALL 0x00106280
TEST EAX,EAX
JZ 0x0010a996
MOV RDI,RBX
CALL 0x00129f52
LEA RSI,[0x13ec81]
MOV RDI,RAX
CALL 0x00106280
TEST EAX,EAX
JZ 0x0010a99f
MOV RDI,RBX
CALL 0x00129f52
LEA RSI,[0x147d25]
MOV RDI,RAX
CALL 0x00106280
TEST EAX,EAX
JZ 0x0010a9a8
MOV RDI,RBX
CALL 0x00129f52
LEA RSI,[0x13ecb5]
MOV RDI,RAX
CALL 0x00106280
TEST EAX,EAX
JNZ 0x0010a9ce
LEA R14,[0x13ecc4]
JMP 0x0010a9af
LAB_0010a969:
LEA R14,[0x13ec01]
JMP 0x0010a9af
LAB_0010a972:
LEA R14,[0x13ec14]
JMP 0x0010a9af
LAB_0010a97b:
LEA R14,[0x13ec2e]
JMP 0x0010a9af
LAB_0010a984:
LEA R14,[0x13ec4a]
JMP 0x0010a9af
LAB_0010a98d:
LEA R14,[0x13ec5b]
JMP 0x0010a9af
LAB_0010a996:
LEA R14,[0x13ec71]
JMP 0x0010a9af
LAB_0010a99f:
LEA R14,[0x13ec8e]
JMP 0x0010a9af
LAB_0010a9a8:
LEA R14,[0x13eca2]
LAB_0010a9af:
MOV R15,qword ptr [0x00163250]
MOV RDI,RBX
CALL 0x00129f88
MOV RDI,R15
MOV RSI,R14
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00106290
LAB_0010a9ce:
MOV RDI,RBX
CALL 0x00129f8e
CMP AL,0x49
JNZ 0x0010a9f7
MOV RCX,qword ptr [0x00163250]
LEA RDI,[0x13e62c]
MOV ESI,0x4
MOV EDX,0x1
CALL 0x00106350
LAB_0010a9f7:
MOV RDI,RBX
CALL 0x00129f8e
CMP AL,0x52
JNZ 0x0010aa20
MOV RCX,qword ptr [0x00163250]
LEA RDI,[0x13e626]
MOV ESI,0x5
MOV EDX,0x1
CALL 0x00106350
LAB_0010aa20:
MOV RDI,RBX
CALL 0x00129f8e
CMP AL,0x53
JNZ 0x0010aa49
MOV RCX,qword ptr [0x00163250]
LEA RDI,[0x13eb8a]
MOV ESI,0x4
MOV EDX,0x1
CALL 0x00106350
LAB_0010aa49:
MOV RDI,RBX
CALL 0x00129f8e
CMP AL,0x51
JNZ 0x0010aa72
MOV RCX,qword ptr [0x00163250]
LEA RDI,[0x13eb8a]
MOV ESI,0x4
MOV EDX,0x1
CALL 0x00106350
LAB_0010aa72:
MOV RDI,RBX
CALL 0x00129f62
TEST EAX,EAX
JZ 0x0010ab34
MOV R14,qword ptr [0x00163250]
MOV RDI,RBX
CALL 0x00129f6e
MOVAPD XMM1,xmmword ptr [0x0013e010]
ANDPD XMM1,XMM0
UCOMISD XMM1,qword ptr [0x0013e140]
MOV R13,-0x3333333333333333
MOV R15,0x1999999999999999
MOV R12,0x3333333333333332
JBE 0x0010aade
CVTTSD2SI RAX,XMM0
IMUL RAX,R13
ADD RAX,R15
CMP RAX,R12
JA 0x0010aade
ADDSD XMM0,qword ptr [0x0013e148]
LAB_0010aade:
MOVAPD xmmword ptr [RSP],XMM0
MOV RDI,RBX
CALL 0x00129f74
MOVAPD XMM1,XMM0
MOVAPD XMM0,xmmword ptr [0x0013e010]
ANDPD XMM0,XMM1
UCOMISD XMM0,qword ptr [0x0013e140]
JBE 0x0010ab1e
CVTTSD2SI RAX,XMM1
IMUL RAX,R13
ADD RAX,R15
CMP RAX,R12
JA 0x0010ab1e
ADDSD XMM1,qword ptr [0x0013e148]
LAB_0010ab1e:
LEA RSI,[0x13ea0b]
MOV RDI,R14
MOVAPD XMM0,xmmword ptr [RSP]
MOV AL,0x2
CALL 0x00106290
LAB_0010ab34:
MOV RDI,RBX
CALL 0x00129f5c
TEST EAX,EAX
JZ 0x0010abad
MOV R14,qword ptr [0x00163250]
MOV RDI,RBX
CALL 0x00129f68
MOVAPD XMM1,xmmword ptr [0x0013e010]
ANDPD XMM1,XMM0
UCOMISD XMM1,qword ptr [0x0013e140]
JBE 0x0010ab9c
CVTTSD2SI RAX,XMM0
MOV RCX,-0x3333333333333333
IMUL RCX,RAX
MOV RAX,0x1999999999999999
ADD RAX,RCX
MOV RCX,0x3333333333333332
CMP RAX,RCX
JA 0x0010ab9c
ADDSD XMM0,qword ptr [0x0013e148]
LAB_0010ab9c:
LEA RSI,[0x13ebf0]
MOV RDI,R14
MOV AL,0x1
CALL 0x00106290
LAB_0010abad:
MOV RDI,RBX
CALL 0x00129f7a
TEST EAX,EAX
JZ 0x0010abdc
MOV R14,qword ptr [0x00163250]
MOV RDI,RBX
CALL 0x00129f4c
LEA RSI,[0x13ecdf]
MOV RDI,R14
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00106290
LAB_0010abdc:
MOV RSI,qword ptr [0x00163250]
MOV EDI,0xa
CALL 0x00106240
XOR EAX,EAX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* prop(LefDefParser::defrCallbackType_e, LefDefParser::defiProp*, void*) */
int8 prop(uint param_1,defiProp *param_2,long param_3)
{
FILE *pFVar1;
char cVar2;
int iVar3;
char *pcVar4;
int8 uVar5;
double dVar6;
double dVar7;
if (0x67 < param_1) {
fwrite("ERROR: callback type is out of bounds!\n",0x27,1,fout);
}
if (userData != param_3) {
fwrite("ERROR: returned user data is not correct!\n",0x2a,1,fout);
}
pcVar4 = (char *)LefDefParser::defiProp::propType(param_2);
iVar3 = strcmp(pcVar4,"design");
if (iVar3 == 0) {
pcVar4 = "PROPDEF DESIGN %s ";
}
else {
pcVar4 = (char *)LefDefParser::defiProp::propType(param_2);
iVar3 = strcmp(pcVar4,"net");
if (iVar3 == 0) {
pcVar4 = "PROPDEF NET %s ";
}
else {
pcVar4 = (char *)LefDefParser::defiProp::propType(param_2);
iVar3 = strcmp(pcVar4,"component");
if (iVar3 == 0) {
pcVar4 = "PROPDEF COMP %s ";
}
else {
pcVar4 = (char *)LefDefParser::defiProp::propType(param_2);
iVar3 = strcmp(pcVar4,"specialnet");
if (iVar3 == 0) {
pcVar4 = "PROPDEF SNET %s ";
}
else {
pcVar4 = (char *)LefDefParser::defiProp::propType(param_2);
iVar3 = strcmp(pcVar4,"group");
if (iVar3 == 0) {
pcVar4 = "PROPDEF GROUP %s ";
}
else {
pcVar4 = (char *)LefDefParser::defiProp::propType(param_2);
iVar3 = strcmp(pcVar4,"row");
if (iVar3 == 0) {
pcVar4 = "PROPDEF ROW %s ";
}
else {
pcVar4 = (char *)LefDefParser::defiProp::propType(param_2);
iVar3 = strcmp(pcVar4,"componentpin");
if (iVar3 == 0) {
pcVar4 = "PROPDEF COMPPIN %s ";
}
else {
pcVar4 = (char *)LefDefParser::defiProp::propType(param_2);
iVar3 = strcmp(pcVar4,"region");
if (iVar3 == 0) {
pcVar4 = "PROPDEF REGION %s ";
}
else {
pcVar4 = (char *)LefDefParser::defiProp::propType(param_2);
iVar3 = strcmp(pcVar4,"nondefaultrule");
if (iVar3 != 0) goto LAB_0010a9ce;
pcVar4 = "PROPDEF NONDEFAULTRULE %s ";
}
}
}
}
}
}
}
}
pFVar1 = fout;
uVar5 = LefDefParser::defiProp::propName(param_2);
fprintf(pFVar1,pcVar4,uVar5);
LAB_0010a9ce:
cVar2 = LefDefParser::defiProp::dataType(param_2);
if (cVar2 == 'I') {
fwrite(&DAT_0013e62c,4,1,fout);
}
cVar2 = LefDefParser::defiProp::dataType(param_2);
if (cVar2 == 'R') {
fwrite("REAL ",5,1,fout);
}
cVar2 = LefDefParser::defiProp::dataType(param_2);
if (cVar2 == 'S') {
fwrite("STR ",4,1,fout);
}
cVar2 = LefDefParser::defiProp::dataType(param_2);
if (cVar2 == 'Q') {
fwrite("STR ",4,1,fout);
}
iVar3 = LefDefParser::defiProp::hasRange(param_2);
pFVar1 = fout;
if (iVar3 != 0) {
dVar6 = (double)LefDefParser::defiProp::left(param_2);
if ((_DAT_0013e140 < (double)(_DAT_0013e010 & (ulong)dVar6)) &&
((long)dVar6 * -0x3333333333333333 + 0x1999999999999999U < 0x3333333333333333)) {
dVar6 = dVar6 + _DAT_0013e148;
}
dVar7 = (double)LefDefParser::defiProp::right(param_2);
if ((_DAT_0013e140 < (double)(_DAT_0013e010 & (ulong)dVar7)) &&
((long)dVar7 * -0x3333333333333333 + 0x1999999999999999U < 0x3333333333333333)) {
dVar7 = dVar7 + _DAT_0013e148;
}
fprintf(pFVar1,"RANGE %g %g ",dVar6,dVar7);
}
iVar3 = LefDefParser::defiProp::hasNumber(param_2);
pFVar1 = fout;
if (iVar3 != 0) {
dVar6 = (double)LefDefParser::defiProp::number(param_2);
if ((_DAT_0013e140 < (double)(_DAT_0013e010 & (ulong)dVar6)) &&
((long)dVar6 * -0x3333333333333333 + 0x1999999999999999U < 0x3333333333333333)) {
dVar6 = dVar6 + _DAT_0013e148;
}
fprintf(pFVar1,"%g ",dVar6);
}
iVar3 = LefDefParser::defiProp::hasString(param_2);
pFVar1 = fout;
if (iVar3 != 0) {
uVar5 = LefDefParser::defiProp::string(param_2);
fprintf(pFVar1,"\"%s\" ",uVar5);
}
fputc(10,fout);
return 0;
}
| |
44,631 | LefDefParser::lefiViaLayer::yl(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp | double
lefiViaLayer::yl(int index)
{
char msg[160];
if (index < 0 || index >= numRects_) {
sprintf(msg, "ERROR (LEFPARS-1420): The index number %d given for the VIA LAYER RECTANGLE is invalid.\nValid index is from 0 to %d", index, numRects_);
lefiError(0, 1420, msg);
return 0;
}
return yl_[index];
} | O0 | cpp | LefDefParser::lefiViaLayer::yl(int):
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x149ce
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0x18(%rcx), %eax
jl 0x14a0f
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0x18(%rax), %ecx
leaq 0x7da11(%rip), %rsi # 0x923fa
movb $0x0, %al
callq 0x2050
leaq 0x10(%rsp), %rdx
xorl %edi, %edi
movl $0x58c, %esi # imm = 0x58C
callq 0x59060
xorps %xmm0, %xmm0
movsd %xmm0, 0xc0(%rsp)
jmp 0x14a2e
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0xb4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0xc0(%rsp), %xmm0
addq $0xc8, %rsp
retq
nop
| _ZN12LefDefParser12lefiViaLayer2ylEi:
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_149CE
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+18h]
jl short loc_14A0F
loc_149CE:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+18h]
lea rsi, aErrorLefpars14; "ERROR (LEFPARS-1420): The index number "...
mov al, 0
call _sprintf
lea rdx, [rsp+0C8h+var_B8]; int
xor edi, edi; this
mov esi, 58Ch; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
xorps xmm0, xmm0
movsd [rsp+0C8h+var_8], xmm0
jmp short loc_14A2E
loc_14A0F:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+28h]
movsxd rcx, [rsp+0C8h+var_14]
movsd xmm0, qword ptr [rax+rcx*8]
movsd [rsp+0C8h+var_8], xmm0
loc_14A2E:
movsd xmm0, [rsp+0C8h+var_8]
add rsp, 0C8h
retn
| double LefDefParser::lefiViaLayer::yl(LefDefParser::lefiViaLayer *this, int a2)
{
const char *v2; // rcx
int v4[41]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::lefiViaLayer *v6; // [rsp+B8h] [rbp-10h]
v6 = this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 6) )
return *(double *)(*((_QWORD *)this + 5) + 8LL * v5);
sprintf(
v4,
"ERROR (LEFPARS-1420): The index number %d given for the VIA LAYER RECTANGLE is invalid.\n"
"Valid index is from 0 to %d",
v5,
*((_DWORD *)this + 6));
LefDefParser::lefiError(0LL, 1420, (int)v4, v2);
return 0.0;
}
| yl:
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 0x001149ce
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0x18]
JL 0x00114a0f
LAB_001149ce:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0x18]
LEA RSI,[0x1923fa]
MOV AL,0x0
CALL 0x00102050
LEA RDX,[RSP + 0x10]
XOR EDI,EDI
MOV ESI,0x58c
CALL 0x00159060
XORPS XMM0,XMM0
MOVSD qword ptr [RSP + 0xc0],XMM0
JMP 0x00114a2e
LAB_00114a0f:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOVSXD RCX,dword ptr [RSP + 0xb4]
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
MOVSD qword ptr [RSP + 0xc0],XMM0
LAB_00114a2e:
MOVSD XMM0,qword ptr [RSP + 0xc0]
ADD RSP,0xc8
RET
|
/* LefDefParser::lefiViaLayer::yl(int) */
int8 __thiscall LefDefParser::lefiViaLayer::yl(lefiViaLayer *this,int param_1)
{
char local_b8 [164];
int local_14;
lefiViaLayer *local_10;
int8 local_8;
if ((param_1 < 0) || (*(int *)(this + 0x18) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (LEFPARS-1420): The index number %d given for the VIA LAYER RECTANGLE is invalid.\nValid index is from 0 to %d"
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x18));
lefiError(0,0x58c,local_b8);
local_8 = 0;
}
else {
local_8 = *(int8 *)(*(long *)(this + 0x28) + (long)param_1 * 8);
}
return local_8;
}
| |
44,632 | LefDefParser::lefiViaLayer::yl(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp | double
lefiViaLayer::yl(int index)
{
char msg[160];
if (index < 0 || index >= numRects_) {
sprintf(msg, "ERROR (LEFPARS-1420): The index number %d given for the VIA LAYER RECTANGLE is invalid.\nValid index is from 0 to %d", index, numRects_);
lefiError(0, 1420, msg);
return 0;
}
return yl_[index];
} | O3 | cpp | LefDefParser::lefiViaLayer::yl(int):
movl %esi, %edx
testl %esi, %esi
setns %al
movl 0x18(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0xe5ab
movq 0x28(%rdi), %rax
movl %edx, %ecx
movsd (%rax,%rcx,8), %xmm0
retq
pushq %rbx
subq $0xa0, %rsp
leaq 0x4be28(%rip), %rsi # 0x5a3e2
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
movl $0x58c, %esi # imm = 0x58C
movq %rbx, %rdx
callq 0x33d78
xorps %xmm0, %xmm0
addq $0xa0, %rsp
popq %rbx
retq
| _ZN12LefDefParser12lefiViaLayer2ylEi:
mov edx, esi
test esi, esi
setns al
mov ecx, [rdi+18h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_E5AB
mov rax, [rdi+28h]
mov ecx, edx
movsd xmm0, qword ptr [rax+rcx*8]
retn
loc_E5AB:
push rbx
sub rsp, 0A0h
lea rsi, aErrorLefpars14; "ERROR (LEFPARS-1420): The index number "...
mov rbx, rsp
mov rdi, rbx
xor eax, eax
call _sprintf
xor edi, edi; this
mov esi, 58Ch; int
mov rdx, rbx; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
xorps xmm0, xmm0
add rsp, 0A0h
pop rbx
retn
| double LefDefParser::lefiViaLayer::yl(LefDefParser::lefiViaLayer *this, unsigned int a2)
{
const char *v3; // rcx
_BYTE v4[168]; // [rsp-A8h] [rbp-A8h] BYREF
if ( *((_DWORD *)this + 6) > (int)a2 && (a2 & 0x80000000) == 0 )
return *(double *)(*((_QWORD *)this + 5) + 8LL * a2);
sprintf(
v4,
"ERROR (LEFPARS-1420): The index number %d given for the VIA LAYER RECTANGLE is invalid.\n"
"Valid index is from 0 to %d",
a2);
LefDefParser::lefiError(0LL, 1420, (int)v4, v3);
return 0.0;
}
| yl:
MOV EDX,ESI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x18]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0010e5ab
MOV RAX,qword ptr [RDI + 0x28]
MOV ECX,EDX
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
RET
LAB_0010e5ab:
PUSH RBX
SUB RSP,0xa0
LEA RSI,[0x15a3e2]
MOV RBX,RSP
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00102050
XOR EDI,EDI
MOV ESI,0x58c
MOV RDX,RBX
CALL 0x00133d78
XORPS XMM0,XMM0
ADD RSP,0xa0
POP RBX
RET
|
/* LefDefParser::lefiViaLayer::yl(int) */
int8 __thiscall LefDefParser::lefiViaLayer::yl(lefiViaLayer *this,int param_1)
{
char acStack_a8 [160];
if (-1 < param_1 && param_1 < *(int *)(this + 0x18)) {
return *(int8 *)(*(long *)(this + 0x28) + (ulong)(uint)param_1 * 8);
}
sprintf(acStack_a8,
"ERROR (LEFPARS-1420): The index number %d given for the VIA LAYER RECTANGLE is invalid.\nValid index is from 0 to %d"
);
lefiError(0,0x58c,acStack_a8);
return 0;
}
| |
44,633 | my_fstat | eloqsql/mysys/my_lib.c | int my_fstat(File Filedes, MY_STAT *stat_area,
myf MyFlags __attribute__((unused)))
{
DBUG_ENTER("my_fstat");
DBUG_PRINT("my",("fd: %d MyFlags: %lu", Filedes, MyFlags));
#ifdef _WIN32
DBUG_RETURN(my_win_fstat(Filedes, stat_area));
#elif defined HAVE_valgrind
{
int s= fstat(Filedes, stat_area);
if (!s)
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(s);
}
#else
DBUG_RETURN(fstat(Filedes, (struct stat *) stat_area));
#endif
} | O3 | c | my_fstat:
pushq %rbp
movq %rsp, %rbp
popq %rbp
jmp 0x246b0
nopl (%rax)
| my_fstat:
push rbp
mov rbp, rsp
pop rbp
jmp _fstat64
| long long my_fstat()
{
return fstat64();
}
| my_fstat:
PUSH RBP
MOV RBP,RSP
POP RBP
JMP 0x001246b0
|
void my_fstat(int param_1,stat64 *param_2)
{
fstat64(param_1,param_2);
return;
}
| |
44,634 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const | monkey531[P]llama/common/minja.hpp | T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
} | O0 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const:
subq $0xb8, %rsp
movq %rcx, 0x18(%rsp)
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq 0xa8(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movq 0xa0(%rsp), %rsi
callq 0x134590
testb $0x1, %al
jne 0x177908
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x5b030
jmp 0x17796c
movq 0xa0(%rsp), %rsi
leaq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x11c6f0
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x1743a0
movq %rax, 0x10(%rsp)
jmp 0x177935
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x116ec0
jmp 0x177946
leaq 0x48(%rsp), %rdi
callq 0x114f80
jmp 0x17796c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x114f80
jmp 0x177979
movq 0x28(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x5abd0
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_:
sub rsp, 0B8h
mov qword ptr [rsp+0B8h+var_A0], rcx; int
mov qword ptr [rsp+0B8h+var_98], rdi; __int16
mov rax, rdi
mov [rsp+0B8h+var_90], rax; __int64
mov [rsp+0B8h+var_8], rdi
mov qword ptr [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov [rsp+0B8h+var_20], rcx
mov rdi, qword ptr [rsp+0B8h+var_10]
mov [rsp+0B8h+var_88], rdi; char
mov rsi, [rsp+0B8h+var_18]
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, 1
jnz short loc_177908
mov rsi, qword ptr [rsp+0B8h+var_A0]
mov rdi, qword ptr [rsp+0B8h+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&)
jmp short loc_17796C
loc_177908:
mov rsi, [rsp+0B8h+var_18]
lea rdi, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_B0], rdi; int
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, [rsp+0B8h+var_88]; this
mov rsi, [rsp+0B8h+var_B0]; minja::Value *
call _ZNK5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov qword ptr [rsp+0B8h+var_A8], rax; int
jmp short $+2
loc_177935:
mov rsi, qword ptr [rsp+0B8h+var_A8]; int
mov rdi, qword ptr [rsp+0B8h+var_98]; int
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
jmp short $+2
loc_177946:
lea rdi, [rsp+0B8h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_17796C
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_40]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_177979
loc_17796C:
mov rax, [rsp+0B8h+var_90]
add rsp, 0B8h
retn
loc_177979:
mov rdi, [rsp+arg_38]
call __Unwind_Resume
| void * minja::Value::get<std::string>(void *a1, minja::Value *a2, long long a3, long long a4)
{
minja::Value *v5; // [rsp+10h] [rbp-A8h]
int v7[20]; // [rsp+48h] [rbp-70h] BYREF
long long v8; // [rsp+98h] [rbp-20h]
long long v9; // [rsp+A0h] [rbp-18h]
char v10[8]; // [rsp+A8h] [rbp-10h]
void *v11; // [rsp+B0h] [rbp-8h]
v11 = a1;
*(_QWORD *)v10 = a2;
v9 = a3;
v8 = a4;
if ( minja::Value::contains((long long)a2, a3) )
{
minja::Value::Value((long long)v7, v9);
v5 = (minja::Value *)minja::Value::at(a2, (const minja::Value *)v7);
minja::Value::get<std::string>(a1, v5);
minja::Value::~Value((minja::Value *)v7);
}
else
{
std::string::basic_string(a1, a4);
}
return a1;
}
| |||
44,635 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const | monkey531[P]llama/common/minja.hpp | T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> minja::Value::get<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x93ebe
testb %al, %al
je 0xaee90
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x8aa5e
movq %r15, %rdi
movq %r14, %rsi
callq 0x93a60
movq %rbx, %rdi
movq %rax, %rsi
callq 0x87b70
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59184
movq %r14, %rdi
callq 0x5e672
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0xaee51
callq 0x6e096
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xaee60
callq 0x6e096
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xaee6f
callq 0x6e096
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xaeee4
movq 0x7d108(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0xaeecf
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xaeed9
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0xaeeaf
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0xaeeb5
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
jmp 0xaeee4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xaeee4
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x86a00
movq %rbx, %rdi
callq 0x1afb0
| _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov r14, rcx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
mov rsi, rdx
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz loc_AEE90
lea r14, [rsp+78h+var_70]
mov rdi, r14
mov rsi, r12
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r15; this
mov rsi, r14; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rbx
mov rsi, rax
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
lea r14, [rsp+78h+var_30]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_AEE51
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_AEE51:
mov rdi, [rsp+78h+var_48]
test rdi, rdi
jz short loc_AEE60
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_AEE60:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz short loc_AEE6F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_AEE6F:
mov rdi, [rsp+78h+var_68]
test rdi, rdi
jz short loc_AEEE4
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_AEECF
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_AEED9
loc_AEE90:
lea rcx, [rbx+10h]
mov [rbx], rcx
mov rdx, [r14]
lea rax, [r14+10h]
cmp rdx, rax
jz short loc_AEEAF
mov [rbx], rdx
mov rcx, [rax]
mov [rbx+10h], rcx
jmp short loc_AEEB5
loc_AEEAF:
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rcx], xmm0
loc_AEEB5:
mov rcx, [r14+8]
mov [rbx+8], rcx
mov [r14], rax
mov qword ptr [r14+8], 0
mov byte ptr [r14+10h], 0
jmp short loc_AEEE4
loc_AEECF:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_AEED9:
cmp eax, 1
jnz short loc_AEEE4
mov rax, [rdi]
call qword ptr [rax+18h]
loc_AEEE4:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::get<std::string>(long long a1, minja::Value *a2, long long a3, long long a4)
{
_QWORD *v7; // rax
long long v8; // rdi
signed __int32 v9; // eax
_OWORD *v10; // rax
_BYTE v12[8]; // [rsp+8h] [rbp-70h] BYREF
long long v13; // [rsp+10h] [rbp-68h]
volatile signed __int32 *v14; // [rsp+20h] [rbp-58h]
volatile signed __int32 *v15; // [rsp+30h] [rbp-48h]
volatile signed __int32 *v16; // [rsp+40h] [rbp-38h]
char v17[48]; // [rsp+48h] [rbp-30h] BYREF
if ( minja::Value::contains((long long)a2, a3) )
{
minja::Value::Value((long long)v12, a3);
v7 = (_QWORD *)minja::Value::at(a2, (const minja::Value *)v12);
minja::Value::get<std::string>(a1, v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v17);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v17);
if ( v16 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
v8 = v13;
if ( v13 )
{
if ( _libc_single_threaded )
{
v9 = *(_DWORD *)(v13 + 12);
*(_DWORD *)(v13 + 12) = v9 - 1;
}
else
{
v9 = _InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 12), 0xFFFFFFFF);
}
if ( v9 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL);
}
}
else
{
*(_QWORD *)a1 = a1 + 16;
v10 = (_OWORD *)(a4 + 16);
if ( *(_QWORD *)a4 == a4 + 16 )
{
*(_OWORD *)(a1 + 16) = *v10;
}
else
{
*(_QWORD *)a1 = *(_QWORD *)a4;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v10;
}
*(_QWORD *)(a1 + 8) = *(_QWORD *)(a4 + 8);
*(_QWORD *)a4 = v10;
*(_QWORD *)(a4 + 8) = 0LL;
*(_BYTE *)(a4 + 16) = 0;
}
return a1;
}
| get<std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RCX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV RSI,RDX
CALL 0x00193ebe
TEST AL,AL
JZ 0x001aee90
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV RSI,R12
CALL 0x0018aa5e
LAB_001aee16:
MOV RDI,R15
MOV RSI,R14
CALL 0x00193a60
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00187b70
LAB_001aee2c:
LEA R14,[RSP + 0x48]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159184
MOV RDI,R14
CALL 0x0015e672
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001aee51
CALL 0x0016e096
LAB_001aee51:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001aee60
CALL 0x0016e096
LAB_001aee60:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x001aee6f
CALL 0x0016e096
LAB_001aee6f:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001aeee4
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x001aeecf
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001aeed9
LAB_001aee90:
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
MOV RDX,qword ptr [R14]
LEA RAX,[R14 + 0x10]
CMP RDX,RAX
JZ 0x001aeeaf
MOV qword ptr [RBX],RDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBX + 0x10],RCX
JMP 0x001aeeb5
LAB_001aeeaf:
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_001aeeb5:
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x8],RCX
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x8],0x0
MOV byte ptr [R14 + 0x10],0x0
JMP 0x001aeee4
LAB_001aeecf:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001aeed9:
CMP EAX,0x1
JNZ 0x001aeee4
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001aeee4:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string minja::Value::get<std::__cxx11::string >(std::__cxx11::string const&,
std::__cxx11::string) const */
long * minja::Value::get<std::__cxx11::string>
(long *param_1,Value *param_2,string *param_3,int8 *param_4)
{
long *plVar1;
int *piVar2;
long lVar3;
char cVar4;
int iVar5;
Value local_70 [8];
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
data local_30 [16];
cVar4 = contains(param_2,param_3);
if (cVar4 == '\0') {
*param_1 = (long)(param_1 + 2);
plVar1 = param_4 + 2;
if ((long *)*param_4 == plVar1) {
lVar3 = param_4[3];
param_1[2] = *plVar1;
param_1[3] = lVar3;
}
else {
*param_1 = (long)*param_4;
param_1[2] = *plVar1;
}
param_1[1] = param_4[1];
*param_4 = plVar1;
param_4[1] = 0;
*(int1 *)(param_4 + 2) = 0;
}
else {
Value(local_70,param_3);
/* try { // try from 001aee16 to 001aee2b has its CatchHandler @ 001aeef3 */
at(param_2,local_70);
get<std::__cxx11::string>();
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_30,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_30);
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
piVar2 = (int *)((long)local_68 + 0xc);
iVar5 = *piVar2;
*piVar2 = *piVar2 + -1;
UNLOCK();
}
else {
iVar5 = *(int *)((long)local_68 + 0xc);
*(int *)((long)local_68 + 0xc) = iVar5 + -1;
}
if (iVar5 == 1) {
(**(code **)(*local_68 + 0x18))();
}
}
}
return param_1;
}
| |
44,636 | postprocess_cpu_params(cpu_params&, cpu_params const*) | llama.cpp/common/common.cpp | void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model) {
int32_t n_set = 0;
if (cpuparams.n_threads < 0) {
// Assuming everything about cpuparams is invalid
if (role_model != nullptr) {
cpuparams = *role_model;
} else {
cpuparams.n_threads = cpu_get_num_math();
}
}
for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) {
if (cpuparams.cpumask[i]) {
n_set++;
}
}
if (n_set && n_set < cpuparams.n_threads) {
// Not enough set bits, may experience performance issues.
LOG_WRN("Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", n_set, cpuparams.n_threads);
}
} | O3 | cpp | postprocess_cpu_params(cpu_params&, cpu_params const*):
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jns 0xf5a1a
testq %rsi, %rsi
je 0xf5a13
movl $0x214, %edx # imm = 0x214
movq %rbx, %rdi
callq 0x210e0
jmp 0xf5a1a
callq 0xf5806
movl %eax, (%rbx)
pxor %xmm1, %xmm1
movl $0x4, %eax
pxor %xmm0, %xmm0
movd (%rbx,%rax), %xmm2
punpcklbw %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
punpcklwd %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3]
paddd %xmm2, %xmm0
addq $0x4, %rax
cmpq $0x204, %rax # imm = 0x204
jne 0xf5a27
pshufd $0xee, %xmm0, %xmm1 # xmm1 = xmm0[2,3,2,3]
paddd %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0 # xmm0 = xmm1[1,1,1,1]
paddd %xmm1, %xmm0
movd %xmm0, %ebp
testl %ebp, %ebp
je 0xf5a94
cmpl (%rbx), %ebp
jge 0xf5a94
leaq 0x70e67(%rip), %rax # 0x1668d0
cmpl $0x0, (%rax)
js 0xf5a94
callq 0x10ca47
movl (%rbx), %r8d
leaq 0x304da(%rip), %rdx # 0x125f57
movq %rax, %rdi
movl $0x3, %esi
movl %ebp, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10cae4
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _Z22postprocess_cpu_paramsR10cpu_paramsPKS_:
push rbp
push rbx
push rax
mov rbx, rdi
cmp dword ptr [rdi], 0
jns short loc_F5A1A
test rsi, rsi
jz short loc_F5A13
mov edx, 214h
mov rdi, rbx
call _memcpy
jmp short loc_F5A1A
loc_F5A13:
call _Z16cpu_get_num_mathv; cpu_get_num_math(void)
mov [rbx], eax
loc_F5A1A:
pxor xmm1, xmm1
mov eax, 4
pxor xmm0, xmm0
loc_F5A27:
movd xmm2, dword ptr [rbx+rax]
punpcklbw xmm2, xmm1
punpcklwd xmm2, xmm1
paddd xmm0, xmm2
add rax, 4
cmp rax, 204h
jnz short loc_F5A27
pshufd xmm1, xmm0, 0EEh
paddd xmm1, xmm0
pshufd xmm0, xmm1, 55h ; 'U'
paddd xmm0, xmm1
movd ebp, xmm0
test ebp, ebp
jz short loc_F5A94
cmp ebp, [rbx]
jge short loc_F5A94
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_F5A94
call _Z15common_log_mainv; common_log_main(void)
mov r8d, [rbx]
lea rdx, aNotEnoughSetBi; "Not enough set bits in CPU mask (%d) to"...
mov rdi, rax
mov esi, 3
mov ecx, ebp
xor eax, eax
add rsp, 8
pop rbx
pop rbp
jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_F5A94:
add rsp, 8
pop rbx
pop rbp
retn
| int * postprocess_cpu_params(int *a1, long long a2)
{
int *result; // rax
__m128i v3; // xmm0
__m128i v4; // xmm1
int v5; // ebp
int v6; // eax
int v7; // r9d
if ( *a1 < 0 )
{
if ( a2 )
memcpy(a1, a2, 532LL);
else
*a1 = cpu_get_num_math();
}
result = (_DWORD *)&byte_4;
v3 = 0LL;
do
v3 = _mm_add_epi32(
v3,
_mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_cvtsi32_si128(*(int *)((char *)result++ + (_QWORD)a1)), (__m128i)0LL),
(__m128i)0LL));
while ( result != &dword_204 );
v4 = _mm_add_epi32(_mm_shuffle_epi32(v3, 238), v3);
v5 = _mm_cvtsi128_si32(_mm_add_epi32(_mm_shuffle_epi32(v4, 85), v4));
if ( v5 && v5 < *a1 )
{
result = (int *)&common_log_verbosity_thold;
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
return (int *)common_log_add(
v6,
3,
(unsigned int)"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n",
v5,
*a1,
v7);
}
}
return result;
}
| postprocess_cpu_params:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP dword ptr [RDI],0x0
JNS 0x001f5a1a
TEST RSI,RSI
JZ 0x001f5a13
MOV EDX,0x214
MOV RDI,RBX
CALL 0x001210e0
JMP 0x001f5a1a
LAB_001f5a13:
CALL 0x001f5806
MOV dword ptr [RBX],EAX
LAB_001f5a1a:
PXOR XMM1,XMM1
MOV EAX,0x4
PXOR XMM0,XMM0
LAB_001f5a27:
MOVD XMM2,dword ptr [RBX + RAX*0x1]
PUNPCKLBW XMM2,XMM1
PUNPCKLWD XMM2,XMM1
PADDD XMM0,XMM2
ADD RAX,0x4
CMP RAX,0x204
JNZ 0x001f5a27
PSHUFD XMM1,XMM0,0xee
PADDD XMM1,XMM0
PSHUFD XMM0,XMM1,0x55
PADDD XMM0,XMM1
MOVD EBP,XMM0
TEST EBP,EBP
JZ 0x001f5a94
CMP EBP,dword ptr [RBX]
JGE 0x001f5a94
LEA RAX,[0x2668d0]
CMP dword ptr [RAX],0x0
JS 0x001f5a94
CALL 0x0020ca47
MOV R8D,dword ptr [RBX]
LEA RDX,[0x225f57]
MOV RDI,RAX
MOV ESI,0x3
MOV ECX,EBP
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0020cae4
LAB_001f5a94:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* postprocess_cpu_params(cpu_params&, cpu_params const*) */
void postprocess_cpu_params(cpu_params *param_1,cpu_params *param_2)
{
int1 auVar1 [13];
int1 auVar2 [13];
int1 auVar3 [13];
ulong uVar4;
int1 auVar5 [13];
int4 uVar6;
long lVar7;
int8 uVar8;
int iVar9;
int iVar10;
int iVar11;
int iVar12;
if (*(int *)param_1 < 0) {
if (param_2 == (cpu_params *)0x0) {
uVar6 = cpu_get_num_math();
*(int4 *)param_1 = uVar6;
}
else {
memcpy(param_1,param_2,0x214);
}
}
lVar7 = 4;
iVar9 = 0;
iVar10 = 0;
iVar11 = 0;
iVar12 = 0;
do {
uVar6 = *(int4 *)(param_1 + lVar7);
uVar4 = (ulong)(ushort)uVar6 & 0xffffffffffff00ff;
auVar1._8_4_ = 0;
auVar1._0_8_ = uVar4;
auVar1[0xc] = (char)((uint)uVar6 >> 0x18);
auVar2[8] = (char)((uint)uVar6 >> 0x10);
auVar2._0_8_ = uVar4;
auVar2[9] = 0;
auVar2._10_3_ = auVar1._10_3_;
auVar5._5_8_ = 0;
auVar5._0_5_ = auVar2._8_5_;
auVar3[4] = (char)((uint)uVar6 >> 8);
auVar3._0_4_ = (int)uVar4;
auVar3[5] = 0;
auVar3._6_7_ = SUB137(auVar5 << 0x40,6);
iVar9 = iVar9 + (int)uVar4;
iVar10 = iVar10 + auVar3._4_4_;
iVar11 = iVar11 + auVar2._8_4_;
iVar12 = iVar12 + (uint)(uint3)(auVar1._10_3_ >> 0x10);
lVar7 = lVar7 + 4;
} while (lVar7 != 0x204);
iVar9 = iVar12 + iVar10 + iVar11 + iVar9;
if (((iVar9 != 0) && (iVar9 < *(int *)param_1)) && (-1 < common_log_verbosity_thold)) {
uVar8 = common_log_main();
common_log_add(uVar8,3,
"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n",
iVar9,*(int4 *)param_1);
return;
}
return;
}
| |
44,637 | time_normalizer::to_pico(unsigned long long, unsigned long long, unsigned long long*, unsigned long long*, unsigned long long*) | eloqsql/storage/perfschema/pfs_timer.cc | void time_normalizer::to_pico(ulonglong start, ulonglong end,
ulonglong *pico_start, ulonglong *pico_end, ulonglong *pico_wait)
{
if (start == 0)
{
*pico_start= 0;
*pico_end= 0;
*pico_wait= 0;
}
else
{
*pico_start= (start - m_v0) * m_factor;
if (end == 0)
{
*pico_end= 0;
*pico_wait= 0;
}
else
{
*pico_end= (end - m_v0) * m_factor;
*pico_wait= (end - start) * m_factor;
}
}
} | O0 | cpp | time_normalizer::to_pico(unsigned long long, unsigned long long, unsigned long long*, unsigned long long*, unsigned long long*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x260de
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
jmp 0x26141
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
subq (%rax), %rcx
imulq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x18(%rbp)
jne 0x26114
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
jmp 0x2613f
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rdx
subq (%rax), %rdx
imulq 0x8(%rax), %rdx
movq -0x28(%rbp), %rcx
movq %rdx, (%rcx)
movq -0x18(%rbp), %rcx
subq -0x10(%rbp), %rcx
imulq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x26141
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN15time_normalizer7to_picoEyyPyS0_S0_:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
cmp [rbp+var_10], 0
jnz short loc_260DE
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
jmp short loc_26141
loc_260DE:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
sub rcx, [rax]
imul rcx, [rax+8]
mov rax, [rbp+var_20]
mov [rax], rcx
cmp [rbp+var_18], 0
jnz short loc_26114
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
jmp short loc_2613F
loc_26114:
mov rax, [rbp+var_38]
mov rdx, [rbp+var_18]
sub rdx, [rax]
imul rdx, [rax+8]
mov rcx, [rbp+var_28]
mov [rcx], rdx
mov rcx, [rbp+var_18]
sub rcx, [rbp+var_10]
imul rcx, [rax+8]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_2613F:
jmp short $+2
loc_26141:
pop rbp
retn
| unsigned long long * time_normalizer::to_pico(
time_normalizer *this,
long long a2,
long long a3,
unsigned long long *a4,
unsigned long long *a5,
unsigned long long *a6)
{
unsigned long long *result; // rax
if ( a2 )
{
*a4 = *((_QWORD *)this + 1) * (a2 - *(_QWORD *)this);
if ( a3 )
{
*a5 = *((_QWORD *)this + 1) * (a3 - *(_QWORD *)this);
result = a6;
*a6 = *((_QWORD *)this + 1) * (a3 - a2);
}
else
{
*a5 = 0LL;
result = a6;
*a6 = 0LL;
}
}
else
{
*a4 = 0LL;
*a5 = 0LL;
result = a6;
*a6 = 0LL;
}
return result;
}
| to_pico:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x001260de
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
JMP 0x00126141
LAB_001260de:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,qword ptr [RAX]
IMUL RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00126114
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
JMP 0x0012613f
LAB_00126114:
MOV RAX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr [RAX]
IMUL RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX],RDX
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0012613f:
JMP 0x00126141
LAB_00126141:
POP RBP
RET
|
/* time_normalizer::to_pico(unsigned long long, unsigned long long, unsigned long long*, unsigned
long long*, unsigned long long*) */
void __thiscall
time_normalizer::to_pico
(time_normalizer *this,ulonglong param_1,ulonglong param_2,ulonglong *param_3,
ulonglong *param_4,ulonglong *param_5)
{
if (param_1 == 0) {
*param_3 = 0;
*param_4 = 0;
*param_5 = 0;
}
else {
*param_3 = (param_1 - *(long *)this) * *(long *)(this + 8);
if (param_2 == 0) {
*param_4 = 0;
*param_5 = 0;
}
else {
*param_4 = (param_2 - *(long *)this) * *(long *)(this + 8);
*param_5 = (param_2 - param_1) * *(long *)(this + 8);
}
}
return;
}
| |
44,638 | CLI::Option* CLI::Option::needs<CLI::App>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/Option.hpp | Option *needs(std::string opt_name) {
auto opt = static_cast<T *>(parent_)->get_option_no_throw(opt_name);
if(opt == nullptr) {
throw IncorrectConstruction::MissingOption(opt_name);
}
return needs(opt);
} | O0 | cpp | CLI::Option* CLI::Option::needs<CLI::App>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq 0x1f0(%rax), %rax
movq %rax, -0x78(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9250
movq -0x78(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x38e00
movq %rax, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9b90
movq -0x70(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x10185
movb $0x1, -0x65(%rbp)
movl $0x38, %edi
callq 0x92d0
movq -0x88(%rbp), %rsi
movq %rax, -0x90(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x9250
jmp 0x1011a
movq -0x90(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x51990
jmp 0x1012c
movq -0x90(%rbp), %rdi
movb $0x0, -0x65(%rbp)
leaq 0x9131a(%rip), %rsi # 0xa1458
leaq 0x1afeb(%rip), %rdx # 0x2b130
callq 0x9a30
jmp 0x101a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1016f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x9b90
testb $0x1, -0x65(%rbp)
jne 0x10177
jmp 0x10183
movq -0x90(%rbp), %rdi
callq 0x9470
jmp 0x1019b
movq -0x80(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x51a40
addq $0x90, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x9a70
nopw %cs:(%rax,%rax)
nop
| _ZN3CLI6Option5needsINS_3AppEEEPS0_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_88], rsi
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_80], rax
mov rax, [rax+1F0h]
mov [rbp+var_78], rax
lea rdi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
mov rdi, [rbp+var_78]
lea rsi, [rbp+var_38]
call _ZN3CLI3App19get_option_no_throwENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::App::get_option_no_throw(std::string)
mov [rbp+var_70], rax
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rbp+var_70]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz loc_10185
mov [rbp+var_65], 1
mov edi, 38h ; '8'; thrown_size
call ___cxa_allocate_exception
mov rsi, [rbp+var_88]
mov [rbp+var_90], rax
lea rdi, [rbp+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_1011A:
mov rdi, [rbp+var_90]
lea rsi, [rbp+var_58]
call _ZN3CLI21IncorrectConstruction13MissingOptionENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::IncorrectConstruction::MissingOption(std::string)
jmp short $+2
loc_1012C:
mov rdi, [rbp+var_90]; void *
mov [rbp+var_65], 0
lea rsi, _ZTIN3CLI21IncorrectConstructionE; lptinfo
lea rdx, _ZN3CLI21IncorrectConstructionD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_101A4
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
jmp short loc_1016F
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
lea rdi, [rbp+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1016F:
test [rbp+var_65], 1
jnz short loc_10177
jmp short loc_10183
loc_10177:
mov rdi, [rbp+var_90]; void *
call ___cxa_free_exception
loc_10183:
jmp short loc_1019B
loc_10185:
mov rdi, [rbp+var_80]; this
mov rsi, [rbp+var_18]; CLI::Option *
call _ZN3CLI6Option5needsEPS0_; CLI::Option::needs(CLI::Option*)
add rsp, 90h
pop rbp
retn
loc_1019B:
mov rdi, [rbp+var_60]
call __Unwind_Resume
loc_101A4:
nop word ptr [rax+rax+00000000h]
xchg ax, ax
| long long CLI::Option::needs<CLI::App>(CLI::Option *a1, long long a2)
{
void *exception; // [rsp+0h] [rbp-90h]
long long v4; // [rsp+18h] [rbp-78h]
CLI::Option *option_no_throw; // [rsp+20h] [rbp-70h]
_BYTE v6[32]; // [rsp+38h] [rbp-58h] BYREF
_BYTE v7[32]; // [rsp+58h] [rbp-38h] BYREF
CLI::Option *v8; // [rsp+78h] [rbp-18h]
long long v9; // [rsp+80h] [rbp-10h]
CLI::Option *v10; // [rsp+88h] [rbp-8h]
v10 = a1;
v9 = a2;
v4 = *((_QWORD *)a1 + 62);
std::string::basic_string(v7, a2);
option_no_throw = (CLI::Option *)CLI::App::get_option_no_throw(v4, v7);
std::string::~string(v7);
v8 = option_no_throw;
if ( !option_no_throw )
{
exception = __cxa_allocate_exception(0x38uLL);
std::string::basic_string(v6, a2);
CLI::IncorrectConstruction::MissingOption(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'CLI::IncorrectConstruction,
CLI::IncorrectConstruction::~IncorrectConstruction);
}
return CLI::Option::needs(a1, v8);
}
| needs<CLI::App>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x88],RSI
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RAX + 0x1f0]
MOV qword ptr [RBP + -0x78],RAX
LEA RDI,[RBP + -0x38]
CALL 0x00109250
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x38]
CALL 0x00138e00
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[RBP + -0x38]
CALL 0x00109b90
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00110185
MOV byte ptr [RBP + -0x65],0x1
MOV EDI,0x38
CALL 0x001092d0
MOV RSI,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x90],RAX
LAB_0011010f:
LEA RDI,[RBP + -0x58]
CALL 0x00109250
JMP 0x0011011a
LAB_0011011a:
MOV RDI,qword ptr [RBP + -0x90]
LEA RSI,[RBP + -0x58]
CALL 0x00151990
JMP 0x0011012c
LAB_0011012c:
MOV RDI,qword ptr [RBP + -0x90]
MOV byte ptr [RBP + -0x65],0x0
LEA RSI,[0x1a1458]
LEA RDX,[0x12b130]
CALL 0x00109a30
LAB_00110185:
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00151a40
ADD RSP,0x90
POP RBP
RET
|
/* CLI::Option* CLI::Option::needs<CLI::App>(std::__cxx11::string) */
Option * __thiscall CLI::Option::needs<CLI::App>(Option *this,string *param_2)
{
App *pAVar1;
Option *pOVar2;
IncorrectConstruction *pIVar3;
string local_60 [32];
string local_40 [32];
Option *local_20;
string *local_18;
Option *local_10;
pAVar1 = *(App **)(this + 0x1f0);
local_18 = param_2;
local_10 = this;
std::__cxx11::string::string(local_40,param_2);
pOVar2 = (Option *)App::get_option_no_throw(pAVar1,local_40);
std::__cxx11::string::~string(local_40);
local_20 = pOVar2;
if (pOVar2 == (Option *)0x0) {
pIVar3 = (IncorrectConstruction *)__cxa_allocate_exception(0x38);
/* try { // try from 0011010f to 00110117 has its CatchHandler @ 0011014c */
std::__cxx11::string::string(local_60,param_2);
/* try { // try from 0011011a to 00110149 has its CatchHandler @ 0011015a */
IncorrectConstruction::MissingOption(pIVar3,local_60);
/* WARNING: Subroutine does not return */
__cxa_throw(pIVar3,&IncorrectConstruction::typeinfo,
IncorrectConstruction::~IncorrectConstruction);
}
pOVar2 = (Option *)needs(this,pOVar2);
return pOVar2;
}
| |
44,639 | my_cset_init_8bit | eloqsql/strings/ctype-simple.c | static my_bool
my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
cs->state|= my_8bit_charset_flags_from_data(cs);
cs->caseup_multiply= 1;
cs->casedn_multiply= 1;
cs->pad_char= ' ';
if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni)
return TRUE;
return create_fromuni(cs, loader);
} | O3 | c | my_cset_init_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1808, %rsp # imm = 0x1808
movq %rsi, -0x30(%rbp)
movq %rdi, %rbx
movq 0x68(%rdi), %r15
xorl %eax, %eax
testq %r15, %r15
je 0x3a475
xorl %ecx, %ecx
cmpw $0x80, (%r15,%rcx,2)
jae 0x3a456
incq %rcx
cmpq $0x100, %rcx # imm = 0x100
jne 0x3a43c
movl $0x1000, %eax # imm = 0x1000
xorl %ecx, %ecx
movzwl (%r15,%rcx,2), %edx
cmpq %rdx, %rcx
jne 0x3a470
incq %rcx
cmpq $0x80, %rcx
jne 0x3a458
jmp 0x3a475
orl $0x2000, %eax # imm = 0x2000
orl %eax, 0xc(%rbx)
movw $0x101, 0x94(%rbx) # imm = 0x101
movb $0x20, 0xb0(%rbx)
movb $0x1, %al
cmpq $0x0, 0x48(%rbx)
je 0x3a665
cmpq $0x0, 0x50(%rbx)
je 0x3a665
testq %r15, %r15
je 0x3a665
cmpq $0x0, 0x40(%rbx)
je 0x3a665
leaq -0x1830(%rbp), %rdi
xorl %r12d, %r12d
movl $0x1800, %edx # imm = 0x1800
xorl %esi, %esi
callq 0x241e0
movzwl (%r15,%r12,2), %eax
testq %rax, %rax
sete %cl
testq %r12, %r12
setne %dl
testb %cl, %dl
jne 0x3a522
movl %eax, %ecx
shrl $0x8, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq -0x1830(,%rcx,8), %rcx
addq %rbp, %rcx
movl (%rcx), %edx
testl %edx, %edx
je 0x3a516
movl 0x8(%rcx), %esi
movl %eax, %edi
cmpw %si, %ax
jb 0x3a505
movl %esi, %edi
movw %di, 0x8(%rcx)
movzwl 0xa(%rcx), %esi
cmpw %si, %ax
ja 0x3a51a
movl %esi, %eax
jmp 0x3a51a
movw %ax, 0x8(%rcx)
movw %ax, 0xa(%rcx)
incl %edx
movl %edx, (%rcx)
incq %r12
cmpq $0x100, %r12 # imm = 0x100
jne 0x3a4ca
leaq 0x1b0(%rip), %rcx # 0x3a6e5
leaq -0x1830(%rbp), %rdi
movl $0x100, %esi # imm = 0x100
movl $0x18, %edx
callq 0x24760
xorl %r13d, %r13d
leaq (,%r13,2), %rax
addq %r13, %rax
cmpl $0x0, -0x1830(%rbp,%rax,8)
je 0x3a5fc
leaq -0x1830(,%rax,8), %r14
addq %rbp, %r14
movzwl 0xa(%r14), %r12d
movzwl 0x8(%r14), %eax
subq %rax, %r12
incq %r12
movq %r12, %rdi
movq -0x30(%rbp), %rax
callq *0x80(%rax)
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x3a650
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x241e0
movl $0x1, %eax
movq 0x68(%rbx), %rcx
movzwl (%rcx,%rax,2), %ecx
movzwl 0x8(%r14), %edx
cmpw %dx, %cx
jb 0x3a5db
leal -0x1(%rcx), %esi
cmpw 0xa(%r14), %si
jae 0x3a5db
subq %rdx, %rcx
cmpb $0x0, (%r15,%rcx)
jg 0x3a5db
movb %al, (%r15,%rcx)
incq %rax
cmpq $0x100, %rax # imm = 0x100
jne 0x3a5b1
incq %r13
cmpq $0x100, %r13 # imm = 0x100
jne 0x3a54e
movl $0x100, %r13d # imm = 0x100
movl %r13d, %r14d
movq %r14, %rdi
shlq $0x4, %rdi
addq $0x10, %rdi
movq -0x30(%rbp), %rax
callq *0x80(%rax)
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x3a650
testl %r13d, %r13d
je 0x3a654
movq %r14, %rax
shlq $0x4, %rax
leaq -0x1828(%rbp), %rcx
xorl %edx, %edx
movq 0x70(%rbx), %rsi
movups (%rcx), %xmm0
movups %xmm0, (%rsi,%rdx)
addq $0x10, %rdx
addq $0x18, %rcx
cmpq %rdx, %rax
jne 0x3a632
movq 0x70(%rbx), %rax
jmp 0x3a657
movb $0x1, %al
jmp 0x3a665
xorl %r14d, %r14d
shlq $0x4, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%r14)
xorl %eax, %eax
addq $0x1808, %rsp # imm = 0x1808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_cset_init_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1808h
mov [rbp+var_30], rsi
mov rbx, rdi
mov r15, [rdi+68h]
xor eax, eax
test r15, r15
jz short loc_3A475
xor ecx, ecx
loc_3A43C:
cmp word ptr [r15+rcx*2], 80h
jnb short loc_3A456
inc rcx
cmp rcx, 100h
jnz short loc_3A43C
mov eax, 1000h
loc_3A456:
xor ecx, ecx
loc_3A458:
movzx edx, word ptr [r15+rcx*2]
cmp rcx, rdx
jnz short loc_3A470
inc rcx
cmp rcx, 80h
jnz short loc_3A458
jmp short loc_3A475
loc_3A470:
or eax, 2000h
loc_3A475:
or [rbx+0Ch], eax
mov word ptr [rbx+94h], 101h
mov byte ptr [rbx+0B0h], 20h ; ' '
mov al, 1
cmp qword ptr [rbx+48h], 0
jz loc_3A665
cmp qword ptr [rbx+50h], 0
jz loc_3A665
test r15, r15
jz loc_3A665
cmp qword ptr [rbx+40h], 0
jz loc_3A665
lea rdi, [rbp+var_1830]
xor r12d, r12d
mov edx, 1800h
xor esi, esi
call _memset
loc_3A4CA:
movzx eax, word ptr [r15+r12*2]
test rax, rax
setz cl
test r12, r12
setnz dl
test dl, cl
jnz short loc_3A522
mov ecx, eax
shr ecx, 8
lea rcx, [rcx+rcx*2]
lea rcx, ds:0FFFFFFFFFFFFE7D0h[rcx*8]
add rcx, rbp
mov edx, [rcx]
test edx, edx
jz short loc_3A516
mov esi, [rcx+8]
mov edi, eax
cmp ax, si
jb short loc_3A505
mov edi, esi
loc_3A505:
mov [rcx+8], di
movzx esi, word ptr [rcx+0Ah]
cmp ax, si
ja short loc_3A51A
mov eax, esi
jmp short loc_3A51A
loc_3A516:
mov [rcx+8], ax
loc_3A51A:
mov [rcx+0Ah], ax
inc edx
mov [rcx], edx
loc_3A522:
inc r12
cmp r12, 100h
jnz short loc_3A4CA
lea rcx, pcmp
lea rdi, [rbp+var_1830]
mov esi, 100h
mov edx, 18h
call _qsort
xor r13d, r13d
loc_3A54E:
lea rax, ds:0[r13*2]
add rax, r13
cmp [rbp+rax*8+var_1830], 0
jz loc_3A5FC
lea r14, ds:0FFFFFFFFFFFFE7D0h[rax*8]
add r14, rbp
movzx r12d, word ptr [r14+0Ah]
movzx eax, word ptr [r14+8]
sub r12, rax
inc r12
mov rdi, r12
mov rax, [rbp+var_30]
call qword ptr [rax+80h]
mov [r14+10h], rax
test rax, rax
jz loc_3A650
mov r15, rax
mov rdi, rax
xor esi, esi
mov rdx, r12
call _memset
mov eax, 1
loc_3A5B1:
mov rcx, [rbx+68h]
movzx ecx, word ptr [rcx+rax*2]
movzx edx, word ptr [r14+8]
cmp cx, dx
jb short loc_3A5DB
lea esi, [rcx-1]
cmp si, [r14+0Ah]
jnb short loc_3A5DB
sub rcx, rdx
cmp byte ptr [r15+rcx], 0
jg short loc_3A5DB
mov [r15+rcx], al
loc_3A5DB:
inc rax
cmp rax, 100h
jnz short loc_3A5B1
inc r13
cmp r13, 100h
jnz loc_3A54E
mov r13d, 100h
loc_3A5FC:
mov r14d, r13d
mov rdi, r14
shl rdi, 4
add rdi, 10h
mov rax, [rbp+var_30]
call qword ptr [rax+80h]
mov [rbx+70h], rax
test rax, rax
jz short loc_3A650
test r13d, r13d
jz short loc_3A654
mov rax, r14
shl rax, 4
lea rcx, [rbp+var_1828]
xor edx, edx
loc_3A632:
mov rsi, [rbx+70h]
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rsi+rdx], xmm0
add rdx, 10h
add rcx, 18h
cmp rax, rdx
jnz short loc_3A632
mov rax, [rbx+70h]
jmp short loc_3A657
loc_3A650:
mov al, 1
jmp short loc_3A665
loc_3A654:
xor r14d, r14d
loc_3A657:
shl r14, 4
xorps xmm0, xmm0
movups xmmword ptr [rax+r14], xmm0
xor eax, eax
loc_3A665:
add rsp, 1808h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char my_cset_init_8bit(long long a1, long long a2)
{
long long v3; // r15
int v4; // eax
long long v5; // rcx
long long v6; // rcx
char result; // al
long long v8; // r12
long long v9; // rax
long long *v10; // rcx
int v11; // edx
__int16 v12; // di
long long v13; // r13
long long *v14; // r14
unsigned long long v15; // r12
long long v16; // rax
long long v17; // r15
long long i; // rax
long long v19; // rcx
long long v20; // rdx
long long v21; // rcx
long long v22; // r14
long long v23; // rax
char *v24; // rcx
long long v25; // rdx
_DWORD v26[2]; // [rsp+0h] [rbp-1830h] BYREF
char v27; // [rsp+8h] [rbp-1828h] BYREF
long long v28; // [rsp+1800h] [rbp-30h]
long long savedregs; // [rsp+1830h] [rbp+0h] BYREF
_UNKNOWN *retaddr; // [rsp+1838h] [rbp+8h]
v28 = a2;
v3 = *(_QWORD *)(a1 + 104);
v4 = 0;
if ( v3 )
{
v5 = 0LL;
while ( *(_WORD *)(v3 + 2 * v5) < 0x80u )
{
if ( ++v5 == 256 )
{
v4 = 4096;
break;
}
}
v6 = 0LL;
while ( v6 == *(unsigned __int16 *)(v3 + 2 * v6) )
{
if ( ++v6 == 128 )
goto LABEL_11;
}
v4 |= 0x2000u;
}
LABEL_11:
*(_DWORD *)(a1 + 12) |= v4;
*(_WORD *)(a1 + 148) = 257;
*(_BYTE *)(a1 + 176) = 32;
result = 1;
if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && v3 && *(_QWORD *)(a1 + 64) )
{
v8 = 0LL;
memset(v26, 0LL, 6144LL);
do
{
v9 = *(unsigned __int16 *)(v3 + 2 * v8);
if ( v9 != 0 || v8 == 0 )
{
v10 = &savedregs + 3 * ((unsigned int)v9 >> 8) - 774;
v11 = *(_DWORD *)v10;
if ( *(_DWORD *)v10 )
{
v12 = *(_WORD *)(v3 + 2 * v8);
if ( (unsigned __int16)v9 >= (unsigned __int16)*((_DWORD *)v10 + 2) )
v12 = *((_DWORD *)v10 + 2);
*((_WORD *)v10 + 4) = v12;
if ( (unsigned __int16)v9 <= *((_WORD *)v10 + 5) )
LOWORD(v9) = *((_WORD *)v10 + 5);
}
else
{
*((_WORD *)v10 + 4) = v9;
}
*((_WORD *)v10 + 5) = v9;
*(_DWORD *)v10 = v11 + 1;
}
++v8;
}
while ( v8 != 256 );
qsort(v26, 256LL, 24LL, pcmp);
v13 = 0LL;
while ( v26[6 * v13] )
{
v14 = &savedregs + 3 * v13 - 774;
v15 = *((unsigned __int16 *)&retaddr + 12 * v13 - 3095)
- (unsigned long long)*((unsigned __int16 *)&retaddr + 12 * v13 - 3096)
+ 1;
v16 = (*(long long ( **)(unsigned long long))(v28 + 128))(v15);
v14[2] = v16;
if ( !v16 )
return 1;
v17 = v16;
memset(v16, 0LL, v15);
for ( i = 1LL; i != 256; ++i )
{
v19 = *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i);
v20 = *((unsigned __int16 *)v14 + 4);
if ( (unsigned __int16)v19 >= (unsigned __int16)v20 && (unsigned __int16)(v19 - 1) < *((_WORD *)v14 + 5) )
{
v21 = v19 - v20;
if ( *(char *)(v17 + v21) <= 0 )
*(_BYTE *)(v17 + v21) = i;
}
}
if ( ++v13 == 256 )
{
LODWORD(v13) = 256;
break;
}
}
v22 = (unsigned int)v13;
v23 = (*(long long ( **)(long long))(v28 + 128))(16LL * (unsigned int)v13 + 16);
*(_QWORD *)(a1 + 112) = v23;
if ( !v23 )
return 1;
if ( (_DWORD)v13 )
{
v24 = &v27;
v25 = 0LL;
do
{
*(_OWORD *)(*(_QWORD *)(a1 + 112) + v25) = *(_OWORD *)v24;
v25 += 16LL;
v24 += 24;
}
while ( 16LL * (unsigned int)v13 != v25 );
v23 = *(_QWORD *)(a1 + 112);
}
else
{
v22 = 0LL;
}
*(_OWORD *)(v23 + 16 * v22) = 0LL;
return 0;
}
return result;
}
| my_cset_init_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1808
MOV qword ptr [RBP + -0x30],RSI
MOV RBX,RDI
MOV R15,qword ptr [RDI + 0x68]
XOR EAX,EAX
TEST R15,R15
JZ 0x0013a475
XOR ECX,ECX
LAB_0013a43c:
CMP word ptr [R15 + RCX*0x2],0x80
JNC 0x0013a456
INC RCX
CMP RCX,0x100
JNZ 0x0013a43c
MOV EAX,0x1000
LAB_0013a456:
XOR ECX,ECX
LAB_0013a458:
MOVZX EDX,word ptr [R15 + RCX*0x2]
CMP RCX,RDX
JNZ 0x0013a470
INC RCX
CMP RCX,0x80
JNZ 0x0013a458
JMP 0x0013a475
LAB_0013a470:
OR EAX,0x2000
LAB_0013a475:
OR dword ptr [RBX + 0xc],EAX
MOV word ptr [RBX + 0x94],0x101
MOV byte ptr [RBX + 0xb0],0x20
MOV AL,0x1
CMP qword ptr [RBX + 0x48],0x0
JZ 0x0013a665
CMP qword ptr [RBX + 0x50],0x0
JZ 0x0013a665
TEST R15,R15
JZ 0x0013a665
CMP qword ptr [RBX + 0x40],0x0
JZ 0x0013a665
LEA RDI,[RBP + -0x1830]
XOR R12D,R12D
MOV EDX,0x1800
XOR ESI,ESI
CALL 0x001241e0
LAB_0013a4ca:
MOVZX EAX,word ptr [R15 + R12*0x2]
TEST RAX,RAX
SETZ CL
TEST R12,R12
SETNZ DL
TEST DL,CL
JNZ 0x0013a522
MOV ECX,EAX
SHR ECX,0x8
LEA RCX,[RCX + RCX*0x2]
LEA RCX,[-0x1830 + RCX*0x8]
ADD RCX,RBP
MOV EDX,dword ptr [RCX]
TEST EDX,EDX
JZ 0x0013a516
MOV ESI,dword ptr [RCX + 0x8]
MOV EDI,EAX
CMP AX,SI
JC 0x0013a505
MOV EDI,ESI
LAB_0013a505:
MOV word ptr [RCX + 0x8],DI
MOVZX ESI,word ptr [RCX + 0xa]
CMP AX,SI
JA 0x0013a51a
MOV EAX,ESI
JMP 0x0013a51a
LAB_0013a516:
MOV word ptr [RCX + 0x8],AX
LAB_0013a51a:
MOV word ptr [RCX + 0xa],AX
INC EDX
MOV dword ptr [RCX],EDX
LAB_0013a522:
INC R12
CMP R12,0x100
JNZ 0x0013a4ca
LEA RCX,[0x13a6e5]
LEA RDI,[RBP + -0x1830]
MOV ESI,0x100
MOV EDX,0x18
CALL 0x00124760
XOR R13D,R13D
LAB_0013a54e:
LEA RAX,[R13*0x2]
ADD RAX,R13
CMP dword ptr [RBP + RAX*0x8 + -0x1830],0x0
JZ 0x0013a5fc
LEA R14,[-0x1830 + RAX*0x8]
ADD R14,RBP
MOVZX R12D,word ptr [R14 + 0xa]
MOVZX EAX,word ptr [R14 + 0x8]
SUB R12,RAX
INC R12
MOV RDI,R12
MOV RAX,qword ptr [RBP + -0x30]
CALL qword ptr [RAX + 0x80]
MOV qword ptr [R14 + 0x10],RAX
TEST RAX,RAX
JZ 0x0013a650
MOV R15,RAX
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R12
CALL 0x001241e0
MOV EAX,0x1
LAB_0013a5b1:
MOV RCX,qword ptr [RBX + 0x68]
MOVZX ECX,word ptr [RCX + RAX*0x2]
MOVZX EDX,word ptr [R14 + 0x8]
CMP CX,DX
JC 0x0013a5db
LEA ESI,[RCX + -0x1]
CMP SI,word ptr [R14 + 0xa]
JNC 0x0013a5db
SUB RCX,RDX
CMP byte ptr [R15 + RCX*0x1],0x0
JG 0x0013a5db
MOV byte ptr [R15 + RCX*0x1],AL
LAB_0013a5db:
INC RAX
CMP RAX,0x100
JNZ 0x0013a5b1
INC R13
CMP R13,0x100
JNZ 0x0013a54e
MOV R13D,0x100
LAB_0013a5fc:
MOV R14D,R13D
MOV RDI,R14
SHL RDI,0x4
ADD RDI,0x10
MOV RAX,qword ptr [RBP + -0x30]
CALL qword ptr [RAX + 0x80]
MOV qword ptr [RBX + 0x70],RAX
TEST RAX,RAX
JZ 0x0013a650
TEST R13D,R13D
JZ 0x0013a654
MOV RAX,R14
SHL RAX,0x4
LEA RCX,[RBP + -0x1828]
XOR EDX,EDX
LAB_0013a632:
MOV RSI,qword ptr [RBX + 0x70]
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RSI + RDX*0x1],XMM0
ADD RDX,0x10
ADD RCX,0x18
CMP RAX,RDX
JNZ 0x0013a632
MOV RAX,qword ptr [RBX + 0x70]
JMP 0x0013a657
LAB_0013a650:
MOV AL,0x1
JMP 0x0013a665
LAB_0013a654:
XOR R14D,R14D
LAB_0013a657:
SHL R14,0x4
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + R14*0x1],XMM0
XOR EAX,EAX
LAB_0013a665:
ADD RSP,0x1808
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 my_cset_init_8bit(long param_1,long param_2)
{
int8 *puVar1;
int iVar2;
ushort uVar3;
uint uVar4;
int8 uVar5;
void *__s;
long lVar6;
long lVar7;
ulong uVar8;
ushort *puVar9;
ushort uVar10;
size_t __n;
ulong uVar11;
int local_1838 [2];
ushort local_1830 [4];
int8 auStack_1828 [766];
long local_38;
lVar6 = *(long *)(param_1 + 0x68);
uVar4 = 0;
if (lVar6 != 0) {
lVar7 = 0;
do {
if (0x7f < *(ushort *)(lVar6 + lVar7 * 2)) goto LAB_0013a456;
lVar7 = lVar7 + 1;
} while (lVar7 != 0x100);
uVar4 = 0x1000;
LAB_0013a456:
uVar8 = 0;
do {
if (uVar8 != *(ushort *)(lVar6 + uVar8 * 2)) {
uVar4 = uVar4 | 0x2000;
break;
}
uVar8 = uVar8 + 1;
} while (uVar8 != 0x80);
}
*(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | uVar4;
*(int2 *)(param_1 + 0x94) = 0x101;
*(int1 *)(param_1 + 0xb0) = 0x20;
uVar5 = 1;
if ((((*(long *)(param_1 + 0x48) != 0) && (*(long *)(param_1 + 0x50) != 0)) && (lVar6 != 0)) &&
(*(long *)(param_1 + 0x40) != 0)) {
lVar7 = 0;
local_38 = param_2;
memset(local_1838,0,0x1800);
do {
uVar3 = *(ushort *)(lVar6 + lVar7 * 2);
if (lVar7 == 0 || uVar3 != 0) {
uVar8 = (ulong)(uVar3 >> 8);
iVar2 = local_1838[uVar8 * 6];
if (iVar2 == 0) {
local_1830[uVar8 * 0xc] = uVar3;
}
else {
uVar10 = uVar3;
if ((ushort)*(int4 *)(local_1830 + uVar8 * 0xc) <= uVar3) {
uVar10 = (ushort)*(int4 *)(local_1830 + uVar8 * 0xc);
}
local_1830[uVar8 * 0xc] = uVar10;
if (uVar3 <= local_1830[uVar8 * 0xc + 1]) {
uVar3 = local_1830[uVar8 * 0xc + 1];
}
}
local_1830[uVar8 * 0xc + 1] = uVar3;
local_1838[uVar8 * 6] = iVar2 + 1;
}
lVar7 = lVar7 + 1;
} while (lVar7 != 0x100);
qsort(local_1838,0x100,0x18,pcmp);
uVar8 = 0;
do {
if (local_1838[uVar8 * 6] == 0) goto LAB_0013a5fc;
__n = ((ulong)local_1830[uVar8 * 0xc + 1] - (ulong)local_1830[uVar8 * 0xc]) + 1;
__s = (void *)(**(code **)(local_38 + 0x80))(__n);
auStack_1828[uVar8 * 3] = __s;
if (__s == (void *)0x0) goto LAB_0013a650;
memset(__s,0,__n);
lVar6 = 1;
do {
uVar3 = *(ushort *)(*(long *)(param_1 + 0x68) + lVar6 * 2);
if (((local_1830[uVar8 * 0xc] <= uVar3) &&
((ushort)(uVar3 - 1) < local_1830[uVar8 * 0xc + 1])) &&
(lVar7 = (ulong)uVar3 - (ulong)local_1830[uVar8 * 0xc],
*(char *)((long)__s + lVar7) < '\x01')) {
*(char *)((long)__s + lVar7) = (char)lVar6;
}
lVar6 = lVar6 + 1;
} while (lVar6 != 0x100);
uVar8 = uVar8 + 1;
} while (uVar8 != 0x100);
uVar8 = 0x100;
LAB_0013a5fc:
uVar11 = uVar8 & 0xffffffff;
lVar6 = (**(code **)(local_38 + 0x80))(uVar11 * 0x10 + 0x10);
*(long *)(param_1 + 0x70) = lVar6;
if (lVar6 == 0) {
LAB_0013a650:
uVar5 = 1;
}
else {
if ((int)uVar8 == 0) {
uVar11 = 0;
}
else {
puVar9 = local_1830;
lVar6 = 0;
do {
uVar5 = *(int8 *)(puVar9 + 4);
puVar1 = (int8 *)(*(long *)(param_1 + 0x70) + lVar6);
*puVar1 = *(int8 *)puVar9;
puVar1[1] = uVar5;
lVar6 = lVar6 + 0x10;
puVar9 = puVar9 + 0xc;
} while (uVar11 << 4 != lVar6);
lVar6 = *(long *)(param_1 + 0x70);
}
puVar1 = (int8 *)(lVar6 + uVar11 * 0x10);
*puVar1 = 0;
puVar1[1] = 0;
uVar5 = 0;
}
}
return uVar5;
}
| |
44,640 | set_page_bits | eloqsql/storage/maria/ma_bitmap.c | static my_bool set_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page, uint fill_pattern)
{
pgcache_page_no_t bitmap_page;
uint offset_page, offset, tmp, org_tmp, used_offset;
uchar *data;
DBUG_ENTER("set_page_bits");
DBUG_ASSERT(fill_pattern <= 7);
bitmap_page= page - page % bitmap->pages_covered;
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset_page= (uint) (page - bitmap->page - 1);
/*
Mark place used by reading/writing 2 bytes at a time to handle
bitmaps in overlapping bytes
*/
offset_page*= 3;
offset= offset_page & 7;
data= bitmap->map + offset_page / 8;
org_tmp= tmp= uint2korr(data);
tmp= (tmp & ~(7 << offset)) | (fill_pattern << offset);
if (tmp == org_tmp)
DBUG_RETURN(0); /* No changes */
/*
Take care to not write bytes outside of bitmap.
fill_pattern is 3 bits, so we need to write two bytes
if bit position we write to is > (8-3)
*/
if (offset > 5)
int2store(data, tmp);
else
data[0]= tmp;
/*
Reset full_head_size or full_tail_size if we are releasing data before
it. Increase used_size if we are allocating data.
*/
used_offset= (uint) (data - bitmap->map);
if (fill_pattern < 4)
set_if_smaller(bitmap->full_head_size, used_offset);
if (fill_pattern == 0 || (fill_pattern > 4 && fill_pattern < 7))
set_if_smaller(bitmap->full_tail_size, used_offset);
if (fill_pattern != 0)
{
/* Calulcate which was the last changed byte */
used_offset+= offset > 5 ? 2 : 1;
set_if_bigger(bitmap->used_size, used_offset);
}
_ma_check_bitmap(bitmap);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
if (fill_pattern != FULL_HEAD_PAGE && fill_pattern != FULL_TAIL_PAGE)
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
/*
Note that if the condition above is false (page is full), and all pages of
this bitmap are now full, and that bitmap page was
first_bitmap_with_space, we don't modify first_bitmap_with_space, indeed
its value still tells us where to start our search for a bitmap with space
(which is for sure after this full one).
That does mean that first_bitmap_with_space is only a lower bound.
*/
DBUG_RETURN(0);
} | O3 | c | set_page_bits:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq %rdx, %rax
xorl %edx, %edx
divq 0x138(%rsi)
movq %r13, %r14
subq %rdx, %r14
movq %r14, %rax
cmpq 0x10(%rsi), %r14
je 0x52dfc
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x523e1
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x52ec4
movq 0x10(%r12), %rax
notl %eax
addl %eax, %r13d
leal (%r13,%r13,2), %edx
movl %edx, %ecx
andl $0x7, %ecx
movq 0x8(%r12), %rax
shrl $0x3, %edx
movzwl (%rax,%rdx), %edi
movl $0x7, %r8d
shll %cl, %r8d
movl %r15d, %esi
shll %cl, %esi
notl %r8d
andl %edi, %r8d
orl %r8d, %esi
cmpl %edi, %esi
je 0x52ec2
addq %rdx, %rax
cmpl $0x6, %ecx
jb 0x52e43
movw %si, (%rax)
jmp 0x52e46
movb %sil, (%rax)
subl 0x8(%r12), %eax
cmpl $0x3, %r15d
ja 0x52e5d
cmpl %eax, 0x28(%r12)
jbe 0x52e5d
movl %eax, 0x28(%r12)
cmpl $0x6, %r15d
ja 0x52e7f
movl $0x61, %edx
btl %r15d, %edx
jae 0x52e7f
cmpl %eax, 0x2c(%r12)
jbe 0x52e7a
movl %eax, 0x2c(%r12)
testl %r15d, %r15d
je 0x52ea9
cmpl $0x6, %ecx
sbbl $-0x1, %eax
incl %eax
cmpl %eax, 0x24(%r12)
jae 0x52e93
movl %eax, 0x24(%r12)
movb $0x1, 0x20(%r12)
xorl %eax, %eax
cmpl $0x4, %r15d
je 0x52ec4
cmpl $0x7, %r15d
je 0x52ec4
jmp 0x52eaf
movb $0x1, 0x20(%r12)
movq (%rbx), %rax
cmpq %r14, 0xd0(%rax)
jbe 0x52ec2
movq %r14, 0xd0(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| set_page_bits:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov rax, rdx
xor edx, edx
div qword ptr [rsi+138h]
mov r14, r13
sub r14, rdx
mov rax, r14
cmp r14, [rsi+10h]
jz short loc_52DFC
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call _ma_change_bitmap_page
mov ecx, eax
mov al, 1
test cl, cl
jnz loc_52EC4
mov rax, [r12+10h]
loc_52DFC:
not eax
add r13d, eax
lea edx, [r13+r13*2+0]
mov ecx, edx
and ecx, 7
mov rax, [r12+8]
shr edx, 3
movzx edi, word ptr [rax+rdx]
mov r8d, 7
shl r8d, cl
mov esi, r15d
shl esi, cl
not r8d
and r8d, edi
or esi, r8d
cmp esi, edi
jz loc_52EC2
add rax, rdx
cmp ecx, 6
jb short loc_52E43
mov [rax], si
jmp short loc_52E46
loc_52E43:
mov [rax], sil
loc_52E46:
sub eax, [r12+8]
cmp r15d, 3
ja short loc_52E5D
cmp [r12+28h], eax
jbe short loc_52E5D
mov [r12+28h], eax
loc_52E5D:
cmp r15d, 6
ja short loc_52E7F
mov edx, 61h ; 'a'
bt edx, r15d
jnb short loc_52E7F
cmp [r12+2Ch], eax
jbe short loc_52E7A
mov [r12+2Ch], eax
loc_52E7A:
test r15d, r15d
jz short loc_52EA9
loc_52E7F:
cmp ecx, 6
sbb eax, 0FFFFFFFFh
inc eax
cmp [r12+24h], eax
jnb short loc_52E93
mov [r12+24h], eax
loc_52E93:
mov byte ptr [r12+20h], 1
xor eax, eax
cmp r15d, 4
jz short loc_52EC4
cmp r15d, 7
jz short loc_52EC4
jmp short loc_52EAF
loc_52EA9:
mov byte ptr [r12+20h], 1
loc_52EAF:
mov rax, [rbx]
cmp [rax+0D0h], r14
jbe short loc_52EC2
mov [rax+0D0h], r14
loc_52EC2:
xor eax, eax
loc_52EC4:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char set_page_bits(long long *a1, long long a2, unsigned long long a3, unsigned int a4)
{
int v5; // r13d
unsigned long long v8; // r14
long long v9; // rax
char v10; // cl
char result; // al
int v12; // r13d
unsigned int v13; // ecx
long long v14; // rax
long long v15; // rdx
int v16; // edi
int v17; // esi
_BYTE *v18; // rax
unsigned int v19; // eax
int v20; // edx
unsigned int v21; // eax
v5 = a3;
v8 = a3 - a3 % *(_QWORD *)(a2 + 312);
LODWORD(v9) = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v8 != *(_QWORD *)(a2 + 16) )
{
v10 = ma_change_bitmap_page(a1, a2, a3 - a3 % *(_QWORD *)(a2 + 312));
result = 1;
if ( v10 )
return result;
v9 = *(_QWORD *)(a2 + 16);
}
v12 = ~(_DWORD)v9 + v5;
v13 = (3 * (_BYTE)v12) & 7;
v14 = *(_QWORD *)(a2 + 8);
v15 = (unsigned int)(3 * v12) >> 3;
v16 = *(unsigned __int16 *)(v14 + v15);
v17 = v16 & ~(7 << v13) | (a4 << v13);
if ( v17 == v16 )
return 0;
v18 = (_BYTE *)(v15 + v14);
if ( v13 < 6 )
*v18 = v17;
else
*(_WORD *)v18 = v17;
v19 = (_DWORD)v18 - *(_DWORD *)(a2 + 8);
if ( a4 <= 3 && *(_DWORD *)(a2 + 40) > v19 )
*(_DWORD *)(a2 + 40) = v19;
if ( a4 <= 6 )
{
v20 = 97;
if ( _bittest(&v20, a4) )
{
if ( *(_DWORD *)(a2 + 44) > v19 )
*(_DWORD *)(a2 + 44) = v19;
if ( !a4 )
{
*(_BYTE *)(a2 + 32) = 1;
LABEL_22:
if ( *(_QWORD *)(*a1 + 208) > v8 )
*(_QWORD *)(*a1 + 208) = v8;
return 0;
}
}
}
v21 = v19 - ((v13 < 6) - 1) + 1;
if ( *(_DWORD *)(a2 + 36) < v21 )
*(_DWORD *)(a2 + 36) = v21;
*(_BYTE *)(a2 + 32) = 1;
result = 0;
if ( a4 != 4 && a4 != 7 )
goto LABEL_22;
return result;
}
| set_page_bits:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RAX,RDX
XOR EDX,EDX
DIV qword ptr [RSI + 0x138]
MOV R14,R13
SUB R14,RDX
MOV RAX,R14
CMP R14,qword ptr [RSI + 0x10]
JZ 0x00152dfc
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x001523e1
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x00152ec4
MOV RAX,qword ptr [R12 + 0x10]
LAB_00152dfc:
NOT EAX
ADD R13D,EAX
LEA EDX,[R13 + R13*0x2]
MOV ECX,EDX
AND ECX,0x7
MOV RAX,qword ptr [R12 + 0x8]
SHR EDX,0x3
MOVZX EDI,word ptr [RAX + RDX*0x1]
MOV R8D,0x7
SHL R8D,CL
MOV ESI,R15D
SHL ESI,CL
NOT R8D
AND R8D,EDI
OR ESI,R8D
CMP ESI,EDI
JZ 0x00152ec2
ADD RAX,RDX
CMP ECX,0x6
JC 0x00152e43
MOV word ptr [RAX],SI
JMP 0x00152e46
LAB_00152e43:
MOV byte ptr [RAX],SIL
LAB_00152e46:
SUB EAX,dword ptr [R12 + 0x8]
CMP R15D,0x3
JA 0x00152e5d
CMP dword ptr [R12 + 0x28],EAX
JBE 0x00152e5d
MOV dword ptr [R12 + 0x28],EAX
LAB_00152e5d:
CMP R15D,0x6
JA 0x00152e7f
MOV EDX,0x61
BT EDX,R15D
JNC 0x00152e7f
CMP dword ptr [R12 + 0x2c],EAX
JBE 0x00152e7a
MOV dword ptr [R12 + 0x2c],EAX
LAB_00152e7a:
TEST R15D,R15D
JZ 0x00152ea9
LAB_00152e7f:
CMP ECX,0x6
SBB EAX,-0x1
INC EAX
CMP dword ptr [R12 + 0x24],EAX
JNC 0x00152e93
MOV dword ptr [R12 + 0x24],EAX
LAB_00152e93:
MOV byte ptr [R12 + 0x20],0x1
XOR EAX,EAX
CMP R15D,0x4
JZ 0x00152ec4
CMP R15D,0x7
JZ 0x00152ec4
JMP 0x00152eaf
LAB_00152ea9:
MOV byte ptr [R12 + 0x20],0x1
LAB_00152eaf:
MOV RAX,qword ptr [RBX]
CMP qword ptr [RAX + 0xd0],R14
JBE 0x00152ec2
MOV qword ptr [RAX + 0xd0],R14
LAB_00152ec2:
XOR EAX,EAX
LAB_00152ec4:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 set_page_bits(long *param_1,long param_2,ulong param_3,uint param_4)
{
char cVar1;
int2 *puVar2;
uint uVar3;
ulong uVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
uVar7 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
uVar5 = (uint)uVar7;
if (uVar7 != *(ulong *)(param_2 + 0x10)) {
cVar1 = _ma_change_bitmap_page(param_1,param_2,uVar7);
if (cVar1 != '\0') {
return 1;
}
uVar5 = (uint)*(int8 *)(param_2 + 0x10);
}
uVar5 = ((int)param_3 + ~uVar5) * 3;
uVar3 = uVar5 & 7;
uVar4 = (ulong)(uVar5 >> 3);
uVar6 = (uint)*(ushort *)(*(long *)(param_2 + 8) + uVar4);
uVar5 = param_4 << (sbyte)uVar3 | ~(7 << (sbyte)uVar3) & uVar6;
if (uVar5 == uVar6) {
return 0;
}
puVar2 = (int2 *)(*(long *)(param_2 + 8) + uVar4);
if (uVar3 < 6) {
*(char *)puVar2 = (char)uVar5;
}
else {
*puVar2 = (short)uVar5;
}
uVar5 = (int)puVar2 - *(int *)(param_2 + 8);
if ((param_4 < 4) && (uVar5 < *(uint *)(param_2 + 0x28))) {
*(uint *)(param_2 + 0x28) = uVar5;
}
if ((param_4 < 7) && ((0x61U >> (param_4 & 0x1f) & 1) != 0)) {
if (uVar5 < *(uint *)(param_2 + 0x2c)) {
*(uint *)(param_2 + 0x2c) = uVar5;
}
if (param_4 == 0) {
*(int1 *)(param_2 + 0x20) = 1;
goto LAB_00152eaf;
}
}
uVar5 = (uVar5 - (uVar3 < 6)) + 2;
if (*(uint *)(param_2 + 0x24) < uVar5) {
*(uint *)(param_2 + 0x24) = uVar5;
}
*(int1 *)(param_2 + 0x20) = 1;
if (param_4 == 4) {
return 0;
}
if (param_4 == 7) {
return 0;
}
LAB_00152eaf:
if (uVar7 < *(ulong *)(*param_1 + 0xd0)) {
*(ulong *)(*param_1 + 0xd0) = uVar7;
}
return 0;
}
| |
44,641 | my_snprintf_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_snprintf_utf32(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_utf32(to, n, fmt, args);
va_end(args);
return ret;
} | O3 | c | my_snprintf_utf32:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
leaq -0x120(%rbp), %rcx
movq %r8, 0x20(%rcx)
movq %r9, 0x28(%rcx)
testb %al, %al
je 0x4b7e7
movaps %xmm0, -0xf0(%rbp)
movaps %xmm1, -0xe0(%rbp)
movaps %xmm2, -0xd0(%rbp)
movaps %xmm3, -0xc0(%rbp)
movaps %xmm4, -0xb0(%rbp)
movaps %xmm5, -0xa0(%rbp)
movaps %xmm6, -0x90(%rbp)
movaps %xmm7, -0x80(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rcx, -0x50(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movabsq $0x3000000020, %rax # imm = 0x3000000020
movq %rax, -0x60(%rbp)
addq %rsi, %rbx
leaq -0x40(%rbp), %r14
movq %rsi, -0x68(%rbp)
movzbl (%r15), %eax
cmpl $0x25, %eax
je 0x4b851
testl %eax, %eax
je 0x4b9d2
cmpq %rbx, %r12
jae 0x4b9d2
movw $0x0, (%r12)
movb $0x0, 0x2(%r12)
movb (%r15), %al
movb %al, 0x3(%r12)
addq $0x4, %r12
incq %r15
jmp 0x4b819
addq $0x2, %r15
movb -0x1(%r15), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x4b86c
movzbl %al, %ecx
leal -0x2d(%rcx), %edx
cmpl $0x2, %edx
jae 0x4b871
incq %r15
jmp 0x4b855
cmpl $0x6c, %ecx
jne 0x4b87b
movb (%r15), %al
jmp 0x4b87e
decq %r15
cmpb $0x64, %al
je 0x4b8ae
movzbl %al, %eax
cmpl $0x75, %eax
je 0x4b8ae
cmpl $0x73, %eax
jne 0x4b8d6
movl -0x60(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x4b94f
movq %rcx, %rax
addq -0x50(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x60(%rbp)
jmp 0x4b95b
movq %rbx, %rax
subq %r12, %rax
cmpq $0x3f, %rax
jbe 0x4b9d2
movl -0x60(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x4b8ec
movq %rcx, %rax
addq -0x50(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x60(%rbp)
jmp 0x4b8f8
cmpq %rbx, %r12
je 0x4b9cf
movl $0x25000000, (%r12) # imm = 0x25000000
jmp 0x4b848
movq -0x58(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movslq (%rax), %rdi
cmpb $0x64, (%r15)
jne 0x4b90b
movq %r14, %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
jmp 0x4b915
movl %edi, %edi
movq %r14, %rsi
movl $0xa, %edx
callq 0x5c516
cmpb $0x0, -0x40(%rbp)
je 0x4b84c
leaq -0x3f(%rbp), %rax
movw $0x0, (%r12)
movb $0x0, 0x2(%r12)
movb -0x1(%rax), %cl
movb %cl, 0x3(%r12)
addq $0x4, %r12
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x4b928
jmp 0x4b84c
movq -0x58(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq (%rax), %r13
movq %rbx, %r14
subq %r12, %r14
testq %r13, %r13
leaq 0x17150(%rip), %rax # 0x62abe
cmoveq %rax, %r13
movq %r13, %rdi
callq 0x24120
leaq (,%rax,4), %rdx
movq %r14, %rcx
shrq $0x2, %rcx
decq %rcx
cmpq %rdx, %r14
cmovaq %rax, %rcx
testq %rcx, %rcx
je 0x4b9c6
xorl %eax, %eax
leaq -0x40(%rbp), %r14
movw $0x0, (%r12)
movb $0x0, 0x2(%r12)
movb (%r13,%rax), %dl
movb %dl, 0x3(%r12)
addq $0x4, %r12
incq %rax
cmpq %rax, %rcx
jne 0x4b99e
jmp 0x4b84c
leaq -0x40(%rbp), %r14
jmp 0x4b84c
movq %rbx, %r12
movl $0x0, (%r12)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x4ba02
subq -0x68(%rbp), %r12
movq %r12, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24370
| my_snprintf_utf32:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r15, rcx
mov rbx, rdx
mov r12, rsi
lea rcx, [rbp+var_120]
mov [rcx+20h], r8
mov [rcx+28h], r9
test al, al
jz short loc_4B7E7
movaps [rbp+var_F0], xmm0
movaps [rbp+var_E0], xmm1
movaps [rbp+var_D0], xmm2
movaps [rbp+var_C0], xmm3
movaps [rbp+var_B0], xmm4
movaps [rbp+var_A0], xmm5
movaps [rbp+var_90], xmm6
movaps [rbp+var_80], xmm7
loc_4B7E7:
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_50], rcx
lea rax, [rbp+arg_0]
mov [rbp+var_58], rax
mov rax, 3000000020h
mov [rbp+var_60], rax
add rbx, rsi
lea r14, [rbp+var_40]
mov [rbp+var_68], rsi
loc_4B819:
movzx eax, byte ptr [r15]
cmp eax, 25h ; '%'
jz short loc_4B851
test eax, eax
jz loc_4B9D2
cmp r12, rbx
jnb loc_4B9D2
mov word ptr [r12], 0
mov byte ptr [r12+2], 0
mov al, [r15]
mov [r12+3], al
loc_4B848:
add r12, 4
loc_4B84C:
inc r15
jmp short loc_4B819
loc_4B851:
add r15, 2
loc_4B855:
mov al, [r15-1]
lea ecx, [rax-30h]
cmp cl, 0Ah
jb short loc_4B86C
movzx ecx, al
lea edx, [rcx-2Dh]
cmp edx, 2
jnb short loc_4B871
loc_4B86C:
inc r15
jmp short loc_4B855
loc_4B871:
cmp ecx, 6Ch ; 'l'
jnz short loc_4B87B
mov al, [r15]
jmp short loc_4B87E
loc_4B87B:
dec r15
loc_4B87E:
cmp al, 64h ; 'd'
jz short loc_4B8AE
movzx eax, al
cmp eax, 75h ; 'u'
jz short loc_4B8AE
cmp eax, 73h ; 's'
jnz short loc_4B8D6
mov ecx, dword ptr [rbp+var_60]
cmp rcx, 28h ; '('
ja loc_4B94F
mov rax, rcx
add rax, [rbp+var_50]
add ecx, 8
mov dword ptr [rbp+var_60], ecx
jmp loc_4B95B
loc_4B8AE:
mov rax, rbx
sub rax, r12
cmp rax, 3Fh ; '?'
jbe loc_4B9D2
mov ecx, dword ptr [rbp+var_60]
cmp rcx, 28h ; '('
ja short loc_4B8EC
mov rax, rcx
add rax, [rbp+var_50]
add ecx, 8
mov dword ptr [rbp+var_60], ecx
jmp short loc_4B8F8
loc_4B8D6:
cmp r12, rbx
jz loc_4B9CF
mov dword ptr [r12], 25000000h
jmp loc_4B848
loc_4B8EC:
mov rax, [rbp+var_58]
lea rcx, [rax+8]
mov [rbp+var_58], rcx
loc_4B8F8:
movsxd rdi, dword ptr [rax]
cmp byte ptr [r15], 64h ; 'd'
jnz short loc_4B90B
mov rsi, r14
mov edx, 0FFFFFFF6h
jmp short loc_4B915
loc_4B90B:
mov edi, edi
mov rsi, r14
mov edx, 0Ah
loc_4B915:
call int10_to_str
cmp [rbp+var_40], 0
jz loc_4B84C
lea rax, [rbp+var_3F]
loc_4B928:
mov word ptr [r12], 0
mov byte ptr [r12+2], 0
mov cl, [rax-1]
mov [r12+3], cl
add r12, 4
cmp byte ptr [rax], 0
lea rax, [rax+1]
jnz short loc_4B928
jmp loc_4B84C
loc_4B94F:
mov rax, [rbp+var_58]
lea rcx, [rax+8]
mov [rbp+var_58], rcx
loc_4B95B:
mov r13, [rax]
mov r14, rbx
sub r14, r12
test r13, r13
lea rax, aNull; "(null)"
cmovz r13, rax
mov rdi, r13
call _strlen
lea rdx, ds:0[rax*4]
mov rcx, r14
shr rcx, 2
dec rcx
cmp r14, rdx
cmova rcx, rax
test rcx, rcx
jz short loc_4B9C6
xor eax, eax
lea r14, [rbp+var_40]
loc_4B99E:
mov word ptr [r12], 0
mov byte ptr [r12+2], 0
mov dl, [r13+rax+0]
mov [r12+3], dl
add r12, 4
inc rax
cmp rcx, rax
jnz short loc_4B99E
jmp loc_4B84C
loc_4B9C6:
lea r14, [rbp+var_40]
jmp loc_4B84C
loc_4B9CF:
mov r12, rbx
loc_4B9D2:
mov dword ptr [r12], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_4BA02
sub r12, [rbp+var_68]
mov rax, r12
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4BA02:
call ___stack_chk_fail
| unsigned long long my_snprintf_utf32(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
long long a9,
unsigned long long a10,
long long a11,
unsigned __int8 *a12,
long long a13,
long long a14,
char a15)
{
unsigned long long v16; // r12
unsigned long long v17; // rbx
unsigned __int8 v18; // al
const char **v19; // rax
char *v20; // rax
long long v21; // rdi
long long v22; // rdx
char *v23; // rax
const char *v25; // r13
unsigned long long v26; // r14
long long v27; // rax
long long v28; // rcx
long long i; // rax
char v31; // [rsp+0h] [rbp-120h] BYREF
long long v32; // [rsp+20h] [rbp-100h]
long long v33; // [rsp+28h] [rbp-F8h]
__m128 v34; // [rsp+30h] [rbp-F0h]
__m128 v35; // [rsp+40h] [rbp-E0h]
__m128 v36; // [rsp+50h] [rbp-D0h]
__m128 v37; // [rsp+60h] [rbp-C0h]
__m128 v38; // [rsp+70h] [rbp-B0h]
__m128 v39; // [rsp+80h] [rbp-A0h]
__m128 v40; // [rsp+90h] [rbp-90h]
__m128 v41; // [rsp+A0h] [rbp-80h]
unsigned long long v42; // [rsp+B8h] [rbp-68h]
long long v43; // [rsp+C0h] [rbp-60h]
char *v44; // [rsp+C8h] [rbp-58h]
char *v45; // [rsp+D0h] [rbp-50h]
char v46; // [rsp+E0h] [rbp-40h] BYREF
char v47; // [rsp+E1h] [rbp-3Fh] BYREF
unsigned long long v48; // [rsp+F0h] [rbp-30h]
v34 = a1;
v35 = a2;
v36 = a3;
v37 = a4;
v38 = a5;
v39 = a6;
v40 = a7;
v41 = a8;
v16 = a10;
v32 = a13;
v33 = a14;
v48 = __readfsqword(0x28u);
v45 = &v31;
v44 = &a15;
v43 = 0x3000000020LL;
v17 = a10 + a11;
v42 = a10;
while ( 1 )
{
if ( *a12 != 37 )
{
if ( !*a12 || v16 >= v17 )
goto LABEL_44;
*(_WORD *)v16 = 0;
*(_BYTE *)(v16 + 2) = 0;
*(_BYTE *)(v16 + 3) = *a12;
goto LABEL_6;
}
for ( a12 += 2; ; ++a12 )
{
v18 = *(a12 - 1);
if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 )
break;
}
if ( v18 == 108 )
v18 = *a12;
else
--a12;
if ( v18 != 100 && v18 != 117 )
break;
if ( v17 - v16 <= 0x3F )
goto LABEL_44;
if ( (unsigned int)v43 > 0x28uLL )
{
v20 = v44;
v44 += 8;
}
else
{
v20 = &v45[(unsigned int)v43];
LODWORD(v43) = v43 + 8;
}
v21 = *(int *)v20;
if ( *a12 == 100 )
{
v22 = 4294967286LL;
}
else
{
v21 = (unsigned int)v21;
v22 = 10LL;
}
int10_to_str(v21, &v46, v22);
if ( v46 )
{
v23 = &v47;
do
{
*(_WORD *)v16 = 0;
*(_BYTE *)(v16 + 2) = 0;
*(_BYTE *)(v16 + 3) = *(v23 - 1);
v16 += 4LL;
}
while ( *v23++ != 0 );
}
LABEL_7:
++a12;
}
if ( v18 == 115 )
{
if ( (unsigned int)v43 > 0x28uLL )
{
v19 = (const char **)v44;
v44 += 8;
}
else
{
v19 = (const char **)&v45[(unsigned int)v43];
LODWORD(v43) = v43 + 8;
}
v25 = *v19;
v26 = v17 - v16;
if ( !*v19 )
v25 = "(null)";
v27 = strlen(v25);
v28 = (v26 >> 2) - 1;
if ( v26 > 4 * v27 )
v28 = v27;
if ( v28 )
{
for ( i = 0LL; i != v28; ++i )
{
*(_WORD *)v16 = 0;
*(_BYTE *)(v16 + 2) = 0;
*(_BYTE *)(v16 + 3) = v25[i];
v16 += 4LL;
}
}
goto LABEL_7;
}
if ( v16 != v17 )
{
*(_DWORD *)v16 = 620756992;
LABEL_6:
v16 += 4LL;
goto LABEL_7;
}
v16 = v17;
LABEL_44:
*(_DWORD *)v16 = 0;
return v16 - v42;
}
| my_snprintf_utf32:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R15,RCX
MOV RBX,RDX
MOV R12,RSI
LEA RCX,[RBP + -0x120]
MOV qword ptr [RCX + 0x20],R8
MOV qword ptr [RCX + 0x28],R9
TEST AL,AL
JZ 0x0014b7e7
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVAPS xmmword ptr [RBP + -0xe0],XMM1
MOVAPS xmmword ptr [RBP + -0xd0],XMM2
MOVAPS xmmword ptr [RBP + -0xc0],XMM3
MOVAPS xmmword ptr [RBP + -0xb0],XMM4
MOVAPS xmmword ptr [RBP + -0xa0],XMM5
MOVAPS xmmword ptr [RBP + -0x90],XMM6
MOVAPS xmmword ptr [RBP + -0x80],XMM7
LAB_0014b7e7:
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x50],RCX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,0x3000000020
MOV qword ptr [RBP + -0x60],RAX
ADD RBX,RSI
LEA R14,[RBP + -0x40]
MOV qword ptr [RBP + -0x68],RSI
LAB_0014b819:
MOVZX EAX,byte ptr [R15]
CMP EAX,0x25
JZ 0x0014b851
TEST EAX,EAX
JZ 0x0014b9d2
CMP R12,RBX
JNC 0x0014b9d2
MOV word ptr [R12],0x0
MOV byte ptr [R12 + 0x2],0x0
MOV AL,byte ptr [R15]
MOV byte ptr [R12 + 0x3],AL
LAB_0014b848:
ADD R12,0x4
LAB_0014b84c:
INC R15
JMP 0x0014b819
LAB_0014b851:
ADD R15,0x2
LAB_0014b855:
MOV AL,byte ptr [R15 + -0x1]
LEA ECX,[RAX + -0x30]
CMP CL,0xa
JC 0x0014b86c
MOVZX ECX,AL
LEA EDX,[RCX + -0x2d]
CMP EDX,0x2
JNC 0x0014b871
LAB_0014b86c:
INC R15
JMP 0x0014b855
LAB_0014b871:
CMP ECX,0x6c
JNZ 0x0014b87b
MOV AL,byte ptr [R15]
JMP 0x0014b87e
LAB_0014b87b:
DEC R15
LAB_0014b87e:
CMP AL,0x64
JZ 0x0014b8ae
MOVZX EAX,AL
CMP EAX,0x75
JZ 0x0014b8ae
CMP EAX,0x73
JNZ 0x0014b8d6
MOV ECX,dword ptr [RBP + -0x60]
CMP RCX,0x28
JA 0x0014b94f
MOV RAX,RCX
ADD RAX,qword ptr [RBP + -0x50]
ADD ECX,0x8
MOV dword ptr [RBP + -0x60],ECX
JMP 0x0014b95b
LAB_0014b8ae:
MOV RAX,RBX
SUB RAX,R12
CMP RAX,0x3f
JBE 0x0014b9d2
MOV ECX,dword ptr [RBP + -0x60]
CMP RCX,0x28
JA 0x0014b8ec
MOV RAX,RCX
ADD RAX,qword ptr [RBP + -0x50]
ADD ECX,0x8
MOV dword ptr [RBP + -0x60],ECX
JMP 0x0014b8f8
LAB_0014b8d6:
CMP R12,RBX
JZ 0x0014b9cf
MOV dword ptr [R12],0x25000000
JMP 0x0014b848
LAB_0014b8ec:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RBP + -0x58],RCX
LAB_0014b8f8:
MOVSXD RDI,dword ptr [RAX]
CMP byte ptr [R15],0x64
JNZ 0x0014b90b
MOV RSI,R14
MOV EDX,0xfffffff6
JMP 0x0014b915
LAB_0014b90b:
MOV EDI,EDI
MOV RSI,R14
MOV EDX,0xa
LAB_0014b915:
CALL 0x0015c516
CMP byte ptr [RBP + -0x40],0x0
JZ 0x0014b84c
LEA RAX,[RBP + -0x3f]
LAB_0014b928:
MOV word ptr [R12],0x0
MOV byte ptr [R12 + 0x2],0x0
MOV CL,byte ptr [RAX + -0x1]
MOV byte ptr [R12 + 0x3],CL
ADD R12,0x4
CMP byte ptr [RAX],0x0
LEA RAX,[RAX + 0x1]
JNZ 0x0014b928
JMP 0x0014b84c
LAB_0014b94f:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RBP + -0x58],RCX
LAB_0014b95b:
MOV R13,qword ptr [RAX]
MOV R14,RBX
SUB R14,R12
TEST R13,R13
LEA RAX,[0x162abe]
CMOVZ R13,RAX
MOV RDI,R13
CALL 0x00124120
LEA RDX,[RAX*0x4]
MOV RCX,R14
SHR RCX,0x2
DEC RCX
CMP R14,RDX
CMOVA RCX,RAX
TEST RCX,RCX
JZ 0x0014b9c6
XOR EAX,EAX
LEA R14,[RBP + -0x40]
LAB_0014b99e:
MOV word ptr [R12],0x0
MOV byte ptr [R12 + 0x2],0x0
MOV DL,byte ptr [R13 + RAX*0x1]
MOV byte ptr [R12 + 0x3],DL
ADD R12,0x4
INC RAX
CMP RCX,RAX
JNZ 0x0014b99e
JMP 0x0014b84c
LAB_0014b9c6:
LEA R14,[RBP + -0x40]
JMP 0x0014b84c
LAB_0014b9cf:
MOV R12,RBX
LAB_0014b9d2:
MOV dword ptr [R12],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0014ba02
SUB R12,qword ptr [RBP + -0x68]
MOV RAX,R12
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014ba02:
CALL 0x00124370
|
long my_snprintf_utf32(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int4 *param_10,long param_11,byte *param_12,
int8 param_13,int8 param_14)
{
char in_AL;
byte bVar1;
uint *puVar2;
size_t sVar3;
size_t sVar4;
int8 uVar5;
int4 *puVar6;
ulong uVar7;
int4 *puVar8;
char *pcVar9;
long in_FS_OFFSET;
int1 local_128 [32];
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int4 *local_70;
ulong local_68;
uint *local_60;
int1 *local_58;
char local_48 [16];
long local_38;
local_58 = local_128;
if (in_AL != '\0') {
local_f8 = param_1;
local_e8 = param_2;
local_d8 = param_3;
local_c8 = param_4;
local_b8 = param_5;
local_a8 = param_6;
local_98 = param_7;
local_88 = param_8;
}
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = (uint *)&stack0x00000008;
local_68 = 0x3000000020;
puVar6 = (int4 *)(param_11 + (long)param_10);
local_108 = param_13;
local_100 = param_14;
local_70 = param_10;
do {
puVar8 = param_10;
if (*param_12 == 0x25) {
param_12 = param_12 + 2;
while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) {
param_12 = param_12 + 1;
}
if (bVar1 == 0x6c) {
bVar1 = *param_12;
}
else {
param_12 = param_12 + -1;
}
if ((bVar1 == 100) || (bVar1 == 0x75)) {
if ((ulong)((long)puVar6 - (long)param_10) < 0x40) {
LAB_0014b9d2:
*puVar8 = 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)puVar8 - (long)local_70;
}
uVar7 = local_68 & 0xffffffff;
if (uVar7 < 0x29) {
local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8);
puVar2 = (uint *)(local_58 + uVar7);
}
else {
puVar2 = local_60;
local_60 = local_60 + 2;
}
uVar7 = (ulong)(int)*puVar2;
if (*param_12 == 100) {
uVar5 = 0xfffffff6;
}
else {
uVar7 = (ulong)*puVar2;
uVar5 = 10;
}
int10_to_str(uVar7,local_48,uVar5);
if (local_48[0] != '\0') {
pcVar9 = local_48;
do {
pcVar9 = pcVar9 + 1;
*(int2 *)param_10 = 0;
*(int1 *)((long)param_10 + 2) = 0;
*(char *)((long)param_10 + 3) = pcVar9[-1];
param_10 = param_10 + 1;
} while (*pcVar9 != '\0');
}
}
else {
if (bVar1 != 0x73) {
puVar8 = puVar6;
if (param_10 != puVar6) {
*param_10 = 0x25000000;
goto LAB_0014b848;
}
goto LAB_0014b9d2;
}
uVar7 = local_68 & 0xffffffff;
if (uVar7 < 0x29) {
local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8);
puVar2 = (uint *)(local_58 + uVar7);
}
else {
puVar2 = local_60;
local_60 = local_60 + 2;
}
pcVar9 = *(char **)puVar2;
if (pcVar9 == (char *)0x0) {
pcVar9 = "(null)";
}
sVar3 = strlen(pcVar9);
sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 2) - 1;
if (sVar3 * 4 < (ulong)((long)puVar6 - (long)param_10)) {
sVar4 = sVar3;
}
if (sVar4 != 0) {
sVar3 = 0;
do {
*(int2 *)param_10 = 0;
*(int1 *)((long)param_10 + 2) = 0;
*(char *)((long)param_10 + 3) = pcVar9[sVar3];
param_10 = param_10 + 1;
sVar3 = sVar3 + 1;
} while (sVar4 != sVar3);
}
}
}
else {
if ((*param_12 == 0) || (puVar6 <= param_10)) goto LAB_0014b9d2;
*(int2 *)param_10 = 0;
*(int1 *)((long)param_10 + 2) = 0;
*(byte *)((long)param_10 + 3) = *param_12;
LAB_0014b848:
param_10 = param_10 + 1;
}
param_12 = param_12 + 1;
} while( true );
}
| |
44,642 | bitmap_test_and_clear | eloqsql/mysys/my_bitmap.c | my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_clear(map, bitmap_bit);
bitmap_unlock(map);
return res;
} | O3 | c | bitmap_test_and_clear:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xbe72e
cmpq $0x0, 0x40(%rdi)
jne 0xbe781
callq 0x2b230
movq (%rbx), %rax
movl %r14d, %edx
andb $0x7, %r14b
movl $0x1, %r15d
movl %r14d, %ecx
shll %cl, %r15d
shrl $0x3, %edx
movb (%rax,%rdx), %r14b
movl %r15d, %ecx
notb %cl
andb %r14b, %cl
movb %cl, (%rax,%rdx)
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0xbe770
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0xbe794
movq %rbx, %rdi
callq 0x2b1f0
andb %r15b, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4aadb(%rip), %rsi # 0x109263
movl $0x81, %edx
callq 0x324c0
jmp 0xbe72e
leaq 0x2fa46d(%rip), %rax # 0x3b8c08
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xbe768
| bitmap_test_and_clear:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, esi
mov rbx, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_BE72E
cmp qword ptr [rdi+40h], 0
jnz short loc_BE781
call _pthread_mutex_lock
loc_BE72E:
mov rax, [rbx]
mov edx, r14d
and r14b, 7
mov r15d, 1
mov ecx, r14d
shl r15d, cl
shr edx, 3
mov r14b, [rax+rdx]
mov ecx, r15d
not cl
and cl, r14b
mov [rax+rdx], cl
mov rbx, [rbx+10h]
test rbx, rbx
jz short loc_BE770
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_BE794
loc_BE768:
mov rdi, rbx
call _pthread_mutex_unlock
loc_BE770:
and r14b, r15b
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_BE781:
lea rsi, aWorkspaceLlm4b_53; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 81h
call psi_mutex_lock
jmp short loc_BE72E
loc_BE794:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_BE768
| long long bitmap_test_and_clear(_QWORD *a1, unsigned int a2)
{
unsigned int v2; // r14d
long long v4; // rdi
int v5; // r15d
long long v6; // rdx
long long v7; // rbx
long long v8; // rdi
v2 = a2;
v4 = a1[2];
if ( v4 )
{
if ( *(_QWORD *)(v4 + 64) )
psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c", 0x81u);
else
pthread_mutex_lock(v4);
}
v5 = 1 << (a2 & 7);
v6 = a2 >> 3;
LOBYTE(v2) = *(_BYTE *)(*a1 + v6);
*(_BYTE *)(*a1 + v6) = v2 & ~(_BYTE)v5;
v7 = a1[2];
if ( v7 )
{
v8 = *(_QWORD *)(v7 + 64);
if ( v8 )
((void ( *)(long long))PSI_server[44])(v8);
pthread_mutex_unlock(v7);
}
LOBYTE(v2) = v5 & v2;
return v2;
}
| bitmap_test_and_clear:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ESI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x001be72e
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x001be781
CALL 0x0012b230
LAB_001be72e:
MOV RAX,qword ptr [RBX]
MOV EDX,R14D
AND R14B,0x7
MOV R15D,0x1
MOV ECX,R14D
SHL R15D,CL
SHR EDX,0x3
MOV R14B,byte ptr [RAX + RDX*0x1]
MOV ECX,R15D
NOT CL
AND CL,R14B
MOV byte ptr [RAX + RDX*0x1],CL
MOV RBX,qword ptr [RBX + 0x10]
TEST RBX,RBX
JZ 0x001be770
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001be794
LAB_001be768:
MOV RDI,RBX
CALL 0x0012b1f0
LAB_001be770:
AND R14B,R15B
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001be781:
LEA RSI,[0x209263]
MOV EDX,0x81
CALL 0x001324c0
JMP 0x001be72e
LAB_001be794:
LEA RAX,[0x4b8c08]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001be768
|
int8 bitmap_test_and_clear(long *param_1,uint param_2)
{
byte bVar1;
pthread_mutex_t *ppVar2;
byte bVar3;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) == 0) {
pthread_mutex_lock(ppVar2);
}
else {
psi_mutex_lock(ppVar2,"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c",0x81);
}
}
bVar1 = *(byte *)(*param_1 + (ulong)(param_2 >> 3));
bVar3 = (byte)(1 << (sbyte)((ulong)param_2 & 0xffffffffffffff07));
*(byte *)(*param_1 + (ulong)(param_2 >> 3)) = ~bVar3 & bVar1;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar2);
}
return CONCAT71((int7)(((ulong)param_2 & 0xffffffffffffff07) >> 8),bVar1 & bVar3);
}
| |
44,643 | wqueue_unlink_from_queue | eloqsql/mysys/wqueue.c | void wqueue_unlink_from_queue(WQUEUE *wqueue, struct st_my_thread_var *thread)
{
if (thread->next == thread)
/* The queue contains only one member */
wqueue->last_thread= NULL;
else
{
thread->next->prev= thread->prev;
*thread->prev= thread->next;
if (wqueue->last_thread == thread)
wqueue->last_thread= STRUCT_PTR(struct st_my_thread_var, next,
thread->prev);
}
thread->next= NULL;
} | O0 | c | wqueue_unlink_from_queue:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xff67a
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
jmp 0xff6d8
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xff6d6
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rcx
addq $-0x88, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0xff6d8
movq -0x10(%rbp), %rax
movq $0x0, 0x88(%rax)
popq %rbp
retq
nopl (%rax)
| wqueue_unlink_from_queue:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+88h]
cmp rax, [rbp+var_10]
jnz short loc_FF67A
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
jmp short loc_FF6D8
loc_FF67A:
mov rax, [rbp+var_10]
mov rcx, [rax+90h]
mov rax, [rbp+var_10]
mov rax, [rax+88h]
mov [rax+90h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+88h]
mov rax, [rbp+var_10]
mov rax, [rax+90h]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rax, [rax]
cmp rax, [rbp+var_10]
jnz short loc_FF6D6
mov rax, [rbp+var_10]
mov rcx, [rax+90h]
add rcx, 0FFFFFFFFFFFFFF78h
mov rax, [rbp+var_8]
mov [rax], rcx
loc_FF6D6:
jmp short $+2
loc_FF6D8:
mov rax, [rbp+var_10]
mov qword ptr [rax+88h], 0
pop rbp
retn
| long long wqueue_unlink_from_queue(_QWORD *a1, long long a2)
{
long long result; // rax
if ( *(_QWORD *)(a2 + 136) == a2 )
{
*a1 = 0LL;
}
else
{
*(_QWORD *)(*(_QWORD *)(a2 + 136) + 144LL) = *(_QWORD *)(a2 + 144);
**(_QWORD **)(a2 + 144) = *(_QWORD *)(a2 + 136);
if ( *a1 == a2 )
*a1 = *(_QWORD *)(a2 + 144) - 136LL;
}
result = a2;
*(_QWORD *)(a2 + 136) = 0LL;
return result;
}
| wqueue_unlink_from_queue:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x88]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001ff67a
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
JMP 0x001ff6d8
LAB_001ff67a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [RAX + 0x90],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x90]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001ff6d6
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x90]
ADD RCX,-0x88
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
LAB_001ff6d6:
JMP 0x001ff6d8
LAB_001ff6d8:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],0x0
POP RBP
RET
|
void wqueue_unlink_from_queue(long *param_1,long param_2)
{
if (*(long *)(param_2 + 0x88) == param_2) {
*param_1 = 0;
}
else {
*(int8 *)(*(long *)(param_2 + 0x88) + 0x90) = *(int8 *)(param_2 + 0x90);
**(int8 **)(param_2 + 0x90) = *(int8 *)(param_2 + 0x88);
if (*param_1 == param_2) {
*param_1 = *(long *)(param_2 + 0x90) + -0x88;
}
}
*(int8 *)(param_2 + 0x88) = 0;
return;
}
| |
44,644 | hp_rb_records_in_range | eloqsql/storage/heap/hp_hash.c | ha_rows hp_rb_records_in_range(HP_INFO *info, int inx,
const key_range *min_key,
const key_range *max_key)
{
ha_rows start_pos, end_pos;
HP_KEYDEF *keyinfo= info->s->keydef + inx;
TREE *rb_tree = &keyinfo->rb_tree;
heap_rb_param custom_arg;
DBUG_ENTER("hp_rb_records_in_range");
info->lastinx= inx;
custom_arg.keyseg= keyinfo->seg;
custom_arg.search_flag= SEARCH_FIND | SEARCH_SAME;
if (min_key)
{
custom_arg.key_length= hp_rb_pack_key(keyinfo, (uchar*) info->recbuf,
(uchar*) min_key->key,
min_key->keypart_map);
start_pos= tree_record_pos(rb_tree, info->recbuf, min_key->flag,
&custom_arg);
}
else
{
start_pos= 0;
}
if (max_key)
{
custom_arg.key_length= hp_rb_pack_key(keyinfo, (uchar*) info->recbuf,
(uchar*) max_key->key,
max_key->keypart_map);
end_pos= tree_record_pos(rb_tree, info->recbuf, max_key->flag,
&custom_arg);
}
else
{
end_pos= rb_tree->elements_in_tree + (ha_rows)1;
}
DBUG_PRINT("info",("start_pos: %lu end_pos: %lu", (ulong) start_pos,
(ulong) end_pos));
if (start_pos == HA_POS_ERROR || end_pos == HA_POS_ERROR)
DBUG_RETURN(HA_POS_ERROR);
DBUG_RETURN(end_pos < start_pos ? (ha_rows) 0 :
(end_pos == start_pos ? (ha_rows) 1 : end_pos - start_pos));
} | O0 | c | hp_rb_records_in_range:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x98(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x368, %rcx, %rcx # imm = 0x368
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0x48(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
movl $0x5, -0x4c(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2723e
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
callq 0x27320
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x20(%rbp), %rax
movl 0x18(%rax), %edx
leaq -0x58(%rbp), %rcx
callq 0x33a90
movq %rax, -0x30(%rbp)
jmp 0x27246
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x27292
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
callq 0x27320
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x28(%rbp), %rax
movl 0x18(%rax), %edx
leaq -0x58(%rbp), %rcx
callq 0x33a90
movq %rax, -0x38(%rbp)
jmp 0x272a4
movq -0x48(%rbp), %rax
movl 0x20c(%rax), %eax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x272a6
jmp 0x272a8
cmpq $-0x1, -0x30(%rbp)
je 0x272b6
cmpq $-0x1, -0x38(%rbp)
jne 0x272c2
jmp 0x272b8
movq $-0x1, -0x8(%rbp)
jmp 0x27307
jmp 0x272c4
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x272d6
xorl %eax, %eax
movq %rax, -0x60(%rbp)
jmp 0x272ff
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x272eb
movl $0x1, %eax
movq %rax, -0x68(%rbp)
jmp 0x272f7
movq -0x38(%rbp), %rax
subq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| hp_rb_records_in_range:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+98h]
movsxd rcx, [rbp+var_14]
imul rcx, 368h
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
add rax, 0B8h
mov [rbp+var_48], rax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+28h], ecx
mov rax, [rbp+var_40]
mov rax, [rax+10h]
mov [rbp+var_58], rax
mov [rbp+var_4C], 5
cmp [rbp+var_20], 0
jz short loc_2723E
mov rdi, [rbp+var_40]
mov rax, [rbp+var_10]
mov rsi, [rax+48h]
mov rax, [rbp+var_20]
mov rdx, [rax]
mov rax, [rbp+var_20]
mov rcx, [rax+10h]
call hp_rb_pack_key
mov [rbp+var_50], eax
mov rdi, [rbp+var_48]
mov rax, [rbp+var_10]
mov rsi, [rax+48h]
mov rax, [rbp+var_20]
mov edx, [rax+18h]
lea rcx, [rbp+var_58]
call tree_record_pos
mov [rbp+var_30], rax
jmp short loc_27246
loc_2723E:
mov [rbp+var_30], 0
loc_27246:
cmp [rbp+var_28], 0
jz short loc_27292
mov rdi, [rbp+var_40]
mov rax, [rbp+var_10]
mov rsi, [rax+48h]
mov rax, [rbp+var_28]
mov rdx, [rax]
mov rax, [rbp+var_28]
mov rcx, [rax+10h]
call hp_rb_pack_key
mov [rbp+var_50], eax
mov rdi, [rbp+var_48]
mov rax, [rbp+var_10]
mov rsi, [rax+48h]
mov rax, [rbp+var_28]
mov edx, [rax+18h]
lea rcx, [rbp+var_58]
call tree_record_pos
mov [rbp+var_38], rax
jmp short loc_272A4
loc_27292:
mov rax, [rbp+var_48]
mov eax, [rax+20Ch]
add rax, 1
mov [rbp+var_38], rax
loc_272A4:
jmp short $+2
loc_272A6:
jmp short $+2
loc_272A8:
cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh
jz short loc_272B6
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jnz short loc_272C2
loc_272B6:
jmp short $+2
loc_272B8:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_27307
loc_272C2:
jmp short $+2
loc_272C4:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_30]
jnb short loc_272D6
xor eax, eax
mov [rbp+var_60], rax
jmp short loc_272FF
loc_272D6:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_30]
jnz short loc_272EB
mov eax, 1
mov [rbp+var_68], rax
jmp short loc_272F7
loc_272EB:
mov rax, [rbp+var_38]
sub rax, [rbp+var_30]
mov [rbp+var_68], rax
loc_272F7:
mov rax, [rbp+var_68]
mov [rbp+var_60], rax
loc_272FF:
mov rax, [rbp+var_60]
mov [rbp+var_8], rax
loc_27307:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long hp_rb_records_in_range(_DWORD *a1, int a2, long long a3, long long a4)
{
long long v7; // [rsp+18h] [rbp-58h] BYREF
int v8; // [rsp+20h] [rbp-50h]
int v9; // [rsp+24h] [rbp-4Ch]
long long v10; // [rsp+28h] [rbp-48h]
long long v11; // [rsp+30h] [rbp-40h]
unsigned long long v12; // [rsp+38h] [rbp-38h]
unsigned long long v13; // [rsp+40h] [rbp-30h]
long long v14; // [rsp+48h] [rbp-28h]
long long v15; // [rsp+50h] [rbp-20h]
int v16; // [rsp+5Ch] [rbp-14h]
_DWORD *v17; // [rsp+60h] [rbp-10h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v11 = 872LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 152LL);
v10 = v11 + 184;
a1[10] = a2;
v7 = *(_QWORD *)(v11 + 16);
v9 = 5;
if ( v15 )
{
v8 = hp_rb_pack_key(v11, *((_QWORD *)v17 + 9), *(_QWORD *)v15, *(_QWORD *)(v15 + 16));
v13 = tree_record_pos(v10, *((_QWORD *)v17 + 9), *(unsigned int *)(v15 + 24), &v7);
}
else
{
v13 = 0LL;
}
if ( v14 )
{
v8 = hp_rb_pack_key(v11, *((_QWORD *)v17 + 9), *(_QWORD *)v14, *(_QWORD *)(v14 + 16));
v12 = tree_record_pos(v10, *((_QWORD *)v17 + 9), *(unsigned int *)(v14 + 24), &v7);
}
else
{
v12 = *(unsigned int *)(v10 + 524) + 1LL;
}
if ( v13 == -1LL || v12 == -1LL )
return -1LL;
if ( v12 < v13 )
return 0LL;
if ( v12 == v13 )
return 1LL;
else
return v12 - v13;
}
| hp_rb_records_in_range:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x98]
MOVSXD RCX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x368
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0xb8
MOV qword ptr [RBP + -0x48],RAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],ECX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV dword ptr [RBP + -0x4c],0x5
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0012723e
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x10]
CALL 0x00127320
MOV dword ptr [RBP + -0x50],EAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX + 0x18]
LEA RCX,[RBP + -0x58]
CALL 0x00133a90
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00127246
LAB_0012723e:
MOV qword ptr [RBP + -0x30],0x0
LAB_00127246:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00127292
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x10]
CALL 0x00127320
MOV dword ptr [RBP + -0x50],EAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RAX + 0x18]
LEA RCX,[RBP + -0x58]
CALL 0x00133a90
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001272a4
LAB_00127292:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x20c]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_001272a4:
JMP 0x001272a6
LAB_001272a6:
JMP 0x001272a8
LAB_001272a8:
CMP qword ptr [RBP + -0x30],-0x1
JZ 0x001272b6
CMP qword ptr [RBP + -0x38],-0x1
JNZ 0x001272c2
LAB_001272b6:
JMP 0x001272b8
LAB_001272b8:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00127307
LAB_001272c2:
JMP 0x001272c4
LAB_001272c4:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001272d6
XOR EAX,EAX
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001272ff
LAB_001272d6:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001272eb
MOV EAX,0x1
MOV qword ptr [RBP + -0x68],RAX
JMP 0x001272f7
LAB_001272eb:
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x68],RAX
LAB_001272f7:
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x60],RAX
LAB_001272ff:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x8],RAX
LAB_00127307:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
long hp_rb_records_in_range(long *param_1,int param_2,int8 *param_3,int8 *param_4)
{
long local_70;
long local_68;
int8 local_60;
int4 local_58;
int4 local_54;
long local_50;
long local_48;
ulong local_40;
ulong local_38;
int8 *local_30;
int8 *local_28;
int local_1c;
long *local_18;
long local_10;
local_48 = *(long *)(*param_1 + 0x98) + (long)param_2 * 0x368;
local_50 = local_48 + 0xb8;
*(int *)(param_1 + 5) = param_2;
local_60 = *(int8 *)(local_48 + 0x10);
local_54 = 5;
local_30 = param_4;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
if (param_3 == (int8 *)0x0) {
local_38 = 0;
}
else {
local_58 = hp_rb_pack_key(local_48,param_1[9],*param_3,param_3[2]);
local_38 = tree_record_pos(local_50,local_18[9],*(int4 *)(local_28 + 3),&local_60);
}
if (local_30 == (int8 *)0x0) {
local_40 = (ulong)*(uint *)(local_50 + 0x20c) + 1;
}
else {
local_58 = hp_rb_pack_key(local_48,local_18[9],*local_30,local_30[2]);
local_40 = tree_record_pos(local_50,local_18[9],*(int4 *)(local_30 + 3),&local_60);
}
if ((local_38 == 0xffffffffffffffff) || (local_40 == 0xffffffffffffffff)) {
local_10 = -1;
}
else {
if (local_40 < local_38) {
local_68 = 0;
}
else {
if (local_40 == local_38) {
local_70 = 1;
}
else {
local_70 = local_40 - local_38;
}
local_68 = local_70;
}
local_10 = local_68;
}
return local_10;
}
| |
44,645 | hp_rb_records_in_range | eloqsql/storage/heap/hp_hash.c | ha_rows hp_rb_records_in_range(HP_INFO *info, int inx,
const key_range *min_key,
const key_range *max_key)
{
ha_rows start_pos, end_pos;
HP_KEYDEF *keyinfo= info->s->keydef + inx;
TREE *rb_tree = &keyinfo->rb_tree;
heap_rb_param custom_arg;
DBUG_ENTER("hp_rb_records_in_range");
info->lastinx= inx;
custom_arg.keyseg= keyinfo->seg;
custom_arg.search_flag= SEARCH_FIND | SEARCH_SAME;
if (min_key)
{
custom_arg.key_length= hp_rb_pack_key(keyinfo, (uchar*) info->recbuf,
(uchar*) min_key->key,
min_key->keypart_map);
start_pos= tree_record_pos(rb_tree, info->recbuf, min_key->flag,
&custom_arg);
}
else
{
start_pos= 0;
}
if (max_key)
{
custom_arg.key_length= hp_rb_pack_key(keyinfo, (uchar*) info->recbuf,
(uchar*) max_key->key,
max_key->keypart_map);
end_pos= tree_record_pos(rb_tree, info->recbuf, max_key->flag,
&custom_arg);
}
else
{
end_pos= rb_tree->elements_in_tree + (ha_rows)1;
}
DBUG_PRINT("info",("start_pos: %lu end_pos: %lu", (ulong) start_pos,
(ulong) end_pos));
if (start_pos == HA_POS_ERROR || end_pos == HA_POS_ERROR)
DBUG_RETURN(HA_POS_ERROR);
DBUG_RETURN(end_pos < start_pos ? (ha_rows) 0 :
(end_pos == start_pos ? (ha_rows) 1 : end_pos - start_pos));
} | O3 | c | hp_rb_records_in_range:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rdi, %r14
movq (%rdi), %rax
movq 0x98(%rax), %rax
movslq %esi, %rcx
imulq $0x368, %rcx, %rdx # imm = 0x368
leaq (%rax,%rdx), %r13
leaq (%rax,%rdx), %r15
addq $0xb8, %r15
movl %ecx, 0x28(%rdi)
movq -0xa8(%r15), %rax
movq %rax, -0x38(%rbp)
movl $0x5, -0x2c(%rbp)
testq %r12, %r12
je 0x26889
movq 0x48(%r14), %rsi
movq (%r12), %rdx
movq 0x10(%r12), %rcx
movq %r13, %rdi
callq 0x268fd
leaq -0x38(%rbp), %rcx
movl %eax, 0x8(%rcx)
movq 0x48(%r14), %rsi
movl 0x18(%r12), %edx
movq %r15, %rdi
callq 0x2d723
movq %rax, %r12
jmp 0x2688c
xorl %r12d, %r12d
testq %rbx, %rbx
je 0x268bc
movq 0x48(%r14), %rsi
movq (%rbx), %rdx
movq 0x10(%rbx), %rcx
movq %r13, %rdi
callq 0x268fd
leaq -0x38(%rbp), %rcx
movl %eax, 0x8(%rcx)
movq 0x48(%r14), %rsi
movl 0x18(%rbx), %edx
movq %r15, %rdi
callq 0x2d723
jmp 0x268c6
movl 0x2c4(%r13), %eax
incq %rax
movq $-0x1, %rcx
cmpq $-0x1, %r12
je 0x268eb
cmpq $-0x1, %rax
je 0x268eb
xorl %ecx, %ecx
subq %r12, %rax
movl $0x1, %edx
cmovneq %rax, %rdx
cmovaeq %rdx, %rcx
movq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| hp_rb_records_in_range:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rcx
mov r12, rdx
mov r14, rdi
mov rax, [rdi]
mov rax, [rax+98h]
movsxd rcx, esi
imul rdx, rcx, 368h
lea r13, [rax+rdx]
lea r15, [rax+rdx]
add r15, 0B8h
mov [rdi+28h], ecx
mov rax, [r15-0A8h]
mov [rbp+var_38], rax
mov [rbp+var_2C], 5
test r12, r12
jz short loc_26889
mov rsi, [r14+48h]
mov rdx, [r12]
mov rcx, [r12+10h]
mov rdi, r13
call hp_rb_pack_key
lea rcx, [rbp+var_38]
mov [rcx+8], eax
mov rsi, [r14+48h]
mov edx, [r12+18h]
mov rdi, r15
call tree_record_pos
mov r12, rax
jmp short loc_2688C
loc_26889:
xor r12d, r12d
loc_2688C:
test rbx, rbx
jz short loc_268BC
mov rsi, [r14+48h]
mov rdx, [rbx]
mov rcx, [rbx+10h]
mov rdi, r13
call hp_rb_pack_key
lea rcx, [rbp+var_38]
mov [rcx+8], eax
mov rsi, [r14+48h]
mov edx, [rbx+18h]
mov rdi, r15
call tree_record_pos
jmp short loc_268C6
loc_268BC:
mov eax, [r13+2C4h]
inc rax
loc_268C6:
mov rcx, 0FFFFFFFFFFFFFFFFh
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_268EB
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_268EB
xor ecx, ecx
sub rax, r12
mov edx, 1
cmovnz rdx, rax
cmovnb rcx, rdx
loc_268EB:
mov rax, rcx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long hp_rb_records_in_range(long long a1, int a2, long long a3, long long a4)
{
long long v6; // r13
unsigned long long v7; // r12
unsigned long long v8; // rax
long long v9; // rcx
bool v10; // cf
long long v11; // rax
long long v12; // rdx
v6 = *(_QWORD *)(*(_QWORD *)a1 + 152LL) + 872LL * a2;
*(_DWORD *)(a1 + 40) = a2;
if ( a3 )
{
hp_rb_pack_key(v6, *(_QWORD *)(a1 + 72), *(_QWORD *)a3, *(_QWORD *)(a3 + 16));
v7 = tree_record_pos(v6 + 184, *(_QWORD *)(a1 + 72), *(unsigned int *)(a3 + 24));
}
else
{
v7 = 0LL;
}
if ( a4 )
{
hp_rb_pack_key(v6, *(_QWORD *)(a1 + 72), *(_QWORD *)a4, *(_QWORD *)(a4 + 16));
v8 = tree_record_pos(v6 + 184, *(_QWORD *)(a1 + 72), *(unsigned int *)(a4 + 24));
}
else
{
v8 = *(unsigned int *)(v6 + 708) + 1LL;
}
v9 = -1LL;
if ( v7 != -1LL && v8 != -1LL )
{
v9 = 0LL;
v10 = v8 < v7;
v11 = v8 - v7;
v12 = 1LL;
if ( v11 )
v12 = v11;
if ( !v10 )
return v12;
}
return v9;
}
| hp_rb_records_in_range:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RCX
MOV R12,RDX
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x98]
MOVSXD RCX,ESI
IMUL RDX,RCX,0x368
LEA R13,[RAX + RDX*0x1]
LEA R15,[RAX + RDX*0x1]
ADD R15,0xb8
MOV dword ptr [RDI + 0x28],ECX
MOV RAX,qword ptr [R15 + -0xa8]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x2c],0x5
TEST R12,R12
JZ 0x00126889
MOV RSI,qword ptr [R14 + 0x48]
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x10]
MOV RDI,R13
CALL 0x001268fd
LEA RCX,[RBP + -0x38]
MOV dword ptr [RCX + 0x8],EAX
MOV RSI,qword ptr [R14 + 0x48]
MOV EDX,dword ptr [R12 + 0x18]
MOV RDI,R15
CALL 0x0012d723
MOV R12,RAX
JMP 0x0012688c
LAB_00126889:
XOR R12D,R12D
LAB_0012688c:
TEST RBX,RBX
JZ 0x001268bc
MOV RSI,qword ptr [R14 + 0x48]
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDI,R13
CALL 0x001268fd
LEA RCX,[RBP + -0x38]
MOV dword ptr [RCX + 0x8],EAX
MOV RSI,qword ptr [R14 + 0x48]
MOV EDX,dword ptr [RBX + 0x18]
MOV RDI,R15
CALL 0x0012d723
JMP 0x001268c6
LAB_001268bc:
MOV EAX,dword ptr [R13 + 0x2c4]
INC RAX
LAB_001268c6:
MOV RCX,-0x1
CMP R12,-0x1
JZ 0x001268eb
CMP RAX,-0x1
JZ 0x001268eb
XOR ECX,ECX
SUB RAX,R12
MOV EDX,0x1
CMOVNZ RDX,RAX
CMOVNC RCX,RDX
LAB_001268eb:
MOV RAX,RCX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long hp_rb_records_in_range(long *param_1,int param_2,int8 *param_3,int8 *param_4)
{
ulong uVar1;
ulong uVar2;
long lVar3;
long lVar4;
lVar3 = *(long *)(*param_1 + 0x98) + (long)param_2 * 0x368;
lVar4 = *(long *)(*param_1 + 0x98) + (long)param_2 * 0x368 + 0xb8;
*(int *)(param_1 + 5) = param_2;
if (param_3 == (int8 *)0x0) {
uVar1 = 0;
}
else {
hp_rb_pack_key(lVar3,param_1[9],*param_3,param_3[2]);
uVar1 = tree_record_pos(lVar4,param_1[9],*(int4 *)(param_3 + 3));
}
if (param_4 == (int8 *)0x0) {
uVar2 = (ulong)*(uint *)(lVar3 + 0x2c4) + 1;
}
else {
hp_rb_pack_key(lVar3,param_1[9],*param_4,param_4[2]);
uVar2 = tree_record_pos(lVar4,param_1[9],*(int4 *)(param_4 + 3));
}
lVar3 = -1;
if ((uVar1 != 0xffffffffffffffff) && (uVar2 != 0xffffffffffffffff)) {
lVar4 = 1;
if (uVar2 - uVar1 != 0) {
lVar4 = uVar2 - uVar1;
}
lVar3 = 0;
if (uVar1 <= uVar2) {
lVar3 = lVar4;
}
}
return lVar3;
}
| |
44,646 | ma_update_at_original_place | eloqsql/storage/maria/ma_blockrec.c | static my_bool _ma_update_at_original_place(MARIA_HA *info,
pgcache_page_no_t page,
uint rownr,
uint length_on_head_page,
uint extent_count,
const uchar *extent_info,
const uchar *oldrec,
const uchar *record,
LSN undo_lsn)
{
MARIA_BITMAP_BLOCKS *blocks;
MARIA_BITMAP_BLOCK *block;
MARIA_ROW *cur_row= &info->cur_row, *new_row= &info->new_row;
MARIA_PINNED_PAGE page_link;
MARIA_SHARE *share= info->s;
ha_checksum old_checksum;
uint org_empty_size, empty_size;
uint block_size= info->s->block_size;
uchar *dir, *buff;
struct st_row_pos_info row_pos;
my_bool res;
uint rec_offset, length;
DBUG_ENTER("_ma_update_at_original_place");
#ifdef ENABLE_IF_PROBLEM_WITH_UPDATE
DBUG_DUMP("oldrec", oldrec, share->base.reclength);
DBUG_DUMP("newrec", record, share->base.reclength);
#endif
/*
Checksums of new and old rows were computed by callers already; new
row's was put into cur_row, old row's was put into new_row.
*/
old_checksum= new_row->checksum;
new_row->checksum= cur_row->checksum;
calc_record_size(info, record, new_row);
_ma_bitmap_flushable(info, 1);
buff= pagecache_read(share->pagecache,
&info->dfile, (pgcache_page_no_t) page, 0, 0,
share->page_type,
PAGECACHE_LOCK_WRITE, &page_link.link);
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= buff != 0;
push_dynamic(&info->pinned_pages, (void*) &page_link);
if (!buff)
{
_ma_set_fatal_error(info, my_errno);
goto err;
}
org_empty_size= uint2korr(buff + EMPTY_SPACE_OFFSET);
dir= dir_entry_pos(buff, block_size, rownr);
if ((org_empty_size + cur_row->head_length) < length_on_head_page)
{
DBUG_PRINT("error",
("org_empty_size: %u head_length: %u length_on_page: %u",
org_empty_size, (uint) cur_row->head_length,
length_on_head_page));
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
goto err;
}
/*
We can fit the new row in the same page as the original head part
of the row
*/
empty_size= org_empty_size;
if (extend_area_on_page(info, buff, dir, rownr,
length_on_head_page, &empty_size,
&rec_offset, &length, 1))
goto err;
row_pos.buff= buff;
row_pos.rownr= rownr;
row_pos.empty_space= empty_size;
row_pos.dir= dir;
row_pos.data= buff + rec_offset;
/* Delete old row */
if (*cur_row->tail_positions &&
delete_tails(info, cur_row->tail_positions))
goto err;
if (cur_row->extents_count && free_full_pages(info, cur_row))
goto err;
/* Change extent information to be usable by write_block_record() */
blocks= &cur_row->insert_blocks;
if (extent_to_bitmap_blocks(info, blocks, page, extent_count, extent_info))
goto err;
block= blocks->block;
block->empty_space= row_pos.empty_space;
block->org_bitmap_value=
_ma_free_size_to_head_pattern(&share->bitmap,
(enough_free_entries_on_page(share, buff) ?
org_empty_size : 0));
DBUG_ASSERT(block->org_bitmap_value ==
_ma_bitmap_get_page_bits(info, &info->s->bitmap, page));
block->used|= BLOCKUSED_USE_ORG_BITMAP;
/*
We have to use <= below as the new_row may be smaller than the original
row as the new row doesn't have transaction id
*/
DBUG_ASSERT(blocks->count > 1 ||
MY_MAX(new_row->total_length, share->base.min_block_length) <=
length_on_head_page);
/* Store same amount of data on head page as on original page */
row_pos.length= (length_on_head_page -
(extent_count + 1 - blocks->count) * ROW_EXTENT_SIZE);
set_if_bigger(row_pos.length, share->base.min_block_length);
if ((res= write_block_record(info, oldrec, record, new_row, blocks,
1, &row_pos, undo_lsn, old_checksum)))
goto err;
DBUG_RETURN(0);
err:
DBUG_ASSERT(!maria_assert_if_crashed_table);
_ma_mark_file_crashed(share);
if (info->non_flushable_state)
_ma_bitmap_flushable(info, -1);
_ma_unpin_all_pages_and_finalize_row(info, LSN_IMPOSSIBLE);
DBUG_RETURN(1);
} | O0 | c | ma_update_at_original_place:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
addq $0x140, %rax # imm = 0x140
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x80(%rbp)
movq -0x50(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x48(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x750e0
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x43840
movq -0x70(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x470, %rsi # imm = 0x470
movq -0x18(%rbp), %rdx
movq -0x70(%rbp), %rax
movl 0x7d4(%rax), %r9d
leaq -0x68(%rbp), %rax
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x4, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2d970
movq %rax, -0x90(%rbp)
movl $0x6, -0x60(%rbp)
cmpq $0x0, -0x90(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x58(%rbp)
movq -0x10(%rbp), %rdi
addq $0x2e8, %rdi # imm = 0x2E8
leaq -0x68(%rbp), %rsi
callq 0xda940
cmpq $0x0, -0x90(%rbp)
jne 0x7f82c
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
callq 0xf60c0
movq -0xd0(%rbp), %rdi
movl (%rax), %esi
callq 0x338b0
jmp 0x7fa9f
movq -0x90(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x78(%rbp)
movq -0x90(%rbp), %rdi
movl -0x80(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x75000
movq %rax, -0x88(%rbp)
movl -0x78(%rbp), %eax
movq -0x48(%rbp), %rcx
addl 0xa0(%rcx), %eax
cmpl -0x20(%rbp), %eax
jae 0x7f87c
jmp 0x7f867
jmp 0x7f869
movq -0x10(%rbp), %rdi
movl $0x7f, %esi
callq 0x338b0
jmp 0x7fa9f
movl -0x78(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
leaq -0x7c(%rbp), %r9
leaq -0xc0(%rbp), %r10
leaq -0xc4(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
callq 0x7a340
cmpb $0x0, %al
je 0x7f8cc
jmp 0x7fa9f
movq -0x90(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x98(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x90(%rbp), %rax
movl -0xc0(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, (%rax)
je 0x7f93d
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x76ae0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x7f93d
jmp 0x7fa9f
movq -0x48(%rbp), %rax
cmpl $0x0, 0xac(%rax)
je 0x7f964
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x76b70
movsbl %al, %eax
cmpl $0x0, %eax
je 0x7f964
jmp 0x7fa9f
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
callq 0x7c8c0
cmpb $0x0, %al
je 0x7f98d
jmp 0x7fa9f
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl -0x98(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x70(%rbp), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0xd8(%rbp)
movq -0x70(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x74670
movsbl %al, %eax
cmpl $0x0, %eax
je 0x7f9d9
movl -0x78(%rbp), %eax
movl %eax, -0xdc(%rbp)
jmp 0x7f9e3
xorl %eax, %eax
movl %eax, -0xdc(%rbp)
jmp 0x7f9e3
movq -0xd8(%rbp), %rdi
movl -0xdc(%rbp), %esi
callq 0x42500
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x15(%rax)
jmp 0x7fa00
movq -0x40(%rbp), %rax
movzbl 0x14(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x14(%rax)
jmp 0x7fa10
movl -0x20(%rbp), %eax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movq -0x38(%rbp), %rdx
subl 0x8(%rdx), %ecx
imull $0x7, %ecx, %ecx
subl %ecx, %eax
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
movq -0x70(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x7fa4f
movq -0x70(%rbp), %rax
movq 0x3b8(%rax), %rax
movl %eax, -0xa0(%rbp)
jmp 0x7fa51
movq -0x10(%rbp), %rdi
movq 0x10(%rbp), %rsi
movq 0x18(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %r8
movq 0x20(%rbp), %r10
movl -0x74(%rbp), %eax
movl $0x1, %r9d
leaq -0xb8(%rbp), %r11
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x7cdd0
movb %al, -0xb9(%rbp)
cmpb $0x0, %al
je 0x7fa97
jmp 0x7fa9f
jmp 0x7fa99
movb $0x0, -0x1(%rbp)
jmp 0x7fad8
jmp 0x7faa1
jmp 0x7faa3
movq -0x70(%rbp), %rdi
callq 0x36250
movq -0x10(%rbp), %rax
cmpl $0x0, 0x644(%rax)
je 0x7fac7
movq -0x10(%rbp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x43840
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x760f0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_update_at_original_place:
push rbp
mov rbp, rsp
sub rsp, 100h
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_20], ecx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
add rax, 80h
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
add rax, 140h
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_70], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+7BCh]
mov [rbp+var_80], eax
mov rax, [rbp+var_50]
mov eax, [rax+30h]
mov [rbp+var_74], eax
mov rax, [rbp+var_48]
mov ecx, [rax+30h]
mov rax, [rbp+var_50]
mov [rax+30h], ecx
mov rdi, [rbp+var_10]
mov rsi, [rbp+arg_8]
mov rdx, [rbp+var_50]
call calc_record_size
mov rdi, [rbp+var_10]
mov esi, 1
call _ma_bitmap_flushable
mov rax, [rbp+var_70]
mov rdi, [rax+600h]
mov rsi, [rbp+var_10]
add rsi, 470h
mov rdx, [rbp+var_18]
mov rax, [rbp+var_70]
mov r9d, [rax+7D4h]
lea rax, [rbp+var_68]
xor ecx, ecx
xor r8d, r8d
mov dword ptr [rsp+100h+var_100], 4
mov [rsp+100h+var_F8], rax
call pagecache_read
mov [rbp+var_90], rax
mov [rbp+var_60], 6
cmp [rbp+var_90], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_58], al
mov rdi, [rbp+var_10]
add rdi, 2E8h
lea rsi, [rbp+var_68]
call insert_dynamic
cmp [rbp+var_90], 0
jnz short loc_7F82C
mov rax, [rbp+var_10]
mov [rbp+var_D0], rax
call _my_thread_var
mov rdi, [rbp+var_D0]
mov esi, [rax]
call _ma_set_fatal_error
jmp loc_7FA9F
loc_7F82C:
mov rax, [rbp+var_90]
movzx eax, word ptr [rax+0Ah]
mov [rbp+var_78], eax
mov rdi, [rbp+var_90]
mov esi, [rbp+var_80]
mov edx, [rbp+var_1C]
call dir_entry_pos
mov [rbp+var_88], rax
mov eax, [rbp+var_78]
mov rcx, [rbp+var_48]
add eax, [rcx+0A0h]
cmp eax, [rbp+var_20]
jnb short loc_7F87C
jmp short $+2
loc_7F867:
jmp short $+2
loc_7F869:
mov rdi, [rbp+var_10]
mov esi, 7Fh
call _ma_set_fatal_error
jmp loc_7FA9F
loc_7F87C:
mov eax, [rbp+var_78]
mov [rbp+var_7C], eax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_90]
mov rdx, [rbp+var_88]
mov ecx, [rbp+var_1C]
mov r8d, [rbp+var_20]
lea r9, [rbp+var_7C]
lea r10, [rbp+var_C0]
lea rax, [rbp+var_C4]
mov [rsp+100h+var_100], r10
mov [rsp+100h+var_F8], rax
mov [rsp+100h+var_F0], 1
call extend_area_on_page
cmp al, 0
jz short loc_7F8CC
jmp loc_7FA9F
loc_7F8CC:
mov rax, [rbp+var_90]
mov [rbp+var_B8], rax
mov eax, [rbp+var_1C]
mov [rbp+var_9C], eax
mov eax, [rbp+var_7C]
mov [rbp+var_98], eax
mov rax, [rbp+var_88]
mov [rbp+var_A8], rax
mov rax, [rbp+var_90]
mov ecx, [rbp+var_C0]
add rax, rcx
mov [rbp+var_B0], rax
mov rax, [rbp+var_48]
mov rax, [rax+28h]
cmp qword ptr [rax], 0
jz short loc_7F93D
mov rdi, [rbp+var_10]
mov rax, [rbp+var_48]
mov rsi, [rax+28h]
call delete_tails
movsx eax, al
cmp eax, 0
jz short loc_7F93D
jmp loc_7FA9F
loc_7F93D:
mov rax, [rbp+var_48]
cmp dword ptr [rax+0ACh], 0
jz short loc_7F964
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_48]
call free_full_pages
movsx eax, al
cmp eax, 0
jz short loc_7F964
jmp loc_7FA9F
loc_7F964:
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_30]
call extent_to_bitmap_blocks
cmp al, 0
jz short loc_7F98D
jmp loc_7FA9F
loc_7F98D:
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_40], rax
mov ecx, [rbp+var_98]
mov rax, [rbp+var_40]
mov [rax+0Ch], ecx
mov rax, [rbp+var_70]
add rax, 0A10h
mov [rbp+var_D8], rax
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_90]
call enough_free_entries_on_page
movsx eax, al
cmp eax, 0
jz short loc_7F9D9
mov eax, [rbp+var_78]
mov [rbp+var_DC], eax
jmp short loc_7F9E3
loc_7F9D9:
xor eax, eax
mov [rbp+var_DC], eax
jmp short $+2
loc_7F9E3:
mov rdi, [rbp+var_D8]
mov esi, [rbp+var_DC]
call _ma_free_size_to_head_pattern
mov cl, al
mov rax, [rbp+var_40]
mov [rax+15h], cl
jmp short $+2
loc_7FA00:
mov rax, [rbp+var_40]
movzx ecx, byte ptr [rax+14h]
or ecx, 2
mov [rax+14h], cl
jmp short $+2
loc_7FA10:
mov eax, [rbp+var_20]
mov ecx, [rbp+var_24]
add ecx, 1
mov rdx, [rbp+var_38]
sub ecx, [rdx+8]
imul ecx, 7
sub eax, ecx
mov [rbp+var_A0], eax
mov eax, [rbp+var_A0]
mov rcx, [rbp+var_70]
cmp rax, [rcx+3B8h]
jnb short loc_7FA4F
mov rax, [rbp+var_70]
mov rax, [rax+3B8h]
mov [rbp+var_A0], eax
loc_7FA4F:
jmp short $+2
loc_7FA51:
mov rdi, [rbp+var_10]
mov rsi, [rbp+arg_0]
mov rdx, [rbp+arg_8]
mov rcx, [rbp+var_50]
mov r8, [rbp+var_38]
mov r10, [rbp+arg_10]
mov eax, [rbp+var_74]
mov r9d, 1
lea r11, [rbp+var_B8]
mov [rsp+100h+var_100], r11
mov [rsp+100h+var_F8], r10
mov [rsp+100h+var_F0], eax
call write_block_record
mov [rbp+var_B9], al
cmp al, 0
jz short loc_7FA97
jmp short loc_7FA9F
loc_7FA97:
jmp short $+2
loc_7FA99:
mov [rbp+var_1], 0
jmp short loc_7FAD8
loc_7FA9F:
jmp short $+2
loc_7FAA1:
jmp short $+2
loc_7FAA3:
mov rdi, [rbp+var_70]
call _ma_mark_file_crashed
mov rax, [rbp+var_10]
cmp dword ptr [rax+644h], 0
jz short loc_7FAC7
mov rdi, [rbp+var_10]
mov esi, 0FFFFFFFFh
call _ma_bitmap_flushable
loc_7FAC7:
mov rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call _ma_unpin_all_pages_and_finalize_row_0
mov [rbp+var_1], 1
loc_7FAD8:
mov al, [rbp+var_1]
add rsp, 100h
pop rbp
retn
| char ma_update_at_original_place(
long long a1,
long long a2,
unsigned int a3,
unsigned int a4,
unsigned int a5,
long long a6,
long long a7,
long long a8,
long long *a9)
{
long long *v9; // rdi
int *v10; // rax
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
int v14; // r9d
long long v15; // rdx
long long v16; // r8
int v17; // r9d
char v18; // al
_DWORD *v20; // [rsp+28h] [rbp-D8h]
long long *v21; // [rsp+30h] [rbp-D0h]
unsigned int v22; // [rsp+3Ch] [rbp-C4h] BYREF
int v23; // [rsp+40h] [rbp-C0h] BYREF
_QWORD v25[3]; // [rsp+48h] [rbp-B8h] BYREF
unsigned int v26; // [rsp+60h] [rbp-A0h]
unsigned int v27; // [rsp+64h] [rbp-9Ch]
unsigned int v28; // [rsp+68h] [rbp-98h]
_BYTE *v29; // [rsp+70h] [rbp-90h]
unsigned __int16 *v30; // [rsp+78h] [rbp-88h]
unsigned int v31; // [rsp+80h] [rbp-80h]
unsigned int v32; // [rsp+84h] [rbp-7Ch] BYREF
unsigned int v33; // [rsp+88h] [rbp-78h]
int v34; // [rsp+8Ch] [rbp-74h]
long long v35; // [rsp+90h] [rbp-70h]
char v36[8]; // [rsp+98h] [rbp-68h] BYREF
int v37; // [rsp+A0h] [rbp-60h]
bool v38; // [rsp+A8h] [rbp-58h]
unsigned long long v39; // [rsp+B0h] [rbp-50h]
long long v40; // [rsp+B8h] [rbp-48h]
long long v41; // [rsp+C0h] [rbp-40h]
long long *v42; // [rsp+C8h] [rbp-38h]
long long v43; // [rsp+D0h] [rbp-30h]
unsigned int v44; // [rsp+DCh] [rbp-24h]
unsigned int v45; // [rsp+E0h] [rbp-20h]
unsigned int v46; // [rsp+E4h] [rbp-1Ch]
long long v47; // [rsp+E8h] [rbp-18h]
long long *v48; // [rsp+F0h] [rbp-10h]
v48 = (long long *)a1;
v47 = a2;
v46 = a3;
v45 = a4;
v44 = a5;
v43 = a6;
v40 = a1 + 128;
v39 = a1 + 320;
v35 = *(_QWORD *)a1;
v31 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL);
v34 = *(_DWORD *)(a1 + 368);
*(_DWORD *)(a1 + 368) = *(_DWORD *)(a1 + 176);
calc_record_size(v48, a8, v39);
ma_bitmap_flushable(v48, 1);
v29 = (_BYTE *)pagecache_read(
*(_QWORD **)(v35 + 1536),
(long long)(v48 + 142),
v47,
0,
0LL,
*(_DWORD *)(v35 + 2004),
4u,
v36);
v37 = 6;
v38 = v29 != 0LL;
v9 = v48 + 93;
insert_dynamic(v48 + 93, v36);
if ( v29 )
{
v33 = *((unsigned __int16 *)v29 + 5);
v30 = (unsigned __int16 *)dir_entry_pos((long long)v29, v31, v46);
if ( *(_DWORD *)(v40 + 160) + v33 >= v45 )
{
v32 = v33;
if ( !extend_area_on_page(v48, (long long)v29, v30, v46, v45, &v32, &v23, &v22, 1) )
{
v25[0] = v29;
v27 = v46;
v28 = v32;
v25[2] = v30;
v25[1] = &v29[v23];
if ( (!**(_QWORD **)(v40 + 40) || !delete_tails(v48, *(unsigned long long **)(v40 + 40)))
&& (!*(_DWORD *)(v40 + 172) || !free_full_pages(v48, v40)) )
{
v42 = (long long *)v40;
if ( !extent_to_bitmap_blocks(v48, v40, v47, v44, v43) )
{
v41 = *v42;
*(_DWORD *)(v41 + 12) = v28;
v20 = (_DWORD *)(v35 + 2576);
if ( enough_free_entries_on_page(v35, v29) )
v18 = ma_free_size_to_head_pattern(v20, v33);
else
v18 = ma_free_size_to_head_pattern(v20, 0);
*(_BYTE *)(v41 + 21) = v18;
*(_BYTE *)(v41 + 20) |= 2u;
v26 = v45 - 7 * (v44 + 1 - *((_DWORD *)v42 + 2));
if ( (unsigned long long)v26 < *(_QWORD *)(v35 + 952) )
v26 = *(_QWORD *)(v35 + 952);
if ( !write_block_record(v48, a7, a8, v39, v42, 1, (long long)v25, a9, v34) )
return 0;
}
}
}
}
else
{
ma_set_fatal_error(v48, 127, v15, v40, v16, v17);
}
}
else
{
v21 = v48;
v10 = (int *)my_thread_var(v9, v36);
ma_set_fatal_error(v21, *v10, v11, v12, v13, v14);
}
ma_mark_file_crashed(v35);
if ( *((_DWORD *)v48 + 401) )
ma_bitmap_flushable(v48, -1);
ma_unpin_all_pages_and_finalize_row_0((long long)v48, 0LL);
return 1;
}
| _ma_update_at_original_place:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV dword ptr [RBP + -0x20],ECX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x80
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x140
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x80],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x30]
MOV dword ptr [RBP + -0x74],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX + 0x30],ECX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x001750e0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x00143840
MOV RAX,qword ptr [RBP + -0x70]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x470
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x70]
MOV R9D,dword ptr [RAX + 0x7d4]
LEA RAX,[RBP + -0x68]
XOR ECX,ECX
XOR R8D,R8D
MOV dword ptr [RSP],0x4
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0012d970
MOV qword ptr [RBP + -0x90],RAX
MOV dword ptr [RBP + -0x60],0x6
CMP qword ptr [RBP + -0x90],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x58],AL
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x2e8
LEA RSI,[RBP + -0x68]
CALL 0x001da940
CMP qword ptr [RBP + -0x90],0x0
JNZ 0x0017f82c
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xd0],RAX
CALL 0x001f60c0
MOV RDI,qword ptr [RBP + -0xd0]
MOV ESI,dword ptr [RAX]
CALL 0x001338b0
JMP 0x0017fa9f
LAB_0017f82c:
MOV RAX,qword ptr [RBP + -0x90]
MOVZX EAX,word ptr [RAX + 0xa]
MOV dword ptr [RBP + -0x78],EAX
MOV RDI,qword ptr [RBP + -0x90]
MOV ESI,dword ptr [RBP + -0x80]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x00175000
MOV qword ptr [RBP + -0x88],RAX
MOV EAX,dword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x48]
ADD EAX,dword ptr [RCX + 0xa0]
CMP EAX,dword ptr [RBP + -0x20]
JNC 0x0017f87c
JMP 0x0017f867
LAB_0017f867:
JMP 0x0017f869
LAB_0017f869:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x7f
CALL 0x001338b0
JMP 0x0017fa9f
LAB_0017f87c:
MOV EAX,dword ptr [RBP + -0x78]
MOV dword ptr [RBP + -0x7c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0x88]
MOV ECX,dword ptr [RBP + -0x1c]
MOV R8D,dword ptr [RBP + -0x20]
LEA R9,[RBP + -0x7c]
LEA R10,[RBP + -0xc0]
LEA RAX,[RBP + -0xc4]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x10],0x1
CALL 0x0017a340
CMP AL,0x0
JZ 0x0017f8cc
JMP 0x0017fa9f
LAB_0017f8cc:
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0xb8],RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x9c],EAX
MOV EAX,dword ptr [RBP + -0x7c]
MOV dword ptr [RBP + -0x98],EAX
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV ECX,dword ptr [RBP + -0xc0]
ADD RAX,RCX
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x28]
CMP qword ptr [RAX],0x0
JZ 0x0017f93d
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RAX + 0x28]
CALL 0x00176ae0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0017f93d
JMP 0x0017fa9f
LAB_0017f93d:
MOV RAX,qword ptr [RBP + -0x48]
CMP dword ptr [RAX + 0xac],0x0
JZ 0x0017f964
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x00176b70
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0017f964
JMP 0x0017fa9f
LAB_0017f964:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x0017c8c0
CMP AL,0x0
JZ 0x0017f98d
JMP 0x0017fa9f
LAB_0017f98d:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV ECX,dword ptr [RBP + -0x98]
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0xa10
MOV qword ptr [RBP + -0xd8],RAX
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x90]
CALL 0x00174670
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0017f9d9
MOV EAX,dword ptr [RBP + -0x78]
MOV dword ptr [RBP + -0xdc],EAX
JMP 0x0017f9e3
LAB_0017f9d9:
XOR EAX,EAX
MOV dword ptr [RBP + -0xdc],EAX
JMP 0x0017f9e3
LAB_0017f9e3:
MOV RDI,qword ptr [RBP + -0xd8]
MOV ESI,dword ptr [RBP + -0xdc]
CALL 0x00142500
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x15],CL
JMP 0x0017fa00
LAB_0017fa00:
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,byte ptr [RAX + 0x14]
OR ECX,0x2
MOV byte ptr [RAX + 0x14],CL
JMP 0x0017fa10
LAB_0017fa10:
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
ADD ECX,0x1
MOV RDX,qword ptr [RBP + -0x38]
SUB ECX,dword ptr [RDX + 0x8]
IMUL ECX,ECX,0x7
SUB EAX,ECX
MOV dword ptr [RBP + -0xa0],EAX
MOV EAX,dword ptr [RBP + -0xa0]
MOV RCX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0017fa4f
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x3b8]
MOV dword ptr [RBP + -0xa0],EAX
LAB_0017fa4f:
JMP 0x0017fa51
LAB_0017fa51:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + 0x18]
MOV RCX,qword ptr [RBP + -0x50]
MOV R8,qword ptr [RBP + -0x38]
MOV R10,qword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + -0x74]
MOV R9D,0x1
LEA R11,[RBP + -0xb8]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV dword ptr [RSP + 0x10],EAX
CALL 0x0017cdd0
MOV byte ptr [RBP + -0xb9],AL
CMP AL,0x0
JZ 0x0017fa97
JMP 0x0017fa9f
LAB_0017fa97:
JMP 0x0017fa99
LAB_0017fa99:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0017fad8
LAB_0017fa9f:
JMP 0x0017faa1
LAB_0017faa1:
JMP 0x0017faa3
LAB_0017faa3:
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x00136250
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x644],0x0
JZ 0x0017fac7
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xffffffff
CALL 0x00143840
LAB_0017fac7:
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001760f0
MOV byte ptr [RBP + -0x1],0x1
LAB_0017fad8:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x100
POP RBP
RET
|
int1
_ma_update_at_original_place
(long *param_1,int8 param_2,int4 param_3,uint param_4,int param_5,
int8 param_6,int8 param_7,int8 param_8,int8 param_9)
{
long *plVar1;
char cVar2;
int1 uVar3;
int4 *puVar4;
long lVar5;
int8 in_stack_fffffffffffffef8;
int4 uVar6;
uint local_e4;
int1 local_cc [4];
uint local_c8;
char local_c1;
long local_c0;
long local_b8;
int8 local_b0;
uint local_a8;
int4 local_a4;
uint local_a0;
long local_98;
int8 local_90;
int4 local_88;
uint local_84;
uint local_80;
int4 local_7c;
long local_78;
int1 local_70 [8];
int4 local_68;
int1 local_60;
long *local_58;
long *local_50;
long local_48;
long *local_40;
int8 local_38;
int local_2c;
uint local_28;
int4 local_24;
int8 local_20;
long *local_18;
uVar6 = (int4)((ulong)in_stack_fffffffffffffef8 >> 0x20);
local_50 = param_1 + 0x10;
local_58 = param_1 + 0x28;
local_78 = *param_1;
local_88 = *(int4 *)(*param_1 + 0x7bc);
local_7c = (int4)param_1[0x2e];
*(int *)(param_1 + 0x2e) = (int)param_1[0x16];
local_38 = param_6;
local_2c = param_5;
local_28 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
calc_record_size(param_1,param_8,local_58);
_ma_bitmap_flushable(local_18,1);
local_98 = pagecache_read(*(int8 *)(local_78 + 0x600),local_18 + 0x8e,local_20,0,0,
*(int4 *)(local_78 + 0x7d4),CONCAT44(uVar6,4),local_70);
local_68 = 6;
local_60 = local_98 != 0;
insert_dynamic(local_18 + 0x5d,local_70);
plVar1 = local_18;
if (local_98 == 0) {
puVar4 = (int4 *)_my_thread_var();
_ma_set_fatal_error(plVar1,*puVar4);
}
else {
local_80 = (uint)*(ushort *)(local_98 + 10);
local_90 = dir_entry_pos(local_98,local_88,local_24);
if (local_80 + (int)local_50[0x14] < local_28) {
_ma_set_fatal_error(local_18,0x7f);
}
else {
local_84 = local_80;
cVar2 = extend_area_on_page(local_18,local_98,local_90,local_24,local_28,&local_84,&local_c8,
local_cc,1);
if (cVar2 == '\0') {
local_c0 = local_98;
local_a4 = local_24;
local_a0 = local_84;
local_b0 = local_90;
local_b8 = local_98 + (ulong)local_c8;
if (((*(long *)local_50[5] == 0) ||
(cVar2 = delete_tails(local_18,local_50[5]), cVar2 == '\0')) &&
((*(int *)((long)local_50 + 0xac) == 0 ||
(cVar2 = free_full_pages(local_18,local_50), cVar2 == '\0')))) {
local_40 = local_50;
cVar2 = extent_to_bitmap_blocks(local_18,local_50,local_20,local_2c,local_38);
if (cVar2 == '\0') {
local_48 = *local_40;
*(uint *)(local_48 + 0xc) = local_a0;
lVar5 = local_78 + 0xa10;
cVar2 = enough_free_entries_on_page(local_78,local_98);
if (cVar2 == '\0') {
local_e4 = 0;
}
else {
local_e4 = local_80;
}
uVar3 = _ma_free_size_to_head_pattern(lVar5,local_e4);
*(int1 *)(local_48 + 0x15) = uVar3;
*(byte *)(local_48 + 0x14) = *(byte *)(local_48 + 0x14) | 2;
local_a8 = local_28 + ((local_2c + 1) - (int)local_40[1]) * -7;
if ((ulong)local_a8 < *(ulong *)(local_78 + 0x3b8)) {
local_a8 = (uint)*(int8 *)(local_78 + 0x3b8);
}
local_c1 = write_block_record(local_18,param_7,param_8,local_58,local_40,1,&local_c0,
param_9,local_7c);
if (local_c1 == '\0') {
return 0;
}
}
}
}
}
}
_ma_mark_file_crashed(local_78);
if (*(int *)((long)local_18 + 0x644) != 0) {
_ma_bitmap_flushable(local_18,0xffffffff);
}
_ma_unpin_all_pages_and_finalize_row(local_18,0);
return 1;
}
| |
44,647 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>) | monkey531[P]llama/common/json.hpp | iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq %rdx, %rsi
je 0x56c49
movq %rdx, %r12
movq %rdi, %r14
movq %rdx, %rbp
subq %rbx, %rbp
sarq $0x5, %rbp
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbp
movq (%rdi), %rax
movq %rax, (%rsp)
movq %rdx, %r15
negq %r15
movq %rbx, %r13
cmpq 0x8(%r14), %r12
je 0x56c1c
movq %r13, %rdi
callq 0x4f49e
movq %r13, %rdi
movq %r12, %rsi
callq 0x56c5c
addq $0x60, %r13
addq $0x60, %r12
addq $-0x60, %r15
jmp 0x56bf5
subq (%rsp), %rbx
addq (%r14), %r15
negq %r15
sarq $0x5, %r15
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
subq %rbp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x56ce8
addq (%r14), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
cmp rsi, rdx
jz loc_56C49
mov r12, rdx
mov r14, rdi
mov rbp, rdx
sub rbp, rbx
sar rbp, 5
mov rax, 0AAAAAAAAAAAAAAABh
imul rbp, rax
mov rax, [rdi]
mov [rsp+38h+var_38], rax
mov r15, rdx
neg r15
mov r13, rbx
loc_56BF5:
cmp r12, [r14+8]
jz short loc_56C1C
mov rdi, r13
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::~pair()
mov rdi, r13
mov rsi, r12
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&)
add r13, 60h ; '`'
add r12, 60h ; '`'
add r15, 0FFFFFFFFFFFFFFA0h
jmp short loc_56BF5
loc_56C1C:
sub rbx, [rsp+38h+var_38]
add r15, [r14]
neg r15
sar r15, 5
mov rax, 0AAAAAAAAAAAAAAABh
imul r15, rax
sub r15, rbp
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong)
add rbx, [r14]
loc_56C49:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // rbx
long long v4; // r12
unsigned long long v5; // rbp
long long v6; // r15
long long v7; // r13
long long v9; // [rsp+0h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v4 = a3;
v5 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 5);
v9 = *a1;
v6 = -a3;
v7 = a2;
while ( v4 != a1[1] )
{
std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::~pair(v7);
std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair(
v7,
v4);
v7 += 96LL;
v4 += 96LL;
v6 -= 96LL;
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize(
a1,
0xAAAAAAAAAAAAAAABLL * (-(*a1 + v6) >> 5) - v5);
return *a1 + a2 - v9;
}
return v3;
}
| erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
CMP RSI,RDX
JZ 0x00156c49
MOV R12,RDX
MOV R14,RDI
MOV RBP,RDX
SUB RBP,RBX
SAR RBP,0x5
MOV RAX,-0x5555555555555555
IMUL RBP,RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP],RAX
MOV R15,RDX
NEG R15
MOV R13,RBX
LAB_00156bf5:
CMP R12,qword ptr [R14 + 0x8]
JZ 0x00156c1c
MOV RDI,R13
CALL 0x0014f49e
MOV RDI,R13
MOV RSI,R12
CALL 0x00156c5c
ADD R13,0x60
ADD R12,0x60
ADD R15,-0x60
JMP 0x00156bf5
LAB_00156c1c:
SUB RBX,qword ptr [RSP]
ADD R15,qword ptr [R14]
NEG R15
SAR R15,0x5
MOV RAX,-0x5555555555555555
IMUL R15,RAX
SUB R15,RBP
MOV RDI,R14
MOV RSI,R15
CALL 0x00156ce8
ADD RBX,qword ptr [R14]
LAB_00156c49:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__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>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >,
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >) */
pair * __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,pair *param_2,pair *param_3)
{
long lVar1;
long lVar2;
pair *this_00;
long lVar3;
if (param_2 != param_3) {
lVar2 = (long)param_3 - (long)param_2;
lVar1 = *(long *)this;
lVar3 = -(long)param_3;
this_00 = param_2;
for (; param_3 != *(pair **)(this + 8); param_3 = param_3 + 0x60) {
std::
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
::~pair((pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*)this_00);
std::
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
::pair((pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*)this_00,param_3);
this_00 = (pair *)((pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*)this_00 + 0x60);
lVar3 = lVar3 + -0x60;
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,(-(lVar3 + *(long *)this) >> 5) * -0x5555555555555555 +
(lVar2 >> 5) * 0x5555555555555555);
param_2 = param_2 + (*(long *)this - lVar1);
}
return param_2;
}
| |
44,648 | get_charsets_dir | eloqsql/mysys/charset.c | char *get_charsets_dir(char *buf)
{
const char *sharedir= SHAREDIR;
char *res;
DBUG_ENTER("get_charsets_dir");
if (charsets_dir != NULL)
strmake(buf, charsets_dir, FN_REFLEN-1);
else
{
if (test_if_hard_path(sharedir) ||
is_prefix(sharedir, DEFAULT_CHARSET_HOME))
strxmov(buf, sharedir, "/", CHARSET_DIR, NullS);
else
strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR,
NullS);
}
res= convert_dirname(buf,buf,NullS);
DBUG_PRINT("info",("charsets dir: '%s'", buf));
DBUG_RETURN(res);
} | O3 | c | get_charsets_dir:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x33d855(%rip), %rax # 0x3658c0
movq (%rax), %rsi
testq %rsi, %rsi
je 0x28082
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
callq 0x5930c
jmp 0x280cb
leaq 0x3340c(%rip), %rdi # 0x5b495
callq 0x2a5fa
testl %eax, %eax
jne 0x280a9
leaq 0x333fc(%rip), %rdi # 0x5b495
leaq 0x3340e(%rip), %rsi # 0x5b4ae
callq 0x57a28
testl %eax, %eax
je 0x280de
leaq 0x333e5(%rip), %rsi # 0x5b495
leaq 0x34032(%rip), %rdx # 0x5c0e9
leaq 0x33403(%rip), %rcx # 0x5b4c1
movq %rbx, %rdi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x59364
movq %rbx, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x29797
movq $0x0, (%rsp)
leaq 0x333c1(%rip), %rsi # 0x5b4ae
leaq 0x333a1(%rip), %rcx # 0x5b495
leaq 0x33fee(%rip), %rdx # 0x5c0e9
leaq 0x333bf(%rip), %r9 # 0x5b4c1
movq %rbx, %rdi
movq %rdx, %r8
xorl %eax, %eax
callq 0x59364
jmp 0x280cb
| get_charsets_dir:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rax, charsets_dir
mov rsi, [rax]
test rsi, rsi
jz short loc_28082
mov edx, 1FFh
mov rdi, rbx
call strmake
jmp short loc_280CB
loc_28082:
lea rdi, aHomeMonoInstal; "/home/mono/install/share"
call test_if_hard_path
test eax, eax
jnz short loc_280A9
lea rdi, aHomeMonoInstal; "/home/mono/install/share"
lea rsi, aHomeMonoInstal_0; "/home/mono/install"
call is_prefix
test eax, eax
jz short loc_280DE
loc_280A9:
lea rsi, aHomeMonoInstal; "/home/mono/install/share"
lea rdx, unk_5C0E9
lea rcx, aCharsets; "charsets/"
mov rdi, rbx
xor r8d, r8d
xor eax, eax
call strxmov
loc_280CB:
mov rdi, rbx
mov rsi, rbx
xor edx, edx
add rsp, 8
pop rbx
pop rbp
jmp convert_dirname
loc_280DE:
mov [rsp+10h+var_10], 0
lea rsi, aHomeMonoInstal_0; "/home/mono/install"
lea rcx, aHomeMonoInstal; "/home/mono/install/share"
lea rdx, unk_5C0E9
lea r9, aCharsets; "charsets/"
mov rdi, rbx
mov r8, rdx
xor eax, eax
call strxmov
jmp short loc_280CB
| long long get_charsets_dir(long long a1)
{
char v1; // al
int v2; // r9d
char v4; // [rsp+0h] [rbp-10h]
v4 = v1;
if ( charsets_dir )
{
strmake(a1, charsets_dir, 511LL);
}
else if ( (unsigned int)test_if_hard_path("/home/mono/install/share")
|| (unsigned int)is_prefix("/home/mono/install/share", "/home/mono/install") )
{
strxmov(
a1,
(unsigned int)"/home/mono/install/share",
(unsigned int)&unk_5C0E9,
(unsigned int)"charsets/",
0,
v2,
v4);
}
else
{
strxmov(
a1,
(unsigned int)"/home/mono/install",
(unsigned int)&unk_5C0E9,
(unsigned int)"/home/mono/install/share",
(unsigned int)&unk_5C0E9,
(unsigned int)"charsets/",
0);
}
return convert_dirname(a1, a1, 0LL);
}
| get_charsets_dir:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x4658c0]
MOV RSI,qword ptr [RAX]
TEST RSI,RSI
JZ 0x00128082
MOV EDX,0x1ff
MOV RDI,RBX
CALL 0x0015930c
JMP 0x001280cb
LAB_00128082:
LEA RDI,[0x15b495]
CALL 0x0012a5fa
TEST EAX,EAX
JNZ 0x001280a9
LEA RDI,[0x15b495]
LEA RSI,[0x15b4ae]
CALL 0x00157a28
TEST EAX,EAX
JZ 0x001280de
LAB_001280a9:
LEA RSI,[0x15b495]
LEA RDX,[0x15c0e9]
LEA RCX,[0x15b4c1]
MOV RDI,RBX
XOR R8D,R8D
XOR EAX,EAX
CALL 0x00159364
LAB_001280cb:
MOV RDI,RBX
MOV RSI,RBX
XOR EDX,EDX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00129797
LAB_001280de:
MOV qword ptr [RSP],0x0
LEA RSI,[0x15b4ae]
LEA RCX,[0x15b495]
LEA RDX,[0x15c0e9]
LEA R9,[0x15b4c1]
MOV RDI,RBX
MOV R8,RDX
XOR EAX,EAX
CALL 0x00159364
JMP 0x001280cb
|
void get_charsets_dir(int8 param_1)
{
int iVar1;
if (charsets_dir == 0) {
iVar1 = test_if_hard_path("/home/mono/install/share");
if (iVar1 == 0) {
iVar1 = is_prefix("/home/mono/install/share","/home/mono/install");
if (iVar1 == 0) {
strxmov(param_1,"/home/mono/install",&DAT_0015c0e9,"/home/mono/install/share",&DAT_0015c0e9,
"charsets/",0);
goto LAB_001280cb;
}
}
strxmov(param_1,"/home/mono/install/share",&DAT_0015c0e9,"charsets/",0);
}
else {
strmake(param_1,charsets_dir,0x1ff);
}
LAB_001280cb:
convert_dirname(param_1,param_1,0);
return;
}
| |
44,649 | inline_mysql_file_seek | eloqsql/include/mysql/psi/mysql_file.h | static inline my_off_t
inline_mysql_file_seek(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, my_off_t pos, int whence, myf flags)
{
my_off_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_seek(file, pos, whence, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_seek(file, pos, whence, flags);
return result;
} | O0 | c | inline_mysql_file_seek:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x214538(%rip), %rax # 0x2ceb20
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x8, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xba683
leaq 0x2144f2(%rip), %rax # 0x2ceb20
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rcx
callq 0xfde60
movq %rax, -0x38(%rbp)
leaq 0x2144bb(%rip), %rax # 0x2ceb20
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xba6a2
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rcx
callq 0xfde60
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
| inline_mysql_file_seek_4:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 8
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_BA683
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rcx, [rbp+var_30]
call my_seek
mov [rbp+var_38], rax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
xor ecx, ecx
mov esi, ecx
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_BA6A2
loc_BA683:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rcx, [rbp+var_30]
call my_seek
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_BA6A2:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long inline_mysql_file_seek_4(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6)
{
_BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF
long long v8; // [rsp+50h] [rbp-40h]
long long v9; // [rsp+58h] [rbp-38h]
long long v10; // [rsp+60h] [rbp-30h]
unsigned int v11; // [rsp+6Ch] [rbp-24h]
long long v12; // [rsp+70h] [rbp-20h]
unsigned int v13; // [rsp+78h] [rbp-18h]
unsigned int v14; // [rsp+7Ch] [rbp-14h]
long long v15; // [rsp+80h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a6;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL);
if ( !v8 )
return my_seek(v13, v12, v11, v10);
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14);
v9 = my_seek(v13, v12, v11, v10);
((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL);
return v9;
}
| inline_mysql_file_seek:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3ceb20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x8
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001ba683
LEA RAX,[0x3ceb20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001fde60
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x3ceb20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ba6a2
LAB_001ba683:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001fde60
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001ba6a2:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
int8
inline_mysql_file_seek
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
int1 local_90 [72];
long local_48;
int8 local_40;
int8 local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
local_38 = param_6;
local_2c = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,8);
if (local_48 == 0) {
local_10 = my_seek(local_20,local_28,local_2c,local_38);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c);
local_40 = my_seek(local_20,local_28,local_2c,local_38);
(**(code **)(PSI_server + 0x218))(local_48,0);
local_10 = local_40;
}
return local_10;
}
| |
44,650 | pollAbsState | untodesu[P]riteg/build_O1/_deps/glfw-src/src/linux_joystick.c | static void pollAbsState(_GLFWjoystick* js)
{
int code;
for (code = 0; code < ABS_CNT; code++)
{
if (js->linjs.absMap[code] < 0)
continue;
struct input_absinfo* info = &js->linjs.absInfo[code];
if (ioctl(js->linjs.fd, EVIOCGABS(code), info) < 0)
continue;
handleAbsEvent(js, code, info->value);
}
} | O1 | c | pollAbsState:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x197c, %r12d # imm = 0x197C
movl $0x187c, %r13d # imm = 0x187C
movl $0x80184540, %ebp # imm = 0x80184540
xorl %r14d, %r14d
cmpl $0x0, (%rbx,%r13)
js 0x290fd
leaq (%rbx,%r12), %r15
movl 0x78(%rbx), %edi
leaq (%r14,%rbp), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xcb70
testl %eax, %eax
js 0x290fd
movl (%r15), %edx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2911d
incq %r14
addq $0x18, %r12
addq $0x4, %r13
cmpq $0x40, %r14
jne 0x290cf
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| pollAbsState:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov r12d, 197Ch
mov r13d, 187Ch
mov ebp, 80184540h
xor r14d, r14d
loc_290CF:
cmp dword ptr [rbx+r13], 0
js short loc_290FD
lea r15, [rbx+r12]
mov edi, [rbx+78h]
lea rsi, [r14+rbp]
mov rdx, r15
xor eax, eax
call _ioctl
test eax, eax
js short loc_290FD
mov edx, [r15]
mov rdi, rbx
mov esi, r14d
call handleAbsEvent
loc_290FD:
inc r14
add r12, 18h
add r13, 4
cmp r14, 40h ; '@'
jnz short loc_290CF
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long pollAbsState(long long a1)
{
long long v1; // r12
long long v2; // r13
long long i; // r14
long long result; // rax
v1 = 6524LL;
v2 = 6268LL;
for ( i = 0LL; i != 64; ++i )
{
if ( *(int *)(a1 + v2) >= 0 )
{
result = ioctl(*(unsigned int *)(a1 + 120), i + 2149074240LL, a1 + v1);
if ( (int)result >= 0 )
result = handleAbsEvent(a1, (unsigned int)i, *(unsigned int *)(a1 + v1));
}
v1 += 24LL;
v2 += 4LL;
}
return result;
}
| pollAbsState:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R12D,0x197c
MOV R13D,0x187c
MOV EBP,0x80184540
XOR R14D,R14D
LAB_001290cf:
CMP dword ptr [RBX + R13*0x1],0x0
JS 0x001290fd
LEA R15,[RBX + R12*0x1]
MOV EDI,dword ptr [RBX + 0x78]
LEA RSI,[R14 + RBP*0x1]
MOV RDX,R15
XOR EAX,EAX
CALL 0x0010cb70
TEST EAX,EAX
JS 0x001290fd
MOV EDX,dword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL 0x0012911d
LAB_001290fd:
INC R14
ADD R12,0x18
ADD R13,0x4
CMP R14,0x40
JNZ 0x001290cf
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void pollAbsState(long param_1)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
lVar2 = 0x197c;
lVar3 = 0x187c;
uVar4 = 0;
do {
if (-1 < *(int *)(param_1 + lVar3)) {
iVar1 = ioctl(*(int *)(param_1 + 0x78),uVar4 + 0x80184540,(int4 *)(param_1 + lVar2));
if (-1 < iVar1) {
handleAbsEvent(param_1,uVar4 & 0xffffffff,*(int4 *)(param_1 + lVar2));
}
}
uVar4 = uVar4 + 1;
lVar2 = lVar2 + 0x18;
lVar3 = lVar3 + 4;
} while (uVar4 != 0x40);
return;
}
| |
44,651 | my_ll10tostr_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static size_t
my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs,
char *dst, size_t len, int radix, longlong val)
{
char buffer[65];
register char *p, *db, *de;
long long_val;
int sl= 0;
ulonglong uval= (ulonglong) val;
if (radix < 0)
{
if (val < 0)
{
sl= 1;
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulonglong)0 - uval;
}
}
p= &buffer[sizeof(buffer)-1];
*p='\0';
if (uval == 0)
{
*--p= '0';
goto cnv;
}
while (uval > (ulonglong) LONG_MAX)
{
ulonglong quo= uval/(uint) 10;
uint rem= (uint) (uval- quo* (uint) 10);
*--p= '0' + rem;
uval= quo;
}
long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
*--p= (char) ('0' + (long_val - quo*10));
long_val= quo;
}
cnv:
if (sl)
{
*--p= '-';
}
for ( db= dst, de= dst + len ; (dst < de) && *p ; p++)
{
int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de);
if (cnvres > 0)
dst+= cnvres;
else
break;
}
return (int) (dst -db);
} | O3 | c | my_ll10tostr_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
testl %ecx, %ecx
setns %al
testq %r8, %r8
setns %sil
orb %al, %sil
movq %r8, %rcx
negq %rcx
testb %sil, %sil
cmovneq %r8, %rcx
movb $0x0, -0x40(%rbp)
testq %rcx, %rcx
je 0x7e6f6
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
js 0x7e701
leaq -0x40(%rbp), %r13
jmp 0x7e721
leaq -0x41(%rbp), %r13
movb $0x30, (%r13)
jmp 0x7e745
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
leaq -0x41(%rbp), %r13
imull $0xf6, %edx, %eax
addl %eax, %ecx
addb $0x30, %cl
movb %cl, (%r13)
movq %rdx, %rcx
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
imull $0xf6, %edx, %eax
addl %ecx, %eax
addb $0x30, %al
movb %al, -0x1(%r13)
decq %r13
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x7e721
testb %sil, %sil
jne 0x7e752
movb $0x2d, -0x1(%r13)
decq %r13
movq %rbx, %r12
testq %r14, %r14
jle 0x7e78e
addq %rbx, %r14
movq %rbx, %r12
movsbq (%r13), %rsi
testq %rsi, %rsi
je 0x7e78e
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq *0x30(%rax)
testl %eax, %eax
jle 0x7e78e
movl %eax, %eax
addq %rax, %r12
incq %r13
cmpq %r14, %r12
jb 0x7e760
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x7e7b2
subl %ebx, %r12d
movslq %r12d, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x28400
| my_ll10tostr_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
test ecx, ecx
setns al
test r8, r8
setns sil
or sil, al
mov rcx, r8
neg rcx
test sil, sil
cmovnz rcx, r8
mov [rbp+var_40], 0
test rcx, rcx
jz short loc_7E6F6
mov rdi, 0CCCCCCCCCCCCCCCDh
js short loc_7E701
lea r13, [rbp+var_40]
jmp short loc_7E721
loc_7E6F6:
lea r13, [rbp+var_41]
mov byte ptr [r13+0], 30h ; '0'
jmp short loc_7E745
loc_7E701:
mov rax, rcx
mul rdi
shr rdx, 3
lea r13, [rbp+var_41]
imul eax, edx, 0F6h
add ecx, eax
add cl, 30h ; '0'
mov [r13+0], cl
mov rcx, rdx
loc_7E721:
mov rax, rcx
mul rdi
shr rdx, 3
imul eax, edx, 0F6h
add eax, ecx
add al, 30h ; '0'
mov [r13-1], al
dec r13
cmp rcx, 9
mov rcx, rdx
ja short loc_7E721
loc_7E745:
test sil, sil
jnz short loc_7E752
mov byte ptr [r13-1], 2Dh ; '-'
dec r13
loc_7E752:
mov r12, rbx
test r14, r14
jle short loc_7E78E
add r14, rbx
mov r12, rbx
loc_7E760:
movsx rsi, byte ptr [r13+0]
test rsi, rsi
jz short loc_7E78E
mov rax, [r15+0B8h]
mov rdi, r15
mov rdx, r12
mov rcx, r14
call qword ptr [rax+30h]
test eax, eax
jle short loc_7E78E
mov eax, eax
add r12, rax
inc r13
cmp r12, r14
jb short loc_7E760
loc_7E78E:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_7E7B2
sub r12d, ebx
movsxd rax, r12d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7E7B2:
call ___stack_chk_fail
| long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, signed long long a5)
{
bool v6; // si
unsigned long long v7; // rcx
char *v8; // r13
bool v9; // cc
unsigned long long v10; // r12
unsigned long long v11; // r14
int v12; // eax
char v14; // [rsp+3Fh] [rbp-41h] BYREF
char v15; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+50h] [rbp-30h]
v16 = __readfsqword(0x28u);
v6 = a4 >= 0 || a5 >= 0;
v7 = -a5;
if ( v6 )
v7 = a5;
v15 = 0;
if ( v7 )
{
if ( (v7 & 0x8000000000000000LL) != 0LL )
{
v8 = &v14;
v14 = v7 % 0xA + 48;
v7 /= 0xAuLL;
}
else
{
v8 = &v15;
}
do
{
*--v8 = v7 % 0xA + 48;
v9 = v7 <= 9;
v7 /= 0xAuLL;
}
while ( !v9 );
}
else
{
v8 = &v14;
v14 = 48;
}
if ( !v6 )
*--v8 = 45;
LODWORD(v10) = a2;
if ( a3 > 0 )
{
v11 = a2 + a3;
v10 = a2;
do
{
if ( !*v8 )
break;
v12 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
*v8,
v10,
v11);
if ( v12 <= 0 )
break;
v10 += (unsigned int)v12;
++v8;
}
while ( v10 < v11 );
}
return (int)v10 - (int)a2;
}
| my_ll10tostr_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
TEST ECX,ECX
SETNS AL
TEST R8,R8
SETNS SIL
OR SIL,AL
MOV RCX,R8
NEG RCX
TEST SIL,SIL
CMOVNZ RCX,R8
MOV byte ptr [RBP + -0x40],0x0
TEST RCX,RCX
JZ 0x0017e6f6
MOV RDI,-0x3333333333333333
JS 0x0017e701
LEA R13,[RBP + -0x40]
JMP 0x0017e721
LAB_0017e6f6:
LEA R13,[RBP + -0x41]
MOV byte ptr [R13],0x30
JMP 0x0017e745
LAB_0017e701:
MOV RAX,RCX
MUL RDI
SHR RDX,0x3
LEA R13,[RBP + -0x41]
IMUL EAX,EDX,0xf6
ADD ECX,EAX
ADD CL,0x30
MOV byte ptr [R13],CL
MOV RCX,RDX
LAB_0017e721:
MOV RAX,RCX
MUL RDI
SHR RDX,0x3
IMUL EAX,EDX,0xf6
ADD EAX,ECX
ADD AL,0x30
MOV byte ptr [R13 + -0x1],AL
DEC R13
CMP RCX,0x9
MOV RCX,RDX
JA 0x0017e721
LAB_0017e745:
TEST SIL,SIL
JNZ 0x0017e752
MOV byte ptr [R13 + -0x1],0x2d
DEC R13
LAB_0017e752:
MOV R12,RBX
TEST R14,R14
JLE 0x0017e78e
ADD R14,RBX
MOV R12,RBX
LAB_0017e760:
MOVSX RSI,byte ptr [R13]
TEST RSI,RSI
JZ 0x0017e78e
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RAX + 0x30]
TEST EAX,EAX
JLE 0x0017e78e
MOV EAX,EAX
ADD R12,RAX
INC R13
CMP R12,R14
JC 0x0017e760
LAB_0017e78e:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0017e7b2
SUB R12D,EBX
MOVSXD RAX,R12D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017e7b2:
CALL 0x00128400
|
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5)
{
bool bVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
char *pcVar5;
long in_FS_OFFSET;
char local_49 [17];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = -param_5;
if ((long)param_5 >= 0 || param_4 >= 0) {
uVar4 = param_5;
}
local_49[1] = 0;
if (uVar4 == 0) {
pcVar5 = local_49;
local_49[0] = '0';
}
else {
if ((long)uVar4 < 0) {
uVar3 = uVar4 / 10;
pcVar5 = local_49;
local_49[0] = (char)uVar4 + (char)uVar3 * -10 + '0';
}
else {
pcVar5 = local_49 + 1;
uVar3 = uVar4;
}
do {
pcVar5[-1] = (char)(uVar3 / 10) * -10 + (char)uVar3 + '0';
pcVar5 = pcVar5 + -1;
bVar1 = 9 < uVar3;
uVar3 = uVar3 / 10;
} while (bVar1);
}
if ((long)param_5 < 0 && param_4 < 0) {
pcVar5[-1] = '-';
pcVar5 = pcVar5 + -1;
}
uVar4 = param_2;
if (0 < param_3) {
do {
if ((long)*pcVar5 == 0) break;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,(long)*pcVar5,uVar4,param_3 + param_2);
if ((int)uVar2 < 1) break;
uVar4 = uVar4 + uVar2;
pcVar5 = pcVar5 + 1;
} while (uVar4 < param_3 + param_2);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return (long)((int)uVar4 - (int)param_2);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
44,652 | my_thread_global_reinit | eloqsql/mysys/my_thr_init.c | void my_thread_global_reinit(void)
{
struct st_my_thread_var *tmp;
DBUG_ASSERT(my_thread_global_init_done);
#ifdef HAVE_PSI_INTERFACE
my_init_mysys_psi_keys();
#endif
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
tmp= my_thread_var;
DBUG_ASSERT(tmp);
my_thread_destory_thr_mutex(tmp);
my_thread_init_thr_mutex(tmp);
} | O0 | c | my_thread_global_reinit:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0x2669a
callq 0x25f10
callq 0x26540
callq 0x266e0
callq 0x265f0
callq 0x267b0
callq 0x26810
movq %rax, -0x8(%rbp)
jmp 0x266be
movq -0x8(%rbp), %rdi
callq 0x26830
movq -0x8(%rbp), %rdi
callq 0x26860
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_thread_global_reinit:
push rbp
mov rbp, rsp
sub rsp, 10h
jmp short $+2
loc_2669A:
call my_init_mysys_psi_keys
call my_thread_destroy_common_mutex
call my_thread_init_common_mutex
call my_thread_destroy_internal_mutex
call my_thread_init_internal_mutex
call _my_thread_var
mov [rbp+var_8], rax
jmp short $+2
loc_266BE:
mov rdi, [rbp+var_8]
call my_thread_destory_thr_mutex
mov rdi, [rbp+var_8]
call my_thread_init_thr_mutex
add rsp, 10h
pop rbp
retn
| long long my_thread_global_reinit()
{
long long v1; // [rsp+8h] [rbp-8h]
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
v1 = my_thread_var();
my_thread_destory_thr_mutex(v1);
return my_thread_init_thr_mutex(v1);
}
| my_thread_global_reinit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
JMP 0x0012669a
LAB_0012669a:
CALL 0x00125f10
CALL 0x00126540
CALL 0x001266e0
CALL 0x001265f0
CALL 0x001267b0
CALL 0x00126810
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001266be
LAB_001266be:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00126830
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00126860
ADD RSP,0x10
POP RBP
RET
|
void my_thread_global_reinit(void)
{
int8 uVar1;
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
uVar1 = _my_thread_var();
my_thread_destory_thr_mutex(uVar1);
my_thread_init_thr_mutex(uVar1);
return;
}
| |
44,653 | my_thread_global_reinit | eloqsql/mysys/my_thr_init.c | void my_thread_global_reinit(void)
{
struct st_my_thread_var *tmp;
DBUG_ASSERT(my_thread_global_init_done);
#ifdef HAVE_PSI_INTERFACE
my_init_mysys_psi_keys();
#endif
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
tmp= my_thread_var;
DBUG_ASSERT(tmp);
my_thread_destory_thr_mutex(tmp);
my_thread_init_thr_mutex(tmp);
} | O3 | c | my_thread_global_reinit:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x2614f
callq 0x26430
callq 0x2666a
callq 0x26593
callq 0x267f7
leaq 0x343302(%rip), %rax # 0x36994c
movl (%rax), %edi
callq 0x244c0
movq %rax, %rbx
movq %rax, %rdi
callq 0x268b9
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x26923
| my_thread_global_reinit:
push rbp
mov rbp, rsp
push rbx
push rax
call my_init_mysys_psi_keys
call my_thread_destroy_common_mutex
call my_thread_init_common_mutex
call my_thread_destroy_internal_mutex
call my_thread_init_internal_mutex
lea rax, THR_KEY_mysys
mov edi, [rax]
call _pthread_getspecific
mov rbx, rax
mov rdi, rax
call my_thread_destory_thr_mutex
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp my_thread_init_thr_mutex
| long long my_thread_global_reinit(long long a1)
{
long long v1; // rbx
my_init_mysys_psi_keys(a1);
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
v1 = pthread_getspecific(THR_KEY_mysys);
my_thread_destory_thr_mutex(v1);
return my_thread_init_thr_mutex(v1);
}
| my_thread_global_reinit:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CALL 0x0012614f
CALL 0x00126430
CALL 0x0012666a
CALL 0x00126593
CALL 0x001267f7
LEA RAX,[0x46994c]
MOV EDI,dword ptr [RAX]
CALL 0x001244c0
MOV RBX,RAX
MOV RDI,RAX
CALL 0x001268b9
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00126923
|
void my_thread_global_reinit(void)
{
void *pvVar1;
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
pvVar1 = pthread_getspecific(THR_KEY_mysys);
my_thread_destory_thr_mutex(pvVar1);
my_thread_init_thr_mutex(pvVar1);
return;
}
| |
44,654 | my_char_weight_put | eloqsql/strings/ctype-uca.c | static my_bool
my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst,
uint16 *to, size_t to_length, size_t *nweights,
my_wc_t *str, size_t len)
{
size_t count;
int rc= FALSE;
if (!to_length)
{
*nweights= 0;
return len > 0;
}
to_length--; /* Without trailing zero */
for (count= 0; len; )
{
size_t chlen;
const uint16 *from= NULL;
uint16 implicit_weights[3];
for (chlen= len; chlen > 1; chlen--)
{
const MY_CONTRACTION *cnt;
if (chlen <= MY_UCA_MAX_CONTRACTION &&
(cnt= my_uca_contraction_find(&dst->contractions, str, chlen)))
{
from= cnt->weight;
str+= chlen;
len-= chlen;
break;
}
}
if (!from)
{
from= my_char_weight_addr(dst, *str);
if (!from)
{
from= implicit_weights;
my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno);
}
str++;
len--;
}
for ( ; from && *from && count < to_length; )
{
*to++= *from++;
count++;
}
if (count == to_length && from && * from)
rc= TRUE; /* All weights did not fit */
}
*to= 0;
*nweights= count;
return rc;
} | O3 | c | my_char_weight_put:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x30(%rbp)
testq %rdx, %rdx
je 0xbd6d0
movq %rcx, -0x68(%rbp)
testq %r9, %r9
je 0xbd6df
movq %rdi, -0x60(%rbp)
decq %rdx
xorl %ecx, %ecx
xorl %r13d, %r13d
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movq %rsi, -0x58(%rbp)
movq %r9, -0x40(%rbp)
cmpq $0x2, %r9
jb 0xbd5b4
movq -0x40(%rbp), %rbx
leaq (,%rbx,8), %r12
cmpq $0x6, %rbx
ja 0xbd5a7
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
jle 0xbd5a7
movq -0x60(%rbp), %rcx
movq 0x20(%rcx), %r15
imulq $0x58, %rax, %r14
addq %r15, %r14
leaq (,%rbx,8), %rax
movq %rax, -0x70(%rbp)
cmpq $0x6, %rbx
je 0xbd57f
cmpq $0x0, (%r15,%r12)
jne 0xbd59e
cmpb $0x0, 0x52(%r15)
jne 0xbd59e
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x29560
testl %eax, %eax
je 0xbd657
addq $0x58, %r15
cmpq %r14, %r15
jb 0xbd572
decq %rbx
addq $-0x8, %r12
cmpq $0x1, %rbx
ja 0xbd544
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rsi
cmpq %rcx, (%rsi)
jb 0xbd5ec
movq 0x10(%rsi), %rcx
movl %eax, %edx
shrl $0x8, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xbd5ec
movzbl %al, %eax
movq 0x8(%rsi), %rsi
movzbl (%rsi,%rdx), %edx
imull %eax, %edx
leaq (%rcx,%rdx,2), %r15
jmp 0xbd63d
leaq -0x3400(%rax), %rcx
leaq -0x4e00(%rax), %rdx
xorl %esi, %esi
cmpq $0x51a6, %rdx # imm = 0x51A6
setae %sil
shll $0x7, %esi
orl $0xfffffb40, %esi # imm = 0xFFFFFB40
cmpq $0x19b6, %rcx # imm = 0x19B6
movl $0xfb80, %ecx # imm = 0xFB80
cmovbl %ecx, %esi
movl %eax, %ecx
shrl $0xf, %ecx
addl %esi, %ecx
movw %cx, -0x36(%rbp)
orl $0x8000, %eax # imm = 0x8000
movw %ax, -0x34(%rbp)
movw $0x0, -0x32(%rbp)
leaq -0x36(%rbp), %r15
movq -0x58(%rbp), %rsi
movq -0x40(%rbp), %r9
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
addq $0x8, -0x30(%rbp)
decq %r9
jmp 0xbd67a
addq $0x30, %r15
movq -0x30(%rbp), %rax
leaq (%rax,%rbx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %r9
subq %rbx, %r9
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
movzwl (%r15), %eax
testw %ax, %ax
sete %cl
cmpq %rdx, %r13
setae %r8b
orb %cl, %r8b
jne 0xbd6b0
addq $0x2, %r15
movw %ax, (%rsi)
addq $0x2, %rsi
incq %r13
movzwl (%r15), %eax
testw %ax, %ax
je 0xbd6b0
addq $0x2, %r15
cmpq %rdx, %r13
jb 0xbd694
testw %ax, %ax
movzbl %dil, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
cmpq %rdx, %r13
cmovnel %eax, %ecx
testq %r9, %r9
jne 0xbd526
jmp 0xbd6e4
movq $0x0, (%rcx)
testq %r9, %r9
setne %cl
jmp 0xbd6f0
xorl %r13d, %r13d
xorl %ecx, %ecx
movw $0x0, (%rsi)
movq -0x68(%rbp), %rax
movq %r13, (%rax)
movl %ecx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_char_weight_put:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_30], r8
test rdx, rdx
jz loc_BD6D0
mov [rbp+var_68], rcx
test r9, r9
jz loc_BD6DF
mov [rbp+var_60], rdi
dec rdx
xor ecx, ecx
xor r13d, r13d
mov [rbp+var_48], rdx
loc_BD526:
mov [rbp+var_50], rcx
mov [rbp+var_58], rsi
mov [rbp+var_40], r9
cmp r9, 2
jb short loc_BD5B4
mov rbx, [rbp+var_40]
lea r12, ds:0[rbx*8]
loc_BD544:
cmp rbx, 6
ja short loc_BD5A7
mov rax, [rbp+var_60]
mov rax, [rax+18h]
test rax, rax
jle short loc_BD5A7
mov rcx, [rbp+var_60]
mov r15, [rcx+20h]
imul r14, rax, 58h ; 'X'
add r14, r15
lea rax, ds:0[rbx*8]
mov [rbp+var_70], rax
loc_BD572:
cmp rbx, 6
jz short loc_BD57F
cmp qword ptr [r15+r12], 0
jnz short loc_BD59E
loc_BD57F:
cmp byte ptr [r15+52h], 0
jnz short loc_BD59E
mov rdi, r15
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_70]
call _bcmp
test eax, eax
jz loc_BD657
loc_BD59E:
add r15, 58h ; 'X'
cmp r15, r14
jb short loc_BD572
loc_BD5A7:
dec rbx
add r12, 0FFFFFFFFFFFFFFF8h
cmp rbx, 1
ja short loc_BD544
loc_BD5B4:
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, eax
mov rsi, [rbp+var_60]
cmp [rsi], rcx
jb short loc_BD5EC
mov rcx, [rsi+10h]
mov edx, eax
shr edx, 8
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_BD5EC
movzx eax, al
mov rsi, [rsi+8]
movzx edx, byte ptr [rsi+rdx]
imul edx, eax
lea r15, [rcx+rdx*2]
jmp short loc_BD63D
loc_BD5EC:
lea rcx, [rax-3400h]
lea rdx, [rax-4E00h]
xor esi, esi
cmp rdx, 51A6h
setnb sil
shl esi, 7
or esi, 0FFFFFB40h
cmp rcx, 19B6h
mov ecx, 0FB80h
cmovb esi, ecx
mov ecx, eax
shr ecx, 0Fh
add ecx, esi
mov [rbp+var_36], cx
or eax, 8000h
mov [rbp+var_34], ax
mov [rbp+var_32], 0
lea r15, [rbp+var_36]
loc_BD63D:
mov rsi, [rbp+var_58]
mov r9, [rbp+var_40]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_48]
add [rbp+var_30], 8
dec r9
jmp short loc_BD67A
loc_BD657:
add r15, 30h ; '0'
mov rax, [rbp+var_30]
lea rax, [rax+rbx*8]
mov [rbp+var_30], rax
mov r9, [rbp+var_40]
sub r9, rbx
mov rsi, [rbp+var_58]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_48]
loc_BD67A:
movzx eax, word ptr [r15]
test ax, ax
setz cl
cmp r13, rdx
setnb r8b
or r8b, cl
jnz short loc_BD6B0
add r15, 2
loc_BD694:
mov [rsi], ax
add rsi, 2
inc r13
movzx eax, word ptr [r15]
test ax, ax
jz short loc_BD6B0
add r15, 2
cmp r13, rdx
jb short loc_BD694
loc_BD6B0:
test ax, ax
movzx eax, dil
mov ecx, 1
cmovz ecx, eax
cmp r13, rdx
cmovnz ecx, eax
test r9, r9
jnz loc_BD526
jmp short loc_BD6E4
loc_BD6D0:
mov qword ptr [rcx], 0
test r9, r9
setnz cl
jmp short loc_BD6F0
loc_BD6DF:
xor r13d, r13d
xor ecx, ecx
loc_BD6E4:
mov word ptr [rsi], 0
mov rax, [rbp+var_68]
mov [rax], r13
loc_BD6F0:
mov eax, ecx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_char_weight_put(
_QWORD *a1,
_WORD *a2,
long long a3,
unsigned long long *a4,
long long *a5,
unsigned long long a6)
{
unsigned long long v6; // r13
unsigned long long v7; // rbx
long long v8; // r12
long long v9; // rax
unsigned long long v10; // r15
unsigned long long v11; // r14
long long v12; // rax
long long v13; // rdx
long long v14; // rcx
__int16 *v15; // r15
__int16 v16; // si
unsigned __int8 v17; // di
unsigned long long v18; // rdx
__int16 v19; // ax
__int16 *v20; // r15
unsigned long long *v22; // [rsp+8h] [rbp-68h]
_WORD *v24; // [rsp+18h] [rbp-58h]
unsigned __int8 v25; // [rsp+20h] [rbp-50h]
unsigned long long v26; // [rsp+28h] [rbp-48h]
unsigned long long v27; // [rsp+30h] [rbp-40h]
_WORD v28[3]; // [rsp+3Ah] [rbp-36h] BYREF
long long *v29; // [rsp+40h] [rbp-30h]
v29 = a5;
if ( a3 )
{
v22 = a4;
if ( a6 )
{
LOBYTE(a4) = 0;
v6 = 0LL;
v26 = a3 - 1;
do
{
v25 = (unsigned __int8)a4;
v24 = a2;
v27 = a6;
if ( a6 < 2 )
{
LABEL_15:
v12 = *v29;
if ( *a1 >= (unsigned long long)(unsigned int)*v29
&& (v13 = (unsigned int)v12 >> 8, (v14 = *(_QWORD *)(a1[2] + 8 * v13)) != 0) )
{
v15 = (__int16 *)(v14 + 2LL * (unsigned __int8)v12 * (unsigned int)*(unsigned __int8 *)(a1[1] + v13));
}
else
{
v16 = (((unsigned long long)(v12 - 19968) >= 0x51A6) << 7) | 0xFB40;
if ( (unsigned long long)(v12 - 13312) < 0x19B6 )
v16 = -1152;
v28[0] = v16 + ((unsigned int)v12 >> 15);
v28[1] = v12 | 0x8000;
v28[2] = 0;
v15 = v28;
}
a2 = v24;
v17 = v25;
v18 = v26;
++v29;
a6 = v27 - 1;
}
else
{
v7 = a6;
v8 = 8 * a6;
while ( 1 )
{
if ( v7 <= 6 )
{
v9 = a1[3];
if ( v9 > 0 )
break;
}
LABEL_14:
--v7;
v8 -= 8LL;
if ( v7 <= 1 )
goto LABEL_15;
}
v10 = a1[4];
v11 = v10 + 88 * v9;
while ( v7 != 6 && *(_QWORD *)(v10 + v8) || *(_BYTE *)(v10 + 82) || (unsigned int)bcmp(v10, v29, 8 * v7) )
{
v10 += 88LL;
if ( v10 >= v11 )
goto LABEL_14;
}
v15 = (__int16 *)(v10 + 48);
v29 += v7;
a6 = v27 - v7;
v17 = v25;
v18 = v26;
}
v19 = *v15;
if ( *v15 != 0 && v6 < v18 )
{
v20 = v15 + 1;
do
{
*a2++ = v19;
++v6;
v19 = *v20;
if ( !*v20 )
break;
++v20;
}
while ( v6 < v18 );
}
LODWORD(a4) = 1;
if ( !v19 )
LODWORD(a4) = v17;
if ( v6 != v18 )
LODWORD(a4) = v17;
}
while ( a6 );
}
else
{
v6 = 0LL;
LODWORD(a4) = 0;
}
*a2 = 0;
*v22 = v6;
}
else
{
*a4 = 0LL;
LOBYTE(a4) = a6 != 0;
}
return (unsigned int)a4;
}
| my_char_weight_put:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x30],R8
TEST RDX,RDX
JZ 0x001bd6d0
MOV qword ptr [RBP + -0x68],RCX
TEST R9,R9
JZ 0x001bd6df
MOV qword ptr [RBP + -0x60],RDI
DEC RDX
XOR ECX,ECX
XOR R13D,R13D
MOV qword ptr [RBP + -0x48],RDX
LAB_001bd526:
MOV qword ptr [RBP + -0x50],RCX
MOV qword ptr [RBP + -0x58],RSI
MOV qword ptr [RBP + -0x40],R9
CMP R9,0x2
JC 0x001bd5b4
MOV RBX,qword ptr [RBP + -0x40]
LEA R12,[RBX*0x8]
LAB_001bd544:
CMP RBX,0x6
JA 0x001bd5a7
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JLE 0x001bd5a7
MOV RCX,qword ptr [RBP + -0x60]
MOV R15,qword ptr [RCX + 0x20]
IMUL R14,RAX,0x58
ADD R14,R15
LEA RAX,[RBX*0x8]
MOV qword ptr [RBP + -0x70],RAX
LAB_001bd572:
CMP RBX,0x6
JZ 0x001bd57f
CMP qword ptr [R15 + R12*0x1],0x0
JNZ 0x001bd59e
LAB_001bd57f:
CMP byte ptr [R15 + 0x52],0x0
JNZ 0x001bd59e
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x00129560
TEST EAX,EAX
JZ 0x001bd657
LAB_001bd59e:
ADD R15,0x58
CMP R15,R14
JC 0x001bd572
LAB_001bd5a7:
DEC RBX
ADD R12,-0x8
CMP RBX,0x1
JA 0x001bd544
LAB_001bd5b4:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV RSI,qword ptr [RBP + -0x60]
CMP qword ptr [RSI],RCX
JC 0x001bd5ec
MOV RCX,qword ptr [RSI + 0x10]
MOV EDX,EAX
SHR EDX,0x8
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001bd5ec
MOVZX EAX,AL
MOV RSI,qword ptr [RSI + 0x8]
MOVZX EDX,byte ptr [RSI + RDX*0x1]
IMUL EDX,EAX
LEA R15,[RCX + RDX*0x2]
JMP 0x001bd63d
LAB_001bd5ec:
LEA RCX,[RAX + -0x3400]
LEA RDX,[RAX + -0x4e00]
XOR ESI,ESI
CMP RDX,0x51a6
SETNC SIL
SHL ESI,0x7
OR ESI,0xfffffb40
CMP RCX,0x19b6
MOV ECX,0xfb80
CMOVC ESI,ECX
MOV ECX,EAX
SHR ECX,0xf
ADD ECX,ESI
MOV word ptr [RBP + -0x36],CX
OR EAX,0x8000
MOV word ptr [RBP + -0x34],AX
MOV word ptr [RBP + -0x32],0x0
LEA R15,[RBP + -0x36]
LAB_001bd63d:
MOV RSI,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
ADD qword ptr [RBP + -0x30],0x8
DEC R9
JMP 0x001bd67a
LAB_001bd657:
ADD R15,0x30
MOV RAX,qword ptr [RBP + -0x30]
LEA RAX,[RAX + RBX*0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV R9,qword ptr [RBP + -0x40]
SUB R9,RBX
MOV RSI,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
LAB_001bd67a:
MOVZX EAX,word ptr [R15]
TEST AX,AX
SETZ CL
CMP R13,RDX
SETNC R8B
OR R8B,CL
JNZ 0x001bd6b0
ADD R15,0x2
LAB_001bd694:
MOV word ptr [RSI],AX
ADD RSI,0x2
INC R13
MOVZX EAX,word ptr [R15]
TEST AX,AX
JZ 0x001bd6b0
ADD R15,0x2
CMP R13,RDX
JC 0x001bd694
LAB_001bd6b0:
TEST AX,AX
MOVZX EAX,DIL
MOV ECX,0x1
CMOVZ ECX,EAX
CMP R13,RDX
CMOVNZ ECX,EAX
TEST R9,R9
JNZ 0x001bd526
JMP 0x001bd6e4
LAB_001bd6d0:
MOV qword ptr [RCX],0x0
TEST R9,R9
SETNZ CL
JMP 0x001bd6f0
LAB_001bd6df:
XOR R13D,R13D
XOR ECX,ECX
LAB_001bd6e4:
MOV word ptr [RSI],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],R13
LAB_001bd6f0:
MOV EAX,ECX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_char_weight_put(ulong *param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5,
ulong param_6)
{
ushort uVar1;
short sVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
ulong uVar9;
void *pvVar10;
void *__s1;
short *psVar11;
short local_3e;
ushort local_3c;
int2 local_3a;
ulong *local_38;
if (param_3 == 0) {
*param_4 = 0;
uVar7 = CONCAT71((int7)((ulong)param_4 >> 8),param_6 != 0);
}
else {
if (param_6 == 0) {
uVar9 = 0;
uVar7 = 0;
}
else {
uVar5 = param_3 - 1;
uVar9 = 0;
uVar4 = 0;
local_38 = param_5;
do {
if (1 < param_6) {
lVar8 = param_6 * 8;
uVar7 = param_6;
do {
if ((uVar7 < 7) && (0 < (long)param_1[3])) {
__s1 = (void *)param_1[4];
pvVar10 = (void *)(param_1[3] * 0x58 + (long)__s1);
do {
if ((((uVar7 == 6) || (*(long *)((long)__s1 + lVar8) == 0)) &&
(*(char *)((long)__s1 + 0x52) == '\0')) &&
(iVar3 = bcmp(__s1,local_38,uVar7 * 8), iVar3 == 0)) {
psVar11 = (short *)((long)__s1 + 0x30);
local_38 = local_38 + uVar7;
param_6 = param_6 - uVar7;
goto LAB_001bd67a;
}
__s1 = (void *)((long)__s1 + 0x58);
} while (__s1 < pvVar10);
}
uVar7 = uVar7 - 1;
lVar8 = lVar8 + -8;
} while (1 < uVar7);
}
uVar7 = *local_38;
if (*param_1 < (uVar7 & 0xffffffff)) {
LAB_001bd5ec:
uVar1 = (ushort)(0x51a5 < uVar7 - 0x4e00) << 7 | 0xfb40;
if (uVar7 - 0x3400 < 0x19b6) {
uVar1 = 0xfb80;
}
local_3e = (short)(uVar7 >> 0xf) + uVar1;
local_3c = (ushort)uVar7 | 0x8000;
local_3a = 0;
psVar11 = &local_3e;
}
else {
uVar6 = uVar7 >> 8 & 0xffffff;
lVar8 = *(long *)(param_1[2] + uVar6 * 8);
if (lVar8 == 0) goto LAB_001bd5ec;
psVar11 = (short *)(lVar8 + (ulong)((uint)*(byte *)(param_1[1] + uVar6) *
((uint)uVar7 & 0xff)) * 2);
}
local_38 = local_38 + 1;
param_6 = param_6 - 1;
LAB_001bd67a:
sVar2 = *psVar11;
if (uVar9 < uVar5 && sVar2 != 0) {
do {
psVar11 = psVar11 + 1;
*param_2 = sVar2;
param_2 = param_2 + 1;
uVar9 = uVar9 + 1;
sVar2 = *psVar11;
if (sVar2 == 0) break;
} while (uVar9 < uVar5);
}
uVar7 = 1;
if (sVar2 == 0) {
uVar7 = uVar4;
}
if (uVar9 != uVar5) {
uVar7 = uVar4;
}
uVar4 = uVar7;
} while (param_6 != 0);
}
*param_2 = 0;
*param_4 = uVar9;
}
return uVar7 & 0xffffffff;
}
| |
44,655 | YAML::BadSubscript::BadSubscript<char [17]>(YAML::Mark const&, char const (&) [17]) | aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/exceptions.h | BadSubscript(const BadSubscript&) = default; | O3 | c | YAML::BadSubscript::BadSubscript<char [17]>(YAML::Mark const&, char const (&) [17]):
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0x9d72a
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x9b4b0
leaq 0x1b1454(%rip), %rax # 0x29a1d0
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe8d9e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82190
leaq 0x1b16ab(%rip), %rax # 0x29a450
addq $0x10, %rax
movq %rax, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe8dd4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x82190
movq %rbx, %rdi
callq 0x83b70
| _ZN4YAML12BadSubscriptC2IA27_cEERKNS_4MarkERKT_:
push r15
push r14
push rbx
sub rsp, 20h
mov r14, rsi
mov rbx, rdi
mov r15, rsp
mov rdi, r15
mov rsi, rdx
call _ZN4YAML8ErrorMsg22BAD_SUBSCRIPT_WITH_KEYB5cxx11EPKc; YAML::ErrorMsg::BAD_SUBSCRIPT_WITH_KEY(char const*)
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call _ZN4YAML9ExceptionC2ERKNS_4MarkERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; YAML::Exception::Exception(YAML::Mark const&,std::string const&)
lea rax, _ZTVN4YAML23RepresentationExceptionE; `vtable for'YAML::RepresentationException
add rax, 10h
mov [rbx], rax
lea rax, [rsp+38h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E8D9E
mov rsi, [rsp+38h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E8D9E:
lea rax, _ZTVN4YAML12BadSubscriptE; `vtable for'YAML::BadSubscript
add rax, 10h
mov [rbx], rax
add rsp, 20h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E8DD4
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E8DD4:
mov rdi, rbx
call __Unwind_Resume
| long long * YAML::BadSubscript::BadSubscript<char [27]>(_QWORD *a1, int a2, long long a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long *result; // rax
void *v7[2]; // [rsp+0h] [rbp-38h] BYREF
long long v8; // [rsp+10h] [rbp-28h] BYREF
YAML::ErrorMsg::BAD_SUBSCRIPT_WITH_KEY[abi:cxx11]((long long)v7, a3);
YAML::Exception::Exception((_DWORD)a1, a2, (unsigned int)v7, v3, v4, v5);
*a1 = &`vtable for'YAML::RepresentationException + 2;
if ( v7[0] != &v8 )
operator delete(v7[0], v8 + 1);
result = &`vtable for'YAML::BadSubscript + 2;
*a1 = &`vtable for'YAML::BadSubscript + 2;
return result;
}
| BadSubscript<char[27]>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV R14,RSI
MOV RBX,RDI
MOV R15,RSP
MOV RDI,R15
MOV RSI,RDX
CALL 0x0019d72a
LAB_001e8d67:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0019b4b0
LAB_001e8d75:
LEA RAX,[0x39a1d0]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001e8d9e
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00182190
LAB_001e8d9e:
LEA RAX,[0x39a450]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
|
/* YAML::BadSubscript::BadSubscript<char [27]>(YAML::Mark const&, char const (&) [27]) */
void __thiscall
YAML::BadSubscript::BadSubscript<char[27]>(BadSubscript *this,Mark *param_1,char *param_2)
{
long *local_38 [2];
long local_28 [2];
ErrorMsg::BAD_SUBSCRIPT_WITH_KEY_abi_cxx11_((ErrorMsg *)local_38,param_2);
/* try { // try from 001e8d67 to 001e8d74 has its CatchHandler @ 001e8db6 */
Exception::Exception((Exception *)this,param_1,(string *)local_38);
*(int ***)this = &PTR__BadInsert_0039a1e0;
if (local_38[0] != local_28) {
operator_delete(local_38[0],local_28[0] + 1);
}
*(int ***)this = &PTR__BadInsert_0039a460;
return;
}
| |
44,656 | ggml_threadpool_params_from_cpu_params(cpu_params const&) | monkey531[P]llama/common/common.cpp | struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) {
struct ggml_threadpool_params tpp;
ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults
if (params.mask_valid) {
std::memcpy(&tpp.cpumask, ¶ms.cpumask, GGML_MAX_N_THREADS);
}
tpp.prio = params.priority;
tpp.poll = params.poll;
tpp.strict_cpu = params.strict_cpu;
return tpp;
} | O3 | cpp | ggml_threadpool_params_from_cpu_params(cpu_params const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %esi
callq 0x18620
cmpb $0x1, 0x204(%r14)
jne 0x24b9b
leaq 0x4(%r14), %rsi
movl $0x200, %edx # imm = 0x200
movq %rbx, %rdi
callq 0x185b0
movl 0x208(%r14), %eax
movl %eax, 0x204(%rbx)
movl 0x210(%r14), %eax
movl %eax, 0x208(%rbx)
movb 0x20c(%r14), %al
movb %al, 0x20c(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov esi, [rsi]
call _ggml_threadpool_params_init
cmp byte ptr [r14+204h], 1
jnz short loc_24B9B
lea rsi, [r14+4]
mov edx, 200h
mov rdi, rbx
call _memcpy
loc_24B9B:
mov eax, [r14+208h]
mov [rbx+204h], eax
mov eax, [r14+210h]
mov [rbx+208h], eax
mov al, [r14+20Ch]
mov [rbx+20Ch], al
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| long long ggml_threadpool_params_from_cpu_params(long long a1, unsigned int *a2)
{
ggml_threadpool_params_init(a1, *a2);
if ( *((_BYTE *)a2 + 516) == 1 )
memcpy(a1, a2 + 1, 512LL);
*(_DWORD *)(a1 + 516) = a2[130];
*(_DWORD *)(a1 + 520) = a2[132];
*(_BYTE *)(a1 + 524) = *((_BYTE *)a2 + 524);
return a1;
}
| ggml_threadpool_params_from_cpu_params:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RSI]
CALL 0x00118620
CMP byte ptr [R14 + 0x204],0x1
JNZ 0x00124b9b
LEA RSI,[R14 + 0x4]
MOV EDX,0x200
MOV RDI,RBX
CALL 0x001185b0
LAB_00124b9b:
MOV EAX,dword ptr [R14 + 0x208]
MOV dword ptr [RBX + 0x204],EAX
MOV EAX,dword ptr [R14 + 0x210]
MOV dword ptr [RBX + 0x208],EAX
MOV AL,byte ptr [R14 + 0x20c]
MOV byte ptr [RBX + 0x20c],AL
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */
cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1)
{
int4 *in_RSI;
ggml_threadpool_params_init(param_1,*in_RSI);
if (*(char *)(in_RSI + 0x81) == '\x01') {
memcpy(param_1,in_RSI + 1,0x200);
}
*(int4 *)(param_1 + 0x204) = in_RSI[0x82];
*(int4 *)(param_1 + 0x208) = in_RSI[0x84];
param_1[0x20c] = *(cpu_params *)(in_RSI + 0x83);
return param_1;
}
| |
44,657 | my_sync_dir | eloqsql/mysys/my_sync.c | int my_sync_dir(const char *dir_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
static const char cur_dir_name[]= {FN_CURLIB, 0};
File dir_fd;
int res= 0;
const char *correct_dir_name;
DBUG_ENTER("my_sync_dir");
DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags));
/* Sometimes the path does not contain an explicit directory */
correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name;
/*
Syncing a dir may give EINVAL on tmpfs on Linux, which is ok.
EIO on the other hand is very important. Hence MY_IGNORE_BADFD.
*/
if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0)
{
if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD)))
res= 2;
if (my_close(dir_fd, MYF(my_flags)))
res= 3;
}
else
res= 1;
DBUG_RETURN(res);
#else
return 0;
#endif
} | O3 | c | my_sync_dir:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
movq %rsi, %rbx
leaq 0x88d09(%rip), %rax # 0xd6df1
cmoveq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x4d774
testl %eax, %eax
js 0x4e12f
movl %eax, %r14d
movq %rbx, %rsi
orq $0x20, %rsi
movl %eax, %edi
callq 0x4dfa0
xorl %r15d, %r15d
testl %eax, %eax
setne %r15b
addl %r15d, %r15d
movl %r14d, %edi
movq %rbx, %rsi
callq 0x4d919
testl %eax, %eax
movl $0x3, %eax
cmovel %r15d, %eax
jmp 0x4e134
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_sync_dir:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
cmp byte ptr [rdi], 0
mov rbx, rsi
lea rax, my_sync_dir_cur_dir_name
cmovz rdi, rax
xor esi, esi
mov rdx, rbx
call my_open
test eax, eax
js short loc_4E12F
mov r14d, eax
mov rsi, rbx
or rsi, 20h
mov edi, eax
call my_sync
xor r15d, r15d
test eax, eax
setnz r15b
add r15d, r15d
mov edi, r14d
mov rsi, rbx
call my_close
test eax, eax
mov eax, 3
cmovz eax, r15d
jmp short loc_4E134
loc_4E12F:
mov eax, 1
loc_4E134:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_sync_dir(_BYTE *a1, long long a2)
{
int v2; // eax
unsigned int v3; // r14d
unsigned int v4; // r15d
bool v5; // zf
long long result; // rax
if ( !*a1 )
a1 = &my_sync_dir_cur_dir_name;
v2 = my_open((long long)a1, 0, a2);
if ( v2 < 0 )
return 1LL;
v3 = v2;
v4 = 2 * ((unsigned int)my_sync((unsigned int)v2, (unsigned int)a2 | 0x20) != 0);
v5 = (unsigned int)my_close(v3, a2) == 0;
result = 3LL;
if ( v5 )
return v4;
return result;
}
| my_sync_dir:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CMP byte ptr [RDI],0x0
MOV RBX,RSI
LEA RAX,[0x1d6df1]
CMOVZ RDI,RAX
XOR ESI,ESI
MOV RDX,RBX
CALL 0x0014d774
TEST EAX,EAX
JS 0x0014e12f
MOV R14D,EAX
MOV RSI,RBX
OR RSI,0x20
MOV EDI,EAX
CALL 0x0014dfa0
XOR R15D,R15D
TEST EAX,EAX
SETNZ R15B
ADD R15D,R15D
MOV EDI,R14D
MOV RSI,RBX
CALL 0x0014d919
TEST EAX,EAX
MOV EAX,0x3
CMOVZ EAX,R15D
JMP 0x0014e134
LAB_0014e12f:
MOV EAX,0x1
LAB_0014e134:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
char my_sync_dir(char *param_1,ulong param_2)
{
char cVar1;
int iVar2;
int iVar3;
if (*param_1 == '\0') {
param_1 = ".";
}
iVar2 = my_open(param_1,0,param_2);
if (iVar2 < 0) {
cVar1 = '\x01';
}
else {
iVar3 = my_sync(iVar2,param_2 | 0x20);
iVar2 = my_close(iVar2,param_2);
cVar1 = '\x03';
if (iVar2 == 0) {
cVar1 = (iVar3 != 0) * '\x02';
}
}
return cVar1;
}
| |
44,658 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) | monkey531[P]llama/common/json.hpp | reference operator[](size_type idx)
{
// implicitly convert null value to an empty array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>();
assert_invariant();
}
// operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// fill up array with null values if given idx is outside range
if (idx >= m_data.m_value.array->size())
{
#if JSON_DIAGNOSTICS
// remember array size & capacity before resizing
const auto old_size = m_data.m_value.array->size();
const auto old_capacity = m_data.m_value.array->capacity();
#endif
m_data.m_value.array->resize(idx + 1);
#if JSON_DIAGNOSTICS
if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity))
{
// capacity has changed: update all parents
set_parents();
}
else
{
// set parent for values added above
set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size));
}
#endif
assert_invariant();
}
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
jne 0xa9ab0
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1a870
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x579d6
movb (%r14), %al
cmpb $0x2, %al
jne 0xa9afb
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %rbx, %rcx
ja 0xa9ae8
leaq 0x1(%rbx), %rsi
callq 0xa9d6e
movq %r14, %rdi
movl $0x1, %esi
callq 0x579d6
movq 0x8(%r14), %rax
movq (%rax), %rax
shlq $0x4, %rbx
addq %rax, %rbx
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5df1e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x46141(%rip), %rsi # 0xefc60
leaq 0x10(%rsp), %rdi
callq 0xa0821
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x5dcc6
xorl %ebp, %ebp
leaq 0x7e3fe(%rip), %rsi # 0x127f48
leaq -0x4f9fd(%rip), %rdx # 0x5a154
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa9b77
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a890
testb %bpl, %bpl
jne 0xa9b81
jmp 0xa9b89
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a640
movq %r14, %rdi
callq 0x1af20
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
mov al, [rdi]
test al, al
jnz short loc_A9AB0
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov al, [r14]
loc_A9AB0:
cmp al, 2
jnz short loc_A9AFB
mov rdi, [r14+8]
mov rax, [rdi]
mov rcx, [rdi+8]
sub rcx, rax
sar rcx, 4
cmp rcx, rbx
ja short loc_A9AE8
lea rsi, [rbx+1]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::resize(ulong)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, [r14+8]
mov rax, [rax]
loc_A9AE8:
shl rbx, 4
add rbx, rax
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_A9AFB:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A9B77
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A9B77:
test bpl, bpl
jnz short loc_A9B81
jmp short loc_A9B89
mov r14, rax
loc_A9B81:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A9B89:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
unsigned long long a2)
{
char v3; // al
long long v4; // rax
long long *v5; // rdi
long long v6; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v9; // [rsp+8h] [rbp-40h] BYREF
_QWORD v10[2]; // [rsp+10h] [rbp-38h] BYREF
v3 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 2;
v4 = operator new(0x18uLL);
*(_OWORD *)v4 = 0LL;
*(_QWORD *)(v4 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v4;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v3 = *(_BYTE *)a1;
}
if ( v3 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
(long long)v10,
(long long)"cannot use operator[] with a numeric argument with ",
&v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v10);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v5 = *(long long **)(a1 + 8);
v6 = *v5;
if ( (v5[1] - *v5) >> 4 <= a2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::resize(
v5,
a2 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v6 = **(_QWORD **)(a1 + 8);
}
return v6 + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x001a9ab0
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011a870
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x001579d6
MOV AL,byte ptr [R14]
LAB_001a9ab0:
CMP AL,0x2
JNZ 0x001a9afb
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
SUB RCX,RAX
SAR RCX,0x4
CMP RCX,RBX
JA 0x001a9ae8
LEA RSI,[RBX + 0x1]
CALL 0x001a9d6e
MOV RDI,R14
MOV ESI,0x1
CALL 0x001579d6
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX]
LAB_001a9ae8:
SHL RBX,0x4
ADD RBX,RAX
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001a9afb:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015df1e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001a9b18:
LEA RSI,[0x1efc60]
LEA RDI,[RSP + 0x10]
CALL 0x001a0821
MOV BPL,0x1
LAB_001a9b2c:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0015dcc6
XOR EBP,EBP
LEA RSI,[0x227f48]
LEA RDX,[0x15a154]
MOV RDI,RBX
CALL 0x0011aea0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this_00;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 *puVar2;
long lVar3;
int8 uVar4;
char *local_40;
detail local_38 [32];
bVar1 = *this;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar2 = (int8 *)operator_new(0x18);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
assert_invariant(SUB81(this,0));
bVar1 = *this;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8);
lVar3 = *(long *)this_00;
if ((ulong)(*(long *)(this_00 + 8) - lVar3 >> 4) <= param_1) {
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::resize(this_00,param_1 + 1);
assert_invariant(SUB81(this,0));
lVar3 = **(long **)(this + 8);
}
return param_1 * 0x10 + lVar3;
}
uVar4 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001a9b18 to 001a9b28 has its CatchHandler @ 001a9b7e */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 001a9b2c to 001a9b58 has its CatchHandler @ 001a9b59 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
44,659 | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) | monkey531[P]llama/common/common.cpp | std::string common_token_to_piece(const struct llama_vocab * vocab, llama_token token, bool special) {
std::string piece;
piece.resize(piece.capacity()); // using string internal cache, 15 bytes + '\n'
const int n_chars = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
if (n_chars < 0) {
piece.resize(-n_chars);
int check = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
GGML_ASSERT(check == -n_chars);
}
else {
piece.resize(n_chars);
}
return piece;
} | O2 | cpp | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
pushq $0xf
popq %rsi
callq 0x22a70
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movzbl %r15b, %r15d
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x22680
movl %eax, %r12d
testl %eax, %eax
js 0x2b668
movl %r12d, %esi
movq %rbx, %rdi
callq 0x22a70
jmp 0x2b691
negl %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22a70
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x22680
cmpl %r12d, %eax
jne 0x2b69d
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x675c1(%rip), %rdi # 0x92c65
leaq 0x662c4(%rip), %rdx # 0x9196f
leaq 0x67c54(%rip), %rcx # 0x93306
movl $0x6cc, %esi # imm = 0x6CC
xorl %eax, %eax
callq 0x22c90
jmp 0x2b6c2
jmp 0x2b6c2
movq %rax, %r14
movq %rbx, %rdi
callq 0x22f48
movq %r14, %rdi
callq 0x22d30
| _Z21common_token_to_pieceB5cxx11PK11llama_vocabib:
push rbp
push r15
push r14
push r12
push rbx
mov r15d, ecx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
push 0Fh
pop rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
mov rdx, [rbx]
mov ecx, [rbx+8]
movzx r15d, r15b
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
mov r12d, eax
test eax, eax
js short loc_2B668
mov esi, r12d
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
jmp short loc_2B691
loc_2B668:
neg r12d
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
mov rdx, [rbx]
mov ecx, [rbx+8]
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
cmp eax, r12d
jnz short loc_2B69D
loc_2B691:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_2B69D:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNChars; "check == -n_chars"
mov esi, 6CCh
xor eax, eax
call _ggml_abort
jmp short loc_2B6C2
jmp short $+2
loc_2B6C2:
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_token_to_piece[abi:cxx11](_QWORD *a1, long long a2, long long a3, unsigned __int8 a4)
{
unsigned int v5; // ebp
int v6; // eax
long long v7; // rdx
int v8; // r12d
long long v10; // r14
v5 = a3;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
std::string::resize(a1, 15LL, a3);
v6 = llama_token_to_piece(a2, v5, *a1, *((unsigned int *)a1 + 2), 0LL, a4);
if ( v6 < 0 )
{
v8 = -v6;
std::string::resize(a1, (unsigned int)-v6, v7);
if ( (unsigned int)llama_token_to_piece(a2, v5, *a1, *((unsigned int *)a1 + 2), 0LL, a4) != v8 )
{
v10 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1740LL,
"GGML_ASSERT(%s) failed",
"check == -n_chars");
std::string::~string(a1);
_Unwind_Resume(v10);
}
}
else
{
std::string::resize(a1, (unsigned int)v6, v7);
}
return a1;
}
| common_token_to_piece[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15D,ECX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_0012b632:
PUSH 0xf
POP RSI
CALL 0x00122a70
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_0012b640:
MOVZX R15D,R15B
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x00122680
MOV R12D,EAX
TEST EAX,EAX
JS 0x0012b668
MOV ESI,R12D
MOV RDI,RBX
CALL 0x00122a70
JMP 0x0012b691
LAB_0012b668:
NEG R12D
MOV RDI,RBX
MOV RSI,R12
CALL 0x00122a70
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_0012b67c:
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x00122680
CMP EAX,R12D
JNZ 0x0012b69d
LAB_0012b691:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0012b69d:
LEA RDI,[0x192c65]
LEA RDX,[0x19196f]
LEA RCX,[0x193306]
MOV ESI,0x6cc
XOR EAX,EAX
CALL 0x00122c90
|
/* common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) */
llama_vocab * common_token_to_piece_abi_cxx11_(llama_vocab *param_1,int param_2,bool param_3)
{
int iVar1;
int iVar2;
int1 in_CL;
int7 in_register_00000011;
int4 in_register_00000034;
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
/* try { // try from 0012b632 to 0012b639 has its CatchHandler @ 0012b6c0 */
std::__cxx11::string::resize((ulong)param_1);
/* try { // try from 0012b640 to 0012b675 has its CatchHandler @ 0012b6c2 */
iVar1 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1);
/* try { // try from 0012b67c to 0012b6bd has its CatchHandler @ 0012b6be */
iVar2 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar2 != -iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6cc
,"GGML_ASSERT(%s) failed","check == -n_chars");
}
}
else {
std::__cxx11::string::resize((ulong)param_1);
}
return param_1;
}
| |
44,660 | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) | monkey531[P]llama/common/common.cpp | std::string common_token_to_piece(const struct llama_vocab * vocab, llama_token token, bool special) {
std::string piece;
piece.resize(piece.capacity()); // using string internal cache, 15 bytes + '\n'
const int n_chars = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
if (n_chars < 0) {
piece.resize(-n_chars);
int check = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special);
GGML_ASSERT(check == -n_chars);
}
else {
piece.resize(n_chars);
}
return piece;
} | O3 | cpp | common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0xf, %esi
xorl %edx, %edx
callq 0x1a1d0
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movzbl %r15b, %r15d
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x1a650
movl %eax, %r12d
testl %eax, %eax
js 0x26b26
movl %r12d, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1a1d0
jmp 0x26b51
negl %r12d
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x1a1d0
movq (%rbx), %rdx
movl 0x8(%rbx), %ecx
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x1a650
cmpl %r12d, %eax
jne 0x26b63
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8710b(%rip), %rdi # 0xadc75
leaq 0x85ddb(%rip), %rdx # 0xac94c
leaq 0x8779e(%rip), %rcx # 0xae316
movl $0x6cc, %esi # imm = 0x6CC
xorl %eax, %eax
callq 0x1ac70
jmp 0x26b88
jmp 0x26b88
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x26b9f
movq (%r13), %rsi
incq %rsi
callq 0x1a740
movq %r14, %rdi
callq 0x1ad30
| _Z21common_token_to_pieceB5cxx11PK11llama_vocabib:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov esi, 0Fh
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
movzx r15d, r15b
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
mov r12d, eax
test eax, eax
js short loc_26B26
mov esi, r12d
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
jmp short loc_26B51
loc_26B26:
neg r12d
mov rdi, rbx
mov rsi, r12
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rdx, [rbx]
mov ecx, [rbx+8]
mov rdi, r14
mov esi, ebp
xor r8d, r8d
mov r9d, r15d
call _llama_token_to_piece
cmp eax, r12d
jnz short loc_26B63
loc_26B51:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_26B63:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNChars; "check == -n_chars"
mov esi, 6CCh
xor eax, eax
call _ggml_abort
jmp short loc_26B88
jmp short $+2
loc_26B88:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_26B9F
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_26B9F:
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_token_to_piece[abi:cxx11](_QWORD *a1, long long a2, unsigned int a3, long long a4)
{
long long v4; // rax
unsigned __int8 v5; // r15
_QWORD *v7; // r13
int v8; // eax
long long v9; // rcx
long long v10; // r12
long long v12; // r14
long long v13; // [rsp-8h] [rbp-38h]
long long v14; // [rsp-8h] [rbp-38h]
v13 = v4;
v5 = a4;
v7 = a1 + 2;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
std::string::resize(a1, 15LL, 0LL, a4);
v8 = llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, v5, v13);
if ( v8 < 0 )
{
v10 = (unsigned int)-v8;
std::string::resize(a1, v10, 0LL, v9);
if ( (unsigned int)llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, v5, v14) != (_DWORD)v10 )
{
v12 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1740LL,
"GGML_ASSERT(%s) failed",
"check == -n_chars");
if ( (_QWORD *)*a1 != v7 )
operator delete((void *)*a1, *v7 + 1LL);
_Unwind_Resume(v12);
}
}
else
{
std::string::resize(a1, (unsigned int)v8, 0LL, v9);
}
return a1;
}
| common_token_to_piece[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_00126aea:
MOV ESI,0xf
XOR EDX,EDX
CALL 0x0011a1d0
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_00126afc:
MOVZX R15D,R15B
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x0011a650
MOV R12D,EAX
TEST EAX,EAX
JS 0x00126b26
MOV ESI,R12D
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0011a1d0
JMP 0x00126b51
LAB_00126b26:
NEG R12D
MOV RDI,RBX
MOV RSI,R12
XOR EDX,EDX
CALL 0x0011a1d0
MOV RDX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
LAB_00126b3c:
MOV RDI,R14
MOV ESI,EBP
XOR R8D,R8D
MOV R9D,R15D
CALL 0x0011a650
CMP EAX,R12D
JNZ 0x00126b63
LAB_00126b51:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00126b63:
LEA RDI,[0x1adc75]
LEA RDX,[0x1ac94c]
LEA RCX,[0x1ae316]
MOV ESI,0x6cc
XOR EAX,EAX
CALL 0x0011ac70
|
/* common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) */
llama_vocab * common_token_to_piece_abi_cxx11_(llama_vocab *param_1,int param_2,bool param_3)
{
int iVar1;
int iVar2;
int1 in_CL;
int7 in_register_00000011;
int4 in_register_00000034;
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
/* try { // try from 00126aea to 00126af5 has its CatchHandler @ 00126b86 */
std::__cxx11::string::resize((ulong)param_1,'\x0f');
/* try { // try from 00126afc to 00126b35 has its CatchHandler @ 00126b88 */
iVar1 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1,(char)-iVar1);
/* try { // try from 00126b3c to 00126b83 has its CatchHandler @ 00126b84 */
iVar2 = llama_token_to_piece
(CONCAT44(in_register_00000034,param_2),
CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar2 != -iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6cc
,"GGML_ASSERT(%s) failed","check == -n_chars");
}
}
else {
std::__cxx11::string::resize((ulong)param_1,(char)iVar1);
}
return param_1;
}
| |
44,661 | ft_boolean_reinit_search | eloqsql/storage/myisam/ft_boolean_search.c | void ft_boolean_reinit_search(FT_INFO *ftb)
{
_ftb_init_index_search(ftb);
} | O3 | c | ft_boolean_reinit_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0x348(%rdi)
je 0x4c62d
movq %rdi, %rbx
cmpl $-0x1, 0x340(%rdi)
je 0x4c62d
movl $0x2, 0x348(%rbx)
leaq 0x70(%rbx), %r14
movslq 0x80(%rbx), %r12
testq %r12, %r12
jle 0x4c617
leaq 0xa0(%rbx), %r15
movq (%r14), %rax
movq (%rax,%r12,8), %r13
testb $0x1, 0x8(%r13)
je 0x4c5ec
movq (%r13), %rax
testq %rax, %rax
je 0x4c599
movq %r13, %rcx
movl 0x8(%rax), %edx
testb $0x1, %dl
jne 0x4c599
movl 0x8(%rcx), %esi
testb $0x4, %sil
jne 0x4c5a9
movl 0x48(%rax), %edi
subl 0x4c(%rax), %edi
btl $0x1, %esi
sbbl $0x0, %edi
ja 0x4c5a9
orl $0x1, %edx
movl %edx, 0x8(%rax)
movq (%rcx), %rcx
movq (%rcx), %rax
testq %rax, %rax
jne 0x4c568
cmpq $0x0, (%r15)
je 0x4c5ca
movq %r15, %rdi
callq 0x5fcf1
jmp 0x4c5ec
movq $-0x1, 0x10(%r13)
cmpq %rax, %r13
je 0x4c605
testb $0x4, 0x8(%r13)
jne 0x4c605
movq (%r13), %rcx
incl 0x4c(%rcx)
movq (%r13), %r13
jmp 0x4c5b1
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x8, %ecx
leaq 0x504(%rip), %r8 # 0x4cae8
xorl %r9d, %r9d
callq 0x5faf0
movb $0x0, 0x4c(%r13)
movq %rbx, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x4c024
testl %eax, %eax
jne 0x4c62d
leaq -0x1(%r12), %rax
cmpq $0x1, %r12
movq %rax, %r12
jg 0x4c54a
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5d9b7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ft_boolean_reinit_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp dword ptr [rdi+348h], 0
jz loc_4C62D
mov rbx, rdi
cmp dword ptr [rdi+340h], 0FFFFFFFFh
jz loc_4C62D
mov dword ptr [rbx+348h], 2
lea r14, [rbx+70h]
movsxd r12, dword ptr [rbx+80h]
test r12, r12
jle loc_4C617
lea r15, [rbx+0A0h]
loc_4C54A:
mov rax, [r14]
mov r13, [rax+r12*8]
test byte ptr [r13+8], 1
jz loc_4C5EC
mov rax, [r13+0]
test rax, rax
jz short loc_4C599
mov rcx, r13
loc_4C568:
mov edx, [rax+8]
test dl, 1
jnz short loc_4C599
mov esi, [rcx+8]
test sil, 4
jnz short loc_4C5A9
mov edi, [rax+48h]
sub edi, [rax+4Ch]
bt esi, 1
sbb edi, 0
ja short loc_4C5A9
or edx, 1
mov [rax+8], edx
mov rcx, [rcx]
mov rax, [rcx]
test rax, rax
jnz short loc_4C568
loc_4C599:
cmp qword ptr [r15], 0
jz short loc_4C5CA
mov rdi, r15
call reset_tree
jmp short loc_4C5EC
loc_4C5A9:
mov qword ptr [r13+10h], 0FFFFFFFFFFFFFFFFh
loc_4C5B1:
cmp r13, rax
jz short loc_4C605
test byte ptr [r13+8], 4
jnz short loc_4C605
mov rcx, [r13+0]
inc dword ptr [rcx+4Ch]
mov r13, [r13+0]
jmp short loc_4C5B1
loc_4C5CA:
xorps xmm0, xmm0
movups [rsp+40h+var_40], xmm0
mov rdi, r15
xor esi, esi
xor edx, edx
mov ecx, 8
lea r8, _ftb_no_dupes_cmp
xor r9d, r9d
call init_tree
loc_4C5EC:
mov byte ptr [r13+4Ch], 0
mov rdi, rbx
mov rsi, r13
mov edx, 1
call _ft2_search
test eax, eax
jnz short loc_4C62D
loc_4C605:
lea rax, [r12-1]
cmp r12, 1
mov r12, rax
jg loc_4C54A
loc_4C617:
mov rdi, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp queue_fix
loc_4C62D:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void ft_boolean_reinit_search(long long a1)
{
_QWORD *v1; // r14
long long v2; // r12
long long v3; // r13
_DWORD *v4; // rax
_DWORD *v5; // rcx
int v6; // edx
if ( *(_DWORD *)(a1 + 840) && *(_DWORD *)(a1 + 832) != -1 )
{
*(_DWORD *)(a1 + 840) = 2;
v1 = (_QWORD *)(a1 + 112);
v2 = *(int *)(a1 + 128);
if ( v2 <= 0 )
{
LABEL_20:
queue_fix(a1 + 112);
}
else
{
while ( 1 )
{
v3 = *(_QWORD *)(*v1 + 8 * v2);
if ( (*(_BYTE *)(v3 + 8) & 1) != 0 )
{
v4 = *(_DWORD **)v3;
if ( *(_QWORD *)v3 )
{
v5 = *(_DWORD **)(*v1 + 8 * v2);
do
{
v6 = v4[2];
if ( (v6 & 1) != 0 )
break;
if ( (v5[2] & 4) != 0 || v4[18] - v4[19] > (unsigned int)((v5[2] & 2) != 0) )
{
*(_QWORD *)(v3 + 16) = -1LL;
while ( (_DWORD *)v3 != v4 && (*(_BYTE *)(v3 + 8) & 4) == 0 )
{
++*(_DWORD *)(*(_QWORD *)v3 + 76LL);
v3 = *(_QWORD *)v3;
}
goto LABEL_19;
}
v4[2] = v6 | 1;
v5 = *(_DWORD **)v5;
v4 = *(_DWORD **)v5;
}
while ( *(_QWORD *)v5 );
}
if ( *(_QWORD *)(a1 + 160) )
reset_tree(a1 + 160);
else
init_tree(a1 + 160, 0, 0, 8, (unsigned int)ftb_no_dupes_cmp, 0, 0LL, 0LL);
}
*(_BYTE *)(v3 + 76) = 0;
if ( (unsigned int)ft2_search(a1, v3, 1) )
break;
LABEL_19:
if ( v2-- <= 1 )
goto LABEL_20;
}
}
}
}
| ft_boolean_reinit_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP dword ptr [RDI + 0x348],0x0
JZ 0x0014c62d
MOV RBX,RDI
CMP dword ptr [RDI + 0x340],-0x1
JZ 0x0014c62d
MOV dword ptr [RBX + 0x348],0x2
LEA R14,[RBX + 0x70]
MOVSXD R12,dword ptr [RBX + 0x80]
TEST R12,R12
JLE 0x0014c617
LEA R15,[RBX + 0xa0]
LAB_0014c54a:
MOV RAX,qword ptr [R14]
MOV R13,qword ptr [RAX + R12*0x8]
TEST byte ptr [R13 + 0x8],0x1
JZ 0x0014c5ec
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x0014c599
MOV RCX,R13
LAB_0014c568:
MOV EDX,dword ptr [RAX + 0x8]
TEST DL,0x1
JNZ 0x0014c599
MOV ESI,dword ptr [RCX + 0x8]
TEST SIL,0x4
JNZ 0x0014c5a9
MOV EDI,dword ptr [RAX + 0x48]
SUB EDI,dword ptr [RAX + 0x4c]
BT ESI,0x1
SBB EDI,0x0
JA 0x0014c5a9
OR EDX,0x1
MOV dword ptr [RAX + 0x8],EDX
MOV RCX,qword ptr [RCX]
MOV RAX,qword ptr [RCX]
TEST RAX,RAX
JNZ 0x0014c568
LAB_0014c599:
CMP qword ptr [R15],0x0
JZ 0x0014c5ca
MOV RDI,R15
CALL 0x0015fcf1
JMP 0x0014c5ec
LAB_0014c5a9:
MOV qword ptr [R13 + 0x10],-0x1
LAB_0014c5b1:
CMP R13,RAX
JZ 0x0014c605
TEST byte ptr [R13 + 0x8],0x4
JNZ 0x0014c605
MOV RCX,qword ptr [R13]
INC dword ptr [RCX + 0x4c]
MOV R13,qword ptr [R13]
JMP 0x0014c5b1
LAB_0014c5ca:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
MOV ECX,0x8
LEA R8,[0x14cae8]
XOR R9D,R9D
CALL 0x0015faf0
LAB_0014c5ec:
MOV byte ptr [R13 + 0x4c],0x0
MOV RDI,RBX
MOV RSI,R13
MOV EDX,0x1
CALL 0x0014c024
TEST EAX,EAX
JNZ 0x0014c62d
LAB_0014c605:
LEA RAX,[R12 + -0x1]
CMP R12,0x1
MOV R12,RAX
JG 0x0014c54a
LAB_0014c617:
MOV RDI,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0015d9b7
LAB_0014c62d:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ft_boolean_reinit_search(long param_1)
{
long *plVar1;
bool bVar2;
int iVar3;
long *plVar4;
long *plVar5;
long lVar6;
long *plVar7;
if ((*(int *)(param_1 + 0x348) == 0) || (*(int *)(param_1 + 0x340) == -1)) {
return;
}
*(int4 *)(param_1 + 0x348) = 2;
if (0 < (long)*(int *)(param_1 + 0x80)) {
plVar1 = (long *)(param_1 + 0xa0);
lVar6 = (long)*(int *)(param_1 + 0x80);
do {
plVar7 = *(long **)(*(long *)(param_1 + 0x70) + lVar6 * 8);
if ((*(byte *)(plVar7 + 1) & 1) != 0) {
plVar4 = (long *)*plVar7;
plVar5 = plVar7;
if (plVar4 != (long *)0x0) {
LAB_0014c568:
if ((*(uint *)(plVar4 + 1) & 1) == 0) {
if (((*(uint *)(plVar5 + 1) & 4) == 0) &&
((uint)((int)plVar4[9] - *(int *)((long)plVar4 + 0x4c)) <=
(uint)((*(uint *)(plVar5 + 1) >> 1 & 1) != 0))) goto code_r0x0014c588;
plVar7[2] = -1;
for (; (plVar7 != plVar4 && ((*(byte *)(plVar7 + 1) & 4) == 0));
plVar7 = (long *)*plVar7) {
*(int *)(*plVar7 + 0x4c) = *(int *)(*plVar7 + 0x4c) + 1;
}
goto LAB_0014c605;
}
}
LAB_0014c599:
if (*plVar1 == 0) {
init_tree(plVar1,0,0,8,_ftb_no_dupes_cmp,0,0,0);
}
else {
reset_tree(plVar1);
}
}
*(int1 *)((long)plVar7 + 0x4c) = 0;
iVar3 = _ft2_search(param_1,plVar7,1);
if (iVar3 != 0) {
return;
}
LAB_0014c605:
bVar2 = 1 < lVar6;
lVar6 = lVar6 + -1;
} while (bVar2);
}
queue_fix((long *)(param_1 + 0x70));
return;
code_r0x0014c588:
*(uint *)(plVar4 + 1) = *(uint *)(plVar4 + 1) | 1;
plVar4 = *(long **)*plVar5;
plVar5 = (long *)*plVar5;
if (plVar4 == (long *)0x0) goto LAB_0014c599;
goto LAB_0014c568;
}
| |
44,662 | uf_endspace_selected | eloqsql/storage/myisam/mi_packrec.c | static void uf_endspace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill((uchar*) end-spaces,spaces,' ');
}
else
decode_bytes(rec,bit_buff,to,end);
} | O3 | c | uf_endspace_selected:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x82d79
movl (%r15), %r14d
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r14d
jb 0x82db8
jmp 0x82d97
movq %r15, %rdi
movq %rdx, %r14
callq 0x81f99
movq %r14, %rdx
movl $0x1f, 0x4(%r15)
movl (%r15), %r14d
testl %r14d, %r14d
js 0x82db3
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8288a
movl $0x1f, %eax
movl 0x1c(%r12), %r13d
movl %eax, %ecx
subl %r13d, %ecx
jae 0x82e0c
subl %eax, %r13d
movl %eax, %eax
leaq 0x5eb20(%rip), %rcx # 0xe18f0
andl (%rcx,%rax,4), %r14d
movl %r13d, %ecx
shll %cl, %r14d
movq %r15, %rdi
movq %r12, -0x30(%rbp)
movq %rdx, %r12
callq 0x81f99
movq %r12, %rdx
movq -0x30(%rbp), %r12
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r15)
movl (%r15), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r14d
jmp 0x82e23
movl %ecx, 0x4(%r15)
shrl %cl, %r14d
movl 0x1c(%r12), %eax
leaq 0x5ead1(%rip), %rcx # 0xe18f0
andl (%rcx,%rax,4), %r14d
movl %r14d, %r13d
leaq (%rdx,%r13), %rax
cmpq %rbx, %rax
jbe 0x82e46
movl $0x1, 0x28(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r14
negq %r14
cmpq %rbx, %rax
je 0x82e60
leaq (%rbx,%r14), %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x8288a
addq %r14, %rbx
movq %rbx, %rdi
movl $0x20, %esi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
| uf_endspace_selected_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r15, rsi
mov r12, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_82D79
mov r14d, [r15]
dec eax
mov [r15+4], eax
bt r14d, eax
jb short loc_82DB8
jmp short loc_82D97
loc_82D79:
mov rdi, r15
mov r14, rdx
call fill_buffer_0
mov rdx, r14
mov dword ptr [r15+4], 1Fh
mov r14d, [r15]
test r14d, r14d
js short loc_82DB3
loc_82D97:
mov rdi, r12
mov rsi, r15
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes_0
loc_82DB3:
mov eax, 1Fh
loc_82DB8:
mov r13d, [r12+1Ch]
mov ecx, eax
sub ecx, r13d
jnb short loc_82E0C
sub r13d, eax
mov eax, eax
lea rcx, mask_0
and r14d, [rcx+rax*4]
mov ecx, r13d
shl r14d, cl
mov rdi, r15
mov [rbp+var_30], r12
mov r12, rdx
call fill_buffer_0
mov rdx, r12
mov r12, [rbp+var_30]
mov eax, 20h ; ' '
sub eax, r13d
mov [r15+4], eax
mov eax, [r15]
neg r13d
mov ecx, r13d
shr eax, cl
add r14d, eax
jmp short loc_82E23
loc_82E0C:
mov [r15+4], ecx
shr r14d, cl
mov eax, [r12+1Ch]
lea rcx, mask_0
and r14d, [rcx+rax*4]
loc_82E23:
mov r13d, r14d
lea rax, [rdx+r13]
cmp rax, rbx
jbe short loc_82E46
mov dword ptr [r15+28h], 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_82E46:
mov r14, r13
neg r14
cmp rax, rbx
jz short loc_82E60
lea rcx, [rbx+r14]
mov rdi, r12
mov rsi, r15
call decode_bytes_0
loc_82E60:
add rbx, r14
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
| _BYTE * uf_endspace_selected_0(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4)
{
long long v5; // r12
unsigned int v6; // eax
unsigned int v7; // r14d
unsigned int v8; // eax
_BYTE *v9; // r14
_BYTE *result; // rax
unsigned int v11; // r13d
unsigned int v12; // ecx
int v13; // r13d
int v14; // r14d
_BYTE *v15; // r12
unsigned int v16; // r14d
v5 = a1;
v6 = a2[1];
if ( v6 )
{
v7 = *a2;
v8 = v6 - 1;
a2[1] = v8;
if ( !_bittest((const int *)&v7, v8) )
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
else
{
v9 = a3;
fill_buffer_0((long long)a2);
a3 = v9;
a2[1] = 31;
v7 = *a2;
if ( (*a2 & 0x80000000) == 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
v8 = 31;
}
v11 = *(_DWORD *)(a1 + 28);
v12 = v8 - v11;
if ( v8 >= v11 )
{
a2[1] = v12;
v16 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v12);
}
else
{
v13 = v11 - v8;
v14 = (mask_0[v8] & v7) << v13;
v15 = a3;
fill_buffer_0((long long)a2);
a3 = v15;
v5 = a1;
a2[1] = 32 - v13;
v16 = (*a2 >> -(char)v13) + v14;
}
result = &a3[v16];
if ( result <= a4 )
{
if ( result != a4 )
decode_bytes_0(v5, (long long)a2, a3, &a4[-v16]);
return (_BYTE *)memset(&a4[-v16], 32LL, v16);
}
else
{
a2[10] = 1;
}
return result;
}
| uf_endspace_selected:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R15,RSI
MOV R12,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x00182d79
MOV R14D,dword ptr [R15]
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R14D,EAX
JC 0x00182db8
JMP 0x00182d97
LAB_00182d79:
MOV RDI,R15
MOV R14,RDX
CALL 0x00181f99
MOV RDX,R14
MOV dword ptr [R15 + 0x4],0x1f
MOV R14D,dword ptr [R15]
TEST R14D,R14D
JS 0x00182db3
LAB_00182d97:
MOV RDI,R12
MOV RSI,R15
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018288a
LAB_00182db3:
MOV EAX,0x1f
LAB_00182db8:
MOV R13D,dword ptr [R12 + 0x1c]
MOV ECX,EAX
SUB ECX,R13D
JNC 0x00182e0c
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e18f0]
AND R14D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R14D,CL
MOV RDI,R15
MOV qword ptr [RBP + -0x30],R12
MOV R12,RDX
CALL 0x00181f99
MOV RDX,R12
MOV R12,qword ptr [RBP + -0x30]
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R15 + 0x4],EAX
MOV EAX,dword ptr [R15]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R14D,EAX
JMP 0x00182e23
LAB_00182e0c:
MOV dword ptr [R15 + 0x4],ECX
SHR R14D,CL
MOV EAX,dword ptr [R12 + 0x1c]
LEA RCX,[0x1e18f0]
AND R14D,dword ptr [RCX + RAX*0x4]
LAB_00182e23:
MOV R13D,R14D
LEA RAX,[RDX + R13*0x1]
CMP RAX,RBX
JBE 0x00182e46
MOV dword ptr [R15 + 0x28],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00182e46:
MOV R14,R13
NEG R14
CMP RAX,RBX
JZ 0x00182e60
LEA RCX,[RBX + R14*0x1]
MOV RDI,R12
MOV RSI,R15
CALL 0x0018288a
LAB_00182e60:
ADD RBX,R14
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
|
void uf_endspace_selected(long param_1,uint *param_2,long param_3,ulong param_4)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
ulong __n;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
if ((int)uVar5 < 0) {
uVar3 = 0x1f;
goto LAB_00182db8;
}
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) != 0) {
LAB_00182db8:
uVar1 = *(uint *)(param_1 + 0x1c);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
__n = (ulong)uVar5;
if (param_3 + __n <= param_4) {
if (param_3 + __n != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 + -__n);
}
memset((void *)(param_4 + -__n),0x20,__n);
return;
}
param_2[10] = 1;
return;
}
}
decode_bytes(param_1,param_2,param_3,param_4);
return;
}
| |
44,663 | MyCTX_nopad::update_source_tail(unsigned char const*, unsigned int) | eloqsql/mysys_ssl/my_crypt.cc | void update_source_tail(const uchar* src, uint slen)
{
if (!slen)
return;
uint new_tail_len= (source_tail_len + slen) % MY_AES_BLOCK_SIZE;
if (new_tail_len)
{
if (slen + source_tail_len < MY_AES_BLOCK_SIZE)
{
memcpy(source_tail + source_tail_len, src, slen);
}
else
{
DBUG_ASSERT(slen > new_tail_len);
memcpy(source_tail, src + slen - new_tail_len, new_tail_len);
}
}
source_tail_len= new_tail_len;
} | O3 | cpp | MyCTX_nopad::update_source_tail(unsigned char const*, unsigned int):
testl %edx, %edx
je 0xd8f62
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0xdc(%rdi), %eax
leal (%rax,%rdx), %ecx
movl %ecx, %r14d
andl $0xf, %r14d
je 0xd8f57
leaq 0xf0(%rbx), %rdi
cmpl $0xf, %ecx
ja 0xd8f47
addq %rax, %rdi
movl %edx, %edx
jmp 0xd8f52
movl %edx, %eax
addq %rax, %rsi
movl %r14d, %edx
subq %rdx, %rsi
callq 0x29080
movl %r14d, 0xdc(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| _ZN11MyCTX_nopad18update_source_tailEPKhj:
test edx, edx
jz short locret_D8F62
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov eax, [rdi+0DCh]
lea ecx, [rax+rdx]
mov r14d, ecx
and r14d, 0Fh
jz short loc_D8F57
lea rdi, [rbx+0F0h]
cmp ecx, 0Fh
ja short loc_D8F47
add rdi, rax
mov edx, edx
jmp short loc_D8F52
loc_D8F47:
mov eax, edx
add rsi, rax
mov edx, r14d
sub rsi, rdx
loc_D8F52:
call _memcpy
loc_D8F57:
mov [rbx+0DCh], r14d
pop rbx
pop r14
pop rbp
locret_D8F62:
retn
| void MyCTX_nopad::update_source_tail(MyCTX_nopad *this, const unsigned __int8 *a2, long long a3)
{
long long v4; // rax
unsigned int v5; // r14d
char *v6; // rdi
const unsigned __int8 *v7; // rsi
if ( (_DWORD)a3 )
{
v4 = *((unsigned int *)this + 55);
v5 = ((_BYTE)v4 + (_BYTE)a3) & 0xF;
if ( (((_BYTE)v4 + (_BYTE)a3) & 0xF) != 0 )
{
v6 = (char *)this + 240;
if ( (unsigned int)(v4 + a3) > 0xF )
{
v7 = &a2[(unsigned int)a3];
a3 = ((_BYTE)v4 + (_BYTE)a3) & 0xF;
a2 = &v7[-v5];
}
else
{
v6 += v4;
a3 = (unsigned int)a3;
}
memcpy(v6, a2, a3);
}
*((_DWORD *)this + 55) = v5;
}
}
| update_source_tail:
TEST EDX,EDX
JZ 0x001d8f62
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0xdc]
LEA ECX,[RAX + RDX*0x1]
MOV R14D,ECX
AND R14D,0xf
JZ 0x001d8f57
LEA RDI,[RBX + 0xf0]
CMP ECX,0xf
JA 0x001d8f47
ADD RDI,RAX
MOV EDX,EDX
JMP 0x001d8f52
LAB_001d8f47:
MOV EAX,EDX
ADD RSI,RAX
MOV EDX,R14D
SUB RSI,RDX
LAB_001d8f52:
CALL 0x00129080
LAB_001d8f57:
MOV dword ptr [RBX + 0xdc],R14D
POP RBX
POP R14
POP RBP
LAB_001d8f62:
RET
|
/* MyCTX_nopad::update_source_tail(unsigned char const*, unsigned int) */
void __thiscall MyCTX_nopad::update_source_tail(MyCTX_nopad *this,uchar *param_1,uint param_2)
{
uint uVar1;
size_t __n;
MyCTX_nopad *__dest;
uint uVar2;
if (param_2 != 0) {
uVar1 = *(uint *)(this + 0xdc) + param_2;
uVar2 = uVar1 & 0xf;
if (uVar2 != 0) {
__dest = this + 0xf0;
if (uVar1 < 0x10) {
__dest = __dest + *(uint *)(this + 0xdc);
__n = (size_t)param_2;
}
else {
__n = (size_t)uVar2;
param_1 = param_1 + (param_2 - __n);
}
memcpy(__dest,param_1,__n);
}
*(uint *)(this + 0xdc) = uVar2;
}
return;
}
| |
44,664 | google::protobuf::compiler::java::PrintEnumVerifierLogic(google::protobuf::io::Printer*, google::protobuf::FieldDescriptor const*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<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&, char const*, char const*, bool) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc | void PrintEnumVerifierLogic(io::Printer* printer,
const FieldDescriptor* descriptor,
const std::map<std::string, std::string>& variables,
const char* var_name,
const char* terminating_string, bool enforce_lite) {
std::string enum_verifier_string =
enforce_lite ? StrCat(var_name, ".internalGetVerifier()")
: StrCat(
"new com.google.protobuf.Internal.EnumVerifier() {\n"
" @java.lang.Override\n"
" public boolean isInRange(int number) {\n"
" return ",
var_name,
".forNumber(number) != null;\n"
" }\n"
" }");
printer->Print(
variables,
StrCat(enum_verifier_string, terminating_string).c_str());
} | O3 | cpp | google::protobuf::compiler::java::PrintEnumVerifierLogic(google::protobuf::io::Printer*, google::protobuf::FieldDescriptor const*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<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&, char const*, char const*, bool):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %r8, %r15
movq %rdx, %rbx
movq %rdi, %r14
testl %r9d, %r9d
je 0x43131
leaq 0x80(%rsp), %r12
movq %rcx, (%r12)
movq %rcx, %rdi
callq 0x1f1f0
movq %rax, 0x8(%r12)
leaq 0x15e91d(%rip), %rax # 0x1a1a31
leaq 0x50(%rsp), %rdx
movq %rax, (%rdx)
movq $0x16, 0x8(%rdx)
movq %rsp, %rdi
movq %r12, %rsi
callq 0x10b48d
jmp 0x43187
leaq 0x15e910(%rip), %rax # 0x1a1a48
leaq 0x80(%rsp), %r12
movq %rax, (%r12)
movq $0x8e, 0x8(%r12)
leaq 0x50(%rsp), %r13
movq %rcx, (%r13)
movq %rcx, %rdi
callq 0x1f1f0
movq %rax, 0x8(%r13)
leaq 0x15e96e(%rip), %rax # 0x1a1ad7
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq $0x2d, 0x8(%rcx)
movq %rsp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10b516
movups (%rsp), %xmm0
leaq 0x80(%rsp), %r12
movups %xmm0, (%r12)
leaq 0x50(%rsp), %r13
movq %r15, (%r13)
movq %r15, %rdi
callq 0x1f1f0
movq %rax, 0x8(%r13)
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10b48d
movq 0x20(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x16cd32
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x431e0
callq 0x1f4a0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x431f3
callq 0x1f4a0
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4321f
callq 0x1f4a0
jmp 0x4321f
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43232
callq 0x1f4a0
movq %rbx, %rdi
callq 0x1f860
| _ZN6google8protobuf8compiler4java22PrintEnumVerifierLogicEPNS0_2io7PrinterEPKNS0_15FieldDescriptorERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESF_St4lessISF_ESaISt4pairIKSF_SF_EEEPKcSQ_b:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B0h
mov r15, r8
mov rbx, rdx
mov r14, rdi
test r9d, r9d
jz short loc_43131
lea r12, [rsp+0D8h+var_58]
mov [r12], rcx
mov rdi, rcx
call _strlen
mov [r12+8], rax
lea rax, aInternalgetver; ".internalGetVerifier()"
lea rdx, [rsp+0D8h+var_88]
mov [rdx], rax
mov qword ptr [rdx+8], 16h
mov rdi, rsp
mov rsi, r12
call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&)
jmp short loc_43187
loc_43131:
lea rax, aNewComGooglePr; "new com.google.protobuf.Internal.EnumVe"...
lea r12, [rsp+0D8h+var_58]
mov [r12], rax
mov qword ptr [r12+8], 8Eh
lea r13, [rsp+0D8h+var_88]
mov [r13+0], rcx
mov rdi, rcx
call _strlen
mov [r13+8], rax
lea rax, aFornumberNumbe; ".forNumber(number) != null;\n }"...
lea rcx, [rsp+0D8h+var_B8]
mov [rcx], rax
mov qword ptr [rcx+8], 2Dh ; '-'
mov rdi, rsp
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&)
loc_43187:
movups xmm0, [rsp+0D8h+var_D8]
lea r12, [rsp+0D8h+var_58]
movups xmmword ptr [r12], xmm0
lea r13, [rsp+0D8h+var_88]
mov [r13+0], r15
mov rdi, r15
call _strlen
mov [r13+8], rax
lea rdi, [rsp+0D8h+var_B8]
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&)
mov rdx, [rsp+0D8h+var_B8]
mov rdi, r14; this
mov rsi, rbx
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
lea rax, [rsp+0D8h+var_A8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_431E0
call __ZdlPv; operator delete(void *)
loc_431E0:
lea rax, [rsp+0D8h+var_C8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_431F3
call __ZdlPv; operator delete(void *)
loc_431F3:
add rsp, 0B0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4321F
call __ZdlPv; operator delete(void *)
jmp short loc_4321F
mov rbx, rax
loc_4321F:
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_43232
call __ZdlPv; operator delete(void *)
loc_43232:
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::compiler::java::PrintEnumVerifierLogic(
google::protobuf::io::Printer *this,
long long a2,
long long a3,
const char *a4,
const char *a5,
int a6)
{
__int128 v7; // [rsp+0h] [rbp-D8h] BYREF
char v8; // [rsp+10h] [rbp-C8h] BYREF
int v9; // [rsp+18h] [rbp-C0h]
int *v10; // [rsp+20h] [rbp-B8h] BYREF
long long v11; // [rsp+28h] [rbp-B0h]
int v12[6]; // [rsp+30h] [rbp-A8h] BYREF
void *v13; // [rsp+48h] [rbp-90h]
const char *v14; // [rsp+50h] [rbp-88h]
long long v15; // [rsp+58h] [rbp-80h]
__int128 v16; // [rsp+80h] [rbp-58h]
if ( a6 )
{
*(_QWORD *)&v16 = a4;
*((_QWORD *)&v16 + 1) = strlen(a4);
v14 = ".internalGetVerifier()";
v15 = 22LL;
google::protobuf::StrCat[abi:cxx11](&v7);
}
else
{
*(_QWORD *)&v16 = "new com.google.protobuf.Internal.EnumVerifier() {\n"
" @java.lang.Override\n"
" public boolean isInRange(int number) {\n"
" return ";
*((_QWORD *)&v16 + 1) = 142LL;
v14 = a4;
v15 = strlen(a4);
v10 = (int *)".forNumber(number) != null;\n }\n }";
v11 = 45LL;
google::protobuf::StrCat[abi:cxx11](&v7);
}
v16 = v7;
v14 = a5;
v15 = strlen(a5);
google::protobuf::StrCat[abi:cxx11](&v10);
google::protobuf::io::Printer::Print(
this,
(void *)v7,
SDWORD2(v7),
v8,
v9,
(int)v10,
v11,
v12[0],
v12[2],
v12[4],
v13,
(int)v14,
v15);
if ( v10 != v12 )
operator delete(v10);
if ( (char *)v7 != &v8 )
operator delete((void *)v7);
}
| PrintEnumVerifierLogic:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb0
MOV R15,R8
MOV RBX,RDX
MOV R14,RDI
TEST R9D,R9D
JZ 0x00143131
LEA R12,[RSP + 0x80]
MOV qword ptr [R12],RCX
MOV RDI,RCX
CALL 0x0011f1f0
MOV qword ptr [R12 + 0x8],RAX
LEA RAX,[0x2a1a31]
LEA RDX,[RSP + 0x50]
MOV qword ptr [RDX],RAX
MOV qword ptr [RDX + 0x8],0x16
MOV RDI,RSP
MOV RSI,R12
CALL 0x0020b48d
JMP 0x00143187
LAB_00143131:
LEA RAX,[0x2a1a48]
LEA R12,[RSP + 0x80]
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x8e
LEA R13,[RSP + 0x50]
MOV qword ptr [R13],RCX
MOV RDI,RCX
CALL 0x0011f1f0
MOV qword ptr [R13 + 0x8],RAX
LEA RAX,[0x2a1ad7]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],0x2d
MOV RDI,RSP
MOV RSI,R12
MOV RDX,R13
CALL 0x0020b516
LAB_00143187:
MOVUPS XMM0,xmmword ptr [RSP]
LEA R12,[RSP + 0x80]
MOVUPS xmmword ptr [R12],XMM0
LEA R13,[RSP + 0x50]
MOV qword ptr [R13],R15
MOV RDI,R15
CALL 0x0011f1f0
MOV qword ptr [R13 + 0x8],RAX
LAB_001431ad:
LEA RDI,[RSP + 0x20]
MOV RSI,R12
MOV RDX,R13
CALL 0x0020b48d
MOV RDX,qword ptr [RSP + 0x20]
LAB_001431c2:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0026cd32
LAB_001431cd:
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001431e0
CALL 0x0011f4a0
LAB_001431e0:
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001431f3
CALL 0x0011f4a0
LAB_001431f3:
ADD RSP,0xb0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* google::protobuf::compiler::java::PrintEnumVerifierLogic(google::protobuf::io::Printer*,
google::protobuf::FieldDescriptor const*, std::map<std::__cxx11::string, std::__cxx11::string,
std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const,
std::__cxx11::string > > > const&, char const*, char const*, bool) */
void google::protobuf::compiler::java::PrintEnumVerifierLogic
(Printer *param_1,FieldDescriptor *param_2,map *param_3,char *param_4,char *param_5,
bool param_6)
{
int3 in_register_00000089;
int1 *local_d8;
int8 uStack_d0;
int1 local_c8 [16];
char *local_b8;
int8 local_b0;
char local_a8 [32];
char *local_88;
size_t local_80;
char *local_58;
size_t sStack_50;
if (CONCAT31(in_register_00000089,param_6) == 0) {
local_58 =
"new com.google.protobuf.Internal.EnumVerifier() {\n @java.lang.Override\n public boolean isInRange(int number) {\n return "
;
sStack_50 = 0x8e;
local_88 = param_4;
local_80 = strlen(param_4);
local_b8 = ".forNumber(number) != null;\n }\n }";
local_b0 = 0x2d;
StrCat_abi_cxx11_((protobuf *)&local_d8,(AlphaNum *)&local_58,(AlphaNum *)&local_88,
(AlphaNum *)&local_b8);
}
else {
local_58 = param_4;
sStack_50 = strlen(param_4);
local_88 = ".internalGetVerifier()";
local_80 = 0x16;
StrCat_abi_cxx11_((protobuf *)&local_d8,(AlphaNum *)&local_58,(AlphaNum *)&local_88);
}
local_58 = local_d8;
sStack_50 = uStack_d0;
local_88 = param_5;
local_80 = strlen(param_5);
/* try { // try from 001431ad to 001431bc has its CatchHandler @ 0014321c */
StrCat_abi_cxx11_((protobuf *)&local_b8,(AlphaNum *)&local_58,(AlphaNum *)&local_88);
/* try { // try from 001431c2 to 001431cc has its CatchHandler @ 00143204 */
io::Printer::Print(param_1,param_3,local_b8);
if (local_b8 != local_a8) {
operator_delete(local_b8);
}
if (local_d8 != local_c8) {
operator_delete(local_d8);
}
return;
}
| |
44,665 | mi_keylength | eloqsql/storage/myisam/mi_search.c | uint _mi_keylength(MI_KEYDEF *keyinfo, register uchar *key)
{
reg1 HA_KEYSEG *keyseg;
uchar *start;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)))
return (keyinfo->keylength);
start=key;
for (keyseg=keyinfo->seg ; keyseg->type ; keyseg++)
{
if (keyseg->flag & HA_NULL_PART)
if (!*key++)
continue;
if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART))
{
uint length;
get_key_length(length,key);
key+=length;
}
else
key+= keyseg->length;
}
return((uint) (key-start)+keyseg->length);
} | O0 | c | mi_keylength:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x28, %eax
cmpl $0x0, %eax
jne 0xc945c
movq -0x10(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xc955e
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x18(%rax)
je 0xc9546
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xc94a9
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpb $0x0, (%rax)
jne 0xc94a7
jmp 0xc9535
jmp 0xc94a9
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x29, %eax
cmpl $0x0, %eax
je 0xc951d
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0xc94de
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0xc950b
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x18(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xc9533
movq -0x20(%rbp), %rax
movzwl 0x14(%rax), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xc9535
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x20(%rbp)
jmp 0xc9470
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x20(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_keylength:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+0Ah]
and eax, 28h
cmp eax, 0
jnz short loc_C945C
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+12h]
mov [rbp+var_4], eax
jmp loc_C955E
loc_C945C:
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_20], rax
loc_C9470:
mov rax, [rbp+var_20]
cmp byte ptr [rax+18h], 0
jz loc_C9546
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 10h
cmp eax, 0
jz short loc_C94A9
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
cmp byte ptr [rax], 0
jnz short loc_C94A7
jmp loc_C9535
loc_C94A7:
jmp short $+2
loc_C94A9:
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 29h
cmp eax, 0
jz short loc_C951D
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_C94DE
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
jmp short loc_C950B
loc_C94DE:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
add rax, 3
mov [rbp+var_18], rax
loc_C950B:
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_C9533
loc_C951D:
mov rax, [rbp+var_20]
movzx ecx, word ptr [rax+14h]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
loc_C9533:
jmp short $+2
loc_C9535:
mov rax, [rbp+var_20]
add rax, 20h ; ' '
mov [rbp+var_20], rax
jmp loc_C9470
loc_C9546:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_20]
movzx ecx, word ptr [rcx+14h]
add eax, ecx
mov [rbp+var_4], eax
loc_C955E:
mov eax, [rbp+var_4]
pop rbp
retn
| long long mi_keylength(long long a1, unsigned __int8 *a2)
{
unsigned __int8 *v2; // rax
unsigned __int8 *v3; // rax
int v5; // [rsp+0h] [rbp-2Ch]
long long i; // [rsp+Ch] [rbp-20h]
unsigned __int8 *v7; // [rsp+14h] [rbp-18h]
unsigned __int8 *v8; // [rsp+14h] [rbp-18h]
v7 = a2;
if ( (*(_WORD *)(a1 + 10) & 0x28) != 0 )
{
for ( i = *(_QWORD *)(a1 + 40); *(_BYTE *)(i + 24); i += 32LL )
{
if ( (*(_WORD *)(i + 18) & 0x10) != 0 )
{
v2 = v7++;
if ( !*v2 )
continue;
}
if ( (*(_WORD *)(i + 18) & 0x29) != 0 )
{
if ( *v7 == 255 )
{
v5 = _byteswap_ushort(*(_WORD *)(v7 + 1));
v8 = v7 + 3;
}
else
{
v3 = v7;
v8 = v7 + 1;
v5 = *v3;
}
v7 = &v8[v5];
}
else
{
v7 += *(unsigned __int16 *)(i + 20);
}
}
return (unsigned int)(*(unsigned __int16 *)(i + 20) + (_DWORD)v7 - (_DWORD)a2);
}
else
{
return *(unsigned __int16 *)(a1 + 18);
}
}
| _mi_keylength:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x001c945c
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x12]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001c955e
LAB_001c945c:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_001c9470:
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x18],0x0
JZ 0x001c9546
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001c94a9
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
CMP byte ptr [RAX],0x0
JNZ 0x001c94a7
JMP 0x001c9535
LAB_001c94a7:
JMP 0x001c94a9
LAB_001c94a9:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x29
CMP EAX,0x0
JZ 0x001c951d
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x001c94de
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
JMP 0x001c950b
LAB_001c94de:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x3
MOV qword ptr [RBP + -0x18],RAX
LAB_001c950b:
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001c9533
LAB_001c951d:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_001c9533:
JMP 0x001c9535
LAB_001c9535:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x20
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001c9470
LAB_001c9546:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,word ptr [RCX + 0x14]
ADD EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001c955e:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint _mi_keylength(long param_1,byte *param_2)
{
byte bVar1;
byte *pbVar2;
uint local_34;
long local_28;
byte *local_20;
uint local_c;
if ((*(ushort *)(param_1 + 10) & 0x28) == 0) {
local_c = (uint)*(ushort *)(param_1 + 0x12);
}
else {
local_20 = param_2;
for (local_28 = *(long *)(param_1 + 0x28); *(char *)(local_28 + 0x18) != '\0';
local_28 = local_28 + 0x20) {
if (((*(ushort *)(local_28 + 0x12) & 0x10) == 0) ||
(pbVar2 = local_20 + 1, bVar1 = *local_20, local_20 = pbVar2, bVar1 != 0)) {
if ((*(ushort *)(local_28 + 0x12) & 0x29) == 0) {
local_20 = local_20 + (int)(uint)*(ushort *)(local_28 + 0x14);
}
else {
if (*local_20 == 0xff) {
local_34 = (uint)CONCAT11(local_20[1],local_20[2]);
local_20 = local_20 + 3;
}
else {
local_34 = (uint)*local_20;
local_20 = local_20 + 1;
}
local_20 = local_20 + local_34;
}
}
}
local_c = ((int)local_20 - (int)param_2) + (uint)*(ushort *)(local_28 + 0x14);
}
return local_c;
}
| |
44,666 | Lecturer::Lecturer(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&, int, 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&) | slashdotted[P]corsocpp_tp_2025/S9/Lecturer.cpp | Lecturer::Lecturer(
const std::string &n, const std::string &i, int nr, const std::string &c, const std::string &s)
: Employee{n, i, nr}
, m_course{c}
, m_studies{s}
{} | O3 | cpp | Lecturer::Lecturer(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&, int, 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 $0x28, %rsp
movq %r9, %r14
movq %r8, %r15
movl %ecx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x1d80
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl %ebp, %ecx
callq 0x1ef8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2118
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1060
leaq 0x2c79(%rip), %rax # 0x4d98
movq %rax, (%rbx)
leaq 0x50(%rbx), %r12
leaq 0x60(%rbx), %r13
movq %r13, 0x50(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x1d80
leaq 0x70(%rbx), %rdi
leaq 0x80(%rbx), %rax
movq %rax, 0x70(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x1d80
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x218a
movq (%r13), %rsi
incq %rsi
callq 0x1060
jmp 0x218a
movq %rax, %r14
movq %rbx, %rdi
callq 0x1c48
jmp 0x21b3
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x21b3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1060
movq %r14, %rdi
callq 0x1090
nop
| _ZN8LecturerC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_iS7_S7_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, r9
mov r15, r8
mov ebp, ecx
mov r12, rsi
mov rbx, rdi
lea rax, [rsp+58h+var_40]
mov [rax-10h], rax
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
lea r13, [rsp+58h+var_50]
mov rdi, r13
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov ecx, ebp
call _ZN8EmployeeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_i; Employee::Employee(std::string const&,std::string,int)
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_2118
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2118:
lea rax, off_4D98
mov [rbx], rax
lea r12, [rbx+50h]
lea r13, [rbx+60h]
mov [rbx+50h], r13
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rbx+70h]
lea rax, [rbx+80h]
mov [rbx+70h], rax
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)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [r12]; void *
cmp rdi, r13
jz short loc_218A
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_218A
mov r14, rax
loc_218A:
mov rdi, rbx; this
call _ZN8EmployeeD2Ev; Employee::~Employee()
jmp short loc_21B3
mov r14, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_21B3
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_21B3:
mov rdi, r14
call __Unwind_Resume
| long long Lecturer::Lecturer(_QWORD *a1, long long a2, long long a3, int a4, long long a5, long long a6)
{
void *v10[2]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v11[8]; // [rsp+18h] [rbp-40h] BYREF
v10[0] = v11;
std::string::_M_construct<char *>((long long)v10, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
Employee::Employee((long long)a1, a2, (long long)v10, a4);
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
*a1 = &off_4D98;
a1[10] = a1 + 12;
std::string::_M_construct<char *>((long long)(a1 + 10), *(_BYTE **)a5, *(_QWORD *)a5 + *(_QWORD *)(a5 + 8));
a1[14] = a1 + 16;
return std::string::_M_construct<char *>((long long)(a1 + 14), *(_BYTE **)a6, *(_QWORD *)a6 + *(_QWORD *)(a6 + 8));
}
| Lecturer:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,R9
MOV R15,R8
MOV EBP,ECX
MOV R12,RSI
MOV RBX,RDI
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LEA R13,[RSP + 0x8]
MOV RDI,R13
CALL 0x00101d80
LAB_001020ec:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV ECX,EBP
CALL 0x00101ef8
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00102118
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00101060
LAB_00102118:
LEA RAX,[0x104d98]
MOV qword ptr [RBX],RAX
LEA R12,[RBX + 0x50]
LEA R13,[RBX + 0x60]
MOV qword ptr [RBX + 0x50],R13
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_00102138:
MOV RDI,R12
CALL 0x00101d80
LEA RDI,[RBX + 0x70]
LEA RAX,[RBX + 0x80]
MOV qword ptr [RBX + 0x70],RAX
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_00102159:
CALL 0x00101d80
LAB_0010215e:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Lecturer::Lecturer(std::__cxx11::string const&, std::__cxx11::string const&, int,
std::__cxx11::string const&, std::__cxx11::string const&) */
void __thiscall
Lecturer::Lecturer(Lecturer *this,string *param_1,string *param_2,int param_3,string *param_4,
string *param_5)
{
long *local_50 [2];
long local_40 [2];
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char*>
(local_50,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
/* try { // try from 001020ec to 001020fb has its CatchHandler @ 00102194 */
Employee::Employee((Employee *)this,param_1,local_50,param_3);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
*(int ***)this = &PTR_classname_abi_cxx11__00104d98;
*(Lecturer **)(this + 0x50) = this + 0x60;
/* try { // try from 00102138 to 0010213f has its CatchHandler @ 00102187 */
std::__cxx11::string::_M_construct<char*>
(this + 0x50,*(long *)param_4,*(long *)(param_4 + 8) + *(long *)param_4);
*(Lecturer **)(this + 0x70) = this + 0x80;
/* try { // try from 00102159 to 0010215d has its CatchHandler @ 0010216d */
std::__cxx11::string::_M_construct<char*>
(this + 0x70,*(long *)param_5,*(long *)(param_5 + 8) + *(long *)param_5);
return;
}
| |
44,667 | mysql_test_select(Prepared_statement*, TABLE_LIST*) | eloqsql/sql/sql_prepare.cc | static int mysql_test_select(Prepared_statement *stmt,
TABLE_LIST *tables)
{
THD *thd= stmt->thd;
LEX *lex= stmt->lex;
SELECT_LEX_UNIT *unit= &lex->unit;
DBUG_ENTER("mysql_test_select");
lex->first_select_lex()->context.resolve_in_select_list= TRUE;
privilege_t privilege(lex->exchange ? SELECT_ACL | FILE_ACL : SELECT_ACL);
if (tables)
{
if (check_table_access(thd, privilege, tables, FALSE, UINT_MAX, FALSE))
goto error;
}
else if (check_access(thd, privilege, any_db.str, NULL, NULL, 0, 0))
goto error;
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send(thd)))
{
my_error(ER_OUTOFMEMORY, MYF(ME_FATAL),
static_cast<int>(sizeof(select_send)));
goto error;
}
if (open_normal_and_derived_tables(thd, tables, MYSQL_OPEN_FORCE_SHARED_MDL,
DT_INIT | DT_PREPARE))
goto error;
thd->lex->used_tables= 0; // Updated by setup_fields
/*
JOIN::prepare calls
It is not SELECT COMMAND for sure, so setup_tables will be called as
usual, and we pass 0 as setup_tables_done_option
*/
if (unit->prepare(unit->derived, 0, 0))
goto error;
if (!lex->describe && !thd->lex->analyze_stmt && !stmt->is_sql_prepare())
{
/* Make copy of item list, as change_columns may change it */
SELECT_LEX_UNIT* master_unit= unit->first_select()->master_unit();
bool is_union_op=
master_unit->is_unit_op() || master_unit->fake_select_lex;
List<Item> fields(is_union_op ? unit->item_list :
lex->first_select_lex()->item_list);
/* Change columns if a procedure like analyse() */
if (unit->last_procedure && unit->last_procedure->change_columns(thd, fields))
goto error;
/*
We can use lex->result as it should've been prepared in
unit->prepare call above.
*/
if (send_prep_stmt(stmt, lex->result->field_count(fields)) ||
lex->result->send_result_set_metadata(fields, Protocol::SEND_EOF) ||
thd->protocol->flush())
goto error;
DBUG_RETURN(2);
}
DBUG_RETURN(0);
error:
DBUG_RETURN(1);
} | O0 | cpp | mysql_test_select(Prepared_statement*, TABLE_LIST*):
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0xc8, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x7fa720
movb $0x1, 0x88(%rax)
movq -0x48(%rbp), %rax
movq 0xda8(%rax), %rax
movq %rax, -0x98(%rbp)
movl $0x1, %edi
movl $0x200, %esi # imm = 0x200
callq 0x924840
movq -0x98(%rbp), %rdx
movq %rax, %rcx
movl $0x1, %eax
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x923056
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x38(%rbp), %rdx
xorl %r9d, %r9d
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
movl %r9d, %ecx
callq 0x8f5500
testb $0x1, %al
jne 0x92304f
jmp 0x923054
jmp 0x92334a
jmp 0x92308c
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
leaq 0x10575db(%rip), %rax # 0x197a640
movq (%rax), %rdx
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
movq %r8, %rcx
movl $0x0, (%rsp)
callq 0x902110
testb $0x1, %al
jne 0x923085
jmp 0x92308a
jmp 0x92334a
jmp 0x92308c
movq -0x48(%rbp), %rax
movq 0xdb0(%rax), %rax
movb $0x0, -0x69(%rbp)
cmpq $0x0, %rax
jne 0x923165
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0xb0(%rbp)
movl $0x28, %edi
callq 0x7dbfd0
movq %rax, %rcx
movq %rcx, -0xa8(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0xa0(%rbp)
je 0x92310c
movq -0xa8(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq %rdi, -0x60(%rbp)
movq %rax, -0x68(%rbp)
movb $0x1, -0x69(%rbp)
movq -0x40(%rbp), %rsi
callq 0x90bca0
jmp 0x9230fc
movq -0xa8(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x92310c
movq -0xa0(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rax, 0xdb0(%rcx)
cmpq $0x0, %rax
jne 0x923165
movl $0x40d, %edi # imm = 0x40D
movl $0x1000, %esi # imm = 0x1000
movl $0x28, %edx
movb $0x0, %al
callq 0x12bf0d0
jmp 0x92334a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
testb $0x1, -0x69(%rbp)
jne 0x923153
jmp 0x923160
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x7dc010
jmp 0x92337d
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
movl $0x3, %ecx
callq 0x8669b0
testb $0x1, %al
jne 0x923182
jmp 0x923187
jmp 0x92334a
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, 0x1a10(%rax)
movq -0x50(%rbp), %rdi
movq -0x50(%rbp), %rax
movq 0x778(%rax), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x9e0ad0
testb $0x1, %al
jne 0x9231bb
jmp 0x9231c0
jmp 0x92334a
movq -0x48(%rbp), %rax
cmpb $0x0, 0x1838(%rax)
jne 0x92333f
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x17c6(%rax), %eax
shrl $0x3, %eax
andl $0x1, %eax
testl $0x1, %eax
jne 0x92333f
movq -0x30(%rbp), %rdi
callq 0x925660
testb $0x1, %al
jne 0x92333f
movq -0x50(%rbp), %rdi
callq 0x7fb3e0
movq %rax, %rdi
callq 0x86ff50
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x8a9e60
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0xb1(%rbp)
jne 0x92324c
movq -0x88(%rbp), %rax
cmpq $0x0, 0x7a0(%rax)
setne %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
andb $0x1, %al
movb %al, -0x89(%rbp)
testb $0x1, -0x89(%rbp)
je 0x923276
movq -0x50(%rbp), %rax
addq $0x7c0, %rax # imm = 0x7C0
movq %rax, -0xc0(%rbp)
jmp 0x92328c
movq -0x48(%rbp), %rdi
callq 0x7fa720
addq $0x2a0, %rax # imm = 0x2A0
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x925af0
movq -0x50(%rbp), %rax
cmpq $0x0, 0x7b8(%rax)
je 0x9232cb
movq -0x50(%rbp), %rax
movq 0x7b8(%rax), %rdi
movq -0x40(%rbp), %rsi
movq (%rdi), %rax
leaq -0x20(%rbp), %rdx
callq *0x28(%rax)
testb $0x1, %al
jne 0x9232c9
jmp 0x9232cb
jmp 0x92334a
movq -0x30(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x48(%rbp), %rax
movq 0xdb0(%rax), %rdi
movq (%rdi), %rax
leaq -0x20(%rbp), %rsi
callq *0x30(%rax)
movq -0xc8(%rbp), %rdi
movl %eax, %esi
callq 0x924580
testb $0x1, %al
jne 0x923332
movq -0x48(%rbp), %rax
movq 0xdb0(%rax), %rdi
movq (%rdi), %rax
leaq -0x20(%rbp), %rsi
movl $0x2, %edx
callq *0x38(%rax)
testb $0x1, %al
jne 0x923332
movq -0x40(%rbp), %rax
movq 0x590(%rax), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
testb $0x1, %al
jne 0x923332
jmp 0x923334
jmp 0x92334a
jmp 0x923336
movl $0x2, -0x24(%rbp)
jmp 0x923353
jmp 0x923341
movl $0x0, -0x24(%rbp)
jmp 0x923353
jmp 0x92334c
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0xcc(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x9233a6
movl -0xcc(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x9233a6
movq -0xd8(%rbp), %rdi
callq 0x7589b0
callq 0x758480
nopl (%rax,%rax)
| _ZL17mysql_test_selectP18Prepared_statementP10TABLE_LIST:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_30], rdi
mov [rbp+var_38], rsi
mov rax, [rbp+var_30]
mov rax, [rax+0C0h]
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
mov rax, [rax+58h]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
add rax, 0C8h
mov [rbp+var_50], rax
mov rdi, [rbp+var_48]; this
call _ZN3LEX16first_select_lexEv; LEX::first_select_lex(void)
mov byte ptr [rax+88h], 1
mov rax, [rbp+var_48]
mov rax, [rax+0DA8h]
mov [rbp+var_98], rax
mov edi, 1
mov esi, 200h
call _Zor11privilege_tS__4; operator|(privilege_t,privilege_t)
mov rdx, [rbp+var_98]
mov rcx, rax
mov eax, 1
cmp rdx, 0
cmovnz rax, rcx
mov [rbp+var_58], rax
cmp [rbp+var_38], 0
jz short loc_923056
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_38]
xor r9d, r9d
mov r8d, 0FFFFFFFFh
mov ecx, r9d
call _Z18check_table_accessP3THD11privilege_tP10TABLE_LISTbjb; check_table_access(THD *,privilege_t,TABLE_LIST *,bool,uint,bool)
test al, 1
jnz short loc_92304F
jmp short loc_923054
loc_92304F:
jmp loc_92334A
loc_923054:
jmp short loc_92308C
loc_923056:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_58]
lea rax, any_db
mov rdx, [rax]
xor eax, eax
mov r8d, eax
xor r9d, r9d
mov rcx, r8
mov [rsp+0E0h+var_E0], 0
call _Z12check_accessP3THD11privilege_tPKcPS1_P22st_grant_internal_infobb; check_access(THD *,privilege_t,char const*,privilege_t*,st_grant_internal_info *,bool,bool)
test al, 1
jnz short loc_923085
jmp short loc_92308A
loc_923085:
jmp loc_92334A
loc_92308A:
jmp short $+2
loc_92308C:
mov rax, [rbp+var_48]
mov rax, [rax+0DB0h]
mov [rbp+var_69], 0
cmp rax, 0
jnz loc_923165
mov rax, [rbp+var_30]
mov rsi, [rax+28h]
mov [rbp+var_B0], rsi
mov edi, 28h ; '('
call _ZN9Sql_allocnwEmP11st_mem_root; Sql_alloc::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_A8], rcx
xor eax, eax
cmp rcx, 0
mov [rbp+var_A0], rax
jz short loc_92310C
mov rdi, [rbp+var_A8]; this
mov rax, [rbp+var_B0]
mov [rbp+var_60], rdi
mov [rbp+var_68], rax
mov [rbp+var_69], 1
mov rsi, [rbp+var_40]; THD *
call _ZN11select_sendC2EP3THD; select_send::select_send(THD *)
jmp short $+2
loc_9230FC:
mov rax, [rbp+var_A8]
mov [rbp+var_A0], rax
jmp short $+2
loc_92310C:
mov rax, [rbp+var_A0]
mov rcx, [rbp+var_48]
mov [rcx+0DB0h], rax
cmp rax, 0
jnz short loc_923165
mov edi, 40Dh
mov esi, 1000h
mov edx, 28h ; '('
mov al, 0
call my_error
jmp loc_92334A
mov rcx, rax
mov eax, edx
mov [rbp+var_78], rcx
mov [rbp+var_7C], eax
test [rbp+var_69], 1
jnz short loc_923153
jmp short loc_923160
loc_923153:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_68]
call _ZN9Sql_allocdlEPvP11st_mem_root; Sql_alloc::operator delete(void *,st_mem_root *)
loc_923160:
jmp loc_92337D
loc_923165:
mov rdi, [rbp+var_40]; THD *
mov rsi, [rbp+var_38]; TABLE_LIST *
mov edx, 200h; unsigned int
mov ecx, 3; unsigned int
call _Z30open_normal_and_derived_tablesP3THDP10TABLE_LISTjj; open_normal_and_derived_tables(THD *,TABLE_LIST *,uint,uint)
test al, 1
jnz short loc_923182
jmp short loc_923187
loc_923182:
jmp loc_92334A
loc_923187:
mov rax, [rbp+var_40]
mov rax, [rax+58h]
mov qword ptr [rax+1A10h], 0
mov rdi, [rbp+var_50]; this
mov rax, [rbp+var_50]
mov rsi, [rax+778h]; TABLE_LIST *
xor eax, eax
mov ecx, eax; unsigned __int64
mov rdx, rcx; select_result *
call _ZN18st_select_lex_unit7prepareEP10TABLE_LISTP13select_resulty; st_select_lex_unit::prepare(TABLE_LIST *,select_result *,ulong long)
test al, 1
jnz short loc_9231BB
jmp short loc_9231C0
loc_9231BB:
jmp loc_92334A
loc_9231C0:
mov rax, [rbp+var_48]
cmp byte ptr [rax+1838h], 0
jnz loc_92333F
mov rax, [rbp+var_40]
mov rax, [rax+58h]
mov eax, [rax+17C6h]
shr eax, 3
and eax, 1
test eax, 1
jnz loc_92333F
mov rdi, [rbp+var_30]; this
call _ZNK18Prepared_statement14is_sql_prepareEv; Prepared_statement::is_sql_prepare(void)
test al, 1
jnz loc_92333F
mov rdi, [rbp+var_50]; this
call _ZN18st_select_lex_unit12first_selectEv; st_select_lex_unit::first_select(void)
mov rdi, rax; this
call _ZN13st_select_lex11master_unitEv; st_select_lex::master_unit(void)
mov [rbp+var_88], rax
mov rdi, [rbp+var_88]; this
call _ZN18st_select_lex_unit10is_unit_opEv; st_select_lex_unit::is_unit_op(void)
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_B1], al
jnz short loc_92324C
mov rax, [rbp+var_88]
cmp qword ptr [rax+7A0h], 0
setnz al
mov [rbp+var_B1], al
loc_92324C:
mov al, [rbp+var_B1]
and al, 1
mov [rbp+var_89], al
test [rbp+var_89], 1
jz short loc_923276
mov rax, [rbp+var_50]
add rax, 7C0h
mov [rbp+var_C0], rax
jmp short loc_92328C
loc_923276:
mov rdi, [rbp+var_48]; this
call _ZN3LEX16first_select_lexEv; LEX::first_select_lex(void)
add rax, 2A0h
mov [rbp+var_C0], rax
loc_92328C:
mov rsi, [rbp+var_C0]
lea rdi, [rbp+var_20]
call _ZN4ListI4ItemEC2ERKS1_; List<Item>::List(List<Item> const&)
mov rax, [rbp+var_50]
cmp qword ptr [rax+7B8h], 0
jz short loc_9232CB
mov rax, [rbp+var_50]
mov rdi, [rax+7B8h]
mov rsi, [rbp+var_40]
mov rax, [rdi]
lea rdx, [rbp+var_20]
call qword ptr [rax+28h]
test al, 1
jnz short loc_9232C9
jmp short loc_9232CB
loc_9232C9:
jmp short loc_92334A
loc_9232CB:
mov rax, [rbp+var_30]
mov [rbp+var_C8], rax
mov rax, [rbp+var_48]
mov rdi, [rax+0DB0h]
mov rax, [rdi]
lea rsi, [rbp+var_20]
call qword ptr [rax+30h]
mov rdi, [rbp+var_C8]; Prepared_statement *
mov esi, eax; unsigned int
call _ZL14send_prep_stmtP18Prepared_statementj; send_prep_stmt(Prepared_statement *,uint)
test al, 1
jnz short loc_923332
mov rax, [rbp+var_48]
mov rdi, [rax+0DB0h]
mov rax, [rdi]
lea rsi, [rbp+var_20]
mov edx, 2
call qword ptr [rax+38h]
test al, 1
jnz short loc_923332
mov rax, [rbp+var_40]
mov rdi, [rax+590h]
mov rax, [rdi]
call qword ptr [rax+60h]
test al, 1
jnz short loc_923332
jmp short loc_923334
loc_923332:
jmp short loc_92334A
loc_923334:
jmp short $+2
loc_923336:
mov [rbp+var_24], 2
jmp short loc_923353
loc_92333F:
jmp short $+2
loc_923341:
mov [rbp+var_24], 0
jmp short loc_923353
loc_92334A:
jmp short $+2
loc_92334C:
mov [rbp+var_24], 1
loc_923353:
mov eax, [rbp+var_24]
mov [rbp+var_CC], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_9233A6
mov eax, [rbp+var_CC]
add rsp, 0E0h
pop rbp
retn
loc_92337D:
mov rax, [rbp+var_78]
mov [rbp+var_D8], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_9233A6
mov rdi, [rbp+var_D8]
call __Unwind_Resume
loc_9233A6:
call ___stack_chk_fail
| long long mysql_test_select(Prepared_statement *a1, TABLE_LIST *a2)
{
long long v2; // rcx
long long v3; // rax
int v4; // r8d
int v5; // r9d
st_select_lex *select; // rax
unsigned int v7; // eax
long long v9; // [rsp+20h] [rbp-C0h]
bool v10; // [rsp+2Fh] [rbp-B1h]
select_send *v11; // [rsp+38h] [rbp-A8h]
select_send *v12; // [rsp+40h] [rbp-A0h]
long long v13; // [rsp+48h] [rbp-98h]
st_select_lex_unit *v14; // [rsp+58h] [rbp-88h]
LEX *v15; // [rsp+98h] [rbp-48h]
THD *v16; // [rsp+A0h] [rbp-40h]
_BYTE v18[24]; // [rsp+C0h] [rbp-20h] BYREF
unsigned long long v19; // [rsp+D8h] [rbp-8h]
v19 = __readfsqword(0x28u);
v16 = (THD *)*((_QWORD *)a1 + 24);
v15 = (LEX *)*((_QWORD *)a1 + 11);
*(_BYTE *)(LEX::first_select_lex(v15) + 136) = 1;
v13 = *((_QWORD *)v15 + 437);
v2 = operator|(1LL, 512LL);
v3 = 1LL;
if ( v13 )
v3 = v2;
if ( a2 )
{
if ( (check_table_access(v16, v3, a2, 0, 0xFFFFFFFF, 0) & 1) == 0 )
goto LABEL_7;
return 1;
}
if ( (check_access((long long)v16, v3, "*any*", 0LL, 0LL, 0, 0) & 1) != 0 )
return 1;
LABEL_7:
if ( !*((_QWORD *)v15 + 438) )
{
v11 = (select_send *)Sql_alloc::operator new(40LL, *((_QWORD *)a1 + 5));
v12 = 0LL;
if ( v11 )
{
select_send::select_send(v11, v16);
v12 = v11;
}
*((_QWORD *)v15 + 438) = v12;
if ( !v12 )
{
my_error(1037, 4096, 40, (_DWORD)v15, v4, v5);
return 1;
}
}
if ( (open_normal_and_derived_tables(v16, a2, 0x200u, 3u) & 1) != 0 )
return 1;
*(_QWORD *)(*((_QWORD *)v16 + 11) + 6672LL) = 0LL;
if ( (st_select_lex_unit::prepare((LEX *)((char *)v15 + 200), *((TABLE_LIST **)v15 + 264), 0LL, 0LL) & 1) != 0 )
return 1;
if ( *((_BYTE *)v15 + 6200)
|| ((*(_DWORD *)(*((_QWORD *)v16 + 11) + 6086LL) >> 3) & 1) != 0
|| (Prepared_statement::is_sql_prepare(a1) & 1) != 0 )
{
return 0;
}
else
{
select = (st_select_lex *)st_select_lex_unit::first_select((LEX *)((char *)v15 + 200));
v14 = (st_select_lex_unit *)st_select_lex::master_unit(select);
v10 = 1;
if ( !st_select_lex_unit::is_unit_op(v14) )
v10 = *((_QWORD *)v14 + 244) != 0LL;
if ( v10 )
{
List<Item>::List(v18, (char *)v15 + 2184);
}
else
{
v9 = LEX::first_select_lex(v15) + 672;
List<Item>::List(v18, v9);
}
if ( *((_QWORD *)v15 + 272)
&& ((*(long long ( **)(_QWORD, THD *, _BYTE *))(**((_QWORD **)v15 + 272) + 40LL))(
*((_QWORD *)v15 + 272),
v16,
v18) & 1) != 0 )
{
return 1;
}
v7 = (*(long long ( **)(_QWORD, _BYTE *))(**((_QWORD **)v15 + 438) + 48LL))(*((_QWORD *)v15 + 438), v18);
if ( (send_prep_stmt(a1, v7) & 1) != 0
|| ((*(long long ( **)(_QWORD, _BYTE *, long long))(**((_QWORD **)v15 + 438) + 56LL))(
*((_QWORD *)v15 + 438),
v18,
2LL) & 1) != 0
|| ((*(long long ( **)(_QWORD))(**((_QWORD **)v16 + 178) + 96LL))(*((_QWORD *)v16 + 178)) & 1) != 0 )
{
return 1;
}
return 2;
}
}
| ~Query_log_event:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
LEA RCX,[0x1b967d8]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
CMP qword ptr [RAX + 0x90],0x0
JZ 0x00922fd0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x90]
LAB_00922fc7:
CALL 0x013c7520
JMP 0x00922fce
LAB_00922fce:
JMP 0x00922fd0
LAB_00922fd0:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00912f20
ADD RSP,0x10
POP RBP
RET
|
/* Query_log_event::~Query_log_event() */
void __thiscall Query_log_event::~Query_log_event(Query_log_event *this)
{
*(int ***)this = &PTR_pack_info_01b967e8;
if (*(long *)(this + 0x90) != 0) {
/* try { // try from 00922fc7 to 00922fcb has its CatchHandler @ 00922fdf */
my_free(*(int8 *)(this + 0x90));
}
Log_event::~Log_event((Log_event *)this);
return;
}
| |
44,668 | coro::io_scheduler::remove_timer_token(std::_Rb_tree_iterator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const, coro::detail::poll_info*>>) | AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp | auto io_scheduler::remove_timer_token(timed_events::iterator pos) -> void
{
{
std::scoped_lock lk{m_timed_events_mutex};
auto is_first = (m_timed_events.begin() == pos);
m_timed_events.erase(pos);
// If this was the first item, update the timeout. It would be acceptable to just let it
// also fire the timeout as the event loop will ignore it since nothing will have timed
// out but it feels like the right thing to do to update it to the correct timeout value.
if (is_first)
{
update_timeout(clock::now());
}
}
} | O3 | cpp | coro::io_scheduler::remove_timer_token(std::_Rb_tree_iterator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const, coro::detail::poll_info*>>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
leaq 0xd8(%rdi), %rbx
movq %rbx, %rdi
callq 0x3310
testl %eax, %eax
jne 0x7c11
leaq 0x100(%r14), %rdi
movq 0x118(%r14), %r12
movq %r15, %rsi
callq 0x8b78
cmpq %r15, %r12
jne 0x7bfe
callq 0x32b0
movq %r14, %rdi
movq %rax, %rsi
callq 0x7c2c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x31a0
movl %eax, %edi
callq 0x3160
movq %rax, %r14
movq %rbx, %rdi
callq 0x31a0
movq %r14, %rdi
callq 0x3390
nop
| _ZN4coro12io_scheduler18remove_timer_tokenESt17_Rb_tree_iteratorISt4pairIKNSt6chrono10time_pointINS3_3_V212steady_clockENS3_8durationIlSt5ratioILl1ELl1000000000EEEEEEPNS_6detail9poll_infoEEE:
push r15
push r14
push r12
push rbx
push rax
mov r15, rsi
mov r14, rdi
lea rbx, [rdi+0D8h]
mov rdi, rbx
call _pthread_mutex_lock
test eax, eax
jnz short loc_7C11
lea rdi, [r14+100h]; this
mov r12, [r14+118h]
mov rsi, r15
call _ZNSt8_Rb_treeINSt6chrono10time_pointINS0_3_V212steady_clockENS0_8durationIlSt5ratioILl1ELl1000000000EEEEEESt4pairIKS8_PN4coro6detail9poll_infoEESt10_Select1stISF_ESt4lessIS8_ESaISF_EE5eraseB5cxx11ESt17_Rb_tree_iteratorISF_E; std::_Rb_tree<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>,std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>,std::_Select1st<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>>,std::less<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>>,std::allocator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>>>::erase(std::_Rb_tree_iterator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>>)
cmp r12, r15
jnz short loc_7BFE
call __ZNSt6chrono3_V212steady_clock3nowEv; std::chrono::_V2::steady_clock::now(void)
mov rdi, r14
mov rsi, rax
call _ZN4coro12io_scheduler14update_timeoutENSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE; coro::io_scheduler::update_timeout(std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>)
loc_7BFE:
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _pthread_mutex_unlock
loc_7C11:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long coro::io_scheduler::remove_timer_token(long long a1, long long a2)
{
int v2; // eax
int v3; // eax
long long v4; // r12
int v5; // eax
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v11; // [rsp-8h] [rbp-28h]
v11 = v2;
v3 = pthread_mutex_lock(a1 + 216);
if ( v3 )
std::__throw_system_error(v3);
v4 = *(_QWORD *)(a1 + 280);
std::_Rb_tree<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>,std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>,std::_Select1st<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>>,std::less<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>>,std::allocator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>>>::erase[abi:cxx11](a1 + 256);
if ( v4 == a2 )
{
v5 = std::chrono::_V2::steady_clock::now((std::chrono::_V2::steady_clock *)(a1 + 256));
coro::io_scheduler::update_timeout(a1, v5, v6, v7, v8, v9, v11);
}
return pthread_mutex_unlock(a1 + 216);
}
| remove_timer_token:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV R14,RDI
LEA RBX,[RDI + 0xd8]
MOV RDI,RBX
CALL 0x00103310
TEST EAX,EAX
JNZ 0x00107c11
LEA RDI,[R14 + 0x100]
MOV R12,qword ptr [R14 + 0x118]
LAB_00107be1:
MOV RSI,R15
CALL 0x00108b78
CMP R12,R15
JNZ 0x00107bfe
CALL 0x001032b0
MOV RDI,R14
MOV RSI,RAX
CALL 0x00107c2c
LAB_00107bfe:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x001031a0
LAB_00107c11:
MOV EDI,EAX
CALL 0x00103160
LAB_00107c18:
MOV R14,RAX
MOV RDI,RBX
CALL 0x001031a0
MOV RDI,R14
CALL 0x00103390
|
/* coro::io_scheduler::remove_timer_token(std::_Rb_tree_iterator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const, coro::detail::poll_info*> >)
*/
void __thiscall coro::io_scheduler::remove_timer_token(io_scheduler *this,long param_2)
{
pthread_mutex_t *__mutex;
long lVar1;
int8 uVar2;
int iVar3;
__mutex = (pthread_mutex_t *)(this + 0xd8);
iVar3 = pthread_mutex_lock(__mutex);
if (iVar3 == 0) {
lVar1 = *(long *)(this + 0x118);
/* try { // try from 00107be1 to 00107bfd has its CatchHandler @ 00107c18 */
std::
_Rb_tree<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>,std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>,std::_Select1st<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>>,std::less<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>>,std::allocator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>>>
::erase_abi_cxx11_((_Rb_tree<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>,std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>,std::_Select1st<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>>,std::less<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>>,std::allocator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>>>
*)(this + 0x100),param_2);
if (lVar1 == param_2) {
uVar2 = std::chrono::_V2::steady_clock::now();
update_timeout(this,uVar2);
}
pthread_mutex_unlock(__mutex);
return;
}
uVar2 = std::__throw_system_error(iVar3);
/* catch() { ... } // from try @ 00107be1 with catch @ 00107c18 */
pthread_mutex_unlock(__mutex);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar2);
}
| |
44,669 | remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage>>&) | 7CodeWizard[P]stablediffusion/model.cpp | void remove_duplicates(std::vector<TensorStorage>& vec) {
std::unordered_map<std::string, size_t> name_to_index_map;
for (size_t i = 0; i < vec.size(); ++i) {
const std::string& current_name = vec[i].name;
auto it = name_to_index_map.find(current_name);
if (it != name_to_index_map.end()) {
vec[it->second] = vec[i];
} else {
name_to_index_map[current_name] = i;
}
}
vec.resize(name_to_index_map.size());
} | O0 | cpp | remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage>>&):
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
leaq 0x68(%rsp), %rdi
callq 0xc44e0
movq $0x0, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x74430
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0xbe7ce
movq 0xa0(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xc2e10
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0xc44f0
movq %rax, 0x28(%rsp)
jmp 0xbe6f7
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x68(%rsp), %rdi
callq 0xc4540
movq %rax, 0x38(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xc4520
testb $0x1, %al
jne 0xbe725
jmp 0xbe78c
movq 0xa0(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xc2e10
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xc4570
movq 0x18(%rsp), %rdi
movq 0x20(%rax), %rsi
callq 0xc2e10
movq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x74e90
jmp 0xbe770
jmp 0xbe7b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x68(%rsp), %rdi
callq 0xc4670
jmp 0xbe804
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rsi
leaq 0x68(%rsp), %rdi
callq 0xc4590
movq %rax, 0x10(%rsp)
jmp 0xbe7ac
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
jmp 0xbe7bb
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0xbe6a2
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
leaq 0x68(%rsp), %rdi
callq 0xc4660
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xc45c0
jmp 0xbe7f2
leaq 0x68(%rsp), %rdi
callq 0xc4670
addq $0xa8, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0xbd30
nop
| _Z17remove_duplicatesRSt6vectorI13TensorStorageSaIS0_EE:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
lea rdi, [rsp+0A8h+var_40]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEEC2Ev; std::unordered_map<std::string,ulong>::unordered_map(void)
mov [rsp+0A8h+var_48], 0
loc_BE6A2:
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_78], rax
mov rdi, [rsp+0A8h+var_8]
call _ZNKSt6vectorI13TensorStorageSaIS0_EE4sizeEv; std::vector<TensorStorage>::size(void)
mov rcx, rax
mov rax, [rsp+0A8h+var_78]
cmp rax, rcx
jnb loc_BE7CE
mov rdi, [rsp+0A8h+var_8]
mov rsi, [rsp+0A8h+var_48]
call _ZNSt6vectorI13TensorStorageSaIS0_EEixEm; std::vector<TensorStorage>::operator[](ulong)
mov [rsp+0A8h+var_50], rax
mov rsi, [rsp+0A8h+var_50]
lea rdi, [rsp+0A8h+var_40]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEE4findERSB_; std::unordered_map<std::string,ulong>::find(std::string const&)
mov [rsp+0A8h+var_80], rax
jmp short $+2
loc_BE6F7:
mov rax, [rsp+0A8h+var_80]
mov [rsp+0A8h+var_58], rax
lea rdi, [rsp+0A8h+var_40]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEE3endEv; std::unordered_map<std::string,ulong>::end(void)
mov [rsp+0A8h+var_70], rax
lea rdi, [rsp+0A8h+var_58]
lea rsi, [rsp+0A8h+var_70]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmELb1EEESC_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,ulong>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,ulong>,true> const&)
test al, 1
jnz short loc_BE725
jmp short loc_BE78C
loc_BE725:
mov rdi, [rsp+0A8h+var_8]
mov rsi, [rsp+0A8h+var_48]
call _ZNSt6vectorI13TensorStorageSaIS0_EEixEm; std::vector<TensorStorage>::operator[](ulong)
mov [rsp+0A8h+var_88], rax
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_90], rax
lea rdi, [rsp+0A8h+var_58]
call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,ulong>,false,true>::operator->(void)
mov rdi, [rsp+0A8h+var_90]
mov rsi, [rax+20h]
call _ZNSt6vectorI13TensorStorageSaIS0_EEixEm; std::vector<TensorStorage>::operator[](ulong)
mov rsi, [rsp+0A8h+var_88]
mov rdi, rax
call _ZN13TensorStorageaSERKS_; TensorStorage::operator=(TensorStorage const&)
jmp short $+2
loc_BE770:
jmp short loc_BE7B9
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_60]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEED2Ev; std::unordered_map<std::string,ulong>::~unordered_map()
jmp short loc_BE804
loc_BE78C:
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_A0], rax
mov rsi, [rsp+0A8h+var_50]
lea rdi, [rsp+0A8h+var_40]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEEixERSB_; std::unordered_map<std::string,ulong>::operator[](std::string const&)
mov [rsp+0A8h+var_98], rax
jmp short $+2
loc_BE7AC:
mov rax, [rsp+0A8h+var_98]
mov rcx, [rsp+0A8h+var_A0]
mov [rax], rcx
loc_BE7B9:
jmp short $+2
loc_BE7BB:
mov rax, [rsp+0A8h+var_48]
add rax, 1
mov [rsp+0A8h+var_48], rax
jmp loc_BE6A2
loc_BE7CE:
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_A8], rax
lea rdi, [rsp+0A8h+var_40]
call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEE4sizeEv; std::unordered_map<std::string,ulong>::size(void)
mov rdi, [rsp+0A8h+var_A8]
mov rsi, rax
call _ZNSt6vectorI13TensorStorageSaIS0_EE6resizeEm; std::vector<TensorStorage>::resize(ulong)
jmp short $+2
loc_BE7F2:
lea rdi, [rsp+0A8h+var_40]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEED2Ev; std::unordered_map<std::string,ulong>::~unordered_map()
add rsp, 0A8h
retn
loc_BE804:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| long long remove_duplicates(_QWORD *a1)
{
long long v1; // rax
long long v2; // rax
long long v3; // rax
_QWORD *v5; // [rsp+0h] [rbp-A8h]
unsigned long long v6; // [rsp+8h] [rbp-A0h]
_QWORD *v7; // [rsp+18h] [rbp-90h]
long long v8; // [rsp+20h] [rbp-88h]
unsigned long long v9; // [rsp+30h] [rbp-78h]
long long v10[3]; // [rsp+38h] [rbp-70h] BYREF
long long v11; // [rsp+50h] [rbp-58h] BYREF
long long v12; // [rsp+58h] [rbp-50h]
unsigned long long i; // [rsp+60h] [rbp-48h]
_BYTE v14[56]; // [rsp+68h] [rbp-40h] BYREF
_QWORD *v15; // [rsp+A0h] [rbp-8h]
v15 = a1;
std::unordered_map<std::string,unsigned long>::unordered_map(v14);
for ( i = 0LL; ; ++i )
{
v9 = i;
if ( v9 >= std::vector<TensorStorage>::size(v15) )
break;
v12 = std::vector<TensorStorage>::operator[](v15, i);
v11 = std::unordered_map<std::string,unsigned long>::find(v14, v12);
v10[0] = std::unordered_map<std::string,unsigned long>::end(v14);
if ( (std::__detail::operator!=(&v11, v10) & 1) != 0 )
{
v8 = std::vector<TensorStorage>::operator[](v15, i);
v7 = v15;
v1 = std::__detail::_Node_iterator<std::pair<std::string const,unsigned long>,false,true>::operator->(&v11);
v2 = std::vector<TensorStorage>::operator[](v7, *(_QWORD *)(v1 + 32));
TensorStorage::operator=(v2, v8);
}
else
{
v6 = i;
*(_QWORD *)std::unordered_map<std::string,unsigned long>::operator[](v14, v12) = v6;
}
}
v5 = v15;
v3 = std::unordered_map<std::string,unsigned long>::size(v14);
std::vector<TensorStorage>::resize(v5, v3);
return std::unordered_map<std::string,unsigned long>::~unordered_map(v14);
}
| remove_duplicates:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
LEA RDI,[RSP + 0x68]
CALL 0x001c44e0
MOV qword ptr [RSP + 0x60],0x0
LAB_001be6a2:
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x00174430
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x30]
CMP RAX,RCX
JNC 0x001be7ce
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x001c2e10
MOV qword ptr [RSP + 0x58],RAX
MOV RSI,qword ptr [RSP + 0x58]
LAB_001be6e6:
LEA RDI,[RSP + 0x68]
CALL 0x001c44f0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001be6f7
LAB_001be6f7:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x50],RAX
LEA RDI,[RSP + 0x68]
CALL 0x001c4540
MOV qword ptr [RSP + 0x38],RAX
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x38]
CALL 0x001c4520
TEST AL,0x1
JNZ 0x001be725
JMP 0x001be78c
LAB_001be725:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x001c2e10
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x50]
CALL 0x001c4570
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX + 0x20]
CALL 0x001c2e10
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,RAX
CALL 0x00174e90
JMP 0x001be770
LAB_001be770:
JMP 0x001be7b9
LAB_001be78c:
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RSP + 0x58]
LEA RDI,[RSP + 0x68]
CALL 0x001c4590
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001be7ac
LAB_001be7ac:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
LAB_001be7b9:
JMP 0x001be7bb
LAB_001be7bb:
MOV RAX,qword ptr [RSP + 0x60]
ADD RAX,0x1
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001be6a2
LAB_001be7ce:
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x68]
CALL 0x001c4660
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
CALL 0x001c45c0
LAB_001be7f0:
JMP 0x001be7f2
LAB_001be7f2:
LEA RDI,[RSP + 0x68]
CALL 0x001c4670
ADD RSP,0xa8
RET
|
/* remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage> >&) */
void remove_duplicates(vector *param_1)
{
vector *pvVar1;
ulong uVar2;
TensorStorage *pTVar3;
long lVar4;
TensorStorage *this;
ulong *puVar5;
ulong uVar6;
int8 local_70 [3];
int8 local_58;
string *local_50;
ulong local_48;
unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_40 [56];
vector *local_8;
local_8 = param_1;
std::
unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::unordered_map(local_40);
local_48 = 0;
while( true ) {
uVar6 = local_48;
uVar2 = std::vector<TensorStorage,std::allocator<TensorStorage>>::size
((vector<TensorStorage,std::allocator<TensorStorage>> *)local_8);
pvVar1 = local_8;
if (uVar2 <= uVar6) break;
local_50 = (string *)
std::vector<TensorStorage,std::allocator<TensorStorage>>::operator[]
((vector<TensorStorage,std::allocator<TensorStorage>> *)local_8,local_48);
/* try { // try from 001be6e6 to 001be7ef has its CatchHandler @ 001be772 */
local_58 = std::
unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::find(local_40,local_50);
local_70[0] = std::
unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::end();
uVar2 = std::__detail::operator!=
((_Node_iterator_base *)&local_58,(_Node_iterator_base *)local_70);
uVar6 = local_48;
if ((uVar2 & 1) == 0) {
puVar5 = (ulong *)std::
unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::operator[](local_40,local_50);
*puVar5 = uVar6;
}
else {
pTVar3 = (TensorStorage *)
std::vector<TensorStorage,std::allocator<TensorStorage>>::operator[]
((vector<TensorStorage,std::allocator<TensorStorage>> *)local_8,local_48);
pvVar1 = local_8;
lVar4 = std::__detail::
_Node_iterator<std::pair<std::__cxx11::string_const,unsigned_long>,false,true>::
operator->((_Node_iterator<std::pair<std::__cxx11::string_const,unsigned_long>,false,true>
*)&local_58);
this = (TensorStorage *)
std::vector<TensorStorage,std::allocator<TensorStorage>>::operator[]
((vector<TensorStorage,std::allocator<TensorStorage>> *)pvVar1,
*(ulong *)(lVar4 + 0x20));
TensorStorage::operator=(this,pTVar3);
}
local_48 = local_48 + 1;
}
uVar6 = std::
unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::size(local_40);
std::vector<TensorStorage,std::allocator<TensorStorage>>::resize
((vector<TensorStorage,std::allocator<TensorStorage>> *)pvVar1,uVar6);
std::
unordered_map<std::__cxx11::string,unsigned_long,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~unordered_map(local_40);
return;
}
| |
44,670 | remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage>>&) | 7CodeWizard[P]stablediffusion/model.cpp | void remove_duplicates(std::vector<TensorStorage>& vec) {
std::unordered_map<std::string, size_t> name_to_index_map;
for (size_t i = 0; i < vec.size(); ++i) {
const std::string& current_name = vec[i].name;
auto it = name_to_index_map.find(current_name);
if (it != name_to_index_map.end()) {
vec[it->second] = vec[i];
} else {
name_to_index_map[current_name] = i;
}
}
vec.resize(name_to_index_map.size());
} | O1 | cpp | remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq (%rdi), %r15
cmpq %r15, 0x8(%rdi)
je 0x6ab9c
xorl %r12d, %r12d
movq %rsp, %r14
xorl %ebp, %ebp
addq %r12, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x79302
testq %rax, %rax
je 0x6ab66
movq (%rbx), %r13
leaq (%r12,%r13), %rsi
imulq $0x68, 0x28(%rax), %r15
addq %r13, %r15
movq %r15, %rdi
callq 0xa2f0
addq $0x20, %r15
leaq (%r12,%r13), %rsi
addq $0x20, %rsi
movl $0x9, %ecx
movq %r15, %rdi
rep movsq (%rsi), %es:(%rdi)
jmp 0x6ab74
movq %r14, %rdi
movq %r15, %rsi
callq 0x793fe
movq %rbp, (%rax)
incq %rbp
movq (%rbx), %r15
movq 0x8(%rbx), %rax
subq %r15, %rax
sarq $0x3, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rcx, %rax
addq $0x68, %r12
cmpq %rax, %rbp
jb 0x6ab23
movq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x6dd18
movq %rsp, %rdi
callq 0x6f098
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6abc2
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6f098
movq %rbx, %rdi
callq 0xaae0
nop
| _Z17remove_duplicatesRSt6vectorI13TensorStorageSaIS0_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
lea rax, [rsp+68h+var_38]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
mov r15, [rdi]
cmp [rdi+8], r15
jz loc_6AB9C
xor r12d, r12d
mov r14, rsp
xor ebp, ebp
loc_6AB23:
add r15, r12
mov rdi, r14
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jz short loc_6AB66
mov r13, [rbx]
lea rsi, [r12+r13]
imul r15, [rax+28h], 68h ; 'h'
add r15, r13
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
add r15, 20h ; ' '
lea rsi, [r12+r13]
add rsi, 20h ; ' '
mov ecx, 9
mov rdi, r15
rep movsq
jmp short loc_6AB74
loc_6AB66:
mov rdi, r14
mov rsi, r15
call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&)
mov [rax], rbp
loc_6AB74:
inc rbp
mov r15, [rbx]
mov rax, [rbx+8]
sub rax, r15
sar rax, 3
mov rcx, 4EC4EC4EC4EC4EC5h
imul rax, rcx
add r12, 68h ; 'h'
cmp rbp, rax
jb short loc_6AB23
loc_6AB9C:
mov rsi, [rsp+68h+var_50]
mov rdi, rbx
call _ZNSt6vectorI13TensorStorageSaIS0_EE6resizeEm; std::vector<TensorStorage>::resize(ulong)
mov rdi, rsp
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_6ABC2:
mov rbx, rax
mov rdi, rsp
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long remove_duplicates(long long *a1)
{
long long v1; // r15
long long v2; // r12
unsigned long long v3; // rbp
long long v4; // r15
long long v5; // rax
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v10; // r13
long long v11; // r15
_QWORD v13[2]; // [rsp+0h] [rbp-68h] BYREF
__int128 v14; // [rsp+10h] [rbp-58h]
int v15; // [rsp+20h] [rbp-48h]
__int128 v16; // [rsp+28h] [rbp-40h] BYREF
v13[0] = (char *)&v16 + 8;
v13[1] = 1LL;
v14 = 0LL;
v15 = 1065353216;
v16 = 0LL;
v1 = *a1;
if ( a1[1] != *a1 )
{
v2 = 0LL;
v3 = 0LL;
do
{
v4 = v2 + v1;
v5 = std::_Hashtable<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v13,
v4);
if ( v5 )
{
v10 = *a1;
v11 = *a1 + 104LL * *(_QWORD *)(v5 + 40);
std::string::_M_assign(v11, v2 + *a1);
qmemcpy((void *)(v11 + 32), (const void *)(v2 + v10 + 32), 0x48uLL);
}
else
{
*(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](
(unsigned int)v13,
v4,
v6,
v7,
v8,
v9,
v13[0]) = v3;
}
++v3;
v1 = *a1;
v2 += 104LL;
}
while ( v3 < 0x4EC4EC4EC4EC4EC5LL * ((a1[1] - *a1) >> 3) );
}
std::vector<TensorStorage>::resize(a1, *((_QWORD *)&v14 + 1));
return std::_Hashtable<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v13);
}
| |||
44,671 | remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage>>&) | 7CodeWizard[P]stablediffusion/model.cpp | void remove_duplicates(std::vector<TensorStorage>& vec) {
std::unordered_map<std::string, size_t> name_to_index_map;
for (size_t i = 0; i < vec.size(); ++i) {
const std::string& current_name = vec[i].name;
auto it = name_to_index_map.find(current_name);
if (it != name_to_index_map.end()) {
vec[it->second] = vec[i];
} else {
name_to_index_map[current_name] = i;
}
}
vec.resize(name_to_index_map.size());
} | O2 | cpp | remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
xorl %r12d, %r12d
pushq $0x68
popq %r13
movq %rsp, %r14
xorl %ebp, %ebp
movq (%rbx), %r15
movq 0x8(%rbx), %rax
subq %r15, %rax
cqto
idivq %r13
cmpq %rax, %rbp
jae 0x48bdd
addq %r12, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x551e0
testq %rax, %rax
je 0x48bc6
movq (%rbx), %rcx
leaq (%rcx,%r12), %rsi
imulq $0x68, 0x28(%rax), %rdi
addq %rcx, %rdi
callq 0x320b8
jmp 0x48bd4
movq %r14, %rdi
movq %r15, %rsi
callq 0x552b0
movq %rbp, (%rax)
incq %rbp
addq $0x68, %r12
jmp 0x48b89
movq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x4adba
movq %rsp, %rdi
callq 0x4c08e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x48c03
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4c08e
movq %rbx, %rdi
callq 0xaab0
| _Z17remove_duplicatesRSt6vectorI13TensorStorageSaIS0_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
lea rax, [rsp+68h+var_38]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
xor r12d, r12d
push 68h ; 'h'
pop r13
mov r14, rsp
xor ebp, ebp
loc_48B89:
mov r15, [rbx]
mov rax, [rbx+8]
sub rax, r15
cqo
idiv r13
cmp rbp, rax
jnb short loc_48BDD
add r15, r12
mov rdi, r14
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jz short loc_48BC6
mov rcx, [rbx]
lea rsi, [rcx+r12]
imul rdi, [rax+28h], 68h ; 'h'
add rdi, rcx
call _ZN13TensorStorageaSERKS_; TensorStorage::operator=(TensorStorage const&)
jmp short loc_48BD4
loc_48BC6:
mov rdi, r14
mov rsi, r15
call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&)
mov [rax], rbp
loc_48BD4:
inc rbp
add r12, 68h ; 'h'
jmp short loc_48B89
loc_48BDD:
mov rsi, [rsp+68h+var_50]
mov rdi, rbx
call _ZNSt6vectorI13TensorStorageSaIS0_EE6resizeEm; std::vector<TensorStorage>::resize(ulong)
mov rdi, rsp
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_48C03:
mov rbx, rax
mov rdi, rsp
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long remove_duplicates(_QWORD *a1)
{
long long v1; // r12
unsigned long long i; // rbp
long long v3; // rdx
long long v4; // r15
long long v5; // rax
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
_QWORD v11[2]; // [rsp+0h] [rbp-68h] BYREF
__int128 v12; // [rsp+10h] [rbp-58h]
int v13; // [rsp+20h] [rbp-48h]
__int128 v14; // [rsp+28h] [rbp-40h] BYREF
v11[0] = (char *)&v14 + 8;
v11[1] = 1LL;
v12 = 0LL;
v13 = 1065353216;
v14 = 0LL;
v1 = 0LL;
for ( i = 0LL; ; ++i )
{
v3 = (a1[1] - *a1) % 104LL;
if ( i >= (a1[1] - *a1) / 104LL )
break;
v4 = v1 + *a1;
v5 = std::_Hashtable<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v11,
v4,
v3);
if ( v5 )
TensorStorage::operator=(*a1 + 104LL * *(_QWORD *)(v5 + 40), *a1 + v1);
else
*(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](
(unsigned int)v11,
v4,
v6,
v7,
v8,
v9,
v11[0]) = i;
v1 += 104LL;
}
std::vector<TensorStorage>::resize(a1, *((_QWORD *)&v12 + 1), v3);
return std::_Hashtable<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v11);
}
| remove_duplicates:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
LEA RAX,[RSP + 0x30]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
XOR R12D,R12D
PUSH 0x68
POP R13
MOV R14,RSP
XOR EBP,EBP
LAB_00148b89:
MOV R15,qword ptr [RBX]
MOV RAX,qword ptr [RBX + 0x8]
SUB RAX,R15
CQO
IDIV R13
CMP RBP,RAX
JNC 0x00148bdd
ADD R15,R12
LAB_00148ba0:
MOV RDI,R14
MOV RSI,R15
CALL 0x001551e0
TEST RAX,RAX
JZ 0x00148bc6
MOV RCX,qword ptr [RBX]
LEA RSI,[RCX + R12*0x1]
IMUL RDI,qword ptr [RAX + 0x28],0x68
ADD RDI,RCX
CALL 0x001320b8
JMP 0x00148bd4
LAB_00148bc6:
MOV RDI,R14
MOV RSI,R15
CALL 0x001552b0
MOV qword ptr [RAX],RBP
LAB_00148bd4:
INC RBP
ADD R12,0x68
JMP 0x00148b89
LAB_00148bdd:
MOV RSI,qword ptr [RSP + 0x18]
LAB_00148be2:
MOV RDI,RBX
CALL 0x0014adba
LAB_00148bea:
MOV RDI,RSP
CALL 0x0014c08e
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage> >&) */
void remove_duplicates(vector *param_1)
{
long lVar1;
ulong *puVar2;
ulong uVar3;
long lVar4;
string *psVar5;
int8 *local_68;
int8 local_60;
int8 local_58;
ulong uStack_50;
int4 local_48;
int8 local_40;
int8 uStack_38;
local_68 = &uStack_38;
local_60 = 1;
local_58 = 0;
uStack_50 = 0;
local_48 = 0x3f800000;
local_40 = 0;
uStack_38 = 0;
lVar4 = 0;
for (uVar3 = 0; uVar3 < (ulong)((*(long *)(param_1 + 8) - *(long *)param_1) / 0x68);
uVar3 = uVar3 + 1) {
psVar5 = (string *)(*(long *)param_1 + lVar4);
/* try { // try from 00148ba0 to 00148bd0 has its CatchHandler @ 00148c03 */
lVar1 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)&local_68,psVar5);
if (lVar1 == 0) {
puVar2 = (ulong *)std::__detail::
_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>
::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>
*)&local_68,psVar5);
*puVar2 = uVar3;
}
else {
TensorStorage::operator=
((TensorStorage *)(*(long *)(lVar1 + 0x28) * 0x68 + *(long *)param_1),
(TensorStorage *)(*(long *)param_1 + lVar4));
}
lVar4 = lVar4 + 0x68;
}
/* try { // try from 00148be2 to 00148be9 has its CatchHandler @ 00148c01 */
std::vector<TensorStorage,std::allocator<TensorStorage>>::resize
((vector<TensorStorage,std::allocator<TensorStorage>> *)param_1,uStack_50);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)&local_68);
return;
}
| |
44,672 | remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage>>&) | 7CodeWizard[P]stablediffusion/model.cpp | void remove_duplicates(std::vector<TensorStorage>& vec) {
std::unordered_map<std::string, size_t> name_to_index_map;
for (size_t i = 0; i < vec.size(); ++i) {
const std::string& current_name = vec[i].name;
auto it = name_to_index_map.find(current_name);
if (it != name_to_index_map.end()) {
vec[it->second] = vec[i];
} else {
name_to_index_map[current_name] = i;
}
}
vec.resize(name_to_index_map.size());
} | O3 | cpp | remove_duplicates(std::vector<TensorStorage, std::allocator<TensorStorage>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq (%rdi), %r15
cmpq %r15, 0x8(%rdi)
je 0x69f09
xorl %r12d, %r12d
movq %rsp, %r14
xorl %ebp, %ebp
addq %r12, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x78302
testq %rax, %rax
je 0x69ecc
movq (%rbx), %r13
leaq (%r12,%r13), %rsi
imulq $0x68, 0x28(%rax), %r15
addq %r13, %r15
movq %r15, %rdi
callq 0xa2e0
addq $0x20, %r15
leaq (%r12,%r13), %rsi
addq $0x20, %rsi
movl $0x9, %ecx
movq %r15, %rdi
rep movsq (%rsi), %es:(%rdi)
jmp 0x69eda
movq %r14, %rdi
movq %r15, %rsi
callq 0x783fe
movq %rbp, (%rax)
incq %rbp
movq (%rbx), %r15
movq 0x8(%rbx), %rax
subq %r15, %rax
sarq $0x3, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rcx, %rax
addq $0x68, %r12
cmpq %rax, %rbp
jb 0x69e89
movq 0x18(%rsp), %rsi
jmp 0x69f0b
xorl %esi, %esi
movq %rbx, %rdi
callq 0x6d0e2
movq %rsp, %rdi
callq 0x6e436
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x69f2c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6e436
movq %rbx, %rdi
callq 0xaad0
nop
| _Z17remove_duplicatesRSt6vectorI13TensorStorageSaIS0_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
lea rax, [rsp+68h+var_38]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
mov r15, [rdi]
cmp [rdi+8], r15
jz loc_69F09
xor r12d, r12d
mov r14, rsp
xor ebp, ebp
loc_69E89:
add r15, r12
mov rdi, r14
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jz short loc_69ECC
mov r13, [rbx]
lea rsi, [r12+r13]
imul r15, [rax+28h], 68h ; 'h'
add r15, r13
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
add r15, 20h ; ' '
lea rsi, [r12+r13]
add rsi, 20h ; ' '
mov ecx, 9
mov rdi, r15
rep movsq
jmp short loc_69EDA
loc_69ECC:
mov rdi, r14
mov rsi, r15
call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&)
mov [rax], rbp
loc_69EDA:
inc rbp
mov r15, [rbx]
mov rax, [rbx+8]
sub rax, r15
sar rax, 3
mov rcx, 4EC4EC4EC4EC4EC5h
imul rax, rcx
add r12, 68h ; 'h'
cmp rbp, rax
jb short loc_69E89
mov rsi, [rsp+68h+var_50]
jmp short loc_69F0B
loc_69F09:
xor esi, esi
loc_69F0B:
mov rdi, rbx
call _ZNSt6vectorI13TensorStorageSaIS0_EE6resizeEm; std::vector<TensorStorage>::resize(ulong)
mov rdi, rsp
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_69F2C:
mov rbx, rax
mov rdi, rsp
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long remove_duplicates(long long *a1)
{
long long v1; // r15
long long v2; // r12
unsigned long long v3; // rbp
long long v4; // r15
long long v5; // rax
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v10; // r13
long long v11; // r15
long long v12; // rsi
_QWORD v14[2]; // [rsp+0h] [rbp-68h] BYREF
__int128 v15; // [rsp+10h] [rbp-58h]
int v16; // [rsp+20h] [rbp-48h]
__int128 v17; // [rsp+28h] [rbp-40h] BYREF
v14[0] = (char *)&v17 + 8;
v14[1] = 1LL;
v15 = 0LL;
v16 = 1065353216;
v17 = 0LL;
v1 = *a1;
if ( a1[1] == *a1 )
{
v12 = 0LL;
}
else
{
v2 = 0LL;
v3 = 0LL;
do
{
v4 = v2 + v1;
v5 = std::_Hashtable<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v14,
v4);
if ( v5 )
{
v10 = *a1;
v11 = *a1 + 104LL * *(_QWORD *)(v5 + 40);
std::string::_M_assign(v11, v2 + *a1);
qmemcpy((void *)(v11 + 32), (const void *)(v2 + v10 + 32), 0x48uLL);
}
else
{
*(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](
(unsigned int)v14,
v4,
v6,
v7,
v8,
v9,
v14[0]) = v3;
}
++v3;
v1 = *a1;
v2 += 104LL;
}
while ( v3 < 0x4EC4EC4EC4EC4EC5LL * ((a1[1] - *a1) >> 3) );
v12 = *((_QWORD *)&v15 + 1);
}
std::vector<TensorStorage>::resize(a1, v12);
return std::_Hashtable<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v14);
}
| |||
44,673 | 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>> 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::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> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/./json.hpp | iterator insert_iterator(const_iterator pos, Args&& ... args)
{
iterator result(this);
JSON_ASSERT(m_data.m_value.array != nullptr);
auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator);
m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);
result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos;
// This could have been written as:
// result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val);
// but the return value of insert is missing in GCC 4.8, so it is written this way instead.
set_parents();
return result;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::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> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
subq $0x88, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq 0x78(%rsp), %rsi
movq %rsi, 0x28(%rsp)
callq 0xbb370
movq 0x28(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x125f9d
jmp 0x125fbc
leaq 0xa6b92(%rip), %rdi # 0x1ccb36
leaq 0xa6971(%rip), %rsi # 0x1cc91c
movl $0x582c, %edx # imm = 0x582C
leaq 0xaf1a1(%rip), %rcx # 0x1d5158
callq 0x50230
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xa29e0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x58(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x126140
movq 0x10(%rsp), %rsi
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x60(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rsi
addq $0x8, %rsi
leaq 0x48(%rsp), %rdi
callq 0xbbd50
movq 0x8(%rsp), %rdi
movq 0x68(%rsp), %rdx
movq 0x48(%rsp), %rsi
callq 0x126180
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x40(%rsp)
movq 0x8(%rax), %rdi
callq 0xa29e0
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0xbce20
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq 0x38(%rsp), %rcx
movq %rcx, 0x10(%rax)
callq 0x9faf0
movq 0x20(%rsp), %rax
addq $0x88, %rsp
retq
nopw (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_:
sub rsp, 88h
mov [rsp+88h+var_78], rdx
mov [rsp+88h+var_70], rdi
mov rax, rdi
mov [rsp+88h+var_68], rax
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_18], rdx
mov [rsp+88h+var_20], rcx
mov rsi, [rsp+88h+var_10]
mov [rsp+88h+var_60], rsi
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2EPSF_; 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>>::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>*)
mov rax, [rsp+88h+var_60]
cmp qword ptr [rax+8], 0
jz short loc_125F9D
jmp short loc_125FBC
loc_125F9D:
lea rdi, aMDataMTypeValu_0+23h; "m_data.m_value.array != nullptr"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 582Ch
lea rcx, aIteratorNlohma; "iterator nlohmann::basic_json<nlohmann:"...
call ___assert_fail
loc_125FBC:
mov rax, [rsp+88h+var_60]
mov rdi, [rax+8]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE5beginEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::begin(void)
mov rcx, rax
mov rax, [rsp+88h+var_78]
mov [rsp+88h+var_30], rcx
mov rax, [rax+10h]
mov [rsp+88h+var_38], rax
mov rdi, [rsp+88h+var_30]
mov rsi, [rsp+88h+var_38]
call _ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES6_ISG_SaISG_EEEEENSt15iterator_traitsIT_E15difference_typeESM_SM_; std::distance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
mov rsi, [rsp+88h+var_78]
mov rcx, rax
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_28], rcx
mov rax, [rax+8]
mov [rsp+88h+var_80], rax
add rsi, 8
add rsi, 8
lea rdi, [rsp+88h+var_40]
call _ZN9__gnu_cxx17__normal_iteratorIPKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEC2IPSF_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISN_SM_EE7__valueESJ_E6__typeEEE
mov rdi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_20]
mov rsi, [rsp+88h+var_40]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6insertEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EERSI_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::insert(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rcx, rax
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_48], rcx
mov rdi, [rax+8]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE5beginEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::begin(void)
mov [rsp+88h+var_58], rax
mov rsi, [rsp+88h+var_28]
lea rdi, [rsp+88h+var_58]
call _ZNK9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEplEl; __gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::operator+(long)
mov rdi, [rsp+88h+var_60]
mov rcx, rax
mov rax, [rsp+88h+var_70]
mov [rsp+88h+var_50], rcx
mov rcx, [rsp+88h+var_50]
mov [rax+10h], rcx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; 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>::set_parents(void)
mov rax, [rsp+88h+var_68]
add rsp, 88h
retn
| _QWORD * 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>(
_QWORD *a1,
long long a2,
long long a3,
long long a4)
{
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v8; // [rsp+8h] [rbp-80h]
long long v10; // [rsp+30h] [rbp-58h] BYREF
long long v11; // [rsp+38h] [rbp-50h]
long long v12; // [rsp+40h] [rbp-48h]
long long v13; // [rsp+48h] [rbp-40h] BYREF
long long v14; // [rsp+50h] [rbp-38h]
long long v15; // [rsp+58h] [rbp-30h]
long long v16; // [rsp+60h] [rbp-28h]
long long v17; // [rsp+68h] [rbp-20h]
long long v18; // [rsp+70h] [rbp-18h]
long long v19; // [rsp+78h] [rbp-10h]
_QWORD *v20; // [rsp+80h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
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>>::iter_impl(
a1,
a2);
if ( !*(_QWORD *)(a2 + 8) )
__assert_fail(
"m_data.m_value.array != nullptr",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
22572LL,
"iterator nlohmann::basic_json<nlohmann::ordered_map>::insert_iterator(const_iterator, Args &&...) [ObjectType = nl"
"ohmann::ordered_map, ArrayType = std::vector, StringType = std::basic_string<char>, BooleanType = bool, NumberInte"
"gerType = long, NumberUnsignedType = unsigned long, NumberFloatType = double, AllocatorType = std::allocator, JSON"
"Serializer = nlohmann::adl_serializer, BinaryType = std::vector<unsigned char>, CustomBaseClass = void, Args = <co"
"nst nlohmann::basic_json<nlohmann::ordered_map> &>]");
v15 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::begin(*(_QWORD *)(a2 + 8));
v14 = *(_QWORD *)(a3 + 16);
v16 = std::distance<__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>(
v15,
v14);
v8 = *(_QWORD *)(a2 + 8);
__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>*>(
&v13,
a3 + 16);
v12 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::insert(
v8,
v13,
v17,
v4,
v5,
v6);
v10 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::begin(*(_QWORD *)(a2 + 8));
v11 = __gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::operator+(
&v10,
v16);
a1[2] = v11;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents();
return a1;
}
| |||
44,674 | 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>> 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::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> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/./json.hpp | iterator insert_iterator(const_iterator pos, Args&& ... args)
{
iterator result(this);
JSON_ASSERT(m_data.m_value.array != nullptr);
auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator);
m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);
result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos;
// This could have been written as:
// result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val);
// but the return value of insert is missing in GCC 4.8, so it is written this way instead.
set_parents();
return result;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::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> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq $0x0, 0x8(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x18(%rdi)
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x6f60f
movq %rsi, %r14
movq 0x10(%rdx), %rsi
movq %rsi, %r15
subq (%rdi), %r15
movq %rcx, %rdx
callq 0x6f6b6
movq 0x8(%r14), %rax
addq (%rax), %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x478aa(%rip), %rdi # 0xb6ec0
leaq 0x47689(%rip), %rsi # 0xb6ca6
leaq 0x4d17f(%rip), %rcx # 0xbc7a3
movl $0x582c, %edx # imm = 0x582C
callq 0x18470
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_:
push r15
push r14
push rbx
mov rbx, rdi
mov [rdi], rsi
mov qword ptr [rdi+8], 0
mov rax, 8000000000000000h
mov [rdi+18h], rax
mov rdi, [rsi+8]
test rdi, rdi
jz short loc_6F60F
mov r14, rsi
mov rsi, [rdx+10h]
mov r15, rsi
sub r15, [rdi]
mov rdx, rcx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6insertEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EERSI_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::insert(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [r14+8]
add r15, [rax]
mov [rbx+10h], r15
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_6F60F:
lea rdi, aMDataMTypeValu_0+23h; "m_data.m_value.array != nullptr"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIteratorNlohma; "iterator nlohmann::basic_json<nlohmann:"...
mov edx, 582Ch
call ___assert_fail
| _QWORD * 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>(
_QWORD *a1,
long long a2,
long long a3,
long long a4)
{
_QWORD *v5; // rdi
long long v6; // r15
*a1 = a2;
a1[1] = 0LL;
a1[3] = 0x8000000000000000LL;
v5 = *(_QWORD **)(a2 + 8);
if ( !v5 )
__assert_fail(
"m_data.m_value.array != nullptr",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
22572LL,
"iterator nlohmann::basic_json<nlohmann::ordered_map>::insert_iterator(const_iterator, Args &&...) [ObjectType = nl"
"ohmann::ordered_map, ArrayType = std::vector, StringType = std::basic_string<char>, BooleanType = bool, NumberInte"
"gerType = long, NumberUnsignedType = unsigned long, NumberFloatType = double, AllocatorType = std::allocator, JSON"
"Serializer = nlohmann::adl_serializer, BinaryType = std::vector<unsigned char>, CustomBaseClass = void, Args = <co"
"nst nlohmann::basic_json<nlohmann::ordered_map> &>]");
v6 = *(_QWORD *)(a3 + 16) - *v5;
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::insert(
v5,
*(_QWORD *)(a3 + 16),
a4);
a1[2] = **(_QWORD **)(a2 + 8) + v6;
return a1;
}
| insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&>:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI + 0x18],RAX
MOV RDI,qword ptr [RSI + 0x8]
TEST RDI,RDI
JZ 0x0016f60f
MOV R14,RSI
MOV RSI,qword ptr [RDX + 0x10]
MOV R15,RSI
SUB R15,qword ptr [RDI]
MOV RDX,RCX
CALL 0x0016f6b6
MOV RAX,qword ptr [R14 + 0x8]
ADD R15,qword ptr [RAX]
MOV qword ptr [RBX + 0x10],R15
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_0016f60f:
LEA RDI,[0x1b6ec0]
LEA RSI,[0x1b6ca6]
LEA RCX,[0x1bc7a3]
MOV EDX,0x582c
CALL 0x00118470
|
/* 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> > 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>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
const&>(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> const>,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
long * 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>
::
insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&>
(long *param_1,long param_2,long param_3,int8 param_4)
{
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*pvVar1;
long lVar2;
long lVar3;
*param_1 = param_2;
param_1[1] = 0;
param_1[3] = -0x8000000000000000;
pvVar1 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(param_2 + 8);
if (pvVar1 != (vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)0x0) {
lVar2 = *(long *)(param_3 + 0x10);
lVar3 = *(long *)pvVar1;
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::insert(pvVar1,lVar2,param_4);
param_1[2] = (lVar2 - lVar3) + **(long **)(param_2 + 8);
return param_1;
}
/* WARNING: Subroutine does not return */
__assert_fail("m_data.m_value.array != nullptr",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x582c
,
"iterator nlohmann::basic_json<nlohmann::ordered_map>::insert_iterator(const_iterator, Args &&...) [ObjectType = nlohmann::ordered_map, ArrayType = std::vector, StringType = std::basic_string<char>, BooleanType = bool, NumberIntegerType = long, NumberUnsignedType = unsigned long, NumberFloatType = double, AllocatorType = std::allocator, JSONSerializer = nlohmann::adl_serializer, BinaryType = std::vector<unsigned char>, CustomBaseClass = void, Args = <const nlohmann::basic_json<nlohmann::ordered_map> &>]"
);
}
| |
44,675 | void nglog::internal::MakeCheckOpValueString<unsigned char>(std::ostream*, unsigned char const&) | ng-log[P]ng-log/src/logging.cc | void MakeCheckOpValueString(std::ostream* os, const unsigned char& v) {
if (v >= 32 && v <= 126) {
(*os) << "'" << v << "'";
} else {
(*os) << "unsigned char value " << static_cast<unsigned short>(v);
}
} | O3 | cpp | void nglog::internal::MakeCheckOpValueString<unsigned char>(std::ostream*, unsigned char const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
addb $-0x20, %al
cmpb $0x5e, %al
ja 0xf2ec
leaq 0x14863(%rip), %r15 # 0x23b0e
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x75e0
movb (%r14), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x75e0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x75e0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x149d1(%rip), %rsi # 0x23cc4
movl $0x14, %edx
movq %rbx, %rdi
callq 0x75e0
movzbl (%r14), %esi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x7350
| _ZN5nglog8internal22MakeCheckOpValueStringIhEEvPSoRKT_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
mov al, [rsi]
add al, 0E0h
cmp al, 5Eh ; '^'
ja short loc_F2EC
lea r15, aDataNumCharsTo+59h; "'"
mov edx, 1
mov rdi, rbx
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov al, [r14]
lea rsi, [rsp+28h+var_19]
mov [rsi], al
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edx, 1
mov rdi, rax
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_F2EC:
lea rsi, aUnsignedCharVa; "unsigned char value "
mov edx, 14h
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
movzx esi, byte ptr [r14]
mov rdi, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
jmp __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
| long long nglog::internal::MakeCheckOpValueString<unsigned char>(long long a1, _BYTE *a2)
{
long long v2; // rax
_BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF
if ( (unsigned __int8)(*a2 - 32) > 0x5Eu )
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "unsigned char value ", 20LL);
return std::ostream::_M_insert<unsigned long>(a1);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL);
v4[0] = *a2;
v2 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL);
return std::__ostream_insert<char,std::char_traits<char>>(v2, "'", 1LL);
}
}
| MakeCheckOpValueString<unsigned_char>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI]
ADD AL,0xe0
CMP AL,0x5e
JA 0x0010f2ec
LEA R15,[0x123b0e]
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R15
CALL 0x001075e0
MOV AL,byte ptr [R14]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001075e0
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x001075e0
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_0010f2ec:
LEA RSI,[0x123cc4]
MOV EDX,0x14
MOV RDI,RBX
CALL 0x001075e0
MOVZX ESI,byte ptr [R14]
MOV RDI,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
JMP 0x00107350
|
/* void nglog::internal::MakeCheckOpValueString<unsigned char>(std::ostream*, unsigned char const&)
*/
void nglog::internal::MakeCheckOpValueString<unsigned_char>(ostream *param_1,uchar *param_2)
{
ostream *poVar1;
uchar local_19;
if ((byte)(*param_2 - 0x20) < 0x5f) {
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1);
local_19 = *param_2;
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)&local_19,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1);
return;
}
std::__ostream_insert<char,std::char_traits<char>>(param_1,"unsigned char value ",0x14);
std::ostream::_M_insert<unsigned_long>((ulong)param_1);
return;
}
| |
44,676 | mysql_client_plugin_init | eloqsql/build_O3/libmariadb/libmariadb/ma_client_plugin.c | int mysql_client_plugin_init()
{
MYSQL mysql;
struct st_mysql_client_plugin **builtin;
va_list unused;
LINT_INIT_STRUCT(unused);
if (initialized)
return 0;
memset(&mysql, 0, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
pthread_mutex_init(&LOCK_load_client_plugin, NULL);
ma_init_alloc_root(&mem_root, 128, 128);
memset(&plugin_list, 0, sizeof(plugin_list));
initialized= 1;
pthread_mutex_lock(&LOCK_load_client_plugin);
for (builtin= mysql_client_builtins; *builtin; builtin++)
add_plugin(&mysql, *builtin, 0, 0, unused);
pthread_mutex_unlock(&LOCK_load_client_plugin);
load_env_plugins(&mysql);
return 0;
} | O3 | c | mysql_client_plugin_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x520, %rsp # imm = 0x520
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x540(%rbp)
movq $0x0, -0x530(%rbp)
cmpb $0x0, 0x24ad5(%rip) # 0x4d800
jne 0x28e96
leaq -0x520(%rbp), %rdi
movl $0x4f8, %edx # imm = 0x4F8
xorl %esi, %esi
callq 0x13260
leaq 0x24abd(%rip), %rbx # 0x4d808
movq %rbx, %rdi
xorl %esi, %esi
callq 0x136b0
leaq 0x24ad4(%rip), %rdi # 0x4d830
movl $0x80, %esi
movl $0x80, %edx
callq 0x1e610
leaq 0x24afe(%rip), %rax # 0x4d870
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movb $0x1, 0x24a75(%rip) # 0x4d800
movq %rbx, %rdi
callq 0x136a0
leaq 0x21fb6(%rip), %r15 # 0x4ad50
movq (%r15), %rsi
testq %rsi, %rsi
je 0x28dcf
addq $0x8, %r15
leaq -0x520(%rbp), %rbx
leaq -0x540(%rbp), %r14
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq 0x28ebc
movq (%r15), %rsi
addq $0x8, %r15
testq %rsi, %rsi
jne 0x28db4
leaq 0x24a32(%rip), %rdi # 0x4d808
callq 0x13330
leaq 0xe2ba(%rip), %rdi # 0x3709c
callq 0x13590
testq %rax, %rax
je 0x28e96
xorl %ecx, %ecx
cmpb $0x0, (%rax,%rcx)
je 0x28e09
incq %rcx
cmpq $0x400, %rcx # imm = 0x400
jne 0x28df2
jmp 0x28e96
cmpq $0x3ff, %rcx # imm = 0x3FF
ja 0x28e96
movq %rax, %rdi
callq 0x137d0
movq %rax, %rbx
movq %rax, %rdi
movl $0x3b, %esi
callq 0x13180
movq %rbx, %r15
testq %rax, %rax
je 0x28e76
movq %rax, %r14
leaq -0x520(%rbp), %r12
movq %rbx, %r15
movb $0x0, (%r14)
movq %r12, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x29461
movq %r14, %r15
incq %r15
movq %r15, %rdi
movl $0x3b, %esi
callq 0x13180
movq %rax, %r14
testq %rax, %rax
jne 0x28e43
leaq -0x520(%rbp), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x29461
movq %rbx, %rdi
callq 0x13570
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x28eb7
xorl %eax, %eax
addq $0x520, %rsp # imm = 0x520
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
| mysql_client_plugin_init:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 520h
mov rax, fs:28h
mov [rbp+var_28], rax
xorps xmm0, xmm0
movaps [rbp+var_540], xmm0
mov [rbp+var_530], 0
cmp cs:initialized, 0
jnz loc_28E96
lea rdi, [rbp+var_520]
mov edx, 4F8h
xor esi, esi
call _memset
lea rbx, LOCK_load_client_plugin
mov rdi, rbx
xor esi, esi
call _pthread_mutex_init
lea rdi, mem_root
mov esi, 80h
mov edx, 80h
call ma_init_alloc_root
lea rax, plugin_list
xorps xmm0, xmm0
movaps xmmword ptr [rax+30h], xmm0
movaps xmmword ptr [rax+20h], xmm0
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax], xmm0
mov cs:initialized, 1
mov rdi, rbx
call _pthread_mutex_lock
lea r15, mysql_client_builtins
mov rsi, [r15]
test rsi, rsi
jz short loc_28DCF
add r15, 8
lea rbx, [rbp+var_520]
lea r14, [rbp+var_540]
loc_28DB4:
mov rdi, rbx
xor edx, edx
xor ecx, ecx
mov r8, r14
call add_plugin
mov rsi, [r15]
add r15, 8
test rsi, rsi
jnz short loc_28DB4
loc_28DCF:
lea rdi, LOCK_load_client_plugin
call _pthread_mutex_unlock
lea rdi, aLibmysqlPlugin; "LIBMYSQL_PLUGINS"
call _getenv
test rax, rax
jz loc_28E96
xor ecx, ecx
loc_28DF2:
cmp byte ptr [rax+rcx], 0
jz short loc_28E09
inc rcx
cmp rcx, 400h
jnz short loc_28DF2
jmp loc_28E96
loc_28E09:
cmp rcx, 3FFh
ja loc_28E96
mov rdi, rax
call _strdup
mov rbx, rax
mov rdi, rax
mov esi, 3Bh ; ';'
call _strchr
mov r15, rbx
test rax, rax
jz short loc_28E76
mov r14, rax
lea r12, [rbp+var_520]
mov r15, rbx
loc_28E43:
mov byte ptr [r14], 0
mov rdi, r12
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
xor eax, eax
call mysql_load_plugin
mov r15, r14
inc r15
mov rdi, r15
mov esi, 3Bh ; ';'
call _strchr
mov r14, rax
test rax, rax
jnz short loc_28E43
loc_28E76:
lea rdi, [rbp+var_520]
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
xor eax, eax
call mysql_load_plugin
mov rdi, rbx
call _free
loc_28E96:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_28EB7
xor eax, eax
add rsp, 520h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_28EB7:
call ___stack_chk_fail
| long long mysql_client_plugin_init()
{
void *v0; // rsi
void **v1; // r15
long long v2; // rax
unsigned long long v3; // rcx
long long v4; // rbx
long long v5; // rax
int v6; // r8d
int v7; // r9d
int v8; // r15d
_BYTE *v9; // r14
__int128 v11; // [rsp+0h] [rbp-540h] BYREF
long long v12; // [rsp+10h] [rbp-530h]
_BYTE v13[1272]; // [rsp+20h] [rbp-520h] BYREF
unsigned long long v14; // [rsp+518h] [rbp-28h]
v14 = __readfsqword(0x28u);
v11 = 0LL;
v12 = 0LL;
if ( !initialized )
{
memset(v13, 0LL, sizeof(v13));
pthread_mutex_init(&LOCK_load_client_plugin, 0LL);
ma_init_alloc_root((long long)&mem_root, 128LL, 128LL);
plugin_list[3] = 0LL;
plugin_list[2] = 0LL;
plugin_list[1] = 0LL;
plugin_list[0] = 0LL;
initialized = 1;
pthread_mutex_lock(&LOCK_load_client_plugin);
v0 = mysql_client_builtins;
if ( mysql_client_builtins )
{
v1 = (void **)(&mysql_client_builtins + 1);
do
{
((void ( *)(_BYTE *, void *, _QWORD, _QWORD, __int128 *))add_plugin)(v13, v0, 0LL, 0LL, &v11);
v0 = *v1++;
}
while ( v0 );
}
pthread_mutex_unlock(&LOCK_load_client_plugin);
v2 = getenv("LIBMYSQL_PLUGINS");
if ( v2 )
{
v3 = 0LL;
while ( *(_BYTE *)(v2 + v3) )
{
if ( ++v3 == 1024 )
return 0LL;
}
if ( v3 <= 0x3FF )
{
v4 = strdup(v2);
v5 = strchr(v4, 59LL);
v8 = v4;
if ( v5 )
{
v9 = (_BYTE *)v5;
v8 = v4;
do
{
*v9 = 0;
mysql_load_plugin((unsigned int)v13, v8, -1, 0, v6, v7, v11);
v8 = (_DWORD)v9 + 1;
v9 = (_BYTE *)strchr(v9 + 1, 59LL);
}
while ( v9 );
}
mysql_load_plugin((unsigned int)v13, v8, -1, 0, v6, v7, v11);
free(v4);
}
}
}
return 0LL;
}
| mysql_client_plugin_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x520
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x540],XMM0
MOV qword ptr [RBP + -0x530],0x0
CMP byte ptr [0x0014d800],0x0
JNZ 0x00128e96
LEA RDI,[RBP + -0x520]
MOV EDX,0x4f8
XOR ESI,ESI
CALL 0x00113260
LEA RBX,[0x14d808]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001136b0
LEA RDI,[0x14d830]
MOV ESI,0x80
MOV EDX,0x80
CALL 0x0011e610
LEA RAX,[0x14d870]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RAX + 0x30],XMM0
MOVAPS xmmword ptr [RAX + 0x20],XMM0
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
MOV byte ptr [0x0014d800],0x1
MOV RDI,RBX
CALL 0x001136a0
LEA R15,[0x14ad50]
MOV RSI,qword ptr [R15]
TEST RSI,RSI
JZ 0x00128dcf
ADD R15,0x8
LEA RBX,[RBP + -0x520]
LEA R14,[RBP + -0x540]
LAB_00128db4:
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
MOV R8,R14
CALL 0x00128ebc
MOV RSI,qword ptr [R15]
ADD R15,0x8
TEST RSI,RSI
JNZ 0x00128db4
LAB_00128dcf:
LEA RDI,[0x14d808]
CALL 0x00113330
LEA RDI,[0x13709c]
CALL 0x00113590
TEST RAX,RAX
JZ 0x00128e96
XOR ECX,ECX
LAB_00128df2:
CMP byte ptr [RAX + RCX*0x1],0x0
JZ 0x00128e09
INC RCX
CMP RCX,0x400
JNZ 0x00128df2
JMP 0x00128e96
LAB_00128e09:
CMP RCX,0x3ff
JA 0x00128e96
MOV RDI,RAX
CALL 0x001137d0
MOV RBX,RAX
MOV RDI,RAX
MOV ESI,0x3b
CALL 0x00113180
MOV R15,RBX
TEST RAX,RAX
JZ 0x00128e76
MOV R14,RAX
LEA R12,[RBP + -0x520]
MOV R15,RBX
LAB_00128e43:
MOV byte ptr [R14],0x0
MOV RDI,R12
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
XOR EAX,EAX
CALL 0x00129461
MOV R15,R14
INC R15
MOV RDI,R15
MOV ESI,0x3b
CALL 0x00113180
MOV R14,RAX
TEST RAX,RAX
JNZ 0x00128e43
LAB_00128e76:
LEA RDI,[RBP + -0x520]
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
XOR EAX,EAX
CALL 0x00129461
MOV RDI,RBX
CALL 0x00113570
LAB_00128e96:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00128eb7
XOR EAX,EAX
ADD RSP,0x520
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00128eb7:
CALL 0x00113500
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 mysql_client_plugin_init(void)
{
char *pcVar1;
char *__s;
char *pcVar2;
ulong uVar3;
int *puVar4;
int **ppuVar5;
long in_FS_OFFSET;
int8 local_548;
int8 uStack_540;
int8 local_538;
int1 local_528 [1272];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
local_548 = 0;
uStack_540 = 0;
local_538 = 0;
if (initialized == '\0') {
memset(local_528,0,0x4f8);
pthread_mutex_init((pthread_mutex_t *)LOCK_load_client_plugin,(pthread_mutexattr_t *)0x0);
ma_init_alloc_root(mem_root,0x80,0x80);
_DAT_0014d8a0 = 0;
uRam000000000014d8a8 = 0;
_DAT_0014d890 = 0;
uRam000000000014d898 = 0;
_DAT_0014d880 = 0;
uRam000000000014d888 = 0;
plugin_list = 0;
DAT_0014d878 = 0;
initialized = '\x01';
pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin);
if (mysql_client_builtins != (int *)0x0) {
ppuVar5 = &PTR_mysql_old_password_client_plugin_0014ad58;
puVar4 = mysql_client_builtins;
do {
add_plugin(local_528,puVar4,0,0,&local_548);
puVar4 = *ppuVar5;
ppuVar5 = ppuVar5 + 1;
} while (puVar4 != (int *)0x0);
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin);
pcVar1 = getenv("LIBMYSQL_PLUGINS");
if (pcVar1 != (char *)0x0) {
uVar3 = 0;
do {
if (pcVar1[uVar3] == '\0') {
if (uVar3 < 0x400) {
__s = strdup(pcVar1);
pcVar2 = strchr(__s,0x3b);
pcVar1 = __s;
if (pcVar2 != (char *)0x0) {
do {
*pcVar2 = '\0';
mysql_load_plugin(local_528,pcVar1,0xffffffff,0);
pcVar1 = pcVar2 + 1;
pcVar2 = strchr(pcVar1,0x3b);
} while (pcVar2 != (char *)0x0);
}
mysql_load_plugin(local_528,pcVar1,0xffffffff,0);
free(__s);
}
break;
}
uVar3 = uVar3 + 1;
} while (uVar3 != 0x400);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return 0;
}
| |
44,677 | create_logfile_by_number_no_cache | eloqsql/storage/maria/ma_loghandler.c | static File create_logfile_by_number_no_cache(uint32 file_no)
{
File file;
char path[FN_REFLEN];
DBUG_ENTER("create_logfile_by_number_no_cache");
if (translog_status != TRANSLOG_OK)
DBUG_RETURN(-1);
/* TODO: add O_DIRECT to open flags (when buffer is aligned) */
if ((file= mysql_file_create(key_file_translog,
translog_filename_by_fileno(file_no, path),
0, O_BINARY | O_RDWR | O_CLOEXEC, MYF(MY_WME))) < 0)
{
DBUG_PRINT("error", ("Error %d during creating file '%s'", errno, path));
translog_stop_writing();
DBUG_RETURN(-1);
}
if (sync_log_dir >= TRANSLOG_SYNC_DIR_NEWFILE &&
sync_dir(log_descriptor.directory_fd, MYF(MY_WME | MY_IGNORE_BADFD)))
{
DBUG_PRINT("error", ("Error %d during syncing directory '%s'",
errno, log_descriptor.directory));
mysql_file_close(file, MYF(0));
translog_stop_writing();
DBUG_RETURN(-1);
}
DBUG_PRINT("info", ("File: '%s' handler: %d", path, file));
DBUG_RETURN(file);
} | O0 | c | create_logfile_by_number_no_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x218(%rbp)
cmpl $0x1, 0x424ddb(%rip) # 0x4771b0
je 0x523e8
jmp 0x523d9
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x524c1
leaq 0x424925(%rip), %rax # 0x476d14
movl (%rax), %eax
movl %eax, -0x220(%rbp)
movl -0x218(%rbp), %edi
leaq -0x210(%rbp), %rsi
callq 0x4f1d0
movl -0x220(%rbp), %edi
movq %rax, %rcx
leaq 0xfe73f(%rip), %rsi # 0x150b58
movl $0x3df, %edx # imm = 0x3DF
xorl %r8d, %r8d
movl $0x80002, %r9d # imm = 0x80002
movq $0x10, (%rsp)
callq 0x58a50
movl %eax, -0x21c(%rbp)
cmpl $0x0, %eax
jge 0x52454
jmp 0x52441
jmp 0x52443
callq 0x4f190
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x524c1
cmpq $0x1, 0x269f7c(%rip) # 0x2bc3d8
jb 0x524af
movl 0x42624c(%rip), %edx # 0x4786b0
leaq 0xfe6ed(%rip), %rdi # 0x150b58
movl $0x3e6, %esi # imm = 0x3E6
movl $0x30, %ecx
callq 0x58b40
cmpl $0x0, %eax
je 0x524af
jmp 0x52481
jmp 0x52483
movl -0x21c(%rbp), %edx
leaq 0xfe6c8(%rip), %rdi # 0x150b58
movl $0x3ea, %esi # imm = 0x3EA
xorl %eax, %eax
movl %eax, %ecx
callq 0x4f870
callq 0x4f190
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x524c1
jmp 0x524b1
jmp 0x524b3
jmp 0x524b5
movl -0x21c(%rbp), %eax
movl %eax, -0x214(%rbp)
movl -0x214(%rbp), %eax
movl %eax, -0x224(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x524ee
movl -0x224(%rbp), %eax
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| create_logfile_by_number_no_cache:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], edi
cmp cs:translog_status, 1
jz short loc_523E8
jmp short $+2
loc_523D9:
mov [rbp+var_214], 0FFFFFFFFh
jmp loc_524C1
loc_523E8:
lea rax, key_file_translog
mov eax, [rax]
mov [rbp+var_220], eax
mov edi, [rbp+var_218]
lea rsi, [rbp+var_210]
call translog_filename_by_fileno
mov edi, [rbp+var_220]
mov rcx, rax
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3DFh
xor r8d, r8d
mov r9d, offset loc_80002
mov [rsp+230h+var_230], 10h
call inline_mysql_file_create_0
mov [rbp+var_21C], eax
cmp eax, 0
jge short loc_52454
jmp short $+2
loc_52441:
jmp short $+2
loc_52443:
call translog_stop_writing
mov [rbp+var_214], 0FFFFFFFFh
jmp short loc_524C1
loc_52454:
cmp cs:sync_log_dir, 1
jb short loc_524AF
mov edx, cs:dword_4786B0
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E6h
mov ecx, 30h ; '0'
call inline_mysql_file_sync_3
cmp eax, 0
jz short loc_524AF
jmp short $+2
loc_52481:
jmp short $+2
loc_52483:
mov edx, [rbp+var_21C]
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3EAh
xor eax, eax
mov ecx, eax
call inline_mysql_file_close_2
call translog_stop_writing
mov [rbp+var_214], 0FFFFFFFFh
jmp short loc_524C1
loc_524AF:
jmp short $+2
loc_524B1:
jmp short $+2
loc_524B3:
jmp short $+2
loc_524B5:
mov eax, [rbp+var_21C]
mov [rbp+var_214], eax
loc_524C1:
mov eax, [rbp+var_214]
mov [rbp+var_224], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_524EE
mov eax, [rbp+var_224]
add rsp, 230h
pop rbp
retn
loc_524EE:
call ___stack_chk_fail
| long long create_logfile_by_number_no_cache(
unsigned int a1,
long long a2,
long long a3,
long long a4,
int a5,
int a6)
{
int v6; // eax
int v8; // [rsp+10h] [rbp-220h]
signed int v9; // [rsp+14h] [rbp-21Ch]
_BYTE v11[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v12; // [rsp+228h] [rbp-8h]
v12 = __readfsqword(0x28u);
if ( translog_status == 1 )
{
v8 = key_file_translog;
v6 = translog_filename_by_fileno(a1, (long long)v11, a3, a4, a5, a6);
v9 = inline_mysql_file_create_0(
v8,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
991,
v6,
0,
(unsigned int)&loc_80002,
16LL);
if ( v9 >= 0 )
{
if ( sync_log_dir
&& (unsigned int)inline_mysql_file_sync_3(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
998LL,
(unsigned int)dword_4786B0,
48LL) )
{
inline_mysql_file_close_2(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x3EAu,
v9,
0LL);
translog_stop_writing();
return (unsigned int)-1;
}
else
{
return (unsigned int)v9;
}
}
else
{
translog_stop_writing();
return (unsigned int)-1;
}
}
else
{
return (unsigned int)-1;
}
}
| create_logfile_by_number_no_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x218],EDI
CMP dword ptr [0x005771b0],0x1
JZ 0x001523e8
JMP 0x001523d9
LAB_001523d9:
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x001524c1
LAB_001523e8:
LEA RAX,[0x576d14]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x220],EAX
MOV EDI,dword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x0014f1d0
MOV EDI,dword ptr [RBP + -0x220]
MOV RCX,RAX
LEA RSI,[0x250b58]
MOV EDX,0x3df
XOR R8D,R8D
MOV R9D,0x80002
MOV qword ptr [RSP],0x10
CALL 0x00158a50
MOV dword ptr [RBP + -0x21c],EAX
CMP EAX,0x0
JGE 0x00152454
JMP 0x00152441
LAB_00152441:
JMP 0x00152443
LAB_00152443:
CALL 0x0014f190
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x001524c1
LAB_00152454:
CMP qword ptr [0x003bc3d8],0x1
JC 0x001524af
MOV EDX,dword ptr [0x005786b0]
LEA RDI,[0x250b58]
MOV ESI,0x3e6
MOV ECX,0x30
CALL 0x00158b40
CMP EAX,0x0
JZ 0x001524af
JMP 0x00152481
LAB_00152481:
JMP 0x00152483
LAB_00152483:
MOV EDX,dword ptr [RBP + -0x21c]
LEA RDI,[0x250b58]
MOV ESI,0x3ea
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0014f870
CALL 0x0014f190
MOV dword ptr [RBP + -0x214],0xffffffff
JMP 0x001524c1
LAB_001524af:
JMP 0x001524b1
LAB_001524b1:
JMP 0x001524b3
LAB_001524b3:
JMP 0x001524b5
LAB_001524b5:
MOV EAX,dword ptr [RBP + -0x21c]
MOV dword ptr [RBP + -0x214],EAX
LAB_001524c1:
MOV EAX,dword ptr [RBP + -0x214]
MOV dword ptr [RBP + -0x224],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001524ee
MOV EAX,dword ptr [RBP + -0x224]
ADD RSP,0x230
POP RBP
RET
LAB_001524ee:
CALL 0x0012a270
|
int create_logfile_by_number_no_cache(int4 param_1)
{
int4 uVar1;
int iVar2;
int8 uVar3;
long in_FS_OFFSET;
int local_21c;
int1 local_218 [520];
long local_10;
uVar1 = key_file_translog;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (translog_status == 1) {
uVar3 = translog_filename_by_fileno(param_1,local_218);
local_21c = inline_mysql_file_create
(uVar1,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x3df,uVar3,0,0x80002,0x10);
if (local_21c < 0) {
translog_stop_writing();
local_21c = -1;
}
else if ((sync_log_dir != 0) &&
(iVar2 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c"
,0x3e6,DAT_005786b0,0x30), iVar2 != 0)) {
inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x3ea,
local_21c,0);
translog_stop_writing();
local_21c = -1;
}
}
else {
local_21c = -1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_21c;
}
| |
44,678 | coro::ring_buffer<unsigned long, 2ul>::notify_waiters() | AlayaLite/build_O3/_deps/libcoro-src/include/coro/ring_buffer.hpp | auto notify_waiters() -> void
{
std::unique_lock lk{m_mutex};
// Only wake up waiters once.
if (m_stopped.load(std::memory_order::acquire))
{
return;
}
m_stopped.exchange(true, std::memory_order::release);
while (m_produce_waiters != nullptr)
{
auto* to_resume = m_produce_waiters;
to_resume->m_stopped = true;
m_produce_waiters = m_produce_waiters->m_next;
lk.unlock();
to_resume->m_awaiting_coroutine.resume();
lk.lock();
}
while (m_consume_waiters != nullptr)
{
auto* to_resume = m_consume_waiters;
to_resume->m_stopped = true;
m_consume_waiters = m_consume_waiters->m_next;
lk.unlock();
to_resume->m_awaiting_coroutine.resume();
lk.lock();
}
} | O3 | cpp | coro::ring_buffer<unsigned long, 2ul>::notify_waiters():
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %rdi, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x2e99c
movb $0x1, 0x8(%r14)
movb 0x60(%rbx), %al
testb $0x1, %al
je 0x2f00b
movq %rsp, %rdi
callq 0x2e986
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movb $0x1, %al
xchgb %al, 0x60(%rbx)
movq %rsp, %r14
movq 0x50(%rbx), %r15
testq %r15, %r15
je 0x2f041
movb $0x1, 0x20(%r15)
movq 0x10(%r15), %rax
movq %rax, 0x50(%rbx)
movq %r14, %rdi
callq 0x2e9d8
movq 0x8(%r15), %rdi
callq *(%rdi)
movq %r14, %rdi
callq 0x2e99c
jmp 0x2f013
movq %rsp, %r14
movq 0x58(%rbx), %r15
testq %r15, %r15
je 0x2eff9
movb $0x1, 0x20(%r15)
movq 0x10(%r15), %rax
movq %rax, 0x58(%rbx)
movq %r14, %rdi
callq 0x2e9d8
movq 0x8(%r15), %rdi
callq *(%rdi)
movq %r14, %rdi
callq 0x2e99c
jmp 0x2f044
jmp 0x2f074
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2e986
movq %rbx, %rdi
callq 0x17740
nop
| _ZN4coro11ring_bufferImLm2EE14notify_waitersEv:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
mov r14, rsp
mov [r14], rdi
mov byte ptr [r14+8], 0
mov rdi, r14
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov byte ptr [r14+8], 1
mov al, [rbx+60h]
test al, 1
jz short loc_2F00B
loc_2EFF9:
mov rdi, rsp
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_2F00B:
mov al, 1
xchg al, [rbx+60h]
mov r14, rsp
loc_2F013:
mov r15, [rbx+50h]
test r15, r15
jz short loc_2F041
mov byte ptr [r15+20h], 1
mov rax, [r15+10h]
mov [rbx+50h], rax
mov rdi, r14
call _ZNSt11unique_lockISt5mutexE6unlockEv; std::unique_lock<std::mutex>::unlock(void)
mov rdi, [r15+8]
call qword ptr [rdi]
mov rdi, r14
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
jmp short loc_2F013
loc_2F041:
mov r14, rsp
loc_2F044:
mov r15, [rbx+58h]
test r15, r15
jz short loc_2EFF9
mov byte ptr [r15+20h], 1
mov rax, [r15+10h]
mov [rbx+58h], rax
mov rdi, r14
call _ZNSt11unique_lockISt5mutexE6unlockEv; std::unique_lock<std::mutex>::unlock(void)
mov rdi, [r15+8]
call qword ptr [rdi]
mov rdi, r14
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
jmp short loc_2F044
jmp short $+2
loc_2F074:
mov rbx, rax
mov rdi, rsp
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, rbx
call __Unwind_Resume
| char coro::ring_buffer<unsigned long,2ul>::notify_waiters(long long a1)
{
char result; // al
long long v2; // r15
long long v3; // r15
long long v4; // [rsp+0h] [rbp-28h] BYREF
char v5; // [rsp+8h] [rbp-20h]
v4 = a1;
v5 = 0;
std::unique_lock<std::mutex>::lock(&v4);
v5 = 1;
result = *(_BYTE *)(a1 + 96);
if ( (result & 1) == 0 )
{
result = *(_BYTE *)(a1 + 96);
*(_BYTE *)(a1 + 96) = 1;
while ( 1 )
{
v2 = *(_QWORD *)(a1 + 80);
if ( !v2 )
break;
*(_BYTE *)(v2 + 32) = 1;
*(_QWORD *)(a1 + 80) = *(_QWORD *)(v2 + 16);
std::unique_lock<std::mutex>::unlock(&v4);
(**(void (***)(void))(v2 + 8))();
result = std::unique_lock<std::mutex>::lock(&v4);
}
while ( 1 )
{
v3 = *(_QWORD *)(a1 + 88);
if ( !v3 )
break;
*(_BYTE *)(v3 + 32) = 1;
*(_QWORD *)(a1 + 88) = *(_QWORD *)(v3 + 16);
std::unique_lock<std::mutex>::unlock(&v4);
(**(void (***)(void))(v3 + 8))();
result = std::unique_lock<std::mutex>::lock(&v4);
}
}
std::unique_lock<std::mutex>::~unique_lock((long long)&v4);
return result;
}
| notify_waiters:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV R14,RSP
MOV qword ptr [R14],RDI
MOV byte ptr [R14 + 0x8],0x0
MOV RDI,R14
CALL 0x0012e99c
MOV byte ptr [R14 + 0x8],0x1
MOV AL,byte ptr [RBX + 0x60]
TEST AL,0x1
JZ 0x0012f00b
LAB_0012eff9:
MOV RDI,RSP
CALL 0x0012e986
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_0012f00b:
MOV AL,0x1
XCHG byte ptr [RBX + 0x60],AL
MOV R14,RSP
LAB_0012f013:
MOV R15,qword ptr [RBX + 0x50]
TEST R15,R15
JZ 0x0012f041
MOV byte ptr [R15 + 0x20],0x1
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBX + 0x50],RAX
LAB_0012f029:
MOV RDI,R14
CALL 0x0012e9d8
MOV RDI,qword ptr [R15 + 0x8]
CALL qword ptr [RDI]
MOV RDI,R14
CALL 0x0012e99c
JMP 0x0012f013
LAB_0012f041:
MOV R14,RSP
LAB_0012f044:
MOV R15,qword ptr [RBX + 0x58]
TEST R15,R15
JZ 0x0012eff9
MOV byte ptr [R15 + 0x20],0x1
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBX + 0x58],RAX
LAB_0012f05a:
MOV RDI,R14
CALL 0x0012e9d8
MOV RDI,qword ptr [R15 + 0x8]
CALL qword ptr [RDI]
MOV RDI,R14
CALL 0x0012e99c
LAB_0012f070:
JMP 0x0012f044
|
/* coro::ring_buffer<unsigned long, 2ul>::notify_waiters() */
void __thiscall
coro::ring_buffer<unsigned_long,2ul>::notify_waiters(ring_buffer<unsigned_long,2ul> *this)
{
long lVar1;
ring_buffer<unsigned_long,2ul> *local_28;
int1 local_20;
local_20 = 0;
local_28 = this;
std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_28);
local_20 = 1;
if (((byte)this[0x60] & 1) == 0) {
LOCK();
this[0x60] = (ring_buffer<unsigned_long,2ul>)0x1;
UNLOCK();
while (lVar1 = *(long *)(this + 0x50), lVar1 != 0) {
*(int1 *)(lVar1 + 0x20) = 1;
*(int8 *)(this + 0x50) = *(int8 *)(lVar1 + 0x10);
/* try { // try from 0012f029 to 0012f03e has its CatchHandler @ 0012f074 */
std::unique_lock<std::mutex>::unlock((unique_lock<std::mutex> *)&local_28);
(*(code *)**(int8 **)(lVar1 + 8))();
std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_28);
}
while (lVar1 = *(long *)(this + 0x58), lVar1 != 0) {
*(int1 *)(lVar1 + 0x20) = 1;
*(int8 *)(this + 0x58) = *(int8 *)(lVar1 + 0x10);
/* try { // try from 0012f05a to 0012f06f has its CatchHandler @ 0012f072 */
std::unique_lock<std::mutex>::unlock((unique_lock<std::mutex> *)&local_28);
(*(code *)**(int8 **)(lVar1 + 8))();
std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_28);
}
}
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_28);
return;
}
| |
44,679 | minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/./minja.hpp | ArgumentsValue evaluate(const std::shared_ptr<Context> & context) const {
ArgumentsValue vargs;
for (const auto& arg : this->args) {
if (auto un_expr = std::dynamic_pointer_cast<UnaryOpExpr>(arg)) {
if (un_expr->op == UnaryOpExpr::Op::Expansion) {
auto array = un_expr->expr->evaluate(context);
if (!array.is_array()) {
throw std::runtime_error("Expansion operator only supported on arrays");
}
array.for_each([&](Value & value) {
vargs.args.push_back(value);
});
continue;
} else if (un_expr->op == UnaryOpExpr::Op::ExpansionDict) {
auto dict = un_expr->expr->evaluate(context);
if (!dict.is_object()) {
throw std::runtime_error("ExpansionDict operator only supported on objects");
}
dict.for_each([&](const Value & key) {
vargs.kwargs.push_back({key.get<std::string>(), dict.at(key)});
});
continue;
}
}
vargs.args.push_back(arg->evaluate(context));
}
for (const auto& [name, value] : this->kwargs) {
vargs.kwargs.push_back({name, value->evaluate(context)});
}
return vargs;
} | O0 | cpp | minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const:
subq $0x2f8, %rsp # imm = 0x2F8
movq %rdi, 0x40(%rsp)
movq %rdi, %rax
movq %rax, 0x48(%rsp)
movq %rdi, 0x2f0(%rsp)
movq %rsi, 0x2e8(%rsp)
movq %rdx, 0x2e0(%rsp)
movq 0x2e8(%rsp), %rax
movq %rax, 0x50(%rsp)
movb $0x0, 0x2df(%rsp)
callq 0xda590
movq 0x50(%rsp), %rax
movq %rax, 0x2d0(%rsp)
movq 0x2d0(%rsp), %rdi
callq 0xcd800
movq %rax, 0x2c8(%rsp)
movq 0x2d0(%rsp), %rdi
callq 0xcd830
movq %rax, 0x2c0(%rsp)
leaq 0x2c8(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
callq 0xcd860
testb $0x1, %al
jne 0xd848b
jmp 0xd88b5
leaq 0x2c8(%rsp), %rdi
callq 0xcd8a0
movq %rax, 0x2b8(%rsp)
movq 0x2b8(%rsp), %rsi
leaq 0x2a8(%rsp), %rdi
callq 0xda5c0
leaq 0x2a8(%rsp), %rdi
callq 0xda660
testb $0x1, %al
jne 0xd84cb
jmp 0xd87d9
leaq 0x2a8(%rsp), %rdi
callq 0xda680
cmpl $0x3, 0x30(%rax)
jne 0xd8657
leaq 0x2a8(%rsp), %rdi
callq 0xda680
movq %rax, %rdi
addq $0x20, %rdi
callq 0x9f2f0
movq %rax, %rsi
movq 0x2e0(%rsp), %rdx
leaq 0x258(%rsp), %rdi
callq 0x9f300
jmp 0xd8515
leaq 0x258(%rsp), %rdi
callq 0xa4990
testb $0x1, %al
jne 0xd85bf
movl $0x10, %edi
callq 0x50540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x38(%rsp)
leaq 0xf948f(%rip), %rsi # 0x1d19d5
callq 0x50340
jmp 0xd854d
movq 0x38(%rsp), %rdi
movq 0x17ba57(%rip), %rsi # 0x253fb0
movq 0x17ba18(%rip), %rdx # 0x253f78
callq 0x508f0
jmp 0xd8a71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
jmp 0xd8864
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
callq 0x50c40
jmp 0xd8645
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
jmp 0xd8645
movq 0x40(%rsp), %rax
movq %rax, 0x220(%rsp)
leaq 0x228(%rsp), %rdi
movq %rdi, 0x30(%rsp)
leaq 0x220(%rsp), %rsi
callq 0xdab90
movq 0x30(%rsp), %rsi
leaq 0x258(%rsp), %rdi
callq 0xda690
jmp 0xd85fa
leaq 0x228(%rsp), %rdi
callq 0xdac20
movl $0x3, 0x21c(%rsp)
leaq 0x258(%rsp), %rdi
callq 0x9f7a0
jmp 0xd87e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
leaq 0x228(%rsp), %rdi
callq 0xdac20
leaq 0x258(%rsp), %rdi
callq 0x9f7a0
jmp 0xd8864
leaq 0x2a8(%rsp), %rdi
callq 0xda680
cmpl $0x4, 0x30(%rax)
jne 0xd87d5
leaq 0x2a8(%rsp), %rdi
callq 0xda680
movq %rax, %rdi
addq $0x20, %rdi
callq 0x9f2f0
movq %rax, %rsi
movq 0x2e0(%rsp), %rdx
leaq 0x1c8(%rsp), %rdi
callq 0x9f300
jmp 0xd86a1
leaq 0x1c8(%rsp), %rdi
callq 0xa5180
testb $0x1, %al
jne 0xd872e
movl $0x10, %edi
callq 0x50540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
leaq 0xf9333(%rip), %rsi # 0x1d1a01
callq 0x50340
jmp 0xd86d5
movq 0x28(%rsp), %rdi
movq 0x17b8cf(%rip), %rsi # 0x253fb0
movq 0x17b890(%rip), %rdx # 0x253f78
callq 0x508f0
jmp 0xd8a71
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
callq 0x50c40
jmp 0xd87c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
jmp 0xd87c3
movq 0x40(%rsp), %rax
movq %rax, 0x198(%rsp)
leaq 0x1c8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x1a0(%rsp)
leaq 0x1a8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
leaq 0x198(%rsp), %rsi
callq 0xdac30
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xda690
jmp 0xd877b
leaq 0x1a8(%rsp), %rdi
callq 0xdac20
movl $0x3, 0x21c(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x9f7a0
jmp 0xd87e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
leaq 0x1a8(%rsp), %rdi
callq 0xdac20
leaq 0x1c8(%rsp), %rdi
callq 0x9f7a0
jmp 0xd8864
jmp 0xd87d7
jmp 0xd87d9
movl $0x0, 0x21c(%rsp)
leaq 0x2a8(%rsp), %rdi
callq 0x9de00
movl 0x21c(%rsp), %eax
testl %eax, %eax
je 0xd8800
jmp 0xd87fe
jmp 0xd8852
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x2b8(%rsp), %rdi
callq 0x9f2f0
movq %rax, %rsi
movq 0x2e0(%rsp), %rdx
leaq 0x148(%rsp), %rdi
callq 0x9f300
jmp 0xd8831
movq 0x10(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0xc7180
jmp 0xd8845
leaq 0x148(%rsp), %rdi
callq 0x9f7a0
leaq 0x2c8(%rsp), %rdi
callq 0xcd9e0
jmp 0xd846d
leaq 0x2a8(%rsp), %rdi
callq 0x9de00
jmp 0xd8a5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
jmp 0xd8a5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x9f7a0
jmp 0xd8a5a
movq 0x50(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x140(%rsp)
movq 0x140(%rsp), %rdi
callq 0xdacc0
movq %rax, 0x138(%rsp)
movq 0x140(%rsp), %rdi
callq 0xdacf0
movq %rax, 0x130(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0xdad20
testb $0x1, %al
jne 0xd890e
jmp 0xd8a26
leaq 0x138(%rsp), %rdi
callq 0xdad60
movq %rax, 0x128(%rsp)
movq 0x128(%rsp), %rdi
callq 0xdad70
movq %rax, 0x120(%rsp)
movq 0x128(%rsp), %rdi
callq 0xdad80
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x118(%rsp)
addq $0x18, %rax
movq %rax, (%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x118(%rsp), %rdi
callq 0x9f2f0
movq %rax, %rsi
movq 0x2e0(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0x9f300
jmp 0xd898e
movq 0x8(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0xdadc0
jmp 0xd89a7
movq (%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xdad90
jmp 0xd89ba
leaq 0xa8(%rsp), %rdi
callq 0xdae00
leaq 0x58(%rsp), %rdi
callq 0x9f7a0
leaq 0x138(%rsp), %rdi
callq 0xdae30
jmp 0xd88f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
jmp 0xd8a1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xdae00
leaq 0x58(%rsp), %rdi
callq 0x9f7a0
jmp 0xd8a5a
movb $0x1, 0x2df(%rsp)
movl $0x1, 0x21c(%rsp)
testb $0x1, 0x2df(%rsp)
jne 0xd8a4d
movq 0x40(%rsp), %rdi
callq 0xda560
movq 0x48(%rsp), %rax
addq $0x2f8, %rsp # imm = 0x2F8
retq
movq 0x40(%rsp), %rdi
callq 0xda560
movq 0x250(%rsp), %rdi
callq 0x50940
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE:
sub rsp, 2F8h
mov [rsp+2F8h+var_2B8], rdi
mov rax, rdi
mov [rsp+2F8h+var_2B0], rax
mov [rsp+2F8h+var_8], rdi
mov [rsp+2F8h+var_10], rsi
mov [rsp+2F8h+var_18], rdx
mov rax, [rsp+2F8h+var_10]
mov [rsp+2F8h+var_2A8], rax
mov [rsp+2F8h+var_19], 0
call _ZN5minja14ArgumentsValueC2Ev; minja::ArgumentsValue::ArgumentsValue(void)
mov rax, [rsp+2F8h+var_2A8]
mov [rsp+2F8h+var_28], rax
mov rdi, [rsp+2F8h+var_28]
call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE5beginEv; std::vector<std::shared_ptr<minja::Expression>>::begin(void)
mov [rsp+2F8h+var_30], rax
mov rdi, [rsp+2F8h+var_28]
call _ZNKSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE3endEv; std::vector<std::shared_ptr<minja::Expression>>::end(void)
mov [rsp+2F8h+var_38], rax
loc_D846D:
lea rdi, [rsp+2F8h+var_30]
lea rsi, [rsp+2F8h+var_38]
call _ZN9__gnu_cxxneIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_; __gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>> const&)
test al, 1
jnz short loc_D848B
jmp loc_D88B5
loc_D848B:
lea rdi, [rsp+2F8h+var_30]
call _ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*(void)
mov [rsp+2F8h+var_40], rax
mov rsi, [rsp+2F8h+var_40]
lea rdi, [rsp+2F8h+var_50]
call _ZSt20dynamic_pointer_castIN5minja11UnaryOpExprENS0_10ExpressionEESt10shared_ptrIT_ERKS3_IT0_E; std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>(std::shared_ptr const&<minja::Expression>)
lea rdi, [rsp+2F8h+var_50]
call _ZNKSt12__shared_ptrIN5minja11UnaryOpExprELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_D84CB
jmp loc_D87D9
loc_D84CB:
lea rdi, [rsp+2F8h+var_50]
call _ZNKSt19__shared_ptr_accessIN5minja11UnaryOpExprELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
cmp dword ptr [rax+30h], 3
jnz loc_D8657
lea rdi, [rsp+2F8h+var_50]
call _ZNKSt19__shared_ptr_accessIN5minja11UnaryOpExprELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
add rdi, 20h ; ' '
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+2F8h+var_18]
lea rdi, [rsp+2F8h+var_A0]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
jmp short $+2
loc_D8515:
lea rdi, [rsp+2F8h+var_A0]; this
call _ZNK5minja5Value8is_arrayEv; minja::Value::is_array(void)
test al, 1
jnz loc_D85BF
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+2F8h+var_2C0], rax
lea rsi, aExpansionOpera_0; "Expansion operator only supported on ar"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_D854D:
mov rdi, [rsp+2F8h+var_2C0]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_D8A71
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
jmp loc_D8864
mov rdi, [rsp+arg_30]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
call ___cxa_free_exception
jmp loc_D8645
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
jmp loc_D8645
loc_D85BF:
mov rax, [rsp+2F8h+var_2B8]
mov [rsp+2F8h+var_D8], rax
lea rdi, [rsp+2F8h+var_D0]
mov [rsp+2F8h+var_2C8], rdi
lea rsi, [rsp+2F8h+var_D8]
call _ZNSt8functionIFvRN5minja5ValueEEEC2IZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlS2_E_vEEOT_; std::function<void ()(minja::Value &)>::function<minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>(minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1} &&)
mov rsi, [rsp+2F8h+var_2C8]
lea rdi, [rsp+2F8h+var_A0]
call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&)
jmp short $+2
loc_D85FA:
lea rdi, [rsp+2F8h+var_D0]
call _ZNSt8functionIFvRN5minja5ValueEEED2Ev; std::function<void ()(minja::Value &)>::~function()
mov [rsp+2F8h+var_DC], 3
lea rdi, [rsp+2F8h+var_A0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp loc_D87E4
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
lea rdi, [rsp+arg_220]
call _ZNSt8functionIFvRN5minja5ValueEEED2Ev; std::function<void ()(minja::Value &)>::~function()
loc_D8645:
lea rdi, [rsp+arg_250]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp loc_D8864
loc_D8657:
lea rdi, [rsp+2F8h+var_50]
call _ZNKSt19__shared_ptr_accessIN5minja11UnaryOpExprELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
cmp dword ptr [rax+30h], 4
jnz loc_D87D5
lea rdi, [rsp+2F8h+var_50]
call _ZNKSt19__shared_ptr_accessIN5minja11UnaryOpExprELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
add rdi, 20h ; ' '
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+2F8h+var_18]
lea rdi, [rsp+2F8h+var_130]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
jmp short $+2
loc_D86A1:
lea rdi, [rsp+2F8h+var_130]; this
call _ZNK5minja5Value9is_objectEv; minja::Value::is_object(void)
test al, 1
jnz short loc_D872E
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+2F8h+var_2D0], rax
lea rsi, aExpansiondictO; "ExpansionDict operator only supported o"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_D86D5:
mov rdi, [rsp+2F8h+var_2D0]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_D8A71
mov rdi, [rsp+arg_20]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
call ___cxa_free_exception
jmp loc_D87C3
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
jmp loc_D87C3
loc_D872E:
mov rax, [rsp+2F8h+var_2B8]
mov [rsp+2F8h+var_160], rax
lea rax, [rsp+2F8h+var_130]
mov [rsp+2F8h+var_2E0], rax
mov [rsp+2F8h+var_158], rax
lea rdi, [rsp+2F8h+var_150]
mov [rsp+2F8h+var_2D8], rdi
lea rsi, [rsp+2F8h+var_160]
call _ZNSt8functionIFvRN5minja5ValueEEEC2IZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlRKS1_E_vEEOT_; std::function<void ()(minja::Value &)>::function<minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1},void>(minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1} &&)
mov rdi, [rsp+2F8h+var_2E0]
mov rsi, [rsp+2F8h+var_2D8]
call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&)
jmp short $+2
loc_D877B:
lea rdi, [rsp+2F8h+var_150]
call _ZNSt8functionIFvRN5minja5ValueEEED2Ev; std::function<void ()(minja::Value &)>::~function()
mov [rsp+2F8h+var_DC], 3
lea rdi, [rsp+2F8h+var_130]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_D87E4
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
lea rdi, [rsp+arg_1A0]
call _ZNSt8functionIFvRN5minja5ValueEEED2Ev; std::function<void ()(minja::Value &)>::~function()
loc_D87C3:
lea rdi, [rsp+arg_1C0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp loc_D8864
loc_D87D5:
jmp short $+2
loc_D87D7:
jmp short $+2
loc_D87D9:
mov [rsp+2F8h+var_DC], 0
loc_D87E4:
lea rdi, [rsp+2F8h+var_50]
call _ZNSt10shared_ptrIN5minja11UnaryOpExprEED2Ev; std::shared_ptr<minja::UnaryOpExpr>::~shared_ptr()
mov eax, [rsp+2F8h+var_DC]
test eax, eax
jz short loc_D8800
jmp short $+2
loc_D87FE:
jmp short loc_D8852
loc_D8800:
mov rax, [rsp+2F8h+var_2B8]
mov [rsp+2F8h+var_2E8], rax
mov rdi, [rsp+2F8h+var_40]
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+2F8h+var_18]
lea rdi, [rsp+2F8h+var_1B0]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
jmp short $+2
loc_D8831:
mov rdi, [rsp+2F8h+var_2E8]
lea rsi, [rsp+2F8h+var_1B0]
call _ZNSt6vectorIN5minja5ValueESaIS1_EE9push_backEOS1_; std::vector<minja::Value>::push_back(minja::Value&&)
jmp short $+2
loc_D8845:
lea rdi, [rsp+2F8h+var_1B0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_D8852:
lea rdi, [rsp+2F8h+var_30]
call _ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN5minja10ExpressionEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(void)
jmp loc_D846D
loc_D8864:
lea rdi, [rsp+arg_2A0]
call _ZNSt10shared_ptrIN5minja11UnaryOpExprEED2Ev; std::shared_ptr<minja::UnaryOpExpr>::~shared_ptr()
jmp loc_D8A5A
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
jmp loc_D8A5A
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
lea rdi, [rsp+arg_140]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp loc_D8A5A
loc_D88B5:
mov rax, [rsp+2F8h+var_2A8]
add rax, 18h
mov [rsp+2F8h+var_1B8], rax
mov rdi, [rsp+2F8h+var_1B8]
call _ZNKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EE5beginEv; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::begin(void)
mov [rsp+2F8h+var_1C0], rax
mov rdi, [rsp+2F8h+var_1B8]
call _ZNKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EE3endEv; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::end(void)
mov [rsp+2F8h+var_1C8], rax
loc_D88F0:
lea rdi, [rsp+2F8h+var_1C0]
lea rsi, [rsp+2F8h+var_1C8]
call _ZN9__gnu_cxxneIPKSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESt6vectorISC_SaISC_EEEEbRKNS_17__normal_iteratorIT_T0_EESN_; __gnu_cxx::operator!=<std::pair<std::string,std::shared_ptr<minja::Expression>> const*,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string,std::shared_ptr<minja::Expression>> const*,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string,std::shared_ptr<minja::Expression>> const*,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>> const&)
test al, 1
jnz short loc_D890E
jmp loc_D8A26
loc_D890E:
lea rdi, [rsp+2F8h+var_1C0]
call _ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESt6vectorISC_SaISC_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<std::string,std::shared_ptr<minja::Expression>> const*,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>>::operator*(void)
mov [rsp+2F8h+var_1D0], rax
mov rdi, [rsp+2F8h+var_1D0]
call _ZSt3getILm0ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_; std::get<0ul,std::string,std::shared_ptr<minja::Expression>>(std::pair<std::string,std::shared_ptr<minja::Expression>> const&)
mov [rsp+2F8h+var_1D8], rax
mov rdi, [rsp+2F8h+var_1D0]
call _ZSt3getILm1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKSE_; std::get<1ul,std::string,std::shared_ptr<minja::Expression>>(std::pair<std::string,std::shared_ptr<minja::Expression>> const&)
mov rcx, rax
mov rax, [rsp+2F8h+var_2B8]
mov [rsp+2F8h+var_1E0], rcx
add rax, 18h
mov [rsp+2F8h+var_2F8], rax
mov rax, [rsp+2F8h+var_1D8]
mov [rsp+2F8h+var_2F0], rax
mov rdi, [rsp+2F8h+var_1E0]
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+2F8h+var_18]
lea rdi, [rsp+2F8h+var_2A0]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
jmp short $+2
loc_D898E:
mov rsi, [rsp+2F8h+var_2F0]
lea rdi, [rsp+2F8h+var_250]
lea rdx, [rsp+2F8h+var_2A0]
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_
jmp short $+2
loc_D89A7:
mov rdi, [rsp+2F8h+var_2F8]
lea rsi, [rsp+2F8h+var_250]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EE9push_backEOS9_; std::vector<std::pair<std::string,minja::Value>>::push_back(std::pair<std::string,minja::Value>&&)
jmp short $+2
loc_D89BA:
lea rdi, [rsp+2F8h+var_250]
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair()
lea rdi, [rsp+2F8h+var_2A0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
lea rdi, [rsp+2F8h+var_1C0]
call _ZN9__gnu_cxx17__normal_iteratorIPKSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESt6vectorISC_SaISC_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string,std::shared_ptr<minja::Expression>> const*,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>>::operator++(void)
jmp loc_D88F0
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
jmp short loc_D8A1A
mov rcx, rax
mov eax, edx
mov [rsp+arg_248], rcx
mov [rsp+arg_244], eax
lea rdi, [rsp+arg_A0]
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair()
loc_D8A1A:
lea rdi, [rsp+arg_50]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_D8A5A
loc_D8A26:
mov [rsp+2F8h+var_19], 1
mov [rsp+2F8h+var_DC], 1
test [rsp+2F8h+var_19], 1
jnz short loc_D8A4D
mov rdi, [rsp+2F8h+var_2B8]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
loc_D8A4D:
mov rax, [rsp+2F8h+var_2B0]
add rsp, 2F8h
retn
loc_D8A5A:
mov rdi, [rsp+arg_38]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
mov rdi, [rsp+arg_248]
call __Unwind_Resume
loc_D8A71:
nop word ptr [rax+rax+00000000h]
nop dword ptr [rax+rax+00h]
| minja::ArgumentsValue * minja::ArgumentsExpression::evaluate(
minja::ArgumentsValue *a1,
long long a2,
long long a3)
{
long long v3; // rax
void (***v4)(void); // rax
long long v5; // rax
void (***v6)(void); // rax
void (***v7)(void); // rax
void (***v8)(void); // rax
long long v10; // [rsp+8h] [rbp-2F0h]
std::runtime_error *v11; // [rsp+28h] [rbp-2D0h]
std::runtime_error *exception; // [rsp+38h] [rbp-2C0h]
_BYTE v13[80]; // [rsp+58h] [rbp-2A0h] BYREF
_BYTE v14[112]; // [rsp+A8h] [rbp-250h] BYREF
long long v15; // [rsp+118h] [rbp-1E0h]
long long v16; // [rsp+120h] [rbp-1D8h]
long long v17; // [rsp+128h] [rbp-1D0h]
long long v18; // [rsp+130h] [rbp-1C8h] BYREF
_QWORD v19[2]; // [rsp+138h] [rbp-1C0h] BYREF
_BYTE v20[80]; // [rsp+148h] [rbp-1B0h] BYREF
_QWORD v21[2]; // [rsp+198h] [rbp-160h] BYREF
_BYTE v22[32]; // [rsp+1A8h] [rbp-150h] BYREF
_BYTE v23[84]; // [rsp+1C8h] [rbp-130h] BYREF
int v24; // [rsp+21Ch] [rbp-DCh]
minja::ArgumentsValue *v25; // [rsp+220h] [rbp-D8h] BYREF
_BYTE v26[48]; // [rsp+228h] [rbp-D0h] BYREF
_BYTE v27[80]; // [rsp+258h] [rbp-A0h] BYREF
_BYTE v28[16]; // [rsp+2A8h] [rbp-50h] BYREF
long long v29; // [rsp+2B8h] [rbp-40h]
long long v30; // [rsp+2C0h] [rbp-38h] BYREF
_QWORD v31[2]; // [rsp+2C8h] [rbp-30h] BYREF
char v32; // [rsp+2DFh] [rbp-19h]
long long v33; // [rsp+2E0h] [rbp-18h]
long long v34; // [rsp+2E8h] [rbp-10h]
minja::ArgumentsValue *v35; // [rsp+2F0h] [rbp-8h]
v35 = a1;
v34 = a2;
v33 = a3;
v32 = 0;
minja::ArgumentsValue::ArgumentsValue(a1);
v31[1] = a2;
v31[0] = std::vector<std::shared_ptr<minja::Expression>>::begin(a2);
v30 = std::vector<std::shared_ptr<minja::Expression>>::end(a2);
while ( __gnu_cxx::operator!=<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>(
(long long)v31,
(long long)&v30) )
{
v29 = __gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator*((long long)v31);
std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>(v28, v29);
if ( (std::__shared_ptr<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2>::operator bool(v28) & 1) == 0 )
goto LABEL_12;
if ( *(_DWORD *)(std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v28)
+ 48) == 3 )
{
v3 = std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v28);
v4 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v3 + 32);
minja::Expression::evaluate((long long)v27, v4);
if ( !minja::Value::is_array((minja::Value *)v27) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expansion operator only supported on arrays");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v25 = a1;
std::function<void ()(minja::Value &)>::function<minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>(
v26,
&v25);
minja::Value::for_each(v27, v26);
std::function<void ()(minja::Value &)>::~function(v26);
v24 = 3;
minja::Value::~Value((minja::Value *)v27);
}
else
{
if ( *(_DWORD *)(std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v28)
+ 48) != 4 )
{
LABEL_12:
v24 = 0;
goto LABEL_13;
}
v5 = std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v28);
v6 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v5 + 32);
minja::Expression::evaluate((long long)v23, v6);
if ( !minja::Value::is_object((minja::Value *)v23) )
{
v11 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v11, "ExpansionDict operator only supported on objects");
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v21[0] = a1;
v21[1] = v23;
std::function<void ()(minja::Value &)>::function<minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1},void>(
v22,
v21);
minja::Value::for_each(v23, v22);
std::function<void ()(minja::Value &)>::~function(v22);
v24 = 3;
minja::Value::~Value((minja::Value *)v23);
}
LABEL_13:
std::shared_ptr<minja::UnaryOpExpr>::~shared_ptr((long long)v28);
if ( !v24 )
{
v7 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v29);
minja::Expression::evaluate((long long)v20, v7);
std::vector<minja::Value>::push_back((long long)a1, (long long)v20);
minja::Value::~Value((minja::Value *)v20);
}
__gnu_cxx::__normal_iterator<std::shared_ptr<minja::Expression> const*,std::vector<std::shared_ptr<minja::Expression>>>::operator++(v31);
}
v19[1] = a2 + 24;
v19[0] = std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::begin(a2 + 24);
v18 = std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::end(a2 + 24);
while ( (__gnu_cxx::operator!=<std::pair<std::string,std::shared_ptr<minja::Expression>> const*,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>>(
v19,
&v18) & 1) != 0 )
{
v17 = __gnu_cxx::__normal_iterator<std::pair<std::string,std::shared_ptr<minja::Expression>> const*,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>>::operator*(v19);
v16 = std::get<0ul,std::string,std::shared_ptr<minja::Expression>>(v17);
v15 = std::get<1ul,std::string,std::shared_ptr<minja::Expression>>(v17);
v10 = v16;
v8 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v15);
minja::Expression::evaluate((long long)v13, v8);
ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_(
v14,
v10,
v13);
std::vector<std::pair<std::string,minja::Value>>::push_back((char *)a1 + 24, v14);
std::pair<std::string,minja::Value>::~pair(v14);
minja::Value::~Value((minja::Value *)v13);
__gnu_cxx::__normal_iterator<std::pair<std::string,std::shared_ptr<minja::Expression>> const*,std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>>::operator++(v19);
}
return a1;
}
| evaluate:
SUB RSP,0x2f8
MOV qword ptr [RSP + 0x40],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x2f0],RDI
MOV qword ptr [RSP + 0x2e8],RSI
MOV qword ptr [RSP + 0x2e0],RDX
MOV RAX,qword ptr [RSP + 0x2e8]
MOV qword ptr [RSP + 0x50],RAX
MOV byte ptr [RSP + 0x2df],0x0
CALL 0x001da590
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x2d0],RAX
MOV RDI,qword ptr [RSP + 0x2d0]
CALL 0x001cd800
MOV qword ptr [RSP + 0x2c8],RAX
MOV RDI,qword ptr [RSP + 0x2d0]
CALL 0x001cd830
MOV qword ptr [RSP + 0x2c0],RAX
LAB_001d846d:
LEA RDI,[RSP + 0x2c8]
LEA RSI,[RSP + 0x2c0]
CALL 0x001cd860
TEST AL,0x1
JNZ 0x001d848b
JMP 0x001d88b5
LAB_001d848b:
LEA RDI,[RSP + 0x2c8]
CALL 0x001cd8a0
MOV qword ptr [RSP + 0x2b8],RAX
MOV RSI,qword ptr [RSP + 0x2b8]
LEA RDI,[RSP + 0x2a8]
CALL 0x001da5c0
LEA RDI,[RSP + 0x2a8]
CALL 0x001da660
TEST AL,0x1
JNZ 0x001d84cb
JMP 0x001d87d9
LAB_001d84cb:
LEA RDI,[RSP + 0x2a8]
CALL 0x001da680
CMP dword ptr [RAX + 0x30],0x3
JNZ 0x001d8657
LEA RDI,[RSP + 0x2a8]
CALL 0x001da680
MOV RDI,RAX
ADD RDI,0x20
CALL 0x0019f2f0
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x2e0]
LAB_001d8506:
LEA RDI,[RSP + 0x258]
CALL 0x0019f300
LAB_001d8513:
JMP 0x001d8515
LAB_001d8515:
LEA RDI,[RSP + 0x258]
CALL 0x001a4990
TEST AL,0x1
JNZ 0x001d85bf
MOV EDI,0x10
CALL 0x00150540
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x38],RAX
LAB_001d853f:
LEA RSI,[0x2d19d5]
CALL 0x00150340
JMP 0x001d854d
LAB_001d854d:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [0x00353fb0]
MOV RDX,qword ptr [0x00353f78]
CALL 0x001508f0
LAB_001d85bf:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x220],RAX
LEA RDI,[RSP + 0x228]
MOV qword ptr [RSP + 0x30],RDI
LEA RSI,[RSP + 0x220]
CALL 0x001dab90
MOV RSI,qword ptr [RSP + 0x30]
LAB_001d85eb:
LEA RDI,[RSP + 0x258]
CALL 0x001da690
JMP 0x001d85fa
LAB_001d85fa:
LEA RDI,[RSP + 0x228]
CALL 0x001dac20
MOV dword ptr [RSP + 0x21c],0x3
LEA RDI,[RSP + 0x258]
CALL 0x0019f7a0
JMP 0x001d87e4
LAB_001d8657:
LEA RDI,[RSP + 0x2a8]
CALL 0x001da680
CMP dword ptr [RAX + 0x30],0x4
JNZ 0x001d87d5
LEA RDI,[RSP + 0x2a8]
CALL 0x001da680
MOV RDI,RAX
ADD RDI,0x20
CALL 0x0019f2f0
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x2e0]
LAB_001d8692:
LEA RDI,[RSP + 0x1c8]
CALL 0x0019f300
LAB_001d869f:
JMP 0x001d86a1
LAB_001d86a1:
LEA RDI,[RSP + 0x1c8]
CALL 0x001a5180
TEST AL,0x1
JNZ 0x001d872e
MOV EDI,0x10
CALL 0x00150540
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x28],RAX
LAB_001d86c7:
LEA RSI,[0x2d1a01]
CALL 0x00150340
JMP 0x001d86d5
LAB_001d86d5:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [0x00353fb0]
MOV RDX,qword ptr [0x00353f78]
CALL 0x001508f0
LAB_001d872e:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x198],RAX
LEA RAX,[RSP + 0x1c8]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x1a0],RAX
LEA RDI,[RSP + 0x1a8]
MOV qword ptr [RSP + 0x20],RDI
LEA RSI,[RSP + 0x198]
CALL 0x001dac30
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
LAB_001d8774:
CALL 0x001da690
JMP 0x001d877b
LAB_001d877b:
LEA RDI,[RSP + 0x1a8]
CALL 0x001dac20
MOV dword ptr [RSP + 0x21c],0x3
LEA RDI,[RSP + 0x1c8]
CALL 0x0019f7a0
JMP 0x001d87e4
LAB_001d87d5:
JMP 0x001d87d7
LAB_001d87d7:
JMP 0x001d87d9
LAB_001d87d9:
MOV dword ptr [RSP + 0x21c],0x0
LAB_001d87e4:
LEA RDI,[RSP + 0x2a8]
CALL 0x0019de00
MOV EAX,dword ptr [RSP + 0x21c]
TEST EAX,EAX
JZ 0x001d8800
JMP 0x001d87fe
LAB_001d87fe:
JMP 0x001d8852
LAB_001d8800:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x2b8]
CALL 0x0019f2f0
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x2e0]
LAB_001d8822:
LEA RDI,[RSP + 0x148]
CALL 0x0019f300
JMP 0x001d8831
LAB_001d8831:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x148]
CALL 0x001c7180
JMP 0x001d8845
LAB_001d8845:
LEA RDI,[RSP + 0x148]
CALL 0x0019f7a0
LAB_001d8852:
LEA RDI,[RSP + 0x2c8]
CALL 0x001cd9e0
JMP 0x001d846d
LAB_001d88b5:
MOV RAX,qword ptr [RSP + 0x50]
ADD RAX,0x18
MOV qword ptr [RSP + 0x140],RAX
MOV RDI,qword ptr [RSP + 0x140]
CALL 0x001dacc0
MOV qword ptr [RSP + 0x138],RAX
MOV RDI,qword ptr [RSP + 0x140]
CALL 0x001dacf0
MOV qword ptr [RSP + 0x130],RAX
LAB_001d88f0:
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0x130]
CALL 0x001dad20
TEST AL,0x1
JNZ 0x001d890e
JMP 0x001d8a26
LAB_001d890e:
LEA RDI,[RSP + 0x138]
CALL 0x001dad60
MOV qword ptr [RSP + 0x128],RAX
MOV RDI,qword ptr [RSP + 0x128]
CALL 0x001dad70
MOV qword ptr [RSP + 0x120],RAX
MOV RDI,qword ptr [RSP + 0x128]
CALL 0x001dad80
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x118],RCX
ADD RAX,0x18
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0019f2f0
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x2e0]
LAB_001d8982:
LEA RDI,[RSP + 0x58]
CALL 0x0019f300
JMP 0x001d898e
LAB_001d898e:
MOV RSI,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0xa8]
LEA RDX,[RSP + 0x58]
CALL 0x001dadc0
JMP 0x001d89a7
LAB_001d89a7:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0xa8]
CALL 0x001dad90
LAB_001d89b8:
JMP 0x001d89ba
LAB_001d89ba:
LEA RDI,[RSP + 0xa8]
CALL 0x001dae00
LEA RDI,[RSP + 0x58]
CALL 0x0019f7a0
LEA RDI,[RSP + 0x138]
CALL 0x001dae30
JMP 0x001d88f0
LAB_001d8a26:
MOV byte ptr [RSP + 0x2df],0x1
MOV dword ptr [RSP + 0x21c],0x1
TEST byte ptr [RSP + 0x2df],0x1
JNZ 0x001d8a4d
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x001da560
LAB_001d8a4d:
MOV RAX,qword ptr [RSP + 0x48]
ADD RSP,0x2f8
RET
|
/* WARNING: Removing unreachable block (ram,0x001d8a43) */
/* minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::ArgumentsExpression::evaluate(shared_ptr *param_1)
{
type *ptVar1;
bool bVar2;
long lVar3;
ulong uVar4;
runtime_error *prVar5;
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*in_RSI;
shared_ptr local_2a0 [80];
pair local_250 [112];
type *local_1e0;
type *local_1d8;
pair *local_1d0;
int8 local_1c8;
int8 local_1c0;
vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
*local_1b8;
shared_ptr local_1b0 [80];
shared_ptr *local_160;
Value *local_158;
function<void(minja::Value&)> local_150 [32];
shared_ptr local_130 [84];
int local_dc;
shared_ptr *local_d8;
function<void(minja::Value&)> local_d0 [48];
shared_ptr local_a0 [80];
shared_ptr local_50 [16];
__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false> *local_40;
int8 local_38;
int8 local_30;
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*local_28;
int1 local_19;
shared_ptr *local_8;
local_19 = 0;
local_8 = param_1;
ArgumentsValue::ArgumentsValue((ArgumentsValue *)param_1);
local_28 = in_RSI;
local_30 = std::
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
::begin(in_RSI);
local_38 = std::
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
::end(local_28);
do {
bVar2 = __gnu_cxx::operator!=((__normal_iterator *)&local_30,(__normal_iterator *)&local_38);
if (!bVar2) {
local_1b8 = (vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
*)(in_RSI + 0x18);
local_1c0 = std::
vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
::begin(local_1b8);
local_1c8 = std::
vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
::end(local_1b8);
while (bVar2 = __gnu_cxx::operator!=
((__normal_iterator *)&local_1c0,(__normal_iterator *)&local_1c8),
bVar2) {
local_1d0 = (pair *)__gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>const*,std::vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>>
::operator*((__normal_iterator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>const*,std::vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>>
*)&local_1c0);
local_1d8 = std::get<0ul,std::__cxx11::string,std::shared_ptr<minja::Expression>>(local_1d0)
;
local_1e0 = std::get<1ul,std::__cxx11::string,std::shared_ptr<minja::Expression>>(local_1d0)
;
ptVar1 = local_1d8;
std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false> *)
local_1e0);
/* try { // try from 001d8982 to 001d898b has its CatchHandler @ 001d8876 */
Expression::evaluate(local_2a0);
/* try { // try from 001d898e to 001d89a4 has its CatchHandler @ 001d89e3 */
_ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_
(local_250,ptVar1,local_2a0);
/* try { // try from 001d89a7 to 001d89b7 has its CatchHandler @ 001d89f9 */
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::push_back((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
*)(param_1 + 0x18),local_250);
std::pair<std::__cxx11::string,minja::Value>::~pair
((pair<std::__cxx11::string,minja::Value> *)local_250);
Value::~Value((Value *)local_2a0);
__gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>const*,std::vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>>
::operator++((__normal_iterator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>const*,std::vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>>
*)&local_1c0);
}
return param_1;
}
local_40 = (__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false> *)
__gnu_cxx::
__normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>>
::operator*((__normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>>
*)&local_30);
std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>(local_50);
bVar2 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)local_50);
if (bVar2) {
lVar3 = std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>
*)local_50);
if (*(int *)(lVar3 + 0x30) == 3) {
lVar3 = std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->((__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>
*)local_50);
std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false> *)
(lVar3 + 0x20));
/* try { // try from 001d8506 to 001d8512 has its CatchHandler @ 001d856a */
Expression::evaluate(local_a0);
uVar4 = Value::is_array((Value *)local_a0);
if ((uVar4 & 1) == 0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001d853f to 001d854a has its CatchHandler @ 001d8583 */
std::runtime_error::runtime_error(prVar5,"Expansion operator only supported on arrays");
/* try { // try from 001d854d to 001d8564 has its CatchHandler @ 001d85a6 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78);
}
local_d8 = param_1;
std::function<void(minja::Value&)>::
function<minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(minja::Value&)_1_,void>
(local_d0,(_lambda_minja__Value___1_ *)&local_d8);
/* try { // try from 001d85eb to 001d85f7 has its CatchHandler @ 001d8624 */
Value::for_each((Value *)local_a0,(function *)local_d0);
std::function<void(minja::Value&)>::~function(local_d0);
local_dc = 3;
Value::~Value((Value *)local_a0);
}
else {
lVar3 = std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->((__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>
*)local_50);
if (*(int *)(lVar3 + 0x30) != 4) goto LAB_001d87d9;
lVar3 = std::__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->((__shared_ptr_access<minja::UnaryOpExpr,(__gnu_cxx::_Lock_policy)2,false,false>
*)local_50);
std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false> *)
(lVar3 + 0x20));
/* try { // try from 001d8692 to 001d869e has its CatchHandler @ 001d856a */
Expression::evaluate(local_130);
uVar4 = Value::is_object((Value *)local_130);
if ((uVar4 & 1) == 0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001d86c7 to 001d86d2 has its CatchHandler @ 001d86f2 */
std::runtime_error::runtime_error
(prVar5,"ExpansionDict operator only supported on objects");
/* try { // try from 001d86d5 to 001d86ec has its CatchHandler @ 001d8715 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78);
}
local_160 = param_1;
local_158 = (Value *)local_130;
std::function<void(minja::Value&)>::
function<minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(minja::Value_const&)_1_,void>
(local_150,(_lambda_minja__Value_const___1_ *)&local_160);
/* try { // try from 001d8774 to 001d8778 has its CatchHandler @ 001d87a2 */
Value::for_each((Value *)local_130,(function *)local_150);
std::function<void(minja::Value&)>::~function(local_150);
local_dc = 3;
Value::~Value((Value *)local_130);
}
}
else {
LAB_001d87d9:
local_dc = 0;
}
std::shared_ptr<minja::UnaryOpExpr>::~shared_ptr((shared_ptr<minja::UnaryOpExpr> *)local_50);
if (local_dc == 0) {
std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->
(local_40);
/* try { // try from 001d8822 to 001d882e has its CatchHandler @ 001d8876 */
Expression::evaluate(local_1b0);
/* try { // try from 001d8831 to 001d8842 has its CatchHandler @ 001d888f */
std::vector<minja::Value,std::allocator<minja::Value>>::push_back
((vector<minja::Value,std::allocator<minja::Value>> *)param_1,(Value *)local_1b0);
Value::~Value((Value *)local_1b0);
}
__gnu_cxx::
__normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>>
::operator++((__normal_iterator<std::shared_ptr<minja::Expression>const*,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>>
*)&local_30);
} while( true );
}
| |
44,680 | mi_uniquedef_write | eloqsql/storage/myisam/mi_open.c | uint mi_uniquedef_write(File file, MI_UNIQUEDEF *def)
{
uchar buff[MI_UNIQUEDEF_SIZE];
uchar *ptr=buff;
mi_int2store(ptr,def->keysegs); ptr+=2;
*ptr++= (uchar) def->key;
*ptr++ = (uchar) def->null_are_equal;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O3 | c | mi_uniquedef_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movzwl (%rsi), %eax
rolw $0x8, %ax
movl %edi, %ebx
movw %ax, -0x1c(%rbp)
movb 0x2(%rsi), %al
movb %al, -0x1a(%rbp)
movb 0x3(%rsi), %al
movb %al, -0x19(%rbp)
leaq 0x2f8819(%rip), %rax # 0x32fe50
movq (%rax), %rax
leaq -0x70(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x3768a
leaq -0x1c(%rbp), %rsi
movl $0x4, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2a351
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %cl
movq %fs:0x28, %rdx
cmpq -0x18(%rbp), %rdx
jne 0x376a4
movb %cl, %al
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x1c(%rbp), %rdx
leaq -0x28(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2965f
movq (%r14), %rcx
jmp 0x37668
callq 0x283f0
| mi_uniquedef_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov rax, fs:28h
mov [rbp+var_18], rax
movzx eax, word ptr [rsi]
rol ax, 8
mov ebx, edi
mov [rbp+var_1C], ax
mov al, [rsi+2]
mov [rbp+var_1A], al
mov al, [rsi+3]
mov [rbp+var_19], al
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_70]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_3768A
lea rsi, [rbp+var_1C]
mov edx, 4
mov ecx, 4
mov edi, ebx
call my_write
mov rcx, rax
loc_37668:
xor eax, eax
test rcx, rcx
setnz cl
mov rdx, fs:28h
cmp rdx, [rbp+var_18]
jnz short loc_376A4
mov al, cl
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_3768A:
lea rdx, [rbp+var_1C]
lea r14, [rbp+var_28]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call mi_uniquedef_write_cold_1
mov rcx, [r14]
jmp short loc_37668
loc_376A4:
call ___stack_chk_fail
| bool mi_uniquedef_write(unsigned int a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
_BYTE v6[72]; // [rsp+0h] [rbp-70h] BYREF
long long v7; // [rsp+48h] [rbp-28h] BYREF
__int16 v8; // [rsp+54h] [rbp-1Ch] BYREF
char v9; // [rsp+56h] [rbp-1Ah]
char v10; // [rsp+57h] [rbp-19h]
unsigned long long v11; // [rsp+58h] [rbp-18h]
v11 = __readfsqword(0x28u);
v8 = __ROL2__(*(_WORD *)a2, 8);
v9 = *(_BYTE *)(a2 + 2);
v10 = *(_BYTE *)(a2 + 3);
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a1, 7LL);
if ( v2 )
{
mi_uniquedef_write_cold_1(v2, a1, (long long)&v8, &v7);
v3 = v7;
}
else
{
v3 = my_write(a1, (long long)&v8, 4LL, 4LL);
}
return v3 != 0;
}
| mi_uniquedef_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOVZX EAX,word ptr [RSI]
ROL AX,0x8
MOV EBX,EDI
MOV word ptr [RBP + -0x1c],AX
MOV AL,byte ptr [RSI + 0x2]
MOV byte ptr [RBP + -0x1a],AL
MOV AL,byte ptr [RSI + 0x3]
MOV byte ptr [RBP + -0x19],AL
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x70]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0013768a
LEA RSI,[RBP + -0x1c]
MOV EDX,0x4
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012a351
MOV RCX,RAX
LAB_00137668:
XOR EAX,EAX
TEST RCX,RCX
SETNZ CL
MOV RDX,qword ptr FS:[0x28]
CMP RDX,qword ptr [RBP + -0x18]
JNZ 0x001376a4
MOV AL,CL
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_0013768a:
LEA RDX,[RBP + -0x1c]
LEA R14,[RBP + -0x28]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012965f
MOV RCX,qword ptr [R14]
JMP 0x00137668
LAB_001376a4:
CALL 0x001283f0
|
bool mi_uniquedef_write(int4 param_1,ushort *param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_78 [72];
long local_30;
ushort local_24;
int1 local_22;
int1 local_21;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_24 = *param_2 << 8 | *param_2 >> 8;
local_22 = (int1)param_2[1];
local_21 = *(int1 *)((long)param_2 + 3);
lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1,7);
if (lVar1 == 0) {
local_30 = my_write(param_1,&local_24,4,4);
}
else {
mi_uniquedef_write_cold_1(lVar1,param_1,&local_24,&local_30);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_30 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
44,681 | engine_swap | qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/engine.c | int32_t
engine_swap (PENGINE_T engine)
{
DBG_ENGINE_ASSERT (engine, "engine_swap unexpected!") ;
engine_port_lock () ;
uint32_t tmp = engine->stack[engine->stack_idx] ;
engine->stack[engine->stack_idx] = engine->reg[0] ;
engine->reg[ENGINE_VARIABLE_ACCUMULATOR] = tmp ;
engine_port_unlock () ;
return ENGINE_OK ;
} | O0 | c | engine_swap:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x136af
leaq 0x20eb6(%rip), %rdi # 0x34560
callq 0x132f0
callq 0x121c0
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0xc0(%rcx), %rcx
movl 0xa0(%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %edx
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0xc0(%rcx), %rcx
movl %edx, 0xa0(%rax,%rcx,4)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8c(%rax)
callq 0x121e0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| engine_swap:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jnz short loc_136AF
lea rdi, aEngineSwapUnex; "engine_swap unexpected!"
call qoraal_debug_assert_1
loc_136AF:
call engine_port_lock
mov rax, [rbp+var_8]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+0C0h]
mov eax, [rax+rcx*4+0A0h]
mov [rbp+var_C], eax
mov rax, [rbp+var_8]
mov edx, [rax+8Ch]
mov rax, [rbp+var_8]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+0C0h]
mov [rax+rcx*4+0A0h], edx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+8Ch], ecx
call engine_port_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long engine_swap(long long a1)
{
int v2; // [rsp+4h] [rbp-Ch]
if ( !a1 )
qoraal_debug_assert_1((long long)aEngineSwapUnex);
engine_port_lock();
v2 = *(_DWORD *)(a1 + 4LL * *(int *)(a1 + 192) + 160);
*(_DWORD *)(a1 + 4LL * *(int *)(a1 + 192) + 160) = *(_DWORD *)(a1 + 140);
*(_DWORD *)(a1 + 140) = v2;
engine_port_unlock();
return 0LL;
}
| engine_swap:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x001136af
LEA RDI,[0x134560]
CALL 0x001132f0
LAB_001136af:
CALL 0x001121c0
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0xc0]
MOV EAX,dword ptr [RAX + RCX*0x4 + 0xa0]
MOV dword ptr [RBP + -0xc],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x8c]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0xc0]
MOV dword ptr [RAX + RCX*0x4 + 0xa0],EDX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],ECX
CALL 0x001121e0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 engine_swap(long param_1)
{
int4 uVar1;
if (param_1 == 0) {
qoraal_debug_assert(s_engine_swap_unexpected__00134560);
}
engine_port_lock();
uVar1 = *(int4 *)(param_1 + 0xa0 + (long)*(int *)(param_1 + 0xc0) * 4);
*(int4 *)(param_1 + 0xa0 + (long)*(int *)(param_1 + 0xc0) * 4) =
*(int4 *)(param_1 + 0x8c);
*(int4 *)(param_1 + 0x8c) = uVar1;
engine_port_unlock();
return 0;
}
| |
44,682 | rw_pr_rdlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_rdlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
/*
The fact that we were able to acquire 'lock' mutex means
that there are no active writers and we can acquire rd-lock.
Increment active readers counter to prevent requests for
wr-lock from succeeding and unlock mutex.
*/
rwlock->active_readers++;
pthread_mutex_unlock(&rwlock->lock);
return 0;
} | O0 | c | rw_pr_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a220
movq -0x8(%rbp), %rax
movl 0x58(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rdi
callq 0x2a1f0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rw_pr_rdlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
mov ecx, [rax+58h]
add ecx, 1
mov [rax+58h], ecx
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long rw_pr_rdlock(long long a1)
{
pthread_mutex_lock(a1);
++*(_DWORD *)(a1 + 88);
pthread_mutex_unlock(a1);
return 0LL;
}
| rw_pr_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a220
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x58]
ADD ECX,0x1
MOV dword ptr [RAX + 0x58],ECX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a1f0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 rw_pr_rdlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
*(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1;
pthread_mutex_unlock(param_1);
return 0;
}
| |
44,683 | ImPlot3DNextItemData::Reset() | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d_internal.h | void Reset() {
for (int i = 0; i < 4; i++)
Colors[i] = IMPLOT3D_AUTO_COL;
LineWeight = IMPLOT3D_AUTO;
Marker = IMPLOT3D_AUTO;
MarkerSize = IMPLOT3D_AUTO;
MarkerWeight = IMPLOT3D_AUTO;
FillAlpha = IMPLOT3D_AUTO;
RenderLine = false;
RenderFill = false;
RenderMarkerLine = true;
RenderMarkerFill = true;
IsAutoFill = true;
IsAutoLine = true;
Hidden = false;
} | O1 | c | ImPlot3DNextItemData::Reset():
xorl %eax, %eax
movaps 0x23eb61(%rip), %xmm0 # 0x2945a0
movups %xmm0, 0x10(%rdi,%rax)
movups %xmm0, (%rdi,%rax)
addq $0x20, %rax
cmpq $0x40, %rax
jne 0x55a3f
movq $-0x40800000, 0x40(%rdi) # imm = 0xBF800000
movsd 0x23ec4e(%rip), %xmm0 # 0x2946b0
movsd %xmm0, 0x48(%rdi)
movl $0xbf800000, 0x50(%rdi) # imm = 0xBF800000
movw $0x0, 0x54(%rdi)
movl $0x1010101, 0x56(%rdi) # imm = 0x1010101
movb $0x0, 0x5a(%rdi)
retq
| _ZN20ImPlot3DNextItemData5ResetEv:
xor eax, eax
movaps xmm0, cs:xmmword_2945A0
loc_55A3F:
movups xmmword ptr [rdi+rax+10h], xmm0
movups xmmword ptr [rdi+rax], xmm0
add rax, 20h ; ' '
cmp rax, 40h ; '@'
jnz short loc_55A3F
mov qword ptr [rdi+40h], 0FFFFFFFFBF800000h
movsd xmm0, qword ptr cs:xmmword_2946B0
movsd qword ptr [rdi+48h], xmm0
mov dword ptr [rdi+50h], 0BF800000h
mov word ptr [rdi+54h], 0
mov dword ptr [rdi+56h], 1010101h
mov byte ptr [rdi+5Ah], 0
retn
| long long ImPlot3DNextItemData::Reset(ImPlot3DNextItemData *this)
{
long long result; // rax
for ( result = 0LL; result != 64; result += 32LL )
{
*(_OWORD *)((char *)this + result + 16) = xmmword_2945A0;
*(_OWORD *)((char *)this + result) = xmmword_2945A0;
}
*((_QWORD *)this + 8) = -1082130432LL;
*((_QWORD *)this + 9) = 0xBF800000BF800000LL;
*((_DWORD *)this + 20) = -1082130432;
*((_WORD *)this + 42) = 0;
*(_DWORD *)((char *)this + 86) = 16843009;
*((_BYTE *)this + 90) = 0;
return result;
}
| Reset:
XOR EAX,EAX
MOVAPS XMM0,xmmword ptr [0x003945a0]
LAB_00155a3f:
MOVUPS xmmword ptr [RDI + RAX*0x1 + 0x10],XMM0
MOVUPS xmmword ptr [RDI + RAX*0x1],XMM0
ADD RAX,0x20
CMP RAX,0x40
JNZ 0x00155a3f
MOV qword ptr [RDI + 0x40],-0x40800000
MOVSD XMM0,qword ptr [0x003946b0]
MOVSD qword ptr [RDI + 0x48],XMM0
MOV dword ptr [RDI + 0x50],0xbf800000
MOV word ptr [RDI + 0x54],0x0
MOV dword ptr [RDI + 0x56],0x1010101
MOV byte ptr [RDI + 0x5a],0x0
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ImPlot3DNextItemData::Reset() */
void __thiscall ImPlot3DNextItemData::Reset(ImPlot3DNextItemData *this)
{
int8 uVar1;
int8 uVar2;
long lVar3;
uVar2 = _UNK_003945a8;
uVar1 = _DAT_003945a0;
lVar3 = 0;
do {
*(int8 *)(this + lVar3 + 0x10) = uVar1;
*(int8 *)(this + lVar3 + 0x10 + 8) = uVar2;
*(int8 *)(this + lVar3) = uVar1;
*(int8 *)(this + lVar3 + 8) = uVar2;
lVar3 = lVar3 + 0x20;
} while (lVar3 != 0x40);
*(int8 *)(this + 0x40) = 0xffffffffbf800000;
*(int8 *)(this + 0x48) = DAT_003946b0;
*(int4 *)(this + 0x50) = 0xbf800000;
*(int2 *)(this + 0x54) = 0;
*(int4 *)(this + 0x56) = 0x1010101;
this[0x5a] = (ImPlot3DNextItemData)0x0;
return;
}
| |
44,684 | ma_end_block_record | eloqsql/storage/maria/ma_blockrec.c | void _ma_end_block_record(MARIA_HA *info)
{
DBUG_ENTER("_ma_end_block_record");
my_free(info->cur_row.empty_bits);
delete_dynamic(&info->bitmap_blocks);
my_free(info->cur_row.extents);
my_free(info->blob_buff);
/*
The data file is closed, when needed, in ma_once_end_block_record().
The following protects us from doing an extra, not allowed, close
in maria_close()
*/
info->dfile.file= -1;
DBUG_VOID_RETURN;
} | O0 | c | ma_end_block_record:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rdi
callq 0xf3ba0
movq -0x8(%rbp), %rdi
addq $0x2c0, %rdi # imm = 0x2C0
callq 0xdab40
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0xf3ba0
movq -0x8(%rbp), %rax
movq 0x3a8(%rax), %rdi
callq 0xf3ba0
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x480(%rax) # imm = 0xFFFFFFFF
jmp 0x54cec
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_end_block_record:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rdi, [rax+0C8h]
call my_free
mov rdi, [rbp+var_8]
add rdi, 2C0h
call delete_dynamic
mov rax, [rbp+var_8]
mov rdi, [rax+90h]
call my_free
mov rax, [rbp+var_8]
mov rdi, [rax+3A8h]
call my_free
mov rax, [rbp+var_8]
mov dword ptr [rax+480h], 0FFFFFFFFh
jmp short $+2
loc_54CEC:
add rsp, 10h
pop rbp
retn
| long long ma_end_block_record(long long a1)
{
long long result; // rax
my_free(*(_QWORD *)(a1 + 200));
delete_dynamic(a1 + 704);
my_free(*(_QWORD *)(a1 + 144));
my_free(*(_QWORD *)(a1 + 936));
result = a1;
*(_DWORD *)(a1 + 1152) = -1;
return result;
}
| _ma_end_block_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0xc8]
CALL 0x001f3ba0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x2c0
CALL 0x001dab40
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x90]
CALL 0x001f3ba0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3a8]
CALL 0x001f3ba0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x480],0xffffffff
JMP 0x00154cec
LAB_00154cec:
ADD RSP,0x10
POP RBP
RET
|
void _ma_end_block_record(long param_1)
{
my_free(*(int8 *)(param_1 + 200));
delete_dynamic(param_1 + 0x2c0);
my_free(*(int8 *)(param_1 + 0x90));
my_free(*(int8 *)(param_1 + 0x3a8));
*(int4 *)(param_1 + 0x480) = 0xffffffff;
return;
}
| |
44,685 | ma_end_block_record | eloqsql/storage/maria/ma_blockrec.c | void _ma_end_block_record(MARIA_HA *info)
{
DBUG_ENTER("_ma_end_block_record");
my_free(info->cur_row.empty_bits);
delete_dynamic(&info->bitmap_blocks);
my_free(info->cur_row.extents);
my_free(info->blob_buff);
/*
The data file is closed, when needed, in ma_once_end_block_record().
The following protects us from doing an extra, not allowed, close
in maria_close()
*/
info->dfile.file= -1;
DBUG_VOID_RETURN;
} | O3 | c | ma_end_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xc8(%rdi), %rdi
callq 0x9ffe2
leaq 0x2c0(%rbx), %rdi
callq 0x91c80
movq 0x90(%rbx), %rdi
callq 0x9ffe2
movq 0x3a8(%rbx), %rdi
callq 0x9ffe2
movl $0xffffffff, 0x480(%rbx) # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ma_end_block_record:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+0C8h]
call my_free
lea rdi, [rbx+2C0h]
call delete_dynamic
mov rdi, [rbx+90h]
call my_free
mov rdi, [rbx+3A8h]
call my_free
mov dword ptr [rbx+480h], 0FFFFFFFFh
add rsp, 8
pop rbx
pop rbp
retn
| long long ma_end_block_record(long long a1)
{
long long result; // rax
my_free(*(_QWORD *)(a1 + 200));
delete_dynamic(a1 + 704);
my_free(*(_QWORD *)(a1 + 144));
result = my_free(*(_QWORD *)(a1 + 936));
*(_DWORD *)(a1 + 1152) = -1;
return result;
}
| _ma_end_block_record:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xc8]
CALL 0x0019ffe2
LEA RDI,[RBX + 0x2c0]
CALL 0x00191c80
MOV RDI,qword ptr [RBX + 0x90]
CALL 0x0019ffe2
MOV RDI,qword ptr [RBX + 0x3a8]
CALL 0x0019ffe2
MOV dword ptr [RBX + 0x480],0xffffffff
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void _ma_end_block_record(long param_1)
{
my_free(*(int8 *)(param_1 + 200));
delete_dynamic(param_1 + 0x2c0);
my_free(*(int8 *)(param_1 + 0x90));
my_free(*(int8 *)(param_1 + 0x3a8));
*(int4 *)(param_1 + 0x480) = 0xffffffff;
return;
}
| |
44,686 | main | seiftnesse[P]memoryallocator/examples/basic_usage.cpp | int main() {
std::cout << "CustomAlloc Basic Usage Example" << std::endl;
// Allocate a single integer
const auto pInt = static_cast<int *>(_malloc(sizeof(int)));
if (pInt) {
*pInt = 42;
std::cout << "Allocated int value: " << *pInt << std::endl;
_free(pInt);
}
// Allocate an array of integers
constexpr int arraySize = 10;
auto pArray = static_cast<int *>(_malloc(arraySize * sizeof(int)));
if (pArray) {
for (int i = 0; i < arraySize; i++) {
pArray[i] = i * i;
}
std::cout << "Allocated array values: ";
for (int i = 0; i < arraySize; i++) {
std::cout << pArray[i] << " ";
}
std::cout << std::endl;
// Resize the array
const auto pResized = static_cast<int *>(_realloc(pArray, arraySize * 2 * sizeof(int)));
if (pResized) {
std::cout << "Resized array (first part should be preserved): ";
for (int i = 0; i < arraySize; i++) {
std::cout << pResized[i] << " ";
}
std::cout << std::endl;
// Add more values
for (int i = arraySize; i < arraySize * 2; i++) {
pResized[i] = i * i;
}
std::cout << "Complete resized array: ";
for (int i = 0; i < arraySize * 2; i++) {
std::cout << pResized[i] << " ";
}
std::cout << std::endl;
_free(pResized);
}
}
// Allocate a custom struct
auto *pStruct = static_cast<MyStruct *>(_malloc(sizeof(MyStruct)));
if (pStruct) {
pStruct->id = 1001;
pStruct->value = 3.14159;
strcpy(pStruct->name, "Custom Allocator Example");
std::cout << "Struct data:" << std::endl;
std::cout << " ID: " << pStruct->id << std::endl;
std::cout << " Value: " << pStruct->value << std::endl;
std::cout << " Name: " << pStruct->name << std::endl;
_free(pStruct);
}
std::cout << "All memory operations completed successfully!" << std::endl;
return 0;
} | O3 | cpp | main:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x3dc4(%rip), %rbx # 0x4fd0
leaq 0x1e3d(%rip), %rsi # 0x3050
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x1090
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
movl $0x4, %edi
callq 0x172f
testq %rax, %rax
je 0x12b7
movq %rax, %r14
movl $0x2a, (%rax)
movq 0x3d6a(%rip), %r15 # 0x4fd0
leaq 0x1e03(%rip), %rsi # 0x3070
movl $0x15, %edx
movq %r15, %rdi
callq 0x1090
movl (%r14), %esi
movq %r15, %rdi
callq 0x10c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq %r14, %rdi
callq 0x183c
movl $0x28, %edi
callq 0x172f
testq %rax, %rax
je 0x14eb
movq %rax, %r14
movdqa 0x1d3b(%rip), %xmm0 # 0x3010
movl $0x1, %eax
movdqa 0x1d3e(%rip), %xmm1 # 0x3020
movdqa 0x1d46(%rip), %xmm2 # 0x3030
pshufd $0xf5, %xmm2, %xmm3 # xmm3 = xmm2[1,1,3,3]
movdqa 0x1d49(%rip), %xmm4 # 0x3040
movdqa %xmm0, %xmm5
pxor %xmm1, %xmm5
movdqa %xmm2, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm5 # xmm5 = xmm5[1,1,3,3]
pcmpeqd %xmm3, %xmm5
pand %xmm6, %xmm5
movd %xmm5, %ecx
testb $0x1, %cl
je 0x1329
leaq -0x1(%rax), %rcx
imull %ecx, %ecx
movl %ecx, -0x4(%r14,%rax,4)
pextrw $0x4, %xmm5, %ecx
testb $0x1, %cl
je 0x133c
movl %eax, %ecx
imull %eax, %ecx
movl %ecx, (%r14,%rax,4)
paddq %xmm4, %xmm0
addq $0x2, %rax
cmpq $0xb, %rax
jne 0x12f7
movq 0x3c7f(%rip), %r15 # 0x4fd0
leaq 0x1d2e(%rip), %rsi # 0x3086
movl $0x18, %edx
movq %r15, %rdi
callq 0x1090
xorl %r13d, %r13d
leaq 0x1d5f(%rip), %r12 # 0x30ce
movl (%r14,%r13,4), %esi
movq %r15, %rdi
callq 0x10c0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x1090
incq %r13
cmpq $0xa, %r13
jne 0x136f
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
movl $0x50, %esi
movq %r14, %rdi
callq 0x1948
testq %rax, %rax
je 0x14eb
movq %rax, %r14
movq 0x3bf5(%rip), %r15 # 0x4fd0
leaq 0x1cbd(%rip), %rsi # 0x309f
movl $0x30, %edx
movq %r15, %rdi
callq 0x1090
xorl %r13d, %r13d
leaq 0x1cd5(%rip), %r12 # 0x30ce
movl (%r14,%r13,4), %esi
movq %r15, %rdi
callq 0x10c0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x1090
incq %r13
cmpq $0xa, %r13
jne 0x13f9
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
movl $0xb, %eax
leaq -0xb(%rax), %rcx
cmpq $0x9, %rcx
ja 0x1468
leal -0x1(%rax), %ecx
imull %ecx, %ecx
movl %ecx, -0x4(%r14,%rax,4)
movl %eax, %ecx
imull %eax, %ecx
movl %ecx, (%r14,%rax,4)
addq $0x2, %rax
cmpq $0x15, %rax
jne 0x144a
movq 0x3b57(%rip), %r15 # 0x4fd0
leaq 0x1c50(%rip), %rsi # 0x30d0
movl $0x18, %edx
movq %r15, %rdi
callq 0x1090
xorl %r13d, %r13d
leaq 0x1c37(%rip), %r12 # 0x30ce
movl (%r14,%r13,4), %esi
movq %r15, %rdi
callq 0x10c0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x1090
incq %r13
cmpq $0x14, %r13
jne 0x1497
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq %r14, %rdi
callq 0x183c
movl $0x50, %edi
callq 0x172f
testq %rax, %rax
je 0x165d
movq %rax, %r14
movl $0x3e9, (%rax) # imm = 0x3E9
movabsq $0x400921f9f01b866e, %rax # imm = 0x400921F9F01B866E
movq %rax, 0x8(%r14)
movq %r14, %r15
addq $0x10, %r15
movups 0x1bc6(%rip), %xmm0 # 0x30e9
movups %xmm0, 0x10(%r14)
movups 0x1bc3(%rip), %xmm0 # 0x30f2
movups %xmm0, 0x19(%r14)
leaq 0x1bc7(%rip), %rsi # 0x3102
movl $0xc, %edx
movq %rbx, %rdi
callq 0x1090
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
leaq 0x1b99(%rip), %rsi # 0x310f
movl $0x6, %edx
movq %rbx, %rdi
callq 0x1090
movl (%r14), %esi
movq %rbx, %rdi
callq 0x10c0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
leaq 0x1b57(%rip), %rsi # 0x3116
movl $0x9, %edx
movq %rbx, %rdi
callq 0x1090
movq 0x8(%r14), %xmm0
movq %rbx, %rdi
callq 0x10b0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
leaq 0x1b15(%rip), %rsi # 0x3120
movl $0x8, %edx
movq %rbx, %rdi
callq 0x1090
movq %r15, %rdi
callq 0x1040
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1090
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq %r14, %rdi
callq 0x183c
leaq 0x1ac5(%rip), %rsi # 0x3129
movl $0x2d, %edx
movq %rbx, %rdi
callq 0x1090
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1060
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| main:
push r15
push r14
push r13
push r12
push rbx
mov rbx, cs:_ZSt4cout_ptr
lea rsi, aCustomallocBas; "CustomAlloc Basic Usage Example"
mov edx, 1Fh
mov rdi, rbx
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, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov edi, 4
call _malloc
test rax, rax
jz short loc_12B7
mov r14, rax
mov dword ptr [rax], 2Ah ; '*'
mov r15, cs:_ZSt4cout_ptr
lea rsi, aAllocatedIntVa; "Allocated int value: "
mov edx, 15h
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r14]
mov rdi, r15
call __ZNSolsEi; std::ostream::operator<<(int)
mov r15, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, r15
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r15; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rdi, r14
call _free
loc_12B7:
mov edi, 28h ; '('
call _malloc
test rax, rax
jz loc_14EB
mov r14, rax
movdqa xmm0, cs:xmmword_3010
mov eax, 1
movdqa xmm1, cs:xmmword_3020
movdqa xmm2, cs:xmmword_3030
pshufd xmm3, xmm2, 0F5h
movdqa xmm4, cs:xmmword_3040
loc_12F7:
movdqa xmm5, xmm0
pxor xmm5, xmm1
movdqa xmm6, xmm2
pcmpgtd xmm6, xmm5
pshufd xmm5, xmm5, 0F5h
pcmpeqd xmm5, xmm3
pand xmm5, xmm6
movd ecx, xmm5
test cl, 1
jz short loc_1329
lea rcx, [rax-1]
imul ecx, ecx
mov [r14+rax*4-4], ecx
loc_1329:
pextrw ecx, xmm5, 4
test cl, 1
jz short loc_133C
mov ecx, eax
imul ecx, eax
mov [r14+rax*4], ecx
loc_133C:
paddq xmm0, xmm4
add rax, 2
cmp rax, 0Bh
jnz short loc_12F7
mov r15, cs:_ZSt4cout_ptr
lea rsi, aAllocatedArray; "Allocated array values: "
mov edx, 18h
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
xor r13d, r13d
lea r12, aResizedArrayFi+2Fh; " "
loc_136F:
mov esi, [r14+r13*4]
mov rdi, r15
call __ZNSolsEi; std::ostream::operator<<(int)
mov edx, 1
mov rdi, rax
mov rsi, 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 r13
cmp r13, 0Ah
jnz short loc_136F
mov rax, [r15]
mov rdi, [rax-18h]
add rdi, r15
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r15; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov esi, 50h ; 'P'
mov rdi, r14
call _realloc
test rax, rax
jz loc_14EB
mov r14, rax
mov r15, cs:_ZSt4cout_ptr
lea rsi, aResizedArrayFi; "Resized array (first part should be pre"...
mov edx, 30h ; '0'
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
xor r13d, r13d
lea r12, aResizedArrayFi+2Fh; " "
loc_13F9:
mov esi, [r14+r13*4]
mov rdi, r15
call __ZNSolsEi; std::ostream::operator<<(int)
mov edx, 1
mov rdi, rax
mov rsi, 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 r13
cmp r13, 0Ah
jnz short loc_13F9
mov rax, [r15]
mov rdi, [rax-18h]
add rdi, r15
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r15; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov eax, 0Bh
loc_144A:
lea rcx, [rax-0Bh]
cmp rcx, 9
ja short loc_1468
lea ecx, [rax-1]
imul ecx, ecx
mov [r14+rax*4-4], ecx
mov ecx, eax
imul ecx, eax
mov [r14+rax*4], ecx
loc_1468:
add rax, 2
cmp rax, 15h
jnz short loc_144A
mov r15, cs:_ZSt4cout_ptr
lea rsi, aCompleteResize; "Complete resized array: "
mov edx, 18h
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
xor r13d, r13d
lea r12, aResizedArrayFi+2Fh; " "
loc_1497:
mov esi, [r14+r13*4]
mov rdi, r15
call __ZNSolsEi; std::ostream::operator<<(int)
mov edx, 1
mov rdi, rax
mov rsi, 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 r13
cmp r13, 14h
jnz short loc_1497
mov rax, [r15]
mov rdi, [rax-18h]
add rdi, r15
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r15; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rdi, r14
call _free
loc_14EB:
mov edi, 50h ; 'P'
call _malloc
test rax, rax
jz loc_165D
mov r14, rax
mov dword ptr [rax], 3E9h
mov rax, 400921F9F01B866Eh
mov [r14+8], rax
mov r15, r14
add r15, 10h
movups xmm0, cs:xmmword_30E9
movups xmmword ptr [r14+10h], xmm0
movups xmm0, cs:xmmword_30E9+9
movups xmmword ptr [r14+19h], xmm0
lea rsi, aStructData; "Struct data:"
mov edx, 0Ch
mov rdi, rbx
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, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aId; " ID: "
mov edx, 6
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r14]
mov rdi, rbx
call __ZNSolsEi; std::ostream::operator<<(int)
mov r12, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, r12
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r12; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aValue; " Value: "
mov edx, 9
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
movq xmm0, qword ptr [r14+8]
mov rdi, rbx
call __ZNSo9_M_insertIdEERSoT_; std::ostream::_M_insert<double>(double)
mov r12, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, r12
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r12; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aName; " Name: "
mov edx, 8
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, r15
call _strlen
mov rdi, rbx
mov rsi, r15
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rdi, r14
call _free
loc_165D:
lea rsi, aAllMemoryOpera; "All memory operations completed success"...
mov edx, 2Dh ; '-'
mov rdi, rbx
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, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
xor eax, eax
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| int main(int argc, const char **argv, const char **envp)
{
char v3; // al
std::ostream *v4; // rax
unsigned int *v5; // rax
unsigned int *v6; // r14
std::ostream *v7; // r15
char v8; // al
std::ostream *v9; // rax
long long v10; // rax
long long v11; // r14
__m128i si128; // xmm0
long long v13; // rax
__m128i v14; // xmm1
__m128i v15; // xmm2
__m128i v16; // xmm3
__m128i v17; // xmm4
__m128i v18; // xmm5
__m128i v19; // xmm5
long long i; // r13
long long v21; // rax
char v22; // al
std::ostream *v23; // rax
long long v24; // rax
long long v25; // r14
long long j; // r13
long long v27; // rax
char v28; // al
std::ostream *v29; // rax
long long k; // rax
long long m; // r13
long long v32; // rax
char v33; // al
std::ostream *v34; // rax
long long v35; // rax
double *v36; // r14
char v37; // al
std::ostream *v38; // rax
std::ostream *v39; // r12
char v40; // al
std::ostream *v41; // rax
std::ostream *v42; // r12
char v43; // al
std::ostream *v44; // rax
long long v45; // rax
char v46; // al
std::ostream *v47; // rax
char v48; // al
std::ostream *v49; // rax
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "CustomAlloc Basic Usage Example", 31LL);
v3 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v4 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v3);
std::ostream::flush(v4);
v5 = (unsigned int *)malloc(4LL);
if ( v5 )
{
v6 = v5;
*v5 = 42;
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Allocated int value: ", 21LL);
v7 = (std::ostream *)std::ostream::operator<<(&std::cout, *v6);
v8 = std::ios::widen((char *)v7 + *(_QWORD *)(*(_QWORD *)v7 - 24LL), 10LL);
v9 = (std::ostream *)std::ostream::put(v7, v8);
std::ostream::flush(v9);
free(v6);
}
v10 = malloc(40LL);
if ( v10 )
{
v11 = v10;
si128 = _mm_load_si128((const __m128i *)&xmmword_3010);
v13 = 1LL;
v14 = _mm_load_si128((const __m128i *)&xmmword_3020);
v15 = _mm_load_si128((const __m128i *)&xmmword_3030);
v16 = _mm_shuffle_epi32(v15, 245);
v17 = _mm_load_si128((const __m128i *)&xmmword_3040);
do
{
v18 = _mm_xor_si128(si128, v14);
v19 = _mm_and_si128(_mm_cmpeq_epi32(_mm_shuffle_epi32(v18, 245), v16), _mm_cmpgt_epi32(v15, v18));
if ( (_mm_cvtsi128_si32(v19) & 1) != 0 )
*(_DWORD *)(v11 + 4 * v13 - 4) = (v13 - 1) * (v13 - 1);
if ( (_mm_extract_epi16(v19, 4) & 1) != 0 )
*(_DWORD *)(v11 + 4 * v13) = v13 * v13;
si128 = _mm_add_epi64(si128, v17);
v13 += 2LL;
}
while ( v13 != 11 );
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Allocated array values: ", 24LL);
for ( i = 0LL; i != 10; ++i )
{
v21 = std::ostream::operator<<(&std::cout, *(unsigned int *)(v11 + 4 * i));
std::__ostream_insert<char,std::char_traits<char>>(v21, " ", 1LL);
}
v22 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v23 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v22);
std::ostream::flush(v23);
v24 = realloc(v11, 80LL, *(double *)si128.m128i_i64);
if ( v24 )
{
v25 = v24;
std::__ostream_insert<char,std::char_traits<char>>(
&std::cout,
"Resized array (first part should be preserved): ",
48LL);
for ( j = 0LL; j != 10; ++j )
{
v27 = std::ostream::operator<<(&std::cout, *(unsigned int *)(v25 + 4 * j));
std::__ostream_insert<char,std::char_traits<char>>(v27, " ", 1LL);
}
v28 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v29 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v28);
std::ostream::flush(v29);
for ( k = 11LL; k != 21; k += 2LL )
{
if ( (unsigned long long)(k - 11) <= 9 )
{
*(_DWORD *)(v25 + 4 * k - 4) = (k - 1) * (k - 1);
*(_DWORD *)(v25 + 4 * k) = k * k;
}
}
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Complete resized array: ", 24LL);
for ( m = 0LL; m != 20; ++m )
{
v32 = std::ostream::operator<<(&std::cout, *(unsigned int *)(v25 + 4 * m));
std::__ostream_insert<char,std::char_traits<char>>(v32, " ", 1LL);
}
v33 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v34 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v33);
std::ostream::flush(v34);
free(v25);
}
}
v35 = malloc(80LL);
if ( v35 )
{
v36 = (double *)v35;
*(_DWORD *)v35 = 1001;
*(_QWORD *)(v35 + 8) = 0x400921F9F01B866ELL;
strcpy((char *)(v35 + 16), "Custom Allocator Example");
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Struct data:", 12LL);
v37 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v38 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v37);
std::ostream::flush(v38);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " ID: ", 6LL);
v39 = (std::ostream *)std::ostream::operator<<(&std::cout, *(unsigned int *)v36);
v40 = std::ios::widen((char *)v39 + *(_QWORD *)(*(_QWORD *)v39 - 24LL), 10LL);
v41 = (std::ostream *)std::ostream::put(v39, v40);
std::ostream::flush(v41);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " Value: ", 9LL);
v42 = (std::ostream *)std::ostream::_M_insert<double>(&std::cout, v36[1]);
v43 = std::ios::widen((char *)v42 + *(_QWORD *)(*(_QWORD *)v42 - 24LL), 10LL);
v44 = (std::ostream *)std::ostream::put(v42, v43);
std::ostream::flush(v44);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " Name: ", 8LL);
v45 = strlen(v36 + 2);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v36 + 2, v45);
v46 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v47 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v46);
std::ostream::flush(v47);
free(v36);
}
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "All memory operations completed successfully!", 45LL);
v48 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL);
v49 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v48);
std::ostream::flush(v49);
return 0;
}
| main:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,qword ptr [0x00104fd0]
LEA RSI,[0x103050]
MOV EDX,0x1f
MOV RDI,RBX
CALL 0x00101090
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
MOV EDI,0x4
CALL 0x0010172f
TEST RAX,RAX
JZ 0x001012b7
MOV R14,RAX
MOV dword ptr [RAX],0x2a
MOV R15,qword ptr [0x00104fd0]
LEA RSI,[0x103070]
MOV EDX,0x15
MOV RDI,R15
CALL 0x00101090
MOV ESI,dword ptr [R14]
MOV RDI,R15
CALL 0x001010c0
MOV R15,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R15
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,R15
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
MOV RDI,R14
CALL 0x0010183c
LAB_001012b7:
MOV EDI,0x28
CALL 0x0010172f
TEST RAX,RAX
JZ 0x001014eb
MOV R14,RAX
MOVDQA XMM0,xmmword ptr [0x00103010]
MOV EAX,0x1
MOVDQA XMM1,xmmword ptr [0x00103020]
MOVDQA XMM2,xmmword ptr [0x00103030]
PSHUFD XMM3,XMM2,0xf5
MOVDQA XMM4,xmmword ptr [0x00103040]
LAB_001012f7:
MOVDQA XMM5,XMM0
PXOR XMM5,XMM1
MOVDQA XMM6,XMM2
PCMPGTD XMM6,XMM5
PSHUFD XMM5,XMM5,0xf5
PCMPEQD XMM5,XMM3
PAND XMM5,XMM6
MOVD ECX,XMM5
TEST CL,0x1
JZ 0x00101329
LEA RCX,[RAX + -0x1]
IMUL ECX,ECX
MOV dword ptr [R14 + RAX*0x4 + -0x4],ECX
LAB_00101329:
PEXTRW ECX,XMM5,0x4
TEST CL,0x1
JZ 0x0010133c
MOV ECX,EAX
IMUL ECX,EAX
MOV dword ptr [R14 + RAX*0x4],ECX
LAB_0010133c:
PADDQ XMM0,XMM4
ADD RAX,0x2
CMP RAX,0xb
JNZ 0x001012f7
MOV R15,qword ptr [0x00104fd0]
LEA RSI,[0x103086]
MOV EDX,0x18
MOV RDI,R15
CALL 0x00101090
XOR R13D,R13D
LEA R12,[0x1030ce]
LAB_0010136f:
MOV ESI,dword ptr [R14 + R13*0x4]
MOV RDI,R15
CALL 0x001010c0
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R12
CALL 0x00101090
INC R13
CMP R13,0xa
JNZ 0x0010136f
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R15
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,R15
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
MOV ESI,0x50
MOV RDI,R14
CALL 0x00101948
TEST RAX,RAX
JZ 0x001014eb
MOV R14,RAX
MOV R15,qword ptr [0x00104fd0]
LEA RSI,[0x10309f]
MOV EDX,0x30
MOV RDI,R15
CALL 0x00101090
XOR R13D,R13D
LEA R12,[0x1030ce]
LAB_001013f9:
MOV ESI,dword ptr [R14 + R13*0x4]
MOV RDI,R15
CALL 0x001010c0
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R12
CALL 0x00101090
INC R13
CMP R13,0xa
JNZ 0x001013f9
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R15
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,R15
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
MOV EAX,0xb
LAB_0010144a:
LEA RCX,[RAX + -0xb]
CMP RCX,0x9
JA 0x00101468
LEA ECX,[RAX + -0x1]
IMUL ECX,ECX
MOV dword ptr [R14 + RAX*0x4 + -0x4],ECX
MOV ECX,EAX
IMUL ECX,EAX
MOV dword ptr [R14 + RAX*0x4],ECX
LAB_00101468:
ADD RAX,0x2
CMP RAX,0x15
JNZ 0x0010144a
MOV R15,qword ptr [0x00104fd0]
LEA RSI,[0x1030d0]
MOV EDX,0x18
MOV RDI,R15
CALL 0x00101090
XOR R13D,R13D
LEA R12,[0x1030ce]
LAB_00101497:
MOV ESI,dword ptr [R14 + R13*0x4]
MOV RDI,R15
CALL 0x001010c0
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R12
CALL 0x00101090
INC R13
CMP R13,0x14
JNZ 0x00101497
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R15
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,R15
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
MOV RDI,R14
CALL 0x0010183c
LAB_001014eb:
MOV EDI,0x50
CALL 0x0010172f
TEST RAX,RAX
JZ 0x0010165d
MOV R14,RAX
MOV dword ptr [RAX],0x3e9
MOV RAX,0x400921f9f01b866e
MOV qword ptr [R14 + 0x8],RAX
MOV R15,R14
ADD R15,0x10
MOVUPS XMM0,xmmword ptr [0x001030e9]
MOVUPS xmmword ptr [R14 + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x001030f2]
MOVUPS xmmword ptr [R14 + 0x19],XMM0
LEA RSI,[0x103102]
MOV EDX,0xc
MOV RDI,RBX
CALL 0x00101090
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
LEA RSI,[0x10310f]
MOV EDX,0x6
MOV RDI,RBX
CALL 0x00101090
MOV ESI,dword ptr [R14]
MOV RDI,RBX
CALL 0x001010c0
MOV R12,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R12
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,R12
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
LEA RSI,[0x103116]
MOV EDX,0x9
MOV RDI,RBX
CALL 0x00101090
MOVQ XMM0,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001010b0
MOV R12,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R12
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,R12
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
LEA RSI,[0x103120]
MOV EDX,0x8
MOV RDI,RBX
CALL 0x00101090
MOV RDI,R15
CALL 0x00101040
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RAX
CALL 0x00101090
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
MOV RDI,R14
CALL 0x0010183c
LAB_0010165d:
LEA RSI,[0x103129]
MOV EDX,0x2d
MOV RDI,RBX
CALL 0x00101090
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00101080
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00101030
MOV RDI,RAX
CALL 0x00101060
XOR EAX,EAX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 main(void)
{
char cVar1;
int iVar2;
int8 uVar3;
int1 auVar4 [16];
int iVar5;
long lVar6;
int *this;
int *puVar7;
int iVar8;
int *piVar9;
long *plVar10;
void *pvVar11;
long lVar12;
ostream *poVar13;
size_t sVar14;
long lVar15;
int1 auVar16 [16];
long lVar17;
this = PTR_cout_00104fd0;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00104fd0,"CustomAlloc Basic Usage Example",0x1f);
cVar1 = (char)this;
std::ios::widen((char)*(int8 *)(*(long *)this + -0x18) + cVar1);
std::ostream::put(cVar1);
std::ostream::flush();
piVar9 = (int *)_malloc(4);
if (piVar9 != (int *)0x0) {
*piVar9 = 0x2a;
puVar7 = PTR_cout_00104fd0;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00104fd0,"Allocated int value: ",0x15);
plVar10 = (long *)std::ostream::operator<<((ostream *)puVar7,*piVar9);
std::ios::widen((char)*(int8 *)(*plVar10 + -0x18) + (char)plVar10);
std::ostream::put((char)plVar10);
std::ostream::flush();
_free(piVar9);
}
pvVar11 = _malloc(0x28);
lVar6 = _UNK_00103048;
lVar15 = _DAT_00103040;
iVar5 = _UNK_00103034;
iVar2 = _DAT_00103030;
auVar4 = _DAT_00103020;
if (pvVar11 != (void *)0x0) {
lVar12 = 1;
auVar16 = _DAT_00103010;
do {
iVar8 = (int)lVar12;
if (SUB164(auVar16 ^ auVar4,4) == iVar5 && SUB164(auVar16 ^ auVar4,0) < iVar2) {
*(int *)((long)pvVar11 + lVar12 * 4 + -4) = (iVar8 + -1) * (iVar8 + -1);
*(int *)((long)pvVar11 + lVar12 * 4) = iVar8 * iVar8;
}
puVar7 = PTR_cout_00104fd0;
lVar17 = auVar16._8_8_;
auVar16._0_8_ = auVar16._0_8_ + lVar15;
auVar16._8_8_ = lVar17 + lVar6;
lVar12 = lVar12 + 2;
} while (lVar12 != 0xb);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00104fd0,"Allocated array values: ",0x18);
lVar15 = 0;
do {
poVar13 = (ostream *)
std::ostream::operator<<((ostream *)puVar7,*(int *)((long)pvVar11 + lVar15 * 4));
std::__ostream_insert<char,std::char_traits<char>>(poVar13," ",1);
lVar15 = lVar15 + 1;
} while (lVar15 != 10);
std::ios::widen((char)*(int8 *)(*(long *)puVar7 + -0x18) + (char)puVar7);
std::ostream::put((char)puVar7);
std::ostream::flush();
pvVar11 = _realloc(pvVar11,0x50);
puVar7 = PTR_cout_00104fd0;
if (pvVar11 != (void *)0x0) {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00104fd0,"Resized array (first part should be preserved): ",
0x30);
lVar15 = 0;
do {
poVar13 = (ostream *)
std::ostream::operator<<((ostream *)puVar7,*(int *)((long)pvVar11 + lVar15 * 4));
std::__ostream_insert<char,std::char_traits<char>>(poVar13," ",1);
lVar15 = lVar15 + 1;
} while (lVar15 != 10);
std::ios::widen((char)*(int8 *)(*(long *)puVar7 + -0x18) + (char)puVar7);
std::ostream::put((char)puVar7);
std::ostream::flush();
lVar15 = 0xb;
do {
if (lVar15 - 0xbU < 10) {
iVar2 = (int)lVar15;
*(int *)((long)pvVar11 + lVar15 * 4 + -4) = (iVar2 + -1) * (iVar2 + -1);
*(int *)((long)pvVar11 + lVar15 * 4) = iVar2 * iVar2;
}
puVar7 = PTR_cout_00104fd0;
lVar15 = lVar15 + 2;
} while (lVar15 != 0x15);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00104fd0,"Complete resized array: ",0x18);
lVar15 = 0;
do {
poVar13 = (ostream *)
std::ostream::operator<<((ostream *)puVar7,*(int *)((long)pvVar11 + lVar15 * 4));
std::__ostream_insert<char,std::char_traits<char>>(poVar13," ",1);
lVar15 = lVar15 + 1;
} while (lVar15 != 0x14);
std::ios::widen((char)*(int8 *)(*(long *)puVar7 + -0x18) + (char)puVar7);
std::ostream::put((char)puVar7);
std::ostream::flush();
_free(pvVar11);
}
}
piVar9 = (int *)_malloc(0x50);
if (piVar9 != (int *)0x0) {
*piVar9 = 0x3e9;
piVar9[2] = -0xfe47992;
piVar9[3] = 0x400921f9;
uVar3 = CONCAT71(s_Custom_Allocator_Example_001030e9._9_7_,
s_Custom_Allocator_Example_001030e9[8]);
*(int8 *)(piVar9 + 4) = s_Custom_Allocator_Example_001030e9._0_8_;
*(int8 *)(piVar9 + 6) = uVar3;
uVar3 = s_Custom_Allocator_Example_001030e9._17_8_;
*(ulong *)((long)piVar9 + 0x19) =
CONCAT17(s_Custom_Allocator_Example_001030e9[0x10],
s_Custom_Allocator_Example_001030e9._9_7_);
*(int8 *)((long)piVar9 + 0x21) = uVar3;
std::__ostream_insert<char,std::char_traits<char>>((ostream *)this,"Struct data:",0xc);
std::ios::widen((char)*(int8 *)(*(long *)this + -0x18) + cVar1);
std::ostream::put(cVar1);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>((ostream *)this," ID: ",6);
plVar10 = (long *)std::ostream::operator<<((ostream *)this,*piVar9);
std::ios::widen((char)*(int8 *)(*plVar10 + -0x18) + (char)plVar10);
std::ostream::put((char)plVar10);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>((ostream *)this," Value: ",9);
poVar13 = std::ostream::_M_insert<double>(*(double *)(piVar9 + 2));
std::ios::widen((char)*(int8 *)(*(long *)poVar13 + -0x18) + (char)poVar13);
std::ostream::put((char)poVar13);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>((ostream *)this," Name: ",8);
sVar14 = strlen((char *)(piVar9 + 4));
std::__ostream_insert<char,std::char_traits<char>>((ostream *)this,(char *)(piVar9 + 4),sVar14);
std::ios::widen((char)*(int8 *)(*(long *)this + -0x18) + cVar1);
std::ostream::put(cVar1);
std::ostream::flush();
_free(piVar9);
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)this,"All memory operations completed successfully!",0x2d);
std::ios::widen((char)*(int8 *)(*(long *)this + -0x18) + cVar1);
std::ostream::put(cVar1);
std::ostream::flush();
return 0;
}
| |
44,687 | validate_float | ngxson[P]ggml-easy/ggml/src/ggml-quants.c | static bool validate_float(float f, size_t i) {
if (isinf(f)) {
fprintf(stderr, "ggml_validate_row_data: found inf value at block %zu\n", i);
return false;
}
if (isnan(f)) {
fprintf(stderr, "ggml_validate_row_data: found nan value at block %zu\n", i);
return false;
}
return true;
} | O0 | c | validate_float:
subq $0x18, %rsp
movss %xmm0, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movss 0x10(%rsp), %xmm1
movaps %xmm1, %xmm0
movaps 0x29531(%rip), %xmm2 # 0xb4030
pand %xmm2, %xmm0
movd %xmm1, %edx
movl $0x1, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovll %eax, %ecx
movss 0x2dd61(%rip), %xmm1 # 0xb8880
xorl %eax, %eax
ucomiss %xmm1, %xmm0
setnp %sil
sete %dl
testb %sil, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x8ab5a
movq 0x50493(%rip), %rax # 0xdafd0
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x38b9f(%rip), %rsi # 0xc36eb
movb $0x0, %al
callq 0x457e0
movb $0x0, 0x17(%rsp)
jmp 0x8ab95
movss 0x10(%rsp), %xmm0
ucomiss %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x8ab6c
jmp 0x8ab90
movq 0x5045d(%rip), %rax # 0xdafd0
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x38b9f(%rip), %rsi # 0xc3721
movb $0x0, %al
callq 0x457e0
movb $0x0, 0x17(%rsp)
jmp 0x8ab95
movb $0x1, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
| validate_float:
sub rsp, 18h
movss [rsp+18h+var_8], xmm0
mov [rsp+18h+var_10], rdi
movss xmm1, [rsp+18h+var_8]
movaps xmm0, xmm1
movaps xmm2, cs:xmmword_B4030
pand xmm0, xmm2
movd edx, xmm1
mov ecx, 1
mov eax, 0FFFFFFFFh
cmp edx, 0
cmovl ecx, eax
movss xmm1, cs:dword_B8880
xor eax, eax
ucomiss xmm0, xmm1
setnp sil
setz dl
test dl, sil
cmovnz eax, ecx
cmp eax, 0
jz short loc_8AB5A
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aGgmlValidateRo_1; "ggml_validate_row_data: found inf value"...
mov al, 0
call _fprintf
mov [rsp+18h+var_1], 0
jmp short loc_8AB95
loc_8AB5A:
movss xmm0, [rsp+18h+var_8]
ucomiss xmm0, xmm0
setp al
test al, 1
jnz short loc_8AB6C
jmp short loc_8AB90
loc_8AB6C:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aGgmlValidateRo_2; "ggml_validate_row_data: found nan value"...
mov al, 0
call _fprintf
mov [rsp+18h+var_1], 0
jmp short loc_8AB95
loc_8AB90:
mov [rsp+18h+var_1], 1
loc_8AB95:
mov al, [rsp+18h+var_1]
and al, 1
add rsp, 18h
retn
| char validate_float(long long a1, float a2)
{
__m128i v2; // xmm1
float v3; // xmm0_4
int v4; // ecx
int v5; // eax
v2 = (__m128i)LODWORD(a2);
LODWORD(v3) = _mm_and_si128((__m128i)LODWORD(a2), (__m128i)xmmword_B4030).m128i_u32[0];
v4 = 1;
if ( _mm_cvtsi128_si32(v2) < 0 )
v4 = -1;
v5 = 0;
if ( v3 == INFINITY )
v5 = v4;
if ( !v5 )
return 1;
fprintf(stderr, "ggml_validate_row_data: found inf value at block %zu\n", a1);
return 0;
}
| validate_float:
SUB RSP,0x18
MOVSS dword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x8],RDI
MOVSS XMM1,dword ptr [RSP + 0x10]
MOVAPS XMM0,XMM1
MOVAPS XMM2,xmmword ptr [0x001b4030]
PAND XMM0,XMM2
MOVD EDX,XMM1
MOV ECX,0x1
MOV EAX,0xffffffff
CMP EDX,0x0
CMOVL ECX,EAX
MOVSS XMM1,dword ptr [0x001b8880]
XOR EAX,EAX
UCOMISS XMM0,XMM1
SETNP SIL
SETZ DL
TEST DL,SIL
CMOVNZ EAX,ECX
CMP EAX,0x0
JZ 0x0018ab5a
MOV RAX,qword ptr [0x001dafd0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x1c36eb]
MOV AL,0x0
CALL 0x001457e0
MOV byte ptr [RSP + 0x17],0x0
JMP 0x0018ab95
LAB_0018ab5a:
MOVSS XMM0,dword ptr [RSP + 0x10]
UCOMISS XMM0,XMM0
SETP AL
TEST AL,0x1
JNZ 0x0018ab6c
JMP 0x0018ab90
LAB_0018ab6c:
MOV RAX,qword ptr [0x001dafd0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x1c3721]
MOV AL,0x0
CALL 0x001457e0
MOV byte ptr [RSP + 0x17],0x0
JMP 0x0018ab95
LAB_0018ab90:
MOV byte ptr [RSP + 0x17],0x1
LAB_0018ab95:
MOV AL,byte ptr [RSP + 0x17]
AND AL,0x1
ADD RSP,0x18
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 validate_float(float param_1,int8 param_2)
{
int iVar1;
int8 uVar2;
int4 extraout_var;
int4 extraout_var_00;
int8 uVar3;
int1 local_1;
uVar3 = 1;
if ((int)param_1 < 0) {
uVar3 = 0xffffffff;
}
uVar2 = 0;
if ((float)((uint)param_1 & SUB164(_DAT_001b4030,0)) == DAT_001b8880) {
uVar2 = uVar3;
}
if ((int)uVar2 == 0) {
uVar3 = CONCAT71((int7)((ulong)uVar2 >> 8),NAN(param_1));
if (NAN(param_1)) {
iVar1 = fprintf(*(FILE **)PTR_stderr_001dafd0,
"ggml_validate_row_data: found nan value at block %zu\n",param_2);
uVar3 = CONCAT44(extraout_var_00,iVar1);
local_1 = 0;
}
else {
local_1 = 1;
}
}
else {
iVar1 = fprintf(*(FILE **)PTR_stderr_001dafd0,
"ggml_validate_row_data: found inf value at block %zu\n",param_2);
uVar3 = CONCAT44(extraout_var,iVar1);
local_1 = 0;
}
return CONCAT71((int7)((ulong)uVar3 >> 8),local_1);
}
| |
44,688 | validate_float | ngxson[P]ggml-easy/ggml/src/ggml-quants.c | static bool validate_float(float f, size_t i) {
if (isinf(f)) {
fprintf(stderr, "ggml_validate_row_data: found inf value at block %zu\n", i);
return false;
}
if (isnan(f)) {
fprintf(stderr, "ggml_validate_row_data: found nan value at block %zu\n", i);
return false;
}
return true;
} | O2 | c | validate_float:
pushq %rbx
movq %rdi, %rdx
movd %xmm0, %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
cmpl $0x7f800000, %eax # imm = 0x7F800000
je 0x3d5c4
movb $0x1, %bl
ucomiss %xmm0, %xmm0
jp 0x3d5cd
movl %ebx, %eax
popq %rbx
retq
leaq 0x1cee9(%rip), %rsi # 0x5a4b4
jmp 0x3d5d4
leaq 0x1cf16(%rip), %rsi # 0x5a4ea
movq 0x2f9ed(%rip), %rax # 0x6cfc8
movq (%rax), %rdi
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1e190
jmp 0x3d5c0
| validate_float:
push rbx
mov rdx, rdi
movd eax, xmm0
and eax, 7FFFFFFFh
cmp eax, 7F800000h
jz short loc_3D5C4
mov bl, 1
ucomiss xmm0, xmm0
jp short loc_3D5CD
loc_3D5C0:
mov eax, ebx
pop rbx
retn
loc_3D5C4:
lea rsi, aGgmlValidateRo_1; "ggml_validate_row_data: found inf value"...
jmp short loc_3D5D4
loc_3D5CD:
lea rsi, aGgmlValidateRo_2; "ggml_validate_row_data: found nan value"...
loc_3D5D4:
mov rax, cs:stderr_ptr
mov rdi, [rax]
xor ebx, ebx
xor eax, eax
call _fprintf
jmp short loc_3D5C0
| long long validate_float(long long a1, __m128i a2)
{
unsigned int v2; // ebx
if ( (_mm_cvtsi128_si32(a2) & 0x7FFFFFFF) == 0x7F800000 )
{
v2 = 0;
fprintf(stderr, "ggml_validate_row_data: found inf value at block %zu\n", a1);
}
else
{
LOBYTE(v2) = 1;
}
return v2;
}
| validate_float:
PUSH RBX
MOV RDX,RDI
MOVD EAX,XMM0
AND EAX,0x7fffffff
CMP EAX,0x7f800000
JZ 0x0013d5c4
MOV BL,0x1
UCOMISS XMM0,XMM0
JP 0x0013d5cd
LAB_0013d5c0:
MOV EAX,EBX
POP RBX
RET
LAB_0013d5c4:
LEA RSI,[0x15a4b4]
JMP 0x0013d5d4
LAB_0013d5cd:
LEA RSI,[0x15a4ea]
LAB_0013d5d4:
MOV RAX,qword ptr [0x0016cfc8]
MOV RDI,qword ptr [RAX]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0011e190
JMP 0x0013d5c0
|
ulong validate_float(float param_1,int8 param_2)
{
int8 unaff_RBX;
ulong uVar1;
char *__format;
if (ABS(param_1) == INFINITY) {
__format = "ggml_validate_row_data: found inf value at block %zu\n";
}
else {
uVar1 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (!NAN(param_1)) goto LAB_0013d5c0;
__format = "ggml_validate_row_data: found nan value at block %zu\n";
}
uVar1 = 0;
fprintf(*(FILE **)PTR_stderr_0016cfc8,__format,param_2);
LAB_0013d5c0:
return uVar1 & 0xffffffff;
}
| |
44,689 | minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling) | monkey531[P]llama/common/minja.hpp | std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
std::smatch match;
if (std::regex_search(it, end, match, regex) && match.position() == 0) {
it += match[0].length();
std::vector<std::string> ret;
for (size_t i = 0, n = match.size(); i < n; ++i) {
ret.push_back(match[i].str());
}
return ret;
}
it = start;
return {};
} | O0 | cpp | minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling):
subq $0xd8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
movl %ecx, 0xbc(%rsp)
movq 0xc8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq 0x20(%rdi), %rax
movq %rax, 0xb0(%rsp)
movl 0xbc(%rsp), %esi
callq 0x11f2f0
leaq 0x90(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x6f6d0
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
movq 0x20(%rax), %rcx
movq %rcx, 0x88(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0xc0(%rsp), %rcx
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
xorl %r8d, %r8d
callq 0x6f710
movb %al, 0x3b(%rsp)
jmp 0x11be12
movb 0x3b(%rsp), %al
testb $0x1, %al
jne 0x11be1f
jmp 0x11bf6f
xorl %eax, %eax
movl %eax, %esi
leaq 0x90(%rsp), %rdi
callq 0x6f370
movq %rax, 0x10(%rsp)
jmp 0x11be37
movq 0x10(%rsp), %rax
cmpq $0x0, %rax
jne 0x11bf6f
xorl %eax, %eax
movl %eax, %esi
leaq 0x90(%rsp), %rdi
callq 0x77d00
movq %rax, 0x8(%rsp)
jmp 0x11be5e
movq 0x8(%rsp), %rdi
callq 0x78e20
movq 0x28(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rdi
callq 0x74a80
movq 0x18(%rsp), %rdi
movb $0x0, 0x73(%rsp)
callq 0x6cd90
movq $0x0, 0x68(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x77fe0
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x60(%rsp), %rax
jae 0x11bf43
movq 0x68(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x77d00
movq %rax, (%rsp)
jmp 0x11becb
movq (%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x78ac0
jmp 0x11bedb
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1086d0
jmp 0x11beec
leaq 0x40(%rsp), %rdi
callq 0x5f5d8
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x11bea3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x11bfbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x11bf63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x5f5d8
jmp 0x11bf63
movb $0x1, 0x73(%rsp)
movl $0x1, 0x3c(%rsp)
testb $0x1, 0x73(%rsp)
jne 0x11bf61
movq 0x18(%rsp), %rdi
callq 0x699d0
jmp 0x11bfa3
movq 0x18(%rsp), %rdi
callq 0x699d0
jmp 0x11bfbd
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq %rcx, 0x20(%rax)
xorl %esi, %esi
movl $0x18, %edx
callq 0x5e580
movq 0x18(%rsp), %rdi
callq 0x6cd90
movl $0x1, 0x3c(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x6f7d0
movq 0x20(%rsp), %rax
addq $0xd8, %rsp
retq
leaq 0x90(%rsp), %rdi
callq 0x6f7d0
movq 0x78(%rsp), %rdi
callq 0x5ebf0
nopw %cs:(%rax,%rax)
nop
| _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE:
sub rsp, 0D8h
mov [rsp+0D8h+var_C0], rdi
mov rax, rdi
mov [rsp+0D8h+var_B8], rax
mov [rsp+0D8h+var_8], rdi
mov [rsp+0D8h+var_10], rsi
mov [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_1C], ecx
mov rdi, [rsp+0D8h+var_10]
mov [rsp+0D8h+var_B0], rdi
mov rax, [rdi+20h]
mov [rsp+0D8h+var_28], rax
mov esi, [rsp+0D8h+var_1C]
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
lea rdi, [rsp+0D8h+var_48]
mov [rsp+0D8h+var_A8], rdi
call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEC2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results(void)
mov rax, [rsp+0D8h+var_B0]
mov rdx, [rsp+0D8h+var_A8]
mov rcx, [rax+20h]
mov [rsp+0D8h+var_50], rcx
mov rax, [rax+18h]
mov [rsp+0D8h+var_58], rax
mov rcx, [rsp+0D8h+var_18]
mov rdi, [rsp+0D8h+var_50]
mov rsi, [rsp+0D8h+var_58]
xor r8d, r8d
call _ZSt12regex_searchIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS4_9sub_matchISA_EEEcNS4_12regex_traitsIcEEEbT_SG_RNS4_13match_resultsISG_T0_EERKNS4_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::regex_search<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
mov [rsp+0D8h+var_9D], al
jmp short $+2
loc_11BE12:
mov al, [rsp+0D8h+var_9D]
test al, 1
jnz short loc_11BE1F
jmp loc_11BF6F
loc_11BE1F:
xor eax, eax
mov esi, eax
lea rdi, [rsp+0D8h+var_48]
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(ulong)
mov [rsp+0D8h+var_C8], rax
jmp short $+2
loc_11BE37:
mov rax, [rsp+0D8h+var_C8]
cmp rax, 0
jnz loc_11BF6F
xor eax, eax
mov esi, eax
lea rdi, [rsp+0D8h+var_48]
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEixEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](ulong)
mov [rsp+0D8h+var_D0], rax
jmp short $+2
loc_11BE5E:
mov rdi, [rsp+0D8h+var_D0]
call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE6lengthEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::length(void)
mov rdi, [rsp+0D8h+var_B0]
mov rsi, rax
add rdi, 20h ; ' '
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEpLEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+=(long)
mov rdi, [rsp+0D8h+var_C0]
mov [rsp+0D8h+var_65], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov [rsp+0D8h+var_70], 0
lea rdi, [rsp+0D8h+var_48]
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE4sizeEv; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::size(void)
mov [rsp+0D8h+var_78], rax
loc_11BEA3:
mov rax, [rsp+0D8h+var_70]
cmp rax, [rsp+0D8h+var_78]
jnb loc_11BF43
mov rsi, [rsp+0D8h+var_70]
lea rdi, [rsp+0D8h+var_48]
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEixEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](ulong)
mov [rsp+0D8h+var_D8], rax
jmp short $+2
loc_11BECB:
mov rsi, [rsp+0D8h+var_D8]
lea rdi, [rsp+0D8h+var_98]
call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void)
jmp short $+2
loc_11BEDB:
mov rdi, [rsp+0D8h+var_C0]
lea rsi, [rsp+0D8h+var_98]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&)
jmp short $+2
loc_11BEEC:
lea rdi, [rsp+0D8h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+0D8h+var_70]
add rax, 1
mov [rsp+0D8h+var_70], rax
jmp short loc_11BEA3
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp loc_11BFBD
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp short loc_11BF63
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_11BF63
loc_11BF43:
mov [rsp+0D8h+var_65], 1
mov [rsp+0D8h+var_9C], 1
test [rsp+0D8h+var_65], 1
jnz short loc_11BF61
mov rdi, [rsp+0D8h+var_C0]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_11BF61:
jmp short loc_11BFA3
loc_11BF63:
mov rdi, [rsp+arg_10]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_11BFBD
loc_11BF6F:
mov rdi, [rsp+0D8h+var_C0]
mov rax, [rsp+0D8h+var_B0]
mov rcx, [rsp+0D8h+var_28]
mov [rax+20h], rcx
xor esi, esi
mov edx, 18h
call _memset
mov rdi, [rsp+0D8h+var_C0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov [rsp+0D8h+var_9C], 1
loc_11BFA3:
lea rdi, [rsp+0D8h+var_48]
call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results()
mov rax, [rsp+0D8h+var_B8]
add rsp, 0D8h
retn
loc_11BFBD:
lea rdi, [rsp+arg_88]
call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results()
mov rdi, [rsp+arg_70]
call __Unwind_Resume
| long long minja::Parser::consumeTokenGroups(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v4; // rax
long long v5; // rdx
long long v6; // rcx
long long v7; // r8
long long v8; // r9
long long *v10; // [rsp+0h] [rbp-D8h]
long long v11; // [rsp+8h] [rbp-D0h]
_BYTE v12[32]; // [rsp+40h] [rbp-98h] BYREF
unsigned long long v13; // [rsp+60h] [rbp-78h]
unsigned long long v14; // [rsp+68h] [rbp-70h]
char v15; // [rsp+73h] [rbp-65h]
long long v16; // [rsp+80h] [rbp-58h]
long long v17; // [rsp+88h] [rbp-50h]
_QWORD v18[4]; // [rsp+90h] [rbp-48h] BYREF
long long v19; // [rsp+B0h] [rbp-28h]
unsigned int v20; // [rsp+BCh] [rbp-1Ch]
long long v21; // [rsp+C0h] [rbp-18h]
long long v22; // [rsp+C8h] [rbp-10h]
long long v23; // [rsp+D0h] [rbp-8h]
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results((long long)v18);
v17 = *(_QWORD *)(a2 + 32);
v16 = *(_QWORD *)(a2 + 24);
if ( (std::regex_search<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
v17,
v16,
v18,
v21,
0LL) & 1) == 0
|| std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position((long long)v18, 0LL) )
{
*(_QWORD *)(a2 + 32) = v19;
memset(a1, 0LL, 24LL);
std::vector<std::string>::vector(a1);
}
else
{
v11 = std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[]((long long)v18, 0LL);
v4 = std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::length(v11);
__gnu_cxx::__normal_iterator<char const*,std::string>::operator+=((_QWORD *)(a2 + 32), v4);
v15 = 0;
std::vector<std::string>::vector(a1);
v14 = 0LL;
v13 = std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::size(v18);
while ( v14 < v13 )
{
v10 = (long long *)std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](
(long long)v18,
v14);
std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)v12, v10);
std::vector<std::string>::push_back(a1, (long long)v12, v5, v6, v7, v8);
std::string::~string(v12);
++v14;
}
v15 = 1;
}
std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results((long long)v18);
return a1;
}
| |||
44,690 | minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling) | monkey531[P]llama/common/minja.hpp | std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
std::smatch match;
if (std::regex_search(it, end, match, regex) && match.position() == 0) {
it += match[0].length();
std::vector<std::string> ret;
for (size_t i = 0, n = match.size(); i < n; ++i) {
ret.push_back(match[i].str());
}
return ret;
}
it = start;
return {};
} | O2 | cpp | minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rsi), %r12
movq %rsi, %rdi
movl %ecx, %esi
callq 0x66180
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x2b616
testb %al, %al
je 0x64ee2
movq %rsp, %rdi
xorl %esi, %esi
callq 0x2b4c8
testq %rax, %rax
je 0x64f0b
movq %r12, 0x20(%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rsp, %rdi
callq 0x2bb44
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rax, %rdx
subq %rcx, %rdx
leaq -0x48(%rax), %rsi
cmpq $0x48, %rdx
movq %rcx, %rdx
cmoveq %rsi, %rdx
cmpq %rcx, %rax
cmoveq %rsi, %rdx
movq 0x8(%rdx), %rsi
subq (%rdx), %rsi
xorl %r14d, %r14d
cmpb $0x0, 0x10(%rdx)
cmoveq %r14, %rsi
addq %rsi, 0x20(%r15)
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
pushq $0x18
popq %r12
subq %rcx, %rax
je 0x64f66
cqto
idivq %r12
movq %rax, %r14
addq $-0x3, %r14
xorl %r13d, %r13d
leaq 0x28(%rsp), %r15
xorl %ebp, %ebp
cmpq %rbp, %r14
je 0x64ef1
movq (%rsp), %rsi
movq 0x8(%rsp), %rcx
subq %rsi, %rcx
je 0x64f9d
movq %rcx, %rax
cqto
idivq %r12
addq $-0x3, %rax
cmpq %rbp, %rax
jbe 0x64f9d
addq %r13, %rsi
jmp 0x64fa4
addq %rcx, %rsi
addq $-0x48, %rsi
movq %r15, %rdi
callq 0x2dd86
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4b314
movq %r15, %rdi
callq 0x25258
incq %rbp
addq $0x18, %r13
jmp 0x64f70
movq %rax, %r14
jmp 0x64fe7
movq %rax, %r14
jmp 0x64fdf
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x25258
movq %rbx, %rdi
callq 0x29c48
movq %rsp, %rdi
callq 0x2bb44
movq %r14, %rdi
callq 0x24fe0
nop
| _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov r12, [rsi+20h]
mov rdi, rsi
mov esi, ecx
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
xorps xmm0, xmm0
mov rdx, rsp
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
mov rsi, [r15+18h]
mov rdi, [r15+20h]
mov rcx, r14
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
test al, al
jz short loc_64EE2
mov rdi, rsp
xor esi, esi
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(ulong)
test rax, rax
jz short loc_64F0B
loc_64EE2:
mov [r15+20h], r12
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
and qword ptr [rbx+10h], 0
loc_64EF1:
mov rdi, rsp
call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base()
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_64F0B:
mov rcx, [rsp+78h+var_78]
mov rax, [rsp+78h+var_70]
mov rdx, rax
sub rdx, rcx
lea rsi, [rax-48h]
cmp rdx, 48h ; 'H'
mov rdx, rcx
cmovz rdx, rsi
cmp rax, rcx
cmovz rdx, rsi
mov rsi, [rdx+8]
sub rsi, [rdx]
xor r14d, r14d
cmp byte ptr [rdx+10h], 0
cmovz rsi, r14
add [r15+20h], rsi
and qword ptr [rbx+10h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
push 18h
pop r12
sub rax, rcx
jz short loc_64F66
cqo
idiv r12
mov r14, rax
add r14, 0FFFFFFFFFFFFFFFDh
loc_64F66:
xor r13d, r13d
lea r15, [rsp+78h+var_50]
xor ebp, ebp
loc_64F70:
cmp r14, rbp
jz loc_64EF1
mov rsi, [rsp+78h+var_78]
mov rcx, [rsp+78h+var_70]
sub rcx, rsi
jz short loc_64F9D
mov rax, rcx
cqo
idiv r12
add rax, 0FFFFFFFFFFFFFFFDh
cmp rax, rbp
jbe short loc_64F9D
add rsi, r13
jmp short loc_64FA4
loc_64F9D:
add rsi, rcx
add rsi, 0FFFFFFFFFFFFFFB8h
loc_64FA4:
mov rdi, r15
call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void)
mov rdi, rbx
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
inc rbp
add r13, 18h
jmp short loc_64F70
mov r14, rax
jmp short loc_64FE7
mov r14, rax
jmp short loc_64FDF
mov r14, rax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_64FDF:
mov rdi, rbx; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_64FE7:
mov rdi, rsp
call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
| long long minja::Parser::consumeTokenGroups(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v6; // r12
__int128 v8; // kr00_16
long long v9; // rdx
long long v10; // rsi
long long v11; // r14
long long v12; // r13
unsigned long long i; // rbp
long long *v14; // rsi
_OWORD v15[2]; // [rsp+0h] [rbp-78h] BYREF
_BYTE v16[80]; // [rsp+28h] [rbp-50h] BYREF
v6 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
memset(v15, 0, sizeof(v15));
if ( std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(
*(long long **)(a2 + 32),
*(_QWORD *)(a2 + 24),
(long long **)v15,
a3,
0)
&& !std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position((long long)v15) )
{
v8 = v15[0];
v9 = *(_QWORD *)&v15[0];
if ( *((_QWORD *)&v15[0] + 1) - *(_QWORD *)&v15[0] == 72LL )
v9 = *((_QWORD *)&v15[0] + 1) - 72LL;
if ( *((_QWORD *)&v15[0] + 1) == *(_QWORD *)&v15[0] )
v9 = *((_QWORD *)&v15[0] + 1) - 72LL;
v10 = *(_QWORD *)(v9 + 8) - *(_QWORD *)v9;
v11 = 0LL;
if ( !*(_BYTE *)(v9 + 16) )
v10 = 0LL;
*(_QWORD *)(a2 + 32) += v10;
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( *((_QWORD *)&v8 + 1) != (_QWORD)v8 )
v11 = (*((_QWORD *)&v8 + 1) - (_QWORD)v8) / 24LL - 3;
v12 = 0LL;
for ( i = 0LL; v11 != i; ++i )
{
if ( *((_QWORD *)&v15[0] + 1) == *(_QWORD *)&v15[0]
|| (*((_QWORD *)&v15[0] + 1) - *(_QWORD *)&v15[0]) / 24LL - 3 <= i )
{
v14 = (long long *)(*((_QWORD *)&v15[0] + 1) - 72LL);
}
else
{
v14 = (long long *)(v12 + *(_QWORD *)&v15[0]);
}
std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)v16, v14);
std::vector<std::string>::emplace_back<std::string>(a1, (long long)v16);
std::string::~string(v16);
v12 += 24LL;
}
}
else
{
*(_QWORD *)(a2 + 32) = v6;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
}
std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base(v15);
return a1;
}
| consumeTokenGroups:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x20]
MOV RDI,RSI
MOV ESI,ECX
CALL 0x00166180
XORPS XMM0,XMM0
MOV RDX,RSP
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
MOV RSI,qword ptr [R15 + 0x18]
MOV RDI,qword ptr [R15 + 0x20]
LAB_00164ec4:
MOV RCX,R14
XOR R8D,R8D
CALL 0x0012b616
TEST AL,AL
JZ 0x00164ee2
MOV RDI,RSP
XOR ESI,ESI
CALL 0x0012b4c8
TEST RAX,RAX
JZ 0x00164f0b
LAB_00164ee2:
MOV qword ptr [R15 + 0x20],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RBX + 0x10],0x0
LAB_00164ef1:
MOV RDI,RSP
CALL 0x0012bb44
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00164f0b:
MOV RCX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,RAX
SUB RDX,RCX
LEA RSI,[RAX + -0x48]
CMP RDX,0x48
MOV RDX,RCX
CMOVZ RDX,RSI
CMP RAX,RCX
CMOVZ RDX,RSI
MOV RSI,qword ptr [RDX + 0x8]
SUB RSI,qword ptr [RDX]
XOR R14D,R14D
CMP byte ptr [RDX + 0x10],0x0
CMOVZ RSI,R14
ADD qword ptr [R15 + 0x20],RSI
AND qword ptr [RBX + 0x10],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
PUSH 0x18
POP R12
SUB RAX,RCX
JZ 0x00164f66
CQO
IDIV R12
MOV R14,RAX
ADD R14,-0x3
LAB_00164f66:
XOR R13D,R13D
LEA R15,[RSP + 0x28]
XOR EBP,EBP
LAB_00164f70:
CMP R14,RBP
JZ 0x00164ef1
MOV RSI,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
SUB RCX,RSI
JZ 0x00164f9d
MOV RAX,RCX
CQO
IDIV R12
ADD RAX,-0x3
CMP RAX,RBP
JBE 0x00164f9d
ADD RSI,R13
JMP 0x00164fa4
LAB_00164f9d:
ADD RSI,RCX
ADD RSI,-0x48
LAB_00164fa4:
MOV RDI,R15
CALL 0x0012dd86
LAB_00164fac:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0014b314
LAB_00164fb7:
MOV RDI,R15
CALL 0x00125258
INC RBP
ADD R13,0x18
JMP 0x00164f70
|
/* minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char,
std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *
minja::Parser::consumeTokenGroups
(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1,
Parser *param_2,int8 param_3,int4 param_4)
{
int8 uVar1;
bool bVar2;
long lVar3;
long *plVar4;
long lVar5;
long *local_78;
long *plStack_70;
int8 local_68;
int8 uStack_60;
string local_50 [32];
uVar1 = *(int8 *)(param_2 + 0x20);
consumeSpaces(param_2,param_4);
local_68 = 0;
uStack_60 = 0;
local_78 = (long *)0x0;
plStack_70 = (long *)0x0;
/* try { // try from 00164ec4 to 00164edc has its CatchHandler @ 00164fc8 */
bVar2 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>
(*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_78,
param_3,0);
if ((bVar2) &&
(lVar3 = std::__cxx11::
match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
::position((match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
*)&local_78,0), lVar3 == 0)) {
plVar4 = local_78;
if ((long)plStack_70 - (long)local_78 == 0x48) {
plVar4 = plStack_70 + -9;
}
if (plStack_70 == local_78) {
plVar4 = plStack_70 + -9;
}
lVar5 = 0;
lVar3 = plVar4[1] - *plVar4;
if ((char)plVar4[2] == '\0') {
lVar3 = lVar5;
}
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar3;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
if ((long)plStack_70 - (long)local_78 != 0) {
lVar5 = ((long)plStack_70 - (long)local_78) / 0x18 + -3;
}
for (lVar3 = 0; lVar5 != lVar3; lVar3 = lVar3 + 1) {
/* try { // try from 00164fa4 to 00164fab has its CatchHandler @ 00164fcd */
std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str()
;
/* try { // try from 00164fac to 00164fb6 has its CatchHandler @ 00164fd2 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>(param_1,local_50);
std::__cxx11::string::~string(local_50);
}
}
else {
*(int8 *)(param_2 + 0x20) = uVar1;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
}
std::
_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
::~_Vector_base((_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
*)&local_78);
return param_1;
}
| |
44,691 | my_sync_dir_by_file | eloqsql/mysys/my_sync.c | int my_sync_dir_by_file(const char *file_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
char dir_name[FN_REFLEN];
size_t dir_name_length;
dirname_part(dir_name, file_name, &dir_name_length);
return my_sync_dir(dir_name, my_flags & ~MY_NOSYMLINKS);
#else
return 0;
#endif
} | O3 | c | my_sync_dir_by_file:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rsi, %rbx
movq %rdi, %rsi
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq -0x220(%rbp), %r14
leaq -0x228(%rbp), %rdx
movq %r14, %rdi
callq 0x2a67d
andl $0xfffffdff, %ebx # imm = 0xFFFFFDFF
movq %r14, %rdi
movq %rbx, %rsi
callq 0x313f1
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x314c2
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r14
popq %rbp
retq
callq 0x243e0
nop
| my_sync_dir_by_file:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 220h
mov rbx, rsi
mov rsi, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea r14, [rbp+var_220]
lea rdx, [rbp+var_228]
mov rdi, r14
call dirname_part
and ebx, 0FFFFFDFFh
mov rdi, r14
mov rsi, rbx
call my_sync_dir
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_314C2
add rsp, 220h
pop rbx
pop r14
pop rbp
retn
loc_314C2:
call ___stack_chk_fail
| long long my_sync_dir_by_file(_BYTE *a1, int a2)
{
long long v3; // [rsp+8h] [rbp-228h] BYREF
_BYTE v4[520]; // [rsp+10h] [rbp-220h] BYREF
unsigned long long v5; // [rsp+218h] [rbp-18h]
v5 = __readfsqword(0x28u);
dirname_part((long long)v4, a1, &v3);
return my_sync_dir(v4, a2 & 0xFFFFFDFF);
}
| my_sync_dir_by_file:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x220
MOV RBX,RSI
MOV RSI,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA R14,[RBP + -0x220]
LEA RDX,[RBP + -0x228]
MOV RDI,R14
CALL 0x0012a67d
AND EBX,0xfffffdff
MOV RDI,R14
MOV RSI,RBX
CALL 0x001313f1
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x001314c2
ADD RSP,0x220
POP RBX
POP R14
POP RBP
RET
LAB_001314c2:
CALL 0x001243e0
|
void my_sync_dir_by_file(int8 param_1,uint param_2)
{
long in_FS_OFFSET;
int1 local_230 [8];
int1 local_228 [520];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
dirname_part(local_228,param_1,local_230);
my_sync_dir(local_228,param_2 & 0xfffffdff);
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
44,692 | 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> const>>::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> const>>::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 0x97e8e
cmpl $0x1, %ecx
jne 0x97e9d
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x97ea6
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x97ea6
movq $0x1, 0x18(%rsp)
movq %rsp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7418c
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_97E8E
cmp ecx, 1
jnz short loc_97E9D
mov rax, [rax+8]
mov rax, [rax+8]
mov qword ptr [rsp+28h+var_20], rax
jmp short loc_97EA6
loc_97E8E:
mov rax, [rax+8]
mov rax, [rax+8]
mov qword ptr [rsp+28h+var_20+8], rax
jmp short loc_97EA6
loc_97E9D:
mov [rsp+28h+var_10], 1
loc_97EA6:
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 0x00197e8e
CMP ECX,0x1
JNZ 0x00197e9d
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00197ea6
LAB_00197e8e:
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00197ea6
LAB_00197e9d:
MOV qword ptr [RSP + 0x18],0x1
LAB_00197ea6:
MOV RSI,RSP
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0017418c
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;
}
| |
44,693 | my_uca_generate_pages | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_generate_pages(MY_CHARSET_LOADER *loader,
MY_UCA_WEIGHT_LEVEL *dst,
const MY_UCA_WEIGHT_LEVEL *src,
uint npages)
{
uint page;
for (page= 0; page < npages; page++)
{
if (dst->weights[page])
{
/* A page with explicit weights with no special rules */
continue;
}
if (!dst->lengths[page])
{
/*
A page with implicit weights with no special rules.
Keep dst->weights[page]==NULL and dst->lengths[page]==0.
Weights for this page will be generated at run time algorithmically,
using my_uca_scanner_next_implicit().
*/
continue;
}
/* Found a page with some special rules. */
if (my_uca_generate_page(loader, dst, src, page))
return TRUE;
}
return FALSE;
} | O0 | c | my_uca_generate_pages:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x4f408
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x4f3ca
jmp 0x4f3fd
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x28(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0x4f3dd
jmp 0x4f3fd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
callq 0x4f770
cmpb $0x0, %al
je 0x4f3fb
movb $0x1, -0x1(%rbp)
jmp 0x4f40c
jmp 0x4f3fd
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4f3ae
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_generate_pages:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], 0
loc_4F3AE:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_4F408
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov ecx, [rbp+var_28]
cmp qword ptr [rax+rcx*8], 0
jz short loc_4F3CA
jmp short loc_4F3FD
loc_4F3CA:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_28]
cmp byte ptr [rax+rcx], 0
jnz short loc_4F3DD
jmp short loc_4F3FD
loc_4F3DD:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_28]
call my_uca_generate_page
cmp al, 0
jz short loc_4F3FB
mov [rbp+var_1], 1
jmp short loc_4F40C
loc_4F3FB:
jmp short $+2
loc_4F3FD:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_4F3AE
loc_4F408:
mov [rbp+var_1], 0
loc_4F40C:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_uca_generate_pages(long long a1, long long a2, long long a3, unsigned int a4)
{
unsigned int i; // [rsp+8h] [rbp-28h]
for ( i = 0; i < a4; ++i )
{
if ( !*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i)
&& *(_BYTE *)(*(_QWORD *)(a2 + 8) + i)
&& (unsigned __int8)my_uca_generate_page(a1, a2, a3, i) )
{
return 1;
}
}
return 0;
}
| my_uca_generate_pages:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],0x0
LAB_0014f3ae:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x0014f408
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x28]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x0014f3ca
JMP 0x0014f3fd
LAB_0014f3ca:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x28]
CMP byte ptr [RAX + RCX*0x1],0x0
JNZ 0x0014f3dd
JMP 0x0014f3fd
LAB_0014f3dd:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x28]
CALL 0x0014f770
CMP AL,0x0
JZ 0x0014f3fb
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014f40c
LAB_0014f3fb:
JMP 0x0014f3fd
LAB_0014f3fd:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0014f3ae
LAB_0014f408:
MOV byte ptr [RBP + -0x1],0x0
LAB_0014f40c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_generate_pages(int8 param_1,long param_2,int8 param_3,uint param_4)
{
char cVar1;
uint local_30;
local_30 = 0;
while( true ) {
if (param_4 <= local_30) {
return 0;
}
if (((*(long *)(*(long *)(param_2 + 0x10) + (ulong)local_30 * 8) == 0) &&
(*(char *)(*(long *)(param_2 + 8) + (ulong)local_30) != '\0')) &&
(cVar1 = my_uca_generate_page(param_1,param_2,param_3,local_30), cVar1 != '\0')) break;
local_30 = local_30 + 1;
}
return 1;
}
| |
44,694 | my_thread_init_common_mutex | eloqsql/mysys/my_thr_init.c | static void my_thread_init_common_mutex(void)
{
mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW);
mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, MY_MUTEX_INIT_FAST);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_init(key_LOCK_localtime_r, &LOCK_localtime_r, MY_MUTEX_INIT_SLOW);
#endif
} | O0 | c | my_thread_init_common_mutex:
pushq %rbp
movq %rsp, %rbp
leaq 0x39344d(%rip), %rax # 0x44fd08
movl (%rax), %edi
leaq 0x393e2c(%rip), %rsi # 0x4506f0
leaq 0x3940f5(%rip), %rdx # 0x4509c0
callq 0xbd5c0
leaq 0x39341d(%rip), %rax # 0x44fcf4
movl (%rax), %edi
leaq 0x393e58(%rip), %rsi # 0x450738
leaq 0x3940d9(%rip), %rdx # 0x4509c0
callq 0xbd5c0
leaq 0x39340d(%rip), %rax # 0x44fd00
movl (%rax), %edi
leaq 0x393e84(%rip), %rsi # 0x450780
xorl %eax, %eax
movl %eax, %edx
callq 0xbd5c0
leaq 0x393408(%rip), %rax # 0x44fd14
movl (%rax), %edi
leaq 0x393eb3(%rip), %rsi # 0x4507c8
leaq 0x3940a4(%rip), %rdx # 0x4509c0
callq 0xbd5c0
leaq 0x3933c8(%rip), %rax # 0x44fcf0
movl (%rax), %edi
leaq 0x393edf(%rip), %rsi # 0x450810
leaq 0x394088(%rip), %rdx # 0x4509c0
callq 0xbd5c0
leaq 0x3933c0(%rip), %rax # 0x44fd04
movl (%rax), %edi
leaq 0x393f0b(%rip), %rsi # 0x450858
leaq 0x39406c(%rip), %rdx # 0x4509c0
callq 0xbd5c0
leaq 0x39338c(%rip), %rax # 0x44fcec
movl (%rax), %edi
leaq 0x393f37(%rip), %rsi # 0x4508a0
leaq 0x394050(%rip), %rdx # 0x4509c0
callq 0xbd5c0
popq %rbp
retq
nopw (%rax,%rax)
| my_thread_init_common_mutex:
push rbp
mov rbp, rsp
lea rax, key_THR_LOCK_open
mov edi, [rax]
lea rsi, THR_LOCK_open
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_2
lea rax, key_THR_LOCK_lock
mov edi, [rax]
lea rsi, THR_LOCK_lock
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_2
lea rax, key_THR_LOCK_myisam
mov edi, [rax]
lea rsi, THR_LOCK_myisam
xor eax, eax
mov edx, eax
call inline_mysql_mutex_init_2
lea rax, key_THR_LOCK_myisam_mmap
mov edi, [rax]
lea rsi, THR_LOCK_myisam_mmap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_2
lea rax, key_THR_LOCK_heap
mov edi, [rax]
lea rsi, THR_LOCK_heap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_2
lea rax, key_THR_LOCK_net
mov edi, [rax]
lea rsi, THR_LOCK_net
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_2
lea rax, key_THR_LOCK_charset
mov edi, [rax]
lea rsi, THR_LOCK_charset
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_2
pop rbp
retn
| long long my_thread_init_common_mutex()
{
inline_mysql_mutex_init_2(key_THR_LOCK_open, &THR_LOCK_open, &my_fast_mutexattr);
inline_mysql_mutex_init_2(key_THR_LOCK_lock, &THR_LOCK_lock, &my_fast_mutexattr);
inline_mysql_mutex_init_2(key_THR_LOCK_myisam, &THR_LOCK_myisam, 0LL);
inline_mysql_mutex_init_2(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, &my_fast_mutexattr);
inline_mysql_mutex_init_2(key_THR_LOCK_heap, &THR_LOCK_heap, &my_fast_mutexattr);
inline_mysql_mutex_init_2(key_THR_LOCK_net, &THR_LOCK_net, &my_fast_mutexattr);
return inline_mysql_mutex_init_2(key_THR_LOCK_charset, &THR_LOCK_charset, &my_fast_mutexattr);
}
| my_thread_init_common_mutex:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x54fd08]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x5506f0]
LEA RDX,[0x5509c0]
CALL 0x001bd5c0
LEA RAX,[0x54fcf4]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x550738]
LEA RDX,[0x5509c0]
CALL 0x001bd5c0
LEA RAX,[0x54fd00]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x550780]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001bd5c0
LEA RAX,[0x54fd14]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x5507c8]
LEA RDX,[0x5509c0]
CALL 0x001bd5c0
LEA RAX,[0x54fcf0]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x550810]
LEA RDX,[0x5509c0]
CALL 0x001bd5c0
LEA RAX,[0x54fd04]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x550858]
LEA RDX,[0x5509c0]
CALL 0x001bd5c0
LEA RAX,[0x54fcec]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x5508a0]
LEA RDX,[0x5509c0]
CALL 0x001bd5c0
POP RBP
RET
|
void my_thread_init_common_mutex(void)
{
inline_mysql_mutex_init(key_THR_LOCK_open,THR_LOCK_open,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_lock,THR_LOCK_lock,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_myisam,THR_LOCK_myisam,0);
inline_mysql_mutex_init(key_THR_LOCK_myisam_mmap,THR_LOCK_myisam_mmap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_heap,THR_LOCK_heap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_net,THR_LOCK_net,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_charset,THR_LOCK_charset,&my_fast_mutexattr);
return;
}
| |
44,695 | optimize_scope_make_ref | bluesky950520[P]quickjs/quickjs.c | static int optimize_scope_make_ref(JSContext *ctx, JSFunctionDef *s,
DynBuf *bc, uint8_t *bc_buf,
LabelSlot *ls, int pos_next,
int get_op, int var_idx)
{
int label_pos, end_pos, pos;
/* XXX: should optimize `loc(a) += expr` as `expr add_loc(a)`
but only if expr does not modify `a`.
should scan the code between pos_next and label_pos
for operations that can potentially change `a`:
OP_scope_make_ref(a), function calls, jumps and gosub.
*/
/* replace the reference get/put with normal variable
accesses */
if (bc_buf[pos_next] == OP_get_ref_value) {
dbuf_putc(bc, get_op);
dbuf_put_u16(bc, var_idx);
pos_next++;
}
/* remove the OP_label to make room for replacement */
/* label should have a refcount of 0 anyway */
/* XXX: should avoid this patch by inserting nops in phase 1 */
label_pos = ls->pos;
pos = label_pos - 5;
assert(bc_buf[pos] == OP_label);
/* label points to an instruction pair:
- insert3 / put_ref_value
- perm4 / put_ref_value
- rot3l / put_ref_value
- nop / put_ref_value
*/
end_pos = label_pos + 2;
if (bc_buf[label_pos] == OP_insert3)
bc_buf[pos++] = OP_dup;
bc_buf[pos] = get_op + 1;
put_u16(bc_buf + pos + 1, var_idx);
pos += 3;
/* pad with OP_nop */
while (pos < end_pos)
bc_buf[pos++] = OP_nop;
return pos_next;
} | O0 | c | optimize_scope_make_ref:
subq $0x38, %rsp
movl 0x48(%rsp), %eax
movl 0x40(%rsp), %eax
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movl %r9d, 0xc(%rsp)
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x3c, %eax
jne 0xbc07a
movq 0x20(%rsp), %rdi
movl 0x40(%rsp), %eax
movzbl %al, %esi
callq 0x1e6d0
movq 0x20(%rsp), %rdi
movl 0x48(%rsp), %eax
movzwl %ax, %esi
callq 0x79570
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
subl $0x5, %eax
movl %eax, (%rsp)
movl 0x8(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rax
movslq 0x8(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x16, %eax
jne 0xbc0c5
movq 0x18(%rsp), %rax
movl (%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, (%rsp)
movslq %ecx, %rcx
movb $0x11, (%rax,%rcx)
movl 0x40(%rsp), %eax
addl $0x1, %eax
movb %al, %dl
movq 0x18(%rsp), %rax
movslq (%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x18(%rsp), %rdi
movslq (%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
movl 0x48(%rsp), %eax
movzwl %ax, %esi
callq 0x79e10
movl (%rsp), %eax
addl $0x3, %eax
movl %eax, (%rsp)
movl (%rsp), %eax
cmpl 0x4(%rsp), %eax
jge 0xbc121
movq 0x18(%rsp), %rax
movl (%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, (%rsp)
movslq %ecx, %rcx
movb $-0x4e, (%rax,%rcx)
jmp 0xbc0ff
movl 0xc(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
| optimize_scope_make_ref:
sub rsp, 38h
mov eax, [rsp+38h+arg_8]
mov eax, [rsp+38h+arg_0]
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_20], rcx
mov [rsp+38h+var_28], r8
mov [rsp+38h+var_2C], r9d
mov rax, [rsp+38h+var_20]
movsxd rcx, [rsp+38h+var_2C]
movzx eax, byte ptr [rax+rcx]
cmp eax, 3Ch ; '<'
jnz short loc_BC07A
mov rdi, [rsp+38h+var_18]
mov eax, [rsp+38h+arg_0]
movzx esi, al
call dbuf_putc
mov rdi, [rsp+38h+var_18]
mov eax, [rsp+38h+arg_8]
movzx esi, ax
call dbuf_put_u16
mov eax, [rsp+38h+var_2C]
add eax, 1
mov [rsp+38h+var_2C], eax
loc_BC07A:
mov rax, [rsp+38h+var_28]
mov eax, [rax+4]
mov [rsp+38h+var_30], eax
mov eax, [rsp+38h+var_30]
sub eax, 5
mov [rsp+38h+var_38], eax
mov eax, [rsp+38h+var_30]
add eax, 2
mov [rsp+38h+var_34], eax
mov rax, [rsp+38h+var_20]
movsxd rcx, [rsp+38h+var_30]
movzx eax, byte ptr [rax+rcx]
cmp eax, 16h
jnz short loc_BC0C5
mov rax, [rsp+38h+var_20]
mov ecx, [rsp+38h+var_38]
mov edx, ecx
add edx, 1
mov [rsp+38h+var_38], edx
movsxd rcx, ecx
mov byte ptr [rax+rcx], 11h
loc_BC0C5:
mov eax, [rsp+38h+arg_0]
add eax, 1
mov dl, al
mov rax, [rsp+38h+var_20]
movsxd rcx, [rsp+38h+var_38]
mov [rax+rcx], dl
mov rdi, [rsp+38h+var_20]
movsxd rax, [rsp+38h+var_38]
add rdi, rax
add rdi, 1
mov eax, [rsp+38h+arg_8]
movzx esi, ax
call put_u16
mov eax, [rsp+38h+var_38]
add eax, 3
mov [rsp+38h+var_38], eax
loc_BC0FF:
mov eax, [rsp+38h+var_38]
cmp eax, [rsp+38h+var_34]
jge short loc_BC121
mov rax, [rsp+38h+var_20]
mov ecx, [rsp+38h+var_38]
mov edx, ecx
add edx, 1
mov [rsp+38h+var_38], edx
movsxd rcx, ecx
mov byte ptr [rax+rcx], 0B2h
jmp short loc_BC0FF
loc_BC121:
mov eax, [rsp+38h+var_2C]
add rsp, 38h
retn
| long long optimize_scope_make_ref(
long long a1,
long long a2,
_QWORD *a3,
long long a4,
long long a5,
unsigned int a6,
char a7,
__int16 a8)
{
int v8; // ecx
int v10; // [rsp+0h] [rbp-38h]
int i; // [rsp+0h] [rbp-38h]
int v12; // [rsp+8h] [rbp-30h]
unsigned int v13; // [rsp+Ch] [rbp-2Ch]
v13 = a6;
if ( *(_BYTE *)(a4 + (int)a6) == 60 )
{
dbuf_putc(a3, a7);
dbuf_put_u16(a3, a8);
++v13;
}
v12 = *(_DWORD *)(a5 + 4);
v10 = v12 - 5;
if ( *(_BYTE *)(a4 + v12) == 22 )
{
++v10;
*(_BYTE *)(a4 + v12 - 5) = 17;
}
*(_BYTE *)(a4 + v10) = a7 + 1;
put_u16((_WORD *)(v10 + a4 + 1), a8);
for ( i = v10 + 3; i < v12 + 2; ++i )
{
v8 = i;
*(_BYTE *)(a4 + v8) = -78;
}
return v13;
}
| optimize_scope_make_ref:
SUB RSP,0x38
MOV EAX,dword ptr [RSP + 0x48]
MOV EAX,dword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x10],R8
MOV dword ptr [RSP + 0xc],R9D
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x3c
JNZ 0x001bc07a
MOV RDI,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x40]
MOVZX ESI,AL
CALL 0x0011e6d0
MOV RDI,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x48]
MOVZX ESI,AX
CALL 0x00179570
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
LAB_001bc07a:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x8]
SUB EAX,0x5
MOV dword ptr [RSP],EAX
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,0x2
MOV dword ptr [RSP + 0x4],EAX
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x16
JNZ 0x001bc0c5
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP]
MOV EDX,ECX
ADD EDX,0x1
MOV dword ptr [RSP],EDX
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],0x11
LAB_001bc0c5:
MOV EAX,dword ptr [RSP + 0x40]
ADD EAX,0x1
MOV DL,AL
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RSP]
ADD RDI,RAX
ADD RDI,0x1
MOV EAX,dword ptr [RSP + 0x48]
MOVZX ESI,AX
CALL 0x00179e10
MOV EAX,dword ptr [RSP]
ADD EAX,0x3
MOV dword ptr [RSP],EAX
LAB_001bc0ff:
MOV EAX,dword ptr [RSP]
CMP EAX,dword ptr [RSP + 0x4]
JGE 0x001bc121
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP]
MOV EDX,ECX
ADD EDX,0x1
MOV dword ptr [RSP],EDX
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],0xb2
JMP 0x001bc0ff
LAB_001bc121:
MOV EAX,dword ptr [RSP + 0xc]
ADD RSP,0x38
RET
|
int optimize_scope_make_ref
(int8 param_1,int8 param_2,int8 param_3,long param_4,long param_5,
int param_6,char param_7,int2 param_8)
{
int iVar1;
int4 local_38;
int4 local_2c;
local_2c = param_6;
if (*(char *)(param_4 + param_6) == '<') {
dbuf_putc(param_3,param_7);
dbuf_put_u16(param_3,param_8);
local_2c = param_6 + 1;
}
iVar1 = *(int *)(param_5 + 4);
local_38 = iVar1 + -5;
if (*(char *)(param_4 + iVar1) == '\x16') {
local_38 = iVar1 + -4;
*(int1 *)(param_4 + (iVar1 + -5)) = 0x11;
}
*(char *)(param_4 + local_38) = param_7 + '\x01';
put_u16(param_4 + local_38 + 1,param_8);
local_38 = local_38 + 3;
while (local_38 < iVar1 + 2) {
*(int1 *)(param_4 + local_38) = 0xb2;
local_38 = local_38 + 1;
}
return local_2c;
}
| |
44,696 | optimize_scope_make_ref | bluesky950520[P]quickjs/quickjs.c | static int optimize_scope_make_ref(JSContext *ctx, JSFunctionDef *s,
DynBuf *bc, uint8_t *bc_buf,
LabelSlot *ls, int pos_next,
int get_op, int var_idx)
{
int label_pos, end_pos, pos;
/* XXX: should optimize `loc(a) += expr` as `expr add_loc(a)`
but only if expr does not modify `a`.
should scan the code between pos_next and label_pos
for operations that can potentially change `a`:
OP_scope_make_ref(a), function calls, jumps and gosub.
*/
/* replace the reference get/put with normal variable
accesses */
if (bc_buf[pos_next] == OP_get_ref_value) {
dbuf_putc(bc, get_op);
dbuf_put_u16(bc, var_idx);
pos_next++;
}
/* remove the OP_label to make room for replacement */
/* label should have a refcount of 0 anyway */
/* XXX: should avoid this patch by inserting nops in phase 1 */
label_pos = ls->pos;
pos = label_pos - 5;
assert(bc_buf[pos] == OP_label);
/* label points to an instruction pair:
- insert3 / put_ref_value
- perm4 / put_ref_value
- rot3l / put_ref_value
- nop / put_ref_value
*/
end_pos = label_pos + 2;
if (bc_buf[label_pos] == OP_insert3)
bc_buf[pos++] = OP_dup;
bc_buf[pos] = get_op + 1;
put_u16(bc_buf + pos + 1, var_idx);
pos += 3;
/* pad with OP_nop */
while (pos < end_pos)
bc_buf[pos++] = OP_nop;
return pos_next;
} | O1 | c | optimize_scope_make_ref:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %r8d, %r15d
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, %r14
movslq %ecx, %rax
cmpb $0x3c, (%rsi,%rax)
jne 0x6f0ce
movq %rdi, %r13
movzbl %r15b, %esi
callq 0x1b4d0
leaq 0x6(%rsp), %rsi
movw %bp, (%rsi)
movl $0x2, %edx
movq %r13, %rdi
callq 0x1b422
incl %ebx
movslq 0x4(%r12), %rdx
leaq -0x5(%rdx), %rax
cmpb $0x16, (%r14,%rdx)
jne 0x6f0e6
movb $0x11, (%r14,%rax)
leal -0x4(%rdx), %eax
incb %r15b
cltq
movb %r15b, (%r14,%rax)
movw %bp, 0x1(%r14,%rax)
leal 0x1(%rax), %ecx
cmpl %edx, %ecx
jge 0x6f116
leaq (%r14,%rax), %rdi
addq $0x3, %rdi
subl %eax, %edx
addl $-0x2, %edx
incq %rdx
movl $0xb2, %esi
callq 0xe350
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| optimize_scope_make_ref:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, r9d
mov r15d, r8d
mov ebx, ecx
mov r12, rdx
mov r14, rsi
movsxd rax, ecx
cmp byte ptr [rsi+rax], 3Ch ; '<'
jnz short loc_6F0CE
mov r13, rdi
movzx esi, r15b
call dbuf_putc
lea rsi, [rsp+38h+var_32]
mov [rsi], bp
mov edx, 2
mov rdi, r13
call dbuf_put
inc ebx
loc_6F0CE:
movsxd rdx, dword ptr [r12+4]
lea rax, [rdx-5]
cmp byte ptr [r14+rdx], 16h
jnz short loc_6F0E6
mov byte ptr [r14+rax], 11h
lea eax, [rdx-4]
loc_6F0E6:
inc r15b
cdqe
mov [r14+rax], r15b
mov [r14+rax+1], bp
lea ecx, [rax+1]
cmp ecx, edx
jge short loc_6F116
lea rdi, [r14+rax]
add rdi, 3
sub edx, eax
add edx, 0FFFFFFFEh
inc rdx
mov esi, 0B2h
call _memset
loc_6F116:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long optimize_scope_make_ref(_QWORD *a1, long long a2, long long a3, unsigned int a4, char a5, __int16 a6)
{
long long v6; // rax
unsigned int v9; // ebx
long long v11; // rdx
long long v12; // rax
_WORD v14[25]; // [rsp+0h] [rbp-32h] BYREF
v14[0] = HIWORD(v6);
v9 = a4;
if ( *(_BYTE *)(a2 + (int)a4) == 60 )
{
dbuf_putc(a1, a5);
v14[0] = a6;
dbuf_put(a1, (long long)v14, 2LL);
++v9;
}
v11 = *(int *)(a3 + 4);
v12 = v11 - 5;
if ( *(_BYTE *)(a2 + v11) == 22 )
{
*(_BYTE *)(a2 + v12) = 17;
LODWORD(v12) = v11 - 4;
}
*(_BYTE *)(a2 + (int)v12) = a5 + 1;
*(_WORD *)(a2 + (int)v12 + 1) = a6;
if ( (int)v12 + 1 < (int)v11 )
memset(a2 + (int)v12 + 3, 178LL, (unsigned int)(v11 - v12 - 2) + 1LL);
return v9;
}
| |||
44,697 | optimize_scope_make_ref | bluesky950520[P]quickjs/quickjs.c | static int optimize_scope_make_ref(JSContext *ctx, JSFunctionDef *s,
DynBuf *bc, uint8_t *bc_buf,
LabelSlot *ls, int pos_next,
int get_op, int var_idx)
{
int label_pos, end_pos, pos;
/* XXX: should optimize `loc(a) += expr` as `expr add_loc(a)`
but only if expr does not modify `a`.
should scan the code between pos_next and label_pos
for operations that can potentially change `a`:
OP_scope_make_ref(a), function calls, jumps and gosub.
*/
/* replace the reference get/put with normal variable
accesses */
if (bc_buf[pos_next] == OP_get_ref_value) {
dbuf_putc(bc, get_op);
dbuf_put_u16(bc, var_idx);
pos_next++;
}
/* remove the OP_label to make room for replacement */
/* label should have a refcount of 0 anyway */
/* XXX: should avoid this patch by inserting nops in phase 1 */
label_pos = ls->pos;
pos = label_pos - 5;
assert(bc_buf[pos] == OP_label);
/* label points to an instruction pair:
- insert3 / put_ref_value
- perm4 / put_ref_value
- rot3l / put_ref_value
- nop / put_ref_value
*/
end_pos = label_pos + 2;
if (bc_buf[label_pos] == OP_insert3)
bc_buf[pos++] = OP_dup;
bc_buf[pos] = get_op + 1;
put_u16(bc_buf + pos + 1, var_idx);
pos += 3;
/* pad with OP_nop */
while (pos < end_pos)
bc_buf[pos++] = OP_nop;
return pos_next;
} | O2 | c | optimize_scope_make_ref:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %r8d, %r15d
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, %r14
movslq %ecx, %rax
cmpb $0x3c, (%rsi,%rax)
jne 0x5d74c
movq %rdi, %r13
movzbl %r15b, %esi
callq 0x15d33
movzwl %bp, %esi
movq %r13, %rdi
callq 0x3cfc8
incl %ebx
movslq 0x4(%r12), %rax
leaq -0x5(%rax), %rcx
cmpb $0x16, (%r14,%rax)
jne 0x5d764
movb $0x11, (%r14,%rcx)
leal -0x4(%rax), %ecx
addq $0x2, %rax
incb %r15b
movslq %ecx, %rcx
movb %r15b, (%r14,%rcx)
movw %bp, 0x1(%r14,%rcx)
addl $0x3, %ecx
movslq %ecx, %rcx
cmpq %rax, %rcx
jge 0x5d78d
movb $-0x4e, (%r14,%rcx)
incq %rcx
jmp 0x5d77e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| optimize_scope_make_ref:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, r9d
mov r15d, r8d
mov ebx, ecx
mov r12, rdx
mov r14, rsi
movsxd rax, ecx
cmp byte ptr [rsi+rax], 3Ch ; '<'
jnz short loc_5D74C
mov r13, rdi
movzx esi, r15b
call dbuf_putc
movzx esi, bp
mov rdi, r13
call dbuf_put_u16
inc ebx
loc_5D74C:
movsxd rax, dword ptr [r12+4]
lea rcx, [rax-5]
cmp byte ptr [r14+rax], 16h
jnz short loc_5D764
mov byte ptr [r14+rcx], 11h
lea ecx, [rax-4]
loc_5D764:
add rax, 2
inc r15b
movsxd rcx, ecx
mov [r14+rcx], r15b
mov [r14+rcx+1], bp
add ecx, 3
movsxd rcx, ecx
loc_5D77E:
cmp rcx, rax
jge short loc_5D78D
mov byte ptr [r14+rcx], 0B2h
inc rcx
jmp short loc_5D77E
loc_5D78D:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long optimize_scope_make_ref(_QWORD *a1, long long a2, long long a3, unsigned int a4, char a5, __int16 a6)
{
unsigned int v8; // ebx
long long v10; // rax
long long v11; // rcx
long long v12; // rax
long long i; // rcx
v8 = a4;
if ( *(_BYTE *)(a2 + (int)a4) == 60 )
{
dbuf_putc(a1, a5);
dbuf_put_u16(a1, a6);
++v8;
}
v10 = *(int *)(a3 + 4);
v11 = v10 - 5;
if ( *(_BYTE *)(a2 + v10) == 22 )
{
*(_BYTE *)(a2 + v11) = 17;
LODWORD(v11) = v10 - 4;
}
v12 = v10 + 2;
*(_BYTE *)(a2 + (int)v11) = a5 + 1;
*(_WORD *)(a2 + (int)v11 + 1) = a6;
for ( i = (int)v11 + 3; i < v12; ++i )
*(_BYTE *)(a2 + i) = -78;
return v8;
}
| optimize_scope_make_ref:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,R9D
MOV R15D,R8D
MOV EBX,ECX
MOV R12,RDX
MOV R14,RSI
MOVSXD RAX,ECX
CMP byte ptr [RSI + RAX*0x1],0x3c
JNZ 0x0015d74c
MOV R13,RDI
MOVZX ESI,R15B
CALL 0x00115d33
MOVZX ESI,BP
MOV RDI,R13
CALL 0x0013cfc8
INC EBX
LAB_0015d74c:
MOVSXD RAX,dword ptr [R12 + 0x4]
LEA RCX,[RAX + -0x5]
CMP byte ptr [R14 + RAX*0x1],0x16
JNZ 0x0015d764
MOV byte ptr [R14 + RCX*0x1],0x11
LEA ECX,[RAX + -0x4]
LAB_0015d764:
ADD RAX,0x2
INC R15B
MOVSXD RCX,ECX
MOV byte ptr [R14 + RCX*0x1],R15B
MOV word ptr [R14 + RCX*0x1 + 0x1],BP
ADD ECX,0x3
MOVSXD RCX,ECX
LAB_0015d77e:
CMP RCX,RAX
JGE 0x0015d78d
MOV byte ptr [R14 + RCX*0x1],0xb2
INC RCX
JMP 0x0015d77e
LAB_0015d78d:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int optimize_scope_make_ref
(int8 param_1,long param_2,long param_3,int param_4,char param_5,
int2 param_6)
{
long lVar1;
int iVar2;
ulong uVar3;
long lVar4;
if (*(char *)(param_2 + param_4) == '<') {
dbuf_putc(param_1,param_5);
dbuf_put_u16(param_1,param_6);
param_4 = param_4 + 1;
}
iVar2 = *(int *)(param_3 + 4);
lVar1 = (long)iVar2;
uVar3 = lVar1 - 5;
if (*(char *)(param_2 + lVar1) == '\x16') {
*(int1 *)(param_2 + uVar3) = 0x11;
uVar3 = (ulong)(iVar2 - 4);
}
iVar2 = (int)uVar3;
*(char *)(param_2 + iVar2) = param_5 + '\x01';
*(int2 *)(param_2 + 1 + (long)iVar2) = param_6;
for (lVar4 = (long)(iVar2 + 3); lVar4 < lVar1 + 2; lVar4 = lVar4 + 1) {
*(int1 *)(param_2 + lVar4) = 0xb2;
}
return param_4;
}
| |
44,698 | js_typed_array_get_byteLength | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_get_byteLength(JSContext *ctx, JSValue this_val)
{
uint32_t size_log2;
JSTypedArray *ta;
JSObject *p;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return js_int32(0);
ta = p->u.typed_array;
if (!ta->track_rab)
return js_uint32(ta->length);
size_log2 = typed_array_size_log2(p->class_id);
return js_int64((int64_t)p->u.array.count << size_log2);
} | O0 | c | js_typed_array_get_byteLength:
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x57680
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xdddda
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0xdde6e
movq 0x8(%rsp), %rdi
callq 0x57710
cmpl $0x0, %eax
je 0xdddfc
xorl %edi, %edi
callq 0x32a00
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0xdde6e
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x28(%rax)
jne 0xdde2e
movq 0x10(%rsp), %rax
movl 0x24(%rax), %edi
callq 0x328a0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
jmp 0xdde6e
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %eax
subl $0x15, %eax
movslq %eax, %rcx
leaq 0x2d43b(%rip), %rax # 0x10b27f
movzbl (%rax,%rcx), %eax
movl %eax, 0x1c(%rsp)
movq 0x8(%rsp), %rax
movl 0x40(%rax), %eax
movl %eax, %edi
movl 0x1c(%rsp), %eax
movl %eax, %ecx
shlq %cl, %rdi
callq 0x361c0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
nopl (%rax)
| js_typed_array_get_byteLength:
sub rsp, 48h
mov [rsp+48h+var_20], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_28], rdi
mov rdi, [rsp+48h+var_28]
mov rsi, [rsp+48h+var_20]
mov rdx, [rsp+48h+var_18]
call get_typed_array
mov [rsp+48h+var_40], rax
cmp [rsp+48h+var_40], 0
jnz short loc_DDDDA
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp loc_DDE6E
loc_DDDDA:
mov rdi, [rsp+48h+var_40]
call typed_array_is_oob
cmp eax, 0
jz short loc_DDDFC
xor edi, edi
call js_int32
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
jmp short loc_DDE6E
loc_DDDFC:
mov rax, [rsp+48h+var_40]
mov rax, [rax+30h]
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_38]
cmp dword ptr [rax+28h], 0
jnz short loc_DDE2E
mov rax, [rsp+48h+var_38]
mov edi, [rax+24h]
call js_uint32
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
jmp short loc_DDE6E
loc_DDE2E:
mov rax, [rsp+48h+var_40]
movzx eax, word ptr [rax+6]
sub eax, 15h
movsxd rcx, eax
lea rax, typed_array_size_log2
movzx eax, byte ptr [rax+rcx]
mov [rsp+48h+var_2C], eax
mov rax, [rsp+48h+var_40]
mov eax, [rax+40h]
mov edi, eax
mov eax, [rsp+48h+var_2C]
mov ecx, eax
shl rdi, cl
call js_int64
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
loc_DDE6E:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
| long long js_typed_array_get_byteLength(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long typed_array; // [rsp+8h] [rbp-40h]
long long v16; // [rsp+10h] [rbp-38h]
long long v17; // [rsp+38h] [rbp-10h]
typed_array = get_typed_array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( typed_array )
{
if ( typed_array_is_oob(typed_array) )
{
return js_int32(0);
}
else
{
v16 = *(_QWORD *)(typed_array + 48);
if ( *(_DWORD *)(v16 + 40) )
return js_int64((unsigned long long)*(unsigned int *)(typed_array + 64) << typed_array_size_log2[*(unsigned __int16 *)(typed_array + 6) - 21]);
else
return js_uint32(*(_DWORD *)(v16 + 36));
}
}
else
{
LODWORD(v17) = 0;
}
return v17;
}
| js_typed_array_get_byteLength:
SUB RSP,0x48
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00157680
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001dddda
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x001dde6e
LAB_001dddda:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00157710
CMP EAX,0x0
JZ 0x001dddfc
XOR EDI,EDI
CALL 0x00132a00
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x001dde6e
LAB_001dddfc:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x28],0x0
JNZ 0x001dde2e
MOV RAX,qword ptr [RSP + 0x10]
MOV EDI,dword ptr [RAX + 0x24]
CALL 0x001328a0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
JMP 0x001dde6e
LAB_001dde2e:
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [RAX + 0x6]
SUB EAX,0x15
MOVSXD RCX,EAX
LEA RAX,[0x20b27f]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0x1c],EAX
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x40]
MOV EDI,EAX
MOV EAX,dword ptr [RSP + 0x1c]
MOV ECX,EAX
SHL RDI,CL
CALL 0x001361c0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
LAB_001dde6e:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16]
js_typed_array_get_byteLength(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
long lVar2;
int1 auVar3 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
lVar2 = get_typed_array(param_1,param_2,param_3);
if (lVar2 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
iVar1 = typed_array_is_oob(lVar2);
if (iVar1 == 0) {
if (*(int *)(*(long *)(lVar2 + 0x30) + 0x28) == 0) {
auVar3 = js_uint32(*(int4 *)(*(long *)(lVar2 + 0x30) + 0x24));
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
else {
auVar3 = js_int64((ulong)*(uint *)(lVar2 + 0x40) <<
((&typed_array_size_log2)[(int)(*(ushort *)(lVar2 + 6) - 0x15)] & 0x3f));
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
}
else {
auVar3 = js_int32(0);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
}
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
| |
44,699 | js_typed_array_get_byteLength | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_get_byteLength(JSContext *ctx, JSValue this_val)
{
uint32_t size_log2;
JSTypedArray *ta;
JSObject *p;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return js_int32(0);
ta = p->u.typed_array;
if (!ta->track_rab)
return js_uint32(ta->length);
size_log2 = typed_array_size_log2(p->class_id);
return js_int64((int64_t)p->u.array.count << size_log2);
} | O3 | c | js_typed_array_get_byteLength:
pushq %r14
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x827a0
movq %rsi, %rbx
movzwl 0x6(%rsi), %r14d
leal -0x15(%r14), %eax
cmpw $0xc, %ax
jae 0x827a0
movq %rbx, %rdi
callq 0x39ddd
testl %eax, %eax
je 0x827c4
xorl %ebx, %ebx
xorl %ecx, %ecx
xorl %edx, %edx
jmp 0x827b7
leaq 0x2151c(%rip), %rsi # 0xa3cc3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2214f
movl $0x6, %edx
xorl %ecx, %ecx
movl %ebx, %eax
orq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x30(%rbx), %rax
cmpl $0x0, 0x28(%rax)
je 0x8280d
leaq 0x1c98a(%rip), %rax # 0x9f15f
movb -0x15(%r14,%rax), %cl
movl 0x40(%rbx), %eax
shlq %cl, %rax
movslq %eax, %rcx
xorl %esi, %esi
cmpq %rax, %rcx
movl %ecx, %ecx
cvtsi2sd %rax, %xmm0
movq %xmm0, %rbx
cmoveq %rcx, %rbx
movl $0x7, %edx
cmoveq %rsi, %rdx
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
jmp 0x82839
movslq 0x24(%rax), %rax
xorl %ecx, %ecx
testq %rax, %rax
movl %eax, %edx
cvtsi2sd %rdx, %xmm0
movq %xmm0, %rbx
cmovnsq %rax, %rbx
movl $0x7, %edx
cmovnsq %rcx, %rdx
movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000
andq %rbx, %rcx
jmp 0x827b7
| js_typed_array_get_byteLength:
push r14
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz short loc_827A0
mov rbx, rsi
movzx r14d, word ptr [rsi+6]
lea eax, [r14-15h]
cmp ax, 0Ch
jnb short loc_827A0
mov rdi, rbx
call typed_array_is_oob
test eax, eax
jz short loc_827C4
xor ebx, ebx
xor ecx, ecx
xor edx, edx
jmp short loc_827B7
loc_827A0:
lea rsi, aNotATypedarray; "not a TypedArray"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
xor ecx, ecx
loc_827B7:
mov eax, ebx
or rax, rcx
add rsp, 8
pop rbx
pop r14
retn
loc_827C4:
mov rax, [rbx+30h]
cmp dword ptr [rax+28h], 0
jz short loc_8280D
lea rax, typed_array_size_log2
mov cl, [r14+rax-15h]
mov eax, [rbx+40h]
shl rax, cl
movsxd rcx, eax
xor esi, esi
cmp rcx, rax
mov ecx, ecx
cvtsi2sd xmm0, rax
movq rbx, xmm0
cmovz rbx, rcx
mov edx, 7
cmovz rdx, rsi
mov rcx, 0FFFFFFFF00000000h
jmp short loc_82839
loc_8280D:
movsxd rax, dword ptr [rax+24h]
xor ecx, ecx
test rax, rax
mov edx, eax
cvtsi2sd xmm0, rdx
movq rbx, xmm0
cmovns rbx, rax
mov edx, 7
cmovns rdx, rcx
mov rcx, 7FFFFFFF00000000h
loc_82839:
and rcx, rbx
jmp loc_827B7
| unsigned long long js_typed_array_get_byteLength(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long v15; // r14
double v16; // rbx
unsigned long long v17; // rcx
long long v19; // rax
unsigned long long v20; // rax
unsigned long long v21; // rcx
long long v22; // rax
if ( (_DWORD)a3 == -1 && (v15 = *(unsigned __int16 *)(a2 + 6), (unsigned __int16)(v15 - 21) < 0xCu) )
{
if ( typed_array_is_oob(a2) )
{
LODWORD(v16) = 0;
v17 = 0LL;
}
else
{
v19 = *(_QWORD *)(a2 + 48);
if ( *(_DWORD *)(v19 + 40) )
{
v20 = (unsigned long long)*(unsigned int *)(a2 + 64) << typed_array_size_log2[v15 - 21];
v16 = (double)(int)v20;
if ( (int)v20 == v20 )
*(_QWORD *)&v16 = (unsigned int)v20;
v21 = 0xFFFFFFFF00000000LL;
}
else
{
v22 = *(int *)(v19 + 36);
v16 = (double)(int)v22;
if ( v22 >= 0 )
v16 = *(double *)&v22;
v21 = 0x7FFFFFFF00000000LL;
}
v17 = *(_QWORD *)&v16 & v21;
}
}
else
{
LODWORD(v16) = 0;
JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14);
v17 = 0LL;
}
return v17 | LODWORD(v16);
}
| js_typed_array_get_byteLength:
PUSH R14
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x001827a0
MOV RBX,RSI
MOVZX R14D,word ptr [RSI + 0x6]
LEA EAX,[R14 + -0x15]
CMP AX,0xc
JNC 0x001827a0
MOV RDI,RBX
CALL 0x00139ddd
TEST EAX,EAX
JZ 0x001827c4
XOR EBX,EBX
XOR ECX,ECX
XOR EDX,EDX
JMP 0x001827b7
LAB_001827a0:
LEA RSI,[0x1a3cc3]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0012214f
MOV EDX,0x6
XOR ECX,ECX
LAB_001827b7:
MOV EAX,EBX
OR RAX,RCX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001827c4:
MOV RAX,qword ptr [RBX + 0x30]
CMP dword ptr [RAX + 0x28],0x0
JZ 0x0018280d
LEA RAX,[0x19f15f]
MOV CL,byte ptr [R14 + RAX*0x1 + -0x15]
MOV EAX,dword ptr [RBX + 0x40]
SHL RAX,CL
MOVSXD RCX,EAX
XOR ESI,ESI
CMP RCX,RAX
MOV ECX,ECX
CVTSI2SD XMM0,RAX
MOVQ RBX,XMM0
CMOVZ RBX,RCX
MOV EDX,0x7
CMOVZ RDX,RSI
MOV RCX,-0x100000000
JMP 0x00182839
LAB_0018280d:
MOVSXD RAX,dword ptr [RAX + 0x24]
XOR ECX,ECX
TEST RAX,RAX
MOV EDX,EAX
CVTSI2SD XMM0,RDX
MOVQ RBX,XMM0
CMOVNS RBX,RAX
MOV EDX,0x7
CMOVNS RDX,RCX
MOV RCX,0x7fffffff00000000
LAB_00182839:
AND RCX,RBX
JMP 0x001827b7
|
int1 [16] js_typed_array_get_byteLength(int8 param_1,long param_2,int param_3)
{
ushort uVar1;
uint uVar2;
int iVar3;
ulong uVar4;
double dVar5;
int8 uVar6;
double dVar7;
bool bVar8;
int1 auVar9 [16];
if ((param_3 == -1) && (uVar1 = *(ushort *)(param_2 + 6), (ushort)(uVar1 - 0x15) < 0xc)) {
iVar3 = typed_array_is_oob(param_2);
if (iVar3 == 0) {
if (*(int *)(*(long *)(param_2 + 0x30) + 0x28) == 0) {
uVar2 = *(uint *)(*(long *)(param_2 + 0x30) + 0x24);
dVar5 = (double)(long)(int)uVar2;
dVar7 = (double)uVar2;
if (-1 < (long)dVar5) {
dVar7 = dVar5;
}
uVar6 = 7;
if (-1 < (long)dVar5) {
uVar6 = 0;
}
uVar4 = 0x7fffffff00000000;
}
else {
uVar4 = (ulong)*(uint *)(param_2 + 0x40) << ("toSorted"[(ulong)uVar1 + 6] & 0x3fU);
bVar8 = (long)(int)uVar4 == uVar4;
dVar7 = (double)(long)uVar4;
if (bVar8) {
dVar7 = (double)(uVar4 & 0xffffffff);
}
uVar6 = 7;
if (bVar8) {
uVar6 = 0;
}
uVar4 = 0xffffffff00000000;
}
uVar4 = uVar4 & (ulong)dVar7;
}
else {
dVar7 = 0.0;
uVar4 = 0;
uVar6 = 0;
}
}
else {
dVar7 = 0.0;
JS_ThrowTypeError(param_1,"not a TypedArray");
uVar6 = 6;
uVar4 = 0;
}
auVar9._0_8_ = (ulong)dVar7 & 0xffffffff | uVar4;
auVar9._8_8_ = uVar6;
return auVar9;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.