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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
41,700 | ttt::game::State::process_move(ttt::game::Sign, int, int) | vsennov[P]tictactoe-course/src/core/state.cpp | MoveResult State::process_move(Sign player, int x, int y) {
if (m_status == Status::ENDED) {
return MoveResult::ENDED;
}
if (player == Sign::NONE) {
return MoveResult::ERROR;
}
if (player != m_player) {
return MoveResult::DQ_OUT_OF_ORDER;
}
if (!_valid_coords(x, y)) {
return MoveResult::DQ_OUT_OF_FIELD;
}
if (get_value(x, y) != Sign::NONE) {
return MoveResult::DQ_PLACE_OCCUPIED;
}
_set_value(x, y, player);
++m_move_no;
m_player = _opp_sign(player);
const bool winning = _is_winning(x, y);
if (m_status == Status::LAST_MOVE) {
m_status = Status::ENDED;
if (winning) {
return MoveResult::DRAW;
} else {
m_winner = m_player;
return MoveResult::WIN;
}
}
m_status = Status::ACTIVE;
if (winning) {
if (m_move_no % 2 == 0) {
m_status = Status::ENDED;
m_winner = _opp_sign(m_player);
return MoveResult::WIN;
} else if (m_move_no >= m_opts.max_moves) {
m_winner = _opp_sign(m_player);
m_status = Status::ENDED;
return MoveResult::WIN;
} else {
m_status = Status::LAST_MOVE;
return MoveResult::OK;
}
}
if (m_move_no >= m_opts.max_moves) {
m_status = Status::ENDED;
return MoveResult::DRAW;
}
return MoveResult::OK;
} | O0 | cpp | ttt::game::State::process_move(ttt::game::Sign, int, int):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x3, 0x24(%rax)
jne 0x423f
movl $0x3, -0x4(%rbp)
jmp 0x43dc
cmpl $0x2, -0x14(%rbp)
jne 0x4251
movl $0x7, -0x4(%rbp)
jmp 0x43dc
movq -0x28(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x28(%rcx), %eax
je 0x4269
movl $0x5, -0x4(%rbp)
jmp 0x43dc
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x43f0
testb $0x1, %al
jne 0x4288
movl $0x4, -0x4(%rbp)
jmp 0x43dc
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x4420
cmpl $0x2, %eax
je 0x42a8
movl $0x6, -0x4(%rbp)
jmp 0x43dc
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x4450
movq -0x28(%rbp), %rdi
movl 0x20(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x20(%rdi)
movl -0x14(%rbp), %esi
callq 0x4490
movq -0x28(%rbp), %rdi
movl %eax, 0x28(%rdi)
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x44d0
movb %al, %cl
movq -0x28(%rbp), %rax
andb $0x1, %cl
movb %cl, -0x1d(%rbp)
cmpl $0x2, 0x24(%rax)
jne 0x4326
movq -0x28(%rbp), %rax
movl $0x3, 0x24(%rax)
testb $0x1, -0x1d(%rbp)
je 0x4310
movl $0x1, -0x4(%rbp)
jmp 0x43dc
movq -0x28(%rbp), %rax
movl 0x28(%rax), %ecx
movl %ecx, 0x2c(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x43dc
movq -0x28(%rbp), %rax
movl $0x1, 0x24(%rax)
testb $0x1, -0x1d(%rbp)
je 0x43b5
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x4370
movq -0x28(%rbp), %rdi
movl $0x3, 0x24(%rdi)
movl 0x28(%rdi), %esi
callq 0x4490
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x2c(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x43dc
movq -0x28(%rbp), %rcx
movl 0x20(%rcx), %eax
cmpl 0xc(%rcx), %eax
jl 0x43a1
movq -0x28(%rbp), %rdi
movl 0x28(%rdi), %esi
callq 0x4490
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x2c(%rax)
movl $0x3, 0x24(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x43dc
movq -0x28(%rbp), %rax
movl $0x2, 0x24(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x43dc
movq -0x28(%rbp), %rcx
movl 0x20(%rcx), %eax
cmpl 0xc(%rcx), %eax
jl 0x43d5
movq -0x28(%rbp), %rax
movl $0x3, 0x24(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x43dc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN3ttt4game5State12process_moveENS0_4SignEii:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_1C], ecx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
cmp dword ptr [rax+24h], 3
jnz short loc_423F
mov [rbp+var_4], 3
jmp loc_43DC
loc_423F:
cmp [rbp+var_14], 2
jnz short loc_4251
mov [rbp+var_4], 7
jmp loc_43DC
loc_4251:
mov rcx, [rbp+var_28]
mov eax, [rbp+var_14]
cmp eax, [rcx+28h]
jz short loc_4269
mov [rbp+var_4], 5
jmp loc_43DC
loc_4269:
mov rdi, [rbp+var_28]; this
mov esi, [rbp+var_18]; int
mov edx, [rbp+var_1C]; int
call _ZNK3ttt4game5State13_valid_coordsEii; ttt::game::State::_valid_coords(int,int)
test al, 1
jnz short loc_4288
mov [rbp+var_4], 4
jmp loc_43DC
loc_4288:
mov rdi, [rbp+var_28]; this
mov esi, [rbp+var_18]; int
mov edx, [rbp+var_1C]; int
call _ZNK3ttt4game5State9get_valueEii; ttt::game::State::get_value(int,int)
cmp eax, 2
jz short loc_42A8
mov [rbp+var_4], 6
jmp loc_43DC
loc_42A8:
mov rdi, [rbp+var_28]
mov esi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov ecx, [rbp+var_14]
call _ZN3ttt4game5State10_set_valueEiiNS0_4SignE; ttt::game::State::_set_value(int,int,ttt::game::Sign)
mov rdi, [rbp+var_28]
mov eax, [rdi+20h]
add eax, 1
mov [rdi+20h], eax
mov esi, [rbp+var_14]
call _ZN3ttt4game5State9_opp_signENS0_4SignE; ttt::game::State::_opp_sign(ttt::game::Sign)
mov rdi, [rbp+var_28]; this
mov [rdi+28h], eax
mov esi, [rbp+var_18]; int
mov edx, [rbp+var_1C]; int
call _ZN3ttt4game5State11_is_winningEii; ttt::game::State::_is_winning(int,int)
mov cl, al
mov rax, [rbp+var_28]
and cl, 1
mov [rbp+var_1D], cl
cmp dword ptr [rax+24h], 2
jnz short loc_4326
mov rax, [rbp+var_28]
mov dword ptr [rax+24h], 3
test [rbp+var_1D], 1
jz short loc_4310
mov [rbp+var_4], 1
jmp loc_43DC
loc_4310:
mov rax, [rbp+var_28]
mov ecx, [rax+28h]
mov [rax+2Ch], ecx
mov [rbp+var_4], 2
jmp loc_43DC
loc_4326:
mov rax, [rbp+var_28]
mov dword ptr [rax+24h], 1
test [rbp+var_1D], 1
jz short loc_43B5
mov rax, [rbp+var_28]
mov eax, [rax+20h]
mov ecx, 2
cdq
idiv ecx
cmp edx, 0
jnz short loc_4370
mov rdi, [rbp+var_28]
mov dword ptr [rdi+24h], 3
mov esi, [rdi+28h]
call _ZN3ttt4game5State9_opp_signENS0_4SignE; ttt::game::State::_opp_sign(ttt::game::Sign)
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+2Ch], ecx
mov [rbp+var_4], 2
jmp short loc_43DC
loc_4370:
mov rcx, [rbp+var_28]
mov eax, [rcx+20h]
cmp eax, [rcx+0Ch]
jl short loc_43A1
mov rdi, [rbp+var_28]
mov esi, [rdi+28h]
call _ZN3ttt4game5State9_opp_signENS0_4SignE; ttt::game::State::_opp_sign(ttt::game::Sign)
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+2Ch], ecx
mov dword ptr [rax+24h], 3
mov [rbp+var_4], 2
jmp short loc_43DC
loc_43A1:
mov rax, [rbp+var_28]
mov dword ptr [rax+24h], 2
mov [rbp+var_4], 0
jmp short loc_43DC
loc_43B5:
mov rcx, [rbp+var_28]
mov eax, [rcx+20h]
cmp eax, [rcx+0Ch]
jl short loc_43D5
mov rax, [rbp+var_28]
mov dword ptr [rax+24h], 3
mov [rbp+var_4], 1
jmp short loc_43DC
loc_43D5:
mov [rbp+var_4], 0
loc_43DC:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long ttt::game::State::process_move(
ttt::game::State *a1,
unsigned int a2,
unsigned int a3,
unsigned int a4)
{
char v5; // [rsp+13h] [rbp-1Dh]
if ( *((_DWORD *)a1 + 9) == 3 )
{
return 3;
}
else if ( a2 == 2 )
{
return 7;
}
else if ( a2 == *((_DWORD *)a1 + 10) )
{
if ( (ttt::game::State::_valid_coords(a1, a3, a4) & 1) != 0 )
{
if ( (unsigned int)ttt::game::State::get_value(a1, a3, a4) == 2 )
{
ttt::game::State::_set_value(a1, a3, a4, a2);
++*((_DWORD *)a1 + 8);
*((_DWORD *)a1 + 10) = ttt::game::State::_opp_sign(a1, a2);
v5 = ttt::game::State::_is_winning(a1, a3, a4) & 1;
if ( *((_DWORD *)a1 + 9) == 2 )
{
*((_DWORD *)a1 + 9) = 3;
if ( (v5 & 1) != 0 )
{
return 1;
}
else
{
*((_DWORD *)a1 + 11) = *((_DWORD *)a1 + 10);
return 2;
}
}
else
{
*((_DWORD *)a1 + 9) = 1;
if ( (v5 & 1) != 0 )
{
if ( *((_DWORD *)a1 + 8) % 2 )
{
if ( *((_DWORD *)a1 + 8) < *((_DWORD *)a1 + 3) )
{
*((_DWORD *)a1 + 9) = 2;
return 0;
}
else
{
*((_DWORD *)a1 + 11) = ttt::game::State::_opp_sign(a1, *((unsigned int *)a1 + 10));
*((_DWORD *)a1 + 9) = 3;
return 2;
}
}
else
{
*((_DWORD *)a1 + 9) = 3;
*((_DWORD *)a1 + 11) = ttt::game::State::_opp_sign(a1, *((unsigned int *)a1 + 10));
return 2;
}
}
else if ( *((_DWORD *)a1 + 8) < *((_DWORD *)a1 + 3) )
{
return 0;
}
else
{
*((_DWORD *)a1 + 9) = 3;
return 1;
}
}
}
else
{
return 6;
}
}
else
{
return 4;
}
}
else
{
return 5;
}
}
| process_move:
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 dword ptr [RBP + -0x1c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
CMP dword ptr [RAX + 0x24],0x3
JNZ 0x0010423f
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001043dc
LAB_0010423f:
CMP dword ptr [RBP + -0x14],0x2
JNZ 0x00104251
MOV dword ptr [RBP + -0x4],0x7
JMP 0x001043dc
LAB_00104251:
MOV RCX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RCX + 0x28]
JZ 0x00104269
MOV dword ptr [RBP + -0x4],0x5
JMP 0x001043dc
LAB_00104269:
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x001043f0
TEST AL,0x1
JNZ 0x00104288
MOV dword ptr [RBP + -0x4],0x4
JMP 0x001043dc
LAB_00104288:
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x00104420
CMP EAX,0x2
JZ 0x001042a8
MOV dword ptr [RBP + -0x4],0x6
JMP 0x001043dc
LAB_001042a8:
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV ECX,dword ptr [RBP + -0x14]
CALL 0x00104450
MOV RDI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RDI + 0x20]
ADD EAX,0x1
MOV dword ptr [RDI + 0x20],EAX
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x00104490
MOV RDI,qword ptr [RBP + -0x28]
MOV dword ptr [RDI + 0x28],EAX
MOV ESI,dword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x001044d0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x28]
AND CL,0x1
MOV byte ptr [RBP + -0x1d],CL
CMP dword ptr [RAX + 0x24],0x2
JNZ 0x00104326
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x24],0x3
TEST byte ptr [RBP + -0x1d],0x1
JZ 0x00104310
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001043dc
LAB_00104310:
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x28]
MOV dword ptr [RAX + 0x2c],ECX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001043dc
LAB_00104326:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x24],0x1
TEST byte ptr [RBP + -0x1d],0x1
JZ 0x001043b5
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x20]
MOV ECX,0x2
CDQ
IDIV ECX
CMP EDX,0x0
JNZ 0x00104370
MOV RDI,qword ptr [RBP + -0x28]
MOV dword ptr [RDI + 0x24],0x3
MOV ESI,dword ptr [RDI + 0x28]
CALL 0x00104490
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x2c],ECX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001043dc
LAB_00104370:
MOV RCX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RCX + 0x20]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x001043a1
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RDI + 0x28]
CALL 0x00104490
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x2c],ECX
MOV dword ptr [RAX + 0x24],0x3
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001043dc
LAB_001043a1:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x24],0x2
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001043dc
LAB_001043b5:
MOV RCX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RCX + 0x20]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x001043d5
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x24],0x3
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001043dc
LAB_001043d5:
MOV dword ptr [RBP + -0x4],0x0
LAB_001043dc:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
/* ttt::game::State::process_move(ttt::game::Sign, int, int) */
int4 __thiscall
ttt::game::State::process_move(State *this,int param_2,int param_3,int param_4)
{
byte bVar1;
int iVar2;
int4 uVar3;
ulong uVar4;
int4 local_c;
if (*(int *)(this + 0x24) == 3) {
local_c = 3;
}
else if (param_2 == 2) {
local_c = 7;
}
else if (param_2 == *(int *)(this + 0x28)) {
uVar4 = _valid_coords(this,param_3,param_4);
if ((uVar4 & 1) == 0) {
local_c = 4;
}
else {
iVar2 = get_value(this,param_3,param_4);
if (iVar2 == 2) {
_set_value(this,param_3,param_4,param_2);
*(int *)(this + 0x20) = *(int *)(this + 0x20) + 1;
uVar3 = _opp_sign(this,param_2);
*(int4 *)(this + 0x28) = uVar3;
bVar1 = _is_winning(this,param_3,param_4);
if (*(int *)(this + 0x24) == 2) {
*(int4 *)(this + 0x24) = 3;
if ((bVar1 & 1) == 0) {
*(int4 *)(this + 0x2c) = *(int4 *)(this + 0x28);
local_c = 2;
}
else {
local_c = 1;
}
}
else {
*(int4 *)(this + 0x24) = 1;
if ((bVar1 & 1) == 0) {
if (*(int *)(this + 0x20) < *(int *)(this + 0xc)) {
local_c = 0;
}
else {
*(int4 *)(this + 0x24) = 3;
local_c = 1;
}
}
else if (*(int *)(this + 0x20) % 2 == 0) {
*(int4 *)(this + 0x24) = 3;
uVar3 = _opp_sign(this,*(int4 *)(this + 0x28));
*(int4 *)(this + 0x2c) = uVar3;
local_c = 2;
}
else if (*(int *)(this + 0x20) < *(int *)(this + 0xc)) {
*(int4 *)(this + 0x24) = 2;
local_c = 0;
}
else {
uVar3 = _opp_sign(this,*(int4 *)(this + 0x28));
*(int4 *)(this + 0x2c) = uVar3;
*(int4 *)(this + 0x24) = 3;
local_c = 2;
}
}
}
else {
local_c = 6;
}
}
}
else {
local_c = 5;
}
return local_c;
}
| |
41,701 | ttt::game::State::process_move(ttt::game::Sign, int, int) | vsennov[P]tictactoe-course/src/core/state.cpp | MoveResult State::process_move(Sign player, int x, int y) {
if (m_status == Status::ENDED) {
return MoveResult::ENDED;
}
if (player == Sign::NONE) {
return MoveResult::ERROR;
}
if (player != m_player) {
return MoveResult::DQ_OUT_OF_ORDER;
}
if (!_valid_coords(x, y)) {
return MoveResult::DQ_OUT_OF_FIELD;
}
if (get_value(x, y) != Sign::NONE) {
return MoveResult::DQ_PLACE_OCCUPIED;
}
_set_value(x, y, player);
++m_move_no;
m_player = _opp_sign(player);
const bool winning = _is_winning(x, y);
if (m_status == Status::LAST_MOVE) {
m_status = Status::ENDED;
if (winning) {
return MoveResult::DRAW;
} else {
m_winner = m_player;
return MoveResult::WIN;
}
}
m_status = Status::ACTIVE;
if (winning) {
if (m_move_no % 2 == 0) {
m_status = Status::ENDED;
m_winner = _opp_sign(m_player);
return MoveResult::WIN;
} else if (m_move_no >= m_opts.max_moves) {
m_winner = _opp_sign(m_player);
m_status = Status::ENDED;
return MoveResult::WIN;
} else {
m_status = Status::LAST_MOVE;
return MoveResult::OK;
}
}
if (m_move_no >= m_opts.max_moves) {
m_status = Status::ENDED;
return MoveResult::DRAW;
}
return MoveResult::OK;
} | O3 | cpp | ttt::game::State::process_move(ttt::game::Sign, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x3, %r14d
cmpl $0x3, 0x24(%rdi)
je 0x363f
movl %esi, %ebp
movl $0x7, %r14d
cmpl $0x2, %esi
je 0x363f
movq %rdi, %rbx
movl $0x5, %r14d
cmpl %ebp, 0x28(%rdi)
jne 0x363f
movl %edx, %r12d
movl $0x4, %r14d
testl %edx, %edx
js 0x363f
movl %ecx, %r15d
testl %ecx, %ecx
js 0x363f
cmpl %r12d, 0x1c(%rbx)
jle 0x363f
cmpl %r15d, 0x18(%rbx)
jle 0x363f
leaq 0x10(%rbx), %r13
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x3358
movl $0x6, %r14d
cmpl $0x2, %eax
jne 0x363f
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x33bc
xorl %r13d, %r13d
cmpl $0x1, %ebp
setne %r13b
movl 0x20(%rbx), %eax
movq %rax, 0x10(%rsp)
incl %eax
movl %eax, 0xc(%rsp)
movl %eax, 0x20(%rbx)
addl %r13d, %r13d
testl %ebp, %ebp
movl $0x1, %r14d
cmovel %r14d, %r13d
movl %r13d, 0x28(%rbx)
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x3692
cmpl $0x2, 0x24(%rbx)
jne 0x35c3
movl $0x3, 0x24(%rbx)
testb %al, %al
jne 0x363f
movl %r13d, 0x2c(%rbx)
jmp 0x3639
movl $0x1, 0x24(%rbx)
testb %al, %al
je 0x35ea
testb $0x1, 0x10(%rsp)
jne 0x3605
movl 0xc(%rsp), %eax
cmpl 0xc(%rbx), %eax
jge 0x3620
movl $0x2, 0x24(%rbx)
xorl %r14d, %r14d
jmp 0x363f
xorl %r14d, %r14d
movl 0xc(%rsp), %eax
cmpl 0xc(%rbx), %eax
jl 0x363f
movl $0x3, 0x24(%rbx)
movl $0x1, %r14d
jmp 0x363f
xorl %eax, %eax
testl %ebp, %ebp
setne %al
addl %eax, %eax
cmpl $0x1, %ebp
movl $0x3, 0x24(%rbx)
cmovel %ebp, %eax
movl %eax, 0x2c(%rbx)
jmp 0x3639
xorl %eax, %eax
testl %ebp, %ebp
setne %al
addl %eax, %eax
cmpl $0x1, %ebp
cmovel %ebp, %eax
movl %eax, 0x2c(%rbx)
movl $0x3, 0x24(%rbx)
movl $0x2, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN3ttt4game5State12process_moveENS0_4SignEii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14d, 3
cmp dword ptr [rdi+24h], 3
jz loc_363F
mov ebp, esi
mov r14d, 7
cmp esi, 2
jz loc_363F
mov rbx, rdi
mov r14d, 5
cmp [rdi+28h], ebp
jnz loc_363F
mov r12d, edx
mov r14d, 4
test edx, edx
js loc_363F
mov r15d, ecx
test ecx, ecx
js loc_363F
cmp [rbx+1Ch], r12d
jle loc_363F
cmp [rbx+18h], r15d
jle loc_363F
lea r13, [rbx+10h]
mov rdi, r13; this
mov esi, r12d; int
mov edx, r15d; int
call _ZNK3ttt4game11FieldBitmap3getEii; ttt::game::FieldBitmap::get(int,int)
mov r14d, 6
cmp eax, 2
jnz loc_363F
mov rdi, r13
mov esi, r12d
mov edx, r15d
mov ecx, ebp
call _ZN3ttt4game11FieldBitmap3setEiiNS0_4SignE; ttt::game::FieldBitmap::set(int,int,ttt::game::Sign)
xor r13d, r13d
cmp ebp, 1
setnz r13b
mov eax, [rbx+20h]
mov [rsp+48h+var_38], rax
inc eax
mov [rsp+48h+var_3C], eax
mov [rbx+20h], eax
add r13d, r13d
test ebp, ebp
mov r14d, 1
cmovz r13d, r14d
mov [rbx+28h], r13d
mov rdi, rbx; this
mov esi, r12d; int
mov edx, r15d; int
call _ZN3ttt4game5State11_is_winningEii; ttt::game::State::_is_winning(int,int)
cmp dword ptr [rbx+24h], 2
jnz short loc_35C3
mov dword ptr [rbx+24h], 3
test al, al
jnz loc_363F
mov [rbx+2Ch], r13d
jmp short loc_3639
loc_35C3:
mov dword ptr [rbx+24h], 1
test al, al
jz short loc_35EA
test byte ptr [rsp+48h+var_38], 1
jnz short loc_3605
mov eax, [rsp+48h+var_3C]
cmp eax, [rbx+0Ch]
jge short loc_3620
mov dword ptr [rbx+24h], 2
xor r14d, r14d
jmp short loc_363F
loc_35EA:
xor r14d, r14d
mov eax, [rsp+48h+var_3C]
cmp eax, [rbx+0Ch]
jl short loc_363F
mov dword ptr [rbx+24h], 3
mov r14d, 1
jmp short loc_363F
loc_3605:
xor eax, eax
test ebp, ebp
setnz al
add eax, eax
cmp ebp, 1
mov dword ptr [rbx+24h], 3
cmovz eax, ebp
mov [rbx+2Ch], eax
jmp short loc_3639
loc_3620:
xor eax, eax
test ebp, ebp
setnz al
add eax, eax
cmp ebp, 1
cmovz eax, ebp
mov [rbx+2Ch], eax
mov dword ptr [rbx+24h], 3
loc_3639:
mov r14d, 2
loc_363F:
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ttt::game::State::process_move(ttt::game::State *this, int a2, int a3, int a4)
{
unsigned int v4; // r14d
int v7; // r13d
char is_winning; // al
int v9; // eax
int v10; // eax
int v12; // [rsp+Ch] [rbp-3Ch]
int v13; // [rsp+10h] [rbp-38h]
v4 = 3;
if ( *((_DWORD *)this + 9) != 3 )
{
v4 = 7;
if ( a2 != 2 )
{
v4 = 5;
if ( *((_DWORD *)this + 10) == a2 )
{
v4 = 4;
if ( a3 >= 0 && a4 >= 0 && *((_DWORD *)this + 7) > a3 && *((_DWORD *)this + 6) > a4 )
{
v4 = 6;
if ( (unsigned int)ttt::game::FieldBitmap::get((ttt::game::State *)((char *)this + 16), a3, a4) == 2 )
{
ttt::game::FieldBitmap::set((long long *)this + 2, a3, a4, a2);
v13 = *((_DWORD *)this + 8);
v12 = v13 + 1;
*((_DWORD *)this + 8) = v13 + 1;
v7 = 2 * (a2 != 1);
v4 = 1;
if ( !a2 )
v7 = 1;
*((_DWORD *)this + 10) = v7;
is_winning = ttt::game::State::_is_winning(this, a3, a4);
if ( *((_DWORD *)this + 9) == 2 )
{
*((_DWORD *)this + 9) = 3;
if ( !is_winning )
{
*((_DWORD *)this + 11) = v7;
return 2;
}
}
else
{
*((_DWORD *)this + 9) = 1;
if ( is_winning )
{
if ( (v13 & 1) != 0 )
{
v9 = 2 * (a2 != 0);
*((_DWORD *)this + 9) = 3;
if ( a2 == 1 )
v9 = 1;
*((_DWORD *)this + 11) = v9;
return 2;
}
if ( v12 >= *((_DWORD *)this + 3) )
{
v10 = 2 * (a2 != 0);
if ( a2 == 1 )
v10 = 1;
*((_DWORD *)this + 11) = v10;
*((_DWORD *)this + 9) = 3;
return 2;
}
*((_DWORD *)this + 9) = 2;
return 0;
}
else
{
v4 = 0;
if ( v12 >= *((_DWORD *)this + 3) )
{
*((_DWORD *)this + 9) = 3;
return 1;
}
}
}
}
}
}
}
}
return v4;
}
| process_move:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14D,0x3
CMP dword ptr [RDI + 0x24],0x3
JZ 0x0010363f
MOV EBP,ESI
MOV R14D,0x7
CMP ESI,0x2
JZ 0x0010363f
MOV RBX,RDI
MOV R14D,0x5
CMP dword ptr [RDI + 0x28],EBP
JNZ 0x0010363f
MOV R12D,EDX
MOV R14D,0x4
TEST EDX,EDX
JS 0x0010363f
MOV R15D,ECX
TEST ECX,ECX
JS 0x0010363f
CMP dword ptr [RBX + 0x1c],R12D
JLE 0x0010363f
CMP dword ptr [RBX + 0x18],R15D
JLE 0x0010363f
LEA R13,[RBX + 0x10]
MOV RDI,R13
MOV ESI,R12D
MOV EDX,R15D
CALL 0x00103358
MOV R14D,0x6
CMP EAX,0x2
JNZ 0x0010363f
MOV RDI,R13
MOV ESI,R12D
MOV EDX,R15D
MOV ECX,EBP
CALL 0x001033bc
XOR R13D,R13D
CMP EBP,0x1
SETNZ R13B
MOV EAX,dword ptr [RBX + 0x20]
MOV qword ptr [RSP + 0x10],RAX
INC EAX
MOV dword ptr [RSP + 0xc],EAX
MOV dword ptr [RBX + 0x20],EAX
ADD R13D,R13D
TEST EBP,EBP
MOV R14D,0x1
CMOVZ R13D,R14D
MOV dword ptr [RBX + 0x28],R13D
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,R15D
CALL 0x00103692
CMP dword ptr [RBX + 0x24],0x2
JNZ 0x001035c3
MOV dword ptr [RBX + 0x24],0x3
TEST AL,AL
JNZ 0x0010363f
MOV dword ptr [RBX + 0x2c],R13D
JMP 0x00103639
LAB_001035c3:
MOV dword ptr [RBX + 0x24],0x1
TEST AL,AL
JZ 0x001035ea
TEST byte ptr [RSP + 0x10],0x1
JNZ 0x00103605
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RBX + 0xc]
JGE 0x00103620
MOV dword ptr [RBX + 0x24],0x2
XOR R14D,R14D
JMP 0x0010363f
LAB_001035ea:
XOR R14D,R14D
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RBX + 0xc]
JL 0x0010363f
MOV dword ptr [RBX + 0x24],0x3
MOV R14D,0x1
JMP 0x0010363f
LAB_00103605:
XOR EAX,EAX
TEST EBP,EBP
SETNZ AL
ADD EAX,EAX
CMP EBP,0x1
MOV dword ptr [RBX + 0x24],0x3
CMOVZ EAX,EBP
MOV dword ptr [RBX + 0x2c],EAX
JMP 0x00103639
LAB_00103620:
XOR EAX,EAX
TEST EBP,EBP
SETNZ AL
ADD EAX,EAX
CMP EBP,0x1
CMOVZ EAX,EBP
MOV dword ptr [RBX + 0x2c],EAX
MOV dword ptr [RBX + 0x24],0x3
LAB_00103639:
MOV R14D,0x2
LAB_0010363f:
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ttt::game::State::process_move(ttt::game::Sign, int, int) */
int8 __thiscall
ttt::game::State::process_move(State *this,int param_2,int param_3,int param_4)
{
uint uVar1;
char cVar2;
int iVar3;
int iVar4;
int8 uVar5;
uVar5 = 3;
if ((((*(int *)(this + 0x24) != 3) && (uVar5 = 7, param_2 != 2)) &&
(uVar5 = 5, *(int *)(this + 0x28) == param_2)) &&
(((uVar5 = 4, -1 < param_3 && (-1 < param_4)) &&
((param_3 < *(int *)(this + 0x1c) && (param_4 < *(int *)(this + 0x18))))))) {
iVar3 = FieldBitmap::get((FieldBitmap *)(this + 0x10),param_3,param_4);
uVar5 = 6;
if (iVar3 == 2) {
FieldBitmap::set((FieldBitmap *)(this + 0x10),param_3,param_4,param_2);
uVar1 = *(uint *)(this + 0x20);
iVar4 = uVar1 + 1;
*(int *)(this + 0x20) = iVar4;
iVar3 = (uint)(param_2 != 1) * 2;
if (param_2 == 0) {
iVar3 = 1;
}
*(int *)(this + 0x28) = iVar3;
cVar2 = _is_winning(this,param_3,param_4);
if (*(int *)(this + 0x24) == 2) {
*(int4 *)(this + 0x24) = 3;
if (cVar2 != '\0') {
return 1;
}
*(int *)(this + 0x2c) = iVar3;
}
else {
*(int4 *)(this + 0x24) = 1;
if (cVar2 == '\0') {
if (iVar4 < *(int *)(this + 0xc)) {
return 0;
}
*(int4 *)(this + 0x24) = 3;
return 1;
}
if ((uVar1 & 1) == 0) {
if (iVar4 < *(int *)(this + 0xc)) {
*(int4 *)(this + 0x24) = 2;
return 0;
}
iVar3 = (uint)(param_2 != 0) * 2;
if (param_2 == 1) {
iVar3 = 1;
}
*(int *)(this + 0x2c) = iVar3;
*(int4 *)(this + 0x24) = 3;
}
else {
iVar3 = (uint)(param_2 != 0) * 2;
*(int4 *)(this + 0x24) = 3;
if (param_2 == 1) {
iVar3 = 1;
}
*(int *)(this + 0x2c) = iVar3;
}
}
uVar5 = 2;
}
}
return uVar5;
}
| |
41,702 | ma_tls_end | eloqsql/libmariadb/libmariadb/secure/openssl.c | void ma_tls_end()
{
if (ma_tls_initialized)
{
pthread_mutex_lock(&LOCK_openssl_config);
#ifndef HAVE_OPENSSL_1_1_API
if (LOCK_crypto)
{
int i;
CRYPTO_set_locking_callback(NULL);
CRYPTO_THREADID_set_callback(NULL);
for (i=0; i < CRYPTO_num_locks(); i++)
pthread_mutex_destroy(&LOCK_crypto[i]);
ma_free((gptr)LOCK_crypto);
LOCK_crypto= NULL;
}
#endif
if (mariadb_deinitialize_ssl)
{
#ifndef HAVE_OPENSSL_1_1_API
ERR_remove_thread_state(NULL);
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
ERR_free_strings();
CONF_modules_free();
CONF_modules_unload(1);
#endif
}
ma_tls_initialized= FALSE;
pthread_mutex_unlock(&LOCK_openssl_config);
pthread_mutex_destroy(&LOCK_openssl_config);
}
return;
} | O0 | c | ma_tls_end:
pushq %rbp
movq %rsp, %rbp
leaq 0x29ca5(%rip), %rax # 0x60440
cmpb $0x0, (%rax)
je 0x367dc
leaq 0x2b579(%rip), %rdi # 0x61d20
callq 0x13660
leaq 0x2844d(%rip), %rax # 0x5ec00
cmpl $0x0, (%rax)
je 0x367ba
jmp 0x367ba
leaq 0x29c7f(%rip), %rax # 0x60440
movb $0x0, (%rax)
leaq 0x2b555(%rip), %rdi # 0x61d20
callq 0x13310
leaq 0x2b549(%rip), %rdi # 0x61d20
callq 0x134f0
popq %rbp
retq
nop
| ma_tls_end:
push rbp
mov rbp, rsp
lea rax, ma_tls_initialized
cmp byte ptr [rax], 0
jz short loc_367DC
lea rdi, LOCK_openssl_config
call _pthread_mutex_lock
lea rax, mariadb_deinitialize_ssl
cmp dword ptr [rax], 0
jz short loc_367BA
jmp short $+2
loc_367BA:
lea rax, ma_tls_initialized
mov byte ptr [rax], 0
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
lea rdi, LOCK_openssl_config
call _pthread_mutex_destroy
loc_367DC:
pop rbp
retn
| void *ma_tls_end()
{
void *result; // rax
result = &ma_tls_initialized;
if ( ma_tls_initialized )
{
pthread_mutex_lock(&LOCK_openssl_config);
ma_tls_initialized = 0;
pthread_mutex_unlock(&LOCK_openssl_config);
return (void *)pthread_mutex_destroy(&LOCK_openssl_config);
}
return result;
}
| ma_tls_end:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x160440]
CMP byte ptr [RAX],0x0
JZ 0x001367dc
LEA RDI,[0x161d20]
CALL 0x00113660
LEA RAX,[0x15ec00]
CMP dword ptr [RAX],0x0
JZ 0x001367ba
JMP 0x001367ba
LAB_001367ba:
LEA RAX,[0x160440]
MOV byte ptr [RAX],0x0
LEA RDI,[0x161d20]
CALL 0x00113310
LEA RDI,[0x161d20]
CALL 0x001134f0
LAB_001367dc:
POP RBP
RET
|
void ma_tls_end(void)
{
if (ma_tls_initialized != '\0') {
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
ma_tls_initialized = '\0';
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
pthread_mutex_destroy((pthread_mutex_t *)LOCK_openssl_config);
}
return;
}
| |
41,703 | ma_tls_end | eloqsql/libmariadb/libmariadb/secure/openssl.c | void ma_tls_end()
{
if (ma_tls_initialized)
{
pthread_mutex_lock(&LOCK_openssl_config);
#ifndef HAVE_OPENSSL_1_1_API
if (LOCK_crypto)
{
int i;
CRYPTO_set_locking_callback(NULL);
CRYPTO_THREADID_set_callback(NULL);
for (i=0; i < CRYPTO_num_locks(); i++)
pthread_mutex_destroy(&LOCK_crypto[i]);
ma_free((gptr)LOCK_crypto);
LOCK_crypto= NULL;
}
#endif
if (mariadb_deinitialize_ssl)
{
#ifndef HAVE_OPENSSL_1_1_API
ERR_remove_thread_state(NULL);
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
ERR_free_strings();
CONF_modules_free();
CONF_modules_unload(1);
#endif
}
ma_tls_initialized= FALSE;
pthread_mutex_unlock(&LOCK_openssl_config);
pthread_mutex_destroy(&LOCK_openssl_config);
}
return;
} | O3 | c | ma_tls_end:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x21346(%rip), %r14 # 0x48f50
cmpb $0x0, (%r14)
je 0x27c37
leaq 0x22c19(%rip), %rbx # 0x4a830
movq %rbx, %rdi
callq 0x136a0
movb $0x0, (%r14)
movq %rbx, %rdi
callq 0x13330
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x13540
popq %rbx
popq %r14
popq %rbp
retq
| ma_tls_end:
push rbp
mov rbp, rsp
push r14
push rbx
lea r14, ma_tls_initialized
cmp byte ptr [r14], 0
jz short loc_27C37
lea rbx, LOCK_openssl_config
mov rdi, rbx
call _pthread_mutex_lock
mov byte ptr [r14], 0
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _pthread_mutex_destroy
loc_27C37:
pop rbx
pop r14
pop rbp
retn
| long long ma_tls_end()
{
long long result; // rax
if ( ma_tls_initialized )
{
pthread_mutex_lock(&LOCK_openssl_config);
ma_tls_initialized = 0;
pthread_mutex_unlock(&LOCK_openssl_config);
return pthread_mutex_destroy(&LOCK_openssl_config);
}
return result;
}
| ma_tls_end:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA R14,[0x148f50]
CMP byte ptr [R14],0x0
JZ 0x00127c37
LEA RBX,[0x14a830]
MOV RDI,RBX
CALL 0x001136a0
MOV byte ptr [R14],0x0
MOV RDI,RBX
CALL 0x00113330
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00113540
LAB_00127c37:
POP RBX
POP R14
POP RBP
RET
|
void ma_tls_end(void)
{
if (ma_tls_initialized != '\0') {
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
ma_tls_initialized = 0;
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
pthread_mutex_destroy((pthread_mutex_t *)LOCK_openssl_config);
return;
}
return;
}
| |
41,704 | LefDefParser::defwNetPathWidth(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwNetPathWidth(int w)
{
defwFunc = DEFW_PATH; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (defwState != DEFW_PATH)
return DEFW_BAD_ORDER;
if ((++defwLineItemCounter & 3) == 0) {
fprintf(defwFile, "\n ");
defwLines++;
}
fprintf(defwFile, " %d", w);
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwNetPathWidth(int):
pushq %rax
movl %edi, (%rsp)
leaq 0x103bd(%rip), %rax # 0x2b168
movl $0x37, (%rax)
leaq 0x103a0(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x1adcb
movl $0x1, 0x4(%rsp)
jmp 0x1ae4e
leaq 0x10392(%rip), %rax # 0x2b164
cmpl $0x37, (%rax)
je 0x1ade1
movl $0x2, 0x4(%rsp)
jmp 0x1ae4e
leaq 0x10394(%rip), %rax # 0x2b17c
movl (%rax), %eax
addl $0x1, %eax
leaq 0x10388(%rip), %rcx # 0x2b17c
movl %eax, (%rcx)
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x1ae2b
leaq 0x10353(%rip), %rax # 0x2b158
movq (%rax), %rdi
leaq 0x9eff(%rip), %rsi # 0x24d0e
movb $0x0, %al
callq 0x10f0
leaq 0x10343(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x10337(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0x10326(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl (%rsp), %edx
leaq 0x9894(%rip), %rsi # 0x246d3
movb $0x0, %al
callq 0x10f0
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser16defwNetPathWidthEi:
push rax
mov [rsp+8+var_8], edi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 37h ; '7'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_1ADCB
mov [rsp+8+var_4], 1
jmp loc_1AE4E
loc_1ADCB:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 37h ; '7'
jz short loc_1ADE1
mov [rsp+8+var_4], 2
jmp short loc_1AE4E
loc_1ADE1:
lea rax, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter
mov eax, [rax]
add eax, 1
lea rcx, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter
mov [rcx], eax
and eax, 3
cmp eax, 0
jnz short loc_1AE2B
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, asc_24D0E; "\n "
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_1AE2B:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+8+var_8]
lea rsi, aDesignrulewidt+19h; " %d"
mov al, 0
call _fprintf
mov [rsp+8+var_4], 0
loc_1AE4E:
mov eax, [rsp+8+var_4]
pop rcx
retn
| long long LefDefParser::defwNetPathWidth(LefDefParser *this)
{
LefDefParser::defwFunc = 55;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwState == 55 )
{
if ( (++LefDefParser::defwLineItemCounter & 3) == 0 )
{
fprintf(LefDefParser::defwFile, "\n ");
++LefDefParser::defwLines;
}
fprintf(LefDefParser::defwFile, " %d", (_DWORD)this);
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwNetPathWidth:
PUSH RAX
MOV dword ptr [RSP],EDI
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x37
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x0011adcb
MOV dword ptr [RSP + 0x4],0x1
JMP 0x0011ae4e
LAB_0011adcb:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x37
JZ 0x0011ade1
MOV dword ptr [RSP + 0x4],0x2
JMP 0x0011ae4e
LAB_0011ade1:
LEA RAX,[0x12b17c]
MOV EAX,dword ptr [RAX]
ADD EAX,0x1
LEA RCX,[0x12b17c]
MOV dword ptr [RCX],EAX
AND EAX,0x3
CMP EAX,0x0
JNZ 0x0011ae2b
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x124d0e]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_0011ae2b:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP]
LEA RSI,[0x1246d3]
MOV AL,0x0
CALL 0x001010f0
MOV dword ptr [RSP + 0x4],0x0
LAB_0011ae4e:
MOV EAX,dword ptr [RSP + 0x4]
POP RCX
RET
|
/* LefDefParser::defwNetPathWidth(int) */
int4 LefDefParser::defwNetPathWidth(int param_1)
{
int4 local_4;
defwFunc = 0x37;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if (defwState == 0x37) {
defwLineItemCounter = defwLineItemCounter + 1;
if ((defwLineItemCounter & 3) == 0) {
fprintf(defwFile,"\n ");
defwLines = defwLines + 1;
}
fprintf(defwFile," %d",param_1);
local_4 = 0;
}
else {
local_4 = 2;
}
return local_4;
}
| |
41,705 | init_state_maps | eloqsql/mysys/charset.c | static my_bool init_state_maps(struct charset_info_st *cs)
{
uint i;
uchar *state_map;
uchar *ident_map;
if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME))))
return 1;
cs->ident_map= ident_map= state_map + 256;
/* Fill state_map with states to get a faster parser */
for (i=0; i < 256 ; i++)
{
if (my_isalpha(cs,i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isdigit(cs,i))
state_map[i]=(uchar) MY_LEX_NUMBER_IDENT;
else if (is_multi_byte_ident(cs, i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isspace(cs,i))
state_map[i]=(uchar) MY_LEX_SKIP;
else
state_map[i]=(uchar) MY_LEX_CHAR;
}
state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT;
state_map[(uchar)'\'']=(uchar) MY_LEX_STRING;
state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT;
state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP;
state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP;
state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL;
state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT;
state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON;
state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR;
state_map[0]=(uchar) MY_LEX_EOL;
state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE;
state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT;
state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT;
state_map[(uchar)'@']= (uchar) MY_LEX_USER_END;
state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER;
state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER;
state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT;
state_map[(uchar)',']= (uchar) MY_LEX_COMMA;
state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER;
/*
Create a second map to make it faster to find identifiers
*/
for (i=0; i < 256 ; i++)
{
ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT ||
state_map[i] == MY_LEX_NUMBER_IDENT);
}
/* Special handling of hex and binary strings */
state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX;
state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN;
state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR;
return 0;
} | O0 | c | init_state_maps:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x200, %edi # imm = 0x200
movl $0x10, %esi
callq 0xf3f50
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rax, 0x80(%rcx)
cmpq $0x0, %rax
jne 0xdd069
movb $0x1, -0x1(%rbp)
jmp 0xdd296
movq -0x20(%rbp), %rcx
addq $0x100, %rcx # imm = 0x100
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp) # imm = 0x100
jae 0xdd153
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xdd0c2
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x2, (%rax,%rcx)
jmp 0xdd143
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xdd0ea
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0xe, (%rax,%rcx)
jmp 0xdd141
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movzbl %al, %esi
callq 0xdd370
cmpb $0x0, %al
je 0xdd10a
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x2, (%rax,%rcx)
jmp 0xdd13f
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xdd132
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x1a, (%rax,%rcx)
jmp 0xdd13d
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x1, (%rax,%rcx)
jmp 0xdd13f
jmp 0xdd141
jmp 0xdd143
jmp 0xdd145
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xdd08a
movq -0x20(%rbp), %rax
movb $0x2, 0x24(%rax)
movq -0x20(%rbp), %rax
movb $0x2, 0x5f(%rax)
movq -0x20(%rbp), %rax
movb $0xa, 0x27(%rax)
movq -0x20(%rbp), %rax
movb $0x10, 0x2e(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x21(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x3d(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x3e(%rax)
movq -0x20(%rbp), %rax
movb $0x9, 0x3c(%rax)
movq -0x20(%rbp), %rax
movb $0x11, 0x7c(%rax)
movq -0x20(%rbp), %rax
movb $0x11, 0x26(%rax)
movq -0x20(%rbp), %rax
movb $0xb, 0x23(%rax)
movq -0x20(%rbp), %rax
movb $0x16, 0x3b(%rax)
movq -0x20(%rbp), %rax
movb $0x17, 0x3a(%rax)
movq -0x20(%rbp), %rax
movb $0x12, (%rax)
movq -0x20(%rbp), %rax
movb $0x13, 0x5c(%rax)
movq -0x20(%rbp), %rax
movb $0x14, 0x2f(%rax)
movq -0x20(%rbp), %rax
movb $0x15, 0x2a(%rax)
movq -0x20(%rbp), %rax
movb $0x18, 0x40(%rax)
movq -0x20(%rbp), %rax
movb $0x1b, 0x60(%rax)
movq -0x20(%rbp), %rax
movb $0x21, 0x22(%rax)
movq -0x20(%rbp), %rax
movb $0x22, 0x2d(%rax)
movq -0x20(%rbp), %rax
movb $0x24, 0x2c(%rax)
movq -0x20(%rbp), %rax
movb $0x23, 0x3f(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp) # imm = 0x100
jae 0xdd262
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x2, %ecx
movb %al, -0x29(%rbp)
je 0xdd243
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xe, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xdd211
movq -0x20(%rbp), %rax
movb $0x1e, 0x58(%rax)
movq -0x20(%rbp), %rax
movb $0x1e, 0x78(%rax)
movq -0x20(%rbp), %rax
movb $0x1f, 0x42(%rax)
movq -0x20(%rbp), %rax
movb $0x1f, 0x62(%rax)
movq -0x20(%rbp), %rax
movb $0x20, 0x4e(%rax)
movq -0x20(%rbp), %rax
movb $0x20, 0x6e(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nop
| init_state_maps:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov edi, 200h
mov esi, 10h
call my_once_alloc
mov [rbp+var_20], rax
mov rcx, [rbp+var_10]
mov [rcx+80h], rax
cmp rax, 0
jnz short loc_DD069
mov [rbp+var_1], 1
jmp loc_DD296
loc_DD069:
mov rcx, [rbp+var_20]
add rcx, 100h
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov [rax+88h], rcx
mov [rbp+var_14], 0
loc_DD08A:
cmp [rbp+var_14], 100h
jnb loc_DD153
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 3
cmp eax, 0
jz short loc_DD0C2
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 2
jmp loc_DD143
loc_DD0C2:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 4
cmp eax, 0
jz short loc_DD0EA
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 0Eh
jmp short loc_DD141
loc_DD0EA:
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
movzx esi, al
call is_multi_byte_ident
cmp al, 0
jz short loc_DD10A
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 2
jmp short loc_DD13F
loc_DD10A:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_DD132
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 1Ah
jmp short loc_DD13D
loc_DD132:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 1
loc_DD13D:
jmp short $+2
loc_DD13F:
jmp short $+2
loc_DD141:
jmp short $+2
loc_DD143:
jmp short $+2
loc_DD145:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp loc_DD08A
loc_DD153:
mov rax, [rbp+var_20]
mov byte ptr [rax+24h], 2
mov rax, [rbp+var_20]
mov byte ptr [rax+5Fh], 2
mov rax, [rbp+var_20]
mov byte ptr [rax+27h], 0Ah
mov rax, [rbp+var_20]
mov byte ptr [rax+2Eh], 10h
mov rax, [rbp+var_20]
mov byte ptr [rax+21h], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Dh], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Eh], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Ch], 9
mov rax, [rbp+var_20]
mov byte ptr [rax+7Ch], 11h
mov rax, [rbp+var_20]
mov byte ptr [rax+26h], 11h
mov rax, [rbp+var_20]
mov byte ptr [rax+23h], 0Bh
mov rax, [rbp+var_20]
mov byte ptr [rax+3Bh], 16h
mov rax, [rbp+var_20]
mov byte ptr [rax+3Ah], 17h
mov rax, [rbp+var_20]
mov byte ptr [rax], 12h
mov rax, [rbp+var_20]
mov byte ptr [rax+5Ch], 13h
mov rax, [rbp+var_20]
mov byte ptr [rax+2Fh], 14h
mov rax, [rbp+var_20]
mov byte ptr [rax+2Ah], 15h
mov rax, [rbp+var_20]
mov byte ptr [rax+40h], 18h
mov rax, [rbp+var_20]
mov byte ptr [rax+60h], 1Bh
mov rax, [rbp+var_20]
mov byte ptr [rax+22h], 21h ; '!'
mov rax, [rbp+var_20]
mov byte ptr [rax+2Dh], 22h ; '"'
mov rax, [rbp+var_20]
mov byte ptr [rax+2Ch], 24h ; '$'
mov rax, [rbp+var_20]
mov byte ptr [rax+3Fh], 23h ; '#'
mov [rbp+var_14], 0
loc_DD211:
cmp [rbp+var_14], 100h
jnb short loc_DD262
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
movzx ecx, byte ptr [rax+rcx]
mov al, 1
cmp ecx, 2
mov [rbp+var_29], al
jz short loc_DD243
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0Eh
setz al
mov [rbp+var_29], al
loc_DD243:
mov al, [rbp+var_29]
and al, 1
movzx eax, al
mov dl, al
mov rax, [rbp+var_28]
mov ecx, [rbp+var_14]
mov [rax+rcx], dl
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_DD211
loc_DD262:
mov rax, [rbp+var_20]
mov byte ptr [rax+58h], 1Eh
mov rax, [rbp+var_20]
mov byte ptr [rax+78h], 1Eh
mov rax, [rbp+var_20]
mov byte ptr [rax+42h], 1Fh
mov rax, [rbp+var_20]
mov byte ptr [rax+62h], 1Fh
mov rax, [rbp+var_20]
mov byte ptr [rax+4Eh], 20h ; ' '
mov rax, [rbp+var_20]
mov byte ptr [rax+6Eh], 20h ; ' '
mov [rbp+var_1], 0
loc_DD296:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char init_state_maps(_QWORD *a1)
{
bool v2; // [rsp+7h] [rbp-29h]
_BYTE *v3; // [rsp+10h] [rbp-20h]
unsigned int i; // [rsp+1Ch] [rbp-14h]
unsigned int j; // [rsp+1Ch] [rbp-14h]
v3 = (_BYTE *)my_once_alloc(512LL, 16LL);
a1[16] = v3;
if ( !v3 )
return 1;
a1[17] = v3 + 256;
for ( i = 0; i < 0x100; ++i )
{
if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 3) != 0 )
{
v3[i] = 2;
}
else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 4) != 0 )
{
v3[i] = 14;
}
else if ( (unsigned __int8)is_multi_byte_ident(a1, (unsigned __int8)i) )
{
v3[i] = 2;
}
else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 8) != 0 )
{
v3[i] = 26;
}
else
{
v3[i] = 1;
}
}
v3[36] = 2;
v3[95] = 2;
v3[39] = 10;
v3[46] = 16;
v3[33] = 8;
v3[61] = 8;
v3[62] = 8;
v3[60] = 9;
v3[124] = 17;
v3[38] = 17;
v3[35] = 11;
v3[59] = 22;
v3[58] = 23;
*v3 = 18;
v3[92] = 19;
v3[47] = 20;
v3[42] = 21;
v3[64] = 24;
v3[96] = 27;
v3[34] = 33;
v3[45] = 34;
v3[44] = 36;
v3[63] = 35;
for ( j = 0; j < 0x100; ++j )
{
v2 = 1;
if ( v3[j] != 2 )
v2 = v3[j] == 14;
v3[j + 256] = v2;
}
v3[88] = 30;
v3[120] = 30;
v3[66] = 31;
v3[98] = 31;
v3[78] = 32;
v3[110] = 32;
return 0;
}
| init_state_maps:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV EDI,0x200
MOV ESI,0x10
CALL 0x001f3f50
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x80],RAX
CMP RAX,0x0
JNZ 0x001dd069
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001dd296
LAB_001dd069:
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x100
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],RCX
MOV dword ptr [RBP + -0x14],0x0
LAB_001dd08a:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x001dd153
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x3
CMP EAX,0x0
JZ 0x001dd0c2
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x001dd143
LAB_001dd0c2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001dd0ea
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0xe
JMP 0x001dd141
LAB_001dd0ea:
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOVZX ESI,AL
CALL 0x001dd370
CMP AL,0x0
JZ 0x001dd10a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x001dd13f
LAB_001dd10a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001dd132
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1a
JMP 0x001dd13d
LAB_001dd132:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1
LAB_001dd13d:
JMP 0x001dd13f
LAB_001dd13f:
JMP 0x001dd141
LAB_001dd141:
JMP 0x001dd143
LAB_001dd143:
JMP 0x001dd145
LAB_001dd145:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001dd08a
LAB_001dd153:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x24],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5f],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x27],0xa
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2e],0x10
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x21],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3d],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3e],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3c],0x9
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x7c],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x26],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x23],0xb
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3b],0x16
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3a],0x17
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x12
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5c],0x13
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2f],0x14
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2a],0x15
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x40],0x18
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x60],0x1b
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x22],0x21
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2d],0x22
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2c],0x24
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3f],0x23
MOV dword ptr [RBP + -0x14],0x0
LAB_001dd211:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x001dd262
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV AL,0x1
CMP ECX,0x2
MOV byte ptr [RBP + -0x29],AL
JZ 0x001dd243
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xe
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_001dd243:
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOVZX EAX,AL
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001dd211
LAB_001dd262:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x58],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x78],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x42],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x62],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x4e],0x20
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x6e],0x20
MOV byte ptr [RBP + -0x1],0x0
LAB_001dd296:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 init_state_maps(long param_1)
{
char cVar1;
int1 *puVar2;
bool local_31;
uint local_1c;
int1 local_9;
puVar2 = (int1 *)my_once_alloc(0x200,0x10);
*(int1 **)(param_1 + 0x80) = puVar2;
if (puVar2 == (int1 *)0x0) {
local_9 = 1;
}
else {
*(int1 **)(param_1 + 0x88) = puVar2 + 0x100;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 3) == 0) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 4) == 0) {
cVar1 = is_multi_byte_ident(param_1,local_1c & 0xff);
if (cVar1 == '\0') {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 8) == 0) {
puVar2[local_1c] = 1;
}
else {
puVar2[local_1c] = 0x1a;
}
}
else {
puVar2[local_1c] = 2;
}
}
else {
puVar2[local_1c] = 0xe;
}
}
else {
puVar2[local_1c] = 2;
}
}
puVar2[0x24] = 2;
puVar2[0x5f] = 2;
puVar2[0x27] = 10;
puVar2[0x2e] = 0x10;
puVar2[0x21] = 8;
puVar2[0x3d] = 8;
puVar2[0x3e] = 8;
puVar2[0x3c] = 9;
puVar2[0x7c] = 0x11;
puVar2[0x26] = 0x11;
puVar2[0x23] = 0xb;
puVar2[0x3b] = 0x16;
puVar2[0x3a] = 0x17;
*puVar2 = 0x12;
puVar2[0x5c] = 0x13;
puVar2[0x2f] = 0x14;
puVar2[0x2a] = 0x15;
puVar2[0x40] = 0x18;
puVar2[0x60] = 0x1b;
puVar2[0x22] = 0x21;
puVar2[0x2d] = 0x22;
puVar2[0x2c] = 0x24;
puVar2[0x3f] = 0x23;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
local_31 = true;
if (puVar2[local_1c] != '\x02') {
local_31 = puVar2[local_1c] == '\x0e';
}
(puVar2 + 0x100)[local_1c] = local_31;
}
puVar2[0x58] = 0x1e;
puVar2[0x78] = 0x1e;
puVar2[0x42] = 0x1f;
puVar2[0x62] = 0x1f;
puVar2[0x4e] = 0x20;
puVar2[0x6e] = 0x20;
local_9 = 0;
}
return local_9;
}
| |
41,706 | maria_rtree_get_first | eloqsql/storage/maria/ma_rt_index.c | int maria_rtree_get_first(MARIA_HA *info, uint keynr, uint key_length)
{
my_off_t root;
MARIA_KEYDEF *keyinfo= info->s->keyinfo + keynr;
if ((root= info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
info->maria_rtree_recursion_depth= -1;
info->keyread_buff_used= 1;
return maria_rtree_get_req(info, keyinfo, key_length, root, 0);
} | O0 | c | maria_rtree_get_first:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0x98624
callq 0xc0d80
movl $0x89, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x98657
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x6f0(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
xorl %r8d, %r8d
callq 0x98660
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
| maria_rtree_get_first:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_14]
imul rcx, 118h
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+118h]
mov ecx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_98624
call _my_thread_var
mov dword ptr [rax], 89h
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_98657
loc_98624:
mov rax, [rbp+var_10]
mov dword ptr [rax+6F0h], 0FFFFFFFFh
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov edx, [rbp+var_18]
mov rcx, [rbp+var_20]
xor r8d, r8d
call maria_rtree_get_req
mov [rbp+var_4], eax
loc_98657:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long maria_rtree_get_first(long long a1, const char *a2, unsigned int a3)
{
long long v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v4 = 280LL * (unsigned int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL);
v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 280LL) + 8LL * (unsigned int)a2);
if ( v5 == -1 )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return (unsigned int)-1;
}
else
{
*(_DWORD *)(a1 + 1776) = -1;
*(_BYTE *)(a1 + 1669) = 1;
return (unsigned int)maria_rtree_get_req(a1, v4, a3, v5, 0LL);
}
}
| maria_rtree_get_first:
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 RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x00198624
CALL 0x001c0d80
MOV dword ptr [RAX],0x89
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00198657
LAB_00198624:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x6f0],0xffffffff
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
XOR R8D,R8D
CALL 0x00198660
MOV dword ptr [RBP + -0x4],EAX
LAB_00198657:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 maria_rtree_get_first(long *param_1,uint param_2,int4 param_3)
{
long lVar1;
long lVar2;
int4 *puVar3;
int4 local_c;
lVar1 = *(long *)(*param_1 + 0x570);
lVar2 = *(long *)(*(long *)(*param_1 + 0x118) + (ulong)param_2 * 8);
if (lVar2 == -1) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
local_c = 0xffffffff;
}
else {
*(int4 *)(param_1 + 0xde) = 0xffffffff;
*(int1 *)((long)param_1 + 0x685) = 1;
local_c = maria_rtree_get_req(param_1,lVar1 + (ulong)param_2 * 0x118,param_3,lVar2,0);
}
return local_c;
}
| |
41,707 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const | monkey531[P]llama/common/json.hpp | pointer operator->() const
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end());
return &(m_it.object_iterator->second);
}
case value_t::array:
{
JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end());
return &*m_it.array_iterator;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))
{
return m_object;
}
JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object));
}
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %rax
testq %rax, %rax
je 0x4c7e1
movq %rdi, %r14
movzbl (%rax), %ecx
cmpl $0x2, %ecx
je 0x4c744
cmpl $0x1, %ecx
jne 0x4c771
movq 0x8(%rax), %rcx
movq 0x8(%r14), %rax
cmpq 0x8(%rcx), %rax
je 0x4c7fd
addq $0x20, %rax
jmp 0x4c778
movq 0x8(%rax), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%rcx), %rax
jne 0x4c778
leaq 0x60d25(%rip), %rdi # 0xad47e
leaq 0x5f4f9(%rip), %rdx # 0xabc59
leaq 0x622bd(%rip), %rcx # 0xaea24
movl $0x3397, %esi # imm = 0x3397
jmp 0x4c817
cmpq $0x0, 0x18(%r14)
jne 0x4c783
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x18380
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x622c1(%rip), %rsi # 0xaea61
leaq 0x622ca(%rip), %rdx # 0xaea71
leaq 0x8(%rsp), %rdi
callq 0x200f4
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xd6, %esi
callq 0x4cca8
xorl %ebp, %ebp
leaq 0x92c1e(%rip), %rsi # 0xdf3f0
leaq 0x2dd3(%rip), %rdx # 0x4f5ac
movq %rbx, %rdi
callq 0x18bb0
leaq 0x60c96(%rip), %rdi # 0xad47e
leaq 0x5f46a(%rip), %rdx # 0xabc59
leaq 0x633e6(%rip), %rcx # 0xafbdc
movl $0x338b, %esi # imm = 0x338B
jmp 0x4c817
leaq 0x60c7a(%rip), %rdi # 0xad47e
leaq 0x5f44e(%rip), %rdx # 0xabc59
leaq 0x621d3(%rip), %rcx # 0xae9e5
movl $0x3391, %esi # imm = 0x3391
xorl %eax, %eax
callq 0x18b50
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4c838
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186e0
testb %bpl, %bpl
jne 0x4c842
jmp 0x4c84a
movq %rax, %r14
movq %rbx, %rdi
callq 0x18520
movq %r14, %rdi
callq 0x18c10
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rax, [rdi]
test rax, rax
jz loc_4C7E1
mov r14, rdi
movzx ecx, byte ptr [rax]
cmp ecx, 2
jz short loc_4C744
cmp ecx, 1
jnz short loc_4C771
mov rcx, [rax+8]
mov rax, [r14+8]
cmp rax, [rcx+8]
jz loc_4C7FD
add rax, 20h ; ' '
jmp short loc_4C778
loc_4C744:
mov rcx, [rax+8]
mov rax, [r14+10h]
cmp rax, [rcx+8]
jnz short loc_4C778
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMItArrayIterat; "m_it.array_iterator != m_object->m_data"...
mov esi, 3397h
jmp loc_4C817
loc_4C771:
cmp qword ptr [r14+18h], 0
jnz short loc_4C783
loc_4C778:
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4C783:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotGetValue; "cannot get value"
lea rdx, aCannotGetValue+10h; ""
lea rdi, [rsp+48h+var_40]
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 rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0D6h; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_4C7E1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 338Bh
jmp short loc_4C817
loc_4C7FD:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMItObjectItera; "m_it.object_iterator != m_object->m_dat"...
mov esi, 3391h
loc_4C817:
xor eax, eax
call _ggml_abort
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_4C838
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C838:
test bpl, bpl
jnz short loc_4C842
jmp short loc_4C84A
mov r14, rax
loc_4C842:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_4C84A:
mov rdi, r14
call __Unwind_Resume
| operator->:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0014c7e1
MOV R14,RDI
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2
JZ 0x0014c744
CMP ECX,0x1
JNZ 0x0014c771
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0014c7fd
ADD RAX,0x20
JMP 0x0014c778
LAB_0014c744:
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
CMP RAX,qword ptr [RCX + 0x8]
JNZ 0x0014c778
LEA RDI,[0x1ad47e]
LEA RDX,[0x1abc59]
LEA RCX,[0x1aea24]
MOV ESI,0x3397
JMP 0x0014c817
LAB_0014c771:
CMP qword ptr [R14 + 0x18],0x0
JNZ 0x0014c783
LAB_0014c778:
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014c783:
MOV EDI,0x20
CALL 0x00118380
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0014c799:
LEA RSI,[0x1aea61]
LEA RDX,[0x1aea71]
LEA RDI,[RSP + 0x8]
CALL 0x001200f4
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_0014c7b7:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xd6
CALL 0x0014cca8
XOR EBP,EBP
LEA RSI,[0x1df3f0]
LEA RDX,[0x14f5ac]
MOV RDI,RBX
CALL 0x00118bb0
LAB_0014c7e1:
LEA RDI,[0x1ad47e]
LEA RDX,[0x1abc59]
LEA RCX,[0x1afbdc]
MOV ESI,0x338b
JMP 0x0014c817
LAB_0014c7fd:
LEA RDI,[0x1ad47e]
LEA RDX,[0x1abc59]
LEA RCX,[0x1ae9e5]
MOV ESI,0x3391
LAB_0014c817:
XOR EAX,EAX
CALL 0x00118b50
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() const */
char * __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator->(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
long *plVar1;
char *pcVar2;
int8 uVar3;
int1 *local_40 [2];
int1 local_30 [16];
pcVar2 = *(char **)this;
if (pcVar2 == (char *)0x0) {
pcVar2 = "m_object != nullptr";
uVar3 = 0x338b;
LAB_0014c817:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
if (*pcVar2 == '\x02') {
plVar1 = (long *)(pcVar2 + 8);
pcVar2 = *(char **)(this + 0x10);
if (pcVar2 == *(char **)(*plVar1 + 8)) {
pcVar2 = "m_it.array_iterator != m_object->m_data.m_value.array->end()";
uVar3 = 0x3397;
goto LAB_0014c817;
}
}
else if (*pcVar2 == '\x01') {
if (*(long *)(this + 8) == *(long *)(*(long *)(pcVar2 + 8) + 8)) {
pcVar2 = "m_it.object_iterator != m_object->m_data.m_value.object->end()";
uVar3 = 0x3391;
goto LAB_0014c817;
}
pcVar2 = (char *)(*(long *)(this + 8) + 0x20);
}
else if (*(long *)(this + 0x18) != 0) {
uVar3 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 0014c799 to 0014c7b0 has its CatchHandler @ 0014c83f */
std::__cxx11::string::_M_construct<char_const*>(local_40,"cannot get value","");
/* try { // try from 0014c7b7 to 0014c7e0 has its CatchHandler @ 0014c81e */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xd6,local_40,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&invalid_iterator::typeinfo,exception::~exception);
}
return pcVar2;
}
| ||
41,708 | stbi__bmp_info(stbi__context*, int*, int*, int*) | SDL3Lite/dependencies/stb_image.h | static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp)
{
void *p;
stbi__bmp_data info;
info.all_a = 255;
p = stbi__bmp_parse_header(s, &info);
if (p == NULL) {
stbi__rewind( s );
return 0;
}
if (x) *x = s->img_x;
if (y) *y = s->img_y;
if (comp) {
if (info.bpp == 24 && info.ma == 0xff000000)
*comp = 3;
else
*comp = info.ma ? 4 : 3;
}
return 1;
} | O0 | c | stbi__bmp_info(stbi__context*, int*, int*, int*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0xff, -0x38(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x2a610
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x2b969
movq -0x10(%rbp), %rdi
callq 0x2a3e0
movl $0x0, -0x4(%rbp)
jmp 0x2b9d4
cmpq $0x0, -0x18(%rbp)
je 0x2b97c
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x2b990
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x2b9cd
cmpl $0x18, -0x54(%rbp)
jne 0x2b9b2
cmpl $0xff000000, -0x3c(%rbp) # imm = 0xFF000000
jne 0x2b9b2
movq -0x28(%rbp), %rax
movl $0x3, (%rax)
jmp 0x2b9cb
movl -0x3c(%rbp), %edx
movl $0x3, %ecx
movl $0x4, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
jmp 0x2b9cd
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ZL14stbi__bmp_infoP13stbi__contextPiS1_S1_:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_38], 0FFh
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_54]
call _ZL22stbi__bmp_parse_headerP13stbi__contextP14stbi__bmp_data; stbi__bmp_parse_header(stbi__context *,stbi__bmp_data *)
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_2B969
mov rdi, [rbp+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rbp+var_4], 0
jmp short loc_2B9D4
loc_2B969:
cmp [rbp+var_18], 0
jz short loc_2B97C
mov rax, [rbp+var_10]
mov ecx, [rax]
mov rax, [rbp+var_18]
mov [rax], ecx
loc_2B97C:
cmp [rbp+var_20], 0
jz short loc_2B990
mov rax, [rbp+var_10]
mov ecx, [rax+4]
mov rax, [rbp+var_20]
mov [rax], ecx
loc_2B990:
cmp [rbp+var_28], 0
jz short loc_2B9CD
cmp [rbp+var_54], 18h
jnz short loc_2B9B2
cmp [rbp+var_3C], 0FF000000h
jnz short loc_2B9B2
mov rax, [rbp+var_28]
mov dword ptr [rax], 3
jmp short loc_2B9CB
loc_2B9B2:
mov edx, [rbp+var_3C]
mov ecx, 3
mov eax, 4
cmp edx, 0
cmovnz ecx, eax
mov rax, [rbp+var_28]
mov [rax], ecx
loc_2B9CB:
jmp short $+2
loc_2B9CD:
mov [rbp+var_4], 1
loc_2B9D4:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long stbi__bmp_info(_QWORD *a1, _DWORD *a2, _DWORD *a3, int *a4)
{
int v4; // ecx
int v6[6]; // [rsp+Ch] [rbp-54h] BYREF
int v7; // [rsp+24h] [rbp-3Ch]
int v8; // [rsp+28h] [rbp-38h]
int *v10; // [rsp+38h] [rbp-28h]
_DWORD *v11; // [rsp+40h] [rbp-20h]
_DWORD *v12; // [rsp+48h] [rbp-18h]
_QWORD *v13; // [rsp+50h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v8 = 255;
if ( stbi__bmp_parse_header(a1, v6) )
{
if ( v12 )
*v12 = *(_DWORD *)v13;
if ( v11 )
*v11 = *((_DWORD *)v13 + 1);
if ( v10 )
{
if ( v6[0] == 24 && v7 == -16777216 )
{
*v10 = 3;
}
else
{
v4 = 3;
if ( v7 )
v4 = 4;
*v10 = v4;
}
}
return 1;
}
else
{
stbi__rewind(v13);
return 0;
}
}
| stbi__bmp_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x38],0xff
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x54]
CALL 0x0012a610
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0012b969
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012a3e0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0012b9d4
LAB_0012b969:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012b97c
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
LAB_0012b97c:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0012b990
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
LAB_0012b990:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0012b9cd
CMP dword ptr [RBP + -0x54],0x18
JNZ 0x0012b9b2
CMP dword ptr [RBP + -0x3c],0xff000000
JNZ 0x0012b9b2
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x3
JMP 0x0012b9cb
LAB_0012b9b2:
MOV EDX,dword ptr [RBP + -0x3c]
MOV ECX,0x3
MOV EAX,0x4
CMP EDX,0x0
CMOVNZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
LAB_0012b9cb:
JMP 0x0012b9cd
LAB_0012b9cd:
MOV dword ptr [RBP + -0x4],0x1
LAB_0012b9d4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
/* stbi__bmp_info(stbi__context*, int*, int*, int*) */
int4 stbi__bmp_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4)
{
int iVar1;
int local_5c [6];
int local_44;
int4 local_40;
long local_38;
int *local_30;
int *local_28;
int *local_20;
stbi__context *local_18;
int4 local_c;
local_40 = 0xff;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_38 = stbi__bmp_parse_header(param_1,(stbi__bmp_data *)local_5c);
if (local_38 == 0) {
stbi__rewind(local_18);
local_c = 0;
}
else {
if (local_20 != (int *)0x0) {
*local_20 = *(int *)local_18;
}
if (local_28 != (int *)0x0) {
*local_28 = *(int *)(local_18 + 4);
}
if (local_30 != (int *)0x0) {
if ((local_5c[0] == 0x18) && (local_44 == -0x1000000)) {
*local_30 = 3;
}
else {
iVar1 = 3;
if (local_44 != 0) {
iVar1 = 4;
}
*local_30 = iVar1;
}
}
local_c = 1;
}
return local_c;
}
| |
41,709 | JS_GetPropertyInt64 | bluesky950520[P]quickjs/quickjs.c | JSValue JS_GetPropertyInt64(JSContext *ctx, JSValue obj, int64_t idx)
{
JSAtom prop;
JSValue val;
if (likely(JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT &&
(uint64_t)idx <= INT32_MAX)) {
/* fast path for array and typed array access */
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (js_get_fast_array_element(ctx, p, idx, &val))
return val;
}
prop = JS_NewAtomInt64(ctx, idx);
if (prop == JS_ATOM_NULL)
return JS_EXCEPTION;
val = JS_GetProperty(ctx, obj, prop);
JS_FreeAtom(ctx, prop);
return val;
} | O1 | c | JS_GetPropertyInt64:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
cmpl $-0x1, %r14d
jne 0x28270
cmpq $0x7fffffff, %r12 # imm = 0x7FFFFFFF
ja 0x28270
movq 0x10(%rsp), %rsi
movq %rsp, %r13
movq %rbx, %rdi
movl %r12d, %edx
movq %r13, %rcx
callq 0xfafd
movq (%r13), %rcx
movq %rcx, %r13
shrq $0x20, %r13
xorl %ebp, %ebp
testl %eax, %eax
cmovneq %rcx, %rbp
je 0x28270
movq 0x8(%rsp), %r14
jmp 0x282cb
movq %rbx, %rdi
movq %r12, %rsi
callq 0x282e6
testl %eax, %eax
je 0x282c3
movl %eax, %r12d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %eax, %ecx
movq %r15, %r8
movq %r14, %r9
pushq $0x0
pushq $0x0
callq 0x26fff
addq $0x10, %rsp
movq %rax, %rbp
movq %rdx, %r14
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq %rbx, %rdi
movl %r12d, %esi
callq 0x24834
movq %rbp, %r13
shrq $0x20, %r13
jmp 0x282cb
movl $0x6, %r14d
xorl %ebp, %ebp
shlq $0x20, %r13
movl %ebp, %eax
orq %r13, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_GetPropertyInt64:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rcx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov [rsp+48h+var_38], rsi
cmp r14d, 0FFFFFFFFh
jnz short loc_28270
cmp r12, 7FFFFFFFh
ja short loc_28270
mov rsi, [rsp+48h+var_38]
mov r13, rsp
mov rdi, rbx
mov edx, r12d
mov rcx, r13
call js_get_fast_array_element
mov rcx, [r13+0]
mov r13, rcx
shr r13, 20h
xor ebp, ebp
test eax, eax
cmovnz rbp, rcx
jz short loc_28270
mov r14, [rsp+48h+var_40]
jmp short loc_282CB
loc_28270:
mov rdi, rbx
mov rsi, r12
call JS_NewAtomInt64
test eax, eax
jz short loc_282C3
mov r12d, eax
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov ecx, eax
mov r8, r15
mov r9, r14
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rbp, rax
mov r14, rdx
mov [rsp+48h+var_48], rax
mov [rsp+48h+var_40], rdx
mov rdi, rbx
mov esi, r12d
call JS_FreeAtom
mov r13, rbp
shr r13, 20h
jmp short loc_282CB
loc_282C3:
mov r14d, 6
xor ebp, ebp
loc_282CB:
shl r13, 20h
mov eax, ebp
or rax, r13
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long JS_GetPropertyInt64(long long a1, long long a2, long long a3, unsigned long long a4)
{
unsigned long long v4; // r13
int fast_array_element; // eax
unsigned long long PropertyInternal2; // rbp
unsigned int v9; // eax
int v10; // r12d
double v11; // rdx
double v13[2]; // [rsp+0h] [rbp-48h] BYREF
long long v14; // [rsp+10h] [rbp-38h]
v14 = a2;
if ( (_DWORD)a3 == -1
&& a4 <= 0x7FFFFFFF
&& (fast_array_element = js_get_fast_array_element(a1, v14, a4, v13),
v4 = HIDWORD(*(_QWORD *)&v13[0]),
fast_array_element) )
{
LODWORD(PropertyInternal2) = LODWORD(v13[0]);
}
else
{
v9 = JS_NewAtomInt64(a1, a4);
if ( v9 )
{
v10 = v9;
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, v9, a2, a3, 0LL, 0);
*(_QWORD *)&v13[0] = PropertyInternal2;
v13[1] = v11;
JS_FreeAtom(a1, v10);
v4 = HIDWORD(PropertyInternal2);
}
else
{
LODWORD(PropertyInternal2) = 0;
}
}
return (v4 << 32) | (unsigned int)PropertyInternal2;
}
| JS_GetPropertyInt64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RCX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x10],RSI
CMP R14D,-0x1
JNZ 0x00128270
CMP R12,0x7fffffff
JA 0x00128270
MOV RSI,qword ptr [RSP + 0x10]
MOV R13,RSP
MOV RDI,RBX
MOV EDX,R12D
MOV RCX,R13
CALL 0x0010fafd
MOV RCX,qword ptr [R13]
MOV R13,RCX
SHR R13,0x20
XOR EBP,EBP
TEST EAX,EAX
CMOVNZ RBP,RCX
JZ 0x00128270
MOV R14,qword ptr [RSP + 0x8]
JMP 0x001282cb
LAB_00128270:
MOV RDI,RBX
MOV RSI,R12
CALL 0x001282e6
TEST EAX,EAX
JZ 0x001282c3
MOV R12D,EAX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV ECX,EAX
MOV R8,R15
MOV R9,R14
PUSH 0x0
PUSH 0x0
CALL 0x00126fff
ADD RSP,0x10
MOV RBP,RAX
MOV R14,RDX
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RDI,RBX
MOV ESI,R12D
CALL 0x00124834
MOV R13,RBP
SHR R13,0x20
JMP 0x001282cb
LAB_001282c3:
MOV R14D,0x6
XOR EBP,EBP
LAB_001282cb:
SHL R13,0x20
MOV EAX,EBP
OR RAX,R13
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
JS_GetPropertyInt64(int8 param_1,int8 param_2,int8 param_3,ulong param_4)
{
int iVar1;
ulong unaff_R13;
int1 auVar2 [16];
int1 auVar3 [16];
int1 local_48 [16];
int8 local_38;
local_38 = param_2;
if (((int)param_3 == -1) && (param_4 < 0x80000000)) {
iVar1 = js_get_fast_array_element(param_1,param_2,param_4 & 0xffffffff,local_48);
auVar2._8_8_ = local_48._8_8_;
auVar2._0_8_ = local_48._0_8_;
unaff_R13 = (ulong)local_48._0_8_ >> 0x20;
if (iVar1 != 0) goto LAB_001282cb;
}
iVar1 = JS_NewAtomInt64(param_1,param_4);
if (iVar1 == 0) {
auVar2 = ZEXT816(6) << 0x40;
}
else {
auVar2 = JS_GetPropertyInternal2(param_1,param_2,param_3,iVar1,param_2,param_3,0,0);
local_48 = auVar2;
JS_FreeAtom(param_1,iVar1);
unaff_R13 = auVar2._0_8_ >> 0x20;
}
LAB_001282cb:
auVar3._0_8_ = auVar2._0_8_ & 0xffffffff | unaff_R13 << 0x20;
auVar3._8_8_ = auVar2._8_8_;
return auVar3;
}
| |
41,710 | JS_GetPropertyInt64 | bluesky950520[P]quickjs/quickjs.c | JSValue JS_GetPropertyInt64(JSContext *ctx, JSValue obj, int64_t idx)
{
JSAtom prop;
JSValue val;
if (likely(JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT &&
(uint64_t)idx <= INT32_MAX)) {
/* fast path for array and typed array access */
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (js_get_fast_array_element(ctx, p, idx, &val))
return val;
}
prop = JS_NewAtomInt64(ctx, idx);
if (prop == JS_ATOM_NULL)
return JS_EXCEPTION;
val = JS_GetProperty(ctx, obj, prop);
JS_FreeAtom(ctx, prop);
return val;
} | O2 | c | JS_GetPropertyInt64:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
cmpl $-0x1, %r14d
jne 0x21d7e
cmpq $0x7fffffff, %r12 # imm = 0x7FFFFFFF
ja 0x21d7e
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x21dd6
testl %eax, %eax
je 0x21d7e
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %r14
jmp 0x21daf
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21f56
testl %eax, %eax
je 0x21dca
movl %eax, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %eax, %ecx
callq 0x1ebf3
movq %rax, %r15
movq %rdx, %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1e545
andq %r15, %r13
movl %r15d, %eax
orq %r13, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x6
popq %r14
xorl %r15d, %r15d
xorl %r13d, %r13d
jmp 0x21db2
| JS_GetPropertyInt64:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rcx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov r13, 0FFFFFFFF00000000h
cmp r14d, 0FFFFFFFFh
jnz short loc_21D7E
cmp r12, 7FFFFFFFh
ja short loc_21D7E
lea rcx, [rsp+48h+var_40]
mov rdi, rbx
mov rsi, r15
mov edx, r12d
call js_get_fast_array_element
test eax, eax
jz short loc_21D7E
mov r15, [rsp+48h+var_40]
mov r14, [rsp+48h+var_38]
jmp short loc_21DAF
loc_21D7E:
mov rdi, rbx
mov rsi, r12
call JS_NewAtomInt64
test eax, eax
jz short loc_21DCA
mov ebp, eax
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov ecx, eax
call JS_GetProperty
mov r15, rax
mov r14, rdx
mov rdi, rbx
mov esi, ebp
call JS_FreeAtom
loc_21DAF:
and r13, r15
loc_21DB2:
mov eax, r15d
or rax, r13
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_21DCA:
push 6
pop r14
xor r15d, r15d
xor r13d, r13d
jmp short loc_21DB2
| unsigned long long JS_GetPropertyInt64(long long a1, long long a2, int a3, unsigned long long a4)
{
long long Property; // r15
int v7; // eax
int v8; // ebp
unsigned long long v9; // r13
long long v11; // [rsp+8h] [rbp-40h] BYREF
if ( a3 == -1 && a4 <= 0x7FFFFFFF && (unsigned int)js_get_fast_array_element(a1, a2, (unsigned int)a4, &v11) )
{
Property = v11;
}
else
{
v7 = JS_NewAtomInt64(a1, a4);
if ( !v7 )
{
LODWORD(Property) = 0;
v9 = 0LL;
return v9 | (unsigned int)Property;
}
v8 = v7;
Property = JS_GetProperty(a1, a2, a3, v7);
JS_FreeAtom(a1, v8);
}
v9 = Property & 0xFFFFFFFF00000000LL;
return v9 | (unsigned int)Property;
}
| JS_GetPropertyInt64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RCX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV R13,-0x100000000
CMP R14D,-0x1
JNZ 0x00121d7e
CMP R12,0x7fffffff
JA 0x00121d7e
LEA RCX,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R15
MOV EDX,R12D
CALL 0x00121dd6
TEST EAX,EAX
JZ 0x00121d7e
MOV R15,qword ptr [RSP + 0x8]
MOV R14,qword ptr [RSP + 0x10]
JMP 0x00121daf
LAB_00121d7e:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00121f56
TEST EAX,EAX
JZ 0x00121dca
MOV EBP,EAX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV ECX,EAX
CALL 0x0011ebf3
MOV R15,RAX
MOV R14,RDX
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0011e545
LAB_00121daf:
AND R13,R15
LAB_00121db2:
MOV EAX,R15D
OR RAX,R13
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00121dca:
PUSH 0x6
POP R14
XOR R15D,R15D
XOR R13D,R13D
JMP 0x00121db2
|
int1 [16]
JS_GetPropertyInt64(int8 param_1,int8 param_2,int8 param_3,ulong param_4)
{
int iVar1;
ulong uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
ulong local_40;
int8 local_38;
if (((int)param_3 == -1) && (param_4 < 0x80000000)) {
iVar1 = js_get_fast_array_element(param_1,param_2,param_4 & 0xffffffff,&local_40);
auVar3._8_8_ = local_38;
auVar3._0_8_ = local_40;
if (iVar1 == 0) goto LAB_00121d7e;
}
else {
LAB_00121d7e:
iVar1 = JS_NewAtomInt64(param_1,param_4);
if (iVar1 == 0) {
auVar3 = ZEXT816(6) << 0x40;
uVar2 = 0;
goto LAB_00121db2;
}
auVar3 = JS_GetProperty(param_1,param_2,param_3,iVar1);
JS_FreeAtom(param_1,iVar1);
}
uVar2 = auVar3._0_8_ & 0xffffffff00000000;
LAB_00121db2:
auVar4._0_8_ = auVar3._0_8_ & 0xffffffff | uVar2;
auVar4._8_8_ = auVar3._8_8_;
return auVar4;
}
| |
41,711 | google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateConstexprAggregateInitializer(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/primitive_field.cc | void PrimitiveFieldGenerator::GenerateConstexprAggregateInitializer(
io::Printer* printer) const {
Formatter format(printer, variables_);
format("/*decltype($field$)*/$default$");
} | O3 | cpp | google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateConstexprAggregateInitializer(google::protobuf::io::Printer*) const:
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq 0x18(%rdi), %rax
leaq 0x8(%rsp), %rbx
movq %rsi, -0x8(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7e61e
leaq 0x101589(%rip), %rsi # 0x1cbe8b
movq %rsp, %rdi
callq 0x39938
movq %rbx, %rdi
callq 0x2e5e0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e5e0
movq %r14, %rdi
callq 0x1f860
nop
| _ZNK6google8protobuf8compiler3cpp23PrimitiveFieldGenerator37GenerateConstexprAggregateInitializerEPNS0_2io7PrinterE:
push r14
push rbx
sub rsp, 38h
lea rax, [rdi+18h]
lea rbx, [rsp+48h+var_40]
mov [rbx-8], rsi
mov rdi, rbx
mov rsi, rax
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&)
lea rsi, aDecltypeFieldD; "/*decltype($field$)*/$default$"
mov rdi, rsp
call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
add rsp, 38h
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateConstexprAggregateInitializer(
google::protobuf::compiler::cpp::PrimitiveFieldGenerator *this,
google::protobuf::io::Printer *a2)
{
long long result; // rax
google::protobuf::io::Printer *v3; // [rsp+0h] [rbp-48h] BYREF
_BYTE v4[64]; // [rsp+8h] [rbp-40h] BYREF
v3 = a2;
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(
(long long)v4,
(long long)this + 24);
result = google::protobuf::compiler::cpp::Formatter::operator()<>(&v3, "/*decltype($field$)*/$default$");
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v4);
return result;
}
| GenerateConstexprAggregateInitializer:
PUSH R14
PUSH RBX
SUB RSP,0x38
LEA RAX,[RDI + 0x18]
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX + -0x8],RSI
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0017e61e
LAB_001ca8fb:
LEA RSI,[0x2cbe8b]
MOV RDI,RSP
CALL 0x00139938
LAB_001ca90a:
MOV RDI,RBX
CALL 0x0012e5e0
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateConstexprAggregateInitializer(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::cpp::PrimitiveFieldGenerator::GenerateConstexprAggregateInitializer
(PrimitiveFieldGenerator *this,Printer *param_1)
{
Printer *local_48;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_40 [48];
local_48 = param_1;
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::_Rb_tree(local_40,(_Rb_tree *)(this + 0x18));
/* try { // try from 001ca8fb to 001ca909 has its CatchHandler @ 001ca91a */
Formatter::operator()<>((Formatter *)&local_48,"/*decltype($field$)*/$default$");
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_40);
return;
}
| |
41,712 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 0>(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&, unsigned long&) | llama.cpp/common/json.hpp | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, unsigned long, 0>(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&, unsigned long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0xcb5eb
cmpl $0x7, %eax
je 0xcb5f1
cmpl $0x6, %eax
jne 0xcb622
movq 0x8(%r14), %rax
jmp 0xcb616
movsd 0x8(%r14), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x542fd(%rip), %xmm0 # 0x11f908
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x216d0
movq %rax, %rbx
movq %r14, %rdi
callq 0x8cc60
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x5644b(%rip), %rsi # 0x121a91
leaq 0x10(%rsp), %rdi
callq 0x825ec
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0xbe614
xorl %ebp, %ebp
leaq 0x979cf(%rip), %rsi # 0x163040
leaq -0x52a90(%rip), %rdx # 0x78be8
movq %rbx, %rdi
callq 0x21b60
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcb69e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21190
testb %bpl, %bpl
jne 0xcb6a8
jmp 0xcb6b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x22080
movq %r14, %rdi
callq 0x21c20
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; void *
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_CB5EB
cmp eax, 7
jz short loc_CB5F1
cmp eax, 6
jnz short loc_CB622
loc_CB5EB:
mov rax, [r14+8]
jmp short loc_CB616
loc_CB5F1:
movsd xmm0, qword ptr [r14+8]
cvttsd2si rcx, xmm0
mov rdx, rcx
sar rdx, 3Fh
subsd xmm0, cs:qword_11F908
cvttsd2si rax, xmm0
and rax, rdx
or rax, rcx
loc_CB616:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_CB622:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CB69E
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CB69E:
test bpl, bpl
jnz short loc_CB6A8
jmp short loc_CB6B0
mov r14, rax
loc_CB6A8:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_CB6B0:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
double *a1,
_QWORD *a2)
{
int v2; // eax
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
v2 = *(unsigned __int8 *)a1;
if ( v2 != 5 )
{
if ( v2 == 7 )
{
result = (unsigned int)(int)a1[1];
goto LABEL_6;
}
if ( v2 != 6 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be number, but is ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v6);
__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);
}
}
result = *((_QWORD *)a1 + 1);
LABEL_6:
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x001cb5eb
CMP EAX,0x7
JZ 0x001cb5f1
CMP EAX,0x6
JNZ 0x001cb622
LAB_001cb5eb:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x001cb616
LAB_001cb5f1:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTTSD2SI RCX,XMM0
MOV RDX,RCX
SAR RDX,0x3f
SUBSD XMM0,qword ptr [0x0021f908]
CVTTSD2SI RAX,XMM0
AND RAX,RDX
OR RAX,RCX
LAB_001cb616:
MOV qword ptr [RSI],RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001cb622:
MOV EDI,0x20
CALL 0x001216d0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018cc60
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001cb63f:
LEA RSI,[0x221a91]
LEA RDI,[RSP + 0x10]
CALL 0x001825ec
MOV BPL,0x1
LAB_001cb653:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001be614
XOR EBP,EBP
LEA RSI,[0x263040]
LEA RDX,[0x178be8]
MOV RDI,RBX
CALL 0x00121b60
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,ulong *param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 uVar2;
ulong uVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
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>
)0x5) {
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>
)0x7) {
uVar3 = (ulong)*(double *)(param_1 + 8);
uVar3 = (long)(*(double *)(param_1 + 8) - _DAT_0021f908) & (long)uVar3 >> 0x3f | uVar3;
goto LAB_001cb616;
}
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>
)0x6) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)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>
::type_name(param_1);
/* try { // try from 001cb63f to 001cb64f has its CatchHandler @ 001cb6a5 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 001cb653 to 001cb67f has its CatchHandler @ 001cb680 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
uVar3 = *(ulong *)(param_1 + 8);
LAB_001cb616:
*param_2 = uVar3;
return;
}
| |
41,713 | mbedtls_chachapoly_update_aad | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/chachapoly.c | int mbedtls_chachapoly_update_aad(mbedtls_chachapoly_context *ctx,
const unsigned char *aad,
size_t aad_len)
{
CHACHAPOLY_VALIDATE_RET(ctx != NULL);
CHACHAPOLY_VALIDATE_RET(aad_len == 0 || aad != NULL);
if (ctx->state != CHACHAPOLY_STATE_AAD) {
return MBEDTLS_ERR_CHACHAPOLY_BAD_STATE;
}
ctx->aad_len += aad_len;
return mbedtls_poly1305_update(&ctx->poly1305_ctx, aad, aad_len);
} | O3 | c | mbedtls_chachapoly_update_aad:
cmpl $0x1, 0xe8(%rdi)
jne 0xa02a5
addq %rdx, 0xd8(%rdi)
addq $0x88, %rdi
jmp 0xa07cb
movl $0xffffffac, %eax # imm = 0xFFFFFFAC
retq
| mbedtls_chachapoly_update_aad:
cmp dword ptr [rdi+0E8h], 1
jnz short loc_A02A5
add [rdi+0D8h], rdx
add rdi, 88h
jmp mbedtls_poly1305_update
loc_A02A5:
mov eax, 0FFFFFFACh
retn
| long long mbedtls_chachapoly_update_aad(long long a1, long long a2, long long a3)
{
if ( *(_DWORD *)(a1 + 232) != 1 )
return 4294967212LL;
*(_QWORD *)(a1 + 216) += a3;
return mbedtls_poly1305_update(a1 + 136);
}
| mbedtls_chachapoly_update_aad:
CMP dword ptr [RDI + 0xe8],0x1
JNZ 0x001a02a5
ADD qword ptr [RDI + 0xd8],RDX
ADD RDI,0x88
JMP 0x001a07cb
LAB_001a02a5:
MOV EAX,0xffffffac
RET
|
int8 mbedtls_chachapoly_update_aad(long param_1,int8 param_2,long param_3)
{
int8 uVar1;
if (*(int *)(param_1 + 0xe8) == 1) {
*(long *)(param_1 + 0xd8) = *(long *)(param_1 + 0xd8) + param_3;
uVar1 = mbedtls_poly1305_update(param_1 + 0x88);
return uVar1;
}
return 0xffffffac;
}
| |
41,714 | evmone::read_valid_eof1_header(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>) | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.cpp | EOF1Header read_valid_eof1_header(bytes_view container)
{
EOFSectionHeaders section_headers;
auto it = container.begin() + std::size(EOF_MAGIC) + 1; // MAGIC + VERSION
while (*it != TERMINATOR)
{
auto section_id = *it++;
if (section_id == CODE_SECTION)
{
const auto code_section_num = read_uint16_be(it);
it += 2;
for (uint16_t i = 0; i < code_section_num; ++i)
{
const auto section_size = read_uint16_be(it);
it += 2;
section_headers.code_sizes.emplace_back(section_size);
}
}
else if (section_id == CONTAINER_SECTION)
{
const auto code_section_num = read_uint16_be(it);
it += 2;
for (uint16_t i = 0; i < code_section_num; ++i)
{
const auto section_size = read_uint32_be(it);
it += 4;
section_headers.container_sizes.emplace_back(section_size);
}
}
else
{
const auto section_size = read_uint16_be(it);
it += 2;
if (section_id == TYPE_SECTION)
section_headers.type_size = section_size;
else
{
assert(section_id == DATA_SECTION);
section_headers.data_size = section_size;
}
}
}
const auto header_size = eof_header_size(section_headers);
EOF1Header header;
header.version = container[2];
header.type_section_offset = header_size;
header.code_sizes = std::move(section_headers.code_sizes);
auto code_offset = header_size + section_headers.type_size;
for (const auto code_size : header.code_sizes)
{
assert(code_offset <= std::numeric_limits<uint16_t>::max());
header.code_offsets.emplace_back(static_cast<uint16_t>(code_offset));
code_offset += code_size;
}
header.data_size = section_headers.data_size;
header.container_sizes = std::move(section_headers.container_sizes);
auto container_offset = code_offset;
for (const auto container_size : header.container_sizes)
{
header.container_offsets.emplace_back(static_cast<uint16_t>(container_offset));
container_offset += container_size;
}
header.data_offset = static_cast<uint16_t>(container_offset);
return header;
} | O3 | cpp | evmone::read_valid_eof1_header(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movl $0x0, -0x8(%r14)
pxor %xmm0, %xmm0
movdqu %xmm0, (%r14)
movdqu %xmm0, 0x10(%r14)
movdqu %xmm0, 0x20(%r14)
movb 0x3(%rdx), %sil
testb %sil, %sil
je 0x434a7
movq %rdx, 0x40(%rsp)
leaq 0x3(%rdx), %rbp
leaq 0x28(%rsp), %r12
leaq 0x4(%rsp), %r13
movzbl 0x2(%rbp), %ecx
movzbl 0x1(%rbp), %eax
shll $0x8, %eax
movl %eax, %edx
orl %ecx, %edx
addq $0x3, %rbp
movzbl %sil, %esi
cmpl $0x2, %esi
jg 0x4341c
cmpl $0x1, %esi
je 0x43434
cmpl $0x2, %esi
jne 0x4366c
testw %dx, %dx
je 0x4347e
movzwl %cx, %r15d
addl %eax, %r15d
movzwl (%rbp), %eax
rolw $0x8, %ax
movw %ax, 0x4(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x43405
movw %ax, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x43410
movq %r14, %rdi
movq %r13, %rdx
callq 0x46af8
addq $0x2, %rbp
decw %r15w
jne 0x433de
jmp 0x4347e
cmpl $0x3, %esi
je 0x4343b
cmpl $0xff, %esi
jne 0x4366c
movw %dx, 0xa(%rsp)
jmp 0x4347e
movw %dx, 0x8(%rsp)
jmp 0x4347e
testw %dx, %dx
je 0x4347e
movzwl %cx, %r15d
addl %eax, %r15d
movl (%rbp), %eax
bswapl %eax
movl %eax, 0x4(%rsp)
movq 0x30(%rsp), %rsi
cmpq 0x38(%rsp), %rsi
je 0x43469
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x30(%rsp)
jmp 0x43474
movq %r12, %rdi
movq %r13, %rdx
callq 0x46c16
addq $0x4, %rbp
decw %r15w
jne 0x43447
movb (%rbp), %sil
testb %sil, %sil
jne 0x433a4
movq 0x10(%rsp), %rbp
movq 0x30(%rsp), %r13
movq 0x28(%rsp), %rax
movdqu 0x18(%rsp), %xmm0
movq 0x40(%rsp), %rdx
jmp 0x434ae
xorl %eax, %eax
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %edi, %edi
movq %r13, %rcx
subq %rax, %rcx
leaq 0x3(%rcx), %rax
cmoveq %rdi, %rax
movq %xmm0, %r15
movq %r15, %rcx
subq %rbp, %rcx
leaq (%rcx,%rax), %rsi
leaq 0xd(%rcx,%rax), %rax
xorps %xmm1, %xmm1
movups %xmm1, 0x32(%rbx)
movups %xmm1, 0x28(%rbx)
movups %xmm1, 0x44(%rbx)
movups %xmm1, 0x54(%rbx)
movups %xmm1, 0x64(%rbx)
movl $0x0, 0x74(%rbx)
movb 0x2(%rdx), %cl
movb %cl, (%rbx)
movq %rax, 0x8(%rbx)
movq %rbp, 0x10(%rbx)
movdqu %xmm0, 0x18(%rbx)
movups %xmm1, (%r14)
movq $0x0, 0x10(%r14)
movzwl 0x8(%rsp), %eax
leaq 0xd(%rax,%rsi), %r12
je 0x43576
leaq 0x28(%rbx), %r14
cmpq $0x10000, %r12 # imm = 0x10000
jae 0x4364d
movzwl (%rbp), %r13d
movw %r12w, 0x4(%rsp)
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0x4354e
movw %r12w, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x30(%rbx)
jmp 0x4355b
movq %r14, %rdi
leaq 0x4(%rsp), %rdx
callq 0x46cf2
addq %r13, %r12
addq $0x2, %rbp
cmpq %r15, %rbp
jne 0x4351e
movq 0x48(%rbx), %rdi
movq 0x58(%rbx), %rsi
movq 0x30(%rsp), %r13
jmp 0x43578
xorl %esi, %esi
leaq 0x28(%rsp), %rax
movzwl -0x1e(%rax), %ecx
movw %cx, 0x40(%rbx)
movq (%rax), %rbp
movq %rbp, 0x48(%rbx)
movq %r13, 0x50(%rbx)
movq 0x10(%rax), %rcx
movq %rcx, 0x58(%rbx)
pxor %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x435bd
subq %rdi, %rsi
callq 0x220c0
movq 0x48(%rbx), %rbp
movq 0x50(%rbx), %r13
cmpq %r13, %rbp
je 0x43603
leaq 0x60(%rbx), %r14
movl (%rbp), %r15d
movw %r12w, 0x4(%rsp)
movq 0x68(%rbx), %rsi
cmpq 0x70(%rbx), %rsi
je 0x435ea
movzwl %r12w, %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rbx)
jmp 0x435f7
movq %r14, %rdi
leaq 0x4(%rsp), %rdx
callq 0x46dce
addq %r15, %r12
addq $0x4, %rbp
cmpq %r13, %rbp
jne 0x435c6
leaq 0x44(%rbx), %rax
movzwl %r12w, %ecx
movl %ecx, (%rax)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x43624
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4363b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x220c0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x45043(%rip), %rdi # 0x88697
leaq 0x44f88(%rip), %rsi # 0x885e3
leaq 0x44fff(%rip), %rcx # 0x88661
movl $0x371, %edx # imm = 0x371
callq 0x22110
leaq 0x44f55(%rip), %rdi # 0x885c8
leaq 0x44f69(%rip), %rsi # 0x885e3
leaq 0x44fe0(%rip), %rcx # 0x88661
movl $0x362, %edx # imm = 0x362
callq 0x22110
jmp 0x4368d
movq %rax, %r14
movq %rbx, %rdi
callq 0x45b24
jmp 0x4369f
jmp 0x4369c
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x436b2
movq %r14, %rdi
callq 0x22310
nop
| _ZN6evmone22read_valid_eof1_headerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
lea r14, [rsp+78h+var_68]
mov dword ptr [r14-8], 0
pxor xmm0, xmm0
movdqu xmmword ptr [r14], xmm0
movdqu xmmword ptr [r14+10h], xmm0
movdqu xmmword ptr [r14+20h], xmm0
mov sil, [rdx+3]
test sil, sil
jz loc_434A7
mov [rsp+78h+var_38], rdx
lea rbp, [rdx+3]
lea r12, [rsp+78h+var_50]
lea r13, [rsp+78h+var_74]
loc_433A4:
movzx ecx, byte ptr [rbp+2]
movzx eax, byte ptr [rbp+1]
shl eax, 8
mov edx, eax
or edx, ecx
add rbp, 3
movzx esi, sil
cmp esi, 2
jg short loc_4341C
cmp esi, 1
jz short loc_43434
cmp esi, 2
jnz loc_4366C
test dx, dx
jz loc_4347E
movzx r15d, cx
add r15d, eax
loc_433DE:
movzx eax, word ptr [rbp+0]
rol ax, 8
mov word ptr [rsp+78h+var_74], ax
mov rsi, qword ptr [rsp+78h+var_60]
cmp rsi, qword ptr [rsp+78h+var_60+8]
jz short loc_43405
mov [rsi], ax
add rsi, 2
mov qword ptr [rsp+78h+var_60], rsi
jmp short loc_43410
loc_43405:
mov rdi, r14
mov rdx, r13
call _ZNSt6vectorItSaItEE17_M_realloc_insertIJRKtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_; std::vector<ushort>::_M_realloc_insert<ushort const&>(__gnu_cxx::__normal_iterator<ushort *,std::vector<ushort>>,ushort const&)
loc_43410:
add rbp, 2
dec r15w
jnz short loc_433DE
jmp short loc_4347E
loc_4341C:
cmp esi, 3
jz short loc_4343B
cmp esi, 0FFh
jnz loc_4366C
mov [rsp+78h+var_6E], dx
jmp short loc_4347E
loc_43434:
mov [rsp+78h+var_70], dx
jmp short loc_4347E
loc_4343B:
test dx, dx
jz short loc_4347E
movzx r15d, cx
add r15d, eax
loc_43447:
mov eax, [rbp+0]
bswap eax
mov [rsp+78h+var_74], eax
mov rsi, [rsp+78h+var_48]
cmp rsi, [rsp+78h+var_40]
jz short loc_43469
mov [rsi], eax
add rsi, 4
mov [rsp+78h+var_48], rsi
jmp short loc_43474
loc_43469:
mov rdi, r12
mov rdx, r13
call _ZNSt6vectorIjSaIjEE17_M_realloc_insertIJRKjEEEvN9__gnu_cxx17__normal_iteratorIPjS1_EEDpOT_; std::vector<uint>::_M_realloc_insert<uint const&>(__gnu_cxx::__normal_iterator<uint *,std::vector<uint>>,uint const&)
loc_43474:
add rbp, 4
dec r15w
jnz short loc_43447
loc_4347E:
mov sil, [rbp+0]
test sil, sil
jnz loc_433A4
mov rbp, [rsp+78h+var_68]
mov r13, [rsp+78h+var_48]
mov rax, [rsp+78h+var_50]
movdqu xmm0, [rsp+78h+var_60]
mov rdx, [rsp+78h+var_38]
jmp short loc_434AE
loc_434A7:
xor eax, eax
xor r13d, r13d
xor ebp, ebp
loc_434AE:
xor edi, edi; void *
mov rcx, r13
sub rcx, rax
lea rax, [rcx+3]
cmovz rax, rdi
movq r15, xmm0
mov rcx, r15
sub rcx, rbp
lea rsi, [rcx+rax]
lea rax, [rcx+rax+0Dh]
xorps xmm1, xmm1
movups xmmword ptr [rbx+32h], xmm1
movups xmmword ptr [rbx+28h], xmm1
movups xmmword ptr [rbx+44h], xmm1
movups xmmword ptr [rbx+54h], xmm1
movups xmmword ptr [rbx+64h], xmm1
mov dword ptr [rbx+74h], 0
mov cl, [rdx+2]
mov [rbx], cl
mov [rbx+8], rax
mov [rbx+10h], rbp
movdqu xmmword ptr [rbx+18h], xmm0
movups xmmword ptr [r14], xmm1
mov qword ptr [r14+10h], 0
movzx eax, [rsp+78h+var_70]
lea r12, [rax+rsi+0Dh]
jz short loc_43576
lea r14, [rbx+28h]
loc_4351E:
cmp r12, 10000h
jnb loc_4364D
movzx r13d, word ptr [rbp+0]
mov word ptr [rsp+78h+var_74], r12w
mov rsi, [rbx+30h]
cmp rsi, [rbx+38h]
jz short loc_4354E
mov [rsi], r12w
add rsi, 2
mov [rbx+30h], rsi
jmp short loc_4355B
loc_4354E:
mov rdi, r14
lea rdx, [rsp+78h+var_74]
call _ZNSt6vectorItSaItEE17_M_realloc_insertIJtEEEvN9__gnu_cxx17__normal_iteratorIPtS1_EEDpOT_; std::vector<ushort>::_M_realloc_insert<ushort>(__gnu_cxx::__normal_iterator<ushort *,std::vector<ushort>>,ushort &&)
loc_4355B:
add r12, r13
add rbp, 2
cmp rbp, r15
jnz short loc_4351E
mov rdi, [rbx+48h]
mov rsi, [rbx+58h]
mov r13, [rsp+78h+var_48]
jmp short loc_43578
loc_43576:
xor esi, esi
loc_43578:
lea rax, [rsp+78h+var_50]
movzx ecx, word ptr [rax-1Eh]
mov [rbx+40h], cx
mov rbp, [rax]
mov [rbx+48h], rbp
mov [rbx+50h], r13
mov rcx, [rax+10h]
mov [rbx+58h], rcx
pxor xmm0, xmm0
movdqu xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
test rdi, rdi
jz short loc_435BD
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rbp, [rbx+48h]
mov r13, [rbx+50h]
loc_435BD:
cmp rbp, r13
jz short loc_43603
lea r14, [rbx+60h]
loc_435C6:
mov r15d, [rbp+0]
mov word ptr [rsp+78h+var_74], r12w
mov rsi, [rbx+68h]
cmp rsi, [rbx+70h]
jz short loc_435EA
movzx eax, r12w
mov [rsi], eax
add rsi, 4
mov [rbx+68h], rsi
jmp short loc_435F7
loc_435EA:
mov rdi, r14
lea rdx, [rsp+78h+var_74]
call _ZNSt6vectorIjSaIjEE17_M_realloc_insertIJtEEEvN9__gnu_cxx17__normal_iteratorIPjS1_EEDpOT_; std::vector<uint>::_M_realloc_insert<ushort>(__gnu_cxx::__normal_iterator<uint *,std::vector<uint>>,ushort &&)
loc_435F7:
add r12, r15
add rbp, 4
cmp rbp, r13
jnz short loc_435C6
loc_43603:
lea rax, [rbx+44h]
movzx ecx, r12w
mov [rax], ecx
mov rdi, [rsp+78h+var_50]; void *
test rdi, rdi
jz short loc_43624
mov rsi, [rsp+78h+var_40]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_43624:
mov rdi, [rsp+78h+var_68]; void *
test rdi, rdi
jz short loc_4363B
mov rsi, qword ptr [rsp+78h+var_60+8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4363B:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4364D:
lea rdi, aCodeOffsetStdN; "code_offset <= std::numeric_limits<uint"...
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aEof1headerEvmo; "EOF1Header evmone::read_valid_eof1_head"...
mov edx, 371h
call ___assert_fail
loc_4366C:
lea rdi, aSectionIdDataS; "section_id == DATA_SECTION"
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aEof1headerEvmo; "EOF1Header evmone::read_valid_eof1_head"...
mov edx, 362h
call ___assert_fail
jmp short $+2
loc_4368D:
mov r14, rax
mov rdi, rbx; this
call _ZN6evmone10EOF1HeaderD2Ev; evmone::EOF1Header::~EOF1Header()
jmp short loc_4369F
jmp short $+2
loc_4369C:
mov r14, rax
loc_4369F:
lea rdi, [rsp+78h+var_70]; this
call _ZN6evmone12_GLOBAL__N_117EOFSectionHeadersD2Ev; evmone::`anonymous namespace'::EOFSectionHeaders::~EOFSectionHeaders()
mov rdi, r14
call __Unwind_Resume
| long long evmone::read_valid_eof1_header(long long a1, long long a2, long long a3)
{
__m128i v4; // xmm0
unsigned __int8 v5; // si
_WORD *v6; // rbp
__int16 v7; // cx
__int16 v8; // ax
unsigned __int16 v9; // dx
__int16 v10; // r15
__int16 v11; // ax
char *v12; // rsi
__int16 v13; // r15
unsigned __int32 v14; // eax
char *v15; // rsi
unsigned __int16 *v16; // rbp
int *v17; // r13
int *v18; // rax
void *v19; // rdi
bool v20; // zf
long long v21; // rax
unsigned long long v22; // r12
long long v23; // r13
_WORD *v24; // rsi
long long v25; // rsi
int *v26; // rbp
int v27; // r15d
_DWORD *v28; // rsi
unsigned __int32 v30; // [rsp+4h] [rbp-74h] BYREF
int v31; // [rsp+8h] [rbp-70h]
void *v32[6]; // [rsp+10h] [rbp-68h] BYREF
long long v33; // [rsp+40h] [rbp-38h]
v31 = 0;
v4 = 0LL;
memset(v32, 0, sizeof(v32));
v5 = *(_BYTE *)(a3 + 3);
if ( v5 )
{
v33 = a3;
v6 = (_WORD *)(a3 + 3);
do
{
v7 = *((unsigned __int8 *)v6 + 2);
v8 = *((unsigned __int8 *)v6 + 1) << 8;
v9 = _byteswap_ushort(*(_WORD *)((char *)v6 + 1));
v6 = (_WORD *)((char *)v6 + 3);
if ( v5 > 2u )
{
if ( v5 == 3 )
{
if ( v9 )
{
v13 = v8 + v7;
do
{
v14 = _byteswap_ulong(*(_DWORD *)v6);
v30 = v14;
v15 = (char *)v32[4];
if ( v32[4] == v32[5] )
{
std::vector<unsigned int>::_M_realloc_insert<unsigned int const&>(&v32[3], v32[4], &v30);
}
else
{
*(_DWORD *)v32[4] = v14;
v32[4] = v15 + 4;
}
v6 += 2;
--v13;
}
while ( v13 );
}
}
else
{
if ( v5 != 255 )
LABEL_49:
__assert_fail(
"section_id == DATA_SECTION",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src"
"/lib/evmone/eof.cpp",
866LL,
"EOF1Header evmone::read_valid_eof1_header(bytes_view)");
HIWORD(v31) = v9;
}
}
else if ( v5 == 1 )
{
LOWORD(v31) = v9;
}
else
{
if ( v5 != 2 )
goto LABEL_49;
if ( v9 )
{
v10 = v8 + v7;
do
{
v11 = __ROL2__(*v6, 8);
LOWORD(v30) = v11;
v12 = (char *)v32[1];
if ( v32[1] == v32[2] )
{
std::vector<unsigned short>::_M_realloc_insert<unsigned short const&>(v32, v32[1], &v30);
}
else
{
*(_WORD *)v32[1] = v11;
v32[1] = v12 + 2;
}
++v6;
--v10;
}
while ( v10 );
}
}
v5 = *(_BYTE *)v6;
}
while ( *(_BYTE *)v6 );
v16 = (unsigned __int16 *)v32[0];
v17 = (int *)v32[4];
v18 = (int *)v32[3];
v4 = _mm_loadu_si128((const __m128i *)&v32[1]);
a3 = v33;
}
else
{
v18 = 0LL;
v17 = 0LL;
v16 = 0LL;
}
v19 = 0LL;
v20 = v17 == v18;
v21 = (char *)v17 - (char *)v18 + 3;
if ( v20 )
v21 = 0LL;
*(_OWORD *)(a1 + 50) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 68) = 0LL;
*(_OWORD *)(a1 + 84) = 0LL;
*(_OWORD *)(a1 + 100) = 0LL;
*(_DWORD *)(a1 + 116) = 0;
*(_BYTE *)a1 = *(_BYTE *)(a3 + 2);
*(_QWORD *)(a1 + 8) = v4.m128i_i64[0] - (_QWORD)v16 + v21 + 13;
*(_QWORD *)(a1 + 16) = v16;
*(__m128i *)(a1 + 24) = v4;
memset(v32, 0, 24);
v22 = (unsigned __int16)v31 + v4.m128i_i64[0] - (_QWORD)v16 + v21 + 13;
if ( (unsigned __int16 *)v4.m128i_i64[0] == v16 )
{
v25 = 0LL;
}
else
{
do
{
if ( v22 >= 0x10000 )
__assert_fail(
"code_offset <= std::numeric_limits<uint16_t>::max()",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.cpp",
881LL,
"EOF1Header evmone::read_valid_eof1_header(bytes_view)");
v23 = *v16;
LOWORD(v30) = v22;
v24 = *(_WORD **)(a1 + 48);
if ( v24 == *(_WORD **)(a1 + 56) )
{
std::vector<unsigned short>::_M_realloc_insert<unsigned short>(a1 + 40, v24, &v30);
}
else
{
*v24 = v22;
*(_QWORD *)(a1 + 48) = v24 + 1;
}
v22 += v23;
++v16;
}
while ( v16 != (unsigned __int16 *)v4.m128i_i64[0] );
v19 = *(void **)(a1 + 72);
v25 = *(_QWORD *)(a1 + 88);
v17 = (int *)v32[4];
}
*(_WORD *)(a1 + 64) = HIWORD(v31);
v26 = (int *)v32[3];
*(void **)(a1 + 72) = v32[3];
*(_QWORD *)(a1 + 80) = v17;
*(void **)(a1 + 88) = v32[5];
memset(&v32[3], 0, 24);
if ( v19 )
{
operator delete(v19, v25 - (_QWORD)v19);
v26 = *(int **)(a1 + 72);
v17 = *(int **)(a1 + 80);
}
for ( ; v26 != v17; ++v26 )
{
v27 = *v26;
LOWORD(v30) = v22;
v28 = *(_DWORD **)(a1 + 104);
if ( v28 == *(_DWORD **)(a1 + 112) )
{
std::vector<unsigned int>::_M_realloc_insert<unsigned short>(a1 + 96, v28, &v30);
}
else
{
*v28 = (unsigned __int16)v22;
*(_QWORD *)(a1 + 104) = v28 + 1;
}
LOWORD(v22) = v27 + v22;
}
*(_DWORD *)(a1 + 68) = (unsigned __int16)v22;
if ( v32[3] )
operator delete(v32[3], (char *)v32[5] - (char *)v32[3]);
if ( v32[0] )
operator delete(v32[0], (char *)v32[2] - (char *)v32[0]);
return a1;
}
| read_valid_eof1_header:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
LEA R14,[RSP + 0x10]
MOV dword ptr [R14 + -0x8],0x0
PXOR XMM0,XMM0
MOVDQU xmmword ptr [R14],XMM0
MOVDQU xmmword ptr [R14 + 0x10],XMM0
MOVDQU xmmword ptr [R14 + 0x20],XMM0
MOV SIL,byte ptr [RDX + 0x3]
TEST SIL,SIL
JZ 0x001434a7
MOV qword ptr [RSP + 0x40],RDX
LEA RBP,[RDX + 0x3]
LEA R12,[RSP + 0x28]
LEA R13,[RSP + 0x4]
LAB_001433a4:
MOVZX ECX,byte ptr [RBP + 0x2]
MOVZX EAX,byte ptr [RBP + 0x1]
SHL EAX,0x8
MOV EDX,EAX
OR EDX,ECX
ADD RBP,0x3
MOVZX ESI,SIL
CMP ESI,0x2
JG 0x0014341c
CMP ESI,0x1
JZ 0x00143434
CMP ESI,0x2
JNZ 0x0014366c
TEST DX,DX
JZ 0x0014347e
MOVZX R15D,CX
ADD R15D,EAX
LAB_001433de:
MOVZX EAX,word ptr [RBP]
ROL AX,0x8
MOV word ptr [RSP + 0x4],AX
MOV RSI,qword ptr [RSP + 0x18]
CMP RSI,qword ptr [RSP + 0x20]
JZ 0x00143405
MOV word ptr [RSI],AX
ADD RSI,0x2
MOV qword ptr [RSP + 0x18],RSI
JMP 0x00143410
LAB_00143405:
MOV RDI,R14
MOV RDX,R13
CALL 0x00146af8
LAB_00143410:
ADD RBP,0x2
DEC R15W
JNZ 0x001433de
JMP 0x0014347e
LAB_0014341c:
CMP ESI,0x3
JZ 0x0014343b
CMP ESI,0xff
JNZ 0x0014366c
MOV word ptr [RSP + 0xa],DX
JMP 0x0014347e
LAB_00143434:
MOV word ptr [RSP + 0x8],DX
JMP 0x0014347e
LAB_0014343b:
TEST DX,DX
JZ 0x0014347e
MOVZX R15D,CX
ADD R15D,EAX
LAB_00143447:
MOV EAX,dword ptr [RBP]
BSWAP EAX
MOV dword ptr [RSP + 0x4],EAX
MOV RSI,qword ptr [RSP + 0x30]
CMP RSI,qword ptr [RSP + 0x38]
JZ 0x00143469
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RSP + 0x30],RSI
JMP 0x00143474
LAB_00143469:
MOV RDI,R12
MOV RDX,R13
CALL 0x00146c16
LAB_00143474:
ADD RBP,0x4
DEC R15W
JNZ 0x00143447
LAB_0014347e:
MOV SIL,byte ptr [RBP]
TEST SIL,SIL
JNZ 0x001433a4
MOV RBP,qword ptr [RSP + 0x10]
MOV R13,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOVDQU XMM0,xmmword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x40]
JMP 0x001434ae
LAB_001434a7:
XOR EAX,EAX
XOR R13D,R13D
XOR EBP,EBP
LAB_001434ae:
XOR EDI,EDI
MOV RCX,R13
SUB RCX,RAX
LEA RAX,[RCX + 0x3]
CMOVZ RAX,RDI
MOVQ R15,XMM0
MOV RCX,R15
SUB RCX,RBP
LEA RSI,[RCX + RAX*0x1]
LEA RAX,[RCX + RAX*0x1 + 0xd]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [RBX + 0x32],XMM1
MOVUPS xmmword ptr [RBX + 0x28],XMM1
MOVUPS xmmword ptr [RBX + 0x44],XMM1
MOVUPS xmmword ptr [RBX + 0x54],XMM1
MOVUPS xmmword ptr [RBX + 0x64],XMM1
MOV dword ptr [RBX + 0x74],0x0
MOV CL,byte ptr [RDX + 0x2]
MOV byte ptr [RBX],CL
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RBX + 0x10],RBP
MOVDQU xmmword ptr [RBX + 0x18],XMM0
MOVUPS xmmword ptr [R14],XMM1
MOV qword ptr [R14 + 0x10],0x0
MOVZX EAX,word ptr [RSP + 0x8]
LEA R12,[RAX + RSI*0x1 + 0xd]
JZ 0x00143576
LEA R14,[RBX + 0x28]
LAB_0014351e:
CMP R12,0x10000
JNC 0x0014364d
MOVZX R13D,word ptr [RBP]
MOV word ptr [RSP + 0x4],R12W
MOV RSI,qword ptr [RBX + 0x30]
CMP RSI,qword ptr [RBX + 0x38]
JZ 0x0014354e
MOV word ptr [RSI],R12W
ADD RSI,0x2
MOV qword ptr [RBX + 0x30],RSI
JMP 0x0014355b
LAB_0014354e:
MOV RDI,R14
LEA RDX,[RSP + 0x4]
CALL 0x00146cf2
LAB_0014355b:
ADD R12,R13
ADD RBP,0x2
CMP RBP,R15
JNZ 0x0014351e
MOV RDI,qword ptr [RBX + 0x48]
MOV RSI,qword ptr [RBX + 0x58]
MOV R13,qword ptr [RSP + 0x30]
JMP 0x00143578
LAB_00143576:
XOR ESI,ESI
LAB_00143578:
LEA RAX,[RSP + 0x28]
MOVZX ECX,word ptr [RAX + -0x1e]
MOV word ptr [RBX + 0x40],CX
MOV RBP,qword ptr [RAX]
MOV qword ptr [RBX + 0x48],RBP
MOV qword ptr [RBX + 0x50],R13
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBX + 0x58],RCX
PXOR XMM0,XMM0
MOVDQU xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
TEST RDI,RDI
JZ 0x001435bd
SUB RSI,RDI
CALL 0x001220c0
MOV RBP,qword ptr [RBX + 0x48]
MOV R13,qword ptr [RBX + 0x50]
LAB_001435bd:
CMP RBP,R13
JZ 0x00143603
LEA R14,[RBX + 0x60]
LAB_001435c6:
MOV R15D,dword ptr [RBP]
MOV word ptr [RSP + 0x4],R12W
MOV RSI,qword ptr [RBX + 0x68]
CMP RSI,qword ptr [RBX + 0x70]
JZ 0x001435ea
MOVZX EAX,R12W
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x68],RSI
JMP 0x001435f7
LAB_001435ea:
MOV RDI,R14
LEA RDX,[RSP + 0x4]
CALL 0x00146dce
LAB_001435f7:
ADD R12,R15
ADD RBP,0x4
CMP RBP,R13
JNZ 0x001435c6
LAB_00143603:
LEA RAX,[RBX + 0x44]
MOVZX ECX,R12W
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00143624
MOV RSI,qword ptr [RSP + 0x38]
SUB RSI,RDI
CALL 0x001220c0
LAB_00143624:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0014363b
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x001220c0
LAB_0014363b:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014364d:
LEA RDI,[0x188697]
LEA RSI,[0x1885e3]
LEA RCX,[0x188661]
MOV EDX,0x371
CALL 0x00122110
LAB_0014366c:
LEA RDI,[0x1885c8]
LEA RSI,[0x1885e3]
LEA RCX,[0x188661]
MOV EDX,0x362
CALL 0x00122110
|
/* evmone::read_valid_eof1_header(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned
char> >) */
int1 * evmone::read_valid_eof1_header(int1 *param_1,int8 param_2,long param_3)
{
byte bVar1;
uint uVar2;
int2 *puVar3;
uint *puVar4;
int iVar5;
void *pvVar6;
long lVar7;
ushort uVar8;
uint *puVar9;
ushort *puVar10;
uint *puVar11;
byte bVar12;
void *pvVar13;
ulong uVar14;
uint uVar15;
ushort *puVar16;
ushort *puVar17;
uint local_74;
int4 local_70;
int1 local_68 [16];
ushort *local_58;
uint *puStack_50;
uint *local_48;
uint *puStack_40;
long local_38;
local_70 = 0;
puVar16 = (ushort *)0x0;
puVar17 = (ushort *)0x0;
local_68 = (int1 [16])0x0;
local_58 = (ushort *)0x0;
puStack_50 = (uint *)0x0;
local_48 = (uint *)0x0;
puStack_40 = (uint *)0x0;
bVar12 = *(byte *)(param_3 + 3);
if (bVar12 == 0) {
puVar10 = (ushort *)0x0;
}
else {
puVar9 = (uint *)(param_3 + 3);
local_38 = param_3;
do {
bVar1 = *(byte *)((long)puVar9 + 2);
lVar7 = (ulong)*(byte *)((long)puVar9 + 1) << 8;
iVar5 = (int)lVar7;
uVar8 = (ushort)lVar7 | (ushort)bVar1;
puVar9 = (uint *)((long)puVar9 + 3);
if (bVar12 < 3) {
if (bVar12 == 1) {
local_70 = CONCAT22(local_70._2_2_,uVar8);
}
else {
if (bVar12 != 2) {
LAB_0014366c:
/* WARNING: Subroutine does not return */
__assert_fail("section_id == DATA_SECTION",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.cpp"
,0x362,"EOF1Header evmone::read_valid_eof1_header(bytes_view)");
}
if (uVar8 != 0) {
uVar15 = (uint)(ushort)bVar1 + iVar5;
do {
uVar8 = (ushort)*puVar9 << 8 | (ushort)*puVar9 >> 8;
local_74 = CONCAT22(local_74._2_2_,uVar8);
if ((ushort *)local_68._8_8_ == local_58) {
/* try { // try from 00143405 to 0014340f has its CatchHandler @ 0014369c */
std::vector<unsigned_short,std::allocator<unsigned_short>>::
_M_realloc_insert<unsigned_short_const&>
((vector<unsigned_short,std::allocator<unsigned_short>> *)local_68,
local_68._8_8_,&local_74);
}
else {
*(ushort *)local_68._8_8_ = uVar8;
local_68._8_8_ = (ushort *)(local_68._8_8_ + 2);
}
puVar9 = (uint *)((long)puVar9 + 2);
uVar8 = (short)uVar15 - 1;
uVar15 = (uint)uVar8;
} while (uVar8 != 0);
}
}
}
else if (bVar12 == 3) {
if (uVar8 != 0) {
uVar15 = (uint)(ushort)bVar1 + iVar5;
do {
uVar2 = *puVar9;
local_74 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 |
uVar2 << 0x18;
if (local_48 == puStack_40) {
/* try { // try from 00143469 to 00143473 has its CatchHandler @ 0014369a */
std::vector<unsigned_int,std::allocator<unsigned_int>>::
_M_realloc_insert<unsigned_int_const&>
((vector<unsigned_int,std::allocator<unsigned_int>> *)&puStack_50,local_48,
&local_74);
}
else {
*local_48 = local_74;
local_48 = local_48 + 1;
}
puVar9 = puVar9 + 1;
uVar8 = (short)uVar15 - 1;
uVar15 = (uint)uVar8;
} while (uVar8 != 0);
}
}
else {
if (bVar12 != 0xff) goto LAB_0014366c;
local_70 = CONCAT22(uVar8,(ushort)local_70);
}
bVar12 = (byte)*puVar9;
} while (bVar12 != 0);
param_3 = local_38;
puVar10 = (ushort *)local_68._0_8_;
puVar16 = (ushort *)local_68._8_8_;
puVar17 = local_58;
}
pvVar13 = (void *)0x0;
pvVar6 = (void *)(((long)local_48 - (long)puStack_50) + 3);
if ((long)local_48 - (long)puStack_50 == 0) {
pvVar6 = pvVar13;
}
lVar7 = (long)puVar16 - (long)puVar10;
*(int8 *)(param_1 + 0x32) = 0;
*(int8 *)(param_1 + 0x3a) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x44) = 0;
*(int8 *)(param_1 + 0x4c) = 0;
*(int8 *)(param_1 + 0x54) = 0;
*(int8 *)(param_1 + 0x5c) = 0;
*(int8 *)(param_1 + 100) = 0;
*(int8 *)(param_1 + 0x6c) = 0;
*(int4 *)(param_1 + 0x74) = 0;
*param_1 = *(int1 *)(param_3 + 2);
*(long *)(param_1 + 8) = lVar7 + 0xd + (long)pvVar6;
*(ushort **)(param_1 + 0x10) = puVar10;
*(ushort **)(param_1 + 0x18) = puVar16;
*(ushort **)(param_1 + 0x20) = puVar17;
local_68 = ZEXT816(0);
local_58 = (ushort *)0x0;
uVar14 = (long)pvVar6 + (ulong)(ushort)local_70 + 0xd + lVar7;
if (lVar7 == 0) {
lVar7 = 0;
puVar9 = local_48;
}
else {
do {
if (0xffff < uVar14) {
/* WARNING: Subroutine does not return */
__assert_fail("code_offset <= std::numeric_limits<uint16_t>::max()",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.cpp"
,0x371,"EOF1Header evmone::read_valid_eof1_header(bytes_view)");
}
uVar8 = *puVar10;
local_74 = CONCAT22(local_74._2_2_,(short)uVar14);
puVar3 = *(int2 **)(param_1 + 0x30);
if (puVar3 == *(int2 **)(param_1 + 0x38)) {
/* try { // try from 0014354e to 0014355a has its CatchHandler @ 0014368b */
std::vector<unsigned_short,std::allocator<unsigned_short>>::
_M_realloc_insert<unsigned_short>
((vector<unsigned_short,std::allocator<unsigned_short>> *)(param_1 + 0x28),puVar3,
&local_74);
}
else {
*puVar3 = (short)uVar14;
*(int2 **)(param_1 + 0x30) = puVar3 + 1;
}
uVar14 = uVar14 + uVar8;
puVar10 = puVar10 + 1;
} while (puVar10 != puVar16);
pvVar13 = *(void **)(param_1 + 0x48);
lVar7 = *(long *)(param_1 + 0x58);
puVar9 = local_48;
}
puVar11 = puStack_50;
uVar15 = (uint)uVar14;
*(int2 *)(param_1 + 0x40) = local_70._2_2_;
*(uint **)(param_1 + 0x48) = puStack_50;
*(uint **)(param_1 + 0x50) = puVar9;
*(uint **)(param_1 + 0x58) = puStack_40;
puStack_50 = (uint *)0x0;
local_48 = (uint *)0x0;
puStack_40 = (uint *)0x0;
if (pvVar13 != (void *)0x0) {
operator_delete(pvVar13,lVar7 - (long)pvVar13);
puVar11 = *(uint **)(param_1 + 0x48);
puVar9 = *(uint **)(param_1 + 0x50);
}
if (puVar11 != puVar9) {
do {
uVar15 = *puVar11;
local_74 = CONCAT22(local_74._2_2_,(short)uVar14);
puVar4 = *(uint **)(param_1 + 0x68);
if (puVar4 == *(uint **)(param_1 + 0x70)) {
/* try { // try from 001435ea to 001435f6 has its CatchHandler @ 0014368d */
std::vector<unsigned_int,std::allocator<unsigned_int>>::_M_realloc_insert<unsigned_short>
((vector<unsigned_int,std::allocator<unsigned_int>> *)(param_1 + 0x60),puVar4,
&local_74);
}
else {
*puVar4 = (uint)uVar14 & 0xffff;
*(uint **)(param_1 + 0x68) = puVar4 + 1;
}
uVar14 = uVar14 + uVar15;
uVar15 = (uint)uVar14;
puVar11 = puVar11 + 1;
} while (puVar11 != puVar9);
}
*(uint *)(param_1 + 0x44) = uVar15 & 0xffff;
if (puStack_50 != (uint *)0x0) {
operator_delete(puStack_50,(long)puStack_40 - (long)puStack_50);
}
if ((void *)local_68._0_8_ != (void *)0x0) {
operator_delete((void *)local_68._0_8_,(long)local_58 - local_68._0_8_);
}
return param_1;
}
| |
41,715 | my_register_filename | eloqsql/mysys/my_open.c | File my_register_filename(File fd, const char *FileName, enum file_type
type_of_file, uint error_message_number, myf MyFlags)
{
DBUG_ENTER("my_register_filename");
if ((int) fd >= MY_FILE_MIN)
{
my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED);
if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER))
DBUG_RETURN(fd);
my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags);
statistic_increment(my_file_total_opened,&THR_LOCK_open);
my_file_info[fd].type = type_of_file;
DBUG_PRINT("exit",("fd: %d",fd));
DBUG_RETURN(fd);
}
my_errno= errno;
DBUG_PRINT("error",("Got error %d on open", my_errno));
if (MyFlags & (MY_FFNF | MY_FAE | MY_WME))
{
if (my_errno == EMFILE)
error_message_number= EE_OUT_OF_FILERESOURCES;
my_error(error_message_number,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
FileName, my_errno);
}
DBUG_RETURN(-1);
} | O0 | c | my_register_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x65946
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0x3aa550(%rip), %rcx # 0x40fdf4
lock
xaddl %eax, (%rcx)
movl %eax, -0x28(%rbp)
movl -0x8(%rbp), %eax
leaq 0x1ae57b(%rip), %rcx # 0x213e30
cmpl (%rcx), %eax
jae 0x658c9
movq -0x20(%rbp), %rax
andq $0x2004, %rax # imm = 0x2004
cmpq $0x0, %rax
je 0x658d6
jmp 0x658cb
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x659bd
leaq 0x3aaa47(%rip), %rax # 0x410324
movl (%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x593a0
movq %rax, %rcx
leaq 0x1ae542(%rip), %rax # 0x213e38
movq (%rax), %rax
movslq -0x8(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
leaq 0x3aa4d2(%rip), %rax # 0x40fde0
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x3aa4c4(%rip), %rax # 0x40fde0
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
leaq 0x1ae50f(%rip), %rax # 0x213e38
movq (%rax), %rax
movslq -0x8(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
jmp 0x6593c
jmp 0x6593e
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x659bd
callq 0x26050
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0x5a430
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x6595c
movq -0x20(%rbp), %rax
andq $0x19, %rax
cmpq $0x0, %rax
je 0x659b4
callq 0x5a430
cmpl $0x18, (%rax)
jne 0x6597b
movl $0x17, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x5a430
movl -0x44(%rbp), %edi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl (%rax), %ecx
movb $0x0, %al
callq 0x64910
jmp 0x659b6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_register_filename:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov [rbp+var_20], r8
cmp [rbp+var_8], 0
jl loc_65946
mov [rbp+var_24], 1
mov eax, [rbp+var_24]
lea rcx, my_file_opened
lock xadd [rcx], eax
mov [rbp+var_28], eax
mov eax, [rbp+var_8]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_658C9
mov rax, [rbp+var_20]
and rax, 2004h
cmp rax, 0
jz short loc_658D6
loc_658C9:
jmp short $+2
loc_658CB:
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
jmp loc_659BD
loc_658D6:
lea rax, key_memory_my_file_info
mov edi, [rax]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_20]
call my_strdup
mov rcx, rax
lea rax, my_file_info
mov rax, [rax]
movsxd rdx, [rbp+var_8]
shl rdx, 4
add rax, rdx
mov [rax], rcx
lea rax, my_file_total_opened
mov rcx, [rax]
add rcx, 1
lea rax, my_file_total_opened
mov [rax], rcx
mov ecx, [rbp+var_14]
lea rax, my_file_info
mov rax, [rax]
movsxd rdx, [rbp+var_8]
shl rdx, 4
add rax, rdx
mov [rax+8], ecx
jmp short $+2
loc_6593C:
jmp short $+2
loc_6593E:
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
jmp short loc_659BD
loc_65946:
call ___errno_location
mov eax, [rax]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
jmp short $+2
loc_6595C:
mov rax, [rbp+var_20]
and rax, 19h
cmp rax, 0
jz short loc_659B4
call _my_thread_var
cmp dword ptr [rax], 18h
jnz short loc_6597B
mov [rbp+var_18], 17h
loc_6597B:
mov eax, [rbp+var_18]
mov [rbp+var_44], eax
mov rax, [rbp+var_20]
and rax, 440h
or rax, 4
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
call _my_thread_var
mov edi, [rbp+var_44]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
mov ecx, [rax]
mov al, 0
call my_error
loc_659B4:
jmp short $+2
loc_659B6:
mov [rbp+var_4], 0FFFFFFFFh
loc_659BD:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long my_register_filename(unsigned int a1, long long a2, int a3, unsigned int a4, __int16 a5)
{
unsigned int *v5; // rax
int v7; // [rsp+24h] [rbp-2Ch]
if ( (a1 & 0x80000000) != 0 )
{
v7 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v7;
if ( (a5 & 0x19) != 0 )
{
if ( *(_DWORD *)my_thread_var() == 24 )
a4 = 23;
v5 = (unsigned int *)my_thread_var();
my_error(a4, a5 & 0x440 | 4LL, a2, *v5);
}
return (unsigned int)-1;
}
else
{
_InterlockedExchangeAdd(my_file_opened, 1u);
if ( a1 >= my_file_limit || (a5 & 0x2004) != 0 )
{
return a1;
}
else
{
*((_QWORD *)my_file_info + 2 * (int)a1) = my_strdup(key_memory_my_file_info, a2, a5);
++my_file_total_opened;
*((_DWORD *)my_file_info + 4 * (int)a1 + 2) = a3;
return a1;
}
}
}
| my_register_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV qword ptr [RBP + -0x20],R8
CMP dword ptr [RBP + -0x8],0x0
JL 0x00165946
MOV dword ptr [RBP + -0x24],0x1
MOV EAX,dword ptr [RBP + -0x24]
LEA RCX,[0x50fdf4]
XADD.LOCK dword ptr [RCX],EAX
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x8]
LEA RCX,[0x313e30]
CMP EAX,dword ptr [RCX]
JNC 0x001658c9
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x2004
CMP RAX,0x0
JZ 0x001658d6
LAB_001658c9:
JMP 0x001658cb
LAB_001658cb:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001659bd
LAB_001658d6:
LEA RAX,[0x510324]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001593a0
MOV RCX,RAX
LEA RAX,[0x313e38]
MOV RAX,qword ptr [RAX]
MOVSXD RDX,dword ptr [RBP + -0x8]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
LEA RAX,[0x50fde0]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x50fde0]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x14]
LEA RAX,[0x313e38]
MOV RAX,qword ptr [RAX]
MOVSXD RDX,dword ptr [RBP + -0x8]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX + 0x8],ECX
JMP 0x0016593c
LAB_0016593c:
JMP 0x0016593e
LAB_0016593e:
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001659bd
LAB_00165946:
CALL 0x00126050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x0015a430
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
JMP 0x0016595c
LAB_0016595c:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x19
CMP RAX,0x0
JZ 0x001659b4
CALL 0x0015a430
CMP dword ptr [RAX],0x18
JNZ 0x0016597b
MOV dword ptr [RBP + -0x18],0x17
LAB_0016597b:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
CALL 0x0015a430
MOV EDI,dword ptr [RBP + -0x44]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX]
MOV AL,0x0
CALL 0x00164910
LAB_001659b4:
JMP 0x001659b6
LAB_001659b6:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_001659bd:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
uint my_register_filename
(uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5)
{
int iVar1;
int8 uVar2;
int *piVar3;
int4 *puVar4;
int4 local_20;
uint local_c;
if ((int)param_1 < 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((param_5 & 0x19) != 0) {
piVar3 = (int *)_my_thread_var();
local_20 = param_4;
if (*piVar3 == 0x18) {
local_20 = 0x17;
}
puVar4 = (int4 *)_my_thread_var();
my_error(local_20,param_5 & 0x440 | 4,param_2,*puVar4);
}
local_c = 0xffffffff;
}
else {
LOCK();
my_file_opened = my_file_opened + 1;
UNLOCK();
local_c = param_1;
if ((param_1 < my_file_limit) && ((param_5 & 0x2004) == 0)) {
uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5);
*(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = uVar2;
my_file_total_opened = my_file_total_opened + 1;
*(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = param_3;
}
}
return local_c;
}
| |
41,716 | google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap(google::protobuf::internal::RepeatedPtrFieldBase*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h | inline void InternalSwap(RepeatedPtrFieldBase* rhs) {
GOOGLE_DCHECK(this != rhs);
// Swap all fields at once.
auto temp = std::make_tuple(rhs->arena_, rhs->current_size_,
rhs->total_size_, rhs->rep_);
std::tie(rhs->arena_, rhs->current_size_, rhs->total_size_, rhs->rep_) =
std::make_tuple(arena_, current_size_, total_size_, rep_);
std::tie(arena_, current_size_, total_size_, rep_) = temp;
} | O0 | c | google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap(google::protobuf::internal::RepeatedPtrFieldBase*):
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0xe0dbf
jmp 0xe0e82
movq 0x10(%rsp), %rax
movq 0xd8(%rsp), %rcx
movb $0x0, 0x9f(%rsp)
cmpq %rcx, %rax
je 0xe0ddb
jmp 0xe0e32
leaq 0x10f052(%rip), %rdx # 0x1efe34
leaq 0xa0(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x3, %esi
movl $0x136, %ecx # imm = 0x136
callq 0x237e0
movq (%rsp), %rdi
movb $0x1, 0x9f(%rsp)
leaq 0x110424(%rip), %rsi # 0x1f1234
callq 0x230a0
movq %rax, 0x8(%rsp)
jmp 0xe0e1c
movq 0x8(%rsp), %rsi
leaq 0x8b(%rsp), %rdi
callq 0x23250
jmp 0xe0e30
jmp 0xe0e32
testb $0x1, 0x9f(%rsp)
jne 0xe0e3e
jmp 0xe0e4b
leaq 0xa0(%rsp), %rdi
callq 0x23820
jmp 0xe0db4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
testb $0x1, 0x9f(%rsp)
jne 0xe0e70
jmp 0xe0e7d
leaq 0xa0(%rsp), %rdi
callq 0x23820
jmp 0xe0f5c
movq 0xd8(%rsp), %rsi
movq 0xd8(%rsp), %rdx
addq $0x8, %rdx
movq 0xd8(%rsp), %rcx
addq $0xc, %rcx
movq 0xd8(%rsp), %r8
addq $0x10, %r8
leaq 0x70(%rsp), %rdi
callq 0xe0f70
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
addq $0x8, %rdx
movq %rsi, %rcx
addq $0xc, %rcx
movq %rsi, %r8
addq $0x10, %r8
leaq 0x58(%rsp), %rdi
callq 0xe0f70
movq 0xd8(%rsp), %rsi
movq 0xd8(%rsp), %rdx
addq $0x8, %rdx
movq 0xd8(%rsp), %rcx
addq $0xc, %rcx
movq 0xd8(%rsp), %r8
addq $0x10, %r8
leaq 0x38(%rsp), %rdi
callq 0xe0fc0
leaq 0x38(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xe1010
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
addq $0x8, %rdx
movq %rsi, %rcx
addq $0xc, %rcx
movq %rsi, %r8
addq $0x10, %r8
leaq 0x18(%rsp), %rdi
callq 0xe0fc0
leaq 0x18(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xe1050
addq $0xe8, %rsp
retq
movq 0x90(%rsp), %rdi
callq 0x13750
nopl (%rax)
| _ZN6google8protobuf8internal20RepeatedPtrFieldBase12InternalSwapEPS2_:
sub rsp, 0E8h
mov [rsp+0E8h+var_8], rdi
mov [rsp+0E8h+var_10], rsi
mov rax, [rsp+0E8h+var_8]
mov [rsp+0E8h+var_D8], rax
loc_E0DB4:
xor eax, eax
test al, 1
jnz short loc_E0DBF
jmp loc_E0E82
loc_E0DBF:
mov rax, [rsp+0E8h+var_D8]
mov rcx, [rsp+0E8h+var_10]
mov [rsp+0E8h+var_49], 0
cmp rax, rcx
jz short loc_E0DDB
jmp short loc_E0E32
loc_E0DDB:
lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0E8h+var_48]
mov [rsp+0E8h+var_E8], rdi
mov esi, 3
mov ecx, 136h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+0E8h+var_E8]
mov [rsp+0E8h+var_49], 1
lea rsi, aCheckFailedThi; "CHECK failed: this != rhs: "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0E8h+var_E0], rax
jmp short $+2
loc_E0E1C:
mov rsi, [rsp+0E8h+var_E0]
lea rdi, [rsp+0E8h+var_5D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_E0E30:
jmp short $+2
loc_E0E32:
test [rsp+0E8h+var_49], 1
jnz short loc_E0E3E
jmp short loc_E0E4B
loc_E0E3E:
lea rdi, [rsp+0E8h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_E0E4B:
jmp loc_E0DB4
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
test [rsp+arg_97], 1
jnz short loc_E0E70
jmp short loc_E0E7D
loc_E0E70:
lea rdi, [rsp+arg_98]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_E0E7D:
jmp loc_E0F5C
loc_E0E82:
mov rsi, [rsp+0E8h+var_10]
mov rdx, [rsp+0E8h+var_10]
add rdx, 8
mov rcx, [rsp+0E8h+var_10]
add rcx, 0Ch
mov r8, [rsp+0E8h+var_10]
add r8, 10h
lea rdi, [rsp+0E8h+var_78]
call _ZSt10make_tupleIJRPN6google8protobuf5ArenaERiS5_RPNS1_8internal20RepeatedPtrFieldBase3RepEEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOSE_; std::make_tuple<google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&>(google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&&&)
mov rsi, [rsp+0E8h+var_D8]
mov rdx, rsi
add rdx, 8
mov rcx, rsi
add rcx, 0Ch
mov r8, rsi
add r8, 10h
lea rdi, [rsp+0E8h+var_90]
call _ZSt10make_tupleIJRPN6google8protobuf5ArenaERiS5_RPNS1_8internal20RepeatedPtrFieldBase3RepEEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOSE_; std::make_tuple<google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&>(google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&&&)
mov rsi, [rsp+0E8h+var_10]
mov rdx, [rsp+0E8h+var_10]
add rdx, 8
mov rcx, [rsp+0E8h+var_10]
add rcx, 0Ch
mov r8, [rsp+0E8h+var_10]
add r8, 10h
lea rdi, [rsp+0E8h+var_B0]
call _ZSt3tieIJPN6google8protobuf5ArenaEiiPNS1_8internal20RepeatedPtrFieldBase3RepEEESt5tupleIJDpRT_EESB_; std::tie<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>(google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep * &)
lea rdi, [rsp+0E8h+var_B0]
lea rsi, [rsp+0E8h+var_90]
call _ZNSt5tupleIJRPN6google8protobuf5ArenaERiS5_RPNS1_8internal20RepeatedPtrFieldBase3RepEEEaSIJS3_iiS9_EEENSt9enable_ifIXcl12__assignableIDpT_EEERSB_E4typeEOS_IJSF_EE; std::tuple<google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&>::operator=<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>(std::tuple&&<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>)
mov rsi, [rsp+0E8h+var_D8]
mov rdx, rsi
add rdx, 8
mov rcx, rsi
add rcx, 0Ch
mov r8, rsi
add r8, 10h
lea rdi, [rsp+0E8h+var_D0]
call _ZSt3tieIJPN6google8protobuf5ArenaEiiPNS1_8internal20RepeatedPtrFieldBase3RepEEESt5tupleIJDpRT_EESB_; std::tie<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>(google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep * &)
lea rdi, [rsp+0E8h+var_D0]
lea rsi, [rsp+0E8h+var_78]
call _ZNSt5tupleIJRPN6google8protobuf5ArenaERiS5_RPNS1_8internal20RepeatedPtrFieldBase3RepEEEaSIJS3_iiS9_EEENSt9enable_ifIXcl12__assignableIDpRKT_EEERSB_E4typeERKS_IJDpSE_EE; std::tuple<google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&>::operator=<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>(std::tuple const&<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>)
add rsp, 0E8h
retn
loc_E0F5C:
mov rdi, [rsp+arg_88]
call __Unwind_Resume
| long long google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap(
google::protobuf::internal::RepeatedPtrFieldBase *this,
google::protobuf::internal::RepeatedPtrFieldBase *a2)
{
_BYTE v4[32]; // [rsp+18h] [rbp-D0h] BYREF
_BYTE v5[32]; // [rsp+38h] [rbp-B0h] BYREF
_BYTE v6[24]; // [rsp+58h] [rbp-90h] BYREF
_BYTE v7[27]; // [rsp+70h] [rbp-78h] BYREF
google::protobuf::internal::RepeatedPtrFieldBase *v8; // [rsp+D8h] [rbp-10h]
google::protobuf::internal::RepeatedPtrFieldBase *v9; // [rsp+E0h] [rbp-8h]
v9 = this;
v8 = a2;
std::make_tuple<google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&>(
v7,
v8,
(char *)v8 + 8,
(char *)v8 + 12,
(char *)v8 + 16);
std::make_tuple<google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&>(
v6,
this,
(char *)this + 8,
(char *)this + 12,
(char *)this + 16);
std::tie<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>(
v5,
v8,
(char *)v8 + 8,
(char *)v8 + 12,
(char *)v8 + 16);
std::tuple<google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&>::operator=<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>(
v5,
v6);
std::tie<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>(
v4,
this,
(char *)this + 8,
(char *)this + 12,
(char *)this + 16);
return std::tuple<google::protobuf::Arena *&,int &,int &,google::protobuf::internal::RepeatedPtrFieldBase::Rep *&>::operator=<google::protobuf::Arena *,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep *>(
v4,
v7);
}
| InternalSwap:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xe0],RDI
MOV qword ptr [RSP + 0xd8],RSI
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x10],RAX
LAB_001e0db4:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x001e0dbf
JMP 0x001e0e82
LAB_001e0dbf:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0xd8]
MOV byte ptr [RSP + 0x9f],0x0
CMP RAX,RCX
JZ 0x001e0ddb
JMP 0x001e0e32
LAB_001e0ddb:
LEA RDX,[0x2efe34]
LEA RDI,[RSP + 0xa0]
MOV qword ptr [RSP],RDI
MOV ESI,0x3
MOV ECX,0x136
CALL 0x001237e0
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x9f],0x1
LAB_001e0e09:
LEA RSI,[0x2f1234]
CALL 0x001230a0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001e0e1c
LAB_001e0e1c:
MOV RSI,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x8b]
CALL 0x00123250
LAB_001e0e2e:
JMP 0x001e0e30
LAB_001e0e30:
JMP 0x001e0e32
LAB_001e0e32:
TEST byte ptr [RSP + 0x9f],0x1
JNZ 0x001e0e3e
JMP 0x001e0e4b
LAB_001e0e3e:
LEA RDI,[RSP + 0xa0]
CALL 0x00123820
LAB_001e0e4b:
JMP 0x001e0db4
LAB_001e0e82:
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xd8]
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0xd8]
ADD RCX,0xc
MOV R8,qword ptr [RSP + 0xd8]
ADD R8,0x10
LEA RDI,[RSP + 0x70]
CALL 0x001e0f70
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RSI
ADD RDX,0x8
MOV RCX,RSI
ADD RCX,0xc
MOV R8,RSI
ADD R8,0x10
LEA RDI,[RSP + 0x58]
CALL 0x001e0f70
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xd8]
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0xd8]
ADD RCX,0xc
MOV R8,qword ptr [RSP + 0xd8]
ADD R8,0x10
LEA RDI,[RSP + 0x38]
CALL 0x001e0fc0
LEA RDI,[RSP + 0x38]
LEA RSI,[RSP + 0x58]
CALL 0x001e1010
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RSI
ADD RDX,0x8
MOV RCX,RSI
ADD RCX,0xc
MOV R8,RSI
ADD R8,0x10
LEA RDI,[RSP + 0x18]
CALL 0x001e0fc0
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x70]
CALL 0x001e1050
ADD RSP,0xe8
RET
|
/* WARNING: Removing unreachable block (ram,0x001e0dbf) */
/* WARNING: Removing unreachable block (ram,0x001e0ddb) */
/* WARNING: Removing unreachable block (ram,0x001e0dd9) */
/* WARNING: Removing unreachable block (ram,0x001e0e32) */
/* WARNING: Removing unreachable block (ram,0x001e0e3e) */
/* WARNING: Removing unreachable block (ram,0x001e0e3c) */
/* WARNING: Removing unreachable block (ram,0x001e0e4b) */
/* google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap(google::protobuf::internal::RepeatedPtrFieldBase*)
*/
void __thiscall
google::protobuf::internal::RepeatedPtrFieldBase::InternalSwap
(RepeatedPtrFieldBase *this,RepeatedPtrFieldBase *param_1)
{
tuple<google::protobuf::Arena*&,int&,int&,google::protobuf::internal::RepeatedPtrFieldBase::Rep*&>
local_d0 [32];
tuple<google::protobuf::Arena*&,int&,int&,google::protobuf::internal::RepeatedPtrFieldBase::Rep*&>
local_b0 [32];
Arena *local_90 [3];
Arena *local_78 [13];
RepeatedPtrFieldBase *local_10;
RepeatedPtrFieldBase *local_8;
local_10 = param_1;
local_8 = this;
std::
make_tuple<google::protobuf::Arena*&,int&,int&,google::protobuf::internal::RepeatedPtrFieldBase::Rep*&>
(local_78,(int *)param_1,(int *)(param_1 + 8),(Rep **)(param_1 + 0xc));
std::
make_tuple<google::protobuf::Arena*&,int&,int&,google::protobuf::internal::RepeatedPtrFieldBase::Rep*&>
(local_90,(int *)this,(int *)(this + 8),(Rep **)(this + 0xc));
std::tie<google::protobuf::Arena*,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep*>
((Arena **)local_b0,(int *)local_10,(int *)(local_10 + 8),(Rep **)(local_10 + 0xc));
std::
tuple<google::protobuf::Arena*&,int&,int&,google::protobuf::internal::RepeatedPtrFieldBase::Rep*&>
::operator=(local_b0,(tuple *)local_90);
std::tie<google::protobuf::Arena*,int,int,google::protobuf::internal::RepeatedPtrFieldBase::Rep*>
((Arena **)local_d0,(int *)this,(int *)(this + 8),(Rep **)(this + 0xc));
std::
tuple<google::protobuf::Arena*&,int&,int&,google::protobuf::internal::RepeatedPtrFieldBase::Rep*&>
::operator=(local_d0,(tuple *)local_78);
return;
}
| |
41,717 | my_mb_wc_gb2312 | eloqsql/strings/ctype-gb2312.c | static int
my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_gb2312_uni_onechar(((hi<<8)+s[1])&0x7F7F)))
return -2;
return 2;
} | O3 | c | my_mb_wc_gb2312:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x355ac
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x35588
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x355ac
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x56, %cl
ja 0x355ac
movzbl 0x1(%rdx), %ecx
leal 0x1(%rcx), %edx
cmpb $-0x5e, %dl
jae 0x355ad
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
orl %ecx, %eax
andl $0x7f7f, %eax # imm = 0x7F7F
leal -0x2121(%rax), %ecx
cmpl $0x537, %ecx # imm = 0x537
ja 0x355d8
movl %ecx, %eax
leaq 0x1309aa(%rip), %rcx # 0x165f80
jmp 0x35606
leal -0x2721(%rax), %ecx
cmpl $0x24e, %ecx # imm = 0x24E
ja 0x355f1
movl %ecx, %eax
leaq 0x131401(%rip), %rcx # 0x1669f0
jmp 0x35606
addl $0xffffcfdf, %eax # imm = 0xFFFFCFDF
cmpl $0x475e, %eax # imm = 0x475E
jae 0x3561f
movl %eax, %eax
leaq 0x13188a(%rip), %rcx # 0x166e90
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x3562b
jmp 0x35626
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_gb2312:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_355AC
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_35588
mov [rsi], rdi
mov eax, 1
retn
loc_35588:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_355AC
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 56h ; 'V'
ja short locret_355AC
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+1]
cmp dl, 0A2h
jnb short loc_355AD
locret_355AC:
retn
loc_355AD:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
or eax, ecx
and eax, 7F7Fh
lea ecx, [rax-2121h]
cmp ecx, 537h
ja short loc_355D8
mov eax, ecx
lea rcx, tab_gb2312_uni0
jmp short loc_35606
loc_355D8:
lea ecx, [rax-2721h]
cmp ecx, 24Eh
ja short loc_355F1
mov eax, ecx
lea rcx, tab_gb2312_uni1
jmp short loc_35606
loc_355F1:
add eax, 0FFFFCFDFh
cmp eax, 475Eh
jnb short loc_3561F
mov eax, eax
lea rcx, tab_gb2312_uni2
loc_35606:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_3562B
jmp short loc_35626
loc_3561F:
mov qword ptr [rsi], 0
loc_35626:
mov eax, 0FFFFFFFEh
loc_3562B:
pop rbp
retn
| long long my_mb_wc_gb2312(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
unsigned __int16 v6; // cx
int v7; // eax
long long v8; // rax
unsigned __int16 *v9; // rcx
long long v10; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)(v5 + 95) <= 0x56u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u )
{
v7 = (v6 | (unsigned __int16)((unsigned __int8)v5 << 8)) & 0x7F7F;
if ( (unsigned int)(v7 - 8481) > 0x537 )
{
if ( (unsigned int)(v7 - 10017) > 0x24E )
{
LODWORD(v8) = v7 - 12321;
if ( (unsigned int)v8 >= 0x475E )
{
*a2 = 0LL;
return 4294967294LL;
}
v8 = (unsigned int)v8;
v9 = (unsigned __int16 *)&tab_gb2312_uni2;
}
else
{
v8 = (unsigned int)(v7 - 10017);
v9 = (unsigned __int16 *)&tab_gb2312_uni1;
}
}
else
{
v8 = (unsigned int)(v7 - 8481);
v9 = (unsigned __int16 *)&tab_gb2312_uni0;
}
v10 = v9[v8];
*a2 = v10;
result = 2LL;
if ( (_WORD)v10 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
| my_mb_wc_gb2312:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001355ac
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x00135588
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_00135588:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001355ac
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x56
JA 0x001355ac
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x1]
CMP DL,0xa2
JNC 0x001355ad
LAB_001355ac:
RET
LAB_001355ad:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
OR EAX,ECX
AND EAX,0x7f7f
LEA ECX,[RAX + -0x2121]
CMP ECX,0x537
JA 0x001355d8
MOV EAX,ECX
LEA RCX,[0x265f80]
JMP 0x00135606
LAB_001355d8:
LEA ECX,[RAX + -0x2721]
CMP ECX,0x24e
JA 0x001355f1
MOV EAX,ECX
LEA RCX,[0x2669f0]
JMP 0x00135606
LAB_001355f1:
ADD EAX,0xffffcfdf
CMP EAX,0x475e
JNC 0x0013561f
MOV EAX,EAX
LEA RCX,[0x266e90]
LAB_00135606:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x0013562b
JMP 0x00135626
LAB_0013561f:
MOV qword ptr [RSI],0x0
LAB_00135626:
MOV EAX,0xfffffffe
LAB_0013562b:
POP RBP
RET
|
int8 my_mb_wc_gb2312(int8 param_1,ulong *param_2,char *param_3,char *param_4)
{
char cVar1;
ushort uVar2;
uint uVar3;
ulong uVar4;
int1 *puVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
cVar1 = *param_3;
if (-1 < (long)cVar1) {
*param_2 = (long)cVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(cVar1 + 0x5fU) < 0x57) {
if ((byte)(param_3[1] + 1U) < 0xa2) {
return 0;
}
uVar3 = CONCAT11(cVar1,param_3[1]) & 0x7f7f;
if (uVar3 - 0x2121 < 0x538) {
uVar4 = (ulong)(uVar3 - 0x2121);
puVar5 = tab_gb2312_uni0;
}
else if (uVar3 - 0x2721 < 0x24f) {
uVar4 = (ulong)(uVar3 - 0x2721);
puVar5 = tab_gb2312_uni1;
}
else {
if (0x475d < uVar3 - 0x3021) {
*param_2 = 0;
return 0xfffffffe;
}
uVar4 = (ulong)(uVar3 - 0x3021);
puVar5 = tab_gb2312_uni2;
}
uVar2 = *(ushort *)(puVar5 + uVar4 * 2);
*param_2 = (ulong)uVar2;
if (uVar2 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
| |
41,718 | deflateInit2_ | 3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/deflate.c | int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
version, stream_size)
z_streamp strm;
int level;
int method;
int windowBits;
int memLevel;
int strategy;
const char *version;
int stream_size;
{
deflate_state *s;
int wrap = 1;
static const char my_version[] = ZLIB_VERSION;
if (version == Z_NULL || version[0] != my_version[0] ||
stream_size != sizeof(z_stream)) {
return Z_VERSION_ERROR;
}
if (strm == Z_NULL) return Z_STREAM_ERROR;
strm->msg = Z_NULL;
if (strm->zalloc == (alloc_func)0) {
#ifdef Z_SOLO
return Z_STREAM_ERROR;
#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
#endif
}
if (strm->zfree == (free_func)0)
#ifdef Z_SOLO
return Z_STREAM_ERROR;
#else
strm->zfree = zcfree;
#endif
#ifdef FASTEST
if (level != 0) level = 1;
#else
if (level == Z_DEFAULT_COMPRESSION) level = 6;
#endif
if (windowBits < 0) { /* suppress zlib wrapper */
wrap = 0;
if (windowBits < -15)
return Z_STREAM_ERROR;
windowBits = -windowBits;
}
#ifdef GZIP
else if (windowBits > 15) {
wrap = 2; /* write gzip wrapper instead */
windowBits -= 16;
}
#endif
if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) {
return Z_STREAM_ERROR;
}
if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */
s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
if (s == Z_NULL) return Z_MEM_ERROR;
strm->state = (struct internal_state FAR *)s;
s->strm = strm;
s->status = INIT_STATE; /* to pass state test in deflateReset() */
s->wrap = wrap;
s->gzhead = Z_NULL;
s->w_bits = (uInt)windowBits;
s->w_size = 1 << s->w_bits;
s->w_mask = s->w_size - 1;
s->hash_bits = (uInt)memLevel + 7;
s->hash_size = 1 << s->hash_bits;
s->hash_mask = s->hash_size - 1;
s->hash_shift = ((s->hash_bits + MIN_MATCH-1) / MIN_MATCH);
s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));
s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos));
s->high_water = 0; /* nothing written to s->window yet */
s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
/* We overlay pending_buf and sym_buf. This works since the average size
* for length/distance pairs over any compressed block is assured to be 31
* bits or less.
*
* Analysis: The longest fixed codes are a length code of 8 bits plus 5
* extra bits, for lengths 131 to 257. The longest fixed distance codes are
* 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest
* possible fixed-codes length/distance pair is then 31 bits total.
*
* sym_buf starts one-fourth of the way into pending_buf. So there are
* three bytes in sym_buf for every four bytes in pending_buf. Each symbol
* in sym_buf is three bytes -- two for the distance and one for the
* literal/length. As each symbol is consumed, the pointer to the next
* sym_buf value to read moves forward three bytes. From that symbol, up to
* 31 bits are written to pending_buf. The closest the written pending_buf
* bits gets to the next sym_buf symbol to read is just before the last
* code is written. At that time, 31*(n - 2) bits have been written, just
* after 24*(n - 2) bits have been consumed from sym_buf. sym_buf starts at
* 8*n bits into pending_buf. (Note that the symbol buffer fills when n - 1
* symbols are written.) The closest the writing gets to what is unread is
* then n + 14 bits. Here n is lit_bufsize, which is 16384 by default, and
* can range from 128 to 32768.
*
* Therefore, at a minimum, there are 142 bits of space between what is
* written and what is read in the overlain buffers, so the symbols cannot
* be overwritten by the compressed data. That space is actually 139 bits,
* due to the three-bit fixed-code block header.
*
* That covers the case where either Z_FIXED is specified, forcing fixed
* codes, or when the use of fixed codes is chosen, because that choice
* results in a smaller compressed block than dynamic codes. That latter
* condition then assures that the above analysis also covers all dynamic
* blocks. A dynamic-code block will only be chosen to be emitted if it has
* fewer bits than a fixed-code block would for the same set of symbols.
* Therefore its average symbol length is assured to be less than 31. So
* the compressed data for a dynamic block also cannot overwrite the
* symbols from which it is being constructed.
*/
s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4);
s->pending_buf_size = (ulg)s->lit_bufsize * 4;
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
s->pending_buf == Z_NULL) {
s->status = FINISH_STATE;
strm->msg = ERR_MSG(Z_MEM_ERROR);
deflateEnd (strm);
return Z_MEM_ERROR;
}
s->sym_buf = s->pending_buf + s->lit_bufsize;
s->sym_end = (s->lit_bufsize - 1) * 3;
/* We avoid equality with lit_bufsize*3 because of wraparound at 64K
* on 16 bit machines and because stored blocks are restricted to
* 64K-1 bytes.
*/
s->level = level;
s->strategy = strategy;
s->method = (Byte)method;
return deflateReset(strm);
} | O3 | c | deflateInit2_:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x40(%rsp), %rax
movl $0xfffffffa, %ebx # imm = 0xFFFFFFFA
testq %rax, %rax
je 0x4085
cmpl $0x70, 0x48(%rsp)
jne 0x4085
cmpb $0x31, (%rax)
jne 0x4085
movq %rdi, %r14
movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x4085
movl %r9d, %ebp
movl %r8d, %r15d
movl %ecx, %r13d
movq $0x0, 0x30(%r14)
movq 0x40(%r14), %rax
testq %rax, %rax
jne 0x3e7b
leaq 0xae10(%rip), %rax # 0xec7f
movq %rax, 0x40(%r14)
movq $0x0, 0x50(%r14)
cmpq $0x0, 0x48(%r14)
jne 0x3e8d
leaq 0xae00(%rip), %rcx # 0xec89
movq %rcx, 0x48(%r14)
cmpl $-0x1, %esi
movl $0x6, %edi
cmovnel %esi, %edi
testl %r13d, %r13d
js 0x3eae
cmpl $0x10, %r13d
jb 0x3ec1
addl $-0x10, %r13d
movl $0x2, %esi
jmp 0x3ebd
cmpl $-0xf, %r13d
jb 0x4085
negl %r13d
xorl %esi, %esi
movb $0x1, %cl
jmp 0x3ec8
movl $0x1, %esi
xorl %ecx, %ecx
cmpl $0x4, %ebp
ja 0x4085
cmpl $0x9, %edi
ja 0x4085
cmpl $0x8, %edx
jne 0x4085
leal -0xa(%r15), %edx
cmpl $-0x9, %edx
jb 0x4085
leal -0x10(%r13), %edx
cmpl $-0x8, %edx
jb 0x4085
cmpl $0x8, %r13d
sete %dl
testb %cl, %dl
jne 0x4085
movl %esi, 0x4(%rsp)
movl %edi, (%rsp)
movq 0x50(%r14), %rdi
movl $0x1, %esi
movl $0x1740, %edx # imm = 0x1740
callq *%rax
movl $0xfffffffc, %ebx # imm = 0xFFFFFFFC
testq %rax, %rax
je 0x4085
movq %rax, %r12
cmpl $0x8, %r13d
movl $0x9, %ecx
cmovnel %r13d, %ecx
movq %rax, 0x38(%r14)
movq %r14, (%rax)
movl $0x2a, 0x8(%rax)
movl 0x4(%rsp), %eax
movl %eax, 0x30(%r12)
xorl %r13d, %r13d
movq %r13, 0x38(%r12)
movl $0x1, %esi
shll %cl, %esi
movl %ecx, 0x54(%r12)
movl %esi, 0x50(%r12)
leal -0x1(%rsi), %eax
movl %eax, 0x58(%r12)
leal 0x7(%r15), %eax
movl %eax, 0x88(%r12)
movl $0x80, %eax
movl %r15d, %ecx
shll %cl, %eax
movl %eax, 0x84(%r12)
decl %eax
movl %eax, 0x8c(%r12)
leal 0x9(%r15), %eax
movzbl %al, %eax
imull $0xab, %eax, %eax
shrl $0x9, %eax
movl %eax, 0x90(%r12)
movq 0x50(%r14), %rdi
movl $0x2, %edx
callq *0x40(%r14)
movq %rax, 0x60(%r12)
movq 0x50(%r14), %rdi
movl 0x50(%r12), %esi
movl $0x2, %edx
callq *0x40(%r14)
movq %rax, 0x70(%r12)
movq 0x50(%r14), %rdi
movl 0x84(%r12), %esi
movl $0x2, %edx
callq *0x40(%r14)
movl $0x40, %esi
movl %r15d, %ecx
shll %cl, %esi
movq %rax, 0x78(%r12)
movq %r13, 0x1738(%r12)
movl %esi, 0x1708(%r12)
movq 0x50(%r14), %rdi
movl $0x4, %edx
callq *0x40(%r14)
movq %rax, 0x10(%r12)
movl 0x1708(%r12), %ecx
leaq (,%rcx,4), %rdx
movq %rdx, 0x18(%r12)
cmpq %r13, 0x60(%r12)
je 0x4065
cmpq $0x0, 0x70(%r12)
je 0x4065
cmpq $0x0, 0x78(%r12)
sete %dl
testq %rax, %rax
sete %sil
orb %dl, %sil
cmpb $0x1, %sil
jne 0x4096
movl $0x29a, 0x8(%r12) # imm = 0x29A
leaq 0x12d2b(%rip), %rax # 0x16da0
movq 0x30(%rax), %rax
movq %rax, 0x30(%r14)
movq %r14, %rdi
callq 0x3210
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %rcx, %rax
movq %rax, 0x1700(%r12)
leal (%rcx,%rcx,2), %eax
addl $-0x3, %eax
movl %eax, 0x1710(%r12)
movl (%rsp), %eax
movl %eax, 0xc4(%r12)
movl %ebp, 0xc8(%r12)
movb $0x8, 0x48(%r12)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3120
| deflateInit2_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rax, [rsp+38h+arg_0]
mov ebx, 0FFFFFFFAh
test rax, rax
jz loc_4085
cmp [rsp+38h+arg_8], 70h ; 'p'
jnz loc_4085
cmp byte ptr [rax], 31h ; '1'
jnz loc_4085
mov r14, rdi
mov ebx, 0FFFFFFFEh
test rdi, rdi
jz loc_4085
mov ebp, r9d
mov r15d, r8d
mov r13d, ecx
mov qword ptr [r14+30h], 0
mov rax, [r14+40h]
test rax, rax
jnz short loc_3E7B
lea rax, zcalloc
mov [r14+40h], rax
mov qword ptr [r14+50h], 0
loc_3E7B:
cmp qword ptr [r14+48h], 0
jnz short loc_3E8D
lea rcx, zcfree
mov [r14+48h], rcx
loc_3E8D:
cmp esi, 0FFFFFFFFh
mov edi, 6
cmovnz edi, esi
test r13d, r13d
js short loc_3EAE
cmp r13d, 10h
jb short loc_3EC1
add r13d, 0FFFFFFF0h
mov esi, 2
jmp short loc_3EBD
loc_3EAE:
cmp r13d, 0FFFFFFF1h
jb loc_4085
neg r13d
xor esi, esi
loc_3EBD:
mov cl, 1
jmp short loc_3EC8
loc_3EC1:
mov esi, 1
xor ecx, ecx
loc_3EC8:
cmp ebp, 4
ja loc_4085
cmp edi, 9
ja loc_4085
cmp edx, 8
jnz loc_4085
lea edx, [r15-0Ah]
cmp edx, 0FFFFFFF7h
jb loc_4085
lea edx, [r13-10h]
cmp edx, 0FFFFFFF8h
jb loc_4085
cmp r13d, 8
setz dl
test dl, cl
jnz loc_4085
mov [rsp+38h+var_34], esi
mov [rsp+38h+var_38], edi
mov rdi, [r14+50h]
mov esi, 1
mov edx, 1740h
call rax
mov ebx, 0FFFFFFFCh
test rax, rax
jz loc_4085
mov r12, rax
cmp r13d, 8
mov ecx, 9
cmovnz ecx, r13d
mov [r14+38h], rax
mov [rax], r14
mov dword ptr [rax+8], 2Ah ; '*'
mov eax, [rsp+38h+var_34]
mov [r12+30h], eax
xor r13d, r13d
mov [r12+38h], r13
mov esi, 1
shl esi, cl
mov [r12+54h], ecx
mov [r12+50h], esi
lea eax, [rsi-1]
mov [r12+58h], eax
lea eax, [r15+7]
mov [r12+88h], eax
mov eax, 80h
mov ecx, r15d
shl eax, cl
mov [r12+84h], eax
dec eax
mov [r12+8Ch], eax
lea eax, [r15+9]
movzx eax, al
imul eax, 0ABh
shr eax, 9
mov [r12+90h], eax
mov rdi, [r14+50h]
mov edx, 2
call qword ptr [r14+40h]
mov [r12+60h], rax
mov rdi, [r14+50h]
mov esi, [r12+50h]
mov edx, 2
call qword ptr [r14+40h]
mov [r12+70h], rax
mov rdi, [r14+50h]
mov esi, [r12+84h]
mov edx, 2
call qword ptr [r14+40h]
mov esi, 40h ; '@'
mov ecx, r15d
shl esi, cl
mov [r12+78h], rax
mov [r12+1738h], r13
mov [r12+1708h], esi
mov rdi, [r14+50h]
mov edx, 4
call qword ptr [r14+40h]
mov [r12+10h], rax
mov ecx, [r12+1708h]
lea rdx, ds:0[rcx*4]
mov [r12+18h], rdx
cmp [r12+60h], r13
jz short loc_4065
cmp qword ptr [r12+70h], 0
jz short loc_4065
cmp qword ptr [r12+78h], 0
setz dl
test rax, rax
setz sil
or sil, dl
cmp sil, 1
jnz short loc_4096
loc_4065:
mov dword ptr [r12+8], 29Ah
lea rax, z_errmsg
mov rax, [rax+30h]
mov [r14+30h], rax
mov rdi, r14
call _deflateEnd
loc_4085:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4096:
add rax, rcx
mov [r12+1700h], rax
lea eax, [rcx+rcx*2]
add eax, 0FFFFFFFDh
mov [r12+1710h], eax
mov eax, [rsp+38h+var_38]
mov [r12+0C4h], eax
mov [r12+0C8h], ebp
mov byte ptr [r12+48h], 8
mov rdi, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _deflateReset
| long long deflateInit2_(
_QWORD *a1,
unsigned int a2,
int a3,
int a4,
int a5,
unsigned int a6,
_BYTE *a7,
int a8)
{
unsigned int v8; // ebx
int v12; // r13d
long long ( *v13)(); // rax
unsigned int v14; // edi
int v15; // esi
char v16; // cl
long long v17; // rax
long long v18; // r12
int v19; // ecx
long long v20; // rsi
long long v21; // rsi
long long v22; // rax
long long v23; // rcx
v8 = -6;
if ( !a7 )
return v8;
if ( a8 != 112 )
return v8;
if ( *a7 != 49 )
return v8;
v8 = -2;
if ( !a1 )
return v8;
v12 = a4;
a1[6] = 0LL;
v13 = (long long ( *)())a1[8];
if ( !v13 )
{
v13 = zcalloc;
a1[8] = zcalloc;
a1[10] = 0LL;
}
if ( !a1[9] )
a1[9] = zcfree;
v14 = 6;
if ( a2 != -1 )
v14 = a2;
if ( a4 < 0 )
{
if ( (unsigned int)a4 < 0xFFFFFFF1 )
return v8;
v12 = -a4;
v15 = 0;
}
else
{
if ( (unsigned int)a4 < 0x10 )
{
v15 = 1;
v16 = 0;
goto LABEL_18;
}
v12 = a4 - 16;
v15 = 2;
}
v16 = 1;
LABEL_18:
if ( a6 > 4 )
return v8;
if ( v14 > 9 )
return v8;
if ( a3 != 8 )
return v8;
if ( (unsigned int)(a5 - 10) < 0xFFFFFFF7 )
return v8;
if ( (unsigned int)(v12 - 16) < 0xFFFFFFF8 )
return v8;
if ( ((unsigned __int8)v16 & (v12 == 8)) != 0 )
return v8;
v17 = ((long long ( *)(_QWORD, long long, long long))v13)(a1[10], 1LL, 5952LL);
v8 = -4;
if ( !v17 )
return v8;
v18 = v17;
v19 = 9;
if ( v12 != 8 )
v19 = v12;
a1[7] = v17;
*(_QWORD *)v17 = a1;
*(_DWORD *)(v17 + 8) = 42;
*(_DWORD *)(v17 + 48) = v15;
*(_QWORD *)(v17 + 56) = 0LL;
v20 = (unsigned int)(1 << v19);
*(_DWORD *)(v17 + 84) = v19;
*(_DWORD *)(v17 + 80) = v20;
*(_DWORD *)(v17 + 88) = v20 - 1;
*(_DWORD *)(v17 + 136) = a5 + 7;
*(_DWORD *)(v17 + 132) = 128 << a5;
*(_DWORD *)(v17 + 140) = (128 << a5) - 1;
*(_DWORD *)(v17 + 144) = (unsigned __int8)(a5 + 9) / 3u;
*(_QWORD *)(v17 + 96) = ((long long ( *)(_QWORD, long long, long long))a1[8])(a1[10], v20, 2LL);
*(_QWORD *)(v18 + 112) = ((long long ( *)(_QWORD, _QWORD, long long))a1[8])(
a1[10],
*(unsigned int *)(v18 + 80),
2LL);
v21 = (unsigned int)(64 << a5);
*(_QWORD *)(v18 + 120) = ((long long ( *)(_QWORD, _QWORD, long long))a1[8])(
a1[10],
*(unsigned int *)(v18 + 132),
2LL);
*(_QWORD *)(v18 + 5944) = 0LL;
*(_DWORD *)(v18 + 5896) = v21;
v22 = ((long long ( *)(_QWORD, long long, long long))a1[8])(a1[10], v21, 4LL);
*(_QWORD *)(v18 + 16) = v22;
v23 = *(unsigned int *)(v18 + 5896);
*(_QWORD *)(v18 + 24) = 4 * v23;
if ( !*(_QWORD *)(v18 + 96) || !*(_QWORD *)(v18 + 112) || *(_QWORD *)(v18 + 120) == 0LL || v22 == 0 )
{
*(_DWORD *)(v18 + 8) = 666;
a1[6] = z_errmsg[6];
deflateEnd(a1);
return v8;
}
*(_QWORD *)(v18 + 5888) = v23 + v22;
*(_DWORD *)(v18 + 5904) = 3 * v23 - 3;
*(_DWORD *)(v18 + 196) = v14;
*(_DWORD *)(v18 + 200) = a6;
*(_BYTE *)(v18 + 72) = 8;
return deflateReset(a1);
}
| deflateInit2_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV EBX,0xfffffffa
TEST RAX,RAX
JZ 0x00104085
CMP dword ptr [RSP + 0x48],0x70
JNZ 0x00104085
CMP byte ptr [RAX],0x31
JNZ 0x00104085
MOV R14,RDI
MOV EBX,0xfffffffe
TEST RDI,RDI
JZ 0x00104085
MOV EBP,R9D
MOV R15D,R8D
MOV R13D,ECX
MOV qword ptr [R14 + 0x30],0x0
MOV RAX,qword ptr [R14 + 0x40]
TEST RAX,RAX
JNZ 0x00103e7b
LEA RAX,[0x10ec7f]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x50],0x0
LAB_00103e7b:
CMP qword ptr [R14 + 0x48],0x0
JNZ 0x00103e8d
LEA RCX,[0x10ec89]
MOV qword ptr [R14 + 0x48],RCX
LAB_00103e8d:
CMP ESI,-0x1
MOV EDI,0x6
CMOVNZ EDI,ESI
TEST R13D,R13D
JS 0x00103eae
CMP R13D,0x10
JC 0x00103ec1
ADD R13D,-0x10
MOV ESI,0x2
JMP 0x00103ebd
LAB_00103eae:
CMP R13D,-0xf
JC 0x00104085
NEG R13D
XOR ESI,ESI
LAB_00103ebd:
MOV CL,0x1
JMP 0x00103ec8
LAB_00103ec1:
MOV ESI,0x1
XOR ECX,ECX
LAB_00103ec8:
CMP EBP,0x4
JA 0x00104085
CMP EDI,0x9
JA 0x00104085
CMP EDX,0x8
JNZ 0x00104085
LEA EDX,[R15 + -0xa]
CMP EDX,-0x9
JC 0x00104085
LEA EDX,[R13 + -0x10]
CMP EDX,-0x8
JC 0x00104085
CMP R13D,0x8
SETZ DL
TEST DL,CL
JNZ 0x00104085
MOV dword ptr [RSP + 0x4],ESI
MOV dword ptr [RSP],EDI
MOV RDI,qword ptr [R14 + 0x50]
MOV ESI,0x1
MOV EDX,0x1740
CALL RAX
MOV EBX,0xfffffffc
TEST RAX,RAX
JZ 0x00104085
MOV R12,RAX
CMP R13D,0x8
MOV ECX,0x9
CMOVNZ ECX,R13D
MOV qword ptr [R14 + 0x38],RAX
MOV qword ptr [RAX],R14
MOV dword ptr [RAX + 0x8],0x2a
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R12 + 0x30],EAX
XOR R13D,R13D
MOV qword ptr [R12 + 0x38],R13
MOV ESI,0x1
SHL ESI,CL
MOV dword ptr [R12 + 0x54],ECX
MOV dword ptr [R12 + 0x50],ESI
LEA EAX,[RSI + -0x1]
MOV dword ptr [R12 + 0x58],EAX
LEA EAX,[R15 + 0x7]
MOV dword ptr [R12 + 0x88],EAX
MOV EAX,0x80
MOV ECX,R15D
SHL EAX,CL
MOV dword ptr [R12 + 0x84],EAX
DEC EAX
MOV dword ptr [R12 + 0x8c],EAX
LEA EAX,[R15 + 0x9]
MOVZX EAX,AL
IMUL EAX,EAX,0xab
SHR EAX,0x9
MOV dword ptr [R12 + 0x90],EAX
MOV RDI,qword ptr [R14 + 0x50]
MOV EDX,0x2
CALL qword ptr [R14 + 0x40]
MOV qword ptr [R12 + 0x60],RAX
MOV RDI,qword ptr [R14 + 0x50]
MOV ESI,dword ptr [R12 + 0x50]
MOV EDX,0x2
CALL qword ptr [R14 + 0x40]
MOV qword ptr [R12 + 0x70],RAX
MOV RDI,qword ptr [R14 + 0x50]
MOV ESI,dword ptr [R12 + 0x84]
MOV EDX,0x2
CALL qword ptr [R14 + 0x40]
MOV ESI,0x40
MOV ECX,R15D
SHL ESI,CL
MOV qword ptr [R12 + 0x78],RAX
MOV qword ptr [R12 + 0x1738],R13
MOV dword ptr [R12 + 0x1708],ESI
MOV RDI,qword ptr [R14 + 0x50]
MOV EDX,0x4
CALL qword ptr [R14 + 0x40]
MOV qword ptr [R12 + 0x10],RAX
MOV ECX,dword ptr [R12 + 0x1708]
LEA RDX,[RCX*0x4]
MOV qword ptr [R12 + 0x18],RDX
CMP qword ptr [R12 + 0x60],R13
JZ 0x00104065
CMP qword ptr [R12 + 0x70],0x0
JZ 0x00104065
CMP qword ptr [R12 + 0x78],0x0
SETZ DL
TEST RAX,RAX
SETZ SIL
OR SIL,DL
CMP SIL,0x1
JNZ 0x00104096
LAB_00104065:
MOV dword ptr [R12 + 0x8],0x29a
LEA RAX,[0x116da0]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [R14 + 0x30],RAX
MOV RDI,R14
CALL 0x00103210
LAB_00104085:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00104096:
ADD RAX,RCX
MOV qword ptr [R12 + 0x1700],RAX
LEA EAX,[RCX + RCX*0x2]
ADD EAX,-0x3
MOV dword ptr [R12 + 0x1710],EAX
MOV EAX,dword ptr [RSP]
MOV dword ptr [R12 + 0xc4],EAX
MOV dword ptr [R12 + 0xc8],EBP
MOV byte ptr [R12 + 0x48],0x8
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00103120
|
int8
deflateInit2_(long param_1,uint param_2,int param_3,uint param_4,int param_5,uint param_6,
char *param_7,int param_8)
{
int iVar1;
code *pcVar2;
long *plVar3;
long lVar4;
byte bVar5;
uint uVar6;
int8 uVar7;
int4 uVar8;
int iVar9;
uint uVar10;
if (param_7 == (char *)0x0) {
return 0xfffffffa;
}
if (param_8 != 0x70) {
return 0xfffffffa;
}
if (*param_7 != '1') {
return 0xfffffffa;
}
uVar7 = 0xfffffffe;
if (param_1 == 0) {
return 0xfffffffe;
}
*(int8 *)(param_1 + 0x30) = 0;
pcVar2 = *(code **)(param_1 + 0x40);
if (pcVar2 == (code *)0x0) {
pcVar2 = zcalloc;
*(code **)(param_1 + 0x40) = zcalloc;
*(int8 *)(param_1 + 0x50) = 0;
}
if (*(long *)(param_1 + 0x48) == 0) {
*(code **)(param_1 + 0x48) = zcfree;
}
uVar10 = 6;
if (param_2 != 0xffffffff) {
uVar10 = param_2;
}
if ((int)param_4 < 0) {
if (param_4 < 0xfffffff1) {
return 0xfffffffe;
}
param_4 = -param_4;
uVar8 = 0;
}
else {
if (param_4 < 0x10) {
uVar8 = 1;
bVar5 = 0;
goto LAB_00103ec8;
}
param_4 = param_4 - 0x10;
uVar8 = 2;
}
bVar5 = 1;
LAB_00103ec8:
if (((((param_6 < 5) && (uVar10 < 10)) && (param_3 == 8)) &&
((0xfffffff6 < param_5 - 10U && (0xfffffff7 < param_4 - 0x10)))) &&
(!(bool)(param_4 == 8 & bVar5))) {
plVar3 = (long *)(*pcVar2)(*(int8 *)(param_1 + 0x50),1,0x1740);
uVar7 = 0xfffffffc;
if (plVar3 != (long *)0x0) {
uVar6 = 9;
if (param_4 != 8) {
uVar6 = param_4;
}
*(long **)(param_1 + 0x38) = plVar3;
*plVar3 = param_1;
*(int4 *)(plVar3 + 1) = 0x2a;
*(int4 *)(plVar3 + 6) = uVar8;
plVar3[7] = 0;
iVar9 = 1 << ((byte)uVar6 & 0x1f);
*(uint *)((long)plVar3 + 0x54) = uVar6;
*(int *)(plVar3 + 10) = iVar9;
*(int *)(plVar3 + 0xb) = iVar9 + -1;
*(int *)(plVar3 + 0x11) = param_5 + 7;
iVar1 = 0x80 << ((byte)param_5 & 0x1f);
*(int *)((long)plVar3 + 0x84) = iVar1;
*(int *)((long)plVar3 + 0x8c) = iVar1 + -1;
*(uint *)(plVar3 + 0x12) = (param_5 + 9U & 0xff) / 3;
lVar4 = (**(code **)(param_1 + 0x40))(*(int8 *)(param_1 + 0x50),iVar9,2);
plVar3[0xc] = lVar4;
lVar4 = (**(code **)(param_1 + 0x40))(*(int8 *)(param_1 + 0x50),(int)plVar3[10],2);
plVar3[0xe] = lVar4;
lVar4 = (**(code **)(param_1 + 0x40))
(*(int8 *)(param_1 + 0x50),*(int4 *)((long)plVar3 + 0x84),2);
iVar1 = 0x40 << ((byte)param_5 & 0x1f);
plVar3[0xf] = lVar4;
plVar3[0x2e7] = 0;
*(int *)(plVar3 + 0x2e1) = iVar1;
lVar4 = (**(code **)(param_1 + 0x40))(*(int8 *)(param_1 + 0x50),iVar1,4);
plVar3[2] = lVar4;
uVar6 = *(uint *)(plVar3 + 0x2e1);
plVar3[3] = (ulong)uVar6 * 4;
if (((plVar3[0xc] != 0) && (plVar3[0xe] != 0)) && (lVar4 != 0 && plVar3[0xf] != 0)) {
plVar3[0x2e0] = lVar4 + (ulong)uVar6;
*(uint *)(plVar3 + 0x2e2) = uVar6 * 3 + -3;
*(uint *)((long)plVar3 + 0xc4) = uVar10;
*(uint *)(plVar3 + 0x19) = param_6;
*(int1 *)(plVar3 + 9) = 8;
uVar7 = deflateReset(param_1);
return uVar7;
}
*(int4 *)(plVar3 + 1) = 0x29a;
*(int8 *)(param_1 + 0x30) = z_errmsg._48_8_;
deflateEnd(param_1);
}
}
return uVar7;
}
| |
41,719 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O0 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5c9a0
movzbl %al, %ecx
movq %rcx, -0x50(%rbp)
subb $0x9, %al
ja 0x6bcc2
movq -0x50(%rbp), %rax
leaq 0x204c9(%rip), %rcx # 0x8c118
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0x5dbf0
movq (%rax), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x6bd62
movq -0x8(%rbp), %rdi
callq 0x5b690
movq (%rax), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x6bd62
movq -0x8(%rbp), %rdi
callq 0x61b70
cvttsd2si (%rax), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x6bd62
movq -0x8(%rbp), %rdi
callq 0x612c0
movb (%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x6bd62
jmp 0x6bcc2
movb $0x1, -0x45(%rbp)
movl $0x20, %edi
callq 0x5c6c0
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5dca0
movq %rax, -0x38(%rbp)
leaq 0x216ff(%rip), %rsi # 0x8d3e7
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x5b4b0
jmp 0x6bcf7
movq -0x58(%rbp), %rdi
movq -0x8(%rbp), %rcx
movl $0x12e, %esi # imm = 0x12E
leaq -0x30(%rbp), %rdx
callq 0x61580
jmp 0x6bd0f
movq -0x58(%rbp), %rdi
movb $0x0, -0x45(%rbp)
movq 0x3b272(%rip), %rsi # 0xa6f90
movq 0x3b2ab(%rip), %rdx # 0xa6fd0
callq 0x60f20
jmp 0x6bd71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6bd4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5cfd0
testb $0x1, -0x45(%rbp)
jne 0x6bd57
jmp 0x6bd60
movq -0x58(%rbp), %rdi
callq 0x5d520
jmp 0x6bd68
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x611b0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEjTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEcvNS0_6detail7value_tEEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator nlohmann::json_abi_v3_11_3::detail::value_t(void)
movzx ecx, al
mov [rbp+var_50], rcx
sub al, 9; switch 10 cases
ja short def_6BC56; jumptable 000000000006BC56 default case
mov rax, [rbp+var_50]
lea rcx, jpt_6BC56
movsxd rax, ds:(jpt_6BC56 - 8C118h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6BC58:
mov rdi, [rbp+var_8]; jumptable 000000000006BC56 case 6
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov rax, [rax]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], ecx
jmp loc_6BD62
loc_6BC71:
mov rdi, [rbp+var_8]; jumptable 000000000006BC56 case 5
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov rax, [rax]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], ecx
jmp loc_6BD62
loc_6BC8A:
mov rdi, [rbp+var_8]; jumptable 000000000006BC56 case 7
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
cvttsd2si rax, qword ptr [rax]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], ecx
jmp loc_6BD62
loc_6BCA5:
mov rdi, [rbp+var_8]; jumptable 000000000006BC56 case 4
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov al, [rax]
and al, 1
movzx ecx, al
mov rax, [rbp+var_10]
mov [rax], ecx
jmp loc_6BD62
loc_6BCC0:
jmp short $+2; jumptable 000000000006BC56 cases 0-3,8,9
def_6BC56:
mov [rbp+var_45], 1; jumptable 000000000006BC56 default case
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rbp+var_58], rax
mov rdi, [rbp+var_8]
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov [rbp+var_38], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rbp+var_30]
lea rdx, [rbp+var_38]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
jmp short $+2
loc_6BCF7:
mov rdi, [rbp+var_58]
mov rcx, [rbp+var_8]
mov esi, 12Eh
lea rdx, [rbp+var_30]
call __ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_6BD0F:
mov rdi, [rbp+var_58]; void *
mov [rbp+var_45], 0
mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE_ptr; lptinfo
mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp short loc_6BD71
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_6BD4F
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_6BD4F:
test [rbp+var_45], 1
jnz short loc_6BD57
jmp short loc_6BD60
loc_6BD57:
mov rdi, [rbp+var_58]; void *
call ___cxa_free_exception
loc_6BD60:
jmp short loc_6BD68
loc_6BD62:
add rsp, 60h
pop rbp
retn
loc_6BD68:
mov rdi, [rbp+var_40]
call __Unwind_Resume
loc_6BD71:
nop word ptr [rax+rax+00000000h]
nop dword ptr [rax+rax+00h]
| int * ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEjTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
long long a1,
int *a2)
{
int v2; // ecx
int *result; // rax
int v4; // ecx
int v5; // ecx
int v6; // ecx
void *exception; // [rsp+8h] [rbp-58h]
long long v8; // [rsp+28h] [rbp-38h] BYREF
_BYTE v9[32]; // [rsp+30h] [rbp-30h] BYREF
int *v10; // [rsp+50h] [rbp-10h]
long long v11; // [rsp+58h] [rbp-8h]
v11 = a1;
v10 = a2;
switch ( (unsigned __int8)nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator nlohmann::json_abi_v3_11_3::detail::value_t(a1) )
{
case 4u:
v6 = *(_BYTE *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(v11) & 1;
result = v10;
*v10 = v6;
break;
case 5u:
v4 = *(_QWORD *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(v11);
result = v10;
*v10 = v4;
break;
case 6u:
v2 = *(_QWORD *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(v11);
result = v10;
*v10 = v2;
break;
case 7u:
v5 = (int)*(double *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(v11);
result = v10;
*v10 = v5;
break;
default:
exception = __cxa_allocate_exception(0x20uLL);
v8 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(v11);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
v9,
"type must be number, but is ",
&v8);
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302LL,
v9,
v11);
__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::type_error::~type_error);
}
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEjTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0015c9a0
MOVZX ECX,AL
MOV qword ptr [RBP + -0x50],RCX
SUB AL,0x9
JA 0x0016bcc2
MOV RAX,qword ptr [RBP + -0x50]
LEA RCX,[0x18c118]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_6:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0015dbf0
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
JMP 0x0016bd62
caseD_5:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0015b690
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
JMP 0x0016bd62
caseD_7:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00161b70
CVTTSD2SI RAX,qword ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
JMP 0x0016bd62
caseD_4:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001612c0
MOV AL,byte ptr [RAX]
AND AL,0x1
MOVZX ECX,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
JMP 0x0016bd62
caseD_0:
JMP 0x0016bcc2
default:
MOV byte ptr [RBP + -0x45],0x1
MOV EDI,0x20
CALL 0x0015c6c0
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0015dca0
MOV qword ptr [RBP + -0x38],RAX
LAB_0016bce1:
LEA RSI,[0x18d3e7]
LEA RDI,[RBP + -0x30]
LEA RDX,[RBP + -0x38]
CALL 0x0015b4b0
JMP 0x0016bcf7
LAB_0016bcf7:
MOV RDI,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x8]
LAB_0016bcff:
MOV ESI,0x12e
LEA RDX,[RBP + -0x30]
CALL 0x00161580
JMP 0x0016bd0f
LAB_0016bd0f:
MOV RDI,qword ptr [RBP + -0x58]
MOV byte ptr [RBP + -0x45],0x0
MOV RSI,qword ptr [0x001a6f90]
MOV RDX,qword ptr [0x001a6fd0]
CALL 0x00160f20
LAB_0016bd62:
ADD RSP,0x60
POP RBP
RET
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEjTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json *param_1,uint *param_2)
{
int1 uVar1;
int8 *puVar2;
double *pdVar3;
byte *pbVar4;
int8 uVar5;
char *local_40;
detail local_38 [32];
uint *local_18;
basic_json *local_10;
local_18 = param_2;
local_10 = param_1;
uVar1 = nlohmann::json_abi_v3_11_3::basic_json::operator_cast_to_value_t(param_1);
switch(uVar1) {
case 0:
case 1:
case 2:
case 3:
case 8:
case 9:
default:
uVar5 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)local_10);
/* try { // try from 0016bce1 to 0016bcf4 has its CatchHandler @ 0016bd2c */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 0016bcff to 0016bd29 has its CatchHandler @ 0016bd3a */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar5,0x12e,local_38,local_10);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,PTR_typeinfo_001a6f90,PTR__type_error_001a6fd0);
case 4:
pbVar4 = (byte *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_10);
*local_18 = (uint)(*pbVar4 & 1);
break;
case 5:
puVar2 = (int8 *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_10);
*local_18 = (uint)*puVar2;
break;
case 6:
puVar2 = (int8 *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_10);
*local_18 = (uint)*puVar2;
break;
case 7:
pdVar3 = (double *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
(local_10);
*local_18 = (uint)(long)*pdVar3;
}
return;
}
| |
41,720 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O1 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x16962
leaq 0xb775(%rip), %rcx # 0x220b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0x16957
movzbl 0x8(%r14), %eax
jmp 0x16957
cvttsd2si 0x8(%r14), %rax
movl %eax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x11460
movq %rax, %rbx
movq %r14, %rdi
callq 0x11820
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xc3d5(%rip), %rsi # 0x22d5b
leaq 0x10(%rsp), %rdi
callq 0x11100
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x120c0
xorl %ebp, %ebp
movq 0x165ef(%rip), %rsi # 0x2cfa0
movq 0x16598(%rip), %rdx # 0x2cf50
movq %rbx, %rdi
callq 0x11fb0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x169e6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x119b0
jmp 0x169e6
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x169f3
movq %rbx, %rdi
callq 0x116b0
movq %r14, %rdi
callq 0x12010
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEjTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_16942; jumptable 0000000000016942 default case
lea rcx, jpt_16942
movsxd rax, ds:(jpt_16942 - 220B0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_16944:
mov eax, [r14+8]; jumptable 0000000000016942 cases 5,6
jmp short loc_16957
loc_1694A:
movzx eax, byte ptr [r14+8]; jumptable 0000000000016942 case 4
jmp short loc_16957
loc_16951:
cvttsd2si rax, qword ptr [r14+8]; jumptable 0000000000016942 case 7
loc_16957:
mov [rsi], eax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_16942:
mov edi, 20h ; ' '; jumptable 0000000000016942 default case
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call __ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE_ptr; lptinfo
mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_169E6
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_169E6
mov r14, rax
mov bpl, 1
loc_169E6:
test bpl, bpl
jz short loc_169F3
mov rdi, rbx; void *
call ___cxa_free_exception
loc_169F3:
mov rdi, r14
call __Unwind_Resume
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEjTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x00116962
LEA RCX,[0x1220b0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV EAX,dword ptr [R14 + 0x8]
JMP 0x00116957
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x00116957
caseD_7:
CVTTSD2SI RAX,qword ptr [R14 + 0x8]
LAB_00116957:
MOV dword ptr [RSI],EAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
MOV EDI,0x20
CALL 0x00111460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00111820
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0011697f:
LEA RSI,[0x122d5b]
LEA RDI,[RSP + 0x10]
CALL 0x00111100
MOV BPL,0x1
LAB_00116993:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001120c0
XOR EBP,EBP
MOV RSI,qword ptr [0x0012cfa0]
MOV RDX,qword ptr [0x0012cf50]
MOV RDI,RBX
CALL 0x00111fb0
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEjTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,uint *param_2)
{
uint uVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
switch(*param_1) {
case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x4:
uVar1 = (uint)(byte)param_1[8];
break;
case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5:
case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6:
uVar1 = *(uint *)(param_1 + 8);
break;
case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7:
uVar1 = (uint)(long)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0011697f to 0011698f has its CatchHandler @ 001169e0 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 00116993 to 001169bf has its CatchHandler @ 001169c0 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,PTR_typeinfo_0012cfa0,PTR__exception_0012cf50);
}
*param_2 = uVar1;
return;
}
| ||
41,721 | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O2 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x21877
leaq 0x97d0(%rip), %rcx # 0x2b020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0x2186c
movzbl 0x8(%r14), %eax
jmp 0x2186c
cvttsd2si 0x8(%r14), %eax
movl %eax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x1c790
movq %rax, %rbx
movq %r14, %rdi
callq 0x1cea0
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xa4b2(%rip), %rsi # 0x2bd4b
leaq 0x10(%rsp), %rdi
callq 0x1c1e0
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x1dd90
xorl %ebp, %ebp
movq 0x176dc(%rip), %rsi # 0x38fa0
movq 0x17685(%rip), %rdx # 0x38f50
movq %rbx, %rdi
callq 0x1dc20
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x1c6f0
testb %bpl, %bpl
jne 0x218ea
jmp 0x218f2
movq %rax, %r14
movq %rbx, %rdi
callq 0x1cc30
movq %r14, %rdi
callq 0x1dcb0
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_21857; jumptable 0000000000021857 default case
lea rcx, jpt_21857
movsxd rax, ds:(jpt_21857 - 2B020h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_21859:
mov eax, [r14+8]; jumptable 0000000000021857 cases 5,6
jmp short loc_2186C
loc_2185F:
movzx eax, byte ptr [r14+8]; jumptable 0000000000021857 case 4
jmp short loc_2186C
loc_21866:
cvttsd2si eax, qword ptr [r14+8]; jumptable 0000000000021857 case 7
loc_2186C:
mov [rsi], eax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_21857:
push 20h ; ' '; jumptable 0000000000021857 default case
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call __ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE_ptr; lptinfo
mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_218EA
jmp short loc_218F2
mov r14, rax
loc_218EA:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_218F2:
mov rdi, r14
call __Unwind_Resume
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x00121877
LEA RCX,[0x12b020]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV EAX,dword ptr [R14 + 0x8]
JMP 0x0012186c
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x0012186c
caseD_7:
CVTTSD2SI EAX,qword ptr [R14 + 0x8]
LAB_0012186c:
MOV dword ptr [RSI],EAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
PUSH 0x20
POP RDI
CALL 0x0011c790
MOV RBX,RAX
MOV RDI,R14
CALL 0x0011cea0
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00121892:
LEA RSI,[0x12bd4b]
LEA RDI,[RSP + 0x10]
CALL 0x0011c1e0
MOV BPL,0x1
LAB_001218a6:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0011dd90
XOR EBP,EBP
MOV RSI,qword ptr [0x00138fa0]
MOV RDX,qword ptr [0x00138f50]
MOV RDI,RBX
CALL 0x0011dc20
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,uint *param_2)
{
uint uVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
switch(*param_1) {
case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x4:
uVar1 = (uint)(byte)param_1[8];
break;
case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5:
case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6:
uVar1 = *(uint *)(param_1 + 8);
break;
case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7:
uVar1 = (uint)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 00121892 to 001218a2 has its CatchHandler @ 001218e7 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 001218a6 to 001218d2 has its CatchHandler @ 001218d3 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,PTR_typeinfo_00138fa0,PTR__exception_00138f50);
}
*param_2 = uVar1;
return;
}
| ||
41,722 | js_array_buffer_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_array_buffer_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p = JS_VALUE_GET_OBJ(val);
JSArrayBuffer *abuf = p->u.array_buffer;
struct list_head *el, *el1;
if (abuf) {
/* The ArrayBuffer finalizer may be called before the typed
array finalizers using it, so abuf->array_list is not
necessarily empty. */
list_for_each_safe(el, el1, &abuf->array_list) {
JSTypedArray *ta;
JSObject *p1;
ta = list_entry(el, JSTypedArray, link);
ta->link.prev = NULL;
ta->link.next = NULL;
p1 = ta->obj;
/* Note: the typed array length and offset fields are not modified */
if (p1->class_id != JS_CLASS_DATAVIEW) {
p1->u.array.count = 0;
p1->u.array.u.ptr = NULL;
}
}
if (abuf->shared && rt->sab_funcs.sab_free) {
rt->sab_funcs.sab_free(rt->sab_funcs.sab_opaque, abuf->data);
} else {
if (abuf->free_func)
abuf->free_func(rt, abuf->opaque, abuf->data);
}
js_free_rt(rt, abuf);
}
} | O2 | c | js_array_buffer_finalizer:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rsi), %rbx
testq %rbx, %rbx
je 0x37890
movq %rdi, %r14
leaq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
xorps %xmm0, %xmm0
cmpq %rax, %rcx
je 0x37847
movq 0x8(%rcx), %rdx
movups %xmm0, (%rcx)
movq 0x10(%rcx), %rsi
cmpw $0x21, 0x6(%rsi)
movq %rdx, %rcx
je 0x3781f
andl $0x0, 0x40(%rsi)
andq $0x0, 0x38(%rsi)
movq %rdx, %rcx
jmp 0x3781f
cmpb $0x0, 0x9(%rbx)
je 0x37868
movq 0x168(%r14), %rax
testq %rax, %rax
je 0x37868
movq 0x178(%r14), %rdi
movq 0x10(%rbx), %rsi
callq *%rax
jmp 0x3787e
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x3787e
movq 0x10(%rbx), %rdx
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq *%rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1ac7b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_array_buffer_finalizer:
push r14
push rbx
push rax
mov rbx, [rsi+30h]
test rbx, rbx
jz short loc_37890
mov r14, rdi
lea rax, [rbx+18h]
mov rcx, [rbx+20h]
xorps xmm0, xmm0
loc_3781F:
cmp rcx, rax
jz short loc_37847
mov rdx, [rcx+8]
movups xmmword ptr [rcx], xmm0
mov rsi, [rcx+10h]
cmp word ptr [rsi+6], 21h ; '!'
mov rcx, rdx
jz short loc_3781F
and dword ptr [rsi+40h], 0
and qword ptr [rsi+38h], 0
mov rcx, rdx
jmp short loc_3781F
loc_37847:
cmp byte ptr [rbx+9], 0
jz short loc_37868
mov rax, [r14+168h]
test rax, rax
jz short loc_37868
mov rdi, [r14+178h]
mov rsi, [rbx+10h]
call rax
jmp short loc_3787E
loc_37868:
mov rax, [rbx+30h]
test rax, rax
jz short loc_3787E
mov rdx, [rbx+10h]
mov rsi, [rbx+28h]
mov rdi, r14
call rax
loc_3787E:
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp js_free_rt
loc_37890:
add rsp, 8
pop rbx
pop r14
retn
| long long js_array_buffer_finalizer(long long a1, long long a2)
{
long long result; // rax
long long v3; // rbx
long long v4; // rcx
long long v5; // rdx
long long v6; // rsi
void ( *v7)(_QWORD, _QWORD, double); // rax
void ( *v8)(long long, _QWORD, _QWORD, double); // rax
v3 = *(_QWORD *)(a2 + 48);
if ( v3 )
{
v4 = *(_QWORD *)(v3 + 32);
while ( v4 != v3 + 24 )
{
v5 = *(_QWORD *)(v4 + 8);
*(_OWORD *)v4 = 0LL;
v6 = *(_QWORD *)(v4 + 16);
v4 = v5;
if ( *(_WORD *)(v6 + 6) != 33 )
{
*(_DWORD *)(v6 + 64) = 0;
*(_QWORD *)(v6 + 56) = 0LL;
v4 = v5;
}
}
if ( *(_BYTE *)(v3 + 9) && (v7 = *(void ( **)(_QWORD, _QWORD, double))(a1 + 360)) != 0LL )
{
v7(*(_QWORD *)(a1 + 376), *(_QWORD *)(v3 + 16), 0.0);
}
else
{
v8 = *(void ( **)(long long, _QWORD, _QWORD, double))(v3 + 48);
if ( v8 )
v8(a1, *(_QWORD *)(v3 + 40), *(_QWORD *)(v3 + 16), 0.0);
}
return js_free_rt(a1, v3);
}
return result;
}
| js_array_buffer_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RSI + 0x30]
TEST RBX,RBX
JZ 0x00137890
MOV R14,RDI
LEA RAX,[RBX + 0x18]
MOV RCX,qword ptr [RBX + 0x20]
XORPS XMM0,XMM0
LAB_0013781f:
CMP RCX,RAX
JZ 0x00137847
MOV RDX,qword ptr [RCX + 0x8]
MOVUPS xmmword ptr [RCX],XMM0
MOV RSI,qword ptr [RCX + 0x10]
CMP word ptr [RSI + 0x6],0x21
MOV RCX,RDX
JZ 0x0013781f
AND dword ptr [RSI + 0x40],0x0
AND qword ptr [RSI + 0x38],0x0
MOV RCX,RDX
JMP 0x0013781f
LAB_00137847:
CMP byte ptr [RBX + 0x9],0x0
JZ 0x00137868
MOV RAX,qword ptr [R14 + 0x168]
TEST RAX,RAX
JZ 0x00137868
MOV RDI,qword ptr [R14 + 0x178]
MOV RSI,qword ptr [RBX + 0x10]
CALL RAX
JMP 0x0013787e
LAB_00137868:
MOV RAX,qword ptr [RBX + 0x30]
TEST RAX,RAX
JZ 0x0013787e
MOV RDX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RBX + 0x28]
MOV RDI,R14
CALL RAX
LAB_0013787e:
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0011ac7b
LAB_00137890:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_array_buffer_finalizer(long param_1,long param_2)
{
long lVar1;
int8 *puVar2;
long lVar3;
int8 *puVar4;
lVar1 = *(long *)(param_2 + 0x30);
if (lVar1 != 0) {
puVar4 = *(int8 **)(lVar1 + 0x20);
while (puVar4 != (int8 *)(lVar1 + 0x18)) {
puVar2 = (int8 *)puVar4[1];
*puVar4 = 0;
puVar4[1] = 0;
lVar3 = puVar4[2];
puVar4 = puVar2;
if (*(short *)(lVar3 + 6) != 0x21) {
*(int4 *)(lVar3 + 0x40) = 0;
*(int8 *)(lVar3 + 0x38) = 0;
}
}
if ((*(char *)(lVar1 + 9) == '\0') || (*(code **)(param_1 + 0x168) == (code *)0x0)) {
if (*(code **)(lVar1 + 0x30) != (code *)0x0) {
(**(code **)(lVar1 + 0x30))
(param_1,*(int8 *)(lVar1 + 0x28),*(int8 *)(lVar1 + 0x10));
}
}
else {
(**(code **)(param_1 + 0x168))(*(int8 *)(param_1 + 0x178),*(int8 *)(lVar1 + 0x10))
;
}
js_free_rt(param_1,lVar1);
return;
}
return;
}
| |
41,723 | testing::internal::PrintAsStringLiteralTo(char32_t, std::ostream*) | AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-printers.cc | static CharFormat PrintAsStringLiteralTo(char32_t c, ostream* os) {
switch (c) {
case L'\'':
*os << "'";
return kAsIs;
case L'"':
*os << "\\\"";
return kSpecialEscape;
default:
return PrintAsCharLiteralTo(c, os);
}
} | O3 | cpp | testing::internal::PrintAsStringLiteralTo(char32_t, std::ostream*):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %r14d
cmpl $0x21, %edi
jg 0x71f2e
cmpl $0xd, %r14d
ja 0x71fb3
movl %r14d, %eax
leaq 0x1315c(%rip), %rcx # 0x85078
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x15052(%rip), %rsi # 0x86f7e
jmp 0x71f98
cmpl $0x22, %r14d
je 0x71f88
cmpl $0x5c, %r14d
je 0x71f91
cmpl $0x27, %r14d
jne 0x71fb3
leaq 0xf9d1(%rip), %rsi # 0x81918
jmp 0x71fc4
leaq 0x15942(%rip), %rsi # 0x87892
jmp 0x71f98
leaq 0x1593c(%rip), %rsi # 0x87895
jmp 0x71f98
leaq 0x1592a(%rip), %rsi # 0x8788c
jmp 0x71f98
leaq 0x168fb(%rip), %rsi # 0x88866
jmp 0x71f98
leaq 0x1591b(%rip), %rsi # 0x8788f
jmp 0x71f98
leaq 0x1591b(%rip), %rsi # 0x87898
jmp 0x71f98
leaq 0x168e3(%rip), %rsi # 0x88869
jmp 0x71f98
leaq 0x16907(%rip), %rsi # 0x88896
jmp 0x71f98
leaq 0x168cb(%rip), %rsi # 0x88863
movl $0x2, %edx
movq %rbx, %rdi
callq 0x11b90
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leal -0x20(%r14), %eax
cmpl $0x5e, %eax
ja 0x71fd5
leaq 0xf(%rsp), %rsi
movb %r14b, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x11b90
xorl %eax, %eax
jmp 0x71faa
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ebp
leaq 0x16885(%rip), %rsi # 0x8886c
movl $0x2, %edx
movq %rbx, %rdi
callq 0x11b90
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
orl $0x4000, 0x18(%rbx,%rax) # imm = 0x4000
movq %rbx, %rdi
movl %r14d, %esi
callq 0x113b0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl %ebp, 0x18(%rbx,%rax)
movl $0x1, %eax
jmp 0x71faa
nop
| _ZN7testing8internalL22PrintAsStringLiteralToEDiPSo:
push rbp
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14d, edi
cmp edi, 21h ; '!'
jg short loc_71F2E
cmp r14d, 0Dh; switch 14 cases
ja def_71F23; jumptable 0000000000071F23 default case, cases 1-6
mov eax, r14d
lea rcx, jpt_71F23
movsxd rax, ds:(jpt_71F23 - 85078h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_71F25:
lea rsi, a0; jumptable 0000000000071F23 case 0
jmp short loc_71F98
loc_71F2E:
cmp r14d, 22h ; '"'
jz short loc_71F88
cmp r14d, 5Ch ; '\'
jz short loc_71F91
cmp r14d, 27h ; '''
jnz short def_71F23; jumptable 0000000000071F23 default case, cases 1-6
lea rsi, aLoggerWithName+11h; "'"
jmp short loc_71FC4
loc_71F49:
lea rsi, aN; jumptable 0000000000071F23 case 10
jmp short loc_71F98
loc_71F52:
lea rsi, asc_87895; jumptable 0000000000071F23 case 12
jmp short loc_71F98
loc_71F5B:
lea rsi, aB; jumptable 0000000000071F23 case 8
jmp short loc_71F98
loc_71F64:
lea rsi, aA; jumptable 0000000000071F23 case 7
jmp short loc_71F98
loc_71F6D:
lea rsi, aT; jumptable 0000000000071F23 case 9
jmp short loc_71F98
loc_71F76:
lea rsi, aR; jumptable 0000000000071F23 case 13
jmp short loc_71F98
loc_71F7F:
lea rsi, aV; jumptable 0000000000071F23 case 11
jmp short loc_71F98
loc_71F88:
lea rsi, asc_88896; "\\\""
jmp short loc_71F98
loc_71F91:
lea rsi, asc_88863; "\\\\"
loc_71F98:
mov edx, 2
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov eax, 2
loc_71FAA:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
def_71F23:
lea eax, [r14-20h]; jumptable 0000000000071F23 default case, cases 1-6
cmp eax, 5Eh ; '^'
ja short loc_71FD5
lea rsi, [rsp+28h+var_19]
mov [rsi], r14b
loc_71FC4:
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
xor eax, eax
jmp short loc_71FAA
loc_71FD5:
mov rax, [rbx]
mov rax, [rax-18h]
mov ebp, [rbx+rax+18h]
lea rsi, asc_8886C; "\\x"
mov edx, 2
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rcx, [rax-18h]
mov edx, [rbx+rcx+18h]
and edx, 0FFFFFFB5h
or edx, 8
mov [rbx+rcx+18h], edx
mov rax, [rax-18h]
or dword ptr [rbx+rax+18h], 4000h
mov rdi, rbx
mov esi, r14d
call __ZNSolsEi; std::ostream::operator<<(int)
mov rax, [rbx]
mov rax, [rax-18h]
mov [rbx+rax+18h], ebp
mov eax, 1
jmp loc_71FAA
| long long testing::internal::PrintAsStringLiteralTo(int a1, long long *a2)
{
const char *v3; // rsi
char *v4; // rsi
int v6; // ebp
long long v7; // rax
char v8; // [rsp+Fh] [rbp-19h] BYREF
if ( a1 <= 33 )
{
switch ( a1 )
{
case 0:
v3 = "\\0";
goto LABEL_17;
case 7:
v3 = "\\a";
goto LABEL_17;
case 8:
v3 = "\\b";
goto LABEL_17;
case 9:
v3 = "\\t";
goto LABEL_17;
case 10:
v3 = "\\n";
goto LABEL_17;
case 11:
v3 = "\\v";
goto LABEL_17;
case 12:
v3 = "\\f";
goto LABEL_17;
case 13:
v3 = "\\r";
goto LABEL_17;
default:
goto LABEL_18;
}
}
switch ( a1 )
{
case '"':
v3 = "\\\"";
LABEL_17:
std::__ostream_insert<char,std::char_traits<char>>(a2, v3, 2LL);
return 2LL;
case '\\':
v3 = "\\\\";
goto LABEL_17;
case '\'':
v4 = "'";
LABEL_20:
std::__ostream_insert<char,std::char_traits<char>>(a2, v4, 1LL);
return 0LL;
}
LABEL_18:
if ( (unsigned int)(a1 - 32) <= 0x5E )
{
v4 = &v8;
v8 = a1;
goto LABEL_20;
}
v6 = *(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24) + 24);
std::__ostream_insert<char,std::char_traits<char>>(a2, "\\x", 2LL);
v7 = *a2;
*(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24) + 24) = *(_DWORD *)((_BYTE *)a2 + *(_QWORD *)(*a2 - 24) + 24) & 0xFFFFFFB5 | 8;
*(_DWORD *)((char *)a2 + *(_QWORD *)(v7 - 24) + 24) |= 0x4000u;
std::ostream::operator<<(a2, (unsigned int)a1);
*(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24) + 24) = v6;
return 1LL;
}
| PrintAsStringLiteralTo:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14D,EDI
CMP EDI,0x21
JG 0x00171f2e
CMP R14D,0xd
JA 0x00171fb3
MOV EAX,R14D
LEA RCX,[0x185078]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[0x186f7e]
JMP 0x00171f98
LAB_00171f2e:
CMP R14D,0x22
JZ 0x00171f88
CMP R14D,0x5c
JZ 0x00171f91
CMP R14D,0x27
JNZ 0x00171fb3
LEA RSI,[0x181918]
JMP 0x00171fc4
caseD_a:
LEA RSI,[0x187892]
JMP 0x00171f98
caseD_c:
LEA RSI,[0x187895]
JMP 0x00171f98
caseD_8:
LEA RSI,[0x18788c]
JMP 0x00171f98
caseD_7:
LEA RSI,[0x188866]
JMP 0x00171f98
caseD_9:
LEA RSI,[0x18788f]
JMP 0x00171f98
caseD_d:
LEA RSI,[0x187898]
JMP 0x00171f98
caseD_b:
LEA RSI,[0x188869]
JMP 0x00171f98
LAB_00171f88:
LEA RSI,[0x188896]
JMP 0x00171f98
LAB_00171f91:
LEA RSI,[0x188863]
LAB_00171f98:
MOV EDX,0x2
MOV RDI,RBX
CALL 0x00111b90
MOV EAX,0x2
LAB_00171faa:
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
caseD_1:
LEA EAX,[R14 + -0x20]
CMP EAX,0x5e
JA 0x00171fd5
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],R14B
LAB_00171fc4:
MOV EDX,0x1
MOV RDI,RBX
CALL 0x00111b90
XOR EAX,EAX
JMP 0x00171faa
LAB_00171fd5:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV EBP,dword ptr [RBX + RAX*0x1 + 0x18]
LEA RSI,[0x18886c]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x00111b90
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + -0x18]
MOV EDX,dword ptr [RBX + RCX*0x1 + 0x18]
AND EDX,0xffffffb5
OR EDX,0x8
MOV dword ptr [RBX + RCX*0x1 + 0x18],EDX
MOV RAX,qword ptr [RAX + -0x18]
OR dword ptr [RBX + RAX*0x1 + 0x18],0x4000
MOV RDI,RBX
MOV ESI,R14D
CALL 0x001113b0
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV dword ptr [RBX + RAX*0x1 + 0x18],EBP
MOV EAX,0x1
JMP 0x00171faa
|
/* testing::internal::PrintAsStringLiteralTo(char32_t, std::ostream*) */
int8 testing::internal::PrintAsStringLiteralTo(wchar32 param_1,ostream *param_2)
{
int4 uVar1;
long lVar2;
long lVar3;
char *pcVar4;
char local_19;
if (param_1 < L'\"') {
switch(param_1) {
case L'\0':
pcVar4 = "\\0";
break;
default:
goto switchD_00171f23_caseD_1;
case L'\a':
pcVar4 = "\\a";
break;
case L'\b':
pcVar4 = "\\b";
break;
case L'\t':
pcVar4 = "\\t";
break;
case L'\n':
pcVar4 = "\\n";
break;
case L'\v':
pcVar4 = "\\v";
break;
case L'\f':
pcVar4 = "\\f";
break;
case L'\r':
pcVar4 = "\\r";
}
LAB_00171f98:
std::__ostream_insert<char,std::char_traits<char>>(param_2,pcVar4,2);
return 2;
}
if (param_1 == L'\"') {
pcVar4 = "\\\"";
goto LAB_00171f98;
}
if (param_1 == L'\\') {
pcVar4 = "\\\\";
goto LAB_00171f98;
}
if (param_1 == L'\'') {
pcVar4 = "\'";
goto LAB_00171fc4;
}
switchD_00171f23_caseD_1:
if (0x5e < (uint)(param_1 + L'\xffffffe0')) {
uVar1 = *(int4 *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x18);
std::__ostream_insert<char,std::char_traits<char>>(param_2,"\\x",2);
lVar2 = *(long *)param_2;
lVar3 = *(long *)(lVar2 + -0x18);
*(uint *)(param_2 + lVar3 + 0x18) = *(uint *)(param_2 + lVar3 + 0x18) & 0xffffffb5 | 8;
*(uint *)(param_2 + *(long *)(lVar2 + -0x18) + 0x18) =
*(uint *)(param_2 + *(long *)(lVar2 + -0x18) + 0x18) | 0x4000;
std::ostream::operator<<(param_2,param_1);
*(int4 *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x18) = uVar1;
return 1;
}
pcVar4 = &local_19;
local_19 = (char)param_1;
LAB_00171fc4:
std::__ostream_insert<char,std::char_traits<char>>(param_2,pcVar4,1);
return 0;
}
| |
41,724 | my_numcells_sjis | eloqsql/strings/ctype-sjis.c | static
size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b >= 0xA1 && *b <= 0xDF)
{
clen++;
b++;
}
else if (*b > 0x7F)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O0 | c | my_numcells_sjis:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x45d3d
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa1, %eax
jl 0x45cf8
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xdf, %eax
jg 0x45cf8
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x45d38
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
jle 0x45d1e
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x45d36
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x45d38
jmp 0x45cb8
movq -0x20(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_numcells_sjis:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov [rbp+var_20], 0
loc_45CB8:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_45D3D
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 0A1h
jl short loc_45CF8
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 0DFh
jg short loc_45CF8
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_45D38
loc_45CF8:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 7Fh
jle short loc_45D1E
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
jmp short loc_45D36
loc_45D1E:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
loc_45D36:
jmp short $+2
loc_45D38:
jmp loc_45CB8
loc_45D3D:
mov rax, [rbp+var_20]
pop rbp
retn
| long long my_numcells_sjis(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long v5; // [rsp+10h] [rbp-20h]
v5 = 0LL;
while ( (unsigned long long)a2 < a3 )
{
if ( *a2 < 0xA1u || *a2 > 0xDFu )
{
if ( *a2 <= 0x7Fu )
{
++v5;
++a2;
}
else
{
v5 += 2LL;
a2 += 2;
}
}
else
{
++v5;
++a2;
}
}
return v5;
}
| my_numcells_sjis:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x20],0x0
LAB_00145cb8:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00145d3d
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xa1
JL 0x00145cf8
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xdf
JG 0x00145cf8
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00145d38
LAB_00145cf8:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x7f
JLE 0x00145d1e
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00145d36
LAB_00145d1e:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_00145d36:
JMP 0x00145d38
LAB_00145d38:
JMP 0x00145cb8
LAB_00145d3d:
MOV RAX,qword ptr [RBP + -0x20]
POP RBP
RET
|
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3)
{
byte *local_30;
long local_28;
local_28 = 0;
local_30 = param_2;
while (local_30 < param_3) {
if ((*local_30 < 0xa1) || (0xdf < *local_30)) {
if (*local_30 < 0x80) {
local_28 = local_28 + 1;
local_30 = local_30 + 1;
}
else {
local_28 = local_28 + 2;
local_30 = local_30 + 2;
}
}
else {
local_28 = local_28 + 1;
local_30 = local_30 + 1;
}
}
return local_28;
}
| |
41,725 | my_numcells_sjis | eloqsql/strings/ctype-sjis.c | static
size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b >= 0xA1 && *b <= 0xDF)
{
clen++;
b++;
}
else if (*b > 0x7F)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O3 | c | my_numcells_sjis:
cmpq %rdx, %rsi
jae 0x391e3
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x1, %ecx
movb (%rsi), %dil
leal 0x5f(%rdi), %r8d
shrb $0x7, %dil
movzbl %dil, %edi
incq %rdi
cmpb $0x3f, %r8b
cmovbq %rcx, %rdi
addq %rdi, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x391bc
popq %rbp
retq
xorl %eax, %eax
retq
| my_numcells_sjis:
cmp rsi, rdx
jnb short loc_391E3
push rbp
mov rbp, rsp
xor eax, eax
mov ecx, 1
loc_391BC:
mov dil, [rsi]
lea r8d, [rdi+5Fh]
shr dil, 7
movzx edi, dil
inc rdi
cmp r8b, 3Fh ; '?'
cmovb rdi, rcx
add rax, rdi
add rsi, rdi
cmp rsi, rdx
jb short loc_391BC
pop rbp
retn
loc_391E3:
xor eax, eax
retn
| long long my_numcells_sjis(long long a1, _BYTE *a2, unsigned long long a3)
{
long long result; // rax
long long v4; // rdi
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = (*a2 >> 7) + 1LL;
if ( (unsigned __int8)(*a2 + 95) < 0x3Fu )
v4 = 1LL;
result += v4;
a2 += v4;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
| my_numcells_sjis:
CMP RSI,RDX
JNC 0x001391e3
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
MOV ECX,0x1
LAB_001391bc:
MOV DIL,byte ptr [RSI]
LEA R8D,[RDI + 0x5f]
SHR DIL,0x7
MOVZX EDI,DIL
INC RDI
CMP R8B,0x3f
CMOVC RDI,RCX
ADD RAX,RDI
ADD RSI,RDI
CMP RSI,RDX
JC 0x001391bc
POP RBP
RET
LAB_001391e3:
XOR EAX,EAX
RET
|
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
if (param_2 < param_3) {
lVar1 = 0;
do {
lVar2 = (ulong)(*param_2 >> 7) + 1;
if ((byte)(*param_2 + 0x5f) < 0x3f) {
lVar2 = 1;
}
lVar1 = lVar1 + lVar2;
param_2 = param_2 + lVar2;
} while (param_2 < param_3);
return lVar1;
}
return 0;
}
| |
41,726 | bitmap_fast_test_and_set | eloqsql/mysys/my_bitmap.c | my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit)
{
uchar *value= ((uchar*) map->bitmap) + (bitmap_bit / 8);
uchar bit= 1 << ((bitmap_bit) & 7);
uchar res= (*value) & bit;
*value|= bit;
return res;
} | O3 | c | bitmap_fast_test_and_set:
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
movl %esi, %edx
andb $0x7, %cl
movl $0x1, %esi
shll %cl, %esi
movq (%rdi), %rcx
shrl $0x3, %edx
movb (%rcx,%rdx), %dil
movl %edi, %eax
andb %sil, %al
orb %sil, %dil
movb %dil, (%rcx,%rdx)
popq %rbp
retq
| bitmap_fast_test_and_set:
push rbp
mov rbp, rsp
mov ecx, esi
mov edx, esi
and cl, 7
mov esi, 1
shl esi, cl
mov rcx, [rdi]
shr edx, 3
mov dil, [rcx+rdx]
mov eax, edi
and al, sil
or dil, sil
mov [rcx+rdx], dil
pop rbp
retn
| char bitmap_fast_test_and_set(long long *a1, unsigned int a2)
{
int v3; // esi
long long v4; // rcx
long long v5; // rdx
char v6; // di
char result; // al
v3 = 1 << (a2 & 7);
v4 = *a1;
v5 = a2 >> 3;
v6 = *(_BYTE *)(*a1 + v5);
result = v3 & v6;
*(_BYTE *)(v4 + v5) = v3 | v6;
return result;
}
| bitmap_fast_test_and_set:
PUSH RBP
MOV RBP,RSP
MOV ECX,ESI
MOV EDX,ESI
AND CL,0x7
MOV ESI,0x1
SHL ESI,CL
MOV RCX,qword ptr [RDI]
SHR EDX,0x3
MOV DIL,byte ptr [RCX + RDX*0x1]
MOV EAX,EDI
AND AL,SIL
OR DIL,SIL
MOV byte ptr [RCX + RDX*0x1],DIL
POP RBP
RET
|
byte bitmap_fast_test_and_set(long *param_1,uint param_2)
{
byte bVar1;
byte bVar2;
bVar1 = *(byte *)(*param_1 + (ulong)(param_2 >> 3));
bVar2 = (byte)(1 << ((byte)param_2 & 7));
*(byte *)(*param_1 + (ulong)(param_2 >> 3)) = bVar1 | bVar2;
return bVar1 & bVar2;
}
| |
41,727 | ma_update_state_lsns_sub | eloqsql/storage/maria/ma_create.c | int _ma_update_state_lsns_sub(MARIA_SHARE *share, LSN lsn, TrID create_trid,
my_bool do_sync,
my_bool update_create_rename_lsn)
{
uchar buf[LSN_STORE_SIZE * 3], *ptr;
uchar trid_buff[8];
File file= share->kfile.file;
DBUG_ENTER("_ma_update_state_lsns_sub");
DBUG_ASSERT(file >= 0);
CRASH_IF_S3_TABLE(share);
if (lsn == LSN_IMPOSSIBLE)
{
int res;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
/* table name is logged only for information */
log_array[TRANSLOG_INTERNAL_PARTS + 0].str=
(uchar *)(share->open_file_name.str);
log_array[TRANSLOG_INTERNAL_PARTS + 0].length=
share->open_file_name.length + 1;
if ((res= translog_write_record(&lsn, LOGREC_IMPORTED_TABLE,
&dummy_transaction_object, NULL,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS +
0].length,
sizeof(log_array)/sizeof(log_array[0]),
log_array, NULL, NULL)))
DBUG_RETURN(res);
}
for (ptr= buf; ptr < (buf + sizeof(buf)); ptr+= LSN_STORE_SIZE)
lsn_store(ptr, lsn);
share->state.skip_redo_lsn= share->state.is_of_horizon= lsn;
share->state.create_trid= create_trid;
mi_int8store(trid_buff, create_trid);
/*
Update create_rename_lsn if update was requested or if the old one had an
impossible value.
*/
if (update_create_rename_lsn ||
(share->state.create_rename_lsn > lsn && lsn != LSN_IMPOSSIBLE))
{
share->state.create_rename_lsn= lsn;
if (share->id != 0)
{
/*
If OP is the operation which is calling us, if table is later written,
we could see in the log:
FILE_ID ... REDO_OP ... REDO_INSERT.
(that can happen in real life at least with OP=REPAIR).
As FILE_ID will be ignored by Recovery because it is <
create_rename_lsn, REDO_INSERT would be ignored too, wrongly.
To avoid that, we force a LOGREC_FILE_ID to be logged at next write:
*/
translog_deassign_id_from_share(share);
}
}
else
lsn_store(buf, share->state.create_rename_lsn);
DBUG_RETURN(my_pwrite(file, buf, sizeof(buf),
sizeof(share->state.header) +
MARIA_FILE_CREATE_RENAME_LSN_OFFSET, MYF(MY_NABP)) ||
my_pwrite(file, trid_buff, sizeof(trid_buff),
sizeof(share->state.header) +
MARIA_FILE_CREATE_TRID_OFFSET, MYF(MY_NABP)) ||
(do_sync && mysql_file_sync(file, MYF(0))));
} | O0 | c | ma_update_state_lsns_sub:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movb %r8b, %al
movq %fs:0x28, %r8
movq %r8, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movb %cl, -0x49(%rbp)
movb %al, -0x4a(%rbp)
movq -0x38(%rbp), %rax
movl 0x760(%rax), %eax
movl %eax, -0x5c(%rbp)
jmp 0x709ec
jmp 0x709ee
jmp 0x709f0
cmpq $0x0, -0x40(%rbp)
jne 0x70a74
movq -0x38(%rbp), %rax
movq 0x5e0(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq 0x5e8(%rax), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl %eax, %r8d
leaq -0x90(%rbp), %rax
leaq -0x40(%rbp), %rdi
movl $0x29, %esi
leaq 0x4091f9(%rip), %rdx # 0x479c30
xorl %ecx, %ecx
movl $0x3, %r9d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x8aba0
movsbl %al, %eax
movl %eax, -0x60(%rbp)
cmpl $0x0, %eax
je 0x70a72
jmp 0x70a67
movl -0x60(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x70d3a
jmp 0x70a74
leaq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
leaq -0x20(%rbp), %rcx
addq $0x15, %rcx
cmpq %rcx, %rax
jae 0x70b08
jmp 0x70a8f
jmp 0x70a91
movq -0x40(%rbp), %rax
sarq $0x20, %rax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, (%rax)
movq -0x40(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x40(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x2(%rax)
jmp 0x70acb
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x98(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, (%rax)
jmp 0x70af5
jmp 0x70af7
movq -0x58(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x58(%rbp)
jmp 0x70a7c
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x180(%rax)
movq -0x38(%rbp), %rax
movq %rcx, 0x188(%rax)
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0xe0(%rax)
movq -0x48(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x48(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movb %al, -0x25(%rbp)
movq -0xb0(%rbp), %rax
shrq $0x8, %rax
movb %al, -0x26(%rbp)
movq -0xb0(%rbp), %rax
shrq $0x10, %rax
movb %al, -0x27(%rbp)
movq -0xb0(%rbp), %rax
shrq $0x18, %rax
movb %al, -0x28(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movb %al, -0x21(%rbp)
movq -0xb8(%rbp), %rax
shrq $0x8, %rax
movb %al, -0x22(%rbp)
movq -0xb8(%rbp), %rax
shrq $0x10, %rax
movb %al, -0x23(%rbp)
movq -0xb8(%rbp), %rax
shrq $0x18, %rax
movb %al, -0x24(%rbp)
movsbl -0x4a(%rbp), %eax
cmpl $0x0, %eax
jne 0x70bf0
movq -0x38(%rbp), %rax
movq 0x178(%rax), %rax
cmpq -0x40(%rbp), %rax
jle 0x70c1a
cmpq $0x0, -0x40(%rbp)
je 0x70c1a
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x178(%rax)
movq -0x38(%rbp), %rax
movzwl 0x620(%rax), %eax
cmpl $0x0, %eax
je 0x70c18
movq -0x38(%rbp), %rdi
callq 0x8da20
jmp 0x70c8f
jmp 0x70c1c
jmp 0x70c1e
movq -0x38(%rbp), %rax
movq 0x178(%rax), %rax
sarq $0x20, %rax
movb %al, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq 0x178(%rax), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, -0x1f(%rbp)
movq -0x38(%rbp), %rax
movq 0x178(%rax), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, -0x1e(%rbp)
jmp 0x70c5c
leaq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xc0(%rbp)
movq -0x38(%rbp), %rcx
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq 0x178(%rcx), %rax
movl %eax, %ecx
movq -0xc0(%rbp), %rax
movl %ecx, (%rax)
jmp 0x70c8d
jmp 0x70c8f
jmp 0x70c91
movl -0x5c(%rbp), %edi
leaq -0x20(%rbp), %rsi
movl $0x15, %edx
movl $0x1c, %ecx
movl $0x4, %r8d
callq 0xf6120
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0xc1(%rbp)
jne 0x70d2c
movl -0x5c(%rbp), %edi
leaq -0x28(%rbp), %rsi
movl $0x8, %edx
movl $0x89, %ecx
movl $0x4, %r8d
callq 0xf6120
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0xc1(%rbp)
jne 0x70d2c
movsbl -0x49(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xc2(%rbp)
je 0x70d20
movl -0x5c(%rbp), %edx
leaq 0xe19f9(%rip), %rdi # 0x1526ff
movl $0x5f1, %esi # imm = 0x5F1
xorl %eax, %eax
movl %eax, %ecx
callq 0x70ec0
cmpl $0x0, %eax
setne %al
movb %al, -0xc2(%rbp)
movb -0xc2(%rbp), %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0xc8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x70d64
movl -0xc8(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
callq 0x29230
nopl (%rax)
| _ma_update_state_lsns_sub:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov al, r8b
mov r8, fs:28h
mov [rbp+var_8], r8
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov [rbp+var_49], cl
mov [rbp+var_4A], al
mov rax, [rbp+var_38]
mov eax, [rax+760h]
mov [rbp+var_5C], eax
jmp short $+2
loc_709EC:
jmp short $+2
loc_709EE:
jmp short $+2
loc_709F0:
cmp [rbp+var_40], 0
jnz short loc_70A74
mov rax, [rbp+var_38]
mov rax, [rax+5E0h]
mov [rbp+var_70], rax
mov rax, [rbp+var_38]
mov rax, [rax+5E8h]
add rax, 1
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov r8d, eax
lea rax, [rbp+var_90]
lea rdi, [rbp+var_40]
mov esi, 29h ; ')'
lea rdx, dummy_transaction_object
xor ecx, ecx
mov r9d, 3
mov [rsp+0E0h+var_E0], rax
mov [rsp+0E0h+var_D8], 0
mov [rsp+0E0h+var_D0], 0
call translog_write_record
movsx eax, al
mov [rbp+var_60], eax
cmp eax, 0
jz short loc_70A72
jmp short $+2
loc_70A67:
mov eax, [rbp+var_60]
mov [rbp+var_2C], eax
jmp loc_70D3A
loc_70A72:
jmp short $+2
loc_70A74:
lea rax, [rbp+var_20]
mov [rbp+var_58], rax
loc_70A7C:
mov rax, [rbp+var_58]
lea rcx, [rbp+var_20]
add rcx, 15h
cmp rax, rcx
jnb short loc_70B08
jmp short $+2
loc_70A8F:
jmp short $+2
loc_70A91:
mov rax, [rbp+var_40]
sar rax, 20h
mov cl, al
mov rax, [rbp+var_58]
mov [rax], cl
mov rax, [rbp+var_40]
sar rax, 20h
shr eax, 8
mov cl, al
mov rax, [rbp+var_58]
mov [rax+1], cl
mov rax, [rbp+var_40]
sar rax, 20h
shr eax, 10h
mov cl, al
mov rax, [rbp+var_58]
mov [rax+2], cl
jmp short $+2
loc_70ACB:
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_98], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_40]
mov ecx, eax
mov rax, [rbp+var_98]
mov [rax], ecx
jmp short $+2
loc_70AF5:
jmp short $+2
loc_70AF7:
mov rax, [rbp+var_58]
add rax, 7
mov [rbp+var_58], rax
jmp loc_70A7C
loc_70B08:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax+180h], rcx
mov rax, [rbp+var_38]
mov [rax+188h], rcx
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax+0E0h], rcx
mov rax, [rbp+var_48]
mov [rbp+var_A0], rax
mov rax, [rbp+var_48]
shr rax, 20h
mov [rbp+var_A8], rax
mov rax, [rbp+var_A8]
mov [rbp+var_B0], rax
mov rax, [rbp+var_B0]
mov [rbp+var_25], al
mov rax, [rbp+var_B0]
shr rax, 8
mov [rbp+var_26], al
mov rax, [rbp+var_B0]
shr rax, 10h
mov [rbp+var_27], al
mov rax, [rbp+var_B0]
shr rax, 18h
mov [rbp+var_28], al
mov rax, [rbp+var_A0]
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
mov [rbp+var_21], al
mov rax, [rbp+var_B8]
shr rax, 8
mov [rbp+var_22], al
mov rax, [rbp+var_B8]
shr rax, 10h
mov [rbp+var_23], al
mov rax, [rbp+var_B8]
shr rax, 18h
mov [rbp+var_24], al
movsx eax, [rbp+var_4A]
cmp eax, 0
jnz short loc_70BF0
mov rax, [rbp+var_38]
mov rax, [rax+178h]
cmp rax, [rbp+var_40]
jle short loc_70C1A
cmp [rbp+var_40], 0
jz short loc_70C1A
loc_70BF0:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax+178h], rcx
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+620h]
cmp eax, 0
jz short loc_70C18
mov rdi, [rbp+var_38]
call translog_deassign_id_from_share
loc_70C18:
jmp short loc_70C8F
loc_70C1A:
jmp short $+2
loc_70C1C:
jmp short $+2
loc_70C1E:
mov rax, [rbp+var_38]
mov rax, [rax+178h]
sar rax, 20h
mov [rbp+var_20], al
mov rax, [rbp+var_38]
mov rax, [rax+178h]
sar rax, 20h
shr eax, 8
mov [rbp+var_1F], al
mov rax, [rbp+var_38]
mov rax, [rax+178h]
sar rax, 20h
shr eax, 10h
mov [rbp+var_1E], al
jmp short $+2
loc_70C5C:
lea rax, [rbp+var_20]
add rax, 3
mov [rbp+var_C0], rax
mov rcx, [rbp+var_38]
mov rax, 0FFFFFFFFh
and rax, [rcx+178h]
mov ecx, eax
mov rax, [rbp+var_C0]
mov [rax], ecx
jmp short $+2
loc_70C8D:
jmp short $+2
loc_70C8F:
jmp short $+2
loc_70C91:
mov edi, [rbp+var_5C]
lea rsi, [rbp+var_20]
mov edx, 15h
mov ecx, 1Ch
mov r8d, 4
call my_pwrite
mov rcx, rax
mov al, 1
cmp rcx, 0
mov [rbp+var_C1], al
jnz short loc_70D2C
mov edi, [rbp+var_5C]
lea rsi, [rbp+var_28]
mov edx, 8
mov ecx, 89h
mov r8d, 4
call my_pwrite
mov rcx, rax
mov al, 1
cmp rcx, 0
mov [rbp+var_C1], al
jnz short loc_70D2C
movsx ecx, [rbp+var_49]
xor eax, eax
cmp ecx, 0
mov [rbp+var_C2], al
jz short loc_70D20
mov edx, [rbp+var_5C]
lea rdi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5F1h
xor eax, eax
mov ecx, eax
call inline_mysql_file_sync_2
cmp eax, 0
setnz al
mov [rbp+var_C2], al
loc_70D20:
mov al, [rbp+var_C2]
mov [rbp+var_C1], al
loc_70D2C:
mov al, [rbp+var_C1]
and al, 1
movzx eax, al
mov [rbp+var_2C], eax
loc_70D3A:
mov eax, [rbp+var_2C]
mov [rbp+var_C8], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_70D64
mov eax, [rbp+var_C8]
add rsp, 0E0h
pop rbp
retn
loc_70D64:
call ___stack_chk_fail
| long long ma_update_state_lsns_sub(long long a1, long long a2, long long a3, char a4, char a5)
{
char v5; // al
long long v6; // rcx
bool v8; // [rsp+1Eh] [rbp-C2h]
char v9; // [rsp+1Fh] [rbp-C1h]
_BYTE v10[32]; // [rsp+50h] [rbp-90h] BYREF
long long v11; // [rsp+70h] [rbp-70h]
long long v12; // [rsp+78h] [rbp-68h]
unsigned int v13; // [rsp+80h] [rbp-60h]
unsigned int v14; // [rsp+84h] [rbp-5Ch]
_BYTE *i; // [rsp+88h] [rbp-58h]
char v16; // [rsp+96h] [rbp-4Ah]
char v17; // [rsp+97h] [rbp-49h]
long long v18; // [rsp+98h] [rbp-48h]
long long v19; // [rsp+A0h] [rbp-40h] BYREF
long long v20; // [rsp+A8h] [rbp-38h]
_BYTE v22[8]; // [rsp+B8h] [rbp-28h] BYREF
_BYTE v23[3]; // [rsp+C0h] [rbp-20h] BYREF
int v24; // [rsp+C3h] [rbp-1Dh]
_BYTE v25[11]; // [rsp+D5h] [rbp-Bh] BYREF
*(_QWORD *)&v25[3] = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v14 = *(_DWORD *)(a1 + 1888);
if ( a2
|| (v11 = *(_QWORD *)(v20 + 1504),
v12 = *(_QWORD *)(v20 + 1512) + 1LL,
v5 = translog_write_record(
(unsigned int)&v19,
41,
(unsigned int)&dummy_transaction_object,
0,
v12,
3,
(long long)v10,
0LL,
0LL),
(v13 = v5) == 0) )
{
for ( i = v23; i < v25; i += 7 )
{
*(_WORD *)i = WORD2(v19);
i[2] = BYTE6(v19);
*(_DWORD *)(i + 3) = v19;
}
v6 = v19;
*(_QWORD *)(v20 + 384) = v19;
*(_QWORD *)(v20 + 392) = v6;
*(_QWORD *)(v20 + 224) = v18;
v22[2] = BYTE5(v18);
v22[3] = BYTE4(v18);
v22[0] = HIBYTE(v18);
v22[1] = BYTE6(v18);
v22[6] = BYTE1(v18);
v22[7] = v18;
v22[4] = BYTE3(v18);
v22[5] = BYTE2(v18);
if ( v16 || *(_QWORD *)(v20 + 376) > v19 && v19 )
{
*(_QWORD *)(v20 + 376) = v19;
if ( *(_WORD *)(v20 + 1568) )
translog_deassign_id_from_share(v20);
}
else
{
v23[0] = BYTE4(*(_QWORD *)(v20 + 376));
v23[1] = (unsigned __int16)WORD2(*(_QWORD *)(v20 + 376)) >> 8;
v23[2] = BYTE6(*(_QWORD *)(v20 + 376));
v24 = *(_QWORD *)(v20 + 376);
}
v9 = 1;
if ( !my_pwrite(v14, v23, 21LL, 28LL, 4LL) )
{
v9 = 1;
if ( !my_pwrite(v14, v22, 8LL, 137LL, 4LL) )
{
v8 = 0;
if ( v17 )
v8 = (unsigned int)inline_mysql_file_sync_2(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
1521LL,
v14,
0LL) != 0;
v9 = v8;
}
}
return v9 & 1;
}
else
{
return v13;
}
}
| _ma_update_state_lsns_sub:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV AL,R8B
MOV R8,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],R8
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV byte ptr [RBP + -0x49],CL
MOV byte ptr [RBP + -0x4a],AL
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x760]
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x001709ec
LAB_001709ec:
JMP 0x001709ee
LAB_001709ee:
JMP 0x001709f0
LAB_001709f0:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x00170a74
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x5e0]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x5e8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV R8D,EAX
LEA RAX,[RBP + -0x90]
LEA RDI,[RBP + -0x40]
MOV ESI,0x29
LEA RDX,[0x579c30]
XOR ECX,ECX
MOV R9D,0x3
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
CALL 0x0018aba0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x60],EAX
CMP EAX,0x0
JZ 0x00170a72
JMP 0x00170a67
LAB_00170a67:
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00170d3a
LAB_00170a72:
JMP 0x00170a74
LAB_00170a74:
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x58],RAX
LAB_00170a7c:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RBP + -0x20]
ADD RCX,0x15
CMP RAX,RCX
JNC 0x00170b08
JMP 0x00170a8f
LAB_00170a8f:
JMP 0x00170a91
LAB_00170a91:
MOV RAX,qword ptr [RBP + -0x40]
SAR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x40]
SAR RAX,0x20
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x40]
SAR RAX,0x20
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX + 0x2],CL
JMP 0x00170acb
LAB_00170acb:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x40]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x98]
MOV dword ptr [RAX],ECX
JMP 0x00170af5
LAB_00170af5:
JMP 0x00170af7
LAB_00170af7:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x7
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00170a7c
LAB_00170b08:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x180],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x188],RCX
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0xe0],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x20
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV byte ptr [RBP + -0x25],AL
MOV RAX,qword ptr [RBP + -0xb0]
SHR RAX,0x8
MOV byte ptr [RBP + -0x26],AL
MOV RAX,qword ptr [RBP + -0xb0]
SHR RAX,0x10
MOV byte ptr [RBP + -0x27],AL
MOV RAX,qword ptr [RBP + -0xb0]
SHR RAX,0x18
MOV byte ptr [RBP + -0x28],AL
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [RBP + -0xb8]
SHR RAX,0x8
MOV byte ptr [RBP + -0x22],AL
MOV RAX,qword ptr [RBP + -0xb8]
SHR RAX,0x10
MOV byte ptr [RBP + -0x23],AL
MOV RAX,qword ptr [RBP + -0xb8]
SHR RAX,0x18
MOV byte ptr [RBP + -0x24],AL
MOVSX EAX,byte ptr [RBP + -0x4a]
CMP EAX,0x0
JNZ 0x00170bf0
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x178]
CMP RAX,qword ptr [RBP + -0x40]
JLE 0x00170c1a
CMP qword ptr [RBP + -0x40],0x0
JZ 0x00170c1a
LAB_00170bf0:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x178],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x620]
CMP EAX,0x0
JZ 0x00170c18
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x0018da20
LAB_00170c18:
JMP 0x00170c8f
LAB_00170c1a:
JMP 0x00170c1c
LAB_00170c1c:
JMP 0x00170c1e
LAB_00170c1e:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x178]
SAR RAX,0x20
MOV byte ptr [RBP + -0x20],AL
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x178]
SAR RAX,0x20
SHR EAX,0x8
MOV byte ptr [RBP + -0x1f],AL
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x178]
SAR RAX,0x20
SHR EAX,0x10
MOV byte ptr [RBP + -0x1e],AL
JMP 0x00170c5c
LAB_00170c5c:
LEA RAX,[RBP + -0x20]
ADD RAX,0x3
MOV qword ptr [RBP + -0xc0],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,0xffffffff
AND RAX,qword ptr [RCX + 0x178]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xc0]
MOV dword ptr [RAX],ECX
JMP 0x00170c8d
LAB_00170c8d:
JMP 0x00170c8f
LAB_00170c8f:
JMP 0x00170c91
LAB_00170c91:
MOV EDI,dword ptr [RBP + -0x5c]
LEA RSI,[RBP + -0x20]
MOV EDX,0x15
MOV ECX,0x1c
MOV R8D,0x4
CALL 0x001f6120
MOV RCX,RAX
MOV AL,0x1
CMP RCX,0x0
MOV byte ptr [RBP + -0xc1],AL
JNZ 0x00170d2c
MOV EDI,dword ptr [RBP + -0x5c]
LEA RSI,[RBP + -0x28]
MOV EDX,0x8
MOV ECX,0x89
MOV R8D,0x4
CALL 0x001f6120
MOV RCX,RAX
MOV AL,0x1
CMP RCX,0x0
MOV byte ptr [RBP + -0xc1],AL
JNZ 0x00170d2c
MOVSX ECX,byte ptr [RBP + -0x49]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0xc2],AL
JZ 0x00170d20
MOV EDX,dword ptr [RBP + -0x5c]
LEA RDI,[0x2526ff]
MOV ESI,0x5f1
XOR EAX,EAX
MOV ECX,EAX
CALL 0x00170ec0
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0xc2],AL
LAB_00170d20:
MOV AL,byte ptr [RBP + -0xc2]
MOV byte ptr [RBP + -0xc1],AL
LAB_00170d2c:
MOV AL,byte ptr [RBP + -0xc1]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x2c],EAX
LAB_00170d3a:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0xc8],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00170d64
MOV EAX,dword ptr [RBP + -0xc8]
ADD RSP,0xe0
POP RBP
RET
LAB_00170d64:
CALL 0x00129230
|
uint _ma_update_state_lsns_sub
(long param_1,long param_2,int8 param_3,char param_4,char param_5)
{
char cVar1;
int iVar2;
long lVar3;
long in_FS_OFFSET;
bool local_ca;
bool local_c9;
int1 local_98 [32];
int8 local_78;
ulong local_70;
uint local_68;
int4 local_64;
int1 *local_60;
char local_52;
char local_51;
int8 local_50;
long local_48;
long local_40;
uint local_34;
int1 local_30;
int1 local_2f;
int1 local_2e;
int1 local_2d;
int1 local_2c;
int1 local_2b;
int1 local_2a;
int1 local_29;
int1 local_28;
int1 local_27;
int1 local_26;
int4 local_25;
int1 auStack_13 [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_64 = *(int4 *)(param_1 + 0x760);
local_52 = param_5;
local_51 = param_4;
local_50 = param_3;
local_48 = param_2;
local_40 = param_1;
if (param_2 == 0) {
local_78 = *(int8 *)(param_1 + 0x5e0);
local_70 = *(long *)(param_1 + 0x5e8) + 1;
cVar1 = translog_write_record
(&local_48,0x29,dummy_transaction_object,0,local_70 & 0xffffffff,3,local_98,0,
0);
local_68 = (uint)cVar1;
local_34 = local_68;
if (local_68 != 0) goto LAB_00170d3a;
}
for (local_60 = &local_28; local_60 < auStack_13; local_60 = local_60 + 7) {
*local_60 = (char)((ulong)local_48 >> 0x20);
local_60[1] = (char)((ulong)local_48 >> 0x28);
local_60[2] = (char)((ulong)local_48 >> 0x30);
*(int *)(local_60 + 3) = (int)local_48;
}
*(long *)(local_40 + 0x180) = local_48;
*(long *)(local_40 + 0x188) = local_48;
*(int8 *)(local_40 + 0xe0) = local_50;
local_2d = (int1)((ulong)local_50 >> 0x20);
local_2e = (int1)((ulong)local_50 >> 0x28);
local_2f = (int1)((ulong)local_50 >> 0x30);
local_30 = (int1)((ulong)local_50 >> 0x38);
local_29 = (int1)local_50;
local_2a = (int1)((ulong)local_50 >> 8);
local_2b = (int1)((ulong)local_50 >> 0x10);
local_2c = (int1)((ulong)local_50 >> 0x18);
if ((local_52 == '\0') && ((*(long *)(local_40 + 0x178) <= local_48 || (local_48 == 0)))) {
local_28 = (int1)((ulong)*(int8 *)(local_40 + 0x178) >> 0x20);
local_27 = (int1)((ulong)*(int8 *)(local_40 + 0x178) >> 0x28);
local_26 = (int1)((ulong)*(int8 *)(local_40 + 0x178) >> 0x30);
local_25 = (int4)*(int8 *)(local_40 + 0x178);
}
else {
*(long *)(local_40 + 0x178) = local_48;
if (*(short *)(local_40 + 0x620) != 0) {
translog_deassign_id_from_share(local_40);
}
}
lVar3 = my_pwrite(local_64,&local_28,0x15,0x1c,4);
local_c9 = true;
if (lVar3 == 0) {
lVar3 = my_pwrite(local_64,&local_30,8,0x89,4);
local_c9 = true;
if (lVar3 == 0) {
local_ca = false;
if (local_51 != '\0') {
iVar2 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
0x5f1,local_64,0);
local_ca = iVar2 != 0;
}
local_c9 = local_ca;
}
}
local_34 = (uint)local_c9;
LAB_00170d3a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_34;
}
| |
41,728 | delete_statistics_for_index(THD*, TABLE*, st_key*, bool) | eloqsql/sql/sql_statistics.cc | int delete_statistics_for_index(THD *thd, TABLE *tab, KEY *key_info,
bool ext_prefixes_only)
{
int err;
enum_binlog_format save_binlog_format;
TABLE *stat_table;
TABLE_LIST tables;
int rc= 0;
DBUG_ENTER("delete_statistics_for_index");
start_new_trans new_trans(thd);
if (open_stat_table_for_ddl(thd, &tables, &stat_table_name[2]))
DBUG_RETURN(0);
save_binlog_format= thd->set_current_stmt_binlog_format_stmt();
stat_table= tables.table;
Index_stat index_stat(stat_table, tab);
if (!ext_prefixes_only)
{
index_stat.set_index_prefix_key_fields(key_info);
while (index_stat.find_next_stat_for_prefix(3))
{
err= index_stat.delete_stat();
if (err && !rc)
rc= 1;
}
}
else
{
for (uint i= key_info->user_defined_key_parts; i < key_info->ext_key_parts; i++)
{
index_stat.set_key_fields(key_info, i+1);
if (index_stat.find_next_stat_for_prefix(4))
{
err= index_stat.delete_stat();
if (err && !rc)
rc= 1;
}
}
}
err= del_global_index_stat(thd, tab, key_info);
if (err && !rc)
rc= 1;
thd->restore_stmt_binlog_format(save_binlog_format);
if (thd->commit_whole_transaction_and_close_tables())
rc= 1;
new_trans.restore_old_transaction();
DBUG_RETURN(rc);
} | O0 | cpp | delete_statistics_for_index(THD*, TABLE*, st_key*, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x1a40, %rsp # imm = 0x1A40
movb %cl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x19d0(%rbp)
movq %rsi, -0x19d8(%rbp)
movq %rdx, -0x19e0(%rbp)
andb $0x1, %al
movb %al, -0x19e1(%rbp)
leaq -0x6e8(%rbp), %rdi
movq %rdi, -0x1a20(%rbp)
callq 0x4e44e0
movl $0x0, -0x19fc(%rbp)
movq -0x19d0(%rbp), %rsi
leaq -0x1930(%rbp), %rdi
callq 0x54c6d0
movq -0x1a20(%rbp), %rsi
movq -0x19d0(%rbp), %rdi
leaq 0xc264f4(%rip), %rdx # 0x12932a0
callq 0x66cc80
movl %eax, -0x1a18(%rbp)
jmp 0x66cdb9
movl -0x1a18(%rbp), %eax
cmpl $0x0, %eax
je 0x66cdf6
jmp 0x66cdc6
movl $0x0, -0x19c4(%rbp)
movl $0x1, -0x1a10(%rbp)
jmp 0x66d075
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a08(%rbp)
movl %eax, -0x1a0c(%rbp)
jmp 0x66d0ae
movq -0x19d0(%rbp), %rdi
callq 0x517180
movl %eax, -0x1a24(%rbp)
jmp 0x66ce0a
movl -0x1a24(%rbp), %eax
movl %eax, -0x19ec(%rbp)
movq -0x5e8(%rbp), %rax
movq %rax, -0x19f8(%rbp)
movq -0x19f8(%rbp), %rsi
movq -0x19d8(%rbp), %rdx
leaq -0x19c0(%rbp), %rdi
callq 0x66fae0
jmp 0x66ce40
testb $0x1, -0x19e1(%rbp)
jne 0x66cef9
movq -0x19e0(%rbp), %rsi
leaq -0x19c0(%rbp), %rdi
callq 0x670090
jmp 0x66ce62
jmp 0x66ce64
leaq -0x19c0(%rbp), %rdi
movl $0x3, %esi
callq 0x66fd20
movb %al, -0x1a25(%rbp)
jmp 0x66ce7d
movb -0x1a25(%rbp), %al
testb $0x1, %al
jne 0x66ce89
jmp 0x66cef4
leaq -0x19c0(%rbp), %rdi
callq 0x66fe60
movb %al, -0x1a26(%rbp)
jmp 0x66ce9d
movb -0x1a26(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x19e8(%rbp)
cmpl $0x0, -0x19e8(%rbp)
je 0x66ceef
cmpl $0x0, -0x19fc(%rbp)
jne 0x66ceef
movl $0x1, -0x19fc(%rbp)
jmp 0x66ceef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a08(%rbp)
movl %eax, -0x1a0c(%rbp)
leaq -0x19c0(%rbp), %rdi
callq 0x66fba0
jmp 0x66d0ae
jmp 0x66ce64
jmp 0x66cfbc
movq -0x19e0(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x1a14(%rbp)
movl -0x1a14(%rbp), %eax
movq -0x19e0(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x66cfba
movq -0x19e0(%rbp), %rsi
movl -0x1a14(%rbp), %edx
incl %edx
leaq -0x19c0(%rbp), %rdi
callq 0x66fb50
jmp 0x66cf3c
leaq -0x19c0(%rbp), %rdi
movl $0x4, %esi
callq 0x66fd20
movb %al, -0x1a27(%rbp)
jmp 0x66cf55
movb -0x1a27(%rbp), %al
testb $0x1, %al
jne 0x66cf61
jmp 0x66cfa4
leaq -0x19c0(%rbp), %rdi
callq 0x66fe60
movb %al, -0x1a28(%rbp)
jmp 0x66cf75
movb -0x1a28(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x19e8(%rbp)
cmpl $0x0, -0x19e8(%rbp)
je 0x66cfa2
cmpl $0x0, -0x19fc(%rbp)
jne 0x66cfa2
movl $0x1, -0x19fc(%rbp)
jmp 0x66cfa4
jmp 0x66cfa6
movl -0x1a14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1a14(%rbp)
jmp 0x66cf09
jmp 0x66cfbc
movq -0x19d0(%rbp), %rdi
movq -0x19d8(%rbp), %rsi
movq -0x19e0(%rbp), %rdx
callq 0x8ea150
movl %eax, -0x1a2c(%rbp)
jmp 0x66cfde
movl -0x1a2c(%rbp), %eax
movl %eax, -0x19e8(%rbp)
cmpl $0x0, -0x19e8(%rbp)
je 0x66d006
cmpl $0x0, -0x19fc(%rbp)
jne 0x66d006
movl $0x1, -0x19fc(%rbp)
movq -0x19d0(%rbp), %rdi
movl -0x19ec(%rbp), %esi
callq 0x5171d0
jmp 0x66d01a
movq -0x19d0(%rbp), %rdi
callq 0x54c610
movl %eax, -0x1a30(%rbp)
jmp 0x66d02e
movl -0x1a30(%rbp), %eax
cmpl $0x0, %eax
je 0x66d043
movl $0x1, -0x19fc(%rbp)
leaq -0x1930(%rbp), %rdi
callq 0x54c8d0
jmp 0x66d051
jmp 0x66d053
movl -0x19fc(%rbp), %eax
movl %eax, -0x19c4(%rbp)
movl $0x1, -0x1a10(%rbp)
leaq -0x19c0(%rbp), %rdi
callq 0x66fba0
leaq -0x1930(%rbp), %rdi
callq 0x667850
movl -0x19c4(%rbp), %eax
movl %eax, -0x1a34(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x66d0e6
movl -0x1a34(%rbp), %eax
addq $0x1a40, %rsp # imm = 0x1A40
popq %rbp
retq
leaq -0x1930(%rbp), %rdi
callq 0x667850
movq -0x1a08(%rbp), %rax
movq %rax, -0x1a40(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x66d0e6
movq -0x1a40(%rbp), %rdi
callq 0x433ff0
callq 0x433650
nopl (%rax,%rax)
| _Z27delete_statistics_for_indexP3THDP5TABLEP6st_keyb:
push rbp
mov rbp, rsp
sub rsp, 1A40h
mov al, cl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_19D0], rdi
mov [rbp+var_19D8], rsi
mov [rbp+var_19E0], rdx
and al, 1
mov [rbp+var_19E1], al
lea rdi, [rbp+var_6E8]; this
mov [rbp+var_1A20], rdi
call _ZN10TABLE_LISTC2Ev; TABLE_LIST::TABLE_LIST(void)
mov [rbp+var_19FC], 0
mov rsi, [rbp+var_19D0]; THD *
lea rdi, [rbp+var_1930]; this
call _ZN15start_new_transC2EP3THD; start_new_trans::start_new_trans(THD *)
mov rsi, [rbp+var_1A20]
mov rdi, [rbp+var_19D0]
lea rdx, off_12932A0; "index_stats"
call _ZL23open_stat_table_for_ddlP3THDP10TABLE_LISTPK25st_mysql_const_lex_string; open_stat_table_for_ddl(THD *,TABLE_LIST *,st_mysql_const_lex_string const*)
mov [rbp+var_1A18], eax
jmp short $+2
loc_66CDB9:
mov eax, [rbp+var_1A18]
cmp eax, 0
jz short loc_66CDF6
jmp short $+2
loc_66CDC6:
mov [rbp+var_19C4], 0
mov [rbp+var_1A10], 1
jmp loc_66D075
mov rcx, rax
mov eax, edx
mov [rbp+var_1A08], rcx
mov [rbp+var_1A0C], eax
jmp loc_66D0AE
loc_66CDF6:
mov rdi, [rbp+var_19D0]; this
call _ZN3THD35set_current_stmt_binlog_format_stmtEv; THD::set_current_stmt_binlog_format_stmt(void)
mov [rbp+var_1A24], eax
jmp short $+2
loc_66CE0A:
mov eax, [rbp+var_1A24]
mov [rbp+var_19EC], eax
mov rax, [rbp+var_5E8]
mov [rbp+var_19F8], rax
mov rsi, [rbp+var_19F8]; TABLE *
mov rdx, [rbp+var_19D8]; TABLE *
lea rdi, [rbp+var_19C0]; this
call _ZN10Index_statC2EP5TABLES1_; Index_stat::Index_stat(TABLE *,TABLE *)
jmp short $+2
loc_66CE40:
test [rbp+var_19E1], 1
jnz loc_66CEF9
mov rsi, [rbp+var_19E0]
lea rdi, [rbp+var_19C0]
call _ZN10Index_stat27set_index_prefix_key_fieldsEP6st_key; Index_stat::set_index_prefix_key_fields(st_key *)
jmp short $+2
loc_66CE62:
jmp short $+2
loc_66CE64:
lea rdi, [rbp+var_19C0]; this
mov esi, 3; unsigned int
call _ZN10Stat_table25find_next_stat_for_prefixEj; Stat_table::find_next_stat_for_prefix(uint)
mov [rbp+var_1A25], al
jmp short $+2
loc_66CE7D:
mov al, [rbp+var_1A25]
test al, 1
jnz short loc_66CE89
jmp short loc_66CEF4
loc_66CE89:
lea rdi, [rbp+var_19C0]; this
call _ZN10Stat_table11delete_statEv; Stat_table::delete_stat(void)
mov [rbp+var_1A26], al
jmp short $+2
loc_66CE9D:
mov al, [rbp+var_1A26]
and al, 1
movzx eax, al
mov [rbp+var_19E8], eax
cmp [rbp+var_19E8], 0
jz short loc_66CEEF
cmp [rbp+var_19FC], 0
jnz short loc_66CEEF
mov [rbp+var_19FC], 1
jmp short loc_66CEEF
mov rcx, rax
mov eax, edx
mov [rbp+var_1A08], rcx
mov [rbp+var_1A0C], eax
lea rdi, [rbp+var_19C0]; this
call _ZN10Index_statD2Ev; Index_stat::~Index_stat()
jmp loc_66D0AE
loc_66CEEF:
jmp loc_66CE64
loc_66CEF4:
jmp loc_66CFBC
loc_66CEF9:
mov rax, [rbp+var_19E0]
mov eax, [rax+10h]
mov [rbp+var_1A14], eax
loc_66CF09:
mov eax, [rbp+var_1A14]
mov rcx, [rbp+var_19E0]
cmp eax, [rcx+18h]
jnb loc_66CFBA
mov rsi, [rbp+var_19E0]; st_key *
mov edx, [rbp+var_1A14]
inc edx; unsigned int
lea rdi, [rbp+var_19C0]; this
call _ZN10Index_stat14set_key_fieldsEP6st_keyj; Index_stat::set_key_fields(st_key *,uint)
jmp short $+2
loc_66CF3C:
lea rdi, [rbp+var_19C0]; this
mov esi, 4; unsigned int
call _ZN10Stat_table25find_next_stat_for_prefixEj; Stat_table::find_next_stat_for_prefix(uint)
mov [rbp+var_1A27], al
jmp short $+2
loc_66CF55:
mov al, [rbp+var_1A27]
test al, 1
jnz short loc_66CF61
jmp short loc_66CFA4
loc_66CF61:
lea rdi, [rbp+var_19C0]; this
call _ZN10Stat_table11delete_statEv; Stat_table::delete_stat(void)
mov [rbp+var_1A28], al
jmp short $+2
loc_66CF75:
mov al, [rbp+var_1A28]
and al, 1
movzx eax, al
mov [rbp+var_19E8], eax
cmp [rbp+var_19E8], 0
jz short loc_66CFA2
cmp [rbp+var_19FC], 0
jnz short loc_66CFA2
mov [rbp+var_19FC], 1
loc_66CFA2:
jmp short $+2
loc_66CFA4:
jmp short $+2
loc_66CFA6:
mov eax, [rbp+var_1A14]
add eax, 1
mov [rbp+var_1A14], eax
jmp loc_66CF09
loc_66CFBA:
jmp short $+2
loc_66CFBC:
mov rdi, [rbp+var_19D0]; THD *
mov rsi, [rbp+var_19D8]; TABLE *
mov rdx, [rbp+var_19E0]; st_key *
call _Z21del_global_index_statP3THDP5TABLEP6st_key; del_global_index_stat(THD *,TABLE *,st_key *)
mov [rbp+var_1A2C], eax
jmp short $+2
loc_66CFDE:
mov eax, [rbp+var_1A2C]
mov [rbp+var_19E8], eax
cmp [rbp+var_19E8], 0
jz short loc_66D006
cmp [rbp+var_19FC], 0
jnz short loc_66D006
mov [rbp+var_19FC], 1
loc_66D006:
mov rdi, [rbp+var_19D0]
mov esi, [rbp+var_19EC]
call _ZN3THD26restore_stmt_binlog_formatE18enum_binlog_format; THD::restore_stmt_binlog_format(enum_binlog_format)
jmp short $+2
loc_66D01A:
mov rdi, [rbp+var_19D0]; this
call _ZN3THD41commit_whole_transaction_and_close_tablesEv; THD::commit_whole_transaction_and_close_tables(void)
mov [rbp+var_1A30], eax
jmp short $+2
loc_66D02E:
mov eax, [rbp+var_1A30]
cmp eax, 0
jz short loc_66D043
mov [rbp+var_19FC], 1
loc_66D043:
lea rdi, [rbp+var_1930]; this
call _ZN15start_new_trans23restore_old_transactionEv; start_new_trans::restore_old_transaction(void)
jmp short $+2
loc_66D051:
jmp short $+2
loc_66D053:
mov eax, [rbp+var_19FC]
mov [rbp+var_19C4], eax
mov [rbp+var_1A10], 1
lea rdi, [rbp+var_19C0]; this
call _ZN10Index_statD2Ev; Index_stat::~Index_stat()
loc_66D075:
lea rdi, [rbp+var_1930]; this
call _ZN15start_new_transD2Ev; start_new_trans::~start_new_trans()
mov eax, [rbp+var_19C4]
mov [rbp+var_1A34], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_66D0E6
mov eax, [rbp+var_1A34]
add rsp, 1A40h
pop rbp
retn
loc_66D0AE:
lea rdi, [rbp+var_1930]; this
call _ZN15start_new_transD2Ev; start_new_trans::~start_new_trans()
mov rax, [rbp+var_1A08]
mov [rbp+var_1A40], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_66D0E6
mov rdi, [rbp+var_1A40]
call __Unwind_Resume
loc_66D0E6:
call ___stack_chk_fail
| long long delete_statistics_for_index(THD *a1, TABLE *a2, st_key *a3, char a4)
{
unsigned int i; // [rsp+2Ch] [rbp-1A14h]
int v6; // [rsp+44h] [rbp-19FCh]
int v7; // [rsp+54h] [rbp-19ECh]
char v8; // [rsp+5Fh] [rbp-19E1h]
unsigned int v10; // [rsp+7Ch] [rbp-19C4h]
_BYTE v11[144]; // [rsp+80h] [rbp-19C0h] BYREF
_BYTE v12[4680]; // [rsp+110h] [rbp-1930h] BYREF
_BYTE v13[256]; // [rsp+1358h] [rbp-6E8h] BYREF
TABLE *v14; // [rsp+1458h] [rbp-5E8h]
unsigned long long v15; // [rsp+1A38h] [rbp-8h]
v15 = __readfsqword(0x28u);
v8 = a4 & 1;
TABLE_LIST::TABLE_LIST((TABLE_LIST *)v13);
v6 = 0;
start_new_trans::start_new_trans((start_new_trans *)v12, a1);
if ( (unsigned int)open_stat_table_for_ddl(a1, (TABLE_LIST *)v13, &off_12932A0) )
{
v10 = 0;
}
else
{
v7 = THD::set_current_stmt_binlog_format_stmt(a1);
Index_stat::Index_stat((Index_stat *)v11, v14, a2);
if ( (v8 & 1) != 0 )
{
for ( i = *((_DWORD *)a3 + 4); i < *((_DWORD *)a3 + 6); ++i )
{
Index_stat::set_key_fields((Index_stat *)v11, a3, i + 1);
if ( (Stat_table::find_next_stat_for_prefix((Stat_table *)v11, 4u) & 1) != 0
&& (Stat_table::delete_stat((Stat_table *)v11) & 1) != 0
&& !v6 )
{
v6 = 1;
}
}
}
else
{
Index_stat::set_index_prefix_key_fields((Index_stat *)v11, a3);
while ( (Stat_table::find_next_stat_for_prefix((Stat_table *)v11, 3u) & 1) != 0 )
{
if ( (Stat_table::delete_stat((Stat_table *)v11) & 1) != 0 && !v6 )
v6 = 1;
}
}
if ( (unsigned int)del_global_index_stat(a1, a2, a3) && !v6 )
v6 = 1;
THD::restore_stmt_binlog_format((long long)a1, v7);
if ( (unsigned int)THD::commit_whole_transaction_and_close_tables(a1) )
v6 = 1;
start_new_trans::restore_old_transaction((start_new_trans *)v12);
v10 = v6;
Index_stat::~Index_stat((Index_stat *)v11);
}
start_new_trans::~start_new_trans((start_new_trans *)v12);
return v10;
}
| set:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
/* Sql_user_condition_identity::set(Sql_user_condition_identity const&) */
void __thiscall
Sql_user_condition_identity::set
(Sql_user_condition_identity *this,Sql_user_condition_identity *param_1)
{
*(int8 *)this = *(int8 *)param_1;
return;
}
| |
41,729 | sockaddr_ll const* Address::as<sockaddr_ll>() const | minnow/util/address.cc | const sockaddr_type* Address::as() const
{
const sockaddr* raw { _address };
if ( sizeof( sockaddr_type ) < size() or raw->sa_family != sockaddr_family<sockaddr_type> ) {
throw runtime_error( "Address::as() conversion failure" );
}
return reinterpret_cast<const sockaddr_type*>( raw ); // NOLINT(*-reinterpret-cast)
} | O0 | cpp | sockaddr_ll const* Address::as<sockaddr_ll>() const:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x8, %rdi
callq 0xd9b0
movq -0x28(%rbp), %rdi
movq %rax, -0x10(%rbp)
callq 0xf0e0
movl %eax, %eax
movl %eax, %ecx
movl $0x14, %eax
cmpq %rcx, %rax
jb 0xf1e4
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x11, %eax
je 0xf234
movl $0x10, %edi
callq 0x5140
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
leaq 0xc29e(%rip), %rsi # 0x1b49d
callq 0x50e0
jmp 0xf206
movq -0x30(%rbp), %rdi
movq 0x19dc7(%rip), %rsi # 0x28fd8
movq 0x19d78(%rip), %rdx # 0x28f90
callq 0x53d0
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x51f0
jmp 0xf23e
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x53f0
nopw (%rax,%rax)
| _ZNK7Address2asI11sockaddr_llEEPKT_v:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov [rbp+var_28], rdi
add rdi, 8
call _ZNK7Address3RawcvPK8sockaddrEv; Address::Raw::operator sockaddr const*(void)
mov rdi, [rbp+var_28]; this
mov [rbp+var_10], rax
call _ZNK7Address4sizeEv; Address::size(void)
mov eax, eax
mov ecx, eax
mov eax, 14h
cmp rax, rcx
jb short loc_F1E4
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
cmp eax, 11h
jz short loc_F234
loc_F1E4:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_30], rax
lea rsi, aAddressAsConve; "Address::as() conversion failure"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_F206:
mov rdi, [rbp+var_30]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rbp+var_30]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
call ___cxa_free_exception
jmp short loc_F23E
loc_F234:
mov rax, [rbp+var_10]
add rsp, 30h
pop rbp
retn
loc_F23E:
mov rdi, [rbp+var_18]
call __Unwind_Resume
| _WORD * Address::as<sockaddr_ll>(Address *a1)
{
std::runtime_error *exception; // [rsp+0h] [rbp-30h]
_WORD *v3; // [rsp+20h] [rbp-10h]
v3 = (_WORD *)Address::Raw::operator sockaddr const*((long long)a1 + 8);
if ( (unsigned int)Address::size(a1) > 0x14uLL || *v3 != 17 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Address::as() conversion failure");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return v3;
}
| as<sockaddr_ll>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RDI
ADD RDI,0x8
CALL 0x0010d9b0
MOV RDI,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x10],RAX
CALL 0x0010f0e0
MOV EAX,EAX
MOV ECX,EAX
MOV EAX,0x14
CMP RAX,RCX
JC 0x0010f1e4
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
CMP EAX,0x11
JZ 0x0010f234
LAB_0010f1e4:
MOV EDI,0x10
CALL 0x00105140
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x30],RAX
LAB_0010f1f8:
LEA RSI,[0x11b49d]
CALL 0x001050e0
LAB_0010f204:
JMP 0x0010f206
LAB_0010f206:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [0x00128fd8]
MOV RDX,qword ptr [0x00128f90]
CALL 0x001053d0
LAB_0010f234:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x30
POP RBP
RET
|
/* sockaddr_ll const* Address::as<sockaddr_ll>() const */
sockaddr_ll * __thiscall Address::as<sockaddr_ll>(Address *this)
{
uint uVar1;
sockaddr *psVar2;
runtime_error *this_00;
psVar2 = Raw::operator_cast_to_sockaddr_((Raw *)(this + 8));
uVar1 = size(this);
if ((uVar1 < 0x15) && (psVar2->sa_family == 0x11)) {
return (sockaddr_ll *)psVar2;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0010f1f8 to 0010f203 has its CatchHandler @ 0010f21d */
std::runtime_error::runtime_error(this_00,"Address::as() conversion failure");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00128fd8,PTR__runtime_error_00128f90);
}
| |
41,730 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::decode(unsigned char&, unsigned int&, unsigned char) | llama.cpp/common/json.hpp | static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept
{
static const std::array<std::uint8_t, 400> utf8d =
{
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF
8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF
0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF
0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF
0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2
1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4
1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6
1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8
}
};
JSON_ASSERT(byte < utf8d.size());
const std::uint8_t type = utf8d[byte];
codep = (state != UTF8_ACCEPT)
? (byte & 0x3fu) | (codep << 6u)
: (0xFFu >> type) & (byte);
const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
JSON_ASSERT(index < utf8d.size());
state = utf8d[index];
return state;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::decode(unsigned char&, unsigned int&, unsigned char):
pushq %rax
movl %edx, %ecx
leaq 0xa0311(%rip), %rax # 0x144309
movzbl (%rax,%rcx), %ecx
cmpb $0x0, (%rdi)
je 0xa4012
andb $0x3f, %dl
movzbl %dl, %r8d
movl (%rsi), %edx
shll $0x6, %edx
orl %r8d, %edx
jmp 0xa4021
movl $0xff, %r8d
shrl %cl, %r8d
movzbl %dl, %edx
andl %r8d, %edx
movl %edx, (%rsi)
movzbl (%rdi), %edx
shll $0x4, %edx
movl %ecx, %ecx
addq %rdx, %rcx
addq $0x100, %rcx # imm = 0x100
cmpq $0x190, %rcx # imm = 0x190
jae 0xa4045
movb (%rax,%rcx), %al
movb %al, (%rdi)
popq %rcx
retq
leaq 0x9d1db(%rip), %rdi # 0x141227
leaq 0x94782(%rip), %rdx # 0x1387d5
leaq 0x9e5a0(%rip), %rcx # 0x1425fa
movl $0x49fb, %esi # imm = 0x49FB
xorl %eax, %eax
callq 0x24340
movq %rax, %rdi
callq 0x2c93b
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjh:
push rax
mov ecx, edx
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjhE5utf8d; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::decode(uchar &,uint &,uchar)::utf8d
movzx ecx, byte ptr [rax+rcx]
cmp byte ptr [rdi], 0
jz short loc_A4012
and dl, 3Fh
movzx r8d, dl
mov edx, [rsi]
shl edx, 6
or edx, r8d
jmp short loc_A4021
loc_A4012:
mov r8d, 0FFh
shr r8d, cl
movzx edx, dl
and edx, r8d
loc_A4021:
mov [rsi], edx
movzx edx, byte ptr [rdi]
shl edx, 4
mov ecx, ecx
add rcx, rdx
add rcx, 100h
cmp rcx, 190h
jnb short loc_A4045
mov al, [rax+rcx]
mov [rdi], al
pop rcx
retn
loc_A4045:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndexUtf8dSize; "index < utf8d.size()"
mov esi, 49FBh
xor eax, eax
call _ggml_abort
mov rdi, rax
call __clang_call_terminate
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(
unsigned __int8 *a1,
unsigned int *a2,
int a3)
{
unsigned int v3; // ecx
unsigned int v4; // edx
unsigned long long v5; // rcx
unsigned __int8 result; // al
void *v7; // rax
v3 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[a3];
if ( *a1 )
v4 = a3 & 0x3F | (*a2 << 6);
else
v4 = (0xFFu >> v3) & (unsigned __int8)a3;
*a2 = v4;
v5 = 16 * (unsigned int)*a1 + (unsigned long long)v3 + 256;
if ( v5 >= 0x190 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
18939LL,
"GGML_ASSERT(%s) failed",
"index < utf8d.size()");
_clang_call_terminate(v7);
}
result = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[v5];
*a1 = result;
return result;
}
| decode:
PUSH RAX
MOV ECX,EDX
LEA RAX,[0x244309]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
CMP byte ptr [RDI],0x0
JZ 0x001a4012
AND DL,0x3f
MOVZX R8D,DL
MOV EDX,dword ptr [RSI]
SHL EDX,0x6
OR EDX,R8D
JMP 0x001a4021
LAB_001a4012:
MOV R8D,0xff
SHR R8D,CL
MOVZX EDX,DL
AND EDX,R8D
LAB_001a4021:
MOV dword ptr [RSI],EDX
MOVZX EDX,byte ptr [RDI]
SHL EDX,0x4
MOV ECX,ECX
ADD RCX,RDX
ADD RCX,0x100
CMP RCX,0x190
JNC 0x001a4045
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDI],AL
POP RCX
RET
LAB_001a4045:
LEA RDI,[0x241227]
LEA RDX,[0x2387d5]
LEA RCX,[0x2425fa]
MOV ESI,0x49fb
XOR EAX,EAX
CALL 0x00124340
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::decode(unsigned char&, unsigned int&, unsigned char) */
void nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::decode(uchar *param_1,uint *param_2,uchar param_3)
{
byte bVar1;
long lVar2;
uint uVar3;
int7 in_register_00000011;
bVar1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d
[CONCAT71(in_register_00000011,param_3) & 0xffffffff];
if (*param_1 == '\0') {
uVar3 = (uint)param_3 & 0xffU >> (bVar1 & 0x1f);
}
else {
uVar3 = *param_2 << 6 | (uint)(param_3 & 0x3f);
}
*param_2 = uVar3;
lVar2 = (ulong)bVar1 + (ulong)*param_1 * 0x10;
if (lVar2 + 0x100U < 400) {
*param_1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d[lVar2 + 0x100];
return;
}
/* try { // try from 001a4045 to 001a4065 has its CatchHandler @ 001a4066 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x49fb,
"GGML_ASSERT(%s) failed","index < utf8d.size()");
}
| |
41,731 | google::protobuf::internal::ReadTagFallback(char const*, unsigned int) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.cc | std::pair<const char*, uint32_t> ReadTagFallback(const char* p, uint32_t res) {
for (std::uint32_t i = 2; i < 5; i++) {
uint32_t byte = static_cast<uint8_t>(p[i]);
res += (byte - 1) << (7 * i);
if (PROTOBUF_PREDICT_TRUE(byte < 128)) {
return {p + i + 1, res};
}
}
return {nullptr, 0};
} | O3 | cpp | google::protobuf::internal::ReadTagFallback(char const*, unsigned int):
movl %esi, %edx
movq %rdi, %rax
addq $0x3, %rax
movq $-0x15, %rsi
movl %edx, %edi
movzbl -0x1(%rax), %r8d
movl %r8d, %edx
decl %edx
leal 0x23(%rsi), %ecx
shll %cl, %edx
addl %edi, %edx
testb %r8b, %r8b
jns 0x7cec3
incq %rax
addq $0x7, %rsi
jne 0x7ce9e
xorl %eax, %eax
xorl %edx, %edx
retq
| _ZN6google8protobuf8internal15ReadTagFallbackEPKcj:
mov edx, esi
mov rax, rdi
add rax, 3
mov rsi, 0FFFFFFFFFFFFFFEBh
loc_7CE9E:
mov edi, edx
movzx r8d, byte ptr [rax-1]
mov edx, r8d
dec edx
lea ecx, [rsi+23h]
shl edx, cl
add edx, edi
test r8b, r8b
jns short locret_7CEC3
inc rax
add rsi, 7
jnz short loc_7CE9E
xor eax, eax
xor edx, edx
locret_7CEC3:
retn
| long long google::protobuf::internal::ReadTagFallback(google::protobuf::internal *this, const char *a2)
{
int v2; // edx
long long result; // rax
long long v4; // rsi
v2 = (int)a2;
result = (long long)this + 3;
v4 = -21LL;
while ( 1 )
{
v2 += (*(unsigned __int8 *)(result - 1) - 1) << (v4 + 35);
if ( *(char *)(result - 1) >= 0 )
break;
++result;
v4 += 7LL;
if ( !v4 )
return 0LL;
}
return result;
}
| ReadTagFallback:
MOV EDX,ESI
MOV RAX,RDI
ADD RAX,0x3
MOV RSI,-0x15
LAB_0017ce9e:
MOV EDI,EDX
MOVZX R8D,byte ptr [RAX + -0x1]
MOV EDX,R8D
DEC EDX
LEA ECX,[RSI + 0x23]
SHL EDX,CL
ADD EDX,EDI
TEST R8B,R8B
JNS 0x0017cec3
INC RAX
ADD RSI,0x7
JNZ 0x0017ce9e
XOR EAX,EAX
XOR EDX,EDX
LAB_0017cec3:
RET
|
/* google::protobuf::internal::ReadTagFallback(char const*, unsigned int) */
int1 [16] google::protobuf::internal::ReadTagFallback(char *param_1,uint param_2)
{
char *pcVar1;
ulong uVar2;
long lVar3;
int1 auVar4 [16];
uVar2 = (ulong)param_2;
pcVar1 = param_1 + 3;
lVar3 = -0x15;
do {
uVar2 = (ulong)(((byte)pcVar1[-1] - 1 << ((char)lVar3 + 0x23U & 0x1f)) + (int)uVar2);
if (-1 < pcVar1[-1]) goto LAB_0017cec3;
pcVar1 = pcVar1 + 1;
lVar3 = lVar3 + 7;
} while (lVar3 != 0);
pcVar1 = (char *)0x0;
uVar2 = 0;
LAB_0017cec3:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = pcVar1;
return auVar4;
}
| |
41,732 | JS_AtomGetStrRT | bluesky950520[P]quickjs/quickjs.c | static const char *JS_AtomGetStrRT(JSRuntime *rt, char *buf, int buf_size,
JSAtom atom)
{
if (__JS_AtomIsTaggedInt(atom)) {
snprintf(buf, buf_size, "%u", __JS_AtomToUInt32(atom));
} else if (atom == JS_ATOM_NULL) {
snprintf(buf, buf_size, "<null>");
} else if (atom >= rt->atom_size) {
assert(atom < rt->atom_size);
snprintf(buf, buf_size, "<invalid %x>", atom);
} else {
JSAtomStruct *p = rt->atom_array[atom];
*buf = '\0';
if (atom_is_free(p)) {
assert(!atom_is_free(p));
snprintf(buf, buf_size, "<free %x>", atom);
} else if (p != NULL) {
JSString *str = p;
if (str->is_wide_char) {
/* encode surrogates correctly */
utf8_encode_buf16(buf, buf_size, str->u.str16, str->len);
} else {
/* special case ASCII strings */
int i, c = 0;
for(i = 0; i < str->len; i++) {
c |= str->u.str8[i];
}
if (c < 0x80)
return (const char *)str->u.str8;
utf8_encode_buf8(buf, buf_size, str->u.str8, str->len);
}
}
}
return buf;
} | O0 | c | JS_AtomGetStrRT:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movl %ecx, 0x28(%rsp)
movl 0x28(%rsp), %edi
callq 0x360c0
cmpl $0x0, %eax
je 0x2cd0e
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movslq 0x2c(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x28(%rsp), %edi
callq 0x360e0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %eax, %ecx
leaq 0xe1c77(%rip), %rdx # 0x10e979
movb $0x0, %al
callq 0xe2d0
jmp 0x2cea5
cmpl $0x0, 0x28(%rsp)
jne 0x2cd32
movq 0x30(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
leaq 0xe1241(%rip), %rdx # 0x10df67
movb $0x0, %al
callq 0xe2d0
jmp 0x2cea3
movl 0x28(%rsp), %eax
movq 0x38(%rsp), %rcx
cmpl 0x58(%rcx), %eax
jb 0x2cd61
movq 0x30(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
movl 0x28(%rsp), %ecx
leaq 0xe1219(%rip), %rdx # 0x10df6e
movb $0x0, %al
callq 0xe2d0
jmp 0x2cea1
movq 0x38(%rsp), %rax
movq 0x68(%rax), %rax
movl 0x28(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movb $0x0, (%rax)
movq 0x20(%rsp), %rdi
callq 0x23dd0
cmpl $0x0, %eax
je 0x2cdaf
movq 0x30(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
movl 0x28(%rsp), %ecx
leaq 0xe11d8(%rip), %rdx # 0x10df7b
movb $0x0, %al
callq 0xe2d0
jmp 0x2ce9f
cmpq $0x0, 0x20(%rsp)
je 0x2ce9d
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
je 0x2ce0a
movq 0x30(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq $0x18, %rdx
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %ecx
callq 0x1f430
jmp 0x2ce9b
movl $0x0, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jge 0x2ce56
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movzbl 0x18(%rax,%rcx), %eax
orl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2ce1a
cmpl $0x80, 0x10(%rsp)
jge 0x2ce70
movq 0x18(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x40(%rsp)
jmp 0x2ceaf
movq 0x30(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq $0x18, %rdx
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %ecx
callq 0x1f290
jmp 0x2ce9d
jmp 0x2ce9f
jmp 0x2cea1
jmp 0x2cea3
jmp 0x2cea5
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
| JS_AtomGetStrRT:
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 edi, [rsp+48h+var_20]
call __JS_AtomIsTaggedInt
cmp eax, 0
jz short loc_2CD0E
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_48], rax
movsxd rax, [rsp+48h+var_1C]
mov [rsp+48h+var_40], rax
mov edi, [rsp+48h+var_20]
call __JS_AtomToUInt32
mov rdi, [rsp+48h+var_48]
mov rsi, [rsp+48h+var_40]
mov ecx, eax
lea rdx, aUnreasonableAt+19h; "%u"
mov al, 0
call _snprintf
jmp loc_2CEA5
loc_2CD0E:
cmp [rsp+48h+var_20], 0
jnz short loc_2CD32
mov rdi, [rsp+48h+var_18]
movsxd rsi, [rsp+48h+var_1C]
lea rdx, aNull; "<null>"
mov al, 0
call _snprintf
jmp loc_2CEA3
loc_2CD32:
mov eax, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_10]
cmp eax, [rcx+58h]
jb short loc_2CD61
mov rdi, [rsp+48h+var_18]
movsxd rsi, [rsp+48h+var_1C]
mov ecx, [rsp+48h+var_20]
lea rdx, aInvalidX; "<invalid %x>"
mov al, 0
call _snprintf
jmp loc_2CEA1
loc_2CD61:
mov rax, [rsp+48h+var_10]
mov rax, [rax+68h]
mov ecx, [rsp+48h+var_20]
mov rax, [rax+rcx*8]
mov [rsp+48h+var_28], rax
mov rax, [rsp+48h+var_18]
mov byte ptr [rax], 0
mov rdi, [rsp+48h+var_28]
call atom_is_free
cmp eax, 0
jz short loc_2CDAF
mov rdi, [rsp+48h+var_18]
movsxd rsi, [rsp+48h+var_1C]
mov ecx, [rsp+48h+var_20]
lea rdx, aFreeX; "<free %x>"
mov al, 0
call _snprintf
jmp loc_2CE9F
loc_2CDAF:
cmp [rsp+48h+var_28], 0
jz loc_2CE9D
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_30]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
jz short loc_2CE0A
mov rdi, [rsp+48h+var_18]
movsxd rsi, [rsp+48h+var_1C]
mov rdx, [rsp+48h+var_30]
add rdx, 18h
mov rax, [rsp+48h+var_30]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov eax, eax
mov ecx, eax
call utf8_encode_buf16
jmp loc_2CE9B
loc_2CE0A:
mov [rsp+48h+var_38], 0
mov [rsp+48h+var_34], 0
loc_2CE1A:
mov eax, [rsp+48h+var_34]
mov rcx, [rsp+48h+var_30]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
cmp eax, ecx
jge short loc_2CE56
mov rax, [rsp+48h+var_30]
movsxd rcx, [rsp+48h+var_34]
movzx eax, byte ptr [rax+rcx+18h]
or eax, [rsp+48h+var_38]
mov [rsp+48h+var_38], eax
mov eax, [rsp+48h+var_34]
add eax, 1
mov [rsp+48h+var_34], eax
jmp short loc_2CE1A
loc_2CE56:
cmp [rsp+48h+var_38], 80h
jge short loc_2CE70
mov rax, [rsp+48h+var_30]
add rax, 18h
mov [rsp+48h+var_8], rax
jmp short loc_2CEAF
loc_2CE70:
mov rdi, [rsp+48h+var_18]
movsxd rsi, [rsp+48h+var_1C]
mov rdx, [rsp+48h+var_30]
add rdx, 18h
mov rax, [rsp+48h+var_30]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov eax, eax
mov ecx, eax
call utf8_encode_buf8
loc_2CE9B:
jmp short $+2
loc_2CE9D:
jmp short $+2
loc_2CE9F:
jmp short $+2
loc_2CEA1:
jmp short $+2
loc_2CEA3:
jmp short $+2
loc_2CEA5:
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_8], rax
loc_2CEAF:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
| _BYTE * JS_AtomGetStrRT(long long a1, _BYTE *a2, int a3, unsigned int a4)
{
int v4; // eax
int v6; // [rsp+10h] [rbp-38h]
int i; // [rsp+14h] [rbp-34h]
long long v8; // [rsp+20h] [rbp-28h]
if ( (unsigned int)_JS_AtomIsTaggedInt(a4) )
{
v4 = _JS_AtomToUInt32(a4);
snprintf(a2, a3, "%u", v4);
return a2;
}
if ( !a4 )
{
snprintf(a2, a3, "<null>");
return a2;
}
if ( a4 >= *(_DWORD *)(a1 + 88) )
{
snprintf(a2, a3, "<invalid %x>", a4);
return a2;
}
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * a4);
*a2 = 0;
if ( (unsigned int)atom_is_free(v8) )
{
snprintf(a2, a3, "<free %x>", a4);
return a2;
}
if ( !v8 )
return a2;
if ( (*(_QWORD *)(v8 + 4) & 0x80000000LL) != 0 )
{
utf8_encode_buf16((long long)a2, a3, v8 + 24, *(_DWORD *)(v8 + 4) & 0x7FFFFFFF);
return a2;
}
v6 = 0;
for ( i = 0; i < (*(_DWORD *)(v8 + 4) & 0x7FFFFFFF); ++i )
v6 |= *(unsigned __int8 *)(v8 + i + 24);
if ( v6 >= 128 )
{
utf8_encode_buf8((long long)a2, a3, v8 + 24, *(_DWORD *)(v8 + 4) & 0x7FFFFFFF);
return a2;
}
return (_BYTE *)(v8 + 24);
}
| JS_AtomGetStrRT:
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 EDI,dword ptr [RSP + 0x28]
CALL 0x001360c0
CMP EAX,0x0
JZ 0x0012cd0e
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP],RAX
MOVSXD RAX,dword ptr [RSP + 0x2c]
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,dword ptr [RSP + 0x28]
CALL 0x001360e0
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x8]
MOV ECX,EAX
LEA RDX,[0x20e979]
MOV AL,0x0
CALL 0x0010e2d0
JMP 0x0012cea5
LAB_0012cd0e:
CMP dword ptr [RSP + 0x28],0x0
JNZ 0x0012cd32
MOV RDI,qword ptr [RSP + 0x30]
MOVSXD RSI,dword ptr [RSP + 0x2c]
LEA RDX,[0x20df67]
MOV AL,0x0
CALL 0x0010e2d0
JMP 0x0012cea3
LAB_0012cd32:
MOV EAX,dword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x38]
CMP EAX,dword ptr [RCX + 0x58]
JC 0x0012cd61
MOV RDI,qword ptr [RSP + 0x30]
MOVSXD RSI,dword ptr [RSP + 0x2c]
MOV ECX,dword ptr [RSP + 0x28]
LEA RDX,[0x20df6e]
MOV AL,0x0
CALL 0x0010e2d0
JMP 0x0012cea1
LAB_0012cd61:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,dword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV byte ptr [RAX],0x0
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00123dd0
CMP EAX,0x0
JZ 0x0012cdaf
MOV RDI,qword ptr [RSP + 0x30]
MOVSXD RSI,dword ptr [RSP + 0x2c]
MOV ECX,dword ptr [RSP + 0x28]
LEA RDX,[0x20df7b]
MOV AL,0x0
CALL 0x0010e2d0
JMP 0x0012ce9f
LAB_0012cdaf:
CMP qword ptr [RSP + 0x20],0x0
JZ 0x0012ce9d
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
JZ 0x0012ce0a
MOV RDI,qword ptr [RSP + 0x30]
MOVSXD RSI,dword ptr [RSP + 0x2c]
MOV RDX,qword ptr [RSP + 0x18]
ADD RDX,0x18
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EAX,EAX
MOV ECX,EAX
CALL 0x0011f430
JMP 0x0012ce9b
LAB_0012ce0a:
MOV dword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0x14],0x0
LAB_0012ce1a:
MOV EAX,dword ptr [RSP + 0x14]
MOV RCX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
CMP EAX,ECX
JGE 0x0012ce56
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x18]
OR EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x0012ce1a
LAB_0012ce56:
CMP dword ptr [RSP + 0x10],0x80
JGE 0x0012ce70
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x18
MOV qword ptr [RSP + 0x40],RAX
JMP 0x0012ceaf
LAB_0012ce70:
MOV RDI,qword ptr [RSP + 0x30]
MOVSXD RSI,dword ptr [RSP + 0x2c]
MOV RDX,qword ptr [RSP + 0x18]
ADD RDX,0x18
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EAX,EAX
MOV ECX,EAX
CALL 0x0011f290
LAB_0012ce9b:
JMP 0x0012ce9d
LAB_0012ce9d:
JMP 0x0012ce9f
LAB_0012ce9f:
JMP 0x0012cea1
LAB_0012cea1:
JMP 0x0012cea3
LAB_0012cea3:
JMP 0x0012cea5
LAB_0012cea5:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x40],RAX
LAB_0012ceaf:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
char * JS_AtomGetStrRT(long param_1,char *param_2,int param_3,uint param_4)
{
long lVar1;
byte bVar2;
int iVar3;
uint uVar4;
int local_34;
char *local_8;
iVar3 = __JS_AtomIsTaggedInt(param_4);
local_8 = param_2;
if (iVar3 == 0) {
if (param_4 == 0) {
snprintf(param_2,(long)param_3,"<null>");
}
else if (param_4 < *(uint *)(param_1 + 0x58)) {
lVar1 = *(long *)(*(long *)(param_1 + 0x68) + (ulong)param_4 * 8);
*param_2 = '\0';
iVar3 = atom_is_free(lVar1);
if (iVar3 == 0) {
if (lVar1 != 0) {
if ((*(ulong *)(lVar1 + 4) >> 0x1f & 1) == 0) {
bVar2 = 0;
for (local_34 = 0; local_34 < (int)((uint)*(int8 *)(lVar1 + 4) & 0x7fffffff);
local_34 = local_34 + 1) {
bVar2 = *(byte *)(lVar1 + 0x18 + (long)local_34) | bVar2;
}
if (bVar2 < 0x80) {
local_8 = (char *)(lVar1 + 0x18);
}
else {
utf8_encode_buf8(param_2,(long)param_3,lVar1 + 0x18,
(uint)*(int8 *)(lVar1 + 4) & 0x7fffffff);
}
}
else {
utf8_encode_buf16(param_2,(long)param_3,lVar1 + 0x18,
(uint)*(int8 *)(lVar1 + 4) & 0x7fffffff);
}
}
}
else {
snprintf(param_2,(long)param_3,"<free %x>",(ulong)param_4);
}
}
else {
snprintf(param_2,(long)param_3,"<invalid %x>",(ulong)param_4);
}
}
else {
uVar4 = __JS_AtomToUInt32(param_4);
snprintf(param_2,(long)param_3,"%u",(ulong)uVar4);
}
return local_8;
}
| |
41,733 | JS_AtomGetStrRT | bluesky950520[P]quickjs/quickjs.c | static const char *JS_AtomGetStrRT(JSRuntime *rt, char *buf, int buf_size,
JSAtom atom)
{
if (__JS_AtomIsTaggedInt(atom)) {
snprintf(buf, buf_size, "%u", __JS_AtomToUInt32(atom));
} else if (atom == JS_ATOM_NULL) {
snprintf(buf, buf_size, "<null>");
} else if (atom >= rt->atom_size) {
assert(atom < rt->atom_size);
snprintf(buf, buf_size, "<invalid %x>", atom);
} else {
JSAtomStruct *p = rt->atom_array[atom];
*buf = '\0';
if (atom_is_free(p)) {
assert(!atom_is_free(p));
snprintf(buf, buf_size, "<free %x>", atom);
} else if (p != NULL) {
JSString *str = p;
if (str->is_wide_char) {
/* encode surrogates correctly */
utf8_encode_buf16(buf, buf_size, str->u.str16, str->len);
} else {
/* special case ASCII strings */
int i, c = 0;
for(i = 0; i < str->len; i++) {
c |= str->u.str8[i];
}
if (c < 0x80)
return (const char *)str->u.str8;
utf8_encode_buf8(buf, buf_size, str->u.str8, str->len);
}
}
}
return buf;
} | O1 | c | JS_AtomGetStrRT:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ecx
movq %rsi, %rbx
testl %edx, %edx
js 0x22290
je 0x2229f
cmpl %ecx, 0x58(%rdi)
jbe 0x222ae
movq 0x68(%rdi), %rax
movl %ecx, %edx
movq (%rax,%rdx,8), %rax
movb $0x0, (%rbx)
testb $0x1, %al
jne 0x222cf
movb $0x1, %r14b
testq %rax, %rax
je 0x22304
movq 0x4(%rax), %rcx
testl %ecx, %ecx
js 0x222ea
xorl %r14d, %r14d
movq %rcx, %rdx
shlq $0x21, %rdx
je 0x2226b
movl %ecx, %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
xorl %esi, %esi
movzbl 0x18(%rax,%rsi), %edi
orl %edi, %r14d
incq %rsi
cmpq %rsi, %rdx
jne 0x22253
cmpl $0x7f, %r14d
setg %r14b
addq $0x18, %rax
testb %r14b, %r14b
je 0x22304
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl $0x40, %esi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x1ba1f
jmp 0x22304
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
leaq 0x7d678(%rip), %rdx # 0x9f915
jmp 0x222b5
movl $0x3e6c6c, 0x3(%rbx) # imm = 0x3E6C6C
movl $0x6c756e3c, (%rbx) # imm = 0x6C756E3C
jmp 0x222c4
leaq 0x7cc55(%rip), %rdx # 0x9ef0a
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe2d0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7cc41(%rip), %rdx # 0x9ef17
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe2d0
movb $0x1, %r14b
jmp 0x22304
addq $0x18, %rax
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl $0x40, %esi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x1baa2
testb %r14b, %r14b
jne 0x222c4
jmp 0x222c7
| JS_AtomGetStrRT:
push r14
push rbx
push rax
mov ecx, edx
mov rbx, rsi
test edx, edx
js loc_22290
jz loc_2229F
cmp [rdi+58h], ecx
jbe loc_222AE
mov rax, [rdi+68h]
mov edx, ecx
mov rax, [rax+rdx*8]
mov byte ptr [rbx], 0
test al, 1
jnz loc_222CF
mov r14b, 1
test rax, rax
jz loc_22304
mov rcx, [rax+4]
test ecx, ecx
js loc_222EA
xor r14d, r14d
mov rdx, rcx
shl rdx, 21h
jz short loc_2226B
mov edx, ecx
and edx, 7FFFFFFFh
xor esi, esi
loc_22253:
movzx edi, byte ptr [rax+rsi+18h]
or r14d, edi
inc rsi
cmp rdx, rsi
jnz short loc_22253
cmp r14d, 7Fh
setnle r14b
loc_2226B:
add rax, 18h
test r14b, r14b
jz loc_22304
and ecx, 7FFFFFFFh
mov esi, 40h ; '@'
mov rdi, rbx
mov rdx, rax
call utf8_encode_buf8
jmp short loc_22304
loc_22290:
and ecx, 7FFFFFFFh
lea rdx, aUnreasonableAt+19h; "%u"
jmp short loc_222B5
loc_2229F:
mov dword ptr [rbx+3], 3E6C6Ch
mov dword ptr [rbx], 6C756E3Ch
jmp short loc_222C4
loc_222AE:
lea rdx, aInvalidX; "<invalid %x>"
loc_222B5:
mov esi, 40h ; '@'
mov rdi, rbx
xor eax, eax
call _snprintf
loc_222C4:
mov rax, rbx
loc_222C7:
add rsp, 8
pop rbx
pop r14
retn
loc_222CF:
lea rdx, aFreeX; "<free %x>"
mov esi, 40h ; '@'
mov rdi, rbx
xor eax, eax
call _snprintf
mov r14b, 1
jmp short loc_22304
loc_222EA:
add rax, 18h
and ecx, 7FFFFFFFh
mov esi, 40h ; '@'
mov rdi, rbx
mov rdx, rax
call utf8_encode_buf16
loc_22304:
test r14b, r14b
jnz short loc_222C4
jmp short loc_222C7
| unsigned long long JS_AtomGetStrRT(long long a1, char *a2, int a3)
{
unsigned long long result; // rax
int v5; // r14d
long long v6; // rcx
long long v7; // rsi
if ( a3 < 0 )
{
snprintf(a2, 64LL, "%u");
return (unsigned long long)a2;
}
if ( !a3 )
{
strcpy(a2, "<null>");
return (unsigned long long)a2;
}
if ( *(_DWORD *)(a1 + 88) <= (unsigned int)a3 )
{
snprintf(a2, 64LL, "<invalid %x>");
return (unsigned long long)a2;
}
result = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a3);
*a2 = 0;
if ( (result & 1) != 0 )
{
result = snprintf(a2, 64LL, "<free %x>", a3);
LOBYTE(v5) = 1;
}
else
{
LOBYTE(v5) = 1;
if ( result )
{
v6 = *(_QWORD *)(result + 4);
if ( (int)v6 < 0 )
{
result = utf8_encode_buf16((long long)a2, 0x40uLL, result + 24, *(_QWORD *)(result + 4) & 0x7FFFFFFFLL);
}
else
{
v5 = 0;
if ( v6 << 33 )
{
v7 = 0LL;
do
v5 |= *(unsigned __int8 *)(result + v7++ + 24);
while ( (*(_QWORD *)(result + 4) & 0x7FFFFFFFLL) != v7 );
LOBYTE(v5) = v5 > 127;
}
result += 24LL;
if ( (_BYTE)v5 )
result = utf8_encode_buf8((long long)a2, 0x40uLL, result, v6 & 0x7FFFFFFF);
}
}
}
if ( (_BYTE)v5 )
return (unsigned long long)a2;
return result;
}
| |||
41,734 | JS_AtomGetStrRT | bluesky950520[P]quickjs/quickjs.c | static const char *JS_AtomGetStrRT(JSRuntime *rt, char *buf, int buf_size,
JSAtom atom)
{
if (__JS_AtomIsTaggedInt(atom)) {
snprintf(buf, buf_size, "%u", __JS_AtomToUInt32(atom));
} else if (atom == JS_ATOM_NULL) {
snprintf(buf, buf_size, "<null>");
} else if (atom >= rt->atom_size) {
assert(atom < rt->atom_size);
snprintf(buf, buf_size, "<invalid %x>", atom);
} else {
JSAtomStruct *p = rt->atom_array[atom];
*buf = '\0';
if (atom_is_free(p)) {
assert(!atom_is_free(p));
snprintf(buf, buf_size, "<free %x>", atom);
} else if (p != NULL) {
JSString *str = p;
if (str->is_wide_char) {
/* encode surrogates correctly */
utf8_encode_buf16(buf, buf_size, str->u.str16, str->len);
} else {
/* special case ASCII strings */
int i, c = 0;
for(i = 0; i < str->len; i++) {
c |= str->u.str8[i];
}
if (c < 0x80)
return (const char *)str->u.str8;
utf8_encode_buf8(buf, buf_size, str->u.str8, str->len);
}
}
}
return buf;
} | O2 | c | JS_AtomGetStrRT:
pushq %rbx
movl %edx, %ecx
movq %rsi, %rbx
testl %edx, %edx
js 0x1c3c0
je 0x1c3cf
cmpl %ecx, 0x58(%rdi)
jbe 0x1c3de
movq 0x68(%rdi), %rax
movl %ecx, %edx
movq (%rax,%rdx,8), %rdx
movb $0x0, (%rbx)
testb $0x1, %dl
jne 0x1c3e7
testq %rdx, %rdx
je 0x1c3fb
movq 0x4(%rdx), %rcx
addq $0x18, %rdx
movl %ecx, %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
testl %ecx, %ecx
js 0x1c400
xorl %esi, %esi
xorl %edi, %edi
cmpq %rsi, %rax
je 0x1c410
movzbl (%rdx,%rsi), %r8d
orl %r8d, %edi
incq %rsi
jmp 0x1c3ae
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
leaq 0x6a498(%rip), %rdx # 0x86865
jmp 0x1c3ee
movl $0x3e6c6c, 0x3(%rbx) # imm = 0x3E6C6C
movl $0x6c756e3c, (%rbx) # imm = 0x6C756E3C
jmp 0x1c3fb
leaq 0x69a75(%rip), %rdx # 0x85e5a
jmp 0x1c3ee
leaq 0x69a79(%rip), %rdx # 0x85e67
pushq $0x40
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe2e0
movq %rbx, %rax
popq %rbx
retq
pushq $0x40
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
callq 0x16304
jmp 0x1c3fb
cmpl $0x80, %edi
jl 0x1c42b
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
pushq $0x40
popq %rsi
movq %rbx, %rdi
callq 0x1628d
jmp 0x1c3fb
movq %rdx, %rbx
jmp 0x1c3fb
| JS_AtomGetStrRT:
push rbx
mov ecx, edx
mov rbx, rsi
test edx, edx
js short loc_1C3C0
jz short loc_1C3CF
cmp [rdi+58h], ecx
jbe short loc_1C3DE
mov rax, [rdi+68h]
mov edx, ecx
mov rdx, [rax+rdx*8]
mov byte ptr [rbx], 0
test dl, 1
jnz short loc_1C3E7
test rdx, rdx
jz short loc_1C3FB
mov rcx, [rdx+4]
add rdx, 18h
mov eax, ecx
and eax, 7FFFFFFFh
test ecx, ecx
js short loc_1C400
xor esi, esi
xor edi, edi
loc_1C3AE:
cmp rax, rsi
jz short loc_1C410
movzx r8d, byte ptr [rdx+rsi]
or edi, r8d
inc rsi
jmp short loc_1C3AE
loc_1C3C0:
and ecx, 7FFFFFFFh
lea rdx, aUnreasonableAt+19h; "%u"
jmp short loc_1C3EE
loc_1C3CF:
mov dword ptr [rbx+3], 3E6C6Ch
mov dword ptr [rbx], 6C756E3Ch
jmp short loc_1C3FB
loc_1C3DE:
lea rdx, aInvalidX; "<invalid %x>"
jmp short loc_1C3EE
loc_1C3E7:
lea rdx, aFreeX; "<free %x>"
loc_1C3EE:
push 40h ; '@'
pop rsi
mov rdi, rbx
xor eax, eax
call _snprintf
loc_1C3FB:
mov rax, rbx
pop rbx
retn
loc_1C400:
push 40h ; '@'
pop rsi
mov rdi, rbx
mov rcx, rax
call utf8_encode_buf16
jmp short loc_1C3FB
loc_1C410:
cmp edi, 80h
jl short loc_1C42B
and ecx, 7FFFFFFFh
push 40h ; '@'
pop rsi
mov rdi, rbx
call utf8_encode_buf8
jmp short loc_1C3FB
loc_1C42B:
mov rbx, rdx
jmp short loc_1C3FB
| long long JS_AtomGetStrRT(long long a1, char *a2, int a3)
{
long long v3; // rbx
long long v4; // rdx
long long v5; // rcx
long long v6; // rdx
long long v7; // rsi
int v8; // edi
v3 = (long long)a2;
if ( a3 < 0 )
{
snprintf(a2, 64LL, "%u");
}
else if ( a3 )
{
if ( *(_DWORD *)(a1 + 88) <= (unsigned int)a3 )
{
snprintf(a2, 64LL, "<invalid %x>");
}
else
{
v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a3);
*a2 = 0;
if ( (v4 & 1) != 0 )
{
snprintf(a2, 64LL, "<free %x>");
}
else if ( v4 )
{
v5 = *(_QWORD *)(v4 + 4);
v6 = v4 + 24;
if ( (int)v5 < 0 )
{
utf8_encode_buf16((long long)a2, 0x40uLL, v6, v5 & 0x7FFFFFFF);
}
else
{
v7 = 0LL;
v8 = 0;
while ( (v5 & 0x7FFFFFFF) != v7 )
v8 |= *(unsigned __int8 *)(v6 + v7++);
if ( v8 < 128 )
return v6;
else
utf8_encode_buf8(v3, 0x40uLL, v6, v5 & 0x7FFFFFFF);
}
}
}
}
else
{
strcpy(a2, "<null>");
}
return v3;
}
| JS_AtomGetStrRT:
PUSH RBX
MOV ECX,EDX
MOV RBX,RSI
TEST EDX,EDX
JS 0x0011c3c0
JZ 0x0011c3cf
CMP dword ptr [RDI + 0x58],ECX
JBE 0x0011c3de
MOV RAX,qword ptr [RDI + 0x68]
MOV EDX,ECX
MOV RDX,qword ptr [RAX + RDX*0x8]
MOV byte ptr [RBX],0x0
TEST DL,0x1
JNZ 0x0011c3e7
TEST RDX,RDX
JZ 0x0011c3fb
MOV RCX,qword ptr [RDX + 0x4]
ADD RDX,0x18
MOV EAX,ECX
AND EAX,0x7fffffff
TEST ECX,ECX
JS 0x0011c400
XOR ESI,ESI
XOR EDI,EDI
LAB_0011c3ae:
CMP RAX,RSI
JZ 0x0011c410
MOVZX R8D,byte ptr [RDX + RSI*0x1]
OR EDI,R8D
INC RSI
JMP 0x0011c3ae
LAB_0011c3c0:
AND ECX,0x7fffffff
LEA RDX,[0x186865]
JMP 0x0011c3ee
LAB_0011c3cf:
MOV dword ptr [RBX + 0x3],0x3e6c6c
MOV dword ptr [RBX],0x6c756e3c
JMP 0x0011c3fb
LAB_0011c3de:
LEA RDX,[0x185e5a]
JMP 0x0011c3ee
LAB_0011c3e7:
LEA RDX,[0x185e67]
LAB_0011c3ee:
PUSH 0x40
POP RSI
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0010e2e0
LAB_0011c3fb:
MOV RAX,RBX
POP RBX
RET
LAB_0011c400:
PUSH 0x40
POP RSI
MOV RDI,RBX
MOV RCX,RAX
CALL 0x00116304
JMP 0x0011c3fb
LAB_0011c410:
CMP EDI,0x80
JL 0x0011c42b
AND ECX,0x7fffffff
PUSH 0x40
POP RSI
MOV RDI,RBX
CALL 0x0011628d
JMP 0x0011c3fb
LAB_0011c42b:
MOV RBX,RDX
JMP 0x0011c3fb
|
char * JS_AtomGetStrRT(long param_1,char *param_2,uint param_3)
{
ulong uVar1;
uint uVar2;
char *pcVar3;
ulong uVar4;
byte bVar5;
uVar4 = (ulong)param_3;
if ((int)param_3 < 0) {
uVar4 = (ulong)(param_3 & 0x7fffffff);
pcVar3 = "%u";
}
else {
if (param_3 == 0) {
builtin_strncpy(param_2,"<null>",7);
return param_2;
}
if (param_3 < *(uint *)(param_1 + 0x58)) {
uVar1 = *(ulong *)(*(long *)(param_1 + 0x68) + uVar4 * 8);
*param_2 = '\0';
if ((uVar1 & 1) == 0) {
if (uVar1 == 0) {
return param_2;
}
pcVar3 = (char *)(uVar1 + 0x18);
uVar2 = (uint)*(int8 *)(uVar1 + 4);
if (-1 < (int)uVar2) {
bVar5 = 0;
for (uVar4 = 0; (uVar2 & 0x7fffffff) != uVar4; uVar4 = uVar4 + 1) {
bVar5 = bVar5 | pcVar3[uVar4];
}
if (bVar5 < 0x80) {
return pcVar3;
}
utf8_encode_buf8(param_2,0x40,pcVar3,uVar2 & 0x7fffffff);
return param_2;
}
utf8_encode_buf16(param_2,0x40,pcVar3,(ulong)(uVar2 & 0x7fffffff));
return param_2;
}
pcVar3 = "<free %x>";
}
else {
pcVar3 = "<invalid %x>";
}
}
snprintf(param_2,0x40,pcVar3,uVar4);
return param_2;
}
| |
41,735 | JS_AtomGetStrRT | bluesky950520[P]quickjs/quickjs.c | static const char *JS_AtomGetStrRT(JSRuntime *rt, char *buf, int buf_size,
JSAtom atom)
{
if (__JS_AtomIsTaggedInt(atom)) {
snprintf(buf, buf_size, "%u", __JS_AtomToUInt32(atom));
} else if (atom == JS_ATOM_NULL) {
snprintf(buf, buf_size, "<null>");
} else if (atom >= rt->atom_size) {
assert(atom < rt->atom_size);
snprintf(buf, buf_size, "<invalid %x>", atom);
} else {
JSAtomStruct *p = rt->atom_array[atom];
*buf = '\0';
if (atom_is_free(p)) {
assert(!atom_is_free(p));
snprintf(buf, buf_size, "<free %x>", atom);
} else if (p != NULL) {
JSString *str = p;
if (str->is_wide_char) {
/* encode surrogates correctly */
utf8_encode_buf16(buf, buf_size, str->u.str16, str->len);
} else {
/* special case ASCII strings */
int i, c = 0;
for(i = 0; i < str->len; i++) {
c |= str->u.str8[i];
}
if (c < 0x80)
return (const char *)str->u.str8;
utf8_encode_buf8(buf, buf_size, str->u.str8, str->len);
}
}
}
return buf;
} | O3 | c | JS_AtomGetStrRT:
pushq %rbx
movl %edx, %ecx
movq %rsi, %rbx
testl %edx, %edx
js 0x22ad9
je 0x22ae8
cmpl %ecx, 0x58(%rdi)
jbe 0x22af7
movq 0x68(%rdi), %rax
movl %ecx, %edx
movq (%rax,%rdx,8), %rdx
movb $0x0, (%rbx)
testb $0x1, %dl
jne 0x22b00
testq %rdx, %rdx
je 0x22b16
movq 0x4(%rdx), %rcx
testl %ecx, %ecx
js 0x22b1b
movq %rcx, %rax
shlq $0x21, %rax
je 0x22b34
movl %ecx, %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
xorl %esi, %esi
xorl %edi, %edi
movzbl 0x18(%rdx,%rsi), %r8d
orl %r8d, %edi
incq %rsi
cmpq %rsi, %rax
jne 0x22aa7
cmpl $0x80, %edi
jl 0x22b34
addq $0x18, %rdx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl $0x40, %esi
movq %rbx, %rdi
callq 0x1c34f
jmp 0x22b16
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
leaq 0x7fdef(%rip), %rdx # 0xa28d5
jmp 0x22b07
movl $0x3e6c6c, 0x3(%rbx) # imm = 0x3E6C6C
movl $0x6c756e3c, (%rbx) # imm = 0x6C756E3C
jmp 0x22b16
leaq 0x7f3cc(%rip), %rdx # 0xa1eca
jmp 0x22b07
leaq 0x7f3d0(%rip), %rdx # 0xa1ed7
movl $0x40, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe2d0
movq %rbx, %rax
popq %rbx
retq
addq $0x18, %rdx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl $0x40, %esi
movq %rbx, %rdi
callq 0x1c3d7
jmp 0x22b16
addq $0x18, %rdx
movq %rdx, %rbx
jmp 0x22b16
| JS_AtomGetStrRT:
push rbx
mov ecx, edx
mov rbx, rsi
test edx, edx
js loc_22AD9
jz loc_22AE8
cmp [rdi+58h], ecx
jbe loc_22AF7
mov rax, [rdi+68h]
mov edx, ecx
mov rdx, [rax+rdx*8]
mov byte ptr [rbx], 0
test dl, 1
jnz loc_22B00
test rdx, rdx
jz loc_22B16
mov rcx, [rdx+4]
test ecx, ecx
js loc_22B1B
mov rax, rcx
shl rax, 21h
jz loc_22B34
mov eax, ecx
and eax, 7FFFFFFFh
xor esi, esi
xor edi, edi
loc_22AA7:
movzx r8d, byte ptr [rdx+rsi+18h]
or edi, r8d
inc rsi
cmp rax, rsi
jnz short loc_22AA7
cmp edi, 80h
jl short loc_22B34
add rdx, 18h
and ecx, 7FFFFFFFh
mov esi, 40h ; '@'
mov rdi, rbx
call utf8_encode_buf8
jmp short loc_22B16
loc_22AD9:
and ecx, 7FFFFFFFh
lea rdx, aUnreasonableAt+19h; "%u"
jmp short loc_22B07
loc_22AE8:
mov dword ptr [rbx+3], 3E6C6Ch
mov dword ptr [rbx], 6C756E3Ch
jmp short loc_22B16
loc_22AF7:
lea rdx, aInvalidX; "<invalid %x>"
jmp short loc_22B07
loc_22B00:
lea rdx, aFreeX; "<free %x>"
loc_22B07:
mov esi, 40h ; '@'
mov rdi, rbx
xor eax, eax
call _snprintf
loc_22B16:
mov rax, rbx
pop rbx
retn
loc_22B1B:
add rdx, 18h
and ecx, 7FFFFFFFh
mov esi, 40h ; '@'
mov rdi, rbx
call utf8_encode_buf16
jmp short loc_22B16
loc_22B34:
add rdx, 18h
mov rbx, rdx
jmp short loc_22B16
| long long JS_AtomGetStrRT(long long a1, char *a2, int a3)
{
long long v3; // rbx
long long v4; // rdx
long long v5; // rcx
long long v6; // rsi
int v7; // edi
v3 = (long long)a2;
if ( a3 < 0 )
{
snprintf(a2, 64LL, "%u");
}
else if ( a3 )
{
if ( *(_DWORD *)(a1 + 88) <= (unsigned int)a3 )
{
snprintf(a2, 64LL, "<invalid %x>");
}
else
{
v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a3);
*a2 = 0;
if ( (v4 & 1) != 0 )
{
snprintf(a2, 64LL, "<free %x>");
}
else if ( v4 )
{
v5 = *(_QWORD *)(v4 + 4);
if ( (int)v5 < 0 )
{
utf8_encode_buf16((long long)a2, 0x40uLL, v4 + 24, *(_QWORD *)(v4 + 4) & 0x7FFFFFFFLL);
}
else
{
if ( !(v5 << 33) )
return v4 + 24;
v6 = 0LL;
v7 = 0;
do
v7 |= *(unsigned __int8 *)(v4 + v6++ + 24);
while ( (*(_QWORD *)(v4 + 4) & 0x7FFFFFFFLL) != v6 );
if ( v7 >= 128 )
utf8_encode_buf8(v3, 0x40uLL, v4 + 24, *(_QWORD *)(v4 + 4) & 0x7FFFFFFFLL);
else
return v4 + 24;
}
}
}
}
else
{
strcpy(a2, "<null>");
}
return v3;
}
| JS_AtomGetStrRT:
PUSH RBX
MOV ECX,EDX
MOV RBX,RSI
TEST EDX,EDX
JS 0x00122ad9
JZ 0x00122ae8
CMP dword ptr [RDI + 0x58],ECX
JBE 0x00122af7
MOV RAX,qword ptr [RDI + 0x68]
MOV EDX,ECX
MOV RDX,qword ptr [RAX + RDX*0x8]
MOV byte ptr [RBX],0x0
TEST DL,0x1
JNZ 0x00122b00
TEST RDX,RDX
JZ 0x00122b16
MOV RCX,qword ptr [RDX + 0x4]
TEST ECX,ECX
JS 0x00122b1b
MOV RAX,RCX
SHL RAX,0x21
JZ 0x00122b34
MOV EAX,ECX
AND EAX,0x7fffffff
XOR ESI,ESI
XOR EDI,EDI
LAB_00122aa7:
MOVZX R8D,byte ptr [RDX + RSI*0x1 + 0x18]
OR EDI,R8D
INC RSI
CMP RAX,RSI
JNZ 0x00122aa7
CMP EDI,0x80
JL 0x00122b34
ADD RDX,0x18
AND ECX,0x7fffffff
MOV ESI,0x40
MOV RDI,RBX
CALL 0x0011c34f
JMP 0x00122b16
LAB_00122ad9:
AND ECX,0x7fffffff
LEA RDX,[0x1a28d5]
JMP 0x00122b07
LAB_00122ae8:
MOV dword ptr [RBX + 0x3],0x3e6c6c
MOV dword ptr [RBX],0x6c756e3c
JMP 0x00122b16
LAB_00122af7:
LEA RDX,[0x1a1eca]
JMP 0x00122b07
LAB_00122b00:
LEA RDX,[0x1a1ed7]
LAB_00122b07:
MOV ESI,0x40
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0010e2d0
LAB_00122b16:
MOV RAX,RBX
POP RBX
RET
LAB_00122b1b:
ADD RDX,0x18
AND ECX,0x7fffffff
MOV ESI,0x40
MOV RDI,RBX
CALL 0x0011c3d7
JMP 0x00122b16
LAB_00122b34:
ADD RDX,0x18
MOV RBX,RDX
JMP 0x00122b16
|
char * JS_AtomGetStrRT(long param_1,char *param_2,uint param_3)
{
ulong uVar1;
uint uVar2;
char *__format;
ulong uVar3;
byte bVar4;
uVar3 = (ulong)param_3;
if ((int)param_3 < 0) {
uVar3 = (ulong)(param_3 & 0x7fffffff);
__format = "%u";
}
else {
if (param_3 == 0) {
builtin_strncpy(param_2,"<null>",7);
return param_2;
}
if (param_3 < *(uint *)(param_1 + 0x58)) {
uVar1 = *(ulong *)(*(long *)(param_1 + 0x68) + uVar3 * 8);
*param_2 = '\0';
if ((uVar1 & 1) == 0) {
if (uVar1 == 0) {
return param_2;
}
uVar2 = (uint)*(ulong *)(uVar1 + 4);
if (-1 < (int)uVar2) {
if ((*(ulong *)(uVar1 + 4) & 0x7fffffff) != 0) {
uVar3 = 0;
bVar4 = 0;
do {
bVar4 = bVar4 | *(byte *)(uVar1 + 0x18 + uVar3);
uVar3 = uVar3 + 1;
} while ((uVar2 & 0x7fffffff) != uVar3);
if (0x7f < bVar4) {
utf8_encode_buf8(param_2,0x40,uVar1 + 0x18,uVar2 & 0x7fffffff);
return param_2;
}
}
return (char *)(uVar1 + 0x18);
}
utf8_encode_buf16(param_2,0x40,uVar1 + 0x18,uVar2 & 0x7fffffff);
return param_2;
}
__format = "<free %x>";
}
else {
__format = "<invalid %x>";
}
}
snprintf(param_2,0x40,__format,uVar3);
return param_2;
}
| |
41,736 | JS_IsInstanceOf | bluesky950520[P]quickjs/quickjs.c | int JS_IsInstanceOf(JSContext *ctx, JSValue val, JSValue obj)
{
JSValue method;
if (!JS_IsObject(obj))
goto fail;
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_hasInstance);
if (JS_IsException(method))
return -1;
if (!JS_IsNull(method) && !JS_IsUndefined(method)) {
JSValue ret;
ret = JS_CallFree(ctx, method, obj, 1, &val);
return JS_ToBoolFree(ctx, ret);
}
/* legacy case */
if (!JS_IsFunction(ctx, obj)) {
fail:
JS_ThrowTypeError(ctx, "invalid 'instanceof' right operand");
return -1;
}
return JS_OrdinaryIsInstanceOf(ctx, val, obj);
} | O2 | c | JS_IsInstanceOf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
pushq $-0x1
popq %rbp
cmpl $-0x1, %r14d
jne 0x208ea
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rbx, %rdi
movq %rcx, %rsi
movq %r14, %rdx
movl $0xdc, %ecx
callq 0x1ebf3
leal -0x2(%rdx), %ecx
cmpl $0x2, %ecx
jae 0x2090c
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x20a2d
testl %eax, %eax
je 0x208ea
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20a6a
leaq 0x68565(%rip), %rsi # 0x88e56
movq %rbx, %rdi
xorl %eax, %eax
callq 0x201fd
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x6, %edx
je 0x208fb
leaq 0x8(%rsp), %rcx
movq %rcx, (%rsp)
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x2093e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x209aa
movl %eax, %ebp
jmp 0x208fb
| JS_IsInstanceOf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, r8
mov rbx, rdi
mov [rsp+48h+var_40], rsi
mov [rsp+48h+var_38], rdx
push 0FFFFFFFFFFFFFFFFh
pop rbp
cmp r14d, 0FFFFFFFFh
jnz short loc_208EA
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rdi, rbx
mov rsi, rcx
mov rdx, r14
mov ecx, 0DCh
call JS_GetProperty
lea ecx, [rdx-2]
cmp ecx, 2
jnb short loc_2090C
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_IsFunction
test eax, eax
jz short loc_208EA
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov rcx, r15
mov r8, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_OrdinaryIsInstanceOf
loc_208EA:
lea rsi, aInvalidInstanc; "invalid 'instanceof' right operand"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_208FB:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2090C:
cmp edx, 6
jz short loc_208FB
lea rcx, [rsp+48h+var_40]
mov [rsp+48h+var_48], rcx
push 1
pop r9
mov rdi, rbx
mov rsi, rax
mov rcx, r15
mov r8, r14
call JS_CallFree
mov rdi, rbx
mov rsi, rax
call JS_ToBoolFree
mov ebp, eax
jmp short loc_208FB
| long long JS_IsInstanceOf(
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 int v15; // ebp
int Property; // eax
int v19; // edx
long long v21; // rax
char v22; // [rsp+0h] [rbp-48h]
_QWORD v23[8]; // [rsp+8h] [rbp-40h] BYREF
v23[0] = a2;
v23[1] = a3;
v15 = -1;
if ( (_DWORD)a5 == -1 )
{
Property = JS_GetProperty(a1, a4, -1, 220);
if ( (unsigned int)(v19 - 2) >= 2 )
{
if ( v19 != 6 )
{
v21 = JS_CallFree(a1, Property, v19, a4, a5, 1, (long long)v23);
return (unsigned int)JS_ToBoolFree(a1, v21);
}
return v15;
}
if ( (unsigned int)JS_IsFunction(a1, a4, a5) )
return JS_OrdinaryIsInstanceOf(a1, a2, a3, a4, a5);
}
JS_ThrowTypeError(
a1,
(long long)"invalid 'instanceof' right operand",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v22);
return v15;
}
| JS_IsInstanceOf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,R8
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDX
PUSH -0x1
POP RBP
CMP R14D,-0x1
JNZ 0x001208ea
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RDI,RBX
MOV RSI,RCX
MOV RDX,R14
MOV ECX,0xdc
CALL 0x0011ebf3
LEA ECX,[RDX + -0x2]
CMP ECX,0x2
JNC 0x0012090c
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00120a2d
TEST EAX,EAX
JZ 0x001208ea
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV RCX,R15
MOV R8,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00120a6a
LAB_001208ea:
LEA RSI,[0x188e56]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x001201fd
LAB_001208fb:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012090c:
CMP EDX,0x6
JZ 0x001208fb
LEA RCX,[RSP + 0x8]
MOV qword ptr [RSP],RCX
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RSI,RAX
MOV RCX,R15
MOV R8,R14
CALL 0x0012093e
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001209aa
MOV EBP,EAX
JMP 0x001208fb
|
ulong JS_IsInstanceOf(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int iVar1;
uint uVar2;
ulong uVar3;
int8 uVar4;
int1 auVar5 [16];
int8 local_40;
int8 local_38;
uVar3 = 0xffffffffffffffff;
local_40 = param_2;
local_38 = param_3;
if ((int)param_5 == -1) {
auVar5 = JS_GetProperty(param_1,param_4,param_5,0xdc);
if (1 < auVar5._8_4_ - 2U) {
if (auVar5._8_4_ != 6) {
uVar4 = JS_CallFree(param_1,auVar5._0_8_,auVar5._8_8_,param_4,param_5,1,&local_40);
uVar2 = JS_ToBoolFree(param_1,uVar4);
uVar3 = (ulong)uVar2;
}
goto LAB_001208fb;
}
iVar1 = JS_IsFunction(param_1,param_4,param_5);
if (iVar1 != 0) {
uVar3 = JS_OrdinaryIsInstanceOf(param_1,param_2,param_3,param_4,param_5);
return uVar3;
}
}
JS_ThrowTypeError(param_1,"invalid \'instanceof\' right operand");
LAB_001208fb:
return uVar3 & 0xffffffff;
}
| |
41,737 | nglog::tools::GetHex(char const*, char const*, unsigned long*) | ng-log[P]ng-log/src/symbolize.cc | static char* GetHex(const char* start, const char* end, uint64_t* hex) {
*hex = 0;
const char* p;
for (p = start; p < end; ++p) {
int ch = *p;
if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F') ||
(ch >= 'a' && ch <= 'f')) {
*hex = (*hex << 4U) |
(ch < 'A' ? static_cast<uint64_t>(ch - '0') : (ch & 0xF) + 9U);
} else { // Encountered the first non-hex character.
break;
}
}
NGLOG_SAFE_ASSERT(p <= end);
return const_cast<char*>(p);
} | O0 | cpp | nglog::tools::GetHex(char const*, char const*, unsigned long*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x4a27e
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x30, -0x24(%rbp)
jl 0x4a20b
cmpl $0x39, -0x24(%rbp)
jle 0x4a223
cmpl $0x41, -0x24(%rbp)
jl 0x4a217
cmpl $0x46, -0x24(%rbp)
jle 0x4a223
cmpl $0x61, -0x24(%rbp)
jl 0x4a269
cmpl $0x66, -0x24(%rbp)
jg 0x4a269
movq -0x18(%rbp), %rax
movq (%rax), %rax
shlq $0x4, %rax
movq %rax, -0x30(%rbp)
cmpl $0x41, -0x24(%rbp)
jge 0x4a246
movl -0x24(%rbp), %eax
subl $0x30, %eax
cltq
movq %rax, -0x38(%rbp)
jmp 0x4a255
movl -0x24(%rbp), %eax
andl $0xf, %eax
addl $0x9, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4a26b
jmp 0x4a27e
jmp 0x4a26d
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4a1e7
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0x4a28a
jmp 0x4a28f
callq 0x93b0
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN5nglog5toolsL6GetHexEPKcS2_Pm:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
mov qword ptr [rax], 0
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
loc_4A1E7:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_10]
jnb loc_4A27E
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
mov [rbp+var_24], eax
cmp [rbp+var_24], 30h ; '0'
jl short loc_4A20B
cmp [rbp+var_24], 39h ; '9'
jle short loc_4A223
loc_4A20B:
cmp [rbp+var_24], 41h ; 'A'
jl short loc_4A217
cmp [rbp+var_24], 46h ; 'F'
jle short loc_4A223
loc_4A217:
cmp [rbp+var_24], 61h ; 'a'
jl short loc_4A269
cmp [rbp+var_24], 66h ; 'f'
jg short loc_4A269
loc_4A223:
mov rax, [rbp+var_18]
mov rax, [rax]
shl rax, 4
mov [rbp+var_30], rax
cmp [rbp+var_24], 41h ; 'A'
jge short loc_4A246
mov eax, [rbp+var_24]
sub eax, 30h ; '0'
cdqe
mov [rbp+var_38], rax
jmp short loc_4A255
loc_4A246:
mov eax, [rbp+var_24]
and eax, 0Fh
add eax, 9
mov eax, eax
mov [rbp+var_38], rax
loc_4A255:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_38]
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
jmp short loc_4A26B
loc_4A269:
jmp short loc_4A27E
loc_4A26B:
jmp short $+2
loc_4A26D:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_4A1E7
loc_4A27E:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_10]
ja short loc_4A28A
jmp short loc_4A28F
loc_4A28A:
call _abort
loc_4A28F:
mov rax, [rbp+var_20]
add rsp, 40h
pop rbp
retn
| nglog::tools * nglog::tools::GetHex(nglog::tools *this, nglog::tools *a2, char *a3, unsigned long long *a4)
{
long long v5; // [rsp+8h] [rbp-38h]
int v6; // [rsp+1Ch] [rbp-24h]
nglog::tools *i; // [rsp+20h] [rbp-20h]
*(_QWORD *)a3 = 0LL;
for ( i = this; i < a2; i = (nglog::tools *)((char *)i + 1) )
{
v6 = *(char *)i;
if ( (v6 < 48 || v6 > 57) && (v6 < 65 || v6 > 70) && (v6 < 97 || v6 > 102) )
break;
if ( v6 >= 65 )
v5 = (v6 & 0xFu) + 9;
else
v5 = v6 - 48;
*(_QWORD *)a3 = v5 | (16LL * *(_QWORD *)a3);
}
if ( i > a2 )
abort(this, a2);
return i;
}
| GetHex:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_0014a1e7:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x0014a27e
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x30
JL 0x0014a20b
CMP dword ptr [RBP + -0x24],0x39
JLE 0x0014a223
LAB_0014a20b:
CMP dword ptr [RBP + -0x24],0x41
JL 0x0014a217
CMP dword ptr [RBP + -0x24],0x46
JLE 0x0014a223
LAB_0014a217:
CMP dword ptr [RBP + -0x24],0x61
JL 0x0014a269
CMP dword ptr [RBP + -0x24],0x66
JG 0x0014a269
LAB_0014a223:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
SHL RAX,0x4
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RBP + -0x24],0x41
JGE 0x0014a246
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,0x30
CDQE
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0014a255
LAB_0014a246:
MOV EAX,dword ptr [RBP + -0x24]
AND EAX,0xf
ADD EAX,0x9
MOV EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
LAB_0014a255:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x38]
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
JMP 0x0014a26b
LAB_0014a269:
JMP 0x0014a27e
LAB_0014a26b:
JMP 0x0014a26d
LAB_0014a26d:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0014a1e7
LAB_0014a27e:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x10]
JA 0x0014a28a
JMP 0x0014a28f
LAB_0014a28a:
CALL 0x001093b0
LAB_0014a28f:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x40
POP RBP
RET
|
/* nglog::tools::GetHex(char const*, char const*, unsigned long*) */
char * nglog::tools::GetHex(char *param_1,char *param_2,ulong *param_3)
{
uint uVar1;
ulong local_40;
char *local_28;
*param_3 = 0;
for (local_28 = param_1;
(local_28 < param_2 &&
((((uVar1 = (uint)*local_28, 0x2f < (int)uVar1 && ((int)uVar1 < 0x3a)) ||
((0x40 < (int)uVar1 && ((int)uVar1 < 0x47)))) ||
((0x60 < (int)uVar1 && ((int)uVar1 < 0x67)))))); local_28 = local_28 + 1) {
if ((int)uVar1 < 0x41) {
local_40 = (ulong)(int)(uVar1 - 0x30);
}
else {
local_40 = (ulong)((uVar1 & 0xf) + 9);
}
*param_3 = *param_3 << 4 | local_40;
}
if (param_2 < local_28) {
/* WARNING: Subroutine does not return */
abort();
}
return local_28;
}
| |
41,738 | stbi_load_16_from_memory | llama.cpp/examples/llava/../../common/stb_image.h | STBIDEF stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels)
{
stbi__context s;
stbi__start_mem(&s,buffer,len);
return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels);
} | O3 | c | stbi_load_16_from_memory:
subq $0xe8, %rsp
leaq 0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
xorl %r10d, %r10d
movl %r10d, 0x30(%rax)
movl %r10d, 0xb8(%rax)
movq %rdi, 0xd0(%rax)
movq %rdi, 0xc0(%rax)
movslq %esi, %rsi
addq %rdi, %rsi
movq %rsi, 0xd8(%rax)
movq %rsi, 0xc8(%rax)
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movl %r9d, %r8d
callq 0x18a6e
addq $0xe8, %rsp
retq
| stbi_load_16_from_memory:
sub rsp, 0E8h
lea rax, [rsp+0E8h+var_E0]
mov qword ptr [rax+10h], 0
xor r10d, r10d
mov [rax+30h], r10d
mov [rax+0B8h], r10d
mov [rax+0D0h], rdi
mov [rax+0C0h], rdi
movsxd rsi, esi
add rsi, rdi
mov [rax+0D8h], rsi
mov [rax+0C8h], rsi
mov rdi, rax
mov rsi, rdx
mov rdx, rcx
mov rcx, r8
mov r8d, r9d
call _ZL32stbi__load_and_postprocess_16bitP13stbi__contextPiS1_S1_i; stbi__load_and_postprocess_16bit(stbi__context *,int *,int *,int *,int)
add rsp, 0E8h
retn
| _WORD * stbi_load_16_from_memory(long long a1, int a2, int *a3, int *a4, int *a5, unsigned int a6)
{
_BYTE v7[16]; // [rsp+8h] [rbp-E0h] BYREF
long long v8; // [rsp+18h] [rbp-D0h]
int v9; // [rsp+38h] [rbp-B0h]
int v10; // [rsp+C0h] [rbp-28h]
long long v11; // [rsp+C8h] [rbp-20h]
long long v12; // [rsp+D0h] [rbp-18h]
long long v13; // [rsp+D8h] [rbp-10h]
long long v14; // [rsp+E0h] [rbp-8h]
v8 = 0LL;
v9 = 0;
v10 = 0;
v13 = a1;
v11 = a1;
v14 = a1 + a2;
v12 = v14;
return stbi__load_and_postprocess_16bit((long long)v7, a3, a4, a5, a6);
}
| stbi_load_16_from_memory:
SUB RSP,0xe8
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX + 0x10],0x0
XOR R10D,R10D
MOV dword ptr [RAX + 0x30],R10D
MOV dword ptr [RAX + 0xb8],R10D
MOV qword ptr [RAX + 0xd0],RDI
MOV qword ptr [RAX + 0xc0],RDI
MOVSXD RSI,ESI
ADD RSI,RDI
MOV qword ptr [RAX + 0xd8],RSI
MOV qword ptr [RAX + 0xc8],RSI
MOV RDI,RAX
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R8
MOV R8D,R9D
CALL 0x00118a6e
ADD RSP,0xe8
RET
|
void stbi_load_16_from_memory
(long param_1,int param_2,int *param_3,int *param_4,int *param_5,int param_6)
{
stbi__context local_e0 [16];
int8 local_d0;
int4 local_b0;
int4 local_28;
long local_20;
long local_18;
long local_10;
long local_8;
local_d0 = 0;
local_b0 = 0;
local_28 = 0;
local_18 = param_2 + param_1;
local_20 = param_1;
local_10 = param_1;
local_8 = local_18;
stbi__load_and_postprocess_16bit(local_e0,param_3,param_4,param_5,param_6);
return;
}
| |
41,739 | my_write | eloqsql/mysys/my_write.c | size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
{
size_t writtenbytes, written;
uint errors;
DBUG_ENTER("my_write");
DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu",
Filedes, Buffer, (ulong) Count, MyFlags));
errors= 0; written= 0;
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
/* The behavior of write(fd, buf, 0) is not portable */
if (unlikely(!Count))
DBUG_RETURN(0);
for (;;)
{
#ifdef _WIN32
if(Filedes < 0)
{
my_errno= errno= EBADF;
DBUG_RETURN((size_t)-1);
}
writtenbytes= my_win_write(Filedes, Buffer, Count);
#else
writtenbytes= write(Filedes, Buffer, Count);
#endif
/**
To simulate the write error set the errno = error code
and the number pf written bytes to -1.
*/
DBUG_EXECUTE_IF ("simulate_file_write_error",
if (!errors) {
errno= ENOSPC;
writtenbytes= (size_t) -1;
});
if (writtenbytes == Count)
break;
if (writtenbytes != (size_t) -1)
{ /* Safeguard */
written+= writtenbytes;
Buffer+= writtenbytes;
Count-= writtenbytes;
}
my_errno= errno;
DBUG_PRINT("error",("Write only %ld bytes, error: %d",
(long) writtenbytes, my_errno));
#ifndef NO_BACKGROUND
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
if ((my_errno == ENOSPC || my_errno == EDQUOT) &&
(MyFlags & MY_WAIT_IF_FULL))
{
wait_for_free_space(my_filename(Filedes), errors);
errors++;
continue;
}
if ((writtenbytes == 0 || writtenbytes == (size_t) -1))
{
if (my_errno == EINTR)
{
DBUG_PRINT("debug", ("my_write() was interrupted and returned %ld",
(long) writtenbytes));
continue; /* Interrupted */
}
if (!writtenbytes && !errors++) /* Retry once */
{
/* We may come here if the file quota is exeeded */
errno= EFBIG; /* Assume this is the error */
continue;
}
}
else
continue; /* Retry */
#endif
/* Don't give a warning if it's ok that we only write part of the data */
if (MyFlags & (MY_NABP | MY_FNABP))
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
}
DBUG_RETURN(MY_FILE_ERROR); /* Error on read */
}
break; /* Return bytes written */
}
if (MyFlags & (MY_NABP | MY_FNABP))
DBUG_RETURN(0); /* Want only errors */
DBUG_RETURN(writtenbytes+written);
} | O3 | c | my_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movl %edi, %r12d
xorl %ebx, %ebx
movl $0x0, %r13d
testb $0x1a, %cl
jne 0x2f032
leaq 0xbd9199(%rip), %rax # 0xc081c8
movq (%rax), %r13
testq %r15, %r15
je 0x2f176
orq %rcx, %r13
movl %r12d, %edi
movq %rsi, -0x40(%rbp)
movq %r15, %rdx
callq 0x29800
cmpq %r15, %rax
jne 0x2f068
movq %r15, %rcx
xorl %ebx, %ebx
testb $0x6, %r13b
je 0x2f173
xorl %ebx, %ebx
jmp 0x2f176
movq %rax, %r14
movq $0x0, -0x38(%rbp)
callq 0x297b0
movq %r15, %rcx
movq %rax, -0x48(%rbp)
xorl %ebx, %ebx
movq -0x40(%rbp), %r15
movl %r12d, -0x2c(%rbp)
movq %r13, %r12
movq %rbx, %rax
cmpq $-0x1, %r14
movl $0x0, %ebx
cmovneq %r14, %rbx
addq %rbx, %r15
subq %rbx, %rcx
movq %rcx, -0x40(%rbp)
addq %rax, %rbx
movq -0x48(%rbp), %rax
movl (%rax), %r13d
callq 0xa1b22
movl %r13d, (%rax)
callq 0xa1b22
movl %r12d, %r13d
andl $-0x21, %r13d
cmpl $0x0, 0xe0(%rax)
cmoveq %r12, %r13
callq 0xa1b22
cmpl $0x1c, (%rax)
jne 0x2f0e5
testb $0x20, %r13b
movl -0x2c(%rbp), %r12d
je 0x2f0fb
jmp 0x2f135
callq 0xa1b22
cmpl $0x7a, (%rax)
movl -0x2c(%rbp), %r12d
jne 0x2f0fb
movl %r13d, %eax
andl $0x20, %eax
jne 0x2f135
leaq 0x1(%r14), %rax
cmpq $0x1, %rax
ja 0x2f10f
callq 0xa1b22
cmpl $0x4, (%rax)
jne 0x2f155
movl %r12d, %edi
movq %r15, %rsi
movq -0x40(%rbp), %r14
movq %r14, %rdx
callq 0x29800
movq %r14, %rcx
movq %rax, %r14
cmpq %rcx, %rax
jne 0x2f089
jmp 0x2f057
movl %r12d, %edi
callq 0xa9000
movq %rax, %rdi
movq -0x38(%rbp), %r14
movl %r14d, %esi
callq 0xa8a6e
incl %r14d
movq %r14, -0x38(%rbp)
jmp 0x2f10f
testq %r14, %r14
jne 0x2f188
cmpl $0x0, -0x38(%rbp)
jne 0x2f188
movq -0x48(%rbp), %rax
movl $0x1b, (%rax)
pushq $0x1
popq %rax
movq %rax, -0x38(%rbp)
jmp 0x2f10f
addq %rcx, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x6, %r13b
je 0x2f1c6
pushq $-0x1
popq %rbx
testb $0x1a, %r13b
je 0x2f176
andl $0x440, %r13d # imm = 0x440
orq $0x4, %r13
movl %r12d, %edi
callq 0xa9000
movq %rax, %r14
callq 0xa1b22
movl (%rax), %ecx
pushq $0x3
popq %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x9e1d7
jmp 0x2f176
movq %r14, %rcx
jmp 0x2f057
| my_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rdx
mov r12d, edi
xor ebx, ebx
mov r13d, 0
test cl, 1Ah
jnz short loc_2F032
lea rax, my_global_flags
mov r13, [rax]
loc_2F032:
test r15, r15
jz loc_2F176
or r13, rcx
mov edi, r12d
mov [rbp+var_40], rsi
mov rdx, r15
call _write
cmp rax, r15
jnz short loc_2F068
mov rcx, r15
xor ebx, ebx
loc_2F057:
test r13b, 6
jz loc_2F173
xor ebx, ebx
jmp loc_2F176
loc_2F068:
mov r14, rax
mov [rbp+var_38], 0
call ___errno_location
mov rcx, r15
mov [rbp+var_48], rax
xor ebx, ebx
mov r15, [rbp+var_40]
mov [rbp+var_2C], r12d
loc_2F089:
mov r12, r13
mov rax, rbx
cmp r14, 0FFFFFFFFFFFFFFFFh
mov ebx, 0
cmovnz rbx, r14
add r15, rbx
sub rcx, rbx
mov [rbp+var_40], rcx
add rbx, rax
mov rax, [rbp+var_48]
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
call _my_thread_var
mov r13d, r12d
and r13d, 0FFFFFFDFh
cmp dword ptr [rax+0E0h], 0
cmovz r13, r12
call _my_thread_var
cmp dword ptr [rax], 1Ch
jnz short loc_2F0E5
test r13b, 20h
mov r12d, [rbp+var_2C]
jz short loc_2F0FB
jmp short loc_2F135
loc_2F0E5:
call _my_thread_var
cmp dword ptr [rax], 7Ah ; 'z'
mov r12d, [rbp+var_2C]
jnz short loc_2F0FB
mov eax, r13d
and eax, 20h
jnz short loc_2F135
loc_2F0FB:
lea rax, [r14+1]
cmp rax, 1
ja short loc_2F10F
call _my_thread_var
cmp dword ptr [rax], 4
jnz short loc_2F155
loc_2F10F:
mov edi, r12d
mov rsi, r15
mov r14, [rbp+var_40]
mov rdx, r14
call _write
mov rcx, r14
mov r14, rax
cmp rax, rcx
jnz loc_2F089
jmp loc_2F057
loc_2F135:
mov edi, r12d
call my_filename
mov rdi, rax
mov r14, [rbp+var_38]
mov esi, r14d
call wait_for_free_space
inc r14d
mov [rbp+var_38], r14
jmp short loc_2F10F
loc_2F155:
test r14, r14
jnz short loc_2F188
cmp dword ptr [rbp+var_38], 0
jnz short loc_2F188
mov rax, [rbp+var_48]
mov dword ptr [rax], 1Bh
push 1
pop rax
mov [rbp+var_38], rax
jmp short loc_2F10F
loc_2F173:
add rbx, rcx
loc_2F176:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2F188:
test r13b, 6
jz short loc_2F1C6
push 0FFFFFFFFFFFFFFFFh
pop rbx
test r13b, 1Ah
jz short loc_2F176
and r13d, 440h
or r13, 4
mov edi, r12d
call my_filename
mov r14, rax
call _my_thread_var
mov ecx, [rax]
push 3
pop rdi
mov rsi, r13
mov rdx, r14
xor eax, eax
call my_error
jmp short loc_2F176
loc_2F1C6:
mov rcx, r14
jmp loc_2F057
| long long my_write(unsigned int a1, long long a2, long long a3, long long a4)
{
long long v5; // rbx
long long v6; // r13
long long v7; // r13
long long v8; // rax
long long v9; // rcx
long long v10; // rbx
long long v11; // r14
long long v12; // rax
long long v13; // r15
long long v14; // r12
long long v15; // rax
long long v16; // rbx
int v17; // r13d
unsigned int v18; // r12d
long long v19; // rax
long long v20; // rax
int v22; // r14d
_DWORD *v23; // rax
int v24; // r8d
int v25; // r9d
int *v26; // [rsp+8h] [rbp-48h]
long long v27; // [rsp+10h] [rbp-40h]
unsigned int v28; // [rsp+18h] [rbp-38h]
v5 = 0LL;
v6 = 0LL;
if ( (a4 & 0x1A) == 0 )
v6 = my_global_flags;
if ( a3 )
{
v7 = a4 | v6;
v8 = write(a1, a2, a3);
if ( v8 == a3 )
{
v9 = a3;
v10 = 0LL;
goto LABEL_6;
}
v11 = v8;
v28 = 0;
v12 = __errno_location(a1);
v9 = a3;
v26 = (int *)v12;
v10 = 0LL;
v13 = a2;
while ( 1 )
{
v14 = v7;
v15 = v10;
v16 = 0LL;
if ( v11 != -1 )
v16 = v11;
v13 += v16;
v27 = v9 - v16;
v10 = v15 + v16;
v17 = *v26;
*(_DWORD *)my_thread_var() = v17;
v7 = (unsigned int)v14 & 0xFFFFFFDF;
if ( !*(_DWORD *)(my_thread_var() + 224) )
v7 = v14;
if ( *(_DWORD *)my_thread_var() == 28 )
{
v18 = a1;
if ( (v7 & 0x20) != 0 )
goto LABEL_22;
}
else
{
v18 = a1;
if ( *(_DWORD *)my_thread_var() == 122 && (v7 & 0x20) != 0 )
{
LABEL_22:
v20 = my_filename(v18);
wait_for_free_space(v20, v28++);
goto LABEL_20;
}
}
if ( (unsigned long long)(v11 + 1) <= 1 && *(_DWORD *)my_thread_var() != 4 )
{
if ( v11 || v28 )
{
if ( (v7 & 6) != 0 )
{
v5 = -1LL;
if ( (v7 & 0x1A) != 0 )
{
v22 = my_filename(v18);
v23 = (_DWORD *)my_thread_var();
my_error(3, v7 & 0x440 | 4, v22, *v23, v24, v25);
}
return v5;
}
v9 = v11;
LABEL_6:
if ( (v7 & 6) != 0 )
return 0LL;
else
return v9 + v10;
}
*v26 = 27;
v28 = 1;
}
LABEL_20:
v19 = write(v18, v13, v27);
v9 = v27;
v11 = v19;
if ( v19 == v27 )
goto LABEL_6;
}
}
return v5;
}
| my_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDX
MOV R12D,EDI
XOR EBX,EBX
MOV R13D,0x0
TEST CL,0x1a
JNZ 0x0012f032
LEA RAX,[0xd081c8]
MOV R13,qword ptr [RAX]
LAB_0012f032:
TEST R15,R15
JZ 0x0012f176
OR R13,RCX
MOV EDI,R12D
MOV qword ptr [RBP + -0x40],RSI
MOV RDX,R15
CALL 0x00129800
CMP RAX,R15
JNZ 0x0012f068
MOV RCX,R15
XOR EBX,EBX
LAB_0012f057:
TEST R13B,0x6
JZ 0x0012f173
XOR EBX,EBX
JMP 0x0012f176
LAB_0012f068:
MOV R14,RAX
MOV qword ptr [RBP + -0x38],0x0
CALL 0x001297b0
MOV RCX,R15
MOV qword ptr [RBP + -0x48],RAX
XOR EBX,EBX
MOV R15,qword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x2c],R12D
LAB_0012f089:
MOV R12,R13
MOV RAX,RBX
CMP R14,-0x1
MOV EBX,0x0
CMOVNZ RBX,R14
ADD R15,RBX
SUB RCX,RBX
MOV qword ptr [RBP + -0x40],RCX
ADD RBX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV R13D,dword ptr [RAX]
CALL 0x001a1b22
MOV dword ptr [RAX],R13D
CALL 0x001a1b22
MOV R13D,R12D
AND R13D,0xffffffdf
CMP dword ptr [RAX + 0xe0],0x0
CMOVZ R13,R12
CALL 0x001a1b22
CMP dword ptr [RAX],0x1c
JNZ 0x0012f0e5
TEST R13B,0x20
MOV R12D,dword ptr [RBP + -0x2c]
JZ 0x0012f0fb
JMP 0x0012f135
LAB_0012f0e5:
CALL 0x001a1b22
CMP dword ptr [RAX],0x7a
MOV R12D,dword ptr [RBP + -0x2c]
JNZ 0x0012f0fb
MOV EAX,R13D
AND EAX,0x20
JNZ 0x0012f135
LAB_0012f0fb:
LEA RAX,[R14 + 0x1]
CMP RAX,0x1
JA 0x0012f10f
CALL 0x001a1b22
CMP dword ptr [RAX],0x4
JNZ 0x0012f155
LAB_0012f10f:
MOV EDI,R12D
MOV RSI,R15
MOV R14,qword ptr [RBP + -0x40]
MOV RDX,R14
CALL 0x00129800
MOV RCX,R14
MOV R14,RAX
CMP RAX,RCX
JNZ 0x0012f089
JMP 0x0012f057
LAB_0012f135:
MOV EDI,R12D
CALL 0x001a9000
MOV RDI,RAX
MOV R14,qword ptr [RBP + -0x38]
MOV ESI,R14D
CALL 0x001a8a6e
INC R14D
MOV qword ptr [RBP + -0x38],R14
JMP 0x0012f10f
LAB_0012f155:
TEST R14,R14
JNZ 0x0012f188
CMP dword ptr [RBP + -0x38],0x0
JNZ 0x0012f188
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX],0x1b
PUSH 0x1
POP RAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0012f10f
LAB_0012f173:
ADD RBX,RCX
LAB_0012f176:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012f188:
TEST R13B,0x6
JZ 0x0012f1c6
PUSH -0x1
POP RBX
TEST R13B,0x1a
JZ 0x0012f176
AND R13D,0x440
OR R13,0x4
MOV EDI,R12D
CALL 0x001a9000
MOV R14,RAX
CALL 0x001a1b22
MOV ECX,dword ptr [RAX]
PUSH 0x3
POP RDI
MOV RSI,R13
MOV RDX,R14
XOR EAX,EAX
CALL 0x0019e1d7
JMP 0x0012f176
LAB_0012f1c6:
MOV RCX,R14
JMP 0x0012f057
|
long my_write(int param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
size_t sVar2;
int *piVar3;
int *piVar4;
long lVar5;
int8 uVar6;
int4 *puVar7;
size_t sVar8;
long lVar9;
ulong uVar10;
ulong uVar11;
int iVar12;
lVar9 = 0;
uVar10 = 0;
if ((param_4 & 0x1a) == 0) {
uVar10 = my_global_flags;
}
if (param_3 != 0) {
uVar10 = uVar10 | param_4;
sVar2 = write(param_1,param_2,param_3);
if (sVar2 == param_3) {
lVar9 = 0;
}
else {
iVar12 = 0;
piVar3 = __errno_location();
lVar9 = 0;
uVar11 = uVar10;
do {
sVar8 = 0;
if (sVar2 != 0xffffffffffffffff) {
sVar8 = sVar2;
}
param_2 = (void *)((long)param_2 + sVar8);
param_3 = param_3 - sVar8;
lVar9 = sVar8 + lVar9;
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
lVar5 = _my_thread_var();
uVar10 = (ulong)((uint)uVar11 & 0xffffffdf);
if (*(int *)(lVar5 + 0xe0) == 0) {
uVar10 = uVar11;
}
piVar4 = (int *)_my_thread_var();
if (*piVar4 == 0x1c) {
if ((uVar10 & 0x20) != 0) goto LAB_0012f135;
LAB_0012f0fb:
if ((sVar2 + 1 < 2) && (piVar4 = (int *)_my_thread_var(), *piVar4 != 4)) {
if ((sVar2 != 0) || (iVar12 != 0)) {
param_3 = sVar2;
if ((uVar10 & 6) != 0) {
if ((uVar10 & 0x1a) == 0) {
return -1;
}
uVar6 = my_filename(param_1);
puVar7 = (int4 *)_my_thread_var();
my_error(3,(uint)uVar10 & 0x440 | 4,uVar6,*puVar7);
return -1;
}
break;
}
*piVar3 = 0x1b;
iVar12 = 1;
}
}
else {
piVar4 = (int *)_my_thread_var();
if ((*piVar4 != 0x7a) || ((uVar10 & 0x20) == 0)) goto LAB_0012f0fb;
LAB_0012f135:
uVar6 = my_filename(param_1);
wait_for_free_space(uVar6,iVar12);
iVar12 = iVar12 + 1;
}
sVar2 = write(param_1,param_2,param_3);
uVar11 = uVar10;
} while (sVar2 != param_3);
}
if ((uVar10 & 6) == 0) {
lVar9 = lVar9 + param_3;
}
else {
lVar9 = 0;
}
}
return lVar9;
}
| |
41,740 | mi_setup_functions | eloqsql/storage/myisam/mi_open.c | void mi_setup_functions(register MYISAM_SHARE *share)
{
if (share->options & HA_OPTION_COMPRESS_RECORD)
{
share->read_record=_mi_read_pack_record;
share->read_rnd=_mi_read_rnd_pack_record;
if ((share->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_NULL_FIELDS)) ||
share->has_varchar_fields)
share->calc_checksum= mi_checksum;
else
share->calc_checksum= mi_static_checksum;
share->calc_check_checksum= share->calc_checksum;
if (!(share->options & HA_OPTION_TEMP_COMPRESS_RECORD))
share->calc_checksum=0; /* No checksum */
}
else if (share->options & HA_OPTION_PACK_RECORD)
{
share->read_record=_mi_read_dynamic_record;
share->read_rnd=_mi_read_rnd_dynamic_record;
share->delete_record=_mi_delete_dynamic_record;
share->compare_record=_mi_cmp_dynamic_record;
share->compare_unique=_mi_cmp_dynamic_unique;
share->calc_checksum= mi_checksum;
share->calc_check_checksum= share->calc_checksum;
/* add bits used to pack data to pack_reclength for faster allocation */
share->base.pack_reclength+= share->base.pack_bits;
if (share->base.blobs)
{
share->update_record=_mi_update_blob_record;
share->write_record=_mi_write_blob_record;
}
else
{
share->write_record=_mi_write_dynamic_record;
share->update_record=_mi_update_dynamic_record;
}
}
else
{
share->read_record=_mi_read_static_record;
share->read_rnd=_mi_read_rnd_static_record;
share->delete_record=_mi_delete_static_record;
share->compare_record=_mi_cmp_static_record;
share->update_record=_mi_update_static_record;
share->write_record=_mi_write_static_record;
share->compare_unique=_mi_cmp_static_unique;
if (share->options & HA_OPTION_NULL_FIELDS)
share->calc_checksum= mi_checksum;
else
share->calc_checksum= mi_static_checksum;
share->calc_check_checksum= share->calc_checksum;
}
share->file_read= mi_nommap_pread;
share->file_write= mi_nommap_pwrite;
if (!(share->options & HA_OPTION_CHECKSUM))
share->calc_checksum=0;
return;
} | O3 | c | mi_setup_functions:
pushq %rbp
movq %rsp, %rbp
movq 0x318(%rdi), %rax
testb $0x4, %al
jne 0x7f4d8
testb $0x1, %al
jne 0x7f538
leaq 0x76de(%rip), %rcx # 0x86b45
movq %rcx, 0x298(%rdi)
leaq 0x77b9(%rip), %rcx # 0x86c2e
movq %rcx, 0x2b8(%rdi)
leaq 0x74e5(%rip), %rcx # 0x86968
movq %rcx, 0x2b0(%rdi)
leaq 0x757c(%rip), %rcx # 0x86a0d
movq %rcx, 0x2c0(%rdi)
leaq 0x748f(%rip), %rcx # 0x8692e
movq %rcx, 0x2a8(%rdi)
leaq 0x71cf(%rip), %rcx # 0x8667c
movq %rcx, 0x2a0(%rdi)
leaq 0x761a(%rip), %rcx # 0x86ad5
movq %rcx, 0x2d8(%rdi)
btl $0xa, %eax
jb 0x7f5e4
leaq 0xf7bf(%rip), %rdx # 0x8ec92
jmp 0x7f5eb
leaq 0x1c49(%rip), %rcx # 0x81128
movq %rcx, 0x298(%rdi)
leaq 0x2126(%rip), %rcx # 0x81613
movq %rcx, 0x2b8(%rdi)
testl $0x401, %eax # imm = 0x401
jne 0x7f50d
cmpb $0x0, 0x37e(%rdi)
jne 0x7f50d
leaq 0xf787(%rip), %rcx # 0x8ec92
jmp 0x7f514
leaq 0xf678(%rip), %rcx # 0x8eb8c
movq %rcx, 0x2c8(%rdi)
movq %rcx, 0x2d0(%rdi)
testw %ax, %ax
js 0x7f600
movl $0x2c8, %ecx # imm = 0x2C8
xorl %r8d, %r8d
jmp 0x7f5fc
leaq -0x6b2f(%rip), %rcx # 0x78a10
movq %rcx, 0x298(%rdi)
leaq -0x6326(%rip), %rcx # 0x79227
movq %rcx, 0x2b8(%rdi)
leaq -0x80e4(%rip), %rcx # 0x77477
movq %rcx, 0x2b0(%rdi)
leaq -0x676c(%rip), %rcx # 0x78dfd
movq %rcx, 0x2c0(%rdi)
leaq -0x685f(%rip), %rcx # 0x78d18
movq %rcx, 0x2d8(%rdi)
leaq 0xf607(%rip), %rcx # 0x8eb8c
movq %rcx, 0x2c8(%rdi)
movq %rcx, 0x2d0(%rdi)
movl 0x18c(%rdi), %ecx
addq %rcx, 0x148(%rdi)
xorl %ecx, %ecx
xorl %esi, %esi
cmpl $0x0, 0x188(%rdi)
sete %cl
setne %sil
leaq -0x81d6(%rip), %rdx # 0x773e3
cmoveq 0x3039d7(%rip), %rdx # 0x382f98
leaq -0x82ee(%rip), %r8 # 0x772da
cmoveq 0x3039c0(%rip), %r8 # 0x382f90
shll $0x3, %esi
movl $0x2a0, %r9d # imm = 0x2A0
orq %r9, %rsi
shll $0x3, %ecx
orq %r9, %rcx
jmp 0x7f5f8
leaq 0xf5a1(%rip), %rdx # 0x8eb8c
movl $0x2d0, %ecx # imm = 0x2D0
movl $0x2c8, %esi # imm = 0x2C8
movq %rdx, %r8
movq %rdx, (%rdi,%rsi)
movq %r8, (%rdi,%rcx)
leaq -0x8df7(%rip), %rcx # 0x76810
movq %rcx, 0x2e0(%rdi)
leaq -0x8d2b(%rip), %rcx # 0x768ea
movq %rcx, 0x2e8(%rdi)
testb $0x20, %al
jne 0x7f62b
movq $0x0, 0x2c8(%rdi)
popq %rbp
retq
| mi_setup_functions:
push rbp
mov rbp, rsp
mov rax, [rdi+318h]
test al, 4
jnz loc_7F4D8
test al, 1
jnz loc_7F538
lea rcx, _mi_read_static_record
mov [rdi+298h], rcx
lea rcx, _mi_read_rnd_static_record
mov [rdi+2B8h], rcx
lea rcx, _mi_delete_static_record
mov [rdi+2B0h], rcx
lea rcx, _mi_cmp_static_record
mov [rdi+2C0h], rcx
lea rcx, _mi_update_static_record
mov [rdi+2A8h], rcx
lea rcx, _mi_write_static_record
mov [rdi+2A0h], rcx
lea rcx, _mi_cmp_static_unique
mov [rdi+2D8h], rcx
bt eax, 0Ah
jb loc_7F5E4
lea rdx, mi_static_checksum
jmp loc_7F5EB
loc_7F4D8:
lea rcx, _mi_read_pack_record
mov [rdi+298h], rcx
lea rcx, _mi_read_rnd_pack_record
mov [rdi+2B8h], rcx
test eax, 401h
jnz short loc_7F50D
cmp byte ptr [rdi+37Eh], 0
jnz short loc_7F50D
lea rcx, mi_static_checksum
jmp short loc_7F514
loc_7F50D:
lea rcx, mi_checksum
loc_7F514:
mov [rdi+2C8h], rcx
mov [rdi+2D0h], rcx
test ax, ax
js loc_7F600
mov ecx, 2C8h
xor r8d, r8d
jmp loc_7F5FC
loc_7F538:
lea rcx, _mi_read_dynamic_record
mov [rdi+298h], rcx
lea rcx, _mi_read_rnd_dynamic_record
mov [rdi+2B8h], rcx
lea rcx, _mi_delete_dynamic_record
mov [rdi+2B0h], rcx
lea rcx, _mi_cmp_dynamic_record
mov [rdi+2C0h], rcx
lea rcx, _mi_cmp_dynamic_unique
mov [rdi+2D8h], rcx
lea rcx, mi_checksum
mov [rdi+2C8h], rcx
mov [rdi+2D0h], rcx
mov ecx, [rdi+18Ch]
add [rdi+148h], rcx
xor ecx, ecx
xor esi, esi
cmp dword ptr [rdi+188h], 0
setz cl
setnz sil
lea rdx, _mi_update_blob_record
cmovz rdx, cs:_mi_write_dynamic_record_ptr
lea r8, _mi_write_blob_record
cmovz r8, cs:_mi_update_dynamic_record_ptr
shl esi, 3
mov r9d, 2A0h
or rsi, r9
shl ecx, 3
or rcx, r9
jmp short loc_7F5F8
loc_7F5E4:
lea rdx, mi_checksum
loc_7F5EB:
mov ecx, 2D0h
mov esi, 2C8h
mov r8, rdx
loc_7F5F8:
mov [rdi+rsi], rdx
loc_7F5FC:
mov [rdi+rcx], r8
loc_7F600:
lea rcx, mi_nommap_pread
mov [rdi+2E0h], rcx
lea rcx, mi_nommap_pwrite
mov [rdi+2E8h], rcx
test al, 20h
jnz short loc_7F62B
mov qword ptr [rdi+2C8h], 0
loc_7F62B:
pop rbp
retn
| long long mi_setup_functions(long long a1)
{
long long result; // rax
long long ( *v2)(); // rdx
long long ( *v3)(); // rcx
long long v4; // rcx
void *v5; // r8
long long v6; // rsi
result = *(_QWORD *)(a1 + 792);
if ( (result & 4) == 0 )
{
if ( (result & 1) != 0 )
{
*(_QWORD *)(a1 + 664) = mi_read_dynamic_record;
*(_QWORD *)(a1 + 696) = mi_read_rnd_dynamic_record;
*(_QWORD *)(a1 + 688) = mi_delete_dynamic_record;
*(_QWORD *)(a1 + 704) = mi_cmp_dynamic_record;
*(_QWORD *)(a1 + 728) = mi_cmp_dynamic_unique;
*(_QWORD *)(a1 + 712) = mi_checksum;
*(_QWORD *)(a1 + 720) = mi_checksum;
*(_QWORD *)(a1 + 328) += *(unsigned int *)(a1 + 396);
v2 = (long long ( *)())mi_update_blob_record;
if ( !*(_DWORD *)(a1 + 392) )
v2 = (long long ( *)())mi_write_dynamic_record;
v5 = mi_write_blob_record;
if ( !*(_DWORD *)(a1 + 392) )
v5 = mi_update_dynamic_record;
v6 = (8 * (unsigned int)(*(_DWORD *)(a1 + 392) != 0)) | 0x2A0LL;
v4 = (8 * (unsigned int)(*(_DWORD *)(a1 + 392) == 0)) | 0x2A0LL;
}
else
{
*(_QWORD *)(a1 + 664) = mi_read_static_record;
*(_QWORD *)(a1 + 696) = mi_read_rnd_static_record;
*(_QWORD *)(a1 + 688) = mi_delete_static_record;
*(_QWORD *)(a1 + 704) = mi_cmp_static_record;
*(_QWORD *)(a1 + 680) = mi_update_static_record;
*(_QWORD *)(a1 + 672) = mi_write_static_record;
*(_QWORD *)(a1 + 728) = mi_cmp_static_unique;
if ( (result & 0x400) != 0 )
v2 = mi_checksum;
else
v2 = mi_static_checksum;
v4 = 720LL;
v6 = 712LL;
v5 = v2;
}
*(_QWORD *)(a1 + v6) = v2;
goto LABEL_19;
}
*(_QWORD *)(a1 + 664) = mi_read_pack_record;
*(_QWORD *)(a1 + 696) = mi_read_rnd_pack_record;
if ( (result & 0x401) != 0 || *(_BYTE *)(a1 + 894) )
v3 = mi_checksum;
else
v3 = mi_static_checksum;
*(_QWORD *)(a1 + 712) = v3;
*(_QWORD *)(a1 + 720) = v3;
if ( (result & 0x8000u) == 0LL )
{
v4 = 712LL;
v5 = 0LL;
LABEL_19:
*(_QWORD *)(a1 + v4) = v5;
}
*(_QWORD *)(a1 + 736) = mi_nommap_pread;
*(_QWORD *)(a1 + 744) = mi_nommap_pwrite;
if ( (result & 0x20) == 0 )
*(_QWORD *)(a1 + 712) = 0LL;
return result;
}
| mi_setup_functions:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI + 0x318]
TEST AL,0x4
JNZ 0x0017f4d8
TEST AL,0x1
JNZ 0x0017f538
LEA RCX,[0x186b45]
MOV qword ptr [RDI + 0x298],RCX
LEA RCX,[0x186c2e]
MOV qword ptr [RDI + 0x2b8],RCX
LEA RCX,[0x186968]
MOV qword ptr [RDI + 0x2b0],RCX
LEA RCX,[0x186a0d]
MOV qword ptr [RDI + 0x2c0],RCX
LEA RCX,[0x18692e]
MOV qword ptr [RDI + 0x2a8],RCX
LEA RCX,[0x18667c]
MOV qword ptr [RDI + 0x2a0],RCX
LEA RCX,[0x186ad5]
MOV qword ptr [RDI + 0x2d8],RCX
BT EAX,0xa
JC 0x0017f5e4
LEA RDX,[0x18ec92]
JMP 0x0017f5eb
LAB_0017f4d8:
LEA RCX,[0x181128]
MOV qword ptr [RDI + 0x298],RCX
LEA RCX,[0x181613]
MOV qword ptr [RDI + 0x2b8],RCX
TEST EAX,0x401
JNZ 0x0017f50d
CMP byte ptr [RDI + 0x37e],0x0
JNZ 0x0017f50d
LEA RCX,[0x18ec92]
JMP 0x0017f514
LAB_0017f50d:
LEA RCX,[0x18eb8c]
LAB_0017f514:
MOV qword ptr [RDI + 0x2c8],RCX
MOV qword ptr [RDI + 0x2d0],RCX
TEST AX,AX
JS 0x0017f600
MOV ECX,0x2c8
XOR R8D,R8D
JMP 0x0017f5fc
LAB_0017f538:
LEA RCX,[0x178a10]
MOV qword ptr [RDI + 0x298],RCX
LEA RCX,[0x179227]
MOV qword ptr [RDI + 0x2b8],RCX
LEA RCX,[0x177477]
MOV qword ptr [RDI + 0x2b0],RCX
LEA RCX,[0x178dfd]
MOV qword ptr [RDI + 0x2c0],RCX
LEA RCX,[0x178d18]
MOV qword ptr [RDI + 0x2d8],RCX
LEA RCX,[0x18eb8c]
MOV qword ptr [RDI + 0x2c8],RCX
MOV qword ptr [RDI + 0x2d0],RCX
MOV ECX,dword ptr [RDI + 0x18c]
ADD qword ptr [RDI + 0x148],RCX
XOR ECX,ECX
XOR ESI,ESI
CMP dword ptr [RDI + 0x188],0x0
SETZ CL
SETNZ SIL
LEA RDX,[0x1773e3]
CMOVZ RDX,qword ptr [0x00482f98]
LEA R8,[0x1772da]
CMOVZ R8,qword ptr [0x00482f90]
SHL ESI,0x3
MOV R9D,0x2a0
OR RSI,R9
SHL ECX,0x3
OR RCX,R9
JMP 0x0017f5f8
LAB_0017f5e4:
LEA RDX,[0x18eb8c]
LAB_0017f5eb:
MOV ECX,0x2d0
MOV ESI,0x2c8
MOV R8,RDX
LAB_0017f5f8:
MOV qword ptr [RDI + RSI*0x1],RDX
LAB_0017f5fc:
MOV qword ptr [RDI + RCX*0x1],R8
LAB_0017f600:
LEA RCX,[0x176810]
MOV qword ptr [RDI + 0x2e0],RCX
LEA RCX,[0x1768ea]
MOV qword ptr [RDI + 0x2e8],RCX
TEST AL,0x20
JNZ 0x0017f62b
MOV qword ptr [RDI + 0x2c8],0x0
LAB_0017f62b:
POP RBP
RET
|
void mi_setup_functions(long param_1)
{
ulong uVar1;
ulong uVar2;
code *pcVar3;
ulong uVar4;
code *pcVar5;
bool bVar6;
uVar1 = *(ulong *)(param_1 + 0x318);
if ((uVar1 & 4) == 0) {
if ((uVar1 & 1) == 0) {
*(code **)(param_1 + 0x298) = _mi_read_static_record;
*(code **)(param_1 + 0x2b8) = _mi_read_rnd_static_record;
*(code **)(param_1 + 0x2b0) = _mi_delete_static_record;
*(code **)(param_1 + 0x2c0) = _mi_cmp_static_record;
*(code **)(param_1 + 0x2a8) = _mi_update_static_record;
*(code **)(param_1 + 0x2a0) = _mi_write_static_record;
*(code **)(param_1 + 0x2d8) = _mi_cmp_static_unique;
if (((uint)uVar1 >> 10 & 1) == 0) {
pcVar3 = mi_static_checksum;
}
else {
pcVar3 = mi_checksum;
}
uVar2 = 0x2d0;
uVar4 = 0x2c8;
pcVar5 = pcVar3;
}
else {
*(code **)(param_1 + 0x298) = _mi_read_dynamic_record;
*(code **)(param_1 + 0x2b8) = _mi_read_rnd_dynamic_record;
*(code **)(param_1 + 0x2b0) = _mi_delete_dynamic_record;
*(code **)(param_1 + 0x2c0) = _mi_cmp_dynamic_record;
*(code **)(param_1 + 0x2d8) = _mi_cmp_dynamic_unique;
*(code **)(param_1 + 0x2c8) = mi_checksum;
*(code **)(param_1 + 0x2d0) = mi_checksum;
*(long *)(param_1 + 0x148) = *(long *)(param_1 + 0x148) + (ulong)*(uint *)(param_1 + 0x18c);
bVar6 = *(int *)(param_1 + 0x188) == 0;
pcVar3 = _mi_update_blob_record;
if (bVar6) {
pcVar3 = (code *)PTR__mi_write_dynamic_record_00482f98;
}
pcVar5 = _mi_write_blob_record;
if (bVar6) {
pcVar5 = (code *)PTR__mi_update_dynamic_record_00482f90;
}
uVar4 = (ulong)!bVar6 << 3 | 0x2a0;
uVar2 = (ulong)bVar6 << 3 | 0x2a0;
}
*(code **)(param_1 + uVar4) = pcVar3;
}
else {
*(code **)(param_1 + 0x298) = _mi_read_pack_record;
*(code **)(param_1 + 0x2b8) = _mi_read_rnd_pack_record;
if (((uVar1 & 0x401) == 0) && (*(char *)(param_1 + 0x37e) == '\0')) {
pcVar5 = mi_static_checksum;
}
else {
pcVar5 = mi_checksum;
}
*(code **)(param_1 + 0x2c8) = pcVar5;
*(code **)(param_1 + 0x2d0) = pcVar5;
if ((short)uVar1 < 0) goto LAB_0017f600;
uVar2 = 0x2c8;
pcVar5 = (code *)0x0;
}
*(code **)(param_1 + uVar2) = pcVar5;
LAB_0017f600:
*(code **)(param_1 + 0x2e0) = mi_nommap_pread;
*(code **)(param_1 + 0x2e8) = mi_nommap_pwrite;
if ((uVar1 & 0x20) == 0) {
*(int8 *)(param_1 + 0x2c8) = 0;
}
return;
}
| |
41,741 | ggml_backend_tensor_alloc | ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp | enum ggml_status ggml_backend_tensor_alloc(ggml_backend_buffer_t buffer, struct ggml_tensor * tensor, void * addr) {
GGML_ASSERT(tensor->buffer == NULL);
GGML_ASSERT(tensor->data == NULL);
GGML_ASSERT(tensor->view_src == NULL);
GGML_ASSERT(addr >= ggml_backend_buffer_get_base(buffer));
GGML_ASSERT((char *)addr + ggml_backend_buffer_get_alloc_size(buffer, tensor) <=
(char *)ggml_backend_buffer_get_base(buffer) + ggml_backend_buffer_get_size(buffer));
tensor->buffer = buffer;
tensor->data = addr;
return ggml_backend_buffer_init_tensor(buffer, tensor);
} | O0 | cpp | ggml_backend_tensor_alloc:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x62e10
leaq 0x54833(%rip), %rdi # 0xb7629
movl $0x67a, %esi # imm = 0x67A
leaq 0x51800(%rip), %rdx # 0xb4602
leaq 0x54d19(%rip), %rcx # 0xb7b22
movb $0x0, %al
callq 0x46780
movq 0x28(%rsp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x62e40
leaq 0x54803(%rip), %rdi # 0xb7629
movl $0x67b, %esi # imm = 0x67B
leaq 0x517d0(%rip), %rdx # 0xb4602
leaq 0x54d59(%rip), %rcx # 0xb7b92
movb $0x0, %al
callq 0x46780
movq 0x28(%rsp), %rax
cmpq $0x0, 0xe8(%rax)
je 0x62e70
leaq 0x547d3(%rip), %rdi # 0xb7629
movl $0x67c, %esi # imm = 0x67C
leaq 0x517a0(%rip), %rdx # 0xb4602
leaq 0x54d3e(%rip), %rcx # 0xb7ba7
movb $0x0, %al
callq 0x46780
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
callq 0x44ca0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x62eb2
leaq 0x54791(%rip), %rdi # 0xb7629
movl $0x67d, %esi # imm = 0x67D
leaq 0x5175e(%rip), %rdx # 0xb4602
leaq 0x54d15(%rip), %rcx # 0xb7bc0
movb $0x0, %al
callq 0x46780
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x41a00
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
callq 0x44ca0
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x457f0
movq 0x8(%rsp), %rcx
movq %rax, %rdx
movq 0x10(%rsp), %rax
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x62f28
leaq 0x5471b(%rip), %rdi # 0xb7629
movl $0x67f, %esi # imm = 0x67F
leaq 0x516e8(%rip), %rdx # 0xb4602
leaq 0x54ccc(%rip), %rcx # 0xb7bed
movb $0x0, %al
callq 0x46780
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0xf8(%rax)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x435e0
addq $0x38, %rsp
retq
nopl (%rax,%rax)
| ggml_backend_tensor_alloc:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov rax, [rsp+38h+var_10]
cmp qword ptr [rax+8], 0
jz short loc_62E10
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 67Ah
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorBufferNu; "tensor->buffer == NULL"
mov al, 0
call _ggml_abort
loc_62E10:
mov rax, [rsp+38h+var_10]
cmp qword ptr [rax+0F8h], 0
jz short loc_62E40
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 67Bh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorDataNull_0; "tensor->data == NULL"
mov al, 0
call _ggml_abort
loc_62E40:
mov rax, [rsp+38h+var_10]
cmp qword ptr [rax+0E8h], 0
jz short loc_62E70
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 67Ch
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorViewSrcN_0; "tensor->view_src == NULL"
mov al, 0
call _ggml_abort
loc_62E70:
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_20], rax
mov rdi, [rsp+38h+var_8]
call _ggml_backend_buffer_get_base
mov rcx, rax
mov rax, [rsp+38h+var_20]
cmp rax, rcx
jnb short loc_62EB2
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 67Dh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAddrGgmlBacken; "addr >= ggml_backend_buffer_get_base(bu"...
mov al, 0
call _ggml_abort
loc_62EB2:
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_38], rax
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call _ggml_backend_buffer_get_alloc_size
mov rcx, rax
mov rax, [rsp+38h+var_38]
add rax, rcx
mov [rsp+38h+var_28], rax
mov rdi, [rsp+38h+var_8]
call _ggml_backend_buffer_get_base
mov [rsp+38h+var_30], rax
mov rdi, [rsp+38h+var_8]
call _ggml_backend_buffer_get_size
mov rcx, [rsp+38h+var_30]
mov rdx, rax
mov rax, [rsp+38h+var_28]
add rcx, rdx
cmp rax, rcx
jbe short loc_62F28
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 67Fh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCharAddrGgmlBa; "(char *)addr + ggml_backend_buffer_get_"...
mov al, 0
call _ggml_abort
loc_62F28:
mov rcx, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov [rax+8], rcx
mov rcx, [rsp+38h+var_18]
mov rax, [rsp+38h+var_10]
mov [rax+0F8h], rcx
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call _ggml_backend_buffer_init_tensor
add rsp, 38h
retn
| long long ggml_backend_tensor_alloc(long long a1, _QWORD *a2, unsigned long long a3)
{
long long base; // [rsp+8h] [rbp-30h]
unsigned long long v5; // [rsp+10h] [rbp-28h]
if ( a2[1] )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
1658,
(long long)"GGML_ASSERT(%s) failed",
"tensor->buffer == NULL");
if ( a2[31] )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
1659,
(long long)"GGML_ASSERT(%s) failed",
"tensor->data == NULL");
if ( a2[29] )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
1660,
(long long)"GGML_ASSERT(%s) failed",
"tensor->view_src == NULL");
if ( a3 < ggml_backend_buffer_get_base(a1) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
1661,
(long long)"GGML_ASSERT(%s) failed",
"addr >= ggml_backend_buffer_get_base(buffer)");
v5 = ggml_backend_buffer_get_alloc_size(a1, a2) + a3;
base = ggml_backend_buffer_get_base(a1);
if ( v5 > ggml_backend_buffer_get_size(a1) + base )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
1663,
(long long)"GGML_ASSERT(%s) failed",
"(char *)addr + ggml_backend_buffer_get_alloc_size(buffer, tensor) <= (char *)ggml_backend_buffer_get_base(buffer) "
"+ ggml_backend_buffer_get_size(buffer)");
a2[1] = a1;
a2[31] = a3;
return ggml_backend_buffer_init_tensor(a1, (long long)a2);
}
| ggml_backend_tensor_alloc:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x28]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00162e10
LEA RDI,[0x1b7629]
MOV ESI,0x67a
LEA RDX,[0x1b4602]
LEA RCX,[0x1b7b22]
MOV AL,0x0
CALL 0x00146780
LAB_00162e10:
MOV RAX,qword ptr [RSP + 0x28]
CMP qword ptr [RAX + 0xf8],0x0
JZ 0x00162e40
LEA RDI,[0x1b7629]
MOV ESI,0x67b
LEA RDX,[0x1b4602]
LEA RCX,[0x1b7b92]
MOV AL,0x0
CALL 0x00146780
LAB_00162e40:
MOV RAX,qword ptr [RSP + 0x28]
CMP qword ptr [RAX + 0xe8],0x0
JZ 0x00162e70
LEA RDI,[0x1b7629]
MOV ESI,0x67c
LEA RDX,[0x1b4602]
LEA RCX,[0x1b7ba7]
MOV AL,0x0
CALL 0x00146780
LAB_00162e70:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00144ca0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
CMP RAX,RCX
JNC 0x00162eb2
LEA RDI,[0x1b7629]
MOV ESI,0x67d
LEA RDX,[0x1b4602]
LEA RCX,[0x1b7bc0]
MOV AL,0x0
CALL 0x00146780
LAB_00162eb2:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00141a00
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00144ca0
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001457f0
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x10]
ADD RCX,RDX
CMP RAX,RCX
JBE 0x00162f28
LEA RDI,[0x1b7629]
MOV ESI,0x67f
LEA RDX,[0x1b4602]
LEA RCX,[0x1b7bed]
MOV AL,0x0
CALL 0x00146780
LAB_00162f28:
MOV RCX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0xf8],RCX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001435e0
ADD RSP,0x38
RET
|
void ggml_backend_tensor_alloc(int8 param_1,long param_2,ulong param_3)
{
ulong uVar1;
long lVar2;
long lVar3;
long lVar4;
if (*(long *)(param_2 + 8) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x67a,"GGML_ASSERT(%s) failed","tensor->buffer == NULL");
}
if (*(long *)(param_2 + 0xf8) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x67b,"GGML_ASSERT(%s) failed","tensor->data == NULL");
}
if (*(long *)(param_2 + 0xe8) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x67c,"GGML_ASSERT(%s) failed","tensor->view_src == NULL");
}
uVar1 = ggml_backend_buffer_get_base(param_1);
if (param_3 < uVar1) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x67d,"GGML_ASSERT(%s) failed","addr >= ggml_backend_buffer_get_base(buffer)");
}
lVar2 = ggml_backend_buffer_get_alloc_size(param_1,param_2);
lVar3 = ggml_backend_buffer_get_base(param_1);
lVar4 = ggml_backend_buffer_get_size(param_1);
if ((ulong)(lVar3 + lVar4) < param_3 + lVar2) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x67f,"GGML_ASSERT(%s) failed",
"(char *)addr + ggml_backend_buffer_get_alloc_size(buffer, tensor) <= (char *)ggml_backend_buffer_get_base(buffer) + ggml_backend_buffer_get_size(buffer)"
);
}
*(int8 *)(param_2 + 8) = param_1;
*(ulong *)(param_2 + 0xf8) = param_3;
ggml_backend_buffer_init_tensor(param_1,param_2);
return;
}
| |
41,742 | google::protobuf::DescriptorBuilder::BuildMethod(google::protobuf::MethodDescriptorProto const&, google::protobuf::ServiceDescriptor const*, google::protobuf::MethodDescriptor*, google::protobuf::internal::FlatAllocator&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void DescriptorBuilder::BuildMethod(const MethodDescriptorProto& proto,
const ServiceDescriptor* parent,
MethodDescriptor* result,
internal::FlatAllocator& alloc) {
result->service_ = parent;
result->all_names_ =
AllocateNameStrings(parent->full_name(), proto.name(), alloc);
ValidateSymbolName(proto.name(), result->full_name(), proto);
// These will be filled in when cross-linking.
result->input_type_.Init();
result->output_type_.Init();
// Copy options.
result->options_ = nullptr; // Set to default_instance later if necessary.
if (proto.has_options()) {
AllocateOptions(proto.options(), result,
MethodDescriptorProto::kOptionsFieldNumber,
"google.protobuf.MethodOptions", alloc);
}
result->client_streaming_ = proto.client_streaming();
result->server_streaming_ = proto.server_streaming();
AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result));
} | O3 | cpp | google::protobuf::DescriptorBuilder::BuildMethod(google::protobuf::MethodDescriptorProto const&, google::protobuf::ServiceDescriptor const*, google::protobuf::MethodDescriptor*, google::protobuf::internal::FlatAllocator&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movq %rdx, 0x10(%rcx)
movq 0x8(%rdx), %rsi
addq $0x20, %rsi
movq 0x18(%r14), %rdx
andq $-0x4, %rdx
movq %r8, %rcx
callq 0xd2d98
movq %rax, 0x8(%rbx)
movq 0x18(%r14), %rsi
andq $-0x4, %rsi
leaq 0x20(%rax), %rdx
movq %r12, %rdi
movq %r14, %rcx
callq 0xcced6
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
movq $0x0, 0x38(%rbx)
testb $0x8, 0x10(%r14)
je 0xd5992
movq 0x30(%r14), %rbp
testq %rbp, %rbp
jne 0xd5942
leaq 0x13c836(%rip), %rbp # 0x212178
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x97644(%rip), %rsi # 0x16cf96
leaq 0x9765a(%rip), %rdx # 0x16cfb3
leaq 0x8(%rsp), %rdi
callq 0x2c610
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movl $0x4, %ecx
leaq 0x8(%rsp), %r8
movq %r13, %r9
callq 0xe17e2
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd5992
callq 0x2d160
movb 0x38(%r14), %al
movb %al, 0x1(%rbx)
movb 0x39(%r14), %al
movb %al, 0x2(%rbx)
movq 0x8(%rbx), %rsi
addq $0x20, %rsi
movb $0x8, (%rbx)
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %r8
movq %rbx, %r9
callq 0xcc1a0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd59e2
callq 0x2d160
movq %rbx, %rdi
callq 0x2e220
| _ZN6google8protobuf17DescriptorBuilder11BuildMethodERKNS0_21MethodDescriptorProtoEPKNS0_17ServiceDescriptorEPNS0_16MethodDescriptorERNS0_8internal13FlatAllocatorE:
push rbp; int
push r15; int
push r14; int
push r13; void *
push r12; int
push rbx; char
sub rsp, 28h
mov r13, r8
mov rbx, rcx
mov r15, rdx
mov r14, rsi
mov r12, rdi
mov [rcx+10h], rdx
mov rsi, [rdx+8]
add rsi, 20h ; ' '
mov rdx, [r14+18h]
and rdx, 0FFFFFFFFFFFFFFFCh
mov rcx, r8
call _ZN6google8protobuf17DescriptorBuilder19AllocateNameStringsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateNameStrings(std::string const&,std::string const&,google::protobuf::internal::FlatAllocator &)
mov [rbx+8], rax
mov rsi, [r14+18h]
and rsi, 0FFFFFFFFFFFFFFFCh; int
lea rdx, [rax+20h]; int
mov rdi, r12; int
mov rcx, r14; int
call _ZN6google8protobuf17DescriptorBuilder18ValidateSymbolNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RKNS0_7MessageE; google::protobuf::DescriptorBuilder::ValidateSymbolName(std::string const&,std::string const&,google::protobuf::Message const&)
xorps xmm0, xmm0
movups xmmword ptr [rbx+28h], xmm0
movups xmmword ptr [rbx+18h], xmm0
mov qword ptr [rbx+38h], 0
test byte ptr [r14+10h], 8
jz short loc_D5992
mov rbp, [r14+30h]
test rbp, rbp
jnz short loc_D5942
lea rbp, _ZN6google8protobuf32_MethodOptions_default_instance_E; google::protobuf::_MethodOptions_default_instance_
loc_D5942:
lea rax, [rsp+58h+var_40]
mov [rax-10h], rax
lea rsi, aGoogleProtobuf_25; "google.protobuf.MethodOptions"
lea rdx, aGoogleProtobuf_25+1Dh; ""
lea rdi, [rsp+58h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r12; int
mov rsi, rbp; int
mov rdx, rbx; int
mov ecx, 4; int
lea r8, [rsp+58h+var_50]; int
mov r9, r13; int
call _ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_16MethodDescriptorEEEvRKNT_11OptionsTypeEPS4_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::MethodDescriptor>(google::protobuf::MethodDescriptor::OptionsType const&,google::protobuf::MethodDescriptor::OptionsType*,int,std::string const&,google::protobuf::internal::FlatAllocator &)
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_D5992
call __ZdlPv; operator delete(void *)
loc_D5992:
mov al, [r14+38h]
mov [rbx+1], al
mov al, [r14+39h]
mov [rbx+2], al
mov rsi, [rbx+8]
add rsi, 20h ; ' '; int
mov byte ptr [rbx], 8
mov rdi, r12; int
mov rdx, r15; int
mov r8, r14; int
mov r9, rbx; int
call _ZN6google8protobuf17DescriptorBuilder9AddSymbolERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvS9_RKNS0_7MessageENS0_6SymbolE; google::protobuf::DescriptorBuilder::AddSymbol(std::string const&,void const*,std::string const&,google::protobuf::Message const&,google::protobuf::Symbol)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_D59E2
call __ZdlPv; operator delete(void *)
loc_D59E2:
mov rdi, rbx
call __Unwind_Resume
| char google::protobuf::DescriptorBuilder::BuildMethod(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6)
{
int v6; // r13d
int v8; // r15d
_QWORD *NameStrings; // rax
int v11; // ecx
void ( ***v12)(google::protobuf::MethodOptions *__hidden); // rbp
_QWORD *v13; // rsi
int v15; // [rsp+0h] [rbp-58h]
void *v16[2]; // [rsp+8h] [rbp-50h] BYREF
_BYTE v17[64]; // [rsp+18h] [rbp-40h] BYREF
v6 = a5;
v8 = a3;
*(_QWORD *)(a4 + 16) = a3;
NameStrings = google::protobuf::DescriptorBuilder::AllocateNameStrings(
a1,
(_QWORD *)(*(_QWORD *)(a3 + 8) + 32LL),
(_QWORD *)(*(_QWORD *)(a2 + 24) & 0xFFFFFFFFFFFFFFFCLL),
a5,
a5,
a6);
*(_QWORD *)(a4 + 8) = NameStrings;
google::protobuf::DescriptorBuilder::ValidateSymbolName(
a1,
(long long *)(*(_QWORD *)(a2 + 24) & 0xFFFFFFFFFFFFFFFCLL),
NameStrings + 4,
a2);
*(_OWORD *)(a4 + 40) = 0LL;
*(_OWORD *)(a4 + 24) = 0LL;
*(_QWORD *)(a4 + 56) = 0LL;
if ( (*(_BYTE *)(a2 + 16) & 8) != 0 )
{
v12 = *(void ( ****)(google::protobuf::MethodOptions *__hidden))(a2 + 48);
if ( !v12 )
v12 = &google::protobuf::_MethodOptions_default_instance_;
v16[0] = v17;
std::string::_M_construct<char const*>(v16, "google.protobuf.MethodOptions", "");
google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::MethodDescriptor>(
a1,
(int)v12,
a4,
4,
(int)v16,
v6,
v15,
v16[0]);
if ( v16[0] != v17 )
operator delete(v16[0]);
}
*(_BYTE *)(a4 + 1) = *(_BYTE *)(a2 + 56);
*(_BYTE *)(a4 + 2) = *(_BYTE *)(a2 + 57);
v13 = (_QWORD *)(*(_QWORD *)(a4 + 8) + 32LL);
*(_BYTE *)a4 = 8;
return google::protobuf::DescriptorBuilder::AddSymbol(a1, v13, v8, v11, a2, a4);
}
| BuildMethod:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R13,R8
MOV RBX,RCX
MOV R15,RDX
MOV R14,RSI
MOV R12,RDI
MOV qword ptr [RCX + 0x10],RDX
MOV RSI,qword ptr [RDX + 0x8]
ADD RSI,0x20
MOV RDX,qword ptr [R14 + 0x18]
AND RDX,-0x4
MOV RCX,R8
CALL 0x001d2d98
MOV qword ptr [RBX + 0x8],RAX
MOV RSI,qword ptr [R14 + 0x18]
AND RSI,-0x4
LEA RDX,[RAX + 0x20]
MOV RDI,R12
MOV RCX,R14
CALL 0x001cced6
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x28],XMM0
MOVUPS xmmword ptr [RBX + 0x18],XMM0
MOV qword ptr [RBX + 0x38],0x0
TEST byte ptr [R14 + 0x10],0x8
JZ 0x001d5992
MOV RBP,qword ptr [R14 + 0x30]
TEST RBP,RBP
JNZ 0x001d5942
LEA RBP,[0x312178]
LAB_001d5942:
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
LEA RSI,[0x26cf96]
LEA RDX,[0x26cfb3]
LEA RDI,[RSP + 0x8]
CALL 0x0012c610
LAB_001d5963:
MOV RDI,R12
MOV RSI,RBP
MOV RDX,RBX
MOV ECX,0x4
LEA R8,[RSP + 0x8]
MOV R9,R13
CALL 0x001e17e2
LAB_001d597e:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001d5992
CALL 0x0012d160
LAB_001d5992:
MOV AL,byte ptr [R14 + 0x38]
MOV byte ptr [RBX + 0x1],AL
MOV AL,byte ptr [R14 + 0x39]
MOV byte ptr [RBX + 0x2],AL
MOV RSI,qword ptr [RBX + 0x8]
ADD RSI,0x20
MOV byte ptr [RBX],0x8
MOV RDI,R12
MOV RDX,R15
MOV R8,R14
MOV R9,RBX
CALL 0x001cc1a0
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::DescriptorBuilder::BuildMethod(google::protobuf::MethodDescriptorProto const&,
google::protobuf::ServiceDescriptor const*, google::protobuf::MethodDescriptor*,
google::protobuf::internal::FlatAllocator&) */
void __thiscall
google::protobuf::DescriptorBuilder::BuildMethod
(DescriptorBuilder *this,MethodDescriptorProto *param_1,ServiceDescriptor *param_2,
MethodDescriptor *param_3,FlatAllocator *param_4)
{
long lVar1;
int1 *puVar2;
int1 *local_50 [2];
int1 local_40 [16];
*(ServiceDescriptor **)(param_3 + 0x10) = param_2;
lVar1 = AllocateNameStrings(this,(string *)(*(long *)(param_2 + 8) + 0x20),
(string *)(*(ulong *)(param_1 + 0x18) & 0xfffffffffffffffc),param_4);
*(long *)(param_3 + 8) = lVar1;
ValidateSymbolName(this,(string *)(*(ulong *)(param_1 + 0x18) & 0xfffffffffffffffc),
(string *)(lVar1 + 0x20),(Message *)param_1);
*(int8 *)(param_3 + 0x28) = 0;
*(int8 *)(param_3 + 0x30) = 0;
*(int8 *)(param_3 + 0x18) = 0;
*(int8 *)(param_3 + 0x20) = 0;
*(int8 *)(param_3 + 0x38) = 0;
if (((byte)param_1[0x10] & 8) != 0) {
puVar2 = *(int1 **)(param_1 + 0x30);
if ((OptionsType *)puVar2 == (OptionsType *)0x0) {
puVar2 = _MethodOptions_default_instance_;
}
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char_const*>(local_50,"google.protobuf.MethodOptions","");
/* try { // try from 001d5963 to 001d597d has its CatchHandler @ 001d59cb */
AllocateOptions<google::protobuf::MethodDescriptor>
(this,(OptionsType *)puVar2,param_3,4,(string *)local_50,param_4);
if (local_50[0] != local_40) {
operator_delete(local_50[0]);
}
}
param_3[1] = *(MethodDescriptor *)(param_1 + 0x38);
param_3[2] = *(MethodDescriptor *)(param_1 + 0x39);
*param_3 = (MethodDescriptor)0x8;
AddSymbol(this,*(long *)(param_3 + 8) + 0x20,param_2);
return;
}
| |
41,743 | has_path | eloqsql/mysys/my_getwd.c | my_bool has_path(const char *name)
{
return MY_TEST(strchr(name, FN_LIBCHAR))
#if FN_LIBCHAR != '/'
|| MY_TEST(strchr(name, '/'))
#endif
#ifdef FN_DEVCHAR
|| MY_TEST(strchr(name, FN_DEVCHAR))
#endif
;
} | O3 | c | has_path:
pushq %rbp
movq %rsp, %rbp
movl $0x2f, %esi
callq 0x24100
testq %rax, %rax
setne %al
popq %rbp
retq
nopl (%rax)
| has_path:
push rbp
mov rbp, rsp
mov esi, 2Fh ; '/'
call _strchr
test rax, rax
setnz al
pop rbp
retn
| bool has_path(long long a1, long long a2, long long a3, long long a4)
{
return strchr(a1, 47LL, a3, a4) != 0;
}
| has_path:
PUSH RBP
MOV RBP,RSP
MOV ESI,0x2f
CALL 0x00124100
TEST RAX,RAX
SETNZ AL
POP RBP
RET
|
bool has_path(char *param_1)
{
char *pcVar1;
pcVar1 = strchr(param_1,0x2f);
return pcVar1 != (char *)0x0;
}
| |
41,744 | nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&) | ng-log[P]ng-log/src/logging.cc | LogMessage::LogMessage(const char* file, int line,
const internal::CheckOpString& result)
: allocated_(nullptr) {
Init(file, line, NGLOG_FATAL, &LogMessage::SendToLog);
stream() << "Check failed: " << (*result.str_) << " ";
} | O1 | cpp | nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, (%rdi)
addq $0x10, %rdi
callq 0x11910
movq 0x257d9(%rip), %r8 # 0x39db0
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0x114c0
movl $0x7538, %r14d # imm = 0x7538
addq 0x8(%r15), %r14
leaq 0x18efd(%rip), %rsi # 0x2d4fa
movl $0xe, %edx
movq %r14, %rdi
callq 0x11aa0
movq (%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x11aa0
leaq 0x1a61c(%rip), %rsi # 0x2ec3f
movl $0x1, %edx
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11aa0
| _ZN5nglog10LogMessageC2EPKciRKNS_8internal13CheckOpStringE:
push rbp; Alternative name is 'nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&)'
push r15
push r14
push rbx
push rax
mov rbx, rcx
mov ebp, edx
mov r14, rsi
mov r15, rdi
mov qword ptr [rdi], 0
add rdi, 10h; this
call __ZN5nglog14LogMessageTimeC2Ev; nglog::LogMessageTime::LogMessageTime(void)
mov r8, cs:_ZN5nglog10LogMessage9SendToLogEv_ptr
mov rdi, r15
mov rsi, r14
mov edx, ebp
mov ecx, 3
xor r9d, r9d
call __ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE; nglog::LogMessage::Init(char const*,int,nglog::LogSeverity,void (nglog::LogMessage::*)(void))
mov r14d, 7538h
add r14, [r15+8]
lea rsi, aCheckFailed; "Check failed: "
mov edx, 0Eh
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rsi, [rax]
mov rdx, [rax+8]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_2EC3C+3; " "
mov edx, 1
mov rdi, rax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
| long long nglog::LogMessage::LogMessage(_QWORD *a1, long long a2, unsigned int a3, _QWORD **a4)
{
long long v6; // r14
long long v7; // rax
*a1 = 0LL;
nglog::LogMessageTime::LogMessageTime((nglog::LogMessageTime *)(a1 + 2));
nglog::LogMessage::Init(a1, a2, a3, 3LL, nglog::LogMessage::SendToLog, 0LL);
v6 = a1[1] + 30008LL;
std::__ostream_insert<char,std::char_traits<char>>(v6, "Check failed: ", 14LL);
v7 = std::__ostream_insert<char,std::char_traits<char>>(v6, **a4, (*a4)[1]);
return std::__ostream_insert<char,std::char_traits<char>>(v7, " ", 1LL);
}
| LogMessage:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV EBP,EDX
MOV R14,RSI
MOV R15,RDI
MOV qword ptr [RDI],0x0
ADD RDI,0x10
CALL 0x00111910
MOV R8,qword ptr [0x00139db0]
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
MOV ECX,0x3
XOR R9D,R9D
CALL 0x001114c0
MOV R14D,0x7538
ADD R14,qword ptr [R15 + 0x8]
LEA RSI,[0x12d4fa]
MOV EDX,0xe
MOV RDI,R14
CALL 0x00111aa0
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,R14
CALL 0x00111aa0
LEA RSI,[0x12ec3f]
MOV EDX,0x1
MOV RDI,RAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00111aa0
|
/* nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&) */
void __thiscall
nglog::LogMessage::LogMessage(LogMessage *this,char *param_1,int param_2,CheckOpString *param_3)
{
long lVar1;
ostream *poVar2;
*(int8 *)this = 0;
LogMessageTime::LogMessageTime((LogMessageTime *)(this + 0x10));
Init(this,param_1,param_2,3,PTR_SendToLog_00139db0,0);
lVar1 = *(long *)(this + 8);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),"Check failed: ",0xe);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),(char *)**(int8 **)param_3,
(*(int8 **)param_3)[1]);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," ",1);
return;
}
| |
41,745 | mysqld_stmt_close(THD*, char*) | eloqsql/sql/sql_prepare.cc | void mysqld_stmt_close(THD *thd, char *packet)
{
/* There is always space for 4 bytes in packet buffer */
ulong stmt_id= uint4korr(packet);
Prepared_statement *stmt;
DBUG_ENTER("mysqld_stmt_close");
thd->get_stmt_da()->disable_status();
if (!(stmt= find_prepared_statement(thd, stmt_id)))
DBUG_VOID_RETURN;
/*
The only way currently a statement can be deallocated when it's
in use is from within Dynamic SQL.
*/
DBUG_ASSERT(! stmt->is_in_use());
stmt->deallocate();
general_log_print(thd, thd->get_command(), NullS);
if (thd->last_stmt == stmt)
thd->clear_last_stmt();
DBUG_VOID_RETURN;
} | O0 | cpp | mysqld_stmt_close(THD*, char*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8539a0
movq %rax, %rdi
callq 0x998d40
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa18400
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0xa18646
jmp 0xa18644
jmp 0xa18693
jmp 0xa18648
jmp 0xa1864a
movq -0x20(%rbp), %rdi
callq 0xa16b80
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x853c90
movq -0x28(%rbp), %rdi
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x848d80
movq -0x8(%rbp), %rax
movq 0x1e88(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0xa1868f
movq -0x8(%rbp), %rdi
callq 0xa21a10
jmp 0xa18691
jmp 0xa18693
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _Z17mysqld_stmt_closeP3THDPc:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_18], rax
mov rdi, [rbp+var_8]; this
call _ZN3THD11get_stmt_daEv; THD::get_stmt_da(void)
mov rdi, rax; this
call _ZN16Diagnostics_area14disable_statusEv; Diagnostics_area::disable_status(void)
mov rdi, [rbp+var_8]; THD *
mov rsi, [rbp+var_18]; unsigned __int64
call _ZL23find_prepared_statementP3THDm; find_prepared_statement(THD *,ulong)
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_A18646
jmp short $+2
loc_A18644:
jmp short loc_A18693
loc_A18646:
jmp short $+2
loc_A18648:
jmp short $+2
loc_A1864A:
mov rdi, [rbp+var_20]; this
call _ZN18Prepared_statement10deallocateEv; Prepared_statement::deallocate(void)
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rdi, [rbp+var_8]; this
call _ZNK3THD11get_commandEv; THD::get_command(void)
mov rdi, [rbp+var_28]
mov esi, eax
xor eax, eax
mov edx, eax
mov al, 0
call _Z17general_log_printP3THD19enum_server_commandPKcz; general_log_print(THD *,enum_server_command,char const*,...)
mov rax, [rbp+var_8]
mov rax, [rax+1E88h]
cmp rax, [rbp+var_20]
jnz short loc_A1868F
mov rdi, [rbp+var_8]; this
call _ZN3THD15clear_last_stmtEv; THD::clear_last_stmt(void)
loc_A1868F:
jmp short $+2
loc_A18691:
jmp short $+2
loc_A18693:
add rsp, 30h
pop rbp
retn
| Prepared_statement * mysqld_stmt_close(Prepared_statement **a1, char *a2)
{
Diagnostics_area *stmt_da; // rax
Prepared_statement *result; // rax
unsigned int command; // eax
Prepared_statement *v5; // [rsp+10h] [rbp-20h]
unsigned long long v6; // [rsp+18h] [rbp-18h]
v6 = *(unsigned int *)a2;
stmt_da = (Diagnostics_area *)THD::get_stmt_da((THD *)a1);
Diagnostics_area::disable_status(stmt_da);
result = (Prepared_statement *)find_prepared_statement((THD *)a1, v6);
v5 = result;
if ( result )
{
Prepared_statement::deallocate(result);
command = THD::get_command((THD *)a1);
general_log_print((THD *)a1, command, 0LL);
result = a1[977];
if ( result == v5 )
return (Prepared_statement *)THD::clear_last_stmt((THD *)a1);
}
return result;
}
| destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x00a1862c
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
LAB_00a1862c:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x60],0x0
ADD RSP,0x20
POP RBP
RET
|
/* sp_cursor::destroy() */
void __thiscall sp_cursor::destroy(sp_cursor *this)
{
if (*(long **)(this + 0x60) != (long *)0x0) {
(**(code **)(**(long **)(this + 0x60) + 0x10))();
}
*(int8 *)(this + 0x60) = 0;
return;
}
| |
41,746 | nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | ng-log[P]ng-log/src/logging.cc | static string ShellEscape(const string& src) {
string result;
if (!src.empty() && // empty string needs quotes
src.find_first_not_of(kDontNeedShellEscapeChars) == string::npos) {
// only contains chars that don't need quotes; it's fine
result.assign(src);
} else if (src.find_first_of('\'') == string::npos) {
// no single quotes; just wrap it in single quotes
result.assign("'");
result.append(src);
result.append("'");
} else {
// needs double quote escaping
result.assign("\"");
for (size_t i = 0; i < src.size(); ++i) {
switch (src[i]) {
case '\\':
case '$':
case '"':
case '`':
result.append("\\");
}
result.append(src, i, 1);
}
result.append("\"");
}
return result;
} | O3 | cpp | nglog::ShellEscape(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
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpq $0x0, 0x8(%rsi)
je 0x10e57
leaq 0x12982(%rip), %rsi # 0x237c0
movl $0x47, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x7940
cmpq $-0x1, %rax
je 0x10f2a
movq %r14, %rdi
movl $0x27, %esi
xorl %edx, %edx
callq 0x7710
movq 0x8(%rbx), %rdx
cmpq $-0x1, %rax
je 0x10ef4
leaq 0x139c5(%rip), %r15 # 0x24840
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x7890
cmpq $0x0, 0x8(%r14)
je 0x10f1d
movq %r12, (%rsp)
xorl %r12d, %r12d
movabsq $0x4400000000000005, %rbp # imm = 0x4400000000000005
leaq 0x13991(%rip), %r13 # 0x24842
movq (%r14), %rax
movzbl (%rax,%r12), %eax
addl $-0x22, %eax
cmpl $0x3e, %eax
ja 0x10ed2
btq %rax, %rbp
jae 0x10ed2
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7a20
movl $0x1, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x7770
incq %r12
cmpq 0x8(%r14), %r12
jb 0x10eb1
movq (%rsp), %r12
jmp 0x10f1d
leaq 0x12a13(%rip), %r15 # 0x2390e
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x7890
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x7150
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7a20
jmp 0x10f35
movq %rbx, %rdi
movq %r14, %rsi
callq 0x72a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, (%rsp)
jmp 0x10f4a
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x10f65
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x7540
movq %r14, %rdi
callq 0x7990
nop
| _ZN5nglogL11ShellEscapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
cmp qword ptr [rsi+8], 0
jz short loc_10E57
lea rsi, _ZN5nglogL25kDontNeedShellEscapeCharsE; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"...
mov ecx, 47h ; 'G'
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm; std::string::find_first_not_of(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_10F2A
loc_10E57:
mov rdi, r14
mov esi, 27h ; '''
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov rdx, [rbx+8]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_10EF4
lea r15, asc_24840; "\""
mov r8d, 1
mov rdi, rbx
xor esi, esi
mov rcx, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
cmp qword ptr [r14+8], 0
jz loc_10F1D
mov [rsp+38h+var_38], r12
xor r12d, r12d
mov rbp, 4400000000000005h
lea r13, asc_24842; "\\"
loc_10EB1:
mov rax, [r14]
movzx eax, byte ptr [rax+r12]
add eax, 0FFFFFFDEh
cmp eax, 3Eh ; '>'
ja short loc_10ED2
bt rbp, rax
jnb short loc_10ED2
mov rdi, rbx
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_10ED2:
mov ecx, 1
mov rdi, rbx
mov rsi, r14
mov rdx, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong)
inc r12
cmp r12, [r14+8]
jb short loc_10EB1
mov r12, [rsp+38h+var_38]
jmp short loc_10F1D
loc_10EF4:
lea r15, aDataNumCharsTo+59h; "'"
mov r8d, 1
mov rdi, rbx
xor esi, esi
mov rcx, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
loc_10F1D:
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short loc_10F35
loc_10F2A:
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_10F35:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov [rsp+0], r12
jmp short $+2
loc_10F4A:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, [rsp+0]
jz short loc_10F65
mov rax, [rsp+0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10F65:
mov rdi, r14
call __Unwind_Resume
| long long nglog::ShellEscape(long long a1, _QWORD *a2)
{
long long v2; // rax
long long v3; // rdx
char *v4; // r15
unsigned long long v5; // r12
long long v6; // rbp
unsigned long long v7; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
if ( a2[1]
&& std::string::find_first_not_of(
a2,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_.=/:,@",
0LL,
71LL) == -1 )
{
return std::string::_M_assign(a1, a2);
}
v2 = std::string::find(a2, 39LL, 0LL);
v3 = *(_QWORD *)(a1 + 8);
if ( v2 == -1 )
{
v4 = "'";
std::string::_M_replace(a1, 0LL, v3, "'", 1LL);
std::string::_M_append(a1, *a2);
}
else
{
v4 = "\"";
std::string::_M_replace(a1, 0LL, v3, "\"", 1LL);
if ( a2[1] )
{
v5 = 0LL;
v6 = 0x4400000000000005LL;
do
{
v7 = (unsigned int)*(unsigned __int8 *)(*a2 + v5) - 34;
if ( (unsigned int)v7 <= 0x3E )
{
if ( _bittest64(&v6, v7) )
std::string::append(a1, "\\");
}
std::string::append(a1, a2, v5++, 1LL);
}
while ( v5 < a2[1] );
}
}
return std::string::append(a1, v4);
}
| ShellEscape:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
CMP qword ptr [RSI + 0x8],0x0
JZ 0x00110e57
LEA RSI,[0x1237c0]
MOV ECX,0x47
MOV RDI,R14
XOR EDX,EDX
CALL 0x00107940
CMP RAX,-0x1
JZ 0x00110f2a
LAB_00110e57:
MOV RDI,R14
MOV ESI,0x27
XOR EDX,EDX
CALL 0x00107710
MOV RDX,qword ptr [RBX + 0x8]
CMP RAX,-0x1
JZ 0x00110ef4
LAB_00110e74:
LEA R15,[0x124840]
MOV R8D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV RCX,R15
CALL 0x00107890
CMP qword ptr [R14 + 0x8],0x0
JZ 0x00110f1d
MOV qword ptr [RSP],R12
XOR R12D,R12D
MOV RBP,0x4400000000000005
LEA R13,[0x124842]
LAB_00110eb1:
MOV RAX,qword ptr [R14]
MOVZX EAX,byte ptr [RAX + R12*0x1]
ADD EAX,-0x22
CMP EAX,0x3e
JA 0x00110ed2
BT RBP,RAX
JNC 0x00110ed2
LAB_00110ec7:
MOV RDI,RBX
MOV RSI,R13
CALL 0x00107a20
LAB_00110ed2:
MOV ECX,0x1
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
CALL 0x00107770
INC R12
CMP R12,qword ptr [R14 + 0x8]
JC 0x00110eb1
MOV R12,qword ptr [RSP]
JMP 0x00110f1d
LAB_00110ef4:
LEA R15,[0x12390e]
MOV R8D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV RCX,R15
CALL 0x00107890
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x00107150
LAB_00110f1d:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00107a20
JMP 0x00110f35
LAB_00110f2a:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001072a0
LAB_00110f35:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::ShellEscape(std::__cxx11::string const&) */
void __thiscall nglog::ShellEscape(nglog *this,string *param_1)
{
uint uVar1;
long lVar2;
ulong uVar3;
*(nglog **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (nglog)0x0;
if ((*(long *)(param_1 + 8) == 0) ||
(lVar2 = std::__cxx11::string::find_first_not_of((char *)param_1,0x1237c0,0), lVar2 != -1)) {
lVar2 = std::__cxx11::string::find((char)param_1,0x27);
if (lVar2 == -1) {
/* try { // try from 00110ef4 to 00110f34 has its CatchHandler @ 00110f44 */
std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x12390e);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_1);
}
else {
/* try { // try from 00110e74 to 00110e8d has its CatchHandler @ 00110f44 */
std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x124840);
if (*(long *)(param_1 + 8) != 0) {
uVar3 = 0;
do {
uVar1 = *(byte *)(*(long *)param_1 + uVar3) - 0x22;
if ((uVar1 < 0x3f) && ((0x4400000000000005U >> ((ulong)uVar1 & 0x3f) & 1) != 0)) {
/* try { // try from 00110ec7 to 00110ee4 has its CatchHandler @ 00110f4a */
std::__cxx11::string::append((char *)this);
}
std::__cxx11::string::append((string *)this,(ulong)param_1,uVar3);
uVar3 = uVar3 + 1;
} while (uVar3 < *(ulong *)(param_1 + 8));
}
}
std::__cxx11::string::append((char *)this);
}
else {
std::__cxx11::string::_M_assign((string *)this);
}
return;
}
| |
41,747 | void fmt::v10::detail::bigint::multiply<unsigned __int128, 0>(unsigned __int128) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 void multiply(UInt value) {
using half_uint =
conditional_t<std::is_same<UInt, uint128_t>::value, uint64_t, uint32_t>;
const int shift = num_bits<half_uint>() - bigit_bits;
const UInt lower = static_cast<half_uint>(value);
const UInt upper = value >> num_bits<half_uint>();
UInt carry = 0;
for (size_t i = 0, n = bigits_.size(); i < n; ++i) {
UInt result = lower * bigits_[i] + static_cast<bigit>(carry);
carry = (upper * bigits_[i] << shift) + (result >> bigit_bits) +
(carry >> bigit_bits);
bigits_[i] = static_cast<bigit>(result);
}
while (carry != 0) {
bigits_.push_back(static_cast<bigit>(carry));
carry >>= bigit_bits;
}
} | O0 | c | void fmt::v10::detail::bigint::multiply<unsigned __int128, 0>(unsigned __int128):
subq $0xe8, %rsp
movq %rsi, 0xd0(%rsp)
movq %rdx, 0xd8(%rsp)
movq 0xd0(%rsp), %rax
movq 0xd8(%rsp), %rcx
movq %rdi, 0xc8(%rsp)
movq %rcx, 0xb8(%rsp)
movq %rax, 0xb0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x20, 0xac(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq $0x0, 0x98(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0xb6de0
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rdi
movl %eax, %ecx
movq 0x38(%rsp), %rax
movb %cl, %sil
movb %sil, %cl
movq %rdx, %r8
shrq %cl, %r8
movq %r8, 0x40(%rsp)
movb %sil, %cl
shrdq %cl, %rdx, %rax
movq 0x40(%rsp), %rcx
xorl %edx, %edx
testb $0x40, %sil
cmovneq %rcx, %rax
cmovneq %rdx, %rcx
movq %rcx, 0x88(%rsp)
movq %rax, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
callq 0xb5dd0
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x60(%rsp), %rax
jae 0xb6d8b
movq 0x30(%rsp), %rdi
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rsi
callq 0xb6210
movq (%rsp), %rcx
movq 0x30(%rsp), %rdi
movq %rax, %rdx
movq 0x8(%rsp), %rax
movl (%rdx), %edx
imulq %rdx, %rcx
mulq %rdx
movl 0x70(%rsp), %esi
addq %rsi, %rax
adcq %rcx, %rdx
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x88(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x68(%rsp), %rsi
callq 0xb6210
movl 0x14(%rsp), %edx
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movq 0x18(%rsp), %rax
movl (%rcx), %ecx
movl %ecx, %esi
imull %esi, %edx
movl %edx, 0x20(%rsp)
mulq %rcx
movq %rax, %rcx
movl 0x20(%rsp), %eax
addl %eax, %edx
movl %edx, %eax
shldq $0x20, %rcx, %rax
shlq $0x20, %rcx
movq 0x50(%rsp), %r8
movq 0x58(%rsp), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
shldq $0x20, %r8, %rsi
addq %rsi, %rcx
adcq %rdx, %rax
movq 0x70(%rsp), %r8
movq 0x78(%rsp), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
shldq $0x20, %r8, %rsi
addq %rsi, %rcx
adcq %rdx, %rax
movq %rcx, 0x70(%rsp)
movq %rax, 0x78(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x68(%rsp), %rsi
callq 0xb6210
movl 0x24(%rsp), %ecx
movl %ecx, (%rax)
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0xb6c63
jmp 0xb6d8d
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rcx
orq %rcx, %rax
je 0xb6dd7
jmp 0xb6d9e
movq 0x30(%rsp), %rdi
movl 0x70(%rsp), %eax
movl %eax, 0x4c(%rsp)
leaq 0x4c(%rsp), %rsi
callq 0xb6300
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq %rcx, %rax
shldq $0x20, %rdx, %rax
shrq $0x20, %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x70(%rsp)
jmp 0xb6d8d
addq $0xe8, %rsp
retq
nop
| _ZN3fmt3v106detail6bigint8multiplyIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_:
sub rsp, 0E8h
mov [rsp+0E8h+var_18], rsi
mov [rsp+0E8h+var_10], rdx
mov rax, [rsp+0E8h+var_18]
mov rcx, [rsp+0E8h+var_10]
mov [rsp+0E8h+var_20], rdi
mov [rsp+0E8h+var_30], rcx
mov [rsp+0E8h+var_38], rax
mov rax, [rsp+0E8h+var_20]
mov [rsp+0E8h+var_B8], rax
mov [rsp+0E8h+var_3C], 20h ; ' '
mov rax, [rsp+0E8h+var_38]
mov [rsp+0E8h+var_58], rax
mov [rsp+0E8h+var_50], 0
mov rax, [rsp+0E8h+var_38]
mov [rsp+0E8h+var_B0], rax
mov rax, [rsp+0E8h+var_30]
mov [rsp+0E8h+var_C0], rax
call _ZN3fmt3v106detail8num_bitsImEEiv; fmt::v10::detail::num_bits<ulong>(void)
mov rdx, [rsp+0E8h+var_C0]
mov rdi, [rsp+0E8h+var_B8]
mov ecx, eax
mov rax, [rsp+0E8h+var_B0]
mov sil, cl
mov cl, sil
mov r8, rdx
shr r8, cl
mov [rsp+0E8h+var_A8], r8
mov cl, sil
shrd rax, rdx, cl
mov rcx, [rsp+0E8h+var_A8]
xor edx, edx
test sil, 40h
cmovnz rax, rcx
cmovnz rcx, rdx
mov [rsp+0E8h+var_60], rcx
mov [rsp+0E8h+var_68], rax
mov [rsp+0E8h+var_70], 0
mov [rsp+0E8h+var_78], 0
mov [rsp+0E8h+var_80], 0
call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void)
mov [rsp+0E8h+var_88], rax
loc_B6C63:
mov rax, [rsp+0E8h+var_80]
cmp rax, [rsp+0E8h+var_88]
jnb loc_B6D8B
mov rdi, [rsp+0E8h+var_B8]
mov rax, [rsp+0E8h+var_58]
mov [rsp+0E8h+var_E0], rax
mov rax, [rsp+0E8h+var_50]
mov [rsp+0E8h+var_E8], rax
mov rsi, [rsp+0E8h+var_80]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov rcx, [rsp+0E8h+var_E8]
mov rdi, [rsp+0E8h+var_B8]
mov rdx, rax
mov rax, [rsp+0E8h+var_E0]
mov edx, [rdx]
imul rcx, rdx
mul rdx
mov esi, dword ptr [rsp+0E8h+var_78]
add rax, rsi
adc rdx, rcx
mov [rsp+0E8h+var_98], rax
mov [rsp+0E8h+var_90], rdx
mov rax, [rsp+0E8h+var_68]
mov [rsp+0E8h+var_D0], rax
mov eax, dword ptr [rsp+0E8h+var_60]
mov [rsp+0E8h+var_D4], eax
mov rsi, [rsp+0E8h+var_80]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov edx, [rsp+0E8h+var_D4]
mov rdi, [rsp+0E8h+var_B8]
mov rcx, rax
mov rax, [rsp+0E8h+var_D0]
mov ecx, [rcx]
mov esi, ecx
imul edx, esi
mov [rsp+0E8h+var_C8], edx
mul rcx
mov rcx, rax
mov eax, [rsp+0E8h+var_C8]
add edx, eax
mov eax, edx
shld rax, rcx, 20h
shl rcx, 20h
mov r8, [rsp+0E8h+var_98]
mov rsi, [rsp+0E8h+var_90]
mov rdx, rsi
shr rdx, 20h
shld rsi, r8, 20h
add rcx, rsi
adc rax, rdx
mov r8, [rsp+0E8h+var_78]
mov rsi, [rsp+0E8h+var_70]
mov rdx, rsi
shr rdx, 20h
shld rsi, r8, 20h
add rcx, rsi
adc rax, rdx
mov [rsp+0E8h+var_78], rcx
mov [rsp+0E8h+var_70], rax
mov eax, dword ptr [rsp+0E8h+var_98]
mov [rsp+0E8h+var_C4], eax
mov rsi, [rsp+0E8h+var_80]
call _ZN3fmt3v106detail6bufferIjEixImEERjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov ecx, [rsp+0E8h+var_C4]
mov [rax], ecx
mov rax, [rsp+0E8h+var_80]
add rax, 1
mov [rsp+0E8h+var_80], rax
jmp loc_B6C63
loc_B6D8B:
jmp short $+2
loc_B6D8D:
mov rax, [rsp+0E8h+var_78]
mov rcx, [rsp+0E8h+var_70]
or rax, rcx
jz short loc_B6DD7
jmp short $+2
loc_B6D9E:
mov rdi, [rsp+0E8h+var_B8]
mov eax, dword ptr [rsp+0E8h+var_78]
mov [rsp+0E8h+var_9C], eax
lea rsi, [rsp+0E8h+var_9C]
call _ZN3fmt3v106detail6bufferIjE9push_backERKj; fmt::v10::detail::buffer<uint>::push_back(uint const&)
mov rdx, [rsp+0E8h+var_78]
mov rcx, [rsp+0E8h+var_70]
mov rax, rcx
shld rax, rdx, 20h
shr rcx, 20h
mov [rsp+0E8h+var_70], rcx
mov [rsp+0E8h+var_78], rax
jmp short loc_B6D8D
loc_B6DD7:
add rsp, 0E8h
retn
| long long ZN3fmt3v106detail6bigint8multiplyIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_(
long long a1,
unsigned long long a2,
unsigned long long a3)
{
char v3; // si
unsigned long long v4; // rax
unsigned long long v5; // rcx
unsigned int *v6; // rax
_DWORD *v7; // rax
__int128 v8; // rt0
long long result; // rax
int v12; // [rsp+4Ch] [rbp-9Ch] BYREF
unsigned __int128 v13; // [rsp+50h] [rbp-98h]
unsigned long long v14; // [rsp+60h] [rbp-88h]
unsigned long long v15; // [rsp+68h] [rbp-80h]
unsigned __int128 v16; // [rsp+70h] [rbp-78h]
unsigned long long v17; // [rsp+80h] [rbp-68h]
unsigned long long v18; // [rsp+88h] [rbp-60h]
unsigned long long v19; // [rsp+90h] [rbp-58h]
long long v20; // [rsp+98h] [rbp-50h]
int v21; // [rsp+ACh] [rbp-3Ch]
unsigned long long v22; // [rsp+B0h] [rbp-38h]
unsigned long long v23; // [rsp+B8h] [rbp-30h]
long long v24; // [rsp+C8h] [rbp-20h]
unsigned long long v25; // [rsp+D0h] [rbp-18h]
unsigned long long v26; // [rsp+D8h] [rbp-10h]
v25 = a2;
v26 = a3;
v24 = a1;
v23 = a3;
v22 = a2;
v21 = 32;
v19 = a2;
v20 = 0LL;
v3 = fmt::v10::detail::num_bits<unsigned long>();
v4 = (a2 >> v3) | (a3 << (64 - v3));
v5 = a3 >> v3;
if ( (v3 & 0x40) != 0 )
{
v4 = a3 >> v3;
v5 = 0LL;
}
v18 = v5;
v17 = v4;
v16 = 0uLL;
v15 = 0LL;
v14 = fmt::v10::detail::buffer<unsigned int>::size(a1);
while ( v15 < v14 )
{
v6 = (unsigned int *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v15);
v13 = __PAIR128__((unsigned long long)*v6 * v20, (unsigned int)v16) + *v6 * (unsigned __int128)v19;
v7 = (_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v15);
*((_QWORD *)&v8 + 1) = *v7 * (_DWORD)v18 + (unsigned int)(((unsigned int)*v7 * (unsigned __int128)v17) >> 64);
*(_QWORD *)&v8 = (unsigned int)*v7 * v17;
v16 = (v16 >> 32) + (v13 >> 32) + v8 * 0x100000000LL;
*(_DWORD *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>(a1, v15++) = v13;
}
while ( 1 )
{
result = *((_QWORD *)&v16 + 1) | v16;
if ( v16 == 0 )
break;
v12 = v16;
fmt::v10::detail::buffer<unsigned int>::push_back(a1, &v12);
v16 >>= 32;
}
return result;
}
| _ZN3fmt3v106detail6bigint8multiplyIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xd0],RSI
MOV qword ptr [RSP + 0xd8],RDX
MOV RAX,qword ptr [RSP + 0xd0]
MOV RCX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0xc8],RDI
MOV qword ptr [RSP + 0xb8],RCX
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0xac],0x20
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x90],RAX
MOV qword ptr [RSP + 0x98],0x0
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x001b6de0
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x38]
MOV SIL,CL
MOV CL,SIL
MOV R8,RDX
SHR R8,CL
MOV qword ptr [RSP + 0x40],R8
MOV CL,SIL
SHRD RAX,RDX,CL
MOV RCX,qword ptr [RSP + 0x40]
XOR EDX,EDX
TEST SIL,0x40
CMOVNZ RAX,RCX
CMOVNZ RCX,RDX
MOV qword ptr [RSP + 0x88],RCX
MOV qword ptr [RSP + 0x80],RAX
MOV qword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x70],0x0
MOV qword ptr [RSP + 0x68],0x0
CALL 0x001b5dd0
MOV qword ptr [RSP + 0x60],RAX
LAB_001b6c63:
MOV RAX,qword ptr [RSP + 0x68]
CMP RAX,qword ptr [RSP + 0x60]
JNC 0x001b6d8b
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x001b6210
MOV RCX,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x30]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV EDX,dword ptr [RDX]
IMUL RCX,RDX
MUL RDX
MOV ESI,dword ptr [RSP + 0x70]
ADD RAX,RSI
ADC RDX,RCX
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x18],RAX
MOV EAX,dword ptr [RSP + 0x88]
MOV dword ptr [RSP + 0x14],EAX
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x001b6210
MOV EDX,dword ptr [RSP + 0x14]
MOV RDI,qword ptr [RSP + 0x30]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RCX]
MOV ESI,ECX
IMUL EDX,ESI
MOV dword ptr [RSP + 0x20],EDX
MUL RCX
MOV RCX,RAX
MOV EAX,dword ptr [RSP + 0x20]
ADD EDX,EAX
MOV EAX,EDX
SHLD RAX,RCX,0x20
SHL RCX,0x20
MOV R8,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,RSI
SHR RDX,0x20
SHLD RSI,R8,0x20
ADD RCX,RSI
ADC RAX,RDX
MOV R8,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,RSI
SHR RDX,0x20
SHLD RSI,R8,0x20
ADD RCX,RSI
ADC RAX,RDX
MOV qword ptr [RSP + 0x70],RCX
MOV qword ptr [RSP + 0x78],RAX
MOV EAX,dword ptr [RSP + 0x50]
MOV dword ptr [RSP + 0x24],EAX
MOV RSI,qword ptr [RSP + 0x68]
CALL 0x001b6210
MOV ECX,dword ptr [RSP + 0x24]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + 0x68]
ADD RAX,0x1
MOV qword ptr [RSP + 0x68],RAX
JMP 0x001b6c63
LAB_001b6d8b:
JMP 0x001b6d8d
LAB_001b6d8d:
MOV RAX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x78]
OR RAX,RCX
JZ 0x001b6dd7
JMP 0x001b6d9e
LAB_001b6d9e:
MOV RDI,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RSP + 0x70]
MOV dword ptr [RSP + 0x4c],EAX
LEA RSI,[RSP + 0x4c]
CALL 0x001b6300
MOV RDX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x78]
MOV RAX,RCX
SHLD RAX,RDX,0x20
SHR RCX,0x20
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x70],RAX
JMP 0x001b6d8d
LAB_001b6dd7:
ADD RSP,0xe8
RET
|
void _ZN3fmt3v106detail6bigint8multiplyIoTnNSt9enable_ifIXoosr3std7is_sameIT_mEE5valuesr3std7is_sameIS5_oEE5valueEiE4typeELi0EEEvS5_
(buffer<unsigned_int> *param_1,ulong param_2,ulong param_3)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
byte bVar4;
int1 auVar5 [16];
int4 uVar6;
int iVar7;
long lVar8;
uint uVar9;
uint *puVar10;
ulong uVar11;
ulong uVar12;
ulong uVar13;
ulong uVar14;
ulong uVar15;
uint local_9c;
int1 local_98 [16];
ulong local_88;
ulong local_80;
ulong local_78;
ulong local_70;
ulong local_68;
ulong local_60;
ulong local_58;
long local_50;
int4 local_3c;
ulong local_38;
ulong local_30;
buffer<unsigned_int> *local_20;
ulong local_18;
ulong local_10;
local_3c = 0x20;
local_50 = 0;
local_58 = param_2;
local_38 = param_2;
local_30 = param_3;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
uVar9 = fmt::v10::detail::num_bits<unsigned_long>();
uVar15 = param_3 >> ((byte)uVar9 & 0x3f);
bVar4 = (byte)uVar9 & 0x3f;
local_60 = uVar15;
local_68 = param_2 >> bVar4 | param_3 << 0x40 - bVar4;
if ((uVar9 & 0x40) != 0) {
local_60 = 0;
local_68 = uVar15;
}
local_70 = 0;
local_78 = 0;
local_80 = 0;
local_88 = fmt::v10::detail::buffer<unsigned_int>::size(param_1);
for (; lVar8 = local_50, uVar15 = local_58, local_80 < local_88; local_80 = local_80 + 1) {
puVar10 = fmt::v10::detail::buffer<unsigned_int>::operator[]<unsigned_long>(param_1,local_80);
uVar11 = local_68;
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar15;
auVar3._8_8_ = 0;
auVar3._0_8_ = CONCAT44(0,*puVar10);
auVar5._8_8_ = lVar8 * CONCAT44(0,*puVar10);
auVar5._0_8_ = local_78 & 0xffffffff;
local_98 = auVar1 * auVar3 + auVar5;
iVar7 = (int)local_60;
puVar10 = fmt::v10::detail::buffer<unsigned_int>::operator[]<unsigned_long>(param_1,local_80);
auVar2._8_8_ = 0;
auVar2._0_8_ = uVar11;
auVar2 = auVar2 * ZEXT416(*puVar10);
uVar15 = auVar2._0_8_;
uVar11 = uVar15 << 0x20;
uVar13 = local_98._8_8_ << 0x20 | (ulong)local_98._0_8_ >> 0x20;
uVar12 = uVar11 + uVar13;
uVar14 = local_70 << 0x20 | local_78 >> 0x20;
local_78 = uVar12 + uVar14;
local_70 = ((ulong)(auVar2._8_4_ + iVar7 * *puVar10) << 0x20 | uVar15 >> 0x20) +
((ulong)local_98._8_8_ >> 0x20) + (ulong)CARRY8(uVar11,uVar13) + (local_70 >> 0x20) +
(ulong)CARRY8(uVar12,uVar14);
uVar6 = local_98._0_4_;
puVar10 = fmt::v10::detail::buffer<unsigned_int>::operator[]<unsigned_long>(param_1,local_80);
*puVar10 = uVar6;
}
for (; local_78 != 0 || local_70 != 0; local_78 = uVar15 | local_78 >> 0x20) {
local_9c = (uint)local_78;
fmt::v10::detail::buffer<unsigned_int>::push_back(param_1,&local_9c);
uVar15 = local_70 << 0x20;
local_70 = local_70 >> 0x20;
}
return;
}
| |
41,748 | my_uni_ucs2 | eloqsql/strings/ctype-ucs2.c | static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) ,
my_wc_t wc, uchar *r, uchar *e)
{
if ( r+2 > e )
return MY_CS_TOOSMALL2;
if (wc > 0xFFFF) /* UCS2 does not support characters outside BMP */
return MY_CS_ILUNI;
r[0]= (uchar) (wc >> 8);
r[1]= (uchar) (wc & 0xFF);
return 2;
} | O3 | c | my_uni_ucs2:
pushq %rbp
movq %rsp, %rbp
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x473e8
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x473e8
rolw $0x8, %si
movw %si, (%rdx)
movl $0x2, %eax
popq %rbp
retq
| my_uni_ucs2:
push rbp
mov rbp, rsp
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_473E8
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_473E8
rol si, 8
mov [rdx], si
mov eax, 2
loc_473E8:
pop rbp
retn
| long long my_uni_ucs2(long long a1, unsigned long long a2, _WORD *a3, unsigned long long a4)
{
long long result; // rax
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
*a3 = __ROL2__(a2, 8);
return 2LL;
}
}
return result;
}
| my_uni_ucs2:
PUSH RBP
MOV RBP,RSP
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001473e8
XOR EAX,EAX
CMP RSI,0xffff
JA 0x001473e8
ROL SI,0x8
MOV word ptr [RDX],SI
MOV EAX,0x2
LAB_001473e8:
POP RBP
RET
|
int8 my_uni_ucs2(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
int8 uVar1;
uVar1 = 0xffffff9a;
if ((param_3 + 1 <= param_4) && (uVar1 = 0, param_2 < 0x10000)) {
*param_3 = (ushort)param_2 << 8 | (ushort)param_2 >> 8;
uVar1 = 2;
}
return uVar1;
}
| |
41,749 | nglog::(anonymous namespace)::LogFileObject::SetExtension(char const*) | ng-log[P]ng-log/src/logging.cc | void LogFileObject::SetExtension(const char* ext) {
std::lock_guard<std::mutex> l{mutex_};
if (filename_extension_ != ext) {
// Get rid of old log file since we are changing names
if (file_ != nullptr) {
file_ = nullptr;
rollover_attempt_ = kRolloverAttemptFrequency - 1;
}
filename_extension_ = ext;
}
} | O0 | cpp | nglog::(anonymous namespace)::LogFileObject::SetExtension(char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x30(%rbp)
addq $0x8, %rsi
leaq -0x18(%rbp), %rdi
callq 0x174a0
movq -0x30(%rbp), %rdi
addq $0x78, %rdi
movq -0x10(%rbp), %rsi
callq 0x1c4a0
movb %al, -0x25(%rbp)
jmp 0x1622b
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0x16234
jmp 0x1629e
movq -0x30(%rbp), %rdi
addq $0x98, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19950
testb $0x1, %al
jne 0x1624e
jmp 0x16289
movq -0x30(%rbp), %rdi
addq $0x98, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x19190
movq -0x30(%rbp), %rax
movl $0x1f, 0xb0(%rax)
jmp 0x16289
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x174d0
jmp 0x162ad
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x78, %rdi
callq 0x9a30
jmp 0x1629c
jmp 0x1629e
leaq -0x18(%rbp), %rdi
callq 0x174d0
addq $0x30, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x9d00
nopw %cs:(%rax,%rax)
| _ZN5nglog12_GLOBAL__N_113LogFileObject12SetExtensionEPKc:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rsi, [rbp+var_8]
mov [rbp+var_30], rsi
add rsi, 8
lea rdi, [rbp+var_18]
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov rdi, [rbp+var_30]
add rdi, 78h ; 'x'
mov rsi, [rbp+var_10]
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator!=<char>(std::string const&,char const*)
mov [rbp+var_25], al
jmp short $+2
loc_1622B:
mov al, [rbp+var_25]
test al, 1
jnz short loc_16234
jmp short loc_1629E
loc_16234:
mov rdi, [rbp+var_30]
add rdi, 98h
xor eax, eax
mov esi, eax
call _ZStneI8_IO_FILESt14default_deleteIS0_EEbRKSt10unique_ptrIT_T0_EDn; std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>(std::unique_ptr<_IO_FILE> const&,decltype(nullptr))
test al, 1
jnz short loc_1624E
jmp short loc_16289
loc_1624E:
mov rdi, [rbp+var_30]
add rdi, 98h
xor eax, eax
mov esi, eax
call _ZNSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EEaSEDn; std::unique_ptr<_IO_FILE>::operator=(decltype(nullptr))
mov rax, [rbp+var_30]
mov dword ptr [rax+0B0h], 1Fh
jmp short loc_16289
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_18]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp short loc_162AD
loc_16289:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_10]
add rdi, 78h ; 'x'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_1629C:
jmp short $+2
loc_1629E:
lea rdi, [rbp+var_18]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
add rsp, 30h
pop rbp
retn
loc_162AD:
mov rdi, [rbp+var_20]
call __Unwind_Resume
| long long nglog::`anonymous namespace'::LogFileObject::SetExtension(
nglog::_anonymous_namespace_::LogFileObject *this,
const char *a2)
{
_BYTE v3[8]; // [rsp+18h] [rbp-18h] BYREF
const char *v4; // [rsp+20h] [rbp-10h]
nglog::_anonymous_namespace_::LogFileObject *v5; // [rsp+28h] [rbp-8h]
v5 = this;
v4 = a2;
std::lock_guard<std::mutex>::lock_guard(v3, (char *)this + 8);
if ( (std::operator!=<char>((char *)this + 120, v4) & 1) != 0 )
{
if ( (std::operator!=<_IO_FILE,std::default_delete<_IO_FILE>>((char *)this + 152, 0LL) & 1) != 0 )
{
std::unique_ptr<_IO_FILE>::operator=((char *)this + 152, 0LL);
*((_DWORD *)this + 44) = 31;
}
std::string::operator=((char *)this + 120, v4);
}
return std::lock_guard<std::mutex>::~lock_guard(v3);
}
| SetExtension:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RSI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RSI
ADD RSI,0x8
LEA RDI,[RBP + -0x18]
CALL 0x001174a0
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x78
MOV RSI,qword ptr [RBP + -0x10]
LAB_00116221:
CALL 0x0011c4a0
MOV byte ptr [RBP + -0x25],AL
JMP 0x0011622b
LAB_0011622b:
MOV AL,byte ptr [RBP + -0x25]
TEST AL,0x1
JNZ 0x00116234
JMP 0x0011629e
LAB_00116234:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x98
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00119950
TEST AL,0x1
JNZ 0x0011624e
JMP 0x00116289
LAB_0011624e:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x98
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00119190
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0xb0],0x1f
JMP 0x00116289
LAB_00116289:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x10]
ADD RDI,0x78
CALL 0x00109a30
LAB_0011629a:
JMP 0x0011629c
LAB_0011629c:
JMP 0x0011629e
LAB_0011629e:
LEA RDI,[RBP + -0x18]
CALL 0x001174d0
ADD RSP,0x30
POP RBP
RET
|
/* nglog::(anonymous namespace)::LogFileObject::SetExtension(char const*) */
void __thiscall
nglog::(anonymous_namespace)::LogFileObject::SetExtension(LogFileObject *this,char *param_1)
{
bool bVar1;
lock_guard<std::mutex> local_20 [8];
char *local_18;
LogFileObject *local_10;
local_18 = param_1;
local_10 = this;
std::lock_guard<std::mutex>::lock_guard(local_20,(mutex *)(this + 8));
/* try { // try from 00116221 to 00116299 has its CatchHandler @ 00116272 */
bVar1 = std::operator!=((string *)(this + 0x78),local_18);
if (bVar1) {
bVar1 = std::operator!=((unique_ptr *)(this + 0x98),(_func_decltype_nullptr *)0x0);
if (bVar1) {
std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::operator=
((unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>> *)(this + 0x98),
(_func_decltype_nullptr *)0x0);
*(int4 *)(this + 0xb0) = 0x1f;
}
std::__cxx11::string::operator=((string *)(this + 0x78),local_18);
}
std::lock_guard<std::mutex>::~lock_guard(local_20);
return;
}
| |
41,750 | my_pread | eloqsql/mysys/my_pread.c | size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset,
myf MyFlags)
{
size_t readbytes, save_count= 0;
DBUG_ENTER("my_pread");
DBUG_PRINT("my",("fd: %d Seek: %llu Buffer: %p Count: %lu MyFlags: %lu",
Filedes, (ulonglong)offset, Buffer, (ulong)Count, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
for (;;)
{
errno= 0; /* Linux, Windows don't reset this on EOF/success */
#ifdef _WIN32
readbytes= my_win_pread(Filedes, Buffer, Count, offset);
#else
readbytes= pread(Filedes, Buffer, Count, offset);
#endif
if (readbytes != Count)
{
/* We should never read with wrong file descriptor! */
DBUG_ASSERT(readbytes != (size_t)-1 || errno != EBADF);
my_errno= errno;
if (errno == 0 || (readbytes != (size_t) -1 &&
(MyFlags & (MY_NABP | MY_FNABP))))
my_errno= HA_ERR_FILE_TOO_SHORT;
DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d",
(int) readbytes, (uint) Count,Filedes,my_errno));
if ((readbytes == 0 || readbytes == (size_t) -1) && errno == EINTR)
{
DBUG_PRINT("debug", ("my_pread() was interrupted and returned %d",
(int) readbytes));
continue; /* Interrupted */
}
/* Do a read retry if we didn't get enough data on first read */
if (readbytes != (size_t) -1 && readbytes != 0 &&
(MyFlags & MY_FULL_IO))
{
Buffer+= readbytes;
Count-= readbytes;
save_count+= readbytes;
offset+= readbytes;
continue;
}
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (readbytes == (size_t) -1)
my_error(EE_READ,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
}
if (readbytes == (size_t) -1 || (MyFlags & (MY_FNABP | MY_NABP)))
DBUG_RETURN(MY_FILE_ERROR); /* Return with error */
}
if (MyFlags & (MY_NABP | MY_FNABP))
readbytes= 0; /* Read went ok; Return 0 */
else
readbytes+= save_count;
DBUG_RETURN(readbytes);
}
} | O3 | c | my_pread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, -0x58(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, -0x50(%rbp)
movl %edi, -0x2c(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x0, %r15d
testb $0x1a, %r8b
jne 0xa06a2
leaq 0xb67669(%rip), %rax # 0xc07d08
movq (%rax), %r15
orq %r8, %r15
callq 0x29790
movq %rax, %r14
movq %r15, -0x48(%rbp)
movl $0x0, (%r14)
movl -0x2c(%rbp), %edi
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
movq -0x58(%rbp), %rcx
callq 0x29640
subq %rax, %rbx
je 0xa0799
movq %rax, %r12
testb $0x6, %r15b
sete %r13b
movl (%r14), %r15d
callq 0xa1b26
movl %r15d, (%rax)
cmpq $-0x1, %r12
sete %al
cmpl $0x0, (%r14)
je 0xa0700
orb %r13b, %al
jne 0xa070b
callq 0xa1b26
movl $0xaf, (%rax)
leaq 0x1(%r12), %rax
cmpq $0x1, %rax
ja 0xa0722
cmpl $0x4, (%r14)
movq -0x48(%rbp), %r15
je 0xa06b1
jmp 0xa074a
movq -0x48(%rbp), %r15
btl $0x9, %r15d
jae 0xa0742
addq %r12, -0x50(%rbp)
addq %r12, -0x40(%rbp)
addq %r12, -0x58(%rbp)
movq %rbx, -0x38(%rbp)
jmp 0xa06b1
movq $0x0, -0x40(%rbp)
testb $0x1a, %r15b
je 0xa0780
cmpq $-0x1, %r12
je 0xa07ad
testb $0x6, %r15b
je 0xa0780
andl $0x440, %r15d # imm = 0x440
orq $0x4, %r15
movl -0x2c(%rbp), %edi
callq 0xa8f98
movq %rax, %rbx
callq 0xa1b26
movl (%rax), %ecx
movl $0x9, %edi
jmp 0xa07cf
movq $-0x1, %rax
cmpq $-0x1, %r12
je 0xa07e3
movl %r15d, %ecx
movq %r12, -0x38(%rbp)
andl $0x6, %ecx
jne 0xa07e3
movq -0x40(%rbp), %rcx
addq -0x38(%rbp), %rcx
xorl %eax, %eax
testb $0x6, %r15b
cmoveq %rcx, %rax
jmp 0xa07e3
andl $0x440, %r15d # imm = 0x440
orq $0x4, %r15
movl -0x2c(%rbp), %edi
callq 0xa8f98
movq %rax, %rbx
callq 0xa1b26
movl (%rax), %ecx
movl $0x2, %edi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9e037
movq $-0x1, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_pread:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_58], rcx
mov [rbp+var_38], rdx
mov [rbp+var_50], rsi
mov [rbp+var_2C], edi
mov [rbp+var_40], 0
mov r15d, 0
test r8b, 1Ah
jnz short loc_A06A2
lea rax, my_global_flags
mov r15, [rax]
loc_A06A2:
or r15, r8
call ___errno_location
mov r14, rax
mov [rbp+var_48], r15
loc_A06B1:
mov dword ptr [r14], 0
mov edi, [rbp+var_2C]
mov rsi, [rbp+var_50]
mov rbx, [rbp+var_38]
mov rdx, rbx
mov rcx, [rbp+var_58]
call _pread64
sub rbx, rax
jz loc_A0799
mov r12, rax
test r15b, 6
setz r13b
mov r15d, [r14]
call _my_thread_var
mov [rax], r15d
cmp r12, 0FFFFFFFFFFFFFFFFh
setz al
cmp dword ptr [r14], 0
jz short loc_A0700
or al, r13b
jnz short loc_A070B
loc_A0700:
call _my_thread_var
mov dword ptr [rax], 0AFh
loc_A070B:
lea rax, [r12+1]
cmp rax, 1
ja short loc_A0722
cmp dword ptr [r14], 4
mov r15, [rbp+var_48]
jz short loc_A06B1
jmp short loc_A074A
loc_A0722:
mov r15, [rbp+var_48]
bt r15d, 9
jnb short loc_A0742
add [rbp+var_50], r12
add [rbp+var_40], r12
add [rbp+var_58], r12
mov [rbp+var_38], rbx
jmp loc_A06B1
loc_A0742:
mov [rbp+var_40], 0
loc_A074A:
test r15b, 1Ah
jz short loc_A0780
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_A07AD
test r15b, 6
jz short loc_A0780
and r15d, 440h
or r15, 4
mov edi, [rbp+var_2C]
call my_filename
mov rbx, rax
call _my_thread_var
mov ecx, [rax]
mov edi, 9
jmp short loc_A07CF
loc_A0780:
mov rax, 0FFFFFFFFFFFFFFFFh
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_A07E3
mov ecx, r15d
mov [rbp+var_38], r12
and ecx, 6
jnz short loc_A07E3
loc_A0799:
mov rcx, [rbp+var_40]
add rcx, [rbp+var_38]
xor eax, eax
test r15b, 6
cmovz rax, rcx
jmp short loc_A07E3
loc_A07AD:
and r15d, 440h
or r15, 4
mov edi, [rbp+var_2C]
call my_filename
mov rbx, rax
call _my_thread_var
mov ecx, [rax]
mov edi, 2
loc_A07CF:
mov rsi, r15
mov rdx, rbx
xor eax, eax
call my_error
mov rax, 0FFFFFFFFFFFFFFFFh
loc_A07E3:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_pread(long long a1, long long a2, long long a3, long long a4, __int16 a5)
{
__int16 v5; // r15
__int16 v6; // r15
int *v7; // r14
long long v8; // rax
long long v9; // rbx
long long v10; // r12
bool v11; // r13
int v12; // r15d
long long v13; // r15
long long v14; // rbx
long long v15; // rcx
unsigned int v16; // edi
long long result; // rax
__int16 v20; // [rsp+18h] [rbp-48h]
long long v21; // [rsp+20h] [rbp-40h]
v21 = 0LL;
v5 = 0;
if ( (a5 & 0x1A) == 0 )
v5 = my_global_flags;
v6 = a5 | v5;
v7 = (int *)__errno_location(a1);
v20 = v6;
while ( 1 )
{
while ( 1 )
{
*v7 = 0;
v8 = pread64((unsigned int)a1, a2, a3, a4);
v9 = a3 - v8;
if ( a3 == v8 )
goto LABEL_20;
v10 = v8;
v11 = (v6 & 6) == 0;
v12 = *v7;
*(_DWORD *)my_thread_var((unsigned int)a1) = v12;
if ( !*v7 || !v11 && v10 != -1 )
*(_DWORD *)my_thread_var((unsigned int)a1) = 175;
if ( (unsigned long long)(v10 + 1) > 1 )
break;
v6 = v20;
if ( *v7 != 4 )
goto LABEL_14;
}
v6 = v20;
if ( (v20 & 0x200) == 0 )
break;
a2 += v10;
v21 += v10;
a4 += v10;
a3 = v9;
}
v21 = 0LL;
LABEL_14:
if ( (v6 & 0x1A) != 0 )
{
if ( v10 == -1 )
{
v13 = v6 & 0x440 | 4LL;
v14 = my_filename((unsigned int)a1);
v15 = *(unsigned int *)my_thread_var((unsigned int)a1);
v16 = 2;
goto LABEL_24;
}
if ( (v6 & 6) != 0 )
{
v13 = v6 & 0x440 | 4LL;
v14 = my_filename((unsigned int)a1);
v15 = *(unsigned int *)my_thread_var((unsigned int)a1);
v16 = 9;
LABEL_24:
my_error(v16, v13, v14, v15);
return -1LL;
}
}
result = -1LL;
if ( v10 != -1 )
{
a3 = v10;
if ( (v6 & 6) == 0 )
{
LABEL_20:
result = 0LL;
if ( (v6 & 6) == 0 )
return a3 + v21;
}
}
return result;
}
| my_pread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x58],RCX
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x50],RSI
MOV dword ptr [RBP + -0x2c],EDI
MOV qword ptr [RBP + -0x40],0x0
MOV R15D,0x0
TEST R8B,0x1a
JNZ 0x001a06a2
LEA RAX,[0xd07d08]
MOV R15,qword ptr [RAX]
LAB_001a06a2:
OR R15,R8
CALL 0x00129790
MOV R14,RAX
MOV qword ptr [RBP + -0x48],R15
LAB_001a06b1:
MOV dword ptr [R14],0x0
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,qword ptr [RBP + -0x50]
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x58]
CALL 0x00129640
SUB RBX,RAX
JZ 0x001a0799
MOV R12,RAX
TEST R15B,0x6
SETZ R13B
MOV R15D,dword ptr [R14]
CALL 0x001a1b26
MOV dword ptr [RAX],R15D
CMP R12,-0x1
SETZ AL
CMP dword ptr [R14],0x0
JZ 0x001a0700
OR AL,R13B
JNZ 0x001a070b
LAB_001a0700:
CALL 0x001a1b26
MOV dword ptr [RAX],0xaf
LAB_001a070b:
LEA RAX,[R12 + 0x1]
CMP RAX,0x1
JA 0x001a0722
CMP dword ptr [R14],0x4
MOV R15,qword ptr [RBP + -0x48]
JZ 0x001a06b1
JMP 0x001a074a
LAB_001a0722:
MOV R15,qword ptr [RBP + -0x48]
BT R15D,0x9
JNC 0x001a0742
ADD qword ptr [RBP + -0x50],R12
ADD qword ptr [RBP + -0x40],R12
ADD qword ptr [RBP + -0x58],R12
MOV qword ptr [RBP + -0x38],RBX
JMP 0x001a06b1
LAB_001a0742:
MOV qword ptr [RBP + -0x40],0x0
LAB_001a074a:
TEST R15B,0x1a
JZ 0x001a0780
CMP R12,-0x1
JZ 0x001a07ad
TEST R15B,0x6
JZ 0x001a0780
AND R15D,0x440
OR R15,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x001a8f98
MOV RBX,RAX
CALL 0x001a1b26
MOV ECX,dword ptr [RAX]
MOV EDI,0x9
JMP 0x001a07cf
LAB_001a0780:
MOV RAX,-0x1
CMP R12,-0x1
JZ 0x001a07e3
MOV ECX,R15D
MOV qword ptr [RBP + -0x38],R12
AND ECX,0x6
JNZ 0x001a07e3
LAB_001a0799:
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,qword ptr [RBP + -0x38]
XOR EAX,EAX
TEST R15B,0x6
CMOVZ RAX,RCX
JMP 0x001a07e3
LAB_001a07ad:
AND R15D,0x440
OR R15,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x001a8f98
MOV RBX,RAX
CALL 0x001a1b26
MOV ECX,dword ptr [RAX]
MOV EDI,0x2
LAB_001a07cf:
MOV RSI,R15
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0019e037
MOV RAX,-0x1
LAB_001a07e3:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_pread(int param_1,void *param_2,size_t param_3,long param_4,ulong param_5)
{
int iVar1;
int4 uVar2;
int *piVar3;
size_t sVar4;
int *piVar5;
int4 *puVar6;
int8 uVar7;
long lVar8;
int8 uVar9;
ulong uVar10;
long local_60;
void *local_58;
long local_48;
size_t local_40;
local_48 = 0;
uVar10 = 0;
if ((param_5 & 0x1a) == 0) {
uVar10 = my_global_flags;
}
uVar10 = uVar10 | param_5;
piVar3 = __errno_location();
local_60 = param_4;
local_58 = param_2;
local_40 = param_3;
do {
while( true ) {
*piVar3 = 0;
sVar4 = pread64(param_1,local_58,local_40,local_60);
if (local_40 - sVar4 == 0) goto LAB_001a0799;
iVar1 = *piVar3;
piVar5 = (int *)_my_thread_var();
*piVar5 = iVar1;
if ((*piVar3 == 0) || (sVar4 != 0xffffffffffffffff && (uVar10 & 6) != 0)) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0xaf;
}
if (sVar4 + 1 < 2) break;
if (((uint)uVar10 >> 9 & 1) == 0) {
local_48 = 0;
goto LAB_001a074a;
}
local_58 = (void *)((long)local_58 + sVar4);
local_48 = local_48 + sVar4;
local_60 = local_60 + sVar4;
local_40 = local_40 - sVar4;
}
} while (*piVar3 == 4);
LAB_001a074a:
if ((uVar10 & 0x1a) == 0) {
LAB_001a0780:
lVar8 = -1;
if ((sVar4 != 0xffffffffffffffff) && (local_40 = sVar4, (uVar10 & 6) == 0)) {
LAB_001a0799:
lVar8 = 0;
if ((uVar10 & 6) == 0) {
lVar8 = local_48 + local_40;
}
}
}
else {
if (sVar4 == 0xffffffffffffffff) {
uVar7 = my_filename(param_1);
puVar6 = (int4 *)_my_thread_var();
uVar2 = *puVar6;
uVar9 = 2;
}
else {
if ((uVar10 & 6) == 0) goto LAB_001a0780;
uVar7 = my_filename(param_1);
puVar6 = (int4 *)_my_thread_var();
uVar2 = *puVar6;
uVar9 = 9;
}
my_error(uVar9,(uint)uVar10 & 0x440 | 4,uVar7,uVar2);
lVar8 = -1;
}
return lVar8;
}
| |
41,751 | bf_asin_internal | bluesky950520[P]quickjs/libbf.c | static int bf_asin_internal(bf_t *r, const bf_t *a, limb_t prec, void *opaque)
{
bf_context_t *s = r->ctx;
BOOL is_acos = (BOOL)(intptr_t)opaque;
bf_t T_s, *T = &T_s;
limb_t prec1, prec2;
/* asin(x) = atan(x/sqrt(1-x^2))
acos(x) = pi/2 - asin(x) */
prec1 = prec + 8;
/* increase the precision in x^2 to compensate the cancellation in
(1-x^2) if x is close to 1 */
/* XXX: use less precision when possible */
if (a->expn >= 0)
prec2 = BF_PREC_INF;
else
prec2 = prec1;
bf_init(s, T);
bf_mul(T, a, a, prec2, BF_RNDN);
bf_neg(T);
bf_add_si(T, T, 1, prec2, BF_RNDN);
bf_sqrt(r, T, prec1, BF_RNDN);
bf_div(T, a, r, prec1, BF_RNDN);
if (is_acos)
bf_neg(T);
bf_atan_internal(r, T, prec1, (void *)(intptr_t)is_acos);
bf_delete(T);
return BF_ST_INEXACT;
} | O2 | c | bf_asin_internal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rax
addq $0x8, %rbx
cmpq $0x0, 0x10(%rsi)
movabsq $0x3fffffffffffffff, %rbp # imm = 0x3FFFFFFFFFFFFFFF
cmovsq %rbx, %rbp
movq %rsp, %r13
movq %rax, (%r13)
andl $0x0, 0x8(%r13)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movq %r13, %rdi
movq %rsi, %rdx
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x74959
xorb $0x1, 0x8(%r13)
pushq $0x1
popq %rdx
movq %r13, %rdi
movq %r13, %rsi
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x74f2a
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x755e5
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x758a2
testl %r15d, %r15d
je 0x79d47
xorb $0x1, 0x8(%rsp)
movslq %r15d, %rcx
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x7969e
movq %r15, %rdi
callq 0x7500e
pushq $0x10
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_asin_internal:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rcx
mov rbx, rdx
mov r12, rsi
mov r14, rdi
mov rax, [rdi]
add rbx, 8
cmp qword ptr [rsi+10h], 0
mov rbp, 3FFFFFFFFFFFFFFFh
cmovs rbp, rbx
mov r13, rsp
mov [r13+0], rax
and dword ptr [r13+8], 0
mov rax, 8000000000000000h
mov [r13+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
mov rdi, r13
mov rdx, rsi
mov rcx, rbp
xor r8d, r8d
call bf_mul
xor byte ptr [r13+8], 1
push 1
pop rdx
mov rdi, r13
mov rsi, r13
mov rcx, rbp
xor r8d, r8d
call bf_add_si
mov rdi, r14
mov rsi, r13
mov rdx, rbx
xor ecx, ecx
call bf_sqrt
mov rdi, r13
mov rsi, r12
mov rdx, r14
mov rcx, rbx
xor r8d, r8d
call bf_div
test r15d, r15d
jz short loc_79D47
xor [rsp+58h+var_50], 1
loc_79D47:
movsxd rcx, r15d
mov r15, rsp
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call bf_atan_internal
mov rdi, r15
call bf_delete_0
push 10h
pop rax
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_asin_internal(__int128 *a1, long long *a2, long long a3, int a4)
{
unsigned long long v5; // rbx
long long v6; // rbp
__int128 v8; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v9; // [rsp+10h] [rbp-48h]
__int128 v10; // [rsp+18h] [rbp-40h]
v5 = a3 + 8;
v6 = 0x3FFFFFFFFFFFFFFFLL;
if ( a2[2] < 0 )
v6 = a3 + 8;
*(_QWORD *)&v8 = *(_QWORD *)a1;
DWORD2(v8) = 0;
v9 = 0x8000000000000000LL;
v10 = 0LL;
bf_mul((long long *)&v8, a2, a2, v6, 0);
BYTE8(v8) ^= 1u;
bf_add_si((long long *)&v8, (long long)&v8, 1LL, v6, 0);
bf_sqrt((long long)a1, (long long)&v8, v5, 0);
bf_div(&v8, (__int128 *)a2, a1, v5, 0LL);
if ( a4 )
BYTE8(v8) ^= 1u;
bf_atan_internal((long long)a1, (long long)&v8, v5, a4);
bf_delete_0((long long *)&v8);
return 16LL;
}
| bf_asin_internal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RCX
MOV RBX,RDX
MOV R12,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
ADD RBX,0x8
CMP qword ptr [RSI + 0x10],0x0
MOV RBP,0x3fffffffffffffff
CMOVS RBP,RBX
MOV R13,RSP
MOV qword ptr [R13],RAX
AND dword ptr [R13 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R13 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x18],XMM0
MOV RDI,R13
MOV RDX,RSI
MOV RCX,RBP
XOR R8D,R8D
CALL 0x00174959
XOR byte ptr [R13 + 0x8],0x1
PUSH 0x1
POP RDX
MOV RDI,R13
MOV RSI,R13
MOV RCX,RBP
XOR R8D,R8D
CALL 0x00174f2a
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBX
XOR ECX,ECX
CALL 0x001755e5
MOV RDI,R13
MOV RSI,R12
MOV RDX,R14
MOV RCX,RBX
XOR R8D,R8D
CALL 0x001758a2
TEST R15D,R15D
JZ 0x00179d47
XOR byte ptr [RSP + 0x8],0x1
LAB_00179d47:
MOVSXD RCX,R15D
MOV R15,RSP
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x0017969e
MOV RDI,R15
CALL 0x0017500e
PUSH 0x10
POP RAX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 bf_asin_internal(int8 *param_1,long param_2,long param_3,int param_4)
{
long lVar1;
int8 local_58;
uint local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
local_58 = *param_1;
param_3 = param_3 + 8;
lVar1 = 0x3fffffffffffffff;
if (*(long *)(param_2 + 0x10) < 0) {
lVar1 = param_3;
}
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
bf_mul(&local_58,param_2,param_2,lVar1,0);
local_50 = local_50 ^ 1;
bf_add_si(&local_58,&local_58,1,lVar1,0);
bf_sqrt(param_1,&local_58,param_3,0);
bf_div(&local_58,param_2,param_1,param_3,0);
if (param_4 != 0) {
local_50 = local_50 ^ 1;
}
bf_atan_internal(param_1,&local_58,param_3,(long)param_4);
bf_delete(&local_58);
return 0x10;
}
| |
41,752 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const | monkey531[P]llama/common/json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | 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> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x7f579
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x7e99a
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x7f5d7
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %r14, %rdi
callq 0x43b2e
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x35b12(%rip), %rsi # 0xb50ad
leaq 0x8(%rsp), %rdi
callq 0x7e3c5
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x63a62
xorl %ebp, %ebp
leaq 0x7c982(%rip), %rsi # 0xfbf48
leaq -0x3ef0f(%rip), %rdx # 0x406be
movq %rbx, %rdi
callq 0x23f10
jmp 0x7f641
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x27c76
leaq 0x35ae2(%rip), %rsi # 0xb50dd
leaq 0x35ae1(%rip), %rcx # 0xb50e3
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x7e9cf
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x7ee3a
xorl %ebp, %ebp
leaq 0x7c896(%rip), %rsi # 0xfbec8
leaq -0x3ef7b(%rip), %rdx # 0x406be
movq %rbx, %rdi
callq 0x23f10
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x241c8
jmp 0x7f656
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x7f667
jmp 0x7f673
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x241c8
testb %bpl, %bpl
jne 0x7f676
jmp 0x7f67e
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23f90
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_7F579
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_7F5D7
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_7F579:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_7F641
loc_7F5D7:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_7F641:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7F656
mov r14, rax
mov bpl, 1
loc_7F656:
lea rdi, [rsp+68h+var_40]
jmp short loc_7F667
jmp short loc_7F673
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_7F667:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7F676
jmp short loc_7F67E
loc_7F673:
mov r14, rax
loc_7F676:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7F67E:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v6,
(long long)"cannot use at() with ",
v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
(long long)v6);
__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);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(long long **)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v7, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v6,
(long long)"key '",
(long long)v7,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v5,
403,
(long long)v6);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0017f579
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0017e99a
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0017f5d7
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0017f579:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143b2e
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0017f594:
LEA RSI,[0x1b50ad]
LEA RDI,[RSP + 0x8]
CALL 0x0017e3c5
MOV BPL,0x1
LAB_0017f5a8:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00163a62
XOR EBP,EBP
LEA RSI,[0x1fbf48]
LEA RDX,[0x1406be]
MOV RDI,RBX
CALL 0x00123f10
LAB_0017f5d7:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_0017f5e2:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x00127c76
LAB_0017f5f4:
LEA RSI,[0x1b50dd]
LEA RCX,[0x1b50e3]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0017e9cf
MOV BPL,0x1
LAB_0017f614:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0017ee3a
XOR EBP,EBP
LEA RSI,[0x1fbec8]
LEA RDX,[0x1406be]
MOV RDI,RBX
CALL 0x00123f10
|
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (char *)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>
::type_name(param_1);
/* try { // try from 0017f594 to 0017f5a4 has its CatchHandler @ 0017f673 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 0017f5a8 to 0017f5d4 has its CatchHandler @ 0017f65f */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 0017f5e2 to 0017f5f3 has its CatchHandler @ 0017f65d */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 0017f5f4 to 0017f610 has its CatchHandler @ 0017f650 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 0017f614 to 0017f640 has its CatchHandler @ 0017f641 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
| |
41,753 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const | monkey531[P]llama/common/json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa5a1b
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa5a05
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a220
testl %eax, %eax
je 0xa59fa
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xa59db
jmp 0xa59fd
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xa5a79
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a450
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f468
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4b670(%rip), %rsi # 0xf10ad
leaq 0x20(%rsp), %rdi
callq 0xab411
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x86d76
xorl %ebp, %ebp
leaq 0x844f0(%rip), %rsi # 0x129f58
leaq -0x4a3d1(%rip), %rdx # 0x5b69e
movq %rbx, %rdi
callq 0x1af10
jmp 0xa5af2
movl $0x20, %edi
callq 0x1a450
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1a3f0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x22402
leaq 0x4b62f(%rip), %rsi # 0xf10dd
leaq 0x4b62e(%rip), %rcx # 0xf10e3
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xab9ee
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xabd66
xorl %ebp, %ebp
leaq 0x843f5(%rip), %rsi # 0x129ed8
leaq -0x4a44c(%rip), %rdx # 0x5b69e
movq %rbx, %rdi
callq 0x1af10
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5b10
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa5b5b
movq 0x10(%rsp), %rsi
jmp 0xa5b53
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa5b65
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0xa5b65
jmp 0xa5b62
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5b5b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0xa5b65
jmp 0xa5b6d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1af90
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A5A1B
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A5A05
loc_A59DB:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A59FA
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_A59DB
jmp short loc_A59FD
loc_A59FA:
mov rax, rbx
loc_A59FD:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_A5A05:
cmp rax, rbx
jz short loc_A5A79
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A5A1B:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_A5AF2
loc_A5A79:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A5AF2:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A5B10
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A5B10:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_A5B5B
mov rsi, [rsp+68h+var_58]
jmp short loc_A5B53
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_A5B65
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A5B65
jmp short loc_A5B62
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A5B5B
mov rsi, [rsp+68h+var_38]
loc_A5B53:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A5B5B:
test bpl, bpl
jnz short loc_A5B65
jmp short loc_A5B6D
loc_A5B62:
mov r14, rax
loc_A5B65:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A5B6D:
mov rdi, r14
call __Unwind_Resume
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a5a1b
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a5a05
LAB_001a59db:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a220
TEST EAX,EAX
JZ 0x001a59fa
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001a59db
JMP 0x001a59fd
LAB_001a59fa:
MOV RAX,RBX
LAB_001a59fd:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001a5a05:
CMP RAX,RBX
JZ 0x001a5a79
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a5a1b:
MOV EDI,0x20
CALL 0x0011a450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f468
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001a5a36:
LEA RSI,[0x1f10ad]
LEA RDI,[RSP + 0x20]
CALL 0x001ab411
MOV BPL,0x1
LAB_001a5a4a:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00186d76
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15b69e]
MOV RDI,RBX
CALL 0x0011af10
LAB_001a5a79:
MOV EDI,0x20
CALL 0x0011a450
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011a3f0
LEA RDX,[RAX + R15*0x1]
LAB_001a5a9c:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00122402
LAB_001a5aa7:
LEA RSI,[0x1f10dd]
LEA RCX,[0x1f10e3]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001ab9ee
MOV BPL,0x1
LAB_001a5ac5:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001abd66
XOR EBP,EBP
LEA RSI,[0x229ed8]
LEA RDX,[0x15b69e]
MOV RDI,RBX
CALL 0x0011af10
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)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>
::type_name(param_1);
/* try { // try from 001a5a36 to 001a5a46 has its CatchHandler @ 001a5b62 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001a5a4a to 001a5a76 has its CatchHandler @ 001a5b3d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001a5a9c to 001a5aa6 has its CatchHandler @ 001a5b3b */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001a5aa7 to 001a5ac1 has its CatchHandler @ 001a5b20 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001a5ac5 to 001a5af1 has its CatchHandler @ 001a5af2 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| ||
41,754 | google::protobuf::compiler::csharp::GetPropertyName[abi:cxx11](google::protobuf::FieldDescriptor const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_helpers.cc | std::string GetPropertyName(const FieldDescriptor* descriptor) {
// TODO(jtattermusch): consider introducing csharp_property_name field option
std::string property_name = UnderscoresToPascalCase(GetFieldName(descriptor));
// Avoid either our own type name or reserved names. Note that not all names
// are reserved - a field called to_string, write_to etc would still cause a problem.
// There are various ways of ending up with naming collisions, but we try to avoid obvious
// ones.
if (property_name == descriptor->containing_type()->name()
|| property_name == "Types"
|| property_name == "Descriptor") {
property_name += "_";
}
return property_name;
} | O0 | cpp | google::protobuf::compiler::csharp::GetPropertyName[abi:cxx11](google::protobuf::FieldDescriptor const*):
subq $0x78, %rsp
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movb $0x0, 0x67(%rsp)
movq 0x68(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x68bd0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x67990
jmp 0x68a85
leaq 0x40(%rsp), %rdi
callq 0x21cc8
movq 0x68(%rsp), %rdi
callq 0x586b0
movq %rax, 0x10(%rsp)
jmp 0x68aa0
movq 0x10(%rsp), %rdi
callq 0x58140
movq %rax, 0x8(%rsp)
jmp 0x68ab1
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x38780
testb $0x1, %al
jne 0x68b06
movq 0x20(%rsp), %rdi
leaq 0x343a80(%rip), %rsi # 0x3ac550
callq 0x371b0
movb %al, 0x7(%rsp)
jmp 0x68adb
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x68b06
jmp 0x68ae5
movq 0x20(%rsp), %rdi
leaq 0x34f28b(%rip), %rsi # 0x3b7d7c
callq 0x371b0
movb %al, 0x6(%rsp)
jmp 0x68afc
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0x68b06
jmp 0x68b4f
movq 0x20(%rsp), %rdi
leaq 0x34f51d(%rip), %rsi # 0x3b802f
callq 0x21190
jmp 0x68b19
jmp 0x68b4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x21cc8
jmp 0x68b6f
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x21cc8
jmp 0x68b6f
movb $0x1, 0x67(%rsp)
testb $0x1, 0x67(%rsp)
jne 0x68b65
movq 0x20(%rsp), %rdi
callq 0x21cc8
movq 0x18(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x21700
nopl (%rax)
| _ZN6google8protobuf8compiler6csharp15GetPropertyNameB5cxx11EPKNS0_15FieldDescriptorE:
sub rsp, 78h
mov [rsp+78h+var_58], rdi
mov rax, rdi
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov [rsp+78h+var_11], 0
mov rsi, [rsp+78h+var_10]
lea rdi, [rsp+78h+var_38]
mov [rsp+78h+var_50], rdi
call _ZN6google8protobuf8compiler6csharp12GetFieldNameB5cxx11EPKNS0_15FieldDescriptorE; google::protobuf::compiler::csharp::GetFieldName(google::protobuf::FieldDescriptor const*)
mov rdi, [rsp+78h+var_58]
mov rsi, [rsp+78h+var_50]
call _ZN6google8protobuf8compiler6csharp23UnderscoresToPascalCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::csharp::UnderscoresToPascalCase(std::string const&)
jmp short $+2
loc_68A85:
lea rdi, [rsp+78h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+78h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor15containing_typeEv; google::protobuf::FieldDescriptor::containing_type(void)
mov [rsp+78h+var_68], rax
jmp short $+2
loc_68AA0:
mov rdi, [rsp+78h+var_68]
call _ZNK6google8protobuf10Descriptor4nameB5cxx11Ev; google::protobuf::Descriptor::name(void)
mov [rsp+78h+var_70], rax
jmp short $+2
loc_68AB1:
mov rsi, [rsp+78h+var_70]
mov rdi, [rsp+78h+var_58]
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
test al, 1
jnz short loc_68B06
mov rdi, [rsp+78h+var_58]
lea rsi, aTypes_0; "Types"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+78h+var_71], al
jmp short $+2
loc_68ADB:
mov al, [rsp+78h+var_71]
test al, 1
jnz short loc_68B06
jmp short $+2
loc_68AE5:
mov rdi, [rsp+78h+var_58]
lea rsi, aDescriptorFiel_0+11h; "Descriptor"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+78h+var_72], al
jmp short $+2
loc_68AFC:
mov al, [rsp+78h+var_72]
test al, 1
jnz short loc_68B06
jmp short loc_68B4F
loc_68B06:
mov rdi, [rsp+78h+var_58]
lea rsi, aPb_0+2; "_"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_68B19:
jmp short loc_68B4F
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_68B6F
mov rdi, [rsp+arg_18]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_68B6F
loc_68B4F:
mov [rsp+78h+var_11], 1
test [rsp+78h+var_11], 1
jnz short loc_68B65
mov rdi, [rsp+78h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_68B65:
mov rax, [rsp+78h+var_60]
add rsp, 78h
retn
loc_68B6F:
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| void * google::protobuf::compiler::csharp::GetPropertyName[abi:cxx11](
void *a1,
google::protobuf::FieldDescriptor *a2)
{
long long v3; // [rsp+8h] [rbp-70h]
long long v4; // [rsp+10h] [rbp-68h]
_BYTE v5[40]; // [rsp+40h] [rbp-38h] BYREF
google::protobuf::FieldDescriptor *v6; // [rsp+68h] [rbp-10h]
void *v7; // [rsp+70h] [rbp-8h]
v7 = a1;
v6 = a2;
v5[39] = 0;
google::protobuf::compiler::csharp::GetFieldName[abi:cxx11](v5, a2);
google::protobuf::compiler::csharp::UnderscoresToPascalCase(a1, (int)v5);
std::string::~string(v5);
v4 = google::protobuf::FieldDescriptor::containing_type(v6);
v3 = google::protobuf::Descriptor::name[abi:cxx11](v4);
if ( (std::operator==<char>((long long)a1, v3) & 1) != 0
|| std::operator==<char>((long long)a1, (long long)"Types")
|| std::operator==<char>((long long)a1, (long long)"Descriptor") )
{
std::string::operator+=(a1, "_");
}
return a1;
}
| GetPropertyName[abi:cxx11]:
SUB RSP,0x78
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV byte ptr [RSP + 0x67],0x0
MOV RSI,qword ptr [RSP + 0x68]
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00168bd0
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
LAB_00168a7e:
CALL 0x00167990
JMP 0x00168a85
LAB_00168a85:
LEA RDI,[RSP + 0x40]
CALL 0x00121cc8
MOV RDI,qword ptr [RSP + 0x68]
LAB_00168a94:
CALL 0x001586b0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00168aa0
LAB_00168aa0:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00158140
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00168ab1
LAB_00168ab1:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00138780
TEST AL,0x1
JNZ 0x00168b06
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x4ac550]
CALL 0x001371b0
MOV byte ptr [RSP + 0x7],AL
JMP 0x00168adb
LAB_00168adb:
MOV AL,byte ptr [RSP + 0x7]
TEST AL,0x1
JNZ 0x00168b06
JMP 0x00168ae5
LAB_00168ae5:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x4b7d7c]
CALL 0x001371b0
MOV byte ptr [RSP + 0x6],AL
JMP 0x00168afc
LAB_00168afc:
MOV AL,byte ptr [RSP + 0x6]
TEST AL,0x1
JNZ 0x00168b06
JMP 0x00168b4f
LAB_00168b06:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x4b802f]
CALL 0x00121190
LAB_00168b17:
JMP 0x00168b19
LAB_00168b19:
JMP 0x00168b4f
LAB_00168b4f:
MOV byte ptr [RSP + 0x67],0x1
TEST byte ptr [RSP + 0x67],0x1
JNZ 0x00168b65
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00121cc8
LAB_00168b65:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x78
RET
|
/* WARNING: Removing unreachable block (ram,0x00168b5b) */
/* google::protobuf::compiler::csharp::GetPropertyName[abi:cxx11](google::protobuf::FieldDescriptor
const*) */
csharp * __thiscall
google::protobuf::compiler::csharp::GetPropertyName_abi_cxx11_
(csharp *this,FieldDescriptor *param_1)
{
bool bVar1;
Descriptor *this_00;
string *psVar2;
ulong uVar3;
csharp local_38 [39];
int1 local_11;
FieldDescriptor *local_10;
csharp *local_8;
local_11 = 0;
local_10 = param_1;
local_8 = this;
GetFieldName_abi_cxx11_(local_38,param_1);
/* try { // try from 00168a7e to 00168a82 has its CatchHandler @ 00168b1b */
UnderscoresToPascalCase(this,(string *)local_38);
std::__cxx11::string::~string((string *)local_38);
/* try { // try from 00168a94 to 00168b16 has its CatchHandler @ 00168b35 */
this_00 = (Descriptor *)FieldDescriptor::containing_type(local_10);
psVar2 = (string *)Descriptor::name_abi_cxx11_(this_00);
uVar3 = std::operator==((string *)this,psVar2);
if ((((uVar3 & 1) != 0) || (bVar1 = std::operator==((string *)this,"Types"), bVar1)) ||
(bVar1 = std::operator==((string *)this,"Descriptor"), bVar1)) {
std::__cxx11::string::operator+=((string *)this,"_");
}
return this;
}
| |
41,755 | lshift | eloqsql/strings/dtoa.c | static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc)
{
int i, k1, n, n1;
Bigint *b1;
ULong *x, *x1, *xe, z;
n= k >> 5;
k1= b->k;
n1= n + b->wds + 1;
for (i= b->maxwds; n1 > i; i<<= 1)
k1++;
b1= Balloc(k1, alloc);
x1= b1->p.x;
for (i= 0; i < n; i++)
*x1++= 0;
x= b->p.x;
xe= x + b->wds;
if (k&= 0x1f)
{
k1= 32 - k;
z= 0;
do
{
*x1++= *x << k | z;
z= *x++ >> k1;
}
while (x < xe);
if ((*x1= z))
++n1;
}
else
do
*x1++= *x++;
while (x < xe);
b1->wds= n1 - 1;
Bfree(b, alloc);
return b1;
} | O0 | c | lshift:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
sarl $0x5, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
addl 0x14(%rcx), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0xa988b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
jmp 0xa9870
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0xa9100
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0xa98d5
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl $0x0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa98ad
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x14(%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
je 0xa9974
movl $0x20, %eax
subl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl -0xc(%rbp), %ecx
shll %cl, %eax
movl %eax, %ecx
orl -0x4c(%rbp), %ecx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x40(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %eax
movl -0x20(%rbp), %ecx
shrl %cl, %eax
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0xa9917
movl -0x4c(%rbp), %eax
movq -0x40(%rbp), %rcx
movl %eax, (%rcx)
cmpl $0x0, %eax
je 0xa9972
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xa99a4
jmp 0xa9976
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %ecx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x40(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0xa9976
jmp 0xa99a4
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa97b0
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| lshift:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov eax, [rbp+var_C]
sar eax, 5
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_20], eax
mov eax, [rbp+var_24]
mov rcx, [rbp+var_8]
add eax, [rcx+14h]
add eax, 1
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
mov [rbp+var_1C], eax
loc_A9870:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_1C]
jle short loc_A988B
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
shl eax, 1
mov [rbp+var_1C], eax
jmp short loc_A9870
loc_A988B:
mov edi, [rbp+var_20]
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_40], rax
mov [rbp+var_1C], 0
loc_A98AD:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_24]
jge short loc_A98D5
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov dword ptr [rax], 0
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_A98AD
loc_A98D5:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+14h]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov eax, [rbp+var_C]
and eax, 1Fh
mov [rbp+var_C], eax
cmp eax, 0
jz short loc_A9974
mov eax, 20h ; ' '
sub eax, [rbp+var_C]
mov [rbp+var_20], eax
mov [rbp+var_4C], 0
loc_A9917:
mov rax, [rbp+var_38]
mov eax, [rax]
mov ecx, [rbp+var_C]
shl eax, cl
mov ecx, eax
or ecx, [rbp+var_4C]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 4
mov [rbp+var_40], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov eax, [rax]
mov ecx, [rbp+var_20]
shr eax, cl
mov [rbp+var_4C], eax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_A9917
mov eax, [rbp+var_4C]
mov rcx, [rbp+var_40]
mov [rcx], eax
cmp eax, 0
jz short loc_A9972
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
loc_A9972:
jmp short loc_A99A4
loc_A9974:
jmp short $+2
loc_A9976:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov ecx, [rax]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 4
mov [rbp+var_40], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_A9976
jmp short $+2
loc_A99A4:
mov ecx, [rbp+var_28]
sub ecx, 1
mov rax, [rbp+var_30]
mov [rax+14h], ecx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call Bfree
mov rax, [rbp+var_30]
add rsp, 50h
pop rbp
retn
| long long lshift(unsigned long long a1, int a2, unsigned long long *a3)
{
int *v3; // rax
int *v4; // rax
int *v5; // rax
int *v6; // rax
int v7; // ecx
int *v8; // rax
int v10; // [rsp+4h] [rbp-4Ch]
unsigned long long v11; // [rsp+8h] [rbp-48h]
int *v12; // [rsp+10h] [rbp-40h]
int *v13; // [rsp+18h] [rbp-38h]
long long v14; // [rsp+20h] [rbp-30h]
int v15; // [rsp+28h] [rbp-28h]
int v16; // [rsp+30h] [rbp-20h]
int i; // [rsp+34h] [rbp-1Ch]
int j; // [rsp+34h] [rbp-1Ch]
char v20; // [rsp+44h] [rbp-Ch]
v16 = *(_DWORD *)(a1 + 8);
v15 = *(_DWORD *)(a1 + 20) + (a2 >> 5) + 1;
for ( i = *(_DWORD *)(a1 + 12); v15 > i; i *= 2 )
++v16;
v14 = Balloc(v16, (long long)a3);
v12 = *(int **)v14;
for ( j = 0; j < a2 >> 5; ++j )
{
v3 = v12++;
*v3 = 0;
}
v13 = *(int **)a1;
v11 = 4LL * *(int *)(a1 + 20) + *(_QWORD *)a1;
v20 = a2 & 0x1F;
if ( (a2 & 0x1F) != 0 )
{
v10 = 0;
do
{
v4 = v12++;
*v4 = v10 | (*v13 << v20);
v5 = v13++;
v10 = (unsigned int)*v5 >> (32 - v20);
}
while ( (unsigned long long)v13 < v11 );
*v12 = v10;
if ( v10 )
++v15;
}
else
{
do
{
v6 = v13++;
v7 = *v6;
v8 = v12++;
*v8 = v7;
}
while ( (unsigned long long)v13 < v11 );
}
*(_DWORD *)(v14 + 20) = v15 - 1;
Bfree(a1, a3);
return v14;
}
| lshift:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV EAX,dword ptr [RBP + -0xc]
SAR EAX,0x5
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x8]
ADD EAX,dword ptr [RCX + 0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x1c],EAX
LAB_001a9870:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x1c]
JLE 0x001a988b
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001a9870
LAB_001a988b:
MOV EDI,dword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001a9100
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x1c],0x0
LAB_001a98ad:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x001a98d5
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001a98ad
LAB_001a98d5:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x14]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x1f
MOV dword ptr [RBP + -0xc],EAX
CMP EAX,0x0
JZ 0x001a9974
MOV EAX,0x20
SUB EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x20],EAX
MOV dword ptr [RBP + -0x4c],0x0
LAB_001a9917:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
SHL EAX,CL
MOV ECX,EAX
OR ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x40],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
SHR EAX,CL
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x001a9917
MOV EAX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x40]
MOV dword ptr [RCX],EAX
CMP EAX,0x0
JZ 0x001a9972
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
LAB_001a9972:
JMP 0x001a99a4
LAB_001a9974:
JMP 0x001a9976
LAB_001a9976:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x40],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x001a9976
JMP 0x001a99a4
LAB_001a99a4:
MOV ECX,dword ptr [RBP + -0x28]
SUB ECX,0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x14],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001a97b0
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x50
POP RBP
RET
|
int8 * lshift(int8 *param_1,uint param_2,int8 param_3)
{
sbyte sVar1;
int iVar2;
int8 *puVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
uint local_54;
uint *local_48;
uint *local_40;
int local_30;
int local_28;
int local_24;
local_28 = *(int *)(param_1 + 1);
iVar2 = ((int)param_2 >> 5) + *(int *)((long)param_1 + 0x14);
local_30 = iVar2 + 1;
for (local_24 = *(int *)((long)param_1 + 0xc); local_24 < local_30; local_24 = local_24 << 1) {
local_28 = local_28 + 1;
}
puVar3 = (int8 *)Balloc(local_28,param_3);
local_48 = (uint *)*puVar3;
for (local_24 = 0; local_24 < (int)param_2 >> 5; local_24 = local_24 + 1) {
*local_48 = 0;
local_48 = local_48 + 1;
}
local_40 = (uint *)*param_1;
puVar4 = local_40 + *(int *)((long)param_1 + 0x14);
if ((param_2 & 0x1f) == 0) {
do {
puVar5 = local_40 + 1;
*local_48 = *local_40;
local_48 = local_48 + 1;
local_40 = puVar5;
} while (puVar5 < puVar4);
}
else {
sVar1 = (sbyte)(param_2 & 0x1f);
local_54 = 0;
do {
puVar6 = local_48 + 1;
*local_48 = *local_40 << sVar1 | local_54;
puVar5 = local_40 + 1;
local_54 = *local_40 >> (0x20U - sVar1 & 0x1f);
local_48 = puVar6;
local_40 = puVar5;
} while (puVar5 < puVar4);
*puVar6 = local_54;
if (local_54 != 0) {
local_30 = iVar2 + 2;
}
}
*(int *)((long)puVar3 + 0x14) = local_30 + -1;
Bfree(param_1,param_3);
return puVar3;
}
| |
41,756 | lshift | eloqsql/strings/dtoa.c | static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc)
{
int i, k1, n, n1;
Bigint *b1;
ULong *x, *x1, *xe, z;
n= k >> 5;
k1= b->k;
n1= n + b->wds + 1;
for (i= b->maxwds; n1 > i; i<<= 1)
k1++;
b1= Balloc(k1, alloc);
x1= b1->p.x;
for (i= 0; i < n; i++)
*x1++= 0;
x= b->p.x;
xe= x + b->wds;
if (k&= 0x1f)
{
k1= 32 - k;
z= 0;
do
{
*x1++= *x << k | z;
z= *x++ >> k1;
}
while (x < xe);
if ((*x1= z))
++n1;
}
else
do
*x1++= *x++;
while (x < xe);
b1->wds= n1 - 1;
Bfree(b, alloc);
return b1;
} | O3 | c | lshift:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movq %rdi, %r14
movl %esi, %r12d
shrl $0x5, %r12d
movl 0x8(%rdi), %edi
movl 0xc(%r14), %eax
movl 0x14(%r14), %ebx
addl %r12d, %ebx
cmpl %eax, %ebx
jl 0x79ea1
incl %edi
addl %eax, %eax
jmp 0x79e97
movq %rdx, -0x38(%rbp)
movq %rdx, %rsi
callq 0x79a44
movq (%rax), %r13
cmpl $0x20, %r15d
jb 0x79ed8
decl %r12d
leaq 0x4(,%r12,4), %rdx
movq %r13, %rdi
xorl %esi, %esi
movq %rax, -0x30(%rbp)
callq 0x261c0
movq -0x30(%rbp), %rax
leaq 0x4(%r13,%r12,4), %r13
movq (%r14), %rdx
movslq 0x14(%r14), %rcx
leaq (%rdx,%rcx,4), %rsi
andl $0x1f, %r15d
je 0x79f24
movl $0x20, %r9d
subl %r15d, %r9d
xorl %edi, %edi
movl (%rdx), %r8d
movl %r15d, %ecx
shll %cl, %r8d
orl %edi, %r8d
movl %r8d, (%r13)
addq $0x4, %r13
movl (%rdx), %edi
addq $0x4, %rdx
movl %r9d, %ecx
shrl %cl, %edi
cmpq %rsi, %rdx
jb 0x79ef4
movl %edi, (%r13)
cmpl $0x1, %edi
sbbl $-0x1, %ebx
jmp 0x79f37
movl (%rdx), %ecx
addq $0x4, %rdx
movl %ecx, (%r13)
addq $0x4, %r13
cmpq %rsi, %rdx
jb 0x79f24
movl %ebx, 0x14(%rax)
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rbx
callq 0x79e3d
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| lshift:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15d, esi
mov r14, rdi
mov r12d, esi
shr r12d, 5
mov edi, [rdi+8]
mov eax, [r14+0Ch]
mov ebx, [r14+14h]
add ebx, r12d
loc_79E97:
cmp ebx, eax
jl short loc_79EA1
inc edi
add eax, eax
jmp short loc_79E97
loc_79EA1:
mov [rbp+var_38], rdx
mov rsi, rdx
call Balloc
mov r13, [rax]
cmp r15d, 20h ; ' '
jb short loc_79ED8
dec r12d
lea rdx, ds:4[r12*4]
mov rdi, r13
xor esi, esi
mov [rbp+var_30], rax
call _memset
mov rax, [rbp+var_30]
lea r13, [r13+r12*4+4]
loc_79ED8:
mov rdx, [r14]
movsxd rcx, dword ptr [r14+14h]
lea rsi, [rdx+rcx*4]
and r15d, 1Fh
jz short loc_79F24
mov r9d, 20h ; ' '
sub r9d, r15d
xor edi, edi
loc_79EF4:
mov r8d, [rdx]
mov ecx, r15d
shl r8d, cl
or r8d, edi
mov [r13+0], r8d
add r13, 4
mov edi, [rdx]
add rdx, 4
mov ecx, r9d
shr edi, cl
cmp rdx, rsi
jb short loc_79EF4
mov [r13+0], edi
cmp edi, 1
sbb ebx, 0FFFFFFFFh
jmp short loc_79F37
loc_79F24:
mov ecx, [rdx]
add rdx, 4
mov [r13+0], ecx
add r13, 4
cmp rdx, rsi
jb short loc_79F24
loc_79F37:
mov [rax+14h], ebx
mov rdi, r14
mov rsi, [rbp+var_38]
mov rbx, rax
call Bfree
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long lshift(unsigned long long a1, unsigned int a2, unsigned long long *a3)
{
char v3; // r15
int v5; // edi
int v6; // eax
int v7; // ebx
long long v8; // rax
int *v9; // r13
long long v10; // r12
int *v11; // rdx
unsigned long long v12; // rsi
int v13; // r15d
int v14; // edi
unsigned int v15; // edi
int v16; // ecx
long long v17; // rbx
long long v20; // [rsp+10h] [rbp-30h]
v3 = a2;
v5 = *(_DWORD *)(a1 + 8);
v6 = *(_DWORD *)(a1 + 12);
v7 = (a2 >> 5) + *(_DWORD *)(a1 + 20);
while ( v7 >= v6 )
{
++v5;
v6 *= 2;
}
v8 = Balloc(v5, (long long)a3);
v9 = *(int **)v8;
if ( a2 >= 0x20 )
{
v10 = (a2 >> 5) - 1;
v20 = v8;
memset(*(_QWORD *)v8, 0LL, 4 * v10 + 4);
v8 = v20;
v9 += v10 + 1;
}
v11 = *(int **)a1;
v12 = *(_QWORD *)a1 + 4LL * *(int *)(a1 + 20);
v13 = v3 & 0x1F;
if ( v13 )
{
v14 = 0;
do
{
*v9++ = v14 | (*v11 << v13);
v15 = *v11++;
v14 = v15 >> (32 - v13);
}
while ( (unsigned long long)v11 < v12 );
*v9 = v14;
v7 -= (v14 == 0) - 1;
}
else
{
do
{
v16 = *v11++;
*v9++ = v16;
}
while ( (unsigned long long)v11 < v12 );
}
*(_DWORD *)(v8 + 20) = v7;
v17 = v8;
Bfree(a1, a3);
return v17;
}
| lshift:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15D,ESI
MOV R14,RDI
MOV R12D,ESI
SHR R12D,0x5
MOV EDI,dword ptr [RDI + 0x8]
MOV EAX,dword ptr [R14 + 0xc]
MOV EBX,dword ptr [R14 + 0x14]
ADD EBX,R12D
LAB_00179e97:
CMP EBX,EAX
JL 0x00179ea1
INC EDI
ADD EAX,EAX
JMP 0x00179e97
LAB_00179ea1:
MOV qword ptr [RBP + -0x38],RDX
MOV RSI,RDX
CALL 0x00179a44
MOV R13,qword ptr [RAX]
CMP R15D,0x20
JC 0x00179ed8
DEC R12D
LEA RDX,[0x4 + R12*0x4]
MOV RDI,R13
XOR ESI,ESI
MOV qword ptr [RBP + -0x30],RAX
CALL 0x001261c0
MOV RAX,qword ptr [RBP + -0x30]
LEA R13,[R13 + R12*0x4 + 0x4]
LAB_00179ed8:
MOV RDX,qword ptr [R14]
MOVSXD RCX,dword ptr [R14 + 0x14]
LEA RSI,[RDX + RCX*0x4]
AND R15D,0x1f
JZ 0x00179f24
MOV R9D,0x20
SUB R9D,R15D
XOR EDI,EDI
LAB_00179ef4:
MOV R8D,dword ptr [RDX]
MOV ECX,R15D
SHL R8D,CL
OR R8D,EDI
MOV dword ptr [R13],R8D
ADD R13,0x4
MOV EDI,dword ptr [RDX]
ADD RDX,0x4
MOV ECX,R9D
SHR EDI,CL
CMP RDX,RSI
JC 0x00179ef4
MOV dword ptr [R13],EDI
CMP EDI,0x1
SBB EBX,-0x1
JMP 0x00179f37
LAB_00179f24:
MOV ECX,dword ptr [RDX]
ADD RDX,0x4
MOV dword ptr [R13],ECX
ADD R13,0x4
CMP RDX,RSI
JC 0x00179f24
LAB_00179f37:
MOV dword ptr [RAX + 0x14],EBX
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV RBX,RAX
CALL 0x00179e3d
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 * lshift(int8 *param_1,uint param_2,int8 param_3)
{
uint *puVar1;
sbyte sVar2;
int iVar3;
int8 *puVar4;
uint *puVar5;
int iVar6;
uint uVar7;
ulong uVar8;
uint *__s;
iVar6 = *(int *)((long)param_1 + 0x14) + (param_2 >> 5);
for (iVar3 = *(int *)((long)param_1 + 0xc); iVar3 <= iVar6; iVar3 = iVar3 * 2) {
}
puVar4 = (int8 *)Balloc();
__s = (uint *)*puVar4;
if (0x1f < param_2) {
uVar8 = (ulong)((param_2 >> 5) - 1);
memset(__s,0,uVar8 * 4 + 4);
__s = __s + uVar8 + 1;
}
puVar5 = (uint *)*param_1;
puVar1 = puVar5 + *(int *)((long)param_1 + 0x14);
if ((param_2 & 0x1f) == 0) {
do {
uVar7 = *puVar5;
puVar5 = puVar5 + 1;
*__s = uVar7;
__s = __s + 1;
} while (puVar5 < puVar1);
}
else {
sVar2 = (sbyte)(param_2 & 0x1f);
uVar7 = 0;
do {
*__s = *puVar5 << sVar2 | uVar7;
__s = __s + 1;
uVar7 = *puVar5;
puVar5 = puVar5 + 1;
uVar7 = uVar7 >> (0x20U - sVar2 & 0x1f);
} while (puVar5 < puVar1);
*__s = uVar7;
iVar6 = (iVar6 + 1) - (uint)(uVar7 == 0);
}
*(int *)((long)puVar4 + 0x14) = iVar6;
Bfree(param_1,param_3);
return puVar4;
}
| |
41,757 | my_coll_lexem_num_to_str | eloqsql/strings/ctype-uca.c | static const char *
my_coll_lexem_num_to_str(my_coll_lexem_num term)
{
switch (term)
{
case MY_COLL_LEXEM_EOF: return "EOF";
case MY_COLL_LEXEM_SHIFT: return "Shift";
case MY_COLL_LEXEM_RESET: return "&";
case MY_COLL_LEXEM_CHAR: return "Character";
case MY_COLL_LEXEM_OPTION: return "Bracket option";
case MY_COLL_LEXEM_EXTEND: return "/";
case MY_COLL_LEXEM_CONTEXT:return "|";
case MY_COLL_LEXEM_ERROR: return "ERROR";
}
return NULL;
} | O0 | c | my_coll_lexem_num_to_str:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x9, %rax
ja 0xe5600
movq -0x18(%rbp), %rax
leaq 0xfc9f5(%rip), %rcx # 0x1e1f84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x34894(%rip), %rax # 0x119e33
movq %rax, -0x8(%rbp)
jmp 0xe5608
leaq 0x3488b(%rip), %rax # 0x119e37
movq %rax, -0x8(%rbp)
jmp 0xe5608
leaq 0x34a05(%rip), %rax # 0x119fbe
movq %rax, -0x8(%rbp)
jmp 0xe5608
leaq 0x34877(%rip), %rax # 0x119e3d
movq %rax, -0x8(%rbp)
jmp 0xe5608
leaq 0x34874(%rip), %rax # 0x119e47
movq %rax, -0x8(%rbp)
jmp 0xe5608
leaq 0x2c40d(%rip), %rax # 0x1119ed
movq %rax, -0x8(%rbp)
jmp 0xe5608
leaq 0x34869(%rip), %rax # 0x119e56
movq %rax, -0x8(%rbp)
jmp 0xe5608
leaq 0x2d1b8(%rip), %rax # 0x1127b2
movq %rax, -0x8(%rbp)
jmp 0xe5608
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
| my_coll_lexem_num_to_str:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
mov [rbp+var_18], rax
sub rax, 9; switch 10 cases
ja short def_E5596; jumptable 00000000000E5596 default case, cases 2,3
mov rax, [rbp+var_18]
lea rcx, jpt_E5596
movsxd rax, ds:(jpt_E5596 - 1E1F84h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_E5598:
lea rax, aEof; jumptable 00000000000E5596 case 0
mov [rbp+var_8], rax
jmp short loc_E5608
loc_E55A5:
lea rax, aShift; jumptable 00000000000E5596 case 1
mov [rbp+var_8], rax
jmp short loc_E5608
loc_E55B2:
lea rax, asc_119FBD+1; jumptable 00000000000E5596 case 4
mov [rbp+var_8], rax
jmp short loc_E5608
loc_E55BF:
lea rax, aCharacter; jumptable 00000000000E5596 case 5
mov [rbp+var_8], rax
jmp short loc_E5608
loc_E55CC:
lea rax, aBracketOption; jumptable 00000000000E5596 case 7
mov [rbp+var_8], rax
jmp short loc_E5608
loc_E55D9:
lea rax, asc_1119EC+1; jumptable 00000000000E5596 case 8
mov [rbp+var_8], rax
jmp short loc_E5608
loc_E55E6:
lea rax, asc_119E56; jumptable 00000000000E5596 case 9
mov [rbp+var_8], rax
jmp short loc_E5608
loc_E55F3:
lea rax, aError; jumptable 00000000000E5596 case 6
mov [rbp+var_8], rax
jmp short loc_E5608
def_E5596:
mov [rbp+var_8], 0; jumptable 00000000000E5596 default case, cases 2,3
loc_E5608:
mov rax, [rbp+var_8]
pop rbp
retn
| char * my_coll_lexem_num_to_str(int a1)
{
char *v2; // [rsp+10h] [rbp-8h]
switch ( a1 )
{
case 0:
v2 = "EOF";
break;
case 1:
v2 = "Shift";
break;
case 4:
v2 = "&";
break;
case 5:
v2 = "Character";
break;
case 6:
v2 = "ERROR";
break;
case 7:
v2 = "Bracket option";
break;
case 8:
v2 = "/";
break;
case 9:
v2 = "|";
break;
default:
v2 = 0LL;
break;
}
return v2;
}
| my_coll_lexem_num_to_str:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
MOV qword ptr [RBP + -0x18],RAX
SUB RAX,0x9
JA 0x001e5600
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x2e1f84]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RAX,[0x219e33]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e5608
caseD_1:
LEA RAX,[0x219e37]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e5608
caseD_4:
LEA RAX,[0x219fbe]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e5608
caseD_5:
LEA RAX,[0x219e3d]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e5608
caseD_7:
LEA RAX,[0x219e47]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e5608
caseD_8:
LEA RAX,[0x2119ed]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e5608
caseD_9:
LEA RAX,[0x219e56]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e5608
caseD_6:
LEA RAX,[0x2127b2]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e5608
caseD_2:
MOV qword ptr [RBP + -0x8],0x0
LAB_001e5608:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * my_coll_lexem_num_to_str(int4 param_1)
{
char *local_10;
switch(param_1) {
case 0:
local_10 = "EOF";
break;
case 1:
local_10 = "Shift";
break;
default:
local_10 = (char *)0x0;
break;
case 4:
local_10 = "&";
break;
case 5:
local_10 = "Character";
break;
case 6:
local_10 = "ERROR";
break;
case 7:
local_10 = "Bracket option";
break;
case 8:
local_10 = "/";
break;
case 9:
local_10 = "|";
}
return local_10;
}
| |
41,758 | utf8cmp | xtate/src/util-data/../util-data/utf8.h | utf8_constexpr14_impl int utf8cmp(const utf8_int8_t *src1,
const utf8_int8_t *src2) {
while (('\0' != *src1) || ('\0' != *src2)) {
if (*src1 < *src2) {
return -1;
} else if (*src1 > *src2) {
return 1;
}
src1++;
src2++;
}
/* both utf8 strings matched */
return 0;
} | O3 | c | utf8cmp:
movb (%rdi), %cl
movb (%rsi), %dl
xorl %eax, %eax
movl %ecx, %r8d
orb %dl, %r8b
je 0x4e0b6
movl $0x1, %r8d
cmpb %dl, %cl
jl 0x4e0b7
jg 0x4e0bd
movb (%rdi,%r8), %cl
movb (%rsi,%r8), %dl
incq %r8
movl %edx, %r9d
orb %cl, %r9b
jne 0x4e09d
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
retq
movl $0x1, %eax
retq
| utf8cmp:
mov cl, [rdi]
mov dl, [rsi]
xor eax, eax
mov r8d, ecx
or r8b, dl
jz short locret_4E0B6
mov r8d, 1
loc_4E09D:
cmp cl, dl
jl short loc_4E0B7
jg short loc_4E0BD
mov cl, [rdi+r8]
mov dl, [rsi+r8]
inc r8
mov r9d, edx
or r9b, cl
jnz short loc_4E09D
locret_4E0B6:
retn
loc_4E0B7:
mov eax, 0FFFFFFFFh
retn
loc_4E0BD:
mov eax, 1
retn
| long long utf8cmp(signed __int8 *a1, signed __int8 *a2)
{
signed __int8 v2; // cl
signed __int8 v3; // dl
long long result; // rax
long long v5; // r8
v2 = *a1;
v3 = *a2;
result = 0LL;
if ( (unsigned __int8)*a2 | (unsigned __int8)*a1 )
{
v5 = 1LL;
while ( 1 )
{
if ( v2 < v3 )
return 0xFFFFFFFFLL;
if ( v2 > v3 )
break;
v2 = a1[v5];
v3 = a2[v5++];
if ( !((unsigned __int8)v2 | (unsigned __int8)v3) )
return result;
}
return 1LL;
}
return result;
}
| utf8cmp:
MOV CL,byte ptr [RDI]
MOV DL,byte ptr [RSI]
XOR EAX,EAX
MOV R8D,ECX
OR R8B,DL
JZ 0x0014e0b6
MOV R8D,0x1
LAB_0014e09d:
CMP CL,DL
JL 0x0014e0b7
JG 0x0014e0bd
MOV CL,byte ptr [RDI + R8*0x1]
MOV DL,byte ptr [RSI + R8*0x1]
INC R8
MOV R9D,EDX
OR R9B,CL
JNZ 0x0014e09d
LAB_0014e0b6:
RET
LAB_0014e0b7:
MOV EAX,0xffffffff
RET
LAB_0014e0bd:
MOV EAX,0x1
RET
|
int8 utf8cmp(char *param_1,char *param_2)
{
char cVar1;
char cVar2;
long lVar3;
cVar1 = *param_1;
cVar2 = *param_2;
if (cVar1 != '\0' || cVar2 != '\0') {
lVar3 = 1;
do {
if (cVar1 < cVar2) {
return 0xffffffff;
}
if (cVar2 < cVar1) {
return 1;
}
cVar1 = param_1[lVar3];
cVar2 = param_2[lVar3];
lVar3 = lVar3 + 1;
} while (cVar2 != '\0' || cVar1 != '\0');
}
return 0;
}
| |
41,759 | my_fstat | eloqsql/mysys/my_lib.c | int my_fstat(File Filedes, MY_STAT *stat_area,
myf MyFlags __attribute__((unused)))
{
DBUG_ENTER("my_fstat");
DBUG_PRINT("my",("fd: %d MyFlags: %lu", Filedes, MyFlags));
#ifdef _WIN32
DBUG_RETURN(my_win_fstat(Filedes, stat_area));
#elif defined HAVE_valgrind
{
int s= fstat(Filedes, stat_area);
if (!s)
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(s);
}
#else
DBUG_RETURN(fstat(Filedes, (struct stat *) stat_area));
#endif
} | O3 | c | my_fstat:
pushq %rbp
movq %rsp, %rbp
popq %rbp
jmp 0x2a5b0
nopl (%rax)
| my_fstat:
push rbp
mov rbp, rsp
pop rbp
jmp _fstat64
| long long my_fstat()
{
return fstat64();
}
| my_fstat:
PUSH RBP
MOV RBP,RSP
POP RBP
JMP 0x0012a5b0
|
void my_fstat(int param_1,stat64 *param_2)
{
fstat64(param_1,param_2);
return;
}
| |
41,760 | js_proxy_getPrototypeOf | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_getPrototypeOf(JSContext *ctx, JSValue obj)
{
JSProxyData *s;
JSValue method, ret, proto1;
int res;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_getPrototypeOf);
if (!s)
return JS_EXCEPTION;
if (JS_IsUndefined(method))
return JS_GetPrototype(ctx, s->target);
ret = JS_CallFree(ctx, method, s->handler, 1, &s->target);
if (JS_IsException(ret))
return ret;
if (JS_VALUE_GET_TAG(ret) != JS_TAG_NULL &&
JS_VALUE_GET_TAG(ret) != JS_TAG_OBJECT) {
goto fail;
}
res = JS_IsExtensible(ctx, s->target);
if (res < 0) {
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
if (!res) {
/* check invariant */
proto1 = JS_GetPrototype(ctx, s->target);
if (JS_IsException(proto1)) {
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
if (JS_VALUE_GET_OBJ(proto1) != JS_VALUE_GET_OBJ(ret)) {
JS_FreeValue(ctx, proto1);
fail:
JS_FreeValue(ctx, ret);
return JS_ThrowTypeError(ctx, "proxy: inconsistent prototype");
}
JS_FreeValue(ctx, proto1);
}
return ret;
} | O1 | c | js_proxy_getPrototypeOf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r15
leaq 0x18(%rsp), %rsi
movl $0x60, %r8d
callq 0x3c7cc
movl $0x6, %ebx
testq %rax, %rax
je 0x21e13
movq %rax, %r13
movq 0x20(%rsp), %rdx
cmpl $0x3, %edx
jne 0x21d6e
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r15, %rdi
callq 0x21c8b
movq %rax, %r14
movq %rdx, %rbx
jmp 0x21e16
movq 0x18(%rsp), %rsi
movq 0x10(%r13), %rcx
movq 0x18(%r13), %r8
movq %r13, (%rsp)
movq %r15, %rdi
movl $0x1, %r9d
callq 0x22089
movq %rax, %r14
movq %rdx, %r12
movq %rax, 0x10(%rsp)
cmpl $0x6, %r12d
jne 0x21da3
movq %r12, %rbx
jmp 0x21e16
cmpl $0x2, %r12d
je 0x21dd4
cmpl $-0x1, %r12d
je 0x21dd4
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1ccb2
leaq 0x7baeb(%rip), %rsi # 0x9d8b0
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x21953
jmp 0x21e16
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r15, %rdi
callq 0xf672
testl %eax, %eax
js 0x21e04
jne 0x21d9e
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r15, %rdi
callq 0x21c8b
movq %rax, 0x8(%rsp)
cmpl $0x6, %edx
jne 0x21e2b
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1ccb2
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rbp
movq 0x18(%r15), %rdi
movq %r13, %rsi
callq 0x1ccb2
cmpq %rbp, %r13
jne 0x21daf
jmp 0x21d9e
| js_proxy_getPrototypeOf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rcx, rdx
mov rdx, rsi
mov r15, rdi
lea rsi, [rsp+58h+var_40]
mov r8d, 60h ; '`'
call get_proxy_method
mov ebx, 6
test rax, rax
jz loc_21E13
mov r13, rax
mov rdx, [rsp+58h+var_38]
cmp edx, 3
jnz short loc_21D6E
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, r15
call JS_GetPrototype
mov r14, rax
mov rbx, rdx
jmp loc_21E16
loc_21D6E:
mov rsi, [rsp+58h+var_40]
mov rcx, [r13+10h]
mov r8, [r13+18h]
mov [rsp+58h+var_58], r13
mov rdi, r15
mov r9d, 1
call JS_CallFree
mov r14, rax
mov r12, rdx
mov [rsp+58h+var_48], rax
cmp r12d, 6
jnz short loc_21DA3
loc_21D9E:
mov rbx, r12
jmp short loc_21E16
loc_21DA3:
cmp r12d, 2
jz short loc_21DD4
cmp r12d, 0FFFFFFFFh
jz short loc_21DD4
loc_21DAF:
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, r12
call JS_FreeValueRT
lea rsi, aProxyInconsist; "proxy: inconsistent prototype"
xor r14d, r14d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
jmp short loc_21E16
loc_21DD4:
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, r15
call JS_IsExtensible
test eax, eax
js short loc_21E04
jnz short loc_21D9E
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, r15
call JS_GetPrototype
mov [rsp+58h+var_50], rax
cmp edx, 6
jnz short loc_21E2B
loc_21E04:
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, r12
call JS_FreeValueRT
loc_21E13:
xor r14d, r14d
loc_21E16:
mov rax, r14
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_21E2B:
mov r13, [rsp+58h+var_50]
mov rbp, [rsp+58h+var_48]
mov rdi, [r15+18h]
mov rsi, r13
call JS_FreeValueRT
cmp r13, rbp
jnz loc_21DAF
jmp loc_21D9E
| unsigned long long js_proxy_getPrototypeOf(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long *proxy_method; // rax
long long *v12; // r13
_DWORD *v13; // r14
long long v14; // rdx
long long v15; // r12
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
int IsExtensible; // eax
long long v23; // rdx
char v25; // [rsp+0h] [rbp-58h]
_DWORD *Prototype; // [rsp+8h] [rbp-50h]
long long v27; // [rsp+18h] [rbp-40h] BYREF
long long v28; // [rsp+20h] [rbp-38h]
proxy_method = (long long *)get_proxy_method(a1, &v27, a2, a3, 96LL);
if ( !proxy_method )
return 0LL;
v12 = proxy_method;
if ( (_DWORD)v28 != 3 )
{
v13 = (_DWORD *)JS_CallFree(a1, v27, v28, proxy_method[2], proxy_method[3], 1, (long long)proxy_method);
v15 = v14;
if ( (_DWORD)v14 == 6 )
return (unsigned long long)v13;
if ( (_DWORD)v14 != 2 && (_DWORD)v14 != -1 )
goto LABEL_8;
IsExtensible = JS_IsExtensible(a1, *v12, v12[1]);
if ( IsExtensible >= 0 )
{
if ( IsExtensible )
return (unsigned long long)v13;
Prototype = (_DWORD *)JS_GetPrototype(a1, *v12, v12[1]);
if ( (_DWORD)v23 != 6 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), Prototype, v23);
if ( Prototype == v13 )
return (unsigned long long)v13;
LABEL_8:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v13, v15);
v13 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent prototype",
v16,
v17,
v18,
v19,
a4,
a5,
a6,
a7,
v20,
v21,
a10,
a11,
v25);
return (unsigned long long)v13;
}
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v13, v15);
return 0LL;
}
return JS_GetPrototype(a1, *proxy_method, proxy_method[1]);
}
| js_proxy_getPrototypeOf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RCX,RDX
MOV RDX,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x18]
MOV R8D,0x60
CALL 0x0013c7cc
MOV EBX,0x6
TEST RAX,RAX
JZ 0x00121e13
MOV R13,RAX
MOV RDX,qword ptr [RSP + 0x20]
CMP EDX,0x3
JNZ 0x00121d6e
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,R15
CALL 0x00121c8b
MOV R14,RAX
MOV RBX,RDX
JMP 0x00121e16
LAB_00121d6e:
MOV RSI,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [R13 + 0x10]
MOV R8,qword ptr [R13 + 0x18]
MOV qword ptr [RSP],R13
MOV RDI,R15
MOV R9D,0x1
CALL 0x00122089
MOV R14,RAX
MOV R12,RDX
MOV qword ptr [RSP + 0x10],RAX
CMP R12D,0x6
JNZ 0x00121da3
LAB_00121d9e:
MOV RBX,R12
JMP 0x00121e16
LAB_00121da3:
CMP R12D,0x2
JZ 0x00121dd4
CMP R12D,-0x1
JZ 0x00121dd4
LAB_00121daf:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,R12
CALL 0x0011ccb2
LEA RSI,[0x19d8b0]
XOR R14D,R14D
MOV RDI,R15
XOR EAX,EAX
CALL 0x00121953
JMP 0x00121e16
LAB_00121dd4:
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,R15
CALL 0x0010f672
TEST EAX,EAX
JS 0x00121e04
JNZ 0x00121d9e
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,R15
CALL 0x00121c8b
MOV qword ptr [RSP + 0x8],RAX
CMP EDX,0x6
JNZ 0x00121e2b
LAB_00121e04:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,R12
CALL 0x0011ccb2
LAB_00121e13:
XOR R14D,R14D
LAB_00121e16:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00121e2b:
MOV R13,qword ptr [RSP + 0x8]
MOV RBP,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R13
CALL 0x0011ccb2
CMP R13,RBP
JNZ 0x00121daf
JMP 0x00121d9e
|
int1 [16] js_proxy_getPrototypeOf(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 *puVar2;
long lVar3;
int1 auVar4 [12];
int1 auVar5 [16];
int8 local_40;
int8 local_38;
puVar2 = (int8 *)get_proxy_method(param_1,&local_40,param_2,param_3,0x60);
if (puVar2 != (int8 *)0x0) {
if ((int)local_38 == 3) {
auVar5 = JS_GetPrototype(param_1,*puVar2,puVar2[1]);
return auVar5;
}
auVar5 = JS_CallFree(param_1,local_40,local_38,puVar2[2],puVar2[3],1,puVar2);
lVar3 = auVar5._0_8_;
iVar1 = auVar5._8_4_;
if (iVar1 == 6) {
return auVar5;
}
if ((iVar1 != 2) && (iVar1 != -1)) {
LAB_00121daf:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar3,auVar5._8_8_);
JS_ThrowTypeError(param_1,"proxy: inconsistent prototype");
return ZEXT816(6) << 0x40;
}
iVar1 = JS_IsExtensible(param_1,*puVar2,puVar2[1]);
if (-1 < iVar1) {
if (iVar1 != 0) {
return auVar5;
}
auVar4 = JS_GetPrototype(param_1,*puVar2,puVar2[1]);
if (auVar4._8_4_ != 6) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar4._0_8_);
if (auVar4._0_8_ == lVar3) {
return auVar5;
}
goto LAB_00121daf;
}
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar3,auVar5._8_8_);
}
return ZEXT816(6) << 0x40;
}
| |
41,761 | js_proxy_getPrototypeOf | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_getPrototypeOf(JSContext *ctx, JSValue obj)
{
JSProxyData *s;
JSValue method, ret, proto1;
int res;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_getPrototypeOf);
if (!s)
return JS_EXCEPTION;
if (JS_IsUndefined(method))
return JS_GetPrototype(ctx, s->target);
ret = JS_CallFree(ctx, method, s->handler, 1, &s->target);
if (JS_IsException(ret))
return ret;
if (JS_VALUE_GET_TAG(ret) != JS_TAG_NULL &&
JS_VALUE_GET_TAG(ret) != JS_TAG_OBJECT) {
goto fail;
}
res = JS_IsExtensible(ctx, s->target);
if (res < 0) {
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
if (!res) {
/* check invariant */
proto1 = JS_GetPrototype(ctx, s->target);
if (JS_IsException(proto1)) {
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
if (JS_VALUE_GET_OBJ(proto1) != JS_VALUE_GET_OBJ(ret)) {
JS_FreeValue(ctx, proto1);
fail:
JS_FreeValue(ctx, ret);
return JS_ThrowTypeError(ctx, "proxy: inconsistent prototype");
}
JS_FreeValue(ctx, proto1);
}
return ret;
} | O3 | c | js_proxy_getPrototypeOf:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r15
leaq 0x10(%rsp), %rsi
movl $0x60, %r8d
callq 0x3dd9a
movl $0x6, %ebx
testq %rax, %rax
je 0x225d8
movq %rax, %r13
movq 0x18(%rsp), %rdx
cmpl $0x3, %edx
jne 0x2253d
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r15, %rdi
callq 0x2246a
movq %rax, %r14
movq %rdx, %rbx
jmp 0x225db
movq 0x10(%rsp), %rsi
movq 0x10(%r13), %rcx
movq 0x18(%r13), %r8
movq %r13, (%rsp)
movq %r15, %rdi
movl $0x1, %r9d
callq 0x228ab
movq %rax, %r14
movq %rdx, %r12
cmpl $0x6, %r12d
je 0x2259b
cmpl $0x2, %r12d
je 0x22578
cmpl $-0x1, %r12d
jne 0x22618
movq (%r13), %rsi
movq 0x8(%r13), %rdx
cmpl $-0x1, %edx
jne 0x225a8
cmpw $0x30, 0x6(%rsi)
je 0x22651
movzbl 0x5(%rsi), %eax
andl $0x1, %eax
testl %eax, %eax
je 0x225a0
movq %r12, %rbx
jmp 0x225db
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r15, %rdi
callq 0x2246a
cmpl $0x6, %edx
jne 0x225ef
cmpl $-0x9, %r12d
jb 0x225d8
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x225d8
movq %r14, %rsi
movq %r12, %rdx
callq 0x20d90
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r13
cmpl $-0x9, %edx
jb 0x22613
movq 0x18(%r15), %rdi
movl (%r13), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r13)
cmpl $0x1, %eax
jg 0x22613
movq %r13, %rsi
callq 0x20d90
cmpq %r14, %r13
je 0x2259b
cmpl $-0x9, %r12d
jb 0x2263b
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x2263b
movq %r14, %rsi
movq %r12, %rdx
callq 0x20d90
leaq 0x7e23e(%rip), %rsi # 0xa0880
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
jmp 0x225db
movq %r15, %rdi
callq 0xf6c1
testl %eax, %eax
jns 0x22597
jmp 0x225b5
| js_proxy_getPrototypeOf:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov rcx, rdx
mov rdx, rsi
mov r15, rdi
lea rsi, [rsp+48h+var_38]
mov r8d, 60h ; '`'
call get_proxy_method
mov ebx, 6
test rax, rax
jz loc_225D8
mov r13, rax
mov rdx, [rsp+48h+var_30]
cmp edx, 3
jnz short loc_2253D
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, r15
call JS_GetPrototype
mov r14, rax
mov rbx, rdx
jmp loc_225DB
loc_2253D:
mov rsi, [rsp+48h+var_38]
mov rcx, [r13+10h]
mov r8, [r13+18h]
mov [rsp+48h+var_48], r13
mov rdi, r15
mov r9d, 1
call JS_CallFree
mov r14, rax
mov r12, rdx
cmp r12d, 6
jz short loc_2259B
cmp r12d, 2
jz short loc_22578
cmp r12d, 0FFFFFFFFh
jnz loc_22618
loc_22578:
mov rsi, [r13+0]
mov rdx, [r13+8]
cmp edx, 0FFFFFFFFh
jnz short loc_225A8
cmp word ptr [rsi+6], 30h ; '0'
jz loc_22651
movzx eax, byte ptr [rsi+5]
and eax, 1
loc_22597:
test eax, eax
jz short loc_225A0
loc_2259B:
mov rbx, r12
jmp short loc_225DB
loc_225A0:
mov rsi, [r13+0]
mov rdx, [r13+8]
loc_225A8:
mov rdi, r15
call JS_GetPrototype
cmp edx, 6
jnz short loc_225EF
loc_225B5:
cmp r12d, 0FFFFFFF7h
jb short loc_225D8
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_225D8
mov rsi, r14
mov rdx, r12
call js_free_value_rt
loc_225D8:
xor r14d, r14d
loc_225DB:
mov rax, r14
mov rdx, rbx
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_225EF:
mov r13, rax
cmp edx, 0FFFFFFF7h
jb short loc_22613
mov rdi, [r15+18h]
mov eax, [r13+0]
lea ecx, [rax-1]
mov [r13+0], ecx
cmp eax, 1
jg short loc_22613
mov rsi, r13
call js_free_value_rt
loc_22613:
cmp r13, r14
jz short loc_2259B
loc_22618:
cmp r12d, 0FFFFFFF7h
jb short loc_2263B
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_2263B
mov rsi, r14
mov rdx, r12
call js_free_value_rt
loc_2263B:
lea rsi, aProxyInconsist_1; "proxy: inconsistent prototype"
xor r14d, r14d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
jmp short loc_225DB
loc_22651:
mov rdi, r15
call js_proxy_isExtensible
test eax, eax
jns loc_22597
jmp loc_225B5
| unsigned long long js_proxy_getPrototypeOf(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long *proxy_method; // rax
long long *v13; // r13
_QWORD *v14; // r14
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // r12
long long v22; // rsi
long long v23; // rdx
int isExtensible; // eax
_DWORD *Prototype; // rax
long long v26; // rdi
int v27; // eax
long long v28; // rcx
_QWORD *v30; // r13
long long v31; // rdi
int v32; // eax
long long v33; // rdi
int v34; // eax
char v35; // [rsp+0h] [rbp-48h]
long long v36; // [rsp+10h] [rbp-38h] BYREF
long long v37; // [rsp+18h] [rbp-30h]
proxy_method = (long long *)get_proxy_method(a1, &v36, a2, a3, 96LL);
if ( !proxy_method )
return 0LL;
v13 = proxy_method;
if ( (_DWORD)v37 == 3 )
return JS_GetPrototype(a1, *proxy_method, proxy_method[1]);
v14 = (_QWORD *)JS_CallFree(a1, v36, v37, proxy_method[2], proxy_method[3], 1, (long long)proxy_method);
v21 = v15;
if ( (_DWORD)v15 == 6 )
return (unsigned long long)v14;
if ( (_DWORD)v15 != 2 && (_DWORD)v15 != -1 )
goto LABEL_31;
v22 = *v13;
v23 = v13[1];
if ( (_DWORD)v23 == -1 )
{
if ( *(_WORD *)(v22 + 6) == 48 )
{
isExtensible = js_proxy_isExtensible(a1, v22, v23);
if ( isExtensible < 0 )
goto LABEL_14;
}
else
{
isExtensible = *(_BYTE *)(v22 + 5) & 1;
}
if ( isExtensible )
return (unsigned long long)v14;
v22 = *v13;
v23 = v13[1];
}
Prototype = (_DWORD *)JS_GetPrototype(a1, v22, v23);
if ( (_DWORD)v15 == 6 )
{
LABEL_14:
if ( (unsigned int)v21 >= 0xFFFFFFF7 )
{
v26 = *(_QWORD *)(a1 + 24);
v27 = *(_DWORD *)v14;
v28 = (unsigned int)(*(_DWORD *)v14 - 1);
*(_DWORD *)v14 = v28;
if ( v27 <= 1 )
js_free_value_rt(v26, v14, v21, v28, v17, v18);
}
return 0LL;
}
v30 = Prototype;
if ( (unsigned int)v15 >= 0xFFFFFFF7 )
{
v31 = *(_QWORD *)(a1 + 24);
v32 = *Prototype;
v16 = (unsigned int)(v32 - 1);
*(_DWORD *)v30 = v16;
if ( v32 <= 1 )
js_free_value_rt(v31, v30, v15, v16, v17, v18);
}
if ( v30 != v14 )
{
LABEL_31:
if ( (unsigned int)v21 >= 0xFFFFFFF7 )
{
v33 = *(_QWORD *)(a1 + 24);
v34 = *(_DWORD *)v14;
v16 = (unsigned int)(*(_DWORD *)v14 - 1);
*(_DWORD *)v14 = v16;
if ( v34 <= 1 )
js_free_value_rt(v33, v14, v21, v16, v17, v18);
}
v14 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent prototype",
v15,
v16,
v17,
v18,
a4,
a5,
a6,
a7,
v19,
v20,
a10,
a11,
v35);
}
return (unsigned long long)v14;
}
| js_proxy_getPrototypeOf:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RCX,RDX
MOV RDX,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x10]
MOV R8D,0x60
CALL 0x0013dd9a
MOV EBX,0x6
TEST RAX,RAX
JZ 0x001225d8
MOV R13,RAX
MOV RDX,qword ptr [RSP + 0x18]
CMP EDX,0x3
JNZ 0x0012253d
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,R15
CALL 0x0012246a
MOV R14,RAX
MOV RBX,RDX
JMP 0x001225db
LAB_0012253d:
MOV RSI,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [R13 + 0x10]
MOV R8,qword ptr [R13 + 0x18]
MOV qword ptr [RSP],R13
MOV RDI,R15
MOV R9D,0x1
CALL 0x001228ab
MOV R14,RAX
MOV R12,RDX
CMP R12D,0x6
JZ 0x0012259b
CMP R12D,0x2
JZ 0x00122578
CMP R12D,-0x1
JNZ 0x00122618
LAB_00122578:
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
CMP EDX,-0x1
JNZ 0x001225a8
CMP word ptr [RSI + 0x6],0x30
JZ 0x00122651
MOVZX EAX,byte ptr [RSI + 0x5]
AND EAX,0x1
LAB_00122597:
TEST EAX,EAX
JZ 0x001225a0
LAB_0012259b:
MOV RBX,R12
JMP 0x001225db
LAB_001225a0:
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LAB_001225a8:
MOV RDI,R15
CALL 0x0012246a
CMP EDX,0x6
JNZ 0x001225ef
LAB_001225b5:
CMP R12D,-0x9
JC 0x001225d8
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x001225d8
MOV RSI,R14
MOV RDX,R12
CALL 0x00120d90
LAB_001225d8:
XOR R14D,R14D
LAB_001225db:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001225ef:
MOV R13,RAX
CMP EDX,-0x9
JC 0x00122613
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R13]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R13],ECX
CMP EAX,0x1
JG 0x00122613
MOV RSI,R13
CALL 0x00120d90
LAB_00122613:
CMP R13,R14
JZ 0x0012259b
LAB_00122618:
CMP R12D,-0x9
JC 0x0012263b
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0012263b
MOV RSI,R14
MOV RDX,R12
CALL 0x00120d90
LAB_0012263b:
LEA RSI,[0x1a0880]
XOR R14D,R14D
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
JMP 0x001225db
LAB_00122651:
MOV RDI,R15
CALL 0x0010f6c1
TEST EAX,EAX
JNS 0x00122597
JMP 0x001225b5
|
int1 [16] js_proxy_getPrototypeOf(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
uint uVar3;
long *plVar4;
int *piVar5;
int *piVar6;
long lVar7;
long lVar8;
uint uVar9;
int1 auVar10 [12];
int1 auVar11 [16];
int8 local_38;
int8 local_30;
plVar4 = (long *)get_proxy_method(param_1,&local_38,param_2,param_3,0x60);
if (plVar4 == (long *)0x0) goto LAB_001225d8;
if ((int)local_30 == 3) {
auVar11 = JS_GetPrototype(param_1,*plVar4,plVar4[1]);
return auVar11;
}
auVar11 = JS_CallFree(param_1,local_38,local_30,plVar4[2],plVar4[3],1,plVar4);
piVar5 = auVar11._0_8_;
uVar9 = auVar11._8_4_;
if (uVar9 == 6) {
return auVar11;
}
if ((uVar9 != 2) && (uVar9 != 0xffffffff)) goto LAB_00122618;
lVar8 = *plVar4;
lVar7 = plVar4[1];
if ((int)lVar7 == -1) {
if (*(short *)(lVar8 + 6) != 0x30) {
uVar3 = *(byte *)(lVar8 + 5) & 1;
LAB_00122597:
if (uVar3 != 0) {
return auVar11;
}
lVar8 = *plVar4;
lVar7 = plVar4[1];
goto LAB_001225a8;
}
uVar3 = js_proxy_isExtensible(param_1);
if (-1 < (int)uVar3) goto LAB_00122597;
}
else {
LAB_001225a8:
auVar10 = JS_GetPrototype(param_1,lVar8,lVar7);
piVar6 = auVar10._0_8_;
if (auVar10._8_4_ != 6) {
if (0xfffffff6 < auVar10._8_4_) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar6;
*piVar6 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,piVar6);
}
}
if (piVar6 == piVar5) {
return auVar11;
}
LAB_00122618:
if (0xfffffff6 < uVar9) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar5;
*piVar5 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,piVar5,auVar11._8_8_);
}
}
JS_ThrowTypeError(param_1,"proxy: inconsistent prototype");
return ZEXT816(6) << 0x40;
}
}
if (0xfffffff6 < uVar9) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar5;
*piVar5 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,piVar5,auVar11._8_8_);
}
}
LAB_001225d8:
return ZEXT816(6) << 0x40;
}
| |
41,762 | my_mb_wc_cp932 | eloqsql/strings/ctype-cp932.c | static int
my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII: [00-7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
/* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */
if (hi >= 0xA1 && hi <= 0xDF)
{
*pwc= cp932_to_unicode[hi];
return 1;
}
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/* JIS-X-0208-MS [81..9F,E0..FC][40..7E,80..FC] */
if (!(pwc[0]= cp932_to_unicode[(hi << 8) + s[1]]))
return (iscp932head(hi) && iscp932tail(s[1])) ? -2 : MY_CS_ILSEQ;
return 2;
} | O3 | c | my_mb_wc_cp932:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xac7df
movzbl (%rdx), %edi
testb %dil, %dil
js 0xac7c5
movq %rdi, (%rsi)
jmp 0xac7da
leal 0x5f(%rdi), %eax
cmpb $0x3e, %al
ja 0xac7e1
leaq 0x4dedd(%rip), %rax # 0xfa6b0
movzwl (%rax,%rdi,2), %eax
movq %rax, (%rsi)
movl $0x1, %eax
popq %rbp
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xac7df
movzbl 0x1(%rdx), %eax
movl %edi, %ecx
shll $0x9, %ecx
leal (%rcx,%rax,2), %eax
leaq 0x4deae(%rip), %rcx # 0xfa6b0
movzwl (%rax,%rcx), %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testq %rcx, %rcx
jne 0xac7df
cmpb $-0x80, %dil
setne %al
cmpb $-0x60, %dil
setb %cl
andb %al, %cl
addb $0x20, %dil
cmpb $0x1d, %dil
setb %sil
orb %cl, %sil
xorl %eax, %eax
cmpb $0x1, %sil
jne 0xac7df
movb 0x1(%rdx), %cl
leal -0x40(%rcx), %edx
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
cmpb $0x3f, %dl
jb 0xac7df
movl $0x0, %eax
testb %cl, %cl
jns 0xac7df
xorl %eax, %eax
cmpb $-0x3, %cl
setae %al
leal -0x2(,%rax,2), %eax
jmp 0xac7df
| my_mb_wc_cp932:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_AC7DF
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_AC7C5
mov [rsi], rdi
jmp short loc_AC7DA
loc_AC7C5:
lea eax, [rdi+5Fh]
cmp al, 3Eh ; '>'
ja short loc_AC7E1
lea rax, cp932_to_unicode
movzx eax, word ptr [rax+rdi*2]
mov [rsi], rax
loc_AC7DA:
mov eax, 1
loc_AC7DF:
pop rbp
retn
loc_AC7E1:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_AC7DF
movzx eax, byte ptr [rdx+1]
mov ecx, edi
shl ecx, 9
lea eax, [rcx+rax*2]
lea rcx, cp932_to_unicode
movzx ecx, word ptr [rax+rcx]
mov [rsi], rcx
mov eax, 2
test rcx, rcx
jnz short loc_AC7DF
cmp dil, 80h
setnz al
cmp dil, 0A0h
setb cl
and cl, al
add dil, 20h ; ' '
cmp dil, 1Dh
setb sil
or sil, cl
xor eax, eax
cmp sil, 1
jnz short loc_AC7DF
mov cl, [rdx+1]
lea edx, [rcx-40h]
mov eax, 0FFFFFFFEh
cmp dl, 3Fh ; '?'
jb short loc_AC7DF
mov eax, 0
test cl, cl
jns short loc_AC7DF
xor eax, eax
cmp cl, 0FDh
setnb al
lea eax, ds:0FFFFFFFFFFFFFFFEh[rax*2]
jmp loc_AC7DF
| long long my_mb_wc_cp932(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
long long v6; // rcx
char v7; // cl
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( (v5 & 0x80u) == 0LL )
{
*a2 = v5;
return 1LL;
}
if ( (unsigned __int8)(v5 + 95) <= 0x3Eu )
{
*a2 = cp932_to_unicode[v5];
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = cp932_to_unicode[256 * (_DWORD)v5 + a3[1]];
*a2 = v6;
result = 2LL;
if ( !v6 )
{
result = 0LL;
if ( (_BYTE)v5 != 0x80 && (unsigned __int8)v5 < 0xA0u || (unsigned __int8)(v5 + 32) < 0x1Du )
{
v7 = a3[1];
result = 4294967294LL;
if ( (unsigned __int8)(v7 - 64) >= 0x3Fu )
{
result = 0LL;
if ( v7 < 0 )
return 2 * (unsigned int)((unsigned __int8)v7 >= 0xFDu) - 2;
}
}
}
}
}
return result;
}
| my_mb_wc_cp932:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001ac7df
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x001ac7c5
MOV qword ptr [RSI],RDI
JMP 0x001ac7da
LAB_001ac7c5:
LEA EAX,[RDI + 0x5f]
CMP AL,0x3e
JA 0x001ac7e1
LEA RAX,[0x1fa6b0]
MOVZX EAX,word ptr [RAX + RDI*0x2]
MOV qword ptr [RSI],RAX
LAB_001ac7da:
MOV EAX,0x1
LAB_001ac7df:
POP RBP
RET
LAB_001ac7e1:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001ac7df
MOVZX EAX,byte ptr [RDX + 0x1]
MOV ECX,EDI
SHL ECX,0x9
LEA EAX,[RCX + RAX*0x2]
LEA RCX,[0x1fa6b0]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST RCX,RCX
JNZ 0x001ac7df
CMP DIL,0x80
SETNZ AL
CMP DIL,0xa0
SETC CL
AND CL,AL
ADD DIL,0x20
CMP DIL,0x1d
SETC SIL
OR SIL,CL
XOR EAX,EAX
CMP SIL,0x1
JNZ 0x001ac7df
MOV CL,byte ptr [RDX + 0x1]
LEA EDX,[RCX + -0x40]
MOV EAX,0xfffffffe
CMP DL,0x3f
JC 0x001ac7df
MOV EAX,0x0
TEST CL,CL
JNS 0x001ac7df
XOR EAX,EAX
CMP CL,0xfd
SETNC AL
LEA EAX,[-0x2 + RAX*0x2]
JMP 0x001ac7df
|
int my_mb_wc_cp932(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
iVar3 = -0x65;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((char)bVar1 < '\0') {
if (0x3e < (byte)(bVar1 + 0x5f)) {
if (param_4 < param_3 + 2) {
return -0x66;
}
uVar2 = *(ushort *)(cp932_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2));
*param_2 = (ulong)uVar2;
if ((ulong)uVar2 != 0) {
return 2;
}
if (0x1c < (byte)(bVar1 + 0x20) && (0x9f < bVar1 || bVar1 == 0x80)) {
return 0;
}
bVar1 = param_3[1];
if ((byte)(bVar1 - 0x40) < 0x3f) {
return -2;
}
if (-1 < (char)bVar1) {
return 0;
}
return (uint)(0xfc < bVar1) * 2 + -2;
}
*param_2 = (ulong)*(ushort *)(cp932_to_unicode + (ulong)bVar1 * 2);
}
else {
*param_2 = (ulong)bVar1;
}
iVar3 = 1;
}
return iVar3;
}
| |
41,763 | double minja::Value::get<double>() const | monkey531[P]llama/common/minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O2 | cpp | double minja::Value::get<double>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
callq 0x3ca56
testb %al, %al
je 0x3c9aa
addq $0x40, %r14
movq %r14, %rdi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3dd28
pushq $0x10
popq %rdi
callq 0x20380
movq %rax, %rbx
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3ca66
leaq 0x51e57(%rip), %rsi # 0x8e823
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x28515
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x20aa0
xorl %ebp, %ebp
movq 0x935fe(%rip), %rsi # 0xcfff0
movq 0x93577(%rip), %rdx # 0xcff70
movq %rbx, %rdi
callq 0x20b30
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x20d98
jmp 0x3ca16
movq %rax, %r14
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x20d98
testb %bpl, %bpl
jne 0x3ca28
jmp 0x3ca30
movq %rax, %r14
movq %rbx, %rdi
callq 0x20510
movq %r14, %rdi
callq 0x20bb0
| _ZNK5minja5Value3getIdEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz short loc_3C9AA
add r14, 40h ; '@'
mov rdi, r14
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIdTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
loc_3C9AA:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+58h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_3CA16
mov r14, rax
mov bpl, 1
loc_3CA16:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_3CA28
jmp short loc_3CA30
mov r14, rax
loc_3CA28:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_3CA30:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::get<double>(minja::Value *a1)
{
void *exception; // rbx
int v3; // r8d
int v4; // r9d
char v5[32]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v6[56]; // [rsp+20h] [rbp-38h] BYREF
if ( !(unsigned __int8)minja::Value::is_primitive(a1) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((unsigned int)v5, (_DWORD)a1, -1, 0, v3, v4, v5[0]);
std::operator+<char>((long long)v6, (long long)"get<T> not defined for this value type: ", (long long)v5);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIdTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE((char *)a1 + 64);
}
| get<double>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CALL 0x0013ca56
TEST AL,AL
JZ 0x0013c9aa
ADD R14,0x40
MOV RDI,R14
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x0013dd28
LAB_0013c9aa:
PUSH 0x10
POP RDI
CALL 0x00120380
MOV RBX,RAX
LAB_0013c9b5:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0013ca66
LAB_0013c9c5:
LEA RSI,[0x18e823]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00128515
MOV BPL,0x1
LAB_0013c9dc:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00120aa0
XOR EBP,EBP
MOV RSI,qword ptr [0x001cfff0]
MOV RDX,qword ptr [0x001cff70]
MOV RDI,RBX
CALL 0x00120b30
|
/* double minja::Value::get<double>() const */
double __thiscall minja::Value::get<double>(Value *this)
{
runtime_error *this_00;
char cVar1;
double dVar2;
int1 auStack_58 [32];
string local_38 [32];
cVar1 = is_primitive(this);
if (cVar1 != '\0') {
dVar2 = (double)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIdTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(this + 0x40);
return dVar2;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0013c9b5 to 0013c9c4 has its CatchHandler @ 0013ca25 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 0013c9c5 to 0013c9d8 has its CatchHandler @ 0013ca10 */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 0013c9dc to 0013ca00 has its CatchHandler @ 0013ca01 */
std::runtime_error::runtime_error(this_00,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001cfff0,PTR__runtime_error_001cff70);
}
| |
41,764 | mp_div1_dec | bluesky950520[P]quickjs/libbf.c | limb_t mp_div1_dec(limb_t *tabr, const limb_t *taba, mp_size_t na,
limb_t b, limb_t r)
{
limb_t base = BF_DEC_BASE;
mp_size_t i;
limb_t t0, t1, q;
int shift;
#if (BF_DEC_BASE % 2) == 0
if (b == 2) {
limb_t base_div2;
/* Note: only works if base is even */
base_div2 = base >> 1;
if (r)
r = base_div2;
for(i = na - 1; i >= 0; i--) {
t0 = taba[i];
tabr[i] = (t0 >> 1) + r;
r = 0;
if (t0 & 1)
r = base_div2;
}
if (r)
r = 1;
} else
#endif
if (na >= UDIV1NORM_THRESHOLD) {
shift = clz(b);
if (shift == 0) {
/* normalized case: b >= 2^(LIMB_BITS-1) */
limb_t b_inv;
b_inv = udiv1norm_init(b);
for(i = na - 1; i >= 0; i--) {
muldq(t1, t0, r, base);
adddq(t1, t0, 0, taba[i]);
q = udiv1norm(&r, t1, t0, b, b_inv);
tabr[i] = q;
}
} else {
limb_t b_inv;
b <<= shift;
b_inv = udiv1norm_init(b);
for(i = na - 1; i >= 0; i--) {
muldq(t1, t0, r, base);
adddq(t1, t0, 0, taba[i]);
t1 = (t1 << shift) | (t0 >> (LIMB_BITS - shift));
t0 <<= shift;
q = udiv1norm(&r, t1, t0, b, b_inv);
r >>= shift;
tabr[i] = q;
}
}
} else {
for(i = na - 1; i >= 0; i--) {
muldq(t1, t0, r, base);
adddq(t1, t0, 0, taba[i]);
divdq(q, r, t1, t0, b);
tabr[i] = q;
}
}
return r;
} | O3 | c | mp_div1_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x2, %rcx
jne 0x8faac
movabsq $0x4563918244f40000, %rax # imm = 0x4563918244F40000
testq %r13, %r13
cmovneq %rax, %r13
testq %rbx, %rbx
jle 0x8fb16
incq %rbx
movq -0x10(%r14,%rbx,8), %rcx
movq %rcx, %rdx
shrq %rdx
addq %r13, %rdx
movq %rdx, -0x10(%r15,%rbx,8)
andl $0x1, %ecx
negq %rcx
andq %rax, %rcx
decq %rbx
movq %rcx, %r13
cmpq $0x1, %rbx
ja 0x8fa82
jmp 0x8fb19
movq %rcx, %r12
cmpq $0x2, %rbx
jle 0x8fac4
testq %r12, %r12
je 0x8fb28
bsrq %r12, %rbp
xorq $0x3f, %rbp
jmp 0x8fb2d
testq %rbx, %rbx
jle 0x8fc85
incq %rbx
movabsq $-0x7538dcfb76180000, %rbp # imm = 0x8AC7230489E80000
movq %r13, %rax
mulq %rbp
movq %rax, %r13
addq -0x10(%r14,%rbx,8), %r13
adcq $0x0, %rdx
movq %r13, %rdi
movq %rdx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9c620
movq %rax, -0x10(%r15,%rbx,8)
imulq %r12, %rax
subq %rax, %r13
decq %rbx
cmpq $0x1, %rbx
ja 0x8fada
jmp 0x8fc85
movq %r13, %rcx
xorl %r13d, %r13d
testq %rcx, %rcx
setne %r13b
jmp 0x8fc85
movl $0x40, %ebp
testq %rbp, %rbp
je 0x8fbeb
movl %ebp, %ecx
shlq %cl, %r12
movq %r12, %rsi
notq %rsi
movq $-0x1, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9c620
movq %rax, %rsi
movl $0x40, %edi
subq %rbp, %rdi
incq %rbx
movabsq $-0x7538dcfb76180000, %r9 # imm = 0x8AC7230489E80000
movq %r13, %rax
mulq %r9
movq %rax, %r8
addq -0x10(%r14,%rbx,8), %r8
adcq $0x0, %rdx
movl %ebp, %ecx
shlq %cl, %rdx
movq %r8, %r10
movl %edi, %ecx
shrq %cl, %r10
movl %ebp, %ecx
shlq %cl, %r8
orq %rdx, %r10
movq %r8, %r11
sarq $0x3f, %r11
movq %r10, %rcx
subq %r11, %rcx
andq %r12, %r11
addq %r8, %r11
movq %rsi, %rax
mulq %rcx
movq %rdx, %rcx
addq %r11, %rax
adcq %r10, %rcx
movq %rcx, %rax
notq %rax
mulq %r12
subq %r12, %rdx
addq %r8, %rax
adcq %r10, %rdx
leaq (%rcx,%rdx), %r8
incq %r8
andq %r12, %rdx
leaq (%rdx,%rax), %r13
movl %ebp, %ecx
shrq %cl, %r13
movq %r8, -0x10(%r15,%rbx,8)
decq %rbx
cmpq $0x1, %rbx
ja 0x8fb6a
jmp 0x8fc85
movq %r12, %rsi
notq %rsi
movq $-0x1, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9c620
movq %rax, %rcx
incq %rbx
movabsq $-0x7538dcfb76180000, %r9 # imm = 0x8AC7230489E80000
movq %r13, %rax
mulq %r9
movq %rax, %rsi
movq %rdx, %rdi
movq -0x10(%r14,%rbx,8), %r11
addq %r11, %rax
movq %rdx, %r10
adcq $0x0, %r10
movq %rax, %rdx
sarq $0x3f, %rdx
movq %r10, %r8
subq %rdx, %r8
andq %r12, %rdx
leaq (%rdx,%rax), %r13
movq %rcx, %rax
mulq %r8
movq %rdx, %r8
addq %r13, %rax
adcq $0x0, %r8
addq %r11, %rsi
adcq %rdi, %r8
movq %r8, %rax
notq %rax
mulq %r12
subq %r12, %rdx
addq %rsi, %rax
adcq %r10, %rdx
leaq (%r8,%rdx), %rsi
incq %rsi
andq %r12, %rdx
leaq (%rdx,%rax), %r13
movq %rsi, -0x10(%r15,%rbx,8)
decq %rbx
cmpq $0x1, %rbx
ja 0x8fc12
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mp_div1_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp rcx, 2
jnz short loc_8FAAC
mov rax, 4563918244F40000h
test r13, r13
cmovnz r13, rax
test rbx, rbx
jle loc_8FB16
inc rbx
loc_8FA82:
mov rcx, [r14+rbx*8-10h]
mov rdx, rcx
shr rdx, 1
add rdx, r13
mov [r15+rbx*8-10h], rdx
and ecx, 1
neg rcx
and rcx, rax
dec rbx
mov r13, rcx
cmp rbx, 1
ja short loc_8FA82
jmp short loc_8FB19
loc_8FAAC:
mov r12, rcx
cmp rbx, 2
jle short loc_8FAC4
test r12, r12
jz short loc_8FB28
bsr rbp, r12
xor rbp, 3Fh
jmp short loc_8FB2D
loc_8FAC4:
test rbx, rbx
jle loc_8FC85
inc rbx
mov rbp, 8AC7230489E80000h
loc_8FADA:
mov rax, r13
mul rbp
mov r13, rax
add r13, [r14+rbx*8-10h]
adc rdx, 0
mov rdi, r13
mov rsi, rdx
mov rdx, r12
xor ecx, ecx
call __udivti3
mov [r15+rbx*8-10h], rax
imul rax, r12
sub r13, rax
dec rbx
cmp rbx, 1
ja short loc_8FADA
jmp loc_8FC85
loc_8FB16:
mov rcx, r13
loc_8FB19:
xor r13d, r13d
test rcx, rcx
setnz r13b
jmp loc_8FC85
loc_8FB28:
mov ebp, 40h ; '@'
loc_8FB2D:
test rbp, rbp
jz loc_8FBEB
mov ecx, ebp
shl r12, cl
mov rsi, r12
not rsi
mov rdi, 0FFFFFFFFFFFFFFFFh
mov rdx, r12
xor ecx, ecx
call __udivti3
mov rsi, rax
mov edi, 40h ; '@'
sub rdi, rbp
inc rbx
mov r9, 8AC7230489E80000h
loc_8FB6A:
mov rax, r13
mul r9
mov r8, rax
add r8, [r14+rbx*8-10h]
adc rdx, 0
mov ecx, ebp
shl rdx, cl
mov r10, r8
mov ecx, edi
shr r10, cl
mov ecx, ebp
shl r8, cl
or r10, rdx
mov r11, r8
sar r11, 3Fh
mov rcx, r10
sub rcx, r11
and r11, r12
add r11, r8
mov rax, rsi
mul rcx
mov rcx, rdx
add rax, r11
adc rcx, r10
mov rax, rcx
not rax
mul r12
sub rdx, r12
add rax, r8
adc rdx, r10
lea r8, [rcx+rdx]
inc r8
and rdx, r12
lea r13, [rdx+rax]
mov ecx, ebp
shr r13, cl
mov [r15+rbx*8-10h], r8
dec rbx
cmp rbx, 1
ja short loc_8FB6A
jmp loc_8FC85
loc_8FBEB:
mov rsi, r12
not rsi
mov rdi, 0FFFFFFFFFFFFFFFFh
mov rdx, r12
xor ecx, ecx
call __udivti3
mov rcx, rax
inc rbx
mov r9, 8AC7230489E80000h
loc_8FC12:
mov rax, r13
mul r9
mov rsi, rax
mov rdi, rdx
mov r11, [r14+rbx*8-10h]
add rax, r11
mov r10, rdx
adc r10, 0
mov rdx, rax
sar rdx, 3Fh
mov r8, r10
sub r8, rdx
and rdx, r12
lea r13, [rdx+rax]
mov rax, rcx
mul r8
mov r8, rdx
add rax, r13
adc r8, 0
add rsi, r11
adc r8, rdi
mov rax, r8
not rax
mul r12
sub rdx, r12
add rax, rsi
adc rdx, r10
lea rsi, [r8+rdx]
inc rsi
and rdx, r12
lea r13, [rdx+rax]
mov [r15+rbx*8-10h], rsi
dec rbx
cmp rbx, 1
ja short loc_8FC12
loc_8FC85:
mov rax, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BOOL8 mp_div1_dec(long long a1, long long a2, long long a3, unsigned long long a4, long long a5)
{
long long v5; // r13
unsigned long long v8; // rbx
unsigned long long v9; // rcx
long long v10; // rcx
unsigned long long v12; // rbp
unsigned long long v13; // rbp
long long v14; // rbx
long long v15; // rdx
long long v16; // r13
long long v17; // rax
bool v18; // cf
unsigned long long v19; // r12
long long v20; // rsi
long long v21; // rbx
long long v22; // r8
unsigned long long v23; // r10
unsigned __int128 v24; // rax
unsigned long long v25; // rcx
unsigned __int128 v26; // rax
unsigned __int128 v27; // rax
long long v28; // rcx
long long v29; // rbx
unsigned long long v30; // r11
unsigned __int128 v31; // kr20_16
long long v32; // r8
unsigned __int128 v33; // rax
unsigned __int128 v34; // rax
v5 = a5;
if ( a4 == 2 )
{
if ( a5 )
v5 = 5000000000000000000LL;
if ( a3 <= 0 )
{
v10 = v5;
}
else
{
v8 = a3 + 1;
do
{
v9 = *(_QWORD *)(a2 + 8 * v8 - 16);
*(_QWORD *)(a1 + 8 * v8 - 16) = v5 + (v9 >> 1);
v10 = -(long long)(v9 & 1) & 0x4563918244F40000LL;
--v8;
v5 = v10;
}
while ( v8 > 1 );
}
return v10 != 0;
}
else if ( a3 <= 2 )
{
if ( a3 > 0 )
{
v14 = a3 + 1;
do
{
v15 = (*(unsigned long long *)(a2 + 8 * v14 - 16) + 0x8AC7230489E80000LL * (unsigned __int128)(unsigned long long)v5) >> 64;
v16 = *(_QWORD *)(a2 + 8 * v14 - 16) - 0x7538DCFB76180000LL * v5;
v17 = _udivti3(v16, v15, a4, 0LL);
*(_QWORD *)(a1 + 8 * v14 - 16) = v17;
v5 = v16 - a4 * v17;
v18 = v14-- == 1;
}
while ( !v18 && v14 != 1 );
}
}
else
{
if ( a4 )
{
_BitScanReverse64(&v12, a4);
v13 = v12 ^ 0x3F;
}
else
{
v13 = 64LL;
}
if ( v13 )
{
v19 = a4 << v13;
v20 = _udivti3(-1LL, ~(a4 << v13), a4 << v13, 0LL);
v21 = a3 + 1;
do
{
v22 = (*(_QWORD *)(a2 + 8 * v21 - 16) - 0x7538DCFB76180000LL * v5) << v13;
v23 = ((*(unsigned long long *)(a2 + 8 * v21 - 16) + 0x8AC7230489E80000LL
* (unsigned __int128)(unsigned long long)v5) >> 64 << v13) | ((unsigned long long)(*(_QWORD *)(a2 + 8 * v21 - 16) - 0x7538DCFB76180000LL * v5) >> (64 - (unsigned __int8)v13));
v24 = (v23 - (v22 >> 63)) * (unsigned __int128)(unsigned long long)v20;
v25 = v23 + __CFADD__(v22 + (v19 & (v22 >> 63)), (_QWORD)v24) + *((_QWORD *)&v24 + 1);
v26 = v19 * (unsigned __int128)~v25;
*((_QWORD *)&v26 + 1) -= v19;
v27 = __PAIR128__(v23, v22) + v26;
v5 = ((v19 & *((_QWORD *)&v27 + 1)) + (unsigned long long)v27) >> v13;
*(_QWORD *)(a1 + 8 * v21 - 16) = v25 + *((_QWORD *)&v27 + 1) + 1;
v18 = v21-- == 1;
}
while ( !v18 && v21 != 1 );
}
else
{
v28 = _udivti3(-1LL, ~a4, a4, 0LL);
v29 = a3 + 1;
do
{
v30 = *(_QWORD *)(a2 + 8 * v29 - 16);
v31 = 0x8AC7230489E80000LL * (unsigned __int128)(unsigned long long)v5 + v30;
v32 = (__PAIR128__(
__CFADD__(
(a4 & ((long long)(0x8AC7230489E80000LL * v5 + v30) >> 63)) + v31,
(*((_QWORD *)&v31 + 1) - ((long long)(0x8AC7230489E80000LL * v5 + v30) >> 63)) * v28)
+ (((unsigned long long)(*((_QWORD *)&v31 + 1) - ((long long)(0x8AC7230489E80000LL * v5 + v30) >> 63))
* (unsigned __int128)(unsigned long long)v28) >> 64),
v30)
+ 0x8AC7230489E80000LL * (unsigned __int128)(unsigned long long)v5) >> 64;
v33 = a4 * (unsigned __int128)(unsigned long long)~v32;
*((_QWORD *)&v33 + 1) -= a4;
v34 = __PAIR128__(*((unsigned long long *)&v31 + 1), v30 - 0x7538DCFB76180000LL * v5) + v33;
v5 = (a4 & *((_QWORD *)&v34 + 1)) + v34;
*(_QWORD *)(a1 + 8 * v29 - 16) = v32 + *((_QWORD *)&v34 + 1) + 1;
v18 = v29-- == 1;
}
while ( !v18 && v29 != 1 );
}
}
return v5;
}
| mp_div1_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP RCX,0x2
JNZ 0x0018faac
MOV RAX,0x4563918244f40000
TEST R13,R13
CMOVNZ R13,RAX
TEST RBX,RBX
JLE 0x0018fb16
INC RBX
LAB_0018fa82:
MOV RCX,qword ptr [R14 + RBX*0x8 + -0x10]
MOV RDX,RCX
SHR RDX,0x1
ADD RDX,R13
MOV qword ptr [R15 + RBX*0x8 + -0x10],RDX
AND ECX,0x1
NEG RCX
AND RCX,RAX
DEC RBX
MOV R13,RCX
CMP RBX,0x1
JA 0x0018fa82
JMP 0x0018fb19
LAB_0018faac:
MOV R12,RCX
CMP RBX,0x2
JLE 0x0018fac4
TEST R12,R12
JZ 0x0018fb28
BSR RBP,R12
XOR RBP,0x3f
JMP 0x0018fb2d
LAB_0018fac4:
TEST RBX,RBX
JLE 0x0018fc85
INC RBX
MOV RBP,-0x7538dcfb76180000
LAB_0018fada:
MOV RAX,R13
MUL RBP
MOV R13,RAX
ADD R13,qword ptr [R14 + RBX*0x8 + -0x10]
ADC RDX,0x0
MOV RDI,R13
MOV RSI,RDX
MOV RDX,R12
XOR ECX,ECX
CALL 0x0019c620
MOV qword ptr [R15 + RBX*0x8 + -0x10],RAX
IMUL RAX,R12
SUB R13,RAX
DEC RBX
CMP RBX,0x1
JA 0x0018fada
JMP 0x0018fc85
LAB_0018fb16:
MOV RCX,R13
LAB_0018fb19:
XOR R13D,R13D
TEST RCX,RCX
SETNZ R13B
JMP 0x0018fc85
LAB_0018fb28:
MOV EBP,0x40
LAB_0018fb2d:
TEST RBP,RBP
JZ 0x0018fbeb
MOV ECX,EBP
SHL R12,CL
MOV RSI,R12
NOT RSI
MOV RDI,-0x1
MOV RDX,R12
XOR ECX,ECX
CALL 0x0019c620
MOV RSI,RAX
MOV EDI,0x40
SUB RDI,RBP
INC RBX
MOV R9,-0x7538dcfb76180000
LAB_0018fb6a:
MOV RAX,R13
MUL R9
MOV R8,RAX
ADD R8,qword ptr [R14 + RBX*0x8 + -0x10]
ADC RDX,0x0
MOV ECX,EBP
SHL RDX,CL
MOV R10,R8
MOV ECX,EDI
SHR R10,CL
MOV ECX,EBP
SHL R8,CL
OR R10,RDX
MOV R11,R8
SAR R11,0x3f
MOV RCX,R10
SUB RCX,R11
AND R11,R12
ADD R11,R8
MOV RAX,RSI
MUL RCX
MOV RCX,RDX
ADD RAX,R11
ADC RCX,R10
MOV RAX,RCX
NOT RAX
MUL R12
SUB RDX,R12
ADD RAX,R8
ADC RDX,R10
LEA R8,[RCX + RDX*0x1]
INC R8
AND RDX,R12
LEA R13,[RDX + RAX*0x1]
MOV ECX,EBP
SHR R13,CL
MOV qword ptr [R15 + RBX*0x8 + -0x10],R8
DEC RBX
CMP RBX,0x1
JA 0x0018fb6a
JMP 0x0018fc85
LAB_0018fbeb:
MOV RSI,R12
NOT RSI
MOV RDI,-0x1
MOV RDX,R12
XOR ECX,ECX
CALL 0x0019c620
MOV RCX,RAX
INC RBX
MOV R9,-0x7538dcfb76180000
LAB_0018fc12:
MOV RAX,R13
MUL R9
MOV RSI,RAX
MOV RDI,RDX
MOV R11,qword ptr [R14 + RBX*0x8 + -0x10]
ADD RAX,R11
MOV R10,RDX
ADC R10,0x0
MOV RDX,RAX
SAR RDX,0x3f
MOV R8,R10
SUB R8,RDX
AND RDX,R12
LEA R13,[RDX + RAX*0x1]
MOV RAX,RCX
MUL R8
MOV R8,RDX
ADD RAX,R13
ADC R8,0x0
ADD RSI,R11
ADC R8,RDI
MOV RAX,R8
NOT RAX
MUL R12
SUB RDX,R12
ADD RAX,RSI
ADC RDX,R10
LEA RSI,[R8 + RDX*0x1]
INC RSI
AND RDX,R12
LEA R13,[RDX + RAX*0x1]
MOV qword ptr [R15 + RBX*0x8 + -0x10],RSI
DEC RBX
CMP RBX,0x1
JA 0x0018fc12
LAB_0018fc85:
MOV RAX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong mp_div1_dec(long param_1,long param_2,long param_3,ulong param_4,ulong param_5)
{
ulong *puVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar11 [16];
int1 auVar12 [16];
int1 auVar13 [16];
byte bVar14;
int1 auVar15 [16];
ulong uVar16;
long lVar17;
ulong uVar18;
ulong uVar19;
ulong uVar20;
ulong uVar21;
ulong uVar22;
long lVar23;
if (param_4 == 2) {
if (param_5 != 0) {
param_5 = 5000000000000000000;
}
if (0 < param_3) {
uVar18 = param_3 + 1;
do {
uVar19 = *(ulong *)(param_2 + -0x10 + uVar18 * 8);
*(ulong *)(param_1 + -0x10 + uVar18 * 8) = (uVar19 >> 1) + param_5;
param_5 = -(ulong)((uint)uVar19 & 1) & 5000000000000000000;
uVar18 = uVar18 - 1;
} while (1 < uVar18);
}
param_5 = (ulong)(param_5 != 0);
}
else if (param_3 < 3) {
if (0 < param_3) {
uVar18 = param_3 + 1;
do {
auVar2._8_8_ = 0;
auVar2._0_8_ = param_5;
uVar19 = SUB168(auVar2 * ZEXT816(10000000000000000000),0);
puVar1 = (ulong *)(param_2 + -0x10 + uVar18 * 8);
lVar23 = uVar19 + *puVar1;
lVar17 = __udivti3(lVar23,SUB168(auVar2 * ZEXT816(10000000000000000000),8) +
(ulong)CARRY8(uVar19,*puVar1),param_4,0);
*(long *)(param_1 + -0x10 + uVar18 * 8) = lVar17;
param_5 = lVar23 - lVar17 * param_4;
uVar18 = uVar18 - 1;
} while (1 < uVar18);
}
}
else {
if (param_4 == 0) {
uVar18 = 0x40;
}
else {
uVar18 = 0x3f;
if (param_4 != 0) {
for (; param_4 >> uVar18 == 0; uVar18 = uVar18 - 1) {
}
}
uVar18 = uVar18 ^ 0x3f;
}
if (uVar18 == 0) {
uVar18 = __udivti3(0xffffffffffffffff,~param_4,param_4,0);
uVar19 = param_3 + 1;
do {
auVar6._8_8_ = 0;
auVar6._0_8_ = param_5;
uVar16 = *(ulong *)(param_2 + -0x10 + uVar19 * 8);
auVar15._8_8_ = 0;
auVar15._0_8_ = uVar16;
auVar15 = auVar6 * ZEXT816(10000000000000000000) + auVar15;
lVar17 = auVar15._0_8_;
lVar23 = auVar15._8_8_;
uVar20 = lVar17 >> 0x3f;
auVar7._8_8_ = 0;
auVar7._0_8_ = uVar18;
auVar11._8_8_ = 0;
auVar11._0_8_ = lVar23 - uVar20;
auVar13._8_8_ =
SUB168(auVar7 * auVar11,8) +
(ulong)CARRY8(SUB168(auVar7 * auVar11,0),(uVar20 & param_4) + lVar17);
auVar13._0_8_ = uVar16;
auVar13 = auVar6 * ZEXT816(10000000000000000000) + auVar13;
uVar22 = auVar13._0_8_;
uVar21 = auVar13._8_8_;
auVar8._8_8_ = 0;
auVar8._0_8_ = ~uVar21;
auVar12._8_8_ = 0;
auVar12._0_8_ = param_4;
uVar16 = SUB168(auVar8 * auVar12,0);
uVar20 = (SUB168(auVar8 * auVar12,8) - param_4) + lVar23 + (ulong)CARRY8(uVar16,uVar22);
param_5 = (uVar20 & param_4) + uVar16 + uVar22;
*(ulong *)(param_1 + -0x10 + uVar19 * 8) = uVar21 + uVar20 + 1;
uVar19 = uVar19 - 1;
} while (1 < uVar19);
}
else {
bVar14 = (byte)uVar18;
param_4 = param_4 << (bVar14 & 0x3f);
uVar18 = __udivti3(0xffffffffffffffff,~param_4,param_4,0);
uVar19 = param_3 + 1;
do {
auVar3._8_8_ = 0;
auVar3._0_8_ = param_5;
uVar16 = SUB168(auVar3 * ZEXT816(10000000000000000000),0);
puVar1 = (ulong *)(param_2 + -0x10 + uVar19 * 8);
uVar20 = uVar16 + *puVar1;
uVar21 = uVar20 << (bVar14 & 0x3f);
uVar22 = uVar20 >> (0x40 - bVar14 & 0x3f) |
SUB168(auVar3 * ZEXT816(10000000000000000000),8) + (ulong)CARRY8(uVar16,*puVar1) <<
(bVar14 & 0x3f);
auVar4._8_8_ = 0;
auVar4._0_8_ = uVar18;
auVar9._8_8_ = 0;
auVar9._0_8_ = uVar22 - ((long)uVar21 >> 0x3f);
uVar20 = SUB168(auVar4 * auVar9,8) + uVar22 +
(ulong)CARRY8(SUB168(auVar4 * auVar9,0),((long)uVar21 >> 0x3f & param_4) + uVar21);
auVar5._8_8_ = 0;
auVar5._0_8_ = ~uVar20;
auVar10._8_8_ = 0;
auVar10._0_8_ = param_4;
uVar16 = SUB168(auVar5 * auVar10,0);
uVar22 = (SUB168(auVar5 * auVar10,8) - param_4) + uVar22 + (ulong)CARRY8(uVar16,uVar21);
param_5 = (uVar22 & param_4) + uVar16 + uVar21 >> (bVar14 & 0x3f);
*(ulong *)(param_1 + -0x10 + uVar19 * 8) = uVar20 + uVar22 + 1;
uVar19 = uVar19 - 1;
} while (1 < uVar19);
}
}
return param_5;
}
| |
41,765 | mi_check_status | eloqsql/storage/myisam/mi_locking.c | my_bool mi_check_status(void *param)
{
MI_INFO *info=(MI_INFO*) param;
DBUG_ENTER("mi_check_status");
DBUG_PRINT("info",("dellink: %ld r_locks: %u w_locks: %u",
(long) info->s->state.dellink, (uint) info->s->r_locks,
(uint) info->s->w_locks));
/*
The test for w_locks == 1 is here because this thread has already done an
external lock (in other words: w_locks == 1 means no other threads has
a write lock)
*/
DBUG_RETURN((my_bool) !(info->s->state.dellink == HA_OFFSET_ERROR ||
(myisam_concurrent_insert == 2 && info->s->r_locks &&
info->s->w_locks == 1)));
} | O0 | c | mi_check_status:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xb1042
jmp 0xb1044
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movb $0x1, %al
cmpq $-0x1, 0x58(%rcx)
movb %al, -0x11(%rbp)
je 0xb1098
xorl %eax, %eax
leaq 0x20e160(%rip), %rcx # 0x2bf1c0
cmpq $0x2, (%rcx)
movb %al, -0x12(%rbp)
jne 0xb1092
movq -0x10(%rbp), %rax
movq (%rax), %rcx
xorl %eax, %eax
cmpl $0x0, 0x364(%rcx)
movb %al, -0x12(%rbp)
je 0xb1092
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x1, 0x360(%rax)
sete %al
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x13(%rbp)
movb -0x13(%rbp), %al
popq %rbp
retq
nopw (%rax,%rax)
| mi_check_status:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
jmp short $+2
loc_B1042:
jmp short $+2
loc_B1044:
mov rax, [rbp+var_10]
mov rcx, [rax]
mov al, 1
cmp qword ptr [rcx+58h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_11], al
jz short loc_B1098
xor eax, eax
lea rcx, myisam_concurrent_insert
cmp qword ptr [rcx], 2
mov [rbp+var_12], al
jnz short loc_B1092
mov rax, [rbp+var_10]
mov rcx, [rax]
xor eax, eax
cmp dword ptr [rcx+364h], 0
mov [rbp+var_12], al
jz short loc_B1092
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+360h], 1
setz al
mov [rbp+var_12], al
loc_B1092:
mov al, [rbp+var_12]
mov [rbp+var_11], al
loc_B1098:
mov al, [rbp+var_11]
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_13], al
mov al, [rbp+var_13]
pop rbp
retn
| _BOOL8 mi_check_status(long long a1)
{
bool v2; // [rsp+2h] [rbp-12h]
char v3; // [rsp+3h] [rbp-11h]
v3 = 1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 88LL) != -1LL )
{
v2 = 0;
if ( myisam_concurrent_insert == 2LL )
{
v2 = 0;
if ( *(_DWORD *)(*(_QWORD *)a1 + 868LL) )
v2 = *(_DWORD *)(*(_QWORD *)a1 + 864LL) == 1;
}
v3 = v2;
}
return (v3 & 1) == 0;
}
| mi_check_status:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001b1042
LAB_001b1042:
JMP 0x001b1044
LAB_001b1044:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV AL,0x1
CMP qword ptr [RCX + 0x58],-0x1
MOV byte ptr [RBP + -0x11],AL
JZ 0x001b1098
XOR EAX,EAX
LEA RCX,[0x3bf1c0]
CMP qword ptr [RCX],0x2
MOV byte ptr [RBP + -0x12],AL
JNZ 0x001b1092
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
XOR EAX,EAX
CMP dword ptr [RCX + 0x364],0x0
MOV byte ptr [RBP + -0x12],AL
JZ 0x001b1092
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x360],0x1
SETZ AL
MOV byte ptr [RBP + -0x12],AL
LAB_001b1092:
MOV AL,byte ptr [RBP + -0x12]
MOV byte ptr [RBP + -0x11],AL
LAB_001b1098:
MOV AL,byte ptr [RBP + -0x11]
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x13],AL
MOV AL,byte ptr [RBP + -0x13]
POP RBP
RET
|
byte mi_check_status(long *param_1)
{
int1 local_1a;
int1 local_19;
local_19 = true;
if (*(long *)(*param_1 + 0x58) != -1) {
local_1a = false;
if ((myisam_concurrent_insert == 2) && (local_1a = false, *(int *)(*param_1 + 0x364) != 0)) {
local_1a = *(int *)(*param_1 + 0x360) == 1;
}
local_19 = local_1a;
}
return (local_19 ^ 0xffU) & 1;
}
| |
41,766 | common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) | monkey531[P]llama/common/common.cpp | void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
std::unordered_map<llama_seq_id, size_t> seqs;
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] < 0) { continue; }
if (seqs.find(cs_curr[j]) == seqs.end()) {
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
const size_t sz = seqs.size();
seqs[cs_curr[j]] = sz;
}
}
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
}
printf("=== Sequence legend: ");
for (const auto & it : seqs) {
printf("%zu=%d, ", it.second, it.first);
}
printf("'+'=other sequence ids");
c_curr = view.cells;
cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) {
const auto & it = seqs.find(cs_curr[j]);
putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+');
} else {
putchar('.');
}
}
putchar(' ');
}
printf("\n=== Done dumping\n");
} | O1 | cpp | common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %r14
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0x10(%rdi), %r9d
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
leaq 0x7bcb4(%rip), %rdi # 0xf344c
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x1b070
leaq 0x40(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
cmpl $0x0, (%r14)
jle 0x778b3
movq 0x20(%r14), %r13
leaq 0x10(%rsp), %r15
movl 0x4(%r14), %r8d
testl %r8d, %r8d
jle 0x77890
xorl %ebp, %ebp
movslq (%r13,%rbp,4), %rcx
testq %rcx, %rcx
js 0x77880
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r9
movq %rcx, %rax
xorl %edx, %edx
divq %r9
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x77850
movq (%rdx), %r10
movq %rdx, %rax
cmpl 0x8(%r10), %ecx
je 0x77850
movq %r10, %r11
movq (%r10), %r10
testq %r10, %r10
je 0x7784e
movslq 0x8(%r10), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r9
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x77850
movq %r11, %rax
cmpl %edi, %ecx
jne 0x77824
jmp 0x77850
xorl %eax, %eax
testq %rax, %rax
je 0x7785b
cmpq $0x0, (%rax)
jne 0x77880
movq 0x28(%rsp), %rbx
leaq -0x3e(%rbx), %rax
cmpq $-0x3f, %rax
jb 0x77890
leaq (,%rbp,4), %rsi
addq %r13, %rsi
movq %r15, %rdi
callq 0xbb954
movq %rbx, (%rax)
incq %rbp
movslq 0x4(%r14), %r8
cmpq %r8, %rbp
jl 0x777e7
movq 0x28(%rsp), %rax
addq $-0x3e, %rax
cmpq $-0x3f, %rax
jb 0x778b3
incl %r12d
movslq %r8d, %rax
leaq (%r13,%rax,4), %r13
cmpl (%r14), %r12d
jl 0x777d8
leaq 0x7bc1d(%rip), %rdi # 0xf34d7
xorl %eax, %eax
callq 0x1b070
movq 0x20(%rsp), %r12
testq %r12, %r12
je 0x778ef
leaq 0x7bc1b(%rip), %r15 # 0xf34ed
movq 0x10(%r12), %rsi
movl 0x8(%r12), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1b070
movq (%r12), %r12
testq %r12, %r12
jne 0x778d2
leaq 0x7bc00(%rip), %rdi # 0xf34f6
xorl %eax, %eax
callq 0x1b070
cmpl $0x0, (%r14)
movl 0xc(%rsp), %ebx
jle 0x779fd
movq 0x20(%r14), %r12
leaq 0x7e03a(%rip), %r13 # 0xf5950
xorl %ebp, %ebp
movl %ebp, %eax
cltd
idivl %ebx
testl %edx, %edx
jne 0x77931
leaq 0x7bb1d(%rip), %rdi # 0xf3445
movl %ebp, %esi
xorl %eax, %eax
callq 0x1b070
cmpl $0x0, 0x4(%r14)
jle 0x779e0
xorl %r15d, %r15d
movslq (%r12,%r15,4), %rcx
testq %rcx, %rcx
js 0x779a1
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x779aa
movq (%rdx), %r9
movq %rdx, %rax
cmpl 0x8(%r9), %ecx
je 0x779aa
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x779a8
movslq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x779aa
movq %r10, %rax
cmpl %edi, %ecx
jne 0x77977
jmp 0x779aa
movl $0x2e, %edi
jmp 0x779cb
xorl %eax, %eax
testq %rax, %rax
je 0x779b4
movq (%rax), %rax
jmp 0x779b6
xorl %eax, %eax
testq %rax, %rax
je 0x779c6
movq 0x10(%rax), %rax
movsbl (%rax,%r13), %edi
jmp 0x779cb
movl $0x2b, %edi
callq 0x1bc10
incq %r15
movslq 0x4(%r14), %rax
cmpq %rax, %r15
jl 0x7793f
movl $0x20, %edi
callq 0x1bc10
incl %ebp
movslq 0x4(%r14), %rax
leaq (%r12,%rax,4), %r12
cmpl (%r14), %ebp
jl 0x77918
leaq 0x7def8(%rip), %rdi # 0xf58fc
callq 0x1bd50
leaq 0x10(%rsp), %rdi
callq 0xb95c4
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb95c4
movq %rbx, %rdi
callq 0x1bf90
| _Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_6C], esi
mov r14, rdi
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+0Ch]
mov r8d, [rdi+8]
mov r9d, [rdi+10h]
mov eax, [rdi+14h]
mov [rsp+78h+var_78], eax
lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"...
xor r12d, r12d
xor eax, eax
call _printf
lea rax, [rsp+78h+var_38]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
cmp dword ptr [r14], 0
jle loc_778B3
mov r13, [r14+20h]
lea r15, [rsp+78h+var_68]
loc_777D8:
mov r8d, [r14+4]
test r8d, r8d
jle loc_77890
xor ebp, ebp
loc_777E7:
movsxd rcx, dword ptr [r13+rbp*4+0]
test rcx, rcx
js loc_77880
mov rdi, [rsp+78h+var_68]
mov r9, [rsp+78h+var_60]
mov rax, rcx
xor edx, edx
div r9
mov rsi, rdx
mov rdx, [rdi+rdx*8]
mov eax, 0
test rdx, rdx
jz short loc_77850
mov r10, [rdx]
mov rax, rdx
cmp ecx, [r10+8]
jz short loc_77850
loc_77824:
mov r11, r10
mov r10, [r10]
test r10, r10
jz short loc_7784E
movsxd rdi, dword ptr [r10+8]
mov rax, rdi
xor edx, edx
div r9
mov eax, 0
cmp rdx, rsi
jnz short loc_77850
mov rax, r11
cmp ecx, edi
jnz short loc_77824
jmp short loc_77850
loc_7784E:
xor eax, eax
loc_77850:
test rax, rax
jz short loc_7785B
cmp qword ptr [rax], 0
jnz short loc_77880
loc_7785B:
mov rbx, [rsp+78h+var_50]
lea rax, [rbx-3Eh]
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_77890
lea rsi, ds:0[rbp*4]
add rsi, r13
mov rdi, r15
call _ZNSt8__detail9_Map_baseIiSt4pairIKimESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&)
mov [rax], rbx
loc_77880:
inc rbp
movsxd r8, dword ptr [r14+4]
cmp rbp, r8
jl loc_777E7
loc_77890:
mov rax, [rsp+78h+var_50]
add rax, 0FFFFFFFFFFFFFFC2h
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_778B3
inc r12d
movsxd rax, r8d
lea r13, [r13+rax*4+0]
cmp r12d, [r14]
jl loc_777D8
loc_778B3:
lea rdi, aSequenceLegend; "=== Sequence legend: "
xor eax, eax
call _printf
mov r12, [rsp+78h+var_58]
test r12, r12
jz short loc_778EF
lea r15, aZuD; "%zu=%d, "
loc_778D2:
mov rsi, [r12+10h]
mov edx, [r12+8]
mov rdi, r15
xor eax, eax
call _printf
mov r12, [r12]
test r12, r12
jnz short loc_778D2
loc_778EF:
lea rdi, aOtherSequenceI; "'+'=other sequence ids"
xor eax, eax
call _printf
cmp dword ptr [r14], 0
mov ebx, [rsp+78h+var_6C]
jle loc_779FD
mov r12, [r14+20h]
lea r13, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
xor ebp, ebp
loc_77918:
mov eax, ebp
cdq
idiv ebx
test edx, edx
jnz short loc_77931
lea rdi, a5d; "\n%5d: "
mov esi, ebp
xor eax, eax
call _printf
loc_77931:
cmp dword ptr [r14+4], 0
jle loc_779E0
xor r15d, r15d
loc_7793F:
movsxd rcx, dword ptr [r12+r15*4]
test rcx, rcx
js short loc_779A1
mov rdi, [rsp+78h+var_68]
mov r8, [rsp+78h+var_60]
mov rax, rcx
xor edx, edx
div r8
mov rsi, rdx
mov rdx, [rdi+rdx*8]
mov eax, 0
test rdx, rdx
jz short loc_779AA
mov r9, [rdx]
mov rax, rdx
cmp ecx, [r9+8]
jz short loc_779AA
loc_77977:
mov r10, r9
mov r9, [r9]
test r9, r9
jz short loc_779A8
movsxd rdi, dword ptr [r9+8]
mov rax, rdi
xor edx, edx
div r8
mov eax, 0
cmp rdx, rsi
jnz short loc_779AA
mov rax, r10
cmp ecx, edi
jnz short loc_77977
jmp short loc_779AA
loc_779A1:
mov edi, 2Eh ; '.'
jmp short loc_779CB
loc_779A8:
xor eax, eax
loc_779AA:
test rax, rax
jz short loc_779B4
mov rax, [rax]
jmp short loc_779B6
loc_779B4:
xor eax, eax
loc_779B6:
test rax, rax
jz short loc_779C6
mov rax, [rax+10h]
movsx edi, byte ptr [rax+r13]
jmp short loc_779CB
loc_779C6:
mov edi, 2Bh ; '+'
loc_779CB:
call _putchar
inc r15
movsxd rax, dword ptr [r14+4]
cmp r15, rax
jl loc_7793F
loc_779E0:
mov edi, 20h ; ' '
call _putchar
inc ebp
movsxd rax, dword ptr [r14+4]
lea r12, [r12+rax*4]
cmp ebp, [r14]
jl loc_77918
loc_779FD:
lea rdi, aDoneDumping; "\n=== Done dumping"
call _puts
lea rdi, [rsp+78h+var_68]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long common_kv_cache_dump_view_seqs(long long a1, int a2)
{
int v3; // r12d
long long v4; // r13
long long v5; // r8
long long v6; // rbp
unsigned long long v7; // rcx
long long **v8; // rdx
_QWORD *v9; // rax
long long *v10; // r10
_QWORD *v11; // r11
long long v12; // rbx
long long *i; // r12
long long v14; // r12
int v15; // ebp
long long v16; // r15
unsigned long long v17; // rcx
long long **v18; // rdx
long long *v19; // rax
long long *v20; // r9
long long *v21; // r10
long long v22; // rdi
long long v23; // rax
char *v25; // [rsp+10h] [rbp-68h] BYREF
unsigned long long v26; // [rsp+18h] [rbp-60h]
__int128 v27; // [rsp+20h] [rbp-58h]
int v28; // [rsp+30h] [rbp-48h]
__int128 v29; // [rsp+38h] [rbp-40h] BYREF
v3 = 0;
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d\n",
*(_DWORD *)a1,
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 12),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 16),
*(_DWORD *)(a1 + 20));
v25 = (char *)&v29 + 8;
v26 = 1LL;
v27 = 0LL;
v28 = 1065353216;
v29 = 0LL;
if ( *(int *)a1 > 0 )
{
v4 = *(_QWORD *)(a1 + 32);
do
{
LODWORD(v5) = *(_DWORD *)(a1 + 4);
if ( (int)v5 > 0 )
{
v6 = 0LL;
do
{
v7 = *(int *)(v4 + 4 * v6);
if ( (v7 & 0x8000000000000000LL) == 0LL )
{
v8 = *(long long ***)&v25[8 * (v7 % v26)];
v9 = 0LL;
if ( v8 )
{
v10 = *v8;
v9 = *(_QWORD **)&v25[8 * (v7 % v26)];
if ( (_DWORD)v7 != *((_DWORD *)*v8 + 2) )
{
while ( 1 )
{
v11 = v10;
v10 = (long long *)*v10;
if ( !v10 )
break;
v9 = 0LL;
if ( *((int *)v10 + 2) % v26 == v7 % v26 )
{
v9 = v11;
if ( (_DWORD)v7 != *((_DWORD *)v10 + 2) )
continue;
}
goto LABEL_13;
}
v9 = 0LL;
}
}
LABEL_13:
if ( !v9 || !*v9 )
{
v12 = *((_QWORD *)&v27 + 1);
if ( (unsigned long long)(*((_QWORD *)&v27 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL )
break;
*(_QWORD *)std::__detail::_Map_base<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
&v25,
v4 + 4 * v6) = v12;
}
}
++v6;
v5 = *(int *)(a1 + 4);
}
while ( v6 < v5 );
}
if ( (unsigned long long)(*((_QWORD *)&v27 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL )
break;
++v3;
v4 += 4LL * (int)v5;
}
while ( v3 < *(_DWORD *)a1 );
}
printf("=== Sequence legend: ");
for ( i = (long long *)v27; i; i = (long long *)*i )
printf("%zu=%d, ", i[2], *((_DWORD *)i + 2));
printf("'+'=other sequence ids");
if ( *(int *)a1 > 0 )
{
v14 = *(_QWORD *)(a1 + 32);
v15 = 0;
do
{
if ( !(v15 % a2) )
printf("\n%5d: ", v15);
if ( *(int *)(a1 + 4) > 0 )
{
v16 = 0LL;
do
{
v17 = *(int *)(v14 + 4 * v16);
if ( (v17 & 0x8000000000000000LL) != 0LL )
{
v22 = 46LL;
}
else
{
v18 = *(long long ***)&v25[8 * (v17 % v26)];
v19 = 0LL;
if ( v18 )
{
v20 = *v18;
v19 = *(long long **)&v25[8 * (v17 % v26)];
if ( (_DWORD)v17 != *((_DWORD *)*v18 + 2) )
{
while ( 1 )
{
v21 = v20;
v20 = (long long *)*v20;
if ( !v20 )
break;
v19 = 0LL;
if ( *((int *)v20 + 2) % v26 == v17 % v26 )
{
v19 = v21;
if ( (_DWORD)v17 != *((_DWORD *)v20 + 2) )
continue;
}
goto LABEL_37;
}
v19 = 0LL;
}
}
LABEL_37:
if ( v19 )
v23 = *v19;
else
v23 = 0LL;
if ( v23 )
v22 = (unsigned int)common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(v23 + 16)];
else
v22 = 43LL;
}
putchar(v22);
++v16;
}
while ( v16 < *(int *)(a1 + 4) );
}
putchar(32LL);
++v15;
v14 += 4LL * *(int *)(a1 + 4);
}
while ( v15 < *(_DWORD *)a1 );
}
puts("\n=== Done dumping");
return std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(&v25);
}
| common_kv_cache_dump_view_seqs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0xc],ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0xc]
MOV R8D,dword ptr [RDI + 0x8]
MOV R9D,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
LEA RDI,[0x1f344c]
XOR R12D,R12D
XOR EAX,EAX
CALL 0x0011b070
LEA RAX,[RSP + 0x40]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
CMP dword ptr [R14],0x0
JLE 0x001778b3
MOV R13,qword ptr [R14 + 0x20]
LEA R15,[RSP + 0x10]
LAB_001777d8:
MOV R8D,dword ptr [R14 + 0x4]
TEST R8D,R8D
JLE 0x00177890
XOR EBP,EBP
LAB_001777e7:
MOVSXD RCX,dword ptr [R13 + RBP*0x4]
TEST RCX,RCX
JS 0x00177880
MOV RDI,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
MOV RAX,RCX
XOR EDX,EDX
DIV R9
MOV RSI,RDX
MOV RDX,qword ptr [RDI + RDX*0x8]
MOV EAX,0x0
TEST RDX,RDX
JZ 0x00177850
MOV R10,qword ptr [RDX]
MOV RAX,RDX
CMP ECX,dword ptr [R10 + 0x8]
JZ 0x00177850
LAB_00177824:
MOV R11,R10
MOV R10,qword ptr [R10]
TEST R10,R10
JZ 0x0017784e
MOVSXD RDI,dword ptr [R10 + 0x8]
MOV RAX,RDI
XOR EDX,EDX
DIV R9
MOV EAX,0x0
CMP RDX,RSI
JNZ 0x00177850
MOV RAX,R11
CMP ECX,EDI
JNZ 0x00177824
JMP 0x00177850
LAB_0017784e:
XOR EAX,EAX
LAB_00177850:
TEST RAX,RAX
JZ 0x0017785b
CMP qword ptr [RAX],0x0
JNZ 0x00177880
LAB_0017785b:
MOV RBX,qword ptr [RSP + 0x28]
LEA RAX,[RBX + -0x3e]
CMP RAX,-0x3f
JC 0x00177890
LEA RSI,[RBP*0x4]
ADD RSI,R13
LAB_00177875:
MOV RDI,R15
CALL 0x001bb954
LAB_0017787d:
MOV qword ptr [RAX],RBX
LAB_00177880:
INC RBP
MOVSXD R8,dword ptr [R14 + 0x4]
CMP RBP,R8
JL 0x001777e7
LAB_00177890:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,-0x3e
CMP RAX,-0x3f
JC 0x001778b3
INC R12D
MOVSXD RAX,R8D
LEA R13,[R13 + RAX*0x4]
CMP R12D,dword ptr [R14]
JL 0x001777d8
LAB_001778b3:
LEA RDI,[0x1f34d7]
XOR EAX,EAX
CALL 0x0011b070
MOV R12,qword ptr [RSP + 0x20]
TEST R12,R12
JZ 0x001778ef
LEA R15,[0x1f34ed]
LAB_001778d2:
MOV RSI,qword ptr [R12 + 0x10]
MOV EDX,dword ptr [R12 + 0x8]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011b070
MOV R12,qword ptr [R12]
TEST R12,R12
JNZ 0x001778d2
LAB_001778ef:
LEA RDI,[0x1f34f6]
XOR EAX,EAX
CALL 0x0011b070
CMP dword ptr [R14],0x0
MOV EBX,dword ptr [RSP + 0xc]
JLE 0x001779fd
MOV R12,qword ptr [R14 + 0x20]
LEA R13,[0x1f5950]
XOR EBP,EBP
LAB_00177918:
MOV EAX,EBP
CDQ
IDIV EBX
TEST EDX,EDX
JNZ 0x00177931
LEA RDI,[0x1f3445]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x0011b070
LAB_00177931:
CMP dword ptr [R14 + 0x4],0x0
JLE 0x001779e0
XOR R15D,R15D
LAB_0017793f:
MOVSXD RCX,dword ptr [R12 + R15*0x4]
TEST RCX,RCX
JS 0x001779a1
MOV RDI,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RSP + 0x18]
MOV RAX,RCX
XOR EDX,EDX
DIV R8
MOV RSI,RDX
MOV RDX,qword ptr [RDI + RDX*0x8]
MOV EAX,0x0
TEST RDX,RDX
JZ 0x001779aa
MOV R9,qword ptr [RDX]
MOV RAX,RDX
CMP ECX,dword ptr [R9 + 0x8]
JZ 0x001779aa
LAB_00177977:
MOV R10,R9
MOV R9,qword ptr [R9]
TEST R9,R9
JZ 0x001779a8
MOVSXD RDI,dword ptr [R9 + 0x8]
MOV RAX,RDI
XOR EDX,EDX
DIV R8
MOV EAX,0x0
CMP RDX,RSI
JNZ 0x001779aa
MOV RAX,R10
CMP ECX,EDI
JNZ 0x00177977
JMP 0x001779aa
LAB_001779a1:
MOV EDI,0x2e
JMP 0x001779cb
LAB_001779a8:
XOR EAX,EAX
LAB_001779aa:
TEST RAX,RAX
JZ 0x001779b4
MOV RAX,qword ptr [RAX]
JMP 0x001779b6
LAB_001779b4:
XOR EAX,EAX
LAB_001779b6:
TEST RAX,RAX
JZ 0x001779c6
MOV RAX,qword ptr [RAX + 0x10]
MOVSX EDI,byte ptr [RAX + R13*0x1]
JMP 0x001779cb
LAB_001779c6:
MOV EDI,0x2b
LAB_001779cb:
CALL 0x0011bc10
INC R15
MOVSXD RAX,dword ptr [R14 + 0x4]
CMP R15,RAX
JL 0x0017793f
LAB_001779e0:
MOV EDI,0x20
CALL 0x0011bc10
INC EBP
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA R12,[R12 + RAX*0x4]
CMP EBP,dword ptr [R14]
JL 0x00177918
LAB_001779fd:
LEA RDI,[0x1f58fc]
CALL 0x0011bd50
LEA RDI,[RSP + 0x10]
CALL 0x001b95c4
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2)
{
int iVar1;
int8 *puVar2;
long *plVar3;
long *plVar4;
long lVar5;
ulong uVar6;
uint uVar7;
long lVar8;
long *plVar9;
int iVar10;
long lVar11;
int8 *local_68;
ulong local_60;
int8 *local_58;
long lStack_50;
int4 local_48;
int8 local_40;
int8 uStack_38;
iVar10 = 0;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
*(int4 *)(param_1 + 0x14));
local_68 = &uStack_38;
local_60 = 1;
local_58 = (int8 *)0x0;
lStack_50 = 0;
local_48 = 0x3f800000;
local_40 = 0;
uStack_38 = 0;
if (0 < *(int *)param_1) {
lVar11 = *(long *)(param_1 + 0x20);
do {
uVar7 = *(uint *)(param_1 + 4);
uVar6 = (ulong)uVar7;
if (0 < (int)uVar7) {
lVar8 = 0;
do {
lVar5 = lStack_50;
uVar7 = (uint)uVar6;
iVar1 = *(int *)(lVar11 + lVar8 * 4);
if (-1 < (long)iVar1) {
uVar6 = (ulong)(long)iVar1 % local_60;
plVar3 = (long *)local_68[uVar6];
plVar4 = (long *)0x0;
if ((plVar3 != (long *)0x0) &&
(plVar4 = plVar3, plVar9 = (long *)*plVar3, iVar1 != *(int *)((long *)*plVar3 + 1)))
{
while (plVar3 = (long *)*plVar9, plVar3 != (long *)0x0) {
plVar4 = (long *)0x0;
if (((ulong)(long)(int)plVar3[1] % local_60 != uVar6) ||
(plVar4 = plVar9, plVar9 = plVar3, iVar1 == (int)plVar3[1])) goto LAB_00177850;
}
plVar4 = (long *)0x0;
}
LAB_00177850:
if ((plVar4 == (long *)0x0) || (*plVar4 == 0)) {
if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break;
/* try { // try from 00177875 to 0017787c has its CatchHandler @ 00177a22 */
plVar3 = (long *)std::__detail::
_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)&local_68,(int *)(lVar8 * 4 + lVar11));
*plVar3 = lVar5;
}
}
lVar8 = lVar8 + 1;
uVar7 = *(uint *)(param_1 + 4);
uVar6 = (ulong)(int)uVar7;
} while (lVar8 < (long)uVar6);
}
if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break;
iVar10 = iVar10 + 1;
lVar11 = lVar11 + (long)(int)uVar7 * 4;
} while (iVar10 < *(int *)param_1);
}
printf("=== Sequence legend: ");
for (puVar2 = local_58; puVar2 != (int8 *)0x0; puVar2 = (int8 *)*puVar2) {
printf("%zu=%d, ",puVar2[2],(ulong)*(uint *)(puVar2 + 1));
}
printf("\'+\'=other sequence ids");
if (0 < *(int *)param_1) {
lVar11 = *(long *)(param_1 + 0x20);
uVar7 = 0;
do {
if ((int)uVar7 % param_2 == 0) {
printf("\n%5d: ",(ulong)uVar7);
}
if (0 < *(int *)(param_1 + 4)) {
lVar8 = 0;
do {
iVar10 = *(int *)(lVar11 + lVar8 * 4);
if ((long)iVar10 < 0) {
iVar10 = 0x2e;
}
else {
uVar6 = (ulong)(long)iVar10 % local_60;
plVar3 = (long *)local_68[uVar6];
plVar4 = (long *)0x0;
if ((plVar3 != (long *)0x0) &&
(plVar4 = plVar3, plVar9 = (long *)*plVar3, iVar10 != *(int *)((long *)*plVar3 + 1)))
{
while (plVar3 = (long *)*plVar9, plVar3 != (long *)0x0) {
plVar4 = (long *)0x0;
if (((ulong)(long)(int)plVar3[1] % local_60 != uVar6) ||
(plVar4 = plVar9, plVar9 = plVar3, iVar10 == (int)plVar3[1])) goto LAB_001779aa;
}
plVar4 = (long *)0x0;
}
LAB_001779aa:
if (plVar4 == (long *)0x0) {
lVar5 = 0;
}
else {
lVar5 = *plVar4;
}
if (lVar5 == 0) {
iVar10 = 0x2b;
}
else {
iVar10 = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
[*(long *)(lVar5 + 0x10)];
}
}
putchar(iVar10);
lVar8 = lVar8 + 1;
} while (lVar8 < *(int *)(param_1 + 4));
}
putchar(0x20);
uVar7 = uVar7 + 1;
lVar11 = lVar11 + (long)*(int *)(param_1 + 4) * 4;
} while ((int)uVar7 < *(int *)param_1);
}
puts("\n=== Done dumping");
std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68);
return;
}
| |
41,767 | common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) | monkey531[P]llama/common/common.cpp | void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
std::unordered_map<llama_seq_id, size_t> seqs;
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] < 0) { continue; }
if (seqs.find(cs_curr[j]) == seqs.end()) {
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
const size_t sz = seqs.size();
seqs[cs_curr[j]] = sz;
}
}
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
}
printf("=== Sequence legend: ");
for (const auto & it : seqs) {
printf("%zu=%d, ", it.second, it.first);
}
printf("'+'=other sequence ids");
c_curr = view.cells;
cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) {
const auto & it = seqs.find(cs_curr[j]);
putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+');
} else {
putchar('.');
}
}
putchar(' ');
}
printf("\n=== Done dumping\n");
} | O3 | cpp | common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, 0x14(%rsp)
movq %rdi, %r14
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0x10(%rdi), %r9d
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
leaq 0x796dd(%rip), %rdi # 0xf143c
movq $0x0, 0x18(%rsp)
xorl %eax, %eax
callq 0x1b070
leaq 0x50(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
cmpl $0x0, (%r14)
jle 0x77e22
movq 0x20(%r14), %rbp
movl 0x4(%r14), %eax
leaq 0x20(%rsp), %r15
xorl %ebx, %ebx
testl %eax, %eax
jle 0x77dfe
movq %rbp, %r12
xorl %r13d, %r13d
cmpl $0x0, (%r12)
js 0x77de9
movq %r15, %rdi
movq %r12, %rsi
callq 0xbaff4
testq %rax, %rax
jne 0x77de9
movq 0x38(%rsp), %rbx
leaq -0x3e(%rbx), %rax
cmpq $-0x3f, %rax
jb 0x77dfe
movq %r15, %rdi
movq %r12, %rsi
callq 0xbb050
movq %rbx, (%rax)
incq %r13
movslq 0x4(%r14), %rax
addq $0x4, %r12
cmpq %rax, %r13
jl 0x77db5
movq 0x38(%rsp), %rbx
leaq -0x3e(%rbx), %rax
cmpq $-0x3f, %rax
jb 0x77e22
movq 0x18(%rsp), %rcx
incl %ecx
movslq 0x4(%r14), %rax
leaq (%rbp,%rax,4), %rbp
movq %rcx, 0x18(%rsp)
cmpl (%r14), %ecx
jl 0x77dab
leaq 0x7969e(%rip), %rdi # 0xf14c7
xorl %eax, %eax
callq 0x1b070
movq 0x30(%rsp), %rbx
testq %rbx, %rbx
je 0x77e5a
leaq 0x7969c(%rip), %r15 # 0xf14dd
movq 0x10(%rbx), %rsi
movl 0x8(%rbx), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1b070
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x77e41
leaq 0x79685(%rip), %rdi # 0xf14e6
xorl %eax, %eax
callq 0x1b070
cmpl $0x0, (%r14)
jle 0x77f0a
movq 0x20(%r14), %r15
leaq 0x20(%rsp), %r12
xorl %ebp, %ebp
movl %ebp, %eax
cltd
idivl 0x14(%rsp)
testl %edx, %edx
jne 0x77e98
leaq 0x795a6(%rip), %rdi # 0xf1435
movl %ebp, %esi
xorl %eax, %eax
callq 0x1b070
cmpl $0x0, 0x4(%r14)
jle 0x77eed
movq %r15, %r13
xorl %ebx, %ebx
cmpl $0x0, (%r13)
js 0x77ecc
movq %r12, %rdi
movq %r13, %rsi
callq 0xbaff4
testq %rax, %rax
je 0x77ed3
movq 0x10(%rax), %rax
leaq 0x7ba7a(%rip), %rcx # 0xf3940
movsbl (%rax,%rcx), %edi
jmp 0x77ed8
movl $0x2e, %edi
jmp 0x77ed8
movl $0x2b, %edi
callq 0x1bc10
incq %rbx
movslq 0x4(%r14), %rax
addq $0x4, %r13
cmpq %rax, %rbx
jl 0x77ea4
movl $0x20, %edi
callq 0x1bc10
incl %ebp
movslq 0x4(%r14), %rax
leaq (%r15,%rax,4), %r15
cmpl (%r14), %ebp
jl 0x77e7d
leaq 0x7b9db(%rip), %rdi # 0xf38ec
callq 0x1bd50
leaq 0x20(%rsp), %rdi
callq 0xb8cec
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x77f33
jmp 0x77f33
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb8cec
movq %rbx, %rdi
callq 0x1bf90
| _Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_74], esi
mov r14, rdi
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+0Ch]
mov r8d, [rdi+8]
mov r9d, [rdi+10h]
mov eax, [rdi+14h]
mov [rsp+88h+var_88], eax
lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"...
mov [rsp+88h+var_70], 0
xor eax, eax
call _printf
lea rax, [rsp+88h+var_38]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
cmp dword ptr [r14], 0
jle loc_77E22
mov rbp, [r14+20h]
mov eax, [r14+4]
lea r15, [rsp+88h+var_68]
xor ebx, ebx
loc_77DAB:
test eax, eax
jle short loc_77DFE
mov r12, rbp
xor r13d, r13d
loc_77DB5:
cmp dword ptr [r12], 0
js short loc_77DE9
mov rdi, r15
mov rsi, r12
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&)
test rax, rax
jnz short loc_77DE9
mov rbx, [rsp+88h+var_50]
lea rax, [rbx-3Eh]
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_77DFE
mov rdi, r15
mov rsi, r12
call _ZNSt8__detail9_Map_baseIiSt4pairIKimESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&)
mov [rax], rbx
loc_77DE9:
inc r13
movsxd rax, dword ptr [r14+4]
add r12, 4
cmp r13, rax
jl short loc_77DB5
mov rbx, [rsp+88h+var_50]
loc_77DFE:
lea rax, [rbx-3Eh]
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_77E22
mov rcx, [rsp+88h+var_70]
inc ecx
movsxd rax, dword ptr [r14+4]
lea rbp, [rbp+rax*4+0]
mov [rsp+88h+var_70], rcx
cmp ecx, [r14]
jl short loc_77DAB
loc_77E22:
lea rdi, aSequenceLegend; "=== Sequence legend: "
xor eax, eax
call _printf
mov rbx, [rsp+88h+var_58]
test rbx, rbx
jz short loc_77E5A
lea r15, aZuD; "%zu=%d, "
loc_77E41:
mov rsi, [rbx+10h]
mov edx, [rbx+8]
mov rdi, r15
xor eax, eax
call _printf
mov rbx, [rbx]
test rbx, rbx
jnz short loc_77E41
loc_77E5A:
lea rdi, aOtherSequenceI; "'+'=other sequence ids"
xor eax, eax
call _printf
cmp dword ptr [r14], 0
jle loc_77F0A
mov r15, [r14+20h]
lea r12, [rsp+88h+var_68]
xor ebp, ebp
loc_77E7D:
mov eax, ebp
cdq
idiv [rsp+88h+var_74]
test edx, edx
jnz short loc_77E98
lea rdi, a5d; "\n%5d: "
mov esi, ebp
xor eax, eax
call _printf
loc_77E98:
cmp dword ptr [r14+4], 0
jle short loc_77EED
mov r13, r15
xor ebx, ebx
loc_77EA4:
cmp dword ptr [r13+0], 0
js short loc_77ECC
mov rdi, r12
mov rsi, r13
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&)
test rax, rax
jz short loc_77ED3
mov rax, [rax+10h]
lea rcx, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
movsx edi, byte ptr [rax+rcx]
jmp short loc_77ED8
loc_77ECC:
mov edi, 2Eh ; '.'
jmp short loc_77ED8
loc_77ED3:
mov edi, 2Bh ; '+'
loc_77ED8:
call _putchar
inc rbx
movsxd rax, dword ptr [r14+4]
add r13, 4
cmp rbx, rax
jl short loc_77EA4
loc_77EED:
mov edi, 20h ; ' '
call _putchar
inc ebp
movsxd rax, dword ptr [r14+4]
lea r15, [r15+rax*4]
cmp ebp, [r14]
jl loc_77E7D
loc_77F0A:
lea rdi, aDoneDumping; "\n=== Done dumping"
call _puts
lea rdi, [rsp+88h+var_68]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_77F33
jmp short $+2
loc_77F33:
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long common_kv_cache_dump_view_seqs(long long a1, int a2)
{
int *v3; // rbp
long long v4; // rax
long long v5; // rbx
int *v6; // r12
long long v7; // r13
long long *i; // rbx
int *v9; // r15
int v10; // ebp
int *v11; // r13
long long v12; // rbx
long long v13; // rax
long long v14; // rdi
int v16; // [rsp+18h] [rbp-70h]
_QWORD v17[2]; // [rsp+20h] [rbp-68h] BYREF
__int128 v18; // [rsp+30h] [rbp-58h]
int v19; // [rsp+40h] [rbp-48h]
__int128 v20; // [rsp+48h] [rbp-40h] BYREF
v16 = 0;
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d\n",
*(_DWORD *)a1,
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 12),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 16),
*(_DWORD *)(a1 + 20));
v17[0] = (char *)&v20 + 8;
v17[1] = 1LL;
v18 = 0LL;
v19 = 1065353216;
v20 = 0LL;
if ( *(int *)a1 > 0 )
{
v3 = *(int **)(a1 + 32);
LODWORD(v4) = *(_DWORD *)(a1 + 4);
v5 = 0LL;
do
{
if ( (int)v4 > 0 )
{
v6 = v3;
v7 = 0LL;
do
{
if ( *v6 >= 0
&& !std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
v17,
v6) )
{
v5 = *((_QWORD *)&v18 + 1);
if ( (unsigned long long)(*((_QWORD *)&v18 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL )
goto LABEL_11;
*(_QWORD *)std::__detail::_Map_base<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
v17,
v6) = v5;
}
++v7;
++v6;
}
while ( v7 < *(int *)(a1 + 4) );
v5 = *((_QWORD *)&v18 + 1);
}
LABEL_11:
if ( (unsigned long long)(v5 - 62) < 0xFFFFFFFFFFFFFFC1LL )
break;
v4 = *(int *)(a1 + 4);
v3 += v4;
++v16;
}
while ( v16 < *(_DWORD *)a1 );
}
printf("=== Sequence legend: ");
for ( i = (long long *)v18; i; i = (long long *)*i )
printf("%zu=%d, ", i[2], *((_DWORD *)i + 2));
printf("'+'=other sequence ids");
if ( *(int *)a1 > 0 )
{
v9 = *(int **)(a1 + 32);
v10 = 0;
do
{
if ( !(v10 % a2) )
printf("\n%5d: ", v10);
if ( *(int *)(a1 + 4) > 0 )
{
v11 = v9;
v12 = 0LL;
do
{
if ( *v11 < 0 )
{
v14 = 46LL;
}
else
{
v13 = std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
v17,
v11);
if ( v13 )
v14 = (unsigned int)common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(v13 + 16)];
else
v14 = 43LL;
}
putchar(v14);
++v12;
++v11;
}
while ( v12 < *(int *)(a1 + 4) );
}
putchar(32LL);
++v10;
v9 += *(int *)(a1 + 4);
}
while ( v10 < *(_DWORD *)a1 );
}
puts("\n=== Done dumping");
return std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v17);
}
| common_kv_cache_dump_view_seqs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RSP + 0x14],ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0xc]
MOV R8D,dword ptr [RDI + 0x8]
MOV R9D,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
LEA RDI,[0x1f143c]
MOV qword ptr [RSP + 0x18],0x0
XOR EAX,EAX
CALL 0x0011b070
LEA RAX,[RSP + 0x50]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
CMP dword ptr [R14],0x0
JLE 0x00177e22
MOV RBP,qword ptr [R14 + 0x20]
MOV EAX,dword ptr [R14 + 0x4]
LEA R15,[RSP + 0x20]
XOR EBX,EBX
LAB_00177dab:
TEST EAX,EAX
JLE 0x00177dfe
MOV R12,RBP
XOR R13D,R13D
LAB_00177db5:
CMP dword ptr [R12],0x0
JS 0x00177de9
LAB_00177dbc:
MOV RDI,R15
MOV RSI,R12
CALL 0x001baff4
TEST RAX,RAX
JNZ 0x00177de9
MOV RBX,qword ptr [RSP + 0x38]
LEA RAX,[RBX + -0x3e]
CMP RAX,-0x3f
JC 0x00177dfe
LAB_00177ddb:
MOV RDI,R15
MOV RSI,R12
CALL 0x001bb050
MOV qword ptr [RAX],RBX
LAB_00177de9:
INC R13
MOVSXD RAX,dword ptr [R14 + 0x4]
ADD R12,0x4
CMP R13,RAX
JL 0x00177db5
MOV RBX,qword ptr [RSP + 0x38]
LAB_00177dfe:
LEA RAX,[RBX + -0x3e]
CMP RAX,-0x3f
JC 0x00177e22
MOV RCX,qword ptr [RSP + 0x18]
INC ECX
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA RBP,[RBP + RAX*0x4]
MOV qword ptr [RSP + 0x18],RCX
CMP ECX,dword ptr [R14]
JL 0x00177dab
LAB_00177e22:
LEA RDI,[0x1f14c7]
XOR EAX,EAX
CALL 0x0011b070
MOV RBX,qword ptr [RSP + 0x30]
TEST RBX,RBX
JZ 0x00177e5a
LEA R15,[0x1f14dd]
LAB_00177e41:
MOV RSI,qword ptr [RBX + 0x10]
MOV EDX,dword ptr [RBX + 0x8]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011b070
MOV RBX,qword ptr [RBX]
TEST RBX,RBX
JNZ 0x00177e41
LAB_00177e5a:
LEA RDI,[0x1f14e6]
XOR EAX,EAX
CALL 0x0011b070
CMP dword ptr [R14],0x0
JLE 0x00177f0a
MOV R15,qword ptr [R14 + 0x20]
LEA R12,[RSP + 0x20]
XOR EBP,EBP
LAB_00177e7d:
MOV EAX,EBP
CDQ
IDIV dword ptr [RSP + 0x14]
TEST EDX,EDX
JNZ 0x00177e98
LEA RDI,[0x1f1435]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x0011b070
LAB_00177e98:
CMP dword ptr [R14 + 0x4],0x0
JLE 0x00177eed
MOV R13,R15
XOR EBX,EBX
LAB_00177ea4:
CMP dword ptr [R13],0x0
JS 0x00177ecc
LAB_00177eab:
MOV RDI,R12
MOV RSI,R13
CALL 0x001baff4
LAB_00177eb6:
TEST RAX,RAX
JZ 0x00177ed3
MOV RAX,qword ptr [RAX + 0x10]
LEA RCX,[0x1f3940]
MOVSX EDI,byte ptr [RAX + RCX*0x1]
JMP 0x00177ed8
LAB_00177ecc:
MOV EDI,0x2e
JMP 0x00177ed8
LAB_00177ed3:
MOV EDI,0x2b
LAB_00177ed8:
CALL 0x0011bc10
INC RBX
MOVSXD RAX,dword ptr [R14 + 0x4]
ADD R13,0x4
CMP RBX,RAX
JL 0x00177ea4
LAB_00177eed:
MOV EDI,0x20
CALL 0x0011bc10
INC EBP
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA R15,[R15 + RAX*0x4]
CMP EBP,dword ptr [R14]
JL 0x00177e7d
LAB_00177f0a:
LEA RDI,[0x1f38ec]
CALL 0x0011bd50
LEA RDI,[RSP + 0x20]
CALL 0x001b8cec
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2)
{
int8 *puVar1;
long lVar2;
long *plVar3;
ulong uVar4;
int iVar5;
long lVar6;
uint uVar7;
int *piVar8;
int *piVar9;
long lVar10;
int8 *local_68;
int8 local_60;
int8 *local_58;
long lStack_50;
int4 local_48;
int8 local_40;
int8 uStack_38;
iVar5 = 0;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
*(int4 *)(param_1 + 0x14));
local_68 = &uStack_38;
local_60 = 1;
local_58 = (int8 *)0x0;
lStack_50 = 0;
local_48 = 0x3f800000;
local_40 = 0;
uStack_38 = 0;
if (0 < *(int *)param_1) {
piVar8 = *(int **)(param_1 + 0x20);
uVar4 = (ulong)*(uint *)(param_1 + 4);
lVar6 = 0;
do {
if (0 < (int)uVar4) {
lVar10 = 0;
piVar9 = piVar8;
do {
/* try { // try from 00177dbc to 00177dc6 has its CatchHandler @ 00177f31 */
if ((-1 < *piVar9) &&
(lVar2 = std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68,piVar9), lVar6 = lStack_50, lVar2 == 0)) {
if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break;
/* try { // try from 00177ddb to 00177de5 has its CatchHandler @ 00177f2f */
plVar3 = (long *)std::__detail::
_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)&local_68,piVar9);
*plVar3 = lVar6;
}
lVar10 = lVar10 + 1;
piVar9 = piVar9 + 1;
lVar6 = lStack_50;
} while (lVar10 < *(int *)(param_1 + 4));
}
if (lVar6 - 0x3eU < 0xffffffffffffffc1) break;
iVar5 = iVar5 + 1;
uVar4 = (ulong)*(int *)(param_1 + 4);
piVar8 = piVar8 + uVar4;
} while (iVar5 < *(int *)param_1);
}
printf("=== Sequence legend: ");
for (puVar1 = local_58; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) {
printf("%zu=%d, ",puVar1[2],(ulong)*(uint *)(puVar1 + 1));
}
printf("\'+\'=other sequence ids");
if (0 < *(int *)param_1) {
piVar8 = *(int **)(param_1 + 0x20);
uVar7 = 0;
do {
if ((int)uVar7 % param_2 == 0) {
printf("\n%5d: ",(ulong)uVar7);
}
if (0 < *(int *)(param_1 + 4)) {
lVar6 = 0;
piVar9 = piVar8;
do {
if (*piVar9 < 0) {
iVar5 = 0x2e;
}
else {
/* try { // try from 00177eab to 00177eb5 has its CatchHandler @ 00177f33 */
lVar10 = std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68,piVar9);
if (lVar10 == 0) {
iVar5 = 0x2b;
}
else {
iVar5 = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
[*(long *)(lVar10 + 0x10)];
}
}
putchar(iVar5);
lVar6 = lVar6 + 1;
piVar9 = piVar9 + 1;
} while (lVar6 < *(int *)(param_1 + 4));
}
putchar(0x20);
uVar7 = uVar7 + 1;
piVar8 = piVar8 + *(int *)(param_1 + 4);
} while ((int)uVar7 < *(int *)param_1);
}
puts("\n=== Done dumping");
std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68);
return;
}
| |
41,768 | ma_net_read | eloqsql/libmariadb/libmariadb/ma_net.c | ulong ma_net_read(NET *net)
{
size_t len,complen;
#ifdef HAVE_COMPRESS
if (!net->compress)
{
#endif
len = ma_real_read (net,(size_t *)&complen);
if (len == MAX_PACKET_LENGTH)
{
/* multi packet read */
size_t length= 0;
ulong last_pos= net->where_b;
do
{
length+= len;
net->where_b+= (unsigned long)len;
len= ma_real_read(net, &complen);
} while (len == MAX_PACKET_LENGTH);
net->where_b= last_pos;
if (len != packet_error)
len+= length;
}
net->read_pos = net->buff + net->where_b;
if (len != packet_error)
net->read_pos[len]=0; /* Safeguard for mysql_use_result */
return (ulong)len;
#ifdef HAVE_COMPRESS
}
else
{
/*
compressed protocol:
--------------------------------------
packet_length 3
sequence_id 1
uncompressed_length 3
--------------------------------------
compressed data packet_length - 7
--------------------------------------
Another packet will follow if:
packet_length == MAX_PACKET_LENGTH
Last package will be identified by
- packet_length is zero (special case)
- packet_length < MAX_PACKET_LENGTH
*/
size_t packet_length,
buffer_length;
size_t current= 0, start= 0;
my_bool is_multi_packet= 0;
/* check if buffer is empty */
if (!net->remain_in_buf)
{
buffer_length= 0;
}
else
{
/* save position and restore \0 character */
buffer_length= net->buf_length;
current= net->buf_length - net->remain_in_buf;
start= current;
net->buff[net->buf_length - net->remain_in_buf]=net->save_char;
}
for (;;)
{
if (buffer_length - current >= 4)
{
uchar *pos= net->buff + current;
packet_length= uint3korr(pos);
/* check if we have last package (special case: zero length) */
if (!packet_length)
{
current+= 4; /* length + sequence_id,
no more data will follow */
break;
}
if (packet_length + 4 <= buffer_length - current)
{
if (!is_multi_packet)
{
current= current + packet_length + 4;
}
else
{
/* remove packet_header */
memmove(net->buff + current,
net->buff + current + 4,
buffer_length - current);
buffer_length-= 4;
current+= packet_length;
}
/* do we have last packet ? */
if (packet_length != MAX_PACKET_LENGTH)
{
is_multi_packet= 0;
break;
}
else
is_multi_packet= 1;
if (start)
{
memmove(net->buff, net->buff + start,
buffer_length - start);
/* decrease buflen*/
buffer_length-= start;
start= 0;
}
continue;
}
}
if (start)
{
memmove(net->buff, net->buff + start, buffer_length - start);
/* decrease buflen and current */
current -= start;
buffer_length-= start;
start= 0;
}
net->where_b=(unsigned long)buffer_length;
if ((packet_length = ma_real_read(net,(size_t *)&complen)) == packet_error)
return packet_error;
if (_mariadb_uncompress(net, (unsigned char*) net->buff + net->where_b, &packet_length, &complen))
{
net->error=2; /* caller will close socket */
net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_UNCOMPRESS, SQLSTATE_UNKNOWN, 0);
return packet_error;
}
buffer_length+= complen;
}
/* set values */
net->buf_length= (unsigned long)buffer_length;
net->remain_in_buf= (unsigned long)(buffer_length - current);
net->read_pos= net->buff + start + 4;
len= current - start - 4;
if (is_multi_packet)
len-= 4;
net->save_char= net->read_pos[len]; /* Must be saved */
net->read_pos[len]=0; /* Safeguard for mysql_use_result */
}
#endif
return (ulong)len;
} | O0 | c | ma_net_read:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x84(%rax)
jne 0x47228
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x47570
movq %rax, -0x18(%rbp)
cmpq $0xffffff, -0x18(%rbp) # imm = 0xFFFFFF
jne 0x471e8
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x47570
movq %rax, -0x18(%rbp)
cmpq $0xffffff, -0x18(%rbp) # imm = 0xFFFFFF
je 0x4718c
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x18(%rbp)
je 0x471e6
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x471e8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
addq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x18(%rbp)
je 0x4721b
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x47557
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movb $0x0, -0x51(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x47251
movq $0x0, -0x40(%rbp)
jmp 0x4729e
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x30(%rcx), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movb 0x81(%rax), %dl
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movq -0x10(%rbp), %rsi
subq 0x30(%rsi), %rcx
movb %dl, (%rax,%rcx)
jmp 0x472a0
movq -0x40(%rbp), %rax
subq -0x48(%rbp), %rax
cmpq $0x4, %rax
jb 0x473d0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movzbl (%rax), %eax
movq -0x60(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x60(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movl %eax, %eax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x47301
movq -0x48(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x48(%rbp)
jmp 0x474d0
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq -0x40(%rbp), %rcx
subq -0x48(%rbp), %rcx
cmpq %rcx, %rax
ja 0x473ce
cmpb $0x0, -0x51(%rbp)
jne 0x47332
movq -0x48(%rbp), %rax
addq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x48(%rbp)
jmp 0x47373
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
addq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
addq -0x48(%rbp), %rsi
addq $0x4, %rsi
movq -0x40(%rbp), %rdx
subq -0x48(%rbp), %rdx
callq 0x136f0
movq -0x40(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0xffffff, -0x38(%rbp) # imm = 0xFFFFFF
je 0x47386
movb $0x0, -0x51(%rbp)
jmp 0x474d0
movb $0x1, -0x51(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x473c9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
addq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
subq -0x50(%rbp), %rdx
callq 0x136f0
movq -0x50(%rbp), %rcx
movq -0x40(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x50(%rbp)
jmp 0x472a0
jmp 0x473d0
cmpq $0x0, -0x50(%rbp)
je 0x4741e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
addq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
subq -0x50(%rbp), %rdx
callq 0x136f0
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rcx
movq -0x40(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x47570
movq %rax, -0x38(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x47453
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x8(%rbp)
jmp 0x47557
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
addq 0x48(%rax), %rsi
leaq -0x38(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x25f80
cmpb $0x0, %al
je 0x474bf
movq -0x10(%rbp), %rax
movb $0x2, 0x94(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x50(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x40(%rax), %rdi
leaq 0x19a40(%rip), %rax # 0x60ee0
movq (%rax), %rdx
movl $0x1397, %esi # imm = 0x1397
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq *%r8
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %rax, -0x8(%rbp)
jmp 0x47557
movq -0x20(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x472a0
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x40(%rbp), %rcx
subq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq -0x50(%rbp), %rcx
addq $0x4, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x48(%rbp), %rax
subq -0x50(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x18(%rbp)
cmpb $0x0, -0x51(%rbp)
je 0x47526
movq -0x18(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x81(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_net_read:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp byte ptr [rax+84h], 0
jnz loc_47228
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_20]
call ma_real_read
mov [rbp+var_18], rax
cmp [rbp+var_18], 0FFFFFFh
jnz short loc_471E8
mov [rbp+var_28], 0
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov [rbp+var_30], rax
loc_4718C:
mov rax, [rbp+var_18]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
add rcx, [rax+48h]
mov [rax+48h], rcx
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_20]
call ma_real_read
mov [rbp+var_18], rax
cmp [rbp+var_18], 0FFFFFFh
jz short loc_4718C
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+48h], rcx
mov eax, 0FFFFFFFFh
cmp [rbp+var_18], rax
jz short loc_471E6
mov rax, [rbp+var_28]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
loc_471E6:
jmp short $+2
loc_471E8:
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
add rcx, [rax+48h]
mov rax, [rbp+var_10]
mov [rax+20h], rcx
mov eax, 0FFFFFFFFh
cmp [rbp+var_18], rax
jz short loc_4721B
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_4721B:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp loc_47557
loc_47228:
mov [rbp+var_48], 0
mov [rbp+var_50], 0
mov [rbp+var_51], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax+30h], 0
jnz short loc_47251
mov [rbp+var_40], 0
jmp short loc_4729E
loc_47251:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
sub rax, [rcx+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov dl, [rax+81h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx+40h]
mov rsi, [rbp+var_10]
sub rcx, [rsi+30h]
mov [rax+rcx], dl
loc_4729E:
jmp short $+2
loc_472A0:
mov rax, [rbp+var_40]
sub rax, [rbp+var_48]
cmp rax, 4
jb loc_473D0
mov rax, [rbp+var_10]
mov rax, [rax+8]
add rax, [rbp+var_48]
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_60]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_60]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov eax, eax
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_47301
mov rax, [rbp+var_48]
add rax, 4
mov [rbp+var_48], rax
jmp loc_474D0
loc_47301:
mov rax, [rbp+var_38]
add rax, 4
mov rcx, [rbp+var_40]
sub rcx, [rbp+var_48]
cmp rax, rcx
ja loc_473CE
cmp [rbp+var_51], 0
jnz short loc_47332
mov rax, [rbp+var_48]
add rax, [rbp+var_38]
add rax, 4
mov [rbp+var_48], rax
jmp short loc_47373
loc_47332:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
add rdi, [rbp+var_48]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
add rsi, [rbp+var_48]
add rsi, 4
mov rdx, [rbp+var_40]
sub rdx, [rbp+var_48]
call _memmove
mov rax, [rbp+var_40]
sub rax, 4
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_48]
mov [rbp+var_48], rax
loc_47373:
cmp [rbp+var_38], 0FFFFFFh
jz short loc_47386
mov [rbp+var_51], 0
jmp loc_474D0
loc_47386:
mov [rbp+var_51], 1
cmp [rbp+var_50], 0
jz short loc_473C9
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
add rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
sub rdx, [rbp+var_50]
call _memmove
mov rcx, [rbp+var_50]
mov rax, [rbp+var_40]
sub rax, rcx
mov [rbp+var_40], rax
mov [rbp+var_50], 0
loc_473C9:
jmp loc_472A0
loc_473CE:
jmp short $+2
loc_473D0:
cmp [rbp+var_50], 0
jz short loc_4741E
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
add rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
sub rdx, [rbp+var_50]
call _memmove
mov rcx, [rbp+var_50]
mov rax, [rbp+var_48]
sub rax, rcx
mov [rbp+var_48], rax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_40]
sub rax, rcx
mov [rbp+var_40], rax
mov [rbp+var_50], 0
loc_4741E:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+48h], rcx
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_20]
call ma_real_read
mov [rbp+var_38], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_47453
mov eax, 0FFFFFFFFh
mov [rbp+var_8], rax
jmp loc_47557
loc_47453:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
add rsi, [rax+48h]
lea rdx, [rbp+var_38]
lea rcx, [rbp+var_20]
call _mariadb_uncompress
cmp al, 0
jz short loc_474BF
mov rax, [rbp+var_10]
mov byte ptr [rax+94h], 2
mov rax, [rbp+var_10]
mov rax, [rax]
mov r8, [rax+50h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdi, [rax+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 1397h
xor eax, eax
mov ecx, eax
mov al, 0
call r8
mov eax, 0FFFFFFFFh
mov [rbp+var_8], rax
jmp loc_47557
loc_474BF:
mov rax, [rbp+var_20]
add rax, [rbp+var_40]
mov [rbp+var_40], rax
jmp loc_472A0
loc_474D0:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov rcx, [rbp+var_40]
sub rcx, [rbp+var_48]
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+8]
add rcx, [rbp+var_50]
add rcx, 4
mov rax, [rbp+var_10]
mov [rax+20h], rcx
mov rax, [rbp+var_48]
sub rax, [rbp+var_50]
sub rax, 4
mov [rbp+var_18], rax
cmp [rbp+var_51], 0
jz short loc_47526
mov rax, [rbp+var_18]
sub rax, 4
mov [rbp+var_18], rax
loc_47526:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov [rax+81h], cl
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_47557:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| long long ma_net_read(long long a1)
{
char v2; // [rsp+Fh] [rbp-51h]
long long v3; // [rsp+10h] [rbp-50h]
long long v4; // [rsp+18h] [rbp-48h]
long long v5; // [rsp+20h] [rbp-40h]
long long v6; // [rsp+28h] [rbp-38h] BYREF
long long v7; // [rsp+30h] [rbp-30h]
long long v8; // [rsp+38h] [rbp-28h]
long long v9; // [rsp+40h] [rbp-20h] BYREF
long long v10; // [rsp+48h] [rbp-18h]
long long v11; // [rsp+50h] [rbp-10h]
v11 = a1;
if ( *(_BYTE *)(a1 + 132) )
{
v4 = 0LL;
v3 = 0LL;
v2 = 0;
if ( *(_QWORD *)(v11 + 48) )
{
v5 = *(_QWORD *)(v11 + 64);
v4 = v5 - *(_QWORD *)(v11 + 48);
v3 = v4;
*(_BYTE *)(*(_QWORD *)(v11 + 8) + v4) = *(_BYTE *)(v11 + 129);
}
else
{
v5 = 0LL;
}
while ( 1 )
{
while ( 1 )
{
if ( (unsigned long long)(v5 - v4) >= 4 )
{
v6 = (*(unsigned __int8 *)(v4 + *(_QWORD *)(v11 + 8) + 2) << 16)
+ (*(unsigned __int8 *)(v4 + *(_QWORD *)(v11 + 8) + 1) << 8)
+ (unsigned int)*(unsigned __int8 *)(v4 + *(_QWORD *)(v11 + 8));
if ( !v6 )
{
v4 += 4LL;
goto LABEL_32;
}
if ( v6 + 4 <= (unsigned long long)(v5 - v4) )
break;
}
if ( v3 )
{
memmove(*(_QWORD *)(v11 + 8), v3 + *(_QWORD *)(v11 + 8), v5 - v3);
v4 -= v3;
v5 -= v3;
v3 = 0LL;
}
*(_QWORD *)(v11 + 72) = v5;
v6 = ma_real_read(v11, &v9);
if ( v6 == 0xFFFFFFFFLL )
return 0xFFFFFFFFLL;
if ( mariadb_uncompress(v11, *(_QWORD *)(v11 + 72) + *(_QWORD *)(v11 + 8), &v6, &v9) )
{
*(_BYTE *)(v11 + 148) = 2;
(*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)v11 + 80LL))(
*(_QWORD *)(*(_QWORD *)v11 + 64LL),
5015LL,
SQLSTATE_UNKNOWN,
0LL);
return 0xFFFFFFFFLL;
}
v5 += v9;
}
if ( v2 )
{
memmove(v4 + *(_QWORD *)(v11 + 8), v4 + *(_QWORD *)(v11 + 8) + 4, v5 - v4);
v5 -= 4LL;
v4 += v6;
}
else
{
v4 += v6 + 4;
}
if ( v6 != 0xFFFFFF )
break;
v2 = 1;
if ( v3 )
{
memmove(*(_QWORD *)(v11 + 8), v3 + *(_QWORD *)(v11 + 8), v5 - v3);
v5 -= v3;
v3 = 0LL;
}
}
v2 = 0;
LABEL_32:
*(_QWORD *)(v11 + 64) = v5;
*(_QWORD *)(v11 + 48) = v5 - v4;
*(_QWORD *)(v11 + 32) = v3 + *(_QWORD *)(v11 + 8) + 4;
v10 = v4 - v3 - 4;
if ( v2 )
v10 -= 4LL;
*(_BYTE *)(v11 + 129) = *(_BYTE *)(*(_QWORD *)(v11 + 32) + v10);
*(_BYTE *)(*(_QWORD *)(v11 + 32) + v10) = 0;
return v10;
}
else
{
v10 = ma_real_read(v11, &v9);
if ( v10 == 0xFFFFFF )
{
v8 = 0LL;
v7 = *(_QWORD *)(v11 + 72);
do
{
v8 += v10;
*(_QWORD *)(v11 + 72) += v10;
v10 = ma_real_read(v11, &v9);
}
while ( v10 == 0xFFFFFF );
*(_QWORD *)(v11 + 72) = v7;
if ( v10 != 0xFFFFFFFFLL )
v10 += v8;
}
*(_QWORD *)(v11 + 32) = *(_QWORD *)(v11 + 72) + *(_QWORD *)(v11 + 8);
if ( v10 != 0xFFFFFFFFLL )
*(_BYTE *)(*(_QWORD *)(v11 + 32) + v10) = 0;
return v10;
}
}
| ma_net_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x84],0x0
JNZ 0x00147228
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x20]
CALL 0x00147570
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0xffffff
JNZ 0x001471e8
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x30],RAX
LAB_0014718c:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x48]
MOV qword ptr [RAX + 0x48],RCX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x20]
CALL 0x00147570
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0xffffff
JZ 0x0014718c
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x48],RCX
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x18],RAX
JZ 0x001471e6
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
LAB_001471e6:
JMP 0x001471e8
LAB_001471e8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x18],RAX
JZ 0x0014721b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_0014721b:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00147557
LAB_00147228:
MOV qword ptr [RBP + -0x48],0x0
MOV qword ptr [RBP + -0x50],0x0
MOV byte ptr [RBP + -0x51],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x30],0x0
JNZ 0x00147251
MOV qword ptr [RBP + -0x40],0x0
JMP 0x0014729e
LAB_00147251:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,qword ptr [RCX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV DL,byte ptr [RAX + 0x81]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x40]
MOV RSI,qword ptr [RBP + -0x10]
SUB RCX,qword ptr [RSI + 0x30]
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0014729e:
JMP 0x001472a0
LAB_001472a0:
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x48]
CMP RAX,0x4
JC 0x001473d0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00147301
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x4
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001474d0
LAB_00147301:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x4
MOV RCX,qword ptr [RBP + -0x40]
SUB RCX,qword ptr [RBP + -0x48]
CMP RAX,RCX
JA 0x001473ce
CMP byte ptr [RBP + -0x51],0x0
JNZ 0x00147332
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x38]
ADD RAX,0x4
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00147373
LAB_00147332:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
ADD RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,qword ptr [RBP + -0x48]
ADD RSI,0x4
MOV RDX,qword ptr [RBP + -0x40]
SUB RDX,qword ptr [RBP + -0x48]
CALL 0x001136f0
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,0x4
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
LAB_00147373:
CMP qword ptr [RBP + -0x38],0xffffff
JZ 0x00147386
MOV byte ptr [RBP + -0x51],0x0
JMP 0x001474d0
LAB_00147386:
MOV byte ptr [RBP + -0x51],0x1
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001473c9
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
SUB RDX,qword ptr [RBP + -0x50]
CALL 0x001136f0
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x50],0x0
LAB_001473c9:
JMP 0x001472a0
LAB_001473ce:
JMP 0x001473d0
LAB_001473d0:
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0014741e
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
SUB RDX,qword ptr [RBP + -0x50]
CALL 0x001136f0
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x48]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x50],0x0
LAB_0014741e:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x48],RCX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x20]
CALL 0x00147570
MOV qword ptr [RBP + -0x38],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x00147453
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00147557
LAB_00147453:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
ADD RSI,qword ptr [RAX + 0x48]
LEA RDX,[RBP + -0x38]
LEA RCX,[RBP + -0x20]
CALL 0x00125f80
CMP AL,0x0
JZ 0x001474bf
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x94],0x2
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x40]
LEA RAX,[0x160ee0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x1397
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL R8
MOV EAX,0xffffffff
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00147557
LAB_001474bf:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001472a0
LAB_001474d0:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x40]
SUB RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RBP + -0x50]
ADD RCX,0x4
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x48]
SUB RAX,qword ptr [RBP + -0x50]
SUB RAX,0x4
MOV qword ptr [RBP + -0x18],RAX
CMP byte ptr [RBP + -0x51],0x0
JZ 0x00147526
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x4
MOV qword ptr [RBP + -0x18],RAX
LAB_00147526:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x81],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_00147557:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
long ma_net_read(long *param_1)
{
bool bVar1;
char cVar2;
byte *pbVar3;
long local_58;
long local_50;
long local_48;
ulong local_40;
long local_38;
long local_30;
long local_28;
long local_20;
long *local_18;
local_18 = param_1;
if (*(char *)((long)param_1 + 0x84) == '\0') {
local_20 = ma_real_read(param_1,&local_28);
if (local_20 == 0xffffff) {
local_30 = 0;
local_38 = local_18[9];
local_20 = 0xffffff;
do {
local_30 = local_20 + local_30;
local_18[9] = local_20 + local_18[9];
local_20 = ma_real_read(local_18,&local_28);
} while (local_20 == 0xffffff);
local_18[9] = local_38;
if (local_20 != 0xffffffff) {
local_20 = local_30 + local_20;
}
}
local_18[4] = local_18[1] + local_18[9];
if (local_20 != 0xffffffff) {
*(int1 *)(local_18[4] + local_20) = 0;
}
return local_20;
}
local_50 = 0;
bVar1 = false;
if (param_1[6] == 0) {
local_48 = 0;
local_58 = local_50;
}
else {
local_48 = param_1[8];
local_58 = param_1[8] - param_1[6];
*(int1 *)(param_1[1] + (param_1[8] - param_1[6])) = *(int1 *)((long)param_1 + 0x81);
local_50 = local_58;
}
LAB_001472a0:
do {
if (3 < (ulong)(local_48 - local_50)) {
pbVar3 = (byte *)(local_18[1] + local_50);
local_40 = (ulong)((uint)*pbVar3 + (uint)pbVar3[1] * 0x100 + (uint)pbVar3[2] * 0x10000);
if (local_40 == 0) {
local_50 = local_50 + 4;
LAB_001474d0:
local_18[8] = local_48;
local_18[6] = local_48 - local_50;
local_18[4] = local_18[1] + local_58 + 4;
local_20 = (local_50 - local_58) + -4;
if (bVar1) {
local_20 = (local_50 - local_58) + -8;
}
*(int1 *)((long)local_18 + 0x81) = *(int1 *)(local_18[4] + local_20);
*(int1 *)(local_18[4] + local_20) = 0;
return local_20;
}
if (local_40 + 4 <= (ulong)(local_48 - local_50)) {
if (bVar1) {
memmove((void *)(local_18[1] + local_50),(void *)(local_18[1] + local_50 + 4),
local_48 - local_50);
local_48 = local_48 + -4;
local_50 = local_40 + local_50;
}
else {
local_50 = local_50 + local_40 + 4;
}
if (local_40 != 0xffffff) {
bVar1 = false;
goto LAB_001474d0;
}
bVar1 = true;
if (local_58 != 0) {
memmove((void *)local_18[1],(void *)(local_18[1] + local_58),local_48 - local_58);
local_48 = local_48 - local_58;
local_58 = 0;
}
goto LAB_001472a0;
}
}
if (local_58 != 0) {
memmove((void *)local_18[1],(void *)(local_18[1] + local_58),local_48 - local_58);
local_50 = local_50 - local_58;
local_48 = local_48 - local_58;
local_58 = 0;
}
local_18[9] = local_48;
local_40 = ma_real_read(local_18,&local_28);
if (local_40 == 0xffffffff) {
return 0xffffffff;
}
cVar2 = _mariadb_uncompress(local_18,local_18[1] + local_18[9],&local_40,&local_28);
if (cVar2 != '\0') {
*(int1 *)((long)local_18 + 0x94) = 2;
(**(code **)(*local_18 + 0x50))(*(int8 *)(*local_18 + 0x40),0x1397,SQLSTATE_UNKNOWN,0);
return 0xffffffff;
}
local_48 = local_28 + local_48;
} while( true );
}
| |
41,769 | js__gettimeofday_us | bluesky950520[P]quickjs/cutils.c | int64_t js__gettimeofday_us(void) {
struct timeval tv;
#ifdef _WIN32
gettimeofday_msvc(&tv);
#else
gettimeofday(&tv, NULL);
#endif
return ((int64_t)tv.tv_sec * 1000000) + tv.tv_usec;
} | O1 | c | js__gettimeofday_us:
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe330
imulq $0xf4240, (%rbx), %rax # imm = 0xF4240
addq 0x8(%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
| js__gettimeofday_us:
push rbx
sub rsp, 10h
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _gettimeofday
imul rax, [rbx], 0F4240h
add rax, [rbx+8]
add rsp, 10h
pop rbx
retn
| long long js__gettimeofday_us()
{
_QWORD v1[3]; // [rsp+0h] [rbp-18h] BYREF
gettimeofday(v1, 0LL);
return v1[1] + 1000000LL * v1[0];
}
| js__gettimeofday_us:
PUSH RBX
SUB RSP,0x10
MOV RBX,RSP
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0010e330
IMUL RAX,qword ptr [RBX],0xf4240
ADD RAX,qword ptr [RBX + 0x8]
ADD RSP,0x10
POP RBX
RET
|
long js__gettimeofday_us(void)
{
timeval local_18;
gettimeofday(&local_18,(__timezone_ptr_t)0x0);
return local_18.tv_sec * 1000000 + local_18.tv_usec;
}
| |
41,770 | js__gettimeofday_us | bluesky950520[P]quickjs/cutils.c | int64_t js__gettimeofday_us(void) {
struct timeval tv;
#ifdef _WIN32
gettimeofday_msvc(&tv);
#else
gettimeofday(&tv, NULL);
#endif
return ((int64_t)tv.tv_sec * 1000000) + tv.tv_usec;
} | O3 | c | js__gettimeofday_us:
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xe330
imulq $0xf4240, (%rbx), %rax # imm = 0xF4240
addq 0x8(%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
| js__gettimeofday_us:
push rbx
sub rsp, 10h
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _gettimeofday
imul rax, [rbx], 0F4240h
add rax, [rbx+8]
add rsp, 10h
pop rbx
retn
| long long js__gettimeofday_us()
{
_QWORD v1[3]; // [rsp+0h] [rbp-18h] BYREF
gettimeofday(v1, 0LL);
return v1[1] + 1000000LL * v1[0];
}
| js__gettimeofday_us:
PUSH RBX
SUB RSP,0x10
MOV RBX,RSP
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0010e330
IMUL RAX,qword ptr [RBX],0xf4240
ADD RAX,qword ptr [RBX + 0x8]
ADD RSP,0x10
POP RBX
RET
|
long js__gettimeofday_us(void)
{
timeval local_18;
gettimeofday(&local_18,(__timezone_ptr_t)0x0);
return local_18.tv_sec * 1000000 + local_18.tv_usec;
}
| |
41,771 | ma_get_bitmap_description | eloqsql/storage/maria/ma_bitmap.c | size_t _ma_get_bitmap_description(MARIA_FILE_BITMAP *bitmap,
uchar *bitmap_data,
pgcache_page_no_t page,
char *out)
{
uchar *pos, *end;
size_t count=0, dot_printed= 0, len;
char buff[80], last[80];
page++;
last[0]=0;
for (pos= bitmap_data, end= pos+ bitmap->used_size ; pos < end ; pos+= 6)
{
ulonglong bits= uint6korr(pos); /* 6 bytes = 6*8/3= 16 patterns */
uint i;
for (i= 0; i < 16 ; i++, bits>>= 3)
{
if (count > 60)
{
if (memcmp(buff, last, count))
{
memcpy(last, buff, count);
len= sprintf(out, "%8lu: ", (ulong) (page - count));
memcpy(out+len, buff, count);
out+= len + count + 1;
out[-1]= '\n';
dot_printed= 0;
}
else if (!(dot_printed++))
{
out= strmov(out, "...\n");
}
count= 0;
}
buff[count++]= '0' + (uint) (bits & 7);
page++;
}
}
len= sprintf(out, "%8lu: ", (ulong) (page - count));
memcpy(out+len, buff, count);
out[len + count]= '\n';
out[len + count + 1]= 0;
return len + count + 1;
} | O0 | c | ma_get_bitmap_description:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp # imm = 0x110
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0xb8(%rbp)
movq %rsi, -0xc0(%rbp)
movq %rdx, -0xc8(%rbp)
movq %rcx, -0xd0(%rbp)
movq $0x0, -0xe8(%rbp)
movq $0x0, -0xf0(%rbp)
movq -0xc8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc8(%rbp)
movb $0x0, -0xb0(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq -0xb8(%rbp), %rcx
movl 0x24(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0xe0(%rbp), %rax
jae 0x43b4d
movq -0xd8(%rbp), %rdi
callq 0x43c20
movq %rax, -0x100(%rbp)
movl $0x0, -0x104(%rbp)
cmpl $0x10, -0x104(%rbp)
jae 0x43b34
cmpq $0x3c, -0xe8(%rbp)
jbe 0x43ad3
leaq -0x60(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0x2a830
cmpl $0x0, %eax
je 0x43a91
leaq -0xb0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0x2a090
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rdx
subq -0xe8(%rbp), %rdx
leaq 0x10ef86(%rip), %rsi # 0x1529b1
movb $0x0, %al
callq 0x2a7b0
cltq
movq %rax, -0xf8(%rbp)
movq -0xd0(%rbp), %rdi
addq -0xf8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0x2a090
movq -0xf8(%rbp), %rax
addq -0xe8(%rbp), %rax
addq $0x1, %rax
addq -0xd0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movb $0xa, -0x1(%rax)
movq $0x0, -0xf0(%rbp)
jmp 0x43ac8
movq -0xf0(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xf0(%rbp)
cmpq $0x0, %rax
jne 0x43ac6
movq -0xd0(%rbp), %rdi
leaq 0x10eefe(%rip), %rsi # 0x1529b8
callq 0x2a730
movq %rax, -0xd0(%rbp)
jmp 0x43ac8
movq $0x0, -0xe8(%rbp)
movq -0x100(%rbp), %rax
andq $0x7, %rax
addl $0x30, %eax
movb %al, %cl
movq -0xe8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0xe8(%rbp)
movb %cl, -0x60(%rbp,%rax)
movq -0xc8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc8(%rbp)
movl -0x104(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x104(%rbp)
movq -0x100(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x100(%rbp)
jmp 0x439bd
jmp 0x43b36
movq -0xd8(%rbp), %rax
addq $0x6, %rax
movq %rax, -0xd8(%rbp)
jmp 0x4398c
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rdx
movq -0xe8(%rbp), %rax
subq %rax, %rdx
leaq 0x10ee45(%rip), %rsi # 0x1529b1
xorl %eax, %eax
callq 0x2a7b0
cltq
movq %rax, -0xf8(%rbp)
movq -0xd0(%rbp), %rdi
movq -0xf8(%rbp), %rax
addq %rax, %rdi
movq -0xe8(%rbp), %rdx
leaq -0x60(%rbp), %rsi
callq 0x2a090
movq -0xd0(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq -0xe8(%rbp), %rdx
addq %rdx, %rcx
movb $0xa, (%rax,%rcx)
movq -0xd0(%rbp), %rax
movq -0xf8(%rbp), %rcx
movq -0xe8(%rbp), %rdx
addq %rdx, %rcx
movb $0x0, 0x1(%rax,%rcx)
movq -0xf8(%rbp), %rax
movq -0xe8(%rbp), %rcx
leaq 0x1(%rax,%rcx), %rax
movq %rax, -0x110(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x43c12
movq -0x110(%rbp), %rax
addq $0x110, %rsp # imm = 0x110
popq %rbp
retq
callq 0x2a270
nopw (%rax,%rax)
| _ma_get_bitmap_description:
push rbp
mov rbp, rsp
sub rsp, 110h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_B8], rdi
mov [rbp+var_C0], rsi
mov [rbp+var_C8], rdx
mov [rbp+var_D0], rcx
mov [rbp+var_E8], 0
mov [rbp+var_F0], 0
mov rax, [rbp+var_C8]
add rax, 1
mov [rbp+var_C8], rax
mov [rbp+var_B0], 0
mov rax, [rbp+var_C0]
mov [rbp+var_D8], rax
mov rax, [rbp+var_D8]
mov rcx, [rbp+var_B8]
mov ecx, [rcx+24h]
add rax, rcx
mov [rbp+var_E0], rax
loc_4398C:
mov rax, [rbp+var_D8]
cmp rax, [rbp+var_E0]
jnb loc_43B4D
mov rdi, [rbp+var_D8]
call uint6korr
mov [rbp+var_100], rax
mov [rbp+var_104], 0
loc_439BD:
cmp [rbp+var_104], 10h
jnb loc_43B34
cmp [rbp+var_E8], 3Ch ; '<'
jbe loc_43AD3
lea rdi, [rbp+var_60]
lea rsi, [rbp+var_B0]
mov rdx, [rbp+var_E8]
call _memcmp
cmp eax, 0
jz loc_43A91
lea rdi, [rbp+var_B0]
lea rsi, [rbp+var_60]
mov rdx, [rbp+var_E8]
call _memcpy
mov rdi, [rbp+var_D0]
mov rdx, [rbp+var_C8]
sub rdx, [rbp+var_E8]
lea rsi, a8lu; "%8lu: "
mov al, 0
call _sprintf
cdqe
mov [rbp+var_F8], rax
mov rdi, [rbp+var_D0]
add rdi, [rbp+var_F8]
lea rsi, [rbp+var_60]
mov rdx, [rbp+var_E8]
call _memcpy
mov rax, [rbp+var_F8]
add rax, [rbp+var_E8]
add rax, 1
add rax, [rbp+var_D0]
mov [rbp+var_D0], rax
mov rax, [rbp+var_D0]
mov byte ptr [rax-1], 0Ah
mov [rbp+var_F0], 0
jmp short loc_43AC8
loc_43A91:
mov rax, [rbp+var_F0]
mov rcx, rax
add rcx, 1
mov [rbp+var_F0], rcx
cmp rax, 0
jnz short loc_43AC6
mov rdi, [rbp+var_D0]
lea rsi, asc_1529B8; "...\n"
call _stpcpy
mov [rbp+var_D0], rax
loc_43AC6:
jmp short $+2
loc_43AC8:
mov [rbp+var_E8], 0
loc_43AD3:
mov rax, [rbp+var_100]
and rax, 7
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_E8]
mov rdx, rax
add rdx, 1
mov [rbp+var_E8], rdx
mov [rbp+rax+var_60], cl
mov rax, [rbp+var_C8]
add rax, 1
mov [rbp+var_C8], rax
mov eax, [rbp+var_104]
add eax, 1
mov [rbp+var_104], eax
mov rax, [rbp+var_100]
shr rax, 3
mov [rbp+var_100], rax
jmp loc_439BD
loc_43B34:
jmp short $+2
loc_43B36:
mov rax, [rbp+var_D8]
add rax, 6
mov [rbp+var_D8], rax
jmp loc_4398C
loc_43B4D:
mov rdi, [rbp+var_D0]
mov rdx, [rbp+var_C8]
mov rax, [rbp+var_E8]
sub rdx, rax
lea rsi, a8lu; "%8lu: "
xor eax, eax
call _sprintf
cdqe
mov [rbp+var_F8], rax
mov rdi, [rbp+var_D0]
mov rax, [rbp+var_F8]
add rdi, rax
mov rdx, [rbp+var_E8]
lea rsi, [rbp+var_60]
call _memcpy
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_F8]
mov rdx, [rbp+var_E8]
add rcx, rdx
mov byte ptr [rax+rcx], 0Ah
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_F8]
mov rdx, [rbp+var_E8]
add rcx, rdx
mov byte ptr [rax+rcx+1], 0
mov rax, [rbp+var_F8]
mov rcx, [rbp+var_E8]
lea rax, [rax+rcx+1]
mov [rbp+var_110], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_43C12
mov rax, [rbp+var_110]
add rsp, 110h
pop rbp
retn
loc_43C12:
call ___stack_chk_fail
| long long ma_get_bitmap_description(long long a1, unsigned long long a2, long long a3, long long a4)
{
unsigned long long v5; // rax
unsigned int i; // [rsp+Ch] [rbp-104h]
unsigned long long v8; // [rsp+10h] [rbp-100h]
long long v9; // [rsp+18h] [rbp-F8h]
long long v10; // [rsp+18h] [rbp-F8h]
long long v11; // [rsp+20h] [rbp-F0h]
unsigned long long v12; // [rsp+28h] [rbp-E8h]
unsigned long long v13; // [rsp+30h] [rbp-E0h]
unsigned long long v14; // [rsp+38h] [rbp-D8h]
long long v16; // [rsp+48h] [rbp-C8h]
_BYTE v17[80]; // [rsp+60h] [rbp-B0h] BYREF
_BYTE v18[88]; // [rsp+B0h] [rbp-60h] BYREF
unsigned long long v19; // [rsp+108h] [rbp-8h]
v19 = __readfsqword(0x28u);
v12 = 0LL;
v11 = 0LL;
v16 = a3 + 1;
v17[0] = 0;
v14 = a2;
v13 = *(unsigned int *)(a1 + 36) + a2;
while ( v14 < v13 )
{
v8 = uint6korr(v14);
for ( i = 0; i < 0x10; ++i )
{
if ( v12 > 0x3C )
{
if ( !(unsigned int)memcmp(v18, v17, v12) )
{
if ( !v11++ )
a4 = stpcpy(a4, "...\n");
}
else
{
memcpy(v17, v18, v12);
v9 = (int)sprintf(a4, "%8lu: ", v16 - v12);
memcpy(v9 + a4, v18, v12);
a4 += v12 + v9 + 1;
*(_BYTE *)(a4 - 1) = 10;
v11 = 0LL;
}
v12 = 0LL;
}
v5 = v12++;
v18[v5] = (v8 & 7) + 48;
++v16;
v8 >>= 3;
}
v14 += 6LL;
}
v10 = (int)sprintf(a4, "%8lu: ", v16 - v12);
memcpy(v10 + a4, v18, v12);
*(_BYTE *)(a4 + v12 + v10) = 10;
*(_BYTE *)(a4 + v12 + v10 + 1) = 0;
return v10 + v12 + 1;
}
| _ma_get_bitmap_description:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x110
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0xb8],RDI
MOV qword ptr [RBP + -0xc0],RSI
MOV qword ptr [RBP + -0xc8],RDX
MOV qword ptr [RBP + -0xd0],RCX
MOV qword ptr [RBP + -0xe8],0x0
MOV qword ptr [RBP + -0xf0],0x0
MOV RAX,qword ptr [RBP + -0xc8]
ADD RAX,0x1
MOV qword ptr [RBP + -0xc8],RAX
MOV byte ptr [RBP + -0xb0],0x0
MOV RAX,qword ptr [RBP + -0xc0]
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0xd8]
MOV RCX,qword ptr [RBP + -0xb8]
MOV ECX,dword ptr [RCX + 0x24]
ADD RAX,RCX
MOV qword ptr [RBP + -0xe0],RAX
LAB_0014398c:
MOV RAX,qword ptr [RBP + -0xd8]
CMP RAX,qword ptr [RBP + -0xe0]
JNC 0x00143b4d
MOV RDI,qword ptr [RBP + -0xd8]
CALL 0x00143c20
MOV qword ptr [RBP + -0x100],RAX
MOV dword ptr [RBP + -0x104],0x0
LAB_001439bd:
CMP dword ptr [RBP + -0x104],0x10
JNC 0x00143b34
CMP qword ptr [RBP + -0xe8],0x3c
JBE 0x00143ad3
LEA RDI,[RBP + -0x60]
LEA RSI,[RBP + -0xb0]
MOV RDX,qword ptr [RBP + -0xe8]
CALL 0x0012a830
CMP EAX,0x0
JZ 0x00143a91
LEA RDI,[RBP + -0xb0]
LEA RSI,[RBP + -0x60]
MOV RDX,qword ptr [RBP + -0xe8]
CALL 0x0012a090
MOV RDI,qword ptr [RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0xc8]
SUB RDX,qword ptr [RBP + -0xe8]
LEA RSI,[0x2529b1]
MOV AL,0x0
CALL 0x0012a7b0
CDQE
MOV qword ptr [RBP + -0xf8],RAX
MOV RDI,qword ptr [RBP + -0xd0]
ADD RDI,qword ptr [RBP + -0xf8]
LEA RSI,[RBP + -0x60]
MOV RDX,qword ptr [RBP + -0xe8]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0xf8]
ADD RAX,qword ptr [RBP + -0xe8]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0xd0],RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV byte ptr [RAX + -0x1],0xa
MOV qword ptr [RBP + -0xf0],0x0
JMP 0x00143ac8
LAB_00143a91:
MOV RAX,qword ptr [RBP + -0xf0]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xf0],RCX
CMP RAX,0x0
JNZ 0x00143ac6
MOV RDI,qword ptr [RBP + -0xd0]
LEA RSI,[0x2529b8]
CALL 0x0012a730
MOV qword ptr [RBP + -0xd0],RAX
LAB_00143ac6:
JMP 0x00143ac8
LAB_00143ac8:
MOV qword ptr [RBP + -0xe8],0x0
LAB_00143ad3:
MOV RAX,qword ptr [RBP + -0x100]
AND RAX,0x7
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xe8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0xe8],RDX
MOV byte ptr [RBP + RAX*0x1 + -0x60],CL
MOV RAX,qword ptr [RBP + -0xc8]
ADD RAX,0x1
MOV qword ptr [RBP + -0xc8],RAX
MOV EAX,dword ptr [RBP + -0x104]
ADD EAX,0x1
MOV dword ptr [RBP + -0x104],EAX
MOV RAX,qword ptr [RBP + -0x100]
SHR RAX,0x3
MOV qword ptr [RBP + -0x100],RAX
JMP 0x001439bd
LAB_00143b34:
JMP 0x00143b36
LAB_00143b36:
MOV RAX,qword ptr [RBP + -0xd8]
ADD RAX,0x6
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x0014398c
LAB_00143b4d:
MOV RDI,qword ptr [RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0xe8]
SUB RDX,RAX
LEA RSI,[0x2529b1]
XOR EAX,EAX
CALL 0x0012a7b0
CDQE
MOV qword ptr [RBP + -0xf8],RAX
MOV RDI,qword ptr [RBP + -0xd0]
MOV RAX,qword ptr [RBP + -0xf8]
ADD RDI,RAX
MOV RDX,qword ptr [RBP + -0xe8]
LEA RSI,[RBP + -0x60]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RDX,qword ptr [RBP + -0xe8]
ADD RCX,RDX
MOV byte ptr [RAX + RCX*0x1],0xa
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RDX,qword ptr [RBP + -0xe8]
ADD RCX,RDX
MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0
MOV RAX,qword ptr [RBP + -0xf8]
MOV RCX,qword ptr [RBP + -0xe8]
LEA RAX,[RAX + RCX*0x1 + 0x1]
MOV qword ptr [RBP + -0x110],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00143c12
MOV RAX,qword ptr [RBP + -0x110]
ADD RSP,0x110
POP RBP
RET
LAB_00143c12:
CALL 0x0012a270
|
long _ma_get_bitmap_description(long param_1,ulong param_2,long param_3,char *param_4)
{
uint uVar1;
int iVar2;
long lVar3;
long in_FS_OFFSET;
bool bVar4;
uint local_10c;
ulong local_108;
long local_f8;
size_t local_f0;
ulong local_e0;
char *local_d8;
long local_d0;
int1 local_b8 [80];
char local_68 [88];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_f0 = 0;
local_f8 = 0;
local_d0 = param_3 + 1;
local_b8[0] = 0;
uVar1 = *(uint *)(param_1 + 0x24);
local_d8 = param_4;
for (local_e0 = param_2; local_e0 < param_2 + uVar1; local_e0 = local_e0 + 6) {
local_108 = uint6korr(local_e0);
for (local_10c = 0; local_10c < 0x10; local_10c = local_10c + 1) {
if (0x3c < local_f0) {
iVar2 = memcmp(local_68,local_b8,local_f0);
if (iVar2 == 0) {
lVar3 = local_f8 + 1;
bVar4 = local_f8 == 0;
local_f8 = lVar3;
if (bVar4) {
local_d8 = stpcpy(local_d8,"...\n");
}
}
else {
memcpy(local_b8,local_68,local_f0);
iVar2 = sprintf(local_d8,"%8lu: ",local_d0 - local_f0);
memcpy(local_d8 + iVar2,local_68,local_f0);
local_d8 = local_d8 + (long)iVar2 + local_f0 + 1;
local_d8[-1] = '\n';
local_f8 = 0;
}
local_f0 = 0;
}
local_68[local_f0] = ((byte)local_108 & 7) + 0x30;
local_d0 = local_d0 + 1;
local_108 = local_108 >> 3;
local_f0 = local_f0 + 1;
}
}
iVar2 = sprintf(local_d8,"%8lu: ",local_d0 - local_f0);
lVar3 = (long)iVar2;
memcpy(local_d8 + lVar3,local_68,local_f0);
local_d8[lVar3 + local_f0] = '\n';
local_d8[lVar3 + local_f0 + 1] = '\0';
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar3 + 1 + local_f0;
}
| |
41,772 | generateCachePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, char const*, VkShaderStageFlagBits) | HansKristian-Work[P]pyroveil/layer/pyroveil.cpp | static std::string generateCachePath(const std::string &cachePath, Hash hash, const char *pName, VkShaderStageFlagBits stage)
{
char hashStr[17];
sprintf(hashStr, "%016llx", static_cast<unsigned long long>(hash));
std::string path = cachePath + "/" + hashStr;
if (pName)
{
path += ".";
path += pName;
if (stage != 0)
{
path += ".";
path += std::to_string(stage);
}
}
path += ".spv";
return path;
} | O0 | cpp | generateCachePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, char const*, VkShaderStageFlagBits):
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0xb0(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x18(%rbp), %rdx
leaq 0x764ba3(%rip), %rsi # 0x8ea6ae
xorl %eax, %eax
leaq -0x40(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x17a830
movb $0x0, -0x41(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x7ee690(%rip), %rdx # 0x9741bc
leaq -0x68(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x17b740
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0x16e330
jmp 0x185b58
leaq -0x68(%rbp), %rdi
callq 0x17f4c0
cmpq $0x0, -0x20(%rbp)
je 0x185c27
movq -0xb0(%rbp), %rdi
leaq 0x81b925(%rip), %rsi # 0x9a149f
callq 0x167120
jmp 0x185b81
movq -0xb0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x167120
jmp 0x185b93
cmpl $0x0, -0x24(%rbp)
je 0x185c25
movq -0xb0(%rbp), %rdi
leaq 0x81b8f4(%rip), %rsi # 0x9a149f
callq 0x167120
jmp 0x185bb2
movl -0x24(%rbp), %esi
leaq -0x98(%rbp), %rdi
callq 0x17b290
jmp 0x185bc3
movq -0xb0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x166550
jmp 0x185bd8
leaq -0x98(%rbp), %rdi
callq 0x17f4c0
jmp 0x185c25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x17f4c0
jmp 0x185c6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x185c62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x17f4c0
jmp 0x185c62
jmp 0x185c27
movq -0xb0(%rbp), %rdi
leaq 0x764a81(%rip), %rsi # 0x8ea6b6
callq 0x167120
jmp 0x185c3c
movb $0x1, -0x41(%rbp)
testb $0x1, -0x41(%rbp)
jne 0x185c52
movq -0xb0(%rbp), %rdi
callq 0x17f4c0
movq -0xb8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x17f4c0
movq -0x70(%rbp), %rdi
callq 0x171c30
nopw (%rax,%rax)
| _ZL17generateCachePathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPKc21VkShaderStageFlagBits:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_B0], rdi
mov rax, rdi
mov [rbp+var_B8], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov rdx, [rbp+var_18]
lea rsi, a016llx; "%016llx"
xor eax, eax
lea rdi, [rbp+var_40]
mov [rbp+var_A0], rdi
call _sprintf
mov [rbp+var_41], 0
mov rsi, [rbp+var_10]
lea rdx, asc_9741BB+1; "/"
lea rdi, [rbp+var_68]
mov [rbp+var_A8], rdi
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
mov rdi, [rbp+var_B0]
mov rsi, [rbp+var_A8]
mov rdx, [rbp+var_A0]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_185B58:
lea rdi, [rbp+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
cmp [rbp+var_20], 0
jz loc_185C27
mov rdi, [rbp+var_B0]
lea rsi, aExpectedIdToSt+1Bh; "."
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_185B81:
mov rdi, [rbp+var_B0]
mov rsi, [rbp+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_185B93:
cmp [rbp+var_24], 0
jz loc_185C25
mov rdi, [rbp+var_B0]
lea rsi, aExpectedIdToSt+1Bh; "."
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_185BB2:
mov esi, [rbp+var_24]; int
lea rdi, [rbp+var_98]; this
call __ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_185BC3:
mov rdi, [rbp+var_B0]
lea rsi, [rbp+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_185BD8:
lea rdi, [rbp+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_185C25
mov rcx, rax
mov eax, edx
mov [rbp+var_70], rcx
mov [rbp+var_74], eax
lea rdi, [rbp+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_185C6E
mov rcx, rax
mov eax, edx
mov [rbp+var_70], rcx
mov [rbp+var_74], eax
jmp short loc_185C62
mov rcx, rax
mov eax, edx
mov [rbp+var_70], rcx
mov [rbp+var_74], eax
lea rdi, [rbp+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_185C62
loc_185C25:
jmp short $+2
loc_185C27:
mov rdi, [rbp+var_B0]
lea rsi, aSpv; ".spv"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_185C3C:
mov [rbp+var_41], 1
test [rbp+var_41], 1
jnz short loc_185C52
mov rdi, [rbp+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_185C52:
mov rax, [rbp+var_B8]
add rsp, 0C0h
pop rbp
retn
loc_185C62:
mov rdi, [rbp+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_185C6E:
mov rdi, [rbp+var_70]
call __Unwind_Resume
| long long generateCachePath(long long a1, long long a2, long long a3, long long a4, int a5)
{
_BYTE v6[36]; // [rsp+28h] [rbp-98h] BYREF
_BYTE v7[40]; // [rsp+58h] [rbp-68h] BYREF
_BYTE v8[28]; // [rsp+80h] [rbp-40h] BYREF
int v9; // [rsp+9Ch] [rbp-24h]
long long v10; // [rsp+A0h] [rbp-20h]
long long v11; // [rsp+A8h] [rbp-18h]
long long v12; // [rsp+B0h] [rbp-10h]
long long v13; // [rsp+B8h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a5;
sprintf(v8, "%016llx", a3);
v7[39] = 0;
std::operator+<char>(v7, v12, "/");
std::operator+<char>(a1, v7, v8);
std::string::~string(v7);
if ( v10 )
{
std::string::operator+=(a1, ".");
std::string::operator+=(a1, v10);
if ( v9 )
{
std::string::operator+=(a1, ".");
std::to_string((std::__cxx11 *)v6, v9);
std::string::operator+=(a1, v6);
std::string::~string(v6);
}
}
std::string::operator+=(a1, ".spv");
return a1;
}
| |||
41,773 | generateCachePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, char const*, VkShaderStageFlagBits) | HansKristian-Work[P]pyroveil/layer/pyroveil.cpp | static std::string generateCachePath(const std::string &cachePath, Hash hash, const char *pName, VkShaderStageFlagBits stage)
{
char hashStr[17];
sprintf(hashStr, "%016llx", static_cast<unsigned long long>(hash));
std::string path = cachePath + "/" + hashStr;
if (pName)
{
path += ".";
path += pName;
if (stage != 0)
{
path += ".";
path += std::to_string(stage);
}
}
path += ".spv";
return path;
} | O1 | cpp | generateCachePath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, char const*, VkShaderStageFlagBits):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r14d
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x35add2(%rip), %rsi # 0x3e4716
leaq -0x60(%rbp), %rdi
xorl %eax, %eax
callq 0x7e2e0
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %r12
movq %r12, %rdi
callq 0x7e770
leaq 0x3dd39e(%rip), %rsi # 0x466d14
movq %r12, %rdi
callq 0x80c70
leaq -0x48(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x80c70
leaq 0x10(%rbx), %r13
movq %r13, (%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x899ad
movq %rdx, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x899b5
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x899e5
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7f6e0
testq %r15, %r15
je 0x89ad8
leaq 0x409e86(%rip), %rsi # 0x49387b
movq %rbx, %rdi
callq 0x80c70
movq %rbx, %rdi
movq %r15, %rsi
callq 0x80c70
testl %r14d, %r14d
je 0x89ad8
leaq 0x409e63(%rip), %rsi # 0x49387b
movq %rbx, %rdi
callq 0x80c70
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
movl $0x1, %r12d
cmpl $0xa, %r15d
jb 0x89a80
movl $0x4, %r12d
movl $0xd1b71759, %eax # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x89a77
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x89a7d
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x89a80
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x89a44
addl $-0x3, %r12d
jmp 0x89a80
addl $-0x2, %r12d
jmp 0x89a80
decl %r12d
shrl $0x1f, %r14d
leal (%r12,%r14), %esi
leaq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
movq %rax, (%rdi)
movl $0x2d, %edx
callq 0x7fa40
movl %r14d, %edi
addq -0x48(%rbp), %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x800a0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x7e560
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x89ad8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7f6e0
leaq 0x35ac3f(%rip), %rsi # 0x3e471e
movq %rbx, %rdi
callq 0x80c70
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x89b34
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7f6e0
jmp 0x89b34
jmp 0x89b31
jmp 0x89b1b
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x89b48
movq -0x38(%rbp), %rsi
jmp 0x89b40
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x89b48
movq (%r13), %rsi
incq %rsi
callq 0x7f6e0
movq %r14, %rdi
callq 0x809f0
| _ZL17generateCachePathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPKc21VkShaderStageFlagBits:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14d, r8d
mov r15, rcx
mov r12, rsi
mov rbx, rdi
lea rsi, a016llx; "%016llx"
lea rdi, [rbp+var_60]
xor eax, eax
call _sprintf
lea rax, [rbp+var_38]
mov [rax-10h], rax
mov rsi, [r12]
mov rdx, [r12+8]
add rdx, rsi
lea r12, [rbp+var_48]
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, asc_466D13+1; "/"
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rbp+var_48]
lea rsi, [rbp+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rbx+10h]
mov [rbx], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_899AD
mov [rbx], rdx
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_899B5
loc_899AD:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
loc_899B5:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rbp+var_48]; void *
lea rax, [rbp+var_38]
cmp rdi, rax
jz short loc_899E5
mov rsi, [rbp+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_899E5:
test r15, r15
jz loc_89AD8
lea rsi, aExpectedIdToSt+1Bh; "."
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
test r14d, r14d
jz loc_89AD8
lea rsi, aExpectedIdToSt+1Bh; "."
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov r15d, r14d
neg r15d
cmovs r15d, r14d
mov r12d, 1
cmp r15d, 0Ah
jb short loc_89A80
mov r12d, 4
mov eax, 0D1B71759h
mov ecx, r15d
loc_89A44:
cmp ecx, 63h ; 'c'
jbe short loc_89A77
cmp ecx, 3E7h
jbe short loc_89A7D
cmp ecx, 2710h
jb short loc_89A80
mov edx, ecx
imul rdx, rax
shr rdx, 2Dh
add r12d, 4
cmp ecx, 1869Fh
mov ecx, edx
ja short loc_89A44
add r12d, 0FFFFFFFDh
jmp short loc_89A80
loc_89A77:
add r12d, 0FFFFFFFEh
jmp short loc_89A80
loc_89A7D:
dec r12d
loc_89A80:
shr r14d, 1Fh
lea esi, [r12+r14]
lea rdi, [rbp+var_48]
lea rax, [rbp+var_38]
mov [rdi], rax
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov edi, r14d
add rdi, [rbp+var_48]
mov esi, r12d
mov edx, r15d
call __ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_40]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rbp+var_48]; void *
lea rax, [rbp+var_38]
cmp rdi, rax
jz short loc_89AD8
mov rsi, [rbp+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_89AD8:
lea rsi, aSpv; ".spv"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbp+var_48]; void *
lea rax, [rbp+var_38]
cmp rdi, rax
jz short loc_89B34
mov rsi, [rbp+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_89B34
jmp short loc_89B31
jmp short $+2
loc_89B1B:
mov r14, rax
mov rdi, [rbp+var_48]
lea rax, [rbp+var_38]
cmp rdi, rax
jz short loc_89B48
mov rsi, [rbp+var_38]
jmp short loc_89B40
loc_89B31:
mov r14, rax
loc_89B34:
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_89B48
mov rsi, [r13+0]
loc_89B40:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_89B48:
mov rdi, r14
call __Unwind_Resume
| long long generateCachePath(long long a1, _QWORD *a2, long long a3, long long a4, int a5)
{
long long v7; // rax
_OWORD *v8; // rcx
unsigned int v9; // r15d
unsigned int v10; // r12d
unsigned int v11; // ecx
bool v12; // cc
unsigned int v13; // r14d
_BYTE v15[24]; // [rsp+0h] [rbp-60h] BYREF
void *v16[2]; // [rsp+18h] [rbp-48h] BYREF
_QWORD v17[7]; // [rsp+28h] [rbp-38h] BYREF
sprintf(v15, "%016llx", a3);
v16[0] = v17;
std::string::_M_construct<char *>(v16, *a2, *a2 + a2[1]);
std::string::append(v16, "/");
v7 = std::string::append(v16, v15);
*(_QWORD *)a1 = a1 + 16;
v8 = (_OWORD *)(v7 + 16);
if ( *(_QWORD *)v7 == v7 + 16 )
{
*(_OWORD *)(a1 + 16) = *v8;
}
else
{
*(_QWORD *)a1 = *(_QWORD *)v7;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v8;
}
*(_QWORD *)(a1 + 8) = *(_QWORD *)(v7 + 8);
*(_QWORD *)v7 = v8;
*(_QWORD *)(v7 + 8) = 0LL;
*(_BYTE *)(v7 + 16) = 0;
if ( v16[0] != v17 )
operator delete(v16[0], v17[0] + 1LL);
if ( a4 )
{
std::string::append(a1, ".");
std::string::append(a1, a4);
if ( a5 )
{
std::string::append(a1, ".");
v9 = -a5;
if ( a5 > 0 )
v9 = a5;
v10 = 1;
if ( v9 >= 0xA )
{
v10 = 4;
v11 = v9;
while ( 1 )
{
if ( v11 <= 0x63 )
{
v10 -= 2;
goto LABEL_19;
}
if ( v11 <= 0x3E7 )
break;
if ( v11 < 0x2710 )
goto LABEL_19;
v10 += 4;
v12 = v11 <= 0x1869F;
v11 /= 0x2710u;
if ( v12 )
{
v10 -= 3;
goto LABEL_19;
}
}
--v10;
}
LABEL_19:
v13 = (unsigned int)a5 >> 31;
v16[0] = v17;
std::string::_M_construct(v16, v10 + v13, 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v16[0] + v13, v10, v9);
std::string::_M_append(a1, v16[0], v16[1]);
if ( v16[0] != v17 )
operator delete(v16[0], v17[0] + 1LL);
}
}
std::string::append(a1, ".spv");
return a1;
}
| generateCachePath:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14D,R8D
MOV R15,RCX
MOV R12,RSI
MOV RBX,RDI
LEA RSI,[0x4e4716]
LEA RDI,[RBP + -0x60]
XOR EAX,EAX
CALL 0x0017e2e0
LEA RAX,[RBP + -0x38]
MOV qword ptr [RAX + -0x10],RAX
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
ADD RDX,RSI
LEA R12,[RBP + -0x48]
MOV RDI,R12
CALL 0x0017e770
LAB_0018996f:
LEA RSI,[0x566d14]
MOV RDI,R12
CALL 0x00180c70
LAB_0018997e:
LEA RDI,[RBP + -0x48]
LEA RSI,[RBP + -0x60]
CALL 0x00180c70
LEA R13,[RBX + 0x10]
MOV qword ptr [RBX],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001899ad
MOV qword ptr [RBX],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x001899b5
LAB_001899ad:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
LAB_001899b5:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RBP + -0x48]
LEA RAX,[RBP + -0x38]
CMP RDI,RAX
JZ 0x001899e5
MOV RSI,qword ptr [RBP + -0x38]
INC RSI
CALL 0x0017f6e0
LAB_001899e5:
TEST R15,R15
JZ 0x00189ad8
LAB_001899ee:
LEA RSI,[0x59387b]
MOV RDI,RBX
CALL 0x00180c70
MOV RDI,RBX
MOV RSI,R15
CALL 0x00180c70
TEST R14D,R14D
JZ 0x00189ad8
LEA RSI,[0x59387b]
MOV RDI,RBX
CALL 0x00180c70
MOV R15D,R14D
NEG R15D
CMOVS R15D,R14D
MOV R12D,0x1
CMP R15D,0xa
JC 0x00189a80
MOV R12D,0x4
MOV EAX,0xd1b71759
MOV ECX,R15D
LAB_00189a44:
CMP ECX,0x63
JBE 0x00189a77
CMP ECX,0x3e7
JBE 0x00189a7d
CMP ECX,0x2710
JC 0x00189a80
MOV EDX,ECX
IMUL RDX,RAX
SHR RDX,0x2d
ADD R12D,0x4
CMP ECX,0x1869f
MOV ECX,EDX
JA 0x00189a44
ADD R12D,-0x3
JMP 0x00189a80
LAB_00189a77:
ADD R12D,-0x2
JMP 0x00189a80
LAB_00189a7d:
DEC R12D
LAB_00189a80:
SHR R14D,0x1f
LEA ESI,[R12 + R14*0x1]
LEA RDI,[RBP + -0x48]
LEA RAX,[RBP + -0x38]
MOV qword ptr [RDI],RAX
LAB_00189a93:
MOV EDX,0x2d
CALL 0x0017fa40
MOV EDI,R14D
ADD RDI,qword ptr [RBP + -0x48]
MOV ESI,R12D
MOV EDX,R15D
CALL 0x001800a0
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x40]
LAB_00189ab7:
MOV RDI,RBX
CALL 0x0017e560
MOV RDI,qword ptr [RBP + -0x48]
LEA RAX,[RBP + -0x38]
CMP RDI,RAX
JZ 0x00189ad8
MOV RSI,qword ptr [RBP + -0x38]
INC RSI
CALL 0x0017f6e0
LAB_00189ad8:
LEA RSI,[0x4e471e]
MOV RDI,RBX
CALL 0x00180c70
LAB_00189ae7:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* generateCachePath(std::__cxx11::string const&, unsigned long, char const*, VkShaderStageFlagBits)
*/
long * generateCachePath(long *param_1,long *param_2,int8 param_3,long param_4,uint param_5)
{
long lVar1;
uint uVar2;
int8 *puVar3;
uint uVar4;
long *plVar5;
ulong uVar6;
uint uVar7;
uint uVar8;
char local_68 [24];
long *local_50 [2];
long local_40 [2];
sprintf(local_68,"%016llx");
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char*>(local_50,*param_2,param_2[1] + *param_2);
/* try { // try from 0018996f to 0018997d has its CatchHandler @ 00189b1b */
std::__cxx11::string::append((char *)local_50);
/* try { // try from 0018997e to 0018998a has its CatchHandler @ 00189b19 */
puVar3 = (int8 *)std::__cxx11::string::append((char *)local_50);
*param_1 = (long)(param_1 + 2);
plVar5 = puVar3 + 2;
if ((long *)*puVar3 == plVar5) {
lVar1 = puVar3[3];
param_1[2] = *plVar5;
param_1[3] = lVar1;
}
else {
*param_1 = (long)*puVar3;
param_1[2] = *plVar5;
}
param_1[1] = puVar3[1];
*puVar3 = plVar5;
puVar3[1] = 0;
*(int1 *)(puVar3 + 2) = 0;
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (param_4 != 0) {
/* try { // try from 001899ee to 00189a1f has its CatchHandler @ 00189b31 */
std::__cxx11::string::append((char *)param_1);
std::__cxx11::string::append((char *)param_1);
if (param_5 != 0) {
std::__cxx11::string::append((char *)param_1);
uVar8 = -param_5;
if (0 < (int)param_5) {
uVar8 = param_5;
}
uVar7 = 1;
if (9 < uVar8) {
uVar6 = (ulong)uVar8;
uVar2 = 4;
do {
uVar7 = uVar2;
uVar4 = (uint)uVar6;
if (uVar4 < 100) {
uVar7 = uVar7 - 2;
goto LAB_00189a80;
}
if (uVar4 < 1000) {
uVar7 = uVar7 - 1;
goto LAB_00189a80;
}
if (uVar4 < 10000) goto LAB_00189a80;
uVar6 = uVar6 / 10000;
uVar2 = uVar7 + 4;
} while (99999 < uVar4);
uVar7 = uVar7 + 1;
}
LAB_00189a80:
local_50[0] = local_40;
/* try { // try from 00189a93 to 00189a9c has its CatchHandler @ 00189b17 */
std::__cxx11::string::_M_construct((ulong)local_50,(char)uVar7 - (char)((int)param_5 >> 0x1f))
;
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((ulong)(param_5 >> 0x1f) + (long)local_50[0]),uVar7,uVar8);
/* try { // try from 00189ab7 to 00189abe has its CatchHandler @ 00189af9 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_50[0]);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
}
}
/* try { // try from 00189ad8 to 00189ae6 has its CatchHandler @ 00189b31 */
std::__cxx11::string::append((char *)param_1);
return param_1;
}
| |
41,774 | prev_record_reads(POSITION const*, unsigned int, unsigned long long) | eloqsql/sql/sql_select.cc | double
prev_record_reads(const POSITION *positions, uint idx, table_map found_ref)
{
double found=1.0;
const POSITION *pos_end= positions - 1;
for (const POSITION *pos= positions + idx - 1; pos != pos_end; pos--)
{
if (pos->table->table->map & found_ref)
{
found_ref|= pos->ref_depend_map;
/*
For the case of "t1 LEFT JOIN t2 ON ..." where t2 is a const table
with no matching row we will get position[t2].records_read==0.
Actually the size of output is one null-complemented row, therefore
we will use value of 1 whenever we get records_read==0.
Note
- the above case can't occur if inner part of outer join has more
than one table: table with no matches will not be marked as const.
- Ideally we should add 1 to records_read for every possible null-
complemented row. We're not doing it because: 1. it will require
non-trivial code and add overhead. 2. The value of records_read
is an inprecise estimate and adding 1 (or, in the worst case,
#max_nested_outer_joins=64-1) will not make it any more precise.
*/
if (pos->records_read)
{
found= COST_MULT(found, pos->records_read);
found*= pos->cond_selectivity;
}
}
}
return found;
} | O0 | cpp | prev_record_reads(POSITION const*, unsigned int, unsigned long long):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movsd 0x7f3501(%rip), %xmm0 # 0xe0c778
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $-0x138, %rax # imm = 0xFEC8
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
imulq $0x138, %rcx, %rcx # imm = 0x138
addq %rcx, %rax
addq $-0x138, %rax # imm = 0xFEC8
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x619368
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x270(%rax), %rax
andq -0x18(%rbp), %rax
cmpq $0x0, %rax
je 0x619353
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movsd 0x8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6192f8
jp 0x6192f8
jmp 0x619351
movq -0x30(%rbp), %rax
movsd 0x7f34ac(%rip), %xmm0 # 0xe0c7b0
divsd 0x8(%rax), %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0x619325
movsd -0x20(%rbp), %xmm0
movq -0x30(%rbp), %rax
mulsd 0x8(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0x619334
movsd 0x7f3483(%rip), %xmm0 # 0xe0c7b0
movsd %xmm0, -0x38(%rbp)
jmp 0x619334
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x30(%rbp), %rax
movsd 0x10(%rax), %xmm0
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x619353
jmp 0x619355
movq -0x30(%rbp), %rax
addq $-0x138, %rax # imm = 0xFEC8
movq %rax, -0x30(%rbp)
jmp 0x6192a5
movsd -0x20(%rbp), %xmm0
popq %rbp
retq
nop
| _Z17prev_record_readsPK8POSITIONjy:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
movsd xmm0, cs:dbl_E0C778
movsd [rbp+var_20], xmm0
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFEC8h
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
imul rcx, 138h
add rax, rcx
add rax, 0FFFFFFFFFFFFFEC8h
mov [rbp+var_30], rax
loc_6192A5:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_28]
jz loc_619368
mov rax, [rbp+var_30]
mov rax, [rax]
mov rax, [rax]
mov rax, [rax+270h]
and rax, [rbp+var_18]
cmp rax, 0
jz loc_619353
mov rax, [rbp+var_30]
mov rax, [rax+40h]
or rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rax, [rbp+var_30]
movsd xmm0, qword ptr [rax+8]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_6192F8
jp short loc_6192F8
jmp short loc_619351
loc_6192F8:
mov rax, [rbp+var_30]
movsd xmm0, cs:qword_E0C7B0
divsd xmm0, qword ptr [rax+8]
ucomisd xmm0, [rbp+var_20]
jbe short loc_619325
movsd xmm0, [rbp+var_20]
mov rax, [rbp+var_30]
mulsd xmm0, qword ptr [rax+8]
movsd [rbp+var_38], xmm0
jmp short loc_619334
loc_619325:
movsd xmm0, cs:qword_E0C7B0
movsd [rbp+var_38], xmm0
jmp short $+2
loc_619334:
movsd xmm0, [rbp+var_38]
movsd [rbp+var_20], xmm0
mov rax, [rbp+var_30]
movsd xmm0, qword ptr [rax+10h]
mulsd xmm0, [rbp+var_20]
movsd [rbp+var_20], xmm0
loc_619351:
jmp short $+2
loc_619353:
jmp short $+2
loc_619355:
mov rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFEC8h
mov [rbp+var_30], rax
jmp loc_6192A5
loc_619368:
movsd xmm0, [rbp+var_20]
pop rbp
retn
| double prev_record_reads(const POSITION *a1, unsigned int a2, long long a3)
{
double v4; // [rsp+0h] [rbp-38h]
const POSITION *i; // [rsp+8h] [rbp-30h]
double v6; // [rsp+18h] [rbp-20h]
v6 = 1.0;
for ( i = (const POSITION *)((char *)a1 + 312 * a2 - 312);
i != (const POSITION *)((char *)a1 - 312);
i = (const POSITION *)((char *)i - 312) )
{
if ( (a3 & *(_QWORD *)(**(_QWORD **)i + 624LL)) != 0 )
{
a3 |= *((_QWORD *)i + 8);
if ( *((double *)i + 1) != 0.0 )
{
if ( 1.797693134862315e308 / *((double *)i + 1) <= v6 )
v4 = 1.797693134862315e308;
else
v4 = v6 * *((double *)i + 1);
v6 = *((double *)i + 2) * v4;
}
}
}
return v6;
}
| set_x509_issuer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
LEA RSI,[0xe83552]
CALL 0x0061a3d0
AND AL,0x1
MOVZX EAX,AL
ADD RSP,0x20
POP RBP
RET
|
/* User_table_json::set_x509_issuer(char const*, unsigned long) const */
byte __thiscall User_table_json::set_x509_issuer(User_table_json *this,char *param_1,ulong param_2)
{
byte bVar1;
bVar1 = set_str_value(this,"x509_issuer",param_1,param_2);
return bVar1 & 1;
}
| |
41,775 | minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | llama.cpp/common/minja/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!context->contains(name)) {
return Value();
}
return context->at(name);
} | O3 | cpp | minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %r12
addq $0x20, %r14
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0xbb1fe
movq (%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
callq *0x20(%rax)
movl %eax, %ebp
leaq 0x48(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x84452
movq %r12, %rdi
callq 0x88b6c
leaq 0x40(%rsp), %rdi
callq 0x6fad6
leaq 0x30(%rsp), %rdi
callq 0x6fad6
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x6fad6
movq -0x10(%r12), %rdi
testq %rdi, %rdi
je 0xedb6b
movq 0x73452(%rip), %rax # 0x160f98
cmpb $0x0, (%rax)
je 0xedb56
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xedb60
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xedb6b
movq (%rdi), %rax
callq *0x18(%rax)
testb %bpl, %bpl
je 0xedbf6
movq (%r15), %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xbb1fe
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x18(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0xbcf88
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x84452
movq %r14, %rdi
callq 0x88b6c
leaq 0x40(%rsp), %rdi
callq 0x6fad6
leaq 0x30(%rsp), %rdi
callq 0x6fad6
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x6fad6
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0xedc49
movq 0x733b2(%rip), %rax # 0x160f98
cmpb $0x0, (%rax)
je 0xedc34
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xedc3e
leaq 0x40(%rbx), %r14
movq $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movb $0x0, 0x40(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x84452
movq %r14, %rdi
movl $0x1, %esi
callq 0x84452
jmp 0xedc49
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xedc49
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xedc5d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb5494
movq %rbx, %rdi
callq 0x20ad0
| _ZNK5minja12VariableExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov r12, [rdx]
add r14, 20h ; ' '
lea r13, [rsp+88h+var_80]
mov rdi, r13
mov rsi, r14
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rax, [r12]
mov rdi, r12
mov rsi, r13
call qword ptr [rax+20h]
mov ebp, eax
lea r12, [rsp+88h+var_40]
mov rdi, r12
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r12, [rsp+88h+var_68]
mov rdi, r12
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r12-10h]
test rdi, rdi
jz short loc_EDB6B
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_EDB56
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_EDB60
loc_EDB56:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_EDB60:
cmp eax, 1
jnz short loc_EDB6B
mov rax, [rdi]
call qword ptr [rax+18h]
loc_EDB6B:
test bpl, bpl
jz loc_EDBF6
mov r15, [r15]
lea r12, [rsp+88h+var_80]
mov rdi, r12
mov rsi, r14
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rax, [r15]
mov rdi, r15
mov rsi, r12
call qword ptr [rax+18h]
mov rdi, rbx; this
mov rsi, rax; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
lea r14, [rsp+88h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r14, [rsp+88h+var_68]
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r14-10h]
test rdi, rdi
jz short loc_EDC49
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_EDC34
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_EDC3E
loc_EDBF6:
lea r14, [rbx+40h]
mov qword ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov byte ptr [rbx+40h], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_EDC49
loc_EDC34:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_EDC3E:
cmp eax, 1
jnz short loc_EDC49
mov rax, [rdi]
call qword ptr [rax+18h]
loc_EDC49:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_EDC5D:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::VariableExpr::do_evaluate(minja::Value *this, long long a2, long long *a3)
{
long long v5; // r12
char v6; // bp
long long v7; // rdi
signed __int32 v8; // eax
long long v9; // r15
const minja::Value *v10; // rax
long long v11; // rdi
signed __int32 v12; // eax
_BYTE v14[8]; // [rsp+8h] [rbp-80h] BYREF
long long v15; // [rsp+10h] [rbp-78h]
volatile signed __int32 *v16[2]; // [rsp+20h] [rbp-68h] BYREF
volatile signed __int32 *v17[2]; // [rsp+30h] [rbp-58h] BYREF
volatile signed __int32 *v18; // [rsp+40h] [rbp-48h] BYREF
char v19[64]; // [rsp+48h] [rbp-40h] BYREF
v5 = *a3;
minja::Value::Value((long long)v14, a2 + 32);
v6 = (*(long long ( **)(long long, _BYTE *))(*(_QWORD *)v5 + 32LL))(v5, v14);
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(v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v17);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v16);
v7 = v15;
if ( v15 )
{
if ( _libc_single_threaded )
{
v8 = *(_DWORD *)(v15 + 12);
*(_DWORD *)(v15 + 12) = v8 - 1;
}
else
{
v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 + 12), 0xFFFFFFFF);
}
if ( v8 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL);
}
if ( v6 )
{
v9 = *a3;
minja::Value::Value((long long)v14, a2 + 32);
v10 = (const minja::Value *)(*(long long ( **)(long long, _BYTE *))(*(_QWORD *)v9 + 24LL))(v9, v14);
minja::Value::Value(this, v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v17);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v16);
v11 = v15;
if ( v15 )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(v15 + 12);
*(_DWORD *)(v15 + 12) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v15 + 12), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
}
else
{
*((_QWORD *)this + 9) = 0LL;
*(_OWORD *)this = 0LL;
*((_OWORD *)this + 1) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_BYTE *)this + 64) = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
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 *)this + 64);
}
return this;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RDX]
ADD R14,0x20
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,R14
CALL 0x001bb1fe
MOV RAX,qword ptr [R12]
LAB_001edaf2:
MOV RDI,R12
MOV RSI,R13
CALL qword ptr [RAX + 0x20]
LAB_001edafb:
MOV EBP,EAX
LEA R12,[RSP + 0x48]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00184452
MOV RDI,R12
CALL 0x00188b6c
LEA RDI,[RSP + 0x40]
CALL 0x0016fad6
LEA RDI,[RSP + 0x30]
CALL 0x0016fad6
LEA R12,[RSP + 0x20]
MOV RDI,R12
CALL 0x0016fad6
MOV RDI,qword ptr [R12 + -0x10]
TEST RDI,RDI
JZ 0x001edb6b
MOV RAX,qword ptr [0x00260f98]
CMP byte ptr [RAX],0x0
JZ 0x001edb56
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001edb60
LAB_001edb56:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001edb60:
CMP EAX,0x1
JNZ 0x001edb6b
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001edb6b:
TEST BPL,BPL
JZ 0x001edbf6
MOV R15,qword ptr [R15]
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R14
CALL 0x001bb1fe
MOV RAX,qword ptr [R15]
LAB_001edb8a:
MOV RDI,R15
MOV RSI,R12
CALL qword ptr [RAX + 0x18]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001bcf88
LAB_001edb9e:
LEA R14,[RSP + 0x48]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00184452
MOV RDI,R14
CALL 0x00188b6c
LEA RDI,[RSP + 0x40]
CALL 0x0016fad6
LEA RDI,[RSP + 0x30]
CALL 0x0016fad6
LEA R14,[RSP + 0x20]
MOV RDI,R14
CALL 0x0016fad6
MOV RDI,qword ptr [R14 + -0x10]
TEST RDI,RDI
JZ 0x001edc49
MOV RAX,qword ptr [0x00260f98]
CMP byte ptr [RAX],0x0
JZ 0x001edc34
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001edc3e
LAB_001edbf6:
LEA R14,[RBX + 0x40]
MOV qword ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV byte ptr [RBX + 0x40],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00184452
MOV RDI,R14
MOV ESI,0x1
CALL 0x00184452
JMP 0x001edc49
LAB_001edc34:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001edc3e:
CMP EAX,0x1
JNZ 0x001edc49
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001edc49:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::VariableExpr::do_evaluate(shared_ptr *param_1)
{
int *piVar1;
long *plVar2;
char cVar3;
int iVar4;
Value *pVVar5;
int8 *in_RDX;
long in_RSI;
bool bVar6;
Value local_80 [8];
long *local_78;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8];
data local_40 [16];
plVar2 = (long *)*in_RDX;
Value::Value(local_80,(string *)(in_RSI + 0x20));
/* try { // try from 001edaf2 to 001edafa has its CatchHandler @ 001edc5d */
cVar3 = (**(code **)(*plVar2 + 0x20))(plVar2,local_80);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68);
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_00260f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
if (cVar3 == '\0') {
bVar6 = (bool)((char)param_1 + '@');
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x38) = 0;
param_1[0x40] = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar6);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar6);
}
else {
plVar2 = (long *)*in_RDX;
Value::Value(local_80,(string *)(in_RSI + 0x20));
/* try { // try from 001edb8a to 001edb9d has its CatchHandler @ 001edc5b */
pVVar5 = (Value *)(**(code **)(*plVar2 + 0x18))(plVar2,local_80);
Value::Value((Value *)param_1,pVVar5);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68);
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_00260f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
}
return param_1;
}
| |
41,776 | minja::Parser::parseMathPow() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseMathPow() {
auto left = parseMathPlusMinus();
if (!left) throw std::runtime_error("Expected left side of 'math pow' expression");
while (!consumeToken("**").empty()) {
auto right = parseMathPlusMinus();
if (!right) throw std::runtime_error("Expected right side of 'math pow' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul);
}
return left;
} | O2 | cpp | minja::Parser::parseMathPow():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x655de
cmpq $0x0, (%rbx)
je 0x65523
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r12
leaq 0x38(%rsp), %r13
movq %r14, %rdi
leaq 0x4fb53(%rip), %rsi # 0xb4f95
movq %r12, %rdx
callq 0x27d88
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
pushq $0x1
popq %rcx
callq 0x62048
movq 0x40(%rsp), %rbp
movq %r13, %rdi
callq 0x241c8
movq %r14, %rdi
callq 0x241c8
testq %rbp, %rbp
je 0x654df
movq %r14, %rdi
movq %r15, %rsi
callq 0x655de
cmpq $0x0, 0x8(%rsp)
je 0x654f1
movq %r13, %rdi
movq %r15, %rsi
callq 0x61618
movl $0x4, 0x4(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0x4(%rsp), %r8
callq 0x655b7
movq %rbx, %rdi
movq %r12, %rsi
callq 0x72420
leaq 0x30(%rsp), %rdi
callq 0x50bd8
leaq 0x40(%rsp), %rdi
callq 0x50bd8
leaq 0x10(%rsp), %rdi
callq 0x50bd8
jmp 0x65438
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r15
leaq 0x4fa95(%rip), %rsi # 0xb4f98
movq %rax, %rdi
callq 0x23330
movq 0x99ad6(%rip), %rsi # 0xfefe8
movq 0x99a2f(%rip), %rdx # 0xfef48
movq %r15, %rdi
callq 0x23f00
jmp 0x65553
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r15
leaq 0x4fa34(%rip), %rsi # 0xb4f69
movq %rax, %rdi
callq 0x23330
movq 0x99aa4(%rip), %rsi # 0xfefe8
movq 0x999fd(%rip), %rdx # 0xfef48
movq %r15, %rdi
callq 0x23f00
jmp 0x65591
movq %rax, %r14
movq %r15, %rdi
callq 0x236a0
jmp 0x655a3
jmp 0x65571
movq %rax, %r14
movq %r15, %rdi
callq 0x236a0
jmp 0x65583
movq %rax, %r14
jmp 0x65583
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x50bd8
leaq 0x10(%rsp), %rdi
callq 0x50bd8
jmp 0x655a3
jmp 0x65591
movq %rax, %r14
jmp 0x655a3
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x241c8
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x50bd8
movq %r14, %rdi
callq 0x23f80
| _ZN5minja6Parser12parseMathPowEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rsi
mov rbx, rdi
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp qword ptr [rbx], 0
jz loc_65523
lea r14, [rsp+88h+var_80]
lea r12, [rsp+88h+var_60]
lea r13, [rsp+88h+var_50]
loc_65438:
mov rdi, r14
lea rsi, asc_B4F95; "**"
mov rdx, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, r13
mov rsi, r15
mov rdx, r14
push 1
pop rcx
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rbp, [rsp+88h+var_48]
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbp, rbp
jz short loc_654DF
mov rdi, r14; this
mov rsi, r15
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp [rsp+88h+var_80], 0
jz short loc_654F1
mov rdi, r13; this
mov rsi, r15
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
mov [rsp+88h+var_84], 4
mov rdi, r12
mov rsi, r13
mov rdx, rbx
mov rcx, r14
lea r8, [rsp+88h+var_84]
call _ZSt11make_sharedIN5minja12BinaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEES5_NS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&)
mov rdi, rbx
mov rsi, r12
call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp loc_65438
loc_654DF:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_654F1:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_65553
loc_65523:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_65553:
jmp short loc_65591
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_655A3
jmp short loc_65571
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_65583
loc_65571:
mov r14, rax
jmp short loc_65583
mov r14, rax
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_65583:
lea rdi, [rsp+88h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_655A3
jmp short $+2
loc_65591:
mov r14, rax
jmp short loc_655A3
mov r14, rax
lea rdi, [rsp+88h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_655A3:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathPow(minja::Parser *this, _QWORD *a2)
{
long long v2; // rbp
std::runtime_error *v4; // r15
std::runtime_error *exception; // r15
int v6; // [rsp+4h] [rbp-84h] BYREF
long long v7; // [rsp+8h] [rbp-80h] BYREF
_QWORD v8[3]; // [rsp+10h] [rbp-78h] BYREF
_BYTE v9[8]; // [rsp+28h] [rbp-60h] BYREF
long long v10; // [rsp+30h] [rbp-58h] BYREF
long long v11; // [rsp+38h] [rbp-50h] BYREF
_QWORD v12[9]; // [rsp+40h] [rbp-48h] BYREF
minja::Parser::parseMathPlusMinus(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
while ( 1 )
{
std::string::basic_string<std::allocator<char>>(&v7, (long long)"**");
minja::Parser::consumeToken(&v11, (long long)a2, &v7, 1u);
v2 = v12[0];
std::string::~string(&v11);
std::string::~string(&v7);
if ( !v2 )
break;
minja::Parser::parseMathPlusMinus((minja::Parser *)&v7);
if ( !v7 )
{
v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v4, "Expected right side of 'math pow' expression");
__cxa_throw(
v4,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::get_location((minja::Parser *)&v11, a2);
v6 = 4;
std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(
v9,
&v11,
this,
&v7,
&v6);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v9);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8);
}
return this;
}
| parseMathPow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RSI
MOV RBX,RDI
CALL 0x001655de
CMP qword ptr [RBX],0x0
JZ 0x00165523
LEA R14,[RSP + 0x8]
LEA R12,[RSP + 0x28]
LEA R13,[RSP + 0x38]
LAB_00165438:
MOV RDI,R14
LEA RSI,[0x1b4f95]
MOV RDX,R12
CALL 0x00127d88
LAB_0016544a:
MOV RDI,R13
MOV RSI,R15
MOV RDX,R14
PUSH 0x1
POP RCX
CALL 0x00162048
MOV RBP,qword ptr [RSP + 0x40]
MOV RDI,R13
CALL 0x001241c8
MOV RDI,R14
CALL 0x001241c8
TEST RBP,RBP
JZ 0x001654df
LAB_00165475:
MOV RDI,R14
MOV RSI,R15
CALL 0x001655de
CMP qword ptr [RSP + 0x8],0x0
JZ 0x001654f1
LAB_00165488:
MOV RDI,R13
MOV RSI,R15
CALL 0x00161618
MOV dword ptr [RSP + 0x4],0x4
LAB_0016549b:
MOV RDI,R12
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R14
LEA R8,[RSP + 0x4]
CALL 0x001655b7
LAB_001654b1:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00172420
LEA RDI,[RSP + 0x30]
CALL 0x00150bd8
LEA RDI,[RSP + 0x40]
CALL 0x00150bd8
LEA RDI,[RSP + 0x10]
CALL 0x00150bd8
JMP 0x00165438
LAB_001654df:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001654f1:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R15,RAX
LAB_001654fc:
LEA RSI,[0x1b4f98]
MOV RDI,RAX
CALL 0x00123330
LAB_0016550b:
MOV RSI,qword ptr [0x001fefe8]
MOV RDX,qword ptr [0x001fef48]
MOV RDI,R15
CALL 0x00123f00
LAB_00165523:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R15,RAX
LAB_0016552e:
LEA RSI,[0x1b4f69]
MOV RDI,RAX
CALL 0x00123330
LAB_0016553d:
MOV RSI,qword ptr [0x001fefe8]
MOV RDX,qword ptr [0x001fef48]
MOV RDI,R15
CALL 0x00123f00
|
/* minja::Parser::parseMathPow() */
void minja::Parser::parseMathPow(void)
{
long lVar1;
runtime_error *prVar2;
__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI;
long local_80;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [24];
Location local_60 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [8];
string local_50 [8];
long local_48 [3];
parseMathPlusMinus();
if (*(long *)in_RDI == 0) {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016552e to 0016553c has its CatchHandler @ 00165555 */
std::runtime_error::runtime_error(prVar2,"Expected left side of \'math pow\' expression");
/* try { // try from 0016553d to 00165552 has its CatchHandler @ 00165553 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48);
}
while( true ) {
/* try { // try from 00165438 to 00165449 has its CatchHandler @ 00165591 */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_80,"**",(allocator *)local_60);
/* try { // try from 0016544a to 0016545a has its CatchHandler @ 00165596 */
consumeToken(local_50);
lVar1 = local_48[0];
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)&local_80);
if (lVar1 == 0) {
return;
}
/* try { // try from 00165475 to 0016547f has its CatchHandler @ 0016558f */
parseMathPlusMinus();
if (local_80 == 0) break;
/* try { // try from 00165488 to 00165492 has its CatchHandler @ 00165571 */
get_location();
/* try { // try from 0016549b to 001654b0 has its CatchHandler @ 00165576 */
std::
make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>
(local_60,local_50,in_RDI,(Op *)&local_80);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=
(in_RDI,(__shared_ptr *)local_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78);
}
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001654fc to 0016550a has its CatchHandler @ 00165564 */
std::runtime_error::runtime_error(prVar2,"Expected right side of \'math pow\' expression");
/* try { // try from 0016550b to 00165520 has its CatchHandler @ 00165562 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48);
}
| |
41,777 | my_wc_to_printable_ex | eloqsql/strings/ctype.c | int
my_wc_to_printable_ex(CHARSET_INFO *cs, my_wc_t wc,
uchar *str, uchar *end,
uint bs, uint bslen, uint diglen)
{
uchar *str0;
uint i, length;
uchar tmp[MY_CS_PRINTABLE_CHAR_LENGTH * MY_CS_MBMAXLEN];
if (my_is_printable(wc))
{
int mblen= my_ci_wc_mb(cs, wc, str, end);
if (mblen > 0)
return mblen;
}
if (str + my_printable_length(bslen, diglen) > end)
return MY_CS_TOOSMALLN(my_printable_length(bslen, diglen));
if ((cs->state & MY_CS_NONASCII) == 0)
return to_printable_8bit(str, wc, bs);
length= to_printable_8bit(tmp, wc, bs);
str0= str;
for (i= 0; i < length; i++)
{
uint expected_length= i == 0 ? bslen : diglen;
if (my_ci_wc_mb(cs, tmp[i], str, end) != (int) expected_length)
{
DBUG_ASSERT(0);
return MY_CS_ILSEQ;
}
str+= expected_length;
}
return (int) (str - str0);
} | O0 | c | my_wc_to_printable_ex:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl 0x10(%rbp), %eax
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq %rdx, -0x50(%rbp)
movq %rcx, -0x58(%rbp)
movl %r8d, -0x5c(%rbp)
movl %r9d, -0x60(%rbp)
movq -0x48(%rbp), %rdi
callq 0x6fc70
cmpb $0x0, %al
je 0x6fb27
movq -0x40(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq *%rax
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x74(%rbp)
jle 0x6fb25
movl -0x74(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x6fc3f
jmp 0x6fb27
movq -0x50(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x60(%rbp), %edi
movl 0x10(%rbp), %esi
callq 0x6fcf0
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0x58(%rbp), %rax
jbe 0x6fb67
movl -0x60(%rbp), %edi
movl 0x10(%rbp), %esi
callq 0x6fcf0
movl %eax, %ecx
movl $0xffffff9c, %eax # imm = 0xFFFFFF9C
subl %ecx, %eax
movl %eax, -0x34(%rbp)
jmp 0x6fc3f
movq -0x40(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
jne 0x6fb90
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x5c(%rbp), %edx
callq 0x6fd10
movl %eax, -0x34(%rbp)
jmp 0x6fc3f
leaq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x5c(%rbp), %edx
callq 0x6fd10
movl %eax, -0x70(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x70(%rbp), %eax
jae 0x6fc31
cmpl $0x0, -0x6c(%rbp)
jne 0x6fbcb
movl -0x60(%rbp), %eax
movl %eax, -0x84(%rbp)
jmp 0x6fbd4
movl 0x10(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x78(%rbp)
movq -0x40(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x40(%rbp), %rdi
movl -0x6c(%rbp), %ecx
movzbl -0x30(%rbp,%rcx), %ecx
movl %ecx, %esi
movq -0x50(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq *%rax
cmpl -0x78(%rbp), %eax
je 0x6fc16
jmp 0x6fc0b
jmp 0x6fc0d
movl $0x0, -0x34(%rbp)
jmp 0x6fc3f
movl -0x78(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x6fbb2
movq -0x50(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x88(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6fc69
movl -0x88(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
callq 0x24370
nop
| my_wc_to_printable_ex:
push rbp
mov rbp, rsp
sub rsp, 90h
mov eax, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_40], rdi
mov [rbp+var_48], rsi
mov [rbp+var_50], rdx
mov [rbp+var_58], rcx
mov [rbp+var_5C], r8d
mov [rbp+var_60], r9d
mov rdi, [rbp+var_48]
call my_is_printable
cmp al, 0
jz short loc_6FB27
mov rax, [rbp+var_40]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_50]
mov rcx, [rbp+var_58]
call rax
mov [rbp+var_74], eax
cmp [rbp+var_74], 0
jle short loc_6FB25
mov eax, [rbp+var_74]
mov [rbp+var_34], eax
jmp loc_6FC3F
loc_6FB25:
jmp short $+2
loc_6FB27:
mov rax, [rbp+var_50]
mov [rbp+var_80], rax
mov edi, [rbp+var_60]
mov esi, [rbp+arg_0]
call my_printable_length
mov ecx, eax
mov rax, [rbp+var_80]
mov ecx, ecx
add rax, rcx
cmp rax, [rbp+var_58]
jbe short loc_6FB67
mov edi, [rbp+var_60]
mov esi, [rbp+arg_0]
call my_printable_length
mov ecx, eax
mov eax, 0FFFFFF9Ch
sub eax, ecx
mov [rbp+var_34], eax
jmp loc_6FC3F
loc_6FB67:
mov rax, [rbp+var_40]
mov eax, [rax+0Ch]
and eax, 2000h
cmp eax, 0
jnz short loc_6FB90
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_48]
mov edx, [rbp+var_5C]
call to_printable_8bit
mov [rbp+var_34], eax
jmp loc_6FC3F
loc_6FB90:
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_48]
mov edx, [rbp+var_5C]
call to_printable_8bit
mov [rbp+var_70], eax
mov rax, [rbp+var_50]
mov [rbp+var_68], rax
mov [rbp+var_6C], 0
loc_6FBB2:
mov eax, [rbp+var_6C]
cmp eax, [rbp+var_70]
jnb short loc_6FC31
cmp [rbp+var_6C], 0
jnz short loc_6FBCB
mov eax, [rbp+var_60]
mov [rbp+var_84], eax
jmp short loc_6FBD4
loc_6FBCB:
mov eax, [rbp+arg_0]
mov [rbp+var_84], eax
loc_6FBD4:
mov eax, [rbp+var_84]
mov [rbp+var_78], eax
mov rax, [rbp+var_40]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov rdi, [rbp+var_40]
mov ecx, [rbp+var_6C]
movzx ecx, [rbp+rcx+var_30]
mov esi, ecx
mov rdx, [rbp+var_50]
mov rcx, [rbp+var_58]
call rax
cmp eax, [rbp+var_78]
jz short loc_6FC16
jmp short $+2
loc_6FC0B:
jmp short $+2
loc_6FC0D:
mov [rbp+var_34], 0
jmp short loc_6FC3F
loc_6FC16:
mov ecx, [rbp+var_78]
mov rax, [rbp+var_50]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov eax, [rbp+var_6C]
add eax, 1
mov [rbp+var_6C], eax
jmp short loc_6FBB2
loc_6FC31:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_68]
sub rax, rcx
mov [rbp+var_34], eax
loc_6FC3F:
mov eax, [rbp+var_34]
mov [rbp+var_88], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6FC69
mov eax, [rbp+var_88]
add rsp, 90h
pop rbp
retn
loc_6FC69:
call ___stack_chk_fail
| long long my_wc_to_printable_ex(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
unsigned int a5,
unsigned int a6,
unsigned int a7)
{
unsigned int v8; // [rsp+Ch] [rbp-84h]
int v9; // [rsp+1Ch] [rbp-74h]
unsigned int v10; // [rsp+20h] [rbp-70h]
unsigned int i; // [rsp+24h] [rbp-6Ch]
int v12; // [rsp+28h] [rbp-68h]
_BYTE v18[40]; // [rsp+60h] [rbp-30h] BYREF
unsigned long long v19; // [rsp+88h] [rbp-8h]
v19 = __readfsqword(0x28u);
if ( (unsigned __int8)my_is_printable(a2)
&& (v9 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a2,
a3,
a4),
v9 > 0) )
{
return (unsigned int)v9;
}
else if ( (unsigned long long)(unsigned int)my_printable_length(a6, a7) + a3 <= a4 )
{
if ( (*(_DWORD *)(a1 + 12) & 0x2000) != 0 )
{
v10 = to_printable_8bit(v18, a2, a5);
v12 = a3;
for ( i = 0; i < v10; ++i )
{
if ( i )
v8 = a7;
else
v8 = a6;
if ( (*(unsigned int ( **)(long long, _QWORD, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
(unsigned __int8)v18[i],
a3,
a4) != v8 )
return 0;
a3 += v8;
}
return (unsigned int)(a3 - v12);
}
else
{
return (unsigned int)to_printable_8bit(a3, a2, a5);
}
}
else
{
return (unsigned int)(-100 - my_printable_length(a6, a7));
}
}
| my_wc_to_printable_ex:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV EAX,dword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x40],RDI
MOV qword ptr [RBP + -0x48],RSI
MOV qword ptr [RBP + -0x50],RDX
MOV qword ptr [RBP + -0x58],RCX
MOV dword ptr [RBP + -0x5c],R8D
MOV dword ptr [RBP + -0x60],R9D
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0016fc70
CMP AL,0x0
JZ 0x0016fb27
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x58]
CALL RAX
MOV dword ptr [RBP + -0x74],EAX
CMP dword ptr [RBP + -0x74],0x0
JLE 0x0016fb25
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0016fc3f
LAB_0016fb25:
JMP 0x0016fb27
LAB_0016fb27:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x80],RAX
MOV EDI,dword ptr [RBP + -0x60]
MOV ESI,dword ptr [RBP + 0x10]
CALL 0x0016fcf0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x80]
MOV ECX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x58]
JBE 0x0016fb67
MOV EDI,dword ptr [RBP + -0x60]
MOV ESI,dword ptr [RBP + 0x10]
CALL 0x0016fcf0
MOV ECX,EAX
MOV EAX,0xffffff9c
SUB EAX,ECX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0016fc3f
LAB_0016fb67:
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x2000
CMP EAX,0x0
JNZ 0x0016fb90
MOV RDI,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RBP + -0x5c]
CALL 0x0016fd10
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0016fc3f
LAB_0016fb90:
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RBP + -0x5c]
CALL 0x0016fd10
MOV dword ptr [RBP + -0x70],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x68],RAX
MOV dword ptr [RBP + -0x6c],0x0
LAB_0016fbb2:
MOV EAX,dword ptr [RBP + -0x6c]
CMP EAX,dword ptr [RBP + -0x70]
JNC 0x0016fc31
CMP dword ptr [RBP + -0x6c],0x0
JNZ 0x0016fbcb
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x84],EAX
JMP 0x0016fbd4
LAB_0016fbcb:
MOV EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x84],EAX
LAB_0016fbd4:
MOV EAX,dword ptr [RBP + -0x84]
MOV dword ptr [RBP + -0x78],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x6c]
MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x30]
MOV ESI,ECX
MOV RDX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x58]
CALL RAX
CMP EAX,dword ptr [RBP + -0x78]
JZ 0x0016fc16
JMP 0x0016fc0b
LAB_0016fc0b:
JMP 0x0016fc0d
LAB_0016fc0d:
MOV dword ptr [RBP + -0x34],0x0
JMP 0x0016fc3f
LAB_0016fc16:
MOV ECX,dword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x6c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x0016fbb2
LAB_0016fc31:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x68]
SUB RAX,RCX
MOV dword ptr [RBP + -0x34],EAX
LAB_0016fc3f:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x88],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016fc69
MOV EAX,dword ptr [RBP + -0x88]
ADD RSP,0x90
POP RBP
RET
LAB_0016fc69:
CALL 0x00124370
|
int my_wc_to_printable_ex
(long param_1,int8 param_2,long param_3,ulong param_4,int4 param_5,
uint param_6,uint param_7)
{
char cVar1;
uint uVar2;
uint uVar3;
long in_FS_OFFSET;
uint local_8c;
uint local_74;
long local_58;
int local_3c;
int1 local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
cVar1 = my_is_printable(param_2);
if ((cVar1 == '\0') ||
(local_3c = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,param_2,param_3,param_4),
local_3c < 1)) {
uVar2 = my_printable_length(param_6,param_7);
if (param_4 < param_3 + (ulong)uVar2) {
local_3c = my_printable_length(param_6,param_7);
local_3c = -100 - local_3c;
}
else if ((*(uint *)(param_1 + 0xc) & 0x2000) == 0) {
local_3c = to_printable_8bit(param_3,param_2,param_5);
}
else {
uVar2 = to_printable_8bit(local_38,param_2,param_5);
local_58 = param_3;
for (local_74 = 0; local_74 < uVar2; local_74 = local_74 + 1) {
local_8c = param_6;
if (local_74 != 0) {
local_8c = param_7;
}
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,local_38[local_74],local_58,param_4);
if (uVar3 != local_8c) {
local_3c = 0;
goto LAB_0016fc3f;
}
local_58 = local_58 + (ulong)local_8c;
}
local_3c = (int)local_58 - (int)param_3;
}
}
LAB_0016fc3f:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_3c;
}
| |
41,778 | my_wc_to_printable_ex | eloqsql/strings/ctype.c | int
my_wc_to_printable_ex(CHARSET_INFO *cs, my_wc_t wc,
uchar *str, uchar *end,
uint bs, uint bslen, uint diglen)
{
uchar *str0;
uint i, length;
uchar tmp[MY_CS_PRINTABLE_CHAR_LENGTH * MY_CS_MBMAXLEN];
if (my_is_printable(wc))
{
int mblen= my_ci_wc_mb(cs, wc, str, end);
if (mblen > 0)
return mblen;
}
if (str + my_printable_length(bslen, diglen) > end)
return MY_CS_TOOSMALLN(my_printable_length(bslen, diglen));
if ((cs->state & MY_CS_NONASCII) == 0)
return to_printable_8bit(str, wc, bs);
length= to_printable_8bit(tmp, wc, bs);
str0= str;
for (i= 0; i < length; i++)
{
uint expected_length= i == 0 ? bslen : diglen;
if (my_ci_wc_mb(cs, tmp[i], str, end) != (int) expected_length)
{
DBUG_ASSERT(0);
return MY_CS_ILSEQ;
}
str+= expected_length;
}
return (int) (str - str0);
} | O3 | c | my_wc_to_printable_ex:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, -0x60(%rbp)
movl %r8d, -0x58(%rbp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x20(%rsi), %rax
cmpq $0x5f, %rax
jae 0x5af4f
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *0x30(%rax)
movl %eax, %ebx
testl %eax, %eax
jg 0x5b072
jmp 0x5af80
cmpq $0x9f, %r13
ja 0x5af6f
cmpb $0xa, %r13b
je 0x5af2c
movzbl %r13b, %eax
cmpl $0xd, %eax
je 0x5af2c
cmpq $0x9, %r13
je 0x5af2c
jmp 0x5af80
movq %r13, %rax
andq $-0x800, %rax # imm = 0xF800
cmpq $0xd800, %rax # imm = 0xD800
jne 0x5af2c
movl 0x10(%rbp), %ecx
movq -0x60(%rbp), %rax
leal (%rax,%rcx,4), %eax
leaq (%r15,%rax), %rcx
cmpq %r14, %rcx
jbe 0x5af9f
movl $0xffffff9c, %ebx # imm = 0xFFFFFF9C
subl %eax, %ebx
jmp 0x5b072
movl %r13d, %eax
shrl $0xc, %eax
andl $0xf, %eax
movl %r13d, %ecx
shrl $0x8, %ecx
andl $0xf, %ecx
movl %r13d, %edx
shrl $0x4, %edx
andl $0xf, %edx
andl $0xf, %r13d
testb $0x20, 0xd(%r12)
jne 0x5aff7
movl -0x58(%rbp), %esi
movb %sil, (%r15)
leaq 0x28424d(%rip), %rsi # 0x2df220
movb (%rsi,%rax), %al
movb %al, 0x1(%r15)
movb (%rsi,%rcx), %al
movb %al, 0x2(%r15)
movb (%rsi,%rdx), %al
movb %al, 0x3(%r15)
movb (%rsi,%r13), %al
movb %al, 0x4(%r15)
movl $0x5, %ebx
jmp 0x5b072
movq %r14, -0x68(%rbp)
movl -0x58(%rbp), %esi
movb %sil, -0x50(%rbp)
leaq 0x284217(%rip), %rsi # 0x2df220
movb (%rsi,%rax), %al
movb %al, -0x4f(%rbp)
movb (%rsi,%rcx), %al
movb %al, -0x4e(%rbp)
movb (%rsi,%rdx), %al
movb %al, -0x4d(%rbp)
movb (%rsi,%r13), %al
movb %al, -0x4c(%rbp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movq %r15, -0x58(%rbp)
movq %r15, %r13
testq %r14, %r14
movl 0x10(%rbp), %eax
movl %eax, %r15d
cmovel -0x60(%rbp), %r15d
movq 0xb8(%r12), %rax
movzbl -0x50(%rbp,%r14), %esi
movq %r12, %rdi
movq %r13, %rdx
movq -0x68(%rbp), %rcx
callq *0x30(%rax)
cmpl %r15d, %eax
jne 0x5b072
movl %r15d, %eax
addq %rax, %r13
incq %r14
cmpq $0x5, %r14
jne 0x5b02e
subl -0x58(%rbp), %r13d
movl %r13d, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5b092
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24300
| my_wc_to_printable_ex:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_60], r9
mov dword ptr [rbp+var_58], r8d
mov r14, rcx
mov r15, rdx
mov r13, rsi
mov r12, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea rax, [rsi-20h]
cmp rax, 5Fh ; '_'
jnb short loc_5AF4F
loc_5AF2C:
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r13
mov rdx, r15
mov rcx, r14
call qword ptr [rax+30h]
mov ebx, eax
test eax, eax
jg loc_5B072
jmp short loc_5AF80
loc_5AF4F:
cmp r13, 9Fh
ja short loc_5AF6F
cmp r13b, 0Ah
jz short loc_5AF2C
movzx eax, r13b
cmp eax, 0Dh
jz short loc_5AF2C
cmp r13, 9
jz short loc_5AF2C
jmp short loc_5AF80
loc_5AF6F:
mov rax, r13
and rax, 0FFFFFFFFFFFFF800h
cmp rax, 0D800h
jnz short loc_5AF2C
loc_5AF80:
mov ecx, [rbp+arg_0]
mov rax, [rbp+var_60]
lea eax, [rax+rcx*4]
lea rcx, [r15+rax]
cmp rcx, r14
jbe short loc_5AF9F
mov ebx, 0FFFFFF9Ch
sub ebx, eax
jmp loc_5B072
loc_5AF9F:
mov eax, r13d
shr eax, 0Ch
and eax, 0Fh
mov ecx, r13d
shr ecx, 8
and ecx, 0Fh
mov edx, r13d
shr edx, 4
and edx, 0Fh
and r13d, 0Fh
test byte ptr [r12+0Dh], 20h
jnz short loc_5AFF7
mov esi, dword ptr [rbp+var_58]
mov [r15], sil
lea rsi, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov al, [rsi+rax]
mov [r15+1], al
mov al, [rsi+rcx]
mov [r15+2], al
mov al, [rsi+rdx]
mov [r15+3], al
mov al, [rsi+r13]
mov [r15+4], al
mov ebx, 5
jmp short loc_5B072
loc_5AFF7:
mov [rbp+var_68], r14
mov esi, dword ptr [rbp+var_58]
mov [rbp+var_50], sil
lea rsi, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov al, [rsi+rax]
mov [rbp+var_4F], al
mov al, [rsi+rcx]
mov [rbp+var_4E], al
mov al, [rsi+rdx]
mov [rbp+var_4D], al
mov al, [rsi+r13]
mov [rbp+var_4C], al
xor ebx, ebx
xor r14d, r14d
mov [rbp+var_58], r15
mov r13, r15
loc_5B02E:
test r14, r14
mov eax, [rbp+arg_0]
mov r15d, eax
cmovz r15d, dword ptr [rbp+var_60]
mov rax, [r12+0B8h]
movzx esi, [rbp+r14+var_50]
mov rdi, r12
mov rdx, r13
mov rcx, [rbp+var_68]
call qword ptr [rax+30h]
cmp eax, r15d
jnz short loc_5B072
mov eax, r15d
add r13, rax
inc r14
cmp r14, 5
jnz short loc_5B02E
sub r13d, dword ptr [rbp+var_58]
mov ebx, r13d
loc_5B072:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5B092
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5B092:
call ___stack_chk_fail
| long long my_wc_to_printable_ex(
long long a1,
unsigned long long a2,
_BYTE *a3,
unsigned long long a4,
char a5,
unsigned int a6,
unsigned int a7)
{
int v9; // ebx
long long v10; // rax
long long v11; // rax
long long v12; // rcx
long long v13; // rdx
unsigned long long v14; // r13
long long v15; // r14
_BYTE *v16; // r13
unsigned int v17; // r15d
unsigned long long v19; // [rsp+8h] [rbp-68h]
int v22; // [rsp+18h] [rbp-58h]
_BYTE v23[32]; // [rsp+20h] [rbp-50h]
unsigned long long v24; // [rsp+40h] [rbp-30h]
v24 = __readfsqword(0x28u);
if ( a2 - 32 < 0x5F )
{
LABEL_2:
v9 = (*(long long ( **)(long long, unsigned long long, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a2,
a3,
a4);
if ( v9 > 0 )
return (unsigned int)v9;
goto LABEL_10;
}
if ( a2 > 0x9F )
{
if ( (a2 & 0xFFFFFFFFFFFFF800LL) != 0xD800 )
goto LABEL_2;
}
else if ( (_BYTE)a2 == 10 || (unsigned __int8)a2 == 13 || a2 == 9 )
{
goto LABEL_2;
}
LABEL_10:
v10 = a6 + 4 * a7;
if ( (unsigned long long)&a3[v10] <= a4 )
{
v11 = (unsigned __int16)a2 >> 12;
v12 = ((unsigned int)a2 >> 8) & 0xF;
v13 = (unsigned __int8)a2 >> 4;
v14 = a2 & 0xF;
if ( (*(_BYTE *)(a1 + 13) & 0x20) != 0 )
{
v19 = a4;
v23[0] = a5;
v23[1] = dig_vec_upper[v11];
v23[2] = dig_vec_upper[v12];
v23[3] = dig_vec_upper[v13];
v23[4] = dig_vec_upper[v14];
v9 = 0;
v15 = 0LL;
v22 = (int)a3;
v16 = a3;
while ( 1 )
{
v17 = a7;
if ( !v15 )
v17 = a6;
if ( (*(unsigned int ( **)(long long, _QWORD, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
(unsigned __int8)v23[v15],
v16,
v19) != v17 )
break;
v16 += v17;
if ( ++v15 == 5 )
return (unsigned int)((_DWORD)v16 - v22);
}
}
else
{
*a3 = a5;
a3[1] = dig_vec_upper[v11];
a3[2] = dig_vec_upper[v12];
a3[3] = dig_vec_upper[v13];
a3[4] = dig_vec_upper[v14];
return 5;
}
}
else
{
return (unsigned int)(-100 - v10);
}
return (unsigned int)v9;
}
| my_wc_to_printable_ex:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x60],R9
MOV dword ptr [RBP + -0x58],R8D
MOV R14,RCX
MOV R15,RDX
MOV R13,RSI
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RSI + -0x20]
CMP RAX,0x5f
JNC 0x0015af4f
LAB_0015af2c:
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R13
MOV RDX,R15
MOV RCX,R14
CALL qword ptr [RAX + 0x30]
MOV EBX,EAX
TEST EAX,EAX
JG 0x0015b072
JMP 0x0015af80
LAB_0015af4f:
CMP R13,0x9f
JA 0x0015af6f
CMP R13B,0xa
JZ 0x0015af2c
MOVZX EAX,R13B
CMP EAX,0xd
JZ 0x0015af2c
CMP R13,0x9
JZ 0x0015af2c
JMP 0x0015af80
LAB_0015af6f:
MOV RAX,R13
AND RAX,-0x800
CMP RAX,0xd800
JNZ 0x0015af2c
LAB_0015af80:
MOV ECX,dword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x60]
LEA EAX,[RAX + RCX*0x4]
LEA RCX,[R15 + RAX*0x1]
CMP RCX,R14
JBE 0x0015af9f
MOV EBX,0xffffff9c
SUB EBX,EAX
JMP 0x0015b072
LAB_0015af9f:
MOV EAX,R13D
SHR EAX,0xc
AND EAX,0xf
MOV ECX,R13D
SHR ECX,0x8
AND ECX,0xf
MOV EDX,R13D
SHR EDX,0x4
AND EDX,0xf
AND R13D,0xf
TEST byte ptr [R12 + 0xd],0x20
JNZ 0x0015aff7
MOV ESI,dword ptr [RBP + -0x58]
MOV byte ptr [R15],SIL
LEA RSI,[0x3df220]
MOV AL,byte ptr [RSI + RAX*0x1]
MOV byte ptr [R15 + 0x1],AL
MOV AL,byte ptr [RSI + RCX*0x1]
MOV byte ptr [R15 + 0x2],AL
MOV AL,byte ptr [RSI + RDX*0x1]
MOV byte ptr [R15 + 0x3],AL
MOV AL,byte ptr [RSI + R13*0x1]
MOV byte ptr [R15 + 0x4],AL
MOV EBX,0x5
JMP 0x0015b072
LAB_0015aff7:
MOV qword ptr [RBP + -0x68],R14
MOV ESI,dword ptr [RBP + -0x58]
MOV byte ptr [RBP + -0x50],SIL
LEA RSI,[0x3df220]
MOV AL,byte ptr [RSI + RAX*0x1]
MOV byte ptr [RBP + -0x4f],AL
MOV AL,byte ptr [RSI + RCX*0x1]
MOV byte ptr [RBP + -0x4e],AL
MOV AL,byte ptr [RSI + RDX*0x1]
MOV byte ptr [RBP + -0x4d],AL
MOV AL,byte ptr [RSI + R13*0x1]
MOV byte ptr [RBP + -0x4c],AL
XOR EBX,EBX
XOR R14D,R14D
MOV qword ptr [RBP + -0x58],R15
MOV R13,R15
LAB_0015b02e:
TEST R14,R14
MOV EAX,dword ptr [RBP + 0x10]
MOV R15D,EAX
CMOVZ R15D,dword ptr [RBP + -0x60]
MOV RAX,qword ptr [R12 + 0xb8]
MOVZX ESI,byte ptr [RBP + R14*0x1 + -0x50]
MOV RDI,R12
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x68]
CALL qword ptr [RAX + 0x30]
CMP EAX,R15D
JNZ 0x0015b072
MOV EAX,R15D
ADD R13,RAX
INC R14
CMP R14,0x5
JNZ 0x0015b02e
SUB R13D,dword ptr [RBP + -0x58]
MOV EBX,R13D
LAB_0015b072:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015b092
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015b092:
CALL 0x00124300
|
int my_wc_to_printable_ex
(long param_1,ulong param_2,char *param_3,char *param_4,char param_5,uint param_6,
uint param_7)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
char *pcVar5;
long lVar6;
long in_FS_OFFSET;
int local_60;
char local_58 [32];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (param_2 - 0x20 < 0x5f) {
LAB_0015af2c:
local_60 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,param_2,param_3,param_4);
if (0 < local_60) goto LAB_0015b072;
}
else if (param_2 < 0xa0) {
if ((((char)param_2 == '\n') || (((uint)param_2 & 0xff) == 0xd)) || (param_2 == 9))
goto LAB_0015af2c;
}
else if ((param_2 & 0xfffffffffffff800) != 0xd800) goto LAB_0015af2c;
uVar1 = param_6 + param_7 * 4;
if (param_4 < param_3 + uVar1) {
local_60 = -100 - uVar1;
}
else {
uVar1 = (uint)(param_2 >> 0xc) & 0xf;
uVar2 = (uint)(param_2 >> 8) & 0xf;
uVar3 = (uint)(param_2 >> 4) & 0xf;
uVar4 = (uint)param_2 & 0xf;
if ((*(byte *)(param_1 + 0xd) & 0x20) == 0) {
*param_3 = param_5;
param_3[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar1];
param_3[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar2];
param_3[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar3];
param_3[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar4];
local_60 = 5;
}
else {
local_58[0] = param_5;
local_58[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar1];
local_58[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar2];
local_58[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar3];
local_58[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[uVar4];
local_60 = 0;
lVar6 = 0;
pcVar5 = param_3;
do {
uVar1 = param_7;
if (lVar6 == 0) {
uVar1 = param_6;
}
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,local_58[lVar6],pcVar5,param_4);
if (uVar2 != uVar1) goto LAB_0015b072;
pcVar5 = pcVar5 + uVar1;
lVar6 = lVar6 + 1;
} while (lVar6 != 5);
local_60 = (int)param_3;
local_60 = (int)pcVar5 - local_60;
}
}
LAB_0015b072:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_60;
}
| |
41,779 | nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool) | monkey531[P]llama/common/./json.hpp | static ::nlohmann::detail::parser<basic_json, InputAdapterType> parser(
InputAdapterType adapter,
detail::parser_callback_t<basic_json>cb = nullptr,
const bool allow_exceptions = true,
const bool ignore_comments = false
)
{
return ::nlohmann::detail::parser<basic_json, InputAdapterType>(std::move(adapter),
std::move(cb), allow_exceptions, ignore_comments);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool):
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq %rsi, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x18(%rcx), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x4463d
movups (%rcx), %xmm1
addq $0x10, %rcx
movaps %xmm1, (%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rcx)
movzbl %r8b, %ecx
movzbl %r9b, %r8d
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x44cf0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x4466c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
retq
jmp 0x44699
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x44691
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x18b90
movq %rax, %rdi
callq 0x2ad73
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb:
push rbx
sub rsp, 30h
mov rbx, rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_10], rdx
xorps xmm0, xmm0
movaps [rsp+38h+var_38], xmm0
mov [rsp+38h+var_28], 0
mov rax, [rcx+18h]
mov [rsp+38h+var_20], rax
mov rax, [rcx+10h]
test rax, rax
jz short loc_4463D
movups xmm1, xmmword ptr [rcx]
add rcx, 10h
movaps [rsp+38h+var_38], xmm1
mov [rsp+38h+var_28], rax
movups xmmword ptr [rcx], xmm0
loc_4463D:
movzx ecx, r8b
movzx r8d, r9b
lea rsi, [rsp+38h+var_18]
mov rdx, rsp
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_St8functionIFbiNS1_13parse_event_tERSF_EEbb; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,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+38h+var_28]
test rax, rax
jz short loc_4466C
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_4466C:
mov rax, rbx
add rsp, 30h
pop rbx
retn
jmp short loc_44699
mov rbx, rax
mov rax, [rsp+38h+var_28]
test rax, rax
jz short loc_44691
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_44691:
mov rdi, rbx
call __Unwind_Resume
loc_44699:
mov rdi, rax
call __clang_call_terminate
| 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(
long long a1,
long long a2,
long long a3,
__int128 *a4,
unsigned __int8 a5,
unsigned __int8 a6)
{
void ( *v6)(__int128 *, __int128 *, long long); // rax
__int128 v8; // [rsp+0h] [rbp-38h] BYREF
void ( *v9)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-28h]
long long v10; // [rsp+18h] [rbp-20h]
_QWORD v11[3]; // [rsp+20h] [rbp-18h] BYREF
v11[0] = a2;
v11[1] = a3;
v8 = 0LL;
v9 = 0LL;
v10 = *((_QWORD *)a4 + 3);
v6 = (void ( *)(__int128 *, __int128 *, long long))*((_QWORD *)a4 + 2);
if ( v6 )
{
v8 = *a4;
v9 = v6;
a4[1] = 0LL;
}
((void ( *)(long long, _QWORD *, __int128 *, _QWORD, _QWORD))nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser)(
a1,
v11,
&v8,
a5,
a6);
if ( v9 )
v9(&v8, &v8, 3LL);
return a1;
}
| parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>:
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x28],RDX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RCX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RCX + 0x10]
TEST RAX,RAX
JZ 0x0014463d
MOVUPS XMM1,xmmword ptr [RCX]
ADD RCX,0x10
MOVAPS xmmword ptr [RSP],XMM1
MOV qword ptr [RSP + 0x10],RAX
MOVUPS xmmword ptr [RCX],XMM0
LAB_0014463d:
MOVZX ECX,R8B
MOVZX R8D,R9B
LEA RSI,[RSP + 0x20]
MOV RDX,RSP
MOV RDI,RBX
CALL 0x00144cf0
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0014466c
LAB_0014465f:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0014466c:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::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::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool, bool) */
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
* nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*param_1,int8 param_2,int8 param_3,int8 *param_4,int1 param_5,
int1 param_6)
{
code *pcVar1;
int8 local_38;
int8 uStack_30;
code *local_28;
int8 local_20;
int8 local_18;
int8 local_10;
local_38 = 0;
uStack_30 = 0;
local_28 = (code *)0x0;
local_20 = param_4[3];
pcVar1 = (code *)param_4[2];
if (pcVar1 != (code *)0x0) {
local_38 = *param_4;
uStack_30 = param_4[1];
param_4[2] = 0;
param_4[3] = 0;
local_28 = pcVar1;
}
/* try { // try from 0014463d to 00144654 has its CatchHandler @ 00144677 */
local_18 = param_2;
local_10 = param_3;
detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parser(param_1,&local_18,&local_38,param_5,param_6);
if (local_28 != (code *)0x0) {
/* try { // try from 0014465f to 0014466b has its CatchHandler @ 00144675 */
(*local_28)(&local_38,&local_38,3);
}
return param_1;
}
| |
41,780 | nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset() | monkey531[P]llama/common/json.hpp | void reset() noexcept
{
token_buffer.clear();
token_string.clear();
token_string.push_back(char_traits<char_type>::to_char_type(current));
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset():
pushq %rax
movq %rdi, %rax
andq $0x0, 0x58(%rdi)
movq 0x50(%rdi), %rcx
movb $0x0, (%rcx)
addq $0x38, %rdi
movq 0x38(%rax), %rcx
cmpq %rcx, 0x40(%rax)
je 0x6646a
movq %rcx, 0x40(%rax)
movb 0x14(%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
callq 0x4b85a
popq %rax
retq
movq %rax, %rdi
callq 0x2b4ef
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv:
push rax
mov rax, rdi
and qword ptr [rdi+58h], 0
mov rcx, [rdi+50h]
mov byte ptr [rcx], 0
add rdi, 38h ; '8'
mov rcx, [rax+38h]
cmp [rax+40h], rcx
jz short loc_6646A
mov [rax+40h], rcx
loc_6646A:
mov al, [rax+14h]
lea rsi, [rsp+8+var_1]
mov [rsi], al
call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&)
pop rax
retn
mov rdi, rax
call __clang_call_terminate
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(
long long a1)
{
long long v2; // rdi
long long v3; // rcx
char v4; // [rsp+1h] [rbp-1h] BYREF
*(_QWORD *)(a1 + 88) = 0LL;
**(_BYTE **)(a1 + 80) = 0;
v2 = a1 + 56;
v3 = *(_QWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 64) != v3 )
*(_QWORD *)(a1 + 64) = v3;
v4 = *(_BYTE *)(a1 + 20);
std::vector<char>::emplace_back<char>(v2, &v4);
}
| reset:
PUSH RAX
MOV RAX,RDI
AND qword ptr [RDI + 0x58],0x0
MOV RCX,qword ptr [RDI + 0x50]
MOV byte ptr [RCX],0x0
ADD RDI,0x38
MOV RCX,qword ptr [RAX + 0x38]
CMP qword ptr [RAX + 0x40],RCX
JZ 0x0016646a
MOV qword ptr [RAX + 0x40],RCX
LAB_0016646a:
MOV AL,byte ptr [RAX + 0x14]
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],AL
LAB_00166474:
CALL 0x0014b85a
POP RAX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::reset() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::reset(lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int8 in_RAX;
int8 uStack_8;
*(int8 *)(this + 0x58) = 0;
**(int1 **)(this + 0x50) = 0;
if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) {
*(long *)(this + 0x40) = *(long *)(this + 0x38);
}
uStack_8 = CONCAT17(this[0x14],(int7)in_RAX);
/* try { // try from 00166474 to 00166478 has its CatchHandler @ 0016647b */
std::vector<char,std::allocator<char>>::emplace_back<char>
((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7));
return uStack_8;
}
| |
41,781 | mysql_local_infile_end | eloqsql/libmariadb/libmariadb/ma_loaddata.c | static
void mysql_local_infile_end(void *ptr)
{
MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr;
if (info)
{
if (info->fp)
ma_close(info->fp);
free(ptr);
}
return;
} | O3 | c | mysql_local_infile_end:
testq %rdi, %rdi
je 0x23469
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x2345b
callq 0x296bc
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x13570
retq
| mysql_local_infile_end:
test rdi, rdi
jz short locret_23469
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi]
test rdi, rdi
jz short loc_2345B
call ma_close
loc_2345B:
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp _free
locret_23469:
retn
| long long mysql_local_infile_end(long long *a1)
{
long long v2; // rdi
long long result; // rax
if ( a1 )
{
v2 = *a1;
if ( v2 )
ma_close(v2);
return free(a1);
}
return result;
}
| mysql_local_infile_end:
TEST RDI,RDI
JZ 0x00123469
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x0012345b
CALL 0x001296bc
LAB_0012345b:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00113570
LAB_00123469:
RET
|
void mysql_local_infile_end(long *param_1)
{
if (param_1 != (long *)0x0) {
if (*param_1 != 0) {
ma_close();
}
free(param_1);
return;
}
return;
}
| |
41,782 | js_free_prop_enum | bluesky950520[P]quickjs/quickjs.c | static void js_free_prop_enum(JSContext *ctx, JSPropertyEnum *tab, uint32_t len)
{
uint32_t i;
if (tab) {
for(i = 0; i < len; i++)
JS_FreeAtom(ctx, tab[i].atom);
js_free(ctx, tab);
}
} | O3 | c | js_free_prop_enum:
testq %rsi, %rsi
je 0x23a83
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
je 0x23a4d
movl %edx, %r15d
xorl %r12d, %r12d
movl 0x4(%rbx,%r12,8), %esi
movq %r14, %rdi
callq 0x202f5
incq %r12
cmpq %r12, %r15
jne 0x23a38
movq 0x18(%r14), %r14
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
retq
| js_free_prop_enum:
test rsi, rsi
jz short locret_23A83
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
test edx, edx
jz short loc_23A4D
mov r15d, edx
xor r12d, r12d
loc_23A38:
mov esi, [rbx+r12*8+4]
mov rdi, r14
call JS_FreeAtom
inc r12
cmp r15, r12
jnz short loc_23A38
loc_23A4D:
mov r14, [r14+18h]
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp rcx
locret_23A83:
retn
| long long js_free_prop_enum(long long a1, long long a2, unsigned int a3)
{
long long v3; // r15
long long i; // r12
long long v5; // r14
long long v6; // rax
long long ( *v7)(_QWORD, long long); // rcx
long long result; // rax
if ( a2 )
{
if ( a3 )
{
v3 = a3;
for ( i = 0LL; i != v3; ++i )
JS_FreeAtom(a1, *(_DWORD *)(a2 + 8 * i + 4));
}
v5 = *(_QWORD *)(a1 + 24);
--*(_QWORD *)(v5 + 40);
v6 = (*(long long ( **)(long long))(v5 + 32))(a2);
v7 = *(long long ( **)(_QWORD, long long))(v5 + 16);
*(_QWORD *)(v5 + 48) = *(_QWORD *)(v5 + 48) - v6 - 8;
return v7(*(_QWORD *)(v5 + 64), a2);
}
return result;
}
| js_free_prop_enum:
TEST RSI,RSI
JZ 0x00123a83
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
TEST EDX,EDX
JZ 0x00123a4d
MOV R15D,EDX
XOR R12D,R12D
LAB_00123a38:
MOV ESI,dword ptr [RBX + R12*0x8 + 0x4]
MOV RDI,R14
CALL 0x001202f5
INC R12
CMP R15,R12
JNZ 0x00123a38
LAB_00123a4d:
MOV R14,qword ptr [R14 + 0x18]
DEC qword ptr [R14 + 0x28]
MOV RDI,RBX
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [R14 + 0x30],RDX
MOV RDI,qword ptr [R14 + 0x40]
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP RCX
LAB_00123a83:
RET
|
void js_free_prop_enum(long param_1,long param_2,uint param_3)
{
long lVar1;
long lVar2;
ulong uVar3;
if (param_2 != 0) {
if (param_3 != 0) {
uVar3 = 0;
do {
JS_FreeAtom(param_1,*(int4 *)(param_2 + 4 + uVar3 * 8));
uVar3 = uVar3 + 1;
} while (param_3 != uVar3);
}
lVar1 = *(long *)(param_1 + 0x18);
*(long *)(lVar1 + 0x28) = *(long *)(lVar1 + 0x28) + -1;
lVar2 = (**(code **)(lVar1 + 0x20))(param_2);
lVar2 = (*(long *)(lVar1 + 0x30) - lVar2) + -8;
*(long *)(lVar1 + 0x30) = lVar2;
/* WARNING: Could not recover jumptable at 0x00123a81. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(lVar1 + 0x10))
(*(int8 *)(lVar1 + 0x40),param_2,lVar2,*(code **)(lVar1 + 0x10));
return;
}
return;
}
| |
41,783 | my_lock | eloqsql/mysys/my_lock.c | int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
myf MyFlags)
{
#ifdef HAVE_FCNTL
int value;
ALARM_VARIABLES;
#endif
DBUG_ENTER("my_lock");
DBUG_PRINT("my",("fd: %d Op: %d start: %ld Length: %ld MyFlags: %lu",
fd,locktype,(long) start,(long) length,MyFlags));
if (my_disable_locking && ! (MyFlags & MY_FORCE_LOCK))
DBUG_RETURN(0);
#if defined(_WIN32)
{
int timeout_sec;
if (MyFlags & MY_NO_WAIT)
timeout_sec= 0;
else
timeout_sec= WIN_LOCK_INFINITE;
if (win_lock(fd, locktype, start, length, timeout_sec) == 0)
DBUG_RETURN(0);
}
#else
#if defined(HAVE_FCNTL)
{
struct flock lock;
lock.l_type= (short) locktype;
lock.l_whence= SEEK_SET;
lock.l_start= (off_t) start;
lock.l_len= (off_t) length;
if (MyFlags & (MY_NO_WAIT | MY_SHORT_WAIT))
{
if (fcntl(fd,F_SETLK,&lock) != -1) /* Check if we can lock */
DBUG_RETURN(0); /* Ok, file locked */
if (MyFlags & MY_NO_WAIT)
{
my_errno= (errno == EACCES) ? EAGAIN : errno ? errno : -1;
DBUG_RETURN(-1);
}
DBUG_PRINT("info",("Was locked, trying with alarm"));
ALARM_INIT;
while ((value=fcntl(fd,F_SETLKW,&lock)) && ! ALARM_TEST &&
errno == EINTR)
{ /* Setup again so we don`t miss it */
ALARM_REINIT;
}
ALARM_END;
if (value != -1)
DBUG_RETURN(0);
if (errno == EINTR)
errno=EAGAIN;
}
else if (fcntl(fd,F_SETLKW,&lock) != -1) /* Wait until a lock */
DBUG_RETURN(0);
}
#else
if (MyFlags & MY_SEEK_NOT_DONE)
{
if (my_seek(fd,start,MY_SEEK_SET,MYF(MyFlags & ~MY_SEEK_NOT_DONE))
== MY_FILEPOS_ERROR)
{
/*
If an error has occurred in my_seek then we will already
have an error code in my_errno; Just return error code.
*/
DBUG_RETURN(-1);
}
}
if (lockf(fd,locktype,length) != -1)
DBUG_RETURN(0);
#endif /* HAVE_FCNTL */
#endif /* _WIN32 */
/* We got an error. We don't want EACCES errors */
my_errno=(errno == EACCES) ? EAGAIN : errno ? errno : -1;
if (MyFlags & MY_WME)
{
if (locktype == F_UNLCK)
my_error(EE_CANTUNLOCK,MYF(ME_BELL),my_errno);
else
my_error(EE_CANTLOCK,MYF(ME_BELL),my_errno);
}
DBUG_PRINT("error",("my_errno: %d (%d)",my_errno,errno));
DBUG_RETURN(-1);
} | O0 | c | my_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
jmp 0xf355e
leaq 0xb8fd43(%rip), %rax # 0xc832a8
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xf358b
movq -0x28(%rbp), %rax
andq $0x80, %rax
cmpq $0x0, %rax
jne 0xf358b
jmp 0xf357f
movl $0x0, -0x4(%rbp)
jmp 0xf37f6
movl -0xc(%rbp), %eax
movw %ax, -0x58(%rbp)
movw $0x0, -0x56(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
andq $0x140, %rax # imm = 0x140
cmpq $0x0, %rax
je 0xf372f
movl -0x8(%rbp), %edi
movl $0x6, %esi
leaq -0x58(%rbp), %rdx
movb $0x0, %al
callq 0x2a140
cmpl $-0x1, %eax
je 0xf35e2
jmp 0xf35d6
movl $0x0, -0x4(%rbp)
jmp 0xf37f6
movq -0x28(%rbp), %rax
andq $0x100, %rax # imm = 0x100
cmpq $0x0, %rax
je 0xf3648
callq 0x2a760
cmpl $0xd, (%rax)
jne 0xf3606
movl $0xb, %eax
movl %eax, -0x5c(%rbp)
jmp 0xf362c
callq 0x2a760
cmpl $0x0, (%rax)
je 0xf361c
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x60(%rbp)
jmp 0xf3626
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x60(%rbp)
jmp 0xf3626
movl -0x60(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x64(%rbp)
callq 0xf60c0
movl -0x64(%rbp), %ecx
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xf37f6
jmp 0xf364a
jmp 0xf364c
leaq 0xb8fc45(%rip), %rax # 0xc83298
movl $0x0, (%rax)
leaq 0x1cc578(%rip), %rax # 0x2bfbd8
movq (%rax), %rax
movl %eax, %edi
callq 0x2a250
movl %eax, -0x30(%rbp)
movl $0xe, %edi
leaq 0xebe7(%rip), %rsi # 0x102260
callq 0x2a300
movq %rax, -0x38(%rbp)
movl -0x8(%rbp), %edi
movl $0x7, %esi
leaq -0x58(%rbp), %rdx
movb $0x0, %al
callq 0x2a140
movl %eax, %ecx
movl %ecx, -0x2c(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x65(%rbp)
je 0xf36c5
leaq 0xb8fbed(%rip), %rax # 0xc83298
movl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x65(%rbp)
jne 0xf36c5
callq 0x2a760
cmpl $0x4, (%rax)
sete %al
movb %al, -0x65(%rbp)
movb -0x65(%rbp), %al
testb $0x1, %al
jne 0xf36ce
jmp 0xf36ee
leaq 0x1cc503(%rip), %rax # 0x2bfbd8
movq (%rax), %rax
movl %eax, %edi
callq 0x2a250
leaq 0xb8fbb2(%rip), %rax # 0xc83298
movl $0x0, (%rax)
jmp 0xf3682
movq -0x38(%rbp), %rsi
movl $0xe, %edi
callq 0x2a300
movl -0x30(%rbp), %edi
callq 0x2a250
cmpl $-0x1, -0x2c(%rbp)
je 0xf3718
jmp 0xf370c
movl $0x0, -0x4(%rbp)
jmp 0xf37f6
callq 0x2a760
cmpl $0x4, (%rax)
jne 0xf372d
callq 0x2a760
movl $0xb, (%rax)
jmp 0xf3757
movl -0x8(%rbp), %edi
movl $0x7, %esi
leaq -0x58(%rbp), %rdx
movb $0x0, %al
callq 0x2a140
cmpl $-0x1, %eax
je 0xf3755
jmp 0xf3749
movl $0x0, -0x4(%rbp)
jmp 0xf37f6
jmp 0xf3757
callq 0x2a760
cmpl $0xd, (%rax)
jne 0xf376b
movl $0xb, %eax
movl %eax, -0x6c(%rbp)
jmp 0xf3791
callq 0x2a760
cmpl $0x0, (%rax)
je 0xf3781
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x70(%rbp)
jmp 0xf378b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x70(%rbp)
jmp 0xf378b
movl -0x70(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x74(%rbp)
callq 0xf60c0
movl -0x74(%rbp), %ecx
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0xf37e9
cmpl $0x2, -0xc(%rbp)
jne 0xf37cf
callq 0xf60c0
movl (%rax), %edx
movl $0xb, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xefb70
jmp 0xf37e7
callq 0xf60c0
movl (%rax), %edx
movl $0xa, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xefb70
jmp 0xf37e9
jmp 0xf37eb
jmp 0xf37ed
jmp 0xf37ef
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_lock:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], edi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], 0
mov [rbp+var_38], 0
jmp short $+2
loc_F355E:
lea rax, my_disable_locking
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_F358B
mov rax, [rbp+var_28]
and rax, 80h
cmp rax, 0
jnz short loc_F358B
jmp short $+2
loc_F357F:
mov [rbp+var_4], 0
jmp loc_F37F6
loc_F358B:
mov eax, [rbp+var_C]
mov [rbp+var_58], ax
mov [rbp+var_56], 0
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
mov rax, [rbp+var_20]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
and rax, 140h
cmp rax, 0
jz loc_F372F
mov edi, [rbp+var_8]
mov esi, 6
lea rdx, [rbp+var_58]
mov al, 0
call _fcntl64
cmp eax, 0FFFFFFFFh
jz short loc_F35E2
jmp short $+2
loc_F35D6:
mov [rbp+var_4], 0
jmp loc_F37F6
loc_F35E2:
mov rax, [rbp+var_28]
and rax, 100h
cmp rax, 0
jz short loc_F3648
call ___errno_location
cmp dword ptr [rax], 0Dh
jnz short loc_F3606
mov eax, 0Bh
mov [rbp+var_5C], eax
jmp short loc_F362C
loc_F3606:
call ___errno_location
cmp dword ptr [rax], 0
jz short loc_F361C
call ___errno_location
mov eax, [rax]
mov [rbp+var_60], eax
jmp short loc_F3626
loc_F361C:
mov eax, 0FFFFFFFFh
mov [rbp+var_60], eax
jmp short $+2
loc_F3626:
mov eax, [rbp+var_60]
mov [rbp+var_5C], eax
loc_F362C:
mov eax, [rbp+var_5C]
mov [rbp+var_64], eax
call _my_thread_var
mov ecx, [rbp+var_64]
mov [rax], ecx
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_F37F6
loc_F3648:
jmp short $+2
loc_F364A:
jmp short $+2
loc_F364C:
lea rax, my_have_got_alarm
mov dword ptr [rax], 0
lea rax, my_time_to_wait_for_lock
mov rax, [rax]
mov edi, eax
call _alarm
mov [rbp+var_30], eax
mov edi, 0Eh
lea rsi, my_set_alarm_variable
call _signal
mov [rbp+var_38], rax
loc_F3682:
mov edi, [rbp+var_8]
mov esi, 7
lea rdx, [rbp+var_58]
mov al, 0
call _fcntl64
mov ecx, eax
mov [rbp+var_2C], ecx
xor eax, eax
cmp ecx, 0
mov [rbp+var_65], al
jz short loc_F36C5
lea rax, my_have_got_alarm
mov ecx, [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_65], al
jnz short loc_F36C5
call ___errno_location
cmp dword ptr [rax], 4
setz al
mov [rbp+var_65], al
loc_F36C5:
mov al, [rbp+var_65]
test al, 1
jnz short loc_F36CE
jmp short loc_F36EE
loc_F36CE:
lea rax, my_time_to_wait_for_lock
mov rax, [rax]
mov edi, eax
call _alarm
lea rax, my_have_got_alarm
mov dword ptr [rax], 0
jmp short loc_F3682
loc_F36EE:
mov rsi, [rbp+var_38]
mov edi, 0Eh
call _signal
mov edi, [rbp+var_30]
call _alarm
cmp [rbp+var_2C], 0FFFFFFFFh
jz short loc_F3718
jmp short $+2
loc_F370C:
mov [rbp+var_4], 0
jmp loc_F37F6
loc_F3718:
call ___errno_location
cmp dword ptr [rax], 4
jnz short loc_F372D
call ___errno_location
mov dword ptr [rax], 0Bh
loc_F372D:
jmp short loc_F3757
loc_F372F:
mov edi, [rbp+var_8]
mov esi, 7
lea rdx, [rbp+var_58]
mov al, 0
call _fcntl64
cmp eax, 0FFFFFFFFh
jz short loc_F3755
jmp short $+2
loc_F3749:
mov [rbp+var_4], 0
jmp loc_F37F6
loc_F3755:
jmp short $+2
loc_F3757:
call ___errno_location
cmp dword ptr [rax], 0Dh
jnz short loc_F376B
mov eax, 0Bh
mov [rbp+var_6C], eax
jmp short loc_F3791
loc_F376B:
call ___errno_location
cmp dword ptr [rax], 0
jz short loc_F3781
call ___errno_location
mov eax, [rax]
mov [rbp+var_70], eax
jmp short loc_F378B
loc_F3781:
mov eax, 0FFFFFFFFh
mov [rbp+var_70], eax
jmp short $+2
loc_F378B:
mov eax, [rbp+var_70]
mov [rbp+var_6C], eax
loc_F3791:
mov eax, [rbp+var_6C]
mov [rbp+var_74], eax
call _my_thread_var
mov ecx, [rbp+var_74]
mov [rax], ecx
mov rax, [rbp+var_28]
and rax, 10h
cmp rax, 0
jz short loc_F37E9
cmp [rbp+var_C], 2
jnz short loc_F37CF
call _my_thread_var
mov edx, [rax]
mov edi, 0Bh
mov esi, 4
mov al, 0
call my_error
jmp short loc_F37E7
loc_F37CF:
call _my_thread_var
mov edx, [rax]
mov edi, 0Ah
mov esi, 4
mov al, 0
call my_error
loc_F37E7:
jmp short $+2
loc_F37E9:
jmp short $+2
loc_F37EB:
jmp short $+2
loc_F37ED:
jmp short $+2
loc_F37EF:
mov [rbp+var_4], 0FFFFFFFFh
loc_F37F6:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long my_lock(unsigned int a1, int a2, long long a3, long long a4, long long a5)
{
long long v5; // rdi
const char *v6; // rsi
long long v7; // rdi
unsigned int *v8; // rax
unsigned int *v9; // rax
int v11; // [rsp+10h] [rbp-70h]
int v12; // [rsp+14h] [rbp-6Ch]
bool v13; // [rsp+1Bh] [rbp-65h]
int v14; // [rsp+20h] [rbp-60h]
int v15; // [rsp+24h] [rbp-5Ch]
_WORD v16[4]; // [rsp+28h] [rbp-58h] BYREF
long long v17; // [rsp+30h] [rbp-50h]
long long v18; // [rsp+38h] [rbp-48h]
long long v19; // [rsp+48h] [rbp-38h]
unsigned int v20; // [rsp+50h] [rbp-30h]
int v21; // [rsp+54h] [rbp-2Ch]
long long v22; // [rsp+58h] [rbp-28h]
long long v23; // [rsp+60h] [rbp-20h]
long long v24; // [rsp+68h] [rbp-18h]
int v25; // [rsp+74h] [rbp-Ch]
unsigned int v26; // [rsp+78h] [rbp-8h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v20 = 0;
v19 = 0LL;
if ( my_disable_locking && (v22 & 0x80) == 0 )
return 0;
v16[0] = v25;
v16[1] = 0;
v17 = v24;
v18 = v23;
if ( (v22 & 0x140) != 0 )
{
v5 = v26;
if ( (unsigned int)fcntl64(v26, 6LL, v16) != -1 )
return 0;
if ( (v22 & 0x100) != 0 )
{
if ( *(_DWORD *)__errno_location() == 13 )
{
v15 = 11;
}
else
{
if ( *(_DWORD *)__errno_location() )
v14 = *(_DWORD *)__errno_location();
else
v14 = -1;
v15 = v14;
}
*(_DWORD *)my_thread_var(v5, &byte_6) = v15;
return (unsigned int)-1;
}
my_have_got_alarm = 0;
v20 = alarm((unsigned int)my_time_to_wait_for_lock);
v19 = signal(14LL, my_set_alarm_variable);
while ( 1 )
{
v21 = fcntl64(v26, 7LL, v16);
v13 = 0;
if ( v21 )
{
v13 = 0;
if ( !my_have_got_alarm )
v13 = *(_DWORD *)__errno_location() == 4;
}
if ( !v13 )
break;
alarm((unsigned int)my_time_to_wait_for_lock);
my_have_got_alarm = 0;
}
v6 = (const char *)v19;
signal(14LL, v19);
v7 = v20;
alarm(v20);
if ( v21 != -1 )
return 0;
if ( *(_DWORD *)__errno_location() == 4 )
*(_DWORD *)__errno_location() = 11;
}
else
{
v7 = v26;
v6 = &byte_7;
if ( (unsigned int)fcntl64(v26, 7LL, v16) != -1 )
return 0;
}
if ( *(_DWORD *)__errno_location() == 13 )
{
v12 = 11;
}
else
{
if ( *(_DWORD *)__errno_location() )
v11 = *(_DWORD *)__errno_location();
else
v11 = -1;
v12 = v11;
}
*(_DWORD *)my_thread_var(v7, v6) = v12;
if ( (v22 & 0x10) != 0 )
{
if ( v25 == 2 )
{
v8 = (unsigned int *)my_thread_var(v7, v6);
my_error(0xBu, 4LL, *v8);
}
else
{
v9 = (unsigned int *)my_thread_var(v7, v6);
my_error(0xAu, 4LL, *v9);
}
}
return (unsigned int)-1;
}
| my_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x30],0x0
MOV qword ptr [RBP + -0x38],0x0
JMP 0x001f355e
LAB_001f355e:
LEA RAX,[0xd832a8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001f358b
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x80
CMP RAX,0x0
JNZ 0x001f358b
JMP 0x001f357f
LAB_001f357f:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f37f6
LAB_001f358b:
MOV EAX,dword ptr [RBP + -0xc]
MOV word ptr [RBP + -0x58],AX
MOV word ptr [RBP + -0x56],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x140
CMP RAX,0x0
JZ 0x001f372f
MOV EDI,dword ptr [RBP + -0x8]
MOV ESI,0x6
LEA RDX,[RBP + -0x58]
MOV AL,0x0
CALL 0x0012a140
CMP EAX,-0x1
JZ 0x001f35e2
JMP 0x001f35d6
LAB_001f35d6:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f37f6
LAB_001f35e2:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x100
CMP RAX,0x0
JZ 0x001f3648
CALL 0x0012a760
CMP dword ptr [RAX],0xd
JNZ 0x001f3606
MOV EAX,0xb
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x001f362c
LAB_001f3606:
CALL 0x0012a760
CMP dword ptr [RAX],0x0
JZ 0x001f361c
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x60],EAX
JMP 0x001f3626
LAB_001f361c:
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x60],EAX
JMP 0x001f3626
LAB_001f3626:
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x5c],EAX
LAB_001f362c:
MOV EAX,dword ptr [RBP + -0x5c]
MOV dword ptr [RBP + -0x64],EAX
CALL 0x001f60c0
MOV ECX,dword ptr [RBP + -0x64]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001f37f6
LAB_001f3648:
JMP 0x001f364a
LAB_001f364a:
JMP 0x001f364c
LAB_001f364c:
LEA RAX,[0xd83298]
MOV dword ptr [RAX],0x0
LEA RAX,[0x3bfbd8]
MOV RAX,qword ptr [RAX]
MOV EDI,EAX
CALL 0x0012a250
MOV dword ptr [RBP + -0x30],EAX
MOV EDI,0xe
LEA RSI,[0x202260]
CALL 0x0012a300
MOV qword ptr [RBP + -0x38],RAX
LAB_001f3682:
MOV EDI,dword ptr [RBP + -0x8]
MOV ESI,0x7
LEA RDX,[RBP + -0x58]
MOV AL,0x0
CALL 0x0012a140
MOV ECX,EAX
MOV dword ptr [RBP + -0x2c],ECX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x65],AL
JZ 0x001f36c5
LEA RAX,[0xd83298]
MOV ECX,dword ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x65],AL
JNZ 0x001f36c5
CALL 0x0012a760
CMP dword ptr [RAX],0x4
SETZ AL
MOV byte ptr [RBP + -0x65],AL
LAB_001f36c5:
MOV AL,byte ptr [RBP + -0x65]
TEST AL,0x1
JNZ 0x001f36ce
JMP 0x001f36ee
LAB_001f36ce:
LEA RAX,[0x3bfbd8]
MOV RAX,qword ptr [RAX]
MOV EDI,EAX
CALL 0x0012a250
LEA RAX,[0xd83298]
MOV dword ptr [RAX],0x0
JMP 0x001f3682
LAB_001f36ee:
MOV RSI,qword ptr [RBP + -0x38]
MOV EDI,0xe
CALL 0x0012a300
MOV EDI,dword ptr [RBP + -0x30]
CALL 0x0012a250
CMP dword ptr [RBP + -0x2c],-0x1
JZ 0x001f3718
JMP 0x001f370c
LAB_001f370c:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f37f6
LAB_001f3718:
CALL 0x0012a760
CMP dword ptr [RAX],0x4
JNZ 0x001f372d
CALL 0x0012a760
MOV dword ptr [RAX],0xb
LAB_001f372d:
JMP 0x001f3757
LAB_001f372f:
MOV EDI,dword ptr [RBP + -0x8]
MOV ESI,0x7
LEA RDX,[RBP + -0x58]
MOV AL,0x0
CALL 0x0012a140
CMP EAX,-0x1
JZ 0x001f3755
JMP 0x001f3749
LAB_001f3749:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f37f6
LAB_001f3755:
JMP 0x001f3757
LAB_001f3757:
CALL 0x0012a760
CMP dword ptr [RAX],0xd
JNZ 0x001f376b
MOV EAX,0xb
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x001f3791
LAB_001f376b:
CALL 0x0012a760
CMP dword ptr [RAX],0x0
JZ 0x001f3781
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x70],EAX
JMP 0x001f378b
LAB_001f3781:
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x70],EAX
JMP 0x001f378b
LAB_001f378b:
MOV EAX,dword ptr [RBP + -0x70]
MOV dword ptr [RBP + -0x6c],EAX
LAB_001f3791:
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x74],EAX
CALL 0x001f60c0
MOV ECX,dword ptr [RBP + -0x74]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001f37e9
CMP dword ptr [RBP + -0xc],0x2
JNZ 0x001f37cf
CALL 0x001f60c0
MOV EDX,dword ptr [RAX]
MOV EDI,0xb
MOV ESI,0x4
MOV AL,0x0
CALL 0x001efb70
JMP 0x001f37e7
LAB_001f37cf:
CALL 0x001f60c0
MOV EDX,dword ptr [RAX]
MOV EDI,0xa
MOV ESI,0x4
MOV AL,0x0
CALL 0x001efb70
LAB_001f37e7:
JMP 0x001f37e9
LAB_001f37e9:
JMP 0x001f37eb
LAB_001f37eb:
JMP 0x001f37ed
LAB_001f37ed:
JMP 0x001f37ef
LAB_001f37ef:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_001f37f6:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
my_lock(int4 param_1,int param_2,int8 param_3,int8 param_4,ulong param_5)
{
int iVar1;
int *piVar2;
int4 *puVar3;
bool bVar4;
int local_78;
int local_74;
int local_68;
int local_64;
int2 local_60;
int2 local_5e;
int8 local_58;
int8 local_50;
__sighandler_t local_40;
uint local_38;
int local_34;
ulong local_30;
int8 local_28;
int8 local_20;
int local_14;
int4 local_10;
local_38 = 0;
local_40 = (__sighandler_t)0x0;
if ((my_disable_locking != '\0') && ((param_5 & 0x80) == 0)) {
return 0;
}
local_60 = (int2)param_2;
local_5e = 0;
local_58 = param_3;
local_50 = param_4;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
if ((param_5 & 0x140) == 0) {
iVar1 = fcntl64(param_1,7,&local_60);
if (iVar1 != -1) {
return 0;
}
}
else {
iVar1 = fcntl64(param_1,6,&local_60);
if (iVar1 != -1) {
return 0;
}
if ((local_30 & 0x100) != 0) {
piVar2 = __errno_location();
if (*piVar2 == 0xd) {
local_64 = 0xb;
}
else {
piVar2 = __errno_location();
if (*piVar2 == 0) {
local_68 = -1;
}
else {
piVar2 = __errno_location();
local_68 = *piVar2;
}
local_64 = local_68;
}
piVar2 = (int *)_my_thread_var();
*piVar2 = local_64;
return 0xffffffff;
}
my_have_got_alarm = 0;
local_38 = alarm((uint)my_time_to_wait_for_lock);
local_40 = signal(0xe,my_set_alarm_variable);
while( true ) {
local_34 = fcntl64(local_10,7,&local_60);
bVar4 = false;
if ((local_34 != 0) && (bVar4 = false, my_have_got_alarm == 0)) {
piVar2 = __errno_location();
bVar4 = *piVar2 == 4;
}
if (!bVar4) break;
alarm((uint)my_time_to_wait_for_lock);
my_have_got_alarm = 0;
}
signal(0xe,local_40);
alarm(local_38);
if (local_34 != -1) {
return 0;
}
piVar2 = __errno_location();
if (*piVar2 == 4) {
piVar2 = __errno_location();
*piVar2 = 0xb;
}
}
piVar2 = __errno_location();
if (*piVar2 == 0xd) {
local_74 = 0xb;
}
else {
piVar2 = __errno_location();
if (*piVar2 == 0) {
local_78 = -1;
}
else {
piVar2 = __errno_location();
local_78 = *piVar2;
}
local_74 = local_78;
}
piVar2 = (int *)_my_thread_var();
*piVar2 = local_74;
if ((local_30 & 0x10) != 0) {
if (local_14 == 2) {
puVar3 = (int4 *)_my_thread_var();
my_error(0xb,4,*puVar3);
}
else {
puVar3 = (int4 *)_my_thread_var();
my_error(10,4,*puVar3);
}
}
return 0xffffffff;
}
| |
41,784 | js_create_array | bluesky950520[P]quickjs/quickjs.c | static JSValue js_create_array(JSContext *ctx, int len, JSValue *tab)
{
JSValue obj;
int i;
obj = JS_NewArray(ctx);
if (JS_IsException(obj))
return JS_EXCEPTION;
for(i = 0; i < len; i++) {
if (JS_CreateDataPropertyUint32(ctx, obj, i, js_dup(tab[i]), 0) < 0) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
}
return obj;
} | O1 | c | js_create_array:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq 0x38(%rdi), %rsi
incl (%rsi)
pushq $0x2
popq %rdx
callq 0xf516
movq %rdx, %rbx
pushq $0x6
popq %rdx
cmpl $0x6, %ebx
jne 0x10b3d
xorl %eax, %eax
xorl %ecx, %ecx
movq %rdx, %rbx
jmp 0x10bcb
movq %rax, %r12
testl %ebp, %ebp
jle 0x10ba0
movl %ebp, %ebp
addq $0x8, %r14
xorl %r13d, %r13d
movq -0x8(%r14), %rax
movq (%r14), %rcx
movq %rax, 0x18(%rsp)
cmpl $-0x9, %ecx
jb 0x10b65
movq 0x18(%rsp), %rdx
incl (%rdx)
movq %rax, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
pushq $0x7
popq %r9
callq 0x26b2d
testl %eax, %eax
js 0x10bb5
incq %r13
addq $0x10, %r14
cmpq %r13, %rbp
jne 0x10b4d
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r12, %rcx
andq %rax, %rcx
movl %r12d, %eax
jmp 0x10bcb
movq 0x18(%r15), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1d8c6
xorl %eax, %eax
xorl %ecx, %ecx
pushq $0x6
popq %rbx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_create_array:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov ebp, esi
mov r15, rdi
mov rsi, [rdi+38h]
inc dword ptr [rsi]
push 2
pop rdx
call JS_NewObjectFromShape
mov rbx, rdx
push 6
pop rdx
cmp ebx, 6
jnz short loc_10B3D
xor eax, eax
xor ecx, ecx
mov rbx, rdx
jmp loc_10BCB
loc_10B3D:
mov r12, rax
test ebp, ebp
jle short loc_10BA0
mov ebp, ebp
add r14, 8
xor r13d, r13d
loc_10B4D:
mov rax, [r14-8]
mov rcx, [r14]
mov qword ptr [rsp+58h+var_40], rax
cmp ecx, 0FFFFFFF7h
jb short loc_10B65
mov rdx, qword ptr [rsp+58h+var_40]
inc dword ptr [rdx]
loc_10B65:
mov qword ptr [rsp+58h+var_40], rax
mov qword ptr [rsp+58h+var_40+8], rcx
movups xmm0, [rsp+58h+var_40]
movups [rsp+58h+var_58], xmm0
mov rdi, r15
mov rsi, r12
mov rdx, rbx
mov rcx, r13
xor r8d, r8d
push 7
pop r9
call JS_DefinePropertyValueValue
test eax, eax
js short loc_10BB5
inc r13
add r14, 10h
cmp rbp, r13
jnz short loc_10B4D
loc_10BA0:
mov rax, 0FFFFFFFF00000000h
mov rcx, r12
and rcx, rax
mov eax, r12d
jmp short loc_10BCB
loc_10BB5:
mov rdi, [r15+18h]
mov rsi, r12
mov rdx, rbx
call JS_FreeValueRT
xor eax, eax
xor ecx, ecx
push 6
pop rbx
loc_10BCB:
or rax, rcx
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_create_array(long long a1, int a2, long long a3)
{
_DWORD *v5; // rsi
long long v6; // rax
int v7; // edx
int v8; // ebx
long long v9; // rax
unsigned long long v10; // rcx
long long v11; // r12
long long *v12; // r14
long long v13; // r13
long long v14; // rax
long long v15; // rcx
v5 = *(_DWORD **)(a1 + 56);
++*v5;
v6 = JS_NewObjectFromShape(a1, v5, 2u);
v8 = v7;
if ( v7 == 6 )
{
v9 = 0LL;
v10 = 0LL;
}
else
{
v11 = v6;
if ( a2 <= 0 )
{
LABEL_9:
v10 = v11 & 0xFFFFFFFF00000000LL;
v9 = (unsigned int)v11;
}
else
{
v12 = (long long *)(a3 + 8);
v13 = 0LL;
while ( 1 )
{
v14 = *(v12 - 1);
v15 = *v12;
if ( (unsigned int)*v12 >= 0xFFFFFFF7 )
++*(_DWORD *)*(v12 - 1);
if ( (int)JS_DefinePropertyValueValue(a1, v11, v8, v13, 0, 7, v14, v15) < 0 )
break;
++v13;
v12 += 2;
if ( a2 == v13 )
goto LABEL_9;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v11);
v9 = 0LL;
v10 = 0LL;
}
}
return v10 | v9;
}
| js_create_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV EBP,ESI
MOV R15,RDI
MOV RSI,qword ptr [RDI + 0x38]
INC dword ptr [RSI]
PUSH 0x2
POP RDX
CALL 0x0010f516
MOV RBX,RDX
PUSH 0x6
POP RDX
CMP EBX,0x6
JNZ 0x00110b3d
XOR EAX,EAX
XOR ECX,ECX
MOV RBX,RDX
JMP 0x00110bcb
LAB_00110b3d:
MOV R12,RAX
TEST EBP,EBP
JLE 0x00110ba0
MOV EBP,EBP
ADD R14,0x8
XOR R13D,R13D
LAB_00110b4d:
MOV RAX,qword ptr [R14 + -0x8]
MOV RCX,qword ptr [R14]
MOV qword ptr [RSP + 0x18],RAX
CMP ECX,-0x9
JC 0x00110b65
MOV RDX,qword ptr [RSP + 0x18]
INC dword ptr [RDX]
LAB_00110b65:
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RCX
MOVUPS XMM0,xmmword ptr [RSP + 0x18]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
MOV RSI,R12
MOV RDX,RBX
MOV RCX,R13
XOR R8D,R8D
PUSH 0x7
POP R9
CALL 0x00126b2d
TEST EAX,EAX
JS 0x00110bb5
INC R13
ADD R14,0x10
CMP RBP,R13
JNZ 0x00110b4d
LAB_00110ba0:
MOV RAX,-0x100000000
MOV RCX,R12
AND RCX,RAX
MOV EAX,R12D
JMP 0x00110bcb
LAB_00110bb5:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R12
MOV RDX,RBX
CALL 0x0011d8c6
XOR EAX,EAX
XOR ECX,ECX
PUSH 0x6
POP RBX
LAB_00110bcb:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_create_array(long param_1,uint param_2,long param_3)
{
int *piVar1;
int8 uVar2;
int iVar3;
ulong uVar4;
int8 uVar5;
ulong uVar6;
int8 *puVar7;
int1 auVar8 [16];
int4 local_40;
piVar1 = *(int **)(param_1 + 0x38);
*piVar1 = *piVar1 + 1;
auVar8 = JS_NewObjectFromShape(param_1,piVar1,2);
uVar5 = auVar8._8_8_;
uVar4 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
uVar4 = 0;
uVar6 = 0;
uVar5 = 6;
}
else {
if (0 < (int)param_2) {
puVar7 = (int8 *)(param_3 + 8);
uVar6 = 0;
do {
piVar1 = (int *)puVar7[-1];
uVar2 = *puVar7;
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
local_40 = SUB84(piVar1,0);
iVar3 = JS_DefinePropertyValueValue(param_1,uVar4,uVar5,uVar6,0,7,local_40,(uint)uVar2);
if (iVar3 < 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar5);
uVar4 = 0;
uVar6 = 0;
uVar5 = 6;
goto LAB_00110bcb;
}
uVar6 = uVar6 + 1;
puVar7 = puVar7 + 2;
} while (param_2 != uVar6);
}
uVar6 = uVar4 & 0xffffffff00000000;
uVar4 = uVar4 & 0xffffffff;
}
LAB_00110bcb:
auVar8._0_8_ = uVar4 | uVar6;
auVar8._8_8_ = uVar5;
return auVar8;
}
| |
41,785 | js_create_array | bluesky950520[P]quickjs/quickjs.c | static JSValue js_create_array(JSContext *ctx, int len, JSValue *tab)
{
JSValue obj;
int i;
obj = JS_NewArray(ctx);
if (JS_IsException(obj))
return JS_EXCEPTION;
for(i = 0; i < len; i++) {
if (JS_CreateDataPropertyUint32(ctx, obj, i, js_dup(tab[i]), 0) < 0) {
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
}
return obj;
} | O2 | c | js_create_array:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbp
movl %esi, %ebx
movq %rdi, %r13
callq 0x1b2bb
movq %rdx, %r15
xorl %r14d, %r14d
cmpl $0x6, %r15d
je 0x3a335
movq %rax, %r12
testl %ebx, %ebx
cmovlel %r14d, %ebx
addq $0x8, %rbp
cmpq %r14, %rbx
je 0x3a33c
movq -0x8(%rbp), %r8
movq (%rbp), %r9
cmpl $-0x9, %r9d
jb 0x3a304
incl (%r8)
andl $0x0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3a367
incq %r14
addq $0x10, %rbp
testl %eax, %eax
jns 0x3a2ee
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1801e
xorl %r14d, %r14d
xorl %eax, %eax
pushq $0x6
popq %rdx
jmp 0x3a352
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq %r12, %rax
andq %rcx, %rax
movl %r12d, %r14d
movq %r15, %rdx
orq %rax, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_create_array:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbp, rdx
mov ebx, esi
mov r13, rdi
call JS_NewArray
mov r15, rdx
xor r14d, r14d
cmp r15d, 6
jz short loc_3A335
mov r12, rax
test ebx, ebx
cmovle ebx, r14d
add rbp, 8
loc_3A2EE:
cmp rbx, r14
jz short loc_3A33C
mov r8, [rbp-8]
mov r9, [rbp+0]
cmp r9d, 0FFFFFFF7h
jb short loc_3A304
inc dword ptr [r8]
loc_3A304:
and [rsp+38h+var_38], 0
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
call JS_CreateDataPropertyUint32
inc r14
add rbp, 10h
test eax, eax
jns short loc_3A2EE
mov rdi, r13
mov rsi, r12
mov rdx, r15
call JS_FreeValue
xor r14d, r14d
loc_3A335:
xor eax, eax
push 6
pop rdx
jmp short loc_3A352
loc_3A33C:
mov rcx, 0FFFFFFFF00000000h
mov rax, r12
and rax, rcx
mov r14d, r12d
mov rdx, r15
loc_3A352:
or r14, rax
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_create_array(long long a1, int a2, long long a3)
{
long long v4; // rbx
long long v5; // rax
long long v6; // rdx
long long v7; // r15
long long v8; // r14
long long v9; // r12
long long *v10; // rbp
_DWORD *v11; // r8
long long v12; // r9
int DataPropertyUint32; // eax
unsigned long long v14; // rax
v4 = (unsigned int)a2;
v5 = JS_NewArray(a1);
v7 = v6;
v8 = 0LL;
if ( (_DWORD)v6 == 6 )
{
LABEL_10:
v14 = 0LL;
}
else
{
v9 = v5;
if ( a2 <= 0 )
v4 = 0LL;
v10 = (long long *)(a3 + 8);
while ( v4 != v8 )
{
v11 = (_DWORD *)*(v10 - 1);
v12 = *v10;
if ( (unsigned int)*v10 >= 0xFFFFFFF7 )
++*v11;
DataPropertyUint32 = JS_CreateDataPropertyUint32(a1, v9, v7, v8++, (_DWORD)v11, v12, 0);
v10 += 2;
if ( DataPropertyUint32 < 0 )
{
JS_FreeValue(a1, v9, v7);
v8 = 0LL;
goto LABEL_10;
}
}
v14 = v9 & 0xFFFFFFFF00000000LL;
v8 = (unsigned int)v9;
}
return v14 | v8;
}
| js_create_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBP,RDX
MOV EBX,ESI
MOV R13,RDI
CALL 0x0011b2bb
MOV R15,RDX
XOR R14D,R14D
CMP R15D,0x6
JZ 0x0013a335
MOV R12,RAX
TEST EBX,EBX
CMOVLE EBX,R14D
ADD RBP,0x8
LAB_0013a2ee:
CMP RBX,R14
JZ 0x0013a33c
MOV R8,qword ptr [RBP + -0x8]
MOV R9,qword ptr [RBP]
CMP R9D,-0x9
JC 0x0013a304
INC dword ptr [R8]
LAB_0013a304:
AND dword ptr [RSP],0x0
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
CALL 0x0013a367
INC R14
ADD RBP,0x10
TEST EAX,EAX
JNS 0x0013a2ee
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL 0x0011801e
XOR R14D,R14D
LAB_0013a335:
XOR EAX,EAX
PUSH 0x6
POP RDX
JMP 0x0013a352
LAB_0013a33c:
MOV RCX,-0x100000000
MOV RAX,R12
AND RAX,RCX
MOV R14D,R12D
MOV RDX,R15
LAB_0013a352:
OR R14,RAX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_create_array(int8 param_1,uint param_2,long param_3)
{
int *piVar1;
int8 uVar2;
int iVar3;
ulong in_RAX;
int8 uVar4;
ulong uVar5;
int8 *puVar6;
ulong uVar7;
ulong uVar8;
int1 auVar9 [16];
auVar9 = JS_NewArray();
uVar4 = auVar9._8_8_;
uVar8 = auVar9._0_8_;
uVar7 = 0;
if (auVar9._8_4_ != 6) {
uVar5 = (ulong)param_2;
if ((int)param_2 < 1) {
uVar5 = uVar7;
}
puVar6 = (int8 *)(param_3 + 8);
do {
if (uVar5 == uVar7) {
uVar7 = uVar8 & 0xffffffff00000000;
uVar8 = uVar8 & 0xffffffff;
goto LAB_0013a352;
}
piVar1 = (int *)puVar6[-1];
uVar2 = *puVar6;
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
in_RAX = in_RAX & 0xffffffff00000000;
iVar3 = JS_CreateDataPropertyUint32(param_1,uVar8,uVar4,uVar7,piVar1,uVar2,in_RAX);
uVar7 = uVar7 + 1;
puVar6 = puVar6 + 2;
} while (-1 < iVar3);
JS_FreeValue(param_1,uVar8,uVar4);
}
uVar8 = 0;
uVar7 = 0;
uVar4 = 6;
LAB_0013a352:
auVar9._8_8_ = uVar4;
auVar9._0_8_ = uVar8 | uVar7;
return auVar9;
}
| |
41,786 | get_charset_by_name | eloqsql/mysys/charset.c | CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags)
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
return my_collation_get_by_name(&loader, cs_name, flags);
} | O3 | c | get_charset_by_name:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rsi, %rdx
movq %rdi, %rsi
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq -0xb8(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0x10d0(%rip), %rax # 0x27ace
movq %rax, 0x80(%rdi)
leaq -0x10cf(%rip), %rax # 0x27add
movq %rax, 0x88(%rdi)
leaq -0x10c2(%rip), %rax # 0x27af8
movq %rax, 0x90(%rdi)
leaq -0x259a(%rip), %rax # 0x2662e
movq %rax, 0x98(%rdi)
leaq 0x2c5c52(%rip), %rax # 0x2ee828
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0x10d1(%rip), %rax # 0x27b16
movq %rax, 0xa8(%rdi)
callq 0x28a48
movq %fs:0x28, %rcx
cmpq -0x8(%rbp), %rcx
jne 0x28c0b
addq $0xc0, %rsp
popq %rbp
retq
callq 0x242e0
| get_charset_by_name:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rdx, rsi
mov rsi, rdi
mov rax, fs:28h
mov [rbp+var_8], rax
lea rdi, [rbp+var_B8]
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
call my_collation_get_by_name
mov rcx, fs:28h
cmp rcx, [rbp+var_8]
jnz short loc_28C0B
add rsp, 0C0h
pop rbp
retn
loc_28C0B:
call ___stack_chk_fail
| long long get_charset_by_name(long long a1, long long a2)
{
_BYTE v3[128]; // [rsp+8h] [rbp-B8h] BYREF
long long ( *v4)(long long); // [rsp+88h] [rbp-38h]
long long ( *v5)(unsigned long long); // [rsp+90h] [rbp-30h]
long long ( *v6)(long long, unsigned long long); // [rsp+98h] [rbp-28h]
long long ( *v7)(long long); // [rsp+A0h] [rbp-20h]
long long ( *v8)(); // [rsp+A8h] [rbp-18h]
long long ( *v9)(unsigned int *); // [rsp+B0h] [rbp-10h]
unsigned long long v10; // [rsp+B8h] [rbp-8h]
v10 = __readfsqword(0x28u);
v3[0] = 0;
v4 = my_once_alloc_c;
v5 = my_malloc_c;
v6 = my_realloc_c;
v7 = my_free;
v8 = my_charset_error_reporter;
v9 = add_collation;
return my_collation_get_by_name((long long)v3, a1, a2);
}
| get_charset_by_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV RDX,RSI
MOV RSI,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[RBP + -0xb8]
MOV byte ptr [RDI],0x0
LEA RAX,[0x127ace]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x127add]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x127af8]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x12662e]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x3ee828]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x127b16]
MOV qword ptr [RDI + 0xa8],RAX
CALL 0x00128a48
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x8]
JNZ 0x00128c0b
ADD RSP,0xc0
POP RBP
RET
LAB_00128c0b:
CALL 0x001242e0
|
void get_charset_by_name(int8 param_1,int8 param_2)
{
long in_FS_OFFSET;
int1 local_c0 [128];
code *local_40;
code *local_38;
code *local_30;
code *local_28;
int *local_20;
code *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_c0[0] = 0;
local_40 = my_once_alloc_c;
local_38 = my_malloc_c;
local_30 = my_realloc_c;
local_28 = my_free;
local_20 = my_charset_error_reporter;
local_18 = add_collation;
my_collation_get_by_name(local_c0,param_1,param_2);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
41,787 | ma_get_dynamic | eloqsql/libmariadb/libmariadb/ma_array.c | void ma_get_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx)
{
if (idx >= array->elements)
{
memset(element, 0, array->size_of_element);
return;
}
memcpy(element,array->buffer+idx*array->size_of_element,
(size_t) array->size_of_element);
} | O0 | c | ma_get_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jb 0x43a15
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x13250
jmp 0x43a3e
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x13360
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_get_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
cmp eax, [rcx+8]
jb short loc_43A15
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
xor esi, esi
call _memset
jmp short loc_43A3E
loc_43A15:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
add rsi, rax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
loc_43A3E:
add rsp, 20h
pop rbp
retn
| long long ma_get_dynamic(long long a1, long long a2, unsigned int a3)
{
if ( a3 < *(_DWORD *)(a1 + 8) )
return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20));
else
return memset(a2, 0LL, *(unsigned int *)(a1 + 20));
}
| ma_get_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x8]
JC 0x00143a15
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00113250
JMP 0x00143a3e
LAB_00143a15:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x00113360
LAB_00143a3e:
ADD RSP,0x20
POP RBP
RET
|
void ma_get_dynamic(long *param_1,void *param_2,uint param_3)
{
if (param_3 < *(uint *)(param_1 + 1)) {
memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),
(ulong)*(uint *)((long)param_1 + 0x14));
}
else {
memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14));
}
return;
}
| |
41,788 | binding_system_is_descendant_scope | tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c | bool binding_system_is_descendant_scope(BindingSystem* system, uint64_t scope_id, uint64_t ancestor_id) {
assert(system != NULL);
// Check if scope_id is the same as ancestor_id
if (scope_id == ancestor_id) {
return true;
}
// Check if scope_id is a descendant of ancestor_id
uint64_t parent_id = binding_system_get_parent_scope(system, scope_id);
while (parent_id != 0) {
if (parent_id == ancestor_id) {
return true;
}
parent_id = binding_system_get_parent_scope(system, parent_id);
}
// Not a descendant
return false;
} | O0 | c | binding_system_is_descendant_scope:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xb6cd
jmp 0xb6ec
leaq 0x66ab(%rip), %rdi # 0x11d7f
leaq 0x66b3(%rip), %rsi # 0x11d8e
movl $0x94, %edx
leaq 0x67ad(%rip), %rcx # 0x11e94
callq 0x10a0
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xb6fc
movb $0x1, -0x1(%rbp)
jmp 0xb73b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xb750
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xb737
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xb724
movb $0x1, -0x1(%rbp)
jmp 0xb73b
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xb750
movq %rax, -0x28(%rbp)
jmp 0xb70d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| binding_system_is_descendant_scope:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_10], 0
jz short loc_B6CD
jmp short loc_B6EC
loc_B6CD:
lea rdi, aSystemNull; "system != NULL"
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
mov edx, 94h
lea rcx, aBoolBindingSys_0; "_Bool binding_system_is_descendant_scop"...
call ___assert_fail
loc_B6EC:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_B6FC
mov [rbp+var_1], 1
jmp short loc_B73B
loc_B6FC:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call binding_system_get_parent_scope
mov [rbp+var_28], rax
loc_B70D:
cmp [rbp+var_28], 0
jz short loc_B737
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnz short loc_B724
mov [rbp+var_1], 1
jmp short loc_B73B
loc_B724:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
call binding_system_get_parent_scope
mov [rbp+var_28], rax
jmp short loc_B70D
loc_B737:
mov [rbp+var_1], 0
loc_B73B:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
| char binding_system_is_descendant_scope(long long a1, long long a2, long long a3)
{
long long i; // [rsp+8h] [rbp-28h]
if ( !a1 )
__assert_fail(
"system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c",
148LL,
"_Bool binding_system_is_descendant_scope(BindingSystem *, uint64_t, uint64_t)");
if ( a2 == a3 )
return 1;
for ( i = binding_system_get_parent_scope(a1, a2); i; i = binding_system_get_parent_scope(a1, i) )
{
if ( i == a3 )
return 1;
}
return 0;
}
| binding_system_is_descendant_scope:
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
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0010b6cd
JMP 0x0010b6ec
LAB_0010b6cd:
LEA RDI,[0x111d7f]
LEA RSI,[0x111d8e]
MOV EDX,0x94
LEA RCX,[0x111e94]
CALL 0x001010a0
LAB_0010b6ec:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0010b6fc
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0010b73b
LAB_0010b6fc:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0010b750
MOV qword ptr [RBP + -0x28],RAX
LAB_0010b70d:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0010b737
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0010b724
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0010b73b
LAB_0010b724:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0010b750
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0010b70d
LAB_0010b737:
MOV byte ptr [RBP + -0x1],0x0
LAB_0010b73b:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x30
POP RBP
RET
|
int1 binding_system_is_descendant_scope(long param_1,long param_2,long param_3)
{
long lVar1;
int1 local_9;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c"
,0x94,
"_Bool binding_system_is_descendant_scope(BindingSystem *, uint64_t, uint64_t)");
}
if (param_2 == param_3) {
local_9 = 1;
}
else {
for (lVar1 = binding_system_get_parent_scope(param_1,param_2); lVar1 != 0;
lVar1 = binding_system_get_parent_scope(param_1,lVar1)) {
if (lVar1 == param_3) {
return 1;
}
}
local_9 = 0;
}
return local_9;
}
| |
41,789 | my_close | eloqsql/mysys/my_open.c | int my_close(File fd, myf MyFlags)
{
int err;
char *name= NULL;
DBUG_ENTER("my_close");
DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE)))
MyFlags|= my_global_flags;
if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN)
{
name= my_file_info[fd].name;
my_file_info[fd].name= NULL;
my_file_info[fd].type= UNOPEN;
}
#ifndef _WIN32
err= close(fd);
#else
err= my_win_close(fd);
#endif
if (err)
{
DBUG_PRINT("error",("Got error %d on close",err));
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
name,errno);
}
if (name)
{
my_free(name);
}
my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED);
DBUG_RETURN(err);
} | O0 | c | my_close:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
jmp 0x2fc79
movq -0x10(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
jne 0x2fc99
leaq 0x3560fa(%rip), %rax # 0x385d88
movq (%rax), %rax
orq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
leaq 0x19e6bd(%rip), %rcx # 0x1ce360
cmpl (%rcx), %eax
jae 0x2fd16
leaq 0x19e6ba(%rip), %rax # 0x1ce368
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0x2fd16
leaq 0x19e69f(%rip), %rax # 0x1ce368
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
leaq 0x19e683(%rip), %rax # 0x1ce368
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
leaq 0x19e667(%rip), %rax # 0x1ce368
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movl -0x4(%rbp), %edi
callq 0x24590
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x2fd84
jmp 0x2fd29
jmp 0x2fd2b
callq 0x24040
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0x26ab0
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0x2fd82
movq -0x10(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x24040
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl (%rax), %ecx
movl $0x4, %edi
movb $0x0, %al
callq 0x2e5f0
jmp 0x2fd84
cmpq $0x0, -0x20(%rbp)
je 0x2fd94
movq -0x20(%rbp), %rdi
callq 0x2f7f0
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movl -0x24(%rbp), %eax
leaq 0x355fef(%rip), %rcx # 0x385d94
lock
xaddl %eax, (%rcx)
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_close:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_20], 0
jmp short $+2
loc_2FC79:
mov rax, [rbp+var_10]
and rax, 18h
cmp rax, 0
jnz short loc_2FC99
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_10]
mov [rbp+var_10], rax
loc_2FC99:
mov eax, [rbp+var_4]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_2FD16
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jz short loc_2FD16
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_20], rax
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
mov qword ptr [rax], 0
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_4]
shl rcx, 4
add rax, rcx
mov dword ptr [rax+8], 0
loc_2FD16:
mov edi, [rbp+var_4]
call _close
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jz short loc_2FD84
jmp short $+2
loc_2FD29:
jmp short $+2
loc_2FD2B:
call ___errno_location
mov eax, [rax]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 18h
cmp rax, 0
jz short loc_2FD82
mov rax, [rbp+var_10]
and rax, 440h
or rax, 4
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
call ___errno_location
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
mov ecx, [rax]
mov edi, 4
mov al, 0
call my_error
loc_2FD82:
jmp short $+2
loc_2FD84:
cmp [rbp+var_20], 0
jz short loc_2FD94
mov rdi, [rbp+var_20]
call my_free
loc_2FD94:
mov [rbp+var_24], 0FFFFFFFFh
mov eax, [rbp+var_24]
lea rcx, my_file_opened
lock xadd [rcx], eax
mov [rbp+var_28], eax
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
| long long my_close(unsigned int a1, __int16 a2)
{
unsigned int *v2; // rax
int v4; // [rsp+24h] [rbp-2Ch]
long long v5; // [rsp+30h] [rbp-20h]
unsigned int v6; // [rsp+3Ch] [rbp-14h]
__int16 v7; // [rsp+40h] [rbp-10h]
v7 = a2;
v5 = 0LL;
if ( (a2 & 0x18) == 0 )
v7 = a2 | my_global_flags;
if ( a1 < my_file_limit && *((_DWORD *)my_file_info + 4 * (int)a1 + 2) )
{
v5 = *((_QWORD *)my_file_info + 2 * (int)a1);
*((_QWORD *)my_file_info + 2 * (int)a1) = 0LL;
*((_DWORD *)my_file_info + 4 * (int)a1 + 2) = 0;
}
v6 = close(a1);
if ( v6 )
{
v4 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v4;
if ( (v7 & 0x18) != 0 )
{
v2 = (unsigned int *)__errno_location();
my_error(4u, v7 & 0x440 | 4LL, v5, *v2);
}
}
if ( v5 )
my_free(v5);
_InterlockedExchangeAdd(my_file_opened, 0xFFFFFFFF);
return v6;
}
| my_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x20],0x0
JMP 0x0012fc79
LAB_0012fc79:
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x18
CMP RAX,0x0
JNZ 0x0012fc99
LEA RAX,[0x485d88]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
LAB_0012fc99:
MOV EAX,dword ptr [RBP + -0x4]
LEA RCX,[0x2ce360]
CMP EAX,dword ptr [RCX]
JNC 0x0012fd16
LEA RAX,[0x2ce368]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JZ 0x0012fd16
LEA RAX,[0x2ce368]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x2ce368]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RAX],0x0
LEA RAX,[0x2ce368]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
SHL RCX,0x4
ADD RAX,RCX
MOV dword ptr [RAX + 0x8],0x0
LAB_0012fd16:
MOV EDI,dword ptr [RBP + -0x4]
CALL 0x00124590
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x0012fd84
JMP 0x0012fd29
LAB_0012fd29:
JMP 0x0012fd2b
LAB_0012fd2b:
CALL 0x00124040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x00126ab0
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x18
CMP RAX,0x0
JZ 0x0012fd82
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
CALL 0x00124040
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX]
MOV EDI,0x4
MOV AL,0x0
CALL 0x0012e5f0
LAB_0012fd82:
JMP 0x0012fd84
LAB_0012fd84:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0012fd94
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012f7f0
LAB_0012fd94:
MOV dword ptr [RBP + -0x24],0xffffffff
MOV EAX,dword ptr [RBP + -0x24]
LEA RCX,[0x485d94]
XADD.LOCK dword ptr [RCX],EAX
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
|
int my_close(uint param_1,ulong param_2)
{
int iVar1;
int iVar2;
int *piVar3;
long local_28;
ulong local_18;
local_28 = 0;
local_18 = param_2;
if ((param_2 & 0x18) == 0) {
local_18 = my_global_flags | param_2;
}
if ((param_1 < my_file_limit) && (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) != 0)) {
local_28 = *(long *)(my_file_info + (long)(int)param_1 * 0x10);
*(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = 0;
*(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = 0;
}
iVar2 = close(param_1);
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((local_18 & 0x18) != 0) {
piVar3 = __errno_location();
my_error(4,local_18 & 0x440 | 4,local_28,*piVar3);
}
}
if (local_28 != 0) {
my_free(local_28);
}
LOCK();
my_file_opened = my_file_opened + -1;
UNLOCK();
return iVar2;
}
| |
41,790 | my_close | eloqsql/mysys/my_open.c | int my_close(File fd, myf MyFlags)
{
int err;
char *name= NULL;
DBUG_ENTER("my_close");
DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE)))
MyFlags|= my_global_flags;
if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN)
{
name= my_file_info[fd].name;
my_file_info[fd].name= NULL;
my_file_info[fd].type= UNOPEN;
}
#ifndef _WIN32
err= close(fd);
#else
err= my_win_close(fd);
#endif
if (err)
{
DBUG_PRINT("error",("Got error %d on close",err));
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
name,errno);
}
if (name)
{
my_free(name);
}
my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED);
DBUG_RETURN(err);
} | O3 | c | my_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
xorl %ebx, %ebx
movl $0x0, %r14d
testb $0x18, %r12b
jne 0x2ba02
leaq 0x33a839(%rip), %rax # 0x366238
movq (%rax), %r14
leaq 0x2c3957(%rip), %rax # 0x2ef360
cmpl %edi, (%rax)
jbe 0x2ba41
leaq 0x2c3954(%rip), %rax # 0x2ef368
movq (%rax), %rdx
movslq %edi, %rcx
shlq $0x4, %rcx
cmpl $0x0, 0x8(%rdx,%rcx)
je 0x2ba3f
addq %rcx, %rdx
movq (%rdx), %rbx
movq $0x0, (%rdx)
movq (%rax), %rax
movl $0x0, 0x8(%rax,%rcx)
jmp 0x2ba41
xorl %ebx, %ebx
callq 0x245e0
movl %eax, %r15d
testl %eax, %eax
je 0x2ba8a
orq %r12, %r14
callq 0x24050
movq %rax, %r12
movl (%rax), %r13d
callq 0x2686a
movl %r13d, (%rax)
testb $0x18, %r14b
je 0x2ba8a
andl $0x440, %r14d # imm = 0x440
orq $0x4, %r14
movl (%r12), %ecx
movl $0x4, %edi
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2ab8f
testq %rbx, %rbx
je 0x2ba97
movq %rbx, %rdi
callq 0x2b702
leaq 0x33a7a6(%rip), %rax # 0x366244
lock
decl (%rax)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| my_close:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rsi
xor ebx, ebx
mov r14d, 0
test r12b, 18h
jnz short loc_2BA02
lea rax, my_global_flags
mov r14, [rax]
loc_2BA02:
lea rax, my_file_limit
cmp [rax], edi
jbe short loc_2BA41
lea rax, my_file_info
mov rdx, [rax]
movsxd rcx, edi
shl rcx, 4
cmp dword ptr [rdx+rcx+8], 0
jz short loc_2BA3F
add rdx, rcx
mov rbx, [rdx]
mov qword ptr [rdx], 0
mov rax, [rax]
mov dword ptr [rax+rcx+8], 0
jmp short loc_2BA41
loc_2BA3F:
xor ebx, ebx
loc_2BA41:
call _close
mov r15d, eax
test eax, eax
jz short loc_2BA8A
or r14, r12
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r14b, 18h
jz short loc_2BA8A
and r14d, 440h
or r14, 4
mov ecx, [r12]
mov edi, 4
mov rsi, r14
mov rdx, rbx
xor eax, eax
call my_error
loc_2BA8A:
test rbx, rbx
jz short loc_2BA97
mov rdi, rbx
call my_free
loc_2BA97:
lea rax, my_file_opened
lock dec dword ptr [rax]
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_close(long long a1, long long a2)
{
long long v2; // rbx
__int16 v3; // r14
long long v4; // rcx
unsigned int v5; // r15d
__int16 v6; // r14
unsigned int *v7; // r12
unsigned int v8; // r13d
v2 = 0LL;
v3 = 0;
if ( (a2 & 0x18) == 0 )
v3 = my_global_flags;
if ( my_file_limit > (unsigned int)a1 )
{
v4 = 16LL * (int)a1;
if ( *(_DWORD *)((char *)my_file_info + v4 + 8) )
{
v2 = *(_QWORD *)((char *)my_file_info + v4);
*(_QWORD *)((char *)my_file_info + v4) = 0LL;
*(_DWORD *)((char *)my_file_info + v4 + 8) = 0;
}
else
{
v2 = 0LL;
}
}
v5 = close(a1);
if ( v5 )
{
v6 = a2 | v3;
v7 = (unsigned int *)__errno_location(a1, a2);
v8 = *v7;
*(_DWORD *)my_thread_var() = v8;
if ( (v6 & 0x18) != 0 )
my_error(4u, v6 & 0x440 | 4, v2, *v7);
}
if ( v2 )
my_free(v2);
_InterlockedDecrement(my_file_opened);
return v5;
}
| my_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RSI
XOR EBX,EBX
MOV R14D,0x0
TEST R12B,0x18
JNZ 0x0012ba02
LEA RAX,[0x466238]
MOV R14,qword ptr [RAX]
LAB_0012ba02:
LEA RAX,[0x3ef360]
CMP dword ptr [RAX],EDI
JBE 0x0012ba41
LEA RAX,[0x3ef368]
MOV RDX,qword ptr [RAX]
MOVSXD RCX,EDI
SHL RCX,0x4
CMP dword ptr [RDX + RCX*0x1 + 0x8],0x0
JZ 0x0012ba3f
ADD RDX,RCX
MOV RBX,qword ptr [RDX]
MOV qword ptr [RDX],0x0
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + RCX*0x1 + 0x8],0x0
JMP 0x0012ba41
LAB_0012ba3f:
XOR EBX,EBX
LAB_0012ba41:
CALL 0x001245e0
MOV R15D,EAX
TEST EAX,EAX
JZ 0x0012ba8a
OR R14,R12
CALL 0x00124050
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x0012686a
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x0012ba8a
AND R14D,0x440
OR R14,0x4
MOV ECX,dword ptr [R12]
MOV EDI,0x4
MOV RSI,R14
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0012ab8f
LAB_0012ba8a:
TEST RBX,RBX
JZ 0x0012ba97
MOV RDI,RBX
CALL 0x0012b702
LAB_0012ba97:
LEA RAX,[0x466244]
DEC.LOCK dword ptr [RAX]
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_close(uint param_1,ulong param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
long lVar5;
long lVar6;
ulong uVar7;
lVar6 = 0;
uVar7 = 0;
if ((param_2 & 0x18) == 0) {
uVar7 = my_global_flags;
}
if (param_1 < my_file_limit) {
lVar5 = (long)(int)param_1 * 0x10;
if (*(int *)(my_file_info + lVar5 + 8) == 0) {
lVar6 = 0;
}
else {
lVar6 = *(long *)(my_file_info + lVar5);
*(long *)(my_file_info + lVar5) = 0;
*(int4 *)(my_file_info + lVar5 + 8) = 0;
}
}
iVar2 = close(param_1);
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if (((uVar7 | param_2) & 0x18) != 0) {
my_error(4,(uint)(uVar7 | param_2) & 0x440 | 4,lVar6,*piVar3);
}
}
if (lVar6 != 0) {
my_free(lVar6);
}
LOCK();
my_file_opened = my_file_opened + -1;
UNLOCK();
return iVar2;
}
| |
41,791 | nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) | ng-log[P]ng-log/src/logging.cc | void LogMessage::RecordCrashReason(internal::CrashReason* reason) {
reason->filename = fatal_msg_data_exclusive.fullname_;
reason->line_number = fatal_msg_data_exclusive.line_;
reason->message = fatal_msg_data_exclusive.message_text_ +
fatal_msg_data_exclusive.num_prefix_chars_;
#ifdef HAVE_STACKTRACE
// Retrieve the stack trace, omitting the logging frames that got us here.
reason->depth = GetStackTrace(reason->stack, ARRAYSIZE(reason->stack), 4);
#else
reason->depth = 0;
#endif
} | O0 | cpp | nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x68fe1(%rip), %rcx # 0x7a778
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl 0x68f98(%rip), %ecx # 0x7a73c
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
leaq 0x618ee(%rip), %rcx # 0x730a0
addq $0x4, %rcx
addq 0x68f9b(%rip), %rcx # 0x7a758
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movl $0x20, %esi
movl $0x4, %edx
callq 0x4a800
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x118(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
| _ZN5nglog10LogMessage17RecordCrashReasonEPNS_8internal11CrashReasonE:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rcx, cs:qword_7A778
mov rax, [rbp+var_10]
mov [rax], rcx
mov ecx, cs:dword_7A73C
mov rax, [rbp+var_10]
mov [rax+8], ecx
lea rcx, _ZN5nglogL24fatal_msg_data_exclusiveE; nglog::fatal_msg_data_exclusive
add rcx, 4
add rcx, cs:qword_7A758; int
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rdi, [rbp+var_10]
add rdi, 18h; this
mov esi, offset qword_20; void **
mov edx, 4; int
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+118h], ecx
add rsp, 10h
pop rbp
retn
| nglog::internal::CrashReason * nglog::LogMessage::RecordCrashReason(
nglog::LogMessage *this,
nglog::internal::CrashReason *a2)
{
char *v2; // rcx
int StackTrace; // ecx
nglog::internal::CrashReason *result; // rax
*(_QWORD *)a2 = qword_7A778;
*((_DWORD *)a2 + 2) = dword_7A73C;
v2 = (char *)&nglog::fatal_msg_data_exclusive + qword_7A758 + 4;
*((_QWORD *)a2 + 2) = v2;
StackTrace = nglog::tools::GetStackTrace(
(nglog::internal::CrashReason *)((char *)a2 + 24),
(void **)&qword_20,
4,
(int)v2);
result = a2;
*((_DWORD *)a2 + 70) = StackTrace;
return result;
}
| RecordCrashReason:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RCX,qword ptr [0x0017a778]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [0x0017a73c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x8],ECX
LEA RCX,[0x1730a0]
ADD RCX,0x4
ADD RCX,qword ptr [0x0017a758]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x18
MOV ESI,0x20
MOV EDX,0x4
CALL 0x0014a800
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x118],ECX
ADD RSP,0x10
POP RBP
RET
|
/* nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) */
void __thiscall nglog::LogMessage::RecordCrashReason(LogMessage *this,CrashReason *param_1)
{
int4 uVar1;
*(int8 *)param_1 = fatal_msg_data_exclusive._30424_8_;
*(int4 *)(param_1 + 8) = fatal_msg_data_exclusive._30364_4_;
*(long *)(param_1 + 0x10) = fatal_msg_data_exclusive._30392_8_ + 0x1730a4;
uVar1 = tools::GetStackTrace((void **)(param_1 + 0x18),0x20,4);
*(int4 *)(param_1 + 0x118) = uVar1;
return;
}
| |
41,792 | nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) | ng-log[P]ng-log/src/logging.cc | void LogMessage::RecordCrashReason(internal::CrashReason* reason) {
reason->filename = fatal_msg_data_exclusive.fullname_;
reason->line_number = fatal_msg_data_exclusive.line_;
reason->message = fatal_msg_data_exclusive.message_text_ +
fatal_msg_data_exclusive.num_prefix_chars_;
#ifdef HAVE_STACKTRACE
// Retrieve the stack trace, omitting the logging frames that got us here.
reason->depth = GetStackTrace(reason->stack, ARRAYSIZE(reason->stack), 4);
#else
reason->depth = 0;
#endif
} | O1 | cpp | nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*):
pushq %rbx
movq %rsi, %rbx
leaq 0x24de7(%rip), %rax # 0x2fe90
movq 0x2c4b8(%rip), %rcx # 0x37568
movq %rcx, (%rsi)
movl 0x2c473(%rip), %ecx # 0x3752c
movl %ecx, 0x8(%rsi)
movq 0x2c485(%rip), %rcx # 0x37548
leaq 0x4(%rcx,%rax), %rax
movq %rax, 0x10(%rsi)
leaq 0x18(%rsi), %rdi
movl $0x20, %esi
movl $0x4, %edx
callq 0x20650
movl %eax, 0x118(%rbx)
popq %rbx
retq
nop
| _ZN5nglog10LogMessage17RecordCrashReasonEPNS_8internal11CrashReasonE:
push rbx
mov rbx, rsi
lea rax, _ZN5nglogL24fatal_msg_data_exclusiveE; nglog::fatal_msg_data_exclusive
mov rcx, cs:qword_37568
mov [rsi], rcx
mov ecx, cs:dword_3752C
mov [rsi+8], ecx
mov rcx, cs:qword_37548; int
lea rax, [rcx+rax+4]
mov [rsi+10h], rax
lea rdi, [rsi+18h]; this
mov esi, offset qword_20; void **
mov edx, 4; int
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
mov [rbx+118h], eax
pop rbx
retn
| long long nglog::LogMessage::RecordCrashReason(long long a1, long long a2)
{
int v2; // ecx
long long result; // rax
*(_QWORD *)a2 = qword_37568;
*(_DWORD *)(a2 + 8) = dword_3752C;
v2 = qword_37548[0];
*(_QWORD *)(a2 + 16) = (char *)&nglog::fatal_msg_data_exclusive + *(_QWORD *)qword_37548 + 4;
result = nglog::tools::GetStackTrace((nglog::tools *)(a2 + 24), (void **)&qword_20, 4, v2);
*(_DWORD *)(a2 + 280) = result;
return result;
}
| RecordCrashReason:
PUSH RBX
MOV RBX,RSI
LEA RAX,[0x12fe90]
MOV RCX,qword ptr [0x00137568]
MOV qword ptr [RSI],RCX
MOV ECX,dword ptr [0x0013752c]
MOV dword ptr [RSI + 0x8],ECX
MOV RCX,qword ptr [0x00137548]
LEA RAX,[RCX + RAX*0x1 + 0x4]
MOV qword ptr [RSI + 0x10],RAX
LEA RDI,[RSI + 0x18]
MOV ESI,0x20
MOV EDX,0x4
CALL 0x00120650
MOV dword ptr [RBX + 0x118],EAX
POP RBX
RET
|
/* nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) */
void __thiscall nglog::LogMessage::RecordCrashReason(LogMessage *this,CrashReason *param_1)
{
int4 uVar1;
*(int8 *)param_1 = fatal_msg_data_exclusive._30424_8_;
*(int4 *)(param_1 + 8) = fatal_msg_data_exclusive._30364_4_;
*(long *)(param_1 + 0x10) = fatal_msg_data_exclusive._30392_8_ + 0x12fe94;
uVar1 = tools::GetStackTrace((void **)(param_1 + 0x18),0x20,4);
*(int4 *)(param_1 + 0x118) = uVar1;
return;
}
| |
41,793 | nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) | ng-log[P]ng-log/src/logging.cc | void LogMessage::RecordCrashReason(internal::CrashReason* reason) {
reason->filename = fatal_msg_data_exclusive.fullname_;
reason->line_number = fatal_msg_data_exclusive.line_;
reason->message = fatal_msg_data_exclusive.message_text_ +
fatal_msg_data_exclusive.num_prefix_chars_;
#ifdef HAVE_STACKTRACE
// Retrieve the stack trace, omitting the logging frames that got us here.
reason->depth = GetStackTrace(reason->stack, ARRAYSIZE(reason->stack), 4);
#else
reason->depth = 0;
#endif
} | O2 | cpp | nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*):
pushq %rbx
movq %rsi, %rbx
leaq 0x248cf(%rip), %rax # 0x2eef0
movq 0x2bfa0(%rip), %rcx # 0x365c8
movq %rcx, (%rsi)
movl 0x2bf5b(%rip), %ecx # 0x3658c
movl %ecx, 0x8(%rsi)
movq 0x2bf6d(%rip), %rcx # 0x365a8
leaq 0x4(%rcx,%rax), %rax
movq %rax, 0x10(%rsi)
leaq 0x18(%rsi), %rdi
pushq $0x20
popq %rsi
pushq $0x4
popq %rdx
callq 0x1bf04
movl %eax, 0x118(%rbx)
popq %rbx
retq
nop
| _ZN5nglog10LogMessage17RecordCrashReasonEPNS_8internal11CrashReasonE:
push rbx
mov rbx, rsi
lea rax, _ZN5nglogL24fatal_msg_data_exclusiveE; nglog::fatal_msg_data_exclusive
mov rcx, cs:qword_365C8
mov [rsi], rcx
mov ecx, cs:dword_3658C
mov [rsi+8], ecx
mov rcx, cs:qword_365A8; int
lea rax, [rcx+rax+4]
mov [rsi+10h], rax
lea rdi, [rsi+18h]; this
push 20h ; ' '
pop rsi; void **
push 4
pop rdx; int
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
mov [rbx+118h], eax
pop rbx
retn
| long long nglog::LogMessage::RecordCrashReason(long long a1, long long a2)
{
int v2; // ecx
long long result; // rax
*(_QWORD *)a2 = qword_365C8;
*(_DWORD *)(a2 + 8) = dword_3658C;
v2 = qword_365A8[0];
*(_QWORD *)(a2 + 16) = (char *)&nglog::fatal_msg_data_exclusive + *(_QWORD *)qword_365A8 + 4;
result = nglog::tools::GetStackTrace((nglog::tools *)(a2 + 24), (void **)&qword_20, 4, v2);
*(_DWORD *)(a2 + 280) = result;
return result;
}
| RecordCrashReason:
PUSH RBX
MOV RBX,RSI
LEA RAX,[0x12eef0]
MOV RCX,qword ptr [0x001365c8]
MOV qword ptr [RSI],RCX
MOV ECX,dword ptr [0x0013658c]
MOV dword ptr [RSI + 0x8],ECX
MOV RCX,qword ptr [0x001365a8]
LEA RAX,[RCX + RAX*0x1 + 0x4]
MOV qword ptr [RSI + 0x10],RAX
LEA RDI,[RSI + 0x18]
PUSH 0x20
POP RSI
PUSH 0x4
POP RDX
CALL 0x0011bf04
MOV dword ptr [RBX + 0x118],EAX
POP RBX
RET
|
/* nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) */
void __thiscall nglog::LogMessage::RecordCrashReason(LogMessage *this,CrashReason *param_1)
{
int4 uVar1;
*(int8 *)param_1 = fatal_msg_data_exclusive._30424_8_;
*(int4 *)(param_1 + 8) = fatal_msg_data_exclusive._30364_4_;
*(long *)(param_1 + 0x10) = fatal_msg_data_exclusive._30392_8_ + 0x12eef4;
uVar1 = tools::GetStackTrace((void **)(param_1 + 0x18),0x20,4);
*(int4 *)(param_1 + 0x118) = uVar1;
return;
}
| |
41,794 | test_bug20152 | eloqsql/tests/mysql_client_test.c | static void test_bug20152()
{
MYSQL_BIND my_bind[1];
MYSQL_STMT *stmt;
MYSQL_TIME tm;
int rc;
const char *query= "INSERT INTO t1 (f1) VALUES (?)";
myheader("test_bug20152");
memset(my_bind, 0, sizeof(my_bind));
my_bind[0].buffer_type= MYSQL_TYPE_DATE;
my_bind[0].buffer= (void*)&tm;
memset(&tm, 0, sizeof tm);
tm.year = 2006;
tm.month = 6;
tm.day = 18;
tm.hour = 14;
tm.minute = 9;
tm.second = 42;
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE t1 (f1 DATE)");
myquery(rc);
stmt= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(stmt, query, strlen(query));
check_execute(stmt, rc);
rc= mysql_stmt_bind_param(stmt, my_bind);
check_execute(stmt, rc);
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= mysql_stmt_close(stmt);
check_execute(stmt, rc);
rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc);
if (tm.hour == 14 && tm.minute == 9 && tm.second == 42) {
if (!opt_silent)
printf("OK!");
} else {
printf("[14:09:42] != [%02d:%02d:%02d]\n", tm.hour, tm.minute, tm.second);
DIE_UNLESS(0==1);
}
} | O0 | c | test_bug20152:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq 0xc29fc(%rip), %rax # 0x13fdde
movq %rax, -0xb0(%rbp)
jmp 0x7d3eb
movsbl 0x3ed0df(%rip), %eax # 0x46a4d1
cmpl $0x2, %eax
jge 0x7d473
movq 0x231bda(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xb0f1c(%rip), %rsi # 0x12e324
movb $0x0, %al
callq 0x3a1c0
movq 0x231bc2(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
movl 0x3ed2fd(%rip), %edx # 0x46a71c
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x3ed2f2(%rip) # 0x46a71c
movl 0x3ed2e8(%rip), %ecx # 0x46a718
movl 0x3ed0c5(%rip), %r8d # 0x46a4fc
leaq 0xb21ee(%rip), %rsi # 0x12f62c
leaq 0xb1caf(%rip), %r9 # 0x12f0f4
movb $0x0, %al
callq 0x3a1c0
movq 0x231b85(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xb0eff(%rip), %rsi # 0x12e35c
movb $0x0, %al
callq 0x3a1c0
movq 0x231b6d(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
callq 0x3a4a0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x3a2e0
movl $0xa, -0x10(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x3a2e0
movl $0x7d6, -0xa0(%rbp) # imm = 0x7D6
movl $0x6, -0x9c(%rbp)
movl $0x12, -0x98(%rbp)
movl $0xe, -0x94(%rbp)
movl $0x9, -0x90(%rbp)
movl $0x2a, -0x8c(%rbp)
movq 0x3ecfed(%rip), %rdi # 0x46a4d8
leaq 0xb214c(%rip), %rsi # 0x12f63e
callq 0x3b3d0
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0xb4(%rbp)
cmpl $0x0, -0xb4(%rbp)
je 0x7d51b
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0xb4(%rbp)
jne 0x7d526
jmp 0x7d53e
leaq 0xb06df(%rip), %rdi # 0x12dc0c
movl $0x3e38, %esi # imm = 0x3E38
leaq 0xc6a36(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x3ecf93(%rip), %rdi # 0x46a4d8
leaq 0xc28b1(%rip), %rsi # 0x13fdfd
callq 0x3b3d0
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0xb8(%rbp)
cmpl $0x0, -0xb8(%rbp)
je 0x7d575
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0xb8(%rbp)
jne 0x7d580
jmp 0x7d598
leaq 0xb0685(%rip), %rdi # 0x12dc0c
movl $0x3e3a, %esi # imm = 0x3E3A
leaq 0xc69dc(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x3ecf39(%rip), %rdi # 0x46a4d8
callq 0xb2790
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x3a400
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movq %rax, %rdx
callq 0x3b810
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
je 0x7d5ff
movq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xa4(%rbp)
jne 0x7d60a
jmp 0x7d622
leaq 0xb05fb(%rip), %rdi # 0x12dc0c
movl $0x3e3e, %esi # imm = 0x3E3E
leaq 0xbc1ef(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x78(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xb1100
movsbl %al, %eax
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
je 0x7d64e
movq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xa4(%rbp)
jne 0x7d659
jmp 0x7d671
leaq 0xb05ac(%rip), %rdi # 0x12dc0c
movl $0x3e40, %esi # imm = 0x3E40
leaq 0xbc1a0(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x78(%rbp), %rdi
callq 0x3b8a0
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
je 0x7d696
movq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xa4(%rbp)
jne 0x7d6a1
jmp 0x7d6b9
leaq 0xb0564(%rip), %rdi # 0x12dc0c
movl $0x3e42, %esi # imm = 0x3E42
leaq 0xbc158(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x78(%rbp), %rdi
callq 0x3b9f0
movsbl %al, %eax
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
je 0x7d6e1
movq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xa4(%rbp)
jne 0x7d6ec
jmp 0x7d704
leaq 0xb0519(%rip), %rdi # 0x12dc0c
movl $0x3e44, %esi # imm = 0x3E44
leaq 0xbc10d(%rip), %rdx # 0x13980c
callq 0x3c010
movq 0x3ecdcd(%rip), %rdi # 0x46a4d8
leaq 0xb1f5b(%rip), %rsi # 0x12f66d
callq 0x3b3d0
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0xbc(%rbp)
cmpl $0x0, -0xbc(%rbp)
je 0x7d73b
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0xbc(%rbp)
jne 0x7d746
jmp 0x7d75e
leaq 0xb04bf(%rip), %rdi # 0x12dc0c
movl $0x3e46, %esi # imm = 0x3E46
leaq 0xc6816(%rip), %rdx # 0x143f6f
callq 0x3c010
cmpl $0xe, -0x94(%rbp)
jne 0x7d792
cmpl $0x9, -0x90(%rbp)
jne 0x7d792
cmpl $0x2a, -0x8c(%rbp)
jne 0x7d792
cmpb $0x0, 0x3ecd51(%rip) # 0x46a4d1
jne 0x7d790
leaq 0xc268e(%rip), %rdi # 0x13fe17
movb $0x0, %al
callq 0x3a070
jmp 0x7d7ca
movl -0x94(%rbp), %esi
movl -0x90(%rbp), %edx
movl -0x8c(%rbp), %ecx
leaq 0xc2670(%rip), %rdi # 0x13fe1b
movb $0x0, %al
callq 0x3a070
leaq 0xb0453(%rip), %rdi # 0x12dc0c
movl $0x3e4d, %esi # imm = 0x3E4D
leaq 0xc2676(%rip), %rdx # 0x13fe3b
callq 0x3c010
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| test_bug20152:
push rbp
mov rbp, rsp
sub rsp, 0D0h
lea rax, aInsertIntoT1F1; "INSERT INTO t1 (f1) VALUES (?)"
mov [rbp+var_B0], rax
jmp short $+2
loc_7D3EB:
movsx eax, cs:opt_silent
cmp eax, 2
jge short loc_7D473
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E324; "\n\n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov edx, cs:test_count
mov eax, edx
add eax, 1
mov cs:test_count, eax
mov ecx, cs:iter_count
mov r8d, cs:opt_count
lea rsi, aUOfUUS; "%u of (%u/%u): %s"
lea r9, aTestBug20152; "test_bug20152"
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E35C; " \n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_7D473:
lea rdi, [rbp+var_70]
xor esi, esi
mov edx, 70h ; 'p'
call _memset
mov [rbp+var_10], 0Ah
lea rax, [rbp+var_A0]
mov [rbp+var_60], rax
lea rdi, [rbp+var_A0]
xor esi, esi
mov edx, 28h ; '('
call _memset
mov [rbp+var_A0], 7D6h
mov [rbp+var_9C], 6
mov [rbp+var_98], 12h
mov [rbp+var_94], 0Eh
mov [rbp+var_90], 9
mov [rbp+var_8C], 2Ah ; '*'
mov rdi, cs:mysql
lea rsi, aDropTableIfExi; "DROP TABLE IF EXISTS t1"
call wrap_mysql_query
mov [rbp+var_A4], eax
mov eax, [rbp+var_A4]
mov [rbp+var_B4], eax
cmp [rbp+var_B4], 0
jz short loc_7D51B
xor eax, eax
mov edi, eax
call print_error
loc_7D51B:
cmp [rbp+var_B4], 0
jnz short loc_7D526
jmp short loc_7D53E
loc_7D526:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E38h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_7D53E:
mov rdi, cs:mysql
lea rsi, aCreateTableT1F_3; "CREATE TABLE t1 (f1 DATE)"
call wrap_mysql_query
mov [rbp+var_A4], eax
mov eax, [rbp+var_A4]
mov [rbp+var_B8], eax
cmp [rbp+var_B8], 0
jz short loc_7D575
xor eax, eax
mov edi, eax
call print_error
loc_7D575:
cmp [rbp+var_B8], 0
jnz short loc_7D580
jmp short loc_7D598
loc_7D580:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E3Ah
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_7D598:
mov rdi, cs:mysql
call mysql_stmt_init
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov [rbp+var_D0], rax
mov rax, [rbp+var_B0]
mov [rbp+var_C8], rax
mov rdi, [rbp+var_B0]
call _strlen
mov rdi, [rbp+var_D0]
mov rsi, [rbp+var_C8]
mov rdx, rax
call wrap_mysql_stmt_prepare
mov [rbp+var_A4], eax
cmp [rbp+var_A4], 0
jz short loc_7D5FF
mov rdi, [rbp+var_78]
xor eax, eax
mov esi, eax
call print_st_error
loc_7D5FF:
cmp [rbp+var_A4], 0
jnz short loc_7D60A
jmp short loc_7D622
loc_7D60A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E3Eh
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_7D622:
mov rdi, [rbp+var_78]
lea rsi, [rbp+var_70]
call mysql_stmt_bind_param
movsx eax, al
mov [rbp+var_A4], eax
cmp [rbp+var_A4], 0
jz short loc_7D64E
mov rdi, [rbp+var_78]
xor eax, eax
mov esi, eax
call print_st_error
loc_7D64E:
cmp [rbp+var_A4], 0
jnz short loc_7D659
jmp short loc_7D671
loc_7D659:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E40h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_7D671:
mov rdi, [rbp+var_78]
call wrap_mysql_stmt_execute
mov [rbp+var_A4], eax
cmp [rbp+var_A4], 0
jz short loc_7D696
mov rdi, [rbp+var_78]
xor eax, eax
mov esi, eax
call print_st_error
loc_7D696:
cmp [rbp+var_A4], 0
jnz short loc_7D6A1
jmp short loc_7D6B9
loc_7D6A1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E42h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_7D6B9:
mov rdi, [rbp+var_78]
call wrap_mysql_stmt_close
movsx eax, al
mov [rbp+var_A4], eax
cmp [rbp+var_A4], 0
jz short loc_7D6E1
mov rdi, [rbp+var_78]
xor eax, eax
mov esi, eax
call print_st_error
loc_7D6E1:
cmp [rbp+var_A4], 0
jnz short loc_7D6EC
jmp short loc_7D704
loc_7D6EC:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E44h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_7D704:
mov rdi, cs:mysql
lea rsi, aDropTableT1; "DROP TABLE t1"
call wrap_mysql_query
mov [rbp+var_A4], eax
mov eax, [rbp+var_A4]
mov [rbp+var_BC], eax
cmp [rbp+var_BC], 0
jz short loc_7D73B
xor eax, eax
mov edi, eax
call print_error
loc_7D73B:
cmp [rbp+var_BC], 0
jnz short loc_7D746
jmp short loc_7D75E
loc_7D746:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E46h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_7D75E:
cmp [rbp+var_94], 0Eh
jnz short loc_7D792
cmp [rbp+var_90], 9
jnz short loc_7D792
cmp [rbp+var_8C], 2Ah ; '*'
jnz short loc_7D792
cmp cs:opt_silent, 0
jnz short loc_7D790
lea rdi, aOk_1; "OK!"
mov al, 0
call _printf
loc_7D790:
jmp short loc_7D7CA
loc_7D792:
mov esi, [rbp+var_94]
mov edx, [rbp+var_90]
mov ecx, [rbp+var_8C]
lea rdi, a14094202d02d02; "[14:09:42] != [%02d:%02d:%02d]\n"
mov al, 0
call _printf
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3E4Dh
lea rdx, a01; "0==1"
call die
loc_7D7CA:
add rsp, 0D0h
pop rbp
retn
| void test_bug20152()
{
int v0; // edx
long long v1; // rax
char v2; // al
char v3; // al
long long v4; // [rsp+0h] [rbp-D0h]
int v5; // [rsp+2Ch] [rbp-A4h]
int v6; // [rsp+2Ch] [rbp-A4h]
_DWORD v7[3]; // [rsp+30h] [rbp-A0h] BYREF
int v8; // [rsp+3Ch] [rbp-94h]
int v9; // [rsp+40h] [rbp-90h]
int v10; // [rsp+44h] [rbp-8Ch]
long long v11; // [rsp+58h] [rbp-78h]
_BYTE v12[16]; // [rsp+60h] [rbp-70h] BYREF
_DWORD *v13; // [rsp+70h] [rbp-60h]
int v14; // [rsp+C0h] [rbp-10h]
if ( opt_silent < 2 )
{
fprintf(stdout, "\n\n#####################################\n");
v0 = test_count++;
fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bug20152");
fprintf(stdout, " \n#####################################\n");
fflush(stdout);
}
memset(v12, 0LL, 112LL);
v14 = 10;
v13 = v7;
memset(v7, 0LL, 40LL);
v7[0] = 2006;
v7[1] = 6;
v7[2] = 18;
v8 = 14;
v9 = 9;
v10 = 42;
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE IF EXISTS t1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15928, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"CREATE TABLE t1 (f1 DATE)") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15930, "r == 0");
}
v11 = mysql_stmt_init(mysql);
v4 = v11;
v1 = strlen("INSERT INTO t1 (f1) VALUES (?)");
if ( (unsigned int)wrap_mysql_stmt_prepare(v4, (long long)"INSERT INTO t1 (f1) VALUES (?)", v1) )
{
print_st_error(v11, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15934, "rc == 0");
}
v2 = mysql_stmt_bind_param(v11, v12);
v5 = v2;
if ( v2 )
print_st_error(v11, 0LL);
if ( v5 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15936, "rc == 0");
if ( (unsigned int)wrap_mysql_stmt_execute(v11) )
{
print_st_error(v11, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15938, "rc == 0");
}
v3 = wrap_mysql_stmt_close(v11);
v6 = v3;
if ( v3 )
print_st_error(v11, 0LL);
if ( v6 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15940, "rc == 0");
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"DROP TABLE t1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15942, "r == 0");
}
if ( v8 != 14 || v9 != 9 || v10 != 42 )
{
printf("[14:09:42] != [%02d:%02d:%02d]\n", v8, v9, v10);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 15949, "0==1");
}
if ( !opt_silent )
printf("OK!");
}
| test_bug20152:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
LEA RAX,[0x23fdde]
MOV qword ptr [RBP + -0xb0],RAX
JMP 0x0017d3eb
LAB_0017d3eb:
MOVSX EAX,byte ptr [0x0056a4d1]
CMP EAX,0x2
JGE 0x0017d473
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e324]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [0x0056a71c]
MOV EAX,EDX
ADD EAX,0x1
MOV dword ptr [0x0056a71c],EAX
MOV ECX,dword ptr [0x0056a718]
MOV R8D,dword ptr [0x0056a4fc]
LEA RSI,[0x22f62c]
LEA R9,[0x22f0f4]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e35c]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
LAB_0017d473:
LEA RDI,[RBP + -0x70]
XOR ESI,ESI
MOV EDX,0x70
CALL 0x0013a2e0
MOV dword ptr [RBP + -0x10],0xa
LEA RAX,[RBP + -0xa0]
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0xa0]
XOR ESI,ESI
MOV EDX,0x28
CALL 0x0013a2e0
MOV dword ptr [RBP + -0xa0],0x7d6
MOV dword ptr [RBP + -0x9c],0x6
MOV dword ptr [RBP + -0x98],0x12
MOV dword ptr [RBP + -0x94],0xe
MOV dword ptr [RBP + -0x90],0x9
MOV dword ptr [RBP + -0x8c],0x2a
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x22f63e]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xa4],EAX
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0xb4],EAX
CMP dword ptr [RBP + -0xb4],0x0
JZ 0x0017d51b
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0017d51b:
CMP dword ptr [RBP + -0xb4],0x0
JNZ 0x0017d526
JMP 0x0017d53e
LAB_0017d526:
LEA RDI,[0x22dc0c]
MOV ESI,0x3e38
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0017d53e:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x23fdfd]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xa4],EAX
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0xb8],EAX
CMP dword ptr [RBP + -0xb8],0x0
JZ 0x0017d575
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0017d575:
CMP dword ptr [RBP + -0xb8],0x0
JNZ 0x0017d580
JMP 0x0017d598
LAB_0017d580:
LEA RDI,[0x22dc0c]
MOV ESI,0x3e3a
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0017d598:
MOV RDI,qword ptr [0x0056a4d8]
CALL 0x001b2790
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0xd0],RAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0xc8],RAX
MOV RDI,qword ptr [RBP + -0xb0]
CALL 0x0013a400
MOV RDI,qword ptr [RBP + -0xd0]
MOV RSI,qword ptr [RBP + -0xc8]
MOV RDX,RAX
CALL 0x0013b810
MOV dword ptr [RBP + -0xa4],EAX
CMP dword ptr [RBP + -0xa4],0x0
JZ 0x0017d5ff
MOV RDI,qword ptr [RBP + -0x78]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0017d5ff:
CMP dword ptr [RBP + -0xa4],0x0
JNZ 0x0017d60a
JMP 0x0017d622
LAB_0017d60a:
LEA RDI,[0x22dc0c]
MOV ESI,0x3e3e
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0017d622:
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x70]
CALL 0x001b1100
MOVSX EAX,AL
MOV dword ptr [RBP + -0xa4],EAX
CMP dword ptr [RBP + -0xa4],0x0
JZ 0x0017d64e
MOV RDI,qword ptr [RBP + -0x78]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0017d64e:
CMP dword ptr [RBP + -0xa4],0x0
JNZ 0x0017d659
JMP 0x0017d671
LAB_0017d659:
LEA RDI,[0x22dc0c]
MOV ESI,0x3e40
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0017d671:
MOV RDI,qword ptr [RBP + -0x78]
CALL 0x0013b8a0
MOV dword ptr [RBP + -0xa4],EAX
CMP dword ptr [RBP + -0xa4],0x0
JZ 0x0017d696
MOV RDI,qword ptr [RBP + -0x78]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0017d696:
CMP dword ptr [RBP + -0xa4],0x0
JNZ 0x0017d6a1
JMP 0x0017d6b9
LAB_0017d6a1:
LEA RDI,[0x22dc0c]
MOV ESI,0x3e42
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0017d6b9:
MOV RDI,qword ptr [RBP + -0x78]
CALL 0x0013b9f0
MOVSX EAX,AL
MOV dword ptr [RBP + -0xa4],EAX
CMP dword ptr [RBP + -0xa4],0x0
JZ 0x0017d6e1
MOV RDI,qword ptr [RBP + -0x78]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_0017d6e1:
CMP dword ptr [RBP + -0xa4],0x0
JNZ 0x0017d6ec
JMP 0x0017d704
LAB_0017d6ec:
LEA RDI,[0x22dc0c]
MOV ESI,0x3e44
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_0017d704:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x22f66d]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xa4],EAX
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0xbc],EAX
CMP dword ptr [RBP + -0xbc],0x0
JZ 0x0017d73b
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_0017d73b:
CMP dword ptr [RBP + -0xbc],0x0
JNZ 0x0017d746
JMP 0x0017d75e
LAB_0017d746:
LEA RDI,[0x22dc0c]
MOV ESI,0x3e46
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_0017d75e:
CMP dword ptr [RBP + -0x94],0xe
JNZ 0x0017d792
CMP dword ptr [RBP + -0x90],0x9
JNZ 0x0017d792
CMP dword ptr [RBP + -0x8c],0x2a
JNZ 0x0017d792
CMP byte ptr [0x0056a4d1],0x0
JNZ 0x0017d790
LEA RDI,[0x23fe17]
MOV AL,0x0
CALL 0x0013a070
LAB_0017d790:
JMP 0x0017d7ca
LAB_0017d792:
MOV ESI,dword ptr [RBP + -0x94]
MOV EDX,dword ptr [RBP + -0x90]
MOV ECX,dword ptr [RBP + -0x8c]
LEA RDI,[0x23fe1b]
MOV AL,0x0
CALL 0x0013a070
LEA RDI,[0x22dc0c]
MOV ESI,0x3e4d
LEA RDX,[0x23fe3b]
CALL 0x0013c010
LAB_0017d7ca:
ADD RSP,0xd0
POP RBP
RET
|
void test_bug20152(void)
{
char cVar1;
int iVar2;
int8 uVar3;
size_t sVar4;
ulong uVar5;
int4 local_a8;
int4 local_a4;
int4 local_a0;
uint local_9c;
uint local_98;
uint local_94;
int8 local_80;
int1 local_78 [16];
int4 *local_68;
int4 local_18;
if (opt_silent < '\x02') {
fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n");
uVar5 = (ulong)test_count;
test_count = test_count + 1;
fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar5,(ulong)iter_count,
(ulong)opt_count,"test_bug20152");
fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n");
fflush(*(FILE **)PTR_stdout_003aefd8);
}
memset(local_78,0,0x70);
local_18 = 10;
local_68 = &local_a8;
memset(&local_a8,0,0x28);
local_a8 = 0x7d6;
local_a4 = 6;
local_a0 = 0x12;
local_9c = 0xe;
local_98 = 9;
local_94 = 0x2a;
iVar2 = wrap_mysql_query(mysql,"DROP TABLE IF EXISTS t1");
if (iVar2 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3e38,"r == 0");
}
iVar2 = wrap_mysql_query(mysql,"CREATE TABLE t1 (f1 DATE)");
if (iVar2 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3e3a,"r == 0");
}
uVar3 = mysql_stmt_init(mysql);
local_80 = uVar3;
sVar4 = strlen("INSERT INTO t1 (f1) VALUES (?)");
iVar2 = wrap_mysql_stmt_prepare(uVar3,"INSERT INTO t1 (f1) VALUES (?)",sVar4);
if (iVar2 != 0) {
print_st_error(local_80,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3e3e,"rc == 0");
}
cVar1 = mysql_stmt_bind_param(local_80,local_78);
if (cVar1 != '\0') {
print_st_error(local_80,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3e40,"rc == 0");
}
iVar2 = wrap_mysql_stmt_execute(local_80);
if (iVar2 != 0) {
print_st_error(local_80,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3e42,"rc == 0");
}
cVar1 = wrap_mysql_stmt_close(local_80);
if (cVar1 != '\0') {
print_st_error(local_80,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3e44,"rc == 0");
}
iVar2 = wrap_mysql_query(mysql,"DROP TABLE t1");
if (iVar2 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3e46,"r == 0");
}
if (((local_9c == 0xe) && (local_98 == 9)) && (local_94 == 0x2a)) {
if (opt_silent == '\0') {
printf("OK!");
}
}
else {
printf("[14:09:42] != [%02d:%02d:%02d]\n",(ulong)local_9c,(ulong)local_98,(ulong)local_94);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3e4d,&DAT_0023fe3b);
}
return;
}
| |
41,795 | finish_resize_simple_key_cache | eloqsql/mysys/mf_keycache.c | static
void finish_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache)
{
DBUG_ENTER("finish_resize_simple_key_cache");
mysql_mutex_assert_owner(&keycache->cache_lock);
/*
Mark the resize finished. This allows other threads to start a
resize or to request new cache blocks.
*/
keycache->in_resize= 0;
/* Signal waiting threads. */
release_whole_queue(&keycache->resize_queue);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_VOID_RETURN;
} | O3 | c | finish_resize_simple_key_cache:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, 0x1(%rdi)
addq $0x108, %rdi # imm = 0x108
callq 0x98991
movq 0x100(%rbx), %rdi
testq %rdi, %rdi
jne 0x99e74
addq $0xc0, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x291e0
leaq 0x2ec195(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x99e5f
| finish_resize_simple_key_cache:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov byte ptr [rdi+1], 0
add rdi, 108h
call release_whole_queue
mov rdi, [rbx+100h]
test rdi, rdi
jnz short loc_99E74
loc_99E5F:
add rbx, 0C0h
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutex_unlock
loc_99E74:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_99E5F
| long long finish_resize_simple_key_cache(long long a1)
{
long long v2; // rdi
*(_BYTE *)(a1 + 1) = 0;
release_whole_queue((long long *)(a1 + 264));
v2 = *(_QWORD *)(a1 + 256);
if ( v2 )
((void ( *)(long long))PSI_server[44])(v2);
return pthread_mutex_unlock(a1 + 192);
}
| finish_resize_simple_key_cache:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV byte ptr [RDI + 0x1],0x0
ADD RDI,0x108
CALL 0x00198991
MOV RDI,qword ptr [RBX + 0x100]
TEST RDI,RDI
JNZ 0x00199e74
LAB_00199e5f:
ADD RBX,0xc0
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001291e0
LAB_00199e74:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00199e5f
|
void finish_resize_simple_key_cache(long param_1)
{
*(int1 *)(param_1 + 1) = 0;
release_whole_queue(param_1 + 0x108);
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0xc0));
return;
}
| |
41,796 | nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const | monkey531[P]llama/common/json.hpp | std::string get_token_string() const
{
// escape control characters
std::string result;
for (const auto c : token_string)
{
if (static_cast<unsigned char>(c) <= '\x1F')
{
// escape control characters
std::array<char, 9> cs{{}};
static_cast<void>((std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
result += cs.data();
}
else
{
// add character as is
result.push_back(static_cast<std::string::value_type>(c));
}
}
return result;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_token_string() const:
subq $0x78, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movb $0x0, 0x67(%rsp)
callq 0x5d5e0
movq 0x20(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0xa7420
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0xa7450
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xbbcc0
testb $0x1, %al
jne 0xaa003
jmp 0xaa0bb
leaq 0x50(%rsp), %rdi
callq 0xbbd00
movb (%rax), %al
movb %al, 0x47(%rsp)
movzbl 0x47(%rsp), %eax
cmpl $0x1f, %eax
jg 0xaa097
movb $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xbbd10
movq 0x8(%rsp), %rdi
movq %rax, (%rsp)
callq 0xbbd20
movq (%rsp), %rdi
movq %rax, %rsi
movzbl 0x47(%rsp), %ecx
leaq 0x16c2c3(%rip), %rdx # 0x21631e
xorl %eax, %eax
callq 0x5d900
movq 0x8(%rsp), %rdi
callq 0xbbd10
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x5d220
jmp 0xaa07b
jmp 0xaa0aa
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x5e548
jmp 0xaa0db
movq 0x10(%rsp), %rdi
movsbl 0x47(%rsp), %esi
callq 0x5e430
jmp 0xaa0a8
jmp 0xaa0aa
jmp 0xaa0ac
leaq 0x50(%rsp), %rdi
callq 0xbbd30
jmp 0xa9feb
movb $0x1, 0x67(%rsp)
testb $0x1, 0x67(%rsp)
jne 0xaa0d1
movq 0x10(%rsp), %rdi
callq 0x5e548
movq 0x18(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x5dbc0
nopw %cs:(%rax,%rax)
nop
| _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv:
sub rsp, 78h
mov [rsp+78h+var_68], rdi
mov rax, rdi
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_11], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rax, [rsp+78h+var_58]
add rax, 38h ; '8'
mov [rsp+78h+var_20], rax
mov rdi, [rsp+78h+var_20]
call _ZNKSt6vectorIcSaIcEE5beginEv; std::vector<char>::begin(void)
mov [rsp+78h+var_28], rax
mov rdi, [rsp+78h+var_20]
call _ZNKSt6vectorIcSaIcEE3endEv; std::vector<char>::end(void)
mov [rsp+78h+var_30], rax
loc_A9FEB:
lea rdi, [rsp+78h+var_28]
lea rsi, [rsp+78h+var_30]
call _ZN9__gnu_cxxneIPKcSt6vectorIcSaIcEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<char const*,std::vector<char>>(__gnu_cxx::__normal_iterator<char const*,std::vector<char>> const&,__gnu_cxx::__normal_iterator<char const*,std::vector<char>> const&)
test al, 1
jnz short loc_AA003
jmp loc_AA0BB
loc_AA003:
lea rdi, [rsp+78h+var_28]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcSt6vectorIcSaIcEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator*(void)
mov al, [rax]
mov [rsp+78h+var_31], al
movzx eax, [rsp+78h+var_31]
cmp eax, 1Fh
jg short loc_AA097
mov [rsp+78h+var_38], 0
mov [rsp+78h+var_40], 0
lea rdi, [rsp+78h+var_40]
mov [rsp+78h+var_70], rdi
call _ZNSt5arrayIcLm9EE4dataEv; std::array<char,9ul>::data(void)
mov rdi, [rsp+78h+var_70]
mov [rsp+78h+var_78], rax
call _ZNKSt5arrayIcLm9EE4sizeEv; std::array<char,9ul>::size(void)
mov rdi, [rsp+78h+var_78]
mov rsi, rax
movzx ecx, [rsp+78h+var_31]
lea rdx, aU4x; "<U+%.4X>"
xor eax, eax
call _snprintf
mov rdi, [rsp+78h+var_70]
call _ZNSt5arrayIcLm9EE4dataEv; std::array<char,9ul>::data(void)
mov rdi, [rsp+78h+var_68]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_AA07B:
jmp short loc_AA0AA
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_AA0DB
loc_AA097:
mov rdi, [rsp+78h+var_68]
movsx esi, [rsp+78h+var_31]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_AA0A8:
jmp short $+2
loc_AA0AA:
jmp short $+2
loc_AA0AC:
lea rdi, [rsp+78h+var_28]
call _ZN9__gnu_cxx17__normal_iteratorIPKcSt6vectorIcSaIcEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator++(void)
jmp loc_A9FEB
loc_AA0BB:
mov [rsp+78h+var_11], 1
test [rsp+78h+var_11], 1
jnz short loc_AA0D1
mov rdi, [rsp+78h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_AA0D1:
mov rax, [rsp+78h+var_60]
add rsp, 78h
retn
loc_AA0DB:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(
long long a1,
long long a2)
{
long long v2; // rax
long long v3; // rax
long long v5; // [rsp+0h] [rbp-78h]
long long v6; // [rsp+38h] [rbp-40h] BYREF
char v7; // [rsp+40h] [rbp-38h]
unsigned __int8 v8; // [rsp+47h] [rbp-31h]
long long v9; // [rsp+48h] [rbp-30h] BYREF
_QWORD v10[2]; // [rsp+50h] [rbp-28h] BYREF
char v11; // [rsp+67h] [rbp-11h]
long long v12; // [rsp+68h] [rbp-10h]
long long v13; // [rsp+70h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = 0;
std::string::basic_string(a1);
v10[1] = a2 + 56;
v10[0] = std::vector<char>::begin(a2 + 56);
v9 = std::vector<char>::end(a2 + 56);
while ( (__gnu_cxx::operator!=<char const*,std::vector<char>>(v10, &v9) & 1) != 0 )
{
v8 = *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator*(v10);
if ( v8 > 0x1Fu )
{
std::string::push_back(a1, (unsigned int)(char)v8);
}
else
{
v7 = 0;
v6 = 0LL;
v5 = ((long long (*)(void))std::array<char,9ul>::data)();
v2 = std::array<char,9ul>::size(&v6);
snprintf(v5, v2, "<U+%.4X>", v8);
v3 = std::array<char,9ul>::data(&v6);
std::string::operator+=(a1, v3);
}
__gnu_cxx::__normal_iterator<char const*,std::vector<char>>::operator++(v10);
}
return a1;
}
| get_token_string:
SUB RSP,0x78
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x20],RAX
MOV byte ptr [RSP + 0x67],0x0
CALL 0x0015d5e0
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x38
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001a7420
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001a7450
MOV qword ptr [RSP + 0x48],RAX
LAB_001a9feb:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x48]
CALL 0x001bbcc0
TEST AL,0x1
JNZ 0x001aa003
JMP 0x001aa0bb
LAB_001aa003:
LEA RDI,[RSP + 0x50]
CALL 0x001bbd00
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x47],AL
MOVZX EAX,byte ptr [RSP + 0x47]
CMP EAX,0x1f
JG 0x001aa097
MOV byte ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x38],0x0
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001bbd10
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
CALL 0x001bbd20
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
MOVZX ECX,byte ptr [RSP + 0x47]
LEA RDX,[0x31631e]
XOR EAX,EAX
CALL 0x0015d900
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001bbd10
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
LAB_001aa074:
CALL 0x0015d220
JMP 0x001aa07b
LAB_001aa07b:
JMP 0x001aa0aa
LAB_001aa097:
MOV RDI,qword ptr [RSP + 0x10]
MOVSX ESI,byte ptr [RSP + 0x47]
CALL 0x0015e430
LAB_001aa0a6:
JMP 0x001aa0a8
LAB_001aa0a8:
JMP 0x001aa0aa
LAB_001aa0aa:
JMP 0x001aa0ac
LAB_001aa0ac:
LEA RDI,[RSP + 0x50]
CALL 0x001bbd30
JMP 0x001a9feb
LAB_001aa0bb:
MOV byte ptr [RSP + 0x67],0x1
TEST byte ptr [RSP + 0x67],0x1
JNZ 0x001aa0d1
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0015e548
LAB_001aa0d1:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x78
RET
|
/* WARNING: Removing unreachable block (ram,0x001aa0c7) */
/* nlohmann::json_abi_v3_11_3::detail::lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::get_token_string() const */
string * nlohmann::json_abi_v3_11_3::detail::
lexer<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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_token_string(void)
{
bool bVar1;
byte *pbVar2;
char *pcVar3;
size_t __maxlen;
long in_RSI;
string *in_RDI;
int8 local_40;
int1 local_38;
byte local_31;
int8 local_30;
int8 local_28;
vector<char,std::allocator<char>> *local_20;
int1 local_11;
local_11 = 0;
std::__cxx11::string::string(in_RDI);
local_20 = (vector<char,std::allocator<char>> *)(in_RSI + 0x38);
local_28 = std::vector<char,std::allocator<char>>::begin(local_20);
local_30 = std::vector<char,std::allocator<char>>::end(local_20);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_28,(__normal_iterator *)&local_30), bVar1) {
pbVar2 = (byte *)__gnu_cxx::
__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>::
operator*((__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>
*)&local_28);
local_31 = *pbVar2;
if (local_31 < 0x20) {
local_38 = 0;
local_40 = 0;
pcVar3 = (char *)std::array<char,9ul>::data((array<char,9ul> *)&local_40);
__maxlen = std::array<char,9ul>::size();
snprintf(pcVar3,__maxlen,"<U+%.4X>",(ulong)local_31);
pcVar3 = (char *)std::array<char,9ul>::data((array<char,9ul> *)&local_40);
/* try { // try from 001aa074 to 001aa0a5 has its CatchHandler @ 001aa07d */
std::__cxx11::string::operator+=(in_RDI,pcVar3);
}
else {
std::__cxx11::string::push_back((char)in_RDI);
}
__gnu_cxx::__normal_iterator<char_const*,std::vector<char,std::allocator<char>>>::operator++
((__normal_iterator<char_const*,std::vector<char,std::allocator<char>>> *)&local_28);
}
return in_RDI;
}
| |
41,797 | my_malloc | eloqsql/mysys/my_malloc.c | void *my_malloc(PSI_memory_key key, size_t size, myf my_flags)
{
my_memory_header *mh;
void *point;
DBUG_ENTER("my_malloc");
DBUG_PRINT("my",("size: %zu flags: %lu", size, my_flags));
compile_time_assert(sizeof(my_memory_header) <= HEADER_SIZE);
if (!(my_flags & (MY_WME | MY_FAE)))
my_flags|= my_global_flags;
/* Safety */
if (!size)
size=1;
if (size > SIZE_T_MAX - 1024L*1024L*16L) /* Wrong call */
DBUG_RETURN(0);
/* We have to align size as we store MY_THREAD_SPECIFIC flag in the LSB */
size= ALIGN_SIZE(size);
if (DBUG_EVALUATE_IF("simulate_out_of_memory", 1, 0))
mh= NULL;
else
mh= (my_memory_header*) sf_malloc(size + HEADER_SIZE, my_flags);
if (mh == NULL)
{
my_errno=errno;
if (my_flags & MY_FAE)
error_handler_hook=fatal_error_handler_hook;
if (my_flags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG+ME_FATAL),size);
if (my_flags & MY_FAE)
abort();
point= NULL;
}
else
{
int flag= MY_TEST(my_flags & MY_THREAD_SPECIFIC);
mh->m_size= size | flag;
mh->m_key= PSI_CALL_memory_alloc(key, size, & mh->m_owner);
update_malloc_size(size + HEADER_SIZE, flag);
point= HEADER_TO_USER(mh);
if (my_flags & MY_ZEROFILL)
bzero(point, size);
else
TRASH_ALLOC(point, size);
}
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN(point);
} | O3 | c | my_malloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r13d
xorl %r14d, %r14d
movl $0x0, %r15d
testb $0x18, %dl
jne 0x2a07d
leaq 0x33a00e(%rip), %rax # 0x364088
movq (%rax), %r15
cmpq $-0x1000001, %rbx # imm = 0xFEFFFFFF
ja 0x2a15d
orq %rdx, %r15
cmpq $0x1, %rbx
adcq $0x7, %rbx
andq $-0x8, %rbx
leaq 0x18(%rbx), %r12
movq %r12, %rdi
callq 0x243b0
testq %rax, %rax
je 0x2a110
movq %rax, %r14
movl %r13d, %edi
movl %r15d, %r13d
shrl $0x10, %r13d
andl $0x1, %r13d
movq %rbx, %rax
orq %r13, %rax
movq %rax, 0x8(%r14)
leaq 0x2c3744(%rip), %rax # 0x2ed810
movq (%rax), %rax
movq %rbx, %rsi
movq %r14, %rdx
callq *0x3e0(%rax)
movl %eax, 0x10(%r14)
movq %r12, %rdi
movl %r13d, %esi
callq *0x2c389d(%rip) # 0x2ed988
addq $0x18, %r14
testb $0x20, %r15b
je 0x2a15d
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24160
callq 0x24050
movl (%rax), %r14d
callq 0x25806
movl %r14d, (%rax)
testb $0x8, %r15b
je 0x2a13a
leaq 0x2c324b(%rip), %rax # 0x2ed378
movq (%rax), %rax
leaq 0x2c3239(%rip), %rcx # 0x2ed370
movq %rax, (%rcx)
testb $0x18, %r15b
je 0x2a154
movl $0x1044, %esi # imm = 0x1044
movl $0x5, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x29647
testb $0x8, %r15b
jne 0x2a16f
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24170
| my_malloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r13d, edi
xor r14d, r14d
mov r15d, 0
test dl, 18h
jnz short loc_2A07D
lea rax, my_global_flags
mov r15, [rax]
loc_2A07D:
cmp rbx, 0FFFFFFFFFEFFFFFFh
ja loc_2A15D
or r15, rdx
cmp rbx, 1
adc rbx, 7
and rbx, 0FFFFFFFFFFFFFFF8h
lea r12, [rbx+18h]
mov rdi, r12
call _malloc
test rax, rax
jz short loc_2A110
mov r14, rax
mov edi, r13d
mov r13d, r15d
shr r13d, 10h
and r13d, 1
mov rax, rbx
or rax, r13
mov [r14+8], rax
lea rax, PSI_server
mov rax, [rax]
mov rsi, rbx
mov rdx, r14
call qword ptr [rax+3E0h]
mov [r14+10h], eax
mov rdi, r12
mov esi, r13d
call cs:update_malloc_size
add r14, 18h
test r15b, 20h
jz short loc_2A15D
mov rdi, r14
xor esi, esi
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_2A110:
call ___errno_location
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
test r15b, 8
jz short loc_2A13A
lea rax, fatal_error_handler_hook
mov rax, [rax]
lea rcx, error_handler_hook
mov [rcx], rax
loc_2A13A:
test r15b, 18h
jz short loc_2A154
mov esi, 1044h
mov edi, 5
mov rdx, rbx
xor eax, eax
call my_error
loc_2A154:
test r15b, 8
jnz short loc_2A16F
xor r14d, r14d
loc_2A15D:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2A16F:
call _abort
| long long my_malloc(unsigned int a1, unsigned long long a2, int a3)
{
long long v4; // r14
int v5; // r15d
unsigned int v6; // r15d
unsigned long long v7; // rbx
long long v8; // rdi
long long v9; // rax
long long v10; // r14
int v12; // r14d
v4 = 0LL;
v5 = 0;
if ( (a3 & 0x18) == 0 )
v5 = my_global_flags;
if ( a2 <= 0xFFFFFFFFFEFFFFFFLL )
{
v6 = a3 | v5;
v7 = ((a2 == 0) + a2 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v8 = v7 + 24;
v9 = malloc(v7 + 24);
if ( v9 )
{
v10 = v9;
*(_QWORD *)(v9 + 8) = HIWORD(v6) & 1 | v7;
*(_DWORD *)(v9 + 16) = (*((long long ( **)(_QWORD, unsigned long long, long long))PSI_server[0] + 124))(
a1,
v7,
v9);
update_malloc_size[0]();
v4 = v10 + 24;
if ( (v6 & 0x20) != 0 )
return memset(v4, 0LL, v7);
}
else
{
v12 = *(_DWORD *)__errno_location(v8);
*(_DWORD *)my_thread_var() = v12;
if ( (v6 & 8) != 0 )
error_handler_hook = (long long ( *)(long long, long long, __int16))fatal_error_handler_hook[0];
if ( (v6 & 0x18) != 0 )
{
v8 = 5LL;
my_error(5u, 4164, v7);
}
if ( (v6 & 8) != 0 )
abort(v8);
return 0LL;
}
}
return v4;
}
| my_malloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R13D,EDI
XOR R14D,R14D
MOV R15D,0x0
TEST DL,0x18
JNZ 0x0012a07d
LEA RAX,[0x464088]
MOV R15,qword ptr [RAX]
LAB_0012a07d:
CMP RBX,-0x1000001
JA 0x0012a15d
OR R15,RDX
CMP RBX,0x1
ADC RBX,0x7
AND RBX,-0x8
LEA R12,[RBX + 0x18]
MOV RDI,R12
CALL 0x001243b0
TEST RAX,RAX
JZ 0x0012a110
MOV R14,RAX
MOV EDI,R13D
MOV R13D,R15D
SHR R13D,0x10
AND R13D,0x1
MOV RAX,RBX
OR RAX,R13
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x3ed810]
MOV RAX,qword ptr [RAX]
MOV RSI,RBX
MOV RDX,R14
CALL qword ptr [RAX + 0x3e0]
MOV dword ptr [R14 + 0x10],EAX
MOV RDI,R12
MOV ESI,R13D
CALL qword ptr [0x003ed988]
ADD R14,0x18
TEST R15B,0x20
JZ 0x0012a15d
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00124160
LAB_0012a110:
CALL 0x00124050
MOV R14D,dword ptr [RAX]
CALL 0x00125806
MOV dword ptr [RAX],R14D
TEST R15B,0x8
JZ 0x0012a13a
LEA RAX,[0x3ed378]
MOV RAX,qword ptr [RAX]
LEA RCX,[0x3ed370]
MOV qword ptr [RCX],RAX
LAB_0012a13a:
TEST R15B,0x18
JZ 0x0012a154
MOV ESI,0x1044
MOV EDI,0x5
MOV RDX,RBX
XOR EAX,EAX
CALL 0x00129647
LAB_0012a154:
TEST R15B,0x8
JNZ 0x0012a16f
XOR R14D,R14D
LAB_0012a15d:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012a16f:
CALL 0x00124170
|
void * my_malloc(int4 param_1,ulong param_2,ulong param_3)
{
int iVar1;
int4 uVar2;
void *pvVar3;
int *piVar4;
ulong __n;
ulong uVar5;
pvVar3 = (void *)0x0;
uVar5 = 0;
if ((param_3 & 0x18) == 0) {
uVar5 = my_global_flags;
}
if (param_2 < 0xffffffffff000000) {
uVar5 = uVar5 | param_3;
__n = param_2 + 7 + (ulong)(param_2 == 0) & 0xfffffffffffffff8;
pvVar3 = malloc(__n + 0x18);
if (pvVar3 == (void *)0x0) {
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((uVar5 & 8) != 0) {
error_handler_hook = fatal_error_handler_hook;
}
if ((uVar5 & 0x18) != 0) {
my_error(5,0x1044,__n);
}
if ((uVar5 & 8) != 0) {
/* WARNING: Subroutine does not return */
abort();
}
pvVar3 = (void *)0x0;
}
else {
*(ulong *)((long)pvVar3 + 8) = __n | (uint)(uVar5 >> 0x10) & 1;
uVar2 = (**(code **)(PSI_server + 0x3e0))(param_1,__n,pvVar3);
*(int4 *)((long)pvVar3 + 0x10) = uVar2;
(*(code *)update_malloc_size)(__n + 0x18);
pvVar3 = (void *)((long)pvVar3 + 0x18);
if ((uVar5 & 0x20) != 0) {
pvVar3 = memset(pvVar3,0,__n);
return pvVar3;
}
}
}
return pvVar3;
}
| |
41,798 | bitmap_union | eloqsql/mysys/my_bitmap.c | void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(map2->bitmap);
DBUG_ASSERT(map->n_bits == map2->n_bits);
end= map->last_word_ptr;
while (to <= end)
*to++ |= *from++;
} | O0 | c | bitmap_union:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xeee14
jmp 0xeee16
jmp 0xeee18
jmp 0xeee1a
jmp 0xeee1c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0xeee58
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x20(%rbp)
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x18(%rbp)
orl (%rax), %ecx
movl %ecx, (%rax)
jmp 0xeee28
popq %rbp
retq
nopw (%rax,%rax)
| bitmap_union:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short $+2
loc_EEE14:
jmp short $+2
loc_EEE16:
jmp short $+2
loc_EEE18:
jmp short $+2
loc_EEE1A:
jmp short $+2
loc_EEE1C:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_28], rax
loc_EEE28:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
ja short loc_EEE58
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 4
mov [rbp+var_20], rcx
mov ecx, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 4
mov [rbp+var_18], rdx
or ecx, [rax]
mov [rax], ecx
jmp short loc_EEE28
loc_EEE58:
pop rbp
retn
| _DWORD * bitmap_union(_QWORD *a1, int **a2)
{
_DWORD *result; // rax
int *v3; // rax
int v4; // ecx
_DWORD *v5; // rax
unsigned long long v6; // [rsp+0h] [rbp-28h]
int *v7; // [rsp+8h] [rbp-20h]
_DWORD *v8; // [rsp+10h] [rbp-18h]
v8 = (_DWORD *)*a1;
v7 = *a2;
v6 = a1[1];
while ( 1 )
{
result = v8;
if ( (unsigned long long)v8 > v6 )
break;
v3 = v7++;
v4 = *v3;
v5 = v8++;
*v5 |= v4;
}
return result;
}
| bitmap_union:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001eee14
LAB_001eee14:
JMP 0x001eee16
LAB_001eee16:
JMP 0x001eee18
LAB_001eee18:
JMP 0x001eee1a
LAB_001eee1a:
JMP 0x001eee1c
LAB_001eee1c:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_001eee28:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x001eee58
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x20],RCX
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x18],RDX
OR ECX,dword ptr [RAX]
MOV dword ptr [RAX],ECX
JMP 0x001eee28
LAB_001eee58:
POP RBP
RET
|
void bitmap_union(int8 *param_1,int8 *param_2)
{
uint *puVar1;
uint *local_28;
uint *local_20;
puVar1 = (uint *)param_1[1];
local_28 = (uint *)*param_2;
local_20 = (uint *)*param_1;
while (local_20 <= puVar1) {
*local_20 = *local_28 | *local_20;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
}
return;
}
| |
41,799 | translog_mark_file_finished | eloqsql/storage/maria/ma_loghandler.c | static void translog_mark_file_finished(uint32 file)
{
int i;
struct st_file_counter *UNINIT_VAR(fc_ptr);
DBUG_ENTER("translog_mark_file_finished");
DBUG_PRINT("enter", ("file: %lu", (ulong) file));
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
DBUG_ASSERT(log_descriptor.unfinished_files.elements > 0);
for (i= 0;
i < (int) log_descriptor.unfinished_files.elements;
i++)
{
fc_ptr= dynamic_element(&log_descriptor.unfinished_files,
i, struct st_file_counter *);
if (fc_ptr->file == file)
{
break;
}
}
DBUG_ASSERT(i < (int) log_descriptor.unfinished_files.elements);
if (! --fc_ptr->counter)
delete_dynamic_element(&log_descriptor.unfinished_files, i);
mysql_mutex_unlock(&log_descriptor.unfinished_files_lock);
DBUG_VOID_RETURN;
} | O0 | c | translog_mark_file_finished:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x385b5
leaq 0x4477d4(%rip), %rdi # 0x47fd90
addq $0x800e08, %rdi # imm = 0x800E08
leaq 0x11ede0(%rip), %rsi # 0x1573aa
movl $0x58d, %edx # imm = 0x58D
callq 0x2bff0
jmp 0x385d6
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0xc48602(%rip), %eax # 0xc80be8
jge 0x38618
movq 0xc485f1(%rip), %rax # 0xc80be0
movslq -0x8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x3860b
jmp 0x38618
jmp 0x3860d
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x385dd
jmp 0x3861a
jmp 0x3861c
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rcx)
cmpl $0x0, %eax
jne 0x38644
movl -0x8(%rbp), %esi
leaq 0x447758(%rip), %rdi # 0x47fd90
addq $0x800e50, %rdi # imm = 0x800E50
callq 0xda820
leaq 0x447745(%rip), %rdi # 0x47fd90
addq $0x800e08, %rdi # imm = 0x800E08
callq 0x2c060
jmp 0x38659
addq $0x10, %rsp
popq %rbp
retq
nop
| translog_mark_file_finished:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov rax, [rbp+var_10]
mov [rbp+var_10], rax
jmp short $+2
loc_385B5:
lea rdi, log_descriptor
add rdi, 800E08h
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 58Dh
call inline_mysql_mutex_lock
jmp short $+2
loc_385D6:
mov [rbp+var_8], 0
loc_385DD:
mov eax, [rbp+var_8]
cmp eax, cs:dword_C80BE8
jge short loc_38618
mov rax, cs:qword_C80BE0
movsxd rcx, [rbp+var_8]
shl rcx, 3
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov eax, [rax]
cmp eax, [rbp+var_4]
jnz short loc_3860B
jmp short loc_38618
loc_3860B:
jmp short $+2
loc_3860D:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_8], eax
jmp short loc_385DD
loc_38618:
jmp short $+2
loc_3861A:
jmp short $+2
loc_3861C:
mov rcx, [rbp+var_10]
mov eax, [rcx+4]
add eax, 0FFFFFFFFh
mov [rcx+4], eax
cmp eax, 0
jnz short loc_38644
mov esi, [rbp+var_8]
lea rdi, log_descriptor
add rdi, 800E50h
call delete_dynamic_element
loc_38644:
lea rdi, log_descriptor
add rdi, 800E08h
call inline_mysql_mutex_unlock
jmp short $+2
loc_38659:
add rsp, 10h
pop rbp
retn
| long long translog_mark_file_finished(int a1)
{
int v1; // eax
_DWORD *v3; // [rsp+0h] [rbp-10h]
int i; // [rsp+8h] [rbp-8h]
inline_mysql_mutex_lock(
(long long)&log_descriptor[1049025],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x58Du);
for ( i = 0; i < dword_C80BE8; ++i )
{
v3 = (_DWORD *)(8LL * i + qword_C80BE0);
if ( *v3 == a1 )
break;
}
v1 = v3[1] - 1;
v3[1] = v1;
if ( !v1 )
delete_dynamic_element(&log_descriptor[1049034], (unsigned int)i);
return inline_mysql_mutex_unlock((long long)&log_descriptor[1049025]);
}
| translog_mark_file_finished:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001385b5
LAB_001385b5:
LEA RDI,[0x57fd90]
ADD RDI,0x800e08
LEA RSI,[0x2573aa]
MOV EDX,0x58d
CALL 0x0012bff0
JMP 0x001385d6
LAB_001385d6:
MOV dword ptr [RBP + -0x8],0x0
LAB_001385dd:
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [0x00d80be8]
JGE 0x00138618
MOV RAX,qword ptr [0x00d80be0]
MOVSXD RCX,dword ptr [RBP + -0x8]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x4]
JNZ 0x0013860b
JMP 0x00138618
LAB_0013860b:
JMP 0x0013860d
LAB_0013860d:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x001385dd
LAB_00138618:
JMP 0x0013861a
LAB_0013861a:
JMP 0x0013861c
LAB_0013861c:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x4]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x4],EAX
CMP EAX,0x0
JNZ 0x00138644
MOV ESI,dword ptr [RBP + -0x8]
LEA RDI,[0x57fd90]
ADD RDI,0x800e50
CALL 0x001da820
LAB_00138644:
LEA RDI,[0x57fd90]
ADD RDI,0x800e08
CALL 0x0012c060
JMP 0x00138659
LAB_00138659:
ADD RSP,0x10
POP RBP
RET
|
void translog_mark_file_finished(int param_1)
{
int iVar1;
int *local_18;
int local_10;
inline_mysql_mutex_lock
(&DAT_00d80b98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x58d);
local_10 = 0;
while ((local_10 < DAT_00d80be8 &&
(local_18 = (int *)(DAT_00d80be0 + (long)local_10 * 8), *local_18 != param_1))) {
local_10 = local_10 + 1;
}
iVar1 = local_18[1];
local_18[1] = iVar1 + -1;
if (iVar1 + -1 == 0) {
delete_dynamic_element(&DAT_00d80be0,local_10);
}
inline_mysql_mutex_unlock(&DAT_00d80b98);
return;
}
|
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.