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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33,000 | aimrt::co::AimRTScheduler::SchedulerAfterOperationState<unifex::_await_tfx::_awaitable_base<unifex::_task::_promise<void>::type, void>::type::_rec>::start()::'lambda'()::('lambda'()&&) | aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_module_cpp_interface/../aimrt_module_cpp_interface/co/aimrt_context.h | void start() noexcept {
executor_ref_.ExecuteAfter(dt_, [r{std::move(receiver_)}]() mutable {
try {
unifex::set_value(std::move(r));
} catch (...) {
unifex::set_error(std::move(r), std::current_exception());
}
});
} | O0 | c | aimrt::co::AimRTScheduler::SchedulerAfterOperationState<unifex::_await_tfx::_awaitable_base<unifex::_task::_promise<void>::type, void>::type::_rec>::start()::'lambda'()::('lambda'()&&):
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rsi
leaq 0x2e6509(%rip), %rdi # 0x3df739
callq 0xf69d0
popq %rax
retq
nopw (%rax,%rax)
| _ZZN5aimrt2co14AimRTScheduler28SchedulerAfterOperationStateIN6unifex10_await_tfx15_awaitable_baseINS3_5_task8_promiseIvE4typeEvE4type4_recEE5startEvENUlvE_clEv:
push rax
mov [rsp+8+var_8], rdi
mov rsi, [rsp+8+var_8]
lea rdi, _ZN6unifex8_rec_cpo9set_valueE; unifex::_rec_cpo::set_value
call _ZNK6unifex8_rec_cpo13_set_value_fnclINS_10_await_tfx15_awaitable_baseINS_5_task8_promiseIvE4typeEvE4type4_recEJEQnt13tag_invocableIS1_T_DpT0_EEENS_3_ifIX13tag_invocableIS1_SC_SE_EEE5applyINS_12meta_quote1_INS_11_tag_invoke19tag_invoke_result_tEE10bind_frontIJS1_EEENSI_INS1_25set_value_member_result_tEEEE5applyISC_SE_EEOSC_DpOSD_
pop rax
retn
| long long aimrt::co::AimRTScheduler::SchedulerAfterOperationState<unifex::_await_tfx::_awaitable_base<unifex::_task::_promise<void>::type,void>::type::_rec>::start(void)::{lambda(void)#1}::operator()(
long long a1)
{
ZNK6unifex8_rec_cpo13_set_value_fnclINS_10_await_tfx15_awaitable_baseINS_5_task8_promiseIvE4typeEvE4type4_recEJEQnt13tag_invocableIS1_T_DpT0_EEENS_3_ifIX13tag_invocableIS1_SC_SE_EEE5applyINS_12meta_quote1_INS_11_tag_invoke19tag_invoke_result_tEE10bind_frontIJS1_EEENSI_INS1_25set_value_member_result_tEEEE5applyISC_SE_EEOSC_DpOSD_(
(long long)&unifex::_rec_cpo::set_value,
a1);
return a1;
}
| operator():
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RSI,qword ptr [RSP]
LEA RDI,[0x4df739]
CALL 0x001f69d0
POP RAX
RET
|
/* aimrt::co::AimRTScheduler::SchedulerAfterOperationState<unifex::_await_tfx::_awaitable_base<unifex::_task::_promise<void>::type,
void>::type::_rec>::start()::{lambda()#1}::TEMPNAMEPLACEHOLDERVALUE() */
_lambda___1_ * __thiscall
aimrt::co::AimRTScheduler::
SchedulerAfterOperationState<unifex::_await_tfx::_awaitable_base<unifex::_task::_promise<void>::type,void>::type::_rec>
::start()::{lambda()#1}::operator()(_lambda___1_ *this)
{
_ZNK6unifex8_rec_cpo13_set_value_fnclINS_10_await_tfx15_awaitable_baseINS_5_task8_promiseIvE4typeEvE4type4_recEJEQnt13tag_invocableIS1_T_DpT0_EEENS_3_ifIX13tag_invocableIS1_SC_SE_EEE5applyINS_12meta_quote1_INS_11_tag_invoke19tag_invoke_result_tEE10bind_frontIJS1_EEENSI_INS1_25set_value_member_result_tEEEE5applyISC_SE_EEOSC_DpOSD_
(&unifex::_rec_cpo::set_value,this);
return this;
}
| |
33,001 | find_sh | bluesky950520[P]quickjs/quickjs-libc.c | static JSOSSignalHandler *find_sh(JSThreadState *ts, int sig_num)
{
JSOSSignalHandler *sh;
struct list_head *el;
list_for_each(el, &ts->os_signal_handlers) {
sh = list_entry(el, JSOSSignalHandler, link);
if (sh->sig_num == sig_num)
return sh;
}
return NULL;
} | O0 | c | find_sh:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movq -0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rsp)
movq -0x28(%rsp), %rax
movq -0x10(%rsp), %rcx
addq $0x10, %rcx
cmpq %rcx, %rax
je 0x1ce00
movq -0x28(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
movl 0x10(%rax), %eax
cmpl -0x14(%rsp), %eax
jne 0x1cdee
movq -0x20(%rsp), %rax
movq %rax, -0x8(%rsp)
jmp 0x1ce09
jmp 0x1cdf0
movq -0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rsp)
jmp 0x1cdb7
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nop
| find_sh:
mov [rsp+var_10], rdi
mov [rsp+var_14], esi
mov rax, [rsp+var_10]
mov rax, [rax+18h]
mov [rsp+var_28], rax
loc_1CDB7:
mov rax, [rsp+var_28]
mov rcx, [rsp+var_10]
add rcx, 10h
cmp rax, rcx
jz short loc_1CE00
mov rax, [rsp+var_28]
mov [rsp+var_20], rax
mov rax, [rsp+var_20]
mov eax, [rax+10h]
cmp eax, [rsp+var_14]
jnz short loc_1CDEE
mov rax, [rsp+var_20]
mov [rsp+var_8], rax
jmp short loc_1CE09
loc_1CDEE:
jmp short $+2
loc_1CDF0:
mov rax, [rsp+var_28]
mov rax, [rax+8]
mov [rsp+var_28], rax
jmp short loc_1CDB7
loc_1CE00:
mov [rsp+var_8], 0
loc_1CE09:
mov rax, [rsp+var_8]
retn
| long long find_sh(long long a1, int a2)
{
long long i; // [rsp+0h] [rbp-28h]
for ( i = *(_QWORD *)(a1 + 24); i != a1 + 16; i = *(_QWORD *)(i + 8) )
{
if ( *(_DWORD *)(i + 16) == a2 )
return i;
}
return 0LL;
}
| find_sh:
MOV qword ptr [RSP + -0x10],RDI
MOV dword ptr [RSP + -0x14],ESI
MOV RAX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + -0x28],RAX
LAB_0011cdb7:
MOV RAX,qword ptr [RSP + -0x28]
MOV RCX,qword ptr [RSP + -0x10]
ADD RCX,0x10
CMP RAX,RCX
JZ 0x0011ce00
MOV RAX,qword ptr [RSP + -0x28]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV EAX,dword ptr [RAX + 0x10]
CMP EAX,dword ptr [RSP + -0x14]
JNZ 0x0011cdee
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RSP + -0x8],RAX
JMP 0x0011ce09
LAB_0011cdee:
JMP 0x0011cdf0
LAB_0011cdf0:
MOV RAX,qword ptr [RSP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + -0x28],RAX
JMP 0x0011cdb7
LAB_0011ce00:
MOV qword ptr [RSP + -0x8],0x0
LAB_0011ce09:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
long find_sh(long param_1,int param_2)
{
long local_28;
local_28 = *(long *)(param_1 + 0x18);
while( true ) {
if (local_28 == param_1 + 0x10) {
return 0;
}
if (*(int *)(local_28 + 0x10) == param_2) break;
local_28 = *(long *)(local_28 + 8);
}
return local_28;
}
| |
33,002 | common_sampler_type_to_chr(common_sampler_type) | monkey531[P]llama/common/sampling.cpp | char common_sampler_type_to_chr(enum common_sampler_type cnstr) {
switch (cnstr) {
case COMMON_SAMPLER_TYPE_DRY: return 'd';
case COMMON_SAMPLER_TYPE_TOP_K: return 'k';
case COMMON_SAMPLER_TYPE_TYPICAL_P: return 'y';
case COMMON_SAMPLER_TYPE_TOP_P: return 'p';
case COMMON_SAMPLER_TYPE_MIN_P: return 'm';
case COMMON_SAMPLER_TYPE_TEMPERATURE: return 't';
case COMMON_SAMPLER_TYPE_XTC: return 'x';
case COMMON_SAMPLER_TYPE_INFILL: return 'i';
case COMMON_SAMPLER_TYPE_PENALTIES: return 'e';
default : return '?';
}
} | O2 | cpp | common_sampler_type_to_chr(common_sampler_type):
decl %edi
movb $0x3f, %al
cmpl $0x9, %edi
ja 0xb3dc7
movl %edi, %eax
leaq 0x22718(%rip), %rcx # 0xd64dc
movb (%rax,%rcx), %al
retq
| _Z26common_sampler_type_to_chr19common_sampler_type:
dec edi
mov al, 3Fh ; '?'
cmp edi, 9
ja short locret_B3DC7
mov eax, edi
lea rcx, aDkpmYtxie; "dkpm?ytxie"
mov al, [rax+rcx]
locret_B3DC7:
retn
| char common_sampler_type_to_chr(int a1)
{
unsigned int v1; // edi
char result; // al
v1 = a1 - 1;
result = 63;
if ( v1 <= 9 )
return aDkpmYtxie[v1];
return result;
}
| common_sampler_type_to_chr:
DEC EDI
MOV AL,0x3f
CMP EDI,0x9
JA 0x001b3dc7
MOV EAX,EDI
LEA RCX,[0x1d64dc]
MOV AL,byte ptr [RAX + RCX*0x1]
LAB_001b3dc7:
RET
|
/* common_sampler_type_to_chr(common_sampler_type) */
char common_sampler_type_to_chr(int param_1)
{
char cVar1;
cVar1 = '?';
if (param_1 - 1U < 10) {
cVar1 = "dkpm?ytxie"[param_1 - 1U];
}
return cVar1;
}
| |
33,003 | mi_bin_search | eloqsql/storage/myisam/mi_search.c | int _mi_bin_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
uchar *buff __attribute__((unused)), my_bool *last_key)
{
reg4 int start,mid,end,save_end;
int UNINIT_VAR(flag);
uint totlength,nod_flag,not_used[2];
DBUG_ENTER("_mi_bin_search");
totlength=keyinfo->keylength+(nod_flag=mi_test_if_nod(page));
start=0; mid=1;
save_end=end=(int) ((mi_getint(page)-2-nod_flag)/totlength-1);
DBUG_PRINT("test",("mi_getint: %d end: %d",mi_getint(page),end));
page+=2+nod_flag;
while (start != end)
{
mid= (start+end)/2;
if ((flag=ha_key_cmp(keyinfo->seg,page+(uint) mid*totlength,key,key_len,
comp_flag, not_used))
>= 0)
end=mid;
else
start=mid+1;
}
if (mid != start)
flag=ha_key_cmp(keyinfo->seg,page+(uint) start*totlength,key,key_len,
comp_flag, not_used);
if (flag < 0)
start++; /* point at next, bigger key */
*ret_pos=page+(uint) start*totlength;
*last_key= end == save_end;
DBUG_PRINT("exit",("flag: %d keypos: %d",flag,start));
DBUG_RETURN(flag);
} | O3 | c | mi_bin_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, -0x34(%rbp)
movl %r8d, -0x30(%rbp)
movq %rcx, -0x50(%rbp)
movq %rdx, %rcx
movq %rsi, -0x48(%rbp)
movzwl 0x12(%rsi), %r15d
movzbl (%rdx), %eax
xorl %r14d, %r14d
movl $0x0, %ebx
testb %al, %al
jns 0xa3d3b
movq (%rdi), %rdx
movl 0x17c(%rdx), %ebx
movq 0x20(%rbp), %r12
movq 0x10(%rbp), %r13
addl %ebx, %r15d
movzbl 0x1(%rcx), %edx
andl $0x7f, %eax
shll $0x8, %eax
subl %ebx, %eax
addl %edx, %eax
addl $-0x2, %eax
xorl %edx, %edx
divl %r15d
addl $0x2, %ebx
addq %rcx, %rbx
decl %eax
movl %eax, -0x2c(%rbp)
je 0xa3dda
movq %rbx, -0x40(%rbp)
movl %r15d, %ebx
xorl %r15d, %r15d
movl -0x2c(%rbp), %eax
movl %eax, %r12d
leal (%r15,%r12), %eax
movl %eax, %r13d
shrl $0x1f, %r13d
addl %eax, %r13d
sarl %r13d
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rdi
movl %r13d, %esi
imull %ebx, %esi
addq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
leaq -0x58(%rbp), %r9
callq 0xc253e
movl %r13d, %r14d
testl %eax, %eax
jns 0xa3dbe
leal 0x1(%r13), %r15d
movl %r12d, %r14d
movl %r14d, %r12d
cmpl %r14d, %r15d
jne 0xa3d79
cmpl %r14d, %r13d
movl %ebx, %r15d
movq -0x40(%rbp), %rbx
movq 0x20(%rbp), %r12
movq 0x10(%rbp), %r13
je 0xa3e00
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rdi
movl %r14d, %esi
imull %r15d, %esi
addq %rbx, %rsi
leaq -0x58(%rbp), %r9
movq -0x50(%rbp), %rdx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
callq 0xc253e
movl %eax, %ecx
shrl $0x1f, %ecx
addl %r14d, %ecx
imull %r15d, %ecx
addq %rcx, %rbx
movq %rbx, (%r13)
cmpl -0x2c(%rbp), %r14d
sete (%r12)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_bin_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_34], r9d
mov [rbp+var_30], r8d
mov [rbp+var_50], rcx
mov rcx, rdx
mov [rbp+var_48], rsi
movzx r15d, word ptr [rsi+12h]
movzx eax, byte ptr [rdx]
xor r14d, r14d
mov ebx, 0
test al, al
jns short loc_A3D3B
mov rdx, [rdi]
mov ebx, [rdx+17Ch]
loc_A3D3B:
mov r12, [rbp+arg_10]
mov r13, [rbp+arg_0]
add r15d, ebx
movzx edx, byte ptr [rcx+1]
and eax, 7Fh
shl eax, 8
sub eax, ebx
add eax, edx
add eax, 0FFFFFFFEh
xor edx, edx
div r15d
add ebx, 2
add rbx, rcx
dec eax
mov [rbp+var_2C], eax
jz short loc_A3DDA
mov [rbp+var_40], rbx
mov ebx, r15d
xor r15d, r15d
mov eax, [rbp+var_2C]
mov r12d, eax
loc_A3D79:
lea eax, [r15+r12]
mov r13d, eax
shr r13d, 1Fh
add r13d, eax
sar r13d, 1
mov rax, [rbp+var_48]
mov rdi, [rax+28h]
mov esi, r13d
imul esi, ebx
add rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_30]
mov r8d, [rbp+var_34]
lea r9, [rbp+var_58]
call ha_key_cmp
mov r14d, r13d
test eax, eax
jns short loc_A3DBE
lea r15d, [r13+1]
mov r14d, r12d
loc_A3DBE:
mov r12d, r14d
cmp r15d, r14d
jnz short loc_A3D79
cmp r13d, r14d
mov r15d, ebx
mov rbx, [rbp+var_40]
mov r12, [rbp+arg_10]
mov r13, [rbp+arg_0]
jz short loc_A3E00
loc_A3DDA:
mov rax, [rbp+var_48]
mov rdi, [rax+28h]
mov esi, r14d
imul esi, r15d
add rsi, rbx
lea r9, [rbp+var_58]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_30]
mov r8d, [rbp+var_34]
call ha_key_cmp
loc_A3E00:
mov ecx, eax
shr ecx, 1Fh
add ecx, r14d
imul ecx, r15d
add rbx, rcx
mov [r13+0], rbx
cmp r14d, [rbp+var_2C]
setz byte ptr [r12]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_bin_search(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned int a5,
unsigned int a6,
_QWORD *a7,
int a8,
bool *a9)
{
int v9; // r14d
int v10; // ebx
bool *v11; // r12
_QWORD *v12; // r13
unsigned int v13; // r15d
int v14; // eax
long long v15; // rbx
unsigned int v16; // ebx
int v17; // r15d
int v18; // r12d
int v19; // r13d
long long result; // rax
bool v21; // zf
char v22[8]; // [rsp+8h] [rbp-58h] BYREF
long long v23; // [rsp+10h] [rbp-50h]
long long v24; // [rsp+18h] [rbp-48h]
long long v25; // [rsp+20h] [rbp-40h]
unsigned int v26; // [rsp+2Ch] [rbp-34h]
unsigned int v27; // [rsp+30h] [rbp-30h]
int v28; // [rsp+34h] [rbp-2Ch]
v26 = a6;
v27 = a5;
v23 = a4;
v24 = a2;
v9 = 0;
v10 = 0;
if ( *(char *)a3 < 0 )
v10 = *(_DWORD *)(*(_QWORD *)a1 + 380LL);
v11 = a9;
v12 = a7;
v13 = v10 + *(unsigned __int16 *)(a2 + 18);
v14 = (*(unsigned __int8 *)(a3 + 1) + ((unsigned __int8)(*(_BYTE *)a3 & 0x7F) << 8) - v10 - 2) / v13;
v15 = a3 + (unsigned int)(v10 + 2);
v28 = v14 - 1;
if ( v14 == 1 )
goto LABEL_9;
v25 = v15;
v16 = v13;
v17 = 0;
v18 = v28;
do
{
v19 = (v17 + v18) / 2;
result = ha_key_cmp(*(_QWORD *)(v24 + 40), v25 + v16 * v19, v23, v27, v26, v22);
v9 = v19;
if ( (int)result < 0 )
{
v17 = v19 + 1;
v9 = v18;
}
v18 = v9;
}
while ( v17 != v9 );
v21 = v19 == v9;
v13 = v16;
v15 = v25;
v11 = a9;
v12 = a7;
if ( !v21 )
LABEL_9:
result = ha_key_cmp(*(_QWORD *)(v24 + 40), v15 + v13 * v9, v23, v27, v26, v22);
*v12 = v13 * (v9 + ((unsigned int)result >> 31)) + v15;
*v11 = v9 == v28;
return result;
}
| _mi_bin_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV dword ptr [RBP + -0x34],R9D
MOV dword ptr [RBP + -0x30],R8D
MOV qword ptr [RBP + -0x50],RCX
MOV RCX,RDX
MOV qword ptr [RBP + -0x48],RSI
MOVZX R15D,word ptr [RSI + 0x12]
MOVZX EAX,byte ptr [RDX]
XOR R14D,R14D
MOV EBX,0x0
TEST AL,AL
JNS 0x001a3d3b
MOV RDX,qword ptr [RDI]
MOV EBX,dword ptr [RDX + 0x17c]
LAB_001a3d3b:
MOV R12,qword ptr [RBP + 0x20]
MOV R13,qword ptr [RBP + 0x10]
ADD R15D,EBX
MOVZX EDX,byte ptr [RCX + 0x1]
AND EAX,0x7f
SHL EAX,0x8
SUB EAX,EBX
ADD EAX,EDX
ADD EAX,-0x2
XOR EDX,EDX
DIV R15D
ADD EBX,0x2
ADD RBX,RCX
DEC EAX
MOV dword ptr [RBP + -0x2c],EAX
JZ 0x001a3dda
MOV qword ptr [RBP + -0x40],RBX
MOV EBX,R15D
XOR R15D,R15D
MOV EAX,dword ptr [RBP + -0x2c]
MOV R12D,EAX
LAB_001a3d79:
LEA EAX,[R15 + R12*0x1]
MOV R13D,EAX
SHR R13D,0x1f
ADD R13D,EAX
SAR R13D,0x1
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX + 0x28]
MOV ESI,R13D
IMUL ESI,EBX
ADD RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x30]
MOV R8D,dword ptr [RBP + -0x34]
LEA R9,[RBP + -0x58]
CALL 0x001c253e
MOV R14D,R13D
TEST EAX,EAX
JNS 0x001a3dbe
LEA R15D,[R13 + 0x1]
MOV R14D,R12D
LAB_001a3dbe:
MOV R12D,R14D
CMP R15D,R14D
JNZ 0x001a3d79
CMP R13D,R14D
MOV R15D,EBX
MOV RBX,qword ptr [RBP + -0x40]
MOV R12,qword ptr [RBP + 0x20]
MOV R13,qword ptr [RBP + 0x10]
JZ 0x001a3e00
LAB_001a3dda:
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX + 0x28]
MOV ESI,R14D
IMUL ESI,R15D
ADD RSI,RBX
LEA R9,[RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x30]
MOV R8D,dword ptr [RBP + -0x34]
CALL 0x001c253e
LAB_001a3e00:
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,R14D
IMUL ECX,R15D
ADD RBX,RCX
MOV qword ptr [R13],RBX
CMP R14D,dword ptr [RBP + -0x2c]
SETZ byte ptr [R12]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _mi_bin_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5,
int4 param_6,int8 *param_7,int8 param_8,int8 param_9)
{
int iVar1;
int iVar2;
int iVar3;
byte *pbVar4;
int iVar5;
uint uVar6;
int iVar7;
int1 local_60 [8];
int8 local_58;
long local_50;
byte *local_48;
int4 local_3c;
int4 local_38;
int local_34;
iVar3 = 0;
if ((char)*param_3 < '\0') {
iVar3 = *(int *)(*param_1 + 0x17c);
}
uVar6 = (uint)*(ushort *)(param_2 + 0x12) + iVar3;
iVar1 = ((((*param_3 & 0x7f) * 0x100 - iVar3) + (uint)param_3[1]) - 2) / uVar6 - 1;
pbVar4 = param_3 + (iVar3 + 2);
iVar7 = 0;
local_58 = param_4;
local_50 = param_2;
local_3c = param_6;
local_38 = param_5;
local_34 = iVar1;
if (iVar1 != 0) {
iVar7 = 0;
local_48 = param_3 + (iVar3 + 2);
do {
iVar5 = (iVar7 + iVar1) / 2;
iVar2 = ha_key_cmp(*(int8 *)(local_50 + 0x28),local_48 + iVar5 * uVar6,local_58,local_38
,local_3c,local_60);
iVar3 = iVar5;
if (iVar2 < 0) {
iVar7 = iVar5 + 1;
iVar3 = iVar1;
}
iVar1 = iVar3;
} while (iVar7 != iVar1);
pbVar4 = local_48;
iVar7 = iVar1;
if (iVar5 == iVar1) goto LAB_001a3e00;
}
iVar2 = ha_key_cmp(*(int8 *)(local_50 + 0x28),pbVar4 + iVar7 * uVar6,local_58,local_38,
local_3c,local_60);
LAB_001a3e00:
*param_7 = pbVar4 + (iVar7 - (iVar2 >> 0x1f)) * uVar6;
*(bool *)param_9 = iVar7 == local_34;
return;
}
| |
33,004 | ma_net_init | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_init(NET *net, MARIADB_PVIO* pvio)
{
if (!(net->buff=(uchar*) malloc(net_buffer_length)))
return 1;
if (!net->extension)
return 1;
memset(net->buff, 0, net_buffer_length);
net->max_packet_size= MAX(net_buffer_length, max_allowed_packet);
net->buff_end=net->buff+(net->max_packet=net_buffer_length);
net->pvio = pvio;
net->error=0; net->return_status=0;
net->read_timeout=(uint) net_read_timeout; /* Timeout for read */
net->compress_pkt_nr= net->pkt_nr= 0;
net->write_pos=net->read_pos = net->buff;
net->last_error[0]= net->sqlstate[0] =0;
net->compress=0; net->reading_or_writing=0;
net->where_b = net->remain_in_buf=0;
net->last_errno=0;
if (pvio != 0) /* If real connection */
{
ma_pvio_get_handle(pvio, &net->fd);
ma_pvio_blocking(pvio, 1, 0);
ma_pvio_fast_send(pvio);
}
return 0;
} | O3 | c | ma_net_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30aa1(%rip), %rax # 0x4bd20
movq (%rax), %r13
movq %r13, %rdi
callq 0x177c0
movq %rax, 0x8(%r14)
movl $0x1, %r15d
testq %rax, %rax
je 0x1b365
cmpq $0x0, 0x2a0(%r14)
je 0x1b365
movq %rax, %r12
xorl %r15d, %r15d
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x17320
leaq 0x30a43(%rip), %rax # 0x4bd08
movq (%rax), %rax
cmpq %rax, %r13
cmovaq %r13, %rax
movq %rax, 0x58(%r14)
movq %r13, 0x50(%r14)
movq %r12, %rax
addq %r13, %rax
movq %rax, 0x10(%r14)
movq %rbx, (%r14)
movb %r15b, 0x94(%r14)
movq %r15, 0x78(%r14)
leaq 0x30a1a(%rip), %rax # 0x4bd10
movl (%rax), %eax
movl %eax, 0x6c(%r14)
movq %r15, 0x60(%r14)
movq %r12, 0x20(%r14)
movq %r12, 0x18(%r14)
movb %r15b, 0x297(%r14)
movb %r15b, 0x97(%r14)
movb %r15b, 0x84(%r14)
movb %r15b, 0x80(%r14)
movq %r15, 0x30(%r14)
movq %r15, 0x48(%r14)
movl $0x0, 0x90(%r14)
testq %rbx, %rbx
je 0x1b365
addq $0x28, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24ae3
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x24810
movq %rbx, %rdi
callq 0x245bc
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_net_init:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea rax, net_buffer_length
mov r13, [rax]
mov rdi, r13
call _malloc
mov [r14+8], rax
mov r15d, 1
test rax, rax
jz loc_1B365
cmp qword ptr [r14+2A0h], 0
jz loc_1B365
mov r12, rax
xor r15d, r15d
mov rdi, rax
xor esi, esi
mov rdx, r13
call _memset
lea rax, max_allowed_packet
mov rax, [rax]
cmp r13, rax
cmova rax, r13
mov [r14+58h], rax
mov [r14+50h], r13
mov rax, r12
add rax, r13
mov [r14+10h], rax
mov [r14], rbx
mov [r14+94h], r15b
mov [r14+78h], r15
lea rax, net_read_timeout
mov eax, [rax]
mov [r14+6Ch], eax
mov [r14+60h], r15
mov [r14+20h], r12
mov [r14+18h], r12
mov [r14+297h], r15b
mov [r14+97h], r15b
mov [r14+84h], r15b
mov [r14+80h], r15b
mov [r14+30h], r15
mov [r14+48h], r15
mov dword ptr [r14+90h], 0
test rbx, rbx
jz short loc_1B365
add r14, 28h ; '('
mov rdi, rbx
mov rsi, r14
call ma_pvio_get_handle
xor r15d, r15d
mov rdi, rbx
mov esi, 1
xor edx, edx
call ma_pvio_blocking
mov rdi, rbx
call ma_pvio_fast_send
loc_1B365:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_net_init(long long a1, long long a2)
{
unsigned long long v2; // r13
long long v3; // rax
unsigned int v4; // r15d
long long v5; // r12
unsigned long long v6; // rax
v2 = net_buffer_length;
v3 = malloc(net_buffer_length);
*(_QWORD *)(a1 + 8) = v3;
v4 = 1;
if ( v3 && *(_QWORD *)(a1 + 672) )
{
v5 = v3;
v4 = 0;
memset(v3, 0LL, v2);
v6 = max_allowed_packet;
if ( v2 > max_allowed_packet )
v6 = v2;
*(_QWORD *)(a1 + 88) = v6;
*(_QWORD *)(a1 + 80) = v2;
*(_QWORD *)(a1 + 16) = v2 + v5;
*(_QWORD *)a1 = a2;
*(_BYTE *)(a1 + 148) = 0;
*(_QWORD *)(a1 + 120) = 0LL;
*(_DWORD *)(a1 + 108) = net_read_timeout;
*(_QWORD *)(a1 + 96) = 0LL;
*(_QWORD *)(a1 + 32) = v5;
*(_QWORD *)(a1 + 24) = v5;
*(_BYTE *)(a1 + 663) = 0;
*(_BYTE *)(a1 + 151) = 0;
*(_BYTE *)(a1 + 132) = 0;
*(_BYTE *)(a1 + 128) = 0;
*(_QWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 72) = 0LL;
*(_DWORD *)(a1 + 144) = 0;
if ( a2 )
{
ma_pvio_get_handle(a2, a1 + 40);
v4 = 0;
ma_pvio_blocking(a2, 1LL, 0LL);
ma_pvio_fast_send(a2);
}
}
return v4;
}
| ma_net_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA RAX,[0x14bd20]
MOV R13,qword ptr [RAX]
MOV RDI,R13
CALL 0x001177c0
MOV qword ptr [R14 + 0x8],RAX
MOV R15D,0x1
TEST RAX,RAX
JZ 0x0011b365
CMP qword ptr [R14 + 0x2a0],0x0
JZ 0x0011b365
MOV R12,RAX
XOR R15D,R15D
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R13
CALL 0x00117320
LEA RAX,[0x14bd08]
MOV RAX,qword ptr [RAX]
CMP R13,RAX
CMOVA RAX,R13
MOV qword ptr [R14 + 0x58],RAX
MOV qword ptr [R14 + 0x50],R13
MOV RAX,R12
ADD RAX,R13
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [R14],RBX
MOV byte ptr [R14 + 0x94],R15B
MOV qword ptr [R14 + 0x78],R15
LEA RAX,[0x14bd10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [R14 + 0x6c],EAX
MOV qword ptr [R14 + 0x60],R15
MOV qword ptr [R14 + 0x20],R12
MOV qword ptr [R14 + 0x18],R12
MOV byte ptr [R14 + 0x297],R15B
MOV byte ptr [R14 + 0x97],R15B
MOV byte ptr [R14 + 0x84],R15B
MOV byte ptr [R14 + 0x80],R15B
MOV qword ptr [R14 + 0x30],R15
MOV qword ptr [R14 + 0x48],R15
MOV dword ptr [R14 + 0x90],0x0
TEST RBX,RBX
JZ 0x0011b365
ADD R14,0x28
MOV RDI,RBX
MOV RSI,R14
CALL 0x00124ae3
XOR R15D,R15D
MOV RDI,RBX
MOV ESI,0x1
XOR EDX,EDX
CALL 0x00124810
MOV RDI,RBX
CALL 0x001245bc
LAB_0011b365:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ma_net_init(long *param_1,long param_2)
{
size_t __n;
void *__s;
ulong uVar1;
int8 uVar2;
__n = net_buffer_length;
__s = malloc(net_buffer_length);
param_1[1] = (long)__s;
uVar2 = 1;
if ((__s != (void *)0x0) && (param_1[0x54] != 0)) {
uVar2 = 0;
memset(__s,0,__n);
uVar1 = max_allowed_packet;
if (max_allowed_packet < __n) {
uVar1 = __n;
}
param_1[0xb] = uVar1;
param_1[10] = __n;
param_1[2] = (long)__s + __n;
*param_1 = param_2;
*(int1 *)((long)param_1 + 0x94) = 0;
param_1[0xf] = 0;
*(int4 *)((long)param_1 + 0x6c) = net_read_timeout;
param_1[0xc] = 0;
param_1[4] = (long)__s;
param_1[3] = (long)__s;
*(int1 *)((long)param_1 + 0x297) = 0;
*(int1 *)((long)param_1 + 0x97) = 0;
*(int1 *)((long)param_1 + 0x84) = 0;
*(int1 *)(param_1 + 0x10) = 0;
param_1[6] = 0;
param_1[9] = 0;
*(int4 *)(param_1 + 0x12) = 0;
if (param_2 != 0) {
ma_pvio_get_handle(param_2,param_1 + 5);
uVar2 = 0;
ma_pvio_blocking(param_2,1,0);
ma_pvio_fast_send(param_2);
}
}
return uVar2;
}
| |
33,005 | mi_find_writepos | eloqsql/storage/myisam/mi_dynrec.c | static int _mi_find_writepos(MI_INFO *info,
ulong reclength, /* record length */
my_off_t *filepos, /* Return file pos */
ulong *length) /* length of block at filepos */
{
MI_BLOCK_INFO block_info;
ulong tmp;
DBUG_ENTER("_mi_find_writepos");
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
/* Deleted blocks exists; Get last used block */
*filepos=info->s->state.dellink;
block_info.second_read=0;
info->rec_cache.seek_not_done=1;
if (!(_mi_get_block_info(&block_info,info->dfile,info->s->state.dellink) &
BLOCK_DELETED))
{
DBUG_PRINT("error",("Delete link crashed"));
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(-1);
}
info->s->state.dellink=block_info.next_filepos;
info->state->del--;
info->state->empty-= block_info.block_len;
*length= block_info.block_len;
}
else
{
/* No deleted blocks; Allocate a new block */
*filepos=info->state->data_file_length;
if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) <
info->s->base.min_block_length)
tmp= info->s->base.min_block_length;
else
tmp= ((tmp+MI_DYN_ALIGN_SIZE-1) &
(~ (ulong) (MI_DYN_ALIGN_SIZE-1)));
if (info->state->data_file_length >
(info->s->base.max_data_file_length - tmp))
{
my_errno=HA_ERR_RECORD_FILE_FULL;
DBUG_RETURN(-1);
}
if (tmp > MI_MAX_BLOCK_LENGTH)
tmp=MI_MAX_BLOCK_LENGTH;
*length= tmp;
info->state->data_file_length+= tmp;
info->s->state.split++;
info->update|=HA_STATE_WRITE_AT_END;
}
DBUG_RETURN(0);
} | O0 | c | mi_find_writepos:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movq %rdx, -0x80(%rbp)
movq %rcx, -0x88(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
cmpq $-0x1, 0x58(%rax)
je 0xac943
movq -0x70(%rbp), %rax
cmpb $0x0, 0x33a(%rax)
jne 0xac943
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq 0x58(%rax), %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x10(%rbp)
movq -0x70(%rbp), %rax
movl $0x1, 0x300(%rax)
movq -0x70(%rbp), %rax
movl 0x1c0(%rax), %esi
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq 0x58(%rax), %rdx
leaq -0x60(%rbp), %rdi
callq 0xa9a30
andl $0x4, %eax
cmpl $0x0, %eax
jne 0xac8f6
jmp 0xac8dd
jmp 0xac8df
callq 0xf6060
movl $0x7f, (%rax)
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
jmp 0xaca6d
movq -0x20(%rbp), %rcx
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x58(%rax)
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rdx
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, (%rax)
jmp 0xaca64
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rcx
movq -0x80(%rbp), %rax
movq %rcx, (%rax)
movq -0x78(%rbp), %rax
addq $0x3, %rax
movq -0x78(%rbp), %rsi
xorl %ecx, %ecx
movl $0x1, %edx
cmpq $0xffed, %rsi # imm = 0xFFED
cmovael %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x70(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x160(%rcx), %rax
jae 0xac9a7
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq 0x160(%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0xac9c1
movq -0x90(%rbp), %rax
addq $0x4, %rax
subq $0x1, %rax
andq $-0x4, %rax
movq %rax, -0x90(%rbp)
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x70(%rbp), %rcx
movq (%rcx), %rcx
movq 0x110(%rcx), %rcx
subq -0x90(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xac9fb
callq 0xf6060
movl $0x87, (%rax)
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
jmp 0xaca6d
cmpq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC
jbe 0xaca13
movq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, (%rax)
movq -0x90(%rbp), %rcx
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
movq -0x70(%rbp), %rax
movl 0x1d0(%rax), %ecx
orl $0x100, %ecx # imm = 0x100
movl %ecx, 0x1d0(%rax)
jmp 0xaca66
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x94(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xaca97
movl -0x94(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
callq 0x2a250
nopl (%rax)
| _mi_find_writepos:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_70], rdi
mov [rbp+var_78], rsi
mov [rbp+var_80], rdx
mov [rbp+var_88], rcx
mov rax, [rbp+var_70]
mov rax, [rax]
cmp qword ptr [rax+58h], 0FFFFFFFFFFFFFFFFh
jz loc_AC943
mov rax, [rbp+var_70]
cmp byte ptr [rax+33Ah], 0
jnz loc_AC943
mov rax, [rbp+var_70]
mov rax, [rax]
mov rcx, [rax+58h]
mov rax, [rbp+var_80]
mov [rax], rcx
mov [rbp+var_10], 0
mov rax, [rbp+var_70]
mov dword ptr [rax+300h], 1
mov rax, [rbp+var_70]
mov esi, [rax+1C0h]
mov rax, [rbp+var_70]
mov rax, [rax]
mov rdx, [rax+58h]
lea rdi, [rbp+var_60]
call _mi_get_block_info
and eax, 4
cmp eax, 0
jnz short loc_AC8F6
jmp short $+2
loc_AC8DD:
jmp short $+2
loc_AC8DF:
call _my_thread_var
mov dword ptr [rax], 7Fh
mov [rbp+var_64], 0FFFFFFFFh
jmp loc_ACA6D
loc_AC8F6:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_70]
mov rax, [rax]
mov [rax+58h], rcx
mov rax, [rbp+var_70]
mov rax, [rax+8]
mov rcx, [rax+8]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+8], rcx
mov rdx, [rbp+var_38]
mov rax, [rbp+var_70]
mov rax, [rax+8]
mov rcx, [rax+10h]
sub rcx, rdx
mov [rax+10h], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_88]
mov [rax], rcx
jmp loc_ACA64
loc_AC943:
mov rax, [rbp+var_70]
mov rax, [rax+8]
mov rcx, [rax+28h]
mov rax, [rbp+var_80]
mov [rax], rcx
mov rax, [rbp+var_78]
add rax, 3
mov rsi, [rbp+var_78]
xor ecx, ecx
mov edx, 1
cmp rsi, 0FFEDh
cmovnb ecx, edx
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_90], rax
mov rcx, [rbp+var_70]
mov rcx, [rcx]
cmp rax, [rcx+160h]
jnb short loc_AC9A7
mov rax, [rbp+var_70]
mov rax, [rax]
mov rax, [rax+160h]
mov [rbp+var_90], rax
jmp short loc_AC9C1
loc_AC9A7:
mov rax, [rbp+var_90]
add rax, 4
sub rax, 1
and rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_90], rax
loc_AC9C1:
mov rax, [rbp+var_70]
mov rax, [rax+8]
mov rax, [rax+28h]
mov rcx, [rbp+var_70]
mov rcx, [rcx]
mov rcx, [rcx+110h]
sub rcx, [rbp+var_90]
cmp rax, rcx
jbe short loc_AC9FB
call _my_thread_var
mov dword ptr [rax], 87h
mov [rbp+var_64], 0FFFFFFFFh
jmp short loc_ACA6D
loc_AC9FB:
cmp [rbp+var_90], 0FFFFFCh
jbe short loc_ACA13
mov [rbp+var_90], 0FFFFFCh
loc_ACA13:
mov rcx, [rbp+var_90]
mov rax, [rbp+var_88]
mov [rax], rcx
mov rcx, [rbp+var_90]
mov rax, [rbp+var_70]
mov rax, [rax+8]
add rcx, [rax+28h]
mov [rax+28h], rcx
mov rax, [rbp+var_70]
mov rax, [rax]
mov rcx, [rax+50h]
add rcx, 1
mov [rax+50h], rcx
mov rax, [rbp+var_70]
mov ecx, [rax+1D0h]
or ecx, 100h
mov [rax+1D0h], ecx
loc_ACA64:
jmp short $+2
loc_ACA66:
mov [rbp+var_64], 0
loc_ACA6D:
mov eax, [rbp+var_64]
mov [rbp+var_94], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_ACA97
mov eax, [rbp+var_94]
add rsp, 0A0h
pop rbp
retn
loc_ACA97:
call ___stack_chk_fail
| long long mi_find_writepos(_QWORD *a1, const char *a2, _QWORD *a3, unsigned long long *a4)
{
const char *v4; // rsi
unsigned long long v6; // [rsp+10h] [rbp-90h]
unsigned long long v7; // [rsp+10h] [rbp-90h]
char v10[40]; // [rsp+40h] [rbp-60h] BYREF
unsigned long long v11; // [rsp+68h] [rbp-38h]
long long v12; // [rsp+80h] [rbp-20h]
int v13; // [rsp+90h] [rbp-10h]
unsigned long long v14; // [rsp+98h] [rbp-8h]
v14 = __readfsqword(0x28u);
if ( *(_QWORD *)(*a1 + 88LL) == -1LL || *((_BYTE *)a1 + 826) )
{
*a3 = *(_QWORD *)(a1[1] + 40LL);
v6 = (unsigned long long)&a2[((unsigned long long)a2 >= 0xFFED) + 3];
if ( v6 >= *(_QWORD *)(*a1 + 352LL) )
v7 = (v6 + 3) & 0xFFFFFFFFFFFFFFFCLL;
else
v7 = *(_QWORD *)(*a1 + 352LL);
if ( *(_QWORD *)(a1[1] + 40LL) > *(_QWORD *)(*a1 + 272LL) - v7 )
{
*(_DWORD *)my_thread_var(a1, a2) = 135;
return (unsigned int)-1;
}
if ( v7 > 0xFFFFFC )
v7 = 16777212LL;
*a4 = v7;
*(_QWORD *)(a1[1] + 40LL) += v7;
++*(_QWORD *)(*a1 + 80LL);
*((_DWORD *)a1 + 116) |= 0x100u;
return 0;
}
*a3 = *(_QWORD *)(*a1 + 88LL);
v13 = 0;
*((_DWORD *)a1 + 192) = 1;
v4 = (const char *)*((unsigned int *)a1 + 112);
if ( (mi_get_block_info(v10, v4, *(_QWORD *)(*a1 + 88LL)) & 4) != 0 )
{
*(_QWORD *)(*a1 + 88LL) = v12;
--*(_QWORD *)(a1[1] + 8LL);
*(_QWORD *)(a1[1] + 16LL) -= v11;
*a4 = v11;
return 0;
}
*(_DWORD *)my_thread_var(v10, v4) = 127;
return (unsigned int)-1;
}
| _mi_find_writepos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x78],RSI
MOV qword ptr [RBP + -0x80],RDX
MOV qword ptr [RBP + -0x88],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x58],-0x1
JZ 0x001ac943
MOV RAX,qword ptr [RBP + -0x70]
CMP byte ptr [RAX + 0x33a],0x0
JNZ 0x001ac943
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x70]
MOV dword ptr [RAX + 0x300],0x1
MOV RAX,qword ptr [RBP + -0x70]
MOV ESI,dword ptr [RAX + 0x1c0]
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x58]
LEA RDI,[RBP + -0x60]
CALL 0x001a9a30
AND EAX,0x4
CMP EAX,0x0
JNZ 0x001ac8f6
JMP 0x001ac8dd
LAB_001ac8dd:
JMP 0x001ac8df
LAB_001ac8df:
CALL 0x001f6060
MOV dword ptr [RAX],0x7f
MOV dword ptr [RBP + -0x64],0xffffffff
JMP 0x001aca6d
LAB_001ac8f6:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x8],RCX
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX],RCX
JMP 0x001aca64
LAB_001ac943:
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x3
MOV RSI,qword ptr [RBP + -0x78]
XOR ECX,ECX
MOV EDX,0x1
CMP RSI,0xffed
CMOVNC ECX,EDX
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
MOV RCX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x160]
JNC 0x001ac9a7
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x160]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x001ac9c1
LAB_001ac9a7:
MOV RAX,qword ptr [RBP + -0x90]
ADD RAX,0x4
SUB RAX,0x1
AND RAX,-0x4
MOV qword ptr [RBP + -0x90],RAX
LAB_001ac9c1:
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x110]
SUB RCX,qword ptr [RBP + -0x90]
CMP RAX,RCX
JBE 0x001ac9fb
CALL 0x001f6060
MOV dword ptr [RAX],0x87
MOV dword ptr [RBP + -0x64],0xffffffff
JMP 0x001aca6d
LAB_001ac9fb:
CMP qword ptr [RBP + -0x90],0xfffffc
JBE 0x001aca13
MOV qword ptr [RBP + -0x90],0xfffffc
LAB_001aca13:
MOV RCX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x50]
ADD RCX,0x1
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RAX + 0x1d0]
OR ECX,0x100
MOV dword ptr [RAX + 0x1d0],ECX
LAB_001aca64:
JMP 0x001aca66
LAB_001aca66:
MOV dword ptr [RBP + -0x64],0x0
LAB_001aca6d:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x94],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001aca97
MOV EAX,dword ptr [RBP + -0x94]
ADD RSP,0xa0
POP RBP
RET
LAB_001aca97:
CALL 0x0012a250
|
int4 _mi_find_writepos(long *param_1,ulong param_2,int8 *param_3,ulong *param_4)
{
uint uVar1;
int4 *puVar2;
ulong uVar3;
long in_FS_OFFSET;
ulong local_98;
int4 local_6c;
int1 local_68 [40];
ulong local_40;
int8 local_28;
int4 local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(long *)(*param_1 + 0x58) == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) {
*param_3 = *(int8 *)(param_1[1] + 0x28);
uVar3 = param_2 + 3 + (long)(int)(uint)(0xffec < param_2);
if (uVar3 < *(ulong *)(*param_1 + 0x160)) {
local_98 = *(ulong *)(*param_1 + 0x160);
}
else {
local_98 = uVar3 + 3 & 0xfffffffffffffffc;
}
if (*(long *)(*param_1 + 0x110) - local_98 < *(ulong *)(param_1[1] + 0x28)) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x87;
local_6c = 0xffffffff;
goto LAB_001aca6d;
}
if (0xfffffc < local_98) {
local_98 = 0xfffffc;
}
*param_4 = local_98;
*(ulong *)(param_1[1] + 0x28) = local_98 + *(long *)(param_1[1] + 0x28);
*(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1;
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 0x100;
}
else {
*param_3 = *(int8 *)(*param_1 + 0x58);
local_18 = 0;
*(int4 *)(param_1 + 0x60) = 1;
uVar1 = _mi_get_block_info(local_68,(int)param_1[0x38],*(int8 *)(*param_1 + 0x58));
if ((uVar1 & 4) == 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7f;
local_6c = 0xffffffff;
goto LAB_001aca6d;
}
*(int8 *)(*param_1 + 0x58) = local_28;
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1;
*(ulong *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - local_40;
*param_4 = local_40;
}
local_6c = 0;
LAB_001aca6d:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_6c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,006 | Simulator::handleSystemCall(long, long) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Simulator.cpp | int64_t Simulator::handleSystemCall(int64_t op1, int64_t op2) {
int64_t type = op2; // reg a7
int64_t arg1 = op1; // reg a0
switch (type) {
case 0: { // print string
uint32_t addr = arg1;
char ch = this->memory->getByte(addr);
while (ch != '\0') {
printf("%c", ch);
ch = this->memory->getByte(++addr);
}
break;
}
case 1: // print char
printf("%c", (char)arg1);
break;
case 2: // print num
printf("%d", (int32_t)arg1);
break;
case 3:
case 93: // exit
printf("Program exit from an exit() system call\n");
if (shouldDumpHistory) {
printf("Dumping history to dump.txt...");
this->dumpHistory();
}
this->printStatistics();
exit(0);
case 4: // read char
scanf(" %c", (char*)&op1);
break;
case 5: // read num
scanf(" %lld", &op1);
break;
default:
this->panic("Unknown syscall type %d\n", type);
}
return op1;
} | O0 | cpp | Simulator::handleSystemCall(long, long):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x23eeb
jmp 0x23e82
movq 0x10(%rsp), %rax
subq $0x1, %rax
je 0x23f59
jmp 0x23e93
movq 0x10(%rsp), %rax
subq $0x2, %rax
je 0x23f74
jmp 0x23ea4
movq 0x10(%rsp), %rax
subq $0x3, %rax
je 0x23f8e
jmp 0x23eb5
movq 0x10(%rsp), %rax
subq $0x4, %rax
je 0x23fd0
jmp 0x23ec6
movq 0x10(%rsp), %rax
subq $0x5, %rax
je 0x23fe5
jmp 0x23ed7
movq 0x10(%rsp), %rax
subq $0x5d, %rax
je 0x23f8e
jmp 0x23ffa
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rcx
movl %ecx, 0x1c(%rsp)
movq 0x118(%rax), %rdi
movl 0x1c(%rsp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1e960
movb %al, 0x1b(%rsp)
movsbl 0x1b(%rsp), %eax
cmpl $0x0, %eax
je 0x23f54
movsbl 0x1b(%rsp), %esi
leaq 0x600d(%rip), %rdi # 0x29f34
movb $0x0, %al
callq 0x15050
movq 0x8(%rsp), %rax
movq 0x118(%rax), %rdi
movl 0x1c(%rsp), %esi
addl $0x1, %esi
movl %esi, 0x1c(%rsp)
xorl %eax, %eax
movl %eax, %edx
callq 0x1e960
movb %al, 0x1b(%rsp)
jmp 0x23f11
jmp 0x24012
movq 0x20(%rsp), %rax
movsbl %al, %esi
leaq 0x5fcc(%rip), %rdi # 0x29f34
movb $0x0, %al
callq 0x15050
jmp 0x24012
movq 0x20(%rsp), %rax
movl %eax, %esi
leaq 0x5f66(%rip), %rdi # 0x29ee8
movb $0x0, %al
callq 0x15050
jmp 0x24012
leaq 0x5f56(%rip), %rdi # 0x29eeb
movb $0x0, %al
callq 0x15050
movq 0x8(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x23fbf
leaq 0x5f66(%rip), %rdi # 0x29f14
movb $0x0, %al
callq 0x15050
movq 0x8(%rsp), %rdi
callq 0x23c10
movq 0x8(%rsp), %rdi
callq 0x24020
xorl %edi, %edi
callq 0x15260
leaq 0x5f5c(%rip), %rdi # 0x29f33
leaq 0x38(%rsp), %rsi
movb $0x0, %al
callq 0x15240
jmp 0x24012
leaq 0x5f4b(%rip), %rdi # 0x29f37
leaq 0x38(%rsp), %rsi
movb $0x0, %al
callq 0x15240
jmp 0x24012
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rdx
leaq 0x5f32(%rip), %rsi # 0x29f3d
movb $0x0, %al
callq 0x1f6d0
movq 0x38(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
| _ZN9Simulator16handleSystemCallEll:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
mov rax, [rsp+48h+var_8]
mov [rsp+48h+var_40], rax
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_28], rax
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_38], rax
test rax, rax
jz short loc_23EEB
jmp short $+2
loc_23E82:
mov rax, [rsp+48h+var_38]
sub rax, 1
jz loc_23F59
jmp short $+2
loc_23E93:
mov rax, [rsp+48h+var_38]
sub rax, 2
jz loc_23F74
jmp short $+2
loc_23EA4:
mov rax, [rsp+48h+var_38]
sub rax, 3
jz loc_23F8E
jmp short $+2
loc_23EB5:
mov rax, [rsp+48h+var_38]
sub rax, 4
jz loc_23FD0
jmp short $+2
loc_23EC6:
mov rax, [rsp+48h+var_38]
sub rax, 5
jz loc_23FE5
jmp short $+2
loc_23ED7:
mov rax, [rsp+48h+var_38]
sub rax, 5Dh ; ']'
jz loc_23F8E
jmp loc_23FFA
loc_23EEB:
mov rax, [rsp+48h+var_40]
mov rcx, [rsp+48h+var_28]
mov [rsp+48h+var_2C], ecx
mov rdi, [rax+118h]; this
mov esi, [rsp+48h+var_2C]; unsigned int
xor eax, eax
mov edx, eax; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov [rsp+48h+var_2D], al
loc_23F11:
movsx eax, [rsp+48h+var_2D]
cmp eax, 0
jz short loc_23F54
movsx esi, [rsp+48h+var_2D]
lea rdi, aC+1; "%c"
mov al, 0
call _printf
mov rax, [rsp+48h+var_40]
mov rdi, [rax+118h]; this
mov esi, [rsp+48h+var_2C]
add esi, 1; unsigned int
mov [rsp+48h+var_2C], esi
xor eax, eax
mov edx, eax; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov [rsp+48h+var_2D], al
jmp short loc_23F11
loc_23F54:
jmp loc_24012
loc_23F59:
mov rax, [rsp+48h+var_28]
movsx esi, al
lea rdi, aC+1; "%c"
mov al, 0
call _printf
jmp loc_24012
loc_23F74:
mov rax, [rsp+48h+var_28]
mov esi, eax
lea rdi, aD; "%d"
mov al, 0
call _printf
jmp loc_24012
loc_23F8E:
lea rdi, aProgramExitFro; "Program exit from an exit() system call"...
mov al, 0
call _printf
mov rax, [rsp+48h+var_40]
test byte ptr [rax+2], 1
jz short loc_23FBF
lea rdi, aDumpingHistory_0; "Dumping history to dump.txt..."
mov al, 0
call _printf
mov rdi, [rsp+48h+var_40]; this
call _ZN9Simulator11dumpHistoryEv; Simulator::dumpHistory(void)
loc_23FBF:
mov rdi, [rsp+48h+var_40]; this
call _ZN9Simulator15printStatisticsEv; Simulator::printStatistics(void)
xor edi, edi
call _exit
loc_23FD0:
lea rdi, aC; " %c"
lea rsi, [rsp+48h+var_10]
mov al, 0
call ___isoc99_scanf
jmp short loc_24012
loc_23FE5:
lea rdi, aLld; " %lld"
lea rsi, [rsp+48h+var_10]
mov al, 0
call ___isoc99_scanf
jmp short loc_24012
loc_23FFA:
mov rdi, [rsp+48h+var_40]; this
mov rdx, [rsp+48h+var_20]
lea rsi, aUnknownSyscall; "Unknown syscall type %d\n"
mov al, 0
call _ZN9Simulator5panicEPKcz; Simulator::panic(char const*,...)
loc_24012:
mov rax, [rsp+48h+var_10]
add rsp, 48h
retn
| long long Simulator::handleSystemCall(
Cache ***this,
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)
{
double v14; // xmm4_8
double v15; // xmm5_8
char v17; // [rsp+0h] [rbp-48h]
char i; // [rsp+1Bh] [rbp-2Dh]
unsigned int v19; // [rsp+1Ch] [rbp-2Ch]
_QWORD v20[2]; // [rsp+38h] [rbp-10h] BYREF
v20[1] = this;
v20[0] = a2;
if ( a3 )
{
switch ( a3 )
{
case 1LL:
printf("%c", (unsigned int)(char)a2);
break;
case 2LL:
printf("%d", a2);
break;
case 3LL:
goto LABEL_15;
case 4LL:
__isoc99_scanf(" %c", v20);
break;
case 5LL:
__isoc99_scanf(" %lld", v20);
break;
case 93LL:
LABEL_15:
printf("Program exit from an exit() system call\n");
if ( (*((_BYTE *)this + 2) & 1) != 0 )
{
printf("Dumping history to dump.txt...");
Simulator::dumpHistory((Simulator *)this);
}
Simulator::printStatistics((Simulator *)this);
exit(0LL);
default:
Simulator::panic(
(Simulator *)this,
"Unknown syscall type %d\n",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v17);
}
}
else
{
v19 = a2;
for ( i = MemoryManager::getByte(
this[35],
a2,
0LL,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14); i; i = MemoryManager::getByte(this[35], v19, 0LL, a7, a8, a9, a10, v14, v15, a13, a14) )
{
*(double *)a7.m128_u64 = printf("%c", (unsigned int)i);
++v19;
}
}
return v20[0];
}
| handleSystemCall:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x00123eeb
JMP 0x00123e82
LAB_00123e82:
MOV RAX,qword ptr [RSP + 0x10]
SUB RAX,0x1
JZ 0x00123f59
JMP 0x00123e93
LAB_00123e93:
MOV RAX,qword ptr [RSP + 0x10]
SUB RAX,0x2
JZ 0x00123f74
JMP 0x00123ea4
LAB_00123ea4:
MOV RAX,qword ptr [RSP + 0x10]
SUB RAX,0x3
JZ 0x00123f8e
JMP 0x00123eb5
LAB_00123eb5:
MOV RAX,qword ptr [RSP + 0x10]
SUB RAX,0x4
JZ 0x00123fd0
JMP 0x00123ec6
LAB_00123ec6:
MOV RAX,qword ptr [RSP + 0x10]
SUB RAX,0x5
JZ 0x00123fe5
JMP 0x00123ed7
LAB_00123ed7:
MOV RAX,qword ptr [RSP + 0x10]
SUB RAX,0x5d
JZ 0x00123f8e
JMP 0x00123ffa
LAB_00123eeb:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x1c],ECX
MOV RDI,qword ptr [RAX + 0x118]
MOV ESI,dword ptr [RSP + 0x1c]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0011e960
MOV byte ptr [RSP + 0x1b],AL
LAB_00123f11:
MOVSX EAX,byte ptr [RSP + 0x1b]
CMP EAX,0x0
JZ 0x00123f54
MOVSX ESI,byte ptr [RSP + 0x1b]
LEA RDI,[0x129f34]
MOV AL,0x0
CALL 0x00115050
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x118]
MOV ESI,dword ptr [RSP + 0x1c]
ADD ESI,0x1
MOV dword ptr [RSP + 0x1c],ESI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0011e960
MOV byte ptr [RSP + 0x1b],AL
JMP 0x00123f11
LAB_00123f54:
JMP 0x00124012
LAB_00123f59:
MOV RAX,qword ptr [RSP + 0x20]
MOVSX ESI,AL
LEA RDI,[0x129f34]
MOV AL,0x0
CALL 0x00115050
JMP 0x00124012
LAB_00123f74:
MOV RAX,qword ptr [RSP + 0x20]
MOV ESI,EAX
LEA RDI,[0x129ee8]
MOV AL,0x0
CALL 0x00115050
JMP 0x00124012
LAB_00123f8e:
LEA RDI,[0x129eeb]
MOV AL,0x0
CALL 0x00115050
MOV RAX,qword ptr [RSP + 0x8]
TEST byte ptr [RAX + 0x2],0x1
JZ 0x00123fbf
LEA RDI,[0x129f14]
MOV AL,0x0
CALL 0x00115050
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00123c10
LAB_00123fbf:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00124020
XOR EDI,EDI
CALL 0x00115260
LAB_00123fd0:
LEA RDI,[0x129f33]
LEA RSI,[RSP + 0x38]
MOV AL,0x0
CALL 0x00115240
JMP 0x00124012
LAB_00123fe5:
LEA RDI,[0x129f37]
LEA RSI,[RSP + 0x38]
MOV AL,0x0
CALL 0x00115240
JMP 0x00124012
LAB_00123ffa:
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x28]
LEA RSI,[0x129f3d]
MOV AL,0x0
CALL 0x0011f6d0
LAB_00124012:
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0x48
RET
|
/* Simulator::handleSystemCall(long, long) */
long __thiscall Simulator::handleSystemCall(Simulator *this,long param_1,long param_2)
{
char local_2d;
uint local_2c;
long local_10;
Simulator *local_8;
local_10 = param_1;
local_8 = this;
if (param_2 == 0) {
local_2c = (uint)param_1;
local_2d = MemoryManager::getByte(*(MemoryManager **)(this + 0x118),local_2c,(uint *)0x0);
while (local_2d != '\0') {
printf("%c",(ulong)(uint)(int)local_2d);
local_2c = local_2c + 1;
local_2d = MemoryManager::getByte(*(MemoryManager **)(this + 0x118),local_2c,(uint *)0x0);
}
}
else if (param_2 == 1) {
printf("%c",(ulong)(uint)(int)(char)param_1);
}
else if (param_2 == 2) {
printf("%d",param_1 & 0xffffffff);
}
else {
if (param_2 == 3) {
LAB_00123f8e:
printf("Program exit from an exit() system call\n");
if (((byte)this[2] & 1) != 0) {
printf("Dumping history to dump.txt...");
dumpHistory(this);
}
printStatistics(this);
/* WARNING: Subroutine does not return */
exit(0);
}
if (param_2 == 4) {
__isoc99_scanf(&DAT_00129f33,&local_10);
}
else if (param_2 == 5) {
__isoc99_scanf(&DAT_00129f37,&local_10);
}
else {
if (param_2 == 0x5d) goto LAB_00123f8e;
panic((char *)this,"Unknown syscall type %d\n",param_2);
}
}
return local_10;
}
| |
33,007 | Simulator::handleSystemCall(long, long) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Simulator.cpp | int64_t Simulator::handleSystemCall(int64_t op1, int64_t op2) {
int64_t type = op2; // reg a7
int64_t arg1 = op1; // reg a0
switch (type) {
case 0: { // print string
uint32_t addr = arg1;
char ch = this->memory->getByte(addr);
while (ch != '\0') {
printf("%c", ch);
ch = this->memory->getByte(++addr);
}
break;
}
case 1: // print char
printf("%c", (char)arg1);
break;
case 2: // print num
printf("%d", (int32_t)arg1);
break;
case 3:
case 93: // exit
printf("Program exit from an exit() system call\n");
if (shouldDumpHistory) {
printf("Dumping history to dump.txt...");
this->dumpHistory();
}
this->printStatistics();
exit(0);
case 4: // read char
scanf(" %c", (char*)&op1);
break;
case 5: // read num
scanf(" %lld", &op1);
break;
default:
this->panic("Unknown syscall type %d\n", type);
}
return op1;
} | O3 | cpp | Simulator::handleSystemCall(long, long):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
cmpq $0x5, %rdx
ja 0x12ace
movq %rsi, %r14
leaq 0x2de9(%rip), %rax # 0x15830
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x118(%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xebc8
testb %al, %al
je 0x12ac2
incl %r14d
movsbl %al, %edi
callq 0xb2d0
movq 0x118(%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0xebc8
incl %r14d
testb %al, %al
jne 0x12a68
jmp 0x12ac2
leaq 0x324f(%rip), %rdi # 0x15ce0
jmp 0x12aa5
movsbl %r14b, %edi
callq 0xb2d0
jmp 0x12ac2
leaq 0x3237(%rip), %rdi # 0x15cdc
movq %rsp, %rsi
xorl %eax, %eax
callq 0xb210
jmp 0x12ac2
leaq 0x3221(%rip), %rdi # 0x15cd9
movl %r14d, %esi
xorl %eax, %eax
callq 0xb050
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpq $0x5d, %rdx
jne 0x12b0b
leaq 0x34f5(%rip), %rdi # 0x15fd0
callq 0xb320
cmpb $0x1, 0x2(%rbx)
jne 0x12afc
leaq 0x2697(%rip), %rdi # 0x15184
xorl %eax, %eax
callq 0xb050
movq %rbx, %rdi
callq 0x1277c
movq %rbx, %rdi
callq 0x12b1c
xorl %edi, %edi
callq 0xb240
leaq 0x31d4(%rip), %rsi # 0x15ce6
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf408
| _ZN9Simulator16handleSystemCallEll:
push r14
push rbx
push rax
mov rbx, rdi
mov [rsp+18h+var_18], rsi
cmp rdx, 5; switch 6 cases
ja def_12A4E; jumptable 0000000000012A4E default case
mov r14, rsi
lea rax, jpt_12A4E
movsxd rcx, ds:(jpt_12A4E - 15830h)[rax+rdx*4]
add rcx, rax
jmp rcx; switch jump
loc_12A50:
mov rdi, [rbx+118h]; jumptable 0000000000012A4E case 0
mov esi, r14d; unsigned int
xor edx, edx; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
test al, al
jz short loc_12AC2
inc r14d
loc_12A68:
movsx edi, al
call _putchar
mov rdi, [rbx+118h]; this
mov esi, r14d; unsigned int
xor edx, edx; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
inc r14d
test al, al
jnz short loc_12A68
jmp short loc_12AC2
loc_12A8A:
lea rdi, aLld; jumptable 0000000000012A4E case 5
jmp short loc_12AA5
loc_12A93:
movsx edi, r14b; jumptable 0000000000012A4E case 1
call _putchar
jmp short loc_12AC2
loc_12A9E:
lea rdi, aC; jumptable 0000000000012A4E case 4
loc_12AA5:
mov rsi, rsp
xor eax, eax
call ___isoc99_scanf
jmp short loc_12AC2
loc_12AB1:
lea rdi, aD; jumptable 0000000000012A4E case 2
mov esi, r14d
xor eax, eax
call _printf
loc_12AC2:
mov rax, [rsp+18h+var_18]
add rsp, 8
pop rbx
pop r14
retn
def_12A4E:
cmp rdx, 5Dh ; ']'; jumptable 0000000000012A4E default case
jnz short loc_12B0B
loc_12AD4:
lea rdi, aProgramExitFro; jumptable 0000000000012A4E case 3
call _puts
cmp byte ptr [rbx+2], 1
jnz short loc_12AFC
lea rdi, aDumpingHistory; "Dumping history to dump.txt..."
xor eax, eax
call _printf
mov rdi, rbx; this
call _ZN9Simulator11dumpHistoryEv; Simulator::dumpHistory(void)
loc_12AFC:
mov rdi, rbx; this
call _ZN9Simulator15printStatisticsEv; Simulator::printStatistics(void)
xor edi, edi
call _exit
loc_12B0B:
lea rsi, aUnknownSyscall; "Unknown syscall type %d\n"
mov rdi, rbx; this
xor eax, eax
call _ZN9Simulator5panicEPKcz; Simulator::panic(char const*,...)
| long long Simulator::handleSystemCall(
Cache ***this,
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 Byte; // al
unsigned int v15; // r14d
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
const char *v21; // rdi
_QWORD v23[3]; // [rsp+0h] [rbp-18h] BYREF
v23[0] = a2;
switch ( a3 )
{
case 0LL:
Byte = MemoryManager::getByte(this[35], a2, 0LL, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( Byte )
{
v15 = a2 + 1;
do
{
putchar((unsigned int)Byte);
Byte = MemoryManager::getByte(this[35], v15++, 0LL, v16, v17, v18, a7, a8, a9, a10, v19, v20, a13, a14);
}
while ( Byte );
}
return v23[0];
case 1LL:
putchar((unsigned int)(char)a2);
return v23[0];
case 2LL:
printf("%d", a2);
return v23[0];
case 3LL:
goto LABEL_13;
case 4LL:
v21 = " %c";
goto LABEL_9;
case 5LL:
v21 = " %lld";
LABEL_9:
__isoc99_scanf(v21, v23);
return v23[0];
default:
if ( a3 != 93 )
Simulator::panic(
(Simulator *)this,
"Unknown syscall type %d\n",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v23[0]);
LABEL_13:
puts("Program exit from an exit() system call");
if ( *((_BYTE *)this + 2) == 1 )
{
printf("Dumping history to dump.txt...");
Simulator::dumpHistory((Simulator *)this);
}
Simulator::printStatistics((Simulator *)this);
exit(0LL);
}
}
| handleSystemCall:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV qword ptr [RSP],RSI
CMP RDX,0x5
JA 0x00112ace
MOV R14,RSI
LEA RAX,[0x115830]
MOVSXD RCX,dword ptr [RAX + RDX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_0:
MOV RDI,qword ptr [RBX + 0x118]
MOV ESI,R14D
XOR EDX,EDX
CALL 0x0010ebc8
TEST AL,AL
JZ 0x00112ac2
INC R14D
LAB_00112a68:
MOVSX EDI,AL
CALL 0x0010b2d0
MOV RDI,qword ptr [RBX + 0x118]
MOV ESI,R14D
XOR EDX,EDX
CALL 0x0010ebc8
INC R14D
TEST AL,AL
JNZ 0x00112a68
JMP 0x00112ac2
caseD_5:
LEA RDI,[0x115ce0]
JMP 0x00112aa5
caseD_1:
MOVSX EDI,R14B
CALL 0x0010b2d0
JMP 0x00112ac2
caseD_4:
LEA RDI,[0x115cdc]
LAB_00112aa5:
MOV RSI,RSP
XOR EAX,EAX
CALL 0x0010b210
JMP 0x00112ac2
caseD_2:
LEA RDI,[0x115cd9]
MOV ESI,R14D
XOR EAX,EAX
CALL 0x0010b050
LAB_00112ac2:
MOV RAX,qword ptr [RSP]
ADD RSP,0x8
POP RBX
POP R14
RET
default:
CMP RDX,0x5d
JNZ 0x00112b0b
caseD_3:
LEA RDI,[0x115fd0]
CALL 0x0010b320
CMP byte ptr [RBX + 0x2],0x1
JNZ 0x00112afc
LEA RDI,[0x115184]
XOR EAX,EAX
CALL 0x0010b050
MOV RDI,RBX
CALL 0x0011277c
LAB_00112afc:
MOV RDI,RBX
CALL 0x00112b1c
XOR EDI,EDI
CALL 0x0010b240
LAB_00112b0b:
LEA RSI,[0x115ce6]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0010f408
|
/* Simulator::handleSystemCall(long, long) */
long __thiscall Simulator::handleSystemCall(Simulator *this,long param_1,long param_2)
{
char cVar1;
int *puVar2;
uint uVar3;
long local_18;
uVar3 = (uint)param_1;
local_18 = param_1;
switch(param_2) {
case 0:
cVar1 = MemoryManager::getByte(*(MemoryManager **)(this + 0x118),uVar3,(uint *)0x0);
while (cVar1 != '\0') {
uVar3 = uVar3 + 1;
putchar((int)cVar1);
cVar1 = MemoryManager::getByte(*(MemoryManager **)(this + 0x118),uVar3,(uint *)0x0);
}
break;
case 1:
putchar((int)(char)param_1);
break;
case 2:
printf("%d",param_1 & 0xffffffff);
break;
case 4:
puVar2 = &DAT_00115cdc;
goto LAB_00112aa5;
case 5:
puVar2 = &DAT_00115ce0;
LAB_00112aa5:
__isoc99_scanf(puVar2,&local_18);
break;
default:
if (param_2 != 0x5d) {
/* WARNING: Subroutine does not return */
panic((char *)this,"Unknown syscall type %d\n");
}
case 3:
puts("Program exit from an exit() system call");
if (this[2] == (Simulator)0x1) {
printf("Dumping history to dump.txt...");
dumpHistory(this);
}
printStatistics(this);
/* WARNING: Subroutine does not return */
exit(0);
}
return local_18;
}
| |
33,008 | UniversalIgnoreParser::convertToRegex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | shubhamoy[P]dir2txt/src/UniversalIgnoreParser.cpp | std::regex UniversalIgnoreParser::convertToRegex(const std::string& pattern) const {
std::string regexStr = "^";
if (pattern.back() == '/') {
std::string dirName = pattern.substr(0, pattern.length() - 1);
regexStr += "(" + dirName + ")(/.*)?$";
} else if (pattern.find('/') == std::string::npos && pattern.find('*') == std::string::npos) {
regexStr = ".*/" + pattern + "$|^" + pattern + "$";
} else {
for (char c : pattern) {
switch (c) {
case '*': regexStr += ".*"; break;
case '.': regexStr += "\\."; break;
case '/': regexStr += "/"; break;
default: regexStr += c; break;
}
}
regexStr += "$";
}
return std::regex(regexStr);
} | O0 | cpp | UniversalIgnoreParser::convertToRegex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %rdi, -0x168(%rbp)
movq %rdi, %rax
movq %rax, -0x160(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0xa6d0
movq -0x158(%rbp), %rdx
leaq 0xd970(%rip), %rsi # 0x98b96
leaq -0x38(%rbp), %rdi
callq 0x12700
jmp 0x8b231
leaq -0x39(%rbp), %rdi
callq 0xa460
movq -0x18(%rbp), %rdi
callq 0x60290
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x8b361
movq -0x18(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0xc5f0
movq -0x170(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x70(%rbp), %rdi
callq 0xb400
jmp 0x8b27b
leaq 0xd903(%rip), %rsi # 0x98b85
leaq -0xb0(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x48b40
jmp 0x8b294
leaq 0xd8ec(%rip), %rdx # 0x98b87
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xb3b0
jmp 0x8b2b0
leaq -0x38(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x57670
jmp 0x8b2c2
leaq -0x90(%rbp), %rdi
callq 0xb6c0
leaq -0xb0(%rbp), %rdi
callq 0xb6c0
leaq -0x70(%rbp), %rdi
callq 0xb6c0
jmp 0x8b5a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0xa460
jmp 0x8b5dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8b5d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8b353
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8b347
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xb6c0
leaq -0xb0(%rbp), %rdi
callq 0xb6c0
leaq -0x70(%rbp), %rdi
callq 0xb6c0
jmp 0x8b5d3
movq -0x18(%rbp), %rdi
movl $0x2f, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x13890
cmpq $-0x1, %rax
jne 0x8b499
movq -0x18(%rbp), %rdi
movl $0x2a, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x13890
cmpq $-0x1, %rax
jne 0x8b499
movq -0x18(%rbp), %rdx
leaq 0xd7ec(%rip), %rsi # 0x98b90
leaq -0x130(%rbp), %rdi
callq 0x48b40
jmp 0x8b3b2
leaq 0xd7db(%rip), %rdx # 0x98b94
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xb3b0
jmp 0x8b3ce
movq -0x18(%rbp), %rdx
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x48af0
jmp 0x8b3e7
leaq 0xd7a0(%rip), %rdx # 0x98b8e
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xb3b0
jmp 0x8b403
leaq -0x38(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xb490
leaq -0xd0(%rbp), %rdi
callq 0xb6c0
leaq -0xf0(%rbp), %rdi
callq 0xb6c0
leaq -0x110(%rbp), %rdi
callq 0xb6c0
leaq -0x130(%rbp), %rdi
callq 0xb6c0
jmp 0x8b5a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8b488
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x8b47c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xb6c0
leaq -0x110(%rbp), %rdi
callq 0xb6c0
leaq -0x130(%rbp), %rdi
callq 0xb6c0
jmp 0x8b5d3
movq -0x18(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
callq 0x15b00
movq %rax, -0x140(%rbp)
movq -0x138(%rbp), %rdi
callq 0x15b30
movq %rax, -0x148(%rbp)
leaq -0x140(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x3e950
xorb $-0x1, %al
testb $0x1, %al
jne 0x8b4e8
jmp 0x8b58d
leaq -0x140(%rbp), %rdi
callq 0x42580
movb (%rax), %al
movb %al, -0x149(%rbp)
movsbl -0x149(%rbp), %eax
movl %eax, -0x174(%rbp)
subl $0x2a, %eax
je 0x8b52a
jmp 0x8b510
movl -0x174(%rbp), %eax
subl $0x2e, %eax
je 0x8b53e
jmp 0x8b51d
movl -0x174(%rbp), %eax
subl $0x2f, %eax
je 0x8b552
jmp 0x8b566
leaq 0xd667(%rip), %rsi # 0x98b98
leaq -0x38(%rbp), %rdi
callq 0x576a0
jmp 0x8b53c
jmp 0x8b57a
leaq 0xd656(%rip), %rsi # 0x98b9b
leaq -0x38(%rbp), %rdi
callq 0x576a0
jmp 0x8b550
jmp 0x8b57a
leaq 0xd639(%rip), %rsi # 0x98b92
leaq -0x38(%rbp), %rdi
callq 0x576a0
jmp 0x8b564
jmp 0x8b57a
movsbl -0x149(%rbp), %esi
leaq -0x38(%rbp), %rdi
callq 0x17e10
jmp 0x8b578
jmp 0x8b57a
jmp 0x8b57c
leaq -0x140(%rbp), %rdi
callq 0x402f0
jmp 0x8b4ca
leaq 0xd5fa(%rip), %rsi # 0x98b8e
leaq -0x38(%rbp), %rdi
callq 0x576a0
jmp 0x8b59f
jmp 0x8b5a1
jmp 0x8b5a3
movq -0x168(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0x10, %edx
callq 0x8bb60
jmp 0x8b5ba
leaq -0x38(%rbp), %rdi
callq 0xb6c0
movq -0x160(%rbp), %rax
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0xb6c0
movq -0x48(%rbp), %rdi
callq 0xa6c0
nopw %cs:(%rax,%rax)
| _ZNK21UniversalIgnoreParser14convertToRegexERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 180h
mov [rbp+var_168], rdi
mov rax, rdi
mov [rbp+var_160], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rdi, [rbp+var_39]
mov [rbp+var_158], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_158]
lea rsi, asc_98B94+2; "^"
lea rdi, [rbp+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_8B231:
lea rdi, [rbp+var_39]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_18]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void)
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz loc_8B361
mov rdi, [rbp+var_18]
mov [rbp+var_170], rdi
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rsi, [rbp+var_170]
mov rcx, rax
dec rcx
xor eax, eax
mov edx, eax
lea rdi, [rbp+var_70]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short $+2
loc_8B27B:
lea rsi, unk_98B85
lea rdi, [rbp+var_B0]
lea rdx, [rbp+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
jmp short $+2
loc_8B294:
lea rdx, asc_98B87; ")(/.*)?$"
lea rdi, [rbp+var_90]
lea rsi, [rbp+var_B0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_8B2B0:
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_8B2C2:
lea rdi, [rbp+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_8B5A3
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_39]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_8B5DC
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp loc_8B5D3
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_8B353
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_8B347
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8B347:
lea rdi, [rbp+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8B353:
lea rdi, [rbp+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_8B5D3
loc_8B361:
mov rdi, [rbp+var_18]
mov esi, 2Fh ; '/'
xor eax, eax
mov edx, eax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz loc_8B499
mov rdi, [rbp+var_18]
mov esi, 2Ah ; '*'
xor eax, eax
mov edx, eax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz loc_8B499
mov rdx, [rbp+var_18]
lea rsi, asc_98B90; ".*/"
lea rdi, [rbp+var_130]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
jmp short $+2
loc_8B3B2:
lea rdx, asc_98B94; "$|^"
lea rdi, [rbp+var_110]
lea rsi, [rbp+var_130]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_8B3CE:
mov rdx, [rbp+var_18]
lea rdi, [rbp+var_F0]
lea rsi, [rbp+var_110]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&)
jmp short $+2
loc_8B3E7:
lea rdx, asc_98B87+7; "$"
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_F0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_8B403:
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_110]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_130]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_8B5A1
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_8B488
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_8B47C
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8B47C:
lea rdi, [rbp+var_110]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8B488:
lea rdi, [rbp+var_130]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_8B5D3
loc_8B499:
mov rax, [rbp+var_18]
mov [rbp+var_138], rax
mov rdi, [rbp+var_138]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rbp+var_140], rax
mov rdi, [rbp+var_138]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rbp+var_148], rax
loc_8B4CA:
lea rdi, [rbp+var_140]
lea rsi, [rbp+var_148]
call _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_8B4E8
jmp loc_8B58D
loc_8B4E8:
lea rdi, [rbp+var_140]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
mov al, [rax]
mov [rbp+var_149], al
movsx eax, [rbp+var_149]
mov [rbp+var_174], eax
sub eax, 2Ah ; '*'
jz short loc_8B52A
jmp short $+2
loc_8B510:
mov eax, [rbp+var_174]
sub eax, 2Eh ; '.'
jz short loc_8B53E
jmp short $+2
loc_8B51D:
mov eax, [rbp+var_174]
sub eax, 2Fh ; '/'
jz short loc_8B552
jmp short loc_8B566
loc_8B52A:
lea rsi, asc_98B98; ".*"
lea rdi, [rbp+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_8B53C:
jmp short loc_8B57A
loc_8B53E:
lea rsi, asc_98B9B; "\\."
lea rdi, [rbp+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_8B550:
jmp short loc_8B57A
loc_8B552:
lea rsi, asc_98B90+2; "/"
lea rdi, [rbp+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_8B564:
jmp short loc_8B57A
loc_8B566:
movsx esi, [rbp+var_149]
lea rdi, [rbp+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_8B578:
jmp short $+2
loc_8B57A:
jmp short $+2
loc_8B57C:
lea rdi, [rbp+var_140]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
jmp loc_8B4CA
loc_8B58D:
lea rsi, asc_98B87+7; "$"
lea rdi, [rbp+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_8B59F:
jmp short $+2
loc_8B5A1:
jmp short $+2
loc_8B5A3:
mov rdi, [rbp+var_168]
lea rsi, [rbp+var_38]
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2ISt11char_traitsIcESaIcEEERKNS_12basic_stringIcT_T0_EENSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex<std::char_traits<char>,std::allocator<char>>(std::string const&,std::regex_constants::syntax_option_type)
jmp short $+2
loc_8B5BA:
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rbp+var_160]
add rsp, 180h
pop rbp
retn
loc_8B5D3:
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8B5DC:
mov rdi, [rbp+var_48]
call __Unwind_Resume
| long long UniversalIgnoreParser::convertToRegex(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v5; // [rsp+10h] [rbp-170h]
char v6; // [rsp+37h] [rbp-149h]
long long v7; // [rsp+38h] [rbp-148h] BYREF
long long v8; // [rsp+40h] [rbp-140h] BYREF
long long v9; // [rsp+48h] [rbp-138h]
_BYTE v10[32]; // [rsp+50h] [rbp-130h] BYREF
_BYTE v11[32]; // [rsp+70h] [rbp-110h] BYREF
_QWORD v12[4]; // [rsp+90h] [rbp-F0h] BYREF
_BYTE v13[32]; // [rsp+B0h] [rbp-D0h] BYREF
_BYTE v14[32]; // [rsp+D0h] [rbp-B0h] BYREF
_BYTE v15[32]; // [rsp+F0h] [rbp-90h] BYREF
_BYTE v16[36]; // [rsp+110h] [rbp-70h] BYREF
char v17; // [rsp+147h] [rbp-39h] BYREF
_QWORD v18[4]; // [rsp+148h] [rbp-38h] BYREF
long long v19; // [rsp+168h] [rbp-18h]
long long v20; // [rsp+170h] [rbp-10h]
long long v21; // [rsp+178h] [rbp-8h]
v21 = a1;
v20 = a2;
v19 = a3;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v18, (long long)"^", (long long)&v17);
std::allocator<char>::~allocator(&v17);
if ( *(_BYTE *)std::string::back(v19) == 47 )
{
v5 = v19;
v3 = std::string::length(v19);
std::string::substr((long long)v16, v5, 0LL, v3 - 1);
std::operator+<char>((long long)v14, (long long)&unk_98B85, (long long)v16);
std::operator+<char>((long long)v15, (long long)v14, (long long)")(/.*)?$");
std::string::operator+=((long long)v18, (long long)v15);
std::string::~string(v15);
std::string::~string(v14);
std::string::~string(v16);
}
else if ( std::string::find(v19, 47, 0LL) == -1 && std::string::find(v19, 42, 0LL) == -1 )
{
std::operator+<char>((long long)v10, (long long)".*/", v19);
std::operator+<char>((long long)v11, (long long)v10, (long long)"$|^");
std::operator+<char>(v12, (long long)v11, v19);
std::operator+<char>((long long)v13, (long long)v12, (long long)"$");
std::string::operator=((long long)v18, (long long)v13);
std::string::~string(v13);
std::string::~string(v12);
std::string::~string(v11);
std::string::~string(v10);
}
else
{
v9 = v19;
v8 = std::string::begin(v19);
v7 = std::string::end(v9);
while ( !__gnu_cxx::operator==<char const*,std::string>((long long)&v8, (long long)&v7) )
{
v6 = *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)&v8);
switch ( v6 )
{
case '*':
std::string::operator+=((long long)v18, (long long)".*");
break;
case '.':
std::string::operator+=((long long)v18, (long long)"\\.");
break;
case '/':
std::string::operator+=((long long)v18, (long long)"/");
break;
default:
std::string::operator+=((long long)v18, v6);
break;
}
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(&v8);
}
std::string::operator+=((long long)v18, (long long)"$");
}
std::basic_regex<char,std::regex_traits<char>>::basic_regex<std::char_traits<char>,std::allocator<char>>(
a1,
v18,
16LL);
std::string::~string(v18);
return a1;
}
| convertToRegex:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV qword ptr [RBP + -0x168],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x160],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[RBP + -0x39]
MOV qword ptr [RBP + -0x158],RDI
CALL 0x0010a6d0
MOV RDX,qword ptr [RBP + -0x158]
LAB_0018b21f:
LEA RSI,[0x198b96]
LEA RDI,[RBP + -0x38]
CALL 0x00112700
JMP 0x0018b231
LAB_0018b231:
LEA RDI,[RBP + -0x39]
CALL 0x0010a460
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00160290
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0018b361
MOV RDI,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x170],RDI
CALL 0x0010c5f0
MOV RSI,qword ptr [RBP + -0x170]
MOV RCX,RAX
DEC RCX
LAB_0018b26c:
XOR EAX,EAX
MOV EDX,EAX
LEA RDI,[RBP + -0x70]
CALL 0x0010b400
JMP 0x0018b27b
LAB_0018b27b:
LEA RSI,[0x198b85]
LEA RDI,[RBP + -0xb0]
LEA RDX,[RBP + -0x70]
CALL 0x00148b40
JMP 0x0018b294
LAB_0018b294:
LEA RDX,[0x198b87]
LEA RDI,[RBP + -0x90]
LEA RSI,[RBP + -0xb0]
CALL 0x0010b3b0
JMP 0x0018b2b0
LAB_0018b2b0:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x90]
CALL 0x00157670
JMP 0x0018b2c2
LAB_0018b2c2:
LEA RDI,[RBP + -0x90]
CALL 0x0010b6c0
LEA RDI,[RBP + -0xb0]
CALL 0x0010b6c0
LEA RDI,[RBP + -0x70]
CALL 0x0010b6c0
JMP 0x0018b5a3
LAB_0018b361:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x2f
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00113890
CMP RAX,-0x1
JNZ 0x0018b499
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x2a
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00113890
CMP RAX,-0x1
JNZ 0x0018b499
MOV RDX,qword ptr [RBP + -0x18]
LAB_0018b39d:
LEA RSI,[0x198b90]
LEA RDI,[RBP + -0x130]
CALL 0x00148b40
JMP 0x0018b3b2
LAB_0018b3b2:
LEA RDX,[0x198b94]
LEA RDI,[RBP + -0x110]
LEA RSI,[RBP + -0x130]
CALL 0x0010b3b0
JMP 0x0018b3ce
LAB_0018b3ce:
MOV RDX,qword ptr [RBP + -0x18]
LAB_0018b3d2:
LEA RDI,[RBP + -0xf0]
LEA RSI,[RBP + -0x110]
CALL 0x00148af0
JMP 0x0018b3e7
LAB_0018b3e7:
LEA RDX,[0x198b8e]
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0xf0]
CALL 0x0010b3b0
JMP 0x0018b403
LAB_0018b403:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0xd0]
CALL 0x0010b490
LEA RDI,[RBP + -0xd0]
CALL 0x0010b6c0
LEA RDI,[RBP + -0xf0]
CALL 0x0010b6c0
LEA RDI,[RBP + -0x110]
CALL 0x0010b6c0
LEA RDI,[RBP + -0x130]
CALL 0x0010b6c0
JMP 0x0018b5a1
LAB_0018b499:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x138],RAX
MOV RDI,qword ptr [RBP + -0x138]
CALL 0x00115b00
MOV qword ptr [RBP + -0x140],RAX
MOV RDI,qword ptr [RBP + -0x138]
CALL 0x00115b30
MOV qword ptr [RBP + -0x148],RAX
LAB_0018b4ca:
LEA RDI,[RBP + -0x140]
LEA RSI,[RBP + -0x148]
CALL 0x0013e950
XOR AL,0xff
TEST AL,0x1
JNZ 0x0018b4e8
JMP 0x0018b58d
LAB_0018b4e8:
LEA RDI,[RBP + -0x140]
CALL 0x00142580
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x149],AL
MOVSX EAX,byte ptr [RBP + -0x149]
MOV dword ptr [RBP + -0x174],EAX
SUB EAX,0x2a
JZ 0x0018b52a
JMP 0x0018b510
LAB_0018b510:
MOV EAX,dword ptr [RBP + -0x174]
SUB EAX,0x2e
JZ 0x0018b53e
JMP 0x0018b51d
LAB_0018b51d:
MOV EAX,dword ptr [RBP + -0x174]
SUB EAX,0x2f
JZ 0x0018b552
JMP 0x0018b566
LAB_0018b52a:
LEA RSI,[0x198b98]
LEA RDI,[RBP + -0x38]
CALL 0x001576a0
JMP 0x0018b53c
LAB_0018b53c:
JMP 0x0018b57a
LAB_0018b53e:
LEA RSI,[0x198b9b]
LEA RDI,[RBP + -0x38]
CALL 0x001576a0
JMP 0x0018b550
LAB_0018b550:
JMP 0x0018b57a
LAB_0018b552:
LEA RSI,[0x198b92]
LEA RDI,[RBP + -0x38]
CALL 0x001576a0
JMP 0x0018b564
LAB_0018b564:
JMP 0x0018b57a
LAB_0018b566:
MOVSX ESI,byte ptr [RBP + -0x149]
LEA RDI,[RBP + -0x38]
CALL 0x00117e10
JMP 0x0018b578
LAB_0018b578:
JMP 0x0018b57a
LAB_0018b57a:
JMP 0x0018b57c
LAB_0018b57c:
LEA RDI,[RBP + -0x140]
CALL 0x001402f0
JMP 0x0018b4ca
LAB_0018b58d:
LEA RSI,[0x198b8e]
LEA RDI,[RBP + -0x38]
CALL 0x001576a0
JMP 0x0018b59f
LAB_0018b59f:
JMP 0x0018b5a1
LAB_0018b5a1:
JMP 0x0018b5a3
LAB_0018b5a3:
MOV RDI,qword ptr [RBP + -0x168]
LEA RSI,[RBP + -0x38]
MOV EDX,0x10
CALL 0x0018bb60
LAB_0018b5b8:
JMP 0x0018b5ba
LAB_0018b5ba:
LEA RDI,[RBP + -0x38]
CALL 0x0010b6c0
MOV RAX,qword ptr [RBP + -0x160]
ADD RSP,0x180
POP RBP
RET
|
/* UniversalIgnoreParser::convertToRegex(std::__cxx11::string const&) const */
string * UniversalIgnoreParser::convertToRegex(string *param_1)
{
char cVar1;
byte bVar2;
char *pcVar3;
long lVar4;
string *in_RDX;
int8 local_150;
int8 local_148;
string *local_140;
string local_138 [32];
string local_118 [32];
string local_f8 [32];
string local_d8 [32];
string local_b8 [32];
string local_98 [32];
string local_78 [55];
allocator local_41;
string local_40 [32];
string *local_20;
string *local_10;
local_20 = in_RDX;
local_10 = param_1;
std::allocator<char>::allocator();
/* try { // try from 0018b21f to 0018b22e has its CatchHandler @ 0018b2e8 */
std::__cxx11::string::string<std::allocator<char>>(local_40,"^",&local_41);
std::allocator<char>::~allocator((allocator<char> *)&local_41);
pcVar3 = (char *)std::__cxx11::string::back(local_20);
if (*pcVar3 == '/') {
std::__cxx11::string::length(local_20);
/* try { // try from 0018b26c to 0018b278 has its CatchHandler @ 0018b302 */
std::__cxx11::string::substr((ulong)local_78,(ulong)local_20);
/* try { // try from 0018b27b to 0018b291 has its CatchHandler @ 0018b313 */
std::operator+((char *)local_b8,(string *)&DAT_00198b85);
/* try { // try from 0018b294 to 0018b2ad has its CatchHandler @ 0018b321 */
std::operator+(local_98,(char *)local_b8);
/* try { // try from 0018b2b0 to 0018b2bf has its CatchHandler @ 0018b32f */
std::__cxx11::string::operator+=(local_40,local_98);
std::__cxx11::string::~string(local_98);
std::__cxx11::string::~string(local_b8);
std::__cxx11::string::~string(local_78);
}
else {
lVar4 = std::__cxx11::string::find(local_20,'/',0);
if ((lVar4 == -1) && (lVar4 = std::__cxx11::string::find(local_20,'*',0), lVar4 == -1)) {
/* try { // try from 0018b39d to 0018b3af has its CatchHandler @ 0018b302 */
std::operator+((char *)local_138,(string *)&DAT_00198b90);
/* try { // try from 0018b3b2 to 0018b3cb has its CatchHandler @ 0018b448 */
std::operator+(local_118,(char *)local_138);
/* try { // try from 0018b3d2 to 0018b3e4 has its CatchHandler @ 0018b456 */
std::operator+(local_f8,local_118);
/* try { // try from 0018b3e7 to 0018b400 has its CatchHandler @ 0018b464 */
std::operator+(local_d8,(char *)local_f8);
std::__cxx11::string::operator=(local_40,local_d8);
std::__cxx11::string::~string(local_d8);
std::__cxx11::string::~string(local_f8);
std::__cxx11::string::~string(local_118);
std::__cxx11::string::~string(local_138);
}
else {
local_140 = local_20;
local_148 = std::__cxx11::string::begin(local_20);
local_150 = std::__cxx11::string::end(local_140);
while (bVar2 = _ZN9__gnu_cxxeqIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_148,&local_150), ((bVar2 ^ 0xff) & 1) != 0) {
pcVar3 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
((__normal_iterator<char_const*,std::__cxx11::string> *)
&local_148);
cVar1 = *pcVar3;
if (cVar1 == '*') {
/* try { // try from 0018b52a to 0018b5b7 has its CatchHandler @ 0018b302 */
std::__cxx11::string::operator+=(local_40,".*");
}
else if (cVar1 == '.') {
std::__cxx11::string::operator+=(local_40,"\\.");
}
else if (cVar1 == '/') {
std::__cxx11::string::operator+=(local_40,"/");
}
else {
std::__cxx11::string::operator+=(local_40,cVar1);
}
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_148);
}
std::__cxx11::string::operator+=(local_40,"$");
}
}
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::
basic_regex<std::char_traits<char>,std::allocator<char>>
((basic_regex<char,std::__cxx11::regex_traits<char>> *)param_1,local_40,0x10);
std::__cxx11::string::~string(local_40);
return param_1;
}
| |
33,009 | my_b_read | eloqsql/mysys/mf_iocache.c | int _my_b_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t left_length;
int res;
/* If the buffer is not empty yet, copy what is available. */
if ((left_length= (size_t) (info->read_end - info->read_pos)))
{
DBUG_ASSERT(Count > left_length);
memcpy(Buffer, info->read_pos, left_length);
Buffer+=left_length;
Count-=left_length;
}
res= info->read_function(info, Buffer, Count);
if (res && info->error >= 0)
info->error+= (int)left_length; /* update number or read bytes */
return res;
} | O3 | c | my_b_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %r14
subq %rsi, %r14
je 0x984d8
movq %r12, %rdi
movq %r14, %rdx
callq 0x29090
addq %r14, %r12
subq %r14, %r15
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0xa0(%rbx)
testl %eax, %eax
je 0x984fe
movl 0xe4(%rbx), %ecx
testl %ecx, %ecx
js 0x984fe
addl %r14d, %ecx
movl %ecx, 0xe4(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _my_b_read:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, [rdi+10h]
mov r14, [rdi+18h]
sub r14, rsi
jz short loc_984D8
mov rdi, r12
mov rdx, r14
call _memcpy
add r12, r14
sub r15, r14
loc_984D8:
mov rdi, rbx
mov rsi, r12
mov rdx, r15
call qword ptr [rbx+0A0h]
test eax, eax
jz short loc_984FE
mov ecx, [rbx+0E4h]
test ecx, ecx
js short loc_984FE
add ecx, r14d
mov [rbx+0E4h], ecx
loc_984FE:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_b_read(long long a1, long long a2, long long a3)
{
long long v5; // rsi
long long v6; // r14
long long result; // rax
int v8; // ecx
v5 = *(_QWORD *)(a1 + 16);
v6 = *(_QWORD *)(a1 + 24) - v5;
if ( v6 )
{
memcpy(a2, v5, v6);
a2 += v6;
a3 -= v6;
}
result = (*(long long ( **)(long long, long long, long long))(a1 + 160))(a1, a2, a3);
if ( (_DWORD)result )
{
v8 = *(_DWORD *)(a1 + 228);
if ( v8 >= 0 )
*(_DWORD *)(a1 + 228) = v6 + v8;
}
return result;
}
| _my_b_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x10]
MOV R14,qword ptr [RDI + 0x18]
SUB R14,RSI
JZ 0x001984d8
MOV RDI,R12
MOV RDX,R14
CALL 0x00129090
ADD R12,R14
SUB R15,R14
LAB_001984d8:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
CALL qword ptr [RBX + 0xa0]
TEST EAX,EAX
JZ 0x001984fe
MOV ECX,dword ptr [RBX + 0xe4]
TEST ECX,ECX
JS 0x001984fe
ADD ECX,R14D
MOV dword ptr [RBX + 0xe4],ECX
LAB_001984fe:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void _my_b_read(long param_1,void *param_2,long param_3)
{
int iVar1;
size_t __n;
__n = *(long *)(param_1 + 0x18) - (long)*(void **)(param_1 + 0x10);
if (__n != 0) {
memcpy(param_2,*(void **)(param_1 + 0x10),__n);
param_2 = (void *)((long)param_2 + __n);
param_3 = param_3 - __n;
}
iVar1 = (**(code **)(param_1 + 0xa0))(param_1,param_2,param_3);
if ((iVar1 != 0) && (-1 < *(int *)(param_1 + 0xe4))) {
*(int *)(param_1 + 0xe4) = *(int *)(param_1 + 0xe4) + (int)__n;
}
return;
}
| |
33,010 | add_private_class_field | bluesky950520[P]quickjs/quickjs.c | static int add_private_class_field(JSParseState *s, JSFunctionDef *fd,
JSAtom name, JSVarKindEnum var_kind, BOOL is_static)
{
JSContext *ctx = s->ctx;
JSVarDef *vd;
int idx;
idx = add_scope_var(ctx, fd, name, var_kind);
if (idx < 0)
return idx;
vd = &fd->vars[idx];
vd->is_lexical = 1;
vd->is_const = 1;
vd->is_static_private = is_static;
return idx;
} | O0 | c | add_private_class_field:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movl %ecx, 0x28(%rsp)
movl %r8d, 0x24(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x2c(%rsp), %edx
movl 0x28(%rsp), %ecx
callq 0xadb10
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0xb4664
movl 0xc(%rsp), %eax
movl %eax, 0x44(%rsp)
jmp 0xb46ca
movq 0x30(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
andl $-0x3, %ecx
orl $0x2, %ecx
movl %ecx, 0xc(%rax)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
andl $-0x2, %ecx
orl $0x1, %ecx
movl %ecx, 0xc(%rax)
movl 0x24(%rsp), %eax
movb %al, %cl
movq 0x10(%rsp), %rax
movzbl %cl, %edx
movl 0xc(%rax), %ecx
andl $0x1, %edx
shll $0x3, %edx
andl $-0x9, %ecx
orl %edx, %ecx
movl %ecx, 0xc(%rax)
movl 0xc(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| add_private_class_field:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_1C], edx
mov [rsp+48h+var_20], ecx
mov [rsp+48h+var_24], r8d
mov rax, [rsp+48h+var_10]
mov rax, [rax]
mov [rsp+48h+var_30], rax
mov rdi, [rsp+48h+var_30]
mov rsi, [rsp+48h+var_18]
mov edx, [rsp+48h+var_1C]
mov ecx, [rsp+48h+var_20]
call add_scope_var
mov [rsp+48h+var_3C], eax
cmp [rsp+48h+var_3C], 0
jge short loc_B4664
mov eax, [rsp+48h+var_3C]
mov [rsp+48h+var_4], eax
jmp short loc_B46CA
loc_B4664:
mov rax, [rsp+48h+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+48h+var_3C]
shl rcx, 4
add rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_38]
mov ecx, [rax+0Ch]
and ecx, 0FFFFFFFDh
or ecx, 2
mov [rax+0Ch], ecx
mov rax, [rsp+48h+var_38]
mov ecx, [rax+0Ch]
and ecx, 0FFFFFFFEh
or ecx, 1
mov [rax+0Ch], ecx
mov eax, [rsp+48h+var_24]
mov cl, al
mov rax, [rsp+48h+var_38]
movzx edx, cl
mov ecx, [rax+0Ch]
and edx, 1
shl edx, 3
and ecx, 0FFFFFFF7h
or ecx, edx
mov [rax+0Ch], ecx
mov eax, [rsp+48h+var_3C]
mov [rsp+48h+var_4], eax
loc_B46CA:
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long add_private_class_field(
long long *a1,
long long a2,
unsigned int a3,
unsigned int 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; // [rsp+Ch] [rbp-3Ch]
long long v16; // [rsp+10h] [rbp-38h]
char v17; // [rsp+24h] [rbp-24h]
v17 = a5;
v15 = add_scope_var(*a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( v15 >= 0 )
{
v16 = 16LL * v15 + *(_QWORD *)(a2 + 144);
*(_DWORD *)(v16 + 12) = *(_DWORD *)(v16 + 12) & 0xFFFFFFFD | 2;
*(_DWORD *)(v16 + 12) = *(_DWORD *)(v16 + 12) & 0xFFFFFFFE | 1;
*(_DWORD *)(v16 + 12) = (8 * (v17 & 1)) | *(_DWORD *)(v16 + 12) & 0xFFFFFFF7;
}
return (unsigned int)v15;
}
| add_private_class_field:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV dword ptr [RSP + 0x2c],EDX
MOV dword ptr [RSP + 0x28],ECX
MOV dword ptr [RSP + 0x24],R8D
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x30]
MOV EDX,dword ptr [RSP + 0x2c]
MOV ECX,dword ptr [RSP + 0x28]
CALL 0x001adb10
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JGE 0x001b4664
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x44],EAX
JMP 0x001b46ca
LAB_001b4664:
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + 0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0xc]
AND ECX,0xfffffffd
OR ECX,0x2
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0xc]
AND ECX,0xfffffffe
OR ECX,0x1
MOV dword ptr [RAX + 0xc],ECX
MOV EAX,dword ptr [RSP + 0x24]
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EDX,CL
MOV ECX,dword ptr [RAX + 0xc]
AND EDX,0x1
SHL EDX,0x3
AND ECX,0xfffffff7
OR ECX,EDX
MOV dword ptr [RAX + 0xc],ECX
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x44],EAX
LAB_001b46ca:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
int add_private_class_field
(int8 *param_1,long param_2,int4 param_3,int4 param_4,uint param_5)
{
int iVar1;
long lVar2;
iVar1 = add_scope_var(*param_1,param_2,param_3,param_4);
if (-1 < iVar1) {
lVar2 = *(long *)(param_2 + 0x90) + (long)iVar1 * 0x10;
*(uint *)(lVar2 + 0xc) = *(uint *)(lVar2 + 0xc) & 0xfffffffd | 2;
*(uint *)(lVar2 + 0xc) = *(uint *)(lVar2 + 0xc) & 0xfffffffe | 1;
*(uint *)(lVar2 + 0xc) = *(uint *)(lVar2 + 0xc) & 0xfffffff7 | (param_5 & 1) << 3;
}
return iVar1;
}
| |
33,011 | add_private_class_field | bluesky950520[P]quickjs/quickjs.c | static int add_private_class_field(JSParseState *s, JSFunctionDef *fd,
JSAtom name, JSVarKindEnum var_kind, BOOL is_static)
{
JSContext *ctx = s->ctx;
JSVarDef *vd;
int idx;
idx = add_scope_var(ctx, fd, name, var_kind);
if (idx < 0)
return idx;
vd = &fd->vars[idx];
vd->is_lexical = 1;
vd->is_const = 1;
vd->is_static_private = is_static;
return idx;
} | O2 | c | add_private_class_field:
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rsi, %r14
movq (%rdi), %rdi
callq 0x5a079
testl %eax, %eax
js 0x5dd94
movq 0x90(%r14), %rcx
movl %eax, %edx
shlq $0x4, %rdx
movl 0xc(%rcx,%rdx), %esi
andl $0x1, %ebx
andl $-0xc, %esi
leal (%rsi,%rbx,8), %esi
addl $0x3, %esi
movl %esi, 0xc(%rcx,%rdx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| add_private_class_field:
push r14
push rbx
push rax
mov ebx, r8d
mov r14, rsi
mov rdi, [rdi]
call add_scope_var
test eax, eax
js short loc_5DD94
mov rcx, [r14+90h]
mov edx, eax
shl rdx, 4
mov esi, [rcx+rdx+0Ch]
and ebx, 1
and esi, 0FFFFFFF4h
lea esi, [rsi+rbx*8]
add esi, 3
mov [rcx+rdx+0Ch], esi
loc_5DD94:
add rsp, 8
pop rbx
pop r14
retn
| long long add_private_class_field(
long long *a1,
long long a2,
int a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // bl
long long result; // rax
v14 = a5;
result = add_scope_var(*a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( (int)result >= 0 )
*(_DWORD *)(*(_QWORD *)(a2 + 144) + 16LL * (unsigned int)result + 12) = (*(_DWORD *)(*(_QWORD *)(a2 + 144)
+ 16LL * (unsigned int)result
+ 12) & 0xFFFFFFF4)
+ 8 * (v14 & 1)
+ 3;
return result;
}
| add_private_class_field:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,R8D
MOV R14,RSI
MOV RDI,qword ptr [RDI]
CALL 0x0015a079
TEST EAX,EAX
JS 0x0015dd94
MOV RCX,qword ptr [R14 + 0x90]
MOV EDX,EAX
SHL RDX,0x4
MOV ESI,dword ptr [RCX + RDX*0x1 + 0xc]
AND EBX,0x1
AND ESI,0xfffffff4
LEA ESI,[RSI + RBX*0x8]
ADD ESI,0x3
MOV dword ptr [RCX + RDX*0x1 + 0xc],ESI
LAB_0015dd94:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void add_private_class_field
(int8 *param_1,long param_2,int8 param_3,int8 param_4,uint param_5)
{
uint uVar1;
uVar1 = add_scope_var(*param_1);
if (-1 < (int)uVar1) {
*(uint *)(*(long *)(param_2 + 0x90) + 0xc + (ulong)uVar1 * 0x10) =
(*(uint *)(*(long *)(param_2 + 0x90) + 0xc + (ulong)uVar1 * 0x10) & 0xfffffff4) +
(param_5 & 1) * 8 + 3;
}
return;
}
| |
33,012 | my_coll_parser_scan_setting | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_setting(MY_COLL_RULE_PARSER *p)
{
MY_COLL_RULES *rules= p->rules;
MY_COLL_LEXEM *lexem= my_coll_parser_curr(p);
if (!lex_cmp(lexem, C_STRING_WITH_LEN("[version 4.0.0]")))
{
rules->version= 400;
rules->uca= &my_uca_v400;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[version 5.2.0]")))
{
rules->version= 520;
rules->uca= &my_uca_v520;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[shift-after-method expand]")))
{
rules->shift_after_method= my_shift_method_expand;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[shift-after-method simple]")))
{
rules->shift_after_method= my_shift_method_simple;
}
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[strength 1]")))
rules->strength= 1;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[strength 2]")))
rules->strength= 2;
else
{
return 0;
}
return my_coll_parser_scan(p);
} | O0 | c | my_coll_parser_scan_setting:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4f5b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x2ce73(%rip), %rsi # 0x7ca76
movl $0xf, %edx
callq 0x4fd30
cmpl $0x0, %eax
jne 0x4fc30
movq -0x18(%rbp), %rax
movl $0x190, (%rax) # imm = 0x190
movq -0x18(%rbp), %rax
leaq 0x26a219(%rip), %rcx # 0x2b9e40
movq %rcx, 0x8(%rax)
jmp 0x4fd1a
movq -0x20(%rbp), %rdi
leaq 0x2ce4b(%rip), %rsi # 0x7ca86
movl $0xf, %edx
callq 0x4fd30
cmpl $0x0, %eax
jne 0x4fc68
movq -0x18(%rbp), %rax
movl $0x208, (%rax) # imm = 0x208
movq -0x18(%rbp), %rax
leaq 0x26f349(%rip), %rcx # 0x2befa8
movq %rcx, 0x8(%rax)
jmp 0x4fd18
movq -0x20(%rbp), %rdi
leaq 0x2ce23(%rip), %rsi # 0x7ca96
movl $0x1b, %edx
callq 0x4fd30
cmpl $0x0, %eax
jne 0x4fc92
movq -0x18(%rbp), %rax
movl $0x1, 0x30(%rax)
jmp 0x4fd16
movq -0x20(%rbp), %rdi
leaq 0x2ce15(%rip), %rsi # 0x7cab2
movl $0x1b, %edx
callq 0x4fd30
cmpl $0x0, %eax
jne 0x4fcb9
movq -0x18(%rbp), %rax
movl $0x0, 0x30(%rax)
jmp 0x4fd14
movq -0x20(%rbp), %rdi
leaq 0x2ce0a(%rip), %rsi # 0x7cace
movl $0xc, %edx
callq 0x4fd30
cmpl $0x0, %eax
jne 0x4fce0
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
jmp 0x4fd12
movq -0x20(%rbp), %rdi
leaq 0x2c427(%rip), %rsi # 0x7c112
movl $0xc, %edx
callq 0x4fd30
cmpl $0x0, %eax
jne 0x4fd07
movq -0x18(%rbp), %rax
movl $0x2, 0x4(%rax)
jmp 0x4fd10
movl $0x0, -0x4(%rbp)
jmp 0x4fd26
jmp 0x4fd12
jmp 0x4fd14
jmp 0x4fd16
jmp 0x4fd18
jmp 0x4fd1a
movq -0x10(%rbp), %rdi
callq 0x4fd90
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| my_coll_parser_scan_setting:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+0F0h]
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
call my_coll_parser_curr
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
lea rsi, aVersion400; "[version 4.0.0]"
mov edx, 0Fh
call lex_cmp
cmp eax, 0
jnz short loc_4FC30
mov rax, [rbp+var_18]
mov dword ptr [rax], 190h
mov rax, [rbp+var_18]
lea rcx, my_uca_v400
mov [rax+8], rcx
jmp loc_4FD1A
loc_4FC30:
mov rdi, [rbp+var_20]
lea rsi, aVersion520; "[version 5.2.0]"
mov edx, 0Fh
call lex_cmp
cmp eax, 0
jnz short loc_4FC68
mov rax, [rbp+var_18]
mov dword ptr [rax], 208h
mov rax, [rbp+var_18]
lea rcx, my_uca_v520
mov [rax+8], rcx
jmp loc_4FD18
loc_4FC68:
mov rdi, [rbp+var_20]
lea rsi, aShiftAfterMeth; "[shift-after-method expand]"
mov edx, 1Bh
call lex_cmp
cmp eax, 0
jnz short loc_4FC92
mov rax, [rbp+var_18]
mov dword ptr [rax+30h], 1
jmp loc_4FD16
loc_4FC92:
mov rdi, [rbp+var_20]
lea rsi, aShiftAfterMeth_0; "[shift-after-method simple]"
mov edx, 1Bh
call lex_cmp
cmp eax, 0
jnz short loc_4FCB9
mov rax, [rbp+var_18]
mov dword ptr [rax+30h], 0
jmp short loc_4FD14
loc_4FCB9:
mov rdi, [rbp+var_20]
lea rsi, aStrength1; "[strength 1]"
mov edx, 0Ch
call lex_cmp
cmp eax, 0
jnz short loc_4FCE0
mov rax, [rbp+var_18]
mov dword ptr [rax+4], 1
jmp short loc_4FD12
loc_4FCE0:
mov rdi, [rbp+var_20]
lea rsi, aStrength2; "[strength 2]"
mov edx, 0Ch
call lex_cmp
cmp eax, 0
jnz short loc_4FD07
mov rax, [rbp+var_18]
mov dword ptr [rax+4], 2
jmp short loc_4FD10
loc_4FD07:
mov [rbp+var_4], 0
jmp short loc_4FD26
loc_4FD10:
jmp short $+2
loc_4FD12:
jmp short $+2
loc_4FD14:
jmp short $+2
loc_4FD16:
jmp short $+2
loc_4FD18:
jmp short $+2
loc_4FD1A:
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov [rbp+var_4], eax
loc_4FD26:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_coll_parser_scan_setting(long long a1)
{
long long v2; // [rsp+0h] [rbp-20h]
long long v3; // [rsp+8h] [rbp-18h]
v3 = *(_QWORD *)(a1 + 240);
v2 = my_coll_parser_curr(a1);
if ( !(unsigned int)lex_cmp(v2, "[version 4.0.0]", 15LL) )
{
*(_DWORD *)v3 = 400;
*(_QWORD *)(v3 + 8) = &my_uca_v400;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, "[version 5.2.0]", 15LL) )
{
*(_DWORD *)v3 = 520;
*(_QWORD *)(v3 + 8) = &my_uca_v520;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, "[shift-after-method expand]", 27LL) )
{
*(_DWORD *)(v3 + 48) = 1;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, "[shift-after-method simple]", 27LL) )
{
*(_DWORD *)(v3 + 48) = 0;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, "[strength 1]", 12LL) )
{
*(_DWORD *)(v3 + 4) = 1;
return (unsigned int)my_coll_parser_scan(a1);
}
if ( !(unsigned int)lex_cmp(v2, "[strength 2]", 12LL) )
{
*(_DWORD *)(v3 + 4) = 2;
return (unsigned int)my_coll_parser_scan(a1);
}
return 0;
}
| my_coll_parser_scan_setting:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf0]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014f5b0
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x17ca76]
MOV EDX,0xf
CALL 0x0014fd30
CMP EAX,0x0
JNZ 0x0014fc30
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x190
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x3b9e40]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0014fd1a
LAB_0014fc30:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x17ca86]
MOV EDX,0xf
CALL 0x0014fd30
CMP EAX,0x0
JNZ 0x0014fc68
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x208
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x3befa8]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0014fd18
LAB_0014fc68:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x17ca96]
MOV EDX,0x1b
CALL 0x0014fd30
CMP EAX,0x0
JNZ 0x0014fc92
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x30],0x1
JMP 0x0014fd16
LAB_0014fc92:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x17cab2]
MOV EDX,0x1b
CALL 0x0014fd30
CMP EAX,0x0
JNZ 0x0014fcb9
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x30],0x0
JMP 0x0014fd14
LAB_0014fcb9:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x17cace]
MOV EDX,0xc
CALL 0x0014fd30
CMP EAX,0x0
JNZ 0x0014fce0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x4],0x1
JMP 0x0014fd12
LAB_0014fce0:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x17c112]
MOV EDX,0xc
CALL 0x0014fd30
CMP EAX,0x0
JNZ 0x0014fd07
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x4],0x2
JMP 0x0014fd10
LAB_0014fd07:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014fd26
LAB_0014fd10:
JMP 0x0014fd12
LAB_0014fd12:
JMP 0x0014fd14
LAB_0014fd14:
JMP 0x0014fd16
LAB_0014fd16:
JMP 0x0014fd18
LAB_0014fd18:
JMP 0x0014fd1a
LAB_0014fd1a:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014fd90
MOV dword ptr [RBP + -0x4],EAX
LAB_0014fd26:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_coll_parser_scan_setting(long param_1)
{
int4 *puVar1;
int iVar2;
int4 uVar3;
int8 uVar4;
puVar1 = *(int4 **)(param_1 + 0xf0);
uVar4 = my_coll_parser_curr(param_1);
iVar2 = lex_cmp(uVar4,"[version 4.0.0]",0xf);
if (iVar2 == 0) {
*puVar1 = 400;
*(int1 **)(puVar1 + 2) = my_uca_v400;
}
else {
iVar2 = lex_cmp(uVar4,"[version 5.2.0]",0xf);
if (iVar2 == 0) {
*puVar1 = 0x208;
*(int1 **)(puVar1 + 2) = my_uca_v520;
}
else {
iVar2 = lex_cmp(uVar4,"[shift-after-method expand]",0x1b);
if (iVar2 == 0) {
puVar1[0xc] = 1;
}
else {
iVar2 = lex_cmp(uVar4,"[shift-after-method simple]",0x1b);
if (iVar2 == 0) {
puVar1[0xc] = 0;
}
else {
iVar2 = lex_cmp(uVar4,"[strength 1]",0xc);
if (iVar2 == 0) {
puVar1[1] = 1;
}
else {
iVar2 = lex_cmp(uVar4,"[strength 2]",0xc);
if (iVar2 != 0) {
return 0;
}
puVar1[1] = 2;
}
}
}
}
}
uVar3 = my_coll_parser_scan(param_1);
return uVar3;
}
| |
33,013 | ha_partition::copy_partitions(unsigned long long*, unsigned long long*) | eloqsql/sql/ha_partition.cc | int ha_partition::copy_partitions(ulonglong * const copied,
ulonglong * const deleted)
{
uint reorg_part= 0;
int result= 0;
longlong func_value;
DBUG_ENTER("ha_partition::copy_partitions");
if (m_part_info->linear_hash_ind)
{
if (m_part_info->part_type == HASH_PARTITION)
set_linear_hash_mask(m_part_info, m_part_info->num_parts);
else
set_linear_hash_mask(m_part_info, m_part_info->num_subparts);
}
else if (m_part_info->part_type == VERSIONING_PARTITION)
{
if (m_part_info->check_constants(ha_thd(), m_part_info))
goto init_error;
}
while (reorg_part < m_reorged_parts)
{
handler *file= m_reorged_file[reorg_part];
uint32 new_part;
late_extra_cache(reorg_part);
if (unlikely((result= file->ha_rnd_init_with_error(1))))
goto init_error;
while (TRUE)
{
if ((result= file->ha_rnd_next(m_rec0)))
{
if (result != HA_ERR_END_OF_FILE)
goto error;
/*
End-of-file reached, break out to continue with next partition or
end the copy process.
*/
break;
}
/* Found record to insert into new handler */
if (m_part_info->get_partition_id(m_part_info, &new_part,
&func_value))
{
/*
This record is in the original table but will not be in the new
table since it doesn't fit into any partition any longer due to
changed partitioning ranges or list values.
*/
(*deleted)++;
}
else
{
/* Copy record to new handler */
(*copied)++;
DBUG_ASSERT(!m_new_file[new_part]->row_logging);
result= m_new_file[new_part]->ha_write_row(m_rec0);
if (result)
goto error;
}
}
late_extra_no_cache(reorg_part);
file->ha_rnd_end();
reorg_part++;
}
DBUG_EXECUTE_IF("debug_abort_copy_partitions",
DBUG_RETURN(HA_ERR_UNSUPPORTED); );
DBUG_RETURN(FALSE);
error:
m_reorged_file[reorg_part]->ha_rnd_end();
init_error:
DBUG_RETURN(result);
} | O0 | cpp | ha_partition::copy_partitions(unsigned long long*, unsigned long long*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq 0x578(%rax), %rax
testb $0x1, 0x238(%rax)
je 0xee11ec
movq -0x48(%rbp), %rax
movq 0x578(%rax), %rax
cmpl $0x2, 0x1f8(%rax)
jne 0xee11cd
movq -0x48(%rbp), %rax
movq 0x578(%rax), %rdi
movq 0x578(%rax), %rax
movl 0x204(%rax), %esi
callq 0xdca900
jmp 0xee11ea
movq -0x48(%rbp), %rax
movq 0x578(%rax), %rdi
movq 0x578(%rax), %rax
movl 0x208(%rax), %esi
callq 0xdca900
jmp 0xee123e
movq -0x48(%rbp), %rax
movq 0x578(%rax), %rax
cmpl $0x4, 0x1f8(%rax)
jne 0xee123c
movq -0x48(%rbp), %rdi
movq 0x578(%rdi), %rax
movq 0x90(%rax), %rax
movq %rax, -0x50(%rbp)
callq 0xc1e920
movq -0x48(%rbp), %rcx
movq %rax, %rdi
movq -0x50(%rbp), %rax
movq 0x578(%rcx), %rsi
callq *%rax
testb $0x1, %al
jne 0xee1235
jmp 0xee123a
jmp 0xee1378
jmp 0xee123c
jmp 0xee123e
jmp 0xee1240
movq -0x48(%rbp), %rcx
movl -0x24(%rbp), %eax
cmpl 0x608(%rcx), %eax
jae 0xee1352
movq -0x48(%rbp), %rdi
movq 0x560(%rdi), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %esi
callq 0xee1390
movq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0xc20430
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
je 0xee128c
jmp 0xee1378
jmp 0xee128e
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x5b8(%rax), %rsi
callq 0xc1eb90
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
je 0xee12ba
cmpl $0x89, -0x28(%rbp)
je 0xee12b8
jmp 0xee1361
jmp 0xee132f
movq -0x48(%rbp), %rcx
movq 0x578(%rcx), %rax
movq 0x68(%rax), %rax
movq 0x578(%rcx), %rdi
leaq -0x3c(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq *%rax
cmpl $0x0, %eax
je 0xee12ef
movq -0x20(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0xee132a
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0xee12ff
movq -0x48(%rbp), %rax
movq 0x558(%rax), %rcx
movl -0x3c(%rbp), %edx
movq (%rcx,%rdx,8), %rdi
movq 0x5b8(%rax), %rsi
callq 0xc28170
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0xee1328
jmp 0xee1361
jmp 0xee132a
jmp 0xee128e
movq -0x48(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0xee1460
movq -0x38(%rbp), %rdi
callq 0x85d770
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xee1240
jmp 0xee1354
jmp 0xee1356
jmp 0xee1358
movl $0x0, -0x4(%rbp)
jmp 0xee1380
movq -0x48(%rbp), %rax
movq 0x560(%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x85d770
jmp 0xee137a
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN12ha_partition15copy_partitionsEPyS0_:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
mov [rbp+var_24], 0
mov [rbp+var_28], 0
mov rax, [rax+578h]
test byte ptr [rax+238h], 1
jz short loc_EE11EC
mov rax, [rbp+var_48]
mov rax, [rax+578h]
cmp dword ptr [rax+1F8h], 2
jnz short loc_EE11CD
mov rax, [rbp+var_48]
mov rdi, [rax+578h]; partition_info *
mov rax, [rax+578h]
mov esi, [rax+204h]; unsigned int
call _Z20set_linear_hash_maskP14partition_infoj; set_linear_hash_mask(partition_info *,uint)
jmp short loc_EE11EA
loc_EE11CD:
mov rax, [rbp+var_48]
mov rdi, [rax+578h]; partition_info *
mov rax, [rax+578h]
mov esi, [rax+208h]; unsigned int
call _Z20set_linear_hash_maskP14partition_infoj; set_linear_hash_mask(partition_info *,uint)
loc_EE11EA:
jmp short loc_EE123E
loc_EE11EC:
mov rax, [rbp+var_48]
mov rax, [rax+578h]
cmp dword ptr [rax+1F8h], 4
jnz short loc_EE123C
mov rdi, [rbp+var_48]; this
mov rax, [rdi+578h]
mov rax, [rax+90h]
mov [rbp+var_50], rax
call _ZNK7handler6ha_thdEv; handler::ha_thd(void)
mov rcx, [rbp+var_48]
mov rdi, rax
mov rax, [rbp+var_50]
mov rsi, [rcx+578h]
call rax
test al, 1
jnz short loc_EE1235
jmp short loc_EE123A
loc_EE1235:
jmp loc_EE1378
loc_EE123A:
jmp short $+2
loc_EE123C:
jmp short $+2
loc_EE123E:
jmp short $+2
loc_EE1240:
mov rcx, [rbp+var_48]
mov eax, [rbp+var_24]
cmp eax, [rcx+608h]
jnb loc_EE1352
mov rdi, [rbp+var_48]; this
mov rax, [rdi+560h]
mov ecx, [rbp+var_24]
mov rax, [rax+rcx*8]
mov [rbp+var_38], rax
mov esi, [rbp+var_24]; unsigned int
call _ZN12ha_partition16late_extra_cacheEj; ha_partition::late_extra_cache(uint)
mov rdi, [rbp+var_38]; this
mov esi, 1; bool
call _ZN7handler22ha_rnd_init_with_errorEb; handler::ha_rnd_init_with_error(bool)
mov [rbp+var_28], eax
cmp eax, 0
jz short loc_EE128C
jmp loc_EE1378
loc_EE128C:
jmp short $+2
loc_EE128E:
mov rax, [rbp+var_48]
mov rdi, [rbp+var_38]; this
mov rsi, [rax+5B8h]; unsigned __int8 *
call _ZN7handler11ha_rnd_nextEPh; handler::ha_rnd_next(uchar *)
mov [rbp+var_28], eax
cmp eax, 0
jz short loc_EE12BA
cmp [rbp+var_28], 89h
jz short loc_EE12B8
jmp loc_EE1361
loc_EE12B8:
jmp short loc_EE132F
loc_EE12BA:
mov rcx, [rbp+var_48]
mov rax, [rcx+578h]
mov rax, [rax+68h]
mov rdi, [rcx+578h]
lea rsi, [rbp+var_3C]
lea rdx, [rbp+var_30]
call rax
cmp eax, 0
jz short loc_EE12EF
mov rax, [rbp+var_20]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
jmp short loc_EE132A
loc_EE12EF:
mov rax, [rbp+var_18]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
jmp short $+2
loc_EE12FF:
mov rax, [rbp+var_48]
mov rcx, [rax+558h]
mov edx, [rbp+var_3C]
mov rdi, [rcx+rdx*8]; this
mov rsi, [rax+5B8h]; unsigned __int8 *
call _ZN7handler12ha_write_rowEPKh; handler::ha_write_row(uchar const*)
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_EE1328
jmp short loc_EE1361
loc_EE1328:
jmp short $+2
loc_EE132A:
jmp loc_EE128E
loc_EE132F:
mov rdi, [rbp+var_48]; this
mov esi, [rbp+var_24]; unsigned int
call _ZN12ha_partition19late_extra_no_cacheEj; ha_partition::late_extra_no_cache(uint)
mov rdi, [rbp+var_38]; this
call _ZN7handler10ha_rnd_endEv; handler::ha_rnd_end(void)
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_EE1240
loc_EE1352:
jmp short $+2
loc_EE1354:
jmp short $+2
loc_EE1356:
jmp short $+2
loc_EE1358:
mov [rbp+var_4], 0
jmp short loc_EE1380
loc_EE1361:
mov rax, [rbp+var_48]
mov rax, [rax+560h]
mov ecx, [rbp+var_24]
mov rdi, [rax+rcx*8]; this
call _ZN7handler10ha_rnd_endEv; handler::ha_rnd_end(void)
loc_EE1378:
jmp short $+2
loc_EE137A:
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
loc_EE1380:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long ha_partition::copy_partitions(ha_partition *this, unsigned long long *a2, unsigned long long *a3)
{
long long v3; // rax
long long ( *v5)(long long, _QWORD); // [rsp+0h] [rbp-50h]
unsigned int v6; // [rsp+14h] [rbp-3Ch] BYREF
handler *v7; // [rsp+18h] [rbp-38h]
_BYTE v8[8]; // [rsp+20h] [rbp-30h] BYREF
unsigned int v9; // [rsp+28h] [rbp-28h]
unsigned int v10; // [rsp+2Ch] [rbp-24h]
unsigned long long *v11; // [rsp+30h] [rbp-20h]
unsigned long long *v12; // [rsp+38h] [rbp-18h]
ha_partition *v13; // [rsp+40h] [rbp-10h]
v13 = this;
v12 = a2;
v11 = a3;
v10 = 0;
v9 = 0;
if ( (*(_BYTE *)(*((_QWORD *)this + 175) + 568LL) & 1) != 0 )
{
if ( *(_DWORD *)(*((_QWORD *)this + 175) + 504LL) == 2 )
set_linear_hash_mask(*((partition_info **)this + 175), *(_DWORD *)(*((_QWORD *)this + 175) + 516LL));
else
set_linear_hash_mask(*((partition_info **)this + 175), *(_DWORD *)(*((_QWORD *)this + 175) + 520LL));
}
else if ( *(_DWORD *)(*((_QWORD *)this + 175) + 504LL) == 4 )
{
v5 = *(long long ( **)(long long, _QWORD))(*((_QWORD *)this + 175) + 144LL);
v3 = handler::ha_thd(this, (long long)a2, (long long)a3);
if ( (v5(v3, *((_QWORD *)this + 175)) & 1) != 0 )
return v9;
}
while ( 2 )
{
if ( v10 < *((_DWORD *)this + 386) )
{
v7 = *(handler **)(*((_QWORD *)this + 172) + 8LL * v10);
ha_partition::late_extra_cache(this, v10);
v9 = handler::ha_rnd_init_with_error(v7, 1);
if ( !v9 )
{
while ( 1 )
{
v9 = handler::ha_rnd_next(v7, *((unsigned __int8 **)this + 183));
if ( v9 )
break;
if ( (*(unsigned int ( **)(_QWORD, unsigned int *, _BYTE *))(*((_QWORD *)this + 175) + 104LL))(
*((_QWORD *)this + 175),
&v6,
v8) )
{
++*v11;
}
else
{
++*v12;
v9 = handler::ha_write_row(
*(Exec_time_tracker ***)(*((_QWORD *)this + 171) + 8LL * v6),
*((unsigned __int8 **)this + 183));
if ( v9 )
goto LABEL_17;
}
}
if ( v9 == 137 )
{
ha_partition::late_extra_no_cache(this, v10);
handler::ha_rnd_end(v7);
++v10;
continue;
}
LABEL_17:
handler::ha_rnd_end(*(handler **)(*((_QWORD *)this + 172) + 8LL * v10));
}
return v9;
}
break;
}
return 0;
}
| get_item_copy<Item_func_xpath_sum>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00d2f5f0
MOV RSI,RAX
MOV qword ptr [RBP + -0x48],RSI
MOV EDI,0x188
CALL 0x008ee3b0
MOV RCX,RAX
MOV qword ptr [RBP + -0x40],RCX
MOV byte ptr [RBP + -0x19],0x0
XOR EAX,EAX
CMP RCX,0x0
MOV qword ptr [RBP + -0x38],RAX
JZ 0x00ee11be
MOV RDI,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x19],0x1
MOV RSI,qword ptr [RBP + -0x10]
LAB_00ee11ad:
CALL 0x00ee1220
LAB_00ee11b2:
JMP 0x00ee11b4
LAB_00ee11b4:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00ee11be
LAB_00ee11be:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00ee11ff
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00d4baa0
JMP 0x00ee11ff
LAB_00ee11ff:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x50
POP RBP
RET
|
/* Item* get_item_copy<Item_func_xpath_sum>(THD*, Item_func_xpath_sum*) */
Item * get_item_copy<Item_func_xpath_sum>(THD *param_1,Item_func_xpath_sum *param_2)
{
st_mem_root *psVar1;
Item_func_xpath_sum *this;
int8 local_40;
psVar1 = (st_mem_root *)get_thd_memroot(param_1);
this = (Item_func_xpath_sum *)Item::operator_new(0x188,psVar1);
local_40 = (Item *)0x0;
if (this != (Item_func_xpath_sum *)0x0) {
/* try { // try from 00ee11ad to 00ee11b1 has its CatchHandler @ 00ee11dc */
Item_func_xpath_sum::Item_func_xpath_sum(this,param_2);
local_40 = (Item *)this;
}
if (local_40 != (Item *)0x0) {
Item::register_in(local_40,param_1);
}
return (Item *)local_40;
}
| |
33,014 | YAML::detail::node& YAML::detail::node_data::get<char [15]>(char const (&) [15], std::shared_ptr<YAML::detail::memory_holder>) | aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/impl.h | inline node& node_data::get(const Key& key, shared_memory_holder pMemory) {
switch (m_type) {
case NodeType::Map:
break;
case NodeType::Undefined:
case NodeType::Null:
case NodeType::Sequence:
if (node* pNode = get_idx<Key>::get(m_sequence, key, pMemory)) {
m_type = NodeType::Sequence;
return *pNode;
}
convert_to_map(pMemory);
break;
case NodeType::Scalar:
throw BadSubscript(m_mark, key);
}
auto it = std::find_if(m_map.begin(), m_map.end(), [&](const kv_pair m) {
return m.first->equals(key, pMemory);
});
if (it != m_map.end()) {
return *it->second;
}
node& k = convert_to_node(key, pMemory);
node& v = pMemory->create_node();
insert_map_pair(k, v);
return v;
} | O0 | c | YAML::detail::node& YAML::detail::node_data::get<char [15]>(char const (&) [15], std::shared_ptr<YAML::detail::memory_holder>):
subq $0xe8, %rsp
movq %rdx, 0x38(%rsp)
movq %rdi, 0xd8(%rsp)
movq %rsi, 0xd0(%rsp)
movq %rdx, 0xc8(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x10(%rax), %eax
movq %rax, 0x48(%rsp)
subq $0x4, %rax
ja 0x119ad5
movq 0x48(%rsp), %rax
leaq 0x2c6a0d(%rip), %rcx # 0x3e03cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x119ad5
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x20(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xda5a0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0xea910
movq %rax, 0x30(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xda6e0
movq 0x30(%rsp), %rax
movq %rax, 0xc0(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0x119a5c
movq 0x40(%rsp), %rax
movl $0x3, 0x10(%rax)
movq 0xc0(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0x119c3f
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0x1290f0
jmp 0x119ad5
movl $0x40, %edi
callq 0x8e630
movq 0x40(%rsp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
addq $0x4, %rsi
movq 0xd0(%rsp), %rdx
callq 0xea930
jmp 0x119a9a
movq 0x18(%rsp), %rdi
leaq 0x3e12e2(%rip), %rsi # 0x4fad88
leaq 0xc513(%rip), %rdx # 0x125fc0
callq 0x90860
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
callq 0x93710
jmp 0x119c4f
movq 0x40(%rsp), %rdi
addq $0x80, %rdi
callq 0xfd610
movq 0x40(%rsp), %rdi
movq %rax, 0x90(%rsp)
addq $0x80, %rdi
callq 0xfd640
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x88(%rsp)
movq 0xd0(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
callq 0x119c60
movq 0x40(%rsp), %rdi
movq %rax, 0x98(%rsp)
addq $0x80, %rdi
callq 0xfd640
movq %rax, 0x70(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xe7170
xorb $-0x1, %al
testb $0x1, %al
jne 0x119b7e
jmp 0x119b9c
leaq 0x98(%rsp), %rdi
callq 0xe74c0
movq 0x8(%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0x119c3f
movq 0x38(%rsp), %rsi
movq 0xd0(%rsp), %rax
movq %rax, (%rsp)
leaq 0x58(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xda5a0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x119ce0
movq %rax, 0x10(%rsp)
jmp 0x119bd1
leaq 0x58(%rsp), %rdi
callq 0xda6e0
movq 0x10(%rsp), %rax
movq 0x38(%rsp), %rdi
movq %rax, 0x68(%rsp)
callq 0xe36f0
movq %rax, %rdi
callq 0xe3700
movq 0x40(%rsp), %rdi
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x129160
movq 0x50(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0x119c3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0xda6e0
jmp 0x119c4f
movq 0xe0(%rsp), %rax
addq $0xe8, %rsp
retq
movq 0xa8(%rsp), %rdi
callq 0x90db0
nopl (%rax)
| _ZN4YAML6detail9node_data3getIA18_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE:
sub rsp, 0E8h
mov [rsp+0E8h+var_B0], rdx
mov [rsp+0E8h+var_10], rdi
mov [rsp+0E8h+var_18], rsi
mov [rsp+0E8h+var_20], rdx
mov rax, [rsp+0E8h+var_10]
mov [rsp+0E8h+var_A8], rax
mov eax, [rax+10h]
mov [rsp+0E8h+var_A0], rax
sub rax, 4; switch 5 cases
ja def_1199C6; jumptable 00000000001199C6 default case
mov rax, [rsp+0E8h+var_A0]
lea rcx, jpt_1199C6
movsxd rax, ds:(jpt_1199C6 - 3E03CCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1199C8:
jmp def_1199C6; jumptable 00000000001199C6 case 4
loc_1199CD:
mov rsi, [rsp+0E8h+var_B0]; jumptable 00000000001199C6 cases 0,1,3
mov rax, [rsp+0E8h+var_A8]
add rax, 60h ; '`'
mov [rsp+0E8h+var_C8], rax
mov rax, [rsp+0E8h+var_18]
mov [rsp+0E8h+var_C0], rax
lea rdi, [rsp+0E8h+var_38]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&)
mov rdi, [rsp+0E8h+var_C8]
mov rsi, [rsp+0E8h+var_C0]
lea rdx, [rsp+0E8h+var_38]
call _ZN4YAML6detail7get_idxIA18_cvE3getERKSt6vectorIPNS0_4nodeESaIS6_EERA18_KcSt10shared_ptrINS0_13memory_holderEE; YAML::detail::get_idx<char [18],void>::get(std::vector<YAML::detail::node *> const&,char const(&)[18],std::shared_ptr<YAML::detail::memory_holder>)
mov [rsp+0E8h+var_B8], rax
lea rdi, [rsp+0E8h+var_38]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
mov rax, [rsp+0E8h+var_B8]
mov [rsp+0E8h+var_28], rax
cmp [rsp+0E8h+var_28], 0
jz short loc_119A5C
mov rax, [rsp+0E8h+var_A8]
mov dword ptr [rax+10h], 3
mov rax, [rsp+0E8h+var_28]
mov [rsp+0E8h+var_8], rax
jmp loc_119C3F
loc_119A5C:
mov rsi, [rsp+0E8h+var_B0]
mov rdi, [rsp+0E8h+var_A8]
call _ZN4YAML6detail9node_data14convert_to_mapERKSt10shared_ptrINS0_13memory_holderEE; YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)
jmp short def_1199C6; jumptable 00000000001199C6 default case
loc_119A6D:
mov edi, 40h ; '@'; jumptable 00000000001199C6 case 2
call ___cxa_allocate_exception
mov rsi, [rsp+0E8h+var_A8]
mov rdi, rax
mov rax, rdi
mov [rsp+0E8h+var_D0], rax
add rsi, 4
mov rdx, [rsp+0E8h+var_18]
call _ZN4YAML12BadSubscriptC2IA18_cEERKNS_4MarkERKT_; YAML::BadSubscript::BadSubscript<char [18]>(YAML::Mark const&,char [18] const&)
jmp short $+2
loc_119A9A:
mov rdi, [rsp+0E8h+var_D0]; void *
lea rsi, _ZTIN4YAML12BadSubscriptE; lptinfo
lea rdx, _ZN4YAML12BadSubscriptD2Ev; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+0E8h+var_D0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0E8h+var_40], rcx
mov [rsp+0E8h+var_44], eax
call ___cxa_free_exception
jmp loc_119C4F
def_1199C6:
mov rdi, [rsp+0E8h+var_A8]; jumptable 00000000001199C6 default case
add rdi, 80h
call _ZNSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE5beginEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin(void)
mov rdi, [rsp+0E8h+var_A8]
mov [rsp+0E8h+var_58], rax
add rdi, 80h
call _ZNSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE3endEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(void)
mov rcx, rax
mov rax, [rsp+0E8h+var_B0]
mov [rsp+0E8h+var_60], rcx
mov rcx, [rsp+0E8h+var_18]
mov [rsp+0E8h+var_70], rcx
mov [rsp+0E8h+var_68], rax
mov rdi, [rsp+0E8h+var_58]
mov rsi, [rsp+0E8h+var_60]
mov rdx, [rsp+0E8h+var_70]
mov rcx, [rsp+0E8h+var_68]
call _ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairIPN4YAML6detail4nodeES6_ESt6vectorIS7_SaIS7_EEEEZNS4_9node_data3getIA18_cEERS5_RKT_St10shared_ptrINS4_13memory_holderEEEUlS7_E_ESH_SH_SH_T0_; std::find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,YAML::detail::node_data::get<char [18]>(char [18] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>(char [18],char [18],YAML::detail::node_data::get<char [18]>(char [18] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1})
mov rdi, [rsp+0E8h+var_A8]
mov [rsp+0E8h+var_50], rax
add rdi, 80h
call _ZNSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE3endEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(void)
mov [rsp+0E8h+var_78], rax
lea rdi, [rsp+0E8h+var_50]
lea rsi, [rsp+0E8h+var_78]
call _ZN9__gnu_cxxeqIPSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_119B7E
jmp short loc_119B9C
loc_119B7E:
lea rdi, [rsp+0E8h+var_50]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->(void)
mov rax, [rax+8]
mov [rsp+0E8h+var_8], rax
jmp loc_119C3F
loc_119B9C:
mov rsi, [rsp+0E8h+var_B0]
mov rax, [rsp+0E8h+var_18]
mov [rsp+0E8h+var_E8], rax
lea rdi, [rsp+0E8h+var_90]
mov [rsp+0E8h+var_E0], rdi
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&)
mov rdi, [rsp+0E8h+var_E8]
mov rsi, [rsp+0E8h+var_E0]
call _ZN4YAML6detail9node_data15convert_to_nodeIA18_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE; YAML::detail::node_data::convert_to_node<char [18]>(char [18] const&,std::shared_ptr<YAML::detail::memory_holder>)
mov [rsp+0E8h+var_D8], rax
jmp short $+2
loc_119BD1:
lea rdi, [rsp+0E8h+var_90]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
mov rax, [rsp+0E8h+var_D8]
mov rdi, [rsp+0E8h+var_B0]
mov [rsp+0E8h+var_80], rax
call _ZNKSt19__shared_ptr_accessIN4YAML6detail13memory_holderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<YAML::detail::memory_holder,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax; this
call _ZN4YAML6detail13memory_holder11create_nodeEv; YAML::detail::memory_holder::create_node(void)
mov rdi, [rsp+0E8h+var_A8]; this
mov [rsp+0E8h+var_98], rax
mov rsi, [rsp+0E8h+var_80]; YAML::detail::node *
mov rdx, [rsp+0E8h+var_98]; YAML::detail::node *
call _ZN4YAML6detail9node_data15insert_map_pairERNS0_4nodeES3_; YAML::detail::node_data::insert_map_pair(YAML::detail::node &,YAML::detail::node &)
mov rax, [rsp+0E8h+var_98]
mov [rsp+0E8h+var_8], rax
jmp short loc_119C3F
mov rcx, rax
mov eax, edx
mov [rsp+0E8h+var_40], rcx
mov [rsp+0E8h+var_44], eax
lea rdi, [rsp+0E8h+var_90]
call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr()
jmp short loc_119C4F
loc_119C3F:
mov rax, [rsp+0E8h+var_8]
add rsp, 0E8h
retn
loc_119C4F:
mov rdi, [rsp+0E8h+var_40]
call __Unwind_Resume
| YAML::detail::node * YAML::detail::node_data::get<char [18]>(
YAML::detail::node_data *a1,
long long a2,
long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
YAML::detail::memory_holder *v7; // rax
int v9; // [rsp+0h] [rbp-E8h]
YAML::detail::node *v10; // [rsp+10h] [rbp-D8h]
_QWORD *exception; // [rsp+18h] [rbp-D0h]
long long v12; // [rsp+30h] [rbp-B8h]
YAML::detail::node *node; // [rsp+50h] [rbp-98h]
_BYTE v15[16]; // [rsp+58h] [rbp-90h] BYREF
YAML::detail::node *v16; // [rsp+68h] [rbp-80h]
_QWORD v17[3]; // [rsp+70h] [rbp-78h] BYREF
long long v18; // [rsp+88h] [rbp-60h]
long long v19; // [rsp+90h] [rbp-58h]
long long v20; // [rsp+98h] [rbp-50h] BYREF
_BYTE v21[16]; // [rsp+B0h] [rbp-38h] BYREF
long long v22; // [rsp+C0h] [rbp-28h]
long long v23; // [rsp+C8h] [rbp-20h]
long long v24; // [rsp+D0h] [rbp-18h]
YAML::detail::node_data *v25; // [rsp+D8h] [rbp-10h]
v25 = a1;
v24 = a2;
v23 = a3;
switch ( *((_DWORD *)a1 + 4) )
{
case 0:
case 1:
case 3:
std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v21, a3);
v12 = YAML::detail::get_idx<char [18],void>::get();
std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v21);
v22 = v12;
if ( v12 )
{
*((_DWORD *)a1 + 4) = 3;
return (YAML::detail::node *)v22;
}
else
{
YAML::detail::node_data::convert_to_map(a1, a3);
LABEL_6:
v19 = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin((long long)a1 + 128);
v18 = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end((long long)a1 + 128);
v17[1] = v24;
v17[2] = a3;
v20 = std::find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,YAML::detail::node& YAML::detail::node_data::get<char [18]>(char [18] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>(
v19,
v18,
v24,
a3);
v17[0] = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end((long long)a1 + 128);
if ( __gnu_cxx::operator==<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>(
(long long)&v20,
(long long)v17) )
{
v9 = v24;
std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v15, a3);
v10 = (YAML::detail::node *)YAML::detail::node_data::convert_to_node<char [18]>(
v9,
(unsigned int)v15,
v3,
v4,
v5,
v6,
v9,
(unsigned int)v15);
std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v15);
v16 = v10;
v7 = (YAML::detail::memory_holder *)std::__shared_ptr_access<YAML::detail::memory_holder,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a3);
node = (YAML::detail::node *)YAML::detail::memory_holder::create_node(v7);
YAML::detail::node_data::insert_map_pair(a1, v16, node);
return node;
}
else
{
return *(YAML::detail::node **)(__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->((long long)&v20)
+ 8);
}
}
case 2:
exception = __cxa_allocate_exception(0x40uLL);
YAML::BadSubscript::BadSubscript<char [18]>(exception, (long long)a1 + 4, v24);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::BadSubscript, YAML::BadSubscript::~BadSubscript);
default:
goto LABEL_6;
}
}
| |||
33,015 | YAML::detail::node& YAML::detail::node_data::get<char [15]>(char const (&) [15], std::shared_ptr<YAML::detail::memory_holder>) | aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/impl.h | inline node& node_data::get(const Key& key, shared_memory_holder pMemory) {
switch (m_type) {
case NodeType::Map:
break;
case NodeType::Undefined:
case NodeType::Null:
case NodeType::Sequence:
if (node* pNode = get_idx<Key>::get(m_sequence, key, pMemory)) {
m_type = NodeType::Sequence;
return *pNode;
}
convert_to_map(pMemory);
break;
case NodeType::Scalar:
throw BadSubscript(m_mark, key);
}
auto it = std::find_if(m_map.begin(), m_map.end(), [&](const kv_pair m) {
return m.first->equals(key, pMemory);
});
if (it != m_map.end()) {
return *it->second;
}
node& k = convert_to_node(key, pMemory);
node& v = pMemory->create_node();
insert_map_pair(k, v);
return v;
} | O3 | c | YAML::detail::node& YAML::detail::node_data::get<char [15]>(char const (&) [15], std::shared_ptr<YAML::detail::memory_holder>):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl 0x10(%rdi), %eax
cmpl $0x2, %eax
jb 0x5c25d
cmpl $0x3, %eax
je 0x5c25d
cmpl $0x2, %eax
jne 0x5c28b
movl $0x40, %edi
callq 0x2c800
movq %rax, %r14
addq $0x4, %rbx
movq %rax, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x4beda
leaq 0x1ad58a(%rip), %rsi # 0x2097d8
leaq 0x44d7(%rip), %rdx # 0x6072c
movq %r14, %rdi
callq 0x2e0f0
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x5c280
movq 0x1b3cbb(%rip), %rax # 0x20ff28
cmpb $0x0, (%rax)
je 0x5c277
incl 0x8(%rdi)
jmp 0x5c27b
lock
incl 0x8(%rdi)
callq 0x466d6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6159c
movq 0x80(%rbx), %rdi
movq 0x88(%rbx), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x5c39f
cmpq 0x88(%rbx), %rax
je 0x5c2b6
movq 0x8(%rax), %r14
jmp 0x5c35a
movq (%r14), %r13
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x5c2d9
movq 0x1b3c5f(%rip), %rax # 0x20ff28
cmpb $0x0, (%rax)
je 0x5c2d4
incl 0x8(%r15)
jmp 0x5c2d9
lock
incl 0x8(%r15)
leaq 0x48(%rsp), %rsi
movq %r12, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x51ee6
leaq 0x8(%rsp), %rdi
callq 0x4a4ba
movq 0x30(%rsp), %rsi
movq %r13, %rdi
callq 0x60894
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %r12
testq %rdi, %rdi
je 0x5c316
callq 0x466d6
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c331
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2d2d0
testq %r15, %r15
je 0x5c33e
movq %r15, %rdi
callq 0x466d6
movq (%r14), %rax
movq (%rax), %rdi
callq 0x608ee
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x615e4
movq %r14, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x2cc80
jmp 0x5c397
movq %rax, %rbx
jmp 0x5c38a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x46052
testq %r15, %r15
je 0x5c397
movq %r15, %rdi
callq 0x466d6
movq %rbx, %rdi
callq 0x2e220
| _ZN4YAML6detail9node_data3getIA6_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 50h
mov r14, rdx
mov r12, rsi
mov rbx, rdi
mov eax, [rdi+10h]
cmp eax, 2
jb short loc_5C25D
cmp eax, 3
jz short loc_5C25D
cmp eax, 2
jnz short loc_5C28B
mov edi, 40h ; '@'; thrown_size
call ___cxa_allocate_exception
mov r14, rax
add rbx, 4
mov rdi, rax
mov rsi, rbx
mov rdx, r12
call _ZN4YAML12BadSubscriptC2IA6_cEERKNS_4MarkERKT_; YAML::BadSubscript::BadSubscript<char [6]>(YAML::Mark const&,char [6] const&)
lea rsi, _ZTIN4YAML12BadSubscriptE; lptinfo
lea rdx, _ZN4YAML9ExceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_5C25D:
mov rdi, [r14+8]
test rdi, rdi
jz short loc_5C280
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_5C277
inc dword ptr [rdi+8]
jmp short loc_5C27B
loc_5C277:
lock inc dword ptr [rdi+8]
loc_5C27B:
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5C280:
mov rdi, rbx; this
mov rsi, r14
call _ZN4YAML6detail9node_data14convert_to_mapERKSt10shared_ptrINS0_13memory_holderEE; YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)
loc_5C28B:
mov rdi, [rbx+80h]
mov rsi, [rbx+88h]
mov rdx, r12
mov rcx, r14
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairIPN4YAML6detail4nodeES6_ESt6vectorIS7_SaIS7_EEEENS0_5__ops10_Iter_predIZNS4_9node_data3getIA6_cEERS5_RKT_St10shared_ptrINS4_13memory_holderEEEUlS7_E_EEESJ_SJ_SJ_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char [6]>(char [6] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>>(char [6],char [6],__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char [6]>(char [6] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>,std::random_access_iterator_tag)
cmp rax, [rbx+88h]
jz short loc_5C2B6
mov r14, [rax+8]
jmp loc_5C35A
loc_5C2B6:
mov r13, [r14]
mov r15, [r14+8]
test r15, r15
jz short loc_5C2D9
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_5C2D4
inc dword ptr [r15+8]
jmp short loc_5C2D9
loc_5C2D4:
lock inc dword ptr [r15+8]
loc_5C2D9:
lea rsi, [rsp+78h+var_30]
mov [rsi], r12
lea rdi, [rsp+78h+var_70]; this
call _ZN4YAML4NodeC2IPKcEERKT_; YAML::Node::Node<char const*>(char const* const&)
lea rdi, [rsp+78h+var_70]; this
call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void)
mov rsi, [rsp+78h+var_48]
mov rdi, r13
call _ZN4YAML6detail13memory_holder5mergeERS1_; YAML::detail::memory_holder::merge(YAML::detail::memory_holder&)
mov rdi, [rsp+78h+var_40]
mov r12, [rsp+78h+var_38]
test rdi, rdi
jz short loc_5C316
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5C316:
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5C331
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C331:
test r15, r15
jz short loc_5C33E
mov rdi, r15
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5C33E:
mov rax, [r14]
mov rdi, [rax]; this
call _ZN4YAML6detail6memory11create_nodeEv; YAML::detail::memory::create_node(void)
mov r14, rax
mov rdi, rbx; this
mov rsi, r12; YAML::detail::node *
mov rdx, rax; YAML::detail::node *
call _ZN4YAML6detail9node_data15insert_map_pairERNS0_4nodeES3_; YAML::detail::node_data::insert_map_pair(YAML::detail::node &,YAML::detail::node &)
loc_5C35A:
mov rax, r14
add rsp, 50h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_5C397
mov rbx, rax
jmp short loc_5C38A
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN4YAML4NodeD2Ev; YAML::Node::~Node()
loc_5C38A:
test r15, r15
jz short loc_5C397
mov rdi, r15
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5C397:
mov rdi, rbx
call __Unwind_Resume
| YAML::detail::node * YAML::detail::node_data::get<char [6]>(
YAML::detail::node_data *this,
long long a2,
long long a3)
{
unsigned int v5; // eax
_QWORD *exception; // r14
volatile signed __int32 *v7; // rdi
long long v8; // rax
YAML::detail::node *node; // r14
YAML::detail::memory **v10; // r13
volatile signed __int32 *v11; // r15
YAML::detail::node *v12; // r12
YAML::detail::memory **v14; // [rsp+8h] [rbp-70h] BYREF
_QWORD *v15; // [rsp+10h] [rbp-68h]
_QWORD v16[3]; // [rsp+20h] [rbp-58h] BYREF
volatile signed __int32 *v17; // [rsp+38h] [rbp-40h]
YAML::detail::node *v18; // [rsp+40h] [rbp-38h]
long long v19[6]; // [rsp+48h] [rbp-30h] BYREF
v5 = *((_DWORD *)this + 4);
if ( v5 < 2 || v5 == 3 )
{
v7 = *(volatile signed __int32 **)(a3 + 8);
if ( v7 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v7 + 2);
else
_InterlockedIncrement(v7 + 2);
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7);
}
YAML::detail::node_data::convert_to_map(this);
}
else if ( v5 == 2 )
{
exception = __cxa_allocate_exception(0x40uLL);
YAML::BadSubscript::BadSubscript<char [6]>(exception, (_DWORD)this + 4, a2);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::BadSubscript, YAML::Exception::~Exception);
}
v8 = std::__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node& YAML::detail::node_data::get<char [6]>(char [6] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>>(
*((_QWORD *)this + 16),
*((_QWORD *)this + 17),
a2,
a3);
if ( v8 != *((_QWORD *)this + 17) )
return *(YAML::detail::node **)(v8 + 8);
v10 = *(YAML::detail::memory ***)a3;
v11 = *(volatile signed __int32 **)(a3 + 8);
if ( v11 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v11 + 2);
else
_InterlockedIncrement(v11 + 2);
}
v19[0] = a2;
YAML::Node::Node<char const*>((YAML::Node *)&v14, v19);
YAML::Node::EnsureNodeExists(&v14);
YAML::detail::memory_holder::merge(v10, v16[2]);
v12 = v18;
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 != v16 )
operator delete(v15, v16[0] + 1LL);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
node = (YAML::detail::node *)YAML::detail::memory::create_node(**(YAML::detail::memory ***)a3);
YAML::detail::node_data::insert_map_pair(this, v12, node);
return node;
}
| get<char[6]>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x10]
CMP EAX,0x2
JC 0x0015c25d
CMP EAX,0x3
JZ 0x0015c25d
CMP EAX,0x2
JNZ 0x0015c28b
MOV EDI,0x40
CALL 0x0012c800
MOV R14,RAX
ADD RBX,0x4
LAB_0015c239:
MOV RDI,RAX
MOV RSI,RBX
MOV RDX,R12
CALL 0x0014beda
LAB_0015c247:
LEA RSI,[0x3097d8]
LEA RDX,[0x16072c]
MOV RDI,R14
CALL 0x0012e0f0
LAB_0015c25d:
MOV RDI,qword ptr [R14 + 0x8]
TEST RDI,RDI
JZ 0x0015c280
MOV RAX,qword ptr [0x0030ff28]
CMP byte ptr [RAX],0x0
JZ 0x0015c277
INC dword ptr [RDI + 0x8]
JMP 0x0015c27b
LAB_0015c277:
INC.LOCK dword ptr [RDI + 0x8]
LAB_0015c27b:
CALL 0x001466d6
LAB_0015c280:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0016159c
LAB_0015c28b:
MOV RDI,qword ptr [RBX + 0x80]
MOV RSI,qword ptr [RBX + 0x88]
MOV RDX,R12
MOV RCX,R14
CALL 0x0015c39f
CMP RAX,qword ptr [RBX + 0x88]
JZ 0x0015c2b6
MOV R14,qword ptr [RAX + 0x8]
JMP 0x0015c35a
LAB_0015c2b6:
MOV R13,qword ptr [R14]
MOV R15,qword ptr [R14 + 0x8]
TEST R15,R15
JZ 0x0015c2d9
MOV RAX,qword ptr [0x0030ff28]
CMP byte ptr [RAX],0x0
JZ 0x0015c2d4
INC dword ptr [R15 + 0x8]
JMP 0x0015c2d9
LAB_0015c2d4:
INC.LOCK dword ptr [R15 + 0x8]
LAB_0015c2d9:
LEA RSI,[RSP + 0x48]
MOV qword ptr [RSI],R12
LAB_0015c2e1:
LEA RDI,[RSP + 0x8]
CALL 0x00151ee6
LAB_0015c2eb:
LEA RDI,[RSP + 0x8]
CALL 0x0014a4ba
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,R13
CALL 0x00160894
LAB_0015c302:
MOV RDI,qword ptr [RSP + 0x38]
MOV R12,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0015c316
CALL 0x001466d6
LAB_0015c316:
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015c331
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0012d2d0
LAB_0015c331:
TEST R15,R15
JZ 0x0015c33e
MOV RDI,R15
CALL 0x001466d6
LAB_0015c33e:
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [RAX]
CALL 0x001608ee
MOV R14,RAX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,RAX
CALL 0x001615e4
LAB_0015c35a:
MOV RAX,R14
ADD RSP,0x50
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* YAML::detail::node& YAML::detail::node_data::get<char [6]>(char const (&) [6],
std::shared_ptr<YAML::detail::memory_holder>) */
node * __thiscall
YAML::detail::node_data::get<char[6]>(node_data *this,char *param_1,shared_ptr *param_3)
{
uint uVar1;
memory_holder *this_00;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2;
BadSubscript *this_01;
long lVar3;
node *pnVar4;
Node local_70 [8];
long *local_68;
long local_58 [2];
memory_holder *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
node *local_38;
char *local_30;
uVar1 = *(uint *)(this + 0x10);
if ((uVar1 < 2) || (uVar1 == 3)) {
p_Var2 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_3 + 8);
if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0030ff28 == '\0') {
LOCK();
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
UNLOCK();
}
else {
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2);
}
convert_to_map(this,param_3);
}
else if (uVar1 == 2) {
this_01 = (BadSubscript *)__cxa_allocate_exception(0x40);
/* try { // try from 0015c239 to 0015c246 has its CatchHandler @ 0015c36b */
BadSubscript::BadSubscript<char[6]>(this_01,(Mark *)(this + 4),param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(this_01,&BadSubscript::typeinfo,BadInsert::~BadInsert);
}
lVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node*,YAML::detail::node*>*,std::vector<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char[6]>(char_const(&)[6],std::shared_ptr<YAML::detail::memory_holder>)::_lambda(std::pair<YAML::detail::node*,YAML::detail::node*>)_1_>>
(*(int8 *)(this + 0x80),*(int8 *)(this + 0x88),param_1,param_3);
if (lVar3 == *(long *)(this + 0x88)) {
this_00 = *(memory_holder **)param_3;
p_Var2 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_3 + 8);
if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0030ff28 == '\0') {
LOCK();
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
UNLOCK();
}
else {
*(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1;
}
}
/* try { // try from 0015c2e1 to 0015c2ea has its CatchHandler @ 0015c378 */
local_30 = param_1;
Node::Node<char_const*>(local_70,&local_30);
/* try { // try from 0015c2eb to 0015c301 has its CatchHandler @ 0015c37d */
Node::EnsureNodeExists(local_70);
memory_holder::merge(this_00,local_48);
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2);
}
pnVar4 = (node *)memory::create_node((memory *)**(int8 **)param_3);
insert_map_pair(this,local_38,pnVar4);
}
else {
pnVar4 = *(node **)(lVar3 + 8);
}
return pnVar4;
}
| |
33,016 | my_stat | eloqsql/mysys/my_lib.c | MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
{
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path,
stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT),
my_flags)))
goto error;
#ifndef _WIN32
if (!stat((char *) path, (struct stat *) stat_area))
{
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(stat_area);
}
#else
if (!my_win_stat(path, stat_area))
DBUG_RETURN(stat_area);
#endif
DBUG_PRINT("error",("Got errno: %d from stat", errno));
my_errno= errno;
if (m_used) /* Free if new area */
my_free(stat_area);
error:
if (my_flags & (MY_FAE+MY_WME))
{
my_error(EE_STAT, MYF(ME_BELL), path, my_errno);
DBUG_RETURN((MY_STAT *) NULL);
}
DBUG_RETURN((MY_STAT *) NULL);
} | O3 | c | my_stat:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %r14
testq %rsi, %rsi
jne 0x27e74
leaq 0x33f76b(%rip), %rax # 0x3675c8
movl (%rax), %edi
movl $0x90, %esi
movq %r15, %rdx
callq 0x27f19
movq %rax, %r14
testq %rax, %rax
je 0x27ea0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24630
testl %eax, %eax
je 0x27ec9
callq 0x24050
movl (%rax), %r13d
callq 0x2974a
movl %r13d, (%rax)
testq %r12, %r12
jne 0x27ea0
movq %r14, %rdi
callq 0x28146
testb $0x18, %r15b
je 0x27ec6
callq 0x2974a
movl (%rax), %ecx
xorl %r14d, %r14d
movl $0x4, %esi
movl $0xd, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x26d87
jmp 0x27ec9
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_stat:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r14, rsi
test rsi, rsi
jnz short loc_27E74
lea rax, key_memory_MY_STAT
mov edi, [rax]
mov esi, 90h
mov rdx, r15
call my_malloc
mov r14, rax
test rax, rax
jz short loc_27EA0
loc_27E74:
mov rdi, rbx
mov rsi, r14
call _stat64
test eax, eax
jz short loc_27EC9
call ___errno_location
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r12, r12
jnz short loc_27EA0
mov rdi, r14
call my_free
loc_27EA0:
test r15b, 18h
jz short loc_27EC6
call _my_thread_var
mov ecx, [rax]
xor r14d, r14d
mov esi, 4
mov edi, 0Dh
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_27EC9
loc_27EC6:
xor r14d, r14d
loc_27EC9:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_stat(long long a1, long long a2, long long a3)
{
char v3; // r15
long long v5; // r14
long long v6; // rdi
long long v7; // rdx
int v8; // r13d
unsigned int *v9; // rax
v3 = a3;
v5 = a2;
if ( a2 || (v6 = key_memory_MY_STAT, (v5 = my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0) )
{
v6 = a1;
if ( !(unsigned int)stat64(a1, v5) )
return v5;
v8 = *(_DWORD *)__errno_location(a1, v5, v7);
*(_DWORD *)my_thread_var(a1) = v8;
if ( !a2 )
{
v6 = v5;
my_free(v5);
}
}
if ( (v3 & 0x18) == 0 )
return 0LL;
v9 = (unsigned int *)my_thread_var(v6);
v5 = 0LL;
my_error(0xDu, 4LL, a1, *v9);
return v5;
}
| my_stat:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14,RSI
TEST RSI,RSI
JNZ 0x00127e74
LEA RAX,[0x4675c8]
MOV EDI,dword ptr [RAX]
MOV ESI,0x90
MOV RDX,R15
CALL 0x00127f19
MOV R14,RAX
TEST RAX,RAX
JZ 0x00127ea0
LAB_00127e74:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00124630
TEST EAX,EAX
JZ 0x00127ec9
CALL 0x00124050
MOV R13D,dword ptr [RAX]
CALL 0x0012974a
MOV dword ptr [RAX],R13D
TEST R12,R12
JNZ 0x00127ea0
MOV RDI,R14
CALL 0x00128146
LAB_00127ea0:
TEST R15B,0x18
JZ 0x00127ec6
CALL 0x0012974a
MOV ECX,dword ptr [RAX]
XOR R14D,R14D
MOV ESI,0x4
MOV EDI,0xd
MOV RDX,RBX
XOR EAX,EAX
CALL 0x00126d87
JMP 0x00127ec9
LAB_00127ec6:
XOR R14D,R14D
LAB_00127ec9:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3)
{
int iVar1;
stat64 *__buf;
int *piVar2;
int4 *puVar3;
__buf = param_2;
if ((param_2 != (stat64 *)0x0) ||
(__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) {
iVar1 = stat64(param_1,__buf);
if (iVar1 == 0) {
return __buf;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if (param_2 == (stat64 *)0x0) {
my_free(__buf);
}
}
if ((param_3 & 0x18) != 0) {
puVar3 = (int4 *)_my_thread_var();
my_error(0xd,4,param_1,*puVar3);
}
return (stat64 *)0x0;
}
| |
33,017 | void google::protobuf::SplitStringToIteratorUsing<std::back_insert_iterator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>(google::protobuf::stringpiece_internal::StringPiece, char const*, std::back_insert_iterator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc | static inline void SplitStringToIteratorUsing(StringPiece full,
const char *delim, ITR &result) {
// Optimize the common case where delim is a single character.
if (delim[0] != '\0' && delim[1] == '\0') {
char c = delim[0];
const char* p = full.data();
const char* end = p + full.size();
while (p != end) {
if (*p == c) {
++p;
} else {
const char* start = p;
while (++p != end && *p != c);
*result++ = std::string(start, p - start);
}
}
return;
}
std::string::size_type begin_index, end_index;
begin_index = full.find_first_not_of(delim);
while (begin_index != std::string::npos) {
end_index = full.find_first_of(delim, begin_index);
if (end_index == std::string::npos) {
*result++ = std::string(full.substr(begin_index));
return;
}
*result++ =
std::string(full.substr(begin_index, (end_index - begin_index)));
begin_index = full.find_first_not_of(delim, end_index);
}
} | O0 | cpp | void google::protobuf::SplitStringToIteratorUsing<std::back_insert_iterator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>(google::protobuf::stringpiece_internal::StringPiece, char const*, std::back_insert_iterator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&):
subq $0x188, %rsp # imm = 0x188
movq %rdi, 0x178(%rsp)
movq %rsi, 0x180(%rsp)
movq %rdx, 0x170(%rsp)
movq %rcx, 0x168(%rsp)
movq 0x170(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x26ccc
movq 0x170(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x26ccc
movq 0x170(%rsp), %rax
movb (%rax), %al
movb %al, 0x167(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x24070
movq %rax, 0x158(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x24080
movq %rax, %rcx
movq 0x50(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x150(%rsp)
movq 0x158(%rsp), %rax
cmpq 0x150(%rsp), %rax
je 0x26cc7
movq 0x158(%rsp), %rax
movsbl (%rax), %eax
movsbl 0x167(%rsp), %ecx
cmpl %ecx, %eax
jne 0x26b69
movq 0x158(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x158(%rsp)
jmp 0x26cc2
movq 0x158(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x158(%rsp), %rcx
addq $0x1, %rcx
movq %rcx, 0x158(%rsp)
xorl %eax, %eax
cmpq 0x150(%rsp), %rcx
movb %al, 0x4f(%rsp)
je 0x26bb9
movq 0x158(%rsp), %rax
movsbl (%rax), %eax
movsbl 0x167(%rsp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, 0x4f(%rsp)
movb 0x4f(%rsp), %al
testb $0x1, %al
jne 0x26bc3
jmp 0x26bc5
jmp 0x26b79
movq 0x148(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0x158(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x38(%rsp)
leaq 0x127(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x13760
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
leaq 0x128(%rsp), %rdi
callq 0x13500
jmp 0x26c12
movq 0x168(%rsp), %rdi
xorl %esi, %esi
callq 0x30dc0
movq %rax, 0x28(%rsp)
jmp 0x26c28
movq 0x28(%rsp), %rax
movq %rax, 0x108(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x30de0
movq %rax, 0x20(%rsp)
jmp 0x26c49
movq 0x20(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x30df0
jmp 0x26c5d
leaq 0x128(%rsp), %rdi
callq 0x13290
leaq 0x127(%rsp), %rdi
callq 0x134d0
jmp 0x26cc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x26cb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x13290
leaq 0x127(%rsp), %rdi
callq 0x134d0
jmp 0x26f26
jmp 0x26b23
jmp 0x26f1e
movq 0x170(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
callq 0x30720
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
leaq 0x178(%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
callq 0x1d44d0
movq %rax, 0x100(%rsp)
cmpq $-0x1, 0x100(%rsp)
je 0x26f1e
movq 0x170(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x30720
movq 0x100(%rsp), %rcx
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
leaq 0x178(%rsp), %rdi
callq 0x1d4300
movq %rax, 0xf8(%rsp)
cmpq $-0x1, 0xf8(%rsp)
jne 0x26e31
movq 0x100(%rsp), %rsi
leaq 0x1d2607(%rip), %rax # 0x1f9380
movq (%rax), %rdx
leaq 0x178(%rsp), %rdi
callq 0x1d4a80
movq %rax, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x30e20
movq 0x168(%rsp), %rdi
xorl %esi, %esi
callq 0x30dc0
movq %rax, 0x18(%rsp)
jmp 0x26dc4
movq 0x18(%rsp), %rax
movq %rax, 0xa0(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x30de0
movq %rax, 0x10(%rsp)
jmp 0x26de5
movq 0x10(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x30df0
jmp 0x26df9
leaq 0xb8(%rsp), %rdi
callq 0x13290
jmp 0x26f1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x13290
jmp 0x26f26
movq 0x100(%rsp), %rsi
movq 0xf8(%rsp), %rdx
subq %rsi, %rdx
leaq 0x178(%rsp), %rdi
callq 0x1d4a80
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x30e20
movq 0x168(%rsp), %rdi
xorl %esi, %esi
callq 0x30dc0
movq %rax, 0x8(%rsp)
jmp 0x26e83
movq 0x8(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x30de0
movq %rax, (%rsp)
jmp 0x26e9d
movq (%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x30df0
jmp 0x26eb0
leaq 0x80(%rsp), %rdi
callq 0x13290
movq 0x170(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0x30720
movq 0xf8(%rsp), %rcx
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0x178(%rsp), %rdi
callq 0x1d44d0
movq %rax, 0x100(%rsp)
jmp 0x26d0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x13290
jmp 0x26f26
addq $0x188, %rsp # imm = 0x188
retq
movq 0x118(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
| _ZN6google8protobufL26SplitStringToIteratorUsingISt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEEEEvNS0_20stringpiece_internal11StringPieceEPKcRT_:
sub rsp, 188h
mov [rsp+188h+var_10], rdi
mov [rsp+188h+var_8], rsi
mov [rsp+188h+var_18], rdx
mov [rsp+188h+var_20], rcx
mov rax, [rsp+188h+var_18]
movsx eax, byte ptr [rax]
cmp eax, 0
jz loc_26CCC
mov rax, [rsp+188h+var_18]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jnz loc_26CCC
mov rax, [rsp+188h+var_18]
mov al, [rax]
mov [rsp+188h+var_21], al
lea rdi, [rsp+188h+var_10]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4dataEv; google::protobuf::stringpiece_internal::StringPiece::data(void)
mov [rsp+188h+var_30], rax
mov rax, [rsp+188h+var_30]
mov [rsp+188h+var_138], rax
lea rdi, [rsp+188h+var_10]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void)
mov rcx, rax
mov rax, [rsp+188h+var_138]
add rax, rcx
mov [rsp+188h+var_38], rax
loc_26B23:
mov rax, [rsp+188h+var_30]
cmp rax, [rsp+188h+var_38]
jz loc_26CC7
mov rax, [rsp+188h+var_30]
movsx eax, byte ptr [rax]
movsx ecx, [rsp+188h+var_21]
cmp eax, ecx
jnz short loc_26B69
mov rax, [rsp+188h+var_30]
add rax, 1
mov [rsp+188h+var_30], rax
jmp loc_26CC2
loc_26B69:
mov rax, [rsp+188h+var_30]
mov [rsp+188h+var_40], rax
loc_26B79:
mov rcx, [rsp+188h+var_30]
add rcx, 1
mov [rsp+188h+var_30], rcx
xor eax, eax
cmp rcx, [rsp+188h+var_38]
mov [rsp+188h+var_139], al
jz short loc_26BB9
mov rax, [rsp+188h+var_30]
movsx eax, byte ptr [rax]
movsx ecx, [rsp+188h+var_21]
cmp eax, ecx
setnz al
mov [rsp+188h+var_139], al
loc_26BB9:
mov al, [rsp+188h+var_139]
test al, 1
jnz short loc_26BC3
jmp short loc_26BC5
loc_26BC3:
jmp short loc_26B79
loc_26BC5:
mov rcx, [rsp+188h+var_40]
mov [rsp+188h+var_158], rcx
mov rax, [rsp+188h+var_30]
sub rax, rcx
mov [rsp+188h+var_150], rax
lea rdi, [rsp+188h+var_61]
mov [rsp+188h+var_148], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+188h+var_158]
mov rdx, [rsp+188h+var_150]
mov rcx, [rsp+188h+var_148]
lea rdi, [rsp+188h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&)
jmp short $+2
loc_26C12:
mov rdi, [rsp+188h+var_20]
xor esi, esi
call _ZNSt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEppEi; std::back_insert_iterator<std::vector<std::string>>::operator++(int)
mov [rsp+188h+var_160], rax
jmp short $+2
loc_26C28:
mov rax, [rsp+188h+var_160]
mov [rsp+188h+var_80], rax
lea rdi, [rsp+188h+var_80]
call _ZNSt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEdeEv; std::back_insert_iterator<std::vector<std::string>>::operator*(void)
mov [rsp+188h+var_168], rax
jmp short $+2
loc_26C49:
mov rdi, [rsp+188h+var_168]
lea rsi, [rsp+188h+var_60]
call _ZNSt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEaSEOS6_; std::back_insert_iterator<std::vector<std::string>>::operator=(std::string&&)
jmp short $+2
loc_26C5D:
lea rdi, [rsp+188h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+188h+var_61]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_26CC2
mov rcx, rax
mov eax, edx
mov [rsp+arg_110], rcx
mov [rsp+arg_10C], eax
jmp short loc_26CB0
mov rcx, rax
mov eax, edx
mov [rsp+arg_110], rcx
mov [rsp+arg_10C], eax
lea rdi, [rsp+arg_120]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_26CB0:
lea rdi, [rsp+arg_11F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_26F26
loc_26CC2:
jmp loc_26B23
loc_26CC7:
jmp loc_26F1E
loc_26CCC:
mov rsi, [rsp+188h+var_18]; char *
lea rdi, [rsp+188h+var_A0]; this
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2EPKc; google::protobuf::stringpiece_internal::StringPiece::StringPiece(char const*)
mov rsi, [rsp+188h+var_A0]
mov rdx, [rsp+188h+var_98]
lea rdi, [rsp+188h+var_10]
xor eax, eax
mov ecx, eax
call _ZNK6google8protobuf20stringpiece_internal11StringPiece17find_first_not_ofES2_m; google::protobuf::stringpiece_internal::StringPiece::find_first_not_of(google::protobuf::stringpiece_internal::StringPiece,ulong)
mov [rsp+188h+var_88], rax
loc_26D0A:
cmp [rsp+188h+var_88], 0FFFFFFFFFFFFFFFFh
jz loc_26F1E
mov rsi, [rsp+188h+var_18]; char *
lea rdi, [rsp+188h+var_B0]; this
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2EPKc; google::protobuf::stringpiece_internal::StringPiece::StringPiece(char const*)
mov rcx, [rsp+188h+var_88]
mov rsi, [rsp+188h+var_B0]
mov rdx, [rsp+188h+var_A8]
lea rdi, [rsp+188h+var_10]
call _ZNK6google8protobuf20stringpiece_internal11StringPiece13find_first_ofES2_m; google::protobuf::stringpiece_internal::StringPiece::find_first_of(google::protobuf::stringpiece_internal::StringPiece,ulong)
mov [rsp+188h+var_90], rax
cmp [rsp+188h+var_90], 0FFFFFFFFFFFFFFFFh
jnz loc_26E31
mov rsi, [rsp+188h+var_88]; unsigned __int64
lea rax, _ZN6google8protobuf20stringpiece_internal11StringPiece4nposE; google::protobuf::stringpiece_internal::StringPiece::npos
mov rdx, [rax]; unsigned __int64
lea rdi, [rsp+188h+var_10]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece6substrEmm; google::protobuf::stringpiece_internal::StringPiece::substr(ulong,ulong)
mov [rsp+188h+var_E0], rax
mov [rsp+188h+var_D8], rdx
lea rdi, [rsp+188h+var_D0]
lea rsi, [rsp+188h+var_E0]
call _ZNK6google8protobuf20stringpiece_internal11StringPiececvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; google::protobuf::stringpiece_internal::StringPiece::operator std::string(void)
mov rdi, [rsp+188h+var_20]
xor esi, esi
call _ZNSt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEppEi; std::back_insert_iterator<std::vector<std::string>>::operator++(int)
mov [rsp+188h+var_170], rax
jmp short $+2
loc_26DC4:
mov rax, [rsp+188h+var_170]
mov [rsp+188h+var_E8], rax
lea rdi, [rsp+188h+var_E8]
call _ZNSt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEdeEv; std::back_insert_iterator<std::vector<std::string>>::operator*(void)
mov [rsp+188h+var_178], rax
jmp short $+2
loc_26DE5:
mov rdi, [rsp+188h+var_178]
lea rsi, [rsp+188h+var_D0]
call _ZNSt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEaSEOS6_; std::back_insert_iterator<std::vector<std::string>>::operator=(std::string&&)
jmp short $+2
loc_26DF9:
lea rdi, [rsp+188h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_26F1E
mov rcx, rax
mov eax, edx
mov [rsp+arg_110], rcx
mov [rsp+arg_10C], eax
lea rdi, [rsp+arg_B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_26F26
loc_26E31:
mov rsi, [rsp+188h+var_88]; unsigned __int64
mov rdx, [rsp+188h+var_90]
sub rdx, rsi; unsigned __int64
lea rdi, [rsp+188h+var_10]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece6substrEmm; google::protobuf::stringpiece_internal::StringPiece::substr(ulong,ulong)
mov [rsp+188h+var_118], rax
mov [rsp+188h+var_110], rdx
lea rdi, [rsp+188h+var_108]
lea rsi, [rsp+188h+var_118]
call _ZNK6google8protobuf20stringpiece_internal11StringPiececvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; google::protobuf::stringpiece_internal::StringPiece::operator std::string(void)
mov rdi, [rsp+188h+var_20]
xor esi, esi
call _ZNSt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEppEi; std::back_insert_iterator<std::vector<std::string>>::operator++(int)
mov [rsp+188h+var_180], rax
jmp short $+2
loc_26E83:
mov rax, [rsp+188h+var_180]
mov [rsp+188h+var_120], rax
lea rdi, [rsp+188h+var_120]
call _ZNSt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEdeEv; std::back_insert_iterator<std::vector<std::string>>::operator*(void)
mov [rsp+188h+var_188], rax
jmp short $+2
loc_26E9D:
mov rdi, [rsp+188h+var_188]
lea rsi, [rsp+188h+var_108]
call _ZNSt20back_insert_iteratorISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEaSEOS6_; std::back_insert_iterator<std::vector<std::string>>::operator=(std::string&&)
jmp short $+2
loc_26EB0:
lea rdi, [rsp+188h+var_108]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rsi, [rsp+188h+var_18]; char *
lea rdi, [rsp+188h+var_130]; this
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2EPKc; google::protobuf::stringpiece_internal::StringPiece::StringPiece(char const*)
mov rcx, [rsp+188h+var_90]
mov rsi, [rsp+188h+var_130]
mov rdx, [rsp+188h+var_128]
lea rdi, [rsp+188h+var_10]
call _ZNK6google8protobuf20stringpiece_internal11StringPiece17find_first_not_ofES2_m; google::protobuf::stringpiece_internal::StringPiece::find_first_not_of(google::protobuf::stringpiece_internal::StringPiece,ulong)
mov [rsp+188h+var_88], rax
jmp loc_26D0A
mov rcx, rax
mov eax, edx
mov [rsp+arg_110], rcx
mov [rsp+arg_10C], eax
lea rdi, [rsp+arg_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_26F26
loc_26F1E:
add rsp, 188h
retn
loc_26F26:
mov rdi, [rsp+arg_110]
call __Unwind_Resume
| unsigned long long google::protobuf::SplitStringToIteratorUsing<std::back_insert_iterator<std::vector<std::string>>>(
long long a1,
_BYTE *a2,
char *a3,
long long a4)
{
unsigned long long result; // rax
long long v5; // rdx
long long v6; // rdx
long long v7; // [rsp+0h] [rbp-188h]
long long v8; // [rsp+10h] [rbp-178h]
long long v9; // [rsp+20h] [rbp-168h]
char *v10; // [rsp+30h] [rbp-158h]
char *v11; // [rsp+38h] [rbp-150h]
bool v12; // [rsp+4Fh] [rbp-139h]
_QWORD v13[2]; // [rsp+58h] [rbp-130h] BYREF
long long v14; // [rsp+68h] [rbp-120h] BYREF
_QWORD v15[2]; // [rsp+70h] [rbp-118h] BYREF
_BYTE v16[32]; // [rsp+80h] [rbp-108h] BYREF
long long v17; // [rsp+A0h] [rbp-E8h] BYREF
_QWORD v18[2]; // [rsp+A8h] [rbp-E0h] BYREF
_BYTE v19[32]; // [rsp+B8h] [rbp-D0h] BYREF
_QWORD v20[2]; // [rsp+D8h] [rbp-B0h] BYREF
_QWORD v21[2]; // [rsp+E8h] [rbp-A0h] BYREF
long long first_of; // [rsp+F8h] [rbp-90h]
unsigned long long i; // [rsp+100h] [rbp-88h]
long long v24[3]; // [rsp+108h] [rbp-80h] BYREF
char v25; // [rsp+127h] [rbp-61h] BYREF
_BYTE v26[32]; // [rsp+128h] [rbp-60h] BYREF
char *v27; // [rsp+148h] [rbp-40h]
char *v28; // [rsp+150h] [rbp-38h]
char *v29; // [rsp+158h] [rbp-30h]
char v30; // [rsp+167h] [rbp-21h]
long long v31; // [rsp+168h] [rbp-20h]
char *v32; // [rsp+170h] [rbp-18h]
_QWORD v33[2]; // [rsp+178h] [rbp-10h] BYREF
v33[0] = a1;
v33[1] = a2;
v32 = a3;
v31 = a4;
if ( !*a3 || v32[1] )
{
google::protobuf::stringpiece_internal::StringPiece::StringPiece(
(google::protobuf::stringpiece_internal::StringPiece *)v21,
v32);
result = google::protobuf::stringpiece_internal::StringPiece::find_first_not_of(v33, v21[0], v21[1], 0LL);
for ( i = result; i != -1LL; i = result )
{
google::protobuf::stringpiece_internal::StringPiece::StringPiece(
(google::protobuf::stringpiece_internal::StringPiece *)v20,
v32);
first_of = google::protobuf::stringpiece_internal::StringPiece::find_first_of(v33, v20[0], v20[1], i);
if ( first_of == -1 )
{
v18[0] = google::protobuf::stringpiece_internal::StringPiece::substr(
(google::protobuf::stringpiece_internal::StringPiece *)v33,
i,
google::protobuf::stringpiece_internal::StringPiece::npos);
v18[1] = v5;
google::protobuf::stringpiece_internal::StringPiece::operator std::string(v19, v18);
v17 = std::back_insert_iterator<std::vector<std::string>>::operator++(v31, 0LL);
v8 = std::back_insert_iterator<std::vector<std::string>>::operator*(&v17);
std::back_insert_iterator<std::vector<std::string>>::operator=(v8, v19);
return std::string::~string(v19);
}
v15[0] = google::protobuf::stringpiece_internal::StringPiece::substr(
(google::protobuf::stringpiece_internal::StringPiece *)v33,
i,
first_of - i);
v15[1] = v6;
google::protobuf::stringpiece_internal::StringPiece::operator std::string(v16, v15);
v14 = std::back_insert_iterator<std::vector<std::string>>::operator++(v31, 0LL);
v7 = std::back_insert_iterator<std::vector<std::string>>::operator*(&v14);
std::back_insert_iterator<std::vector<std::string>>::operator=(v7, v16);
std::string::~string(v16);
google::protobuf::stringpiece_internal::StringPiece::StringPiece(
(google::protobuf::stringpiece_internal::StringPiece *)v13,
v32);
result = google::protobuf::stringpiece_internal::StringPiece::find_first_not_of(v33, v13[0], v13[1], first_of);
}
}
else
{
v30 = *v32;
v29 = (char *)google::protobuf::stringpiece_internal::StringPiece::data((google::protobuf::stringpiece_internal::StringPiece *)v33);
v28 = &v29[google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)v33)];
while ( 1 )
{
result = (unsigned long long)v29;
if ( v29 == v28 )
break;
if ( *v29 == v30 )
{
++v29;
}
else
{
v27 = v29;
do
{
++v29;
v12 = 0;
if ( v29 != v28 )
v12 = *v29 != v30;
}
while ( v12 );
v10 = v27;
v11 = (char *)(v29 - v27);
std::allocator<char>::allocator(&v25, a2);
std::string::basic_string(v26, v10, v11, &v25);
v24[0] = std::back_insert_iterator<std::vector<std::string>>::operator++(v31, 0LL);
v9 = std::back_insert_iterator<std::vector<std::string>>::operator*(v24);
a2 = v26;
std::back_insert_iterator<std::vector<std::string>>::operator=(v9, v26);
std::string::~string(v26);
std::allocator<char>::~allocator(&v25);
}
}
}
return result;
}
| SplitStringToIteratorUsing<std::back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>:
SUB RSP,0x188
MOV qword ptr [RSP + 0x178],RDI
MOV qword ptr [RSP + 0x180],RSI
MOV qword ptr [RSP + 0x170],RDX
MOV qword ptr [RSP + 0x168],RCX
MOV RAX,qword ptr [RSP + 0x170]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00126ccc
MOV RAX,qword ptr [RSP + 0x170]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JNZ 0x00126ccc
MOV RAX,qword ptr [RSP + 0x170]
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x167],AL
LEA RDI,[RSP + 0x178]
CALL 0x00124070
MOV qword ptr [RSP + 0x158],RAX
MOV RAX,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x50],RAX
LEA RDI,[RSP + 0x178]
CALL 0x00124080
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x50]
ADD RAX,RCX
MOV qword ptr [RSP + 0x150],RAX
LAB_00126b23:
MOV RAX,qword ptr [RSP + 0x158]
CMP RAX,qword ptr [RSP + 0x150]
JZ 0x00126cc7
MOV RAX,qword ptr [RSP + 0x158]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RSP + 0x167]
CMP EAX,ECX
JNZ 0x00126b69
MOV RAX,qword ptr [RSP + 0x158]
ADD RAX,0x1
MOV qword ptr [RSP + 0x158],RAX
JMP 0x00126cc2
LAB_00126b69:
MOV RAX,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x148],RAX
LAB_00126b79:
MOV RCX,qword ptr [RSP + 0x158]
ADD RCX,0x1
MOV qword ptr [RSP + 0x158],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RSP + 0x150]
MOV byte ptr [RSP + 0x4f],AL
JZ 0x00126bb9
MOV RAX,qword ptr [RSP + 0x158]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RSP + 0x167]
CMP EAX,ECX
SETNZ AL
MOV byte ptr [RSP + 0x4f],AL
LAB_00126bb9:
MOV AL,byte ptr [RSP + 0x4f]
TEST AL,0x1
JNZ 0x00126bc3
JMP 0x00126bc5
LAB_00126bc3:
JMP 0x00126b79
LAB_00126bc5:
MOV RCX,qword ptr [RSP + 0x148]
MOV qword ptr [RSP + 0x30],RCX
MOV RAX,qword ptr [RSP + 0x158]
SUB RAX,RCX
MOV qword ptr [RSP + 0x38],RAX
LEA RDI,[RSP + 0x127]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x00113760
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
LAB_00126c03:
LEA RDI,[RSP + 0x128]
CALL 0x00113500
JMP 0x00126c12
LAB_00126c12:
MOV RDI,qword ptr [RSP + 0x168]
LAB_00126c1a:
XOR ESI,ESI
CALL 0x00130dc0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x00126c28
LAB_00126c28:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x108],RAX
LEA RDI,[RSP + 0x108]
CALL 0x00130de0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00126c49
LAB_00126c49:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x128]
CALL 0x00130df0
LAB_00126c5b:
JMP 0x00126c5d
LAB_00126c5d:
LEA RDI,[RSP + 0x128]
CALL 0x00113290
LEA RDI,[RSP + 0x127]
CALL 0x001134d0
JMP 0x00126cc2
LAB_00126cc2:
JMP 0x00126b23
LAB_00126cc7:
JMP 0x00126f1e
LAB_00126ccc:
MOV RSI,qword ptr [RSP + 0x170]
LEA RDI,[RSP + 0xe8]
CALL 0x00130720
MOV RSI,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xf0]
LEA RDI,[RSP + 0x178]
XOR EAX,EAX
MOV ECX,EAX
CALL 0x002d44d0
MOV qword ptr [RSP + 0x100],RAX
LAB_00126d0a:
CMP qword ptr [RSP + 0x100],-0x1
JZ 0x00126f1e
MOV RSI,qword ptr [RSP + 0x170]
LEA RDI,[RSP + 0xd8]
CALL 0x00130720
MOV RCX,qword ptr [RSP + 0x100]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
LEA RDI,[RSP + 0x178]
CALL 0x002d4300
MOV qword ptr [RSP + 0xf8],RAX
CMP qword ptr [RSP + 0xf8],-0x1
JNZ 0x00126e31
MOV RSI,qword ptr [RSP + 0x100]
LEA RAX,[0x2f9380]
MOV RDX,qword ptr [RAX]
LEA RDI,[RSP + 0x178]
CALL 0x002d4a80
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xb0],RDX
LEA RDI,[RSP + 0xb8]
LEA RSI,[RSP + 0xa8]
CALL 0x00130e20
MOV RDI,qword ptr [RSP + 0x168]
LAB_00126db6:
XOR ESI,ESI
CALL 0x00130dc0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00126dc4
LAB_00126dc4:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0xa0],RAX
LEA RDI,[RSP + 0xa0]
CALL 0x00130de0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00126de5
LAB_00126de5:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0xb8]
CALL 0x00130df0
LAB_00126df7:
JMP 0x00126df9
LAB_00126df9:
LEA RDI,[RSP + 0xb8]
CALL 0x00113290
JMP 0x00126f1e
LAB_00126e31:
MOV RSI,qword ptr [RSP + 0x100]
MOV RDX,qword ptr [RSP + 0xf8]
SUB RDX,RSI
LEA RDI,[RSP + 0x178]
CALL 0x002d4a80
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x78],RDX
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0x70]
CALL 0x00130e20
MOV RDI,qword ptr [RSP + 0x168]
LAB_00126e75:
XOR ESI,ESI
CALL 0x00130dc0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00126e83
LAB_00126e83:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x68],RAX
LEA RDI,[RSP + 0x68]
CALL 0x00130de0
MOV qword ptr [RSP],RAX
JMP 0x00126e9d
LAB_00126e9d:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x80]
CALL 0x00130df0
LAB_00126eae:
JMP 0x00126eb0
LAB_00126eb0:
LEA RDI,[RSP + 0x80]
CALL 0x00113290
MOV RSI,qword ptr [RSP + 0x170]
LEA RDI,[RSP + 0x58]
CALL 0x00130720
MOV RCX,qword ptr [RSP + 0xf8]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
LEA RDI,[RSP + 0x178]
CALL 0x002d44d0
MOV qword ptr [RSP + 0x100],RAX
JMP 0x00126d0a
LAB_00126f1e:
ADD RSP,0x188
RET
|
/* void
google::protobuf::SplitStringToIteratorUsing<std::back_insert_iterator<std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > > >(google::protobuf::stringpiece_internal::StringPiece,
char const*, std::back_insert_iterator<std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > >&) */
void __thiscall
google::protobuf::
SplitStringToIteratorUsing<std::back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
(protobuf *this,int8 param_2,char *param_3,
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*param_4)
{
char *pcVar1;
long lVar2;
ulong uVar3;
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*pbVar4;
bool bVar5;
int1 auVar6 [16];
int8 local_130;
int8 local_128;
int8 local_120;
int1 local_118 [16];
StringPiece local_108 [32];
int8 local_e8;
int1 local_e0 [16];
StringPiece local_d0 [32];
int8 local_b0;
int8 local_a8;
int8 local_a0;
int8 local_98;
long local_90;
ulong local_88;
int8 local_80 [3];
allocator local_61;
string local_60 [32];
char *local_40;
char *local_38;
char *local_30;
char local_21;
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*local_20;
char *local_18;
protobuf *local_10;
int8 local_8;
local_20 = param_4;
local_18 = param_3;
local_10 = this;
local_8 = param_2;
if ((*param_3 == '\0') || (param_3[1] != '\0')) {
stringpiece_internal::StringPiece::StringPiece((StringPiece *)&local_a0,param_3);
local_88 = stringpiece_internal::StringPiece::find_first_not_of(&local_10,local_a0,local_98,0);
while (local_88 != 0xffffffffffffffff) {
stringpiece_internal::StringPiece::StringPiece((StringPiece *)&local_b0,local_18);
local_90 = stringpiece_internal::StringPiece::find_first_of
(&local_10,local_b0,local_a8,local_88);
if (local_90 == -1) {
local_e0 = stringpiece_internal::StringPiece::substr
((StringPiece *)&local_10,local_88,
stringpiece_internal::StringPiece::npos);
stringpiece_internal::StringPiece::operator_cast_to_string(local_d0);
/* try { // try from 00126db6 to 00126df6 has its CatchHandler @ 00126e0b */
local_e8 = std::
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++(local_20,0);
pbVar4 = (back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)std::
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_e8);
std::
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator=(pbVar4,(string *)local_d0);
std::__cxx11::string::~string((string *)local_d0);
return;
}
auVar6 = stringpiece_internal::StringPiece::substr
((StringPiece *)&local_10,local_88,local_90 - local_88);
local_118 = auVar6;
stringpiece_internal::StringPiece::operator_cast_to_string(local_108);
/* try { // try from 00126e75 to 00126ead has its CatchHandler @ 00126efb */
local_120 = std::
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++(local_20,0);
pbVar4 = (back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)std::
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_120);
std::
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>::
operator=(pbVar4,(string *)local_108);
std::__cxx11::string::~string((string *)local_108);
stringpiece_internal::StringPiece::StringPiece((StringPiece *)&local_130,local_18);
local_88 = stringpiece_internal::StringPiece::find_first_not_of
(&local_10,local_130,local_128,local_90);
}
}
else {
local_21 = *param_3;
pcVar1 = (char *)stringpiece_internal::StringPiece::data((StringPiece *)&local_10);
local_30 = pcVar1;
lVar2 = stringpiece_internal::StringPiece::size((StringPiece *)&local_10);
local_38 = pcVar1 + lVar2;
while (pcVar1 = local_30, local_30 != local_38) {
if (*local_30 == local_21) {
local_30 = local_30 + 1;
}
else {
local_40 = local_30;
do {
local_30 = local_30 + 1;
bVar5 = false;
if (local_30 != local_38) {
bVar5 = *local_30 != local_21;
}
} while (bVar5);
uVar3 = (long)local_30 - (long)pcVar1;
std::allocator<char>::allocator();
/* try { // try from 00126c03 to 00126c0f has its CatchHandler @ 00126c79 */
std::__cxx11::string::string(local_60,pcVar1,uVar3,&local_61);
/* try { // try from 00126c1a to 00126c5a has its CatchHandler @ 00126c8f */
local_80[0] = std::
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++(local_20,0);
pbVar4 = (back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)std::
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)local_80);
std::
back_insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator=(pbVar4,local_60);
std::__cxx11::string::~string(local_60);
std::allocator<char>::~allocator((allocator<char> *)&local_61);
}
}
}
return;
}
| |
33,018 | coro::shared_mutex<coro::thread_pool>::unlock() | AlayaLite/build_O3/_deps/libcoro-src/include/coro/shared_mutex.hpp | auto unlock() -> void
{
std::unique_lock lk{m_mutex};
if (m_head_waiter != nullptr)
{
wake_waiters(lk);
}
else
{
m_state = state::unlocked;
}
} | O3 | cpp | coro::shared_mutex<coro::thread_pool>::unlock():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x3368
movb $0x1, 0x8(%r14)
cmpq $0x0, 0x50(%rbx)
je 0x3466
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3506
jmp 0x346d
movl $0x0, 0x38(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x3352
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3352
movq %rbx, %rdi
callq 0x2250
| _ZN4coro12shared_mutexINS_11thread_poolEE6unlockEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea rax, [rdi+10h]
lea r14, [rsp+28h+var_20]
mov [r14], rax
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
cmp qword ptr [rbx+50h], 0
jz short loc_3466
lea rsi, [rsp+28h+var_20]
mov rdi, rbx
call _ZN4coro12shared_mutexINS_11thread_poolEE12wake_waitersERSt11unique_lockISt5mutexE; coro::shared_mutex<coro::thread_pool>::wake_waiters(std::unique_lock<std::mutex> &)
jmp short loc_346D
loc_3466:
mov dword ptr [rbx+38h], 0
loc_346D:
lea rdi, [rsp+28h+var_20]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
add rsp, 18h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, rbx
call __Unwind_Resume
| long long coro::shared_mutex<coro::thread_pool>::unlock(long long a1)
{
long long result; // rax
long long v2; // [rsp+8h] [rbp-20h] BYREF
char v3; // [rsp+10h] [rbp-18h]
v2 = a1 + 16;
v3 = 0;
result = std::unique_lock<std::mutex>::lock((long long)&v2);
v3 = 1;
if ( *(_QWORD *)(a1 + 80) )
result = coro::shared_mutex<coro::thread_pool>::wake_waiters(a1, &v2);
else
*(_DWORD *)(a1 + 56) = 0;
std::unique_lock<std::mutex>::~unique_lock((long long)&v2);
return result;
}
| unlock:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RAX
MOV byte ptr [R14 + 0x8],0x0
MOV RDI,R14
CALL 0x00103368
MOV byte ptr [R14 + 0x8],0x1
CMP qword ptr [RBX + 0x50],0x0
JZ 0x00103466
LAB_00103457:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00103506
LAB_00103464:
JMP 0x0010346d
LAB_00103466:
MOV dword ptr [RBX + 0x38],0x0
LAB_0010346d:
LEA RDI,[RSP + 0x8]
CALL 0x00103352
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* coro::shared_mutex<coro::thread_pool>::unlock() */
void __thiscall coro::shared_mutex<coro::thread_pool>::unlock(shared_mutex<coro::thread_pool> *this)
{
shared_mutex<coro::thread_pool> *local_20;
int1 local_18;
local_20 = this + 0x10;
local_18 = 0;
std::unique_lock<std::mutex>::lock();
local_18 = 1;
if (*(long *)(this + 0x50) == 0) {
*(int4 *)(this + 0x38) = 0;
}
else {
/* try { // try from 00103457 to 00103463 has its CatchHandler @ 0010347f */
wake_waiters((unique_lock *)this);
}
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_20);
return;
}
| |
33,019 | mi_update_static_record | eloqsql/storage/myisam/mi_statrec.c | int _mi_update_static_record(MI_INFO *info, my_off_t pos, const uchar *record)
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
return (info->s->file_write(info,
record, info->s->base.reclength,
pos,
MYF(MY_NABP)) != 0);
} | O3 | c | mi_update_static_record:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rcx
movl $0x1, 0x300(%rdi)
movq (%rdi), %r9
movq 0x140(%r9), %rax
movl $0x4, %r8d
movq %rdx, %rsi
movq %rax, %rdx
callq *0x2e8(%r9)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, %eax
popq %rbp
retq
| _mi_update_static_record:
push rbp
mov rbp, rsp
mov rcx, rsi
mov dword ptr [rdi+300h], 1
mov r9, [rdi]
mov rax, [r9+140h]
mov r8d, 4
mov rsi, rdx
mov rdx, rax
call qword ptr [r9+2E8h]
xor ecx, ecx
test rax, rax
setnz cl
mov eax, ecx
pop rbp
retn
| _BOOL8 mi_update_static_record(_DWORD *a1, long long a2, long long a3)
{
a1[192] = 1;
return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long))(*(_QWORD *)a1 + 744LL))(
a1,
a3,
*(_QWORD *)(*(_QWORD *)a1 + 320LL),
a2,
4LL) != 0;
}
| _mi_update_static_record:
PUSH RBP
MOV RBP,RSP
MOV RCX,RSI
MOV dword ptr [RDI + 0x300],0x1
MOV R9,qword ptr [RDI]
MOV RAX,qword ptr [R9 + 0x140]
MOV R8D,0x4
MOV RSI,RDX
MOV RDX,RAX
CALL qword ptr [R9 + 0x2e8]
XOR ECX,ECX
TEST RAX,RAX
SETNZ CL
MOV EAX,ECX
POP RBP
RET
|
bool _mi_update_static_record(long *param_1,int8 param_2,int8 param_3)
{
long lVar1;
*(int4 *)(param_1 + 0x60) = 1;
lVar1 = (**(code **)(*param_1 + 0x2e8))
(param_1,param_3,*(int8 *)(*param_1 + 0x140),param_2,4);
return lVar1 != 0;
}
| |
33,020 | atoi_octal | eloqsql/mysys/my_init.c | static ulong atoi_octal(const char *str)
{
long int tmp;
while (*str && my_isspace(&my_charset_latin1, *str))
str++;
str2int(str,
(*str == '0' ? 8 : 10), /* Octalt or decimalt */
0, INT_MAX, &tmp);
return (ulong) tmp;
} | O3 | c | atoi_octal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb (%rdi), %al
movl $0xa, %esi
testb %al, %al
je 0x25bd6
leaq 0x2eebc2(%rip), %rcx # 0x314770
movq 0x40(%rcx), %rcx
movzbl %al, %edx
testb $0x8, 0x1(%rcx,%rdx)
je 0x25bc8
movb 0x1(%rdi), %al
incq %rdi
testb %al, %al
jne 0x25bb2
jmp 0x25bd6
xorl %ecx, %ecx
cmpb $0x30, %al
setne %cl
leal 0x8(,%rcx,2), %esi
leaq -0x10(%rbp), %rbx
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
xorl %edx, %edx
movq %rbx, %r8
callq 0x59f40
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| atoi_octal:
push rbp
mov rbp, rsp
push rbx
push rax
mov al, [rdi]
mov esi, 0Ah
test al, al
jz short loc_25BD6
lea rcx, my_charset_latin1
mov rcx, [rcx+40h]
loc_25BB2:
movzx edx, al
test byte ptr [rcx+rdx+1], 8
jz short loc_25BC8
mov al, [rdi+1]
inc rdi
test al, al
jnz short loc_25BB2
jmp short loc_25BD6
loc_25BC8:
xor ecx, ecx
cmp al, 30h ; '0'
setnz cl
lea esi, ds:8[rcx*2]
loc_25BD6:
lea rbx, [rbp+var_10]
mov ecx, 7FFFFFFFh
xor edx, edx
mov r8, rbx
call str2int
mov rax, [rbx]
add rsp, 8
pop rbx
pop rbp
retn
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> atoi_octal(unsigned __int8 *a1)
{
unsigned __int8 v1; // al
long long v2; // rsi
_BYTE v3[16]; // [rsp+0h] [rbp-10h] BYREF
v1 = *a1;
v2 = 10LL;
if ( *a1 )
{
while ( (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + v1 + 1LL) & 8) != 0 )
{
v1 = *++a1;
if ( !v1 )
goto LABEL_6;
}
v2 = 2 * (unsigned int)(v1 != 48) + 8;
}
LABEL_6:
str2int(a1, v2, 0LL, 0x7FFFFFFFLL, v3);
}
| atoi_octal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV AL,byte ptr [RDI]
MOV ESI,0xa
TEST AL,AL
JZ 0x00125bd6
LEA RCX,[0x414770]
MOV RCX,qword ptr [RCX + 0x40]
LAB_00125bb2:
MOVZX EDX,AL
TEST byte ptr [RCX + RDX*0x1 + 0x1],0x8
JZ 0x00125bc8
MOV AL,byte ptr [RDI + 0x1]
INC RDI
TEST AL,AL
JNZ 0x00125bb2
JMP 0x00125bd6
LAB_00125bc8:
XOR ECX,ECX
CMP AL,0x30
SETNZ CL
LEA ESI,[0x8 + RCX*0x2]
LAB_00125bd6:
LEA RBX,[RBP + -0x10]
MOV ECX,0x7fffffff
XOR EDX,EDX
MOV R8,RBX
CALL 0x00159f40
MOV RAX,qword ptr [RBX]
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 atoi_octal(byte *param_1)
{
byte bVar1;
int8 in_RAX;
char cVar2;
int8 local_18;
bVar1 = *param_1;
cVar2 = '\n';
do {
if (bVar1 == 0) {
LAB_00125bd6:
local_18 = in_RAX;
str2int(param_1,cVar2,0,0x7fffffff,&local_18);
return local_18;
}
if ((PTR_ctype_latin1_004147b0[(ulong)bVar1 + 1] & 8) == 0) {
cVar2 = (bVar1 != 0x30) * '\x02' + '\b';
goto LAB_00125bd6;
}
bVar1 = param_1[1];
param_1 = param_1 + 1;
} while( true );
}
| |
33,021 | my_hash_sort_latin1_de | eloqsql/strings/ctype-latin1.c | void my_hash_sort_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end;
register ulong m1= *nr1, m2= *nr2;
/*
Remove end space. We have to do this to be able to compare
'AE' and 'Ä' as identical
*/
end= skip_trailing_space(key, len);
for (; key < end ; key++)
{
uint X= (uint) combo1map[(uint) *key];
MY_HASH_ADD(m1, m2, X);
if ((X= combo2map[*key]))
{
MY_HASH_ADD(m1, m2, X);
}
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_latin1_de:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3dac0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x3daa1
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0xffc3d(%rip), %rax # 0x13d640
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xffcf4(%rip), %rax # 0x13d740
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
je 0x3da8e
jmp 0x3da5a
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x3da8e
jmp 0x3da90
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x3d9e3
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| my_hash_sort_latin1_de:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call skip_trailing_space_0
mov [rbp+var_30], rax
loc_3D9E3:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jnb loc_3DAA1
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov eax, eax
mov ecx, eax
lea rax, combo1map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo2map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
cmp eax, 0
jz short loc_3DA8E
jmp short $+2
loc_3DA5A:
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
jmp short $+2
loc_3DA8E:
jmp short $+2
loc_3DA90:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_3D9E3
loc_3DAA1:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 50h
pop rbp
retn
| _QWORD * my_hash_sort_latin1_de(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
_QWORD *result; // rax
long long v6; // [rsp+10h] [rbp-40h]
long long v7; // [rsp+18h] [rbp-38h]
unsigned long long v8; // [rsp+20h] [rbp-30h]
unsigned __int8 *v11; // [rsp+40h] [rbp-10h]
v11 = a2;
v7 = *a4;
v6 = *a5;
v8 = skip_trailing_space_0(a2, a3);
while ( (unsigned long long)v11 < v8 )
{
v7 ^= (v7 << 8) + combo1map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
if ( combo2map[*v11] )
{
v7 ^= (v7 << 8) + combo2map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
}
++v11;
}
*a4 = v7;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_latin1_de:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013dac0
MOV qword ptr [RBP + -0x30],RAX
LAB_0013d9e3:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0013daa1
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x23d640]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x23d740]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JZ 0x0013da8e
JMP 0x0013da5a
LAB_0013da5a:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013da8e
LAB_0013da8e:
JMP 0x0013da90
LAB_0013da90:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0013d9e3
LAB_0013daa1:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x50
POP RBP
RET
|
void my_hash_sort_latin1_de
(int8 param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5)
{
long lVar1;
byte *pbVar2;
long local_48;
ulong local_40;
byte *local_18;
local_40 = *param_4;
local_48 = *param_5;
pbVar2 = (byte *)skip_trailing_space(param_2,param_3);
for (local_18 = param_2; local_18 < pbVar2; local_18 = local_18 + 1) {
local_40 = ((local_40 & 0x3f) + local_48) * (ulong)(byte)combo1map[*local_18] + local_40 * 0x100
^ local_40;
lVar1 = local_48 + 3;
if ((byte)combo2map[*local_18] != 0) {
local_40 = ((local_40 & 0x3f) + local_48 + 3) * (ulong)(uint)(byte)combo2map[*local_18] +
local_40 * 0x100 ^ local_40;
lVar1 = local_48 + 6;
}
local_48 = lVar1;
}
*param_4 = local_40;
*param_5 = local_48;
return;
}
| |
33,022 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*) | monkey531[P]llama/common/json.hpp | static std::string diagnostics(const BasicJsonType* leaf_element)
{
#if JSON_DIAGNOSTICS
std::vector<std::string> tokens;
for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent)
{
switch (current->m_parent->type())
{
case value_t::array:
{
for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i)
{
if (¤t->m_parent->m_data.m_value.array->operator[](i) == current)
{
tokens.emplace_back(std::to_string(i));
break;
}
}
break;
}
case value_t::object:
{
for (const auto& element : *current->m_parent->m_data.m_value.object)
{
if (&element.second == current)
{
tokens.emplace_back(element.first.c_str());
break;
}
}
break;
}
case value_t::null: // LCOV_EXCL_LINE
case value_t::string: // LCOV_EXCL_LINE
case value_t::boolean: // LCOV_EXCL_LINE
case value_t::number_integer: // LCOV_EXCL_LINE
case value_t::number_unsigned: // LCOV_EXCL_LINE
case value_t::number_float: // LCOV_EXCL_LINE
case value_t::binary: // LCOV_EXCL_LINE
case value_t::discarded: // LCOV_EXCL_LINE
default: // LCOV_EXCL_LINE
break; // LCOV_EXCL_LINE
}
}
if (tokens.empty())
{
return "";
}
auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{},
[](const std::string & a, const std::string & b)
{
return concat(a, '/', detail::escape(b));
});
return concat('(', str, ") ");
#else
static_cast<void>(leaf_element);
return "";
#endif
} | O0 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*):
subq $0x48, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5a080
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x156477(%rip), %rsi # 0x2084a2
callq 0x62ae0
jmp 0xb2032
leaq 0x37(%rsp), %rdi
callq 0x5a4b0
movq 0x8(%rsp), %rax
addq $0x48, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x37(%rsp), %rdi
callq 0x5a4b0
movq 0x28(%rsp), %rdi
callq 0x59b90
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_:
sub rsp, 48h
mov [rsp+48h+var_38], rdi
mov rax, rdi
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
lea rdi, [rsp+48h+var_11]
mov [rsp+48h+var_30], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+48h+var_38]
mov rdx, [rsp+48h+var_30]
lea rsi, aTestArgParserT_1+46h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_B2032:
lea rdi, [rsp+48h+var_11]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+48h+var_40]
add rsp, 48h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1,
long long a2)
{
char v3; // [rsp+37h] [rbp-11h] BYREF
long long v4; // [rsp+38h] [rbp-10h]
long long v5; // [rsp+40h] [rbp-8h]
v5 = a1;
v4 = a2;
std::allocator<char>::allocator(&v3, a2);
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v3);
std::allocator<char>::~allocator(&v3);
return a1;
}
| diagnostics<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>>:
SUB RSP,0x48
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
LEA RDI,[RSP + 0x37]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0015a080
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_001b2024:
LEA RSI,[0x3084a2]
CALL 0x00162ae0
LAB_001b2030:
JMP 0x001b2032
LAB_001b2032:
LEA RDI,[RSP + 0x37]
CALL 0x0015a4b0
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x48
RET
|
/* std::__cxx11::string
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const*) */
exception * __thiscall
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<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>>
(exception *this,basic_json *param_1)
{
allocator local_11;
basic_json *local_10;
exception *local_8;
local_10 = param_1;
local_8 = this;
std::allocator<char>::allocator();
/* try { // try from 001b2024 to 001b202f has its CatchHandler @ 001b2046 */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_11);
std::allocator<char>::~allocator((allocator<char> *)&local_11);
return this;
}
| |
33,023 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*) | monkey531[P]llama/common/json.hpp | static std::string diagnostics(const BasicJsonType* leaf_element)
{
#if JSON_DIAGNOSTICS
std::vector<std::string> tokens;
for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent)
{
switch (current->m_parent->type())
{
case value_t::array:
{
for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i)
{
if (¤t->m_parent->m_data.m_value.array->operator[](i) == current)
{
tokens.emplace_back(std::to_string(i));
break;
}
}
break;
}
case value_t::object:
{
for (const auto& element : *current->m_parent->m_data.m_value.object)
{
if (&element.second == current)
{
tokens.emplace_back(element.first.c_str());
break;
}
}
break;
}
case value_t::null: // LCOV_EXCL_LINE
case value_t::string: // LCOV_EXCL_LINE
case value_t::boolean: // LCOV_EXCL_LINE
case value_t::number_integer: // LCOV_EXCL_LINE
case value_t::number_unsigned: // LCOV_EXCL_LINE
case value_t::number_float: // LCOV_EXCL_LINE
case value_t::binary: // LCOV_EXCL_LINE
case value_t::discarded: // LCOV_EXCL_LINE
default: // LCOV_EXCL_LINE
break; // LCOV_EXCL_LINE
}
}
if (tokens.empty())
{
return "";
}
auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{},
[](const std::string & a, const std::string & b)
{
return concat(a, '/', detail::escape(b));
});
return concat('(', str, ") ");
#else
static_cast<void>(leaf_element);
return "";
#endif
} | O2 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6d5ba(%rip), %rsi # 0xafdf5
leaq 0xf(%rsp), %rdx
callq 0x273be
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
| _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_:
push rbx
sub rsp, 10h
mov rbx, rdi
lea rsi, aErrorWhileHand_0+34h; ""
lea rdx, [rsp+18h+var_9]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rax, rbx
add rsp, 10h
pop rbx
retn
| _QWORD * nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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>>(
_QWORD *a1)
{
std::string::basic_string<std::allocator<char>>(a1, (long long)"");
return a1;
}
| diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
LEA RSI,[0x1afdf5]
LEA RDX,[RSP + 0xf]
CALL 0x001273be
MOV RAX,RBX
ADD RSP,0x10
POP RBX
RET
|
/* std::__cxx11::string
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const*) */
basic_json *
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1)
{
allocator local_9;
std::__cxx11::string::string<std::allocator<char>>((string *)param_1,"",&local_9);
return param_1;
}
| |
33,024 | lock_io_cache | eloqsql/mysys/mf_iocache.c | static int lock_io_cache(IO_CACHE *cache, my_off_t pos)
{
IO_CACHE_SHARE *cshare= cache->share;
DBUG_ENTER("lock_io_cache");
/* Enter the lock. */
mysql_mutex_lock(&cshare->mutex);
cshare->running_threads--;
DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader", cache, (ulong) pos,
cshare->running_threads));
if (cshare->source_cache)
{
/* A write cache is synchronized to the read caches. */
if (cache == cshare->source_cache)
{
/* The writer waits until all readers are here. */
while (cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("writer waits in lock"));
mysql_cond_wait(&cshare->cond_writer, &cshare->mutex);
}
DBUG_PRINT("io_cache_share", ("writer awoke, going to copy"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* The last thread wakes the writer. */
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("waking writer"));
mysql_cond_signal(&cshare->cond_writer);
}
/*
Readers wait until the data is copied from the writer. Another
reason to stop waiting is the removal of the write thread. If this
happens, we leave the lock with old data in the buffer.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->source_cache)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/*
If the writer was removed from the share while this thread was
asleep, we need to simulate an EOF condition. The writer cannot
reset the share variables as they might still be in use by readers
of the last block. When we awake here then because the last
joining thread signalled us. If the writer is not the last, it
will not signal. So it is safe to clear the buffer here.
*/
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader found writer removed. EOF"));
cshare->read_end= cshare->buffer; /* Empty buffer. */
cshare->error= 0; /* EOF is not an error. */
}
}
else
{
/*
There are read caches only. The last thread arriving in
lock_io_cache() continues with a locked cache and reads the block.
*/
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("last thread joined, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/*
All other threads wait until the requested block is read by the
last thread arriving. Another reason to stop waiting is the
removal of a thread. If this leads to all threads being in the
lock, we have to continue also. The first of the awaken threads
will then do the read.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/* If the block is not yet read, continue with a locked cache and read. */
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader awoke, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* Another thread did read the block already. */
}
DBUG_PRINT("io_cache_share", ("reader awoke, going to process %u bytes",
(uint) (cshare->read_end ? (size_t)
(cshare->read_end - cshare->buffer) :
0)));
/*
Leave the lock. Do not call unlock_io_cache() later. The thread that
filled the buffer did this and marked all threads as running.
*/
mysql_mutex_unlock(&cshare->mutex);
DBUG_RETURN(0);
} | O0 | c | lock_io_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x77a76(%rip), %rsi # 0x15f890
movl $0x3dd, %edx # imm = 0x3DD
callq 0xe67d0
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xd8(%rax)
jmp 0xe7e39
movq -0x20(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0xe7f74
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0xc0(%rcx), %rax
jne 0xe7ea3
jmp 0xe7e5e
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
je 0xe7e91
jmp 0xe7e6d
jmp 0xe7e6f
movq -0x20(%rbp), %rdi
addq $0x80, %rdi
movq -0x20(%rbp), %rsi
leaq 0x77a0b(%rip), %rdx # 0x15f890
movl $0x3ee, %ecx # imm = 0x3EE
callq 0xe80a0
jmp 0xe7e5e
jmp 0xe7e93
jmp 0xe7e95
jmp 0xe7e97
movl $0x1, -0x4(%rbp)
jmp 0xe803a
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
jne 0xe7ec4
jmp 0xe7eb2
jmp 0xe7eb4
movq -0x20(%rbp), %rdi
addq $0x80, %rdi
callq 0xe6840
jmp 0xe7ec6
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xe7eea
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x21(%rbp)
jae 0xe7efc
movq -0x20(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xe7f05
jmp 0xe7f28
jmp 0xe7f07
jmp 0xe7f09
movq -0x20(%rbp), %rdi
addq $0x48, %rdi
movq -0x20(%rbp), %rsi
leaq 0x77974(%rip), %rdx # 0x15f890
movl $0x406, %ecx # imm = 0x406
callq 0xe80a0
jmp 0xe7ec6
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xe7f47
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0xe7f6f
jmp 0xe7f49
jmp 0xe7f4b
movq -0x20(%rbp), %rax
movq 0xc8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0xe0(%rax)
jmp 0xe8026
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
jne 0xe7f93
jmp 0xe7f83
jmp 0xe7f85
jmp 0xe7f87
movl $0x1, -0x4(%rbp)
jmp 0xe803a
jmp 0xe7f95
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xe7fb9
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x22(%rbp)
jae 0xe7fca
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
setne %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
testb $0x1, %al
jne 0xe7fd3
jmp 0xe7ff6
jmp 0xe7fd5
jmp 0xe7fd7
movq -0x20(%rbp), %rdi
addq $0x48, %rdi
movq -0x20(%rbp), %rsi
leaq 0x778a6(%rip), %rdx # 0x15f890
movl $0x430, %ecx # imm = 0x430
callq 0xe80a0
jmp 0xe7f95
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xe8015
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0xe8024
jmp 0xe8017
jmp 0xe8019
jmp 0xe801b
movl $0x1, -0x4(%rbp)
jmp 0xe803a
jmp 0xe8026
jmp 0xe8028
jmp 0xe802a
movq -0x20(%rbp), %rdi
callq 0xe6900
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| lock_io_cache:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3DDh
call inline_mysql_mutex_lock_24
mov rax, [rbp+var_20]
mov ecx, [rax+0D8h]
add ecx, 0FFFFFFFFh
mov [rax+0D8h], ecx
jmp short $+2
loc_E7E39:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0C0h], 0
jz loc_E7F74
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
cmp rax, [rcx+0C0h]
jnz short loc_E7EA3
jmp short $+2
loc_E7E5E:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
jz short loc_E7E91
jmp short $+2
loc_E7E6D:
jmp short $+2
loc_E7E6F:
mov rdi, [rbp+var_20]
add rdi, 80h
mov rsi, [rbp+var_20]
lea rdx, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 3EEh
call inline_mysql_cond_wait_4
jmp short loc_E7E5E
loc_E7E91:
jmp short $+2
loc_E7E93:
jmp short $+2
loc_E7E95:
jmp short $+2
loc_E7E97:
mov [rbp+var_4], 1
jmp loc_E803A
loc_E7EA3:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
jnz short loc_E7EC4
jmp short $+2
loc_E7EB2:
jmp short $+2
loc_E7EB4:
mov rdi, [rbp+var_20]
add rdi, 80h
call inline_mysql_cond_signal_1
loc_E7EC4:
jmp short $+2
loc_E7EC6:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_E7EEA
mov rax, [rbp+var_20]
mov rcx, [rax+0B8h]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_21], al
jnb short loc_E7EFC
loc_E7EEA:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0C0h], 0
setnz al
mov [rbp+var_21], al
loc_E7EFC:
mov al, [rbp+var_21]
test al, 1
jnz short loc_E7F05
jmp short loc_E7F28
loc_E7F05:
jmp short $+2
loc_E7F07:
jmp short $+2
loc_E7F09:
mov rdi, [rbp+var_20]
add rdi, 48h ; 'H'
mov rsi, [rbp+var_20]
lea rdx, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 406h
call inline_mysql_cond_wait_4
jmp short loc_E7EC6
loc_E7F28:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_E7F47
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
cmp rax, [rbp+var_18]
jnb short loc_E7F6F
loc_E7F47:
jmp short $+2
loc_E7F49:
jmp short $+2
loc_E7F4B:
mov rax, [rbp+var_20]
mov rcx, [rax+0C8h]
mov rax, [rbp+var_20]
mov [rax+0D0h], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax+0E0h], 0
loc_E7F6F:
jmp loc_E8026
loc_E7F74:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
jnz short loc_E7F93
jmp short $+2
loc_E7F83:
jmp short $+2
loc_E7F85:
jmp short $+2
loc_E7F87:
mov [rbp+var_4], 1
jmp loc_E803A
loc_E7F93:
jmp short $+2
loc_E7F95:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_E7FB9
mov rax, [rbp+var_20]
mov rcx, [rax+0B8h]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_22], al
jnb short loc_E7FCA
loc_E7FB9:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
setnz al
mov [rbp+var_22], al
loc_E7FCA:
mov al, [rbp+var_22]
test al, 1
jnz short loc_E7FD3
jmp short loc_E7FF6
loc_E7FD3:
jmp short $+2
loc_E7FD5:
jmp short $+2
loc_E7FD7:
mov rdi, [rbp+var_20]
add rdi, 48h ; 'H'
mov rsi, [rbp+var_20]
lea rdx, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 430h
call inline_mysql_cond_wait_4
jmp short loc_E7F95
loc_E7FF6:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_E8015
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
cmp rax, [rbp+var_18]
jnb short loc_E8024
loc_E8015:
jmp short $+2
loc_E8017:
jmp short $+2
loc_E8019:
jmp short $+2
loc_E801B:
mov [rbp+var_4], 1
jmp short loc_E803A
loc_E8024:
jmp short $+2
loc_E8026:
jmp short $+2
loc_E8028:
jmp short $+2
loc_E802A:
mov rdi, [rbp+var_20]
call inline_mysql_mutex_unlock_25
mov [rbp+var_4], 0
loc_E803A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long lock_io_cache(long long a1, unsigned long long a2)
{
bool v3; // [rsp+Eh] [rbp-22h]
bool v4; // [rsp+Fh] [rbp-21h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = *(_QWORD *)(a1 + 152);
inline_mysql_mutex_lock_24(v5, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x3DDu);
--*(_DWORD *)(v5 + 216);
if ( !*(_QWORD *)(v5 + 192) )
{
if ( !*(_DWORD *)(v5 + 216) )
return 1;
while ( 1 )
{
if ( !*(_QWORD *)(v5 + 208) || (v3 = 0, *(_QWORD *)(v5 + 184) < a2) )
v3 = *(_DWORD *)(v5 + 216) != 0;
if ( !v3 )
break;
inline_mysql_cond_wait_4(v5 + 72, v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1072LL);
}
if ( !*(_QWORD *)(v5 + 208) || *(_QWORD *)(v5 + 184) < a2 )
return 1;
LABEL_27:
inline_mysql_mutex_unlock_25(v5);
return 0;
}
if ( a1 != *(_QWORD *)(v5 + 192) )
{
if ( !*(_DWORD *)(v5 + 216) )
inline_mysql_cond_signal_1(v5 + 128);
while ( 1 )
{
if ( !*(_QWORD *)(v5 + 208) || (v4 = 0, *(_QWORD *)(v5 + 184) < a2) )
v4 = *(_QWORD *)(v5 + 192) != 0LL;
if ( !v4 )
break;
inline_mysql_cond_wait_4(v5 + 72, v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1030LL);
}
if ( !*(_QWORD *)(v5 + 208) || *(_QWORD *)(v5 + 184) < a2 )
{
*(_QWORD *)(v5 + 208) = *(_QWORD *)(v5 + 200);
*(_DWORD *)(v5 + 224) = 0;
}
goto LABEL_27;
}
while ( *(_DWORD *)(v5 + 216) )
inline_mysql_cond_wait_4(v5 + 128, v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1006LL);
return 1;
}
| lock_io_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x25f890]
MOV EDX,0x3dd
CALL 0x001e67d0
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0xd8]
ADD ECX,-0x1
MOV dword ptr [RAX + 0xd8],ECX
JMP 0x001e7e39
LAB_001e7e39:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xc0],0x0
JZ 0x001e7f74
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX + 0xc0]
JNZ 0x001e7ea3
JMP 0x001e7e5e
LAB_001e7e5e:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0xd8],0x0
JZ 0x001e7e91
JMP 0x001e7e6d
LAB_001e7e6d:
JMP 0x001e7e6f
LAB_001e7e6f:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x80
MOV RSI,qword ptr [RBP + -0x20]
LEA RDX,[0x25f890]
MOV ECX,0x3ee
CALL 0x001e80a0
JMP 0x001e7e5e
LAB_001e7e91:
JMP 0x001e7e93
LAB_001e7e93:
JMP 0x001e7e95
LAB_001e7e95:
JMP 0x001e7e97
LAB_001e7e97:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e803a
LAB_001e7ea3:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0xd8],0x0
JNZ 0x001e7ec4
JMP 0x001e7eb2
LAB_001e7eb2:
JMP 0x001e7eb4
LAB_001e7eb4:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x80
CALL 0x001e6840
LAB_001e7ec4:
JMP 0x001e7ec6
LAB_001e7ec6:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001e7eea
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x21],AL
JNC 0x001e7efc
LAB_001e7eea:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xc0],0x0
SETNZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_001e7efc:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x001e7f05
JMP 0x001e7f28
LAB_001e7f05:
JMP 0x001e7f07
LAB_001e7f07:
JMP 0x001e7f09
LAB_001e7f09:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x48
MOV RSI,qword ptr [RBP + -0x20]
LEA RDX,[0x25f890]
MOV ECX,0x406
CALL 0x001e80a0
JMP 0x001e7ec6
LAB_001e7f28:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001e7f47
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001e7f6f
LAB_001e7f47:
JMP 0x001e7f49
LAB_001e7f49:
JMP 0x001e7f4b
LAB_001e7f4b:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0xc8]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0xd0],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0xe0],0x0
LAB_001e7f6f:
JMP 0x001e8026
LAB_001e7f74:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0xd8],0x0
JNZ 0x001e7f93
JMP 0x001e7f83
LAB_001e7f83:
JMP 0x001e7f85
LAB_001e7f85:
JMP 0x001e7f87
LAB_001e7f87:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e803a
LAB_001e7f93:
JMP 0x001e7f95
LAB_001e7f95:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001e7fb9
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x22],AL
JNC 0x001e7fca
LAB_001e7fb9:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0xd8],0x0
SETNZ AL
MOV byte ptr [RBP + -0x22],AL
LAB_001e7fca:
MOV AL,byte ptr [RBP + -0x22]
TEST AL,0x1
JNZ 0x001e7fd3
JMP 0x001e7ff6
LAB_001e7fd3:
JMP 0x001e7fd5
LAB_001e7fd5:
JMP 0x001e7fd7
LAB_001e7fd7:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x48
MOV RSI,qword ptr [RBP + -0x20]
LEA RDX,[0x25f890]
MOV ECX,0x430
CALL 0x001e80a0
JMP 0x001e7f95
LAB_001e7ff6:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001e8015
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001e8024
LAB_001e8015:
JMP 0x001e8017
LAB_001e8017:
JMP 0x001e8019
LAB_001e8019:
JMP 0x001e801b
LAB_001e801b:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e803a
LAB_001e8024:
JMP 0x001e8026
LAB_001e8026:
JMP 0x001e8028
LAB_001e8028:
JMP 0x001e802a
LAB_001e802a:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001e6900
MOV dword ptr [RBP + -0x4],0x0
LAB_001e803a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 lock_io_cache(long param_1,ulong param_2)
{
long lVar1;
bool bVar2;
lVar1 = *(long *)(param_1 + 0x98);
inline_mysql_mutex_lock(lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3dd)
;
*(int *)(lVar1 + 0xd8) = *(int *)(lVar1 + 0xd8) + -1;
if (*(long *)(lVar1 + 0xc0) == 0) {
if (*(int *)(lVar1 + 0xd8) == 0) {
return 1;
}
while( true ) {
if ((*(long *)(lVar1 + 0xd0) == 0) || (bVar2 = false, *(ulong *)(lVar1 + 0xb8) < param_2)) {
bVar2 = *(int *)(lVar1 + 0xd8) != 0;
}
if (!bVar2) break;
inline_mysql_cond_wait
(lVar1 + 0x48,lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x430);
}
if ((*(long *)(lVar1 + 0xd0) == 0) || (*(ulong *)(lVar1 + 0xb8) < param_2)) {
return 1;
}
}
else {
if (param_1 == *(long *)(lVar1 + 0xc0)) {
while (*(int *)(lVar1 + 0xd8) != 0) {
inline_mysql_cond_wait
(lVar1 + 0x80,lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x3ee);
}
return 1;
}
if (*(int *)(lVar1 + 0xd8) == 0) {
inline_mysql_cond_signal(lVar1 + 0x80);
}
while( true ) {
if ((*(long *)(lVar1 + 0xd0) == 0) || (bVar2 = false, *(ulong *)(lVar1 + 0xb8) < param_2)) {
bVar2 = *(long *)(lVar1 + 0xc0) != 0;
}
if (!bVar2) break;
inline_mysql_cond_wait
(lVar1 + 0x48,lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x406);
}
if ((*(long *)(lVar1 + 0xd0) == 0) || (*(ulong *)(lVar1 + 0xb8) < param_2)) {
*(int8 *)(lVar1 + 0xd0) = *(int8 *)(lVar1 + 200);
*(int4 *)(lVar1 + 0xe0) = 0;
}
}
inline_mysql_mutex_unlock(lVar1);
return 0;
}
| |
33,025 | output_digits | bluesky950520[P]quickjs/libbf.c | static void output_digits(DynBuf *s, const bf_t *a1, int radix, limb_t n_digits,
limb_t dot_pos, BOOL is_dec)
{
limb_t i, v, l;
slimb_t pos, pos_incr;
int digits_per_limb, buf_pos, radix_bits, first_buf_pos;
char buf[65];
bf_t a_s, *a;
if (is_dec) {
digits_per_limb = LIMB_DIGITS;
a = (bf_t *)a1;
radix_bits = 0;
pos = a->len;
pos_incr = 1;
first_buf_pos = 0;
} else if ((radix & (radix - 1)) == 0) {
a = (bf_t *)a1;
radix_bits = ceil_log2(radix);
digits_per_limb = LIMB_BITS / radix_bits;
pos_incr = digits_per_limb * radix_bits;
/* digits are aligned relative to the radix point */
pos = a->len * LIMB_BITS + smod(-a->expn, radix_bits);
first_buf_pos = 0;
} else {
limb_t n, radixl;
digits_per_limb = digits_per_limb_table[radix - 2];
radixl = get_limb_radix(radix);
a = &a_s;
bf_init(a1->ctx, a);
n = (n_digits + digits_per_limb - 1) / digits_per_limb;
if (bf_resize(a, n)) {
dbuf_set_error(s);
goto done;
}
if (bf_integer_to_radix(a, a1, radixl)) {
dbuf_set_error(s);
goto done;
}
radix_bits = 0;
pos = n;
pos_incr = 1;
first_buf_pos = pos * digits_per_limb - n_digits;
}
buf_pos = digits_per_limb;
i = 0;
while (i < n_digits) {
if (buf_pos == digits_per_limb) {
pos -= pos_incr;
if (radix_bits == 0) {
v = get_limbz(a, pos);
limb_to_a(buf, v, radix, digits_per_limb);
} else {
v = get_bits(a->tab, a->len, pos);
limb_to_a2(buf, v, radix_bits, digits_per_limb);
}
buf_pos = first_buf_pos;
first_buf_pos = 0;
}
if (i < dot_pos) {
l = dot_pos;
} else {
if (i == dot_pos)
dbuf_putc(s, '.');
l = n_digits;
}
l = bf_min(digits_per_limb - buf_pos, l - i);
dbuf_put(s, (uint8_t *)(buf + buf_pos), l);
buf_pos += l;
i += l;
}
done:
if (a != a1)
bf_delete(a);
} | O0 | c | output_digits:
subq $0x108, %rsp # imm = 0x108
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movl %edx, 0xf4(%rsp)
movq %rcx, 0xe8(%rsp)
movq %r8, 0xe0(%rsp)
movl %r9d, 0xdc(%rsp)
cmpl $0x0, 0xdc(%rsp)
je 0xf7900
movl $0x13, 0xac(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0xa4(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xb8(%rsp)
movq $0x1, 0xb0(%rsp)
movl $0x0, 0xa0(%rsp)
jmp 0xf7ace
movl 0xf4(%rsp), %eax
movl 0xf4(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xf79b9
movq 0xf8(%rsp), %rax
movq %rax, 0x20(%rsp)
movslq 0xf4(%rsp), %rdi
callq 0xebad0
movl %eax, 0xa4(%rsp)
movl $0x40, %eax
cltd
idivl 0xa4(%rsp)
movl %eax, 0xac(%rsp)
movl 0xac(%rsp), %eax
imull 0xa4(%rsp), %eax
cltq
movq %rax, 0xb0(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
shlq $0x6, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edi
subq 0x10(%rax), %rdi
movslq 0xa4(%rsp), %rsi
callq 0xf8070
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0xb8(%rsp)
movl $0x0, 0xa0(%rsp)
jmp 0xf7acc
movl 0xf4(%rsp), %eax
subl $0x2, %eax
movslq %eax, %rcx
leaq 0x1a5a3(%rip), %rax # 0x111f70
movzbl (%rax,%rcx), %eax
movl %eax, 0xac(%rsp)
movl 0xf4(%rsp), %edi
callq 0xf7530
movq %rax, 0x10(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xf8(%rsp), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0xe5f70
movq 0xe8(%rsp), %rax
movslq 0xac(%rsp), %rcx
addq %rcx, %rax
subq $0x1, %rax
movslq 0xac(%rsp), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xe5fd0
cmpl $0x0, %eax
je 0xf7a57
movq 0x100(%rsp), %rdi
callq 0xf80c0
jmp 0xf7cb7
movq 0x20(%rsp), %rdi
movq 0xf8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xf80e0
cmpl $0x0, %eax
je 0xf7a85
movq 0x100(%rsp), %rdi
callq 0xf80c0
jmp 0xf7cb7
movl $0x0, 0xa4(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq $0x1, 0xb0(%rsp)
movq 0xb8(%rsp), %rax
movslq 0xac(%rsp), %rcx
imulq %rcx, %rax
subq 0xe8(%rsp), %rax
movl %eax, 0xa0(%rsp)
jmp 0xf7ace
movl 0xac(%rsp), %eax
movl %eax, 0xa8(%rsp)
movq $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
cmpq 0xe8(%rsp), %rax
jae 0xf7cb5
movl 0xa8(%rsp), %eax
cmpl 0xac(%rsp), %eax
jne 0xf7bd3
movq 0xb0(%rsp), %rcx
movq 0xb8(%rsp), %rax
subq %rcx, %rax
movq %rax, 0xb8(%rsp)
cmpl $0x0, 0xa4(%rsp)
jne 0xf7b73
movq 0x20(%rsp), %rdi
movq 0xb8(%rsp), %rsi
callq 0xe70a0
movq %rax, 0xc8(%rsp)
leaq 0x50(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movl 0xf4(%rsp), %edx
movl 0xac(%rsp), %ecx
callq 0xf8270
jmp 0xf7bba
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0xb8(%rsp), %rdx
callq 0xeb310
movq %rax, 0xc8(%rsp)
leaq 0x50(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movl 0xa4(%rsp), %edx
movl 0xac(%rsp), %ecx
callq 0xf8370
movl 0xa0(%rsp), %eax
movl %eax, 0xa8(%rsp)
movl $0x0, 0xa0(%rsp)
movq 0xd0(%rsp), %rax
cmpq 0xe0(%rsp), %rax
jae 0xf7bf7
movq 0xe0(%rsp), %rax
movq %rax, 0xc0(%rsp)
jmp 0xf7c2b
movq 0xd0(%rsp), %rax
cmpq 0xe0(%rsp), %rax
jne 0xf7c1b
movq 0x100(%rsp), %rdi
movl $0x2e, %esi
callq 0x1e6d0
movq 0xe8(%rsp), %rax
movq %rax, 0xc0(%rsp)
movl 0xac(%rsp), %eax
subl 0xa8(%rsp), %eax
movslq %eax, %rdi
movq 0xc0(%rsp), %rsi
subq 0xd0(%rsp), %rsi
callq 0xe7680
movq %rax, 0xc0(%rsp)
movq 0x100(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movslq 0xa8(%rsp), %rax
addq %rax, %rsi
movq 0xc0(%rsp), %rdx
callq 0x1e550
movq 0xc0(%rsp), %rcx
movslq 0xa8(%rsp), %rax
addq %rcx, %rax
movl %eax, 0xa8(%rsp)
movq 0xc0(%rsp), %rax
addq 0xd0(%rsp), %rax
movq %rax, 0xd0(%rsp)
jmp 0xf7ae8
jmp 0xf7cb7
movq 0x20(%rsp), %rax
cmpq 0xf8(%rsp), %rax
je 0xf7cd0
movq 0x20(%rsp), %rdi
callq 0xe93d0
addq $0x108, %rsp # imm = 0x108
retq
nopl (%rax,%rax)
| output_digits:
sub rsp, 108h
mov [rsp+108h+var_8], rdi
mov [rsp+108h+var_10], rsi
mov [rsp+108h+var_14], edx
mov [rsp+108h+var_20], rcx
mov [rsp+108h+var_28], r8
mov [rsp+108h+var_2C], r9d
cmp [rsp+108h+var_2C], 0
jz short loc_F7900
mov [rsp+108h+var_5C], 13h
mov rax, [rsp+108h+var_10]
mov [rsp+108h+var_E8], rax
mov [rsp+108h+var_64], 0
mov rax, [rsp+108h+var_E8]
mov rax, [rax+18h]
mov [rsp+108h+var_50], rax
mov [rsp+108h+var_58], 1
mov [rsp+108h+var_68], 0
jmp loc_F7ACE
loc_F7900:
mov eax, [rsp+108h+var_14]
mov ecx, [rsp+108h+var_14]
sub ecx, 1
and eax, ecx
cmp eax, 0
jnz loc_F79B9
mov rax, [rsp+108h+var_10]
mov [rsp+108h+var_E8], rax
movsxd rdi, [rsp+108h+var_14]
call ceil_log2
mov [rsp+108h+var_64], eax
mov eax, 40h ; '@'
cdq
idiv [rsp+108h+var_64]
mov [rsp+108h+var_5C], eax
mov eax, [rsp+108h+var_5C]
imul eax, [rsp+108h+var_64]
cdqe
mov [rsp+108h+var_58], rax
mov rax, [rsp+108h+var_E8]
mov rax, [rax+18h]
shl rax, 6
mov [rsp+108h+var_100], rax
mov rax, [rsp+108h+var_E8]
xor ecx, ecx
mov edi, ecx
sub rdi, [rax+10h]
movsxd rsi, [rsp+108h+var_64]
call smod
mov rcx, rax
mov rax, [rsp+108h+var_100]
add rax, rcx
mov [rsp+108h+var_50], rax
mov [rsp+108h+var_68], 0
jmp loc_F7ACC
loc_F79B9:
mov eax, [rsp+108h+var_14]
sub eax, 2
movsxd rcx, eax
lea rax, digits_per_limb_table
movzx eax, byte ptr [rax+rcx]
mov [rsp+108h+var_5C], eax
mov edi, [rsp+108h+var_14]
call get_limb_radix
mov [rsp+108h+var_F8], rax
lea rax, [rsp+108h+var_E0]
mov [rsp+108h+var_E8], rax
mov rax, [rsp+108h+var_10]
mov rdi, [rax]
mov rsi, [rsp+108h+var_E8]
call bf_init
mov rax, [rsp+108h+var_20]
movsxd rcx, [rsp+108h+var_5C]
add rax, rcx
sub rax, 1
movsxd rcx, [rsp+108h+var_5C]
xor edx, edx
div rcx
mov [rsp+108h+var_F0], rax
mov rdi, [rsp+108h+var_E8]
mov rsi, [rsp+108h+var_F0]
call bf_resize
cmp eax, 0
jz short loc_F7A57
mov rdi, [rsp+108h+var_8]
call dbuf_set_error
jmp loc_F7CB7
loc_F7A57:
mov rdi, [rsp+108h+var_E8]
mov rsi, [rsp+108h+var_10]
mov rdx, [rsp+108h+var_F8]
call bf_integer_to_radix
cmp eax, 0
jz short loc_F7A85
mov rdi, [rsp+108h+var_8]
call dbuf_set_error
jmp loc_F7CB7
loc_F7A85:
mov [rsp+108h+var_64], 0
mov rax, [rsp+108h+var_F0]
mov [rsp+108h+var_50], rax
mov [rsp+108h+var_58], 1
mov rax, [rsp+108h+var_50]
movsxd rcx, [rsp+108h+var_5C]
imul rax, rcx
sub rax, [rsp+108h+var_20]
mov [rsp+108h+var_68], eax
loc_F7ACC:
jmp short $+2
loc_F7ACE:
mov eax, [rsp+108h+var_5C]
mov [rsp+108h+var_60], eax
mov [rsp+108h+var_38], 0
loc_F7AE8:
mov rax, [rsp+108h+var_38]
cmp rax, [rsp+108h+var_20]
jnb loc_F7CB5
mov eax, [rsp+108h+var_60]
cmp eax, [rsp+108h+var_5C]
jnz loc_F7BD3
mov rcx, [rsp+108h+var_58]
mov rax, [rsp+108h+var_50]
sub rax, rcx
mov [rsp+108h+var_50], rax
cmp [rsp+108h+var_64], 0
jnz short loc_F7B73
mov rdi, [rsp+108h+var_E8]
mov rsi, [rsp+108h+var_50]
call get_limbz
mov [rsp+108h+var_40], rax
lea rdi, [rsp+108h+var_B8]
mov rsi, [rsp+108h+var_40]
mov edx, [rsp+108h+var_14]
mov ecx, [rsp+108h+var_5C]
call limb_to_a
jmp short loc_F7BBA
loc_F7B73:
mov rax, [rsp+108h+var_E8]
mov rdi, [rax+20h]
mov rax, [rsp+108h+var_E8]
mov rsi, [rax+18h]
mov rdx, [rsp+108h+var_50]
call get_bits
mov [rsp+108h+var_40], rax
lea rdi, [rsp+108h+var_B8]
mov rsi, [rsp+108h+var_40]
mov edx, [rsp+108h+var_64]
mov ecx, [rsp+108h+var_5C]
call limb_to_a2
loc_F7BBA:
mov eax, [rsp+108h+var_68]
mov [rsp+108h+var_60], eax
mov [rsp+108h+var_68], 0
loc_F7BD3:
mov rax, [rsp+108h+var_38]
cmp rax, [rsp+108h+var_28]
jnb short loc_F7BF7
mov rax, [rsp+108h+var_28]
mov [rsp+108h+var_48], rax
jmp short loc_F7C2B
loc_F7BF7:
mov rax, [rsp+108h+var_38]
cmp rax, [rsp+108h+var_28]
jnz short loc_F7C1B
mov rdi, [rsp+108h+var_8]
mov esi, 2Eh ; '.'
call dbuf_putc
loc_F7C1B:
mov rax, [rsp+108h+var_20]
mov [rsp+108h+var_48], rax
loc_F7C2B:
mov eax, [rsp+108h+var_5C]
sub eax, [rsp+108h+var_60]
movsxd rdi, eax
mov rsi, [rsp+108h+var_48]
sub rsi, [rsp+108h+var_38]
call bf_min
mov [rsp+108h+var_48], rax
mov rdi, [rsp+108h+var_8]
lea rsi, [rsp+108h+var_B8]
movsxd rax, [rsp+108h+var_60]
add rsi, rax
mov rdx, [rsp+108h+var_48]
call dbuf_put
mov rcx, [rsp+108h+var_48]
movsxd rax, [rsp+108h+var_60]
add rax, rcx
mov [rsp+108h+var_60], eax
mov rax, [rsp+108h+var_48]
add rax, [rsp+108h+var_38]
mov [rsp+108h+var_38], rax
jmp loc_F7AE8
loc_F7CB5:
jmp short $+2
loc_F7CB7:
mov rax, [rsp+108h+var_E8]
cmp rax, [rsp+108h+var_10]
jz short loc_F7CD0
mov rdi, [rsp+108h+var_E8]
call bf_delete_0
loc_F7CD0:
add rsp, 108h
retn
| long long output_digits(_QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long result; // rax
long long v7; // [rsp+8h] [rbp-100h]
long long limb_radix; // [rsp+10h] [rbp-F8h]
unsigned long long v9; // [rsp+18h] [rbp-F0h]
long long *v10; // [rsp+20h] [rbp-E8h]
_QWORD v11[5]; // [rsp+28h] [rbp-E0h] BYREF
_BYTE v12[80]; // [rsp+50h] [rbp-B8h] BYREF
int v13; // [rsp+A0h] [rbp-68h]
signed int v14; // [rsp+A4h] [rbp-64h]
int v15; // [rsp+A8h] [rbp-60h]
int v16; // [rsp+ACh] [rbp-5Ch]
long long v17; // [rsp+B0h] [rbp-58h]
unsigned long long v18; // [rsp+B8h] [rbp-50h]
long long v19; // [rsp+C0h] [rbp-48h]
unsigned long long bits; // [rsp+C8h] [rbp-40h]
unsigned long long i; // [rsp+D0h] [rbp-38h]
int v22; // [rsp+DCh] [rbp-2Ch]
unsigned long long v23; // [rsp+E0h] [rbp-28h]
unsigned long long v24; // [rsp+E8h] [rbp-20h]
unsigned int v25; // [rsp+F4h] [rbp-14h]
long long *v26; // [rsp+F8h] [rbp-10h]
_QWORD *v27; // [rsp+100h] [rbp-8h]
v27 = a1;
v26 = (long long *)a2;
v25 = a3;
v24 = a4;
v23 = a5;
v22 = a6;
if ( (_DWORD)a6 )
{
v16 = 19;
v10 = v26;
v14 = 0;
v18 = v26[3];
v17 = 1LL;
v13 = 0;
}
else if ( ((v25 - 1) & v25) != 0 )
{
v16 = digits_per_limb_table[v25 - 2];
limb_radix = get_limb_radix(v25);
v10 = v11;
bf_init(*v26, (long long)v11);
v9 = (v16 + v24 - 1) / v16;
a2 = v9;
if ( (unsigned int)bf_resize(v11, v9)
|| (a2 = (long long)v26, (unsigned int)bf_integer_to_radix(v11, v26, limb_radix)) )
{
dbuf_set_error(v27);
goto LABEL_22;
}
v14 = 0;
v18 = v9;
v17 = 1LL;
a4 = v16;
v13 = v16 * v9 - v24;
}
else
{
v10 = v26;
v14 = ceil_log2((int)v25);
v16 = 64 / v14;
v17 = v14 * (64 / v14);
v7 = v26[3] << 6;
a2 = v14;
a4 = smod(-v26[2], v14);
v18 = a4 + v7;
v13 = 0;
}
v15 = v16;
for ( i = 0LL; i < v24; i += v19 )
{
if ( v15 == v16 )
{
v18 -= v17;
if ( v14 )
{
bits = get_bits(v10[4], v10[3], v18);
limb_to_a2(v12, bits, (unsigned int)v14, (unsigned int)v16);
}
else
{
bits = get_limbz((long long)v10, v18);
limb_to_a(v12, bits, v25, (unsigned int)v16);
}
v15 = v13;
v13 = 0;
}
if ( i >= v23 )
{
if ( i == v23 )
dbuf_putc(v27, 46);
v19 = v24;
}
else
{
v19 = v23;
}
v19 = bf_min(v16 - v15, v19 - i);
a2 = (long long)&v12[v15];
dbuf_put(v27, a2, v19);
a4 = v19;
v15 += v19;
}
LABEL_22:
result = (long long)v10;
if ( v10 != v26 )
return bf_delete_0(v10, a2, a3, a4, a5, a6);
return result;
}
| output_digits:
SUB RSP,0x108
MOV qword ptr [RSP + 0x100],RDI
MOV qword ptr [RSP + 0xf8],RSI
MOV dword ptr [RSP + 0xf4],EDX
MOV qword ptr [RSP + 0xe8],RCX
MOV qword ptr [RSP + 0xe0],R8
MOV dword ptr [RSP + 0xdc],R9D
CMP dword ptr [RSP + 0xdc],0x0
JZ 0x001f7900
MOV dword ptr [RSP + 0xac],0x13
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0xa4],0x0
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xb8],RAX
MOV qword ptr [RSP + 0xb0],0x1
MOV dword ptr [RSP + 0xa0],0x0
JMP 0x001f7ace
LAB_001f7900:
MOV EAX,dword ptr [RSP + 0xf4]
MOV ECX,dword ptr [RSP + 0xf4]
SUB ECX,0x1
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001f79b9
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x20],RAX
MOVSXD RDI,dword ptr [RSP + 0xf4]
CALL 0x001ebad0
MOV dword ptr [RSP + 0xa4],EAX
MOV EAX,0x40
CDQ
IDIV dword ptr [RSP + 0xa4]
MOV dword ptr [RSP + 0xac],EAX
MOV EAX,dword ptr [RSP + 0xac]
IMUL EAX,dword ptr [RSP + 0xa4]
CDQE
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x18]
SHL RAX,0x6
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x20]
XOR ECX,ECX
MOV EDI,ECX
SUB RDI,qword ptr [RAX + 0x10]
MOVSXD RSI,dword ptr [RSP + 0xa4]
CALL 0x001f8070
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,RCX
MOV qword ptr [RSP + 0xb8],RAX
MOV dword ptr [RSP + 0xa0],0x0
JMP 0x001f7acc
LAB_001f79b9:
MOV EAX,dword ptr [RSP + 0xf4]
SUB EAX,0x2
MOVSXD RCX,EAX
LEA RAX,[0x211f70]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0xac],EAX
MOV EDI,dword ptr [RSP + 0xf4]
CALL 0x001f7530
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[RSP + 0x28]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0xf8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001e5f70
MOV RAX,qword ptr [RSP + 0xe8]
MOVSXD RCX,dword ptr [RSP + 0xac]
ADD RAX,RCX
SUB RAX,0x1
MOVSXD RCX,dword ptr [RSP + 0xac]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001e5fd0
CMP EAX,0x0
JZ 0x001f7a57
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x001f80c0
JMP 0x001f7cb7
LAB_001f7a57:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0xf8]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x001f80e0
CMP EAX,0x0
JZ 0x001f7a85
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x001f80c0
JMP 0x001f7cb7
LAB_001f7a85:
MOV dword ptr [RSP + 0xa4],0x0
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0xb8],RAX
MOV qword ptr [RSP + 0xb0],0x1
MOV RAX,qword ptr [RSP + 0xb8]
MOVSXD RCX,dword ptr [RSP + 0xac]
IMUL RAX,RCX
SUB RAX,qword ptr [RSP + 0xe8]
MOV dword ptr [RSP + 0xa0],EAX
LAB_001f7acc:
JMP 0x001f7ace
LAB_001f7ace:
MOV EAX,dword ptr [RSP + 0xac]
MOV dword ptr [RSP + 0xa8],EAX
MOV qword ptr [RSP + 0xd0],0x0
LAB_001f7ae8:
MOV RAX,qword ptr [RSP + 0xd0]
CMP RAX,qword ptr [RSP + 0xe8]
JNC 0x001f7cb5
MOV EAX,dword ptr [RSP + 0xa8]
CMP EAX,dword ptr [RSP + 0xac]
JNZ 0x001f7bd3
MOV RCX,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RSP + 0xb8]
SUB RAX,RCX
MOV qword ptr [RSP + 0xb8],RAX
CMP dword ptr [RSP + 0xa4],0x0
JNZ 0x001f7b73
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0xb8]
CALL 0x001e70a0
MOV qword ptr [RSP + 0xc8],RAX
LEA RDI,[RSP + 0x50]
MOV RSI,qword ptr [RSP + 0xc8]
MOV EDX,dword ptr [RSP + 0xf4]
MOV ECX,dword ptr [RSP + 0xac]
CALL 0x001f8270
JMP 0x001f7bba
LAB_001f7b73:
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RSP + 0xb8]
CALL 0x001eb310
MOV qword ptr [RSP + 0xc8],RAX
LEA RDI,[RSP + 0x50]
MOV RSI,qword ptr [RSP + 0xc8]
MOV EDX,dword ptr [RSP + 0xa4]
MOV ECX,dword ptr [RSP + 0xac]
CALL 0x001f8370
LAB_001f7bba:
MOV EAX,dword ptr [RSP + 0xa0]
MOV dword ptr [RSP + 0xa8],EAX
MOV dword ptr [RSP + 0xa0],0x0
LAB_001f7bd3:
MOV RAX,qword ptr [RSP + 0xd0]
CMP RAX,qword ptr [RSP + 0xe0]
JNC 0x001f7bf7
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0xc0],RAX
JMP 0x001f7c2b
LAB_001f7bf7:
MOV RAX,qword ptr [RSP + 0xd0]
CMP RAX,qword ptr [RSP + 0xe0]
JNZ 0x001f7c1b
MOV RDI,qword ptr [RSP + 0x100]
MOV ESI,0x2e
CALL 0x0011e6d0
LAB_001f7c1b:
MOV RAX,qword ptr [RSP + 0xe8]
MOV qword ptr [RSP + 0xc0],RAX
LAB_001f7c2b:
MOV EAX,dword ptr [RSP + 0xac]
SUB EAX,dword ptr [RSP + 0xa8]
MOVSXD RDI,EAX
MOV RSI,qword ptr [RSP + 0xc0]
SUB RSI,qword ptr [RSP + 0xd0]
CALL 0x001e7680
MOV qword ptr [RSP + 0xc0],RAX
MOV RDI,qword ptr [RSP + 0x100]
LEA RSI,[RSP + 0x50]
MOVSXD RAX,dword ptr [RSP + 0xa8]
ADD RSI,RAX
MOV RDX,qword ptr [RSP + 0xc0]
CALL 0x0011e550
MOV RCX,qword ptr [RSP + 0xc0]
MOVSXD RAX,dword ptr [RSP + 0xa8]
ADD RAX,RCX
MOV dword ptr [RSP + 0xa8],EAX
MOV RAX,qword ptr [RSP + 0xc0]
ADD RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0xd0],RAX
JMP 0x001f7ae8
LAB_001f7cb5:
JMP 0x001f7cb7
LAB_001f7cb7:
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0xf8]
JZ 0x001f7cd0
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001e93d0
LAB_001f7cd0:
ADD RSP,0x108
RET
|
void output_digits(int8 param_1,int8 *param_2,uint param_3,ulong param_4,ulong param_5,
int param_6)
{
long lVar1;
int iVar2;
long lVar3;
int8 uVar4;
ulong uVar5;
ulong uVar6;
int8 *local_e8;
int8 local_e0 [5];
int1 local_b8 [80];
uint local_68;
int local_64;
uint local_60;
uint local_5c;
long local_58;
ulong local_50;
ulong local_48;
int8 local_40;
ulong local_38;
int local_2c;
ulong local_28;
ulong local_20;
uint local_14;
int8 *local_10;
int8 local_8;
local_e8 = param_2;
local_2c = param_6;
local_28 = param_5;
local_20 = param_4;
local_14 = param_3;
local_10 = param_2;
local_8 = param_1;
if (param_6 == 0) {
if ((param_3 & param_3 - 1) == 0) {
local_64 = ceil_log2((long)(int)param_3);
local_5c = (uint)(0x40 / (long)local_64);
local_58 = (long)(int)(local_5c * local_64);
lVar1 = param_2[3];
lVar3 = smod(-param_2[2],(long)local_64,0x40 % (long)local_64 & 0xffffffff);
local_68 = 0;
local_50 = lVar1 * 0x40 + lVar3;
}
else {
local_5c = (uint)(byte)digits_per_limb_table[(int)(param_3 - 2)];
uVar4 = get_limb_radix(param_3);
local_e8 = local_e0;
bf_init(*local_10,local_e8);
uVar5 = (local_20 + (long)(int)local_5c) - 1;
uVar6 = uVar5 / (ulong)(long)(int)local_5c;
iVar2 = bf_resize(local_e8,uVar6,uVar5 % (ulong)(long)(int)local_5c);
if (iVar2 != 0) {
dbuf_set_error(local_8);
goto LAB_001f7cb7;
}
iVar2 = bf_integer_to_radix(local_e8,local_10,uVar4);
if (iVar2 != 0) {
dbuf_set_error(local_8);
goto LAB_001f7cb7;
}
local_64 = 0;
local_58 = 1;
local_68 = (int)uVar6 * local_5c - (int)local_20;
local_50 = uVar6;
}
}
else {
local_5c = 0x13;
local_64 = 0;
local_58 = 1;
local_68 = 0;
local_50 = param_2[3];
}
local_60 = local_5c;
for (local_38 = 0; local_38 < local_20; local_38 = local_48 + local_38) {
if (local_60 == local_5c) {
local_50 = local_50 - local_58;
if (local_64 == 0) {
local_40 = get_limbz(local_e8,local_50);
limb_to_a(local_b8,local_40,local_14,local_5c);
}
else {
local_40 = get_bits(local_e8[4],local_e8[3],local_50);
limb_to_a2(local_b8,local_40,local_64,local_5c);
}
local_60 = local_68;
local_68 = 0;
}
if (local_38 < local_28) {
local_48 = local_28;
}
else {
if (local_38 == local_28) {
dbuf_putc(local_8,0x2e);
}
local_48 = local_20;
}
local_48 = bf_min((long)(int)(local_5c - local_60),local_48 - local_38);
dbuf_put(local_8,local_b8 + (int)local_60,local_48);
local_60 = local_60 + (int)local_48;
}
LAB_001f7cb7:
if (local_e8 != local_10) {
bf_delete(local_e8);
}
return;
}
| |
33,026 | js_regexp_toString | bluesky950520[P]quickjs/quickjs.c | static JSValue js_regexp_toString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue pattern, flags;
StringBuffer b_s, *b = &b_s;
if (!JS_IsObject(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
string_buffer_init(ctx, b, 0);
string_buffer_putc8(b, '/');
pattern = JS_GetProperty(ctx, this_val, JS_ATOM_source);
if (string_buffer_concat_value_free(b, pattern))
goto fail;
string_buffer_putc8(b, '/');
flags = JS_GetProperty(ctx, this_val, JS_ATOM_flags);
if (string_buffer_concat_value_free(b, flags))
goto fail;
return string_buffer_end(b);
fail:
string_buffer_free(b);
return JS_EXCEPTION;
} | O1 | c | js_regexp_toString:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
cmpl $-0x1, %ebx
jne 0x490ba
movq %rsi, %r15
movq %r14, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x20b73
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x49101
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl $0x2f, %esi
callq 0x4b861
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x6d, %ecx
movq %r15, %r8
movq %rbx, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %r12, %rdi
movq %rax, %rsi
callq 0x4b8b6
testl %eax, %eax
jne 0x49099
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl $0x2f, %esi
callq 0x4b861
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x6e, %ecx
movq %r15, %r8
movq %rbx, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %r12, %rdi
movq %rax, %rsi
callq 0x4b8b6
testl %eax, %eax
je 0x490e6
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1cb99
movq $0x0, 0x10(%rsp)
movl $0x6, %edx
xorl %ebx, %ebx
jmp 0x490d2
leaq 0x55f64(%rip), %rsi # 0x9f025
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %edx
xorl %ecx, %ecx
orq %rcx, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %rdi
callq 0x33444
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %ebx
jmp 0x490d4
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x49015
| js_regexp_toString:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rdi
cmp ebx, 0FFFFFFFFh
jnz loc_490BA
mov r15, rsi
mov [rsp+48h+var_40], r14
xorps xmm0, xmm0
movups [rsp+48h+var_30], xmm0
mov rdi, r14
xor esi, esi
xor edx, edx
call js_alloc_string
mov [rsp+48h+var_38], rax
test rax, rax
jz loc_49101
loc_49015:
lea r12, [rsp+48h+var_40]
mov rdi, r12
mov esi, 2Fh ; '/'
call string_buffer_putc8
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov ecx, 6Dh ; 'm'
mov r8, r15
mov r9, rbx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rdi, r12
mov rsi, rax
call string_buffer_concat_value_free
test eax, eax
jnz short loc_49099
lea r12, [rsp+48h+var_40]
mov rdi, r12
mov esi, 2Fh ; '/'
call string_buffer_putc8
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov ecx, 6Eh ; 'n'
mov r8, r15
mov r9, rbx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rdi, r12
mov rsi, rax
call string_buffer_concat_value_free
test eax, eax
jz short loc_490E6
loc_49099:
mov rdi, [rsp+48h+var_40]
mov rsi, [rsp+48h+var_38]
call js_free
mov [rsp+48h+var_38], 0
mov edx, 6
xor ebx, ebx
jmp short loc_490D2
loc_490BA:
lea rsi, aOperandPrototy+20h; "not an object"
xor ebx, ebx
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
loc_490D2:
xor ecx, ecx
loc_490D4:
or rbx, rcx
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
loc_490E6:
lea rdi, [rsp+48h+var_40]
call string_buffer_end
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov ebx, eax
jmp short loc_490D4
loc_49101:
mov dword ptr [rsp+48h+var_30+4], 0
mov dword ptr [rsp+48h+var_30+0Ch], 0FFFFFFFFh
jmp loc_49015
| unsigned long long js_regexp_toString(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned long long PropertyInternal2; // rax
long long v16; // rdx
unsigned long long v17; // rax
long long v18; // rdx
long long v19; // rbx
unsigned long long v20; // rcx
unsigned long long v22; // rax
char v23; // [rsp+0h] [rbp-48h]
long long v24; // [rsp+8h] [rbp-40h] BYREF
long long v25; // [rsp+10h] [rbp-38h]
__int128 v26; // [rsp+18h] [rbp-30h]
if ( (_DWORD)a3 == -1 )
{
v24 = a1;
v26 = 0LL;
v25 = js_alloc_string(a1, 0LL, 0);
if ( !v25 )
{
DWORD1(v26) = 0;
HIDWORD(v26) = -1;
}
string_buffer_putc8(&v24, 47LL);
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x6Du, a2, a3, 0LL, 0);
if ( !(unsigned int)string_buffer_concat_value_free(&v24, PropertyInternal2, v16) )
{
string_buffer_putc8(&v24, 47LL);
v17 = JS_GetPropertyInternal2(a1, a2, a3, 0x6Eu, a2, a3, 0LL, 0);
if ( !(unsigned int)string_buffer_concat_value_free(&v24, v17, v18) )
{
v22 = (unsigned long long)string_buffer_end((long long)&v24);
v20 = v22 & 0xFFFFFFFF00000000LL;
v19 = (unsigned int)v22;
return v20 | v19;
}
}
js_free(v24, v25);
v25 = 0LL;
v19 = 0LL;
}
else
{
v19 = 0LL;
JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v23);
}
v20 = 0LL;
return v20 | v19;
}
| |||
33,027 | js_regexp_toString | bluesky950520[P]quickjs/quickjs.c | static JSValue js_regexp_toString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue pattern, flags;
StringBuffer b_s, *b = &b_s;
if (!JS_IsObject(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
string_buffer_init(ctx, b, 0);
string_buffer_putc8(b, '/');
pattern = JS_GetProperty(ctx, this_val, JS_ATOM_source);
if (string_buffer_concat_value_free(b, pattern))
goto fail;
string_buffer_putc8(b, '/');
flags = JS_GetProperty(ctx, this_val, JS_ATOM_flags);
if (string_buffer_concat_value_free(b, flags))
goto fail;
return string_buffer_end(b);
fail:
string_buffer_free(b);
return JS_EXCEPTION;
} | O2 | c | js_regexp_toString:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
cmpl $-0x1, %ebx
jne 0x3f04c
movq %rsi, %r15
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x2e042
pushq $0x2f
popq %rsi
movq %r12, %rdi
callq 0x41425
pushq $0x6d
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1b043
movq %r12, %rdi
movq %rax, %rsi
callq 0x41476
testl %eax, %eax
jne 0x3f040
leaq 0x8(%rsp), %r12
pushq $0x2f
popq %rsi
movq %r12, %rdi
callq 0x41425
pushq $0x6e
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1b043
movq %r12, %rdi
movq %rax, %rsi
callq 0x41476
testl %eax, %eax
je 0x3f06a
leaq 0x8(%rsp), %rdi
callq 0x2ef01
jmp 0x3f054
movq %r14, %rdi
callq 0x1d5e1
pushq $0x6
popq %rdx
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %rdi
callq 0x2cad4
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %eax
jmp 0x3f05b
| js_regexp_toString:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rdi
cmp ebx, 0FFFFFFFFh
jnz short loc_3F04C
mov r15, rsi
lea r12, [rsp+48h+var_40]
mov rdi, r14
mov rsi, r12
xor edx, edx
call string_buffer_init
push 2Fh ; '/'
pop rsi
mov rdi, r12
call string_buffer_putc8
push 6Dh ; 'm'
pop rcx
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call JS_GetProperty
mov rdi, r12
mov rsi, rax
call string_buffer_concat_value_free
test eax, eax
jnz short loc_3F040
lea r12, [rsp+48h+var_40]
push 2Fh ; '/'
pop rsi
mov rdi, r12
call string_buffer_putc8
push 6Eh ; 'n'
pop rcx
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call JS_GetProperty
mov rdi, r12
mov rsi, rax
call string_buffer_concat_value_free
test eax, eax
jz short loc_3F06A
loc_3F040:
lea rdi, [rsp+48h+var_40]
call string_buffer_free
jmp short loc_3F054
loc_3F04C:
mov rdi, r14
call JS_ThrowTypeErrorNotAnObject
loc_3F054:
push 6
pop rdx
xor eax, eax
xor ecx, ecx
loc_3F05B:
or rax, rcx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
loc_3F06A:
lea rdi, [rsp+48h+var_40]
call string_buffer_end
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov eax, eax
jmp short loc_3F05B
| unsigned long long js_regexp_toString(
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 Property; // rax
long long v15; // rdx
long long v16; // rax
long long v17; // rdx
long long v18; // rax
unsigned long long v19; // rcx
char v21; // [rsp+0h] [rbp-48h]
long long v22[8]; // [rsp+8h] [rbp-40h] BYREF
if ( (_DWORD)a3 == -1 )
{
string_buffer_init(a1, (long long)v22, 0);
string_buffer_putc8(v22, 47LL);
Property = JS_GetProperty(a1, a2, -1, 109);
if ( !(unsigned int)string_buffer_concat_value_free(v22, Property, v15) )
{
string_buffer_putc8(v22, 47LL);
v16 = JS_GetProperty(a1, a2, -1, 110);
if ( !(unsigned int)string_buffer_concat_value_free(v22, v16, v17) )
{
v18 = string_buffer_end(v22);
v19 = v18 & 0xFFFFFFFF00000000LL;
v18 = (unsigned int)v18;
return v19 | v18;
}
}
string_buffer_free(v22);
}
else
{
JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6, v21);
}
v18 = 0LL;
v19 = 0LL;
return v19 | v18;
}
| js_regexp_toString:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R14,RDI
CMP EBX,-0x1
JNZ 0x0013f04c
MOV R15,RSI
LEA R12,[RSP + 0x8]
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
CALL 0x0012e042
PUSH 0x2f
POP RSI
MOV RDI,R12
CALL 0x00141425
PUSH 0x6d
POP RCX
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x0011b043
MOV RDI,R12
MOV RSI,RAX
CALL 0x00141476
TEST EAX,EAX
JNZ 0x0013f040
LEA R12,[RSP + 0x8]
PUSH 0x2f
POP RSI
MOV RDI,R12
CALL 0x00141425
PUSH 0x6e
POP RCX
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x0011b043
MOV RDI,R12
MOV RSI,RAX
CALL 0x00141476
TEST EAX,EAX
JZ 0x0013f06a
LAB_0013f040:
LEA RDI,[RSP + 0x8]
CALL 0x0012ef01
JMP 0x0013f054
LAB_0013f04c:
MOV RDI,R14
CALL 0x0011d5e1
LAB_0013f054:
PUSH 0x6
POP RDX
XOR EAX,EAX
XOR ECX,ECX
LAB_0013f05b:
OR RAX,RCX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0013f06a:
LEA RDI,[RSP + 0x8]
CALL 0x0012cad4
MOV RCX,-0x100000000
AND RCX,RAX
MOV EAX,EAX
JMP 0x0013f05b
|
ulong js_regexp_toString(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
ulong uVar3;
ulong uVar4;
int1 local_40 [32];
if ((int)param_3 == -1) {
string_buffer_init(param_1,local_40,0);
string_buffer_putc8(local_40,0x2f);
uVar2 = JS_GetProperty(param_1,param_2,param_3,0x6d);
iVar1 = string_buffer_concat_value_free(local_40,uVar2);
if (iVar1 == 0) {
string_buffer_putc8(local_40,0x2f);
uVar2 = JS_GetProperty(param_1,param_2,param_3,0x6e);
iVar1 = string_buffer_concat_value_free(local_40,uVar2);
if (iVar1 == 0) {
uVar3 = string_buffer_end(local_40);
uVar4 = uVar3 & 0xffffffff00000000;
uVar3 = uVar3 & 0xffffffff;
goto LAB_0013f05b;
}
}
string_buffer_free(local_40);
}
else {
JS_ThrowTypeErrorNotAnObject(param_1);
}
uVar3 = 0;
uVar4 = 0;
LAB_0013f05b:
return uVar3 | uVar4;
}
| |
33,028 | js_regexp_toString | bluesky950520[P]quickjs/quickjs.c | static JSValue js_regexp_toString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue pattern, flags;
StringBuffer b_s, *b = &b_s;
if (!JS_IsObject(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
string_buffer_init(ctx, b, 0);
string_buffer_putc8(b, '/');
pattern = JS_GetProperty(ctx, this_val, JS_ATOM_source);
if (string_buffer_concat_value_free(b, pattern))
goto fail;
string_buffer_putc8(b, '/');
flags = JS_GetProperty(ctx, this_val, JS_ATOM_flags);
if (string_buffer_concat_value_free(b, flags))
goto fail;
return string_buffer_end(b);
fail:
string_buffer_free(b);
return JS_EXCEPTION;
} | O3 | c | js_regexp_toString:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
cmpl $-0x1, %ebx
jne 0x4ade4
movq %rsi, %r15
movq %r14, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x212c2
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x4ae2b
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl $0x2f, %esi
callq 0x4d7cc
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x6d, %ecx
movq %r15, %r8
movq %rbx, %r9
pushq $0x0
pushq $0x0
callq 0x2384b
addq $0x10, %rsp
movq %r12, %rdi
movq %rax, %rsi
callq 0x4d821
testl %eax, %eax
jne 0x4adcc
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl $0x2f, %esi
callq 0x4d7cc
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x6e, %ecx
movq %r15, %r8
movq %rbx, %r9
pushq $0x0
pushq $0x0
callq 0x2384b
addq $0x10, %rsp
movq %r12, %rdi
movq %rax, %rsi
callq 0x4d821
testl %eax, %eax
je 0x4ae10
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1d481
movl $0x6, %edx
xorl %ebx, %ebx
jmp 0x4adfc
leaq 0x571fa(%rip), %rsi # 0xa1fe5
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x22d8b
movl $0x6, %edx
xorl %ecx, %ecx
orq %rcx, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %rdi
callq 0x342b1
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %ebx
jmp 0x4adfe
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x4ad48
| js_regexp_toString:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rdi
cmp ebx, 0FFFFFFFFh
jnz loc_4ADE4
mov r15, rsi
mov [rsp+48h+var_40], r14
xorps xmm0, xmm0
movups [rsp+48h+var_30], xmm0
mov rdi, r14
xor esi, esi
xor edx, edx
call js_alloc_string
mov [rsp+48h+var_38], rax
test rax, rax
jz loc_4AE2B
loc_4AD48:
lea r12, [rsp+48h+var_40]
mov rdi, r12
mov esi, 2Fh ; '/'
call string_buffer_putc8
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov ecx, 6Dh ; 'm'
mov r8, r15
mov r9, rbx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rdi, r12
mov rsi, rax
call string_buffer_concat_value_free
test eax, eax
jnz short loc_4ADCC
lea r12, [rsp+48h+var_40]
mov rdi, r12
mov esi, 2Fh ; '/'
call string_buffer_putc8
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov ecx, 6Eh ; 'n'
mov r8, r15
mov r9, rbx
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rdi, r12
mov rsi, rax
call string_buffer_concat_value_free
test eax, eax
jz short loc_4AE10
loc_4ADCC:
mov rdi, [rsp+48h+var_40]
mov rsi, [rsp+48h+var_38]
call js_free
mov edx, 6
xor ebx, ebx
jmp short loc_4ADFC
loc_4ADE4:
lea rsi, aOperandPrototy+20h; "not an object"
xor ebx, ebx
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
loc_4ADFC:
xor ecx, ecx
loc_4ADFE:
or rbx, rcx
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
loc_4AE10:
lea rdi, [rsp+48h+var_40]
call string_buffer_end
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov ebx, eax
jmp short loc_4ADFE
loc_4AE2B:
mov dword ptr [rsp+48h+var_30+4], 0
mov dword ptr [rsp+48h+var_30+0Ch], 0FFFFFFFFh
jmp loc_4AD48
| unsigned long long js_regexp_toString(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned long long PropertyInternal2; // rax
long long v16; // rdx
unsigned long long v17; // rax
long long v18; // rdx
long long v19; // rbx
unsigned long long v20; // rcx
long long v22; // rax
char v23; // [rsp+0h] [rbp-48h]
long long v24; // [rsp+8h] [rbp-40h] BYREF
long long v25; // [rsp+10h] [rbp-38h]
__int128 v26; // [rsp+18h] [rbp-30h]
if ( (_DWORD)a3 == -1 )
{
v24 = a1;
v26 = 0LL;
v25 = js_alloc_string(a1, 0LL, 0);
if ( !v25 )
{
DWORD1(v26) = 0;
HIDWORD(v26) = -1;
}
string_buffer_putc8(&v24, 47LL);
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x6Du, a2, a3, 0LL, 0);
if ( !(unsigned int)string_buffer_concat_value_free(&v24, PropertyInternal2, v16) )
{
string_buffer_putc8(&v24, 47LL);
v17 = JS_GetPropertyInternal2(a1, a2, a3, 0x6Eu, a2, a3, 0LL, 0);
if ( !(unsigned int)string_buffer_concat_value_free(&v24, v17, v18) )
{
v22 = string_buffer_end(&v24);
v20 = v22 & 0xFFFFFFFF00000000LL;
v19 = (unsigned int)v22;
return v20 | v19;
}
}
js_free(v24, v25);
v19 = 0LL;
}
else
{
v19 = 0LL;
JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v23);
}
v20 = 0LL;
return v20 | v19;
}
| js_regexp_toString:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R14,RDI
CMP EBX,-0x1
JNZ 0x0014ade4
MOV R15,RSI
MOV qword ptr [RSP + 0x8],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001212c2
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x0014ae2b
LAB_0014ad48:
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV ESI,0x2f
CALL 0x0014d7cc
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV ECX,0x6d
MOV R8,R15
MOV R9,RBX
PUSH 0x0
PUSH 0x0
CALL 0x0012384b
ADD RSP,0x10
MOV RDI,R12
MOV RSI,RAX
CALL 0x0014d821
TEST EAX,EAX
JNZ 0x0014adcc
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV ESI,0x2f
CALL 0x0014d7cc
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV ECX,0x6e
MOV R8,R15
MOV R9,RBX
PUSH 0x0
PUSH 0x0
CALL 0x0012384b
ADD RSP,0x10
MOV RDI,R12
MOV RSI,RAX
CALL 0x0014d821
TEST EAX,EAX
JZ 0x0014ae10
LAB_0014adcc:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0011d481
MOV EDX,0x6
XOR EBX,EBX
JMP 0x0014adfc
LAB_0014ade4:
LEA RSI,[0x1a1fe5]
XOR EBX,EBX
MOV RDI,R14
XOR EAX,EAX
CALL 0x00122d8b
MOV EDX,0x6
LAB_0014adfc:
XOR ECX,ECX
LAB_0014adfe:
OR RBX,RCX
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0014ae10:
LEA RDI,[RSP + 0x8]
CALL 0x001342b1
MOV RCX,-0x100000000
AND RCX,RAX
MOV EBX,EAX
JMP 0x0014adfe
LAB_0014ae2b:
MOV dword ptr [RSP + 0x1c],0x0
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x0014ad48
|
ulong js_regexp_toString(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
ulong uVar3;
ulong uVar4;
int8 local_40;
long local_38;
ulong local_30;
int8 uStack_28;
if ((int)param_3 == -1) {
local_30 = 0;
uStack_28 = 0;
local_40 = param_1;
local_38 = js_alloc_string(param_1,0,0);
if (local_38 == 0) {
local_30 = local_30 & 0xffffffff;
uStack_28 = CONCAT44(0xffffffff,(int4)uStack_28);
}
string_buffer_putc8(&local_40,0x2f);
uVar2 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x6d,param_2,param_3,0,0);
iVar1 = string_buffer_concat_value_free(&local_40,uVar2);
if (iVar1 == 0) {
string_buffer_putc8(&local_40,0x2f);
uVar2 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x6e,param_2,param_3,0,0);
iVar1 = string_buffer_concat_value_free(&local_40,uVar2);
if (iVar1 == 0) {
uVar3 = string_buffer_end(&local_40);
uVar4 = uVar3 & 0xffffffff00000000;
uVar3 = uVar3 & 0xffffffff;
goto LAB_0014adfe;
}
}
js_free(local_40,local_38);
}
else {
JS_ThrowTypeError(param_1,"not an object");
}
uVar3 = 0;
uVar4 = 0;
LAB_0014adfe:
return uVar3 | uVar4;
}
| |
33,029 | mi_rec_pack | eloqsql/storage/myisam/mi_dynrec.c | uint _mi_rec_pack(MI_INFO *info, register uchar *to,
register const uchar *from)
{
uint length,new_length,flag,bit,i;
uchar *pos,*end,*startpos,*packpos;
enum en_fieldtype type;
reg3 MI_COLUMNDEF *rec;
MI_BLOB *blob;
DBUG_ENTER("_mi_rec_pack");
flag=0 ; bit=1;
startpos=packpos=to; to+= info->s->base.pack_bits; blob=info->blobs;
rec=info->s->rec;
for (i=info->s->base.fields ; i-- > 0; from+= length,rec++)
{
length=(uint) rec->length;
if ((type = (enum en_fieldtype) rec->type) != FIELD_NORMAL)
{
if (type == FIELD_BLOB)
{
if (!blob->length)
flag|=bit;
else
{
char *temp_pos;
size_t tmp_length=length-portable_sizeof_char_ptr;
memcpy((uchar*) to,from,tmp_length);
memcpy(&temp_pos,from+tmp_length,sizeof(char*));
memcpy(to+tmp_length,temp_pos,(size_t) blob->length);
to+=tmp_length+blob->length;
}
blob++;
}
else if (type == FIELD_SKIP_ZERO)
{
if (memcmp((uchar*) from,zero_string,length) == 0)
flag|=bit;
else
{
memcpy((uchar*) to,from,(size_t) length); to+=length;
}
}
else if (type == FIELD_SKIP_ENDSPACE ||
type == FIELD_SKIP_PRESPACE)
{
pos= (uchar*) from; end= (uchar*) from + length;
if (type == FIELD_SKIP_ENDSPACE)
{ /* Pack trailing spaces */
while (end > from && *(end-1) == ' ')
end--;
}
else
{ /* Pack pref-spaces */
while (pos < end && *pos == ' ')
pos++;
}
new_length=(uint) (end-pos);
if (new_length + 1 + MY_TEST(rec->length > 255 && new_length > 127)
< length)
{
if (rec->length > 255 && new_length > 127)
{
to[0]= (uchar) ((new_length & 127) + 128);
to[1]= (uchar) (new_length >> 7);
to+=2;
}
else
*to++= (uchar) new_length;
memcpy((uchar*) to,pos,(size_t) new_length); to+=new_length;
flag|=bit;
}
else
{
memcpy(to,from,(size_t) length); to+=length;
}
}
else if (type == FIELD_VARCHAR)
{
uint pack_length= HA_VARCHAR_PACKLENGTH(rec->length -1);
uint tmp_length;
if (pack_length == 1)
{
tmp_length= (uint) *(uchar*) from;
*to++= *from;
}
else
{
tmp_length= uint2korr(from);
store_key_length_inc(to,tmp_length);
}
memcpy(to, from+pack_length,tmp_length);
to+= tmp_length;
continue;
}
else
{
memcpy(to,from,(size_t) length); to+=length;
continue; /* Normal field */
}
if ((bit= bit << 1) >= 256)
{
*packpos++= (uchar) flag;
bit=1; flag=0;
}
}
else
{
memcpy(to,from,(size_t) length); to+=length;
}
}
if (bit != 1)
*packpos= (uchar) flag;
if (info->s->calc_checksum)
*to++= (uchar) info->checksum;
DBUG_PRINT("exit",("packed length: %d",(int) (to-startpos)));
DBUG_RETURN((uint) (to-startpos));
} | O3 | c | mi_rec_pack:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq (%rdi), %rax
movl 0x168(%rax), %r13d
movl 0x18c(%rax), %ebx
addq %rsi, %rbx
testl %r13d, %r13d
je 0x2f455
movq %rdx, %r12
movq 0x230(%rax), %r15
movq 0x48(%rdi), %rdx
movq %rsi, -0x58(%rbp)
movq %rsi, -0x50(%rbp)
movq %rdi, -0x48(%rbp)
movl $0x1, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
decl %r13d
movzwl 0x4(%r15), %r8d
movl (%r15), %ecx
testl %ecx, %ecx
je 0x2f211
cmpl $0x3, %ecx
je 0x2f1da
cmpl $0x4, %ecx
jne 0x2f241
cmpq $0x0, 0x10(%rdx)
je 0x2f2b8
movl %r13d, -0x3c(%rbp)
movq %rbx, %r13
leal -0x8(%r8), %ebx
movq %r13, %rdi
movq %r12, %rsi
movq %rdx, %r14
movq %rbx, %rdx
movq %r8, -0x60(%rbp)
callq 0x282c0
movq (%r12,%rbx), %rsi
leaq (%rbx,%r13), %rdi
movq 0x10(%r14), %rdx
callq 0x282c0
movq -0x60(%rbp), %r8
movq %r14, %rdx
addq 0x10(%r14), %rbx
addq %rbx, %r13
movq %r13, %rbx
movl -0x3c(%rbp), %r13d
jmp 0x2f2c1
movq %rdx, -0x38(%rbp)
movq %r12, %rdi
leaq 0x379138(%rip), %rsi # 0x3a8320
movq %r8, %rdx
movq %r8, %r14
callq 0x283b0
testl %eax, %eax
je 0x2f2a6
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x282c0
addq %r14, %rbx
jmp 0x2f2af
movq %rbx, %rdi
movq %r12, %rsi
movq %rbx, -0x68(%rbp)
movq %rdx, %rbx
movq %r8, %rdx
movl %r13d, %r14d
movq %r8, %r13
callq 0x282c0
movq %r13, %r8
movl %r14d, %r13d
movq %rbx, %rdx
movq -0x68(%rbp), %rbx
addq %r8, %rbx
jmp 0x2f2d8
cmpl $0x2, %ecx
ja 0x2f271
leaq (%r12,%r8), %rax
cmpl $0x1, %ecx
movq %rdx, -0x38(%rbp)
jne 0x2f2ed
movq %rax, %rcx
cmpq %r12, %rax
jbe 0x2f269
leaq -0x1(%rcx), %rax
cmpb $0x20, -0x1(%rcx)
je 0x2f257
movq %rcx, %rax
jmp 0x2f304
cmpl $0x8, %ecx
jne 0x2f376
cmpl $0x100, %r8d # imm = 0x100
movl %r13d, -0x3c(%rbp)
movq %rdx, -0x38(%rbp)
ja 0x2f3c0
movq %r8, %r14
movzbl (%r12), %eax
movb %al, (%rbx)
incq %rbx
movl $0x1, %esi
jmp 0x2f3e8
movl -0x2c(%rbp), %eax
orl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rdx
movq %r14, %r8
jmp 0x2f2c5
movl -0x2c(%rbp), %eax
orl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
addq $0x18, %rdx
movl -0x30(%rbp), %eax
addl %eax, %eax
movl %eax, -0x30(%rbp)
cmpl $0xff, %eax
ja 0x2f411
addq %r8, %r12
addq $0x30, %r15
testl %r13d, %r13d
jne 0x2f163
jmp 0x2f43e
movq %r12, %rsi
testq %r8, %r8
je 0x2f304
cmpb $0x20, (%rsi)
jne 0x2f307
incq %rsi
cmpq %rax, %rsi
jb 0x2f2f5
jmp 0x2f307
movq %r12, %rsi
subq %rsi, %rax
cmpl $0x100, %r8d # imm = 0x100
setae %dl
cmpl $0x7f, %eax
seta %cl
andb %dl, %cl
movzbl %cl, %edx
addl %eax, %edx
incl %edx
cmpl %r8d, %edx
jae 0x2f3a0
movq %rbx, %rdi
movl $0x1, %ebx
testb %cl, %cl
movq %r8, -0x60(%rbp)
movl %eax, %ecx
je 0x2f34a
orb $-0x80, %cl
movl %eax, %edx
shrl $0x7, %edx
movb %dl, 0x1(%rdi)
movl $0x2, %ebx
addq %rdi, %rbx
movb %cl, (%rdi)
movl %eax, %r14d
movq %rbx, %rdi
movq %r14, %rdx
callq 0x282c0
addq %r14, %rbx
movl -0x2c(%rbp), %eax
orl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rdx
movq -0x60(%rbp), %r8
jmp 0x2f2c5
movq %rbx, %rdi
movq %r12, %rsi
movq %rbx, -0x68(%rbp)
movq %rdx, %rbx
movq %r8, %rdx
movq %r8, %r14
callq 0x282c0
movq %r14, %r8
movq %rbx, %rdx
movq -0x68(%rbp), %rbx
addq %r14, %rbx
jmp 0x2f2d8
movq %rbx, %rdi
movq %r12, %rsi
movq %r8, %rdx
movq %r8, %r14
callq 0x282c0
movq %r14, %r8
addq %r14, %rbx
movq -0x38(%rbp), %rdx
jmp 0x2f2c5
movzwl (%r12), %eax
movq %r8, %r14
cmpl $0xfe, %eax
ja 0x2f3d6
movb %al, (%rbx)
incq %rbx
jmp 0x2f3e3
movb $-0x1, (%rbx)
movb %al, 0x2(%rbx)
movb %ah, 0x1(%rbx)
addq $0x3, %rbx
movl $0x2, %esi
movq %rbx, %r13
addq %r12, %rsi
movl %eax, %ebx
movq %r13, %rdi
movq %rbx, %rdx
callq 0x282c0
addq %rbx, %r13
movq %r13, %rbx
movl -0x3c(%rbp), %r13d
movq -0x38(%rbp), %rdx
movq %r14, %r8
jmp 0x2f2d8
movq -0x58(%rbp), %rax
movl -0x2c(%rbp), %ecx
movb %cl, (%rax)
incq %rax
movq %rax, -0x58(%rbp)
movl %r8d, %eax
addq %rax, %r12
addq $0x30, %r15
testl %r13d, %r13d
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdi
jne 0x2f155
jmp 0x2f455
cmpl $0x1, -0x30(%rbp)
je 0x2f44d
movq -0x58(%rbp), %rax
movl -0x2c(%rbp), %ecx
movb %cl, (%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdi
movq (%rdi), %rax
cmpq $0x0, 0x2c8(%rax)
je 0x2f46d
movb 0x1a8(%rdi), %al
movb %al, (%rbx)
incq %rbx
subl %esi, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_rec_pack:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rax, [rdi]
mov r13d, [rax+168h]
mov ebx, [rax+18Ch]
add rbx, rsi
test r13d, r13d
jz loc_2F455
mov r12, rdx
mov r15, [rax+230h]
mov rdx, [rdi+48h]
mov [rbp+var_58], rsi
mov [rbp+var_50], rsi
mov [rbp+var_48], rdi
loc_2F155:
mov [rbp+var_30], 1
mov [rbp+var_2C], 0
loc_2F163:
dec r13d
movzx r8d, word ptr [r15+4]
mov ecx, [r15]
test ecx, ecx
jz loc_2F211
cmp ecx, 3
jz short loc_2F1DA
cmp ecx, 4
jnz loc_2F241
cmp qword ptr [rdx+10h], 0
jz loc_2F2B8
mov [rbp+var_3C], r13d
mov r13, rbx
lea ebx, [r8-8]
mov rdi, r13
mov rsi, r12
mov r14, rdx
mov rdx, rbx
mov [rbp+var_60], r8
call _memcpy
mov rsi, [r12+rbx]
lea rdi, [rbx+r13]
mov rdx, [r14+10h]
call _memcpy
mov r8, [rbp+var_60]
mov rdx, r14
add rbx, [r14+10h]
add r13, rbx
mov rbx, r13
mov r13d, [rbp+var_3C]
jmp loc_2F2C1
loc_2F1DA:
mov [rbp+var_38], rdx
mov rdi, r12
lea rsi, zero_string
mov rdx, r8
mov r14, r8
call _bcmp
test eax, eax
jz loc_2F2A6
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call _memcpy
add rbx, r14
jmp loc_2F2AF
loc_2F211:
mov rdi, rbx
mov rsi, r12
mov [rbp+var_68], rbx
mov rbx, rdx
mov rdx, r8
mov r14d, r13d
mov r13, r8
call _memcpy
mov r8, r13
mov r13d, r14d
mov rdx, rbx
mov rbx, [rbp+var_68]
add rbx, r8
jmp loc_2F2D8
loc_2F241:
cmp ecx, 2
ja short loc_2F271
lea rax, [r12+r8]
cmp ecx, 1
mov [rbp+var_38], rdx
jnz loc_2F2ED
loc_2F257:
mov rcx, rax
cmp rax, r12
jbe short loc_2F269
lea rax, [rcx-1]
cmp byte ptr [rcx-1], 20h ; ' '
jz short loc_2F257
loc_2F269:
mov rax, rcx
jmp loc_2F304
loc_2F271:
cmp ecx, 8
jnz loc_2F376
cmp r8d, 100h
mov [rbp+var_3C], r13d
mov [rbp+var_38], rdx
ja loc_2F3C0
mov r14, r8
movzx eax, byte ptr [r12]
mov [rbx], al
inc rbx
mov esi, 1
jmp loc_2F3E8
loc_2F2A6:
mov eax, [rbp+var_2C]
or eax, [rbp+var_30]
mov [rbp+var_2C], eax
loc_2F2AF:
mov rdx, [rbp+var_38]
mov r8, r14
jmp short loc_2F2C5
loc_2F2B8:
mov eax, [rbp+var_2C]
or eax, [rbp+var_30]
mov [rbp+var_2C], eax
loc_2F2C1:
add rdx, 18h
loc_2F2C5:
mov eax, [rbp+var_30]
add eax, eax
mov [rbp+var_30], eax
cmp eax, 0FFh
ja loc_2F411
loc_2F2D8:
add r12, r8
add r15, 30h ; '0'
test r13d, r13d
jnz loc_2F163
jmp loc_2F43E
loc_2F2ED:
mov rsi, r12
test r8, r8
jz short loc_2F304
loc_2F2F5:
cmp byte ptr [rsi], 20h ; ' '
jnz short loc_2F307
inc rsi
cmp rsi, rax
jb short loc_2F2F5
jmp short loc_2F307
loc_2F304:
mov rsi, r12
loc_2F307:
sub rax, rsi
cmp r8d, 100h
setnb dl
cmp eax, 7Fh
setnbe cl
and cl, dl
movzx edx, cl
add edx, eax
inc edx
cmp edx, r8d
jnb short loc_2F3A0
mov rdi, rbx
mov ebx, 1
test cl, cl
mov [rbp+var_60], r8
mov ecx, eax
jz short loc_2F34A
or cl, 80h
mov edx, eax
shr edx, 7
mov [rdi+1], dl
mov ebx, 2
loc_2F34A:
add rbx, rdi
mov [rdi], cl
mov r14d, eax
mov rdi, rbx
mov rdx, r14
call _memcpy
add rbx, r14
mov eax, [rbp+var_2C]
or eax, [rbp+var_30]
mov [rbp+var_2C], eax
mov rdx, [rbp+var_38]
mov r8, [rbp+var_60]
jmp loc_2F2C5
loc_2F376:
mov rdi, rbx
mov rsi, r12
mov [rbp+var_68], rbx
mov rbx, rdx
mov rdx, r8
mov r14, r8
call _memcpy
mov r8, r14
mov rdx, rbx
mov rbx, [rbp+var_68]
add rbx, r14
jmp loc_2F2D8
loc_2F3A0:
mov rdi, rbx
mov rsi, r12
mov rdx, r8
mov r14, r8
call _memcpy
mov r8, r14
add rbx, r14
mov rdx, [rbp+var_38]
jmp loc_2F2C5
loc_2F3C0:
movzx eax, word ptr [r12]
mov r14, r8
cmp eax, 0FEh
ja short loc_2F3D6
mov [rbx], al
inc rbx
jmp short loc_2F3E3
loc_2F3D6:
mov byte ptr [rbx], 0FFh
mov [rbx+2], al
mov [rbx+1], ah
add rbx, 3
loc_2F3E3:
mov esi, 2
loc_2F3E8:
mov r13, rbx
add rsi, r12
mov ebx, eax
mov rdi, r13
mov rdx, rbx
call _memcpy
add r13, rbx
mov rbx, r13
mov r13d, [rbp+var_3C]
mov rdx, [rbp+var_38]
mov r8, r14
jmp loc_2F2D8
loc_2F411:
mov rax, [rbp+var_58]
mov ecx, [rbp+var_2C]
mov [rax], cl
inc rax
mov [rbp+var_58], rax
mov eax, r8d
add r12, rax
add r15, 30h ; '0'
test r13d, r13d
mov rsi, [rbp+var_50]
mov rdi, [rbp+var_48]
jnz loc_2F155
jmp short loc_2F455
loc_2F43E:
cmp [rbp+var_30], 1
jz short loc_2F44D
mov rax, [rbp+var_58]
mov ecx, [rbp+var_2C]
mov [rax], cl
loc_2F44D:
mov rsi, [rbp+var_50]
mov rdi, [rbp+var_48]
loc_2F455:
mov rax, [rdi]
cmp qword ptr [rax+2C8h], 0
jz short loc_2F46D
mov al, [rdi+1A8h]
mov [rbx], al
inc rbx
loc_2F46D:
sub ebx, esi
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_rec_pack(long long a1, _BYTE *a2, char *a3)
{
int v3; // r13d
_BYTE *v4; // rbx
long long v6; // r15
long long v7; // rdx
long long v8; // r8
unsigned int v9; // ecx
_BYTE *v10; // r13
long long v11; // rbx
long long v12; // r14
long long v13; // r14
_BYTE *v14; // rdi
long long v15; // rbx
int v16; // r14d
long long v17; // r13
char *v18; // rax
char *v19; // rcx
long long v20; // r14
unsigned int v21; // eax
_BYTE *v22; // rbx
long long v23; // rsi
char *v24; // rsi
unsigned int v25; // eax
bool v26; // cl
_BYTE *v27; // rdi
long long v28; // rbx
bool v29; // zf
char v30; // cl
_BYTE *v31; // rbx
long long v32; // r14
_BYTE *v33; // rdi
long long v34; // rbx
long long v35; // r14
long long v36; // r14
_BYTE *v37; // r13
long long v38; // rbx
_BYTE *v40; // [rsp+8h] [rbp-68h]
_BYTE *v41; // [rsp+8h] [rbp-68h]
long long v42; // [rsp+10h] [rbp-60h]
long long v43; // [rsp+10h] [rbp-60h]
_BYTE *v44; // [rsp+18h] [rbp-58h]
int v45; // [rsp+20h] [rbp-50h]
long long v46; // [rsp+28h] [rbp-48h]
int v47; // [rsp+34h] [rbp-3Ch]
int v48; // [rsp+34h] [rbp-3Ch]
long long v49; // [rsp+38h] [rbp-38h]
long long v50; // [rsp+38h] [rbp-38h]
long long v51; // [rsp+38h] [rbp-38h]
unsigned int v52; // [rsp+40h] [rbp-30h]
int v53; // [rsp+44h] [rbp-2Ch]
v3 = *(_DWORD *)(*(_QWORD *)a1 + 360LL);
v4 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 396LL)];
if ( !v3 )
goto LABEL_48;
v6 = *(_QWORD *)(*(_QWORD *)a1 + 560LL);
v7 = *(_QWORD *)(a1 + 72);
v44 = a2;
v45 = (int)a2;
v46 = a1;
while ( 2 )
{
v52 = 1;
v53 = 0;
while ( 1 )
{
--v3;
v8 = *(unsigned __int16 *)(v6 + 4);
v9 = *(_DWORD *)v6;
if ( *(_DWORD *)v6 )
break;
v14 = v4;
v40 = v4;
v15 = v7;
v16 = v3;
v17 = *(unsigned __int16 *)(v6 + 4);
memcpy(v14, a3, v8);
v8 = v17;
v3 = v16;
v7 = v15;
v4 = &v40[v8];
LABEL_25:
a3 += v8;
v6 += 48LL;
if ( !v3 )
{
if ( v52 != 1 )
*v44 = v53;
LODWORD(a2) = v45;
a1 = v46;
goto LABEL_48;
}
}
if ( v9 == 3 )
{
v49 = v7;
v13 = *(unsigned __int16 *)(v6 + 4);
if ( (unsigned int)bcmp(a3, &zero_string, v8) )
{
memcpy(v4, a3, v13);
v4 += v13;
}
else
{
v53 |= v52;
}
v7 = v49;
v8 = v13;
goto LABEL_24;
}
if ( v9 == 4 )
{
if ( *(_QWORD *)(v7 + 16) )
{
v47 = v3;
v10 = v4;
v11 = (unsigned int)(v8 - 8);
v12 = v7;
v42 = *(unsigned __int16 *)(v6 + 4);
memcpy(v10, a3, v11);
memcpy(&v10[v11], *(_QWORD *)&a3[v11], *(_QWORD *)(v12 + 16));
v8 = v42;
v7 = v12;
v4 = &v10[*(_QWORD *)(v12 + 16) + v11];
v3 = v47;
}
else
{
v53 |= v52;
}
v7 += 24LL;
goto LABEL_24;
}
if ( v9 > 2 )
{
if ( v9 == 8 )
{
v48 = v3;
v51 = v7;
if ( (unsigned int)v8 > 0x100 )
{
v21 = *(unsigned __int16 *)a3;
v20 = *(unsigned __int16 *)(v6 + 4);
if ( v21 > 0xFE )
{
*v4 = -1;
v4[2] = v21;
v4[1] = BYTE1(v21);
v22 = v4 + 3;
}
else
{
*v4 = v21;
v22 = v4 + 1;
}
v23 = 2LL;
}
else
{
v20 = *(unsigned __int16 *)(v6 + 4);
v21 = (unsigned __int8)*a3;
*v4 = v21;
v22 = v4 + 1;
v23 = 1LL;
}
v37 = v22;
v38 = v21;
memcpy(v37, &a3[v23], v21);
v4 = &v37[v38];
v3 = v48;
v7 = v51;
v8 = v20;
}
else
{
v33 = v4;
v41 = v4;
v34 = v7;
v35 = *(unsigned __int16 *)(v6 + 4);
memcpy(v33, a3, v8);
v8 = v35;
v7 = v34;
v4 = &v41[v35];
}
goto LABEL_25;
}
v18 = &a3[v8];
v50 = v7;
if ( v9 == 1 )
{
do
{
v19 = v18;
if ( v18 <= a3 )
break;
--v18;
}
while ( *(v19 - 1) == 32 );
LODWORD(v18) = (_DWORD)v19;
goto LABEL_31;
}
v24 = a3;
if ( !*(_WORD *)(v6 + 4) )
{
LABEL_31:
v24 = a3;
goto LABEL_32;
}
do
{
if ( *v24 != 32 )
break;
++v24;
}
while ( v24 < v18 );
LABEL_32:
v25 = (_DWORD)v18 - (_DWORD)v24;
v26 = (unsigned int)v8 >= 0x100 && v25 > 0x7F;
if ( v25 + v26 + 1 >= (unsigned int)v8 )
{
v36 = *(unsigned __int16 *)(v6 + 4);
memcpy(v4, a3, v8);
v8 = v36;
v4 += v36;
v7 = v50;
}
else
{
v27 = v4;
v28 = 1LL;
v29 = !v26;
v43 = *(unsigned __int16 *)(v6 + 4);
v30 = v25;
if ( !v29 )
{
v30 = v25 | 0x80;
v27[1] = v25 >> 7;
v28 = 2LL;
}
v31 = &v27[v28];
*v27 = v30;
v32 = v25;
memcpy(v31, v24, v25);
v4 = &v31[v32];
v53 |= v52;
v7 = v50;
v8 = v43;
}
LABEL_24:
v52 *= 2;
if ( v52 <= 0xFF )
goto LABEL_25;
*v44++ = v53;
a3 += (unsigned int)v8;
v6 += 48LL;
LODWORD(a2) = v45;
a1 = v46;
if ( v3 )
continue;
break;
}
LABEL_48:
if ( *(_QWORD *)(*(_QWORD *)a1 + 712LL) )
{
*v4 = *(_BYTE *)(a1 + 424);
LODWORD(v4) = (_DWORD)v4 + 1;
}
return (unsigned int)((_DWORD)v4 - (_DWORD)a2);
}
| _mi_rec_pack:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RAX,qword ptr [RDI]
MOV R13D,dword ptr [RAX + 0x168]
MOV EBX,dword ptr [RAX + 0x18c]
ADD RBX,RSI
TEST R13D,R13D
JZ 0x0012f455
MOV R12,RDX
MOV R15,qword ptr [RAX + 0x230]
MOV RDX,qword ptr [RDI + 0x48]
MOV qword ptr [RBP + -0x58],RSI
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RBP + -0x48],RDI
LAB_0012f155:
MOV dword ptr [RBP + -0x30],0x1
MOV dword ptr [RBP + -0x2c],0x0
LAB_0012f163:
DEC R13D
MOVZX R8D,word ptr [R15 + 0x4]
MOV ECX,dword ptr [R15]
TEST ECX,ECX
JZ 0x0012f211
CMP ECX,0x3
JZ 0x0012f1da
CMP ECX,0x4
JNZ 0x0012f241
CMP qword ptr [RDX + 0x10],0x0
JZ 0x0012f2b8
MOV dword ptr [RBP + -0x3c],R13D
MOV R13,RBX
LEA EBX,[R8 + -0x8]
MOV RDI,R13
MOV RSI,R12
MOV R14,RDX
MOV RDX,RBX
MOV qword ptr [RBP + -0x60],R8
CALL 0x001282c0
MOV RSI,qword ptr [R12 + RBX*0x1]
LEA RDI,[RBX + R13*0x1]
MOV RDX,qword ptr [R14 + 0x10]
CALL 0x001282c0
MOV R8,qword ptr [RBP + -0x60]
MOV RDX,R14
ADD RBX,qword ptr [R14 + 0x10]
ADD R13,RBX
MOV RBX,R13
MOV R13D,dword ptr [RBP + -0x3c]
JMP 0x0012f2c1
LAB_0012f1da:
MOV qword ptr [RBP + -0x38],RDX
MOV RDI,R12
LEA RSI,[0x4a8320]
MOV RDX,R8
MOV R14,R8
CALL 0x001283b0
TEST EAX,EAX
JZ 0x0012f2a6
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x001282c0
ADD RBX,R14
JMP 0x0012f2af
LAB_0012f211:
MOV RDI,RBX
MOV RSI,R12
MOV qword ptr [RBP + -0x68],RBX
MOV RBX,RDX
MOV RDX,R8
MOV R14D,R13D
MOV R13,R8
CALL 0x001282c0
MOV R8,R13
MOV R13D,R14D
MOV RDX,RBX
MOV RBX,qword ptr [RBP + -0x68]
ADD RBX,R8
JMP 0x0012f2d8
LAB_0012f241:
CMP ECX,0x2
JA 0x0012f271
LEA RAX,[R12 + R8*0x1]
CMP ECX,0x1
MOV qword ptr [RBP + -0x38],RDX
JNZ 0x0012f2ed
LAB_0012f257:
MOV RCX,RAX
CMP RAX,R12
JBE 0x0012f269
LEA RAX,[RCX + -0x1]
CMP byte ptr [RCX + -0x1],0x20
JZ 0x0012f257
LAB_0012f269:
MOV RAX,RCX
JMP 0x0012f304
LAB_0012f271:
CMP ECX,0x8
JNZ 0x0012f376
CMP R8D,0x100
MOV dword ptr [RBP + -0x3c],R13D
MOV qword ptr [RBP + -0x38],RDX
JA 0x0012f3c0
MOV R14,R8
MOVZX EAX,byte ptr [R12]
MOV byte ptr [RBX],AL
INC RBX
MOV ESI,0x1
JMP 0x0012f3e8
LAB_0012f2a6:
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x2c],EAX
LAB_0012f2af:
MOV RDX,qword ptr [RBP + -0x38]
MOV R8,R14
JMP 0x0012f2c5
LAB_0012f2b8:
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x2c],EAX
LAB_0012f2c1:
ADD RDX,0x18
LAB_0012f2c5:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,EAX
MOV dword ptr [RBP + -0x30],EAX
CMP EAX,0xff
JA 0x0012f411
LAB_0012f2d8:
ADD R12,R8
ADD R15,0x30
TEST R13D,R13D
JNZ 0x0012f163
JMP 0x0012f43e
LAB_0012f2ed:
MOV RSI,R12
TEST R8,R8
JZ 0x0012f304
LAB_0012f2f5:
CMP byte ptr [RSI],0x20
JNZ 0x0012f307
INC RSI
CMP RSI,RAX
JC 0x0012f2f5
JMP 0x0012f307
LAB_0012f304:
MOV RSI,R12
LAB_0012f307:
SUB RAX,RSI
CMP R8D,0x100
SETNC DL
CMP EAX,0x7f
SETA CL
AND CL,DL
MOVZX EDX,CL
ADD EDX,EAX
INC EDX
CMP EDX,R8D
JNC 0x0012f3a0
MOV RDI,RBX
MOV EBX,0x1
TEST CL,CL
MOV qword ptr [RBP + -0x60],R8
MOV ECX,EAX
JZ 0x0012f34a
OR CL,0x80
MOV EDX,EAX
SHR EDX,0x7
MOV byte ptr [RDI + 0x1],DL
MOV EBX,0x2
LAB_0012f34a:
ADD RBX,RDI
MOV byte ptr [RDI],CL
MOV R14D,EAX
MOV RDI,RBX
MOV RDX,R14
CALL 0x001282c0
ADD RBX,R14
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x2c],EAX
MOV RDX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x60]
JMP 0x0012f2c5
LAB_0012f376:
MOV RDI,RBX
MOV RSI,R12
MOV qword ptr [RBP + -0x68],RBX
MOV RBX,RDX
MOV RDX,R8
MOV R14,R8
CALL 0x001282c0
MOV R8,R14
MOV RDX,RBX
MOV RBX,qword ptr [RBP + -0x68]
ADD RBX,R14
JMP 0x0012f2d8
LAB_0012f3a0:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R8
MOV R14,R8
CALL 0x001282c0
MOV R8,R14
ADD RBX,R14
MOV RDX,qword ptr [RBP + -0x38]
JMP 0x0012f2c5
LAB_0012f3c0:
MOVZX EAX,word ptr [R12]
MOV R14,R8
CMP EAX,0xfe
JA 0x0012f3d6
MOV byte ptr [RBX],AL
INC RBX
JMP 0x0012f3e3
LAB_0012f3d6:
MOV byte ptr [RBX],0xff
MOV byte ptr [RBX + 0x2],AL
MOV byte ptr [RBX + 0x1],AH
ADD RBX,0x3
LAB_0012f3e3:
MOV ESI,0x2
LAB_0012f3e8:
MOV R13,RBX
ADD RSI,R12
MOV EBX,EAX
MOV RDI,R13
MOV RDX,RBX
CALL 0x001282c0
ADD R13,RBX
MOV RBX,R13
MOV R13D,dword ptr [RBP + -0x3c]
MOV RDX,qword ptr [RBP + -0x38]
MOV R8,R14
JMP 0x0012f2d8
LAB_0012f411:
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x2c]
MOV byte ptr [RAX],CL
INC RAX
MOV qword ptr [RBP + -0x58],RAX
MOV EAX,R8D
ADD R12,RAX
ADD R15,0x30
TEST R13D,R13D
MOV RSI,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RBP + -0x48]
JNZ 0x0012f155
JMP 0x0012f455
LAB_0012f43e:
CMP dword ptr [RBP + -0x30],0x1
JZ 0x0012f44d
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x2c]
MOV byte ptr [RAX],CL
LAB_0012f44d:
MOV RSI,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RBP + -0x48]
LAB_0012f455:
MOV RAX,qword ptr [RDI]
CMP qword ptr [RAX + 0x2c8],0x0
JZ 0x0012f46d
MOV AL,byte ptr [RDI + 0x1a8]
MOV byte ptr [RBX],AL
INC RBX
LAB_0012f46d:
SUB EBX,ESI
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int _mi_rec_pack(long *param_1,int1 *param_2,ushort *param_3)
{
ushort uVar1;
ushort *puVar2;
int iVar3;
uint uVar4;
ulong uVar5;
byte bVar7;
long lVar8;
byte *pbVar9;
long lVar10;
ushort *puVar11;
uint uVar12;
ulong __n;
int iVar13;
uint *puVar14;
int1 *local_60;
uint local_38;
uint local_34;
ushort *puVar6;
lVar8 = *param_1;
iVar13 = *(int *)(lVar8 + 0x168);
pbVar9 = param_2 + *(uint *)(lVar8 + 0x18c);
if (iVar13 == 0) {
LAB_0012f455:
if (*(long *)(*param_1 + 0x2c8) != 0) {
*pbVar9 = *(byte *)(param_1 + 0x35);
pbVar9 = pbVar9 + 1;
}
return (int)pbVar9 - (int)param_2;
}
puVar14 = *(uint **)(lVar8 + 0x230);
lVar8 = param_1[9];
local_60 = param_2;
LAB_0012f155:
local_38 = 1;
local_34 = 0;
do {
iVar13 = iVar13 + -1;
uVar1 = (ushort)puVar14[1];
__n = (ulong)uVar1;
uVar4 = *puVar14;
if (uVar4 == 0) {
memcpy(pbVar9,param_3,__n);
pbVar9 = pbVar9 + __n;
}
else {
if (uVar4 == 3) {
iVar3 = bcmp(param_3,zero_string,__n);
if (iVar3 == 0) {
local_34 = local_34 | local_38;
}
else {
memcpy(pbVar9,param_3,__n);
pbVar9 = pbVar9 + __n;
}
}
else if (uVar4 == 4) {
if (*(long *)(lVar8 + 0x10) == 0) {
local_34 = local_34 | local_38;
}
else {
uVar5 = (ulong)(uVar1 - 8);
memcpy(pbVar9,param_3,uVar5);
memcpy(pbVar9 + uVar5,*(void **)((long)param_3 + uVar5),*(size_t *)(lVar8 + 0x10));
pbVar9 = pbVar9 + uVar5 + *(long *)(lVar8 + 0x10);
}
lVar8 = lVar8 + 0x18;
}
else {
uVar12 = (uint)uVar1;
if (2 < uVar4) {
if (uVar4 == 8) {
if (uVar12 < 0x101) {
uVar4 = (uint)(byte)*param_3;
*pbVar9 = (byte)*param_3;
pbVar9 = pbVar9 + 1;
lVar10 = 1;
}
else {
uVar1 = *param_3;
uVar4 = (uint)uVar1;
if (uVar1 < 0xff) {
*pbVar9 = (byte)uVar1;
pbVar9 = pbVar9 + 1;
}
else {
*pbVar9 = 0xff;
pbVar9[2] = (byte)uVar1;
pbVar9[1] = (byte)(uVar1 >> 8);
pbVar9 = pbVar9 + 3;
}
lVar10 = 2;
}
memcpy(pbVar9,(byte *)(lVar10 + (long)param_3),(ulong)uVar4);
pbVar9 = pbVar9 + uVar4;
}
else {
memcpy(pbVar9,param_3,__n);
pbVar9 = pbVar9 + __n;
}
goto LAB_0012f2d8;
}
puVar6 = (ushort *)((long)param_3 + __n);
puVar2 = puVar6;
puVar11 = param_3;
if (uVar4 == 1) {
do {
puVar6 = puVar2;
if (puVar6 <= param_3) break;
puVar2 = (ushort *)((long)puVar6 + -1);
} while (*(byte *)((long)puVar6 + -1) == 0x20);
}
else if (__n != 0) {
do {
if ((byte)*puVar11 != 0x20) break;
puVar11 = (ushort *)((long)puVar11 + 1);
} while (puVar11 < puVar6);
}
uVar5 = (long)puVar6 - (long)puVar11;
uVar4 = (uint)uVar5;
if ((0x7f < uVar4 && 0xff < uVar12) + uVar4 + 1 < uVar12) {
lVar10 = 1;
bVar7 = (byte)uVar5;
if (0x7f < uVar4 && 0xff < uVar12) {
bVar7 = bVar7 | 0x80;
pbVar9[1] = (byte)(uVar5 >> 7);
lVar10 = 2;
}
*pbVar9 = bVar7;
memcpy(pbVar9 + lVar10,puVar11,uVar5 & 0xffffffff);
pbVar9 = pbVar9 + lVar10 + (uVar5 & 0xffffffff);
local_34 = local_34 | local_38;
}
else {
memcpy(pbVar9,param_3,__n);
pbVar9 = pbVar9 + __n;
}
}
local_38 = local_38 * 2;
if (0xff < local_38) break;
}
LAB_0012f2d8:
param_3 = (ushort *)((long)param_3 + __n);
puVar14 = puVar14 + 0xc;
if (iVar13 == 0) {
if (local_38 != 1) {
*local_60 = (char)local_34;
}
goto LAB_0012f455;
}
} while( true );
*local_60 = (char)local_34;
local_60 = local_60 + 1;
param_3 = (ushort *)((long)param_3 + __n);
puVar14 = puVar14 + 0xc;
if (iVar13 == 0) goto LAB_0012f455;
goto LAB_0012f155;
}
| |
33,030 | testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation(char const*) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | void TypeParameterizedTestSuiteRegistry::RegisterInstantiation(
const char* test_suite_name) {
auto it = suites_.find(std::string(test_suite_name));
if (it != suites_.end()) {
it->second.instantiated = true;
} else {
GTEST_LOG_(ERROR) << "Unknown type parameterized test suit '"
<< test_suite_name << "'";
}
} | O0 | cpp | testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation(char const*):
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xb920
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0xe840
jmp 0x1fe0b
movq 0x28(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x481c0
movq %rax, 0x20(%rsp)
jmp 0x1fe21
movq 0x20(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xec60
leaq 0x6f(%rsp), %rdi
callq 0xb500
movq 0x30(%rsp), %rdi
callq 0x48210
movq %rax, 0x50(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x481f0
xorb $-0x1, %al
testb $0x1, %al
jne 0x1fe6b
jmp 0x1feb8
leaq 0x90(%rsp), %rdi
callq 0x48240
movb $0x1, 0x48(%rax)
jmp 0x1ff51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0x1fea9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xec60
leaq 0x6f(%rsp), %rdi
callq 0xb500
jmp 0x1ff59
leaq 0x54768(%rip), %rdx # 0x74627
leaq 0x4c(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x2, %esi
movl $0x259, %ecx # imm = 0x259
callq 0x1b8d0
movq 0x10(%rsp), %rdi
callq 0x107d0
movq %rax, 0x18(%rsp)
jmp 0x1fee9
movq 0x18(%rsp), %rdi
leaq 0x548ba(%rip), %rsi # 0x747af
callq 0xb460
movq %rax, 0x8(%rsp)
jmp 0x1ff01
movq 0x8(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0xb460
movq %rax, (%rsp)
jmp 0x1ff19
movq (%rsp), %rdi
leaq 0x548b0(%rip), %rsi # 0x747d4
callq 0xb460
jmp 0x1ff2b
leaq 0x4c(%rsp), %rdi
callq 0x1ba40
jmp 0x1ff51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x4c(%rsp), %rdi
callq 0x1ba40
jmp 0x1ff59
addq $0xa8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0xb910
nopw %cs:(%rax,%rax)
| _ZN7testing8internal34TypeParameterizedTestSuiteRegistry21RegisterInstantiationEPKc:
sub rsp, 0A8h
mov qword ptr [rsp+0A8h+var_8], rdi
mov qword ptr [rsp+0A8h+var_10], rsi
mov rax, qword ptr [rsp+0A8h+var_8]
mov qword ptr [rsp+0A8h+var_80], rax; int
mov qword ptr [rsp+0A8h+var_78], rax; int
mov rax, qword ptr [rsp+0A8h+var_10]
mov qword ptr [rsp+0A8h+var_70], rax; int
lea rdi, [rsp+0A8h+var_39]
mov [rsp+0A8h+var_68], rdi; __int64
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, qword ptr [rsp+0A8h+var_70]
mov rdx, [rsp+0A8h+var_68]
lea rdi, [rsp+0A8h+var_39+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_1FE0B:
mov rdi, qword ptr [rsp+0A8h+var_80]
lea rsi, [rsp+0A8h+var_39+1]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7testing8internal34TypeParameterizedTestSuiteRegistry30TypeParameterizedTestSuiteInfoESt4lessIS5_ESaISt4pairIKS5_S9_EEE4findERSD_; std::map<std::string,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>::find(std::string const&)
mov qword ptr [rsp+0A8h+var_88], rax; int
jmp short $+2
loc_1FE21:
mov rax, qword ptr [rsp+0A8h+var_88]
mov [rsp+0A8h+var_18], rax
lea rdi, [rsp+0A8h+var_39+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_39]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, qword ptr [rsp+0A8h+var_78]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7testing8internal34TypeParameterizedTestSuiteRegistry30TypeParameterizedTestSuiteInfoESt4lessIS5_ESaISt4pairIKS5_S9_EEE3endEv; std::map<std::string,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>::end(void)
mov [rsp+0A8h+var_58], rax
lea rdi, [rsp+0A8h+var_18]
lea rsi, [rsp+0A8h+var_58]
call _ZSteqRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7testing8internal34TypeParameterizedTestSuiteRegistry30TypeParameterizedTestSuiteInfoEEESF_; std::operator==(std::_Rb_tree_iterator<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>> const&,std::_Rb_tree_iterator<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>> const&)
xor al, 0FFh
test al, 1
jnz short loc_1FE6B
jmp short loc_1FEB8
loc_1FE6B:
lea rdi, [rsp+0A8h+var_18]
call _ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7testing8internal34TypeParameterizedTestSuiteRegistry30TypeParameterizedTestSuiteInfoEEEptEv; std::_Rb_tree_iterator<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>::operator->(void)
mov byte ptr [rax+48h], 1
jmp loc_1FF51
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_1FEA9
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_1FEA9:
lea rdi, [rsp+arg_67]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_1FF59
loc_1FEB8:
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+0A8h+var_5C]; int
mov [rsp+0A8h+var_98], rdi; int
mov esi, 2
mov ecx, 259h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, [rsp+0A8h+var_98]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+0A8h+var_90], rax
jmp short $+2
loc_1FEE9:
mov rdi, [rsp+0A8h+var_90]
lea rsi, aUnknownTypePar; "Unknown type parameterized test suit '"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+0A8h+var_A0], rax
jmp short $+2
loc_1FF01:
mov rdi, [rsp+0A8h+var_A0]
mov rsi, qword ptr [rsp+0A8h+var_10]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+0A8h+var_A8], rax
jmp short $+2
loc_1FF19:
mov rdi, [rsp+0A8h+var_A8]
lea rsi, aUnknownTypePar+25h; "'"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_1FF2B:
lea rdi, [rsp+0A8h+var_5C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_1FF51
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_44]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_1FF59
loc_1FF51:
add rsp, 0A8h
retn
loc_1FF59:
mov rdi, [rsp+arg_58]
call __Unwind_Resume
| void testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation(
testing::internal::TypeParameterizedTestSuiteRegistry *this,
const char *a2)
{
long long v2; // [rsp+0h] [rbp-A8h]
long long v3; // [rsp+8h] [rbp-A0h]
void *Stream; // [rsp+18h] [rbp-90h]
int v5; // [rsp+4Ch] [rbp-5Ch] BYREF
long long v6[3]; // [rsp+50h] [rbp-58h] BYREF
long long v7[4]; // [rsp+6Fh] [rbp-39h] BYREF
long long v8; // [rsp+90h] [rbp-18h] BYREF
int v9[2]; // [rsp+98h] [rbp-10h]
int v10[2]; // [rsp+A0h] [rbp-8h]
*(_QWORD *)v10 = this;
*(_QWORD *)v9 = a2;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v7 + 1, (long long)a2, (long long)v7);
v8 = std::map<std::string,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>::find(
this,
(char *)v7 + 1);
std::string::~string((char *)v7 + 1);
std::allocator<char>::~allocator(v7, (char *)v7 + 1);
v6[0] = std::map<std::string,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>::end(this);
if ( (std::operator==(&v8, v6) & 1) != 0 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v5,
2,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc",
601);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v5);
v3 = std::operator<<<std::char_traits<char>>(Stream, "Unknown type parameterized test suit '");
v2 = std::operator<<<std::char_traits<char>>(v3, *(_QWORD *)v9);
std::operator<<<std::char_traits<char>>(v2, "'");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v5);
}
else
{
*(_BYTE *)(std::_Rb_tree_iterator<std::pair<std::string const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>::operator->(&v8)
+ 72) = 1;
}
}
| RegisterInstantiation:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x38],RAX
LEA RDI,[RSP + 0x6f]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x0010b920
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
LAB_0011fdff:
LEA RDI,[RSP + 0x70]
CALL 0x0010e840
JMP 0x0011fe0b
LAB_0011fe0b:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x70]
CALL 0x001481c0
LAB_0011fe1a:
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0011fe21
LAB_0011fe21:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RSP + 0x70]
CALL 0x0010ec60
LEA RDI,[RSP + 0x6f]
CALL 0x0010b500
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00148210
MOV qword ptr [RSP + 0x50],RAX
LEA RDI,[RSP + 0x90]
LEA RSI,[RSP + 0x50]
CALL 0x001481f0
XOR AL,0xff
TEST AL,0x1
JNZ 0x0011fe6b
JMP 0x0011feb8
LAB_0011fe6b:
LEA RDI,[RSP + 0x90]
CALL 0x00148240
MOV byte ptr [RAX + 0x48],0x1
JMP 0x0011ff51
LAB_0011feb8:
LEA RDX,[0x174627]
LEA RDI,[RSP + 0x4c]
MOV qword ptr [RSP + 0x10],RDI
MOV ESI,0x2
MOV ECX,0x259
CALL 0x0011b8d0
MOV RDI,qword ptr [RSP + 0x10]
LAB_0011fedd:
CALL 0x001107d0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0011fee9
LAB_0011fee9:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x1747af]
CALL 0x0010b460
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0011ff01
LAB_0011ff01:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x0010b460
MOV qword ptr [RSP],RAX
JMP 0x0011ff19
LAB_0011ff19:
MOV RDI,qword ptr [RSP]
LEA RSI,[0x1747d4]
CALL 0x0010b460
LAB_0011ff29:
JMP 0x0011ff2b
LAB_0011ff2b:
LEA RDI,[RSP + 0x4c]
CALL 0x0011ba40
JMP 0x0011ff51
LAB_0011ff51:
ADD RSP,0xa8
RET
|
/* testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation(char const*) */
void __thiscall
testing::internal::TypeParameterizedTestSuiteRegistry::RegisterInstantiation
(TypeParameterizedTestSuiteRegistry *this,char *param_1)
{
byte bVar1;
long lVar2;
ostream *poVar3;
GTestLog local_5c [4];
int8 local_58 [3];
allocator local_39;
string local_38 [32];
int8 local_18;
char *local_10;
TypeParameterizedTestSuiteRegistry *local_8;
local_10 = param_1;
local_8 = this;
std::allocator<char>::allocator();
/* try { // try from 0011fdff to 0011fe08 has its CatchHandler @ 0011fe81 */
std::__cxx11::string::string<std::allocator<char>>(local_38,param_1,&local_39);
/* try { // try from 0011fe0b to 0011fe19 has its CatchHandler @ 0011fe91 */
local_18 = std::
map<std::__cxx11::string,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>>
::find((map<std::__cxx11::string,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>>
*)this,local_38);
std::__cxx11::string::~string(local_38);
std::allocator<char>::~allocator((allocator<char> *)&local_39);
local_58[0] = std::
map<std::__cxx11::string,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>>
::end((map<std::__cxx11::string,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>>
*)this);
bVar1 = std::operator==((_Rb_tree_iterator *)&local_18,(_Rb_tree_iterator *)local_58);
if (((bVar1 ^ 0xff) & 1) == 0) {
GTestLog::GTestLog(local_5c,2,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc"
,0x259);
/* try { // try from 0011fedd to 0011ff28 has its CatchHandler @ 0011ff37 */
poVar3 = (ostream *)GTestLog::GetStream();
poVar3 = std::operator<<(poVar3,"Unknown type parameterized test suit \'");
poVar3 = std::operator<<(poVar3,local_10);
std::operator<<(poVar3,"\'");
GTestLog::~GTestLog(local_5c);
}
else {
lVar2 = std::
_Rb_tree_iterator<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>
::operator->((_Rb_tree_iterator<std::pair<std::__cxx11::string_const,testing::internal::TypeParameterizedTestSuiteRegistry::TypeParameterizedTestSuiteInfo>>
*)&local_18);
*(int1 *)(lVar2 + 0x48) = 1;
}
return;
}
| |
33,031 | string_from[abi:cxx11](bool) | monkey531[P]llama/common/common.cpp | std::string string_from(bool value) {
return value ? "true" : "false";
} | O1 | cpp | string_from[abi:cxx11](bool):
pushq %rbx
movq %rdi, %rbx
leaq 0x76a57(%rip), %rcx # 0xe79ea
leaq 0x79739(%rip), %rax # 0xea6d3
testl %esi, %esi
cmovneq %rcx, %rax
leaq 0x10(%rdi), %rcx
movq %rcx, (%rdi)
movl %esi, %edx
xorq $0x5, %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x21530
movq %rbx, %rax
popq %rbx
retq
| _Z11string_fromB5cxx11b:
push rbx
mov rbx, rdi
lea rcx, aTrue; "true"
lea rax, aAdvancedOption+0ABh; "false"
test esi, esi
cmovnz rax, rcx
lea rcx, [rdi+10h]
mov [rdi], rcx
mov edx, esi
xor rdx, 5
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
| _QWORD * string_from[abi:cxx11](_QWORD *a1, unsigned int a2)
{
char *v2; // rax
v2 = "false";
if ( a2 )
v2 = "true";
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, v2, (long long)&v2[a2 ^ 5LL]);
return a1;
}
| string_from[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RCX,[0x1e79ea]
LEA RAX,[0x1ea6d3]
TEST ESI,ESI
CMOVNZ RAX,RCX
LEA RCX,[RDI + 0x10]
MOV qword ptr [RDI],RCX
MOV EDX,ESI
XOR RDX,0x5
ADD RDX,RAX
MOV RSI,RAX
CALL 0x00121530
MOV RAX,RBX
POP RBX
RET
|
/* string_from[abi:cxx11](bool) */
int8 string_from_abi_cxx11_(bool param_1)
{
char *pcVar1;
uint in_ESI;
int7 in_register_00000039;
pcVar1 = "false";
if (in_ESI != 0) {
pcVar1 = "true";
}
*(long *)CONCAT71(in_register_00000039,param_1) = CONCAT71(in_register_00000039,param_1) + 0x10;
std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar1,pcVar1 + ((ulong)in_ESI ^ 5));
return CONCAT71(in_register_00000039,param_1);
}
| |
33,032 | 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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x18(%r14)
movq %r14, %rdi
callq 0x8d800
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xb5fca
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3endEv:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov rax, [rsi]
lea r14, [rsp+38h+var_30]
mov [r14], rax
xorps xmm0, xmm0
movups xmmword ptr [r14+8], xmm0
mov rax, 8000000000000000h
mov [r14+18h], rax
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; 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> const>::set_end(void)
mov rdi, rbx
mov rsi, r14
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_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> const>>::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> const>,ulong)
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
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> const>>::end(
long long a1,
unsigned __int8 **a2)
{
unsigned __int8 *v3; // [rsp+8h] [rbp-30h] BYREF
__int128 v4; // [rsp+10h] [rbp-28h]
unsigned long long v5; // [rsp+20h] [rbp-18h]
v3 = *a2;
v4 = 0LL;
v5 = 0x8000000000000000LL;
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> const>::set_end(&v3);
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> const>>::iteration_proxy_value(
a1,
(__int128 *)&v3,
0LL);
return a1;
}
| end:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x8],XMM0
MOV RAX,-0x8000000000000000
MOV qword ptr [R14 + 0x18],RAX
MOV RDI,R14
CALL 0x0018d800
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x001b5fca
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
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> const> >::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>const>>
::end(void)
{
int8 *in_RSI;
int8 local_30;
int8 local_28;
int8 uStack_20;
int8 local_18;
local_30 = *in_RSI;
local_28 = 0;
uStack_20 = 0;
local_18 = 0x8000000000000000;
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>
::set_end((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>
*)&local_30);
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>const>>
::iteration_proxy_value();
return;
}
| |
33,033 | js_typed_array_copyWithin | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_copyWithin(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSObject *p;
int len, to, from, final, count, shift, space;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
len = p->u.array.count;
if (JS_ToInt32Clamp(ctx, &to, argv[0], 0, len, len))
return JS_EXCEPTION;
if (JS_ToInt32Clamp(ctx, &from, argv[1], 0, len, len))
return JS_EXCEPTION;
final = len;
if (argc > 2 && !JS_IsUndefined(argv[2])) {
if (JS_ToInt32Clamp(ctx, &final, argv[2], 0, len, len))
return JS_EXCEPTION;
}
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
// RAB may have been resized by evil .valueOf method
space = p->u.array.count - max_int(to, from);
count = min_int(final - from, len - to);
count = min_int(count, space);
if (count > 0) {
shift = typed_array_size_log2(p->class_id);
memmove(p->u.array.u.uint8_ptr + (to << shift),
p->u.array.u.uint8_ptr + (from << shift),
count << shift);
}
return js_dup(this_val);
} | O3 | c | js_typed_array_copyWithin:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r15
cmpl $-0x1, %ebx
jne 0x82d21
movq %rsi, %r14
movzwl 0x6(%rsi), %eax
addl $-0x15, %eax
cmpw $0xc, %ax
jae 0x82d21
movq %r8, %r13
movl %ecx, %ebp
movq %r14, %rdi
callq 0x39ddd
testl %eax, %eax
je 0x82d54
leaq 0x20fb5(%rip), %rsi # 0xa3cd4
jmp 0x82d28
leaq 0x20f9b(%rip), %rsi # 0xa3cc3
xorl %r12d, %r12d
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %ebx
xorl %eax, %eax
orq %rax, %r12
movq %r12, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x40(%r14), %r9d
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movl %r9d, (%rsp)
leaq 0x14(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %r8d, %r8d
movl %r9d, 0x8(%rsp)
callq 0x271f4
testl %eax, %eax
jne 0x82e05
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
movl 0x8(%rsp), %r9d
movl %r9d, (%rsp)
leaq 0x10(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %r8d, %r8d
callq 0x271f4
testl %eax, %eax
jne 0x82e05
movl 0x8(%rsp), %eax
movl %eax, 0xc(%rsp)
cmpl $0x3, %ebp
movl %eax, %ebp
jl 0x82de5
movq 0x28(%r13), %rcx
cmpl $0x3, %ecx
je 0x82de5
movq 0x20(%r13), %rdx
movl %ebp, (%rsp)
leaq 0xc(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x271f4
testl %eax, %eax
jne 0x82e05
movq %r14, %rdi
callq 0x39ddd
testl %eax, %eax
je 0x82e11
leaq 0x20edc(%rip), %rsi # 0xa3cd4
xorl %r12d, %r12d
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
xorl %eax, %eax
movl $0x6, %ebx
jmp 0x82d3c
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %eax
cmpl %eax, %edx
movl %eax, %ecx
cmovgl %edx, %ecx
movl 0x40(%r14), %esi
subl %ecx, %esi
movl 0xc(%rsp), %ecx
subl %eax, %ecx
subl %edx, %ebp
cmpl %ebp, %ecx
cmovll %ecx, %ebp
cmpl %esi, %ebp
cmovgel %esi, %ebp
testl %ebp, %ebp
jle 0x82e6a
movzwl 0x6(%r14), %ecx
leaq 0x1c317(%rip), %rsi # 0x9f15f
movb -0x15(%rcx,%rsi), %cl
movq 0x38(%r14), %r8
shll %cl, %edx
movslq %edx, %rdi
shll %cl, %eax
addq %r8, %rdi
movslq %eax, %rsi
addq %r8, %rsi
shll %cl, %ebp
movslq %ebp, %rdx
callq 0xe710
incl (%r14)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %r14, %rax
movl %r14d, %r12d
jmp 0x82d3c
| js_typed_array_copyWithin:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r15, rdi
cmp ebx, 0FFFFFFFFh
jnz short loc_82D21
mov r14, rsi
movzx eax, word ptr [rsi+6]
add eax, 0FFFFFFEBh
cmp ax, 0Ch
jnb short loc_82D21
mov r13, r8
mov ebp, ecx
mov rdi, r14
call typed_array_is_oob
test eax, eax
jz short loc_82D54
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
jmp short loc_82D28
loc_82D21:
lea rsi, aNotATypedarray; "not a TypedArray"
loc_82D28:
xor r12d, r12d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov ebx, 6
xor eax, eax
loc_82D3C:
or r12, rax
mov rax, r12
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_82D54:
mov r9d, [r14+40h]
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+48h+var_48], r9d
lea rsi, [rsp+48h+var_34]
xor r12d, r12d
mov rdi, r15
xor r8d, r8d
mov [rsp+48h+var_40], r9d
call JS_ToInt32Clamp
test eax, eax
jnz loc_82E05
mov rdx, [r13+10h]
mov rcx, [r13+18h]
mov r9d, [rsp+48h+var_40]
mov [rsp+48h+var_48], r9d
lea rsi, [rsp+48h+var_38]
xor r12d, r12d
mov rdi, r15
xor r8d, r8d
call JS_ToInt32Clamp
test eax, eax
jnz short loc_82E05
mov eax, [rsp+48h+var_40]
mov [rsp+48h+var_3C], eax
cmp ebp, 3
mov ebp, eax
jl short loc_82DE5
mov rcx, [r13+28h]
cmp ecx, 3
jz short loc_82DE5
mov rdx, [r13+20h]
mov [rsp+48h+var_48], ebp
lea rsi, [rsp+48h+var_3C]
xor r12d, r12d
mov rdi, r15
xor r8d, r8d
mov r9d, ebp
call JS_ToInt32Clamp
test eax, eax
jnz short loc_82E05
loc_82DE5:
mov rdi, r14
call typed_array_is_oob
test eax, eax
jz short loc_82E11
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
xor r12d, r12d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
loc_82E05:
xor eax, eax
mov ebx, 6
jmp loc_82D3C
loc_82E11:
mov edx, [rsp+48h+var_34]
mov eax, [rsp+48h+var_38]
cmp edx, eax
mov ecx, eax
cmovg ecx, edx
mov esi, [r14+40h]
sub esi, ecx
mov ecx, [rsp+48h+var_3C]
sub ecx, eax
sub ebp, edx
cmp ecx, ebp
cmovl ebp, ecx
cmp ebp, esi
cmovge ebp, esi
test ebp, ebp
jle short loc_82E6A
movzx ecx, word ptr [r14+6]
lea rsi, typed_array_size_log2
mov cl, [rcx+rsi-15h]
mov r8, [r14+38h]
shl edx, cl
movsxd rdi, edx
shl eax, cl
add rdi, r8
movsxd rsi, eax
add rsi, r8
shl ebp, cl
movsxd rdx, ebp
call _memmove
loc_82E6A:
inc dword ptr [r14]
mov rax, 0FFFFFFFF00000000h
and rax, r14
mov r12d, r14d
jmp loc_82D3C
| unsigned long long js_typed_array_copyWithin(
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 v16; // ebp
const char *v17; // rsi
long long v18; // r12
unsigned long long v19; // rax
long long v21; // rcx
long long v22; // rdx
long long v23; // rcx
long long v24; // r8
long long v25; // r9
__m128 v26; // xmm4
__m128 v27; // xmm5
int v28; // ecx
int v29; // esi
int v30; // ebp
char v31; // cl
char v32; // [rsp+0h] [rbp-48h]
char v33; // [rsp+0h] [rbp-48h]
int v34; // [rsp+8h] [rbp-40h]
int v35; // [rsp+Ch] [rbp-3Ch] BYREF
int v36; // [rsp+10h] [rbp-38h] BYREF
int v37[13]; // [rsp+14h] [rbp-34h] BYREF
if ( (_DWORD)a3 != -1 || (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) >= 0xCu )
{
v17 = "not a TypedArray";
goto LABEL_6;
}
v16 = a4;
if ( typed_array_is_oob(a2) )
{
v17 = "ArrayBuffer is detached or resized";
LABEL_6:
v18 = 0LL;
JS_ThrowTypeError(a1, (long long)v17, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v32);
v19 = 0LL;
return v19 | v18;
}
v18 = 0LL;
v34 = *(_DWORD *)(a2 + 64);
if ( (unsigned int)JS_ToInt32Clamp(a1, v37, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v34, v34)
|| (v18 = 0LL, (unsigned int)JS_ToInt32Clamp(a1, &v36, *(_DWORD **)(a5 + 16), *(_QWORD *)(a5 + 24), 0, v34, v34))
|| (v35 = v34, v16 >= 3)
&& (v21 = *(_QWORD *)(a5 + 40), (_DWORD)v21 != 3)
&& (v18 = 0LL, (unsigned int)JS_ToInt32Clamp(a1, &v35, *(_DWORD **)(a5 + 32), v21, 0, v34, v34)) )
{
LABEL_15:
v19 = 0LL;
return v19 | v18;
}
if ( typed_array_is_oob(a2) )
{
v18 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"ArrayBuffer is detached or resized",
v22,
v23,
v24,
v25,
a7,
a8,
a9,
a10,
v26,
v27,
a13,
a14,
v33);
goto LABEL_15;
}
v28 = v36;
if ( v37[0] > v36 )
v28 = v37[0];
v29 = *(_DWORD *)(a2 + 64) - v28;
v30 = v34 - v37[0];
if ( v35 - v36 < v34 - v37[0] )
v30 = v35 - v36;
if ( v30 >= v29 )
v30 = v29;
if ( v30 > 0 )
{
v31 = typed_array_size_log2[*(unsigned __int16 *)(a2 + 6) - 21];
memmove(*(_QWORD *)(a2 + 56) + (v37[0] << v31), *(_QWORD *)(a2 + 56) + (v36 << v31), v30 << v31);
}
++*(_DWORD *)a2;
v19 = a2 & 0xFFFFFFFF00000000LL;
v18 = (unsigned int)a2;
return v19 | v18;
}
| js_typed_array_copyWithin:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R15,RDI
CMP EBX,-0x1
JNZ 0x00182d21
MOV R14,RSI
MOVZX EAX,word ptr [RSI + 0x6]
ADD EAX,-0x15
CMP AX,0xc
JNC 0x00182d21
MOV R13,R8
MOV EBP,ECX
MOV RDI,R14
CALL 0x00139ddd
TEST EAX,EAX
JZ 0x00182d54
LEA RSI,[0x1a3cd4]
JMP 0x00182d28
LAB_00182d21:
LEA RSI,[0x1a3cc3]
LAB_00182d28:
XOR R12D,R12D
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
MOV EBX,0x6
XOR EAX,EAX
LAB_00182d3c:
OR R12,RAX
MOV RAX,R12
MOV RDX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00182d54:
MOV R9D,dword ptr [R14 + 0x40]
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV dword ptr [RSP],R9D
LEA RSI,[RSP + 0x14]
XOR R12D,R12D
MOV RDI,R15
XOR R8D,R8D
MOV dword ptr [RSP + 0x8],R9D
CALL 0x001271f4
TEST EAX,EAX
JNZ 0x00182e05
MOV RDX,qword ptr [R13 + 0x10]
MOV RCX,qword ptr [R13 + 0x18]
MOV R9D,dword ptr [RSP + 0x8]
MOV dword ptr [RSP],R9D
LEA RSI,[RSP + 0x10]
XOR R12D,R12D
MOV RDI,R15
XOR R8D,R8D
CALL 0x001271f4
TEST EAX,EAX
JNZ 0x00182e05
MOV EAX,dword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0xc],EAX
CMP EBP,0x3
MOV EBP,EAX
JL 0x00182de5
MOV RCX,qword ptr [R13 + 0x28]
CMP ECX,0x3
JZ 0x00182de5
MOV RDX,qword ptr [R13 + 0x20]
MOV dword ptr [RSP],EBP
LEA RSI,[RSP + 0xc]
XOR R12D,R12D
MOV RDI,R15
XOR R8D,R8D
MOV R9D,EBP
CALL 0x001271f4
TEST EAX,EAX
JNZ 0x00182e05
LAB_00182de5:
MOV RDI,R14
CALL 0x00139ddd
TEST EAX,EAX
JZ 0x00182e11
LEA RSI,[0x1a3cd4]
XOR R12D,R12D
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
LAB_00182e05:
XOR EAX,EAX
MOV EBX,0x6
JMP 0x00182d3c
LAB_00182e11:
MOV EDX,dword ptr [RSP + 0x14]
MOV EAX,dword ptr [RSP + 0x10]
CMP EDX,EAX
MOV ECX,EAX
CMOVG ECX,EDX
MOV ESI,dword ptr [R14 + 0x40]
SUB ESI,ECX
MOV ECX,dword ptr [RSP + 0xc]
SUB ECX,EAX
SUB EBP,EDX
CMP ECX,EBP
CMOVL EBP,ECX
CMP EBP,ESI
CMOVGE EBP,ESI
TEST EBP,EBP
JLE 0x00182e6a
MOVZX ECX,word ptr [R14 + 0x6]
LEA RSI,[0x19f15f]
MOV CL,byte ptr [RCX + RSI*0x1 + -0x15]
MOV R8,qword ptr [R14 + 0x38]
SHL EDX,CL
MOVSXD RDI,EDX
SHL EAX,CL
ADD RDI,R8
MOVSXD RSI,EAX
ADD RSI,R8
SHL EBP,CL
MOVSXD RDX,EBP
CALL 0x0010e710
LAB_00182e6a:
INC dword ptr [R14]
MOV RAX,-0x100000000
AND RAX,R14
MOV R12D,R14D
JMP 0x00182d3c
|
int1 [16]
js_typed_array_copyWithin
(int8 param_1,int *param_2,int8 param_3,int param_4,int8 *param_5)
{
byte bVar1;
int iVar2;
int iVar3;
ulong uVar4;
int iVar5;
char *pcVar6;
ulong uVar7;
int1 auVar8 [16];
int local_3c;
int local_38;
int local_34;
if (((int)param_3 == -1) && ((ushort)(*(short *)((long)param_2 + 6) - 0x15U) < 0xc)) {
iVar2 = typed_array_is_oob(param_2);
if (iVar2 == 0) {
iVar2 = param_2[0x10];
iVar3 = JS_ToInt32Clamp(param_1,&local_34,*param_5,param_5[1],0,iVar2,iVar2);
if (iVar3 == 0) {
iVar3 = JS_ToInt32Clamp(param_1,&local_38,param_5[2],param_5[3],0,iVar2,iVar2);
if (iVar3 == 0) {
local_3c = iVar2;
if ((2 < param_4) && ((int)param_5[5] != 3)) {
iVar3 = JS_ToInt32Clamp(param_1,&local_3c,param_5[4],param_5[5],0,iVar2,iVar2);
if (iVar3 != 0) goto LAB_00182e05;
}
iVar3 = typed_array_is_oob(param_2);
if (iVar3 == 0) {
iVar3 = local_38;
if (local_38 < local_34) {
iVar3 = local_34;
}
iVar5 = iVar2 - local_34;
if (local_3c - local_38 < iVar2 - local_34) {
iVar5 = local_3c - local_38;
}
if (param_2[0x10] - iVar3 <= iVar5) {
iVar5 = param_2[0x10] - iVar3;
}
if (0 < iVar5) {
bVar1 = "toSorted"[(ulong)*(ushort *)((long)param_2 + 6) + 6];
memmove((void *)((long)(local_34 << (bVar1 & 0x1f)) + *(long *)(param_2 + 0xe)),
(void *)((long)(local_38 << (bVar1 & 0x1f)) + *(long *)(param_2 + 0xe)),
(long)(iVar5 << (bVar1 & 0x1f)));
}
*param_2 = *param_2 + 1;
uVar4 = (ulong)param_2 & 0xffffffff00000000;
uVar7 = (ulong)param_2 & 0xffffffff;
goto LAB_00182d3c;
}
JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized");
}
}
LAB_00182e05:
uVar7 = 0;
uVar4 = 0;
param_3 = 6;
goto LAB_00182d3c;
}
pcVar6 = "ArrayBuffer is detached or resized";
}
else {
pcVar6 = "not a TypedArray";
}
uVar7 = 0;
JS_ThrowTypeError(param_1,pcVar6);
param_3 = 6;
uVar4 = 0;
LAB_00182d3c:
auVar8._8_8_ = param_3;
auVar8._0_8_ = uVar7 | uVar4;
return auVar8;
}
| |
33,034 | namelist_free | bluesky950520[P]quickjs/qjsc.c | void namelist_free(namelist_t *lp)
{
while (lp->count > 0) {
namelist_entry_t *e = &lp->array[--lp->count];
free(e->name);
free(e->short_name);
}
free(lp->array);
lp->array = NULL;
lp->size = 0;
} | O1 | c | namelist_free:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x13b9f
movq (%rbx), %r14
decl %eax
movl %eax, 0x8(%rbx)
leaq (%rax,%rax,2), %r15
movq (%r14,%r15,8), %rdi
callq 0xe060
movq 0x8(%r14,%r15,8), %rdi
callq 0xe060
movl 0x8(%rbx), %eax
jmp 0x13b77
movq (%rbx), %rdi
callq 0xe060
movq $0x0, (%rbx)
movl $0x0, 0xc(%rbx)
popq %rbx
popq %r14
popq %r15
retq
| namelist_free:
push r15
push r14
push rbx
mov rbx, rdi
mov eax, [rdi+8]
loc_13B77:
test eax, eax
jle short loc_13B9F
mov r14, [rbx]
dec eax
mov [rbx+8], eax
lea r15, [rax+rax*2]
mov rdi, [r14+r15*8]
call _free
mov rdi, [r14+r15*8+8]
call _free
mov eax, [rbx+8]
jmp short loc_13B77
loc_13B9F:
mov rdi, [rbx]
call _free
mov qword ptr [rbx], 0
mov dword ptr [rbx+0Ch], 0
pop rbx
pop r14
pop r15
retn
| long long namelist_free(long long *a1)
{
int i; // eax
long long v2; // r14
unsigned int v3; // eax
long long v4; // r15
long long result; // rax
for ( i = *((_DWORD *)a1 + 2); i > 0; i = *((_DWORD *)a1 + 2) )
{
v2 = *a1;
v3 = i - 1;
*((_DWORD *)a1 + 2) = v3;
v4 = 3LL * v3;
free(*(_QWORD *)(v2 + 24LL * v3));
free(*(_QWORD *)(v2 + 8 * v4 + 8));
}
result = free(*a1);
*a1 = 0LL;
*((_DWORD *)a1 + 3) = 0;
return result;
}
| namelist_free:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x8]
LAB_00113b77:
TEST EAX,EAX
JLE 0x00113b9f
MOV R14,qword ptr [RBX]
DEC EAX
MOV dword ptr [RBX + 0x8],EAX
LEA R15,[RAX + RAX*0x2]
MOV RDI,qword ptr [R14 + R15*0x8]
CALL 0x0010e060
MOV RDI,qword ptr [R14 + R15*0x8 + 0x8]
CALL 0x0010e060
MOV EAX,dword ptr [RBX + 0x8]
JMP 0x00113b77
LAB_00113b9f:
MOV RDI,qword ptr [RBX]
CALL 0x0010e060
MOV qword ptr [RBX],0x0
MOV dword ptr [RBX + 0xc],0x0
POP RBX
POP R14
POP R15
RET
|
void namelist_free(long *param_1)
{
long lVar1;
int iVar2;
uint uVar3;
iVar2 = (int)param_1[1];
while (0 < iVar2) {
lVar1 = *param_1;
uVar3 = iVar2 - 1;
*(uint *)(param_1 + 1) = uVar3;
free(*(void **)(lVar1 + (ulong)uVar3 * 0x18));
free(*(void **)(lVar1 + 8 + (ulong)uVar3 * 0x18));
iVar2 = (int)param_1[1];
}
free((void *)*param_1);
*param_1 = 0;
*(int4 *)((long)param_1 + 0xc) = 0;
return;
}
| |
33,035 | namelist_free | bluesky950520[P]quickjs/qjsc.c | void namelist_free(namelist_t *lp)
{
while (lp->count > 0) {
namelist_entry_t *e = &lp->array[--lp->count];
free(e->name);
free(e->short_name);
}
free(lp->array);
lp->array = NULL;
lp->size = 0;
} | O2 | c | namelist_free:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rbx), %eax
movq (%rbx), %r14
testl %eax, %eax
jle 0xeba9
decl %eax
movl %eax, 0x8(%rbx)
imulq $0x18, %rax, %r15
movq (%r14,%r15), %rdi
callq 0xe060
movq 0x8(%r14,%r15), %rdi
callq 0xe060
jmp 0xeb81
movq %r14, %rdi
callq 0xe060
andq $0x0, (%rbx)
andl $0x0, 0xc(%rbx)
popq %rbx
popq %r14
popq %r15
retq
| namelist_free:
push r15
push r14
push rbx
mov rbx, rdi
loc_EB81:
mov eax, [rbx+8]
mov r14, [rbx]
test eax, eax
jle short loc_EBA9
dec eax
mov [rbx+8], eax
imul r15, rax, 18h
mov rdi, [r14+r15]
call _free
mov rdi, [r14+r15+8]
call _free
jmp short loc_EB81
loc_EBA9:
mov rdi, r14
call _free
and qword ptr [rbx], 0
and dword ptr [rbx+0Ch], 0
pop rbx
pop r14
pop r15
retn
| long long namelist_free(long long *a1)
{
int v1; // eax
long long v2; // r14
long long v3; // rax
long long v4; // r15
long long result; // rax
while ( 1 )
{
v1 = *((_DWORD *)a1 + 2);
v2 = *a1;
if ( v1 <= 0 )
break;
v3 = (unsigned int)(v1 - 1);
*((_DWORD *)a1 + 2) = v3;
v4 = 24 * v3;
free(*(_QWORD *)(v2 + 24 * v3));
free(*(_QWORD *)(v2 + v4 + 8));
}
result = free(*a1);
*a1 = 0LL;
*((_DWORD *)a1 + 3) = 0;
return result;
}
| namelist_free:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LAB_0010eb81:
MOV EAX,dword ptr [RBX + 0x8]
MOV R14,qword ptr [RBX]
TEST EAX,EAX
JLE 0x0010eba9
DEC EAX
MOV dword ptr [RBX + 0x8],EAX
IMUL R15,RAX,0x18
MOV RDI,qword ptr [R14 + R15*0x1]
CALL 0x0010e060
MOV RDI,qword ptr [R14 + R15*0x1 + 0x8]
CALL 0x0010e060
JMP 0x0010eb81
LAB_0010eba9:
MOV RDI,R14
CALL 0x0010e060
AND qword ptr [RBX],0x0
AND dword ptr [RBX + 0xc],0x0
POP RBX
POP R14
POP R15
RET
|
void namelist_free(int8 *param_1)
{
void *__ptr;
uint uVar1;
long lVar2;
while( true ) {
__ptr = (void *)*param_1;
if (*(int *)(param_1 + 1) < 1) break;
uVar1 = *(int *)(param_1 + 1) - 1;
*(uint *)(param_1 + 1) = uVar1;
lVar2 = (ulong)uVar1 * 0x18;
free(*(void **)((long)__ptr + lVar2));
free(*(void **)((long)__ptr + lVar2 + 8));
}
free(__ptr);
*param_1 = 0;
*(int4 *)((long)param_1 + 0xc) = 0;
return;
}
| |
33,036 | ggml_compute_forward_add1_f16_f16 | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_compute_forward_add1_f16_f16(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
const struct ggml_tensor * src1 = dst->src[1];
GGML_ASSERT(ggml_are_same_shape(src0, dst));
GGML_ASSERT(ggml_is_scalar(src1));
// scalar to add
const float v = GGML_FP16_TO_FP32(*(ggml_fp16_t *) src1->data);
const int ith = params->ith;
const int nth = params->nth;
const int nr = ggml_nrows(src0);
GGML_TENSOR_UNARY_OP_LOCALS
GGML_ASSERT(src0->type == GGML_TYPE_F16);
GGML_ASSERT(src1->type == GGML_TYPE_F16);
GGML_ASSERT(dst->type == GGML_TYPE_F16);
GGML_ASSERT( nb0 == sizeof(ggml_fp16_t));
GGML_ASSERT(nb00 == sizeof(ggml_fp16_t));
// rows per thread
const int dr = (nr + nth - 1)/nth;
// row range for this thread
const int ir0 = dr*ith;
const int ir1 = MIN(ir0 + dr, nr);
for (int ir = ir0; ir < ir1; ++ir) {
// src0 and dst are same shape => same indices
const int i3 = ir/(ne2*ne1);
const int i2 = (ir - i3*ne2*ne1)/ne1;
const int i1 = (ir - i3*ne2*ne1 - i2*ne1);
ggml_fp16_t * dst_ptr = (ggml_fp16_t *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*nb1 );
ggml_fp16_t * src0_ptr = (ggml_fp16_t *) ((char *) src0->data + i3*nb03 + i2*nb02 + i1*nb01);
for (int i = 0; i < ne0; i++) {
dst_ptr[i] = GGML_FP32_TO_FP16(GGML_FP16_TO_FP32(src0_ptr[i]) + v);
}
}
} | O0 | c | ggml_compute_forward_add1_f16_f16:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xe260
testb $0x1, %al
jne 0x21be3
leaq 0x51f99(%rip), %rdi # 0x73b62
movl $0x11eb, %esi # imm = 0x11EB
leaq 0x51fec(%rip), %rdx # 0x73bc1
leaq 0x526de(%rip), %rcx # 0x742ba
movb $0x0, %al
callq 0xe270
movq -0x20(%rbp), %rdi
callq 0xe290
testb $0x1, %al
jne 0x21c11
leaq 0x51f6b(%rip), %rdi # 0x73b62
movl $0x11ec, %esi # imm = 0x11EC
leaq 0x51fbe(%rip), %rdx # 0x73bc1
leaq 0x52933(%rip), %rcx # 0x7453d
movb $0x0, %al
callq 0xe270
movq -0x20(%rbp), %rax
movq 0xf8(%rax), %rax
movzwl (%rax), %edi
callq 0xfab0
vmovss %xmm0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
callq 0xdc20
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
je 0x21d44
leaq 0x51e38(%rip), %rdi # 0x73b62
movl $0x11f8, %esi # imm = 0x11F8
leaq 0x51e8b(%rip), %rdx # 0x73bc1
leaq 0x52609(%rip), %rcx # 0x74346
movb $0x0, %al
callq 0xe270
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
je 0x21d6e
leaq 0x51e0e(%rip), %rdi # 0x73b62
movl $0x11f9, %esi # imm = 0x11F9
leaq 0x51e61(%rip), %rdx # 0x73bc1
leaq 0x525fb(%rip), %rcx # 0x74362
movb $0x0, %al
callq 0xe270
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
je 0x21d98
leaq 0x51de4(%rip), %rdi # 0x73b62
movl $0x11fa, %esi # imm = 0x11FA
leaq 0x51e37(%rip), %rdx # 0x73bc1
leaq 0x537f3(%rip), %rcx # 0x75584
movb $0x0, %al
callq 0xe270
cmpq $0x2, -0x98(%rbp)
je 0x21dc3
leaq 0x51db9(%rip), %rdi # 0x73b62
movl $0x11fc, %esi # imm = 0x11FC
leaq 0x51e0c(%rip), %rdx # 0x73bc1
leaq 0x525c2(%rip), %rcx # 0x7437e
movb $0x0, %al
callq 0xe270
cmpq $0x2, -0x58(%rbp)
je 0x21deb
leaq 0x51d91(%rip), %rdi # 0x73b62
movl $0x11fd, %esi # imm = 0x11FD
leaq 0x51de4(%rip), %rdx # 0x73bc1
leaq 0x525b5(%rip), %rcx # 0x74399
movb $0x0, %al
callq 0xe270
movl -0x30(%rbp), %eax
addl -0x2c(%rbp), %eax
subl $0x1, %eax
cltd
idivl -0x2c(%rbp)
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
imull -0x28(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
addl -0xb4(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x21e33
movl -0xb8(%rbp), %eax
addl -0xb4(%rbp), %eax
movl %eax, -0x104(%rbp)
jmp 0x21e3c
movl -0x30(%rbp), %eax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %eax
movl %eax, -0xbc(%rbp)
movl -0xb8(%rbp), %eax
movl %eax, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
cmpl -0xbc(%rbp), %eax
jge 0x2200d
movslq -0xc0(%rbp), %rax
movq -0x88(%rbp), %rcx
imulq -0x80(%rbp), %rcx
cqto
idivq %rcx
movl %eax, -0xc4(%rbp)
movslq -0xc0(%rbp), %rax
movslq -0xc4(%rbp), %rcx
imulq -0x88(%rbp), %rcx
imulq -0x80(%rbp), %rcx
subq %rcx, %rax
cqto
idivq -0x80(%rbp)
movl %eax, -0xc8(%rbp)
movslq -0xc0(%rbp), %rax
movslq -0xc4(%rbp), %rcx
imulq -0x88(%rbp), %rcx
imulq -0x80(%rbp), %rcx
subq %rcx, %rax
movslq -0xc8(%rbp), %rcx
imulq -0x80(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0xcc(%rbp)
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movslq -0xc4(%rbp), %rcx
imulq -0xb0(%rbp), %rcx
addq %rcx, %rax
movslq -0xc8(%rbp), %rcx
imulq -0xa8(%rbp), %rcx
addq %rcx, %rax
movslq -0xcc(%rbp), %rcx
imulq -0xa0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xd8(%rbp)
movq -0x18(%rbp), %rax
movq 0xf8(%rax), %rax
movslq -0xc4(%rbp), %rcx
imulq -0x70(%rbp), %rcx
addq %rcx, %rax
movslq -0xc8(%rbp), %rcx
imulq -0x68(%rbp), %rcx
addq %rcx, %rax
movslq -0xcc(%rbp), %rcx
imulq -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movl $0x0, -0xe4(%rbp)
movslq -0xe4(%rbp), %rax
cmpq -0x78(%rbp), %rax
jge 0x21ff7
movq -0xe0(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movzwl (%rax,%rcx,2), %edi
callq 0xfab0
vmovss -0x24(%rbp), %xmm1
vaddss %xmm1, %xmm0, %xmm1
vxorps %xmm0, %xmm0, %xmm0
vblendps $0x1, %xmm1, %xmm0, %xmm0 # xmm0 = xmm1[0],xmm0[1,2,3]
vmovaps %xmm0, -0x100(%rbp)
vmovaps -0x100(%rbp), %xmm0
vcvtps2ph $0x0, %xmm0, %xmm0
vmovd %xmm0, %eax
movw %ax, -0xe6(%rbp)
movw -0xe6(%rbp), %dx
movq -0xd8(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x21f72
jmp 0x21ff9
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x21e54
addq $0x110, %rsp # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ggml_compute_forward_add1_f16_f16:
push rbp
mov rbp, rsp
sub rsp, 110h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax+0A0h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_10]
call _ggml_are_same_shape
test al, 1
jnz short loc_21BE3
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 11EBh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanRepeatS+1Fh; "ggml_are_same_shape(src0, dst)"
mov al, 0
call _ggml_abort
loc_21BE3:
mov rdi, [rbp+var_20]
call _ggml_is_scalar
test al, 1
jnz short loc_21C11
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 11ECh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsScalarSr; "ggml_is_scalar(src1)"
mov al, 0
call _ggml_abort
loc_21C11:
mov rax, [rbp+var_20]
mov rax, [rax+0F8h]
movzx edi, word ptr [rax]
call ggml_lookup_fp16_to_fp32
vmovss [rbp+var_24], xmm0
mov rax, [rbp+var_8]
mov eax, [rax]
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
mov eax, [rax+4]
mov [rbp+var_2C], eax
mov rdi, [rbp+var_18]
call _ggml_nrows
mov [rbp+var_30], eax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov rax, [rax+28h]
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
mov rax, [rax+30h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
mov rax, [rax+40h]
mov [rbp+var_68], rax
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov [rbp+var_70], rax
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_78], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_80], rax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_88], rax
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_90], rax
mov rax, [rbp+var_10]
mov rax, [rax+30h]
mov [rbp+var_98], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rbp+var_A0], rax
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov [rbp+var_A8], rax
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov [rbp+var_B0], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax], 1
jz short loc_21D44
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 11F8h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc0TypeGgmlTy; "src0->type == GGML_TYPE_F16"
mov al, 0
call _ggml_abort
loc_21D44:
mov rax, [rbp+var_20]
cmp dword ptr [rax], 1
jz short loc_21D6E
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 11F9h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc1TypeGgmlTy_1; "src1->type == GGML_TYPE_F16"
mov al, 0
call _ggml_abort
loc_21D6E:
mov rax, [rbp+var_10]
cmp dword ptr [rax], 1
jz short loc_21D98
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 11FAh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstTypeGgmlTyp_0+1Eh; "dst->type == GGML_TYPE_F16"
mov al, 0
call _ggml_abort
loc_21D98:
cmp [rbp+var_98], 2
jz short loc_21DC3
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 11FCh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNb0SizeofGgmlF; "nb0 == sizeof(ggml_fp16_t)"
mov al, 0
call _ggml_abort
loc_21DC3:
cmp [rbp+var_58], 2
jz short loc_21DEB
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 11FDh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNb00SizeofGgml; "nb00 == sizeof(ggml_fp16_t)"
mov al, 0
call _ggml_abort
loc_21DEB:
mov eax, [rbp+var_30]
add eax, [rbp+var_2C]
sub eax, 1
cdq
idiv [rbp+var_2C]
mov [rbp+var_B4], eax
mov eax, [rbp+var_B4]
imul eax, [rbp+var_28]
mov [rbp+var_B8], eax
mov eax, [rbp+var_B8]
add eax, [rbp+var_B4]
cmp eax, [rbp+var_30]
jge short loc_21E33
mov eax, [rbp+var_B8]
add eax, [rbp+var_B4]
mov [rbp+var_104], eax
jmp short loc_21E3C
loc_21E33:
mov eax, [rbp+var_30]
mov [rbp+var_104], eax
loc_21E3C:
mov eax, [rbp+var_104]
mov [rbp+var_BC], eax
mov eax, [rbp+var_B8]
mov [rbp+var_C0], eax
loc_21E54:
mov eax, [rbp+var_C0]
cmp eax, [rbp+var_BC]
jge loc_2200D
movsxd rax, [rbp+var_C0]
mov rcx, [rbp+var_88]
imul rcx, [rbp+var_80]
cqo
idiv rcx
mov [rbp+var_C4], eax
movsxd rax, [rbp+var_C0]
movsxd rcx, [rbp+var_C4]
imul rcx, [rbp+var_88]
imul rcx, [rbp+var_80]
sub rax, rcx
cqo
idiv [rbp+var_80]
mov [rbp+var_C8], eax
movsxd rax, [rbp+var_C0]
movsxd rcx, [rbp+var_C4]
imul rcx, [rbp+var_88]
imul rcx, [rbp+var_80]
sub rax, rcx
movsxd rcx, [rbp+var_C8]
imul rcx, [rbp+var_80]
sub rax, rcx
mov [rbp+var_CC], eax
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
movsxd rcx, [rbp+var_C4]
imul rcx, [rbp+var_B0]
add rax, rcx
movsxd rcx, [rbp+var_C8]
imul rcx, [rbp+var_A8]
add rax, rcx
movsxd rcx, [rbp+var_CC]
imul rcx, [rbp+var_A0]
add rax, rcx
mov [rbp+var_D8], rax
mov rax, [rbp+var_18]
mov rax, [rax+0F8h]
movsxd rcx, [rbp+var_C4]
imul rcx, [rbp+var_70]
add rax, rcx
movsxd rcx, [rbp+var_C8]
imul rcx, [rbp+var_68]
add rax, rcx
movsxd rcx, [rbp+var_CC]
imul rcx, [rbp+var_60]
add rax, rcx
mov [rbp+var_E0], rax
mov [rbp+var_E4], 0
loc_21F72:
movsxd rax, [rbp+var_E4]
cmp rax, [rbp+var_78]
jge short loc_21FF7
mov rax, [rbp+var_E0]
movsxd rcx, [rbp+var_E4]
movzx edi, word ptr [rax+rcx*2]
call ggml_lookup_fp16_to_fp32
vmovss xmm1, [rbp+var_24]
vaddss xmm1, xmm0, xmm1
vxorps xmm0, xmm0, xmm0
vblendps xmm0, xmm0, xmm1, 1
vmovaps [rbp+var_100], xmm0
vmovaps xmm0, [rbp+var_100]
vcvtps2ph xmm0, xmm0, 0
vmovd eax, xmm0
mov [rbp+var_E6], ax
mov dx, [rbp+var_E6]
mov rax, [rbp+var_D8]
movsxd rcx, [rbp+var_E4]
mov [rax+rcx*2], dx
mov eax, [rbp+var_E4]
add eax, 1
mov [rbp+var_E4], eax
jmp loc_21F72
loc_21FF7:
jmp short $+2
loc_21FF9:
mov eax, [rbp+var_C0]
add eax, 1
mov [rbp+var_C0], eax
jmp loc_21E54
loc_2200D:
add rsp, 110h
pop rbp
retn
| long long ggml_compute_forward_add1_f16_f16(int *a1, long long a2)
{
long long result; // rax
int v12; // [rsp+Ch] [rbp-104h]
int j; // [rsp+2Ch] [rbp-E4h]
long long v15; // [rsp+30h] [rbp-E0h]
long long v16; // [rsp+38h] [rbp-D8h]
int v17; // [rsp+44h] [rbp-CCh]
int v18; // [rsp+48h] [rbp-C8h]
int v19; // [rsp+4Ch] [rbp-C4h]
int i; // [rsp+50h] [rbp-C0h]
int v21; // [rsp+5Ch] [rbp-B4h]
long long v22; // [rsp+60h] [rbp-B0h]
long long v23; // [rsp+68h] [rbp-A8h]
long long v24; // [rsp+70h] [rbp-A0h]
long long v25; // [rsp+78h] [rbp-98h]
long long v26; // [rsp+88h] [rbp-88h]
long long v27; // [rsp+90h] [rbp-80h]
long long v28; // [rsp+98h] [rbp-78h]
long long v29; // [rsp+A0h] [rbp-70h]
long long v30; // [rsp+A8h] [rbp-68h]
long long v31; // [rsp+B0h] [rbp-60h]
long long v32; // [rsp+B8h] [rbp-58h]
int v33; // [rsp+E0h] [rbp-30h]
int v34; // [rsp+E4h] [rbp-2Ch]
int v35; // [rsp+E8h] [rbp-28h]
long long v37; // [rsp+F0h] [rbp-20h]
long long v38; // [rsp+F8h] [rbp-18h]
v38 = *(_QWORD *)(a2 + 152);
v37 = *(_QWORD *)(a2 + 160);
if ( (ggml_are_same_shape(v38, a2) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4587LL,
"GGML_ASSERT(%s) failed",
"ggml_are_same_shape(src0, dst)");
if ( (ggml_is_scalar(v37) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4588LL,
"GGML_ASSERT(%s) failed",
"ggml_is_scalar(src1)");
_XMM0 = ggml_lookup_fp16_to_fp32(**(_WORD **)(v37 + 248));
__asm { vmovss [rbp+var_24], xmm0 }
v35 = *a1;
v34 = a1[1];
v33 = ggml_nrows(v38);
v32 = *(_QWORD *)(v38 + 48);
v31 = *(_QWORD *)(v38 + 56);
v30 = *(_QWORD *)(v38 + 64);
v29 = *(_QWORD *)(v38 + 72);
v28 = *(_QWORD *)(a2 + 16);
v27 = *(_QWORD *)(a2 + 24);
v26 = *(_QWORD *)(a2 + 32);
v25 = *(_QWORD *)(a2 + 48);
v24 = *(_QWORD *)(a2 + 56);
v23 = *(_QWORD *)(a2 + 64);
v22 = *(_QWORD *)(a2 + 72);
if ( *(_DWORD *)v38 != 1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4600LL,
"GGML_ASSERT(%s) failed",
"src0->type == GGML_TYPE_F16");
if ( *(_DWORD *)v37 != 1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4601LL,
"GGML_ASSERT(%s) failed",
"src1->type == GGML_TYPE_F16");
if ( *(_DWORD *)a2 != 1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4602LL,
"GGML_ASSERT(%s) failed",
"dst->type == GGML_TYPE_F16");
if ( v25 != 2 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4604LL,
"GGML_ASSERT(%s) failed",
"nb0 == sizeof(ggml_fp16_t)");
if ( v32 != 2 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4605LL,
"GGML_ASSERT(%s) failed",
"nb00 == sizeof(ggml_fp16_t)");
v21 = (v34 + v33 - 1) / v34;
if ( v21 + v35 * v21 >= v33 )
v12 = v33;
else
v12 = v21 + v35 * ((v34 + v33 - 1) / v34);
for ( i = v35 * ((v34 + v33 - 1) / v34); ; ++i )
{
result = (unsigned int)i;
if ( i >= v12 )
break;
v19 = i / (v27 * v26);
v18 = (i - v27 * v26 * v19) / v27;
v17 = (i - v27 * v26 * v19) % v27;
v16 = v24 * v17 + v23 * v18 + v22 * v19 + *(_QWORD *)(a2 + 248);
v15 = v31 * v17 + v30 * v18 + v29 * v19 + *(_QWORD *)(v38 + 248);
for ( j = 0; j < v28; ++j )
{
_XMM0 = ggml_lookup_fp16_to_fp32(*(_WORD *)(v15 + 2LL * j));
__asm
{
vmovss xmm1, [rbp+var_24]
vaddss xmm1, xmm0, xmm1
vxorps xmm0, xmm0, xmm0
vblendps xmm0, xmm0, xmm1, 1
vmovaps [rbp+var_100], xmm0
vmovaps xmm0, [rbp+var_100]
vcvtps2ph xmm0, xmm0, 0
vmovd eax, xmm0
}
*(_WORD *)(v16 + 2LL * j) = _EAX;
}
}
return result;
}
| ggml_compute_forward_add1_f16_f16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x110
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0010e260
TEST AL,0x1
JNZ 0x00121be3
LEA RDI,[0x173b62]
MOV ESI,0x11eb
LEA RDX,[0x173bc1]
LEA RCX,[0x1742ba]
MOV AL,0x0
CALL 0x0010e270
LAB_00121be3:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010e290
TEST AL,0x1
JNZ 0x00121c11
LEA RDI,[0x173b62]
MOV ESI,0x11ec
LEA RDX,[0x173bc1]
LEA RCX,[0x17453d]
MOV AL,0x0
CALL 0x0010e270
LAB_00121c11:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xf8]
MOVZX EDI,word ptr [RAX]
CALL 0x0010fab0
VMOVSS dword ptr [RBP + -0x24],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0010dc20
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x1
JZ 0x00121d44
LEA RDI,[0x173b62]
MOV ESI,0x11f8
LEA RDX,[0x173bc1]
LEA RCX,[0x174346]
MOV AL,0x0
CALL 0x0010e270
LAB_00121d44:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x1
JZ 0x00121d6e
LEA RDI,[0x173b62]
MOV ESI,0x11f9
LEA RDX,[0x173bc1]
LEA RCX,[0x174362]
MOV AL,0x0
CALL 0x0010e270
LAB_00121d6e:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX],0x1
JZ 0x00121d98
LEA RDI,[0x173b62]
MOV ESI,0x11fa
LEA RDX,[0x173bc1]
LEA RCX,[0x175584]
MOV AL,0x0
CALL 0x0010e270
LAB_00121d98:
CMP qword ptr [RBP + -0x98],0x2
JZ 0x00121dc3
LEA RDI,[0x173b62]
MOV ESI,0x11fc
LEA RDX,[0x173bc1]
LEA RCX,[0x17437e]
MOV AL,0x0
CALL 0x0010e270
LAB_00121dc3:
CMP qword ptr [RBP + -0x58],0x2
JZ 0x00121deb
LEA RDI,[0x173b62]
MOV ESI,0x11fd
LEA RDX,[0x173bc1]
LEA RCX,[0x174399]
MOV AL,0x0
CALL 0x0010e270
LAB_00121deb:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,dword ptr [RBP + -0x2c]
SUB EAX,0x1
CDQ
IDIV dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0xb4],EAX
MOV EAX,dword ptr [RBP + -0xb4]
IMUL EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0xb8],EAX
MOV EAX,dword ptr [RBP + -0xb8]
ADD EAX,dword ptr [RBP + -0xb4]
CMP EAX,dword ptr [RBP + -0x30]
JGE 0x00121e33
MOV EAX,dword ptr [RBP + -0xb8]
ADD EAX,dword ptr [RBP + -0xb4]
MOV dword ptr [RBP + -0x104],EAX
JMP 0x00121e3c
LAB_00121e33:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x104],EAX
LAB_00121e3c:
MOV EAX,dword ptr [RBP + -0x104]
MOV dword ptr [RBP + -0xbc],EAX
MOV EAX,dword ptr [RBP + -0xb8]
MOV dword ptr [RBP + -0xc0],EAX
LAB_00121e54:
MOV EAX,dword ptr [RBP + -0xc0]
CMP EAX,dword ptr [RBP + -0xbc]
JGE 0x0012200d
MOVSXD RAX,dword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RBP + -0x88]
IMUL RCX,qword ptr [RBP + -0x80]
CQO
IDIV RCX
MOV dword ptr [RBP + -0xc4],EAX
MOVSXD RAX,dword ptr [RBP + -0xc0]
MOVSXD RCX,dword ptr [RBP + -0xc4]
IMUL RCX,qword ptr [RBP + -0x88]
IMUL RCX,qword ptr [RBP + -0x80]
SUB RAX,RCX
CQO
IDIV qword ptr [RBP + -0x80]
MOV dword ptr [RBP + -0xc8],EAX
MOVSXD RAX,dword ptr [RBP + -0xc0]
MOVSXD RCX,dword ptr [RBP + -0xc4]
IMUL RCX,qword ptr [RBP + -0x88]
IMUL RCX,qword ptr [RBP + -0x80]
SUB RAX,RCX
MOVSXD RCX,dword ptr [RBP + -0xc8]
IMUL RCX,qword ptr [RBP + -0x80]
SUB RAX,RCX
MOV dword ptr [RBP + -0xcc],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RBP + -0xc4]
IMUL RCX,qword ptr [RBP + -0xb0]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RBP + -0xc8]
IMUL RCX,qword ptr [RBP + -0xa8]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RBP + -0xcc]
IMUL RCX,qword ptr [RBP + -0xa0]
ADD RAX,RCX
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RBP + -0xc4]
IMUL RCX,qword ptr [RBP + -0x70]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RBP + -0xc8]
IMUL RCX,qword ptr [RBP + -0x68]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RBP + -0xcc]
IMUL RCX,qword ptr [RBP + -0x60]
ADD RAX,RCX
MOV qword ptr [RBP + -0xe0],RAX
MOV dword ptr [RBP + -0xe4],0x0
LAB_00121f72:
MOVSXD RAX,dword ptr [RBP + -0xe4]
CMP RAX,qword ptr [RBP + -0x78]
JGE 0x00121ff7
MOV RAX,qword ptr [RBP + -0xe0]
MOVSXD RCX,dword ptr [RBP + -0xe4]
MOVZX EDI,word ptr [RAX + RCX*0x2]
CALL 0x0010fab0
VMOVSS XMM1,dword ptr [RBP + -0x24]
VADDSS XMM1,XMM0,XMM1
VXORPS XMM0,XMM0,XMM0
VBLENDPS XMM0,XMM0,XMM1,0x1
VMOVAPS xmmword ptr [RBP + -0x100],XMM0
VMOVAPS XMM0,xmmword ptr [RBP + -0x100]
VCVTPS2PH XMM0,XMM0,0x0
VMOVD EAX,XMM0
MOV word ptr [RBP + -0xe6],AX
MOV DX,word ptr [RBP + -0xe6]
MOV RAX,qword ptr [RBP + -0xd8]
MOVSXD RCX,dword ptr [RBP + -0xe4]
MOV word ptr [RAX + RCX*0x2],DX
MOV EAX,dword ptr [RBP + -0xe4]
ADD EAX,0x1
MOV dword ptr [RBP + -0xe4],EAX
JMP 0x00121f72
LAB_00121ff7:
JMP 0x00121ff9
LAB_00121ff9:
MOV EAX,dword ptr [RBP + -0xc0]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc0],EAX
JMP 0x00121e54
LAB_0012200d:
ADD RSP,0x110
POP RBP
RET
|
void ggml_compute_forward_add1_f16_f16(int *param_1,int *param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
long lVar13;
int iVar14;
int iVar15;
int iVar16;
ulong uVar17;
float fVar18;
float fVar19;
int1 auVar20 [16];
int local_10c;
int local_ec;
int local_c8;
piVar1 = *(int **)(param_2 + 0x26);
piVar2 = *(int **)(param_2 + 0x28);
uVar17 = ggml_are_same_shape(piVar1,param_2);
if ((uVar17 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x11eb,"GGML_ASSERT(%s) failed","ggml_are_same_shape(src0, dst)");
}
uVar17 = ggml_is_scalar(piVar2);
if ((uVar17 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x11ec,"GGML_ASSERT(%s) failed","ggml_is_scalar(src1)");
}
fVar18 = (float)ggml_lookup_fp16_to_fp32(**(int2 **)(piVar2 + 0x3e));
local_c8 = *param_1;
iVar14 = param_1[1];
local_10c = ggml_nrows(piVar1);
lVar3 = *(long *)(piVar1 + 0xc);
lVar4 = *(long *)(piVar1 + 0xe);
lVar5 = *(long *)(piVar1 + 0x10);
lVar6 = *(long *)(piVar1 + 0x12);
lVar7 = *(long *)(param_2 + 4);
lVar8 = *(long *)(param_2 + 6);
lVar9 = *(long *)(param_2 + 8);
lVar10 = *(long *)(param_2 + 0xc);
lVar11 = *(long *)(param_2 + 0xe);
lVar12 = *(long *)(param_2 + 0x10);
lVar13 = *(long *)(param_2 + 0x12);
if (*piVar1 != 1) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x11f8,"GGML_ASSERT(%s) failed","src0->type == GGML_TYPE_F16");
}
if (*piVar2 != 1) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x11f9,"GGML_ASSERT(%s) failed","src1->type == GGML_TYPE_F16");
}
if (*param_2 != 1) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x11fa,"GGML_ASSERT(%s) failed","dst->type == GGML_TYPE_F16");
}
if (lVar10 != 2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x11fc,"GGML_ASSERT(%s) failed","nb0 == sizeof(ggml_fp16_t)");
}
if (lVar3 != 2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x11fd,"GGML_ASSERT(%s) failed","nb00 == sizeof(ggml_fp16_t)");
}
iVar14 = (local_10c + iVar14 + -1) / iVar14;
local_c8 = iVar14 * local_c8;
if (local_c8 + iVar14 < local_10c) {
local_10c = local_c8 + iVar14;
}
for (; local_c8 < local_10c; local_c8 = local_c8 + 1) {
iVar14 = (int)((long)local_c8 / (lVar9 * lVar8));
iVar15 = (int)(((long)local_c8 - iVar14 * lVar9 * lVar8) / lVar8);
iVar16 = (local_c8 - iVar14 * (int)lVar9 * (int)lVar8) - iVar15 * (int)lVar8;
lVar3 = *(long *)(param_2 + 0x3e);
lVar10 = *(long *)(piVar1 + 0x3e);
for (local_ec = 0; local_ec < lVar7; local_ec = local_ec + 1) {
fVar19 = (float)ggml_lookup_fp16_to_fp32
(*(int2 *)
(lVar10 + iVar14 * lVar6 + iVar15 * lVar5 + iVar16 * lVar4 +
(long)local_ec * 2));
auVar20 = vblendps_avx(ZEXT816(0) << 0x40,ZEXT416((uint)(fVar19 + fVar18)),1);
auVar20 = vcvtps2ph_f16c(auVar20,0);
*(short *)(lVar3 + iVar14 * lVar13 + iVar15 * lVar12 + iVar16 * lVar11 + (long)local_ec * 2) =
auVar20._0_2_;
}
}
return;
}
| |
33,037 | my_scan_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_scan_utf32(CHARSET_INFO *cs,
const char *str, const char *end, int sequence_type)
{
const char *str0= str;
switch (sequence_type)
{
case MY_SEQ_SPACES:
for ( ; str < end; )
{
my_wc_t wc;
int res= my_utf32_uni(cs, &wc, (uchar*) str, (uchar*) end);
if (res < 0 || wc != ' ')
break;
str+= res;
}
return (size_t) (str - str0);
case MY_SEQ_NONSPACES:
DBUG_ASSERT(0); /* Not implemented */
/* pass through */
default:
return 0;
}
} | O3 | c | my_scan_utf32:
cmpl $0x2, %ecx
jne 0xc7d91
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rcx
movq %rcx, %rax
cmpq %rdx, %rcx
jae 0xc7d8c
leaq 0x4(%rax), %rcx
cmpq %rdx, %rcx
ja 0xc7d8c
movzbl (%rax), %ecx
shll $0x18, %ecx
movzbl 0x1(%rax), %edi
shll $0x10, %edi
orl %ecx, %edi
xorl %ecx, %ecx
cmpl $0x110000, %edi # imm = 0x110000
setb %cl
movzwl 0x2(%rax), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
orl %edi, %r8d
leaq (%rax,%rcx,4), %rcx
cmpl $0x20, %r8d
je 0xc7d46
subq %rsi, %rax
popq %rbp
retq
xorl %eax, %eax
retq
| my_scan_utf32:
cmp ecx, 2
jnz short loc_C7D91
push rbp
mov rbp, rsp
mov rcx, rsi
loc_C7D46:
mov rax, rcx
cmp rcx, rdx
jnb short loc_C7D8C
lea rcx, [rax+4]
cmp rcx, rdx
ja short loc_C7D8C
movzx ecx, byte ptr [rax]
shl ecx, 18h
movzx edi, byte ptr [rax+1]
shl edi, 10h
or edi, ecx
xor ecx, ecx
cmp edi, offset unk_110000
setb cl
movzx r8d, word ptr [rax+2]
rol r8w, 8
movzx r8d, r8w
or r8d, edi
lea rcx, [rax+rcx*4]
cmp r8d, 20h ; ' '
jz short loc_C7D46
loc_C7D8C:
sub rax, rsi
pop rbp
retn
loc_C7D91:
xor eax, eax
retn
| long long my_scan_utf32(long long a1, unsigned __int8 *a2, unsigned long long a3, int a4)
{
unsigned __int8 *v4; // rcx
unsigned __int8 *v5; // rax
unsigned int v6; // edi
if ( a4 != 2 )
return 0LL;
v4 = a2;
do
{
v5 = v4;
if ( (unsigned long long)v4 >= a3 )
break;
if ( (unsigned long long)(v4 + 4) > a3 )
break;
v6 = (*v4 << 24) | (v4[1] << 16);
v4 += 4 * (v6 < (unsigned int)&unk_110000);
}
while ( (v6 | (unsigned __int16)__ROL2__(*((_WORD *)v5 + 1), 8)) == 0x20 );
return v5 - a2;
}
| my_scan_utf32:
CMP ECX,0x2
JNZ 0x001c7d91
PUSH RBP
MOV RBP,RSP
MOV RCX,RSI
LAB_001c7d46:
MOV RAX,RCX
CMP RCX,RDX
JNC 0x001c7d8c
LEA RCX,[RAX + 0x4]
CMP RCX,RDX
JA 0x001c7d8c
MOVZX ECX,byte ptr [RAX]
SHL ECX,0x18
MOVZX EDI,byte ptr [RAX + 0x1]
SHL EDI,0x10
OR EDI,ECX
XOR ECX,ECX
CMP EDI,0x110000
SETC CL
MOVZX R8D,word ptr [RAX + 0x2]
ROL R8W,0x8
MOVZX R8D,R8W
OR R8D,EDI
LEA RCX,[RAX + RCX*0x4]
CMP R8D,0x20
JZ 0x001c7d46
LAB_001c7d8c:
SUB RAX,RSI
POP RBP
RET
LAB_001c7d91:
XOR EAX,EAX
RET
|
long my_scan_utf32(int8 param_1,byte *param_2,byte *param_3,int param_4)
{
byte *pbVar1;
byte *pbVar2;
uint uVar3;
pbVar1 = param_2;
if (param_4 != 2) {
return 0;
}
do {
pbVar2 = pbVar1;
if ((param_3 <= pbVar2) || (param_3 < pbVar2 + 4)) break;
uVar3 = (uint)pbVar2[1] << 0x10 | (uint)*pbVar2 << 0x18;
pbVar1 = pbVar2 + (ulong)(uVar3 < 0x110000) * 4;
} while (((ushort)(*(ushort *)(pbVar2 + 2) << 8 | *(ushort *)(pbVar2 + 2) >> 8) | uVar3) == 0x20);
return (long)pbVar2 - (long)param_2;
}
| |
33,038 | void google::protobuf::Join<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int>>>>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int>>>, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int>>>, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.h | void Join(Iterator start, Iterator end, const char* delim,
std::string* result) {
for (Iterator it = start; it != end; ++it) {
if (it != start) {
result->append(delim);
}
StrAppend(result, *it);
}
} | O3 | c | void google::protobuf::Join<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int>>>>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int>>>, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int>>>, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, (%rsp)
cmpq %rsi, %rdi
je 0x42a29
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq 0x18(%rsp), %r13
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x429f2
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x13a08
leaq (%r12,%rbp), %r14
addq $0x4, %r14
movl -0x4(%r14), %edi
movq %r13, 0x8(%rsp)
movq %r13, %rsi
callq 0x18c10
subq %r13, %rax
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x19f05
addq $0x4, %rbp
cmpq %r15, %r14
jne 0x429e1
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN6google8protobuf4JoinIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEEEvT_SA_PKcPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rsp+68h+var_68], rdx
cmp rdi, rsi
jz short loc_42A29
mov rbx, rcx
mov r15, rsi
mov r12, rdi
lea r13, [rsp+68h+var_50]
xor ebp, ebp
loc_429E1:
test rbp, rbp
jz short loc_429F2
mov rdi, rbx
mov rsi, [rsp+68h+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_429F2:
lea r14, [r12+rbp]
add r14, 4
mov edi, [r14-4]; this
mov [rsp+68h+var_60], r13
mov rsi, r13; int
call _ZN6google8protobuf21FastInt32ToBufferLeftEiPc; google::protobuf::FastInt32ToBufferLeft(int,char *)
sub rax, r13
mov [rsp+68h+var_58], rax
mov rdi, rbx
lea rsi, [rsp+68h+var_60]
call _ZN6google8protobuf9StrAppendEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7strings8AlphaNumE; google::protobuf::StrAppend(std::string *,google::protobuf::strings::AlphaNum const&)
add rbp, 4
cmp r14, r15
jnz short loc_429E1
loc_42A29:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void google::protobuf::Join<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(
long long a1,
long long a2,
char *a3,
_QWORD *a4)
{
long long v6; // rbp
long long v7; // r14
google::protobuf *v8; // rdi
_QWORD v10[2]; // [rsp+8h] [rbp-60h] BYREF
_WORD v11[40]; // [rsp+18h] [rbp-50h] BYREF
if ( a1 != a2 )
{
v6 = 0LL;
do
{
if ( v6 )
std::string::append((long long)a4, (long long)a3);
v7 = a1 + v6 + 4;
v8 = (google::protobuf *)*(unsigned int *)(a1 + v6);
v10[0] = v11;
v10[1] = google::protobuf::FastInt32ToBufferLeft(v8, v11, a3) - (_BYTE *)v11;
google::protobuf::StrAppend(a4, (long long)v10);
v6 += 4LL;
}
while ( v7 != a2 );
}
}
| Join<__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RSP],RDX
CMP RDI,RSI
JZ 0x00142a29
MOV RBX,RCX
MOV R15,RSI
MOV R12,RDI
LEA R13,[RSP + 0x18]
XOR EBP,EBP
LAB_001429e1:
TEST RBP,RBP
JZ 0x001429f2
MOV RDI,RBX
MOV RSI,qword ptr [RSP]
CALL 0x00113a08
LAB_001429f2:
LEA R14,[R12 + RBP*0x1]
ADD R14,0x4
MOV EDI,dword ptr [R14 + -0x4]
MOV qword ptr [RSP + 0x8],R13
MOV RSI,R13
CALL 0x00118c10
SUB RAX,R13
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,RBX
LEA RSI,[RSP + 0x8]
CALL 0x00119f05
ADD RBP,0x4
CMP R14,R15
JNZ 0x001429e1
LAB_00142a29:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void google::protobuf::Join<__gnu_cxx::__normal_iterator<int const*, std::vector<int,
std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int const*, std::vector<int,
std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int,
std::allocator<int> > >, char const*, std::__cxx11::string*) */
void google::protobuf::
Join<__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>>
(int *param_1,int *param_2,char *param_3,string *param_4)
{
int *piVar1;
long lVar2;
char *local_60;
long local_58;
char local_50 [32];
if (param_1 != param_2) {
lVar2 = 0;
do {
if (lVar2 != 0) {
std::__cxx11::string::append(param_4,param_3);
}
piVar1 = (int *)((long)param_1 + lVar2);
local_60 = local_50;
local_58 = FastInt32ToBufferLeft(*piVar1,local_50);
local_58 = local_58 - (long)local_50;
StrAppend(param_4,(AlphaNum *)&local_60);
lVar2 = lVar2 + 4;
} while (piVar1 + 1 != param_2);
}
return;
}
| |
33,039 | coro::time::timer::timer_awaiter::timer_awaiter(__kernel_timespec, int, unsigned int) | tinyCoroLab/include/coro/timer.hpp | timer_awaiter(__kernel_timespec ts, int count, unsigned flags) noexcept
{
m_info.type = io_type::timer;
m_info.cb = &timer_awaiter::callback;
m_ts = ts;
io_uring_prep_timeout(m_urs, &m_ts, count, flags);
io_uring_sqe_set_data(m_urs, &m_info);
local_engine().add_io_submit();
} | O0 | cpp | coro::time::timer::timer_awaiter::timer_awaiter(__kernel_timespec, int, unsigned int):
subq $0x38, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movl %r8d, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xcf90
movq 0x8(%rsp), %rdi
movq %rdi, %rax
addq $0x40, %rax
movq %rax, (%rsp)
movl $0x7, 0xc(%rdi)
leaq 0xa7(%rip), %rax # 0xcfd0
movq %rax, 0x10(%rsp)
addq $0x18, %rdi
leaq 0x10(%rsp), %rsi
callq 0xd020
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
movups 0x28(%rsp), %xmm0
movups %xmm0, 0x40(%rax)
movq 0x38(%rax), %rdi
movl 0x1c(%rsp), %edx
movl 0x18(%rsp), %ecx
callq 0x9cf0
jmp 0xcf61
movq 0x8(%rsp), %rsi
movq 0x38(%rsi), %rdi
callq 0x9d40
jmp 0xcf71
callq 0xd070
movq %rax, %rdi
callq 0x6b7f0
addq $0x38, %rsp
retq
movq %rax, %rdi
callq 0xc660
nopl (%rax,%rax)
| _ZN4coro4time5timer13timer_awaiterC2E17__kernel_timespecij:
sub rsp, 38h
mov qword ptr [rsp+38h+var_10], rsi
mov qword ptr [rsp+38h+var_10+8], rdx
mov [rsp+38h+var_18], rdi
mov [rsp+38h+var_1C], ecx
mov [rsp+38h+var_20], r8d
mov rdi, [rsp+38h+var_18]; this
mov [rsp+38h+var_30], rdi
call _ZN4coro3net6detail15base_io_awaiterC2Ev; coro::net::detail::base_io_awaiter::base_io_awaiter(void)
mov rdi, [rsp+38h+var_30]
mov rax, rdi
add rax, 40h ; '@'
mov [rsp+38h+var_38], rax
mov dword ptr [rdi+0Ch], 7
lea rax, _ZN4coro4time5timer13timer_awaiter8callbackEPNS_3net6detail7io_infoEi; coro::time::timer::timer_awaiter::callback(coro::net::detail::io_info *,int)
mov [rsp+38h+var_28], rax
add rdi, 18h
lea rsi, [rsp+38h+var_28]
call _ZNSt8functionIFvPN4coro3net6detail7io_infoEiEEaSIPDoFvS4_iEEENSt9enable_ifIXsrNS6_9_CallableIT_NSA_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISC_E4typeEE4typeES6_EE5valueESt5decayISC_EE4type4typeESt15__invoke_resultIRSN_JS4_iEEEE5valueERS6_E4typeEOSC_
mov rsi, [rsp+38h+var_38]
mov rax, [rsp+38h+var_30]
movups xmm0, [rsp+38h+var_10]
movups xmmword ptr [rax+40h], xmm0
mov rdi, [rax+38h]
mov edx, [rsp+38h+var_1C]
mov ecx, [rsp+38h+var_20]
call _ZL21io_uring_prep_timeoutP12io_uring_sqeP17__kernel_timespecjj; io_uring_prep_timeout(io_uring_sqe *,__kernel_timespec *,uint,uint)
jmp short $+2
loc_CF61:
mov rsi, [rsp+38h+var_30]
mov rdi, [rsi+38h]; this
call _ZL21io_uring_sqe_set_dataP12io_uring_sqePv; io_uring_sqe_set_data(io_uring_sqe *,void *)
jmp short $+2
loc_CF71:
call _ZN4coro6detail12local_engineEv; coro::detail::local_engine(void)
mov rdi, rax; this
call _ZN4coro6detail6engine13add_io_submitEv; coro::detail::engine::add_io_submit(void)
add rsp, 38h
retn
mov rdi, rax
call __clang_call_terminate
| long long coro::time::timer::timer_awaiter::timer_awaiter(
long long a1,
long long a2,
long long a3,
unsigned int a4,
int a5)
{
coro::detail *v5; // rdi
coro::detail::engine *v6; // rax
long long ( *v9)(coro::time::timer::timer_awaiter *__hidden, coro::net::detail::io_info *, int); // [rsp+10h] [rbp-28h] BYREF
int v10; // [rsp+18h] [rbp-20h]
unsigned int v11; // [rsp+1Ch] [rbp-1Ch]
coro::net::detail::base_io_awaiter *v12; // [rsp+20h] [rbp-18h]
__int128 v13; // [rsp+28h] [rbp-10h]
*(_QWORD *)&v13 = a2;
*((_QWORD *)&v13 + 1) = a3;
v12 = (coro::net::detail::base_io_awaiter *)a1;
v11 = a4;
v10 = a5;
coro::net::detail::base_io_awaiter::base_io_awaiter((coro::net::detail::base_io_awaiter *)a1);
*(_DWORD *)(a1 + 12) = 7;
v9 = coro::time::timer::timer_awaiter::callback;
ZNSt8functionIFvPN4coro3net6detail7io_infoEiEEaSIPDoFvS4_iEEENSt9enable_ifIXsrNS6_9_CallableIT_NSA_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISC_E4typeEE4typeES6_EE5valueESt5decayISC_EE4type4typeESt15__invoke_resultIRSN_JS4_iEEEE5valueERS6_E4typeEOSC_(
a1 + 24,
&v9);
*(_OWORD *)(a1 + 64) = v13;
io_uring_prep_timeout(*(_QWORD *)(a1 + 56), a1 + 64, v11, v10);
v5 = *(coro::detail **)(a1 + 56);
io_uring_sqe_set_data((long long)v5, a1);
v6 = (coro::detail::engine *)coro::detail::local_engine(v5);
return coro::detail::engine::add_io_submit(v6);
}
| timer_awaiter:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV dword ptr [RSP + 0x18],R8D
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0010cf90
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,RDI
ADD RAX,0x40
MOV qword ptr [RSP],RAX
MOV dword ptr [RDI + 0xc],0x7
LEA RAX,[0x10cfd0]
MOV qword ptr [RSP + 0x10],RAX
ADD RDI,0x18
LEA RSI,[RSP + 0x10]
CALL 0x0010d020
MOV RSI,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x8]
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RAX + 0x40],XMM0
MOV RDI,qword ptr [RAX + 0x38]
MOV EDX,dword ptr [RSP + 0x1c]
MOV ECX,dword ptr [RSP + 0x18]
LAB_0010cf5a:
CALL 0x00109cf0
JMP 0x0010cf61
LAB_0010cf61:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSI + 0x38]
CALL 0x00109d40
JMP 0x0010cf71
LAB_0010cf71:
CALL 0x0010d070
MOV RDI,RAX
CALL 0x0016b7f0
ADD RSP,0x38
RET
|
/* coro::time::timer::timer_awaiter::timer_awaiter(__kernel_timespec, int, unsigned int) */
void __thiscall
coro::time::timer::timer_awaiter::timer_awaiter
(timer_awaiter *this,int8 param_2,int8 param_3,uint param_4,uint param_5)
{
code *local_28;
uint local_20;
uint local_1c;
timer_awaiter *local_18;
int8 local_10;
int8 uStack_8;
local_20 = param_5;
local_1c = param_4;
local_18 = this;
local_10 = param_2;
uStack_8 = param_3;
net::detail::base_io_awaiter::base_io_awaiter((base_io_awaiter *)this);
*(int4 *)(this + 0xc) = 7;
local_28 = callback;
std::function<void(coro::net::detail::io_info*,int)>::operator=
((function<void(coro::net::detail::io_info*,int)> *)(this + 0x18),
(_func_void_io_info_ptr_int *)&local_28);
*(int8 *)(this + 0x40) = local_10;
*(int8 *)(this + 0x48) = uStack_8;
/* try { // try from 0010cf5a to 0010cf6e has its CatchHandler @ 0010cf83 */
io_uring_prep_timeout
(*(io_uring_sqe **)(this + 0x38),(__kernel_timespec *)(this + 0x40),local_1c,local_20);
io_uring_sqe_set_data(*(io_uring_sqe **)(this + 0x38),this);
detail::local_engine();
detail::engine::add_io_submit();
return;
}
| |
33,040 | ggml_backend_cpu_graph_compute | 7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c | static bool ggml_backend_cpu_graph_compute(ggml_backend_t backend, struct ggml_cgraph * cgraph) {
struct ggml_backend_cpu_context * cpu_ctx = (struct ggml_backend_cpu_context *)backend->context;
struct ggml_cplan cplan = ggml_graph_plan(cgraph, cpu_ctx->n_threads);
if (cpu_ctx->work_size < cplan.work_size) {
// TODO: may be faster to free and use malloc to avoid the copy
cpu_ctx->work_data = realloc(cpu_ctx->work_data, cplan.work_size);
cpu_ctx->work_size = cplan.work_size;
}
cplan.work_data = cpu_ctx->work_data;
ggml_graph_compute(cgraph, &cplan);
return true;
} | O2 | c | ggml_backend_cpu_graph_compute:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq 0x68(%rdi), %r15
movl (%r15), %edx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x71e2e
movq 0x8(%r15), %rax
movq (%r14), %rsi
cmpq %rsi, 0x10(%r15)
jae 0x9213e
movq %rax, %rdi
callq 0xaa20
movq %rax, 0x8(%r15)
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%r15)
leaq 0x8(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %rbx, %rdi
callq 0x7249c
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
| ggml_backend_cpu_graph_compute:
push r15
push r14
push rbx
sub rsp, 30h
mov rbx, rsi
mov r15, [rdi+68h]
mov edx, [r15]
lea r14, [rsp+48h+var_40]
mov rdi, r14
call ggml_graph_plan
mov rax, [r15+8]
mov rsi, [r14]
cmp [r15+10h], rsi
jnb short loc_9213E
mov rdi, rax
call _realloc
mov [r15+8], rax
mov rcx, [rsp+48h+var_40]
mov [r15+10h], rcx
loc_9213E:
lea rsi, [rsp+48h+var_40]
mov [rsi+8], rax
mov rdi, rbx
call ggml_graph_compute
mov al, 1
add rsp, 30h
pop rbx
pop r14
pop r15
retn
| char ggml_backend_cpu_graph_compute(long long a1, long long a2, __m128 a3)
{
long long v3; // r15
long long v4; // rax
_QWORD v6[8]; // [rsp+8h] [rbp-40h] BYREF
v3 = *(_QWORD *)(a1 + 104);
ggml_graph_plan((long long)v6, a2, *(_DWORD *)v3, a3);
v4 = *(_QWORD *)(v3 + 8);
if ( *(_QWORD *)(v3 + 16) < v6[0] )
{
v4 = realloc(*(_QWORD *)(v3 + 8), v6[0]);
*(_QWORD *)(v3 + 8) = v4;
*(_QWORD *)(v3 + 16) = v6[0];
}
v6[1] = v4;
ggml_graph_compute(a2, (long long)v6, a3);
return 1;
}
| ggml_backend_cpu_graph_compute:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R15,qword ptr [RDI + 0x68]
MOV EDX,dword ptr [R15]
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00171e2e
MOV RAX,qword ptr [R15 + 0x8]
MOV RSI,qword ptr [R14]
CMP qword ptr [R15 + 0x10],RSI
JNC 0x0019213e
MOV RDI,RAX
CALL 0x0010aa20
MOV qword ptr [R15 + 0x8],RAX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [R15 + 0x10],RCX
LAB_0019213e:
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI + 0x8],RAX
MOV RDI,RBX
CALL 0x0017249c
MOV AL,0x1
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
int8 ggml_backend_cpu_graph_compute(long param_1,int8 param_2)
{
int4 *puVar1;
ulong local_40;
void *local_38;
puVar1 = *(int4 **)(param_1 + 0x68);
ggml_graph_plan(&local_40,param_2,*puVar1);
local_38 = *(void **)(puVar1 + 2);
if (*(ulong *)(puVar1 + 4) < local_40) {
local_38 = realloc(local_38,local_40);
*(void **)(puVar1 + 2) = local_38;
*(ulong *)(puVar1 + 4) = local_40;
}
ggml_graph_compute(param_2);
return 1;
}
| |
33,041 | ggml_backend_cpu_graph_compute | 7CodeWizard[P]stablediffusion/ggml/src/ggml-backend.c | static bool ggml_backend_cpu_graph_compute(ggml_backend_t backend, struct ggml_cgraph * cgraph) {
struct ggml_backend_cpu_context * cpu_ctx = (struct ggml_backend_cpu_context *)backend->context;
struct ggml_cplan cplan = ggml_graph_plan(cgraph, cpu_ctx->n_threads);
if (cpu_ctx->work_size < cplan.work_size) {
// TODO: may be faster to free and use malloc to avoid the copy
cpu_ctx->work_data = realloc(cpu_ctx->work_data, cplan.work_size);
cpu_ctx->work_size = cplan.work_size;
}
cplan.work_data = cpu_ctx->work_data;
ggml_graph_compute(cgraph, &cplan);
return true;
} | O3 | c | ggml_backend_cpu_graph_compute:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq 0x68(%rdi), %r15
movl (%r15), %edx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x969a6
movq 0x8(%r15), %rax
movq (%r14), %rsi
cmpq %rsi, 0x10(%r15)
jae 0xb4ae3
movq %rax, %rdi
callq 0xaa30
movq %rax, 0x8(%r15)
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%r15)
leaq 0x8(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %rbx, %rdi
callq 0x96e50
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
| ggml_backend_cpu_graph_compute:
push r15
push r14
push rbx
sub rsp, 30h
mov rbx, rsi
mov r15, [rdi+68h]
mov edx, [r15]
lea r14, [rsp+48h+var_40]
mov rdi, r14
call ggml_graph_plan
mov rax, [r15+8]
mov rsi, [r14]
cmp [r15+10h], rsi
jnb short loc_B4AE3
mov rdi, rax
call _realloc
mov [r15+8], rax
mov rcx, [rsp+48h+var_40]
mov [r15+10h], rcx
loc_B4AE3:
lea rsi, [rsp+48h+var_40]
mov [rsi+8], rax
mov rdi, rbx
call ggml_graph_compute
mov al, 1
add rsp, 30h
pop rbx
pop r14
pop r15
retn
| char ggml_backend_cpu_graph_compute(long long a1, long long a2, __m128 a3)
{
long long v3; // r15
long long v4; // rax
_QWORD v6[8]; // [rsp+8h] [rbp-40h] BYREF
v3 = *(_QWORD *)(a1 + 104);
ggml_graph_plan((long long)v6, a2, *(_DWORD *)v3, a3);
v4 = *(_QWORD *)(v3 + 8);
if ( *(_QWORD *)(v3 + 16) < v6[0] )
{
v4 = realloc(*(_QWORD *)(v3 + 8), v6[0]);
*(_QWORD *)(v3 + 8) = v4;
*(_QWORD *)(v3 + 16) = v6[0];
}
v6[1] = v4;
ggml_graph_compute(a2, (long long)v6, a3);
return 1;
}
| |||
33,042 | nglog::LogDestination::FlushLogFiles(int) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::FlushLogFiles(int min_severity) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
std::lock_guard<std::mutex> l{log_mutex};
for (int i = min_severity; i < NUM_SEVERITIES; i++) {
LogDestination* log = log_destination(static_cast<LogSeverity>(i));
if (log != nullptr) {
log->logger_->Flush();
}
}
} | O3 | cpp | nglog::LogDestination::FlushLogFiles(int):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x2f280(%rip), %rdi # 0x40d48
callq 0x7840
testl %eax, %eax
jne 0x11b6a
cmpl $0x3, %ebx
jg 0x11b50
leaq 0x201af(%rip), %r13 # 0x31c90
leaq 0x8(%rsp), %r14
movl %ebx, %r12d
movq (%r13,%r12,8), %rax
testq %rax, %rax
jne 0x11b3c
movl $0xd0, %edi
callq 0x8eb0
movq %rax, %r15
movq %rax, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0xa664
leaq (,%r12,8), %r12
addq %r13, %r12
movq $0x0, 0x8(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x1295a
movq %r14, %rdi
callq 0x11574
movq (%r12), %rax
testq %rax, %rax
je 0x11b49
movq 0xc8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
incl %ebx
cmpl $0x4, %ebx
jne 0x11ae6
leaq 0x2f1f1(%rip), %rdi # 0x40d48
callq 0x73e0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
movl $0xd0, %esi
movq %r15, %rdi
callq 0x8efc
jmp 0x11b86
movq %rax, %rbx
leaq 0x2f1bb(%rip), %rdi # 0x40d48
callq 0x73e0
movq %rbx, %rdi
callq 0x79b0
| _ZN5nglog14LogDestination13FlushLogFilesEi:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov ebx, edi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_11B6A
cmp ebx, 3
jg short loc_11B50
lea r13, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea r14, [rsp+38h+var_30]
loc_11AE6:
mov r12d, ebx
mov rax, [r13+r12*8+0]
test rax, rax
jnz short loc_11B3C
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov r15, rax
mov rdi, rax
mov esi, ebx
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
lea r12, ds:0[r12*8]
add r12, r13
mov [rsp+38h+var_30], 0
mov rdi, r12
mov rsi, r15
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, r14
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
mov rax, [r12]
test rax, rax
jz short loc_11B49
loc_11B3C:
mov rdi, [rax+0C8h]
mov rax, [rdi]
call qword ptr [rax+18h]
loc_11B49:
inc ebx
cmp ebx, 4
jnz short loc_11AE6
loc_11B50:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_11B6A:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r15; void *
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_11B86
mov rbx, rax
loc_11B86:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::FlushLogFiles(nglog::LogDestination *this)
{
int v1; // ebx
int v2; // eax
long long v3; // rax
long long v4; // r15
nglog::LogDestination *v6; // [rsp+8h] [rbp-30h] BYREF
v1 = (int)this;
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
if ( (int)this <= 3 )
{
do
{
v3 = nglog::LogDestination::log_destinations_[v1];
if ( v3
|| (v4 = operator new(208LL),
nglog::LogDestination::LogDestination(v4, v1, 0LL),
v6 = 0LL,
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(
&nglog::LogDestination::log_destinations_[v1],
v4),
std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v6),
(v3 = nglog::LogDestination::log_destinations_[v1]) != 0) )
{
(*(void ( **)(_QWORD))(**(_QWORD **)(v3 + 200) + 24LL))(*(_QWORD *)(v3 + 200));
}
++v1;
}
while ( v1 != 4 );
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
| FlushLogFiles:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
LEA RDI,[0x140d48]
CALL 0x00107840
TEST EAX,EAX
JNZ 0x00111b6a
CMP EBX,0x3
JG 0x00111b50
LEA R13,[0x131c90]
LEA R14,[RSP + 0x8]
LAB_00111ae6:
MOV R12D,EBX
MOV RAX,qword ptr [R13 + R12*0x8]
TEST RAX,RAX
JNZ 0x00111b3c
LAB_00111af3:
MOV EDI,0xd0
CALL 0x00108eb0
LAB_00111afd:
MOV R15,RAX
MOV RDI,RAX
MOV ESI,EBX
XOR EDX,EDX
CALL 0x0010a664
LEA R12,[R12*0x8]
ADD R12,R13
MOV qword ptr [RSP + 0x8],0x0
MOV RDI,R12
MOV RSI,R15
CALL 0x0011295a
MOV RDI,R14
CALL 0x00111574
MOV RAX,qword ptr [R12]
TEST RAX,RAX
JZ 0x00111b49
LAB_00111b3c:
MOV RDI,qword ptr [RAX + 0xc8]
MOV RAX,qword ptr [RDI]
LAB_00111b46:
CALL qword ptr [RAX + 0x18]
LAB_00111b49:
INC EBX
CMP EBX,0x4
JNZ 0x00111ae6
LAB_00111b50:
LEA RDI,[0x140d48]
CALL 0x001073e0
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00111b6a:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::LogDestination::FlushLogFiles(int) */
void nglog::LogDestination::FlushLogFiles(int param_1)
{
int iVar1;
LogDestination *pLVar2;
long lVar3;
uint uVar4;
int8 local_30;
ulong uVar5;
uVar5 = (ulong)(uint)param_1;
iVar1 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
if (param_1 < 4) {
do {
lVar3 = (&log_destinations_)[uVar5];
if (lVar3 == 0) {
/* try { // try from 00111af3 to 00111afc has its CatchHandler @ 00111b83 */
pLVar2 = (LogDestination *)operator_new(0xd0);
/* try { // try from 00111afd to 00111b0b has its CatchHandler @ 00111b71 */
LogDestination(pLVar2,uVar5,0);
local_30 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
reset((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
(&log_destinations_ + uVar5),pLVar2);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&local_30);
lVar3 = *(long *)(&log_destinations_ + uVar5);
if (lVar3 != 0) goto LAB_00111b3c;
}
else {
LAB_00111b3c:
/* try { // try from 00111b46 to 00111b48 has its CatchHandler @ 00111b83 */
(**(code **)(**(long **)(lVar3 + 200) + 0x18))();
}
uVar4 = (int)uVar5 + 1;
uVar5 = (ulong)uVar4;
} while (uVar4 != 4);
}
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
| |
33,043 | uf_prespace | eloqsql/storage/myisam/mi_packrec.c | static void uf_prespace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to,
uchar *end)
{
uint spaces;
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
bfill((uchar*) to,spaces,' ');
if (to+spaces != end)
decode_bytes(rec,bit_buff,to+spaces,end);
} | O3 | c | uf_prespace:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movl 0x4(%rsi), %ecx
movl 0x1c(%rdi), %r13d
cmpl %r13d, %ecx
jae 0x83784
subl %ecx, %r13d
leaq 0x5e322(%rip), %rax # 0xe1a70
movq %rbx, -0x30(%rbp)
movl (%rax,%rcx,4), %ebx
andl (%r14), %ebx
movl %r13d, %ecx
shll %cl, %ebx
movq %r14, %rdi
callq 0x823a5
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r14)
movl (%r14), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %ebx, %eax
movq -0x30(%rbp), %rbx
jmp 0x8379e
movl (%r14), %eax
subl %r13d, %ecx
movl %ecx, 0x4(%r14)
shrl %cl, %eax
movl 0x1c(%r15), %ecx
leaq 0x5e2d5(%rip), %rdx # 0xe1a70
andl (%rdx,%rcx,4), %eax
movl %eax, %edx
leaq (%r12,%rdx), %r13
cmpq %rbx, %r13
jbe 0x837b3
movl $0x1, 0x28(%r14)
jmp 0x837e4
movq %r12, %rdi
movl $0x20, %esi
callq 0x292c0
cmpq %rbx, %r13
je 0x837e4
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x82c96
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| uf_prespace_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r12, rdx
mov r14, rsi
mov r15, rdi
mov ecx, [rsi+4]
mov r13d, [rdi+1Ch]
cmp ecx, r13d
jnb short loc_83784
sub r13d, ecx
lea rax, mask_0
mov [rbp+var_30], rbx
mov ebx, [rax+rcx*4]
and ebx, [r14]
mov ecx, r13d
shl ebx, cl
mov rdi, r14
call fill_buffer_0
mov eax, 20h ; ' '
sub eax, r13d
mov [r14+4], eax
mov eax, [r14]
neg r13d
mov ecx, r13d
shr eax, cl
add eax, ebx
mov rbx, [rbp+var_30]
jmp short loc_8379E
loc_83784:
mov eax, [r14]
sub ecx, r13d
mov [r14+4], ecx
shr eax, cl
mov ecx, [r15+1Ch]
lea rdx, mask_0
and eax, [rdx+rcx*4]
loc_8379E:
mov edx, eax
lea r13, [r12+rdx]
cmp r13, rbx
jbe short loc_837B3
mov dword ptr [r14+28h], 1
jmp short loc_837E4
loc_837B3:
mov rdi, r12
mov esi, 20h ; ' '
call _memset
cmp r13, rbx
jz short loc_837E4
mov rdi, r15
mov rsi, r14
mov rdx, r13
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes_0
loc_837E4:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long uf_prespace_0(long long a1, unsigned int *a2, long long a3, _BYTE *a4)
{
long long v6; // rcx
unsigned int v7; // r13d
int v8; // r13d
int v9; // ebx
long long result; // rax
unsigned int v11; // eax
unsigned int v12; // ecx
_BYTE *v13; // r13
_BYTE *v14; // [rsp+0h] [rbp-30h]
v6 = a2[1];
v7 = *(_DWORD *)(a1 + 28);
if ( (unsigned int)v6 >= v7 )
{
v11 = *a2;
v12 = v6 - v7;
a2[1] = v12;
result = mask_0[*(unsigned int *)(a1 + 28)] & (v11 >> v12);
}
else
{
v8 = v7 - v6;
v14 = a4;
v9 = (*a2 & mask_0[v6]) << v8;
fill_buffer_0((long long)a2);
a2[1] = 32 - v8;
result = v9 + (*a2 >> -(char)v8);
a4 = v14;
}
v13 = (_BYTE *)(a3 + (unsigned int)result);
if ( v13 <= a4 )
{
result = memset(a3, 32LL, (unsigned int)result);
if ( v13 != a4 )
return (long long)decode_bytes_0(a1, (long long)a2, v13, a4);
}
else
{
a2[10] = 1;
}
return result;
}
| uf_prespace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R12,RDX
MOV R14,RSI
MOV R15,RDI
MOV ECX,dword ptr [RSI + 0x4]
MOV R13D,dword ptr [RDI + 0x1c]
CMP ECX,R13D
JNC 0x00183784
SUB R13D,ECX
LEA RAX,[0x1e1a70]
MOV qword ptr [RBP + -0x30],RBX
MOV EBX,dword ptr [RAX + RCX*0x4]
AND EBX,dword ptr [R14]
MOV ECX,R13D
SHL EBX,CL
MOV RDI,R14
CALL 0x001823a5
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R14 + 0x4],EAX
MOV EAX,dword ptr [R14]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD EAX,EBX
MOV RBX,qword ptr [RBP + -0x30]
JMP 0x0018379e
LAB_00183784:
MOV EAX,dword ptr [R14]
SUB ECX,R13D
MOV dword ptr [R14 + 0x4],ECX
SHR EAX,CL
MOV ECX,dword ptr [R15 + 0x1c]
LEA RDX,[0x1e1a70]
AND EAX,dword ptr [RDX + RCX*0x4]
LAB_0018379e:
MOV EDX,EAX
LEA R13,[R12 + RDX*0x1]
CMP R13,RBX
JBE 0x001837b3
MOV dword ptr [R14 + 0x28],0x1
JMP 0x001837e4
LAB_001837b3:
MOV RDI,R12
MOV ESI,0x20
CALL 0x001292c0
CMP R13,RBX
JZ 0x001837e4
MOV RDI,R15
MOV RSI,R14
MOV RDX,R13
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00182c96
LAB_001837e4:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void uf_prespace(long param_1,uint *param_2,void *param_3,ulong param_4)
{
ulong uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
byte bVar6;
uVar5 = param_2[1];
uVar2 = *(uint *)(param_1 + 0x1c);
if (uVar5 < uVar2) {
uVar3 = (&mask)[uVar5];
uVar4 = *param_2;
bVar6 = (byte)(uVar2 - uVar5);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar2 - uVar5);
uVar5 = (*param_2 >> (-bVar6 & 0x1f)) + ((uVar3 & uVar4) << (bVar6 & 0x1f));
}
else {
param_2[1] = uVar5 - uVar2;
uVar5 = *param_2 >> ((byte)(uVar5 - uVar2) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
uVar1 = (long)param_3 + (ulong)uVar5;
if (param_4 < uVar1) {
param_2[10] = 1;
}
else {
memset(param_3,0x20,(ulong)uVar5);
if (uVar1 != param_4) {
decode_bytes(param_1,param_2,uVar1,param_4);
return;
}
}
return;
}
| |
33,044 | ma_strmake | eloqsql/libmariadb/libmariadb/ma_string.c | char *ma_strmake(register char *dst, register const char *src, size_t length)
{
while (length--)
if (! (*dst++ = *src++))
return dst-1;
*dst=0;
return dst;
} | O0 | c | ma_strmake:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, %rax
je 0x571cb
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %al
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
jne 0x571c9
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x571da
jmp 0x57180
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
| ma_strmake:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
loc_57180:
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rcx
cmp rax, 0
jz short loc_571CB
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov al, [rax]
mov rcx, [rbp+var_10]
mov rdx, rcx
add rdx, 1
mov [rbp+var_10], rdx
mov [rcx], al
cmp al, 0
jnz short loc_571C9
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_8], rax
jmp short loc_571DA
loc_571C9:
jmp short loc_57180
loc_571CB:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_571DA:
mov rax, [rbp+var_8]
pop rbp
retn
| _BYTE * ma_strmake(_BYTE *a1, _BYTE *a2, long long a3)
{
_BYTE *v4; // rax
_BYTE *v5; // rcx
while ( a3-- )
{
v4 = a2++;
LOBYTE(v4) = *v4;
v5 = a1++;
*v5 = (_BYTE)v4;
if ( !(_BYTE)v4 )
return a1 - 1;
}
*a1 = 0;
return a1;
}
| ma_strmake:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LAB_00157180:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x20],RCX
CMP RAX,0x0
JZ 0x001571cb
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RCX],AL
CMP AL,0x0
JNZ 0x001571c9
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001571da
LAB_001571c9:
JMP 0x00157180
LAB_001571cb:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_001571da:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * ma_strmake(char *param_1,char *param_2,long param_3)
{
char cVar1;
char *pcVar2;
long local_28;
char *local_20;
char *local_18;
local_28 = param_3;
local_20 = param_2;
pcVar2 = param_1;
do {
local_18 = pcVar2;
if (local_28 == 0) {
*local_18 = '\0';
return local_18;
}
cVar1 = *local_20;
*local_18 = cVar1;
local_28 = local_28 + -1;
local_20 = local_20 + 1;
pcVar2 = local_18 + 1;
} while (cVar1 != '\0');
return local_18;
}
| |
33,045 | my_strntoull10rnd_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static ulonglong
my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t length,
int unsign_fl,
char **endptr, int *err)
{
char buf[256], *b= buf;
ulonglong res;
const uchar *end, *s= (const uchar*) nptr;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf)-1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be a number part */
*b++= (char) wc;
}
res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err);
*endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
} | O0 | c | my_strntoull10rnd_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp # imm = 0x190
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movq %rdx, -0x128(%rbp)
movl %ecx, -0x12c(%rbp)
movq %r8, -0x138(%rbp)
movq %r9, -0x140(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x118(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x170(%rbp)
cmpq $0x100, -0x128(%rbp) # imm = 0x100
jb 0xb920e
movq $0xff, -0x128(%rbp)
movq -0x160(%rbp), %rax
addq -0x128(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x170(%rbp), %rax
movq -0x118(%rbp), %rdi
movq -0x160(%rbp), %rdx
movq -0x158(%rbp), %rcx
leaq -0x168(%rbp), %rsi
callq *%rax
movl %eax, -0x174(%rbp)
cmpl $0x0, %eax
jle 0xb92a8
movl -0x174(%rbp), %ecx
movq -0x160(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
cmpq $0x65, -0x168(%rbp)
ja 0xb9281
cmpq $0x0, -0x168(%rbp)
jne 0xb9283
jmp 0xb92a8
movq -0x168(%rbp), %rax
movb %al, %cl
movq -0x148(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x148(%rbp)
movb %cl, (%rax)
jmp 0xb9223
movq -0x118(%rbp), %rdi
movq -0x148(%rbp), %rdx
leaq -0x110(%rbp), %rsi
movq %rsi, -0x188(%rbp)
subq %rsi, %rdx
movl -0x12c(%rbp), %ecx
movq -0x138(%rbp), %r8
movq -0x140(%rbp), %r9
callq 0xa3b20
movq -0x188(%rbp), %rdi
movq %rax, -0x150(%rbp)
movq -0x120(%rbp), %rcx
movq -0x118(%rbp), %rax
movl 0x98(%rax), %eax
movl %eax, %edx
movq -0x138(%rbp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
imulq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x150(%rbp), %rax
movq %rax, -0x180(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb934b
movq -0x180(%rbp), %rax
addq $0x190, %rsp # imm = 0x190
popq %rbp
retq
callq 0x382c0
| my_strntoull10rnd_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 190h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_118], rdi
mov [rbp+var_120], rsi
mov [rbp+var_128], rdx
mov [rbp+var_12C], ecx
mov [rbp+var_138], r8
mov [rbp+var_140], r9
lea rax, [rbp+var_110]
mov [rbp+var_148], rax
mov rax, [rbp+var_120]
mov [rbp+var_160], rax
mov rax, [rbp+var_118]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_170], rax
cmp [rbp+var_128], 100h
jb short loc_B920E
mov [rbp+var_128], 0FFh
loc_B920E:
mov rax, [rbp+var_160]
add rax, [rbp+var_128]
mov [rbp+var_158], rax
loc_B9223:
mov rax, [rbp+var_170]
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_160]
mov rcx, [rbp+var_158]
lea rsi, [rbp+var_168]
call rax
mov [rbp+var_174], eax
cmp eax, 0
jle short loc_B92A8
mov ecx, [rbp+var_174]
mov rax, [rbp+var_160]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_160], rax
cmp [rbp+var_168], 65h ; 'e'
ja short loc_B9281
cmp [rbp+var_168], 0
jnz short loc_B9283
loc_B9281:
jmp short loc_B92A8
loc_B9283:
mov rax, [rbp+var_168]
mov cl, al
mov rax, [rbp+var_148]
mov rdx, rax
add rdx, 1
mov [rbp+var_148], rdx
mov [rax], cl
jmp loc_B9223
loc_B92A8:
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_148]
lea rsi, [rbp+var_110]
mov [rbp+var_188], rsi
sub rdx, rsi
mov ecx, [rbp+var_12C]
mov r8, [rbp+var_138]
mov r9, [rbp+var_140]
call my_strntoull10rnd_8bit
mov rdi, [rbp+var_188]
mov [rbp+var_150], rax
mov rcx, [rbp+var_120]
mov rax, [rbp+var_118]
mov eax, [rax+98h]
mov edx, eax
mov rax, [rbp+var_138]
mov rsi, [rax]
sub rsi, rdi
imul rdx, rsi
add rcx, rdx
mov [rax], rcx
mov rax, [rbp+var_150]
mov [rbp+var_180], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_B934B
mov rax, [rbp+var_180]
add rsp, 190h
pop rbp
retn
loc_B934B:
call ___stack_chk_fail
| long long my_strntoull10rnd_mb2_or_mb4(
long long a1,
long long a2,
unsigned long long a3,
int a4,
_QWORD *a5,
int *a6)
{
_BYTE *v6; // rax
int v8; // [rsp+1Ch] [rbp-174h]
long long ( *v9)(long long, unsigned long long *, long long, long long); // [rsp+20h] [rbp-170h]
unsigned long long v10; // [rsp+28h] [rbp-168h] BYREF
long long v11; // [rsp+30h] [rbp-160h]
long long v12; // [rsp+38h] [rbp-158h]
long long v13; // [rsp+40h] [rbp-150h]
_BYTE *v14; // [rsp+48h] [rbp-148h]
int *v15; // [rsp+50h] [rbp-140h]
_QWORD *v16; // [rsp+58h] [rbp-138h]
int v17; // [rsp+64h] [rbp-12Ch]
long long v18; // [rsp+68h] [rbp-128h]
long long v19; // [rsp+70h] [rbp-120h]
long long v20; // [rsp+78h] [rbp-118h]
_BYTE v21[264]; // [rsp+80h] [rbp-110h] BYREF
unsigned long long v22; // [rsp+188h] [rbp-8h]
v22 = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = a6;
v14 = v21;
v11 = a2;
v9 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( a3 >= 0x100 )
v18 = 255LL;
v12 = v18 + v11;
while ( 1 )
{
v8 = v9(v20, &v10, v11, v12);
if ( v8 <= 0 )
break;
v11 += v8;
if ( v10 > 0x65 || !v10 )
break;
v6 = v14++;
*v6 = v10;
}
v13 = my_strntoull10rnd_8bit(v20, v21, v14 - v21, v17, v16, v15);
*v16 = (*v16 - (_QWORD)v21) * *(unsigned int *)(v20 + 152) + v19;
return v13;
}
| my_strntoull10rnd_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x190
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x118],RDI
MOV qword ptr [RBP + -0x120],RSI
MOV qword ptr [RBP + -0x128],RDX
MOV dword ptr [RBP + -0x12c],ECX
MOV qword ptr [RBP + -0x138],R8
MOV qword ptr [RBP + -0x140],R9
LEA RAX,[RBP + -0x110]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0x160],RAX
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x170],RAX
CMP qword ptr [RBP + -0x128],0x100
JC 0x001b920e
MOV qword ptr [RBP + -0x128],0xff
LAB_001b920e:
MOV RAX,qword ptr [RBP + -0x160]
ADD RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x158],RAX
LAB_001b9223:
MOV RAX,qword ptr [RBP + -0x170]
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x160]
MOV RCX,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x168]
CALL RAX
MOV dword ptr [RBP + -0x174],EAX
CMP EAX,0x0
JLE 0x001b92a8
MOV ECX,dword ptr [RBP + -0x174]
MOV RAX,qword ptr [RBP + -0x160]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x160],RAX
CMP qword ptr [RBP + -0x168],0x65
JA 0x001b9281
CMP qword ptr [RBP + -0x168],0x0
JNZ 0x001b9283
LAB_001b9281:
JMP 0x001b92a8
LAB_001b9283:
MOV RAX,qword ptr [RBP + -0x168]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x148]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x148],RDX
MOV byte ptr [RAX],CL
JMP 0x001b9223
LAB_001b92a8:
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x148]
LEA RSI,[RBP + -0x110]
MOV qword ptr [RBP + -0x188],RSI
SUB RDX,RSI
MOV ECX,dword ptr [RBP + -0x12c]
MOV R8,qword ptr [RBP + -0x138]
MOV R9,qword ptr [RBP + -0x140]
CALL 0x001a3b20
MOV RDI,qword ptr [RBP + -0x188]
MOV qword ptr [RBP + -0x150],RAX
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x118]
MOV EAX,dword ptr [RAX + 0x98]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RAX]
SUB RSI,RDI
IMUL RDX,RSI
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x150]
MOV qword ptr [RBP + -0x180],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001b934b
MOV RAX,qword ptr [RBP + -0x180]
ADD RSP,0x190
POP RBP
RET
LAB_001b934b:
CALL 0x001382c0
|
int8
my_strntoull10rnd_mb2_or_mb4
(long param_1,long param_2,ulong param_3,int4 param_4,long *param_5,
int8 param_6)
{
code *pcVar1;
int iVar2;
long in_FS_OFFSET;
ulong local_170;
long local_168;
long local_160;
int8 local_158;
int1 *local_150;
int8 local_148;
long *local_140;
int4 local_134;
ulong local_130;
long local_128;
long local_120;
int1 local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_130 = param_3;
if (0xff < param_3) {
local_130 = 0xff;
}
local_160 = param_2 + local_130;
local_168 = param_2;
local_150 = local_118;
local_148 = param_6;
local_140 = param_5;
local_134 = param_4;
local_128 = param_2;
local_120 = param_1;
while (((iVar2 = (*pcVar1)(local_120,&local_170,local_168,local_160), 0 < iVar2 &&
(local_168 = local_168 + iVar2, local_170 < 0x66)) && (local_170 != 0))) {
*local_150 = (char)local_170;
local_150 = local_150 + 1;
}
local_158 = my_strntoull10rnd_8bit
(local_120,local_118,(long)local_150 - (long)local_118,local_134,local_140,
local_148);
*local_140 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_140 - (long)local_118);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_158;
}
| |
33,046 | my_strnncoll_win1250ch | eloqsql/strings/ctype-win1250ch.c | static int my_strnncoll_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
int v1, v2;
const uchar *p1, * p2;
int pass1 = 0, pass2 = 0;
int diff;
if (s2_is_prefix && len1 > len2)
len1=len2;
p1 = s1; p2 = s2;
do
{
NEXT_CMP_VALUE(s1, p1, pass1, v1, (int)len1);
NEXT_CMP_VALUE(s2, p2, pass2, v2, (int)len2);
if ((diff = v1 - v2))
return diff;
} while (v1);
return 0;
} | O3 | c | my_strnncoll_win1250ch:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpq %r8, %rdx
movq %r8, %rax
cmovbq %rdx, %rax
testb %r9b, %r9b
cmoveq %rdx, %rax
movq %rax, -0x70(%rbp)
movslq %eax, %rdx
movq %r8, -0x78(%rbp)
movslq %r8d, %r9
movl $0x1, %eax
movl $0x1, %edi
subq %rsi, %rdi
movq %rdi, -0x60(%rbp)
subq %rcx, %rax
movq %rax, -0x68(%rbp)
xorl %r13d, %r13d
leaq 0x27f5e2(%rip), %r14 # 0x2d9d50
movq %rsi, %r15
movq %rcx, %r12
xorl %ebx, %ebx
movq %rcx, -0x48(%rbp)
movq %rsi, -0x58(%rbp)
movq %r15, %rax
subq %rsi, %rax
cmpq %rdx, %rax
jge 0x5a796
testl %r13d, %r13d
je 0x5a7c4
movl $0x9, %r8d
jmp 0x5a7bf
testl %r13d, %r13d
sete %r8b
cmpl $0x0, -0x70(%rbp)
setg %dil
xorl %eax, %eax
testb %r8b, %dil
je 0x5a88a
movl $0x1, %r13d
movl $0x9, %r8d
movq %rsi, %r15
movq %r14, %rax
jmp 0x5a7d4
xorl %r13d, %r13d
movl $0x8, %r8d
leaq 0x27f47c(%rip), %rax # 0x2d9c50
movzbl (%r15), %edi
movb (%rax,%rdi), %al
cmpb $-0x1, %al
jne 0x5a884
movq %r8, -0x50(%rbp)
movq %r12, -0x38(%rbp)
movl %ebx, -0x2c(%rbp)
movq %r13, -0x40(%rbp)
movq %r15, %r11
subq %rsi, %r11
movq -0x60(%rbp), %rax
leaq (%rax,%r15), %rcx
xorl %edi, %edi
movq %r15, %r12
movq %rdi, %r8
shlq $0x4, %r8
leaq 0x29522d(%rip), %rax # 0x2efa40
movq (%r8,%rax), %r13
movb (%r13), %r10b
testb %r10b, %r10b
je 0x5a84b
cmpq %rdx, %r11
jge 0x5a84b
incq %r13
movq %rcx, %rbx
cmpb (%r15), %r10b
jne 0x5a850
incq %r15
movb (%r13), %r10b
testb %r10b, %r10b
je 0x5a84b
leaq 0x1(%rbx), %rax
incq %r13
cmpq %rdx, %rbx
movq %rax, %rbx
jl 0x5a82b
testb %r10b, %r10b
je 0x5a860
incq %rdi
cmpq $0x50, %rdi
movq %r12, %r15
jne 0x5a805
movb $-0x1, %al
jmp 0x5a875
leaq 0x2951d9(%rip), %rax # 0x2efa40
addq %rax, %r8
movq -0x50(%rbp), %rax
movb (%r8,%rax), %al
decq %r15
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r13
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %r12
movzbl %al, %eax
incq %r15
movq %r12, %rdi
subq %rcx, %rdi
cmpq %r9, %rdi
jge 0x5a8a1
testl %ebx, %ebx
je 0x5a8ce
movl $0x9, %r10d
jmp 0x5a8c9
testl %ebx, %ebx
sete %dil
cmpl $0x0, -0x78(%rbp)
setg %r8b
xorl %r10d, %r10d
testb %dil, %r8b
je 0x5a9c8
movl $0x1, %ebx
movl $0x9, %r10d
movq %rcx, %r12
movq %r14, %r8
jmp 0x5a8dd
xorl %ebx, %ebx
movl $0x8, %r10d
leaq 0x27f373(%rip), %r8 # 0x2d9c50
movzbl (%r12), %edi
movb (%r8,%rdi), %dil
cmpb $-0x1, %dil
jne 0x5a9c1
movq %r10, -0x50(%rbp)
movq %r15, -0x38(%rbp)
movl %ebx, -0x2c(%rbp)
movq %r13, -0x40(%rbp)
movq %r12, %r14
subq %rcx, %r14
movq -0x68(%rbp), %rcx
movq %r12, %r11
leaq (%rcx,%r12), %rsi
xorl %r8d, %r8d
movq %r8, %r15
shlq $0x4, %r15
leaq 0x29511f(%rip), %rcx # 0x2efa40
movq (%r15,%rcx), %rbx
movb (%rbx), %r13b
testb %r13b, %r13b
je 0x5a95c
cmpq %r9, %r14
jge 0x5a95c
incq %rbx
movq %rsi, %rdi
movq %r11, %r10
cmpb (%r10), %r13b
jne 0x5a964
incq %r10
movb (%rbx), %r13b
testb %r13b, %r13b
je 0x5a95f
leaq 0x1(%rdi), %r12
incq %rbx
cmpq %r9, %rdi
movq %r12, %rdi
jl 0x5a93b
jmp 0x5a95f
movq %r11, %r10
testb %r13b, %r13b
je 0x5a98f
incq %r8
cmpq $0x50, %r8
jne 0x5a913
movb $-0x1, %dil
movq -0x48(%rbp), %rcx
movq -0x58(%rbp), %rsi
leaq 0x27f3d1(%rip), %r14 # 0x2d9d50
movq -0x40(%rbp), %r13
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %r15
movq %r11, %r12
jmp 0x5a9c1
leaq 0x2950aa(%rip), %rcx # 0x2efa40
addq %rcx, %r15
movq -0x50(%rbp), %rcx
movb (%r15,%rcx), %dil
decq %r10
movq %r10, %r12
movq -0x48(%rbp), %rcx
movq -0x58(%rbp), %rsi
leaq 0x27f39a(%rip), %r14 # 0x2d9d50
movq -0x40(%rbp), %r13
movl -0x2c(%rbp), %ebx
movq -0x38(%rbp), %r15
movzbl %dil, %r10d
incq %r12
testl %eax, %eax
je 0x5a9d5
cmpl %r10d, %eax
je 0x5a77e
subl %r10d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strnncoll_win1250ch:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
cmp rdx, r8
mov rax, r8
cmovb rax, rdx
test r9b, r9b
cmovz rax, rdx
mov [rbp+var_70], rax
movsxd rdx, eax
mov [rbp+var_78], r8
movsxd r9, r8d
mov eax, 1
mov edi, 1
sub rdi, rsi
mov [rbp+var_60], rdi
sub rax, rcx
mov [rbp+var_68], rax
xor r13d, r13d
lea r14, _sort_order_win1250ch2
mov r15, rsi
mov r12, rcx
xor ebx, ebx
mov [rbp+var_48], rcx
mov [rbp+var_58], rsi
loc_5A77E:
mov rax, r15
sub rax, rsi
cmp rax, rdx
jge short loc_5A796
test r13d, r13d
jz short loc_5A7C4
mov r8d, 9
jmp short loc_5A7BF
loc_5A796:
test r13d, r13d
setz r8b
cmp dword ptr [rbp+var_70], 0
setnle dil
xor eax, eax
test dil, r8b
jz loc_5A88A
mov r13d, 1
mov r8d, 9
mov r15, rsi
loc_5A7BF:
mov rax, r14
jmp short loc_5A7D4
loc_5A7C4:
xor r13d, r13d
mov r8d, 8
lea rax, _sort_order_win1250ch1
loc_5A7D4:
movzx edi, byte ptr [r15]
mov al, [rax+rdi]
cmp al, 0FFh
jnz loc_5A884
mov [rbp+var_50], r8
mov [rbp+var_38], r12
mov [rbp+var_2C], ebx
mov [rbp+var_40], r13
mov r11, r15
sub r11, rsi
mov rax, [rbp+var_60]
lea rcx, [rax+r15]
xor edi, edi
mov r12, r15
loc_5A805:
mov r8, rdi
shl r8, 4
lea rax, doubles_0
mov r13, [r8+rax]
mov r10b, [r13+0]
test r10b, r10b
jz short loc_5A84B
cmp r11, rdx
jge short loc_5A84B
inc r13
mov rbx, rcx
loc_5A82B:
cmp r10b, [r15]
jnz short loc_5A850
inc r15
mov r10b, [r13+0]
test r10b, r10b
jz short loc_5A84B
lea rax, [rbx+1]
inc r13
cmp rbx, rdx
mov rbx, rax
jl short loc_5A82B
loc_5A84B:
test r10b, r10b
jz short loc_5A860
loc_5A850:
inc rdi
cmp rdi, 50h ; 'P'
mov r15, r12
jnz short loc_5A805
mov al, 0FFh
jmp short loc_5A875
loc_5A860:
lea rax, doubles_0
add r8, rax
mov rax, [rbp+var_50]
mov al, [r8+rax]
dec r15
loc_5A875:
mov rcx, [rbp+var_48]
mov r13, [rbp+var_40]
mov ebx, [rbp+var_2C]
mov r12, [rbp+var_38]
loc_5A884:
movzx eax, al
inc r15
loc_5A88A:
mov rdi, r12
sub rdi, rcx
cmp rdi, r9
jge short loc_5A8A1
test ebx, ebx
jz short loc_5A8CE
mov r10d, 9
jmp short loc_5A8C9
loc_5A8A1:
test ebx, ebx
setz dil
cmp dword ptr [rbp+var_78], 0
setnle r8b
xor r10d, r10d
test r8b, dil
jz loc_5A9C8
mov ebx, 1
mov r10d, 9
mov r12, rcx
loc_5A8C9:
mov r8, r14
jmp short loc_5A8DD
loc_5A8CE:
xor ebx, ebx
mov r10d, 8
lea r8, _sort_order_win1250ch1
loc_5A8DD:
movzx edi, byte ptr [r12]
mov dil, [r8+rdi]
cmp dil, 0FFh
jnz loc_5A9C1
mov [rbp+var_50], r10
mov [rbp+var_38], r15
mov [rbp+var_2C], ebx
mov [rbp+var_40], r13
mov r14, r12
sub r14, rcx
mov rcx, [rbp+var_68]
mov r11, r12
lea rsi, [rcx+r12]
xor r8d, r8d
loc_5A913:
mov r15, r8
shl r15, 4
lea rcx, doubles_0
mov rbx, [r15+rcx]
mov r13b, [rbx]
test r13b, r13b
jz short loc_5A95C
cmp r14, r9
jge short loc_5A95C
inc rbx
mov rdi, rsi
mov r10, r11
loc_5A93B:
cmp r13b, [r10]
jnz short loc_5A964
inc r10
mov r13b, [rbx]
test r13b, r13b
jz short loc_5A95F
lea r12, [rdi+1]
inc rbx
cmp rdi, r9
mov rdi, r12
jl short loc_5A93B
jmp short loc_5A95F
loc_5A95C:
mov r10, r11
loc_5A95F:
test r13b, r13b
jz short loc_5A98F
loc_5A964:
inc r8
cmp r8, 50h ; 'P'
jnz short loc_5A913
mov dil, 0FFh
mov rcx, [rbp+var_48]
mov rsi, [rbp+var_58]
lea r14, _sort_order_win1250ch2
mov r13, [rbp+var_40]
mov ebx, [rbp+var_2C]
mov r15, [rbp+var_38]
mov r12, r11
jmp short loc_5A9C1
loc_5A98F:
lea rcx, doubles_0
add r15, rcx
mov rcx, [rbp+var_50]
mov dil, [r15+rcx]
dec r10
mov r12, r10
mov rcx, [rbp+var_48]
mov rsi, [rbp+var_58]
lea r14, _sort_order_win1250ch2
mov r13, [rbp+var_40]
mov ebx, [rbp+var_2C]
mov r15, [rbp+var_38]
loc_5A9C1:
movzx r10d, dil
inc r12
loc_5A9C8:
test eax, eax
jz short loc_5A9D5
cmp eax, r10d
jz loc_5A77E
loc_5A9D5:
sub eax, r10d
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strnncoll_win1250ch(
long long a1,
_BYTE *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
char a6)
{
int v6; // eax
long long v7; // rdx
long long v8; // r9
long long v9; // r13
_BYTE *v10; // r15
unsigned __int8 *v11; // r12
int v12; // ebx
long long v13; // r8
_BYTE *v14; // rax
_BYTE *v15; // r11
_BYTE *v16; // rcx
long long v17; // rdi
_BYTE *v18; // r12
char *v19; // r13
char v20; // r10
char *v21; // r13
_BYTE *v22; // rbx
bool v23; // cc
long long v24; // r10
int v25; // r10d
_BYTE *v26; // r8
unsigned __int8 v27; // di
long long v28; // r8
char *v29; // rbx
char v30; // r13
char *v31; // rbx
unsigned __int8 *v32; // rdi
_BYTE *v33; // r10
int v35; // [rsp+0h] [rbp-78h]
int v36; // [rsp+8h] [rbp-70h]
long long v37; // [rsp+10h] [rbp-68h]
long long v38; // [rsp+18h] [rbp-60h]
_BYTE *v39; // [rsp+20h] [rbp-58h]
long long v40; // [rsp+28h] [rbp-50h]
unsigned __int8 *v41; // [rsp+30h] [rbp-48h]
long long v42; // [rsp+38h] [rbp-40h]
long long v43; // [rsp+38h] [rbp-40h]
unsigned __int8 *v44; // [rsp+40h] [rbp-38h]
int v45; // [rsp+4Ch] [rbp-2Ch]
int v46; // [rsp+4Ch] [rbp-2Ch]
v6 = a5;
if ( a3 < a5 )
v6 = a3;
if ( !a6 )
v6 = a3;
v36 = v6;
v7 = v6;
v35 = a5;
v8 = (int)a5;
v38 = 1LL - (_QWORD)a2;
v37 = 1LL - (_QWORD)a4;
v9 = 0LL;
v10 = a2;
v11 = a4;
v12 = 0;
v41 = a4;
v39 = a2;
do
{
if ( v10 - a2 >= v7 )
{
LODWORD(v14) = 0;
if ( (_DWORD)v9 != 0 || v36 <= 0 )
goto LABEL_27;
v9 = 1LL;
v13 = 9LL;
v10 = a2;
}
else
{
if ( !(_DWORD)v9 )
{
v9 = 0LL;
v13 = 8LL;
v14 = &sort_order_win1250ch1;
goto LABEL_13;
}
v13 = 9LL;
}
v14 = &sort_order_win1250ch2;
LABEL_13:
LOBYTE(v14) = v14[(unsigned __int8)*v10];
if ( (_BYTE)v14 != 0xFF )
goto LABEL_26;
v44 = v11;
v45 = v12;
v42 = v9;
v15 = (_BYTE *)(v10 - a2);
v16 = &v10[v38];
v17 = 0LL;
v18 = v10;
while ( 1 )
{
v19 = (char *)*(&doubles_0 + 2 * v17);
v20 = *v19;
if ( *v19 && (long long)v15 < v7 )
{
v21 = v19 + 1;
v22 = v16;
while ( v20 == *v10 )
{
++v10;
v20 = *v21;
if ( *v21 )
{
++v21;
v23 = (long long)v22++ < v7;
if ( v23 )
continue;
}
goto LABEL_21;
}
goto LABEL_22;
}
LABEL_21:
if ( !v20 )
break;
LABEL_22:
++v17;
v10 = v18;
if ( v17 == 80 )
{
LOBYTE(v14) = -1;
goto LABEL_25;
}
}
LOBYTE(v14) = *((_BYTE *)&doubles_0 + 16 * v17 + v13);
--v10;
LABEL_25:
a4 = v41;
v9 = v42;
v12 = v45;
v11 = v44;
LABEL_26:
LODWORD(v14) = (unsigned __int8)v14;
++v10;
LABEL_27:
if ( v11 - a4 >= v8 )
{
v25 = 0;
if ( v12 != 0 || v35 <= 0 )
continue;
v12 = 1;
v24 = 9LL;
v11 = a4;
LABEL_32:
v26 = &sort_order_win1250ch2;
}
else
{
if ( v12 )
{
v24 = 9LL;
goto LABEL_32;
}
v12 = 0;
v24 = 8LL;
v26 = &sort_order_win1250ch1;
}
v27 = v26[*v11];
if ( v27 != 0xFF )
goto LABEL_48;
v40 = v24;
v46 = v12;
v43 = v9;
v28 = 0LL;
while ( 2 )
{
v29 = (char *)*(&doubles_0 + 2 * v28);
v30 = *v29;
if ( *v29 && v11 - a4 < v8 )
{
v31 = v29 + 1;
v32 = &v11[v37];
v33 = v11;
while ( v30 == *v33 )
{
++v33;
v30 = *v31;
if ( *v31 )
{
++v31;
v23 = (long long)v32++ < v8;
if ( v23 )
continue;
}
goto LABEL_44;
}
goto LABEL_45;
}
v33 = v11;
LABEL_44:
if ( v30 )
{
LABEL_45:
if ( ++v28 == 80 )
{
v27 = -1;
a4 = v41;
a2 = v39;
v9 = v43;
v12 = v46;
goto LABEL_48;
}
continue;
}
break;
}
v27 = *((_BYTE *)&doubles_0 + 16 * v28 + v40);
v11 = v33 - 1;
a4 = v41;
a2 = v39;
v9 = v43;
v12 = v46;
LABEL_48:
v25 = v27;
++v11;
}
while ( (_DWORD)v14 && (_DWORD)v14 == v25 );
return (unsigned int)((_DWORD)v14 - v25);
}
| my_strnncoll_win1250ch:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
CMP RDX,R8
MOV RAX,R8
CMOVC RAX,RDX
TEST R9B,R9B
CMOVZ RAX,RDX
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RDX,EAX
MOV qword ptr [RBP + -0x78],R8
MOVSXD R9,R8D
MOV EAX,0x1
MOV EDI,0x1
SUB RDI,RSI
MOV qword ptr [RBP + -0x60],RDI
SUB RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
XOR R13D,R13D
LEA R14,[0x3d9d50]
MOV R15,RSI
MOV R12,RCX
XOR EBX,EBX
MOV qword ptr [RBP + -0x48],RCX
MOV qword ptr [RBP + -0x58],RSI
LAB_0015a77e:
MOV RAX,R15
SUB RAX,RSI
CMP RAX,RDX
JGE 0x0015a796
TEST R13D,R13D
JZ 0x0015a7c4
MOV R8D,0x9
JMP 0x0015a7bf
LAB_0015a796:
TEST R13D,R13D
SETZ R8B
CMP dword ptr [RBP + -0x70],0x0
SETG DIL
XOR EAX,EAX
TEST DIL,R8B
JZ 0x0015a88a
MOV R13D,0x1
MOV R8D,0x9
MOV R15,RSI
LAB_0015a7bf:
MOV RAX,R14
JMP 0x0015a7d4
LAB_0015a7c4:
XOR R13D,R13D
MOV R8D,0x8
LEA RAX,[0x3d9c50]
LAB_0015a7d4:
MOVZX EDI,byte ptr [R15]
MOV AL,byte ptr [RAX + RDI*0x1]
CMP AL,0xff
JNZ 0x0015a884
MOV qword ptr [RBP + -0x50],R8
MOV qword ptr [RBP + -0x38],R12
MOV dword ptr [RBP + -0x2c],EBX
MOV qword ptr [RBP + -0x40],R13
MOV R11,R15
SUB R11,RSI
MOV RAX,qword ptr [RBP + -0x60]
LEA RCX,[RAX + R15*0x1]
XOR EDI,EDI
MOV R12,R15
LAB_0015a805:
MOV R8,RDI
SHL R8,0x4
LEA RAX,[0x3efa40]
MOV R13,qword ptr [R8 + RAX*0x1]
MOV R10B,byte ptr [R13]
TEST R10B,R10B
JZ 0x0015a84b
CMP R11,RDX
JGE 0x0015a84b
INC R13
MOV RBX,RCX
LAB_0015a82b:
CMP R10B,byte ptr [R15]
JNZ 0x0015a850
INC R15
MOV R10B,byte ptr [R13]
TEST R10B,R10B
JZ 0x0015a84b
LEA RAX,[RBX + 0x1]
INC R13
CMP RBX,RDX
MOV RBX,RAX
JL 0x0015a82b
LAB_0015a84b:
TEST R10B,R10B
JZ 0x0015a860
LAB_0015a850:
INC RDI
CMP RDI,0x50
MOV R15,R12
JNZ 0x0015a805
MOV AL,0xff
JMP 0x0015a875
LAB_0015a860:
LEA RAX,[0x3efa40]
ADD R8,RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV AL,byte ptr [R8 + RAX*0x1]
DEC R15
LAB_0015a875:
MOV RCX,qword ptr [RBP + -0x48]
MOV R13,qword ptr [RBP + -0x40]
MOV EBX,dword ptr [RBP + -0x2c]
MOV R12,qword ptr [RBP + -0x38]
LAB_0015a884:
MOVZX EAX,AL
INC R15
LAB_0015a88a:
MOV RDI,R12
SUB RDI,RCX
CMP RDI,R9
JGE 0x0015a8a1
TEST EBX,EBX
JZ 0x0015a8ce
MOV R10D,0x9
JMP 0x0015a8c9
LAB_0015a8a1:
TEST EBX,EBX
SETZ DIL
CMP dword ptr [RBP + -0x78],0x0
SETG R8B
XOR R10D,R10D
TEST R8B,DIL
JZ 0x0015a9c8
MOV EBX,0x1
MOV R10D,0x9
MOV R12,RCX
LAB_0015a8c9:
MOV R8,R14
JMP 0x0015a8dd
LAB_0015a8ce:
XOR EBX,EBX
MOV R10D,0x8
LEA R8,[0x3d9c50]
LAB_0015a8dd:
MOVZX EDI,byte ptr [R12]
MOV DIL,byte ptr [R8 + RDI*0x1]
CMP DIL,0xff
JNZ 0x0015a9c1
MOV qword ptr [RBP + -0x50],R10
MOV qword ptr [RBP + -0x38],R15
MOV dword ptr [RBP + -0x2c],EBX
MOV qword ptr [RBP + -0x40],R13
MOV R14,R12
SUB R14,RCX
MOV RCX,qword ptr [RBP + -0x68]
MOV R11,R12
LEA RSI,[RCX + R12*0x1]
XOR R8D,R8D
LAB_0015a913:
MOV R15,R8
SHL R15,0x4
LEA RCX,[0x3efa40]
MOV RBX,qword ptr [R15 + RCX*0x1]
MOV R13B,byte ptr [RBX]
TEST R13B,R13B
JZ 0x0015a95c
CMP R14,R9
JGE 0x0015a95c
INC RBX
MOV RDI,RSI
MOV R10,R11
LAB_0015a93b:
CMP R13B,byte ptr [R10]
JNZ 0x0015a964
INC R10
MOV R13B,byte ptr [RBX]
TEST R13B,R13B
JZ 0x0015a95f
LEA R12,[RDI + 0x1]
INC RBX
CMP RDI,R9
MOV RDI,R12
JL 0x0015a93b
JMP 0x0015a95f
LAB_0015a95c:
MOV R10,R11
LAB_0015a95f:
TEST R13B,R13B
JZ 0x0015a98f
LAB_0015a964:
INC R8
CMP R8,0x50
JNZ 0x0015a913
MOV DIL,0xff
MOV RCX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x58]
LEA R14,[0x3d9d50]
MOV R13,qword ptr [RBP + -0x40]
MOV EBX,dword ptr [RBP + -0x2c]
MOV R15,qword ptr [RBP + -0x38]
MOV R12,R11
JMP 0x0015a9c1
LAB_0015a98f:
LEA RCX,[0x3efa40]
ADD R15,RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV DIL,byte ptr [R15 + RCX*0x1]
DEC R10
MOV R12,R10
MOV RCX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x58]
LEA R14,[0x3d9d50]
MOV R13,qword ptr [RBP + -0x40]
MOV EBX,dword ptr [RBP + -0x2c]
MOV R15,qword ptr [RBP + -0x38]
LAB_0015a9c1:
MOVZX R10D,DIL
INC R12
LAB_0015a9c8:
TEST EAX,EAX
JZ 0x0015a9d5
CMP EAX,R10D
JZ 0x0015a77e
LAB_0015a9d5:
SUB EAX,R10D
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_strnncoll_win1250ch
(int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5,
char param_6)
{
bool bVar1;
bool bVar2;
byte *pbVar3;
byte *pbVar4;
byte *pbVar5;
byte bVar6;
int iVar7;
ulong uVar9;
int1 *puVar10;
long lVar11;
int iVar12;
uint uVar13;
long lVar14;
byte *pbVar15;
byte *pbVar16;
byte *pbVar17;
byte *pbVar18;
uint uVar8;
uVar9 = param_5;
if (param_3 < param_5) {
uVar9 = param_3;
}
if (param_6 == '\0') {
uVar9 = param_3;
}
iVar7 = (int)uVar9;
iVar12 = (int)param_5;
bVar2 = false;
bVar1 = false;
pbVar15 = param_4;
pbVar18 = param_2;
do {
if ((long)pbVar18 - (long)param_2 < (long)iVar7) {
if (bVar2) {
LAB_0015a7bf:
lVar14 = 9;
puVar10 = _sort_order_win1250ch2;
}
else {
bVar2 = false;
lVar14 = 8;
puVar10 = _sort_order_win1250ch1;
}
bVar6 = puVar10[*pbVar18];
if (bVar6 == 0xff) {
lVar11 = 0;
do {
pbVar16 = (&doubles)[lVar11 * 2];
bVar6 = *pbVar16;
pbVar17 = pbVar18;
pbVar5 = pbVar18 + (1 - (long)param_2);
pbVar4 = pbVar18 + -(long)param_2;
if (bVar6 != 0) {
while (pbVar3 = pbVar5, (long)pbVar4 < (long)iVar7) {
pbVar16 = pbVar16 + 1;
if (bVar6 != *pbVar17) goto LAB_0015a850;
pbVar17 = pbVar17 + 1;
bVar6 = *pbVar16;
if (bVar6 == 0) break;
pbVar5 = pbVar3 + 1;
pbVar4 = pbVar3;
}
}
if (bVar6 == 0) {
bVar6 = *(byte *)((long)&doubles + lVar14 + lVar11 * 0x10);
pbVar18 = pbVar17 + -1;
goto LAB_0015a884;
}
LAB_0015a850:
lVar11 = lVar11 + 1;
} while (lVar11 != 0x50);
bVar6 = 0xff;
}
LAB_0015a884:
uVar8 = (uint)bVar6;
pbVar18 = pbVar18 + 1;
}
else {
uVar8 = 0;
if (0 < iVar7 && !bVar2) {
bVar2 = true;
pbVar18 = param_2;
goto LAB_0015a7bf;
}
}
if ((long)pbVar15 - (long)param_4 < (long)iVar12) {
if (bVar1) {
LAB_0015a8c9:
lVar14 = 9;
puVar10 = _sort_order_win1250ch2;
}
else {
bVar1 = false;
lVar14 = 8;
puVar10 = _sort_order_win1250ch1;
}
bVar6 = puVar10[*pbVar15];
if (bVar6 == 0xff) {
lVar11 = 0;
do {
pbVar16 = (&doubles)[lVar11 * 2];
bVar6 = *pbVar16;
pbVar17 = pbVar15;
pbVar5 = pbVar15 + (1 - (long)param_4);
pbVar4 = pbVar15 + -(long)param_4;
if (bVar6 != 0) {
while (pbVar3 = pbVar5, (long)pbVar4 < (long)iVar12) {
pbVar16 = pbVar16 + 1;
if (bVar6 != *pbVar17) goto LAB_0015a964;
pbVar17 = pbVar17 + 1;
bVar6 = *pbVar16;
if (bVar6 == 0) break;
pbVar5 = pbVar3 + 1;
pbVar4 = pbVar3;
}
}
if (bVar6 == 0) {
bVar6 = *(byte *)((long)&doubles + lVar14 + lVar11 * 0x10);
pbVar15 = pbVar17 + -1;
goto LAB_0015a9c1;
}
LAB_0015a964:
lVar11 = lVar11 + 1;
} while (lVar11 != 0x50);
bVar6 = 0xff;
}
LAB_0015a9c1:
uVar13 = (uint)bVar6;
pbVar15 = pbVar15 + 1;
}
else {
uVar13 = 0;
if (0 < iVar12 && !bVar1) {
bVar1 = true;
pbVar15 = param_4;
goto LAB_0015a8c9;
}
}
if ((uVar8 == 0) || (uVar8 != uVar13)) {
return uVar8 - uVar13;
}
} while( true );
}
| |
33,047 | js_bytecode_function_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_bytecode_function_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p1, *p = JS_VALUE_GET_OBJ(val);
JSFunctionBytecode *b;
JSVarRef **var_refs;
int i;
p1 = p->u.func.home_object;
if (p1) {
JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_OBJECT, p1));
}
b = p->u.func.function_bytecode;
if (b) {
var_refs = p->u.func.var_refs;
if (var_refs) {
for(i = 0; i < b->closure_var_count; i++)
free_var_ref(rt, var_refs[i]);
js_free_rt(rt, var_refs);
}
JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_FUNCTION_BYTECODE, b));
}
} | O1 | c | js_bytecode_function_finalizer:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x40(%rsi), %rsi
testq %rsi, %rsi
je 0x3a888
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3a888
movq %rbx, %rdi
movq $-0x1, %rdx
callq 0x21266
movq 0x30(%r15), %r14
testq %r14, %r14
je 0x3a90a
movq 0x38(%r15), %r15
testq %r15, %r15
je 0x3a8df
cmpl $0x0, 0x5c(%r14)
jle 0x3a8bc
xorl %r12d, %r12d
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
callq 0x263ec
incq %r12
movslq 0x5c(%r14), %rax
cmpq %rax, %r12
jl 0x3a8a4
decq 0x28(%rbx)
movq %r15, %rdi
callq *0x20(%rbx)
movq 0x30(%rbx), %rcx
movq 0x40(%rbx), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%rbx)
movq %r15, %rsi
callq *0x10(%rbx)
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x3a90a
movq %rbx, %rdi
movq %r14, %rsi
movq $-0x2, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21266
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_bytecode_function_finalizer:
push r15
push r14
push r12
push rbx
push rax
mov r15, rsi
mov rbx, rdi
mov rsi, [rsi+40h]
test rsi, rsi
jz short loc_3A888
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3A888
mov rdi, rbx
mov rdx, 0FFFFFFFFFFFFFFFFh
call js_free_value_rt
loc_3A888:
mov r14, [r15+30h]
test r14, r14
jz short loc_3A90A
mov r15, [r15+38h]
test r15, r15
jz short loc_3A8DF
cmp dword ptr [r14+5Ch], 0
jle short loc_3A8BC
xor r12d, r12d
loc_3A8A4:
mov rsi, [r15+r12*8]
mov rdi, rbx
call free_var_ref
inc r12
movsxd rax, dword ptr [r14+5Ch]
cmp r12, rax
jl short loc_3A8A4
loc_3A8BC:
dec qword ptr [rbx+28h]
mov rdi, r15
call qword ptr [rbx+20h]
mov rcx, [rbx+30h]
mov rdi, [rbx+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rcx
mov rsi, r15
call qword ptr [rbx+10h]
loc_3A8DF:
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_3A90A
mov rdi, rbx
mov rsi, r14
mov rdx, 0FFFFFFFFFFFFFFFEh
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp js_free_value_rt
loc_3A90A:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_bytecode_function_finalizer(long long a1, _QWORD *a2)
{
_QWORD *v4; // rsi
long long result; // rax
unsigned int *v6; // r14
long long v7; // r15
long long v8; // r12
long long v9; // rax
long long v10; // rdi
v4 = (_QWORD *)a2[8];
if ( v4 )
{
result = *(unsigned int *)v4;
*(_DWORD *)v4 = result - 1;
if ( (int)result <= 1 )
result = js_free_value_rt(a1, v4, -1);
}
v6 = (unsigned int *)a2[6];
if ( v6 )
{
v7 = a2[7];
if ( v7 )
{
if ( (int)v6[23] > 0 )
{
v8 = 0LL;
do
free_var_ref(a1, *(_QWORD *)(v7 + 8 * v8++));
while ( v8 < (int)v6[23] );
}
--*(_QWORD *)(a1 + 40);
v9 = (*(long long ( **)(long long))(a1 + 32))(v7);
v10 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v9 - 8;
(*(void ( **)(long long, long long))(a1 + 16))(v10, v7);
}
result = *v6;
*v6 = result - 1;
if ( (int)result <= 1 )
return js_free_value_rt(a1, v6, -2);
}
return result;
}
| js_bytecode_function_finalizer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI + 0x40]
TEST RSI,RSI
JZ 0x0013a888
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013a888
MOV RDI,RBX
MOV RDX,-0x1
CALL 0x00121266
LAB_0013a888:
MOV R14,qword ptr [R15 + 0x30]
TEST R14,R14
JZ 0x0013a90a
MOV R15,qword ptr [R15 + 0x38]
TEST R15,R15
JZ 0x0013a8df
CMP dword ptr [R14 + 0x5c],0x0
JLE 0x0013a8bc
XOR R12D,R12D
LAB_0013a8a4:
MOV RSI,qword ptr [R15 + R12*0x8]
MOV RDI,RBX
CALL 0x001263ec
INC R12
MOVSXD RAX,dword ptr [R14 + 0x5c]
CMP R12,RAX
JL 0x0013a8a4
LAB_0013a8bc:
DEC qword ptr [RBX + 0x28]
MOV RDI,R15
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x30]
MOV RDI,qword ptr [RBX + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [RBX + 0x30],RCX
MOV RSI,R15
CALL qword ptr [RBX + 0x10]
LAB_0013a8df:
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0013a90a
MOV RDI,RBX
MOV RSI,R14
MOV RDX,-0x2
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00121266
LAB_0013a90a:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void js_bytecode_function_finalizer(long param_1,long param_2)
{
int iVar1;
int *piVar2;
long lVar3;
long lVar4;
piVar2 = *(int **)(param_2 + 0x40);
if (piVar2 != (int *)0x0) {
iVar1 = *piVar2;
*piVar2 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(param_1,piVar2,0xffffffffffffffff);
}
}
piVar2 = *(int **)(param_2 + 0x30);
if (piVar2 != (int *)0x0) {
lVar3 = *(long *)(param_2 + 0x38);
if (lVar3 != 0) {
if (0 < piVar2[0x17]) {
lVar4 = 0;
do {
free_var_ref(param_1,*(int8 *)(lVar3 + lVar4 * 8));
lVar4 = lVar4 + 1;
} while (lVar4 < piVar2[0x17]);
}
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar4 = (**(code **)(param_1 + 0x20))(lVar3);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar4) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),lVar3);
}
iVar1 = *piVar2;
*piVar2 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(param_1,piVar2,0xfffffffffffffffe);
return;
}
}
return;
}
| |
33,048 | js_bytecode_function_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_bytecode_function_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p1, *p = JS_VALUE_GET_OBJ(val);
JSFunctionBytecode *b;
JSVarRef **var_refs;
int i;
p1 = p->u.func.home_object;
if (p1) {
JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_OBJECT, p1));
}
b = p->u.func.function_bytecode;
if (b) {
var_refs = p->u.func.var_refs;
if (var_refs) {
for(i = 0; i < b->closure_var_count; i++)
free_var_ref(rt, var_refs[i]);
js_free_rt(rt, var_refs);
}
JS_FreeValueRT(rt, JS_MKPTR(JS_TAG_FUNCTION_BYTECODE, b));
}
} | O2 | c | js_bytecode_function_finalizer:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x40(%rsi), %rsi
testq %rsi, %rsi
je 0x33956
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x18031
movq 0x30(%r15), %r14
testq %r14, %r14
je 0x339a9
movq 0x38(%r15), %r15
testq %r15, %r15
je 0x33990
xorl %r12d, %r12d
movslq 0x5c(%r14), %rax
cmpq %rax, %r12
jge 0x33985
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
callq 0x1fed9
incq %r12
jmp 0x3396b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x170cb
pushq $-0x2
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x18031
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_bytecode_function_finalizer:
push r15
push r14
push r12
push rbx
push rax
mov r15, rsi
mov rbx, rdi
mov rsi, [rsi+40h]
test rsi, rsi
jz short loc_33956
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rdi, rbx
call JS_FreeValueRT
loc_33956:
mov r14, [r15+30h]
test r14, r14
jz short loc_339A9
mov r15, [r15+38h]
test r15, r15
jz short loc_33990
xor r12d, r12d
loc_3396B:
movsxd rax, dword ptr [r14+5Ch]
cmp r12, rax
jge short loc_33985
mov rsi, [r15+r12*8]
mov rdi, rbx
call free_var_ref
inc r12
jmp short loc_3396B
loc_33985:
mov rdi, rbx
mov rsi, r15
call js_free_rt
loc_33990:
push 0FFFFFFFFFFFFFFFEh
pop rdx
mov rdi, rbx
mov rsi, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp JS_FreeValueRT
loc_339A9:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_bytecode_function_finalizer(long long a1, _QWORD *a2)
{
unsigned int *v3; // rsi
long long result; // rax
long long v5; // r14
long long v6; // r15
long long i; // r12
v3 = (unsigned int *)a2[8];
if ( v3 )
result = JS_FreeValueRT(a1, v3, 0xFFFFFFFF);
v5 = a2[6];
if ( v5 )
{
v6 = a2[7];
if ( v6 )
{
for ( i = 0LL; i < *(int *)(v5 + 92); ++i )
free_var_ref(a1, *(_QWORD *)(v6 + 8 * i));
js_free_rt(a1, v6);
}
return JS_FreeValueRT(a1, (unsigned int *)v5, 0xFFFFFFFE);
}
return result;
}
| js_bytecode_function_finalizer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI + 0x40]
TEST RSI,RSI
JZ 0x00133956
PUSH -0x1
POP RDX
MOV RDI,RBX
CALL 0x00118031
LAB_00133956:
MOV R14,qword ptr [R15 + 0x30]
TEST R14,R14
JZ 0x001339a9
MOV R15,qword ptr [R15 + 0x38]
TEST R15,R15
JZ 0x00133990
XOR R12D,R12D
LAB_0013396b:
MOVSXD RAX,dword ptr [R14 + 0x5c]
CMP R12,RAX
JGE 0x00133985
MOV RSI,qword ptr [R15 + R12*0x8]
MOV RDI,RBX
CALL 0x0011fed9
INC R12
JMP 0x0013396b
LAB_00133985:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001170cb
LAB_00133990:
PUSH -0x2
POP RDX
MOV RDI,RBX
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00118031
LAB_001339a9:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void js_bytecode_function_finalizer(int8 param_1,long param_2)
{
long lVar1;
long lVar2;
long lVar3;
if (*(long *)(param_2 + 0x40) != 0) {
JS_FreeValueRT(param_1,*(long *)(param_2 + 0x40),0xffffffffffffffff);
}
lVar1 = *(long *)(param_2 + 0x30);
if (lVar1 != 0) {
lVar2 = *(long *)(param_2 + 0x38);
if (lVar2 != 0) {
for (lVar3 = 0; lVar3 < *(int *)(lVar1 + 0x5c); lVar3 = lVar3 + 1) {
free_var_ref(param_1,*(int8 *)(lVar2 + lVar3 * 8));
}
js_free_rt(param_1,lVar2);
}
JS_FreeValueRT(param_1,lVar1,0xfffffffffffffffe);
return;
}
return;
}
| |
33,049 | tailoring_append | eloqsql/strings/ctype.c | static int
tailoring_append(MY_XML_PARSER *st,
const char *fmt, size_t len, const char *attr)
{
struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data;
size_t newlen= i->tailoring_length + len + 64; /* 64 for format */
if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen))
{
char *dst= i->tailoring + i->tailoring_length;
sprintf(dst, fmt, (int) len, attr);
i->tailoring_length+= strlen(dst);
return MY_XML_OK;
}
return MY_XML_ERROR;
} | O0 | c | tailoring_append:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x140(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x690(%rax), %rax
addq -0x20(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x178c20
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x178c0d
movq -0x30(%rbp), %rax
movq 0x688(%rax), %rax
movq -0x30(%rbp), %rcx
addq 0x690(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rcx
movb $0x0, %al
callq 0x2c950
movq -0x40(%rbp), %rdi
callq 0x2c3c0
movq %rax, %rcx
movq -0x30(%rbp), %rax
addq 0x690(%rax), %rcx
movq %rcx, 0x690(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x178c14
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| tailoring_append:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax+140h]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+690h]
add rax, [rbp+var_20]
add rax, 40h ; '@'
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
call my_charset_file_tailoring_realloc
mov ecx, eax
xor eax, eax
cmp eax, ecx
jnz short loc_178C0D
mov rax, [rbp+var_30]
mov rax, [rax+688h]
mov rcx, [rbp+var_30]
add rax, [rcx+690h]
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_20]
mov edx, eax
mov rcx, [rbp+var_28]
mov al, 0
call _sprintf
mov rdi, [rbp+var_40]
call _strlen
mov rcx, rax
mov rax, [rbp+var_30]
add rcx, [rax+690h]
mov [rax+690h], rcx
mov [rbp+var_4], 0
jmp short loc_178C14
loc_178C0D:
mov [rbp+var_4], 1
loc_178C14:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long tailoring_append(long long a1, const char *a2, long long a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-40h]
long long v6; // [rsp+10h] [rbp-30h]
unsigned int v8; // [rsp+20h] [rbp-20h]
v8 = a3;
v6 = *(_QWORD *)(a1 + 320);
if ( (unsigned int)my_charset_file_tailoring_realloc(v6, a3 + *(_QWORD *)(v6 + 1680) + 64) )
{
return 1;
}
else
{
v5 = *(_QWORD *)(v6 + 1680) + *(_QWORD *)(v6 + 1672);
sprintf(v5, a2, v8, a4);
*(_QWORD *)(v6 + 1680) += strlen(v5);
return 0;
}
}
| _ma_update_state_lsns:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,R8B
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RBP + -0x19],CL
MOV byte ptr [RBP + -0x1a],AL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8f0
LEA RSI,[0x289899]
MOV EDX,0x58d
CALL 0x00177dd0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RBP + -0x19]
MOVSX ECX,AL
MOVSX R8D,byte ptr [RBP + -0x1a]
CALL 0x00178360
MOV dword ptr [RBP + -0x20],EAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8f0
CALL 0x00178a20
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
ADD RSP,0x30
POP RBP
RET
|
int4
_ma_update_state_lsns(long param_1,int8 param_2,int8 param_3,char param_4,char param_5)
{
int4 uVar1;
inline_mysql_mutex_lock
(param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
0x58d);
uVar1 = _ma_update_state_lsns_sub(param_1,param_2,param_3,(int)param_4,(int)param_5);
inline_mysql_mutex_unlock(param_1 + 0x8f0);
return uVar1;
}
| |
33,050 | build_request_uri | eloqsql/storage/maria/libmarias3/src/request.c | static uint8_t build_request_uri(CURL *curl, const char *base_domain,
const char *bucket, const char *object, const char *query, bool use_http,
uint8_t protocol_version)
{
char uri_buffer[MAX_URI_LENGTH];
const char *domain;
const uint8_t path_parts = 10; // "https://" + "." + "/"
const char *http_protocol = "http";
const char *https_protocol = "https";
const char *protocol;
if (base_domain)
{
domain = base_domain;
}
else
{
domain = default_domain;
}
if (use_http)
{
protocol = http_protocol;
}
else
{
protocol = https_protocol;
}
if (query)
{
if (path_parts + strlen(domain) + strlen(bucket) + strlen(object) + strlen(
query) >= MAX_URI_LENGTH - 1)
{
return MS3_ERR_URI_TOO_LONG;
}
if (protocol_version == 1)
{
snprintf(uri_buffer, MAX_URI_LENGTH - 1, "%s://%s/%s%s?%s", protocol,
domain, bucket,
object, query);
}
else
{
snprintf(uri_buffer, MAX_URI_LENGTH - 1, "%s://%s.%s%s?%s", protocol,
bucket, domain,
object, query);
}
}
else
{
if (path_parts + strlen(domain) + strlen(bucket) + strlen(
object) >= MAX_URI_LENGTH - 1)
{
return MS3_ERR_URI_TOO_LONG;
}
if (protocol_version == 1)
{
snprintf(uri_buffer, MAX_URI_LENGTH - 1, "%s://%s/%s%s", protocol,
domain,
bucket,
object);
}
else
{
snprintf(uri_buffer, MAX_URI_LENGTH - 1, "%s://%s.%s%s", protocol,
bucket, domain,
object);
}
}
ms3debug("URI: %s", uri_buffer);
curl_easy_setopt(curl, CURLOPT_URL, uri_buffer);
return 0;
} | O0 | c | build_request_uri:
pushq %rbp
movq %rsp, %rbp
subq $0x4b0, %rsp # imm = 0x4B0
movb %r9b, %al
movb 0x10(%rbp), %r9b
movq %fs:0x28, %r9
movq %r9, -0x8(%rbp)
movq %rdi, -0x420(%rbp)
movq %rsi, -0x428(%rbp)
movq %rdx, -0x430(%rbp)
movq %rcx, -0x438(%rbp)
movq %r8, -0x440(%rbp)
andb $0x1, %al
movb %al, -0x441(%rbp)
movb $0xa, -0x451(%rbp)
leaq 0xeed08(%rip), %rax # 0x11d2a0
movq %rax, -0x460(%rbp)
leaq 0xef7d3(%rip), %rax # 0x11dd79
movq %rax, -0x468(%rbp)
cmpq $0x0, -0x428(%rbp)
je 0x2e5c7
movq -0x428(%rbp), %rax
movq %rax, -0x450(%rbp)
jmp 0x2e5d5
movq 0x2593ca(%rip), %rax # 0x287998
movq %rax, -0x450(%rbp)
testb $0x1, -0x441(%rbp)
je 0x2e5ee
movq -0x460(%rbp), %rax
movq %rax, -0x470(%rbp)
jmp 0x2e5fc
movq -0x468(%rbp), %rax
movq %rax, -0x470(%rbp)
cmpq $0x0, -0x440(%rbp)
je 0x2e72a
movq -0x450(%rbp), %rdi
callq 0x273b0
addq $0xa, %rax
movq %rax, -0x488(%rbp)
movq -0x430(%rbp), %rdi
callq 0x273b0
movq %rax, %rcx
movq -0x488(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x480(%rbp)
movq -0x438(%rbp), %rdi
callq 0x273b0
movq %rax, %rcx
movq -0x480(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x478(%rbp)
movq -0x440(%rbp), %rdi
callq 0x273b0
movq %rax, %rcx
movq -0x478(%rbp), %rax
addq %rcx, %rax
cmpq $0x3ff, %rax # imm = 0x3FF
jb 0x2e68e
movb $0x3, -0x411(%rbp)
jmp 0x2e86a
movzbl 0x10(%rbp), %eax
cmpl $0x1, %eax
jne 0x2e6df
leaq -0x410(%rbp), %rdi
movq -0x470(%rbp), %rcx
movq -0x450(%rbp), %r8
movq -0x430(%rbp), %r9
movq -0x438(%rbp), %r10
movq -0x440(%rbp), %rax
movl $0x3ff, %esi # imm = 0x3FF
leaq 0xef6b2(%rip), %rdx # 0x11dd7f
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x27480
jmp 0x2e725
leaq -0x410(%rbp), %rdi
movq -0x470(%rbp), %rcx
movq -0x430(%rbp), %r8
movq -0x450(%rbp), %r9
movq -0x438(%rbp), %r10
movq -0x440(%rbp), %rax
movl $0x3ff, %esi # imm = 0x3FF
leaq 0xef67a(%rip), %rdx # 0x11dd8f
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x27480
jmp 0x2e80f
movq -0x450(%rbp), %rdi
callq 0x273b0
addq $0xa, %rax
movq %rax, -0x498(%rbp)
movq -0x430(%rbp), %rdi
callq 0x273b0
movq %rax, %rcx
movq -0x498(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x490(%rbp)
movq -0x438(%rbp), %rdi
callq 0x273b0
movq %rax, %rcx
movq -0x490(%rbp), %rax
addq %rcx, %rax
cmpq $0x3ff, %rax # imm = 0x3FF
jb 0x2e78e
movb $0x3, -0x411(%rbp)
jmp 0x2e86a
movzbl 0x10(%rbp), %eax
cmpl $0x1, %eax
jne 0x2e7d3
leaq -0x410(%rbp), %rdi
movq -0x470(%rbp), %rcx
movq -0x450(%rbp), %r8
movq -0x430(%rbp), %r9
movq -0x438(%rbp), %rax
movl $0x3ff, %esi # imm = 0x3FF
leaq 0xef5d9(%rip), %rdx # 0x11dd9f
movq %rax, (%rsp)
movb $0x0, %al
callq 0x27480
jmp 0x2e80d
leaq -0x410(%rbp), %rdi
movq -0x470(%rbp), %rcx
movq -0x430(%rbp), %r8
movq -0x450(%rbp), %r9
movq -0x438(%rbp), %rax
movl $0x3ff, %esi # imm = 0x3FF
leaq 0xef5aa(%rip), %rdx # 0x11ddac
movq %rax, (%rsp)
movb $0x0, %al
callq 0x27480
jmp 0x2e80f
jmp 0x2e811
callq 0x2c190
testb $0x1, %al
jne 0x2e81c
jmp 0x2e847
movq 0x2587b5(%rip), %rax # 0x286fd8
movq (%rax), %rdi
leaq -0x410(%rbp), %r8
leaq 0xef585(%rip), %rsi # 0x11ddb9
leaq 0xef3d9(%rip), %rdx # 0x11dc14
movl $0x7f, %ecx
movb $0x0, %al
callq 0x271d0
jmp 0x2e849
movq -0x420(%rbp), %rdi
leaq -0x410(%rbp), %rdx
movl $0x2712, %esi # imm = 0x2712
movb $0x0, %al
callq 0x277b0
movb $0x0, -0x411(%rbp)
movb -0x411(%rbp), %al
movb %al, -0x499(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2e897
movb -0x499(%rbp), %al
addq $0x4b0, %rsp # imm = 0x4B0
popq %rbp
retq
callq 0x272b0
nopl (%rax)
| build_request_uri:
push rbp
mov rbp, rsp
sub rsp, 4B0h
mov al, r9b
mov r9b, [rbp+arg_0]
mov r9, fs:28h
mov [rbp+var_8], r9
mov [rbp+var_420], rdi
mov [rbp+var_428], rsi
mov [rbp+var_430], rdx
mov [rbp+var_438], rcx
mov [rbp+var_440], r8
and al, 1
mov [rbp+var_441], al
mov [rbp+var_451], 0Ah
lea rax, aS3UseHttp+7; "http"
mov [rbp+var_460], rax
lea rax, aHttps; "https"
mov [rbp+var_468], rax
cmp [rbp+var_428], 0
jz short loc_2E5C7
mov rax, [rbp+var_428]
mov [rbp+var_450], rax
jmp short loc_2E5D5
loc_2E5C7:
mov rax, cs:default_domain
mov [rbp+var_450], rax
loc_2E5D5:
test [rbp+var_441], 1
jz short loc_2E5EE
mov rax, [rbp+var_460]
mov [rbp+var_470], rax
jmp short loc_2E5FC
loc_2E5EE:
mov rax, [rbp+var_468]
mov [rbp+var_470], rax
loc_2E5FC:
cmp [rbp+var_440], 0
jz loc_2E72A
mov rdi, [rbp+var_450]
call _strlen
add rax, 0Ah
mov [rbp+var_488], rax
mov rdi, [rbp+var_430]
call _strlen
mov rcx, rax
mov rax, [rbp+var_488]
add rax, rcx
mov [rbp+var_480], rax
mov rdi, [rbp+var_438]
call _strlen
mov rcx, rax
mov rax, [rbp+var_480]
add rax, rcx
mov [rbp+var_478], rax
mov rdi, [rbp+var_440]
call _strlen
mov rcx, rax
mov rax, [rbp+var_478]
add rax, rcx
cmp rax, 3FFh
jb short loc_2E68E
mov [rbp+var_411], 3
jmp loc_2E86A
loc_2E68E:
movzx eax, [rbp+arg_0]
cmp eax, 1
jnz short loc_2E6DF
lea rdi, [rbp+var_410]
mov rcx, [rbp+var_470]
mov r8, [rbp+var_450]
mov r9, [rbp+var_430]
mov r10, [rbp+var_438]
mov rax, [rbp+var_440]
mov esi, 3FFh
lea rdx, aSSSSS; "%s://%s/%s%s?%s"
mov [rsp+4B0h+var_4B0], r10
mov [rsp+4B0h+var_4A8], rax
mov al, 0
call _snprintf
jmp short loc_2E725
loc_2E6DF:
lea rdi, [rbp+var_410]
mov rcx, [rbp+var_470]
mov r8, [rbp+var_430]
mov r9, [rbp+var_450]
mov r10, [rbp+var_438]
mov rax, [rbp+var_440]
mov esi, 3FFh
lea rdx, aSSSSS_0; "%s://%s.%s%s?%s"
mov [rsp+4B0h+var_4B0], r10
mov [rsp+4B0h+var_4A8], rax
mov al, 0
call _snprintf
loc_2E725:
jmp loc_2E80F
loc_2E72A:
mov rdi, [rbp+var_450]
call _strlen
add rax, 0Ah
mov [rbp+var_498], rax
mov rdi, [rbp+var_430]
call _strlen
mov rcx, rax
mov rax, [rbp+var_498]
add rax, rcx
mov [rbp+var_490], rax
mov rdi, [rbp+var_438]
call _strlen
mov rcx, rax
mov rax, [rbp+var_490]
add rax, rcx
cmp rax, 3FFh
jb short loc_2E78E
mov [rbp+var_411], 3
jmp loc_2E86A
loc_2E78E:
movzx eax, [rbp+arg_0]
cmp eax, 1
jnz short loc_2E7D3
lea rdi, [rbp+var_410]
mov rcx, [rbp+var_470]
mov r8, [rbp+var_450]
mov r9, [rbp+var_430]
mov rax, [rbp+var_438]
mov esi, 3FFh
lea rdx, aSSSS; "%s://%s/%s%s"
mov [rsp+4B0h+var_4B0], rax
mov al, 0
call _snprintf
jmp short loc_2E80D
loc_2E7D3:
lea rdi, [rbp+var_410]
mov rcx, [rbp+var_470]
mov r8, [rbp+var_430]
mov r9, [rbp+var_450]
mov rax, [rbp+var_438]
mov esi, 3FFh
lea rdx, aSSSS_0; "%s://%s.%s%s"
mov [rsp+4B0h+var_4B0], rax
mov al, 0
call _snprintf
loc_2E80D:
jmp short $+2
loc_2E80F:
jmp short $+2
loc_2E811:
call ms3debug_get
test al, 1
jnz short loc_2E81C
jmp short loc_2E847
loc_2E81C:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea r8, [rbp+var_410]
lea rsi, aLibmarias3SDUr; "[libmarias3] %s:%d URI: %s\n"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 7Fh
mov al, 0
call _fprintf
loc_2E847:
jmp short $+2
loc_2E849:
mov rdi, [rbp+var_420]
lea rdx, [rbp+var_410]
mov esi, 2712h
mov al, 0
call _curl_easy_setopt
mov [rbp+var_411], 0
loc_2E86A:
mov al, [rbp+var_411]
mov [rbp+var_499], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2E897
mov al, [rbp+var_499]
add rsp, 4B0h
pop rbp
retn
loc_2E897:
call ___stack_chk_fail
| char build_request_uri(
long long a1,
const char *a2,
const char *a3,
const char *a4,
const char *a5,
char a6,
char a7)
{
long long v8; // [rsp+18h] [rbp-498h]
long long v9; // [rsp+20h] [rbp-490h]
long long v10; // [rsp+28h] [rbp-488h]
long long v11; // [rsp+30h] [rbp-480h]
long long v12; // [rsp+38h] [rbp-478h]
const char *v13; // [rsp+40h] [rbp-470h]
const char *v14; // [rsp+60h] [rbp-450h]
char v19[1032]; // [rsp+A0h] [rbp-410h] BYREF
unsigned long long v20; // [rsp+4A8h] [rbp-8h]
v20 = __readfsqword(0x28u);
if ( a2 )
v14 = a2;
else
v14 = default_domain[0];
if ( (a6 & 1) != 0 )
v13 = "http";
else
v13 = "https";
if ( a5 )
{
v10 = strlen(v14) + 10;
v11 = strlen(a3) + v10;
v12 = strlen(a4) + v11;
if ( (unsigned long long)(strlen(a5) + v12) >= 0x3FF )
return 3;
if ( a7 == 1 )
snprintf(v19, 1023LL, "%s://%s/%s%s?%s", v13, v14, a3, a4, a5);
else
snprintf(v19, 1023LL, "%s://%s.%s%s?%s", v13, a3, v14, a4, a5);
}
else
{
v8 = strlen(v14) + 10;
v9 = strlen(a3) + v8;
if ( (unsigned long long)(strlen(a4) + v9) >= 0x3FF )
return 3;
if ( a7 == 1 )
snprintf(v19, 1023LL, "%s://%s/%s%s", v13, v14, a3, a4);
else
snprintf(v19, 1023LL, "%s://%s.%s%s", v13, a3, v14, a4);
}
if ( (ms3debug_get() & 1) != 0 )
fprintf(
stderr,
"[libmarias3] %s:%d URI: %s\n",
"/workspace/llm4binary/github2025/eloqsql/storage/maria/libmarias3/src/request.c",
127,
v19);
curl_easy_setopt(a1, 10002LL, v19);
return 0;
}
| build_request_uri:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x4b0
MOV AL,R9B
MOV R9B,byte ptr [RBP + 0x10]
MOV R9,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],R9
MOV qword ptr [RBP + -0x420],RDI
MOV qword ptr [RBP + -0x428],RSI
MOV qword ptr [RBP + -0x430],RDX
MOV qword ptr [RBP + -0x438],RCX
MOV qword ptr [RBP + -0x440],R8
AND AL,0x1
MOV byte ptr [RBP + -0x441],AL
MOV byte ptr [RBP + -0x451],0xa
LEA RAX,[0x21d2a0]
MOV qword ptr [RBP + -0x460],RAX
LEA RAX,[0x21dd79]
MOV qword ptr [RBP + -0x468],RAX
CMP qword ptr [RBP + -0x428],0x0
JZ 0x0012e5c7
MOV RAX,qword ptr [RBP + -0x428]
MOV qword ptr [RBP + -0x450],RAX
JMP 0x0012e5d5
LAB_0012e5c7:
MOV RAX,qword ptr [0x00387998]
MOV qword ptr [RBP + -0x450],RAX
LAB_0012e5d5:
TEST byte ptr [RBP + -0x441],0x1
JZ 0x0012e5ee
MOV RAX,qword ptr [RBP + -0x460]
MOV qword ptr [RBP + -0x470],RAX
JMP 0x0012e5fc
LAB_0012e5ee:
MOV RAX,qword ptr [RBP + -0x468]
MOV qword ptr [RBP + -0x470],RAX
LAB_0012e5fc:
CMP qword ptr [RBP + -0x440],0x0
JZ 0x0012e72a
MOV RDI,qword ptr [RBP + -0x450]
CALL 0x001273b0
ADD RAX,0xa
MOV qword ptr [RBP + -0x488],RAX
MOV RDI,qword ptr [RBP + -0x430]
CALL 0x001273b0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x488]
ADD RAX,RCX
MOV qword ptr [RBP + -0x480],RAX
MOV RDI,qword ptr [RBP + -0x438]
CALL 0x001273b0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x480]
ADD RAX,RCX
MOV qword ptr [RBP + -0x478],RAX
MOV RDI,qword ptr [RBP + -0x440]
CALL 0x001273b0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x478]
ADD RAX,RCX
CMP RAX,0x3ff
JC 0x0012e68e
MOV byte ptr [RBP + -0x411],0x3
JMP 0x0012e86a
LAB_0012e68e:
MOVZX EAX,byte ptr [RBP + 0x10]
CMP EAX,0x1
JNZ 0x0012e6df
LEA RDI,[RBP + -0x410]
MOV RCX,qword ptr [RBP + -0x470]
MOV R8,qword ptr [RBP + -0x450]
MOV R9,qword ptr [RBP + -0x430]
MOV R10,qword ptr [RBP + -0x438]
MOV RAX,qword ptr [RBP + -0x440]
MOV ESI,0x3ff
LEA RDX,[0x21dd7f]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV AL,0x0
CALL 0x00127480
JMP 0x0012e725
LAB_0012e6df:
LEA RDI,[RBP + -0x410]
MOV RCX,qword ptr [RBP + -0x470]
MOV R8,qword ptr [RBP + -0x430]
MOV R9,qword ptr [RBP + -0x450]
MOV R10,qword ptr [RBP + -0x438]
MOV RAX,qword ptr [RBP + -0x440]
MOV ESI,0x3ff
LEA RDX,[0x21dd8f]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV AL,0x0
CALL 0x00127480
LAB_0012e725:
JMP 0x0012e80f
LAB_0012e72a:
MOV RDI,qword ptr [RBP + -0x450]
CALL 0x001273b0
ADD RAX,0xa
MOV qword ptr [RBP + -0x498],RAX
MOV RDI,qword ptr [RBP + -0x430]
CALL 0x001273b0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x498]
ADD RAX,RCX
MOV qword ptr [RBP + -0x490],RAX
MOV RDI,qword ptr [RBP + -0x438]
CALL 0x001273b0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x490]
ADD RAX,RCX
CMP RAX,0x3ff
JC 0x0012e78e
MOV byte ptr [RBP + -0x411],0x3
JMP 0x0012e86a
LAB_0012e78e:
MOVZX EAX,byte ptr [RBP + 0x10]
CMP EAX,0x1
JNZ 0x0012e7d3
LEA RDI,[RBP + -0x410]
MOV RCX,qword ptr [RBP + -0x470]
MOV R8,qword ptr [RBP + -0x450]
MOV R9,qword ptr [RBP + -0x430]
MOV RAX,qword ptr [RBP + -0x438]
MOV ESI,0x3ff
LEA RDX,[0x21dd9f]
MOV qword ptr [RSP],RAX
MOV AL,0x0
CALL 0x00127480
JMP 0x0012e80d
LAB_0012e7d3:
LEA RDI,[RBP + -0x410]
MOV RCX,qword ptr [RBP + -0x470]
MOV R8,qword ptr [RBP + -0x430]
MOV R9,qword ptr [RBP + -0x450]
MOV RAX,qword ptr [RBP + -0x438]
MOV ESI,0x3ff
LEA RDX,[0x21ddac]
MOV qword ptr [RSP],RAX
MOV AL,0x0
CALL 0x00127480
LAB_0012e80d:
JMP 0x0012e80f
LAB_0012e80f:
JMP 0x0012e811
LAB_0012e811:
CALL 0x0012c190
TEST AL,0x1
JNZ 0x0012e81c
JMP 0x0012e847
LAB_0012e81c:
MOV RAX,qword ptr [0x00386fd8]
MOV RDI,qword ptr [RAX]
LEA R8,[RBP + -0x410]
LEA RSI,[0x21ddb9]
LEA RDX,[0x21dc14]
MOV ECX,0x7f
MOV AL,0x0
CALL 0x001271d0
LAB_0012e847:
JMP 0x0012e849
LAB_0012e849:
MOV RDI,qword ptr [RBP + -0x420]
LEA RDX,[RBP + -0x410]
MOV ESI,0x2712
MOV AL,0x0
CALL 0x001277b0
MOV byte ptr [RBP + -0x411],0x0
LAB_0012e86a:
MOV AL,byte ptr [RBP + -0x411]
MOV byte ptr [RBP + -0x499],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012e897
MOV AL,byte ptr [RBP + -0x499]
ADD RSP,0x4b0
POP RBP
RET
LAB_0012e897:
CALL 0x001272b0
|
int8
build_request_uri(int8 param_1,char *param_2,char *param_3,char *param_4,char *param_5,
byte param_6,char param_7)
{
size_t sVar1;
size_t sVar2;
size_t sVar3;
size_t sVar4;
ulong uVar5;
long in_FS_OFFSET;
char *local_478;
char *local_458;
int1 local_419;
char local_418 [1032];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_458 = param_2;
if (param_2 == (char *)0x0) {
local_458 = default_domain;
}
if ((param_6 & 1) == 0) {
local_478 = "https";
}
else {
local_478 = "http";
}
if (param_5 == (char *)0x0) {
sVar1 = strlen(local_458);
sVar2 = strlen(param_3);
sVar3 = strlen(param_4);
if (0x3fe < sVar1 + 10 + sVar2 + sVar3) {
local_419 = 3;
goto LAB_0012e86a;
}
if (param_7 == '\x01') {
snprintf(local_418,0x3ff,"%s://%s/%s%s",local_478,local_458,param_3,param_4);
}
else {
snprintf(local_418,0x3ff,"%s://%s.%s%s",local_478,param_3,local_458,param_4);
}
}
else {
sVar1 = strlen(local_458);
sVar2 = strlen(param_3);
sVar3 = strlen(param_4);
sVar4 = strlen(param_5);
if (0x3fe < sVar1 + 10 + sVar2 + sVar3 + sVar4) {
local_419 = 3;
goto LAB_0012e86a;
}
if (param_7 == '\x01') {
snprintf(local_418,0x3ff,"%s://%s/%s%s?%s",local_478,local_458,param_3,param_4,param_5);
}
else {
snprintf(local_418,0x3ff,"%s://%s.%s%s?%s",local_478,param_3,local_458,param_4,param_5);
}
}
uVar5 = ms3debug_get();
if ((uVar5 & 1) != 0) {
fprintf(*(FILE **)PTR_stderr_00386fd8,"[libmarias3] %s:%d URI: %s\n",
"/workspace/llm4binary/github2025/eloqsql/storage/maria/libmarias3/src/request.c",0x7f,
local_418);
}
curl_easy_setopt(param_1,0x2712,local_418);
local_419 = 0;
LAB_0012e86a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_419);
}
| |
33,051 | psi_mutex_trylock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O3 | c | psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x30c8ef(%rip), %r15 # 0x3368c8
movq (%r15), %rax
movq 0x40(%rdi), %rsi
leaq -0x48(%rbp), %rdi
pushq $0x1
popq %rdx
callq *0x190(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x280a0
movl %eax, %r14d
testq %rbx, %rbx
je 0x2a00f
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x198(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_mutex_trylock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+40h]
lea rdi, [rbp+var_48]
push 1
pop rdx
call qword ptr [rax+190h]
mov rbx, rax
mov rdi, r14
call _pthread_mutex_trylock
mov r14d, eax
test rbx, rbx
jz short loc_2A00F
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+198h]
loc_2A00F:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server + 50))(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(a1);
if ( v3 )
(*((void ( **)(long long, _QWORD))PSI_server + 51))(v3, v4);
return v4;
}
| psi_mutex_trylock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x4368c8]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x40]
LEA RDI,[RBP + -0x48]
PUSH 0x1
POP RDX
CALL qword ptr [RAX + 0x190]
MOV RBX,RAX
MOV RDI,R14
CALL 0x001280a0
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012a00f
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x198]
LAB_0012a00f:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
| |
33,052 | ftxui::separatorHSelector(float, float, ftxui::Color, ftxui::Color) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/separator.cpp | Element separatorHSelector(float left,
float right,
Color unselected_color,
Color selected_color) {
class Impl : public Node {
public:
Impl(float left, float right, Color selected_color, Color unselected_color)
: left_(left),
right_(right),
unselected_color_(unselected_color),
selected_color_(selected_color) {}
void ComputeRequirement() override {
requirement_.min_x = 1;
requirement_.min_y = 1;
}
void Render(Screen& screen) override {
if (box_.y_max < box_.y_min) {
return;
}
// This are the two location with an empty demi-cell.
int demi_cell_left = int(left_ * 2.F - 1.F); // NOLINT
int demi_cell_right = int(right_ * 2.F + 2.F); // NOLINT
const int y = box_.y_min;
for (int x = box_.x_min; x <= box_.x_max; ++x) {
Pixel& pixel = screen.PixelAt(x, y);
const int a = (x - box_.x_min) * 2;
const int b = a + 1;
const bool a_empty = demi_cell_left == a || demi_cell_right == a;
const bool b_empty = demi_cell_left == b || demi_cell_right == b;
if (!a_empty && !b_empty) {
pixel.character = "─";
pixel.automerge = true;
} else {
pixel.character = a_empty ? "╶" : "╴"; // NOLINT
pixel.automerge = false;
}
if (demi_cell_left <= a && b <= demi_cell_right) {
pixel.foreground_color = selected_color_;
} else {
pixel.foreground_color = unselected_color_;
}
}
}
float left_;
float right_;
Color unselected_color_;
Color selected_color_;
};
return std::make_shared<Impl>(left, right, unselected_color, selected_color);
} | O2 | cpp | ftxui::separatorHSelector(float, float, ftxui::Color, ftxui::Color):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r15d
movl %esi, %ebp
movss %xmm1, 0x14(%rsp)
movss %xmm0, 0x10(%rsp)
movq %rdi, %rbx
movl $0x80, %edi
callq 0xc450
movq %rax, %r14
leaq 0xf(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x310ef(%rip), %rax # 0x50758
movq %rax, (%r14)
leaq 0x10(%r14), %r12
movq %r12, %rdi
callq 0x1ef28
leaq 0x30(%rsp), %r13
leaq 0x31124(%rip), %rax # 0x507a8
movq %rax, 0x10(%r14)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x6c(%r14)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0x70(%r14)
movl %r15d, 0x74(%r14)
movl %ebp, 0x78(%r14)
leaq 0x18(%rsp), %rdi
andq $0x0, 0x8(%rdi)
callq 0x1fb8c
movq %r12, (%rbx)
andq $0x0, (%r13)
movq %r14, 0x8(%rbx)
andq $0x0, -0x8(%r13)
movq %r13, %rdi
callq 0x13452
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1fb8c
movq %rbx, %rdi
callq 0xc7f0
| _ZN5ftxui18separatorHSelectorEffNS_5ColorES0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15d, edx
mov ebp, esi
movss [rsp+68h+var_54], xmm1
movss [rsp+68h+var_58], xmm0
mov rbx, rdi
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea rax, [rsp+68h+var_59]
mov [rsp+68h+var_50], rax
mov [rsp+68h+var_48], r14
mov rax, 100000001h
mov [r14+8], rax
lea rax, off_50758
mov [r14], rax
lea r12, [r14+10h]
mov rdi, r12; this
call _ZN5ftxui4NodeC2Ev; ftxui::Node::Node(void)
lea r13, [rsp+68h+var_38]
lea rax, off_507A8
mov [r14+10h], rax
movss xmm0, [rsp+68h+var_58]
movss dword ptr [r14+6Ch], xmm0
movss xmm0, [rsp+68h+var_54]
movss dword ptr [r14+70h], xmm0
mov [r14+74h], r15d
mov [r14+78h], ebp
lea rdi, [rsp+68h+var_50]
and qword ptr [rdi+8], 0
call _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIZN5ftxui18separatorHSelectorEffNS1_5ColorES2_E4ImplSaIS3_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev; std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl,std::allocator<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl>,(__gnu_cxx::_Lock_policy)2>>>::~__allocated_ptr()
mov [rbx], r12
and qword ptr [r13+0], 0
mov [rbx+8], r14
and qword ptr [r13-8], 0
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_10]
call _ZNSt15__allocated_ptrISaISt23_Sp_counted_ptr_inplaceIZN5ftxui18separatorHSelectorEffNS1_5ColorES2_E4ImplSaIS3_ELN9__gnu_cxx12_Lock_policyE2EEEED2Ev; std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl,std::allocator<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl>,(__gnu_cxx::_Lock_policy)2>>>::~__allocated_ptr()
mov rdi, rbx
call __Unwind_Resume
| _QWORD * ftxui::separatorHSelector(_QWORD *a1, int a2, int a3, float a4, float a5)
{
long long v6; // r14
char v8; // [rsp+Fh] [rbp-59h] BYREF
float v9; // [rsp+10h] [rbp-58h]
float v10; // [rsp+14h] [rbp-54h]
char *v11; // [rsp+18h] [rbp-50h]
long long v12; // [rsp+20h] [rbp-48h]
long long v13; // [rsp+28h] [rbp-40h]
_QWORD v14[7]; // [rsp+30h] [rbp-38h] BYREF
v10 = a5;
v9 = a4;
v6 = operator new(0x80uLL);
v11 = &v8;
v12 = v6;
*(_QWORD *)(v6 + 8) = 0x100000001LL;
*(_QWORD *)v6 = off_50758;
ftxui::Node::Node((ftxui::Node *)(v6 + 16));
*(_QWORD *)(v6 + 16) = &off_507A8;
*(float *)(v6 + 108) = v9;
*(float *)(v6 + 112) = v10;
*(_DWORD *)(v6 + 116) = a3;
*(_DWORD *)(v6 + 120) = a2;
v12 = 0LL;
std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl,std::allocator<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl>,(__gnu_cxx::_Lock_policy)2>>>::~__allocated_ptr();
*a1 = v6 + 16;
v14[0] = 0LL;
a1[1] = v6;
v13 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v14);
return a1;
}
| separatorHSelector:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15D,EDX
MOV EBP,ESI
MOVSS dword ptr [RSP + 0x14],XMM1
MOVSS dword ptr [RSP + 0x10],XMM0
MOV RBX,RDI
MOV EDI,0x80
CALL 0x0010c450
MOV R14,RAX
LEA RAX,[RSP + 0xf]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],R14
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x150758]
MOV qword ptr [R14],RAX
LEA R12,[R14 + 0x10]
LAB_0011f670:
MOV RDI,R12
CALL 0x0011ef28
LAB_0011f678:
LEA R13,[RSP + 0x30]
LEA RAX,[0x1507a8]
MOV qword ptr [R14 + 0x10],RAX
MOVSS XMM0,dword ptr [RSP + 0x10]
MOVSS dword ptr [R14 + 0x6c],XMM0
MOVSS XMM0,dword ptr [RSP + 0x14]
MOVSS dword ptr [R14 + 0x70],XMM0
MOV dword ptr [R14 + 0x74],R15D
MOV dword ptr [R14 + 0x78],EBP
LEA RDI,[RSP + 0x18]
AND qword ptr [RDI + 0x8],0x0
CALL 0x0011fb8c
MOV qword ptr [RBX],R12
AND qword ptr [R13],0x0
MOV qword ptr [RBX + 0x8],R14
AND qword ptr [R13 + -0x8],0x0
MOV RDI,R13
CALL 0x00113452
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ftxui::separatorHSelector(float, float, ftxui::Color, ftxui::Color) */
ftxui * __thiscall
ftxui::separatorHSelector
(int4 param_1,int4 param_2,ftxui *this,int4 param_4,int4 param_5)
{
int8 *puVar1;
int1 local_59;
int4 local_58;
int4 local_54;
int1 *local_50;
int8 *local_48;
int8 local_40;
int8 local_38;
local_58 = param_1;
local_54 = param_2;
puVar1 = (int8 *)operator_new(0x80);
local_50 = &local_59;
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_00150758;
local_48 = puVar1;
/* try { // try from 0011f670 to 0011f677 has its CatchHandler @ 0011f6e2 */
Node::Node((Node *)(puVar1 + 2));
puVar1[2] = &PTR__Node_001507a8;
*(int4 *)((long)puVar1 + 0x6c) = local_58;
*(int4 *)(puVar1 + 0xe) = local_54;
*(int4 *)((long)puVar1 + 0x74) = param_5;
*(int4 *)(puVar1 + 0xf) = param_4;
local_48 = (int8 *)0x0;
std::
__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl,std::allocator<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl>,(__gnu_cxx::_Lock_policy)2>>>
::~__allocated_ptr((__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl,std::allocator<ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl>,(__gnu_cxx::_Lock_policy)2>>>
*)&local_50);
*(Node **)this = (Node *)(puVar1 + 2);
local_38 = 0;
*(int8 **)(this + 8) = puVar1;
local_40 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_38);
return this;
}
| |
33,053 | js_os_dup2 | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_dup2(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int fd, fd2, ret;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &fd2, argv[1]))
return JS_EXCEPTION;
ret = js_get_errno(dup2(fd, fd2));
return JS_NewInt32(ctx, ret);
} | O2 | c | js_os_dup2:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rdi, %r14
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0xc(%rsp), %rsi
callq 0x215d7
pushq $0x6
popq %rbx
testl %eax, %eax
jne 0x1572a
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x215d7
testl %eax, %eax
je 0x15739
xorl %eax, %eax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
callq 0xe270
movslq %eax, %rdi
callq 0x113ab
movl %eax, %eax
xorl %ebx, %ebx
jmp 0x1572c
| js_os_dup2:
push r15
push r14
push rbx
sub rsp, 10h
mov r15, r8
mov r14, rdi
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+28h+var_1C]
call JS_ToInt32
push 6
pop rbx
test eax, eax
jnz short loc_1572A
mov rdx, [r15+10h]
mov rcx, [r15+18h]
lea rsi, [rsp+28h+var_20]
mov rdi, r14
call JS_ToInt32
test eax, eax
jz short loc_15739
loc_1572A:
xor eax, eax
loc_1572C:
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_15739:
mov edi, [rsp+28h+var_1C]
mov esi, [rsp+28h+var_20]
call _dup2
movsxd rdi, eax
call js_get_errno
mov eax, eax
xor ebx, ebx
jmp short loc_1572C
| long long js_os_dup2(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
int v7; // eax
unsigned int v8; // [rsp+8h] [rbp-20h] BYREF
_DWORD v9[7]; // [rsp+Ch] [rbp-1Ch] BYREF
if ( (unsigned int)JS_ToInt32(a1, v9, *a5, a5[1]) || (unsigned int)JS_ToInt32(a1, &v8, a5[2], a5[3]) )
return 0LL;
v7 = dup2(v9[0], v8);
return (unsigned int)js_get_errno(v7);
}
| js_os_dup2:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R15,R8
MOV R14,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x001215d7
PUSH 0x6
POP RBX
TEST EAX,EAX
JNZ 0x0011572a
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x001215d7
TEST EAX,EAX
JZ 0x00115739
LAB_0011572a:
XOR EAX,EAX
LAB_0011572c:
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_00115739:
MOV EDI,dword ptr [RSP + 0xc]
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x0010e270
MOVSXD RDI,EAX
CALL 0x001113ab
MOV EAX,EAX
XOR EBX,EBX
JMP 0x0011572c
|
int4 js_os_dup2(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 *in_R8;
int local_20;
int local_1c;
iVar1 = JS_ToInt32(param_1,&local_1c,*in_R8,in_R8[1]);
if ((iVar1 == 0) && (iVar1 = JS_ToInt32(param_1,&local_20,in_R8[2],in_R8[3]), iVar1 == 0)) {
iVar1 = dup2(local_1c,local_20);
uVar2 = js_get_errno((long)iVar1);
return uVar2;
}
return 0;
}
| |
33,054 | js_os_dup2 | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_dup2(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int fd, fd2, ret;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &fd2, argv[1]))
return JS_EXCEPTION;
ret = js_get_errno(dup2(fd, fd2));
return JS_NewInt32(ctx, ret);
} | O3 | c | js_os_dup2:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rdi, %r14
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0xc(%rsp), %rsi
callq 0x2803b
movl $0x6, %ebx
testl %eax, %eax
jne 0x1b3f1
movq 0x10(%r15), %rdx
movq 0x18(%r15), %rcx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2803b
testl %eax, %eax
je 0x1b400
xorl %eax, %eax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
callq 0xe260
cmpl $-0x1, %eax
jne 0x1b41e
callq 0xe0b0
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, %eax
xorl %ebx, %ebx
jmp 0x1b3f3
| js_os_dup2:
push r15
push r14
push rbx
sub rsp, 10h
mov r15, r8
mov r14, rdi
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+28h+var_1C]
call JS_ToInt32
mov ebx, 6
test eax, eax
jnz short loc_1B3F1
mov rdx, [r15+10h]
mov rcx, [r15+18h]
lea rsi, [rsp+28h+var_20]
mov rdi, r14
call JS_ToInt32
test eax, eax
jz short loc_1B400
loc_1B3F1:
xor eax, eax
loc_1B3F3:
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_1B400:
mov edi, [rsp+28h+var_1C]
mov esi, [rsp+28h+var_20]
call _dup2
cmp eax, 0FFFFFFFFh
jnz short loc_1B41E
call ___errno_location
mov rcx, rax
xor eax, eax
sub eax, [rcx]
loc_1B41E:
mov eax, eax
xor ebx, ebx
jmp short loc_1B3F3
| long long js_os_dup2(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long result; // rax
long long v7; // rdi
unsigned int v8; // [rsp+8h] [rbp-20h] BYREF
_DWORD v9[7]; // [rsp+Ch] [rbp-1Ch] BYREF
if ( (unsigned int)JS_ToInt32(a1, v9, *a5, a5[1]) || (unsigned int)JS_ToInt32(a1, &v8, a5[2], a5[3]) )
return 0LL;
v7 = v9[0];
LODWORD(result) = dup2(v9[0], v8);
if ( (_DWORD)result == -1 )
LODWORD(result) = -*(_DWORD *)__errno_location(v7);
return (unsigned int)result;
}
| js_os_dup2:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R15,R8
MOV R14,RDI
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x0012803b
MOV EBX,0x6
TEST EAX,EAX
JNZ 0x0011b3f1
MOV RDX,qword ptr [R15 + 0x10]
MOV RCX,qword ptr [R15 + 0x18]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x0012803b
TEST EAX,EAX
JZ 0x0011b400
LAB_0011b3f1:
XOR EAX,EAX
LAB_0011b3f3:
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_0011b400:
MOV EDI,dword ptr [RSP + 0xc]
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x0010e260
CMP EAX,-0x1
JNZ 0x0011b41e
CALL 0x0010e0b0
MOV RCX,RAX
XOR EAX,EAX
SUB EAX,dword ptr [RCX]
LAB_0011b41e:
MOV EAX,EAX
XOR EBX,EBX
JMP 0x0011b3f3
|
int js_os_dup2(int8 param_1)
{
int iVar1;
int *piVar2;
int8 *in_R8;
int local_20;
int local_1c;
iVar1 = JS_ToInt32(param_1,&local_1c,*in_R8,in_R8[1]);
if ((iVar1 == 0) && (iVar1 = JS_ToInt32(param_1,&local_20,in_R8[2],in_R8[3]), iVar1 == 0)) {
iVar1 = dup2(local_1c,local_20);
if (iVar1 == -1) {
piVar2 = __errno_location();
iVar1 = -*piVar2;
}
}
else {
iVar1 = 0;
}
return iVar1;
}
| |
33,055 | select_union_direct::send_data(List<Item>&) | eloqsql/sql/sql_union.cc | int select_union_direct::send_data(List<Item> &items)
{
if (!limit)
return false;
limit--;
if (offset)
{
offset--;
return false;
}
send_records++;
fill_record(thd, table, table->field, items, true, false);
if (unlikely(thd->is_error()))
return true; /* purecov: inspected */
return result->send_data(unit->item_list);
} | O0 | cpp | select_union_direct::send_data(List<Item>&):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x110(%rax)
jne 0x6a6aae
movl $0x0, -0x4(%rbp)
jmp 0x6a6b6c
movq -0x20(%rbp), %rax
movq 0x110(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x110(%rax)
cmpq $0x0, 0x108(%rax)
je 0x6a6aed
movq -0x20(%rbp), %rax
movq 0x108(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x108(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x6a6b6c
movq -0x20(%rbp), %rax
movq 0x118(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x118(%rax)
movq 0x8(%rax), %rdi
movq 0xe0(%rax), %rsi
movq 0xe0(%rax), %rax
movq 0xb0(%rax), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x52d150
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4ad490
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x6a6b4e
movl $0x1, -0x4(%rbp)
jmp 0x6a6b6c
movq -0x20(%rbp), %rax
movq 0xe8(%rax), %rdi
movq 0x10(%rax), %rsi
addq $0x7c0, %rsi # imm = 0x7C0
movq (%rdi), %rax
callq *(%rax)
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN19select_union_direct9send_dataER4ListI4ItemE:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
cmp qword ptr [rax+110h], 0
jnz short loc_6A6AAE
mov [rbp+var_4], 0
jmp loc_6A6B6C
loc_6A6AAE:
mov rax, [rbp+var_20]
mov rcx, [rax+110h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+110h], rcx
cmp qword ptr [rax+108h], 0
jz short loc_6A6AED
mov rax, [rbp+var_20]
mov rcx, [rax+108h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+108h], rcx
mov [rbp+var_4], 0
jmp short loc_6A6B6C
loc_6A6AED:
mov rax, [rbp+var_20]
mov rcx, [rax+118h]
add rcx, 1
mov [rax+118h], rcx
mov rdi, [rax+8]
mov rsi, [rax+0E0h]
mov rax, [rax+0E0h]
mov rdx, [rax+0B0h]
mov rcx, [rbp+var_18]
mov r8d, 1
xor r9d, r9d
call _Z11fill_recordP3THDP5TABLEPP5FieldR4ListI4ItemEbb; fill_record(THD *,TABLE *,Field **,List<Item> &,bool,bool)
mov rax, [rbp+var_20]
mov rdi, [rax+8]; this
call _ZNK3THD8is_errorEv; THD::is_error(void)
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_6A6B4E
mov [rbp+var_4], 1
jmp short loc_6A6B6C
loc_6A6B4E:
mov rax, [rbp+var_20]
mov rdi, [rax+0E8h]
mov rsi, [rax+10h]
add rsi, 7C0h
mov rax, [rdi]
call qword ptr [rax]
mov [rbp+var_4], eax
loc_6A6B6C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long select_union_direct::send_data(long long a1, base_list *a2)
{
if ( *(_QWORD *)(a1 + 272) )
{
--*(_QWORD *)(a1 + 272);
if ( *(_QWORD *)(a1 + 264) )
{
--*(_QWORD *)(a1 + 264);
return 0;
}
else
{
++*(_QWORD *)(a1 + 280);
fill_record(*(THD **)(a1 + 8), *(TABLE **)(a1 + 224), *(Field ***)(*(_QWORD *)(a1 + 224) + 176LL), a2, 1, 0);
if ( (THD::is_error(*(Diagnostics_area ***)(a1 + 8)) & 1) != 0 )
return 1;
else
return (unsigned int)(***(long long ( ****)(_QWORD, long long))(a1 + 232))(
*(_QWORD *)(a1 + 232),
*(_QWORD *)(a1 + 16) + 1984LL);
}
}
else
{
return 0;
}
}
| ~Item_func_substr_oracle:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x006a6e60
ADD RSP,0x10
POP RBP
RET
|
/* Item_func_substr_oracle::~Item_func_substr_oracle() */
void __thiscall Item_func_substr_oracle::~Item_func_substr_oracle(Item_func_substr_oracle *this)
{
Item_func_substr::~Item_func_substr((Item_func_substr *)this);
return;
}
| |
33,056 | linenoiseHistorySave | llama.cpp/examples/run/linenoise.cpp/linenoise.cpp | int linenoiseHistorySave(const char *filename) {
mode_t old_umask = umask(S_IXUSR|S_IRWXG|S_IRWXO);
File file;
file.open(filename, "w");
umask(old_umask);
if (file.file == NULL) {
return -1;
}
chmod(filename,S_IRUSR|S_IWUSR);
for (int j = 0; j < history_len; ++j) {
fprintf(file.file, "%s\n", history[j]);
}
return 0;
} | O3 | cpp | linenoiseHistorySave:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl $0x7f, %edi
callq 0x1dde0
movl %eax, %ebp
movq $0x0, 0x8(%rsp)
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rbx, %rsi
callq 0x23696
leaq 0x28(%rsp), %r14
movq -0x10(%r14), %rdi
leaq 0x9ede1(%rip), %rsi # 0xd2618
callq 0x1e0b0
movq %rax, 0x8(%rsp)
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x33857
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1d160
movl %ebp, %edi
callq 0x1dde0
cmpq $0x0, 0x8(%rsp)
je 0x338b3
movq %rbx, %rdi
movl $0x180, %esi # imm = 0x180
callq 0x1d1a0
cmpl $0x0, 0xd8546(%rip) # 0x10bdc0
jle 0x338ba
xorl %ebx, %ebx
leaq 0x9e64f(%rip), %r14 # 0xd1ed4
xorl %r15d, %r15d
movq 0x8(%rsp), %rdi
movq 0xd8524(%rip), %rax # 0x10bdb8
movq (%rax,%r15,8), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x1d290
incq %r15
movslq 0xd8514(%rip), %rax # 0x10bdc0
cmpq %rax, %r15
jl 0x33888
jmp 0x338bc
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0x338bc
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0x30002
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x30002
movq %rbx, %rdi
callq 0x1d8e0
| linenoiseHistorySave:
push rbp
push r15
push r14
push rbx
sub rsp, 38h
mov rbx, rdi
mov edi, 7Fh
call _umask
mov ebp, eax
mov [rsp+58h+var_50], 0
mov [rsp+58h+var_48], 0FFFFFFFFh
lea rdi, [rsp+58h+var_40]
lea rdx, [rsp+58h+var_51]
mov rsi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea r14, [rsp+58h+var_30]
mov rdi, [r14-10h]
lea rsi, aStrftimeNow+0Bh; "w"
call _fopen
mov [rsp+58h+var_50], rax
mov rdi, [r14-10h]; void *
cmp rdi, r14
jz short loc_33857
mov rsi, [rsp+58h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33857:
mov edi, ebp
call _umask
cmp [rsp+58h+var_50], 0
jz short loc_338B3
mov rdi, rbx
mov esi, 180h
call _chmod
cmp cs:_ZL11history_len, 0; history_len
jle short loc_338BA
xor ebx, ebx
lea r14, aSFailedToParse+3Ah; "%s\n"
xor r15d, r15d
loc_33888:
mov rdi, [rsp+58h+var_50]
mov rax, cs:_ZL7history; history
mov rdx, [rax+r15*8]
mov rsi, r14
xor eax, eax
call _fprintf
inc r15
movsxd rax, cs:_ZL11history_len; history_len
cmp r15, rax
jl short loc_33888
jmp short loc_338BC
loc_338B3:
mov ebx, 0FFFFFFFFh
jmp short loc_338BC
loc_338BA:
xor ebx, ebx
loc_338BC:
lea rdi, [rsp+58h+var_50]; this
call _ZN4FileD2Ev; File::~File()
mov eax, ebx
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN4FileD2Ev; File::~File()
mov rdi, rbx
call __Unwind_Resume
| long long linenoiseHistorySave(long long a1)
{
unsigned int v1; // ebp
unsigned int v2; // ebx
long long v3; // r15
long long v5; // [rsp+8h] [rbp-50h] BYREF
int v6; // [rsp+10h] [rbp-48h]
long long *v7; // [rsp+18h] [rbp-40h] BYREF
long long v8; // [rsp+28h] [rbp-30h] BYREF
v1 = umask(127LL);
v6 = -1;
std::string::basic_string<std::allocator<char>>(&v7, a1);
v5 = fopen(v7, "w");
if ( v7 != &v8 )
operator delete(v7, v8 + 1);
umask(v1);
if ( v5 )
{
chmod(a1, 384LL);
if ( history_len <= 0 )
{
v2 = 0;
}
else
{
v2 = 0;
v3 = 0LL;
do
fprintf(v5, "%s\n", *(const char **)(history + 8 * v3++));
while ( v3 < history_len );
}
}
else
{
v2 = -1;
}
File::~File((File *)&v5);
return v2;
}
| linenoiseHistorySave:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV EDI,0x7f
CALL 0x0011dde0
MOV EBP,EAX
MOV qword ptr [RSP + 0x8],0x0
MOV dword ptr [RSP + 0x10],0xffffffff
LAB_00133815:
LEA RDI,[RSP + 0x18]
LEA RDX,[RSP + 0x7]
MOV RSI,RBX
CALL 0x00123696
LAB_00133827:
LEA R14,[RSP + 0x28]
MOV RDI,qword ptr [R14 + -0x10]
LEA RSI,[0x1d2618]
CALL 0x0011e0b0
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [R14 + -0x10]
CMP RDI,R14
JZ 0x00133857
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011d160
LAB_00133857:
MOV EDI,EBP
CALL 0x0011dde0
CMP qword ptr [RSP + 0x8],0x0
JZ 0x001338b3
MOV RDI,RBX
MOV ESI,0x180
CALL 0x0011d1a0
CMP dword ptr [0x0020bdc0],0x0
JLE 0x001338ba
XOR EBX,EBX
LEA R14,[0x1d1ed4]
XOR R15D,R15D
LAB_00133888:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [0x0020bdb8]
MOV RDX,qword ptr [RAX + R15*0x8]
MOV RSI,R14
XOR EAX,EAX
CALL 0x0011d290
INC R15
MOVSXD RAX,dword ptr [0x0020bdc0]
CMP R15,RAX
JL 0x00133888
JMP 0x001338bc
LAB_001338b3:
MOV EBX,0xffffffff
JMP 0x001338bc
LAB_001338ba:
XOR EBX,EBX
LAB_001338bc:
LEA RDI,[RSP + 0x8]
CALL 0x00130002
MOV EAX,EBX
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 linenoiseHistorySave(char *param_1)
{
__mode_t __mask;
int8 uVar1;
long lVar2;
allocator local_51;
FILE *local_50;
int4 local_48;
long *local_40 [2];
long local_30 [2];
__mask = umask(0x7f);
local_50 = (FILE *)0x0;
local_48 = 0xffffffff;
/* try { // try from 00133815 to 00133826 has its CatchHandler @ 001338d3 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_1,&local_51);
local_50 = fopen((char *)local_40[0],"w");
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
umask(__mask);
if (local_50 == (FILE *)0x0) {
uVar1 = 0xffffffff;
}
else {
chmod(param_1,0x180);
if (history_len < 1) {
uVar1 = 0;
}
else {
uVar1 = 0;
lVar2 = 0;
do {
fprintf(local_50,"%s\n",*(int8 *)(history + lVar2 * 8));
lVar2 = lVar2 + 1;
} while (lVar2 < history_len);
}
}
File::~File((File *)&local_50);
return uVar1;
}
| |
33,057 | ma_keylength | eloqsql/storage/maria/ma_search.c | uint _ma_keylength(MARIA_KEYDEF *keyinfo, const uchar *key)
{
reg1 HA_KEYSEG *keyseg;
const 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 | ma_keylength:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzwl 0xa2(%rax), %eax
andl $0x28, %eax
cmpl $0x0, %eax
jne 0x6de12
movq -0x10(%rbp), %rax
movzwl 0xaa(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x6df17
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x18(%rax)
je 0x6deff
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x6de62
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpb $0x0, (%rax)
jne 0x6de60
jmp 0x6deee
jmp 0x6de62
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x29, %eax
cmpl $0x0, %eax
je 0x6ded6
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0x6de97
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x6dec4
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 0x6deec
movq -0x20(%rbp), %rax
movzwl 0x14(%rax), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x6deee
movq -0x20(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x20(%rbp)
jmp 0x6de29
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
nopl (%rax)
| _ma_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+0A2h]
and eax, 28h
cmp eax, 0
jnz short loc_6DE12
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+0AAh]
mov [rbp+var_4], eax
jmp loc_6DF17
loc_6DE12:
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+0C0h]
mov [rbp+var_20], rax
loc_6DE29:
mov rax, [rbp+var_20]
cmp byte ptr [rax+18h], 0
jz loc_6DEFF
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 10h
cmp eax, 0
jz short loc_6DE62
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
cmp byte ptr [rax], 0
jnz short loc_6DE60
jmp loc_6DEEE
loc_6DE60:
jmp short $+2
loc_6DE62:
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
and eax, 29h
cmp eax, 0
jz short loc_6DED6
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_6DE97
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_6DEC4
loc_6DE97:
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_6DEC4:
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_6DEEC
loc_6DED6:
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_6DEEC:
jmp short $+2
loc_6DEEE:
mov rax, [rbp+var_20]
add rax, 20h ; ' '
mov [rbp+var_20], rax
jmp loc_6DE29
loc_6DEFF:
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_6DF17:
mov eax, [rbp+var_4]
pop rbp
retn
| long long ma_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 + 162) & 0x28) != 0 )
{
for ( i = *(_QWORD *)(a1 + 192); *(_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 + 170);
}
}
| _ma_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 + 0xa2]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x0016de12
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016df17
LAB_0016de12:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xc0]
MOV qword ptr [RBP + -0x20],RAX
LAB_0016de29:
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x18],0x0
JZ 0x0016deff
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x10
CMP EAX,0x0
JZ 0x0016de62
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
CMP byte ptr [RAX],0x0
JNZ 0x0016de60
JMP 0x0016deee
LAB_0016de60:
JMP 0x0016de62
LAB_0016de62:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x29
CMP EAX,0x0
JZ 0x0016ded6
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x0016de97
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 0x0016dec4
LAB_0016de97:
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_0016dec4:
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 0x0016deec
LAB_0016ded6:
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_0016deec:
JMP 0x0016deee
LAB_0016deee:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x20
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016de29
LAB_0016deff:
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_0016df17:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint _ma_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 + 0xa2) & 0x28) == 0) {
local_c = (uint)*(ushort *)(param_1 + 0xaa);
}
else {
local_20 = param_2;
for (local_28 = *(long *)(param_1 + 0xc0); *(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;
}
| |
33,058 | 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));
} | O2 | 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, %r14
movq %rdi, %rbx
movb (%rdi), %al
testb %al, %al
jne 0x7edc7
movb $0x2, (%rbx)
callq 0x3f2da
movq %rax, 0x8(%rbx)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f1a0
movb (%rbx), %al
cmpb $0x2, %al
jne 0x7ee10
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
cmpq %r14, %rcx
ja 0x7edfd
leaq 0x1(%r14), %rsi
callq 0x7f03a
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f1a0
movq 0x8(%rbx), %rax
movq (%rax), %rax
shlq $0x4, %r14
addq %rax, %r14
movq %r14, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %r14
movq %rbx, %rdi
callq 0x44c82
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x375ca(%rip), %rsi # 0xb63fc
leaq 0x10(%rsp), %rdi
callq 0x79b14
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl $0x131, %esi # imm = 0x131
movq %rbx, %rcx
callq 0x44b36
xorl %ebp, %ebp
leaq 0x7e0db(%rip), %rsi # 0xfcf38
leaq -0x3d652(%rip), %rdx # 0x41812
movq %r14, %rdi
callq 0x23fb0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x242a8
testb %bpl, %bpl
jne 0x7ee83
jmp 0x7ee8b
movq %rax, %rbx
movq %r14, %rdi
callq 0x23690
movq %rbx, %rdi
callq 0x24030
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
mov al, [rdi]
test al, al
jnz short loc_7EDC7
mov byte ptr [rbx], 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>()
mov [rbx+8], rax
push 1
pop rsi
mov rdi, rbx
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, [rbx]
loc_7EDC7:
cmp al, 2
jnz short loc_7EE10
mov rdi, [rbx+8]
mov rax, [rdi]
mov rcx, [rdi+8]
sub rcx, rax
sar rcx, 4
cmp rcx, r14
ja short loc_7EDFD
lea rsi, [r14+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)
push 1
pop rsi
mov rdi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, [rbx+8]
mov rax, [rax]
loc_7EDFD:
shl r14, 4
add r14, rax
mov rax, r14
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_7EE10:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rbx
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, r14; this
mov esi, 131h; int
mov rcx, rbx
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, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7EE83
jmp short loc_7EE8B
mov rbx, rax
loc_7EE83:
mov rdi, r14; void *
call ___cxa_free_exception
loc_7EE8B:
mov rdi, rbx
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; // rdi
long long v5; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // r14
const char *v8; // [rsp+8h] [rbp-40h] BYREF
_BYTE v9[56]; // [rsp+10h] [rbp-38h] BYREF
v3 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 2;
*(_QWORD *)(a1 + 8) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>();
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::type_error *)__cxa_allocate_exception(0x20uLL);
v8 = 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)v9,
(long long)"cannot use operator[] with a numeric argument with ",
&v8);
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,
(long long)v9);
__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);
}
v4 = *(long long **)(a1 + 8);
v5 = *v4;
if ( (v4[1] - *v4) >> 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(
v4,
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);
v5 = **(_QWORD **)(a1 + 8);
}
return v5 + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x0017edc7
MOV byte ptr [RBX],0x2
CALL 0x0013f2da
MOV qword ptr [RBX + 0x8],RAX
PUSH 0x1
POP RSI
MOV RDI,RBX
CALL 0x0013f1a0
MOV AL,byte ptr [RBX]
LAB_0017edc7:
CMP AL,0x2
JNZ 0x0017ee10
MOV RDI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
SUB RCX,RAX
SAR RCX,0x4
CMP RCX,R14
JA 0x0017edfd
LEA RSI,[R14 + 0x1]
CALL 0x0017f03a
PUSH 0x1
POP RSI
MOV RDI,RBX
CALL 0x0013f1a0
MOV RAX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RAX]
LAB_0017edfd:
SHL R14,0x4
ADD R14,RAX
MOV RAX,R14
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0017ee10:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV R14,RAX
MOV RDI,RBX
CALL 0x00144c82
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0017ee2b:
LEA RSI,[0x1b63fc]
LEA RDI,[RSP + 0x10]
CALL 0x00179b14
MOV BPL,0x1
LAB_0017ee3f:
LEA RDX,[RSP + 0x10]
MOV RDI,R14
MOV ESI,0x131
MOV RCX,RBX
CALL 0x00144b36
XOR EBP,EBP
LEA RSI,[0x1fcf38]
LEA RDX,[0x141812]
MOV RDI,R14
CALL 0x00123fb0
|
/* 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;
vector *pvVar2;
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;
pvVar2 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
();
*(vector **)(this + 8) = pvVar2;
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 0017ee2b to 0017ee3b has its CatchHandler @ 0017ee80 */
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 0017ee3f to 0017ee6b has its CatchHandler @ 0017ee6c */
_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);
}
| |
33,059 | query_int_variable | eloqsql/libmariadb/unittest/libmariadb/my_test.h | my_bool query_int_variable(MYSQL *con, const char *var_name, int *var_value)
{
MYSQL_RES *rs;
MYSQL_ROW row;
char query_buffer[MAX_TEST_QUERY_LENGTH];
my_bool is_null;
sprintf(query_buffer,
"SELECT %s",
(const char *) var_name);
FAIL_IF(mysql_query(con, query_buffer), "Query failed");
FAIL_UNLESS(rs= mysql_store_result(con), "Invaliid result set");
FAIL_UNLESS(row= mysql_fetch_row(rs), "Nothing to fetch");
is_null= row[0] == NULL;
if (!is_null)
*var_value= atoi(row[0]);
mysql_free_result(rs);
return is_null;
} | O3 | c | query_int_variable:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rdx, %rbx
movq %rsi, %r8
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x2553d(%rip), %rcx # 0x392c7
leaq -0x150(%rbp), %r15
movl $0x12c, %edx # imm = 0x12C
movq %r15, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x132b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x1ee15
testl %eax, %eax
je 0x13dfc
leaq 0x25365(%rip), %rdi # 0x39120
leaq 0x2550f(%rip), %rsi # 0x392d1
leaq 0x2537f(%rip), %rdx # 0x39148
movl $0x1a2, %ecx # imm = 0x1A2
xorl %eax, %eax
callq 0x1970b
movb $0x1, %r14b
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x13e74
movl %r14d, %eax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x1fd0d
testq %rax, %rax
je 0x13e36
movq %rax, %r15
movq %rax, %rdi
callq 0x1ff10
testq %rax, %rax
je 0x13e55
movq (%rax), %rdi
testq %rdi, %rdi
sete %r14b
je 0x13e2c
callq 0x13720
movl %eax, (%rbx)
movq %r15, %rdi
callq 0x1aac2
jmp 0x13dd8
leaq 0x252e3(%rip), %rdi # 0x39120
leaq 0x2549a(%rip), %rsi # 0x392de
leaq 0x252fd(%rip), %rdx # 0x39148
movl $0x1a3, %ecx # imm = 0x1A3
jmp 0x13dce
leaq 0x252c4(%rip), %rdi # 0x39120
leaq 0x2548f(%rip), %rsi # 0x392f2
leaq 0x252de(%rip), %rdx # 0x39148
movl $0x1a4, %ecx # imm = 0x1A4
jmp 0x13dce
callq 0x13510
| query_int_variable:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 138h
mov rbx, rdx
mov r8, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
lea rcx, aSelectS; "SELECT %s"
lea r15, [rbp+var_150]
mov edx, 12Ch
mov rdi, r15
mov esi, 1
xor eax, eax
call ___sprintf_chk
mov rdi, r14
mov rsi, r15
call mysql_query
test eax, eax
jz short loc_13DFC
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aQueryFailed; "Query failed"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1A2h
loc_13DCE:
xor eax, eax
call diag
mov r14b, 1
loc_13DD8:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz loc_13E74
mov eax, r14d
add rsp, 138h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_13DFC:
mov rdi, r14
call mysql_store_result
test rax, rax
jz short loc_13E36
mov r15, rax
mov rdi, rax
call mysql_fetch_row
test rax, rax
jz short loc_13E55
mov rdi, [rax]
test rdi, rdi
setz r14b
jz short loc_13E2C
call _atoi
mov [rbx], eax
loc_13E2C:
mov rdi, r15
call mysql_free_result
jmp short loc_13DD8
loc_13E36:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvaliidResult; "Invaliid result set"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1A3h
jmp loc_13DCE
loc_13E55:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNothingToFetch; "Nothing to fetch"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 1A4h
jmp loc_13DCE
loc_13E74:
call ___stack_chk_fail
| long long query_int_variable(long long a1, const char *a2, _DWORD *a3)
{
unsigned int v4; // r14d
int v5; // r8d
int v6; // r9d
const char *v7; // rsi
int v8; // ecx
long long v10; // rax
long long v11; // r15
_QWORD *row; // rax
_BYTE v13[304]; // [rsp+0h] [rbp-150h] BYREF
unsigned long long v14; // [rsp+130h] [rbp-20h]
v4 = a1;
v14 = __readfsqword(0x28u);
__sprintf_chk(v13, 1LL, 300LL, "SELECT %s", a2);
if ( (unsigned int)mysql_query(a1, v13) )
{
v7 = "Query failed";
v8 = 418;
LABEL_3:
diag(
(unsigned int)"Error: %s (%s: %d)",
(_DWORD)v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
v8,
v5,
v6);
LOBYTE(v4) = 1;
return v4;
}
v10 = mysql_store_result(a1);
if ( !v10 )
{
v7 = "Invaliid result set";
v8 = 419;
goto LABEL_3;
}
v11 = v10;
row = (_QWORD *)mysql_fetch_row(v10);
if ( !row )
{
v7 = "Nothing to fetch";
v8 = 420;
goto LABEL_3;
}
LOBYTE(v4) = *row == 0LL;
if ( *row )
*a3 = atoi();
mysql_free_result(v11);
return v4;
}
| query_int_variable:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x138
MOV RBX,RDX
MOV R8,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RCX,[0x1392c7]
LEA R15,[RBP + -0x150]
MOV EDX,0x12c
MOV RDI,R15
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001132b0
MOV RDI,R14
MOV RSI,R15
CALL 0x0011ee15
TEST EAX,EAX
JZ 0x00113dfc
LEA RDI,[0x139120]
LEA RSI,[0x1392d1]
LEA RDX,[0x139148]
MOV ECX,0x1a2
LAB_00113dce:
XOR EAX,EAX
CALL 0x0011970b
MOV R14B,0x1
LAB_00113dd8:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00113e74
MOV EAX,R14D
ADD RSP,0x138
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00113dfc:
MOV RDI,R14
CALL 0x0011fd0d
TEST RAX,RAX
JZ 0x00113e36
MOV R15,RAX
MOV RDI,RAX
CALL 0x0011ff10
TEST RAX,RAX
JZ 0x00113e55
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
SETZ R14B
JZ 0x00113e2c
CALL 0x00113720
MOV dword ptr [RBX],EAX
LAB_00113e2c:
MOV RDI,R15
CALL 0x0011aac2
JMP 0x00113dd8
LAB_00113e36:
LEA RDI,[0x139120]
LEA RSI,[0x1392de]
LEA RDX,[0x139148]
MOV ECX,0x1a3
JMP 0x00113dce
LAB_00113e55:
LEA RDI,[0x139120]
LEA RSI,[0x1392f2]
LEA RDX,[0x139148]
MOV ECX,0x1a4
JMP 0x00113dce
LAB_00113e74:
CALL 0x00113510
|
ulong query_int_variable(int8 param_1,int8 param_2,int *param_3)
{
int iVar1;
long lVar2;
int8 *puVar3;
int8 uVar4;
char *pcVar5;
int7 uVar7;
ulong uVar6;
long in_FS_OFFSET;
int1 local_158 [304];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
__sprintf_chk(local_158,1,300,"SELECT %s",param_2);
iVar1 = mysql_query(param_1,local_158);
uVar7 = (int7)((ulong)param_1 >> 8);
if (iVar1 == 0) {
lVar2 = mysql_store_result(param_1);
if (lVar2 == 0) {
pcVar5 = "Invaliid result set";
uVar4 = 0x1a3;
}
else {
puVar3 = (int8 *)mysql_fetch_row(lVar2);
if (puVar3 != (int8 *)0x0) {
pcVar5 = (char *)*puVar3;
uVar6 = CONCAT71(uVar7,pcVar5 == (char *)0x0);
if (pcVar5 != (char *)0x0) {
iVar1 = atoi(pcVar5);
*param_3 = iVar1;
}
mysql_free_result(lVar2);
goto LAB_00113dd8;
}
pcVar5 = "Nothing to fetch";
uVar4 = 0x1a4;
}
}
else {
pcVar5 = "Query failed";
uVar4 = 0x1a2;
}
diag("Error: %s (%s: %d)",pcVar5,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",uVar4);
uVar6 = CONCAT71(uVar7,1);
LAB_00113dd8:
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return uVar6 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,060 | LefDefParser::defiPin::addAPinDiffArea(int, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinCap.cpp | void defiPin::addAPinDiffArea(int value, const char* layer) {
if (numAPinDiffArea_ == APinDiffAreaAllocated_) {
int i;
int max;
int lim = numAPinDiffArea_;
int* nd;
char** nl;
if (APinDiffAreaAllocated_ == 0)
max = APinDiffAreaAllocated_ = 2;
else
max = APinDiffAreaAllocated_ *= 2;
nd = (int*)malloc(sizeof(int)*max);
nl = (char**)malloc(sizeof(char*)*max);
for (i = 0; i < lim; i++) {
nd[i] = APinDiffArea_[i];
nl[i] = APinDiffAreaLayer_[i];
}
free((char*)(APinDiffArea_));
free((char*)(APinDiffAreaLayer_));
APinDiffArea_ = nd;
APinDiffAreaLayer_ = nl;
}
APinDiffArea_[numAPinDiffArea_] = value;
if (layer) {
APinDiffAreaLayer_[numAPinDiffArea_] =
(char*)malloc(strlen(layer)+1);
strcpy(APinDiffAreaLayer_[numAPinDiffArea_],
defData->DEFCASE(layer));
} else
APinDiffAreaLayer_[numAPinDiffArea_] = NULL;
numAPinDiffArea_ += 1;
} | O0 | cpp | LefDefParser::defiPin::addAPinDiffArea(int, char const*):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movl 0x140(%rcx), %eax
cmpl 0x144(%rcx), %eax
jne 0x2c4a9
movq 0x8(%rsp), %rax
movl 0x140(%rax), %ecx
movl %ecx, 0x24(%rsp)
cmpl $0x0, 0x144(%rax)
jne 0x2c3cf
movq 0x8(%rsp), %rax
movl $0x2, 0x144(%rax)
movl $0x2, 0x28(%rsp)
jmp 0x2c3e6
movq 0x8(%rsp), %rcx
movl 0x144(%rcx), %eax
shll %eax
movl %eax, 0x144(%rcx)
movl %eax, 0x28(%rsp)
movslq 0x28(%rsp), %rdi
shlq $0x2, %rdi
callq 0x72d0
movq %rax, 0x18(%rsp)
movslq 0x28(%rsp), %rdi
shlq $0x3, %rdi
callq 0x72d0
movq %rax, 0x10(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x2c46a
movq 0x8(%rsp), %rax
movq 0x148(%rax), %rcx
movslq 0x2c(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
movq 0x18(%rsp), %rcx
movslq 0x2c(%rsp), %rdx
movl %esi, (%rcx,%rdx,4)
movq 0x150(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x10(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2c414
movq 0x8(%rsp), %rax
movq 0x148(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x150(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x148(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x150(%rax)
movq 0x8(%rsp), %rcx
movl 0x3c(%rsp), %edx
movq 0x148(%rcx), %rax
movslq 0x140(%rcx), %rcx
movl %edx, (%rax,%rcx,4)
cmpq $0x0, 0x30(%rsp)
je 0x2c530
movq 0x30(%rsp), %rdi
callq 0x70e0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x72d0
movq %rax, %rsi
movq 0x8(%rsp), %rax
movq 0x150(%rax), %rcx
movslq 0x140(%rax), %rdx
movq %rsi, (%rcx,%rdx,8)
movq 0x150(%rax), %rcx
movslq 0x140(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, (%rsp)
movq 0x1a0(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x250b0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x7220
jmp 0x2c54b
movq 0x8(%rsp), %rcx
movq 0x150(%rcx), %rax
movslq 0x140(%rcx), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
movl 0x140(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x140(%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser7defiPin15addAPinDiffAreaEiPKc:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_C], esi
mov [rsp+48h+var_18], rdx
mov rcx, [rsp+48h+var_8]
mov [rsp+48h+var_40], rcx
mov eax, [rcx+140h]
cmp eax, [rcx+144h]
jnz loc_2C4A9
mov rax, [rsp+48h+var_40]
mov ecx, [rax+140h]
mov [rsp+48h+var_24], ecx
cmp dword ptr [rax+144h], 0
jnz short loc_2C3CF
mov rax, [rsp+48h+var_40]
mov dword ptr [rax+144h], 2
mov [rsp+48h+var_20], 2
jmp short loc_2C3E6
loc_2C3CF:
mov rcx, [rsp+48h+var_40]
mov eax, [rcx+144h]
shl eax, 1
mov [rcx+144h], eax
mov [rsp+48h+var_20], eax
loc_2C3E6:
movsxd rdi, [rsp+48h+var_20]
shl rdi, 2
call _malloc
mov [rsp+48h+var_30], rax
movsxd rdi, [rsp+48h+var_20]
shl rdi, 3
call _malloc
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_1C], 0
loc_2C414:
mov eax, [rsp+48h+var_1C]
cmp eax, [rsp+48h+var_24]
jge short loc_2C46A
mov rax, [rsp+48h+var_40]
mov rcx, [rax+148h]
movsxd rdx, [rsp+48h+var_1C]
mov esi, [rcx+rdx*4]
mov rcx, [rsp+48h+var_30]
movsxd rdx, [rsp+48h+var_1C]
mov [rcx+rdx*4], esi
mov rax, [rax+150h]
movsxd rcx, [rsp+48h+var_1C]
mov rdx, [rax+rcx*8]
mov rax, [rsp+48h+var_38]
movsxd rcx, [rsp+48h+var_1C]
mov [rax+rcx*8], rdx
mov eax, [rsp+48h+var_1C]
add eax, 1
mov [rsp+48h+var_1C], eax
jmp short loc_2C414
loc_2C46A:
mov rax, [rsp+48h+var_40]
mov rdi, [rax+148h]
call _free
mov rax, [rsp+48h+var_40]
mov rdi, [rax+150h]
call _free
mov rax, [rsp+48h+var_40]
mov rcx, [rsp+48h+var_30]
mov [rax+148h], rcx
mov rcx, [rsp+48h+var_38]
mov [rax+150h], rcx
loc_2C4A9:
mov rcx, [rsp+48h+var_40]
mov edx, [rsp+48h+var_C]
mov rax, [rcx+148h]
movsxd rcx, dword ptr [rcx+140h]
mov [rax+rcx*4], edx
cmp [rsp+48h+var_18], 0
jz short loc_2C530
mov rdi, [rsp+48h+var_18]
call _strlen
mov rdi, rax
add rdi, 1
call _malloc
mov rsi, rax
mov rax, [rsp+48h+var_40]
mov rcx, [rax+150h]
movsxd rdx, dword ptr [rax+140h]
mov [rcx+rdx*8], rsi
mov rcx, [rax+150h]
movsxd rdx, dword ptr [rax+140h]
mov rcx, [rcx+rdx*8]
mov [rsp+48h+var_48], rcx
mov rdi, [rax+1A0h]; this
mov rsi, [rsp+48h+var_18]; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, [rsp+48h+var_48]
mov rsi, rax
call _strcpy
jmp short loc_2C54B
loc_2C530:
mov rcx, [rsp+48h+var_40]
mov rax, [rcx+150h]
movsxd rcx, dword ptr [rcx+140h]
mov qword ptr [rax+rcx*8], 0
loc_2C54B:
mov rax, [rsp+48h+var_40]
mov ecx, [rax+140h]
add ecx, 1
mov [rax+140h], ecx
add rsp, 48h
retn
| LefDefParser::defiPin * LefDefParser::defiPin::addAPinDiffArea(
LefDefParser::defiPin *this,
int a2,
const char *a3)
{
int v3; // eax
long long v4; // rax
const char *v5; // rax
LefDefParser::defiPin *result; // rax
long long v7; // [rsp+0h] [rbp-48h]
long long v8; // [rsp+10h] [rbp-38h]
long long v9; // [rsp+18h] [rbp-30h]
int v10; // [rsp+24h] [rbp-24h]
int v11; // [rsp+28h] [rbp-20h]
int i; // [rsp+2Ch] [rbp-1Ch]
if ( *((_DWORD *)this + 80) == *((_DWORD *)this + 81) )
{
v10 = *((_DWORD *)this + 80);
if ( *((_DWORD *)this + 81) )
{
v3 = 2 * *((_DWORD *)this + 81);
*((_DWORD *)this + 81) = v3;
v11 = v3;
}
else
{
*((_DWORD *)this + 81) = 2;
v11 = 2;
}
v9 = malloc(4LL * v11);
v8 = malloc(8LL * v11);
for ( i = 0; i < v10; ++i )
{
*(_DWORD *)(v9 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 41) + 4LL * i);
*(_QWORD *)(v8 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 42) + 8LL * i);
}
free(*((_QWORD *)this + 41));
free(*((_QWORD *)this + 42));
*((_QWORD *)this + 41) = v9;
*((_QWORD *)this + 42) = v8;
}
*(_DWORD *)(*((_QWORD *)this + 41) + 4LL * *((int *)this + 80)) = a2;
if ( a3 )
{
v4 = strlen(a3);
*(_QWORD *)(*((_QWORD *)this + 42) + 8LL * *((int *)this + 80)) = malloc(v4 + 1);
v7 = *(_QWORD *)(*((_QWORD *)this + 42) + 8LL * *((int *)this + 80));
v5 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 52), a3);
strcpy(v7, v5);
}
else
{
*(_QWORD *)(*((_QWORD *)this + 42) + 8LL * *((int *)this + 80)) = 0LL;
}
result = this;
++*((_DWORD *)this + 80);
return result;
}
| addAPinDiffArea:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ESI
MOV qword ptr [RSP + 0x30],RDX
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x8],RCX
MOV EAX,dword ptr [RCX + 0x140]
CMP EAX,dword ptr [RCX + 0x144]
JNZ 0x0012c4a9
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RSP + 0x24],ECX
CMP dword ptr [RAX + 0x144],0x0
JNZ 0x0012c3cf
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x144],0x2
MOV dword ptr [RSP + 0x28],0x2
JMP 0x0012c3e6
LAB_0012c3cf:
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RCX + 0x144]
SHL EAX,0x1
MOV dword ptr [RCX + 0x144],EAX
MOV dword ptr [RSP + 0x28],EAX
LAB_0012c3e6:
MOVSXD RDI,dword ptr [RSP + 0x28]
SHL RDI,0x2
CALL 0x001072d0
MOV qword ptr [RSP + 0x18],RAX
MOVSXD RDI,dword ptr [RSP + 0x28]
SHL RDI,0x3
CALL 0x001072d0
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x2c],0x0
LAB_0012c414:
MOV EAX,dword ptr [RSP + 0x2c]
CMP EAX,dword ptr [RSP + 0x24]
JGE 0x0012c46a
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x148]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV ESI,dword ptr [RCX + RDX*0x4]
MOV RCX,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV RAX,qword ptr [RAX + 0x150]
MOVSXD RCX,dword ptr [RSP + 0x2c]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x2c]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x0012c414
LAB_0012c46a:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x148]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x150]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x148],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x150],RCX
LAB_0012c4a9:
MOV RCX,qword ptr [RSP + 0x8]
MOV EDX,dword ptr [RSP + 0x3c]
MOV RAX,qword ptr [RCX + 0x148]
MOVSXD RCX,dword ptr [RCX + 0x140]
MOV dword ptr [RAX + RCX*0x4],EDX
CMP qword ptr [RSP + 0x30],0x0
JZ 0x0012c530
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001070e0
MOV RDI,RAX
ADD RDI,0x1
CALL 0x001072d0
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x150]
MOVSXD RDX,dword ptr [RAX + 0x140]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV RCX,qword ptr [RAX + 0x150]
MOVSXD RDX,dword ptr [RAX + 0x140]
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV qword ptr [RSP],RCX
MOV RDI,qword ptr [RAX + 0x1a0]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x001250b0
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
CALL 0x00107220
JMP 0x0012c54b
LAB_0012c530:
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RCX + 0x150]
MOVSXD RCX,dword ptr [RCX + 0x140]
MOV qword ptr [RAX + RCX*0x8],0x0
LAB_0012c54b:
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RAX + 0x140]
ADD ECX,0x1
MOV dword ptr [RAX + 0x140],ECX
ADD RSP,0x48
RET
|
/* LefDefParser::defiPin::addAPinDiffArea(int, char const*) */
void __thiscall LefDefParser::defiPin::addAPinDiffArea(defiPin *this,int param_1,char *param_2)
{
int iVar1;
char *__dest;
void *pvVar2;
void *pvVar3;
size_t sVar4;
char *__src;
int local_20;
int local_1c;
if (*(int *)(this + 0x140) == *(int *)(this + 0x144)) {
iVar1 = *(int *)(this + 0x140);
if (*(int *)(this + 0x144) == 0) {
*(int4 *)(this + 0x144) = 2;
local_20 = 2;
}
else {
local_20 = *(int *)(this + 0x144) << 1;
*(int *)(this + 0x144) = local_20;
}
pvVar2 = malloc((long)local_20 << 2);
pvVar3 = malloc((long)local_20 << 3);
for (local_1c = 0; local_1c < iVar1; local_1c = local_1c + 1) {
*(int4 *)((long)pvVar2 + (long)local_1c * 4) =
*(int4 *)(*(long *)(this + 0x148) + (long)local_1c * 4);
*(int8 *)((long)pvVar3 + (long)local_1c * 8) =
*(int8 *)(*(long *)(this + 0x150) + (long)local_1c * 8);
}
free(*(void **)(this + 0x148));
free(*(void **)(this + 0x150));
*(void **)(this + 0x148) = pvVar2;
*(void **)(this + 0x150) = pvVar3;
}
*(int *)(*(long *)(this + 0x148) + (long)*(int *)(this + 0x140) * 4) = param_1;
if (param_2 == (char *)0x0) {
*(int8 *)(*(long *)(this + 0x150) + (long)*(int *)(this + 0x140) * 8) = 0;
}
else {
sVar4 = strlen(param_2);
pvVar2 = malloc(sVar4 + 1);
*(void **)(*(long *)(this + 0x150) + (long)*(int *)(this + 0x140) * 8) = pvVar2;
__dest = *(char **)(*(long *)(this + 0x150) + (long)*(int *)(this + 0x140) * 8);
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x1a0),param_2);
strcpy(__dest,__src);
}
*(int *)(this + 0x140) = *(int *)(this + 0x140) + 1;
return;
}
| |
33,061 | LefDefParser::defiPin::addAPinDiffArea(int, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinCap.cpp | void defiPin::addAPinDiffArea(int value, const char* layer) {
if (numAPinDiffArea_ == APinDiffAreaAllocated_) {
int i;
int max;
int lim = numAPinDiffArea_;
int* nd;
char** nl;
if (APinDiffAreaAllocated_ == 0)
max = APinDiffAreaAllocated_ = 2;
else
max = APinDiffAreaAllocated_ *= 2;
nd = (int*)malloc(sizeof(int)*max);
nl = (char**)malloc(sizeof(char*)*max);
for (i = 0; i < lim; i++) {
nd[i] = APinDiffArea_[i];
nl[i] = APinDiffAreaLayer_[i];
}
free((char*)(APinDiffArea_));
free((char*)(APinDiffAreaLayer_));
APinDiffArea_ = nd;
APinDiffAreaLayer_ = nl;
}
APinDiffArea_[numAPinDiffArea_] = value;
if (layer) {
APinDiffAreaLayer_[numAPinDiffArea_] =
(char*)malloc(strlen(layer)+1);
strcpy(APinDiffAreaLayer_[numAPinDiffArea_],
defData->DEFCASE(layer));
} else
APinDiffAreaLayer_[numAPinDiffArea_] = NULL;
numAPinDiffArea_ += 1;
} | O3 | cpp | LefDefParser::defiPin::addAPinDiffArea(int, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movl 0x140(%rdi), %r13d
cmpl 0x144(%rdi), %r13d
jne 0x1b9da
leal (,%r13,2), %eax
testl %r13d, %r13d
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x144(%rbx)
movslq %ecx, %r12
leaq (,%r12,4), %rdi
callq 0x6270
movq %rax, %r15
shlq $0x3, %r12
movq %r12, %rdi
callq 0x6270
movq %rax, %r12
movq 0x148(%rbx), %rdi
testl %r13d, %r13d
jle 0x1b9b2
movq 0x150(%rbx), %rax
xorl %ecx, %ecx
movl (%rdi,%rcx,4), %edx
movl %edx, (%r15,%rcx,4)
movq (%rax,%rcx,8), %rdx
movq %rdx, (%r12,%rcx,8)
incq %rcx
cmpq %rcx, %r13
jne 0x1b99b
callq 0x6220
movq 0x150(%rbx), %rdi
callq 0x6220
movq %r15, 0x148(%rbx)
movq %r12, 0x150(%rbx)
movl 0x140(%rbx), %r13d
jmp 0x1b9e1
movq 0x148(%rbx), %r15
movslq %r13d, %rax
movl %ebp, (%r15,%rax,4)
testq %r14, %r14
je 0x1ba3d
movq %r14, %rdi
callq 0x60d0
leaq 0x1(%rax), %rdi
callq 0x6270
movq 0x150(%rbx), %rcx
movslq 0x140(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x150(%rbx), %rax
movq 0x1a0(%rbx), %rdi
movq (%rax,%rdx,8), %r15
movq %r14, %rsi
callq 0x18aa0
movq %r15, %rdi
movq %rax, %rsi
callq 0x6190
movl 0x140(%rbx), %eax
jmp 0x1ba53
movq 0x150(%rbx), %rcx
movslq 0x140(%rbx), %rax
movq $0x0, (%rcx,%rax,8)
incl %eax
movl %eax, 0x140(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser7defiPin15addAPinDiffAreaEiPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov ebp, esi
mov rbx, rdi
mov r13d, [rdi+140h]
cmp r13d, [rdi+144h]
jnz loc_1B9DA
lea eax, ds:0[r13*2]
test r13d, r13d
mov ecx, 2
cmovnz ecx, eax
mov [rbx+144h], ecx
movsxd r12, ecx
lea rdi, ds:0[r12*4]
call _malloc
mov r15, rax
shl r12, 3
mov rdi, r12
call _malloc
mov r12, rax
mov rdi, [rbx+148h]
test r13d, r13d
jle short loc_1B9B2
mov rax, [rbx+150h]
xor ecx, ecx
loc_1B99B:
mov edx, [rdi+rcx*4]
mov [r15+rcx*4], edx
mov rdx, [rax+rcx*8]
mov [r12+rcx*8], rdx
inc rcx
cmp r13, rcx
jnz short loc_1B99B
loc_1B9B2:
call _free
mov rdi, [rbx+150h]
call _free
mov [rbx+148h], r15
mov [rbx+150h], r12
mov r13d, [rbx+140h]
jmp short loc_1B9E1
loc_1B9DA:
mov r15, [rbx+148h]
loc_1B9E1:
movsxd rax, r13d
mov [r15+rax*4], ebp
test r14, r14
jz short loc_1BA3D
mov rdi, r14
call _strlen
lea rdi, [rax+1]
call _malloc
mov rcx, [rbx+150h]
movsxd rdx, dword ptr [rbx+140h]
mov [rcx+rdx*8], rax
mov rax, [rbx+150h]
mov rdi, [rbx+1A0h]; this
mov r15, [rax+rdx*8]
mov rsi, r14; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
call _strcpy
mov eax, [rbx+140h]
jmp short loc_1BA53
loc_1BA3D:
mov rcx, [rbx+150h]
movsxd rax, dword ptr [rbx+140h]
mov qword ptr [rcx+rax*8], 0
loc_1BA53:
inc eax
mov [rbx+140h], eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defiPin::addAPinDiffArea(LefDefParser::defiPin *this, int a2, const char *a3)
{
long long v5; // r13
int v6; // ecx
long long v7; // r12
long long v8; // r15
long long v9; // r12
long long v10; // rdi
long long v11; // rax
long long i; // rcx
long long v13; // rax
long long v14; // rax
long long v15; // rdx
long long v16; // r15
const char *v17; // rax
long long v18; // rax
long long result; // rax
v5 = *((unsigned int *)this + 80);
if ( (_DWORD)v5 == *((_DWORD *)this + 81) )
{
v6 = 2;
if ( (_DWORD)v5 )
v6 = 2 * v5;
*((_DWORD *)this + 81) = v6;
v7 = v6;
v8 = malloc(4LL * v6);
v9 = malloc(8 * v7);
v10 = *((_QWORD *)this + 41);
if ( (int)v5 > 0 )
{
v11 = *((_QWORD *)this + 42);
for ( i = 0LL; i != v5; ++i )
{
*(_DWORD *)(v8 + 4 * i) = *(_DWORD *)(v10 + 4 * i);
*(_QWORD *)(v9 + 8 * i) = *(_QWORD *)(v11 + 8 * i);
}
}
free(v10);
free(*((_QWORD *)this + 42));
*((_QWORD *)this + 41) = v8;
*((_QWORD *)this + 42) = v9;
LODWORD(v5) = *((_DWORD *)this + 80);
}
else
{
v8 = *((_QWORD *)this + 41);
}
*(_DWORD *)(v8 + 4LL * (int)v5) = a2;
if ( a3 )
{
v13 = strlen(a3);
v14 = malloc(v13 + 1);
v15 = *((int *)this + 80);
*(_QWORD *)(*((_QWORD *)this + 42) + 8 * v15) = v14;
v16 = *(_QWORD *)(*((_QWORD *)this + 42) + 8 * v15);
v17 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 52), a3);
strcpy(v16, v17);
LODWORD(v18) = *((_DWORD *)this + 80);
}
else
{
v18 = *((int *)this + 80);
*(_QWORD *)(*((_QWORD *)this + 42) + 8 * v18) = 0LL;
}
result = (unsigned int)(v18 + 1);
*((_DWORD *)this + 80) = result;
return result;
}
| addAPinDiffArea:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
MOV R13D,dword ptr [RDI + 0x140]
CMP R13D,dword ptr [RDI + 0x144]
JNZ 0x0011b9da
LEA EAX,[R13*0x2]
TEST R13D,R13D
MOV ECX,0x2
CMOVNZ ECX,EAX
MOV dword ptr [RBX + 0x144],ECX
MOVSXD R12,ECX
LEA RDI,[R12*0x4]
CALL 0x00106270
MOV R15,RAX
SHL R12,0x3
MOV RDI,R12
CALL 0x00106270
MOV R12,RAX
MOV RDI,qword ptr [RBX + 0x148]
TEST R13D,R13D
JLE 0x0011b9b2
MOV RAX,qword ptr [RBX + 0x150]
XOR ECX,ECX
LAB_0011b99b:
MOV EDX,dword ptr [RDI + RCX*0x4]
MOV dword ptr [R15 + RCX*0x4],EDX
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [R12 + RCX*0x8],RDX
INC RCX
CMP R13,RCX
JNZ 0x0011b99b
LAB_0011b9b2:
CALL 0x00106220
MOV RDI,qword ptr [RBX + 0x150]
CALL 0x00106220
MOV qword ptr [RBX + 0x148],R15
MOV qword ptr [RBX + 0x150],R12
MOV R13D,dword ptr [RBX + 0x140]
JMP 0x0011b9e1
LAB_0011b9da:
MOV R15,qword ptr [RBX + 0x148]
LAB_0011b9e1:
MOVSXD RAX,R13D
MOV dword ptr [R15 + RAX*0x4],EBP
TEST R14,R14
JZ 0x0011ba3d
MOV RDI,R14
CALL 0x001060d0
LEA RDI,[RAX + 0x1]
CALL 0x00106270
MOV RCX,qword ptr [RBX + 0x150]
MOVSXD RDX,dword ptr [RBX + 0x140]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [RBX + 0x150]
MOV RDI,qword ptr [RBX + 0x1a0]
MOV R15,qword ptr [RAX + RDX*0x8]
MOV RSI,R14
CALL 0x00118aa0
MOV RDI,R15
MOV RSI,RAX
CALL 0x00106190
MOV EAX,dword ptr [RBX + 0x140]
JMP 0x0011ba53
LAB_0011ba3d:
MOV RCX,qword ptr [RBX + 0x150]
MOVSXD RAX,dword ptr [RBX + 0x140]
MOV qword ptr [RCX + RAX*0x8],0x0
LAB_0011ba53:
INC EAX
MOV dword ptr [RBX + 0x140],EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiPin::addAPinDiffArea(int, char const*) */
void __thiscall LefDefParser::defiPin::addAPinDiffArea(defiPin *this,int param_1,char *param_2)
{
void *__ptr;
long lVar1;
char *__dest;
int iVar2;
void *pvVar3;
void *pvVar4;
size_t sVar5;
char *__src;
ulong uVar6;
uint uVar7;
uVar7 = *(uint *)(this + 0x140);
if (uVar7 == *(uint *)(this + 0x144)) {
iVar2 = 2;
if (uVar7 != 0) {
iVar2 = uVar7 * 2;
}
*(int *)(this + 0x144) = iVar2;
pvVar3 = malloc((long)iVar2 * 4);
pvVar4 = malloc((long)iVar2 << 3);
__ptr = *(void **)(this + 0x148);
if (0 < (int)uVar7) {
lVar1 = *(long *)(this + 0x150);
uVar6 = 0;
do {
*(int4 *)((long)pvVar3 + uVar6 * 4) = *(int4 *)((long)__ptr + uVar6 * 4);
*(int8 *)((long)pvVar4 + uVar6 * 8) = *(int8 *)(lVar1 + uVar6 * 8);
uVar6 = uVar6 + 1;
} while (uVar7 != uVar6);
}
free(__ptr);
free(*(void **)(this + 0x150));
*(void **)(this + 0x148) = pvVar3;
*(void **)(this + 0x150) = pvVar4;
uVar7 = *(uint *)(this + 0x140);
}
else {
pvVar3 = *(void **)(this + 0x148);
}
*(int *)((long)pvVar3 + (long)(int)uVar7 * 4) = param_1;
if (param_2 == (char *)0x0) {
iVar2 = *(int *)(this + 0x140);
*(int8 *)(*(long *)(this + 0x150) + (long)iVar2 * 8) = 0;
}
else {
sVar5 = strlen(param_2);
pvVar3 = malloc(sVar5 + 1);
iVar2 = *(int *)(this + 0x140);
*(void **)(*(long *)(this + 0x150) + (long)iVar2 * 8) = pvVar3;
__dest = *(char **)(*(long *)(this + 0x150) + (long)iVar2 * 8);
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x1a0),param_2);
strcpy(__dest,__src);
iVar2 = *(int *)(this + 0x140);
}
*(int *)(this + 0x140) = iVar2 + 1;
return;
}
| |
33,062 | sp_get_linestring_mbr | eloqsql/storage/maria/ma_sp_key.c | static int sp_get_linestring_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order, double *mbr)
{
uint n_points;
n_points = uint4korr(*wkb);
(*wkb) += 4;
for (; n_points > 0; --n_points)
{
/* Add next point to mbr */
if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
return 0;
} | O3 | c | sp_get_linestring_mbr:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movl (%rax), %ecx
addq $0x4, %rax
movq %rax, (%rdi)
testl %ecx, %ecx
je 0x70dc6
addq $-0x8, %rsi
movb $0x1, %r8b
xorl %r9d, %r9d
movq (%rdi), %rax
cmpq %rsi, %rax
ja 0x70dbf
movsd (%rax), %xmm0
addq $0x8, %rax
movq %rax, (%rdi)
movsd (%rdx,%r9), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x70d92
movsd %xmm0, (%rdx,%r9)
ucomisd 0x8(%rdx,%r9), %xmm0
jbe 0x70da5
orq $0x8, %r9
movsd %xmm0, (%rdx,%r9)
movl $0x10, %r9d
xorl %eax, %eax
testb $0x1, %r8b
movl $0x0, %r8d
jne 0x70d6d
decl %ecx
jne 0x70d67
jmp 0x70dc8
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x70dc8
xorl %eax, %eax
popq %rbp
retq
| sp_get_linestring_mbr:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov ecx, [rax]
add rax, 4
mov [rdi], rax
test ecx, ecx
jz short loc_70DC6
add rsi, 0FFFFFFFFFFFFFFF8h
loc_70D67:
mov r8b, 1
xor r9d, r9d
loc_70D6D:
mov rax, [rdi]
cmp rax, rsi
ja short loc_70DBF
movsd xmm0, qword ptr [rax]
add rax, 8
mov [rdi], rax
movsd xmm1, qword ptr [rdx+r9]
ucomisd xmm1, xmm0
jbe short loc_70D92
movsd qword ptr [rdx+r9], xmm0
loc_70D92:
ucomisd xmm0, qword ptr [rdx+r9+8]
jbe short loc_70DA5
or r9, 8
movsd qword ptr [rdx+r9], xmm0
loc_70DA5:
mov r9d, 10h
xor eax, eax
test r8b, 1
mov r8d, 0
jnz short loc_70D6D
dec ecx
jnz short loc_70D67
jmp short loc_70DC8
loc_70DBF:
mov eax, 0FFFFFFFFh
jmp short loc_70DC8
loc_70DC6:
xor eax, eax
loc_70DC8:
pop rbp
retn
| long long sp_get_linestring_mbr(double **a1, long long a2, long long a3)
{
int v3; // ecx
unsigned long long v4; // rsi
char v5; // r8
long long v6; // r9
double *v7; // rax
double v8; // xmm0_8
long long result; // rax
bool v10; // zf
v3 = *(_DWORD *)*a1;
*a1 = (double *)((char *)*a1 + 4);
if ( !v3 )
return 0LL;
v4 = a2 - 8;
while ( 2 )
{
v5 = 1;
v6 = 0LL;
do
{
v7 = *a1;
if ( (unsigned long long)*a1 > v4 )
return 0xFFFFFFFFLL;
v8 = *v7;
*a1 = v7 + 1;
if ( *(double *)(a3 + v6) > v8 )
*(double *)(a3 + v6) = v8;
if ( v8 > *(double *)(a3 + v6 + 8) )
*(double *)(a3 + (v6 | 8)) = v8;
v6 = 16LL;
result = 0LL;
v10 = (v5 & 1) == 0;
v5 = 0;
}
while ( !v10 );
if ( --v3 )
continue;
break;
}
return result;
}
| sp_get_linestring_mbr:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RAX]
ADD RAX,0x4
MOV qword ptr [RDI],RAX
TEST ECX,ECX
JZ 0x00170dc6
ADD RSI,-0x8
LAB_00170d67:
MOV R8B,0x1
XOR R9D,R9D
LAB_00170d6d:
MOV RAX,qword ptr [RDI]
CMP RAX,RSI
JA 0x00170dbf
MOVSD XMM0,qword ptr [RAX]
ADD RAX,0x8
MOV qword ptr [RDI],RAX
MOVSD XMM1,qword ptr [RDX + R9*0x1]
UCOMISD XMM1,XMM0
JBE 0x00170d92
MOVSD qword ptr [RDX + R9*0x1],XMM0
LAB_00170d92:
UCOMISD XMM0,qword ptr [RDX + R9*0x1 + 0x8]
JBE 0x00170da5
OR R9,0x8
MOVSD qword ptr [RDX + R9*0x1],XMM0
LAB_00170da5:
MOV R9D,0x10
XOR EAX,EAX
TEST R8B,0x1
MOV R8D,0x0
JNZ 0x00170d6d
DEC ECX
JNZ 0x00170d67
JMP 0x00170dc8
LAB_00170dbf:
MOV EAX,0xffffffff
JMP 0x00170dc8
LAB_00170dc6:
XOR EAX,EAX
LAB_00170dc8:
POP RBP
RET
|
int8 sp_get_linestring_mbr(int8 *param_1,long param_2,long param_3)
{
double dVar1;
double *pdVar2;
bool bVar3;
int iVar4;
bool bVar5;
ulong uVar6;
iVar4 = *(int *)*param_1;
*param_1 = (int *)*param_1 + 1;
if (iVar4 != 0) {
do {
uVar6 = 0;
bVar3 = true;
do {
bVar5 = bVar3;
pdVar2 = (double *)*param_1;
if ((double *)(param_2 + -8) < pdVar2) {
return 0xffffffff;
}
dVar1 = *pdVar2;
*param_1 = pdVar2 + 1;
if (dVar1 < *(double *)(param_3 + uVar6)) {
*(double *)(param_3 + uVar6) = dVar1;
}
pdVar2 = (double *)(param_3 + 8 + uVar6);
if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) {
*(double *)(param_3 + (uVar6 | 8)) = dVar1;
}
uVar6 = 0x10;
bVar3 = false;
} while (bVar5);
iVar4 = iVar4 + -1;
} while (iVar4 != 0);
}
return 0;
}
| |
33,063 | plutovg_path_clone_dashed | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c | plutovg_path_t* plutovg_path_clone_dashed(const plutovg_path_t* path, float offset, const float* dashes, int ndashes)
{
plutovg_path_t* clone = plutovg_path_create();
plutovg_path_reserve(clone, path->elements.size + path->num_curves * 32);
plutovg_path_traverse_dashed(path, offset, dashes, ndashes, clone_traverse_func, clone);
return clone;
} | O1 | c | plutovg_path_clone_dashed:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movss %xmm0, 0x4(%rsp)
movq %rdi, %r15
movl $0x28, %edi
callq 0xa400
movq %rax, %r12
movl $0x1, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
movups %xmm0, 0x14(%rax)
movl $0x0, 0x24(%rax)
movl 0xc(%r15), %esi
shll $0x5, %esi
addl 0x20(%r15), %esi
movq %rax, %rdi
callq 0x2ab43
leaq -0x125(%rip), %rcx # 0x2be03
movq %r15, %rdi
movss 0x4(%rsp), %xmm0
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %r8
callq 0x2b9d5
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| plutovg_path_clone_dashed:
push r15
push r14
push r12
push rbx
push rax
mov ebx, edx
mov r14, rsi
movss [rsp+28h+var_24], xmm0
mov r15, rdi
mov edi, 28h ; '('
call _malloc
mov r12, rax
mov dword ptr [rax], 1
xorps xmm0, xmm0
movups xmmword ptr [rax+4], xmm0
movups xmmword ptr [rax+14h], xmm0
mov dword ptr [rax+24h], 0
mov esi, [r15+0Ch]
shl esi, 5
add esi, [r15+20h]
mov rdi, rax
call plutovg_path_reserve
lea rcx, clone_traverse_func
mov rdi, r15
movss xmm0, [rsp+28h+var_24]
mov rsi, r14
mov edx, ebx
mov r8, r12
call plutovg_path_traverse_dashed
mov rax, r12
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long plutovg_path_clone_dashed(long long a1, long long a2, int a3, float a4)
{
long long v5; // r12
long long v6; // rdx
long long v7; // r9
v5 = malloc(40LL);
*(_DWORD *)v5 = 1;
*(_OWORD *)(v5 + 4) = 0LL;
*(_OWORD *)(v5 + 20) = 0LL;
*(_DWORD *)(v5 + 36) = 0;
plutovg_path_reserve(v5, *(_DWORD *)(a1 + 32) + 32 * *(_DWORD *)(a1 + 12), v6);
plutovg_path_traverse_dashed(a1, a2, a3, (long long)clone_traverse_func, v5, v7, (__m128)LODWORD(a4));
return v5;
}
| plutovg_path_clone_dashed:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R14,RSI
MOVSS dword ptr [RSP + 0x4],XMM0
MOV R15,RDI
MOV EDI,0x28
CALL 0x0010a400
MOV R12,RAX
MOV dword ptr [RAX],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x4],XMM0
MOVUPS xmmword ptr [RAX + 0x14],XMM0
MOV dword ptr [RAX + 0x24],0x0
MOV ESI,dword ptr [R15 + 0xc]
SHL ESI,0x5
ADD ESI,dword ptr [R15 + 0x20]
MOV RDI,RAX
CALL 0x0012ab43
LEA RCX,[0x12be03]
MOV RDI,R15
MOVSS XMM0,dword ptr [RSP + 0x4]
MOV RSI,R14
MOV EDX,EBX
MOV R8,R12
CALL 0x0012b9d5
MOV RAX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int4 *
plutovg_path_clone_dashed(int4 param_1,long param_2,int8 param_3,int4 param_4)
{
int4 *puVar1;
puVar1 = (int4 *)malloc(0x28);
*puVar1 = 1;
*(int8 *)(puVar1 + 1) = 0;
*(int8 *)(puVar1 + 3) = 0;
*(int8 *)(puVar1 + 5) = 0;
*(int8 *)(puVar1 + 7) = 0;
puVar1[9] = 0;
plutovg_path_reserve(puVar1,*(int *)(param_2 + 0xc) * 0x20 + *(int *)(param_2 + 0x20));
plutovg_path_traverse_dashed(param_1,param_2,param_3,param_4,clone_traverse_func,puVar1);
return puVar1;
}
| |
33,064 | MemoryManager::copyFrom(void const*, unsigned int, unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | bool MemoryManager::copyFrom(const void *src, uint32_t dest, uint32_t len) {
for (uint32_t i = 0; i < len; ++i) {
if (!this->isAddrExist(dest + i)) {
dbgprintf("Data copy to invalid addr 0x%x!\n", dest + i);
return false;
}
this->setByte(dest + i, ((uint8_t *)src)[i]);
}
return true;
} | O0 | cpp | MemoryManager::copyFrom(void const*, unsigned int, unsigned int):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x18(%rsp), %eax
jae 0x1e815
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
addl 0x14(%rsp), %esi
callq 0x1e830
testb $0x1, %al
jne 0x1e7e5
movl 0x1c(%rsp), %esi
addl 0x14(%rsp), %esi
leaq 0xad0c(%rip), %rdi # 0x294e3
movb $0x0, %al
callq 0x167d0
movb $0x0, 0x37(%rsp)
jmp 0x1e81a
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
addl 0x14(%rsp), %esi
movq 0x20(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
movzbl (%rax,%rdx), %edx
callq 0x1e850
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1e7a8
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN13MemoryManager8copyFromEPKvjj:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], edx
mov [rsp+38h+var_20], ecx
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_24], 0
loc_1E7A8:
mov eax, [rsp+38h+var_24]
cmp eax, [rsp+38h+var_20]
jnb short loc_1E815
mov rdi, [rsp+38h+var_30]; this
mov esi, [rsp+38h+var_1C]
add esi, [rsp+38h+var_24]; unsigned int
call _ZN13MemoryManager11isAddrExistEj; MemoryManager::isAddrExist(uint)
test al, 1
jnz short loc_1E7E5
mov esi, [rsp+38h+var_1C]
add esi, [rsp+38h+var_24]
lea rdi, aDataCopyToInva; "Data copy to invalid addr 0x%x!\n"
mov al, 0
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
mov [rsp+38h+var_1], 0
jmp short loc_1E81A
loc_1E7E5:
mov rdi, [rsp+38h+var_30]; this
mov esi, [rsp+38h+var_1C]
add esi, [rsp+38h+var_24]; unsigned int
mov rax, [rsp+38h+var_18]
mov ecx, [rsp+38h+var_24]
mov edx, ecx
xor ecx, ecx; unsigned int *
movzx edx, byte ptr [rax+rdx]; unsigned __int8
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
mov eax, [rsp+38h+var_24]
add eax, 1
mov [rsp+38h+var_24], eax
jmp short loc_1E7A8
loc_1E815:
mov [rsp+38h+var_1], 1
loc_1E81A:
mov al, [rsp+38h+var_1]
and al, 1
add rsp, 38h
retn
| char MemoryManager::copyFrom(
MemoryManager *this,
_BYTE *a2,
int a3,
unsigned int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
char v19; // [rsp+0h] [rbp-38h]
unsigned int i; // [rsp+14h] [rbp-24h]
for ( i = 0; i < a4; ++i )
{
if ( (MemoryManager::isAddrExist(this, i + a3) & 1) == 0 )
{
dbgprintf(
"Data copy to invalid addr 0x%x!\n",
i + a3,
v12,
v13,
v14,
v15,
a5,
a6,
a7,
a8,
v16,
v17,
a11,
a12,
v19);
return 0;
}
MemoryManager::setByte(this, i + a3, a2[i], 0LL);
}
return 1;
}
| copyFrom:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV dword ptr [RSP + 0x1c],EDX
MOV dword ptr [RSP + 0x18],ECX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x14],0x0
LAB_0011e7a8:
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RSP + 0x18]
JNC 0x0011e815
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x1c]
ADD ESI,dword ptr [RSP + 0x14]
CALL 0x0011e830
TEST AL,0x1
JNZ 0x0011e7e5
MOV ESI,dword ptr [RSP + 0x1c]
ADD ESI,dword ptr [RSP + 0x14]
LEA RDI,[0x1294e3]
MOV AL,0x0
CALL 0x001167d0
MOV byte ptr [RSP + 0x37],0x0
JMP 0x0011e81a
LAB_0011e7e5:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x1c]
ADD ESI,dword ptr [RSP + 0x14]
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x14]
MOV EDX,ECX
XOR ECX,ECX
MOVZX EDX,byte ptr [RAX + RDX*0x1]
CALL 0x0011e850
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x0011e7a8
LAB_0011e815:
MOV byte ptr [RSP + 0x37],0x1
LAB_0011e81a:
MOV AL,byte ptr [RSP + 0x37]
AND AL,0x1
ADD RSP,0x38
RET
|
/* MemoryManager::copyFrom(void const*, unsigned int, unsigned int) */
int1 __thiscall
MemoryManager::copyFrom(MemoryManager *this,void *param_1,uint param_2,uint param_3)
{
ulong uVar1;
uint local_24;
local_24 = 0;
while( true ) {
if (param_3 <= local_24) {
return 1;
}
uVar1 = isAddrExist(this,param_2 + local_24);
if ((uVar1 & 1) == 0) break;
setByte(this,param_2 + local_24,*(uchar *)((long)param_1 + (ulong)local_24),(uint *)0x0);
local_24 = local_24 + 1;
}
dbgprintf("Data copy to invalid addr 0x%x!\n",(ulong)(param_2 + local_24));
return 0;
}
| |
33,065 | MemoryManager::copyFrom(void const*, unsigned int, unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | bool MemoryManager::copyFrom(const void *src, uint32_t dest, uint32_t len) {
for (uint32_t i = 0; i < len; ++i) {
if (!this->isAddrExist(dest + i)) {
dbgprintf("Data copy to invalid addr 0x%x!\n", dest + i);
return false;
}
this->setByte(dest + i, ((uint8_t *)src)[i]);
}
return true;
} | O1 | cpp | MemoryManager::copyFrom(void const*, unsigned int, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %ecx, %ecx
sete %bpl
je 0xebbe
cmpl $-0x1, %edx
je 0xeb9e
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r12d
movl %ecx, %eax
movabsq $-0xffffffff, %rbp # imm = 0xFFFFFFFF00000001
addq %r12, %rbp
movq %rax, (%rsp)
leaq -0x1(%rax), %r15
xorl %r13d, %r13d
movzbl (%rbx,%r13), %edx
leal (%r12,%r13), %esi
movq %r14, %rdi
xorl %ecx, %ecx
callq 0xebd8
cmpq %r13, %r15
je 0xebb3
incq %r13
movq %rbp, %rax
addq %r13, %rax
jne 0xeb73
cmpq (%rsp), %r13
setae %bpl
leaq 0x6911(%rip), %rdi # 0x154b6
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0xb3b0
jmp 0xebbe
incq %r13
cmpq (%rsp), %r13
setae %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN13MemoryManager8copyFromEPKvjj:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test ecx, ecx
setz bpl
jz short loc_EBBE
cmp edx, 0FFFFFFFFh
jz short loc_EB9E
mov rbx, rsi
mov r14, rdi
mov r12d, edx
mov eax, ecx
mov rbp, 0FFFFFFFF00000001h
add rbp, r12
mov [rsp+38h+var_38], rax
lea r15, [rax-1]
xor r13d, r13d
loc_EB73:
movzx edx, byte ptr [rbx+r13]; unsigned __int8
lea esi, [r12+r13]; unsigned int
mov rdi, r14; this
xor ecx, ecx; unsigned int *
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
cmp r15, r13
jz short loc_EBB3
inc r13
mov rax, rbp
add rax, r13
jnz short loc_EB73
cmp r13, [rsp+38h+var_38]
setnb bpl
loc_EB9E:
lea rdi, aDataCopyToInva; "Data copy to invalid addr 0x%x!\n"
mov esi, 0FFFFFFFFh
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
jmp short loc_EBBE
loc_EBB3:
inc r13
cmp r13, [rsp+38h+var_38]
setnb bpl
loc_EBBE:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long MemoryManager::copyFrom(
MemoryManager *this,
_BYTE *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; // rbp
int v16; // r12d
long long v17; // r15
unsigned long long v18; // r13
unsigned long long v20; // [rsp+0h] [rbp-38h]
LOBYTE(v20) = v14;
LOBYTE(v15) = (_DWORD)a4 == 0;
if ( (_DWORD)a4 )
{
if ( (_DWORD)a3 == -1 )
{
LABEL_7:
dbgprintf(
"Data copy to invalid addr 0x%x!\n",
0xFFFFFFFFLL,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
}
else
{
v16 = a3;
v15 = (unsigned int)a3 - 0xFFFFFFFFLL;
v20 = (unsigned int)a4;
v17 = (unsigned int)a4 - 1LL;
v18 = 0LL;
while ( 1 )
{
MemoryManager::setByte(this, v16 + v18, a2[v18], 0LL);
if ( v17 == v18 )
break;
if ( !(++v18 + v15) )
{
LOBYTE(v15) = v18 >= v20;
goto LABEL_7;
}
}
LOBYTE(v15) = v18 + 1 >= v20;
}
}
return (unsigned int)v15;
}
| copyFrom:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST ECX,ECX
SETZ BPL
JZ 0x0010ebbe
CMP EDX,-0x1
JZ 0x0010eb9e
MOV RBX,RSI
MOV R14,RDI
MOV R12D,EDX
MOV EAX,ECX
MOV RBP,-0xffffffff
ADD RBP,R12
MOV qword ptr [RSP],RAX
LEA R15,[RAX + -0x1]
XOR R13D,R13D
LAB_0010eb73:
MOVZX EDX,byte ptr [RBX + R13*0x1]
LEA ESI,[R12 + R13*0x1]
MOV RDI,R14
XOR ECX,ECX
CALL 0x0010ebd8
CMP R15,R13
JZ 0x0010ebb3
INC R13
MOV RAX,RBP
ADD RAX,R13
JNZ 0x0010eb73
CMP R13,qword ptr [RSP]
SETNC BPL
LAB_0010eb9e:
LEA RDI,[0x1154b6]
MOV ESI,0xffffffff
XOR EAX,EAX
CALL 0x0010b3b0
JMP 0x0010ebbe
LAB_0010ebb3:
INC R13
CMP R13,qword ptr [RSP]
SETNC BPL
LAB_0010ebbe:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MemoryManager::copyFrom(void const*, unsigned int, unsigned int) */
ulong __thiscall
MemoryManager::copyFrom(MemoryManager *this,void *param_1,uint param_2,uint param_3)
{
int8 unaff_RBP;
ulong uVar1;
int7 uVar2;
ulong uVar3;
uVar1 = CONCAT71((int7)((ulong)unaff_RBP >> 8),param_3 == 0);
if (param_3 != 0) {
if (param_2 != 0xffffffff) {
uVar1 = (ulong)param_3;
uVar3 = 0;
do {
setByte((uint)this,(char)param_2 + (char)uVar3,
(uint *)(ulong)*(byte *)((long)param_1 + uVar3));
uVar2 = (int7)((ulong)param_2 - 0xffffffff >> 8);
if (uVar1 - 1 == uVar3) {
uVar1 = CONCAT71(uVar2,uVar1 <= uVar3 + 1);
goto LAB_0010ebbe;
}
uVar3 = uVar3 + 1;
} while (((ulong)param_2 - 0xffffffff) + uVar3 != 0);
uVar1 = CONCAT71(uVar2,uVar1 <= uVar3);
}
dbgprintf("Data copy to invalid addr 0x%x!\n",0xffffffff);
}
LAB_0010ebbe:
return uVar1 & 0xffffffff;
}
| |
33,066 | fmt::v10::formatter<std::chrono::duration<long, std::ratio<1l, 1000000l>>, char, void>::parse(fmt::v10::basic_format_parse_context<char>&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/chrono.h | auto fmt_duration_cast(std::chrono::duration<FromRep, FromPeriod> from) -> To {
// Mixed integer <-> float cast is not supported by safe_duration_cast.
return std::chrono::duration_cast<To>(from);
} | O3 | c | fmt::v10::formatter<std::chrono::duration<long, std::ratio<1l, 1000000l>>, char, void>::parse(fmt::v10::basic_format_parse_context<char>&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r14
movq 0x8(%rsi), %r15
testq %r15, %r15
je 0xf07c6
cmpb $0x7d, (%r14)
je 0xf07c6
movq %rsi, %r12
movq %rdi, %rbx
addq %r14, %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xf096e
movq %rax, %r14
cmpq %r15, %rax
je 0xf07c6
leaq 0x10(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r12, %r8
callq 0x94aaa
movq %rax, %r14
cmpq %r15, %rax
je 0xf07c6
movb $0x0, 0x7(%rsp)
cmpb $0x2e, (%r14)
jne 0xf0793
movb $0x1, 0x7(%rsp)
leaq 0x4(%rbx), %rdx
leaq 0x28(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %r8
callq 0x94b74
movq %rax, %r14
cmpq %r15, %r14
je 0xf07a5
cmpb $0x4c, (%r14)
jne 0xf07a5
movb $0x1, 0x40(%rbx)
incq %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xf0a1c
movq %rax, %rcx
subq %r14, %rcx
movq %r14, 0x48(%rbx)
movq %rcx, 0x50(%rbx)
movq %rax, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZN3fmt3v109formatterINSt6chrono8durationIlSt5ratioILl1ELl1000000EEEEcvE5parseERNS0_26basic_format_parse_contextIcEE:
push r15
push r14
push r12
push rbx
push rax
mov r14, [rsi]
mov r15, [rsi+8]
test r15, r15
jz loc_F07C6
cmp byte ptr [r14], 7Dh ; '}'
jz loc_F07C6
mov r12, rsi
mov rbx, rdi
add r15, r14
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call _ZN3fmt3v106detail11parse_alignIcEEPKT_S5_S5_RNS0_12format_specsIS3_EE; fmt::v10::detail::parse_align<char>(char const*,char const*,fmt::v10::format_specs<char> &)
mov r14, rax
cmp rax, r15
jz short loc_F07C6
lea rcx, [rbx+10h]
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov r8, r12
call _ZN3fmt3v106detail18parse_dynamic_specIcEEPKT_S5_S5_RiRNS1_7arg_refIS3_EERNS0_26basic_format_parse_contextIS3_EE; fmt::v10::detail::parse_dynamic_spec<char>(char const*,char const*,int &,fmt::v10::detail::arg_ref<char> &,fmt::v10::basic_format_parse_context<char> &)
mov r14, rax
cmp rax, r15
jz short loc_F07C6
mov [rsp+28h+var_21], 0
cmp byte ptr [r14], 2Eh ; '.'
jnz short loc_F0793
mov [rsp+28h+var_21], 1
lea rdx, [rbx+4]
lea rcx, [rbx+28h]
mov rdi, r14
mov rsi, r15
mov r8, r12
call _ZN3fmt3v106detail15parse_precisionIcEEPKT_S5_S5_RiRNS1_7arg_refIS3_EERNS0_26basic_format_parse_contextIS3_EE; fmt::v10::detail::parse_precision<char>(char const*,char const*,int &,fmt::v10::detail::arg_ref<char> &,fmt::v10::basic_format_parse_context<char> &)
mov r14, rax
loc_F0793:
cmp r14, r15
jz short loc_F07A5
cmp byte ptr [r14], 4Ch ; 'L'
jnz short loc_F07A5
mov byte ptr [rbx+40h], 1
inc r14
loc_F07A5:
lea rdx, [rsp+28h+var_21]
mov rdi, r14
mov rsi, r15
call _ZN3fmt3v106detail19parse_chrono_formatIcRNS1_21chrono_format_checkerEEEPKT_S7_S7_OT0_; fmt::v10::detail::parse_chrono_format<char,fmt::v10::detail::chrono_format_checker &>(char const*,char const*,fmt::v10::detail::chrono_format_checker &)
mov rcx, rax
sub rcx, r14
mov [rbx+48h], r14
mov [rbx+50h], rcx
mov r14, rax
loc_F07C6:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| char * fmt::v10::formatter<std::chrono::duration<long,std::ratio<1l,1000000l>>,char,void>::parse(
long long a1,
char **a2)
{
long long v2; // rax
char *v3; // r14
char *v4; // r15
char *v5; // r15
char *v6; // rax
long long v7; // r9
char *v8; // rax
long long v9; // r9
long long v10; // rax
char v12[33]; // [rsp+1h] [rbp-21h] BYREF
v12[0] = HIBYTE(v2);
v3 = *a2;
v4 = a2[1];
if ( v4 )
{
if ( *v3 != 125 )
{
v5 = &v4[(_QWORD)v3];
v6 = (char *)fmt::v10::detail::parse_align<char>(*a2, v5, a1);
v3 = v6;
if ( v6 != v5 )
{
v8 = fmt::v10::detail::parse_dynamic_spec<char>(v6, v5, (_DWORD *)a1, (_DWORD *)(a1 + 16), (long long)a2, v7);
v3 = v8;
if ( v8 != v5 )
{
v12[0] = 0;
if ( *v8 == 46 )
{
v12[0] = 1;
v3 = fmt::v10::detail::parse_precision<char>(
(long long)v8,
v5,
(_DWORD *)(a1 + 4),
(_DWORD *)(a1 + 40),
(long long)a2,
v9);
}
if ( v3 != v5 && *v3 == 76 )
{
*(_BYTE *)(a1 + 64) = 1;
++v3;
}
v10 = fmt::v10::detail::parse_chrono_format<char,fmt::v10::detail::chrono_format_checker &>(v3, v5, v12);
*(_QWORD *)(a1 + 72) = v3;
*(_QWORD *)(a1 + 80) = v10 - (_QWORD)v3;
return (char *)v10;
}
}
}
}
return v3;
}
| parse:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
TEST R15,R15
JZ 0x001f07c6
CMP byte ptr [R14],0x7d
JZ 0x001f07c6
MOV R12,RSI
MOV RBX,RDI
ADD R15,R14
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x001f096e
MOV R14,RAX
CMP RAX,R15
JZ 0x001f07c6
LEA RCX,[RBX + 0x10]
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV R8,R12
CALL 0x00194aaa
MOV R14,RAX
CMP RAX,R15
JZ 0x001f07c6
MOV byte ptr [RSP + 0x7],0x0
CMP byte ptr [R14],0x2e
JNZ 0x001f0793
MOV byte ptr [RSP + 0x7],0x1
LEA RDX,[RBX + 0x4]
LEA RCX,[RBX + 0x28]
MOV RDI,R14
MOV RSI,R15
MOV R8,R12
CALL 0x00194b74
MOV R14,RAX
LAB_001f0793:
CMP R14,R15
JZ 0x001f07a5
CMP byte ptr [R14],0x4c
JNZ 0x001f07a5
MOV byte ptr [RBX + 0x40],0x1
INC R14
LAB_001f07a5:
LEA RDX,[RSP + 0x7]
MOV RDI,R14
MOV RSI,R15
CALL 0x001f0a1c
MOV RCX,RAX
SUB RCX,R14
MOV qword ptr [RBX + 0x48],R14
MOV qword ptr [RBX + 0x50],RCX
MOV R14,RAX
LAB_001f07c6:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* fmt::v10::formatter<std::chrono::duration<long, std::ratio<1l, 1000000l> >, char,
void>::parse(fmt::v10::basic_format_parse_context<char>&) */
char * __thiscall
fmt::v10::formatter<std::chrono::duration<long,std::ratio<1l,1000000l>>,char,void>::parse
(formatter<std::chrono::duration<long,std::ratio<1l,1000000l>>,char,void> *this,
basic_format_parse_context *param_1)
{
ulong uVar1;
ulong in_RAX;
char *pcVar2;
char *pcVar3;
char *pcVar4;
int8 uStack_28;
pcVar2 = *(char **)param_1;
if ((*(long *)(param_1 + 8) != 0) && (*pcVar2 != '}')) {
pcVar4 = pcVar2 + *(long *)(param_1 + 8);
uStack_28 = in_RAX;
pcVar2 = detail::parse_align<char>(pcVar2,pcVar4,(format_specs *)this);
if (pcVar2 != pcVar4) {
pcVar2 = detail::parse_dynamic_spec<char>(pcVar2,pcVar4,(int *)this,this + 0x10,param_1);
uVar1 = uStack_28;
if (pcVar2 != pcVar4) {
uStack_28 = uStack_28 & 0xffffffffffffff;
pcVar3 = pcVar2;
if (*pcVar2 == '.') {
uStack_28 = CONCAT17(1,(int7)uVar1);
pcVar3 = detail::parse_precision<char>
(pcVar2,pcVar4,(int *)(this + 4),this + 0x28,param_1);
}
if ((pcVar3 != pcVar4) && (*pcVar3 == 'L')) {
this[0x40] = (formatter<std::chrono::duration<long,std::ratio<1l,1000000l>>,char,void>)0x1
;
pcVar3 = pcVar3 + 1;
}
pcVar2 = detail::parse_chrono_format<char,fmt::v10::detail::chrono_format_checker&>
(pcVar3,pcVar4,(chrono_format_checker *)((long)&uStack_28 + 7));
*(char **)(this + 0x48) = pcVar3;
*(long *)(this + 0x50) = (long)pcVar2 - (long)pcVar3;
}
}
}
return pcVar2;
}
| |
33,067 | my_b_append | eloqsql/mysys/mf_iocache.c | int my_b_append(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
size_t rest_length,length;
MEM_CHECK_DEFINED(Buffer, Count);
/*
Assert that we cannot come here with a shared cache. If we do one
day, we might need to add a call to copy_to_read_buffer().
*/
DBUG_ASSERT(!info->share);
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
lock_append_buffer(info);
rest_length= (size_t) (info->write_end - info->write_pos);
if (Count <= rest_length)
goto end;
memcpy(info->write_pos, Buffer, rest_length);
Buffer+=rest_length;
Count-=rest_length;
info->write_pos+=rest_length;
if (my_b_flush_io_cache(info,0))
{
unlock_append_buffer(info);
return 1;
}
if (Count >= IO_SIZE)
{ /* Fill first intern buffer */
length= IO_ROUND_DN(Count);
if (mysql_file_write(info->file,Buffer, length, info->myflags | MY_NABP))
{
unlock_append_buffer(info);
return info->error= -1;
}
Count-=length;
Buffer+=length;
info->end_of_file+=length;
}
end:
memcpy(info->write_pos,Buffer,(size_t) Count);
info->write_pos+=Count;
unlock_append_buffer(info);
return 0;
} | O0 | c | my_b_append:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0xb0c36
jmp 0xb0c38
jmp 0xb0c3a
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
leaq 0x6fd67(%rip), %rsi # 0x1209b0
movl $0x62b, %edx # imm = 0x62B
callq 0xb0980
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0xb0c79
jmp 0xb0d8b
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x270d0
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xafda0
cmpl $0x0, %eax
je 0xb0ce2
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xb0ab0
movl $0x1, -0x4(%rbp)
jmp 0xb0dc4
cmpq $0x1000, -0x20(%rbp) # imm = 0x1000
jb 0xb0d89
movabsq $0xfffff000, %rax # imm = 0xFFFFF000
andq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
orq $0x4, %r9
leaq 0x6fc86(%rip), %rdi # 0x1209b0
movl $0x63b, %esi # imm = 0x63B
callq 0xb0dd0
cmpq $0x0, %rax
je 0xb0d5e
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xb0ab0
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb0dc4
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb0d8b
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x270d0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xb0ab0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_b_append:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_B0C36:
jmp short $+2
loc_B0C38:
jmp short $+2
loc_B0C3A:
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
lea rsi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 62Bh
call inline_mysql_mutex_lock_16
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+40h]
sub rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
ja short loc_B0C79
jmp loc_B0D8B
loc_B0C79:
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call _memcpy
mov rax, [rbp+var_28]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
add rcx, [rax+40h]
mov [rax+40h], rcx
mov rdi, [rbp+var_10]
xor esi, esi
call my_b_flush_io_cache
cmp eax, 0
jz short loc_B0CE2
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_17
mov [rbp+var_4], 1
jmp loc_B0DC4
loc_B0CE2:
cmp [rbp+var_20], 1000h
jb loc_B0D89
mov rax, 0FFFFF000h
and rax, [rbp+var_20]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_30]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
or r9, 4
lea rdi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 63Bh
call inline_mysql_file_write_1
cmp rax, 0
jz short loc_B0D5E
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_17
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_B0DC4
loc_B0D5E:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
add rcx, [rax+8]
mov [rax+8], rcx
loc_B0D89:
jmp short $+2
loc_B0D8B:
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax+40h]
mov [rax+40h], rcx
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_17
mov [rbp+var_4], 0
loc_B0DC4:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_b_append(long long a1, long long a2, unsigned long long a3)
{
long long v4; // [rsp+0h] [rbp-30h]
unsigned long long v5; // [rsp+8h] [rbp-28h]
long long v7; // [rsp+18h] [rbp-18h]
v7 = a2;
inline_mysql_mutex_lock_16(a1 + 80, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x62Bu);
v5 = *(_QWORD *)(a1 + 72) - *(_QWORD *)(a1 + 64);
if ( a3 <= v5 )
goto LABEL_8;
memcpy(*(_QWORD *)(a1 + 64), a2, v5);
v7 = a2 + v5;
a3 -= v5;
*(_QWORD *)(a1 + 64) += v5;
if ( !(unsigned int)my_b_flush_io_cache(a1, 0) )
{
if ( a3 >= 0x1000 )
{
v4 = (unsigned int)a3 & 0xFFFFF000;
if ( inline_mysql_file_write_1(
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1595LL,
*(unsigned int *)(a1 + 212),
v7,
v4,
*(_QWORD *)(a1 + 248) | 4LL) )
{
inline_mysql_mutex_unlock_17(a1 + 80);
*(_DWORD *)(a1 + 228) = -1;
return (unsigned int)-1;
}
a3 -= v4;
v7 += v4;
*(_QWORD *)(a1 + 8) += v4;
}
LABEL_8:
memcpy(*(_QWORD *)(a1 + 64), v7, a3);
*(_QWORD *)(a1 + 64) += a3;
inline_mysql_mutex_unlock_17(a1 + 80);
return 0;
}
inline_mysql_mutex_unlock_17(a1 + 80);
return 1;
}
| my_b_append:
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
JMP 0x001b0c36
LAB_001b0c36:
JMP 0x001b0c38
LAB_001b0c38:
JMP 0x001b0c3a
LAB_001b0c3a:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
LEA RSI,[0x2209b0]
MOV EDX,0x62b
CALL 0x001b0980
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x001b0c79
JMP 0x001b0d8b
LAB_001b0c79:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001270d0
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RAX + 0x40],RCX
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x001afda0
CMP EAX,0x0
JZ 0x001b0ce2
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
CALL 0x001b0ab0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b0dc4
LAB_001b0ce2:
CMP qword ptr [RBP + -0x20],0x1000
JC 0x001b0d89
MOV RAX,0xfffff000
AND RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9,qword ptr [RAX + 0xf8]
OR R9,0x4
LEA RDI,[0x2209b0]
MOV ESI,0x63b
CALL 0x001b0dd0
CMP RAX,0x0
JZ 0x001b0d5e
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
CALL 0x001b0ab0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001b0dc4
LAB_001b0d5e:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_001b0d89:
JMP 0x001b0d8b
LAB_001b0d8b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001270d0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RAX + 0x40],RCX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
CALL 0x001b0ab0
MOV dword ptr [RBP + -0x4],0x0
LAB_001b0dc4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_b_append(long param_1,void *param_2,ulong param_3)
{
int iVar1;
ulong uVar2;
long lVar3;
size_t local_28;
void *local_20;
inline_mysql_mutex_lock
(param_1 + 0x50,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x62b);
uVar2 = *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x40);
local_28 = param_3;
local_20 = param_2;
if (uVar2 < param_3) {
memcpy(*(void **)(param_1 + 0x40),param_2,uVar2);
local_20 = (void *)(uVar2 + (long)param_2);
local_28 = param_3 - uVar2;
*(ulong *)(param_1 + 0x40) = uVar2 + *(long *)(param_1 + 0x40);
iVar1 = my_b_flush_io_cache(param_1,0);
if (iVar1 != 0) {
inline_mysql_mutex_unlock(param_1 + 0x50);
return 1;
}
if (0xfff < local_28) {
uVar2 = local_28 & 0xfffff000;
lVar3 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x63b,
*(int4 *)(param_1 + 0xd4),local_20,uVar2,
*(ulong *)(param_1 + 0xf8) | 4);
if (lVar3 != 0) {
inline_mysql_mutex_unlock(param_1 + 0x50);
*(int4 *)(param_1 + 0xe4) = 0xffffffff;
return 0xffffffff;
}
local_28 = local_28 - uVar2;
local_20 = (void *)(uVar2 + (long)local_20);
*(ulong *)(param_1 + 8) = uVar2 + *(long *)(param_1 + 8);
}
}
memcpy(*(void **)(param_1 + 0x40),local_20,local_28);
*(size_t *)(param_1 + 0x40) = local_28 + *(long *)(param_1 + 0x40);
inline_mysql_mutex_unlock(param_1 + 0x50);
return 0;
}
| |
33,068 | LefDefParser::defiPin::addPort() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinCap.cpp | void defiPin::addPort() {
defiPinPort** pp;
defiPinPort* pv;
int i;
if (numPorts_ >= portsAllocated_) {
if (portsAllocated_ == 0) {
pinPort_ = (defiPinPort**) malloc(sizeof(defiPinPort*)*4);
portsAllocated_ = 4;
} else {
portsAllocated_ = portsAllocated_ * 2;
pp = (defiPinPort**) malloc(sizeof(defiPinPort*) *
portsAllocated_);
for (i = 0; i < numPorts_; i++)
pp[i] = pinPort_[i];
free((char*)(pinPort_));
pinPort_ = pp;
}
}
pv = new defiPinPort(defData);
pv->Init();
pinPort_[numPorts_] = pv;
numPorts_ += 1;
} | O3 | cpp | LefDefParser::defiPin::addPort():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0xf0(%rdi), %r15d
movslq 0xf4(%rdi), %rdi
cmpl %edi, %r15d
jl 0x1f095
testl %edi, %edi
je 0x1f07a
leal (%rdi,%rdi), %eax
movl %eax, 0xf4(%rbx)
shlq $0x4, %rdi
callq 0x7270
movq %rax, %r14
movq 0xf8(%rbx), %rdi
testl %r15d, %r15d
jle 0x1f06c
xorl %eax, %eax
movq (%rdi,%rax,8), %rcx
movq %rcx, (%r14,%rax,8)
incq %rax
cmpq %rax, %r15
jne 0x1f05c
callq 0x7220
movq %r14, 0xf8(%rbx)
jmp 0x1f095
movl $0x20, %edi
callq 0x7270
movq %rax, 0xf8(%rbx)
movl $0x4, 0xf4(%rbx)
movl $0xb8, %edi
callq 0x71b0
movq %rax, %r14
movq 0x1a0(%rbx), %rsi
movq %rax, %rdi
callq 0x1c5c6
movl $0xa1, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x7110
movq $0x0, 0xa4(%r14)
movb $0x0, 0xac(%r14)
movq 0xf8(%rbx), %rax
movslq 0xf0(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0xf0(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0xb8, %esi
movq %r14, %rdi
callq 0x71c0
movq %rbx, %rdi
callq 0x7300
| _ZN12LefDefParser7defiPin7addPortEv:
push r15
push r14
push rbx
mov rbx, rdi
mov r15d, [rdi+0F0h]
movsxd rdi, dword ptr [rdi+0F4h]
cmp r15d, edi
jl short loc_1F095
test edi, edi
jz short loc_1F07A
lea eax, [rdi+rdi]
mov [rbx+0F4h], eax
shl rdi, 4
call _malloc
mov r14, rax
mov rdi, [rbx+0F8h]
test r15d, r15d
jle short loc_1F06C
xor eax, eax
loc_1F05C:
mov rcx, [rdi+rax*8]
mov [r14+rax*8], rcx
inc rax
cmp r15, rax
jnz short loc_1F05C
loc_1F06C:
call _free
mov [rbx+0F8h], r14
jmp short loc_1F095
loc_1F07A:
mov edi, 20h ; ' '
call _malloc
mov [rbx+0F8h], rax
mov dword ptr [rbx+0F4h], 4
loc_1F095:
mov edi, 0B8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rsi, [rbx+1A0h]; LefDefParser::defrData *
mov rdi, rax; this
call _ZN12LefDefParser11defiPinPortC2EPNS_8defrDataE; LefDefParser::defiPinPort::defiPinPort(LefDefParser::defrData *)
mov edx, 0A1h
mov rdi, r14
xor esi, esi
call _memset
mov qword ptr [r14+0A4h], 0
mov byte ptr [r14+0ACh], 0
mov rax, [rbx+0F8h]
movsxd rcx, dword ptr [rbx+0F0h]
mov [rax+rcx*8], r14
lea eax, [rcx+1]
mov [rbx+0F0h], eax
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov esi, 0B8h; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, rbx
call __Unwind_Resume
| long long LefDefParser::defiPin::addPort(LefDefParser::defiPin *this)
{
long long v2; // r15
long long v3; // rdi
long long v4; // r14
_QWORD *v5; // rdi
long long i; // rax
long long v7; // r14
long long v8; // rcx
long long result; // rax
v2 = *((unsigned int *)this + 60);
v3 = *((int *)this + 61);
if ( (int)v2 >= (int)v3 )
{
if ( (_DWORD)v3 )
{
*((_DWORD *)this + 61) = 2 * v3;
v4 = malloc(16 * v3);
v5 = (_QWORD *)*((_QWORD *)this + 31);
if ( (int)v2 > 0 )
{
for ( i = 0LL; i != v2; ++i )
*(_QWORD *)(v4 + 8 * i) = v5[i];
}
free(v5);
*((_QWORD *)this + 31) = v4;
}
else
{
*((_QWORD *)this + 31) = malloc(0x20uLL);
*((_DWORD *)this + 61) = 4;
}
}
v7 = operator new(0xB8uLL);
LefDefParser::defiPinPort::defiPinPort((LefDefParser::defiPinPort *)v7, *((LefDefParser::defrData **)this + 52));
memset(v7, 0LL, 161LL);
*(_QWORD *)(v7 + 164) = 0LL;
*(_BYTE *)(v7 + 172) = 0;
v8 = *((int *)this + 60);
*(_QWORD *)(*((_QWORD *)this + 31) + 8 * v8) = v7;
result = (unsigned int)(v8 + 1);
*((_DWORD *)this + 60) = result;
return result;
}
| addPort:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV R15D,dword ptr [RDI + 0xf0]
MOVSXD RDI,dword ptr [RDI + 0xf4]
CMP R15D,EDI
JL 0x0011f095
TEST EDI,EDI
JZ 0x0011f07a
LEA EAX,[RDI + RDI*0x1]
MOV dword ptr [RBX + 0xf4],EAX
SHL RDI,0x4
CALL 0x00107270
MOV R14,RAX
MOV RDI,qword ptr [RBX + 0xf8]
TEST R15D,R15D
JLE 0x0011f06c
XOR EAX,EAX
LAB_0011f05c:
MOV RCX,qword ptr [RDI + RAX*0x8]
MOV qword ptr [R14 + RAX*0x8],RCX
INC RAX
CMP R15,RAX
JNZ 0x0011f05c
LAB_0011f06c:
CALL 0x00107220
MOV qword ptr [RBX + 0xf8],R14
JMP 0x0011f095
LAB_0011f07a:
MOV EDI,0x20
CALL 0x00107270
MOV qword ptr [RBX + 0xf8],RAX
MOV dword ptr [RBX + 0xf4],0x4
LAB_0011f095:
MOV EDI,0xb8
CALL 0x001071b0
MOV R14,RAX
MOV RSI,qword ptr [RBX + 0x1a0]
LAB_0011f0a9:
MOV RDI,RAX
CALL 0x0011c5c6
LAB_0011f0b1:
MOV EDX,0xa1
MOV RDI,R14
XOR ESI,ESI
CALL 0x00107110
MOV qword ptr [R14 + 0xa4],0x0
MOV byte ptr [R14 + 0xac],0x0
MOV RAX,qword ptr [RBX + 0xf8]
MOVSXD RCX,dword ptr [RBX + 0xf0]
MOV qword ptr [RAX + RCX*0x8],R14
LEA EAX,[RCX + 0x1]
MOV dword ptr [RBX + 0xf0],EAX
POP RBX
POP R14
POP R15
RET
|
/* LefDefParser::defiPin::addPort() */
void __thiscall LefDefParser::defiPin::addPort(defiPin *this)
{
uint uVar1;
int iVar2;
void *pvVar3;
ulong uVar4;
void *pvVar5;
defiPinPort *this_00;
uVar1 = *(uint *)(this + 0xf0);
iVar2 = *(int *)(this + 0xf4);
if (iVar2 <= (int)uVar1) {
if (iVar2 == 0) {
pvVar5 = malloc(0x20);
*(void **)(this + 0xf8) = pvVar5;
*(int4 *)(this + 0xf4) = 4;
}
else {
*(int *)(this + 0xf4) = iVar2 * 2;
pvVar3 = malloc((long)iVar2 << 4);
pvVar5 = *(void **)(this + 0xf8);
if (0 < (int)uVar1) {
uVar4 = 0;
do {
*(int8 *)((long)pvVar3 + uVar4 * 8) = *(int8 *)((long)pvVar5 + uVar4 * 8);
uVar4 = uVar4 + 1;
} while (uVar1 != uVar4);
}
free(pvVar5);
*(void **)(this + 0xf8) = pvVar3;
}
}
this_00 = (defiPinPort *)operator_new(0xb8);
/* try { // try from 0011f0a9 to 0011f0b0 has its CatchHandler @ 0011f0f4 */
defiPinPort::defiPinPort(this_00,*(defrData **)(this + 0x1a0));
memset(this_00,0,0xa1);
*(int8 *)(this_00 + 0xa4) = 0;
this_00[0xac] = (defiPinPort)0x0;
iVar2 = *(int *)(this + 0xf0);
*(defiPinPort **)(*(long *)(this + 0xf8) + (long)iVar2 * 8) = this_00;
*(int *)(this + 0xf0) = iVar2 + 1;
return;
}
| |
33,069 | my_like_range_win1250ch | eloqsql/strings/ctype-win1250ch.c | static my_bool
my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length)
{
int only_min_found= 1;
const char *end = ptr + ptr_length;
char *min_org = min_str;
char *min_end = min_str + res_length;
/* return 1; */
for (; ptr != end && min_str != min_end ; ptr++)
{
if (*ptr == escape && ptr+1 != end)
ptr++; /* Skip escape */
else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */
break;
*min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)];
if (*min_str != min_sort_char)
only_min_found= 0;
min_str++;
*max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)];
}
if (cs->state & MY_CS_BINSORT)
*min_length= (size_t) (min_str - min_org);
else
{
/* 'a\0\0... is the smallest possible string */
*min_length= res_length;
}
/* a\ff\ff... is the biggest possible string */
*max_length= res_length;
while (min_str != min_end)
{
*min_str++ = min_sort_char;
*max_str++ = max_sort_char;
}
return (only_min_found);
} | O3 | c | my_like_range_win1250ch:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r9d, -0x2c(%rbp)
movl %r8d, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movq 0x20(%rbp), %r10
movq 0x18(%rbp), %r13
movq 0x10(%rbp), %r8
leaq (%r8,%r13), %r11
testq %rdx, %rdx
sete %al
testq %r8, %r8
sete %dil
orb %al, %dil
movb $0x1, %al
jne 0xd0b6a
addq %rsi, %rdx
leaq -0x1(%r8), %rbx
movb $0x1, %al
leaq 0x28ad7d(%rip), %r12 # 0x35b870
leaq 0x28ae76(%rip), %rdi # 0x35b970
movb (%rsi), %r14b
cmpb %cl, %r14b
setne %r9b
leaq 0x1(%rsi), %r15
cmpq %rdx, %r15
sete %r8b
orb %r9b, %r8b
cmpb $0x1, %r8b
jne 0xd0b27
cmpb -0x30(%rbp), %r14b
je 0xd0b6a
movq %rsi, %r15
cmpb -0x2c(%rbp), %r14b
je 0xd0b6a
movzbl (%r15), %esi
cmpq $0x20, %rsi
movb (%rsi,%r12), %sil
movb %sil, (%r13)
movzbl %al, %eax
movl $0x0, %esi
cmovnel %esi, %eax
incq %r13
movzbl (%r15), %esi
movb (%rsi,%rdi), %sil
movb %sil, (%r10)
incq %r10
movq %r15, %rsi
incq %rsi
cmpq %rdx, %rsi
je 0xd0b6a
leaq -0x1(%rbx), %r8
testq %rbx, %rbx
movq %r8, %rbx
jne 0xd0afa
movq %r13, %rcx
subq 0x18(%rbp), %rcx
movq -0x38(%rbp), %rdx
testb $0x10, 0xc(%rdx)
movq 0x10(%rbp), %rsi
cmoveq %rsi, %rcx
movq 0x28(%rbp), %rdx
movq %rcx, (%rdx)
movq 0x30(%rbp), %rcx
movq %rsi, (%rcx)
cmpq %r11, %r13
je 0xd0ba5
movb $0x20, (%r13)
incq %r13
movb $-0x1, (%r10)
incq %r10
jmp 0xd0b8f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_like_range_win1250ch:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov [rbp+var_2C], r9d
mov [rbp+var_30], r8d
mov [rbp+var_38], rdi
mov r10, [rbp+arg_10]
mov r13, [rbp+arg_8]
mov r8, [rbp+arg_0]
lea r11, [r8+r13]
test rdx, rdx
setz al
test r8, r8
setz dil
or dil, al
mov al, 1
jnz loc_D0B6A
add rdx, rsi
lea rbx, [r8-1]
mov al, 1
lea r12, like_range_prefix_min_win1250ch
lea rdi, like_range_prefix_max_win1250ch
loc_D0AFA:
mov r14b, [rsi]
cmp r14b, cl
setnz r9b
lea r15, [rsi+1]
cmp r15, rdx
setz r8b
or r8b, r9b
cmp r8b, 1
jnz short loc_D0B27
cmp r14b, byte ptr [rbp+var_30]
jz short loc_D0B6A
mov r15, rsi
cmp r14b, byte ptr [rbp+var_2C]
jz short loc_D0B6A
loc_D0B27:
movzx esi, byte ptr [r15]
cmp rsi, 20h ; ' '
mov sil, [rsi+r12]
mov [r13+0], sil
movzx eax, al
mov esi, 0
cmovnz eax, esi
inc r13
movzx esi, byte ptr [r15]
mov sil, [rsi+rdi]
mov [r10], sil
inc r10
mov rsi, r15
inc rsi
cmp rsi, rdx
jz short loc_D0B6A
lea r8, [rbx-1]
test rbx, rbx
mov rbx, r8
jnz short loc_D0AFA
loc_D0B6A:
mov rcx, r13
sub rcx, [rbp+arg_8]
mov rdx, [rbp+var_38]
test byte ptr [rdx+0Ch], 10h
mov rsi, [rbp+arg_0]
cmovz rcx, rsi
mov rdx, [rbp+arg_18]
mov [rdx], rcx
mov rcx, [rbp+arg_20]
mov [rcx], rsi
loc_D0B8F:
cmp r13, r11
jz short loc_D0BA5
mov byte ptr [r13+0], 20h ; ' '
inc r13
mov byte ptr [r10], 0FFh
inc r10
jmp short loc_D0B8F
loc_D0BA5:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char my_like_range_win1250ch(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 a4,
char a5,
char a6,
long long a7,
long long a8,
_BYTE *a9,
long long *a10,
_QWORD *a11)
{
_BYTE *v12; // r13
char result; // al
unsigned __int8 *v14; // rdx
long long v15; // rbx
unsigned __int8 v16; // r14
unsigned __int8 *v17; // r15
long long v18; // rsi
long long v20; // rcx
v12 = (_BYTE *)a8;
result = 1;
if ( a3 != 0 && a7 != 0 )
{
v14 = &a2[a3];
v15 = a7 - 1;
result = 1;
do
{
v16 = *a2;
v17 = a2 + 1;
if ( *a2 != a4 || a2 + 1 == v14 )
{
if ( v16 == a5 )
break;
v17 = a2;
if ( v16 == a6 )
break;
}
v18 = *v17;
*v12 = like_range_prefix_min_win1250ch[v18];
if ( v18 != 32 )
result = 0;
++v12;
*a9++ = like_range_prefix_max_win1250ch[*v17];
a2 = v17 + 1;
if ( v17 + 1 == v14 )
break;
}
while ( v15-- != 0 );
}
v20 = (long long)&v12[-a8];
if ( (*(_BYTE *)(a1 + 12) & 0x10) == 0 )
v20 = a7;
*a10 = v20;
*a11 = a7;
while ( v12 != (_BYTE *)(a7 + a8) )
{
*v12++ = 32;
*a9++ = -1;
}
return result;
}
| my_like_range_win1250ch:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [RBP + -0x2c],R9D
MOV dword ptr [RBP + -0x30],R8D
MOV qword ptr [RBP + -0x38],RDI
MOV R10,qword ptr [RBP + 0x20]
MOV R13,qword ptr [RBP + 0x18]
MOV R8,qword ptr [RBP + 0x10]
LEA R11,[R8 + R13*0x1]
TEST RDX,RDX
SETZ AL
TEST R8,R8
SETZ DIL
OR DIL,AL
MOV AL,0x1
JNZ 0x001d0b6a
ADD RDX,RSI
LEA RBX,[R8 + -0x1]
MOV AL,0x1
LEA R12,[0x45b870]
LEA RDI,[0x45b970]
LAB_001d0afa:
MOV R14B,byte ptr [RSI]
CMP R14B,CL
SETNZ R9B
LEA R15,[RSI + 0x1]
CMP R15,RDX
SETZ R8B
OR R8B,R9B
CMP R8B,0x1
JNZ 0x001d0b27
CMP R14B,byte ptr [RBP + -0x30]
JZ 0x001d0b6a
MOV R15,RSI
CMP R14B,byte ptr [RBP + -0x2c]
JZ 0x001d0b6a
LAB_001d0b27:
MOVZX ESI,byte ptr [R15]
CMP RSI,0x20
MOV SIL,byte ptr [RSI + R12*0x1]
MOV byte ptr [R13],SIL
MOVZX EAX,AL
MOV ESI,0x0
CMOVNZ EAX,ESI
INC R13
MOVZX ESI,byte ptr [R15]
MOV SIL,byte ptr [RSI + RDI*0x1]
MOV byte ptr [R10],SIL
INC R10
MOV RSI,R15
INC RSI
CMP RSI,RDX
JZ 0x001d0b6a
LEA R8,[RBX + -0x1]
TEST RBX,RBX
MOV RBX,R8
JNZ 0x001d0afa
LAB_001d0b6a:
MOV RCX,R13
SUB RCX,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x38]
TEST byte ptr [RDX + 0xc],0x10
MOV RSI,qword ptr [RBP + 0x10]
CMOVZ RCX,RSI
MOV RDX,qword ptr [RBP + 0x28]
MOV qword ptr [RDX],RCX
MOV RCX,qword ptr [RBP + 0x30]
MOV qword ptr [RCX],RSI
LAB_001d0b8f:
CMP R13,R11
JZ 0x001d0ba5
MOV byte ptr [R13],0x20
INC R13
MOV byte ptr [R10],0xff
INC R10
JMP 0x001d0b8f
LAB_001d0ba5:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
my_like_range_win1250ch
(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6,
long param_7,int1 *param_8,int1 *param_9,long *param_10,long *param_11)
{
byte bVar1;
int8 uVar2;
byte *pbVar3;
long lVar4;
int1 *puVar5;
byte *pbVar6;
uVar2 = 1;
puVar5 = param_8;
if (param_7 != 0 && param_3 != 0) {
pbVar3 = param_2 + param_3;
uVar2 = 1;
lVar4 = param_7;
while( true ) {
lVar4 = lVar4 + -1;
bVar1 = *param_2;
pbVar6 = param_2 + 1;
if ((param_2 + 1 == pbVar3 || bVar1 != param_4) &&
((bVar1 == param_5 || (pbVar6 = param_2, bVar1 == param_6)))) break;
bVar1 = *pbVar6;
*puVar5 = like_range_prefix_min_win1250ch[bVar1];
if ((ulong)bVar1 != 0x20) {
uVar2 = 0;
}
puVar5 = puVar5 + 1;
*param_9 = like_range_prefix_max_win1250ch[*pbVar6];
param_9 = param_9 + 1;
param_2 = pbVar6 + 1;
if ((param_2 == pbVar3) || (lVar4 == 0)) break;
}
}
lVar4 = (long)puVar5 - (long)param_8;
if ((*(byte *)(param_1 + 0xc) & 0x10) == 0) {
lVar4 = param_7;
}
*param_10 = lVar4;
*param_11 = param_7;
for (; puVar5 != param_8 + param_7; puVar5 = puVar5 + 1) {
*puVar5 = 0x20;
*param_9 = 0xff;
param_9 = param_9 + 1;
}
return uVar2;
}
| |
33,070 | mi_get_last_key | eloqsql/storage/myisam/mi_search.c | uchar *_mi_get_last_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
uchar *lastkey, uchar *endpos, uint *return_key_length)
{
uint nod_flag;
uchar *lastpos;
DBUG_ENTER("_mi_get_last_key");
DBUG_PRINT("enter",("page:%p endpos: %p", page,
endpos));
nod_flag=mi_test_if_nod(page);
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)))
{
lastpos=endpos-keyinfo->keylength-nod_flag;
*return_key_length=keyinfo->keylength;
if (lastpos > page)
bmove((uchar*) lastkey,(uchar*) lastpos,keyinfo->keylength+nod_flag);
}
else
{
lastpos=(page+=2+nod_flag);
lastkey[0]=0;
while (page < endpos)
{
lastpos=page;
*return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,lastkey);
if (*return_key_length == 0)
{
DBUG_PRINT("error",("Couldn't find last key: page: %p",
page));
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(0);
}
}
}
DBUG_PRINT("exit",("lastpos: %p length: %u", lastpos,
*return_key_length));
DBUG_RETURN(lastpos);
} | O3 | c | mi_get_last_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r12
movq %r8, %rbx
movq %rcx, -0x30(%rbp)
movq %rsi, %r15
xorl %r14d, %r14d
cmpb $0x0, (%rdx)
jns 0x888b6
movq (%rdi), %rax
movl 0x17c(%rax), %r14d
testb $0x28, 0xa(%r15)
je 0x88900
leal 0x2(%r14), %eax
addq %rax, %rdx
movq %rdx, -0x38(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
cmpq %rbx, %rdx
jae 0x88933
movq %rdi, -0x40(%rbp)
movq %rdx, %r13
movq %r15, %rdi
movl %r14d, %esi
leaq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq *0x48(%r15)
movl %eax, (%r12)
testl %eax, %eax
je 0x88938
movq -0x38(%rbp), %rdx
cmpq %rbx, %rdx
jb 0x888d8
jmp 0x8895e
movzwl 0x12(%r15), %eax
subq %rax, %rbx
movl %r14d, %ecx
movq %rbx, %r13
subq %rcx, %r13
movl %eax, (%r12)
cmpq %rdx, %r13
jbe 0x8895e
movzwl 0x12(%r15), %eax
addl %eax, %r14d
movq -0x30(%rbp), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x2a130
jmp 0x8895e
movq %rdx, %r13
jmp 0x8895e
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7dc92
callq 0xa813e
movl $0x7e, (%rax)
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_get_last_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, r9
mov rbx, r8
mov [rbp+var_30], rcx
mov r15, rsi
xor r14d, r14d
cmp byte ptr [rdx], 0
jns short loc_888B6
mov rax, [rdi]
mov r14d, [rax+17Ch]
loc_888B6:
test byte ptr [r15+0Ah], 28h
jz short loc_88900
lea eax, [r14+2]
add rdx, rax
mov [rbp+var_38], rdx
mov rax, [rbp+var_30]
mov byte ptr [rax], 0
cmp rdx, rbx
jnb short loc_88933
mov [rbp+var_40], rdi
loc_888D8:
mov r13, rdx
mov rdi, r15
mov esi, r14d
lea rdx, [rbp+var_38]
mov rcx, [rbp+var_30]
call qword ptr [r15+48h]
mov [r12], eax
test eax, eax
jz short loc_88938
mov rdx, [rbp+var_38]
cmp rdx, rbx
jb short loc_888D8
jmp short loc_8895E
loc_88900:
movzx eax, word ptr [r15+12h]
sub rbx, rax
mov ecx, r14d
mov r13, rbx
sub r13, rcx
mov [r12], eax
cmp r13, rdx
jbe short loc_8895E
movzx eax, word ptr [r15+12h]
add r14d, eax
mov rdi, [rbp+var_30]
mov rsi, r13
mov rdx, r14
call _memmove
jmp short loc_8895E
loc_88933:
mov r13, rdx
jmp short loc_8895E
loc_88938:
mov rax, [rbp+var_40]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
xor r13d, r13d
loc_8895E:
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char * mi_get_last_key(long long a1, long long a2, char *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6)
{
unsigned int v8; // r14d
char *v9; // rdx
unsigned long long v10; // r13
int v11; // eax
long long v12; // rax
char *v14; // [rsp+8h] [rbp-38h] BYREF
_BYTE *v15; // [rsp+10h] [rbp-30h]
v15 = a4;
v8 = 0;
if ( *a3 < 0 )
v8 = *(_DWORD *)(*(_QWORD *)a1 + 380LL);
if ( (*(_BYTE *)(a2 + 10) & 0x28) != 0 )
{
v9 = &a3[v8 + 2];
v14 = v9;
*v15 = 0;
if ( (unsigned long long)v9 >= a5 )
{
return v9;
}
else
{
while ( 1 )
{
v10 = (unsigned long long)v9;
v11 = (*(long long ( **)(long long, _QWORD, char **, _BYTE *))(a2 + 72))(a2, v8, &v14, v15);
*a6 = v11;
if ( !v11 )
break;
v9 = v14;
if ( (unsigned long long)v14 >= a5 )
return (char *)v10;
}
mi_report_error(126, *(_QWORD *)(*(_QWORD *)a1 + 616LL));
*(_DWORD *)my_thread_var(126LL) = 126;
return 0LL;
}
}
else
{
v12 = *(unsigned __int16 *)(a2 + 18);
v10 = a5 - v12 - v8;
*a6 = v12;
if ( v10 > (unsigned long long)a3 )
memmove(v15, v10, *(unsigned __int16 *)(a2 + 18) + v8);
}
return (char *)v10;
}
| _mi_get_last_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,R9
MOV RBX,R8
MOV qword ptr [RBP + -0x30],RCX
MOV R15,RSI
XOR R14D,R14D
CMP byte ptr [RDX],0x0
JNS 0x001888b6
MOV RAX,qword ptr [RDI]
MOV R14D,dword ptr [RAX + 0x17c]
LAB_001888b6:
TEST byte ptr [R15 + 0xa],0x28
JZ 0x00188900
LEA EAX,[R14 + 0x2]
ADD RDX,RAX
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x0
CMP RDX,RBX
JNC 0x00188933
MOV qword ptr [RBP + -0x40],RDI
LAB_001888d8:
MOV R13,RDX
MOV RDI,R15
MOV ESI,R14D
LEA RDX,[RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
CALL qword ptr [R15 + 0x48]
MOV dword ptr [R12],EAX
TEST EAX,EAX
JZ 0x00188938
MOV RDX,qword ptr [RBP + -0x38]
CMP RDX,RBX
JC 0x001888d8
JMP 0x0018895e
LAB_00188900:
MOVZX EAX,word ptr [R15 + 0x12]
SUB RBX,RAX
MOV ECX,R14D
MOV R13,RBX
SUB R13,RCX
MOV dword ptr [R12],EAX
CMP R13,RDX
JBE 0x0018895e
MOVZX EAX,word ptr [R15 + 0x12]
ADD R14D,EAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R13
MOV RDX,R14
CALL 0x0012a130
JMP 0x0018895e
LAB_00188933:
MOV R13,RDX
JMP 0x0018895e
LAB_00188938:
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017dc92
CALL 0x001a813e
MOV dword ptr [RAX],0x7e
XOR R13D,R13D
LAB_0018895e:
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
char * _mi_get_last_key(long *param_1,long param_2,char *param_3,int1 *param_4,char *param_5,
uint *param_6)
{
char *pcVar1;
char *pcVar2;
uint uVar3;
int4 *puVar4;
uint uVar5;
char *local_40;
int1 *local_38;
uVar5 = 0;
if (*param_3 < '\0') {
uVar5 = *(uint *)(*param_1 + 0x17c);
}
local_38 = param_4;
if ((*(byte *)(param_2 + 10) & 0x28) == 0) {
param_5 = param_5 + (-(ulong)uVar5 - (ulong)*(ushort *)(param_2 + 0x12));
*param_6 = (uint)*(ushort *)(param_2 + 0x12);
if (param_3 < param_5) {
memmove(param_4,param_5,(ulong)(uVar5 + *(ushort *)(param_2 + 0x12)));
}
}
else {
*param_4 = 0;
local_40 = param_3 + (uVar5 + 2);
pcVar2 = param_3 + (uVar5 + 2);
do {
pcVar1 = local_40;
if (param_5 <= pcVar1) {
return pcVar2;
}
local_40 = pcVar1;
uVar3 = (**(code **)(param_2 + 0x48))(param_2,uVar5,&local_40,local_38);
*param_6 = uVar3;
pcVar2 = pcVar1;
} while (uVar3 != 0);
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x7e;
param_5 = (char *)0x0;
}
return param_5;
}
| |
33,071 | my_strnxfrm_unicode_full_bin | eloqsql/strings/ctype-utf8.c | size_t
my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *dst0= dst;
uchar *de= dst + dstlen;
dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights,
src, src + srclen);
DBUG_ASSERT(dst <= de); /* Safety */
if (flags & MY_STRXFRM_PAD_WITH_SPACE)
{
for ( ; dst < de && nweights; nweights--)
{
*dst++= 0x00;
if (dst < de)
{
*dst++= 0x00;
if (dst < de)
*dst++= 0x20;
}
}
}
my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
if (flags & MY_STRXFRM_PAD_TO_MAXLEN)
{
while (dst < de)
{
*dst++= 0x00;
if (dst < de)
{
*dst++= 0x00;
if (dst < de)
*dst++= 0x20;
}
}
}
return dst - dst0;
} | O0 | c | my_strnxfrm_unicode_full_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x28(%rbp), %r9
addq -0x30(%rbp), %r9
leaq -0x1c(%rbp), %rcx
callq 0xb5e90
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xb6031
movl 0x10(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xb60bb
jmp 0xb603e
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0xb6057
cmpl $0x0, -0x1c(%rbp)
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xb6060
jmp 0xb60b9
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xb60ac
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xb60aa
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x20, (%rax)
jmp 0xb60ac
jmp 0xb60ae
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb603e
jmp 0xb60bb
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl 0x10(%rbp), %edx
xorl %ecx, %ecx
callq 0x97390
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xb6136
jmp 0xb60dc
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xb6134
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xb6132
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xb6130
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x20, (%rax)
jmp 0xb6132
jmp 0xb60dc
jmp 0xb6136
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_strnxfrm_unicode_full_bin:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_40]
mov r8, [rbp+var_28]
mov r9, [rbp+var_28]
add r9, [rbp+var_30]
lea rcx, [rbp+var_1C]
call my_strnxfrm_unicode_full_bin_internal
add rax, [rbp+var_10]
mov [rbp+var_10], rax
jmp short $+2
loc_B6031:
mov eax, [rbp+arg_0]
and eax, 40h
cmp eax, 0
jz short loc_B60BB
jmp short $+2
loc_B603E:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jnb short loc_B6057
cmp [rbp+var_1C], 0
setnz al
mov [rbp+var_41], al
loc_B6057:
mov al, [rbp+var_41]
test al, 1
jnz short loc_B6060
jmp short loc_B60B9
loc_B6060:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_B60AC
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_B60AA
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 20h ; ' '
loc_B60AA:
jmp short $+2
loc_B60AC:
jmp short $+2
loc_B60AE:
mov eax, [rbp+var_1C]
add eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
jmp short loc_B603E
loc_B60B9:
jmp short $+2
loc_B60BB:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
mov edx, [rbp+arg_0]
xor ecx, ecx
call my_strxfrm_desc_and_reverse
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_B6136
jmp short $+2
loc_B60DC:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_B6134
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_B6132
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_B6130
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 20h ; ' '
loc_B6130:
jmp short $+2
loc_B6132:
jmp short loc_B60DC
loc_B6134:
jmp short $+2
loc_B6136:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 50h
pop rbp
retn
| signed long long my_strnxfrm_unicode_full_bin(
long long a1,
char *a2,
long long a3,
int a4,
long long a5,
long long a6,
unsigned int a7)
{
_BYTE *v7; // rax
char *v8; // rax
char *v9; // rax
char *v10; // rax
char *v11; // rax
char *v12; // rax
char *v13; // rax
bool v15; // [rsp+Fh] [rbp-41h]
unsigned long long v16; // [rsp+10h] [rbp-40h]
int v17; // [rsp+34h] [rbp-1Ch] BYREF
long long v18; // [rsp+38h] [rbp-18h]
char *v19; // [rsp+40h] [rbp-10h]
long long v20; // [rsp+48h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = (unsigned long long)&a2[a3];
v7 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], &v17, a5, a6 + a5);
v19 = &v7[(_QWORD)v19];
if ( (a7 & 0x40) != 0 )
{
while ( 1 )
{
v15 = 0;
if ( (unsigned long long)v19 < v16 )
v15 = v17 != 0;
if ( !v15 )
break;
v8 = v19++;
*v8 = 0;
if ( (unsigned long long)v19 < v16 )
{
v9 = v19++;
*v9 = 0;
if ( (unsigned long long)v19 < v16 )
{
v10 = v19++;
*v10 = 32;
}
}
--v17;
}
}
my_strxfrm_desc_and_reverse(a2, (unsigned long long)v19, a7, 0);
if ( (a7 & 0x80) != 0 )
{
while ( (unsigned long long)v19 < v16 )
{
v11 = v19++;
*v11 = 0;
if ( (unsigned long long)v19 < v16 )
{
v12 = v19++;
*v12 = 0;
if ( (unsigned long long)v19 < v16 )
{
v13 = v19++;
*v13 = 32;
}
}
}
}
return v19 - a2;
}
| my_strnxfrm_unicode_full_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x28]
ADD R9,qword ptr [RBP + -0x30]
LEA RCX,[RBP + -0x1c]
CALL 0x001b5e90
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001b6031
LAB_001b6031:
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x40
CMP EAX,0x0
JZ 0x001b60bb
JMP 0x001b603e
LAB_001b603e:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JNC 0x001b6057
CMP dword ptr [RBP + -0x1c],0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001b6057:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001b6060
JMP 0x001b60b9
LAB_001b6060:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001b60ac
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001b60aa
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x20
LAB_001b60aa:
JMP 0x001b60ac
LAB_001b60ac:
JMP 0x001b60ae
LAB_001b60ae:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001b603e
LAB_001b60b9:
JMP 0x001b60bb
LAB_001b60bb:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + 0x10]
XOR ECX,ECX
CALL 0x00197390
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001b6136
JMP 0x001b60dc
LAB_001b60dc:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001b6134
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001b6132
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001b6130
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x20
LAB_001b6130:
JMP 0x001b6132
LAB_001b6132:
JMP 0x001b60dc
LAB_001b6134:
JMP 0x001b6136
LAB_001b6136:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x50
POP RBP
RET
|
long my_strnxfrm_unicode_full_bin
(int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6,
uint param_7)
{
int1 *puVar1;
long lVar2;
int1 *puVar3;
int1 *puVar4;
int local_24;
long local_20;
int1 *local_18;
int8 local_10;
puVar1 = (int1 *)(param_2 + param_3);
local_24 = param_4;
local_20 = param_3;
local_18 = (int1 *)param_2;
local_10 = param_1;
lVar2 = my_strnxfrm_unicode_full_bin_internal
(param_1,param_2,puVar1,&local_24,param_5,param_5 + param_6);
local_18 = (int1 *)(lVar2 + (long)local_18);
if ((param_7 & 0x40) != 0) {
for (; local_18 < puVar1 && local_24 != 0; local_24 = local_24 + -1) {
puVar3 = local_18 + 1;
*local_18 = 0;
if (puVar3 < puVar1) {
puVar4 = local_18 + 2;
*puVar3 = 0;
puVar3 = puVar4;
if (puVar4 < puVar1) {
*puVar4 = 0x20;
puVar3 = local_18 + 3;
}
}
local_18 = puVar3;
}
}
my_strxfrm_desc_and_reverse(param_2,local_18,param_7,0);
puVar3 = local_18;
if ((param_7 & 0x80) != 0) {
while (local_18 = puVar3, local_18 < puVar1) {
puVar3 = local_18 + 1;
*local_18 = 0;
if (puVar3 < puVar1) {
puVar4 = local_18 + 2;
*puVar3 = 0;
puVar3 = puVar4;
if (puVar4 < puVar1) {
*puVar4 = 0x20;
puVar3 = local_18 + 3;
}
}
}
}
return (long)local_18 - param_2;
}
| |
33,072 | my_strnxfrm_unicode_full_bin | eloqsql/strings/ctype-utf8.c | size_t
my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *dst0= dst;
uchar *de= dst + dstlen;
dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights,
src, src + srclen);
DBUG_ASSERT(dst <= de); /* Safety */
if (flags & MY_STRXFRM_PAD_WITH_SPACE)
{
for ( ; dst < de && nweights; nweights--)
{
*dst++= 0x00;
if (dst < de)
{
*dst++= 0x00;
if (dst < de)
*dst++= 0x20;
}
}
}
my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
if (flags & MY_STRXFRM_PAD_TO_MAXLEN)
{
while (dst < de)
{
*dst++= 0x00;
if (dst < de)
{
*dst++= 0x00;
if (dst < de)
*dst++= 0x20;
}
}
}
return dst - dst0;
} | O3 | c | my_strnxfrm_unicode_full_bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movl 0x10(%rbp), %r15d
leaq -0x24(%rbp), %rax
movl %ecx, (%rax)
leaq (%rsi,%rdx), %r14
addq %r8, %r9
movq %r14, %rdx
movq %rax, %rcx
callq 0x85ed7
leaq (%rbx,%rax), %rcx
testb $0x40, %r15b
jne 0x86020
movq %rcx, %r12
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x70e7e
testb %r15b, %r15b
setns %al
cmpq %r14, %r12
setae %cl
orb %al, %cl
jne 0x8606c
leaq 0x1(%r12), %rax
movb $0x0, (%r12)
cmpq %r14, %rax
jae 0x86016
leaq 0x2(%r12), %rax
movb $0x0, 0x1(%r12)
cmpq %r14, %rax
jae 0x86016
movb $0x20, 0x2(%r12)
addq $0x3, %r12
movq %r12, %rax
movq %rax, %r12
cmpq %r14, %rax
jb 0x85fea
jmp 0x8606f
cmpq %r12, %rax
jge 0x85fc3
cmpl $0x0, -0x24(%rbp)
je 0x85fc3
leaq 0x1(%rcx), %r12
movb $0x0, (%rcx)
cmpq %r14, %r12
jae 0x8604f
leaq 0x2(%rcx), %r12
movb $0x0, 0x1(%rcx)
cmpq %r14, %r12
jae 0x8604f
movb $0x20, 0x2(%rcx)
addq $0x3, %rcx
movq %rcx, %r12
movl -0x24(%rbp), %eax
decl %eax
movl %eax, -0x24(%rbp)
cmpq %r14, %r12
jae 0x85fc6
movq %r12, %rcx
testl %eax, %eax
jne 0x8602b
jmp 0x85fc6
movq %r12, %rax
subq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_strnxfrm_unicode_full_bin:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r12, rdx
mov rbx, rsi
mov r15d, [rbp+arg_0]
lea rax, [rbp+var_24]
mov [rax], ecx
lea r14, [rsi+rdx]
add r9, r8
mov rdx, r14
mov rcx, rax
call my_strnxfrm_unicode_full_bin_internal
lea rcx, [rbx+rax]
test r15b, 40h
jnz short loc_86020
loc_85FC3:
mov r12, rcx
loc_85FC6:
mov rdi, rbx
mov rsi, r12
mov edx, r15d
xor ecx, ecx
call my_strxfrm_desc_and_reverse
test r15b, r15b
setns al
cmp r12, r14
setnb cl
or cl, al
jnz loc_8606C
loc_85FEA:
lea rax, [r12+1]
mov byte ptr [r12], 0
cmp rax, r14
jnb short loc_86016
lea rax, [r12+2]
mov byte ptr [r12+1], 0
cmp rax, r14
jnb short loc_86016
mov byte ptr [r12+2], 20h ; ' '
add r12, 3
mov rax, r12
loc_86016:
mov r12, rax
cmp rax, r14
jb short loc_85FEA
jmp short loc_8606F
loc_86020:
cmp rax, r12
jge short loc_85FC3
cmp [rbp+var_24], 0
jz short loc_85FC3
loc_8602B:
lea r12, [rcx+1]
mov byte ptr [rcx], 0
cmp r12, r14
jnb short loc_8604F
lea r12, [rcx+2]
mov byte ptr [rcx+1], 0
cmp r12, r14
jnb short loc_8604F
mov byte ptr [rcx+2], 20h ; ' '
add rcx, 3
mov r12, rcx
loc_8604F:
mov eax, [rbp+var_24]
dec eax
mov [rbp+var_24], eax
cmp r12, r14
jnb loc_85FC6
mov rcx, r12
test eax, eax
jnz short loc_8602B
jmp loc_85FC6
loc_8606C:
mov rax, r12
loc_8606F:
sub rax, rbx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_strnxfrm_unicode_full_bin(
long long a1,
_BYTE *a2,
long long a3,
int a4,
long long a5,
long long a6,
unsigned int a7)
{
unsigned long long v8; // r14
long long v9; // rax
_BYTE *v10; // rcx
_BYTE *v11; // r12
_BYTE *v12; // rax
int v13; // eax
int v15[9]; // [rsp+Ch] [rbp-24h] BYREF
v15[0] = a4;
v8 = (unsigned long long)&a2[a3];
v9 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v15, a5, a5 + a6);
v10 = &a2[v9];
if ( (a7 & 0x40) != 0 && v9 < a3 && v15[0] )
{
do
{
v11 = v10 + 1;
*v10 = 0;
if ( (unsigned long long)(v10 + 1) < v8 )
{
v11 = v10 + 2;
v10[1] = 0;
if ( (unsigned long long)(v10 + 2) < v8 )
{
v10[2] = 32;
v11 = v10 + 3;
}
}
v13 = --v15[0];
if ( (unsigned long long)v11 >= v8 )
break;
v10 = v11;
}
while ( v13 );
}
else
{
v11 = &a2[v9];
}
my_strxfrm_desc_and_reverse(a2, v11, a7, 0);
if ( (a7 & 0x80u) == 0 || (unsigned long long)v11 >= v8 )
{
v12 = v11;
}
else
{
do
{
v12 = v11 + 1;
*v11 = 0;
if ( (unsigned long long)(v11 + 1) < v8 )
{
v12 = v11 + 2;
v11[1] = 0;
if ( (unsigned long long)(v11 + 2) < v8 )
{
v11[2] = 32;
v12 = v11 + 3;
}
}
v11 = v12;
}
while ( (unsigned long long)v12 < v8 );
}
return v12 - a2;
}
| my_strnxfrm_unicode_full_bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,RDX
MOV RBX,RSI
MOV R15D,dword ptr [RBP + 0x10]
LEA RAX,[RBP + -0x24]
MOV dword ptr [RAX],ECX
LEA R14,[RSI + RDX*0x1]
ADD R9,R8
MOV RDX,R14
MOV RCX,RAX
CALL 0x00185ed7
LEA RCX,[RBX + RAX*0x1]
TEST R15B,0x40
JNZ 0x00186020
LAB_00185fc3:
MOV R12,RCX
LAB_00185fc6:
MOV RDI,RBX
MOV RSI,R12
MOV EDX,R15D
XOR ECX,ECX
CALL 0x00170e7e
TEST R15B,R15B
SETNS AL
CMP R12,R14
SETNC CL
OR CL,AL
JNZ 0x0018606c
LAB_00185fea:
LEA RAX,[R12 + 0x1]
MOV byte ptr [R12],0x0
CMP RAX,R14
JNC 0x00186016
LEA RAX,[R12 + 0x2]
MOV byte ptr [R12 + 0x1],0x0
CMP RAX,R14
JNC 0x00186016
MOV byte ptr [R12 + 0x2],0x20
ADD R12,0x3
MOV RAX,R12
LAB_00186016:
MOV R12,RAX
CMP RAX,R14
JC 0x00185fea
JMP 0x0018606f
LAB_00186020:
CMP RAX,R12
JGE 0x00185fc3
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00185fc3
LAB_0018602b:
LEA R12,[RCX + 0x1]
MOV byte ptr [RCX],0x0
CMP R12,R14
JNC 0x0018604f
LEA R12,[RCX + 0x2]
MOV byte ptr [RCX + 0x1],0x0
CMP R12,R14
JNC 0x0018604f
MOV byte ptr [RCX + 0x2],0x20
ADD RCX,0x3
MOV R12,RCX
LAB_0018604f:
MOV EAX,dword ptr [RBP + -0x24]
DEC EAX
MOV dword ptr [RBP + -0x24],EAX
CMP R12,R14
JNC 0x00185fc6
MOV RCX,R12
TEST EAX,EAX
JNZ 0x0018602b
JMP 0x00185fc6
LAB_0018606c:
MOV RAX,R12
LAB_0018606f:
SUB RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_strnxfrm_unicode_full_bin
(int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6,
uint param_7)
{
int1 *puVar1;
long lVar2;
int1 *puVar3;
int1 *puVar4;
int local_2c;
puVar1 = (int1 *)(param_2 + param_3);
local_2c = param_4;
lVar2 = my_strnxfrm_unicode_full_bin_internal
(param_1,param_2,puVar1,&local_2c,param_5,param_6 + param_5);
puVar4 = (int1 *)(param_2 + lVar2);
if (((param_7 & 0x40) != 0) && (lVar2 < param_3)) {
do {
if (local_2c == 0) break;
puVar3 = puVar4 + 1;
*puVar4 = 0;
if (puVar3 < puVar1) {
puVar3 = puVar4 + 2;
puVar4[1] = 0;
if (puVar3 < puVar1) {
puVar4[2] = 0x20;
puVar3 = puVar4 + 3;
}
}
local_2c = local_2c + -1;
puVar4 = puVar3;
} while (puVar3 < puVar1);
}
my_strxfrm_desc_and_reverse(param_2,puVar4,param_7,0);
puVar3 = puVar4;
if (puVar4 < puVar1 && (char)param_7 < '\0') {
do {
puVar4 = puVar3 + 1;
*puVar3 = 0;
if (puVar4 < puVar1) {
puVar4 = puVar3 + 2;
puVar3[1] = 0;
if (puVar4 < puVar1) {
puVar3[2] = 0x20;
puVar4 = puVar3 + 3;
}
}
puVar3 = puVar4;
} while (puVar4 < puVar1);
}
return (long)puVar4 - param_2;
}
| |
33,073 | ftxui::separatorHSelector(float, float, ftxui::Color, ftxui::Color)::Impl::Render(ftxui::Screen&) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/separator.cpp | void Render(Screen& screen) override {
if (box_.y_max < box_.y_min) {
return;
}
// This are the two location with an empty demi-cell.
int demi_cell_left = int(left_ * 2.F - 1.F); // NOLINT
int demi_cell_right = int(right_ * 2.F + 2.F); // NOLINT
const int y = box_.y_min;
for (int x = box_.x_min; x <= box_.x_max; ++x) {
Pixel& pixel = screen.PixelAt(x, y);
const int a = (x - box_.x_min) * 2;
const int b = a + 1;
const bool a_empty = demi_cell_left == a || demi_cell_right == a;
const bool b_empty = demi_cell_left == b || demi_cell_right == b;
if (!a_empty && !b_empty) {
pixel.character = "─";
pixel.automerge = true;
} else {
pixel.character = a_empty ? "╶" : "╴"; // NOLINT
pixel.automerge = false;
}
if (demi_cell_left <= a && b <= demi_cell_right) {
pixel.foreground_color = selected_color_;
} else {
pixel.foreground_color = unselected_color_;
}
}
} | O1 | cpp | ftxui::separatorHSelector(float, float, ftxui::Color, ftxui::Color)::Impl::Render(ftxui::Screen&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x20(%rsp)
movl 0x54(%rdi), %eax
movl %eax, 0x14(%rsp)
cmpl %eax, 0x58(%rdi)
jl 0x25079
movq %rdi, %r14
movl 0x4c(%rdi), %r15d
cmpl 0x50(%rdi), %r15d
jg 0x25079
movss 0x5c(%r14), %xmm0
addss %xmm0, %xmm0
addss 0x19dfe(%rip), %xmm0 # 0x3ed68
cvttss2si %xmm0, %eax
movss 0x60(%r14), %xmm0
addss %xmm0, %xmm0
addss 0x19dec(%rip), %xmm0 # 0x3ed6c
cvttss2si %xmm0, %ecx
leal (%r15,%r15), %r12d
movl %ecx, 0xc(%rsp)
negl %ecx
movq %rcx, 0x18(%rsp)
movl %eax, 0x10(%rsp)
movl %eax, %ebp
negl %ebp
movq 0x20(%rsp), %rdi
movl %r15d, %esi
movl 0x14(%rsp), %edx
callq 0x3a522
movq %rax, %r13
movl 0x4c(%r14), %eax
addl %eax, %eax
movl %r12d, %ebx
subl %eax, %ebx
movl %ebx, %edx
leaq 0x19dad(%rip), %rcx # 0x3ed70
addl %ebp, %edx
je 0x25026
movl %ebx, %edx
leaq 0x19da0(%rip), %rcx # 0x3ed70
addl 0x18(%rsp), %edx
je 0x25026
leal (%r12,%rbp), %edx
subl %eax, %edx
leaq 0x19d91(%rip), %rcx # 0x3ed74
cmpl $-0x1, %edx
je 0x25026
movq 0x18(%rsp), %rcx
leal (%rcx,%r12), %edx
subl %eax, %edx
leaq 0x19d7a(%rip), %rcx # 0x3ed74
cmpl $-0x1, %edx
je 0x25026
movq %r13, %rdi
addq $0x8, %rdi
movq 0x10(%r13), %rdx
movl $0x3, %r8d
xorl %esi, %esi
leaq 0x19a05(%rip), %rcx # 0x3ea1e
callq 0xb680
movb (%r13), %al
orb $-0x80, %al
jmp 0x25044
movq %r13, %rdi
addq $0x8, %rdi
movq 0x10(%r13), %rdx
movl $0x3, %r8d
xorl %esi, %esi
callq 0xb680
movb (%r13), %al
andb $0x7f, %al
movb %al, (%r13)
cmpl 0x10(%rsp), %ebx
setge %al
cmpl 0xc(%rsp), %ebx
setl %cl
andb %al, %cl
movzbl %cl, %eax
movl 0x64(%r14,%rax,4), %eax
movl %eax, 0x2c(%r13)
leal 0x1(%r15), %eax
addl $0x2, %r12d
cmpl 0x50(%r14), %r15d
movl %eax, %r15d
jl 0x24f9b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZZN5ftxui18separatorHSelectorEffNS_5ColorES0_EN4Impl6RenderERNS_6ScreenE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rsp+58h+var_38], rsi
mov eax, [rdi+54h]
mov [rsp+58h+var_44], eax
cmp [rdi+58h], eax
jl loc_25079
mov r14, rdi
mov r15d, [rdi+4Ch]
cmp r15d, [rdi+50h]
jg loc_25079
movss xmm0, dword ptr [r14+5Ch]
addss xmm0, xmm0
addss xmm0, cs:dword_3ED68
cvttss2si eax, xmm0
movss xmm0, dword ptr [r14+60h]
addss xmm0, xmm0
addss xmm0, cs:dword_3ED6C
cvttss2si ecx, xmm0
lea r12d, [r15+r15]
mov [rsp+58h+var_4C], ecx
neg ecx
mov [rsp+58h+var_40], rcx
mov [rsp+58h+var_48], eax
mov ebp, eax
neg ebp
loc_24F9B:
mov rdi, [rsp+58h+var_38]; this
mov esi, r15d; int
mov edx, [rsp+58h+var_44]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov r13, rax
mov eax, [r14+4Ch]
add eax, eax
mov ebx, r12d
sub ebx, eax
mov edx, ebx
lea rcx, unk_3ED70
add edx, ebp
jz short loc_25026
mov edx, ebx
lea rcx, unk_3ED70
add edx, dword ptr [rsp+58h+var_40]
jz short loc_25026
lea edx, [r12+rbp]
sub edx, eax
lea rcx, unk_3ED74
cmp edx, 0FFFFFFFFh
jz short loc_25026
mov rcx, [rsp+58h+var_40]
lea edx, [rcx+r12]
sub edx, eax
lea rcx, unk_3ED74
cmp edx, 0FFFFFFFFh
jz short loc_25026
mov rdi, r13
add rdi, 8
mov rdx, [r13+10h]
mov r8d, 3
xor esi, esi
lea rcx, unk_3EA1E
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov al, [r13+0]
or al, 80h
jmp short loc_25044
loc_25026:
mov rdi, r13
add rdi, 8
mov rdx, [r13+10h]
mov r8d, 3
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov al, [r13+0]
and al, 7Fh
loc_25044:
mov [r13+0], al
cmp ebx, [rsp+58h+var_48]
setnl al
cmp ebx, [rsp+58h+var_4C]
setl cl
and cl, al
movzx eax, cl
mov eax, [r14+rax*4+64h]
mov [r13+2Ch], eax
lea eax, [r15+1]
add r12d, 2
cmp r15d, [r14+50h]
mov r15d, eax
jl loc_24F9B
loc_25079:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl::Render(
long long a1,
ftxui::Screen *a2)
{
long long result; // rax
int v3; // r15d
int v4; // r12d
long long v5; // r13
int v6; // eax
int v7; // ebx
void *v8; // rcx
char v9; // al
int v11; // [rsp+Ch] [rbp-4Ch]
int v12; // [rsp+10h] [rbp-48h]
int v13; // [rsp+14h] [rbp-44h]
result = *(unsigned int *)(a1 + 84);
v13 = result;
if ( *(_DWORD *)(a1 + 88) >= (int)result )
{
v3 = *(_DWORD *)(a1 + 76);
if ( v3 <= *(_DWORD *)(a1 + 80) )
{
v4 = 2 * v3;
v11 = (int)(float)((float)(*(float *)(a1 + 96) + *(float *)(a1 + 96)) + 2.0);
v12 = (int)(float)((float)(*(float *)(a1 + 92) + *(float *)(a1 + 92)) + -1.0);
do
{
v5 = ftxui::Screen::PixelAt(a2, v3, v13);
v6 = 2 * *(_DWORD *)(a1 + 76);
v7 = v4 - v6;
v8 = &unk_3ED70;
if ( v4 - v6 == v12
|| (v8 = &unk_3ED70, v7 == v11)
|| (v8 = &unk_3ED74, v4 - v12 - v6 == -1)
|| (v8 = &unk_3ED74, v4 - v11 - v6 == -1) )
{
std::string::_M_replace(v5 + 8, 0LL, *(_QWORD *)(v5 + 16), v8, 3LL);
v9 = *(_BYTE *)v5 & 0x7F;
}
else
{
std::string::_M_replace(v5 + 8, 0LL, *(_QWORD *)(v5 + 16), &unk_3EA1E, 3LL);
v9 = *(_BYTE *)v5 | 0x80;
}
*(_BYTE *)v5 = v9;
*(_DWORD *)(v5 + 44) = *(_DWORD *)(a1 + 4LL * ((v7 >= v12) & (unsigned __int8)(v7 < v11)) + 100);
result = (unsigned int)(v3 + 1);
v4 += 2;
}
while ( v3++ < *(_DWORD *)(a1 + 80) );
}
}
return result;
}
| Screen&):
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RSI
MOV EAX,dword ptr [RDI + 0x54]
MOV dword ptr [RSP + 0x14],EAX
CMP dword ptr [RDI + 0x58],EAX
JL 0x00125079
MOV R14,RDI
MOV R15D,dword ptr [RDI + 0x4c]
CMP R15D,dword ptr [RDI + 0x50]
JG 0x00125079
MOVSS XMM0,dword ptr [R14 + 0x5c]
ADDSS XMM0,XMM0
ADDSS XMM0,dword ptr [0x0013ed68]
CVTTSS2SI EAX,XMM0
MOVSS XMM0,dword ptr [R14 + 0x60]
ADDSS XMM0,XMM0
ADDSS XMM0,dword ptr [0x0013ed6c]
CVTTSS2SI ECX,XMM0
LEA R12D,[R15 + R15*0x1]
MOV dword ptr [RSP + 0xc],ECX
NEG ECX
MOV qword ptr [RSP + 0x18],RCX
MOV dword ptr [RSP + 0x10],EAX
MOV EBP,EAX
NEG EBP
LAB_00124f9b:
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,R15D
MOV EDX,dword ptr [RSP + 0x14]
CALL 0x0013a522
MOV R13,RAX
MOV EAX,dword ptr [R14 + 0x4c]
ADD EAX,EAX
MOV EBX,R12D
SUB EBX,EAX
MOV EDX,EBX
LEA RCX,[0x13ed70]
ADD EDX,EBP
JZ 0x00125026
MOV EDX,EBX
LEA RCX,[0x13ed70]
ADD EDX,dword ptr [RSP + 0x18]
JZ 0x00125026
LEA EDX,[R12 + RBP*0x1]
SUB EDX,EAX
LEA RCX,[0x13ed74]
CMP EDX,-0x1
JZ 0x00125026
MOV RCX,qword ptr [RSP + 0x18]
LEA EDX,[RCX + R12*0x1]
SUB EDX,EAX
LEA RCX,[0x13ed74]
CMP EDX,-0x1
JZ 0x00125026
MOV RDI,R13
ADD RDI,0x8
MOV RDX,qword ptr [R13 + 0x10]
MOV R8D,0x3
XOR ESI,ESI
LEA RCX,[0x13ea1e]
CALL 0x0010b680
MOV AL,byte ptr [R13]
OR AL,0x80
JMP 0x00125044
LAB_00125026:
MOV RDI,R13
ADD RDI,0x8
MOV RDX,qword ptr [R13 + 0x10]
MOV R8D,0x3
XOR ESI,ESI
CALL 0x0010b680
MOV AL,byte ptr [R13]
AND AL,0x7f
LAB_00125044:
MOV byte ptr [R13],AL
CMP EBX,dword ptr [RSP + 0x10]
SETGE AL
CMP EBX,dword ptr [RSP + 0xc]
SETL CL
AND CL,AL
MOVZX EAX,CL
MOV EAX,dword ptr [R14 + RAX*0x4 + 0x64]
MOV dword ptr [R13 + 0x2c],EAX
LEA EAX,[R15 + 0x1]
ADD R12D,0x2
CMP R15D,dword ptr [R14 + 0x50]
MOV R15D,EAX
JL 0x00124f9b
LAB_00125079:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ftxui::separatorHSelector(float, float, ftxui::Color, ftxui::Color)::Impl::Render(ftxui::Screen&)
*/
void ftxui::separatorHSelector(float,float,ftxui::Color,ftxui::Color)::Impl::Render(ftxui::Screen__
(long param_1,Screen *param_2)
{
int iVar1;
int iVar2;
bool bVar3;
byte bVar4;
int iVar5;
byte *pbVar6;
int iVar7;
int *puVar8;
int iVar9;
int iVar10;
int iVar11;
iVar1 = *(int *)(param_1 + 0x54);
if ((iVar1 <= *(int *)(param_1 + 0x58)) &&
(iVar11 = *(int *)(param_1 + 0x4c), iVar11 <= *(int *)(param_1 + 0x50))) {
iVar5 = (int)(*(float *)(param_1 + 0x5c) + *(float *)(param_1 + 0x5c) + DAT_0013ed68);
iVar7 = (int)(*(float *)(param_1 + 0x60) + *(float *)(param_1 + 0x60) + DAT_0013ed6c);
iVar10 = iVar11 * 2;
do {
pbVar6 = (byte *)Screen::PixelAt(param_2,iVar11,iVar1);
iVar2 = *(int *)(param_1 + 0x4c);
iVar9 = iVar10 + iVar2 * -2;
puVar8 = &DAT_0013ed70;
if ((((iVar9 == iVar5) || (puVar8 = &DAT_0013ed70, iVar9 == iVar7)) ||
(puVar8 = &DAT_0013ed74, (iVar10 - iVar5) + iVar2 * -2 == -1)) ||
(puVar8 = &DAT_0013ed74, (iVar10 - iVar7) + iVar2 * -2 == -1)) {
std::__cxx11::string::_M_replace
((ulong)(pbVar6 + 8),0,*(char **)(pbVar6 + 0x10),(ulong)puVar8);
bVar4 = *pbVar6 & 0x7f;
}
else {
std::__cxx11::string::_M_replace((ulong)(pbVar6 + 8),0,*(char **)(pbVar6 + 0x10),0x13ea1e);
bVar4 = *pbVar6 | 0x80;
}
*pbVar6 = bVar4;
*(int4 *)(pbVar6 + 0x2c) =
*(int4 *)(param_1 + 100 + (ulong)(iVar9 < iVar7 && iVar5 <= iVar9) * 4);
iVar10 = iVar10 + 2;
bVar3 = iVar11 < *(int *)(param_1 + 0x50);
iVar11 = iVar11 + 1;
} while (bVar3);
}
return;
}
| |
33,074 | makeContextCurrentOSMesa | untodesu[P]riteg/build_O2/_deps/glfw-src/src/osmesa_context.c | static void makeContextCurrentOSMesa(_GLFWwindow* window)
{
if (window)
{
int width, height;
_glfwPlatformGetFramebufferSize(window, &width, &height);
// Check to see if we need to allocate a new buffer
if ((window->context.osmesa.buffer == NULL) ||
(width != window->context.osmesa.width) ||
(height != window->context.osmesa.height))
{
free(window->context.osmesa.buffer);
// Allocate the new buffer (width * height * 8-bit RGBA)
window->context.osmesa.buffer = calloc(4, (size_t) width * height);
window->context.osmesa.width = width;
window->context.osmesa.height = height;
}
if (!OSMesaMakeCurrent(window->context.osmesa.handle,
window->context.osmesa.buffer,
GL_UNSIGNED_BYTE,
width, height))
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"OSMesa: Failed to make context current");
return;
}
}
_glfwPlatformSetTls(&_glfw.contextSlot, window);
} | O2 | c | makeContextCurrentOSMesa:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testq %rdi, %rdi
je 0x23691
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x1eafa
movq 0x2b0(%rbx), %rsi
testq %rsi, %rsi
je 0x23635
movl 0xc(%rsp), %r14d
cmpl 0x2a8(%rbx), %r14d
jne 0x23635
movl 0x8(%rsp), %r15d
cmpl 0x2ac(%rbx), %r15d
je 0x2366e
movq %rsi, %rdi
callq 0xba00
movslq 0xc(%rsp), %r14
movslq 0x8(%rsp), %r15
movq %r15, %rsi
imulq %r14, %rsi
pushq $0x4
popq %rdi
callq 0xb520
movq %rax, %rsi
movq %rax, 0x2b0(%rbx)
movl %r14d, 0x2a8(%rbx)
movl %r15d, 0x2ac(%rbx)
leaq 0x77fd3(%rip), %rax # 0x9b648
movq 0x2a0(%rbx), %rdi
movl $0x1401, %edx # imm = 0x1401
movl %r14d, %ecx
movl %r15d, %r8d
callq *0x20970(%rax)
testl %eax, %eax
je 0x236a7
movl $0x1fe1c, %edi # imm = 0x1FE1C
addq 0x76923(%rip), %rdi # 0x99fc0
movq %rbx, %rsi
callq 0x213b9
jmp 0x236ba
leaq 0x537af(%rip), %rsi # 0x76e5d
movl $0x10008, %edi # imm = 0x10008
xorl %eax, %eax
callq 0x1547b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| makeContextCurrentOSMesa:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
test rdi, rdi
jz loc_23691
lea rsi, [rsp+28h+var_1C]
lea rdx, [rsp+28h+var_20]
mov rdi, rbx
call _glfwPlatformGetFramebufferSize
mov rsi, [rbx+2B0h]
test rsi, rsi
jz short loc_23635
mov r14d, [rsp+28h+var_1C]
cmp r14d, [rbx+2A8h]
jnz short loc_23635
mov r15d, [rsp+28h+var_20]
cmp r15d, [rbx+2ACh]
jz short loc_2366E
loc_23635:
mov rdi, rsi
call _free
movsxd r14, [rsp+28h+var_1C]
movsxd r15, [rsp+28h+var_20]
mov rsi, r15
imul rsi, r14
push 4
pop rdi
call _calloc
mov rsi, rax
mov [rbx+2B0h], rax
mov [rbx+2A8h], r14d
mov [rbx+2ACh], r15d
loc_2366E:
lea rax, _glfw
mov rdi, [rbx+2A0h]
mov edx, 1401h
mov ecx, r14d
mov r8d, r15d
call qword ptr ds:loc_20970[rax]
test eax, eax
jz short loc_236A7
loc_23691:
mov edi, offset loc_1FE1C
add rdi, cs:_glfw_ptr
mov rsi, rbx
call _glfwPlatformSetTls
jmp short loc_236BA
loc_236A7:
lea rsi, aOsmesaFailedTo_1; "OSMesa: Failed to make context current"
mov edi, offset loc_10008
xor eax, eax
call _glfwInputError
loc_236BA:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long ( * makeContextCurrentOSMesa(long long a1))(_QWORD, _QWORD)
{
long long v1; // rsi
unsigned int v2; // r14d
unsigned int v3; // r15d
int v5; // [rsp+8h] [rbp-20h] BYREF
unsigned int v6[7]; // [rsp+Ch] [rbp-1Ch] BYREF
if ( !a1 )
return (long long ( *)(_QWORD, _QWORD))glfwPlatformSetTls((_DWORD *)((char *)glfw + (_QWORD)&loc_1FE1C));
glfwPlatformGetFramebufferSize(a1, v6, (unsigned int *)&v5);
v1 = *(_QWORD *)(a1 + 688);
if ( !v1 || (v2 = v6[0], v6[0] != *(_DWORD *)(a1 + 680)) || (v3 = v5, v5 != *(_DWORD *)(a1 + 684)) )
{
free(*(_QWORD *)(a1 + 688));
v2 = v6[0];
v3 = v5;
v1 = calloc(4LL, (int)v6[0] * (long long)v5);
*(_QWORD *)(a1 + 688) = v1;
*(_DWORD *)(a1 + 680) = v2;
*(_DWORD *)(a1 + 684) = v3;
}
if ( !(*(unsigned int ( **)(_QWORD, long long, long long, _QWORD, _QWORD))((char *)&loc_20970 + (_QWORD)glfw))(
*(_QWORD *)(a1 + 672),
v1,
5121LL,
v2,
v3) )
return glfwInputError((unsigned int)&loc_10008, (long long)"OSMesa: Failed to make context current");
else
return (long long ( *)(_QWORD, _QWORD))glfwPlatformSetTls((_DWORD *)((char *)glfw + (_QWORD)&loc_1FE1C));
}
| makeContextCurrentOSMesa:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
TEST RDI,RDI
JZ 0x00123691
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011eafa
MOV RSI,qword ptr [RBX + 0x2b0]
TEST RSI,RSI
JZ 0x00123635
MOV R14D,dword ptr [RSP + 0xc]
CMP R14D,dword ptr [RBX + 0x2a8]
JNZ 0x00123635
MOV R15D,dword ptr [RSP + 0x8]
CMP R15D,dword ptr [RBX + 0x2ac]
JZ 0x0012366e
LAB_00123635:
MOV RDI,RSI
CALL 0x0010ba00
MOVSXD R14,dword ptr [RSP + 0xc]
MOVSXD R15,dword ptr [RSP + 0x8]
MOV RSI,R15
IMUL RSI,R14
PUSH 0x4
POP RDI
CALL 0x0010b520
MOV RSI,RAX
MOV qword ptr [RBX + 0x2b0],RAX
MOV dword ptr [RBX + 0x2a8],R14D
MOV dword ptr [RBX + 0x2ac],R15D
LAB_0012366e:
LEA RAX,[0x19b648]
MOV RDI,qword ptr [RBX + 0x2a0]
MOV EDX,0x1401
MOV ECX,R14D
MOV R8D,R15D
CALL qword ptr [RAX + 0x20970]
TEST EAX,EAX
JZ 0x001236a7
LAB_00123691:
MOV EDI,0x1fe1c
ADD RDI,qword ptr [0x00199fc0]
MOV RSI,RBX
CALL 0x001213b9
JMP 0x001236ba
LAB_001236a7:
LEA RSI,[0x176e5d]
MOV EDI,0x10008
XOR EAX,EAX
CALL 0x0011547b
LAB_001236ba:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
void makeContextCurrentOSMesa(long param_1)
{
int iVar1;
void *__ptr;
ulong uVar2;
ulong uVar3;
uint local_20;
uint local_1c;
if (param_1 != 0) {
_glfwPlatformGetFramebufferSize(param_1,&local_1c,&local_20);
__ptr = *(void **)(param_1 + 0x2b0);
if (((__ptr == (void *)0x0) || (uVar2 = (ulong)local_1c, local_1c != *(uint *)(param_1 + 0x2a8))
) || (uVar3 = (ulong)local_20, local_20 != *(uint *)(param_1 + 0x2ac))) {
free(__ptr);
uVar2 = (ulong)(int)local_1c;
uVar3 = (ulong)(int)local_20;
__ptr = calloc(4,uVar3 * uVar2);
*(void **)(param_1 + 0x2b0) = __ptr;
*(uint *)(param_1 + 0x2a8) = local_1c;
*(uint *)(param_1 + 0x2ac) = local_20;
}
iVar1 = (*DAT_001bbfb8)(*(int8 *)(param_1 + 0x2a0),__ptr,0x1401,uVar2 & 0xffffffff,
uVar3 & 0xffffffff);
if (iVar1 == 0) {
_glfwInputError(0x10008,"OSMesa: Failed to make context current");
return;
}
}
_glfwPlatformSetTls(PTR__glfw_00199fc0 + 0x1fe1c,param_1);
return;
}
| |
33,075 | bitmap_exists_intersection | eloqsql/mysys/my_bitmap.c | my_bool bitmap_exists_intersection(const MY_BITMAP **bitmap_array,
uint bitmap_count,
uint start_bit, uint end_bit)
{
uint i, j, start_idx, end_idx;
my_bitmap_map cur_res;
DBUG_ASSERT(bitmap_count);
DBUG_ASSERT(end_bit >= start_bit);
for (j= 0; j < bitmap_count; j++)
DBUG_ASSERT(end_bit < bitmap_array[j]->n_bits);
start_idx= start_bit/8/sizeof(my_bitmap_map);
end_idx= end_bit/8/sizeof(my_bitmap_map);
for (i= start_idx; i < end_idx; i++)
{
cur_res= ~0;
for (j= 0; cur_res && j < bitmap_count; j++)
cur_res &= bitmap_array[j]->bitmap[i];
if (cur_res)
return TRUE;
}
cur_res= ~last_word_mask(end_bit);
for (j= 0; cur_res && j < bitmap_count; j++)
cur_res &= bitmap_array[j]->bitmap[end_idx];
return cur_res != 0;
} | O0 | c | bitmap_exists_intersection:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
jmp 0xefde7
jmp 0xefde9
jmp 0xefdeb
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0xefe0b
jmp 0xefdfc
jmp 0xefdfe
jmp 0xefe00
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xefdf2
movl -0x18(%rbp), %eax
shrl $0x3, %eax
movl %eax, %eax
shrq $0x2, %rax
movl %eax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x3, %eax
movl %eax, %eax
shrq $0x2, %rax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0xefea3
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x24(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x30(%rbp)
movb %al, -0x31(%rbp)
je 0xefe5c
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
setb %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xefe65
jmp 0xefe8a
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xefe45
cmpl $0x0, -0x30(%rbp)
je 0xefe96
movb $0x1, -0x1(%rbp)
jmp 0xeff0c
jmp 0xefe98
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xefe2f
movl -0x1c(%rbp), %edi
callq 0xeff20
xorl $-0x1, %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x30(%rbp)
movb %al, -0x32(%rbp)
je 0xefecf
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
setb %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0xefed8
jmp 0xefefd
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
andl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xefeb8
cmpl $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| bitmap_exists_intersection:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_1C], ecx
jmp short $+2
loc_EFDE7:
jmp short $+2
loc_EFDE9:
jmp short $+2
loc_EFDEB:
mov [rbp+var_24], 0
loc_EFDF2:
mov eax, [rbp+var_24]
cmp eax, [rbp+var_14]
jnb short loc_EFE0B
jmp short $+2
loc_EFDFC:
jmp short $+2
loc_EFDFE:
jmp short $+2
loc_EFE00:
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_EFDF2
loc_EFE0B:
mov eax, [rbp+var_18]
shr eax, 3
mov eax, eax
shr rax, 2
mov [rbp+var_28], eax
mov eax, [rbp+var_1C]
shr eax, 3
mov eax, eax
shr rax, 2
mov [rbp+var_2C], eax
mov eax, [rbp+var_28]
mov [rbp+var_20], eax
loc_EFE2F:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_2C]
jnb short loc_EFEA3
mov [rbp+var_30], 0FFFFFFFFh
mov [rbp+var_24], 0
loc_EFE45:
xor eax, eax
cmp [rbp+var_30], 0
mov [rbp+var_31], al
jz short loc_EFE5C
mov eax, [rbp+var_24]
cmp eax, [rbp+var_14]
setb al
mov [rbp+var_31], al
loc_EFE5C:
mov al, [rbp+var_31]
test al, 1
jnz short loc_EFE65
jmp short loc_EFE8A
loc_EFE65:
mov rax, [rbp+var_10]
mov ecx, [rbp+var_24]
mov rax, [rax+rcx*8]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov eax, [rax+rcx*4]
and eax, [rbp+var_30]
mov [rbp+var_30], eax
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_EFE45
loc_EFE8A:
cmp [rbp+var_30], 0
jz short loc_EFE96
mov [rbp+var_1], 1
jmp short loc_EFF0C
loc_EFE96:
jmp short $+2
loc_EFE98:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp short loc_EFE2F
loc_EFEA3:
mov edi, [rbp+var_1C]
call last_word_mask
xor eax, 0FFFFFFFFh
mov [rbp+var_30], eax
mov [rbp+var_24], 0
loc_EFEB8:
xor eax, eax
cmp [rbp+var_30], 0
mov [rbp+var_32], al
jz short loc_EFECF
mov eax, [rbp+var_24]
cmp eax, [rbp+var_14]
setb al
mov [rbp+var_32], al
loc_EFECF:
mov al, [rbp+var_32]
test al, 1
jnz short loc_EFED8
jmp short loc_EFEFD
loc_EFED8:
mov rax, [rbp+var_10]
mov ecx, [rbp+var_24]
mov rax, [rax+rcx*8]
mov rax, [rax]
mov ecx, [rbp+var_2C]
mov eax, [rax+rcx*4]
and eax, [rbp+var_30]
mov [rbp+var_30], eax
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_EFEB8
loc_EFEFD:
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_1], al
loc_EFF0C:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| bool bitmap_exists_intersection(long long a1, unsigned int a2, unsigned int a3, unsigned int a4)
{
bool v5; // [rsp+Eh] [rbp-32h]
bool v6; // [rsp+Fh] [rbp-31h]
int v7; // [rsp+10h] [rbp-30h]
unsigned int v8; // [rsp+10h] [rbp-30h]
unsigned int v9; // [rsp+14h] [rbp-2Ch]
unsigned int i; // [rsp+1Ch] [rbp-24h]
unsigned int k; // [rsp+1Ch] [rbp-24h]
unsigned int m; // [rsp+1Ch] [rbp-24h]
unsigned int j; // [rsp+20h] [rbp-20h]
for ( i = 0; i < a2; ++i )
;
v9 = a4 >> 5;
for ( j = a3 >> 5; j < v9; ++j )
{
v7 = -1;
for ( k = 0; ; ++k )
{
v6 = 0;
if ( v7 )
v6 = k < a2;
if ( !v6 )
break;
v7 &= *(_DWORD *)(**(_QWORD **)(a1 + 8LL * k) + 4LL * j);
}
if ( v7 )
return 1;
}
v8 = ~(unsigned int)last_word_mask(a4);
for ( m = 0; ; ++m )
{
v5 = 0;
if ( v8 )
v5 = m < a2;
if ( !v5 )
break;
v8 &= *(_DWORD *)(**(_QWORD **)(a1 + 8LL * m) + 4LL * v9);
}
return v8 != 0;
}
| bitmap_exists_intersection:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV dword ptr [RBP + -0x1c],ECX
JMP 0x001efde7
LAB_001efde7:
JMP 0x001efde9
LAB_001efde9:
JMP 0x001efdeb
LAB_001efdeb:
MOV dword ptr [RBP + -0x24],0x0
LAB_001efdf2:
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x001efe0b
JMP 0x001efdfc
LAB_001efdfc:
JMP 0x001efdfe
LAB_001efdfe:
JMP 0x001efe00
LAB_001efe00:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001efdf2
LAB_001efe0b:
MOV EAX,dword ptr [RBP + -0x18]
SHR EAX,0x3
MOV EAX,EAX
SHR RAX,0x2
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x1c]
SHR EAX,0x3
MOV EAX,EAX
SHR RAX,0x2
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x20],EAX
LAB_001efe2f:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x2c]
JNC 0x001efea3
MOV dword ptr [RBP + -0x30],0xffffffff
MOV dword ptr [RBP + -0x24],0x0
LAB_001efe45:
XOR EAX,EAX
CMP dword ptr [RBP + -0x30],0x0
MOV byte ptr [RBP + -0x31],AL
JZ 0x001efe5c
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x14]
SETC AL
MOV byte ptr [RBP + -0x31],AL
LAB_001efe5c:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x001efe65
JMP 0x001efe8a
LAB_001efe65:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + RCX*0x4]
AND EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001efe45
LAB_001efe8a:
CMP dword ptr [RBP + -0x30],0x0
JZ 0x001efe96
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001eff0c
LAB_001efe96:
JMP 0x001efe98
LAB_001efe98:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001efe2f
LAB_001efea3:
MOV EDI,dword ptr [RBP + -0x1c]
CALL 0x001eff20
XOR EAX,0xffffffff
MOV dword ptr [RBP + -0x30],EAX
MOV dword ptr [RBP + -0x24],0x0
LAB_001efeb8:
XOR EAX,EAX
CMP dword ptr [RBP + -0x30],0x0
MOV byte ptr [RBP + -0x32],AL
JZ 0x001efecf
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x14]
SETC AL
MOV byte ptr [RBP + -0x32],AL
LAB_001efecf:
MOV AL,byte ptr [RBP + -0x32]
TEST AL,0x1
JNZ 0x001efed8
JMP 0x001efefd
LAB_001efed8:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x2c]
MOV EAX,dword ptr [RAX + RCX*0x4]
AND EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001efeb8
LAB_001efefd:
CMP dword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
LAB_001eff0c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int8 bitmap_exists_intersection(long param_1,uint param_2,uint param_3,uint param_4)
{
uint3 uVar1;
uint7 uVar2;
ulong uVar3;
uint local_38;
uint local_2c;
uint local_28;
bool local_9;
for (local_2c = 0; local_2c < param_2; local_2c = local_2c + 1) {
}
local_28 = param_3 >> 5;
do {
if (param_4 >> 5 <= local_28) {
local_38 = last_word_mask(param_4);
local_2c = 0;
for (local_38 = local_38 ^ 0xffffffff; local_38 != 0 && local_2c < param_2;
local_38 = *(uint *)(**(long **)(param_1 + uVar3 * 8) + (ulong)(param_4 >> 5) * 4) &
local_38) {
uVar3 = (ulong)local_2c;
local_2c = local_2c + 1;
}
local_9 = local_38 != 0;
uVar2 = 0;
LAB_001eff0c:
return CONCAT71(uVar2,local_9);
}
local_38 = 0xffffffff;
local_2c = 0;
while( true ) {
uVar1 = 0;
if (local_38 != 0) {
uVar1 = (uint3)(local_2c >> 8);
}
uVar2 = (uint7)uVar1;
if (local_38 == 0 || param_2 <= local_2c) break;
local_38 = *(uint *)(**(long **)(param_1 + (ulong)local_2c * 8) + (ulong)local_28 * 4) &
local_38;
local_2c = local_2c + 1;
}
if (local_38 != 0) {
local_9 = true;
goto LAB_001eff0c;
}
local_28 = local_28 + 1;
} while( true );
}
| |
33,076 | pvio_socket_keepalive | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | int pvio_socket_keepalive(MARIADB_PVIO *pvio)
{
int opt= 1;
struct st_pvio_socket *csock= NULL;
if (!pvio || !pvio->data)
return 1;
csock= (struct st_pvio_socket *)pvio->data;
return setsockopt(csock->socket, SOL_SOCKET, SO_KEEPALIVE,
#ifndef _WIN32
(const void *)&opt, sizeof(opt));
#else
(char *)&opt, (int)sizeof(opt));
#endif
} | O3 | c | pvio_socket_keepalive:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, -0x4(%rbp)
movl $0x1, %eax
testq %rdi, %rdi
je 0x2fddf
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x2fddf
movl (%rcx), %edi
leaq -0x4(%rbp), %rcx
movl $0x1, %esi
movl $0x9, %edx
movl $0x4, %r8d
callq 0x137b0
addq $0x10, %rsp
popq %rbp
retq
| pvio_socket_keepalive:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], 1
mov eax, 1
test rdi, rdi
jz short loc_2FDDF
mov rcx, [rdi]
test rcx, rcx
jz short loc_2FDDF
mov edi, [rcx]
lea rcx, [rbp+var_4]
mov esi, 1
mov edx, 9
mov r8d, 4
call _setsockopt
loc_2FDDF:
add rsp, 10h
pop rbp
retn
| long long pvio_socket_keepalive(_QWORD *a1)
{
long long result; // rax
int v2; // [rsp+Ch] [rbp-4h] BYREF
v2 = 1;
result = 1LL;
if ( a1 )
{
if ( *a1 )
return setsockopt(*(unsigned int *)*a1, 1LL, 9LL, &v2, 4LL);
}
return result;
}
| pvio_socket_keepalive:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],0x1
MOV EAX,0x1
TEST RDI,RDI
JZ 0x0012fddf
MOV RCX,qword ptr [RDI]
TEST RCX,RCX
JZ 0x0012fddf
MOV EDI,dword ptr [RCX]
LEA RCX,[RBP + -0x4]
MOV ESI,0x1
MOV EDX,0x9
MOV R8D,0x4
CALL 0x001137b0
LAB_0012fddf:
ADD RSP,0x10
POP RBP
RET
|
int pvio_socket_keepalive(int8 *param_1)
{
int iVar1;
int4 local_c;
local_c = 1;
iVar1 = 1;
if ((param_1 != (int8 *)0x0) && ((int *)*param_1 != (int *)0x0)) {
iVar1 = setsockopt(*(int *)*param_1,1,9,&local_c,4);
}
return iVar1;
}
| |
33,077 | lock_io_cache | eloqsql/mysys/mf_iocache.c | static int lock_io_cache(IO_CACHE *cache, my_off_t pos)
{
IO_CACHE_SHARE *cshare= cache->share;
DBUG_ENTER("lock_io_cache");
/* Enter the lock. */
mysql_mutex_lock(&cshare->mutex);
cshare->running_threads--;
DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader", cache, (ulong) pos,
cshare->running_threads));
if (cshare->source_cache)
{
/* A write cache is synchronized to the read caches. */
if (cache == cshare->source_cache)
{
/* The writer waits until all readers are here. */
while (cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("writer waits in lock"));
mysql_cond_wait(&cshare->cond_writer, &cshare->mutex);
}
DBUG_PRINT("io_cache_share", ("writer awoke, going to copy"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* The last thread wakes the writer. */
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("waking writer"));
mysql_cond_signal(&cshare->cond_writer);
}
/*
Readers wait until the data is copied from the writer. Another
reason to stop waiting is the removal of the write thread. If this
happens, we leave the lock with old data in the buffer.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->source_cache)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/*
If the writer was removed from the share while this thread was
asleep, we need to simulate an EOF condition. The writer cannot
reset the share variables as they might still be in use by readers
of the last block. When we awake here then because the last
joining thread signalled us. If the writer is not the last, it
will not signal. So it is safe to clear the buffer here.
*/
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader found writer removed. EOF"));
cshare->read_end= cshare->buffer; /* Empty buffer. */
cshare->error= 0; /* EOF is not an error. */
}
}
else
{
/*
There are read caches only. The last thread arriving in
lock_io_cache() continues with a locked cache and reads the block.
*/
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("last thread joined, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/*
All other threads wait until the requested block is read by the
last thread arriving. Another reason to stop waiting is the
removal of a thread. If this leads to all threads being in the
lock, we have to continue also. The first of the awaken threads
will then do the read.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/* If the block is not yet read, continue with a locked cache and read. */
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader awoke, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* Another thread did read the block already. */
}
DBUG_PRINT("io_cache_share", ("reader awoke, going to process %u bytes",
(uint) (cshare->read_end ? (size_t)
(cshare->read_end - cshare->buffer) :
0)));
/*
Leave the lock. Do not call unlock_io_cache() later. The thread that
filled the buffer did this and marked all threads as running.
*/
mysql_mutex_unlock(&cshare->mutex);
DBUG_RETURN(0);
} | O3 | c | lock_io_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq 0x98(%rdi), %rbx
cmpq $0x0, 0x40(%rbx)
jne 0x2cbf4
movq %rbx, %rdi
callq 0x24510
movl 0xd8(%rbx), %eax
decl %eax
movl %eax, 0xd8(%rbx)
movq 0xc0(%rbx), %rcx
testq %rcx, %rcx
je 0x2cb07
cmpq %r15, %rcx
je 0x2cba7
testl %eax, %eax
jne 0x2caae
leaq 0x80(%rbx), %r15
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
jne 0x2cc22
movq %r15, %rdi
callq 0x24040
leaq 0x48(%rbx), %r15
leaq 0x37bad(%rip), %r12 # 0x64666
cmpq $0x0, 0xd0(%rbx)
je 0x2cad0
cmpq %r14, 0xb8(%rbx)
jae 0x2cb7d
cmpq $0x0, 0xc0(%rbx)
je 0x2cb65
cmpq $0x0, 0x78(%rbx)
jne 0x2caf2
movq %r15, %rdi
movq %rbx, %rsi
callq 0x245b0
jmp 0x2cab9
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x406, %ecx # imm = 0x406
callq 0x24fd6
jmp 0x2cab9
movl $0x1, %r15d
testl %eax, %eax
je 0x2cb95
leaq 0x48(%rbx), %r12
leaq 0x37b46(%rip), %r13 # 0x64666
cmpq $0x0, 0xd0(%rbx)
je 0x2cb33
cmpq %r14, 0xb8(%rbx)
jae 0x2cb7d
cmpl $0x0, 0xd8(%rbx)
je 0x2cb95
cmpq $0x0, 0x78(%rbx)
jne 0x2cb50
movq %r12, %rdi
movq %rbx, %rsi
callq 0x245b0
jmp 0x2cb20
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl $0x430, %ecx # imm = 0x430
callq 0x24fd6
jmp 0x2cb20
movq 0xc8(%rbx), %rax
movq %rax, 0xd0(%rbx)
movl $0x0, 0xe0(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x2cc0d
movq %rbx, %rdi
callq 0x24260
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r15d
testl %eax, %eax
je 0x2cb95
leaq 0x80(%rbx), %r14
leaq 0x37aa7(%rip), %r12 # 0x64666
cmpq $0x0, 0xb0(%rbx)
jne 0x2cbdf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x245b0
cmpl $0x0, 0xd8(%rbx)
jne 0x2cbbf
jmp 0x2cb95
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x3ee, %ecx # imm = 0x3EE
callq 0x24fd6
jmp 0x2cbd4
leaq 0x37a6b(%rip), %rsi # 0x64666
movq %rbx, %rdi
movl $0x3dd, %edx # imm = 0x3DD
callq 0x24cc5
jmp 0x2ca64
leaq 0x2cdf74(%rip), %rax # 0x2fab88
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x2cb8a
leaq 0x2cdf5f(%rip), %rax # 0x2fab88
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x2caa6
| lock_io_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
mov rbx, [rdi+98h]
cmp qword ptr [rbx+40h], 0
jnz loc_2CBF4
mov rdi, rbx
call _pthread_mutex_lock
loc_2CA64:
mov eax, [rbx+0D8h]
dec eax
mov [rbx+0D8h], eax
mov rcx, [rbx+0C0h]
test rcx, rcx
jz loc_2CB07
cmp rcx, r15
jz loc_2CBA7
test eax, eax
jnz short loc_2CAAE
lea r15, [rbx+80h]
mov rdi, [rbx+0B0h]
test rdi, rdi
jnz loc_2CC22
loc_2CAA6:
mov rdi, r15
call _pthread_cond_signal
loc_2CAAE:
lea r15, [rbx+48h]
lea r12, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
loc_2CAB9:
cmp qword ptr [rbx+0D0h], 0
jz short loc_2CAD0
cmp [rbx+0B8h], r14
jnb loc_2CB7D
loc_2CAD0:
cmp qword ptr [rbx+0C0h], 0
jz loc_2CB65
cmp qword ptr [rbx+78h], 0
jnz short loc_2CAF2
mov rdi, r15
mov rsi, rbx
call _pthread_cond_wait
jmp short loc_2CAB9
loc_2CAF2:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 406h
call psi_cond_wait
jmp short loc_2CAB9
loc_2CB07:
mov r15d, 1
test eax, eax
jz loc_2CB95
lea r12, [rbx+48h]
lea r13, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
loc_2CB20:
cmp qword ptr [rbx+0D0h], 0
jz short loc_2CB33
cmp [rbx+0B8h], r14
jnb short loc_2CB7D
loc_2CB33:
cmp dword ptr [rbx+0D8h], 0
jz short loc_2CB95
cmp qword ptr [rbx+78h], 0
jnz short loc_2CB50
mov rdi, r12
mov rsi, rbx
call _pthread_cond_wait
jmp short loc_2CB20
loc_2CB50:
mov rdi, r12
mov rsi, rbx
mov rdx, r13
mov ecx, 430h
call psi_cond_wait
jmp short loc_2CB20
loc_2CB65:
mov rax, [rbx+0C8h]
mov [rbx+0D0h], rax
mov dword ptr [rbx+0E0h], 0
loc_2CB7D:
mov rdi, [rbx+40h]
test rdi, rdi
jnz loc_2CC0D
loc_2CB8A:
mov rdi, rbx
call _pthread_mutex_unlock
xor r15d, r15d
loc_2CB95:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2CBA7:
mov r15d, 1
test eax, eax
jz short loc_2CB95
lea r14, [rbx+80h]
lea r12, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
loc_2CBBF:
cmp qword ptr [rbx+0B0h], 0
jnz short loc_2CBDF
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
loc_2CBD4:
cmp dword ptr [rbx+0D8h], 0
jnz short loc_2CBBF
jmp short loc_2CB95
loc_2CBDF:
mov rdi, r14
mov rsi, rbx
mov rdx, r12
mov ecx, 3EEh
call psi_cond_wait
jmp short loc_2CBD4
loc_2CBF4:
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 3DDh
call psi_mutex_lock
jmp loc_2CA64
loc_2CC0D:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_2CB8A
loc_2CC22:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_2CAA6
| long long lock_io_cache(long long a1, unsigned long long a2)
{
long long v2; // rbx
int v3; // eax
long long v4; // rcx
long long v5; // rdi
unsigned int v6; // r15d
long long v7; // rdi
v2 = *(_QWORD *)(a1 + 152);
if ( *(_QWORD *)(v2 + 64) )
psi_mutex_lock(
*(_QWORD *)(a1 + 152),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x3DDu);
else
pthread_mutex_lock(*(_QWORD *)(a1 + 152));
v3 = *(_DWORD *)(v2 + 216) - 1;
*(_DWORD *)(v2 + 216) = v3;
v4 = *(_QWORD *)(v2 + 192);
if ( !v4 )
{
v6 = 1;
if ( !v3 )
return v6;
while ( !*(_QWORD *)(v2 + 208) || *(_QWORD *)(v2 + 184) < a2 )
{
if ( !*(_DWORD *)(v2 + 216) )
return v6;
if ( *(_QWORD *)(v2 + 120) )
psi_cond_wait(v2 + 72, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x430u);
else
pthread_cond_wait(v2 + 72, v2);
}
goto LABEL_23;
}
if ( v4 != a1 )
{
if ( !v3 )
{
v5 = *(_QWORD *)(v2 + 176);
if ( v5 )
(*((void ( **)(long long))PSI_server + 46))(v5);
pthread_cond_signal(v2 + 128);
}
while ( !*(_QWORD *)(v2 + 208) || *(_QWORD *)(v2 + 184) < a2 )
{
if ( !*(_QWORD *)(v2 + 192) )
{
*(_QWORD *)(v2 + 208) = *(_QWORD *)(v2 + 200);
*(_DWORD *)(v2 + 224) = 0;
break;
}
if ( *(_QWORD *)(v2 + 120) )
psi_cond_wait(v2 + 72, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x406u);
else
pthread_cond_wait(v2 + 72, v2);
}
LABEL_23:
v7 = *(_QWORD *)(v2 + 64);
if ( v7 )
(*((void ( **)(long long))PSI_server + 44))(v7);
pthread_mutex_unlock(v2);
return 0;
}
v6 = 1;
if ( v3 )
{
do
{
if ( *(_QWORD *)(v2 + 176) )
psi_cond_wait(v2 + 128, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x3EEu);
else
pthread_cond_wait(v2 + 128, v2);
}
while ( *(_DWORD *)(v2 + 216) );
}
return v6;
}
| lock_io_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R15,RDI
MOV RBX,qword ptr [RDI + 0x98]
CMP qword ptr [RBX + 0x40],0x0
JNZ 0x0012cbf4
MOV RDI,RBX
CALL 0x00124510
LAB_0012ca64:
MOV EAX,dword ptr [RBX + 0xd8]
DEC EAX
MOV dword ptr [RBX + 0xd8],EAX
MOV RCX,qword ptr [RBX + 0xc0]
TEST RCX,RCX
JZ 0x0012cb07
CMP RCX,R15
JZ 0x0012cba7
TEST EAX,EAX
JNZ 0x0012caae
LEA R15,[RBX + 0x80]
MOV RDI,qword ptr [RBX + 0xb0]
TEST RDI,RDI
JNZ 0x0012cc22
LAB_0012caa6:
MOV RDI,R15
CALL 0x00124040
LAB_0012caae:
LEA R15,[RBX + 0x48]
LEA R12,[0x164666]
LAB_0012cab9:
CMP qword ptr [RBX + 0xd0],0x0
JZ 0x0012cad0
CMP qword ptr [RBX + 0xb8],R14
JNC 0x0012cb7d
LAB_0012cad0:
CMP qword ptr [RBX + 0xc0],0x0
JZ 0x0012cb65
CMP qword ptr [RBX + 0x78],0x0
JNZ 0x0012caf2
MOV RDI,R15
MOV RSI,RBX
CALL 0x001245b0
JMP 0x0012cab9
LAB_0012caf2:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0x406
CALL 0x00124fd6
JMP 0x0012cab9
LAB_0012cb07:
MOV R15D,0x1
TEST EAX,EAX
JZ 0x0012cb95
LEA R12,[RBX + 0x48]
LEA R13,[0x164666]
LAB_0012cb20:
CMP qword ptr [RBX + 0xd0],0x0
JZ 0x0012cb33
CMP qword ptr [RBX + 0xb8],R14
JNC 0x0012cb7d
LAB_0012cb33:
CMP dword ptr [RBX + 0xd8],0x0
JZ 0x0012cb95
CMP qword ptr [RBX + 0x78],0x0
JNZ 0x0012cb50
MOV RDI,R12
MOV RSI,RBX
CALL 0x001245b0
JMP 0x0012cb20
LAB_0012cb50:
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R13
MOV ECX,0x430
CALL 0x00124fd6
JMP 0x0012cb20
LAB_0012cb65:
MOV RAX,qword ptr [RBX + 0xc8]
MOV qword ptr [RBX + 0xd0],RAX
MOV dword ptr [RBX + 0xe0],0x0
LAB_0012cb7d:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x0012cc0d
LAB_0012cb8a:
MOV RDI,RBX
CALL 0x00124260
XOR R15D,R15D
LAB_0012cb95:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012cba7:
MOV R15D,0x1
TEST EAX,EAX
JZ 0x0012cb95
LEA R14,[RBX + 0x80]
LEA R12,[0x164666]
LAB_0012cbbf:
CMP qword ptr [RBX + 0xb0],0x0
JNZ 0x0012cbdf
MOV RDI,R14
MOV RSI,RBX
CALL 0x001245b0
LAB_0012cbd4:
CMP dword ptr [RBX + 0xd8],0x0
JNZ 0x0012cbbf
JMP 0x0012cb95
LAB_0012cbdf:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0x3ee
CALL 0x00124fd6
JMP 0x0012cbd4
LAB_0012cbf4:
LEA RSI,[0x164666]
MOV RDI,RBX
MOV EDX,0x3dd
CALL 0x00124cc5
JMP 0x0012ca64
LAB_0012cc0d:
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0012cb8a
LAB_0012cc22:
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0012caa6
|
int8 lock_io_cache(long param_1,ulong param_2)
{
pthread_mutex_t *__mutex;
int iVar1;
int8 uVar2;
__mutex = *(pthread_mutex_t **)(param_1 + 0x98);
if (*(long *)((long)__mutex + 0x40) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3dd);
}
iVar1 = *(int *)((long)__mutex + 0xd8) + -1;
*(int *)((long)__mutex + 0xd8) = iVar1;
if (*(long *)((long)__mutex + 0xc0) == 0) {
uVar2 = 1;
if (iVar1 != 0) {
while( true ) {
if ((*(long *)((long)__mutex + 0xd0) != 0) && (param_2 <= *(ulong *)((long)__mutex + 0xb8)))
goto LAB_0012cb7d;
if (*(int *)((long)__mutex + 0xd8) == 0) break;
if (__mutex[3].__align == 0) {
pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x430);
}
}
}
}
else if (*(long *)((long)__mutex + 0xc0) == param_1) {
uVar2 = 1;
if (iVar1 != 0) {
do {
if (*(long *)((long)__mutex + 0xb0) == 0) {
pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x80),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x80),__mutex,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3ee);
}
} while (*(int *)((long)__mutex + 0xd8) != 0);
}
}
else {
if (iVar1 == 0) {
if (*(long *)((long)__mutex + 0xb0) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)((long)__mutex + 0x80));
}
while( true ) {
if ((*(long *)((long)__mutex + 0xd0) != 0) && (param_2 <= *(ulong *)((long)__mutex + 0xb8)))
goto LAB_0012cb7d;
if (*(long *)((long)__mutex + 0xc0) == 0) break;
if (__mutex[3].__align == 0) {
pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x406);
}
}
*(long *)((long)__mutex + 0xd0) = __mutex[5].__align;
*(int4 *)((long)__mutex + 0xe0) = 0;
LAB_0012cb7d:
if (*(long *)((long)__mutex + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
uVar2 = 0;
}
return uVar2;
}
| |
33,078 | translog_filename_by_fileno | eloqsql/storage/maria/ma_loghandler.c | char *translog_filename_by_fileno(uint32 file_no, char *path)
{
char buff[11], *end;
uint length;
DBUG_ENTER("translog_filename_by_fileno");
DBUG_ASSERT(file_no <= 0xfffffff);
/* log_descriptor.directory is already formated */
end= strxmov(path, log_descriptor.directory, "aria_log.0000000", NullS);
length= (uint) (int10_to_str(file_no, buff, 10) - buff);
strmov(end - length +1, buff);
DBUG_PRINT("info", ("Path: '%s' path: %p", path, path));
DBUG_RETURN(path);
} | O3 | c | translog_filename_by_fileno:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %r14d
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x3b5cdc(%rip), %rsi # 0x3fe7e8
leaq 0x9133b(%rip), %rdx # 0xd9e4e
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xd7230
movq %rax, %r15
movl %r14d, %edi
leaq -0x2b(%rbp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0xd5802
subl %r14d, %eax
subq %rax, %r15
incq %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x29360
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x48b67
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| translog_filename_by_fileno:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rsi
mov r14d, edi
mov rax, fs:28h
mov [rbp+var_20], rax
lea rsi, unk_3FE7E8
lea rdx, aAriaLog0000000; "aria_log.0000000"
mov rdi, rbx
xor ecx, ecx
xor eax, eax
call strxmov
mov r15, rax
mov edi, r14d
lea r14, [rbp+var_2B]
mov rsi, r14
mov edx, 0Ah
call int10_to_str
sub eax, r14d
sub r15, rax
inc r15
mov rdi, r15
mov rsi, r14
call _strcpy
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_48B67
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_48B67:
call ___stack_chk_fail
| long long translog_filename_by_fileno(unsigned int a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v6; // r15
int v7; // eax
_BYTE v9[11]; // [rsp+5h] [rbp-2Bh] BYREF
unsigned long long v10; // [rsp+10h] [rbp-20h]
v10 = __readfsqword(0x28u);
v6 = strxmov(a2, (unsigned int)&unk_3FE7E8, (unsigned int)"aria_log.0000000", 0, a5, a6);
v7 = int10_to_str(a1, v9, 10LL);
strcpy(v6 - (v7 - (unsigned int)v9) + 1, v9);
return a2;
}
| translog_filename_by_fileno:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R14D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RSI,[0x4fe7e8]
LEA RDX,[0x1d9e4e]
MOV RDI,RBX
XOR ECX,ECX
XOR EAX,EAX
CALL 0x001d7230
MOV R15,RAX
MOV EDI,R14D
LEA R14,[RBP + -0x2b]
MOV RSI,R14
MOV EDX,0xa
CALL 0x001d5802
SUB EAX,R14D
SUB R15,RAX
INC R15
MOV RDI,R15
MOV RSI,R14
CALL 0x00129360
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00148b67
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00148b67:
CALL 0x00129270
|
int8 translog_filename_by_fileno(int4 param_1,int8 param_2)
{
int iVar1;
long lVar2;
long in_FS_OFFSET;
char local_33 [11];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = strxmov(param_2,&DAT_004fe7e8,"aria_log.0000000",0);
iVar1 = int10_to_str(param_1,local_33,10);
strcpy((char *)((lVar2 - (ulong)(uint)(iVar1 - (int)local_33)) + 1),local_33);
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return param_2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,079 | parse_prefixed_json_tool_call_array(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&, unsigned long) | monkey531[P]llama/common/chat.cpp | static common_chat_msg parse_prefixed_json_tool_call_array(const std::string& input, const std::string & prefix, size_t rstrip_prefix = 0) {
auto content_end = input.find(prefix);
size_t tc_start = std::string::npos;
common_chat_msg result;
result.role = "assistant";
const auto process_tool_calls = [&](const json & tool_calls) {
for (const auto & tool_call : tool_calls) {
const auto & arguments = tool_call["arguments"];
result.tool_calls.push_back({
tool_call["name"],
arguments.is_string() ? arguments.get<std::string>() : arguments.dump(),
tool_call.contains("id") ? tool_call["id"] : "",
});
}
};
if (content_end == std::string::npos) {
result.content = input;
} else {
tc_start = content_end + prefix.size() - rstrip_prefix;
result.content = input.substr(0, content_end);
auto tool_calls = json::parse(input.substr(tc_start));
process_tool_calls(tool_calls);
}
return result;
} | O3 | cpp | parse_prefixed_json_tool_call_array(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&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbp
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %r13d, %r13d
movq %r14, %rdi
xorl %edx, %edx
callq 0x1aed0
movq %rax, %r15
leaq 0x10(%rbp), %rax
movq %rax, (%rbp)
movq %r13, 0x8(%rbp)
movb %r13b, 0x10(%rbp)
leaq 0x30(%rbp), %rax
movq %rax, 0x20(%rbp)
movq %r13, 0x28(%rbp)
movb %r13b, 0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbp)
movq %r13, 0x50(%rbp)
leaq 0x68(%rbp), %rax
movq %rax, 0x58(%rbp)
movq %r13, 0x60(%rbp)
movb %r13b, 0x68(%rbp)
leaq 0xceb0(%rip), %rcx # 0xef6d3
movl $0x9, %r8d
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbp, 0x48(%rsp)
callq 0x1ad10
leaq 0x20(%rbp), %r13
cmpq $-0x1, %r15
je 0xe2967
movq 0x8(%r12), %r12
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x1a8e0
subq %rbx, %r15
addq %r12, %r15
leaq 0x60(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1aa50
movq (%rbx), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe288f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
callq 0x1a8e0
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x50(%rsp), %rbx
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xa5b66
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0xe28f1
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe290d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a890
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rbx, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
movq %rax, 0x40(%rsp)
movzbl 0x50(%rsp), %ecx
testl %ecx, %ecx
je 0xe29a2
cmpl $0x2, %ecx
je 0xe2977
cmpl $0x1, %ecx
jne 0xe29ad
movq 0x58(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq %rbx, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x10(%rsp)
jmp 0xe29c9
movq %r13, %rdi
movq %r14, %rsi
callq 0x1a490
jmp 0xe2b77
movq 0x58(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq %rbx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rax, 0x20(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x18(%rsp)
jmp 0xe29c9
movq $0x1, 0x40(%rsp)
jmp 0xe29b6
movq $0x0, 0x40(%rsp)
movq %rbx, 0x8(%rsp)
movups %xmm0, 0x10(%rsp)
movq $0x1, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8db6c
testb %al, %al
jne 0xe2b6d
movq 0x48(%rsp), %rax
leaq 0x40(%rax), %r14
leaq 0x28(%rsp), %r13
leaq 0x60(%rsp), %r12
leaq 0xc0(%rsp), %r15
movq %r13, %rdi
callq 0x8d800
movq %rax, %rbx
movq %rax, %rdi
leaq 0xe078(%rip), %rsi # 0xf0a88
callq 0xa6454
movq %rax, %rbp
movq %rbx, %rdi
leaq 0xe602(%rip), %rsi # 0xf1024
callq 0xa6454
movq %r12, %rdi
movq %rax, %rsi
callq 0x883f8
cmpb $0x3, (%rbp)
jne 0xe2a4a
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
callq 0x883f8
jmp 0xe2a6a
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x806ee
movq %rbx, %rdi
leaq 0xd0be(%rip), %rsi # 0xefb32
callq 0xa63f2
testb %al, %al
je 0xe2a99
movq %rbx, %rdi
leaq 0xd0ab(%rip), %rsi # 0xefb32
callq 0xa6454
movq %r15, %rdi
movq %rax, %rsi
callq 0x5e5cc
jmp 0xe2aa8
movq %r15, %rdi
leaq 0x934f(%rip), %rsi # 0xebdf2
callq 0xb91ee
leaq 0xa0(%rsp), %rdi
movq %r15, %rsi
callq 0x883f8
movq %r14, %rdi
movq %r12, %rsi
callq 0xe54fe
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0xe2ae8
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1a890
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xe2b0d
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x1a890
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe2b29
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %r15, %rdi
callq 0x5ea98
movq 0x28(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0xe2b4b
cmpl $0x1, %eax
jne 0xe2b53
addq $0x30, 0x30(%rsp)
jmp 0xe2b58
addq $0x10, 0x38(%rsp)
jmp 0xe2b58
incq 0x40(%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
callq 0x8db6c
testb %al, %al
je 0xe29fb
leaq 0x50(%rsp), %rdi
callq 0x5ea98
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe2be5
jmp 0xe2bd9
jmp 0xe2c66
movq %rax, %r14
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0xe2bb4
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe2c73
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xe2c73
movq %rax, %rdi
callq 0x2160f
jmp 0xe2be5
jmp 0xe2be5
movq %rax, %r14
jmp 0xe2c73
movq %rax, %r14
jmp 0xe2c48
movq %rax, %r14
leaq 0xc0(%rsp), %rdi
callq 0x5ea98
jmp 0xe2c23
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0xe541e
leaq 0xc0(%rsp), %rdi
callq 0x5ea98
jmp 0xe2c69
movq %rax, %r14
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xe2c48
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x1a890
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xe2c69
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xe2c69
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x5ea98
movq 0x48(%rsp), %rdi
callq 0x7f84e
movq %r14, %rdi
callq 0x1af20
| _ZL35parse_prefixed_json_tool_call_arrayRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_m:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov rbx, rcx
mov r12, rdx
mov r14, rsi
mov rbp, rdi
mov rsi, [rdx]
mov rcx, [rdx+8]
xor r13d, r13d
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
mov r15, rax
lea rax, [rbp+10h]
mov [rbp+0], rax
mov [rbp+8], r13
mov [rbp+10h], r13b
lea rax, [rbp+30h]
mov [rbp+20h], rax
mov [rbp+28h], r13
mov [rbp+30h], r13b
xorps xmm0, xmm0
movups xmmword ptr [rbp+40h], xmm0
mov [rbp+50h], r13
lea rax, [rbp+68h]
mov [rbp+58h], rax
mov [rbp+60h], r13
mov [rbp+68h], r13b
lea rcx, aYouAreAHelpful+12h; "assistant"
mov r8d, 9
mov rdi, rbp
xor esi, esi
xor edx, edx
mov [rsp+128h+var_E0], rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
lea r13, [rbp+20h]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz loc_E2967
mov r12, [r12+8]
lea rdi, [rsp+128h+var_C8]
mov rsi, r14
xor edx, edx
mov rcx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
sub r15, rbx
add r15, r12
lea rbx, [rsp+128h+var_C8]
mov rdi, r13
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rbx]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_E288F
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E288F:
lea rdi, [rsp+128h+var_C8]
mov rsi, r14
mov rdx, r15
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
xorps xmm0, xmm0
lea rdx, [rsp+128h+var_58]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea rbx, [rsp+128h+var_D8]
lea rsi, [rsp+128h+var_C8]
mov rdi, rbx
mov ecx, 1
xor r8d, r8d
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string>(std::string &&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
mov rax, [rsp+128h+var_48]
test rax, rax
jz short loc_E28F1
lea rdi, [rsp+128h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_E28F1:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_E290D
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E290D:
mov rax, 8000000000000000h
mov [rsp+128h+var_100], rbx
xorps xmm0, xmm0
movups [rsp+128h+var_F8], xmm0
mov [rsp+128h+var_E8], rax
movzx ecx, [rsp+128h+var_D8]
test ecx, ecx
jz short loc_E29A2
cmp ecx, 2
jz short loc_E2977
cmp ecx, 1
jnz short loc_E29AD
mov rcx, [rsp+128h+var_D0]
mov rdx, [rcx]
mov qword ptr [rsp+128h+var_F8], rdx
mov [rsp+128h+var_120], rbx
mov qword ptr [rsp+128h+var_118+8], 0
mov [rsp+128h+var_108], rax
mov rax, [rcx+8]
mov qword ptr [rsp+128h+var_118], rax
jmp short loc_E29C9
loc_E2967:
mov rdi, r13
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp loc_E2B77
loc_E2977:
mov rcx, [rsp+128h+var_D0]
mov rdx, [rcx]
mov qword ptr [rsp+128h+var_F8+8], rdx
mov [rsp+128h+var_120], rbx
mov qword ptr [rsp+128h+var_118], 0
mov [rsp+128h+var_108], rax
mov rax, [rcx+8]
mov qword ptr [rsp+128h+var_118+8], rax
jmp short loc_E29C9
loc_E29A2:
mov [rsp+128h+var_E8], 1
jmp short loc_E29B6
loc_E29AD:
mov [rsp+128h+var_E8], 0
loc_E29B6:
mov [rsp+128h+var_120], rbx
movups [rsp+128h+var_118], xmm0
mov [rsp+128h+var_108], 1
loc_E29C9:
lea rdi, [rsp+128h+var_100]
lea rsi, [rsp+128h+var_120]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_E2B6D
mov rax, [rsp+128h+var_E0]
lea r14, [rax+40h]
lea r13, [rsp+128h+var_100]
lea r12, [rsp+128h+var_C8]
lea r15, [rsp+128h+var_68]
loc_E29FB:
mov rdi, r13
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; 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> const>::operator*(void)
mov rbx, rax
mov rdi, rax
lea rsi, aKeywordArgumen+9; "arguments"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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[]<char const>(char const *)
mov rbp, rax
mov rdi, rbx
lea rsi, aNamespacedSetO+2Fh; "name"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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[]<char const>(char const *)
mov rdi, r12
mov rsi, rax
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
cmp byte ptr [rbp+0], 3
jnz short loc_E2A4A
lea rdi, [rsp+128h+var_A8]
mov rsi, rbp
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_E2A6A
loc_E2A4A:
lea rdi, [rsp+128h+var_A8]
mov rsi, rbp
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
loc_E2A6A:
mov rdi, rbx
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_E2A99
mov rdi, rbx
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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[]<char const>(char const *)
mov rdi, r15
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_E2AA8
loc_E2A99:
mov rdi, r15
lea rsi, aErrorWhileHand_0+34h; ""
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
loc_E2AA8:
lea rdi, [rsp+128h+var_88]
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorI16common_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_tool_call>::emplace_back<common_tool_call>(common_tool_call &&)
mov rdi, [rsp+128h+var_88]; void *
lea rax, [rsp+128h+var_78]
cmp rdi, rax
jz short loc_E2AE8
mov rsi, [rsp+128h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2AE8:
mov rdi, [rsp+128h+var_A8]; void *
lea rax, [rsp+128h+var_98]
cmp rdi, rax
jz short loc_E2B0D
mov rsi, [rsp+128h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2B0D:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_E2B29
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2B29:
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, [rsp+128h+var_100]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_E2B4B
cmp eax, 1
jnz short loc_E2B53
add qword ptr [rsp+128h+var_F8], 30h ; '0'
jmp short loc_E2B58
loc_E2B4B:
add qword ptr [rsp+128h+var_F8+8], 10h
jmp short loc_E2B58
loc_E2B53:
inc [rsp+128h+var_E8]
loc_E2B58:
mov rdi, r13
lea rsi, [rsp+128h+var_120]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_E29FB
loc_E2B6D:
lea rdi, [rsp+128h+var_D8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_E2B77:
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_E2BE5
jmp short loc_E2BD9
jmp loc_E2C66
mov r14, rax
mov rax, [rsp+128h+var_48]
test rax, rax
jz short loc_E2BB4
lea rdi, [rsp+128h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_E2BB4:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz loc_E2C73
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_E2C73
loc_E2BD9:
mov rdi, rax
call __clang_call_terminate
jmp short loc_E2BE5
jmp short $+2
loc_E2BE5:
mov r14, rax
jmp loc_E2C73
mov r14, rax
jmp short loc_E2C48
mov r14, rax
lea rdi, [rsp+128h+var_68]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_E2C23
mov r14, rax
lea rdi, [rsp+128h+var_C8]; this
call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call()
lea rdi, [rsp+128h+var_68]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_E2C69
mov r14, rax
loc_E2C23:
mov rdi, [rsp+128h+var_A8]; void *
lea rax, [rsp+128h+var_98]
cmp rdi, rax
jz short loc_E2C48
mov rsi, [rsp+128h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2C48:
mov rdi, [rsp+128h+var_C8]; void *
lea rax, [rsp+128h+var_B8]
cmp rdi, rax
jz short loc_E2C69
mov rsi, [rsp+128h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E2C69
loc_E2C66:
mov r14, rax
loc_E2C69:
lea rdi, [rsp+128h+var_D8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_E2C73:
mov rdi, [rsp+128h+var_E0]; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
mov rdi, r14
call __Unwind_Resume
| long long parse_prefixed_json_tool_call_array(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long v6; // r15
long long v7; // rdx
long long v8; // rcx
long long v9; // r12
long long v10; // r15
char *v12; // r14
long long v13; // rbx
_BYTE *v14; // rbp
long long v15; // rax
unsigned __int8 *v16; // rax
int v17; // eax
_BYTE *v18; // [rsp+8h] [rbp-120h] BYREF
__int128 v19; // [rsp+10h] [rbp-118h]
long long v20; // [rsp+20h] [rbp-108h]
unsigned __int8 *v21; // [rsp+28h] [rbp-100h] BYREF
__int128 v22; // [rsp+30h] [rbp-F8h]
long long v23; // [rsp+40h] [rbp-E8h]
common_chat_msg *v24; // [rsp+48h] [rbp-E0h]
_BYTE v25[8]; // [rsp+50h] [rbp-D8h] BYREF
_QWORD *v26; // [rsp+58h] [rbp-D0h]
void *v27[2]; // [rsp+60h] [rbp-C8h] BYREF
_QWORD v28[2]; // [rsp+70h] [rbp-B8h] BYREF
void *v29[2]; // [rsp+80h] [rbp-A8h] BYREF
long long v30; // [rsp+90h] [rbp-98h] BYREF
void *v31; // [rsp+A0h] [rbp-88h] BYREF
long long v32; // [rsp+B0h] [rbp-78h] BYREF
unsigned __int8 v33[16]; // [rsp+C0h] [rbp-68h] BYREF
__int128 v34; // [rsp+D0h] [rbp-58h] BYREF
__int128 v35; // [rsp+E0h] [rbp-48h]
v6 = std::string::find(a2, *a3, 0LL, a3[1]);
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
*(_QWORD *)(a1 + 32) = a1 + 48;
*(_QWORD *)(a1 + 40) = 0LL;
*(_BYTE *)(a1 + 48) = 0;
*(_OWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
*(_QWORD *)(a1 + 88) = a1 + 104;
*(_QWORD *)(a1 + 96) = 0LL;
*(_BYTE *)(a1 + 104) = 0;
v24 = (common_chat_msg *)a1;
std::string::_M_replace(a1, 0LL, 0LL, "assistant", 9LL);
if ( v6 == -1 )
return std::string::_M_assign(a1 + 32, a2, v7, v8);
v9 = a3[1];
std::string::substr(v27, a2, 0LL, v6);
v10 = v9 + v6 - a4;
std::string::operator=(a1 + 32, v27);
if ( v27[0] != v28 )
operator delete(v27[0], v28[0] + 1LL);
std::string::substr(v27, a2, v10, -1LL);
v35 = 0LL;
v34 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string>(
(long long)v25,
(long long *)v27,
(long long)&v34,
1u,
0);
if ( (_QWORD)v35 )
((void ( *)(__int128 *, __int128 *, long long))v35)(&v34, &v34, 3LL);
if ( v27[0] != v28 )
operator delete(v27[0], v28[0] + 1LL);
v21 = v25;
v22 = 0LL;
v23 = 0x8000000000000000LL;
if ( !v25[0] )
{
v23 = 1LL;
LABEL_16:
v18 = v25;
v19 = 0LL;
v20 = 1LL;
goto LABEL_17;
}
if ( v25[0] == 2 )
{
*((_QWORD *)&v22 + 1) = *v26;
v18 = v25;
*(_QWORD *)&v19 = 0LL;
v20 = 0x8000000000000000LL;
*((_QWORD *)&v19 + 1) = v26[1];
goto LABEL_17;
}
if ( v25[0] != 1 )
{
v23 = 0LL;
goto LABEL_16;
}
*(_QWORD *)&v22 = *v26;
v18 = v25;
*((_QWORD *)&v19 + 1) = 0LL;
v20 = 0x8000000000000000LL;
*(_QWORD *)&v19 = v26[1];
LABEL_17:
if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v21,
&v18) )
{
v12 = (char *)v24 + 64;
do
{
v13 = 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> const>::operator*(&v21);
v14 = (_BYTE *)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[]<char const>(
v13,
(long long)"arguments");
v15 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v13,
(long long)"name");
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v27,
v15);
if ( *v14 == 3 )
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v29,
(long long)v14);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v29,
(long long)v14,
-1,
32,
0,
0);
if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
v13,
(long long)"id") )
{
v16 = (unsigned __int8 *)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[]<char const>(
v13,
(long long)"id");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v33,
v16);
}
else
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_((char *)v33);
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)&v31,
(long long)v33);
std::vector<common_tool_call>::emplace_back<common_tool_call>(v12, v27);
if ( v31 != &v32 )
operator delete(v31, v32 + 1);
if ( v29[0] != &v30 )
operator delete(v29[0], v30 + 1);
if ( v27[0] != v28 )
operator delete(v27[0], v28[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v33);
v17 = *v21;
if ( v17 == 2 )
{
*((_QWORD *)&v22 + 1) += 16LL;
}
else if ( v17 == 1 )
{
*(_QWORD *)&v22 = v22 + 48;
}
else
{
++v23;
}
}
while ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v21,
&v18) );
}
return 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(v25);
}
| parse_prefixed_json_tool_call_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV RBX,RCX
MOV R12,RDX
MOV R14,RSI
MOV RBP,RDI
MOV RSI,qword ptr [RDX]
MOV RCX,qword ptr [RDX + 0x8]
XOR R13D,R13D
MOV RDI,R14
XOR EDX,EDX
CALL 0x0011aed0
MOV R15,RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP],RAX
MOV qword ptr [RBP + 0x8],R13
MOV byte ptr [RBP + 0x10],R13B
LEA RAX,[RBP + 0x30]
MOV qword ptr [RBP + 0x20],RAX
MOV qword ptr [RBP + 0x28],R13
MOV byte ptr [RBP + 0x30],R13B
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + 0x40],XMM0
MOV qword ptr [RBP + 0x50],R13
LEA RAX,[RBP + 0x68]
MOV qword ptr [RBP + 0x58],RAX
MOV qword ptr [RBP + 0x60],R13
MOV byte ptr [RBP + 0x68],R13B
LAB_001e281c:
LEA RCX,[0x1ef6d3]
MOV R8D,0x9
MOV RDI,RBP
XOR ESI,ESI
XOR EDX,EDX
MOV qword ptr [RSP + 0x48],RBP
CALL 0x0011ad10
LEA R13,[RBP + 0x20]
CMP R15,-0x1
JZ 0x001e2967
MOV R12,qword ptr [R12 + 0x8]
LAB_001e284d:
LEA RDI,[RSP + 0x60]
MOV RSI,R14
XOR EDX,EDX
MOV RCX,R15
CALL 0x0011a8e0
SUB R15,RBX
ADD R15,R12
LEA RBX,[RSP + 0x60]
MOV RDI,R13
MOV RSI,RBX
CALL 0x0011aa50
MOV RDI,qword ptr [RBX]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x001e288f
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a890
LAB_001e288f:
LEA RDI,[RSP + 0x60]
MOV RSI,R14
MOV RDX,R15
MOV RCX,-0x1
CALL 0x0011a8e0
XORPS XMM0,XMM0
LEA RDX,[RSP + 0xd0]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LAB_001e28b8:
LEA RBX,[RSP + 0x50]
LEA RSI,[RSP + 0x60]
MOV RDI,RBX
MOV ECX,0x1
XOR R8D,R8D
CALL 0x001a5b66
MOV RAX,qword ptr [RSP + 0xe0]
TEST RAX,RAX
JZ 0x001e28f1
LAB_001e28df:
LEA RDI,[RSP + 0xd0]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001e28f1:
MOV RDI,qword ptr [RSP + 0x60]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x001e290d
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a890
LAB_001e290d:
MOV RAX,-0x8000000000000000
MOV qword ptr [RSP + 0x28],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x40],RAX
MOVZX ECX,byte ptr [RSP + 0x50]
TEST ECX,ECX
JZ 0x001e29a2
CMP ECX,0x2
JZ 0x001e2977
CMP ECX,0x1
JNZ 0x001e29ad
MOV RCX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001e29c9
LAB_001e2967:
MOV RDI,R13
MOV RSI,R14
CALL 0x0011a490
JMP 0x001e2b77
LAB_001e2977:
MOV RCX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001e29c9
LAB_001e29a2:
MOV qword ptr [RSP + 0x40],0x1
JMP 0x001e29b6
LAB_001e29ad:
MOV qword ptr [RSP + 0x40],0x0
LAB_001e29b6:
MOV qword ptr [RSP + 0x8],RBX
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x1
LAB_001e29c9:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x0018db6c
TEST AL,AL
JNZ 0x001e2b6d
MOV RAX,qword ptr [RSP + 0x48]
LEA R14,[RAX + 0x40]
LEA R13,[RSP + 0x28]
LEA R12,[RSP + 0x60]
LEA R15,[RSP + 0xc0]
LAB_001e29fb:
MOV RDI,R13
CALL 0x0018d800
MOV RBX,RAX
MOV RDI,RAX
LEA RSI,[0x1f0a88]
CALL 0x001a6454
MOV RBP,RAX
MOV RDI,RBX
LEA RSI,[0x1f1024]
CALL 0x001a6454
MOV RDI,R12
MOV RSI,RAX
CALL 0x001883f8
CMP byte ptr [RBP],0x3
JNZ 0x001e2a4a
LAB_001e2a38:
LEA RDI,[RSP + 0x80]
MOV RSI,RBP
CALL 0x001883f8
JMP 0x001e2a6a
LAB_001e2a4a:
LEA RDI,[RSP + 0x80]
MOV RSI,RBP
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001806ee
LAB_001e2a6a:
MOV RDI,RBX
LEA RSI,[0x1efb32]
CALL 0x001a63f2
TEST AL,AL
JZ 0x001e2a99
MOV RDI,RBX
LEA RSI,[0x1efb32]
CALL 0x001a6454
MOV RDI,R15
MOV RSI,RAX
CALL 0x0015e5cc
JMP 0x001e2aa8
LAB_001e2a99:
MOV RDI,R15
LEA RSI,[0x1ebdf2]
CALL 0x001b91ee
LAB_001e2aa8:
LEA RDI,[RSP + 0xa0]
MOV RSI,R15
CALL 0x001883f8
LAB_001e2ab8:
MOV RDI,R14
MOV RSI,R12
CALL 0x001e54fe
MOV RDI,qword ptr [RSP + 0xa0]
LEA RAX,[RSP + 0xb0]
CMP RDI,RAX
JZ 0x001e2ae8
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x0011a890
LAB_001e2ae8:
MOV RDI,qword ptr [RSP + 0x80]
LEA RAX,[RSP + 0x90]
CMP RDI,RAX
JZ 0x001e2b0d
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x0011a890
LAB_001e2b0d:
MOV RDI,qword ptr [RSP + 0x60]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x001e2b29
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a890
LAB_001e2b29:
MOV RDI,R15
CALL 0x0015ea98
MOV RAX,qword ptr [RSP + 0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001e2b4b
CMP EAX,0x1
JNZ 0x001e2b53
ADD qword ptr [RSP + 0x30],0x30
JMP 0x001e2b58
LAB_001e2b4b:
ADD qword ptr [RSP + 0x38],0x10
JMP 0x001e2b58
LAB_001e2b53:
INC qword ptr [RSP + 0x40]
LAB_001e2b58:
MOV RDI,R13
LEA RSI,[RSP + 0x8]
CALL 0x0018db6c
TEST AL,AL
JZ 0x001e29fb
LAB_001e2b6d:
LEA RDI,[RSP + 0x50]
CALL 0x0015ea98
LAB_001e2b77:
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* parse_prefixed_json_tool_call_array(std::__cxx11::string const&, std::__cxx11::string const&,
unsigned long) */
void parse_prefixed_json_tool_call_array(string *param_1,string *param_2,ulong param_3)
{
vector<common_tool_call,std::allocator<common_tool_call>> *this;
char cVar1;
long lVar2;
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 *pbVar3;
basic_json *pbVar4;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*local_120;
long local_118;
long lStack_110;
int8 local_108;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*local_100;
long local_f8;
long lStack_f0;
long local_e8;
string *local_e0;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_d8 [8];
long *local_d0;
long *local_c8 [2];
long local_b8 [2];
long *local_a8 [2];
long local_98 [2];
long *local_88 [2];
long local_78 [2];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_68 [16];
int8 local_58;
int8 uStack_50;
code *local_48;
int8 uStack_40;
lVar2 = std::__cxx11::string::find((char *)param_2,*(ulong *)param_3,0);
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
*(string **)(param_1 + 0x20) = param_1 + 0x30;
*(int8 *)(param_1 + 0x28) = 0;
param_1[0x30] = (string)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(string **)(param_1 + 0x58) = param_1 + 0x68;
*(int8 *)(param_1 + 0x60) = 0;
param_1[0x68] = (string)0x0;
local_e0 = param_1;
/* try { // try from 001e281c to 001e2839 has its CatchHandler @ 001e2be5 */
std::__cxx11::string::_M_replace((ulong)param_1,0,(char *)0x0,0x1ef6d3);
if (lVar2 == -1) {
/* try { // try from 001e2967 to 001e2971 has its CatchHandler @ 001e2b89 */
std::__cxx11::string::_M_assign(param_1 + 0x20);
return;
}
/* try { // try from 001e284d to 001e285e has its CatchHandler @ 001e2be3 */
std::__cxx11::string::substr((ulong)local_c8,(ulong)param_2);
std::__cxx11::string::operator=(param_1 + 0x20,(string *)local_c8);
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
/* try { // try from 001e288f to 001e28a5 has its CatchHandler @ 001e2be1 */
std::__cxx11::string::substr((ulong)local_c8,(ulong)param_2);
local_48 = (code *)0x0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
/* try { // try from 001e28b8 to 001e28d1 has its CatchHandler @ 001e2b92 */
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>
::parse<std::__cxx11::string>(local_d8,local_c8,&local_58,1,0);
if (local_48 != (code *)0x0) {
/* try { // try from 001e28df to 001e28f0 has its CatchHandler @ 001e2b8b */
(*local_48)(&local_58,&local_58,3);
}
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
local_f8 = 0;
lStack_f0 = 0;
local_e8 = -0x8000000000000000;
if (local_d8[0] ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
local_e8 = 1;
}
else {
if (local_d8[0] ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
lStack_f0 = *local_d0;
local_118 = 0;
local_108 = 0x8000000000000000;
lStack_110 = local_d0[1];
goto LAB_001e29c9;
}
if (local_d8[0] ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
local_f8 = *local_d0;
lStack_110 = 0;
local_108 = 0x8000000000000000;
local_118 = local_d0[1];
goto LAB_001e29c9;
}
local_e8 = 0;
}
local_118 = 0;
lStack_110 = 0;
local_108 = 1;
LAB_001e29c9:
/* try { // try from 001e29c9 to 001e29d7 has its CatchHandler @ 001e2b8d */
local_120 = local_d8;
local_100 = local_d8;
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(&local_100,&local_120);
if (cVar1 == '\0') {
this = (vector<common_tool_call,std::allocator<common_tool_call>> *)(local_e0 + 0x40);
do {
/* try { // try from 001e29fb to 001e2a31 has its CatchHandler @ 001e2c66 */
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>
*)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>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_100);
pbVar3 = 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[]<char_const>(this_00,"arguments");
pbVar4 = 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[]<char_const>(this_00,"name");
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
((common_tool_call *)local_c8,pbVar4);
if (*pbVar3 == (basic_json)0x3) {
/* try { // try from 001e2a38 to 001e2a69 has its CatchHandler @ 001e2bed */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_a8,pbVar3);
}
else {
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>
::dump(local_a8,pbVar3,0xffffffff,0x20,0,0);
}
/* try { // try from 001e2a6a to 001e2aa7 has its CatchHandler @ 001e2c20 */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this_00,"id");
if (cVar1 == '\0') {
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
(local_68,"");
}
else {
pbVar3 = 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[]<char_const>(this_00,"id");
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_68,pbVar3);
}
/* try { // try from 001e2aa8 to 001e2ab7 has its CatchHandler @ 001e2bf2 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_88,local_68);
/* try { // try from 001e2ab8 to 001e2ac2 has its CatchHandler @ 001e2c04 */
std::vector<common_tool_call,std::allocator<common_tool_call>>::emplace_back<common_tool_call>
(this,(common_tool_call *)local_c8);
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
if (local_a8[0] != local_98) {
operator_delete(local_a8[0],local_98[0] + 1);
}
if (local_c8[0] != local_b8) {
operator_delete(local_c8[0],local_b8[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_68);
if (*local_100 ==
(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) {
lStack_f0 = lStack_f0 + 0x10;
}
else if (*local_100 ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
local_f8 = local_f8 + 0x30;
}
else {
local_e8 = local_e8 + 1;
}
/* try { // try from 001e2b58 to 001e2b64 has its CatchHandler @ 001e2c66 */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((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>
*)&local_100,&local_120);
} while (cVar1 == '\0');
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_d8);
return;
}
| |
33,080 | chess::Bitboard chess::movegen::seenSquares<(chess::Color::underlying)1>(chess::Board const&, chess::Bitboard) | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] inline Bitboard movegen::seenSquares(const Board &board, Bitboard enemy_empty) {
auto king_sq = board.kingSq(~c);
Bitboard map_king_atk = attacks::king(king_sq) & enemy_empty;
if (map_king_atk == Bitboard(0ull) && !board.chess960()) {
return 0ull;
}
auto occ = board.occ() & ~Bitboard::fromSquare(king_sq);
auto queens = board.pieces(PieceType::QUEEN, c);
auto pawns = board.pieces(PieceType::PAWN, c);
auto knights = board.pieces(PieceType::KNIGHT, c);
auto bishops = board.pieces(PieceType::BISHOP, c) | queens;
auto rooks = board.pieces(PieceType::ROOK, c) | queens;
Bitboard seen = attacks::pawnLeftAttacks<c>(pawns) | attacks::pawnRightAttacks<c>(pawns);
while (knights) {
const auto index = knights.pop();
seen |= attacks::knight(index);
}
while (bishops) {
const auto index = bishops.pop();
seen |= attacks::bishop(index, occ);
}
while (rooks) {
const auto index = rooks.pop();
seen |= attacks::rook(index, occ);
}
const Square index = board.kingSq(c);
seen |= attacks::king(index);
return seen;
} | O0 | cpp | chess::Bitboard chess::movegen::seenSquares<(chess::Color::underlying)1>(chess::Board const&, chess::Bitboard):
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp # imm = 0x190
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x158(%rbp)
xorl %edi, %edi
callq 0xb6c0
leaq -0x1d(%rbp), %rdi
movsbl %al, %esi
callq 0x5e10
movq -0x158(%rbp), %rdi
movzbl -0x1d(%rbp), %esi
callq 0x8140
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %edi
callq 0x161b0
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x4b90
movq %rax, -0x28(%rbp)
leaq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4da0
leaq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xbab0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x14d(%rbp)
jne 0x16cd2
jmp 0x16ce3
movq -0x18(%rbp), %rdi
callq 0x12090
xorb $-0x1, %al
movb %al, -0x14d(%rbp)
movb -0x14d(%rbp), %al
testb $0x1, %al
jne 0x16cef
jmp 0x16d01
leaq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4da0
jmp 0x170c4
movq -0x18(%rbp), %rdi
callq 0xb7d0
movq %rax, -0x50(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %edi
callq 0x56f0
movq %rax, -0x60(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x4c10
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4b90
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x180(%rbp)
leaq -0x71(%rbp), %rdi
movl $0x4, %esi
callq 0xa0b0
leaq -0x72(%rbp), %rdi
xorl %esi, %esi
callq 0x5e10
movq -0x180(%rbp), %rdi
movb -0x71(%rbp), %al
movzbl %al, %esi
movzbl -0x72(%rbp), %edx
callq 0xa280
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x178(%rbp)
leaq -0x81(%rbp), %rdi
xorl %esi, %esi
callq 0xa0b0
leaq -0x82(%rbp), %rdi
xorl %esi, %esi
callq 0x5e10
movq -0x178(%rbp), %rdi
movb -0x81(%rbp), %al
movzbl %al, %esi
movzbl -0x82(%rbp), %edx
callq 0xa280
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq -0x91(%rbp), %rdi
movl $0x1, %esi
callq 0xa0b0
leaq -0x92(%rbp), %rdi
xorl %esi, %esi
callq 0x5e10
movq -0x170(%rbp), %rdi
movb -0x91(%rbp), %al
movzbl %al, %esi
movzbl -0x92(%rbp), %edx
callq 0xa280
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0xa9(%rbp), %rdi
movl $0x2, %esi
callq 0xa0b0
leaq -0xaa(%rbp), %rdi
xorl %esi, %esi
callq 0x5e10
movq -0x168(%rbp), %rdi
movb -0xa9(%rbp), %al
movzbl %al, %esi
movzbl -0xaa(%rbp), %edx
callq 0xa280
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4b50
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0xc1(%rbp), %rdi
movl $0x3, %esi
callq 0xa0b0
leaq -0xc2(%rbp), %rdi
xorl %esi, %esi
callq 0x5e10
movq -0x160(%rbp), %rdi
movb -0xc1(%rbp), %al
movzbl %al, %esi
movzbl -0xc2(%rbp), %edx
callq 0xa280
movq %rax, -0xc0(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4b50
movq %rax, -0xb8(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x18c20
movq %rax, -0xd0(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rdi
callq 0x18cb0
movq %rax, -0xe0(%rbp)
leaq -0xd0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x4b50
movq %rax, -0x8(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xb730
testb $0x1, %al
jne 0x16f3d
jmp 0x16f86
leaq -0x90(%rbp), %rdi
callq 0xb9a0
movb %al, -0xe9(%rbp)
movzbl -0xe9(%rbp), %esi
leaq -0xfc(%rbp), %rdi
callq 0x43a0
movl -0xfc(%rbp), %edi
callq 0xb700
movq %rax, -0xf8(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0xb7b0
jmp 0x16f2b
jmp 0x16f88
leaq -0xa0(%rbp), %rdi
callq 0xb730
testb $0x1, %al
jne 0x16f9a
jmp 0x16ff5
leaq -0xa0(%rbp), %rdi
callq 0xb9a0
movb %al, -0xfd(%rbp)
movzbl -0xfd(%rbp), %esi
leaq -0x10c(%rbp), %rdi
callq 0x43a0
movq -0x48(%rbp), %rax
movq %rax, -0x118(%rbp)
movl -0x10c(%rbp), %edi
movq -0x118(%rbp), %rsi
callq 0x5980
movq %rax, -0x108(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0xb7b0
jmp 0x16f88
jmp 0x16ff7
leaq -0xb8(%rbp), %rdi
callq 0xb730
testb $0x1, %al
jne 0x17009
jmp 0x17064
leaq -0xb8(%rbp), %rdi
callq 0xb9a0
movb %al, -0x119(%rbp)
movzbl -0x119(%rbp), %esi
leaq -0x12c(%rbp), %rdi
callq 0x43a0
movq -0x48(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x12c(%rbp), %edi
movq -0x138(%rbp), %rsi
callq 0x5860
movq %rax, -0x128(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0xb7b0
jmp 0x16ff7
movq -0x18(%rbp), %rax
movq %rax, -0x188(%rbp)
leaq -0x13d(%rbp), %rdi
xorl %esi, %esi
callq 0x5e10
movq -0x188(%rbp), %rdi
movzbl -0x13d(%rbp), %esi
callq 0x8140
movl %eax, -0x13c(%rbp)
movl -0x13c(%rbp), %eax
movl %eax, -0x14c(%rbp)
movl -0x14c(%rbp), %edi
callq 0x161b0
movq %rax, -0x148(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0xb7b0
movq -0x8(%rbp), %rax
addq $0x190, %rsp # imm = 0x190
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN5chess7movegen11seenSquaresILNS_5Color10underlyingE0EEENS_8BitboardERKNS_5BoardES4_:
push rbp
mov rbp, rsp
sub rsp, 190h
mov [rbp+var_10], rsi
mov [rbp+var_18], rdi
mov rax, [rbp+var_18]
mov [rbp+var_158], rax
xor edi, edi
call _ZN5chesscoENS_5Color10underlyingE; chess::operator~(chess::Color::underlying)
lea rdi, [rbp+var_1D]
movsx esi, al
call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying)
mov rdi, [rbp+var_158]
movzx esi, [rbp+var_1D]
call _ZNK5chess5Board6kingSqENS_5ColorE; chess::Board::kingSq(chess::Color)
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
mov edi, [rbp+var_34]
call _ZN5chess7attacks4kingENS_6SquareE; chess::attacks::king(chess::Square)
mov [rbp+var_30], rax
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_10]
call _ZNK5chess8BitboardanERKS0_; chess::Bitboard::operator&(chess::Bitboard const&)
mov [rbp+var_28], rax
lea rdi, [rbp+var_40]; this
xor eax, eax
mov esi, eax; unsigned __int64
call _ZN5chess8BitboardC2Em; chess::Bitboard::Bitboard(ulong)
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_40]
call _ZNK5chess8BitboardeqERKS0_; chess::Bitboard::operator==(chess::Bitboard const&)
mov cl, al
xor eax, eax
test cl, 1
mov [rbp+var_14D], al
jnz short loc_16CD2
jmp short loc_16CE3
loc_16CD2:
mov rdi, [rbp+var_18]; this
call _ZNK5chess5Board8chess960Ev; chess::Board::chess960(void)
xor al, 0FFh
mov [rbp+var_14D], al
loc_16CE3:
mov al, [rbp+var_14D]
test al, 1
jnz short loc_16CEF
jmp short loc_16D01
loc_16CEF:
lea rdi, [rbp+var_8]; this
xor eax, eax
mov esi, eax; unsigned __int64
call _ZN5chess8BitboardC2Em; chess::Bitboard::Bitboard(ulong)
jmp loc_170C4
loc_16D01:
mov rdi, [rbp+var_18]; this
call _ZNK5chess5Board3occEv; chess::Board::occ(void)
mov [rbp+var_50], rax
mov eax, [rbp+var_1C]
mov [rbp+var_64], eax
mov edi, [rbp+var_64]
call _ZN5chess8Bitboard10fromSquareENS_6SquareE; chess::Bitboard::fromSquare(chess::Square)
mov [rbp+var_60], rax
lea rdi, [rbp+var_60]
call _ZNK5chess8BitboardcoEv; chess::Bitboard::operator~(void)
mov [rbp+var_58], rax
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_58]
call _ZNK5chess8BitboardanERKS0_; chess::Bitboard::operator&(chess::Bitboard const&)
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov [rbp+var_180], rax
lea rdi, [rbp+var_71]
mov esi, 4
call _ZN5chess9PieceTypeC2ENS0_10underlyingE; chess::PieceType::PieceType(chess::PieceType::underlying)
lea rdi, [rbp+var_72]
xor esi, esi
call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying)
mov rdi, [rbp+var_180]
mov al, [rbp+var_71]
movzx esi, al
movzx edx, [rbp+var_72]
call _ZNK5chess5Board6piecesENS_9PieceTypeENS_5ColorE; chess::Board::pieces(chess::PieceType,chess::Color)
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
mov [rbp+var_178], rax
lea rdi, [rbp+var_81]
xor esi, esi
call _ZN5chess9PieceTypeC2ENS0_10underlyingE; chess::PieceType::PieceType(chess::PieceType::underlying)
lea rdi, [rbp+var_82]
xor esi, esi
call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying)
mov rdi, [rbp+var_178]
mov al, [rbp+var_81]
movzx esi, al
movzx edx, [rbp+var_82]
call _ZNK5chess5Board6piecesENS_9PieceTypeENS_5ColorE; chess::Board::pieces(chess::PieceType,chess::Color)
mov [rbp+var_80], rax
mov rax, [rbp+var_18]
mov [rbp+var_170], rax
lea rdi, [rbp+var_91]
mov esi, 1
call _ZN5chess9PieceTypeC2ENS0_10underlyingE; chess::PieceType::PieceType(chess::PieceType::underlying)
lea rdi, [rbp+var_92]
xor esi, esi
call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying)
mov rdi, [rbp+var_170]
mov al, [rbp+var_91]
movzx esi, al
movzx edx, [rbp+var_92]
call _ZNK5chess5Board6piecesENS_9PieceTypeENS_5ColorE; chess::Board::pieces(chess::PieceType,chess::Color)
mov [rbp+var_90], rax
mov rax, [rbp+var_18]
mov [rbp+var_168], rax
lea rdi, [rbp+var_A9]
mov esi, 2
call _ZN5chess9PieceTypeC2ENS0_10underlyingE; chess::PieceType::PieceType(chess::PieceType::underlying)
lea rdi, [rbp+var_AA]
xor esi, esi
call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying)
mov rdi, [rbp+var_168]
mov al, [rbp+var_A9]
movzx esi, al
movzx edx, [rbp+var_AA]
call _ZNK5chess5Board6piecesENS_9PieceTypeENS_5ColorE; chess::Board::pieces(chess::PieceType,chess::Color)
mov [rbp+var_A8], rax
lea rdi, [rbp+var_A8]
lea rsi, [rbp+var_70]
call _ZNK5chess8BitboardorERKS0_; chess::Bitboard::operator|(chess::Bitboard const&)
mov [rbp+var_A0], rax
mov rax, [rbp+var_18]
mov [rbp+var_160], rax
lea rdi, [rbp+var_C1]
mov esi, 3
call _ZN5chess9PieceTypeC2ENS0_10underlyingE; chess::PieceType::PieceType(chess::PieceType::underlying)
lea rdi, [rbp+var_C2]
xor esi, esi
call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying)
mov rdi, [rbp+var_160]
mov al, [rbp+var_C1]
movzx esi, al
movzx edx, [rbp+var_C2]
call _ZNK5chess5Board6piecesENS_9PieceTypeENS_5ColorE; chess::Board::pieces(chess::PieceType,chess::Color)
mov [rbp+var_C0], rax
lea rdi, [rbp+var_C0]
lea rsi, [rbp+var_70]
call _ZNK5chess8BitboardorERKS0_; chess::Bitboard::operator|(chess::Bitboard const&)
mov [rbp+var_B8], rax
mov rax, [rbp+var_80]
mov [rbp+var_D8], rax
mov rdi, [rbp+var_D8]
call _ZN5chess7attacks15pawnLeftAttacksILNS_5Color10underlyingE0EEENS_8BitboardES4_; chess::attacks::pawnLeftAttacks<(chess::Color::underlying)0>(chess::Bitboard)
mov [rbp+var_D0], rax
mov rax, [rbp+var_80]
mov [rbp+var_E8], rax
mov rdi, [rbp+var_E8]
call _ZN5chess7attacks16pawnRightAttacksILNS_5Color10underlyingE0EEENS_8BitboardES4_; chess::attacks::pawnRightAttacks<(chess::Color::underlying)0>(chess::Bitboard)
mov [rbp+var_E0], rax
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_E0]
call _ZNK5chess8BitboardorERKS0_; chess::Bitboard::operator|(chess::Bitboard const&)
mov [rbp+var_8], rax
loc_16F2B:
lea rdi, [rbp+var_90]
call _ZNK5chess8BitboardcvbEv; chess::Bitboard::operator bool(void)
test al, 1
jnz short loc_16F3D
jmp short loc_16F86
loc_16F3D:
lea rdi, [rbp+var_90]; this
call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void)
mov [rbp+var_E9], al
movzx esi, [rbp+var_E9]; int
lea rdi, [rbp+var_FC]; this
call _ZN5chess6SquareC2Ei; chess::Square::Square(int)
mov edi, [rbp+var_FC]
call _ZN5chess7attacks6knightENS_6SquareE; chess::attacks::knight(chess::Square)
mov [rbp+var_F8], rax
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_F8]
call _ZN5chess8BitboardoRERKS0_; chess::Bitboard::operator|=(chess::Bitboard const&)
jmp short loc_16F2B
loc_16F86:
jmp short $+2
loc_16F88:
lea rdi, [rbp+var_A0]
call _ZNK5chess8BitboardcvbEv; chess::Bitboard::operator bool(void)
test al, 1
jnz short loc_16F9A
jmp short loc_16FF5
loc_16F9A:
lea rdi, [rbp+var_A0]; this
call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void)
mov [rbp+var_FD], al
movzx esi, [rbp+var_FD]; int
lea rdi, [rbp+var_10C]; this
call _ZN5chess6SquareC2Ei; chess::Square::Square(int)
mov rax, [rbp+var_48]
mov [rbp+var_118], rax
mov edi, [rbp+var_10C]
mov rsi, [rbp+var_118]
call _ZN5chess7attacks6bishopENS_6SquareENS_8BitboardE; chess::attacks::bishop(chess::Square,chess::Bitboard)
mov [rbp+var_108], rax
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_108]
call _ZN5chess8BitboardoRERKS0_; chess::Bitboard::operator|=(chess::Bitboard const&)
jmp short loc_16F88
loc_16FF5:
jmp short $+2
loc_16FF7:
lea rdi, [rbp+var_B8]
call _ZNK5chess8BitboardcvbEv; chess::Bitboard::operator bool(void)
test al, 1
jnz short loc_17009
jmp short loc_17064
loc_17009:
lea rdi, [rbp+var_B8]; this
call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void)
mov [rbp+var_119], al
movzx esi, [rbp+var_119]; int
lea rdi, [rbp+var_12C]; this
call _ZN5chess6SquareC2Ei; chess::Square::Square(int)
mov rax, [rbp+var_48]
mov [rbp+var_138], rax
mov edi, [rbp+var_12C]
mov rsi, [rbp+var_138]
call _ZN5chess7attacks4rookENS_6SquareENS_8BitboardE; chess::attacks::rook(chess::Square,chess::Bitboard)
mov [rbp+var_128], rax
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_128]
call _ZN5chess8BitboardoRERKS0_; chess::Bitboard::operator|=(chess::Bitboard const&)
jmp short loc_16FF7
loc_17064:
mov rax, [rbp+var_18]
mov [rbp+var_188], rax
lea rdi, [rbp+var_13D]
xor esi, esi
call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying)
mov rdi, [rbp+var_188]
movzx esi, [rbp+var_13D]
call _ZNK5chess5Board6kingSqENS_5ColorE; chess::Board::kingSq(chess::Color)
mov [rbp+var_13C], eax
mov eax, [rbp+var_13C]
mov [rbp+var_14C], eax
mov edi, [rbp+var_14C]
call _ZN5chess7attacks4kingENS_6SquareE; chess::attacks::king(chess::Square)
mov [rbp+var_148], rax
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_148]
call _ZN5chess8BitboardoRERKS0_; chess::Bitboard::operator|=(chess::Bitboard const&)
loc_170C4:
mov rax, [rbp+var_8]
add rsp, 190h
pop rbp
retn
| long long chess::movegen::seenSquares<(chess::Color::underlying)0>(chess::Board *a1, long long a2)
{
char v2; // al
chess::Board *v4; // [rsp+8h] [rbp-188h]
chess::Board *v5; // [rsp+10h] [rbp-180h]
chess::Board *v6; // [rsp+18h] [rbp-178h]
chess::Board *v7; // [rsp+20h] [rbp-170h]
chess::Board *v8; // [rsp+28h] [rbp-168h]
chess::Board *v9; // [rsp+30h] [rbp-160h]
char v10; // [rsp+43h] [rbp-14Dh]
long long v11; // [rsp+48h] [rbp-148h] BYREF
unsigned __int8 v12; // [rsp+53h] [rbp-13Dh] BYREF
int v13; // [rsp+54h] [rbp-13Ch]
long long v14; // [rsp+58h] [rbp-138h]
int v15; // [rsp+64h] [rbp-12Ch] BYREF
long long v16; // [rsp+68h] [rbp-128h] BYREF
unsigned __int8 v17; // [rsp+77h] [rbp-119h]
long long v18; // [rsp+78h] [rbp-118h]
int v19; // [rsp+84h] [rbp-10Ch] BYREF
long long v20; // [rsp+88h] [rbp-108h] BYREF
unsigned __int8 v21; // [rsp+93h] [rbp-FDh]
int v22; // [rsp+94h] [rbp-FCh] BYREF
long long v23; // [rsp+98h] [rbp-F8h] BYREF
unsigned __int8 v24; // [rsp+A7h] [rbp-E9h]
long long v25; // [rsp+A8h] [rbp-E8h]
_QWORD v26[2]; // [rsp+B0h] [rbp-E0h] BYREF
long long v27; // [rsp+C0h] [rbp-D0h] BYREF
char v28; // [rsp+CEh] [rbp-C2h] BYREF
unsigned __int8 v29; // [rsp+CFh] [rbp-C1h] BYREF
long long v30; // [rsp+D0h] [rbp-C0h] BYREF
long long v31; // [rsp+D8h] [rbp-B8h] BYREF
char v32; // [rsp+E6h] [rbp-AAh] BYREF
unsigned __int8 v33; // [rsp+E7h] [rbp-A9h] BYREF
long long v34; // [rsp+E8h] [rbp-A8h] BYREF
long long v35; // [rsp+F0h] [rbp-A0h] BYREF
char v36; // [rsp+FEh] [rbp-92h] BYREF
unsigned __int8 v37; // [rsp+FFh] [rbp-91h] BYREF
long long v38; // [rsp+100h] [rbp-90h] BYREF
char v39; // [rsp+10Eh] [rbp-82h] BYREF
unsigned __int8 v40; // [rsp+10Fh] [rbp-81h] BYREF
long long v41; // [rsp+110h] [rbp-80h]
char v42; // [rsp+11Eh] [rbp-72h] BYREF
unsigned __int8 v43; // [rsp+11Fh] [rbp-71h] BYREF
long long v44; // [rsp+120h] [rbp-70h] BYREF
int v45; // [rsp+12Ch] [rbp-64h]
long long v46; // [rsp+130h] [rbp-60h] BYREF
long long v47; // [rsp+138h] [rbp-58h] BYREF
long long v48; // [rsp+140h] [rbp-50h] BYREF
long long v49; // [rsp+148h] [rbp-48h]
long long v50; // [rsp+150h] [rbp-40h] BYREF
int v51; // [rsp+15Ch] [rbp-34h]
long long v52; // [rsp+160h] [rbp-30h] BYREF
long long v53; // [rsp+168h] [rbp-28h] BYREF
unsigned __int8 v54; // [rsp+173h] [rbp-1Dh] BYREF
int v55; // [rsp+174h] [rbp-1Ch]
chess::Board *v56; // [rsp+178h] [rbp-18h]
long long v57; // [rsp+180h] [rbp-10h] BYREF
long long v58; // [rsp+188h] [rbp-8h] BYREF
v57 = a2;
v56 = a1;
v2 = chess::operator~(0);
chess::Color::Color(&v54, v2);
v55 = chess::Board::kingSq((long long)a1, v54);
v51 = v55;
v52 = chess::attacks::king(v55);
v53 = chess::Bitboard::operator&(&v52, &v57);
chess::Bitboard::Bitboard((chess::Bitboard *)&v50, 0LL);
v10 = 0;
if ( chess::Bitboard::operator==(&v53, &v50) )
v10 = ~chess::Board::chess960(v56);
if ( (v10 & 1) != 0 )
{
chess::Bitboard::Bitboard((chess::Bitboard *)&v58, 0LL);
}
else
{
v48 = chess::Board::occ(v56);
v45 = v55;
v46 = chess::Bitboard::fromSquare(v55);
v47 = chess::Bitboard::operator~(&v46);
v49 = chess::Bitboard::operator&(&v48, &v47);
v5 = v56;
chess::PieceType::PieceType(&v43, 4);
chess::Color::Color(&v42, 0);
v44 = chess::Board::pieces((long long)v5, v43, v42);
v6 = v56;
chess::PieceType::PieceType(&v40, 0);
chess::Color::Color(&v39, 0);
v41 = chess::Board::pieces((long long)v6, v40, v39);
v7 = v56;
chess::PieceType::PieceType(&v37, 1);
chess::Color::Color(&v36, 0);
v38 = chess::Board::pieces((long long)v7, v37, v36);
v8 = v56;
chess::PieceType::PieceType(&v33, 2);
chess::Color::Color(&v32, 0);
v34 = chess::Board::pieces((long long)v8, v33, v32);
v35 = chess::Bitboard::operator|(&v34, &v44);
v9 = v56;
chess::PieceType::PieceType(&v29, 3);
chess::Color::Color(&v28, 0);
v30 = chess::Board::pieces((long long)v9, v29, v28);
v31 = chess::Bitboard::operator|(&v30, &v44);
v26[1] = v41;
v27 = chess::attacks::pawnLeftAttacks<(chess::Color::underlying)0>(v41);
v25 = v41;
v26[0] = chess::attacks::pawnRightAttacks<(chess::Color::underlying)0>(v41);
v58 = chess::Bitboard::operator|(&v27, v26);
while ( chess::Bitboard::operator bool(&v38) )
{
v24 = chess::Bitboard::pop((chess::Bitboard *)&v38);
chess::Square::Square((chess::Square *)&v22, v24);
v23 = chess::attacks::knight(v22);
chess::Bitboard::operator|=(&v58, &v23);
}
while ( chess::Bitboard::operator bool(&v35) )
{
v21 = chess::Bitboard::pop((chess::Bitboard *)&v35);
chess::Square::Square((chess::Square *)&v19, v21);
v18 = v49;
v20 = chess::attacks::bishop(v19, v49);
chess::Bitboard::operator|=(&v58, &v20);
}
while ( chess::Bitboard::operator bool(&v31) )
{
v17 = chess::Bitboard::pop((chess::Bitboard *)&v31);
chess::Square::Square((chess::Square *)&v15, v17);
v14 = v49;
v16 = chess::attacks::rook(v15, v49);
chess::Bitboard::operator|=(&v58, &v16);
}
v4 = v56;
chess::Color::Color(&v12, 0);
v13 = chess::Board::kingSq((long long)v4, v12);
v11 = chess::attacks::king(v13);
chess::Bitboard::operator|=(&v58, &v11);
}
return v58;
}
| seenSquares<(chess::Color::underlying)0>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x190
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x158],RAX
XOR EDI,EDI
CALL 0x0010b6c0
LEA RDI,[RBP + -0x1d]
MOVSX ESI,AL
CALL 0x00105e10
MOV RDI,qword ptr [RBP + -0x158]
MOVZX ESI,byte ptr [RBP + -0x1d]
CALL 0x00108140
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
MOV EDI,dword ptr [RBP + -0x34]
CALL 0x001161b0
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x10]
CALL 0x00104b90
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[RBP + -0x40]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00104da0
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x40]
CALL 0x0010bab0
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RBP + -0x14d],AL
JNZ 0x00116cd2
JMP 0x00116ce3
LAB_00116cd2:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00112090
XOR AL,0xff
MOV byte ptr [RBP + -0x14d],AL
LAB_00116ce3:
MOV AL,byte ptr [RBP + -0x14d]
TEST AL,0x1
JNZ 0x00116cef
JMP 0x00116d01
LAB_00116cef:
LEA RDI,[RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00104da0
JMP 0x001170c4
LAB_00116d01:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0010b7d0
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x64],EAX
MOV EDI,dword ptr [RBP + -0x64]
CALL 0x001056f0
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x60]
CALL 0x00104c10
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x58]
CALL 0x00104b90
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x180],RAX
LEA RDI,[RBP + -0x71]
MOV ESI,0x4
CALL 0x0010a0b0
LEA RDI,[RBP + -0x72]
XOR ESI,ESI
CALL 0x00105e10
MOV RDI,qword ptr [RBP + -0x180]
MOV AL,byte ptr [RBP + -0x71]
MOVZX ESI,AL
MOVZX EDX,byte ptr [RBP + -0x72]
CALL 0x0010a280
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x178],RAX
LEA RDI,[RBP + -0x81]
XOR ESI,ESI
CALL 0x0010a0b0
LEA RDI,[RBP + -0x82]
XOR ESI,ESI
CALL 0x00105e10
MOV RDI,qword ptr [RBP + -0x178]
MOV AL,byte ptr [RBP + -0x81]
MOVZX ESI,AL
MOVZX EDX,byte ptr [RBP + -0x82]
CALL 0x0010a280
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x170],RAX
LEA RDI,[RBP + -0x91]
MOV ESI,0x1
CALL 0x0010a0b0
LEA RDI,[RBP + -0x92]
XOR ESI,ESI
CALL 0x00105e10
MOV RDI,qword ptr [RBP + -0x170]
MOV AL,byte ptr [RBP + -0x91]
MOVZX ESI,AL
MOVZX EDX,byte ptr [RBP + -0x92]
CALL 0x0010a280
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x168],RAX
LEA RDI,[RBP + -0xa9]
MOV ESI,0x2
CALL 0x0010a0b0
LEA RDI,[RBP + -0xaa]
XOR ESI,ESI
CALL 0x00105e10
MOV RDI,qword ptr [RBP + -0x168]
MOV AL,byte ptr [RBP + -0xa9]
MOVZX ESI,AL
MOVZX EDX,byte ptr [RBP + -0xaa]
CALL 0x0010a280
MOV qword ptr [RBP + -0xa8],RAX
LEA RDI,[RBP + -0xa8]
LEA RSI,[RBP + -0x70]
CALL 0x00104b50
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x160],RAX
LEA RDI,[RBP + -0xc1]
MOV ESI,0x3
CALL 0x0010a0b0
LEA RDI,[RBP + -0xc2]
XOR ESI,ESI
CALL 0x00105e10
MOV RDI,qword ptr [RBP + -0x160]
MOV AL,byte ptr [RBP + -0xc1]
MOVZX ESI,AL
MOVZX EDX,byte ptr [RBP + -0xc2]
CALL 0x0010a280
MOV qword ptr [RBP + -0xc0],RAX
LEA RDI,[RBP + -0xc0]
LEA RSI,[RBP + -0x70]
CALL 0x00104b50
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0xd8],RAX
MOV RDI,qword ptr [RBP + -0xd8]
CALL 0x00118c20
MOV qword ptr [RBP + -0xd0],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0xe8],RAX
MOV RDI,qword ptr [RBP + -0xe8]
CALL 0x00118cb0
MOV qword ptr [RBP + -0xe0],RAX
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0xe0]
CALL 0x00104b50
MOV qword ptr [RBP + -0x8],RAX
LAB_00116f2b:
LEA RDI,[RBP + -0x90]
CALL 0x0010b730
TEST AL,0x1
JNZ 0x00116f3d
JMP 0x00116f86
LAB_00116f3d:
LEA RDI,[RBP + -0x90]
CALL 0x0010b9a0
MOV byte ptr [RBP + -0xe9],AL
MOVZX ESI,byte ptr [RBP + -0xe9]
LEA RDI,[RBP + -0xfc]
CALL 0x001043a0
MOV EDI,dword ptr [RBP + -0xfc]
CALL 0x0010b700
MOV qword ptr [RBP + -0xf8],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0xf8]
CALL 0x0010b7b0
JMP 0x00116f2b
LAB_00116f86:
JMP 0x00116f88
LAB_00116f88:
LEA RDI,[RBP + -0xa0]
CALL 0x0010b730
TEST AL,0x1
JNZ 0x00116f9a
JMP 0x00116ff5
LAB_00116f9a:
LEA RDI,[RBP + -0xa0]
CALL 0x0010b9a0
MOV byte ptr [RBP + -0xfd],AL
MOVZX ESI,byte ptr [RBP + -0xfd]
LEA RDI,[RBP + -0x10c]
CALL 0x001043a0
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x118],RAX
MOV EDI,dword ptr [RBP + -0x10c]
MOV RSI,qword ptr [RBP + -0x118]
CALL 0x00105980
MOV qword ptr [RBP + -0x108],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0x108]
CALL 0x0010b7b0
JMP 0x00116f88
LAB_00116ff5:
JMP 0x00116ff7
LAB_00116ff7:
LEA RDI,[RBP + -0xb8]
CALL 0x0010b730
TEST AL,0x1
JNZ 0x00117009
JMP 0x00117064
LAB_00117009:
LEA RDI,[RBP + -0xb8]
CALL 0x0010b9a0
MOV byte ptr [RBP + -0x119],AL
MOVZX ESI,byte ptr [RBP + -0x119]
LEA RDI,[RBP + -0x12c]
CALL 0x001043a0
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x138],RAX
MOV EDI,dword ptr [RBP + -0x12c]
MOV RSI,qword ptr [RBP + -0x138]
CALL 0x00105860
MOV qword ptr [RBP + -0x128],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0x128]
CALL 0x0010b7b0
JMP 0x00116ff7
LAB_00117064:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x188],RAX
LEA RDI,[RBP + -0x13d]
XOR ESI,ESI
CALL 0x00105e10
MOV RDI,qword ptr [RBP + -0x188]
MOVZX ESI,byte ptr [RBP + -0x13d]
CALL 0x00108140
MOV dword ptr [RBP + -0x13c],EAX
MOV EAX,dword ptr [RBP + -0x13c]
MOV dword ptr [RBP + -0x14c],EAX
MOV EDI,dword ptr [RBP + -0x14c]
CALL 0x001161b0
MOV qword ptr [RBP + -0x148],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0x148]
CALL 0x0010b7b0
LAB_001170c4:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x190
POP RBP
RET
|
/* chess::Bitboard chess::movegen::seenSquares<(chess::Color::underlying)0>(chess::Board const&,
chess::Bitboard) */
int8
chess::movegen::seenSquares<(chess::Color::underlying)0>(Board *param_1,int8 param_2)
{
Board *pBVar1;
char cVar2;
bool bVar3;
uint uVar4;
byte local_155;
int8 local_150;
Color local_145;
int4 local_144;
int8 local_140;
int4 local_134;
int8 local_130;
byte local_121;
int8 local_120;
int4 local_114;
int8 local_110;
byte local_105;
int4 local_104;
int8 local_100;
byte local_f1;
int8 local_f0;
int8 local_e8;
int8 local_e0;
int8 local_d8;
Color local_ca;
PieceType local_c9;
int8 local_c8;
int8 local_c0;
Color local_b2;
PieceType local_b1;
int8 local_b0;
int8 local_a8;
Color local_9a;
PieceType local_99;
int8 local_98;
Color local_8a;
PieceType local_89;
int8 local_88;
Color local_7a;
PieceType local_79;
int8 local_78;
int4 local_6c;
int8 local_68;
int8 local_60;
int8 local_58;
int8 local_50;
Bitboard local_48 [12];
int4 local_3c;
int8 local_38;
int8 local_30;
Color local_25;
int4 local_24;
Board *local_20;
int8 local_18;
int8 local_10;
local_20 = param_1;
local_18 = param_2;
cVar2 = operator~((chess *)0x0);
Color::Color(&local_25,(int)cVar2);
local_3c = Board::kingSq(param_1,local_25);
local_24 = local_3c;
local_38 = attacks::king(local_3c);
local_30 = Bitboard::operator&((Bitboard *)&local_38,(Bitboard *)&local_18);
Bitboard::Bitboard(local_48,0);
uVar4 = Bitboard::operator==((Bitboard *)&local_30,local_48);
local_155 = 0;
if ((uVar4 & 1) != 0) {
local_155 = Board::chess960(local_20);
local_155 = local_155 ^ 0xff;
}
if ((local_155 & 1) == 0) {
local_58 = Board::occ(local_20);
local_6c = local_24;
local_68 = Bitboard::fromSquare(local_24);
local_60 = Bitboard::operator~((Bitboard *)&local_68);
local_50 = Bitboard::operator&((Bitboard *)&local_58,(Bitboard *)&local_60);
pBVar1 = local_20;
PieceType::PieceType(&local_79,4);
Color::Color(&local_7a,0);
local_78 = Board::pieces(pBVar1,local_79,local_7a);
pBVar1 = local_20;
PieceType::PieceType(&local_89,0);
Color::Color(&local_8a,0);
local_88 = Board::pieces(pBVar1,local_89,local_8a);
pBVar1 = local_20;
PieceType::PieceType(&local_99,1);
Color::Color(&local_9a,0);
local_98 = Board::pieces(pBVar1,local_99,local_9a);
pBVar1 = local_20;
PieceType::PieceType(&local_b1,2);
Color::Color(&local_b2,0);
local_b0 = Board::pieces(pBVar1,local_b1,local_b2);
local_a8 = Bitboard::operator|((Bitboard *)&local_b0,(Bitboard *)&local_78);
pBVar1 = local_20;
PieceType::PieceType(&local_c9,3);
Color::Color(&local_ca,0);
local_c8 = Board::pieces(pBVar1,local_c9,local_ca);
local_c0 = Bitboard::operator|((Bitboard *)&local_c8,(Bitboard *)&local_78);
local_e0 = local_88;
local_d8 = attacks::pawnLeftAttacks<(chess::Color::underlying)0>(local_88);
local_f0 = local_88;
local_e8 = attacks::pawnRightAttacks<(chess::Color::underlying)0>(local_88);
local_10 = Bitboard::operator|((Bitboard *)&local_d8,(Bitboard *)&local_e8);
while (bVar3 = Bitboard::operator_cast_to_bool((Bitboard *)&local_98), bVar3) {
local_f1 = Bitboard::pop((Bitboard *)&local_98);
Square::Square((Square *)&local_104,(uint)local_f1);
local_100 = attacks::knight(local_104);
Bitboard::operator|=((Bitboard *)&local_10,(Bitboard *)&local_100);
}
while (bVar3 = Bitboard::operator_cast_to_bool((Bitboard *)&local_a8), bVar3) {
local_105 = Bitboard::pop((Bitboard *)&local_a8);
Square::Square((Square *)&local_114,(uint)local_105);
local_120 = local_50;
local_110 = attacks::bishop(local_114,local_50);
Bitboard::operator|=((Bitboard *)&local_10,(Bitboard *)&local_110);
}
while (bVar3 = Bitboard::operator_cast_to_bool((Bitboard *)&local_c0), pBVar1 = local_20, bVar3)
{
local_121 = Bitboard::pop((Bitboard *)&local_c0);
Square::Square((Square *)&local_134,(uint)local_121);
local_140 = local_50;
local_130 = attacks::rook(local_134,local_50);
Bitboard::operator|=((Bitboard *)&local_10,(Bitboard *)&local_130);
}
Color::Color(&local_145,0);
local_144 = Board::kingSq(pBVar1,local_145);
local_150 = attacks::king(local_144);
Bitboard::operator|=((Bitboard *)&local_10,(Bitboard *)&local_150);
}
else {
Bitboard::Bitboard((Bitboard *)&local_10,0);
}
return local_10;
}
| |
33,081 | chess::Bitboard chess::movegen::seenSquares<(chess::Color::underlying)1>(chess::Board const&, chess::Bitboard) | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] inline Bitboard movegen::seenSquares(const Board &board, Bitboard enemy_empty) {
auto king_sq = board.kingSq(~c);
Bitboard map_king_atk = attacks::king(king_sq) & enemy_empty;
if (map_king_atk == Bitboard(0ull) && !board.chess960()) {
return 0ull;
}
auto occ = board.occ() & ~Bitboard::fromSquare(king_sq);
auto queens = board.pieces(PieceType::QUEEN, c);
auto pawns = board.pieces(PieceType::PAWN, c);
auto knights = board.pieces(PieceType::KNIGHT, c);
auto bishops = board.pieces(PieceType::BISHOP, c) | queens;
auto rooks = board.pieces(PieceType::ROOK, c) | queens;
Bitboard seen = attacks::pawnLeftAttacks<c>(pawns) | attacks::pawnRightAttacks<c>(pawns);
while (knights) {
const auto index = knights.pop();
seen |= attacks::knight(index);
}
while (bishops) {
const auto index = bishops.pop();
seen |= attacks::bishop(index, occ);
}
while (rooks) {
const auto index = rooks.pop();
seen |= attacks::rook(index, occ);
}
const Square index = board.kingSq(c);
seen |= attacks::king(index);
return seen;
} | O2 | cpp | chess::Bitboard chess::movegen::seenSquares<(chess::Color::underlying)1>(chess::Board const&, chess::Bitboard):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %r15
xorl %esi, %esi
callq 0x3b3e
movslq %eax, %rcx
leaq 0x8a9f(%rip), %rdx # 0x10500
testq %r14, (%rdx,%rcx,8)
jne 0x7a75
cmpb $0x1, 0xb5(%r15)
jne 0x7bd4
movq 0x50(%r15), %rcx
movq %rcx, 0x38(%rsp)
movq 0x58(%r15), %r14
movl %eax, %edi
callq 0x2f8c
notq %rax
movq %rax, 0x30(%rsp)
movq 0x40(%r15), %rbx
movq 0x58(%r15), %rcx
movq 0x20(%r15), %rdx
andq %rcx, %rdx
movq 0x28(%r15), %rax
andq %rcx, %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq 0x30(%r15), %r12
orq %rbx, %r12
andq %rcx, %r12
movq %r12, 0x20(%rsp)
movq %r15, 0x40(%rsp)
orq 0x38(%r15), %rbx
andq %rcx, %rbx
movq %rbx, 0x18(%rsp)
movq %rdx, %rcx
shrq $0x7, %rcx
movabsq $0xfefefefefefefe, %rsi # imm = 0xFEFEFEFEFEFEFE
andq %rcx, %rsi
shrq $0x9, %rdx
movabsq $0x7f7f7f7f7f7f7f, %r15 # imm = 0x7F7F7F7F7F7F7F
andq %rdx, %r15
orq %rsi, %r15
leaq 0x14(%rsp), %rbp
leaq 0x7bcd(%rip), %r13 # 0xf6d0
testq %rax, %rax
je 0x7b2e
leaq 0x28(%rsp), %rdi
callq 0x48de
movzbl %al, %esi
movq %rbp, %rdi
callq 0x2b34
movslq 0x14(%rsp), %rax
orq (%r13,%rax,8), %r15
movq 0x28(%rsp), %rax
jmp 0x7b03
orq 0x38(%rsp), %r14
andq 0x30(%rsp), %r14
leaq 0x20(%rsp), %rbp
leaq 0x10(%rsp), %r13
testq %r12, %r12
je 0x7b70
movq %rbp, %rdi
callq 0x48de
movzbl %al, %esi
movq %r13, %rdi
callq 0x2b34
movl 0x10(%rsp), %edi
movq %r14, %rsi
callq 0x2fe4
orq %rax, %r15
movq 0x20(%rsp), %r12
jmp 0x7b42
leaq 0x18(%rsp), %r12
leaq 0xc(%rsp), %r13
testq %rbx, %rbx
je 0x7ba8
movq %r12, %rdi
callq 0x48de
movzbl %al, %esi
movq %r13, %rdi
callq 0x2b34
movl 0xc(%rsp), %edi
movq %r14, %rsi
callq 0x2fba
orq %rax, %r15
movq 0x18(%rsp), %rbx
jmp 0x7b7a
pushq $0x1
popq %rsi
movq 0x40(%rsp), %rdi
callq 0x3b3e
cltq
leaq 0x8942(%rip), %rcx # 0x10500
orq (%rcx,%rax,8), %r15
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x7bc2
nop
| _ZN5chess7movegen11seenSquaresILNS_5Color10underlyingE1EEENS_8BitboardERKNS_5BoardES4_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov r15, rdi
xor esi, esi
call _ZNK5chess5Board6kingSqENS_5ColorE; chess::Board::kingSq(chess::Color)
movsxd rcx, eax
lea rdx, _ZN5chess7attacks11KingAttacksE; chess::attacks::KingAttacks
test [rdx+rcx*8], r14
jnz short loc_7A75
cmp byte ptr [r15+0B5h], 1
jnz loc_7BD4
loc_7A75:
mov rcx, [r15+50h]
mov [rsp+78h+var_40], rcx
mov r14, [r15+58h]
mov edi, eax
call _ZN5chess8Bitboard10fromSquareENS_6SquareE; chess::Bitboard::fromSquare(chess::Square)
not rax
mov [rsp+78h+var_48], rax
mov rbx, [r15+40h]
mov rcx, [r15+58h]
mov rdx, [r15+20h]
and rdx, rcx
mov rax, [r15+28h]
and rax, rcx
lea rsi, [rsp+78h+var_50]
mov [rsi], rax
mov r12, [r15+30h]
or r12, rbx
and r12, rcx
mov [rsp+78h+var_58], r12
mov [rsp+78h+var_38], r15
or rbx, [r15+38h]
and rbx, rcx
mov [rsp+78h+var_60], rbx
mov rcx, rdx
shr rcx, 7
mov rsi, 0FEFEFEFEFEFEFEh
and rsi, rcx
shr rdx, 9
mov r15, 7F7F7F7F7F7F7Fh
and r15, rdx
or r15, rsi
lea rbp, [rsp+78h+var_64]
lea r13, _ZN5chess7attacks13KnightAttacksE; chess::attacks::KnightAttacks
loc_7B03:
test rax, rax
jz short loc_7B2E
lea rdi, [rsp+78h+var_50]; this
call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void)
movzx esi, al; int
mov rdi, rbp; this
call _ZN5chess6SquareC2Ei; chess::Square::Square(int)
movsxd rax, [rsp+78h+var_64]
or r15, [r13+rax*8+0]
mov rax, [rsp+78h+var_50]
jmp short loc_7B03
loc_7B2E:
or r14, [rsp+78h+var_40]
and r14, [rsp+78h+var_48]
lea rbp, [rsp+78h+var_58]
lea r13, [rsp+78h+var_68]
loc_7B42:
test r12, r12
jz short loc_7B70
mov rdi, rbp; this
call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void)
movzx esi, al; int
mov rdi, r13; this
call _ZN5chess6SquareC2Ei; chess::Square::Square(int)
mov edi, [rsp+78h+var_68]
mov rsi, r14
call _ZN5chess7attacks6bishopENS_6SquareENS_8BitboardE; chess::attacks::bishop(chess::Square,chess::Bitboard)
or r15, rax
mov r12, [rsp+78h+var_58]
jmp short loc_7B42
loc_7B70:
lea r12, [rsp+78h+var_60]
lea r13, [rsp+78h+var_6C]
loc_7B7A:
test rbx, rbx
jz short loc_7BA8
mov rdi, r12; this
call _ZN5chess8Bitboard3popEv; chess::Bitboard::pop(void)
movzx esi, al; int
mov rdi, r13; this
call _ZN5chess6SquareC2Ei; chess::Square::Square(int)
mov edi, [rsp+78h+var_6C]
mov rsi, r14
call _ZN5chess7attacks4rookENS_6SquareENS_8BitboardE; chess::attacks::rook(chess::Square,chess::Bitboard)
or r15, rax
mov rbx, [rsp+78h+var_60]
jmp short loc_7B7A
loc_7BA8:
push 1
pop rsi
mov rdi, [rsp+78h+var_38]
call _ZNK5chess5Board6kingSqENS_5ColorE; chess::Board::kingSq(chess::Color)
cdqe
lea rcx, _ZN5chess7attacks11KingAttacksE; chess::attacks::KingAttacks
or r15, [rcx+rax*8]
loc_7BC2:
mov rax, r15
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7BD4:
xor r15d, r15d
jmp short loc_7BC2
| long long chess::movegen::seenSquares<(chess::Color::underlying)1>(long long a1, long long a2)
{
signed int v2; // eax
long long v3; // r14
long long v4; // rbx
long long v5; // rcx
unsigned long long v6; // rdx
long long v7; // rax
long long v8; // r12
long long v9; // rbx
long long v10; // r15
unsigned __int8 v11; // al
unsigned long long v12; // r14
unsigned __int8 v13; // al
unsigned __int8 v14; // al
int v17; // [rsp+Ch] [rbp-6Ch] BYREF
int v18; // [rsp+10h] [rbp-68h] BYREF
int v19; // [rsp+14h] [rbp-64h] BYREF
long long v20; // [rsp+18h] [rbp-60h] BYREF
long long v21; // [rsp+20h] [rbp-58h] BYREF
long long v22; // [rsp+28h] [rbp-50h] BYREF
long long v23; // [rsp+30h] [rbp-48h]
long long v24; // [rsp+38h] [rbp-40h]
long long v25; // [rsp+40h] [rbp-38h]
v2 = chess::Board::kingSq(a1, 0);
if ( (a2 & chess::attacks::KingAttacks[v2]) == 0 && *(_BYTE *)(a1 + 181) != 1 )
return 0LL;
v24 = *(_QWORD *)(a1 + 80);
v3 = *(_QWORD *)(a1 + 88);
v23 = ~chess::Bitboard::fromSquare(v2);
v4 = *(_QWORD *)(a1 + 64);
v5 = *(_QWORD *)(a1 + 88);
v6 = v5 & *(_QWORD *)(a1 + 32);
v7 = v5 & *(_QWORD *)(a1 + 40);
v22 = v7;
v8 = v5 & (v4 | *(_QWORD *)(a1 + 48));
v21 = v8;
v25 = a1;
v9 = v5 & (*(_QWORD *)(a1 + 56) | v4);
v20 = v9;
v10 = (v6 >> 7) & 0xFEFEFEFEFEFEFELL | (v6 >> 9) & 0x7F7F7F7F7F7F7FLL;
while ( v7 )
{
v11 = chess::Bitboard::pop((chess::Bitboard *)&v22);
chess::Square::Square((chess::Square *)&v19, v11);
v10 |= (unsigned long long)*(&chess::attacks::KnightAttacks + v19);
v7 = v22;
}
v12 = v23 & (v24 | v3);
while ( v8 )
{
v13 = chess::Bitboard::pop((chess::Bitboard *)&v21);
chess::Square::Square((chess::Square *)&v18, v13);
v10 |= chess::attacks::bishop(v18, v12);
v8 = v21;
}
while ( v9 )
{
v14 = chess::Bitboard::pop((chess::Bitboard *)&v20);
chess::Square::Square((chess::Square *)&v17, v14);
v10 |= chess::attacks::rook(v17, v12);
v9 = v20;
}
return chess::attacks::KingAttacks[(int)chess::Board::kingSq(v25, 1)] | v10;
}
| seenSquares<(chess::Color::underlying)1>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV R15,RDI
XOR ESI,ESI
CALL 0x00103b3e
MOVSXD RCX,EAX
LEA RDX,[0x110500]
TEST qword ptr [RDX + RCX*0x8],R14
JNZ 0x00107a75
CMP byte ptr [R15 + 0xb5],0x1
JNZ 0x00107bd4
LAB_00107a75:
MOV RCX,qword ptr [R15 + 0x50]
MOV qword ptr [RSP + 0x38],RCX
MOV R14,qword ptr [R15 + 0x58]
MOV EDI,EAX
CALL 0x00102f8c
NOT RAX
MOV qword ptr [RSP + 0x30],RAX
MOV RBX,qword ptr [R15 + 0x40]
MOV RCX,qword ptr [R15 + 0x58]
MOV RDX,qword ptr [R15 + 0x20]
AND RDX,RCX
MOV RAX,qword ptr [R15 + 0x28]
AND RAX,RCX
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RAX
MOV R12,qword ptr [R15 + 0x30]
OR R12,RBX
AND R12,RCX
MOV qword ptr [RSP + 0x20],R12
MOV qword ptr [RSP + 0x40],R15
OR RBX,qword ptr [R15 + 0x38]
AND RBX,RCX
MOV qword ptr [RSP + 0x18],RBX
MOV RCX,RDX
SHR RCX,0x7
MOV RSI,0xfefefefefefefe
AND RSI,RCX
SHR RDX,0x9
MOV R15,0x7f7f7f7f7f7f7f
AND R15,RDX
OR R15,RSI
LEA RBP,[RSP + 0x14]
LEA R13,[0x10f6d0]
LAB_00107b03:
TEST RAX,RAX
JZ 0x00107b2e
LEA RDI,[RSP + 0x28]
CALL 0x001048de
MOVZX ESI,AL
MOV RDI,RBP
CALL 0x00102b34
MOVSXD RAX,dword ptr [RSP + 0x14]
OR R15,qword ptr [R13 + RAX*0x8]
MOV RAX,qword ptr [RSP + 0x28]
JMP 0x00107b03
LAB_00107b2e:
OR R14,qword ptr [RSP + 0x38]
AND R14,qword ptr [RSP + 0x30]
LEA RBP,[RSP + 0x20]
LEA R13,[RSP + 0x10]
LAB_00107b42:
TEST R12,R12
JZ 0x00107b70
MOV RDI,RBP
CALL 0x001048de
MOVZX ESI,AL
MOV RDI,R13
CALL 0x00102b34
MOV EDI,dword ptr [RSP + 0x10]
MOV RSI,R14
CALL 0x00102fe4
OR R15,RAX
MOV R12,qword ptr [RSP + 0x20]
JMP 0x00107b42
LAB_00107b70:
LEA R12,[RSP + 0x18]
LEA R13,[RSP + 0xc]
LAB_00107b7a:
TEST RBX,RBX
JZ 0x00107ba8
MOV RDI,R12
CALL 0x001048de
MOVZX ESI,AL
MOV RDI,R13
CALL 0x00102b34
MOV EDI,dword ptr [RSP + 0xc]
MOV RSI,R14
CALL 0x00102fba
OR R15,RAX
MOV RBX,qword ptr [RSP + 0x18]
JMP 0x00107b7a
LAB_00107ba8:
PUSH 0x1
POP RSI
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x00103b3e
CDQE
LEA RCX,[0x110500]
OR R15,qword ptr [RCX + RAX*0x8]
LAB_00107bc2:
MOV RAX,R15
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00107bd4:
XOR R15D,R15D
JMP 0x00107bc2
|
/* chess::Bitboard chess::movegen::seenSquares<(chess::Color::underlying)1>(chess::Board const&,
chess::Bitboard) */
ulong chess::movegen::seenSquares<(chess::Color::underlying)1>(Board *param_1,ulong param_2)
{
byte bVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
int4 local_6c;
int4 local_68;
int local_64;
ulong local_60;
ulong local_58;
ulong local_50;
ulong local_48;
ulong local_40;
Board *local_38;
iVar2 = Board::kingSq(param_1,0);
if (((*(ulong *)(&attacks::KingAttacks + (long)iVar2 * 8) & param_2) == 0) &&
(param_1[0xb5] != (Board)0x1)) {
uVar6 = 0;
}
else {
local_40 = *(ulong *)(param_1 + 0x50);
uVar5 = *(ulong *)(param_1 + 0x58);
local_48 = Bitboard::fromSquare(iVar2);
local_48 = ~local_48;
uVar6 = *(ulong *)(param_1 + 0x58);
local_50 = *(ulong *)(param_1 + 0x28) & uVar6;
uVar4 = (*(ulong *)(param_1 + 0x30) | *(ulong *)(param_1 + 0x40)) & uVar6;
uVar3 = (*(ulong *)(param_1 + 0x40) | *(ulong *)(param_1 + 0x38)) & uVar6;
uVar6 = (*(ulong *)(param_1 + 0x20) & uVar6) >> 9 & 0x7f7f7f7f7f7f7f |
(*(ulong *)(param_1 + 0x20) & uVar6) >> 7 & 0xfefefefefefefe;
local_60 = uVar3;
local_58 = uVar4;
local_38 = param_1;
while (local_50 != 0) {
bVar1 = Bitboard::pop((Bitboard *)&local_50);
Square::Square((Square *)&local_64,(uint)bVar1);
uVar6 = uVar6 | *(ulong *)(attacks::KnightAttacks + (long)local_64 * 8);
}
uVar5 = (uVar5 | local_40) & local_48;
while (uVar4 != 0) {
bVar1 = Bitboard::pop((Bitboard *)&local_58);
Square::Square((Square *)&local_68,(uint)bVar1);
uVar4 = attacks::bishop(local_68,uVar5);
uVar6 = uVar6 | uVar4;
uVar4 = local_58;
}
while (uVar3 != 0) {
bVar1 = Bitboard::pop((Bitboard *)&local_60);
Square::Square((Square *)&local_6c,(uint)bVar1);
uVar3 = attacks::rook(local_6c,uVar5);
uVar6 = uVar6 | uVar3;
uVar3 = local_60;
}
iVar2 = Board::kingSq(local_38,1);
uVar6 = uVar6 | *(ulong *)(&attacks::KingAttacks + (long)iVar2 * 8);
}
return uVar6;
}
| |
33,082 | ma_hash_password | eloqsql/libmariadb/libmariadb/ma_password.c | void ma_hash_password(ulong *result, const char *password, size_t len)
{
register ulong nr=1345345333L, add=7, nr2=0x12345671L;
ulong tmp;
const char *password_end= password + len;
for (; password < password_end; password++)
{
if (*password == ' ' || *password == '\t')
continue; /* skip space in password */
tmp= (ulong) (uchar) *password;
nr^= (((nr & 63)+add)*tmp)+ (nr << 8);
nr2+=(nr2 << 8) ^ nr;
add+=tmp;
}
result[0]=nr & (((ulong) 1L << 31) -1L); /* Don't use sign bit (str2int) */;
result[1]=nr2 & (((ulong) 1L << 31) -1L);
return;
} | O0 | c | ma_hash_password:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x50305735, -0x20(%rbp) # imm = 0x50305735
movq $0x7, -0x28(%rbp)
movq $0x12345671, -0x30(%rbp) # imm = 0x12345671
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x4b418
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0x4b3b6
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0x4b3b8
jmp 0x4b407
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
andq $0x3f, %rax
addq -0x28(%rbp), %rax
imulq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
shlq $0x8, %rax
xorq -0x20(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x4b394
movq -0x20(%rbp), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
popq %rbp
retq
nop
| ma_hash_password:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 50305735h
mov [rbp+var_28], 7
mov [rbp+var_30], 12345671h
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
loc_4B394:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_40]
jnb short loc_4B418
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_4B3B6
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 9
jnz short loc_4B3B8
loc_4B3B6:
jmp short loc_4B407
loc_4B3B8:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
and rax, 3Fh
add rax, [rbp+var_28]
imul rax, [rbp+var_38]
mov rcx, [rbp+var_20]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_20]
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
shl rax, 8
xor rax, [rbp+var_20]
add rax, [rbp+var_30]
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
loc_4B407:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_4B394
loc_4B418:
mov rcx, [rbp+var_20]
and rcx, 7FFFFFFFh
mov rax, [rbp+var_8]
mov [rax], rcx
mov rcx, [rbp+var_30]
and rcx, 7FFFFFFFh
mov rax, [rbp+var_8]
mov [rax+8], rcx
pop rbp
retn
| _QWORD * ma_hash_password(_QWORD *a1, _BYTE *a2, long long a3)
{
_QWORD *result; // rax
long long v4; // [rsp+8h] [rbp-38h]
int v5; // [rsp+10h] [rbp-30h]
long long v6; // [rsp+18h] [rbp-28h]
int v7; // [rsp+20h] [rbp-20h]
_BYTE *v8; // [rsp+30h] [rbp-10h]
v8 = a2;
v7 = 1345345333;
v6 = 7LL;
v5 = 305419889;
while ( v8 < &a2[a3] )
{
if ( *v8 != 32 && *v8 != 9 )
{
v4 = (unsigned __int8)*v8;
v7 ^= (v7 << 8) + v4 * (v6 + (v7 & 0x3F));
v5 += v7 ^ (v5 << 8);
v6 += v4;
}
++v8;
}
*a1 = v7 & 0x7FFFFFFF;
result = a1;
a1[1] = v5 & 0x7FFFFFFF;
return result;
}
| ma_hash_password:
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],0x50305735
MOV qword ptr [RBP + -0x28],0x7
MOV qword ptr [RBP + -0x30],0x12345671
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
LAB_0014b394:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0014b418
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x0014b3b6
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x9
JNZ 0x0014b3b8
LAB_0014b3b6:
JMP 0x0014b407
LAB_0014b3b8:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x28]
IMUL RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x20]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
SHL RAX,0x8
XOR RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
LAB_0014b407:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0014b394
LAB_0014b418:
MOV RCX,qword ptr [RBP + -0x20]
AND RCX,0x7fffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0x7fffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
POP RBP
RET
|
void ma_hash_password(ulong *param_1,byte *param_2,long param_3)
{
ulong local_38;
long local_30;
ulong local_28;
byte *local_18;
local_28 = 0x50305735;
local_30 = 7;
local_38 = 0x12345671;
for (local_18 = param_2; local_18 < param_2 + param_3; local_18 = local_18 + 1) {
if ((*local_18 != 0x20) && (*local_18 != 9)) {
local_28 = ((local_28 & 0x3f) + local_30) * (ulong)*local_18 + local_28 * 0x100 ^ local_28;
local_38 = (local_38 << 8 ^ local_28) + local_38;
local_30 = (ulong)*local_18 + local_30;
}
}
*param_1 = local_28 & 0x7fffffff;
param_1[1] = local_38 & 0x7fffffff;
return;
}
| |
33,083 | testing::internal::InDeathTestChild() | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest-death-test.cc | bool InDeathTestChild() {
#if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
// On Windows and Fuchsia, death tests are thread-safe regardless of the value
// of the death_test_style flag.
return !GTEST_FLAG_GET(internal_run_death_test).empty();
#else
if (GTEST_FLAG_GET(death_test_style) == "threadsafe")
return !GTEST_FLAG_GET(internal_run_death_test).empty();
else
return g_in_fast_death_test_child;
#endif
} | O1 | cpp | testing::internal::InDeathTestChild():
pushq %rax
leaq 0x414bbab(%rip), %rdi # 0x415dda8
leaq 0x30019(%rip), %rsi # 0x4221d
callq 0x9160
xorl %ecx, %ecx
cmpq $0x0, 0x414bbc5(%rip) # 0x415ddd8
setne %cl
testl %eax, %eax
movzbl 0x414bbd1(%rip), %eax # 0x415ddf0
cmovel %ecx, %eax
andb $0x1, %al
popq %rcx
retq
| _ZN7testing8internal16InDeathTestChildEv:
push rax
lea rdi, _ZN7testing28FLAGS_gtest_death_test_styleB5cxx11E; testing::FLAGS_gtest_death_test_style
lea rsi, aThreadsafe; "threadsafe"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
xor ecx, ecx
cmp cs:qword_415DDD8, 0
setnz cl
test eax, eax
movzx eax, cs:_ZN7testing8internalL26g_in_fast_death_test_childE; testing::internal::g_in_fast_death_test_child
cmovz eax, ecx
and al, 1
pop rcx
retn
| char testing::internal::InDeathTestChild(testing::internal *this)
{
bool v1; // zf
char v2; // al
v1 = (unsigned int)std::string::compare(&testing::FLAGS_gtest_death_test_style[abi:cxx11], "threadsafe") == 0;
v2 = testing::internal::g_in_fast_death_test_child;
if ( v1 )
v2 = qword_415DDD8 != 0;
return v2 & 1;
}
| InDeathTestChild:
PUSH RAX
LEA RDI,[0x425dda8]
LEA RSI,[0x14221d]
CALL 0x00109160
XOR ECX,ECX
CMP qword ptr [0x0425ddd8],0x0
SETNZ CL
TEST EAX,EAX
MOVZX EAX,byte ptr [0x0425ddf0]
CMOVZ EAX,ECX
AND AL,0x1
POP RCX
RET
|
/* testing::internal::InDeathTestChild() */
byte testing::internal::InDeathTestChild(void)
{
byte bVar1;
int iVar2;
iVar2 = std::__cxx11::string::compare((char *)&FLAGS_gtest_death_test_style_abi_cxx11_);
bVar1 = g_in_fast_death_test_child;
if (iVar2 == 0) {
bVar1 = DAT_0425ddd8 != 0;
}
return bVar1 & 1;
}
| |
33,084 | strlength | eloqsql/mysys/mf_format.c | size_t strlength(const char *str)
{
reg1 const char * pos;
reg2 const char * found;
DBUG_ENTER("strlength");
pos= found= str;
while (*pos)
{
if (*pos != ' ')
{
while (*++pos && *pos != ' ') {};
if (!*pos)
{
found=pos; /* String ends here */
break;
}
}
found=pos;
while (*++pos == ' ') {};
}
DBUG_RETURN((size_t) (found - str));
} | O3 | c | strlength:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %dl
movq %rdi, %rax
movq %rdi, %rcx
cmpb $0x20, %dl
je 0x9486d
movzbl %dl, %edx
testl %edx, %edx
je 0x94886
movzbl 0x1(%rcx), %eax
incq %rcx
testl %eax, %eax
je 0x94883
cmpl $0x20, %eax
jne 0x9485d
movq %rcx, %rsi
movb 0x1(%rsi), %dl
incq %rsi
cmpb $0x20, %dl
je 0x94870
movq %rcx, %rax
movq %rsi, %rcx
jmp 0x94851
movq %rcx, %rax
subq %rdi, %rax
popq %rbp
retq
nop
| strlength:
push rbp
mov rbp, rsp
mov dl, [rdi]
mov rax, rdi
mov rcx, rdi
loc_94851:
cmp dl, 20h ; ' '
jz short loc_9486D
movzx edx, dl
test edx, edx
jz short loc_94886
loc_9485D:
movzx eax, byte ptr [rcx+1]
inc rcx
test eax, eax
jz short loc_94883
cmp eax, 20h ; ' '
jnz short loc_9485D
loc_9486D:
mov rsi, rcx
loc_94870:
mov dl, [rsi+1]
inc rsi
cmp dl, 20h ; ' '
jz short loc_94870
mov rax, rcx
mov rcx, rsi
jmp short loc_94851
loc_94883:
mov rax, rcx
loc_94886:
sub rax, rdi
pop rbp
retn
| long long strlength(_BYTE *a1)
{
char v1; // dl
_BYTE *v2; // rax
_BYTE *v3; // rcx
int v4; // eax
_BYTE *v5; // rsi
v1 = *a1;
v2 = a1;
v3 = a1;
while ( v1 == 32 )
{
LABEL_6:
v5 = v3;
do
v1 = *++v5;
while ( v1 == 32 );
v2 = v3;
v3 = v5;
}
if ( v1 )
{
while ( 1 )
{
v4 = (unsigned __int8)*++v3;
if ( !v4 )
break;
if ( v4 == 32 )
goto LABEL_6;
}
v2 = v3;
}
return v2 - a1;
}
| strlength:
PUSH RBP
MOV RBP,RSP
MOV DL,byte ptr [RDI]
MOV RAX,RDI
MOV RCX,RDI
LAB_00194851:
CMP DL,0x20
JZ 0x0019486d
MOVZX EDX,DL
TEST EDX,EDX
JZ 0x00194886
LAB_0019485d:
MOVZX EAX,byte ptr [RCX + 0x1]
INC RCX
TEST EAX,EAX
JZ 0x00194883
CMP EAX,0x20
JNZ 0x0019485d
LAB_0019486d:
MOV RSI,RCX
LAB_00194870:
MOV DL,byte ptr [RSI + 0x1]
INC RSI
CMP DL,0x20
JZ 0x00194870
MOV RAX,RCX
MOV RCX,RSI
JMP 0x00194851
LAB_00194883:
MOV RAX,RCX
LAB_00194886:
SUB RAX,RDI
POP RBP
RET
|
long strlength(char *param_1)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char *pcVar5;
cVar4 = *param_1;
pcVar3 = param_1;
pcVar5 = param_1;
do {
pcVar2 = pcVar5;
if (cVar4 != ' ') {
if (cVar4 == '\0') {
LAB_00194886:
return (long)pcVar3 - (long)param_1;
}
do {
pcVar1 = pcVar5 + 1;
pcVar3 = pcVar5 + 1;
if (*pcVar1 == '\0') goto LAB_00194886;
pcVar5 = pcVar3;
pcVar2 = pcVar3;
} while (*pcVar1 != ' ');
}
do {
pcVar3 = pcVar2;
cVar4 = pcVar5[1];
pcVar5 = pcVar5 + 1;
pcVar2 = pcVar3;
} while (cVar4 == ' ');
} while( true );
}
| |
33,085 | ftparser_call_initializer | eloqsql/storage/myisam/ft_parser.c | MYSQL_FTPARSER_PARAM *ftparser_call_initializer(MI_INFO *info,
uint keynr, uint paramnr)
{
uint32 ftparser_nr;
struct st_mysql_ftparser *parser;
if (!ftparser_alloc_param(info))
return 0;
if (keynr == NO_SUCH_KEY)
{
ftparser_nr= 0;
parser= &ft_default_parser;
}
else
{
ftparser_nr= info->s->keyinfo[keynr].ftkey_nr;
parser= info->s->keyinfo[keynr].parser;
}
DBUG_ASSERT(paramnr < MAX_PARAM_NR);
ftparser_nr= ftparser_nr*MAX_PARAM_NR + paramnr;
if (! info->ftparser_param[ftparser_nr].mysql_add_word)
{
/* Note, that mysql_add_word is used here as a flag:
mysql_add_word == 0 - parser is not initialized
mysql_add_word != 0 - parser is initialized, or no
initialization needed. */
info->ftparser_param[ftparser_nr].mysql_add_word=
(int (*)(struct st_mysql_ftparser_param *, const char *, int,
MYSQL_FTPARSER_BOOLEAN_INFO *)) 1;
if (parser->init && parser->init(&info->ftparser_param[ftparser_nr]))
return 0;
}
return &info->ftparser_param[ftparser_nr];
} | O0 | c | ftparser_call_initializer:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa2800
cmpq $0x0, %rax
jne 0xa28be
movq $0x0, -0x8(%rbp)
jmp 0xa29b3
cmpl $-0x1, -0x14(%rbp)
jne 0xa28d8
movl $0x0, -0x1c(%rbp)
leaq 0x21c8ae(%rip), %rax # 0x2bf180
movq %rax, -0x28(%rbp)
jmp 0xa2916
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xa2918
jmp 0xa291a
movl -0x1c(%rbp), %eax
shll %eax
addl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0xa299a
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x1, %ecx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xa2998
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xd0(%rcx), %rdi
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rdi
callq *%rax
cmpl $0x0, %eax
je 0xa2998
movq $0x0, -0x8(%rbp)
jmp 0xa29b3
jmp 0xa299a
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| ftparser_call_initializer:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rdi, [rbp+var_10]
call ftparser_alloc_param
cmp rax, 0
jnz short loc_A28BE
mov [rbp+var_8], 0
jmp loc_A29B3
loc_A28BE:
cmp [rbp+var_14], 0FFFFFFFFh
jnz short loc_A28D8
mov [rbp+var_1C], 0
lea rax, ft_default_parser
mov [rbp+var_28], rax
jmp short loc_A2916
loc_A28D8:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+218h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov eax, [rax+20h]
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+218h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+38h]
mov [rbp+var_28], rax
loc_A2916:
jmp short $+2
loc_A2918:
jmp short $+2
loc_A291A:
mov eax, [rbp+var_1C]
shl eax, 1
add eax, [rbp+var_18]
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov rax, [rax+0D0h]
mov ecx, [rbp+var_1C]
shl rcx, 6
add rax, rcx
cmp qword ptr [rax+8], 0
jnz short loc_A299A
mov rax, [rbp+var_10]
mov rax, [rax+0D0h]
mov ecx, [rbp+var_1C]
shl rcx, 6
add rax, rcx
mov ecx, 1
mov [rax+8], rcx
mov rax, [rbp+var_28]
cmp qword ptr [rax+10h], 0
jz short loc_A2998
mov rax, [rbp+var_28]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+0D0h]
mov ecx, [rbp+var_1C]
shl rcx, 6
add rdi, rcx
call rax
cmp eax, 0
jz short loc_A2998
mov [rbp+var_8], 0
jmp short loc_A29B3
loc_A2998:
jmp short $+2
loc_A299A:
mov rax, [rbp+var_10]
mov rax, [rax+0D0h]
mov ecx, [rbp+var_1C]
shl rcx, 6
add rax, rcx
mov [rbp+var_8], rax
loc_A29B3:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| unsigned long long ftparser_call_initializer(_QWORD *a1, unsigned int a2, int a3)
{
_QWORD *v4; // [rsp+8h] [rbp-28h]
int v5; // [rsp+14h] [rbp-1Ch]
unsigned int v6; // [rsp+14h] [rbp-1Ch]
if ( !ftparser_alloc_param(a1) )
return 0LL;
if ( a2 == -1 )
{
v5 = 0;
v4 = &ft_default_parser;
}
else
{
v5 = *(_DWORD *)(112LL * a2 + *(_QWORD *)(*a1 + 536LL) + 32);
v4 = *(_QWORD **)(112LL * a2 + *(_QWORD *)(*a1 + 536LL) + 56);
}
v6 = a3 + 2 * v5;
if ( !*(_QWORD *)(((unsigned long long)v6 << 6) + a1[26] + 8)
&& (*(_QWORD *)(((unsigned long long)v6 << 6) + a1[26] + 8) = 1LL, v4[2])
&& ((unsigned int ( *)(unsigned long long))v4[2])(((unsigned long long)v6 << 6) + a1[26]) )
{
return 0LL;
}
else
{
return ((unsigned long long)v6 << 6) + a1[26];
}
}
| ftparser_call_initializer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001a2800
CMP RAX,0x0
JNZ 0x001a28be
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001a29b3
LAB_001a28be:
CMP dword ptr [RBP + -0x14],-0x1
JNZ 0x001a28d8
MOV dword ptr [RBP + -0x1c],0x0
LEA RAX,[0x3bf180]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001a2916
LAB_001a28d8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x28],RAX
LAB_001a2916:
JMP 0x001a2918
LAB_001a2918:
JMP 0x001a291a
LAB_001a291a:
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x1
ADD EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xd0]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x6
ADD RAX,RCX
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x001a299a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xd0]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x6
ADD RAX,RCX
MOV ECX,0x1
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x001a2998
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0xd0]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x6
ADD RDI,RCX
CALL RAX
CMP EAX,0x0
JZ 0x001a2998
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001a29b3
LAB_001a2998:
JMP 0x001a299a
LAB_001a299a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xd0]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x6
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_001a29b3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long ftparser_call_initializer(long *param_1,uint param_2,int param_3)
{
uint uVar1;
int iVar2;
long lVar3;
int1 *local_30;
int local_24;
long local_10;
lVar3 = ftparser_alloc_param(param_1);
if (lVar3 == 0) {
local_10 = 0;
}
else {
if (param_2 == 0xffffffff) {
local_24 = 0;
local_30 = ft_default_parser;
}
else {
local_24 = *(int *)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 0x20);
local_30 = *(int1 **)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 0x38);
}
uVar1 = local_24 * 2 + param_3;
if (((*(long *)(param_1[0x1a] + (ulong)uVar1 * 0x40 + 8) == 0) &&
(*(int8 *)(param_1[0x1a] + (ulong)uVar1 * 0x40 + 8) = 1,
*(long *)(local_30 + 0x10) != 0)) &&
(iVar2 = (**(code **)(local_30 + 0x10))(param_1[0x1a] + (ulong)uVar1 * 0x40), iVar2 != 0)) {
local_10 = 0;
}
else {
local_10 = param_1[0x1a] + (ulong)uVar1 * 0x40;
}
}
return local_10;
}
| |
33,086 | primegen_fill | xtate/src/crypto/crypto-primegen.c | void primegen_fill(primegen *pg) {
int i;
uint32_t mask;
uint32_t bits0, bits1, bits2, bits3, bits4, bits5, bits6, bits7;
uint32_t bits8, bits9, bits10, bits11, bits12, bits13, bits14, bits15;
uint64_t base;
i = pg->pos;
if (i == B32) {
primegen_sieve(pg);
pg->L += B;
i = 0;
}
pg->pos = i + 1;
bits0 = ~pg->buf[0][i];
bits1 = ~pg->buf[1][i];
bits2 = ~pg->buf[2][i];
bits3 = ~pg->buf[3][i];
bits4 = ~pg->buf[4][i];
bits5 = ~pg->buf[5][i];
bits6 = ~pg->buf[6][i];
bits7 = ~pg->buf[7][i];
bits8 = ~pg->buf[8][i];
bits9 = ~pg->buf[9][i];
bits10 = ~pg->buf[10][i];
bits11 = ~pg->buf[11][i];
bits12 = ~pg->buf[12][i];
bits13 = ~pg->buf[13][i];
bits14 = ~pg->buf[14][i];
bits15 = ~pg->buf[15][i];
base = pg->base + 1920;
pg->base = base;
pg->num = 0;
for (mask = 0x80000000; mask; mask >>= 1) {
base -= 60;
if (bits15 & mask)
pg->p[pg->num++] = base + 59;
if (bits14 & mask)
pg->p[pg->num++] = base + 53;
if (bits13 & mask)
pg->p[pg->num++] = base + 49;
if (bits12 & mask)
pg->p[pg->num++] = base + 47;
if (bits11 & mask)
pg->p[pg->num++] = base + 43;
if (bits10 & mask)
pg->p[pg->num++] = base + 41;
if (bits9 & mask)
pg->p[pg->num++] = base + 37;
if (bits8 & mask)
pg->p[pg->num++] = base + 31;
if (bits7 & mask)
pg->p[pg->num++] = base + 29;
if (bits6 & mask)
pg->p[pg->num++] = base + 23;
if (bits5 & mask)
pg->p[pg->num++] = base + 19;
if (bits4 & mask)
pg->p[pg->num++] = base + 17;
if (bits3 & mask)
pg->p[pg->num++] = base + 13;
if (bits2 & mask)
pg->p[pg->num++] = base + 11;
if (bits1 & mask)
pg->p[pg->num++] = base + 7;
if (bits0 & mask)
pg->p[pg->num++] = base + 1;
}
} | O3 | c | primegen_fill:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x3f904(%rdi), %eax
cmpl $0xfa4, %eax # imm = 0xFA4
jne 0x1dff8
movq %rbx, %rdi
callq 0x1d4e8
addq $0x1f480, 0x3f910(%rbx) # imm = 0x1F480
xorl %eax, %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x3f904(%rbx)
movslq %eax, %rcx
movl (%rbx,%rcx,4), %eax
movl %eax, 0x18(%rsp)
movl 0x3e90(%rbx,%rcx,4), %eax
movl %eax, 0x14(%rsp)
movl 0x7d20(%rbx,%rcx,4), %eax
movl %eax, 0x10(%rsp)
movl 0xbbb0(%rbx,%rcx,4), %eax
movl %eax, 0xc(%rsp)
movl 0xfa40(%rbx,%rcx,4), %r9d
movl 0x138d0(%rbx,%rcx,4), %r8d
movl 0x17760(%rbx,%rcx,4), %edi
movl 0x1b5f0(%rbx,%rcx,4), %r11d
movl 0x1f480(%rbx,%rcx,4), %r13d
movl 0x23310(%rbx,%rcx,4), %ebp
movl 0x271a0(%rbx,%rcx,4), %r14d
movl 0x2b030(%rbx,%rcx,4), %r15d
movl 0x2eec0(%rbx,%rcx,4), %eax
movl 0x32d50(%rbx,%rcx,4), %r12d
movl 0x36be0(%rbx,%rcx,4), %r10d
movl 0x3aa70(%rbx,%rcx,4), %ecx
movq 0x3f908(%rbx), %rdx
leaq 0x780(%rdx), %rsi
movq %rsi, 0x3f908(%rbx)
notl 0x18(%rsp)
notl 0x14(%rsp)
notl 0x10(%rsp)
notl 0xc(%rsp)
notl %r9d
movl %r9d, 0x24(%rsp)
notl %r8d
movl %r8d, 0x20(%rsp)
notl %edi
movl %edi, 0x1c(%rsp)
notl %r11d
notl %r13d
notl %ebp
notl %r14d
notl %r15d
notl %eax
notl %r12d
notl %r10d
notl %ecx
movl $0x0, 0x3f900(%rbx)
addq $0x77f, %rdx # imm = 0x77F
movl $0x80000000, %esi # imm = 0x80000000
xorl %edi, %edi
testl %ecx, %esi
je 0x1e10a
movslq %edi, %r8
incl %edi
movl %edi, 0x3f900(%rbx)
movq %rdx, 0x3e900(%rbx,%r8,8)
testl %r10d, %esi
je 0x1e126
leaq -0x6(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %r12d, %esi
je 0x1e142
leaq -0xa(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %eax, %esi
je 0x1e15d
leaq -0xc(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %r15d, %esi
je 0x1e179
leaq -0x10(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %r14d, %esi
je 0x1e195
leaq -0x12(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %ebp, %esi
je 0x1e1b0
leaq -0x16(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %r13d, %esi
je 0x1e1cc
leaq -0x1c(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %r11d, %esi
je 0x1e1e8
leaq -0x1e(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %esi, 0x1c(%rsp)
je 0x1e205
leaq -0x24(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %esi, 0x20(%rsp)
je 0x1e222
leaq -0x28(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %esi, 0x24(%rsp)
je 0x1e23f
leaq -0x2a(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %esi, 0xc(%rsp)
je 0x1e25c
leaq -0x2e(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %esi, 0x10(%rsp)
je 0x1e279
leaq -0x30(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %esi, 0x14(%rsp)
je 0x1e296
leaq -0x34(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
testl %esi, 0x18(%rsp)
je 0x1e2b3
leaq -0x3a(%rdx), %r8
movslq %edi, %r9
incl %edi
movl %edi, 0x3f900(%rbx)
movq %r8, 0x3e900(%rbx,%r9,8)
movl %esi, %r8d
shrl %r8d
addq $-0x3c, %rdx
cmpl $0x1, %esi
movl %r8d, %esi
ja 0x1e0f3
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| primegen_fill:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov eax, [rdi+3F904h]
cmp eax, 0FA4h
jnz short loc_1DFF8
mov rdi, rbx
call primegen_sieve
add qword ptr [rbx+3F910h], 1F480h
xor eax, eax
loc_1DFF8:
lea ecx, [rax+1]
mov [rbx+3F904h], ecx
movsxd rcx, eax
mov eax, [rbx+rcx*4]
mov [rsp+58h+var_40], eax
mov eax, [rbx+rcx*4+3E90h]
mov [rsp+58h+var_44], eax
mov eax, [rbx+rcx*4+7D20h]
mov [rsp+58h+var_48], eax
mov eax, [rbx+rcx*4+0BBB0h]
mov [rsp+58h+var_4C], eax
mov r9d, [rbx+rcx*4+0FA40h]
mov r8d, [rbx+rcx*4+138D0h]
mov edi, [rbx+rcx*4+17760h]
mov r11d, [rbx+rcx*4+1B5F0h]
mov r13d, dword ptr ds:loc_1F480[rbx+rcx*4]
mov ebp, [rbx+rcx*4+23310h]
mov r14d, [rbx+rcx*4+271A0h]
mov r15d, [rbx+rcx*4+2B030h]
mov eax, [rbx+rcx*4+2EEC0h]
mov r12d, dword ptr ds:loc_32D50[rbx+rcx*4]
mov r10d, [rbx+rcx*4+36BE0h]
mov ecx, dword ptr ds:loc_3AA70[rbx+rcx*4]
mov rdx, [rbx+3F908h]
lea rsi, [rdx+780h]
mov [rbx+3F908h], rsi
not [rsp+58h+var_40]
not [rsp+58h+var_44]
not [rsp+58h+var_48]
not [rsp+58h+var_4C]
not r9d
mov [rsp+58h+var_34], r9d
not r8d
mov [rsp+58h+var_38], r8d
not edi
mov [rsp+58h+var_3C], edi
not r11d
not r13d
not ebp
not r14d
not r15d
not eax
not r12d
not r10d
not ecx
mov dword ptr ds:loc_3F900[rbx], 0
add rdx, 77Fh
mov esi, 80000000h
xor edi, edi
loc_1E0F3:
test esi, ecx
jz short loc_1E10A
movsxd r8, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r8*8], rdx
loc_1E10A:
test esi, r10d
jz short loc_1E126
lea r8, [rdx-6]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E126:
test esi, r12d
jz short loc_1E142
lea r8, [rdx-0Ah]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E142:
test esi, eax
jz short loc_1E15D
lea r8, [rdx-0Ch]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E15D:
test esi, r15d
jz short loc_1E179
lea r8, [rdx-10h]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E179:
test esi, r14d
jz short loc_1E195
lea r8, [rdx-12h]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E195:
test esi, ebp
jz short loc_1E1B0
lea r8, [rdx-16h]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E1B0:
test esi, r13d
jz short loc_1E1CC
lea r8, [rdx-1Ch]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E1CC:
test esi, r11d
jz short loc_1E1E8
lea r8, [rdx-1Eh]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E1E8:
test [rsp+58h+var_3C], esi
jz short loc_1E205
lea r8, [rdx-24h]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E205:
test [rsp+58h+var_38], esi
jz short loc_1E222
lea r8, [rdx-28h]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E222:
test [rsp+58h+var_34], esi
jz short loc_1E23F
lea r8, [rdx-2Ah]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E23F:
test [rsp+58h+var_4C], esi
jz short loc_1E25C
lea r8, [rdx-2Eh]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E25C:
test [rsp+58h+var_48], esi
jz short loc_1E279
lea r8, [rdx-30h]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E279:
test [rsp+58h+var_44], esi
jz short loc_1E296
lea r8, [rdx-34h]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E296:
test [rsp+58h+var_40], esi
jz short loc_1E2B3
lea r8, [rdx-3Ah]
movsxd r9, edi
inc edi
mov dword ptr ds:loc_3F900[rbx], edi
mov qword ptr ds:loc_3E900[rbx+r9*8], r8
loc_1E2B3:
mov r8d, esi
shr r8d, 1
add rdx, 0FFFFFFFFFFFFFFC4h
cmp esi, 1
mov esi, r8d
ja loc_1E0F3
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long primegen_fill(long long a1)
{
int v2; // eax
long long v3; // rcx
int v4; // r9d
int v5; // r8d
int v6; // edi
int v7; // r11d
int v8; // r13d
int v9; // ebp
int v10; // r14d
int v11; // r15d
int v12; // eax
int v13; // r12d
int v14; // r10d
long long v15; // rdx
int v16; // r11d
int v17; // r13d
int v18; // ebp
int v19; // r14d
int v20; // r15d
long long result; // rax
int v22; // r12d
int v23; // r10d
int v24; // ecx
long long v25; // rdx
unsigned int v26; // esi
int v27; // edi
long long v28; // r8
long long v29; // r9
long long v30; // r9
long long v31; // r9
long long v32; // r9
long long v33; // r9
long long v34; // r9
long long v35; // r9
long long v36; // r9
long long v37; // r9
long long v38; // r9
long long v39; // r9
long long v40; // r9
long long v41; // r9
long long v42; // r9
long long v43; // r9
bool v44; // cc
int v45; // [rsp+Ch] [rbp-4Ch]
int v46; // [rsp+Ch] [rbp-4Ch]
int v47; // [rsp+10h] [rbp-48h]
int v48; // [rsp+10h] [rbp-48h]
int v49; // [rsp+14h] [rbp-44h]
int v50; // [rsp+14h] [rbp-44h]
int v51; // [rsp+18h] [rbp-40h]
int v52; // [rsp+18h] [rbp-40h]
int v53; // [rsp+1Ch] [rbp-3Ch]
int v54; // [rsp+20h] [rbp-38h]
int v55; // [rsp+24h] [rbp-34h]
v2 = *(_DWORD *)(a1 + 260356);
if ( v2 == 4004 )
{
primegen_sieve(a1);
*(_QWORD *)(a1 + 260368) += 128128LL;
v2 = 0;
}
*(_DWORD *)(a1 + 260356) = v2 + 1;
v3 = v2;
v51 = *(_DWORD *)(a1 + 4LL * v2);
v49 = *(_DWORD *)(a1 + 4LL * v2 + 16016);
v47 = *(_DWORD *)(a1 + 4LL * v2 + 32032);
v45 = *(_DWORD *)(a1 + 4LL * v2 + 48048);
v4 = *(_DWORD *)(a1 + 4LL * v2 + 64064);
v5 = *(_DWORD *)(a1 + 4LL * v2 + 80080);
v6 = *(_DWORD *)(a1 + 4LL * v2 + 96096);
v7 = *(_DWORD *)(a1 + 4LL * v2 + 112112);
v8 = *(_DWORD *)((char *)&loc_1F480 + 4 * v2 + a1);
v9 = *(_DWORD *)(a1 + 4LL * v2 + 144144);
v10 = *(_DWORD *)(a1 + 4LL * v2 + 160160);
v11 = *(_DWORD *)(a1 + 4LL * v2 + 176176);
v12 = *(_DWORD *)(a1 + 4LL * v2 + 192192);
v13 = *(_DWORD *)((char *)&loc_32D50 + 4 * v3 + a1);
v14 = *(_DWORD *)(a1 + 4 * v3 + 224224);
LODWORD(v3) = *(_DWORD *)((char *)&loc_3AA70 + 4 * v3 + a1);
v15 = *(_QWORD *)(a1 + 260360);
*(_QWORD *)(a1 + 260360) = v15 + 1920;
v52 = ~v51;
v50 = ~v49;
v48 = ~v47;
v46 = ~v45;
v55 = ~v4;
v54 = ~v5;
v53 = ~v6;
v16 = ~v7;
v17 = ~v8;
v18 = ~v9;
v19 = ~v10;
v20 = ~v11;
result = (unsigned int)~v12;
v22 = ~v13;
v23 = ~v14;
v24 = ~(_DWORD)v3;
*(_DWORD *)((char *)&loc_3F900 + a1) = 0;
v25 = v15 + 1919;
v26 = 0x80000000;
v27 = 0;
do
{
if ( (v24 & v26) != 0 )
{
v28 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v28 + a1) = v25;
}
if ( (v23 & v26) != 0 )
{
v29 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v29 + a1) = v25 - 6;
}
if ( (v22 & v26) != 0 )
{
v30 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v30 + a1) = v25 - 10;
}
if ( ((unsigned int)result & v26) != 0 )
{
v31 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v31 + a1) = v25 - 12;
}
if ( (v20 & v26) != 0 )
{
v32 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v32 + a1) = v25 - 16;
}
if ( (v19 & v26) != 0 )
{
v33 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v33 + a1) = v25 - 18;
}
if ( (v18 & v26) != 0 )
{
v34 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v34 + a1) = v25 - 22;
}
if ( (v17 & v26) != 0 )
{
v35 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v35 + a1) = v25 - 28;
}
if ( (v16 & v26) != 0 )
{
v36 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v36 + a1) = v25 - 30;
}
if ( (v26 & v53) != 0 )
{
v37 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v37 + a1) = v25 - 36;
}
if ( (v26 & v54) != 0 )
{
v38 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v38 + a1) = v25 - 40;
}
if ( (v26 & v55) != 0 )
{
v39 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v39 + a1) = v25 - 42;
}
if ( (v26 & v46) != 0 )
{
v40 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v40 + a1) = v25 - 46;
}
if ( (v26 & v48) != 0 )
{
v41 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v41 + a1) = v25 - 48;
}
if ( (v26 & v50) != 0 )
{
v42 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v42 + a1) = v25 - 52;
}
if ( (v26 & v52) != 0 )
{
v43 = v27++;
*(_DWORD *)((char *)&loc_3F900 + a1) = v27;
*(_QWORD *)((char *)&loc_3E900 + 8 * v43 + a1) = v25 - 58;
}
v25 -= 60LL;
v44 = v26 <= 1;
v26 >>= 1;
}
while ( !v44 );
return result;
}
| primegen_fill:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x3f904]
CMP EAX,0xfa4
JNZ 0x0011dff8
MOV RDI,RBX
CALL 0x0011d4e8
ADD qword ptr [RBX + 0x3f910],0x1f480
XOR EAX,EAX
LAB_0011dff8:
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x3f904],ECX
MOVSXD RCX,EAX
MOV EAX,dword ptr [RBX + RCX*0x4]
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RBX + RCX*0x4 + 0x3e90]
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RBX + RCX*0x4 + 0x7d20]
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RBX + RCX*0x4 + 0xbbb0]
MOV dword ptr [RSP + 0xc],EAX
MOV R9D,dword ptr [RBX + RCX*0x4 + 0xfa40]
MOV R8D,dword ptr [RBX + RCX*0x4 + 0x138d0]
MOV EDI,dword ptr [RBX + RCX*0x4 + 0x17760]
MOV R11D,dword ptr [RBX + RCX*0x4 + 0x1b5f0]
MOV R13D,dword ptr [RBX + RCX*0x4 + 0x1f480]
MOV EBP,dword ptr [RBX + RCX*0x4 + 0x23310]
MOV R14D,dword ptr [RBX + RCX*0x4 + 0x271a0]
MOV R15D,dword ptr [RBX + RCX*0x4 + 0x2b030]
MOV EAX,dword ptr [RBX + RCX*0x4 + 0x2eec0]
MOV R12D,dword ptr [RBX + RCX*0x4 + 0x32d50]
MOV R10D,dword ptr [RBX + RCX*0x4 + 0x36be0]
MOV ECX,dword ptr [RBX + RCX*0x4 + 0x3aa70]
MOV RDX,qword ptr [RBX + 0x3f908]
LEA RSI,[RDX + 0x780]
MOV qword ptr [RBX + 0x3f908],RSI
NOT dword ptr [RSP + 0x18]
NOT dword ptr [RSP + 0x14]
NOT dword ptr [RSP + 0x10]
NOT dword ptr [RSP + 0xc]
NOT R9D
MOV dword ptr [RSP + 0x24],R9D
NOT R8D
MOV dword ptr [RSP + 0x20],R8D
NOT EDI
MOV dword ptr [RSP + 0x1c],EDI
NOT R11D
NOT R13D
NOT EBP
NOT R14D
NOT R15D
NOT EAX
NOT R12D
NOT R10D
NOT ECX
MOV dword ptr [RBX + 0x3f900],0x0
ADD RDX,0x77f
MOV ESI,0x80000000
XOR EDI,EDI
LAB_0011e0f3:
TEST ESI,ECX
JZ 0x0011e10a
MOVSXD R8,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R8*0x8 + 0x3e900],RDX
LAB_0011e10a:
TEST ESI,R10D
JZ 0x0011e126
LEA R8,[RDX + -0x6]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e126:
TEST ESI,R12D
JZ 0x0011e142
LEA R8,[RDX + -0xa]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e142:
TEST ESI,EAX
JZ 0x0011e15d
LEA R8,[RDX + -0xc]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e15d:
TEST ESI,R15D
JZ 0x0011e179
LEA R8,[RDX + -0x10]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e179:
TEST ESI,R14D
JZ 0x0011e195
LEA R8,[RDX + -0x12]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e195:
TEST ESI,EBP
JZ 0x0011e1b0
LEA R8,[RDX + -0x16]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e1b0:
TEST ESI,R13D
JZ 0x0011e1cc
LEA R8,[RDX + -0x1c]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e1cc:
TEST ESI,R11D
JZ 0x0011e1e8
LEA R8,[RDX + -0x1e]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e1e8:
TEST dword ptr [RSP + 0x1c],ESI
JZ 0x0011e205
LEA R8,[RDX + -0x24]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e205:
TEST dword ptr [RSP + 0x20],ESI
JZ 0x0011e222
LEA R8,[RDX + -0x28]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e222:
TEST dword ptr [RSP + 0x24],ESI
JZ 0x0011e23f
LEA R8,[RDX + -0x2a]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e23f:
TEST dword ptr [RSP + 0xc],ESI
JZ 0x0011e25c
LEA R8,[RDX + -0x2e]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e25c:
TEST dword ptr [RSP + 0x10],ESI
JZ 0x0011e279
LEA R8,[RDX + -0x30]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e279:
TEST dword ptr [RSP + 0x14],ESI
JZ 0x0011e296
LEA R8,[RDX + -0x34]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e296:
TEST dword ptr [RSP + 0x18],ESI
JZ 0x0011e2b3
LEA R8,[RDX + -0x3a]
MOVSXD R9,EDI
INC EDI
MOV dword ptr [RBX + 0x3f900],EDI
MOV qword ptr [RBX + R9*0x8 + 0x3e900],R8
LAB_0011e2b3:
MOV R8D,ESI
SHR R8D,0x1
ADD RDX,-0x3c
CMP ESI,0x1
MOV ESI,R8D
JA 0x0011e0f3
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void primegen_fill(long param_1)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
uint uVar9;
uint uVar10;
uint uVar11;
uint uVar12;
uint uVar13;
uint uVar14;
uint uVar15;
uint uVar16;
bool bVar17;
long lVar18;
uint uVar19;
int iVar20;
long lVar21;
iVar20 = *(int *)(param_1 + 0x3f904);
if (iVar20 == 0xfa4) {
primegen_sieve(param_1);
*(long *)(param_1 + 0x3f910) = *(long *)(param_1 + 0x3f910) + 0x1f480;
iVar20 = 0;
}
*(int *)(param_1 + 0x3f904) = iVar20 + 1;
lVar18 = (long)iVar20;
uVar1 = *(uint *)(param_1 + lVar18 * 4);
uVar2 = *(uint *)(param_1 + 0x3e90 + lVar18 * 4);
uVar3 = *(uint *)(param_1 + 0x7d20 + lVar18 * 4);
uVar4 = *(uint *)(param_1 + 0xbbb0 + lVar18 * 4);
uVar5 = *(uint *)(param_1 + 0xfa40 + lVar18 * 4);
uVar6 = *(uint *)(param_1 + 0x138d0 + lVar18 * 4);
uVar7 = *(uint *)(param_1 + 0x17760 + lVar18 * 4);
uVar8 = *(uint *)(param_1 + 0x1b5f0 + lVar18 * 4);
uVar9 = *(uint *)(param_1 + 0x1f480 + lVar18 * 4);
uVar10 = *(uint *)(param_1 + 0x23310 + lVar18 * 4);
uVar11 = *(uint *)(param_1 + 0x271a0 + lVar18 * 4);
uVar12 = *(uint *)(param_1 + 0x2b030 + lVar18 * 4);
uVar13 = *(uint *)(param_1 + 0x2eec0 + lVar18 * 4);
uVar14 = *(uint *)(param_1 + 0x32d50 + lVar18 * 4);
uVar15 = *(uint *)(param_1 + 0x36be0 + lVar18 * 4);
uVar16 = *(uint *)(param_1 + 0x3aa70 + lVar18 * 4);
lVar18 = *(long *)(param_1 + 0x3f908);
*(long *)(param_1 + 0x3f908) = lVar18 + 0x780;
*(int4 *)(param_1 + 0x3f900) = 0;
lVar18 = lVar18 + 0x77f;
iVar20 = 0;
uVar19 = 0x80000000;
do {
if ((uVar19 & ~uVar16) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18;
}
if ((uVar19 & ~uVar15) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -6;
}
if ((uVar19 & ~uVar14) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -10;
}
if ((uVar19 & ~uVar13) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0xc;
}
if ((uVar19 & ~uVar12) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x10;
}
if ((uVar19 & ~uVar11) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x12;
}
if ((uVar19 & ~uVar10) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x16;
}
if ((uVar19 & ~uVar9) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x1c;
}
if ((uVar19 & ~uVar8) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x1e;
}
if ((~uVar7 & uVar19) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x24;
}
if ((~uVar6 & uVar19) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x28;
}
if ((~uVar5 & uVar19) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x2a;
}
if ((~uVar4 & uVar19) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x2e;
}
if ((~uVar3 & uVar19) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x30;
}
if ((~uVar2 & uVar19) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x34;
}
if ((~uVar1 & uVar19) != 0) {
lVar21 = (long)iVar20;
iVar20 = iVar20 + 1;
*(int *)(param_1 + 0x3f900) = iVar20;
*(long *)(param_1 + 0x3e900 + lVar21 * 8) = lVar18 + -0x3a;
}
lVar18 = lVar18 + -0x3c;
bVar17 = 1 < uVar19;
uVar19 = uVar19 >> 1;
} while (bVar17);
return;
}
| |
33,087 | minja::Value::to_str[abi:cxx11]() const | monkey531[P]llama/common/minja.hpp | std::string to_str() const {
if (is_string()) return get<std::string>();
if (is_number_integer()) return std::to_string(get<int64_t>());
if (is_number_float()) return std::to_string(get<double>());
if (is_boolean()) return get<bool>() ? "True" : "False";
if (is_null()) return "None";
return dump();
} | O3 | cpp | minja::Value::to_str[abi:cxx11]() const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl 0x40(%rsi), %eax
cmpl $0x3, %eax
jne 0x96977
movq %rbx, %rdi
callq 0x871c6
jmp 0x96ae0
leal -0x5(%rax), %ecx
cmpb $0x1, %cl
ja 0x969fe
movq %rsi, %rdi
callq 0x860e2
movq %rax, %r15
movq %rax, %r14
negq %r14
cmovsq %rax, %r14
movl $0x1, %r12d
cmpq $0xa, %r14
jb 0x96ab3
movl $0x4, %r12d
movabsq $0x346dc5d63886594b, %rsi # imm = 0x346DC5D63886594B
movq %r14, %rcx
cmpq $0x63, %rcx
jbe 0x96aaa
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x96ab0
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x96ab3
movq %rcx, %rax
mulq %rsi
shrq $0xb, %rdx
addl $0x4, %r12d
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x969b7
addl $-0x3, %r12d
jmp 0x96ab3
cmpl $0x4, %eax
je 0x96a32
cmpl $0x7, %eax
jne 0x96a61
movq %rsi, %rdi
callq 0x8622c
movq 0x95529(%rip), %rsi # 0x12bf40
leaq 0x59ece(%rip), %rcx # 0xf08ec
movl $0x148, %edx # imm = 0x148
movq %rbx, %rdi
movb $0x1, %al
callq 0x9782d
jmp 0x96ae0
movq %rsi, %rdi
callq 0x870b6
leaq 0x5925b(%rip), %rcx # 0xefc9c
leaq 0x59259(%rip), %rsi # 0xefca1
testb %al, %al
cmovneq %rcx, %rsi
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movzbl %al, %edx
xorq $0x5, %rdx
addq %rsi, %rdx
jmp 0x96a8f
testl %eax, %eax
jne 0x96a99
cmpq $0x0, 0x20(%rsi)
jne 0x96a99
cmpq $0x0, 0x10(%rsi)
jne 0x96a99
cmpq $0x0, 0x30(%rsi)
jne 0x96a99
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x59634(%rip), %rsi # 0xf00bc
leaq 0x59631(%rip), %rdx # 0xf00c0
movq %rbx, %rdi
callq 0x21cae
jmp 0x96ae0
movq %rbx, %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86378
jmp 0x96ae0
addl $-0x2, %r12d
jmp 0x96ab3
decl %r12d
shrq $0x3f, %r15
leal (%r15,%r12), %esi
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x1aa30
addq (%rbx), %r15
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %rdx
callq 0x5d661
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZNK5minja5Value6to_strB5cxx11Ev:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
movzx eax, byte ptr [rsi+40h]
cmp eax, 3
jnz short loc_96977
mov rdi, rbx
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
jmp loc_96AE0
loc_96977:
lea ecx, [rax-5]
cmp cl, 1
ja short loc_969FE
mov rdi, rsi
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
mov r14, rax
neg r14
cmovs r14, rax
mov r12d, 1
cmp r14, 0Ah
jb loc_96AB3
mov r12d, 4
mov rsi, 346DC5D63886594Bh
mov rcx, r14
loc_969B7:
cmp rcx, 63h ; 'c'
jbe loc_96AAA
cmp rcx, 3E7h
jbe loc_96AB0
cmp rcx, 2710h
jb loc_96AB3
mov rax, rcx
mul rsi
shr rdx, 0Bh
add r12d, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_969B7
add r12d, 0FFFFFFFDh
jmp loc_96AB3
loc_969FE:
cmp eax, 4
jz short loc_96A32
cmp eax, 7
jnz short loc_96A61
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
mov rsi, cs:vsnprintf_ptr
lea rcx, asc_F08EC; "%f"
mov edx, 148h
mov rdi, rbx
mov al, 1
call _ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z; __gnu_cxx::__to_xstring<std::string,char>(int (*)(char *,ulong,char const*,__va_list_tag *),ulong,char const*,...)
jmp loc_96AE0
loc_96A32:
mov rdi, rsi
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
lea rcx, aTrue_0; "True"
lea rsi, aFalse; "False"
test al, al
cmovnz rsi, rcx
lea rcx, [rbx+10h]
mov [rbx], rcx
movzx edx, al
xor rdx, 5
add rdx, rsi
jmp short loc_96A8F
loc_96A61:
test eax, eax
jnz short loc_96A99
cmp qword ptr [rsi+20h], 0
jnz short loc_96A99
cmp qword ptr [rsi+10h], 0
jnz short loc_96A99
cmp qword ptr [rsi+30h], 0
jnz short loc_96A99
lea rax, [rbx+10h]
mov [rbx], rax
lea rsi, aNone_0; "None"
lea rdx, aNone_0+4; ""
loc_96A8F:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
jmp short loc_96AE0
loc_96A99:
mov rdi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
jmp short loc_96AE0
loc_96AAA:
add r12d, 0FFFFFFFEh
jmp short loc_96AB3
loc_96AB0:
dec r12d
loc_96AB3:
shr r15, 3Fh
lea esi, [r15+r12]
lea rax, [rbx+10h]
mov [rbx], rax
mov rdi, rbx
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add r15, [rbx]
mov rdi, r15
mov esi, r12d
mov rdx, r14
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
loc_96AE0:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| _QWORD * minja::Value::to_str[abi:cxx11](_QWORD *a1, long long a2)
{
char v2; // al
int v3; // eax
long long v4; // rax
unsigned long long v5; // r14
int v6; // r12d
unsigned long long v7; // rcx
bool v8; // cc
int v9; // r8d
int v10; // r9d
unsigned __int8 v11; // al
char *v12; // rsi
char *v13; // rdx
unsigned long long v14; // r15
char v16; // [rsp-8h] [rbp-28h]
v16 = v2;
v3 = *(unsigned __int8 *)(a2 + 64);
if ( v3 == 3 )
{
minja::Value::get<std::string>((long long)a1, (_QWORD *)a2);
}
else
{
if ( (unsigned __int8)(v3 - 5) > 1u )
{
if ( v3 == 4 )
{
v11 = minja::Value::get<bool>((_QWORD *)a2);
v12 = "False";
if ( v11 )
v12 = "True";
*a1 = a1 + 2;
v13 = &v12[v11 ^ 5LL];
}
else
{
if ( v3 == 7 )
{
minja::Value::get<double>(a2);
__gnu_cxx::__to_xstring<std::string,char>(
(_DWORD)a1,
(unsigned int)&vsnprintf,
328,
(unsigned int)"%f",
v9,
v10,
v16);
return a1;
}
if ( *(_BYTE *)(a2 + 64) || *(_QWORD *)(a2 + 32) || *(_QWORD *)(a2 + 16) || *(_QWORD *)(a2 + 48) )
{
minja::Value::dump[abi:cxx11]((long long)a1, a2, 0xFFFFFFFF, 0);
return a1;
}
*a1 = a1 + 2;
v12 = "None";
v13 = "";
}
std::string::_M_construct<char const*>((long long)a1, v12, (long long)v13);
return a1;
}
v4 = minja::Value::get<long>(a2);
v5 = -v4;
if ( v4 > 0 )
v5 = v4;
v6 = 1;
if ( v5 >= 0xA )
{
v6 = 4;
v7 = v5;
while ( 1 )
{
if ( v7 <= 0x63 )
{
v6 -= 2;
goto LABEL_28;
}
if ( v7 <= 0x3E7 )
break;
if ( v7 < 0x2710 )
goto LABEL_28;
v6 += 4;
v8 = v7 <= 0x1869F;
v7 /= 0x2710uLL;
if ( v8 )
{
v6 -= 3;
goto LABEL_28;
}
}
--v6;
}
LABEL_28:
v14 = (unsigned long long)v4 >> 63;
*a1 = a1 + 2;
std::string::_M_construct(a1, (unsigned int)((unsigned long long)v4 >> 63) + v6, 45LL);
std::__detail::__to_chars_10_impl<unsigned long>((char *)(*a1 + v14), v6, v5);
}
return a1;
}
| to_str[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVZX EAX,byte ptr [RSI + 0x40]
CMP EAX,0x3
JNZ 0x00196977
MOV RDI,RBX
CALL 0x001871c6
JMP 0x00196ae0
LAB_00196977:
LEA ECX,[RAX + -0x5]
CMP CL,0x1
JA 0x001969fe
MOV RDI,RSI
CALL 0x001860e2
MOV R15,RAX
MOV R14,RAX
NEG R14
CMOVS R14,RAX
MOV R12D,0x1
CMP R14,0xa
JC 0x00196ab3
MOV R12D,0x4
MOV RSI,0x346dc5d63886594b
MOV RCX,R14
LAB_001969b7:
CMP RCX,0x63
JBE 0x00196aaa
CMP RCX,0x3e7
JBE 0x00196ab0
CMP RCX,0x2710
JC 0x00196ab3
MOV RAX,RCX
MUL RSI
SHR RDX,0xb
ADD R12D,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x001969b7
ADD R12D,-0x3
JMP 0x00196ab3
LAB_001969fe:
CMP EAX,0x4
JZ 0x00196a32
CMP EAX,0x7
JNZ 0x00196a61
MOV RDI,RSI
CALL 0x0018622c
MOV RSI,qword ptr [0x0022bf40]
LEA RCX,[0x1f08ec]
MOV EDX,0x148
MOV RDI,RBX
MOV AL,0x1
CALL 0x0019782d
JMP 0x00196ae0
LAB_00196a32:
MOV RDI,RSI
CALL 0x001870b6
LEA RCX,[0x1efc9c]
LEA RSI,[0x1efca1]
TEST AL,AL
CMOVNZ RSI,RCX
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
MOVZX EDX,AL
XOR RDX,0x5
ADD RDX,RSI
JMP 0x00196a8f
LAB_00196a61:
TEST EAX,EAX
JNZ 0x00196a99
CMP qword ptr [RSI + 0x20],0x0
JNZ 0x00196a99
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x00196a99
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x00196a99
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x1f00bc]
LEA RDX,[0x1f00c0]
LAB_00196a8f:
MOV RDI,RBX
CALL 0x00121cae
JMP 0x00196ae0
LAB_00196a99:
MOV RDI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186378
JMP 0x00196ae0
LAB_00196aaa:
ADD R12D,-0x2
JMP 0x00196ab3
LAB_00196ab0:
DEC R12D
LAB_00196ab3:
SHR R15,0x3f
LEA ESI,[R15 + R12*0x1]
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RDI,RBX
MOV EDX,0x2d
CALL 0x0011aa30
ADD R15,qword ptr [RBX]
MOV RDI,R15
MOV ESI,R12D
MOV RDX,R14
CALL 0x0015d661
LAB_00196ae0:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Value::to_str[abi:cxx11]() const */
void minja::Value::to_str_abi_cxx11_(void)
{
Value VVar1;
bool bVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
Value *in_RSI;
_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr *in_RDI;
uint uVar6;
ulong uVar7;
VVar1 = in_RSI[0x40];
if (VVar1 == (Value)0x3) {
get<std::__cxx11::string>();
}
else if ((byte)((char)VVar1 - 5U) < 2) {
uVar4 = get<long>(in_RSI);
uVar7 = -uVar4;
if (0 < (long)uVar4) {
uVar7 = uVar4;
}
uVar6 = 1;
if (9 < uVar7) {
uVar5 = uVar7;
uVar3 = 4;
do {
uVar6 = uVar3;
if (uVar5 < 100) {
uVar6 = uVar6 - 2;
goto LAB_00196ab3;
}
if (uVar5 < 1000) {
uVar6 = uVar6 - 1;
goto LAB_00196ab3;
}
if (uVar5 < 10000) goto LAB_00196ab3;
bVar2 = 99999 < uVar5;
uVar5 = uVar5 / 10000;
uVar3 = uVar6 + 4;
} while (bVar2);
uVar6 = uVar6 + 1;
}
LAB_00196ab3:
*(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10;
std::__cxx11::string::_M_construct((ulong)in_RDI,(char)uVar6 - (char)((long)uVar4 >> 0x3f));
std::__detail::__to_chars_10_impl<unsigned_long>
((char *)(*(long *)in_RDI - ((long)uVar4 >> 0x3f)),uVar6,uVar7);
}
else {
if (VVar1 == (Value)0x4) {
get<bool>(in_RSI);
*(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10;
}
else {
if (VVar1 == (Value)0x7) {
get<double>(in_RSI);
__gnu_cxx::__to_xstring<std::__cxx11::string,char>
(in_RDI,(ulong)PTR_vsnprintf_0022bf40,(char *)0x148,&DAT_001f08ec);
return;
}
if ((((VVar1 != (Value)0x0) || (*(long *)(in_RSI + 0x20) != 0)) ||
(*(long *)(in_RSI + 0x10) != 0)) || (*(long *)(in_RSI + 0x30) != 0)) {
dump_abi_cxx11_((int)in_RDI,SUB81(in_RSI,0));
return;
}
*(_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr **)in_RDI = in_RDI + 0x10;
}
std::__cxx11::string::_M_construct<char_const*>();
}
return;
}
| |
33,088 | ast_create_case | tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c | AstNode* ast_create_case(Arena* arena, AstNode* key, AstNode** clauses, size_t clause_count, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_CASE, line, column);
if (!node) {
return NULL;
}
node->as.case_expr.key = key;
node->as.case_expr.clauses = clauses;
node->as.case_expr.clause_count = clause_count;
return node;
} | O2 | c | ast_create_case:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
pushq $0x13
popq %rsi
movq %r8, %rdx
movq %r9, %rcx
callq 0x4488
testq %rax, %rax
je 0x4858
movq %r15, 0x48(%rax)
movq %r14, 0x50(%rax)
movq %rbx, 0x58(%rax)
popq %rbx
popq %r14
popq %r15
retq
| ast_create_case:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rsi
push 13h
pop rsi
mov rdx, r8
mov rcx, r9
call ast_create_node
test rax, rax
jz short loc_4858
mov [rax+48h], r15
mov [rax+50h], r14
mov [rax+58h], rbx
loc_4858:
pop rbx
pop r14
pop r15
retn
| _QWORD * ast_create_case(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
_QWORD *result; // rax
result = (_QWORD *)ast_create_node(a1, 19, a5, a6);
if ( result )
{
result[9] = a2;
result[10] = a3;
result[11] = a4;
}
return result;
}
| ast_create_case:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
PUSH 0x13
POP RSI
MOV RDX,R8
MOV RCX,R9
CALL 0x00104488
TEST RAX,RAX
JZ 0x00104858
MOV qword ptr [RAX + 0x48],R15
MOV qword ptr [RAX + 0x50],R14
MOV qword ptr [RAX + 0x58],RBX
LAB_00104858:
POP RBX
POP R14
POP R15
RET
|
void ast_create_case(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
long lVar1;
lVar1 = ast_create_node(param_1,0x13,param_5,param_6);
if (lVar1 != 0) {
*(int8 *)(lVar1 + 0x48) = param_2;
*(int8 *)(lVar1 + 0x50) = param_3;
*(int8 *)(lVar1 + 0x58) = param_4;
}
return;
}
| |
33,089 | mi_seq_search | eloqsql/storage/myisam/mi_search.c | int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
uchar *buff, my_bool *last_key)
{
int UNINIT_VAR(flag);
uint nod_flag,UNINIT_VAR(length),not_used[2];
uchar t_buff[HA_MAX_KEY_BUFF],*end;
DBUG_ENTER("_mi_seq_search");
end= page+mi_getint(page);
nod_flag=mi_test_if_nod(page);
page+=2+nod_flag;
*ret_pos=page;
t_buff[0]=0; /* Avoid bugs */
while (page < end)
{
length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff);
if (length == 0 || page > end)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_PRINT("error",
("Found wrong key: length: %u page: %p end: %p",
length, page, end));
DBUG_RETURN(MI_FOUND_WRONG_KEY);
}
if ((flag=ha_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag,
not_used)) >= 0)
break;
#ifdef EXTRA_DEBUG
DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d", (long) page, t_buff,
flag));
#endif
memcpy(buff,t_buff,length);
*ret_pos=page;
}
if (flag == 0)
memcpy(buff,t_buff,length); /* Result is first key */
*last_key= page == end;
DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos));
DBUG_RETURN(flag);
} | O3 | c | mi_seq_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x508, %rsp # imm = 0x508
movl %r9d, -0x508(%rbp)
movl %r8d, -0x504(%rbp)
movq %rcx, -0x520(%rbp)
movq %rsi, -0x510(%rbp)
movq 0x10(%rbp), %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzbl 0x1(%rdx), %ecx
movzbl (%rdx), %r9d
movl %r9d, %eax
andl $0x7f, %eax
shll $0x8, %eax
orq %rcx, %rax
xorl %esi, %esi
testb %r9b, %r9b
jns 0x87c28
movq (%rdi), %rcx
movl 0x17c(%rcx), %esi
movq %rdi, -0x518(%rbp)
leaq (%rdx,%rax), %rcx
movq %rcx, -0x500(%rbp)
leal 0x2(%rsi), %ecx
addq %rcx, %rdx
movq %rdx, -0x4f8(%rbp)
movq %rdx, (%rbx)
movb $0x0, -0x4f0(%rbp)
cmpl %ecx, %eax
jbe 0x87d37
leaq -0x4f0(%rbp), %rcx
movq -0x510(%rbp), %rdi
movq %rsi, %r12
leaq -0x4f8(%rbp), %rdx
movq %rcx, %r13
callq *0x48(%rdi)
testl %eax, %eax
je 0x87cf1
movl %eax, %r15d
movq -0x500(%rbp), %rax
cmpq %rax, -0x4f8(%rbp)
ja 0x87cf1
movq -0x510(%rbp), %rax
movq 0x28(%rax), %rdi
movq %r13, %rsi
movq -0x520(%rbp), %rdx
movl -0x504(%rbp), %ecx
movl -0x508(%rbp), %r8d
leaq -0x528(%rbp), %r9
callq 0xa16e2
movl %eax, %r14d
testl %eax, %eax
jns 0x87d1f
movl %r15d, %edx
movq 0x18(%rbp), %rdi
movq %r13, %rsi
callq 0x29080
movq -0x4f8(%rbp), %rax
movq %rax, (%rbx)
cmpq -0x500(%rbp), %rax
movq %r12, %rsi
movq %r13, %rcx
jb 0x87c60
jmp 0x87d37
movq -0x518(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7e1f6
callq 0xa4ab2
movl $0x7e, (%rax)
movl $0x7fffffff, %r14d # imm = 0x7FFFFFFF
jmp 0x87d4c
jne 0x87d37
movl %r15d, %edx
leaq -0x4f0(%rbp), %rsi
movq 0x18(%rbp), %rdi
callq 0x29080
xorl %r14d, %r14d
movq -0x500(%rbp), %rax
cmpq %rax, -0x4f8(%rbp)
movq 0x20(%rbp), %rax
sete (%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x87d70
movl %r14d, %eax
addq $0x508, %rsp # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29220
| _mi_seq_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 508h
mov [rbp+var_508], r9d
mov [rbp+var_504], r8d
mov [rbp+var_520], rcx
mov [rbp+var_510], rsi
mov rbx, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_30], rax
movzx ecx, byte ptr [rdx+1]
movzx r9d, byte ptr [rdx]
mov eax, r9d
and eax, 7Fh
shl eax, 8
or rax, rcx
xor esi, esi
test r9b, r9b
jns short loc_87C28
mov rcx, [rdi]
mov esi, [rcx+17Ch]
loc_87C28:
mov [rbp+var_518], rdi
lea rcx, [rdx+rax]
mov [rbp+var_500], rcx
lea ecx, [rsi+2]
add rdx, rcx
mov [rbp+var_4F8], rdx
mov [rbx], rdx
mov [rbp+var_4F0], 0
cmp eax, ecx
jbe loc_87D37
lea rcx, [rbp+var_4F0]
loc_87C60:
mov rdi, [rbp+var_510]
mov r12, rsi
lea rdx, [rbp+var_4F8]
mov r13, rcx
call qword ptr [rdi+48h]
test eax, eax
jz short loc_87CF1
mov r15d, eax
mov rax, [rbp+var_500]
cmp [rbp+var_4F8], rax
ja short loc_87CF1
mov rax, [rbp+var_510]
mov rdi, [rax+28h]
mov rsi, r13
mov rdx, [rbp+var_520]
mov ecx, [rbp+var_504]
mov r8d, [rbp+var_508]
lea r9, [rbp+var_528]
call ha_key_cmp
mov r14d, eax
test eax, eax
jns short loc_87D1F
mov edx, r15d
mov rdi, [rbp+arg_8]
mov rsi, r13
call _memcpy
mov rax, [rbp+var_4F8]
mov [rbx], rax
cmp rax, [rbp+var_500]
mov rsi, r12
mov rcx, r13
jb loc_87C60
jmp short loc_87D37
loc_87CF1:
mov rax, [rbp+var_518]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov r14d, 7FFFFFFFh
jmp short loc_87D4C
loc_87D1F:
jnz short loc_87D37
mov edx, r15d
lea rsi, [rbp+var_4F0]
mov rdi, [rbp+arg_8]
call _memcpy
xor r14d, r14d
loc_87D37:
mov rax, [rbp+var_500]
cmp [rbp+var_4F8], rax
mov rax, [rbp+arg_10]
setz byte ptr [rax]
loc_87D4C:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_87D70
mov eax, r14d
add rsp, 508h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_87D70:
call ___stack_chk_fail
| long long mi_seq_search(
long long a1,
long long a2,
char *a3,
long long a4,
unsigned int a5,
unsigned int a6,
char **a7,
long long a8,
bool *a9)
{
unsigned int v9; // r14d
unsigned long long v10; // rax
long long v11; // rsi
long long v12; // rcx
_BYTE *v13; // rcx
_BYTE *v14; // r13
unsigned int v15; // eax
unsigned int v16; // r15d
int v17; // eax
char *v18; // rax
char v20[8]; // [rsp+8h] [rbp-528h] BYREF
long long v21; // [rsp+10h] [rbp-520h]
long long v22; // [rsp+18h] [rbp-518h]
long long v23; // [rsp+20h] [rbp-510h]
unsigned int v24; // [rsp+28h] [rbp-508h]
unsigned int v25; // [rsp+2Ch] [rbp-504h]
char *v26; // [rsp+30h] [rbp-500h]
char *v27; // [rsp+38h] [rbp-4F8h] BYREF
_BYTE v28[1216]; // [rsp+40h] [rbp-4F0h] BYREF
unsigned long long v29; // [rsp+500h] [rbp-30h]
v24 = a6;
v25 = a5;
v21 = a4;
v23 = a2;
v29 = __readfsqword(0x28u);
v10 = (unsigned __int8)a3[1] | (unsigned long long)((unsigned __int8)(*a3 & 0x7F) << 8);
v11 = 0LL;
if ( *a3 < 0 )
v11 = *(unsigned int *)(*(_QWORD *)a1 + 380LL);
v22 = a1;
v26 = &a3[v10];
v12 = (unsigned int)(v11 + 2);
v27 = &a3[v12];
*a7 = &a3[v12];
v28[0] = 0;
if ( (unsigned int)v10 > (unsigned int)v12 )
{
v13 = v28;
while ( 1 )
{
v14 = v13;
v15 = (*(long long ( **)(long long, long long, char **))(v23 + 72))(v23, v11, &v27);
if ( !v15 || (v16 = v15, v27 > v26) )
{
mi_report_error(126, *(_QWORD *)(*(_QWORD *)v22 + 616LL));
*(_DWORD *)my_thread_var(126LL) = 126;
return 0x7FFFFFFF;
}
v17 = ha_key_cmp(*(_QWORD *)(v23 + 40), v14, v21, v25, v24, v20);
v9 = v17;
if ( v17 >= 0 )
break;
memcpy(a8, v14, v16);
v18 = v27;
*a7 = v27;
v13 = v14;
if ( v18 >= v26 )
goto LABEL_13;
}
if ( !v17 )
{
memcpy(a8, v28, v16);
v9 = 0;
}
}
LABEL_13:
*a9 = v27 == v26;
return v9;
}
| _mi_seq_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x508
MOV dword ptr [RBP + -0x508],R9D
MOV dword ptr [RBP + -0x504],R8D
MOV qword ptr [RBP + -0x520],RCX
MOV qword ptr [RBP + -0x510],RSI
MOV RBX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX ECX,byte ptr [RDX + 0x1]
MOVZX R9D,byte ptr [RDX]
MOV EAX,R9D
AND EAX,0x7f
SHL EAX,0x8
OR RAX,RCX
XOR ESI,ESI
TEST R9B,R9B
JNS 0x00187c28
MOV RCX,qword ptr [RDI]
MOV ESI,dword ptr [RCX + 0x17c]
LAB_00187c28:
MOV qword ptr [RBP + -0x518],RDI
LEA RCX,[RDX + RAX*0x1]
MOV qword ptr [RBP + -0x500],RCX
LEA ECX,[RSI + 0x2]
ADD RDX,RCX
MOV qword ptr [RBP + -0x4f8],RDX
MOV qword ptr [RBX],RDX
MOV byte ptr [RBP + -0x4f0],0x0
CMP EAX,ECX
JBE 0x00187d37
LEA RCX,[RBP + -0x4f0]
LAB_00187c60:
MOV RDI,qword ptr [RBP + -0x510]
MOV R12,RSI
LEA RDX,[RBP + -0x4f8]
MOV R13,RCX
CALL qword ptr [RDI + 0x48]
TEST EAX,EAX
JZ 0x00187cf1
MOV R15D,EAX
MOV RAX,qword ptr [RBP + -0x500]
CMP qword ptr [RBP + -0x4f8],RAX
JA 0x00187cf1
MOV RAX,qword ptr [RBP + -0x510]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x520]
MOV ECX,dword ptr [RBP + -0x504]
MOV R8D,dword ptr [RBP + -0x508]
LEA R9,[RBP + -0x528]
CALL 0x001a16e2
MOV R14D,EAX
TEST EAX,EAX
JNS 0x00187d1f
MOV EDX,R15D
MOV RDI,qword ptr [RBP + 0x18]
MOV RSI,R13
CALL 0x00129080
MOV RAX,qword ptr [RBP + -0x4f8]
MOV qword ptr [RBX],RAX
CMP RAX,qword ptr [RBP + -0x500]
MOV RSI,R12
MOV RCX,R13
JC 0x00187c60
JMP 0x00187d37
LAB_00187cf1:
MOV RAX,qword ptr [RBP + -0x518]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017e1f6
CALL 0x001a4ab2
MOV dword ptr [RAX],0x7e
MOV R14D,0x7fffffff
JMP 0x00187d4c
LAB_00187d1f:
JNZ 0x00187d37
MOV EDX,R15D
LEA RSI,[RBP + -0x4f0]
MOV RDI,qword ptr [RBP + 0x18]
CALL 0x00129080
XOR R14D,R14D
LAB_00187d37:
MOV RAX,qword ptr [RBP + -0x500]
CMP qword ptr [RBP + -0x4f8],RAX
MOV RAX,qword ptr [RBP + 0x20]
SETZ byte ptr [RAX]
LAB_00187d4c:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00187d70
MOV EAX,R14D
ADD RSP,0x508
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00187d70:
CALL 0x00129220
|
int _mi_seq_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5,
int4 param_6,int8 *param_7,void *param_8,int8 param_9)
{
uint uVar1;
ulong uVar2;
int4 *puVar3;
int iVar4;
int unaff_R14D;
long in_FS_OFFSET;
int1 local_530 [8];
int8 local_528;
long *local_520;
long local_518;
int4 local_510;
int4 local_50c;
byte *local_508;
byte *local_500;
int1 local_4f8 [1216];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = (ulong)((*param_3 & 0x7f) << 8) | (ulong)param_3[1];
iVar4 = 0;
if ((char)*param_3 < '\0') {
iVar4 = *(int *)(*param_1 + 0x17c);
}
local_508 = param_3 + uVar2;
local_500 = param_3 + (iVar4 + 2U);
*param_7 = local_500;
local_4f8[0] = 0;
local_528 = param_4;
local_520 = param_1;
local_518 = param_2;
local_510 = param_6;
local_50c = param_5;
if (iVar4 + 2U < (uint)uVar2) {
do {
uVar1 = (**(code **)(local_518 + 0x48))(local_518,iVar4,&local_500);
if ((uVar1 == 0) || (local_508 < local_500)) {
mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268));
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x7e;
unaff_R14D = 0x7fffffff;
goto LAB_00187d4c;
}
unaff_R14D = ha_key_cmp(*(int8 *)(local_518 + 0x28),local_4f8,local_528,local_50c,
local_510,local_530);
if (-1 < unaff_R14D) {
if (unaff_R14D == 0) {
memcpy(param_8,local_4f8,(ulong)uVar1);
unaff_R14D = 0;
}
break;
}
memcpy(param_8,local_4f8,(ulong)uVar1);
*param_7 = local_500;
} while (local_500 < local_508);
}
*(bool *)param_9 = local_500 == local_508;
LAB_00187d4c:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return unaff_R14D;
}
| |
33,090 | change_victim | eloqsql/mysys/waiting_threads.c | static void change_victim(WT_THD* found, struct deadlock_arg *arg)
{
if (found->weight < arg->victim->weight)
{
if (arg->victim != arg->thd)
{
rc_unlock(arg->victim->waiting_for); /* release the previous victim */
DBUG_ASSERT(arg->last_locked_rc == found->waiting_for);
}
arg->victim= found;
arg->last_locked_rc= 0;
}
} | O3 | c | change_victim:
movq 0x58(%rdi), %rcx
movq 0x10(%rsi), %rax
cmpq 0x58(%rax), %rcx
jae 0xa753e
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq (%rsi), %rax
je 0xa752e
movq 0x28(%rax), %rdi
addq $0x18, %rdi
callq 0xa44e6
movq %r14, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
| change_victim:
mov rcx, [rdi+58h]
mov rax, [rsi+10h]
cmp rcx, [rax+58h]
jnb short locret_A753E
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
cmp rax, [rsi]
jz short loc_A752E
mov rdi, [rax+28h]
add rdi, 18h
call my_rw_unlock
loc_A752E:
mov [rbx+10h], r14
mov qword ptr [rbx+18h], 0
pop rbx
pop r14
pop rbp
locret_A753E:
retn
| long long change_victim(long long a1, _QWORD *a2)
{
long long result; // rax
result = a2[2];
if ( *(_QWORD *)(a1 + 88) < *(_QWORD *)(result + 88) )
{
if ( result != *a2 )
result = my_rw_unlock(*(_QWORD *)(result + 40) + 24LL);
a2[2] = a1;
a2[3] = 0LL;
}
return result;
}
| change_victim:
MOV RCX,qword ptr [RDI + 0x58]
MOV RAX,qword ptr [RSI + 0x10]
CMP RCX,qword ptr [RAX + 0x58]
JNC 0x001a753e
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CMP RAX,qword ptr [RSI]
JZ 0x001a752e
MOV RDI,qword ptr [RAX + 0x28]
ADD RDI,0x18
CALL 0x001a44e6
LAB_001a752e:
MOV qword ptr [RBX + 0x10],R14
MOV qword ptr [RBX + 0x18],0x0
POP RBX
POP R14
POP RBP
LAB_001a753e:
RET
|
void change_victim(long param_1,long *param_2)
{
long lVar1;
lVar1 = param_2[2];
if (*(ulong *)(param_1 + 0x58) < *(ulong *)(lVar1 + 0x58)) {
if (lVar1 != *param_2) {
my_rw_unlock(*(long *)(lVar1 + 0x28) + 0x18);
}
param_2[2] = param_1;
param_2[3] = 0;
}
return;
}
| |
33,091 | my_caseup_8bit | eloqsql/strings/ctype-simple.c | size_t my_caseup_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map= cs->to_upper;
DBUG_ASSERT(srclen <= dstlen);
for ( ; src != end ; src++)
*dst++= (char) map[(uchar) *src];
return srclen;
} | O3 | c | my_caseup_8bit:
movq %rdx, %rax
testq %rdx, %rdx
je 0x377df
pushq %rbp
movq %rsp, %rbp
movq 0x50(%rdi), %rdx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
movb (%rdx,%r8), %r8b
movb %r8b, (%rcx,%rdi)
incq %rdi
cmpq %rdi, %rax
jne 0x377c9
popq %rbp
retq
| my_caseup_8bit:
mov rax, rdx
test rdx, rdx
jz short locret_377DF
push rbp
mov rbp, rsp
mov rdx, [rdi+50h]
xor edi, edi
loc_377C9:
movzx r8d, byte ptr [rsi+rdi]
mov r8b, [rdx+r8]
mov [rcx+rdi], r8b
inc rdi
cmp rax, rdi
jnz short loc_377C9
pop rbp
locret_377DF:
retn
| long long my_caseup_8bit(long long a1, long long a2, long long a3, long long a4)
{
long long result; // rax
long long v5; // rdx
long long v6; // rdi
result = a3;
if ( a3 )
{
v5 = *(_QWORD *)(a1 + 80);
v6 = 0LL;
do
{
*(_BYTE *)(a4 + v6) = *(_BYTE *)(v5 + *(unsigned __int8 *)(a2 + v6));
++v6;
}
while ( result != v6 );
}
return result;
}
| my_caseup_8bit:
MOV RAX,RDX
TEST RDX,RDX
JZ 0x001377df
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI + 0x50]
XOR EDI,EDI
LAB_001377c9:
MOVZX R8D,byte ptr [RSI + RDI*0x1]
MOV R8B,byte ptr [RDX + R8*0x1]
MOV byte ptr [RCX + RDI*0x1],R8B
INC RDI
CMP RAX,RDI
JNZ 0x001377c9
POP RBP
LAB_001377df:
RET
|
void my_caseup_8bit(long param_1,long param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
if (param_3 != 0) {
lVar1 = *(long *)(param_1 + 0x50);
lVar2 = 0;
do {
*(int1 *)(param_4 + lVar2) = *(int1 *)(lVar1 + (ulong)*(byte *)(param_2 + lVar2));
lVar2 = lVar2 + 1;
} while (param_3 != lVar2);
}
return;
}
| |
33,092 | uf_endspace_selected | eloqsql/storage/maria/ma_packrec.c | static void uf_endspace_selected(MARIA_COLUMNDEF *rec,
MARIA_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(end - spaces, spaces, ' ');
}
else
decode_bytes(rec,bit_buff,to,end);
} | O0 | c | uf_endspace_selected:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x4ebea
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x4ec12
jmp 0x4ecdf
movq -0x10(%rbp), %rdi
callq 0x4e0c0
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0x4ecdf
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jb 0x4ec55
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %ecx
movl %ecx, %edx
leaq 0x2714b3(%rip), %rcx # 0x2c0100
andl (%rcx,%rdx,4), %eax
movl %eax, -0x28(%rbp)
jmp 0x4ec68
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x4d870
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jbe 0x4ec8a
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
jmp 0x4ecf4
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
je 0x4ecbd
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %eax
movl %eax, %r8d
xorl %eax, %eax
subq %r8, %rax
addq %rax, %rcx
callq 0x4e400
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movl -0x24(%rbp), %eax
movl %eax, %edx
movl $0x20, %esi
callq 0x2a2a0
jmp 0x4ecf4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x4e400
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| uf_endspace_selected:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_4EBEA
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_4EC12
jmp loc_4ECDF
loc_4EBEA:
mov rdi, [rbp+var_10]
call fill_buffer
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz loc_4ECDF
loc_4EC12:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+24h]
jb short loc_4EC55
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+24h]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+24h]
mov edx, ecx
lea rcx, mask
and eax, [rcx+rdx*4]
mov [rbp+var_28], eax
jmp short loc_4EC68
loc_4EC55:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+24h]
call fill_and_get_bits
mov [rbp+var_28], eax
loc_4EC68:
mov ecx, [rbp+var_28]
mov [rbp+var_24], ecx
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
cmp rax, [rbp+var_20]
jbe short loc_4EC8A
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 1
jmp short loc_4ECF4
loc_4EC8A:
mov rax, [rbp+var_18]
mov ecx, [rbp+var_24]
add rax, rcx
cmp rax, [rbp+var_20]
jz short loc_4ECBD
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov eax, [rbp+var_24]
mov r8d, eax
xor eax, eax
sub rax, r8
add rcx, rax
call decode_bytes
loc_4ECBD:
mov rdi, [rbp+var_20]
mov eax, [rbp+var_24]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rdi, rax
mov eax, [rbp+var_24]
mov edx, eax
mov esi, 20h ; ' '
call _memset
jmp short loc_4ECF4
loc_4ECDF:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call decode_bytes
loc_4ECF4:
add rsp, 30h
pop rbp
retn
| long long uf_endspace_selected(long long a1, int *a2, _BYTE *a3, _BYTE *a4)
{
int v4; // eax
int v5; // ecx
unsigned int v6; // eax
int v7; // ecx
long long result; // rax
unsigned int bits; // [rsp+8h] [rbp-28h]
if ( a2[1] )
{
v4 = *a2;
v5 = a2[1] - 1;
a2[1] = v5;
if ( ((1 << v5) & v4) == 0 )
return decode_bytes(a1, (long long)a2, a3, a4);
}
else
{
fill_buffer((long long)a2);
a2[1] = 31;
if ( *a2 >= 0 )
return decode_bytes(a1, (long long)a2, a3, a4);
}
if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) )
{
bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36));
}
else
{
v6 = *a2;
v7 = a2[1] - *(_DWORD *)(a1 + 36);
a2[1] = v7;
bits = mask[*(unsigned int *)(a1 + 36)] & (v6 >> v7);
}
if ( &a3[bits] <= a4 )
{
if ( &a3[bits] != a4 )
decode_bytes(a1, (long long)a2, a3, &a4[-bits]);
return memset(&a4[-bits], 32LL, bits);
}
else
{
result = (long long)a2;
a2[10] = 1;
}
return result;
}
| uf_endspace_selected:
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
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x0014ebea
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x0014ec12
JMP 0x0014ecdf
LAB_0014ebea:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014e0c0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x0014ecdf
LAB_0014ec12:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x24]
JC 0x0014ec55
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x24]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x24]
MOV EDX,ECX
LEA RCX,[0x3c0100]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0014ec68
LAB_0014ec55:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x24]
CALL 0x0014d870
MOV dword ptr [RBP + -0x28],EAX
LAB_0014ec68:
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0014ec8a
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x1
JMP 0x0014ecf4
LAB_0014ec8a:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0014ecbd
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV R8D,EAX
XOR EAX,EAX
SUB RAX,R8
ADD RCX,RAX
CALL 0x0014e400
LAB_0014ecbd:
MOV RDI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
MOV ESI,0x20
CALL 0x0012a2a0
JMP 0x0014ecf4
LAB_0014ecdf:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x0014e400
LAB_0014ecf4:
ADD RSP,0x30
POP RBP
RET
|
void uf_endspace_selected(long param_1,uint *param_2,long param_3,ulong param_4)
{
uint uVar1;
uint local_30;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
decode_bytes(param_1,param_2,param_3,param_4);
}
else {
if (param_2[1] < *(uint *)(param_1 + 0x24)) {
local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x24);
param_2[1] = uVar1;
local_30 = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4);
}
if (param_4 < param_3 + (ulong)local_30) {
param_2[10] = 1;
}
else {
if (param_3 + (ulong)local_30 != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 - local_30);
}
memset((void *)(param_4 - local_30),0x20,(ulong)local_30);
}
}
return;
}
| |
33,093 | 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 # 0x59eb6
movq %rax, 0x80(%rdi)
leaq -0x13ae(%rip), %rax # 0x59ec5
movq %rax, 0x88(%rdi)
leaq -0x13a1(%rip), %rax # 0x59ee0
movq %rax, 0x90(%rdi)
leaq 0x6e83(%rip), %rax # 0x62112
movq %rax, 0x98(%rdi)
leaq 0x2e2353(%rip), %rax # 0x33d5f0
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0x13b0(%rip), %rax # 0x59efe
movq %rax, 0xa8(%rdi)
movq %rcx, %rdx
callq 0x5ae30
movq %rax, %rcx
testq %rax, %rax
sete %al
cmovneq %rcx, %r14
movq %r14, (%rbx)
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x5b2e8
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x362b0
| 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_5B2E8
add rsp, 0C0h
pop rbx
pop r14
pop rbp
retn
loc_5B2E8:
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); // [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,[0x159eb6]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x159ec5]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x159ee0]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x162112]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x43d5f0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x159efe]
MOV qword ptr [RDI + 0xa8],RAX
MOV RDX,RCX
CALL 0x0015ae30
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 0x0015b2e8
ADD RSP,0xc0
POP RBX
POP R14
POP RBP
RET
LAB_0015b2e8:
CALL 0x001362b0
|
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();
}
| |
33,094 | minja::IfNode::IfNode(minja::Location const&, std::vector<std::pair<std::shared_ptr<minja::Expression>, std::shared_ptr<minja::TemplateNode>>, std::allocator<std::pair<std::shared_ptr<minja::Expression>, std::shared_ptr<minja::TemplateNode>>>>&&) | monkey531[P]llama/common/minja.hpp | TemplateNode(const Location & location) : location_(location) {} | O3 | cpp | minja::IfNode::IfNode(minja::Location const&, std::vector<std::pair<std::shared_ptr<minja::Expression>, std::shared_ptr<minja::TemplateNode>>, std::allocator<std::pair<std::shared_ptr<minja::Expression>, std::shared_ptr<minja::TemplateNode>>>>&&):
leaq 0x8a271(%rip), %rax # 0x12afd8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0xa0d98
movq 0x8b1ff(%rip), %r8 # 0x12bf88
cmpb $0x0, (%r8)
je 0xa0d94
incl 0x8(%rax)
jmp 0xa0d98
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x8a761(%rip), %rax # 0x12b508
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movq %rax, 0x38(%rdi)
movups (%rcx), %xmm0
movq %rax, 0x8(%rcx)
movups %xmm0, 0x30(%rdi)
movq %rax, (%rcx)
retq
nop
| _ZN5minja10FilterNodeC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEOS4_INS_12TemplateNodeEE:
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_A0D98
mov r8, cs:__libc_single_threaded_ptr
cmp byte ptr [r8], 0
jz short loc_A0D94
inc dword ptr [rax+8]
jmp short loc_A0D98
loc_A0D94:
lock inc dword ptr [rax+8]
loc_A0D98:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja10FilterNodeE; `vtable for'minja::FilterNode
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [rcx], rax
retn
| long long minja::FilterNode::FilterNode(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4)
{
long long v4; // rax
long long result; // rax
__int128 v6; // xmm0
__int128 v7; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v4 = a2[1];
*(_QWORD *)(a1 + 16) = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v4 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v4 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::FilterNode + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
| FilterNode:
LEA RAX,[0x22afd8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001a0d98
MOV R8,qword ptr [0x0022bf88]
CMP byte ptr [R8],0x0
JZ 0x001a0d94
INC dword ptr [RAX + 0x8]
JMP 0x001a0d98
LAB_001a0d94:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001a0d98:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x22b508]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RCX],RAX
RET
|
/* minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::FilterNode::FilterNode
(FilterNode *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022afe8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_0022b518;
*(int8 *)(this + 0x28) = 0;
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar2;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar2;
*(int8 *)param_3 = 0;
return;
}
| |
33,095 | my_thread_global_end | eloqsql/mysys/my_thr_init.c | void my_thread_global_end(void)
{
struct timespec abstime;
my_bool all_threads_killed= 1;
set_timespec(abstime, my_thread_end_wait_time);
mysql_mutex_lock(&THR_LOCK_threads);
while (THR_thread_count > 0)
{
int error= mysql_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads,
&abstime);
if (error == ETIMEDOUT || error == ETIME)
{
#ifdef HAVE_PTHREAD_KILL
/*
We shouldn't give an error here, because if we don't have
pthread_kill(), programs like mysqld can't ensure that all threads
are killed when we enter here.
*/
if (THR_thread_count)
fprintf(stderr,
"Error in my_thread_global_end(): %d threads didn't exit\n",
THR_thread_count);
#endif
all_threads_killed= 0;
break;
}
}
mysql_mutex_unlock(&THR_LOCK_threads);
my_thread_destroy_common_mutex();
/*
Only destroy the mutex & conditions if we don't have other threads around
that could use them.
*/
if (all_threads_killed)
{
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done= 0;
} | O0 | c | my_thread_global_end:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb $0x1, -0x11(%rbp)
callq 0xf0260
movq %rax, -0x28(%rbp)
imulq $0x3e8, -0x28(%rbp), %rax # imm = 0x3E8
leaq 0x1c9914(%rip), %rcx # 0x2bfdd8
movl (%rcx), %ecx
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, -0x8(%rbp)
leaq 0xb8d149(%rip), %rdi # 0xc83648
leaq 0x5def4(%rip), %rsi # 0x1543fa
movl $0xce, %edx
callq 0xf65b0
leaq 0xb8cf31(%rip), %rax # 0xc83448
cmpl $0x0, (%rax)
jbe 0xf6584
leaq 0xb8d1b5(%rip), %rdi # 0xc836d8
leaq 0xb8d11e(%rip), %rsi # 0xc83648
leaq -0x10(%rbp), %rdx
leaq 0x5dec5(%rip), %rcx # 0x1543fa
movl $0xd2, %r8d
callq 0xf6620
movl %eax, -0x2c(%rbp)
cmpl $0x6e, -0x2c(%rbp)
je 0xf654f
cmpl $0x3e, -0x2c(%rbp)
jne 0xf6582
leaq 0xb8cef2(%rip), %rax # 0xc83448
cmpl $0x0, (%rax)
je 0xf657c
movq 0x1c6a7e(%rip), %rax # 0x2bcfe0
movq (%rax), %rdi
leaq 0xb8cedc(%rip), %rax # 0xc83448
movl (%rax), %edx
leaq 0x5dec2(%rip), %rsi # 0x154437
movb $0x0, %al
callq 0x2a170
movb $0x0, -0x11(%rbp)
jmp 0xf6584
jmp 0xf6510
leaq 0xb8d0bd(%rip), %rdi # 0xc83648
callq 0xf66a0
callq 0xf5f80
cmpb $0x0, -0x11(%rbp)
je 0xf65a0
callq 0xf6030
movb $0x0, 0xb8d169(%rip) # 0xc83710
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_thread_global_end:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_11], 1
call my_hrtime
mov [rbp+var_28], rax
imul rax, [rbp+var_28], 3E8h
lea rcx, my_thread_end_wait_time
mov ecx, [rcx]
imul rcx, 3B9ACA00h
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_8], rdx
lea rdi, THR_LOCK_threads
lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0CEh
call inline_mysql_mutex_lock_26
loc_F6510:
lea rax, THR_thread_count
cmp dword ptr [rax], 0
jbe short loc_F6584
lea rdi, THR_COND_threads
lea rsi, THR_LOCK_threads
lea rdx, [rbp+var_10]
lea rcx, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"...
mov r8d, 0D2h
call inline_mysql_cond_timedwait_1
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 6Eh ; 'n'
jz short loc_F654F
cmp [rbp+var_2C], 3Eh ; '>'
jnz short loc_F6582
loc_F654F:
lea rax, THR_thread_count
cmp dword ptr [rax], 0
jz short loc_F657C
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, THR_thread_count
mov edx, [rax]
lea rsi, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"...
mov al, 0
call _fprintf
loc_F657C:
mov [rbp+var_11], 0
jmp short loc_F6584
loc_F6582:
jmp short loc_F6510
loc_F6584:
lea rdi, THR_LOCK_threads
call inline_mysql_mutex_unlock_27
call my_thread_destroy_common_mutex
cmp [rbp+var_11], 0
jz short loc_F65A0
call my_thread_destroy_internal_mutex
loc_F65A0:
mov cs:my_thread_global_init_done, 0
add rsp, 30h
pop rbp
retn
| long long my_thread_global_end()
{
long long result; // rax
int v1; // [rsp+4h] [rbp-2Ch]
unsigned long long v2; // [rsp+10h] [rbp-20h]
char v3; // [rsp+1Fh] [rbp-11h]
_QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF
v3 = 1;
v2 = 1000000000LL * my_thread_end_wait_time + 1000 * my_hrtime();
v4[0] = v2 / 0x3B9ACA00;
v4[1] = v2 % 0x3B9ACA00;
inline_mysql_mutex_lock_26(&THR_LOCK_threads, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 206LL);
while ( THR_thread_count )
{
v1 = inline_mysql_cond_timedwait_1(
&THR_COND_threads,
&THR_LOCK_threads,
v4,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
210LL);
if ( v1 == 110 || v1 == 62 )
{
if ( THR_thread_count )
fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count);
v3 = 0;
break;
}
}
inline_mysql_mutex_unlock_27(&THR_LOCK_threads);
result = my_thread_destroy_common_mutex();
if ( v3 )
result = my_thread_destroy_internal_mutex();
my_thread_global_init_done = 0;
return result;
}
| my_thread_global_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV byte ptr [RBP + -0x11],0x1
CALL 0x001f0260
MOV qword ptr [RBP + -0x28],RAX
IMUL RAX,qword ptr [RBP + -0x28],0x3e8
LEA RCX,[0x3bfdd8]
MOV ECX,dword ptr [RCX]
IMUL RCX,RCX,0x3b9aca00
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x8],RDX
LEA RDI,[0xd83648]
LEA RSI,[0x2543fa]
MOV EDX,0xce
CALL 0x001f65b0
LAB_001f6510:
LEA RAX,[0xd83448]
CMP dword ptr [RAX],0x0
JBE 0x001f6584
LEA RDI,[0xd836d8]
LEA RSI,[0xd83648]
LEA RDX,[RBP + -0x10]
LEA RCX,[0x2543fa]
MOV R8D,0xd2
CALL 0x001f6620
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x6e
JZ 0x001f654f
CMP dword ptr [RBP + -0x2c],0x3e
JNZ 0x001f6582
LAB_001f654f:
LEA RAX,[0xd83448]
CMP dword ptr [RAX],0x0
JZ 0x001f657c
MOV RAX,qword ptr [0x003bcfe0]
MOV RDI,qword ptr [RAX]
LEA RAX,[0xd83448]
MOV EDX,dword ptr [RAX]
LEA RSI,[0x254437]
MOV AL,0x0
CALL 0x0012a170
LAB_001f657c:
MOV byte ptr [RBP + -0x11],0x0
JMP 0x001f6584
LAB_001f6582:
JMP 0x001f6510
LAB_001f6584:
LEA RDI,[0xd83648]
CALL 0x001f66a0
CALL 0x001f5f80
CMP byte ptr [RBP + -0x11],0x0
JZ 0x001f65a0
CALL 0x001f6030
LAB_001f65a0:
MOV byte ptr [0x00d83710],0x0
ADD RSP,0x30
POP RBP
RET
|
void my_thread_global_end(void)
{
bool bVar1;
int iVar2;
long lVar3;
ulong local_18;
ulong local_10;
bVar1 = true;
lVar3 = my_hrtime();
local_10 = lVar3 * 1000 + (ulong)my_thread_end_wait_time * 1000000000;
local_18 = local_10 / 1000000000;
local_10 = local_10 % 1000000000;
inline_mysql_mutex_lock
(THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xce);
do {
if (THR_thread_count == 0) goto LAB_001f6584;
iVar2 = inline_mysql_cond_timedwait
(THR_COND_threads,THR_LOCK_threads,&local_18,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2);
} while ((iVar2 != 0x6e) && (iVar2 != 0x3e));
if (THR_thread_count != 0) {
fprintf(*(FILE **)PTR_stderr_003bcfe0,
"Error in my_thread_global_end(): %d threads didn\'t exit\n",(ulong)THR_thread_count);
}
bVar1 = false;
LAB_001f6584:
inline_mysql_mutex_unlock(THR_LOCK_threads);
my_thread_destroy_common_mutex();
if (bVar1) {
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done = 0;
return;
}
| |
33,096 | MasterCommandHandler::handleCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | 666mxvbee[P]BattleShip/lib/Commands/MasterCommandHandler.cpp | bool MasterCommandHandler::handleCommand(const std::string& input) {
{
std::ifstream in("../game_data/settings.txt");
if (in.is_open()) {
bool newExit = false;
std::string line;
while (std::getline(in, line)) {
auto pos = line.find('=');
if (pos != std::string::npos) {
std::string key = line.substr(0, pos);
std::string val = line.substr(pos + 1);
if (key == "exit" && val == "1") {
newExit = true;
}
}
}
if (newExit) {
settings_.exitGame();
std::cout << "Master: Detected exit=1 from Slave.\n";
}
}
}
if (settings_.getExit()) {
std::cout << "Master: Exiting (because exit=1 in settings).\n";
return true;
}
std::istringstream iss(input);
std::string command;
iss >> command;
if (command == "set") {
handleSetCommand(iss);
}
else if (command == "start") {
handleStartCommand();
}
else if (command == "stop") {
handleStopCommand();
}
else if (command == "exit") {
settings_.exitGame();
std::cout << "Master: Exiting game.\n";
return true;
}
else if (command == "shot") {
handleShotCommand(iss);
}
else if (command == "print") {
std::string sub;
iss >> sub;
if (sub == "settings") {
printSettings(settings_);
} else {
std::cout << "Master: Unknown print subcommand.\n";
}
}
else {
std::cout << "Master: Unknown command.\n";
}
return false;
} | O1 | cpp | MasterCommandHandler::handleCommand(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 $0x2a8, %rsp # imm = 0x2A8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x42b0(%rip), %rsi # 0x1b5a6
leaq 0xa0(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x5620
leaq 0x118(%rsp), %rdi
callq 0x5080
testb %al, %al
je 0x174be
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r13d, %r13d
movq %rsp, %r12
movq 0xa0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5370
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5630
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x17454
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x173a5
movq (%rsp), %rbp
movq %rbp, %rdi
movl $0x3d, %esi
callq 0x5400
movq %rax, %rcx
subq %rbp, %rcx
cmpq $0x1, %rax
movl $0x0, %ebp
sbbq %rbp, %rbp
orq %rcx, %rbp
jmp 0x173ac
movq $-0x1, %rbp
cmpq $-0x1, %rbp
je 0x1733a
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x161ec
incq %rbp
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0x161ec
leaq 0x20(%rsp), %rdi
leaq 0x41d6(%rip), %rsi # 0x1b5c0
callq 0x7462
testl %eax, %eax
jne 0x17413
leaq 0x40(%rsp), %rdi
leaq 0x3614(%rip), %rsi # 0x1aa13
callq 0x7462
testl %eax, %eax
movzbl %r13b, %r13d
movl $0x1, %eax
cmovel %eax, %r13d
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x1742f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1733a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x1733a
testb $0x1, %r13b
je 0x174a3
movq (%rbx), %rsi
leaq 0x80(%rsp), %rdi
callq 0x6d40
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1748b
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0xdb0e(%rip), %rdi # 0x24fa0
leaq 0x412c(%rip), %rsi # 0x1b5c5
movl $0x24, %edx
callq 0x5420
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x174be
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
leaq 0xa0(%rsp), %rdi
callq 0x5090
movq (%rbx), %rdi
callq 0x6dcc
testb %al, %al
je 0x174f6
movq 0xdac2(%rip), %rdi # 0x24fa0
leaq 0x4105(%rip), %rsi # 0x1b5ea
movl $0x2e, %edx
callq 0x5420
movb $0x1, %bl
jmp 0x17707
leaq 0xa0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x55b0
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq %rsp, %rsi
movq %r15, %rdi
callq 0x5460
leaq 0x40e4(%rip), %rsi # 0x1b619
movq %rsp, %rdi
callq 0x7462
testl %eax, %eax
je 0x175d1
leaq 0x40d1(%rip), %rsi # 0x1b61d
movq %rsp, %rdi
callq 0x7462
testl %eax, %eax
je 0x175e6
leaq 0x40c0(%rip), %rsi # 0x1b623
movq %rsp, %rdi
callq 0x7462
testl %eax, %eax
je 0x175f3
leaq 0x4046(%rip), %rsi # 0x1b5c0
movq %rsp, %rdi
callq 0x7462
testl %eax, %eax
je 0x17600
leaq 0x40b2(%rip), %rsi # 0x1b63f
movq %rsp, %rdi
callq 0x7462
testl %eax, %eax
je 0x17647
leaq 0x32fb(%rip), %rsi # 0x1a89f
movq %rsp, %rdi
callq 0x7462
testl %eax, %eax
je 0x17659
movq 0xd9e5(%rip), %rdi # 0x24fa0
leaq 0x40ae(%rip), %rsi # 0x1b670
movl $0x19, %edx
callq 0x5420
jmp 0x176ce
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x177cc
jmp 0x176ce
movq %rbx, %rdi
callq 0x17cec
jmp 0x176ce
movq %rbx, %rdi
callq 0x181bc
jmp 0x176ce
movq (%rbx), %rsi
leaq 0x60(%rsp), %rdi
callq 0x6d40
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17628
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x53a0
movb $0x1, %bl
movq 0xd96f(%rip), %rdi # 0x24fa0
leaq 0x3ff0(%rip), %rsi # 0x1b628
movl $0x16, %edx
callq 0x5420
jmp 0x176d0
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x182ec
jmp 0x176ce
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0xa0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x5460
leaq 0x3fbd(%rip), %rsi # 0x1b644
leaq 0x20(%rsp), %rdi
callq 0x7462
testl %eax, %eax
je 0x176af
movq 0xd904(%rip), %rdi # 0x24fa0
leaq 0x3faa(%rip), %rsi # 0x1b64d
movl $0x22, %edx
callq 0x5420
jmp 0x176b7
movq (%rbx), %rdi
callq 0x19098
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x176ce
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
xorl %ebx, %ebx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x176e6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0xd893(%rip), %rsi # 0x24f80
leaq 0xa0(%rsp), %rdi
callq 0x54e0
leaq 0x118(%rsp), %rdi
callq 0x50f0
movl %ebx, %eax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x1775f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x1775f
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1779b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x1779b
jmp 0x17798
jmp 0x17798
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x17775
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0xd804(%rip), %rsi # 0x24f80
leaq 0xa0(%rsp), %rdi
callq 0x54e0
leaq 0x118(%rsp), %rdi
callq 0x50f0
jmp 0x177c3
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x177b6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
leaq 0xa0(%rsp), %rdi
callq 0x5090
movq %rbx, %rdi
callq 0x5600
nop
| _ZN20MasterCommandHandler13handleCommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
mov r14, rsi
mov rbx, rdi
lea rsi, aGameDataSettin; "../game_data/settings.txt"
lea r15, [rsp+2D8h+var_238]
mov rdi, r15
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
lea rdi, [rsp+2D8h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_174BE
lea rax, [rsp+2D8h+var_2C8]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
xor r13d, r13d
mov r12, rsp
loc_1733A:
mov rax, qword ptr [rsp+2D8h+var_238]
mov rdi, [rax-18h]
add rdi, r15
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx edx, al
mov rdi, r15
mov rsi, r12
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_17454
mov rdx, [rsp+2D8h+var_2D0]
test rdx, rdx
jz short loc_173A5
mov rbp, [rsp+2D8h+var_2D8]
mov rdi, rbp
mov esi, 3Dh ; '='
call _memchr
mov rcx, rax
sub rcx, rbp
cmp rax, 1
mov ebp, 0
sbb rbp, rbp
or rbp, rcx
jmp short loc_173AC
loc_173A5:
mov rbp, 0FFFFFFFFFFFFFFFFh
loc_173AC:
cmp rbp, 0FFFFFFFFFFFFFFFFh
jz short loc_1733A
lea rdi, [rsp+2D8h+var_2B8]
mov rsi, r12
xor edx, edx
mov rcx, rbp
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
inc rbp
lea rdi, [rsp+2D8h+var_298]
mov rsi, r12
mov rdx, rbp
mov rcx, 0FFFFFFFFFFFFFFFFh
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rdi, [rsp+2D8h+var_2B8]
lea rsi, aExit; "exit"
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz short loc_17413
lea rdi, [rsp+2D8h+var_298]
lea rsi, aDc1+2; "1"
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
movzx r13d, r13b
mov eax, 1
cmovz r13d, eax
loc_17413:
mov rdi, [rsp+2D8h+var_298]; void *
lea rax, [rsp+2D8h+var_288]
cmp rdi, rax
jz short loc_1742F
mov rsi, [rsp+2D8h+var_288]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1742F:
mov rdi, [rsp+2D8h+var_2B8]; void *
lea rax, [rsp+2D8h+var_2A8]
cmp rdi, rax
jz loc_1733A
mov rsi, [rsp+2D8h+var_2A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_1733A
loc_17454:
test r13b, 1
jz short loc_174A3
mov rsi, [rbx]
lea rdi, [rsp+2D8h+var_258]
call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void)
lea rax, [rsp+2D8h+var_248]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1748B
mov rsi, [rsp+2D8h+var_248]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1748B:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterDetected; "Master: Detected exit=1 from Slave.\n"
mov edx, 24h ; '$'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_174A3:
mov rdi, [rsp+2D8h+var_2D8]; void *
lea rax, [rsp+2D8h+var_2C8]
cmp rdi, rax
jz short loc_174BE
mov rsi, [rsp+2D8h+var_2C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_174BE:
lea rdi, [rsp+2D8h+var_238]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, [rbx]; this
call _ZNK8Settings7getExitEv; Settings::getExit(void)
test al, al
jz short loc_174F6
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterExitingB; "Master: Exiting (because exit=1 in sett"...
mov edx, 2Eh ; '.'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov bl, 1
jmp loc_17707
loc_174F6:
lea r15, [rsp+2D8h+var_238]
mov rdi, r15
mov rsi, r14
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea r14, [rsp+2D8h+var_2C8]
mov [r14-10h], r14
mov qword ptr [r14-8], 0
mov byte ptr [r14], 0
mov rsi, rsp
mov rdi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aSet; "set"
mov rdi, rsp
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_175D1
lea rsi, aStart; "start"
mov rdi, rsp
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_175E6
lea rsi, aStop; "stop"
mov rdi, rsp
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_175F3
lea rsi, aExit; "exit"
mov rdi, rsp
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_17600
lea rsi, aShot; "shot"
mov rdi, rsp
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_17647
lea rsi, aPrint; "print"
mov rdi, rsp
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_17659
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterUnknownC; "Master: Unknown command.\n"
mov edx, 19h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp loc_176CE
loc_175D1:
lea rsi, [rsp+2D8h+var_238]; int
mov rdi, rbx; int
call _ZN20MasterCommandHandler16handleSetCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE; MasterCommandHandler::handleSetCommand(std::istringstream &)
jmp loc_176CE
loc_175E6:
mov rdi, rbx; this
call _ZN20MasterCommandHandler18handleStartCommandEv; MasterCommandHandler::handleStartCommand(void)
jmp loc_176CE
loc_175F3:
mov rdi, rbx; this
call _ZN20MasterCommandHandler17handleStopCommandEv; MasterCommandHandler::handleStopCommand(void)
jmp loc_176CE
loc_17600:
mov rsi, [rbx]
lea rdi, [rsp+2D8h+var_278]
call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void)
lea rax, [rsp+2D8h+var_268]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_17628
mov rsi, [rsp+2D8h+var_268]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17628:
mov bl, 1
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterExitingG; "Master: Exiting game.\n"
mov edx, 16h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp loc_176D0
loc_17647:
lea rsi, [rsp+2D8h+var_238]; int
mov rdi, rbx; int
call _ZN20MasterCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE; MasterCommandHandler::handleShotCommand(std::istringstream &)
jmp short loc_176CE
loc_17659:
lea r15, [rsp+2D8h+var_2A8]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
lea rdi, [rsp+2D8h+var_238]
lea rsi, [rsp+2D8h+var_2B8]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aSettings; "settings"
lea rdi, [rsp+2D8h+var_2B8]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_176AF
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterUnknownP; "Master: Unknown print subcommand.\n"
mov edx, 22h ; '"'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_176B7
loc_176AF:
mov rdi, [rbx]; this
call _Z13printSettingsRK8Settings; printSettings(Settings const&)
loc_176B7:
mov rdi, [rsp+2D8h+var_2B8]; void *
cmp rdi, r15
jz short loc_176CE
mov rsi, [rsp+2D8h+var_2A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_176CE:
xor ebx, ebx
loc_176D0:
mov rdi, [rsp+2D8h+var_2D8]; void *
cmp rdi, r14
jz short loc_176E6
mov rsi, [rsp+2D8h+var_2C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_176E6:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+2D8h+var_238]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+2D8h+var_1C0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_17707:
mov eax, ebx
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_18]; void *
cmp rdi, r15
jz short loc_1775F
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1775F
mov rbx, rax
mov rdi, [rsp+arg_18]; void *
lea rax, [rsp+arg_28]
cmp rdi, rax
jz short loc_1779B
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1779B
jmp short loc_17798
jmp short loc_17798
mov rbx, rax
loc_1775F:
mov rdi, [rsp+0]; void *
cmp rdi, r14
jz short loc_17775
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17775:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_98]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_110]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_177C3
loc_17798:
mov rbx, rax
loc_1779B:
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_177B6
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_177B6:
lea rdi, [rsp+arg_98]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_177C3:
mov rdi, rbx
call __Unwind_Resume
| long long MasterCommandHandler::handleCommand(MasterCommandHandler *this, long long a2)
{
unsigned int v2; // ebx
char v3; // r13
char v4; // al
_QWORD *v5; // rax
void *v6; // rbp
long long v7; // rax
long long v8; // rbp
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
void *v18; // [rsp+0h] [rbp-2D8h] BYREF
long long v19; // [rsp+8h] [rbp-2D0h]
long long v20; // [rsp+10h] [rbp-2C8h] BYREF
void *v21; // [rsp+18h] [rbp-2C0h]
void *v22; // [rsp+20h] [rbp-2B8h] BYREF
long long v23; // [rsp+28h] [rbp-2B0h]
long long v24; // [rsp+30h] [rbp-2A8h] BYREF
int v25; // [rsp+38h] [rbp-2A0h]
void *v26; // [rsp+40h] [rbp-298h] BYREF
int v27; // [rsp+48h] [rbp-290h]
_QWORD v28[2]; // [rsp+50h] [rbp-288h] BYREF
void *v29[2]; // [rsp+60h] [rbp-278h] BYREF
_QWORD v30[2]; // [rsp+70h] [rbp-268h] BYREF
long long *v31; // [rsp+80h] [rbp-258h] BYREF
int v32; // [rsp+88h] [rbp-250h]
long long v33; // [rsp+90h] [rbp-248h] BYREF
int v34; // [rsp+98h] [rbp-240h]
int v35[2]; // [rsp+A0h] [rbp-238h] BYREF
int v36; // [rsp+A8h] [rbp-230h]
int v37; // [rsp+B0h] [rbp-228h]
int v38; // [rsp+B8h] [rbp-220h]
int v39; // [rsp+C0h] [rbp-218h]
int v40; // [rsp+C8h] [rbp-210h]
int v41; // [rsp+D0h] [rbp-208h]
int v42; // [rsp+D8h] [rbp-200h]
int v43; // [rsp+E0h] [rbp-1F8h]
char v44; // [rsp+E8h] [rbp-1F0h]
_BYTE v45[448]; // [rsp+118h] [rbp-1C0h] BYREF
v2 = (unsigned int)this;
std::ifstream::basic_ifstream(v35, "../game_data/settings.txt", 8LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v45) )
{
v18 = &v20;
v19 = 0LL;
LOBYTE(v20) = 0;
v3 = 0;
while ( 1 )
{
v4 = std::ios::widen((char *)v35 + *(_QWORD *)(*(_QWORD *)v35 - 24LL), 10LL);
v5 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v35, &v18, (unsigned int)v4);
if ( (*((_BYTE *)v5 + *(_QWORD *)(*v5 - 24LL) + 32) & 5) != 0 )
break;
if ( v19 )
{
v6 = v18;
v7 = memchr(v18, 61LL);
v8 = (v7 - (_QWORD)v6) | -(long long)(v7 == 0);
}
else
{
v8 = -1LL;
}
if ( v8 != -1 )
{
std::string::substr((long long)&v22, (long long)&v18, 0LL);
std::string::substr((long long)&v26, (long long)&v18, v8 + 1);
if ( !(unsigned int)std::string::compare(&v22, (long long)"exit")
&& !(unsigned int)std::string::compare(&v26, (long long)"1") )
{
v3 = 1;
}
if ( v26 != v28 )
operator delete(v26, v28[0] + 1LL);
if ( v22 != &v24 )
operator delete(v22, v24 + 1);
}
}
if ( (v3 & 1) != 0 )
{
Settings::exitGame[abi:cxx11](&v31, *(_QWORD *)this);
if ( v31 != &v33 )
operator delete(v31, v33 + 1);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Master: Detected exit=1 from Slave.\n", 36LL);
}
if ( v18 != &v20 )
operator delete(v18, v20 + 1);
}
std::ifstream::~ifstream(v35);
if ( (unsigned __int8)Settings::getExit(*(Settings **)this) )
{
std::__ostream_insert<char,std::char_traits<char>>(
&std::cout,
"Master: Exiting (because exit=1 in settings).\n",
46LL);
LOBYTE(v2) = 1;
return v2;
}
std::istringstream::basic_istringstream(v35, a2, 8LL);
v18 = &v20;
v19 = 0LL;
LOBYTE(v20) = 0;
std::operator>><char>(v35, &v18);
if ( !(unsigned int)std::string::compare(&v18, (long long)"set") )
{
MasterCommandHandler::handleSetCommand(
(int)this,
(int)v35,
v9,
v10,
v11,
v12,
(int)v18,
v19,
v20,
(int)v21,
v22,
v23,
v24,
v25,
(int)v26,
v27,
v28[0],
v28[1],
(int)v29[0],
v29[1],
v30[0],
v30[1],
(int)v31,
v32,
v33,
v34,
v35[0],
v36,
v37,
v38,
v39,
v40,
v41,
v42,
v43,
v44);
}
else if ( !(unsigned int)std::string::compare(&v18, (long long)"start") )
{
MasterCommandHandler::handleStartCommand(this);
}
else if ( !(unsigned int)std::string::compare(&v18, (long long)"stop") )
{
MasterCommandHandler::handleStopCommand(this);
}
else
{
if ( !(unsigned int)std::string::compare(&v18, (long long)"exit") )
{
Settings::exitGame[abi:cxx11](v29, *(_QWORD *)this);
if ( v29[0] != v30 )
operator delete(v29[0], v30[0] + 1LL);
LOBYTE(v2) = 1;
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Master: Exiting game.\n", 22LL);
goto LABEL_43;
}
if ( !(unsigned int)std::string::compare(&v18, (long long)"shot") )
{
MasterCommandHandler::handleShotCommand(
(int)this,
(int)v35,
v13,
v14,
v15,
v16,
(int)v18,
v19,
v20,
v21,
(int)v22,
v23);
}
else if ( !(unsigned int)std::string::compare(&v18, (long long)"print") )
{
v22 = &v24;
v23 = 0LL;
LOBYTE(v24) = 0;
std::operator>><char>(v35, &v22);
if ( !(unsigned int)std::string::compare(&v22, (long long)"settings") )
printSettings(*(const Settings **)this);
else
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Master: Unknown print subcommand.\n", 34LL);
if ( v22 != &v24 )
operator delete(v22, v24 + 1);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Master: Unknown command.\n", 25LL);
}
}
v2 = 0;
LABEL_43:
if ( v18 != &v20 )
operator delete(v18, v20 + 1);
std::istringstream::~istringstream(v35, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v45);
return v2;
}
| handleCommand:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2a8
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x11b5a6]
LEA R15,[RSP + 0xa0]
MOV RDI,R15
MOV EDX,0x8
CALL 0x00105620
LEA RDI,[RSP + 0x118]
CALL 0x00105080
TEST AL,AL
JZ 0x001174be
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
XOR R13D,R13D
MOV R12,RSP
LAB_0011733a:
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R15
LAB_00117349:
MOV ESI,0xa
CALL 0x00105370
MOVSX EDX,AL
MOV RDI,R15
MOV RSI,R12
CALL 0x00105630
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00117454
MOV RDX,qword ptr [RSP + 0x8]
TEST RDX,RDX
JZ 0x001173a5
MOV RBP,qword ptr [RSP]
MOV RDI,RBP
MOV ESI,0x3d
CALL 0x00105400
MOV RCX,RAX
SUB RCX,RBP
CMP RAX,0x1
MOV EBP,0x0
SBB RBP,RBP
OR RBP,RCX
JMP 0x001173ac
LAB_001173a5:
MOV RBP,-0x1
LAB_001173ac:
CMP RBP,-0x1
JZ 0x0011733a
LAB_001173b2:
LEA RDI,[RSP + 0x20]
MOV RSI,R12
XOR EDX,EDX
MOV RCX,RBP
CALL 0x001161ec
INC RBP
LAB_001173c7:
LEA RDI,[RSP + 0x40]
MOV RSI,R12
MOV RDX,RBP
MOV RCX,-0x1
CALL 0x001161ec
LEA RDI,[RSP + 0x20]
LEA RSI,[0x11b5c0]
CALL 0x00107462
TEST EAX,EAX
JNZ 0x00117413
LEA RDI,[RSP + 0x40]
LEA RSI,[0x11aa13]
CALL 0x00107462
TEST EAX,EAX
MOVZX R13D,R13B
MOV EAX,0x1
CMOVZ R13D,EAX
LAB_00117413:
MOV RDI,qword ptr [RSP + 0x40]
LEA RAX,[RSP + 0x50]
CMP RDI,RAX
JZ 0x0011742f
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x001053a0
LAB_0011742f:
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x0011733a
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001053a0
JMP 0x0011733a
LAB_00117454:
TEST R13B,0x1
JZ 0x001174a3
MOV RSI,qword ptr [RBX]
LAB_0011745d:
LEA RDI,[RSP + 0x80]
CALL 0x00106d40
LEA RAX,[RSP + 0x90]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011748b
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x001053a0
LAB_0011748b:
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b5c5]
MOV EDX,0x24
CALL 0x00105420
LAB_001174a3:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x001174be
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001053a0
LAB_001174be:
LEA RDI,[RSP + 0xa0]
CALL 0x00105090
MOV RDI,qword ptr [RBX]
CALL 0x00106dcc
TEST AL,AL
JZ 0x001174f6
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b5ea]
MOV EDX,0x2e
CALL 0x00105420
MOV BL,0x1
JMP 0x00117707
LAB_001174f6:
LEA R15,[RSP + 0xa0]
MOV RDI,R15
MOV RSI,R14
MOV EDX,0x8
CALL 0x001055b0
LEA R14,[RSP + 0x10]
MOV qword ptr [R14 + -0x10],R14
MOV qword ptr [R14 + -0x8],0x0
MOV byte ptr [R14],0x0
LAB_00117523:
MOV RSI,RSP
MOV RDI,R15
CALL 0x00105460
LEA RSI,[0x11b619]
MOV RDI,RSP
CALL 0x00107462
TEST EAX,EAX
JZ 0x001175d1
LEA RSI,[0x11b61d]
MOV RDI,RSP
CALL 0x00107462
TEST EAX,EAX
JZ 0x001175e6
LEA RSI,[0x11b623]
MOV RDI,RSP
CALL 0x00107462
TEST EAX,EAX
JZ 0x001175f3
LEA RSI,[0x11b5c0]
MOV RDI,RSP
CALL 0x00107462
TEST EAX,EAX
JZ 0x00117600
LEA RSI,[0x11b63f]
MOV RDI,RSP
CALL 0x00107462
TEST EAX,EAX
JZ 0x00117647
LEA RSI,[0x11a89f]
MOV RDI,RSP
CALL 0x00107462
TEST EAX,EAX
JZ 0x00117659
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b670]
MOV EDX,0x19
CALL 0x00105420
JMP 0x001176ce
LAB_001175d1:
LEA RSI,[RSP + 0xa0]
MOV RDI,RBX
CALL 0x001177cc
JMP 0x001176ce
LAB_001175e6:
MOV RDI,RBX
CALL 0x00117cec
JMP 0x001176ce
LAB_001175f3:
MOV RDI,RBX
CALL 0x001181bc
JMP 0x001176ce
LAB_00117600:
MOV RSI,qword ptr [RBX]
LEA RDI,[RSP + 0x60]
CALL 0x00106d40
LEA RAX,[RSP + 0x70]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00117628
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x001053a0
LAB_00117628:
MOV BL,0x1
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b628]
MOV EDX,0x16
CALL 0x00105420
JMP 0x001176d0
LAB_00117647:
LEA RSI,[RSP + 0xa0]
MOV RDI,RBX
CALL 0x001182ec
JMP 0x001176ce
LAB_00117659:
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
LAB_0011766e:
LEA RDI,[RSP + 0xa0]
LEA RSI,[RSP + 0x20]
CALL 0x00105460
LEA RSI,[0x11b644]
LEA RDI,[RSP + 0x20]
CALL 0x00107462
TEST EAX,EAX
JZ 0x001176af
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b64d]
MOV EDX,0x22
CALL 0x00105420
JMP 0x001176b7
LAB_001176af:
MOV RDI,qword ptr [RBX]
CALL 0x00119098
LAB_001176b7:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R15
JZ 0x001176ce
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001053a0
LAB_001176ce:
XOR EBX,EBX
LAB_001176d0:
MOV RDI,qword ptr [RSP]
CMP RDI,R14
JZ 0x001176e6
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001053a0
LAB_001176e6:
MOV RSI,qword ptr [0x00124f80]
LEA RDI,[RSP + 0xa0]
CALL 0x001054e0
LEA RDI,[RSP + 0x118]
CALL 0x001050f0
LAB_00117707:
MOV EAX,EBX
ADD RSP,0x2a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MasterCommandHandler::handleCommand(std::__cxx11::string const&) */
ulong __thiscall MasterCommandHandler::handleCommand(MasterCommandHandler *this,string *param_1)
{
int1 *puVar1;
char cVar2;
int iVar3;
istream *piVar4;
void *pvVar5;
int7 uVar6;
ulong uVar7;
bool bVar8;
int1 *local_2d8;
size_t local_2d0;
int1 local_2c8;
int7 uStack_2c7;
int1 *local_2b8;
int8 local_2b0;
int1 local_2a8;
int7 uStack_2a7;
long *local_298 [2];
long local_288 [2];
long *local_278;
long local_268 [2];
long *local_258;
long local_248 [2];
long local_238 [15];
ios_base local_1c0 [400];
bool bVar9;
std::ifstream::ifstream((ifstream *)local_238,"../game_data/settings.txt",8);
cVar2 = std::__basic_file<char>::is_open();
if (cVar2 != '\0') {
local_2d8 = &local_2c8;
local_2d0 = 0;
local_2c8 = 0;
bVar9 = false;
bVar8 = false;
while( true ) {
/* try { // try from 00117349 to 00117360 has its CatchHandler @ 00117798 */
cVar2 = std::ios::widen((char)*(int8 *)(local_238[0] + -0x18) +
(char)(istream *)local_238);
piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_238,(string *)&local_2d8,cVar2);
puVar1 = local_2d8;
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break;
if (local_2d0 == 0) {
uVar7 = 0xffffffffffffffff;
}
else {
pvVar5 = memchr(local_2d8,0x3d,local_2d0);
uVar7 = -(ulong)(pvVar5 == (void *)0x0) | (long)pvVar5 - (long)puVar1;
}
if (uVar7 != 0xffffffffffffffff) {
/* try { // try from 001173b2 to 001173c3 has its CatchHandler @ 00117758 */
std::__cxx11::string::substr((ulong)&local_2b8,(ulong)&local_2d8);
/* try { // try from 001173c7 to 001173dd has its CatchHandler @ 00117737 */
std::__cxx11::string::substr((ulong)local_298,(ulong)&local_2d8);
iVar3 = std::__cxx11::string::compare((string *)&local_2b8,"exit");
if (iVar3 == 0) {
iVar3 = std::__cxx11::string::compare((string *)local_298,"1");
bVar8 = bVar9;
if (iVar3 == 0) {
bVar9 = true;
bVar8 = true;
}
}
if (local_298[0] != local_288) {
operator_delete(local_298[0],local_288[0] + 1);
}
if (local_2b8 != &local_2a8) {
operator_delete(local_2b8,CONCAT71(uStack_2a7,local_2a8) + 1);
}
}
}
if (bVar8) {
/* try { // try from 0011745d to 001174a2 has its CatchHandler @ 0011775a */
Settings::exitGame_abi_cxx11_();
if (local_258 != local_248) {
operator_delete(local_258,local_248[0] + 1);
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Detected exit=1 from Slave.\n",0x24);
}
if (local_2d8 != &local_2c8) {
operator_delete(local_2d8,CONCAT71(uStack_2c7,local_2c8) + 1);
}
}
std::ifstream::~ifstream((ifstream *)local_238);
cVar2 = Settings::getExit(*(Settings **)this);
uVar6 = (int7)((ulong)this >> 8);
if (cVar2 != '\0') {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Exiting (because exit=1 in settings).\n",0x2e);
uVar7 = CONCAT71(uVar6,1);
goto LAB_00117707;
}
std::__cxx11::istringstream::istringstream((istringstream *)local_238,param_1,8);
local_2d0 = 0;
local_2c8 = 0;
local_2d8 = &local_2c8;
/* try { // try from 00117523 to 00117656 has its CatchHandler @ 0011775c */
std::operator>>((istream *)local_238,(string *)&local_2d8);
iVar3 = std::__cxx11::string::compare((string *)&local_2d8,"set");
if (iVar3 == 0) {
handleSetCommand(this,(istringstream *)local_238);
LAB_001176ce:
uVar7 = 0;
}
else {
iVar3 = std::__cxx11::string::compare((string *)&local_2d8,"start");
if (iVar3 == 0) {
handleStartCommand(this);
goto LAB_001176ce;
}
iVar3 = std::__cxx11::string::compare((string *)&local_2d8,"stop");
if (iVar3 == 0) {
handleStopCommand(this);
goto LAB_001176ce;
}
iVar3 = std::__cxx11::string::compare((string *)&local_2d8,"exit");
if (iVar3 != 0) {
iVar3 = std::__cxx11::string::compare((string *)&local_2d8,"shot");
if (iVar3 == 0) {
handleShotCommand(this,(istringstream *)local_238);
}
else {
iVar3 = std::__cxx11::string::compare((string *)&local_2d8,"print");
if (iVar3 == 0) {
local_2b0 = 0;
local_2a8 = 0;
/* try { // try from 0011766e to 001176b6 has its CatchHandler @ 0011771b */
local_2b8 = &local_2a8;
std::operator>>((istream *)local_238,(string *)&local_2b8);
iVar3 = std::__cxx11::string::compare((string *)&local_2b8,"settings");
if (iVar3 == 0) {
printSettings(*(Settings **)this);
}
else {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Unknown print subcommand.\n",0x22);
}
if (local_2b8 != &local_2a8) {
operator_delete(local_2b8,CONCAT71(uStack_2a7,local_2a8) + 1);
}
}
else {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Unknown command.\n",0x19);
}
}
goto LAB_001176ce;
}
Settings::exitGame_abi_cxx11_();
if (local_278 != local_268) {
operator_delete(local_278,local_268[0] + 1);
}
uVar7 = CONCAT71(uVar6,1);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Exiting game.\n",0x16);
}
if (local_2d8 != &local_2c8) {
operator_delete(local_2d8,CONCAT71(uStack_2c7,local_2c8) + 1);
}
std::__cxx11::istringstream::~istringstream((istringstream *)local_238);
std::ios_base::~ios_base(local_1c0);
LAB_00117707:
return uVar7 & 0xffffffff;
}
| |
33,097 | MasterCommandHandler::handleCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | 666mxvbee[P]BattleShip/lib/Commands/MasterCommandHandler.cpp | bool MasterCommandHandler::handleCommand(const std::string& input) {
{
std::ifstream in("../game_data/settings.txt");
if (in.is_open()) {
bool newExit = false;
std::string line;
while (std::getline(in, line)) {
auto pos = line.find('=');
if (pos != std::string::npos) {
std::string key = line.substr(0, pos);
std::string val = line.substr(pos + 1);
if (key == "exit" && val == "1") {
newExit = true;
}
}
}
if (newExit) {
settings_.exitGame();
std::cout << "Master: Detected exit=1 from Slave.\n";
}
}
}
if (settings_.getExit()) {
std::cout << "Master: Exiting (because exit=1 in settings).\n";
return true;
}
std::istringstream iss(input);
std::string command;
iss >> command;
if (command == "set") {
handleSetCommand(iss);
}
else if (command == "start") {
handleStartCommand();
}
else if (command == "stop") {
handleStopCommand();
}
else if (command == "exit") {
settings_.exitGame();
std::cout << "Master: Exiting game.\n";
return true;
}
else if (command == "shot") {
handleShotCommand(iss);
}
else if (command == "print") {
std::string sub;
iss >> sub;
if (sub == "settings") {
printSettings(settings_);
} else {
std::cout << "Master: Unknown print subcommand.\n";
}
}
else {
std::cout << "Master: Unknown command.\n";
}
return false;
} | O2 | cpp | MasterCommandHandler::handleCommand(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 $0x2b8, %rsp # imm = 0x2B8
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x37f1(%rip), %rsi # 0x185bf
leaq 0xb0(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x55d0
leaq 0x128(%rsp), %rdi
callq 0x5080
leaq 0x18(%rsp), %r12
testb %al, %al
je 0x14f04
movq %r15, 0x48(%rsp)
leaq 0x8(%rsp), %r15
movq %r12, (%r15)
andq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
xorl %r13d, %r13d
leaq 0xb0(%rsp), %r12
pushq $0x3d
popq %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x5060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x14eba
movq %r15, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x13d8e
cmpq $-0x1, %rax
je 0x14e1d
movq %rax, %r14
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x13de0
incq %r14
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
pushq $-0x1
popq %rcx
callq 0x13de0
leaq 0x28(%rsp), %rdi
leaq 0x3756(%rip), %rsi # 0x185d9
callq 0x6a6d
leaq 0x50(%rsp), %r14
testb %al, %al
je 0x14ea3
movq %r14, %rdi
leaq 0x2bc3(%rip), %rsi # 0x17a5e
callq 0x6a6d
orb %al, %r13b
movq %r14, %rdi
callq 0x5ac8
leaq 0x28(%rsp), %rdi
callq 0x5ac8
jmp 0x14e1d
testb $0x1, %r13b
je 0x14ef0
movq (%rbx), %rsi
leaq 0x90(%rsp), %rdi
callq 0x6586
leaq 0x90(%rsp), %rdi
callq 0x5ac8
movq 0x100b4(%rip), %rdi # 0x24f98
leaq 0x36f3(%rip), %rsi # 0x185de
callq 0x5360
leaq 0x8(%rsp), %rdi
callq 0x5ac8
movq 0x48(%rsp), %r15
leaq 0x18(%rsp), %r12
leaq 0xb0(%rsp), %rdi
callq 0x5090
movq (%rbx), %rdi
callq 0x65f4
testb %al, %al
je 0x14f37
movq 0x10074(%rip), %rdi # 0x24f98
leaq 0x36d8(%rip), %rsi # 0x18603
callq 0x5360
movb $0x1, %bl
jmp 0x14fe2
leaq 0xb0(%rsp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x5560
leaq 0x8(%rsp), %rsi
movq %r12, (%rsi)
andq $0x0, 0x8(%rsi)
movb $0x0, 0x10(%rsi)
movq %r14, %rdi
callq 0x5440
leaq 0x36c5(%rip), %rsi # 0x18632
leaq 0x8(%rsp), %rdi
callq 0x6a6d
testb %al, %al
je 0x14f8d
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdi
callq 0x15154
jmp 0x14fc9
leaq 0x36a2(%rip), %rsi # 0x18636
leaq 0x8(%rsp), %rdi
callq 0x6a6d
testb %al, %al
je 0x14fac
movq %rbx, %rdi
callq 0x154da
jmp 0x14fc9
leaq 0x3689(%rip), %rsi # 0x1863c
leaq 0x8(%rsp), %rdi
callq 0x6a6d
testb %al, %al
je 0x14ff6
movq %rbx, %rdi
callq 0x15882
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0x5ac8
leaq 0xb0(%rsp), %rdi
callq 0x5180
movl %ebx, %eax
addq $0x2b8, %rsp # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x35dc(%rip), %rsi # 0x185d9
leaq 0x8(%rsp), %rdi
callq 0x6a6d
testb %al, %al
je 0x15039
movq (%rbx), %rsi
leaq 0x70(%rsp), %rdi
callq 0x6586
leaq 0x70(%rsp), %rdi
callq 0x5ac8
movb $0x1, %bl
movq 0xff6d(%rip), %rdi # 0x24f98
leaq 0x360f(%rip), %rsi # 0x18641
callq 0x5360
jmp 0x14fcb
leaq 0x3618(%rip), %rsi # 0x18658
leaq 0x8(%rsp), %rdi
callq 0x6a6d
testb %al, %al
je 0x15063
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdi
callq 0x15954
jmp 0x14fc9
leaq 0x2880(%rip), %rsi # 0x178ea
leaq 0x8(%rsp), %rdi
callq 0x6a6d
testb %al, %al
je 0x150ba
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xb0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x5440
leaq 0x35bb(%rip), %rsi # 0x1865d
leaq 0x28(%rsp), %rdi
callq 0x6a6d
testb %al, %al
je 0x150d2
movq (%rbx), %rdi
callq 0x1641c
jmp 0x150e5
movq 0xfed7(%rip), %rdi # 0x24f98
leaq 0x35c1(%rip), %rsi # 0x18689
callq 0x5360
jmp 0x14fc9
movq 0xfebf(%rip), %rdi # 0x24f98
leaq 0x3586(%rip), %rsi # 0x18666
callq 0x5360
leaq 0x28(%rsp), %rdi
callq 0x5ac8
jmp 0x14fc9
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5ac8
jmp 0x15119
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5ac8
jmp 0x15135
jmp 0x15132
jmp 0x15132
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5ac8
leaq 0xb0(%rsp), %rdi
callq 0x5180
jmp 0x1514c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5ac8
leaq 0xb0(%rsp), %rdi
callq 0x5090
movq %rbx, %rdi
callq 0x55b0
| _ZN20MasterCommandHandler13handleCommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2B8h
mov r15, rsi
mov rbx, rdi
lea rsi, aGameDataSettin; "../game_data/settings.txt"
lea rdi, [rsp+2E8h+var_238]
push 8
pop rdx
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
lea rdi, [rsp+2E8h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
lea r12, [rsp+2E8h+var_2D0]
test al, al
jz loc_14F04
mov [rsp+2E8h+var_2A0], r15
lea r15, [rsp+2E8h+var_2E0]
mov [r15], r12
and qword ptr [r15+8], 0
mov byte ptr [r15+10h], 0
xor r13d, r13d
lea r12, [rsp+2E8h+var_238]
push 3Dh ; '='
pop rbp
loc_14E1D:
mov rdi, r12
mov rsi, r15
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_14EBA
mov rdi, r15
mov esi, ebp
xor edx, edx
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_14E1D
mov r14, rax
lea rdi, [rsp+2E8h+var_2C0]
mov rsi, r15
xor edx, edx
mov rcx, rax
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
inc r14
lea rdi, [rsp+2E8h+var_298]
mov rsi, r15
mov rdx, r14
push 0FFFFFFFFFFFFFFFFh
pop rcx
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rdi, [rsp+2E8h+var_2C0]
lea rsi, aExit; "exit"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
lea r14, [rsp+2E8h+var_298]
test al, al
jz short loc_14EA3
mov rdi, r14
lea rsi, aDc1+2; "1"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
or r13b, al
loc_14EA3:
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2E8h+var_2C0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_14E1D
loc_14EBA:
test r13b, 1
jz short loc_14EF0
mov rsi, [rbx]
lea rdi, [rsp+2E8h+var_258]
call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void)
lea rdi, [rsp+2E8h+var_258]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterDetected; "Master: Detected exit=1 from Slave.\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_14EF0:
lea rdi, [rsp+2E8h+var_2E0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov r15, [rsp+2E8h+var_2A0]
lea r12, [rsp+2E8h+var_2D0]
loc_14F04:
lea rdi, [rsp+2E8h+var_238]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, [rbx]; this
call _ZNK8Settings7getExitEv; Settings::getExit(void)
test al, al
jz short loc_14F37
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterExitingB; "Master: Exiting (because exit=1 in sett"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov bl, 1
jmp loc_14FE2
loc_14F37:
lea r14, [rsp+2E8h+var_238]
push 8
pop rdx
mov rdi, r14
mov rsi, r15
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rsi, [rsp+2E8h+var_2E0]
mov [rsi], r12
and qword ptr [rsi+8], 0
mov byte ptr [rsi+10h], 0
mov rdi, r14
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aSet; "set"
lea rdi, [rsp+2E8h+var_2E0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_14F8D
lea rsi, [rsp+2E8h+var_238]
mov rdi, rbx
call _ZN20MasterCommandHandler16handleSetCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE; MasterCommandHandler::handleSetCommand(std::istringstream &)
jmp short loc_14FC9
loc_14F8D:
lea rsi, aStart; "start"
lea rdi, [rsp+2E8h+var_2E0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_14FAC
mov rdi, rbx; this
call _ZN20MasterCommandHandler18handleStartCommandEv; MasterCommandHandler::handleStartCommand(void)
jmp short loc_14FC9
loc_14FAC:
lea rsi, aStop; "stop"
lea rdi, [rsp+2E8h+var_2E0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_14FF6
mov rdi, rbx; this
call _ZN20MasterCommandHandler17handleStopCommandEv; MasterCommandHandler::handleStopCommand(void)
loc_14FC9:
xor ebx, ebx
loc_14FCB:
lea rdi, [rsp+2E8h+var_2E0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2E8h+var_238]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
loc_14FE2:
mov eax, ebx
add rsp, 2B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_14FF6:
lea rsi, aExit; "exit"
lea rdi, [rsp+2E8h+var_2E0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_15039
mov rsi, [rbx]
lea rdi, [rsp+2E8h+var_278]
call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void)
lea rdi, [rsp+2E8h+var_278]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov bl, 1
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterExitingG; "Master: Exiting game.\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short loc_14FCB
loc_15039:
lea rsi, aShot; "shot"
lea rdi, [rsp+2E8h+var_2E0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_15063
lea rsi, [rsp+2E8h+var_238]
mov rdi, rbx
call _ZN20MasterCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE; MasterCommandHandler::handleShotCommand(std::istringstream &)
jmp loc_14FC9
loc_15063:
lea rsi, aPrint; "print"
lea rdi, [rsp+2E8h+var_2E0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_150BA
lea rax, [rsp+2E8h+var_2B0]
mov [rax-10h], rax
and qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea rdi, [rsp+2E8h+var_238]
lea rsi, [rsp+2E8h+var_2C0]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aSettings; "settings"
lea rdi, [rsp+2E8h+var_2C0]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_150D2
mov rdi, [rbx]; this
call _Z13printSettingsRK8Settings; printSettings(Settings const&)
jmp short loc_150E5
loc_150BA:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterUnknownC; "Master: Unknown command.\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_14FC9
loc_150D2:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterUnknownP; "Master: Unknown print subcommand.\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_150E5:
lea rdi, [rsp+2E8h+var_2C0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_14FC9
mov rbx, rax
lea rdi, [rsp+arg_20]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_15119
mov rbx, rax
lea rdi, [rsp+arg_20]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_15135
jmp short loc_15132
jmp short loc_15132
mov rbx, rax
loc_15119:
lea rdi, [rsp+arg_0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+arg_A8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
jmp short loc_1514C
loc_15132:
mov rbx, rax
loc_15135:
lea rdi, [rsp+arg_0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+arg_A8]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_1514C:
mov rdi, rbx
call __Unwind_Resume
| long long MasterCommandHandler::handleCommand(std::mutex **this, long long a2)
{
long long v2; // r15
unsigned int v3; // ebx
char v4; // r13
_QWORD *v5; // rax
long long v6; // rax
long long v7; // r14
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
_BYTE *v17; // [rsp+8h] [rbp-2E0h] BYREF
long long v18; // [rsp+10h] [rbp-2D8h]
_BYTE v19[16]; // [rsp+18h] [rbp-2D0h] BYREF
_QWORD v20[2]; // [rsp+28h] [rbp-2C0h] BYREF
char v21; // [rsp+38h] [rbp-2B0h] BYREF
long long v22; // [rsp+48h] [rbp-2A0h]
_BYTE v23[32]; // [rsp+50h] [rbp-298h] BYREF
_BYTE v24[32]; // [rsp+70h] [rbp-278h] BYREF
_BYTE v25[32]; // [rsp+90h] [rbp-258h] BYREF
_BYTE v26[120]; // [rsp+B0h] [rbp-238h] BYREF
_BYTE v27[448]; // [rsp+128h] [rbp-1C0h] BYREF
v2 = a2;
v3 = (unsigned int)this;
std::ifstream::basic_ifstream(v26, "../game_data/settings.txt", 8LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v27) )
{
v22 = a2;
v17 = v19;
v18 = 0LL;
v19[0] = 0;
v4 = 0;
while ( 1 )
{
v5 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v26, &v17);
if ( (*((_BYTE *)v5 + *(_QWORD *)(*v5 - 24LL) + 32) & 5) != 0 )
break;
v6 = std::string::find((long long *)&v17, 61, 0LL);
if ( v6 != -1 )
{
v7 = v6;
std::string::substr((long long)v20, (long long)&v17, 0LL, v6);
std::string::substr((long long)v23, (long long)&v17, v7 + 1, -1LL);
if ( std::operator==<char>((long long)v20) )
v4 |= std::operator==<char>((long long)v23);
std::string::~string();
std::string::~string();
}
}
if ( (v4 & 1) != 0 )
{
Settings::exitGame[abi:cxx11]((long long)v25, *this);
std::string::~string();
std::operator<<<std::char_traits<char>>(&std::cout, "Master: Detected exit=1 from Slave.\n");
}
std::string::~string();
v2 = v22;
}
std::ifstream::~ifstream(v26);
if ( !(unsigned __int8)Settings::getExit(*this) )
{
std::istringstream::basic_istringstream(v26, v2, 8LL);
v17 = v19;
v18 = 0LL;
v19[0] = 0;
std::operator>><char>(v26);
if ( std::operator==<char>((long long)&v17) )
{
MasterCommandHandler::handleSetCommand((_DWORD)this, (unsigned int)v26, v8, v9, v10, v11);
}
else if ( std::operator==<char>((long long)&v17) )
{
MasterCommandHandler::handleStartCommand((MasterCommandHandler *)this);
}
else if ( std::operator==<char>((long long)&v17) )
{
MasterCommandHandler::handleStopCommand((MasterCommandHandler *)this);
}
else
{
if ( std::operator==<char>((long long)&v17) )
{
Settings::exitGame[abi:cxx11]((long long)v24, *this);
std::string::~string();
LOBYTE(v3) = 1;
std::operator<<<std::char_traits<char>>(&std::cout, "Master: Exiting game.\n");
goto LABEL_20;
}
if ( std::operator==<char>((long long)&v17) )
{
MasterCommandHandler::handleShotCommand((_DWORD)this, (unsigned int)v26, v13, v14, v15, v16);
}
else if ( std::operator==<char>((long long)&v17) )
{
v20[0] = &v21;
v20[1] = 0LL;
v21 = 0;
std::operator>><char>(v26);
if ( std::operator==<char>((long long)v20) )
printSettings(*this);
else
std::operator<<<std::char_traits<char>>(&std::cout, "Master: Unknown print subcommand.\n");
std::string::~string();
}
else
{
std::operator<<<std::char_traits<char>>(&std::cout, "Master: Unknown command.\n");
}
}
v3 = 0;
LABEL_20:
std::string::~string();
std::istringstream::~istringstream(v26);
return v3;
}
std::operator<<<std::char_traits<char>>(&std::cout, "Master: Exiting (because exit=1 in settings).\n");
LOBYTE(v3) = 1;
return v3;
}
| handleCommand:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2b8
MOV R15,RSI
MOV RBX,RDI
LEA RSI,[0x1185bf]
LEA RDI,[RSP + 0xb0]
PUSH 0x8
POP RDX
CALL 0x001055d0
LEA RDI,[RSP + 0x128]
CALL 0x00105080
LEA R12,[RSP + 0x18]
TEST AL,AL
JZ 0x00114f04
MOV qword ptr [RSP + 0x48],R15
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],R12
AND qword ptr [R15 + 0x8],0x0
MOV byte ptr [R15 + 0x10],0x0
XOR R13D,R13D
LEA R12,[RSP + 0xb0]
PUSH 0x3d
POP RBP
LAB_00114e1d:
MOV RDI,R12
MOV RSI,R15
CALL 0x00105060
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00114eba
MOV RDI,R15
MOV ESI,EBP
XOR EDX,EDX
CALL 0x00113d8e
CMP RAX,-0x1
JZ 0x00114e1d
LAB_00114e4c:
MOV R14,RAX
LEA RDI,[RSP + 0x28]
MOV RSI,R15
XOR EDX,EDX
MOV RCX,RAX
CALL 0x00113de0
INC R14
LAB_00114e64:
LEA RDI,[RSP + 0x50]
MOV RSI,R15
MOV RDX,R14
PUSH -0x1
POP RCX
CALL 0x00113de0
LEA RDI,[RSP + 0x28]
LEA RSI,[0x1185d9]
CALL 0x00106a6d
LEA R14,[RSP + 0x50]
TEST AL,AL
JZ 0x00114ea3
MOV RDI,R14
LEA RSI,[0x117a5e]
CALL 0x00106a6d
OR R13B,AL
LAB_00114ea3:
MOV RDI,R14
CALL 0x00105ac8
LEA RDI,[RSP + 0x28]
CALL 0x00105ac8
JMP 0x00114e1d
LAB_00114eba:
TEST R13B,0x1
JZ 0x00114ef0
MOV RSI,qword ptr [RBX]
LAB_00114ec3:
LEA RDI,[RSP + 0x90]
CALL 0x00106586
LEA RDI,[RSP + 0x90]
CALL 0x00105ac8
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[0x1185de]
CALL 0x00105360
LAB_00114ef0:
LEA RDI,[RSP + 0x8]
CALL 0x00105ac8
MOV R15,qword ptr [RSP + 0x48]
LEA R12,[RSP + 0x18]
LAB_00114f04:
LEA RDI,[RSP + 0xb0]
CALL 0x00105090
MOV RDI,qword ptr [RBX]
CALL 0x001065f4
TEST AL,AL
JZ 0x00114f37
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[0x118603]
CALL 0x00105360
MOV BL,0x1
JMP 0x00114fe2
LAB_00114f37:
LEA R14,[RSP + 0xb0]
PUSH 0x8
POP RDX
MOV RDI,R14
MOV RSI,R15
CALL 0x00105560
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],R12
AND qword ptr [RSI + 0x8],0x0
MOV byte ptr [RSI + 0x10],0x0
LAB_00114f5e:
MOV RDI,R14
CALL 0x00105440
LEA RSI,[0x118632]
LEA RDI,[RSP + 0x8]
CALL 0x00106a6d
TEST AL,AL
JZ 0x00114f8d
LEA RSI,[RSP + 0xb0]
MOV RDI,RBX
CALL 0x00115154
JMP 0x00114fc9
LAB_00114f8d:
LEA RSI,[0x118636]
LEA RDI,[RSP + 0x8]
CALL 0x00106a6d
TEST AL,AL
JZ 0x00114fac
MOV RDI,RBX
CALL 0x001154da
JMP 0x00114fc9
LAB_00114fac:
LEA RSI,[0x11863c]
LEA RDI,[RSP + 0x8]
CALL 0x00106a6d
TEST AL,AL
JZ 0x00114ff6
MOV RDI,RBX
CALL 0x00115882
LAB_00114fc9:
XOR EBX,EBX
LAB_00114fcb:
LEA RDI,[RSP + 0x8]
CALL 0x00105ac8
LEA RDI,[RSP + 0xb0]
CALL 0x00105180
LAB_00114fe2:
MOV EAX,EBX
ADD RSP,0x2b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00114ff6:
LEA RSI,[0x1185d9]
LEA RDI,[RSP + 0x8]
CALL 0x00106a6d
TEST AL,AL
JZ 0x00115039
MOV RSI,qword ptr [RBX]
LEA RDI,[RSP + 0x70]
CALL 0x00106586
LEA RDI,[RSP + 0x70]
CALL 0x00105ac8
MOV BL,0x1
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[0x118641]
CALL 0x00105360
JMP 0x00114fcb
LAB_00115039:
LEA RSI,[0x118658]
LEA RDI,[RSP + 0x8]
CALL 0x00106a6d
TEST AL,AL
JZ 0x00115063
LEA RSI,[RSP + 0xb0]
MOV RDI,RBX
CALL 0x00115954
JMP 0x00114fc9
LAB_00115063:
LEA RSI,[0x1178ea]
LEA RDI,[RSP + 0x8]
CALL 0x00106a6d
TEST AL,AL
JZ 0x001150ba
LEA RAX,[RSP + 0x38]
MOV qword ptr [RAX + -0x10],RAX
AND qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LAB_00115089:
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0x28]
CALL 0x00105440
LEA RSI,[0x11865d]
LEA RDI,[RSP + 0x28]
CALL 0x00106a6d
TEST AL,AL
JZ 0x001150d2
MOV RDI,qword ptr [RBX]
CALL 0x0011641c
JMP 0x001150e5
LAB_001150ba:
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[0x118689]
CALL 0x00105360
JMP 0x00114fc9
LAB_001150d2:
MOV RDI,qword ptr [0x00124f98]
LEA RSI,[0x118666]
CALL 0x00105360
LAB_001150e5:
LEA RDI,[RSP + 0x28]
CALL 0x00105ac8
JMP 0x00114fc9
|
/* MasterCommandHandler::handleCommand(std::__cxx11::string const&) */
ulong __thiscall MasterCommandHandler::handleCommand(MasterCommandHandler *this,string *param_1)
{
char cVar1;
bool bVar2;
istream *piVar3;
long lVar4;
int7 uVar6;
ulong uVar5;
byte bVar7;
int1 *local_2e0;
int8 local_2d8;
int1 local_2d0 [16];
int1 *local_2c0;
int8 local_2b8;
int1 local_2b0 [16];
string *local_2a0;
string local_298 [32];
string local_278 [32];
string local_258 [32];
ifstream local_238 [520];
std::ifstream::ifstream(local_238,"../game_data/settings.txt",8);
cVar1 = std::__basic_file<char>::is_open();
if (cVar1 != '\0') {
local_2d8 = 0;
local_2d0[0] = 0;
bVar7 = 0;
local_2e0 = local_2d0;
local_2a0 = param_1;
while( true ) {
/* try { // try from 00114e1d to 00114e27 has its CatchHandler @ 00115132 */
piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_238,(string *)&local_2e0);
if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) != 0) break;
lVar4 = std::__cxx11::string::find((string *)&local_2e0,'=',0);
if (lVar4 != -1) {
/* try { // try from 00114e4c to 00114e60 has its CatchHandler @ 00115112 */
std::__cxx11::string::substr((ulong)&local_2c0,(ulong)&local_2e0);
/* try { // try from 00114e64 to 00114e76 has its CatchHandler @ 00115103 */
std::__cxx11::string::substr((ulong)local_298,(ulong)&local_2e0);
bVar2 = std::operator==((string *)&local_2c0,"exit");
if (bVar2) {
bVar2 = std::operator==(local_298,"1");
bVar7 = bVar7 | bVar2;
}
std::__cxx11::string::~string(local_298);
std::__cxx11::string::~string((string *)&local_2c0);
}
}
if (bVar7 != 0) {
/* try { // try from 00114ec3 to 00114eef has its CatchHandler @ 00115114 */
Settings::exitGame_abi_cxx11_();
std::__cxx11::string::~string(local_258);
std::operator<<((ostream *)PTR_cout_00124f98,"Master: Detected exit=1 from Slave.\n");
}
std::__cxx11::string::~string((string *)&local_2e0);
param_1 = local_2a0;
}
std::ifstream::~ifstream(local_238);
cVar1 = Settings::getExit(*(Settings **)this);
uVar6 = (int7)((ulong)this >> 8);
if (cVar1 != '\0') {
std::operator<<((ostream *)PTR_cout_00124f98,"Master: Exiting (because exit=1 in settings).\n");
uVar5 = CONCAT71(uVar6,1);
goto LAB_00114fe2;
}
std::__cxx11::istringstream::istringstream((istringstream *)local_238,param_1,8);
local_2d8 = 0;
local_2d0[0] = 0;
local_2e0 = local_2d0;
/* try { // try from 00114f5e to 0011505d has its CatchHandler @ 00115116 */
std::operator>>((istream *)local_238,(string *)&local_2e0);
bVar2 = std::operator==((string *)&local_2e0,"set");
if (bVar2) {
handleSetCommand(this,(istringstream *)local_238);
LAB_00114fc9:
uVar5 = 0;
}
else {
bVar2 = std::operator==((string *)&local_2e0,"start");
if (bVar2) {
handleStartCommand(this);
goto LAB_00114fc9;
}
bVar2 = std::operator==((string *)&local_2e0,"stop");
if (bVar2) {
handleStopCommand(this);
goto LAB_00114fc9;
}
bVar2 = std::operator==((string *)&local_2e0,"exit");
if (!bVar2) {
bVar2 = std::operator==((string *)&local_2e0,"shot");
if (bVar2) {
handleShotCommand(this,(istringstream *)local_238);
}
else {
bVar2 = std::operator==((string *)&local_2e0,"print");
if (bVar2) {
local_2c0 = local_2b0;
local_2b8 = 0;
local_2b0[0] = 0;
/* try { // try from 00115089 to 001150b7 has its CatchHandler @ 001150f4 */
std::operator>>((istream *)local_238,(string *)&local_2c0);
bVar2 = std::operator==((string *)&local_2c0,"settings");
if (bVar2) {
printSettings(*(Settings **)this);
}
else {
/* try { // try from 001150d2 to 001150e4 has its CatchHandler @ 001150f4 */
std::operator<<((ostream *)PTR_cout_00124f98,"Master: Unknown print subcommand.\n");
}
std::__cxx11::string::~string((string *)&local_2c0);
}
else {
/* try { // try from 001150ba to 001150cc has its CatchHandler @ 00115116 */
std::operator<<((ostream *)PTR_cout_00124f98,"Master: Unknown command.\n");
}
}
goto LAB_00114fc9;
}
Settings::exitGame_abi_cxx11_();
std::__cxx11::string::~string(local_278);
uVar5 = CONCAT71(uVar6,1);
std::operator<<((ostream *)PTR_cout_00124f98,"Master: Exiting game.\n");
}
std::__cxx11::string::~string((string *)&local_2e0);
std::__cxx11::istringstream::~istringstream((istringstream *)local_238);
LAB_00114fe2:
return uVar5 & 0xffffffff;
}
| |
33,098 | MasterCommandHandler::handleCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | 666mxvbee[P]BattleShip/lib/Commands/MasterCommandHandler.cpp | bool MasterCommandHandler::handleCommand(const std::string& input) {
{
std::ifstream in("../game_data/settings.txt");
if (in.is_open()) {
bool newExit = false;
std::string line;
while (std::getline(in, line)) {
auto pos = line.find('=');
if (pos != std::string::npos) {
std::string key = line.substr(0, pos);
std::string val = line.substr(pos + 1);
if (key == "exit" && val == "1") {
newExit = true;
}
}
}
if (newExit) {
settings_.exitGame();
std::cout << "Master: Detected exit=1 from Slave.\n";
}
}
}
if (settings_.getExit()) {
std::cout << "Master: Exiting (because exit=1 in settings).\n";
return true;
}
std::istringstream iss(input);
std::string command;
iss >> command;
if (command == "set") {
handleSetCommand(iss);
}
else if (command == "start") {
handleStartCommand();
}
else if (command == "stop") {
handleStopCommand();
}
else if (command == "exit") {
settings_.exitGame();
std::cout << "Master: Exiting game.\n";
return true;
}
else if (command == "shot") {
handleShotCommand(iss);
}
else if (command == "print") {
std::string sub;
iss >> sub;
if (sub == "settings") {
printSettings(settings_);
} else {
std::cout << "Master: Unknown print subcommand.\n";
}
}
else {
std::cout << "Master: Unknown command.\n";
}
return false;
} | O3 | cpp | MasterCommandHandler::handleCommand(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 $0x2b8, %rsp # imm = 0x2B8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x43a2(%rip), %rsi # 0x1b5dc
leaq 0xb0(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x5620
leaq 0x128(%rsp), %rdi
callq 0x5080
testb %al, %al
je 0x173fc
movq %r14, 0x48(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r14d, %r14d
leaq 0x8(%rsp), %r12
movq 0xb0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5370
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5630
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1738c
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
je 0x17285
movq 0x8(%rsp), %r13
movq %r13, %rdi
movl $0x3d, %esi
callq 0x5400
movq %rax, %rbp
testq %rax, %rax
sete %al
subq %r13, %rbp
cmpq $-0x1, %rbp
sete %cl
orb %al, %cl
jne 0x17285
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0x1614c
incq %rbp
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0x1614c
leaq 0x28(%rsp), %rdi
leaq 0x42cd(%rip), %rsi # 0x1b5f6
callq 0x7410
testl %eax, %eax
jne 0x1734b
leaq 0x50(%rsp), %rdi
leaq 0x36d5(%rip), %rsi # 0x1aa13
callq 0x7410
testl %eax, %eax
sete %al
orb %al, %r14b
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x17367
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x17285
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x17285
testb $0x1, %r14b
movq 0x48(%rsp), %r14
je 0x173e0
movq (%rbx), %rsi
leaq 0x90(%rsp), %rdi
callq 0x6ce4
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x173c8
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0xdbd1(%rip), %rdi # 0x24fa0
leaq 0x4225(%rip), %rsi # 0x1b5fb
movl $0x24, %edx
callq 0x5420
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x173fc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53a0
leaq 0xb0(%rsp), %rdi
callq 0x5090
movq (%rbx), %rdi
callq 0x6d70
testb %al, %al
je 0x17434
movq 0xdb84(%rip), %rdi # 0x24fa0
leaq 0x41fd(%rip), %rsi # 0x1b620
movl $0x2e, %edx
callq 0x5420
movb $0x1, %bl
jmp 0x1765a
leaq 0xb0(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x55b0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x5460
leaq 0x41da(%rip), %rsi # 0x1b64f
leaq 0x8(%rsp), %rdi
callq 0x7410
testl %eax, %eax
je 0x1751d
leaq 0x41c5(%rip), %rsi # 0x1b653
leaq 0x8(%rsp), %rdi
callq 0x7410
testl %eax, %eax
je 0x17532
leaq 0x41b2(%rip), %rsi # 0x1b659
leaq 0x8(%rsp), %rdi
callq 0x7410
testl %eax, %eax
je 0x1753f
leaq 0x4136(%rip), %rsi # 0x1b5f6
leaq 0x8(%rsp), %rdi
callq 0x7410
testl %eax, %eax
je 0x1754c
leaq 0x41a0(%rip), %rsi # 0x1b675
leaq 0x8(%rsp), %rdi
callq 0x7410
testl %eax, %eax
je 0x17599
leaq 0x33b1(%rip), %rsi # 0x1a89f
leaq 0x8(%rsp), %rdi
callq 0x7410
testl %eax, %eax
je 0x175ab
movq 0xda99(%rip), %rdi # 0x24fa0
leaq 0x4198(%rip), %rsi # 0x1b6a6
movl $0x19, %edx
callq 0x5420
jmp 0x17620
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdi
callq 0x17720
jmp 0x17620
movq %rbx, %rdi
callq 0x17c40
jmp 0x17620
movq %rbx, %rdi
callq 0x18122
jmp 0x17620
movq (%rbx), %rsi
leaq 0x70(%rsp), %rdi
callq 0x6ce4
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1757a
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x53a0
movb $0x1, %bl
movq 0xda1d(%rip), %rdi # 0x24fa0
leaq 0x40d4(%rip), %rsi # 0x1b65e
movl $0x16, %edx
callq 0x5420
jmp 0x17622
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdi
callq 0x18252
jmp 0x17620
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0xb0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x5460
leaq 0x40a1(%rip), %rsi # 0x1b67a
leaq 0x28(%rsp), %rdi
callq 0x7410
testl %eax, %eax
je 0x17601
movq 0xd9b2(%rip), %rdi # 0x24fa0
leaq 0x408e(%rip), %rsi # 0x1b683
movl $0x22, %edx
callq 0x5420
jmp 0x17609
movq (%rbx), %rdi
callq 0x19000
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x17620
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53a0
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x17639
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0xd940(%rip), %rsi # 0x24f80
leaq 0xb0(%rsp), %rdi
callq 0x54e0
leaq 0x128(%rsp), %rdi
callq 0x50f0
movl %ebx, %eax
addq $0x2b8, %rsp # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x176b2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x176b2
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x176ef
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x176ef
jmp 0x176ec
jmp 0x176ec
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x176c9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0xd8b0(%rip), %rsi # 0x24f80
leaq 0xb0(%rsp), %rdi
callq 0x54e0
leaq 0x128(%rsp), %rdi
callq 0x50f0
jmp 0x17718
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1770b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53a0
leaq 0xb0(%rsp), %rdi
callq 0x5090
movq %rbx, %rdi
callq 0x5600
| _ZN20MasterCommandHandler13handleCommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2B8h
mov r14, rsi
mov rbx, rdi
lea rsi, aGameDataSettin; "../game_data/settings.txt"
lea r15, [rsp+2E8h+var_238]
mov rdi, r15
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode)
lea rdi, [rsp+2E8h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_173FC
mov qword ptr [rsp+2E8h+var_2A0], r14; int
lea rax, [rsp+2E8h+var_2D0]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
xor r14d, r14d
lea r12, [rsp+2E8h+var_2E0]
loc_17285:
mov rax, qword ptr [rsp+2E8h+var_238]
mov rdi, [rax-18h]
add rdi, r15
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx edx, al
mov rdi, r15
mov rsi, r12
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_1738C
mov rdx, [rsp+2E8h+var_2D8]
test rdx, rdx
jz short loc_17285
mov r13, [rsp+2E8h+var_2E0]
mov rdi, r13
mov esi, 3Dh ; '='
call _memchr
mov rbp, rax
test rax, rax
setz al
sub rbp, r13
cmp rbp, 0FFFFFFFFFFFFFFFFh
setz cl
or cl, al
jnz short loc_17285
lea rdi, [rsp+2E8h+var_2C0]
mov rsi, r12
xor edx, edx
mov rcx, rbp
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
inc rbp
lea rdi, [rsp+2E8h+var_298]
mov rsi, r12
mov rdx, rbp
mov rcx, 0FFFFFFFFFFFFFFFFh
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rdi, [rsp+2E8h+var_2C0]
lea rsi, aExit; "exit"
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz short loc_1734B
lea rdi, [rsp+2E8h+var_298]
lea rsi, aDc1+2; "1"
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
setz al
or r14b, al
loc_1734B:
mov rdi, [rsp+2E8h+var_298]; void *
lea rax, [rsp+2E8h+var_288]
cmp rdi, rax
jz short loc_17367
mov rsi, [rsp+2E8h+var_288]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17367:
mov rdi, [rsp+2E8h+var_2C0]; void *
lea rax, [rsp+2E8h+var_2B0]
cmp rdi, rax
jz loc_17285
mov rsi, [rsp+2E8h+var_2B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_17285
loc_1738C:
test r14b, 1
mov r14, qword ptr [rsp+2E8h+var_2A0]
jz short loc_173E0
mov rsi, [rbx]
lea rdi, [rsp+2E8h+var_258]
call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void)
lea rax, [rsp+2E8h+var_248]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_173C8
mov rsi, [rsp+2E8h+var_248]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_173C8:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterDetected; "Master: Detected exit=1 from Slave.\n"
mov edx, 24h ; '$'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_173E0:
mov rdi, [rsp+2E8h+var_2E0]; void *
lea rax, [rsp+2E8h+var_2D0]
cmp rdi, rax
jz short loc_173FC
mov rsi, [rsp+2E8h+var_2D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_173FC:
lea rdi, [rsp+2E8h+var_238]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov rdi, [rbx]; this
call _ZNK8Settings7getExitEv; Settings::getExit(void)
test al, al
jz short loc_17434
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterExitingB; "Master: Exiting (because exit=1 in sett"...
mov edx, 2Eh ; '.'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov bl, 1
jmp loc_1765A
loc_17434:
lea r15, [rsp+2E8h+var_238]
mov rdi, r15
mov rsi, r14
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea r14, [rsp+2E8h+var_2D0]
mov [r14-10h], r14
mov qword ptr [r14-8], 0
mov byte ptr [r14], 0
lea rsi, [rsp+2E8h+var_2E0]
mov rdi, r15
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aSet; "set"
lea rdi, [rsp+2E8h+var_2E0]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_1751D
lea rsi, aStart; "start"
lea rdi, [rsp+2E8h+var_2E0]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_17532
lea rsi, aStop; "stop"
lea rdi, [rsp+2E8h+var_2E0]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_1753F
lea rsi, aExit; "exit"
lea rdi, [rsp+2E8h+var_2E0]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_1754C
lea rsi, aShot; "shot"
lea rdi, [rsp+2E8h+var_2E0]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_17599
lea rsi, aPrint; "print"
lea rdi, [rsp+2E8h+var_2E0]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_175AB
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterUnknownC; "Master: Unknown command.\n"
mov edx, 19h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp loc_17620
loc_1751D:
lea rsi, [rsp+2E8h+var_238]; int
mov rdi, rbx; int
call _ZN20MasterCommandHandler16handleSetCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE; MasterCommandHandler::handleSetCommand(std::istringstream &)
jmp loc_17620
loc_17532:
mov rdi, rbx; this
call _ZN20MasterCommandHandler18handleStartCommandEv; MasterCommandHandler::handleStartCommand(void)
jmp loc_17620
loc_1753F:
mov rdi, rbx; this
call _ZN20MasterCommandHandler17handleStopCommandEv; MasterCommandHandler::handleStopCommand(void)
jmp loc_17620
loc_1754C:
mov rsi, [rbx]
lea rdi, [rsp+2E8h+var_278]
call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void)
lea rax, [rsp+2E8h+var_268]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1757A
mov rsi, [rsp+2E8h+var_268]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1757A:
mov bl, 1
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterExitingG; "Master: Exiting game.\n"
mov edx, 16h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp loc_17622
loc_17599:
lea rsi, [rsp+2E8h+var_238]; int
mov rdi, rbx; int
call _ZN20MasterCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE; MasterCommandHandler::handleShotCommand(std::istringstream &)
jmp short loc_17620
loc_175AB:
lea r15, [rsp+2E8h+var_2B0]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
lea rdi, [rsp+2E8h+var_238]
lea rsi, [rsp+2E8h+var_2C0]
call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &)
lea rsi, aSettings; "settings"
lea rdi, [rsp+2E8h+var_2C0]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_17601
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterUnknownP; "Master: Unknown print subcommand.\n"
mov edx, 22h ; '"'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_17609
loc_17601:
mov rdi, [rbx]; this
call _Z13printSettingsRK8Settings; printSettings(Settings const&)
loc_17609:
mov rdi, [rsp+2E8h+var_2C0]; void *
cmp rdi, r15
jz short loc_17620
mov rsi, [rsp+2E8h+var_2B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17620:
xor ebx, ebx
loc_17622:
mov rdi, [rsp+2E8h+var_2E0]; void *
cmp rdi, r14
jz short loc_17639
mov rsi, [rsp+2E8h+var_2D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17639:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+2E8h+var_238]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+2E8h+var_1C0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_1765A:
mov eax, ebx
add rsp, 2B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
cmp rdi, r15
jz short loc_176B2
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_176B2
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
lea rax, [rsp+arg_30]
cmp rdi, rax
jz short loc_176EF
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_176EF
jmp short loc_176EC
jmp short loc_176EC
mov rbx, rax
loc_176B2:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r14
jz short loc_176C9
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_176C9:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_A8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_120]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_17718
loc_176EC:
mov rbx, rax
loc_176EF:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_1770B
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1770B:
lea rdi, [rsp+arg_A8]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_17718:
mov rdi, rbx
call __Unwind_Resume
| long long MasterCommandHandler::handleCommand(MasterCommandHandler *this, long long a2)
{
long long v2; // r14
unsigned int v3; // ebx
char v4; // r14
char v5; // al
_QWORD *v6; // rax
void *v7; // r13
long long v8; // rax
long long v9; // rbp
bool v10; // zf
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
int v15; // edx
int v16; // ecx
int v17; // r8d
int v18; // r9d
int v20; // [rsp+0h] [rbp-2E8h]
void *v21; // [rsp+8h] [rbp-2E0h] BYREF
long long v22; // [rsp+10h] [rbp-2D8h]
void *v23; // [rsp+18h] [rbp-2D0h] BYREF
void *v24; // [rsp+20h] [rbp-2C8h]
void *v25; // [rsp+28h] [rbp-2C0h] BYREF
long long v26; // [rsp+30h] [rbp-2B8h]
long long v27; // [rsp+38h] [rbp-2B0h] BYREF
int v28; // [rsp+40h] [rbp-2A8h]
int v29[2]; // [rsp+48h] [rbp-2A0h]
void *v30[2]; // [rsp+50h] [rbp-298h] BYREF
_QWORD v31[2]; // [rsp+60h] [rbp-288h] BYREF
void *v32[2]; // [rsp+70h] [rbp-278h] BYREF
long long v33; // [rsp+80h] [rbp-268h] BYREF
int v34; // [rsp+88h] [rbp-260h]
long long *v35; // [rsp+90h] [rbp-258h] BYREF
int v36; // [rsp+98h] [rbp-250h]
long long v37; // [rsp+A0h] [rbp-248h] BYREF
int v38; // [rsp+A8h] [rbp-240h]
int v39[2]; // [rsp+B0h] [rbp-238h] BYREF
int v40; // [rsp+B8h] [rbp-230h]
int v41; // [rsp+C0h] [rbp-228h]
int v42; // [rsp+C8h] [rbp-220h]
int v43; // [rsp+D0h] [rbp-218h]
int v44; // [rsp+D8h] [rbp-210h]
int v45; // [rsp+E0h] [rbp-208h]
char v46; // [rsp+E8h] [rbp-200h]
_BYTE v47[448]; // [rsp+128h] [rbp-1C0h] BYREF
v2 = a2;
v3 = (unsigned int)this;
std::ifstream::basic_ifstream(v39, "../game_data/settings.txt", 8LL);
if ( (unsigned __int8)std::__basic_file<char>::is_open(v47) )
{
*(_QWORD *)v29 = a2;
v21 = &v23;
v22 = 0LL;
LOBYTE(v23) = 0;
v4 = 0;
while ( 1 )
{
v5 = std::ios::widen((char *)v39 + *(_QWORD *)(*(_QWORD *)v39 - 24LL), 10LL);
v6 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v39, &v21, (unsigned int)v5);
if ( (*((_BYTE *)v6 + *(_QWORD *)(*v6 - 24LL) + 32) & 5) != 0 )
break;
if ( v22 )
{
v7 = v21;
v8 = memchr(v21, 61LL);
v9 = v8 - (_QWORD)v7;
if ( v8 != 0 && v8 - (_QWORD)v7 != -1 )
{
std::string::substr((long long)&v25, (long long)&v21, 0LL);
std::string::substr((long long)v30, (long long)&v21, v9 + 1);
if ( !(unsigned int)std::string::compare(&v25, (long long)"exit") )
v4 |= (unsigned int)std::string::compare(v30, (long long)"1") == 0;
if ( v30[0] != v31 )
operator delete(v30[0], v31[0] + 1LL);
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
}
}
}
v10 = (v4 & 1) == 0;
v2 = *(_QWORD *)v29;
if ( !v10 )
{
Settings::exitGame[abi:cxx11](&v35, *(_QWORD *)this);
if ( v35 != &v37 )
operator delete(v35, v37 + 1);
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Master: Detected exit=1 from Slave.\n", 36LL);
}
if ( v21 != &v23 )
operator delete(v21, (unsigned long long)v23 + 1);
}
std::ifstream::~ifstream(v39);
if ( (unsigned __int8)Settings::getExit(*(Settings **)this) )
{
std::__ostream_insert<char,std::char_traits<char>>(
&std::cout,
"Master: Exiting (because exit=1 in settings).\n",
46LL);
LOBYTE(v3) = 1;
return v3;
}
std::istringstream::basic_istringstream(v39, v2, 8LL);
v21 = &v23;
v22 = 0LL;
LOBYTE(v23) = 0;
std::operator>><char>(v39, &v21);
if ( !(unsigned int)std::string::compare(&v21, (long long)"set") )
{
MasterCommandHandler::handleSetCommand(
(int)this,
(int)v39,
v11,
v12,
v13,
v14,
v20,
(long long)v21,
v22,
(int)v23,
v24,
(int)v25,
v26,
v27,
v28,
v29[0],
(int)v30[0],
(long long)v30[1],
v31[0],
(void *)v31[1],
(int)v32[0],
(long long)v32[1],
v33,
v34,
(int)v35,
v36,
v37,
v38,
v39[0],
v40,
v41,
v42,
v43,
v44,
v45,
v46);
}
else if ( !(unsigned int)std::string::compare(&v21, (long long)"start") )
{
MasterCommandHandler::handleStartCommand(this);
}
else if ( !(unsigned int)std::string::compare(&v21, (long long)"stop") )
{
MasterCommandHandler::handleStopCommand(this);
}
else
{
if ( !(unsigned int)std::string::compare(&v21, (long long)"exit") )
{
Settings::exitGame[abi:cxx11](v32, *(_QWORD *)this);
if ( v32[0] != &v33 )
operator delete(v32[0], v33 + 1);
LOBYTE(v3) = 1;
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Master: Exiting game.\n", 22LL);
goto LABEL_40;
}
if ( !(unsigned int)std::string::compare(&v21, (long long)"shot") )
{
MasterCommandHandler::handleShotCommand(
(int)this,
(int)v39,
v15,
v16,
v17,
v18,
v20,
(long long)v21,
v22,
v23,
(int)v24,
(long long)v25);
}
else if ( !(unsigned int)std::string::compare(&v21, (long long)"print") )
{
v25 = &v27;
v26 = 0LL;
LOBYTE(v27) = 0;
std::operator>><char>(v39, &v25);
if ( !(unsigned int)std::string::compare(&v25, (long long)"settings") )
printSettings(*(const Settings **)this);
else
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Master: Unknown print subcommand.\n", 34LL);
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Master: Unknown command.\n", 25LL);
}
}
v3 = 0;
LABEL_40:
if ( v21 != &v23 )
operator delete(v21, (unsigned long long)v23 + 1);
std::istringstream::~istringstream(v39, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v47);
return v3;
}
| handleCommand:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2b8
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x11b5dc]
LEA R15,[RSP + 0xb0]
MOV RDI,R15
MOV EDX,0x8
CALL 0x00105620
LEA RDI,[RSP + 0x128]
CALL 0x00105080
TEST AL,AL
JZ 0x001173fc
MOV qword ptr [RSP + 0x48],R14
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
XOR R14D,R14D
LEA R12,[RSP + 0x8]
LAB_00117285:
MOV RAX,qword ptr [RSP + 0xb0]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R15
LAB_00117294:
MOV ESI,0xa
CALL 0x00105370
MOVSX EDX,AL
MOV RDI,R15
MOV RSI,R12
CALL 0x00105630
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x0011738c
MOV RDX,qword ptr [RSP + 0x10]
TEST RDX,RDX
JZ 0x00117285
MOV R13,qword ptr [RSP + 0x8]
MOV RDI,R13
MOV ESI,0x3d
CALL 0x00105400
MOV RBP,RAX
TEST RAX,RAX
SETZ AL
SUB RBP,R13
CMP RBP,-0x1
SETZ CL
OR CL,AL
JNZ 0x00117285
LAB_001172f1:
LEA RDI,[RSP + 0x28]
MOV RSI,R12
XOR EDX,EDX
MOV RCX,RBP
CALL 0x0011614c
INC RBP
LAB_00117306:
LEA RDI,[RSP + 0x50]
MOV RSI,R12
MOV RDX,RBP
MOV RCX,-0x1
CALL 0x0011614c
LEA RDI,[RSP + 0x28]
LEA RSI,[0x11b5f6]
CALL 0x00107410
TEST EAX,EAX
JNZ 0x0011734b
LEA RDI,[RSP + 0x50]
LEA RSI,[0x11aa13]
CALL 0x00107410
TEST EAX,EAX
SETZ AL
OR R14B,AL
LAB_0011734b:
MOV RDI,qword ptr [RSP + 0x50]
LEA RAX,[RSP + 0x60]
CMP RDI,RAX
JZ 0x00117367
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x001053a0
LAB_00117367:
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x00117285
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001053a0
JMP 0x00117285
LAB_0011738c:
TEST R14B,0x1
MOV R14,qword ptr [RSP + 0x48]
JZ 0x001173e0
MOV RSI,qword ptr [RBX]
LAB_0011739a:
LEA RDI,[RSP + 0x90]
CALL 0x00106ce4
LEA RAX,[RSP + 0xa0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001173c8
MOV RSI,qword ptr [RSP + 0xa0]
INC RSI
CALL 0x001053a0
LAB_001173c8:
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b5fb]
MOV EDX,0x24
CALL 0x00105420
LAB_001173e0:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001173fc
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001053a0
LAB_001173fc:
LEA RDI,[RSP + 0xb0]
CALL 0x00105090
MOV RDI,qword ptr [RBX]
CALL 0x00106d70
TEST AL,AL
JZ 0x00117434
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b620]
MOV EDX,0x2e
CALL 0x00105420
MOV BL,0x1
JMP 0x0011765a
LAB_00117434:
LEA R15,[RSP + 0xb0]
MOV RDI,R15
MOV RSI,R14
MOV EDX,0x8
CALL 0x001055b0
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV qword ptr [R14 + -0x8],0x0
MOV byte ptr [R14],0x0
LAB_00117461:
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x00105460
LEA RSI,[0x11b64f]
LEA RDI,[RSP + 0x8]
CALL 0x00107410
TEST EAX,EAX
JZ 0x0011751d
LEA RSI,[0x11b653]
LEA RDI,[RSP + 0x8]
CALL 0x00107410
TEST EAX,EAX
JZ 0x00117532
LEA RSI,[0x11b659]
LEA RDI,[RSP + 0x8]
CALL 0x00107410
TEST EAX,EAX
JZ 0x0011753f
LEA RSI,[0x11b5f6]
LEA RDI,[RSP + 0x8]
CALL 0x00107410
TEST EAX,EAX
JZ 0x0011754c
LEA RSI,[0x11b675]
LEA RDI,[RSP + 0x8]
CALL 0x00107410
TEST EAX,EAX
JZ 0x00117599
LEA RSI,[0x11a89f]
LEA RDI,[RSP + 0x8]
CALL 0x00107410
TEST EAX,EAX
JZ 0x001175ab
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b6a6]
MOV EDX,0x19
CALL 0x00105420
JMP 0x00117620
LAB_0011751d:
LEA RSI,[RSP + 0xb0]
MOV RDI,RBX
CALL 0x00117720
JMP 0x00117620
LAB_00117532:
MOV RDI,RBX
CALL 0x00117c40
JMP 0x00117620
LAB_0011753f:
MOV RDI,RBX
CALL 0x00118122
JMP 0x00117620
LAB_0011754c:
MOV RSI,qword ptr [RBX]
LEA RDI,[RSP + 0x70]
CALL 0x00106ce4
LEA RAX,[RSP + 0x80]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011757a
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x001053a0
LAB_0011757a:
MOV BL,0x1
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b65e]
MOV EDX,0x16
CALL 0x00105420
JMP 0x00117622
LAB_00117599:
LEA RSI,[RSP + 0xb0]
MOV RDI,RBX
CALL 0x00118252
JMP 0x00117620
LAB_001175ab:
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
LAB_001175c0:
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0x28]
CALL 0x00105460
LEA RSI,[0x11b67a]
LEA RDI,[RSP + 0x28]
CALL 0x00107410
TEST EAX,EAX
JZ 0x00117601
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b683]
MOV EDX,0x22
CALL 0x00105420
JMP 0x00117609
LAB_00117601:
MOV RDI,qword ptr [RBX]
CALL 0x00119000
LAB_00117609:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R15
JZ 0x00117620
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001053a0
LAB_00117620:
XOR EBX,EBX
LAB_00117622:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x00117639
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001053a0
LAB_00117639:
MOV RSI,qword ptr [0x00124f80]
LEA RDI,[RSP + 0xb0]
CALL 0x001054e0
LEA RDI,[RSP + 0x128]
CALL 0x001050f0
LAB_0011765a:
MOV EAX,EBX
ADD RSP,0x2b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MasterCommandHandler::handleCommand(std::__cxx11::string const&) */
ulong __thiscall MasterCommandHandler::handleCommand(MasterCommandHandler *this,string *param_1)
{
int1 *puVar1;
char cVar2;
int iVar3;
istream *piVar4;
void *pvVar5;
int7 uVar7;
ulong uVar6;
bool bVar8;
int1 *local_2e0;
size_t local_2d8;
int1 local_2d0;
int7 uStack_2cf;
int1 *local_2c0;
int8 local_2b8;
int1 local_2b0;
int7 uStack_2af;
string *local_2a0;
long *local_298 [2];
long local_288 [2];
long *local_278;
long local_268 [2];
long *local_258;
long local_248 [2];
long local_238 [15];
ios_base local_1c0 [400];
std::ifstream::ifstream((ifstream *)local_238,"../game_data/settings.txt",8);
cVar2 = std::__basic_file<char>::is_open();
if (cVar2 != '\0') {
local_2e0 = &local_2d0;
local_2d8 = 0;
local_2d0 = 0;
bVar8 = false;
local_2a0 = param_1;
while( true ) {
/* try { // try from 00117294 to 001172ab has its CatchHandler @ 001176ec */
cVar2 = std::ios::widen((char)*(int8 *)(local_238[0] + -0x18) +
(char)(istream *)local_238);
piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_238,(string *)&local_2e0,cVar2);
param_1 = local_2a0;
puVar1 = local_2e0;
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break;
if (local_2d8 != 0) {
pvVar5 = memchr(local_2e0,0x3d,local_2d8);
if ((long)pvVar5 - (long)puVar1 != -1 && pvVar5 != (void *)0x0) {
/* try { // try from 001172f1 to 00117302 has its CatchHandler @ 001176ab */
std::__cxx11::string::substr((ulong)&local_2c0,(ulong)&local_2e0);
/* try { // try from 00117306 to 0011731c has its CatchHandler @ 0011768a */
std::__cxx11::string::substr((ulong)local_298,(ulong)&local_2e0);
iVar3 = std::__cxx11::string::compare((string *)&local_2c0,"exit");
if (iVar3 == 0) {
iVar3 = std::__cxx11::string::compare((string *)local_298,"1");
bVar8 = (bool)(bVar8 | iVar3 == 0);
}
if (local_298[0] != local_288) {
operator_delete(local_298[0],local_288[0] + 1);
}
if (local_2c0 != &local_2b0) {
operator_delete(local_2c0,CONCAT71(uStack_2af,local_2b0) + 1);
}
}
}
}
if (bVar8) {
/* try { // try from 0011739a to 001173df has its CatchHandler @ 001176ad */
Settings::exitGame_abi_cxx11_();
if (local_258 != local_248) {
operator_delete(local_258,local_248[0] + 1);
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Detected exit=1 from Slave.\n",0x24);
}
if (local_2e0 != &local_2d0) {
operator_delete(local_2e0,CONCAT71(uStack_2cf,local_2d0) + 1);
}
}
std::ifstream::~ifstream((ifstream *)local_238);
cVar2 = Settings::getExit(*(Settings **)this);
uVar7 = (int7)((ulong)this >> 8);
if (cVar2 != '\0') {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Exiting (because exit=1 in settings).\n",0x2e);
uVar6 = CONCAT71(uVar7,1);
goto LAB_0011765a;
}
std::__cxx11::istringstream::istringstream((istringstream *)local_238,param_1,8);
local_2d8 = 0;
local_2d0 = 0;
/* try { // try from 00117461 to 001175a8 has its CatchHandler @ 001176af */
local_2e0 = &local_2d0;
std::operator>>((istream *)local_238,(string *)&local_2e0);
iVar3 = std::__cxx11::string::compare((string *)&local_2e0,"set");
if (iVar3 == 0) {
handleSetCommand(this,(istringstream *)local_238);
LAB_00117620:
uVar6 = 0;
}
else {
iVar3 = std::__cxx11::string::compare((string *)&local_2e0,"start");
if (iVar3 == 0) {
handleStartCommand(this);
goto LAB_00117620;
}
iVar3 = std::__cxx11::string::compare((string *)&local_2e0,"stop");
if (iVar3 == 0) {
handleStopCommand(this);
goto LAB_00117620;
}
iVar3 = std::__cxx11::string::compare((string *)&local_2e0,"exit");
if (iVar3 != 0) {
iVar3 = std::__cxx11::string::compare((string *)&local_2e0,"shot");
if (iVar3 == 0) {
handleShotCommand(this,(istringstream *)local_238);
}
else {
iVar3 = std::__cxx11::string::compare((string *)&local_2e0,"print");
if (iVar3 == 0) {
local_2b8 = 0;
local_2b0 = 0;
/* try { // try from 001175c0 to 00117608 has its CatchHandler @ 0011766e */
local_2c0 = &local_2b0;
std::operator>>((istream *)local_238,(string *)&local_2c0);
iVar3 = std::__cxx11::string::compare((string *)&local_2c0,"settings");
if (iVar3 == 0) {
printSettings(*(Settings **)this);
}
else {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Unknown print subcommand.\n",0x22);
}
if (local_2c0 != &local_2b0) {
operator_delete(local_2c0,CONCAT71(uStack_2af,local_2b0) + 1);
}
}
else {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Unknown command.\n",0x19);
}
}
goto LAB_00117620;
}
Settings::exitGame_abi_cxx11_();
if (local_278 != local_268) {
operator_delete(local_278,local_268[0] + 1);
}
uVar6 = CONCAT71(uVar7,1);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: Exiting game.\n",0x16);
}
if (local_2e0 != &local_2d0) {
operator_delete(local_2e0,CONCAT71(uStack_2cf,local_2d0) + 1);
}
std::__cxx11::istringstream::~istringstream((istringstream *)local_238);
std::ios_base::~ios_base(local_1c0);
LAB_0011765a:
return uVar6 & 0xffffffff;
}
| |
33,099 | b2d | eloqsql/strings/dtoa.c | static double b2d(Bigint *a, int *e)
{
ULong *xa, *xa0, w, y, z;
int k;
U d;
#define d0 word0(&d)
#define d1 word1(&d)
xa0= a->p.x;
xa= xa0 + a->wds;
y= *--xa;
k= hi0bits(y);
*e= 32 - k;
if (k < Ebits)
{
d0= Exp_1 | y >> (Ebits - k);
w= xa > xa0 ? *--xa : 0;
d1= y << ((32-Ebits) + k) | w >> (Ebits - k);
goto ret_d;
}
z= xa > xa0 ? *--xa : 0;
if (k-= Ebits)
{
d0= Exp_1 | y << k | z >> (32 - k);
y= xa > xa0 ? *--xa : 0;
d1= z << k | y >> (32 - k);
}
else
{
d0= Exp_1 | y;
d1= z;
}
ret_d:
#undef d0
#undef d1
return dval(&d);
} | O0 | c | b2d:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x14(%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x18(%rbp)
movl -0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
callq 0x79a40
movl %eax, -0x30(%rbp)
movl $0x20, %ecx
subl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
cmpl $0xb, -0x30(%rbp)
jge 0x79bdd
movl -0x28(%rbp), %eax
movl $0xb, %ecx
subl -0x30(%rbp), %ecx
shrl %cl, %eax
orl $0x3ff00000, %eax # imm = 0x3FF00000
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x79bac
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x18(%rbp)
movl -0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x79bb3
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x79bb3
movl -0x3c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
movl -0x30(%rbp), %ecx
addl $0x15, %ecx
shll %cl, %eax
movl -0x24(%rbp), %edx
movl $0xb, %ecx
subl -0x30(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x38(%rbp)
jmp 0x79c99
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x79bfe
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x18(%rbp)
movl -0x4(%rax), %eax
movl %eax, -0x40(%rbp)
jmp 0x79c05
xorl %eax, %eax
movl %eax, -0x40(%rbp)
jmp 0x79c05
movl -0x40(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
subl $0xb, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
je 0x79c86
movl -0x28(%rbp), %eax
movl -0x30(%rbp), %ecx
shll %cl, %eax
orl $0x3ff00000, %eax # imm = 0x3FF00000
movl -0x2c(%rbp), %edx
movl $0x20, %ecx
subl -0x30(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x79c5b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x18(%rbp)
movl -0x4(%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0x79c62
xorl %eax, %eax
movl %eax, -0x44(%rbp)
jmp 0x79c62
movl -0x44(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
movl -0x30(%rbp), %ecx
shll %cl, %eax
movl -0x28(%rbp), %edx
movl $0x20, %ecx
subl -0x30(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x38(%rbp)
jmp 0x79c97
movl -0x28(%rbp), %eax
orl $0x3ff00000, %eax # imm = 0x3FF00000
movl %eax, -0x34(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x79c99
movsd -0x38(%rbp), %xmm0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| b2d:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+14h]
shl rcx, 2
add rax, rcx
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rcx
mov eax, [rax-4]
mov [rbp+var_28], eax
mov edi, [rbp+var_28]
call hi0bits
mov [rbp+var_30], eax
mov ecx, 20h ; ' '
sub ecx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], ecx
cmp [rbp+var_30], 0Bh
jge short loc_79BDD
mov eax, [rbp+var_28]
mov ecx, 0Bh
sub ecx, [rbp+var_30]
shr eax, cl
or eax, 3FF00000h
mov dword ptr [rbp+var_38+4], eax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jbe short loc_79BAC
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rcx
mov eax, [rax-4]
mov [rbp+var_3C], eax
jmp short loc_79BB3
loc_79BAC:
xor eax, eax
mov [rbp+var_3C], eax
jmp short $+2
loc_79BB3:
mov eax, [rbp+var_3C]
mov [rbp+var_24], eax
mov eax, [rbp+var_28]
mov ecx, [rbp+var_30]
add ecx, 15h
shl eax, cl
mov edx, [rbp+var_24]
mov ecx, 0Bh
sub ecx, [rbp+var_30]
shr edx, cl
mov ecx, edx
or eax, ecx
mov dword ptr [rbp+var_38], eax
jmp loc_79C99
loc_79BDD:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jbe short loc_79BFE
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rcx
mov eax, [rax-4]
mov [rbp+var_40], eax
jmp short loc_79C05
loc_79BFE:
xor eax, eax
mov [rbp+var_40], eax
jmp short $+2
loc_79C05:
mov eax, [rbp+var_40]
mov [rbp+var_2C], eax
mov eax, [rbp+var_30]
sub eax, 0Bh
mov [rbp+var_30], eax
cmp eax, 0
jz short loc_79C86
mov eax, [rbp+var_28]
mov ecx, [rbp+var_30]
shl eax, cl
or eax, 3FF00000h
mov edx, [rbp+var_2C]
mov ecx, 20h ; ' '
sub ecx, [rbp+var_30]
shr edx, cl
mov ecx, edx
or eax, ecx
mov dword ptr [rbp+var_38+4], eax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jbe short loc_79C5B
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rcx
mov eax, [rax-4]
mov [rbp+var_44], eax
jmp short loc_79C62
loc_79C5B:
xor eax, eax
mov [rbp+var_44], eax
jmp short $+2
loc_79C62:
mov eax, [rbp+var_44]
mov [rbp+var_28], eax
mov eax, [rbp+var_2C]
mov ecx, [rbp+var_30]
shl eax, cl
mov edx, [rbp+var_28]
mov ecx, 20h ; ' '
sub ecx, [rbp+var_30]
shr edx, cl
mov ecx, edx
or eax, ecx
mov dword ptr [rbp+var_38], eax
jmp short loc_79C97
loc_79C86:
mov eax, [rbp+var_28]
or eax, 3FF00000h
mov dword ptr [rbp+var_38+4], eax
mov eax, [rbp+var_2C]
mov dword ptr [rbp+var_38], eax
loc_79C97:
jmp short $+2
loc_79C99:
movsd xmm0, [rbp+var_38]
add rsp, 50h
pop rbp
retn
| double b2d(long long a1, _DWORD *a2)
{
int *v2; // rax
unsigned int v4; // [rsp+Ch] [rbp-44h]
unsigned int v5; // [rsp+10h] [rbp-40h]
unsigned int v6; // [rsp+14h] [rbp-3Ch]
long long v7; // [rsp+18h] [rbp-38h]
int v8; // [rsp+20h] [rbp-30h]
int v9; // [rsp+20h] [rbp-30h]
long long v10; // [rsp+24h] [rbp-2Ch]
unsigned long long v11; // [rsp+30h] [rbp-20h]
int *v12; // [rsp+38h] [rbp-18h]
v11 = *(_QWORD *)a1;
v12 = (int *)(4LL * *(int *)(a1 + 20) + *(_QWORD *)a1 - 4);
HIDWORD(v10) = *v12;
v8 = hi0bits(*v12);
*a2 = 32 - v8;
if ( v8 >= 11 )
{
if ( (unsigned long long)v12 <= v11 )
{
v5 = 0;
}
else
{
v2 = v12--;
v5 = *(v2 - 1);
}
LODWORD(v10) = v5;
v9 = v8 - 11;
if ( v9 )
{
HIDWORD(v7) = (v5 >> (32 - v9)) | (HIDWORD(v10) << v9) | 0x3FF00000;
if ( (unsigned long long)v12 <= v11 )
v4 = 0;
else
v4 = *(v12 - 1);
LODWORD(v7) = (v4 >> (32 - v9)) | (v5 << v9);
}
else
{
v7 = v10 | 0x3FF0000000000000LL;
}
}
else
{
HIDWORD(v7) = (HIDWORD(v10) >> (11 - v8)) | 0x3FF00000;
if ( (unsigned long long)v12 <= v11 )
v6 = 0;
else
v6 = *(v12 - 1);
LODWORD(v7) = (v6 >> (11 - v8)) | (HIDWORD(v10) << (v8 + 21));
}
return *(double *)&v7;
}
| b2d:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x14]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x18],RCX
MOV EAX,dword ptr [RAX + -0x4]
MOV dword ptr [RBP + -0x28],EAX
MOV EDI,dword ptr [RBP + -0x28]
CALL 0x00179a40
MOV dword ptr [RBP + -0x30],EAX
MOV ECX,0x20
SUB ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
CMP dword ptr [RBP + -0x30],0xb
JGE 0x00179bdd
MOV EAX,dword ptr [RBP + -0x28]
MOV ECX,0xb
SUB ECX,dword ptr [RBP + -0x30]
SHR EAX,CL
OR EAX,0x3ff00000
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x00179bac
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x18],RCX
MOV EAX,dword ptr [RAX + -0x4]
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00179bb3
LAB_00179bac:
XOR EAX,EAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00179bb3
LAB_00179bb3:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x30]
ADD ECX,0x15
SHL EAX,CL
MOV EDX,dword ptr [RBP + -0x24]
MOV ECX,0xb
SUB ECX,dword ptr [RBP + -0x30]
SHR EDX,CL
MOV ECX,EDX
OR EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00179c99
LAB_00179bdd:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x00179bfe
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x18],RCX
MOV EAX,dword ptr [RAX + -0x4]
MOV dword ptr [RBP + -0x40],EAX
JMP 0x00179c05
LAB_00179bfe:
XOR EAX,EAX
MOV dword ptr [RBP + -0x40],EAX
JMP 0x00179c05
LAB_00179c05:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x30]
SUB EAX,0xb
MOV dword ptr [RBP + -0x30],EAX
CMP EAX,0x0
JZ 0x00179c86
MOV EAX,dword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x30]
SHL EAX,CL
OR EAX,0x3ff00000
MOV EDX,dword ptr [RBP + -0x2c]
MOV ECX,0x20
SUB ECX,dword ptr [RBP + -0x30]
SHR EDX,CL
MOV ECX,EDX
OR EAX,ECX
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x00179c5b
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x18],RCX
MOV EAX,dword ptr [RAX + -0x4]
MOV dword ptr [RBP + -0x44],EAX
JMP 0x00179c62
LAB_00179c5b:
XOR EAX,EAX
MOV dword ptr [RBP + -0x44],EAX
JMP 0x00179c62
LAB_00179c62:
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,dword ptr [RBP + -0x30]
SHL EAX,CL
MOV EDX,dword ptr [RBP + -0x28]
MOV ECX,0x20
SUB ECX,dword ptr [RBP + -0x30]
SHR EDX,CL
MOV ECX,EDX
OR EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00179c97
LAB_00179c86:
MOV EAX,dword ptr [RBP + -0x28]
OR EAX,0x3ff00000
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x38],EAX
LAB_00179c97:
JMP 0x00179c99
LAB_00179c99:
MOVSD XMM0,qword ptr [RBP + -0x38]
ADD RSP,0x50
POP RBP
RET
|
int8 b2d(ulong *param_1,int *param_2)
{
uint uVar1;
ulong uVar2;
char cVar3;
int iVar4;
long lVar5;
byte bVar6;
int4 local_4c;
int4 local_48;
int4 local_44;
int4 local_40;
int4 uStack_3c;
int8 local_20;
uVar2 = *param_1;
lVar5 = uVar2 + (long)*(int *)((long)param_1 + 0x14) * 4;
local_20 = lVar5 - 4;
uVar1 = *(uint *)(lVar5 + -4);
iVar4 = hi0bits(uVar1);
*param_2 = 0x20 - iVar4;
if (iVar4 < 0xb) {
cVar3 = (char)iVar4;
uStack_3c = uVar1 >> (0xbU - cVar3 & 0x1f) | 0x3ff00000;
if (uVar2 < local_20) {
local_44 = *(uint *)(lVar5 + -8);
}
else {
local_44 = 0;
}
local_40 = uVar1 << (cVar3 + 0x15U & 0x1f) | local_44 >> (0xbU - cVar3 & 0x1f);
}
else {
if (uVar2 < local_20) {
local_20 = lVar5 - 8;
local_48 = *(uint *)(lVar5 + -8);
}
else {
local_48 = 0;
}
if (iVar4 + -0xb == 0) {
uStack_3c = uVar1 | 0x3ff00000;
local_40 = local_48;
}
else {
bVar6 = (byte)(iVar4 + -0xb);
uStack_3c = uVar1 << (bVar6 & 0x1f) | 0x3ff00000 | local_48 >> (0x20 - bVar6 & 0x1f);
if (uVar2 < local_20) {
local_4c = *(uint *)(local_20 - 4);
}
else {
local_4c = 0;
}
local_40 = local_48 << (bVar6 & 0x1f) | local_4c >> (0x20 - bVar6 & 0x1f);
}
}
return CONCAT44(uStack_3c,local_40);
}
|
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.