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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
21,500 | test_if_reopen | eloqsql/storage/myisam/mi_open.c | MI_INFO *test_if_reopen(char *filename)
{
LIST *pos;
for (pos=myisam_open_list ; pos ; pos=pos->next)
{
MI_INFO *info=(MI_INFO*) pos->data;
MYISAM_SHARE *share=info->s;
DBUG_ASSERT(strcmp(share->unique_file_name,filename) ||
share->last_version);
if (!strcmp(share->unique_file_name,filename) && share->last_version)
return info;
}
return 0;
} | O0 | c | test_if_reopen:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x3c482d(%rip), %rax # 0x3f66e0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x31f1b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x31eda
movq -0x28(%rbp), %rax
movq 0x258(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x28510
cmpl $0x0, %eax
jne 0x31f0b
movq -0x28(%rbp), %rax
cmpq $0x0, 0x310(%rax)
je 0x31f0b
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x31f23
jmp 0x31f0d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x31eba
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| test_if_reopen:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
lea rax, myisam_open_list
mov rax, [rax]
mov [rbp+var_18], rax
loc_31EBA:
cmp [rbp+var_18], 0
jz short loc_31F1B
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short $+2
loc_31EDA:
mov rax, [rbp+var_28]
mov rdi, [rax+258h]
mov rsi, [rbp+var_10]
call _strcmp
cmp eax, 0
jnz short loc_31F0B
mov rax, [rbp+var_28]
cmp qword ptr [rax+310h], 0
jz short loc_31F0B
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp short loc_31F23
loc_31F0B:
jmp short $+2
loc_31F0D:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_18], rax
jmp short loc_31EBA
loc_31F1B:
mov [rbp+var_8], 0
loc_31F23:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long * test_if_reopen(long long a1)
{
long long v2; // [rsp+8h] [rbp-28h]
long long *v3; // [rsp+10h] [rbp-20h]
long long i; // [rsp+18h] [rbp-18h]
for ( i = myisam_open_list; i; i = *(_QWORD *)(i + 8) )
{
v3 = *(long long **)(i + 16);
v2 = *v3;
if ( !(unsigned int)strcmp(*(_QWORD *)(*v3 + 600), a1) && *(_QWORD *)(v2 + 784) )
return v3;
}
return 0LL;
}
| test_if_reopen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x4f66e0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_00131eba:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00131f1b
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00131eda
LAB_00131eda:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x258]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00128510
CMP EAX,0x0
JNZ 0x00131f0b
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x310],0x0
JZ 0x00131f0b
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00131f23
LAB_00131f0b:
JMP 0x00131f0d
LAB_00131f0d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00131eba
LAB_00131f1b:
MOV qword ptr [RBP + -0x8],0x0
LAB_00131f23:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long * test_if_reopen(char *param_1)
{
long *plVar1;
long lVar2;
int iVar3;
long local_20;
local_20 = myisam_open_list;
while( true ) {
if (local_20 == 0) {
return (long *)0x0;
}
plVar1 = *(long **)(local_20 + 0x10);
lVar2 = *plVar1;
iVar3 = strcmp(*(char **)(lVar2 + 600),param_1);
if ((iVar3 == 0) && (*(long *)(lVar2 + 0x310) != 0)) break;
local_20 = *(long *)(local_20 + 8);
}
return plVar1;
}
| |
21,501 | google::protobuf::UnescapeCEscapeString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc | int UnescapeCEscapeString(const std::string &src, std::string *dest,
std::vector<std::string> *errors) {
std::unique_ptr<char[]> unescaped(new char[src.size() + 1]);
int len = UnescapeCEscapeSequences(src.c_str(), unescaped.get(), errors);
GOOGLE_CHECK(dest);
dest->assign(unescaped.get(), len);
return len;
} | O0 | cpp | google::protobuf::UnescapeCEscapeString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*):
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x147d0
movq %rax, %rdi
incq %rdi
callq 0x13040
movq %rax, %rsi
leaq 0x88(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x30440
movq 0xa0(%rsp), %rdi
callq 0x13190
movq 0x20(%rsp), %rdi
movq %rax, 0x28(%rsp)
callq 0x30470
movq 0x28(%rsp), %rdi
movq %rax, %rsi
movq 0x90(%rsp), %rdx
callq 0x27550
movl %eax, 0x30(%rsp)
jmp 0x27ac3
movl 0x30(%rsp), %eax
movl %eax, 0x84(%rsp)
movq 0x98(%rsp), %rax
movb $0x0, 0x37(%rsp)
cmpq $0x0, %rax
je 0x27ae3
jmp 0x27b30
leaq 0x1c51a6(%rip), %rdx # 0x1ecc90
leaq 0x38(%rsp), %rdi
movl $0x3, %esi
movl $0x1c8, %ecx # imm = 0x1C8
callq 0x237e0
jmp 0x27b00
movb $0x1, 0x37(%rsp)
leaq 0x1c5231(%rip), %rsi # 0x1ecd3d
leaq 0x38(%rsp), %rdi
callq 0x230a0
movq %rax, 0x18(%rsp)
jmp 0x27b1d
movq 0x18(%rsp), %rsi
leaq 0x36(%rsp), %rdi
callq 0x23250
jmp 0x27b2e
jmp 0x27b30
testb $0x1, 0x37(%rsp)
jne 0x27b39
jmp 0x27b43
leaq 0x38(%rsp), %rdi
callq 0x23820
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x30470
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movslq 0x84(%rsp), %rdx
callq 0x135b0
jmp 0x27b74
movl 0x84(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x304a0
movl 0xc(%rsp), %eax
addq $0xa8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x27bcb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
testb $0x1, 0x37(%rsp)
jne 0x27bbf
jmp 0x27bc9
leaq 0x38(%rsp), %rdi
callq 0x23820
jmp 0x27bcb
leaq 0x88(%rsp), %rdi
callq 0x304a0
movq 0x78(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf21UnescapeCEscapeStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS6_PSt6vectorIS6_SaIS6_EE:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov [rsp+0A8h+var_18], rdx
mov rdi, [rsp+0A8h+var_8]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, rax
inc rdi; unsigned __int64
call __Znam; operator new[](ulong)
mov rsi, rax
lea rdi, [rsp+0A8h+var_20]
mov [rsp+0A8h+var_88], rdi
call _ZNSt10unique_ptrIA_cSt14default_deleteIS0_EEC2IPcS2_vbEET_; std::unique_ptr<char []>::unique_ptr<char *,std::default_delete<char []>,void,bool>(char *)
mov rdi, [rsp+0A8h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_80], rax
call _ZNKSt10unique_ptrIA_cSt14default_deleteIS0_EE3getEv; std::unique_ptr<char []>::get(void)
mov rdi, [rsp+0A8h+var_80]
mov rsi, rax
mov rdx, [rsp+0A8h+var_18]
call _ZN6google8protobuf24UnescapeCEscapeSequencesEPKcPcPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EE; google::protobuf::UnescapeCEscapeSequences(char const*,char *,std::vector<std::string> *)
mov [rsp+0A8h+var_78], eax
jmp short $+2
loc_27AC3:
mov eax, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_24], eax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_71], 0
cmp rax, 0
jz short loc_27AE3
jmp short loc_27B30
loc_27AE3:
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0A8h+var_70]
mov esi, 3
mov ecx, 1C8h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
jmp short $+2
loc_27B00:
mov [rsp+0A8h+var_71], 1
lea rsi, aCheckFailedDes; "CHECK failed: dest: "
lea rdi, [rsp+0A8h+var_70]
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0A8h+var_90], rax
jmp short $+2
loc_27B1D:
mov rsi, [rsp+0A8h+var_90]
lea rdi, [rsp+0A8h+var_72]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_27B2E:
jmp short $+2
loc_27B30:
test [rsp+0A8h+var_71], 1
jnz short loc_27B39
jmp short loc_27B43
loc_27B39:
lea rdi, [rsp+0A8h+var_70]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_27B43:
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_98], rax
lea rdi, [rsp+0A8h+var_20]
call _ZNKSt10unique_ptrIA_cSt14default_deleteIS0_EE3getEv; std::unique_ptr<char []>::get(void)
mov rdi, [rsp+0A8h+var_98]
mov rsi, rax
movsxd rdx, [rsp+0A8h+var_24]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm; std::string::assign(char const*,ulong)
jmp short $+2
loc_27B74:
mov eax, [rsp+0A8h+var_24]
mov [rsp+0A8h+var_9C], eax
lea rdi, [rsp+0A8h+var_20]
call _ZNSt10unique_ptrIA_cSt14default_deleteIS0_EED2Ev; std::unique_ptr<char []>::~unique_ptr()
mov eax, [rsp+0A8h+var_9C]
add rsp, 0A8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
jmp short loc_27BCB
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
test [rsp+arg_2F], 1
jnz short loc_27BBF
jmp short loc_27BC9
loc_27BBF:
lea rdi, [rsp+arg_30]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_27BC9:
jmp short $+2
loc_27BCB:
lea rdi, [rsp+arg_80]
call _ZNSt10unique_ptrIA_cSt14default_deleteIS0_EED2Ev; std::unique_ptr<char []>::~unique_ptr()
mov rdi, [rsp+arg_70]
call __Unwind_Resume
| long long google::protobuf::UnescapeCEscapeString(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // rax
char *v5; // rsi
google::protobuf::internal::LogMessage *v6; // rsi
long long v7; // rax
unsigned int v9; // [rsp+Ch] [rbp-9Ch]
long long v10; // [rsp+10h] [rbp-98h]
char *v11; // [rsp+28h] [rbp-80h]
char v12; // [rsp+36h] [rbp-72h] BYREF
char v13; // [rsp+37h] [rbp-71h]
_BYTE v14[76]; // [rsp+38h] [rbp-70h] BYREF
unsigned int v15; // [rsp+84h] [rbp-24h]
_BYTE v16[8]; // [rsp+88h] [rbp-20h] BYREF
long long v17; // [rsp+90h] [rbp-18h]
long long v18; // [rsp+98h] [rbp-10h]
long long v19; // [rsp+A0h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v3 = std::string::size(a1);
v4 = operator new[](v3 + 1);
std::unique_ptr<char []>::unique_ptr<char *,std::default_delete<char []>,void,bool>(v16, v4);
v11 = (char *)std::string::c_str(v19);
v5 = (char *)std::unique_ptr<char []>::get(v16);
v15 = google::protobuf::UnescapeCEscapeSequences(v11, v5);
v13 = 0;
if ( !v18 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v14,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc",
456);
v13 = 1;
v6 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
(long long)v14,
(long long)"CHECK failed: dest: ");
google::protobuf::internal::LogFinisher::operator=((long long)&v12, v6);
}
if ( (v13 & 1) != 0 )
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v14);
v10 = v18;
v7 = std::unique_ptr<char []>::get(v16);
std::string::assign(v10, v7, (int)v15);
v9 = v15;
std::unique_ptr<char []>::~unique_ptr(v16);
return v9;
}
| UnescapeCEscapeString:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001147d0
MOV RDI,RAX
INC RDI
CALL 0x00113040
MOV RSI,RAX
LEA RDI,[RSP + 0x88]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00130440
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x00113190
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x00130470
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x90]
LAB_00127ab8:
CALL 0x00127550
MOV dword ptr [RSP + 0x30],EAX
JMP 0x00127ac3
LAB_00127ac3:
MOV EAX,dword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x84],EAX
MOV RAX,qword ptr [RSP + 0x98]
MOV byte ptr [RSP + 0x37],0x0
CMP RAX,0x0
JZ 0x00127ae3
JMP 0x00127b30
LAB_00127ae3:
LEA RDX,[0x2ecc90]
LEA RDI,[RSP + 0x38]
MOV ESI,0x3
MOV ECX,0x1c8
CALL 0x001237e0
JMP 0x00127b00
LAB_00127b00:
MOV byte ptr [RSP + 0x37],0x1
LAB_00127b05:
LEA RSI,[0x2ecd3d]
LEA RDI,[RSP + 0x38]
CALL 0x001230a0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00127b1d
LAB_00127b1d:
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x36]
CALL 0x00123250
JMP 0x00127b2e
LAB_00127b2e:
JMP 0x00127b30
LAB_00127b30:
TEST byte ptr [RSP + 0x37],0x1
JNZ 0x00127b39
JMP 0x00127b43
LAB_00127b39:
LEA RDI,[RSP + 0x38]
CALL 0x00123820
LAB_00127b43:
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x88]
CALL 0x00130470
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
MOVSXD RDX,dword ptr [RSP + 0x84]
LAB_00127b6d:
CALL 0x001135b0
LAB_00127b72:
JMP 0x00127b74
LAB_00127b74:
MOV EAX,dword ptr [RSP + 0x84]
MOV dword ptr [RSP + 0xc],EAX
LEA RDI,[RSP + 0x88]
CALL 0x001304a0
MOV EAX,dword ptr [RSP + 0xc]
ADD RSP,0xa8
RET
|
/* google::protobuf::UnescapeCEscapeString(std::__cxx11::string const&, std::__cxx11::string*,
std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >*) */
int4 google::protobuf::UnescapeCEscapeString(string *param_1,string *param_2,vector *param_3)
{
int4 uVar1;
string *psVar2;
long lVar3;
char *pcVar4;
char *pcVar5;
LogMessage *pLVar6;
ulong uVar7;
LogFinisher local_72;
byte local_71;
LogMessage local_70 [76];
int4 local_24;
unique_ptr<char[],std::default_delete<char[]>> local_20 [8];
vector *local_18;
string *local_10;
string *local_8;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
lVar3 = std::__cxx11::string::size(param_1);
pcVar4 = (char *)operator_new__(lVar3 + 1);
std::unique_ptr<char[],std::default_delete<char[]>>::
unique_ptr<char*,std::default_delete<char[]>,void,bool>(local_20,pcVar4);
pcVar4 = (char *)std::__cxx11::string::c_str();
pcVar5 = (char *)std::unique_ptr<char[],std::default_delete<char[]>>::get(local_20);
/* try { // try from 00127ab8 to 00127afd has its CatchHandler @ 00127b98 */
local_24 = UnescapeCEscapeSequences(pcVar4,pcVar5,local_18);
local_71 = 0;
if (local_10 == (string *)0x0) {
internal::LogMessage::LogMessage
(local_70,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc"
,0x1c8);
local_71 = 1;
/* try { // try from 00127b05 to 00127b2b has its CatchHandler @ 00127ba8 */
pLVar6 = (LogMessage *)internal::LogMessage::operator<<(local_70,"CHECK failed: dest: ");
internal::LogFinisher::operator=(&local_72,pLVar6);
}
if ((local_71 & 1) != 0) {
internal::LogMessage::~LogMessage(local_70);
}
psVar2 = local_10;
uVar7 = std::unique_ptr<char[],std::default_delete<char[]>>::get(local_20);
/* try { // try from 00127b6d to 00127b71 has its CatchHandler @ 00127b98 */
std::__cxx11::string::assign((char *)psVar2,uVar7);
uVar1 = local_24;
std::unique_ptr<char[],std::default_delete<char[]>>::~unique_ptr(local_20);
return uVar1;
}
| |
21,502 | fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>>, long, std::ratio<1l, 1000000l>>::on_12_hour(fmt::v10::detail::numeric_system, fmt::v10::detail::pad_type) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/chrono.h | void on_12_hour(numeric_system ns, pad_type pad) {
if (handle_nan_inf()) return;
if (ns == numeric_system::standard) return write(hour12(), 2, pad);
auto time = tm();
time.tm_hour = to_nonnegative_int(hour12(), 12);
format_tm(time, &tm_writer_type::on_12_hour, ns, pad);
} | O3 | c | fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>>, long, std::ratio<1l, 1000000l>>::on_12_hour(fmt::v10::detail::numeric_system, fmt::v10::detail::pad_type):
movl %edx, %r9d
testl %esi, %esi
je 0xf15bc
subq $0x38, %rsp
movl %esi, %r8d
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq $0x0, 0x30(%rsi)
movq 0x20(%rdi), %rax
shrq $0x4, %rax
movabsq $0x91a2b3c4d5e6f81, %rcx # imm = 0x91A2B3C4D5E6F81
mulq %rcx
movq %rdx, %rcx
shrq $0x3, %rcx
movabsq $0x1555555555555556, %rdx # imm = 0x1555555555555556
movq %rcx, %rax
mulq %rdx
shlq $0x2, %rdx
leaq (%rdx,%rdx,2), %rax
subq %rax, %rcx
movl $0xc, %eax
cmovnel %ecx, %eax
movl %eax, 0x8(%rsi)
leaq 0xfe6(%rip), %rdx # 0xf2596
xorl %ecx, %ecx
callq 0xf1a4a
addq $0x38, %rsp
retq
movq 0x20(%rdi), %rax
shrq $0x4, %rax
movabsq $0x91a2b3c4d5e6f81, %rcx # imm = 0x91A2B3C4D5E6F81
mulq %rcx
movq %rdx, %rcx
shrq $0x3, %rcx
movabsq $0x1555555555555556, %rdx # imm = 0x1555555555555556
movq %rcx, %rax
mulq %rdx
shlq $0x2, %rdx
leaq (%rdx,%rdx,2), %rax
subq %rax, %rcx
movl $0xc, %esi
cmovneq %rcx, %rsi
movl $0x2, %edx
movl %r9d, %ecx
jmp 0xf1862
nop
| _ZN3fmt3v106detail16chrono_formatterINS0_20basic_format_contextINS0_8appenderEcEESt20back_insert_iteratorINS0_19basic_memory_bufferIcLm500ESaIcEEEElSt5ratioILl1ELl1000000EEE10on_12_hourENS1_14numeric_systemENS1_8pad_typeE:
mov r9d, edx
test esi, esi
jz short loc_F15BC
sub rsp, 38h
mov r8d, esi
xorps xmm0, xmm0
mov rsi, rsp
movaps xmmword ptr [rsi+20h], xmm0
movaps xmmword ptr [rsi+10h], xmm0
movaps xmmword ptr [rsi], xmm0
mov qword ptr [rsi+30h], 0
mov rax, [rdi+20h]
shr rax, 4
mov rcx, 91A2B3C4D5E6F81h
mul rcx
mov rcx, rdx
shr rcx, 3
mov rdx, 1555555555555556h
mov rax, rcx
mul rdx
shl rdx, 2
lea rax, [rdx+rdx*2]
sub rcx, rax
mov eax, 0Ch
cmovnz eax, ecx
mov [rsi+8], eax
lea rdx, _ZN3fmt3v106detail9tm_writerISt20back_insert_iteratorINS0_19basic_memory_bufferIcLm500ESaIcEEEEcNSt6chrono8durationIlSt5ratioILl1ELl1EEEEE10on_12_hourENS1_14numeric_systemENS1_8pad_typeE; fmt::v10::detail::tm_writer<std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,char,std::chrono::duration<long,std::ratio<1l,1l>>>::on_12_hour(fmt::v10::detail::numeric_system,fmt::v10::detail::pad_type)
xor ecx, ecx
call _ZN3fmt3v106detail16chrono_formatterINS0_20basic_format_contextINS0_8appenderEcEESt20back_insert_iteratorINS0_19basic_memory_bufferIcLm500ESaIcEEEElSt5ratioILl1ELl1000000EEE9format_tmIMNS1_9tm_writerISA_cNSt6chrono8durationIlSB_ILl1ELl1EEEEEEFvNS1_14numeric_systemENS1_8pad_typeEEJSL_SM_EEEvRK2tmT_DpT0_; fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000l>>::format_tm<void (fmt::v10::detail::tm_writer<std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,char,std::chrono::duration<long,std::ratio<1l,1l>>>::*)(fmt::v10::detail::numeric_system,fmt::v10::detail::pad_type),fmt::v10::detail::numeric_system,fmt::v10::detail::pad_type>(tm const&,void (fmt::v10::detail::tm_writer<std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,char,std::chrono::duration<long,std::ratio<1l,1l>>>::*)(fmt::v10::detail::numeric_system,fmt::v10::detail::pad_type),fmt::v10::detail::numeric_system,fmt::v10::detail::pad_type)
add rsp, 38h
retn
loc_F15BC:
mov rax, [rdi+20h]
shr rax, 4
mov rcx, 91A2B3C4D5E6F81h
mul rcx
mov rcx, rdx
shr rcx, 3
mov rdx, 1555555555555556h
mov rax, rcx
mul rdx
shl rdx, 2
lea rax, [rdx+rdx*2]
sub rcx, rax
mov esi, 0Ch
cmovnz rsi, rcx
mov edx, 2
mov ecx, r9d
jmp _ZN3fmt3v106detail16chrono_formatterINS0_20basic_format_contextINS0_8appenderEcEESt20back_insert_iteratorINS0_19basic_memory_bufferIcLm500ESaIcEEEElSt5ratioILl1ELl1000000EEE5writeEliNS1_8pad_typeE; fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000l>>::write(long,int,fmt::v10::detail::pad_type)
| long long fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000l>>::on_12_hour(
long long a1,
int a2,
unsigned int a3)
{
char v3; // al
long long v5; // rsi
__int128 v6; // [rsp-38h] [rbp-38h] BYREF
__int128 v7; // [rsp-28h] [rbp-28h]
__int128 v8; // [rsp-18h] [rbp-18h]
long long v9; // [rsp-8h] [rbp-8h]
if ( a2 )
{
v8 = 0LL;
v7 = 0LL;
v6 = 0LL;
v9 = 0LL;
v3 = 12;
if ( *(_QWORD *)(a1 + 32) / 0xE10uLL != 12
* ((0x1555555555555556LL * (unsigned __int128)(*(_QWORD *)(a1 + 32) / 0xE10uLL)) >> 64) )
v3 = *(_QWORD *)(a1 + 32) / 0xE10uLL
- 12 * ((0x1555555555555556LL * (unsigned __int128)(*(_QWORD *)(a1 + 32) / 0xE10uLL)) >> 64);
return fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000l>>::format_tm<void (fmt::v10::detail::tm_writer<std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,char,std::chrono::duration<long,std::ratio<1l,1l>>>::*)(fmt::v10::detail::numeric_system,fmt::v10::detail::pad_type),fmt::v10::detail::numeric_system,fmt::v10::detail::pad_type>(
a1,
(unsigned int)&v6,
(unsigned int)&fmt::v10::detail::tm_writer<std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,char,std::chrono::duration<long,std::ratio<1l,1l>>>::on_12_hour,
0,
a2,
a3,
v6,
v3,
(_QWORD)v7,
*((_QWORD *)&v7 + 1),
(_QWORD)v8,
*((_QWORD *)&v8 + 1),
v9);
}
else
{
v5 = 12LL;
if ( *(_QWORD *)(a1 + 32) / 0xE10uLL != 12
* ((0x1555555555555556LL * (unsigned __int128)(*(_QWORD *)(a1 + 32) / 0xE10uLL)) >> 64) )
v5 = *(_QWORD *)(a1 + 32) / 0xE10uLL
- 12 * ((0x1555555555555556LL * (unsigned __int128)(*(_QWORD *)(a1 + 32) / 0xE10uLL)) >> 64);
return fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000l>>::write(
a1,
v5,
2LL,
a3);
}
}
| on_12_hour:
MOV R9D,EDX
TEST ESI,ESI
JZ 0x001f15bc
SUB RSP,0x38
MOV R8D,ESI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI + 0x20],XMM0
MOVAPS xmmword ptr [RSI + 0x10],XMM0
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x30],0x0
MOV RAX,qword ptr [RDI + 0x20]
SHR RAX,0x4
MOV RCX,0x91a2b3c4d5e6f81
MUL RCX
MOV RCX,RDX
SHR RCX,0x3
MOV RDX,0x1555555555555556
MOV RAX,RCX
MUL RDX
SHL RDX,0x2
LEA RAX,[RDX + RDX*0x2]
SUB RCX,RAX
MOV EAX,0xc
CMOVNZ EAX,ECX
MOV dword ptr [RSI + 0x8],EAX
LEA RDX,[0x1f2596]
XOR ECX,ECX
CALL 0x001f1a4a
ADD RSP,0x38
RET
LAB_001f15bc:
MOV RAX,qword ptr [RDI + 0x20]
SHR RAX,0x4
MOV RCX,0x91a2b3c4d5e6f81
MUL RCX
MOV RCX,RDX
SHR RCX,0x3
MOV RDX,0x1555555555555556
MOV RAX,RCX
MUL RDX
SHL RDX,0x2
LEA RAX,[RDX + RDX*0x2]
SUB RCX,RAX
MOV ESI,0xc
CMOVNZ RSI,RCX
MOV EDX,0x2
MOV ECX,R9D
JMP 0x001f1862
|
/* fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender, char>,
std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char> > >,
long, std::ratio<1l, 1000000l> >::on_12_hour(fmt::v10::detail::numeric_system,
fmt::v10::detail::pad_type) */
void __thiscall
fmt::v10::detail::
chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000l>>
::on_12_hour(chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000l>>
*this,int param_2,int4 param_3)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
int8 local_38;
ulong uStack_30;
int8 local_28;
int8 uStack_20;
int8 local_18;
int8 uStack_10;
int8 local_8;
if (param_2 != 0) {
local_18 = 0;
uStack_10 = 0;
local_28 = 0;
uStack_20 = 0;
local_38 = 0;
local_8 = 0;
uVar2 = (*(ulong *)(this + 0x20) / 0xe10) % 0xc;
uVar1 = 0xc;
if (uVar2 != 0) {
uVar1 = (uint)uVar2;
}
uStack_30 = (ulong)uVar1;
format_tm<void(fmt::v10::detail::tm_writer<std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,char,std::chrono::duration<long,std::ratio<1l,1l>>>::*)(fmt::v10::detail::numeric_system,fmt::v10::detail::pad_type),fmt::v10::detail::numeric_system,fmt::v10::detail::pad_type>
(this,&local_38,
tm_writer<std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,char,std::chrono::duration<long,std::ratio<1l,1l>>>
::on_12_hour,0,param_2);
return;
}
uVar3 = (*(ulong *)(this + 0x20) / 0xe10) % 0xc;
uVar2 = 0xc;
if (uVar3 != 0) {
uVar2 = uVar3;
}
write(this,uVar2,2,param_3);
return;
}
| |
21,503 | ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix() | serhmarch[P]ModbusBridge/modbus/src/unix/ModbusSerialPort_p_unix.h | ModbusSerialPortPrivateUnix(bool blocking) :
ModbusSerialPortPrivate(blocking)
{
this->serialPort = -1;
this->timestamp = 0;
if (blocking)
{
writeMethod = &ModbusSerialPortPrivateUnix::blockingWrite;
readMethod = &ModbusSerialPortPrivateUnix::blockingRead ;
}
else
{
writeMethod = &ModbusSerialPortPrivateUnix::nonBlockingWrite;
readMethod = &ModbusSerialPortPrivateUnix::nonBlockingRead ;
}
} | O0 | c | ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x25640
movq -0x10(%rbp), %rdi
movl $0xb0, %esi
callq 0x6420
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN27ModbusSerialPortPrivateUnixD0Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN27ModbusSerialPortPrivateUnixD2Ev; ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix()
mov rdi, [rbp+var_10]; void *
mov esi, 0B0h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
| void ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix(ModbusSerialPortPrivateUnix *this)
{
ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix(this);
operator delete(this, 0xB0uLL);
}
| ~ModbusSerialPortPrivateUnix:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00125640
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xb0
CALL 0x00106420
ADD RSP,0x10
POP RBP
RET
|
/* ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix() */
void __thiscall
ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix(ModbusSerialPortPrivateUnix *this)
{
~ModbusSerialPortPrivateUnix(this);
operator_delete(this,0xb0);
return;
}
| |
21,504 | ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix() | serhmarch[P]ModbusBridge/modbus/src/unix/ModbusSerialPort_p_unix.h | ModbusSerialPortPrivateUnix(bool blocking) :
ModbusSerialPortPrivate(blocking)
{
this->serialPort = -1;
this->timestamp = 0;
if (blocking)
{
writeMethod = &ModbusSerialPortPrivateUnix::blockingWrite;
readMethod = &ModbusSerialPortPrivateUnix::blockingRead ;
}
else
{
writeMethod = &ModbusSerialPortPrivateUnix::nonBlockingWrite;
readMethod = &ModbusSerialPortPrivateUnix::nonBlockingRead ;
}
} | O1 | c | ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix():
pushq %rbx
movq %rdi, %rbx
leaq 0xc383(%rip), %rax # 0x22d28
movq %rax, (%rdi)
movq 0x40(%rdi), %rdi
leaq 0x50(%rbx), %rax
cmpq %rax, %rdi
je 0x169c0
movq (%rax), %rsi
incq %rsi
callq 0x5310
leaq 0xc241(%rip), %rax # 0x22c08
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
leaq 0x28(%rbx), %rax
cmpq %rax, %rdi
je 0x169e2
movq (%rax), %rsi
incq %rsi
callq 0x5310
movl $0xb0, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x5310
| _ZN27ModbusSerialPortPrivateUnixD0Ev:
push rbx
mov rbx, rdi
lea rax, off_22D28
mov [rdi], rax
mov rdi, [rdi+40h]; void *
lea rax, [rbx+50h]
cmp rdi, rax
jz short loc_169C0
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_169C0:
lea rax, off_22C08
mov [rbx], rax
mov rdi, [rbx+18h]; void *
lea rax, [rbx+28h]
cmp rdi, rax
jz short loc_169E2
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_169E2:
mov esi, 0B0h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix(ModbusSerialPortPrivateUnix *this)
{
char *v2; // rdi
char *v3; // rdi
*(_QWORD *)this = off_22D28;
v2 = (char *)*((_QWORD *)this + 8);
if ( v2 != (char *)this + 80 )
operator delete(v2, *((_QWORD *)this + 10) + 1LL);
*(_QWORD *)this = off_22C08;
v3 = (char *)*((_QWORD *)this + 3);
if ( v3 != (char *)this + 40 )
operator delete(v3, *((_QWORD *)this + 5) + 1LL);
operator delete(this, 0xB0uLL);
}
| ~ModbusSerialPortPrivateUnix:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x122d28]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x40]
LEA RAX,[RBX + 0x50]
CMP RDI,RAX
JZ 0x001169c0
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00105310
LAB_001169c0:
LEA RAX,[0x122c08]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
LEA RAX,[RBX + 0x28]
CMP RDI,RAX
JZ 0x001169e2
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00105310
LAB_001169e2:
MOV ESI,0xb0
MOV RDI,RBX
POP RBX
JMP 0x00105310
|
/* ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix() */
void __thiscall
ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix(ModbusSerialPortPrivateUnix *this)
{
*(int ***)this = &PTR__ModbusSerialPortPrivate_00122d28;
if (*(ModbusSerialPortPrivateUnix **)(this + 0x40) != this + 0x50) {
operator_delete(*(ModbusSerialPortPrivateUnix **)(this + 0x40),*(long *)(this + 0x50) + 1);
}
*(int ***)this = &PTR__ModbusPortPrivate_00122c08;
if (*(ModbusSerialPortPrivateUnix **)(this + 0x18) != this + 0x28) {
operator_delete(*(ModbusSerialPortPrivateUnix **)(this + 0x18),*(long *)(this + 0x28) + 1);
}
operator_delete(this,0xb0);
return;
}
| |
21,505 | ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix() | serhmarch[P]ModbusBridge/modbus/src/unix/ModbusSerialPort_p_unix.h | ModbusSerialPortPrivateUnix(bool blocking) :
ModbusSerialPortPrivate(blocking)
{
this->serialPort = -1;
this->timestamp = 0;
if (blocking)
{
writeMethod = &ModbusSerialPortPrivateUnix::blockingWrite;
readMethod = &ModbusSerialPortPrivateUnix::blockingRead ;
}
else
{
writeMethod = &ModbusSerialPortPrivateUnix::nonBlockingWrite;
readMethod = &ModbusSerialPortPrivateUnix::nonBlockingRead ;
}
} | O3 | c | ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix():
pushq %rbx
movq %rdi, %rbx
leaq 0xb58d(%rip), %rax # 0x21d28
movq %rax, (%rdi)
movq 0x40(%rdi), %rdi
leaq 0x50(%rbx), %rax
cmpq %rax, %rdi
je 0x167b6
movq (%rax), %rsi
incq %rsi
callq 0x5310
leaq 0xb44b(%rip), %rax # 0x21c08
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
leaq 0x28(%rbx), %rax
cmpq %rax, %rdi
je 0x167d8
movq (%rax), %rsi
incq %rsi
callq 0x5310
movl $0xb0, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x5310
| _ZN27ModbusSerialPortPrivateUnixD0Ev:
push rbx
mov rbx, rdi
lea rax, off_21D28
mov [rdi], rax
mov rdi, [rdi+40h]; void *
lea rax, [rbx+50h]
cmp rdi, rax
jz short loc_167B6
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_167B6:
lea rax, off_21C08
mov [rbx], rax
mov rdi, [rbx+18h]; void *
lea rax, [rbx+28h]
cmp rdi, rax
jz short loc_167D8
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_167D8:
mov esi, 0B0h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix(ModbusSerialPortPrivateUnix *this)
{
char *v2; // rdi
char *v3; // rdi
*(_QWORD *)this = off_21D28;
v2 = (char *)*((_QWORD *)this + 8);
if ( v2 != (char *)this + 80 )
operator delete(v2, *((_QWORD *)this + 10) + 1LL);
*(_QWORD *)this = off_21C08;
v3 = (char *)*((_QWORD *)this + 3);
if ( v3 != (char *)this + 40 )
operator delete(v3, *((_QWORD *)this + 5) + 1LL);
operator delete(this, 0xB0uLL);
}
| ~ModbusSerialPortPrivateUnix:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x121d28]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x40]
LEA RAX,[RBX + 0x50]
CMP RDI,RAX
JZ 0x001167b6
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00105310
LAB_001167b6:
LEA RAX,[0x121c08]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
LEA RAX,[RBX + 0x28]
CMP RDI,RAX
JZ 0x001167d8
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00105310
LAB_001167d8:
MOV ESI,0xb0
MOV RDI,RBX
POP RBX
JMP 0x00105310
|
/* ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix() */
void __thiscall
ModbusSerialPortPrivateUnix::~ModbusSerialPortPrivateUnix(ModbusSerialPortPrivateUnix *this)
{
*(int ***)this = &PTR__ModbusSerialPortPrivate_00121d28;
if (*(ModbusSerialPortPrivateUnix **)(this + 0x40) != this + 0x50) {
operator_delete(*(ModbusSerialPortPrivateUnix **)(this + 0x40),*(long *)(this + 0x50) + 1);
}
*(int ***)this = &PTR__ModbusPortPrivate_00121c08;
if (*(ModbusSerialPortPrivateUnix **)(this + 0x18) != this + 0x28) {
operator_delete(*(ModbusSerialPortPrivateUnix **)(this + 0x18),*(long *)(this + 0x28) + 1);
}
operator_delete(this,0xb0);
return;
}
| |
21,506 | mi_write_blob_record | eloqsql/storage/myisam/mi_dynrec.c | int _mi_write_blob_record(MI_INFO *info, const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
extra= (ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+
MI_DYN_DELETE_BLOCK_HEADER+1);
reclength= (info->s->base.pack_reclength +
_mi_calc_total_blob_length(info,record)+ extra);
if (!(rec_buff=(uchar*) my_alloca(reclength)))
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(-1);
}
reclength2= _mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
record);
DBUG_PRINT("info",("reclength: %lu reclength2: %lu",
reclength, reclength2));
DBUG_ASSERT(reclength2 <= reclength);
error=write_dynamic_record(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
reclength2);
my_afree(rec_buff);
return(error);
} | O0 | c | mi_write_blob_record:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x5d, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x148(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa88a0
movq %rax, %rcx
movq -0x48(%rbp), %rax
addq %rcx, %rax
addq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0xf3830
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0xa8846
callq 0xf6090
movl $0x80, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa888e
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x18, %rsi
movq -0x18(%rbp), %rdx
callq 0xa7910
movl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0xa8863
jmp 0xa8865
jmp 0xa8867
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x18, %rsi
movq -0x38(%rbp), %rdx
callq 0xa7e60
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0xf3bb0
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _mi_write_blob_record:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_40], 5Dh ; ']'
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+148h]
mov [rbp+var_48], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _mi_calc_total_blob_length
mov rcx, rax
mov rax, [rbp+var_48]
add rax, rcx
add rax, [rbp+var_40]
mov [rbp+var_30], rax
mov rsi, [rbp+var_30]
xor edi, edi
xor eax, eax
mov edx, eax
call my_malloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_A8846
call _my_thread_var
mov dword ptr [rax], 80h
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_A888E
loc_A8846:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
add rsi, 18h
mov rdx, [rbp+var_18]
call _mi_rec_pack
mov eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_A8863:
jmp short $+2
loc_A8865:
jmp short $+2
loc_A8867:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
add rsi, 18h
mov rdx, [rbp+var_38]
call write_dynamic_record_0
mov [rbp+var_24], eax
mov rdi, [rbp+var_20]
call my_free
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_A888E:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long mi_write_blob_record(_DWORD *a1, _BYTE *a2)
{
const char *v2; // rsi
long long v4; // [rsp+8h] [rbp-48h]
long long v5; // [rsp+18h] [rbp-38h]
unsigned int v6; // [rsp+2Ch] [rbp-24h]
long long v7; // [rsp+30h] [rbp-20h]
v4 = *(_QWORD *)(*(_QWORD *)a1 + 328LL);
v2 = (const char *)(mi_calc_total_blob_length(a1, a2) + v4 + 93);
v7 = my_malloc(0LL, v2, 0LL);
if ( v7 )
{
v5 = (unsigned int)mi_rec_pack(a1, (_BYTE *)(v7 + 24), a2);
v6 = write_dynamic_record_0(a1, (const char *)(v7 + 24), v5);
my_free(v7);
return v6;
}
else
{
*(_DWORD *)my_thread_var(0LL, v2) = 128;
return (unsigned int)-1;
}
}
| _mi_write_blob_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x40],0x5d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001a88a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,RCX
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x30],RAX
MOV RSI,qword ptr [RBP + -0x30]
XOR EDI,EDI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f3830
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x001a8846
CALL 0x001f6090
MOV dword ptr [RAX],0x80
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001a888e
LAB_001a8846:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001a7910
MOV EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001a8863
LAB_001a8863:
JMP 0x001a8865
LAB_001a8865:
JMP 0x001a8867
LAB_001a8867:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001a7e60
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001f3bb0
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_001a888e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4 _mi_write_blob_record(long *param_1,int8 param_2)
{
int4 uVar1;
long lVar2;
long lVar3;
int4 *puVar4;
int4 local_c;
lVar3 = *(long *)(*param_1 + 0x148);
lVar2 = _mi_calc_total_blob_length(param_1,param_2);
lVar3 = my_malloc(0,lVar3 + lVar2 + 0x5d,0);
if (lVar3 == 0) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x80;
local_c = 0xffffffff;
}
else {
uVar1 = _mi_rec_pack(param_1,lVar3 + 0x18,param_2);
local_c = write_dynamic_record(param_1,lVar3 + 0x18,uVar1);
my_free(lVar3);
}
return local_c;
}
| |
21,507 | my_multi_malloc_large | eloqsql/mysys/mulalloc.c | void *my_multi_malloc_large(PSI_memory_key key, myf myFlags, ...)
{
va_list args;
char **ptr,*start,*res;
ulonglong tot_length,length;
DBUG_ENTER("my_multi_malloc");
va_start(args,myFlags);
tot_length=0;
while ((ptr=va_arg(args, char **)))
{
length=va_arg(args,ulonglong);
tot_length+=ALIGN_SIZE(length);
}
va_end(args);
if (!(start=(char *) my_malloc(key, (size_t) tot_length, myFlags)))
DBUG_RETURN(0); /* purecov: inspected */
va_start(args,myFlags);
res=start;
while ((ptr=va_arg(args, char **)))
{
*ptr=res;
length=va_arg(args,ulonglong);
res+=ALIGN_SIZE(length);
}
va_end(args);
DBUG_RETURN((void*) start);
} | O0 | c | my_multi_malloc_large:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
testb %al, %al
je 0x7b371
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq $0x0, -0x50(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x7b3fb
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x7b418
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x7b4b3
leaq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0x28, %eax
ja 0x7b46b
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x140(%rbp)
jmp 0x7b488
movq -0x138(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x7b3c0
leaq -0x30(%rbp), %rax
movl -0xc(%rbp), %edi
movq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x80550
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x7b4e0
jmp 0x7b4d3
movq $0x0, -0x8(%rbp)
jmp 0x7b616
leaq -0x30(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x150(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x144(%rbp)
cmpl $0x28, %eax
ja 0x7b547
movq -0x150(%rbp), %rcx
movl -0x144(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x158(%rbp)
jmp 0x7b564
movq -0x150(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x7b60a
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x15c(%rbp)
cmpl $0x28, %eax
ja 0x7b5c2
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x170(%rbp)
jmp 0x7b5df
movq -0x168(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x8, %rax
subq $0x1, %rax
andq $-0x8, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x7b50c
leaq -0x30(%rbp), %rax
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x170, %rsp # imm = 0x170
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_multi_malloc_large:
push rbp
mov rbp, rsp
sub rsp, 170h
test al, al
jz short loc_7B371
movaps [rbp+var_E0], xmm0
movaps [rbp+var_D0], xmm1
movaps [rbp+var_C0], xmm2
movaps [rbp+var_B0], xmm3
movaps [rbp+var_A0], xmm4
movaps [rbp+var_90], xmm5
movaps [rbp+var_80], xmm6
movaps [rbp+var_70], xmm7
loc_7B371:
mov [rbp+var_E8], r9
mov [rbp+var_F0], r8
mov [rbp+var_F8], rcx
mov [rbp+var_100], rdx
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov [rbp+var_50], 0
loc_7B3C0:
lea rax, [rbp+var_30]
mov [rbp+var_120], rax
mov eax, [rbp+var_30]
mov [rbp+var_114], eax
cmp eax, 28h ; '('
ja short loc_7B3FB
mov rcx, [rbp+var_120]
mov edx, [rbp+var_114]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_128], rax
jmp short loc_7B418
loc_7B3FB:
mov rcx, [rbp+var_120]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_128], rax
loc_7B418:
mov rax, [rbp+var_128]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_7B4B3
lea rax, [rbp+var_30]
mov [rbp+var_138], rax
mov eax, [rbp+var_30]
mov [rbp+var_12C], eax
cmp eax, 28h ; '('
ja short loc_7B46B
mov rcx, [rbp+var_138]
mov edx, [rbp+var_12C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_140], rax
jmp short loc_7B488
loc_7B46B:
mov rcx, [rbp+var_138]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_140], rax
loc_7B488:
mov rax, [rbp+var_140]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_50]
mov [rbp+var_50], rax
jmp loc_7B3C0
loc_7B4B3:
lea rax, [rbp+var_30]
mov edi, [rbp+var_C]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_18]
call my_malloc
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_7B4E0
jmp short $+2
loc_7B4D3:
mov [rbp+var_8], 0
jmp loc_7B616
loc_7B4E0:
lea rax, [rbp+var_30]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_7B50C:
lea rax, [rbp+var_30]
mov [rbp+var_150], rax
mov eax, [rbp+var_30]
mov [rbp+var_144], eax
cmp eax, 28h ; '('
ja short loc_7B547
mov rcx, [rbp+var_150]
mov edx, [rbp+var_144]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_158], rax
jmp short loc_7B564
loc_7B547:
mov rcx, [rbp+var_150]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_158], rax
loc_7B564:
mov rax, [rbp+var_158]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_7B60A
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax], rcx
lea rax, [rbp+var_30]
mov [rbp+var_168], rax
mov eax, [rbp+var_30]
mov [rbp+var_15C], eax
cmp eax, 28h ; '('
ja short loc_7B5C2
mov rcx, [rbp+var_168]
mov edx, [rbp+var_15C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_170], rax
jmp short loc_7B5DF
loc_7B5C2:
mov rcx, [rbp+var_168]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_170], rax
loc_7B5DF:
mov rax, [rbp+var_170]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
add rax, 8
sub rax, 1
and rax, 0FFFFFFFFFFFFFFF8h
add rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp loc_7B50C
loc_7B60A:
lea rax, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_7B616:
mov rax, [rbp+var_8]
add rsp, 170h
pop rbp
retn
| long long my_multi_malloc_large(unsigned int a1, long long a2, ...)
{
_QWORD *overflow_arg_area; // rax
_QWORD *v3; // rax
_QWORD *v4; // rax
_QWORD *v5; // rax
long long i; // [rsp+120h] [rbp-50h]
long long j; // [rsp+128h] [rbp-48h]
long long v9; // [rsp+130h] [rbp-40h]
va_list va; // [rsp+140h] [rbp-30h] BYREF
long long v11; // [rsp+158h] [rbp-18h]
unsigned int v12; // [rsp+164h] [rbp-Ch]
va_start(va, a2);
v12 = a1;
v11 = a2;
for ( i = 0LL; ; i += (*v3 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
overflow_arg_area = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*overflow_arg_area )
break;
if ( va[0].gp_offset > 0x28 )
{
v3 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v3 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
}
v9 = my_malloc(v12, i, v11);
if ( !v9 )
return 0LL;
va_end(va);
va_start(va, a2);
for ( j = v9; ; j += (*v5 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( va[0].gp_offset > 0x28 )
{
v4 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v4 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
if ( !*v4 )
break;
*(_QWORD *)*v4 = j;
if ( va[0].gp_offset > 0x28 )
{
v5 = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
v5 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
}
return v9;
}
| my_multi_malloc_large:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x170
TEST AL,AL
JZ 0x0017b371
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM1
MOVAPS xmmword ptr [RBP + -0xc0],XMM2
MOVAPS xmmword ptr [RBP + -0xb0],XMM3
MOVAPS xmmword ptr [RBP + -0xa0],XMM4
MOVAPS xmmword ptr [RBP + -0x90],XMM5
MOVAPS xmmword ptr [RBP + -0x80],XMM6
MOVAPS xmmword ptr [RBP + -0x70],XMM7
LAB_0017b371:
MOV qword ptr [RBP + -0xe8],R9
MOV qword ptr [RBP + -0xf0],R8
MOV qword ptr [RBP + -0xf8],RCX
MOV qword ptr [RBP + -0x100],RDX
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV qword ptr [RBP + -0x50],0x0
LAB_0017b3c0:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x114],EAX
CMP EAX,0x28
JA 0x0017b3fb
MOV RCX,qword ptr [RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x114]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x128],RAX
JMP 0x0017b418
LAB_0017b3fb:
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x128],RAX
LAB_0017b418:
MOV RAX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x0017b4b3
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x138],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x12c],EAX
CMP EAX,0x28
JA 0x0017b46b
MOV RCX,qword ptr [RBP + -0x138]
MOV EDX,dword ptr [RBP + -0x12c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x140],RAX
JMP 0x0017b488
LAB_0017b46b:
MOV RCX,qword ptr [RBP + -0x138]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x140],RAX
LAB_0017b488:
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0017b3c0
LAB_0017b4b3:
LEA RAX,[RBP + -0x30]
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00180550
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x0017b4e0
JMP 0x0017b4d3
LAB_0017b4d3:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0017b616
LAB_0017b4e0:
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_0017b50c:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x150],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x144],EAX
CMP EAX,0x28
JA 0x0017b547
MOV RCX,qword ptr [RBP + -0x150]
MOV EDX,dword ptr [RBP + -0x144]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x158],RAX
JMP 0x0017b564
LAB_0017b547:
MOV RCX,qword ptr [RBP + -0x150]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x158],RAX
LAB_0017b564:
MOV RAX,qword ptr [RBP + -0x158]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x0017b60a
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x168],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x15c],EAX
CMP EAX,0x28
JA 0x0017b5c2
MOV RCX,qword ptr [RBP + -0x168]
MOV EDX,dword ptr [RBP + -0x15c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x170],RAX
JMP 0x0017b5df
LAB_0017b5c2:
MOV RCX,qword ptr [RBP + -0x168]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x170],RAX
LAB_0017b5df:
MOV RAX,qword ptr [RBP + -0x170]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x8
SUB RAX,0x1
AND RAX,-0x8
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0017b50c
LAB_0017b60a:
LEA RAX,[RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017b616:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x170
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
long my_multi_malloc_large
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
long *local_178;
long *local_160;
long *local_148;
long *local_130;
long local_118 [4];
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
long local_60;
long local_58;
long local_50;
long local_40;
uint local_38;
int4 local_34;
long *local_30;
long *local_28;
int8 local_20;
int4 local_14;
long local_10;
if (in_AL != '\0') {
local_e8 = param_1;
local_d8 = param_2;
local_c8 = param_3;
local_b8 = param_4;
local_a8 = param_5;
local_98 = param_6;
local_88 = param_7;
local_78 = param_8;
}
local_28 = local_118;
local_30 = (long *)&stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
local_58 = 0;
while( true ) {
if (local_38 < 0x29) {
local_130 = (long *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_130 = local_30;
local_30 = local_30 + 1;
}
local_40 = *local_130;
if (local_40 == 0) break;
if (local_38 < 0x29) {
local_148 = (long *)((long)local_28 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_148 = local_30;
local_30 = local_30 + 1;
}
local_60 = *local_148;
local_58 = (local_60 + 7U & 0xfffffffffffffff8) + local_58;
}
local_118[2] = param_11;
local_118[3] = param_12;
local_f8 = param_13;
local_f0 = param_14;
local_20 = param_10;
local_14 = param_9;
local_10 = my_malloc(param_9,local_58,param_10);
if (local_10 == 0) {
local_10 = 0;
}
else {
local_30 = (long *)&stack0x00000008;
local_38 = 0x10;
local_50 = local_10;
while( true ) {
if (local_38 < 0x29) {
local_160 = (long *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_160 = local_30;
local_30 = local_30 + 1;
}
if ((long *)*local_160 == (long *)0x0) break;
*(long *)*local_160 = local_50;
if (local_38 < 0x29) {
local_178 = (long *)((long)local_118 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_178 = local_30;
local_30 = local_30 + 1;
}
local_50 = (*local_178 + 7U & 0xfffffffffffffff8) + local_50;
}
}
return local_10;
}
| |
21,508 | my_error_register | eloqsql/mysys/my_error.c | int my_error_register(const char** (*get_errmsgs)(int error), uint first,
uint last)
{
struct my_err_head *meh_p;
struct my_err_head **search_meh_pp;
/* Allocate a new header structure. */
if (! (meh_p= (struct my_err_head*) my_malloc(key_memory_my_err_head,
sizeof(struct my_err_head),
MYF(MY_WME))))
return 1;
meh_p->get_errmsgs= get_errmsgs;
meh_p->meh_first= first;
meh_p->meh_last= last;
/* Search for the right position in the list. */
for (search_meh_pp= &my_errmsgs_list;
*search_meh_pp;
search_meh_pp= &(*search_meh_pp)->meh_next)
{
if ((*search_meh_pp)->meh_last > first)
break;
}
/* Error numbers must be unique. No overlapping is allowed. */
if (*search_meh_pp && ((*search_meh_pp)->meh_first <= last))
{
my_free(meh_p);
return 1;
}
/* Insert header into the chain. */
meh_p->meh_next= *search_meh_pp;
*search_meh_pp= meh_p;
return 0;
} | O0 | c | my_error_register:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
leaq 0x3571f7(%rip), %rax # 0x3852b0
movl (%rax), %edi
movl $0x18, %esi
movl $0x10, %edx
callq 0x2ebe0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x2e0e0
movl $0x1, -0x4(%rbp)
jmp 0x2e180
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
leaq 0x19f921(%rip), %rax # 0x1cda28
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2e135
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0x14(%rax), %eax
cmpl -0x14(%rbp), %eax
jbe 0x2e126
jmp 0x2e135
jmp 0x2e128
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2e10b
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2e160
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
cmpl -0x18(%rbp), %eax
ja 0x2e160
movq -0x20(%rbp), %rdi
callq 0x2ef60
movl $0x1, -0x4(%rbp)
jmp 0x2e180
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_error_register:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
lea rax, key_memory_my_err_head
mov edi, [rax]
mov esi, 18h
mov edx, 10h
call my_malloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_2E0E0
mov [rbp+var_4], 1
jmp loc_2E180
loc_2E0E0:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+10h], ecx
mov ecx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+14h], ecx
lea rax, my_errmsgs_list
mov [rbp+var_28], rax
loc_2E10B:
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jz short loc_2E135
mov rax, [rbp+var_28]
mov rax, [rax]
mov eax, [rax+14h]
cmp eax, [rbp+var_14]
jbe short loc_2E126
jmp short loc_2E135
loc_2E126:
jmp short $+2
loc_2E128:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short loc_2E10B
loc_2E135:
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jz short loc_2E160
mov rax, [rbp+var_28]
mov rax, [rax]
mov eax, [rax+10h]
cmp eax, [rbp+var_18]
ja short loc_2E160
mov rdi, [rbp+var_20]
call my_free
mov [rbp+var_4], 1
jmp short loc_2E180
loc_2E160:
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax], rcx
mov [rbp+var_4], 0
loc_2E180:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_error_register(long long a1, unsigned int a2, unsigned int a3)
{
long long **i; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = my_malloc(key_memory_my_err_head, 24LL, 16LL);
if ( v5 )
{
*(_QWORD *)(v5 + 8) = a1;
*(_DWORD *)(v5 + 16) = a2;
*(_DWORD *)(v5 + 20) = a3;
for ( i = &my_errmsgs_list; *i && *((_DWORD *)*i + 5) <= a2; i = (long long **)*i )
;
if ( *i && *((_DWORD *)*i + 4) <= a3 )
{
my_free(v5);
return 1;
}
else
{
*(_QWORD *)v5 = *i;
*i = (long long *)v5;
return 0;
}
}
else
{
return 1;
}
}
| my_error_register:
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
LEA RAX,[0x4852b0]
MOV EDI,dword ptr [RAX]
MOV ESI,0x18
MOV EDX,0x10
CALL 0x0012ebe0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0012e0e0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012e180
LAB_0012e0e0:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x10],ECX
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x14],ECX
LEA RAX,[0x2cda28]
MOV qword ptr [RBP + -0x28],RAX
LAB_0012e10b:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JZ 0x0012e135
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x14]
CMP EAX,dword ptr [RBP + -0x14]
JBE 0x0012e126
JMP 0x0012e135
LAB_0012e126:
JMP 0x0012e128
LAB_0012e128:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0012e10b
LAB_0012e135:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JZ 0x0012e160
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x10]
CMP EAX,dword ptr [RBP + -0x18]
JA 0x0012e160
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0012ef60
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012e180
LAB_0012e160:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_0012e180:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_error_register(long param_1,uint param_2,uint param_3)
{
long *plVar1;
int **local_30;
int4 local_c;
plVar1 = (long *)my_malloc(key_memory_my_err_head,0x18,0x10);
if (plVar1 == (long *)0x0) {
local_c = 1;
}
else {
plVar1[1] = param_1;
*(uint *)(plVar1 + 2) = param_2;
*(uint *)((long)plVar1 + 0x14) = param_3;
for (local_30 = &my_errmsgs_list;
(*local_30 != (int *)0x0 && (*(uint *)(*local_30 + 0x14) <= param_2));
local_30 = (int **)*local_30) {
}
if ((*local_30 == (int *)0x0) || (param_3 < *(uint *)(*local_30 + 0x10))) {
*plVar1 = (long)*local_30;
*local_30 = (int *)plVar1;
local_c = 0;
}
else {
my_free(plVar1);
local_c = 1;
}
}
return local_c;
}
| |
21,509 | set_closure_from_var | bluesky950520[P]quickjs/quickjs.c | static void set_closure_from_var(JSContext *ctx, JSClosureVar *cv,
JSVarDef *vd, int var_idx)
{
cv->is_local = TRUE;
cv->is_arg = FALSE;
cv->is_const = vd->is_const;
cv->is_lexical = vd->is_lexical;
cv->var_kind = vd->var_kind;
cv->var_idx = var_idx;
cv->var_name = JS_DupAtom(ctx, vd->var_name);
} | O1 | c | set_closure_from_var:
movb (%rsi), %al
andb $-0x4, %al
incb %al
movb %al, (%rsi)
movb 0xc(%rdx), %r8b
shlb $0x2, %r8b
andb $0x4, %r8b
andb $-0x7, %al
orb %r8b, %al
movb %al, (%rsi)
movb 0xc(%rdx), %r8b
shlb $0x2, %r8b
andb $0x8, %r8b
andb $-0xb, %al
orb %r8b, %al
movb %al, (%rsi)
movb 0xc(%rdx), %r8b
andb $-0x10, %r8b
andb $0xd, %al
orb %r8b, %al
movb %al, (%rsi)
movw %cx, 0x2(%rsi)
movslq (%rdx), %rax
cmpq $0xe0, %rax
jl 0x5c581
movq 0x18(%rdi), %rcx
movq 0x68(%rcx), %rcx
movq (%rcx,%rax,8), %rcx
incl (%rcx)
movl %eax, 0x4(%rsi)
retq
| set_closure_from_var:
mov al, [rsi]
and al, 0FCh
inc al
mov [rsi], al
mov r8b, [rdx+0Ch]
shl r8b, 2
and r8b, 4
and al, 0F9h
or al, r8b
mov [rsi], al
mov r8b, [rdx+0Ch]
shl r8b, 2
and r8b, 8
and al, 0F5h
or al, r8b
mov [rsi], al
mov r8b, [rdx+0Ch]
and r8b, 0F0h
and al, 0Dh
or al, r8b
mov [rsi], al
mov [rsi+2], cx
movsxd rax, dword ptr [rdx]
cmp rax, 0E0h
jl short loc_5C581
mov rcx, [rdi+18h]
mov rcx, [rcx+68h]
mov rcx, [rcx+rax*8]
inc dword ptr [rcx]
loc_5C581:
mov [rsi+4], eax
retn
| long long set_closure_from_var(long long a1, long long a2, int *a3, __int16 a4)
{
char v4; // al
char v5; // al
char v6; // al
long long result; // rax
_DWORD *v8; // rcx
v4 = (*(_BYTE *)a2 & 0xFC) + 1;
*(_BYTE *)a2 = v4;
v5 = (4 * *((_BYTE *)a3 + 12)) & 4 | v4 & 0xF9;
*(_BYTE *)a2 = v5;
v6 = (4 * *((_BYTE *)a3 + 12)) & 8 | v5 & 0xF5;
*(_BYTE *)a2 = v6;
*(_BYTE *)a2 = a3[3] & 0xF0 | v6 & 0xD;
*(_WORD *)(a2 + 2) = a4;
result = *a3;
if ( result >= 224 )
{
v8 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8 * result);
++*v8;
}
*(_DWORD *)(a2 + 4) = result;
return result;
}
| set_closure_from_var:
MOV AL,byte ptr [RSI]
AND AL,0xfc
INC AL
MOV byte ptr [RSI],AL
MOV R8B,byte ptr [RDX + 0xc]
SHL R8B,0x2
AND R8B,0x4
AND AL,0xf9
OR AL,R8B
MOV byte ptr [RSI],AL
MOV R8B,byte ptr [RDX + 0xc]
SHL R8B,0x2
AND R8B,0x8
AND AL,0xf5
OR AL,R8B
MOV byte ptr [RSI],AL
MOV R8B,byte ptr [RDX + 0xc]
AND R8B,0xf0
AND AL,0xd
OR AL,R8B
MOV byte ptr [RSI],AL
MOV word ptr [RSI + 0x2],CX
MOVSXD RAX,dword ptr [RDX]
CMP RAX,0xe0
JL 0x0015c581
MOV RCX,qword ptr [RDI + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RCX + RAX*0x8]
INC dword ptr [RCX]
LAB_0015c581:
MOV dword ptr [RSI + 0x4],EAX
RET
|
void set_closure_from_var(long param_1,byte *param_2,int *param_3,int2 param_4)
{
int iVar1;
int *piVar2;
byte bVar3;
byte bVar4;
byte bVar5;
bVar3 = (*param_2 & 0xfc) + 1;
*param_2 = bVar3;
bVar4 = (*(byte *)(param_3 + 3) & 1) << 2;
*param_2 = bVar3 & 0xf9 | bVar4;
bVar5 = (*(byte *)(param_3 + 3) & 2) << 2;
*param_2 = bVar3 & 0xf1 | bVar4 | bVar5;
*param_2 = bVar3 & 1 | bVar4 | bVar5 | *(byte *)(param_3 + 3) & 0xf0;
*(int2 *)(param_2 + 2) = param_4;
iVar1 = *param_3;
if (0xdf < (long)iVar1) {
piVar2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (long)iVar1 * 8);
*piVar2 = *piVar2 + 1;
}
*(int *)(param_2 + 4) = iVar1;
return;
}
| |
21,510 | ma_update_blob_record | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_update_blob_record(MARIA_HA *info, MARIA_RECORD_POS pos,
const uchar *oldrec __attribute__ ((unused)),
const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
my_bool buff_alloced;
extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+
MARIA_DYN_DELETE_BLOCK_HEADER);
reclength= (info->s->base.pack_reclength+
_ma_calc_total_blob_length(info,record)+ extra);
#ifdef NOT_USED /* We now support big rows */
if (reclength > MARIA_DYN_MAX_ROW_LENGTH)
{
my_errno=HA_ERR_TO_BIG_ROW;
return 1;
}
#endif
alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength);
if (!rec_buff)
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
}
reclength2= _ma_rec_pack(info, rec_buff+
ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
record);
if (!reclength2)
{
error= 1;
goto err;
}
DBUG_ASSERT(reclength2 <= reclength);
error=update_dynamic_record(info,pos,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength2);
err:
stack_alloc_free(rec_buff, buff_alloced);
return(error != 0);
} | O0 | c | ma_update_blob_record:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq $0x5c, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x3a0(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x37bf0
movq %rax, %rcx
movq -0x78(%rbp), %rax
addq %rcx, %rax
addq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq (%rax), %rax
leaq -0x68(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x68(%rbp), %rax
jbe 0x37d97
movq -0x70(%rbp), %rcx
subq -0x68(%rbp), %rcx
movl $0x10000, %eax # imm = 0x10000
cmpq %rcx, %rax
jb 0x37d78
movq -0x70(%rbp), %rcx
subq -0x68(%rbp), %rcx
movl $0x8000, %eax # imm = 0x8000
cmpq %rcx, %rax
jae 0x37d97
movl $0x1000, %eax # imm = 0x1000
cmpq -0x68(%rbp), %rax
ja 0x37d97
movb $0x0, -0x59(%rbp)
movq -0x48(%rbp), %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x38(%rbp)
jmp 0x37daf
movb $0x1, -0x59(%rbp)
movq -0x48(%rbp), %rsi
xorl %edi, %edi
movl $0x10010, %edx # imm = 0x10010
callq 0xf2e30
movq %rax, -0x38(%rbp)
jmp 0x37db1
cmpq $0x0, -0x38(%rbp)
jne 0x37dc9
callq 0xf55f0
movl $0x80, (%rax)
movb $0x1, -0x9(%rbp)
jmp 0x37e33
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x18, %rsi
movq -0x30(%rbp), %rdx
callq 0x36b30
movl %eax, %eax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x37df4
movl $0x1, -0x3c(%rbp)
jmp 0x37e17
jmp 0x37df6
jmp 0x37df8
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x18, %rdx
movq -0x50(%rbp), %rcx
callq 0x37300
movsbl %al, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
movsbl -0x59(%rbp), %esi
callq 0x37c90
cmpl $0x0, -0x3c(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
movb %al, -0x79(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x37e53
movb -0x79(%rbp), %al
movq %rbp, %rsp
popq %rbp
retq
callq 0x2a260
nopl (%rax,%rax)
| _ma_update_blob_record:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
mov [rbp+var_30], rcx
mov [rbp+var_58], 5Ch ; '\'
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax+3A0h]
mov [rbp+var_78], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_30]
call _ma_calc_total_blob_length
mov rcx, rax
mov rax, [rbp+var_78]
add rax, rcx
add rax, [rbp+var_58]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov [rbp+var_68], rax
mov rax, [rbp+var_18]
mov rax, [rax+78h]
mov rax, [rax]
lea rcx, [rbp+var_68]
sub rax, rcx
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
cmp rax, [rbp+var_68]
jbe short loc_37D97
mov rcx, [rbp+var_70]
sub rcx, [rbp+var_68]
mov eax, offset stru_10000
cmp rax, rcx
jb short loc_37D78
mov rcx, [rbp+var_70]
sub rcx, [rbp+var_68]
mov eax, 8000h
cmp rax, rcx
jnb short loc_37D97
mov eax, 1000h
cmp rax, [rbp+var_68]
ja short loc_37D97
loc_37D78:
mov [rbp+var_59], 0
mov rcx, [rbp+var_48]
add rcx, 0Fh
and rcx, 0FFFFFFFFFFFFFFF0h
mov rax, rsp
sub rax, rcx
mov rsp, rax
mov [rbp+var_38], rax
jmp short loc_37DAF
loc_37D97:
mov [rbp+var_59], 1
mov rsi, [rbp+var_48]
xor edi, edi
mov edx, 10010h
call my_malloc
mov [rbp+var_38], rax
loc_37DAF:
jmp short $+2
loc_37DB1:
cmp [rbp+var_38], 0
jnz short loc_37DC9
call _my_thread_var
mov dword ptr [rax], 80h
mov [rbp+var_9], 1
jmp short loc_37E33
loc_37DC9:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_38]
add rsi, 18h
mov rdx, [rbp+var_30]
call _ma_rec_pack
mov eax, eax
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jnz short loc_37DF4
mov [rbp+var_3C], 1
jmp short loc_37E17
loc_37DF4:
jmp short $+2
loc_37DF6:
jmp short $+2
loc_37DF8:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
add rdx, 18h
mov rcx, [rbp+var_50]
call update_dynamic_record
movsx eax, al
mov [rbp+var_3C], eax
loc_37E17:
mov rdi, [rbp+var_38]
movsx esi, [rbp+var_59]
call stack_alloc_free
cmp [rbp+var_3C], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_9], al
loc_37E33:
mov al, [rbp+var_9]
mov [rbp+var_79], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_37E53
mov al, [rbp+var_79]
mov rsp, rbp
pop rbp
retn
loc_37E53:
call ___stack_chk_fail
| bool ma_update_blob_record(long long a1, long long a2, long long a3, _BYTE *a4, double a5)
{
unsigned int v5; // eax
long long v7; // [rsp+0h] [rbp-80h] BYREF
long long v8; // [rsp+8h] [rbp-78h]
unsigned long long v9; // [rsp+10h] [rbp-70h]
unsigned long long v10; // [rsp+18h] [rbp-68h] BYREF
char v11; // [rsp+27h] [rbp-59h]
long long v12; // [rsp+28h] [rbp-58h]
unsigned long long v13; // [rsp+30h] [rbp-50h]
unsigned long long v14; // [rsp+38h] [rbp-48h]
int updated; // [rsp+44h] [rbp-3Ch]
long long v16; // [rsp+48h] [rbp-38h]
_BYTE *v17; // [rsp+50h] [rbp-30h]
long long v18; // [rsp+58h] [rbp-28h]
long long v19; // [rsp+60h] [rbp-20h]
_DWORD *v20; // [rsp+68h] [rbp-18h]
unsigned long long v22; // [rsp+78h] [rbp-8h]
v22 = __readfsqword(0x28u);
v20 = (_DWORD *)a1;
v19 = a2;
v18 = a3;
v17 = a4;
v12 = 92LL;
v8 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
v14 = ma_calc_total_blob_length((_QWORD *)a1, (long long)a4, a3) + v8 + 92;
v10 = v14;
v9 = **(_QWORD **)(a1 + 120) - (_QWORD)&v10;
if ( v9 <= v14 || (unsigned long long)&stru_10000 >= v9 - v10 && (v9 - v10 <= 0x8000 || v10 < 0x1000) )
{
v11 = 1;
v16 = my_malloc(0LL, v14, 65552LL);
}
else
{
v11 = 0;
v16 = (long long)&v7 - ((v14 + 15) & 0xFFFFFFFFFFFFFFF0LL);
}
if ( v16 )
{
v5 = ma_rec_pack(v20, (_BYTE *)(v16 + 24), v17);
v13 = v5;
if ( v5 )
updated = update_dynamic_record((long long)v20, v19, v16 + 24, v13);
else
updated = 1;
stack_alloc_free(v16, v11, a5);
return updated != 0;
}
else
{
*(_DWORD *)my_thread_var() = 128;
return 1;
}
}
| _ma_update_blob_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RCX
MOV qword ptr [RBP + -0x58],0x5c
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3a0]
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00137bf0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,RCX
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX]
LEA RCX,[RBP + -0x68]
SUB RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x68]
JBE 0x00137d97
MOV RCX,qword ptr [RBP + -0x70]
SUB RCX,qword ptr [RBP + -0x68]
MOV EAX,0x10000
CMP RAX,RCX
JC 0x00137d78
MOV RCX,qword ptr [RBP + -0x70]
SUB RCX,qword ptr [RBP + -0x68]
MOV EAX,0x8000
CMP RAX,RCX
JNC 0x00137d97
MOV EAX,0x1000
CMP RAX,qword ptr [RBP + -0x68]
JA 0x00137d97
LAB_00137d78:
MOV byte ptr [RBP + -0x59],0x0
MOV RCX,qword ptr [RBP + -0x48]
ADD RCX,0xf
AND RCX,-0x10
MOV RAX,RSP
SUB RAX,RCX
MOV RSP,RAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00137daf
LAB_00137d97:
MOV byte ptr [RBP + -0x59],0x1
MOV RSI,qword ptr [RBP + -0x48]
XOR EDI,EDI
MOV EDX,0x10010
CALL 0x001f2e30
MOV qword ptr [RBP + -0x38],RAX
LAB_00137daf:
JMP 0x00137db1
LAB_00137db1:
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00137dc9
CALL 0x001f55f0
MOV dword ptr [RAX],0x80
MOV byte ptr [RBP + -0x9],0x1
JMP 0x00137e33
LAB_00137dc9:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x38]
ADD RSI,0x18
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00136b30
MOV EAX,EAX
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JNZ 0x00137df4
MOV dword ptr [RBP + -0x3c],0x1
JMP 0x00137e17
LAB_00137df4:
JMP 0x00137df6
LAB_00137df6:
JMP 0x00137df8
LAB_00137df8:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
ADD RDX,0x18
MOV RCX,qword ptr [RBP + -0x50]
CALL 0x00137300
MOVSX EAX,AL
MOV dword ptr [RBP + -0x3c],EAX
LAB_00137e17:
MOV RDI,qword ptr [RBP + -0x38]
MOVSX ESI,byte ptr [RBP + -0x59]
CALL 0x00137c90
CMP dword ptr [RBP + -0x3c],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x9],AL
LAB_00137e33:
MOV AL,byte ptr [RBP + -0x9]
MOV byte ptr [RBP + -0x79],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00137e53
MOV AL,byte ptr [RBP + -0x79]
MOV RSP,RBP
POP RBP
RET
LAB_00137e53:
CALL 0x0012a260
|
int8
_ma_update_blob_record(long *param_1,int8 param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
long *plVar2;
char cVar3;
uint uVar4;
long lVar5;
int4 *puVar6;
ulong uVar7;
int1 *puVar8;
int iVar9;
int1 *puVar10;
long in_FS_OFFSET;
int1 auStack_88 [7];
bool local_81;
long local_80;
ulong local_78;
ulong local_70;
char local_61;
long local_60;
ulong local_58;
ulong local_50;
int local_44;
int1 *local_40;
int8 local_38;
int8 local_30;
int8 local_28;
long *local_20;
bool local_11;
long local_10;
puVar8 = auStack_88;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = 0x5c;
local_80 = *(long *)(*param_1 + 0x3a0);
local_38 = param_4;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
lVar5 = _ma_calc_total_blob_length(param_1,param_4);
local_70 = local_80 + lVar5 + local_60;
local_78 = *(long *)local_20[0xf] - (long)&local_70;
local_50 = local_70;
if ((local_70 < local_78) &&
((0x10000 < local_78 - local_70 || ((0x8000 < local_78 - local_70 && (0xfff < local_70)))))) {
local_61 = '\0';
puVar8 = auStack_88 + -(local_70 + 0xf & 0xfffffffffffffff0);
local_40 = puVar8;
}
else {
local_61 = '\x01';
local_40 = (int1 *)my_malloc(0,local_70,0x10010);
}
plVar2 = local_20;
uVar1 = local_38;
if (local_40 == (int1 *)0x0) {
*(int8 *)(puVar8 + -8) = 0x137dbd;
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x80;
local_11 = true;
}
else {
puVar10 = local_40 + 0x18;
*(int8 *)(puVar8 + -8) = 0x137dde;
uVar4 = _ma_rec_pack(plVar2,puVar10,uVar1);
plVar2 = local_20;
uVar1 = local_28;
uVar7 = (ulong)uVar4;
local_58 = uVar7;
if (uVar7 == 0) {
local_44 = 1;
}
else {
puVar10 = local_40 + 0x18;
*(int8 *)(puVar8 + -8) = 0x137e11;
cVar3 = update_dynamic_record(plVar2,uVar1,puVar10,uVar7);
local_44 = (int)cVar3;
}
puVar10 = local_40;
iVar9 = (int)local_61;
*(int8 *)(puVar8 + -8) = 0x137e24;
stack_alloc_free(puVar10,iVar9);
local_11 = local_44 != 0;
}
local_81 = local_11;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_11);
}
/* WARNING: Subroutine does not return */
*(int8 *)(puVar8 + -8) = 0x137e58;
__stack_chk_fail();
}
| |
21,511 | js_find_loaded_module | bluesky950520[P]quickjs/quickjs.c | static JSModuleDef *js_find_loaded_module(JSContext *ctx, JSAtom name)
{
struct list_head *el;
JSModuleDef *m;
/* first look at the loaded modules */
list_for_each(el, &ctx->loaded_modules) {
m = list_entry(el, JSModuleDef, link);
if (m->module_name == name)
return m;
}
return NULL;
} | O2 | c | js_find_loaded_module:
leaq 0x1e0(%rdi), %rcx
addq $0x1e8, %rdi # imm = 0x1E8
xorl %eax, %eax
movq (%rdi), %rdi
cmpq %rcx, %rdi
je 0x39499
cmpl %esi, -0x4(%rdi)
je 0x39492
addq $0x8, %rdi
jmp 0x3947f
addq $-0x8, %rdi
movq %rdi, %rax
retq
| js_find_loaded_module:
lea rcx, [rdi+1E0h]
add rdi, 1E8h
xor eax, eax
loc_3947F:
mov rdi, [rdi]
cmp rdi, rcx
jz short locret_39499
cmp [rdi-4], esi
jz short loc_39492
add rdi, 8
jmp short loc_3947F
loc_39492:
add rdi, 0FFFFFFFFFFFFFFF8h
mov rax, rdi
locret_39499:
retn
| long long js_find_loaded_module(long long a1, int a2)
{
long long v2; // rcx
long long *v3; // rdi
long long result; // rax
long long v5; // rdi
v2 = a1 + 480;
v3 = (long long *)(a1 + 488);
result = 0LL;
while ( 1 )
{
v5 = *v3;
if ( v5 == v2 )
break;
if ( *(_DWORD *)(v5 - 4) == a2 )
return v5 - 8;
v3 = (long long *)(v5 + 8);
}
return result;
}
| js_find_loaded_module:
LEA RCX,[RDI + 0x1e0]
ADD RDI,0x1e8
XOR EAX,EAX
LAB_0013947f:
MOV RDI,qword ptr [RDI]
CMP RDI,RCX
JZ 0x00139499
CMP dword ptr [RDI + -0x4],ESI
JZ 0x00139492
ADD RDI,0x8
JMP 0x0013947f
LAB_00139492:
ADD RDI,-0x8
MOV RAX,RDI
LAB_00139499:
RET
|
long js_find_loaded_module(long param_1,int param_2)
{
long lVar1;
long *plVar2;
plVar2 = (long *)(param_1 + 0x1e8);
while( true ) {
lVar1 = *plVar2;
if (lVar1 == param_1 + 0x1e0) {
return 0;
}
if (*(int *)(lVar1 + -4) == param_2) break;
plVar2 = (long *)(lVar1 + 8);
}
return lVar1 + -8;
}
| |
21,512 | my_hash_sort_simple | eloqsql/strings/ctype-simple.c | void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
register const uchar *sort_order=cs->sort_order;
const uchar *end;
uint16 space_weight= sort_order[' '];
/*
Remove all trailing characters that are equal to space.
We have to do this to be able to compare 'A ' and 'A' as identical.
If the key is long enough, cut the trailing spaces (0x20) using an
optimized function implemented in skip_trailing_spaces().
"len > 16" is just some heuristic here.
Calling skip_triling_space() for short values is not desirable,
because its initialization block may be more expensive than the
performance gained.
*/
end= len > 16 ? skip_trailing_space(key, len) : key + len;
/*
We removed all trailing characters that are binary equal to space 0x20.
Now remove all trailing characters that have weights equal to space.
Some 8bit simple collations may have such characters:
- cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE
- cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE
- koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE
*/
for ( ; key < end ; )
{
if (sort_order[*--end] != space_weight)
{
end++;
break;
}
}
my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2);
} | O0 | c | my_hash_sort_simple:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movzbl 0x20(%rax), %eax
movw %ax, -0x3a(%rbp)
cmpq $0x10, -0x18(%rbp)
jbe 0x7a4ae
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7a530
movq %rax, -0x48(%rbp)
jmp 0x7a4ba
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x7a4ff
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $-0x1, %rdx
movq %rdx, -0x38(%rbp)
movzbl -0x1(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movzwl -0x3a(%rbp), %ecx
cmpl %ecx, %eax
je 0x7a4fd
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x7a4ff
jmp 0x7a4c2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x7a3a0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_sort_simple:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax+20h]
mov [rbp+var_3A], ax
cmp [rbp+var_18], 10h
jbe short loc_7A4AE
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call skip_trailing_space_2
mov [rbp+var_48], rax
jmp short loc_7A4BA
loc_7A4AE:
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_48], rax
loc_7A4BA:
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
loc_7A4C2:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_7A4FF
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
mov rdx, rcx
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rdx
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx]
movzx ecx, [rbp+var_3A]
cmp eax, ecx
jz short loc_7A4FD
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp short loc_7A4FF
loc_7A4FD:
jmp short loc_7A4C2
loc_7A4FF:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_10]
sub rdx, rax
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
call my_hash_sort_simple_nopad
add rsp, 50h
pop rbp
retn
| _QWORD * my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, _QWORD *a5)
{
unsigned long long v5; // rcx
long long v7; // [rsp+8h] [rbp-48h]
__int16 v8; // [rsp+16h] [rbp-3Ah]
unsigned long long v9; // [rsp+18h] [rbp-38h]
long long v10; // [rsp+20h] [rbp-30h]
v10 = *(_QWORD *)(a1 + 88);
v8 = *(unsigned __int8 *)(v10 + 32);
if ( a3 <= 0x10 )
v7 = (long long)&a2[a3];
else
v7 = skip_trailing_space_2(a2, a3);
v9 = v7;
while ( (unsigned long long)a2 < v9 )
{
v5 = v9--;
if ( *(unsigned __int8 *)(v10 + *(unsigned __int8 *)(v5 - 1)) != v8 )
return my_hash_sort_simple_nopad(a1, a2, ++v9 - (_QWORD)a2, a4, a5);
}
return my_hash_sort_simple_nopad(a1, a2, v9 - (_QWORD)a2, a4, a5);
}
| my_hash_sort_simple:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX + 0x20]
MOV word ptr [RBP + -0x3a],AX
CMP qword ptr [RBP + -0x18],0x10
JBE 0x0017a4ae
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0017a530
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0017a4ba
LAB_0017a4ae:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
LAB_0017a4ba:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
LAB_0017a4c2:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0017a4ff
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,RCX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x38],RDX
MOVZX ECX,byte ptr [RCX + -0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVZX ECX,word ptr [RBP + -0x3a]
CMP EAX,ECX
JZ 0x0017a4fd
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0017a4ff
LAB_0017a4fd:
JMP 0x0017a4c2
LAB_0017a4ff:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
SUB RDX,RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x0017a3a0
ADD RSP,0x50
POP RBP
RET
|
void my_hash_sort_simple(long param_1,ulong param_2,ulong param_3,int8 param_4,
int8 param_5)
{
char cVar1;
long lVar2;
ulong uVar3;
ulong local_50;
ulong local_40;
lVar2 = *(long *)(param_1 + 0x58);
cVar1 = *(char *)(lVar2 + 0x20);
if (param_3 < 0x11) {
local_50 = param_2 + param_3;
}
else {
local_50 = skip_trailing_space(param_2,param_3);
}
local_40 = local_50;
uVar3 = local_40;
do {
local_40 = uVar3;
if (local_40 <= param_2) break;
uVar3 = local_40 - 1;
} while (*(char *)(lVar2 + (ulong)*(byte *)(local_40 - 1)) == cVar1);
my_hash_sort_simple_nopad(param_1,param_2,local_40 - param_2,param_4,param_5);
return;
}
| |
21,513 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O1 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xb2692
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xb2692
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e434
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x428fe(%rip), %rsi # 0xf4fb4
leaq 0x10(%rsp), %rdi
callq 0xb272b
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x86912
xorl %ebp, %ebp
leaq 0x7b817(%rip), %rsi # 0x12def8
leaq -0x58172(%rip), %rdx # 0x5a576
movq %rbx, %rdi
callq 0x1bef0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb2716
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0xb2716
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xb2723
movq %rbx, %rdi
callq 0x1b650
movq %r14, %rdi
callq 0x1bf70
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRKS9_KSD_EET_RT0_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_B2692
mov rax, [r14+8]
test rax, rax
jz short loc_B2692
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_B2692:
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, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; 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_B2716
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B2716
mov r14, rax
mov bpl, 1
loc_B2716:
test bpl, bpl
jz short loc_B2723
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B2723:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>(
long long a1)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v3[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
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(&)[56],char const*>(
v3,
"incompatible ReferenceType for get_ref, actual type is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
303,
v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return result;
}
| get_ref_impl<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001b2692
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x001b2692
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001b2692:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e434
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001b26af:
LEA RSI,[0x1f4fb4]
LEA RDI,[RSP + 0x10]
CALL 0x001b272b
MOV BPL,0x1
LAB_001b26c3:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x00186912
XOR EBP,EBP
LEA RSI,[0x22def8]
LEA RDX,[0x15a576]
MOV RDI,RBX
CALL 0x0011bef0
|
/* std::__cxx11::string const&
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::get_ref_impl<std::__cxx11::string const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
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>
::
get_ref_impl<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
(basic_json *param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 001b26af to 001b26bf has its CatchHandler @ 001b2710 */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 001b26c3 to 001b26ef has its CatchHandler @ 001b26f0 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
21,514 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O2 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0x8908e
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x8908e
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x24460
movq %rax, %rbx
movq %r14, %rdi
callq 0x434f0
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x2dee4(%rip), %rsi # 0xb6f94
leaq 0x10(%rsp), %rdi
callq 0x832b3
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x433a4
xorl %ebp, %ebp
leaq 0x74e5d(%rip), %rsi # 0xfdf38
leaq -0x49062(%rip), %rdx # 0x40080
movq %rbx, %rdi
callq 0x24ee0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x251b8
testb %bpl, %bpl
jne 0x89101
jmp 0x89109
movq %rax, %r14
movq %rbx, %rdi
callq 0x24670
movq %r14, %rdi
callq 0x24f60
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_8908E
mov rax, [r14+8]
test rax, rax
jz short loc_8908E
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_8908E:
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+48h+var_40]
mov [rdx], rax
lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_89101
jmp short loc_89109
mov r14, rax
loc_89101:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_89109:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
(long long)v4,
(long long)"incompatible ReferenceType for get_ref, actual type is ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
303,
(long long)v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return result;
}
| get_ref_impl<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>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x0018908e
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x0018908e
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0018908e:
PUSH 0x20
POP RDI
CALL 0x00124460
MOV RBX,RAX
MOV RDI,R14
CALL 0x001434f0
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001890a9:
LEA RSI,[0x1b6f94]
LEA RDI,[RSP + 0x10]
CALL 0x001832b3
MOV BPL,0x1
LAB_001890bd:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x001433a4
XOR EBP,EBP
LEA RSI,[0x1fdf38]
LEA RDX,[0x140080]
MOV RDI,RBX
CALL 0x00124ee0
|
/* 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>::get_ref_impl<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> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&) */
string * 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>
::
get_ref_impl<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>>
(basic_json *param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == '\x03') && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 001890a9 to 001890b9 has its CatchHandler @ 001890fe */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 001890bd to 001890e9 has its CatchHandler @ 001890ea */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
21,515 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xb89ae
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xb89ae
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5eb8c
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3a5d2(%rip), %rsi # 0xf2fa4
leaq 0x10(%rsp), %rdi
callq 0xb1e20
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x5e934
xorl %ebp, %ebp
leaq 0x7353b(%rip), %rsi # 0x12bf38
leaq -0x5dc42(%rip), %rdx # 0x5adc2
movq %rbx, %rdi
callq 0x1bef0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb8a2a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8b0
testb %bpl, %bpl
jne 0xb8a34
jmp 0xb8a3c
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b650
movq %r14, %rdi
callq 0x1bf70
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_B89AE
mov rax, [r14+8]
test rax, rax
jz short loc_B89AE
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_B89AE:
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, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B8A2A
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B8A2A:
test bpl, bpl
jnz short loc_B8A34
jmp short loc_B8A3C
mov r14, rax
loc_B8A34:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B8A3C:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
(long long)v4,
(long long)"incompatible ReferenceType for get_ref, actual type is ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
303,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return result;
}
| get_ref_impl<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>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001b89ae
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x001b89ae
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001b89ae:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015eb8c
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001b89cb:
LEA RSI,[0x1f2fa4]
LEA RDI,[RSP + 0x10]
CALL 0x001b1e20
MOV BPL,0x1
LAB_001b89df:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x0015e934
XOR EBP,EBP
LEA RSI,[0x22bf38]
LEA RDX,[0x15adc2]
MOV RDI,RBX
CALL 0x0011bef0
|
/* 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>::get_ref_impl<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> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&) */
string * 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>
::
get_ref_impl<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>>
(basic_json *param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 001b89cb to 001b89db has its CatchHandler @ 001b8a31 */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 001b89df to 001b8a0b has its CatchHandler @ 001b8a0c */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
21,516 | JS_ThrowInternalError | bluesky950520[P]quickjs/quickjs.c | JSValue __attribute__((format(printf, 2, 3))) JS_ThrowInternalError(JSContext *ctx, const char *fmt, ...)
{
JSValue val;
va_list ap;
va_start(ap, fmt);
val = JS_ThrowError(ctx, JS_INTERNAL_ERROR, fmt, ap);
va_end(ap);
return val;
} | O0 | c | JS_ThrowInternalError:
subq $0x108, %rsp # imm = 0x108
testb %al, %al
je 0x2d51c
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm2, 0x50(%rsp)
movaps %xmm3, 0x60(%rsp)
movaps %xmm4, 0x70(%rsp)
movaps %xmm5, 0x80(%rsp)
movaps %xmm6, 0x90(%rsp)
movaps %xmm7, 0xa0(%rsp)
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, 0xe8(%rsp)
movq %rsi, 0xe0(%rsp)
movq %rsp, %rax
movq %rax, 0xd0(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0xc8(%rsp)
movl $0x30, 0xc4(%rsp)
movl $0x10, 0xc0(%rsp)
movq 0xe8(%rsp), %rdi
movq 0xe0(%rsp), %rdx
movl $0x6, %esi
leaq 0xc0(%rsp), %rcx
callq 0x2d140
movq %rax, 0xb0(%rsp)
movq %rdx, 0xb8(%rsp)
movups 0xb0(%rsp), %xmm0
movaps %xmm0, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
movq 0xf8(%rsp), %rdx
addq $0x108, %rsp # imm = 0x108
retq
nopl (%rax,%rax)
| JS_ThrowInternalError:
sub rsp, 108h
test al, al
jz short loc_2D51C
movaps [rsp+108h+var_D8], xmm0
movaps [rsp+108h+var_C8], xmm1
movaps [rsp+108h+var_B8], xmm2
movaps [rsp+108h+var_A8], xmm3
movaps [rsp+108h+var_98], xmm4
movaps [rsp+108h+var_88], xmm5
movaps [rsp+108h+var_78], xmm6
movaps [rsp+108h+var_68], xmm7
loc_2D51C:
mov [rsp+108h+var_E0], r9
mov [rsp+108h+var_E8], r8
mov [rsp+108h+var_F0], rcx
mov [rsp+108h+var_F8], rdx
mov [rsp+108h+var_20], rdi
mov [rsp+108h+var_28], rsi
mov rax, rsp
mov [rsp+108h+var_38], rax
lea rax, [rsp+108h+arg_0]
mov [rsp+108h+var_40], rax
mov [rsp+108h+var_44], 30h ; '0'
mov [rsp+108h+var_48], 10h
mov rdi, [rsp+108h+var_20]
mov rdx, [rsp+108h+var_28]
mov esi, 6
lea rcx, [rsp+108h+var_48]
call JS_ThrowError
mov qword ptr [rsp+108h+var_58], rax
mov qword ptr [rsp+108h+var_58+8], rdx
movups xmm0, [rsp+108h+var_58]
movaps [rsp+108h+var_18], xmm0
mov rax, qword ptr [rsp+108h+var_18]
mov rdx, qword ptr [rsp+108h+var_18+8]
add rsp, 108h
retn
| long long JS_ThrowInternalError(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_QWORD v16[6]; // [rsp+0h] [rbp-108h] BYREF
__m128 v17; // [rsp+30h] [rbp-D8h]
__m128 v18; // [rsp+40h] [rbp-C8h]
__m128 v19; // [rsp+50h] [rbp-B8h]
__m128 v20; // [rsp+60h] [rbp-A8h]
__m128 v21; // [rsp+70h] [rbp-98h]
__m128 v22; // [rsp+80h] [rbp-88h]
__m128 v23; // [rsp+90h] [rbp-78h]
__m128 v24; // [rsp+A0h] [rbp-68h]
_DWORD v25[2]; // [rsp+C0h] [rbp-48h] BYREF
char *v26; // [rsp+C8h] [rbp-40h]
_QWORD *v27; // [rsp+D0h] [rbp-38h]
long long v28; // [rsp+E0h] [rbp-28h]
long long v29; // [rsp+E8h] [rbp-20h]
v17 = a7;
v18 = a8;
v19 = a9;
v20 = a10;
v21 = a11;
v22 = a12;
v23 = a13;
v24 = a14;
v16[5] = a6;
v16[4] = a5;
v16[3] = a4;
v16[2] = a3;
v29 = a1;
v28 = a2;
v27 = v16;
v26 = &a15;
v25[1] = 48;
v25[0] = 16;
return JS_ThrowError(a1, 6u, a2, (long long)v25);
}
| JS_ThrowInternalError:
SUB RSP,0x108
TEST AL,AL
JZ 0x0012d51c
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM1
MOVAPS xmmword ptr [RSP + 0x50],XMM2
MOVAPS xmmword ptr [RSP + 0x60],XMM3
MOVAPS xmmword ptr [RSP + 0x70],XMM4
MOVAPS xmmword ptr [RSP + 0x80],XMM5
MOVAPS xmmword ptr [RSP + 0x90],XMM6
MOVAPS xmmword ptr [RSP + 0xa0],XMM7
LAB_0012d51c:
MOV qword ptr [RSP + 0x28],R9
MOV qword ptr [RSP + 0x20],R8
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0xe8],RDI
MOV qword ptr [RSP + 0xe0],RSI
MOV RAX,RSP
MOV qword ptr [RSP + 0xd0],RAX
LEA RAX,[RSP + 0x110]
MOV qword ptr [RSP + 0xc8],RAX
MOV dword ptr [RSP + 0xc4],0x30
MOV dword ptr [RSP + 0xc0],0x10
MOV RDI,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xe0]
MOV ESI,0x6
LEA RCX,[RSP + 0xc0]
CALL 0x0012d140
MOV qword ptr [RSP + 0xb0],RAX
MOV qword ptr [RSP + 0xb8],RDX
MOVUPS XMM0,xmmword ptr [RSP + 0xb0]
MOVAPS xmmword ptr [RSP + 0xf0],XMM0
MOV RAX,qword ptr [RSP + 0xf0]
MOV RDX,qword ptr [RSP + 0xf8]
ADD RSP,0x108
RET
|
int1 [16]
JS_ThrowInternalError
(int4 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
int1 auVar1 [16];
char in_AL;
int1 auStack_108 [16];
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_e0;
int4 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_28;
int8 local_20;
local_38 = auStack_108;
if (in_AL != '\0') {
local_d8 = param_1;
local_c8 = param_2;
local_b8 = param_3;
local_a8 = param_4;
local_98 = param_5;
local_88 = param_6;
local_78 = param_7;
local_68 = param_8;
}
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x10;
local_f8 = param_11;
local_f0 = param_12;
local_e8 = param_13;
local_e0 = param_14;
local_28 = param_10;
local_20 = param_9;
auVar1 = JS_ThrowError(param_9,6,param_10,&local_48);
return auVar1;
}
| |
21,517 | JS_ThrowInternalError | bluesky950520[P]quickjs/quickjs.c | JSValue __attribute__((format(printf, 2, 3))) JS_ThrowInternalError(JSContext *ctx, const char *fmt, ...)
{
JSValue val;
va_list ap;
va_start(ap, fmt);
val = JS_ThrowError(ctx, JS_INTERNAL_ERROR, fmt, ap);
va_end(ap);
return val;
} | O2 | c | JS_ThrowInternalError:
subq $0xd8, %rsp
movq %rsi, %r10
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x1c7cb
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rcx)
pushq $0x6
popq %rsi
movq %r10, %rdx
callq 0x1c551
pushq $0x6
popq %rdx
xorl %eax, %eax
addq $0xd8, %rsp
retq
| JS_ThrowInternalError:
sub rsp, 0D8h
mov r10, rsi
lea rsi, [rsp+0D8h+var_B8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_1C7CB
movaps [rsp+0D8h+var_88], xmm0
movaps [rsp+0D8h+var_78], xmm1
movaps [rsp+0D8h+var_68], xmm2
movaps [rsp+0D8h+var_58], xmm3
movaps [rsp+0D8h+var_48], xmm4
movaps [rsp+0D8h+var_38], xmm5
movaps [rsp+0D8h+var_28], xmm6
movaps [rsp+0D8h+var_18], xmm7
loc_1C7CB:
mov rcx, rsp
mov [rcx+10h], rsi
lea rax, [rsp+0D8h+arg_0]
mov [rcx+8], rax
mov rax, 3000000010h
mov [rcx], rax
push 6
pop rsi
mov rdx, r10
call JS_ThrowError
push 6
pop rdx
xor eax, eax
add rsp, 0D8h
retn
| long long JS_ThrowInternalError(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_QWORD v16[4]; // [rsp+0h] [rbp-D8h] BYREF
char v17; // [rsp+20h] [rbp-B8h] BYREF
long long v18; // [rsp+30h] [rbp-A8h]
long long v19; // [rsp+38h] [rbp-A0h]
long long v20; // [rsp+40h] [rbp-98h]
long long v21; // [rsp+48h] [rbp-90h]
__m128 v22; // [rsp+50h] [rbp-88h]
__m128 v23; // [rsp+60h] [rbp-78h]
__m128 v24; // [rsp+70h] [rbp-68h]
__m128 v25; // [rsp+80h] [rbp-58h]
__m128 v26; // [rsp+90h] [rbp-48h]
__m128 v27; // [rsp+A0h] [rbp-38h]
__m128 v28; // [rsp+B0h] [rbp-28h]
__m128 v29; // [rsp+C0h] [rbp-18h]
v22 = a7;
v23 = a8;
v24 = a9;
v25 = a10;
v26 = a11;
v27 = a12;
v28 = a13;
v29 = a14;
v18 = a3;
v19 = a4;
v20 = a5;
v21 = a6;
v16[2] = &v17;
v16[1] = &a15;
v16[0] = 0x3000000010LL;
JS_ThrowError(a1, 6LL, a2, (long long)v16);
return 0LL;
}
| JS_ThrowInternalError:
SUB RSP,0xd8
MOV R10,RSI
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x0011c7cb
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_0011c7cb:
MOV RCX,RSP
MOV qword ptr [RCX + 0x10],RSI
LEA RAX,[RSP + 0xe0]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RCX],RAX
PUSH 0x6
POP RSI
MOV RDX,R10
CALL 0x0011c551
PUSH 0x6
POP RDX
XOR EAX,EAX
ADD RSP,0xd8
RET
|
int1 [16] JS_ThrowInternalError(int8 param_1,int8 param_2)
{
JS_ThrowError(param_1,6,param_2);
return ZEXT816(6) << 0x40;
}
| |
21,518 | JS_ThrowInternalError | bluesky950520[P]quickjs/quickjs.c | JSValue __attribute__((format(printf, 2, 3))) JS_ThrowInternalError(JSContext *ctx, const char *fmt, ...)
{
JSValue val;
va_list ap;
va_start(ap, fmt);
val = JS_ThrowError(ctx, JS_INTERNAL_ERROR, fmt, ap);
va_end(ap);
return val;
} | O3 | c | JS_ThrowInternalError:
subq $0xd8, %rsp
movq %rsi, %r10
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x22f11
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rcx)
movl $0x6, %esi
movq %r10, %rdx
callq 0x22c89
movl $0x6, %edx
xorl %eax, %eax
addq $0xd8, %rsp
retq
| JS_ThrowInternalError:
sub rsp, 0D8h
mov r10, rsi
lea rsi, [rsp+0D8h+var_B8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_22F11
movaps [rsp+0D8h+var_88], xmm0
movaps [rsp+0D8h+var_78], xmm1
movaps [rsp+0D8h+var_68], xmm2
movaps [rsp+0D8h+var_58], xmm3
movaps [rsp+0D8h+var_48], xmm4
movaps [rsp+0D8h+var_38], xmm5
movaps [rsp+0D8h+var_28], xmm6
movaps [rsp+0D8h+var_18], xmm7
loc_22F11:
mov rcx, rsp
mov [rcx+10h], rsi
lea rax, [rsp+0D8h+arg_0]
mov [rcx+8], rax
mov rax, 3000000010h
mov [rcx], rax
mov esi, 6
mov rdx, r10
call JS_ThrowError
mov edx, 6
xor eax, eax
add rsp, 0D8h
retn
| long long JS_ThrowInternalError(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_QWORD v16[4]; // [rsp+0h] [rbp-D8h] BYREF
char v17; // [rsp+20h] [rbp-B8h] BYREF
long long v18; // [rsp+30h] [rbp-A8h]
long long v19; // [rsp+38h] [rbp-A0h]
long long v20; // [rsp+40h] [rbp-98h]
long long v21; // [rsp+48h] [rbp-90h]
__m128 v22; // [rsp+50h] [rbp-88h]
__m128 v23; // [rsp+60h] [rbp-78h]
__m128 v24; // [rsp+70h] [rbp-68h]
__m128 v25; // [rsp+80h] [rbp-58h]
__m128 v26; // [rsp+90h] [rbp-48h]
__m128 v27; // [rsp+A0h] [rbp-38h]
__m128 v28; // [rsp+B0h] [rbp-28h]
__m128 v29; // [rsp+C0h] [rbp-18h]
v22 = a7;
v23 = a8;
v24 = a9;
v25 = a10;
v26 = a11;
v27 = a12;
v28 = a13;
v29 = a14;
v18 = a3;
v19 = a4;
v20 = a5;
v21 = a6;
v16[2] = &v17;
v16[1] = &a15;
v16[0] = 0x3000000010LL;
JS_ThrowError(a1, 6LL, a2, (long long)v16);
return 0LL;
}
| JS_ThrowInternalError:
SUB RSP,0xd8
MOV R10,RSI
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x00122f11
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_00122f11:
MOV RCX,RSP
MOV qword ptr [RCX + 0x10],RSI
LEA RAX,[RSP + 0xe0]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RCX],RAX
MOV ESI,0x6
MOV RDX,R10
CALL 0x00122c89
MOV EDX,0x6
XOR EAX,EAX
ADD RSP,0xd8
RET
|
int1 [16] JS_ThrowInternalError(int8 param_1,int8 param_2)
{
JS_ThrowError(param_1,6,param_2);
return ZEXT816(6) << 0x40;
}
| |
21,519 | nibble_cmp | corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c | static int nibble_cmp(nibbles_t nibbles, bytes_t path, int* path_n_len) {
int odd = (path.data[0] & 0x10) >> 4;
int nibbles_len = path.len * 2 - (odd ? 1 : 2);
*path_n_len = nibbles_len;
for (int i = 0; i < nibbles_len; i++) {
uint8_t pn = path.data[(i + 2 - odd) >> 1] >> ((i + odd) % 2 ? 0 : 4) & 0xf;
if (nibbles.len == i || nibbles.data[i] != pn)
return i;
}
return nibbles_len;
} | O0 | c | nibble_cmp:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x28(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
andl $0x10, %eax
sarl $0x4, %eax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %eax
shll %eax
movl -0x34(%rbp), %esi
movl $0x2, %ecx
movl $0x1, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
subl %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x3530d
movq -0x20(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl $0x2, %ecx
subl -0x34(%rbp), %ecx
sarl %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
movl -0x3c(%rbp), %eax
addl -0x34(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x44(%rbp), %eax
movl %edx, %esi
movl $0x4, %ecx
xorl %edx, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
sarl %cl, %eax
andl $0xf, %eax
movb %al, -0x3d(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x3c(%rbp), %eax
je 0x352f8
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movzbl -0x3d(%rbp), %ecx
cmpl %ecx, %eax
je 0x35300
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x35313
jmp 0x35302
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x35293
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| nibble_cmp:
push rbp
mov rbp, rsp
mov [rbp+var_18], edi
mov [rbp+var_10], rsi
mov [rbp+var_28], edx
mov [rbp+var_20], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
and eax, 10h
sar eax, 4
mov [rbp+var_34], eax
mov eax, [rbp+var_28]
shl eax, 1
mov esi, [rbp+var_34]
mov ecx, 2
mov edx, 1
cmp esi, 0
cmovnz ecx, edx
sub eax, ecx
mov [rbp+var_38], eax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_30]
mov [rax], ecx
mov [rbp+var_3C], 0
loc_35293:
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_38]
jge short loc_3530D
mov rax, [rbp+var_20]
mov ecx, [rbp+var_3C]
add ecx, 2
sub ecx, [rbp+var_34]
sar ecx, 1
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
mov eax, [rbp+var_3C]
add eax, [rbp+var_34]
mov ecx, 2
cdq
idiv ecx
mov eax, [rbp+var_44]
mov esi, edx
mov ecx, 4
xor edx, edx
cmp esi, 0
cmovnz ecx, edx
sar eax, cl
and eax, 0Fh
mov [rbp+var_3D], al
mov eax, [rbp+var_18]
cmp eax, [rbp+var_3C]
jz short loc_352F8
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_3C]
movzx eax, byte ptr [rax+rcx]
movzx ecx, [rbp+var_3D]
cmp eax, ecx
jz short loc_35300
loc_352F8:
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
jmp short loc_35313
loc_35300:
jmp short $+2
loc_35302:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp short loc_35293
loc_3530D:
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
loc_35313:
mov eax, [rbp+var_4]
pop rbp
retn
| long long nibble_cmp(int a1, long long a2, int a3, _BYTE *a4, _DWORD *a5)
{
int v5; // eax
int v6; // ecx
char v7; // cl
int i; // [rsp+8h] [rbp-3Ch]
int v10; // [rsp+Ch] [rbp-38h]
int v11; // [rsp+10h] [rbp-34h]
v11 = (*a4 & 0x10) >> 4;
v5 = 2 * a3;
v6 = 2;
if ( v11 )
v6 = 1;
v10 = v5 - v6;
*a5 = v5 - v6;
for ( i = 0; i < v10; ++i )
{
v7 = 4;
if ( (v11 + i) % 2 )
v7 = 0;
if ( a1 == i || *(_BYTE *)(a2 + i) != (((int)(unsigned __int8)a4[(i + 2 - v11) >> 1] >> v7) & 0xF) )
return (unsigned int)i;
}
return (unsigned int)v10;
}
| nibble_cmp:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x18],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x28],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x10
SAR EAX,0x4
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x28]
SHL EAX,0x1
MOV ESI,dword ptr [RBP + -0x34]
MOV ECX,0x2
MOV EDX,0x1
CMP ESI,0x0
CMOVNZ ECX,EDX
SUB EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x3c],0x0
LAB_00135293:
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x38]
JGE 0x0013530d
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,0x2
SUB ECX,dword ptr [RBP + -0x34]
SAR ECX,0x1
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,dword ptr [RBP + -0x34]
MOV ECX,0x2
CDQ
IDIV ECX
MOV EAX,dword ptr [RBP + -0x44]
MOV ESI,EDX
MOV ECX,0x4
XOR EDX,EDX
CMP ESI,0x0
CMOVNZ ECX,EDX
SAR EAX,CL
AND EAX,0xf
MOV byte ptr [RBP + -0x3d],AL
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x3c]
JZ 0x001352f8
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x3c]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVZX ECX,byte ptr [RBP + -0x3d]
CMP EAX,ECX
JZ 0x00135300
LAB_001352f8:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00135313
LAB_00135300:
JMP 0x00135302
LAB_00135302:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00135293
LAB_0013530d:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
LAB_00135313:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int nibble_cmp(int param_1,long param_2,int param_3,byte *param_4,int *param_5)
{
int iVar1;
int iVar2;
sbyte sVar3;
int local_44;
iVar1 = (int)(*param_4 & 0x10) >> 4;
iVar2 = 2;
if (iVar1 != 0) {
iVar2 = 1;
}
iVar2 = param_3 * 2 - iVar2;
*param_5 = iVar2;
local_44 = 0;
while( true ) {
if (iVar2 <= local_44) {
return iVar2;
}
sVar3 = 4;
if ((local_44 + iVar1) % 2 != 0) {
sVar3 = 0;
}
if ((param_1 == local_44) ||
(*(byte *)(param_2 + local_44) !=
((byte)((int)(uint)param_4[(local_44 + 2) - iVar1 >> 1] >> sVar3) & 0xf))) break;
local_44 = local_44 + 1;
}
return local_44;
}
| |
21,520 | nibble_cmp | corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c | static int nibble_cmp(nibbles_t nibbles, bytes_t path, int* path_n_len) {
int odd = (path.data[0] & 0x10) >> 4;
int nibbles_len = path.len * 2 - (odd ? 1 : 2);
*path_n_len = nibbles_len;
for (int i = 0; i < nibbles_len; i++) {
uint8_t pn = path.data[(i + 2 - odd) >> 1] >> ((i + odd) % 2 ? 0 : 4) & 0xf;
if (nibbles.len == i || nibbles.data[i] != pn)
return i;
}
return nibbles_len;
} | O2 | c | nibble_cmp:
pushq %rbx
movq %rcx, %r9
movzbl (%rcx), %r10d
movl %r10d, %ecx
shrl $0x4, %ecx
andl $0x1, %ecx
cmpl $0x1, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
sbbl $0x0, %eax
leal (%rax,%rdx,2), %eax
movl %eax, (%r8)
movslq %eax, %rdx
movl %edi, %edi
movabsq $0x2, %r8
subq %rcx, %r8
shrl $0x2, %r10d
andl $0x4, %r10d
xorl %r11d, %r11d
cmpq %rdx, %r11
jge 0x2d7ad
cmpq %r11, %rdi
je 0x2d7ad
leal (%r8,%r11), %ecx
shrl %ecx
movzbl (%r9,%rcx), %ebx
movl %r10d, %ecx
notb %cl
andb $0x4, %cl
shrl %cl, %ebx
andl $0xf, %ebx
movzbl (%rsi,%r11), %ecx
cmpl %ecx, %ebx
jne 0x2d7ad
incq %r11
addl $0x4, %r10d
jmp 0x2d779
cmpl %eax, %r11d
cmovll %r11d, %eax
popq %rbx
retq
| nibble_cmp:
push rbx
mov r9, rcx
movzx r10d, byte ptr [rcx]
mov ecx, r10d
shr ecx, 4
and ecx, 1
cmp ecx, 1
mov eax, 0FFFFFFFFh
sbb eax, 0
lea eax, [rax+rdx*2]
mov [r8], eax
movsxd rdx, eax
mov edi, edi
mov r8, 2
sub r8, rcx
shr r10d, 2
and r10d, 4
xor r11d, r11d
loc_2D779:
cmp r11, rdx
jge short loc_2D7AD
cmp rdi, r11
jz short loc_2D7AD
lea ecx, [r8+r11]
shr ecx, 1
movzx ebx, byte ptr [r9+rcx]
mov ecx, r10d
not cl
and cl, 4
shr ebx, cl
and ebx, 0Fh
movzx ecx, byte ptr [rsi+r11]
cmp ebx, ecx
jnz short loc_2D7AD
inc r11
add r10d, 4
jmp short loc_2D779
loc_2D7AD:
cmp r11d, eax
cmovl eax, r11d
pop rbx
retn
| long long nibble_cmp(int a1, long long a2, int a3, unsigned __int8 *a4, _DWORD *a5)
{
unsigned int v6; // r10d
unsigned int v7; // ecx
long long result; // rax
int v9; // r10d
long long i; // r11
v6 = *a4;
v7 = (v6 >> 4) & 1;
result = (unsigned int)((((v7 | 0xFFFFFFFF00000000LL) - 1) >> 32) + 2 * a3);
*a5 = result;
v9 = (v6 >> 2) & 4;
for ( i = 0LL;
i < (int)result
&& a1 != i
&& ((a4[(2 - v7 + (unsigned int)i) >> 1] >> (~(_BYTE)v9 & 4)) & 0xF) == *(_BYTE *)(a2 + i);
++i )
{
LOBYTE(v9) = v9 + 4;
}
if ( (int)i < (int)result )
return (unsigned int)i;
return result;
}
| nibble_cmp:
PUSH RBX
MOV R9,RCX
MOVZX R10D,byte ptr [RCX]
MOV ECX,R10D
SHR ECX,0x4
AND ECX,0x1
CMP ECX,0x1
MOV EAX,0xffffffff
SBB EAX,0x0
LEA EAX,[RAX + RDX*0x2]
MOV dword ptr [R8],EAX
MOVSXD RDX,EAX
MOV EDI,EDI
MOV R8,0x2
SUB R8,RCX
SHR R10D,0x2
AND R10D,0x4
XOR R11D,R11D
LAB_0012d779:
CMP R11,RDX
JGE 0x0012d7ad
CMP RDI,R11
JZ 0x0012d7ad
LEA ECX,[R8 + R11*0x1]
SHR ECX,0x1
MOVZX EBX,byte ptr [R9 + RCX*0x1]
MOV ECX,R10D
NOT CL
AND CL,0x4
SHR EBX,CL
AND EBX,0xf
MOVZX ECX,byte ptr [RSI + R11*0x1]
CMP EBX,ECX
JNZ 0x0012d7ad
INC R11
ADD R10D,0x4
JMP 0x0012d779
LAB_0012d7ad:
CMP R11D,EAX
CMOVL EAX,R11D
POP RBX
RET
|
ulong nibble_cmp(uint param_1,long param_2,int param_3,byte *param_4,uint *param_5)
{
uint uVar1;
byte bVar2;
ulong uVar3;
byte bVar4;
ulong uVar5;
bVar4 = *param_4;
bVar2 = bVar4 >> 4;
uVar1 = (-1 - (uint)((bVar2 & 1) == 0)) + param_3 * 2;
*param_5 = uVar1;
bVar4 = bVar4 >> 2 & 4;
for (uVar5 = 0;
(((long)uVar5 < (long)(int)uVar1 && (param_1 != uVar5)) &&
((param_4[(2 - (bVar2 & 1)) + (int)uVar5 >> 1] >> (~bVar4 & 4) & 0xf) ==
*(byte *)(param_2 + uVar5))); uVar5 = uVar5 + 1) {
bVar4 = bVar4 + 4;
}
uVar3 = (ulong)uVar1;
if ((int)uVar5 < (int)uVar1) {
uVar3 = uVar5 & 0xffffffff;
}
return uVar3;
}
| |
21,521 | js_fmin | bluesky950520[P]quickjs/quickjs.c | static double js_fmin(double a, double b)
{
if (a == 0 && b == 0) {
JSFloat64Union a1, b1;
a1.d = a;
b1.d = b;
a1.u64 |= b1.u64;
return a1.d;
} else {
return fmin(a, b);
}
} | O0 | c | js_fmin:
movsd %xmm0, -0x10(%rsp)
movsd %xmm1, -0x18(%rsp)
movsd -0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xd9113
jp 0xd9113
movsd -0x18(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xd9113
jp 0xd9113
movsd -0x10(%rsp), %xmm0
movsd %xmm0, -0x20(%rsp)
movsd -0x18(%rsp), %xmm0
movsd %xmm0, -0x28(%rsp)
movq -0x28(%rsp), %rax
orq -0x20(%rsp), %rax
movq %rax, -0x20(%rsp)
movsd -0x20(%rsp), %xmm0
movsd %xmm0, -0x8(%rsp)
jmp 0xd9143
movsd -0x10(%rsp), %xmm3
movsd -0x18(%rsp), %xmm2
movaps %xmm2, %xmm4
movaps %xmm3, %xmm0
cmpunordsd %xmm0, %xmm0
movaps %xmm0, %xmm1
pand %xmm4, %xmm1
minsd %xmm3, %xmm2
pandn %xmm2, %xmm0
por %xmm1, %xmm0
movsd %xmm0, -0x8(%rsp)
movsd -0x8(%rsp), %xmm0
retq
nopw (%rax,%rax)
| js_fmin:
movsd [rsp+var_10], xmm0
movsd [rsp+var_18], xmm1
movsd xmm0, [rsp+var_10]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_D9113
jp short loc_D9113
movsd xmm0, [rsp+var_18]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_D9113
jp short loc_D9113
movsd xmm0, [rsp+var_10]
movsd [rsp+var_20], xmm0
movsd xmm0, [rsp+var_18]
movsd [rsp+var_28], xmm0
mov rax, [rsp+var_28]
or rax, [rsp+var_20]
mov [rsp+var_20], rax
movsd xmm0, [rsp+var_20]
movsd [rsp+var_8], xmm0
jmp short loc_D9143
loc_D9113:
movsd xmm3, [rsp+var_10]
movsd xmm2, [rsp+var_18]
movaps xmm4, xmm2
movaps xmm0, xmm3
cmpunordsd xmm0, xmm0
movaps xmm1, xmm0
pand xmm1, xmm4
minsd xmm2, xmm3
pandn xmm0, xmm2
por xmm0, xmm1
movsd [rsp+var_8], xmm0
loc_D9143:
movsd xmm0, [rsp+var_8]
retn
| double js_fmin(double a1, double a2)
{
__m128i v2; // xmm2
__m128i v3; // xmm0
double v6; // [rsp+20h] [rbp-8h]
if ( a1 == 0.0 && a2 == 0.0 )
{
*(_QWORD *)&v6 = *(_QWORD *)&a1 | *(_QWORD *)&a2;
}
else
{
v2 = (__m128i)*(unsigned long long *)&a2;
v3 = (__m128i)_mm_cmpunord_sd((__m128d)*(unsigned long long *)&a1, (__m128d)*(unsigned long long *)&a1);
*(double *)v2.m128i_i64 = fmin(a2, a1);
*(_QWORD *)&v6 = _mm_or_si128(_mm_andnot_si128(v3, v2), _mm_and_si128(v3, (__m128i)*(unsigned long long *)&a2)).m128i_u64[0];
}
return v6;
}
| js_fmin:
MOVSD qword ptr [RSP + -0x10],XMM0
MOVSD qword ptr [RSP + -0x18],XMM1
MOVSD XMM0,qword ptr [RSP + -0x10]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x001d9113
JP 0x001d9113
MOVSD XMM0,qword ptr [RSP + -0x18]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x001d9113
JP 0x001d9113
MOVSD XMM0,qword ptr [RSP + -0x10]
MOVSD qword ptr [RSP + -0x20],XMM0
MOVSD XMM0,qword ptr [RSP + -0x18]
MOVSD qword ptr [RSP + -0x28],XMM0
MOV RAX,qword ptr [RSP + -0x28]
OR RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RSP + -0x20],RAX
MOVSD XMM0,qword ptr [RSP + -0x20]
MOVSD qword ptr [RSP + -0x8],XMM0
JMP 0x001d9143
LAB_001d9113:
MOVSD XMM3,qword ptr [RSP + -0x10]
MOVSD XMM2,qword ptr [RSP + -0x18]
MOVAPS XMM4,XMM2
MOVAPS XMM0,XMM3
CMPUNORDSD XMM0,XMM0
MOVAPS XMM1,XMM0
PAND XMM1,XMM4
MINSD XMM2,XMM3
PANDN XMM0,XMM2
POR XMM0,XMM1
MOVSD qword ptr [RSP + -0x8],XMM0
LAB_001d9143:
MOVSD XMM0,qword ptr [RSP + -0x8]
RET
|
ulong js_fmin(double param_1,double param_2)
{
int4 uVar1;
int4 uVar2;
int8 local_8;
if ((((param_1 != 0.0) || (NAN(param_1))) || (param_2 != 0.0)) || (NAN(param_2))) {
uVar1 = SUB84(param_2,0);
uVar2 = (int)((ulong)param_2 >> 0x20);
if (param_1 <= param_2) {
uVar1 = SUB84(param_1,0);
uVar2 = (int)((ulong)param_1 >> 0x20);
}
local_8 = ~-(ulong)NAN(param_1) & CONCAT44(uVar2,uVar1) | -(ulong)NAN(param_1) & (ulong)param_2;
}
else {
local_8 = (ulong)param_2 | (ulong)param_1;
}
return local_8;
}
| |
21,522 | minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const | monkey531[P]llama/common/minja.hpp | void dump(std::ostringstream & out, int indent = -1, int level = 0, bool to_json = false) const {
auto print_indent = [&](int level) {
if (indent > 0) {
out << "\n";
for (int i = 0, n = level * indent; i < n; ++i) out << ' ';
}
};
auto print_sub_sep = [&]() {
out << ',';
if (indent < 0) out << ' ';
else print_indent(level + 1);
};
auto string_quote = to_json ? '"' : '\'';
if (is_null()) out << "null";
else if (array_) {
out << "[";
print_indent(level + 1);
for (size_t i = 0; i < array_->size(); ++i) {
if (i) print_sub_sep();
(*array_)[i].dump(out, indent, level + 1, to_json);
}
print_indent(level);
out << "]";
} else if (object_) {
out << "{";
print_indent(level + 1);
for (auto begin = object_->begin(), it = begin; it != object_->end(); ++it) {
if (it != begin) print_sub_sep();
if (it->first.is_string()) {
dump_string(it->first, out, string_quote);
} else {
out << string_quote << it->first.dump() << string_quote;
}
out << ": ";
it->second.dump(out, indent, level + 1, to_json);
}
print_indent(level);
out << "}";
} else if (callable_) {
throw std::runtime_error("Cannot dump callable to JSON");
} else if (is_boolean() && !to_json) {
out << (this->to_bool() ? "True" : "False");
} else if (is_string() && !to_json) {
dump_string(primitive_, out, string_quote);
} else {
out << primitive_.dump();
}
} | O2 | cpp | minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, %r12d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %rax
movl %edx, (%rax)
leaq 0x8(%rsp), %rdx
movl %ecx, (%rdx)
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq %rsi, 0x8(%rcx)
movq %rsi, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movq %rcx, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
xorl %r15d, %r15d
testl %r8d, %r8d
sete %bpl
callq 0x66cb2
testb %al, %al
je 0x669ea
leaq 0x50fc9(%rip), %rsi # 0xb79ae
jmp 0x66c35
cmpq $0x0, 0x10(%rbx)
je 0x66a8d
leaq 0x51d8b(%rip), %rsi # 0xb8787
movq %r14, %rdi
callq 0x24a50
movl 0x8(%rsp), %esi
incl %esi
leaq 0x18(%rsp), %rdi
callq 0x66cd2
xorl %r13d, %r13d
movl %r12d, %eax
pushq $0x50
popq %r12
movzbl %al, %ebp
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rax
subq %rdi, %rax
cqto
idivq %r12
cmpq %rax, %r15
jae 0x66a73
testq %r15, %r15
je 0x66a52
leaq 0x48(%rsp), %rdi
callq 0x66d1e
movq 0x10(%rbx), %rax
movq (%rax), %rdi
addq %r13, %rdi
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
incl %ecx
movq %r14, %rsi
movl %ebp, %r8d
callq 0x66986
incq %r15
addq $0x50, %r13
jmp 0x66a24
movl 0x8(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0x66cd2
leaq 0x46e4c(%rip), %rsi # 0xad8d4
jmp 0x66c35
movb %bpl, %r15b
leal (%r15,%r15,4), %ebp
addl $0x22, %ebp
cmpq $0x0, 0x20(%rbx)
je 0x66bc0
leaq 0x505cd(%rip), %rsi # 0xb7076
movq %r14, %rdi
callq 0x24a50
movl 0x8(%rsp), %esi
incl %esi
leaq 0x18(%rsp), %rdi
callq 0x66cd2
movq 0x20(%rbx), %rax
movq (%rax), %r15
xorl %r13d, %r13d
movsbl %bpl, %ebp
movl %r12d, %ecx
leaq 0x51cbd(%rip), %r12 # 0xb8796
movzbl %cl, %ecx
movl %ecx, 0x14(%rsp)
movl %ebp, 0x10(%rsp)
cmpq 0x8(%rax), %r15
je 0x66ba9
testq %r13, %r13
je 0x66afd
leaq 0x48(%rsp), %rdi
callq 0x66d1e
cmpb $0x3, (%r15)
jne 0x66b12
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x66d54
jmp 0x66b72
movq %r14, %rdi
movq %r13, %r14
movq %rbx, %r13
movq %rdi, %rbx
movl %ebp, %esi
callq 0x24c20
movq %rax, %rbp
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
pushq $-0x1
popq %rdx
pushq $0x20
popq %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x608ac
movq %rbp, %rdi
movl 0x10(%rsp), %ebp
leaq 0x28(%rsp), %rsi
callq 0x24910
movq %rax, %rdi
movl %ebp, %esi
callq 0x24c20
leaq 0x28(%rsp), %rdi
callq 0x254d8
movq %rbx, %rax
movq %r13, %rbx
movq %r14, %r13
movq %rax, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x24a50
leaq 0x10(%r15), %rdi
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
incl %ecx
movq %r14, %rsi
movl 0x14(%rsp), %r8d
callq 0x66986
addq $0x60, %r15
movq 0x20(%rbx), %rax
addq $-0x60, %r13
jmp 0x66ae4
movl 0x8(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0x66cd2
leaq 0x54c91(%rip), %rsi # 0xbb84f
jmp 0x66c35
cmpq $0x0, 0x30(%rbx)
jne 0x66c5d
movb 0x40(%rbx), %al
cmpb $0x4, %al
setne %cl
orb %r12b, %cl
je 0x66c19
addq $0x40, %rbx
cmpb $0x3, %al
setne %al
orb %r12b, %al
je 0x66c4c
leaq 0x28(%rsp), %r15
pushq $-0x1
popq %rdx
pushq $0x20
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x608ac
movq %r14, %rdi
movq %r15, %rsi
callq 0x24910
leaq 0x28(%rsp), %rdi
callq 0x254d8
jmp 0x66c3d
movq %rbx, %rdi
callq 0x66420
leaq 0x5046d(%rip), %rcx # 0xb7095
leaq 0x5046b(%rip), %rsi # 0xb709a
testb %al, %al
cmovneq %rcx, %rsi
movq %r14, %rdi
callq 0x24a50
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %bpl, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x66d54
jmp 0x66c3d
pushq $0x10
popq %rdi
callq 0x244f0
movq %rax, %r14
leaq 0x50409(%rip), %rsi # 0xb7078
movq %rax, %rdi
callq 0x24370
movq 0x9b36a(%rip), %rsi # 0x101fe8
movq 0x9b2c3(%rip), %rdx # 0x101f48
movq %r14, %rdi
callq 0x251c0
jmp 0x66c9c
movq %rax, %rbx
movq %r14, %rdi
callq 0x24780
jmp 0x66ca9
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x254d8
movq %rbx, %rdi
callq 0x25250
nop
| _ZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiib:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12d, r8d
mov r14, rsi
mov rbx, rdi
lea rax, [rsp+98h+var_8C]
mov [rax], edx
lea rdx, [rsp+98h+var_90]
mov [rdx], ecx
lea rcx, [rsp+98h+var_80]
mov [rcx], rax
mov [rcx+8], rsi
mov [rsp+98h+var_50], rsi
mov [rsp+98h+var_48], rax
mov [rsp+98h+var_40], rcx
mov [rsp+98h+var_38], rdx
xor r15d, r15d
test r8d, r8d
setz bpl
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jz short loc_669EA
lea rsi, aOnNull_0+5; "null"
jmp loc_66C35
loc_669EA:
cmp qword ptr [rbx+10h], 0
jz loc_66A8D
lea rsi, aBytes+9; "["
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [rsp+98h+var_90]
inc esi
lea rdi, [rsp+98h+var_80]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(int)#1}::operator()(int)
xor r13d, r13d
mov eax, r12d
push 50h ; 'P'
pop r12
movzx ebp, al
xor r15d, r15d
loc_66A24:
mov rax, [rbx+10h]
mov rdi, [rax]
mov rax, [rax+8]
sub rax, rdi
cqo
idiv r12
cmp r15, rax
jnb short loc_66A73
test r15, r15
jz short loc_66A52
lea rdi, [rsp+98h+var_50]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUlvE_clEv; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(void)#1}::operator()(void)
mov rax, [rbx+10h]
mov rdi, [rax]
loc_66A52:
add rdi, r13; this
mov edx, [rsp+98h+var_8C]
mov ecx, [rsp+98h+var_90]
inc ecx
mov rsi, r14
mov r8d, ebp
call _ZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiib; minja::Value::dump(std::ostringstream &,int,int,bool)
inc r15
add r13, 50h ; 'P'
jmp short loc_66A24
loc_66A73:
mov esi, [rsp+98h+var_90]
lea rdi, [rsp+98h+var_80]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(int)#1}::operator()(int)
lea rsi, asc_AD8CF+5; "]"
jmp loc_66C35
loc_66A8D:
mov r15b, bpl
lea ebp, [r15+r15*4]
add ebp, 22h ; '"'
cmp qword ptr [rbx+20h], 0
jz loc_66BC0
lea rsi, asc_B7076; "{"
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [rsp+98h+var_90]
inc esi
lea rdi, [rsp+98h+var_80]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(int)#1}::operator()(int)
mov rax, [rbx+20h]
mov r15, [rax]
xor r13d, r13d
movsx ebp, bpl
mov ecx, r12d
lea r12, aSubtype+9; ": "
movzx ecx, cl
mov [rsp+98h+var_84], ecx
mov [rsp+98h+var_88], ebp
loc_66AE4:
cmp r15, [rax+8]
jz loc_66BA9
test r13, r13
jz short loc_66AFD
lea rdi, [rsp+98h+var_50]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUlvE_clEv; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(void)#1}::operator()(void)
loc_66AFD:
cmp byte ptr [r15], 3
jnz short loc_66B12
mov rdi, r15
mov rsi, r14
mov edx, ebp
call _ZN5minja5Value11dump_stringERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERNS6_19basic_ostringstreamIcS9_SA_EEc; minja::Value::dump_string(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::ostringstream &,char)
jmp short loc_66B72
loc_66B12:
mov rdi, r14
mov r14, r13
mov r13, rbx
mov rbx, rdi
mov esi, ebp
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov rbp, rax
lea rdi, [rsp+98h+var_70]
mov rsi, r15
push 0FFFFFFFFFFFFFFFFh
pop rdx
push 20h ; ' '
pop rcx
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rdi, rbp
mov ebp, [rsp+98h+var_88]
lea rsi, [rsp+98h+var_70]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
mov esi, ebp
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
lea rdi, [rsp+98h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
mov rbx, r13
mov r13, r14
mov r14, rax
loc_66B72:
mov rdi, r14
mov rsi, r12
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rdi, [r15+10h]
mov edx, [rsp+98h+var_8C]
mov ecx, [rsp+98h+var_90]
inc ecx
mov rsi, r14
mov r8d, [rsp+98h+var_84]
call _ZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiib; minja::Value::dump(std::ostringstream &,int,int,bool)
add r15, 60h ; '`'
mov rax, [rbx+20h]
add r13, 0FFFFFFFFFFFFFFA0h
jmp loc_66AE4
loc_66BA9:
mov esi, [rsp+98h+var_90]
lea rdi, [rsp+98h+var_80]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(int)#1}::operator()(int)
lea rsi, aNT020+17h; "}"
jmp short loc_66C35
loc_66BC0:
cmp qword ptr [rbx+30h], 0
jnz loc_66C5D
mov al, [rbx+40h]
cmp al, 4
setnz cl
or cl, r12b
jz short loc_66C19
add rbx, 40h ; '@'
cmp al, 3
setnz al
or al, r12b
jz short loc_66C4C
lea r15, [rsp+98h+var_70]
push 0FFFFFFFFFFFFFFFFh
pop rdx
push 20h ; ' '
pop rcx
mov rdi, r15
mov rsi, rbx
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rdi, r14
mov rsi, r15
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rdi, [rsp+98h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_66C3D
loc_66C19:
mov rdi, rbx; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
lea rcx, aTrue_0; "True"
lea rsi, aFalse; "False"
test al, al
cmovnz rsi, rcx
loc_66C35:
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_66C3D:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_66C4C:
movsx edx, bpl
mov rdi, rbx
mov rsi, r14
call _ZN5minja5Value11dump_stringERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERNS6_19basic_ostringstreamIcS9_SA_EEc; minja::Value::dump_string(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::ostringstream &,char)
jmp short loc_66C3D
loc_66C5D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aCannotDumpCall; "Cannot dump callable to JSON"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_66C9C
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_66CA9
loc_66C9C:
mov rbx, rax
lea rdi, [rsp+98h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_66CA9:
mov rdi, rbx
call __Unwind_Resume
| void minja::Value::dump(long long a1, long long a2, unsigned int a3, unsigned int a4, int a5)
{
unsigned __int8 v5; // r12
long long v6; // r14
long long v7; // rbx
bool v8; // bp
char *v9; // rsi
long long v10; // r13
unsigned long long i; // r15
long long *v12; // rax
long long v13; // rdi
bool v14; // r15
unsigned int v15; // ebp
_BYTE **v16; // rax
_BYTE *v17; // r15
long long v18; // r13
long long v19; // rdi
long long v20; // r14
long long v21; // r13
long long v22; // rbx
long long v23; // rbp
long long v24; // rdi
long long v25; // rax
long long v26; // rax
char v27; // al
long long v28; // rbx
std::runtime_error *exception; // r14
unsigned int v30; // [rsp+8h] [rbp-90h] BYREF
unsigned int v31; // [rsp+Ch] [rbp-8Ch] BYREF
unsigned int v32; // [rsp+10h] [rbp-88h]
unsigned int v33; // [rsp+14h] [rbp-84h]
_QWORD v34[2]; // [rsp+18h] [rbp-80h] BYREF
_BYTE v35[32]; // [rsp+28h] [rbp-70h] BYREF
_QWORD v36[10]; // [rsp+48h] [rbp-50h] BYREF
v5 = a5;
v6 = a2;
v7 = a1;
v31 = a3;
v30 = a4;
v34[0] = &v31;
v34[1] = a2;
v36[0] = a2;
v36[1] = &v31;
v36[2] = v34;
v36[3] = &v30;
v8 = a5 == 0;
if ( (unsigned __int8)minja::Value::is_null((minja::Value *)a1) )
{
v9 = "null";
LABEL_26:
std::operator<<<std::char_traits<char>>(v6, v9);
return;
}
if ( *(_QWORD *)(a1 + 16) )
{
std::operator<<<std::char_traits<char>>(a2, "[");
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()(v34, v30 + 1);
v10 = 0LL;
for ( i = 0LL; ; ++i )
{
v12 = *(long long **)(v7 + 16);
v13 = *v12;
if ( i >= (v12[1] - *v12) / 80 )
break;
if ( i )
{
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(void)#1}::operator()(v36);
v13 = **(_QWORD **)(v7 + 16);
}
minja::Value::dump(v10 + v13, a2, v31, v30 + 1, v5);
v10 += 80LL;
}
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()(v34, v30);
v9 = "]";
goto LABEL_26;
}
v14 = v8;
LOBYTE(v15) = 5 * v8 + 34;
if ( *(_QWORD *)(a1 + 32) )
{
std::operator<<<std::char_traits<char>>(a2, "{");
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()(v34, v30 + 1);
v16 = *(_BYTE ***)(a1 + 32);
v17 = *v16;
v18 = 0LL;
v15 = (char)v15;
v33 = v5;
v32 = (char)v15;
while ( v17 != v16[1] )
{
if ( v18 )
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(void)#1}::operator()(v36);
if ( *v17 == 3 )
{
minja::Value::dump_string(v17, v6, v15);
}
else
{
v19 = v6;
v20 = v18;
v21 = v7;
v22 = v19;
v23 = std::operator<<<std::char_traits<char>>(v19, v15);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v35,
(long long)v17,
-1,
32,
0,
0);
v24 = v23;
v15 = v32;
v25 = std::operator<<<char>(v24, v35);
std::operator<<<std::char_traits<char>>(v25, v15);
std::string::~string(v35);
v26 = v22;
v7 = v21;
v18 = v20;
v6 = v26;
}
std::operator<<<std::char_traits<char>>(v6, ": ");
minja::Value::dump(v17 + 16, v6, v31, v30 + 1, v33);
v17 += 96;
v16 = *(_BYTE ***)(v7 + 32);
v18 -= 96LL;
}
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()(v34, v30);
v9 = "}";
goto LABEL_26;
}
if ( *(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Cannot dump callable to JSON");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v27 = *(_BYTE *)(a1 + 64);
if ( !(v5 | (v27 != 4)) )
{
v9 = "False";
if ( (unsigned __int8)minja::Value::to_bool((minja::Value *)a1) )
v9 = "True";
goto LABEL_26;
}
v28 = a1 + 64;
if ( v5 | (v27 != 3) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v35,
v28,
-1,
32,
0,
0);
std::operator<<<char>(a2, v35);
std::string::~string(v35);
}
else
{
minja::Value::dump_string(v28, a2, (unsigned int)(char)(5 * v14 + 34));
}
}
| dump:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12D,R8D
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RSP + 0xc]
MOV dword ptr [RAX],EDX
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],ECX
LEA RCX,[RSP + 0x18]
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],RSI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RCX
MOV qword ptr [RSP + 0x60],RDX
XOR R15D,R15D
TEST R8D,R8D
SETZ BPL
CALL 0x00166cb2
TEST AL,AL
JZ 0x001669ea
LEA RSI,[0x1b79ae]
JMP 0x00166c35
LAB_001669ea:
CMP qword ptr [RBX + 0x10],0x0
JZ 0x00166a8d
LEA RSI,[0x1b8787]
MOV RDI,R14
CALL 0x00124a50
MOV ESI,dword ptr [RSP + 0x8]
INC ESI
LEA RDI,[RSP + 0x18]
CALL 0x00166cd2
XOR R13D,R13D
MOV EAX,R12D
PUSH 0x50
POP R12
MOVZX EBP,AL
XOR R15D,R15D
LAB_00166a24:
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,RDI
CQO
IDIV R12
CMP R15,RAX
JNC 0x00166a73
TEST R15,R15
JZ 0x00166a52
LEA RDI,[RSP + 0x48]
CALL 0x00166d1e
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX]
LAB_00166a52:
ADD RDI,R13
MOV EDX,dword ptr [RSP + 0xc]
MOV ECX,dword ptr [RSP + 0x8]
INC ECX
MOV RSI,R14
MOV R8D,EBP
CALL 0x00166986
INC R15
ADD R13,0x50
JMP 0x00166a24
LAB_00166a73:
MOV ESI,dword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x18]
CALL 0x00166cd2
LEA RSI,[0x1ad8d4]
JMP 0x00166c35
LAB_00166a8d:
MOV R15B,BPL
LEA EBP,[R15 + R15*0x4]
ADD EBP,0x22
CMP qword ptr [RBX + 0x20],0x0
JZ 0x00166bc0
LEA RSI,[0x1b7076]
MOV RDI,R14
CALL 0x00124a50
MOV ESI,dword ptr [RSP + 0x8]
INC ESI
LEA RDI,[RSP + 0x18]
CALL 0x00166cd2
MOV RAX,qword ptr [RBX + 0x20]
MOV R15,qword ptr [RAX]
XOR R13D,R13D
MOVSX EBP,BPL
MOV ECX,R12D
LEA R12,[0x1b8796]
MOVZX ECX,CL
MOV dword ptr [RSP + 0x14],ECX
MOV dword ptr [RSP + 0x10],EBP
LAB_00166ae4:
CMP R15,qword ptr [RAX + 0x8]
JZ 0x00166ba9
TEST R13,R13
JZ 0x00166afd
LEA RDI,[RSP + 0x48]
CALL 0x00166d1e
LAB_00166afd:
CMP byte ptr [R15],0x3
JNZ 0x00166b12
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
CALL 0x00166d54
JMP 0x00166b72
LAB_00166b12:
MOV RDI,R14
MOV R14,R13
MOV R13,RBX
MOV RBX,RDI
MOV ESI,EBP
CALL 0x00124c20
MOV RBP,RAX
LEA RDI,[RSP + 0x28]
MOV RSI,R15
PUSH -0x1
POP RDX
PUSH 0x20
POP RCX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001608ac
LAB_00166b41:
MOV RDI,RBP
MOV EBP,dword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x28]
CALL 0x00124910
MOV RDI,RAX
MOV ESI,EBP
CALL 0x00124c20
LAB_00166b5c:
LEA RDI,[RSP + 0x28]
CALL 0x001254d8
MOV RAX,RBX
MOV RBX,R13
MOV R13,R14
MOV R14,RAX
LAB_00166b72:
MOV RDI,R14
MOV RSI,R12
CALL 0x00124a50
LEA RDI,[R15 + 0x10]
MOV EDX,dword ptr [RSP + 0xc]
MOV ECX,dword ptr [RSP + 0x8]
INC ECX
MOV RSI,R14
MOV R8D,dword ptr [RSP + 0x14]
CALL 0x00166986
ADD R15,0x60
MOV RAX,qword ptr [RBX + 0x20]
ADD R13,-0x60
JMP 0x00166ae4
LAB_00166ba9:
MOV ESI,dword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x18]
CALL 0x00166cd2
LEA RSI,[0x1bb84f]
JMP 0x00166c35
LAB_00166bc0:
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x00166c5d
MOV AL,byte ptr [RBX + 0x40]
CMP AL,0x4
SETNZ CL
OR CL,R12B
JZ 0x00166c19
ADD RBX,0x40
CMP AL,0x3
SETNZ AL
OR AL,R12B
JZ 0x00166c4c
LEA R15,[RSP + 0x28]
PUSH -0x1
POP RDX
PUSH 0x20
POP RCX
MOV RDI,R15
MOV RSI,RBX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001608ac
LAB_00166c02:
MOV RDI,R14
MOV RSI,R15
CALL 0x00124910
LAB_00166c0d:
LEA RDI,[RSP + 0x28]
CALL 0x001254d8
JMP 0x00166c3d
LAB_00166c19:
MOV RDI,RBX
CALL 0x00166420
LEA RCX,[0x1b7095]
LEA RSI,[0x1b709a]
TEST AL,AL
CMOVNZ RSI,RCX
LAB_00166c35:
MOV RDI,R14
CALL 0x00124a50
LAB_00166c3d:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00166c4c:
MOVSX EDX,BPL
MOV RDI,RBX
MOV RSI,R14
CALL 0x00166d54
JMP 0x00166c3d
LAB_00166c5d:
PUSH 0x10
POP RDI
CALL 0x001244f0
MOV R14,RAX
LAB_00166c68:
LEA RSI,[0x1b7078]
MOV RDI,RAX
CALL 0x00124370
LAB_00166c77:
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,R14
CALL 0x001251c0
|
/* minja::Value::dump(std::__cxx11::ostringstream&, int, int, bool) const */
void __thiscall
minja::Value::dump(Value *this,ostringstream *param_1,int param_2,int param_3,bool param_4)
{
char cVar1;
int8 *puVar2;
ostream *poVar3;
runtime_error *this_00;
int iVar4;
char *pcVar5;
long lVar6;
int7 in_register_00000081;
long lVar7;
ulong uVar8;
int local_90;
int local_8c;
int local_88;
uint local_84;
int *local_80;
ostringstream *local_78;
string local_70 [32];
ostringstream *local_50;
int *local_48;
int **local_40;
int *local_38;
local_80 = &local_8c;
local_38 = &local_90;
local_40 = &local_80;
local_90 = param_3;
local_8c = param_2;
local_78 = param_1;
local_50 = param_1;
local_48 = local_80;
cVar1 = is_null(this);
if (cVar1 == '\0') {
if (*(long *)(this + 0x10) == 0) {
cVar1 = ((int)CONCAT71(in_register_00000081,param_4) == 0) * '\x05' + '\"';
if (*(long *)(this + 0x20) == 0) {
if (*(long *)(this + 0x30) != 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00166c68 to 00166c76 has its CatchHandler @ 00166c8f */
std::runtime_error::runtime_error(this_00,"Cannot dump callable to JSON");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
if (this[0x40] != (Value)0x4 || param_4) {
if (this[0x40] != (Value)0x3 || param_4) {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_70,this + 0x40,0xffffffffffffffff,0x20,0,0);
/* try { // try from 00166c02 to 00166c0c has its CatchHandler @ 00166c8d */
std::operator<<((ostream *)param_1,local_70);
std::__cxx11::string::~string(local_70);
return;
}
dump_string(this + 0x40,param_1,cVar1);
return;
}
cVar1 = to_bool(this);
pcVar5 = "False";
if (cVar1 != '\0') {
pcVar5 = "True";
}
}
else {
std::operator<<((ostream *)param_1,"{");
const::{lambda(int)#1}::operator()((_lambda_int__1_ *)&local_80,local_90 + 1);
puVar2 = *(int8 **)(this + 0x20);
lVar7 = 0;
iVar4 = (int)cVar1;
local_84 = (uint)param_4;
local_88 = iVar4;
for (pcVar5 = (char *)*puVar2; pcVar5 != (char *)puVar2[1]; pcVar5 = pcVar5 + 0x60) {
if (lVar7 != 0) {
const::{lambda()#1}::operator()((_lambda___1_ *)&local_50);
}
if (*pcVar5 == '\x03') {
dump_string(pcVar5,param_1,(char)iVar4);
}
else {
poVar3 = std::operator<<((ostream *)param_1,(char)iVar4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_70,pcVar5,0xffffffffffffffff,0x20,0,0);
iVar4 = local_88;
/* try { // try from 00166b41 to 00166b5b has its CatchHandler @ 00166c9c */
poVar3 = std::operator<<(poVar3,local_70);
std::operator<<(poVar3,(char)iVar4);
std::__cxx11::string::~string(local_70);
}
std::operator<<((ostream *)param_1,": ");
dump((Value *)(pcVar5 + 0x10),param_1,local_8c,local_90 + 1,SUB41(local_84,0));
puVar2 = *(int8 **)(this + 0x20);
lVar7 = lVar7 + -0x60;
}
const::{lambda(int)#1}::operator()((_lambda_int__1_ *)&local_80,local_90);
pcVar5 = "}";
}
}
else {
std::operator<<((ostream *)param_1,"[");
const::{lambda(int)#1}::operator()((_lambda_int__1_ *)&local_80,local_90 + 1);
lVar7 = 0;
for (uVar8 = 0; lVar6 = **(long **)(this + 0x10),
uVar8 < (ulong)(((*(long **)(this + 0x10))[1] - lVar6) / 0x50); uVar8 = uVar8 + 1) {
if (uVar8 != 0) {
const::{lambda()#1}::operator()((_lambda___1_ *)&local_50);
lVar6 = **(long **)(this + 0x10);
}
dump((Value *)(lVar6 + lVar7),param_1,local_8c,local_90 + 1,param_4);
lVar7 = lVar7 + 0x50;
}
const::{lambda(int)#1}::operator()((_lambda_int__1_ *)&local_80,local_90);
pcVar5 = "]";
}
}
else {
pcVar5 = "null";
}
std::operator<<((ostream *)param_1,pcVar5);
return;
}
| |
21,523 | lf_alloc_destroy | eloqsql/mysys/lf_alloc-pin.c | void lf_alloc_destroy(LF_ALLOCATOR *allocator)
{
uchar *node= allocator->top;
while (node)
{
uchar *tmp= anext_node(node);
if (allocator->destructor)
allocator->destructor(node);
my_free(node);
node= tmp;
}
lf_pinbox_destroy(&allocator->pinbox);
allocator->top= 0;
} | O3 | c | lf_alloc_destroy:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %r14
testq %r14, %r14
je 0xa5414
movl 0x38(%rbx), %eax
movq (%r14,%rax), %r15
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0xa5404
movq %r14, %rdi
callq *%rax
movq %r14, %rdi
callq 0x9fb2e
movq %r15, %r14
testq %r15, %r15
jne 0xa53ef
movq %rbx, %rdi
callq 0xa55a7
movq $0x0, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| lf_alloc_destroy:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+48h]
test r14, r14
jz short loc_A5414
loc_A53EF:
mov eax, [rbx+38h]
mov r15, [r14+rax]
mov rax, [rbx+60h]
test rax, rax
jz short loc_A5404
mov rdi, r14
call rax
loc_A5404:
mov rdi, r14
call my_free
mov r14, r15
test r15, r15
jnz short loc_A53EF
loc_A5414:
mov rdi, rbx
call lf_dynarray_destroy
mov qword ptr [rbx+48h], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long lf_alloc_destroy(long long a1)
{
long long v1; // r14
long long v2; // r15
void ( *v3)(long long); // rax
long long result; // rax
v1 = *(_QWORD *)(a1 + 72);
if ( v1 )
{
do
{
v2 = *(_QWORD *)(v1 + *(unsigned int *)(a1 + 56));
v3 = *(void ( **)(long long))(a1 + 96);
if ( v3 )
v3(v1);
my_free(v1);
v1 = v2;
}
while ( v2 );
}
result = lf_dynarray_destroy(a1);
*(_QWORD *)(a1 + 72) = 0LL;
return result;
}
| lf_alloc_destroy:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x48]
TEST R14,R14
JZ 0x001a5414
LAB_001a53ef:
MOV EAX,dword ptr [RBX + 0x38]
MOV R15,qword ptr [R14 + RAX*0x1]
MOV RAX,qword ptr [RBX + 0x60]
TEST RAX,RAX
JZ 0x001a5404
MOV RDI,R14
CALL RAX
LAB_001a5404:
MOV RDI,R14
CALL 0x0019fb2e
MOV R14,R15
TEST R15,R15
JNZ 0x001a53ef
LAB_001a5414:
MOV RDI,RBX
CALL 0x001a55a7
MOV qword ptr [RBX + 0x48],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void lf_alloc_destroy(long param_1)
{
long lVar1;
long lVar2;
lVar2 = *(long *)(param_1 + 0x48);
while (lVar2 != 0) {
lVar1 = *(long *)(lVar2 + (ulong)*(uint *)(param_1 + 0x38));
if (*(code **)(param_1 + 0x60) != (code *)0x0) {
(**(code **)(param_1 + 0x60))(lVar2);
}
my_free(lVar2);
lVar2 = lVar1;
}
lf_dynarray_destroy(param_1);
*(int8 *)(param_1 + 0x48) = 0;
return;
}
| |
21,524 | mthd_my_read_one_row | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int mthd_my_read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths)
{
uint field;
ulong pkt_len,len;
uchar *pos,*prev_pos, *end_pos;
if ((pkt_len=(uint) ma_net_safe_read(mysql)) == packet_error)
return -1;
if (pkt_len <= 8 && mysql->net.read_pos[0] == 254)
{
mysql->warning_count= uint2korr(mysql->net.read_pos + 1);
mysql->server_status= uint2korr(mysql->net.read_pos + 3);
return 1; /* End of data */
}
prev_pos= 0; /* allowed to write at packet[-1] */
pos=mysql->net.read_pos;
end_pos=pos+pkt_len;
for (field=0 ; field < fields ; field++)
{
if ((len=(ulong) net_field_length(&pos)) == NULL_LENGTH)
{ /* null field */
row[field] = 0;
*lengths++=0;
}
else
{
if (len > (ulong) (end_pos - pos) || pos > end_pos)
{
mysql->net.last_errno=CR_UNKNOWN_ERROR;
strncpy(mysql->net.last_error,ER(mysql->net.last_errno),
MYSQL_ERRMSG_SIZE - 1);
return -1;
}
row[field] = (char*) pos;
pos+=len;
*lengths++=len;
}
if (prev_pos)
*prev_pos=0; /* Terminate prev field */
prev_pos=pos;
}
row[field]=(char*) prev_pos+1; /* End of last field */
*prev_pos=0; /* Terminate last field */
return 0;
} | O0 | c | mthd_my_read_one_row:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x35fc0
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x3aa3c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3ac0f
cmpq $0x8, -0x38(%rbp)
ja 0x3aac1
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x3aac1
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
movzbl 0x2(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x388(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movzbl 0x3(%rax), %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
movzbl 0x4(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x380(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3ac0f
movq $0x0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x3abee
leaq -0x48(%rbp), %rdi
callq 0x365e0
movq %rax, -0x40(%rbp)
cmpq $-0x1, %rax
jne 0x3ab31
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
movq $0x0, (%rax)
jmp 0x3abca
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movq -0x48(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
ja 0x3ab4f
movq -0x48(%rbp), %rax
cmpq -0x58(%rbp), %rax
jbe 0x3ab99
movq -0x10(%rbp), %rax
movl $0x7d0, 0x90(%rax) # imm = 0x7D0
movq -0x10(%rbp), %rdi
addq $0x97, %rdi
movq -0x10(%rbp), %rax
movl 0x90(%rax), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x1e825e(%rip), %rax # 0x222de0
movq (%rax,%rcx,8), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x35120
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3ac0f
movq -0x48(%rbp), %rdx
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x28(%rbp)
movq %rcx, (%rax)
cmpq $0x0, -0x50(%rbp)
je 0x3abd8
movq -0x50(%rbp), %rax
movb $0x0, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3aae8
movq -0x50(%rbp), %rdx
addq $0x1, %rdx
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x50(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mthd_my_read_one_row:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_10]
call ma_net_safe_read
mov eax, eax
mov [rbp+var_38], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_3AA3C
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_3AC0F
loc_3AA3C:
cmp [rbp+var_38], 8
ja short loc_3AAC1
mov rax, [rbp+var_10]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz short loc_3AAC1
mov rax, [rbp+var_10]
mov rax, [rax+20h]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_10]
mov rcx, [rcx+20h]
movzx ecx, byte ptr [rcx+2]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+388h], ecx
mov rax, [rbp+var_10]
mov rax, [rax+20h]
movzx eax, byte ptr [rax+3]
movzx eax, ax
mov rcx, [rbp+var_10]
mov rcx, [rcx+20h]
movzx ecx, byte ptr [rcx+4]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+380h], ecx
mov [rbp+var_4], 1
jmp loc_3AC0F
loc_3AAC1:
mov [rbp+var_50], 0
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
add rax, [rbp+var_38]
mov [rbp+var_58], rax
mov [rbp+var_2C], 0
loc_3AAE8:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_14]
jnb loc_3ABEE
lea rdi, [rbp+var_48]
call net_field_length
mov [rbp+var_40], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_3AB31
mov rax, [rbp+var_20]
mov ecx, [rbp+var_2C]
mov qword ptr [rax+rcx*8], 0
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 8
mov [rbp+var_28], rcx
mov qword ptr [rax], 0
jmp loc_3ABCA
loc_3AB31:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_58]
mov rdx, [rbp+var_48]
sub rcx, rdx
cmp rax, rcx
ja short loc_3AB4F
mov rax, [rbp+var_48]
cmp rax, [rbp+var_58]
jbe short loc_3AB99
loc_3AB4F:
mov rax, [rbp+var_10]
mov dword ptr [rax+90h], 7D0h
mov rdi, [rbp+var_10]
add rdi, 97h
mov rax, [rbp+var_10]
mov eax, [rax+90h]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rsi, [rax+rcx*8]
mov edx, 1FFh
call _strncpy
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_3AC0F
loc_3AB99:
mov rdx, [rbp+var_48]
mov rax, [rbp+var_20]
mov ecx, [rbp+var_2C]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_40]
add rax, [rbp+var_48]
mov [rbp+var_48], rax
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 8
mov [rbp+var_28], rdx
mov [rax], rcx
loc_3ABCA:
cmp [rbp+var_50], 0
jz short loc_3ABD8
mov rax, [rbp+var_50]
mov byte ptr [rax], 0
loc_3ABD8:
mov rax, [rbp+var_48]
mov [rbp+var_50], rax
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_3AAE8
loc_3ABEE:
mov rdx, [rbp+var_50]
add rdx, 1
mov rax, [rbp+var_20]
mov ecx, [rbp+var_2C]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_50]
mov byte ptr [rax], 0
mov [rbp+var_4], 0
loc_3AC0F:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long mthd_my_read_one_row(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
unsigned long long *v6; // rax
unsigned long long *v7; // rax
unsigned __int8 *v9; // [rsp+8h] [rbp-58h]
unsigned __int8 *v10; // [rsp+10h] [rbp-50h]
unsigned __int8 *v11; // [rsp+18h] [rbp-48h] BYREF
unsigned long long v12; // [rsp+20h] [rbp-40h]
unsigned long long v13; // [rsp+28h] [rbp-38h]
unsigned int i; // [rsp+34h] [rbp-2Ch]
unsigned long long *v15; // [rsp+38h] [rbp-28h]
long long v16; // [rsp+40h] [rbp-20h]
unsigned int v17; // [rsp+4Ch] [rbp-14h]
long long v18; // [rsp+50h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = (unsigned long long *)a4;
v13 = (unsigned int)ma_net_safe_read(a1, a2, a3, a4, a5, a6);
if ( v13 == 0xFFFFFFFF )
{
return (unsigned int)-1;
}
else if ( v13 <= 8 && **(unsigned __int8 **)(v18 + 32) == 254 )
{
*(_DWORD *)(v18 + 904) = (unsigned __int16)((*(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 2LL) << 8)
+ *(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 1LL));
*(_DWORD *)(v18 + 896) = (unsigned __int16)((*(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 4LL) << 8)
+ *(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 3LL));
return 1;
}
else
{
v10 = 0LL;
v11 = *(unsigned __int8 **)(v18 + 32);
v9 = &v11[v13];
for ( i = 0; i < v17; ++i )
{
v12 = net_field_length(&v11);
if ( v12 == -1LL )
{
*(_QWORD *)(v16 + 8LL * i) = 0LL;
v6 = v15++;
*v6 = 0LL;
}
else
{
if ( v12 > v9 - v11 || v11 > v9 )
{
*(_DWORD *)(v18 + 144) = 2000;
strncpy(v18 + 151, client_errors[*(_DWORD *)(v18 + 144) - 2000], 511LL);
return (unsigned int)-1;
}
*(_QWORD *)(v16 + 8LL * i) = v11;
v11 += v12;
v7 = v15++;
*v7 = v12;
}
if ( v10 )
*v10 = 0;
v10 = v11;
}
*(_QWORD *)(v16 + 8LL * i) = v10 + 1;
*v10 = 0;
return 0;
}
}
| mthd_my_read_one_row:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00135fc0
MOV EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x0013aa3c
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013ac0f
LAB_0013aa3c:
CMP qword ptr [RBP + -0x38],0x8
JA 0x0013aac1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x0013aac1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x388],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x20]
MOVZX ECX,byte ptr [RCX + 0x4]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x380],ECX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013ac0f
LAB_0013aac1:
MOV qword ptr [RBP + -0x50],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
MOV dword ptr [RBP + -0x2c],0x0
LAB_0013aae8:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x0013abee
LEA RDI,[RBP + -0x48]
CALL 0x001365e0
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,-0x1
JNZ 0x0013ab31
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RAX],0x0
JMP 0x0013abca
LAB_0013ab31:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x48]
SUB RCX,RDX
CMP RAX,RCX
JA 0x0013ab4f
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x58]
JBE 0x0013ab99
LAB_0013ab4f:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x90],0x7d0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x97
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x90]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x322de0]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV EDX,0x1ff
CALL 0x00135120
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013ac0f
LAB_0013ab99:
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RAX],RCX
LAB_0013abca:
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0013abd8
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],0x0
LAB_0013abd8:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0013aae8
LAB_0013abee:
MOV RDX,qword ptr [RBP + -0x50]
ADD RDX,0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],0x0
MOV dword ptr [RBP + -0x4],0x0
LAB_0013ac0f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 mthd_my_read_one_row(long param_1,uint param_2,long param_3,ulong *param_4)
{
uint uVar1;
int1 *puVar2;
int1 *local_58;
int1 *local_50;
ulong local_48;
ulong local_40;
uint local_34;
ulong *local_30;
long local_28;
uint local_1c;
long local_18;
int4 local_c;
local_30 = param_4;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
uVar1 = ma_net_safe_read(param_1);
local_40 = (ulong)uVar1;
if (local_40 == 0xffffffff) {
local_c = 0xffffffff;
}
else if ((local_40 < 9) && (**(char **)(local_18 + 0x20) == -2)) {
*(uint *)(local_18 + 0x388) =
(uint)*(byte *)(*(long *)(local_18 + 0x20) + 1) +
(uint)*(byte *)(*(long *)(local_18 + 0x20) + 2) * 0x100 & 0xffff;
*(uint *)(local_18 + 0x380) =
(uint)*(byte *)(*(long *)(local_18 + 0x20) + 3) +
(uint)*(byte *)(*(long *)(local_18 + 0x20) + 4) * 0x100 & 0xffff;
local_c = 1;
}
else {
local_58 = (int1 *)0x0;
local_50 = *(int1 **)(local_18 + 0x20);
puVar2 = local_50 + local_40;
for (local_34 = 0; local_34 < local_1c; local_34 = local_34 + 1) {
local_48 = net_field_length(&local_50);
if (local_48 == 0xffffffffffffffff) {
*(int8 *)(local_28 + (ulong)local_34 * 8) = 0;
*local_30 = 0;
}
else {
if (((ulong)((long)puVar2 - (long)local_50) < local_48) || (puVar2 < local_50)) {
*(int4 *)(local_18 + 0x90) = 2000;
strncpy((char *)(local_18 + 0x97),(&client_errors)[*(int *)(local_18 + 0x90) - 2000],0x1ff
);
return 0xffffffff;
}
*(int1 **)(local_28 + (ulong)local_34 * 8) = local_50;
local_50 = local_50 + local_48;
*local_30 = local_48;
}
local_30 = local_30 + 1;
if (local_58 != (int1 *)0x0) {
*local_58 = 0;
}
local_58 = local_50;
}
*(int1 **)(local_28 + (ulong)local_34 * 8) = local_58 + 1;
*local_58 = 0;
local_c = 0;
}
return local_c;
}
| |
21,525 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) | monkey531[P]llama/common/json.hpp | reference operator[](size_type idx)
{
// implicitly convert null value to an empty array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>();
assert_invariant();
}
// operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// fill up array with null values if given idx is outside range
if (idx >= m_data.m_value.array->size())
{
#if JSON_DIAGNOSTICS
// remember array size & capacity before resizing
const auto old_size = m_data.m_value.array->size();
const auto old_capacity = m_data.m_value.array->capacity();
#endif
m_data.m_value.array->resize(idx + 1);
#if JSON_DIAGNOSTICS
if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity))
{
// capacity has changed: update all parents
set_parents();
}
else
{
// set parent for values added above
set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size));
}
#endif
assert_invariant();
}
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, (%rdi)
jne 0x70670
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x18690
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x3f802
cmpb $0x2, (%r14)
jne 0x706b7
movq 0x8(%r14), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x4, %rax
cmpq %rbx, %rax
ja 0x706a0
leaq 0x1(%rbx), %rsi
callq 0x7091a
movq %r14, %rdi
movl $0x1, %esi
callq 0x3f802
movq 0x8(%r14), %rax
shlq $0x4, %rbx
addq (%rax), %rbx
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x18350
movq %rax, %rbx
movq %r14, %rdi
callq 0x3fecc
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3f5c5(%rip), %rsi # 0xafca0
leaq 0x10(%rsp), %rdi
callq 0x67258
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x4beb2
xorl %ebp, %ebp
leaq 0x6ebc2(%rip), %rsi # 0xdf2c8
leaq -0x221d9(%rip), %rdx # 0x4e534
movq %rbx, %rdi
callq 0x18b50
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7073b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x7073b
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x70748
movq %rbx, %rdi
callq 0x184f0
movq %r14, %rdi
callq 0x18bc0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rdi], 0
jnz short loc_70670
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_70670:
cmp byte ptr [r14], 2
jnz short loc_706B7
mov rdi, [r14+8]
mov rax, [rdi+8]
sub rax, [rdi]
sar rax, 4
cmp rax, rbx
ja short loc_706A0
lea rsi, [rbx+1]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::resize(ulong)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_706A0:
mov rax, [r14+8]
shl rbx, 4
add rbx, [rax]
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_706B7:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7073B
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_7073B
mov r14, rax
mov bpl, 1
loc_7073B:
test bpl, bpl
jz short loc_70748
mov rdi, rbx; void *
call ___cxa_free_exception
loc_70748:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
unsigned long long a2)
{
long long v3; // rax
_QWORD *v4; // rdi
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v7; // [rsp+8h] [rbp-40h] BYREF
_QWORD v8[2]; // [rsp+10h] [rbp-38h] BYREF
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
(long long)v8,
(long long)"cannot use operator[] with a numeric argument with ",
&v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v4 = *(_QWORD **)(a1 + 8);
if ( (long long)(v4[1] - *v4) >> 4 <= a2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::resize(
v4,
a2 + 1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RDI],0x0
JNZ 0x00170670
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x00118690
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013f802
LAB_00170670:
CMP byte ptr [R14],0x2
JNZ 0x001706b7
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,qword ptr [RDI]
SAR RAX,0x4
CMP RAX,RBX
JA 0x001706a0
LEA RSI,[RBX + 0x1]
CALL 0x0017091a
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013f802
LAB_001706a0:
MOV RAX,qword ptr [R14 + 0x8]
SHL RBX,0x4
ADD RBX,qword ptr [RAX]
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001706b7:
MOV EDI,0x20
CALL 0x00118350
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013fecc
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001706d4:
LEA RSI,[0x1afca0]
LEA RDI,[RSP + 0x10]
CALL 0x00167258
MOV BPL,0x1
LAB_001706e8:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0014beb2
XOR EBP,EBP
LEA RSI,[0x1df2c8]
LEA RDX,[0x14e534]
MOV RDI,RBX
CALL 0x00118b50
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this_00;
int8 *puVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar1 = (int8 *)operator_new(0x18);
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8);
if ((ulong)(*(long *)(this_00 + 8) - *(long *)this_00 >> 4) <= param_1) {
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::resize(this_00,param_1 + 1);
assert_invariant(SUB81(this,0));
}
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001706d4 to 001706e4 has its CatchHandler @ 00170735 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 001706e8 to 00170714 has its CatchHandler @ 00170715 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
21,526 | my_numcells_eucjpms | eloqsql/strings/ctype-eucjpms.c | static
size_t my_numcells_eucjpms(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 == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O3 | c | my_numcells_eucjpms:
cmpq %rdx, %rsi
jae 0x52241
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rsi), %edi
cmpl $0x8e, %edi
je 0x5221a
cmpl $0x8f, %edi
jne 0x52226
movl $0x3, %edi
movl $0x2, %ecx
jmp 0x52234
movl $0x2, %edi
movl $0x1, %ecx
jmp 0x52234
xorl %ecx, %ecx
testb %dil, %dil
sets %cl
incq %rcx
movq %rcx, %rdi
addq %rcx, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x521fb
popq %rbp
retq
xorl %eax, %eax
retq
| my_numcells_eucjpms:
cmp rsi, rdx
jnb short loc_52241
push rbp
mov rbp, rsp
xor eax, eax
loc_521FB:
movzx edi, byte ptr [rsi]
cmp edi, 8Eh
jz short loc_5221A
cmp edi, 8Fh
jnz short loc_52226
mov edi, 3
mov ecx, 2
jmp short loc_52234
loc_5221A:
mov edi, 2
mov ecx, 1
jmp short loc_52234
loc_52226:
xor ecx, ecx
test dil, dil
sets cl
inc rcx
mov rdi, rcx
loc_52234:
add rax, rcx
add rsi, rdi
cmp rsi, rdx
jb short loc_521FB
pop rbp
retn
loc_52241:
xor eax, eax
retn
| long long my_numcells_eucjpms(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
int v4; // edi
long long v5; // rdi
long long v6; // rcx
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = *a2;
if ( v4 == 142 )
{
v5 = 2LL;
v6 = 1LL;
}
else if ( v4 == 143 )
{
v5 = 3LL;
v6 = 2LL;
}
else
{
v6 = ((v4 & 0x80u) != 0) + 1LL;
v5 = v6;
}
result += v6;
a2 += v5;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
| my_numcells_eucjpms:
CMP RSI,RDX
JNC 0x00152241
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_001521fb:
MOVZX EDI,byte ptr [RSI]
CMP EDI,0x8e
JZ 0x0015221a
CMP EDI,0x8f
JNZ 0x00152226
MOV EDI,0x3
MOV ECX,0x2
JMP 0x00152234
LAB_0015221a:
MOV EDI,0x2
MOV ECX,0x1
JMP 0x00152234
LAB_00152226:
XOR ECX,ECX
TEST DIL,DIL
SETS CL
INC RCX
MOV RDI,RCX
LAB_00152234:
ADD RAX,RCX
ADD RSI,RDI
CMP RSI,RDX
JC 0x001521fb
POP RBP
RET
LAB_00152241:
XOR EAX,EAX
RET
|
long my_numcells_eucjpms(int8 param_1,char *param_2,char *param_3)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_2 < param_3) {
lVar2 = 0;
do {
cVar1 = *param_2;
if (cVar1 == -0x72) {
lVar4 = 2;
lVar3 = 1;
}
else if (cVar1 == -0x71) {
lVar3 = 2;
lVar4 = 3;
}
else {
lVar3 = (ulong)(cVar1 < '\0') + 1;
lVar4 = lVar3;
}
lVar2 = lVar2 + lVar3;
param_2 = param_2 + lVar4;
} while (param_2 < param_3);
return lVar2;
}
return 0;
}
| |
21,527 | remove_end_comment | eloqsql/mysys/my_default.c | static char *remove_end_comment(char *ptr)
{
char quote= 0; /* we are inside quote marks */
char escape= 0; /* symbol is protected by escape chagacter */
for (; *ptr; ptr++)
{
if ((*ptr == '\'' || *ptr == '\"') && !escape)
{
if (!quote)
quote= *ptr;
else if (quote == *ptr)
quote= 0;
}
/* We are not inside a string */
if (!quote && *ptr == '#')
{
*ptr= 0;
return ptr;
}
escape= (quote && *ptr == '\\' && !escape);
}
return ptr;
} | O0 | c | remove_end_comment:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4077d
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
je 0x406e5
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x40713
cmpb $0x0, -0x12(%rbp)
jne 0x40713
cmpb $0x0, -0x11(%rbp)
jne 0x406fc
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
jmp 0x40711
movsbl -0x11(%rbp), %eax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x4070f
movb $0x0, -0x11(%rbp)
jmp 0x40711
jmp 0x40713
cmpb $0x0, -0x11(%rbp)
jne 0x40736
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x40736
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x40785
movsbl -0x11(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x13(%rbp)
je 0x40761
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x5c, %ecx
movb %al, -0x13(%rbp)
jne 0x40761
cmpb $0x0, -0x12(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x13(%rbp)
movb -0x13(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x406c0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| remove_end_comment:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_11], 0
mov [rbp+var_12], 0
loc_406C0:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz loc_4077D
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jz short loc_406E5
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 22h ; '"'
jnz short loc_40713
loc_406E5:
cmp [rbp+var_12], 0
jnz short loc_40713
cmp [rbp+var_11], 0
jnz short loc_406FC
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_11], al
jmp short loc_40711
loc_406FC:
movsx eax, [rbp+var_11]
mov rcx, [rbp+var_10]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jnz short loc_4070F
mov [rbp+var_11], 0
loc_4070F:
jmp short $+2
loc_40711:
jmp short $+2
loc_40713:
cmp [rbp+var_11], 0
jnz short loc_40736
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 23h ; '#'
jnz short loc_40736
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp short loc_40785
loc_40736:
movsx ecx, [rbp+var_11]
xor eax, eax
cmp ecx, 0
mov [rbp+var_13], al
jz short loc_40761
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 5Ch ; '\'
mov [rbp+var_13], al
jnz short loc_40761
cmp [rbp+var_12], 0
setnz al
xor al, 0FFh
mov [rbp+var_13], al
loc_40761:
mov al, [rbp+var_13]
and al, 1
movzx eax, al
mov [rbp+var_12], al
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_406C0
loc_4077D:
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_40785:
mov rax, [rbp+var_8]
pop rbp
retn
| char * remove_end_comment(char *a1)
{
char v2; // [rsp+1h] [rbp-13h]
char v3; // [rsp+2h] [rbp-12h]
char v4; // [rsp+3h] [rbp-11h]
v4 = 0;
v3 = 0;
while ( *a1 )
{
if ( (*a1 == 39 || *a1 == 34) && !v3 )
{
if ( v4 )
{
if ( v4 == *a1 )
v4 = 0;
}
else
{
v4 = *a1;
}
}
if ( !v4 && *a1 == 35 )
{
*a1 = 0;
return a1;
}
v2 = 0;
if ( v4 )
{
v2 = 0;
if ( *a1 == 92 )
v2 = ~(v3 != 0);
}
v3 = v2 & 1;
++a1;
}
return a1;
}
| remove_end_comment:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],0x0
MOV byte ptr [RBP + -0x12],0x0
LAB_001406c0:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x0014077d
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JZ 0x001406e5
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x22
JNZ 0x00140713
LAB_001406e5:
CMP byte ptr [RBP + -0x12],0x0
JNZ 0x00140713
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x001406fc
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x11],AL
JMP 0x00140711
LAB_001406fc:
MOVSX EAX,byte ptr [RBP + -0x11]
MOV RCX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JNZ 0x0014070f
MOV byte ptr [RBP + -0x11],0x0
LAB_0014070f:
JMP 0x00140711
LAB_00140711:
JMP 0x00140713
LAB_00140713:
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x00140736
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x23
JNZ 0x00140736
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00140785
LAB_00140736:
MOVSX ECX,byte ptr [RBP + -0x11]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x13],AL
JZ 0x00140761
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x5c
MOV byte ptr [RBP + -0x13],AL
JNZ 0x00140761
CMP byte ptr [RBP + -0x12],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x13],AL
LAB_00140761:
MOV AL,byte ptr [RBP + -0x13]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x12],AL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001406c0
LAB_0014077d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_00140785:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * remove_end_comment(char *param_1)
{
bool bVar1;
bool bVar2;
char local_19;
char *local_18;
local_19 = '\0';
bVar1 = false;
local_18 = param_1;
while( true ) {
if (*local_18 == '\0') {
return local_18;
}
if (((*local_18 == '\'') || (*local_18 == '\"')) && (!bVar1)) {
if (local_19 == '\0') {
local_19 = *local_18;
}
else if (local_19 == *local_18) {
local_19 = '\0';
}
}
if ((local_19 == '\0') && (*local_18 == '#')) break;
bVar2 = false;
if ((local_19 != '\0') && (bVar2 = false, *local_18 == '\\')) {
bVar2 = (bool)(bVar1 ^ 1);
}
bVar1 = bVar2;
local_18 = local_18 + 1;
}
*local_18 = '\0';
return local_18;
}
| |
21,528 | my_atoull | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static unsigned long long my_atoull(const char *str, const char *end_str, int *error)
{
const char *p = str;
const char *end;
unsigned long long ret;
while (p < end_str && isspace(*p))
p++;
ret = my_strtoull(p, end_str - p, &end, error);
while(end < end_str && isspace(*end))
end++;
if(end != end_str)
*error= 1;
return ret;
} | O0 | c | my_atoull:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x31(%rbp)
jae 0x2d95f
callq 0x12450
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x2d968
jmp 0x2d976
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2d92c
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
subq %rax, %rsi
movq -0x18(%rbp), %rcx
leaq -0x28(%rbp), %rdx
callq 0x2c9d0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x32(%rbp)
jae 0x2d9c9
callq 0x12450
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0x2d9d2
jmp 0x2d9e0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2d996
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x2d9f4
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| my_atoull:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
loc_2D92C:
mov rcx, [rbp+var_20]
xor eax, eax
cmp rcx, [rbp+var_10]
mov [rbp+var_31], al
jnb short loc_2D95F
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_20]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
setnz al
mov [rbp+var_31], al
loc_2D95F:
mov al, [rbp+var_31]
test al, 1
jnz short loc_2D968
jmp short loc_2D976
loc_2D968:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_2D92C
loc_2D976:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_20]
sub rsi, rax
mov rcx, [rbp+var_18]
lea rdx, [rbp+var_28]
call my_strtoull
mov [rbp+var_30], rax
loc_2D996:
mov rcx, [rbp+var_28]
xor eax, eax
cmp rcx, [rbp+var_10]
mov [rbp+var_32], al
jnb short loc_2D9C9
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_28]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
setnz al
mov [rbp+var_32], al
loc_2D9C9:
mov al, [rbp+var_32]
test al, 1
jnz short loc_2D9D2
jmp short loc_2D9E0
loc_2D9D2:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_2D996
loc_2D9E0:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_10]
jz short loc_2D9F4
mov rax, [rbp+var_18]
mov dword ptr [rax], 1
loc_2D9F4:
mov rax, [rbp+var_30]
add rsp, 40h
pop rbp
retn
| unsigned long long my_atoull(char *a1, char *a2, _DWORD *a3)
{
bool v4; // [rsp+Eh] [rbp-32h]
bool v5; // [rsp+Fh] [rbp-31h]
unsigned long long v6; // [rsp+10h] [rbp-30h]
char *v7; // [rsp+18h] [rbp-28h] BYREF
char *i; // [rsp+20h] [rbp-20h]
_DWORD *v9; // [rsp+28h] [rbp-18h]
char *v10; // [rsp+30h] [rbp-10h]
char *v11; // [rsp+38h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
for ( i = a1; ; ++i )
{
v5 = 0;
if ( i < v10 )
v5 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *i) & 0x2000) != 0;
if ( !v5 )
break;
}
v6 = my_strtoull(i, v10 - i, &v7, v9);
while ( 1 )
{
v4 = 0;
if ( v7 < v10 )
v4 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *v7) & 0x2000) != 0;
if ( !v4 )
break;
++v7;
}
if ( v7 != v10 )
*v9 = 1;
return v6;
}
| my_atoull:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_0012d92c:
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x10]
MOV byte ptr [RBP + -0x31],AL
JNC 0x0012d95f
CALL 0x00112450
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_0012d95f:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x0012d968
JMP 0x0012d976
LAB_0012d968:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012d92c
LAB_0012d976:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
SUB RSI,RAX
MOV RCX,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0x28]
CALL 0x0012c9d0
MOV qword ptr [RBP + -0x30],RAX
LAB_0012d996:
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x10]
MOV byte ptr [RBP + -0x32],AL
JNC 0x0012d9c9
CALL 0x00112450
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x32],AL
LAB_0012d9c9:
MOV AL,byte ptr [RBP + -0x32]
TEST AL,0x1
JNZ 0x0012d9d2
JMP 0x0012d9e0
LAB_0012d9d2:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0012d996
LAB_0012d9e0:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x0012d9f4
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x1
LAB_0012d9f4:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x40
POP RBP
RET
|
int8 my_atoull(char *param_1,char *param_2,int4 *param_3)
{
ushort **ppuVar1;
int8 uVar2;
bool bVar3;
char *local_30;
char *local_28;
int4 *local_20;
char *local_18;
char *local_10;
local_28 = param_1;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar3 = false;
if (local_28 < local_18) {
ppuVar1 = __ctype_b_loc();
bVar3 = ((*ppuVar1)[(int)*local_28] & 0x2000) != 0;
}
if (!bVar3) break;
local_28 = local_28 + 1;
}
uVar2 = my_strtoull(local_28,(long)local_18 - (long)local_28,&local_30,local_20);
while( true ) {
bVar3 = false;
if (local_30 < local_18) {
ppuVar1 = __ctype_b_loc();
bVar3 = ((*ppuVar1)[(int)*local_30] & 0x2000) != 0;
}
if (!bVar3) break;
local_30 = local_30 + 1;
}
if (local_30 != local_18) {
*local_20 = 1;
}
return uVar2;
}
| |
21,529 | mysql_stmt_store_result_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_stmt_store_result_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_store_result,
(parms->stmt),
parms->stmt->mysql,
int,
r_int)
} | O0 | c | mysql_stmt_store_result_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2acd0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_stmt_store_result_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_stmt_store_result
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_stmt_store_result_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL);
v2[2] = mysql_stmt_store_result(*a1);
result = v2;
*v2 = 0;
return result;
}
| mysql_stmt_store_result_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0012acd0
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_stmt_store_result_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_store_result(*param_1);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
21,530 | mysql_stmt_store_result_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_stmt_store_result_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_store_result,
(parms->stmt),
parms->stmt->mysql,
int,
r_int)
} | O3 | c | mysql_stmt_store_result_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x38(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rbx
callq 0x2117e
movl %eax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_stmt_store_result_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+38h]
mov rax, [rax+480h]
mov rbx, [rax+28h]
call mysql_stmt_store_result
mov [rbx+8], eax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_stmt_store_result_start_internal(long long *a1)
{
long long v1; // rdi
_DWORD *v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v1 + 56) + 1152LL) + 40LL);
result = mysql_stmt_store_result(v1);
v2[2] = result;
*v2 = 0;
return result;
}
| mysql_stmt_store_result_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x0012117e
MOV dword ptr [RBX + 0x8],EAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_stmt_store_result_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_store_result();
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
21,531 | fmt::v10::basic_memory_buffer<wchar_t, 500ul, std::allocator<wchar_t>>::grow(unsigned long) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR20 void grow(size_t size) override {
detail::abort_fuzzing_if(size > 5000);
const size_t max_size = std::allocator_traits<Allocator>::max_size(alloc_);
size_t old_capacity = this->capacity();
size_t new_capacity = old_capacity + old_capacity / 2;
if (size > new_capacity)
new_capacity = size;
else if (new_capacity > max_size)
new_capacity = size > max_size ? size : max_size;
T* old_data = this->data();
T* new_data =
std::allocator_traits<Allocator>::allocate(alloc_, new_capacity);
// Suppress a bogus -Wstringop-overflow in gcc 13.1 (#3481).
detail::assume(this->size() <= new_capacity);
// The following code doesn't throw, so the raw pointer above doesn't leak.
std::uninitialized_copy_n(old_data, this->size(), new_data);
this->set(new_data, new_capacity);
// deallocate must not throw according to the standard, but even if it does,
// the buffer already uses the new storage and will deallocate it in
// destructor.
if (old_data != store_) alloc_.deallocate(old_data, old_capacity);
} | O3 | c | fmt::v10::basic_memory_buffer<wchar_t, 500ul, std::allocator<wchar_t>>::grow(unsigned long):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rbx
movq %rbx, %r15
shrq %r15
addq %rbx, %r15
cmpq %rsi, %r15
jae 0x47c77
movq %rsi, %r15
jmp 0x47c91
movq %r15, %rax
shrq $0x3e, %rax
je 0x47c91
movabsq $0x3fffffffffffffff, %r15 # imm = 0x3FFFFFFFFFFFFFFF
cmpq %r15, %rsi
cmovaq %rsi, %r15
movq 0x8(%r14), %r12
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1a650
movq %rax, %r13
movq 0x10(%r14), %rdx
testq %rdx, %rdx
je 0x47cbd
shlq $0x2, %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x111b0
movq %r13, 0x8(%r14)
movq %r15, 0x18(%r14)
addq $0x20, %r14
cmpq %r14, %r12
je 0x47ce6
shlq $0x2, %rbx
movq %r12, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN3fmt3v1019basic_memory_bufferIjLm32ESaIjEE4growEm:
push r15
push r14
push r13
push r12
push rbx
mov r14, rdi
mov rbx, [rdi+18h]
mov r15, rbx
shr r15, 1
add r15, rbx
cmp r15, rsi
jnb short loc_47C77
mov r15, rsi
jmp short loc_47C91
loc_47C77:
mov rax, r15
shr rax, 3Eh
jz short loc_47C91
mov r15, 3FFFFFFFFFFFFFFFh
cmp rsi, r15
cmova r15, rsi
loc_47C91:
mov r12, [r14+8]
mov rdi, r14
mov rsi, r15
xor edx, edx
call _ZN9__gnu_cxx13new_allocatorIjE8allocateEmPKv; __gnu_cxx::new_allocator<uint>::allocate(ulong,void const*)
mov r13, rax
mov rdx, [r14+10h]
test rdx, rdx
jz short loc_47CBD
shl rdx, 2
mov rdi, r13
mov rsi, r12
call _memmove
loc_47CBD:
mov [r14+8], r13
mov [r14+18h], r15
add r14, 20h ; ' '
cmp r12, r14
jz short loc_47CE6
shl rbx, 2
mov rdi, r12; void *
mov rsi, rbx; unsigned __int64
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp __ZdlPvm; operator delete(void *,ulong)
loc_47CE6:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| void fmt::v10::basic_memory_buffer<unsigned int,32ul,std::allocator<unsigned int>>::grow(
_QWORD *a1,
unsigned long long a2)
{
unsigned long long v2; // rbx
unsigned long long v3; // r15
_QWORD *v4; // r12
long long v5; // rax
long long v6; // r13
v2 = a1[3];
v3 = v2 + (v2 >> 1);
if ( v3 >= a2 )
{
if ( v3 >> 62 )
{
v3 = 0x3FFFFFFFFFFFFFFFLL;
if ( a2 > 0x3FFFFFFFFFFFFFFFLL )
v3 = a2;
}
}
else
{
v3 = a2;
}
v4 = (_QWORD *)a1[1];
v5 = __gnu_cxx::new_allocator<unsigned int>::allocate((long long)a1, v3);
v6 = v5;
if ( a1[2] )
memmove(v5, v4);
a1[1] = v6;
a1[3] = v3;
if ( v4 != a1 + 4 )
operator delete(v4, 4 * v2);
}
| grow:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RDI
MOV RBX,qword ptr [RDI + 0x18]
MOV R15,RBX
SHR R15,0x1
ADD R15,RBX
CMP R15,RSI
JNC 0x00147c77
MOV R15,RSI
JMP 0x00147c91
LAB_00147c77:
MOV RAX,R15
SHR RAX,0x3e
JZ 0x00147c91
MOV R15,0x3fffffffffffffff
CMP RSI,R15
CMOVA R15,RSI
LAB_00147c91:
MOV R12,qword ptr [R14 + 0x8]
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
CALL 0x0011a650
MOV R13,RAX
MOV RDX,qword ptr [R14 + 0x10]
TEST RDX,RDX
JZ 0x00147cbd
SHL RDX,0x2
MOV RDI,R13
MOV RSI,R12
CALL 0x001111b0
LAB_00147cbd:
MOV qword ptr [R14 + 0x8],R13
MOV qword ptr [R14 + 0x18],R15
ADD R14,0x20
CMP R12,R14
JZ 0x00147ce6
SHL RBX,0x2
MOV RDI,R12
MOV RSI,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00111120
LAB_00147ce6:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* fmt::v10::basic_memory_buffer<unsigned int, 32ul, std::allocator<unsigned int> >::grow(unsigned
long) */
void __thiscall
fmt::v10::basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>>::grow
(basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> *this,ulong param_1)
{
ulong uVar1;
basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> *__src;
void *pvVar2;
void *pvVar3;
uVar1 = *(ulong *)(this + 0x18);
pvVar2 = (void *)((uVar1 >> 1) + uVar1);
pvVar3 = (void *)param_1;
if (((param_1 <= pvVar2) && (pvVar3 = pvVar2, (ulong)pvVar2 >> 0x3e != 0)) &&
(pvVar3 = (void *)0x3fffffffffffffff, 0x3fffffffffffffff < param_1)) {
pvVar3 = (void *)param_1;
}
__src = *(basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> **)(this + 8);
pvVar2 = (void *)__gnu_cxx::new_allocator<unsigned_int>::allocate((ulong)this,pvVar3);
if (*(long *)(this + 0x10) != 0) {
memmove(pvVar2,__src,*(long *)(this + 0x10) << 2);
}
*(void **)(this + 8) = pvVar2;
*(void **)(this + 0x18) = pvVar3;
if (__src == this + 0x20) {
return;
}
operator_delete(__src,uVar1 << 2);
return;
}
| |
21,532 | google::protobuf::compiler::cpp::RepeatedStringFieldGenerator::GenerateDestructorCode(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/string_field.cc | void RepeatedStringFieldGenerator::GenerateDestructorCode(
io::Printer* printer) const {
Formatter format(printer, variables_);
format("$field$.~RepeatedPtrField();\n");
} | O3 | cpp | google::protobuf::compiler::cpp::RepeatedStringFieldGenerator::GenerateDestructorCode(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 0xfdc7f(%rip), %rsi # 0x1cb345
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
| _ZNK6google8protobuf8compiler3cpp28RepeatedStringFieldGenerator22GenerateDestructorCodeEPNS0_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, aFieldRepeatedp; "$field$.~RepeatedPtrField();\n"
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::RepeatedStringFieldGenerator::GenerateDestructorCode(
google::protobuf::compiler::cpp::RepeatedStringFieldGenerator *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, "$field$.~RepeatedPtrField();\n");
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;
}
| GenerateDestructorCode:
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_001cd6bf:
LEA RSI,[0x2cb345]
MOV RDI,RSP
CALL 0x00139938
LAB_001cd6ce:
MOV RDI,RBX
CALL 0x0012e5e0
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* google::protobuf::compiler::cpp::RepeatedStringFieldGenerator::GenerateDestructorCode(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::cpp::RepeatedStringFieldGenerator::GenerateDestructorCode
(RepeatedStringFieldGenerator *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 001cd6bf to 001cd6cd has its CatchHandler @ 001cd6de */
Formatter::operator()<>((Formatter *)&local_48,"$field$.~RepeatedPtrField();\n");
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;
}
| |
21,533 | UnloadDroppedFiles | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | void UnloadDroppedFiles(FilePathList files)
{
// WARNING: files pointers are the same as internal ones
if (files.count > 0)
{
for (unsigned int i = 0; i < files.count; i++) RL_FREE(files.paths[i]);
RL_FREE(files.paths);
CORE.Window.dropFileCount = 0;
CORE.Window.dropFilepaths = NULL;
}
} | O0 | c | UnloadDroppedFiles:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
cmpl $0x0, -0xc(%rbp)
jbe 0xd219e
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0xd2180
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0xa640
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xd215d
movq -0x8(%rbp), %rdi
callq 0xa640
movl $0x0, 0x148b9d(%rip) # 0x21ad30
movq $0x0, 0x148b8a(%rip) # 0x21ad28
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| UnloadDroppedFiles:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_8], rsi
cmp dword ptr [rbp+var_10+4], 0
jbe short loc_D219E
mov [rbp+var_14], 0
loc_D215D:
mov eax, [rbp+var_14]
cmp eax, dword ptr [rbp+var_10+4]
jnb short loc_D2180
mov rax, [rbp+var_8]
mov ecx, [rbp+var_14]
mov rdi, [rax+rcx*8]
call _free
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_D215D
loc_D2180:
mov rdi, [rbp+var_8]
call _free
mov cs:dword_21AD30, 0
mov cs:qword_21AD28, 0
loc_D219E:
add rsp, 20h
pop rbp
retn
| long long UnloadDroppedFiles(long long a1, long long a2)
{
long long result; // rax
unsigned int i; // [rsp+Ch] [rbp-14h]
if ( HIDWORD(a1) )
{
for ( i = 0; i < HIDWORD(a1); ++i )
free(*(_QWORD *)(a2 + 8LL * i));
result = free(a2);
dword_21AD30 = 0;
qword_21AD28 = 0LL;
}
return result;
}
| UnloadDroppedFiles:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x8],RSI
CMP dword ptr [RBP + -0xc],0x0
JBE 0x001d219e
MOV dword ptr [RBP + -0x14],0x0
LAB_001d215d:
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0xc]
JNC 0x001d2180
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x14]
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x0010a640
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001d215d
LAB_001d2180:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010a640
MOV dword ptr [0x0031ad30],0x0
MOV qword ptr [0x0031ad28],0x0
LAB_001d219e:
ADD RSP,0x20
POP RBP
RET
|
void UnloadDroppedFiles(int8 param_1,void *param_2)
{
int4 local_1c;
int4 uStack_14;
uStack_14 = (uint)((ulong)param_1 >> 0x20);
if (uStack_14 != 0) {
for (local_1c = 0; local_1c < uStack_14; local_1c = local_1c + 1) {
free(*(void **)((long)param_2 + (ulong)local_1c * 8));
}
free(param_2);
DAT_0031ad30 = 0;
DAT_0031ad28 = 0;
}
return;
}
| |
21,534 | UnloadDroppedFiles | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | void UnloadDroppedFiles(FilePathList files)
{
// WARNING: files pointers are the same as internal ones
if (files.count > 0)
{
for (unsigned int i = 0; i < files.count; i++) RL_FREE(files.paths[i]);
RL_FREE(files.paths);
CORE.Window.dropFileCount = 0;
CORE.Window.dropFilepaths = NULL;
}
} | O3 | c | UnloadDroppedFiles:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
shrq $0x20, %r14
je 0x76694
movq %rsi, %rbx
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0xa650
incq %r15
cmpq %r15, %r14
jne 0x76666
movq %rbx, %rdi
callq 0xa650
movl $0x0, 0xc55e7(%rip) # 0x13bc70
movq $0x0, 0xc55d4(%rip) # 0x13bc68
popq %rbx
popq %r14
popq %r15
retq
| UnloadDroppedFiles:
push r15
push r14
push rbx
mov r14, rdi
shr r14, 20h
jz short loc_76694
mov rbx, rsi
xor r15d, r15d
loc_76666:
mov rdi, [rbx+r15*8]
call _free
inc r15
cmp r14, r15
jnz short loc_76666
mov rdi, rbx
call _free
mov cs:dword_13BC70, 0
mov cs:qword_13BC68, 0
loc_76694:
pop rbx
pop r14
pop r15
retn
| long long UnloadDroppedFiles(unsigned long long a1, long long a2)
{
long long v2; // r15
long long result; // rax
if ( HIDWORD(a1) )
{
v2 = 0LL;
do
free(*(_QWORD *)(a2 + 8 * v2++));
while ( HIDWORD(a1) != v2 );
result = free(a2);
dword_13BC70 = 0;
qword_13BC68 = 0LL;
}
return result;
}
| UnloadDroppedFiles:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDI
SHR R14,0x20
JZ 0x00176694
MOV RBX,RSI
XOR R15D,R15D
LAB_00176666:
MOV RDI,qword ptr [RBX + R15*0x8]
CALL 0x0010a650
INC R15
CMP R14,R15
JNZ 0x00176666
MOV RDI,RBX
CALL 0x0010a650
MOV dword ptr [0x0023bc70],0x0
MOV qword ptr [0x0023bc68],0x0
LAB_00176694:
POP RBX
POP R14
POP R15
RET
|
void UnloadDroppedFiles(ulong param_1,void *param_2)
{
ulong uVar1;
if (param_1 >> 0x20 != 0) {
uVar1 = 0;
do {
free(*(void **)((long)param_2 + uVar1 * 8));
uVar1 = uVar1 + 1;
} while (param_1 >> 0x20 != uVar1);
free(param_2);
DAT_0023bc70 = 0;
DAT_0023bc68 = 0;
}
return;
}
| |
21,535 | ColorTint | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | Color ColorTint(Color color, Color tint)
{
Color result = color;
unsigned char r = (unsigned char)(((int)color.r*(int)tint.r)/255);
unsigned char g = (unsigned char)(((int)color.g*(int)tint.g)/255);
unsigned char b = (unsigned char)(((int)color.b*(int)tint.b)/255);
unsigned char a = (unsigned char)(((int)color.a*(int)tint.a)/255);
result.r = r;
result.g = g;
result.b = b;
result.a = a;
return result;
} | O0 | c | ColorTint:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movzbl -0x8(%rbp), %eax
movzbl -0xc(%rbp), %ecx
imull %ecx, %eax
movl $0xff, %ecx
cltd
idivl %ecx
movb %al, -0xd(%rbp)
movzbl -0x7(%rbp), %eax
movzbl -0xb(%rbp), %ecx
imull %ecx, %eax
movl $0xff, %ecx
cltd
idivl %ecx
movb %al, -0xe(%rbp)
movzbl -0x6(%rbp), %eax
movzbl -0xa(%rbp), %ecx
imull %ecx, %eax
movl $0xff, %ecx
cltd
idivl %ecx
movb %al, -0xf(%rbp)
movzbl -0x5(%rbp), %eax
movzbl -0x9(%rbp), %ecx
imull %ecx, %eax
movl $0xff, %ecx
cltd
idivl %ecx
movb %al, -0x10(%rbp)
movb -0xd(%rbp), %al
movb %al, -0x4(%rbp)
movb -0xe(%rbp), %al
movb %al, -0x3(%rbp)
movb -0xf(%rbp), %al
movb %al, -0x2(%rbp)
movb -0x10(%rbp), %al
movb %al, -0x1(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ColorTint:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov [rbp+var_C], esi
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
movzx eax, byte ptr [rbp+var_8]
movzx ecx, byte ptr [rbp+var_C]
imul eax, ecx
mov ecx, 0FFh
cdq
idiv ecx
mov [rbp+var_D], al
movzx eax, byte ptr [rbp+var_8+1]
movzx ecx, byte ptr [rbp+var_C+1]
imul eax, ecx
mov ecx, 0FFh
cdq
idiv ecx
mov [rbp+var_E], al
movzx eax, byte ptr [rbp+var_8+2]
movzx ecx, byte ptr [rbp+var_C+2]
imul eax, ecx
mov ecx, 0FFh
cdq
idiv ecx
mov [rbp+var_F], al
movzx eax, byte ptr [rbp+var_8+3]
movzx ecx, byte ptr [rbp+var_C+3]
imul eax, ecx
mov ecx, 0FFh
cdq
idiv ecx
mov [rbp+var_10], al
mov al, [rbp+var_D]
mov byte ptr [rbp+var_4], al
mov al, [rbp+var_E]
mov byte ptr [rbp+var_4+1], al
mov al, [rbp+var_F]
mov byte ptr [rbp+var_4+2], al
mov al, [rbp+var_10]
mov byte ptr [rbp+var_4+3], al
mov eax, [rbp+var_4]
pop rbp
retn
| long long ColorTint(int a1, int a2)
{
unsigned int v3; // [rsp+Ch] [rbp-4h]
LOBYTE(v3) = (unsigned __int8)a2 * (unsigned __int8)a1 / 255;
BYTE1(v3) = BYTE1(a2) * BYTE1(a1) / 255;
BYTE2(v3) = BYTE2(a2) * BYTE2(a1) / 255;
HIBYTE(v3) = HIBYTE(a2) * HIBYTE(a1) / 255;
return v3;
}
| |||
21,536 | ColorTint | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | Color ColorTint(Color color, Color tint)
{
Color result = color;
unsigned char r = (unsigned char)(((int)color.r*(int)tint.r)/255);
unsigned char g = (unsigned char)(((int)color.g*(int)tint.g)/255);
unsigned char b = (unsigned char)(((int)color.b*(int)tint.b)/255);
unsigned char a = (unsigned char)(((int)color.a*(int)tint.a)/255);
result.r = r;
result.g = g;
result.b = b;
result.a = a;
return result;
} | O2 | c | ColorTint:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %eax
movl %edi, %r14d
shrl $0x8, %r14d
movl %edi, %ebx
shrl $0x10, %ebx
movl %edi, %r10d
shrl $0x18, %r10d
movl %esi, %r8d
shrl $0x8, %r8d
shrl $0x10, %esi
movl %eax, %ecx
shrl $0x18, %ecx
movl $0xff, %r9d
andl %r9d, %edi
andl %r9d, %eax
imull %edi, %eax
movw $0xff, %bp
xorl %edx, %edx
divw %bp
movzwl %ax, %r11d
andl %r9d, %r14d
andl %r9d, %r8d
imull %r14d, %r8d
movl %r8d, %eax
xorl %edx, %edx
divw %bp
movl %eax, %edi
andl %r9d, %ebx
andl %r9d, %esi
imull %ebx, %esi
movl %esi, %eax
xorl %edx, %edx
divw %bp
movl %eax, %esi
imull %r10d, %ecx
movl %ecx, %eax
xorl %edx, %edx
divw %bp
shll $0x18, %eax
andl %r9d, %esi
shll $0x10, %esi
orl %esi, %eax
shll $0x8, %edi
movzwl %di, %ecx
orl %ecx, %eax
addl %r11d, %eax
popq %rbx
popq %r14
popq %rbp
retq
| ColorTint:
push rbp
push r14
push rbx
mov eax, esi
mov r14d, edi
shr r14d, 8
mov ebx, edi
shr ebx, 10h
mov r10d, edi
shr r10d, 18h
mov r8d, esi
shr r8d, 8
shr esi, 10h
mov ecx, eax
shr ecx, 18h
mov r9d, 0FFh
and edi, r9d
and eax, r9d
imul eax, edi
mov bp, 0FFh
xor edx, edx
div bp
movzx r11d, ax
and r14d, r9d
and r8d, r9d
imul r8d, r14d
mov eax, r8d
xor edx, edx
div bp
mov edi, eax
and ebx, r9d
and esi, r9d
imul esi, ebx
mov eax, esi
xor edx, edx
div bp
mov esi, eax
imul ecx, r10d
mov eax, ecx
xor edx, edx
div bp
shl eax, 18h
and esi, r9d
shl esi, 10h
or eax, esi
shl edi, 8
movzx ecx, di
or eax, ecx
add eax, r11d
pop rbx
pop r14
pop rbp
retn
| long long ColorTint(unsigned int a1, unsigned int a2)
{
int v2; // eax
v2 = HIBYTE(a1) * HIBYTE(a2);
LOWORD(v2) = (unsigned __int16)(HIBYTE(a1) * HIBYTE(a2)) / 0xFFu;
return (unsigned __int16)((unsigned __int8)a1 * (unsigned __int8)a2) / 0xFFu
+ ((unsigned __int16)(((unsigned __int16)(BYTE1(a1) * BYTE1(a2)) / 0xFFu) << 8) | ((unsigned __int8)((unsigned __int16)(BYTE2(a1) * BYTE2(a2)) / 0xFFu) << 16) | (v2 << 24));
}
| ColorTint:
PUSH RBP
PUSH R14
PUSH RBX
MOV EAX,ESI
MOV R14D,EDI
SHR R14D,0x8
MOV EBX,EDI
SHR EBX,0x10
MOV R10D,EDI
SHR R10D,0x18
MOV R8D,ESI
SHR R8D,0x8
SHR ESI,0x10
MOV ECX,EAX
SHR ECX,0x18
MOV R9D,0xff
AND EDI,R9D
AND EAX,R9D
IMUL EAX,EDI
MOV BP,0xff
XOR EDX,EDX
DIV BP
MOVZX R11D,AX
AND R14D,R9D
AND R8D,R9D
IMUL R8D,R14D
MOV EAX,R8D
XOR EDX,EDX
DIV BP
MOV EDI,EAX
AND EBX,R9D
AND ESI,R9D
IMUL ESI,EBX
MOV EAX,ESI
XOR EDX,EDX
DIV BP
MOV ESI,EAX
IMUL ECX,R10D
MOV EAX,ECX
XOR EDX,EDX
DIV BP
SHL EAX,0x18
AND ESI,R9D
SHL ESI,0x10
OR EAX,ESI
SHL EDI,0x8
MOVZX ECX,DI
OR EAX,ECX
ADD EAX,R11D
POP RBX
POP R14
POP RBP
RET
|
int ColorTint(uint param_1,uint param_2)
{
return (((param_2 >> 0x18) * (param_1 >> 0x18)) / 0xff << 0x18 |
(((param_2 >> 0x10 & 0xff) * (param_1 >> 0x10 & 0xff)) / 0xff & 0xff) << 0x10 |
(((param_2 >> 8 & 0xff) * (param_1 >> 8 & 0xff)) / 0xff & 0xff) << 8) +
((param_2 & 0xff) * (param_1 & 0xff)) / 0xff;
}
| |
21,537 | ColorTint | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | Color ColorTint(Color color, Color tint)
{
Color result = color;
unsigned char r = (unsigned char)(((int)color.r*(int)tint.r)/255);
unsigned char g = (unsigned char)(((int)color.g*(int)tint.g)/255);
unsigned char b = (unsigned char)(((int)color.b*(int)tint.b)/255);
unsigned char a = (unsigned char)(((int)color.a*(int)tint.a)/255);
result.r = r;
result.g = g;
result.b = b;
result.a = a;
return result;
} | O3 | c | ColorTint:
movl %edi, %eax
shrl $0x8, %eax
movl %edi, %ecx
shrl $0x10, %ecx
movl %edi, %edx
shrl $0x18, %edx
movl %esi, %r8d
shrl $0x8, %r8d
movl %esi, %r9d
shrl $0x10, %r9d
movl %esi, %r10d
shrl $0x18, %r10d
imull %edx, %r10d
movl $0xff, %r11d
andl %r11d, %edi
andl %r11d, %esi
imull %edi, %esi
imull $0x8081, %esi, %edx # imm = 0x8081
shrl $0x17, %edx
andl %r11d, %eax
andl %r11d, %r8d
imull %eax, %r8d
imull $0x8081, %r8d, %eax # imm = 0x8081
andl %r11d, %ecx
andl %r11d, %r9d
imull %ecx, %r9d
imull $0x8081, %r9d, %ecx # imm = 0x8081
imull $0x10102, %r10d, %esi # imm = 0x10102
andl $0xff000000, %esi # imm = 0xFF000000
shrl $0x7, %ecx
andl $0xff0000, %ecx # imm = 0xFF0000
orl %esi, %ecx
shrl $0xf, %eax
andl $0xff00, %eax # imm = 0xFF00
orl %ecx, %eax
addl %edx, %eax
retq
| ColorTint:
mov eax, edi
shr eax, 8
mov ecx, edi
shr ecx, 10h
mov edx, edi
shr edx, 18h
mov r8d, esi
shr r8d, 8
mov r9d, esi
shr r9d, 10h
mov r10d, esi
shr r10d, 18h
imul r10d, edx
mov r11d, 0FFh
and edi, r11d
and esi, r11d
imul esi, edi
imul edx, esi, 8081h
shr edx, 17h
and eax, r11d
and r8d, r11d
imul r8d, eax
imul eax, r8d, 8081h
and ecx, r11d
and r9d, r11d
imul r9d, ecx
imul ecx, r9d, 8081h
imul esi, r10d, 10102h
and esi, 0FF000000h
shr ecx, 7
and ecx, 0FF0000h
or ecx, esi
shr eax, 0Fh
and eax, 0FF00h
or eax, ecx
add eax, edx
retn
| long long ColorTint(unsigned int a1, unsigned int a2)
{
return ((32897 * (unsigned __int8)a1 * (unsigned int)(unsigned __int8)a2) >> 23)
+ ((65794 * HIBYTE(a1) * HIBYTE(a2)) & 0xFF000000 | ((32897 * BYTE2(a1) * (unsigned int)BYTE2(a2)) >> 7) & 0xFF0000 | ((32897 * BYTE1(a1) * (unsigned int)BYTE1(a2)) >> 15) & 0xFF00);
}
| ColorTint:
MOV EAX,EDI
SHR EAX,0x8
MOV ECX,EDI
SHR ECX,0x10
MOV EDX,EDI
SHR EDX,0x18
MOV R8D,ESI
SHR R8D,0x8
MOV R9D,ESI
SHR R9D,0x10
MOV R10D,ESI
SHR R10D,0x18
IMUL R10D,EDX
MOV R11D,0xff
AND EDI,R11D
AND ESI,R11D
IMUL ESI,EDI
IMUL EDX,ESI,0x8081
SHR EDX,0x17
AND EAX,R11D
AND R8D,R11D
IMUL R8D,EAX
IMUL EAX,R8D,0x8081
AND ECX,R11D
AND R9D,R11D
IMUL R9D,ECX
IMUL ECX,R9D,0x8081
IMUL ESI,R10D,0x10102
AND ESI,0xff000000
SHR ECX,0x7
AND ECX,0xff0000
OR ECX,ESI
SHR EAX,0xf
AND EAX,0xff00
OR EAX,ECX
ADD EAX,EDX
RET
|
int ColorTint(uint param_1,uint param_2)
{
return ((param_2 >> 8 & 0xff) * (param_1 >> 8 & 0xff) * 0x8081 >> 0xf & 0xff00 |
(param_2 >> 0x10 & 0xff) * (param_1 >> 0x10 & 0xff) * 0x8081 >> 7 & 0xff0000 |
(param_2 >> 0x18) * (param_1 >> 0x18) * 0x10102 & 0xff000000) +
((param_2 & 0xff) * (param_1 & 0xff)) / 0xff;
}
| |
21,538 | tree_walk_left_root_right | eloqsql/mysys/tree.c | static int tree_walk_left_root_right(TREE *tree, TREE_ELEMENT *element, tree_walk_action action, void *argument)
{
int error;
if (element->left) /* Not null_element */
{
if ((error=tree_walk_left_root_right(tree,element->left,action,
argument)) == 0 &&
(error=(*action)(ELEMENT_KEY(tree,element),
(element_count) element->count,
argument)) == 0)
error=tree_walk_left_root_right(tree,element->right,action,argument);
return error;
}
return 0;
} | O3 | c | tree_walk_left_root_right:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq (%rsi), %rsi
xorl %eax, %eax
testq %rsi, %rsi
je 0x2d901
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r13
movl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
movq %r13, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2d88f
testl %eax, %eax
jne 0x2d901
movl 0x208(%r13), %edi
testq %rdi, %rdi
je 0x2d8db
addq %r12, %rdi
jmp 0x2d8e0
movq 0x18(%r12), %rdi
movl 0x10(%r12), %esi
andl %ebx, %esi
movq %r14, %rdx
callq *%r15
testl %eax, %eax
jne 0x2d901
movq 0x8(%r12), %r12
movq (%r12), %rsi
testq %rsi, %rsi
jne 0x2d8b8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| tree_walk_left_root_right:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rsi
mov rsi, [rsi]
xor eax, eax
test rsi, rsi
jz short loc_2D901
mov r14, rcx
mov r15, rdx
mov r13, rdi
mov ebx, 7FFFFFFFh
loc_2D8B8:
mov rdi, r13
mov rdx, r15
mov rcx, r14
call tree_walk_left_root_right
test eax, eax
jnz short loc_2D901
mov edi, [r13+208h]
test rdi, rdi
jz short loc_2D8DB
add rdi, r12
jmp short loc_2D8E0
loc_2D8DB:
mov rdi, [r12+18h]
loc_2D8E0:
mov esi, [r12+10h]
and esi, ebx
mov rdx, r14
call r15
test eax, eax
jnz short loc_2D901
mov r12, [r12+8]
mov rsi, [r12]
test rsi, rsi
jnz short loc_2D8B8
xor eax, eax
loc_2D901:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long tree_walk_left_root_right(
long long a1,
long long *a2,
long long ( *a3)(long long *, long long, long long),
long long a4)
{
long long *v4; // r12
long long v5; // rsi
long long result; // rax
long long *v10; // rdi
v4 = a2;
v5 = *a2;
result = 0LL;
if ( v5 )
{
while ( 1 )
{
result = tree_walk_left_root_right(a1, v5, a3, a4);
if ( (_DWORD)result )
break;
v10 = *(_DWORD *)(a1 + 520) ? (long long *)((char *)v4 + *(unsigned int *)(a1 + 520)) : (long long *)v4[3];
result = a3(v10, v4[2] & 0x7FFFFFFF, a4);
if ( (_DWORD)result )
break;
v4 = (long long *)v4[1];
v5 = *v4;
if ( !*v4 )
return 0LL;
}
}
return result;
}
| tree_walk_left_root_right:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RSI
MOV RSI,qword ptr [RSI]
XOR EAX,EAX
TEST RSI,RSI
JZ 0x0012d901
MOV R14,RCX
MOV R15,RDX
MOV R13,RDI
MOV EBX,0x7fffffff
LAB_0012d8b8:
MOV RDI,R13
MOV RDX,R15
MOV RCX,R14
CALL 0x0012d88f
TEST EAX,EAX
JNZ 0x0012d901
MOV EDI,dword ptr [R13 + 0x208]
TEST RDI,RDI
JZ 0x0012d8db
ADD RDI,R12
JMP 0x0012d8e0
LAB_0012d8db:
MOV RDI,qword ptr [R12 + 0x18]
LAB_0012d8e0:
MOV ESI,dword ptr [R12 + 0x10]
AND ESI,EBX
MOV RDX,R14
CALL R15
TEST EAX,EAX
JNZ 0x0012d901
MOV R12,qword ptr [R12 + 0x8]
MOV RSI,qword ptr [R12]
TEST RSI,RSI
JNZ 0x0012d8b8
XOR EAX,EAX
LAB_0012d901:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 tree_walk_left_root_right(long param_1,long *param_2,code *param_3,int8 param_4)
{
int8 uVar1;
long lVar2;
lVar2 = *param_2;
while( true ) {
if (lVar2 == 0) {
return 0;
}
uVar1 = tree_walk_left_root_right(param_1,lVar2,param_3,param_4);
if ((int)uVar1 != 0) break;
if ((ulong)*(uint *)(param_1 + 0x208) == 0) {
lVar2 = param_2[3];
}
else {
lVar2 = (ulong)*(uint *)(param_1 + 0x208) + (long)param_2;
}
uVar1 = (*param_3)(lVar2,*(uint *)(param_2 + 2) & 0x7fffffff,param_4);
if ((int)uVar1 != 0) {
return uVar1;
}
param_2 = (long *)param_2[1];
lVar2 = *param_2;
}
return uVar1;
}
| |
21,539 | rak_value_free | fabiosvm[P]rak/src/value.c | void rak_value_free(RakValue val)
{
switch (val.type)
{
case RAK_TYPE_NIL:
case RAK_TYPE_BOOL:
case RAK_TYPE_NUMBER:
break;
case RAK_TYPE_STRING:
rak_string_free(rak_as_string(val));
break;
case RAK_TYPE_ARRAY:
rak_array_free(rak_as_array(val));
break;
case RAK_TYPE_RANGE:
rak_range_free(rak_as_range(val));
break;
case RAK_TYPE_RECORD:
rak_record_free(rak_as_record(val));
break;
case RAK_TYPE_CLOSURE:
rak_closure_free(rak_as_closure(val));
break;
}
} | O1 | c | rak_value_free:
movq %rsi, -0x8(%rsp)
addl $-0x3, %edi
cmpl $0x4, %edi
ja 0x84eb
leaq 0x2428(%rip), %rax # 0xa8d8
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq -0x8(%rsp), %rdi
jmp 0x81d5
movq -0x8(%rsp), %rdi
jmp 0x3ae0
movq -0x8(%rsp), %rdi
jmp 0x7806
movq -0x8(%rsp), %rdi
jmp 0x7aaa
movq -0x8(%rsp), %rdi
jmp 0x2483
retq
| rak_value_free:
mov [rsp+var_8], rsi
add edi, 0FFFFFFFDh; switch 5 cases
cmp edi, 4
ja short def_84B7; jumptable 00000000000084B7 default case
lea rax, jpt_84B7
movsxd rcx, ds:(jpt_84B7 - 0A8D8h)[rax+rdi*4]
add rcx, rax
jmp rcx; switch jump
loc_84B9:
mov rdi, [rsp+var_8]; jumptable 00000000000084B7 case 3
jmp rak_string_free
loc_84C3:
mov rdi, [rsp+var_8]; jumptable 00000000000084B7 case 7
jmp rak_closure_free
loc_84CD:
mov rdi, [rsp+var_8]; jumptable 00000000000084B7 case 5
jmp rak_range_free
loc_84D7:
mov rdi, [rsp+var_8]; jumptable 00000000000084B7 case 6
jmp rak_record_free
loc_84E1:
mov rdi, [rsp+var_8]; jumptable 00000000000084B7 case 4
jmp rak_array_free
def_84B7:
retn; jumptable 00000000000084B7 default case
| long long rak_value_free(int a1, long long a2)
{
long long result; // rax
switch ( a1 )
{
case 3:
result = rak_string_free(a2);
break;
case 4:
result = rak_array_free(a2);
break;
case 5:
result = rak_range_free(a2);
break;
case 6:
result = rak_record_free(a2);
break;
case 7:
result = rak_closure_free(a2);
break;
default:
return result;
}
return result;
}
| rak_value_free:
MOV qword ptr [RSP + -0x8],RSI
ADD EDI,-0x3
CMP EDI,0x4
JA 0x001084eb
LEA RAX,[0x10a8d8]
MOVSXD RCX,dword ptr [RAX + RDI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_3:
MOV RDI,qword ptr [RSP + -0x8]
JMP 0x001081d5
caseD_7:
MOV RDI,qword ptr [RSP + -0x8]
JMP 0x00103ae0
caseD_5:
MOV RDI,qword ptr [RSP + -0x8]
JMP 0x00107806
caseD_6:
MOV RDI,qword ptr [RSP + -0x8]
JMP 0x00107aaa
caseD_4:
MOV RDI,qword ptr [RSP + -0x8]
JMP 0x00102483
default:
RET
|
void rak_value_free(int4 param_1,void *param_2)
{
switch(param_1) {
case 3:
rak_string_free(param_2);
return;
case 4:
rak_array_free(param_2);
return;
case 5:
rak_range_free(param_2);
return;
case 6:
rak_record_free(param_2);
return;
case 7:
rak_closure_free(param_2);
return;
default:
return;
}
}
| |
21,540 | rak_value_free | fabiosvm[P]rak/src/value.c | void rak_value_free(RakValue val)
{
switch (val.type)
{
case RAK_TYPE_NIL:
case RAK_TYPE_BOOL:
case RAK_TYPE_NUMBER:
break;
case RAK_TYPE_STRING:
rak_string_free(rak_as_string(val));
break;
case RAK_TYPE_ARRAY:
rak_array_free(rak_as_array(val));
break;
case RAK_TYPE_RANGE:
rak_range_free(rak_as_range(val));
break;
case RAK_TYPE_RECORD:
rak_record_free(rak_as_record(val));
break;
case RAK_TYPE_CLOSURE:
rak_closure_free(rak_as_closure(val));
break;
}
} | O3 | c | rak_value_free:
addl $-0x3, %edi
cmpl $0x4, %edi
ja 0x8234
leaq 0x26d5(%rip), %rax # 0xa8d8
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rsi, %rdi
jmp 0x7f2d
movq %rsi, %rdi
jmp 0x3a58
movq %rsi, %rdi
jmp 0x75aa
movq %rsi, %rdi
jmp 0x784e
movq %rsi, %rdi
jmp 0x2473
retq
| rak_value_free:
add edi, 0FFFFFFFDh; switch 5 cases
cmp edi, 4
ja short def_820A; jumptable 000000000000820A default case
lea rax, jpt_820A
movsxd rcx, ds:(jpt_820A - 0A8D8h)[rax+rdi*4]
add rcx, rax
jmp rcx; switch jump
loc_820C:
mov rdi, rsi; jumptable 000000000000820A case 3
jmp rak_string_free
loc_8214:
mov rdi, rsi; jumptable 000000000000820A case 7
jmp rak_closure_free
loc_821C:
mov rdi, rsi; jumptable 000000000000820A case 5
jmp rak_range_free
loc_8224:
mov rdi, rsi; jumptable 000000000000820A case 6
jmp rak_record_free
loc_822C:
mov rdi, rsi; jumptable 000000000000820A case 4
jmp rak_array_free
def_820A:
retn; jumptable 000000000000820A default case
| long long rak_value_free(int a1, long long a2)
{
long long result; // rax
switch ( a1 )
{
case 3:
result = rak_string_free(a2);
break;
case 4:
result = rak_array_free(a2);
break;
case 5:
result = rak_range_free(a2);
break;
case 6:
result = rak_record_free(a2);
break;
case 7:
result = rak_closure_free(a2);
break;
default:
return result;
}
return result;
}
| rak_value_free:
ADD EDI,-0x3
CMP EDI,0x4
JA 0x00108234
LEA RAX,[0x10a8d8]
MOVSXD RCX,dword ptr [RAX + RDI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_3:
MOV RDI,RSI
JMP 0x00107f2d
caseD_7:
MOV RDI,RSI
JMP 0x00103a58
caseD_5:
MOV RDI,RSI
JMP 0x001075aa
caseD_6:
MOV RDI,RSI
JMP 0x0010784e
caseD_4:
MOV RDI,RSI
JMP 0x00102473
default:
RET
|
void rak_value_free(int4 param_1,void *param_2)
{
switch(param_1) {
case 3:
rak_string_free(param_2);
return;
case 4:
rak_array_free(param_2);
return;
case 5:
rak_range_free(param_2);
return;
case 6:
rak_record_free(param_2);
return;
case 7:
rak_closure_free(param_2);
return;
default:
return;
}
}
| |
21,541 | fs_get_cache_directory[abi:cxx11]() | monkey531[P]llama/common/common.cpp | std::string fs_get_cache_directory() {
std::string cache_directory = "";
auto ensure_trailing_slash = [](std::string p) {
// Make sure to add trailing slash
if (p.back() != DIRECTORY_SEPARATOR) {
p += DIRECTORY_SEPARATOR;
}
return p;
};
if (getenv("LLAMA_CACHE")) {
cache_directory = std::getenv("LLAMA_CACHE");
} else {
#ifdef __linux__
if (std::getenv("XDG_CACHE_HOME")) {
cache_directory = std::getenv("XDG_CACHE_HOME");
} else {
cache_directory = std::getenv("HOME") + std::string("/.cache/");
}
#elif defined(__APPLE__)
cache_directory = std::getenv("HOME") + std::string("/Library/Caches/");
#elif defined(_WIN32)
cache_directory = std::getenv("LOCALAPPDATA");
#endif // __linux__
cache_directory = ensure_trailing_slash(cache_directory);
cache_directory += "llama.cpp";
}
return ensure_trailing_slash(cache_directory);
} | O1 | cpp | fs_get_cache_directory[abi:cxx11]():
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x8a424(%rip), %rdx # 0xaf0ee
leaq 0x20(%rsp), %rdi
movq %rdx, %rsi
callq 0x20d42
leaq 0x8c180(%rip), %rdi # 0xb0e5e
callq 0x1a8f0
testq %rax, %rax
je 0x24d14
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq 0x8(%r15), %r12
movq %rax, %rdi
callq 0x1a330
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x1ab90
jmp 0x24f02
leaq 0x8c14f(%rip), %rdi # 0xb0e6a
callq 0x1a8f0
testq %rax, %rax
je 0x24d51
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq 0x8(%r15), %r12
movq %rax, %rdi
callq 0x1a330
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x1ab90
jmp 0x24e31
leaq 0x8c11c(%rip), %rdi # 0xb0e74
callq 0x1a8f0
movq %rax, %r14
leaq 0x90(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8c106(%rip), %rsi # 0xb0e79
leaq 0x8c107(%rip), %rdx # 0xb0e81
leaq 0x80(%rsp), %rdi
callq 0x20d42
movq %r14, %rdi
callq 0x1a330
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x1a850
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x24dce
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x24dd6
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x1a900
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x24e14
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a740
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x24e31
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x1a740
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x21694
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0x24e6c
movq %rsp, %rdi
movl $0x2f, %esi
callq 0x1a5f0
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsp), %rax
cmpq %r15, %rax
je 0x24e90
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x24e99
movups (%r15), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rsp), %rax
leaq 0x60(%rsp), %r14
movq %rax, 0x8(%r14)
movq %r15, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x1a900
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x24edb
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a740
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x24ef1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a740
leaq 0x8bf8a(%rip), %rsi # 0xb0e82
leaq 0x20(%rsp), %rdi
callq 0x1ae70
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x21694
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0x24f42
leaq 0x40(%rsp), %rdi
movl $0x2f, %esi
callq 0x1a5f0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x40(%rsp), %rcx
cmpq %r14, %rcx
je 0x24f61
movq %rcx, (%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x24f68
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r14, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x24f9b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a740
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x24fff
movq 0x90(%rsp), %rsi
jmp 0x24ff2
jmp 0x24ffc
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x24fff
movq 0x10(%rsp), %rsi
jmp 0x24ff2
jmp 0x24ffc
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x24fff
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x24fff
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x25016
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a740
movq %rbx, %rdi
callq 0x1ad30
| _Z22fs_get_cache_directoryB5cxx11v:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A0h
mov rbx, rdi
lea r13, [rsp+0C8h+var_98]
mov [r13-10h], r13
lea rdx, aSUnableToOpenT+2Bh; ""
lea rdi, [rsp+0C8h+var_A8]
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, aLlamaCache; "LLAMA_CACHE"
call _getenv
test rax, rax
jz short loc_24D14
mov r14, rax
lea r15, [rsp+0C8h+var_A8]
mov r12, [r15+8]
mov rdi, rax
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_24F02
loc_24D14:
lea rdi, aXdgCacheHome; "XDG_CACHE_HOME"
call _getenv
test rax, rax
jz short loc_24D51
mov r14, rax
lea r15, [rsp+0C8h+var_A8]
mov r12, [r15+8]
mov rdi, rax
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_24E31
loc_24D51:
lea rdi, aXdgCacheHome+0Ah; "HOME"
call _getenv
mov r14, rax
lea r15, [rsp+0C8h+var_38]
mov [r15-10h], r15
lea rsi, aCache; "/.cache/"
lea rdx, aCache+8; ""
lea rdi, [rsp+0C8h+var_48]
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, r14
call _strlen
lea rdi, [rsp+0C8h+var_48]
xor esi, esi
xor edx, edx
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0C8h+var_58]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_24DCE
mov [rsp+0C8h+var_68], rdx
mov rdx, [rcx]
mov [rsp+0C8h+var_58], rdx
jmp short loc_24DD6
loc_24DCE:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_24DD6:
mov rdx, [rax+8]
lea r14, [rsp+0C8h+var_68]
mov [r14+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+0C8h+var_A8]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_24E14
mov rsi, [rsp+0C8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24E14:
mov rdi, [rsp+0C8h+var_48]; void *
cmp rdi, r15
jz short loc_24E31
mov rsi, [rsp+0C8h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24E31:
lea r15, [rsp+0C8h+var_B8]
mov [r15-10h], r15
mov rsi, [rsp+0C8h+var_A8]
mov rdx, [rsp+0C8h+var_A0]
add rdx, rsi
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0C8h+var_C8]
mov rcx, [rsp+0C8h+var_C0]
cmp byte ptr [rax+rcx-1], 2Fh ; '/'
jz short loc_24E6C
mov rdi, rsp
mov esi, 2Fh ; '/'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_24E6C:
lea r12, [rsp+0C8h+var_58]
mov [r12-10h], r12
mov rax, [rsp+0C8h+var_C8]
cmp rax, r15
jz short loc_24E90
mov [rsp+0C8h+var_68], rax
mov rax, [rsp+0C8h+var_B8]
mov [rsp+0C8h+var_58], rax
jmp short loc_24E99
loc_24E90:
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [r12], xmm0
loc_24E99:
mov rax, [rsp+0C8h+var_C0]
lea r14, [rsp+0C8h+var_68]
mov [r14+8], rax
mov [rsp+0C8h+var_C8], r15
mov [rsp+0C8h+var_C0], 0
mov byte ptr [rsp+0C8h+var_B8], 0
lea rdi, [rsp+0C8h+var_A8]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_24EDB
mov rsi, [rsp+0C8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24EDB:
mov rdi, [rsp+0C8h+var_C8]; void *
cmp rdi, r15
jz short loc_24EF1
mov rsi, [rsp+0C8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24EF1:
lea rsi, aLlamaCpp; "llama.cpp"
lea rdi, [rsp+0C8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_24F02:
lea r14, [rsp+0C8h+var_78]
mov [r14-10h], r14
mov rsi, [rsp+0C8h+var_A8]
mov rdx, [rsp+0C8h+var_A0]
add rdx, rsi
lea rdi, [rsp+0C8h+var_88]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0C8h+var_88]
mov rcx, [rsp+0C8h+var_80]
cmp byte ptr [rax+rcx-1], 2Fh ; '/'
jz short loc_24F42
lea rdi, [rsp+0C8h+var_88]
mov esi, 2Fh ; '/'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_24F42:
lea rax, [rbx+10h]
mov [rbx], rax
mov rcx, [rsp+0C8h+var_88]
cmp rcx, r14
jz short loc_24F61
mov [rbx], rcx
mov rax, [rsp+0C8h+var_78]
mov [rbx+10h], rax
jmp short loc_24F68
loc_24F61:
movups xmm0, xmmword ptr [r14]
movups xmmword ptr [rax], xmm0
loc_24F68:
mov rax, [rsp+0C8h+var_80]
mov [rbx+8], rax
mov [rsp+0C8h+var_88], r14
mov [rsp+0C8h+var_80], 0
mov byte ptr [rsp+0C8h+var_78], 0
mov rdi, [rsp+0C8h+var_A8]; void *
cmp rdi, r13
jz short loc_24F9B
mov rsi, [rsp+0C8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24F9B:
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_78]
cmp rdi, r15
jz short loc_24FFF
mov rsi, [rsp+arg_88]
jmp short loc_24FF2
jmp short loc_24FFC
mov rbx, rax
mov rdi, [rsp+0]
cmp rdi, r15
jz short loc_24FFF
mov rsi, [rsp+arg_8]
jmp short loc_24FF2
jmp short loc_24FFC
mov rbx, rax
mov rdi, [rsp+arg_38]; void *
cmp rdi, r14
jz short loc_24FFF
mov rsi, [rsp+arg_48]
loc_24FF2:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_24FFF
loc_24FFC:
mov rbx, rax
loc_24FFF:
mov rdi, [rsp+arg_18]; void *
cmp rdi, r13
jz short loc_25016
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_25016:
mov rdi, rbx
call __Unwind_Resume
| long long fs_get_cache_directory[abi:cxx11](long long a1)
{
long long v1; // rax
long long v2; // r14
long long v3; // r12
long long v4; // rax
long long v5; // rax
long long v6; // r14
long long v7; // r12
long long v8; // rax
long long v9; // r14
long long v10; // rax
long long v11; // rax
__int128 *v12; // rcx
void *v14; // [rsp+0h] [rbp-C8h] BYREF
long long v15; // [rsp+8h] [rbp-C0h]
__int128 v16; // [rsp+10h] [rbp-B8h] BYREF
void *v17; // [rsp+20h] [rbp-A8h] BYREF
long long v18; // [rsp+28h] [rbp-A0h]
_QWORD v19[2]; // [rsp+30h] [rbp-98h] BYREF
__int128 *v20; // [rsp+40h] [rbp-88h] BYREF
long long v21; // [rsp+48h] [rbp-80h]
__int128 v22; // [rsp+50h] [rbp-78h] BYREF
__int128 *v23; // [rsp+60h] [rbp-68h] BYREF
long long v24; // [rsp+68h] [rbp-60h]
__int128 v25; // [rsp+70h] [rbp-58h] BYREF
void *v26[2]; // [rsp+80h] [rbp-48h] BYREF
_QWORD v27[7]; // [rsp+90h] [rbp-38h] BYREF
v17 = v19;
std::string::_M_construct<char const*>(&v17, "", (long long)"");
v1 = getenv("LLAMA_CACHE");
if ( v1 )
{
v2 = v1;
v3 = v18;
v4 = strlen(v1);
std::string::_M_replace(&v17, 0LL, v3, v2, v4);
}
else
{
v5 = getenv("XDG_CACHE_HOME");
if ( v5 )
{
v6 = v5;
v7 = v18;
v8 = strlen(v5);
std::string::_M_replace(&v17, 0LL, v7, v6, v8);
}
else
{
v9 = getenv("HOME");
v26[0] = v27;
std::string::_M_construct<char const*>(v26, "/.cache/", (long long)"");
v10 = strlen(v9);
v11 = std::string::replace(v26, 0LL, 0LL, v9, v10);
v23 = &v25;
v12 = (__int128 *)(v11 + 16);
if ( *(_QWORD *)v11 == v11 + 16 )
{
v25 = *v12;
}
else
{
v23 = *(__int128 **)v11;
*(_QWORD *)&v25 = *(_QWORD *)v12;
}
v24 = *(_QWORD *)(v11 + 8);
*(_QWORD *)v11 = v12;
*(_QWORD *)(v11 + 8) = 0LL;
*(_BYTE *)(v11 + 16) = 0;
std::string::operator=(&v17, &v23);
if ( v23 != &v25 )
operator delete(v23, v25 + 1);
if ( v26[0] != v27 )
operator delete(v26[0], v27[0] + 1LL);
}
v14 = &v16;
std::string::_M_construct<char *>(&v14, v17, (long long)v17 + v18);
if ( *((char *)v14 + v15 - 1) != 47 )
std::string::push_back(&v14, 47LL);
v23 = &v25;
if ( v14 == &v16 )
{
v25 = v16;
}
else
{
v23 = (__int128 *)v14;
*(_QWORD *)&v25 = v16;
}
v24 = v15;
v14 = &v16;
v15 = 0LL;
LOBYTE(v16) = 0;
std::string::operator=(&v17, &v23);
if ( v23 != &v25 )
operator delete(v23, v25 + 1);
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
std::string::append(&v17, "llama.cpp");
}
v20 = &v22;
std::string::_M_construct<char *>(&v20, v17, (long long)v17 + v18);
if ( *((_BYTE *)v20 + v21 - 1) != 47 )
std::string::push_back(&v20, 47LL);
*(_QWORD *)a1 = a1 + 16;
if ( v20 == &v22 )
{
*(_OWORD *)(a1 + 16) = v22;
}
else
{
*(_QWORD *)a1 = v20;
*(_QWORD *)(a1 + 16) = v22;
}
*(_QWORD *)(a1 + 8) = v21;
v20 = &v22;
v21 = 0LL;
LOBYTE(v22) = 0;
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
return a1;
}
| fs_get_cache_directory[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
LEA R13,[RSP + 0x30]
MOV qword ptr [R13 + -0x10],R13
LEA RDX,[0x1af0ee]
LEA RDI,[RSP + 0x20]
MOV RSI,RDX
CALL 0x00120d42
LEA RDI,[0x1b0e5e]
CALL 0x0011a8f0
TEST RAX,RAX
JZ 0x00124d14
MOV R14,RAX
LEA R15,[RSP + 0x20]
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,RAX
CALL 0x0011a330
LAB_00124cfc:
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R14
MOV R8,RAX
CALL 0x0011ab90
JMP 0x00124f02
LAB_00124d14:
LEA RDI,[0x1b0e6a]
CALL 0x0011a8f0
TEST RAX,RAX
JZ 0x00124d51
MOV R14,RAX
LEA R15,[RSP + 0x20]
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,RAX
CALL 0x0011a330
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R14
MOV R8,RAX
CALL 0x0011ab90
JMP 0x00124e31
LAB_00124d51:
LEA RDI,[0x1b0e74]
CALL 0x0011a8f0
MOV R14,RAX
LEA R15,[RSP + 0x90]
MOV qword ptr [R15 + -0x10],R15
LAB_00124d6c:
LEA RSI,[0x1b0e79]
LEA RDX,[0x1b0e81]
LEA RDI,[RSP + 0x80]
CALL 0x00120d42
MOV RDI,R14
CALL 0x0011a330
LAB_00124d8f:
LEA RDI,[RSP + 0x80]
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R14
MOV R8,RAX
CALL 0x0011a850
LEA R12,[RSP + 0x70]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00124dce
MOV qword ptr [RSP + 0x60],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x70],RDX
JMP 0x00124dd6
LAB_00124dce:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_00124dd6:
MOV RDX,qword ptr [RAX + 0x8]
LEA R14,[RSP + 0x60]
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RDI,[RSP + 0x20]
MOV RSI,R14
CALL 0x0011a900
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x00124e14
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a740
LAB_00124e14:
MOV RDI,qword ptr [RSP + 0x80]
CMP RDI,R15
JZ 0x00124e31
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x0011a740
LAB_00124e31:
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
ADD RDX,RSI
LAB_00124e47:
MOV RDI,RSP
CALL 0x00121694
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f
JZ 0x00124e6c
LAB_00124e5f:
MOV RDI,RSP
MOV ESI,0x2f
CALL 0x0011a5f0
LAB_00124e6c:
LEA R12,[RSP + 0x70]
MOV qword ptr [R12 + -0x10],R12
MOV RAX,qword ptr [RSP]
CMP RAX,R15
JZ 0x00124e90
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x70],RAX
JMP 0x00124e99
LAB_00124e90:
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [R12],XMM0
LAB_00124e99:
MOV RAX,qword ptr [RSP + 0x8]
LEA R14,[RSP + 0x60]
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
LEA RDI,[RSP + 0x20]
MOV RSI,R14
CALL 0x0011a900
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x00124edb
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a740
LAB_00124edb:
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x00124ef1
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a740
LAB_00124ef1:
LEA RSI,[0x1b0e82]
LEA RDI,[RSP + 0x20]
CALL 0x0011ae70
LAB_00124f02:
LEA R14,[RSP + 0x50]
MOV qword ptr [R14 + -0x10],R14
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
ADD RDX,RSI
LEA RDI,[RSP + 0x40]
CALL 0x00121694
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f
JZ 0x00124f42
LAB_00124f33:
LEA RDI,[RSP + 0x40]
MOV ESI,0x2f
CALL 0x0011a5f0
LAB_00124f42:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [RSP + 0x40]
CMP RCX,R14
JZ 0x00124f61
MOV qword ptr [RBX],RCX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RBX + 0x10],RAX
JMP 0x00124f68
LAB_00124f61:
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RAX],XMM0
LAB_00124f68:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RSP + 0x40],R14
MOV qword ptr [RSP + 0x48],0x0
MOV byte ptr [RSP + 0x50],0x0
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R13
JZ 0x00124f9b
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011a740
LAB_00124f9b:
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* fs_get_cache_directory[abi:cxx11]() */
void fs_get_cache_directory_abi_cxx11_(void)
{
char *pcVar1;
char *pcVar2;
long *plVar3;
long *plVar4;
long *in_RDI;
long *local_c8;
long local_c0;
int1 local_b8;
int7 uStack_b7;
long lStack_b0;
long *local_a8;
char *local_a0;
long local_98 [2];
int1 *local_88;
long local_80;
int1 local_78;
int7 uStack_77;
long lStack_70;
long *local_68;
long local_60;
long local_58;
long lStack_50;
long *local_48 [2];
long local_38 [2];
local_a8 = local_98;
std::__cxx11::string::_M_construct<char_const*>(&local_a8);
pcVar1 = getenv("LLAMA_CACHE");
pcVar2 = local_a0;
if (pcVar1 == (char *)0x0) {
pcVar1 = getenv("XDG_CACHE_HOME");
pcVar2 = local_a0;
if (pcVar1 == (char *)0x0) {
pcVar2 = getenv("HOME");
/* try { // try from 00124d6c to 00124d86 has its CatchHandler @ 00124fc9 */
local_48[0] = local_38;
std::__cxx11::string::_M_construct<char_const*>(local_48,"/.cache/","");
strlen(pcVar2);
/* try { // try from 00124d8f to 00124da5 has its CatchHandler @ 00124faf */
plVar3 = (long *)std::__cxx11::string::replace((ulong)local_48,0,(char *)0x0,(ulong)pcVar2);
plVar4 = plVar3 + 2;
if ((long *)*plVar3 == plVar4) {
local_58 = *plVar4;
lStack_50 = plVar3[3];
local_68 = &local_58;
}
else {
local_58 = *plVar4;
local_68 = (long *)*plVar3;
}
local_60 = plVar3[1];
*plVar3 = (long)plVar4;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
std::__cxx11::string::operator=((string *)&local_a8,(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
}
else {
strlen(pcVar1);
std::__cxx11::string::_M_replace((ulong)&local_a8,0,pcVar2,(ulong)pcVar1);
}
local_c8 = (long *)&local_b8;
/* try { // try from 00124e47 to 00124e4e has its CatchHandler @ 00124fde */
std::__cxx11::string::_M_construct<char*>(&local_c8,local_a8,local_a0 + (long)local_a8);
if (*(char *)((long)local_c8 + local_c0 + -1) != '/') {
/* try { // try from 00124e5f to 00124e6b has its CatchHandler @ 00124fcb */
std::__cxx11::string::push_back((char)&local_c8);
}
if (local_c8 == (long *)&local_b8) {
lStack_50 = lStack_b0;
local_68 = &local_58;
}
else {
local_68 = local_c8;
}
local_58 = CONCAT71(uStack_b7,local_b8);
local_60 = local_c0;
local_c0 = 0;
local_b8 = 0;
local_c8 = (long *)&local_b8;
std::__cxx11::string::operator=((string *)&local_a8,(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
if (local_c8 != (long *)&local_b8) {
operator_delete(local_c8,CONCAT71(uStack_b7,local_b8) + 1);
}
/* try { // try from 00124ef1 to 00124f21 has its CatchHandler @ 00124ffc */
std::__cxx11::string::append((char *)&local_a8);
}
else {
strlen(pcVar1);
/* try { // try from 00124cfc to 00124d4b has its CatchHandler @ 00124ffc */
std::__cxx11::string::_M_replace((ulong)&local_a8,0,pcVar2,(ulong)pcVar1);
}
local_88 = &local_78;
std::__cxx11::string::_M_construct<char*>(&local_88,local_a8,local_a0 + (long)local_a8);
if (local_88[local_80 + -1] != '/') {
/* try { // try from 00124f33 to 00124f41 has its CatchHandler @ 00124fe0 */
std::__cxx11::string::push_back((char)&local_88);
}
*in_RDI = (long)(in_RDI + 2);
if (local_88 == &local_78) {
in_RDI[2] = CONCAT71(uStack_77,local_78);
in_RDI[3] = lStack_70;
}
else {
*in_RDI = (long)local_88;
in_RDI[2] = CONCAT71(uStack_77,local_78);
}
in_RDI[1] = local_80;
local_80 = 0;
local_78 = 0;
if (local_a8 != local_98) {
local_88 = &local_78;
operator_delete(local_a8,local_98[0] + 1);
}
return;
}
| |
21,542 | 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>>::dump_float(double) | llama.cpp/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | 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>>::dump_float(double):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x7e171
movq (%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0xa5504(%rip), %rsi # 0x123667
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x10(%rbx), %r14
leaq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0x7e58d
movq (%rbx), %rdi
subq %r14, %rax
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
push r14
push rbx
push rax
mov rbx, rdi
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl short loc_7E171
mov rdi, [rbx]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
add rsp, 8
pop rbx
pop r14
jmp rax
loc_7E171:
lea r14, [rbx+10h]
lea rsi, [rbx+50h]
mov rdi, r14; this
call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double)
mov rdi, [rbx]
sub rax, r14
mov rcx, [rdi]
mov rcx, [rcx+8]
mov rsi, r14
mov rdx, rax
add rsp, 8
pop rbx
pop r14
jmp rcx
| long long 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>>::dump_float(
_QWORD *a1,
double a2)
{
long long v3; // rax
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2));
return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
a1 + 2,
v3 - (_QWORD)(a1 + 2));
}
| dump_float:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x0017e171
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x223667]
MOV EDX,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
LAB_0017e171:
LEA R14,[RBX + 0x10]
LEA RSI,[RBX + 0x50]
MOV RDI,R14
CALL 0x0017e58d
MOV RDI,qword ptr [RBX]
SUB RAX,R14
MOV RCX,qword ptr [RDI]
MOV RCX,qword ptr [RCX + 0x8]
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
|
/* 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> >::dump_float(double) */
void __thiscall
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>>
::dump_float(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>>
*this,double param_1)
{
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>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x0017e16f. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,"null",4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x0017e19b. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
| |
21,543 | char const* fmt::v11::detail::parse_precision<char>(char const*, char const*, fmt::v11::format_specs&, fmt::v11::detail::arg_ref<char>&, fmt::v11::parse_context<char>&) | zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/base.h | FMT_CONSTEXPR auto parse_precision(const Char* begin, const Char* end,
format_specs& specs,
arg_ref<Char>& precision_ref,
parse_context<Char>& ctx) -> const Char* {
++begin;
if (begin == end) {
report_error("invalid precision");
return begin;
}
auto result =
parse_dynamic_spec(begin, end, specs.precision, precision_ref, ctx);
specs.set_dynamic_precision(result.kind);
return result.end;
} | O1 | c | char const* fmt::v11::detail::parse_precision<char>(char const*, char const*, fmt::v11::format_specs&, fmt::v11::detail::arg_ref<char>&, fmt::v11::parse_context<char>&):
pushq %rbx
incq %rdi
cmpq %rsi, %rdi
je 0x46ccf
movq %rdx, %rbx
addq $0xc, %rdx
callq 0x46d1d
movl $0xfffffcff, %ecx # imm = 0xFFFFFCFF
andl (%rbx), %ecx
shll $0x8, %edx
orl %ecx, %edx
movl %edx, (%rbx)
popq %rbx
retq
leaq 0x24cdca(%rip), %rdi # 0x293aa0
callq 0x3d5e8
nop
| _ZN3fmt3v116detail15parse_precisionIcEEPKT_S5_S5_RNS0_12format_specsERNS1_7arg_refIS3_EERNS0_13parse_contextIS3_EE:
push rbx
inc rdi
cmp rdi, rsi
jz short loc_46CCF
mov rbx, rdx
add rdx, 0Ch
call _ZN3fmt3v116detail18parse_dynamic_specIcEENS1_25parse_dynamic_spec_resultIT_EEPKS4_S7_RiRNS1_7arg_refIS4_EERNS0_13parse_contextIS4_EE; fmt::v11::detail::parse_dynamic_spec<char>(char const*,char const*,int &,fmt::v11::detail::arg_ref<char> &,fmt::v11::parse_context<char> &)
mov ecx, 0FFFFFCFFh
and ecx, [rbx]
shl edx, 8
or edx, ecx
mov [rbx], edx
pop rbx
retn
loc_46CCF:
lea rdi, aInvalidPrecisi; "invalid precision"
call _ZN3fmt3v1112report_errorEPKc; fmt::v11::report_error(char const*)
| long long fmt::v11::detail::parse_precision<char>(
long long a1,
const char *a2,
unsigned int *a3,
long long a4,
long long a5)
{
const char *v5; // rdi
long long result; // rax
int v8; // edx
v5 = (const char *)(a1 + 1);
if ( v5 == a2 )
fmt::v11::report_error((fmt::v11 *)"invalid precision", a2);
result = fmt::v11::detail::parse_dynamic_spec<char>(v5, a2, a3 + 3, a4, a5);
*a3 = *a3 & 0xFFFFFCFF | (v8 << 8);
return result;
}
| parse_precision<char>:
PUSH RBX
INC RDI
CMP RDI,RSI
JZ 0x00146ccf
MOV RBX,RDX
ADD RDX,0xc
CALL 0x00146d1d
MOV ECX,0xfffffcff
AND ECX,dword ptr [RBX]
SHL EDX,0x8
OR EDX,ECX
MOV dword ptr [RBX],EDX
POP RBX
RET
LAB_00146ccf:
LEA RDI,[0x393aa0]
CALL 0x0013d5e8
|
/* char const* fmt::v11::detail::parse_precision<char>(char const*, char const*,
fmt::v11::format_specs&, fmt::v11::detail::arg_ref<char>&, fmt::v11::parse_context<char>&) */
char * fmt::v11::detail::parse_precision<char>
(char *param_1,char *param_2,format_specs *param_3,arg_ref *param_4,
parse_context *param_5)
{
int1 auVar1 [12];
if (param_1 + 1 != param_2) {
auVar1 = parse_dynamic_spec<char>(param_1 + 1,param_2,(int *)(param_3 + 0xc),param_4,param_5);
*(uint *)param_3 = auVar1._8_4_ << 8 | *(uint *)param_3 & 0xfffffcff;
return auVar1._0_8_;
}
/* WARNING: Subroutine does not return */
report_error("invalid precision");
}
| |
21,544 | mysql_close_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_close_cont(MYSQL *sock, int ready_status)
{
int res;
res= mysql_close_slow_part_cont(sock, ready_status);
if (res)
return res;
mysql_close(sock);
return 0;
} | O3 | c | mysql_close_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x29a9f
movl %eax, %r14d
testl %eax, %eax
jne 0x29bd5
movq %rbx, %rdi
callq 0x19d70
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
| mysql_close_cont:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call mysql_close_slow_part_cont
mov r14d, eax
test eax, eax
jnz short loc_29BD5
mov rdi, rbx
call mysql_close
loc_29BD5:
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
| long long mysql_close_cont(long long a1, unsigned int a2)
{
unsigned int v2; // r14d
v2 = mysql_close_slow_part_cont(a1, a2);
if ( !v2 )
mysql_close(a1);
return v2;
}
| mysql_close_cont:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00129a9f
MOV R14D,EAX
TEST EAX,EAX
JNZ 0x00129bd5
MOV RDI,RBX
CALL 0x00119d70
LAB_00129bd5:
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int mysql_close_cont(int8 param_1)
{
int iVar1;
iVar1 = mysql_close_slow_part_cont();
if (iVar1 == 0) {
mysql_close(param_1);
}
return iVar1;
}
| |
21,545 | my_coll_parser_scan_shift_sequence | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_shift_sequence(MY_COLL_RULE_PARSER *p)
{
MY_COLL_RULE before_extend;
memset(&p->rule.curr, 0, sizeof(p->rule.curr));
/* Scan single shift character or contraction */
if (!my_coll_parser_scan_character_list(p, p->rule.curr,
MY_UCA_MAX_CONTRACTION,
"Contraction"))
return 0;
before_extend= p->rule; /* Remember the part before "/" */
/* Append the part after "/" as expansion */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_EXTEND)
{
my_coll_parser_scan(p);
if (!my_coll_parser_scan_character_list(p, p->rule.base,
MY_UCA_MAX_EXPANSION,
"Expansion"))
return 0;
}
else if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CONTEXT)
{
/*
We support 2-character long context sequences only:
one character is the previous context, plus the current character.
It's OK as Unicode's CLDR does not have longer examples.
*/
my_coll_parser_scan(p);
p->rule.with_context= TRUE;
if (!my_coll_parser_scan_character_list(p, p->rule.curr + 1, 1, "context"))
return 0;
}
/* Add rule to the rule list */
if (my_coll_rules_add(p->rules, &p->rule))
return 0;
p->rule= before_extend; /* Restore to the state before "/" */
return 1;
} | O0 | c | my_coll_parser_scan_shift_sequence:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
addq $0x50, %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x24190
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x50, %rsi
movl $0x6, %edx
leaq 0x2d2af(%rip), %rcx # 0x82902
callq 0x55c40
cmpl $0x0, %eax
jne 0x55669
movl $0x0, -0x4(%rbp)
jmp 0x55768
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
leaq -0xb0(%rbp), %rdi
movl $0xa0, %edx
callq 0x24230
movq -0x10(%rbp), %rdi
callq 0x54c80
cmpl $0x8, (%rax)
jne 0x556c9
movq -0x10(%rbp), %rdi
callq 0x55460
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movl $0xa, %edx
leaq 0x2d074(%rip), %rcx # 0x82725
callq 0x55c40
cmpl $0x0, %eax
jne 0x556c7
movl $0x0, -0x4(%rbp)
jmp 0x55768
jmp 0x55722
movq -0x10(%rbp), %rdi
callq 0x54c80
cmpl $0x9, (%rax)
jne 0x55720
movq -0x10(%rbp), %rdi
callq 0x55460
movq -0x10(%rbp), %rax
movb $0x1, 0xe8(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x50, %rsi
addq $0x8, %rsi
movl $0x1, %edx
leaq 0x2dd35(%rip), %rcx # 0x83440
callq 0x55c40
cmpl $0x0, %eax
jne 0x5571e
movl $0x0, -0x4(%rbp)
jmp 0x55768
jmp 0x55720
jmp 0x55722
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
callq 0x55f90
cmpl $0x0, %eax
je 0x55748
movl $0x0, -0x4(%rbp)
jmp 0x55768
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
leaq -0xb0(%rbp), %rsi
movl $0xa0, %edx
callq 0x24230
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_parser_scan_shift_sequence:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
add rdi, 50h ; 'P'
xor esi, esi
mov edx, 30h ; '0'
call _memset
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
add rsi, 50h ; 'P'
mov edx, 6
lea rcx, aContraction; "Contraction"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_55669
mov [rbp+var_4], 0
jmp loc_55768
loc_55669:
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
lea rdi, [rbp+var_B0]
mov edx, 0A0h
call _memcpy
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 8
jnz short loc_556C9
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
mov edx, 0Ah
lea rcx, aExpansion; "Expansion"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_556C7
mov [rbp+var_4], 0
jmp loc_55768
loc_556C7:
jmp short loc_55722
loc_556C9:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 9
jnz short loc_55720
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov rax, [rbp+var_10]
mov byte ptr [rax+0E8h], 1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
add rsi, 50h ; 'P'
add rsi, 8
mov edx, 1
lea rcx, aCharsetsCharse_52+23h; "context"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_5571E
mov [rbp+var_4], 0
jmp short loc_55768
loc_5571E:
jmp short $+2
loc_55720:
jmp short $+2
loc_55722:
mov rax, [rbp+var_10]
mov rdi, [rax+0F0h]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
call my_coll_rules_add
cmp eax, 0
jz short loc_55748
mov [rbp+var_4], 0
jmp short loc_55768
loc_55748:
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
lea rsi, [rbp+var_B0]
mov edx, 0A0h
call _memcpy
mov [rbp+var_4], 1
loc_55768:
mov eax, [rbp+var_4]
add rsp, 0B0h
pop rbp
retn
| long long my_coll_parser_scan_shift_sequence(long long a1)
{
_BYTE v2[160]; // [rsp+0h] [rbp-B0h] BYREF
long long v3; // [rsp+A0h] [rbp-10h]
v3 = a1;
memset(a1 + 160, 0LL, 48LL);
if ( (unsigned int)my_coll_parser_scan_character_list(v3, v3 + 160, 6LL, "Contraction") )
{
memcpy(v2, v3 + 80, sizeof(v2));
if ( *(_DWORD *)my_coll_parser_curr(v3) == 8 )
{
my_coll_parser_scan(v3);
if ( !(unsigned int)my_coll_parser_scan_character_list(v3, v3 + 80, 10LL, "Expansion") )
return 0;
}
else if ( *(_DWORD *)my_coll_parser_curr(v3) == 9 )
{
my_coll_parser_scan(v3);
*(_BYTE *)(v3 + 232) = 1;
if ( !(unsigned int)my_coll_parser_scan_character_list(v3, v3 + 168, 1LL, "context") )
return 0;
}
if ( (unsigned int)my_coll_rules_add(*(_QWORD *)(v3 + 240), v3 + 80) )
{
return 0;
}
else
{
memcpy(v3 + 80, v2, 160LL);
return 1;
}
}
else
{
return 0;
}
}
| my_coll_parser_scan_shift_sequence:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
ADD RDI,0x50
XOR ESI,ESI
MOV EDX,0x30
CALL 0x00124190
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
ADD RSI,0x50
MOV EDX,0x6
LEA RCX,[0x182902]
CALL 0x00155c40
CMP EAX,0x0
JNZ 0x00155669
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155768
LAB_00155669:
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
LEA RDI,[RBP + -0xb0]
MOV EDX,0xa0
CALL 0x00124230
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00154c80
CMP dword ptr [RAX],0x8
JNZ 0x001556c9
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00155460
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
MOV EDX,0xa
LEA RCX,[0x182725]
CALL 0x00155c40
CMP EAX,0x0
JNZ 0x001556c7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155768
LAB_001556c7:
JMP 0x00155722
LAB_001556c9:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00154c80
CMP dword ptr [RAX],0x9
JNZ 0x00155720
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00155460
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xe8],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
ADD RSI,0x50
ADD RSI,0x8
MOV EDX,0x1
LEA RCX,[0x183440]
CALL 0x00155c40
CMP EAX,0x0
JNZ 0x0015571e
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155768
LAB_0015571e:
JMP 0x00155720
LAB_00155720:
JMP 0x00155722
LAB_00155722:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0xf0]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
CALL 0x00155f90
CMP EAX,0x0
JZ 0x00155748
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00155768
LAB_00155748:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
LEA RSI,[RBP + -0xb0]
MOV EDX,0xa0
CALL 0x00124230
MOV dword ptr [RBP + -0x4],0x1
LAB_00155768:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xb0
POP RBP
RET
|
int4 my_coll_parser_scan_shift_sequence(long param_1)
{
int iVar1;
int *piVar2;
int1 local_b8 [160];
long local_18;
int4 local_c;
local_18 = param_1;
memset((void *)(param_1 + 0xa0),0,0x30);
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0xa0,6,"Contraction");
if (iVar1 == 0) {
local_c = 0;
}
else {
memcpy(local_b8,(void *)(local_18 + 0x50),0xa0);
piVar2 = (int *)my_coll_parser_curr(local_18);
if (*piVar2 == 8) {
my_coll_parser_scan(local_18);
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0x50,10,"Expansion");
if (iVar1 == 0) {
return 0;
}
}
else {
piVar2 = (int *)my_coll_parser_curr(local_18);
if (*piVar2 == 9) {
my_coll_parser_scan(local_18);
*(int1 *)(local_18 + 0xe8) = 1;
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0xa8,1,"context");
if (iVar1 == 0) {
return 0;
}
}
}
iVar1 = my_coll_rules_add(*(int8 *)(local_18 + 0xf0),local_18 + 0x50);
if (iVar1 == 0) {
memcpy((void *)(local_18 + 0x50),local_b8,0xa0);
local_c = 1;
}
else {
local_c = 0;
}
}
return local_c;
}
| |
21,546 | mysql_stmt_fetch_column | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int column, unsigned long offset)
{
if (stmt->state < MYSQL_STMT_USER_FETCHING || column >= stmt->field_count ||
stmt->state == MYSQL_STMT_FETCH_DONE) {
SET_CLIENT_STMT_ERROR(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->bind[column].u.row_ptr)
{
/* we set row_ptr only for columns which contain data, so this must be a NULL column */
if (bind[0].is_null)
*bind[0].is_null= 1;
}
else
{
unsigned char *save_ptr;
if (bind[0].length)
*bind[0].length= *stmt->bind[column].length;
else
bind[0].length= &stmt->bind[column].length_value;
if (bind[0].is_null)
*bind[0].is_null= 0;
else
bind[0].is_null= &bind[0].is_null_value;
if (!bind[0].error)
bind[0].error= &bind[0].error_value;
*bind[0].error= 0;
bind[0].offset= offset;
save_ptr= stmt->bind[column].u.row_ptr;
mysql_ps_fetch_functions[stmt->fields[column].type].func(&bind[0], &stmt->fields[column], &stmt->bind[column].u.row_ptr);
stmt->bind[column].u.row_ptr= save_ptr;
}
return(0);
} | O0 | c | mysql_stmt_fetch_column:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x5, 0x50(%rax)
jb 0x847c7
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jae 0x847c7
movq -0x10(%rbp), %rax
cmpl $0x6, 0x50(%rax)
jne 0x8483b
jmp 0x847c9
movq -0x10(%rbp), %rax
movl $0x803, 0x108(%rax) # imm = 0x803
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x207307(%rip), %rax # 0x28baf0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x3b1a0
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x2072ed(%rip), %rax # 0x28bb00
movq 0x198(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x3b1a0
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x849a5
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
jne 0x8486f
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x8486a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x1, (%rax)
jmp 0x8499e
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x8489d
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
jmp 0x848ba
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rcx
movl -0x1c(%rbp), %eax
imulq $0x70, %rax, %rax
addq %rax, %rcx
addq $0x50, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x848d2
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x0, (%rax)
jmp 0x848e2
movq -0x18(%rbp), %rcx
addq $0x67, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x848fd
movq -0x18(%rbp), %rcx
addq $0x64, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl -0x1c(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movl 0x70(%rax), %eax
movl %eax, %ecx
leaq 0x3c1534(%rip), %rax # 0x445e80
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rsi
movl -0x1c(%rbp), %ecx
shlq $0x7, %rcx
addq %rcx, %rsi
movq -0x10(%rbp), %rcx
movq 0x78(%rcx), %rdx
movl -0x1c(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rdx
addq $0x20, %rdx
callq *%rax
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl -0x1c(%rbp), %edx
imulq $0x70, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
| mysql_stmt_fetch_column:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 5
jb short loc_847C7
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
cmp eax, [rcx+60h]
jnb short loc_847C7
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 6
jnz short loc_8483B
loc_847C7:
jmp short $+2
loc_847C9:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 803h
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+198h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_849A5
loc_8483B:
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rax, rcx
cmp qword ptr [rax+20h], 0
jnz short loc_8486F
mov rax, [rbp+var_18]
cmp qword ptr [rax+8], 0
jz short loc_8486A
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov byte ptr [rax], 1
loc_8486A:
jmp loc_8499E
loc_8486F:
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jz short loc_8489D
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
jmp short loc_848BA
loc_8489D:
mov rax, [rbp+var_10]
mov rcx, [rax+78h]
mov eax, [rbp+var_1C]
imul rax, 70h ; 'p'
add rcx, rax
add rcx, 50h ; 'P'
mov rax, [rbp+var_18]
mov [rax], rcx
loc_848BA:
mov rax, [rbp+var_18]
cmp qword ptr [rax+8], 0
jz short loc_848D2
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov byte ptr [rax], 0
jmp short loc_848E2
loc_848D2:
mov rcx, [rbp+var_18]
add rcx, 67h ; 'g'
mov rax, [rbp+var_18]
mov [rax+8], rcx
loc_848E2:
mov rax, [rbp+var_18]
cmp qword ptr [rax+18h], 0
jnz short loc_848FD
mov rcx, [rbp+var_18]
add rcx, 64h ; 'd'
mov rax, [rbp+var_18]
mov [rax+18h], rcx
loc_848FD:
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov byte ptr [rax], 0
mov rcx, [rbp+var_28]
mov rax, [rbp+var_18]
mov [rax+48h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov ecx, [rbp+var_1C]
shl rcx, 7
add rax, rcx
mov eax, [rax+70h]
mov ecx, eax
lea rax, mysql_ps_fetch_functions
imul rcx, 18h
add rax, rcx
mov rax, [rax]
mov rdi, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rsi, [rcx+58h]
mov ecx, [rbp+var_1C]
shl rcx, 7
add rsi, rcx
mov rcx, [rbp+var_10]
mov rdx, [rcx+78h]
mov ecx, [rbp+var_1C]
imul rcx, 70h ; 'p'
add rdx, rcx
add rdx, 20h ; ' '
call rax
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov edx, [rbp+var_1C]
imul rdx, 70h ; 'p'
add rax, rdx
mov [rax+20h], rcx
loc_8499E:
mov [rbp+var_4], 0
loc_849A5:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mysql_stmt_fetch_column(long long a1, long long a2, unsigned int a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-30h]
if ( *(_DWORD *)(a1 + 80) < 5u || a3 >= *(_DWORD *)(a1 + 96) || *(_DWORD *)(a1 + 80) == 6 )
{
*(_DWORD *)(a1 + 264) = 2051;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[51], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
else
{
if ( *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32) )
{
if ( *(_QWORD *)a2 )
**(_QWORD **)a2 = **(_QWORD **)(112LL * a3 + *(_QWORD *)(a1 + 120));
else
*(_QWORD *)a2 = 112LL * a3 + *(_QWORD *)(a1 + 120) + 80;
if ( *(_QWORD *)(a2 + 8) )
**(_BYTE **)(a2 + 8) = 0;
else
*(_QWORD *)(a2 + 8) = a2 + 103;
if ( !*(_QWORD *)(a2 + 24) )
*(_QWORD *)(a2 + 24) = a2 + 100;
**(_BYTE **)(a2 + 24) = 0;
*(_QWORD *)(a2 + 72) = a4;
v5 = *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32);
(*(void ( **)(long long, unsigned long long, long long))&mysql_ps_fetch_functions[6
* *(unsigned int *)(((unsigned long long)a3 << 7) + *(_QWORD *)(a1 + 88) + 112)])(
a2,
((unsigned long long)a3 << 7) + *(_QWORD *)(a1 + 88),
112LL * a3 + *(_QWORD *)(a1 + 120) + 32);
*(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32) = v5;
}
else if ( *(_QWORD *)(a2 + 8) )
{
**(_BYTE **)(a2 + 8) = 1;
}
return 0;
}
}
| mysql_stmt_fetch_column:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x5
JC 0x001847c7
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x60]
JNC 0x001847c7
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x6
JNZ 0x0018483b
LAB_001847c7:
JMP 0x001847c9
LAB_001847c9:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x803
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x38baf0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x0013b1a0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x38bb00]
MOV RSI,qword ptr [RAX + 0x198]
MOV EDX,0x200
CALL 0x0013b1a0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001849a5
LAB_0018483b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
CMP qword ptr [RAX + 0x20],0x0
JNZ 0x0018486f
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0018486a
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV byte ptr [RAX],0x1
LAB_0018486a:
JMP 0x0018499e
LAB_0018486f:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JZ 0x0018489d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x001848ba
LAB_0018489d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x78]
MOV EAX,dword ptr [RBP + -0x1c]
IMUL RAX,RAX,0x70
ADD RCX,RAX
ADD RCX,0x50
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
LAB_001848ba:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001848d2
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV byte ptr [RAX],0x0
JMP 0x001848e2
LAB_001848d2:
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x67
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RCX
LAB_001848e2:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001848fd
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x64
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x18],RCX
LAB_001848fd:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x7
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x70]
MOV ECX,EAX
LEA RAX,[0x545e80]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x58]
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x7
ADD RSI,RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x78]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL RCX,RCX,0x70
ADD RDX,RCX
ADD RDX,0x20
CALL RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV EDX,dword ptr [RBP + -0x1c]
IMUL RDX,RDX,0x70
ADD RAX,RDX
MOV qword ptr [RAX + 0x20],RCX
LAB_0018499e:
MOV dword ptr [RBP + -0x4],0x0
LAB_001849a5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_stmt_fetch_column(long param_1,long *param_2,uint param_3,long param_4)
{
int8 uVar1;
int4 local_c;
if (((*(uint *)(param_1 + 0x50) < 5) || (*(uint *)(param_1 + 0x60) <= param_3)) ||
(*(int *)(param_1 + 0x50) == 6)) {
*(int4 *)(param_1 + 0x108) = 0x803;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s__0038bc98,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_c = 1;
}
else {
if (*(long *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20) == 0) {
if (param_2[1] != 0) {
*(int1 *)param_2[1] = 1;
}
}
else {
if (*param_2 == 0) {
*param_2 = *(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x50;
}
else {
*(int8 *)*param_2 =
**(int8 **)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70);
}
if (param_2[1] == 0) {
param_2[1] = (long)param_2 + 0x67;
}
else {
*(int1 *)param_2[1] = 0;
}
if (param_2[3] == 0) {
param_2[3] = (long)param_2 + 100;
}
*(int1 *)param_2[3] = 0;
param_2[9] = param_4;
uVar1 = *(int8 *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20);
(*(code *)(&mysql_ps_fetch_functions)
[(ulong)*(uint *)(*(long *)(param_1 + 0x58) + (ulong)param_3 * 0x80 + 0x70) * 3])
(param_2,*(long *)(param_1 + 0x58) + (ulong)param_3 * 0x80,
*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20);
*(int8 *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20) = uVar1;
}
local_c = 0;
}
return local_c;
}
| |
21,547 | inline_mysql_cond_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_init(
#ifdef HAVE_PSI_COND_INTERFACE
PSI_cond_key key,
#endif
mysql_cond_t *that,
const pthread_condattr_t *attr)
{
#ifdef HAVE_PSI_COND_INTERFACE
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
#else
that->m_psi= NULL;
#endif
return pthread_cond_init(&that->m_cond, attr);
} | O0 | c | inline_mysql_cond_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1b36be(%rip), %rax # 0x232838
movq (%rax), %rax
movq 0x60(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x36400
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| inline_mysql_cond_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+60h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_cond_init
add rsp, 20h
pop rbp
retn
| long long inline_mysql_cond_init(unsigned int a1, long long a2, long long a3)
{
*(_QWORD *)(a2 + 48) = (*((long long ( **)(_QWORD, long long))PSI_server + 12))(a1, a2);
return pthread_cond_init(a2, a3);
}
| inline_mysql_cond_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x332838]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x60]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00136400
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3)
{
longlong lVar1;
lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2);
param_2[1].__align = lVar1;
pthread_cond_init(param_2,param_3);
return;
}
| |
21,548 | Catch::defaultListTags(std::ostream&, std::vector<Catch::TagInfo, std::allocator<Catch::TagInfo>> const&, bool) | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | void defaultListTags( std::ostream& out,
std::vector<TagInfo> const& tags,
bool isFiltered ) {
if ( isFiltered ) {
out << "Tags for matching test cases:\n";
} else {
out << "All available tags:\n";
}
for ( auto const& tagCount : tags ) {
ReusableStringStream rss;
rss << " " << std::setw( 2 ) << tagCount.count << " ";
auto str = rss.str();
auto wrapper = TextFlow::Column( tagCount.all() )
.initialIndent( 0 )
.indent( str.size() )
.width( CATCH_CONFIG_CONSOLE_WIDTH - 10 );
out << str << wrapper << '\n';
}
out << pluralise(tags.size(), "tag"_sr) << "\n\n" << std::flush;
} | O3 | cpp | Catch::defaultListTags(std::ostream&, std::vector<Catch::TagInfo, std::allocator<Catch::TagInfo>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0x6704a
leaq 0x77316(%rip), %rsi # 0xde359
movl $0x1e, %edx
jmp 0x67056
leaq 0x77327(%rip), %rsi # 0xde378
movl $0x14, %edx
movq %rbx, %rdi
callq 0x17be0
movq (%r14), %r15
movq 0x8(%r14), %rax
movq %rax, 0x98(%rsp)
cmpq %rax, %r15
je 0x67256
movq %r14, 0x90(%rsp)
leaq 0xb0(%rsp), %r13
leaq 0x8(%rsp), %r14
leaq 0x77636(%rip), %r12 # 0xde6c8
movq %r14, %rdi
callq 0x5e2c8
movq 0x10(%rsp), %rdi
movl $0x2, %edx
movq %r12, %rsi
callq 0x17be0
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x10(%rdi,%rax)
movq 0x30(%r15), %rsi
callq 0x175c0
movq 0x10(%rsp), %rdi
movl $0x2, %edx
movq %r12, %rsi
callq 0x17be0
movq 0x10(%rsp), %rsi
addq $0x8, %rsi
leaq 0x18(%rsp), %rdi
callq 0x17c70
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x5cb3e
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x251d8
movq $0x0, 0x68(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
movq $0x46, 0x58(%rsp)
movq %r13, 0xa0(%rsp)
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x251d8
leaq 0x48(%rsp), %rcx
movq 0x20(%rcx), %rax
movq %rax, 0x20(%r13)
movups 0x10(%rcx), %xmm0
movups %xmm0, 0x10(%r13)
movq 0x38(%rsp), %rdi
cmpq %rcx, %rdi
je 0x67188
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x17150
movq %r14, %rbp
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x671ad
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x17150
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %r14
movq %rbx, %rdi
callq 0x17be0
movq %rax, %rbx
movq %rax, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x4d7da
movb $0xa, 0x38(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x38(%rsp), %rsi
callq 0x17be0
movq 0xa0(%rsp), %rdi
cmpq %r13, %rdi
je 0x67209
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x17150
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
movq %r14, %rbx
je 0x67228
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x17150
movq %rbp, %r14
movq %rbp, %rdi
callq 0x5e2f4
addq $0x38, %r15
cmpq 0x98(%rsp), %r15
jne 0x67092
movq 0x90(%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %rax
jmp 0x67259
movq %r15, %rax
subq %r15, %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rcx
leaq 0xa0(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x7710d(%rip), %rax # 0xde38d
movq %rax, 0x8(%rsi)
movq $0x3, 0x10(%rsi)
movq %rbx, %rdi
callq 0x612eb
leaq 0x77022(%rip), %rsi # 0xde2bd
movl $0x2, %edx
movq %rbx, %rdi
callq 0x17be0
movq %rbx, %rdi
callq 0x17590
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6730b
jmp 0x6730b
movq %rax, %rbx
jmp 0x67330
movq %rax, %rbx
jmp 0x672ef
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x672ef
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x17150
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x67330
movq 0x80(%rsp), %rsi
jmp 0x67328
movq %rax, %rbx
jmp 0x6734c
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r13, %rdi
je 0x67330
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x17150
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x6734c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x17150
leaq 0x8(%rsp), %rdi
callq 0x5e2f4
movq %rbx, %rdi
callq 0x17740
| _ZN5Catch15defaultListTagsERSoRKSt6vectorINS_7TagInfoESaIS2_EEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov r14, rsi
mov rbx, rdi
test edx, edx
jz short loc_6704A
lea rsi, aTagsForMatchin; "Tags for matching test cases:\n"
mov edx, 1Eh
jmp short loc_67056
loc_6704A:
lea rsi, aAllAvailableTa; "All available tags:\n"
mov edx, 14h
loc_67056:
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 r15, [r14]
mov rax, [r14+8]
mov [rsp+108h+var_70], rax
cmp r15, rax
jz loc_67256
mov [rsp+108h+var_78], r14
lea r13, [rsp+108h+var_58]
lea r14, [rsp+108h+var_100]
lea r12, aWithExpansion_1+11h; " "
loc_67092:
mov rdi, r14; this
call _ZN5Catch20ReusableStringStreamC2Ev; Catch::ReusableStringStream::ReusableStringStream(void)
mov rdi, [rsp+108h+var_F8]
mov edx, 2
mov rsi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+108h+var_F8]
mov rax, [rdi]
mov rax, [rax-18h]
mov qword ptr [rdi+rax+10h], 2
mov rsi, [r15+30h]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov rdi, [rsp+108h+var_F8]
mov edx, 2
mov rsi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rsp+108h+var_F8]
add rsi, 8
lea rdi, [rsp+108h+var_F0]
call __ZNKRSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+108h+var_98]
mov rsi, r15
call _ZNK5Catch7TagInfo3allB5cxx11Ev; Catch::TagInfo::all(void)
lea rax, [rsp+108h+var_C0]
mov [rsp+108h+var_D0], rax
mov rsi, [rsp+108h+var_98]
mov rdx, [rsp+108h+var_90]
add rdx, rsi
lea rdi, [rsp+108h+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov [rsp+108h+var_A0], 0
mov rax, [rsp+108h+var_E8]
mov [rsp+108h+var_A8], rax
mov [rsp+108h+var_B0], 46h ; 'F'
mov [rsp+108h+var_68], r13
mov rsi, [rsp+108h+var_D0]
mov rdx, [rsp+108h+var_C8]
add rdx, rsi
lea rdi, [rsp+108h+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rcx, [rsp+108h+var_C0]
mov rax, [rcx+20h]
mov [r13+20h], rax
movups xmm0, xmmword ptr [rcx+10h]
movups xmmword ptr [r13+10h], xmm0
mov rdi, [rsp+108h+var_D0]; void *
cmp rdi, rcx
jz short loc_67188
mov rsi, [rsp+108h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67188:
mov rbp, r14
mov rdi, [rsp+108h+var_98]; void *
lea rax, [rsp+108h+var_88]
cmp rdi, rax
jz short loc_671AD
mov rsi, [rsp+108h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_671AD:
mov rsi, [rsp+108h+var_F0]
mov rdx, [rsp+108h+var_E8]
mov r14, rbx
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 rbx, rax
mov rdi, rax; int
lea rsi, [rsp+108h+var_68]; int
call _ZN5Catch8TextFlowlsERSoRKNS0_6ColumnE; Catch::TextFlow::operator<<(std::ostream &,Catch::TextFlow::Column const&)
mov byte ptr [rsp+108h+var_D0], 0Ah
mov edx, 1
mov rdi, rbx
lea rsi, [rsp+108h+var_D0]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+108h+var_68]; void *
cmp rdi, r13
jz short loc_67209
mov rsi, [rsp+108h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67209:
mov rdi, [rsp+108h+var_F0]; void *
lea rax, [rsp+108h+var_E0]
cmp rdi, rax
mov rbx, r14
jz short loc_67228
mov rsi, [rsp+108h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67228:
mov r14, rbp
mov rdi, rbp; this
call _ZN5Catch20ReusableStringStreamD2Ev; Catch::ReusableStringStream::~ReusableStringStream()
add r15, 38h ; '8'
cmp r15, [rsp+108h+var_70]
jnz loc_67092
mov rax, [rsp+108h+var_78]
mov r15, [rax]
mov rax, [rax+8]
jmp short loc_67259
loc_67256:
mov rax, r15
loc_67259:
sub rax, r15
sar rax, 3
mov rcx, 6DB6DB6DB6DB6DB7h
imul rcx, rax
lea rsi, [rsp+108h+var_68]
mov [rsi], rcx
lea rax, aTag; "tag"
mov [rsi+8], rax
mov qword ptr [rsi+10h], 3
mov rdi, rbx
call _ZN5CatchlsERSoRKNS_9pluraliseE; Catch::operator<<(std::ostream &,Catch::pluralise const&)
lea rsi, asc_DE2BC+1; "\n\n"
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 rdi, rbx; this
call __ZNSo5flushEv; std::ostream::flush(void)
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_6730B
jmp short loc_6730B
mov rbx, rax
jmp short loc_67330
mov rbx, rax
jmp short loc_672EF
mov rbx, rax
mov rdi, [rsp+arg_30]; void *
lea rax, [rsp+arg_40]
cmp rdi, rax
jz short loc_672EF
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_672EF:
mov rdi, [rsp+arg_68]
lea rax, [rsp+arg_78]
cmp rdi, rax
jz short loc_67330
mov rsi, [rsp+arg_78]
jmp short loc_67328
loc_6730B:
mov rbx, rax
jmp short loc_6734C
mov rbx, rax
mov rdi, [rsp+arg_98]; void *
cmp rdi, r13
jz short loc_67330
mov rsi, [rsp+arg_A8]
loc_67328:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_67330:
mov rdi, [rsp+arg_10]; void *
lea rax, [rsp+arg_20]
cmp rdi, rax
jz short loc_6734C
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6734C:
lea rdi, [rsp+arg_0]; this
call _ZN5Catch20ReusableStringStreamD2Ev; Catch::ReusableStringStream::~ReusableStringStream()
mov rdi, rbx
call __Unwind_Resume
| long long Catch::defaultListTags(std::ostream *this, long long *a2, int a3, double a4)
{
std::ostream *v4; // rbx
long long v5; // r15
Catch::ReusableStringStream *v6; // r14
_QWORD *v7; // rdi
double v8; // xmm0_8
Catch::ReusableStringStream *v9; // rbp
std::ostream *v10; // r14
double v11; // xmm0_8
long long v12; // rax
long long v13; // rbx
long long v14; // rax
char v16; // [rsp+8h] [rbp-100h] BYREF
_QWORD *v17; // [rsp+10h] [rbp-F8h]
void *v18; // [rsp+18h] [rbp-F0h] BYREF
long long v19; // [rsp+20h] [rbp-E8h]
long long v20; // [rsp+28h] [rbp-E0h] BYREF
void *v21[2]; // [rsp+38h] [rbp-D0h] BYREF
_QWORD v22[2]; // [rsp+48h] [rbp-C0h] BYREF
__int128 v23; // [rsp+58h] [rbp-B0h]
long long v24; // [rsp+68h] [rbp-A0h]
void *v25[2]; // [rsp+70h] [rbp-98h] BYREF
long long v26; // [rsp+80h] [rbp-88h] BYREF
long long *v27; // [rsp+90h] [rbp-78h]
long long v28; // [rsp+98h] [rbp-70h]
void *v29[2]; // [rsp+A0h] [rbp-68h] BYREF
_QWORD v30[2]; // [rsp+B0h] [rbp-58h] BYREF
__int128 v31; // [rsp+C0h] [rbp-48h]
long long v32; // [rsp+D0h] [rbp-38h]
v4 = this;
if ( a3 )
std::__ostream_insert<char,std::char_traits<char>>(this, "Tags for matching test cases:\n", 30LL);
else
std::__ostream_insert<char,std::char_traits<char>>(this, "All available tags:\n", 20LL);
v5 = *a2;
v28 = a2[1];
if ( v5 == v28 )
{
v14 = v5;
}
else
{
v27 = a2;
v6 = (Catch::ReusableStringStream *)&v16;
do
{
Catch::ReusableStringStream::ReusableStringStream(v6);
std::__ostream_insert<char,std::char_traits<char>>(v17, " ", 2LL);
v7 = v17;
*(_QWORD *)((char *)v17 + *(_QWORD *)(*v17 - 24LL) + 16) = 2LL;
std::ostream::_M_insert<unsigned long>(v7, *(_QWORD *)(v5 + 48));
v8 = std::__ostream_insert<char,std::char_traits<char>>(v17, " ", 2LL);
std::stringbuf::str(&v18, v17 + 1, v8);
Catch::TagInfo::all[abi:cxx11]((long long)v25, v5);
v21[0] = v22;
std::string::_M_construct<char *>(v21, (_BYTE *)v25[0], (long long)v25[0] + (unsigned long long)v25[1]);
v24 = 0LL;
*((_QWORD *)&v23 + 1) = v19;
*(_QWORD *)&v23 = 70LL;
v29[0] = v30;
std::string::_M_construct<char *>(v29, (_BYTE *)v21[0], (long long)v21[0] + (unsigned long long)v21[1]);
v32 = v24;
v31 = v23;
if ( v21[0] != v22 )
operator delete(v21[0], v22[0] + 1LL);
v9 = v6;
if ( v25[0] != &v26 )
operator delete(v25[0], v26 + 1);
v10 = v4;
v11 = std::__ostream_insert<char,std::char_traits<char>>(v4, (const char *)v18, v19);
v13 = v12;
Catch::TextFlow::operator<<(v12, (long long)v29);
LOBYTE(v21[0]) = 10;
a4 = std::__ostream_insert<char,std::char_traits<char>>(v13, (const char *)v21, 1LL, v11);
if ( v29[0] != v30 )
operator delete(v29[0], v30[0] + 1LL);
v4 = v10;
if ( v18 != &v20 )
operator delete(v18, v20 + 1);
v6 = v9;
Catch::ReusableStringStream::~ReusableStringStream(v9);
v5 += 56LL;
}
while ( v5 != v28 );
v5 = *v27;
v14 = v27[1];
}
v29[0] = (void *)(0x6DB6DB6DB6DB6DB7LL * ((v14 - v5) >> 3));
v29[1] = "tag";
v30[0] = 3LL;
Catch::operator<<((long long)v4, (long long)v29);
std::__ostream_insert<char,std::char_traits<char>>(v4, "\n\n", 2LL, a4);
return std::ostream::flush(v4);
}
| defaultListTags:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV R14,RSI
MOV RBX,RDI
TEST EDX,EDX
JZ 0x0016704a
LEA RSI,[0x1de359]
MOV EDX,0x1e
JMP 0x00167056
LAB_0016704a:
LEA RSI,[0x1de378]
MOV EDX,0x14
LAB_00167056:
MOV RDI,RBX
CALL 0x00117be0
MOV R15,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x98],RAX
CMP R15,RAX
JZ 0x00167256
MOV qword ptr [RSP + 0x90],R14
LEA R13,[RSP + 0xb0]
LEA R14,[RSP + 0x8]
LEA R12,[0x1de6c8]
LAB_00167092:
MOV RDI,R14
CALL 0x0015e2c8
MOV RDI,qword ptr [RSP + 0x10]
LAB_0016709f:
MOV EDX,0x2
MOV RSI,R12
CALL 0x00117be0
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RDI + RAX*0x1 + 0x10],0x2
MOV RSI,qword ptr [R15 + 0x30]
LAB_001670c5:
CALL 0x001175c0
MOV RDI,qword ptr [RSP + 0x10]
MOV EDX,0x2
MOV RSI,R12
CALL 0x00117be0
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x8
LAB_001670e5:
LEA RDI,[RSP + 0x18]
CALL 0x00117c70
LAB_001670ef:
LEA RDI,[RSP + 0x70]
MOV RSI,R15
CALL 0x0015cb3e
LEA RAX,[RSP + 0x48]
MOV qword ptr [RSP + 0x38],RAX
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
ADD RDX,RSI
LAB_00167113:
LEA RDI,[RSP + 0x38]
CALL 0x001251d8
MOV qword ptr [RSP + 0x68],0x0
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x58],0x46
MOV qword ptr [RSP + 0xa0],R13
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RDX,RSI
LAB_0016714e:
LEA RDI,[RSP + 0xa0]
CALL 0x001251d8
LEA RCX,[RSP + 0x48]
MOV RAX,qword ptr [RCX + 0x20]
MOV qword ptr [R13 + 0x20],RAX
MOVUPS XMM0,xmmword ptr [RCX + 0x10]
MOVUPS xmmword ptr [R13 + 0x10],XMM0
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,RCX
JZ 0x00167188
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00117150
LAB_00167188:
MOV RBP,R14
MOV RDI,qword ptr [RSP + 0x70]
LEA RAX,[RSP + 0x80]
CMP RDI,RAX
JZ 0x001671ad
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x00117150
LAB_001671ad:
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LAB_001671b7:
MOV R14,RBX
MOV RDI,RBX
CALL 0x00117be0
MOV RBX,RAX
MOV RDI,RAX
LEA RSI,[RSP + 0xa0]
CALL 0x0014d7da
MOV byte ptr [RSP + 0x38],0xa
MOV EDX,0x1
MOV RDI,RBX
LEA RSI,[RSP + 0x38]
CALL 0x00117be0
LAB_001671ec:
MOV RDI,qword ptr [RSP + 0xa0]
CMP RDI,R13
JZ 0x00167209
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x00117150
LAB_00167209:
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[RSP + 0x28]
CMP RDI,RAX
MOV RBX,R14
JZ 0x00167228
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00117150
LAB_00167228:
MOV R14,RBP
MOV RDI,RBP
CALL 0x0015e2f4
ADD R15,0x38
CMP R15,qword ptr [RSP + 0x98]
JNZ 0x00167092
MOV RAX,qword ptr [RSP + 0x90]
MOV R15,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
JMP 0x00167259
LAB_00167256:
MOV RAX,R15
LAB_00167259:
SUB RAX,R15
SAR RAX,0x3
MOV RCX,0x6db6db6db6db6db7
IMUL RCX,RAX
LEA RSI,[RSP + 0xa0]
MOV qword ptr [RSI],RCX
LEA RAX,[0x1de38d]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RSI + 0x10],0x3
MOV RDI,RBX
CALL 0x001612eb
LEA RSI,[0x1de2bd]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x00117be0
MOV RDI,RBX
CALL 0x00117590
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Catch::defaultListTags(std::ostream&, std::vector<Catch::TagInfo, std::allocator<Catch::TagInfo>
> const&, bool) */
void Catch::defaultListTags(ostream *param_1,vector *param_2,bool param_3)
{
ostream *poVar1;
int7 in_register_00000011;
long lVar2;
char *pcVar3;
long lVar4;
ReusableStringStream local_100 [8];
ostream *local_f8;
long *local_f0;
long local_e8;
long local_e0 [2];
long *local_d0;
long local_c8;
long local_c0 [2];
int8 local_b0;
long lStack_a8;
int8 local_a0;
long *local_98;
long local_90;
long local_88 [2];
vector *local_78;
long local_70;
long *local_68;
int *local_60;
long local_58 [2];
int8 local_48;
long lStack_40;
int8 local_38;
if ((int)CONCAT71(in_register_00000011,param_3) == 0) {
pcVar3 = "All available tags:\n";
lVar2 = 0x14;
}
else {
pcVar3 = "Tags for matching test cases:\n";
lVar2 = 0x1e;
}
std::__ostream_insert<char,std::char_traits<char>>(param_1,pcVar3,lVar2);
lVar2 = *(long *)param_2;
local_70 = *(long *)(param_2 + 8);
lVar4 = lVar2;
if (lVar2 != local_70) {
local_78 = param_2;
do {
ReusableStringStream::ReusableStringStream(local_100);
/* try { // try from 0016709f to 001670ab has its CatchHandler @ 001672c2 */
std::__ostream_insert<char,std::char_traits<char>>(local_f8," ",2);
*(int8 *)(local_f8 + *(long *)(*(long *)local_f8 + -0x18) + 0x10) = 2;
/* try { // try from 001670c5 to 001670db has its CatchHandler @ 0016730b */
std::ostream::_M_insert<unsigned_long>((ulong)local_f8);
std::__ostream_insert<char,std::char_traits<char>>(local_f8," ",2);
/* try { // try from 001670e5 to 001670ee has its CatchHandler @ 001672c4 */
std::__cxx11::stringbuf::str();
/* try { // try from 001670ef to 001670fb has its CatchHandler @ 001672c6 */
TagInfo::all_abi_cxx11_();
local_d0 = local_c0;
/* try { // try from 00167113 to 0016711c has its CatchHandler @ 001672cb */
std::__cxx11::string::_M_construct<char*>(&local_d0,local_98,local_90 + (long)local_98);
local_a0 = 0;
lStack_a8 = local_e8;
local_b0 = 0x46;
/* try { // try from 0016714e to 0016715a has its CatchHandler @ 001672d0 */
local_68 = local_58;
std::__cxx11::string::_M_construct<char*>(&local_68,local_d0,local_c8 + (long)local_d0);
local_38 = local_a0;
local_48 = local_b0;
lStack_40 = lStack_a8;
if (local_d0 != local_c0) {
operator_delete(local_d0,local_c0[0] + 1);
}
if (local_98 != local_88) {
operator_delete(local_98,local_88[0] + 1);
}
/* try { // try from 001671b7 to 001671eb has its CatchHandler @ 00167310 */
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)local_f0,local_e8)
;
TextFlow::operator<<(poVar1,(Column *)&local_68);
local_d0 = (long *)CONCAT71(local_d0._1_7_,10);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,(char *)&local_d0,1);
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (local_f0 != local_e0) {
operator_delete(local_f0,local_e0[0] + 1);
}
ReusableStringStream::~ReusableStringStream(local_100);
lVar2 = lVar2 + 0x38;
} while (lVar2 != local_70);
lVar2 = *(long *)(local_78 + 8);
lVar4 = *(long *)local_78;
}
local_68 = (long *)((lVar2 - lVar4 >> 3) * 0x6db6db6db6db6db7);
local_60 = &DAT_001de38d;
local_58[0] = 3;
operator<<(param_1,(pluralise *)&local_68);
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\n\n",2);
std::ostream::flush();
return;
}
| |
21,549 | init_extent | eloqsql/storage/maria/ma_blockrec.c | static void init_extent(MARIA_EXTENT_CURSOR *extent, uchar *extent_info,
uint extents, MARIA_RECORD_POS *tail_positions)
{
uint page_count;
extent->extent= extent_info;
extent->extent_count= extents;
extent->page= page_korr(extent_info); /* First extent */
page_count= (uint2korr(extent_info + ROW_EXTENT_PAGE_SIZE) &
~START_EXTENT_BIT);
extent->tail= page_count & TAIL_BIT;
if (extent->tail)
{
extent->page_count= 1;
extent->tail_row_nr= page_count & ~TAIL_BIT;
}
else
extent->page_count= page_count;
extent->tail_positions= tail_positions;
extent->lock_for_tail_pages= PAGECACHE_LOCK_LEFT_UNLOCKED;
} | O0 | c | init_extent:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x10(%rbp), %rdi
callq 0x33680
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movzwl 0x5(%rax), %eax
andl $0xffffbfff, %eax # imm = 0xFFFFBFFF
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
andl $0x8000, %ecx # imm = 0x8000
movq -0x8(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
je 0x317b7
movq -0x8(%rbp), %rax
movl $0x1, 0x20(%rax)
movl -0x24(%rbp), %ecx
andl $0xffff7fff, %ecx # imm = 0xFFFF7FFF
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x317c1
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
| init_extent:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax], rcx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_8]
mov [rax+28h], ecx
mov rdi, [rbp+var_10]
call uint5korr
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+5]
and eax, 0FFFFBFFFh
mov [rbp+var_24], eax
mov ecx, [rbp+var_24]
and ecx, 8000h
mov rax, [rbp+var_8]
mov [rax+2Ch], ecx
mov rax, [rbp+var_8]
cmp dword ptr [rax+2Ch], 0
jz short loc_317B7
mov rax, [rbp+var_8]
mov dword ptr [rax+20h], 1
mov ecx, [rbp+var_24]
and ecx, 0FFFF7FFFh
mov rax, [rbp+var_8]
mov [rax+30h], ecx
jmp short loc_317C1
loc_317B7:
mov ecx, [rbp+var_24]
mov rax, [rbp+var_8]
mov [rax+20h], ecx
loc_317C1:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rax, [rbp+var_8]
mov dword ptr [rax+24h], 0
add rsp, 30h
pop rbp
retn
| long long init_extent(long long a1, long long a2, int a3, long long a4)
{
long long result; // rax
int v5; // [rsp+Ch] [rbp-24h]
*(_QWORD *)a1 = a2;
*(_DWORD *)(a1 + 40) = a3;
*(_QWORD *)(a1 + 24) = uint5korr(a2);
v5 = *(_WORD *)(a2 + 5) & 0xBFFF;
*(_DWORD *)(a1 + 44) = *(_WORD *)(a2 + 5) & 0x8000;
if ( *(_DWORD *)(a1 + 44) )
{
*(_DWORD *)(a1 + 32) = 1;
*(_DWORD *)(a1 + 48) = v5 & 0xFFFF7FFF;
}
else
{
*(_DWORD *)(a1 + 32) = v5;
}
*(_QWORD *)(a1 + 16) = a4;
result = a1;
*(_DWORD *)(a1 + 36) = 0;
return result;
}
| init_extent:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],ECX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00133680
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x5]
AND EAX,0xffffbfff
MOV dword ptr [RBP + -0x24],EAX
MOV ECX,dword ptr [RBP + -0x24]
AND ECX,0x8000
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2c],ECX
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x2c],0x0
JZ 0x001317b7
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x20],0x1
MOV ECX,dword ptr [RBP + -0x24]
AND ECX,0xffff7fff
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x30],ECX
JMP 0x001317c1
LAB_001317b7:
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x20],ECX
LAB_001317c1:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x24],0x0
ADD RSP,0x30
POP RBP
RET
|
void init_extent(long *param_1,long param_2,int4 param_3,long param_4)
{
uint uVar1;
long lVar2;
*param_1 = param_2;
*(int4 *)(param_1 + 5) = param_3;
lVar2 = uint5korr(param_2);
param_1[3] = lVar2;
uVar1 = (uint)*(ushort *)(param_2 + 5);
*(uint *)((long)param_1 + 0x2c) = uVar1 & 0x8000;
if (*(int *)((long)param_1 + 0x2c) == 0) {
*(uint *)(param_1 + 4) = uVar1 & 0xffffbfff;
}
else {
*(int4 *)(param_1 + 4) = 1;
*(uint *)(param_1 + 6) = uVar1 & 0xffff3fff;
}
param_1[2] = param_4;
*(int4 *)((long)param_1 + 0x24) = 0;
return;
}
| |
21,550 | fmt::v8::basic_format_string<char, unsigned int&>::basic_format_string<char [27], 0>(char const (&) [27]) | aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/core.h | FMT_CONSTEVAL basic_format_string(const S& s) : str_(s) {
static_assert(
detail::count<
(std::is_base_of<detail::view, remove_reference_t<Args>>::value &&
std::is_reference<Args>::value)...>() == 0,
"passing views as lvalues is disallowed");
#ifdef FMT_HAS_CONSTEVAL
if constexpr (detail::count_named_args<Args...>() == 0) {
using checker = detail::format_string_checker<Char, detail::error_handler,
remove_cvref_t<Args>...>;
detail::parse_format_string<true>(str_, checker(s, {}));
}
#else
detail::check_format_string<Args...>(s);
#endif
} | O0 | c | fmt::v8::basic_format_string<char, unsigned int&>::basic_format_string<char [27], 0>(char const (&) [27]):
subq $0x38, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movq 0x20(%rsp), %rdi
callq 0x19f90
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
addq $0x38, %rsp
retq
nopl (%rax)
| _ZN3fmt2v819basic_format_stringIcJmEEC2IA65_cTnNSt9enable_ifIXsr3std14is_convertibleIRKT_NS0_17basic_string_viewIcEEEE5valueEiE4typeELi0EEES8_:
sub rsp, 38h
mov [rsp+38h+var_20], rdi
mov [rsp+38h+var_28], rsi
mov rcx, [rsp+38h+var_20]
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_10], rcx
mov [rsp+38h+var_18], rax
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
mov rcx, [rsp+38h+var_18]
mov [rax], rcx
mov rdi, [rsp+38h+var_18]
call _strlen
mov rcx, rax
mov rax, [rsp+38h+var_30]
mov [rax+8], rcx
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_8], rax
add rsp, 38h
retn
| long long ZN3fmt2v819basic_format_stringIcJmEEC2IA65_cTnNSt9enable_ifIXsr3std14is_convertibleIRKT_NS0_17basic_string_viewIcEEEE5valueEiE4typeELi0EEES8_(
_QWORD *a1,
long long a2)
{
*a1 = a2;
a1[1] = strlen(a2);
return a2;
}
| _ZN3fmt2v819basic_format_stringIcJmEEC2IA65_cTnNSt9enable_ifIXsr3std14is_convertibleIRKT_NS0_17basic_string_viewIcEEEE5valueEiE4typeELi0EEES8_:
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00119f90
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
ADD RSP,0x38
RET
|
void _ZN3fmt2v819basic_format_stringIcJmEEC2IA65_cTnNSt9enable_ifIXsr3std14is_convertibleIRKT_NS0_17basic_string_viewIcEEEE5valueEiE4typeELi0EEES8_
(int8 *param_1,char *param_2)
{
size_t sVar1;
*param_1 = param_2;
sVar1 = strlen(param_2);
param_1[1] = sVar1;
return;
}
| |
21,551 | update_backward_delete_link | eloqsql/storage/myisam/mi_dynrec.c | static int update_backward_delete_link(MI_INFO *info, my_off_t delete_block,
my_off_t filepos)
{
MI_BLOCK_INFO block_info;
DBUG_ENTER("update_backward_delete_link");
if (delete_block != HA_OFFSET_ERROR)
{
block_info.second_read=0;
if (_mi_get_block_info(&block_info,info->dfile,delete_block)
& BLOCK_DELETED)
{
uchar buff[8];
mi_sizestore(buff,filepos);
if (info->s->file_write(info,buff, 8, delete_block+12, MYF(MY_NABP)))
DBUG_RETURN(1); /* Error on write */
}
else
{
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1); /* Wrong delete link */
}
}
DBUG_RETURN(0);
} | O0 | c | update_backward_delete_link:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x78(%rbp)
movq %rsi, -0x80(%rbp)
movq %rdx, -0x88(%rbp)
cmpq $-0x1, -0x80(%rbp)
je 0xaac34
movl $0x0, -0x10(%rbp)
movq -0x78(%rbp), %rax
movl 0x1c0(%rax), %esi
movq -0x80(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0xa9d10
andl $0x4, %eax
cmpl $0x0, %eax
je 0xaac1e
movq -0x88(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movb %al, -0x65(%rbp)
movq -0xa0(%rbp), %rax
shrq $0x8, %rax
movb %al, -0x66(%rbp)
movq -0xa0(%rbp), %rax
shrq $0x10, %rax
movb %al, -0x67(%rbp)
movq -0xa0(%rbp), %rax
shrq $0x18, %rax
movb %al, -0x68(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movb %al, -0x61(%rbp)
movq -0xa8(%rbp), %rax
shrq $0x8, %rax
movb %al, -0x62(%rbp)
movq -0xa8(%rbp), %rax
shrq $0x10, %rax
movb %al, -0x63(%rbp)
movq -0xa8(%rbp), %rax
shrq $0x18, %rax
movb %al, -0x64(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rax
movq 0x2e8(%rax), %rax
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movq -0x80(%rbp), %rcx
addq $0xc, %rcx
movl $0x8, %edx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0xaac1c
jmp 0xaac13
movl $0x1, -0x6c(%rbp)
jmp 0xaac3d
jmp 0xaac32
callq 0xf60c0
movl $0x7f, (%rax)
movl $0x1, -0x6c(%rbp)
jmp 0xaac3d
jmp 0xaac34
jmp 0xaac36
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0xac(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xaac67
movl -0xac(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| update_backward_delete_link_0:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_78], rdi
mov [rbp+var_80], rsi
mov [rbp+var_88], rdx
cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh
jz loc_AAC34
mov [rbp+var_10], 0
mov rax, [rbp+var_78]
mov esi, [rax+1C0h]
mov rdx, [rbp+var_80]
lea rdi, [rbp+var_60]
call _mi_get_block_info
and eax, 4
cmp eax, 0
jz loc_AAC1E
mov rax, [rbp+var_88]
mov [rbp+var_90], rax
mov rax, [rbp+var_88]
shr rax, 20h
mov [rbp+var_98], rax
mov rax, [rbp+var_98]
mov [rbp+var_A0], rax
mov rax, [rbp+var_A0]
mov [rbp+var_65], al
mov rax, [rbp+var_A0]
shr rax, 8
mov [rbp+var_66], al
mov rax, [rbp+var_A0]
shr rax, 10h
mov [rbp+var_67], al
mov rax, [rbp+var_A0]
shr rax, 18h
mov [rbp+var_68], al
mov rax, [rbp+var_90]
mov [rbp+var_A8], rax
mov rax, [rbp+var_A8]
mov [rbp+var_61], al
mov rax, [rbp+var_A8]
shr rax, 8
mov [rbp+var_62], al
mov rax, [rbp+var_A8]
shr rax, 10h
mov [rbp+var_63], al
mov rax, [rbp+var_A8]
shr rax, 18h
mov [rbp+var_64], al
mov rax, [rbp+var_78]
mov rax, [rax]
mov rax, [rax+2E8h]
mov rdi, [rbp+var_78]
lea rsi, [rbp+var_68]
mov rcx, [rbp+var_80]
add rcx, 0Ch
mov edx, 8
mov r8d, 4
call rax
cmp rax, 0
jz short loc_AAC1C
jmp short $+2
loc_AAC13:
mov [rbp+var_6C], 1
jmp short loc_AAC3D
loc_AAC1C:
jmp short loc_AAC32
loc_AAC1E:
call _my_thread_var
mov dword ptr [rax], 7Fh
mov [rbp+var_6C], 1
jmp short loc_AAC3D
loc_AAC32:
jmp short $+2
loc_AAC34:
jmp short $+2
loc_AAC36:
mov [rbp+var_6C], 0
loc_AAC3D:
mov eax, [rbp+var_6C]
mov [rbp+var_AC], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_AAC67
mov eax, [rbp+var_AC]
add rsp, 0B0h
pop rbp
retn
loc_AAC67:
call ___stack_chk_fail
| _BOOL8 update_backward_delete_link_0(unsigned int *a1, long long a2, long long a3)
{
const char *v3; // rsi
_BYTE v8[8]; // [rsp+48h] [rbp-68h] BYREF
char v9[80]; // [rsp+50h] [rbp-60h] BYREF
int v10; // [rsp+A0h] [rbp-10h]
unsigned long long v11; // [rsp+A8h] [rbp-8h]
v11 = __readfsqword(0x28u);
if ( a2 == -1 )
return 0;
v10 = 0;
v3 = (const char *)a1[112];
if ( (mi_get_block_info(v9, v3, a2) & 4) == 0 )
{
*(_DWORD *)my_thread_var(v9, v3) = 127;
return 1;
}
v8[2] = BYTE5(a3);
v8[3] = BYTE4(a3);
v8[0] = HIBYTE(a3);
v8[1] = BYTE6(a3);
v8[6] = BYTE1(a3);
v8[7] = a3;
v8[4] = BYTE3(a3);
v8[5] = BYTE2(a3);
return (*(long long ( **)(unsigned int *, _BYTE *, long long, long long, long long))(*(_QWORD *)a1 + 744LL))(
a1,
v8,
8LL,
a2 + 12,
4LL) != 0;
}
| update_backward_delete_link:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x78],RDI
MOV qword ptr [RBP + -0x80],RSI
MOV qword ptr [RBP + -0x88],RDX
CMP qword ptr [RBP + -0x80],-0x1
JZ 0x001aac34
MOV dword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x78]
MOV ESI,dword ptr [RAX + 0x1c0]
MOV RDX,qword ptr [RBP + -0x80]
LEA RDI,[RBP + -0x60]
CALL 0x001a9d10
AND EAX,0x4
CMP EAX,0x0
JZ 0x001aac1e
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x88]
SHR RAX,0x20
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0xa0]
MOV byte ptr [RBP + -0x65],AL
MOV RAX,qword ptr [RBP + -0xa0]
SHR RAX,0x8
MOV byte ptr [RBP + -0x66],AL
MOV RAX,qword ptr [RBP + -0xa0]
SHR RAX,0x10
MOV byte ptr [RBP + -0x67],AL
MOV RAX,qword ptr [RBP + -0xa0]
SHR RAX,0x18
MOV byte ptr [RBP + -0x68],AL
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV byte ptr [RBP + -0x61],AL
MOV RAX,qword ptr [RBP + -0xa8]
SHR RAX,0x8
MOV byte ptr [RBP + -0x62],AL
MOV RAX,qword ptr [RBP + -0xa8]
SHR RAX,0x10
MOV byte ptr [RBP + -0x63],AL
MOV RAX,qword ptr [RBP + -0xa8]
SHR RAX,0x18
MOV byte ptr [RBP + -0x64],AL
MOV RAX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x2e8]
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x80]
ADD RCX,0xc
MOV EDX,0x8
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x001aac1c
JMP 0x001aac13
LAB_001aac13:
MOV dword ptr [RBP + -0x6c],0x1
JMP 0x001aac3d
LAB_001aac1c:
JMP 0x001aac32
LAB_001aac1e:
CALL 0x001f60c0
MOV dword ptr [RAX],0x7f
MOV dword ptr [RBP + -0x6c],0x1
JMP 0x001aac3d
LAB_001aac32:
JMP 0x001aac34
LAB_001aac34:
JMP 0x001aac36
LAB_001aac36:
MOV dword ptr [RBP + -0x6c],0x0
LAB_001aac3d:
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0xac],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001aac67
MOV EAX,dword ptr [RBP + -0xac]
ADD RSP,0xb0
POP RBP
RET
LAB_001aac67:
CALL 0x0012a270
|
int4 update_backward_delete_link(long *param_1,long param_2,int8 param_3)
{
uint uVar1;
long lVar2;
int4 *puVar3;
long in_FS_OFFSET;
int4 local_74;
int1 local_70;
int1 local_6f;
int1 local_6e;
int1 local_6d;
int1 local_6c;
int1 local_6b;
int1 local_6a;
int1 local_69;
int1 local_68 [80];
int4 local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (param_2 != -1) {
local_18 = 0;
uVar1 = _mi_get_block_info(local_68,(int)param_1[0x38],param_2);
if ((uVar1 & 4) == 0) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x7f;
local_74 = 1;
goto LAB_001aac3d;
}
local_6d = (int1)((ulong)param_3 >> 0x20);
local_6e = (int1)((ulong)param_3 >> 0x28);
local_6f = (int1)((ulong)param_3 >> 0x30);
local_70 = (int1)((ulong)param_3 >> 0x38);
local_69 = (int1)param_3;
local_6a = (int1)((ulong)param_3 >> 8);
local_6b = (int1)((ulong)param_3 >> 0x10);
local_6c = (int1)((ulong)param_3 >> 0x18);
lVar2 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_70,8,param_2 + 0xc,4);
if (lVar2 != 0) {
local_74 = 1;
goto LAB_001aac3d;
}
}
local_74 = 0;
LAB_001aac3d:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_74;
}
| |
21,552 | 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>::type_name() const | monkey531[P]llama/common/json.hpp | JSON_HEDLEY_RETURNS_NON_NULL
const char* type_name() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
return "null";
case value_t::object:
return "object";
case value_t::array:
return "array";
case value_t::string:
return "string";
case value_t::boolean:
return "boolean";
case value_t::binary:
return "binary";
case value_t::discarded:
return "discarded";
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
default:
return "number";
}
} | 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>::type_name() const:
movzbl (%rdi), %eax
cmpq $0x9, %rax
ja 0x45c74
leaq 0x6e4c8(%rip), %rcx # 0xb4134
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
leaq 0x6d5bb(%rip), %rax # 0xb3236
retq
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv:
movzx eax, byte ptr [rdi]
cmp rax, 9
ja short loc_45C74
lea rcx, unk_B4134
movsxd rax, dword ptr [rcx+rax*4]
add rax, rcx
retn
loc_45C74:
lea rax, aNumber; "number"
retn
| const char * 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)
{
unsigned long long v1; // rax
v1 = *a1;
if ( v1 > 9 )
return "number";
else
return (char *)dword_B4134 + dword_B4134[v1];
}
| type_name:
MOVZX EAX,byte ptr [RDI]
CMP RAX,0x9
JA 0x00145c74
LEA RCX,[0x1b4134]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
RET
LAB_00145c74:
LEA RAX,[0x1b3236]
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::type_name() const */
char * __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this)
{
if ((ulong)(byte)*this < 10) {
return &DAT_001b4134 + *(int *)(&DAT_001b4134 + (ulong)(byte)*this * 4);
}
return "number";
}
| |
21,553 | my_strnxfrm_simple_internal | eloqsql/strings/ctype-simple.c | size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs,
uchar *dst, size_t dstlen, uint *nweights,
const uchar *src, size_t srclen)
{
const uchar *map= cs->sort_order;
uchar *d0= dst;
uint frmlen;
if ((frmlen= (uint)MY_MIN(dstlen, *nweights)) > srclen)
frmlen= (uint)srclen;
if (dst != src)
{
const uchar *end;
for (end= src + frmlen; src < end;)
*dst++= map[*src++];
}
else
{
const uchar *end;
for (end= dst + frmlen; dst < end; dst++)
*dst= map[(uchar) *dst];
}
*nweights-= frmlen;
return dst - d0;
} | O0 | c | my_strnxfrm_simple_internal:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jae 0x41e09
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x41e13
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl %eax, -0x44(%rbp)
movl %eax, %eax
cmpq -0x30(%rbp), %rax
jbe 0x41e29
movq -0x30(%rbp), %rax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x41e79
movq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x41e77
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x41e41
jmp 0x41eb5
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x41eb3
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x41e87
jmp 0x41eb5
movl -0x44(%rbp), %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nop
| my_strnxfrm_simple_internal:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_20]
mov ecx, [rcx]
cmp rax, rcx
jnb short loc_41E09
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
jmp short loc_41E13
loc_41E09:
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_60], rax
loc_41E13:
mov rax, [rbp+var_60]
mov [rbp+var_44], eax
mov eax, eax
cmp rax, [rbp+var_30]
jbe short loc_41E29
mov rax, [rbp+var_30]
mov [rbp+var_44], eax
loc_41E29:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_28]
jz short loc_41E79
mov rax, [rbp+var_28]
mov ecx, [rbp+var_44]
add rax, rcx
mov [rbp+var_50], rax
loc_41E41:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_50]
jnb short loc_41E77
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_41E41
loc_41E77:
jmp short loc_41EB5
loc_41E79:
mov rax, [rbp+var_10]
mov ecx, [rbp+var_44]
add rax, rcx
mov [rbp+var_58], rax
loc_41E87:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_58]
jnb short loc_41EB3
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_41E87
loc_41EB3:
jmp short $+2
loc_41EB5:
mov edx, [rbp+var_44]
mov rax, [rbp+var_20]
mov ecx, [rax]
sub ecx, edx
mov [rax], ecx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_40]
sub rax, rcx
pop rbp
retn
| _BYTE * my_strnxfrm_simple_internal(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned int *a4,
unsigned __int8 *a5,
unsigned long long a6)
{
unsigned __int8 *v6; // rcx
unsigned __int8 *v7; // rax
unsigned int v9; // [rsp+0h] [rbp-60h]
int v10; // [rsp+1Ch] [rbp-44h]
long long v11; // [rsp+28h] [rbp-38h]
unsigned __int8 *v12; // [rsp+38h] [rbp-28h]
unsigned __int8 *v14; // [rsp+50h] [rbp-10h]
v14 = a2;
v12 = a5;
v11 = *(_QWORD *)(a1 + 88);
if ( a3 >= *a4 )
v9 = *a4;
else
v9 = a3;
v10 = v9;
if ( v9 > a6 )
v10 = a6;
if ( a2 == a5 )
{
while ( v14 < &a2[v10] )
{
*v14 = *(_BYTE *)(v11 + *v14);
++v14;
}
}
else
{
while ( v12 < &a5[v10] )
{
v6 = v12++;
v7 = v14++;
*v7 = *(_BYTE *)(v11 + *v6);
}
}
*a4 -= v10;
return (_BYTE *)(v14 - a2);
}
| my_strnxfrm_simple_internal:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX]
CMP RAX,RCX
JNC 0x00141e09
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00141e13
LAB_00141e09:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
LAB_00141e13:
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,EAX
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00141e29
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x44],EAX
LAB_00141e29:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x00141e79
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_00141e41:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x00141e77
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x00141e41
LAB_00141e77:
JMP 0x00141eb5
LAB_00141e79:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
LAB_00141e87:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x58]
JNC 0x00141eb3
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00141e87
LAB_00141eb3:
JMP 0x00141eb5
LAB_00141eb5:
MOV EDX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX]
SUB ECX,EDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
POP RBP
RET
|
long my_strnxfrm_simple_internal
(long param_1,byte *param_2,ulong param_3,uint *param_4,byte *param_5,ulong param_6)
{
long lVar1;
ulong local_68;
uint local_4c;
byte *local_30;
byte *local_18;
lVar1 = *(long *)(param_1 + 0x58);
local_68 = param_3;
if (*param_4 <= param_3) {
local_68 = (ulong)*param_4;
}
local_4c = (uint)local_68;
if (param_6 < (local_68 & 0xffffffff)) {
local_4c = (uint)param_6;
}
if (param_2 == param_5) {
for (local_18 = param_2; local_18 < param_2 + local_4c; local_18 = local_18 + 1) {
*local_18 = *(byte *)(lVar1 + (ulong)*local_18);
}
}
else {
local_30 = param_5;
local_18 = param_2;
while (local_30 < param_5 + local_4c) {
*local_18 = *(byte *)(lVar1 + (ulong)*local_30);
local_30 = local_30 + 1;
local_18 = local_18 + 1;
}
}
*param_4 = *param_4 - local_4c;
return (long)local_18 - (long)param_2;
}
| |
21,554 | my_strnxfrm_simple_internal | eloqsql/strings/ctype-simple.c | size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs,
uchar *dst, size_t dstlen, uint *nweights,
const uchar *src, size_t srclen)
{
const uchar *map= cs->sort_order;
uchar *d0= dst;
uint frmlen;
if ((frmlen= (uint)MY_MIN(dstlen, *nweights)) > srclen)
frmlen= (uint)srclen;
if (dst != src)
{
const uchar *end;
for (end= src + frmlen; src < end;)
*dst++= map[*src++];
}
else
{
const uchar *end;
for (end= dst + frmlen; dst < end; dst++)
*dst= map[(uchar) *dst];
}
*nweights-= frmlen;
return dst - d0;
} | O3 | c | my_strnxfrm_simple_internal:
pushq %rbp
movq %rsp, %rbp
movq 0x58(%rdi), %rdi
movl (%rcx), %eax
cmpq %rdx, %rax
cmovbel %eax, %edx
cmpq %r9, %rdx
cmovbel %edx, %r9d
movq %rsi, %rax
cmpq %r8, %rsi
je 0x373e5
testq %r9, %r9
je 0x37404
leaq (%r8,%r9), %rdx
movq %rsi, %rax
movzbl (%r8), %r10d
incq %r8
movb (%rdi,%r10), %r10b
movb %r10b, (%rax)
incq %rax
cmpq %rdx, %r8
jb 0x373cd
jmp 0x37404
testq %r9, %r9
je 0x37404
leaq (%rsi,%r9), %rdx
movq %rsi, %rax
movzbl (%rax), %r8d
movb (%rdi,%r8), %r8b
movb %r8b, (%rax)
incq %rax
cmpq %rdx, %rax
jb 0x373f1
subl %r9d, (%rcx)
subq %rsi, %rax
popq %rbp
retq
| my_strnxfrm_simple_internal:
push rbp
mov rbp, rsp
mov rdi, [rdi+58h]
mov eax, [rcx]
cmp rax, rdx
cmovbe edx, eax
cmp rdx, r9
cmovbe r9d, edx
mov rax, rsi
cmp rsi, r8
jz short loc_373E5
test r9, r9
jz short loc_37404
lea rdx, [r8+r9]
mov rax, rsi
loc_373CD:
movzx r10d, byte ptr [r8]
inc r8
mov r10b, [rdi+r10]
mov [rax], r10b
inc rax
cmp r8, rdx
jb short loc_373CD
jmp short loc_37404
loc_373E5:
test r9, r9
jz short loc_37404
lea rdx, [rsi+r9]
mov rax, rsi
loc_373F1:
movzx r8d, byte ptr [rax]
mov r8b, [rdi+r8]
mov [rax], r8b
inc rax
cmp rax, rdx
jb short loc_373F1
loc_37404:
sub [rcx], r9d
sub rax, rsi
pop rbp
retn
| _BYTE * my_strnxfrm_simple_internal(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
_DWORD *a4,
unsigned __int8 *a5,
unsigned long long a6)
{
long long v6; // rdi
unsigned long long v7; // rax
unsigned __int8 *v8; // rax
unsigned __int8 *v9; // rdx
long long v10; // r10
v6 = *(_QWORD *)(a1 + 88);
v7 = (unsigned int)*a4;
if ( v7 <= a3 )
a3 = (unsigned int)v7;
if ( a3 <= a6 )
a6 = (unsigned int)a3;
v8 = a2;
if ( a2 == a5 )
{
if ( a6 )
{
v8 = a2;
do
{
*v8 = *(_BYTE *)(v6 + *v8);
++v8;
}
while ( v8 < &a2[a6] );
}
}
else if ( a6 )
{
v9 = &a5[a6];
v8 = a2;
do
{
v10 = *a5++;
*v8++ = *(_BYTE *)(v6 + v10);
}
while ( a5 < v9 );
}
*a4 -= a6;
return (_BYTE *)(v8 - a2);
}
| my_strnxfrm_simple_internal:
PUSH RBP
MOV RBP,RSP
MOV RDI,qword ptr [RDI + 0x58]
MOV EAX,dword ptr [RCX]
CMP RAX,RDX
CMOVBE EDX,EAX
CMP RDX,R9
CMOVBE R9D,EDX
MOV RAX,RSI
CMP RSI,R8
JZ 0x001373e5
TEST R9,R9
JZ 0x00137404
LEA RDX,[R8 + R9*0x1]
MOV RAX,RSI
LAB_001373cd:
MOVZX R10D,byte ptr [R8]
INC R8
MOV R10B,byte ptr [RDI + R10*0x1]
MOV byte ptr [RAX],R10B
INC RAX
CMP R8,RDX
JC 0x001373cd
JMP 0x00137404
LAB_001373e5:
TEST R9,R9
JZ 0x00137404
LEA RDX,[RSI + R9*0x1]
MOV RAX,RSI
LAB_001373f1:
MOVZX R8D,byte ptr [RAX]
MOV R8B,byte ptr [RDI + R8*0x1]
MOV byte ptr [RAX],R8B
INC RAX
CMP RAX,RDX
JC 0x001373f1
LAB_00137404:
SUB dword ptr [RCX],R9D
SUB RAX,RSI
POP RBP
RET
|
long my_strnxfrm_simple_internal
(long param_1,byte *param_2,ulong param_3,uint *param_4,byte *param_5,ulong param_6)
{
byte *pbVar1;
byte bVar2;
long lVar3;
byte *pbVar4;
ulong uVar5;
ulong uVar6;
lVar3 = *(long *)(param_1 + 0x58);
uVar5 = param_3 & 0xffffffff;
if (*param_4 <= param_3) {
uVar5 = (ulong)*param_4;
}
uVar6 = param_6 & 0xffffffff;
if (uVar5 <= param_6) {
uVar6 = uVar5;
}
pbVar4 = param_2;
if (param_2 == param_5) {
if (uVar6 != 0) {
do {
*pbVar4 = *(byte *)(lVar3 + (ulong)*pbVar4);
pbVar4 = pbVar4 + 1;
} while (pbVar4 < param_2 + uVar6);
}
}
else if (uVar6 != 0) {
pbVar1 = param_5 + uVar6;
do {
bVar2 = *param_5;
param_5 = param_5 + 1;
*pbVar4 = *(byte *)(lVar3 + (ulong)bVar2);
pbVar4 = pbVar4 + 1;
} while (param_5 < pbVar1);
}
*param_4 = *param_4 - (int)uVar6;
return (long)pbVar4 - (long)param_2;
}
| |
21,555 | pvio_socket_close | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | my_bool pvio_socket_close(MARIADB_PVIO *pvio)
{
struct st_pvio_socket *csock= NULL;
int r= 0;
if (!pvio)
return 1;
if (pvio->data)
{
csock= (struct st_pvio_socket *)pvio->data;
if (csock && csock->socket != INVALID_SOCKET)
{
r= closesocket(csock->socket);
csock->socket= INVALID_SOCKET;
}
free((gptr)pvio->data);
pvio->data= NULL;
}
return r;
} | O3 | c | pvio_socket_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2fd17
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x2fd1c
movl (%r15), %edi
cmpl $-0x1, %edi
je 0x2fd21
callq 0x13850
movl %eax, %r14d
movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF
movq (%rbx), %r15
jmp 0x2fd24
movb $0x1, %r14b
jmp 0x2fd33
xorl %r14d, %r14d
jmp 0x2fd33
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x13570
movq $0x0, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| pvio_socket_close:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
test rdi, rdi
jz short loc_2FD17
mov rbx, rdi
mov r15, [rdi]
test r15, r15
jz short loc_2FD1C
mov edi, [r15]
cmp edi, 0FFFFFFFFh
jz short loc_2FD21
call _close
mov r14d, eax
mov dword ptr [r15], 0FFFFFFFFh
mov r15, [rbx]
jmp short loc_2FD24
loc_2FD17:
mov r14b, 1
jmp short loc_2FD33
loc_2FD1C:
xor r14d, r14d
jmp short loc_2FD33
loc_2FD21:
xor r14d, r14d
loc_2FD24:
mov rdi, r15
call _free
mov qword ptr [rbx], 0
loc_2FD33:
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long pvio_socket_close(_DWORD **a1)
{
unsigned int v1; // r14d
_DWORD *v3; // r15
long long v4; // rdi
if ( a1 )
{
v3 = *a1;
if ( *a1 )
{
v4 = (unsigned int)*v3;
if ( (_DWORD)v4 == -1 )
{
v1 = 0;
}
else
{
v1 = close(v4);
*v3 = -1;
v3 = *a1;
}
free(v3);
*a1 = 0LL;
}
else
{
return 0;
}
}
else
{
LOBYTE(v1) = 1;
}
return v1;
}
| pvio_socket_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x0012fd17
MOV RBX,RDI
MOV R15,qword ptr [RDI]
TEST R15,R15
JZ 0x0012fd1c
MOV EDI,dword ptr [R15]
CMP EDI,-0x1
JZ 0x0012fd21
CALL 0x00113850
MOV R14D,EAX
MOV dword ptr [R15],0xffffffff
MOV R15,qword ptr [RBX]
JMP 0x0012fd24
LAB_0012fd17:
MOV R14B,0x1
JMP 0x0012fd33
LAB_0012fd1c:
XOR R14D,R14D
JMP 0x0012fd33
LAB_0012fd21:
XOR R14D,R14D
LAB_0012fd24:
MOV RDI,R15
CALL 0x00113570
MOV qword ptr [RBX],0x0
LAB_0012fd33:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong pvio_socket_close(int8 *param_1)
{
uint uVar1;
int8 unaff_R14;
ulong uVar2;
int *__ptr;
if (param_1 == (int8 *)0x0) {
uVar2 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1);
}
else {
__ptr = (int *)*param_1;
if (__ptr == (int *)0x0) {
uVar2 = 0;
}
else {
if (*__ptr == -1) {
uVar2 = 0;
}
else {
uVar1 = close(*__ptr);
uVar2 = (ulong)uVar1;
*__ptr = -1;
__ptr = (int *)*param_1;
}
free(__ptr);
*param_1 = 0;
}
}
return uVar2 & 0xffffffff;
}
| |
21,556 | simple_key_cache_read | eloqsql/mysys/mf_keycache.c | uchar *simple_key_cache_read(SIMPLE_KEY_CACHE_CB *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length,
uint block_length __attribute__((unused)),
int return_buffer __attribute__((unused)))
{
my_bool locked_and_incremented= FALSE;
int error=0;
uchar *start= buff;
DBUG_ENTER("simple_key_cache_read");
DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u",
(uint) file, (ulong) filepos, length));
if (keycache->key_cache_inited)
{
/* Key cache is used */
reg1 BLOCK_LINK *block;
uint read_length;
uint offset;
int page_st;
if (MYSQL_KEYCACHE_READ_START_ENABLED())
{
MYSQL_KEYCACHE_READ_START(my_filename(file), length,
(ulong) (keycache->blocks_used *
keycache->key_cache_block_size),
(ulong) (keycache->blocks_unused *
keycache->key_cache_block_size));
}
/*
When the key cache is once initialized, we use the cache_lock to
reliably distinguish the cases of normal operation, resizing, and
disabled cache. We always increment and decrement
'cnt_for_resize_op' so that a resizer can wait for pending I/O.
*/
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
Cache resizing has two phases: Flushing and re-initializing. In
the flush phase read requests are allowed to bypass the cache for
blocks not in the cache. find_key_block() returns NULL in this
case.
After the flush phase new I/O requests must wait until the
re-initialization is done. The re-initialization can be done only
if no I/O request is in progress. The reason is that
key_cache_block_size can change. With enabled cache, I/O is done
in chunks of key_cache_block_size. Every chunk tries to use a
cache block first. If the block size changes in the middle, a
block could be missed and old data could be read.
*/
while (keycache->in_resize && !keycache->resize_in_flush)
wait_on_queue(&keycache->resize_queue, &keycache->cache_lock);
/* Register the I/O for the next resize. */
inc_counter_for_resize_op(keycache);
locked_and_incremented= TRUE;
/* Requested data may not always be aligned to cache blocks. */
offset= (uint) (filepos % keycache->key_cache_block_size);
/* Read data in key_cache_block_size increments */
do
{
/* Cache could be disabled in a later iteration. */
if (!keycache->can_be_used)
{
KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache cannot be used"));
goto no_key_cache;
}
/* Start reading at the beginning of the cache block. */
filepos-= offset;
/* Do not read beyond the end of the cache block. */
read_length= length;
set_if_smaller(read_length, keycache->key_cache_block_size-offset);
KEYCACHE_DBUG_ASSERT(read_length > 0);
/* Request the cache block that matches file/pos. */
keycache->global_cache_r_requests++;
MYSQL_KEYCACHE_READ_BLOCK(keycache->key_cache_block_size);
block=find_key_block(keycache, file, filepos, level, 0, &page_st);
if (!block)
{
/*
This happens only for requests submitted during key cache
resize. The block is not in the cache and shall not go in.
Read directly from file.
*/
keycache->global_cache_read++;
keycache_pthread_mutex_unlock(&keycache->cache_lock);
error= (my_pread(file, (uchar*) buff, read_length,
filepos + offset, MYF(MY_NABP)) != 0);
keycache_pthread_mutex_lock(&keycache->cache_lock);
goto next_block;
}
if (!(block->status & BLOCK_ERROR))
{
if (page_st == PAGE_TO_BE_READ)
{
MYSQL_KEYCACHE_READ_MISS();
read_block_primary(keycache, block,
keycache->key_cache_block_size, read_length+offset);
}
else if (page_st == PAGE_WAIT_TO_BE_READ)
{
MYSQL_KEYCACHE_READ_MISS();
/* The requested page is to be read into the block buffer */
read_block_secondary(keycache, block);
/*
A secondary request must now have the block assigned to the
requested file block.
*/
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT(block->hash_link->diskpos == filepos);
}
else if (block->length < read_length + offset)
{
/*
Impossible if nothing goes wrong:
this could only happen if we are using a file with
small key blocks and are trying to read outside the file
*/
my_errno= -1;
block->status|= BLOCK_ERROR;
}
else
{
MYSQL_KEYCACHE_READ_HIT();
}
}
/* block status may have added BLOCK_ERROR in the above 'if'. */
if (!(block->status & BLOCK_ERROR))
{
{
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
#endif
/* Copy data from the cache buffer */
memcpy(buff, block->buffer+offset, (size_t) read_length);
#if !defined(SERIALIZED_READ_FROM_CACHE)
keycache_pthread_mutex_lock(&keycache->cache_lock);
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
#endif
}
}
remove_reader(block);
/* Error injection for coverage testing. */
DBUG_EXECUTE_IF("key_cache_read_block_error",
block->status|= BLOCK_ERROR;);
/* Do not link erroneous blocks into the LRU ring, but free them. */
if (!(block->status & BLOCK_ERROR))
{
/*
Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block.
*/
unreg_request(keycache, block, 1);
}
else
{
free_block(keycache, block);
error= 1;
break;
}
next_block:
buff+= read_length;
filepos+= read_length+offset;
offset= 0;
} while ((length-= read_length));
if (MYSQL_KEYCACHE_READ_DONE_ENABLED())
{
MYSQL_KEYCACHE_READ_DONE((ulong) (keycache->blocks_used *
keycache->key_cache_block_size),
(ulong) (keycache->blocks_unused *
keycache->key_cache_block_size));
}
goto end;
}
KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache not initialized"));
no_key_cache:
/* Key cache is not used */
keycache->global_cache_r_requests++;
keycache->global_cache_read++;
if (locked_and_incremented)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP)))
error= 1;
if (locked_and_incremented)
keycache_pthread_mutex_lock(&keycache->cache_lock);
end:
if (locked_and_incremented)
{
dec_counter_for_resize_op(keycache);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
}
DBUG_PRINT("exit", ("error: %d", error ));
DBUG_RETURN(error ? (uchar*) 0 : start);
} | O0 | c | simple_key_cache_read:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movb $0x0, -0x2d(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xe8259
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0xe854f
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x77654(%rip), %rsi # 0x15f8cc
movl $0xaf2, %edx # imm = 0xAF2
callq 0xe8630
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x55(%rbp)
je 0xe82a4
movq -0x8(%rbp), %rax
cmpb $0x0, 0x2(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %al
testb $0x1, %al
jne 0xe82ad
jmp 0xe82ca
movq -0x8(%rbp), %rdi
addq $0x108, %rdi # imm = 0x108
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0xe86a0
jmp 0xe8282
movq -0x8(%rbp), %rdi
callq 0xe8750
movb $0x1, -0x2d(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x50(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x3(%rax)
jne 0xe82ff
jmp 0xe82f8
jmp 0xe82fa
jmp 0xe8555
movl -0x50(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
subl -0x50(%rbp), %ecx
cmpl %ecx, %eax
jbe 0xe8333
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
subl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0xe8335
jmp 0xe8337
jmp 0xe8339
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x150(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
xorl %r8d, %r8d
leaq -0x54(%rbp), %r9
callq 0xe8770
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xe83eb
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x158(%rax)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe9050
movl -0xc(%rbp), %edi
movq -0x28(%rbp), %rsi
movl -0x4c(%rbp), %eax
movl %eax, %edx
movq -0x18(%rbp), %rcx
movl -0x50(%rbp), %eax
addq %rax, %rcx
movl $0x4, %r8d
callq 0xfcdf0
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x774f0(%rip), %rsi # 0x15f8cc
movl $0xb29, %edx # imm = 0xB29
callq 0xe8630
jmp 0xe850f
movq -0x48(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xe846a
cmpl $0x1, -0x54(%rbp)
jne 0xe841c
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
movl -0x4c(%rbp), %ecx
addl -0x50(%rbp), %ecx
callq 0xe90b0
jmp 0xe8468
cmpl $0x2, -0x54(%rbp)
jne 0xe8437
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0xe91b0
jmp 0xe8431
jmp 0xe8433
jmp 0xe8435
jmp 0xe8466
movq -0x48(%rbp), %rax
movl 0x4c(%rax), %eax
movl -0x4c(%rbp), %ecx
addl -0x50(%rbp), %ecx
cmpl %ecx, %eax
jae 0xe8462
callq 0xfea30
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq -0x48(%rbp), %rax
movl 0x50(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x50(%rax)
jmp 0xe8464
jmp 0xe8464
jmp 0xe8466
jmp 0xe8468
jmp 0xe846a
movq -0x48(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xe84c9
jmp 0xe847b
jmp 0xe847d
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe9050
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x40(%rax), %rsi
movl -0x50(%rbp), %eax
addq %rax, %rsi
movl -0x4c(%rbp), %eax
movl %eax, %edx
callq 0x2a0b0
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x77411(%rip), %rsi # 0x15f8cc
movl $0xb5e, %edx # imm = 0xB5E
callq 0xe8630
jmp 0xe84c7
jmp 0xe84c9
movq -0x48(%rbp), %rdi
callq 0xe91f0
jmp 0xe84d4
movq -0x48(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xe84f7
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0x1, %edx
callq 0xe9250
jmp 0xe850d
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0xe93e0
movl $0x1, -0x34(%rbp)
jmp 0xe854a
jmp 0xe850f
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x4c(%rbp), %eax
addl -0x50(%rbp), %eax
movl %eax, %eax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x4c(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xe82ec
jmp 0xe85e3
jmp 0xe8551
jmp 0xe8553
jmp 0xe8555
movq -0x8(%rbp), %rax
movq 0x150(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x150(%rax)
movq -0x8(%rbp), %rax
movq 0x158(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x158(%rax)
cmpb $0x0, -0x2d(%rbp)
je 0xe8597
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe9050
movl -0xc(%rbp), %edi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
movq -0x18(%rbp), %rcx
movl $0x4, %r8d
callq 0xfcdf0
cmpq $0x0, %rax
je 0xe85bf
movl $0x1, -0x34(%rbp)
cmpb $0x0, -0x2d(%rbp)
je 0xe85e1
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x772f5(%rip), %rsi # 0x15f8cc
movl $0xb96, %edx # imm = 0xB96
callq 0xe8630
jmp 0xe85e3
cmpb $0x0, -0x2d(%rbp)
je 0xe8602
movq -0x8(%rbp), %rdi
callq 0xe9550
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe9050
jmp 0xe8604
jmp 0xe8606
jmp 0xe8608
cmpl $0x0, -0x34(%rbp)
je 0xe8616
xorl %eax, %eax
movq %rax, -0x60(%rbp)
jmp 0xe861e
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
| simple_key_cache_read:
push rbp
mov rbp, rsp
sub rsp, 70h
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_2C], r9d
mov [rbp+var_2D], 0
mov [rbp+var_34], 0
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
jmp short $+2
loc_E8259:
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz loc_E854F
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0AF2h
call inline_mysql_mutex_lock_25
loc_E8282:
mov rax, [rbp+var_8]
movsx ecx, byte ptr [rax+1]
xor eax, eax
cmp ecx, 0
mov [rbp+var_55], al
jz short loc_E82A4
mov rax, [rbp+var_8]
cmp byte ptr [rax+2], 0
setnz al
xor al, 0FFh
mov [rbp+var_55], al
loc_E82A4:
mov al, [rbp+var_55]
test al, 1
jnz short loc_E82AD
jmp short loc_E82CA
loc_E82AD:
mov rdi, [rbp+var_8]
add rdi, 108h
mov rsi, [rbp+var_8]
add rsi, 0C0h
call wait_on_queue
jmp short loc_E8282
loc_E82CA:
mov rdi, [rbp+var_8]
call inc_counter_for_resize_op_0
mov [rbp+var_2D], 1
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
mov ecx, [rcx+18h]
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_50], eax
loc_E82EC:
mov rax, [rbp+var_8]
cmp byte ptr [rax+3], 0
jnz short loc_E82FF
jmp short $+2
loc_E82F8:
jmp short $+2
loc_E82FA:
jmp loc_E8555
loc_E82FF:
mov eax, [rbp+var_50]
mov ecx, eax
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
mov eax, [rbp+var_2C]
mov [rbp+var_4C], eax
mov eax, [rbp+var_4C]
mov rcx, [rbp+var_8]
mov ecx, [rcx+18h]
sub ecx, [rbp+var_50]
cmp eax, ecx
jbe short loc_E8333
mov rax, [rbp+var_8]
mov eax, [rax+18h]
sub eax, [rbp+var_50]
mov [rbp+var_4C], eax
loc_E8333:
jmp short $+2
loc_E8335:
jmp short $+2
loc_E8337:
jmp short $+2
loc_E8339:
mov rax, [rbp+var_8]
mov rcx, [rax+150h]
add rcx, 1
mov [rax+150h], rcx
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
xor r8d, r8d
lea r9, [rbp+var_54]
call find_key_block
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jnz short loc_E83EB
mov rax, [rbp+var_8]
mov rcx, [rax+158h]
add rcx, 1
mov [rax+158h], rcx
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_26
mov edi, [rbp+var_C]
mov rsi, [rbp+var_28]
mov eax, [rbp+var_4C]
mov edx, eax
mov rcx, [rbp+var_18]
mov eax, [rbp+var_50]
add rcx, rax
mov r8d, 4
call my_pread
cmp rax, 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_34], eax
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0B29h
call inline_mysql_mutex_lock_25
jmp loc_E850F
loc_E83EB:
mov rax, [rbp+var_48]
mov eax, [rax+50h]
and eax, 1
cmp eax, 0
jnz short loc_E846A
cmp [rbp+var_54], 1
jnz short loc_E841C
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov rax, [rbp+var_8]
mov edx, [rax+18h]
mov ecx, [rbp+var_4C]
add ecx, [rbp+var_50]
call read_block_primary
jmp short loc_E8468
loc_E841C:
cmp [rbp+var_54], 2
jnz short loc_E8437
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
call read_block_secondary
jmp short $+2
loc_E8431:
jmp short $+2
loc_E8433:
jmp short $+2
loc_E8435:
jmp short loc_E8466
loc_E8437:
mov rax, [rbp+var_48]
mov eax, [rax+4Ch]
mov ecx, [rbp+var_4C]
add ecx, [rbp+var_50]
cmp eax, ecx
jnb short loc_E8462
call _my_thread_var
mov dword ptr [rax], 0FFFFFFFFh
mov rax, [rbp+var_48]
mov ecx, [rax+50h]
or ecx, 1
mov [rax+50h], ecx
jmp short loc_E8464
loc_E8462:
jmp short $+2
loc_E8464:
jmp short $+2
loc_E8466:
jmp short $+2
loc_E8468:
jmp short $+2
loc_E846A:
mov rax, [rbp+var_48]
mov eax, [rax+50h]
and eax, 1
cmp eax, 0
jnz short loc_E84C9
jmp short $+2
loc_E847B:
jmp short $+2
loc_E847D:
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_26
mov rdi, [rbp+var_28]
mov rax, [rbp+var_48]
mov rsi, [rax+40h]
mov eax, [rbp+var_50]
add rsi, rax
mov eax, [rbp+var_4C]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0B5Eh
call inline_mysql_mutex_lock_25
jmp short $+2
loc_E84C7:
jmp short $+2
loc_E84C9:
mov rdi, [rbp+var_48]
call remove_reader_0
jmp short $+2
loc_E84D4:
mov rax, [rbp+var_48]
mov eax, [rax+50h]
and eax, 1
cmp eax, 0
jnz short loc_E84F7
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov edx, 1
call unreg_request_0
jmp short loc_E850D
loc_E84F7:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
call free_block_0
mov [rbp+var_34], 1
jmp short loc_E854A
loc_E850D:
jmp short $+2
loc_E850F:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
mov ecx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov eax, [rbp+var_4C]
add eax, [rbp+var_50]
mov eax, eax
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov [rbp+var_50], 0
mov ecx, [rbp+var_4C]
mov eax, [rbp+var_2C]
sub eax, ecx
mov [rbp+var_2C], eax
cmp eax, 0
jnz loc_E82EC
loc_E854A:
jmp loc_E85E3
loc_E854F:
jmp short $+2
loc_E8551:
jmp short $+2
loc_E8553:
jmp short $+2
loc_E8555:
mov rax, [rbp+var_8]
mov rcx, [rax+150h]
add rcx, 1
mov [rax+150h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+158h]
add rcx, 1
mov [rax+158h], rcx
cmp [rbp+var_2D], 0
jz short loc_E8597
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_26
loc_E8597:
mov edi, [rbp+var_C]
mov rsi, [rbp+var_28]
mov eax, [rbp+var_2C]
mov edx, eax
mov rcx, [rbp+var_18]
mov r8d, 4
call my_pread
cmp rax, 0
jz short loc_E85BF
mov [rbp+var_34], 1
loc_E85BF:
cmp [rbp+var_2D], 0
jz short loc_E85E1
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0B96h
call inline_mysql_mutex_lock_25
loc_E85E1:
jmp short $+2
loc_E85E3:
cmp [rbp+var_2D], 0
jz short loc_E8602
mov rdi, [rbp+var_8]
call dec_counter_for_resize_op_0
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_26
loc_E8602:
jmp short $+2
loc_E8604:
jmp short $+2
loc_E8606:
jmp short $+2
loc_E8608:
cmp [rbp+var_34], 0
jz short loc_E8616
xor eax, eax
mov [rbp+var_60], rax
jmp short loc_E861E
loc_E8616:
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
loc_E861E:
mov rax, [rbp+var_60]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
add rsp, 70h
pop rbp
retn
| long long simple_key_cache_read(
_BYTE *a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned int a6)
{
_BYTE *v6; // rdi
const char *v7; // rsi
char v10; // [rsp+1Bh] [rbp-55h]
int v11; // [rsp+1Ch] [rbp-54h] BYREF
unsigned int v12; // [rsp+20h] [rbp-50h]
unsigned int v13; // [rsp+24h] [rbp-4Ch]
long long key_block; // [rsp+28h] [rbp-48h]
long long v15; // [rsp+30h] [rbp-40h]
BOOL v16; // [rsp+3Ch] [rbp-34h]
char v17; // [rsp+43h] [rbp-2Dh]
unsigned int v18; // [rsp+44h] [rbp-2Ch]
long long v19; // [rsp+48h] [rbp-28h]
unsigned int v20; // [rsp+54h] [rbp-1Ch]
unsigned long long v21; // [rsp+58h] [rbp-18h]
unsigned int v22; // [rsp+64h] [rbp-Ch]
_BYTE *v23; // [rsp+68h] [rbp-8h]
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v18 = a6;
v17 = 0;
v16 = 0;
v15 = a5;
if ( *a1 )
{
inline_mysql_mutex_lock_25(v23 + 192, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 2802LL);
while ( 1 )
{
v10 = 0;
if ( v23[1] )
v10 = ~(v23[2] != 0);
if ( (v10 & 1) == 0 )
break;
wait_on_queue(v23 + 264, v23 + 192);
}
inc_counter_for_resize_op_0(v23);
v17 = 1;
v12 = v21 % *((unsigned int *)v23 + 6);
while ( v23[3] )
{
v21 -= v12;
v13 = v18;
if ( v18 > *((_DWORD *)v23 + 6) - v12 )
v13 = *((_DWORD *)v23 + 6) - v12;
++*((_QWORD *)v23 + 42);
v6 = v23;
v7 = (const char *)v22;
key_block = find_key_block(v23, v22, v21, v20, 0LL, &v11);
if ( key_block )
{
if ( (*(_DWORD *)(key_block + 80) & 1) == 0 )
{
if ( v11 == 1 )
{
read_block_primary(v23, key_block, *((unsigned int *)v23 + 6), v12 + v13);
}
else if ( v11 == 2 )
{
read_block_secondary(v23, key_block);
}
else if ( *(_DWORD *)(key_block + 76) < v12 + v13 )
{
*(_DWORD *)my_thread_var(v6, v7) = -1;
*(_DWORD *)(key_block + 80) |= 1u;
}
}
if ( (*(_DWORD *)(key_block + 80) & 1) == 0 )
{
inline_mysql_mutex_unlock_26(v23 + 192);
memcpy(v19, v12 + *(_QWORD *)(key_block + 64), v13);
inline_mysql_mutex_lock_25(v23 + 192, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 2910LL);
}
remove_reader_0(key_block);
if ( (*(_DWORD *)(key_block + 80) & 1) != 0 )
{
free_block_0(v23, key_block);
v16 = 1;
goto LABEL_33;
}
unreg_request_0(v23, key_block, 1LL);
}
else
{
++*((_QWORD *)v23 + 43);
inline_mysql_mutex_unlock_26(v23 + 192);
v16 = my_pread(v22, v19, v13, v12 + v21, 4LL) != 0;
inline_mysql_mutex_lock_25(v23 + 192, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 2857LL);
}
v19 += v13;
v21 += v12 + v13;
v12 = 0;
v18 -= v13;
if ( !v18 )
goto LABEL_33;
}
}
++*((_QWORD *)v23 + 42);
++*((_QWORD *)v23 + 43);
if ( v17 )
inline_mysql_mutex_unlock_26(v23 + 192);
if ( my_pread(v22, v19, v18, v21, 4LL) )
v16 = 1;
if ( v17 )
inline_mysql_mutex_lock_25(v23 + 192, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 2966LL);
LABEL_33:
if ( v17 )
{
dec_counter_for_resize_op_0(v23);
inline_mysql_mutex_unlock_26(v23 + 192);
}
if ( v16 )
return 0LL;
else
return v15;
}
| simple_key_cache_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],R9D
MOV byte ptr [RBP + -0x2d],0x0
MOV dword ptr [RBP + -0x34],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001e8259
LAB_001e8259:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x001e854f
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x25f8cc]
MOV EDX,0xaf2
CALL 0x001e8630
LAB_001e8282:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX ECX,byte ptr [RAX + 0x1]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x55],AL
JZ 0x001e82a4
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x2],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x55],AL
LAB_001e82a4:
MOV AL,byte ptr [RBP + -0x55]
TEST AL,0x1
JNZ 0x001e82ad
JMP 0x001e82ca
LAB_001e82ad:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x108
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
CALL 0x001e86a0
JMP 0x001e8282
LAB_001e82ca:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e8750
MOV byte ptr [RBP + -0x2d],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x18]
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x50],EAX
LAB_001e82ec:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x3],0x0
JNZ 0x001e82ff
JMP 0x001e82f8
LAB_001e82f8:
JMP 0x001e82fa
LAB_001e82fa:
JMP 0x001e8555
LAB_001e82ff:
MOV EAX,dword ptr [RBP + -0x50]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x18]
SUB ECX,dword ptr [RBP + -0x50]
CMP EAX,ECX
JBE 0x001e8333
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x18]
SUB EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x4c],EAX
LAB_001e8333:
JMP 0x001e8335
LAB_001e8335:
JMP 0x001e8337
LAB_001e8337:
JMP 0x001e8339
LAB_001e8339:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x150]
ADD RCX,0x1
MOV qword ptr [RAX + 0x150],RCX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
XOR R8D,R8D
LEA R9,[RBP + -0x54]
CALL 0x001e8770
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JNZ 0x001e83eb
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x158]
ADD RCX,0x1
MOV qword ptr [RAX + 0x158],RCX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e9050
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x4c]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x50]
ADD RCX,RAX
MOV R8D,0x4
CALL 0x001fcdf0
CMP RAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x34],EAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x25f8cc]
MOV EDX,0xb29
CALL 0x001e8630
JMP 0x001e850f
LAB_001e83eb:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001e846a
CMP dword ptr [RBP + -0x54],0x1
JNZ 0x001e841c
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x18]
MOV ECX,dword ptr [RBP + -0x4c]
ADD ECX,dword ptr [RBP + -0x50]
CALL 0x001e90b0
JMP 0x001e8468
LAB_001e841c:
CMP dword ptr [RBP + -0x54],0x2
JNZ 0x001e8437
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x001e91b0
JMP 0x001e8431
LAB_001e8431:
JMP 0x001e8433
LAB_001e8433:
JMP 0x001e8435
LAB_001e8435:
JMP 0x001e8466
LAB_001e8437:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x4c]
MOV ECX,dword ptr [RBP + -0x4c]
ADD ECX,dword ptr [RBP + -0x50]
CMP EAX,ECX
JNC 0x001e8462
CALL 0x001fea30
MOV dword ptr [RAX],0xffffffff
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX + 0x50]
OR ECX,0x1
MOV dword ptr [RAX + 0x50],ECX
JMP 0x001e8464
LAB_001e8462:
JMP 0x001e8464
LAB_001e8464:
JMP 0x001e8466
LAB_001e8466:
JMP 0x001e8468
LAB_001e8468:
JMP 0x001e846a
LAB_001e846a:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001e84c9
JMP 0x001e847b
LAB_001e847b:
JMP 0x001e847d
LAB_001e847d:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e9050
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RAX + 0x40]
MOV EAX,dword ptr [RBP + -0x50]
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x4c]
MOV EDX,EAX
CALL 0x0012a0b0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x25f8cc]
MOV EDX,0xb5e
CALL 0x001e8630
JMP 0x001e84c7
LAB_001e84c7:
JMP 0x001e84c9
LAB_001e84c9:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001e91f0
JMP 0x001e84d4
LAB_001e84d4:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x50]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x001e84f7
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,0x1
CALL 0x001e9250
JMP 0x001e850d
LAB_001e84f7:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x001e93e0
MOV dword ptr [RBP + -0x34],0x1
JMP 0x001e854a
LAB_001e850d:
JMP 0x001e850f
LAB_001e850f:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,dword ptr [RBP + -0x50]
MOV EAX,EAX
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x50],0x0
MOV ECX,dword ptr [RBP + -0x4c]
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001e82ec
LAB_001e854a:
JMP 0x001e85e3
LAB_001e854f:
JMP 0x001e8551
LAB_001e8551:
JMP 0x001e8553
LAB_001e8553:
JMP 0x001e8555
LAB_001e8555:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x150]
ADD RCX,0x1
MOV qword ptr [RAX + 0x150],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x158]
ADD RCX,0x1
MOV qword ptr [RAX + 0x158],RCX
CMP byte ptr [RBP + -0x2d],0x0
JZ 0x001e8597
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e9050
LAB_001e8597:
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOV R8D,0x4
CALL 0x001fcdf0
CMP RAX,0x0
JZ 0x001e85bf
MOV dword ptr [RBP + -0x34],0x1
LAB_001e85bf:
CMP byte ptr [RBP + -0x2d],0x0
JZ 0x001e85e1
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x25f8cc]
MOV EDX,0xb96
CALL 0x001e8630
LAB_001e85e1:
JMP 0x001e85e3
LAB_001e85e3:
CMP byte ptr [RBP + -0x2d],0x0
JZ 0x001e8602
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e9550
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e9050
LAB_001e8602:
JMP 0x001e8604
LAB_001e8604:
JMP 0x001e8606
LAB_001e8606:
JMP 0x001e8608
LAB_001e8608:
CMP dword ptr [RBP + -0x34],0x0
JZ 0x001e8616
XOR EAX,EAX
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001e861e
LAB_001e8616:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
LAB_001e861e:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0x70
POP RBP
RET
|
void * simple_key_cache_read
(char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5,
uint param_6)
{
int4 *puVar1;
long lVar2;
bool bVar3;
void *local_68;
int local_5c;
uint local_58;
uint local_54;
long local_50;
void *local_48;
uint local_3c;
char local_35;
uint local_34;
void *local_30;
int4 local_24;
ulong local_20;
int4 local_14;
char *local_10;
local_35 = '\0';
local_3c = 0;
local_48 = param_5;
local_34 = param_6;
local_30 = param_5;
local_24 = param_4;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
if (*param_1 == '\0') {
LAB_001e8555:
*(long *)(local_10 + 0x150) = *(long *)(local_10 + 0x150) + 1;
*(long *)(local_10 + 0x158) = *(long *)(local_10 + 0x158) + 1;
if (local_35 != '\0') {
inline_mysql_mutex_unlock(local_10 + 0xc0);
}
lVar2 = my_pread(local_14,local_30,local_34,local_20,4);
if (lVar2 != 0) {
local_3c = 1;
}
if (local_35 != '\0') {
inline_mysql_mutex_lock
(local_10 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xb96);
}
}
else {
inline_mysql_mutex_lock
(param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xaf2);
while( true ) {
bVar3 = false;
if (local_10[1] != '\0') {
bVar3 = local_10[2] == '\0';
}
if (!bVar3) break;
wait_on_queue(local_10 + 0x108,local_10 + 0xc0);
}
inc_counter_for_resize_op(local_10);
local_35 = '\x01';
local_58 = (uint)(local_20 % (ulong)*(uint *)(local_10 + 0x18));
do {
if (local_10[3] == '\0') goto LAB_001e8555;
local_20 = local_20 - local_58;
local_54 = local_34;
if (*(int *)(local_10 + 0x18) - local_58 < local_34) {
local_54 = *(int *)(local_10 + 0x18) - local_58;
}
*(long *)(local_10 + 0x150) = *(long *)(local_10 + 0x150) + 1;
local_50 = find_key_block(local_10,local_14,local_20,local_24,0,&local_5c);
if (local_50 == 0) {
*(long *)(local_10 + 0x158) = *(long *)(local_10 + 0x158) + 1;
inline_mysql_mutex_unlock(local_10 + 0xc0);
lVar2 = my_pread(local_14,local_30,local_54,local_20 + local_58);
local_3c = (uint)(lVar2 != 0);
inline_mysql_mutex_lock
(local_10 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xb29);
}
else {
if ((*(uint *)(local_50 + 0x50) & 1) == 0) {
if (local_5c == 1) {
read_block_primary(local_10,local_50,*(int4 *)(local_10 + 0x18),
local_54 + local_58);
}
else if (local_5c == 2) {
read_block_secondary(local_10,local_50);
}
else if (*(uint *)(local_50 + 0x4c) < local_54 + local_58) {
puVar1 = (int4 *)_my_thread_var();
*puVar1 = 0xffffffff;
*(uint *)(local_50 + 0x50) = *(uint *)(local_50 + 0x50) | 1;
}
}
if ((*(uint *)(local_50 + 0x50) & 1) == 0) {
inline_mysql_mutex_unlock(local_10 + 0xc0);
memcpy(local_30,(void *)(*(long *)(local_50 + 0x40) + (ulong)local_58),(ulong)local_54);
inline_mysql_mutex_lock
(local_10 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xb5e);
}
remove_reader(local_50);
if ((*(uint *)(local_50 + 0x50) & 1) != 0) {
free_block(local_10,local_50);
local_3c = 1;
break;
}
unreg_request(local_10,local_50,1);
}
local_30 = (void *)((long)local_30 + (ulong)local_54);
local_20 = (local_54 + local_58) + local_20;
local_58 = 0;
local_34 = local_34 - local_54;
} while (local_34 != 0);
}
if (local_35 != '\0') {
dec_counter_for_resize_op(local_10);
inline_mysql_mutex_unlock(local_10 + 0xc0);
}
if (local_3c == 0) {
local_68 = local_48;
}
else {
local_68 = (void *)0x0;
}
return local_68;
}
| |
21,557 | ma_control_file_write_and_force | eloqsql/storage/maria/ma_control_file.c | int ma_control_file_write_and_force(LSN last_checkpoint_lsn_arg,
uint32 last_logno_arg,
TrID max_trid_arg,
uint8 recovery_failures_arg)
{
uchar buffer[CF_MAX_SIZE];
uint32 sum;
my_bool no_need_sync;
DBUG_ENTER("ma_control_file_write_and_force");
/*
We don't need to sync if this is just an increase of
recovery_failures: it's even good if that counter is not increased on disk
in case of power or hardware failure (less false positives when removing
logs).
*/
no_need_sync= ((last_checkpoint_lsn == last_checkpoint_lsn_arg) &&
(last_logno == last_logno_arg) &&
(max_trid_in_control_file == max_trid_arg) &&
(recovery_failures_arg > 0));
if (control_file_fd < 0)
DBUG_RETURN(1);
#ifndef DBUG_OFF
if (maria_multi_threaded)
translog_lock_handler_assert_owner();
#endif
lsn_store(buffer + CF_LSN_OFFSET, last_checkpoint_lsn_arg);
int4store(buffer + CF_FILENO_OFFSET, last_logno_arg);
transid_store(buffer + CF_MAX_TRID_OFFSET, max_trid_arg);
(buffer + CF_RECOV_FAIL_OFFSET)[0]= recovery_failures_arg;
if (cf_changeable_size > CF_CHANGEABLE_TOTAL_SIZE)
{
/*
More room than needed for us. Must be a newer version. Clear part which
we cannot maintain, so that any future version notices we didn't
maintain its extra data.
*/
uint zeroed= cf_changeable_size - CF_CHANGEABLE_TOTAL_SIZE;
char msg[150];
bzero(buffer + CF_CHANGEABLE_TOTAL_SIZE, zeroed);
my_snprintf(msg, sizeof(msg),
"Control file must be from a newer version; zero-ing out %u"
" unknown bytes in control file at offset %u", zeroed,
cf_changeable_size + cf_create_time_size);
ma_message_no_user(ME_WARNING, msg);
}
else
{
/* not enough room for what we need to store: enlarge */
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE;
}
/* Note that the create-time portion is not touched */
/* Checksum is stored first */
compile_time_assert(CF_CHECKSUM_OFFSET == 0);
sum= my_checksum(0, buffer + CF_CHECKSUM_SIZE,
cf_changeable_size - CF_CHECKSUM_SIZE);
int4store(buffer, sum);
if (my_pwrite(control_file_fd, buffer, cf_changeable_size,
cf_create_time_size, MYF(MY_FNABP | MY_WME)) ||
(!no_need_sync && mysql_file_sync(control_file_fd, MYF(MY_WME))))
DBUG_RETURN(1);
last_checkpoint_lsn= last_checkpoint_lsn_arg;
last_logno= last_logno_arg;
max_trid_in_control_file= max_trid_arg;
recovery_failures= recovery_failures_arg;
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE; /* no more warning */
DBUG_RETURN(0);
} | O0 | c | ma_control_file_write_and_force:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp # imm = 0x310
movb %cl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x2c0(%rbp)
movl %esi, -0x2c4(%rbp)
movq %rdx, -0x2d0(%rbp)
movb %al, -0x2d1(%rbp)
movq 0x4545e5(%rip), %rcx # 0x482cf0
xorl %eax, %eax
cmpq -0x2c0(%rbp), %rcx
movb %al, -0x309(%rbp)
jne 0x2e75d
movl 0x4545d6(%rip), %ecx # 0x482cf8
xorl %eax, %eax
cmpl -0x2c4(%rbp), %ecx
movb %al, -0x309(%rbp)
jne 0x2e75d
movq 0x4545c7(%rip), %rcx # 0x482d00
xorl %eax, %eax
cmpq -0x2d0(%rbp), %rcx
movb %al, -0x309(%rbp)
jne 0x2e75d
movzbl -0x2d1(%rbp), %eax
cmpl $0x0, %eax
setg %al
movb %al, -0x309(%rbp)
movb -0x309(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x2d9(%rbp)
cmpl $0x0, 0x299d4b(%rip) # 0x2c84c0
jge 0x2e788
jmp 0x2e779
movl $0x1, -0x2b4(%rbp)
jmp 0x2e9e8
jmp 0x2e78a
jmp 0x2e78c
movq -0x2c0(%rbp), %rax
sarq $0x20, %rax
movb %al, -0x20c(%rbp)
movq -0x2c0(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, -0x20b(%rbp)
movq -0x2c0(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, -0x20a(%rbp)
jmp 0x2e7c7
leaq -0x210(%rbp), %rax
addq $0x4, %rax
addq $0x3, %rax
movq %rax, -0x2e8(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x2c0(%rbp), %rax
movl %eax, %ecx
movq -0x2e8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x2e7fb
jmp 0x2e7fd
leaq -0x210(%rbp), %rax
addq $0xb, %rax
movq %rax, -0x2f0(%rbp)
movl -0x2c4(%rbp), %ecx
movq -0x2f0(%rbp), %rax
movl %ecx, (%rax)
jmp 0x2e820
leaq -0x210(%rbp), %rax
addq $0xf, %rax
movq %rax, -0x2f8(%rbp)
movq -0x2d0(%rbp), %rax
movl %eax, %ecx
movq -0x2f8(%rbp), %rax
movl %ecx, (%rax)
movq -0x2d0(%rbp), %rax
shrq $0x20, %rax
movw %ax, %cx
movq -0x2f8(%rbp), %rax
movw %cx, 0x4(%rax)
movb -0x2d1(%rbp), %al
movb %al, -0x1fb(%rbp)
cmpl $0x16, 0x4544a0(%rip) # 0x482d10
jbe 0x2e8ea
movl 0x454498(%rip), %eax # 0x482d10
subl $0x16, %eax
movl %eax, -0x2fc(%rbp)
leaq -0x210(%rbp), %rdi
addq $0x16, %rdi
movl -0x2fc(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
leaq -0x2b0(%rbp), %rdi
movl -0x2fc(%rbp), %ecx
movl 0x454461(%rip), %r8d # 0x482d10
addl 0x454456(%rip), %r8d # 0x482d0c
movl $0x96, %esi
leaq 0x12c503(%rip), %rdx # 0x15adc5
movb $0x0, %al
callq 0x1563d0
leaq -0x2b0(%rbp), %rcx
movl $0xa8, %edi
leaq 0x12c54f(%rip), %rsi # 0x15ae2b
movl $0x800, %edx # imm = 0x800
movb $0x0, %al
callq 0xf40a0
jmp 0x2e8f4
movl $0x16, 0x45441c(%rip) # 0x482d10
jmp 0x2e8f6
jmp 0x2e8f8
leaq -0x210(%rbp), %rsi
addq $0x4, %rsi
movl 0x454407(%rip), %eax # 0x482d10
subl $0x4, %eax
movl %eax, %eax
movl %eax, %edx
xorl %edi, %edi
callq 0x10b2a0
movl %eax, -0x2d8(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x308(%rbp)
movl -0x2d8(%rbp), %ecx
movq -0x308(%rbp), %rax
movl %ecx, (%rax)
movl 0x299b80(%rip), %edi # 0x2c84c0
leaq -0x210(%rbp), %rsi
movl 0x4543c3(%rip), %eax # 0x482d10
movl %eax, %edx
movl 0x4543b7(%rip), %eax # 0x482d0c
movl %eax, %ecx
movl $0x12, %r8d
callq 0xfd050
cmpq $0x0, %rax
jne 0x2e992
cmpb $0x0, -0x2d9(%rbp)
jne 0x2e9a0
movl 0x299b49(%rip), %edx # 0x2c84c0
leaq 0x12c1ee(%rip), %rdi # 0x15ab6c
movl $0x22c, %esi # imm = 0x22C
movl $0x10, %ecx
callq 0x2ea20
cmpl $0x0, %eax
je 0x2e9a0
jmp 0x2e994
movl $0x1, -0x2b4(%rbp)
jmp 0x2e9e8
movq -0x2c0(%rbp), %rax
movq %rax, 0x454342(%rip) # 0x482cf0
movl -0x2c4(%rbp), %eax
movl %eax, 0x45433e(%rip) # 0x482cf8
movq -0x2d0(%rbp), %rax
movq %rax, 0x454338(%rip) # 0x482d00
movb -0x2d1(%rbp), %al
movb %al, 0x454334(%rip) # 0x482d08
movl $0x16, 0x454332(%rip) # 0x482d10
movl $0x0, -0x2b4(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, -0x310(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2ea15
movl -0x310(%rbp), %eax
addq $0x310, %rsp # imm = 0x310
popq %rbp
retq
callq 0x2a270
nopw (%rax,%rax)
| ma_control_file_write_and_force:
push rbp
mov rbp, rsp
sub rsp, 310h
mov al, cl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_2C0], rdi
mov [rbp+var_2C4], esi
mov [rbp+var_2D0], rdx
mov [rbp+var_2D1], al
mov rcx, cs:last_checkpoint_lsn
xor eax, eax
cmp rcx, [rbp+var_2C0]
mov [rbp+var_309], al
jnz short loc_2E75D
mov ecx, cs:last_logno
xor eax, eax
cmp ecx, [rbp+var_2C4]
mov [rbp+var_309], al
jnz short loc_2E75D
mov rcx, cs:max_trid_in_control_file
xor eax, eax
cmp rcx, [rbp+var_2D0]
mov [rbp+var_309], al
jnz short loc_2E75D
movzx eax, [rbp+var_2D1]
cmp eax, 0
setnle al
mov [rbp+var_309], al
loc_2E75D:
mov al, [rbp+var_309]
and al, 1
movzx eax, al
mov [rbp+var_2D9], al
cmp cs:control_file_fd, 0
jge short loc_2E788
jmp short $+2
loc_2E779:
mov [rbp+var_2B4], 1
jmp loc_2E9E8
loc_2E788:
jmp short $+2
loc_2E78A:
jmp short $+2
loc_2E78C:
mov rax, [rbp+var_2C0]
sar rax, 20h
mov [rbp+var_20C], al
mov rax, [rbp+var_2C0]
sar rax, 20h
shr eax, 8
mov [rbp+var_20B], al
mov rax, [rbp+var_2C0]
sar rax, 20h
shr eax, 10h
mov [rbp+var_20A], al
jmp short $+2
loc_2E7C7:
lea rax, [rbp+var_210]
add rax, 4
add rax, 3
mov [rbp+var_2E8], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_2C0]
mov ecx, eax
mov rax, [rbp+var_2E8]
mov [rax], ecx
jmp short $+2
loc_2E7FB:
jmp short $+2
loc_2E7FD:
lea rax, [rbp+var_210]
add rax, 0Bh
mov [rbp+var_2F0], rax
mov ecx, [rbp+var_2C4]
mov rax, [rbp+var_2F0]
mov [rax], ecx
jmp short $+2
loc_2E820:
lea rax, [rbp+var_210]
add rax, 0Fh
mov [rbp+var_2F8], rax
mov rax, [rbp+var_2D0]
mov ecx, eax
mov rax, [rbp+var_2F8]
mov [rax], ecx
mov rax, [rbp+var_2D0]
shr rax, 20h
mov cx, ax
mov rax, [rbp+var_2F8]
mov [rax+4], cx
mov al, [rbp+var_2D1]
mov [rbp+var_1FB], al
cmp cs:cf_changeable_size, 16h
jbe short loc_2E8EA
mov eax, cs:cf_changeable_size
sub eax, 16h
mov [rbp+var_2FC], eax
lea rdi, [rbp+var_210]
add rdi, 16h
mov eax, [rbp+var_2FC]
mov edx, eax
xor esi, esi
call _memset
lea rdi, [rbp+var_2B0]
mov ecx, [rbp+var_2FC]
mov r8d, cs:cf_changeable_size
add r8d, cs:cf_create_time_size
mov esi, 96h
lea rdx, aControlFileMus; "Control file must be from a newer versi"...
mov al, 0
call my_snprintf
lea rcx, [rbp+var_2B0]
mov edi, 0A8h
lea rsi, aAriaEngineS; "Aria engine: %s"
mov edx, 800h
mov al, 0
call my_printf_error
jmp short loc_2E8F4
loc_2E8EA:
mov cs:cf_changeable_size, 16h
loc_2E8F4:
jmp short $+2
loc_2E8F6:
jmp short $+2
loc_2E8F8:
lea rsi, [rbp+var_210]
add rsi, 4
mov eax, cs:cf_changeable_size
sub eax, 4
mov eax, eax
mov edx, eax
xor edi, edi
call my_checksum
mov [rbp+var_2D8], eax
lea rax, [rbp+var_210]
mov [rbp+var_308], rax
mov ecx, [rbp+var_2D8]
mov rax, [rbp+var_308]
mov [rax], ecx
mov edi, cs:control_file_fd
lea rsi, [rbp+var_210]
mov eax, cs:cf_changeable_size
mov edx, eax
mov eax, cs:cf_create_time_size
mov ecx, eax
mov r8d, 12h
call my_pwrite
cmp rax, 0
jnz short loc_2E992
cmp [rbp+var_2D9], 0
jnz short loc_2E9A0
mov edx, cs:control_file_fd
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 22Ch
mov ecx, 10h
call inline_mysql_file_sync
cmp eax, 0
jz short loc_2E9A0
loc_2E992:
jmp short $+2
loc_2E994:
mov [rbp+var_2B4], 1
jmp short loc_2E9E8
loc_2E9A0:
mov rax, [rbp+var_2C0]
mov cs:last_checkpoint_lsn, rax
mov eax, [rbp+var_2C4]
mov cs:last_logno, eax
mov rax, [rbp+var_2D0]
mov cs:max_trid_in_control_file, rax
mov al, [rbp+var_2D1]
mov cs:recovery_failures, al
mov cs:cf_changeable_size, 16h
mov [rbp+var_2B4], 0
loc_2E9E8:
mov eax, [rbp+var_2B4]
mov [rbp+var_310], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2EA15
mov eax, [rbp+var_310]
add rsp, 310h
pop rbp
retn
loc_2EA15:
call ___stack_chk_fail
| long long ma_control_file_write_and_force(long long a1, int a2, long long a3, char a4)
{
int v4; // r9d
int v5; // r8d
int v6; // r9d
bool v8; // [rsp+7h] [rbp-309h]
int v9; // [rsp+14h] [rbp-2FCh]
_BYTE v13[160]; // [rsp+60h] [rbp-2B0h] BYREF
int v14; // [rsp+100h] [rbp-210h] BYREF
__int16 v15; // [rsp+104h] [rbp-20Ch] BYREF
char v16; // [rsp+106h] [rbp-20Ah]
int v17; // [rsp+107h] [rbp-209h]
int v18; // [rsp+10Bh] [rbp-205h]
int v19; // [rsp+10Fh] [rbp-201h]
__int16 v20; // [rsp+113h] [rbp-1FDh]
char v21; // [rsp+115h] [rbp-1FBh]
_BYTE v22[506]; // [rsp+116h] [rbp-1FAh] BYREF
*(_QWORD *)&v22[498] = __readfsqword(0x28u);
v8 = 0;
if ( last_checkpoint_lsn == a1 )
{
v8 = 0;
if ( last_logno == a2 )
{
v8 = 0;
if ( max_trid_in_control_file == a3 )
v8 = a4 != 0;
}
}
if ( control_file_fd >= 0 )
{
v15 = WORD2(a1);
v16 = BYTE6(a1);
v17 = a1;
v18 = a2;
v19 = a3;
v20 = WORD2(a3);
v21 = a4;
if ( (unsigned int)cf_changeable_size <= 0x16 )
{
cf_changeable_size = 22;
}
else
{
v9 = cf_changeable_size - 22;
memset(v22, 0LL, (unsigned int)(cf_changeable_size - 22));
my_snprintf(
(unsigned int)v13,
150,
(unsigned int)"Control file must be from a newer version; zero-ing out %u unknown bytes in control file at offset %u",
v9,
cf_create_time_size + cf_changeable_size,
v4);
my_printf_error(168, (unsigned int)"Aria engine: %s", 2048, (unsigned int)v13, v5, v6);
}
v14 = my_checksum(0LL, &v15, (unsigned int)(cf_changeable_size - 4));
if ( my_pwrite(
(unsigned int)control_file_fd,
&v14,
(unsigned int)cf_changeable_size,
(unsigned int)cf_create_time_size,
18LL)
|| !v8
&& (unsigned int)inline_mysql_file_sync(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",
556LL,
(unsigned int)control_file_fd,
16LL) )
{
return 1;
}
else
{
last_checkpoint_lsn = a1;
last_logno = a2;
max_trid_in_control_file = a3;
recovery_failures = a4;
cf_changeable_size = 22;
return 0;
}
}
else
{
return 1;
}
}
| ma_control_file_write_and_force:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x310
MOV AL,CL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x2c0],RDI
MOV dword ptr [RBP + -0x2c4],ESI
MOV qword ptr [RBP + -0x2d0],RDX
MOV byte ptr [RBP + -0x2d1],AL
MOV RCX,qword ptr [0x00582cf0]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x2c0]
MOV byte ptr [RBP + -0x309],AL
JNZ 0x0012e75d
MOV ECX,dword ptr [0x00582cf8]
XOR EAX,EAX
CMP ECX,dword ptr [RBP + -0x2c4]
MOV byte ptr [RBP + -0x309],AL
JNZ 0x0012e75d
MOV RCX,qword ptr [0x00582d00]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x2d0]
MOV byte ptr [RBP + -0x309],AL
JNZ 0x0012e75d
MOVZX EAX,byte ptr [RBP + -0x2d1]
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x309],AL
LAB_0012e75d:
MOV AL,byte ptr [RBP + -0x309]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x2d9],AL
CMP dword ptr [0x003c84c0],0x0
JGE 0x0012e788
JMP 0x0012e779
LAB_0012e779:
MOV dword ptr [RBP + -0x2b4],0x1
JMP 0x0012e9e8
LAB_0012e788:
JMP 0x0012e78a
LAB_0012e78a:
JMP 0x0012e78c
LAB_0012e78c:
MOV RAX,qword ptr [RBP + -0x2c0]
SAR RAX,0x20
MOV byte ptr [RBP + -0x20c],AL
MOV RAX,qword ptr [RBP + -0x2c0]
SAR RAX,0x20
SHR EAX,0x8
MOV byte ptr [RBP + -0x20b],AL
MOV RAX,qword ptr [RBP + -0x2c0]
SAR RAX,0x20
SHR EAX,0x10
MOV byte ptr [RBP + -0x20a],AL
JMP 0x0012e7c7
LAB_0012e7c7:
LEA RAX,[RBP + -0x210]
ADD RAX,0x4
ADD RAX,0x3
MOV qword ptr [RBP + -0x2e8],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x2c0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x2e8]
MOV dword ptr [RAX],ECX
JMP 0x0012e7fb
LAB_0012e7fb:
JMP 0x0012e7fd
LAB_0012e7fd:
LEA RAX,[RBP + -0x210]
ADD RAX,0xb
MOV qword ptr [RBP + -0x2f0],RAX
MOV ECX,dword ptr [RBP + -0x2c4]
MOV RAX,qword ptr [RBP + -0x2f0]
MOV dword ptr [RAX],ECX
JMP 0x0012e820
LAB_0012e820:
LEA RAX,[RBP + -0x210]
ADD RAX,0xf
MOV qword ptr [RBP + -0x2f8],RAX
MOV RAX,qword ptr [RBP + -0x2d0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x2f8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x2d0]
SHR RAX,0x20
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x2f8]
MOV word ptr [RAX + 0x4],CX
MOV AL,byte ptr [RBP + -0x2d1]
MOV byte ptr [RBP + -0x1fb],AL
CMP dword ptr [0x00582d10],0x16
JBE 0x0012e8ea
MOV EAX,dword ptr [0x00582d10]
SUB EAX,0x16
MOV dword ptr [RBP + -0x2fc],EAX
LEA RDI,[RBP + -0x210]
ADD RDI,0x16
MOV EAX,dword ptr [RBP + -0x2fc]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
LEA RDI,[RBP + -0x2b0]
MOV ECX,dword ptr [RBP + -0x2fc]
MOV R8D,dword ptr [0x00582d10]
ADD R8D,dword ptr [0x00582d0c]
MOV ESI,0x96
LEA RDX,[0x25adc5]
MOV AL,0x0
CALL 0x002563d0
LEA RCX,[RBP + -0x2b0]
MOV EDI,0xa8
LEA RSI,[0x25ae2b]
MOV EDX,0x800
MOV AL,0x0
CALL 0x001f40a0
JMP 0x0012e8f4
LAB_0012e8ea:
MOV dword ptr [0x00582d10],0x16
LAB_0012e8f4:
JMP 0x0012e8f6
LAB_0012e8f6:
JMP 0x0012e8f8
LAB_0012e8f8:
LEA RSI,[RBP + -0x210]
ADD RSI,0x4
MOV EAX,dword ptr [0x00582d10]
SUB EAX,0x4
MOV EAX,EAX
MOV EDX,EAX
XOR EDI,EDI
CALL 0x0020b2a0
MOV dword ptr [RBP + -0x2d8],EAX
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x308],RAX
MOV ECX,dword ptr [RBP + -0x2d8]
MOV RAX,qword ptr [RBP + -0x308]
MOV dword ptr [RAX],ECX
MOV EDI,dword ptr [0x003c84c0]
LEA RSI,[RBP + -0x210]
MOV EAX,dword ptr [0x00582d10]
MOV EDX,EAX
MOV EAX,dword ptr [0x00582d0c]
MOV ECX,EAX
MOV R8D,0x12
CALL 0x001fd050
CMP RAX,0x0
JNZ 0x0012e992
CMP byte ptr [RBP + -0x2d9],0x0
JNZ 0x0012e9a0
MOV EDX,dword ptr [0x003c84c0]
LEA RDI,[0x25ab6c]
MOV ESI,0x22c
MOV ECX,0x10
CALL 0x0012ea20
CMP EAX,0x0
JZ 0x0012e9a0
LAB_0012e992:
JMP 0x0012e994
LAB_0012e994:
MOV dword ptr [RBP + -0x2b4],0x1
JMP 0x0012e9e8
LAB_0012e9a0:
MOV RAX,qword ptr [RBP + -0x2c0]
MOV qword ptr [0x00582cf0],RAX
MOV EAX,dword ptr [RBP + -0x2c4]
MOV dword ptr [0x00582cf8],EAX
MOV RAX,qword ptr [RBP + -0x2d0]
MOV qword ptr [0x00582d00],RAX
MOV AL,byte ptr [RBP + -0x2d1]
MOV byte ptr [0x00582d08],AL
MOV dword ptr [0x00582d10],0x16
MOV dword ptr [RBP + -0x2b4],0x0
LAB_0012e9e8:
MOV EAX,dword ptr [RBP + -0x2b4]
MOV dword ptr [RBP + -0x310],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012ea15
MOV EAX,dword ptr [RBP + -0x310]
ADD RSP,0x310
POP RBP
RET
LAB_0012ea15:
CALL 0x0012a270
|
int4 ma_control_file_write_and_force(long param_1,int param_2,long param_3,char param_4)
{
bool bVar1;
uint uVar2;
int iVar3;
long lVar4;
long in_FS_OFFSET;
int4 local_2bc;
int1 local_2b8 [160];
int4 local_218;
int1 local_214;
int1 local_213;
int1 local_212;
int4 local_211;
int local_20d;
int4 local_209;
int2 local_205;
char local_203;
int1 auStack_202 [498];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
bVar1 = false;
if (((last_checkpoint_lsn == param_1) && (bVar1 = false, last_logno == param_2)) &&
(bVar1 = false, max_trid_in_control_file == param_3)) {
bVar1 = param_4 != '\0';
}
if (control_file_fd < 0) {
local_2bc = 1;
goto LAB_0012e9e8;
}
local_214 = (int1)((ulong)param_1 >> 0x20);
local_213 = (int1)((ulong)param_1 >> 0x28);
local_212 = (int1)((ulong)param_1 >> 0x30);
local_211 = (int4)param_1;
local_209 = (int4)param_3;
local_205 = (int2)((ulong)param_3 >> 0x20);
local_203 = param_4;
local_20d = param_2;
if (cf_changeable_size < 0x17) {
cf_changeable_size = 0x16;
}
else {
uVar2 = cf_changeable_size - 0x16;
memset(auStack_202,0,(ulong)uVar2);
my_snprintf(local_2b8,0x96,
"Control file must be from a newer version; zero-ing out %u unknown bytes in control file at offset %u"
,uVar2,cf_changeable_size + cf_create_time_size);
my_printf_error(0xa8,"Aria engine: %s",0x800,local_2b8);
}
local_218 = my_checksum(0,&local_214,cf_changeable_size - 4);
lVar4 = my_pwrite(control_file_fd,&local_218,cf_changeable_size,cf_create_time_size,0x12);
if (lVar4 == 0) {
if (!bVar1) {
iVar3 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",
0x22c,control_file_fd,0x10);
if (iVar3 != 0) goto LAB_0012e992;
}
cf_changeable_size = 0x16;
local_2bc = 0;
last_checkpoint_lsn = param_1;
last_logno = param_2;
max_trid_in_control_file = param_3;
recovery_failures = param_4;
}
else {
LAB_0012e992:
local_2bc = 1;
}
LAB_0012e9e8:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_2bc;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
21,558 | minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
// https://jinja.palletsprojects.com/en/3.0.x/templates/#for
if (!iterable) throw std::runtime_error("ForNode.iterable is null");
if (!body) throw std::runtime_error("ForNode.body is null");
auto iterable_value = iterable->evaluate(context);
Value::CallableType loop_function;
std::function<void(Value&)> visit = [&](Value& iter) {
auto filtered_items = Value::array();
if (!iter.is_null()) {
if (!iterable_value.is_iterable()) {
throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump());
}
iterable_value.for_each([&](Value & item) {
destructuring_assign(var_names, context, item);
if (!condition || condition->evaluate(context).to_bool()) {
filtered_items.push_back(item);
}
});
}
if (filtered_items.empty()) {
if (else_body) {
else_body->render(out, context);
}
} else {
auto loop = recursive ? Value::callable(loop_function) : Value::object();
loop.set("length", (int64_t) filtered_items.size());
size_t cycle_index = 0;
loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) {
if (args.args.empty() || !args.kwargs.empty()) {
throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg");
}
auto item = args.args[cycle_index];
cycle_index = (cycle_index + 1) % args.args.size();
return item;
}));
auto loop_context = Context::make(Value::object(), context);
loop_context->set("loop", loop);
for (size_t i = 0, n = filtered_items.size(); i < n; ++i) {
auto & item = filtered_items.at(i);
destructuring_assign(var_names, loop_context, item);
loop.set("index", (int64_t) i + 1);
loop.set("index0", (int64_t) i);
loop.set("revindex", (int64_t) (n - i));
loop.set("revindex0", (int64_t) (n - i - 1));
loop.set("length", (int64_t) n);
loop.set("first", i == 0);
loop.set("last", i == (n - 1));
loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value());
loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value());
try {
body->render(out, loop_context);
} catch (const LoopControlException & e) {
if (e.control_type == LoopControlType::Break) break;
if (e.control_type == LoopControlType::Continue) continue;
}
}
}
};
if (recursive) {
loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) {
if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) {
throw std::runtime_error("loop() expects exactly 1 positional iterable argument");
}
auto & items = args.args[0];
visit(items);
return Value();
};
}
visit(iterable_value);
} | O2 | cpp | minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq 0x38(%rdi), %rsi
testq %rsi, %rsi
je 0x6f73c
movq %rdi, %rbx
cmpq $0x0, 0x58(%rdi)
je 0x6f758
movq %rdx, %r15
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x5fa48
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
leaq 0x40(%rsp), %rsi
movq %r12, (%rsi)
movq %rbx, 0x8(%rsi)
movq %r15, 0x10(%rsi)
movq %r14, 0x18(%rsi)
movq %rax, 0x20(%rsi)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x6f824
cmpb $0x1, 0x68(%rbx)
jne 0x6f702
leaq 0x40(%rsp), %rsi
movq %r14, (%rsi)
movq %rsp, %rdi
callq 0x6f86c
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x69a30
leaq 0x20(%rsp), %rdi
callq 0x2a646
movq %rsp, %rdi
callq 0x2a646
leaq 0x68(%rsp), %rdi
callq 0x5fcd8
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x213a0
movq %rax, %r14
leaq 0x2e5f3(%rip), %rsi # 0x9dd41
movq %rax, %rdi
callq 0x21280
jmp 0x6f772
pushq $0x10
popq %rdi
callq 0x213a0
movq %rax, %r14
leaq 0x2e5f0(%rip), %rsi # 0x9dd5a
movq %rax, %rdi
callq 0x21280
movq 0x6c86f(%rip), %rsi # 0xdbfe8
movq 0x6c7e8(%rip), %rdx # 0xdbf68
movq %r14, %rdi
callq 0x21b70
jmp 0x6f78a
movq %rax, %rbx
movq %r14, %rdi
callq 0x21530
jmp 0x6f7bb
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2a646
jmp 0x6f7a9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2a646
leaq 0x68(%rsp), %rdi
callq 0x5fcd8
movq %rbx, %rdi
callq 0x21be0
nop
| _ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 0B8h
mov r14, rsi
mov rsi, [rdi+38h]
test rsi, rsi
jz loc_6F73C
mov rbx, rdi
cmp qword ptr [rdi+58h], 0
jz loc_6F758
mov r15, rdx
lea r12, [rsp+0D8h+var_70]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
xorps xmm0, xmm0
mov rax, rsp
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax], xmm0
lea rsi, [rsp+0D8h+var_98]
mov [rsi], r12
mov [rsi+8], rbx
mov [rsi+10h], r15
mov [rsi+18h], r14
mov [rsi+20h], rax
lea r14, [rsp+0D8h+var_B8]
mov rdi, r14
call _ZNSt8functionIFvRN5minja5ValueEEEC2IZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_vEEOT_; std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>(minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1} &&)
cmp byte ptr [rbx+68h], 1
jnz short loc_6F702
lea rsi, [rsp+0D8h+var_98]
mov [rsi], r14
mov rdi, rsp
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_
loc_6F702:
lea rdi, [rsp+0D8h+var_B8]
lea rsi, [rsp+0D8h+var_70]
call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &)
lea rdi, [rsp+0D8h+var_B8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+0D8h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add rsp, 0B8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_6F73C:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFornodeIterabl; "ForNode.iterable is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_6F772
loc_6F758:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFornodeBodyIsN; "ForNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_6F772:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short $+2
loc_6F78A:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6F7BB
mov rbx, rax
lea rdi, [rsp+0D8h+var_B8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_6F7A9
mov rbx, rax
loc_6F7A9:
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+0D8h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6F7BB:
mov rdi, rbx
call __Unwind_Resume
| void minja::ForNode::do_render(long long a1, long long a2, long long a3)
{
void (***v4)(void); // rsi
long long v6; // rdx
long long v7; // rcx
long long v8; // r8
long long v9; // r9
std::runtime_error *exception; // r14
_BYTE v11[32]; // [rsp+0h] [rbp-D8h] BYREF
_BYTE v12[32]; // [rsp+20h] [rbp-B8h] BYREF
_QWORD v13[5]; // [rsp+40h] [rbp-98h] BYREF
_BYTE v14[112]; // [rsp+68h] [rbp-70h] BYREF
v4 = *(void (****)(void))(a1 + 56);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ForNode.iterable is null");
goto LABEL_8;
}
if ( !*(_QWORD *)(a1 + 88) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ForNode.body is null");
LABEL_8:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v14, v4);
v13[0] = v14;
v13[1] = a1;
v13[2] = a3;
v13[3] = a2;
v13[4] = v11;
std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>(
v12,
v13,
v6,
v7,
v8,
v9,
0LL,
0LL,
0LL,
0LL);
if ( *(_BYTE *)(a1 + 104) == 1 )
{
v13[0] = v12;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(v11);
}
std::function<void ()(minja::Value &)>::operator()((long long)v12);
std::_Function_base::~_Function_base((std::_Function_base *)v12);
std::_Function_base::~_Function_base((std::_Function_base *)v11);
minja::Value::~Value((minja::Value *)v14);
}
| do_render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RSI
MOV RSI,qword ptr [RDI + 0x38]
TEST RSI,RSI
JZ 0x0016f73c
MOV RBX,RDI
CMP qword ptr [RDI + 0x58],0x0
JZ 0x0016f758
MOV R15,RDX
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x0015fa48
XORPS XMM0,XMM0
MOV RAX,RSP
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
LEA RSI,[RSP + 0x40]
MOV qword ptr [RSI],R12
MOV qword ptr [RSI + 0x8],RBX
MOV qword ptr [RSI + 0x10],R15
MOV qword ptr [RSI + 0x18],R14
MOV qword ptr [RSI + 0x20],RAX
LAB_0016f6df:
LEA R14,[RSP + 0x20]
MOV RDI,R14
CALL 0x0016f824
CMP byte ptr [RBX + 0x68],0x1
JNZ 0x0016f702
LEA RSI,[RSP + 0x40]
MOV qword ptr [RSI],R14
MOV RDI,RSP
CALL 0x0016f86c
LAB_0016f702:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x68]
CALL 0x00169a30
LAB_0016f711:
LEA RDI,[RSP + 0x20]
CALL 0x0012a646
MOV RDI,RSP
CALL 0x0012a646
LEA RDI,[RSP + 0x68]
CALL 0x0015fcd8
ADD RSP,0xb8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0016f73c:
PUSH 0x10
POP RDI
CALL 0x001213a0
MOV R14,RAX
LAB_0016f747:
LEA RSI,[0x19dd41]
MOV RDI,RAX
CALL 0x00121280
LAB_0016f756:
JMP 0x0016f772
LAB_0016f758:
PUSH 0x10
POP RDI
CALL 0x001213a0
MOV R14,RAX
LAB_0016f763:
LEA RSI,[0x19dd5a]
MOV RDI,RAX
CALL 0x00121280
LAB_0016f772:
MOV RSI,qword ptr [0x001dbfe8]
MOV RDX,qword ptr [0x001dbf68]
MOV RDI,R14
CALL 0x00121b70
|
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2)
{
runtime_error *this_00;
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 uStack_c0;
_lambda_minja__Value___1_ local_b8 [32];
Expression *local_98;
ForNode *local_90;
shared_ptr *local_88;
ostringstream *local_80;
int1 *local_78;
Expression local_70 [80];
if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016f747 to 0016f755 has its CatchHandler @ 0016f78a */
std::runtime_error::runtime_error(this_00,"ForNode.iterable is null");
}
else {
if (*(long *)(this + 0x58) != 0) {
Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38));
local_c8 = 0;
uStack_c0 = 0;
local_d8 = 0;
uStack_d0 = 0;
/* try { // try from 0016f6df to 0016f6eb has its CatchHandler @ 0016f7a6 */
local_98 = local_70;
local_90 = this;
local_88 = param_2;
local_80 = param_1;
local_78 = (int1 *)&local_d8;
std::function<void(minja::Value&)>::
function<minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::_lambda(minja::Value&)_1_,void>
(local_b8);
if (this[0x68] == (ForNode)0x1) {
local_98 = (Expression *)local_b8;
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>
*)&local_d8,
(_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *)
&local_98);
}
/* try { // try from 0016f702 to 0016f710 has its CatchHandler @ 0016f797 */
std::function<void(minja::Value&)>::operator()
((function<void(minja::Value&)> *)local_b8,(Value *)local_70);
std::_Function_base::~_Function_base((_Function_base *)local_b8);
std::_Function_base::~_Function_base((_Function_base *)&local_d8);
Value::~Value((Value *)local_70);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016f763 to 0016f771 has its CatchHandler @ 0016f788 */
std::runtime_error::runtime_error(this_00,"ForNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001dbfe8,PTR__runtime_error_001dbf68);
}
| |
21,559 | minja::SliceExpr::~SliceExpr() | monkey531[P]llama/common/minja.hpp | SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e)
: Expression(location), start(std::move(s)), end(std::move(e)) {} | O1 | cpp | minja::SliceExpr::~SliceExpr():
pushq %rbx
movq %rdi, %rbx
leaq 0x9d361(%rip), %rax # 0x12f6d8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x9238c
callq 0x6fa60
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x9239a
callq 0x6fa60
leaq 0x9d007(%rip), %rax # 0x12f3a8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x923b7
popq %rbx
jmp 0x6fa60
popq %rbx
retq
nop
| _ZN5minja9SliceExprD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_9238C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9238C:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_9239A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9239A:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_923B7
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_923B7:
pop rbx
retn
| void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
volatile signed __int32 *v4; // rdi
*(_QWORD *)this = &`vtable for'minja::SliceExpr + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
v3 = (volatile signed __int32 *)*((_QWORD *)this + 5);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
*(_QWORD *)this = &`vtable for'minja::Expression + 2;
v4 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v4 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4);
}
| ~SliceExpr:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22f6d8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0019238c
CALL 0x0016fa60
LAB_0019238c:
MOV RDI,qword ptr [RBX + 0x28]
TEST RDI,RDI
JZ 0x0019239a
CALL 0x0016fa60
LAB_0019239a:
LEA RAX,[0x22f3a8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x001923b7
POP RBX
JMP 0x0016fa60
LAB_001923b7:
POP RBX
RET
|
/* minja::SliceExpr::~SliceExpr() */
void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this)
{
*(int ***)this = &PTR_do_evaluate_0022f6e8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28));
}
*(int ***)this = &PTR___cxa_pure_virtual_0022f3b8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
return;
}
return;
}
| |
21,560 | testing::internal::RegisterTypeParameterizedTestSuite(char const*, testing::internal::CodeLocation) | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc | void RegisterTypeParameterizedTestSuite(const char* test_suite_name,
CodeLocation code_location) {
GetUnitTestImpl()->type_parameterized_test_registry().RegisterTestSuite(
test_suite_name, code_location);
} | O1 | cpp | testing::internal::RegisterTypeParameterizedTestSuite(char const*, testing::internal::CodeLocation):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1d29e
movl $0x100, %r15d # imm = 0x100
addq 0x4140f43(%rip), %r15 # 0x415df60
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xf66a
movl 0x20(%rbx), %eax
movl %eax, 0x20(%r12)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1e0f6
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1d06a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1d092
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq %rbx, %rdi
callq 0x99a0
| _ZN7testing8internal34RegisterTypeParameterizedTestSuiteEPKcNS0_12CodeLocationE:
push r15; int
push r14; void *
push r13; int
push r12; __int64
push rbx; int
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
mov r15d, 100h
add r15, cs:qword_415DF60
lea r13, [rsp+58h+var_40]
mov [r13-10h], r13
mov rsi, [rbx]
mov rdx, [rbx+8]
add rdx, rsi
lea r12, [rsp+58h+var_50]
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)
mov eax, [rbx+20h]
mov [r12+20h], eax
mov rdi, r15; int
mov rsi, r14; int
mov rdx, r12; int
call _ZN7testing8internal34TypeParameterizedTestSuiteRegistry17RegisterTestSuiteEPKcNS0_12CodeLocationE; testing::internal::TypeParameterizedTestSuiteRegistry::RegisterTestSuite(char const*,testing::internal::CodeLocation)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_1D06A
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1D06A:
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_1D092
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1D092:
mov rdi, rbx
call __Unwind_Resume
| RegisterTypeParameterizedTestSuite:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
CALL 0x0011d29e
MOV R15D,0x100
ADD R15,qword ptr [0x0425df60]
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
ADD RDX,RSI
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x0010f66a
MOV EAX,dword ptr [RBX + 0x20]
MOV dword ptr [R12 + 0x20],EAX
LAB_0011d045:
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x0011e0f6
LAB_0011d053:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x0011d06a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001094c0
LAB_0011d06a:
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* testing::internal::RegisterTypeParameterizedTestSuite(char const*,
testing::internal::CodeLocation) */
void testing::internal::RegisterTypeParameterizedTestSuite(int8 param_1,long *param_2)
{
TypeParameterizedTestSuiteRegistry *pTVar1;
long *local_50 [2];
long local_40 [2];
int4 local_30;
UnitTest::GetInstance();
pTVar1 = (TypeParameterizedTestSuiteRegistry *)(UnitTest::GetInstance()::instance._64_8_ + 0x100);
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char*>(local_50,*param_2,param_2[1] + *param_2);
local_30 = (int4)param_2[4];
/* try { // try from 0011d045 to 0011d052 has its CatchHandler @ 0011d078 */
TypeParameterizedTestSuiteRegistry::RegisterTestSuite(pTVar1,param_1,local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return;
}
| ||
21,561 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const | hkr04[P]cpp-mcp/common/json.hpp | const_reference operator[](size_type idx) const
{
// const operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x2, (%rdi)
jne 0xc813
movq 0x8(%r14), %rax
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x8280
movq %rax, %rbx
movq %r14, %rdi
callq 0xb6b4
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x35ba9(%rip), %rsi # 0x423e0
leaq 0x10(%rsp), %rdi
callq 0xc8ac
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0xb460
xorl %ebp, %ebp
leaq 0x4f97e(%rip), %rsi # 0x5c1e0
leaq 0xcb(%rip), %rdx # 0xc934
movq %rbx, %rdi
callq 0x8900
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc897
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8580
jmp 0xc897
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xc8a4
movq %rbx, %rdi
callq 0x83e0
movq %r14, %rdi
callq 0x8960
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 2
jnz short loc_C813
mov rax, [r14+8]
shl rsi, 4
add rsi, [rax]
mov rax, rsi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_C813:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_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_C897
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C897
mov r14, rax
mov bpl, 1
loc_C897:
test bpl, bpl
jz short loc_C8A4
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C8A4:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
v4,
"cannot use operator[] with a numeric argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x2
JNZ 0x0010c813
MOV RAX,qword ptr [R14 + 0x8]
SHL RSI,0x4
ADD RSI,qword ptr [RAX]
MOV RAX,RSI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0010c813:
MOV EDI,0x20
CALL 0x00108280
MOV RBX,RAX
MOV RDI,R14
CALL 0x0010b6b4
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0010c830:
LEA RSI,[0x1423e0]
LEA RDI,[RSP + 0x10]
CALL 0x0010c8ac
MOV BPL,0x1
LAB_0010c844:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0010b460
XOR EBP,EBP
LEA RSI,[0x15c1e0]
LEA RDX,[0x10c934]
MOV RDI,RBX
CALL 0x00108900
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0010c830 to 0010c840 has its CatchHandler @ 0010c891 */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 0010c844 to 0010c870 has its CatchHandler @ 0010c871 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
21,562 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const | hkr04[P]cpp-mcp/common/json.hpp | const_reference operator[](size_type idx) const
{
// const operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x2, (%rdi)
jne 0xc609
movq 0x8(%r14), %rax
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rsi, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x8280
movq %rax, %rbx
movq %r14, %rdi
callq 0xb486
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x35db3(%rip), %rsi # 0x423e0
leaq 0x10(%rsp), %rdi
callq 0xc69f
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0xb232
xorl %ebp, %ebp
leaq 0x4fbd8(%rip), %rsi # 0x5c230
leaq 0xc9(%rip), %rdx # 0xc728
movq %rbx, %rdi
callq 0x8900
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc685
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x8580
testb %bpl, %bpl
jne 0xc68f
jmp 0xc697
movq %rax, %r14
movq %rbx, %rdi
callq 0x83e0
movq %r14, %rdi
callq 0x8960
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 2
jnz short loc_C609
mov rax, [r14+8]
shl rsi, 4
add rsi, [rax]
mov rax, rsi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_C609:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_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_C685
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C685:
test bpl, bpl
jnz short loc_C68F
jmp short loc_C697
mov r14, rax
loc_C68F:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C697:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
v4,
"cannot use operator[] with a numeric argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return **(_QWORD **)(a1 + 8) + 16 * a2;
}
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x2
JNZ 0x0010c609
MOV RAX,qword ptr [R14 + 0x8]
SHL RSI,0x4
ADD RSI,qword ptr [RAX]
MOV RAX,RSI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0010c609:
MOV EDI,0x20
CALL 0x00108280
MOV RBX,RAX
MOV RDI,R14
CALL 0x0010b486
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0010c626:
LEA RSI,[0x1423e0]
LEA RDI,[RSP + 0x10]
CALL 0x0010c69f
MOV BPL,0x1
LAB_0010c63a:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0010b232
XOR EBP,EBP
LEA RSI,[0x15c230]
LEA RDX,[0x10c728]
MOV RDI,RBX
CALL 0x00108900
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](unsigned long) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return param_1 * 0x10 + **(long **)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0010c626 to 0010c636 has its CatchHandler @ 0010c68c */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_38,"cannot use operator[] with a numeric argument with ",&local_40);
/* try { // try from 0010c63a to 0010c666 has its CatchHandler @ 0010c667 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
21,563 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long) | llama.cpp/common/json.hpp | inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,
std::uint64_t rest, std::uint64_t ten_k)
{
JSON_ASSERT(len >= 1);
JSON_ASSERT(dist <= delta);
JSON_ASSERT(rest <= delta);
JSON_ASSERT(ten_k > 0);
// <--------------------------- delta ---->
// <---- dist --------->
// --------------[------------------+-------------------]--------------
// M- w M+
//
// ten_k
// <------>
// <---- rest ---->
// --------------[------------------+----+--------------]--------------
// w V
// = buf * 10^k
//
// ten_k represents a unit-in-the-last-place in the decimal representation
// stored in buf.
// Decrement buf by ten_k while this takes buf closer to w.
// The tests are written in this order to avoid overflow in unsigned
// integer arithmetic.
while (rest < dist
&& delta - rest >= ten_k
&& (rest + ten_k < dist || dist - rest > rest + ten_k - dist))
{
JSON_ASSERT(buf[len - 1] != '0');
buf[len - 1]--;
rest += ten_k;
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long):
pushq %rax
testl %esi, %esi
jle 0x51c0a
cmpq %rcx, %rdx
ja 0x51c26
movq %rcx, %r10
subq %r8, %r10
jb 0x51c42
testq %r9, %r9
je 0x51c5e
movq %rdx, %rax
subq %r8, %rax
setbe %r11b
cmpq %r9, %r10
setb %r10b
orb %r11b, %r10b
jne 0x51be7
movl %esi, %esi
addq %r9, %r8
subq %r8, %rcx
movq %rdx, %r10
negq %r10
cmpq %rdx, %r8
jb 0x51bbd
leaq (%r10,%r8), %r11
cmpq %r11, %rax
jbe 0x51be7
movb -0x1(%rdi,%rsi), %r11b
cmpb $0x30, %r11b
je 0x51be9
decb %r11b
movb %r11b, -0x1(%rdi,%rsi)
subq %r9, %rcx
setb %r11b
cmpq %rdx, %r8
jae 0x51be7
subq %r9, %rax
addq %r9, %r8
testb %r11b, %r11b
je 0x51baf
popq %rax
retq
leaq 0xe7e8(%rip), %rdi # 0x603d8
leaq 0xa19b(%rip), %rdx # 0x5bd92
leaq 0xf85d(%rip), %rcx # 0x6145b
movl $0x444d, %esi # imm = 0x444D
xorl %eax, %eax
callq 0x17950
leaq 0xe7c7(%rip), %rdi # 0x603d8
leaq 0xa17a(%rip), %rdx # 0x5bd92
leaq 0xf80d(%rip), %rcx # 0x6142c
movl $0x4431, %esi # imm = 0x4431
jmp 0x51c03
leaq 0xe7ab(%rip), %rdi # 0x603d8
leaq 0xa15e(%rip), %rdx # 0x5bd92
leaq 0xf7fa(%rip), %rcx # 0x61435
movl $0x4432, %esi # imm = 0x4432
jmp 0x51c03
leaq 0xe78f(%rip), %rdi # 0x603d8
leaq 0xa142(%rip), %rdx # 0x5bd92
leaq 0xf7ec(%rip), %rcx # 0x61443
movl $0x4433, %esi # imm = 0x4433
jmp 0x51c03
leaq 0xe773(%rip), %rdi # 0x603d8
leaq 0xa126(%rip), %rdx # 0x5bd92
leaq 0xf7de(%rip), %rcx # 0x61451
movl $0x4434, %esi # imm = 0x4434
jmp 0x51c03
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm:
push rax
test esi, esi
jle loc_51C0A
cmp rdx, rcx
ja loc_51C26
mov r10, rcx
sub r10, r8
jb loc_51C42
test r9, r9
jz loc_51C5E
mov rax, rdx
sub rax, r8
setbe r11b
cmp r10, r9
setb r10b
or r10b, r11b
jnz short loc_51BE7
mov esi, esi
add r8, r9
sub rcx, r8
mov r10, rdx
neg r10
loc_51BAF:
cmp r8, rdx
jb short loc_51BBD
lea r11, [r10+r8]
cmp rax, r11
jbe short loc_51BE7
loc_51BBD:
mov r11b, [rdi+rsi-1]
cmp r11b, 30h ; '0'
jz short loc_51BE9
dec r11b
mov [rdi+rsi-1], r11b
sub rcx, r9
setb r11b
cmp r8, rdx
jnb short loc_51BE7
sub rax, r9
add r8, r9
test r11b, r11b
jz short loc_51BAF
loc_51BE7:
pop rax
retn
loc_51BE9:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufLen10; "buf[len - 1] != '0'"
mov esi, 444Dh
loc_51C03:
xor eax, eax
call _ggml_abort
loc_51C0A:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLen1; "len >= 1"
mov esi, 4431h
jmp short loc_51C03
loc_51C26:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDistDelta; "dist <= delta"
mov esi, 4432h
jmp short loc_51C03
loc_51C42:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRestDelta; "rest <= delta"
mov esi, 4433h
jmp short loc_51C03
loc_51C5E:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTenK0; "ten_k > 0"
mov esi, 4434h
jmp short loc_51C03
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
unsigned long long a6)
{
unsigned long long v6; // rax
unsigned long long v7; // r8
unsigned long long v8; // rcx
char v9; // r11
bool v10; // cf
if ( (int)a2 <= 0 )
goto LABEL_14;
if ( a3 > a4 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17458LL,
"GGML_ASSERT(%s) failed",
"dist <= delta");
goto LABEL_14;
}
if ( a4 < a5 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17459LL,
"GGML_ASSERT(%s) failed",
"rest <= delta");
goto LABEL_14;
}
if ( !a6 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17460LL,
"GGML_ASSERT(%s) failed",
"ten_k > 0");
goto LABEL_14;
}
v6 = a3 - a5;
if ( a3 > a5 && a4 - a5 >= a6 )
{
v7 = a6 + a5;
v8 = a4 - v7;
while ( 1 )
{
if ( v7 >= a3 && v6 <= v7 - a3 )
return;
v9 = *((_BYTE *)this + (unsigned int)a2 - 1);
if ( v9 == 48 )
break;
*((_BYTE *)this + (unsigned int)a2 - 1) = v9 - 1;
v10 = v8 < a6;
v8 -= a6;
if ( v7 < a3 )
{
v6 -= a6;
v7 += a6;
if ( !v10 )
continue;
}
return;
}
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17485LL,
"GGML_ASSERT(%s) failed",
"buf[len - 1] != '0'");
while ( 1 )
LABEL_14:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
17457LL,
"GGML_ASSERT(%s) failed",
"len >= 1");
}
}
| grisu2_round:
PUSH RAX
TEST ESI,ESI
JLE 0x00151c0a
CMP RDX,RCX
JA 0x00151c26
MOV R10,RCX
SUB R10,R8
JC 0x00151c42
TEST R9,R9
JZ 0x00151c5e
MOV RAX,RDX
SUB RAX,R8
SETBE R11B
CMP R10,R9
SETC R10B
OR R10B,R11B
JNZ 0x00151be7
MOV ESI,ESI
ADD R8,R9
SUB RCX,R8
MOV R10,RDX
NEG R10
LAB_00151baf:
CMP R8,RDX
JC 0x00151bbd
LEA R11,[R10 + R8*0x1]
CMP RAX,R11
JBE 0x00151be7
LAB_00151bbd:
MOV R11B,byte ptr [RDI + RSI*0x1 + -0x1]
CMP R11B,0x30
JZ 0x00151be9
DEC R11B
MOV byte ptr [RDI + RSI*0x1 + -0x1],R11B
SUB RCX,R9
SETC R11B
CMP R8,RDX
JNC 0x00151be7
SUB RAX,R9
ADD R8,R9
TEST R11B,R11B
JZ 0x00151baf
LAB_00151be7:
POP RAX
RET
LAB_00151be9:
LEA RDI,[0x1603d8]
LEA RDX,[0x15bd92]
LEA RCX,[0x16145b]
MOV ESI,0x444d
LAB_00151c03:
XOR EAX,EAX
CALL 0x00117950
LAB_00151c0a:
LEA RDI,[0x1603d8]
LEA RDX,[0x15bd92]
LEA RCX,[0x16142c]
MOV ESI,0x4431
JMP 0x00151c03
LAB_00151c26:
LEA RDI,[0x1603d8]
LEA RDX,[0x15bd92]
LEA RCX,[0x161435]
MOV ESI,0x4432
JMP 0x00151c03
LAB_00151c42:
LEA RDI,[0x1603d8]
LEA RDX,[0x15bd92]
LEA RCX,[0x161443]
MOV ESI,0x4433
JMP 0x00151c03
LAB_00151c5e:
LEA RDI,[0x1603d8]
LEA RDX,[0x15bd92]
LEA RCX,[0x161451]
MOV ESI,0x4434
JMP 0x00151c03
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned
long, unsigned long, unsigned long) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round
(char *param_1,int param_2,ulong param_3,ulong param_4,ulong param_5,ulong param_6)
{
int8 in_RAX;
ulong uVar1;
ulong uVar2;
char *pcVar3;
int8 uVar4;
ulong uVar5;
bool bVar6;
if (param_2 < 1) {
pcVar3 = "len >= 1";
uVar4 = 0x4431;
}
else if (param_4 < param_3) {
pcVar3 = "dist <= delta";
uVar4 = 0x4432;
}
else if (param_4 < param_5) {
pcVar3 = "rest <= delta";
uVar4 = 0x4433;
}
else {
if (param_6 != 0) {
uVar1 = param_3 - param_5;
if (param_6 <= param_4 - param_5 && (param_5 <= param_3 && uVar1 != 0)) {
uVar5 = param_5 + param_6;
uVar2 = param_4 - uVar5;
do {
if ((param_3 <= uVar5) && (uVar1 <= uVar5 - param_3)) {
return in_RAX;
}
if (param_1[(ulong)(uint)param_2 - 1] == '0') {
pcVar3 = "buf[len - 1] != \'0\'";
uVar4 = 0x444d;
goto LAB_00151c03;
}
param_1[(ulong)(uint)param_2 - 1] = param_1[(ulong)(uint)param_2 - 1] + -1;
bVar6 = param_6 <= uVar2;
uVar2 = uVar2 - param_6;
if (param_3 <= uVar5) {
return in_RAX;
}
uVar1 = uVar1 - param_6;
uVar5 = uVar5 + param_6;
} while (bVar6);
}
return in_RAX;
}
pcVar3 = "ten_k > 0";
uVar4 = 0x4434;
}
LAB_00151c03:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
| |
21,564 | prepare_resize_simple_key_cache | eloqsql/mysys/mf_keycache.c | static
int prepare_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
my_bool release_lock)
{
int res= 0;
DBUG_ENTER("prepare_resize_simple_key_cache");
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
We may need to wait for another thread which is doing a resize
already. This cannot happen in the MySQL server though. It allows
one resizer only. In set_var.cc keycache->in_init is used to block
multiple attempts.
*/
while (keycache->in_resize)
{
/* purecov: begin inspected */
wait_on_queue(&keycache->resize_queue, &keycache->cache_lock);
/* purecov: end */
}
/*
Mark the operation in progress. This blocks other threads from doing
a resize in parallel. It prohibits new blocks to enter the cache.
Read/write requests can bypass the cache during the flush phase.
*/
keycache->in_resize= 1;
/* Need to flush only if keycache is enabled. */
if (keycache->can_be_used && keycache->disk_blocks != -1)
{
/* Start the flush phase. */
keycache->resize_in_flush= 1;
if (flush_all_key_blocks(keycache))
{
/* TODO: if this happens, we should write a warning in the log file ! */
keycache->resize_in_flush= 0;
keycache->can_be_used= 0;
res= 1;
goto finish;
}
DBUG_SLOW_ASSERT(cache_empty(keycache));
/* End the flush phase. */
keycache->resize_in_flush= 0;
}
/*
Some direct read/write operations (bypassing the cache) may still be
unfinished. Wait until they are done. If the key cache can be used,
direct I/O is done in increments of key_cache_block_size. That is,
every block is checked if it is in the cache. We need to wait for
pending I/O before re-initializing the cache, because we may change
the block size. Otherwise they could check for blocks at file
positions where the new block division has none. We do also want to
wait for I/O done when (if) the cache was disabled. It must not
run in parallel with normal cache operation.
*/
while (keycache->cnt_for_resize_op)
wait_on_queue(&keycache->waiting_for_resize_cnt, &keycache->cache_lock);
end_simple_key_cache(keycache, 0);
finish:
if (release_lock)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_RETURN(res);
} | O0 | c | prepare_resize_simple_key_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x652d4(%rip), %rsi # 0xd9bff
movl $0x2a9, %edx # imm = 0x2A9
callq 0x71150
movq -0x8(%rbp), %rax
cmpb $0x0, 0x1(%rax)
je 0x7495c
movq -0x8(%rbp), %rdi
addq $0x108, %rdi # imm = 0x108
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0x711c0
jmp 0x74935
movq -0x8(%rbp), %rax
movb $0x1, 0x1(%rax)
movq -0x8(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x0, %eax
je 0x749b6
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x48(%rax)
je 0x749b6
movq -0x8(%rbp), %rax
movb $0x1, 0x2(%rax)
movq -0x8(%rbp), %rdi
callq 0x74a60
cmpl $0x0, %eax
je 0x749aa
movq -0x8(%rbp), %rax
movb $0x0, 0x2(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x3(%rax)
movl $0x1, -0x10(%rbp)
jmp 0x749eb
jmp 0x749ac
jmp 0x749ae
movq -0x8(%rbp), %rax
movb $0x0, 0x2(%rax)
jmp 0x749b8
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x749e0
movq -0x8(%rbp), %rdi
addq $0x110, %rdi # imm = 0x110
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0x711c0
jmp 0x749b8
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x74650
cmpb $0x0, -0x9(%rbp)
je 0x74a01
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0x71b70
jmp 0x74a03
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| prepare_resize_simple_key_cache:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov [rbp+var_10], 0
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 2A9h
call inline_mysql_mutex_lock_9
loc_74935:
mov rax, [rbp+var_8]
cmp byte ptr [rax+1], 0
jz short loc_7495C
mov rdi, [rbp+var_8]
add rdi, 108h
mov rsi, [rbp+var_8]
add rsi, 0C0h
call wait_on_queue
jmp short loc_74935
loc_7495C:
mov rax, [rbp+var_8]
mov byte ptr [rax+1], 1
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+3]
cmp eax, 0
jz short loc_749B6
mov rax, [rbp+var_8]
cmp dword ptr [rax+48h], 0FFFFFFFFh
jz short loc_749B6
mov rax, [rbp+var_8]
mov byte ptr [rax+2], 1
mov rdi, [rbp+var_8]
call flush_all_key_blocks
cmp eax, 0
jz short loc_749AA
mov rax, [rbp+var_8]
mov byte ptr [rax+2], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+3], 0
mov [rbp+var_10], 1
jmp short loc_749EB
loc_749AA:
jmp short $+2
loc_749AC:
jmp short $+2
loc_749AE:
mov rax, [rbp+var_8]
mov byte ptr [rax+2], 0
loc_749B6:
jmp short $+2
loc_749B8:
mov rax, [rbp+var_8]
cmp qword ptr [rax+70h], 0
jz short loc_749E0
mov rdi, [rbp+var_8]
add rdi, 110h
mov rsi, [rbp+var_8]
add rsi, 0C0h
call wait_on_queue
jmp short loc_749B8
loc_749E0:
mov rdi, [rbp+var_8]
xor esi, esi
call end_simple_key_cache
loc_749EB:
cmp [rbp+var_9], 0
jz short loc_74A01
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_9
loc_74A01:
jmp short $+2
loc_74A03:
mov eax, [rbp+var_10]
mov [rbp+var_14], eax
mov eax, [rbp+var_14]
add rsp, 20h
pop rbp
retn
| long long prepare_resize_simple_key_cache(long long a1, char a2)
{
unsigned int v3; // [rsp+10h] [rbp-10h]
v3 = 0;
inline_mysql_mutex_lock_9(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x2A9u);
while ( *(_BYTE *)(a1 + 1) )
wait_on_queue((long long *)(a1 + 264), (const char *)(a1 + 192));
*(_BYTE *)(a1 + 1) = 1;
if ( !*(_BYTE *)(a1 + 3) || *(_DWORD *)(a1 + 72) == -1 )
{
LABEL_9:
while ( *(_QWORD *)(a1 + 112) )
wait_on_queue((long long *)(a1 + 272), (const char *)(a1 + 192));
end_simple_key_cache(a1, 0);
goto LABEL_12;
}
*(_BYTE *)(a1 + 2) = 1;
if ( !(unsigned int)flush_all_key_blocks(a1) )
{
*(_BYTE *)(a1 + 2) = 0;
goto LABEL_9;
}
*(_BYTE *)(a1 + 2) = 0;
*(_BYTE *)(a1 + 3) = 0;
v3 = 1;
LABEL_12:
if ( a2 )
inline_mysql_mutex_unlock_9(a1 + 192);
return v3;
}
| prepare_resize_simple_key_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV dword ptr [RBP + -0x10],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x1d9bff]
MOV EDX,0x2a9
CALL 0x00171150
LAB_00174935:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x1],0x0
JZ 0x0017495c
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x108
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
CALL 0x001711c0
JMP 0x00174935
LAB_0017495c:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x1],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x3]
CMP EAX,0x0
JZ 0x001749b6
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x48],-0x1
JZ 0x001749b6
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],0x1
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00174a60
CMP EAX,0x0
JZ 0x001749aa
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x3],0x0
MOV dword ptr [RBP + -0x10],0x1
JMP 0x001749eb
LAB_001749aa:
JMP 0x001749ac
LAB_001749ac:
JMP 0x001749ae
LAB_001749ae:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],0x0
LAB_001749b6:
JMP 0x001749b8
LAB_001749b8:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x70],0x0
JZ 0x001749e0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x110
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
CALL 0x001711c0
JMP 0x001749b8
LAB_001749e0:
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
CALL 0x00174650
LAB_001749eb:
CMP byte ptr [RBP + -0x9],0x0
JZ 0x00174a01
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x00171b70
LAB_00174a01:
JMP 0x00174a03
LAB_00174a03:
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x20
POP RBP
RET
|
int4 prepare_resize_simple_key_cache(long param_1,char param_2)
{
int iVar1;
int4 local_18;
local_18 = 0;
inline_mysql_mutex_lock
(param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x2a9);
while (*(char *)(param_1 + 1) != '\0') {
wait_on_queue(param_1 + 0x108);
}
*(int1 *)(param_1 + 1) = 1;
if ((*(char *)(param_1 + 3) != '\0') && (*(int *)(param_1 + 0x48) != -1)) {
*(int1 *)(param_1 + 2) = 1;
iVar1 = flush_all_key_blocks(param_1);
if (iVar1 != 0) {
*(int1 *)(param_1 + 2) = 0;
*(int1 *)(param_1 + 3) = 0;
local_18 = 1;
goto LAB_001749eb;
}
*(int1 *)(param_1 + 2) = 0;
}
while (*(long *)(param_1 + 0x70) != 0) {
wait_on_queue(param_1 + 0x110);
}
end_simple_key_cache(param_1,0);
LAB_001749eb:
if (param_2 != '\0') {
inline_mysql_mutex_unlock(param_1 + 0xc0);
}
return local_18;
}
| |
21,565 | CLI::OptionAlreadyAdded::~OptionAlreadyAdded() | MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/Error.hpp | explicit OptionAlreadyAdded(std::string name)
: OptionAlreadyAdded(name + " is already added", ExitCodes::OptionAlreadyAdded) {} | O3 | cpp | CLI::OptionAlreadyAdded::~OptionAlreadyAdded():
pushq %rbx
movq %rdi, %rbx
leaq 0x2ba69(%rip), %rax # 0x49358
movq %rax, (%rdi)
movq 0x18(%rdi), %rdi
leaq 0x28(%rbx), %rax
cmpq %rax, %rdi
je 0x1d90a
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7490
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x7430
| _ZN3CLI18OptionAlreadyAddedD0Ev:
push rbx
mov rbx, rdi
lea rax, off_49358
mov [rdi], rax
mov rdi, [rdi+18h]; void *
lea rax, [rbx+28h]
cmp rdi, rax
jz short loc_1D90A
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1D90A:
mov rdi, rbx; this
call __ZNSt13runtime_errorD2Ev; std::runtime_error::~runtime_error()
mov esi, 38h ; '8'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void CLI::OptionAlreadyAdded::~OptionAlreadyAdded(CLI::OptionAlreadyAdded *this)
{
char *v2; // rdi
*(_QWORD *)this = off_49358;
v2 = (char *)*((_QWORD *)this + 3);
if ( v2 != (char *)this + 40 )
operator delete(v2, *((_QWORD *)this + 5) + 1LL);
std::runtime_error::~runtime_error(this);
operator delete(this, 0x38uLL);
}
| ~OptionAlreadyAdded:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x149358]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x18]
LEA RAX,[RBX + 0x28]
CMP RDI,RAX
JZ 0x0011d90a
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_0011d90a:
MOV RDI,RBX
CALL 0x00107490
MOV ESI,0x38
MOV RDI,RBX
POP RBX
JMP 0x00107430
|
/* CLI::OptionAlreadyAdded::~OptionAlreadyAdded() */
void __thiscall CLI::OptionAlreadyAdded::~OptionAlreadyAdded(OptionAlreadyAdded *this)
{
*(int ***)this = &PTR__Error_00149358;
if (*(OptionAlreadyAdded **)(this + 0x18) != this + 0x28) {
operator_delete(*(OptionAlreadyAdded **)(this + 0x18),*(long *)(this + 0x28) + 1);
}
std::runtime_error::~runtime_error((runtime_error *)this);
operator_delete(this,0x38);
return;
}
| |
21,566 | mi_log | eloqsql/storage/myisam/mi_log.c | int mi_log(int activate_log)
{
int error=0;
char buff[FN_REFLEN];
DBUG_ENTER("mi_log");
log_type=activate_log;
if (activate_log)
{
if (!myisam_pid)
myisam_pid=(ulong) getpid();
if (myisam_log_file < 0)
{
if ((myisam_log_file= mysql_file_create(mi_key_file_log,
fn_format(buff,
myisam_log_filename,
"", ".log", 4),
0,
(O_RDWR | O_BINARY | O_APPEND),
MYF(0))) < 0)
DBUG_RETURN(my_errno);
}
}
else if (myisam_log_file >= 0)
{
error= mysql_file_close(myisam_log_file, MYF(0)) ? my_errno : 0 ;
myisam_log_file= -1;
}
DBUG_RETURN(error);
} | O3 | c | mi_log:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x270, %rsp # imm = 0x270
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movl %edi, 0xb8293f(%rip) # 0xc027f8
testl %edi, %edi
je 0x7ff79
cmpq $0x0, 0xb82927(%rip) # 0xc027f0
jne 0x7fed9
callq 0x29880
cltq
movq %rax, 0xb82917(%rip) # 0xc027f0
leaq 0x308470(%rip), %r12 # 0x388350
cmpl $0x0, (%r12)
jns 0x7ffc0
leaq 0xb828de(%rip), %rax # 0xc027d0
movl (%rax), %r14d
leaq 0x30844c(%rip), %rax # 0x388348
movq (%rax), %rsi
leaq 0x61f7f(%rip), %rdx # 0xe1e85
leaq 0x5db5f(%rip), %rcx # 0xdda6c
leaq -0x230(%rbp), %rdi
movl $0x4, %r8d
callq 0x97894
movq %rax, %rbx
leaq 0x309127(%rip), %rax # 0x389050
movq (%rax), %rax
leaq -0x288(%rbp), %rdi
leaq -0x238(%rbp), %r15
movl %r14d, %esi
xorl %edx, %edx
movq %rbx, %rcx
movq %r15, %r8
callq *0x148(%rax)
movq %rax, (%r15)
testq %rax, %rax
jne 0x7ffec
movq %rbx, %rdi
xorl %esi, %esi
movl $0x402, %edx # imm = 0x402
xorl %ecx, %ecx
callq 0xa0d98
movl %eax, (%r12)
testl %eax, %eax
jns 0x7ffc0
callq 0xa4ab2
movl (%rax), %eax
jmp 0x7ffcd
leaq 0x3083d0(%rip), %r15 # 0x388350
movl (%r15), %ebx
testl %ebx, %ebx
js 0x7ffc0
leaq 0x3090c2(%rip), %rax # 0x389050
movq (%rax), %rax
leaq -0x230(%rbp), %rdi
movl %ebx, %esi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x80010
movl %ebx, %edi
xorl %esi, %esi
callq 0xa33d9
testl %eax, %eax
je 0x7ffc4
callq 0xa4ab2
movl (%rax), %eax
jmp 0x7ffc6
xorl %eax, %eax
jmp 0x7ffcd
xorl %eax, %eax
movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x80029
addq $0x270, %rsp # imm = 0x270
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x238(%rbp), %rdx
leaq -0x23c(%rbp), %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x2dc89
movl (%r14), %eax
jmp 0x7ff68
leaq -0x288(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2dce4
movl (%r14), %eax
jmp 0x7ffb3
callq 0x29220
| mi_log:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 270h
mov rax, fs:28h
mov [rbp+var_28], rax
mov cs:log_type, edi
test edi, edi
jz loc_7FF79
cmp cs:myisam_pid, 0
jnz short loc_7FED9
call _getpid
cdqe
mov cs:myisam_pid, rax
loc_7FED9:
lea r12, myisam_log_file
cmp dword ptr [r12], 0
jns loc_7FFC0
lea rax, mi_key_file_log
mov r14d, [rax]
lea rax, myisam_log_filename
mov rsi, [rax]
lea rdx, asc_E1E81+4; ""
lea rcx, aMyisamLog+6; ".log"
lea rdi, [rbp+var_230]
mov r8d, 4
call fn_format
mov rbx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_288]
lea r15, [rbp+var_238]
mov esi, r14d
xor edx, edx
mov rcx, rbx
mov r8, r15
call qword ptr [rax+148h]
mov [r15], rax
test rax, rax
jnz loc_7FFEC
mov rdi, rbx
xor esi, esi
mov edx, 402h
xor ecx, ecx
call my_create
loc_7FF68:
mov [r12], eax
test eax, eax
jns short loc_7FFC0
call _my_thread_var
mov eax, [rax]
jmp short loc_7FFCD
loc_7FF79:
lea r15, myisam_log_file
mov ebx, [r15]
test ebx, ebx
js short loc_7FFC0
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_230]
mov esi, ebx
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz short loc_80010
mov edi, ebx
xor esi, esi
call my_close
loc_7FFB3:
test eax, eax
jz short loc_7FFC4
call _my_thread_var
mov eax, [rax]
jmp short loc_7FFC6
loc_7FFC0:
xor eax, eax
jmp short loc_7FFCD
loc_7FFC4:
xor eax, eax
loc_7FFC6:
mov dword ptr [r15], 0FFFFFFFFh
loc_7FFCD:
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_80029
add rsp, 270h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7FFEC:
lea rdx, [rbp+var_238]
lea r14, [rbp+var_23C]
mov rdi, rax
mov rsi, rbx
loc_80000:
mov rcx, r14
call mi_log_cold_1
mov eax, [r14]
jmp loc_7FF68
loc_80010:
lea r14, [rbp+var_288]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call mi_log_cold_2
mov eax, [r14]
jmp short loc_7FFB3
loc_80029:
call ___stack_chk_fail
| long long mi_log(int a1)
{
unsigned int v1; // r14d
long long v2; // rbx
long long v3; // rax
long long v4; // rdi
int v5; // eax
long long result; // rax
unsigned int v7; // ebx
long long v8; // rax
long long v9; // rdi
unsigned int v10; // eax
unsigned int v11[19]; // [rsp+8h] [rbp-288h] BYREF
int v12; // [rsp+54h] [rbp-23Ch] BYREF
long long v13; // [rsp+58h] [rbp-238h] BYREF
_BYTE v14[520]; // [rsp+60h] [rbp-230h] BYREF
unsigned long long v15; // [rsp+268h] [rbp-28h]
v15 = __readfsqword(0x28u);
log_type = a1;
if ( a1 )
{
if ( !myisam_pid )
myisam_pid = (int)getpid();
if ( (myisam_log_file & 0x80000000) != 0 )
{
v1 = mi_key_file_log;
v2 = fn_format(v14, myisam_log_filename, "", ".log", 4LL);
v3 = ((long long ( *)(unsigned int *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(
v11,
v1,
0LL,
v2,
&v13);
v13 = v3;
if ( v3 )
{
v4 = v3;
mi_log_cold_1(v3, v2, &v13, (unsigned int *)&v12);
v5 = v12;
}
else
{
v4 = v2;
v5 = my_create(v2, 0LL, 1026LL, 0LL);
}
myisam_log_file = v5;
if ( v5 < 0 )
return *(unsigned int *)my_thread_var(v4);
}
return 0LL;
}
v7 = myisam_log_file;
if ( (myisam_log_file & 0x80000000) != 0 )
return 0LL;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v14, myisam_log_file, 4LL);
if ( v8 )
{
v9 = v8;
mi_log_cold_2(v8, v7, v11);
v10 = v11[0];
}
else
{
v9 = v7;
v10 = my_close(v7, 0LL);
}
if ( v10 )
result = *(unsigned int *)my_thread_var(v9);
else
result = 0LL;
myisam_log_file = -1;
return result;
}
| mi_log:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x270
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [0x00d027f8],EDI
TEST EDI,EDI
JZ 0x0017ff79
CMP qword ptr [0x00d027f0],0x0
JNZ 0x0017fed9
CALL 0x00129880
CDQE
MOV qword ptr [0x00d027f0],RAX
LAB_0017fed9:
LEA R12,[0x488350]
CMP dword ptr [R12],0x0
JNS 0x0017ffc0
LEA RAX,[0xd027d0]
MOV R14D,dword ptr [RAX]
LEA RAX,[0x488348]
MOV RSI,qword ptr [RAX]
LEA RDX,[0x1e1e85]
LEA RCX,[0x1dda6c]
LEA RDI,[RBP + -0x230]
MOV R8D,0x4
CALL 0x00197894
MOV RBX,RAX
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x288]
LEA R15,[RBP + -0x238]
MOV ESI,R14D
XOR EDX,EDX
MOV RCX,RBX
MOV R8,R15
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R15],RAX
TEST RAX,RAX
JNZ 0x0017ffec
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x402
XOR ECX,ECX
CALL 0x001a0d98
LAB_0017ff68:
MOV dword ptr [R12],EAX
TEST EAX,EAX
JNS 0x0017ffc0
CALL 0x001a4ab2
MOV EAX,dword ptr [RAX]
JMP 0x0017ffcd
LAB_0017ff79:
LEA R15,[0x488350]
MOV EBX,dword ptr [R15]
TEST EBX,EBX
JS 0x0017ffc0
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x230]
MOV ESI,EBX
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00180010
MOV EDI,EBX
XOR ESI,ESI
CALL 0x001a33d9
LAB_0017ffb3:
TEST EAX,EAX
JZ 0x0017ffc4
CALL 0x001a4ab2
MOV EAX,dword ptr [RAX]
JMP 0x0017ffc6
LAB_0017ffc0:
XOR EAX,EAX
JMP 0x0017ffcd
LAB_0017ffc4:
XOR EAX,EAX
LAB_0017ffc6:
MOV dword ptr [R15],0xffffffff
LAB_0017ffcd:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x00180029
ADD RSP,0x270
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0017ffec:
LEA RDX,[RBP + -0x238]
LEA R14,[RBP + -0x23c]
MOV RDI,RAX
MOV RSI,RBX
MOV RCX,R14
CALL 0x0012dc89
MOV EAX,dword ptr [R14]
JMP 0x0017ff68
LAB_00180010:
LEA R14,[RBP + -0x288]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012dce4
MOV EAX,dword ptr [R14]
JMP 0x0017ffb3
LAB_00180029:
CALL 0x00129220
|
int4 mi_log(int param_1)
{
int iVar1;
__pid_t _Var2;
int4 uVar3;
int8 uVar4;
int4 *puVar5;
long lVar6;
long in_FS_OFFSET;
int local_290 [19];
int local_244;
long local_240;
int1 local_238 [520];
long local_30;
iVar1 = myisam_log_file;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
log_type = param_1;
if (param_1 == 0) {
if (-1 < myisam_log_file) {
lVar6 = (**(code **)(PSI_server + 0x158))(local_238,myisam_log_file,4);
if (lVar6 == 0) {
local_290[0] = my_close(iVar1,0);
}
else {
mi_log_cold_2(lVar6,iVar1,local_290);
}
if (local_290[0] == 0) {
uVar3 = 0;
}
else {
puVar5 = (int4 *)_my_thread_var();
uVar3 = *puVar5;
}
myisam_log_file = -1;
goto LAB_0017ffcd;
}
}
else {
if (myisam_pid == 0) {
_Var2 = getpid();
myisam_pid = (long)_Var2;
}
uVar3 = mi_key_file_log;
if (myisam_log_file < 0) {
uVar4 = fn_format(local_238,myisam_log_filename,&DAT_001e1e85,".log",4);
local_240 = (**(code **)(PSI_server + 0x148))(local_290,uVar3,0,uVar4,&local_240);
if (local_240 == 0) {
local_244 = my_create(uVar4,0,0x402,0);
}
else {
mi_log_cold_1(local_240,uVar4,&local_240,&local_244);
}
myisam_log_file = local_244;
if (local_244 < 0) {
puVar5 = (int4 *)_my_thread_var();
uVar3 = *puVar5;
goto LAB_0017ffcd;
}
}
}
uVar3 = 0;
LAB_0017ffcd:
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
21,567 | backtick_string | eloqsql/strings/my_vsnprintf.c | static char *backtick_string(CHARSET_INFO *cs, char *to, const char *end,
char *par, size_t par_len, char quote_char,
my_bool cut)
{
char *last[3]= {0,0,0};
uint char_len;
char *start= to;
char *par_end= par + par_len;
size_t buff_length= (size_t) (end - to);
uint index= 0;
if (buff_length <= par_len)
goto err;
*start++= quote_char;
for ( ; par < par_end; par+= char_len)
{
uchar c= *(uchar *) par;
if (cut)
{
last[index]= start;
index= (index + 1) % 3;
}
char_len= my_ci_charlen_fix(cs, (const uchar *) par, (const uchar *) par_end);
if (char_len == 1 && c == (uchar) quote_char )
{
if (start + 1 >= end)
goto err;
*start++= quote_char;
}
if (start + char_len >= end)
goto err;
start= strnmov(start, par, char_len);
}
if (start + 1 >= end)
goto err;
if (cut)
{
uint dots= 0;
start= NULL;
for (; dots < 3; dots++)
{
if (index == 0)
index= 2;
else
index--;
if (!last[index])
break;
start= last[index];
}
if (start == NULL)
goto err; // there was no characters at all
for (; dots; dots--)
*start++= '.';
}
*start++= quote_char;
return start;
err:
*to='\0';
return to;
} | O0 | c | backtick_string:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %r9b, %al
movb 0x10(%rbp), %r9b
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movb %al, -0x31(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x251d0
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x30(%rbp), %rax
ja 0x86792
jmp 0x8692a
movb -0x31(%rbp), %cl
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x8686e
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x75(%rbp)
cmpb $0x0, 0x10(%rbp)
je 0x867e1
movq -0x60(%rbp), %rcx
movl -0x74(%rbp), %eax
movq %rcx, -0x50(%rbp,%rax,8)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl $0x3, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, -0x74(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x869a0
movl %eax, -0x54(%rbp)
cmpl $0x1, -0x54(%rbp)
jne 0x8682e
movzbl -0x75(%rbp), %eax
movzbl -0x31(%rbp), %ecx
cmpl %ecx, %eax
jne 0x8682e
movq -0x60(%rbp), %rax
addq $0x1, %rax
cmpq -0x20(%rbp), %rax
jb 0x8681a
jmp 0x8692a
movb -0x31(%rbp), %cl
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %cl, (%rax)
movq -0x60(%rbp), %rax
movl -0x54(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jb 0x86843
jmp 0x8692a
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x54(%rbp), %eax
movl %eax, %edx
callq 0x86f00
movq %rax, -0x60(%rbp)
movl -0x54(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x867a6
movq -0x60(%rbp), %rax
addq $0x1, %rax
cmpq -0x20(%rbp), %rax
jb 0x86881
jmp 0x8692a
cmpb $0x0, 0x10(%rbp)
je 0x8690c
movl $0x0, -0x7c(%rbp)
movq $0x0, -0x60(%rbp)
cmpl $0x3, -0x7c(%rbp)
jae 0x868dc
cmpl $0x0, -0x74(%rbp)
jne 0x868af
movl $0x2, -0x74(%rbp)
jmp 0x868b8
movl -0x74(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
cmpq $0x0, -0x50(%rbp,%rax,8)
jne 0x868c5
jmp 0x868dc
movl -0x74(%rbp), %eax
movq -0x50(%rbp,%rax,8), %rax
movq %rax, -0x60(%rbp)
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x8689a
cmpq $0x0, -0x60(%rbp)
jne 0x868e5
jmp 0x8692a
jmp 0x868e7
cmpl $0x0, -0x7c(%rbp)
je 0x8690a
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x2e, (%rax)
movl -0x7c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x868e7
jmp 0x8690c
movb -0x31(%rbp), %cl
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %cl, (%rax)
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x86939
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| backtick_string:
push rbp
mov rbp, rsp
sub rsp, 80h
mov al, r9b
mov r9b, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_31], al
lea rdi, [rbp+var_50]
xor esi, esi
mov edx, 18h
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_68], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_70], rax
mov [rbp+var_74], 0
mov rax, [rbp+var_70]
cmp rax, [rbp+var_30]
ja short loc_86792
jmp loc_8692A
loc_86792:
mov cl, [rbp+var_31]
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 1
mov [rbp+var_60], rdx
mov [rax], cl
loc_867A6:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_68]
jnb loc_8686E
mov rax, [rbp+var_28]
mov al, [rax]
mov [rbp+var_75], al
cmp [rbp+arg_0], 0
jz short loc_867E1
mov rcx, [rbp+var_60]
mov eax, [rbp+var_74]
mov [rbp+rax*8+var_50], rcx
mov eax, [rbp+var_74]
add eax, 1
mov ecx, 3
xor edx, edx
div ecx
mov [rbp+var_74], edx
loc_867E1:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_68]
call my_ci_charlen_fix
mov [rbp+var_54], eax
cmp [rbp+var_54], 1
jnz short loc_8682E
movzx eax, [rbp+var_75]
movzx ecx, [rbp+var_31]
cmp eax, ecx
jnz short loc_8682E
mov rax, [rbp+var_60]
add rax, 1
cmp rax, [rbp+var_20]
jb short loc_8681A
jmp loc_8692A
loc_8681A:
mov cl, [rbp+var_31]
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 1
mov [rbp+var_60], rdx
mov [rax], cl
loc_8682E:
mov rax, [rbp+var_60]
mov ecx, [rbp+var_54]
add rax, rcx
cmp rax, [rbp+var_20]
jb short loc_86843
jmp loc_8692A
loc_86843:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_28]
mov eax, [rbp+var_54]
mov edx, eax
call strnmov
mov [rbp+var_60], rax
mov ecx, [rbp+var_54]
mov rax, [rbp+var_28]
mov ecx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp loc_867A6
loc_8686E:
mov rax, [rbp+var_60]
add rax, 1
cmp rax, [rbp+var_20]
jb short loc_86881
jmp loc_8692A
loc_86881:
cmp [rbp+arg_0], 0
jz loc_8690C
mov [rbp+var_7C], 0
mov [rbp+var_60], 0
loc_8689A:
cmp [rbp+var_7C], 3
jnb short loc_868DC
cmp [rbp+var_74], 0
jnz short loc_868AF
mov [rbp+var_74], 2
jmp short loc_868B8
loc_868AF:
mov eax, [rbp+var_74]
add eax, 0FFFFFFFFh
mov [rbp+var_74], eax
loc_868B8:
mov eax, [rbp+var_74]
cmp [rbp+rax*8+var_50], 0
jnz short loc_868C5
jmp short loc_868DC
loc_868C5:
mov eax, [rbp+var_74]
mov rax, [rbp+rax*8+var_50]
mov [rbp+var_60], rax
mov eax, [rbp+var_7C]
add eax, 1
mov [rbp+var_7C], eax
jmp short loc_8689A
loc_868DC:
cmp [rbp+var_60], 0
jnz short loc_868E5
jmp short loc_8692A
loc_868E5:
jmp short $+2
loc_868E7:
cmp [rbp+var_7C], 0
jz short loc_8690A
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
mov byte ptr [rax], 2Eh ; '.'
mov eax, [rbp+var_7C]
add eax, 0FFFFFFFFh
mov [rbp+var_7C], eax
jmp short loc_868E7
loc_8690A:
jmp short $+2
loc_8690C:
mov cl, [rbp+var_31]
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 1
mov [rbp+var_60], rdx
mov [rax], cl
mov rax, [rbp+var_60]
mov [rbp+var_8], rax
jmp short loc_86939
loc_8692A:
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_86939:
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| _BYTE * backtick_string(
long long a1,
_BYTE *a2,
unsigned long long a3,
char *a4,
unsigned long long a5,
char a6,
char a7)
{
_BYTE *v7; // rax
_BYTE *v8; // rax
unsigned int v10; // [rsp+4h] [rbp-7Ch]
char v11; // [rsp+Bh] [rbp-75h]
unsigned int v12; // [rsp+Ch] [rbp-74h]
char *v13; // [rsp+18h] [rbp-68h]
_BYTE *v14; // [rsp+20h] [rbp-60h]
unsigned int v15; // [rsp+2Ch] [rbp-54h]
_QWORD v16[3]; // [rsp+30h] [rbp-50h] BYREF
char v17; // [rsp+4Fh] [rbp-31h]
unsigned long long v18; // [rsp+50h] [rbp-30h]
char *v19; // [rsp+58h] [rbp-28h]
unsigned long long v20; // [rsp+60h] [rbp-20h]
_BYTE *v21; // [rsp+68h] [rbp-18h]
long long v22; // [rsp+70h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
memset(v16, 0LL, sizeof(v16));
v13 = &v19[v18];
v12 = 0;
if ( v20 - (unsigned long long)v21 <= v18 )
goto LABEL_25;
v14 = v21 + 1;
*v21 = v17;
while ( v19 < v13 )
{
v11 = *v19;
if ( a7 )
{
v16[v12] = v14;
v12 = (v12 + 1) % 3;
}
v15 = my_ci_charlen_fix(v22, v19, v13);
if ( v15 == 1 && v11 == v17 )
{
if ( (unsigned long long)(v14 + 1) >= v20 )
goto LABEL_25;
v7 = v14++;
*v7 = v17;
}
if ( (unsigned long long)&v14[v15] >= v20 )
goto LABEL_25;
v14 = (_BYTE *)strnmov(v14, v19, v15);
v19 += v15;
}
if ( (unsigned long long)(v14 + 1) >= v20 )
goto LABEL_25;
if ( a7 )
{
v10 = 0;
v14 = 0LL;
while ( v10 < 3 )
{
if ( v12 )
--v12;
else
v12 = 2;
if ( !v16[v12] )
break;
v14 = (_BYTE *)v16[v12];
++v10;
}
if ( v14 )
{
while ( v10 )
{
v8 = v14++;
*v8 = 46;
--v10;
}
goto LABEL_24;
}
LABEL_25:
*v21 = 0;
return v21;
}
LABEL_24:
*v14 = v17;
return v14 + 1;
}
| backtick_string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV AL,R9B
MOV R9B,byte ptr [RBP + 0x10]
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 qword ptr [RBP + -0x30],R8
MOV byte ptr [RBP + -0x31],AL
LEA RDI,[RBP + -0x50]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x001251d0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV dword ptr [RBP + -0x74],0x0
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x30]
JA 0x00186792
JMP 0x0018692a
LAB_00186792:
MOV CL,byte ptr [RBP + -0x31]
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x60],RDX
MOV byte ptr [RAX],CL
LAB_001867a6:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x68]
JNC 0x0018686e
MOV RAX,qword ptr [RBP + -0x28]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x75],AL
CMP byte ptr [RBP + 0x10],0x0
JZ 0x001867e1
MOV RCX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RBP + -0x74]
MOV qword ptr [RBP + RAX*0x8 + -0x50],RCX
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,0x1
MOV ECX,0x3
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x74],EDX
LAB_001867e1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x68]
CALL 0x001869a0
MOV dword ptr [RBP + -0x54],EAX
CMP dword ptr [RBP + -0x54],0x1
JNZ 0x0018682e
MOVZX EAX,byte ptr [RBP + -0x75]
MOVZX ECX,byte ptr [RBP + -0x31]
CMP EAX,ECX
JNZ 0x0018682e
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x20]
JC 0x0018681a
JMP 0x0018692a
LAB_0018681a:
MOV CL,byte ptr [RBP + -0x31]
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x60],RDX
MOV byte ptr [RAX],CL
LAB_0018682e:
MOV RAX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RBP + -0x54]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JC 0x00186843
JMP 0x0018692a
LAB_00186843:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x54]
MOV EDX,EAX
CALL 0x00186f00
MOV qword ptr [RBP + -0x60],RAX
MOV ECX,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001867a6
LAB_0018686e:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x20]
JC 0x00186881
JMP 0x0018692a
LAB_00186881:
CMP byte ptr [RBP + 0x10],0x0
JZ 0x0018690c
MOV dword ptr [RBP + -0x7c],0x0
MOV qword ptr [RBP + -0x60],0x0
LAB_0018689a:
CMP dword ptr [RBP + -0x7c],0x3
JNC 0x001868dc
CMP dword ptr [RBP + -0x74],0x0
JNZ 0x001868af
MOV dword ptr [RBP + -0x74],0x2
JMP 0x001868b8
LAB_001868af:
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x74],EAX
LAB_001868b8:
MOV EAX,dword ptr [RBP + -0x74]
CMP qword ptr [RBP + RAX*0x8 + -0x50],0x0
JNZ 0x001868c5
JMP 0x001868dc
LAB_001868c5:
MOV EAX,dword ptr [RBP + -0x74]
MOV RAX,qword ptr [RBP + RAX*0x8 + -0x50]
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [RBP + -0x7c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x7c],EAX
JMP 0x0018689a
LAB_001868dc:
CMP qword ptr [RBP + -0x60],0x0
JNZ 0x001868e5
JMP 0x0018692a
LAB_001868e5:
JMP 0x001868e7
LAB_001868e7:
CMP dword ptr [RBP + -0x7c],0x0
JZ 0x0018690a
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x60],RCX
MOV byte ptr [RAX],0x2e
MOV EAX,dword ptr [RBP + -0x7c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x7c],EAX
JMP 0x001868e7
LAB_0018690a:
JMP 0x0018690c
LAB_0018690c:
MOV CL,byte ptr [RBP + -0x31]
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x60],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00186939
LAB_0018692a:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_00186939:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
char * backtick_string(int8 param_1,char *param_2,char *param_3,char *param_4,ulong param_5,
char param_6,char param_7)
{
char cVar1;
uint uVar2;
char *pcVar3;
uint local_84;
uint local_7c;
char *local_68;
long local_58 [3];
char local_39;
ulong local_38;
char *local_30;
char *local_28;
char *local_20;
int8 local_18;
local_39 = param_6;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
memset(local_58,0,0x18);
pcVar3 = local_30 + local_38;
local_7c = 0;
if (local_38 < (ulong)((long)local_28 - (long)local_20)) {
local_68 = local_20 + 1;
*local_20 = local_39;
for (; local_30 < pcVar3; local_30 = local_30 + uVar2) {
cVar1 = *local_30;
if (param_7 != '\0') {
local_58[local_7c] = (long)local_68;
local_7c = (local_7c + 1) % 3;
}
uVar2 = my_ci_charlen_fix(local_18,local_30,pcVar3);
if ((uVar2 == 1) && (cVar1 == local_39)) {
if (local_28 <= local_68 + 1) goto LAB_0018692a;
*local_68 = local_39;
local_68 = local_68 + 1;
}
if (local_28 <= local_68 + uVar2) goto LAB_0018692a;
local_68 = (char *)strnmov(local_68,local_30,uVar2);
}
if (local_68 + 1 < local_28) {
if (param_7 != '\0') {
local_68 = (char *)0x0;
for (local_84 = 0; local_84 < 3; local_84 = local_84 + 1) {
if (local_7c == 0) {
local_7c = 2;
}
else {
local_7c = local_7c - 1;
}
if (local_58[local_7c] == 0) break;
local_68 = (char *)local_58[local_7c];
}
if (local_68 == (char *)0x0) goto LAB_0018692a;
for (; local_84 != 0; local_84 = local_84 - 1) {
*local_68 = '.';
local_68 = local_68 + 1;
}
}
*local_68 = local_39;
return local_68 + 1;
}
}
LAB_0018692a:
*local_20 = '\0';
return local_20;
}
| |
21,568 | pvio_socket_write | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | ssize_t pvio_socket_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length)
{
ssize_t r;
struct st_pvio_socket *csock;
int timeout;
int send_flags= MSG_DONTWAIT;
#ifdef MSG_NOSIGNAL
send_flags|= MSG_NOSIGNAL;
#endif
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
timeout = pvio->timeout[PVIO_WRITE_TIMEOUT];
while ((r = ma_send(csock->socket, (void *)buffer, length,send_flags)) == -1)
{
int err = socket_errno;
if ((err != SOCKET_EAGAIN
#ifdef HAVE_SOCKET_EWOULDBLOCK
&& err != SOCKET_EWOULDBLOCK
#endif
)|| timeout == 0)
return r;
if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 1)
return -1;
}
return r;
} | O0 | c | pvio_socket_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x40, -0x38(%rbp)
movl -0x38(%rbp), %eax
orl $0x4000, %eax # imm = 0x4000
movl %eax, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x41dd7
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x41de1
movq $-0x1, -0x8(%rbp)
jmp 0x41e5d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x38(%rbp), %ecx
callq 0x43330
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
jne 0x41e55
callq 0x13050
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0xb, -0x3c(%rbp)
jne 0x41e2c
cmpl $0x0, -0x34(%rbp)
jne 0x41e36
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x41e5d
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
xorl %esi, %esi
callq 0x41f00
cmpl $0x1, %eax
jge 0x41e53
movq $-0x1, -0x8(%rbp)
jmp 0x41e5d
jmp 0x41df6
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| pvio_socket_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_38], 40h ; '@'
mov eax, [rbp+var_38]
or eax, 4000h
mov [rbp+var_38], eax
cmp [rbp+var_10], 0
jz short loc_41DD7
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_41DE1
loc_41DD7:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_41E5D
loc_41DE1:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+2Ch]
mov [rbp+var_34], eax
loc_41DF6:
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_38]
call ma_send
mov [rbp+var_28], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_41E55
call ___errno_location
mov eax, [rax]
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0Bh
jnz short loc_41E2C
cmp [rbp+var_34], 0
jnz short loc_41E36
loc_41E2C:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_41E5D
loc_41E36:
mov rdi, [rbp+var_10]
mov edx, [rbp+var_34]
xor esi, esi
call pvio_socket_wait_io_or_timeout
cmp eax, 1
jge short loc_41E53
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_41E5D
loc_41E53:
jmp short loc_41DF6
loc_41E55:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_41E5D:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_write(unsigned int **a1, long long a2, long long a3)
{
long long v3; // rdi
unsigned int v5; // [rsp+Ch] [rbp-34h]
unsigned int *v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+18h] [rbp-28h]
if ( !a1 || !*a1 )
return -1LL;
v6 = *a1;
v5 = *((_DWORD *)a1 + 11);
while ( 1 )
{
v3 = *v6;
v7 = ma_send(v3, a2, a3, 16448LL);
if ( v7 != -1 )
break;
if ( *(_DWORD *)__errno_location(v3) != 11 || !v5 )
return -1LL;
if ( (int)pvio_socket_wait_io_or_timeout(a1, 0LL, v5) < 1 )
return -1LL;
}
return v7;
}
| pvio_socket_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x38],0x40
MOV EAX,dword ptr [RBP + -0x38]
OR EAX,0x4000
MOV dword ptr [RBP + -0x38],EAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00141dd7
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00141de1
LAB_00141dd7:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00141e5d
LAB_00141de1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RBP + -0x34],EAX
LAB_00141df6:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x38]
CALL 0x00143330
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,-0x1
JNZ 0x00141e55
CALL 0x00113050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0xb
JNZ 0x00141e2c
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x00141e36
LAB_00141e2c:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00141e5d
LAB_00141e36:
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x34]
XOR ESI,ESI
CALL 0x00141f00
CMP EAX,0x1
JGE 0x00141e53
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00141e5d
LAB_00141e53:
JMP 0x00141df6
LAB_00141e55:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00141e5d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long pvio_socket_write(long *param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int iVar3;
long lVar4;
int *piVar5;
if ((param_1 != (long *)0x0) && (*param_1 != 0)) {
puVar2 = (int4 *)*param_1;
iVar1 = *(int *)((long)param_1 + 0x2c);
do {
lVar4 = ma_send(*puVar2,param_2,param_3,0x4040);
if (lVar4 != -1) {
return lVar4;
}
piVar5 = __errno_location();
if (*piVar5 != 0xb) {
return -1;
}
if (iVar1 == 0) {
return -1;
}
iVar3 = pvio_socket_wait_io_or_timeout(param_1,0,iVar1);
} while (0 < iVar3);
}
return -1;
}
| |
21,569 | moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::Block* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::requisition_block<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>() | angrymouse[P]emittra/include/concurrentqueue.h | Block* requisition_block()
{
auto block = try_get_block_from_initial_pool();
if (block != nullptr) {
return block;
}
block = try_get_block_from_free_list();
if (block != nullptr) {
return block;
}
MOODYCAMEL_CONSTEXPR_IF (canAlloc == CanAlloc) {
return create<Block>();
}
else {
return nullptr;
}
} | O0 | c | moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::Block* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::requisition_block<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>():
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x18930
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x186d1
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x186fe
movq 0x8(%rsp), %rdi
callq 0x18b00
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x186f4
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x186fe
callq 0x18b20
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE17requisition_blockILNS5_14AllocationModeE0EEEPNS5_5BlockEv:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rdi, [rsp+28h+var_10]
mov [rsp+28h+var_20], rdi
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE31try_get_block_from_initial_poolEv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_get_block_from_initial_pool(void)
mov [rsp+28h+var_18], rax
cmp [rsp+28h+var_18], 0
jz short loc_186D1
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_8], rax
jmp short loc_186FE
loc_186D1:
mov rdi, [rsp+28h+var_20]
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE28try_get_block_from_free_listEv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_get_block_from_free_list(void)
mov [rsp+28h+var_18], rax
cmp [rsp+28h+var_18], 0
jz short loc_186F4
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_8], rax
jmp short loc_186FE
loc_186F4:
call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE6createINS5_5BlockEEEPT_v; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::create<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>(void)
mov [rsp+28h+var_8], rax
loc_186FE:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| long long moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::requisition_block<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>(
long long a1)
{
long long block_from_initial_pool; // [rsp+10h] [rbp-18h]
long long block_from_free_list; // [rsp+10h] [rbp-18h]
block_from_initial_pool = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_get_block_from_initial_pool();
if ( block_from_initial_pool )
return block_from_initial_pool;
block_from_free_list = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::try_get_block_from_free_list(a1);
if ( block_from_free_list )
return block_from_free_list;
else
return moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::create<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>();
}
| requisition_block<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00118930
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JZ 0x001186d1
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001186fe
LAB_001186d1:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00118b00
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JZ 0x001186f4
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001186fe
LAB_001186f4:
CALL 0x00118b20
MOV qword ptr [RSP + 0x20],RAX
LAB_001186fe:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::Block*
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::requisition_block<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>() */
Block * __thiscall
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
::
requisition_block<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>
(ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
*this)
{
Block *local_8;
local_8 = (Block *)try_get_block_from_initial_pool(this);
if ((local_8 == (Block *)0x0) &&
(local_8 = (Block *)try_get_block_from_free_list(this), local_8 == (Block *)0x0)) {
local_8 = create<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::Block>
();
}
return local_8;
}
| |
21,570 | nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]() | ng-log[P]ng-log/src/logging.cc | std::unique_ptr<string> CheckOpMessageBuilder::NewString() {
*stream_ << ")";
return std::make_unique<std::string>(stream_->str());
} | O2 | cpp | nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x128b2(%rip), %rsi # 0x20dad
callq 0x8590
movq (%r14), %rsi
addq $0x8, %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x8960
movq %rbx, %rdi
movq %r14, %rsi
callq 0x109db
leaq 0x8(%rsp), %rdi
callq 0x8b78
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8b78
movq %rbx, %rdi
callq 0x8a40
| _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev:
push r14
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rsi]
lea rsi, aVoidNglogAnony+86h; ")"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14]
add rsi, 8
lea r14, [rsp+38h+var_30]
mov rdi, r14
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rdi, rbx
mov rsi, r14
call _ZSt11make_uniqueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::string,std::string>(std::string &&)
lea rdi, [rsp+38h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](long long a1, _QWORD *a2)
{
_BYTE v3[48]; // [rsp+8h] [rbp-30h] BYREF
std::operator<<<std::char_traits<char>>(*a2, ")");
std::stringbuf::str(v3, *a2 + 8LL);
std::make_unique<std::string,std::string>(a1, v3);
std::string::~string(v3);
return a1;
}
| NewString[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RSI]
LEA RSI,[0x120dad]
CALL 0x00108590
MOV RSI,qword ptr [R14]
ADD RSI,0x8
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00108960
LAB_0010e514:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001109db
LAB_0010e51f:
LEA RDI,[RSP + 0x8]
CALL 0x00108b78
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11]() */
void nglog::internal::CheckOpMessageBuilder::NewString_abi_cxx11_(void)
{
int8 *in_RSI;
string *in_RDI;
string local_30 [32];
std::operator<<((ostream *)*in_RSI,")");
std::__cxx11::stringbuf::str();
/* try { // try from 0010e514 to 0010e51e has its CatchHandler @ 0010e534 */
std::make_unique<std::__cxx11::string,std::__cxx11::string>(in_RDI);
std::__cxx11::string::~string(local_30);
return;
}
| |
21,571 | flush_cached_blocks | eloqsql/mysys/mf_keycache.c | static int flush_cached_blocks(SIMPLE_KEY_CACHE_CB *keycache,
File file, BLOCK_LINK **cache,
BLOCK_LINK **end,
enum flush_type type)
{
int error;
int last_errno= 0;
uint count= (uint) (end-cache);
/* Don't lock the cache during the flush */
keycache_pthread_mutex_unlock(&keycache->cache_lock);
/*
As all blocks referred in 'cache' are marked by BLOCK_IN_FLUSH
we are guarunteed no thread will change them
*/
my_qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link);
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
Note: Do not break the loop. We have registered a request on every
block in 'cache'. These must be unregistered by free_block() or
unreg_request().
*/
for ( ; cache != end ; cache++)
{
BLOCK_LINK *block= *cache;
KEYCACHE_DBUG_PRINT("flush_cached_blocks",
("block %u to be flushed", BLOCK_NUMBER(block)));
/*
If the block contents is going to be changed, we abandon the flush
for this block. flush_key_blocks_int() will restart its search and
handle the block properly.
*/
if (!(block->status & BLOCK_FOR_UPDATE))
{
/* Blocks coming here must have a certain status. */
DBUG_ASSERT(block->hash_link);
DBUG_ASSERT(block->hash_link->block == block);
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT((block->status & ~BLOCK_IN_EVICTION) ==
(BLOCK_READ | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_IN_USE));
block->status|= BLOCK_IN_FLUSHWRITE;
keycache_pthread_mutex_unlock(&keycache->cache_lock);
error= (int)my_pwrite(file, block->buffer + block->offset,
block->length - block->offset,
block->hash_link->diskpos + block->offset,
MYF(MY_NABP | MY_WAIT_IF_FULL));
keycache_pthread_mutex_lock(&keycache->cache_lock);
keycache->global_cache_write++;
if (error)
{
block->status|= BLOCK_ERROR;
if (!last_errno)
last_errno= errno ? errno : -1;
}
block->status&= ~BLOCK_IN_FLUSHWRITE;
/* Block must not have changed status except BLOCK_FOR_UPDATE. */
DBUG_ASSERT(block->hash_link);
DBUG_ASSERT(block->hash_link->block == block);
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT((block->status & ~(BLOCK_FOR_UPDATE | BLOCK_IN_EVICTION)) ==
(BLOCK_READ | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_IN_USE));
/*
Set correct status and link in right queue for free or later use.
free_block() must not see BLOCK_CHANGED and it may need to wait
for readers of the block. These should not see the block in the
wrong hash. If not freeing the block, we need to have it in the
right queue anyway.
*/
link_to_file_list(keycache, block, file, 1);
}
block->status&= ~BLOCK_IN_FLUSH;
/*
Let to proceed for possible waiting requests to write to the block page.
It might happen only during an operation to resize the key cache.
*/
release_whole_queue(&block->wqueue[COND_FOR_SAVED]);
/* type will never be FLUSH_IGNORE_CHANGED here */
if (!(type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE) &&
!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
BLOCK_FOR_UPDATE)))
{
/*
Note that a request has been registered against the block in
flush_key_blocks_int().
*/
free_block(keycache, block);
}
else
{
/*
Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block.
Note that a request has been registered against the block in
flush_key_blocks_int().
*/
unreg_request(keycache, block, 1);
}
} /* end of for ( ; cache != end ; cache++) */
return last_errno;
} | O3 | c | flush_cached_blocks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r14d
movq %rdx, %r15
movl %esi, -0x34(%rbp)
movq %rdi, %r13
movq %rcx, -0x40(%rbp)
movq %rcx, %rbx
subq %rdx, %rbx
shrq $0x3, %rbx
leaq 0xc0(%rdi), %r12
movq 0x100(%rdi), %rdi
testq %rdi, %rdi
jne 0x9a13d
movq %r12, %rdi
callq 0x291e0
movl %ebx, %esi
leaq 0x1e9(%rip), %rcx # 0x9a16b
movl $0x8, %edx
movq %r15, %rdi
callq 0x9b260
cmpq $0x0, 0x100(%r13)
jne 0x9a152
movq %r12, %rdi
callq 0x29220
movq %r12, %rbx
cmpq -0x40(%rbp), %r15
je 0x9a124
movl $0x0, -0x2c(%rbp)
movq %rbx, -0x48(%rbp)
movl %r14d, -0x30(%rbp)
movq (%r15), %r12
movl 0x50(%r12), %eax
btl $0x9, %eax
jb 0x9a09f
orl $0x100, %eax # imm = 0x100
movl %eax, 0x50(%r12)
movq 0x100(%r13), %rdi
testq %rdi, %rdi
jne 0x9a0f6
movq %rbx, %rdi
callq 0x291e0
movl 0x48(%r12), %ecx
movq 0x40(%r12), %rsi
addq %rcx, %rsi
movl 0x4c(%r12), %edx
subl %ecx, %edx
movq 0x20(%r12), %rax
addq 0x20(%rax), %rcx
movl $0x24, %r8d
movl -0x34(%rbp), %edi
callq 0xa033e
movq %rax, %r14
cmpq $0x0, 0x100(%r13)
jne 0x9a10b
movq %rbx, %rdi
callq 0x29220
incq 0x148(%r13)
movl 0x50(%r12), %ebx
testl %r14d, %r14d
je 0x9a074
orl $0x1, %ebx
movl %ebx, 0x50(%r12)
cmpl $0x0, -0x2c(%rbp)
movl -0x30(%rbp), %r14d
jne 0x9a078
callq 0x297b0
movl (%rax), %eax
cmpl $0x1, %eax
movl $0x0, %ecx
sbbl %ecx, %ecx
orl %eax, %ecx
movl %ecx, -0x2c(%rbp)
jmp 0x9a078
movl -0x30(%rbp), %r14d
andl $0xfffffeff, %ebx # imm = 0xFFFFFEFF
movl %ebx, 0x50(%r12)
movq %r13, %rdi
movq %r12, %rsi
movl -0x34(%rbp), %edx
movl $0x1, %ecx
callq 0x9849e
movl 0x50(%r12), %eax
movq -0x48(%rbp), %rbx
andl $-0x11, %eax
movl %eax, 0x50(%r12)
leaq 0x30(%r12), %rdi
callq 0x98509
testl %r14d, %r14d
je 0x9a0c9
cmpl $0x3, %r14d
je 0x9a0c9
movzwl 0x50(%r12), %eax
testl $0x284, %eax # imm = 0x284
je 0x9a0e9
movq %r13, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x97bfc
addq $0x8, %r15
cmpq -0x40(%rbp), %r15
jne 0x99fc1
jmp 0x9a12b
movq %r13, %rdi
movq %r12, %rsi
callq 0x97d04
jmp 0x9a0d9
leaq 0x2ebf13(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x99fed
movq %rbx, %rdi
leaq 0x41f4f(%rip), %rsi # 0xdc064
movl $0xee8, %edx # imm = 0xEE8
callq 0x2eb8f
jmp 0x9a039
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ebecc(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x99f71
leaq 0x41f0b(%rip), %rsi # 0xdc064
movq %r12, %rdi
movl $0xec9, %edx # imm = 0xEC9
callq 0x2eb8f
jmp 0x99fa5
| flush_cached_blocks_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14d, r8d
mov r15, rdx
mov [rbp+var_34], esi
mov r13, rdi
mov [rbp+var_40], rcx
mov rbx, rcx
sub rbx, rdx
shr rbx, 3
lea r12, [rdi+0C0h]
mov rdi, [rdi+100h]
test rdi, rdi
jnz loc_9A13D
loc_99F71:
mov rdi, r12
call _pthread_mutex_unlock
mov esi, ebx
lea rcx, cmp_sec_link_0
mov edx, 8
mov rdi, r15
call my_qsort
cmp qword ptr [r13+100h], 0
jnz loc_9A152
mov rdi, r12
call _pthread_mutex_lock
loc_99FA5:
mov rbx, r12
cmp r15, [rbp+var_40]
jz loc_9A124
mov [rbp+var_2C], 0
mov [rbp+var_48], rbx
mov [rbp+var_30], r14d
loc_99FC1:
mov r12, [r15]
mov eax, [r12+50h]
bt eax, 9
jb loc_9A09F
or eax, 100h
mov [r12+50h], eax
mov rdi, [r13+100h]
test rdi, rdi
jnz loc_9A0F6
loc_99FED:
mov rdi, rbx
call _pthread_mutex_unlock
mov ecx, [r12+48h]
mov rsi, [r12+40h]
add rsi, rcx
mov edx, [r12+4Ch]
sub edx, ecx
mov rax, [r12+20h]
add rcx, [rax+20h]
mov r8d, 24h ; '$'
mov edi, [rbp+var_34]
call my_pwrite
mov r14, rax
cmp qword ptr [r13+100h], 0
jnz loc_9A10B
mov rdi, rbx
call _pthread_mutex_lock
loc_9A039:
inc qword ptr [r13+148h]
mov ebx, [r12+50h]
test r14d, r14d
jz short loc_9A074
or ebx, 1
mov [r12+50h], ebx
cmp [rbp+var_2C], 0
mov r14d, [rbp+var_30]
jnz short loc_9A078
call ___errno_location
mov eax, [rax]
cmp eax, 1
mov ecx, 0
sbb ecx, ecx
or ecx, eax
mov [rbp+var_2C], ecx
jmp short loc_9A078
loc_9A074:
mov r14d, [rbp+var_30]
loc_9A078:
and ebx, 0FFFFFEFFh
mov [r12+50h], ebx
mov rdi, r13
mov rsi, r12
mov edx, [rbp+var_34]
mov ecx, 1
call link_to_file_list_0
mov eax, [r12+50h]
mov rbx, [rbp+var_48]
loc_9A09F:
and eax, 0FFFFFFEFh
mov [r12+50h], eax
lea rdi, [r12+30h]
call release_whole_queue
test r14d, r14d
jz short loc_9A0C9
cmp r14d, 3
jz short loc_9A0C9
movzx eax, word ptr [r12+50h]
test eax, 284h
jz short loc_9A0E9
loc_9A0C9:
mov rdi, r13
mov rsi, r12
mov edx, 1
call unreg_request_0
loc_9A0D9:
add r15, 8
cmp r15, [rbp+var_40]
jnz loc_99FC1
jmp short loc_9A12B
loc_9A0E9:
mov rdi, r13
mov rsi, r12
call free_block_0
jmp short loc_9A0D9
loc_9A0F6:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_99FED
loc_9A10B:
mov rdi, rbx
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0EE8h
call psi_mutex_lock
jmp loc_9A039
loc_9A124:
mov [rbp+var_2C], 0
loc_9A12B:
mov eax, [rbp+var_2C]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9A13D:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_99F71
loc_9A152:
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r12
mov edx, 0EC9h
call psi_mutex_lock
jmp loc_99FA5
| long long flush_cached_blocks_0(_QWORD *a1, unsigned int a2, long long *a3, long long *a4, int a5)
{
long long *v6; // r15
unsigned long long v8; // rbx
long long v9; // r12
long long v10; // rbx
long long v11; // r12
int v12; // eax
int v13; // r14d
long long v14; // rdi
int v15; // ebx
_DWORD *v16; // rax
_QWORD *v18; // [rsp+8h] [rbp-48h]
int v20; // [rsp+20h] [rbp-30h]
unsigned int v21; // [rsp+24h] [rbp-2Ch]
v6 = a3;
v8 = (unsigned long long)((char *)a4 - (char *)a3) >> 3;
v9 = (long long)(a1 + 24);
if ( a1[32] )
PSI_server[44]();
pthread_mutex_unlock(v9);
my_qsort(v6, (unsigned int)v8, 8LL, cmp_sec_link_0);
if ( a1[32] )
psi_mutex_lock(v9, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xEC9u);
else
pthread_mutex_lock(v9);
v10 = (long long)(a1 + 24);
if ( v6 == a4 )
{
return 0;
}
else
{
v21 = 0;
v18 = a1 + 24;
v20 = a5;
do
{
v11 = *v6;
v12 = *(_DWORD *)(*v6 + 80);
if ( (v12 & 0x200) == 0 )
{
*(_DWORD *)(v11 + 80) = v12 | 0x100;
if ( a1[32] )
PSI_server[44]();
pthread_mutex_unlock(v10);
v13 = my_pwrite(
a2,
*(unsigned int *)(v11 + 72) + *(_QWORD *)(v11 + 64),
(unsigned int)(*(_DWORD *)(v11 + 76) - *(_DWORD *)(v11 + 72)),
*(_QWORD *)(*(_QWORD *)(v11 + 32) + 32LL) + *(unsigned int *)(v11 + 72),
36LL);
v14 = v10;
if ( a1[32] )
psi_mutex_lock(v10, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xEE8u);
else
pthread_mutex_lock(v10);
++a1[41];
v15 = *(_DWORD *)(v11 + 80);
if ( v13 )
{
v15 |= 1u;
*(_DWORD *)(v11 + 80) = v15;
a5 = v20;
if ( !v21 )
{
v16 = (_DWORD *)__errno_location(v14);
v21 = *v16 == 0 ? -1 : *v16;
}
}
else
{
a5 = v20;
}
*(_DWORD *)(v11 + 80) = v15 & 0xFFFFFEFF;
link_to_file_list_0((long long)a1, v11, a2, 1);
v12 = *(_DWORD *)(v11 + 80);
v10 = (long long)v18;
}
*(_DWORD *)(v11 + 80) = v12 & 0xFFFFFFEF;
release_whole_queue((long long *)(v11 + 48));
if ( !a5 || a5 == 3 || (*(_WORD *)(v11 + 80) & 0x284) != 0 )
unreg_request_0(a1, v11, 1LL);
else
free_block_0((long long)a1, v11);
++v6;
}
while ( v6 != a4 );
}
return v21;
}
| flush_cached_blocks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14D,R8D
MOV R15,RDX
MOV dword ptr [RBP + -0x34],ESI
MOV R13,RDI
MOV qword ptr [RBP + -0x40],RCX
MOV RBX,RCX
SUB RBX,RDX
SHR RBX,0x3
LEA R12,[RDI + 0xc0]
MOV RDI,qword ptr [RDI + 0x100]
TEST RDI,RDI
JNZ 0x0019a13d
LAB_00199f71:
MOV RDI,R12
CALL 0x001291e0
MOV ESI,EBX
LEA RCX,[0x19a16b]
MOV EDX,0x8
MOV RDI,R15
CALL 0x0019b260
CMP qword ptr [R13 + 0x100],0x0
JNZ 0x0019a152
MOV RDI,R12
CALL 0x00129220
LAB_00199fa5:
MOV RBX,R12
CMP R15,qword ptr [RBP + -0x40]
JZ 0x0019a124
MOV dword ptr [RBP + -0x2c],0x0
MOV qword ptr [RBP + -0x48],RBX
MOV dword ptr [RBP + -0x30],R14D
LAB_00199fc1:
MOV R12,qword ptr [R15]
MOV EAX,dword ptr [R12 + 0x50]
BT EAX,0x9
JC 0x0019a09f
OR EAX,0x100
MOV dword ptr [R12 + 0x50],EAX
MOV RDI,qword ptr [R13 + 0x100]
TEST RDI,RDI
JNZ 0x0019a0f6
LAB_00199fed:
MOV RDI,RBX
CALL 0x001291e0
MOV ECX,dword ptr [R12 + 0x48]
MOV RSI,qword ptr [R12 + 0x40]
ADD RSI,RCX
MOV EDX,dword ptr [R12 + 0x4c]
SUB EDX,ECX
MOV RAX,qword ptr [R12 + 0x20]
ADD RCX,qword ptr [RAX + 0x20]
MOV R8D,0x24
MOV EDI,dword ptr [RBP + -0x34]
CALL 0x001a033e
MOV R14,RAX
CMP qword ptr [R13 + 0x100],0x0
JNZ 0x0019a10b
MOV RDI,RBX
CALL 0x00129220
LAB_0019a039:
INC qword ptr [R13 + 0x148]
MOV EBX,dword ptr [R12 + 0x50]
TEST R14D,R14D
JZ 0x0019a074
OR EBX,0x1
MOV dword ptr [R12 + 0x50],EBX
CMP dword ptr [RBP + -0x2c],0x0
MOV R14D,dword ptr [RBP + -0x30]
JNZ 0x0019a078
CALL 0x001297b0
MOV EAX,dword ptr [RAX]
CMP EAX,0x1
MOV ECX,0x0
SBB ECX,ECX
OR ECX,EAX
MOV dword ptr [RBP + -0x2c],ECX
JMP 0x0019a078
LAB_0019a074:
MOV R14D,dword ptr [RBP + -0x30]
LAB_0019a078:
AND EBX,0xfffffeff
MOV dword ptr [R12 + 0x50],EBX
MOV RDI,R13
MOV RSI,R12
MOV EDX,dword ptr [RBP + -0x34]
MOV ECX,0x1
CALL 0x0019849e
MOV EAX,dword ptr [R12 + 0x50]
MOV RBX,qword ptr [RBP + -0x48]
LAB_0019a09f:
AND EAX,0xffffffef
MOV dword ptr [R12 + 0x50],EAX
LEA RDI,[R12 + 0x30]
CALL 0x00198509
TEST R14D,R14D
JZ 0x0019a0c9
CMP R14D,0x3
JZ 0x0019a0c9
MOVZX EAX,word ptr [R12 + 0x50]
TEST EAX,0x284
JZ 0x0019a0e9
LAB_0019a0c9:
MOV RDI,R13
MOV RSI,R12
MOV EDX,0x1
CALL 0x00197bfc
LAB_0019a0d9:
ADD R15,0x8
CMP R15,qword ptr [RBP + -0x40]
JNZ 0x00199fc1
JMP 0x0019a12b
LAB_0019a0e9:
MOV RDI,R13
MOV RSI,R12
CALL 0x00197d04
JMP 0x0019a0d9
LAB_0019a0f6:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00199fed
LAB_0019a10b:
MOV RDI,RBX
LEA RSI,[0x1dc064]
MOV EDX,0xee8
CALL 0x0012eb8f
JMP 0x0019a039
LAB_0019a124:
MOV dword ptr [RBP + -0x2c],0x0
LAB_0019a12b:
MOV EAX,dword ptr [RBP + -0x2c]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019a13d:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00199f71
LAB_0019a152:
LEA RSI,[0x1dc064]
MOV RDI,R12
MOV EDX,0xec9
CALL 0x0012eb8f
JMP 0x00199fa5
|
uint flush_cached_blocks(long param_1,int4 param_2,long *param_3,long *param_4,int param_5)
{
pthread_mutex_t *__mutex;
long lVar1;
int iVar2;
uint *puVar3;
uint uVar4;
uint local_34;
__mutex = (pthread_mutex_t *)(param_1 + 0xc0);
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
my_qsort(param_3,(ulong)((long)param_4 - (long)param_3) >> 3 & 0xffffffff,8,cmp_sec_link);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xec9);
}
if (param_3 == param_4) {
local_34 = 0;
}
else {
local_34 = 0;
do {
lVar1 = *param_3;
uVar4 = *(uint *)(lVar1 + 0x50);
if ((uVar4 >> 9 & 1) == 0) {
*(uint *)(lVar1 + 0x50) = uVar4 | 0x100;
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
uVar4 = *(uint *)(lVar1 + 0x48);
iVar2 = my_pwrite(param_2,*(long *)(lVar1 + 0x40) + (ulong)uVar4,
*(int *)(lVar1 + 0x4c) - uVar4,
(ulong)uVar4 + *(long *)(*(long *)(lVar1 + 0x20) + 0x20),0x24);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xee8);
}
*(long *)(param_1 + 0x148) = *(long *)(param_1 + 0x148) + 1;
uVar4 = *(uint *)(lVar1 + 0x50);
if (iVar2 != 0) {
uVar4 = uVar4 | 1;
*(uint *)(lVar1 + 0x50) = uVar4;
if (local_34 == 0) {
puVar3 = (uint *)__errno_location();
local_34 = -(uint)(*puVar3 == 0) | *puVar3;
}
}
*(uint *)(lVar1 + 0x50) = uVar4 & 0xfffffeff;
link_to_file_list(param_1,lVar1,param_2,1);
uVar4 = *(uint *)(lVar1 + 0x50);
}
*(uint *)(lVar1 + 0x50) = uVar4 & 0xffffffef;
release_whole_queue(lVar1 + 0x30);
if (((param_5 == 0) || (param_5 == 3)) || ((*(ushort *)(lVar1 + 0x50) & 0x284) != 0)) {
unreg_request(param_1,lVar1,1);
}
else {
free_block(param_1,lVar1);
}
param_3 = param_3 + 1;
} while (param_3 != param_4);
}
return local_34;
}
| |
21,572 | jsc_module_loader | bluesky950520[P]quickjs/qjsc.c | JSModuleDef *jsc_module_loader(JSContext *ctx,
const char *module_name, void *opaque)
{
JSModuleDef *m;
namelist_entry_t *e;
/* check if it is a declared C or system module */
e = namelist_find(&cmodule_list, module_name);
if (e) {
/* add in the static init module list */
namelist_add(&init_module_list, e->name, e->short_name, 0);
/* create a dummy module */
m = JS_NewCModule(ctx, module_name, js_module_dummy_init);
} else if (js__has_suffix(module_name, ".so")) {
JS_ThrowReferenceError(ctx, "%s: dynamically linking to shared libraries not supported",
module_name);
return NULL;
} else {
size_t buf_len;
uint8_t *buf;
JSValue func_val;
char cname[1024];
buf = js_load_file(ctx, &buf_len, module_name);
if (!buf) {
JS_ThrowReferenceError(ctx, "could not load module filename '%s'",
module_name);
return NULL;
}
/* compile the module */
func_val = JS_Eval(ctx, (char *)buf, buf_len, module_name,
JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_COMPILE_ONLY);
js_free(ctx, buf);
if (JS_IsException(func_val))
return NULL;
get_c_name(cname, sizeof(cname), module_name);
if (namelist_find(&cname_list, cname)) {
find_unique_cname(cname, sizeof(cname));
}
output_object_code(ctx, outfile, func_val, cname, TRUE);
/* the module is already referenced, so we must free it */
m = JS_VALUE_GET_PTR(func_val);
JS_FreeValue(ctx, func_val);
}
return m;
} | O1 | c | jsc_module_loader:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x828, %rsp # imm = 0x828
movq %rsi, %r12
movq %rdi, %rbx
leaq 0xb9949(%rip), %rdi # 0xcd568
callq 0x13bbb
testq %rax, %rax
je 0x13c61
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0xb9941(%rip), %rdi # 0xcd578
xorl %ecx, %ecx
callq 0x13adc
leaq 0x19b(%rip), %rdx # 0x13de0
movq %rbx, %rdi
movq %r12, %rsi
addq $0x828, %rsp # imm = 0x828
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30853
leaq 0x875b2(%rip), %rsi # 0x9b21a
movq %r12, %rdi
callq 0x1b2e6
testl %eax, %eax
je 0x13ca0
leaq 0x875a3(%rip), %rsi # 0x9b21e
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x225fd
movq %r15, %rax
addq $0x828, %rsp # imm = 0x828
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x14748
testq %rax, %rax
je 0x13ced
movq %rax, %r14
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rcx
movl $0x21, %r8d
callq 0x3153a
movq %rax, %r15
movq %rdx, %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1cb99
cmpl $0x6, %r13d
jne 0x13cf6
xorl %r15d, %r15d
jmp 0x13c8b
leaq 0x87564(%rip), %rsi # 0x9b258
jmp 0x13c7b
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x13de6
leaq 0xb987b(%rip), %rdi # 0xcd588
movq %r14, %rsi
callq 0x13bbb
testq %rax, %rax
je 0x13dad
movq %r13, 0x8(%rsp)
movq %r15, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
callq 0xe240
cmpq $0x3f1, %rax # imm = 0x3F1
jb 0x13d42
movb $0x0, 0x410(%rsp)
movl $0x1, %ebp
leaq 0x87ad1(%rip), %r12 # 0x9b81f
leaq 0x420(%rsp), %r13
leaq 0x20(%rsp), %r15
leaq 0xb9826(%rip), %r14 # 0xcd588
movl $0x400, %esi # imm = 0x400
movq %r13, %rdi
movq %r12, %rdx
movq %r15, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0xe2d0
movq %r14, %rdi
movq %r13, %rsi
callq 0x13bbb
incl %ebp
testq %rax, %rax
jne 0x13d62
leaq 0x20(%rsp), %rdi
leaq 0x420(%rsp), %rdx
movl $0x400, %esi # imm = 0x400
callq 0x1b22c
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r13
movq 0xb97e4(%rip), %rsi # 0xcd598
leaq 0x20(%rsp), %r8
movq %rbx, %rdi
movq %r15, %rdx
movq %r13, %rcx
movl $0x1, %r9d
callq 0x13ea9
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1d8b3
jmp 0x13c8b
| jsc_module_loader:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 828h
mov r12, rsi
mov rbx, rdi
lea rdi, cmodule_list
call namelist_find
test rax, rax
jz short loc_13C61
mov rsi, [rax]
mov rdx, [rax+8]
lea rdi, init_module_list
xor ecx, ecx
call namelist_add
lea rdx, js_module_dummy_init
mov rdi, rbx
mov rsi, r12
add rsp, 828h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_NewCModule
loc_13C61:
lea rsi, aSo; ".so"
mov rdi, r12
call js__has_suffix
test eax, eax
jz short loc_13CA0
lea rsi, aSDynamicallyLi; "%s: dynamically linking to shared libra"...
loc_13C7B:
xor r15d, r15d
mov rdi, rbx
mov rdx, r12
xor eax, eax
call JS_ThrowReferenceError
loc_13C8B:
mov rax, r15
add rsp, 828h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_13CA0:
lea rsi, [rsp+858h+var_840]
mov rdi, rbx
mov rdx, r12
call js_load_file
test rax, rax
jz short loc_13CED
mov r14, rax
mov rdx, [rsp+858h+var_840]
mov rdi, rbx
mov rsi, rax
mov rcx, r12
mov r8d, 21h ; '!'
call JS_Eval
mov r15, rax
mov r13, rdx
mov rdi, rbx
mov rsi, r14
call js_free
cmp r13d, 6
jnz short loc_13CF6
xor r15d, r15d
jmp short loc_13C8B
loc_13CED:
lea rsi, aCouldNotLoadMo; "could not load module filename '%s'"
jmp short loc_13C7B
loc_13CF6:
lea r14, [rsp+858h+var_838]
mov rdi, r14
mov rsi, r12
call get_c_name
lea rdi, cname_list
mov rsi, r14
call namelist_find
test rax, rax
jz loc_13DAD
mov [rsp+858h+var_850], r13
mov [rsp+858h+var_848], r15
lea rdi, [rsp+858h+var_838]
call _strlen
cmp rax, 3F1h
jb short loc_13D42
mov [rsp+858h+var_448], 0
loc_13D42:
mov ebp, 1
lea r12, aSD; "%s_%d"
lea r13, [rsp+858h+var_438]
lea r15, [rsp+858h+var_838]
lea r14, cname_list
loc_13D62:
mov esi, 400h
mov rdi, r13
mov rdx, r12
mov rcx, r15
mov r8d, ebp
xor eax, eax
call _snprintf
mov rdi, r14
mov rsi, r13
call namelist_find
inc ebp
test rax, rax
jnz short loc_13D62
lea rdi, [rsp+858h+var_838]
lea rdx, [rsp+858h+var_438]
mov esi, 400h
call js__pstrcpy
mov r15, [rsp+858h+var_848]
mov r13, [rsp+858h+var_850]
loc_13DAD:
mov rsi, cs:outfile
lea r8, [rsp+858h+var_838]
mov rdi, rbx
mov rdx, r15
mov rcx, r13
mov r9d, 1
call output_object_code
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call JS_FreeValue
jmp loc_13C8B
| long long jsc_module_loader(long long a1, long long a2)
{
int v2; // r12d
long long *v3; // rax
int v5; // ecx
int v6; // r8d
int v7; // r9d
const char *v8; // rsi
long long v9; // r15
long long v10; // rax
long long v11; // r14
long long v12; // rdx
long long v13; // r13
int v14; // ebp
long long v15; // [rsp+18h] [rbp-840h] BYREF
char v16[1024]; // [rsp+20h] [rbp-838h] BYREF
_BYTE v17[1080]; // [rsp+420h] [rbp-438h] BYREF
v2 = a2;
v3 = namelist_find((long long)&cmodule_list, a2);
if ( v3 )
{
namelist_add(&init_module_list, *v3, v3[1], 0);
return JS_NewCModule(a1, a2, js_module_dummy_init);
}
if ( (unsigned int)js__has_suffix(a2, ".so") )
{
v8 = "%s: dynamically linking to shared libraries not supported";
}
else
{
v10 = js_load_file(a1, &v15, a2);
if ( v10 )
{
v11 = v10;
v9 = JS_Eval(a1, v10, v15, a2, 33LL);
v13 = v12;
js_free(a1, v11);
if ( (_DWORD)v13 == 6 )
return 0LL;
get_c_name(v16, a2);
if ( namelist_find((long long)&cname_list, (long long)v16) )
{
if ( (unsigned long long)strlen(v16) >= 0x3F1 )
v16[1008] = 0;
v14 = 1;
do
snprintf(v17, 1024LL, "%s_%d", v16, v14++);
while ( namelist_find((long long)&cname_list, (long long)v17) );
js__pstrcpy(v16, 1024LL, v17);
}
output_object_code(a1, outfile, v9, v13, v16, 1LL);
JS_FreeValue(a1, v9, v13);
return v9;
}
v8 = "could not load module filename '%s'";
}
v9 = 0LL;
JS_ThrowReferenceError(a1, (_DWORD)v8, v2, v5, v6, v7);
return v9;
}
| |||
21,573 | jsc_module_loader | bluesky950520[P]quickjs/qjsc.c | JSModuleDef *jsc_module_loader(JSContext *ctx,
const char *module_name, void *opaque)
{
JSModuleDef *m;
namelist_entry_t *e;
/* check if it is a declared C or system module */
e = namelist_find(&cmodule_list, module_name);
if (e) {
/* add in the static init module list */
namelist_add(&init_module_list, e->name, e->short_name, 0);
/* create a dummy module */
m = JS_NewCModule(ctx, module_name, js_module_dummy_init);
} else if (js__has_suffix(module_name, ".so")) {
JS_ThrowReferenceError(ctx, "%s: dynamically linking to shared libraries not supported",
module_name);
return NULL;
} else {
size_t buf_len;
uint8_t *buf;
JSValue func_val;
char cname[1024];
buf = js_load_file(ctx, &buf_len, module_name);
if (!buf) {
JS_ThrowReferenceError(ctx, "could not load module filename '%s'",
module_name);
return NULL;
}
/* compile the module */
func_val = JS_Eval(ctx, (char *)buf, buf_len, module_name,
JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_COMPILE_ONLY);
js_free(ctx, buf);
if (JS_IsException(func_val))
return NULL;
get_c_name(cname, sizeof(cname), module_name);
if (namelist_find(&cname_list, cname)) {
find_unique_cname(cname, sizeof(cname));
}
output_object_code(ctx, outfile, func_val, cname, TRUE);
/* the module is already referenced, so we must free it */
m = JS_VALUE_GET_PTR(func_val);
JS_FreeValue(ctx, func_val);
}
return m;
} | O2 | c | jsc_module_loader:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x828, %rsp # imm = 0x828
movq %rsi, %r12
movq %rdi, %rbx
leaq 0xac946(%rip), %rdi # 0xbb578
callq 0xebbf
testq %rax, %rax
je 0xec74
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0xac93e(%rip), %rdi # 0xbb588
xorl %ecx, %ecx
callq 0xeaec
leaq 0x1a8(%rip), %rdx # 0xee00
movq %rbx, %rdi
movq %r12, %rsi
addq $0x828, %rsp # imm = 0x828
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x28e4b
leaq 0x7359f(%rip), %rsi # 0x8221a
movq %r12, %rdi
callq 0x15b53
testl %eax, %eax
je 0xeca3
leaq 0x73590(%rip), %rsi # 0x8221e
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1c6df
jmp 0xedeb
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0xf70c
testq %rax, %rax
je 0xedd4
movq %rax, %r14
movq 0x18(%rsp), %rdx
pushq $0x21
popq %r8
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rcx
callq 0x29a09
movq %rax, %r15
movq %rdx, %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1726e
cmpl $0x6, %r13d
je 0xede8
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0xee06
leaq 0xac890(%rip), %rdi # 0xbb598
movq %r14, %rsi
callq 0xebbf
testq %rax, %rax
je 0xeda6
movq %r13, 0x8(%rsp)
movq %r15, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
callq 0xe250
cmpq $0x3f1, %rax # imm = 0x3F1
jb 0xed3d
movb $0x0, 0x410(%rsp)
pushq $0x1
popq %rbp
leaq 0x73ad8(%rip), %r12 # 0x8281f
leaq 0x420(%rsp), %r13
leaq 0x20(%rsp), %r15
leaq 0xac83d(%rip), %r14 # 0xbb598
movl $0x400, %esi # imm = 0x400
movq %r13, %rdi
movq %r12, %rdx
movq %r15, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0xe2e0
movq %r14, %rdi
movq %r13, %rsi
callq 0xebbf
incl %ebp
testq %rax, %rax
jne 0xed5b
leaq 0x20(%rsp), %rdi
leaq 0x420(%rsp), %rdx
movl $0x400, %esi # imm = 0x400
callq 0x15ae0
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r13
movq 0xac7fb(%rip), %rsi # 0xbb5a8
leaq 0x20(%rsp), %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0xeec4
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1801e
jmp 0xedeb
leaq 0x7347d(%rip), %rsi # 0x82258
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1c6df
xorl %r15d, %r15d
movq %r15, %rax
addq $0x828, %rsp # imm = 0x828
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| jsc_module_loader:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 828h
mov r12, rsi
mov rbx, rdi
lea rdi, cmodule_list
call namelist_find
test rax, rax
jz short loc_EC74
mov rsi, [rax]
mov rdx, [rax+8]
lea rdi, init_module_list
xor ecx, ecx
call namelist_add
lea rdx, js_module_dummy_init
mov rdi, rbx
mov rsi, r12
add rsp, 828h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_NewCModule
loc_EC74:
lea rsi, aSo; ".so"
mov rdi, r12
call js__has_suffix
test eax, eax
jz short loc_ECA3
lea rsi, aSDynamicallyLi; "%s: dynamically linking to shared libra"...
xor r15d, r15d
mov rdi, rbx
mov rdx, r12
xor eax, eax
call JS_ThrowReferenceError
jmp loc_EDEB
loc_ECA3:
lea rsi, [rsp+858h+var_840]
mov rdi, rbx
mov rdx, r12
call js_load_file
test rax, rax
jz loc_EDD4
mov r14, rax
mov rdx, [rsp+858h+var_840]
push 21h ; '!'
pop r8
mov rdi, rbx
mov rsi, rax
mov rcx, r12
call JS_Eval
mov r15, rax
mov r13, rdx
mov rdi, rbx
mov rsi, r14
call js_free
cmp r13d, 6
jz loc_EDE8
lea r14, [rsp+858h+var_838]
mov rdi, r14
mov rsi, r12
call get_c_name
lea rdi, cname_list
mov rsi, r14
call namelist_find
test rax, rax
jz loc_EDA6
mov [rsp+858h+var_850], r13
mov [rsp+858h+var_848], r15
lea rdi, [rsp+858h+var_838]
call _strlen
cmp rax, 3F1h
jb short loc_ED3D
mov [rsp+858h+var_448], 0
loc_ED3D:
push 1
pop rbp
lea r12, aSD; "%s_%d"
lea r13, [rsp+858h+var_438]
lea r15, [rsp+858h+var_838]
lea r14, cname_list
loc_ED5B:
mov esi, 400h
mov rdi, r13
mov rdx, r12
mov rcx, r15
mov r8d, ebp
xor eax, eax
call _snprintf
mov rdi, r14
mov rsi, r13
call namelist_find
inc ebp
test rax, rax
jnz short loc_ED5B
lea rdi, [rsp+858h+var_838]
lea rdx, [rsp+858h+var_438]
mov esi, 400h
call js__pstrcpy
mov r15, [rsp+858h+var_848]
mov r13, [rsp+858h+var_850]
loc_EDA6:
mov rsi, cs:outfile
lea r8, [rsp+858h+var_838]
push 1
pop r9
mov rdi, rbx
mov rdx, r15
mov rcx, r13
call output_object_code
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call JS_FreeValue
jmp short loc_EDEB
loc_EDD4:
lea rsi, aCouldNotLoadMo; "could not load module filename '%s'"
mov rdi, rbx
mov rdx, r12
xor eax, eax
call JS_ThrowReferenceError
loc_EDE8:
xor r15d, r15d
loc_EDEB:
mov rax, r15
add rsp, 828h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long jsc_module_loader(long long a1, long long a2)
{
long long *v2; // rax
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v7; // r15
long long v8; // rax
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long v12; // r14
long long v13; // rdx
long long v14; // r13
int v15; // ebp
long long v16; // [rsp+18h] [rbp-840h] BYREF
char v17[1024]; // [rsp+20h] [rbp-838h] BYREF
_BYTE v18[1080]; // [rsp+420h] [rbp-438h] BYREF
v2 = (long long *)namelist_find((long long *)&cmodule_list, a2);
if ( v2 )
{
namelist_add(&init_module_list, *v2, v2[1], 0);
return JS_NewCModule(a1, a2, js_module_dummy_init);
}
if ( (unsigned int)js__has_suffix(a2, ".so") )
{
v7 = 0LL;
JS_ThrowReferenceError(
a1,
(unsigned int)"%s: dynamically linking to shared libraries not supported",
a2,
v4,
v5,
v6);
}
else
{
v8 = js_load_file(a1, &v16, a2);
if ( v8 )
{
v12 = v8;
v7 = JS_Eval(a1, v8, v16, a2, 33LL);
v14 = v13;
js_free(a1, v12);
if ( (_DWORD)v14 != 6 )
{
get_c_name(v17, a2);
if ( namelist_find(&cname_list, (long long)v17) )
{
if ( (unsigned long long)strlen(v17) >= 0x3F1 )
v17[1008] = 0;
v15 = 1;
do
snprintf(v18, 1024LL, "%s_%d", v17, v15++);
while ( namelist_find(&cname_list, (long long)v18) );
js__pstrcpy(v17, 1024LL, v18);
}
output_object_code(a1, outfile, v7, v14, v17, 1LL);
JS_FreeValue(a1, v7, v14);
return v7;
}
}
else
{
JS_ThrowReferenceError(a1, (unsigned int)"could not load module filename '%s'", a2, v9, v10, v11);
}
return 0LL;
}
return v7;
}
| jsc_module_loader:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x828
MOV R12,RSI
MOV RBX,RDI
LEA RDI,[0x1bb578]
CALL 0x0010ebbf
TEST RAX,RAX
JZ 0x0010ec74
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[0x1bb588]
XOR ECX,ECX
CALL 0x0010eaec
LEA RDX,[0x10ee00]
MOV RDI,RBX
MOV RSI,R12
ADD RSP,0x828
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00128e4b
LAB_0010ec74:
LEA RSI,[0x18221a]
MOV RDI,R12
CALL 0x00115b53
TEST EAX,EAX
JZ 0x0010eca3
LEA RSI,[0x18221e]
XOR R15D,R15D
MOV RDI,RBX
MOV RDX,R12
XOR EAX,EAX
CALL 0x0011c6df
JMP 0x0010edeb
LAB_0010eca3:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
MOV RDX,R12
CALL 0x0010f70c
TEST RAX,RAX
JZ 0x0010edd4
MOV R14,RAX
MOV RDX,qword ptr [RSP + 0x18]
PUSH 0x21
POP R8
MOV RDI,RBX
MOV RSI,RAX
MOV RCX,R12
CALL 0x00129a09
MOV R15,RAX
MOV R13,RDX
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011726e
CMP R13D,0x6
JZ 0x0010ede8
LEA R14,[RSP + 0x20]
MOV RDI,R14
MOV RSI,R12
CALL 0x0010ee06
LEA RDI,[0x1bb598]
MOV RSI,R14
CALL 0x0010ebbf
TEST RAX,RAX
JZ 0x0010eda6
MOV qword ptr [RSP + 0x8],R13
MOV qword ptr [RSP + 0x10],R15
LEA RDI,[RSP + 0x20]
CALL 0x0010e250
CMP RAX,0x3f1
JC 0x0010ed3d
MOV byte ptr [RSP + 0x410],0x0
LAB_0010ed3d:
PUSH 0x1
POP RBP
LEA R12,[0x18281f]
LEA R13,[RSP + 0x420]
LEA R15,[RSP + 0x20]
LEA R14,[0x1bb598]
LAB_0010ed5b:
MOV ESI,0x400
MOV RDI,R13
MOV RDX,R12
MOV RCX,R15
MOV R8D,EBP
XOR EAX,EAX
CALL 0x0010e2e0
MOV RDI,R14
MOV RSI,R13
CALL 0x0010ebbf
INC EBP
TEST RAX,RAX
JNZ 0x0010ed5b
LEA RDI,[RSP + 0x20]
LEA RDX,[RSP + 0x420]
MOV ESI,0x400
CALL 0x00115ae0
MOV R15,qword ptr [RSP + 0x10]
MOV R13,qword ptr [RSP + 0x8]
LAB_0010eda6:
MOV RSI,qword ptr [0x001bb5a8]
LEA R8,[RSP + 0x20]
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RDX,R15
MOV RCX,R13
CALL 0x0010eec4
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x0011801e
JMP 0x0010edeb
LAB_0010edd4:
LEA RSI,[0x182258]
MOV RDI,RBX
MOV RDX,R12
XOR EAX,EAX
CALL 0x0011c6df
LAB_0010ede8:
XOR R15D,R15D
LAB_0010edeb:
MOV RAX,R15
ADD RSP,0x828
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 jsc_module_loader(int8 param_1,int8 param_2)
{
int iVar1;
int8 *puVar2;
int8 uVar3;
long lVar4;
size_t sVar5;
uint uVar6;
int1 auVar7 [16];
int8 local_840;
char local_838 [1008];
int1 local_448;
char local_438 [1032];
puVar2 = (int8 *)namelist_find(cmodule_list);
if (puVar2 != (int8 *)0x0) {
namelist_add(&init_module_list,*puVar2,puVar2[1],0);
uVar3 = JS_NewCModule(param_1,param_2,js_module_dummy_init);
return uVar3;
}
iVar1 = js__has_suffix(param_2,&DAT_0018221a);
if (iVar1 == 0) {
lVar4 = js_load_file(param_1,&local_840,param_2);
if (lVar4 == 0) {
JS_ThrowReferenceError(param_1,"could not load module filename \'%s\'",param_2);
}
else {
auVar7 = JS_Eval(param_1,lVar4,local_840,param_2,0x21);
uVar3 = auVar7._0_8_;
js_free(param_1,lVar4);
if (auVar7._8_4_ != 6) {
get_c_name(local_838,param_2);
lVar4 = namelist_find(&cname_list,local_838);
if (lVar4 != 0) {
sVar5 = strlen(local_838);
if (0x3f0 < sVar5) {
local_448 = 0;
}
uVar6 = 1;
do {
snprintf(local_438,0x400,"%s_%d",local_838,(ulong)uVar6);
lVar4 = namelist_find(&cname_list,local_438);
uVar6 = uVar6 + 1;
} while (lVar4 != 0);
js__pstrcpy(local_838,0x400,local_438);
}
output_object_code(param_1,outfile,uVar3,auVar7._8_8_,local_838,1);
JS_FreeValue(param_1,uVar3,auVar7._8_8_);
return uVar3;
}
}
}
else {
JS_ThrowReferenceError
(param_1,"%s: dynamically linking to shared libraries not supported",param_2);
}
return 0;
}
| |
21,574 | Binary_string::set_fcvt(double, unsigned int) | eloqsql/sql/sql_string.cc | bool Binary_string::set_fcvt(double num, uint decimals)
{
// Assert that `decimals` is small enough to fit into FLOATING_POINT_BUFFER
DBUG_ASSERT(decimals < DECIMAL_NOT_SPECIFIED);
if (alloc(FLOATING_POINT_BUFFER))
return true;
length(my_fcvt(num, decimals, Ptr, NULL));
return false;
} | O3 | cpp | Binary_string::set_fcvt(double, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x15d, 0xc(%rdi) # imm = 0x15D
ja 0x268e5
movl $0x15e, %esi # imm = 0x15E
movq %rbx, %rdi
movsd %xmm0, -0x20(%rbp)
callq 0x265ec
movsd -0x20(%rbp), %xmm0
movb $0x1, %r15b
testb %al, %al
jne 0x268f8
movq (%rbx), %rsi
xorl %r15d, %r15d
movl %r14d, %edi
xorl %edx, %edx
callq 0x5e128
movl %eax, 0x8(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZN13Binary_string8set_fcvtEdj:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, esi
mov rbx, rdi
cmp dword ptr [rdi+0Ch], 15Dh
ja short loc_268E5
mov esi, 15Eh; unsigned __int64
mov rdi, rbx; this
movsd [rbp+var_20], xmm0
call _ZN13Binary_string10real_allocEm; Binary_string::real_alloc(ulong)
movsd xmm0, [rbp+var_20]
mov r15b, 1
test al, al
jnz short loc_268F8
loc_268E5:
mov rsi, [rbx]
xor r15d, r15d
mov edi, r14d
xor edx, edx
call my_fcvt
mov [rbx+8], eax
loc_268F8:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long Binary_string::set_fcvt(Binary_string *this, double a2, unsigned int a3)
{
unsigned int v3; // r15d
if ( *((_DWORD *)this + 3) > 0x15Du || (LOBYTE(v3) = 1, !(unsigned __int8)Binary_string::real_alloc(this, 0x15EuLL)) )
{
v3 = 0;
*((_DWORD *)this + 2) = my_fcvt(a3, *(_QWORD *)this, 0LL, a2);
}
return v3;
}
| set_fcvt:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ESI
MOV RBX,RDI
CMP dword ptr [RDI + 0xc],0x15d
JA 0x001268e5
MOV ESI,0x15e
MOV RDI,RBX
MOVSD qword ptr [RBP + -0x20],XMM0
CALL 0x001265ec
MOVSD XMM0,qword ptr [RBP + -0x20]
MOV R15B,0x1
TEST AL,AL
JNZ 0x001268f8
LAB_001268e5:
MOV RSI,qword ptr [RBX]
XOR R15D,R15D
MOV EDI,R14D
XOR EDX,EDX
CALL 0x0015e128
MOV dword ptr [RBX + 0x8],EAX
LAB_001268f8:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* Binary_string::set_fcvt(double, unsigned int) */
ulong __thiscall Binary_string::set_fcvt(Binary_string *this,double param_1,uint param_2)
{
char cVar1;
int4 uVar2;
int8 unaff_R15;
ulong uVar3;
if (*(uint *)(this + 0xc) < 0x15e) {
cVar1 = real_alloc(this,0x15e);
uVar3 = CONCAT71((int7)((ulong)unaff_R15 >> 8),1);
if (cVar1 != '\0') goto LAB_001268f8;
}
uVar3 = 0;
uVar2 = my_fcvt(param_1,param_2,*(int8 *)this,0);
*(int4 *)(this + 8) = uVar2;
LAB_001268f8:
return uVar3 & 0xffffffff;
}
| |
21,575 | void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(int, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index&) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/primvarRefiner.h | inline void
PrimvarRefinerReal<REAL>::InterpolateVarying(int level, T const & src, U & dst) const {
assert(level>0 && level<=(int)_refiner._refinements.size());
Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
Vtr::internal::Level const & parent = refinement.parent();
//
// Group values to interpolate based on origin -- note that there may
// be none originating from faces:
//
if (refinement.getNumChildVerticesFromFaces() > 0) {
for (int face = 0; face < parent.getNumFaces(); ++face) {
Vtr::Index cVert = refinement.getFaceChildVertex(face);
if (Vtr::IndexIsValid(cVert)) {
// Apply the weights to the parent face's vertices:
ConstIndexArray fVerts = parent.getFaceVertices(face);
Weight fVaryingWeight = 1.0f / (Weight) fVerts.size();
dst[cVert].Clear();
for (int i = 0; i < fVerts.size(); ++i) {
dst[cVert].AddWithWeight(src[fVerts[i]], fVaryingWeight);
}
}
}
}
for (int edge = 0; edge < parent.getNumEdges(); ++edge) {
Vtr::Index cVert = refinement.getEdgeChildVertex(edge);
if (Vtr::IndexIsValid(cVert)) {
// Apply the weights to the parent edges's vertices
ConstIndexArray eVerts = parent.getEdgeVertices(edge);
dst[cVert].Clear();
dst[cVert].AddWithWeight(src[eVerts[0]], 0.5f);
dst[cVert].AddWithWeight(src[eVerts[1]], 0.5f);
}
}
for (int vert = 0; vert < parent.getNumVertices(); ++vert) {
Vtr::Index cVert = refinement.getVertexChildVertex(vert);
if (Vtr::IndexIsValid(cVert)) {
// Essentially copy the parent vertex:
dst[cVert].Clear();
dst[cVert].AddWithWeight(src[vert], 1.0f);
}
}
} | O1 | c | void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(int, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
testl %esi, %esi
jle 0x730df
movq (%rdi), %rcx
movq 0x48(%rcx), %rax
movq 0x50(%rcx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %esi, %ecx
jl 0x730df
movl %esi, %ecx
movq -0x8(%rax,%rcx,8), %rax
movq 0x8(%rax), %rcx
movq %rax, 0x38(%rsp)
cmpl $0x0, 0x34(%rax)
movq %rcx, 0x8(%rsp)
jle 0x72fa1
cmpl $0x0, (%rcx)
jle 0x72fa1
xorl %edx, %edx
leaq 0x20(%rsp), %rbx
leaq 0x10(%rsp), %r15
movq 0x50(%rsp), %r14
movq 0x48(%rsp), %rbp
movq 0x38(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rdx, 0x30(%rsp)
movl (%rax,%rdx,4), %r12d
cmpl $-0x1, %r12d
je 0x72f88
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x30(%rsp), %rcx
movslq (%rax,%rcx,8), %rsi
movq %rsi, 0x58(%rsp)
testq %rsi, %rsi
jle 0x72f88
movq 0x30(%rsp), %rcx
movslq 0x4(%rax,%rcx,8), %rcx
shlq $0x2, %rcx
movq 0x8(%rsp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x60(%rsp)
xorps %xmm0, %xmm0
cvtsi2ssl 0x58(%rsp), %xmm0
movss 0x3f0cc(%rip), %xmm1 # 0xb2000
divss %xmm0, %xmm1
movss %xmm1, 0x44(%rsp)
xorl %r13d, %r13d
movq (%r14), %rax
movl 0x8(%r14), %ecx
addl %r12d, %ecx
movq %rax, 0x20(%rsp)
movl %ecx, 0x28(%rsp)
movq (%rbp), %rax
movl 0x8(%rbp), %ecx
movq 0x60(%rsp), %rsi
addl (%rsi,%r13,4), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movss 0x44(%rsp), %xmm0
callq 0x3b2f0
incq %r13
cmpq %r13, 0x58(%rsp)
jne 0x72f41
movq 0x30(%rsp), %rdx
incq %rdx
movq 0x8(%rsp), %rcx
movslq (%rcx), %rax
cmpq %rax, %rdx
jl 0x72ec8
cmpl $0x0, 0x4(%rcx)
movq 0x50(%rsp), %rbx
movq 0x48(%rsp), %r14
jle 0x73062
xorl %r13d, %r13d
movq 0x38(%rsp), %rax
movq 0xd8(%rax), %rax
movl (%rax,%r13,4), %ebp
cmpl $-0x1, %ebp
je 0x73052
movq 0x78(%rcx), %r15
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
addl %ebp, %ecx
movq %rax, 0x20(%rsp)
movl %ecx, 0x28(%rsp)
movq (%r14), %rax
movl 0x8(%r14), %ecx
addl (%r15,%r13,8), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
movss 0x42f45(%rip), %xmm0 # 0xb5f54
callq 0x3b2f0
movq (%rbx), %rax
addl 0x8(%rbx), %ebp
movq %rax, 0x20(%rsp)
movl %ebp, 0x28(%rsp)
movq (%r14), %rax
movl 0x8(%r14), %ecx
addl 0x4(%r15,%r13,8), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
movss 0x42f0c(%rip), %xmm0 # 0xb5f54
callq 0x3b2f0
movq 0x8(%rsp), %rcx
incq %r13
movslq 0x4(%rcx), %rax
cmpq %rax, %r13
jl 0x72fb8
cmpl $0x0, 0x8(%rcx)
jle 0x730d0
xorl %r13d, %r13d
leaq 0x20(%rsp), %r15
leaq 0x10(%rsp), %r12
movq 0x38(%rsp), %rax
movq 0xf0(%rax), %rax
movl (%rax,%r13,4), %eax
cmpl $-0x1, %eax
je 0x730c4
addl 0x8(%rbx), %eax
movq (%rbx), %rcx
movq %rcx, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movq (%r14), %rax
movl 0x8(%r14), %ecx
addl %r13d, %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movss 0x3ef46(%rip), %xmm0 # 0xb2000
callq 0x3b2f0
movq 0x8(%rsp), %rcx
incq %r13
movslq 0x8(%rcx), %rax
cmpq %rax, %r13
jl 0x73075
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46ef3(%rip), %rdi # 0xb9fd9
leaq 0x46f20(%rip), %rsi # 0xba00d
leaq 0x47ab4(%rip), %rcx # 0xbaba8
movl $0x19e, %edx # imm = 0x19E
callq 0x39560
| _ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE18InterpolateVaryingINS1_8internal14StencilBuilderIfE5IndexES8_EEviRKT_RT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rsp+98h+var_48], rcx
mov [rsp+98h+var_50], rdx
test esi, esi
jle loc_730DF
mov rcx, [rdi]
mov rax, [rcx+48h]
mov rcx, [rcx+50h]
sub rcx, rax
shr rcx, 3
cmp ecx, esi
jl loc_730DF
mov ecx, esi
mov rax, [rax+rcx*8-8]
mov rcx, [rax+8]
mov [rsp+98h+var_60], rax
cmp dword ptr [rax+34h], 0
mov [rsp+98h+var_90], rcx
jle loc_72FA1
cmp dword ptr [rcx], 0
jle loc_72FA1
xor edx, edx
lea rbx, [rsp+98h+var_78]
lea r15, [rsp+98h+var_88]
mov r14, [rsp+98h+var_48]
mov rbp, [rsp+98h+var_50]
loc_72EC8:
mov rax, [rsp+98h+var_60]
mov rax, [rax+0A8h]
mov [rsp+98h+var_68], rdx
mov r12d, [rax+rdx*4]
cmp r12d, 0FFFFFFFFh
jz loc_72F88
mov rax, [rsp+98h+var_90]
mov rax, [rax+18h]
mov rcx, [rsp+98h+var_68]
movsxd rsi, dword ptr [rax+rcx*8]
mov [rsp+98h+var_40], rsi
test rsi, rsi
jle loc_72F88
mov rcx, [rsp+98h+var_68]
movsxd rcx, dword ptr [rax+rcx*8+4]
shl rcx, 2
mov rax, [rsp+98h+var_90]
add rcx, [rax+30h]
mov [rsp+98h+var_38], rcx
xorps xmm0, xmm0
cvtsi2ss xmm0, dword ptr [rsp+98h+var_40]
movss xmm1, cs:dword_B2000
divss xmm1, xmm0
movss [rsp+98h+var_54], xmm1
xor r13d, r13d
loc_72F41:
mov rax, [r14]
mov ecx, [r14+8]
add ecx, r12d
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], ecx
mov rax, [rbp+0]
mov ecx, [rbp+8]
mov rsi, [rsp+98h+var_38]
add ecx, [rsi+r13*4]
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], ecx
mov rdi, rbx
mov rsi, r15
movss xmm0, [rsp+98h+var_54]
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
inc r13
cmp [rsp+98h+var_40], r13
jnz short loc_72F41
loc_72F88:
mov rdx, [rsp+98h+var_68]
inc rdx
mov rcx, [rsp+98h+var_90]
movsxd rax, dword ptr [rcx]
cmp rdx, rax
jl loc_72EC8
loc_72FA1:
cmp dword ptr [rcx+4], 0
mov rbx, [rsp+98h+var_48]
mov r14, [rsp+98h+var_50]
jle loc_73062
xor r13d, r13d
loc_72FB8:
mov rax, [rsp+98h+var_60]
mov rax, [rax+0D8h]
mov ebp, [rax+r13*4]
cmp ebp, 0FFFFFFFFh
jz loc_73052
mov r15, [rcx+78h]
mov rax, [rbx]
mov ecx, [rbx+8]
add ecx, ebp
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], ecx
mov rax, [r14]
mov ecx, [r14+8]
add ecx, [r15+r13*8]
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], ecx
lea r12, [rsp+98h+var_78]
mov rdi, r12
lea rsi, [rsp+98h+var_88]
movss xmm0, cs:dword_B5F54
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
mov rax, [rbx]
add ebp, [rbx+8]
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], ebp
mov rax, [r14]
mov ecx, [r14+8]
add ecx, [r15+r13*8+4]
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], ecx
mov rdi, r12
lea rsi, [rsp+98h+var_88]
movss xmm0, cs:dword_B5F54
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
mov rcx, [rsp+98h+var_90]
loc_73052:
inc r13
movsxd rax, dword ptr [rcx+4]
cmp r13, rax
jl loc_72FB8
loc_73062:
cmp dword ptr [rcx+8], 0
jle short loc_730D0
xor r13d, r13d
lea r15, [rsp+98h+var_78]
lea r12, [rsp+98h+var_88]
loc_73075:
mov rax, [rsp+98h+var_60]
mov rax, [rax+0F0h]
mov eax, [rax+r13*4]
cmp eax, 0FFFFFFFFh
jz short loc_730C4
add eax, [rbx+8]
mov rcx, [rbx]
mov [rsp+98h+var_78], rcx
mov [rsp+98h+var_70], eax
mov rax, [r14]
mov ecx, [r14+8]
add ecx, r13d
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], ecx
mov rdi, r15
mov rsi, r12
movss xmm0, cs:dword_B2000
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
mov rcx, [rsp+98h+var_90]
loc_730C4:
inc r13
movsxd rax, dword ptr [rcx+8]
cmp r13, rax
jl short loc_73075
loc_730D0:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_730DF:
lea rdi, aLevel0LevelInt; "level>0 && level<=(int)_refiner._refine"...
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_70; "void OpenSubdiv::v3_6_0::Far::PrimvarRe"...
mov edx, 19Eh
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(
long long a1,
int a2,
long long *a3,
long long *a4)
{
long long v4; // rax
long long result; // rax
int *v6; // rcx
long long v7; // rdx
long long *v8; // r14
long long *v9; // rbp
long long v10; // rax
int v11; // r12d
long long v12; // rax
long long i; // r13
int v14; // ecx
int v15; // ecx
long long *v16; // rbx
long long *v17; // r14
long long v18; // r13
int v19; // ebp
long long v20; // r15
int v21; // ecx
int v22; // ecx
int v23; // ebp
int v24; // ecx
long long v25; // r13
int v26; // eax
int v27; // eax
int v28; // ecx
int *v29; // [rsp+8h] [rbp-90h]
long long v30; // [rsp+10h] [rbp-88h] BYREF
int v31; // [rsp+18h] [rbp-80h]
long long v32; // [rsp+20h] [rbp-78h] BYREF
int v33; // [rsp+28h] [rbp-70h]
long long v34; // [rsp+30h] [rbp-68h]
_QWORD *v35; // [rsp+38h] [rbp-60h]
float v36; // [rsp+44h] [rbp-54h]
long long *v37; // [rsp+48h] [rbp-50h]
long long *v38; // [rsp+50h] [rbp-48h]
long long v39; // [rsp+58h] [rbp-40h]
long long v40; // [rsp+60h] [rbp-38h]
v38 = a4;
v37 = a3;
if ( a2 <= 0
|| (v4 = *(_QWORD *)(*(_QWORD *)a1 + 72LL),
(int)((unsigned long long)(*(_QWORD *)(*(_QWORD *)a1 + 80LL) - v4) >> 3) < a2) )
{
__assert_fail(
"level>0 && level<=(int)_refiner._refinements.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/primvarRefiner.h",
414LL,
"void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying(int, const T &, U &) const [REAL = flo"
"at, T = OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, U = OpenSubdiv::v3_6_0::Far::internal::St"
"encilBuilder<float>::Index]");
}
result = *(_QWORD *)(v4 + 8LL * (unsigned int)a2 - 8);
v6 = *(int **)(result + 8);
v35 = (_QWORD *)result;
v29 = v6;
if ( *(int *)(result + 52) > 0 && *v6 > 0 )
{
v7 = 0LL;
v8 = v38;
v9 = v37;
do
{
v10 = v35[21];
v34 = v7;
v11 = *(_DWORD *)(v10 + 4 * v7);
if ( v11 != -1 )
{
v12 = *((_QWORD *)v29 + 3);
v39 = *(int *)(v12 + 8 * v34);
if ( v39 > 0 )
{
v40 = *((_QWORD *)v29 + 6) + 4LL * *(int *)(v12 + 8 * v34 + 4);
v36 = 1.0 / (float)(int)v39;
for ( i = 0LL; i != v39; ++i )
{
v14 = v11 + *((_DWORD *)v8 + 2);
v32 = *v8;
v33 = v14;
v15 = *(_DWORD *)(v40 + 4 * i) + *((_DWORD *)v9 + 2);
v30 = *v9;
v31 = v15;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v32, &v30, v36);
}
}
}
v7 = v34 + 1;
v6 = v29;
result = *v29;
}
while ( v34 + 1 < result );
}
v16 = v38;
v17 = v37;
if ( v6[1] > 0 )
{
v18 = 0LL;
do
{
v19 = *(_DWORD *)(v35[27] + 4 * v18);
if ( v19 != -1 )
{
v20 = *((_QWORD *)v6 + 15);
v21 = v19 + *((_DWORD *)v16 + 2);
v32 = *v16;
v33 = v21;
v22 = *(_DWORD *)(v20 + 8 * v18) + *((_DWORD *)v17 + 2);
v30 = *v17;
v31 = v22;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v32, &v30, 0.5);
v23 = *((_DWORD *)v16 + 2) + v19;
v32 = *v16;
v33 = v23;
v24 = *(_DWORD *)(v20 + 8 * v18 + 4) + *((_DWORD *)v17 + 2);
v30 = *v17;
v31 = v24;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v32, &v30, 0.5);
v6 = v29;
}
++v18;
result = v6[1];
}
while ( v18 < result );
}
if ( v6[2] > 0 )
{
v25 = 0LL;
do
{
v26 = *(_DWORD *)(v35[30] + 4 * v25);
if ( v26 != -1 )
{
v27 = *((_DWORD *)v16 + 2) + v26;
v32 = *v16;
v33 = v27;
v28 = v25 + *((_DWORD *)v17 + 2);
v30 = *v17;
v31 = v28;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v32, &v30, 1.0);
v6 = v29;
}
++v25;
result = v6[2];
}
while ( v25 < result );
}
return result;
}
| InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RCX
MOV qword ptr [RSP + 0x48],RDX
TEST ESI,ESI
JLE 0x001730df
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RCX + 0x48]
MOV RCX,qword ptr [RCX + 0x50]
SUB RCX,RAX
SHR RCX,0x3
CMP ECX,ESI
JL 0x001730df
MOV ECX,ESI
MOV RAX,qword ptr [RAX + RCX*0x8 + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x38],RAX
CMP dword ptr [RAX + 0x34],0x0
MOV qword ptr [RSP + 0x8],RCX
JLE 0x00172fa1
CMP dword ptr [RCX],0x0
JLE 0x00172fa1
XOR EDX,EDX
LEA RBX,[RSP + 0x20]
LEA R15,[RSP + 0x10]
MOV R14,qword ptr [RSP + 0x50]
MOV RBP,qword ptr [RSP + 0x48]
LAB_00172ec8:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0xa8]
MOV qword ptr [RSP + 0x30],RDX
MOV R12D,dword ptr [RAX + RDX*0x4]
CMP R12D,-0x1
JZ 0x00172f88
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RSP + 0x30]
MOVSXD RSI,dword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x58],RSI
TEST RSI,RSI
JLE 0x00172f88
MOV RCX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RAX + RCX*0x8 + 0x4]
SHL RCX,0x2
MOV RAX,qword ptr [RSP + 0x8]
ADD RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x60],RCX
XORPS XMM0,XMM0
CVTSI2SS XMM0,dword ptr [RSP + 0x58]
MOVSS XMM1,dword ptr [0x001b2000]
DIVSS XMM1,XMM0
MOVSS dword ptr [RSP + 0x44],XMM1
XOR R13D,R13D
LAB_00172f41:
MOV RAX,qword ptr [R14]
MOV ECX,dword ptr [R14 + 0x8]
ADD ECX,R12D
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],ECX
MOV RAX,qword ptr [RBP]
MOV ECX,dword ptr [RBP + 0x8]
MOV RSI,qword ptr [RSP + 0x60]
ADD ECX,dword ptr [RSI + R13*0x4]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
MOV RDI,RBX
MOV RSI,R15
MOVSS XMM0,dword ptr [RSP + 0x44]
CALL 0x0013b2f0
INC R13
CMP qword ptr [RSP + 0x58],R13
JNZ 0x00172f41
LAB_00172f88:
MOV RDX,qword ptr [RSP + 0x30]
INC RDX
MOV RCX,qword ptr [RSP + 0x8]
MOVSXD RAX,dword ptr [RCX]
CMP RDX,RAX
JL 0x00172ec8
LAB_00172fa1:
CMP dword ptr [RCX + 0x4],0x0
MOV RBX,qword ptr [RSP + 0x50]
MOV R14,qword ptr [RSP + 0x48]
JLE 0x00173062
XOR R13D,R13D
LAB_00172fb8:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0xd8]
MOV EBP,dword ptr [RAX + R13*0x4]
CMP EBP,-0x1
JZ 0x00173052
MOV R15,qword ptr [RCX + 0x78]
MOV RAX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
ADD ECX,EBP
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],ECX
MOV RAX,qword ptr [R14]
MOV ECX,dword ptr [R14 + 0x8]
ADD ECX,dword ptr [R15 + R13*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
LEA R12,[RSP + 0x20]
MOV RDI,R12
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [0x001b5f54]
CALL 0x0013b2f0
MOV RAX,qword ptr [RBX]
ADD EBP,dword ptr [RBX + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],EBP
MOV RAX,qword ptr [R14]
MOV ECX,dword ptr [R14 + 0x8]
ADD ECX,dword ptr [R15 + R13*0x8 + 0x4]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
MOV RDI,R12
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [0x001b5f54]
CALL 0x0013b2f0
MOV RCX,qword ptr [RSP + 0x8]
LAB_00173052:
INC R13
MOVSXD RAX,dword ptr [RCX + 0x4]
CMP R13,RAX
JL 0x00172fb8
LAB_00173062:
CMP dword ptr [RCX + 0x8],0x0
JLE 0x001730d0
XOR R13D,R13D
LEA R15,[RSP + 0x20]
LEA R12,[RSP + 0x10]
LAB_00173075:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0xf0]
MOV EAX,dword ptr [RAX + R13*0x4]
CMP EAX,-0x1
JZ 0x001730c4
ADD EAX,dword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX]
MOV qword ptr [RSP + 0x20],RCX
MOV dword ptr [RSP + 0x28],EAX
MOV RAX,qword ptr [R14]
MOV ECX,dword ptr [R14 + 0x8]
ADD ECX,R13D
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
MOV RDI,R15
MOV RSI,R12
MOVSS XMM0,dword ptr [0x001b2000]
CALL 0x0013b2f0
MOV RCX,qword ptr [RSP + 0x8]
LAB_001730c4:
INC R13
MOVSXD RAX,dword ptr [RCX + 0x8]
CMP R13,RAX
JL 0x00173075
LAB_001730d0:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001730df:
LEA RDI,[0x1b9fd9]
LEA RSI,[0x1ba00d]
LEA RCX,[0x1baba8]
MOV EDX,0x19e
CALL 0x00139560
|
/* void
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(int,
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index&) const */
void __thiscall
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::
InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>
(PrimvarRefinerReal<float> *this,int param_1,Index *param_2,Index *param_3)
{
int iVar1;
int iVar2;
int *piVar3;
long lVar4;
Index *pIVar5;
Index *pIVar6;
long lVar7;
int8 local_88;
int local_80;
int8 local_78;
int local_70;
long local_68;
long local_60;
float local_54;
Index *local_50;
Index *local_48;
long local_40;
long local_38;
local_50 = param_2;
local_48 = param_3;
if ((0 < param_1) &&
(lVar7 = *(long *)(*(long *)this + 0x48),
param_1 <= (int)((ulong)(*(long *)(*(long *)this + 0x50) - lVar7) >> 3))) {
local_60 = *(long *)(lVar7 + -8 + (ulong)(uint)param_1 * 8);
piVar3 = *(int **)(local_60 + 8);
if ((0 < *(int *)(local_60 + 0x34)) && (0 < *piVar3)) {
lVar7 = 0;
do {
iVar1 = *(int *)(*(long *)(local_60 + 0xa8) + lVar7 * 4);
local_68 = lVar7;
if (iVar1 != -1) {
iVar2 = *(int *)(*(long *)(piVar3 + 6) + lVar7 * 8);
local_40 = (long)iVar2;
if (0 < local_40) {
local_38 = (long)*(int *)(*(long *)(piVar3 + 6) + 4 + lVar7 * 8) * 4 +
*(long *)(piVar3 + 0xc);
local_54 = DAT_001b2000 / (float)iVar2;
lVar7 = 0;
do {
local_78 = *(int8 *)param_3;
local_70 = *(int *)(param_3 + 8) + iVar1;
local_88 = *(int8 *)param_2;
local_80 = *(int *)(param_2 + 8) + *(int *)(local_38 + lVar7 * 4);
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_78,(Index *)&local_88,local_54);
lVar7 = lVar7 + 1;
} while (local_40 != lVar7);
}
}
lVar7 = local_68 + 1;
} while (lVar7 < *piVar3);
}
pIVar6 = local_48;
pIVar5 = local_50;
if (0 < piVar3[1]) {
lVar7 = 0;
do {
iVar1 = *(int *)(*(long *)(local_60 + 0xd8) + lVar7 * 4);
if (iVar1 != -1) {
lVar4 = *(long *)(piVar3 + 0x1e);
local_78 = *(int8 *)pIVar6;
local_70 = *(int *)(pIVar6 + 8) + iVar1;
local_88 = *(int8 *)pIVar5;
local_80 = *(int *)(pIVar5 + 8) + *(int *)(lVar4 + lVar7 * 8);
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_78,(Index *)&local_88,DAT_001b5f54);
local_78 = *(int8 *)pIVar6;
local_70 = iVar1 + *(int *)(pIVar6 + 8);
local_88 = *(int8 *)pIVar5;
local_80 = *(int *)(pIVar5 + 8) + *(int *)(lVar4 + 4 + lVar7 * 8);
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_78,(Index *)&local_88,DAT_001b5f54);
}
lVar7 = lVar7 + 1;
} while (lVar7 < piVar3[1]);
}
if (0 < piVar3[2]) {
lVar7 = 0;
do {
local_70 = *(int *)(*(long *)(local_60 + 0xf0) + lVar7 * 4);
if (local_70 != -1) {
local_70 = local_70 + *(int *)(pIVar6 + 8);
local_78 = *(int8 *)pIVar6;
local_88 = *(int8 *)pIVar5;
local_80 = *(int *)(pIVar5 + 8) + (int)lVar7;
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_78,(Index *)&local_88,DAT_001b2000);
}
lVar7 = lVar7 + 1;
} while (lVar7 < piVar3[2]);
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("level>0 && level<=(int)_refiner._refinements.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/primvarRefiner.h"
,0x19e,
"void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying(int, const T &, U &) const [REAL = float, T = OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, U = OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index]"
);
}
| |
21,576 | void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(int, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index&) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/primvarRefiner.h | inline void
PrimvarRefinerReal<REAL>::InterpolateVarying(int level, T const & src, U & dst) const {
assert(level>0 && level<=(int)_refiner._refinements.size());
Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
Vtr::internal::Level const & parent = refinement.parent();
//
// Group values to interpolate based on origin -- note that there may
// be none originating from faces:
//
if (refinement.getNumChildVerticesFromFaces() > 0) {
for (int face = 0; face < parent.getNumFaces(); ++face) {
Vtr::Index cVert = refinement.getFaceChildVertex(face);
if (Vtr::IndexIsValid(cVert)) {
// Apply the weights to the parent face's vertices:
ConstIndexArray fVerts = parent.getFaceVertices(face);
Weight fVaryingWeight = 1.0f / (Weight) fVerts.size();
dst[cVert].Clear();
for (int i = 0; i < fVerts.size(); ++i) {
dst[cVert].AddWithWeight(src[fVerts[i]], fVaryingWeight);
}
}
}
}
for (int edge = 0; edge < parent.getNumEdges(); ++edge) {
Vtr::Index cVert = refinement.getEdgeChildVertex(edge);
if (Vtr::IndexIsValid(cVert)) {
// Apply the weights to the parent edges's vertices
ConstIndexArray eVerts = parent.getEdgeVertices(edge);
dst[cVert].Clear();
dst[cVert].AddWithWeight(src[eVerts[0]], 0.5f);
dst[cVert].AddWithWeight(src[eVerts[1]], 0.5f);
}
}
for (int vert = 0; vert < parent.getNumVertices(); ++vert) {
Vtr::Index cVert = refinement.getVertexChildVertex(vert);
if (Vtr::IndexIsValid(cVert)) {
// Essentially copy the parent vertex:
dst[cVert].Clear();
dst[cVert].AddWithWeight(src[vert], 1.0f);
}
}
} | O2 | c | void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(int, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testl %esi, %esi
jle 0x845d1
movq %rcx, %rbx
movq (%rdi), %rcx
movq 0x48(%rcx), %rax
movq 0x50(%rcx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %esi, %ecx
jl 0x845d1
movq %rdx, %r14
movl %esi, %ecx
movq -0x8(%rax,%rcx,8), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq %rax, 0x30(%rsp)
cmpl $0x0, 0x34(%rax)
jle 0x844a1
xorl %ecx, %ecx
movq 0x8(%rsp), %rax
movslq (%rax), %rax
cmpq %rax, %rcx
jge 0x844a1
movq 0x30(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rcx, 0x40(%rsp)
movl (%rax,%rcx,4), %r12d
cmpl $-0x1, %r12d
je 0x84494
movq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x52db0
movl %edx, %r15d
cvtsi2ss %edx, %xmm0
movq %rax, %rbp
movss 0x37bca(%rip), %xmm1 # 0xbc000
divss %xmm0, %xmm1
movss %xmm1, 0x3c(%rsp)
testl %edx, %edx
movl $0x0, %eax
cmovlel %eax, %r15d
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x84494
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
addl %r12d, %ecx
movq %rax, 0x20(%rsp)
movl %ecx, 0x28(%rsp)
movq (%r14), %rax
movl 0x8(%r14), %ecx
addl (%rbp,%r13,4), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movss 0x3c(%rsp), %xmm0
callq 0x54320
incq %r13
jmp 0x8444e
movq 0x40(%rsp), %rcx
incq %rcx
jmp 0x843e9
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movslq 0x4(%rax), %rax
cmpq %rax, %r15
jge 0x84558
movq 0x30(%rsp), %rax
movq 0xd8(%rax), %rax
movl (%rax,%r15,4), %ebp
cmpl $-0x1, %ebp
je 0x84550
movq 0x8(%rsp), %rax
movq 0x78(%rax), %r12
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
addl %ebp, %ecx
movq %rax, 0x20(%rsp)
movl %ecx, 0x28(%rsp)
movq (%r14), %rax
movl 0x8(%r14), %ecx
addl (%r12,%r15,8), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
leaq 0x20(%rsp), %r13
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
movss 0x3bb9e(%rip), %xmm0 # 0xc00b0
callq 0x54320
movq (%rbx), %rax
addl 0x8(%rbx), %ebp
movq %rax, 0x20(%rsp)
movl %ebp, 0x28(%rsp)
movq (%r14), %rax
movl 0x8(%r14), %ecx
addl 0x4(%r12,%r15,8), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
movss 0x3bb65(%rip), %xmm0 # 0xc00b0
callq 0x54320
incq %r15
jmp 0x844a4
xorl %r15d, %r15d
leaq 0x20(%rsp), %r12
leaq 0x10(%rsp), %r13
movq 0x8(%rsp), %rax
movslq 0x8(%rax), %rax
cmpq %rax, %r15
jge 0x845c2
movq 0x30(%rsp), %rax
movq 0xf0(%rax), %rax
movl (%rax,%r15,4), %eax
cmpl $-0x1, %eax
je 0x845bd
addl 0x8(%rbx), %eax
movq (%rbx), %rcx
movq %rcx, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movq (%r14), %rax
movl 0x8(%r14), %ecx
addl %r15d, %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movss 0x37a48(%rip), %xmm0 # 0xbc000
callq 0x54320
incq %r15
jmp 0x84565
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x40031(%rip), %rdi # 0xc4609
leaq 0x4005e(%rip), %rsi # 0xc463d
leaq 0x40d17(%rip), %rcx # 0xc52fd
movl $0x19e, %edx # imm = 0x19E
callq 0x512a0
| _ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE18InterpolateVaryingINS1_8internal14StencilBuilderIfE5IndexES8_EEviRKT_RT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
test esi, esi
jle loc_845D1
mov rbx, rcx
mov rcx, [rdi]
mov rax, [rcx+48h]
mov rcx, [rcx+50h]
sub rcx, rax
shr rcx, 3
cmp ecx, esi
jl loc_845D1
mov r14, rdx
mov ecx, esi
mov rax, [rax+rcx*8-8]
mov rcx, [rax+8]
mov [rsp+78h+var_70], rcx
mov [rsp+78h+var_48], rax
cmp dword ptr [rax+34h], 0
jle loc_844A1
xor ecx, ecx
loc_843E9:
mov rax, [rsp+78h+var_70]
movsxd rax, dword ptr [rax]
cmp rcx, rax
jge loc_844A1
mov rax, [rsp+78h+var_48]
mov rax, [rax+0A8h]
mov qword ptr [rsp+78h+var_38], rcx
mov r12d, [rax+rcx*4]
cmp r12d, 0FFFFFFFFh
jz short loc_84494
mov rdi, [rsp+78h+var_70]; this
mov rsi, qword ptr [rsp+78h+var_38]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
mov r15d, edx
cvtsi2ss xmm0, edx
mov rbp, rax
movss xmm1, cs:dword_BC000
divss xmm1, xmm0
movss [rsp+78h+var_3C], xmm1
test edx, edx
mov eax, 0
cmovle r15d, eax
xor r13d, r13d
loc_8444E:
cmp r15, r13
jz short loc_84494
mov rax, [rbx]
mov ecx, [rbx+8]
add ecx, r12d
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_50], ecx
mov rax, [r14]
mov ecx, [r14+8]
add ecx, [rbp+r13*4+0]
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], ecx
lea rdi, [rsp+78h+var_58]
lea rsi, [rsp+78h+var_68]
movss xmm0, [rsp+78h+var_3C]
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
inc r13
jmp short loc_8444E
loc_84494:
mov rcx, qword ptr [rsp+78h+var_38]
inc rcx
jmp loc_843E9
loc_844A1:
xor r15d, r15d
loc_844A4:
mov rax, [rsp+78h+var_70]
movsxd rax, dword ptr [rax+4]
cmp r15, rax
jge loc_84558
mov rax, [rsp+78h+var_48]
mov rax, [rax+0D8h]
mov ebp, [rax+r15*4]
cmp ebp, 0FFFFFFFFh
jz loc_84550
mov rax, [rsp+78h+var_70]
mov r12, [rax+78h]
mov rax, [rbx]
mov ecx, [rbx+8]
add ecx, ebp
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_50], ecx
mov rax, [r14]
mov ecx, [r14+8]
add ecx, [r12+r15*8]
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], ecx
lea r13, [rsp+78h+var_58]
mov rdi, r13
lea rsi, [rsp+78h+var_68]
movss xmm0, cs:dword_C00B0
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
mov rax, [rbx]
add ebp, [rbx+8]
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_50], ebp
mov rax, [r14]
mov ecx, [r14+8]
add ecx, [r12+r15*8+4]
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], ecx
mov rdi, r13
lea rsi, [rsp+78h+var_68]
movss xmm0, cs:dword_C00B0
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
loc_84550:
inc r15
jmp loc_844A4
loc_84558:
xor r15d, r15d
lea r12, [rsp+78h+var_58]
lea r13, [rsp+78h+var_68]
loc_84565:
mov rax, [rsp+78h+var_70]
movsxd rax, dword ptr [rax+8]
cmp r15, rax
jge short loc_845C2
mov rax, [rsp+78h+var_48]
mov rax, [rax+0F0h]
mov eax, [rax+r15*4]
cmp eax, 0FFFFFFFFh
jz short loc_845BD
add eax, [rbx+8]
mov rcx, [rbx]
mov [rsp+78h+var_58], rcx
mov [rsp+78h+var_50], eax
mov rax, [r14]
mov ecx, [r14+8]
add ecx, r15d
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], ecx
mov rdi, r12
mov rsi, r13
movss xmm0, cs:dword_BC000
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
loc_845BD:
inc r15
jmp short loc_84565
loc_845C2:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_845D1:
lea rdi, aLevel0LevelInt; "level>0 && level<=(int)_refiner._refine"...
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_70; "void OpenSubdiv::v3_6_0::Far::PrimvarRe"...
mov edx, 19Eh
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(
long long a1,
int a2,
long long *a3,
long long *a4)
{
long long v5; // rax
long long v7; // rax
long long i; // rcx
long long v9; // rax
int v10; // r12d
long long FaceVertices; // rax
int v12; // edx
long long v13; // r15
long long v14; // rbp
long long j; // r13
int v16; // ecx
int v17; // ecx
long long k; // r15
int v19; // ebp
long long v20; // r12
int v21; // ecx
int v22; // ecx
int v23; // ebp
int v24; // ecx
long long m; // r15
long long result; // rax
int v27; // eax
int v28; // eax
int v29; // ecx
OpenSubdiv::v3_6_0::Vtr::internal::Level *v30; // [rsp+8h] [rbp-70h]
long long v31; // [rsp+10h] [rbp-68h] BYREF
int v32; // [rsp+18h] [rbp-60h]
long long v33; // [rsp+20h] [rbp-58h] BYREF
int v34; // [rsp+28h] [rbp-50h]
_QWORD *v35; // [rsp+30h] [rbp-48h]
float v36; // [rsp+3Ch] [rbp-3Ch]
int v37[14]; // [rsp+40h] [rbp-38h]
if ( a2 <= 0
|| (v5 = *(_QWORD *)(*(_QWORD *)a1 + 72LL),
(int)((unsigned long long)(*(_QWORD *)(*(_QWORD *)a1 + 80LL) - v5) >> 3) < a2) )
{
__assert_fail(
"level>0 && level<=(int)_refiner._refinements.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/primvarRefiner.h",
414LL,
"void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying(int, const T &, U &) const [REAL = flo"
"at, T = OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, U = OpenSubdiv::v3_6_0::Far::internal::St"
"encilBuilder<float>::Index]");
}
v7 = *(_QWORD *)(v5 + 8LL * (unsigned int)a2 - 8);
v30 = *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(v7 + 8);
v35 = (_QWORD *)v7;
if ( *(int *)(v7 + 52) > 0 )
{
for ( i = 0LL; i < *(int *)v30; i = *(_QWORD *)v37 + 1LL )
{
v9 = v35[21];
*(_QWORD *)v37 = i;
v10 = *(_DWORD *)(v9 + 4 * i);
if ( v10 != -1 )
{
FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(v30, v37[0]);
v13 = (unsigned int)v12;
v14 = FaceVertices;
v36 = 1.0 / (float)v12;
if ( v12 <= 0 )
v13 = 0LL;
for ( j = 0LL; v13 != j; ++j )
{
v16 = v10 + *((_DWORD *)a4 + 2);
v33 = *a4;
v34 = v16;
v17 = *(_DWORD *)(v14 + 4 * j) + *((_DWORD *)a3 + 2);
v31 = *a3;
v32 = v17;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v33, &v31, v36);
}
}
}
}
for ( k = 0LL; k < *((int *)v30 + 1); ++k )
{
v19 = *(_DWORD *)(v35[27] + 4 * k);
if ( v19 != -1 )
{
v20 = *((_QWORD *)v30 + 15);
v21 = v19 + *((_DWORD *)a4 + 2);
v33 = *a4;
v34 = v21;
v22 = *(_DWORD *)(v20 + 8 * k) + *((_DWORD *)a3 + 2);
v31 = *a3;
v32 = v22;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v33, &v31, 0.5);
v23 = *((_DWORD *)a4 + 2) + v19;
v33 = *a4;
v34 = v23;
v24 = *(_DWORD *)(v20 + 8 * k + 4) + *((_DWORD *)a3 + 2);
v31 = *a3;
v32 = v24;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v33, &v31, 0.5);
}
}
for ( m = 0LL; ; ++m )
{
result = *((int *)v30 + 2);
if ( m >= result )
break;
v27 = *(_DWORD *)(v35[30] + 4 * m);
if ( v27 != -1 )
{
v28 = *((_DWORD *)a4 + 2) + v27;
v33 = *a4;
v34 = v28;
v29 = m + *((_DWORD *)a3 + 2);
v31 = *a3;
v32 = v29;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v33, &v31, 1.0);
}
}
return result;
}
| InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
TEST ESI,ESI
JLE 0x001845d1
MOV RBX,RCX
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RCX + 0x48]
MOV RCX,qword ptr [RCX + 0x50]
SUB RCX,RAX
SHR RCX,0x3
CMP ECX,ESI
JL 0x001845d1
MOV R14,RDX
MOV ECX,ESI
MOV RAX,qword ptr [RAX + RCX*0x8 + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x30],RAX
CMP dword ptr [RAX + 0x34],0x0
JLE 0x001844a1
XOR ECX,ECX
LAB_001843e9:
MOV RAX,qword ptr [RSP + 0x8]
MOVSXD RAX,dword ptr [RAX]
CMP RCX,RAX
JGE 0x001844a1
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0xa8]
MOV qword ptr [RSP + 0x40],RCX
MOV R12D,dword ptr [RAX + RCX*0x4]
CMP R12D,-0x1
JZ 0x00184494
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00152db0
MOV R15D,EDX
CVTSI2SS XMM0,EDX
MOV RBP,RAX
MOVSS XMM1,dword ptr [0x001bc000]
DIVSS XMM1,XMM0
MOVSS dword ptr [RSP + 0x3c],XMM1
TEST EDX,EDX
MOV EAX,0x0
CMOVLE R15D,EAX
XOR R13D,R13D
LAB_0018444e:
CMP R15,R13
JZ 0x00184494
MOV RAX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
ADD ECX,R12D
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],ECX
MOV RAX,qword ptr [R14]
MOV ECX,dword ptr [R14 + 0x8]
ADD ECX,dword ptr [RBP + R13*0x4]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [RSP + 0x3c]
CALL 0x00154320
INC R13
JMP 0x0018444e
LAB_00184494:
MOV RCX,qword ptr [RSP + 0x40]
INC RCX
JMP 0x001843e9
LAB_001844a1:
XOR R15D,R15D
LAB_001844a4:
MOV RAX,qword ptr [RSP + 0x8]
MOVSXD RAX,dword ptr [RAX + 0x4]
CMP R15,RAX
JGE 0x00184558
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0xd8]
MOV EBP,dword ptr [RAX + R15*0x4]
CMP EBP,-0x1
JZ 0x00184550
MOV RAX,qword ptr [RSP + 0x8]
MOV R12,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
ADD ECX,EBP
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],ECX
MOV RAX,qword ptr [R14]
MOV ECX,dword ptr [R14 + 0x8]
ADD ECX,dword ptr [R12 + R15*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
LEA R13,[RSP + 0x20]
MOV RDI,R13
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [0x001c00b0]
CALL 0x00154320
MOV RAX,qword ptr [RBX]
ADD EBP,dword ptr [RBX + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],EBP
MOV RAX,qword ptr [R14]
MOV ECX,dword ptr [R14 + 0x8]
ADD ECX,dword ptr [R12 + R15*0x8 + 0x4]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
MOV RDI,R13
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [0x001c00b0]
CALL 0x00154320
LAB_00184550:
INC R15
JMP 0x001844a4
LAB_00184558:
XOR R15D,R15D
LEA R12,[RSP + 0x20]
LEA R13,[RSP + 0x10]
LAB_00184565:
MOV RAX,qword ptr [RSP + 0x8]
MOVSXD RAX,dword ptr [RAX + 0x8]
CMP R15,RAX
JGE 0x001845c2
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0xf0]
MOV EAX,dword ptr [RAX + R15*0x4]
CMP EAX,-0x1
JZ 0x001845bd
ADD EAX,dword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX]
MOV qword ptr [RSP + 0x20],RCX
MOV dword ptr [RSP + 0x28],EAX
MOV RAX,qword ptr [R14]
MOV ECX,dword ptr [R14 + 0x8]
ADD ECX,R15D
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
MOV RDI,R12
MOV RSI,R13
MOVSS XMM0,dword ptr [0x001bc000]
CALL 0x00154320
LAB_001845bd:
INC R15
JMP 0x00184565
LAB_001845c2:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001845d1:
LEA RDI,[0x1c4609]
LEA RSI,[0x1c463d]
LEA RCX,[0x1c52fd]
MOV EDX,0x19e
CALL 0x001512a0
|
/* void
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(int,
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index&) const */
void __thiscall
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::
InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>
(PrimvarRefinerReal<float> *this,int param_1,Index *param_2,Index *param_3)
{
int iVar1;
Level *this_00;
long lVar2;
long lVar3;
uint uVar4;
ulong uVar5;
ulong uVar6;
int1 auVar7 [12];
int8 local_68;
int local_60;
int8 local_58;
int local_50;
long local_48;
float local_3c;
long local_38;
if ((0 < param_1) &&
(lVar3 = *(long *)(*(long *)this + 0x48),
param_1 <= (int)((ulong)(*(long *)(*(long *)this + 0x50) - lVar3) >> 3))) {
local_48 = *(long *)(lVar3 + -8 + (ulong)(uint)param_1 * 8);
this_00 = *(Level **)(local_48 + 8);
if (0 < *(int *)(local_48 + 0x34)) {
lVar3 = 0;
while (lVar3 < *(int *)this_00) {
iVar1 = *(int *)(*(long *)(local_48 + 0xa8) + lVar3 * 4);
local_38 = lVar3;
if (iVar1 != -1) {
auVar7 = Vtr::internal::Level::getFaceVertices(this_00,(int)lVar3);
uVar4 = auVar7._8_4_;
uVar6 = (ulong)uVar4;
local_3c = DAT_001bc000 / (float)(int)uVar4;
if ((int)uVar4 < 1) {
uVar6 = 0;
}
for (uVar5 = 0; uVar6 != uVar5; uVar5 = uVar5 + 1) {
local_58 = *(int8 *)param_3;
local_50 = *(int *)(param_3 + 8) + iVar1;
local_68 = *(int8 *)param_2;
local_60 = *(int *)(param_2 + 8) + *(int *)(auVar7._0_8_ + uVar5 * 4);
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_58,(Index *)&local_68,local_3c);
}
}
lVar3 = local_38 + 1;
}
}
for (lVar3 = 0; lVar3 < *(int *)(this_00 + 4); lVar3 = lVar3 + 1) {
iVar1 = *(int *)(*(long *)(local_48 + 0xd8) + lVar3 * 4);
if (iVar1 != -1) {
lVar2 = *(long *)(this_00 + 0x78);
local_58 = *(int8 *)param_3;
local_50 = *(int *)(param_3 + 8) + iVar1;
local_68 = *(int8 *)param_2;
local_60 = *(int *)(param_2 + 8) + *(int *)(lVar2 + lVar3 * 8);
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_58,(Index *)&local_68,DAT_001c00b0);
local_58 = *(int8 *)param_3;
local_50 = iVar1 + *(int *)(param_3 + 8);
local_68 = *(int8 *)param_2;
local_60 = *(int *)(param_2 + 8) + *(int *)(lVar2 + 4 + lVar3 * 8);
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_58,(Index *)&local_68,DAT_001c00b0);
}
}
for (lVar3 = 0; lVar3 < *(int *)(this_00 + 8); lVar3 = lVar3 + 1) {
local_50 = *(int *)(*(long *)(local_48 + 0xf0) + lVar3 * 4);
if (local_50 != -1) {
local_50 = local_50 + *(int *)(param_3 + 8);
local_58 = *(int8 *)param_3;
local_68 = *(int8 *)param_2;
local_60 = *(int *)(param_2 + 8) + (int)lVar3;
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_58,(Index *)&local_68,DAT_001bc000);
}
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("level>0 && level<=(int)_refiner._refinements.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/primvarRefiner.h"
,0x19e,
"void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying(int, const T &, U &) const [REAL = float, T = OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, U = OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index]"
);
}
| |
21,577 | void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(int, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index&) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/primvarRefiner.h | inline void
PrimvarRefinerReal<REAL>::InterpolateVarying(int level, T const & src, U & dst) const {
assert(level>0 && level<=(int)_refiner._refinements.size());
Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1);
Vtr::internal::Level const & parent = refinement.parent();
//
// Group values to interpolate based on origin -- note that there may
// be none originating from faces:
//
if (refinement.getNumChildVerticesFromFaces() > 0) {
for (int face = 0; face < parent.getNumFaces(); ++face) {
Vtr::Index cVert = refinement.getFaceChildVertex(face);
if (Vtr::IndexIsValid(cVert)) {
// Apply the weights to the parent face's vertices:
ConstIndexArray fVerts = parent.getFaceVertices(face);
Weight fVaryingWeight = 1.0f / (Weight) fVerts.size();
dst[cVert].Clear();
for (int i = 0; i < fVerts.size(); ++i) {
dst[cVert].AddWithWeight(src[fVerts[i]], fVaryingWeight);
}
}
}
}
for (int edge = 0; edge < parent.getNumEdges(); ++edge) {
Vtr::Index cVert = refinement.getEdgeChildVertex(edge);
if (Vtr::IndexIsValid(cVert)) {
// Apply the weights to the parent edges's vertices
ConstIndexArray eVerts = parent.getEdgeVertices(edge);
dst[cVert].Clear();
dst[cVert].AddWithWeight(src[eVerts[0]], 0.5f);
dst[cVert].AddWithWeight(src[eVerts[1]], 0.5f);
}
}
for (int vert = 0; vert < parent.getNumVertices(); ++vert) {
Vtr::Index cVert = refinement.getVertexChildVertex(vert);
if (Vtr::IndexIsValid(cVert)) {
// Essentially copy the parent vertex:
dst[cVert].Clear();
dst[cVert].AddWithWeight(src[vert], 1.0f);
}
}
} | O3 | c | void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(int, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&, OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
testl %esi, %esi
jle 0x746cb
movq (%rdi), %rcx
movq 0x48(%rcx), %rax
movq 0x50(%rcx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %esi, %ecx
jl 0x746cb
movl %esi, %ecx
movq -0x8(%rax,%rcx,8), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq %rax, 0x40(%rsp)
cmpl $0x0, 0x34(%rax)
jle 0x7456b
movq 0x8(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
jle 0x7456b
xorl %edx, %edx
leaq 0x20(%rsp), %rbx
leaq 0x10(%rsp), %r15
movq 0x30(%rsp), %rbp
movq 0x38(%rsp), %r14
movq 0x40(%rsp), %rcx
movq 0xa8(%rcx), %rcx
movl (%rcx,%rdx,4), %r12d
cmpl $-0x1, %r12d
je 0x7455c
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movslq (%rcx,%rdx,8), %r8
movq %r8, 0x50(%rsp)
testq %r8, %r8
jle 0x7455c
movq %rdx, 0x58(%rsp)
movslq 0x4(%rcx,%rdx,8), %rcx
shlq $0x2, %rcx
movq 0x8(%rsp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x60(%rsp)
xorps %xmm0, %xmm0
cvtsi2ssl 0x50(%rsp), %xmm0
movss 0x40b04(%rip), %xmm1 # 0xb5000
divss %xmm0, %xmm1
movss %xmm1, 0x4c(%rsp)
xorl %r13d, %r13d
movq (%r14), %rax
movl 0x8(%r14), %ecx
addl %r12d, %ecx
movq %rax, 0x20(%rsp)
movl %ecx, 0x28(%rsp)
movq (%rbp), %rax
movl 0x8(%rbp), %ecx
movq 0x60(%rsp), %rdx
addl (%rdx,%r13,4), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movss 0x4c(%rsp), %xmm0
callq 0x3b2b0
incq %r13
cmpq %r13, 0x50(%rsp)
jne 0x74509
movq 0x8(%rsp), %rax
movl (%rax), %eax
movq 0x58(%rsp), %rdx
incq %rdx
movslq %eax, %rcx
cmpq %rcx, %rdx
jl 0x7449a
movq 0x8(%rsp), %rax
movl 0x4(%rax), %eax
testl %eax, %eax
jle 0x7463d
xorl %r13d, %r13d
movq 0x38(%rsp), %r12
movq 0x30(%rsp), %rbx
movq 0x40(%rsp), %rcx
movq 0xd8(%rcx), %rcx
movl (%rcx,%r13,4), %ebp
cmpl $-0x1, %ebp
je 0x7462e
movq 0x8(%rsp), %rax
movq 0x78(%rax), %r15
movq (%r12), %rax
movl 0x8(%r12), %ecx
addl %ebp, %ecx
movq %rax, 0x20(%rsp)
movl %ecx, 0x28(%rsp)
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
addl (%r15,%r13,8), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
movss 0x44e3a(%rip), %xmm0 # 0xb9420
callq 0x3b2b0
movq (%r12), %rax
addl 0x8(%r12), %ebp
movq %rax, 0x20(%rsp)
movl %ebp, 0x28(%rsp)
movq (%rbx), %rax
movl 0x8(%rbx), %ecx
addl 0x4(%r15,%r13,8), %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
movss 0x44dff(%rip), %xmm0 # 0xb9420
callq 0x3b2b0
movq 0x8(%rsp), %rax
movl 0x4(%rax), %eax
incq %r13
movslq %eax, %rcx
cmpq %rcx, %r13
jl 0x74588
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
testl %eax, %eax
jle 0x746bc
xorl %r13d, %r13d
leaq 0x20(%rsp), %r15
leaq 0x10(%rsp), %r12
movq 0x40(%rsp), %rcx
movq 0xf0(%rcx), %rcx
movl (%rcx,%r13,4), %ecx
cmpl $-0x1, %ecx
je 0x746b1
movq 0x38(%rsp), %rax
addl 0x8(%rax), %ecx
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movl %ecx, 0x28(%rsp)
movq 0x30(%rsp), %rcx
movq (%rcx), %rax
movl 0x8(%rcx), %ecx
addl %r13d, %ecx
movq %rax, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movss 0x4095c(%rip), %xmm0 # 0xb5000
callq 0x3b2b0
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
incq %r13
movslq %eax, %rcx
cmpq %rcx, %r13
jl 0x74656
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x490d7(%rip), %rdi # 0xbd7a9
leaq 0x49104(%rip), %rsi # 0xbd7dd
leaq 0x49c98(%rip), %rcx # 0xbe378
movl $0x19e, %edx # imm = 0x19E
callq 0x39540
| _ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE18InterpolateVaryingINS1_8internal14StencilBuilderIfE5IndexES8_EEviRKT_RT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rsp+98h+var_60], rcx
mov [rsp+98h+var_68], rdx
test esi, esi
jle loc_746CB
mov rcx, [rdi]
mov rax, [rcx+48h]
mov rcx, [rcx+50h]
sub rcx, rax
shr rcx, 3
cmp ecx, esi
jl loc_746CB
mov ecx, esi
mov rax, [rax+rcx*8-8]
mov rcx, [rax+8]
mov [rsp+98h+var_90], rcx
mov [rsp+98h+var_58], rax
cmp dword ptr [rax+34h], 0
jle loc_7456B
mov rax, [rsp+98h+var_90]
mov eax, [rax]
test eax, eax
jle loc_7456B
xor edx, edx
lea rbx, [rsp+98h+var_78]
lea r15, [rsp+98h+var_88]
mov rbp, [rsp+98h+var_68]
mov r14, [rsp+98h+var_60]
loc_7449A:
mov rcx, [rsp+98h+var_58]
mov rcx, [rcx+0A8h]
mov r12d, [rcx+rdx*4]
cmp r12d, 0FFFFFFFFh
jz loc_7455C
mov rcx, [rsp+98h+var_90]
mov rcx, [rcx+18h]
movsxd r8, dword ptr [rcx+rdx*8]
mov [rsp+98h+var_48], r8
test r8, r8
jle loc_7455C
mov [rsp+98h+var_40], rdx
movsxd rcx, dword ptr [rcx+rdx*8+4]
shl rcx, 2
mov rax, [rsp+98h+var_90]
add rcx, [rax+30h]
mov [rsp+98h+var_38], rcx
xorps xmm0, xmm0
cvtsi2ss xmm0, dword ptr [rsp+98h+var_48]
movss xmm1, cs:dword_B5000
divss xmm1, xmm0
movss [rsp+98h+var_4C], xmm1
xor r13d, r13d
loc_74509:
mov rax, [r14]
mov ecx, [r14+8]
add ecx, r12d
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], ecx
mov rax, [rbp+0]
mov ecx, [rbp+8]
mov rdx, [rsp+98h+var_38]
add ecx, [rdx+r13*4]
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], ecx
mov rdi, rbx
mov rsi, r15
movss xmm0, [rsp+98h+var_4C]
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
inc r13
cmp [rsp+98h+var_48], r13
jnz short loc_74509
mov rax, [rsp+98h+var_90]
mov eax, [rax]
mov rdx, [rsp+98h+var_40]
loc_7455C:
inc rdx
movsxd rcx, eax
cmp rdx, rcx
jl loc_7449A
loc_7456B:
mov rax, [rsp+98h+var_90]
mov eax, [rax+4]
test eax, eax
jle loc_7463D
xor r13d, r13d
mov r12, [rsp+98h+var_60]
mov rbx, [rsp+98h+var_68]
loc_74588:
mov rcx, [rsp+98h+var_58]
mov rcx, [rcx+0D8h]
mov ebp, [rcx+r13*4]
cmp ebp, 0FFFFFFFFh
jz loc_7462E
mov rax, [rsp+98h+var_90]
mov r15, [rax+78h]
mov rax, [r12]
mov ecx, [r12+8]
add ecx, ebp
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], ecx
mov rax, [rbx]
mov ecx, [rbx+8]
add ecx, [r15+r13*8]
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], ecx
lea r14, [rsp+98h+var_78]
mov rdi, r14
lea rsi, [rsp+98h+var_88]
movss xmm0, cs:dword_B9420
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
mov rax, [r12]
add ebp, [r12+8]
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], ebp
mov rax, [rbx]
mov ecx, [rbx+8]
add ecx, [r15+r13*8+4]
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], ecx
mov rdi, r14
lea rsi, [rsp+98h+var_88]
movss xmm0, cs:dword_B9420
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
mov rax, [rsp+98h+var_90]
mov eax, [rax+4]
loc_7462E:
inc r13
movsxd rcx, eax
cmp r13, rcx
jl loc_74588
loc_7463D:
mov rax, [rsp+98h+var_90]
mov eax, [rax+8]
test eax, eax
jle short loc_746BC
xor r13d, r13d
lea r15, [rsp+98h+var_78]
lea r12, [rsp+98h+var_88]
loc_74656:
mov rcx, [rsp+98h+var_58]
mov rcx, [rcx+0F0h]
mov ecx, [rcx+r13*4]
cmp ecx, 0FFFFFFFFh
jz short loc_746B1
mov rax, [rsp+98h+var_60]
add ecx, [rax+8]
mov rax, [rax]
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], ecx
mov rcx, [rsp+98h+var_68]
mov rax, [rcx]
mov ecx, [rcx+8]
add ecx, r13d
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], ecx
mov rdi, r15
mov rsi, r12
movss xmm0, cs:dword_B5000
call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIfE5Index13AddWithWeightERKS5_f; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,float)
mov rax, [rsp+98h+var_90]
mov eax, [rax+8]
loc_746B1:
inc r13
movsxd rcx, eax
cmp r13, rcx
jl short loc_74656
loc_746BC:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_746CB:
lea rdi, aLevel0LevelInt; "level>0 && level<=(int)_refiner._refine"...
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_70; "void OpenSubdiv::v3_6_0::Far::PrimvarRe"...
mov edx, 19Eh
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(
long long a1,
int a2,
long long *a3,
long long *a4)
{
long long v4; // rax
long long v5; // rax
int v6; // eax
long long v7; // rdx
long long *v8; // rbp
long long *v9; // r14
int v10; // r12d
long long v11; // rcx
long long i; // r13
int v13; // ecx
int v14; // ecx
int v15; // eax
long long v16; // r13
long long *v17; // r12
long long *v18; // rbx
int v19; // ebp
long long v20; // r15
int v21; // ecx
int v22; // ecx
int v23; // ebp
int v24; // ecx
long long result; // rax
long long v26; // r13
int v27; // ecx
int v28; // ecx
int v29; // ecx
long long v30; // [rsp+8h] [rbp-90h]
long long v31; // [rsp+10h] [rbp-88h] BYREF
int v32; // [rsp+18h] [rbp-80h]
long long v33; // [rsp+20h] [rbp-78h] BYREF
int v34; // [rsp+28h] [rbp-70h]
long long *v35; // [rsp+30h] [rbp-68h]
long long *v36; // [rsp+38h] [rbp-60h]
_QWORD *v37; // [rsp+40h] [rbp-58h]
float v38; // [rsp+4Ch] [rbp-4Ch]
long long v39; // [rsp+50h] [rbp-48h]
long long v40; // [rsp+58h] [rbp-40h]
long long v41; // [rsp+60h] [rbp-38h]
v36 = a4;
v35 = a3;
if ( a2 <= 0
|| (v4 = *(_QWORD *)(*(_QWORD *)a1 + 72LL),
(int)((unsigned long long)(*(_QWORD *)(*(_QWORD *)a1 + 80LL) - v4) >> 3) < a2) )
{
__assert_fail(
"level>0 && level<=(int)_refiner._refinements.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/primvarRefiner.h",
414LL,
"void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying(int, const T &, U &) const [REAL = flo"
"at, T = OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, U = OpenSubdiv::v3_6_0::Far::internal::St"
"encilBuilder<float>::Index]");
}
v5 = *(_QWORD *)(v4 + 8LL * (unsigned int)a2 - 8);
v30 = *(_QWORD *)(v5 + 8);
v37 = (_QWORD *)v5;
if ( *(int *)(v5 + 52) > 0 )
{
v6 = *(_DWORD *)v30;
if ( *(int *)v30 > 0 )
{
v7 = 0LL;
v8 = v35;
v9 = v36;
do
{
v10 = *(_DWORD *)(v37[21] + 4 * v7);
if ( v10 != -1 )
{
v11 = *(_QWORD *)(v30 + 24);
v39 = *(int *)(v11 + 8 * v7);
if ( v39 > 0 )
{
v40 = v7;
v41 = *(_QWORD *)(v30 + 48) + 4LL * *(int *)(v11 + 8 * v7 + 4);
v38 = 1.0 / (float)(int)v39;
for ( i = 0LL; i != v39; ++i )
{
v13 = v10 + *((_DWORD *)v9 + 2);
v33 = *v9;
v34 = v13;
v14 = *(_DWORD *)(v41 + 4 * i) + *((_DWORD *)v8 + 2);
v31 = *v8;
v32 = v14;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v33, &v31, v38);
}
v6 = *(_DWORD *)v30;
v7 = v40;
}
}
++v7;
}
while ( v7 < v6 );
}
}
v15 = *(_DWORD *)(v30 + 4);
if ( v15 > 0 )
{
v16 = 0LL;
v17 = v36;
v18 = v35;
do
{
v19 = *(_DWORD *)(v37[27] + 4 * v16);
if ( v19 != -1 )
{
v20 = *(_QWORD *)(v30 + 120);
v21 = v19 + *((_DWORD *)v17 + 2);
v33 = *v17;
v34 = v21;
v22 = *(_DWORD *)(v20 + 8 * v16) + *((_DWORD *)v18 + 2);
v31 = *v18;
v32 = v22;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v33, &v31, 0.5);
v23 = *((_DWORD *)v17 + 2) + v19;
v33 = *v17;
v34 = v23;
v24 = *(_DWORD *)(v20 + 8 * v16 + 4) + *((_DWORD *)v18 + 2);
v31 = *v18;
v32 = v24;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v33, &v31, 0.5);
v15 = *(_DWORD *)(v30 + 4);
}
++v16;
}
while ( v16 < v15 );
}
result = *(unsigned int *)(v30 + 8);
if ( (int)result > 0 )
{
v26 = 0LL;
do
{
v27 = *(_DWORD *)(v37[30] + 4 * v26);
if ( v27 != -1 )
{
v28 = *((_DWORD *)v36 + 2) + v27;
v33 = *v36;
v34 = v28;
v29 = v26 + *((_DWORD *)v35 + 2);
v31 = *v35;
v32 = v29;
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index::AddWithWeight(&v33, &v31, 1.0);
result = *(unsigned int *)(v30 + 8);
}
++v26;
}
while ( v26 < (int)result );
}
return result;
}
| InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x30],RDX
TEST ESI,ESI
JLE 0x001746cb
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RCX + 0x48]
MOV RCX,qword ptr [RCX + 0x50]
SUB RCX,RAX
SHR RCX,0x3
CMP ECX,ESI
JL 0x001746cb
MOV ECX,ESI
MOV RAX,qword ptr [RAX + RCX*0x8 + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x40],RAX
CMP dword ptr [RAX + 0x34],0x0
JLE 0x0017456b
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JLE 0x0017456b
XOR EDX,EDX
LEA RBX,[RSP + 0x20]
LEA R15,[RSP + 0x10]
MOV RBP,qword ptr [RSP + 0x30]
MOV R14,qword ptr [RSP + 0x38]
LAB_0017449a:
MOV RCX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RCX + 0xa8]
MOV R12D,dword ptr [RCX + RDX*0x4]
CMP R12D,-0x1
JZ 0x0017455c
MOV RCX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RCX + 0x18]
MOVSXD R8,dword ptr [RCX + RDX*0x8]
MOV qword ptr [RSP + 0x50],R8
TEST R8,R8
JLE 0x0017455c
MOV qword ptr [RSP + 0x58],RDX
MOVSXD RCX,dword ptr [RCX + RDX*0x8 + 0x4]
SHL RCX,0x2
MOV RAX,qword ptr [RSP + 0x8]
ADD RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x60],RCX
XORPS XMM0,XMM0
CVTSI2SS XMM0,dword ptr [RSP + 0x50]
MOVSS XMM1,dword ptr [0x001b5000]
DIVSS XMM1,XMM0
MOVSS dword ptr [RSP + 0x4c],XMM1
XOR R13D,R13D
LAB_00174509:
MOV RAX,qword ptr [R14]
MOV ECX,dword ptr [R14 + 0x8]
ADD ECX,R12D
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],ECX
MOV RAX,qword ptr [RBP]
MOV ECX,dword ptr [RBP + 0x8]
MOV RDX,qword ptr [RSP + 0x60]
ADD ECX,dword ptr [RDX + R13*0x4]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
MOV RDI,RBX
MOV RSI,R15
MOVSS XMM0,dword ptr [RSP + 0x4c]
CALL 0x0013b2b0
INC R13
CMP qword ptr [RSP + 0x50],R13
JNZ 0x00174509
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x58]
LAB_0017455c:
INC RDX
MOVSXD RCX,EAX
CMP RDX,RCX
JL 0x0017449a
LAB_0017456b:
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x4]
TEST EAX,EAX
JLE 0x0017463d
XOR R13D,R13D
MOV R12,qword ptr [RSP + 0x38]
MOV RBX,qword ptr [RSP + 0x30]
LAB_00174588:
MOV RCX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RCX + 0xd8]
MOV EBP,dword ptr [RCX + R13*0x4]
CMP EBP,-0x1
JZ 0x0017462e
MOV RAX,qword ptr [RSP + 0x8]
MOV R15,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [R12]
MOV ECX,dword ptr [R12 + 0x8]
ADD ECX,EBP
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],ECX
MOV RAX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
ADD ECX,dword ptr [R15 + R13*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
LEA R14,[RSP + 0x20]
MOV RDI,R14
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [0x001b9420]
CALL 0x0013b2b0
MOV RAX,qword ptr [R12]
ADD EBP,dword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],EBP
MOV RAX,qword ptr [RBX]
MOV ECX,dword ptr [RBX + 0x8]
ADD ECX,dword ptr [R15 + R13*0x8 + 0x4]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
MOV RDI,R14
LEA RSI,[RSP + 0x10]
MOVSS XMM0,dword ptr [0x001b9420]
CALL 0x0013b2b0
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x4]
LAB_0017462e:
INC R13
MOVSXD RCX,EAX
CMP R13,RCX
JL 0x00174588
LAB_0017463d:
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x8]
TEST EAX,EAX
JLE 0x001746bc
XOR R13D,R13D
LEA R15,[RSP + 0x20]
LEA R12,[RSP + 0x10]
LAB_00174656:
MOV RCX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RCX + 0xf0]
MOV ECX,dword ptr [RCX + R13*0x4]
CMP ECX,-0x1
JZ 0x001746b1
MOV RAX,qword ptr [RSP + 0x38]
ADD ECX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x20],RAX
MOV dword ptr [RSP + 0x28],ECX
MOV RCX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x8]
ADD ECX,R13D
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],ECX
MOV RDI,R15
MOV RSI,R12
MOVSS XMM0,dword ptr [0x001b5000]
CALL 0x0013b2b0
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x8]
LAB_001746b1:
INC R13
MOVSXD RCX,EAX
CMP R13,RCX
JL 0x00174656
LAB_001746bc:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001746cb:
LEA RDI,[0x1bd7a9]
LEA RSI,[0x1bd7dd]
LEA RCX,[0x1be378]
MOV EDX,0x19e
CALL 0x00139540
|
/* void
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>(int,
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index const&,
OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index&) const */
void __thiscall
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::
InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index>
(PrimvarRefinerReal<float> *this,int param_1,Index *param_2,Index *param_3)
{
int iVar1;
int iVar2;
int *piVar3;
Index *pIVar4;
Index *pIVar5;
int iVar6;
long lVar7;
long lVar8;
int8 local_88;
int local_80;
int8 local_78;
int local_70;
Index *local_68;
Index *local_60;
long local_58;
float local_4c;
long local_48;
long local_40;
long local_38;
local_68 = param_2;
local_60 = param_3;
if ((0 < param_1) &&
(lVar7 = *(long *)(*(long *)this + 0x48),
param_1 <= (int)((ulong)(*(long *)(*(long *)this + 0x50) - lVar7) >> 3))) {
local_58 = *(long *)(lVar7 + -8 + (ulong)(uint)param_1 * 8);
piVar3 = *(int **)(local_58 + 8);
if (0 < *(int *)(local_58 + 0x34)) {
iVar6 = *piVar3;
if (0 < iVar6) {
lVar7 = 0;
do {
iVar1 = *(int *)(*(long *)(local_58 + 0xa8) + lVar7 * 4);
if (iVar1 != -1) {
iVar2 = *(int *)(*(long *)(piVar3 + 6) + lVar7 * 8);
local_48 = (long)iVar2;
if (0 < local_48) {
local_38 = (long)*(int *)(*(long *)(piVar3 + 6) + 4 + lVar7 * 8) * 4 +
*(long *)(piVar3 + 0xc);
local_4c = DAT_001b5000 / (float)iVar2;
lVar8 = 0;
local_40 = lVar7;
do {
local_78 = *(int8 *)param_3;
local_70 = *(int *)(param_3 + 8) + iVar1;
local_88 = *(int8 *)param_2;
local_80 = *(int *)(param_2 + 8) + *(int *)(local_38 + lVar8 * 4);
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_78,(Index *)&local_88,local_4c);
lVar8 = lVar8 + 1;
} while (local_48 != lVar8);
iVar6 = *piVar3;
lVar7 = local_40;
}
}
lVar7 = lVar7 + 1;
} while (lVar7 < iVar6);
}
}
pIVar5 = local_60;
pIVar4 = local_68;
iVar6 = piVar3[1];
if (0 < iVar6) {
lVar7 = 0;
do {
iVar1 = *(int *)(*(long *)(local_58 + 0xd8) + lVar7 * 4);
if (iVar1 != -1) {
lVar8 = *(long *)(piVar3 + 0x1e);
local_78 = *(int8 *)pIVar5;
local_70 = *(int *)(pIVar5 + 8) + iVar1;
local_88 = *(int8 *)pIVar4;
local_80 = *(int *)(pIVar4 + 8) + *(int *)(lVar8 + lVar7 * 8);
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_78,(Index *)&local_88,DAT_001b9420);
local_78 = *(int8 *)pIVar5;
local_70 = iVar1 + *(int *)(pIVar5 + 8);
local_88 = *(int8 *)pIVar4;
local_80 = *(int *)(pIVar4 + 8) + *(int *)(lVar8 + 4 + lVar7 * 8);
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_78,(Index *)&local_88,DAT_001b9420);
iVar6 = piVar3[1];
}
lVar7 = lVar7 + 1;
} while (lVar7 < iVar6);
}
iVar6 = piVar3[2];
if (0 < iVar6) {
lVar7 = 0;
do {
local_70 = *(int *)(*(long *)(local_58 + 0xf0) + lVar7 * 4);
if (local_70 != -1) {
local_70 = local_70 + *(int *)(local_60 + 8);
local_78 = *(int8 *)local_60;
local_88 = *(int8 *)local_68;
local_80 = *(int *)(local_68 + 8) + (int)lVar7;
internal::StencilBuilder<float>::Index::AddWithWeight
((Index *)&local_78,(Index *)&local_88,DAT_001b5000);
iVar6 = piVar3[2];
}
lVar7 = lVar7 + 1;
} while (lVar7 < iVar6);
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("level>0 && level<=(int)_refiner._refinements.size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/primvarRefiner.h"
,0x19e,
"void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::InterpolateVarying(int, const T &, U &) const [REAL = float, T = OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index, U = OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<float>::Index]"
);
}
| |
21,578 | tree_insert | eloqsql/mysys/tree.c | TREE_ELEMENT *tree_insert(TREE *tree, void *key, uint key_size,
void* custom_arg)
{
int cmp;
TREE_ELEMENT *element,***parent;
parent= tree->parents;
*parent = &tree->root; element= tree->root;
for (;;)
{
if (element == &null_element ||
(cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
break;
if (cmp < 0)
{
*++parent= &element->right; element= element->right;
}
else
{
*++parent = &element->left; element= element->left;
}
}
if (element == &null_element)
{
uint alloc_size;
if (tree->flag & TREE_ONLY_DUPS)
return TREE_ELEMENT_UNIQUE;
alloc_size=sizeof(TREE_ELEMENT)+key_size+tree->size_of_element;
tree->allocated+=alloc_size;
if (tree->memory_limit && tree->elements_in_tree
&& tree->allocated > tree->memory_limit)
{
reset_tree(tree);
return tree_insert(tree, key, key_size, custom_arg);
}
key_size+=tree->size_of_element;
if (tree->with_delete)
element=(TREE_ELEMENT *) my_malloc(key_memory_TREE, alloc_size,
MYF(tree->my_flags | MY_WME));
else
element=(TREE_ELEMENT *) alloc_root(&tree->mem_root,alloc_size);
if (!element)
return(NULL);
**parent=element;
element->left=element->right= &null_element;
if (!tree->offset_to_key)
{
if (key_size == sizeof(void*)) /* no length, save pointer */
*((void**) (element+1))=key;
else
{
*((void**) (element+1))= (void*) ((void **) (element+1)+1);
memcpy((uchar*) *((void **) (element+1)),key,
(size_t) (key_size-sizeof(void*)));
}
}
else
memcpy((uchar*) element+tree->offset_to_key,key,(size_t) key_size);
element->count=1; /* May give warning in purify */
tree->elements_in_tree++;
rb_insert(tree,parent,element); /* rebalance tree */
}
else
{
if (tree->flag & TREE_NO_DUPS)
return(NULL);
element->count++;
/* Avoid a wrap over of the count. */
if (! element->count)
element->count--;
}
DBUG_EXECUTE("check_tree", test_rb_tree(tree->root););
return element;
} | O0 | c | tree_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq 0x1c6840(%rip), %rax # 0x2c7100
cmpq %rax, -0x38(%rbp)
je 0x100927
movq -0x10(%rbp), %rax
movq 0x228(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x208(%rax)
je 0x100901
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x208(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
jmp 0x10090d
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x100929
jmp 0x10097f
cmpl $0x0, -0x2c(%rbp)
jge 0x100958
movq -0x38(%rbp), %rcx
addq $0x8, %rcx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x10097a
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x1008b9
leaq 0x1c677a(%rip), %rax # 0x2c7100
cmpq %rax, -0x38(%rbp)
jne 0x100b80
movq -0x10(%rbp), %rax
movl 0x290(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1009b0
movl $0x1, %eax
movq %rax, -0x8(%rbp)
jmp 0x100c03
movl -0x1c(%rbp), %eax
addq $0x18, %rax
movq -0x10(%rbp), %rcx
movl 0x210(%rcx), %ecx
addq %rcx, %rax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq 0x220(%rax), %rcx
movq %rcx, 0x220(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x218(%rax)
je 0x100a37
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20c(%rax)
je 0x100a37
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x218(%rcx), %rax
jbe 0x100a37
movq -0x10(%rbp), %rdi
callq 0x100850
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x100880
movq %rax, -0x8(%rbp)
jmp 0x100c03
movq -0x10(%rbp), %rax
movl 0x210(%rax), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x278(%rax)
je 0x100a7c
leaq 0xb89a21(%rip), %rax # 0xc8a47c
movl (%rax), %edi
movl -0x44(%rbp), %eax
movl %eax, %esi
movq -0x10(%rbp), %rax
movq 0x288(%rax), %rdx
orq $0x10, %rdx
callq 0xf99f0
movq %rax, -0x38(%rbp)
jmp 0x100a95
movq -0x10(%rbp), %rdi
addq $0x238, %rdi # imm = 0x238
movl -0x44(%rbp), %eax
movl %eax, %esi
callq 0xef490
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x100aa9
movq $0x0, -0x8(%rbp)
jmp 0x100c03
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
leaq 0x1c663e(%rip), %rcx # 0x2c7100
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
leaq 0x1c662f(%rip), %rcx # 0x2c7100
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x208(%rax)
jne 0x100b28
movl -0x1c(%rbp), %eax
cmpq $0x8, %rax
jne 0x100af8
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x100b26
movq -0x38(%rbp), %rcx
addq $0x18, %rcx
addq $0x8, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
subq $0x8, %rdx
callq 0x2a0b0
jmp 0x100b47
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x208(%rax), %eax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x2a0b0
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
andl $0x80000000, %ecx # imm = 0x80000000
orl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x20c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20c(%rax)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x100c10
jmp 0x100bf7
movq -0x10(%rbp), %rax
movl 0x290(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x100b9c
movq $0x0, -0x8(%rbp)
jmp 0x100c03
movq -0x38(%rbp), %rax
movl 0x10(%rax), %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
addl $0x1, %edx
movl 0x10(%rax), %ecx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
andl $0x80000000, %ecx # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
cmpl $0x0, %eax
jne 0x100bf5
movq -0x38(%rbp), %rax
movl 0x10(%rax), %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
addl $-0x1, %edx
movl 0x10(%rax), %ecx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
andl $0x80000000, %ecx # imm = 0x80000000
orl %edx, %ecx
movl %ecx, 0x10(%rax)
jmp 0x100bf7
jmp 0x100bf9
jmp 0x100bfb
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| tree_insert:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_40], rax
mov rcx, [rbp+var_10]
mov rax, [rbp+var_40]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_38], rax
loc_1008B9:
lea rax, null_element
cmp [rbp+var_38], rax
jz short loc_100927
mov rax, [rbp+var_10]
mov rax, [rax+228h]
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+208h], 0
jz short loc_100901
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov ecx, [rcx+208h]
add rax, rcx
mov [rbp+var_60], rax
jmp short loc_10090D
loc_100901:
mov rax, [rbp+var_38]
mov rax, [rax+18h]
mov [rbp+var_60], rax
loc_10090D:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_60]
mov rdx, [rbp+var_18]
call rax
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_100929
loc_100927:
jmp short loc_10097F
loc_100929:
cmp [rbp+var_2C], 0
jge short loc_100958
mov rcx, [rbp+var_38]
add rcx, 8
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 8
mov [rbp+var_40], rdx
mov [rax+8], rcx
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_38], rax
jmp short loc_10097A
loc_100958:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 8
mov [rbp+var_40], rdx
mov [rax+8], rcx
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_38], rax
loc_10097A:
jmp loc_1008B9
loc_10097F:
lea rax, null_element
cmp [rbp+var_38], rax
jnz loc_100B80
mov rax, [rbp+var_10]
mov eax, [rax+290h]
and eax, 2
cmp eax, 0
jz short loc_1009B0
mov eax, 1
mov [rbp+var_8], rax
jmp loc_100C03
loc_1009B0:
mov eax, [rbp+var_1C]
add rax, 18h
mov rcx, [rbp+var_10]
mov ecx, [rcx+210h]
add rax, rcx
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
mov ecx, eax
mov rax, [rbp+var_10]
add rcx, [rax+220h]
mov [rax+220h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+218h], 0
jz short loc_100A37
mov rax, [rbp+var_10]
cmp dword ptr [rax+20Ch], 0
jz short loc_100A37
mov rax, [rbp+var_10]
mov rax, [rax+220h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+218h]
jbe short loc_100A37
mov rdi, [rbp+var_10]
call reset_tree
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov rcx, [rbp+var_28]
call tree_insert
mov [rbp+var_8], rax
jmp loc_100C03
loc_100A37:
mov rax, [rbp+var_10]
mov eax, [rax+210h]
add eax, [rbp+var_1C]
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
cmp byte ptr [rax+278h], 0
jz short loc_100A7C
lea rax, key_memory_TREE
mov edi, [rax]
mov eax, [rbp+var_44]
mov esi, eax
mov rax, [rbp+var_10]
mov rdx, [rax+288h]
or rdx, 10h
call my_malloc
mov [rbp+var_38], rax
jmp short loc_100A95
loc_100A7C:
mov rdi, [rbp+var_10]
add rdi, 238h
mov eax, [rbp+var_44]
mov esi, eax
call alloc_root
mov [rbp+var_38], rax
loc_100A95:
cmp [rbp+var_38], 0
jnz short loc_100AA9
mov [rbp+var_8], 0
jmp loc_100C03
loc_100AA9:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_40]
mov rax, [rax]
mov [rax], rcx
mov rax, [rbp+var_38]
lea rcx, null_element
mov [rax+8], rcx
mov rax, [rbp+var_38]
lea rcx, null_element
mov [rax], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+208h], 0
jnz short loc_100B28
mov eax, [rbp+var_1C]
cmp rax, 8
jnz short loc_100AF8
mov rcx, [rbp+var_18]
mov rax, [rbp+var_38]
mov [rax+18h], rcx
jmp short loc_100B26
loc_100AF8:
mov rcx, [rbp+var_38]
add rcx, 18h
add rcx, 8
mov rax, [rbp+var_38]
mov [rax+18h], rcx
mov rax, [rbp+var_38]
mov rdi, [rax+18h]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_1C]
mov edx, eax
sub rdx, 8
call _memcpy
loc_100B26:
jmp short loc_100B47
loc_100B28:
mov rdi, [rbp+var_38]
mov rax, [rbp+var_10]
mov eax, [rax+208h]
add rdi, rax
mov rsi, [rbp+var_18]
mov eax, [rbp+var_1C]
mov edx, eax
call _memcpy
loc_100B47:
mov rax, [rbp+var_38]
mov ecx, [rax+10h]
and ecx, 80000000h
or ecx, 1
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov ecx, [rax+20Ch]
add ecx, 1
mov [rax+20Ch], ecx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
call rb_insert
jmp short loc_100BF7
loc_100B80:
mov rax, [rbp+var_10]
mov eax, [rax+290h]
and eax, 1
cmp eax, 0
jz short loc_100B9C
mov [rbp+var_8], 0
jmp short loc_100C03
loc_100B9C:
mov rax, [rbp+var_38]
mov edx, [rax+10h]
and edx, 7FFFFFFFh
add edx, 1
mov ecx, [rax+10h]
and edx, 7FFFFFFFh
and ecx, 80000000h
or ecx, edx
mov [rax+10h], ecx
mov rax, [rbp+var_38]
mov eax, [rax+10h]
and eax, 7FFFFFFFh
cmp eax, 0
jnz short loc_100BF5
mov rax, [rbp+var_38]
mov edx, [rax+10h]
and edx, 7FFFFFFFh
add edx, 0FFFFFFFFh
mov ecx, [rax+10h]
and edx, 7FFFFFFFh
and ecx, 80000000h
or ecx, edx
mov [rax+10h], ecx
loc_100BF5:
jmp short $+2
loc_100BF7:
jmp short $+2
loc_100BF9:
jmp short $+2
loc_100BFB:
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_100C03:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| long long tree_insert(long long a1, long long a2, unsigned int a3, long long a4)
{
int v4; // eax
char ***v5; // rax
char ***v6; // rax
long long ( *v8)(long long, char *, long long); // [rsp+8h] [rbp-58h]
unsigned int v9; // [rsp+1Ch] [rbp-44h]
char ***v10; // [rsp+20h] [rbp-40h]
char *v11; // [rsp+28h] [rbp-38h]
unsigned int v14; // [rsp+44h] [rbp-1Ch]
v10 = (char ***)(a1 + 8);
*(_QWORD *)(a1 + 8) = a1;
v11 = *(char **)a1;
while ( v11 != (char *)&null_element )
{
v8 = *(long long ( **)(long long, char *, long long))(a1 + 552);
v4 = *(_DWORD *)(a1 + 520) ? v8(a4, &v11[*(unsigned int *)(a1 + 520)], a2) : v8(a4, *((char **)v11 + 3), a2);
if ( !v4 )
break;
if ( v4 >= 0 )
{
v6 = v10++;
v6[1] = (char **)v11;
v11 = *(char **)v11;
}
else
{
v5 = v10++;
v5[1] = (char **)(v11 + 8);
v11 = (char *)*((_QWORD *)v11 + 1);
}
}
if ( v11 != (char *)&null_element )
{
if ( (*(_DWORD *)(a1 + 656) & 1) != 0 )
return 0LL;
*((_DWORD *)v11 + 4) = ((*((_DWORD *)v11 + 4) & 0x7FFFFFFF) + 1) & 0x7FFFFFFF | *((_DWORD *)v11 + 4) & 0x80000000;
if ( (*((_DWORD *)v11 + 4) & 0x7FFFFFFF) == 0 )
*((_DWORD *)v11 + 4) = ((*((_DWORD *)v11 + 4) & 0x7FFFFFFF) - 1) & 0x7FFFFFFF | *((_DWORD *)v11 + 4) & 0x80000000;
return (long long)v11;
}
if ( (*(_DWORD *)(a1 + 656) & 2) == 0 )
{
v9 = *(_DWORD *)(a1 + 528) + a3 + 24;
*(_QWORD *)(a1 + 544) += v9;
if ( *(_QWORD *)(a1 + 536) && *(_DWORD *)(a1 + 524) && *(_QWORD *)(a1 + 544) > *(_QWORD *)(a1 + 536) )
{
reset_tree((_QWORD *)a1);
return tree_insert(a1, a2, a3, a4);
}
v14 = a3 + *(_DWORD *)(a1 + 528);
if ( *(_BYTE *)(a1 + 632) )
v11 = (char *)my_malloc(key_memory_TREE, (const char *)v9, *(_DWORD *)(a1 + 648) | 0x10u);
else
v11 = alloc_root((_QWORD **)(a1 + 568), v9);
if ( !v11 )
return 0LL;
**v10 = v11;
*((_QWORD *)v11 + 1) = &null_element;
*(_QWORD *)v11 = &null_element;
if ( *(_DWORD *)(a1 + 520) )
{
memcpy(&v11[*(unsigned int *)(a1 + 520)], a2, v14);
}
else if ( v14 == 8LL )
{
*((_QWORD *)v11 + 3) = a2;
}
else
{
*((_QWORD *)v11 + 3) = v11 + 32;
memcpy(*((_QWORD *)v11 + 3), a2, v14 - 8LL);
}
*((_DWORD *)v11 + 4) = *((_DWORD *)v11 + 4) & 0x80000000 | 1;
++*(_DWORD *)(a1 + 524);
rb_insert(a1, v10, v11);
return (long long)v11;
}
return 1LL;
}
| |||
21,579 | tree_insert | eloqsql/mysys/tree.c | TREE_ELEMENT *tree_insert(TREE *tree, void *key, uint key_size,
void* custom_arg)
{
int cmp;
TREE_ELEMENT *element,***parent;
parent= tree->parents;
*parent = &tree->root; element= tree->root;
for (;;)
{
if (element == &null_element ||
(cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
break;
if (cmp < 0)
{
*++parent= &element->right; element= element->right;
}
else
{
*++parent = &element->left; element= element->left;
}
}
if (element == &null_element)
{
uint alloc_size;
if (tree->flag & TREE_ONLY_DUPS)
return TREE_ELEMENT_UNIQUE;
alloc_size=sizeof(TREE_ELEMENT)+key_size+tree->size_of_element;
tree->allocated+=alloc_size;
if (tree->memory_limit && tree->elements_in_tree
&& tree->allocated > tree->memory_limit)
{
reset_tree(tree);
return tree_insert(tree, key, key_size, custom_arg);
}
key_size+=tree->size_of_element;
if (tree->with_delete)
element=(TREE_ELEMENT *) my_malloc(key_memory_TREE, alloc_size,
MYF(tree->my_flags | MY_WME));
else
element=(TREE_ELEMENT *) alloc_root(&tree->mem_root,alloc_size);
if (!element)
return(NULL);
**parent=element;
element->left=element->right= &null_element;
if (!tree->offset_to_key)
{
if (key_size == sizeof(void*)) /* no length, save pointer */
*((void**) (element+1))=key;
else
{
*((void**) (element+1))= (void*) ((void **) (element+1)+1);
memcpy((uchar*) *((void **) (element+1)),key,
(size_t) (key_size-sizeof(void*)));
}
}
else
memcpy((uchar*) element+tree->offset_to_key,key,(size_t) key_size);
element->count=1; /* May give warning in purify */
tree->elements_in_tree++;
rb_insert(tree,parent,element); /* rebalance tree */
}
else
{
if (tree->flag & TREE_NO_DUPS)
return(NULL);
element->count++;
/* Avoid a wrap over of the count. */
if (! element->count)
element->count--;
}
DBUG_EXECUTE("check_tree", test_rb_tree(tree->root););
return element;
} | O3 | c | tree_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rdi), %r12
movq %rdx, -0x38(%rbp)
leal 0x18(%rdx), %eax
movq %rax, -0x40(%rbp)
leaq 0x2e2dd2(%rip), %rax # 0x38bf30
movq %r12, -0x30(%rbp)
movq %rbx, 0x8(%rbx)
movq (%rbx), %r14
cmpq %rax, %r14
je 0xa91b9
movq -0x30(%rbp), %r12
movl 0x208(%rbx), %esi
testq %rsi, %rsi
je 0xa9182
addq %r14, %rsi
jmp 0xa9186
movq 0x18(%r14), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq *0x228(%rbx)
testl %eax, %eax
je 0xa921d
shrl $0x1f, %eax
leaq (%r14,%rax,8), %rax
movq %rax, 0x8(%r12)
addq $0x8, %r12
movq (%rax), %r14
leaq 0x2e2d7c(%rip), %rax # 0x38bf30
cmpq %rax, %r14
jne 0xa9172
testb $0x2, 0x290(%rbx)
jne 0xa927b
movl 0x210(%rbx), %edx
movq -0x40(%rbp), %rax
leal (%rax,%rdx), %esi
movq 0x220(%rbx), %rax
addq %rsi, %rax
movq %rax, 0x220(%rbx)
movq 0x218(%rbx), %rcx
testq %rcx, %rcx
je 0xa9254
cmpl $0x0, 0x20c(%rbx)
je 0xa9254
cmpq %rcx, %rax
jbe 0xa9254
movl $0x2, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa904f
leaq 0x2e2d1c(%rip), %rax # 0x38bf30
movq -0x30(%rbp), %r12
jmp 0xa9162
testb $0x1, 0x290(%rbx)
jne 0xa92c3
movl 0x10(%r14), %eax
leal 0x1(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl %eax, %edx
andl $0x80000000, %edx # imm = 0x80000000
orl %ecx, %edx
movl %edx, 0x10(%r14)
testl %ecx, %ecx
jne 0xa92c6
orl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movl %eax, 0x10(%r14)
jmp 0xa92c6
movq %rdx, %r13
cmpb $0x0, 0x278(%rbx)
je 0xa9283
leaq 0xb654f5(%rip), %rax # 0xc0e75c
movl (%rax), %edi
movq 0x288(%rbx), %rdx
orq $0x10, %rdx
callq 0xa46f9
jmp 0xa928f
movl $0x1, %r14d
jmp 0xa92c6
leaq 0x238(%rbx), %rdi
callq 0x9ec17
movq %rax, %r14
testq %rax, %rax
je 0xa92c3
addl -0x38(%rbp), %r13d
movq (%r12), %rax
movq %r14, (%rax)
leaq 0x2e2c87(%rip), %rax # 0x38bf30
movq %rax, 0x8(%r14)
movq %rax, (%r14)
movl 0x208(%rbx), %edi
testq %rdi, %rdi
je 0xa92d8
addq %r14, %rdi
movl %r13d, %edx
jmp 0xa92f3
xorl %r14d, %r14d
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x8, %r13d
jne 0xa92e4
movq %r15, 0x18(%r14)
jmp 0xa92fb
movl %r13d, %edx
leaq 0x20(%r14), %rdi
movq %rdi, 0x18(%r14)
addq $-0x8, %rdx
movq %r15, %rsi
callq 0x2a0a0
movl $0x80000000, %eax # imm = 0x80000000
andl 0x10(%r14), %eax
incl %eax
movl %eax, 0x10(%r14)
incl 0x20c(%rbx)
andb $0x7f, 0x13(%r14)
cmpq %r14, (%rbx)
je 0xa9404
addq $-0x10, %r12
movq %r14, %rcx
movq 0x8(%r12), %rdi
movq (%rdi), %rsi
movl 0x10(%rsi), %edx
testl %edx, %edx
js 0xa9404
movq (%r12), %rax
movq (%rax), %rax
movq (%rax), %r8
cmpq %r8, %rsi
je 0xa9350
cmpl $0x0, 0x10(%r8)
jns 0xa935b
jmp 0xa9382
movq 0x8(%rax), %r8
cmpl $0x0, 0x10(%r8)
js 0xa938f
addq $0x10, %r8
orl $0x80000000, %edx # imm = 0x80000000
movl %edx, 0x10(%rsi)
orb $-0x80, 0x3(%r8)
andb $0x7f, 0x13(%rax)
addq $-0x10, %r12
movq %rax, %rcx
cmpq (%rbx), %rax
jne 0xa9325
jmp 0xa9404
movq (%rsi), %r8
cmpq %r8, %rcx
je 0xa939d
movq %rsi, %rcx
jmp 0xa93ae
movq 0x8(%rsi), %r8
cmpq %r8, %rcx
je 0xa93cf
movq %rsi, %rcx
jmp 0xa93df
movq 0x8(%r8), %rdx
movq %rdx, (%rsi)
movq %r8, (%rdi)
movq %rsi, 0x8(%r8)
movl 0x10(%rcx), %edx
orl $0x80000000, %edx # imm = 0x80000000
movl %edx, 0x10(%rcx)
andb $0x7f, 0x13(%rax)
movq (%r12), %rdx
movq 0x8(%rax), %rcx
movq (%rcx), %rsi
movq %rsi, 0x8(%rax)
movq %rcx, (%rdx)
jmp 0xa9401
movq (%r8), %rdx
movq %rdx, 0x8(%rsi)
movq %r8, (%rdi)
movq %rsi, (%r8)
movl 0x10(%rcx), %edx
orl $0x80000000, %edx # imm = 0x80000000
movl %edx, 0x10(%rcx)
andb $0x7f, 0x13(%rax)
movq (%r12), %rdx
movq (%rax), %rsi
leaq 0x8(%rsi), %rcx
movq 0x8(%rsi), %rdi
movq %rdi, (%rax)
movq %rsi, (%rdx)
movq %rax, (%rcx)
movq (%rbx), %rax
orl $0x80000000, 0x10(%rax) # imm = 0x80000000
jmp 0xa92c6
| tree_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rcx
mov r15, rsi
mov rbx, rdi
lea r12, [rdi+8]
mov [rbp+var_38], rdx
lea eax, [rdx+18h]
mov [rbp+var_40], rax
lea rax, null_element
mov [rbp+var_30], r12
loc_A9162:
mov [rbx+8], rbx
mov r14, [rbx]
cmp r14, rax
jz short loc_A91B9
mov r12, [rbp+var_30]
loc_A9172:
mov esi, [rbx+208h]
test rsi, rsi
jz short loc_A9182
add rsi, r14
jmp short loc_A9186
loc_A9182:
mov rsi, [r14+18h]
loc_A9186:
mov rdi, r13
mov rdx, r15
call qword ptr [rbx+228h]
test eax, eax
jz loc_A921D
shr eax, 1Fh
lea rax, [r14+rax*8]
mov [r12+8], rax
add r12, 8
mov r14, [rax]
lea rax, null_element
cmp r14, rax
jnz short loc_A9172
loc_A91B9:
test byte ptr [rbx+290h], 2
jnz loc_A927B
mov edx, [rbx+210h]
mov rax, [rbp+var_40]
lea esi, [rax+rdx]
mov rax, [rbx+220h]
add rax, rsi
mov [rbx+220h], rax
mov rcx, [rbx+218h]
test rcx, rcx
jz short loc_A9254
cmp dword ptr [rbx+20Ch], 0
jz short loc_A9254
cmp rax, rcx
jbe short loc_A9254
mov edx, 2
mov rdi, rbx
xor esi, esi
call free_tree
lea rax, null_element
mov r12, [rbp+var_30]
jmp loc_A9162
loc_A921D:
test byte ptr [rbx+290h], 1
jnz loc_A92C3
mov eax, [r14+10h]
lea ecx, [rax+1]
and ecx, 7FFFFFFFh
mov edx, eax
and edx, 80000000h
or edx, ecx
mov [r14+10h], edx
test ecx, ecx
jnz short loc_A92C6
or eax, 7FFFFFFFh
mov [r14+10h], eax
jmp short loc_A92C6
loc_A9254:
mov r13, rdx
cmp byte ptr [rbx+278h], 0
jz short loc_A9283
lea rax, key_memory_TREE
mov edi, [rax]
mov rdx, [rbx+288h]
or rdx, 10h
call my_malloc
jmp short loc_A928F
loc_A927B:
mov r14d, 1
jmp short loc_A92C6
loc_A9283:
lea rdi, [rbx+238h]
call alloc_root
loc_A928F:
mov r14, rax
test rax, rax
jz short loc_A92C3
add r13d, dword ptr [rbp+var_38]
mov rax, [r12]
mov [rax], r14
lea rax, null_element
mov [r14+8], rax
mov [r14], rax
mov edi, [rbx+208h]
test rdi, rdi
jz short loc_A92D8
add rdi, r14
mov edx, r13d
jmp short loc_A92F3
loc_A92C3:
xor r14d, r14d
loc_A92C6:
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A92D8:
cmp r13d, 8
jnz short loc_A92E4
mov [r14+18h], r15
jmp short loc_A92FB
loc_A92E4:
mov edx, r13d
lea rdi, [r14+20h]
mov [r14+18h], rdi
add rdx, 0FFFFFFFFFFFFFFF8h
loc_A92F3:
mov rsi, r15
call _memcpy
loc_A92FB:
mov eax, 80000000h
and eax, [r14+10h]
inc eax
mov [r14+10h], eax
inc dword ptr [rbx+20Ch]
and byte ptr [r14+13h], 7Fh
cmp [rbx], r14
jz loc_A9404
add r12, 0FFFFFFFFFFFFFFF0h
mov rcx, r14
loc_A9325:
mov rdi, [r12+8]
mov rsi, [rdi]
mov edx, [rsi+10h]
test edx, edx
js loc_A9404
mov rax, [r12]
mov rax, [rax]
mov r8, [rax]
cmp rsi, r8
jz short loc_A9350
cmp dword ptr [r8+10h], 0
jns short loc_A935B
jmp short loc_A9382
loc_A9350:
mov r8, [rax+8]
cmp dword ptr [r8+10h], 0
js short loc_A938F
loc_A935B:
add r8, 10h
or edx, 80000000h
mov [rsi+10h], edx
or byte ptr [r8+3], 80h
and byte ptr [rax+13h], 7Fh
add r12, 0FFFFFFFFFFFFFFF0h
mov rcx, rax
cmp rax, [rbx]
jnz short loc_A9325
jmp loc_A9404
loc_A9382:
mov r8, [rsi]
cmp rcx, r8
jz short loc_A939D
mov rcx, rsi
jmp short loc_A93AE
loc_A938F:
mov r8, [rsi+8]
cmp rcx, r8
jz short loc_A93CF
mov rcx, rsi
jmp short loc_A93DF
loc_A939D:
mov rdx, [r8+8]
mov [rsi], rdx
mov [rdi], r8
mov [r8+8], rsi
mov edx, [rcx+10h]
loc_A93AE:
or edx, 80000000h
mov [rcx+10h], edx
and byte ptr [rax+13h], 7Fh
mov rdx, [r12]
mov rcx, [rax+8]
mov rsi, [rcx]
mov [rax+8], rsi
mov [rdx], rcx
jmp short loc_A9401
loc_A93CF:
mov rdx, [r8]
mov [rsi+8], rdx
mov [rdi], r8
mov [r8], rsi
mov edx, [rcx+10h]
loc_A93DF:
or edx, 80000000h
mov [rcx+10h], edx
and byte ptr [rax+13h], 7Fh
mov rdx, [r12]
mov rsi, [rax]
lea rcx, [rsi+8]
mov rdi, [rsi+8]
mov [rax], rdi
mov [rdx], rsi
loc_A9401:
mov [rcx], rax
loc_A9404:
mov rax, [rbx]
or dword ptr [rax+10h], 80000000h
jmp loc_A92C6
| long long tree_insert(long long a1, long long a2, int a3, long long a4)
{
long long v7; // r12
_QWORD *v8; // r14
char *v9; // rsi
unsigned int v10; // eax
_QWORD *v11; // rax
int v12; // edx
long long v13; // rsi
unsigned long long v14; // rax
unsigned long long v15; // rcx
int v16; // eax
int v17; // ecx
int v18; // r13d
_QWORD *v19; // rax
unsigned int v20; // r13d
long long v21; // rdi
_QWORD *v22; // rdi
long long v23; // rdx
long long v25; // r12
_QWORD *v26; // rcx
long long *v27; // rdi
long long v28; // rsi
int v29; // edx
_QWORD *v30; // rax
long long v31; // r8
_QWORD *v32; // r8
_QWORD *v33; // r8
_QWORD *v34; // rdx
_QWORD *v35; // rcx
_QWORD *v36; // rdx
long long v37; // rsi
int v38; // [rsp+0h] [rbp-40h]
v7 = a1 + 8;
v38 = a3 + 24;
while ( 1 )
{
*(_QWORD *)(a1 + 8) = a1;
v8 = *(_QWORD **)a1;
if ( *(_UNKNOWN **)a1 != &null_element )
{
v7 = a1 + 8;
while ( 1 )
{
v9 = *(_DWORD *)(a1 + 520) ? (char *)v8 + *(unsigned int *)(a1 + 520) : (char *)v8[3];
v10 = (*(long long ( **)(long long, char *, long long))(a1 + 552))(a4, v9, a2);
if ( !v10 )
break;
v11 = &v8[v10 >> 31];
*(_QWORD *)(v7 + 8) = v11;
v7 += 8LL;
v8 = (_QWORD *)*v11;
if ( (_UNKNOWN *)*v11 == &null_element )
goto LABEL_9;
}
if ( (*(_BYTE *)(a1 + 656) & 1) == 0 )
{
v16 = *((_DWORD *)v8 + 4);
v17 = (v16 + 1) & 0x7FFFFFFF;
*((_DWORD *)v8 + 4) = v17 | v16 & 0x80000000;
if ( !v17 )
*((_DWORD *)v8 + 4) = v16 | 0x7FFFFFFF;
return (long long)v8;
}
return 0LL;
}
LABEL_9:
if ( (*(_BYTE *)(a1 + 656) & 2) != 0 )
return 1LL;
v12 = *(_DWORD *)(a1 + 528);
v13 = (unsigned int)(v38 + v12);
v14 = v13 + *(_QWORD *)(a1 + 544);
*(_QWORD *)(a1 + 544) = v14;
v15 = *(_QWORD *)(a1 + 536);
if ( !v15 || !*(_DWORD *)(a1 + 524) || v14 <= v15 )
break;
free_tree((long long *)a1, 0, 2);
v7 = a1 + 8;
}
v18 = v12;
if ( *(_BYTE *)(a1 + 632) )
v19 = (_QWORD *)my_malloc(key_memory_TREE, (const char *)v13, *(_DWORD *)(a1 + 648) | 0x10u);
else
v19 = alloc_root(a1 + 568, v13);
v8 = v19;
if ( !v19 )
return 0LL;
v20 = a3 + v18;
**(_QWORD **)v7 = v19;
v19[1] = &null_element;
*v19 = &null_element;
v21 = *(unsigned int *)(a1 + 520);
if ( *(_DWORD *)(a1 + 520) )
{
v22 = (_QWORD *)((char *)v19 + v21);
v23 = v20;
goto LABEL_29;
}
if ( v20 == 8 )
{
v19[3] = a2;
}
else
{
v22 = v19 + 4;
v19[3] = v19 + 4;
v23 = v20 - 8LL;
LABEL_29:
memcpy(v22, a2, v23);
}
*((_DWORD *)v8 + 4) = (v8[2] & 0x80000000) + 1;
++*(_DWORD *)(a1 + 524);
*((_BYTE *)v8 + 19) &= ~0x80u;
if ( *(_QWORD **)a1 != v8 )
{
v25 = v7 - 16;
v26 = v8;
do
{
v27 = *(long long **)(v25 + 8);
v28 = *v27;
v29 = *(_DWORD *)(*v27 + 16);
if ( v29 < 0 )
break;
v30 = **(_QWORD ***)v25;
v31 = *v30;
if ( v28 == *v30 )
{
v31 = v30[1];
if ( *(int *)(v31 + 16) < 0 )
{
v33 = *(_QWORD **)(v28 + 8);
if ( v26 == v33 )
{
*(_QWORD *)(v28 + 8) = *v33;
*v27 = (long long)v33;
*v33 = v28;
v29 = *((_DWORD *)v26 + 4);
}
else
{
v26 = (_QWORD *)*v27;
}
*((_DWORD *)v26 + 4) = v29 | 0x80000000;
*((_BYTE *)v30 + 19) &= ~0x80u;
v36 = *(_QWORD **)v25;
v37 = *v30;
v35 = (_QWORD *)(*v30 + 8LL);
*v30 = *v35;
*v36 = v37;
goto LABEL_47;
}
}
else if ( *(int *)(v31 + 16) < 0 )
{
v32 = *(_QWORD **)v28;
if ( v26 == *(_QWORD **)v28 )
{
*(_QWORD *)v28 = v32[1];
*v27 = (long long)v32;
v32[1] = v28;
v29 = *((_DWORD *)v26 + 4);
}
else
{
v26 = (_QWORD *)*v27;
}
*((_DWORD *)v26 + 4) = v29 | 0x80000000;
*((_BYTE *)v30 + 19) &= ~0x80u;
v34 = *(_QWORD **)v25;
v35 = (_QWORD *)v30[1];
v30[1] = *v35;
*v34 = v35;
LABEL_47:
*v35 = v30;
break;
}
*(_DWORD *)(v28 + 16) = v29 | 0x80000000;
*(_BYTE *)(v31 + 19) |= 0x80u;
*((_BYTE *)v30 + 19) &= ~0x80u;
v25 -= 16LL;
v26 = v30;
}
while ( v30 != *(_QWORD **)a1 );
}
*(_DWORD *)(*(_QWORD *)a1 + 16LL) |= 0x80000000;
return (long long)v8;
}
| tree_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RCX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x8]
MOV qword ptr [RBP + -0x38],RDX
LEA EAX,[RDX + 0x18]
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[0x48bf30]
MOV qword ptr [RBP + -0x30],R12
LAB_001a9162:
MOV qword ptr [RBX + 0x8],RBX
MOV R14,qword ptr [RBX]
CMP R14,RAX
JZ 0x001a91b9
MOV R12,qword ptr [RBP + -0x30]
LAB_001a9172:
MOV ESI,dword ptr [RBX + 0x208]
TEST RSI,RSI
JZ 0x001a9182
ADD RSI,R14
JMP 0x001a9186
LAB_001a9182:
MOV RSI,qword ptr [R14 + 0x18]
LAB_001a9186:
MOV RDI,R13
MOV RDX,R15
CALL qword ptr [RBX + 0x228]
TEST EAX,EAX
JZ 0x001a921d
SHR EAX,0x1f
LEA RAX,[R14 + RAX*0x8]
MOV qword ptr [R12 + 0x8],RAX
ADD R12,0x8
MOV R14,qword ptr [RAX]
LEA RAX,[0x48bf30]
CMP R14,RAX
JNZ 0x001a9172
LAB_001a91b9:
TEST byte ptr [RBX + 0x290],0x2
JNZ 0x001a927b
MOV EDX,dword ptr [RBX + 0x210]
MOV RAX,qword ptr [RBP + -0x40]
LEA ESI,[RAX + RDX*0x1]
MOV RAX,qword ptr [RBX + 0x220]
ADD RAX,RSI
MOV qword ptr [RBX + 0x220],RAX
MOV RCX,qword ptr [RBX + 0x218]
TEST RCX,RCX
JZ 0x001a9254
CMP dword ptr [RBX + 0x20c],0x0
JZ 0x001a9254
CMP RAX,RCX
JBE 0x001a9254
MOV EDX,0x2
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001a904f
LEA RAX,[0x48bf30]
MOV R12,qword ptr [RBP + -0x30]
JMP 0x001a9162
LAB_001a921d:
TEST byte ptr [RBX + 0x290],0x1
JNZ 0x001a92c3
MOV EAX,dword ptr [R14 + 0x10]
LEA ECX,[RAX + 0x1]
AND ECX,0x7fffffff
MOV EDX,EAX
AND EDX,0x80000000
OR EDX,ECX
MOV dword ptr [R14 + 0x10],EDX
TEST ECX,ECX
JNZ 0x001a92c6
OR EAX,0x7fffffff
MOV dword ptr [R14 + 0x10],EAX
JMP 0x001a92c6
LAB_001a9254:
MOV R13,RDX
CMP byte ptr [RBX + 0x278],0x0
JZ 0x001a9283
LEA RAX,[0xd0e75c]
MOV EDI,dword ptr [RAX]
MOV RDX,qword ptr [RBX + 0x288]
OR RDX,0x10
CALL 0x001a46f9
JMP 0x001a928f
LAB_001a927b:
MOV R14D,0x1
JMP 0x001a92c6
LAB_001a9283:
LEA RDI,[RBX + 0x238]
CALL 0x0019ec17
LAB_001a928f:
MOV R14,RAX
TEST RAX,RAX
JZ 0x001a92c3
ADD R13D,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [R12]
MOV qword ptr [RAX],R14
LEA RAX,[0x48bf30]
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [R14],RAX
MOV EDI,dword ptr [RBX + 0x208]
TEST RDI,RDI
JZ 0x001a92d8
ADD RDI,R14
MOV EDX,R13D
JMP 0x001a92f3
LAB_001a92c3:
XOR R14D,R14D
LAB_001a92c6:
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a92d8:
CMP R13D,0x8
JNZ 0x001a92e4
MOV qword ptr [R14 + 0x18],R15
JMP 0x001a92fb
LAB_001a92e4:
MOV EDX,R13D
LEA RDI,[R14 + 0x20]
MOV qword ptr [R14 + 0x18],RDI
ADD RDX,-0x8
LAB_001a92f3:
MOV RSI,R15
CALL 0x0012a0a0
LAB_001a92fb:
MOV EAX,0x80000000
AND EAX,dword ptr [R14 + 0x10]
INC EAX
MOV dword ptr [R14 + 0x10],EAX
INC dword ptr [RBX + 0x20c]
AND byte ptr [R14 + 0x13],0x7f
CMP qword ptr [RBX],R14
JZ 0x001a9404
ADD R12,-0x10
MOV RCX,R14
LAB_001a9325:
MOV RDI,qword ptr [R12 + 0x8]
MOV RSI,qword ptr [RDI]
MOV EDX,dword ptr [RSI + 0x10]
TEST EDX,EDX
JS 0x001a9404
MOV RAX,qword ptr [R12]
MOV RAX,qword ptr [RAX]
MOV R8,qword ptr [RAX]
CMP RSI,R8
JZ 0x001a9350
CMP dword ptr [R8 + 0x10],0x0
JNS 0x001a935b
JMP 0x001a9382
LAB_001a9350:
MOV R8,qword ptr [RAX + 0x8]
CMP dword ptr [R8 + 0x10],0x0
JS 0x001a938f
LAB_001a935b:
ADD R8,0x10
OR EDX,0x80000000
MOV dword ptr [RSI + 0x10],EDX
OR byte ptr [R8 + 0x3],0x80
AND byte ptr [RAX + 0x13],0x7f
ADD R12,-0x10
MOV RCX,RAX
CMP RAX,qword ptr [RBX]
JNZ 0x001a9325
JMP 0x001a9404
LAB_001a9382:
MOV R8,qword ptr [RSI]
CMP RCX,R8
JZ 0x001a939d
MOV RCX,RSI
JMP 0x001a93ae
LAB_001a938f:
MOV R8,qword ptr [RSI + 0x8]
CMP RCX,R8
JZ 0x001a93cf
MOV RCX,RSI
JMP 0x001a93df
LAB_001a939d:
MOV RDX,qword ptr [R8 + 0x8]
MOV qword ptr [RSI],RDX
MOV qword ptr [RDI],R8
MOV qword ptr [R8 + 0x8],RSI
MOV EDX,dword ptr [RCX + 0x10]
LAB_001a93ae:
OR EDX,0x80000000
MOV dword ptr [RCX + 0x10],EDX
AND byte ptr [RAX + 0x13],0x7f
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RCX]
MOV qword ptr [RAX + 0x8],RSI
MOV qword ptr [RDX],RCX
JMP 0x001a9401
LAB_001a93cf:
MOV RDX,qword ptr [R8]
MOV qword ptr [RSI + 0x8],RDX
MOV qword ptr [RDI],R8
MOV qword ptr [R8],RSI
MOV EDX,dword ptr [RCX + 0x10]
LAB_001a93df:
OR EDX,0x80000000
MOV dword ptr [RCX + 0x10],EDX
AND byte ptr [RAX + 0x13],0x7f
MOV RDX,qword ptr [R12]
MOV RSI,qword ptr [RAX]
LEA RCX,[RSI + 0x8]
MOV RDI,qword ptr [RSI + 0x8]
MOV qword ptr [RAX],RDI
MOV qword ptr [RDX],RSI
LAB_001a9401:
MOV qword ptr [RCX],RAX
LAB_001a9404:
MOV RAX,qword ptr [RBX]
OR dword ptr [RAX + 0x10],0x80000000
JMP 0x001a92c6
|
long * tree_insert(long *param_1,void *param_2,int param_3,int8 param_4)
{
int8 *puVar1;
long *plVar2;
long *plVar3;
uint uVar4;
ulong uVar5;
long *plVar6;
uint uVar7;
long *plVar8;
size_t __n;
int1 *puVar9;
ulong uVar10;
long *plVar11;
long lVar12;
long *plVar13;
while( true ) {
param_1[1] = (long)param_1;
plVar6 = (long *)*param_1;
plVar8 = param_1 + 1;
if (plVar6 != (long *)null_element) {
do {
if ((ulong)*(uint *)(param_1 + 0x41) == 0) {
puVar9 = (int1 *)plVar6[3];
}
else {
puVar9 = (int1 *)((ulong)*(uint *)(param_1 + 0x41) + (long)plVar6);
}
uVar4 = (*(code *)param_1[0x45])(param_4,puVar9,param_2);
if (uVar4 == 0) {
if ((*(byte *)(param_1 + 0x52) & 1) != 0) {
return (long *)0x0;
}
uVar4 = *(uint *)(plVar6 + 2);
uVar7 = uVar4 + 1 & 0x7fffffff;
*(uint *)(plVar6 + 2) = uVar4 & 0x80000000 | uVar7;
if (uVar7 == 0) {
*(uint *)(plVar6 + 2) = uVar4 | 0x7fffffff;
return plVar6;
}
return plVar6;
}
plVar8[1] = (long)(plVar6 + (uVar4 >> 0x1f));
plVar8 = plVar8 + 1;
plVar6 = (long *)plVar6[uVar4 >> 0x1f];
} while (plVar6 != (long *)null_element);
}
if ((*(byte *)(param_1 + 0x52) & 2) != 0) {
return (long *)0x1;
}
lVar12 = param_1[0x42];
uVar10 = (ulong)(uint)(param_3 + 0x18 + (int)lVar12);
uVar5 = param_1[0x44] + uVar10;
param_1[0x44] = uVar5;
if (((param_1[0x43] == 0) || (*(int *)((long)param_1 + 0x20c) == 0)) ||
(uVar5 <= (ulong)param_1[0x43])) break;
free_tree(param_1,0,2);
}
if ((char)param_1[0x4f] == '\0') {
plVar6 = (long *)alloc_root(param_1 + 0x47);
}
else {
plVar6 = (long *)my_malloc(key_memory_TREE,uVar10,param_1[0x51] | 0x10);
}
if (plVar6 == (long *)0x0) {
return (long *)0x0;
}
uVar4 = (int)lVar12 + param_3;
*(long **)*plVar8 = plVar6;
plVar6[1] = (long)null_element;
*plVar6 = (long)null_element;
if ((ulong)*(uint *)(param_1 + 0x41) == 0) {
if (uVar4 == 8) {
plVar6[3] = (long)param_2;
goto LAB_001a92fb;
}
plVar11 = plVar6 + 4;
plVar6[3] = (long)plVar11;
__n = (ulong)uVar4 - 8;
}
else {
plVar11 = (long *)((ulong)*(uint *)(param_1 + 0x41) + (long)plVar6);
__n = (size_t)uVar4;
}
memcpy(plVar11,param_2,__n);
LAB_001a92fb:
*(uint *)(plVar6 + 2) = (*(uint *)(plVar6 + 2) & 0x80000000) + 1;
*(int *)((long)param_1 + 0x20c) = *(int *)((long)param_1 + 0x20c) + 1;
*(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) & 0x7f;
plVar11 = plVar6;
if ((long *)*param_1 != plVar6) {
do {
plVar13 = plVar8 + -2;
puVar1 = (int8 *)plVar8[-1];
plVar8 = (long *)*puVar1;
uVar4 = *(uint *)(plVar8 + 2);
if ((int)uVar4 < 0) break;
plVar2 = *(long **)*plVar13;
lVar12 = *plVar2;
if (plVar8 == (long *)lVar12) {
lVar12 = plVar2[1];
if (*(int *)(lVar12 + 0x10) < 0) {
plVar3 = (long *)plVar8[1];
if (plVar11 == plVar3) {
plVar8[1] = *plVar3;
*puVar1 = plVar3;
*plVar3 = (long)plVar8;
uVar4 = *(uint *)(plVar11 + 2);
plVar8 = plVar11;
}
*(uint *)(plVar8 + 2) = uVar4 | 0x80000000;
*(byte *)((long)plVar2 + 0x13) = *(byte *)((long)plVar2 + 0x13) & 0x7f;
plVar13 = (long *)*plVar13;
lVar12 = *plVar2;
plVar8 = (long *)(lVar12 + 8);
*plVar2 = *(long *)(lVar12 + 8);
*plVar13 = lVar12;
goto LAB_001a9401;
}
}
else if (*(int *)(lVar12 + 0x10) < 0) {
plVar3 = (long *)*plVar8;
if (plVar11 == plVar3) {
*plVar8 = plVar3[1];
*puVar1 = plVar3;
plVar3[1] = (long)plVar8;
uVar4 = *(uint *)(plVar11 + 2);
plVar8 = plVar11;
}
*(uint *)(plVar8 + 2) = uVar4 | 0x80000000;
*(byte *)((long)plVar2 + 0x13) = *(byte *)((long)plVar2 + 0x13) & 0x7f;
plVar13 = (long *)*plVar13;
plVar8 = (long *)plVar2[1];
plVar2[1] = *plVar8;
*plVar13 = (long)plVar8;
LAB_001a9401:
*plVar8 = (long)plVar2;
break;
}
*(uint *)(plVar8 + 2) = uVar4 | 0x80000000;
*(byte *)(lVar12 + 0x13) = *(byte *)(lVar12 + 0x13) | 0x80;
*(byte *)((long)plVar2 + 0x13) = *(byte *)((long)plVar2 + 0x13) & 0x7f;
plVar11 = plVar2;
plVar8 = plVar13;
} while (plVar2 != (long *)*param_1);
}
*(uint *)(*param_1 + 0x10) = *(uint *)(*param_1 + 0x10) | 0x80000000;
return plVar6;
}
| |
21,580 | addEdge | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_island.c | static int addEdge(int* treenedge, int* edge, int nedge, int tree1, int tree2, int nedge_max) {
// handle the static tree
if (tree1 == -1 && tree2 == -1) {
mjERROR("self-edge of the static tree"); // SHOULD NOT OCCUR
return 0;
}
if (tree1 == -1) tree1 = tree2;
if (tree2 == -1) tree2 = tree1;
// previous edge
int p1 = nedge ? edge[2*nedge - 2] : -1;
int p2 = nedge ? edge[2*nedge - 1] : -1;
// === self edge
if (tree1 == tree2) {
// same as previous edge, return
if (nedge && tree1 == p1 && tree1 == p2) {
return nedge;
}
// check size
if (nedge >= nedge_max) {
mjERROR("edge array too small");
return 0;
}
// add tree1-tree1 self-edge
edge[2*nedge + 0] = tree1;
edge[2*nedge + 1] = tree1;
treenedge[tree1]++;
return nedge + 1;
}
// === non-self edge
if (nedge && ((tree1 == p1 && tree2 == p2) || (tree1 == p2 && tree2 == p1))) {
// same as previous edge, return
return nedge;
}
// check size
if (nedge + 2 > nedge_max) {
mjERROR("edge array too small");
return 0;
}
// add tree1-tree2 and tree2-tree1
edge[2*nedge + 0] = tree1;
edge[2*nedge + 1] = tree2;
edge[2*nedge + 2] = tree2;
edge[2*nedge + 3] = tree1;
treenedge[tree1]++;
treenedge[tree2]++;
return nedge + 2;
} | O0 | c | addEdge:
subq $0xc58, %rsp # imm = 0xC58
movq %rdi, 0xc48(%rsp)
movq %rsi, 0xc40(%rsp)
movl %edx, 0xc3c(%rsp)
movl %ecx, 0xc38(%rsp)
movl %r8d, 0xc34(%rsp)
movl %r9d, 0xc30(%rsp)
cmpl $-0x1, 0xc38(%rsp)
jne 0x93dc6
cmpl $-0x1, 0xc34(%rsp)
jne 0x93dc6
movq $0x7, 0x828(%rsp)
leaq 0x830(%rsp), %rdi
leaq 0x484c15(%rip), %rsi # 0x518989
movl $0x400, %edx # imm = 0x400
callq 0x49400
leaq 0x830(%rsp), %rdi
addq 0x828(%rsp), %rdi
movl $0x400, %esi # imm = 0x400
subq 0x828(%rsp), %rsi
leaq 0x484bef(%rip), %rdx # 0x518991
movb $0x0, %al
callq 0x49410
leaq 0x830(%rsp), %rdi
callq 0x49420
movl $0x0, 0xc54(%rsp)
jmp 0x94144
cmpl $-0x1, 0xc38(%rsp)
jne 0x93dde
movl 0xc34(%rsp), %eax
movl %eax, 0xc38(%rsp)
cmpl $-0x1, 0xc34(%rsp)
jne 0x93df6
movl 0xc38(%rsp), %eax
movl %eax, 0xc34(%rsp)
cmpl $0x0, 0xc3c(%rsp)
je 0x93e20
movq 0xc40(%rsp), %rax
movl 0xc3c(%rsp), %ecx
shll %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x4(%rsp)
jmp 0x93e2b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, 0x4(%rsp)
jmp 0x93e2b
movl 0x4(%rsp), %eax
movl %eax, 0x824(%rsp)
cmpl $0x0, 0xc3c(%rsp)
je 0x93e5f
movq 0xc40(%rsp), %rax
movl 0xc3c(%rsp), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, (%rsp)
jmp 0x93e69
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, (%rsp)
jmp 0x93e69
movl (%rsp), %eax
movl %eax, 0x820(%rsp)
movl 0xc38(%rsp), %eax
cmpl 0xc34(%rsp), %eax
jne 0x93fb2
cmpl $0x0, 0xc3c(%rsp)
je 0x93ec4
movl 0xc38(%rsp), %eax
cmpl 0x824(%rsp), %eax
jne 0x93ec4
movl 0xc38(%rsp), %eax
cmpl 0x820(%rsp), %eax
jne 0x93ec4
movl 0xc3c(%rsp), %eax
movl %eax, 0xc54(%rsp)
jmp 0x94144
movl 0xc3c(%rsp), %eax
cmpl 0xc30(%rsp), %eax
jl 0x93f41
movq $0x7, 0x418(%rsp)
leaq 0x420(%rsp), %rdi
leaq 0x484a9a(%rip), %rsi # 0x518989
movl $0x400, %edx # imm = 0x400
callq 0x49400
leaq 0x420(%rsp), %rdi
addq 0x418(%rsp), %rdi
movl $0x400, %esi # imm = 0x400
subq 0x418(%rsp), %rsi
leaq 0x484a93(%rip), %rdx # 0x5189b0
movb $0x0, %al
callq 0x49410
leaq 0x420(%rsp), %rdi
callq 0x49420
movl $0x0, 0xc54(%rsp)
jmp 0x94144
movl 0xc38(%rsp), %edx
movq 0xc40(%rsp), %rax
movl 0xc3c(%rsp), %ecx
shll %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl 0xc38(%rsp), %edx
movq 0xc40(%rsp), %rax
movl 0xc3c(%rsp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq 0xc48(%rsp), %rax
movslq 0xc38(%rsp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl 0xc3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc54(%rsp)
jmp 0x94144
cmpl $0x0, 0xc3c(%rsp)
je 0x9400f
movl 0xc38(%rsp), %eax
cmpl 0x824(%rsp), %eax
jne 0x93fdc
movl 0xc34(%rsp), %eax
cmpl 0x820(%rsp), %eax
je 0x93ffc
movl 0xc38(%rsp), %eax
cmpl 0x820(%rsp), %eax
jne 0x9400f
movl 0xc34(%rsp), %eax
cmpl 0x824(%rsp), %eax
jne 0x9400f
movl 0xc3c(%rsp), %eax
movl %eax, 0xc54(%rsp)
jmp 0x94144
movl 0xc3c(%rsp), %eax
addl $0x2, %eax
cmpl 0xc30(%rsp), %eax
jle 0x9407d
movq $0x7, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x484952(%rip), %rsi # 0x518989
movl $0x400, %edx # imm = 0x400
callq 0x49400
leaq 0x10(%rsp), %rdi
addq 0x8(%rsp), %rdi
movl $0x400, %esi # imm = 0x400
subq 0x8(%rsp), %rsi
leaq 0x484954(%rip), %rdx # 0x5189b0
movb $0x0, %al
callq 0x49410
leaq 0x10(%rsp), %rdi
callq 0x49420
movl $0x0, 0xc54(%rsp)
jmp 0x94144
movl 0xc38(%rsp), %edx
movq 0xc40(%rsp), %rax
movl 0xc3c(%rsp), %ecx
shll %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl 0xc34(%rsp), %edx
movq 0xc40(%rsp), %rax
movl 0xc3c(%rsp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl 0xc34(%rsp), %edx
movq 0xc40(%rsp), %rax
movl 0xc3c(%rsp), %ecx
shll %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl 0xc38(%rsp), %edx
movq 0xc40(%rsp), %rax
movl 0xc3c(%rsp), %ecx
shll %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq 0xc48(%rsp), %rax
movslq 0xc38(%rsp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq 0xc48(%rsp), %rax
movslq 0xc34(%rsp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl 0xc3c(%rsp), %eax
addl $0x2, %eax
movl %eax, 0xc54(%rsp)
movl 0xc54(%rsp), %eax
addq $0xc58, %rsp # imm = 0xC58
retq
nopw %cs:(%rax,%rax)
| addEdge:
sub rsp, 0C58h
mov [rsp+0C58h+var_10], rdi
mov [rsp+0C58h+var_18], rsi
mov [rsp+0C58h+var_1C], edx
mov [rsp+0C58h+var_20], ecx
mov [rsp+0C58h+var_24], r8d
mov [rsp+0C58h+var_28], r9d
cmp [rsp+0C58h+var_20], 0FFFFFFFFh
jnz short loc_93DC6
cmp [rsp+0C58h+var_24], 0FFFFFFFFh
jnz short loc_93DC6
mov [rsp+0C58h+var_430], 7
lea rdi, [rsp+0C58h+var_428]
lea rsi, aAddedge; "addEdge"
mov edx, 400h
call _strncpy
lea rdi, [rsp+0C58h+var_428]
add rdi, [rsp+0C58h+var_430]
mov esi, 400h
sub rsi, [rsp+0C58h+var_430]
lea rdx, aSelfEdgeOfTheS; ": self-edge of the static tree"
mov al, 0
call _snprintf
lea rdi, [rsp+0C58h+var_428]
call _mju_error_raw
mov [rsp+0C58h+var_4], 0
jmp loc_94144
loc_93DC6:
cmp [rsp+0C58h+var_20], 0FFFFFFFFh
jnz short loc_93DDE
mov eax, [rsp+0C58h+var_24]
mov [rsp+0C58h+var_20], eax
loc_93DDE:
cmp [rsp+0C58h+var_24], 0FFFFFFFFh
jnz short loc_93DF6
mov eax, [rsp+0C58h+var_20]
mov [rsp+0C58h+var_24], eax
loc_93DF6:
cmp [rsp+0C58h+var_1C], 0
jz short loc_93E20
mov rax, [rsp+0C58h+var_18]
mov ecx, [rsp+0C58h+var_1C]
shl ecx, 1
sub ecx, 2
movsxd rcx, ecx
mov eax, [rax+rcx*4]
mov [rsp+0C58h+var_C54], eax
jmp short loc_93E2B
loc_93E20:
mov eax, 0FFFFFFFFh
mov [rsp+0C58h+var_C54], eax
jmp short $+2
loc_93E2B:
mov eax, [rsp+0C58h+var_C54]
mov [rsp+0C58h+var_434], eax
cmp [rsp+0C58h+var_1C], 0
jz short loc_93E5F
mov rax, [rsp+0C58h+var_18]
mov ecx, [rsp+0C58h+var_1C]
shl ecx, 1
sub ecx, 1
movsxd rcx, ecx
mov eax, [rax+rcx*4]
mov [rsp+0C58h+var_C58], eax
jmp short loc_93E69
loc_93E5F:
mov eax, 0FFFFFFFFh
mov [rsp+0C58h+var_C58], eax
jmp short $+2
loc_93E69:
mov eax, [rsp+0C58h+var_C58]
mov [rsp+0C58h+var_438], eax
mov eax, [rsp+0C58h+var_20]
cmp eax, [rsp+0C58h+var_24]
jnz loc_93FB2
cmp [rsp+0C58h+var_1C], 0
jz short loc_93EC4
mov eax, [rsp+0C58h+var_20]
cmp eax, [rsp+0C58h+var_434]
jnz short loc_93EC4
mov eax, [rsp+0C58h+var_20]
cmp eax, [rsp+0C58h+var_438]
jnz short loc_93EC4
mov eax, [rsp+0C58h+var_1C]
mov [rsp+0C58h+var_4], eax
jmp loc_94144
loc_93EC4:
mov eax, [rsp+0C58h+var_1C]
cmp eax, [rsp+0C58h+var_28]
jl short loc_93F41
mov [rsp+0C58h+var_840], 7
lea rdi, [rsp+0C58h+var_838]
lea rsi, aAddedge; "addEdge"
mov edx, 400h
call _strncpy
lea rdi, [rsp+0C58h+var_838]
add rdi, [rsp+0C58h+var_840]
mov esi, 400h
sub rsi, [rsp+0C58h+var_840]
lea rdx, aEdgeArrayTooSm; ": edge array too small"
mov al, 0
call _snprintf
lea rdi, [rsp+0C58h+var_838]
call _mju_error_raw
mov [rsp+0C58h+var_4], 0
jmp loc_94144
loc_93F41:
mov edx, [rsp+0C58h+var_20]
mov rax, [rsp+0C58h+var_18]
mov ecx, [rsp+0C58h+var_1C]
shl ecx, 1
add ecx, 0
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov edx, [rsp+0C58h+var_20]
mov rax, [rsp+0C58h+var_18]
mov ecx, [rsp+0C58h+var_1C]
shl ecx, 1
add ecx, 1
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov rax, [rsp+0C58h+var_10]
movsxd rcx, [rsp+0C58h+var_20]
mov edx, [rax+rcx*4]
add edx, 1
mov [rax+rcx*4], edx
mov eax, [rsp+0C58h+var_1C]
add eax, 1
mov [rsp+0C58h+var_4], eax
jmp loc_94144
loc_93FB2:
cmp [rsp+0C58h+var_1C], 0
jz short loc_9400F
mov eax, [rsp+0C58h+var_20]
cmp eax, [rsp+0C58h+var_434]
jnz short loc_93FDC
mov eax, [rsp+0C58h+var_24]
cmp eax, [rsp+0C58h+var_438]
jz short loc_93FFC
loc_93FDC:
mov eax, [rsp+0C58h+var_20]
cmp eax, [rsp+0C58h+var_438]
jnz short loc_9400F
mov eax, [rsp+0C58h+var_24]
cmp eax, [rsp+0C58h+var_434]
jnz short loc_9400F
loc_93FFC:
mov eax, [rsp+0C58h+var_1C]
mov [rsp+0C58h+var_4], eax
jmp loc_94144
loc_9400F:
mov eax, [rsp+0C58h+var_1C]
add eax, 2
cmp eax, [rsp+0C58h+var_28]
jle short loc_9407D
mov [rsp+0C58h+var_C50], 7
lea rdi, [rsp+0C58h+var_C48]
lea rsi, aAddedge; "addEdge"
mov edx, 400h
call _strncpy
lea rdi, [rsp+0C58h+var_C48]
add rdi, [rsp+0C58h+var_C50]
mov esi, 400h
sub rsi, [rsp+0C58h+var_C50]
lea rdx, aEdgeArrayTooSm; ": edge array too small"
mov al, 0
call _snprintf
lea rdi, [rsp+0C58h+var_C48]
call _mju_error_raw
mov [rsp+0C58h+var_4], 0
jmp loc_94144
loc_9407D:
mov edx, [rsp+0C58h+var_20]
mov rax, [rsp+0C58h+var_18]
mov ecx, [rsp+0C58h+var_1C]
shl ecx, 1
add ecx, 0
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov edx, [rsp+0C58h+var_24]
mov rax, [rsp+0C58h+var_18]
mov ecx, [rsp+0C58h+var_1C]
shl ecx, 1
add ecx, 1
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov edx, [rsp+0C58h+var_24]
mov rax, [rsp+0C58h+var_18]
mov ecx, [rsp+0C58h+var_1C]
shl ecx, 1
add ecx, 2
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov edx, [rsp+0C58h+var_20]
mov rax, [rsp+0C58h+var_18]
mov ecx, [rsp+0C58h+var_1C]
shl ecx, 1
add ecx, 3
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov rax, [rsp+0C58h+var_10]
movsxd rcx, [rsp+0C58h+var_20]
mov edx, [rax+rcx*4]
add edx, 1
mov [rax+rcx*4], edx
mov rax, [rsp+0C58h+var_10]
movsxd rcx, [rsp+0C58h+var_24]
mov edx, [rax+rcx*4]
add edx, 1
mov [rax+rcx*4], edx
mov eax, [rsp+0C58h+var_1C]
add eax, 2
mov [rsp+0C58h+var_4], eax
loc_94144:
mov eax, [rsp+0C58h+var_4]
add rsp, 0C58h
retn
| long long addEdge(long long a1, long long a2, unsigned int a3, int a4, int a5, int a6)
{
int v7; // [rsp+0h] [rbp-C58h]
int v8; // [rsp+4h] [rbp-C54h]
_BYTE v9[7]; // [rsp+10h] [rbp-C48h] BYREF
char v10; // [rsp+17h] [rbp-C41h] BYREF
_BYTE v11[7]; // [rsp+420h] [rbp-838h] BYREF
char v12; // [rsp+427h] [rbp-831h] BYREF
int v13; // [rsp+820h] [rbp-438h]
int v14; // [rsp+824h] [rbp-434h]
_BYTE v15[7]; // [rsp+830h] [rbp-428h] BYREF
char v16; // [rsp+837h] [rbp-421h] BYREF
int v17; // [rsp+C30h] [rbp-28h]
int v18; // [rsp+C34h] [rbp-24h]
int v19; // [rsp+C38h] [rbp-20h]
unsigned int v20; // [rsp+C3Ch] [rbp-1Ch]
long long v21; // [rsp+C40h] [rbp-18h]
long long v22; // [rsp+C48h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
if ( a4 == -1 && v18 == -1 )
{
strncpy(v15, "addEdge", 1024LL);
snprintf(&v16, 1017LL, ": self-edge of the static tree");
mju_error_raw(v15);
return 0;
}
else
{
if ( v19 == -1 )
v19 = v18;
if ( v18 == -1 )
v18 = v19;
if ( v20 )
v8 = *(_DWORD *)(v21 + 4LL * (int)(2 * v20 - 2));
else
v8 = -1;
v14 = v8;
if ( v20 )
v7 = *(_DWORD *)(v21 + 4LL * (int)(2 * v20 - 1));
else
v7 = -1;
v13 = v7;
if ( v19 == v18 )
{
if ( v20 && v19 == v14 && v19 == v13 )
{
return v20;
}
else if ( (int)v20 < v17 )
{
*(_DWORD *)(v21 + 4LL * (int)(2 * v20)) = v19;
*(_DWORD *)(v21 + 4LL * (int)(2 * v20 + 1)) = v19;
++*(_DWORD *)(v22 + 4LL * v19);
return v20 + 1;
}
else
{
strncpy(v11, "addEdge", 1024LL);
snprintf(&v12, 1017LL, ": edge array too small");
mju_error_raw(v11);
return 0;
}
}
else if ( v20 && (v19 == v14 && v18 == v13 || v19 == v13 && v18 == v14) )
{
return v20;
}
else if ( (int)(v20 + 2) <= v17 )
{
*(_DWORD *)(v21 + 4LL * (int)(2 * v20)) = v19;
*(_DWORD *)(v21 + 4LL * (int)(2 * v20 + 1)) = v18;
*(_DWORD *)(v21 + 4LL * (int)(2 * v20 + 2)) = v18;
*(_DWORD *)(v21 + 4LL * (int)(2 * v20 + 3)) = v19;
++*(_DWORD *)(v22 + 4LL * v19);
++*(_DWORD *)(v22 + 4LL * v18);
return v20 + 2;
}
else
{
strncpy(v9, "addEdge", 1024LL);
snprintf(&v10, 1017LL, ": edge array too small");
mju_error_raw(v9);
return 0;
}
}
}
| addEdge:
SUB RSP,0xc58
MOV qword ptr [RSP + 0xc48],RDI
MOV qword ptr [RSP + 0xc40],RSI
MOV dword ptr [RSP + 0xc3c],EDX
MOV dword ptr [RSP + 0xc38],ECX
MOV dword ptr [RSP + 0xc34],R8D
MOV dword ptr [RSP + 0xc30],R9D
CMP dword ptr [RSP + 0xc38],-0x1
JNZ 0x00193dc6
CMP dword ptr [RSP + 0xc34],-0x1
JNZ 0x00193dc6
MOV qword ptr [RSP + 0x828],0x7
LEA RDI,[RSP + 0x830]
LEA RSI,[0x618989]
MOV EDX,0x400
CALL 0x00149400
LEA RDI,[RSP + 0x830]
ADD RDI,qword ptr [RSP + 0x828]
MOV ESI,0x400
SUB RSI,qword ptr [RSP + 0x828]
LEA RDX,[0x618991]
MOV AL,0x0
CALL 0x00149410
LEA RDI,[RSP + 0x830]
CALL 0x00149420
MOV dword ptr [RSP + 0xc54],0x0
JMP 0x00194144
LAB_00193dc6:
CMP dword ptr [RSP + 0xc38],-0x1
JNZ 0x00193dde
MOV EAX,dword ptr [RSP + 0xc34]
MOV dword ptr [RSP + 0xc38],EAX
LAB_00193dde:
CMP dword ptr [RSP + 0xc34],-0x1
JNZ 0x00193df6
MOV EAX,dword ptr [RSP + 0xc38]
MOV dword ptr [RSP + 0xc34],EAX
LAB_00193df6:
CMP dword ptr [RSP + 0xc3c],0x0
JZ 0x00193e20
MOV RAX,qword ptr [RSP + 0xc40]
MOV ECX,dword ptr [RSP + 0xc3c]
SHL ECX,0x1
SUB ECX,0x2
MOVSXD RCX,ECX
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00193e2b
LAB_00193e20:
MOV EAX,0xffffffff
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00193e2b
LAB_00193e2b:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP + 0x824],EAX
CMP dword ptr [RSP + 0xc3c],0x0
JZ 0x00193e5f
MOV RAX,qword ptr [RSP + 0xc40]
MOV ECX,dword ptr [RSP + 0xc3c]
SHL ECX,0x1
SUB ECX,0x1
MOVSXD RCX,ECX
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP],EAX
JMP 0x00193e69
LAB_00193e5f:
MOV EAX,0xffffffff
MOV dword ptr [RSP],EAX
JMP 0x00193e69
LAB_00193e69:
MOV EAX,dword ptr [RSP]
MOV dword ptr [RSP + 0x820],EAX
MOV EAX,dword ptr [RSP + 0xc38]
CMP EAX,dword ptr [RSP + 0xc34]
JNZ 0x00193fb2
CMP dword ptr [RSP + 0xc3c],0x0
JZ 0x00193ec4
MOV EAX,dword ptr [RSP + 0xc38]
CMP EAX,dword ptr [RSP + 0x824]
JNZ 0x00193ec4
MOV EAX,dword ptr [RSP + 0xc38]
CMP EAX,dword ptr [RSP + 0x820]
JNZ 0x00193ec4
MOV EAX,dword ptr [RSP + 0xc3c]
MOV dword ptr [RSP + 0xc54],EAX
JMP 0x00194144
LAB_00193ec4:
MOV EAX,dword ptr [RSP + 0xc3c]
CMP EAX,dword ptr [RSP + 0xc30]
JL 0x00193f41
MOV qword ptr [RSP + 0x418],0x7
LEA RDI,[RSP + 0x420]
LEA RSI,[0x618989]
MOV EDX,0x400
CALL 0x00149400
LEA RDI,[RSP + 0x420]
ADD RDI,qword ptr [RSP + 0x418]
MOV ESI,0x400
SUB RSI,qword ptr [RSP + 0x418]
LEA RDX,[0x6189b0]
MOV AL,0x0
CALL 0x00149410
LEA RDI,[RSP + 0x420]
CALL 0x00149420
MOV dword ptr [RSP + 0xc54],0x0
JMP 0x00194144
LAB_00193f41:
MOV EDX,dword ptr [RSP + 0xc38]
MOV RAX,qword ptr [RSP + 0xc40]
MOV ECX,dword ptr [RSP + 0xc3c]
SHL ECX,0x1
ADD ECX,0x0
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EDX,dword ptr [RSP + 0xc38]
MOV RAX,qword ptr [RSP + 0xc40]
MOV ECX,dword ptr [RSP + 0xc3c]
SHL ECX,0x1
ADD ECX,0x1
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RAX,qword ptr [RSP + 0xc48]
MOVSXD RCX,dword ptr [RSP + 0xc38]
MOV EDX,dword ptr [RAX + RCX*0x4]
ADD EDX,0x1
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RSP + 0xc3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc54],EAX
JMP 0x00194144
LAB_00193fb2:
CMP dword ptr [RSP + 0xc3c],0x0
JZ 0x0019400f
MOV EAX,dword ptr [RSP + 0xc38]
CMP EAX,dword ptr [RSP + 0x824]
JNZ 0x00193fdc
MOV EAX,dword ptr [RSP + 0xc34]
CMP EAX,dword ptr [RSP + 0x820]
JZ 0x00193ffc
LAB_00193fdc:
MOV EAX,dword ptr [RSP + 0xc38]
CMP EAX,dword ptr [RSP + 0x820]
JNZ 0x0019400f
MOV EAX,dword ptr [RSP + 0xc34]
CMP EAX,dword ptr [RSP + 0x824]
JNZ 0x0019400f
LAB_00193ffc:
MOV EAX,dword ptr [RSP + 0xc3c]
MOV dword ptr [RSP + 0xc54],EAX
JMP 0x00194144
LAB_0019400f:
MOV EAX,dword ptr [RSP + 0xc3c]
ADD EAX,0x2
CMP EAX,dword ptr [RSP + 0xc30]
JLE 0x0019407d
MOV qword ptr [RSP + 0x8],0x7
LEA RDI,[RSP + 0x10]
LEA RSI,[0x618989]
MOV EDX,0x400
CALL 0x00149400
LEA RDI,[RSP + 0x10]
ADD RDI,qword ptr [RSP + 0x8]
MOV ESI,0x400
SUB RSI,qword ptr [RSP + 0x8]
LEA RDX,[0x6189b0]
MOV AL,0x0
CALL 0x00149410
LEA RDI,[RSP + 0x10]
CALL 0x00149420
MOV dword ptr [RSP + 0xc54],0x0
JMP 0x00194144
LAB_0019407d:
MOV EDX,dword ptr [RSP + 0xc38]
MOV RAX,qword ptr [RSP + 0xc40]
MOV ECX,dword ptr [RSP + 0xc3c]
SHL ECX,0x1
ADD ECX,0x0
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EDX,dword ptr [RSP + 0xc34]
MOV RAX,qword ptr [RSP + 0xc40]
MOV ECX,dword ptr [RSP + 0xc3c]
SHL ECX,0x1
ADD ECX,0x1
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EDX,dword ptr [RSP + 0xc34]
MOV RAX,qword ptr [RSP + 0xc40]
MOV ECX,dword ptr [RSP + 0xc3c]
SHL ECX,0x1
ADD ECX,0x2
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EDX,dword ptr [RSP + 0xc38]
MOV RAX,qword ptr [RSP + 0xc40]
MOV ECX,dword ptr [RSP + 0xc3c]
SHL ECX,0x1
ADD ECX,0x3
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RAX,qword ptr [RSP + 0xc48]
MOVSXD RCX,dword ptr [RSP + 0xc38]
MOV EDX,dword ptr [RAX + RCX*0x4]
ADD EDX,0x1
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RAX,qword ptr [RSP + 0xc48]
MOVSXD RCX,dword ptr [RSP + 0xc34]
MOV EDX,dword ptr [RAX + RCX*0x4]
ADD EDX,0x1
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RSP + 0xc3c]
ADD EAX,0x2
MOV dword ptr [RSP + 0xc54],EAX
LAB_00194144:
MOV EAX,dword ptr [RSP + 0xc54]
ADD RSP,0xc58
RET
|
int addEdge(long param_1,long param_2,int param_3,int param_4,int param_5,int param_6)
{
int local_c58;
int local_c54;
char local_c48 [7];
char acStack_c41 [1025];
long local_840;
char local_838 [1024];
int local_438;
int local_434;
long local_430;
char local_428 [1024];
int local_28;
int local_24;
int local_20;
int local_1c;
long local_18;
long local_10;
int local_4;
local_28 = param_6;
local_24 = param_5;
local_20 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
if ((param_4 == -1) && (param_5 == -1)) {
local_430 = 7;
strncpy(local_428,"addEdge",0x400);
snprintf(local_428 + local_430,0x400 - local_430,": self-edge of the static tree");
mju_error_raw(local_428);
local_4 = 0;
}
else {
if (param_4 == -1) {
local_20 = param_5;
}
if (param_5 == -1) {
local_24 = local_20;
}
if (param_3 == 0) {
local_c54 = -1;
}
else {
local_c54 = *(int *)(param_2 + (long)(param_3 * 2 + -2) * 4);
}
local_434 = local_c54;
if (param_3 == 0) {
local_c58 = -1;
}
else {
local_c58 = *(int *)(param_2 + (long)(param_3 * 2 + -1) * 4);
}
local_438 = local_c58;
local_4 = param_3;
if (local_20 == local_24) {
if (((param_3 == 0) || (local_20 != local_c54)) || (local_20 != local_c58)) {
if (param_3 < param_6) {
*(int *)(param_2 + (long)(param_3 << 1) * 4) = local_20;
*(int *)(param_2 + (long)(param_3 * 2 + 1) * 4) = local_20;
*(int *)(param_1 + (long)local_20 * 4) = *(int *)(param_1 + (long)local_20 * 4) + 1;
local_4 = param_3 + 1;
}
else {
local_840 = 7;
strncpy(local_838,"addEdge",0x400);
snprintf(local_838 + local_840,0x400 - local_840,": edge array too small");
mju_error_raw(local_838);
local_4 = 0;
}
}
}
else if ((param_3 == 0) ||
(((local_20 != local_c54 || (local_24 != local_c58)) &&
((local_20 != local_c58 || (local_24 != local_c54)))))) {
if (param_6 < param_3 + 2) {
strncpy(local_c48,"addEdge",0x400);
snprintf(acStack_c41,0x3f9,": edge array too small");
mju_error_raw(local_c48);
local_4 = 0;
}
else {
*(int *)(param_2 + (long)(param_3 << 1) * 4) = local_20;
*(int *)(param_2 + (long)(param_3 * 2 + 1) * 4) = local_24;
*(int *)(param_2 + (long)(param_3 * 2 + 2) * 4) = local_24;
*(int *)(param_2 + (long)(param_3 * 2 + 3) * 4) = local_20;
*(int *)(param_1 + (long)local_20 * 4) = *(int *)(param_1 + (long)local_20 * 4) + 1;
*(int *)(param_1 + (long)local_24 * 4) = *(int *)(param_1 + (long)local_24 * 4) + 1;
local_4 = param_3 + 2;
}
}
}
return local_4;
}
| |
21,581 | addEdge | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_island.c | static int addEdge(int* treenedge, int* edge, int nedge, int tree1, int tree2, int nedge_max) {
// handle the static tree
if (tree1 == -1 && tree2 == -1) {
mjERROR("self-edge of the static tree"); // SHOULD NOT OCCUR
return 0;
}
if (tree1 == -1) tree1 = tree2;
if (tree2 == -1) tree2 = tree1;
// previous edge
int p1 = nedge ? edge[2*nedge - 2] : -1;
int p2 = nedge ? edge[2*nedge - 1] : -1;
// === self edge
if (tree1 == tree2) {
// same as previous edge, return
if (nedge && tree1 == p1 && tree1 == p2) {
return nedge;
}
// check size
if (nedge >= nedge_max) {
mjERROR("edge array too small");
return 0;
}
// add tree1-tree1 self-edge
edge[2*nedge + 0] = tree1;
edge[2*nedge + 1] = tree1;
treenedge[tree1]++;
return nedge + 1;
}
// === non-self edge
if (nedge && ((tree1 == p1 && tree2 == p2) || (tree1 == p2 && tree2 == p1))) {
// same as previous edge, return
return nedge;
}
// check size
if (nedge + 2 > nedge_max) {
mjERROR("edge array too small");
return 0;
}
// add tree1-tree2 and tree2-tree1
edge[2*nedge + 0] = tree1;
edge[2*nedge + 1] = tree2;
edge[2*nedge + 2] = tree2;
edge[2*nedge + 3] = tree1;
treenedge[tree1]++;
treenedge[tree2]++;
return nedge + 2;
} | O3 | c | addEdge:
pushq %rbx
subq $0x400, %rsp # imm = 0x400
movl %r8d, %eax
andl %ecx, %eax
cmpl $-0x1, %eax
je 0x5779a
cmpl $-0x1, %ecx
movl %ecx, %r10d
cmovel %r8d, %r10d
cmpl $-0x1, %r8d
cmovel %ecx, %r8d
testl %edx, %edx
je 0x577d0
leal (%rdx,%rdx), %eax
movslq %eax, %rcx
movl -0x8(%rsi,%rcx,4), %eax
movl -0x4(%rsi,%rcx,4), %ecx
cmpl %r8d, %r10d
jne 0x577fa
xorl %r10d, %eax
xorl %r10d, %ecx
orl %eax, %ecx
jne 0x577d5
jmp 0x57814
leaq 0x166dd8(%rip), %rsi # 0x1be579
movq %rsp, %rbx
movl $0x400, %edx # imm = 0x400
movq %rbx, %rdi
callq 0x2d240
vmovups 0x166dc8(%rip), %xmm0 # 0x1be581
vmovups %xmm0, 0x7(%rbx)
vmovups 0x166dca(%rip), %xmm0 # 0x1be590
vmovups %xmm0, 0x16(%rbx)
jmp 0x57852
cmpl %r8d, %r10d
jne 0x57818
cmpl %r9d, %edx
jge 0x57820
leal (%rdx,%rdx), %eax
cltq
movl %r10d, (%rsi,%rax,4)
leal 0x1(,%rdx,2), %eax
cltq
movl %r10d, (%rsi,%rax,4)
movslq %r10d, %rax
incl (%rdi,%rax,4)
incl %edx
jmp 0x57814
movl %r10d, %r11d
xorl %eax, %r11d
movl %r8d, %ebx
xorl %ecx, %ebx
orl %r11d, %ebx
je 0x57814
xorl %r10d, %ecx
xorl %r8d, %eax
orl %ecx, %eax
jne 0x57818
movl %edx, %eax
jmp 0x5785c
leal 0x2(%rdx), %eax
cmpl %r9d, %eax
jle 0x57865
leaq 0x166d52(%rip), %rsi # 0x1be579
movq %rsp, %rbx
movl $0x400, %edx # imm = 0x400
movq %rbx, %rdi
callq 0x2d240
movabsq $0x6c6c616d73206f, %rax # imm = 0x6C6C616D73206F
movq %rax, 0x16(%rbx)
vmovups 0x166d53(%rip), %xmm0 # 0x1be5a0
vmovups %xmm0, 0x7(%rbx)
movq %rbx, %rdi
callq 0x2d260
xorl %eax, %eax
addq $0x400, %rsp # imm = 0x400
popq %rbx
retq
leal (%rdx,%rdx), %ecx
movslq %ecx, %rcx
movl %r10d, (%rsi,%rcx,4)
leal 0x1(,%rdx,2), %edx
movslq %edx, %rdx
movl %r8d, (%rsi,%rdx,4)
movl %r8d, 0x8(%rsi,%rcx,4)
movl %r10d, 0xc(%rsi,%rcx,4)
movslq %r10d, %rcx
incl (%rdi,%rcx,4)
movslq %r8d, %rcx
incl (%rdi,%rcx,4)
jmp 0x5785c
| addEdge:
push rbx
sub rsp, 400h
mov eax, r8d
and eax, ecx
cmp eax, 0FFFFFFFFh
jz short loc_5779A
cmp ecx, 0FFFFFFFFh
mov r10d, ecx
cmovz r10d, r8d
cmp r8d, 0FFFFFFFFh
cmovz r8d, ecx
test edx, edx
jz short loc_577D0
lea eax, [rdx+rdx]
movsxd rcx, eax
mov eax, [rsi+rcx*4-8]
mov ecx, [rsi+rcx*4-4]
cmp r10d, r8d
jnz short loc_577FA
xor eax, r10d
xor ecx, r10d
or ecx, eax
jnz short loc_577D5
jmp short loc_57814
loc_5779A:
lea rsi, aAddedge; "addEdge"
mov rbx, rsp
mov edx, 400h
mov rdi, rbx
call _strncpy
vmovups xmm0, cs:xmmword_1BE581
vmovups xmmword ptr [rbx+7], xmm0
vmovups xmm0, cs:xmmword_1BE581+0Fh
vmovups xmmword ptr [rbx+16h], xmm0
jmp loc_57852
loc_577D0:
cmp r10d, r8d
jnz short loc_57818
loc_577D5:
cmp edx, r9d
jge short loc_57820
lea eax, [rdx+rdx]
cdqe
mov [rsi+rax*4], r10d
lea eax, ds:1[rdx*2]
cdqe
mov [rsi+rax*4], r10d
movsxd rax, r10d
inc dword ptr [rdi+rax*4]
inc edx
jmp short loc_57814
loc_577FA:
mov r11d, r10d
xor r11d, eax
mov ebx, r8d
xor ebx, ecx
or ebx, r11d
jz short loc_57814
xor ecx, r10d
xor eax, r8d
or eax, ecx
jnz short loc_57818
loc_57814:
mov eax, edx
jmp short loc_5785C
loc_57818:
lea eax, [rdx+2]
cmp eax, r9d
jle short loc_57865
loc_57820:
lea rsi, aAddedge; "addEdge"
mov rbx, rsp
mov edx, 400h
mov rdi, rbx
call _strncpy
mov rax, 6C6C616D73206Fh
mov [rbx+16h], rax
vmovups xmm0, cs:xmmword_1BE5A0
vmovups xmmword ptr [rbx+7], xmm0
loc_57852:
mov rdi, rbx
call _mju_error_raw
xor eax, eax
loc_5785C:
add rsp, 400h
pop rbx
retn
loc_57865:
lea ecx, [rdx+rdx]
movsxd rcx, ecx
mov [rsi+rcx*4], r10d
lea edx, ds:1[rdx*2]
movsxd rdx, edx
mov [rsi+rdx*4], r8d
mov [rsi+rcx*4+8], r8d
mov [rsi+rcx*4+0Ch], r10d
movsxd rcx, r10d
inc dword ptr [rdi+rcx*4]
movsxd rcx, r8d
inc dword ptr [rdi+rcx*4]
jmp short loc_5785C
| long long addEdge(long long a1, long long a2, unsigned int a3, int a4, int a5, int a6)
{
int v6; // r10d
long long v7; // rcx
int v8; // eax
int v9; // ecx
long long result; // rax
long long v16; // rcx
_BYTE v17[22]; // [rsp+0h] [rbp-408h] BYREF
char v18[1010]; // [rsp+16h] [rbp-3F2h] BYREF
if ( (a4 & a5) == 0xFFFFFFFF )
{
_RBX = v17;
strncpy(v17, "addEdge", 1024LL);
__asm
{
vmovups xmm0, cs:xmmword_1BE581
vmovups xmmword ptr [rbx+7], xmm0
vmovups xmm0, cs:xmmword_1BE581+0Fh
vmovups xmmword ptr [rbx+16h], xmm0
}
LABEL_19:
mju_error_raw(v17);
return 0LL;
}
v6 = a4;
if ( a4 == -1 )
v6 = a5;
if ( a5 == -1 )
a5 = a4;
if ( a3 )
{
v7 = (int)(2 * a3);
v8 = *(_DWORD *)(a2 + 4 * v7 - 8);
v9 = *(_DWORD *)(a2 + 4 * v7 - 4);
if ( v6 == a5 )
{
if ( !(v6 ^ v8 | v6 ^ v9) )
return a3;
LABEL_12:
if ( (int)a3 < a6 )
{
*(_DWORD *)(a2 + 4LL * (int)(2 * a3)) = v6;
*(_DWORD *)(a2 + 4LL * (int)(2 * a3 + 1)) = v6;
++*(_DWORD *)(a1 + 4LL * v6);
return ++a3;
}
goto LABEL_18;
}
if ( !(v8 ^ v6 | v9 ^ a5) || !(v6 ^ v9 | a5 ^ v8) )
return a3;
}
else if ( v6 == a5 )
{
goto LABEL_12;
}
result = a3 + 2;
if ( (int)result > a6 )
{
LABEL_18:
_RBX = v17;
strncpy(v17, "addEdge", 1024LL);
strcpy(v18, "o small");
__asm
{
vmovups xmm0, cs:xmmword_1BE5A0
vmovups xmmword ptr [rbx+7], xmm0
}
goto LABEL_19;
}
v16 = (int)(2 * a3);
*(_DWORD *)(a2 + 4 * v16) = v6;
*(_DWORD *)(a2 + 4LL * (int)(2 * a3 + 1)) = a5;
*(_DWORD *)(a2 + 4 * v16 + 8) = a5;
*(_DWORD *)(a2 + 4 * v16 + 12) = v6;
++*(_DWORD *)(a1 + 4LL * v6);
++*(_DWORD *)(a1 + 4LL * a5);
return result;
}
| addEdge:
PUSH RBX
SUB RSP,0x400
MOV EAX,R8D
AND EAX,ECX
CMP EAX,-0x1
JZ 0x0015779a
CMP ECX,-0x1
MOV R10D,ECX
CMOVZ R10D,R8D
CMP R8D,-0x1
CMOVZ R8D,ECX
TEST EDX,EDX
JZ 0x001577d0
LEA EAX,[RDX + RDX*0x1]
MOVSXD RCX,EAX
MOV EAX,dword ptr [RSI + RCX*0x4 + -0x8]
MOV ECX,dword ptr [RSI + RCX*0x4 + -0x4]
CMP R10D,R8D
JNZ 0x001577fa
XOR EAX,R10D
XOR ECX,R10D
OR ECX,EAX
JNZ 0x001577d5
JMP 0x00157814
LAB_0015779a:
LEA RSI,[0x2be579]
MOV RBX,RSP
MOV EDX,0x400
MOV RDI,RBX
CALL 0x0012d240
VMOVUPS XMM0,xmmword ptr [0x002be581]
VMOVUPS xmmword ptr [RBX + 0x7],XMM0
VMOVUPS XMM0,xmmword ptr [0x002be590]
VMOVUPS xmmword ptr [RBX + 0x16],XMM0
JMP 0x00157852
LAB_001577d0:
CMP R10D,R8D
JNZ 0x00157818
LAB_001577d5:
CMP EDX,R9D
JGE 0x00157820
LEA EAX,[RDX + RDX*0x1]
CDQE
MOV dword ptr [RSI + RAX*0x4],R10D
LEA EAX,[0x1 + RDX*0x2]
CDQE
MOV dword ptr [RSI + RAX*0x4],R10D
MOVSXD RAX,R10D
INC dword ptr [RDI + RAX*0x4]
INC EDX
JMP 0x00157814
LAB_001577fa:
MOV R11D,R10D
XOR R11D,EAX
MOV EBX,R8D
XOR EBX,ECX
OR EBX,R11D
JZ 0x00157814
XOR ECX,R10D
XOR EAX,R8D
OR EAX,ECX
JNZ 0x00157818
LAB_00157814:
MOV EAX,EDX
JMP 0x0015785c
LAB_00157818:
LEA EAX,[RDX + 0x2]
CMP EAX,R9D
JLE 0x00157865
LAB_00157820:
LEA RSI,[0x2be579]
MOV RBX,RSP
MOV EDX,0x400
MOV RDI,RBX
CALL 0x0012d240
MOV RAX,0x6c6c616d73206f
MOV qword ptr [RBX + 0x16],RAX
VMOVUPS XMM0,xmmword ptr [0x002be5a0]
VMOVUPS xmmword ptr [RBX + 0x7],XMM0
LAB_00157852:
MOV RDI,RBX
CALL 0x0012d260
XOR EAX,EAX
LAB_0015785c:
ADD RSP,0x400
POP RBX
RET
LAB_00157865:
LEA ECX,[RDX + RDX*0x1]
MOVSXD RCX,ECX
MOV dword ptr [RSI + RCX*0x4],R10D
LEA EDX,[0x1 + RDX*0x2]
MOVSXD RDX,EDX
MOV dword ptr [RSI + RDX*0x4],R8D
MOV dword ptr [RSI + RCX*0x4 + 0x8],R8D
MOV dword ptr [RSI + RCX*0x4 + 0xc],R10D
MOVSXD RCX,R10D
INC dword ptr [RDI + RCX*0x4]
MOVSXD RCX,R8D
INC dword ptr [RDI + RCX*0x4]
JMP 0x0015785c
|
int addEdge(long param_1,long param_2,int param_3,uint param_4,uint param_5,int param_6)
{
int *piVar1;
uint uVar2;
uint uVar3;
long lVar4;
uint uVar5;
char acStack_408 [7];
char local_401 [8];
char acStack_3f9 [7];
char cStack_3f2;
char acStack_3f1 [1001];
if ((param_5 & param_4) == 0xffffffff) {
strncpy(acStack_408,"addEdge",0x400);
local_401[0] = s___self_edge_of_the_static_tree_002be581[0];
local_401[1] = s___self_edge_of_the_static_tree_002be581[1];
local_401[2] = s___self_edge_of_the_static_tree_002be581[2];
local_401[3] = s___self_edge_of_the_static_tree_002be581[3];
local_401[4] = s___self_edge_of_the_static_tree_002be581[4];
local_401[5] = s___self_edge_of_the_static_tree_002be581[5];
local_401[6] = s___self_edge_of_the_static_tree_002be581[6];
local_401[7] = s___self_edge_of_the_static_tree_002be581[7];
acStack_3f9[0] = s___self_edge_of_the_static_tree_002be581[8];
acStack_3f9[1] = s___self_edge_of_the_static_tree_002be581[9];
acStack_3f9[2] = s___self_edge_of_the_static_tree_002be581[10];
acStack_3f9[3] = s___self_edge_of_the_static_tree_002be581[0xb];
acStack_3f9[4] = s___self_edge_of_the_static_tree_002be581[0xc];
acStack_3f9[5] = s___self_edge_of_the_static_tree_002be581[0xd];
acStack_3f9[6] = s___self_edge_of_the_static_tree_002be581[0xe];
cStack_3f2 = s___self_edge_of_the_static_tree_002be581[0xf];
acStack_3f1[0] = s___self_edge_of_the_static_tree_002be581[0x10];
acStack_3f1[1] = s___self_edge_of_the_static_tree_002be581[0x11];
acStack_3f1[2] = s___self_edge_of_the_static_tree_002be581[0x12];
acStack_3f1[3] = s___self_edge_of_the_static_tree_002be581[0x13];
acStack_3f1[4] = s___self_edge_of_the_static_tree_002be581[0x14];
acStack_3f1[5] = s___self_edge_of_the_static_tree_002be581[0x15];
acStack_3f1[6] = s___self_edge_of_the_static_tree_002be581[0x16];
acStack_3f1[7] = s___self_edge_of_the_static_tree_002be581[0x17];
acStack_3f1[8] = s___self_edge_of_the_static_tree_002be581[0x18];
acStack_3f1[9] = s___self_edge_of_the_static_tree_002be581[0x19];
acStack_3f1[10] = s___self_edge_of_the_static_tree_002be581[0x1a];
acStack_3f1[0xb] = s___self_edge_of_the_static_tree_002be581[0x1b];
acStack_3f1[0xc] = s___self_edge_of_the_static_tree_002be581[0x1c];
acStack_3f1[0xd] = s___self_edge_of_the_static_tree_002be581[0x1d];
acStack_3f1[0xe] = s___self_edge_of_the_static_tree_002be581[0x1e];
goto LAB_00157852;
}
uVar5 = param_4;
if (param_4 == 0xffffffff) {
uVar5 = param_5;
}
if (param_5 == 0xffffffff) {
param_5 = param_4;
}
if (param_3 == 0) {
if (uVar5 != param_5) goto LAB_00157818;
LAB_001577d5:
if (param_3 < param_6) {
*(uint *)(param_2 + (long)(param_3 * 2) * 4) = uVar5;
*(uint *)(param_2 + (long)(param_3 * 2 + 1) * 4) = uVar5;
piVar1 = (int *)(param_1 + (long)(int)uVar5 * 4);
*piVar1 = *piVar1 + 1;
return param_3 + 1;
}
}
else {
uVar2 = *(uint *)(param_2 + -8 + (long)(param_3 * 2) * 4);
uVar3 = *(uint *)(param_2 + -4 + (long)(param_3 * 2) * 4);
if (uVar5 == param_5) {
if (uVar3 == uVar5 && uVar2 == uVar5) {
return param_3;
}
goto LAB_001577d5;
}
if (param_5 == uVar3 && uVar5 == uVar2) {
return param_3;
}
if (uVar2 == param_5 && uVar3 == uVar5) {
return param_3;
}
LAB_00157818:
if (param_3 + 2 <= param_6) {
lVar4 = (long)(param_3 * 2);
*(uint *)(param_2 + lVar4 * 4) = uVar5;
*(uint *)(param_2 + (long)(param_3 * 2 + 1) * 4) = param_5;
*(uint *)(param_2 + 8 + lVar4 * 4) = param_5;
*(uint *)(param_2 + 0xc + lVar4 * 4) = uVar5;
piVar1 = (int *)(param_1 + (long)(int)uVar5 * 4);
*piVar1 = *piVar1 + 1;
piVar1 = (int *)(param_1 + (long)(int)param_5 * 4);
*piVar1 = *piVar1 + 1;
return param_3 + 2;
}
}
strncpy(acStack_408,"addEdge",0x400);
builtin_strncpy(acStack_3f1," small",7);
local_401[0] = s___edge_array_too_small_002be5a0[0];
local_401[1] = s___edge_array_too_small_002be5a0[1];
local_401[2] = s___edge_array_too_small_002be5a0[2];
local_401[3] = s___edge_array_too_small_002be5a0[3];
local_401[4] = s___edge_array_too_small_002be5a0[4];
local_401[5] = s___edge_array_too_small_002be5a0[5];
local_401[6] = s___edge_array_too_small_002be5a0[6];
local_401[7] = s___edge_array_too_small_002be5a0[7];
acStack_3f9 = SUB87(s___edge_array_too_small_002be5a0._8_8_,0);
cStack_3f2 = SUB81(s___edge_array_too_small_002be5a0._8_8_,7);
LAB_00157852:
mju_error_raw(acStack_408);
return 0;
}
| |
21,582 | fmt::v10::detail::print(_IO_FILE*, fmt::v10::basic_string_view<char>) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h | FMT_FUNC void print(std::FILE* f, string_view text) {
#ifdef _WIN32
int fd = _fileno(f);
if (_isatty(fd)) {
std::fflush(f);
if (write_console(fd, text)) return;
}
#endif
fwrite_fully(text.data(), text.size(), f);
} | O0 | c | fmt::v10::detail::print(_IO_FILE*, fmt::v10::basic_string_view<char>):
subq $0x28, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x2a420
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x2a430
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rdx
callq 0x91d40
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN3fmt3v106detail5printEP8_IO_FILENS0_17basic_string_viewIcEE:
sub rsp, 28h
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_8], rdx
mov [rsp+28h+var_18], rdi
lea rdi, [rsp+28h+var_10]
call _ZNK3fmt3v1017basic_string_viewIcE4dataEv; fmt::v10::basic_string_view<char>::data(void)
mov [rsp+28h+var_20], rax
lea rdi, [rsp+28h+var_10]
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov rdi, [rsp+28h+var_20]
mov rsi, rax
mov rdx, [rsp+28h+var_18]
call _ZN3fmt3v106detail12fwrite_fullyEPKvmP8_IO_FILE; fmt::v10::detail::fwrite_fully(void const*,ulong,_IO_FILE *)
add rsp, 28h
retn
| long long fmt::v10::detail::print(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v5; // [rsp+8h] [rbp-20h]
_QWORD v6[2]; // [rsp+18h] [rbp-10h] BYREF
v6[0] = a2;
v6[1] = a3;
v5 = fmt::v10::basic_string_view<char>::data((long long)v6);
v3 = fmt::v10::basic_string_view<char>::size((long long)v6);
return fmt::v10::detail::fwrite_fully(v5, v3, a1);
}
| print:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
LEA RDI,[RSP + 0x18]
CALL 0x0012a420
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x18]
CALL 0x0012a430
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x00191d40
ADD RSP,0x28
RET
|
/* fmt::v10::detail::print(_IO_FILE*, fmt::v10::basic_string_view<char>) */
void __thiscall fmt::v10::detail::print(detail *this,int8 param_1,int8 param_3)
{
void *pvVar1;
ulong uVar2;
int8 local_10;
int8 local_8;
local_10 = param_1;
local_8 = param_3;
pvVar1 = (void *)basic_string_view<char>::data((basic_string_view<char> *)&local_10);
uVar2 = basic_string_view<char>::size((basic_string_view<char> *)&local_10);
fwrite_fully(pvVar1,uVar2,(_IO_FILE *)this);
return;
}
| |
21,583 | my_numchars_mb | eloqsql/strings/ctype-mb.c | size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *pos, const char *end)
{
register size_t count= 0;
while (pos < end)
{
uint mb_len;
pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1;
count++;
}
return count;
} | O0 | c | my_numchars_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x409df
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3fea0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0x409b7
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0x409c1
movl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x409c1
movl -0x28(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4098c
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_numchars_mb:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 0
loc_4098C:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jnb short loc_409DF
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call my_ismbchar_0
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_409B7
mov eax, [rbp+var_24]
mov [rbp+var_28], eax
jmp short loc_409C1
loc_409B7:
mov eax, 1
mov [rbp+var_28], eax
jmp short $+2
loc_409C1:
mov ecx, [rbp+var_28]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_4098C
loc_409DF:
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned int v4; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
long long v6; // [rsp+10h] [rbp-20h]
v6 = 0LL;
while ( a2 < a3 )
{
v5 = my_ismbchar_0(a1, a2, a3);
if ( v5 )
v4 = v5;
else
v4 = 1;
a2 += v4;
++v6;
}
return v6;
}
| my_numchars_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],0x0
LAB_0014098c:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001409df
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0013fea0
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x001409b7
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001409c1
LAB_001409b7:
MOV EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001409c1
LAB_001409c1:
MOV ECX,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0014098c
LAB_001409df:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
long my_numchars_mb(int8 param_1,ulong param_2,ulong param_3)
{
int4 local_30;
int8 local_28;
int8 local_18;
local_28 = 0;
for (local_18 = param_2; local_18 < param_3; local_18 = local_18 + local_30) {
local_30 = my_ismbchar(param_1,local_18,param_3);
if (local_30 == 0) {
local_30 = 1;
}
local_28 = local_28 + 1;
}
return local_28;
}
| |
21,584 | my_numchars_mb | eloqsql/strings/ctype-mb.c | size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *pos, const char *end)
{
register size_t count= 0;
while (pos < end)
{
uint mb_len;
pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1;
count++;
}
return count;
} | O3 | c | my_numchars_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rdx, %rsi
jae 0x36b15
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorl %r14d, %r14d
movl $0x1, %r13d
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovbl %r13d, %eax
cmovll %r13d, %eax
addq %rax, %r15
incq %r14
cmpq %rbx, %r15
jb 0x36ae6
jmp 0x36b18
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_numchars_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
cmp rsi, rdx
jnb short loc_36B15
mov rbx, rdx
mov r15, rsi
mov r12, rdi
xor r14d, r14d
mov r13d, 1
loc_36AE6:
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r15
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
cmovb eax, r13d
cmovl eax, r13d
add r15, rax
inc r14
cmp r15, rbx
jb short loc_36AE6
jmp short loc_36B18
loc_36B15:
xor r14d, r14d
loc_36B18:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned long long v4; // r15
long long v5; // r14
long long v6; // rax
bool v7; // cc
if ( a2 >= a3 )
return 0LL;
v4 = a2;
v5 = 0LL;
do
{
v6 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v4,
a3);
v7 = (int)v6 < 2;
if ( (unsigned int)v6 < 2 )
v6 = 1LL;
if ( v7 )
v6 = 1LL;
v4 += v6;
++v5;
}
while ( v4 < a3 );
return v5;
}
| my_numchars_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
CMP RSI,RDX
JNC 0x00136b15
MOV RBX,RDX
MOV R15,RSI
MOV R12,RDI
XOR R14D,R14D
MOV R13D,0x1
LAB_00136ae6:
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVC EAX,R13D
CMOVL EAX,R13D
ADD R15,RAX
INC R14
CMP R15,RBX
JC 0x00136ae6
JMP 0x00136b18
LAB_00136b15:
XOR R14D,R14D
LAB_00136b18:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_numchars_mb(long param_1,ulong param_2,ulong param_3)
{
uint uVar1;
ulong uVar2;
long lVar3;
if (param_2 < param_3) {
lVar3 = 0;
do {
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar2 = (ulong)uVar1;
if (uVar1 < 2) {
uVar2 = 1;
}
if ((int)uVar1 < 2) {
uVar2 = 1;
}
param_2 = param_2 + uVar2;
lVar3 = lVar3 + 1;
} while (param_2 < param_3);
}
else {
lVar3 = 0;
}
return lVar3;
}
| |
21,585 | mlog_total | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/common/mlog.c | int32_t
mlog_total (uint16_t log)
{
if (!_memlog_started) return 0 ;
CBUFFER_QUEUE_T * queue ;
int32_t count = 0 ;
queue = get_cqueue (log) ;
if (!queue) {
return 0 ;
}
os_mutex_lock (&_mlog_mutex) ;
count = cqueue_count (queue) ;
os_mutex_unlock (&_mlog_mutex) ;
return count ;
} | O3 | c | mlog_total:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpb $0x1, 0x268ca(%rip) # 0x412d0
jne 0x1aa40
movzwl %di, %eax
leaq 0x268ce(%rip), %rcx # 0x412e0
movq (%rcx,%rax,8), %rbx
testq %rbx, %rbx
je 0x1aa40
leaq 0x241d6(%rip), %r14 # 0x3ebf8
movq %r14, %rdi
callq 0x14ff0
movq %rbx, %rdi
callq 0x1c821
movl %eax, %ebx
movq %r14, %rdi
callq 0x15015
movl %ebx, %eax
jmp 0x1aa42
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| mlog_total:
push rbp
mov rbp, rsp
push r14
push rbx
cmp cs:_memlog_started, 1
jnz short loc_1AA40
movzx eax, di
lea rcx, _mlog_inst
mov rbx, [rcx+rax*8]
test rbx, rbx
jz short loc_1AA40
lea r14, _mlog_mutex
mov rdi, r14
call os_mutex_lock
mov rdi, rbx
call cqueue_count
mov ebx, eax
mov rdi, r14
call os_mutex_unlock
mov eax, ebx
jmp short loc_1AA42
loc_1AA40:
xor eax, eax
loc_1AA42:
pop rbx
pop r14
pop rbp
retn
| long long mlog_total(unsigned __int16 a1)
{
long long v1; // rbx
unsigned int v2; // ebx
if ( memlog_started != 1 )
return 0LL;
v1 = mlog_inst[a1];
if ( !v1 )
return 0LL;
os_mutex_lock((long long *)&mlog_mutex);
v2 = cqueue_count(v1);
os_mutex_unlock((long long *)&mlog_mutex);
return v2;
}
| mlog_total:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
CMP byte ptr [0x001412d0],0x1
JNZ 0x0011aa40
MOVZX EAX,DI
LEA RCX,[0x1412e0]
MOV RBX,qword ptr [RCX + RAX*0x8]
TEST RBX,RBX
JZ 0x0011aa40
LEA R14,[0x13ebf8]
MOV RDI,R14
CALL 0x00114ff0
MOV RDI,RBX
CALL 0x0011c821
MOV EBX,EAX
MOV RDI,R14
CALL 0x00115015
MOV EAX,EBX
JMP 0x0011aa42
LAB_0011aa40:
XOR EAX,EAX
LAB_0011aa42:
POP RBX
POP R14
POP RBP
RET
|
int4 mlog_total(ushort param_1)
{
long lVar1;
int4 uVar2;
if ((_memlog_started == '\x01') && (lVar1 = (&_mlog_inst)[param_1], lVar1 != 0)) {
os_mutex_lock(&_mlog_mutex);
uVar2 = cqueue_count(lVar1);
os_mutex_unlock(&_mlog_mutex);
}
else {
uVar2 = 0;
}
return uVar2;
}
| |
21,586 | my_copy_fix_mb | eloqsql/strings/ctype-mb.c | size_t
my_copy_fix_mb(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t well_formed_nchars;
size_t well_formed_length;
size_t fixed_length;
size_t min_length= MY_MIN(src_length, dst_length);
well_formed_nchars= my_ci_well_formed_char_length(cs, src, src + min_length,
nchars, status);
DBUG_ASSERT(well_formed_nchars <= nchars);
well_formed_length= status->m_source_end_pos - src;
if (well_formed_length)
memmove(dst, src, well_formed_length);
if (!status->m_well_formed_error_pos)
return well_formed_length;
fixed_length= my_append_fix_badly_formed_tail(cs,
dst + well_formed_length,
dst + dst_length,
src + well_formed_length,
src + src_length,
nchars - well_formed_nchars,
status);
return well_formed_length + fixed_length;
} | O0 | c | my_copy_fix_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x48508
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x48510
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rdx
addq -0x58(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x485d0
movq %rax, -0x40(%rbp)
jmp 0x4853b
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x48565
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x24550
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4857a
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x485c3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
addq -0x48(%rbp), %rcx
movq -0x28(%rbp), %r8
addq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
subq -0x40(%rbp), %r9
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x48620
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| my_copy_fix_mb:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
jnb short loc_48508
mov rax, [rbp+var_30]
mov [rbp+var_60], rax
jmp short loc_48510
loc_48508:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
loc_48510:
mov rax, [rbp+var_60]
mov [rbp+var_58], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_28]
add rdx, [rbp+var_58]
mov rcx, [rbp+var_38]
mov r8, [rbp+arg_0]
call my_ci_well_formed_char_length
mov [rbp+var_40], rax
jmp short $+2
loc_4853B:
mov rax, [rbp+arg_0]
mov rax, [rax]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jz short loc_48565
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_48]
call _memmove
loc_48565:
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jnz short loc_4857A
mov rax, [rbp+var_48]
mov [rbp+var_8], rax
jmp short loc_485C3
loc_4857A:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
add rsi, [rbp+var_48]
mov rdx, [rbp+var_18]
add rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
add rcx, [rbp+var_48]
mov r8, [rbp+var_28]
add r8, [rbp+var_30]
mov r9, [rbp+var_38]
sub r9, [rbp+var_40]
mov rax, [rbp+arg_0]
mov [rsp+70h+var_70], rax
call my_append_fix_badly_formed_tail
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
add rax, [rbp+var_50]
mov [rbp+var_8], rax
loc_485C3:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long my_copy_fix_mb(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
_QWORD *a7)
{
unsigned long long v8; // [rsp+10h] [rbp-60h]
long long v9; // [rsp+28h] [rbp-48h]
int v10; // [rsp+30h] [rbp-40h]
int v11; // [rsp+38h] [rbp-38h]
int v12; // [rsp+40h] [rbp-30h]
int v14; // [rsp+50h] [rbp-20h]
v14 = a3;
v12 = a5;
v11 = a6;
if ( a5 >= a3 )
v8 = a3;
else
v8 = a5;
v10 = my_ci_well_formed_char_length(a1, a4, v8 + a4, a6, a7);
v9 = *a7 - a4;
if ( v9 )
memmove(a2, a4, v9);
if ( a7[1] )
return my_append_fix_badly_formed_tail(
a1,
(int)v9 + (int)a2,
v14 + (int)a2,
(int)v9 + (int)a4,
v12 + (int)a4,
v11 - v10,
(long long)a7)
+ v9;
else
return v9;
}
| my_copy_fix_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr [RBP + 0x10]
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 qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00148508
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00148510
LAB_00148508:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
LAB_00148510:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x28]
ADD RDX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + 0x10]
CALL 0x001485d0
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0014853b
LAB_0014853b:
MOV RAX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x00148565
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00124550
LAB_00148565:
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x0014857a
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001485c3
LAB_0014857a:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x28]
ADD R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x38]
SUB R9,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP],RAX
CALL 0x00148620
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
LAB_001485c3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
size_t my_copy_fix_mb(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
long param_6,long *param_7)
{
long lVar1;
ulong local_68;
size_t local_10;
local_68 = param_3;
if (param_5 < param_3) {
local_68 = param_5;
}
lVar1 = my_ci_well_formed_char_length(param_1,param_4,(long)param_4 + local_68,param_6,param_7);
local_10 = *param_7 - (long)param_4;
if (local_10 != 0) {
memmove(param_2,param_4,local_10);
}
if (param_7[1] != 0) {
lVar1 = my_append_fix_badly_formed_tail
(param_1,(long)param_2 + local_10,(long)param_2 + param_3,
(long)param_4 + local_10,(long)param_4 + param_5,param_6 - lVar1,param_7);
local_10 = local_10 + lVar1;
}
return local_10;
}
| |
21,587 | find_longest_bitstream | eloqsql/storage/myisam/mi_packrec.c | static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length= 1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
} | O0 | c | find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0xbba77
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0xbba54
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xbba64
jmp 0xbba56
jmp 0xbba58
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0xbbb02
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xbba00
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0xbbafc
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0xbbac0
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xbbacd
jmp 0xbbac2
jmp 0xbbac4
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0xbbb02
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xbba00
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jbe 0xbbaf0
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xbbaf6
movl -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| find_longest_bitstream_0:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 1
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_BBA77
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
ja short loc_BBA54
mov rax, [rbp+var_28]
cmp rax, [rbp+var_10]
jnz short loc_BBA64
loc_BBA54:
jmp short $+2
loc_BBA56:
jmp short $+2
loc_BBA58:
mov [rbp+var_4], 200h
jmp loc_BBB02
loc_BBA64:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
call find_longest_bitstream_0
add eax, 1
mov [rbp+var_1C], eax
loc_BBA77:
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_BBAFC
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
ja short loc_BBAC0
mov rax, [rbp+var_30]
cmp rax, [rbp+var_10]
jnz short loc_BBACD
loc_BBAC0:
jmp short $+2
loc_BBAC2:
jmp short $+2
loc_BBAC4:
mov [rbp+var_4], 200h
jmp short loc_BBB02
loc_BBACD:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
call find_longest_bitstream_0
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jbe short loc_BBAF0
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
jmp short loc_BBAF6
loc_BBAF0:
mov eax, [rbp+var_20]
mov [rbp+var_34], eax
loc_BBAF6:
mov eax, [rbp+var_34]
mov [rbp+var_1C], eax
loc_BBAFC:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_BBB02:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long find_longest_bitstream_0(unsigned __int16 *a1, unsigned long long a2)
{
unsigned __int16 *v4; // [rsp+10h] [rbp-30h]
unsigned __int16 *v5; // [rsp+18h] [rbp-28h]
unsigned int v6; // [rsp+20h] [rbp-20h]
unsigned int v7; // [rsp+24h] [rbp-1Ch]
unsigned __int16 *v8; // [rsp+30h] [rbp-10h]
v7 = 1;
if ( (*a1 & 0x8000) != 0 )
{
LABEL_6:
v8 = a1 + 1;
if ( (a1[1] & 0x8000) == 0 )
{
v4 = &v8[*v8];
if ( (unsigned long long)v4 > a2 || v4 == v8 )
return 512;
v6 = find_longest_bitstream_0(v4, a2) + 1;
if ( v7 <= v6 )
return v6;
else
return v7;
}
return v7;
}
v5 = &a1[*a1];
if ( (unsigned long long)v5 <= a2 && v5 != a1 )
{
v7 = find_longest_bitstream_0(v5, a2) + 1;
goto LABEL_6;
}
return 512;
}
| find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x001bba77
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001bba54
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001bba64
LAB_001bba54:
JMP 0x001bba56
LAB_001bba56:
JMP 0x001bba58
LAB_001bba58:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x001bbb02
LAB_001bba64:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001bba00
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_001bba77:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x001bbafc
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001bbac0
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001bbacd
LAB_001bbac0:
JMP 0x001bbac2
LAB_001bbac2:
JMP 0x001bbac4
LAB_001bbac4:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x001bbb02
LAB_001bbacd:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001bba00
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x20]
JBE 0x001bbaf0
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001bbaf6
LAB_001bbaf0:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x34],EAX
LAB_001bbaf6:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x1c],EAX
LAB_001bbafc:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001bbb02:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
uint find_longest_bitstream(ushort *param_1,ushort *param_2)
{
int iVar1;
ushort *puVar2;
uint local_3c;
uint local_24;
local_24 = 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_24 = iVar1 + 1;
}
param_1 = param_1 + 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_3c = iVar1 + 1;
if (local_3c < local_24) {
local_3c = local_24;
}
local_24 = local_3c;
}
return local_24;
}
| |
21,588 | find_longest_bitstream | eloqsql/storage/myisam/mi_packrec.c | static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length= 1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
} | O3 | c | find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movswq (%rdi), %rax
testq %rax, %rax
js 0x81d68
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
seta %cl
testw %ax, %ax
sete %al
orb %cl, %al
movl $0x200, %eax # imm = 0x200
jne 0x81dab
movq %rbx, %rsi
callq 0x81d26
movl %eax, %r15d
incl %r15d
jmp 0x81d6e
movl $0x1, %r15d
movswq 0x2(%r14), %rax
testq %rax, %rax
js 0x81da8
addq $0x2, %r14
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
setbe %cl
testw %ax, %ax
setne %dl
movl $0x200, %eax # imm = 0x200
testb %cl, %dl
je 0x81dab
movq %rbx, %rsi
callq 0x81d26
incl %eax
cmpl %eax, %r15d
cmoval %r15d, %eax
jmp 0x81dab
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| find_longest_bitstream_0:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
movsx rax, word ptr [rdi]
test rax, rax
js short loc_81D68
lea rdi, [r14+rax*2]
cmp rdi, rbx
setnbe cl
test ax, ax
setz al
or al, cl
mov eax, 200h
jnz short loc_81DAB
mov rsi, rbx
call find_longest_bitstream_0
mov r15d, eax
inc r15d
jmp short loc_81D6E
loc_81D68:
mov r15d, 1
loc_81D6E:
movsx rax, word ptr [r14+2]
test rax, rax
js short loc_81DA8
add r14, 2
lea rdi, [r14+rax*2]
cmp rdi, rbx
setbe cl
test ax, ax
setnz dl
mov eax, 200h
test dl, cl
jz short loc_81DAB
mov rsi, rbx
call find_longest_bitstream_0
inc eax
cmp r15d, eax
cmova eax, r15d
jmp short loc_81DAB
loc_81DA8:
mov eax, r15d
loc_81DAB:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long find_longest_bitstream_0(__int16 *a1, unsigned long long a2)
{
long long v3; // rax
__int16 *v4; // rdi
bool v5; // zf
long long result; // rax
unsigned int v7; // r15d
long long v8; // rax
unsigned long long v9; // rdi
bool v10; // dl
v3 = *a1;
if ( v3 < 0 )
{
v7 = 1;
}
else
{
v4 = &a1[v3];
v5 = (unsigned long long)v4 <= a2 && (_WORD)v3 != 0;
result = 512LL;
if ( !v5 )
return result;
v7 = find_longest_bitstream_0(v4) + 1;
}
v8 = a1[1];
if ( v8 < 0 )
return v7;
v9 = (unsigned long long)&a1[v8 + 1];
v10 = (_WORD)v8 != 0;
result = 512LL;
if ( v9 <= a2 && v10 )
{
result = (unsigned int)find_longest_bitstream_0(v9) + 1;
if ( v7 > (unsigned int)result )
return v7;
}
return result;
}
| find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOVSX RAX,word ptr [RDI]
TEST RAX,RAX
JS 0x00181d68
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETA CL
TEST AX,AX
SETZ AL
OR AL,CL
MOV EAX,0x200
JNZ 0x00181dab
MOV RSI,RBX
CALL 0x00181d26
MOV R15D,EAX
INC R15D
JMP 0x00181d6e
LAB_00181d68:
MOV R15D,0x1
LAB_00181d6e:
MOVSX RAX,word ptr [R14 + 0x2]
TEST RAX,RAX
JS 0x00181da8
ADD R14,0x2
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETBE CL
TEST AX,AX
SETNZ DL
MOV EAX,0x200
TEST DL,CL
JZ 0x00181dab
MOV RSI,RBX
CALL 0x00181d26
INC EAX
CMP R15D,EAX
CMOVA EAX,R15D
JMP 0x00181dab
LAB_00181da8:
MOV EAX,R15D
LAB_00181dab:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
uint find_longest_bitstream(short *param_1,short *param_2)
{
short sVar1;
int iVar2;
uint uVar3;
uint uVar4;
sVar1 = *param_1;
if ((long)sVar1 < 0) {
uVar4 = 1;
}
else {
if (sVar1 == 0 || param_2 < param_1 + sVar1) {
return 0x200;
}
iVar2 = find_longest_bitstream(param_1 + sVar1,param_2);
uVar4 = iVar2 + 1;
}
sVar1 = param_1[1];
uVar3 = uVar4;
if (-1 < (long)sVar1) {
uVar3 = 0x200;
if (sVar1 != 0 && param_1 + (long)sVar1 + 1 <= param_2) {
iVar2 = find_longest_bitstream(param_1 + (long)sVar1 + 1,param_2);
uVar3 = iVar2 + 1U;
if (iVar2 + 1U < uVar4) {
uVar3 = uVar4;
}
}
}
return uVar3;
}
| |
21,589 | kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | llama.cpp/common/arg.cpp | static ggml_type kv_cache_type_from_str(const std::string & s) {
for (const auto & type : kv_cache_types) {
if (ggml_type_name(type) == s) {
return type;
}
}
throw std::runtime_error("Unsupported cache type: " + s);
} | O3 | cpp | kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x10338e(%rip), %rbx # 0x163f50
movq 0x10338f(%rip), %r15 # 0x163f58
cmpq %r15, %rbx
je 0x60bf7
movl (%rbx), %edi
callq 0x21340
movq %r14, %rdi
movq %rax, %rsi
callq 0x20f60
testl %eax, %eax
je 0x60bea
addq $0x4, %rbx
jmp 0x60bc9
movl (%rbx), %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20650
movq %rax, %rbx
leaq 0xbaff7(%rip), %rsi # 0x11bc02
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x64f07
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x20480
xorl %ebp, %ebp
movq 0x10238f(%rip), %rsi # 0x162fc0
movq 0x102348(%rip), %rdx # 0x162f80
movq %rbx, %rdi
callq 0x20a50
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x60c5e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0x60c68
jmp 0x60c70
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f00
movq %r14, %rdi
callq 0x20af0
| _ZL22kv_cache_type_from_strRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov r14, rdi
mov rbx, cs:_ZL14kv_cache_types; kv_cache_types
mov r15, cs:qword_163F58
loc_60BC9:
cmp rbx, r15
jz short loc_60BF7
mov edi, [rbx]
call _ggml_type_name
mov rdi, r14
mov rsi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_60BEA
add rbx, 4
jmp short loc_60BC9
loc_60BEA:
mov eax, [rbx]
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_60BF7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUnsupportedCac; "Unsupported cache type: "
lea rdi, [rsp+48h+var_40]
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_60C5E
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_60C5E:
test bpl, bpl
jnz short loc_60C68
jmp short loc_60C70
mov r14, rax
loc_60C68:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_60C70:
mov rdi, r14
call __Unwind_Resume
| long long kv_cache_type_from_str(long long a1)
{
unsigned int *v1; // rbx
long long v2; // r15
long long v3; // rax
void *exception; // rbx
_BYTE v6[16]; // [rsp+8h] [rbp-40h] BYREF
v1 = (unsigned int *)kv_cache_types;
v2 = qword_163F58;
while ( 1 )
{
if ( v1 == (unsigned int *)v2 )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>(v6, "Unsupported cache type: ", a1);
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);
}
v3 = ggml_type_name(*v1);
if ( !(unsigned int)std::string::compare(a1, v3) )
break;
++v1;
}
return *v1;
}
| kv_cache_type_from_str:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
MOV RBX,qword ptr [0x00263f50]
MOV R15,qword ptr [0x00263f58]
LAB_00160bc9:
CMP RBX,R15
JZ 0x00160bf7
MOV EDI,dword ptr [RBX]
CALL 0x00121340
MOV RDI,R14
MOV RSI,RAX
CALL 0x00120f60
TEST EAX,EAX
JZ 0x00160bea
ADD RBX,0x4
JMP 0x00160bc9
LAB_00160bea:
MOV EAX,dword ptr [RBX]
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00160bf7:
MOV EDI,0x10
CALL 0x00120650
MOV RBX,RAX
LAB_00160c04:
LEA RSI,[0x21bc02]
LEA RDI,[RSP + 0x8]
MOV RDX,R14
CALL 0x00164f07
MOV BPL,0x1
LAB_00160c1b:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00120480
XOR EBP,EBP
MOV RSI,qword ptr [0x00262fc0]
MOV RDX,qword ptr [0x00262f80]
MOV RDI,RBX
CALL 0x00120a50
|
/* kv_cache_type_from_str(std::__cxx11::string const&) */
int4 kv_cache_type_from_str(string *param_1)
{
int4 *puVar1;
int iVar2;
runtime_error *this;
int4 *puVar3;
string local_40 [32];
puVar1 = DAT_00263f58;
puVar3 = kv_cache_types;
while( true ) {
if (puVar3 == puVar1) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00160c04 to 00160c17 has its CatchHandler @ 00160c65 */
std::operator+((char *)local_40,(string *)"Unsupported cache type: ");
/* try { // try from 00160c1b to 00160c3f has its CatchHandler @ 00160c40 */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00262fc0,PTR__runtime_error_00262f80);
}
ggml_type_name(*puVar3);
iVar2 = std::__cxx11::string::compare((char *)param_1);
if (iVar2 == 0) break;
puVar3 = puVar3 + 1;
}
return *puVar3;
}
| |
21,590 | ma_set_dynamic | eloqsql/libmariadb/libmariadb/ma_array.c | my_bool ma_set_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx)
{
if (idx >= array->elements)
{
if (idx >= array->max_element)
{
uint size;
char *new_ptr;
size=(idx+array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
if (!(new_ptr=(char*) realloc(array->buffer,size*
array->size_of_element)))
return TRUE;
array->buffer=new_ptr;
array->max_element=size;
}
memset((array->buffer+array->elements*array->size_of_element), 0,
(idx - array->elements)*array->size_of_element);
array->elements=idx+1;
}
memcpy(array->buffer+(idx * array->size_of_element),element,
(size_t) array->size_of_element);
return FALSE;
} | O3 | c | ma_set_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl 0x8(%rdi), %eax
cmpl %edx, %eax
ja 0x32518
movq (%r15), %rcx
cmpl %r14d, 0xc(%r15)
ja 0x324f5
movl 0x10(%r15), %esi
movl %esi, %r12d
addl %r14d, %r12d
movl %r12d, %eax
xorl %edx, %edx
divl %esi
subl %edx, %r12d
movl 0x14(%r15), %esi
imull %r12d, %esi
movq %rcx, %rdi
callq 0x13730
testq %rax, %rax
je 0x32539
movq %rax, %rcx
movq %rax, (%r15)
movl %r12d, 0xc(%r15)
movl 0x8(%r15), %eax
movl 0x14(%r15), %esi
movl %r14d, %edx
subl %eax, %edx
imull %esi, %edx
movl %esi, %edi
imull %eax, %edi
addq %rcx, %rdi
xorl %esi, %esi
callq 0x13260
leal 0x1(%r14), %eax
movl %eax, 0x8(%r15)
movl 0x14(%r15), %edx
imull %edx, %r14d
addq (%r15), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13390
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x32530
| ma_set_dynamic:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, edx
mov rbx, rsi
mov r15, rdi
mov eax, [rdi+8]
cmp eax, edx
ja short loc_32518
mov rcx, [r15]
cmp [r15+0Ch], r14d
ja short loc_324F5
mov esi, [r15+10h]
mov r12d, esi
add r12d, r14d
mov eax, r12d
xor edx, edx
div esi
sub r12d, edx
mov esi, [r15+14h]
imul esi, r12d
mov rdi, rcx
call _realloc
test rax, rax
jz short loc_32539
mov rcx, rax
mov [r15], rax
mov [r15+0Ch], r12d
mov eax, [r15+8]
loc_324F5:
mov esi, [r15+14h]
mov edx, r14d
sub edx, eax
imul edx, esi
mov edi, esi
imul edi, eax
add rdi, rcx
xor esi, esi
call _memset
lea eax, [r14+1]
mov [r15+8], eax
loc_32518:
mov edx, [r15+14h]
imul r14d, edx
add r14, [r15]
mov rdi, r14
mov rsi, rbx
call _memcpy
xor eax, eax
loc_32530:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_32539:
mov al, 1
jmp short loc_32530
| long long ma_set_dynamic(long long *a1, long long a2, unsigned int a3)
{
unsigned int v4; // eax
long long v5; // rcx
unsigned int v6; // r12d
long long v7; // rax
v4 = *((_DWORD *)a1 + 2);
if ( v4 > a3 )
goto LABEL_6;
v5 = *a1;
if ( *((_DWORD *)a1 + 3) > a3 )
{
LABEL_5:
memset(v5 + v4 * *((_DWORD *)a1 + 5), 0LL, *((_DWORD *)a1 + 5) * (a3 - v4));
*((_DWORD *)a1 + 2) = a3 + 1;
LABEL_6:
memcpy(*a1 + *((_DWORD *)a1 + 5) * a3, a2, *((unsigned int *)a1 + 5));
return 0LL;
}
v6 = a3 + *((_DWORD *)a1 + 4) - (a3 + *((_DWORD *)a1 + 4)) % *((_DWORD *)a1 + 4);
v7 = realloc(*a1, v6 * *((_DWORD *)a1 + 5));
if ( v7 )
{
v5 = v7;
*a1 = v7;
*((_DWORD *)a1 + 3) = v6;
v4 = *((_DWORD *)a1 + 2);
goto LABEL_5;
}
return 1LL;
}
| ma_set_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,EDX
JA 0x00132518
MOV RCX,qword ptr [R15]
CMP dword ptr [R15 + 0xc],R14D
JA 0x001324f5
MOV ESI,dword ptr [R15 + 0x10]
MOV R12D,ESI
ADD R12D,R14D
MOV EAX,R12D
XOR EDX,EDX
DIV ESI
SUB R12D,EDX
MOV ESI,dword ptr [R15 + 0x14]
IMUL ESI,R12D
MOV RDI,RCX
CALL 0x00113730
TEST RAX,RAX
JZ 0x00132539
MOV RCX,RAX
MOV qword ptr [R15],RAX
MOV dword ptr [R15 + 0xc],R12D
MOV EAX,dword ptr [R15 + 0x8]
LAB_001324f5:
MOV ESI,dword ptr [R15 + 0x14]
MOV EDX,R14D
SUB EDX,EAX
IMUL EDX,ESI
MOV EDI,ESI
IMUL EDI,EAX
ADD RDI,RCX
XOR ESI,ESI
CALL 0x00113260
LEA EAX,[R14 + 0x1]
MOV dword ptr [R15 + 0x8],EAX
LAB_00132518:
MOV EDX,dword ptr [R15 + 0x14]
IMUL R14D,EDX
ADD R14,qword ptr [R15]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00113390
XOR EAX,EAX
LAB_00132530:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00132539:
MOV AL,0x1
JMP 0x00132530
|
int8 ma_set_dynamic(long *param_1,void *param_2,uint param_3)
{
void *__ptr;
uint uVar1;
int iVar2;
uVar1 = *(uint *)(param_1 + 1);
if (uVar1 <= param_3) {
__ptr = (void *)*param_1;
if (*(uint *)((long)param_1 + 0xc) <= param_3) {
uVar1 = *(uint *)(param_1 + 2) + param_3;
iVar2 = uVar1 - uVar1 % *(uint *)(param_1 + 2);
__ptr = realloc(__ptr,(ulong)(uint)(*(int *)((long)param_1 + 0x14) * iVar2));
if (__ptr == (void *)0x0) {
return 1;
}
*param_1 = (long)__ptr;
*(int *)((long)param_1 + 0xc) = iVar2;
uVar1 = *(uint *)(param_1 + 1);
}
memset((void *)((ulong)(*(int *)((long)param_1 + 0x14) * uVar1) + (long)__ptr),0,
(ulong)((param_3 - uVar1) * *(int *)((long)param_1 + 0x14)));
*(uint *)(param_1 + 1) = param_3 + 1;
}
memcpy((void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1),param_2,
(ulong)*(uint *)((long)param_1 + 0x14));
return 0;
}
| |
21,591 | handle_command_error(st_command*, unsigned int, int) | eloqsql/client/mysqltest.cc | void handle_command_error(struct st_command *command, uint error,
int sys_errno)
{
DBUG_ENTER("handle_command_error");
DBUG_PRINT("enter", ("error: %d", error));
var_set_int("$sys_errno",sys_errno);
var_set_int("$errno",error);
if (error != 0)
{
int i;
if (command->abort_on_error)
{
report_or_die("command \"%.*b\" failed with error: %u my_errno: %d "
"errno: %d",
command->first_word_len, command->query, error, my_errno,
sys_errno);
DBUG_VOID_RETURN;
}
i= match_expected_error(command, error, NULL);
if (i >= 0)
{
DBUG_PRINT("info", ("command \"%.*s\" failed with expected error: %u, errno: %d",
command->first_word_len, command->query, error,
sys_errno));
revert_properties();
DBUG_VOID_RETURN;
}
if (command->expected_errors.count > 0)
report_or_die("command \"%.*b\" failed with wrong error: %u "
"my_errno: %d errno: %d",
command->first_word_len, command->query, error, my_errno,
sys_errno);
}
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
command->expected_errors.err[0].code.errnum != 0)
{
/* Error code we wanted was != 0, i.e. not an expected success */
report_or_die("command \"%.*b\" succeeded - should have failed with "
"errno %d...",
command->first_word_len, command->query,
command->expected_errors.err[0].code.errnum);
}
revert_properties();
DBUG_VOID_RETURN;
} | O0 | cpp | handle_command_error(st_command*, unsigned int, int):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
jmp 0x62c54
movl -0x10(%rbp), %esi
leaq 0xe8bf7(%rip), %rdi # 0x14b855
callq 0x62d90
movl -0xc(%rbp), %esi
leaq 0xe8bf3(%rip), %rdi # 0x14b860
callq 0x62d90
cmpl $0x0, -0xc(%rbp)
je 0x62d3f
movq -0x8(%rbp), %rax
cmpb $0x0, 0x70(%rax)
je 0x62cca
movq -0x8(%rbp), %rax
movl 0x68(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
callq 0xc46c0
movl -0x24(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x18(%rbp), %ecx
movl (%rax), %r8d
movl -0x10(%rbp), %r9d
leaq 0xe8ba9(%rip), %rdi # 0x14b867
movb $0x0, %al
callq 0x626b0
jmp 0x62d7f
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x62e00
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x62cf1
jmp 0x62ce5
jmp 0x62ce7
callq 0x62f10
jmp 0x62d7f
movq -0x8(%rbp), %rax
cmpl $0x0, 0x104(%rax)
jbe 0x62d3d
movq -0x8(%rbp), %rax
movl 0x68(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x28(%rbp)
callq 0xc46c0
movl -0x34(%rbp), %esi
movq -0x30(%rbp), %rdx
movl -0x28(%rbp), %ecx
movl (%rax), %r8d
movl -0x10(%rbp), %r9d
leaq 0xe8b6f(%rip), %rdi # 0x14b8a5
movb $0x0, %al
callq 0x626b0
jmp 0x62d78
movq -0x8(%rbp), %rax
cmpl $0x1, 0x74(%rax)
jne 0x62d76
movq -0x8(%rbp), %rax
cmpl $0x0, 0x78(%rax)
je 0x62d76
movq -0x8(%rbp), %rax
movl 0x68(%rax), %esi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x78(%rax), %ecx
leaq 0xe8b7a(%rip), %rdi # 0x14b8e9
movb $0x0, %al
callq 0x626b0
jmp 0x62d78
callq 0x62f10
jmp 0x62d7f
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z20handle_command_errorP10st_commandji:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
jmp short $+2
loc_62C54:
mov esi, [rbp+var_10]; int
lea rdi, aSysErrno; "$sys_errno"
call _Z11var_set_intPKci; var_set_int(char const*,int)
mov esi, [rbp+var_C]; int
lea rdi, aErrno; "$errno"
call _Z11var_set_intPKci; var_set_int(char const*,int)
cmp [rbp+var_C], 0
jz loc_62D3F
mov rax, [rbp+var_8]
cmp byte ptr [rax+70h], 0
jz short loc_62CCA
mov rax, [rbp+var_8]
mov eax, [rax+68h]
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_20], rax
mov eax, [rbp+var_C]
mov [rbp+var_18], eax
call _my_thread_var
mov esi, [rbp+var_24]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_18]
mov r8d, [rax]
mov r9d, [rbp+var_10]
lea rdi, aCommandBFailed; "command \"%.*b\" failed with error: %u "...
mov al, 0
call _Z13report_or_diePKcz; report_or_die(char const*,...)
jmp loc_62D7F
loc_62CCA:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
xor eax, eax
mov edx, eax
call _ZL20match_expected_errorP10st_commandjPKc; match_expected_error(st_command *,uint,char const*)
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jl short loc_62CF1
jmp short $+2
loc_62CE5:
jmp short $+2
loc_62CE7:
call _Z17revert_propertiesv; revert_properties(void)
jmp loc_62D7F
loc_62CF1:
mov rax, [rbp+var_8]
cmp dword ptr [rax+104h], 0
jbe short loc_62D3D
mov rax, [rbp+var_8]
mov eax, [rax+68h]
mov [rbp+var_34], eax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_30], rax
mov eax, [rbp+var_C]
mov [rbp+var_28], eax
call _my_thread_var
mov esi, [rbp+var_34]
mov rdx, [rbp+var_30]
mov ecx, [rbp+var_28]
mov r8d, [rax]
mov r9d, [rbp+var_10]
lea rdi, aCommandBFailed_0; "command \"%.*b\" failed with wrong erro"...
mov al, 0
call _Z13report_or_diePKcz; report_or_die(char const*,...)
loc_62D3D:
jmp short loc_62D78
loc_62D3F:
mov rax, [rbp+var_8]
cmp dword ptr [rax+74h], 1
jnz short loc_62D76
mov rax, [rbp+var_8]
cmp dword ptr [rax+78h], 0
jz short loc_62D76
mov rax, [rbp+var_8]
mov esi, [rax+68h]
mov rax, [rbp+var_8]
mov rdx, [rax]
mov rax, [rbp+var_8]
mov ecx, [rax+78h]
lea rdi, aCommandBSuccee; "command \"%.*b\" succeeded - should hav"...
mov al, 0
call _Z13report_or_diePKcz; report_or_die(char const*,...)
loc_62D76:
jmp short $+2
loc_62D78:
call _Z17revert_propertiesv; revert_properties(void)
jmp short $+2
loc_62D7F:
add rsp, 40h
pop rbp
retn
| unsigned long long handle_command_error(long long *a1, unsigned int a2, unsigned int a3)
{
unsigned int *v3; // rax
unsigned int *v5; // rax
unsigned int v6; // [rsp+Ch] [rbp-34h]
long long v7; // [rsp+10h] [rbp-30h]
unsigned int v8; // [rsp+1Ch] [rbp-24h]
long long v9; // [rsp+20h] [rbp-20h]
var_set_int("$sys_errno", a3);
var_set_int("$errno", a2);
if ( a2 )
{
if ( *((_BYTE *)a1 + 112) )
{
v8 = *((_DWORD *)a1 + 26);
v9 = *a1;
v3 = (unsigned int *)my_thread_var();
return report_or_die("command \"%.*b\" failed with error: %u my_errno: %d errno: %d", v8, v9, a2, *v3, a3);
}
if ( (int)match_expected_error(a1, a2, 0LL) < 0 )
{
if ( *((_DWORD *)a1 + 65) )
{
v6 = *((_DWORD *)a1 + 26);
v7 = *a1;
v5 = (unsigned int *)my_thread_var();
report_or_die("command \"%.*b\" failed with wrong error: %u my_errno: %d errno: %d", v6, v7, a2, *v5, a3);
}
}
}
else if ( *((_DWORD *)a1 + 29) == 1 && *((_DWORD *)a1 + 30) )
{
report_or_die(
"command \"%.*b\" succeeded - should have failed with errno %d...",
*((unsigned int *)a1 + 26),
*a1,
*((unsigned int *)a1 + 30));
}
return revert_properties();
}
| handle_command_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
JMP 0x00162c54
LAB_00162c54:
MOV ESI,dword ptr [RBP + -0x10]
LEA RDI,[0x24b855]
CALL 0x00162d90
MOV ESI,dword ptr [RBP + -0xc]
LEA RDI,[0x24b860]
CALL 0x00162d90
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00162d3f
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x70],0x0
JZ 0x00162cca
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x68]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x18],EAX
CALL 0x001c46c0
MOV ESI,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x18]
MOV R8D,dword ptr [RAX]
MOV R9D,dword ptr [RBP + -0x10]
LEA RDI,[0x24b867]
MOV AL,0x0
CALL 0x001626b0
JMP 0x00162d7f
LAB_00162cca:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00162e00
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JL 0x00162cf1
JMP 0x00162ce5
LAB_00162ce5:
JMP 0x00162ce7
LAB_00162ce7:
CALL 0x00162f10
JMP 0x00162d7f
LAB_00162cf1:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x104],0x0
JBE 0x00162d3d
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x68]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x28],EAX
CALL 0x001c46c0
MOV ESI,dword ptr [RBP + -0x34]
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x28]
MOV R8D,dword ptr [RAX]
MOV R9D,dword ptr [RBP + -0x10]
LEA RDI,[0x24b8a5]
MOV AL,0x0
CALL 0x001626b0
LAB_00162d3d:
JMP 0x00162d78
LAB_00162d3f:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x74],0x1
JNZ 0x00162d76
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x78],0x0
JZ 0x00162d76
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x68]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x78]
LEA RDI,[0x24b8e9]
MOV AL,0x0
CALL 0x001626b0
LAB_00162d76:
JMP 0x00162d78
LAB_00162d78:
CALL 0x00162f10
JMP 0x00162d7f
LAB_00162d7f:
ADD RSP,0x40
POP RBP
RET
|
/* handle_command_error(st_command*, unsigned int, int) */
void handle_command_error(st_command *param_1,uint param_2,int param_3)
{
uint uVar1;
int8 uVar2;
int iVar3;
uint *puVar4;
var_set_int("$sys_errno",param_3);
var_set_int("$errno",param_2);
if (param_2 == 0) {
if ((*(int *)(param_1 + 0x74) == 1) && (*(int *)(param_1 + 0x78) != 0)) {
report_or_die("command \"%.*b\" succeeded - should have failed with errno %d...",
(ulong)*(uint *)(param_1 + 0x68),*(int8 *)param_1,
(ulong)*(uint *)(param_1 + 0x78));
}
}
else {
if (param_1[0x70] != (st_command)0x0) {
uVar1 = *(uint *)(param_1 + 0x68);
uVar2 = *(int8 *)param_1;
puVar4 = (uint *)_my_thread_var();
report_or_die("command \"%.*b\" failed with error: %u my_errno: %d errno: %d",(ulong)uVar1,
uVar2,(ulong)param_2,(ulong)*puVar4,(ulong)(uint)param_3);
return;
}
iVar3 = match_expected_error(param_1,param_2,(char *)0x0);
if (-1 < iVar3) {
revert_properties();
return;
}
if (*(int *)(param_1 + 0x104) != 0) {
uVar1 = *(uint *)(param_1 + 0x68);
uVar2 = *(int8 *)param_1;
puVar4 = (uint *)_my_thread_var();
report_or_die("command \"%.*b\" failed with wrong error: %u my_errno: %d errno: %d",
(ulong)uVar1,uVar2,(ulong)param_2,(ulong)*puVar4,(ulong)(uint)param_3);
}
}
revert_properties();
return;
}
| |
21,592 | JS_CompactBigInt1 | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_CompactBigInt1(JSContext *ctx, JSValue val)
{
if (JS_VALUE_GET_TAG(val) != JS_TAG_BIG_INT)
return val; /* fail safe */
bf_t *a = JS_GetBigInt(val);
if (a->expn == BF_EXP_ZERO && a->sign) {
assert(((JSBigInt*)JS_VALUE_GET_PTR(val))->header.ref_count == 1);
a->sign = 0;
}
return val;
} | O0 | c | JS_CompactBigInt1:
subq $0x38, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x20(%rsp), %rax
cmpl $-0x9, %eax
je 0x69ff3
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x6a047
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x40140
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpq %rcx, 0x10(%rax)
jne 0x6a033
movq 0x8(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0x6a033
movq 0x8(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_CompactBigInt1:
sub rsp, 38h
mov [rsp+38h+var_20], rsi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_28], rdi
mov rax, [rsp+38h+var_18]
cmp eax, 0FFFFFFF7h
jz short loc_69FF3
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_10], rax
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_8], rax
jmp short loc_6A047
loc_69FF3:
mov rdi, [rsp+38h+var_20]
mov rsi, [rsp+38h+var_18]
call JS_GetBigInt
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
mov rcx, 8000000000000000h
cmp [rax+10h], rcx
jnz short loc_6A033
mov rax, [rsp+38h+var_30]
cmp dword ptr [rax+8], 0
jz short loc_6A033
mov rax, [rsp+38h+var_30]
mov dword ptr [rax+8], 0
loc_6A033:
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_10], rax
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_8], rax
loc_6A047:
mov rax, [rsp+38h+var_10]
mov rdx, [rsp+38h+var_8]
add rsp, 38h
retn
| long long JS_CompactBigInt1(long long a1, long long a2, int a3)
{
long long BigInt; // [rsp+8h] [rbp-30h]
if ( a3 != -9 )
return a2;
BigInt = JS_GetBigInt(a2);
if ( *(_QWORD *)(BigInt + 16) == 0x8000000000000000LL && *(_DWORD *)(BigInt + 8) )
*(_DWORD *)(BigInt + 8) = 0;
return a2;
}
| JS_CompactBigInt1:
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,-0x9
JZ 0x00169ff3
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0016a047
LAB_00169ff3:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00140140
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,-0x8000000000000000
CMP qword ptr [RAX + 0x10],RCX
JNZ 0x0016a033
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x0016a033
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x8],0x0
LAB_0016a033:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x30],RAX
LAB_0016a047:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
int1 [16] JS_CompactBigInt1(int8 param_1,int8 param_2,int8 param_3)
{
int1 auVar1 [16];
long lVar2;
if ((((int)param_3 == -9) &&
(lVar2 = JS_GetBigInt(param_2,param_3), *(long *)(lVar2 + 0x10) == -0x8000000000000000)) &&
(*(int *)(lVar2 + 8) != 0)) {
*(int4 *)(lVar2 + 8) = 0;
}
auVar1._8_8_ = param_3;
auVar1._0_8_ = param_2;
return auVar1;
}
| |
21,593 | js_new_uint8array | bluesky950520[P]quickjs/quickjs.c | static JSValue js_new_uint8array(JSContext *ctx, JSValue buffer)
{
if (JS_IsException(buffer))
return JS_EXCEPTION;
JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_UINT8_ARRAY);
if (JS_IsException(obj)) {
JS_FreeValue(ctx, buffer);
return JS_EXCEPTION;
}
JSArrayBuffer *abuf = js_get_array_buffer(ctx, buffer);
assert(abuf != NULL);
if (typed_array_init(ctx, obj, buffer, 0, abuf->byte_length, /*track_rab*/FALSE)) {
// 'buffer' is freed on error above.
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
return obj;
} | O1 | c | js_new_uint8array:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movl $0x6, %ebx
cmpl $0x6, %r12d
je 0x39858
movq %rsi, %r13
movq %rdi, %r15
movl $0x3, %edx
xorl %esi, %esi
movl $0x17, %ecx
callq 0x36d56
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x39870
movq 0x18(%r15), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1d8c6
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x38fcf
movslq (%rax), %r9
movl $0x0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x12b13
testl %eax, %eax
je 0x398af
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbp, %rdx
jmp 0x39853
movq %rbp, %rbx
jmp 0x3985b
| js_new_uint8array:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdx
mov ebx, 6
cmp r12d, 6
jz short loc_39858
mov r13, rsi
mov r15, rdi
mov edx, 3
xor esi, esi
mov ecx, 17h
call js_create_from_ctor
mov rbp, rdx
cmp ebp, 6
jnz short loc_39870
mov rdi, [r15+18h]
mov rsi, r13
mov rdx, r12
loc_39853:
call JS_FreeValueRT
loc_39858:
xor r14d, r14d
loc_3985B:
mov rax, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_39870:
mov r14, rax
mov rdi, r15
mov rsi, r13
mov rdx, r12
call js_get_array_buffer
movsxd r9, dword ptr [rax]
mov [rsp+38h+var_38], 0
mov rdi, r15
mov rsi, r14
mov rdx, r13
mov rcx, r12
xor r8d, r8d
call typed_array_init
test eax, eax
jz short loc_398AF
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, rbp
jmp short loc_39853
loc_398AF:
mov rbx, rbp
jmp short loc_3985B
| long long js_new_uint8array(
long long a1,
_DWORD *a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
unsigned long long v12; // rax
double v13; // xmm4_8
double v14; // xmm5_8
long long v15; // rdx
long long v16; // rbp
long long v17; // rdi
long long v18; // rdx
long long v19; // r14
int *array_buffer; // rax
if ( (_DWORD)a3 != 6 )
{
v12 = js_create_from_ctor(a1, 0LL, 3LL, 23);
v16 = v15;
if ( (_DWORD)v15 == 6 )
{
v17 = *(_QWORD *)(a1 + 24);
v18 = a3;
}
else
{
v19 = v12;
array_buffer = (int *)js_get_array_buffer(a1, (long long)a2, a3, a4, a5, a6, a7, v13, v14, a10, a11);
if ( !(unsigned int)typed_array_init(a1, v19, (long long)a2, a3, 0LL, *array_buffer, 0) )
return v19;
v17 = *(_QWORD *)(a1 + 24);
a2 = (_DWORD *)v19;
v18 = v16;
}
JS_FreeValueRT(v17, a2, v18);
}
return 0LL;
}
| js_new_uint8array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDX
MOV EBX,0x6
CMP R12D,0x6
JZ 0x00139858
MOV R13,RSI
MOV R15,RDI
MOV EDX,0x3
XOR ESI,ESI
MOV ECX,0x17
CALL 0x00136d56
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00139870
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R13
MOV RDX,R12
LAB_00139853:
CALL 0x0011d8c6
LAB_00139858:
XOR R14D,R14D
LAB_0013985b:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00139870:
MOV R14,RAX
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
CALL 0x00138fcf
MOVSXD R9,dword ptr [RAX]
MOV dword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,R14
MOV RDX,R13
MOV RCX,R12
XOR R8D,R8D
CALL 0x00112b13
TEST EAX,EAX
JZ 0x001398af
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,RBP
JMP 0x00139853
LAB_001398af:
MOV RBX,RBP
JMP 0x0013985b
|
int1 [16] js_new_uint8array(long param_1,int8 param_2,int8 param_3)
{
int1 auVar1 [16];
int iVar2;
ulong in_RAX;
int *piVar3;
int8 uVar4;
int1 auVar5 [16];
auVar1._8_8_ = param_3;
auVar1._0_8_ = param_2;
if ((int)param_3 != 6) {
auVar5 = js_create_from_ctor(param_1,0,3,0x17);
if (auVar5._8_4_ == 6) {
uVar4 = *(int8 *)(param_1 + 0x18);
auVar5 = auVar1;
}
else {
piVar3 = (int *)js_get_array_buffer(param_1,param_2,param_3);
iVar2 = typed_array_init(param_1,auVar5._0_8_,param_2,param_3,0,(long)*piVar3,
in_RAX & 0xffffffff00000000);
if (iVar2 == 0) {
return auVar5;
}
uVar4 = *(int8 *)(param_1 + 0x18);
}
JS_FreeValueRT(uVar4,auVar5._0_8_,auVar5._8_8_);
}
return ZEXT816(6) << 0x40;
}
| |
21,594 | js_new_uint8array | bluesky950520[P]quickjs/quickjs.c | static JSValue js_new_uint8array(JSContext *ctx, JSValue buffer)
{
if (JS_IsException(buffer))
return JS_EXCEPTION;
JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_UINT8_ARRAY);
if (JS_IsException(obj)) {
JS_FreeValue(ctx, buffer);
return JS_EXCEPTION;
}
JSArrayBuffer *abuf = js_get_array_buffer(ctx, buffer);
assert(abuf != NULL);
if (typed_array_init(ctx, obj, buffer, 0, abuf->byte_length, /*track_rab*/FALSE)) {
// 'buffer' is freed on error above.
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
return obj;
} | O2 | c | js_new_uint8array:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
pushq $0x6
popq %rbx
cmpl $0x6, %r12d
je 0x329e4
movq %rsi, %r13
movq %rdi, %r15
pushq $0x3
popq %rdx
pushq $0x17
popq %rcx
xorl %esi, %esi
callq 0x3045a
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x329a6
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
jmp 0x329df
movq %rax, %r14
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x320fa
movslq (%rax), %r9
andl $0x0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x6a950
testl %eax, %eax
je 0x329fc
movq %r15, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1801e
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %rbx
jmp 0x329e7
| js_new_uint8array:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdx
push 6
pop rbx
cmp r12d, 6
jz short loc_329E4
mov r13, rsi
mov r15, rdi
push 3
pop rdx
push 17h
pop rcx
xor esi, esi
call js_create_from_ctor
mov rbp, rdx
cmp ebp, 6
jnz short loc_329A6
mov rdi, r15
mov rsi, r13
mov rdx, r12
jmp short loc_329DF
loc_329A6:
mov r14, rax
mov rdi, r15
mov rsi, r13
mov rdx, r12
call js_get_array_buffer
movsxd r9, dword ptr [rax]
and [rsp+38h+var_38], 0
mov rdi, r15
mov rsi, r14
mov rdx, r13
mov rcx, r12
xor r8d, r8d
call typed_array_init
test eax, eax
jz short loc_329FC
mov rdi, r15
mov rsi, r14
mov rdx, rbp
loc_329DF:
call JS_FreeValue
loc_329E4:
xor r14d, r14d
loc_329E7:
mov rax, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_329FC:
mov rbx, rbp
jmp short loc_329E7
| unsigned long long js_new_uint8array(long long a1, long long a2, long long a3)
{
unsigned long long v4; // rax
long long v5; // rdx
long long v6; // rbp
long long v7; // rdx
unsigned long long v8; // r14
_DWORD *array_buffer; // rax
if ( (_DWORD)a3 != 6 )
{
v4 = js_create_from_ctor(a1, 0LL, 3LL, 23);
v6 = v5;
if ( (_DWORD)v5 == 6 )
{
v7 = a3;
}
else
{
v8 = v4;
array_buffer = (_DWORD *)js_get_array_buffer(a1, a2, a3);
if ( !(unsigned int)typed_array_init(a1, v8, a2, a3, 0, *array_buffer, 0) )
return v8;
a2 = v8;
v7 = v6;
}
JS_FreeValue(a1, a2, v7);
}
return 0LL;
}
| js_new_uint8array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDX
PUSH 0x6
POP RBX
CMP R12D,0x6
JZ 0x001329e4
MOV R13,RSI
MOV R15,RDI
PUSH 0x3
POP RDX
PUSH 0x17
POP RCX
XOR ESI,ESI
CALL 0x0013045a
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x001329a6
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
JMP 0x001329df
LAB_001329a6:
MOV R14,RAX
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
CALL 0x001320fa
MOVSXD R9,dword ptr [RAX]
AND dword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,R14
MOV RDX,R13
MOV RCX,R12
XOR R8D,R8D
CALL 0x0016a950
TEST EAX,EAX
JZ 0x001329fc
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBP
LAB_001329df:
CALL 0x0011801e
LAB_001329e4:
XOR R14D,R14D
LAB_001329e7:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001329fc:
MOV RBX,RBP
JMP 0x001329e7
|
int1 [16] js_new_uint8array(int8 param_1,int8 param_2,int8 param_3)
{
int1 auVar1 [16];
int iVar2;
ulong in_RAX;
int *piVar3;
int1 auVar4 [16];
auVar1._8_8_ = param_3;
auVar1._0_8_ = param_2;
if ((int)param_3 != 6) {
auVar4 = js_create_from_ctor(param_1,0,3,0x17);
if (auVar4._8_4_ != 6) {
piVar3 = (int *)js_get_array_buffer(param_1,param_2,param_3);
iVar2 = typed_array_init(param_1,auVar4._0_8_,param_2,param_3,0,(long)*piVar3,
in_RAX & 0xffffffff00000000);
auVar1 = auVar4;
if (iVar2 == 0) {
return auVar4;
}
}
JS_FreeValue(param_1,auVar1._0_8_,auVar1._8_8_);
}
return ZEXT816(6) << 0x40;
}
| |
21,595 | minja::Parser::parseExpression(bool) | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
} | O3 | cpp | minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0xa81a0
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0xa6ede
testb %bpl, %bpl
je 0xa6ede
leaq 0xb05b0(%rip), %rax # 0x157420
movb (%rax), %al
testb %al, %al
je 0xa6fac
leaq 0xb057f(%rip), %rdx # 0x157400
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0xa7052
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0xa6eb2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1dc50
testq %r15, %r15
je 0xa6ede
movq (%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0xa6ef9
movq 0xaf0ac(%rip), %rcx # 0x155f80
cmpb $0x0, (%rcx)
je 0xa6ef5
incl 0x8(%rax)
jmp 0xa6ef9
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0xa842e
movl $0x60, %edi
callq 0x1dc20
movq %rax, %r14
leaq 0x40(%rsp), %r8
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0xadb1e(%rip), %rax # 0x154a58
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
leaq 0x18(%rsp), %rsi
leaq 0x30(%rsp), %r12
movq %rsp, %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0xbb1a2
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0xa6f76
callq 0x50ba8
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0xa6f85
callq 0x50ba8
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xa6f94
callq 0x50ba8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xa6ee5
callq 0x50ba8
jmp 0xa6ee5
leaq 0xb046d(%rip), %rdi # 0x157420
callq 0x1e6f0
testl %eax, %eax
je 0xa6e7a
leaq 0xb0439(%rip), %rdi # 0x157400
leaq 0x6defd(%rip), %rsi # 0x114ecb
movl $0x10, %edx
callq 0x929e2
leaq -0x62eb1(%rip), %rdi # 0x4412e
leaq 0xb041a(%rip), %rsi # 0x157400
leaq 0xafcbb(%rip), %rdx # 0x156ca8
callq 0x1da80
leaq 0xb0427(%rip), %rdi # 0x157420
callq 0x1d7c0
jmp 0xa6e7a
movq %rax, %rbx
leaq 0xb0413(%rip), %rdi # 0x157420
callq 0x1d7a0
jmp 0xa703a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xa85fa
jmp 0xa7026
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xa703a
callq 0x50ba8
jmp 0xa703a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xa7049
callq 0x50ba8
movq %rbx, %rdi
callq 0x1e660
nop
| _ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz short loc_A6EDE
test bpl, bpl
jz short loc_A6EDE
lea rax, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
mov al, [rax]
test al, al
jz loc_A6FAC
loc_A6E7A:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+78h+var_48]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_A6EB2
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A6EB2:
test r15, r15
jz short loc_A6EDE
mov rax, [r14]
mov [rsp+78h+var_60], rax
mov rax, [r14+8]
mov [rsp+78h+var_58], rax
test rax, rax
jz short loc_A6EF9
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_A6EF5
inc dword ptr [rax+8]
jmp short loc_A6EF9
loc_A6EDE:
movaps xmm0, [rsp+78h+var_78]
movups xmmword ptr [rbx], xmm0
loc_A6EE5:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A6EF5:
lock inc dword ptr [rax+8]
loc_A6EF9:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_50], rax
lea rdi, [rsp+78h+var_48]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea r8, [rsp+78h+var_38]
mov rax, 100000001h
mov [r14+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja6IfExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r14], rax
mov r15, r14
add r15, 10h
lea rsi, [rsp+78h+var_60]
lea r12, [rsp+78h+var_48]
mov rcx, rsp
mov rdi, r15
mov rdx, r12
call _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_; minja::IfExpr::IfExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,std::shared_ptr<minja::Expression> &)
mov [rbx], r15
mov [rbx+8], r14
mov rdi, [r12+18h]
test rdi, rdi
jz short loc_A6F76
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A6F76:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_A6F85
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A6F85:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz short loc_A6F94
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A6F94:
mov rdi, qword ptr [rsp+78h+var_78+8]
test rdi, rdi
jz loc_A6EE5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_A6EE5
loc_A6FAC:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_A6E7A
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_A6E7A
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_A703A
mov rbx, rax
lea rdi, [rsp+arg_28]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_A7026
mov rbx, rax
loc_A7026:
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_A703A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_A703A
mov rbx, rax
loc_A703A:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_A7049
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A7049:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseExpression(minja::Parser *this, long long *a2, char a3)
{
int v4; // r8d
int v5; // r9d
volatile signed __int32 *v6; // r15
volatile signed __int32 *v7; // rax
_QWORD *v9; // r14
__int128 v10; // [rsp+0h] [rbp-78h] BYREF
long long v11; // [rsp+18h] [rbp-60h] BYREF
volatile signed __int32 *v12; // [rsp+20h] [rbp-58h]
long long v13; // [rsp+28h] [rbp-50h]
long long *v14; // [rsp+30h] [rbp-48h] BYREF
volatile signed __int32 *v15; // [rsp+38h] [rbp-40h]
long long v16; // [rsp+40h] [rbp-38h] BYREF
volatile signed __int32 *v17; // [rsp+48h] [rbp-30h]
minja::Parser::parseLogicalOr((minja::Parser *)&v10);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_10;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
(long long)"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)&v14,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v10,
*((long long *)&v10 + 1));
v6 = v15;
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v6 )
{
v11 = *a2;
v7 = (volatile signed __int32 *)a2[1];
v12 = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v7 + 2);
else
_InterlockedIncrement(v7 + 2);
}
v13 = a2[4] - a2[2];
minja::Parser::parseIfExpression((minja::Parser *)&v14);
v9 = (_QWORD *)operator new(0x60uLL);
v9[1] = 0x100000001LL;
*v9 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::IfExpr,std::allocator<minja::IfExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::IfExpr::IfExpr(v9 + 2, &v11, &v14, &v10, &v16);
*(_QWORD *)this = v9 + 2;
*((_QWORD *)this + 1) = v9;
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( *((_QWORD *)&v10 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v10 + 1));
}
else
{
LABEL_10:
*(_OWORD *)this = v10;
}
return this;
}
| parseExpression:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x001a81a0
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x001a6ede
TEST BPL,BPL
JZ 0x001a6ede
LEA RAX,[0x257420]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001a6fac
LAB_001a6e7a:
LEA RDX,[0x257400]
LEA RDI,[RSP + 0x30]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001a7052
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x001a6eb2
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011dc50
LAB_001a6eb2:
TEST R15,R15
JZ 0x001a6ede
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x001a6ef9
MOV RCX,qword ptr [0x00255f80]
CMP byte ptr [RCX],0x0
JZ 0x001a6ef5
INC dword ptr [RAX + 0x8]
JMP 0x001a6ef9
LAB_001a6ede:
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RBX],XMM0
LAB_001a6ee5:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a6ef5:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001a6ef9:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x28],RAX
LAB_001a6f06:
LEA RDI,[RSP + 0x30]
MOV RSI,R14
CALL 0x001a842e
LAB_001a6f13:
MOV EDI,0x60
CALL 0x0011dc20
MOV R14,RAX
LEA R8,[RSP + 0x40]
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x254a58]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
LEA RSI,[RSP + 0x18]
LEA R12,[RSP + 0x30]
MOV RCX,RSP
MOV RDI,R15
MOV RDX,R12
CALL 0x001bb1a2
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,qword ptr [R12 + 0x18]
TEST RDI,RDI
JZ 0x001a6f76
CALL 0x00150ba8
LAB_001a6f76:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x001a6f85
CALL 0x00150ba8
LAB_001a6f85:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x001a6f94
CALL 0x00150ba8
LAB_001a6f94:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001a6ee5
CALL 0x00150ba8
JMP 0x001a6ee5
LAB_001a6fac:
LEA RDI,[0x257420]
CALL 0x0011e6f0
TEST EAX,EAX
JZ 0x001a6e7a
LAB_001a6fc0:
LEA RDI,[0x257400]
LEA RSI,[0x214ecb]
MOV EDX,0x10
CALL 0x001929e2
LAB_001a6fd8:
LEA RDI,[0x14412e]
LEA RSI,[0x257400]
LEA RDX,[0x256ca8]
CALL 0x0011da80
LEA RDI,[0x257420]
CALL 0x0011d7c0
JMP 0x001a6e7a
|
/* minja::Parser::parseExpression(bool) */
int8 * minja::Parser::parseExpression(bool param_1)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
int8 *puVar3;
char in_DL;
int8 *in_RSI;
int7 in_register_00000039;
int8 *puVar4;
int8 local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_70;
int8 local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
long local_50;
long *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
puVar4 = (int8 *)CONCAT71(in_register_00000039,param_1);
parseLogicalOr();
if ((in_RSI[4] != in_RSI[3]) && (in_DL != '\0')) {
if ((parseExpression(bool)::if_tok_abi_cxx11_ == '\0') &&
(iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_), iVar2 != 0)) {
/* try { // try from 001a6fc0 to 001a6fd7 has its CatchHandler @ 001a7003 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpression(bool)::if_tok_abi_cxx11_,&DAT_00214ecb,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_);
}
/* try { // try from 001a6e7a to 001a6e92 has its CatchHandler @ 001a7037 */
consumeToken(&local_48);
p_Var1 = local_40;
if (local_48 != &local_38) {
operator_delete(local_48,local_38 + 1);
}
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
local_60 = *in_RSI;
local_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00255f80 == '\0') {
LOCK();
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
}
}
local_50 = in_RSI[4] - in_RSI[2];
/* try { // try from 001a6f06 to 001a6f12 has its CatchHandler @ 001a7023 */
parseIfExpression();
/* try { // try from 001a6f13 to 001a6f1c has its CatchHandler @ 001a7014 */
puVar3 = (int8 *)operator_new(0x60);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_ptr_inplace_00254a68;
IfExpr::IfExpr((IfExpr *)(puVar3 + 2),(Location *)&local_60,(shared_ptr *)&local_48,
(shared_ptr *)&local_78,(shared_ptr *)&local_38);
*puVar4 = (IfExpr *)(puVar3 + 2);
puVar4[1] = puVar3;
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (p_Stack_70 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
return puVar4;
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_70);
return puVar4;
}
}
*puVar4 = local_78;
puVar4[1] = p_Stack_70;
return puVar4;
}
| |
21,596 | Bfree | eloqsql/strings/dtoa.c | static void Bfree(Bigint *v, Stack_alloc *alloc)
{
char *gptr= (char*) v; /* generic pointer */
if (gptr < alloc->begin || gptr >= alloc->end)
free(gptr);
else if (v->k <= Kmax)
{
/*
Maintain free lists only for stack objects: this way we don't
have to bother with freeing lists in the end of dtoa;
heap should not be used normally anyway.
*/
v->p.next= alloc->freelist[v->k];
alloc->freelist[v->k]= v;
}
} | O3 | c | Bfree:
pushq %rbp
movq %rsp, %rbp
cmpq %rdi, (%rsi)
ja 0x5fcd5
cmpq %rdi, 0x10(%rsi)
jbe 0x5fcd5
movslq 0x8(%rdi), %rax
cmpq $0xf, %rax
jg 0x5fcd3
movq 0x18(%rsi,%rax,8), %rcx
movq %rcx, (%rdi)
movq %rdi, 0x18(%rsi,%rax,8)
popq %rbp
retq
popq %rbp
jmp 0x24470
| Bfree:
push rbp
mov rbp, rsp
cmp [rsi], rdi
ja short loc_5FCD5
cmp [rsi+10h], rdi
jbe short loc_5FCD5
movsxd rax, dword ptr [rdi+8]
cmp rax, 0Fh
jg short loc_5FCD3
mov rcx, [rsi+rax*8+18h]
mov [rdi], rcx
mov [rsi+rax*8+18h], rdi
loc_5FCD3:
pop rbp
retn
loc_5FCD5:
pop rbp
jmp _free
| long long Bfree(unsigned long long a1, unsigned long long *a2)
{
long long result; // rax
if ( *a2 > a1 || a2[2] <= a1 )
return free(a1);
result = *(int *)(a1 + 8);
if ( result <= 15 )
{
*(_QWORD *)a1 = a2[result + 3];
a2[result + 3] = a1;
}
return result;
}
| Bfree:
PUSH RBP
MOV RBP,RSP
CMP qword ptr [RSI],RDI
JA 0x0015fcd5
CMP qword ptr [RSI + 0x10],RDI
JBE 0x0015fcd5
MOVSXD RAX,dword ptr [RDI + 0x8]
CMP RAX,0xf
JG 0x0015fcd3
MOV RCX,qword ptr [RSI + RAX*0x8 + 0x18]
MOV qword ptr [RDI],RCX
MOV qword ptr [RSI + RAX*0x8 + 0x18],RDI
LAB_0015fcd3:
POP RBP
RET
LAB_0015fcd5:
POP RBP
JMP 0x00124470
|
void Bfree(ulong *param_1,ulong *param_2)
{
long lVar1;
if (((ulong *)*param_2 <= param_1) && (param_1 < (ulong *)param_2[2])) {
lVar1 = (long)(int)param_1[1];
if (lVar1 < 0x10) {
*param_1 = param_2[lVar1 + 3];
param_2[lVar1 + 3] = (ulong)param_1;
}
return;
}
free(param_1);
return;
}
| |
21,597 | js_callsite_mark | bluesky950520[P]quickjs/quickjs.c | static void js_callsite_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func)
{
JSCallSiteData *csd = JS_GetOpaque(val, JS_CLASS_CALL_SITE);
if (csd) {
JS_MarkValue(rt, csd->filename, mark_func);
JS_MarkValue(rt, csd->func, mark_func);
JS_MarkValue(rt, csd->func_name, mark_func);
}
} | O1 | c | js_callsite_mark:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq %rsi, (%rsp)
cmpl $-0x1, %edx
jne 0x84816
movq (%rsp), %rax
cmpw $0x3c, 0x6(%rax)
jne 0x84816
movq 0x30(%rax), %r15
jmp 0x84819
xorl %r15d, %r15d
testq %r15, %r15
je 0x84883
movl $0xfffffffe, %r12d # imm = 0xFFFFFFFE
movsd (%r15), %xmm0
movl 0x8(%r15), %eax
movsd %xmm0, (%rsp)
andl $-0x2, %eax
cmpl %r12d, %eax
jne 0x84843
movq (%rsp), %rsi
movq %r14, %rdi
callq *%rbx
movsd 0x10(%r15), %xmm0
movl 0x18(%r15), %eax
movsd %xmm0, (%rsp)
andl $-0x2, %eax
cmpl %r12d, %eax
jne 0x84863
movq (%rsp), %rsi
movq %r14, %rdi
callq *%rbx
movsd 0x20(%r15), %xmm0
movl 0x28(%r15), %eax
movsd %xmm0, (%rsp)
andl $-0x2, %eax
cmpl %r12d, %eax
jne 0x84883
movq (%rsp), %rsi
movq %r14, %rdi
callq *%rbx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_callsite_mark:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdi
mov [rsp+28h+var_28], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_84816
mov rax, [rsp+28h+var_28]
cmp word ptr [rax+6], 3Ch ; '<'
jnz short loc_84816
mov r15, [rax+30h]
jmp short loc_84819
loc_84816:
xor r15d, r15d
loc_84819:
test r15, r15
jz short loc_84883
mov r12d, 0FFFFFFFEh
movsd xmm0, qword ptr [r15]
mov eax, [r15+8]
movsd [rsp+28h+var_28], xmm0
and eax, 0FFFFFFFEh
cmp eax, r12d
jnz short loc_84843
mov rsi, [rsp+28h+var_28]
mov rdi, r14
call rbx
loc_84843:
movsd xmm0, qword ptr [r15+10h]
mov eax, [r15+18h]
movsd [rsp+28h+var_28], xmm0
and eax, 0FFFFFFFEh
cmp eax, r12d
jnz short loc_84863
mov rsi, [rsp+28h+var_28]
mov rdi, r14
call rbx
loc_84863:
movsd xmm0, qword ptr [r15+20h]
mov eax, [r15+28h]
movsd [rsp+28h+var_28], xmm0
and eax, 0FFFFFFFEh
cmp eax, r12d
jnz short loc_84883
mov rsi, [rsp+28h+var_28]
mov rdi, r14
call rbx
loc_84883:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_callsite_mark(long long a1, long long a2, int a3, void ( *a4)(long long, _QWORD))
{
long long result; // rax
long long v6; // r15
if ( a3 == -1 && (result = a2, *(_WORD *)(a2 + 6) == 60) )
v6 = *(_QWORD *)(a2 + 48);
else
v6 = 0LL;
if ( v6 )
{
if ( (*(_DWORD *)(v6 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE )
a4(a1, *(_QWORD *)v6);
if ( (*(_DWORD *)(v6 + 24) & 0xFFFFFFFE) == 0xFFFFFFFE )
a4(a1, *(_QWORD *)(v6 + 16));
result = *(_DWORD *)(v6 + 40) & 0xFFFFFFFE;
if ( (_DWORD)result == -2 )
return ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v6 + 32));
}
return result;
}
| js_callsite_mark:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDI
MOV qword ptr [RSP],RSI
CMP EDX,-0x1
JNZ 0x00184816
MOV RAX,qword ptr [RSP]
CMP word ptr [RAX + 0x6],0x3c
JNZ 0x00184816
MOV R15,qword ptr [RAX + 0x30]
JMP 0x00184819
LAB_00184816:
XOR R15D,R15D
LAB_00184819:
TEST R15,R15
JZ 0x00184883
MOV R12D,0xfffffffe
MOVSD XMM0,qword ptr [R15]
MOV EAX,dword ptr [R15 + 0x8]
MOVSD qword ptr [RSP],XMM0
AND EAX,0xfffffffe
CMP EAX,R12D
JNZ 0x00184843
MOV RSI,qword ptr [RSP]
MOV RDI,R14
CALL RBX
LAB_00184843:
MOVSD XMM0,qword ptr [R15 + 0x10]
MOV EAX,dword ptr [R15 + 0x18]
MOVSD qword ptr [RSP],XMM0
AND EAX,0xfffffffe
CMP EAX,R12D
JNZ 0x00184863
MOV RSI,qword ptr [RSP]
MOV RDI,R14
CALL RBX
LAB_00184863:
MOVSD XMM0,qword ptr [R15 + 0x20]
MOV EAX,dword ptr [R15 + 0x28]
MOVSD qword ptr [RSP],XMM0
AND EAX,0xfffffffe
CMP EAX,R12D
JNZ 0x00184883
MOV RSI,qword ptr [RSP]
MOV RDI,R14
CALL RBX
LAB_00184883:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void js_callsite_mark(int8 param_1,long param_2,int param_3,code *param_4)
{
int8 *puVar1;
if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3c)) {
puVar1 = *(int8 **)(param_2 + 0x30);
}
else {
puVar1 = (int8 *)0x0;
}
if (puVar1 != (int8 *)0x0) {
if ((*(uint *)(puVar1 + 1) & 0xfffffffe) == 0xfffffffe) {
(*param_4)(param_1,*puVar1);
}
if ((*(uint *)(puVar1 + 3) & 0xfffffffe) == 0xfffffffe) {
(*param_4)(param_1,puVar1[2]);
}
if ((*(uint *)(puVar1 + 5) & 0xfffffffe) == 0xfffffffe) {
(*param_4)(param_1,puVar1[4]);
}
}
return;
}
| |
21,598 | js_callsite_mark | bluesky950520[P]quickjs/quickjs.c | static void js_callsite_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func)
{
JSCallSiteData *csd = JS_GetOpaque(val, JS_CLASS_CALL_SITE);
if (csd) {
JS_MarkValue(rt, csd->filename, mark_func);
JS_MarkValue(rt, csd->func, mark_func);
JS_MarkValue(rt, csd->func_name, mark_func);
}
} | O2 | c | js_callsite_mark:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x6f391
cmpw $0x3c, 0x6(%rsi)
jne 0x6f391
movq 0x30(%rsi), %r14
testq %r14, %r14
je 0x6f391
movq %rdi, %rbx
movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE
movl 0x8(%r14), %eax
andl $-0x2, %eax
cmpl %r15d, %eax
jne 0x6f356
movq (%r14), %rsi
movq %rbx, %rdi
movq %rcx, %r12
callq *%rcx
movq %r12, %rcx
movl 0x18(%r14), %eax
andl $-0x2, %eax
cmpl %r15d, %eax
jne 0x6f371
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %rcx, %r12
callq *%rcx
movq %r12, %rcx
movl 0x28(%r14), %eax
andl $-0x2, %eax
cmpl %r15d, %eax
jne 0x6f391
movq 0x20(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_callsite_mark:
push r15
push r14
push r12
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz short loc_6F391
cmp word ptr [rsi+6], 3Ch ; '<'
jnz short loc_6F391
mov r14, [rsi+30h]
test r14, r14
jz short loc_6F391
mov rbx, rdi
mov r15d, 0FFFFFFFEh
mov eax, [r14+8]
and eax, 0FFFFFFFEh
cmp eax, r15d
jnz short loc_6F356
mov rsi, [r14]
mov rdi, rbx
mov r12, rcx
call rcx
mov rcx, r12
loc_6F356:
mov eax, [r14+18h]
and eax, 0FFFFFFFEh
cmp eax, r15d
jnz short loc_6F371
mov rsi, [r14+10h]
mov rdi, rbx
mov r12, rcx
call rcx
mov rcx, r12
loc_6F371:
mov eax, [r14+28h]
and eax, 0FFFFFFFEh
cmp eax, r15d
jnz short loc_6F391
mov rsi, [r14+20h]
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp rcx
loc_6F391:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_callsite_mark(long long a1, long long a2, int a3, void ( *a4)(_QWORD, _QWORD))
{
long long v4; // r14
void ( *v5)(_QWORD, _QWORD); // r12
void ( *v6)(_QWORD, _QWORD); // r12
long long result; // rax
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 60 )
{
v4 = *(_QWORD *)(a2 + 48);
if ( v4 )
{
if ( (*(_DWORD *)(v4 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE )
{
v5 = a4;
a4(a1, *(_QWORD *)v4);
a4 = v5;
}
if ( (*(_DWORD *)(v4 + 24) & 0xFFFFFFFE) == 0xFFFFFFFE )
{
v6 = a4;
a4(a1, *(_QWORD *)(v4 + 16));
a4 = v6;
}
result = *(_DWORD *)(v4 + 40) & 0xFFFFFFFE;
if ( (_DWORD)result == -2 )
return ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v4 + 32));
}
}
return result;
}
| js_callsite_mark:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x0016f391
CMP word ptr [RSI + 0x6],0x3c
JNZ 0x0016f391
MOV R14,qword ptr [RSI + 0x30]
TEST R14,R14
JZ 0x0016f391
MOV RBX,RDI
MOV R15D,0xfffffffe
MOV EAX,dword ptr [R14 + 0x8]
AND EAX,0xfffffffe
CMP EAX,R15D
JNZ 0x0016f356
MOV RSI,qword ptr [R14]
MOV RDI,RBX
MOV R12,RCX
CALL RCX
MOV RCX,R12
LAB_0016f356:
MOV EAX,dword ptr [R14 + 0x18]
AND EAX,0xfffffffe
CMP EAX,R15D
JNZ 0x0016f371
MOV RSI,qword ptr [R14 + 0x10]
MOV RDI,RBX
MOV R12,RCX
CALL RCX
MOV RCX,R12
LAB_0016f371:
MOV EAX,dword ptr [R14 + 0x28]
AND EAX,0xfffffffe
CMP EAX,R15D
JNZ 0x0016f391
MOV RSI,qword ptr [R14 + 0x20]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP RCX
LAB_0016f391:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void js_callsite_mark(int8 param_1,long param_2,int param_3,code *UNRECOVERED_JUMPTABLE)
{
int8 *puVar1;
int4 extraout_EDX;
int4 extraout_EDX_00;
int4 uVar2;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3c)) &&
(puVar1 = *(int8 **)(param_2 + 0x30), puVar1 != (int8 *)0x0)) {
uVar2 = 0xffffffff;
if ((*(uint *)(puVar1 + 1) & 0xfffffffe) == 0xfffffffe) {
(*UNRECOVERED_JUMPTABLE)(param_1,*puVar1);
uVar2 = extraout_EDX;
}
if ((*(uint *)(puVar1 + 3) & 0xfffffffe) == 0xfffffffe) {
(*UNRECOVERED_JUMPTABLE)(param_1,puVar1[2]);
uVar2 = extraout_EDX_00;
}
if ((*(uint *)(puVar1 + 5) & 0xfffffffe) == 0xfffffffe) {
/* WARNING: Could not recover jumptable at 0x0016f38f. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(param_1,puVar1[4],uVar2,UNRECOVERED_JUMPTABLE);
return;
}
}
return;
}
| |
21,599 | my_wc_mb_euc_kr | eloqsql/strings/ctype-euc_kr.c | static int
my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_ksc5601_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O3 | c | my_wc_mb_euc_kr:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x8dce6
cmpl $0x7f, %esi
ja 0x8dce7
movb %sil, (%rdx)
movl $0x1, %eax
retq
leal -0xa1(%rsi), %eax
cmpl $0xc6, %eax
ja 0x8dd02
movl %eax, %eax
leaq 0x9fc03(%rip), %rsi # 0x12d900
jmp 0x8ddfa
leal -0x2c7(%rsi), %eax
cmpl $0x18a, %eax # imm = 0x18A
ja 0x8dd1d
movl %eax, %eax
leaq 0x9fd78(%rip), %rsi # 0x12da90
jmp 0x8ddfa
leal -0x2015(%rsi), %eax
cmpl $0x2fd, %eax # imm = 0x2FD
ja 0x8dd38
movl %eax, %eax
leaq 0xa007d(%rip), %rsi # 0x12ddb0
jmp 0x8ddfa
leal -0x2460(%rsi), %eax
cmpl $0x20d, %eax # imm = 0x20D
ja 0x8dd53
movl %eax, %eax
leaq 0xa0662(%rip), %rsi # 0x12e3b0
jmp 0x8ddfa
leal -0x3000(%rsi), %eax
cmpl $0x27f, %eax # imm = 0x27F
ja 0x8dd6e
movl %eax, %eax
leaq 0xa0a67(%rip), %rsi # 0x12e7d0
jmp 0x8ddfa
leal -0x3380(%rsi), %eax
cmpl $0x5d, %eax
ja 0x8dd84
movl %eax, %eax
leaq 0xa0f4e(%rip), %rsi # 0x12ecd0
jmp 0x8ddfa
leal -0x4e00(%rsi), %eax
cmpl $0x467f, %eax # imm = 0x467F
ja 0x8dd9c
movl %eax, %eax
leaq 0xa0ff6(%rip), %rsi # 0x12ed90
jmp 0x8ddfa
leal -0x9577(%rsi), %eax
cmpl $0xa25, %eax # imm = 0xA25
ja 0x8ddb4
movl %eax, %eax
leaq 0xa9cde(%rip), %rsi # 0x137a90
jmp 0x8ddfa
leal -0xac00(%rsi), %eax
cmpl $0x2ba3, %eax # imm = 0x2BA3
ja 0x8ddcc
movl %eax, %eax
leaq 0xab116(%rip), %rsi # 0x138ee0
jmp 0x8ddfa
leal -0xf900(%rsi), %eax
cmpl $0x10b, %eax # imm = 0x10B
ja 0x8dde4
movl %eax, %eax
leaq 0xb084e(%rip), %rsi # 0x13e630
jmp 0x8ddfa
leal -0xff01(%rsi), %eax
cmpl $0xe5, %eax
ja 0x8de2a
movl %eax, %eax
leaq 0xb0a56(%rip), %rsi # 0x13e850
leaq (%rsi,%rax,2), %rax
pushq %rbp
movq %rsp, %rbp
movzwl (%rax), %esi
testw %si, %si
je 0x8de26
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x8de28
rolw $0x8, %si
movw %si, (%rdx)
movl $0x2, %eax
jmp 0x8de28
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
| my_wc_mb_euc_kr:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_8DCE6
cmp esi, 7Fh
ja short loc_8DCE7
mov [rdx], sil
mov eax, 1
locret_8DCE6:
retn
loc_8DCE7:
lea eax, [rsi-0A1h]
cmp eax, 0C6h
ja short loc_8DD02
mov eax, eax
lea rsi, tab_uni_ksc56010
jmp loc_8DDFA
loc_8DD02:
lea eax, [rsi-2C7h]
cmp eax, 18Ah
ja short loc_8DD1D
mov eax, eax
lea rsi, tab_uni_ksc56011
jmp loc_8DDFA
loc_8DD1D:
lea eax, [rsi-2015h]
cmp eax, 2FDh
ja short loc_8DD38
mov eax, eax
lea rsi, tab_uni_ksc56012
jmp loc_8DDFA
loc_8DD38:
lea eax, [rsi-2460h]
cmp eax, 20Dh
ja short loc_8DD53
mov eax, eax
lea rsi, tab_uni_ksc56013
jmp loc_8DDFA
loc_8DD53:
lea eax, [rsi-3000h]
cmp eax, 27Fh
ja short loc_8DD6E
mov eax, eax
lea rsi, tab_uni_ksc56014
jmp loc_8DDFA
loc_8DD6E:
lea eax, [rsi-3380h]
cmp eax, 5Dh ; ']'
ja short loc_8DD84
mov eax, eax
lea rsi, tab_uni_ksc56015
jmp short loc_8DDFA
loc_8DD84:
lea eax, [rsi-4E00h]
cmp eax, 467Fh
ja short loc_8DD9C
mov eax, eax
lea rsi, tab_uni_ksc56016
jmp short loc_8DDFA
loc_8DD9C:
lea eax, [rsi-9577h]
cmp eax, 0A25h
ja short loc_8DDB4
mov eax, eax
lea rsi, tab_uni_ksc56017
jmp short loc_8DDFA
loc_8DDB4:
lea eax, [rsi-0AC00h]
cmp eax, 2BA3h
ja short loc_8DDCC
mov eax, eax
lea rsi, tab_uni_ksc56018
jmp short loc_8DDFA
loc_8DDCC:
lea eax, [rsi-0F900h]
cmp eax, 10Bh
ja short loc_8DDE4
mov eax, eax
lea rsi, tab_uni_ksc56019
jmp short loc_8DDFA
loc_8DDE4:
lea eax, [rsi-0FF01h]
cmp eax, 0E5h
ja short loc_8DE2A
mov eax, eax
lea rsi, tab_uni_ksc560110
loc_8DDFA:
lea rax, [rsi+rax*2]
push rbp
mov rbp, rsp
movzx esi, word ptr [rax]
test si, si
jz short loc_8DE26
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_8DE28
rol si, 8
mov [rdx], si
mov eax, 2
jmp short loc_8DE28
loc_8DE26:
xor eax, eax
loc_8DE28:
pop rbp
retn
loc_8DE2A:
xor eax, eax
retn
| long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
_WORD *v6; // rsi
__int16 v7; // si
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
if ( a2 > 0x7F )
{
LODWORD(v5) = a2 - 161;
if ( a2 - 161 > 0xC6 )
{
LODWORD(v5) = a2 - 711;
if ( a2 - 711 > 0x18A )
{
LODWORD(v5) = a2 - 8213;
if ( a2 - 8213 > 0x2FD )
{
LODWORD(v5) = a2 - 9312;
if ( a2 - 9312 > 0x20D )
{
LODWORD(v5) = a2 - 12288;
if ( a2 - 12288 > 0x27F )
{
LODWORD(v5) = a2 - 13184;
if ( a2 - 13184 > 0x5D )
{
LODWORD(v5) = a2 - 19968;
if ( a2 - 19968 > 0x467F )
{
LODWORD(v5) = a2 - 38263;
if ( a2 - 38263 > 0xA25 )
{
LODWORD(v5) = a2 - 44032;
if ( a2 - 44032 > 0x2BA3 )
{
LODWORD(v5) = a2 - 63744;
if ( a2 - 63744 > 0x10B )
{
LODWORD(v5) = a2 - 65281;
if ( a2 - 65281 > 0xE5 )
return 0LL;
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc560110;
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56019;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56018;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56017;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56016;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56015;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56014;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56013;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56012;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56011;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56010;
}
v7 = v6[v5];
if ( v7 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
*a3 = __ROL2__(v7, 8);
return 2LL;
}
}
else
{
return 0LL;
}
}
else
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
| my_wc_mb_euc_kr:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0018dce6
CMP ESI,0x7f
JA 0x0018dce7
MOV byte ptr [RDX],SIL
MOV EAX,0x1
LAB_0018dce6:
RET
LAB_0018dce7:
LEA EAX,[RSI + -0xa1]
CMP EAX,0xc6
JA 0x0018dd02
MOV EAX,EAX
LEA RSI,[0x22d900]
JMP 0x0018ddfa
LAB_0018dd02:
LEA EAX,[RSI + -0x2c7]
CMP EAX,0x18a
JA 0x0018dd1d
MOV EAX,EAX
LEA RSI,[0x22da90]
JMP 0x0018ddfa
LAB_0018dd1d:
LEA EAX,[RSI + -0x2015]
CMP EAX,0x2fd
JA 0x0018dd38
MOV EAX,EAX
LEA RSI,[0x22ddb0]
JMP 0x0018ddfa
LAB_0018dd38:
LEA EAX,[RSI + -0x2460]
CMP EAX,0x20d
JA 0x0018dd53
MOV EAX,EAX
LEA RSI,[0x22e3b0]
JMP 0x0018ddfa
LAB_0018dd53:
LEA EAX,[RSI + -0x3000]
CMP EAX,0x27f
JA 0x0018dd6e
MOV EAX,EAX
LEA RSI,[0x22e7d0]
JMP 0x0018ddfa
LAB_0018dd6e:
LEA EAX,[RSI + -0x3380]
CMP EAX,0x5d
JA 0x0018dd84
MOV EAX,EAX
LEA RSI,[0x22ecd0]
JMP 0x0018ddfa
LAB_0018dd84:
LEA EAX,[RSI + -0x4e00]
CMP EAX,0x467f
JA 0x0018dd9c
MOV EAX,EAX
LEA RSI,[0x22ed90]
JMP 0x0018ddfa
LAB_0018dd9c:
LEA EAX,[RSI + -0x9577]
CMP EAX,0xa25
JA 0x0018ddb4
MOV EAX,EAX
LEA RSI,[0x237a90]
JMP 0x0018ddfa
LAB_0018ddb4:
LEA EAX,[RSI + -0xac00]
CMP EAX,0x2ba3
JA 0x0018ddcc
MOV EAX,EAX
LEA RSI,[0x238ee0]
JMP 0x0018ddfa
LAB_0018ddcc:
LEA EAX,[RSI + -0xf900]
CMP EAX,0x10b
JA 0x0018dde4
MOV EAX,EAX
LEA RSI,[0x23e630]
JMP 0x0018ddfa
LAB_0018dde4:
LEA EAX,[RSI + -0xff01]
CMP EAX,0xe5
JA 0x0018de2a
MOV EAX,EAX
LEA RSI,[0x23e850]
LAB_0018ddfa:
LEA RAX,[RSI + RAX*0x2]
PUSH RBP
MOV RBP,RSP
MOVZX ESI,word ptr [RAX]
TEST SI,SI
JZ 0x0018de26
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x0018de28
ROL SI,0x8
MOV word ptr [RDX],SI
MOV EAX,0x2
JMP 0x0018de28
LAB_0018de26:
XOR EAX,EAX
LAB_0018de28:
POP RBP
RET
LAB_0018de2a:
XOR EAX,EAX
RET
|
int8 my_wc_mb_euc_kr(int8 param_1,uint param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
int8 uVar2;
ulong uVar3;
int1 *puVar4;
uVar2 = 0xffffff9b;
if (param_3 < param_4) {
if (0x7f < param_2) {
if (param_2 - 0xa1 < 199) {
uVar3 = (ulong)(param_2 - 0xa1);
puVar4 = tab_uni_ksc56010;
}
else if (param_2 - 0x2c7 < 0x18b) {
uVar3 = (ulong)(param_2 - 0x2c7);
puVar4 = tab_uni_ksc56011;
}
else if (param_2 - 0x2015 < 0x2fe) {
uVar3 = (ulong)(param_2 - 0x2015);
puVar4 = tab_uni_ksc56012;
}
else if (param_2 - 0x2460 < 0x20e) {
uVar3 = (ulong)(param_2 - 0x2460);
puVar4 = tab_uni_ksc56013;
}
else if (param_2 - 0x3000 < 0x280) {
uVar3 = (ulong)(param_2 - 0x3000);
puVar4 = tab_uni_ksc56014;
}
else if (param_2 - 0x3380 < 0x5e) {
uVar3 = (ulong)(param_2 - 0x3380);
puVar4 = tab_uni_ksc56015;
}
else if (param_2 - 0x4e00 < 0x4680) {
uVar3 = (ulong)(param_2 - 0x4e00);
puVar4 = tab_uni_ksc56016;
}
else if (param_2 - 0x9577 < 0xa26) {
uVar3 = (ulong)(param_2 - 0x9577);
puVar4 = tab_uni_ksc56017;
}
else if (param_2 - 0xac00 < 0x2ba4) {
uVar3 = (ulong)(param_2 - 0xac00);
puVar4 = tab_uni_ksc56018;
}
else if (param_2 - 0xf900 < 0x10c) {
uVar3 = (ulong)(param_2 - 0xf900);
puVar4 = tab_uni_ksc56019;
}
else {
uVar3 = (ulong)(param_2 - 0xff01);
if (0xe5 < param_2 - 0xff01) {
return 0;
}
puVar4 = tab_uni_ksc560110;
}
uVar1 = *(ushort *)(puVar4 + uVar3 * 2);
if (uVar1 == 0) {
uVar2 = 0;
}
else {
uVar2 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
*param_3 = uVar1 << 8 | uVar1 >> 8;
uVar2 = 2;
}
}
return uVar2;
}
*(char *)param_3 = (char)param_2;
uVar2 = 1;
}
return uVar2;
}
|
Subsets and Splits
C++ Functions Using STL
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++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
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.