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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
26,700 | SchemaConverter::format_grammar[abi:cxx11]() | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string format_grammar() {
std::stringstream ss;
for (const auto & kv : _rules) {
ss << kv.first << " ::= " << kv.second << std::endl;
}
return ss.str();
} | O3 | cpp | SchemaConverter::format_grammar[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x1a500
movq 0x40(%r14), %r15
addq $0x30, %r14
cmpq %r14, %r15
je 0x9ee93
leaq 0x10(%rsp), %r12
leaq 0x18a3f(%rip), %r13 # 0xb7865
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
movq %r12, %rdi
callq 0x1a870
movq %rax, %rbp
movl $0x5, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x1a870
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
movq %rbp, %rdi
callq 0x1a870
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x1a6e0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x1a050
movq %rax, %rdi
callq 0x1a4e0
movq %r15, %rdi
callq 0x1a4f0
movq %rax, %r15
cmpq %r14, %rax
jne 0x9ee26
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x1abc0
movq 0x44091(%rip), %rsi # 0xe2f38
movq %rsp, %rdi
callq 0x1a540
leaq 0x80(%rsp), %rdi
callq 0x1a220
movq %rbx, %rax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9eed3
movq %rax, %rbx
movq 0x4405b(%rip), %rsi # 0xe2f38
movq %rsp, %rdi
callq 0x1a540
leaq 0x80(%rsp), %rdi
callq 0x1a220
movq %rbx, %rdi
callq 0x1ad30
| _ZN15SchemaConverter14format_grammarB5cxx11Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 188h
mov r14, rsi
mov rbx, rdi
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
mov r15, [r14+40h]
add r14, 30h ; '0'
cmp r15, r14
jz short loc_9EE93
lea r12, [rsp+1B8h+var_1A8]
lea r13, asc_B7865; " ::= "
loc_9EE26:
mov rsi, [r15+20h]
mov rdx, [r15+28h]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbp, rax
mov edx, 5
mov rdi, rax
mov rsi, r13
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, [r15+40h]
mov rdx, [r15+48h]
mov rdi, rbp
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbp, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, rbp
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbp; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rdi, r15
call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *)
mov r15, rax
cmp rax, r14
jnz short loc_9EE26
loc_9EE93:
lea rsi, [rsp+1B8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1B8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_9EED3:
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_78]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2)
{
_QWORD *i; // r15
long long v3; // rbp
std::ostream *v4; // rbp
char v5; // al
std::ostream *v6; // rax
_BYTE v8[16]; // [rsp+0h] [rbp-1B8h] BYREF
_BYTE v9[8]; // [rsp+10h] [rbp-1A8h] BYREF
_BYTE v10[104]; // [rsp+18h] [rbp-1A0h] BYREF
_BYTE v11[312]; // [rsp+80h] [rbp-138h] BYREF
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v8);
for ( i = *(_QWORD **)(a2 + 64); i != (_QWORD *)(a2 + 48); i = (_QWORD *)std::_Rb_tree_increment(i) )
{
v3 = std::__ostream_insert<char,std::char_traits<char>>(v9, i[4], i[5]);
std::__ostream_insert<char,std::char_traits<char>>(v3, " ::= ", 5LL);
v4 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v3, i[8], i[9]);
v5 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL);
v6 = (std::ostream *)std::ostream::put(v4, v5);
std::ostream::flush(v6);
}
std::stringbuf::str(a1, v10);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v8,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v11);
return a1;
}
| format_grammar[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x188
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x0011a500
MOV R15,qword ptr [R14 + 0x40]
ADD R14,0x30
CMP R15,R14
JZ 0x0019ee93
LEA R12,[RSP + 0x10]
LEA R13,[0x1b7865]
LAB_0019ee26:
MOV RSI,qword ptr [R15 + 0x20]
MOV RDX,qword ptr [R15 + 0x28]
LAB_0019ee2e:
MOV RDI,R12
CALL 0x0011a870
MOV RBP,RAX
MOV EDX,0x5
MOV RDI,RAX
MOV RSI,R13
CALL 0x0011a870
MOV RSI,qword ptr [R15 + 0x40]
MOV RDX,qword ptr [R15 + 0x48]
MOV RDI,RBP
CALL 0x0011a870
MOV RBP,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBP
MOV ESI,0xa
CALL 0x0011a6e0
MOVSX ESI,AL
MOV RDI,RBP
CALL 0x0011a050
MOV RDI,RAX
CALL 0x0011a4e0
MOV RDI,R15
CALL 0x0011a4f0
MOV R15,RAX
CMP RAX,R14
JNZ 0x0019ee26
LAB_0019ee93:
LEA RSI,[RSP + 0x18]
LAB_0019ee98:
MOV RDI,RBX
CALL 0x0011abc0
LAB_0019eea0:
MOV RSI,qword ptr [0x001e2f38]
MOV RDI,RSP
CALL 0x0011a540
LEA RDI,[RSP + 0x80]
CALL 0x0011a220
MOV RAX,RBX
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::format_grammar[abi:cxx11]() */
void SchemaConverter::format_grammar_abi_cxx11_(void)
{
ostream *poVar1;
_Rb_tree_node_base *p_Var2;
long in_RSI;
stringstream asStack_1b8 [16];
ostream local_1a8 [112];
ios_base local_138 [264];
std::__cxx11::stringstream::stringstream(asStack_1b8);
p_Var2 = *(_Rb_tree_node_base **)(in_RSI + 0x40);
if (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30)) {
do {
/* try { // try from 0019ee2e to 0019ee82 has its CatchHandler @ 0019eed3 */
poVar1 = std::__ostream_insert<char,std::char_traits<char>>
(local_1a8,*(char **)(p_Var2 + 0x20),*(long *)(p_Var2 + 0x28));
std::__ostream_insert<char,std::char_traits<char>>(poVar1," ::= ",5);
poVar1 = std::__ostream_insert<char,std::char_traits<char>>
(poVar1,*(char **)(p_Var2 + 0x40),*(long *)(p_Var2 + 0x48));
std::ios::widen((char)*(int8 *)(*(long *)poVar1 + -0x18) + (char)poVar1);
std::ostream::put((char)poVar1);
std::ostream::flush();
p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2);
} while (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30));
}
/* try { // try from 0019ee98 to 0019ee9f has its CatchHandler @ 0019eed1 */
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(asStack_1b8);
std::ios_base::~ios_base(local_138);
return;
}
| |
26,701 | ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::Render(ftxui::Screen&) | Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/automerge.cpp | void Render(Screen& screen) override {
for (int y = box_.y_min; y <= box_.y_max; ++y) {
for (int x = box_.x_min; x <= box_.x_max; ++x) {
screen.PixelAt(x, y).automerge = true;
}
}
Node::Render(screen);
} | O0 | cpp | ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::Render(ftxui::Screen&):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl 0x54(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x58(%rcx), %eax
jg 0x7ead1
movq -0x20(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x50(%rcx), %eax
jg 0x7eac4
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x882f0
movb (%rax), %cl
andb $0x7f, %cl
orb $-0x80, %cl
movb %cl, (%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7ea94
jmp 0x7eac6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7ea7e
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x446a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZZN5ftxui9automergeESt10shared_ptrINS_4NodeEEEN4Impl6RenderERNS_6ScreenE:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov eax, [rax+54h]
mov [rbp+var_14], eax
loc_7EA7E:
mov rcx, [rbp+var_20]
mov eax, [rbp+var_14]
cmp eax, [rcx+58h]
jg short loc_7EAD1
mov rax, [rbp+var_20]
mov eax, [rax+4Ch]
mov [rbp+var_18], eax
loc_7EA94:
mov rcx, [rbp+var_20]
mov eax, [rbp+var_18]
cmp eax, [rcx+50h]
jg short loc_7EAC4
mov rdi, [rbp+var_10]; this
mov esi, [rbp+var_18]; int
mov edx, [rbp+var_14]; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
mov cl, [rax]
and cl, 7Fh
or cl, 80h
mov [rax], cl
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
jmp short loc_7EA94
loc_7EAC4:
jmp short $+2
loc_7EAC6:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_7EA7E
loc_7EAD1:
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_10]; ftxui::Screen *
call _ZN5ftxui4Node6RenderERNS_6ScreenE; ftxui::Node::Render(ftxui::Screen &)
add rsp, 20h
pop rbp
retn
| bool ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::Render(ftxui::Node *a1, ftxui::Screen *a2)
{
_BYTE *v2; // rax
int j; // [rsp+8h] [rbp-18h]
int i; // [rsp+Ch] [rbp-14h]
for ( i = *((_DWORD *)a1 + 21); i <= *((_DWORD *)a1 + 22); ++i )
{
for ( j = *((_DWORD *)a1 + 19); j <= *((_DWORD *)a1 + 20); ++j )
{
v2 = (_BYTE *)ftxui::Screen::PixelAt(a2, j, i);
*v2 = *v2 & 0x7F | 0x80;
}
}
return ftxui::Node::Render(a1, a2);
}
| Screen&):
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RAX + 0x54]
MOV dword ptr [RBP + -0x14],EAX
LAB_0017ea7e:
MOV RCX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RCX + 0x58]
JG 0x0017ead1
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4c]
MOV dword ptr [RBP + -0x18],EAX
LAB_0017ea94:
MOV RCX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RCX + 0x50]
JG 0x0017eac4
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x14]
CALL 0x001882f0
MOV CL,byte ptr [RAX]
AND CL,0x7f
OR CL,0x80
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0017ea94
LAB_0017eac4:
JMP 0x0017eac6
LAB_0017eac6:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0017ea7e
LAB_0017ead1:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001446a0
ADD RSP,0x20
POP RBP
RET
|
/* ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::Render(ftxui::Screen&) */
void ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::Render(ftxui::Screen__
(Node *param_1,Screen *param_2)
{
byte *pbVar1;
int local_20;
int local_1c;
for (local_1c = *(int *)(param_1 + 0x54); local_1c <= *(int *)(param_1 + 0x58);
local_1c = local_1c + 1) {
for (local_20 = *(int *)(param_1 + 0x4c); local_20 <= *(int *)(param_1 + 0x50);
local_20 = local_20 + 1) {
pbVar1 = (byte *)Screen::PixelAt(param_2,local_20,local_1c);
*pbVar1 = *pbVar1 & 0x7f | 0x80;
}
}
Node::Render(param_1,param_2);
return;
}
| |
26,702 | js_malloc | bluesky950520[P]quickjs/quickjs.c | void *js_malloc(JSContext *ctx, size_t size)
{
void *ptr;
ptr = js_malloc_rt(ctx->rt, size);
if (unlikely(!ptr)) {
JS_ThrowOutOfMemory(ctx);
return NULL;
}
return ptr;
} | O0 | c | js_malloc:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x205d0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x20a51
movq 0x28(%rsp), %rdi
callq 0x20950
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq $0x0, 0x30(%rsp)
jmp 0x20a5b
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| js_malloc:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rax, [rsp+38h+var_10]
mov rdi, [rax+18h]
mov rsi, [rsp+38h+var_18]
call js_malloc_rt
mov [rsp+38h+var_20], rax
cmp [rsp+38h+var_20], 0
setnz al
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_20A51
mov rdi, [rsp+38h+var_10]
call JS_ThrowOutOfMemory
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_28], rdx
mov [rsp+38h+var_8], 0
jmp short loc_20A5B
loc_20A51:
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_8], rax
loc_20A5B:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
| long long js_malloc(long long a1, long long a2)
{
int v2; // edx
long long v3; // rcx
int v4; // r8d
int v5; // r9d
long long v7; // [rsp+18h] [rbp-20h]
v7 = js_malloc_rt(*(_QWORD *)(a1 + 24), a2);
if ( v7 )
return v7;
JS_ThrowOutOfMemory(a1, a2, v2, v3, v4, v5);
return 0LL;
}
| js_malloc:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001205d0
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00120a51
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00120950
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x30],0x0
JMP 0x00120a5b
LAB_00120a51:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x30],RAX
LAB_00120a5b:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
long js_malloc(long param_1,int8 param_2)
{
long local_8;
local_8 = js_malloc_rt(*(int8 *)(param_1 + 0x18),param_2);
if (local_8 == 0) {
JS_ThrowOutOfMemory(param_1);
local_8 = 0;
}
return local_8;
}
| |
26,703 | js_malloc | bluesky950520[P]quickjs/quickjs.c | void *js_malloc(JSContext *ctx, size_t size)
{
void *ptr;
ptr = js_malloc_rt(ctx->rt, size);
if (unlikely(!ptr)) {
JS_ThrowOutOfMemory(ctx);
return NULL;
}
return ptr;
} | O1 | c | js_malloc:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0xece0
testq %rax, %rax
je 0xed71
popq %rbx
retq
movq %rbx, %rdi
callq 0x1bf4f
xorl %eax, %eax
jmp 0xed6f
| js_malloc:
push rbx
mov rbx, rdi
mov rdi, [rdi+18h]
call js_malloc_rt
test rax, rax
jz short loc_ED71
loc_ED6F:
pop rbx
retn
loc_ED71:
mov rdi, rbx
call JS_ThrowOutOfMemory
xor eax, eax
jmp short loc_ED6F
| long long js_malloc(long long a1, long long a2)
{
long long result; // rax
result = js_malloc_rt(*(_QWORD *)(a1 + 24), a2);
if ( !result )
{
JS_ThrowOutOfMemory(a1);
return 0LL;
}
return result;
}
| js_malloc:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
CALL 0x0010ece0
TEST RAX,RAX
JZ 0x0010ed71
LAB_0010ed6f:
POP RBX
RET
LAB_0010ed71:
MOV RDI,RBX
CALL 0x0011bf4f
XOR EAX,EAX
JMP 0x0010ed6f
|
long js_malloc(long param_1)
{
long lVar1;
lVar1 = js_malloc_rt(*(int8 *)(param_1 + 0x18));
if (lVar1 == 0) {
JS_ThrowOutOfMemory(param_1);
lVar1 = 0;
}
return lVar1;
}
| |
26,704 | js_malloc | bluesky950520[P]quickjs/quickjs.c | void *js_malloc(JSContext *ctx, size_t size)
{
void *ptr;
ptr = js_malloc_rt(ctx->rt, size);
if (unlikely(!ptr)) {
JS_ThrowOutOfMemory(ctx);
return NULL;
}
return ptr;
} | O3 | c | js_malloc:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0xecff
movq %rax, %r14
testq %rax, %rax
je 0xedac
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x1c80f
jmp 0xeda1
| js_malloc:
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+18h]
call js_malloc_rt
mov r14, rax
test rax, rax
jz short loc_EDAC
loc_EDA1:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_EDAC:
mov rdi, rbx
call JS_ThrowOutOfMemory
jmp short loc_EDA1
| long long js_malloc(long long a1, long long a2)
{
long long v2; // r14
v2 = js_malloc_rt(*(_QWORD *)(a1 + 24), a2);
if ( !v2 )
JS_ThrowOutOfMemory(a1);
return v2;
}
| js_malloc:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
CALL 0x0010ecff
MOV R14,RAX
TEST RAX,RAX
JZ 0x0010edac
LAB_0010eda1:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0010edac:
MOV RDI,RBX
CALL 0x0011c80f
JMP 0x0010eda1
|
long js_malloc(long param_1)
{
long lVar1;
lVar1 = js_malloc_rt(*(int8 *)(param_1 + 0x18));
if (lVar1 == 0) {
JS_ThrowOutOfMemory(param_1);
}
return lVar1;
}
| |
26,705 | link_block | eloqsql/storage/maria/ma_pagecache.c | static void link_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block,
my_bool hot, my_bool at_end)
{
PAGECACHE_BLOCK_LINK *ins;
PAGECACHE_BLOCK_LINK **ptr_ins;
DBUG_ENTER("link_block");
PCBLOCK_INFO(block);
KEYCACHE_DBUG_ASSERT(! (block->hash_link && block->hash_link->requests));
if (!hot && pagecache->waiting_for_block.last_thread)
{
/* Signal that in the LRU warm sub-chain an available block has appeared */
struct st_my_thread_var *last_thread=
pagecache->waiting_for_block.last_thread;
struct st_my_thread_var *first_thread= last_thread->next;
struct st_my_thread_var *next_thread= first_thread;
PAGECACHE_HASH_LINK *hash_link=
(PAGECACHE_HASH_LINK *) first_thread->keycache_link;
struct st_my_thread_var *thread;
DBUG_ASSERT(block->requests + block->wlocks + block->rlocks +
block->pins == 0);
DBUG_ASSERT(block->next_used == NULL);
do
{
thread= next_thread;
next_thread= thread->next;
/*
We notify about the event all threads that ask
for the same page as the first thread in the queue
*/
if ((PAGECACHE_HASH_LINK *) thread->keycache_link == hash_link)
{
DBUG_PRINT("signal", ("thread: %s %ld", thread->name,
(ulong) thread->id));
pagecache_pthread_cond_signal(&thread->suspend);
wqueue_unlink_from_queue(&pagecache->waiting_for_block, thread);
block->requests++;
}
}
while (thread != last_thread);
DBUG_PRINT("hash", ("hash_link (link block): %p, hash_link: %p -> %p",
hash_link, hash_link->block, block));
hash_link->block= block;
/* Ensure that no other thread tries to use this block */
block->status|= PCBLOCK_REASSIGNED;
DBUG_PRINT("signal", ("after signal"));
#if defined(PAGECACHE_DEBUG)
KEYCACHE_DBUG_PRINT("link_block",
("linked,unlinked block: %u status: %x #requests: %u #available: %u",
PCBLOCK_NUMBER(pagecache, block), block->status,
block->requests, pagecache->blocks_available));
#endif
DBUG_VOID_RETURN;
}
ptr_ins= hot ? &pagecache->used_ins : &pagecache->used_last;
ins= *ptr_ins;
if (ins)
{
ins->next_used->prev_used= &block->next_used;
block->next_used= ins->next_used;
block->prev_used= &ins->next_used;
ins->next_used= block;
if (at_end)
*ptr_ins= block;
}
else
{
/* The LRU chain is empty */
pagecache->used_last= pagecache->used_ins= block->next_used= block;
block->prev_used= &block->next_used;
}
KEYCACHE_THREAD_TRACE("link_block");
#if defined(PAGECACHE_DEBUG)
pagecache->blocks_available++;
KEYCACHE_DBUG_PRINT("link_block",
("linked block: %u:%1u status: %x #requests: %u #available: %u",
PCBLOCK_NUMBER(pagecache, block), at_end, block->status,
block->requests, pagecache->blocks_available));
KEYCACHE_DBUG_ASSERT(pagecache->blocks_available <=
pagecache->blocks_used);
#endif
DBUG_VOID_RETURN;
} | O3 | c | link_block:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testb %dl, %dl
je 0x3dba5
leaq 0xc0(%rdi), %r9
leaq 0xb8(%rdi), %r10
xorl %r8d, %r8d
testb %dl, %dl
setne %r8b
movq %r9, %rax
cmoveq %r10, %rax
movq 0xb8(%rdi,%r8,8), %rdx
testq %rdx, %rdx
je 0x3dc19
movq (%rdx), %rdi
movq %r14, 0x8(%rdi)
movq (%rdx), %rdi
movq %rdi, (%r14)
movq %rdx, 0x8(%r14)
movq %r14, (%rdx)
testb %cl, %cl
je 0x3dc31
movq %r14, (%rax)
jmp 0x3dc31
movq 0x120(%rdi), %r12
testq %r12, %r12
je 0x3db52
addq $0x120, %rdi # imm = 0x120
movq %rdi, -0x30(%rbp)
movq 0x88(%r12), %r15
movq 0xa8(%r15), %r13
movq 0x88(%r15), %rbx
cmpq %r13, 0xa8(%r15)
jne 0x3dbfd
movq 0x38(%r15), %rdi
testq %rdi, %rdi
jne 0x3dc07
leaq 0x8(%r15), %rdi
callq 0x295b0
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0xa6634
incl 0x60(%r14)
cmpq %r12, %r15
movq %rbx, %r15
jne 0x3dbcb
jmp 0x3dc28
leaq 0x348402(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x3dbe4
movq %r14, (%r14)
movq %r14, (%r9)
movq %r14, (%r10)
movq %r14, 0x8(%r14)
jmp 0x3dc31
movq %r14, 0x10(%r13)
orb $0x8, 0x74(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| link_block:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
test dl, dl
jz short loc_3DBA5
loc_3DB52:
lea r9, [rdi+0C0h]
lea r10, [rdi+0B8h]
xor r8d, r8d
test dl, dl
setnz r8b
mov rax, r9
cmovz rax, r10
mov rdx, [rdi+r8*8+0B8h]
test rdx, rdx
jz loc_3DC19
mov rdi, [rdx]
mov [rdi+8], r14
mov rdi, [rdx]
mov [r14], rdi
mov [r14+8], rdx
mov [rdx], r14
test cl, cl
jz loc_3DC31
mov [rax], r14
jmp loc_3DC31
loc_3DBA5:
mov r12, [rdi+120h]
test r12, r12
jz short loc_3DB52
add rdi, 120h
mov [rbp+var_30], rdi
mov r15, [r12+88h]
mov r13, [r15+0A8h]
loc_3DBCB:
mov rbx, [r15+88h]
cmp [r15+0A8h], r13
jnz short loc_3DBFD
mov rdi, [r15+38h]
test rdi, rdi
jnz short loc_3DC07
loc_3DBE4:
lea rdi, [r15+8]
call _pthread_cond_signal
mov rdi, [rbp+var_30]
mov rsi, r15
call wqueue_unlink_from_queue
inc dword ptr [r14+60h]
loc_3DBFD:
cmp r15, r12
mov r15, rbx
jnz short loc_3DBCB
jmp short loc_3DC28
loc_3DC07:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_3DBE4
loc_3DC19:
mov [r14], r14
mov [r9], r14
mov [r10], r14
mov [r14+8], r14
jmp short loc_3DC31
loc_3DC28:
mov [r13+10h], r14
or byte ptr [r14+74h], 8
loc_3DC31:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * link_block(_QWORD *a1, long long a2, char a3, char a4)
{
_QWORD *result; // rax
long long v5; // rdx
_QWORD *v6; // r12
_QWORD *v7; // r15
long long v8; // r13
_QWORD *v9; // rbx
bool v10; // zf
if ( a3 || (v6 = (_QWORD *)a1[36]) == 0LL )
{
result = a1 + 24;
if ( !a3 )
result = a1 + 23;
v5 = a1[(a3 != 0) + 23];
if ( v5 )
{
*(_QWORD *)(*(_QWORD *)v5 + 8LL) = a2;
*(_QWORD *)a2 = *(_QWORD *)v5;
*(_QWORD *)(a2 + 8) = v5;
*(_QWORD *)v5 = a2;
if ( a4 )
*result = a2;
}
else
{
*(_QWORD *)a2 = a2;
a1[24] = a2;
a1[23] = a2;
*(_QWORD *)(a2 + 8) = a2;
}
}
else
{
v7 = (_QWORD *)v6[17];
v8 = v7[21];
do
{
v9 = (_QWORD *)v7[17];
if ( v7[21] == v8 )
{
if ( v7[7] )
PSI_server[46]();
pthread_cond_signal(v7 + 1);
result = (_QWORD *)wqueue_unlink_from_queue(a1 + 36, v7);
++*(_DWORD *)(a2 + 96);
}
v10 = v7 == v6;
v7 = v9;
}
while ( !v10 );
*(_QWORD *)(v8 + 16) = a2;
*(_BYTE *)(a2 + 116) |= 8u;
}
return result;
}
| link_block:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
TEST DL,DL
JZ 0x0013dba5
LAB_0013db52:
LEA R9,[RDI + 0xc0]
LEA R10,[RDI + 0xb8]
XOR R8D,R8D
TEST DL,DL
SETNZ R8B
MOV RAX,R9
CMOVZ RAX,R10
MOV RDX,qword ptr [RDI + R8*0x8 + 0xb8]
TEST RDX,RDX
JZ 0x0013dc19
MOV RDI,qword ptr [RDX]
MOV qword ptr [RDI + 0x8],R14
MOV RDI,qword ptr [RDX]
MOV qword ptr [R14],RDI
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RDX],R14
TEST CL,CL
JZ 0x0013dc31
MOV qword ptr [RAX],R14
JMP 0x0013dc31
LAB_0013dba5:
MOV R12,qword ptr [RDI + 0x120]
TEST R12,R12
JZ 0x0013db52
ADD RDI,0x120
MOV qword ptr [RBP + -0x30],RDI
MOV R15,qword ptr [R12 + 0x88]
MOV R13,qword ptr [R15 + 0xa8]
LAB_0013dbcb:
MOV RBX,qword ptr [R15 + 0x88]
CMP qword ptr [R15 + 0xa8],R13
JNZ 0x0013dbfd
MOV RDI,qword ptr [R15 + 0x38]
TEST RDI,RDI
JNZ 0x0013dc07
LAB_0013dbe4:
LEA RDI,[R15 + 0x8]
CALL 0x001295b0
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R15
CALL 0x001a6634
INC dword ptr [R14 + 0x60]
LAB_0013dbfd:
CMP R15,R12
MOV R15,RBX
JNZ 0x0013dbcb
JMP 0x0013dc28
LAB_0013dc07:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0013dbe4
LAB_0013dc19:
MOV qword ptr [R14],R14
MOV qword ptr [R9],R14
MOV qword ptr [R10],R14
MOV qword ptr [R14 + 0x8],R14
JMP 0x0013dc31
LAB_0013dc28:
MOV qword ptr [R13 + 0x10],R14
OR byte ptr [R14 + 0x74],0x8
LAB_0013dc31:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void link_block(long param_1,long *param_2,char param_3,char param_4)
{
long *plVar1;
long lVar2;
long lVar3;
long lVar4;
int8 *puVar5;
long lVar6;
bool bVar7;
if ((param_3 == '\0') && (lVar2 = *(long *)(param_1 + 0x120), lVar2 != 0)) {
lVar3 = *(long *)(*(long *)(lVar2 + 0x88) + 0xa8);
lVar6 = *(long *)(lVar2 + 0x88);
do {
lVar4 = *(long *)(lVar6 + 0x88);
if (*(long *)(lVar6 + 0xa8) == lVar3) {
if (*(long *)(lVar6 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar6 + 8));
wqueue_unlink_from_queue(param_1 + 0x120,lVar6);
*(int *)(param_2 + 0xc) = (int)param_2[0xc] + 1;
}
bVar7 = lVar6 != lVar2;
lVar6 = lVar4;
} while (bVar7);
*(long **)(lVar3 + 0x10) = param_2;
*(byte *)((long)param_2 + 0x74) = *(byte *)((long)param_2 + 0x74) | 8;
}
else {
puVar5 = (int8 *)(param_1 + 0xc0);
if (param_3 == '\0') {
puVar5 = (int8 *)(param_1 + 0xb8);
}
plVar1 = *(long **)(param_1 + 0xb8 + (ulong)(param_3 != '\0') * 8);
if (plVar1 == (long *)0x0) {
*param_2 = (long)param_2;
*(int8 *)(param_1 + 0xc0) = param_2;
*(int8 *)(param_1 + 0xb8) = param_2;
param_2[1] = (long)param_2;
}
else {
*(long **)(*plVar1 + 8) = param_2;
*param_2 = *plVar1;
param_2[1] = (long)plVar1;
*plVar1 = (long)param_2;
if (param_4 != '\0') {
*puVar5 = param_2;
}
}
}
return;
}
| |
26,706 | POINTonE1_affine_on_curve | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e1.c | static bool_t POINTonE1_affine_on_curve(const POINTonE1_affine *p)
{
vec384 XXX, YY;
sqr_fp(XXX, p->X);
mul_fp(XXX, XXX, p->X); /* X^3 */
add_fp(XXX, XXX, B_E1); /* X^3 + B */
sqr_fp(YY, p->Y); /* Y^2 */
return vec_is_equal(XXX, YY, sizeof(XXX));
} | O1 | c | POINTonE1_affine_on_curve:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
leaq 0x26698(%rip), %r15 # 0x3fb20
leaq -0x90(%rbp), %rbx
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x34460
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x34be0
leaq 0x2696b(%rip), %rdx # 0x3fe30
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x2f380
addq $0x30, %r14
leaq -0x60(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x34460
movl $0x30, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x306c0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| POINTonE1_affine_on_curve:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rdi
lea r15, BLS12_381_P
lea rbx, [rbp+var_90]
mov r12, 89F3FFFCFFFCFFFDh
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, r12
call sqr_mont_384
mov rdi, rbx
mov rsi, rbx
mov rdx, r14
mov rcx, r15
mov r8, r12
call mul_mont_384
lea rdx, B_E1
mov rdi, rbx
mov rsi, rbx
mov rcx, r15
call add_mod_384
add r14, 30h ; '0'
lea r13, [rbp+var_60]
mov rdi, r13
mov rsi, r14
mov rdx, r15
mov rcx, r12
call sqr_mont_384
mov edx, 30h ; '0'
mov rdi, rbx
mov rsi, r13
call vec_is_equal_16x
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long POINTonE1_affine_on_curve(long long a1)
{
_BYTE v2[48]; // [rsp+0h] [rbp-90h] BYREF
_BYTE v3[96]; // [rsp+30h] [rbp-60h] BYREF
sqr_mont_384(v2, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v2, v2, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384(v2, v2, &B_E1, &BLS12_381_P);
sqr_mont_384(v3, a1 + 48, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
return vec_is_equal_16x(v2, v3, 48LL);
}
| POINTonE1_affine_on_curve:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RDI
LEA R15,[0x13fb20]
LEA RBX,[RBP + -0x90]
MOV R12,-0x760c000300030003
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x00134460
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R15
MOV R8,R12
CALL 0x00134be0
LEA RDX,[0x13fe30]
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,R15
CALL 0x0012f380
ADD R14,0x30
LEA R13,[RBP + -0x60]
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x00134460
MOV EDX,0x30
MOV RDI,RBX
MOV RSI,R13
CALL 0x001306c0
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void POINTonE1_affine_on_curve(long param_1)
{
int1 local_98 [48];
int1 local_68 [56];
sqr_mont_384(local_98,param_1,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_98,local_98,param_1,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384(local_98,local_98,B_E1,BLS12_381_P);
sqr_mont_384(local_68,param_1 + 0x30,BLS12_381_P,0x89f3fffcfffcfffd);
vec_is_equal_16x(local_98,local_68,0x30);
return;
}
| |
26,707 | unicode_prop | bluesky950520[P]quickjs/libunicode.c | int unicode_prop(CharRange *cr, const char *prop_name)
{
int prop_idx, ret;
prop_idx = unicode_find_name(unicode_prop_name_table, prop_name);
if (prop_idx < 0)
return -2;
prop_idx += UNICODE_PROP_ASCII_Hex_Digit;
ret = 0;
switch(prop_idx) {
case UNICODE_PROP_ASCII:
if (cr_add_interval(cr, 0x00, 0x7f + 1))
return -1;
break;
case UNICODE_PROP_Any:
if (cr_add_interval(cr, 0x00000, 0x10ffff + 1))
return -1;
break;
case UNICODE_PROP_Assigned:
ret = unicode_prop_ops(cr,
POP_GC, M(Cn),
POP_INVERT,
POP_END);
break;
case UNICODE_PROP_Math:
ret = unicode_prop_ops(cr,
POP_GC, M(Sm),
POP_PROP, UNICODE_PROP_Other_Math,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Lowercase:
ret = unicode_prop_ops(cr,
POP_GC, M(Ll),
POP_PROP, UNICODE_PROP_Other_Lowercase,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Uppercase:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu),
POP_PROP, UNICODE_PROP_Other_Uppercase,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Cased:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu) | M(Ll) | M(Lt),
POP_PROP, UNICODE_PROP_Other_Uppercase,
POP_UNION,
POP_PROP, UNICODE_PROP_Other_Lowercase,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Alphabetic:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo) | M(Nl),
POP_PROP, UNICODE_PROP_Other_Uppercase,
POP_UNION,
POP_PROP, UNICODE_PROP_Other_Lowercase,
POP_UNION,
POP_PROP, UNICODE_PROP_Other_Alphabetic,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Grapheme_Base:
ret = unicode_prop_ops(cr,
POP_GC, M(Cc) | M(Cf) | M(Cs) | M(Co) | M(Cn) | M(Zl) | M(Zp) | M(Me) | M(Mn),
POP_PROP, UNICODE_PROP_Other_Grapheme_Extend,
POP_UNION,
POP_INVERT,
POP_END);
break;
case UNICODE_PROP_Grapheme_Extend:
ret = unicode_prop_ops(cr,
POP_GC, M(Me) | M(Mn),
POP_PROP, UNICODE_PROP_Other_Grapheme_Extend,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_XID_Start:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo) | M(Nl),
POP_PROP, UNICODE_PROP_Other_ID_Start,
POP_UNION,
POP_PROP, UNICODE_PROP_Pattern_Syntax,
POP_PROP, UNICODE_PROP_Pattern_White_Space,
POP_UNION,
POP_PROP, UNICODE_PROP_XID_Start1,
POP_UNION,
POP_INVERT,
POP_INTER,
POP_END);
break;
case UNICODE_PROP_XID_Continue:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo) | M(Nl) |
M(Mn) | M(Mc) | M(Nd) | M(Pc),
POP_PROP, UNICODE_PROP_Other_ID_Start,
POP_UNION,
POP_PROP, UNICODE_PROP_Other_ID_Continue,
POP_UNION,
POP_PROP, UNICODE_PROP_Pattern_Syntax,
POP_PROP, UNICODE_PROP_Pattern_White_Space,
POP_UNION,
POP_PROP, UNICODE_PROP_XID_Continue1,
POP_UNION,
POP_INVERT,
POP_INTER,
POP_END);
break;
case UNICODE_PROP_Changes_When_Uppercased:
ret = unicode_case1(cr, CASE_U);
break;
case UNICODE_PROP_Changes_When_Lowercased:
ret = unicode_case1(cr, CASE_L);
break;
case UNICODE_PROP_Changes_When_Casemapped:
ret = unicode_case1(cr, CASE_U | CASE_L | CASE_F);
break;
case UNICODE_PROP_Changes_When_Titlecased:
ret = unicode_prop_ops(cr,
POP_CASE, CASE_U,
POP_PROP, UNICODE_PROP_Changes_When_Titlecased1,
POP_XOR,
POP_END);
break;
case UNICODE_PROP_Changes_When_Casefolded:
ret = unicode_prop_ops(cr,
POP_CASE, CASE_F,
POP_PROP, UNICODE_PROP_Changes_When_Casefolded1,
POP_XOR,
POP_END);
break;
case UNICODE_PROP_Changes_When_NFKC_Casefolded:
ret = unicode_prop_ops(cr,
POP_CASE, CASE_F,
POP_PROP, UNICODE_PROP_Changes_When_NFKC_Casefolded1,
POP_XOR,
POP_END);
break;
/* we use the existing tables */
case UNICODE_PROP_ID_Continue:
ret = unicode_prop_ops(cr,
POP_PROP, UNICODE_PROP_ID_Start,
POP_PROP, UNICODE_PROP_ID_Continue1,
POP_XOR,
POP_END);
break;
default:
if (prop_idx >= countof(unicode_prop_table))
return -2;
ret = unicode_prop1(cr, prop_idx);
break;
}
return ret;
} | O1 | c | unicode_prop:
pushq %rbx
movq %rdi, %rbx
leaq 0xbec8(%rip), %rdi # 0xa4fc0
callq 0x987bd
movl %eax, %esi
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
testl %esi, %esi
js 0x9944f
leal -0x24(%rsi), %ecx
cmpl $0x14, %ecx
ja 0x99451
leaq 0x8f25(%rip), %rdx # 0xa2044
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl (%rbx), %esi
addl $0x2, %esi
cmpl 0x4(%rbx), %esi
jle 0x99149
movq %rbx, %rdi
callq 0x97a5c
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x9944f
movq 0x8(%rbx), %rax
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movl $0x0, (%rax,%rcx,4)
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movl $0x80, (%rax,%rcx,4)
jmp 0x99336
subq $0x8, %rsp
movl $0x3, %r11d
movl $0x1, %r10d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x43e, %edx # imm = 0x43E
movl $0x1, %ecx
movl $0x7, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq $0x4
pushq $0x6
pushq %r11
pushq $0xb
pushq %r10
pushq %r11
pushq $0x20
pushq %r10
pushq $0x1f
pushq %r10
callq 0x99462
addq $0x60, %rsp
jmp 0x9944f
subq $0x8, %rsp
movq %rbx, %rdi
movl $0x1, %esi
movl $0x32, %edx
movl $0x1, %ecx
movl $0xa, %r8d
jmp 0x993cb
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x9934f
movl $0x3, %r10d
movq %rbx, %rdi
xorl %esi, %esi
movl $0xe, %edx
movl $0x1, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq %r10
pushq %r10
pushq $0x1
callq 0x99462
addq $0x20, %rsp
jmp 0x9944f
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movl $0x140, %edx # imm = 0x140
movl $0x1, %ecx
movl $0x5, %r8d
jmp 0x9943c
subq $0x8, %rsp
movl $0x3, %r10d
movl $0x1, %r11d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x43e, %edx # imm = 0x43E
movl $0x1, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq %r10
pushq $0x2
pushq %r11
pushq %r10
pushq %r10
pushq %r11
callq 0x99462
addq $0x40, %rsp
jmp 0x9944f
subq $0x8, %rsp
movq %rbx, %rdi
movl $0x2, %esi
movl $0x4, %edx
movl $0x1, %ecx
movl $0xe, %r8d
jmp 0x993cb
movq %rbx, %rdi
xorl %esi, %esi
movl $0x3f000141, %edx # imm = 0x3F000141
movl $0x1, %ecx
movl $0x5, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq $0x6
jmp 0x99446
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
movl $0x6, %ecx
movl $0x7, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x99462
movl (%rbx), %esi
addl $0x2, %esi
cmpl 0x4(%rbx), %esi
jle 0x99314
movq %rbx, %rdi
callq 0x97a5c
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x9944f
movq 0x8(%rbx), %rax
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movl $0x0, (%rax,%rcx,4)
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
movl $0x110000, (%rax,%rcx,4) # imm = 0x110000
xorl %eax, %eax
jmp 0x9944f
movq %rbx, %rdi
movl $0x7, %esi
jmp 0x9934f
movq %rbx, %rdi
movl $0x2, %esi
popq %rbx
jmp 0x98c95
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movl $0x4, %edx
movl $0x1, %ecx
movl $0x3, %r8d
jmp 0x9943c
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1000, %edx # imm = 0x1000
movl $0x1, %ecx
movl $0x1, %r8d
jmp 0x9943c
subq $0x8, %rsp
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0xd, %r8d
jmp 0x993cb
subq $0x8, %rsp
movq %rbx, %rdi
movl $0x2, %esi
movl $0x4, %edx
movl $0x1, %ecx
movl $0xf, %r8d
movl $0x5, %r9d
jmp 0x99442
movl $0x3, %r11d
movl $0x1, %r10d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x106fe, %edx # imm = 0x106FE
movl $0x1, %ecx
movl $0x7, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq $0x4
pushq $0x6
pushq %r11
pushq $0xc
pushq %r10
pushq %r11
pushq $0x20
pushq %r10
pushq $0x1f
pushq %r10
pushq %r11
pushq $0x8
pushq %r10
callq 0x99462
addq $0x70, %rsp
jmp 0x9944f
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
movl $0x1, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
callq 0x99462
addq $0x10, %rsp
popq %rbx
retq
cmpl $0x23, %esi
ja 0x9944f
addl $0x10, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x997e2
| unicode_prop:
push rbx
mov rbx, rdi
lea rdi, unicode_prop_name_table; "ASCII_Hex_Digit,AHex"
call unicode_find_name
mov esi, eax
mov eax, 0FFFFFFFEh
test esi, esi
js loc_9944F
lea ecx, [rsi-24h]; switch 21 cases
cmp ecx, 14h
ja def_99126; jumptable 0000000000099126 default case, cases 50,51
lea rdx, jpt_99126
movsxd rcx, ds:(jpt_99126 - 0A2044h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_99128:
mov esi, [rbx]; jumptable 0000000000099126 case 36
add esi, 2
cmp esi, [rbx+4]
jle short loc_99149
mov rdi, rbx
call cr_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz loc_9944F
loc_99149:
mov rax, [rbx+8]
movsxd rcx, dword ptr [rbx]
lea edx, [rcx+1]
mov [rbx], edx
mov dword ptr [rax+rcx*4], 0
movsxd rcx, dword ptr [rbx]
lea edx, [rcx+1]
mov [rbx], edx
mov dword ptr [rax+rcx*4], 80h
jmp loc_99336
loc_99170:
sub rsp, 8; jumptable 0000000000099126 case 56
mov r11d, 3
mov r10d, 1
mov rdi, rbx
xor esi, esi
mov edx, 43Eh
mov ecx, 1
mov r8d, 7
mov r9d, 3
xor eax, eax
push 7
push 4
push 6
push r11
push 0Bh
push r10
push r11
push 20h ; ' '
push r10
push 1Fh
push r10
call unicode_prop_ops
add rsp, 60h
jmp loc_9944F
loc_991C1:
sub rsp, 8; jumptable 0000000000099126 case 49
mov rdi, rbx
mov esi, 1
mov edx, 32h ; '2'
mov ecx, 1
mov r8d, 0Ah
jmp loc_993CB
loc_991E2:
mov rdi, rbx; jumptable 0000000000099126 case 46
mov esi, 1
jmp loc_9934F
loc_991EF:
mov r10d, 3; jumptable 0000000000099126 case 40
mov rdi, rbx
xor esi, esi
mov edx, 0Eh
mov ecx, 1
mov r8d, 4
mov r9d, 3
xor eax, eax
push 7
push r10
push r10
push 1
call unicode_prop_ops
add rsp, 20h
jmp loc_9944F
loc_99228:
sub rsp, 8; jumptable 0000000000099126 case 48
mov rdi, rbx
xor esi, esi
mov edx, 140h
mov ecx, 1
mov r8d, 5
jmp loc_9943C
loc_99246:
sub rsp, 8; jumptable 0000000000099126 case 37
mov r10d, 3
mov r11d, 1
mov rdi, rbx
xor esi, esi
mov edx, 43Eh
mov ecx, 1
mov r8d, 4
mov r9d, 3
xor eax, eax
push 7
push r10
push 2
push r11
push r10
push r10
push r11
call unicode_prop_ops
add rsp, 40h
jmp loc_9944F
loc_9928F:
sub rsp, 8; jumptable 0000000000099126 case 41
mov rdi, rbx
mov esi, 2
mov edx, 4
mov ecx, 1
mov r8d, 0Eh
jmp loc_993CB
loc_992B0:
mov rdi, rbx; jumptable 0000000000099126 case 47
xor esi, esi
mov edx, 3F000141h
mov ecx, 1
mov r8d, 5
mov r9d, 3
xor eax, eax
push 7
push 6
jmp loc_99446
loc_992D6:
mov rdi, rbx; jumptable 0000000000099126 case 39
xor esi, esi
mov edx, 1
mov ecx, 6
mov r8d, 7
xor eax, eax
pop rbx
jmp unicode_prop_ops
loc_992F3:
mov esi, [rbx]; jumptable 0000000000099126 case 38
add esi, 2
cmp esi, [rbx+4]
jle short loc_99314
mov rdi, rbx
call cr_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz loc_9944F
loc_99314:
mov rax, [rbx+8]
movsxd rcx, dword ptr [rbx]
lea edx, [rcx+1]
mov [rbx], edx
mov dword ptr [rax+rcx*4], 0
movsxd rcx, dword ptr [rbx]
lea edx, [rcx+1]
mov [rbx], edx
mov dword ptr [rax+rcx*4], 110000h
loc_99336:
xor eax, eax
jmp loc_9944F
loc_9933D:
mov rdi, rbx; jumptable 0000000000099126 case 42
mov esi, 7
jmp short loc_9934F
loc_99347:
mov rdi, rbx; jumptable 0000000000099126 case 43
mov esi, 2
loc_9934F:
pop rbx
jmp unicode_case1
loc_99355:
sub rsp, 8; jumptable 0000000000099126 case 52
mov rdi, rbx
xor esi, esi
mov edx, 4
mov ecx, 1
mov r8d, 3
jmp loc_9943C
loc_99373:
sub rsp, 8; jumptable 0000000000099126 case 53
mov rdi, rbx
xor esi, esi
mov edx, 1000h
mov ecx, 1
mov r8d, 1
jmp loc_9943C
loc_99391:
sub rsp, 8; jumptable 0000000000099126 case 45
mov rdi, rbx
mov esi, 2
mov edx, 1
mov ecx, 1
mov r8d, 0Dh
jmp short loc_993CB
loc_993AF:
sub rsp, 8; jumptable 0000000000099126 case 44
mov rdi, rbx
mov esi, 2
mov edx, 4
mov ecx, 1
mov r8d, 0Fh
loc_993CB:
mov r9d, 5
jmp short loc_99442
loc_993D3:
mov r11d, 3; jumptable 0000000000099126 case 55
mov r10d, 1
mov rdi, rbx
xor esi, esi
mov edx, 106FEh
mov ecx, 1
mov r8d, 7
mov r9d, 3
xor eax, eax
push 7
push 4
push 6
push r11
push 0Ch
push r10
push r11
push 20h ; ' '
push r10
push 1Fh
push r10
push r11
push 8
push r10
call unicode_prop_ops
add rsp, 70h
jmp short loc_9944F
loc_99423:
sub rsp, 8; jumptable 0000000000099126 case 54
mov rdi, rbx
xor esi, esi
mov edx, 2
mov ecx, 1
mov r8d, 4
loc_9943C:
mov r9d, 3
loc_99442:
xor eax, eax
push 7
loc_99446:
call unicode_prop_ops
add rsp, 10h
loc_9944F:
pop rbx
retn
def_99126:
cmp esi, 23h ; '#'; jumptable 0000000000099126 default case, cases 50,51
ja short loc_9944F
add esi, 10h
mov rdi, rbx
pop rbx
jmp unicode_prop1
| long long unicode_prop(int *a1, long long a2)
{
int name; // esi
int v3; // r9d
long long result; // rax
int v5; // esi
int v6; // ecx
long long v7; // rax
long long v8; // rcx
long long v9; // rcx
int v10; // esi
int v11; // edx
int v12; // r8d
int v13; // esi
int v14; // ecx
long long v15; // rax
long long v16; // rcx
long long v17; // rcx
int v18; // r9d
name = unicode_find_name("ASCII_Hex_Digit,AHex", a2);
result = 4294967294LL;
if ( name >= 0 )
{
switch ( name )
{
case '$':
v5 = *a1 + 2;
if ( v5 <= a1[1] || (v6 = cr_realloc((long long)a1, v5), result = 0xFFFFFFFFLL, !v6) )
{
v7 = *((_QWORD *)a1 + 1);
v8 = *a1;
*a1 = v8 + 1;
*(_DWORD *)(v7 + 4 * v8) = 0;
v9 = *a1;
*a1 = v9 + 1;
*(_DWORD *)(v7 + 4 * v9) = 128;
return 0LL;
}
return result;
case '%':
return unicode_prop_ops((_DWORD)a1, 0, 1086, 1, 4, 3, 1LL, 3LL, 3LL, 1LL, 2LL, 3LL, 7LL);
case '&':
v13 = *a1 + 2;
if ( v13 <= a1[1] || (v14 = cr_realloc((long long)a1, v13), result = 0xFFFFFFFFLL, !v14) )
{
v15 = *((_QWORD *)a1 + 1);
v16 = *a1;
*a1 = v16 + 1;
*(_DWORD *)(v15 + 4 * v16) = 0;
v17 = *a1;
*a1 = v17 + 1;
*(_DWORD *)(v15 + 4 * v17) = 1114112;
return 0LL;
}
return result;
case '\'':
return unicode_prop_ops((_DWORD)a1, 0, 1, 6, 7, v3);
case '(':
return unicode_prop_ops((_DWORD)a1, 0, 14, 1, 4, 3, 1LL, 3LL, 3LL, 7LL);
case ')':
v10 = 2;
v11 = 4;
v12 = 14;
goto LABEL_26;
case '*':
return unicode_case1(a1, 7);
case '+':
return unicode_case1(a1, 2);
case ',':
v10 = 2;
v11 = 4;
v12 = 15;
goto LABEL_26;
case '-':
v10 = 2;
v11 = 1;
v12 = 13;
goto LABEL_26;
case '.':
return unicode_case1(a1, 1);
case '/':
return unicode_prop_ops((_DWORD)a1, 0, 1056964929, 1, 5, 3, 6LL, 7LL);
case '0':
v10 = 0;
v11 = 320;
v12 = 5;
goto LABEL_29;
case '1':
v10 = 1;
v11 = 50;
v12 = 10;
LABEL_26:
v18 = 5;
goto LABEL_30;
case '4':
v10 = 0;
v11 = 4;
v12 = 3;
goto LABEL_29;
case '5':
v10 = 0;
v11 = 4096;
v12 = 1;
goto LABEL_29;
case '6':
v10 = 0;
v11 = 2;
v12 = 4;
LABEL_29:
v18 = 3;
LABEL_30:
result = unicode_prop_ops((_DWORD)a1, v10, v11, 1, v12, v18, 7LL);
break;
case '7':
result = unicode_prop_ops(
(_DWORD)a1,
0,
67326,
1,
7,
3,
1LL,
8LL,
3LL,
1LL,
31LL,
1LL,
32LL,
3LL,
1LL,
12LL,
3LL,
6LL,
4LL,
7LL);
break;
case '8':
result = unicode_prop_ops(
(_DWORD)a1,
0,
1086,
1,
7,
3,
1LL,
31LL,
1LL,
32LL,
3LL,
1LL,
11LL,
3LL,
6LL,
4LL,
7LL);
break;
default:
if ( (unsigned int)name <= 0x23 )
result = unicode_prop1(a1, (unsigned int)(name + 16));
break;
}
}
return result;
}
| unicode_prop:
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x1a4fc0]
CALL 0x001987bd
MOV ESI,EAX
MOV EAX,0xfffffffe
TEST ESI,ESI
JS 0x0019944f
LEA ECX,[RSI + -0x24]
CMP ECX,0x14
JA 0x00199451
LEA RDX,[0x1a2044]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_24:
MOV ESI,dword ptr [RBX]
ADD ESI,0x2
CMP ESI,dword ptr [RBX + 0x4]
JLE 0x00199149
MOV RDI,RBX
CALL 0x00197a5c
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0019944f
LAB_00199149:
MOV RAX,qword ptr [RBX + 0x8]
MOVSXD RCX,dword ptr [RBX]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX],EDX
MOV dword ptr [RAX + RCX*0x4],0x0
MOVSXD RCX,dword ptr [RBX]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX],EDX
MOV dword ptr [RAX + RCX*0x4],0x80
JMP 0x00199336
caseD_38:
SUB RSP,0x8
MOV R11D,0x3
MOV R10D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x43e
MOV ECX,0x1
MOV R8D,0x7
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH 0x4
PUSH 0x6
PUSH R11
PUSH 0xb
PUSH R10
PUSH R11
PUSH 0x20
PUSH R10
PUSH 0x1f
PUSH R10
CALL 0x00199462
ADD RSP,0x60
JMP 0x0019944f
caseD_31:
SUB RSP,0x8
MOV RDI,RBX
MOV ESI,0x1
MOV EDX,0x32
MOV ECX,0x1
MOV R8D,0xa
JMP 0x001993cb
caseD_2e:
MOV RDI,RBX
MOV ESI,0x1
JMP 0x0019934f
caseD_28:
MOV R10D,0x3
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0xe
MOV ECX,0x1
MOV R8D,0x4
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH R10
PUSH R10
PUSH 0x1
CALL 0x00199462
ADD RSP,0x20
JMP 0x0019944f
caseD_30:
SUB RSP,0x8
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x140
MOV ECX,0x1
MOV R8D,0x5
JMP 0x0019943c
caseD_25:
SUB RSP,0x8
MOV R10D,0x3
MOV R11D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x43e
MOV ECX,0x1
MOV R8D,0x4
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH R10
PUSH 0x2
PUSH R11
PUSH R10
PUSH R10
PUSH R11
CALL 0x00199462
ADD RSP,0x40
JMP 0x0019944f
caseD_29:
SUB RSP,0x8
MOV RDI,RBX
MOV ESI,0x2
MOV EDX,0x4
MOV ECX,0x1
MOV R8D,0xe
JMP 0x001993cb
caseD_2f:
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x3f000141
MOV ECX,0x1
MOV R8D,0x5
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH 0x6
JMP 0x00199446
caseD_27:
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x1
MOV ECX,0x6
MOV R8D,0x7
XOR EAX,EAX
POP RBX
JMP 0x00199462
caseD_26:
MOV ESI,dword ptr [RBX]
ADD ESI,0x2
CMP ESI,dword ptr [RBX + 0x4]
JLE 0x00199314
MOV RDI,RBX
CALL 0x00197a5c
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0019944f
LAB_00199314:
MOV RAX,qword ptr [RBX + 0x8]
MOVSXD RCX,dword ptr [RBX]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX],EDX
MOV dword ptr [RAX + RCX*0x4],0x0
MOVSXD RCX,dword ptr [RBX]
LEA EDX,[RCX + 0x1]
MOV dword ptr [RBX],EDX
MOV dword ptr [RAX + RCX*0x4],0x110000
LAB_00199336:
XOR EAX,EAX
JMP 0x0019944f
caseD_2a:
MOV RDI,RBX
MOV ESI,0x7
JMP 0x0019934f
caseD_2b:
MOV RDI,RBX
MOV ESI,0x2
LAB_0019934f:
POP RBX
JMP 0x00198c95
caseD_34:
SUB RSP,0x8
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x4
MOV ECX,0x1
MOV R8D,0x3
JMP 0x0019943c
caseD_35:
SUB RSP,0x8
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x1000
MOV ECX,0x1
MOV R8D,0x1
JMP 0x0019943c
caseD_2d:
SUB RSP,0x8
MOV RDI,RBX
MOV ESI,0x2
MOV EDX,0x1
MOV ECX,0x1
MOV R8D,0xd
JMP 0x001993cb
caseD_2c:
SUB RSP,0x8
MOV RDI,RBX
MOV ESI,0x2
MOV EDX,0x4
MOV ECX,0x1
MOV R8D,0xf
LAB_001993cb:
MOV R9D,0x5
JMP 0x00199442
caseD_37:
MOV R11D,0x3
MOV R10D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x106fe
MOV ECX,0x1
MOV R8D,0x7
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH 0x4
PUSH 0x6
PUSH R11
PUSH 0xc
PUSH R10
PUSH R11
PUSH 0x20
PUSH R10
PUSH 0x1f
PUSH R10
PUSH R11
PUSH 0x8
PUSH R10
CALL 0x00199462
ADD RSP,0x70
JMP 0x0019944f
caseD_36:
SUB RSP,0x8
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x2
MOV ECX,0x1
MOV R8D,0x4
LAB_0019943c:
MOV R9D,0x3
LAB_00199442:
XOR EAX,EAX
PUSH 0x7
LAB_00199446:
CALL 0x00199462
ADD RSP,0x10
LAB_0019944f:
POP RBX
RET
caseD_32:
CMP ESI,0x23
JA 0x0019944f
ADD ESI,0x10
MOV RDI,RBX
POP RBX
JMP 0x001997e2
|
int8 unicode_prop(int *param_1)
{
long lVar1;
uint uVar2;
int iVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int8 uVar7;
int8 uVar8;
uVar2 = unicode_find_name("ASCII_Hex_Digit,AHex");
uVar4 = 0xfffffffe;
if ((int)uVar2 < 0) {
return 0xfffffffe;
}
switch(uVar2) {
case 0x24:
if ((param_1[1] < *param_1 + 2) && (iVar3 = cr_realloc(param_1), iVar3 != 0)) {
return 0xffffffff;
}
lVar1 = *(long *)(param_1 + 2);
iVar3 = *param_1;
*param_1 = iVar3 + 1;
*(int4 *)(lVar1 + (long)iVar3 * 4) = 0;
iVar3 = *param_1;
*param_1 = iVar3 + 1;
*(int4 *)(lVar1 + (long)iVar3 * 4) = 0x80;
goto LAB_00199336;
case 0x25:
uVar4 = unicode_prop_ops(param_1,0,0x43e,1,4,3,1,3,3,1,2,3,7);
break;
case 0x26:
if ((param_1[1] < *param_1 + 2) && (iVar3 = cr_realloc(param_1), iVar3 != 0)) {
return 0xffffffff;
}
lVar1 = *(long *)(param_1 + 2);
iVar3 = *param_1;
*param_1 = iVar3 + 1;
*(int4 *)(lVar1 + (long)iVar3 * 4) = 0;
iVar3 = *param_1;
*param_1 = iVar3 + 1;
*(int4 *)(lVar1 + (long)iVar3 * 4) = 0x110000;
LAB_00199336:
uVar4 = 0;
break;
case 0x27:
uVar4 = unicode_prop_ops(param_1,0,1,6,7);
return uVar4;
case 0x28:
uVar4 = unicode_prop_ops(param_1,0,0xe,1,4,3,1,3,3,7);
break;
case 0x29:
uVar5 = 2;
uVar4 = 4;
uVar6 = 0xe;
goto LAB_001993cb;
case 0x2a:
uVar4 = 7;
goto LAB_0019934f;
case 0x2b:
uVar4 = 2;
goto LAB_0019934f;
case 0x2c:
uVar5 = 2;
uVar4 = 4;
uVar6 = 0xf;
goto LAB_001993cb;
case 0x2d:
uVar5 = 2;
uVar4 = 1;
uVar6 = 0xd;
goto LAB_001993cb;
case 0x2e:
uVar4 = 1;
LAB_0019934f:
uVar4 = unicode_case1(param_1,uVar4);
return uVar4;
case 0x2f:
uVar5 = 0;
uVar4 = 0x3f000141;
uVar6 = 5;
uVar7 = 3;
uVar8 = 6;
goto LAB_00199446;
case 0x30:
uVar4 = 0x140;
uVar6 = 5;
goto LAB_0019943c;
case 0x31:
uVar5 = 1;
uVar4 = 0x32;
uVar6 = 10;
LAB_001993cb:
uVar7 = 5;
LAB_00199442:
uVar8 = 7;
LAB_00199446:
uVar4 = unicode_prop_ops(param_1,uVar5,uVar4,1,uVar6,uVar7,uVar8);
break;
default:
if (uVar2 < 0x24) {
uVar4 = unicode_prop1(param_1,uVar2 + 0x10);
return uVar4;
}
break;
case 0x34:
uVar4 = 4;
uVar6 = 3;
goto LAB_0019943c;
case 0x35:
uVar4 = 0x1000;
uVar6 = 1;
goto LAB_0019943c;
case 0x36:
uVar4 = 2;
uVar6 = 4;
LAB_0019943c:
uVar5 = 0;
uVar7 = 3;
goto LAB_00199442;
case 0x37:
uVar4 = unicode_prop_ops(param_1,0,0x106fe,1,7,3,1,8,3,1,0x1f,1,0x20,3,1,0xc,3,6,4,7);
break;
case 0x38:
uVar4 = unicode_prop_ops(param_1,0,0x43e,1,7,3,1,0x1f,1,0x20,3,1,0xb,3,6,4,7);
}
return uVar4;
}
| |
26,708 | unicode_prop | bluesky950520[P]quickjs/libunicode.c | int unicode_prop(CharRange *cr, const char *prop_name)
{
int prop_idx, ret;
prop_idx = unicode_find_name(unicode_prop_name_table, prop_name);
if (prop_idx < 0)
return -2;
prop_idx += UNICODE_PROP_ASCII_Hex_Digit;
ret = 0;
switch(prop_idx) {
case UNICODE_PROP_ASCII:
if (cr_add_interval(cr, 0x00, 0x7f + 1))
return -1;
break;
case UNICODE_PROP_Any:
if (cr_add_interval(cr, 0x00000, 0x10ffff + 1))
return -1;
break;
case UNICODE_PROP_Assigned:
ret = unicode_prop_ops(cr,
POP_GC, M(Cn),
POP_INVERT,
POP_END);
break;
case UNICODE_PROP_Math:
ret = unicode_prop_ops(cr,
POP_GC, M(Sm),
POP_PROP, UNICODE_PROP_Other_Math,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Lowercase:
ret = unicode_prop_ops(cr,
POP_GC, M(Ll),
POP_PROP, UNICODE_PROP_Other_Lowercase,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Uppercase:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu),
POP_PROP, UNICODE_PROP_Other_Uppercase,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Cased:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu) | M(Ll) | M(Lt),
POP_PROP, UNICODE_PROP_Other_Uppercase,
POP_UNION,
POP_PROP, UNICODE_PROP_Other_Lowercase,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Alphabetic:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo) | M(Nl),
POP_PROP, UNICODE_PROP_Other_Uppercase,
POP_UNION,
POP_PROP, UNICODE_PROP_Other_Lowercase,
POP_UNION,
POP_PROP, UNICODE_PROP_Other_Alphabetic,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_Grapheme_Base:
ret = unicode_prop_ops(cr,
POP_GC, M(Cc) | M(Cf) | M(Cs) | M(Co) | M(Cn) | M(Zl) | M(Zp) | M(Me) | M(Mn),
POP_PROP, UNICODE_PROP_Other_Grapheme_Extend,
POP_UNION,
POP_INVERT,
POP_END);
break;
case UNICODE_PROP_Grapheme_Extend:
ret = unicode_prop_ops(cr,
POP_GC, M(Me) | M(Mn),
POP_PROP, UNICODE_PROP_Other_Grapheme_Extend,
POP_UNION,
POP_END);
break;
case UNICODE_PROP_XID_Start:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo) | M(Nl),
POP_PROP, UNICODE_PROP_Other_ID_Start,
POP_UNION,
POP_PROP, UNICODE_PROP_Pattern_Syntax,
POP_PROP, UNICODE_PROP_Pattern_White_Space,
POP_UNION,
POP_PROP, UNICODE_PROP_XID_Start1,
POP_UNION,
POP_INVERT,
POP_INTER,
POP_END);
break;
case UNICODE_PROP_XID_Continue:
ret = unicode_prop_ops(cr,
POP_GC, M(Lu) | M(Ll) | M(Lt) | M(Lm) | M(Lo) | M(Nl) |
M(Mn) | M(Mc) | M(Nd) | M(Pc),
POP_PROP, UNICODE_PROP_Other_ID_Start,
POP_UNION,
POP_PROP, UNICODE_PROP_Other_ID_Continue,
POP_UNION,
POP_PROP, UNICODE_PROP_Pattern_Syntax,
POP_PROP, UNICODE_PROP_Pattern_White_Space,
POP_UNION,
POP_PROP, UNICODE_PROP_XID_Continue1,
POP_UNION,
POP_INVERT,
POP_INTER,
POP_END);
break;
case UNICODE_PROP_Changes_When_Uppercased:
ret = unicode_case1(cr, CASE_U);
break;
case UNICODE_PROP_Changes_When_Lowercased:
ret = unicode_case1(cr, CASE_L);
break;
case UNICODE_PROP_Changes_When_Casemapped:
ret = unicode_case1(cr, CASE_U | CASE_L | CASE_F);
break;
case UNICODE_PROP_Changes_When_Titlecased:
ret = unicode_prop_ops(cr,
POP_CASE, CASE_U,
POP_PROP, UNICODE_PROP_Changes_When_Titlecased1,
POP_XOR,
POP_END);
break;
case UNICODE_PROP_Changes_When_Casefolded:
ret = unicode_prop_ops(cr,
POP_CASE, CASE_F,
POP_PROP, UNICODE_PROP_Changes_When_Casefolded1,
POP_XOR,
POP_END);
break;
case UNICODE_PROP_Changes_When_NFKC_Casefolded:
ret = unicode_prop_ops(cr,
POP_CASE, CASE_F,
POP_PROP, UNICODE_PROP_Changes_When_NFKC_Casefolded1,
POP_XOR,
POP_END);
break;
/* we use the existing tables */
case UNICODE_PROP_ID_Continue:
ret = unicode_prop_ops(cr,
POP_PROP, UNICODE_PROP_ID_Start,
POP_PROP, UNICODE_PROP_ID_Continue1,
POP_XOR,
POP_END);
break;
default:
if (prop_idx >= countof(unicode_prop_table))
return -2;
ret = unicode_prop1(cr, prop_idx);
break;
}
return ret;
} | O3 | c | unicode_prop:
pushq %rbx
movq %rdi, %rbx
leaq 0xc50a(%rip), %rdi # 0xa7f70
callq 0x9b118
movl %eax, %esi
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
testl %esi, %esi
js 0x9bdbf
leal -0x24(%rsi), %ecx
cmpl $0x14, %ecx
ja 0x9bdc1
leaq 0x9567(%rip), %rdx # 0xa4ff4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl (%rbx), %eax
leal 0x2(%rax), %esi
cmpl 0x4(%rbx), %esi
jle 0x9bab9
movq %rbx, %rdi
callq 0x9a333
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x9bdbf
movl (%rbx), %eax
movq 0x8(%rbx), %rcx
leal 0x1(%rax), %edx
movl %edx, (%rbx)
cltq
movl $0x0, (%rcx,%rax,4)
movslq (%rbx), %rax
leal 0x1(%rax), %edx
movl %edx, (%rbx)
movl $0x80, (%rcx,%rax,4)
jmp 0x9bca6
subq $0x8, %rsp
movl $0x3, %r11d
movl $0x1, %r10d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x43e, %edx # imm = 0x43E
movl $0x1, %ecx
movl $0x7, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq $0x4
pushq $0x6
pushq %r11
pushq $0xb
pushq %r10
pushq %r11
pushq $0x20
pushq %r10
pushq $0x1f
pushq %r10
callq 0x9bdd2
addq $0x60, %rsp
jmp 0x9bdbf
subq $0x8, %rsp
movq %rbx, %rdi
movl $0x1, %esi
movl $0x32, %edx
movl $0x1, %ecx
movl $0xa, %r8d
jmp 0x9bd3b
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x9bcbf
movl $0x3, %r10d
movq %rbx, %rdi
xorl %esi, %esi
movl $0xe, %edx
movl $0x1, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq %r10
pushq %r10
pushq $0x1
callq 0x9bdd2
addq $0x20, %rsp
jmp 0x9bdbf
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movl $0x140, %edx # imm = 0x140
movl $0x1, %ecx
movl $0x5, %r8d
jmp 0x9bdac
subq $0x8, %rsp
movl $0x3, %r10d
movl $0x1, %r11d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x43e, %edx # imm = 0x43E
movl $0x1, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq %r10
pushq $0x2
pushq %r11
pushq %r10
pushq %r10
pushq %r11
callq 0x9bdd2
addq $0x40, %rsp
jmp 0x9bdbf
subq $0x8, %rsp
movq %rbx, %rdi
movl $0x2, %esi
movl $0x4, %edx
movl $0x1, %ecx
movl $0xe, %r8d
jmp 0x9bd3b
movq %rbx, %rdi
xorl %esi, %esi
movl $0x3f000141, %edx # imm = 0x3F000141
movl $0x1, %ecx
movl $0x5, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq $0x6
jmp 0x9bdb6
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
movl $0x6, %ecx
movl $0x7, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x9bdd2
movl (%rbx), %eax
leal 0x2(%rax), %esi
cmpl 0x4(%rbx), %esi
jle 0x9bc85
movq %rbx, %rdi
callq 0x9a333
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x9bdbf
movl (%rbx), %eax
movq 0x8(%rbx), %rcx
leal 0x1(%rax), %edx
movl %edx, (%rbx)
cltq
movl $0x0, (%rcx,%rax,4)
movslq (%rbx), %rax
leal 0x1(%rax), %edx
movl %edx, (%rbx)
movl $0x110000, (%rcx,%rax,4) # imm = 0x110000
xorl %eax, %eax
jmp 0x9bdbf
movq %rbx, %rdi
movl $0x7, %esi
jmp 0x9bcbf
movq %rbx, %rdi
movl $0x2, %esi
popq %rbx
jmp 0x9b616
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movl $0x4, %edx
movl $0x1, %ecx
movl $0x3, %r8d
jmp 0x9bdac
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1000, %edx # imm = 0x1000
movl $0x1, %ecx
movl $0x1, %r8d
jmp 0x9bdac
subq $0x8, %rsp
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
movl $0x1, %ecx
movl $0xd, %r8d
jmp 0x9bd3b
subq $0x8, %rsp
movq %rbx, %rdi
movl $0x2, %esi
movl $0x4, %edx
movl $0x1, %ecx
movl $0xf, %r8d
movl $0x5, %r9d
jmp 0x9bdb2
movl $0x3, %r11d
movl $0x1, %r10d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x106fe, %edx # imm = 0x106FE
movl $0x1, %ecx
movl $0x7, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
pushq $0x4
pushq $0x6
pushq %r11
pushq $0xc
pushq %r10
pushq %r11
pushq $0x20
pushq %r10
pushq $0x1f
pushq %r10
pushq %r11
pushq $0x8
pushq %r10
callq 0x9bdd2
addq $0x70, %rsp
jmp 0x9bdbf
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
movl $0x1, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
xorl %eax, %eax
pushq $0x7
callq 0x9bdd2
addq $0x10, %rsp
popq %rbx
retq
cmpl $0x23, %esi
ja 0x9bdbf
addl $0x10, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x9c11b
| unicode_prop:
push rbx
mov rbx, rdi
lea rdi, unicode_prop_name_table; "ASCII_Hex_Digit,AHex"
call unicode_find_name
mov esi, eax
mov eax, 0FFFFFFFEh
test esi, esi
js loc_9BDBF
lea ecx, [rsi-24h]; switch 21 cases
cmp ecx, 14h
ja def_9BA94; jumptable 000000000009BA94 default case, cases 50,51
lea rdx, jpt_9BA94
movsxd rcx, ds:(jpt_9BA94 - 0A4FF4h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_9BA96:
mov eax, [rbx]; jumptable 000000000009BA94 case 36
lea esi, [rax+2]
cmp esi, [rbx+4]
jle short loc_9BAB9
mov rdi, rbx
call cr_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz loc_9BDBF
mov eax, [rbx]
loc_9BAB9:
mov rcx, [rbx+8]
lea edx, [rax+1]
mov [rbx], edx
cdqe
mov dword ptr [rcx+rax*4], 0
movsxd rax, dword ptr [rbx]
lea edx, [rax+1]
mov [rbx], edx
mov dword ptr [rcx+rax*4], 80h
jmp loc_9BCA6
loc_9BADF:
sub rsp, 8; jumptable 000000000009BA94 case 56
mov r11d, 3
mov r10d, 1
mov rdi, rbx
xor esi, esi
mov edx, 43Eh
mov ecx, 1
mov r8d, 7
mov r9d, 3
xor eax, eax
push 7
push 4
push 6
push r11
push 0Bh
push r10
push r11
push 20h ; ' '
push r10
push 1Fh
push r10
call unicode_prop_ops
add rsp, 60h
jmp loc_9BDBF
loc_9BB30:
sub rsp, 8; jumptable 000000000009BA94 case 49
mov rdi, rbx
mov esi, 1
mov edx, 32h ; '2'
mov ecx, 1
mov r8d, 0Ah
jmp loc_9BD3B
loc_9BB51:
mov rdi, rbx; jumptable 000000000009BA94 case 46
mov esi, 1
jmp loc_9BCBF
loc_9BB5E:
mov r10d, 3; jumptable 000000000009BA94 case 40
mov rdi, rbx
xor esi, esi
mov edx, 0Eh
mov ecx, 1
mov r8d, 4
mov r9d, 3
xor eax, eax
push 7
push r10
push r10
push 1
call unicode_prop_ops
add rsp, 20h
jmp loc_9BDBF
loc_9BB97:
sub rsp, 8; jumptable 000000000009BA94 case 48
mov rdi, rbx
xor esi, esi
mov edx, 140h
mov ecx, 1
mov r8d, 5
jmp loc_9BDAC
loc_9BBB5:
sub rsp, 8; jumptable 000000000009BA94 case 37
mov r10d, 3
mov r11d, 1
mov rdi, rbx
xor esi, esi
mov edx, 43Eh
mov ecx, 1
mov r8d, 4
mov r9d, 3
xor eax, eax
push 7
push r10
push 2
push r11
push r10
push r10
push r11
call unicode_prop_ops
add rsp, 40h
jmp loc_9BDBF
loc_9BBFE:
sub rsp, 8; jumptable 000000000009BA94 case 41
mov rdi, rbx
mov esi, 2
mov edx, 4
mov ecx, 1
mov r8d, 0Eh
jmp loc_9BD3B
loc_9BC1F:
mov rdi, rbx; jumptable 000000000009BA94 case 47
xor esi, esi
mov edx, 3F000141h
mov ecx, 1
mov r8d, 5
mov r9d, 3
xor eax, eax
push 7
push 6
jmp loc_9BDB6
loc_9BC45:
mov rdi, rbx; jumptable 000000000009BA94 case 39
xor esi, esi
mov edx, 1
mov ecx, 6
mov r8d, 7
xor eax, eax
pop rbx
jmp unicode_prop_ops
loc_9BC62:
mov eax, [rbx]; jumptable 000000000009BA94 case 38
lea esi, [rax+2]
cmp esi, [rbx+4]
jle short loc_9BC85
mov rdi, rbx
call cr_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz loc_9BDBF
mov eax, [rbx]
loc_9BC85:
mov rcx, [rbx+8]
lea edx, [rax+1]
mov [rbx], edx
cdqe
mov dword ptr [rcx+rax*4], 0
movsxd rax, dword ptr [rbx]
lea edx, [rax+1]
mov [rbx], edx
mov dword ptr [rcx+rax*4], 110000h
loc_9BCA6:
xor eax, eax
jmp loc_9BDBF
loc_9BCAD:
mov rdi, rbx; jumptable 000000000009BA94 case 42
mov esi, 7
jmp short loc_9BCBF
loc_9BCB7:
mov rdi, rbx; jumptable 000000000009BA94 case 43
mov esi, 2
loc_9BCBF:
pop rbx
jmp unicode_case1
loc_9BCC5:
sub rsp, 8; jumptable 000000000009BA94 case 52
mov rdi, rbx
xor esi, esi
mov edx, 4
mov ecx, 1
mov r8d, 3
jmp loc_9BDAC
loc_9BCE3:
sub rsp, 8; jumptable 000000000009BA94 case 53
mov rdi, rbx
xor esi, esi
mov edx, 1000h
mov ecx, 1
mov r8d, 1
jmp loc_9BDAC
loc_9BD01:
sub rsp, 8; jumptable 000000000009BA94 case 45
mov rdi, rbx
mov esi, 2
mov edx, 1
mov ecx, 1
mov r8d, 0Dh
jmp short loc_9BD3B
loc_9BD1F:
sub rsp, 8; jumptable 000000000009BA94 case 44
mov rdi, rbx
mov esi, 2
mov edx, 4
mov ecx, 1
mov r8d, 0Fh
loc_9BD3B:
mov r9d, 5
jmp short loc_9BDB2
loc_9BD43:
mov r11d, 3; jumptable 000000000009BA94 case 55
mov r10d, 1
mov rdi, rbx
xor esi, esi
mov edx, (offset loc_106FB+3)
mov ecx, 1
mov r8d, 7
mov r9d, 3
xor eax, eax
push 7
push 4
push 6
push r11
push 0Ch
push r10
push r11
push 20h ; ' '
push r10
push 1Fh
push r10
push r11
push 8
push r10
call unicode_prop_ops
add rsp, 70h
jmp short loc_9BDBF
loc_9BD93:
sub rsp, 8; jumptable 000000000009BA94 case 54
mov rdi, rbx
xor esi, esi
mov edx, 2
mov ecx, 1
mov r8d, 4
loc_9BDAC:
mov r9d, 3
loc_9BDB2:
xor eax, eax
push 7
loc_9BDB6:
call unicode_prop_ops
add rsp, 10h
loc_9BDBF:
pop rbx
retn
def_9BA94:
cmp esi, 23h ; '#'; jumptable 000000000009BA94 default case, cases 50,51
ja short loc_9BDBF
add esi, 10h
mov rdi, rbx
pop rbx
jmp unicode_prop1
| long long unicode_prop(int *a1, long long a2)
{
int name; // esi
int v3; // r9d
long long result; // rax
int v5; // eax
int v6; // esi
int v7; // ecx
long long v8; // rcx
long long v9; // rax
int v10; // esi
int v11; // edx
int v12; // r8d
int v13; // eax
int v14; // esi
int v15; // ecx
long long v16; // rcx
long long v17; // rax
int v18; // r9d
name = unicode_find_name("ASCII_Hex_Digit,AHex", a2);
result = 4294967294LL;
if ( name >= 0 )
{
switch ( name )
{
case '$':
v5 = *a1;
v6 = *a1 + 2;
if ( v6 <= a1[1] )
goto LABEL_6;
v7 = cr_realloc((long long)a1, v6);
result = 0xFFFFFFFFLL;
if ( !v7 )
{
v5 = *a1;
LABEL_6:
v8 = *((_QWORD *)a1 + 1);
*a1 = v5 + 1;
*(_DWORD *)(v8 + 4LL * v5) = 0;
v9 = *a1;
*a1 = v9 + 1;
*(_DWORD *)(v8 + 4 * v9) = 128;
return 0LL;
}
return result;
case '%':
return unicode_prop_ops((_DWORD)a1, 0, 1086, 1, 4, 3, 1LL, 3LL, 3LL, 1LL, 2LL, 3LL, 7LL);
case '&':
v13 = *a1;
v14 = *a1 + 2;
if ( v14 <= a1[1] )
goto LABEL_19;
v15 = cr_realloc((long long)a1, v14);
result = 0xFFFFFFFFLL;
if ( !v15 )
{
v13 = *a1;
LABEL_19:
v16 = *((_QWORD *)a1 + 1);
*a1 = v13 + 1;
*(_DWORD *)(v16 + 4LL * v13) = 0;
v17 = *a1;
*a1 = v17 + 1;
*(_DWORD *)(v16 + 4 * v17) = 1114112;
return 0LL;
}
return result;
case '\'':
return unicode_prop_ops((_DWORD)a1, 0, 1, 6, 7, v3);
case '(':
return unicode_prop_ops((_DWORD)a1, 0, 14, 1, 4, 3, 1LL, 3LL, 3LL, 7LL);
case ')':
v10 = 2;
v11 = 4;
v12 = 14;
goto LABEL_28;
case '*':
return unicode_case1(a1, 7);
case '+':
return unicode_case1(a1, 2);
case ',':
v10 = 2;
v11 = 4;
v12 = 15;
goto LABEL_28;
case '-':
v10 = 2;
v11 = 1;
v12 = 13;
goto LABEL_28;
case '.':
return unicode_case1(a1, 1);
case '/':
return unicode_prop_ops((_DWORD)a1, 0, 1056964929, 1, 5, 3, 6LL, 7LL);
case '0':
v10 = 0;
v11 = 320;
v12 = 5;
goto LABEL_31;
case '1':
v10 = 1;
v11 = 50;
v12 = 10;
LABEL_28:
v18 = 5;
goto LABEL_32;
case '4':
v10 = 0;
v11 = 4;
v12 = 3;
goto LABEL_31;
case '5':
v10 = 0;
v11 = 4096;
v12 = 1;
goto LABEL_31;
case '6':
v10 = 0;
v11 = 2;
v12 = 4;
LABEL_31:
v18 = 3;
LABEL_32:
result = unicode_prop_ops((_DWORD)a1, v10, v11, 1, v12, v18, 7LL);
break;
case '7':
result = unicode_prop_ops(
(_DWORD)a1,
0,
(unsigned int)&loc_106FB + 3,
1,
7,
3,
1LL,
8LL,
3LL,
1LL,
31LL,
1LL,
32LL,
3LL,
1LL,
12LL,
3LL,
6LL,
4LL,
7LL);
break;
case '8':
result = unicode_prop_ops(
(_DWORD)a1,
0,
1086,
1,
7,
3,
1LL,
31LL,
1LL,
32LL,
3LL,
1LL,
11LL,
3LL,
6LL,
4LL,
7LL);
break;
default:
if ( (unsigned int)name <= 0x23 )
result = unicode_prop1(a1, (unsigned int)(name + 16));
break;
}
}
return result;
}
| unicode_prop:
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x1a7f70]
CALL 0x0019b118
MOV ESI,EAX
MOV EAX,0xfffffffe
TEST ESI,ESI
JS 0x0019bdbf
LEA ECX,[RSI + -0x24]
CMP ECX,0x14
JA 0x0019bdc1
LEA RDX,[0x1a4ff4]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_24:
MOV EAX,dword ptr [RBX]
LEA ESI,[RAX + 0x2]
CMP ESI,dword ptr [RBX + 0x4]
JLE 0x0019bab9
MOV RDI,RBX
CALL 0x0019a333
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0019bdbf
MOV EAX,dword ptr [RBX]
LAB_0019bab9:
MOV RCX,qword ptr [RBX + 0x8]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RBX],EDX
CDQE
MOV dword ptr [RCX + RAX*0x4],0x0
MOVSXD RAX,dword ptr [RBX]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RBX],EDX
MOV dword ptr [RCX + RAX*0x4],0x80
JMP 0x0019bca6
caseD_38:
SUB RSP,0x8
MOV R11D,0x3
MOV R10D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x43e
MOV ECX,0x1
MOV R8D,0x7
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH 0x4
PUSH 0x6
PUSH R11
PUSH 0xb
PUSH R10
PUSH R11
PUSH 0x20
PUSH R10
PUSH 0x1f
PUSH R10
CALL 0x0019bdd2
ADD RSP,0x60
JMP 0x0019bdbf
caseD_31:
SUB RSP,0x8
MOV RDI,RBX
MOV ESI,0x1
MOV EDX,0x32
MOV ECX,0x1
MOV R8D,0xa
JMP 0x0019bd3b
caseD_2e:
MOV RDI,RBX
MOV ESI,0x1
JMP 0x0019bcbf
caseD_28:
MOV R10D,0x3
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0xe
MOV ECX,0x1
MOV R8D,0x4
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH R10
PUSH R10
PUSH 0x1
CALL 0x0019bdd2
ADD RSP,0x20
JMP 0x0019bdbf
caseD_30:
SUB RSP,0x8
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x140
MOV ECX,0x1
MOV R8D,0x5
JMP 0x0019bdac
caseD_25:
SUB RSP,0x8
MOV R10D,0x3
MOV R11D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x43e
MOV ECX,0x1
MOV R8D,0x4
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH R10
PUSH 0x2
PUSH R11
PUSH R10
PUSH R10
PUSH R11
CALL 0x0019bdd2
ADD RSP,0x40
JMP 0x0019bdbf
caseD_29:
SUB RSP,0x8
MOV RDI,RBX
MOV ESI,0x2
MOV EDX,0x4
MOV ECX,0x1
MOV R8D,0xe
JMP 0x0019bd3b
caseD_2f:
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x3f000141
MOV ECX,0x1
MOV R8D,0x5
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH 0x6
JMP 0x0019bdb6
caseD_27:
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x1
MOV ECX,0x6
MOV R8D,0x7
XOR EAX,EAX
POP RBX
JMP 0x0019bdd2
caseD_26:
MOV EAX,dword ptr [RBX]
LEA ESI,[RAX + 0x2]
CMP ESI,dword ptr [RBX + 0x4]
JLE 0x0019bc85
MOV RDI,RBX
CALL 0x0019a333
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0019bdbf
MOV EAX,dword ptr [RBX]
LAB_0019bc85:
MOV RCX,qword ptr [RBX + 0x8]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RBX],EDX
CDQE
MOV dword ptr [RCX + RAX*0x4],0x0
MOVSXD RAX,dword ptr [RBX]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RBX],EDX
MOV dword ptr [RCX + RAX*0x4],0x110000
LAB_0019bca6:
XOR EAX,EAX
JMP 0x0019bdbf
caseD_2a:
MOV RDI,RBX
MOV ESI,0x7
JMP 0x0019bcbf
caseD_2b:
MOV RDI,RBX
MOV ESI,0x2
LAB_0019bcbf:
POP RBX
JMP 0x0019b616
caseD_34:
SUB RSP,0x8
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x4
MOV ECX,0x1
MOV R8D,0x3
JMP 0x0019bdac
caseD_35:
SUB RSP,0x8
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x1000
MOV ECX,0x1
MOV R8D,0x1
JMP 0x0019bdac
caseD_2d:
SUB RSP,0x8
MOV RDI,RBX
MOV ESI,0x2
MOV EDX,0x1
MOV ECX,0x1
MOV R8D,0xd
JMP 0x0019bd3b
caseD_2c:
SUB RSP,0x8
MOV RDI,RBX
MOV ESI,0x2
MOV EDX,0x4
MOV ECX,0x1
MOV R8D,0xf
LAB_0019bd3b:
MOV R9D,0x5
JMP 0x0019bdb2
caseD_37:
MOV R11D,0x3
MOV R10D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x106fe
MOV ECX,0x1
MOV R8D,0x7
MOV R9D,0x3
XOR EAX,EAX
PUSH 0x7
PUSH 0x4
PUSH 0x6
PUSH R11
PUSH 0xc
PUSH R10
PUSH R11
PUSH 0x20
PUSH R10
PUSH 0x1f
PUSH R10
PUSH R11
PUSH 0x8
PUSH R10
CALL 0x0019bdd2
ADD RSP,0x70
JMP 0x0019bdbf
caseD_36:
SUB RSP,0x8
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x2
MOV ECX,0x1
MOV R8D,0x4
LAB_0019bdac:
MOV R9D,0x3
LAB_0019bdb2:
XOR EAX,EAX
PUSH 0x7
LAB_0019bdb6:
CALL 0x0019bdd2
ADD RSP,0x10
LAB_0019bdbf:
POP RBX
RET
caseD_32:
CMP ESI,0x23
JA 0x0019bdbf
ADD ESI,0x10
MOV RDI,RBX
POP RBX
JMP 0x0019c11b
|
int8 unicode_prop(int *param_1)
{
long lVar1;
uint uVar2;
int iVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int8 uVar7;
int8 uVar8;
uVar2 = unicode_find_name("ASCII_Hex_Digit,AHex");
uVar4 = 0xfffffffe;
if ((int)uVar2 < 0) {
return 0xfffffffe;
}
switch(uVar2) {
case 0x24:
iVar3 = *param_1;
if (param_1[1] < iVar3 + 2) {
iVar3 = cr_realloc(param_1);
if (iVar3 != 0) {
return 0xffffffff;
}
iVar3 = *param_1;
}
lVar1 = *(long *)(param_1 + 2);
*param_1 = iVar3 + 1;
*(int4 *)(lVar1 + (long)iVar3 * 4) = 0;
iVar3 = *param_1;
*param_1 = iVar3 + 1;
*(int4 *)(lVar1 + (long)iVar3 * 4) = 0x80;
goto LAB_0019bca6;
case 0x25:
uVar4 = unicode_prop_ops(param_1,0,0x43e,1,4,3,1,3,3,1,2,3,7);
break;
case 0x26:
iVar3 = *param_1;
if (param_1[1] < iVar3 + 2) {
iVar3 = cr_realloc(param_1);
if (iVar3 != 0) {
return 0xffffffff;
}
iVar3 = *param_1;
}
lVar1 = *(long *)(param_1 + 2);
*param_1 = iVar3 + 1;
*(int4 *)(lVar1 + (long)iVar3 * 4) = 0;
iVar3 = *param_1;
*param_1 = iVar3 + 1;
*(int4 *)(lVar1 + (long)iVar3 * 4) = 0x110000;
LAB_0019bca6:
uVar4 = 0;
break;
case 0x27:
uVar4 = unicode_prop_ops(param_1,0,1,6,7);
return uVar4;
case 0x28:
uVar4 = unicode_prop_ops(param_1,0,0xe,1,4,3,1,3,3,7);
break;
case 0x29:
uVar5 = 2;
uVar4 = 4;
uVar6 = 0xe;
goto LAB_0019bd3b;
case 0x2a:
uVar4 = 7;
goto LAB_0019bcbf;
case 0x2b:
uVar4 = 2;
goto LAB_0019bcbf;
case 0x2c:
uVar5 = 2;
uVar4 = 4;
uVar6 = 0xf;
goto LAB_0019bd3b;
case 0x2d:
uVar5 = 2;
uVar4 = 1;
uVar6 = 0xd;
goto LAB_0019bd3b;
case 0x2e:
uVar4 = 1;
LAB_0019bcbf:
uVar4 = unicode_case1(param_1,uVar4);
return uVar4;
case 0x2f:
uVar5 = 0;
uVar4 = 0x3f000141;
uVar6 = 5;
uVar7 = 3;
uVar8 = 6;
goto LAB_0019bdb6;
case 0x30:
uVar4 = 0x140;
uVar6 = 5;
goto LAB_0019bdac;
case 0x31:
uVar5 = 1;
uVar4 = 0x32;
uVar6 = 10;
LAB_0019bd3b:
uVar7 = 5;
LAB_0019bdb2:
uVar8 = 7;
LAB_0019bdb6:
uVar4 = unicode_prop_ops(param_1,uVar5,uVar4,1,uVar6,uVar7,uVar8);
break;
default:
if (uVar2 < 0x24) {
uVar4 = unicode_prop1(param_1,uVar2 + 0x10);
return uVar4;
}
break;
case 0x34:
uVar4 = 4;
uVar6 = 3;
goto LAB_0019bdac;
case 0x35:
uVar4 = 0x1000;
uVar6 = 1;
goto LAB_0019bdac;
case 0x36:
uVar4 = 2;
uVar6 = 4;
LAB_0019bdac:
uVar5 = 0;
uVar7 = 3;
goto LAB_0019bdb2;
case 0x37:
uVar4 = unicode_prop_ops(param_1,0,0x106fe,1,7,3,1,8,3,1,0x1f,1,0x20,3,1,0xc,3,6,4,7);
break;
case 0x38:
uVar4 = unicode_prop_ops(param_1,0,0x43e,1,7,3,1,0x1f,1,0x20,3,1,0xb,3,6,4,7);
}
return uVar4;
}
| |
26,709 | GetTempDir[abi:cxx11]() | ng-log[P]ng-log/src/googletest.h | static inline string GetTempDir() {
vector<string> temp_directories_list;
nglog::GetExistingTempDirectories(temp_directories_list);
if (temp_directories_list.empty()) {
fprintf(stderr, "No temporary directory found\n");
exit(EXIT_FAILURE);
}
// Use first directory from list of existing temporary directories.
return temp_directories_list.front();
} | O0 | c | GetTempDir[abi:cxx11]():
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0xc3d0
movq -0x38(%rbp), %rdi
callq 0x13b70
jmp 0xb84f
leaq -0x20(%rbp), %rdi
callq 0xc3f0
testb $0x1, %al
jne 0xb85e
jmp 0xb897
movq 0x6674b(%rip), %rax # 0x71fb0
movq (%rax), %rdi
leaq 0x42875(%rip), %rsi # 0x4e0e4
movb $0x0, %al
callq 0x9a80
movl $0x1, %edi
callq 0x98a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xc460
jmp 0xb8c1
leaq -0x20(%rbp), %rdi
callq 0xc430
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x92d0
jmp 0xb8ae
leaq -0x20(%rbp), %rdi
callq 0xc460
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x9cc0
nopw (%rax,%rax)
| _ZL10GetTempDirB5cxx11v:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_48], rdi
mov rax, rdi
mov [rbp+var_40], rax
mov [rbp+var_8], rdi
lea rdi, [rbp+var_20]
mov [rbp+var_38], rdi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov rdi, [rbp+var_38]
call _ZN5nglog26GetExistingTempDirectoriesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE; nglog::GetExistingTempDirectories(std::vector<std::string> &)
jmp short $+2
loc_B84F:
lea rdi, [rbp+var_20]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void)
test al, 1
jnz short loc_B85E
jmp short loc_B897
loc_B85E:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aNoTemporaryDir; "No temporary directory found\n"
mov al, 0
call _fprintf
mov edi, 1
call _exit
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
lea rdi, [rbp+var_20]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_B8C1
loc_B897:
lea rdi, [rbp+var_20]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5frontEv; std::vector<std::string>::front(void)
mov rdi, [rbp+var_48]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_B8AE:
lea rdi, [rbp+var_20]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, [rbp+var_40]
add rsp, 50h
pop rbp
retn
loc_B8C1:
mov rdi, [rbp+var_28]
call __Unwind_Resume
| long long GetTempDir[abi:cxx11](long long a1)
{
long long v1; // rax
_BYTE v3[24]; // [rsp+30h] [rbp-20h] BYREF
long long v4; // [rsp+48h] [rbp-8h]
v4 = a1;
std::vector<std::string>::vector();
nglog::GetExistingTempDirectories(v3);
if ( (std::vector<std::string>::empty(v3) & 1) != 0 )
{
fprintf(stderr, "No temporary directory found\n");
exit(1LL);
}
v1 = std::vector<std::string>::front(v3);
std::string::basic_string(a1, v1);
std::vector<std::string>::~vector(v3);
return a1;
}
| GetTempDir[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x48],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x20]
MOV qword ptr [RBP + -0x38],RDI
CALL 0x0010c3d0
MOV RDI,qword ptr [RBP + -0x38]
LAB_0010b848:
CALL 0x00113b70
JMP 0x0010b84f
LAB_0010b84f:
LEA RDI,[RBP + -0x20]
CALL 0x0010c3f0
TEST AL,0x1
JNZ 0x0010b85e
JMP 0x0010b897
LAB_0010b85e:
MOV RAX,qword ptr [0x00171fb0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x14e0e4]
MOV AL,0x0
CALL 0x00109a80
MOV EDI,0x1
CALL 0x001098a0
LAB_0010b897:
LEA RDI,[RBP + -0x20]
CALL 0x0010c430
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,RAX
CALL 0x001092d0
LAB_0010b8ac:
JMP 0x0010b8ae
LAB_0010b8ae:
LEA RDI,[RBP + -0x20]
CALL 0x0010c460
MOV RAX,qword ptr [RBP + -0x40]
ADD RSP,0x50
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* GetTempDir[abi:cxx11]() */
string * GetTempDir_abi_cxx11_(void)
{
ulong uVar1;
string *psVar2;
string *in_RDI;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_28 [32];
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_28);
/* try { // try from 0010b848 to 0010b8ab has its CatchHandler @ 0010b880 */
nglog::GetExistingTempDirectories((vector *)local_28);
uVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty(local_28);
if ((uVar1 & 1) == 0) {
psVar2 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::front(local_28)
;
std::__cxx11::string::string(in_RDI,psVar2);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_28);
return in_RDI;
}
fprintf(*(FILE **)PTR_stderr_00171fb0,"No temporary directory found\n");
/* WARNING: Subroutine does not return */
exit(1);
}
| |
26,710 | ast_create_vector | eshkol/src/frontend/ast/create/ast_create.c | AstNode* ast_create_vector(Arena* arena, AstNode** elements, size_t count, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_LITERAL_VECTOR, line, column);
if (!node) {
return NULL;
}
node->as.vector.elements = elements;
node->as.vector.count = count;
return node;
} | O3 | c | ast_create_vector:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl $0x4, %esi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x86f0
testq %rax, %rax
je 0x884a
movq %r14, 0x48(%rax)
movq %rbx, 0x50(%rax)
popq %rbx
popq %r14
popq %rbp
retq
| ast_create_vector:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov esi, 4
mov rdx, rcx
mov rcx, r8
call ast_create_node
test rax, rax
jz short loc_884A
mov [rax+48h], r14
mov [rax+50h], rbx
loc_884A:
pop rbx
pop r14
pop rbp
retn
| long long ast_create_vector(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long result; // rax
result = ast_create_node(a1, 4, a4, a5);
if ( result )
{
*(_QWORD *)(result + 72) = a2;
*(_QWORD *)(result + 80) = a3;
}
return result;
}
| ast_create_vector:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV ESI,0x4
MOV RDX,RCX
MOV RCX,R8
CALL 0x001086f0
TEST RAX,RAX
JZ 0x0010884a
MOV qword ptr [RAX + 0x48],R14
MOV qword ptr [RAX + 0x50],RBX
LAB_0010884a:
POP RBX
POP R14
POP RBP
RET
|
void ast_create_vector(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
long lVar1;
lVar1 = ast_create_node(param_1,4,param_4,param_5);
if (lVar1 != 0) {
*(int8 *)(lVar1 + 0x48) = param_2;
*(int8 *)(lVar1 + 0x50) = param_3;
}
return;
}
| |
26,711 | ma_get_length | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static long ma_get_length(MYSQL_STMT *stmt, unsigned int param_nr, unsigned long row_nr)
{
if (!stmt->params[param_nr].length)
return 0;
if (stmt->param_callback)
return (long)*stmt->params[param_nr].length;
if (stmt->row_size)
return *(long *)((char *)stmt->params[param_nr].length + row_nr * stmt->row_size);
else
return stmt->params[param_nr].length[row_nr];
} | O0 | c | ma_get_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x41a14
movq $0x0, -0x8(%rbp)
jmp 0x41a9e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x390(%rax)
je 0x41a40
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x41a9e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x370(%rax)
je 0x41a7d
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rdx
imulq 0x370(%rdx), %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x8(%rbp)
jmp 0x41a9e
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_get_length:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
cmp qword ptr [rax], 0
jnz short loc_41A14
mov [rbp+var_8], 0
jmp loc_41A9E
loc_41A14:
mov rax, [rbp+var_10]
cmp qword ptr [rax+390h], 0
jz short loc_41A40
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_8], rax
jmp short loc_41A9E
loc_41A40:
mov rax, [rbp+var_10]
cmp qword ptr [rax+370h], 0
jz short loc_41A7D
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax]
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_10]
imul rcx, [rdx+370h]
mov rax, [rax+rcx]
mov [rbp+var_8], rax
jmp short loc_41A9E
loc_41A7D:
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax]
mov rcx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov [rbp+var_8], rax
loc_41A9E:
mov rax, [rbp+var_8]
pop rbp
retn
| long long ma_get_length(_QWORD *a1, unsigned int a2, long long a3)
{
if ( !*(_QWORD *)(112LL * a2 + a1[14]) )
return 0LL;
if ( a1[114] )
return **(_QWORD **)(112LL * a2 + a1[14]);
if ( a1[110] )
return *(_QWORD *)(*(_QWORD *)(112LL * a2 + a1[14]) + a1[110] * a3);
return *(_QWORD *)(*(_QWORD *)(112LL * a2 + a1[14]) + 8 * a3);
}
| ma_get_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
CMP qword ptr [RAX],0x0
JNZ 0x00141a14
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00141a9e
LAB_00141a14:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x390],0x0
JZ 0x00141a40
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00141a9e
LAB_00141a40:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x370],0x0
JZ 0x00141a7d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RDX + 0x370]
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00141a9e
LAB_00141a7d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x8],RAX
LAB_00141a9e:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int8 ma_get_length(long param_1,uint param_2,long param_3)
{
int8 local_10;
if (*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70) == 0) {
local_10 = 0;
}
else if (*(long *)(param_1 + 0x390) == 0) {
if (*(long *)(param_1 + 0x370) == 0) {
local_10 = *(int8 *)
(*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70) + param_3 * 8);
}
else {
local_10 = *(int8 *)
(*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70) +
param_3 * *(long *)(param_1 + 0x370));
}
}
else {
local_10 = **(int8 **)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70);
}
return local_10;
}
| |
26,712 | (anonymous namespace)::msgpack23_WrongFormatForBoolTest_Test::~msgpack23_WrongFormatForBoolTest_Test() | msgpack23/tests/exception_tests.cpp | TEST(msgpack23, WrongFormatForBoolTest) {
msgpack23::Packer packer{};
constexpr double expected{3.1415};
auto const data = packer(expected);
bool actual;
msgpack23::Unpacker unpacker{};
EXPECT_THROW(unpacker(actual), std::logic_error);
} | O0 | cpp | (anonymous namespace)::msgpack23_WrongFormatForBoolTest_Test::~msgpack23_WrongFormatForBoolTest_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x3c1d0
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0x16580
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN12_GLOBAL__N_137msgpack23_WrongFormatForBoolTest_TestD0Ev:
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 _ZN12_GLOBAL__N_137msgpack23_WrongFormatForBoolTest_TestD2Ev; `anonymous namespace'::msgpack23_WrongFormatForBoolTest_Test::~msgpack23_WrongFormatForBoolTest_Test()
mov rdi, [rbp+var_10]; void *
mov esi, 10h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
| void `anonymous namespace'::msgpack23_WrongFormatForBoolTest_Test::~msgpack23_WrongFormatForBoolTest_Test(
_anonymous_namespace_::msgpack23_WrongFormatForBoolTest_Test *this)
{
`anonymous namespace'::msgpack23_WrongFormatForBoolTest_Test::~msgpack23_WrongFormatForBoolTest_Test(this);
operator delete(this, 0x10uLL);
}
| ~msgpack23_WrongFormatForBoolTest_Test:
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 0x0013c1d0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x10
CALL 0x00116580
ADD RSP,0x10
POP RBP
RET
|
/* (anonymous
namespace)::msgpack23_WrongFormatForBoolTest_Test::~msgpack23_WrongFormatForBoolTest_Test() */
void __thiscall
(anonymous_namespace)::msgpack23_WrongFormatForBoolTest_Test::~msgpack23_WrongFormatForBoolTest_Test
(msgpack23_WrongFormatForBoolTest_Test *this)
{
~msgpack23_WrongFormatForBoolTest_Test(this);
operator_delete(this,0x10);
return;
}
| |
26,713 | minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | SubscriptExpr(const Location & location, std::shared_ptr<Expression> && b, std::shared_ptr<Expression> && i)
: Expression(location), base(std::move(b)), index(std::move(i)) {} | O2 | cpp | minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x62cfa
leaq 0x93ce2(%rip), %rax # 0xfe768
addq $0x10, %rax
movq %rax, (%r15)
andq $0x0, 0x28(%r15)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x20(%r15)
andq $0x0, (%r14)
andq $0x0, 0x38(%r15)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r15)
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
| _ZN5minja13SubscriptExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, _ZTVN5minja13SubscriptExprE; `vtable for'minja::SubscriptExpr
add rax, 10h
mov [r15], rax
and qword ptr [r15+28h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r15+20h], xmm0
and qword ptr [r14], 0
and qword ptr [r15+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r15+30h], xmm0
and qword ptr [rbx], 0
pop rbx
pop r14
pop r15
retn
| long long * minja::SubscriptExpr::SubscriptExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4)
{
long long *result; // rax
__int128 v7; // xmm0
__int128 v8; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
result = &`vtable for'minja::SubscriptExpr + 2;
*(_QWORD *)a1 = &`vtable for'minja::SubscriptExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a4 = 0LL;
return result;
}
| SubscriptExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
CALL 0x00162cfa
LEA RAX,[0x1fe768]
ADD RAX,0x10
MOV qword ptr [R15],RAX
AND qword ptr [R15 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [R15 + 0x20],XMM0
AND qword ptr [R14],0x0
AND qword ptr [R15 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R15 + 0x30],XMM0
AND qword ptr [RBX],0x0
POP RBX
POP R14
POP R15
RET
|
/* minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SubscriptExpr::SubscriptExpr
(SubscriptExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_001fe778;
*(int8 *)(this + 0x28) = 0;
uVar1 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar1;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar1;
*(int8 *)param_3 = 0;
return;
}
| |
26,714 | ggml_tallocr_reset | 7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c | void ggml_tallocr_reset(ggml_tallocr_t alloc) {
alloc->n_free_blocks = 1;
size_t align_offset = aligned_offset(alloc->base, 0, alloc->alignment);
alloc->free_blocks[0].addr = (char *)alloc->base + align_offset;
if (alloc->measure) {
alloc->free_blocks[0].size = SIZE_MAX/2; // restrict maximum size of a measure allocator to half size_t max to avoid overflows
} else {
alloc->free_blocks[0].size = ggml_backend_buffer_get_size(alloc->buffer) - align_offset;
}
} | O2 | c | ggml_tallocr_reset:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x20(%rdi)
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rsi, %rax
subq %rdx, %rax
xorl %edx, %edx
divq %rsi
addq %rdx, %rcx
movq %rcx, 0x28(%rdi)
cmpb $0x0, 0x1030(%rdi)
je 0x8eeee
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
jmp 0x8eefc
movq %rdx, %r14
movq (%rbx), %rdi
callq 0x8fc5b
subq %r14, %rax
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| ggml_tallocr_reset:
push r14
push rbx
push rax
mov rbx, rdi
mov dword ptr [rdi+20h], 1
mov rcx, [rdi+10h]
mov rsi, [rdi+18h]
mov rax, rcx
xor edx, edx
div rsi
mov rax, rsi
sub rax, rdx
xor edx, edx
div rsi
add rcx, rdx
mov [rdi+28h], rcx
cmp byte ptr [rdi+1030h], 0
jz short loc_8EEEE
mov rax, 7FFFFFFFFFFFFFFFh
jmp short loc_8EEFC
loc_8EEEE:
mov r14, rdx
mov rdi, [rbx]
call ggml_backend_buffer_get_size
sub rax, r14
loc_8EEFC:
mov [rbx+30h], rax
add rsp, 8
pop rbx
pop r14
retn
| long long ggml_tallocr_reset(long long a1)
{
long long v1; // rdx
long long result; // rax
*(_DWORD *)(a1 + 32) = 1;
v1 = (*(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 16) % *(_QWORD *)(a1 + 24)) % *(_QWORD *)(a1 + 24);
*(_QWORD *)(a1 + 40) = v1 + *(_QWORD *)(a1 + 16);
if ( *(_BYTE *)(a1 + 4144) )
result = 0x7FFFFFFFFFFFFFFFLL;
else
result = ggml_backend_buffer_get_size(*(_QWORD *)a1) - v1;
*(_QWORD *)(a1 + 48) = result;
return result;
}
| ggml_tallocr_reset:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV dword ptr [RDI + 0x20],0x1
MOV RCX,qword ptr [RDI + 0x10]
MOV RSI,qword ptr [RDI + 0x18]
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV RAX,RSI
SUB RAX,RDX
XOR EDX,EDX
DIV RSI
ADD RCX,RDX
MOV qword ptr [RDI + 0x28],RCX
CMP byte ptr [RDI + 0x1030],0x0
JZ 0x0018eeee
MOV RAX,0x7fffffffffffffff
JMP 0x0018eefc
LAB_0018eeee:
MOV R14,RDX
MOV RDI,qword ptr [RBX]
CALL 0x0018fc5b
SUB RAX,R14
LAB_0018eefc:
MOV qword ptr [RBX + 0x30],RAX
ADD RSP,0x8
POP RBX
POP R14
RET
|
void ggml_tallocr_reset(int8 *param_1)
{
long lVar1;
ulong uVar2;
*(int4 *)(param_1 + 4) = 1;
uVar2 = param_1[3];
uVar2 = (uVar2 - (ulong)param_1[2] % uVar2) % uVar2;
param_1[5] = param_1[2] + uVar2;
if (*(char *)(param_1 + 0x206) == '\0') {
lVar1 = ggml_backend_buffer_get_size(*param_1);
lVar1 = lVar1 - uVar2;
}
else {
lVar1 = 0x7fffffffffffffff;
}
param_1[6] = lVar1;
return;
}
| |
26,715 | ggml_tallocr_reset | 7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c | void ggml_tallocr_reset(ggml_tallocr_t alloc) {
alloc->n_free_blocks = 1;
size_t align_offset = aligned_offset(alloc->base, 0, alloc->alignment);
alloc->free_blocks[0].addr = (char *)alloc->base + align_offset;
if (alloc->measure) {
alloc->free_blocks[0].size = SIZE_MAX/2; // restrict maximum size of a measure allocator to half size_t max to avoid overflows
} else {
alloc->free_blocks[0].size = ggml_backend_buffer_get_size(alloc->buffer) - align_offset;
}
} | O3 | c | ggml_tallocr_reset:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x20(%rdi)
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rsi, %rax
subq %rdx, %rax
xorl %edx, %edx
divq %rsi
addq %rdx, %rcx
movq %rcx, 0x28(%rdi)
cmpb $0x0, 0x1030(%rdi)
je 0xb1c84
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
jmp 0xb1c92
movq %rdx, %r14
movq (%rbx), %rdi
callq 0xb2a44
subq %r14, %rax
movq %rax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| ggml_tallocr_reset:
push r14
push rbx
push rax
mov rbx, rdi
mov dword ptr [rdi+20h], 1
mov rcx, [rdi+10h]
mov rsi, [rdi+18h]
mov rax, rcx
xor edx, edx
div rsi
mov rax, rsi
sub rax, rdx
xor edx, edx
div rsi
add rcx, rdx
mov [rdi+28h], rcx
cmp byte ptr [rdi+1030h], 0
jz short loc_B1C84
mov rax, 7FFFFFFFFFFFFFFFh
jmp short loc_B1C92
loc_B1C84:
mov r14, rdx
mov rdi, [rbx]
call ggml_backend_buffer_get_size
sub rax, r14
loc_B1C92:
mov [rbx+30h], rax
add rsp, 8
pop rbx
pop r14
retn
| long long ggml_tallocr_reset(long long a1)
{
long long v1; // rdx
long long result; // rax
*(_DWORD *)(a1 + 32) = 1;
v1 = (*(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 16) % *(_QWORD *)(a1 + 24)) % *(_QWORD *)(a1 + 24);
*(_QWORD *)(a1 + 40) = v1 + *(_QWORD *)(a1 + 16);
if ( *(_BYTE *)(a1 + 4144) )
result = 0x7FFFFFFFFFFFFFFFLL;
else
result = ggml_backend_buffer_get_size(*(_QWORD *)a1) - v1;
*(_QWORD *)(a1 + 48) = result;
return result;
}
| |||
26,716 | rak_array_new_with_capacity | fabiosvm[P]rak/src/array.c | RakArray *rak_array_new_with_capacity(int cap, RakError *err)
{
RakArray *arr = rak_memory_alloc(sizeof(*arr), err);
if (!rak_is_ok(err)) return NULL;
rak_array_init_with_capacity(arr, cap, err);
if (rak_is_ok(err)) return arr;
rak_memory_free(arr);
return NULL;
} | O1 | c | rak_array_new_with_capacity:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x18, %edi
callq 0x76e8
cmpb $0x1, (%r14)
jne 0x2434
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x22a0
cmpb $0x0, (%r14)
jne 0x2436
movq %rbx, %rdi
callq 0x7748
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
| rak_array_new_with_capacity:
push rbp
push r14
push rbx
mov r14, rsi
mov ebp, edi
mov edi, 18h
call rak_memory_alloc
cmp byte ptr [r14], 1
jnz short loc_2434
mov rbx, rax
mov rdi, rax
mov esi, ebp
mov rdx, r14
call rak_array_init_with_capacity
cmp byte ptr [r14], 0
jnz short loc_2436
mov rdi, rbx
call rak_memory_free
loc_2434:
xor ebx, ebx
loc_2436:
mov rax, rbx
pop rbx
pop r14
pop rbp
retn
| long long rak_array_new_with_capacity(int a1, _BYTE *a2)
{
long long v2; // rax
long long v3; // rbx
v2 = rak_memory_alloc(24LL);
if ( *a2 != 1 )
return 0LL;
v3 = v2;
rak_array_init_with_capacity(v2, a1, a2);
if ( !*a2 )
{
rak_memory_free(v3);
return 0LL;
}
return v3;
}
| rak_array_new_with_capacity:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV EBP,EDI
MOV EDI,0x18
CALL 0x001076e8
CMP byte ptr [R14],0x1
JNZ 0x00102434
MOV RBX,RAX
MOV RDI,RAX
MOV ESI,EBP
MOV RDX,R14
CALL 0x001022a0
CMP byte ptr [R14],0x0
JNZ 0x00102436
MOV RDI,RBX
CALL 0x00107748
LAB_00102434:
XOR EBX,EBX
LAB_00102436:
MOV RAX,RBX
POP RBX
POP R14
POP RBP
RET
|
void * rak_array_new_with_capacity(int4 param_1,char *param_2)
{
void *__ptr;
__ptr = (void *)rak_memory_alloc(0x18);
if (*param_2 == '\x01') {
rak_array_init_with_capacity(__ptr,param_1,param_2);
if (*param_2 != '\0') {
return __ptr;
}
rak_memory_free(__ptr);
}
return (void *)0x0;
}
| |
26,717 | rak_array_new_with_capacity | fabiosvm[P]rak/src/array.c | RakArray *rak_array_new_with_capacity(int cap, RakError *err)
{
RakArray *arr = rak_memory_alloc(sizeof(*arr), err);
if (!rak_is_ok(err)) return NULL;
rak_array_init_with_capacity(arr, cap, err);
if (rak_is_ok(err)) return arr;
rak_memory_free(arr);
return NULL;
} | O3 | c | rak_array_new_with_capacity:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x18, %edi
callq 0x74a4
cmpb $0x1, (%r14)
jne 0x2424
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x2290
cmpb $0x0, (%r14)
jne 0x2426
movq %rbx, %rdi
callq 0x7504
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
| rak_array_new_with_capacity:
push rbp
push r14
push rbx
mov r14, rsi
mov ebp, edi
mov edi, 18h
call rak_memory_alloc
cmp byte ptr [r14], 1
jnz short loc_2424
mov rbx, rax
mov rdi, rax
mov esi, ebp
mov rdx, r14
call rak_array_init_with_capacity
cmp byte ptr [r14], 0
jnz short loc_2426
mov rdi, rbx
call rak_memory_free
loc_2424:
xor ebx, ebx
loc_2426:
mov rax, rbx
pop rbx
pop r14
pop rbp
retn
| long long rak_array_new_with_capacity(int a1, _BYTE *a2)
{
long long v2; // rax
long long v3; // rbx
v2 = rak_memory_alloc(24LL);
if ( *a2 != 1 )
return 0LL;
v3 = v2;
rak_array_init_with_capacity(v2, a1, a2);
if ( !*a2 )
{
rak_memory_free(v3);
return 0LL;
}
return v3;
}
| rak_array_new_with_capacity:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV EBP,EDI
MOV EDI,0x18
CALL 0x001074a4
CMP byte ptr [R14],0x1
JNZ 0x00102424
MOV RBX,RAX
MOV RDI,RAX
MOV ESI,EBP
MOV RDX,R14
CALL 0x00102290
CMP byte ptr [R14],0x0
JNZ 0x00102426
MOV RDI,RBX
CALL 0x00107504
LAB_00102424:
XOR EBX,EBX
LAB_00102426:
MOV RAX,RBX
POP RBX
POP R14
POP RBP
RET
|
void * rak_array_new_with_capacity(int4 param_1,char *param_2)
{
void *__ptr;
__ptr = (void *)rak_memory_alloc(0x18);
if (*param_2 == '\x01') {
rak_array_init_with_capacity(__ptr,param_1,param_2);
if (*param_2 != '\0') {
return __ptr;
}
rak_memory_free(__ptr);
}
return (void *)0x0;
}
| |
26,718 | chess::movegen::generateQueenMoves(chess::Square, chess::Bitboard, chess::Bitboard, chess::Bitboard) | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] inline Bitboard movegen::generateQueenMoves(Square sq, Bitboard pin_d, Bitboard pin_hv,
Bitboard occ_all) {
Bitboard moves = 0ULL;
if (pin_d & Bitboard::fromSquare(sq))
moves |= attacks::bishop(sq, occ_all) & pin_d;
else if (pin_hv & Bitboard::fromSquare(sq))
moves |= attacks::rook(sq, occ_all) & pin_hv;
else {
moves |= attacks::rook(sq, occ_all);
moves |= attacks::bishop(sq, occ_all);
}
return moves;
} | O0 | cpp | chess::movegen::generateQueenMoves(chess::Square, chess::Bitboard, chess::Bitboard, chess::Bitboard):
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4da0
movl -0xc(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %edi
callq 0x56f0
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4b90
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xb730
testb $0x1, %al
jne 0x16ae9
jmp 0x16b2a
movl -0xc(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x54(%rbp), %edi
movq -0x60(%rbp), %rsi
callq 0x5980
movq %rax, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x4b90
movq %rax, -0x48(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xb7b0
jmp 0x16c28
movl -0xc(%rbp), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %edi
callq 0x56f0
movq %rax, -0x70(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4b90
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xb730
testb $0x1, %al
jne 0x16b5c
jmp 0x16bac
movl -0xc(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x8c(%rbp), %edi
movq -0x98(%rbp), %rsi
callq 0x5860
movq %rax, -0x88(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x4b90
movq %rax, -0x80(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xb7b0
jmp 0x16c26
movl -0xc(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0xa4(%rbp), %edi
movq -0xb0(%rbp), %rsi
callq 0x5860
movq %rax, -0xa0(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xb7b0
movl -0xc(%rbp), %eax
movl %eax, -0xbc(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl -0xbc(%rbp), %edi
movq -0xc8(%rbp), %rsi
callq 0x5980
movq %rax, -0xb8(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0xb7b0
jmp 0x16c28
movq -0x8(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN5chess7movegen18generateQueenMovesENS_6SquareENS_8BitboardES2_S2_:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
lea rdi, [rbp+var_8]; this
xor eax, eax
mov esi, eax; unsigned __int64
call _ZN5chess8BitboardC2Em; chess::Bitboard::Bitboard(ulong)
mov eax, [rbp+var_C]
mov [rbp+var_3C], eax
mov edi, [rbp+var_3C]
call _ZN5chess8Bitboard10fromSquareENS_6SquareE; chess::Bitboard::fromSquare(chess::Square)
mov [rbp+var_38], rax
lea rdi, [rbp+var_18]
lea rsi, [rbp+var_38]
call _ZNK5chess8BitboardanERKS0_; chess::Bitboard::operator&(chess::Bitboard const&)
mov [rbp+var_30], rax
lea rdi, [rbp+var_30]
call _ZNK5chess8BitboardcvbEv; chess::Bitboard::operator bool(void)
test al, 1
jnz short loc_16AE9
jmp short loc_16B2A
loc_16AE9:
mov eax, [rbp+var_C]
mov [rbp+var_54], eax
mov rax, [rbp+var_28]
mov [rbp+var_60], rax
mov edi, [rbp+var_54]
mov rsi, [rbp+var_60]
call _ZN5chess7attacks6bishopENS_6SquareENS_8BitboardE; chess::attacks::bishop(chess::Square,chess::Bitboard)
mov [rbp+var_50], rax
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_18]
call _ZNK5chess8BitboardanERKS0_; chess::Bitboard::operator&(chess::Bitboard const&)
mov [rbp+var_48], rax
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_48]
call _ZN5chess8BitboardoRERKS0_; chess::Bitboard::operator|=(chess::Bitboard const&)
jmp loc_16C28
loc_16B2A:
mov eax, [rbp+var_C]
mov [rbp+var_74], eax
mov edi, [rbp+var_74]
call _ZN5chess8Bitboard10fromSquareENS_6SquareE; chess::Bitboard::fromSquare(chess::Square)
mov [rbp+var_70], rax
lea rdi, [rbp+var_20]
lea rsi, [rbp+var_70]
call _ZNK5chess8BitboardanERKS0_; chess::Bitboard::operator&(chess::Bitboard const&)
mov [rbp+var_68], rax
lea rdi, [rbp+var_68]
call _ZNK5chess8BitboardcvbEv; chess::Bitboard::operator bool(void)
test al, 1
jnz short loc_16B5C
jmp short loc_16BAC
loc_16B5C:
mov eax, [rbp+var_C]
mov [rbp+var_8C], eax
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
mov edi, [rbp+var_8C]
mov rsi, [rbp+var_98]
call _ZN5chess7attacks4rookENS_6SquareENS_8BitboardE; chess::attacks::rook(chess::Square,chess::Bitboard)
mov [rbp+var_88], rax
lea rdi, [rbp+var_88]
lea rsi, [rbp+var_20]
call _ZNK5chess8BitboardanERKS0_; chess::Bitboard::operator&(chess::Bitboard const&)
mov [rbp+var_80], rax
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_80]
call _ZN5chess8BitboardoRERKS0_; chess::Bitboard::operator|=(chess::Bitboard const&)
jmp short loc_16C26
loc_16BAC:
mov eax, [rbp+var_C]
mov [rbp+var_A4], eax
mov rax, [rbp+var_28]
mov [rbp+var_B0], rax
mov edi, [rbp+var_A4]
mov rsi, [rbp+var_B0]
call _ZN5chess7attacks4rookENS_6SquareENS_8BitboardE; chess::attacks::rook(chess::Square,chess::Bitboard)
mov [rbp+var_A0], rax
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_A0]
call _ZN5chess8BitboardoRERKS0_; chess::Bitboard::operator|=(chess::Bitboard const&)
mov eax, [rbp+var_C]
mov [rbp+var_BC], eax
mov rax, [rbp+var_28]
mov [rbp+var_C8], rax
mov edi, [rbp+var_BC]
mov rsi, [rbp+var_C8]
call _ZN5chess7attacks6bishopENS_6SquareENS_8BitboardE; chess::attacks::bishop(chess::Square,chess::Bitboard)
mov [rbp+var_B8], rax
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_B8]
call _ZN5chess8BitboardoRERKS0_; chess::Bitboard::operator|=(chess::Bitboard const&)
loc_16C26:
jmp short $+2
loc_16C28:
mov rax, [rbp+var_8]
add rsp, 0D0h
pop rbp
retn
| long long chess::movegen::generateQueenMoves(int a1, long long a2, long long a3, long long a4)
{
_QWORD v5[2]; // [rsp+18h] [rbp-B8h] BYREF
int v6; // [rsp+2Ch] [rbp-A4h]
_QWORD v7[2]; // [rsp+30h] [rbp-A0h] BYREF
int v8; // [rsp+44h] [rbp-8Ch]
long long v9; // [rsp+48h] [rbp-88h] BYREF
long long v10; // [rsp+50h] [rbp-80h] BYREF
int v11; // [rsp+5Ch] [rbp-74h]
long long v12; // [rsp+60h] [rbp-70h] BYREF
_QWORD v13[2]; // [rsp+68h] [rbp-68h] BYREF
int v14; // [rsp+7Ch] [rbp-54h]
long long v15; // [rsp+80h] [rbp-50h] BYREF
long long v16; // [rsp+88h] [rbp-48h] BYREF
int v17; // [rsp+94h] [rbp-3Ch]
long long v18; // [rsp+98h] [rbp-38h] BYREF
long long v19; // [rsp+A0h] [rbp-30h] BYREF
long long v20; // [rsp+A8h] [rbp-28h]
long long v21; // [rsp+B0h] [rbp-20h] BYREF
long long v22; // [rsp+B8h] [rbp-18h] BYREF
int v23; // [rsp+C4h] [rbp-Ch]
long long v24; // [rsp+C8h] [rbp-8h] BYREF
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
chess::Bitboard::Bitboard((chess::Bitboard *)&v24, 0LL);
v17 = a1;
v18 = chess::Bitboard::fromSquare(a1);
v19 = chess::Bitboard::operator&(&v22, &v18);
if ( chess::Bitboard::operator bool(&v19) )
{
v14 = v23;
v13[1] = v20;
v15 = chess::attacks::bishop(v23, v20);
v16 = chess::Bitboard::operator&(&v15, &v22);
chess::Bitboard::operator|=(&v24, &v16);
}
else
{
v11 = v23;
v12 = chess::Bitboard::fromSquare(v23);
v13[0] = chess::Bitboard::operator&(&v21, &v12);
if ( chess::Bitboard::operator bool(v13) )
{
v8 = v23;
v7[1] = v20;
v9 = chess::attacks::rook(v23, v20);
v10 = chess::Bitboard::operator&(&v9, &v21);
chess::Bitboard::operator|=(&v24, &v10);
}
else
{
v6 = v23;
v5[1] = v20;
v7[0] = chess::attacks::rook(v23, v20);
chess::Bitboard::operator|=(&v24, v7);
v5[0] = chess::attacks::bishop(v23, v20);
chess::Bitboard::operator|=(&v24, v5);
}
}
return v24;
}
| generateQueenMoves:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
LEA RDI,[RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00104da0
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x3c],EAX
MOV EDI,dword ptr [RBP + -0x3c]
CALL 0x001056f0
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[RBP + -0x18]
LEA RSI,[RBP + -0x38]
CALL 0x00104b90
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[RBP + -0x30]
CALL 0x0010b730
TEST AL,0x1
JNZ 0x00116ae9
JMP 0x00116b2a
LAB_00116ae9:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x60],RAX
MOV EDI,dword ptr [RBP + -0x54]
MOV RSI,qword ptr [RBP + -0x60]
CALL 0x00105980
MOV qword ptr [RBP + -0x50],RAX
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x18]
CALL 0x00104b90
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0x48]
CALL 0x0010b7b0
JMP 0x00116c28
LAB_00116b2a:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x74],EAX
MOV EDI,dword ptr [RBP + -0x74]
CALL 0x001056f0
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[RBP + -0x20]
LEA RSI,[RBP + -0x70]
CALL 0x00104b90
MOV qword ptr [RBP + -0x68],RAX
LEA RDI,[RBP + -0x68]
CALL 0x0010b730
TEST AL,0x1
JNZ 0x00116b5c
JMP 0x00116bac
LAB_00116b5c:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x8c],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
MOV EDI,dword ptr [RBP + -0x8c]
MOV RSI,qword ptr [RBP + -0x98]
CALL 0x00105860
MOV qword ptr [RBP + -0x88],RAX
LEA RDI,[RBP + -0x88]
LEA RSI,[RBP + -0x20]
CALL 0x00104b90
MOV qword ptr [RBP + -0x80],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0x80]
CALL 0x0010b7b0
JMP 0x00116c26
LAB_00116bac:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xb0],RAX
MOV EDI,dword ptr [RBP + -0xa4]
MOV RSI,qword ptr [RBP + -0xb0]
CALL 0x00105860
MOV qword ptr [RBP + -0xa0],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0xa0]
CALL 0x0010b7b0
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xbc],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xc8],RAX
MOV EDI,dword ptr [RBP + -0xbc]
MOV RSI,qword ptr [RBP + -0xc8]
CALL 0x00105980
MOV qword ptr [RBP + -0xb8],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0xb8]
CALL 0x0010b7b0
LAB_00116c26:
JMP 0x00116c28
LAB_00116c28:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xd0
POP RBP
RET
|
/* chess::movegen::generateQueenMoves(chess::Square, chess::Bitboard, chess::Bitboard,
chess::Bitboard) */
int8
chess::movegen::generateQueenMoves
(int4 param_1,int8 param_2,int8 param_3,int8 param_4)
{
bool bVar1;
int8 local_c0;
int8 local_b8;
int4 local_ac;
int8 local_a8;
int8 local_a0;
int4 local_94;
int8 local_90;
int8 local_88;
int4 local_7c;
int8 local_78;
int8 local_70;
int8 local_68;
int4 local_5c;
int8 local_58;
int8 local_50;
int4 local_44;
int8 local_40;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int4 local_14;
int8 local_10;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_14 = param_1;
Bitboard::Bitboard((Bitboard *)&local_10,0);
local_44 = local_14;
local_40 = Bitboard::fromSquare(local_14);
local_38 = Bitboard::operator&((Bitboard *)&local_20,(Bitboard *)&local_40);
bVar1 = Bitboard::operator_cast_to_bool((Bitboard *)&local_38);
if (bVar1) {
local_5c = local_14;
local_68 = local_30;
local_58 = attacks::bishop(local_14,local_30);
local_50 = Bitboard::operator&((Bitboard *)&local_58,(Bitboard *)&local_20);
Bitboard::operator|=((Bitboard *)&local_10,(Bitboard *)&local_50);
}
else {
local_7c = local_14;
local_78 = Bitboard::fromSquare(local_14);
local_70 = Bitboard::operator&((Bitboard *)&local_28,(Bitboard *)&local_78);
bVar1 = Bitboard::operator_cast_to_bool((Bitboard *)&local_70);
if (bVar1) {
local_94 = local_14;
local_a0 = local_30;
local_90 = attacks::rook(local_14,local_30);
local_88 = Bitboard::operator&((Bitboard *)&local_90,(Bitboard *)&local_28);
Bitboard::operator|=((Bitboard *)&local_10,(Bitboard *)&local_88);
}
else {
local_ac = local_14;
local_b8 = local_30;
local_a8 = attacks::rook(local_14,local_30);
Bitboard::operator|=((Bitboard *)&local_10,(Bitboard *)&local_a8);
local_c0 = attacks::bishop(local_14,local_30);
Bitboard::operator|=((Bitboard *)&local_10,(Bitboard *)&local_c0);
}
}
return local_10;
}
| |
26,719 | chess::movegen::generateQueenMoves(chess::Square, chess::Bitboard, chess::Bitboard, chess::Bitboard) | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] inline Bitboard movegen::generateQueenMoves(Square sq, Bitboard pin_d, Bitboard pin_hv,
Bitboard occ_all) {
Bitboard moves = 0ULL;
if (pin_d & Bitboard::fromSquare(sq))
moves |= attacks::bishop(sq, occ_all) & pin_d;
else if (pin_hv & Bitboard::fromSquare(sq))
moves |= attacks::rook(sq, occ_all) & pin_hv;
else {
moves |= attacks::rook(sq, occ_all);
moves |= attacks::bishop(sq, occ_all);
}
return moves;
} | O2 | cpp | chess::movegen::generateQueenMoves(chess::Square, chess::Bitboard, chess::Bitboard, chess::Bitboard):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %ebp
callq 0x2f8c
testq %r12, %rax
je 0x8ae5
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2fe4
movq %rax, %r15
andq %r12, %r15
jmp 0x8b13
movl %ebp, %edi
callq 0x2f8c
movq %rax, %r12
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2fba
movq %rax, %r15
testq %r14, %r12
je 0x8b06
andq %r14, %r15
jmp 0x8b13
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2fe4
orq %rax, %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN5chess7movegen18generateQueenMovesENS_6SquareENS_8BitboardES2_S2_:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rcx
mov r14, rdx
mov r12, rsi
mov ebp, edi
call _ZN5chess8Bitboard10fromSquareENS_6SquareE; chess::Bitboard::fromSquare(chess::Square)
test rax, r12
jz short loc_8AE5
mov edi, ebp
mov rsi, rbx
call _ZN5chess7attacks6bishopENS_6SquareENS_8BitboardE; chess::attacks::bishop(chess::Square,chess::Bitboard)
mov r15, rax
and r15, r12
jmp short loc_8B13
loc_8AE5:
mov edi, ebp
call _ZN5chess8Bitboard10fromSquareENS_6SquareE; chess::Bitboard::fromSquare(chess::Square)
mov r12, rax
mov edi, ebp
mov rsi, rbx
call _ZN5chess7attacks4rookENS_6SquareENS_8BitboardE; chess::attacks::rook(chess::Square,chess::Bitboard)
mov r15, rax
test r12, r14
jz short loc_8B06
and r15, r14
jmp short loc_8B13
loc_8B06:
mov edi, ebp
mov rsi, rbx
call _ZN5chess7attacks6bishopENS_6SquareENS_8BitboardE; chess::attacks::bishop(chess::Square,chess::Bitboard)
or r15, rax
loc_8B13:
mov rax, r15
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long chess::movegen::generateQueenMoves(unsigned int a1, long long a2, long long a3, unsigned long long a4)
{
long long v7; // r12
long long v8; // rax
if ( (a2 & chess::Bitboard::fromSquare(a1)) != 0 )
return a2 & chess::attacks::bishop(a1, a4);
v7 = chess::Bitboard::fromSquare(a1);
v8 = chess::attacks::rook(a1, a4);
if ( (a3 & v7) != 0 )
return a3 & v8;
else
return chess::attacks::bishop(a1, a4) | v8;
}
| generateQueenMoves:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R12,RSI
MOV EBP,EDI
CALL 0x00102f8c
TEST RAX,R12
JZ 0x00108ae5
MOV EDI,EBP
MOV RSI,RBX
CALL 0x00102fe4
MOV R15,RAX
AND R15,R12
JMP 0x00108b13
LAB_00108ae5:
MOV EDI,EBP
CALL 0x00102f8c
MOV R12,RAX
MOV EDI,EBP
MOV RSI,RBX
CALL 0x00102fba
MOV R15,RAX
TEST R12,R14
JZ 0x00108b06
AND R15,R14
JMP 0x00108b13
LAB_00108b06:
MOV EDI,EBP
MOV RSI,RBX
CALL 0x00102fe4
OR R15,RAX
LAB_00108b13:
MOV RAX,R15
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* chess::movegen::generateQueenMoves(chess::Square, chess::Bitboard, chess::Bitboard,
chess::Bitboard) */
ulong chess::movegen::generateQueenMoves
(int4 param_1,ulong param_2,ulong param_3,int8 param_4)
{
ulong uVar1;
ulong uVar2;
uVar1 = Bitboard::fromSquare();
if ((uVar1 & param_2) == 0) {
uVar2 = Bitboard::fromSquare(param_1);
uVar1 = attacks::rook(param_1,param_4);
if ((uVar2 & param_3) == 0) {
uVar2 = attacks::bishop(param_1,param_4);
uVar1 = uVar1 | uVar2;
}
else {
uVar1 = uVar1 & param_3;
}
}
else {
uVar1 = attacks::bishop(param_1,param_4);
uVar1 = uVar1 & param_2;
}
return uVar1;
}
| |
26,720 | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b)
: TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) {
for (size_t i = 0; i < params.size(); ++i) {
const auto & name = params[i].first;
if (!name.empty()) {
named_param_positions[name] = i;
}
}
} | O3 | cpp | minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %r12
cmpq %r12, %r15
je 0xb7925
movq (%rsi), %rbx
movq 0x8(%rsi), %r14
cmpq %r14, 0x8(%r15)
jne 0xb791c
movb $0x1, %bpl
testq %r14, %r14
je 0xb7927
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1bac0
testl %eax, %eax
je 0xb7927
addq $0x70, %r15
cmpq %r12, %r15
jne 0xb78fc
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN5minja14ArgumentsValue9has_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
mov r15, [rdi+18h]
mov r12, [rdi+20h]
cmp r15, r12
jz short loc_B7925
mov rbx, [rsi]
mov r14, [rsi+8]
loc_B78FC:
cmp [r15+8], r14
jnz short loc_B791C
mov bpl, 1
test r14, r14
jz short loc_B7927
mov rdi, [r15]
mov rsi, rbx
mov rdx, r14
call _bcmp
test eax, eax
jz short loc_B7927
loc_B791C:
add r15, 70h ; 'p'
cmp r15, r12
jnz short loc_B78FC
loc_B7925:
xor ebp, ebp
loc_B7927:
mov eax, ebp
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long minja::ArgumentsValue::has_named(long long a1, long long *a2)
{
unsigned int v2; // ebp
_QWORD *v3; // r15
_QWORD *v4; // r12
long long v5; // rbx
long long v6; // r14
v3 = *(_QWORD **)(a1 + 24);
v4 = *(_QWORD **)(a1 + 32);
if ( v3 == v4 )
{
return 0;
}
else
{
v5 = *a2;
v6 = a2[1];
while ( 1 )
{
if ( v3[1] == v6 )
{
LOBYTE(v2) = 1;
if ( !v6 || !(unsigned int)bcmp(*v3, v5) )
break;
}
v3 += 14;
if ( v3 == v4 )
return 0;
}
}
return v2;
}
| has_named:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,qword ptr [RDI + 0x18]
MOV R12,qword ptr [RDI + 0x20]
CMP R15,R12
JZ 0x001b7925
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
LAB_001b78fc:
CMP qword ptr [R15 + 0x8],R14
JNZ 0x001b791c
MOV BPL,0x1
TEST R14,R14
JZ 0x001b7927
MOV RDI,qword ptr [R15]
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011bac0
TEST EAX,EAX
JZ 0x001b7927
LAB_001b791c:
ADD R15,0x70
CMP R15,R12
JNZ 0x001b78fc
LAB_001b7925:
XOR EBP,EBP
LAB_001b7927:
MOV EAX,EBP
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* minja::ArgumentsValue::has_named(std::__cxx11::string const&) */
ulong __thiscall minja::ArgumentsValue::has_named(ArgumentsValue *this,string *param_1)
{
int8 *puVar1;
void *__s2;
size_t __n;
int iVar2;
ulong unaff_RBP;
int8 *puVar3;
puVar3 = *(int8 **)(this + 0x18);
puVar1 = *(int8 **)(this + 0x20);
if (puVar3 != puVar1) {
__s2 = *(void **)param_1;
__n = *(size_t *)(param_1 + 8);
do {
if (puVar3[1] == __n) {
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),1);
if (__n == 0) goto LAB_001b7927;
iVar2 = bcmp((void *)*puVar3,__s2,__n);
if (iVar2 == 0) goto LAB_001b7927;
}
puVar3 = puVar3 + 0xe;
} while (puVar3 != puVar1);
}
unaff_RBP = 0;
LAB_001b7927:
return unaff_RBP & 0xffffffff;
}
| |
26,721 | chess::uci::moveToUci[abi:cxx11](chess::Move const&, bool) | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] static std::string moveToUci(const Move &move, bool chess960 = false) noexcept(false) {
// Get the from and to squares
Square from_sq = move.from();
Square to_sq = move.to();
// If the move is not a chess960 castling move and is a king moving more than one square,
// update the to square to be the correct square for a regular castling move
if (!chess960 && move.typeOf() == Move::CASTLING) {
to_sq = Square(to_sq > from_sq ? File::FILE_G : File::FILE_C, from_sq.rank());
}
std::stringstream ss;
// Add the from and to squares to the string stream
ss << from_sq;
ss << to_sq;
// If the move is a promotion, add the promoted piece to the string stream
if (move.typeOf() == Move::PROMOTION) {
ss << static_cast<std::string>(move.promotionType());
}
return ss.str();
} | O0 | cpp | chess::uci::moveToUci[abi:cxx11](chess::Move const&, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp # imm = 0x210
movq %rdi, -0x1f8(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x1f0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
callq 0x197a0
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x197e0
movl %eax, -0x1c(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x1e0a2
movq -0x10(%rbp), %rdi
callq 0x19820
movzwl %ax, %eax
cmpl $0xc000, %eax # imm = 0xC000
jne 0x1e0a2
leaq -0x1c(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x122a0
movb %al, %cl
movb $0x6, %al
movb $0x2, %dl
movb %dl, -0x1fa(%rbp)
testb $0x1, %cl
movb %al, -0x1f9(%rbp)
jne 0x1e06c
movb -0x1fa(%rbp), %al
movb %al, -0x1f9(%rbp)
movb -0x1f9(%rbp), %al
leaq -0x21(%rbp), %rdi
movzbl %al, %esi
callq 0x4c50
leaq -0x18(%rbp), %rdi
callq 0x4bd0
movl %eax, -0x28(%rbp)
movb -0x21(%rbp), %al
movl -0x28(%rbp), %edx
leaq -0x20(%rbp), %rdi
movzbl %al, %esi
callq 0x122c0
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x31e0
leaq -0x1a0(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x1e2d0
jmp 0x1e0c0
leaq -0x1a0(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x1e2d0
jmp 0x1e0d2
movq -0x10(%rbp), %rdi
callq 0x19820
movzwl %ax, %eax
cmpl $0x4000, %eax # imm = 0x4000
jne 0x1e172
leaq -0x1a0(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a3b0
movb %al, -0x1e1(%rbp)
leaq -0x1e0(%rbp), %rdi
leaq -0x1e1(%rbp), %rsi
callq 0x19dd0
jmp 0x1e11b
movq -0x208(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x3280
jmp 0x1e130
leaq -0x1e0(%rbp), %rdi
callq 0x3180
jmp 0x1e172
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
jmp 0x1e1a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3180
jmp 0x1e1a3
movq -0x1f8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x32b0
jmp 0x1e187
leaq -0x1b0(%rbp), %rdi
callq 0x3220
movq -0x1f0(%rbp), %rax
addq $0x210, %rsp # imm = 0x210
popq %rbp
retq
leaq -0x1b0(%rbp), %rdi
callq 0x3220
movq -0x1b8(%rbp), %rdi
callq 0x34d0
nopl (%rax,%rax)
| _ZN5chess3uci9moveToUciB5cxx11ERKNS_4MoveEb:
push rbp
mov rbp, rsp
sub rsp, 210h
mov [rbp+var_1F8], rdi
mov al, dl
mov rcx, rdi
mov [rbp+var_1F0], rcx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
and al, 1
mov [rbp+var_11], al
mov rdi, [rbp+var_10]; this
call _ZNK5chess4Move4fromEv; chess::Move::from(void)
mov [rbp+var_18], eax
mov rdi, [rbp+var_10]; this
call _ZNK5chess4Move2toEv; chess::Move::to(void)
mov [rbp+var_1C], eax
test [rbp+var_11], 1
jnz short loc_1E0A2
mov rdi, [rbp+var_10]; this
call _ZNK5chess4Move6typeOfEv; chess::Move::typeOf(void)
movzx eax, ax
cmp eax, 0C000h
jnz short loc_1E0A2
lea rdi, [rbp+var_1C]
lea rsi, [rbp+var_18]
call _ZNK5chess6SquaregtERKS0_; chess::Square::operator>(chess::Square const&)
mov cl, al
mov al, 6
mov dl, 2
mov [rbp+var_1FA], dl
test cl, 1
mov [rbp+var_1F9], al
jnz short loc_1E06C
mov al, [rbp+var_1FA]
mov [rbp+var_1F9], al
loc_1E06C:
mov al, [rbp+var_1F9]
lea rdi, [rbp+var_21]
movzx esi, al
call _ZN5chess4FileC2ENS0_10underlyingE; chess::File::File(chess::File::underlying)
lea rdi, [rbp+var_18]; this
call _ZNK5chess6Square4rankEv; chess::Square::rank(void)
mov [rbp+var_28], eax
mov al, [rbp+var_21]
mov edx, [rbp+var_28]
lea rdi, [rbp+var_20]
movzx esi, al
call _ZN5chess6SquareC2ENS_4FileENS_4RankE; chess::Square::Square(chess::File,chess::Rank)
mov eax, [rbp+var_20]
mov [rbp+var_1C], eax
loc_1E0A2:
lea rdi, [rbp+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rbp+var_1A0]
lea rsi, [rbp+var_18]
call _ZN5chesslsERSoRKNS_6SquareE; chess::operator<<(std::ostream &,chess::Square const&)
jmp short $+2
loc_1E0C0:
lea rdi, [rbp+var_1A0]
lea rsi, [rbp+var_1C]
call _ZN5chesslsERSoRKNS_6SquareE; chess::operator<<(std::ostream &,chess::Square const&)
jmp short $+2
loc_1E0D2:
mov rdi, [rbp+var_10]; this
call _ZNK5chess4Move6typeOfEv; chess::Move::typeOf(void)
movzx eax, ax
cmp eax, 4000h
jnz loc_1E172
lea rax, [rbp+var_1A0]
mov [rbp+var_208], rax
mov rdi, [rbp+var_10]; this
call _ZNK5chess4Move13promotionTypeEv; chess::Move::promotionType(void)
mov [rbp+var_1E1], al
lea rdi, [rbp+var_1E0]
lea rsi, [rbp+var_1E1]
call _ZNK5chess9PieceTypecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; chess::PieceType::operator std::string(void)
jmp short $+2
loc_1E11B:
mov rdi, [rbp+var_208]
lea rsi, [rbp+var_1E0]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_1E130:
lea rdi, [rbp+var_1E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_1E172
mov rcx, rax
mov eax, edx
mov [rbp+var_1B8], rcx
mov [rbp+var_1BC], eax
jmp short loc_1E1A3
mov rcx, rax
mov eax, edx
mov [rbp+var_1B8], rcx
mov [rbp+var_1BC], eax
lea rdi, [rbp+var_1E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_1E1A3
loc_1E172:
mov rdi, [rbp+var_1F8]
lea rsi, [rbp+var_1B0]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_1E187:
lea rdi, [rbp+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rax, [rbp+var_1F0]
add rsp, 210h
pop rbp
retn
loc_1E1A3:
lea rdi, [rbp+var_1B0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rbp+var_1B8]
call __Unwind_Resume
| long long chess::uci::moveToUci[abi:cxx11](long long a1, chess::Move *a2, char a3)
{
char v4; // [rsp+17h] [rbp-1F9h]
char v5; // [rsp+2Fh] [rbp-1E1h] BYREF
_BYTE v6[36]; // [rsp+30h] [rbp-1E0h] BYREF
_BYTE v7[16]; // [rsp+60h] [rbp-1B0h] BYREF
_BYTE v8[376]; // [rsp+70h] [rbp-1A0h] BYREF
unsigned int v9; // [rsp+1E8h] [rbp-28h]
unsigned __int8 v10; // [rsp+1EFh] [rbp-21h] BYREF
int v11; // [rsp+1F0h] [rbp-20h] BYREF
int v12; // [rsp+1F4h] [rbp-1Ch] BYREF
int v13; // [rsp+1F8h] [rbp-18h] BYREF
char v14; // [rsp+1FFh] [rbp-11h]
chess::Move *v15; // [rsp+200h] [rbp-10h]
long long v16; // [rsp+208h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3 & 1;
v13 = chess::Move::from(a2);
v12 = chess::Move::to(a2);
if ( (v14 & 1) == 0 && (unsigned __int16)chess::Move::typeOf(v15) == 49152 )
{
v4 = 6;
if ( !chess::Square::operator>(&v12, &v13) )
v4 = 2;
chess::File::File(&v10, v4);
v9 = chess::Square::rank((chess::Square *)&v13);
chess::Square::Square(&v11, v10, v9);
v12 = v11;
}
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v7);
chess::operator<<(v8, &v13);
chess::operator<<(v8, &v12);
if ( (unsigned __int16)chess::Move::typeOf(v15) == 0x4000 )
{
v5 = chess::Move::promotionType(v15);
chess::PieceType::operator std::string((long long)v6, &v5);
std::operator<<<char>(v8, v6);
std::string::~string(v6);
}
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v7);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v7);
return a1;
}
| moveToUci[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x210
MOV qword ptr [RBP + -0x1f8],RDI
MOV AL,DL
MOV RCX,RDI
MOV qword ptr [RBP + -0x1f0],RCX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
AND AL,0x1
MOV byte ptr [RBP + -0x11],AL
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001197a0
MOV dword ptr [RBP + -0x18],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001197e0
MOV dword ptr [RBP + -0x1c],EAX
TEST byte ptr [RBP + -0x11],0x1
JNZ 0x0011e0a2
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00119820
MOVZX EAX,AX
CMP EAX,0xc000
JNZ 0x0011e0a2
LEA RDI,[RBP + -0x1c]
LEA RSI,[RBP + -0x18]
CALL 0x001122a0
MOV CL,AL
MOV AL,0x6
MOV DL,0x2
MOV byte ptr [RBP + -0x1fa],DL
TEST CL,0x1
MOV byte ptr [RBP + -0x1f9],AL
JNZ 0x0011e06c
MOV AL,byte ptr [RBP + -0x1fa]
MOV byte ptr [RBP + -0x1f9],AL
LAB_0011e06c:
MOV AL,byte ptr [RBP + -0x1f9]
LEA RDI,[RBP + -0x21]
MOVZX ESI,AL
CALL 0x00104c50
LEA RDI,[RBP + -0x18]
CALL 0x00104bd0
MOV dword ptr [RBP + -0x28],EAX
MOV AL,byte ptr [RBP + -0x21]
MOV EDX,dword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x20]
MOVZX ESI,AL
CALL 0x001122c0
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0011e0a2:
LEA RDI,[RBP + -0x1b0]
CALL 0x001031e0
LEA RDI,[RBP + -0x1a0]
LAB_0011e0b5:
LEA RSI,[RBP + -0x18]
CALL 0x0011e2d0
JMP 0x0011e0c0
LAB_0011e0c0:
LEA RDI,[RBP + -0x1a0]
LEA RSI,[RBP + -0x1c]
CALL 0x0011e2d0
JMP 0x0011e0d2
LAB_0011e0d2:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00119820
MOVZX EAX,AX
CMP EAX,0x4000
JNZ 0x0011e172
LEA RAX,[RBP + -0x1a0]
MOV qword ptr [RBP + -0x208],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0011a3b0
MOV byte ptr [RBP + -0x1e1],AL
LEA RDI,[RBP + -0x1e0]
LEA RSI,[RBP + -0x1e1]
CALL 0x00119dd0
JMP 0x0011e11b
LAB_0011e11b:
MOV RDI,qword ptr [RBP + -0x208]
LEA RSI,[RBP + -0x1e0]
CALL 0x00103280
JMP 0x0011e130
LAB_0011e130:
LEA RDI,[RBP + -0x1e0]
CALL 0x00103180
JMP 0x0011e172
LAB_0011e172:
MOV RDI,qword ptr [RBP + -0x1f8]
LEA RSI,[RBP + -0x1b0]
CALL 0x001032b0
LAB_0011e185:
JMP 0x0011e187
LAB_0011e187:
LEA RDI,[RBP + -0x1b0]
CALL 0x00103220
MOV RAX,qword ptr [RBP + -0x1f0]
ADD RSP,0x210
POP RBP
RET
|
/* chess::uci::moveToUci[abi:cxx11](chess::Move const&, bool) */
uci * __thiscall chess::uci::moveToUci_abi_cxx11_(uci *this,Move *param_1,bool param_2)
{
byte bVar1;
short sVar2;
int1 local_201;
PieceType local_1e8 [48];
stringstream local_1b8 [16];
ostream local_1a8 [376];
int4 local_30;
File local_29;
int4 local_28;
int4 local_24;
int4 local_20;
byte local_19;
Move *local_18;
uci *local_10;
local_19 = param_2;
local_18 = param_1;
local_10 = this;
local_20 = Move::from(param_1);
local_24 = Move::to(local_18);
if ((local_19 & 1) == 0) {
sVar2 = Move::typeOf(local_18);
if (sVar2 == -0x4000) {
bVar1 = Square::operator>((Square *)&local_24,(Square *)&local_20);
local_201 = 6;
if ((bVar1 & 1) == 0) {
local_201 = 2;
}
File::File(&local_29,local_201);
local_30 = Square::rank((Square *)&local_20);
Square::Square((Square *)&local_28,local_29,local_30);
local_24 = local_28;
}
}
std::__cxx11::stringstream::stringstream(local_1b8);
/* try { // try from 0011e0b5 to 0011e118 has its CatchHandler @ 0011e13e */
operator<<(local_1a8,(Square *)&local_20);
operator<<(local_1a8,(Square *)&local_24);
sVar2 = Move::typeOf(local_18);
if (sVar2 == 0x4000) {
Move::promotionType(local_18);
PieceType::operator_cast_to_string(local_1e8);
/* try { // try from 0011e11b to 0011e12d has its CatchHandler @ 0011e152 */
std::operator<<(local_1a8,(string *)local_1e8);
std::__cxx11::string::~string((string *)local_1e8);
}
/* try { // try from 0011e172 to 0011e184 has its CatchHandler @ 0011e13e */
std::__cxx11::stringstream::str();
std::__cxx11::stringstream::~stringstream(local_1b8);
return this;
}
| |
26,722 | JS_CheckBrand | bluesky950520[P]quickjs/quickjs.c | static int JS_CheckBrand(JSContext *ctx, JSValue obj, JSValue func)
{
JSObject *p, *p1, *home_obj;
JSShapeProperty *prs;
JSProperty *pr;
JSValue brand;
/* get the home object of 'func' */
if (unlikely(JS_VALUE_GET_TAG(func) != JS_TAG_OBJECT))
goto not_obj;
p1 = JS_VALUE_GET_OBJ(func);
if (!js_class_has_bytecode(p1->class_id))
goto not_obj;
home_obj = p1->u.func.home_object;
if (!home_obj)
goto not_obj;
prs = find_own_property(&pr, home_obj, JS_ATOM_Private_brand);
if (!prs) {
JS_ThrowTypeError(ctx, "expecting <brand> private field");
return -1;
}
brand = pr->u.value;
/* safety check */
if (unlikely(JS_VALUE_GET_TAG(brand) != JS_TAG_SYMBOL))
goto not_obj;
/* get the brand array of 'obj' */
if (unlikely(JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)) {
not_obj:
JS_ThrowTypeErrorNotAnObject(ctx);
return -1;
}
p = JS_VALUE_GET_OBJ(obj);
prs = find_own_property(&pr, p, js_symbol_to_atom(ctx, brand));
return (prs != NULL);
} | O0 | c | JS_CheckBrand:
subq $0x118, %rsp # imm = 0x118
movq %rsi, 0x80(%rsp)
movq %rdx, 0x88(%rsp)
movq %rcx, 0x70(%rsp)
movq %r8, 0x78(%rsp)
movq %rdi, 0x68(%rsp)
movq 0x78(%rsp), %rax
cmpl $-0x1, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x63cf7
jmp 0x63f1e
movq 0x70(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movzwl 0x6(%rax), %edi
callq 0x48f80
cmpl $0x0, %eax
jne 0x63d19
jmp 0x63f1e
movq 0x58(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x63d34
jmp 0x63f1e
movq 0x50(%rsp), %rax
leaq 0x40(%rsp), %rcx
movq %rcx, 0x108(%rsp)
movq %rax, 0x100(%rsp)
movl $0xd2, 0xfc(%rsp)
movq 0x100(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xf0(%rsp)
movl 0xfc(%rsp), %eax
movq 0xf0(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0xd8(%rsp)
movq 0xf0(%rsp), %rdi
callq 0x5c5f0
xorl %ecx, %ecx
subq 0xd8(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0xd8(%rsp)
movq 0xf0(%rsp), %rdi
callq 0x2afc0
movq %rax, 0xe0(%rsp)
cmpq $0x0, 0xd8(%rsp)
je 0x63e6c
movq 0xe0(%rsp), %rax
movq 0xd8(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0xfc(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x63e12
jmp 0x63e4e
movq 0x100(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0xd8(%rsp), %rax
subq $0x1, %rax
shlq $0x4, %rax
addq %rax, %rcx
movq 0x108(%rsp), %rax
movq %rcx, (%rax)
movq 0xe8(%rsp), %rax
movq %rax, 0x110(%rsp)
jmp 0x63e87
movq 0xe8(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0xd8(%rsp)
jmp 0x63dc5
movq 0x108(%rsp), %rax
movq $0x0, (%rax)
movq $0x0, 0x110(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x63ec9
movq 0x68(%rsp), %rdi
leaq 0xa8e0f(%rip), %rsi # 0x10ccb7
movb $0x0, %al
callq 0x2c040
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x640de
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpl $-0x8, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x63efd
jmp 0x63f1e
movq 0x88(%rsp), %rax
cmpl $-0x1, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x63f42
jmp 0x63f1e
movq 0x68(%rsp), %rdi
callq 0x2e2e0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x640de
movq 0x80(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x30160
movq 0x8(%rsp), %rcx
leaq 0x40(%rsp), %rdx
movq %rdx, 0xc8(%rsp)
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
movq 0xc0(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xb0(%rsp)
movl 0xbc(%rsp), %eax
movq 0xb0(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0x98(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x5c5f0
xorl %ecx, %ecx
subq 0x98(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x98(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x2afc0
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0x98(%rsp)
je 0x640a1
movq 0xa0(%rsp), %rax
movq 0x98(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0xbc(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x64047
jmp 0x64083
movq 0xc0(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x98(%rsp), %rax
subq $0x1, %rax
shlq $0x4, %rax
addq %rax, %rcx
movq 0xc8(%rsp), %rax
movq %rcx, (%rax)
movq 0xa8(%rsp), %rax
movq %rax, 0xd0(%rsp)
jmp 0x640bc
movq 0xa8(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0x98(%rsp)
jmp 0x63ffa
movq 0xc8(%rsp), %rax
movq $0x0, (%rax)
movq $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x94(%rsp)
movl 0x94(%rsp), %eax
addq $0x118, %rsp # imm = 0x118
retq
nopl (%rax)
| JS_CheckBrand:
sub rsp, 118h
mov [rsp+118h+var_98], rsi
mov [rsp+118h+var_90], rdx
mov [rsp+118h+var_A8], rcx
mov [rsp+118h+var_A0], r8
mov [rsp+118h+var_B0], rdi
mov rax, [rsp+118h+var_A0]
cmp eax, 0FFFFFFFFh
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_63CF7
jmp loc_63F1E
loc_63CF7:
mov rax, [rsp+118h+var_A8]
mov [rsp+118h+var_C0], rax
mov rax, [rsp+118h+var_C0]
movzx edi, word ptr [rax+6]
call js_class_has_bytecode
cmp eax, 0
jnz short loc_63D19
jmp loc_63F1E
loc_63D19:
mov rax, [rsp+118h+var_C0]
mov rax, [rax+40h]
mov [rsp+118h+var_C8], rax
cmp [rsp+118h+var_C8], 0
jnz short loc_63D34
jmp loc_63F1E
loc_63D34:
mov rax, [rsp+118h+var_C8]
lea rcx, [rsp+118h+var_D8]
mov [rsp+118h+var_10], rcx
mov [rsp+118h+var_18], rax
mov [rsp+118h+var_1C], 0D2h
mov rax, [rsp+118h+var_18]
mov rax, [rax+18h]
mov [rsp+118h+var_28], rax
mov eax, [rsp+118h+var_1C]
mov rcx, [rsp+118h+var_28]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+118h+var_40], rax
mov rdi, [rsp+118h+var_28]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+118h+var_40]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+118h+var_40], rax
mov rdi, [rsp+118h+var_28]
call get_shape_prop
mov [rsp+118h+var_38], rax
loc_63DC5:
cmp [rsp+118h+var_40], 0
jz loc_63E6C
mov rax, [rsp+118h+var_38]
mov rcx, [rsp+118h+var_40]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+118h+var_30], rax
mov rax, [rsp+118h+var_30]
mov eax, [rax+4]
cmp eax, [rsp+118h+var_1C]
setz al
test al, 1
jnz short loc_63E12
jmp short loc_63E4E
loc_63E12:
mov rax, [rsp+118h+var_18]
mov rcx, [rax+20h]
mov rax, [rsp+118h+var_40]
sub rax, 1
shl rax, 4
add rcx, rax
mov rax, [rsp+118h+var_10]
mov [rax], rcx
mov rax, [rsp+118h+var_30]
mov [rsp+118h+var_8], rax
jmp short loc_63E87
loc_63E4E:
mov rax, [rsp+118h+var_30]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+118h+var_40], rax
jmp loc_63DC5
loc_63E6C:
mov rax, [rsp+118h+var_10]
mov qword ptr [rax], 0
mov [rsp+118h+var_8], 0
loc_63E87:
mov rax, [rsp+118h+var_8]
mov [rsp+118h+var_D0], rax
cmp [rsp+118h+var_D0], 0
jnz short loc_63EC9
mov rdi, [rsp+118h+var_B0]
lea rsi, aExpectingBrand; "expecting <brand> private field"
mov al, 0
call JS_ThrowTypeError
mov [rsp+118h+var_F8], rax
mov [rsp+118h+var_F0], rdx
mov [rsp+118h+var_84], 0FFFFFFFFh
jmp loc_640DE
loc_63EC9:
mov rax, [rsp+118h+var_D8]
mov rcx, [rax]
mov [rsp+118h+var_E8], rcx
mov rax, [rax+8]
mov [rsp+118h+var_E0], rax
mov rax, [rsp+118h+var_E0]
cmp eax, 0FFFFFFF8h
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_63EFD
jmp short loc_63F1E
loc_63EFD:
mov rax, [rsp+118h+var_90]
cmp eax, 0FFFFFFFFh
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_63F42
jmp short $+2
loc_63F1E:
mov rdi, [rsp+118h+var_B0]
call JS_ThrowTypeErrorNotAnObject
mov [rsp+118h+var_108], rax
mov [rsp+118h+var_100], rdx
mov [rsp+118h+var_84], 0FFFFFFFFh
jmp loc_640DE
loc_63F42:
mov rax, [rsp+118h+var_98]
mov [rsp+118h+var_B8], rax
mov rax, [rsp+118h+var_B8]
mov [rsp+118h+var_110], rax
mov rdi, [rsp+118h+var_B0]
mov rsi, [rsp+118h+var_E8]
mov rdx, [rsp+118h+var_E0]
call js_symbol_to_atom
mov rcx, [rsp+118h+var_110]
lea rdx, [rsp+118h+var_D8]
mov [rsp+118h+var_50], rdx
mov [rsp+118h+var_58], rcx
mov [rsp+118h+var_5C], eax
mov rax, [rsp+118h+var_58]
mov rax, [rax+18h]
mov [rsp+118h+var_68], rax
mov eax, [rsp+118h+var_5C]
mov rcx, [rsp+118h+var_68]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+118h+var_80], rax
mov rdi, [rsp+118h+var_68]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+118h+var_80]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+118h+var_80], rax
mov rdi, [rsp+118h+var_68]
call get_shape_prop
mov [rsp+118h+var_78], rax
loc_63FFA:
cmp [rsp+118h+var_80], 0
jz loc_640A1
mov rax, [rsp+118h+var_78]
mov rcx, [rsp+118h+var_80]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+118h+var_70], rax
mov rax, [rsp+118h+var_70]
mov eax, [rax+4]
cmp eax, [rsp+118h+var_5C]
setz al
test al, 1
jnz short loc_64047
jmp short loc_64083
loc_64047:
mov rax, [rsp+118h+var_58]
mov rcx, [rax+20h]
mov rax, [rsp+118h+var_80]
sub rax, 1
shl rax, 4
add rcx, rax
mov rax, [rsp+118h+var_50]
mov [rax], rcx
mov rax, [rsp+118h+var_70]
mov [rsp+118h+var_48], rax
jmp short loc_640BC
loc_64083:
mov rax, [rsp+118h+var_70]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+118h+var_80], rax
jmp loc_63FFA
loc_640A1:
mov rax, [rsp+118h+var_50]
mov qword ptr [rax], 0
mov [rsp+118h+var_48], 0
loc_640BC:
mov rax, [rsp+118h+var_48]
mov [rsp+118h+var_D0], rax
cmp [rsp+118h+var_D0], 0
setnz al
and al, 1
movzx eax, al
mov [rsp+118h+var_84], eax
loc_640DE:
mov eax, [rsp+118h+var_84]
add rsp, 118h
retn
| long long JS_CheckBrand(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rax
long long v15; // rcx
unsigned int v16; // eax
long long v17; // rax
char v19; // [rsp+0h] [rbp-118h]
long long v20; // [rsp+8h] [rbp-110h]
long long v21; // [rsp+30h] [rbp-E8h]
long long *v22; // [rsp+40h] [rbp-D8h] BYREF
_DWORD *v23; // [rsp+48h] [rbp-D0h]
long long v24; // [rsp+50h] [rbp-C8h]
long long v25; // [rsp+58h] [rbp-C0h]
long long v26; // [rsp+60h] [rbp-B8h]
long long v27; // [rsp+68h] [rbp-B0h]
long long v28; // [rsp+70h] [rbp-A8h]
long long v29; // [rsp+78h] [rbp-A0h]
long long v30; // [rsp+80h] [rbp-98h]
long long v31; // [rsp+88h] [rbp-90h]
long long v33; // [rsp+98h] [rbp-80h]
long long v34; // [rsp+A0h] [rbp-78h]
_DWORD *v35; // [rsp+A8h] [rbp-70h]
long long v36; // [rsp+B0h] [rbp-68h]
unsigned int v37; // [rsp+BCh] [rbp-5Ch]
long long v38; // [rsp+C0h] [rbp-58h]
long long **v39; // [rsp+C8h] [rbp-50h]
_DWORD *v40; // [rsp+D0h] [rbp-48h]
long long v41; // [rsp+D8h] [rbp-40h]
long long shape_prop; // [rsp+E0h] [rbp-38h]
_DWORD *v43; // [rsp+E8h] [rbp-30h]
long long v44; // [rsp+F0h] [rbp-28h]
int v45; // [rsp+FCh] [rbp-1Ch]
long long v46; // [rsp+100h] [rbp-18h]
long long **v47; // [rsp+108h] [rbp-10h]
_DWORD *v48; // [rsp+110h] [rbp-8h]
v30 = a2;
v31 = a3;
v28 = a4;
v29 = a5;
v27 = a1;
if ( (_DWORD)a5 != -1 )
goto LABEL_14;
v25 = v28;
if ( !js_class_has_bytecode(*(unsigned __int16 *)(v28 + 6)) )
goto LABEL_14;
v24 = *(_QWORD *)(v25 + 64);
if ( !v24 )
goto LABEL_14;
v47 = &v22;
v46 = v24;
v45 = 210;
v44 = *(_QWORD *)(v24 + 24);
v41 = *(_DWORD *)(v44 + 32) & 0xD2LL;
v14 = prop_hash_end(v44);
v41 = *(unsigned int *)(v14 + 4 * (-v41 - 1));
shape_prop = get_shape_prop(v44);
while ( v41 )
{
v15 = 8 * (v41 - 1);
v43 = (_DWORD *)(v15 + shape_prop);
if ( *(_DWORD *)(v15 + shape_prop + 4) == v45 )
{
v15 = 16 * (v41 - 1) + *(_QWORD *)(v46 + 32);
*v47 = (long long *)v15;
v48 = v43;
goto LABEL_10;
}
v41 = *v43 & 0x3FFFFFF;
}
*v47 = 0LL;
v48 = 0LL;
LABEL_10:
v23 = v48;
if ( !v48 )
{
JS_ThrowTypeError(
v27,
(long long)"expecting <brand> private field",
a3,
v15,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v19);
return (unsigned int)-1;
}
a4 = *v22;
v21 = *v22;
if ( (unsigned int)v22[1] != -8 || (_DWORD)v31 != -1 )
{
LABEL_14:
JS_ThrowTypeErrorNotAnObject(v27, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6);
return (unsigned int)-1;
}
v26 = v30;
v20 = v30;
v16 = js_symbol_to_atom(v27, v21);
v39 = &v22;
v38 = v20;
v37 = v16;
v36 = *(_QWORD *)(v20 + 24);
v33 = *(_DWORD *)(v36 + 32) & v16;
v17 = prop_hash_end(v36);
v33 = *(unsigned int *)(v17 + 4 * (-v33 - 1));
v34 = get_shape_prop(v36);
while ( v33 )
{
v35 = (_DWORD *)(8 * (v33 - 1) + v34);
if ( v35[1] == v37 )
{
*v39 = (long long *)(16 * (v33 - 1) + *(_QWORD *)(v38 + 32));
v40 = v35;
goto LABEL_21;
}
v33 = *v35 & 0x3FFFFFF;
}
*v39 = 0LL;
v40 = 0LL;
LABEL_21:
v23 = v40;
return v40 != 0LL;
}
| JS_CheckBrand:
SUB RSP,0x118
MOV qword ptr [RSP + 0x80],RSI
MOV qword ptr [RSP + 0x88],RDX
MOV qword ptr [RSP + 0x70],RCX
MOV qword ptr [RSP + 0x78],R8
MOV qword ptr [RSP + 0x68],RDI
MOV RAX,qword ptr [RSP + 0x78]
CMP EAX,-0x1
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00163cf7
JMP 0x00163f1e
LAB_00163cf7:
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOVZX EDI,word ptr [RAX + 0x6]
CALL 0x00148f80
CMP EAX,0x0
JNZ 0x00163d19
JMP 0x00163f1e
LAB_00163d19:
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [RSP + 0x50],0x0
JNZ 0x00163d34
JMP 0x00163f1e
LAB_00163d34:
MOV RAX,qword ptr [RSP + 0x50]
LEA RCX,[RSP + 0x40]
MOV qword ptr [RSP + 0x108],RCX
MOV qword ptr [RSP + 0x100],RAX
MOV dword ptr [RSP + 0xfc],0xd2
MOV RAX,qword ptr [RSP + 0x100]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xf0],RAX
MOV EAX,dword ptr [RSP + 0xfc]
MOV RCX,qword ptr [RSP + 0xf0]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0xd8],RAX
MOV RDI,qword ptr [RSP + 0xf0]
CALL 0x0015c5f0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0xd8]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0xd8],RAX
MOV RDI,qword ptr [RSP + 0xf0]
CALL 0x0012afc0
MOV qword ptr [RSP + 0xe0],RAX
LAB_00163dc5:
CMP qword ptr [RSP + 0xd8],0x0
JZ 0x00163e6c
MOV RAX,qword ptr [RSP + 0xe0]
MOV RCX,qword ptr [RSP + 0xd8]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0xe8],RAX
MOV RAX,qword ptr [RSP + 0xe8]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0xfc]
SETZ AL
TEST AL,0x1
JNZ 0x00163e12
JMP 0x00163e4e
LAB_00163e12:
MOV RAX,qword ptr [RSP + 0x100]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0xd8]
SUB RAX,0x1
SHL RAX,0x4
ADD RCX,RAX
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0xe8]
MOV qword ptr [RSP + 0x110],RAX
JMP 0x00163e87
LAB_00163e4e:
MOV RAX,qword ptr [RSP + 0xe8]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0xd8],RAX
JMP 0x00163dc5
LAB_00163e6c:
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RAX],0x0
MOV qword ptr [RSP + 0x110],0x0
LAB_00163e87:
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x00163ec9
MOV RDI,qword ptr [RSP + 0x68]
LEA RSI,[0x20ccb7]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV dword ptr [RSP + 0x94],0xffffffff
JMP 0x001640de
LAB_00163ec9:
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x30],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x38]
CMP EAX,-0x8
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00163efd
JMP 0x00163f1e
LAB_00163efd:
MOV RAX,qword ptr [RSP + 0x88]
CMP EAX,-0x1
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00163f42
JMP 0x00163f1e
LAB_00163f1e:
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x0012e2e0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x94],0xffffffff
JMP 0x001640de
LAB_00163f42:
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x00130160
MOV RCX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x40]
MOV qword ptr [RSP + 0xc8],RDX
MOV qword ptr [RSP + 0xc0],RCX
MOV dword ptr [RSP + 0xbc],EAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xb0],RAX
MOV EAX,dword ptr [RSP + 0xbc]
MOV RCX,qword ptr [RSP + 0xb0]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x0015c5f0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x98]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x0012afc0
MOV qword ptr [RSP + 0xa0],RAX
LAB_00163ffa:
CMP qword ptr [RSP + 0x98],0x0
JZ 0x001640a1
MOV RAX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RSP + 0x98]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0xbc]
SETZ AL
TEST AL,0x1
JNZ 0x00164047
JMP 0x00164083
LAB_00164047:
MOV RAX,qword ptr [RSP + 0xc0]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x98]
SUB RAX,0x1
SHL RAX,0x4
ADD RCX,RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0xd0],RAX
JMP 0x001640bc
LAB_00164083:
MOV RAX,qword ptr [RSP + 0xa8]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0x98],RAX
JMP 0x00163ffa
LAB_001640a1:
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RAX],0x0
MOV qword ptr [RSP + 0xd0],0x0
LAB_001640bc:
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x94],EAX
LAB_001640de:
MOV EAX,dword ptr [RSP + 0x94]
ADD RSP,0x118
RET
|
uint JS_CheckBrand(int8 param_1,long param_2,int8 param_3,long param_4,
int8 param_5)
{
int iVar1;
long lVar2;
int8 *local_d8;
uint *local_d0;
long local_c8;
long local_c0;
long local_b8;
int8 local_b0;
long local_a8;
int8 local_a0;
long local_98;
int8 local_90;
ulong local_80;
uint *local_70;
long local_68;
uint local_5c;
long local_58;
int8 **local_50;
uint *local_48;
ulong local_40;
long local_38;
uint *local_30;
long local_28;
uint local_1c;
long local_18;
int8 **local_10;
uint *local_8;
local_b0 = param_1;
local_a8 = param_4;
local_a0 = param_5;
local_98 = param_2;
local_90 = param_3;
if ((((int)param_5 == -1) &&
(local_c0 = param_4, iVar1 = js_class_has_bytecode(*(int2 *)(param_4 + 6)), iVar1 != 0))
&& (local_c8 = *(long *)(local_c0 + 0x40), local_c8 != 0)) {
local_10 = &local_d8;
local_1c = 0xd2;
local_28 = *(long *)(local_c8 + 0x18);
local_40 = (ulong)(*(uint *)(local_28 + 0x20) & 0xd2);
local_18 = local_c8;
lVar2 = prop_hash_end(local_28);
local_40 = (ulong)*(uint *)(lVar2 + (-1 - local_40) * 4);
local_38 = get_shape_prop(local_28);
while (local_40 != 0) {
local_30 = (uint *)(local_38 + (local_40 - 1) * 8);
if (local_30[1] == local_1c) {
*local_10 = (int8 *)(*(long *)(local_18 + 0x20) + (local_40 - 1) * 0x10);
local_8 = local_30;
goto LAB_00163e87;
}
local_40 = (ulong)(*local_30 & 0x3ffffff);
}
*local_10 = (int8 *)0x0;
local_8 = (uint *)0x0;
LAB_00163e87:
lVar2 = local_98;
local_d0 = local_8;
if (local_8 == (uint *)0x0) {
JS_ThrowTypeError(local_b0,"expecting <brand> private field");
return 0xffffffff;
}
if (((int)local_d8[1] == -8) && ((int)local_90 == -1)) {
local_b8 = local_98;
local_5c = js_symbol_to_atom(local_b0,*local_d8,local_d8[1]);
local_50 = &local_d8;
local_58 = lVar2;
local_68 = *(long *)(lVar2 + 0x18);
local_80 = (ulong)(local_5c & *(uint *)(local_68 + 0x20));
lVar2 = prop_hash_end(local_68);
local_80 = (ulong)*(uint *)(lVar2 + (-1 - local_80) * 4);
lVar2 = get_shape_prop(local_68);
do {
if (local_80 == 0) {
*local_50 = (int8 *)0x0;
local_48 = (uint *)0x0;
LAB_001640bc:
return (uint)(local_48 != (uint *)0x0);
}
local_70 = (uint *)(lVar2 + (local_80 - 1) * 8);
if (local_70[1] == local_5c) {
*local_50 = (int8 *)(*(long *)(local_58 + 0x20) + (local_80 - 1) * 0x10);
local_48 = local_70;
goto LAB_001640bc;
}
local_80 = (ulong)(*local_70 & 0x3ffffff);
} while( true );
}
}
JS_ThrowTypeErrorNotAnObject(local_b0);
return 0xffffffff;
}
| |
26,723 | JS_CheckBrand | bluesky950520[P]quickjs/quickjs.c | static int JS_CheckBrand(JSContext *ctx, JSValue obj, JSValue func)
{
JSObject *p, *p1, *home_obj;
JSShapeProperty *prs;
JSProperty *pr;
JSValue brand;
/* get the home object of 'func' */
if (unlikely(JS_VALUE_GET_TAG(func) != JS_TAG_OBJECT))
goto not_obj;
p1 = JS_VALUE_GET_OBJ(func);
if (!js_class_has_bytecode(p1->class_id))
goto not_obj;
home_obj = p1->u.func.home_object;
if (!home_obj)
goto not_obj;
prs = find_own_property(&pr, home_obj, JS_ATOM_Private_brand);
if (!prs) {
JS_ThrowTypeError(ctx, "expecting <brand> private field");
return -1;
}
brand = pr->u.value;
/* safety check */
if (unlikely(JS_VALUE_GET_TAG(brand) != JS_TAG_SYMBOL))
goto not_obj;
/* get the brand array of 'obj' */
if (unlikely(JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)) {
not_obj:
JS_ThrowTypeErrorNotAnObject(ctx);
return -1;
}
p = JS_VALUE_GET_OBJ(obj);
prs = find_own_property(&pr, p, js_symbol_to_atom(ctx, brand));
return (prs != NULL);
} | O1 | c | JS_CheckBrand:
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
cmpl $-0x1, %r8d
jne 0x3e7b8
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %ecx
cmpq $0x38, %rcx
ja 0x3e7b8
movabsq $0x110000000012000, %rsi # imm = 0x110000000012000
btq %rcx, %rsi
jae 0x3e7b8
movq 0x40(%rax), %rcx
testq %rcx, %rcx
je 0x3e7b8
movq 0x18(%rcx), %r8
movl 0x20(%r8), %eax
notl %eax
orl $0xffffff2d, %eax # imm = 0xFFFFFF2D
cltq
movl (%r8,%rax,4), %eax
testq %rax, %rax
sete %sil
je 0x3e77e
addq $0x40, %r8
cmpl $0xd2, -0x4(%r8,%rax,8)
jne 0x3e750
decq %rax
shlq $0x4, %rax
addq 0x20(%rcx), %rax
jmp 0x3e780
leaq (%r8,%rax,8), %r9
addq $-0x8, %r9
movl (%r9), %eax
andq $0x3ffffff, %rax # imm = 0x3FFFFFF
sete %sil
je 0x3e77e
leaq (%r8,%rax,8), %r9
addq $-0x8, %r9
decq %rax
cmpl $0xd2, 0x4(%r9)
je 0x3e746
jmp 0x3e758
xorl %eax, %eax
testb %sil, %sil
je 0x3e78e
leaq 0x5f52f(%rip), %rsi # 0x9dcbb
jmp 0x3e7bf
cmpl $-0x8, 0x8(%rax)
jne 0x3e7b8
movl %edx, %ecx
cmpl $-0x1, %ecx
jne 0x3e7b8
movq (%rax), %rdx
movq 0x10(%rsp), %rax
movq 0x4(%rdx), %rcx
movq %rcx, %rsi
shrq $0x3e, %rsi
cmpl $0x2, %esi
jbe 0x3e7d0
movl 0xc(%rdx), %ecx
jmp 0x3e7f9
leaq 0x5f15e(%rip), %rsi # 0x9d91d
xorl %eax, %eax
callq 0x21953
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x18, %rsp
retq
movq 0x18(%rdi), %rdi
shrq $0x20, %rcx
movl 0x50(%rdi), %esi
decl %esi
andl %ecx, %esi
shll $0x2, %esi
addq 0x60(%rdi), %rsi
movq 0x68(%rdi), %rdi
movl (%rsi), %ecx
movq (%rdi,%rcx,8), %r8
leaq 0xc(%r8), %rsi
cmpq %rdx, %r8
jne 0x3e7ea
movq 0x18(%rax), %rdx
movl 0x20(%rdx), %eax
andl %ecx, %eax
notq %rax
movl (%rdx,%rax,4), %edi
xorl %eax, %eax
testl %edi, %edi
je 0x3e7cb
addq $0x38, %rdx
movl $0x3ffffff, %esi # imm = 0x3FFFFFF
movl %edi, %edi
leaq (%rdx,%rdi,8), %rdi
cmpl %ecx, 0x4(%rdi)
je 0x3e82a
movl (%rdi), %edi
andl %esi, %edi
jne 0x3e817
jmp 0x3e7cb
xorl %eax, %eax
testq %rdi, %rdi
setne %al
jmp 0x3e7cb
| JS_CheckBrand:
sub rsp, 18h
mov [rsp+18h+var_8], rsi
mov [rsp+18h+var_10], rcx
cmp r8d, 0FFFFFFFFh
jnz loc_3E7B8
mov rax, [rsp+18h+var_10]
movzx ecx, word ptr [rax+6]
cmp rcx, 38h ; '8'
ja loc_3E7B8
mov rsi, 110000000012000h
bt rsi, rcx
jnb loc_3E7B8
mov rcx, [rax+40h]
test rcx, rcx
jz loc_3E7B8
mov r8, [rcx+18h]
mov eax, [r8+20h]
not eax
or eax, 0FFFFFF2Dh
cdqe
mov eax, [r8+rax*4]
test rax, rax
setz sil
jz short loc_3E77E
add r8, 40h ; '@'
cmp dword ptr [r8+rax*8-4], 0D2h
jnz short loc_3E750
dec rax
loc_3E746:
shl rax, 4
add rax, [rcx+20h]
jmp short loc_3E780
loc_3E750:
lea r9, [r8+rax*8]
add r9, 0FFFFFFFFFFFFFFF8h
loc_3E758:
mov eax, [r9]
and rax, 3FFFFFFh
setz sil
jz short loc_3E77E
lea r9, [r8+rax*8]
add r9, 0FFFFFFFFFFFFFFF8h
dec rax
cmp dword ptr [r9+4], 0D2h
jz short loc_3E746
jmp short loc_3E758
loc_3E77E:
xor eax, eax
loc_3E780:
test sil, sil
jz short loc_3E78E
lea rsi, aExpectingBrand; "expecting <brand> private field"
jmp short loc_3E7BF
loc_3E78E:
cmp dword ptr [rax+8], 0FFFFFFF8h
jnz short loc_3E7B8
mov ecx, edx
cmp ecx, 0FFFFFFFFh
jnz short loc_3E7B8
mov rdx, [rax]
mov rax, [rsp+18h+var_8]
mov rcx, [rdx+4]
mov rsi, rcx
shr rsi, 3Eh
cmp esi, 2
jbe short loc_3E7D0
mov ecx, [rdx+0Ch]
jmp short loc_3E7F9
loc_3E7B8:
lea rsi, aOperandPrototy+20h; "not an object"
loc_3E7BF:
xor eax, eax
call JS_ThrowTypeError
mov eax, 0FFFFFFFFh
loc_3E7CB:
add rsp, 18h
retn
loc_3E7D0:
mov rdi, [rdi+18h]
shr rcx, 20h
mov esi, [rdi+50h]
dec esi
and esi, ecx
shl esi, 2
add rsi, [rdi+60h]
mov rdi, [rdi+68h]
loc_3E7EA:
mov ecx, [rsi]
mov r8, [rdi+rcx*8]
lea rsi, [r8+0Ch]
cmp r8, rdx
jnz short loc_3E7EA
loc_3E7F9:
mov rdx, [rax+18h]
mov eax, [rdx+20h]
and eax, ecx
not rax
mov edi, [rdx+rax*4]
xor eax, eax
test edi, edi
jz short loc_3E7CB
add rdx, 38h ; '8'
mov esi, 3FFFFFFh
loc_3E817:
mov edi, edi
lea rdi, [rdx+rdi*8]
cmp [rdi+4], ecx
jz short loc_3E82A
mov edi, [rdi]
and edi, esi
jnz short loc_3E817
jmp short loc_3E7CB
loc_3E82A:
xor eax, eax
test rdi, rdi
setnz al
jmp short loc_3E7CB
| long long JS_CheckBrand(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
long long a5,
_DWORD *a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rsi
long long v15; // rax
bool v16; // si
long long v17; // rax
_DWORD *v18; // rax
long long v19; // rax
char *v20; // rsi
long long v21; // rdx
long long v22; // rcx
long long result; // rax
long long v24; // rdi
unsigned int *v25; // rsi
long long v26; // rdi
long long v27; // r8
long long v28; // rdx
unsigned int v29; // edi
long long v30; // rdx
_DWORD *v31; // rdi
char v32; // [rsp+0h] [rbp-18h]
unsigned long long v33; // [rsp+8h] [rbp-10h]
v33 = a4;
if ( (_DWORD)a5 != -1 )
goto LABEL_20;
a4 = *(unsigned __int16 *)(a4 + 6);
if ( a4 > 0x38 )
goto LABEL_20;
v14 = 0x110000000012000LL;
if ( !_bittest64(&v14, a4) )
goto LABEL_20;
a4 = *(_QWORD *)(v33 + 64);
if ( !a4 )
goto LABEL_20;
a5 = *(_QWORD *)(a4 + 24);
v15 = *(unsigned int *)(a5 + 4LL * (int)(~*(_BYTE *)(a5 + 32) | 0xFFFFFF2D));
v16 = v15 == 0;
if ( !*(_DWORD *)(a5 + 4LL * (int)(~*(_BYTE *)(a5 + 32) | 0xFFFFFF2D)) )
goto LABEL_13;
a5 += 64LL;
if ( *(_DWORD *)(a5 + 8 * v15 - 4) != 210 )
{
a6 = (_DWORD *)(a5 + 8 * v15 - 8);
while ( 1 )
{
v19 = *a6 & 0x3FFFFFF;
v16 = v19 == 0;
if ( (*a6 & 0x3FFFFFF) == 0 )
break;
a6 = (_DWORD *)(a5 + 8 * v19 - 8);
v17 = v19 - 1;
if ( a6[1] == 210 )
goto LABEL_8;
}
LABEL_13:
v18 = 0LL;
goto LABEL_14;
}
v17 = v15 - 1;
LABEL_8:
v18 = (_DWORD *)(*(_QWORD *)(a4 + 32) + 16 * v17);
LABEL_14:
if ( v16 )
{
v20 = "expecting <brand> private field";
LABEL_21:
JS_ThrowTypeError(a1, (long long)v20, a3, a4, a5, (long long)a6, a7, a8, a9, a10, a11, a12, a13, a14, v32);
return 0xFFFFFFFFLL;
}
if ( v18[2] != -8 || (a4 = (unsigned int)a3, (_DWORD)a3 != -1) )
{
LABEL_20:
v20 = "not an object";
goto LABEL_21;
}
v21 = *(_QWORD *)v18;
if ( (unsigned int)(*(_QWORD *)(*(_QWORD *)v18 + 4LL) >> 62) <= 2 )
{
v24 = *(_QWORD *)(a1 + 24);
v25 = (unsigned int *)(*(_QWORD *)(v24 + 96)
+ 4 * ((unsigned int)HIDWORD(*(_QWORD *)(v21 + 4)) & (*(_DWORD *)(v24 + 80) - 1)));
v26 = *(_QWORD *)(v24 + 104);
do
{
v22 = *v25;
v27 = *(_QWORD *)(v26 + 8 * v22);
v25 = (unsigned int *)(v27 + 12);
}
while ( v27 != v21 );
}
else
{
LODWORD(v22) = *(_DWORD *)(v21 + 12);
}
v28 = *(_QWORD *)(a2 + 24);
v29 = *(_DWORD *)(v28 + 4 * ~(unsigned long long)((unsigned int)v22 & *(_DWORD *)(v28 + 32)));
result = 0LL;
if ( v29 )
{
v30 = v28 + 56;
while ( 1 )
{
v31 = (_DWORD *)(v30 + 8LL * v29);
if ( v31[1] == (_DWORD)v22 )
break;
v29 = *v31 & 0x3FFFFFF;
if ( !v29 )
return result;
}
return v31 != 0LL;
}
return result;
}
| JS_CheckBrand:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RCX
CMP R8D,-0x1
JNZ 0x0013e7b8
MOV RAX,qword ptr [RSP + 0x8]
MOVZX ECX,word ptr [RAX + 0x6]
CMP RCX,0x38
JA 0x0013e7b8
MOV RSI,0x110000000012000
BT RSI,RCX
JNC 0x0013e7b8
MOV RCX,qword ptr [RAX + 0x40]
TEST RCX,RCX
JZ 0x0013e7b8
MOV R8,qword ptr [RCX + 0x18]
MOV EAX,dword ptr [R8 + 0x20]
NOT EAX
OR EAX,0xffffff2d
CDQE
MOV EAX,dword ptr [R8 + RAX*0x4]
TEST RAX,RAX
SETZ SIL
JZ 0x0013e77e
ADD R8,0x40
CMP dword ptr [R8 + RAX*0x8 + -0x4],0xd2
JNZ 0x0013e750
DEC RAX
LAB_0013e746:
SHL RAX,0x4
ADD RAX,qword ptr [RCX + 0x20]
JMP 0x0013e780
LAB_0013e750:
LEA R9,[R8 + RAX*0x8]
ADD R9,-0x8
LAB_0013e758:
MOV EAX,dword ptr [R9]
AND RAX,0x3ffffff
SETZ SIL
JZ 0x0013e77e
LEA R9,[R8 + RAX*0x8]
ADD R9,-0x8
DEC RAX
CMP dword ptr [R9 + 0x4],0xd2
JZ 0x0013e746
JMP 0x0013e758
LAB_0013e77e:
XOR EAX,EAX
LAB_0013e780:
TEST SIL,SIL
JZ 0x0013e78e
LEA RSI,[0x19dcbb]
JMP 0x0013e7bf
LAB_0013e78e:
CMP dword ptr [RAX + 0x8],-0x8
JNZ 0x0013e7b8
MOV ECX,EDX
CMP ECX,-0x1
JNZ 0x0013e7b8
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RDX + 0x4]
MOV RSI,RCX
SHR RSI,0x3e
CMP ESI,0x2
JBE 0x0013e7d0
MOV ECX,dword ptr [RDX + 0xc]
JMP 0x0013e7f9
LAB_0013e7b8:
LEA RSI,[0x19d91d]
LAB_0013e7bf:
XOR EAX,EAX
CALL 0x00121953
MOV EAX,0xffffffff
LAB_0013e7cb:
ADD RSP,0x18
RET
LAB_0013e7d0:
MOV RDI,qword ptr [RDI + 0x18]
SHR RCX,0x20
MOV ESI,dword ptr [RDI + 0x50]
DEC ESI
AND ESI,ECX
SHL ESI,0x2
ADD RSI,qword ptr [RDI + 0x60]
MOV RDI,qword ptr [RDI + 0x68]
LAB_0013e7ea:
MOV ECX,dword ptr [RSI]
MOV R8,qword ptr [RDI + RCX*0x8]
LEA RSI,[R8 + 0xc]
CMP R8,RDX
JNZ 0x0013e7ea
LAB_0013e7f9:
MOV RDX,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RDX + 0x20]
AND EAX,ECX
NOT RAX
MOV EDI,dword ptr [RDX + RAX*0x4]
XOR EAX,EAX
TEST EDI,EDI
JZ 0x0013e7cb
ADD RDX,0x38
MOV ESI,0x3ffffff
LAB_0013e817:
MOV EDI,EDI
LEA RDI,[RDX + RDI*0x8]
CMP dword ptr [RDI + 0x4],ECX
JZ 0x0013e82a
MOV EDI,dword ptr [RDI]
AND EDI,ESI
JNZ 0x0013e817
JMP 0x0013e7cb
LAB_0013e82a:
XOR EAX,EAX
TEST RDI,RDI
SETNZ AL
JMP 0x0013e7cb
|
ulong JS_CheckBrand(long param_1,long param_2,int param_3,long param_4,int param_5)
{
long lVar1;
long lVar2;
long lVar3;
long *plVar4;
ulong uVar5;
uint uVar6;
char *pcVar7;
uint *puVar8;
uint uVar9;
bool bVar10;
if ((((param_5 == -1) && ((ulong)*(ushort *)(param_4 + 6) < 0x39)) &&
((0x110000000012000U >> ((ulong)*(ushort *)(param_4 + 6) & 0x3f) & 1) != 0)) &&
(lVar1 = *(long *)(param_4 + 0x40), lVar1 != 0)) {
lVar2 = *(long *)(lVar1 + 0x18);
uVar5 = (ulong)*(uint *)(lVar2 + (long)(int)(~*(uint *)(lVar2 + 0x20) | 0xffffff2d) * 4);
bVar10 = uVar5 == 0;
if (bVar10) {
LAB_0013e77e:
plVar4 = (long *)0x0;
}
else {
if (*(int *)(lVar2 + 0x3c + uVar5 * 8) != 0xd2) {
lVar3 = lVar2 + 0x40 + uVar5 * 8;
do {
uVar5 = (ulong)*(uint *)(lVar3 + -8) & 0x3ffffff;
bVar10 = (*(uint *)(lVar3 + -8) & 0x3ffffff) == 0;
if (bVar10) goto LAB_0013e77e;
lVar3 = lVar2 + 0x40 + uVar5 * 8;
} while (*(int *)(lVar3 + -4) != 0xd2);
}
plVar4 = (long *)((uVar5 - 1) * 0x10 + *(long *)(lVar1 + 0x20));
}
if (bVar10) {
pcVar7 = "expecting <brand> private field";
goto LAB_0013e7bf;
}
if (((int)plVar4[1] == -8) && (param_3 == -1)) {
lVar1 = *plVar4;
uVar6 = (uint)((ulong)*(int8 *)(lVar1 + 4) >> 0x20);
if (uVar6 >> 0x1e < 3) {
lVar2 = *(long *)(param_1 + 0x18);
puVar8 = (uint *)((ulong)((*(int *)(lVar2 + 0x50) - 1U & uVar6) << 2) +
*(long *)(lVar2 + 0x60));
do {
uVar6 = *puVar8;
lVar3 = *(long *)(*(long *)(lVar2 + 0x68) + (ulong)uVar6 * 8);
puVar8 = (uint *)(lVar3 + 0xc);
} while (lVar3 != lVar1);
}
else {
uVar6 = *(uint *)(lVar1 + 0xc);
}
lVar1 = *(long *)(param_2 + 0x18);
uVar9 = *(uint *)(lVar1 + ~(ulong)(*(uint *)(lVar1 + 0x20) & uVar6) * 4);
if (uVar9 == 0) {
return 0;
}
do {
puVar8 = (uint *)(lVar1 + 0x38 + (ulong)uVar9 * 8);
if (puVar8[1] == uVar6) {
return (ulong)(puVar8 != (uint *)0x0);
}
uVar9 = *puVar8 & 0x3ffffff;
} while (uVar9 != 0);
return 0;
}
}
pcVar7 = "not an object";
LAB_0013e7bf:
JS_ThrowTypeError(param_1,pcVar7);
return 0xffffffff;
}
| |
26,724 | JS_CheckBrand | bluesky950520[P]quickjs/quickjs.c | static int JS_CheckBrand(JSContext *ctx, JSValue obj, JSValue func)
{
JSObject *p, *p1, *home_obj;
JSShapeProperty *prs;
JSProperty *pr;
JSValue brand;
/* get the home object of 'func' */
if (unlikely(JS_VALUE_GET_TAG(func) != JS_TAG_OBJECT))
goto not_obj;
p1 = JS_VALUE_GET_OBJ(func);
if (!js_class_has_bytecode(p1->class_id))
goto not_obj;
home_obj = p1->u.func.home_object;
if (!home_obj)
goto not_obj;
prs = find_own_property(&pr, home_obj, JS_ATOM_Private_brand);
if (!prs) {
JS_ThrowTypeError(ctx, "expecting <brand> private field");
return -1;
}
brand = pr->u.value;
/* safety check */
if (unlikely(JS_VALUE_GET_TAG(brand) != JS_TAG_SYMBOL))
goto not_obj;
/* get the brand array of 'obj' */
if (unlikely(JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)) {
not_obj:
JS_ThrowTypeErrorNotAnObject(ctx);
return -1;
}
p = JS_VALUE_GET_OBJ(obj);
prs = find_own_property(&pr, p, js_symbol_to_atom(ctx, brand));
return (prs != NULL);
} | O3 | c | JS_CheckBrand:
pushq %rax
cmpl $-0x1, %r8d
jne 0x3ff89
movzwl 0x6(%rcx), %eax
cmpq $0x38, %rax
ja 0x3ff89
movabsq $0x110000000012000, %r8 # imm = 0x110000000012000
btq %rax, %r8
jae 0x3ff89
movq 0x40(%rcx), %rax
testq %rax, %rax
je 0x3ff89
movq 0x18(%rax), %rcx
movl 0x20(%rcx), %r8d
notl %r8d
orl $0xffffff2d, %r8d # imm = 0xFFFFFF2D
movslq %r8d, %r8
movl (%rcx,%r8,4), %r8d
testl %r8d, %r8d
je 0x3ff4b
movl $0x3ffffff, %r9d # imm = 0x3FFFFFF
movl %r8d, %r8d
cmpl $0xd2, 0x3c(%rcx,%r8,8)
je 0x3ff54
movl 0x38(%rcx,%r8,8), %r8d
andl %r9d, %r8d
jne 0x3ff33
leaq 0x60d39(%rip), %rsi # 0xa0c8b
jmp 0x3ff90
decq %r8
movq 0x20(%rax), %rax
shlq $0x4, %r8
cmpl $-0x8, 0x8(%rax,%r8)
jne 0x3ff89
movl %edx, %ecx
cmpl $-0x1, %ecx
jne 0x3ff89
addq %r8, %rax
movq (%rax), %rax
movq 0x4(%rax), %rcx
movq %rcx, %rdx
shrq $0x3e, %rdx
cmpl $0x2, %edx
jbe 0x3ff9e
movl 0xc(%rax), %ecx
jmp 0x3ffc7
leaq 0x6095d(%rip), %rsi # 0xa08ed
xorl %eax, %eax
callq 0x2214f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x40000
movq 0x18(%rdi), %rdi
shrq $0x20, %rcx
movl 0x50(%rdi), %edx
decl %edx
andl %ecx, %edx
shll $0x2, %edx
addq 0x60(%rdi), %rdx
movq 0x68(%rdi), %rdi
movl (%rdx), %ecx
movq (%rdi,%rcx,8), %r8
leaq 0xc(%r8), %rdx
cmpq %rax, %r8
jne 0x3ffb8
movq 0x18(%rsi), %rdx
movl 0x20(%rdx), %eax
andl %ecx, %eax
notq %rax
movl (%rdx,%rax,4), %edi
xorl %eax, %eax
testl %edi, %edi
je 0x40000
addq $0x38, %rdx
movl $0x3ffffff, %esi # imm = 0x3FFFFFF
movl %edi, %edi
leaq (%rdx,%rdi,8), %rdi
cmpl %ecx, 0x4(%rdi)
je 0x3fff8
movl (%rdi), %edi
andl %esi, %edi
jne 0x3ffe5
jmp 0x40000
xorl %eax, %eax
testq %rdi, %rdi
setne %al
popq %rcx
retq
| JS_CheckBrand:
push rax
cmp r8d, 0FFFFFFFFh
jnz loc_3FF89
movzx eax, word ptr [rcx+6]
cmp rax, 38h ; '8'
ja loc_3FF89
mov r8, 110000000012000h
bt r8, rax
jnb loc_3FF89
mov rax, [rcx+40h]
test rax, rax
jz short loc_3FF89
mov rcx, [rax+18h]
mov r8d, [rcx+20h]
not r8d
or r8d, 0FFFFFF2Dh
movsxd r8, r8d
mov r8d, [rcx+r8*4]
test r8d, r8d
jz short loc_3FF4B
mov r9d, 3FFFFFFh
loc_3FF33:
mov r8d, r8d
cmp dword ptr [rcx+r8*8+3Ch], 0D2h
jz short loc_3FF54
mov r8d, [rcx+r8*8+38h]
and r8d, r9d
jnz short loc_3FF33
loc_3FF4B:
lea rsi, aExpectingBrand; "expecting <brand> private field"
jmp short loc_3FF90
loc_3FF54:
dec r8
mov rax, [rax+20h]
shl r8, 4
cmp dword ptr [rax+r8+8], 0FFFFFFF8h
jnz short loc_3FF89
mov ecx, edx
cmp ecx, 0FFFFFFFFh
jnz short loc_3FF89
add rax, r8
mov rax, [rax]
mov rcx, [rax+4]
mov rdx, rcx
shr rdx, 3Eh
cmp edx, 2
jbe short loc_3FF9E
mov ecx, [rax+0Ch]
jmp short loc_3FFC7
loc_3FF89:
lea rsi, aOperandPrototy+20h; "not an object"
loc_3FF90:
xor eax, eax
call JS_ThrowTypeError
mov eax, 0FFFFFFFFh
jmp short loc_40000
loc_3FF9E:
mov rdi, [rdi+18h]
shr rcx, 20h
mov edx, [rdi+50h]
dec edx
and edx, ecx
shl edx, 2
add rdx, [rdi+60h]
mov rdi, [rdi+68h]
loc_3FFB8:
mov ecx, [rdx]
mov r8, [rdi+rcx*8]
lea rdx, [r8+0Ch]
cmp r8, rax
jnz short loc_3FFB8
loc_3FFC7:
mov rdx, [rsi+18h]
mov eax, [rdx+20h]
and eax, ecx
not rax
mov edi, [rdx+rax*4]
xor eax, eax
test edi, edi
jz short loc_40000
add rdx, 38h ; '8'
mov esi, 3FFFFFFh
loc_3FFE5:
mov edi, edi
lea rdi, [rdx+rdi*8]
cmp [rdi+4], ecx
jz short loc_3FFF8
mov edi, [rdi]
and edi, esi
jnz short loc_3FFE5
jmp short loc_40000
loc_3FFF8:
xor eax, eax
test rdi, rdi
setnz al
loc_40000:
pop rcx
retn
| long long JS_CheckBrand(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
unsigned long long v15; // rax
long long v16; // rax
char *v17; // rsi
long long v18; // rax
long long v19; // rax
long long v20; // rcx
long long result; // rax
long long v22; // rdi
unsigned int *v23; // rdx
long long v24; // rdi
long long v25; // r8
long long v26; // rdx
unsigned int v27; // edi
long long v28; // rdx
_DWORD *v29; // rdi
char v30; // [rsp-8h] [rbp-8h]
v30 = v14;
if ( (_DWORD)a5 != -1 )
goto LABEL_14;
v15 = *(unsigned __int16 *)(a4 + 6);
if ( v15 > 0x38 )
goto LABEL_14;
a5 = 0x110000000012000LL;
if ( !_bittest64(&a5, v15) )
goto LABEL_14;
v16 = *(_QWORD *)(a4 + 64);
if ( !v16 )
goto LABEL_14;
a4 = *(_QWORD *)(v16 + 24);
a5 = *(unsigned int *)(a4 + 4LL * (int)(~*(_BYTE *)(a4 + 32) | 0xFFFFFF2D));
if ( !(_DWORD)a5 )
{
LABEL_9:
v17 = "expecting <brand> private field";
LABEL_15:
JS_ThrowTypeError(a1, (long long)v17, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v30);
return 0xFFFFFFFFLL;
}
a6 = 0x3FFFFFFLL;
while ( *(_DWORD *)(a4 + 8LL * (unsigned int)a5 + 60) != 210 )
{
a5 = *(_DWORD *)(a4 + 8LL * (unsigned int)a5 + 56) & 0x3FFFFFF;
if ( !(_DWORD)a5 )
goto LABEL_9;
}
v18 = *(_QWORD *)(v16 + 32);
a5 = 16 * ((unsigned int)a5 - 1LL);
if ( *(_DWORD *)(v18 + a5 + 8) != -8 || (a4 = (unsigned int)a3, (_DWORD)a3 != -1) )
{
LABEL_14:
v17 = "not an object";
goto LABEL_15;
}
v19 = *(_QWORD *)(a5 + v18);
if ( (unsigned int)(*(_QWORD *)(v19 + 4) >> 62) <= 2 )
{
v22 = *(_QWORD *)(a1 + 24);
v23 = (unsigned int *)(*(_QWORD *)(v22 + 96)
+ 4 * ((unsigned int)HIDWORD(*(_QWORD *)(v19 + 4)) & (*(_DWORD *)(v22 + 80) - 1)));
v24 = *(_QWORD *)(v22 + 104);
do
{
v20 = *v23;
v25 = *(_QWORD *)(v24 + 8 * v20);
v23 = (unsigned int *)(v25 + 12);
}
while ( v25 != v19 );
}
else
{
LODWORD(v20) = *(_DWORD *)(v19 + 12);
}
v26 = *(_QWORD *)(a2 + 24);
v27 = *(_DWORD *)(v26 + 4 * ~(unsigned long long)((unsigned int)v20 & *(_DWORD *)(v26 + 32)));
result = 0LL;
if ( v27 )
{
v28 = v26 + 56;
while ( 1 )
{
v29 = (_DWORD *)(v28 + 8LL * v27);
if ( v29[1] == (_DWORD)v20 )
break;
v27 = *v29 & 0x3FFFFFF;
if ( !v27 )
return result;
}
return v29 != 0LL;
}
return result;
}
| JS_CheckBrand:
PUSH RAX
CMP R8D,-0x1
JNZ 0x0013ff89
MOVZX EAX,word ptr [RCX + 0x6]
CMP RAX,0x38
JA 0x0013ff89
MOV R8,0x110000000012000
BT R8,RAX
JNC 0x0013ff89
MOV RAX,qword ptr [RCX + 0x40]
TEST RAX,RAX
JZ 0x0013ff89
MOV RCX,qword ptr [RAX + 0x18]
MOV R8D,dword ptr [RCX + 0x20]
NOT R8D
OR R8D,0xffffff2d
MOVSXD R8,R8D
MOV R8D,dword ptr [RCX + R8*0x4]
TEST R8D,R8D
JZ 0x0013ff4b
MOV R9D,0x3ffffff
LAB_0013ff33:
MOV R8D,R8D
CMP dword ptr [RCX + R8*0x8 + 0x3c],0xd2
JZ 0x0013ff54
MOV R8D,dword ptr [RCX + R8*0x8 + 0x38]
AND R8D,R9D
JNZ 0x0013ff33
LAB_0013ff4b:
LEA RSI,[0x1a0c8b]
JMP 0x0013ff90
LAB_0013ff54:
DEC R8
MOV RAX,qword ptr [RAX + 0x20]
SHL R8,0x4
CMP dword ptr [RAX + R8*0x1 + 0x8],-0x8
JNZ 0x0013ff89
MOV ECX,EDX
CMP ECX,-0x1
JNZ 0x0013ff89
ADD RAX,R8
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x4]
MOV RDX,RCX
SHR RDX,0x3e
CMP EDX,0x2
JBE 0x0013ff9e
MOV ECX,dword ptr [RAX + 0xc]
JMP 0x0013ffc7
LAB_0013ff89:
LEA RSI,[0x1a08ed]
LAB_0013ff90:
XOR EAX,EAX
CALL 0x0012214f
MOV EAX,0xffffffff
JMP 0x00140000
LAB_0013ff9e:
MOV RDI,qword ptr [RDI + 0x18]
SHR RCX,0x20
MOV EDX,dword ptr [RDI + 0x50]
DEC EDX
AND EDX,ECX
SHL EDX,0x2
ADD RDX,qword ptr [RDI + 0x60]
MOV RDI,qword ptr [RDI + 0x68]
LAB_0013ffb8:
MOV ECX,dword ptr [RDX]
MOV R8,qword ptr [RDI + RCX*0x8]
LEA RDX,[R8 + 0xc]
CMP R8,RAX
JNZ 0x0013ffb8
LAB_0013ffc7:
MOV RDX,qword ptr [RSI + 0x18]
MOV EAX,dword ptr [RDX + 0x20]
AND EAX,ECX
NOT RAX
MOV EDI,dword ptr [RDX + RAX*0x4]
XOR EAX,EAX
TEST EDI,EDI
JZ 0x00140000
ADD RDX,0x38
MOV ESI,0x3ffffff
LAB_0013ffe5:
MOV EDI,EDI
LEA RDI,[RDX + RDI*0x8]
CMP dword ptr [RDI + 0x4],ECX
JZ 0x0013fff8
MOV EDI,dword ptr [RDI]
AND EDI,ESI
JNZ 0x0013ffe5
JMP 0x00140000
LAB_0013fff8:
XOR EAX,EAX
TEST RDI,RDI
SETNZ AL
LAB_00140000:
POP RCX
RET
|
ulong JS_CheckBrand(long param_1,long param_2,int param_3,long param_4,int param_5)
{
long lVar1;
long lVar2;
uint *puVar3;
char *pcVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
long lVar8;
if ((((param_5 == -1) && ((ulong)*(ushort *)(param_4 + 6) < 0x39)) &&
((0x110000000012000U >> ((ulong)*(ushort *)(param_4 + 6) & 0x3f) & 1) != 0)) &&
(lVar1 = *(long *)(param_4 + 0x40), lVar1 != 0)) {
lVar8 = *(long *)(lVar1 + 0x18);
uVar6 = *(uint *)(lVar8 + (long)(int)(~*(uint *)(lVar8 + 0x20) | 0xffffff2d) * 4);
while (uVar6 != 0) {
uVar7 = (ulong)uVar6;
if (*(int *)(lVar8 + 0x3c + uVar7 * 8) == 0xd2) {
lVar8 = (uVar7 - 1) * 0x10;
if ((*(int *)(*(long *)(lVar1 + 0x20) + 8 + lVar8) == -8) && (param_3 == -1)) {
lVar1 = *(long *)(*(long *)(lVar1 + 0x20) + lVar8);
uVar6 = (uint)((ulong)*(int8 *)(lVar1 + 4) >> 0x20);
if (uVar6 >> 0x1e < 3) {
lVar8 = *(long *)(param_1 + 0x18);
puVar3 = (uint *)((ulong)((*(int *)(lVar8 + 0x50) - 1U & uVar6) << 2) +
*(long *)(lVar8 + 0x60));
do {
uVar6 = *puVar3;
lVar2 = *(long *)(*(long *)(lVar8 + 0x68) + (ulong)uVar6 * 8);
puVar3 = (uint *)(lVar2 + 0xc);
} while (lVar2 != lVar1);
}
else {
uVar6 = *(uint *)(lVar1 + 0xc);
}
lVar1 = *(long *)(param_2 + 0x18);
uVar5 = *(uint *)(lVar1 + ~(ulong)(*(uint *)(lVar1 + 0x20) & uVar6) * 4);
if (uVar5 == 0) {
return 0;
}
do {
puVar3 = (uint *)(lVar1 + 0x38 + (ulong)uVar5 * 8);
if (puVar3[1] == uVar6) {
return (ulong)(puVar3 != (uint *)0x0);
}
uVar5 = *puVar3 & 0x3ffffff;
} while (uVar5 != 0);
return 0;
}
goto LAB_0013ff89;
}
uVar6 = *(uint *)(lVar8 + 0x38 + uVar7 * 8) & 0x3ffffff;
}
pcVar4 = "expecting <brand> private field";
}
else {
LAB_0013ff89:
pcVar4 = "not an object";
}
JS_ThrowTypeError(param_1,pcVar4);
return 0xffffffff;
}
| |
26,725 | JS_SetGlobalVar | bluesky950520[P]quickjs/quickjs.c | static int JS_SetGlobalVar(JSContext *ctx, JSAtom prop, JSValue val,
int flag)
{
JSObject *p;
JSShapeProperty *prs;
JSProperty *pr;
int flags;
/* no exotic behavior is possible in global_var_obj */
p = JS_VALUE_GET_OBJ(ctx->global_var_obj);
prs = find_own_property(&pr, p, prop);
if (prs) {
/* XXX: should handle JS_PROP_AUTOINIT properties? */
if (flag != 1) {
if (unlikely(JS_IsUninitialized(pr->u.value))) {
JS_FreeValue(ctx, val);
JS_ThrowReferenceErrorUninitialized(ctx, prs->atom);
return -1;
}
if (unlikely(!(prs->flags & JS_PROP_WRITABLE))) {
JS_FreeValue(ctx, val);
return JS_ThrowTypeErrorReadOnly(ctx, JS_PROP_THROW, prop);
}
}
set_value(ctx, &pr->u.value, val);
return 0;
}
flags = JS_PROP_THROW_STRICT;
if (is_strict_mode(ctx))
flags |= JS_PROP_NO_ADD;
return JS_SetPropertyInternal(ctx, ctx->global_obj, prop, val, flags);
} | O1 | c | JS_SetGlobalVar:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r9
movq %rdx, %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x1b0(%rdi), %rdx
movq 0x18(%rdx), %rsi
movl 0x20(%rsi), %ecx
andl %ebp, %ecx
notq %rcx
movl (%rsi,%rcx,4), %r10d
testl %r10d, %r10d
je 0x438c4
addq $0x40, %rsi
xorl %ecx, %ecx
movl $0x3ffffff, %edi # imm = 0x3FFFFFF
movl %r10d, %r10d
leaq (%rsi,%r10,8), %r14
addq $-0x8, %r14
cmpl %ebp, 0x4(%r14)
je 0x438b4
movl (%r14), %r10d
movl $0x0, %r14d
andl %edi, %r10d
jne 0x43893
jmp 0x438c9
decq %r10
shlq $0x4, %r10
addq 0x20(%rdx), %r10
movq %r10, %rcx
jmp 0x438c9
xorl %ecx, %ecx
xorl %r14d, %r14d
testq %r14, %r14
je 0x43904
cmpl $0x1, %r8d
je 0x438e9
cmpl $0x4, 0x8(%rcx)
je 0x43971
testb $0x8, 0x3(%r14)
je 0x4398e
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
movq %rax, (%rcx)
movq %r9, 0x8(%rcx)
movq 0x18(%rbx), %rdi
callq 0x21922
xorl %eax, %eax
jmp 0x43968
movq 0x18(%rbx), %rcx
movq 0x108(%rcx), %rcx
testq %rcx, %rcx
je 0x43928
movl 0x40(%rcx), %ecx
shrl $0xf, %ecx
andl $0x10000, %ecx # imm = 0x10000
orl $0x8000, %ecx # imm = 0x8000
jmp 0x4392d
movl $0x8000, %ecx # imm = 0x8000
movq 0x1a0(%rbx), %rsi
movq 0x1a8(%rbx), %rdx
movq %rsi, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ecx, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq %rbx, %rdi
movl %ebp, %ecx
movq %rax, %r8
callq 0x283e4
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x18(%rbx), %rdi
movq %rax, %rsi
movq %r9, %rdx
callq 0x21922
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x4164a
jmp 0x439ae
movq 0x18(%rbx), %rdi
movq %rax, %rsi
movq %r9, %rdx
callq 0x21922
leaq 0x5fa07(%rip), %rdx # 0xa33ab
movq %rbx, %rdi
movl %ebp, %esi
callq 0x415b7
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x43968
| JS_SetGlobalVar:
push rbp
push r14
push rbx
sub rsp, 30h
mov r9, rcx
mov rax, rdx
mov ebp, esi
mov rbx, rdi
mov rdx, [rdi+1B0h]
mov rsi, [rdx+18h]
mov ecx, [rsi+20h]
and ecx, ebp
not rcx
mov r10d, [rsi+rcx*4]
test r10d, r10d
jz short loc_438C4
add rsi, 40h ; '@'
xor ecx, ecx
mov edi, 3FFFFFFh
loc_43893:
mov r10d, r10d
lea r14, [rsi+r10*8]
add r14, 0FFFFFFFFFFFFFFF8h
cmp [r14+4], ebp
jz short loc_438B4
mov r10d, [r14]
mov r14d, 0
and r10d, edi
jnz short loc_43893
jmp short loc_438C9
loc_438B4:
dec r10
shl r10, 4
add r10, [rdx+20h]
mov rcx, r10
jmp short loc_438C9
loc_438C4:
xor ecx, ecx
xor r14d, r14d
loc_438C9:
test r14, r14
jz short loc_43904
cmp r8d, 1
jz short loc_438E9
cmp dword ptr [rcx+8], 4
jz loc_43971
test byte ptr [r14+3], 8
jz loc_4398E
loc_438E9:
mov rsi, [rcx]
mov rdx, [rcx+8]
mov [rcx], rax
mov [rcx+8], r9
mov rdi, [rbx+18h]
call JS_FreeValueRT
xor eax, eax
jmp short loc_43968
loc_43904:
mov rcx, [rbx+18h]
mov rcx, [rcx+108h]
test rcx, rcx
jz short loc_43928
mov ecx, [rcx+40h]
shr ecx, 0Fh
and ecx, 10000h
or ecx, 8000h
jmp short loc_4392D
loc_43928:
mov ecx, 8000h
loc_4392D:
mov rsi, [rbx+1A0h]
mov rdx, [rbx+1A8h]
mov qword ptr [rsp+48h+var_28], rsi
mov qword ptr [rsp+48h+var_28+8], rdx
movups xmm0, [rsp+48h+var_28]
movups [rsp+48h+var_48], xmm0
mov [rsp+48h+var_38], ecx
mov [rsp+48h+var_30], 0
mov rdi, rbx
mov ecx, ebp
mov r8, rax
call JS_SetPropertyInternal2
loc_43968:
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_43971:
mov rdi, [rbx+18h]
mov rsi, rax
mov rdx, r9
call JS_FreeValueRT
mov esi, [r14+4]
mov rdi, rbx
call JS_ThrowReferenceErrorUninitialized
jmp short loc_439AE
loc_4398E:
mov rdi, [rbx+18h]
mov rsi, rax
mov rdx, r9
call JS_FreeValueRT
lea rdx, aSIsReadOnly; "'%s' is read-only"
mov rdi, rbx
mov esi, ebp
call __JS_ThrowTypeErrorAtom
loc_439AE:
mov eax, 0FFFFFFFFh
jmp short loc_43968
| long long JS_SetGlobalVar(
long long a1,
unsigned int a2,
_DWORD *a3,
long long a4,
int a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v16; // rdx
long long v17; // rsi
unsigned int v18; // r10d
long long v19; // rsi
long long v20; // rcx
long long v21; // r14
int v22; // r10d
_DWORD *v23; // rsi
long long v24; // rdx
long long v26; // rcx
unsigned int v27; // ecx
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
double v34; // xmm4_8
double v35; // xmm5_8
__m128 v36; // [rsp+20h] [rbp-28h]
v16 = *(_QWORD *)(a1 + 432);
v17 = *(_QWORD *)(v16 + 24);
v18 = *(_DWORD *)(v17 + 4 * ~(unsigned long long)(a2 & *(_DWORD *)(v17 + 32)));
if ( v18 )
{
v19 = v17 + 64;
v20 = 0LL;
while ( 1 )
{
v21 = v19 + 8LL * v18 - 8;
if ( *(_DWORD *)(v21 + 4) == a2 )
break;
v22 = *(_DWORD *)v21;
v21 = 0LL;
v18 = v22 & 0x3FFFFFF;
if ( !v18 )
goto LABEL_8;
}
v20 = *(_QWORD *)(v16 + 32) + 16 * (v18 - 1LL);
}
else
{
v20 = 0LL;
v21 = 0LL;
}
LABEL_8:
if ( v21 )
{
if ( a5 == 1 )
{
LABEL_12:
v23 = *(_DWORD **)v20;
v24 = *(_QWORD *)(v20 + 8);
*(_QWORD *)v20 = a3;
*(_QWORD *)(v20 + 8) = a4;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v23, v24);
return 0LL;
}
if ( *(_DWORD *)(v20 + 8) == 4 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a3, a4);
JS_ThrowReferenceErrorUninitialized(
a1,
*(_DWORD *)(v21 + 4),
a6,
a7,
a8,
a9,
v32,
v33,
a12,
a13,
v28,
v29,
v30,
v31);
}
else
{
if ( (*(_BYTE *)(v21 + 3) & 8) != 0 )
goto LABEL_12;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a3, a4);
_JS_ThrowTypeErrorAtom(a1, a2, (long long)"'%s' is read-only", a6, a7, a8, a9, v34, v35, a12, a13);
}
return 0xFFFFFFFFLL;
}
else
{
v26 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL);
if ( v26 )
v27 = (*(_DWORD *)(v26 + 64) >> 15) & 0x10000 | 0x8000;
else
v27 = 0x8000;
v36 = *(__m128 *)(a1 + 416);
return JS_SetPropertyInternal2(
a1,
v36.m128_i64[0],
v36.m128_i64[1],
a2,
a3,
a4,
v36,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
v36.m128_i64[0],
v36.m128_i32[2],
v27,
0LL);
}
}
| JS_SetGlobalVar:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R9,RCX
MOV RAX,RDX
MOV EBP,ESI
MOV RBX,RDI
MOV RDX,qword ptr [RDI + 0x1b0]
MOV RSI,qword ptr [RDX + 0x18]
MOV ECX,dword ptr [RSI + 0x20]
AND ECX,EBP
NOT RCX
MOV R10D,dword ptr [RSI + RCX*0x4]
TEST R10D,R10D
JZ 0x001438c4
ADD RSI,0x40
XOR ECX,ECX
MOV EDI,0x3ffffff
LAB_00143893:
MOV R10D,R10D
LEA R14,[RSI + R10*0x8]
ADD R14,-0x8
CMP dword ptr [R14 + 0x4],EBP
JZ 0x001438b4
MOV R10D,dword ptr [R14]
MOV R14D,0x0
AND R10D,EDI
JNZ 0x00143893
JMP 0x001438c9
LAB_001438b4:
DEC R10
SHL R10,0x4
ADD R10,qword ptr [RDX + 0x20]
MOV RCX,R10
JMP 0x001438c9
LAB_001438c4:
XOR ECX,ECX
XOR R14D,R14D
LAB_001438c9:
TEST R14,R14
JZ 0x00143904
CMP R8D,0x1
JZ 0x001438e9
CMP dword ptr [RCX + 0x8],0x4
JZ 0x00143971
TEST byte ptr [R14 + 0x3],0x8
JZ 0x0014398e
LAB_001438e9:
MOV RSI,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],R9
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x00121922
XOR EAX,EAX
JMP 0x00143968
LAB_00143904:
MOV RCX,qword ptr [RBX + 0x18]
MOV RCX,qword ptr [RCX + 0x108]
TEST RCX,RCX
JZ 0x00143928
MOV ECX,dword ptr [RCX + 0x40]
SHR ECX,0xf
AND ECX,0x10000
OR ECX,0x8000
JMP 0x0014392d
LAB_00143928:
MOV ECX,0x8000
LAB_0014392d:
MOV RSI,qword ptr [RBX + 0x1a0]
MOV RDX,qword ptr [RBX + 0x1a8]
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x28],RDX
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x10],ECX
MOV qword ptr [RSP + 0x18],0x0
MOV RDI,RBX
MOV ECX,EBP
MOV R8,RAX
CALL 0x001283e4
LAB_00143968:
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00143971:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
MOV RDX,R9
CALL 0x00121922
MOV ESI,dword ptr [R14 + 0x4]
MOV RDI,RBX
CALL 0x0014164a
JMP 0x001439ae
LAB_0014398e:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
MOV RDX,R9
CALL 0x00121922
LEA RDX,[0x1a33ab]
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001415b7
LAB_001439ae:
MOV EAX,0xffffffff
JMP 0x00143968
|
int8
JS_SetGlobalVar(long param_1,uint param_2,int8 param_3,int8 param_4,int param_5)
{
long lVar1;
long lVar2;
int8 uVar3;
int8 uVar4;
uint uVar5;
int8 *puVar6;
uint *puVar7;
int4 local_28;
int4 uStack_20;
lVar2 = *(long *)(*(long *)(param_1 + 0x1b0) + 0x18);
uVar5 = *(uint *)(lVar2 + ~(ulong)(*(uint *)(lVar2 + 0x20) & param_2) * 4);
if (uVar5 == 0) {
puVar6 = (int8 *)0x0;
puVar7 = (uint *)0x0;
}
else {
puVar6 = (int8 *)0x0;
do {
lVar1 = lVar2 + 0x40 + (ulong)uVar5 * 8;
puVar7 = (uint *)(lVar1 + -8);
if (*(uint *)(lVar1 + -4) == param_2) {
puVar6 = (int8 *)
(((ulong)uVar5 - 1) * 0x10 + *(long *)(*(long *)(param_1 + 0x1b0) + 0x20));
break;
}
uVar5 = *puVar7;
puVar7 = (uint *)0x0;
uVar5 = uVar5 & 0x3ffffff;
} while (uVar5 != 0);
}
if (puVar7 == (uint *)0x0) {
lVar2 = *(long *)(*(long *)(param_1 + 0x18) + 0x108);
if (lVar2 == 0) {
uVar5 = 0x8000;
}
else {
uVar5 = *(uint *)(lVar2 + 0x40) >> 0xf & 0x10000 | 0x8000;
}
local_28 = (int4)*(int8 *)(param_1 + 0x1a0);
uStack_20 = (int4)*(int8 *)(param_1 + 0x1a8);
uVar4 = JS_SetPropertyInternal2
(param_1,*(int8 *)(param_1 + 0x1a0),*(int8 *)(param_1 + 0x1a8),
param_2,param_3,param_4,local_28,uStack_20,uVar5,0);
return uVar4;
}
if (param_5 == 1) {
LAB_001438e9:
uVar4 = *puVar6;
uVar3 = puVar6[1];
*puVar6 = param_3;
puVar6[1] = param_4;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar3);
uVar4 = 0;
}
else {
if (*(int *)(puVar6 + 1) == 4) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_3,param_4);
JS_ThrowReferenceErrorUninitialized(param_1,puVar7[1]);
}
else {
if ((*puVar7 & 0x8000000) != 0) goto LAB_001438e9;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_3,param_4);
__JS_ThrowTypeErrorAtom(param_1,param_2,"\'%s\' is read-only");
}
uVar4 = 0xffffffff;
}
return uVar4;
}
| |
26,726 | nglog::DoRawLog(char**, unsigned long*, char const*, ...) | ng-log[P]ng-log/src/raw_logging.cc | static bool DoRawLog(char** buf, size_t* size, const char* format, ...) {
va_list ap;
va_start(ap, format);
int n = std::vsnprintf(*buf, *size, format, ap);
va_end(ap);
if (n < 0 || static_cast<size_t>(n) > *size) return false;
*size -= static_cast<size_t>(n);
*buf += n;
return true;
} | O3 | cpp | nglog::DoRawLog(char**, unsigned long*, char const*, ...):
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x2e8cf
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 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax # imm = 0x3000000018
movq %rax, (%rcx)
movq (%rdi), %rdi
movq (%r14), %rsi
callq 0x8390
testl %eax, %eax
js 0x2e90e
movl %eax, %eax
movq (%r14), %rcx
subq %rax, %rcx
jb 0x2e90e
movq %rcx, (%r14)
addq %rax, (%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
| _ZN5nglogL8DoRawLogEPPcPmPKcz:
push r14
push rbx
sub rsp, 0D8h
mov r14, rsi
mov rbx, rdi
lea rsi, [rsp+0E8h+var_C8]
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_2E8CF
movaps [rsp+0E8h+var_98], xmm0
movaps [rsp+0E8h+var_88], xmm1
movaps [rsp+0E8h+var_78], xmm2
movaps [rsp+0E8h+var_68], xmm3
movaps [rsp+0E8h+var_58], xmm4
movaps [rsp+0E8h+var_48], xmm5
movaps [rsp+0E8h+var_38], xmm6
movaps [rsp+0E8h+var_28], xmm7
loc_2E8CF:
mov rcx, rsp
mov [rcx+10h], rsi
lea rax, [rsp+0E8h+arg_0]
mov [rcx+8], rax
mov rax, 3000000018h
mov [rcx], rax
mov rdi, [rdi]
mov rsi, [r14]
call _vsnprintf
test eax, eax
js short loc_2E90E
mov eax, eax
mov rcx, [r14]
sub rcx, rax
jb short loc_2E90E
mov [r14], rcx
add [rbx], rax
loc_2E90E:
add rsp, 0D8h
pop rbx
pop r14
retn
| long long nglog::DoRawLog(
nglog *this,
char **a2,
unsigned long long *a3,
const char *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)
{
long long result; // rax
_QWORD v16[4]; // [rsp+0h] [rbp-E8h] BYREF
char v17; // [rsp+20h] [rbp-C8h] BYREF
const char *v18; // [rsp+38h] [rbp-B0h]
long long v19; // [rsp+40h] [rbp-A8h]
long long v20; // [rsp+48h] [rbp-A0h]
__m128 v21; // [rsp+50h] [rbp-98h]
__m128 v22; // [rsp+60h] [rbp-88h]
__m128 v23; // [rsp+70h] [rbp-78h]
__m128 v24; // [rsp+80h] [rbp-68h]
__m128 v25; // [rsp+90h] [rbp-58h]
__m128 v26; // [rsp+A0h] [rbp-48h]
__m128 v27; // [rsp+B0h] [rbp-38h]
__m128 v28; // [rsp+C0h] [rbp-28h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v18 = a4;
v19 = a5;
v20 = a6;
v16[2] = &v17;
v16[1] = &a15;
v16[0] = 0x3000000018LL;
result = vsnprintf(*(_QWORD *)this, *a2, a3, v16);
if ( (int)result >= 0 )
{
result = (unsigned int)result;
if ( (unsigned long long)*a2 >= (unsigned int)result )
{
*a2 -= (unsigned int)result;
*(_QWORD *)this += (unsigned int)result;
}
}
return result;
}
| DoRawLog:
PUSH R14
PUSH RBX
SUB RSP,0xd8
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x0012e8cf
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_0012e8cf:
MOV RCX,RSP
MOV qword ptr [RCX + 0x10],RSI
LEA RAX,[RSP + 0xf0]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000018
MOV qword ptr [RCX],RAX
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [R14]
CALL 0x00108390
TEST EAX,EAX
JS 0x0012e90e
MOV EAX,EAX
MOV RCX,qword ptr [R14]
SUB RCX,RAX
JC 0x0012e90e
MOV qword ptr [R14],RCX
ADD qword ptr [RBX],RAX
LAB_0012e90e:
ADD RSP,0xd8
POP RBX
POP R14
RET
|
/* nglog::DoRawLog(char**, unsigned long*, char const*, ...) */
void nglog::DoRawLog(char **param_1,ulong *param_2,char *param_3,...)
{
char in_AL;
uint uVar1;
ulong uVar2;
int8 in_RCX;
int8 in_R8;
int8 in_R9;
int8 in_XMM0_Qa;
int8 in_XMM1_Qa;
int8 in_XMM2_Qa;
int8 in_XMM3_Qa;
int8 in_XMM4_Qa;
int8 in_XMM5_Qa;
int8 in_XMM6_Qa;
int8 in_XMM7_Qa;
int8 local_e8;
int1 *local_e0;
int1 *local_d8;
int1 local_c8 [24];
int8 local_b0;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
local_d8 = local_c8;
if (in_AL != '\0') {
local_98 = in_XMM0_Qa;
local_88 = in_XMM1_Qa;
local_78 = in_XMM2_Qa;
local_68 = in_XMM3_Qa;
local_58 = in_XMM4_Qa;
local_48 = in_XMM5_Qa;
local_38 = in_XMM6_Qa;
local_28 = in_XMM7_Qa;
}
local_e0 = &stack0x00000008;
local_e8 = 0x3000000018;
local_b0 = in_RCX;
local_a8 = in_R8;
local_a0 = in_R9;
uVar1 = vsnprintf(*param_1,*param_2,param_3,&local_e8);
if (-1 < (int)uVar1) {
uVar2 = (ulong)uVar1;
if (uVar2 <= *param_2) {
*param_2 = *param_2 - uVar2;
*param_1 = *param_1 + uVar2;
}
}
return;
}
| |
26,727 | translog_set_sent_to_disk | eloqsql/storage/maria/ma_loghandler.c | static void translog_set_sent_to_disk(struct st_translog_buffer *buffer)
{
LSN lsn= buffer->last_lsn;
TRANSLOG_ADDRESS in_buffers= buffer->next_buffer_offset;
DBUG_ENTER("translog_set_sent_to_disk");
mysql_mutex_lock(&log_descriptor.sent_to_disk_lock);
DBUG_PRINT("enter", ("lsn: " LSN_FMT " in_buffers: " LSN_FMT " "
"in_buffers_only: " LSN_FMT " start: " LSN_FMT " "
"sent_to_disk: " LSN_FMT,
LSN_IN_PARTS(lsn),
LSN_IN_PARTS(in_buffers),
LSN_IN_PARTS(log_descriptor.log_start),
LSN_IN_PARTS(log_descriptor.in_buffers_only),
LSN_IN_PARTS(log_descriptor.sent_to_disk)));
/*
We write sequentially (first part of following assert) but we rewrite
the same page in case we started mysql and shut it down immediately
(second part of the following assert)
*/
DBUG_ASSERT(cmp_translog_addr(lsn, log_descriptor.sent_to_disk) >= 0 ||
cmp_translog_addr(lsn, log_descriptor.log_start) < 0);
log_descriptor.sent_to_disk= lsn;
/* LSN_IMPOSSIBLE == 0 => it will work for very first time */
if (cmp_translog_addr(in_buffers, log_descriptor.in_buffers_only) > 0)
{
log_descriptor.in_buffers_only= in_buffers;
DBUG_PRINT("info", ("set new in_buffers_only"));
}
mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock);
DBUG_VOID_RETURN;
} | O0 | c | translog_set_sent_to_disk:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x100000(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x100018(%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0x3e00cf(%rip), %rdi # 0x441fa0
addq $0x800cc0, %rdi # imm = 0x800CC0
leaq 0xbd350(%rip), %rsi # 0x11f22f
movl $0x8e9, %edx # imm = 0x8E9
callq 0x54eb0
jmp 0x61eeb
jmp 0x61eed
jmp 0x61eef
movq -0x10(%rbp), %rax
movq %rax, 0xbe0d46(%rip) # 0xc42c40
movq -0x18(%rbp), %rax
subq 0xbe0d53(%rip), %rax # 0xc42c58
cmpq $0x0, %rax
jle 0x61f1a
movq -0x18(%rbp), %rax
movq %rax, 0xbe0d42(%rip) # 0xc42c58
jmp 0x61f18
jmp 0x61f1a
leaq 0x3e007f(%rip), %rdi # 0x441fa0
addq $0x800cc0, %rdi # imm = 0x800CC0
callq 0x54f20
jmp 0x61f2f
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| translog_set_sent_to_disk:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, qword ptr ds:loc_100000[rax]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rax, ds:off_100018[rax]
mov [rbp+var_18], rax
lea rdi, log_descriptor
add rdi, 800CC0h
lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 8E9h
call inline_mysql_mutex_lock_7
jmp short $+2
loc_61EEB:
jmp short $+2
loc_61EED:
jmp short $+2
loc_61EEF:
mov rax, [rbp+var_10]
mov cs:qword_C42C40, rax
mov rax, [rbp+var_18]
sub rax, cs:qword_C42C58
cmp rax, 0
jle short loc_61F1A
mov rax, [rbp+var_18]
mov cs:qword_C42C58, rax
jmp short $+2
loc_61F18:
jmp short $+2
loc_61F1A:
lea rdi, log_descriptor
add rdi, 800CC0h
call inline_mysql_mutex_unlock_7
jmp short $+2
loc_61F2F:
add rsp, 20h
pop rbp
retn
| long long translog_set_sent_to_disk(long long a1)
{
long long v2; // [rsp+8h] [rbp-18h]
long long v3; // [rsp+10h] [rbp-10h]
v3 = *(_QWORD *)((char *)&loc_100000 + a1);
v2 = *(long long *)((char *)&off_100018 + a1);
inline_mysql_mutex_lock_7(
(long long)&log_descriptor[1048984],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x8E9u);
qword_C42C40 = v3;
if ( v2 - qword_C42C58 > 0 )
qword_C42C58 = v2;
return inline_mysql_mutex_unlock_7((long long)&log_descriptor[1048984]);
}
| translog_set_sent_to_disk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x100000]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x100018]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[0x541fa0]
ADD RDI,0x800cc0
LEA RSI,[0x21f22f]
MOV EDX,0x8e9
CALL 0x00154eb0
JMP 0x00161eeb
LAB_00161eeb:
JMP 0x00161eed
LAB_00161eed:
JMP 0x00161eef
LAB_00161eef:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [0x00d42c40],RAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [0x00d42c58]
CMP RAX,0x0
JLE 0x00161f1a
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [0x00d42c58],RAX
JMP 0x00161f18
LAB_00161f18:
JMP 0x00161f1a
LAB_00161f1a:
LEA RDI,[0x541fa0]
ADD RDI,0x800cc0
CALL 0x00154f20
JMP 0x00161f2f
LAB_00161f2f:
ADD RSP,0x20
POP RBP
RET
|
void translog_set_sent_to_disk(long param_1)
{
int8 uVar1;
long lVar2;
uVar1 = *(int8 *)(param_1 + 0x100000);
lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf);
inline_mysql_mutex_lock
(&DAT_00d42c60,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x8e9);
if (0 < lVar2 - DAT_00d42c58) {
DAT_00d42c58 = lVar2;
}
DAT_00d42c40 = uVar1;
inline_mysql_mutex_unlock(&DAT_00d42c60);
return;
}
| |
26,728 | my_uni_utf32 | eloqsql/strings/ctype-ucs2.c | static int
my_uni_utf32(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if (wc > 0x10FFFF)
return MY_CS_ILUNI;
s[0]= (uchar) (wc >> 24);
s[1]= (uchar) (wc >> 16) & 0xFF;
s[2]= (uchar) (wc >> 8) & 0xFF;
s[3]= (uchar) wc & 0xFF;
return 4;
} | O3 | c | my_uni_utf32:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rsi, %rbx
leaq 0x4(%rdx), %rsi
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rsi
ja 0x4cc84
xorl %eax, %eax
cmpq $0x10ffff, %rbx # imm = 0x10FFFF
ja 0x4cc84
movb $0x0, (%rdx)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x1(%rdx)
movb %bh, 0x2(%rdx)
movb %bl, 0x3(%rdx)
movl $0x4, %eax
popq %rbx
popq %rbp
retq
| my_uni_utf32:
push rbp
mov rbp, rsp
push rbx
mov rbx, rsi
lea rsi, [rdx+4]
mov eax, 0FFFFFF98h
cmp rsi, rcx
ja short loc_4CC84
xor eax, eax
cmp rbx, offset unk_10FFFF
ja short loc_4CC84
mov byte ptr [rdx], 0
mov eax, ebx
shr eax, 10h
mov [rdx+1], al
mov [rdx+2], bh
mov [rdx+3], bl
mov eax, 4
loc_4CC84:
pop rbx
pop rbp
retn
| long long my_uni_utf32(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
result = 4294967192LL;
if ( (unsigned long long)(a3 + 4) <= a4 )
{
result = 0LL;
if ( a2 <= (unsigned long long)&unk_10FFFF )
{
*a3 = 0;
a3[1] = BYTE2(a2);
a3[2] = BYTE1(a2);
a3[3] = a2;
return 4LL;
}
}
return result;
}
| my_uni_utf32:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RBX,RSI
LEA RSI,[RDX + 0x4]
MOV EAX,0xffffff98
CMP RSI,RCX
JA 0x0014cc84
XOR EAX,EAX
CMP RBX,0x10ffff
JA 0x0014cc84
MOV byte ptr [RDX],0x0
MOV EAX,EBX
SHR EAX,0x10
MOV byte ptr [RDX + 0x1],AL
MOV byte ptr [RDX + 0x2],BH
MOV byte ptr [RDX + 0x3],BL
MOV EAX,0x4
LAB_0014cc84:
POP RBX
POP RBP
RET
|
int8 my_uni_utf32(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int8 uVar1;
uVar1 = 0xffffff98;
if ((param_3 + 4 <= param_4) && (uVar1 = 0, param_2 < 0x110000)) {
*param_3 = 0;
param_3[1] = (char)(param_2 >> 0x10);
param_3[2] = (char)(param_2 >> 8);
param_3[3] = (char)param_2;
uVar1 = 4;
}
return uVar1;
}
| |
26,729 | wqueue_release_one_locktype_from_queue | eloqsql/mysys/wqueue.c | void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue)
{
struct st_my_thread_var *last= wqueue->last_thread;
struct st_my_thread_var *next= last->next;
struct st_my_thread_var *thread;
struct st_my_thread_var *new_list= NULL;
uint first_type= next->lock_type;
if (first_type == MY_PTHREAD_LOCK_WRITE)
{
/* release first waiting for write lock */
mysql_cond_signal(&next->suspend);
if (next == last)
wqueue->last_thread= NULL;
else
last->next= next->next;
next->next= NULL;
return;
}
do
{
thread= next;
next= thread->next;
if (thread->lock_type == MY_PTHREAD_LOCK_WRITE)
{
/* skip waiting for write lock */
if (new_list)
{
thread->next= new_list->next;
new_list= new_list->next= thread;
}
else
new_list= thread->next= thread;
}
else
{
/* release waiting for read lock */
mysql_cond_signal(&thread->suspend);
thread->next= NULL;
}
} while (thread != last);
wqueue->last_thread= new_list;
} | O3 | c | wqueue_release_one_locktype_from_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq (%rdi), %r12
movq 0x88(%r12), %rbx
cmpl $0x1, 0xe4(%rbx)
jne 0xac8aa
leaq 0x8(%rbx), %r14
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
jne 0xac948
movq %r14, %rdi
callq 0x29560
cmpq %r12, %rbx
je 0xac927
movq 0x88(%rbx), %rax
movq %rax, 0x88(%r12)
jmp 0xac92e
movq %r15, %r14
xorl %r13d, %r13d
movq %rbx, %r15
movq 0x88(%rbx), %rbx
cmpl $0x1, 0xe4(%r15)
jne 0xac8e0
testq %r13, %r13
je 0xac8ff
movq 0x88(%r13), %rax
movq %rax, 0x88(%r15)
movq %r15, 0x88(%r13)
jmp 0xac906
movq 0x38(%r15), %rdi
testq %rdi, %rdi
jne 0xac910
leaq 0x8(%r15), %rdi
callq 0x29560
movq $0x0, 0x88(%r15)
jmp 0xac909
movq %r15, 0x88(%r15)
movq %r15, %r13
cmpq %r12, %r15
jne 0xac8b0
jmp 0xac922
leaq 0x2e0759(%rip), %rax # 0x38d070
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xac8e9
movq %r13, (%r14)
jmp 0xac939
movq $0x0, (%r15)
movq $0x0, 0x88(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e0721(%rip), %rax # 0x38d070
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xac885
| wqueue_release_one_locktype_from_queue:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdi
mov r12, [rdi]
mov rbx, [r12+88h]
cmp dword ptr [rbx+0E4h], 1
jnz short loc_AC8AA
lea r14, [rbx+8]
mov rdi, [rbx+38h]
test rdi, rdi
jnz loc_AC948
loc_AC885:
mov rdi, r14
call _pthread_cond_signal
cmp rbx, r12
jz loc_AC927
mov rax, [rbx+88h]
mov [r12+88h], rax
jmp loc_AC92E
loc_AC8AA:
mov r14, r15
xor r13d, r13d
loc_AC8B0:
mov r15, rbx
mov rbx, [rbx+88h]
cmp dword ptr [r15+0E4h], 1
jnz short loc_AC8E0
test r13, r13
jz short loc_AC8FF
mov rax, [r13+88h]
mov [r15+88h], rax
mov [r13+88h], r15
jmp short loc_AC906
loc_AC8E0:
mov rdi, [r15+38h]
test rdi, rdi
jnz short loc_AC910
loc_AC8E9:
lea rdi, [r15+8]
call _pthread_cond_signal
mov qword ptr [r15+88h], 0
jmp short loc_AC909
loc_AC8FF:
mov [r15+88h], r15
loc_AC906:
mov r13, r15
loc_AC909:
cmp r15, r12
jnz short loc_AC8B0
jmp short loc_AC922
loc_AC910:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_AC8E9
loc_AC922:
mov [r14], r13
jmp short loc_AC939
loc_AC927:
mov qword ptr [r15], 0
loc_AC92E:
mov qword ptr [rbx+88h], 0
loc_AC939:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AC948:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_AC885
| long long wqueue_release_one_locktype_from_queue(long long *a1)
{
long long v2; // r12
long long v3; // rbx
long long v4; // rdi
long long result; // rax
long long v7; // r13
long long v8; // r15
long long v9; // rdi
v2 = *a1;
v3 = *(_QWORD *)(*a1 + 136);
if ( *(_DWORD *)(v3 + 228) == 1 )
{
v4 = *(_QWORD *)(v3 + 56);
if ( v4 )
((void ( *)(long long))PSI_server[46])(v4);
result = pthread_cond_signal(v3 + 8);
if ( v3 == v2 )
{
*a1 = 0LL;
}
else
{
result = *(_QWORD *)(v3 + 136);
*(_QWORD *)(v2 + 136) = result;
}
*(_QWORD *)(v3 + 136) = 0LL;
}
else
{
v7 = 0LL;
do
{
v8 = v3;
v3 = *(_QWORD *)(v3 + 136);
if ( *(_DWORD *)(v8 + 228) == 1 )
{
if ( v7 )
{
result = *(_QWORD *)(v7 + 136);
*(_QWORD *)(v8 + 136) = result;
*(_QWORD *)(v7 + 136) = v8;
}
else
{
*(_QWORD *)(v8 + 136) = v8;
}
v7 = v8;
}
else
{
v9 = *(_QWORD *)(v8 + 56);
if ( v9 )
((void ( *)(long long))PSI_server[46])(v9);
result = pthread_cond_signal(v8 + 8);
*(_QWORD *)(v8 + 136) = 0LL;
}
}
while ( v8 != v2 );
*a1 = v7;
}
return result;
}
| wqueue_release_one_locktype_from_queue:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDI
MOV R12,qword ptr [RDI]
MOV RBX,qword ptr [R12 + 0x88]
CMP dword ptr [RBX + 0xe4],0x1
JNZ 0x001ac8aa
LEA R14,[RBX + 0x8]
MOV RDI,qword ptr [RBX + 0x38]
TEST RDI,RDI
JNZ 0x001ac948
LAB_001ac885:
MOV RDI,R14
CALL 0x00129560
CMP RBX,R12
JZ 0x001ac927
MOV RAX,qword ptr [RBX + 0x88]
MOV qword ptr [R12 + 0x88],RAX
JMP 0x001ac92e
LAB_001ac8aa:
MOV R14,R15
XOR R13D,R13D
LAB_001ac8b0:
MOV R15,RBX
MOV RBX,qword ptr [RBX + 0x88]
CMP dword ptr [R15 + 0xe4],0x1
JNZ 0x001ac8e0
TEST R13,R13
JZ 0x001ac8ff
MOV RAX,qword ptr [R13 + 0x88]
MOV qword ptr [R15 + 0x88],RAX
MOV qword ptr [R13 + 0x88],R15
JMP 0x001ac906
LAB_001ac8e0:
MOV RDI,qword ptr [R15 + 0x38]
TEST RDI,RDI
JNZ 0x001ac910
LAB_001ac8e9:
LEA RDI,[R15 + 0x8]
CALL 0x00129560
MOV qword ptr [R15 + 0x88],0x0
JMP 0x001ac909
LAB_001ac8ff:
MOV qword ptr [R15 + 0x88],R15
LAB_001ac906:
MOV R13,R15
LAB_001ac909:
CMP R15,R12
JNZ 0x001ac8b0
JMP 0x001ac922
LAB_001ac910:
LEA RAX,[0x48d070]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001ac8e9
LAB_001ac922:
MOV qword ptr [R14],R13
JMP 0x001ac939
LAB_001ac927:
MOV qword ptr [R15],0x0
LAB_001ac92e:
MOV qword ptr [RBX + 0x88],0x0
LAB_001ac939:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ac948:
LEA RAX,[0x48d070]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001ac885
|
void wqueue_release_one_locktype_from_queue(long *param_1)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
bool bVar5;
lVar1 = *param_1;
lVar3 = *(long *)(lVar1 + 0x88);
if (*(int *)(lVar3 + 0xe4) == 1) {
if (*(long *)(lVar3 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar3 + 8));
if (lVar3 == lVar1) {
*param_1 = 0;
}
else {
*(int8 *)(lVar1 + 0x88) = *(int8 *)(lVar3 + 0x88);
}
*(int8 *)(lVar3 + 0x88) = 0;
}
else {
lVar4 = 0;
do {
lVar2 = *(long *)(lVar3 + 0x88);
if (*(int *)(lVar3 + 0xe4) == 1) {
if (lVar4 == 0) {
*(long *)(lVar3 + 0x88) = lVar3;
lVar4 = lVar3;
}
else {
*(int8 *)(lVar3 + 0x88) = *(int8 *)(lVar4 + 0x88);
*(long *)(lVar4 + 0x88) = lVar3;
lVar4 = lVar3;
}
}
else {
if (*(long *)(lVar3 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar3 + 8));
*(int8 *)(lVar3 + 0x88) = 0;
}
bVar5 = lVar3 != lVar1;
lVar3 = lVar2;
} while (bVar5);
*param_1 = lVar4;
}
return;
}
| |
26,730 | int10_to_str | eloqsql/strings/int2str.c | char *int10_to_str(long int val,char *dst,int radix)
{
char buffer[65];
register char *p;
long int new_val;
unsigned long int uval = (unsigned long int) val;
if (radix < 0) /* -10 */
{
if (val < 0)
{
*dst++ = '-';
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (unsigned long int)0 - uval;
}
}
p = &buffer[sizeof(buffer)-1];
*p = '\0';
new_val= (long) (uval / 10);
*--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
val = new_val;
while (val != 0)
{
new_val=val/10;
*--p = '0' + (char) (val-new_val*10);
val= new_val;
}
while ((*dst++ = *p++) != 0) ;
return dst-1;
} | O0 | c | int10_to_str:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x58(%rbp)
movq %rsi, -0x60(%rbp)
movl %edx, -0x64(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpl $0x0, -0x64(%rbp)
jge 0x882e6
cmpq $0x0, -0x58(%rbp)
jge 0x882e4
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x2d, (%rax)
xorl %eax, %eax
subq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x882e6
leaq -0x50(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb $0x0, (%rax)
movq -0x80(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x78(%rbp)
movq -0x80(%rbp), %rax
imulq $0xa, -0x78(%rbp), %rcx
subq %rcx, %rax
movsbl %al, %eax
addl $0x30, %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x70(%rbp)
movb %cl, -0x1(%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x88382
movq -0x58(%rbp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movq %rax, -0x78(%rbp)
movq -0x58(%rbp), %rax
imulq $0xa, -0x78(%rbp), %rcx
subq %rcx, %rax
movsbl %al, %eax
addl $0x30, %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x70(%rbp)
movb %cl, -0x1(%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x88339
jmp 0x88384
movq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x70(%rbp)
movb (%rax), %al
movq -0x60(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x883b0
jmp 0x88384
movq -0x60(%rbp), %rax
decq %rax
movq %rax, -0x88(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x883e0
movq -0x88(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
callq 0x25410
nopw %cs:(%rax,%rax)
nop
| int10_to_str:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_64], edx
mov rax, [rbp+var_58]
mov [rbp+var_80], rax
cmp [rbp+var_64], 0
jge short loc_882E6
cmp [rbp+var_58], 0
jge short loc_882E4
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
mov byte ptr [rax], 2Dh ; '-'
xor eax, eax
sub rax, [rbp+var_80]
mov [rbp+var_80], rax
loc_882E4:
jmp short $+2
loc_882E6:
lea rax, [rbp+var_50]
add rax, 40h ; '@'
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov byte ptr [rax], 0
mov rax, [rbp+var_80]
mov ecx, 0Ah
xor edx, edx
div rcx
mov [rbp+var_78], rax
mov rax, [rbp+var_80]
imul rcx, [rbp+var_78], 0Ah
sub rax, rcx
movsx eax, al
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_70]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_70], rdx
mov [rax-1], cl
mov rax, [rbp+var_78]
mov [rbp+var_58], rax
loc_88339:
cmp [rbp+var_58], 0
jz short loc_88382
mov rax, [rbp+var_58]
mov ecx, 0Ah
cqo
idiv rcx
mov [rbp+var_78], rax
mov rax, [rbp+var_58]
imul rcx, [rbp+var_78], 0Ah
sub rax, rcx
movsx eax, al
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_70]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_70], rdx
mov [rax-1], cl
mov rax, [rbp+var_78]
mov [rbp+var_58], rax
jmp short loc_88339
loc_88382:
jmp short $+2
loc_88384:
mov rax, [rbp+var_70]
mov rcx, rax
add rcx, 1
mov [rbp+var_70], rcx
mov al, [rax]
mov rcx, [rbp+var_60]
mov rdx, rcx
add rdx, 1
mov [rbp+var_60], rdx
mov [rcx], al
movsx eax, al
cmp eax, 0
jz short loc_883B0
jmp short loc_88384
loc_883B0:
mov rax, [rbp+var_60]
dec rax
mov [rbp+var_88], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_883E0
mov rax, [rbp+var_88]
add rsp, 90h
pop rbp
retn
loc_883E0:
call ___stack_chk_fail
| _BYTE * int10_to_str(long long a1, _BYTE *a2, int a3)
{
_BYTE *v3; // rax
_BYTE *v4; // rax
_BYTE *v5; // rcx
unsigned long long v7; // [rsp+10h] [rbp-80h]
_BYTE *v8; // [rsp+20h] [rbp-70h]
_BYTE *v9; // [rsp+30h] [rbp-60h]
signed long long i; // [rsp+38h] [rbp-58h]
_BYTE v11[9]; // [rsp+7Fh] [rbp-11h] BYREF
unsigned long long v12; // [rsp+88h] [rbp-8h]
v12 = __readfsqword(0x28u);
v9 = a2;
v7 = a1;
if ( a3 < 0 && a1 < 0 )
{
v9 = a2 + 1;
*a2 = 45;
v7 = -a1;
}
v11[1] = 0;
v8 = v11;
v11[0] = v7 % 0xA + 48;
for ( i = v7 / 0xA; i; i /= 10LL )
{
v3 = v8--;
*(v3 - 1) = i % 10 + 48;
}
do
{
v4 = v8++;
LOBYTE(v4) = *v4;
v5 = v9++;
*v5 = (_BYTE)v4;
}
while ( (_BYTE)v4 );
return v9 - 1;
}
| int10_to_str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV dword ptr [RBP + -0x64],EDX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x80],RAX
CMP dword ptr [RBP + -0x64],0x0
JGE 0x001882e6
CMP qword ptr [RBP + -0x58],0x0
JGE 0x001882e4
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x60],RCX
MOV byte ptr [RAX],0x2d
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x80],RAX
LAB_001882e4:
JMP 0x001882e6
LAB_001882e6:
LEA RAX,[RBP + -0x50]
ADD RAX,0x40
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x80]
MOV ECX,0xa
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x80]
IMUL RCX,qword ptr [RBP + -0x78],0xa
SUB RAX,RCX
MOVSX EAX,AL
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x70]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x70],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x58],RAX
LAB_00188339:
CMP qword ptr [RBP + -0x58],0x0
JZ 0x00188382
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,0xa
CQO
IDIV RCX
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x58]
IMUL RCX,qword ptr [RBP + -0x78],0xa
SUB RAX,RCX
MOVSX EAX,AL
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x70]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x70],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00188339
LAB_00188382:
JMP 0x00188384
LAB_00188384:
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x70],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x60]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x60],RDX
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001883b0
JMP 0x00188384
LAB_001883b0:
MOV RAX,qword ptr [RBP + -0x60]
DEC RAX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001883e0
MOV RAX,qword ptr [RBP + -0x88]
ADD RSP,0x90
POP RBP
RET
LAB_001883e0:
CALL 0x00125410
|
char * int10_to_str(ulong param_1,char *param_2,int param_3)
{
char cVar1;
char *pcVar2;
long in_FS_OFFSET;
ulong local_88;
char *local_78;
char *local_68;
ulong local_60;
char local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_88 = param_1;
local_68 = param_2;
if ((param_3 < 0) && ((long)param_1 < 0)) {
local_68 = param_2 + 1;
*param_2 = '-';
local_88 = -param_1;
}
local_1a[2] = 0;
local_1a[1] = (char)local_88 + (char)(local_88 / 10) * -10 + '0';
local_78 = local_1a + 1;
local_60 = local_88 / 10;
while (pcVar2 = local_68, local_60 != 0) {
local_78[-1] = (char)local_60 + (char)((long)local_60 / 10) * -10 + '0';
local_78 = local_78 + -1;
local_60 = (long)local_60 / 10;
}
do {
local_68 = pcVar2;
cVar1 = *local_78;
*local_68 = cVar1;
local_78 = local_78 + 1;
pcVar2 = local_68 + 1;
} while (cVar1 != '\0');
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_68;
}
| |
26,731 | quantize_row_q8_K_ref | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void quantize_row_q8_K_ref(const float * restrict x, block_q8_K * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
for (int i = 0; i < nb; i++) {
float max = 0;
float amax = 0;
for (int j = 0; j < QK_K; ++j) {
float ax = fabsf(x[j]);
if (ax > amax) {
amax = ax; max = x[j];
}
}
if (!amax) {
y[i].d = 0;
memset(y[i].qs, 0, QK_K);
x += QK_K;
continue;
}
//const float iscale = -128.f/max;
// We need this change for IQ2_XXS, else the AVX implementation becomes very awkward
const float iscale = -127.f/max;
for (int j = 0; j < QK_K; ++j) {
int v = nearest_int(iscale*x[j]);
y[i].qs[j] = MIN(127, v);
}
for (int j = 0; j < QK_K/16; ++j) {
int sum = 0;
for (int ii = 0; ii < 16; ++ii) {
sum += y[i].qs[j*16 + ii];
}
y[i].bsums[j] = sum;
}
y[i].d = 1/iscale;
x += QK_K;
}
} | O1 | c | quantize_row_q8_K_ref:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
testb %bl, %bl
jne 0x34f58
sarq $0x8, %rbx
testq %rbx, %rbx
jle 0x34f2f
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4(%rsi), %r12
xorl %r13d, %r13d
movaps 0x17238(%rip), %xmm5 # 0x4c020
xorps %xmm6, %xmm6
movss 0x1bfd5(%rip), %xmm7 # 0x50dc8
movss 0x1bfd0(%rip), %xmm8 # 0x50dcc
xorl %eax, %eax
xorps %xmm0, %xmm0
xorps %xmm2, %xmm2
movaps %xmm0, %xmm3
movss (%r15,%rax,4), %xmm4
movaps %xmm4, %xmm0
andps %xmm5, %xmm0
movaps %xmm3, %xmm1
cmpltss %xmm0, %xmm1
andps %xmm1, %xmm4
andnps %xmm2, %xmm1
orps %xmm4, %xmm1
maxss %xmm3, %xmm0
incq %rax
movaps %xmm1, %xmm2
cmpq $0x100, %rax # imm = 0x100
jne 0x34e04
ucomiss %xmm6, %xmm0
jne 0x34e41
jnp 0x34ee4
movss 0x1bfb3(%rip), %xmm0 # 0x50dfc
divss %xmm1, %xmm0
xorl %eax, %eax
movss (%r15,%rax,4), %xmm1
mulss %xmm0, %xmm1
movaps %xmm1, %xmm2
andps %xmm5, %xmm2
ucomiss %xmm2, %xmm7
jb 0x34f39
addss %xmm8, %xmm1
movd %xmm1, %ecx
andl $0x7fffff, %ecx # imm = 0x7FFFFF
movl $0x40007f, %edx # imm = 0x40007F
cmpl %edx, %ecx
jl 0x34e85
movl $0x40007f, %ecx # imm = 0x40007F
movb %cl, (%r12,%rax)
incq %rax
cmpq $0x100, %rax # imm = 0x100
jne 0x34e4f
imulq $0x124, %r13, %rax # imm = 0x124
leaq (%r14,%rax), %rcx
movq %r12, %rdx
xorl %esi, %esi
xorl %edi, %edi
xorl %r8d, %r8d
movsbl (%rdx,%rdi), %r9d
addl %r9d, %r8d
incq %rdi
cmpq $0x10, %rdi
jne 0x34ea9
movw %r8w, 0x104(%rcx,%rsi,2)
incq %rsi
addq $0x10, %rdx
cmpq $0x10, %rsi
jne 0x34ea4
movss 0x17180(%rip), %xmm1 # 0x4c058
divss %xmm0, %xmm1
movss %xmm1, (%r14,%rax)
jmp 0x34f15
imulq $0x124, %r13, %rdi # imm = 0x124
addq %r14, %rdi
movl $0x104, %edx # imm = 0x104
xorl %esi, %esi
callq 0x178f0
movss 0x1bec9(%rip), %xmm8 # 0x50dcc
movss 0x1bebd(%rip), %xmm7 # 0x50dc8
xorps %xmm6, %xmm6
movaps 0x1710b(%rip), %xmm5 # 0x4c020
addq $0x400, %r15 # imm = 0x400
incq %r13
addq $0x124, %r12 # imm = 0x124
cmpq %rbx, %r13
jne 0x34dfc
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x277af(%rip), %rdi # 0x5c6ef
leaq 0x268bd(%rip), %rsi # 0x5b804
leaq 0x277ba(%rip), %rcx # 0x5c708
movl $0x175, %edx # imm = 0x175
callq 0x17b00
leaq 0x26c8d(%rip), %rdi # 0x5bbec
leaq 0x2689e(%rip), %rsi # 0x5b804
leaq 0x273ec(%rip), %rcx # 0x5c359
movl $0x9b0, %edx # imm = 0x9B0
callq 0x17b00
| quantize_row_q8_K_ref:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdx
test bl, bl
jnz loc_34F58
sar rbx, 8
test rbx, rbx
jle loc_34F2F
mov r14, rsi
mov r15, rdi
lea r12, [rsi+4]
xor r13d, r13d
movaps xmm5, cs:xmmword_4C020
xorps xmm6, xmm6
movss xmm7, cs:dword_50DC8
movss xmm8, cs:dword_50DCC
loc_34DFC:
xor eax, eax
xorps xmm0, xmm0
xorps xmm2, xmm2
loc_34E04:
movaps xmm3, xmm0
movss xmm4, dword ptr [r15+rax*4]
movaps xmm0, xmm4
andps xmm0, xmm5
movaps xmm1, xmm3
cmpltss xmm1, xmm0
andps xmm4, xmm1
andnps xmm1, xmm2
orps xmm1, xmm4
maxss xmm0, xmm3
inc rax
movaps xmm2, xmm1
cmp rax, 100h
jnz short loc_34E04
ucomiss xmm0, xmm6
jnz short loc_34E41
jnp loc_34EE4
loc_34E41:
movss xmm0, cs:dword_50DFC
divss xmm0, xmm1
xor eax, eax
loc_34E4F:
movss xmm1, dword ptr [r15+rax*4]
mulss xmm1, xmm0
movaps xmm2, xmm1
andps xmm2, xmm5
ucomiss xmm7, xmm2
jb loc_34F39
addss xmm1, xmm8
movd ecx, xmm1
and ecx, 7FFFFFh
mov edx, 40007Fh
cmp ecx, edx
jl short loc_34E85
mov ecx, 40007Fh
loc_34E85:
mov [r12+rax], cl
inc rax
cmp rax, 100h
jnz short loc_34E4F
imul rax, r13, 124h
lea rcx, [r14+rax]
mov rdx, r12
xor esi, esi
loc_34EA4:
xor edi, edi
xor r8d, r8d
loc_34EA9:
movsx r9d, byte ptr [rdx+rdi]
add r8d, r9d
inc rdi
cmp rdi, 10h
jnz short loc_34EA9
mov [rcx+rsi*2+104h], r8w
inc rsi
add rdx, 10h
cmp rsi, 10h
jnz short loc_34EA4
movss xmm1, cs:dword_4C058
divss xmm1, xmm0
movss dword ptr [r14+rax], xmm1
jmp short loc_34F15
loc_34EE4:
imul rdi, r13, 124h
add rdi, r14
mov edx, 104h
xor esi, esi
call _memset
movss xmm8, cs:dword_50DCC
movss xmm7, cs:dword_50DC8
xorps xmm6, xmm6
movaps xmm5, cs:xmmword_4C020
loc_34F15:
add r15, 400h
inc r13
add r12, 124h
cmp r13, rbx
jnz loc_34DFC
loc_34F2F:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_34F39:
lea rdi, aFabsfFval41943; "fabsf(fval) <= 4194303.f"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntNearestIntF; "int nearest_int(float)"
mov edx, 175h
call ___assert_fail
loc_34F58:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidQuantizeRo_17; "void quantize_row_q8_K_ref(const float "...
mov edx, 9B0h
call ___assert_fail
| void quantize_row_q8_K_ref(long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v6; // r12
long long v7; // r13
__m128 v8; // xmm5
long long v9; // rax
__m128 v10; // xmm0
__m128 v11; // xmm2
__m128 v12; // xmm3
__m128 v13; // xmm1
__m128 v14; // xmm1
float v15; // xmm0_4
long long i; // rax
__m128i v17; // xmm1
int v18; // ecx
long long v19; // rdx
long long j; // rsi
long long v21; // rdi
__int16 v22; // r8
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2480LL,
"void quantize_row_q8_K_ref(const float *restrict, block_q8_K *restrict, int64_t)");
v3 = a3 >> 8;
if ( a3 >> 8 > 0 )
{
v6 = a2 + 4;
v7 = 0LL;
v8 = (__m128)xmmword_4C020;
do
{
v9 = 0LL;
v10 = 0LL;
v11 = 0LL;
do
{
v12 = v10;
v10 = _mm_and_ps((__m128)*(unsigned int *)(a1 + 4 * v9), v8);
v13 = _mm_cmplt_ss(v12, v10);
v14 = _mm_or_ps(_mm_andnot_ps(v13, v11), _mm_and_ps((__m128)*(unsigned int *)(a1 + 4 * v9), v13));
v10.m128_f32[0] = fmaxf(v10.m128_f32[0], v12.m128_f32[0]);
++v9;
v11 = v14;
}
while ( v9 != 256 );
if ( v10.m128_f32[0] == 0.0 )
{
memset(a2 + 292 * v7, 0LL, 260LL);
v8 = (__m128)xmmword_4C020;
}
else
{
v15 = -127.0 / v14.m128_f32[0];
for ( i = 0LL; i != 256; ++i )
{
v17 = (__m128i)*(unsigned int *)(a1 + 4 * i);
*(float *)v17.m128i_i32 = *(float *)v17.m128i_i32 * v15;
if ( COERCE_FLOAT(v17.m128i_i32[0] & v8.m128_i32[0]) > 4194303.0 )
__assert_fail(
"fabsf(fval) <= 4194303.f",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
373LL,
"int nearest_int(float)");
*(float *)v17.m128i_i32 = *(float *)v17.m128i_i32 + 12582912.0;
v18 = _mm_cvtsi128_si32(v17) & 0x7FFFFF;
if ( v18 >= 4194431 )
LOBYTE(v18) = 127;
*(_BYTE *)(v6 + i) = v18;
}
v19 = v6;
for ( j = 0LL; j != 16; ++j )
{
v21 = 0LL;
v22 = 0;
do
v22 += *(char *)(v19 + v21++);
while ( v21 != 16 );
*(_WORD *)(a2 + 292 * v7 + 2 * j + 260) = v22;
v19 += 16LL;
}
*(float *)(a2 + 292 * v7) = 1.0 / v15;
}
a1 += 1024LL;
++v7;
v6 += 292LL;
}
while ( v7 != v3 );
}
}
| quantize_row_q8_K_ref:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDX
TEST BL,BL
JNZ 0x00134f58
SAR RBX,0x8
TEST RBX,RBX
JLE 0x00134f2f
MOV R14,RSI
MOV R15,RDI
LEA R12,[RSI + 0x4]
XOR R13D,R13D
MOVAPS XMM5,xmmword ptr [0x0014c020]
XORPS XMM6,XMM6
MOVSS XMM7,dword ptr [0x00150dc8]
MOVSS XMM8,dword ptr [0x00150dcc]
LAB_00134dfc:
XOR EAX,EAX
XORPS XMM0,XMM0
XORPS XMM2,XMM2
LAB_00134e04:
MOVAPS XMM3,XMM0
MOVSS XMM4,dword ptr [R15 + RAX*0x4]
MOVAPS XMM0,XMM4
ANDPS XMM0,XMM5
MOVAPS XMM1,XMM3
CMPLTSS XMM1,XMM0
ANDPS XMM4,XMM1
ANDNPS XMM1,XMM2
ORPS XMM1,XMM4
MAXSS XMM0,XMM3
INC RAX
MOVAPS XMM2,XMM1
CMP RAX,0x100
JNZ 0x00134e04
UCOMISS XMM0,XMM6
JNZ 0x00134e41
JNP 0x00134ee4
LAB_00134e41:
MOVSS XMM0,dword ptr [0x00150dfc]
DIVSS XMM0,XMM1
XOR EAX,EAX
LAB_00134e4f:
MOVSS XMM1,dword ptr [R15 + RAX*0x4]
MULSS XMM1,XMM0
MOVAPS XMM2,XMM1
ANDPS XMM2,XMM5
UCOMISS XMM7,XMM2
JC 0x00134f39
ADDSS XMM1,XMM8
MOVD ECX,XMM1
AND ECX,0x7fffff
MOV EDX,0x40007f
CMP ECX,EDX
JL 0x00134e85
MOV ECX,0x40007f
LAB_00134e85:
MOV byte ptr [R12 + RAX*0x1],CL
INC RAX
CMP RAX,0x100
JNZ 0x00134e4f
IMUL RAX,R13,0x124
LEA RCX,[R14 + RAX*0x1]
MOV RDX,R12
XOR ESI,ESI
LAB_00134ea4:
XOR EDI,EDI
XOR R8D,R8D
LAB_00134ea9:
MOVSX R9D,byte ptr [RDX + RDI*0x1]
ADD R8D,R9D
INC RDI
CMP RDI,0x10
JNZ 0x00134ea9
MOV word ptr [RCX + RSI*0x2 + 0x104],R8W
INC RSI
ADD RDX,0x10
CMP RSI,0x10
JNZ 0x00134ea4
MOVSS XMM1,dword ptr [0x0014c058]
DIVSS XMM1,XMM0
MOVSS dword ptr [R14 + RAX*0x1],XMM1
JMP 0x00134f15
LAB_00134ee4:
IMUL RDI,R13,0x124
ADD RDI,R14
MOV EDX,0x104
XOR ESI,ESI
CALL 0x001178f0
MOVSS XMM8,dword ptr [0x00150dcc]
MOVSS XMM7,dword ptr [0x00150dc8]
XORPS XMM6,XMM6
MOVAPS XMM5,xmmword ptr [0x0014c020]
LAB_00134f15:
ADD R15,0x400
INC R13
ADD R12,0x124
CMP R13,RBX
JNZ 0x00134dfc
LAB_00134f2f:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00134f39:
LEA RDI,[0x15c6ef]
LEA RSI,[0x15b804]
LEA RCX,[0x15c708]
MOV EDX,0x175
CALL 0x00117b00
LAB_00134f58:
LEA RDI,[0x15bbec]
LEA RSI,[0x15b804]
LEA RCX,[0x15c359]
MOV EDX,0x9b0
CALL 0x00117b00
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void quantize_row_q8_K_ref(long param_1,long param_2,long param_3)
{
long lVar1;
uint uVar2;
long lVar3;
long lVar4;
short sVar5;
long lVar6;
long lVar7;
float fVar8;
float fVar9;
float fVar10;
uint uVar11;
float fVar12;
float fVar13;
if ((char)param_3 != '\0') {
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x9b0,
"void quantize_row_q8_K_ref(const float *restrict, block_q8_K *restrict, int64_t)"
);
}
if (0 < param_3 >> 8) {
lVar6 = param_2 + 4;
lVar7 = 0;
uVar11 = _DAT_0014c020;
fVar12 = DAT_00150dc8;
fVar13 = DAT_00150dcc;
do {
lVar1 = 0;
fVar10 = 0.0;
fVar9 = 0.0;
do {
uVar2 = *(uint *)(param_1 + lVar1 * 4);
fVar8 = (float)(uVar2 & uVar11);
fVar10 = (float)(~-(uint)(fVar9 < fVar8) & (uint)fVar10 | uVar2 & -(uint)(fVar9 < fVar8));
if (fVar8 <= fVar9) {
fVar8 = fVar9;
}
lVar1 = lVar1 + 1;
fVar9 = fVar8;
} while (lVar1 != 0x100);
if ((fVar8 != 0.0) || (NAN(fVar8))) {
fVar10 = DAT_00150dfc / fVar10;
lVar1 = 0;
do {
fVar9 = *(float *)(param_1 + lVar1 * 4) * fVar10;
if (fVar12 < (float)((uint)fVar9 & uVar11)) {
/* WARNING: Subroutine does not return */
__assert_fail("fabsf(fval) <= 4194303.f",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x175,"int nearest_int(float)");
}
uVar2 = (uint)(fVar9 + fVar13) & 0x7fffff;
if (0x40007e < uVar2) {
uVar2 = 0x40007f;
}
*(char *)(lVar6 + lVar1) = (char)uVar2;
lVar1 = lVar1 + 1;
} while (lVar1 != 0x100);
lVar3 = 0;
lVar1 = lVar6;
do {
lVar4 = 0;
sVar5 = 0;
do {
sVar5 = sVar5 + *(char *)(lVar1 + lVar4);
lVar4 = lVar4 + 1;
} while (lVar4 != 0x10);
*(short *)(param_2 + lVar7 * 0x124 + 0x104 + lVar3 * 2) = sVar5;
lVar3 = lVar3 + 1;
lVar1 = lVar1 + 0x10;
} while (lVar3 != 0x10);
*(float *)(param_2 + lVar7 * 0x124) = DAT_0014c058 / fVar10;
}
else {
memset((void *)(lVar7 * 0x124 + param_2),0,0x104);
uVar11 = _DAT_0014c020;
fVar12 = DAT_00150dc8;
fVar13 = DAT_00150dcc;
}
param_1 = param_1 + 0x400;
lVar7 = lVar7 + 1;
lVar6 = lVar6 + 0x124;
} while (lVar7 != param_3 >> 8);
}
return;
}
| |
26,732 | nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, 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>&)::json_error_locator>::get_cbor_array(unsigned long, nlohmann::json_abi_v3_11_3::detail::cbor_tag_handler_t) | monkey531[P]llama/common/./json.hpp | bool get_cbor_array(const std::size_t len,
const cbor_tag_handler_t tag_handler)
{
if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len)))
{
return false;
}
if (len != static_cast<std::size_t>(-1))
{
for (std::size_t i = 0; i < len; ++i)
{
if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler)))
{
return false;
}
}
}
else
{
while (get() != 0xFF)
{
if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(false, tag_handler)))
{
return false;
}
}
}
return sax->end_array();
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, 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>&)::json_error_locator>::get_cbor_array(unsigned long, nlohmann::json_abi_v3_11_3::detail::cbor_tag_handler_t):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rax), %rdi
movq 0x20(%rsp), %rsi
movq (%rdi), %rax
callq *0x50(%rax)
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x18e317
jmp 0x18e321
movb $0x0, 0x37(%rsp)
jmp 0x18e3c7
cmpq $-0x1, 0x20(%rsp)
je 0x18e378
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x18e376
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %edx
movl $0x1, %esi
callq 0x1892f0
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x18e35d
jmp 0x18e364
movb $0x0, 0x37(%rsp)
jmp 0x18e3c7
jmp 0x18e366
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x18e332
jmp 0x18e3b2
jmp 0x18e37a
movq 0x8(%rsp), %rdi
callq 0x18b910
cmpl $0xff, %eax
je 0x18e3b0
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %edx
xorl %esi, %esi
callq 0x1892f0
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x18e3a7
jmp 0x18e3ae
movb $0x0, 0x37(%rsp)
jmp 0x18e3c7
jmp 0x18e37a
jmp 0x18e3b2
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
andb $0x1, %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE14get_cbor_arrayEmNS1_18cbor_tag_handler_tE:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], edx
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
mov rdi, [rax+28h]
mov rsi, [rsp+38h+var_18]
mov rax, [rdi]
call qword ptr [rax+50h]
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_18E317
jmp short loc_18E321
loc_18E317:
mov [rsp+38h+var_1], 0
jmp loc_18E3C7
loc_18E321:
cmp [rsp+38h+var_18], 0FFFFFFFFFFFFFFFFh
jz short loc_18E378
mov [rsp+38h+var_28], 0
loc_18E332:
mov rax, [rsp+38h+var_28]
cmp rax, [rsp+38h+var_18]
jnb short loc_18E376
mov rdi, [rsp+38h+var_30]
mov edx, [rsp+38h+var_1C]
mov esi, 1
call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE19parse_cbor_internalEbNS1_18cbor_tag_handler_tE; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::parse_cbor_internal(bool,nlohmann::json_abi_v3_11_3::detail::cbor_tag_handler_t)
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_18E35D
jmp short loc_18E364
loc_18E35D:
mov [rsp+38h+var_1], 0
jmp short loc_18E3C7
loc_18E364:
jmp short $+2
loc_18E366:
mov rax, [rsp+38h+var_28]
add rax, 1
mov [rsp+38h+var_28], rax
jmp short loc_18E332
loc_18E376:
jmp short loc_18E3B2
loc_18E378:
jmp short $+2
loc_18E37A:
mov rdi, [rsp+38h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE3getEv; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::get(void)
cmp eax, 0FFh
jz short loc_18E3B0
mov rdi, [rsp+38h+var_30]
mov edx, [rsp+38h+var_1C]
xor esi, esi
call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE19parse_cbor_internalEbNS1_18cbor_tag_handler_tE; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::parse_cbor_internal(bool,nlohmann::json_abi_v3_11_3::detail::cbor_tag_handler_t)
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_18E3A7
jmp short loc_18E3AE
loc_18E3A7:
mov [rsp+38h+var_1], 0
jmp short loc_18E3C7
loc_18E3AE:
jmp short loc_18E37A
loc_18E3B0:
jmp short $+2
loc_18E3B2:
mov rax, [rsp+38h+var_30]
mov rdi, [rax+28h]
mov rax, [rdi]
call qword ptr [rax+58h]
and al, 1
mov [rsp+38h+var_1], al
loc_18E3C7:
mov al, [rsp+38h+var_1]
and al, 1
add rsp, 38h
retn
| char nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::get_cbor_array(
long long a1,
unsigned long long a2,
unsigned int a3)
{
long long v3; // rcx
int v4; // r8d
int v5; // r9d
long long v6; // rcx
int v7; // r8d
int v8; // r9d
unsigned long long i; // [rsp+10h] [rbp-28h]
if ( ((*(long long ( **)(_QWORD, unsigned long long))(**(_QWORD **)(a1 + 40) + 80LL))(*(_QWORD *)(a1 + 40), a2) & 1) == 0 )
return 0;
if ( a2 == -1LL )
{
while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::get(a1) != 255 )
{
if ( (nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::parse_cbor_internal(
a1,
0,
a3,
v6,
v7,
v8) & 1) == 0 )
return 0;
}
}
else
{
for ( i = 0LL; i < a2; ++i )
{
if ( (nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,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>&)::json_error_locator>::parse_cbor_internal(
a1,
1,
a3,
v3,
v4,
v5) & 1) == 0 )
return 0;
}
}
return (*(long long ( **)(_QWORD))(**(_QWORD **)(a1 + 40) + 88LL))(*(_QWORD *)(a1 + 40)) & 1;
}
| ~pair:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
ADD RDI,0x20
CALL 0x001510c0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001510c0
ADD RSP,0x18
RET
|
/* std::pair<std::__cxx11::string, std::__cxx11::string >::~pair() */
void __thiscall
std::pair<std::__cxx11::string,std::__cxx11::string>::~pair
(pair<std::__cxx11::string,std::__cxx11::string> *this)
{
std::__cxx11::string::~string((string *)(this + 0x20));
std::__cxx11::string::~string((string *)this);
return;
}
| |
26,733 | evmone::(anonymous namespace)::InstructionTracer::on_instruction_start(unsigned int, intx::uint<256u> const*, int, long, evmone::ExecutionState const&) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/tracing.cpp | void on_instruction_start(uint32_t pc, const intx::uint256* stack_top, int stack_height,
int64_t gas, const ExecutionState& state) noexcept override
{
const auto& ctx = m_contexts.top();
const auto opcode = ctx.code[pc];
m_out << "{";
m_out << R"("pc":)" << std::dec << pc;
m_out << R"(,"op":)" << std::dec << int{opcode};
m_out << R"(,"gas":"0x)" << std::hex << gas << '"';
m_out << R"(,"gasCost":"0x)" << std::hex << instr::gas_costs[state.rev][opcode] << '"';
// Full memory can be dumped as evmc::hex({state.memory.data(), state.memory.size()}),
// but this should not be done by default. Adding --tracing=+memory option would be nice.
m_out << R"(,"memSize":)" << std::dec << state.memory.size();
output_stack(stack_top, stack_height);
if (!state.return_data.empty())
m_out << R"(,"returnData":"0x)" << evmc::hex(state.return_data) << '"';
m_out << R"(,"depth":)" << std::dec << (ctx.depth + 1);
m_out << R"(,"refund":)" << std::dec << state.gas_refund;
m_out << R"(,"opName":")" << get_name(opcode) << '"';
m_out << "}\n";
} | O0 | cpp | evmone::(anonymous namespace)::InstructionTracer::on_instruction_start(unsigned int, intx::uint<256u> const*, int, long, evmone::ExecutionState const&):
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
addq $0x10, %rdi
callq 0x8ce40
movq %rax, -0x98(%rbp)
jmp 0x8b63e
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0xc(%rbp), %edx
movb (%rcx,%rdx), %cl
movb %cl, -0x39(%rbp)
movq 0x60(%rax), %rdi
leaq 0x59139(%rip), %rsi # 0xe47a5
callq 0x23200
jmp 0x8b673
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x59122(%rip), %rsi # 0xe47a7
callq 0x23200
movq %rax, -0xa8(%rbp)
jmp 0x8b693
movq -0xa8(%rbp), %rdi
leaq 0x327f(%rip), %rsi # 0x8e920
callq 0x230c0
movq %rax, -0xb0(%rbp)
jmp 0x8b6af
movq -0xb0(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x23310
jmp 0x8b6c0
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x590db(%rip), %rsi # 0xe47ad
callq 0x23200
movq %rax, -0xb8(%rbp)
jmp 0x8b6e0
movq -0xb8(%rbp), %rdi
leaq 0x3232(%rip), %rsi # 0x8e920
callq 0x230c0
movq %rax, -0xc0(%rbp)
jmp 0x8b6fc
movq -0xc0(%rbp), %rdi
movzbl -0x39(%rbp), %esi
callq 0x23400
jmp 0x8b70e
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x59094(%rip), %rsi # 0xe47b4
callq 0x23200
movq %rax, -0xc8(%rbp)
jmp 0x8b72e
movq -0xc8(%rbp), %rdi
leaq 0x3324(%rip), %rsi # 0x8ea60
callq 0x230c0
movq %rax, -0xd0(%rbp)
jmp 0x8b74a
movq -0xd0(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x23440
movq %rax, -0xd8(%rbp)
jmp 0x8b763
movq -0xd8(%rbp), %rdi
movl $0x22, %esi
callq 0x23270
jmp 0x8b776
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x59037(%rip), %rsi # 0xe47bf
callq 0x23200
movq %rax, -0xe0(%rbp)
jmp 0x8b796
movq -0xe0(%rbp), %rdi
leaq 0x32bc(%rip), %rsi # 0x8ea60
callq 0x230c0
movq %rax, -0xe8(%rbp)
jmp 0x8b7b2
movq -0x30(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, %esi
leaq 0x51ed8(%rip), %rdi # 0xdd69a
callq 0x5fa60
movq %rax, %rdi
movzbl -0x39(%rbp), %eax
movl %eax, %esi
callq 0x5fa90
movq -0xe8(%rbp), %rdi
movswl (%rax), %esi
callq 0x231f0
movq %rax, -0xf0(%rbp)
jmp 0x8b7ed
movq -0xf0(%rbp), %rdi
movl $0x22, %esi
callq 0x23270
jmp 0x8b800
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x58fbc(%rip), %rsi # 0xe47ce
callq 0x23200
movq %rax, -0xf8(%rbp)
jmp 0x8b820
movq -0xf8(%rbp), %rdi
leaq 0x30f2(%rip), %rsi # 0x8e920
callq 0x230c0
movq %rax, -0x100(%rbp)
jmp 0x8b83c
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
callq 0x67090
movq -0x100(%rbp), %rdi
movq %rax, %rsi
callq 0x23090
jmp 0x8b85a
movq -0xa0(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x8ce60
jmp 0x8b86f
movq -0x30(%rbp), %rdi
addq $0x48, %rdi
callq 0x8ea90
testb $0x1, %al
jne 0x8b8fd
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x58f48(%rip), %rsi # 0xe47da
callq 0x23200
movq %rax, -0x108(%rbp)
jmp 0x8b8a0
movq -0x30(%rbp), %rdi
addq $0x48, %rdi
callq 0x78740
movq %rax, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x8eac0
jmp 0x8b8c8
movq -0x108(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x231e0
movq %rax, -0x110(%rbp)
jmp 0x8b8e1
movq -0x110(%rbp), %rdi
movl $0x22, %esi
callq 0x23270
jmp 0x8b8f4
leaq -0x60(%rbp), %rdi
callq 0x8d5c0
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x58edd(%rip), %rsi # 0xe47ec
callq 0x23200
movq %rax, -0x118(%rbp)
jmp 0x8b91d
movq -0x118(%rbp), %rdi
leaq 0x2ff5(%rip), %rsi # 0x8e920
callq 0x230c0
movq %rax, -0x120(%rbp)
jmp 0x8b939
movq -0x120(%rbp), %rdi
movq -0x38(%rbp), %rax
movl (%rax), %esi
incl %esi
callq 0x23400
jmp 0x8b94f
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x58e95(%rip), %rsi # 0xe47f6
callq 0x23200
movq %rax, -0x128(%rbp)
jmp 0x8b96f
movq -0x128(%rbp), %rdi
leaq 0x2fa3(%rip), %rsi # 0x8e920
callq 0x230c0
movq %rax, -0x130(%rbp)
jmp 0x8b98b
movq -0x130(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0x23440
jmp 0x8b9a0
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x58e4f(%rip), %rsi # 0xe4801
callq 0x23200
movq %rax, -0x138(%rbp)
jmp 0x8b9c0
movzbl -0x39(%rbp), %esi
leaq -0x90(%rbp), %rdi
callq 0x8ada0
jmp 0x8b9d2
movq -0x138(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x231e0
movq %rax, -0x140(%rbp)
jmp 0x8b9ee
movq -0x140(%rbp), %rdi
movl $0x22, %esi
callq 0x23270
jmp 0x8ba01
leaq -0x90(%rbp), %rdi
callq 0x8d5c0
movq -0xa0(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x58dee(%rip), %rsi # 0xe480d
callq 0x23200
jmp 0x8ba26
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
movq %rax, %rdi
callq 0x36420
nopw (%rax,%rax)
| _ZN6evmone12_GLOBAL__N_117InstructionTracer20on_instruction_startEjPKN4intx4uintILj256EEEilRKNS_14ExecutionStateE:
push rbp
mov rbp, rsp
sub rsp, 140h
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_30], r9
mov rdi, [rbp+var_8]
mov [rbp+var_A0], rdi
add rdi, 10h
call _ZNSt5stackIN6evmone12_GLOBAL__N_117InstructionTracer7ContextESt5dequeIS3_SaIS3_EEE3topEv; std::stack<evmone::`anonymous namespace'::InstructionTracer::Context>::top(void)
mov [rbp+var_98], rax
jmp short $+2
loc_8B63E:
mov rax, [rbp+var_A0]
mov rcx, [rbp+var_98]
mov [rbp+var_38], rcx
mov rcx, [rbp+var_38]
mov rcx, [rcx+8]
mov edx, [rbp+var_C]
mov cl, [rcx+rdx]
mov [rbp+var_39], cl
mov rdi, [rax+60h]
lea rsi, asc_E47A5; "{"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_8B673:
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, aPc; "\"pc\":"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_A8], rax
jmp short $+2
loc_8B693:
mov rdi, [rbp+var_A8]
lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov [rbp+var_B0], rax
jmp short $+2
loc_8B6AF:
mov rdi, [rbp+var_B0]
mov esi, [rbp+var_C]
call __ZNSolsEj; std::ostream::operator<<(uint)
jmp short $+2
loc_8B6C0:
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, aOp; ",\"op\":"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_B8], rax
jmp short $+2
loc_8B6E0:
mov rdi, [rbp+var_B8]
lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov [rbp+var_C0], rax
jmp short $+2
loc_8B6FC:
mov rdi, [rbp+var_C0]
movzx esi, [rbp+var_39]
call __ZNSolsEi; std::ostream::operator<<(int)
jmp short $+2
loc_8B70E:
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, aGas0x; ",\"gas\":\"0x"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_C8], rax
jmp short $+2
loc_8B72E:
mov rdi, [rbp+var_C8]
lea rsi, _ZSt3hexRSt8ios_base; std::hex(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov [rbp+var_D0], rax
jmp short $+2
loc_8B74A:
mov rdi, [rbp+var_D0]
mov rsi, [rbp+var_28]
call __ZNSolsEl; std::ostream::operator<<(long)
mov [rbp+var_D8], rax
jmp short $+2
loc_8B763:
mov rdi, [rbp+var_D8]
mov esi, 22h ; '"'
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
jmp short $+2
loc_8B776:
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, aGascost0x; ",\"gasCost\":\"0x"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_E0], rax
jmp short $+2
loc_8B796:
mov rdi, [rbp+var_E0]
lea rsi, _ZSt3hexRSt8ios_base; std::hex(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov [rbp+var_E8], rax
jmp short $+2
loc_8B7B2:
mov rax, [rbp+var_30]
mov eax, [rax+40h]
mov esi, eax
lea rdi, _ZN6evmone5instr9gas_costsE; evmone::instr::gas_costs
call _ZNKSt5arrayIS_IsLm256EELm16EEixEm; std::array<std::array<short,256ul>,16ul>::operator[](ulong)
mov rdi, rax
movzx eax, [rbp+var_39]
mov esi, eax
call _ZNKSt5arrayIsLm256EEixEm; std::array<short,256ul>::operator[](ulong)
mov rdi, [rbp+var_E8]
movsx esi, word ptr [rax]
call __ZNSolsEs; std::ostream::operator<<(short)
mov [rbp+var_F0], rax
jmp short $+2
loc_8B7ED:
mov rdi, [rbp+var_F0]
mov esi, 22h ; '"'
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
jmp short $+2
loc_8B800:
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, aMemsize; ",\"memSize\":"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_F8], rax
jmp short $+2
loc_8B820:
mov rdi, [rbp+var_F8]
lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov [rbp+var_100], rax
jmp short $+2
loc_8B83C:
mov rdi, [rbp+var_30]
add rdi, 8; this
call _ZNK6evmone6Memory4sizeEv; evmone::Memory::size(void)
mov rdi, [rbp+var_100]
mov rsi, rax
call __ZNSolsEm; std::ostream::operator<<(ulong)
jmp short $+2
loc_8B85A:
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
call _ZN6evmone12_GLOBAL__N_117InstructionTracer12output_stackEPKN4intx4uintILj256EEEi; evmone::`anonymous namespace'::InstructionTracer::output_stack(intx::uint<256u> const*,int)
jmp short $+2
loc_8B86F:
mov rdi, [rbp+var_30]
add rdi, 48h ; 'H'
call _ZNKSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE5emptyEv; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::empty(void)
test al, 1
jnz short loc_8B8FD
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, aReturndata0x; ",\"returnData\":\"0x"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_108], rax
jmp short $+2
loc_8B8A0:
mov rdi, [rbp+var_30]
add rdi, 48h ; 'H'
call _ZNKSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEcvSt17basic_string_viewIhS3_EEv; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::operator std::basic_string_view<uchar,evmc::byte_traits<uchar>>(void)
mov [rbp+var_70], rax
mov [rbp+var_68], rdx
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_68]
lea rdi, [rbp+var_60]
call _ZN4evmc3hexB5cxx11ESt17basic_string_viewIhNS_11byte_traitsIhEEE; evmc::hex(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
jmp short $+2
loc_8B8C8:
mov rdi, [rbp+var_108]
lea rsi, [rbp+var_60]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_110], rax
jmp short $+2
loc_8B8E1:
mov rdi, [rbp+var_110]
mov esi, 22h ; '"'
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
jmp short $+2
loc_8B8F4:
lea rdi, [rbp+var_60]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8B8FD:
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, aDepth; ",\"depth\":"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_118], rax
jmp short $+2
loc_8B91D:
mov rdi, [rbp+var_118]
lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov [rbp+var_120], rax
jmp short $+2
loc_8B939:
mov rdi, [rbp+var_120]
mov rax, [rbp+var_38]
mov esi, [rax]
inc esi
call __ZNSolsEi; std::ostream::operator<<(int)
jmp short $+2
loc_8B94F:
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, aRefund; ",\"refund\":"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_128], rax
jmp short $+2
loc_8B96F:
mov rdi, [rbp+var_128]
lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov [rbp+var_130], rax
jmp short $+2
loc_8B98B:
mov rdi, [rbp+var_130]
mov rax, [rbp+var_30]
mov rsi, [rax]
call __ZNSolsEl; std::ostream::operator<<(long)
jmp short $+2
loc_8B9A0:
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, aOpname; ",\"opName\":\""
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_138], rax
jmp short $+2
loc_8B9C0:
movzx esi, [rbp+var_39]
lea rdi, [rbp+var_90]
call _ZN6evmone12_GLOBAL__N_18get_nameB5cxx11Eh; evmone::`anonymous namespace'::get_name(uchar)
jmp short $+2
loc_8B9D2:
mov rdi, [rbp+var_138]
lea rsi, [rbp+var_90]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_140], rax
jmp short $+2
loc_8B9EE:
mov rdi, [rbp+var_140]
mov esi, 22h ; '"'
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
jmp short $+2
loc_8BA01:
lea rdi, [rbp+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rbp+var_A0]
mov rdi, [rax+60h]
lea rsi, asc_E480D; "}\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_8BA26:
add rsp, 140h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
| long long evmone::`anonymous namespace'::InstructionTracer::on_instruction_start(
long long a1,
unsigned int a2,
long long a3,
unsigned int a4,
long long a5,
long long a6)
{
long long v6; // rax
__int16 *v7; // rax
long long v8; // rax
long long v9; // rdx
long long v11; // [rsp+0h] [rbp-140h]
long long v12; // [rsp+8h] [rbp-138h]
long long v13; // [rsp+10h] [rbp-130h]
long long v14; // [rsp+18h] [rbp-128h]
long long v15; // [rsp+20h] [rbp-120h]
long long v16; // [rsp+28h] [rbp-118h]
long long v17; // [rsp+30h] [rbp-110h]
long long v18; // [rsp+38h] [rbp-108h]
long long v19; // [rsp+40h] [rbp-100h]
long long v20; // [rsp+48h] [rbp-F8h]
long long v21; // [rsp+50h] [rbp-F0h]
long long v22; // [rsp+58h] [rbp-E8h]
long long v23; // [rsp+60h] [rbp-E0h]
long long v24; // [rsp+68h] [rbp-D8h]
long long v25; // [rsp+70h] [rbp-D0h]
long long v26; // [rsp+78h] [rbp-C8h]
long long v27; // [rsp+80h] [rbp-C0h]
long long v28; // [rsp+88h] [rbp-B8h]
long long v29; // [rsp+90h] [rbp-B0h]
long long v30; // [rsp+98h] [rbp-A8h]
_BYTE v31[32]; // [rsp+B0h] [rbp-90h] BYREF
long long v32; // [rsp+D0h] [rbp-70h]
long long v33; // [rsp+D8h] [rbp-68h]
_BYTE v34[39]; // [rsp+E0h] [rbp-60h] BYREF
unsigned __int8 v35; // [rsp+107h] [rbp-39h]
long long v36; // [rsp+108h] [rbp-38h]
long long v37; // [rsp+110h] [rbp-30h]
long long v38; // [rsp+118h] [rbp-28h]
unsigned int v39; // [rsp+124h] [rbp-1Ch]
long long v40; // [rsp+128h] [rbp-18h]
unsigned int v41; // [rsp+134h] [rbp-Ch]
long long v42; // [rsp+138h] [rbp-8h]
v42 = a1;
v41 = a2;
v40 = a3;
v39 = a4;
v38 = a5;
v37 = a6;
v36 = std::stack<evmone::`anonymous namespace'::InstructionTracer::Context>::top(a1 + 16);
v35 = *(_BYTE *)(*(_QWORD *)(v36 + 8) + a2);
std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), "{");
v30 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), "\"pc\":");
v29 = std::ostream::operator<<(v30, std::dec);
std::ostream::operator<<(v29, a2);
v28 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"op\":");
v27 = std::ostream::operator<<(v28, std::dec);
std::ostream::operator<<(v27, v35);
v26 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"gas\":\"0x");
v25 = std::ostream::operator<<(v26, std::hex);
v24 = std::ostream::operator<<(v25, v38);
std::operator<<<std::char_traits<char>>(v24, 34LL);
v23 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"gasCost\":\"0x");
v22 = std::ostream::operator<<(v23, std::hex);
v6 = std::array<std::array<short,256ul>,16ul>::operator[](
(long long)&evmone::instr::gas_costs,
*(unsigned int *)(v37 + 64));
v7 = (__int16 *)std::array<short,256ul>::operator[](v6, v35);
v21 = std::ostream::operator<<(v22, (unsigned int)*v7);
std::operator<<<std::char_traits<char>>(v21, 34LL);
v20 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"memSize\":");
v19 = std::ostream::operator<<(v20, std::dec);
v8 = evmone::Memory::size((evmone::Memory *)(v37 + 8));
std::ostream::operator<<(v19, v8);
evmone::`anonymous namespace'::InstructionTracer::output_stack(a1, v40, v39);
if ( (std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::empty(v37 + 72) & 1) == 0 )
{
v18 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"returnData\":\"0x");
v32 = std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::operator std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>(v37 + 72);
v33 = v9;
evmc::hex[abi:cxx11](v34, v32, v9);
v17 = std::operator<<<char>(v18, v34);
std::operator<<<std::char_traits<char>>(v17, 34LL);
std::string::~string(v34);
}
v16 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"depth\":");
v15 = std::ostream::operator<<(v16, std::dec);
std::ostream::operator<<(v15, (unsigned int)(*(_DWORD *)v36 + 1));
v14 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"refund\":");
v13 = std::ostream::operator<<(v14, std::dec);
std::ostream::operator<<(v13, *(_QWORD *)v37);
v12 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"opName\":\"");
evmone::`anonymous namespace'::get_name[abi:cxx11]((long long)v31, v35);
v11 = std::operator<<<char>(v12, v31);
std::operator<<<std::char_traits<char>>(v11, 34LL);
std::string::~string(v31);
return std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), "}\n");
}
| on_instruction_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
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 qword ptr [RBP + -0x30],R9
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0xa0],RDI
ADD RDI,0x10
LAB_0018b630:
CALL 0x0018ce40
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0018b63e
LAB_0018b63e:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RCX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x38],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0x8]
MOV EDX,dword ptr [RBP + -0xc]
MOV CL,byte ptr [RCX + RDX*0x1]
MOV byte ptr [RBP + -0x39],CL
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e47a5]
CALL 0x00123200
JMP 0x0018b673
LAB_0018b673:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e47a7]
CALL 0x00123200
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x0018b693
LAB_0018b693:
MOV RDI,qword ptr [RBP + -0xa8]
LEA RSI,[0x18e920]
CALL 0x001230c0
MOV qword ptr [RBP + -0xb0],RAX
JMP 0x0018b6af
LAB_0018b6af:
MOV RDI,qword ptr [RBP + -0xb0]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x00123310
JMP 0x0018b6c0
LAB_0018b6c0:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e47ad]
CALL 0x00123200
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x0018b6e0
LAB_0018b6e0:
MOV RDI,qword ptr [RBP + -0xb8]
LEA RSI,[0x18e920]
CALL 0x001230c0
MOV qword ptr [RBP + -0xc0],RAX
JMP 0x0018b6fc
LAB_0018b6fc:
MOV RDI,qword ptr [RBP + -0xc0]
MOVZX ESI,byte ptr [RBP + -0x39]
CALL 0x00123400
JMP 0x0018b70e
LAB_0018b70e:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e47b4]
CALL 0x00123200
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x0018b72e
LAB_0018b72e:
MOV RDI,qword ptr [RBP + -0xc8]
LEA RSI,[0x18ea60]
CALL 0x001230c0
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x0018b74a
LAB_0018b74a:
MOV RDI,qword ptr [RBP + -0xd0]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00123440
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x0018b763
LAB_0018b763:
MOV RDI,qword ptr [RBP + -0xd8]
MOV ESI,0x22
CALL 0x00123270
JMP 0x0018b776
LAB_0018b776:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e47bf]
CALL 0x00123200
MOV qword ptr [RBP + -0xe0],RAX
JMP 0x0018b796
LAB_0018b796:
MOV RDI,qword ptr [RBP + -0xe0]
LEA RSI,[0x18ea60]
CALL 0x001230c0
MOV qword ptr [RBP + -0xe8],RAX
JMP 0x0018b7b2
LAB_0018b7b2:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x40]
MOV ESI,EAX
LEA RDI,[0x1dd69a]
CALL 0x0015fa60
MOV RDI,RAX
MOVZX EAX,byte ptr [RBP + -0x39]
MOV ESI,EAX
CALL 0x0015fa90
MOV RDI,qword ptr [RBP + -0xe8]
MOVSX ESI,word ptr [RAX]
CALL 0x001231f0
MOV qword ptr [RBP + -0xf0],RAX
JMP 0x0018b7ed
LAB_0018b7ed:
MOV RDI,qword ptr [RBP + -0xf0]
MOV ESI,0x22
CALL 0x00123270
JMP 0x0018b800
LAB_0018b800:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e47ce]
CALL 0x00123200
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x0018b820
LAB_0018b820:
MOV RDI,qword ptr [RBP + -0xf8]
LEA RSI,[0x18e920]
CALL 0x001230c0
MOV qword ptr [RBP + -0x100],RAX
JMP 0x0018b83c
LAB_0018b83c:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x8
CALL 0x00167090
MOV RDI,qword ptr [RBP + -0x100]
MOV RSI,RAX
CALL 0x00123090
JMP 0x0018b85a
LAB_0018b85a:
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x0018ce60
JMP 0x0018b86f
LAB_0018b86f:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x48
CALL 0x0018ea90
TEST AL,0x1
JNZ 0x0018b8fd
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e47da]
CALL 0x00123200
MOV qword ptr [RBP + -0x108],RAX
JMP 0x0018b8a0
LAB_0018b8a0:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x48
CALL 0x00178740
MOV qword ptr [RBP + -0x70],RAX
MOV qword ptr [RBP + -0x68],RDX
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x68]
LEA RDI,[RBP + -0x60]
CALL 0x0018eac0
JMP 0x0018b8c8
LAB_0018b8c8:
MOV RDI,qword ptr [RBP + -0x108]
LEA RSI,[RBP + -0x60]
CALL 0x001231e0
MOV qword ptr [RBP + -0x110],RAX
JMP 0x0018b8e1
LAB_0018b8e1:
MOV RDI,qword ptr [RBP + -0x110]
MOV ESI,0x22
CALL 0x00123270
JMP 0x0018b8f4
LAB_0018b8f4:
LEA RDI,[RBP + -0x60]
CALL 0x0018d5c0
LAB_0018b8fd:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e47ec]
CALL 0x00123200
MOV qword ptr [RBP + -0x118],RAX
JMP 0x0018b91d
LAB_0018b91d:
MOV RDI,qword ptr [RBP + -0x118]
LEA RSI,[0x18e920]
CALL 0x001230c0
MOV qword ptr [RBP + -0x120],RAX
JMP 0x0018b939
LAB_0018b939:
MOV RDI,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RAX]
INC ESI
CALL 0x00123400
JMP 0x0018b94f
LAB_0018b94f:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e47f6]
CALL 0x00123200
MOV qword ptr [RBP + -0x128],RAX
JMP 0x0018b96f
LAB_0018b96f:
MOV RDI,qword ptr [RBP + -0x128]
LEA RSI,[0x18e920]
CALL 0x001230c0
MOV qword ptr [RBP + -0x130],RAX
JMP 0x0018b98b
LAB_0018b98b:
MOV RDI,qword ptr [RBP + -0x130]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
CALL 0x00123440
JMP 0x0018b9a0
LAB_0018b9a0:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e4801]
CALL 0x00123200
MOV qword ptr [RBP + -0x138],RAX
JMP 0x0018b9c0
LAB_0018b9c0:
MOVZX ESI,byte ptr [RBP + -0x39]
LEA RDI,[RBP + -0x90]
CALL 0x0018ada0
JMP 0x0018b9d2
LAB_0018b9d2:
MOV RDI,qword ptr [RBP + -0x138]
LEA RSI,[RBP + -0x90]
CALL 0x001231e0
MOV qword ptr [RBP + -0x140],RAX
JMP 0x0018b9ee
LAB_0018b9ee:
MOV RDI,qword ptr [RBP + -0x140]
MOV ESI,0x22
CALL 0x00123270
JMP 0x0018ba01
LAB_0018ba01:
LEA RDI,[RBP + -0x90]
CALL 0x0018d5c0
MOV RAX,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RAX + 0x60]
LEA RSI,[0x1e480d]
CALL 0x00123200
JMP 0x0018ba26
LAB_0018ba26:
ADD RSP,0x140
POP RBP
RET
|
/* evmone::(anonymous namespace)::InstructionTracer::on_instruction_start(unsigned int,
intx::uint<256u> const*, int, long, evmone::ExecutionState const&) */
void __thiscall
evmone::(anonymous_namespace)::InstructionTracer::on_instruction_start
(InstructionTracer *this,uint param_1,uint *param_2,int param_3,long param_4,
ExecutionState *param_5)
{
ostream *poVar1;
array<short,256ul> *this_00;
short *psVar2;
ulong uVar3;
_anonymous_namespace_ local_98 [32];
int1 local_78 [16];
string local_68 [39];
byte local_41;
int *local_40;
ExecutionState *local_38;
long local_30;
int local_24;
uint *local_20;
uint local_14;
InstructionTracer *local_10;
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_14 = param_1;
local_10 = this;
/* try { // try from 0018b630 to 0018ba23 has its CatchHandler @ 0018ba2f */
local_40 = (int *)std::
stack<evmone::(anonymous_namespace)::InstructionTracer::Context,std::deque<evmone::(anonymous_namespace)::InstructionTracer::Context,std::allocator<evmone::(anonymous_namespace)::InstructionTracer::Context>>>
::top((stack<evmone::(anonymous_namespace)::InstructionTracer::Context,std::deque<evmone::(anonymous_namespace)::InstructionTracer::Context,std::allocator<evmone::(anonymous_namespace)::InstructionTracer::Context>>>
*)(this + 0x10));
local_41 = *(byte *)(*(long *)(local_40 + 2) + (ulong)local_14);
std::operator<<(*(ostream **)(this + 0x60),"{");
poVar1 = std::operator<<(*(ostream **)(this + 0x60),"\"pc\":");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec);
std::ostream::operator<<(poVar1,local_14);
poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"op\":");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec);
std::ostream::operator<<(poVar1,(uint)local_41);
poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"gas\":\"0x");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::hex);
poVar1 = (ostream *)std::ostream::operator<<(poVar1,local_30);
std::operator<<(poVar1,'\"');
poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"gasCost\":\"0x");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::hex);
this_00 = (array<short,256ul> *)
std::array<std::array<short,256ul>,16ul>::operator[]
((array<std::array<short,256ul>,16ul> *)instr::gas_costs,
(ulong)*(uint *)(local_38 + 0x40));
psVar2 = (short *)std::array<short,256ul>::operator[](this_00,(ulong)local_41);
poVar1 = (ostream *)std::ostream::operator<<(poVar1,*psVar2);
std::operator<<(poVar1,'\"');
poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"memSize\":");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec);
uVar3 = Memory::size((Memory *)(local_38 + 8));
std::ostream::operator<<(poVar1,uVar3);
output_stack(this,local_20,local_24);
uVar3 = std::__cxx11::
basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
::empty((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
*)(local_38 + 0x48));
if ((uVar3 & 1) == 0) {
poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"returnData\":\"0x");
local_78 = std::__cxx11::basic_string::operator_cast_to_basic_string_view
((basic_string *)(local_38 + 0x48));
evmc::hex_abi_cxx11_(local_68,local_78._0_8_,local_78._8_8_);
poVar1 = std::operator<<(poVar1,local_68);
std::operator<<(poVar1,'\"');
std::__cxx11::string::~string(local_68);
}
poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"depth\":");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec);
std::ostream::operator<<(poVar1,*local_40 + 1);
poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"refund\":");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec);
std::ostream::operator<<(poVar1,*(long *)local_38);
poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"opName\":\"");
get_name_abi_cxx11_(local_98,local_41);
poVar1 = std::operator<<(poVar1,(string *)local_98);
std::operator<<(poVar1,'\"');
std::__cxx11::string::~string((string *)local_98);
std::operator<<(*(ostream **)(this + 0x60),"}\n");
return;
}
| |
26,734 | translog_mark_file_finished | eloqsql/storage/maria/ma_loghandler.c | static void translog_mark_file_finished(uint32 file)
{
int i;
struct st_file_counter *UNINIT_VAR(fc_ptr);
DBUG_ENTER("translog_mark_file_finished");
DBUG_PRINT("enter", ("file: %lu", (ulong) file));
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
DBUG_ASSERT(log_descriptor.unfinished_files.elements > 0);
for (i= 0;
i < (int) log_descriptor.unfinished_files.elements;
i++)
{
fc_ptr= dynamic_element(&log_descriptor.unfinished_files,
i, struct st_file_counter *);
if (fc_ptr->file == file)
{
break;
}
}
DBUG_ASSERT(i < (int) log_descriptor.unfinished_files.elements);
if (! --fc_ptr->counter)
delete_dynamic_element(&log_descriptor.unfinished_files, i);
mysql_mutex_unlock(&log_descriptor.unfinished_files_lock);
DBUG_VOID_RETURN;
} | O0 | c | translog_mark_file_finished:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x93f35
leaq 0x3f0554(%rip), %rdi # 0x484490
addq $0x800e08, %rdi # imm = 0x800E08
leaq 0xc706b(%rip), %rsi # 0x15afb5
movl $0x58d, %edx # imm = 0x58D
callq 0x87970
jmp 0x93f56
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0xbf1382(%rip), %eax # 0xc852e8
jge 0x93f98
movq 0xbf1371(%rip), %rax # 0xc852e0
movslq -0x8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x93f8b
jmp 0x93f98
jmp 0x93f8d
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x93f5d
jmp 0x93f9a
jmp 0x93f9c
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rcx)
cmpl $0x0, %eax
jne 0x93fc4
movl -0x8(%rbp), %esi
leaq 0x3f04d8(%rip), %rdi # 0x484490
addq $0x800e50, %rdi # imm = 0x800E50
callq 0xdddd0
leaq 0x3f04c5(%rip), %rdi # 0x484490
addq $0x800e08, %rdi # imm = 0x800E08
callq 0x879e0
jmp 0x93fd9
addq $0x10, %rsp
popq %rbp
retq
nop
| translog_mark_file_finished:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov rax, [rbp+var_10]
mov [rbp+var_10], rax
jmp short $+2
loc_93F35:
lea rdi, log_descriptor
add rdi, 800E08h
lea rsi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 58Dh
call inline_mysql_mutex_lock_11
jmp short $+2
loc_93F56:
mov [rbp+var_8], 0
loc_93F5D:
mov eax, [rbp+var_8]
cmp eax, cs:dword_C852E8
jge short loc_93F98
mov rax, cs:qword_C852E0
movsxd rcx, [rbp+var_8]
shl rcx, 3
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov eax, [rax]
cmp eax, [rbp+var_4]
jnz short loc_93F8B
jmp short loc_93F98
loc_93F8B:
jmp short $+2
loc_93F8D:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_8], eax
jmp short loc_93F5D
loc_93F98:
jmp short $+2
loc_93F9A:
jmp short $+2
loc_93F9C:
mov rcx, [rbp+var_10]
mov eax, [rcx+4]
add eax, 0FFFFFFFFh
mov [rcx+4], eax
cmp eax, 0
jnz short loc_93FC4
mov esi, [rbp+var_8]
lea rdi, log_descriptor
add rdi, 800E50h
call delete_dynamic_element
loc_93FC4:
lea rdi, log_descriptor
add rdi, 800E08h
call inline_mysql_mutex_unlock_12
jmp short $+2
loc_93FD9:
add rsp, 10h
pop rbp
retn
| long long translog_mark_file_finished(int a1)
{
int v1; // eax
_DWORD *v3; // [rsp+0h] [rbp-10h]
int i; // [rsp+8h] [rbp-8h]
inline_mysql_mutex_lock_11(
(long long)&log_descriptor[1049025],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x58Du);
for ( i = 0; i < dword_C852E8; ++i )
{
v3 = (_DWORD *)(8LL * i + qword_C852E0);
if ( *v3 == a1 )
break;
}
v1 = v3[1] - 1;
v3[1] = v1;
if ( !v1 )
delete_dynamic_element(&log_descriptor[1049034], (unsigned int)i);
return inline_mysql_mutex_unlock_12((long long)&log_descriptor[1049025]);
}
| translog_mark_file_finished:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00193f35
LAB_00193f35:
LEA RDI,[0x584490]
ADD RDI,0x800e08
LEA RSI,[0x25afb5]
MOV EDX,0x58d
CALL 0x00187970
JMP 0x00193f56
LAB_00193f56:
MOV dword ptr [RBP + -0x8],0x0
LAB_00193f5d:
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [0x00d852e8]
JGE 0x00193f98
MOV RAX,qword ptr [0x00d852e0]
MOVSXD RCX,dword ptr [RBP + -0x8]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x4]
JNZ 0x00193f8b
JMP 0x00193f98
LAB_00193f8b:
JMP 0x00193f8d
LAB_00193f8d:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x00193f5d
LAB_00193f98:
JMP 0x00193f9a
LAB_00193f9a:
JMP 0x00193f9c
LAB_00193f9c:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x4]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x4],EAX
CMP EAX,0x0
JNZ 0x00193fc4
MOV ESI,dword ptr [RBP + -0x8]
LEA RDI,[0x584490]
ADD RDI,0x800e50
CALL 0x001dddd0
LAB_00193fc4:
LEA RDI,[0x584490]
ADD RDI,0x800e08
CALL 0x001879e0
JMP 0x00193fd9
LAB_00193fd9:
ADD RSP,0x10
POP RBP
RET
|
void translog_mark_file_finished(int param_1)
{
int iVar1;
int *local_18;
int local_10;
inline_mysql_mutex_lock
(&DAT_00d85298,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x58d);
local_10 = 0;
while ((local_10 < DAT_00d852e8 &&
(local_18 = (int *)(DAT_00d852e0 + (long)local_10 * 8), *local_18 != param_1))) {
local_10 = local_10 + 1;
}
iVar1 = local_18[1];
local_18[1] = iVar1 + -1;
if (iVar1 + -1 == 0) {
delete_dynamic_element(&DAT_00d852e0,local_10);
}
inline_mysql_mutex_unlock(&DAT_00d85298);
return;
}
| |
26,735 | google::protobuf::compiler::CommandLineInterface::MemoryOutputStream::MemoryOutputStream(google::protobuf::compiler::CommandLineInterface::GeneratorContextImpl*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/command_line_interface.cc | CommandLineInterface::MemoryOutputStream::MemoryOutputStream(
GeneratorContextImpl* directory, const std::string& filename,
bool append_mode)
: directory_(directory),
filename_(filename),
append_mode_(append_mode),
inner_(new io::StringOutputStream(&data_)) {} | O0 | cpp | google::protobuf::compiler::CommandLineInterface::MemoryOutputStream::MemoryOutputStream(google::protobuf::compiler::CommandLineInterface::GeneratorContextImpl*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool):
subq $0x68, %rsp
movb %cl, %al
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
andb $0x1, %al
movb %al, 0x4f(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x36cb0
movq 0x28(%rsp), %rdi
leaq 0x4bdeda(%rip), %rax # 0x4e8ca0
movq %rax, (%rdi)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rdi)
addq $0x10, %rdi
movq %rdi, 0x30(%rsp)
movq 0x50(%rsp), %rsi
callq 0x21160
jmp 0x2ade7
movq 0x28(%rsp), %rdi
addq $0x30, %rdi
movq %rdi, 0x8(%rsp)
callq 0x21390
movq 0x28(%rsp), %rdi
addq $0x50, %rdi
movq %rdi, 0x10(%rsp)
callq 0x21390
movq 0x28(%rsp), %rax
movb 0x4f(%rsp), %cl
andb $0x1, %cl
movb %cl, 0x70(%rax)
addq $0x78, %rax
movq %rax, 0x18(%rsp)
movl $0x10, %edi
callq 0x211c0
movq %rax, 0x20(%rsp)
jmp 0x2ae36
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x50, %rsi
callq 0x1f08f0
jmp 0x2ae4b
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x36cd0
movq 0x28(%rsp), %rdi
subq $-0x80, %rdi
callq 0x36d00
jmp 0x2ae6a
addq $0x68, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0x2aedf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0x2aec1
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x21620
jmp 0x2aec1
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x36d20
movq 0x10(%rsp), %rdi
callq 0x21cc8
movq 0x8(%rsp), %rdi
callq 0x21cc8
movq 0x30(%rsp), %rdi
callq 0x21cc8
movq 0x28(%rsp), %rdi
callq 0x36d80
movq 0x40(%rsp), %rdi
callq 0x21700
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf8compiler20CommandLineInterface18MemoryOutputStreamC2EPNS2_20GeneratorContextImplERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb:
sub rsp, 68h
mov al, cl
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_18], rdx
and al, 1
mov [rsp+68h+var_19], al
mov rdi, [rsp+68h+var_8]; this
mov [rsp+68h+var_40], rdi
call _ZN6google8protobuf2io20ZeroCopyOutputStreamC2Ev; google::protobuf::io::ZeroCopyOutputStream::ZeroCopyOutputStream(void)
mov rdi, [rsp+68h+var_40]
lea rax, off_4E8CA0
mov [rdi], rax
mov rax, [rsp+68h+var_10]
mov [rdi+8], rax
add rdi, 10h
mov [rsp+68h+var_38], rdi
mov rsi, [rsp+68h+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_2ADE7:
mov rdi, [rsp+68h+var_40]
add rdi, 30h ; '0'
mov [rsp+68h+var_60], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+68h+var_40]
add rdi, 50h ; 'P'
mov [rsp+68h+var_58], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rax, [rsp+68h+var_40]
mov cl, [rsp+68h+var_19]
and cl, 1
mov [rax+70h], cl
add rax, 78h ; 'x'
mov [rsp+68h+var_50], rax
mov edi, 10h; unsigned __int64
call __Znwm; operator new(ulong)
mov [rsp+68h+var_48], rax
jmp short $+2
loc_2AE36:
mov rdi, [rsp+68h+var_48]
mov rsi, [rsp+68h+var_40]
add rsi, 50h ; 'P'
call _ZN6google8protobuf2io18StringOutputStreamC2EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::io::StringOutputStream::StringOutputStream(std::string *)
jmp short $+2
loc_2AE4B:
mov rsi, [rsp+68h+var_48]
mov rdi, [rsp+68h+var_50]
call _ZNSt10unique_ptrIN6google8protobuf2io18StringOutputStreamESt14default_deleteIS3_EEC2IS5_vEEPS3_; std::unique_ptr<google::protobuf::io::StringOutputStream>::unique_ptr<std::default_delete<google::protobuf::io::StringOutputStream>,void>(google::protobuf::io::StringOutputStream*)
mov rdi, [rsp+68h+var_40]
sub rdi, 0FFFFFFFFFFFFFF80h; this
call _ZN6google8protobuf17GeneratedCodeInfoC2Ev; google::protobuf::GeneratedCodeInfo::GeneratedCodeInfo(void)
jmp short $+2
loc_2AE6A:
add rsp, 68h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
jmp short loc_2AEDF
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
jmp short loc_2AEC1
mov rdi, [rsp+arg_18]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
call __ZdlPv; operator delete(void *)
jmp short loc_2AEC1
mov rdi, [rsp+arg_10]
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
call _ZNSt10unique_ptrIN6google8protobuf2io18StringOutputStreamESt14default_deleteIS3_EED2Ev; std::unique_ptr<google::protobuf::io::StringOutputStream>::~unique_ptr()
loc_2AEC1:
mov rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_2AEDF:
mov rdi, [rsp+arg_20]; this
call _ZN6google8protobuf2io20ZeroCopyOutputStreamD2Ev; google::protobuf::io::ZeroCopyOutputStream::~ZeroCopyOutputStream()
mov rdi, [rsp+arg_38]
call __Unwind_Resume
| long long google::protobuf::compiler::CommandLineInterface::MemoryOutputStream::MemoryOutputStream(
long long a1,
long long a2,
long long a3,
char a4)
{
long long v5; // [rsp+20h] [rbp-48h]
char v6; // [rsp+4Fh] [rbp-19h]
v6 = a4 & 1;
google::protobuf::io::ZeroCopyOutputStream::ZeroCopyOutputStream((google::protobuf::io::ZeroCopyOutputStream *)a1);
*(_QWORD *)a1 = off_4E8CA0;
*(_QWORD *)(a1 + 8) = a2;
std::string::basic_string(a1 + 16, a3);
std::string::basic_string(a1 + 48);
std::string::basic_string(a1 + 80);
*(_BYTE *)(a1 + 112) = v6 & 1;
v5 = operator new(0x10uLL);
google::protobuf::io::StringOutputStream::StringOutputStream(v5, a1 + 80);
std::unique_ptr<google::protobuf::io::StringOutputStream>::unique_ptr<std::default_delete<google::protobuf::io::StringOutputStream>,void>(
a1 + 120,
v5);
return google::protobuf::GeneratedCodeInfo::GeneratedCodeInfo((google::protobuf::GeneratedCodeInfo *)(a1 + 128));
}
| MemoryOutputStream:
SUB RSP,0x68
MOV AL,CL
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x50],RDX
AND AL,0x1
MOV byte ptr [RSP + 0x4f],AL
MOV RDI,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00136cb0
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[0x5e8ca0]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RDI + 0x8],RAX
ADD RDI,0x10
MOV qword ptr [RSP + 0x30],RDI
MOV RSI,qword ptr [RSP + 0x50]
LAB_0012ade0:
CALL 0x00121160
JMP 0x0012ade7
LAB_0012ade7:
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x30
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00121390
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x50
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00121390
MOV RAX,qword ptr [RSP + 0x28]
MOV CL,byte ptr [RSP + 0x4f]
AND CL,0x1
MOV byte ptr [RAX + 0x70],CL
ADD RAX,0x78
MOV qword ptr [RSP + 0x18],RAX
LAB_0012ae25:
MOV EDI,0x10
CALL 0x001211c0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0012ae36
LAB_0012ae36:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
ADD RSI,0x50
LAB_0012ae44:
CALL 0x002f08f0
JMP 0x0012ae4b
LAB_0012ae4b:
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00136cd0
MOV RDI,qword ptr [RSP + 0x28]
SUB RDI,-0x80
LAB_0012ae63:
CALL 0x00136d00
LAB_0012ae68:
JMP 0x0012ae6a
LAB_0012ae6a:
ADD RSP,0x68
RET
|
/* google::protobuf::compiler::CommandLineInterface::MemoryOutputStream::MemoryOutputStream(google::protobuf::compiler::CommandLineInterface::GeneratorContextImpl*,
std::__cxx11::string const&, bool) */
void __thiscall
google::protobuf::compiler::CommandLineInterface::MemoryOutputStream::MemoryOutputStream
(MemoryOutputStream *this,GeneratorContextImpl *param_1,string *param_2,bool param_3)
{
StringOutputStream *this_00;
io::ZeroCopyOutputStream::ZeroCopyOutputStream((ZeroCopyOutputStream *)this);
*(int ***)this = &PTR__MemoryOutputStream_005e8ca0;
*(GeneratorContextImpl **)(this + 8) = param_1;
/* try { // try from 0012ade0 to 0012ade4 has its CatchHandler @ 0012ae6f */
std::__cxx11::string::string((string *)(this + 0x10),param_2);
std::__cxx11::string::string((string *)(this + 0x30));
std::__cxx11::string::string((string *)(this + 0x50));
this[0x70] = (MemoryOutputStream)param_3;
/* try { // try from 0012ae25 to 0012ae2e has its CatchHandler @ 0012ae7f */
this_00 = (StringOutputStream *)operator_new(0x10);
/* try { // try from 0012ae44 to 0012ae48 has its CatchHandler @ 0012ae8f */
io::StringOutputStream::StringOutputStream(this_00,(string *)(this + 0x50));
std::
unique_ptr<google::protobuf::io::StringOutputStream,std::default_delete<google::protobuf::io::StringOutputStream>>
::unique_ptr<std::default_delete<google::protobuf::io::StringOutputStream>,void>
((unique_ptr<google::protobuf::io::StringOutputStream,std::default_delete<google::protobuf::io::StringOutputStream>>
*)(this + 0x78),this_00);
/* try { // try from 0012ae63 to 0012ae67 has its CatchHandler @ 0012aea9 */
GeneratedCodeInfo::GeneratedCodeInfo((GeneratedCodeInfo *)(this + 0x80));
return;
}
| |
26,736 | js_free_module_def | bluesky950520[P]quickjs/quickjs.c | static void js_free_module_def(JSContext *ctx, JSModuleDef *m)
{
int i;
JS_FreeAtom(ctx, m->module_name);
for(i = 0; i < m->req_module_entries_count; i++) {
JSReqModuleEntry *rme = &m->req_module_entries[i];
JS_FreeAtom(ctx, rme->module_name);
}
js_free(ctx, m->req_module_entries);
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_LOCAL)
free_var_ref(ctx->rt, me->u.local.var_ref);
JS_FreeAtom(ctx, me->export_name);
JS_FreeAtom(ctx, me->local_name);
}
js_free(ctx, m->export_entries);
js_free(ctx, m->star_export_entries);
for(i = 0; i < m->import_entries_count; i++) {
JSImportEntry *mi = &m->import_entries[i];
JS_FreeAtom(ctx, mi->import_name);
}
js_free(ctx, m->import_entries);
js_free(ctx, m->async_parent_modules);
JS_FreeValue(ctx, m->module_ns);
JS_FreeValue(ctx, m->func_obj);
JS_FreeValue(ctx, m->eval_exception);
JS_FreeValue(ctx, m->meta_obj);
JS_FreeValue(ctx, m->promise);
JS_FreeValue(ctx, m->resolving_funcs[0]);
JS_FreeValue(ctx, m->resolving_funcs[1]);
list_del(&m->link);
js_free(ctx, m);
} | O0 | c | js_free_module_def:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x29040
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x5c65e
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rax
movl (%rax), %esi
callq 0x29040
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x5c618
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x21db0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x5c6f4
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x24(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x5c6c3
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x35a90
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x18(%rax), %esi
callq 0x29040
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x14(%rax), %esi
callq 0x29040
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x5c679
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x21db0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x21db0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x50(%rcx), %eax
jge 0x5c769
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0x24(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x4(%rax), %esi
callq 0x29040
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x5c722
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rsi
callq 0x21db0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x98(%rax), %rsi
callq 0x21db0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
callq 0x23c90
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x68(%rax), %rsi
movq 0x70(%rax), %rdx
callq 0x23c90
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xf8(%rax), %rsi
movq 0x100(%rax), %rdx
callq 0x23c90
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x108(%rax), %rsi
movq 0x110(%rax), %rdx
callq 0x23c90
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xc0(%rax), %rsi
movq 0xc8(%rax), %rdx
callq 0x23c90
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xd0(%rax), %rsi
movq 0xd8(%rax), %rdx
callq 0x23c90
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xe0(%rax), %rsi
movq 0xe8(%rax), %rdx
callq 0x23c90
movq 0x28(%rsp), %rdi
addq $0x8, %rdi
callq 0x23c30
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x21db0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| js_free_module_def:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov esi, [rax+4]
call JS_FreeAtom
mov [rsp+38h+var_14], 0
loc_5C618:
mov eax, [rsp+38h+var_14]
mov rcx, [rsp+38h+var_10]
cmp eax, [rcx+20h]
jge short loc_5C65E
mov rax, [rsp+38h+var_10]
mov rax, [rax+18h]
movsxd rcx, [rsp+38h+var_14]
shl rcx, 4
add rax, rcx
mov [rsp+38h+var_20], rax
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_20]
mov esi, [rax]
call JS_FreeAtom
mov eax, [rsp+38h+var_14]
add eax, 1
mov [rsp+38h+var_14], eax
jmp short loc_5C618
loc_5C65E:
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+18h]
call js_free
mov [rsp+38h+var_14], 0
loc_5C679:
mov eax, [rsp+38h+var_14]
mov rcx, [rsp+38h+var_10]
cmp eax, [rcx+30h]
jge short loc_5C6F4
mov rax, [rsp+38h+var_10]
mov rax, [rax+28h]
movsxd rcx, [rsp+38h+var_14]
shl rcx, 5
add rax, rcx
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
cmp dword ptr [rax+10h], 0
jnz short loc_5C6C3
mov rax, [rsp+38h+var_8]
mov rdi, [rax+18h]
mov rax, [rsp+38h+var_28]
mov rsi, [rax+8]
call free_var_ref
loc_5C6C3:
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_28]
mov esi, [rax+18h]
call JS_FreeAtom
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_28]
mov esi, [rax+14h]
call JS_FreeAtom
mov eax, [rsp+38h+var_14]
add eax, 1
mov [rsp+38h+var_14], eax
jmp short loc_5C679
loc_5C6F4:
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+28h]
call js_free
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+38h]
call js_free
mov [rsp+38h+var_14], 0
loc_5C722:
mov eax, [rsp+38h+var_14]
mov rcx, [rsp+38h+var_10]
cmp eax, [rcx+50h]
jge short loc_5C769
mov rax, [rsp+38h+var_10]
mov rax, [rax+48h]
movsxd rcx, [rsp+38h+var_14]
imul rcx, 0Ch
add rax, rcx
mov [rsp+38h+var_30], rax
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_30]
mov esi, [rax+4]
call JS_FreeAtom
mov eax, [rsp+38h+var_14]
add eax, 1
mov [rsp+38h+var_14], eax
jmp short loc_5C722
loc_5C769:
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+48h]
call js_free
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+98h]
call js_free
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+58h]
mov rdx, [rax+60h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+68h]
mov rdx, [rax+70h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+0F8h]
mov rdx, [rax+100h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+108h]
mov rdx, [rax+110h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+0C0h]
mov rdx, [rax+0C8h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+0D0h]
mov rdx, [rax+0D8h]
call JS_FreeValue
mov rdi, [rsp+38h+var_8]
mov rax, [rsp+38h+var_10]
mov rsi, [rax+0E0h]
mov rdx, [rax+0E8h]
call JS_FreeValue
mov rdi, [rsp+38h+var_10]
add rdi, 8
call list_del_0
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call js_free
add rsp, 38h
retn
| void js_free_module_def(long long a1, long long a2)
{
long long v2; // [rsp+10h] [rbp-28h]
int i; // [rsp+24h] [rbp-14h]
int j; // [rsp+24h] [rbp-14h]
int k; // [rsp+24h] [rbp-14h]
JS_FreeAtom(a1, *(_DWORD *)(a2 + 4));
for ( i = 0; i < *(_DWORD *)(a2 + 32); ++i )
JS_FreeAtom(a1, *(_DWORD *)(16LL * i + *(_QWORD *)(a2 + 24)));
js_free(a1, *(_QWORD *)(a2 + 24));
for ( j = 0; j < *(_DWORD *)(a2 + 48); ++j )
{
v2 = 32LL * j + *(_QWORD *)(a2 + 40);
if ( !*(_DWORD *)(v2 + 16) )
free_var_ref(*(_QWORD *)(a1 + 24), *(_QWORD *)(v2 + 8));
JS_FreeAtom(a1, *(_DWORD *)(v2 + 24));
JS_FreeAtom(a1, *(_DWORD *)(v2 + 20));
}
js_free(a1, *(_QWORD *)(a2 + 40));
js_free(a1, *(_QWORD *)(a2 + 56));
for ( k = 0; k < *(_DWORD *)(a2 + 80); ++k )
JS_FreeAtom(a1, *(_DWORD *)(12LL * k + *(_QWORD *)(a2 + 72) + 4));
js_free(a1, *(_QWORD *)(a2 + 72));
js_free(a1, *(_QWORD *)(a2 + 152));
JS_FreeValue(a1, *(_QWORD *)(a2 + 88), *(_QWORD *)(a2 + 96));
JS_FreeValue(a1, *(_QWORD *)(a2 + 104), *(_QWORD *)(a2 + 112));
JS_FreeValue(a1, *(_QWORD *)(a2 + 248), *(_QWORD *)(a2 + 256));
JS_FreeValue(a1, *(_QWORD *)(a2 + 264), *(_QWORD *)(a2 + 272));
JS_FreeValue(a1, *(_QWORD *)(a2 + 192), *(_QWORD *)(a2 + 200));
JS_FreeValue(a1, *(_QWORD *)(a2 + 208), *(_QWORD *)(a2 + 216));
JS_FreeValue(a1, *(_QWORD *)(a2 + 224), *(_QWORD *)(a2 + 232));
list_del_0((_QWORD *)(a2 + 8));
js_free(a1, a2);
}
| js_free_module_def:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RAX + 0x4]
CALL 0x00129040
MOV dword ptr [RSP + 0x24],0x0
LAB_0015c618:
MOV EAX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x28]
CMP EAX,dword ptr [RCX + 0x20]
JGE 0x0015c65e
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX]
CALL 0x00129040
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x0015c618
LAB_0015c65e:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x00121db0
MOV dword ptr [RSP + 0x24],0x0
LAB_0015c679:
MOV EAX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x28]
CMP EAX,dword ptr [RCX + 0x30]
JGE 0x0015c6f4
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x24]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x10],0x0
JNZ 0x0015c6c3
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00135a90
LAB_0015c6c3:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RAX + 0x18]
CALL 0x00129040
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RAX + 0x14]
CALL 0x00129040
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x0015c679
LAB_0015c6f4:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x28]
CALL 0x00121db0
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x00121db0
MOV dword ptr [RSP + 0x24],0x0
LAB_0015c722:
MOV EAX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x28]
CMP EAX,dword ptr [RCX + 0x50]
JGE 0x0015c769
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x48]
MOVSXD RCX,dword ptr [RSP + 0x24]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RAX + 0x4]
CALL 0x00129040
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x0015c722
LAB_0015c769:
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x48]
CALL 0x00121db0
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x98]
CALL 0x00121db0
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x58]
MOV RDX,qword ptr [RAX + 0x60]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x68]
MOV RDX,qword ptr [RAX + 0x70]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0xf8]
MOV RDX,qword ptr [RAX + 0x100]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x108]
MOV RDX,qword ptr [RAX + 0x110]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0xc0]
MOV RDX,qword ptr [RAX + 0xc8]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0xd0]
MOV RDX,qword ptr [RAX + 0xd8]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0xe0]
MOV RDX,qword ptr [RAX + 0xe8]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x8
CALL 0x00123c30
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00121db0
ADD RSP,0x38
RET
|
void js_free_module_def(long param_1,long param_2)
{
long lVar1;
int4 local_14;
JS_FreeAtom(param_1,*(int4 *)(param_2 + 4));
for (local_14 = 0; local_14 < *(int *)(param_2 + 0x20); local_14 = local_14 + 1) {
JS_FreeAtom(param_1,*(int4 *)(*(long *)(param_2 + 0x18) + (long)local_14 * 0x10));
}
js_free(param_1,*(int8 *)(param_2 + 0x18));
for (local_14 = 0; local_14 < *(int *)(param_2 + 0x30); local_14 = local_14 + 1) {
lVar1 = *(long *)(param_2 + 0x28) + (long)local_14 * 0x20;
if (*(int *)(lVar1 + 0x10) == 0) {
free_var_ref(*(int8 *)(param_1 + 0x18),*(int8 *)(lVar1 + 8));
}
JS_FreeAtom(param_1,*(int4 *)(lVar1 + 0x18));
JS_FreeAtom(param_1,*(int4 *)(lVar1 + 0x14));
}
js_free(param_1,*(int8 *)(param_2 + 0x28));
js_free(param_1,*(int8 *)(param_2 + 0x38));
for (local_14 = 0; local_14 < *(int *)(param_2 + 0x50); local_14 = local_14 + 1) {
JS_FreeAtom(param_1,*(int4 *)(*(long *)(param_2 + 0x48) + (long)local_14 * 0xc + 4));
}
js_free(param_1,*(int8 *)(param_2 + 0x48));
js_free(param_1,*(int8 *)(param_2 + 0x98));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x58),*(int8 *)(param_2 + 0x60));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x68),*(int8 *)(param_2 + 0x70));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xf8),*(int8 *)(param_2 + 0x100));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x108),*(int8 *)(param_2 + 0x110));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xc0),*(int8 *)(param_2 + 200));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xd0),*(int8 *)(param_2 + 0xd8));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xe0),*(int8 *)(param_2 + 0xe8));
list_del(param_2 + 8);
js_free(param_1,param_2);
return;
}
| |
26,737 | js_free_module_def | bluesky950520[P]quickjs/quickjs.c | static void js_free_module_def(JSContext *ctx, JSModuleDef *m)
{
int i;
JS_FreeAtom(ctx, m->module_name);
for(i = 0; i < m->req_module_entries_count; i++) {
JSReqModuleEntry *rme = &m->req_module_entries[i];
JS_FreeAtom(ctx, rme->module_name);
}
js_free(ctx, m->req_module_entries);
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_LOCAL)
free_var_ref(ctx->rt, me->u.local.var_ref);
JS_FreeAtom(ctx, me->export_name);
JS_FreeAtom(ctx, me->local_name);
}
js_free(ctx, m->export_entries);
js_free(ctx, m->star_export_entries);
for(i = 0; i < m->import_entries_count; i++) {
JSImportEntry *mi = &m->import_entries[i];
JS_FreeAtom(ctx, mi->import_name);
}
js_free(ctx, m->import_entries);
js_free(ctx, m->async_parent_modules);
JS_FreeValue(ctx, m->module_ns);
JS_FreeValue(ctx, m->func_obj);
JS_FreeValue(ctx, m->eval_exception);
JS_FreeValue(ctx, m->meta_obj);
JS_FreeValue(ctx, m->promise);
JS_FreeValue(ctx, m->resolving_funcs[0]);
JS_FreeValue(ctx, m->resolving_funcs[1]);
list_del(&m->link);
js_free(ctx, m);
} | O2 | c | js_free_module_def:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %esi
callq 0x1a995
xorl %r15d, %r15d
xorl %r12d, %r12d
movslq 0x20(%rbx), %rax
movq 0x18(%rbx), %rsi
cmpq %rax, %r12
jge 0x34443
movl (%rsi,%r15), %esi
movq %r14, %rdi
callq 0x1a995
incq %r12
addq $0x10, %r15
jmp 0x34421
movq %r14, %rdi
callq 0x1726e
pushq $0x18
popq %r12
xorl %r13d, %r13d
movslq 0x30(%rbx), %rax
movq 0x28(%rbx), %r15
cmpq %rax, %r13
jge 0x34497
cmpl $0x0, -0x8(%r15,%r12)
jne 0x34475
movq 0x18(%r14), %rdi
movq -0x10(%r15,%r12), %rsi
callq 0x1fed9
movl (%r15,%r12), %esi
movq %r14, %rdi
callq 0x1a995
movl -0x4(%r15,%r12), %esi
movq %r14, %rdi
callq 0x1a995
incq %r13
addq $0x20, %r12
jmp 0x34452
movq %r14, %rdi
movq %r15, %rsi
callq 0x1726e
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0x1726e
pushq $0x4
popq %r15
xorl %r12d, %r12d
movslq 0x50(%rbx), %rax
movq 0x48(%rbx), %rsi
cmpq %rax, %r12
jge 0x344d7
movl (%rsi,%r15), %esi
movq %r14, %rdi
callq 0x1a995
incq %r12
addq $0xc, %r15
jmp 0x344b5
movq %r14, %rdi
callq 0x1726e
movq 0x98(%rbx), %rsi
movq %r14, %rdi
callq 0x1726e
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
movq %r14, %rdi
callq 0x1801e
movq 0x68(%rbx), %rsi
movq 0x70(%rbx), %rdx
movq %r14, %rdi
callq 0x1801e
movq 0xf8(%rbx), %rsi
movq 0x100(%rbx), %rdx
movq %r14, %rdi
callq 0x1801e
movq 0x108(%rbx), %rsi
movq 0x110(%rbx), %rdx
movq %r14, %rdi
callq 0x1801e
movq 0xc0(%rbx), %rsi
movq 0xc8(%rbx), %rdx
movq %r14, %rdi
callq 0x1801e
movq 0xd0(%rbx), %rsi
movq 0xd8(%rbx), %rdx
movq %r14, %rdi
callq 0x1801e
movq 0xe0(%rbx), %rsi
movq 0xe8(%rbx), %rdx
movq %r14, %rdi
callq 0x1801e
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1726e
| js_free_module_def:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rsi
mov r14, rdi
mov esi, [rsi+4]
call JS_FreeAtom
xor r15d, r15d
xor r12d, r12d
loc_34421:
movsxd rax, dword ptr [rbx+20h]
mov rsi, [rbx+18h]
cmp r12, rax
jge short loc_34443
mov esi, [rsi+r15]
mov rdi, r14
call JS_FreeAtom
inc r12
add r15, 10h
jmp short loc_34421
loc_34443:
mov rdi, r14
call js_free
push 18h
pop r12
xor r13d, r13d
loc_34452:
movsxd rax, dword ptr [rbx+30h]
mov r15, [rbx+28h]
cmp r13, rax
jge short loc_34497
cmp dword ptr [r15+r12-8], 0
jnz short loc_34475
mov rdi, [r14+18h]
mov rsi, [r15+r12-10h]
call free_var_ref
loc_34475:
mov esi, [r15+r12]
mov rdi, r14
call JS_FreeAtom
mov esi, [r15+r12-4]
mov rdi, r14
call JS_FreeAtom
inc r13
add r12, 20h ; ' '
jmp short loc_34452
loc_34497:
mov rdi, r14
mov rsi, r15
call js_free
mov rsi, [rbx+38h]
mov rdi, r14
call js_free
push 4
pop r15
xor r12d, r12d
loc_344B5:
movsxd rax, dword ptr [rbx+50h]
mov rsi, [rbx+48h]
cmp r12, rax
jge short loc_344D7
mov esi, [rsi+r15]
mov rdi, r14
call JS_FreeAtom
inc r12
add r15, 0Ch
jmp short loc_344B5
loc_344D7:
mov rdi, r14
call js_free
mov rsi, [rbx+98h]
mov rdi, r14
call js_free
mov rsi, [rbx+58h]
mov rdx, [rbx+60h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+68h]
mov rdx, [rbx+70h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+0F8h]
mov rdx, [rbx+100h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+108h]
mov rdx, [rbx+110h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+0C0h]
mov rdx, [rbx+0C8h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+0D0h]
mov rdx, [rbx+0D8h]
mov rdi, r14
call JS_FreeValue
mov rsi, [rbx+0E0h]
mov rdx, [rbx+0E8h]
mov rdi, r14
call JS_FreeValue
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
mov rdi, r14
mov rsi, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp js_free
| long long js_free_module_def(long long a1, long long a2)
{
long long v3; // r15
long long i; // r12
long long v5; // rsi
long long v6; // r12
long long j; // r13
long long v8; // r15
long long v9; // r15
long long k; // r12
long long v11; // rsi
long long v12; // rax
_QWORD *v13; // rcx
JS_FreeAtom(a1, *(_DWORD *)(a2 + 4));
v3 = 0LL;
for ( i = 0LL; ; ++i )
{
v5 = *(_QWORD *)(a2 + 24);
if ( i >= *(int *)(a2 + 32) )
break;
JS_FreeAtom(a1, *(_DWORD *)(v5 + v3));
v3 += 16LL;
}
js_free(a1, v5);
v6 = 24LL;
for ( j = 0LL; ; ++j )
{
v8 = *(_QWORD *)(a2 + 40);
if ( j >= *(int *)(a2 + 48) )
break;
if ( !*(_DWORD *)(v8 + v6 - 8) )
free_var_ref(*(_QWORD *)(a1 + 24), *(_QWORD *)(v8 + v6 - 16));
JS_FreeAtom(a1, *(_DWORD *)(v8 + v6));
JS_FreeAtom(a1, *(_DWORD *)(v8 + v6 - 4));
v6 += 32LL;
}
js_free(a1, *(_QWORD *)(a2 + 40));
js_free(a1, *(_QWORD *)(a2 + 56));
v9 = 4LL;
for ( k = 0LL; ; ++k )
{
v11 = *(_QWORD *)(a2 + 72);
if ( k >= *(int *)(a2 + 80) )
break;
JS_FreeAtom(a1, *(_DWORD *)(v11 + v9));
v9 += 12LL;
}
js_free(a1, v11);
js_free(a1, *(_QWORD *)(a2 + 152));
JS_FreeValue(a1, *(_QWORD *)(a2 + 88), *(_QWORD *)(a2 + 96));
JS_FreeValue(a1, *(_QWORD *)(a2 + 104), *(_QWORD *)(a2 + 112));
JS_FreeValue(a1, *(_QWORD *)(a2 + 248), *(_QWORD *)(a2 + 256));
JS_FreeValue(a1, *(_QWORD *)(a2 + 264), *(_QWORD *)(a2 + 272));
JS_FreeValue(a1, *(_QWORD *)(a2 + 192), *(_QWORD *)(a2 + 200));
JS_FreeValue(a1, *(_QWORD *)(a2 + 208), *(_QWORD *)(a2 + 216));
JS_FreeValue(a1, *(_QWORD *)(a2 + 224), *(_QWORD *)(a2 + 232));
v12 = *(_QWORD *)(a2 + 8);
v13 = *(_QWORD **)(a2 + 16);
*(_QWORD *)(v12 + 8) = v13;
*v13 = v12;
*(_OWORD *)(a2 + 8) = 0LL;
return js_free(a1, a2);
}
| js_free_module_def:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV ESI,dword ptr [RSI + 0x4]
CALL 0x0011a995
XOR R15D,R15D
XOR R12D,R12D
LAB_00134421:
MOVSXD RAX,dword ptr [RBX + 0x20]
MOV RSI,qword ptr [RBX + 0x18]
CMP R12,RAX
JGE 0x00134443
MOV ESI,dword ptr [RSI + R15*0x1]
MOV RDI,R14
CALL 0x0011a995
INC R12
ADD R15,0x10
JMP 0x00134421
LAB_00134443:
MOV RDI,R14
CALL 0x0011726e
PUSH 0x18
POP R12
XOR R13D,R13D
LAB_00134452:
MOVSXD RAX,dword ptr [RBX + 0x30]
MOV R15,qword ptr [RBX + 0x28]
CMP R13,RAX
JGE 0x00134497
CMP dword ptr [R15 + R12*0x1 + -0x8],0x0
JNZ 0x00134475
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [R15 + R12*0x1 + -0x10]
CALL 0x0011fed9
LAB_00134475:
MOV ESI,dword ptr [R15 + R12*0x1]
MOV RDI,R14
CALL 0x0011a995
MOV ESI,dword ptr [R15 + R12*0x1 + -0x4]
MOV RDI,R14
CALL 0x0011a995
INC R13
ADD R12,0x20
JMP 0x00134452
LAB_00134497:
MOV RDI,R14
MOV RSI,R15
CALL 0x0011726e
MOV RSI,qword ptr [RBX + 0x38]
MOV RDI,R14
CALL 0x0011726e
PUSH 0x4
POP R15
XOR R12D,R12D
LAB_001344b5:
MOVSXD RAX,dword ptr [RBX + 0x50]
MOV RSI,qword ptr [RBX + 0x48]
CMP R12,RAX
JGE 0x001344d7
MOV ESI,dword ptr [RSI + R15*0x1]
MOV RDI,R14
CALL 0x0011a995
INC R12
ADD R15,0xc
JMP 0x001344b5
LAB_001344d7:
MOV RDI,R14
CALL 0x0011726e
MOV RSI,qword ptr [RBX + 0x98]
MOV RDI,R14
CALL 0x0011726e
MOV RSI,qword ptr [RBX + 0x58]
MOV RDX,qword ptr [RBX + 0x60]
MOV RDI,R14
CALL 0x0011801e
MOV RSI,qword ptr [RBX + 0x68]
MOV RDX,qword ptr [RBX + 0x70]
MOV RDI,R14
CALL 0x0011801e
MOV RSI,qword ptr [RBX + 0xf8]
MOV RDX,qword ptr [RBX + 0x100]
MOV RDI,R14
CALL 0x0011801e
MOV RSI,qword ptr [RBX + 0x108]
MOV RDX,qword ptr [RBX + 0x110]
MOV RDI,R14
CALL 0x0011801e
MOV RSI,qword ptr [RBX + 0xc0]
MOV RDX,qword ptr [RBX + 0xc8]
MOV RDI,R14
CALL 0x0011801e
MOV RSI,qword ptr [RBX + 0xd0]
MOV RDX,qword ptr [RBX + 0xd8]
MOV RDI,R14
CALL 0x0011801e
MOV RSI,qword ptr [RBX + 0xe0]
MOV RDX,qword ptr [RBX + 0xe8]
MOV RDI,R14
CALL 0x0011801e
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
MOV RDI,R14
MOV RSI,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x0011726e
|
void js_free_module_def(long param_1,long param_2)
{
long lVar1;
long *plVar2;
long lVar3;
long lVar4;
JS_FreeAtom(param_1,*(int4 *)(param_2 + 4));
lVar4 = 0;
for (lVar3 = 0; lVar3 < *(int *)(param_2 + 0x20); lVar3 = lVar3 + 1) {
JS_FreeAtom(param_1,*(int4 *)(*(long *)(param_2 + 0x18) + lVar4));
lVar4 = lVar4 + 0x10;
}
js_free(param_1);
lVar3 = 0x18;
for (lVar4 = 0; lVar1 = *(long *)(param_2 + 0x28), lVar4 < *(int *)(param_2 + 0x30);
lVar4 = lVar4 + 1) {
if (*(int *)(lVar1 + -8 + lVar3) == 0) {
free_var_ref(*(int8 *)(param_1 + 0x18),*(int8 *)(lVar1 + -0x10 + lVar3));
}
JS_FreeAtom(param_1,*(int4 *)(lVar1 + lVar3));
JS_FreeAtom(param_1,*(int4 *)(lVar1 + -4 + lVar3));
lVar3 = lVar3 + 0x20;
}
js_free(param_1,lVar1);
js_free(param_1,*(int8 *)(param_2 + 0x38));
lVar3 = 4;
for (lVar4 = 0; lVar4 < *(int *)(param_2 + 0x50); lVar4 = lVar4 + 1) {
JS_FreeAtom(param_1,*(int4 *)(*(long *)(param_2 + 0x48) + lVar3));
lVar3 = lVar3 + 0xc;
}
js_free(param_1);
js_free(param_1,*(int8 *)(param_2 + 0x98));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x58),*(int8 *)(param_2 + 0x60));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x68),*(int8 *)(param_2 + 0x70));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xf8),*(int8 *)(param_2 + 0x100));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0x108),*(int8 *)(param_2 + 0x110));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xc0),*(int8 *)(param_2 + 200));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xd0),*(int8 *)(param_2 + 0xd8));
JS_FreeValue(param_1,*(int8 *)(param_2 + 0xe0),*(int8 *)(param_2 + 0xe8));
lVar3 = *(long *)(param_2 + 8);
plVar2 = *(long **)(param_2 + 0x10);
*(long **)(lVar3 + 8) = plVar2;
*plVar2 = lVar3;
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(param_2 + 0x10) = 0;
js_free(param_1,param_2);
return;
}
| |
26,738 | pvio_socket_is_blocking | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | my_bool pvio_socket_is_blocking(MARIADB_PVIO *pvio)
{
struct st_pvio_socket *csock= NULL;
my_bool r;
if (!pvio || !pvio->data)
return 0;
csock= (struct st_pvio_socket *)pvio->data;
r = !(csock->fcntl_mode & O_NONBLOCK);
return r;
} | O3 | c | pvio_socket_is_blocking:
testq %rdi, %rdi
je 0x2f257
movq (%rdi), %rax
testq %rax, %rax
je 0x2f257
pushq %rbp
movq %rsp, %rbp
testb $0x8, 0x5(%rax)
sete %al
popq %rbp
retq
xorl %eax, %eax
retq
| pvio_socket_is_blocking:
test rdi, rdi
jz short loc_2F257
mov rax, [rdi]
test rax, rax
jz short loc_2F257
push rbp
mov rbp, rsp
test byte ptr [rax+5], 8
setz al
pop rbp
retn
loc_2F257:
xor eax, eax
retn
| bool pvio_socket_is_blocking(long long a1)
{
return a1 && *(_QWORD *)a1 && (*(_BYTE *)(*(_QWORD *)a1 + 5LL) & 8) == 0;
}
| pvio_socket_is_blocking:
TEST RDI,RDI
JZ 0x0012f257
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0012f257
PUSH RBP
MOV RBP,RSP
TEST byte ptr [RAX + 0x5],0x8
SETZ AL
POP RBP
RET
LAB_0012f257:
XOR EAX,EAX
RET
|
int8 pvio_socket_is_blocking(long *param_1)
{
long lVar1;
if ((param_1 != (long *)0x0) && (lVar1 = *param_1, lVar1 != 0)) {
return CONCAT71((int7)((ulong)lVar1 >> 8),(*(byte *)(lVar1 + 5) & 8) == 0);
}
return 0;
}
| |
26,739 | var_set(char const*, char const*, char const*, char const*) | eloqsql/client/mysqltest.cc | void var_set(const char *var_name, const char *var_name_end,
const char *var_val, const char *var_val_end)
{
int digit, env_var= 0;
VAR *v;
DBUG_ENTER("var_set");
DBUG_PRINT("enter", ("var_name: '%.*s' = '%.*s' (length: %d)",
(int) (var_name_end - var_name), var_name,
(int) (var_val_end - var_val), var_val,
(int) (var_val_end - var_val)));
if (*var_name != '$')
env_var= 1;
else
var_name++;
digit= *var_name - '0';
if (!(digit < 10 && digit >= 0))
{
v= var_obtain(var_name, (uint) (var_name_end - var_name));
}
else
v= var_reg + digit;
eval_expr(v, var_val, (const char**) &var_val_end);
if (env_var)
{
if (v->int_dirty)
{
sprintf(v->str_val, "%d", v->int_val);
v->int_dirty=false;
v->str_val_len= strlen(v->str_val);
}
/* setenv() expects \0-terminated strings */
DBUG_ASSERT(v->name[v->name_len] == 0);
setenv(v->name, v->str_val, 1);
}
DBUG_VOID_RETURN;
} | O0 | cpp | var_set(char const*, char const*, char const*, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
jmp 0x64e61
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x24, %eax
je 0x64e76
movl $0x1, -0x28(%rbp)
jmp 0x64e82
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movl %eax, -0x24(%rbp)
cmpl $0xa, -0x24(%rbp)
jge 0x64e9b
cmpl $0x0, -0x24(%rbp)
jge 0x64eb7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %esi
callq 0x64dc0
movq %rax, -0x30(%rbp)
jmp 0x64ecd
movslq -0x24(%rbp), %rcx
leaq 0x45443e(%rip), %rax # 0x4b9300
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x20(%rbp), %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x64f60
cmpl $0x0, -0x28(%rbp)
je 0x64f50
movq -0x30(%rbp), %rax
testb $0x1, 0x30(%rax)
je 0x64f33
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x20(%rax), %edx
leaq 0x108335(%rip), %rsi # 0x16d241
movb $0x0, %al
callq 0x60be0
movq -0x30(%rbp), %rax
movb $0x0, 0x30(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x60460
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x64f35
jmp 0x64f37
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
movl $0x1, %edx
callq 0x605d0
jmp 0x64f52
jmp 0x64f54
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _Z7var_setPKcS0_S0_S0_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], 0
jmp short $+2
loc_64E61:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 24h ; '$'
jz short loc_64E76
mov [rbp+var_28], 1
jmp short loc_64E82
loc_64E76:
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
loc_64E82:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
sub eax, 30h ; '0'
mov [rbp+var_24], eax
cmp [rbp+var_24], 0Ah
jge short loc_64E9B
cmp [rbp+var_24], 0
jge short loc_64EB7
loc_64E9B:
mov rdi, [rbp+var_8]; char *
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
sub rax, rcx
mov esi, eax; int
call _Z10var_obtainPKci; var_obtain(char const*,int)
mov [rbp+var_30], rax
jmp short loc_64ECD
loc_64EB7:
movsxd rcx, [rbp+var_24]
lea rax, var_reg
imul rcx, 38h ; '8'
add rax, rcx
mov [rbp+var_30], rax
loc_64ECD:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
lea rdx, [rbp+var_20]
xor ecx, ecx
mov r8d, 1
call _Z9eval_exprP3VARPKcPS2_bb; eval_expr(VAR *,char const*,char const**,bool,bool)
cmp [rbp+var_28], 0
jz short loc_64F50
mov rax, [rbp+var_30]
test byte ptr [rax+30h], 1
jz short loc_64F33
mov rax, [rbp+var_30]
mov rdi, [rax+10h]
mov rax, [rbp+var_30]
mov edx, [rax+20h]
lea rsi, aUnsupportedVer+41h; "%d"
mov al, 0
call _sprintf
mov rax, [rbp+var_30]
mov byte ptr [rax+30h], 0
mov rax, [rbp+var_30]
mov rdi, [rax+10h]
call _strlen
mov rcx, rax
mov rax, [rbp+var_30]
mov [rax+18h], rcx
loc_64F33:
jmp short $+2
loc_64F35:
jmp short $+2
loc_64F37:
mov rax, [rbp+var_30]
mov rdi, [rax]
mov rax, [rbp+var_30]
mov rsi, [rax+10h]
mov edx, 1
call _setenv
loc_64F50:
jmp short $+2
loc_64F52:
jmp short $+2
loc_64F54:
add rsp, 30h
pop rbp
retn
| long long var_set(char *a1, const char *a2, const char *a3, const char *a4)
{
long long result; // rax
_QWORD *v5; // [rsp+0h] [rbp-30h]
int v6; // [rsp+8h] [rbp-28h]
unsigned int v7; // [rsp+Ch] [rbp-24h]
const char *v8; // [rsp+10h] [rbp-20h] BYREF
const char *v9; // [rsp+18h] [rbp-18h]
const char *v10; // [rsp+20h] [rbp-10h]
char *v11; // [rsp+28h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v6 = 0;
if ( *a1 == 36 )
++v11;
else
v6 = 1;
v7 = *v11 - 48;
if ( v7 < 0xA )
{
v5 = &var_reg[7 * (int)v7];
result = eval_expr(v5, v9, &v8, 0LL, 1LL);
}
else
{
v5 = (_QWORD *)var_obtain(v11, (int)v10 - (int)v11);
result = eval_expr(v5, v9, &v8, 0LL, 1LL);
}
if ( v6 )
{
if ( (v5[6] & 1) != 0 )
{
sprintf(v5[2], "%d", *((_DWORD *)v5 + 8));
*((_BYTE *)v5 + 48) = 0;
v5[3] = strlen(v5[2]);
}
return setenv(*v5, v5[2], 1LL);
}
return result;
}
| var_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x28],0x0
JMP 0x00164e61
LAB_00164e61:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x24
JZ 0x00164e76
MOV dword ptr [RBP + -0x28],0x1
JMP 0x00164e82
LAB_00164e76:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
LAB_00164e82:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x30
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0xa
JGE 0x00164e9b
CMP dword ptr [RBP + -0x24],0x0
JGE 0x00164eb7
LAB_00164e9b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
MOV ESI,EAX
CALL 0x00164dc0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00164ecd
LAB_00164eb7:
MOVSXD RCX,dword ptr [RBP + -0x24]
LEA RAX,[0x5b9300]
IMUL RCX,RCX,0x38
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LAB_00164ecd:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0x20]
XOR ECX,ECX
MOV R8D,0x1
CALL 0x00164f60
CMP dword ptr [RBP + -0x28],0x0
JZ 0x00164f50
MOV RAX,qword ptr [RBP + -0x30]
TEST byte ptr [RAX + 0x30],0x1
JZ 0x00164f33
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RAX + 0x20]
LEA RSI,[0x26d241]
MOV AL,0x0
CALL 0x00160be0
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00160460
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x18],RCX
LAB_00164f33:
JMP 0x00164f35
LAB_00164f35:
JMP 0x00164f37
LAB_00164f37:
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX + 0x10]
MOV EDX,0x1
CALL 0x001605d0
LAB_00164f50:
JMP 0x00164f52
LAB_00164f52:
JMP 0x00164f54
LAB_00164f54:
ADD RSP,0x30
POP RBP
RET
|
/* var_set(char const*, char const*, char const*, char const*) */
void var_set(char *param_1,char *param_2,char *param_3,char *param_4)
{
char cVar1;
int iVar2;
size_t sVar3;
VAR *local_38;
char *local_28;
char *local_20;
char *local_18;
char *local_10;
cVar1 = *param_1;
local_10 = param_1;
if (cVar1 == '$') {
local_10 = param_1 + 1;
}
iVar2 = *local_10 + -0x30;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
if ((iVar2 < 10) && (-1 < iVar2)) {
local_38 = (VAR *)(var_reg + (long)iVar2 * 0x38);
}
else {
local_38 = (VAR *)var_obtain(local_10,(int)param_2 - (int)local_10);
}
eval_expr(local_38,local_20,&local_28,false,true);
if (cVar1 != '$') {
if (((byte)local_38[0x30] & 1) != 0) {
sprintf(*(char **)(local_38 + 0x10),"%d",(ulong)*(uint *)(local_38 + 0x20));
local_38[0x30] = (VAR)0x0;
sVar3 = strlen(*(char **)(local_38 + 0x10));
*(size_t *)(local_38 + 0x18) = sVar3;
}
setenv(*(char **)local_38,*(char **)(local_38 + 0x10),1);
}
return;
}
| |
26,740 | my_convert | eloqsql/strings/ctype.c | uint32
my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs,
const char *from, uint32 from_length,
CHARSET_INFO *from_cs, uint *errors)
{
uint32 length, length2;
/*
If any of the character sets is not ASCII compatible,
immediately switch to slow mb_wc->wc_mb method.
*/
if ((to_cs->state | from_cs->state) & MY_CS_NONASCII)
return my_convert_using_func(to, to_length,
to_cs, to_cs->cset->wc_mb,
from, from_length,
from_cs, from_cs->cset->mb_wc,
errors);
length= length2= MY_MIN(to_length, from_length);
#if defined(__i386__) || defined(__x86_64__)
/*
Special loop for i386, it allows to refer to a
non-aligned memory block as UINT32, which makes
it possible to copy four bytes at once. This
gives about 10% performance improvement comparing
to byte-by-byte loop.
*/
for ( ; length >= 4; length-= 4, from+= 4, to+= 4)
{
if ((*(uint32*)from) & 0x80808080)
break;
*((uint32*) to)= *((const uint32*) from);
}
#endif /* __i386__ */
for (; ; *to++= *from++, length--)
{
if (!length)
{
*errors= 0;
return length2;
}
if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */
{
uint32 copied_length= length2 - length;
to_length-= copied_length;
from_length-= copied_length;
return copied_length + my_convert_using_func(to, to_length, to_cs,
to_cs->cset->wc_mb,
from, from_length, from_cs,
from_cs->cset->mb_wc,
errors);
}
}
DBUG_ASSERT(FALSE); // Should never get to here
return 0; // Make compiler happy
} | O3 | c | my_convert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rax
movl %r8d, %r9d
movq %rcx, %r8
movq 0x10(%rbp), %r10
movl 0xc(%rax), %ecx
orl 0xc(%rdx), %ecx
btl $0xd, %ecx
jb 0x75504
cmpl %r9d, %esi
movl %r9d, %ebx
cmovbl %esi, %ebx
movl %ebx, %ecx
cmpl $0x4, %ebx
jb 0x754dd
movl (%r8), %r11d
testl $0x80808080, %r11d # imm = 0x80808080
jne 0x754e1
movl %r11d, (%rdi)
addl $-0x4, %ecx
addq $0x4, %r8
addq $0x4, %rdi
cmpl $0x3, %ecx
ja 0x754be
testl %ecx, %ecx
je 0x754fb
movl %ecx, %r14d
xorl %r15d, %r15d
movb (%r8,%r15), %cl
testb %cl, %cl
js 0x75531
movb %cl, (%rdi,%r15)
incq %r15
cmpl %r15d, %r14d
jne 0x754e7
movl $0x0, (%r10)
jmp 0x75576
movl %esi, %esi
movq 0xb8(%rdx), %rcx
movq 0x30(%rcx), %rcx
movl %r9d, %r9d
movq 0xb8(%rax), %r11
subq $0x8, %rsp
pushq %r10
pushq 0x28(%r11)
pushq %rax
callq 0x75393
addq $0x28, %rsp
jmp 0x7557c
addl %r14d, %esi
subl %ebx, %esi
subl %r15d, %esi
addl %r14d, %r9d
subl %ebx, %r9d
subl %r15d, %r9d
movq 0xb8(%rdx), %rcx
movq 0x30(%rcx), %rcx
movq 0xb8(%rax), %r11
addq %r15, %rdi
addq %r15, %r8
subq $0x8, %rsp
pushq %r10
pushq 0x28(%r11)
pushq %rax
callq 0x75393
addq $0x20, %rsp
subl %r14d, %ebx
addl %r15d, %ebx
addl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_convert:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rax, r9
mov r9d, r8d
mov r8, rcx
mov r10, [rbp+arg_0]
mov ecx, [rax+0Ch]
or ecx, [rdx+0Ch]
bt ecx, 0Dh
jb short loc_75504
cmp esi, r9d
mov ebx, r9d
cmovb ebx, esi
mov ecx, ebx
cmp ebx, 4
jb short loc_754DD
loc_754BE:
mov r11d, [r8]
test r11d, 80808080h
jnz short loc_754E1
mov [rdi], r11d
add ecx, 0FFFFFFFCh
add r8, 4
add rdi, 4
cmp ecx, 3
ja short loc_754BE
loc_754DD:
test ecx, ecx
jz short loc_754FB
loc_754E1:
mov r14d, ecx
xor r15d, r15d
loc_754E7:
mov cl, [r8+r15]
test cl, cl
js short loc_75531
mov [rdi+r15], cl
inc r15
cmp r14d, r15d
jnz short loc_754E7
loc_754FB:
mov dword ptr [r10], 0
jmp short loc_75576
loc_75504:
mov esi, esi
mov rcx, [rdx+0B8h]
mov rcx, [rcx+30h]
mov r9d, r9d
mov r11, [rax+0B8h]
sub rsp, 8
push r10
push qword ptr [r11+28h]
push rax
call my_convert_using_func
add rsp, 28h
jmp short loc_7557C
loc_75531:
add esi, r14d
sub esi, ebx
sub esi, r15d
add r9d, r14d
sub r9d, ebx
sub r9d, r15d
mov rcx, [rdx+0B8h]
mov rcx, [rcx+30h]
mov r11, [rax+0B8h]
add rdi, r15
add r8, r15
sub rsp, 8
push r10
push qword ptr [r11+28h]
push rax
call my_convert_using_func
add rsp, 20h
sub ebx, r14d
add ebx, r15d
add ebx, eax
loc_75576:
mov eax, ebx
add rsp, 8
loc_7557C:
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_convert(
_DWORD *a1,
unsigned int a2,
long long a3,
long long a4,
unsigned int a5,
long long a6,
_DWORD *a7)
{
_DWORD *v9; // r8
unsigned int v10; // ebx
unsigned int v11; // ecx
unsigned int v12; // r14d
long long v13; // r15
char v14; // cl
v9 = (_DWORD *)a4;
if ( ((*(_DWORD *)(a3 + 12) | *(_DWORD *)(a6 + 12)) & 0x2000) != 0 )
return my_convert_using_func(
(long long)a1,
a2,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
a4,
a5,
a6,
*(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7);
v10 = a5;
if ( a2 < a5 )
v10 = a2;
v11 = v10;
if ( v10 >= 4 )
{
while ( (*v9 & 0x80808080) == 0 )
{
*a1 = *v9;
v11 -= 4;
++v9;
++a1;
if ( v11 <= 3 )
goto LABEL_7;
}
goto LABEL_8;
}
LABEL_7:
if ( v11 )
{
LABEL_8:
v12 = v11;
v13 = 0LL;
do
{
v14 = *((_BYTE *)v9 + v13);
if ( v14 < 0 )
return (unsigned int)my_convert_using_func(
(long long)a1 + v13,
v12 + a2 - v10 - (unsigned int)v13,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184)
+ 48LL),
(long long)v9 + v13,
v12 + a5 - v10 - (unsigned int)v13,
a6,
*(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7)
+ (_DWORD)v13
+ v10
- v12;
*((_BYTE *)a1 + v13++) = v14;
}
while ( v12 != (_DWORD)v13 );
}
*a7 = 0;
return v10;
}
| my_convert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,R9
MOV R9D,R8D
MOV R8,RCX
MOV R10,qword ptr [RBP + 0x10]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,dword ptr [RDX + 0xc]
BT ECX,0xd
JC 0x00175504
CMP ESI,R9D
MOV EBX,R9D
CMOVC EBX,ESI
MOV ECX,EBX
CMP EBX,0x4
JC 0x001754dd
LAB_001754be:
MOV R11D,dword ptr [R8]
TEST R11D,0x80808080
JNZ 0x001754e1
MOV dword ptr [RDI],R11D
ADD ECX,-0x4
ADD R8,0x4
ADD RDI,0x4
CMP ECX,0x3
JA 0x001754be
LAB_001754dd:
TEST ECX,ECX
JZ 0x001754fb
LAB_001754e1:
MOV R14D,ECX
XOR R15D,R15D
LAB_001754e7:
MOV CL,byte ptr [R8 + R15*0x1]
TEST CL,CL
JS 0x00175531
MOV byte ptr [RDI + R15*0x1],CL
INC R15
CMP R14D,R15D
JNZ 0x001754e7
LAB_001754fb:
MOV dword ptr [R10],0x0
JMP 0x00175576
LAB_00175504:
MOV ESI,ESI
MOV RCX,qword ptr [RDX + 0xb8]
MOV RCX,qword ptr [RCX + 0x30]
MOV R9D,R9D
MOV R11,qword ptr [RAX + 0xb8]
SUB RSP,0x8
PUSH R10
PUSH qword ptr [R11 + 0x28]
PUSH RAX
CALL 0x00175393
ADD RSP,0x28
JMP 0x0017557c
LAB_00175531:
ADD ESI,R14D
SUB ESI,EBX
SUB ESI,R15D
ADD R9D,R14D
SUB R9D,EBX
SUB R9D,R15D
MOV RCX,qword ptr [RDX + 0xb8]
MOV RCX,qword ptr [RCX + 0x30]
MOV R11,qword ptr [RAX + 0xb8]
ADD RDI,R15
ADD R8,R15
SUB RSP,0x8
PUSH R10
PUSH qword ptr [R11 + 0x28]
PUSH RAX
CALL 0x00175393
ADD RSP,0x20
SUB EBX,R14D
ADD EBX,R15D
ADD EBX,EAX
LAB_00175576:
MOV EAX,EBX
ADD RSP,0x8
LAB_0017557c:
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6,
int4 *param_7)
{
int iVar1;
ulong uVar2;
uint uVar3;
uint uVar5;
int iVar6;
long lVar7;
ulong uVar4;
uVar2 = (ulong)param_5;
if (((*(uint *)(param_6 + 0xc) | *(uint *)(param_3 + 0xc)) >> 0xd & 1) == 0) {
if (param_2 < param_5) {
uVar2 = (ulong)param_2;
}
uVar5 = (uint)uVar2;
uVar3 = uVar5;
uVar4 = uVar2;
while (3 < uVar3) {
uVar3 = (uint)uVar4;
if ((*param_4 & 0x80808080) != 0) goto LAB_001754e1;
*param_1 = *param_4;
uVar3 = uVar3 - 4;
uVar4 = (ulong)uVar3;
param_4 = param_4 + 1;
param_1 = param_1 + 1;
}
if (uVar3 != 0) {
LAB_001754e1:
lVar7 = 0;
do {
if (*(char *)((long)param_4 + lVar7) < '\0') {
iVar6 = (int)lVar7;
iVar1 = my_convert_using_func
((long)param_1 + lVar7,((param_2 + uVar3) - uVar5) - iVar6,param_3,
*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),(long)param_4 + lVar7
,((param_5 + uVar3) - uVar5) - iVar6,param_6,
*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),param_7);
return (ulong)((uVar5 - uVar3) + iVar6 + iVar1);
}
*(char *)((long)param_1 + lVar7) = *(char *)((long)param_4 + lVar7);
lVar7 = lVar7 + 1;
} while (uVar3 != (uint)lVar7);
}
*param_7 = 0;
}
else {
uVar2 = my_convert_using_func
(param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),
param_4,uVar2,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),
param_7);
}
return uVar2;
}
| |
26,741 | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<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>>>>::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | hkr04[P]cpp-mcp/common/json.hpp | iterator find(const key_type& key)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O0 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<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>>>>::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x6b590
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rdi
callq 0x6b5c0
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x6b5f0
testb $0x1, %al
jne 0xa62e6
jmp 0xa6326
movq 0x10(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x72130
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x20(%rsp), %rdx
callq 0x72100
testb $0x1, %al
jne 0xa6316
jmp 0xa6318
jmp 0xa6335
jmp 0xa631a
leaq 0x30(%rsp), %rdi
callq 0x6b670
jmp 0xa62c2
movq 0x10(%rsp), %rdi
callq 0x6b5c0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rdi, [rsp+38h+var_10]
mov [rsp+38h+var_28], rdi
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void)
mov [rsp+38h+var_8], rax
loc_A62C2:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov [rsp+38h+var_20], rax
lea rdi, [rsp+38h+var_8]
lea rsi, [rsp+38h+var_20]
call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&)
test al, 1
jnz short loc_A62E6
jmp short loc_A6326
loc_A62E6:
mov rax, [rsp+38h+var_28]
add rax, 18h
mov [rsp+38h+var_30], rax
lea rdi, [rsp+38h+var_8]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void)
mov rdi, [rsp+38h+var_30]
mov rsi, rax
mov rdx, [rsp+38h+var_18]
call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSA_OSB_
test al, 1
jnz short loc_A6316
jmp short loc_A6318
loc_A6316:
jmp short loc_A6335
loc_A6318:
jmp short $+2
loc_A631A:
lea rdi, [rsp+38h+var_8]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator++(void)
jmp short loc_A62C2
loc_A6326:
mov rdi, [rsp+38h+var_28]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov [rsp+38h+var_8], rax
loc_A6335:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<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>,std::less<void>,std::allocator<std::pair<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>>>>::find(
long long a1,
long long a2)
{
long long v2; // rax
long long v4; // [rsp+18h] [rbp-20h] BYREF
long long v5; // [rsp+20h] [rbp-18h]
long long v6; // [rsp+28h] [rbp-10h]
long long i; // [rsp+30h] [rbp-8h] BYREF
v6 = a1;
v5 = a2;
for ( i = std::vector<std::pair<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>>>::begin(a1);
;
__gnu_cxx::__normal_iterator<std::pair<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>> *,std::vector<std::pair<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>>>>::operator++(&i) )
{
v4 = std::vector<std::pair<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>>>::end(a1);
if ( !__gnu_cxx::operator!=<std::pair<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>> *,std::vector<std::pair<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>>>>(
(long long)&i,
(long long)&v4) )
break;
v2 = __gnu_cxx::__normal_iterator<std::pair<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>> *,std::vector<std::pair<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>>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<std::string const&,std::string const&>(a1 + 24, v2, v5) & 1) != 0 )
return i;
}
return std::vector<std::pair<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>>>::end(a1);
}
| find:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RDI,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x0016b590
MOV qword ptr [RSP + 0x30],RAX
LAB_001a62c2:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0016b5c0
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x18]
CALL 0x0016b5f0
TEST AL,0x1
JNZ 0x001a62e6
JMP 0x001a6326
LAB_001a62e6:
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x18
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x30]
CALL 0x00172130
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x00172100
TEST AL,0x1
JNZ 0x001a6316
JMP 0x001a6318
LAB_001a6316:
JMP 0x001a6335
LAB_001a6318:
JMP 0x001a631a
LAB_001a631a:
LEA RDI,[RSP + 0x30]
CALL 0x0016b670
JMP 0x001a62c2
LAB_001a6326:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0016b5c0
MOV qword ptr [RSP + 0x30],RAX
LAB_001a6335:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<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>, std::less<void>, std::allocator<std::pair<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> > > >::find(std::__cxx11::string const&) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<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>,std::less<void>,std::allocator<std::pair<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>>>>
::find(ordered_map<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>,std::less<void>,std::allocator<std::pair<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>>>>
*this,string *param_1)
{
bool bVar1;
string *psVar2;
ulong uVar3;
int8 uVar4;
int8 local_20;
string *local_18;
ordered_map<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>,std::less<void>,std::allocator<std::pair<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>>>>
*local_10;
int8 local_8;
local_18 = param_1;
local_10 = this;
local_8 = std::
vector<std::pair<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>>,std::allocator<std::pair<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>>>>
::begin((vector<std::pair<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>>,std::allocator<std::pair<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>>>>
*)this);
while( true ) {
local_20 = std::
vector<std::pair<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>>,std::allocator<std::pair<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>>>>
::end((vector<std::pair<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>>,std::allocator<std::pair<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>>>>
*)this);
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_8,(__normal_iterator *)&local_20);
if (!bVar1) {
uVar4 = std::
vector<std::pair<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>>,std::allocator<std::pair<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>>>>
::end((vector<std::pair<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>>,std::allocator<std::pair<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>>>>
*)this);
return uVar4;
}
psVar2 = (string *)
__gnu_cxx::
__normal_iterator<std::pair<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>>*,std::vector<std::pair<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>>,std::allocator<std::pair<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>>>>>
::operator->((__normal_iterator<std::pair<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>>*,std::vector<std::pair<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>>,std::allocator<std::pair<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>>>>>
*)&local_8);
uVar3 = std::equal_to<void>::operator()((equal_to<void> *)(this + 0x18),psVar2,local_18);
if ((uVar3 & 1) != 0) break;
__gnu_cxx::
__normal_iterator<std::pair<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>>*,std::vector<std::pair<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>>,std::allocator<std::pair<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>>>>>
::operator++((__normal_iterator<std::pair<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>>*,std::vector<std::pair<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>>,std::allocator<std::pair<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>>>>>
*)&local_8);
}
return local_8;
}
| |
26,742 | strmake_root | eloqsql/mysys/my_alloc.c | char *strmake_root(MEM_ROOT *root, const char *str, size_t len)
{
char *pos;
if ((pos=alloc_root(root,len+1)))
{
if (len)
memcpy(pos,str,len);
pos[len]=0;
}
return pos;
} | O0 | c | strmake_root:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
callq 0xf4f90
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xf5893
cmpq $0x0, -0x18(%rbp)
je 0xf5887
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x29090
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| strmake_root:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
add rsi, 1
call alloc_root
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_F5893
cmp [rbp+var_18], 0
jz short loc_F5887
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _memcpy
loc_F5887:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_F5893:
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
| char * strmake_root(_QWORD **a1, long long a2, long long a3)
{
char *v4; // [rsp+0h] [rbp-20h]
v4 = alloc_root(a1, a3 + 1);
if ( v4 )
{
if ( a3 )
memcpy(v4, a2, a3);
v4[a3] = 0;
}
return v4;
}
| strmake_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
CALL 0x001f4f90
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x001f5893
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001f5887
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00129090
LAB_001f5887:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001f5893:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
void * strmake_root(int8 param_1,void *param_2,size_t param_3)
{
void *__dest;
__dest = (void *)alloc_root(param_1,param_3 + 1);
if (__dest != (void *)0x0) {
if (param_3 != 0) {
memcpy(__dest,param_2,param_3);
}
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
| |
26,743 | ma_keyseg_write | eloqsql/storage/maria/ma_open.c | my_bool _ma_keyseg_write(File file, const HA_KEYSEG *keyseg)
{
uchar buff[HA_KEYSEG_SIZE];
uchar *ptr=buff;
ulong pos;
*ptr++= keyseg->type;
*ptr++= keyseg->language & 0xFF; /* Collation ID, low byte */
*ptr++= keyseg->null_bit;
*ptr++= keyseg->bit_start;
*ptr++= keyseg->language >> 8; /* Collation ID, high byte */
*ptr++= keyseg->bit_length;
mi_int2store(ptr,keyseg->flag); ptr+= 2;
mi_int2store(ptr,keyseg->length); ptr+= 2;
mi_int4store(ptr,keyseg->start); ptr+= 4;
pos= keyseg->null_bit ? keyseg->null_pos : keyseg->bit_pos;
mi_int4store(ptr, pos);
ptr+=4;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O3 | c | ma_keyseg_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movl %edi, %ebx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movb 0x18(%rsi), %al
movb %al, -0x30(%rbp)
movzwl 0x16(%rsi), %eax
movb %al, -0x2f(%rbp)
movb 0x19(%rsi), %cl
movb %cl, -0x2e(%rbp)
movb 0x1a(%rsi), %dl
movb %dl, -0x2d(%rbp)
movb %ah, -0x2c(%rbp)
movb 0x1b(%rsi), %al
movb %al, -0x2b(%rbp)
movzwl 0x12(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x2a(%rbp)
movzwl 0x14(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x28(%rbp)
movl 0x8(%rsi), %eax
bswapl %eax
movl %eax, -0x26(%rbp)
testb %cl, %cl
je 0x357ac
movl 0xc(%rsi), %eax
jmp 0x357b0
movzwl 0x10(%rsi), %eax
bswapl %eax
movl %eax, -0x22(%rbp)
leaq 0x351894(%rip), %rax # 0x387050
movq (%rax), %rax
leaq -0x80(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x35808
leaq -0x30(%rbp), %rsi
movl $0x12, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2f2e4
testq %rax, %rax
setne %al
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x35822
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x29bdb
movq (%r14), %rax
jmp 0x357ea
callq 0x29220
| _ma_keyseg_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 70h
mov ebx, edi
mov rax, fs:28h
mov [rbp+var_18], rax
mov al, [rsi+18h]
mov [rbp+var_30], al
movzx eax, word ptr [rsi+16h]
mov [rbp+var_2F], al
mov cl, [rsi+19h]
mov [rbp+var_2E], cl
mov dl, [rsi+1Ah]
mov [rbp+var_2D], dl
mov [rbp+var_2C], ah
mov al, [rsi+1Bh]
mov [rbp+var_2B], al
movzx eax, word ptr [rsi+12h]
rol ax, 8
mov [rbp+var_2A], ax
movzx eax, word ptr [rsi+14h]
rol ax, 8
mov [rbp+var_28], ax
mov eax, [rsi+8]
bswap eax
mov [rbp+var_26], eax
test cl, cl
jz short loc_357AC
mov eax, [rsi+0Ch]
jmp short loc_357B0
loc_357AC:
movzx eax, word ptr [rsi+10h]
loc_357B0:
bswap eax
mov [rbp+var_22], eax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_80]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_35808
lea rsi, [rbp+var_30]
mov edx, 12h
mov ecx, 4
mov edi, ebx
call my_write
loc_357EA:
test rax, rax
setnz al
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_35822
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
loc_35808:
lea rdx, [rbp+var_30]
lea r14, [rbp+var_38]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call _ma_keyseg_write_cold_1
mov rax, [r14]
jmp short loc_357EA
loc_35822:
call ___stack_chk_fail
| bool ma_keyseg_write(unsigned int a1, long long a2)
{
__int16 v2; // ax
unsigned int v3; // eax
long long v4; // rax
long long v5; // rax
_BYTE v7[72]; // [rsp+0h] [rbp-80h] BYREF
long long v8; // [rsp+48h] [rbp-38h] BYREF
_BYTE v9[2]; // [rsp+50h] [rbp-30h] BYREF
char v10; // [rsp+52h] [rbp-2Eh]
char v11; // [rsp+53h] [rbp-2Dh]
char v12; // [rsp+54h] [rbp-2Ch]
char v13; // [rsp+55h] [rbp-2Bh]
__int16 v14; // [rsp+56h] [rbp-2Ah]
__int16 v15; // [rsp+58h] [rbp-28h]
unsigned __int32 v16; // [rsp+5Ah] [rbp-26h]
unsigned __int32 v17; // [rsp+5Eh] [rbp-22h]
unsigned long long v18; // [rsp+68h] [rbp-18h]
v18 = __readfsqword(0x28u);
v9[0] = *(_BYTE *)(a2 + 24);
v2 = *(_WORD *)(a2 + 22);
v9[1] = v2;
v10 = *(_BYTE *)(a2 + 25);
v11 = *(_BYTE *)(a2 + 26);
v12 = HIBYTE(v2);
v13 = *(_BYTE *)(a2 + 27);
v14 = __ROL2__(*(_WORD *)(a2 + 18), 8);
v15 = __ROL2__(*(_WORD *)(a2 + 20), 8);
v16 = _byteswap_ulong(*(_DWORD *)(a2 + 8));
if ( v10 )
v3 = *(_DWORD *)(a2 + 12);
else
v3 = *(unsigned __int16 *)(a2 + 16);
v17 = _byteswap_ulong(v3);
v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a1, 7LL);
if ( v4 )
{
ma_keyseg_write_cold_1(v4, a1, (long long)v9, &v8);
v5 = v8;
}
else
{
v5 = my_write(a1, (long long)v9, 18LL, 4LL);
}
return v5 != 0;
}
| _ma_keyseg_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV EBX,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV AL,byte ptr [RSI + 0x18]
MOV byte ptr [RBP + -0x30],AL
MOVZX EAX,word ptr [RSI + 0x16]
MOV byte ptr [RBP + -0x2f],AL
MOV CL,byte ptr [RSI + 0x19]
MOV byte ptr [RBP + -0x2e],CL
MOV DL,byte ptr [RSI + 0x1a]
MOV byte ptr [RBP + -0x2d],DL
MOV byte ptr [RBP + -0x2c],AH
MOV AL,byte ptr [RSI + 0x1b]
MOV byte ptr [RBP + -0x2b],AL
MOVZX EAX,word ptr [RSI + 0x12]
ROL AX,0x8
MOV word ptr [RBP + -0x2a],AX
MOVZX EAX,word ptr [RSI + 0x14]
ROL AX,0x8
MOV word ptr [RBP + -0x28],AX
MOV EAX,dword ptr [RSI + 0x8]
BSWAP EAX
MOV dword ptr [RBP + -0x26],EAX
TEST CL,CL
JZ 0x001357ac
MOV EAX,dword ptr [RSI + 0xc]
JMP 0x001357b0
LAB_001357ac:
MOVZX EAX,word ptr [RSI + 0x10]
LAB_001357b0:
BSWAP EAX
MOV dword ptr [RBP + -0x22],EAX
LEA RAX,[0x487050]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x80]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00135808
LEA RSI,[RBP + -0x30]
MOV EDX,0x12
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012f2e4
LAB_001357ea:
TEST RAX,RAX
SETNZ AL
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x00135822
ADD RSP,0x70
POP RBX
POP R14
POP RBP
RET
LAB_00135808:
LEA RDX,[RBP + -0x30]
LEA R14,[RBP + -0x38]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x00129bdb
MOV RAX,qword ptr [R14]
JMP 0x001357ea
LAB_00135822:
CALL 0x00129220
|
bool _ma_keyseg_write(int4 param_1,long param_2)
{
uint uVar1;
long lVar2;
long in_FS_OFFSET;
int1 local_88 [72];
long local_40;
int1 local_38;
int1 local_37;
char local_36;
int1 local_35;
int1 local_34;
int1 local_33;
ushort local_32;
ushort local_30;
uint local_2e;
uint local_2a;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_38 = *(int1 *)(param_2 + 0x18);
local_37 = (int1)*(int2 *)(param_2 + 0x16);
local_36 = *(char *)(param_2 + 0x19);
local_35 = *(int1 *)(param_2 + 0x1a);
local_34 = (int1)((ushort)*(int2 *)(param_2 + 0x16) >> 8);
local_33 = *(int1 *)(param_2 + 0x1b);
local_32 = *(ushort *)(param_2 + 0x12) << 8 | *(ushort *)(param_2 + 0x12) >> 8;
local_30 = *(ushort *)(param_2 + 0x14) << 8 | *(ushort *)(param_2 + 0x14) >> 8;
uVar1 = *(uint *)(param_2 + 8);
local_2e = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
if (local_36 == '\0') {
uVar1 = (uint)*(ushort *)(param_2 + 0x10);
}
else {
uVar1 = *(uint *)(param_2 + 0xc);
}
local_2a = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
lVar2 = (**(code **)(PSI_server + 0x158))(local_88,param_1,7);
if (lVar2 == 0) {
local_40 = my_write(param_1,&local_38,0x12,4);
}
else {
_ma_keyseg_write_cold_1(lVar2,param_1,&local_38,&local_40);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_40 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
26,744 | js_iterator_helper_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_iterator_helper_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p = JS_VALUE_GET_OBJ(val);
JSIteratorHelperData *it = p->u.iterator_helper_data;
if (it) {
JS_FreeValueRT(rt, it->obj);
JS_FreeValueRT(rt, it->func);
JS_FreeValueRT(rt, it->next);
JS_FreeValueRT(rt, it->inner);
js_free_rt(rt, it);
}
} | O0 | c | js_iterator_helper_finalizer:
subq $0x28, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x61e56
movq 0x10(%rsp), %rdi
movq (%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x2a000
movq 0x10(%rsp), %rdi
movq (%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
callq 0x2a000
movq 0x10(%rsp), %rdi
movq (%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
callq 0x2a000
movq 0x10(%rsp), %rdi
movq (%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
callq 0x2a000
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x27c50
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| js_iterator_helper_finalizer:
sub rsp, 28h
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_8], rdx
mov [rsp+28h+var_18], rdi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
mov rax, [rax+30h]
mov [rsp+28h+var_28], rax
cmp [rsp+28h+var_28], 0
jz short loc_61E56
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValueRT
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov rsi, [rax+20h]
mov rdx, [rax+28h]
call JS_FreeValueRT
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
call JS_FreeValueRT
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov rsi, [rax+30h]
mov rdx, [rax+38h]
call JS_FreeValueRT
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_28]
call js_free_rt
loc_61E56:
add rsp, 28h
retn
| void js_iterator_helper_finalizer(long long a1, long long a2)
{
long long v2; // [rsp+0h] [rbp-28h]
v2 = *(_QWORD *)(a2 + 48);
if ( v2 )
{
JS_FreeValueRT(a1, *(_DWORD **)v2, *(_QWORD *)(v2 + 8));
JS_FreeValueRT(a1, *(_DWORD **)(v2 + 32), *(_QWORD *)(v2 + 40));
JS_FreeValueRT(a1, *(_DWORD **)(v2 + 16), *(_QWORD *)(v2 + 24));
JS_FreeValueRT(a1, *(_DWORD **)(v2 + 48), *(_QWORD *)(v2 + 56));
js_free_rt(a1, v2);
}
}
| js_iterator_helper_finalizer:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JZ 0x00161e56
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0012a000
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RAX + 0x28]
CALL 0x0012a000
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x0012a000
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX + 0x30]
MOV RDX,qword ptr [RAX + 0x38]
CALL 0x0012a000
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP]
CALL 0x00127c50
LAB_00161e56:
ADD RSP,0x28
RET
|
void js_iterator_helper_finalizer(int8 param_1,long param_2)
{
int8 *puVar1;
puVar1 = *(int8 **)(param_2 + 0x30);
if (puVar1 != (int8 *)0x0) {
JS_FreeValueRT(param_1,*puVar1,puVar1[1]);
JS_FreeValueRT(param_1,puVar1[4],puVar1[5]);
JS_FreeValueRT(param_1,puVar1[2],puVar1[3]);
JS_FreeValueRT(param_1,puVar1[6],puVar1[7]);
js_free_rt(param_1,puVar1);
}
return;
}
| |
26,745 | js_iterator_helper_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_iterator_helper_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p = JS_VALUE_GET_OBJ(val);
JSIteratorHelperData *it = p->u.iterator_helper_data;
if (it) {
JS_FreeValueRT(rt, it->obj);
JS_FreeValueRT(rt, it->func);
JS_FreeValueRT(rt, it->next);
JS_FreeValueRT(rt, it->inner);
js_free_rt(rt, it);
}
} | O2 | c | js_iterator_helper_finalizer:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rsi), %rbx
testq %rbx, %rbx
je 0x37a78
movq %rdi, %r14
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x1bbe1
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbe1
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbe1
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
movq %r14, %rdi
callq 0x1bbe1
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1ac7b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_iterator_helper_finalizer:
push r14
push rbx
push rax
mov rbx, [rsi+30h]
test rbx, rbx
jz short loc_37A78
mov r14, rdi
mov rsi, [rbx]
mov rdx, [rbx+8]
call JS_FreeValueRT
mov rsi, [rbx+20h]
mov rdx, [rbx+28h]
mov rdi, r14
call JS_FreeValueRT
mov rsi, [rbx+10h]
mov rdx, [rbx+18h]
mov rdi, r14
call JS_FreeValueRT
mov rsi, [rbx+30h]
mov rdx, [rbx+38h]
mov rdi, r14
call JS_FreeValueRT
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp js_free_rt
loc_37A78:
add rsp, 8
pop rbx
pop r14
retn
| long long js_iterator_helper_finalizer(long long a1, long long a2)
{
long long v2; // rbx
long long result; // rax
v2 = *(_QWORD *)(a2 + 48);
if ( v2 )
{
JS_FreeValueRT(a1, *(unsigned int **)v2, *(_QWORD *)(v2 + 8));
JS_FreeValueRT(a1, *(unsigned int **)(v2 + 32), *(_QWORD *)(v2 + 40));
JS_FreeValueRT(a1, *(unsigned int **)(v2 + 16), *(_QWORD *)(v2 + 24));
JS_FreeValueRT(a1, *(unsigned int **)(v2 + 48), *(_QWORD *)(v2 + 56));
return js_free_rt(a1, v2);
}
return result;
}
| js_iterator_helper_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RSI + 0x30]
TEST RBX,RBX
JZ 0x00137a78
MOV R14,RDI
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
CALL 0x0011bbe1
MOV RSI,qword ptr [RBX + 0x20]
MOV RDX,qword ptr [RBX + 0x28]
MOV RDI,R14
CALL 0x0011bbe1
MOV RSI,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x18]
MOV RDI,R14
CALL 0x0011bbe1
MOV RSI,qword ptr [RBX + 0x30]
MOV RDX,qword ptr [RBX + 0x38]
MOV RDI,R14
CALL 0x0011bbe1
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0011ac7b
LAB_00137a78:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_iterator_helper_finalizer(int8 param_1,long param_2)
{
int8 *puVar1;
puVar1 = *(int8 **)(param_2 + 0x30);
if (puVar1 != (int8 *)0x0) {
JS_FreeValueRT(param_1,*puVar1,puVar1[1]);
JS_FreeValueRT(param_1,puVar1[4],puVar1[5]);
JS_FreeValueRT(param_1,puVar1[2],puVar1[3]);
JS_FreeValueRT(param_1,puVar1[6],puVar1[7]);
js_free_rt(param_1,puVar1);
return;
}
return;
}
| |
26,746 | nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&) | ng-log[P]ng-log/src/logging.cc | LogMessage::LogMessage(const char* file, int line,
const internal::CheckOpString& result)
: allocated_(nullptr) {
Init(file, line, NGLOG_FATAL, &LogMessage::SendToLog);
stream() << "Check failed: " << (*result.str_) << " ";
} | O3 | cpp | nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, (%rdi)
addq $0x10, %rdi
callq 0xf28a
leaq 0x63(%rip), %r8 # 0xb0ea
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0xaa02
movl $0x7538, %r14d # imm = 0x7538
addq 0x8(%r15), %r14
leaq 0x187e5(%rip), %rsi # 0x23892
movl $0xe, %edx
movq %r14, %rdi
callq 0x7600
movq (%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x7600
leaq 0x19ebb(%rip), %rsi # 0x24f8e
movl $0x1, %edx
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x7600
| _ZN5nglog10LogMessageC2EPKciRKNS_8internal13CheckOpStringE:
push rbp; Alternative name is 'nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&)'
push r15
push r14
push rbx
push rax
mov rbx, rcx
mov ebp, edx
mov r14, rsi
mov r15, rdi
mov qword ptr [rdi], 0
add rdi, 10h; this
call _ZN5nglog14LogMessageTimeC2Ev; nglog::LogMessageTime::LogMessageTime(void)
lea r8, _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
mov rdi, r15
mov rsi, r14
mov edx, ebp
mov ecx, 3
xor r9d, r9d
call _ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE; nglog::LogMessage::Init(char const*,int,nglog::LogSeverity,void (nglog::LogMessage::*)(void))
mov r14d, 7538h
add r14, [r15+8]
lea rsi, aCheckFailed; "Check failed: "
mov edx, 0Eh
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rsi, [rax]
mov rdx, [rax+8]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_24F8B+3; " "
mov edx, 1
mov rdi, rax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
| long long nglog::LogMessage::LogMessage(_QWORD *a1, nglog::tools *a2, int a3, _QWORD **a4)
{
long long v6; // r14
long long v7; // rax
*a1 = 0LL;
nglog::LogMessageTime::LogMessageTime((nglog::LogMessageTime *)(a1 + 2));
nglog::LogMessage::Init((long long)a1, a2, a3, 3, (long long)nglog::LogMessage::SendToLog, 0LL);
v6 = a1[1] + 30008LL;
std::__ostream_insert<char,std::char_traits<char>>(v6, "Check failed: ", 14LL);
v7 = std::__ostream_insert<char,std::char_traits<char>>(v6, **a4, (*a4)[1]);
return std::__ostream_insert<char,std::char_traits<char>>(v7, " ", 1LL);
}
| LogMessage:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV EBP,EDX
MOV R14,RSI
MOV R15,RDI
MOV qword ptr [RDI],0x0
ADD RDI,0x10
CALL 0x0010f28a
LEA R8,[0x10b0ea]
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
MOV ECX,0x3
XOR R9D,R9D
CALL 0x0010aa02
MOV R14D,0x7538
ADD R14,qword ptr [R15 + 0x8]
LEA RSI,[0x123892]
MOV EDX,0xe
MOV RDI,R14
CALL 0x00107600
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,R14
CALL 0x00107600
LEA RSI,[0x124f8e]
MOV EDX,0x1
MOV RDI,RAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00107600
|
/* nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&) */
void __thiscall
nglog::LogMessage::LogMessage(LogMessage *this,char *param_1,int param_2,CheckOpString *param_3)
{
long lVar1;
ostream *poVar2;
*(int8 *)this = 0;
LogMessageTime::LogMessageTime((LogMessageTime *)(this + 0x10));
Init(this,param_1,param_2,3,SendToLog,0);
lVar1 = *(long *)(this + 8);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),"Check failed: ",0xe);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),(char *)**(int8 **)param_3,
(*(int8 **)param_3)[1]);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," ",1);
return;
}
| |
26,747 | 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>::push_back(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>) | monkey531[P]llama/common/json.hpp | void push_back(initializer_list_t init)
{
if (is_object() && init.size() == 2 && (*init.begin())->is_string())
{
basic_json&& key = init.begin()->moved_or_copied();
push_back(typename object_t::value_type(
std::move(key.get_ref<string_t&>()), (init.begin() + 1)->moved_or_copied()));
}
else
{
push_back(basic_json(init));
}
} | 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>::push_back(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, (%rdi)
sete %al
cmpq $0x2, %rdx
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x64a75
movq 0x10(%r14), %rax
testq %rax, %rax
cmoveq %r14, %rax
cmpb $0x3, (%rax)
jne 0x64a75
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x85f46
movq %r15, %rdi
callq 0x9a6dc
movq %rax, %r15
addq $0x18, %r14
movq %rsp, %rdi
movq %r14, %rsi
callq 0x85f46
leaq 0x20(%rsp), %r14
movq %rsp, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x9a31e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9a22c
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x28fd0
movq %rbx, %rdi
callq 0x2e790
movq -0x20(%rbx), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x64a59
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x196b0
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x28fd0
movq %rbx, %rdi
callq 0x2e790
leaq 0x10(%rsp), %rbx
jmp 0x64aa0
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %ecx
movl $0x2, %r8d
callq 0x64f54
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9a394
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x28fd0
movq %rbx, %rdi
callq 0x2e790
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6d2e4
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x28fd0
movq %r14, %rdi
callq 0x2e790
jmp 0x64ae5
jmp 0x64ae2
movq %rax, %rbx
leaq 0x10(%rsp), %r14
jmp 0x64af4
movq %rax, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x28fd0
movq %r14, %rdi
callq 0x2e790
movq %rbx, %rdi
callq 0x19be0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backESt16initializer_listINS0_6detail8json_refISD_EEE:
push r15
push r14
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
cmp byte ptr [rdi], 1
setz al
cmp rdx, 2
setz cl
and cl, al
cmp cl, 1
jnz loc_64A75
mov rax, [r14+10h]
test rax, rax
cmovz rax, r14
cmp byte ptr [rax], 3
jnz loc_64A75
lea r15, [rsp+68h+var_58]
mov rdi, r15
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(void)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_; 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>::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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
mov r15, rax
add r14, 18h
mov rdi, rsp
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(void)
lea r14, [rsp+68h+var_48]
mov rdx, rsp
mov rdi, r14
mov rsi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2IS5_SF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E; 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>::push_back(std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)
lea rbx, [rsp+68h+var_28]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-20h]; void *
lea rax, [rsp+68h+var_38]
cmp rdi, rax
jz short loc_64A59
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_64A59:
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rbx, [rsp+68h+var_58]
jmp short loc_64AA0
loc_64A75:
lea r15, [rsp+68h+var_48]
mov rdi, r15
mov rsi, r14
mov ecx, 1
mov r8d, 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)
mov rdi, rbx
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_; 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>::push_back(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>&&)
lea rbx, [rsp+68h+var_48]
loc_64AA0:
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEED2Ev; std::pair<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~pair()
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_64AE5
jmp short $+2
loc_64AE2:
mov rbx, rax
loc_64AE5:
lea r14, [rsp+arg_8]
jmp short loc_64AF4
mov rbx, rax
lea r14, [rsp+arg_18]
loc_64AF4:
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
_BYTE *a1,
long long a2,
long long a3)
{
_BYTE *v3; // rax
long long v4; // r15
char *v5; // rbx
char v7[16]; // [rsp+0h] [rbp-68h] BYREF
_BYTE v8[16]; // [rsp+10h] [rbp-58h] BYREF
void *v9[2]; // [rsp+20h] [rbp-48h] BYREF
long long v10; // [rsp+30h] [rbp-38h] BYREF
char v11[40]; // [rsp+40h] [rbp-28h] BYREF
if ( *a1 != 1 || a3 != 2 )
goto LABEL_8;
v3 = *(_BYTE **)(a2 + 16);
if ( !v3 )
v3 = (_BYTE *)a2;
if ( *v3 == 3 )
{
nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(
v8,
a2);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::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>>(v8);
nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(
v7,
a2 + 24);
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2IS5_SF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_(
v9,
v4,
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>::push_back(
a1,
v9);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v11);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v11);
if ( v9[0] != &v10 )
operator delete(v9[0], v10 + 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(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>::data::~data(v7);
v5 = v8;
}
else
{
LABEL_8:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v9,
a2,
a3,
1LL,
2LL);
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>::push_back(
a1,
v9);
v5 = (char *)v9;
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v5);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v5);
}
| push_back:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RSI
MOV RBX,RDI
CMP byte ptr [RDI],0x1
SETZ AL
CMP RDX,0x2
SETZ CL
AND CL,AL
CMP CL,0x1
JNZ 0x00164a75
MOV RAX,qword ptr [R14 + 0x10]
TEST RAX,RAX
CMOVZ RAX,R14
CMP byte ptr [RAX],0x3
JNZ 0x00164a75
LEA R15,[RSP + 0x10]
MOV RDI,R15
MOV RSI,R14
CALL 0x00185f46
LAB_001649ef:
MOV RDI,R15
CALL 0x0019a6dc
MOV R15,RAX
ADD R14,0x18
LAB_001649fe:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00185f46
LEA R14,[RSP + 0x20]
MOV RDX,RSP
MOV RDI,R14
MOV RSI,R15
CALL 0x0019a31e
LAB_00164a1c:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0019a22c
LAB_00164a27:
LEA RBX,[RSP + 0x40]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00128fd0
MOV RDI,RBX
CALL 0x0012e790
MOV RDI,qword ptr [RBX + -0x20]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x00164a59
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001196b0
LAB_00164a59:
MOV RBX,RSP
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00128fd0
MOV RDI,RBX
CALL 0x0012e790
LEA RBX,[RSP + 0x10]
JMP 0x00164aa0
LAB_00164a75:
LEA R15,[RSP + 0x20]
MOV RDI,R15
MOV RSI,R14
MOV ECX,0x1
MOV R8D,0x2
CALL 0x00164f54
LAB_00164a90:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0019a394
LAB_00164a9b:
LEA RBX,[RSP + 0x20]
LAB_00164aa0:
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00128fd0
MOV RDI,RBX
CALL 0x0012e790
ADD RSP,0x50
POP RBX
POP R14
POP R15
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>::push_back(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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> > >) */
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>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2,long param_3)
{
char *pcVar1;
string *psVar2;
data *this;
data adStack_68 [16];
basic_json local_58 [16];
long *local_48 [2];
long local_38 [2];
data local_28 [16];
if (param_3 == 2 &&
*param_1 ==
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
pcVar1 = *(char **)(param_2 + 0x10);
if (*(char **)(param_2 + 0x10) == (char *)0x0) {
pcVar1 = param_2;
}
if (*pcVar1 == '\x03') {
detail::
json_ref<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>>
::moved_or_copied();
/* try { // try from 001649ef to 001649f6 has its CatchHandler @ 00164ae2 */
psVar2 = 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>>
(local_58);
/* try { // try from 001649fe to 00164a08 has its CatchHandler @ 00164ae0 */
detail::
json_ref<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>>
::moved_or_copied();
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2IS5_SF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
(local_48,psVar2,adStack_68);
/* try { // try from 00164a1c to 00164a26 has its CatchHandler @ 00164abc */
push_back(param_1,(pair *)local_48);
assert_invariant(SUB81(local_28,0));
data::~data(local_28);
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
assert_invariant(SUB81(adStack_68,0));
data::~data(adStack_68);
this = (data *)local_58;
goto LAB_00164aa0;
}
}
basic_json((basic_json *)local_48,param_2,param_3,1,2);
/* try { // try from 00164a90 to 00164a9a has its CatchHandler @ 00164aec */
push_back(param_1,(basic_json *)local_48);
this = (data *)local_48;
LAB_00164aa0:
assert_invariant(SUB81(this,0));
data::~data(this);
return;
}
| |
26,748 | my_dirend | eloqsql/mysys/my_lib.c | void my_dirend(MY_DIR *dir)
{
MY_DIR_HANDLE *dirh= (MY_DIR_HANDLE*) dir;
DBUG_ENTER("my_dirend");
if (dirh)
{
delete_dynamic(&dirh->array);
free_root(&dirh->root, MYF(0));
my_free(dirh);
}
DBUG_VOID_RETURN;
} | O3 | c | my_dirend:
testq %rdi, %rdi
je 0x2a954
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x10, %rdi
callq 0x2ba10
leaq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x2d27b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x25ad2
retq
| my_dirend:
test rdi, rdi
jz short locret_2A954
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
add rdi, 10h
call delete_dynamic
lea rdi, [rbx+38h]
xor esi, esi
call free_root
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp my_free
locret_2A954:
retn
| long long my_dirend(long long a1)
{
long long result; // rax
if ( a1 )
{
delete_dynamic(a1 + 16);
free_root(a1 + 56, 0LL);
return my_free(a1);
}
return result;
}
| my_dirend:
TEST RDI,RDI
JZ 0x0012a954
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RDI,0x10
CALL 0x0012ba10
LEA RDI,[RBX + 0x38]
XOR ESI,ESI
CALL 0x0012d27b
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00125ad2
LAB_0012a954:
RET
|
void my_dirend(long param_1)
{
if (param_1 != 0) {
delete_dynamic(param_1 + 0x10);
free_root(param_1 + 0x38,0);
my_free(param_1);
return;
}
return;
}
| |
26,749 | 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 0xbd039d(%rip), %rax # 0xc856d0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb539b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xb535a
movq -0x28(%rbp), %rax
movq 0x258(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2a670
cmpl $0x0, %eax
jne 0xb538b
movq -0x28(%rbp), %rax
cmpq $0x0, 0x310(%rax)
je 0xb538b
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xb53a3
jmp 0xb538d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xb533a
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_B533A:
cmp [rbp+var_18], 0
jz short loc_B539B
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_B535A:
mov rax, [rbp+var_28]
mov rdi, [rax+258h]
mov rsi, [rbp+var_10]
call _strcmp
cmp eax, 0
jnz short loc_B538B
mov rax, [rbp+var_28]
cmp qword ptr [rax+310h], 0
jz short loc_B538B
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp short loc_B53A3
loc_B538B:
jmp short $+2
loc_B538D:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_18], rax
jmp short loc_B533A
loc_B539B:
mov [rbp+var_8], 0
loc_B53A3:
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,[0xd856d0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_001b533a:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001b539b
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 0x001b535a
LAB_001b535a:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x258]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012a670
CMP EAX,0x0
JNZ 0x001b538b
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x310],0x0
JZ 0x001b538b
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001b53a3
LAB_001b538b:
JMP 0x001b538d
LAB_001b538d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001b533a
LAB_001b539b:
MOV qword ptr [RBP + -0x8],0x0
LAB_001b53a3:
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;
}
| |
26,750 | ma_ft_convert_to_ft2 | eloqsql/storage/maria/ma_ft_update.c | my_bool _ma_ft_convert_to_ft2(MARIA_HA *info, MARIA_KEY *key)
{
MARIA_SHARE *share= info->s;
my_off_t root;
DYNAMIC_ARRAY *da=info->ft1_to_ft2;
MARIA_KEYDEF *keyinfo=&share->ft2_keyinfo;
uchar *key_ptr= (uchar*) dynamic_array_ptr(da, 0), *end;
uint length, key_length;
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
MARIA_KEY tmp_key;
MARIA_PAGE page;
DBUG_ENTER("_ma_ft_convert_to_ft2");
/* we'll generate one pageful at once, and insert the rest one-by-one */
/* calculating the length of this page ...*/
length=(keyinfo->block_length-2) / keyinfo->keylength;
set_if_smaller(length, da->elements);
length=length * keyinfo->keylength;
get_key_full_length_rdonly(key_length, key->data);
while (_ma_ck_delete(info, key) == 0)
{
/*
nothing to do here.
_ma_ck_delete() will populate info->ft1_to_ft2 with deleted keys
*/
}
/* creating pageful of keys */
bzero(info->buff, share->keypage_header);
_ma_store_keynr(share, info->buff, keyinfo->key_nr);
_ma_store_page_used(share, info->buff, length + share->keypage_header);
memcpy(info->buff + share->keypage_header, key_ptr, length);
info->keyread_buff_used= info->page_changed=1; /* info->buff is used */
/**
@todo RECOVERY BUG this is not logged yet. Ok as this code is never
called, but soon it will be.
*/
if ((root= _ma_new(info, DFLT_INIT_HITS, &page_link)) == HA_OFFSET_ERROR)
DBUG_RETURN(1);
_ma_page_setup(&page, info, keyinfo, root, info->buff);
if (_ma_write_keypage(&page, page_link->write_lock, DFLT_INIT_HITS))
DBUG_RETURN(1);
/* inserting the rest of key values */
end= (uchar*) dynamic_array_ptr(da, da->elements);
tmp_key.keyinfo= keyinfo;
tmp_key.data_length= keyinfo->keylength;
tmp_key.ref_length= 0;
tmp_key.flag= 0;
for (key_ptr+=length; key_ptr < end; key_ptr+=keyinfo->keylength)
{
tmp_key.data= key_ptr;
if (_ma_ck_real_write_btree(info, &tmp_key, &root, SEARCH_SAME))
DBUG_RETURN(1);
}
/* now, writing the word key entry */
ft_intXstore(key->data + key_length, - (int) da->elements);
_ma_dpointer(share, key->data + key_length + HA_FT_WLEN, root);
DBUG_RETURN(_ma_ck_real_write_btree(info, key,
&share->state.key_root[key->keyinfo->
key_nr],
SEARCH_SAME));
} | O0 | c | ma_ft_convert_to_ft2:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x320(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x458, %rax # imm = 0x458
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
imull $0x0, 0x14(%rcx), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movzwl 0xa6(%rax), %eax
subl $0x2, %eax
movq -0x38(%rbp), %rcx
movzwl 0xaa(%rcx), %ecx
cltd
idivl %ecx
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jbe 0x79d60
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x79d62
movl -0x4c(%rbp), %eax
movq -0x38(%rbp), %rcx
movzwl 0xaa(%rcx), %ecx
imull %ecx, %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0x79d99
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x79dc3
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
addl $0x3, %eax
movl %eax, -0x50(%rbp)
jmp 0x79dc5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6e930
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x79ddc
jmp 0x79dc5
movq -0x10(%rbp), %rax
movq 0x378(%rax), %rdi
movq -0x20(%rbp), %rax
movl 0x744(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2a0
movq -0x38(%rbp), %rax
movb 0xa5(%rax), %dl
movq -0x10(%rbp), %rax
movq 0x378(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x744(%rcx), %ecx
subl $0x1, %ecx
subl $0x1, %ecx
subl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x4c(%rbp), %eax
movq -0x20(%rbp), %rcx
addl 0x744(%rcx), %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x378(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x744(%rcx), %ecx
movb %dl, -0x1(%rax,%rcx)
movl -0xcc(%rbp), %eax
shrl $0x8, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x378(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x744(%rcx), %ecx
movb %dl, -0x2(%rax,%rcx)
movq -0x10(%rbp), %rax
movq 0x378(%rax), %rdi
movq -0x20(%rbp), %rax
movl 0x744(%rax), %eax
addq %rax, %rdi
movq -0x40(%rbp), %rsi
movl -0x4c(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movq -0x10(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movq -0x10(%rbp), %rdi
movl $0x3, %esi
leaq -0x70(%rbp), %rdx
callq 0x9b930
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
jne 0x79ee2
jmp 0x79ed9
movb $0x1, -0x1(%rbp)
jmp 0x7a0a9
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x378(%rax), %r8
leaq -0xc8(%rbp), %rdi
callq 0x9b040
movq -0x70(%rbp), %rax
movl 0xc(%rax), %esi
leaq -0xc8(%rbp), %rdi
movl $0x3, %edx
callq 0x9b360
cmpb $0x0, %al
je 0x79f2c
jmp 0x79f23
movb $0x1, -0x1(%rbp)
jmp 0x7a0a9
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x30(%rbp), %rdx
imull 0x14(%rdx), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x38(%rbp), %rax
movzwl 0xaa(%rax), %eax
movl %eax, -0x80(%rbp)
movl $0x0, -0x7c(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x79fdc
movq -0x40(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x28(%rbp), %rdx
movl $0x4, %ecx
callq 0x69030
cmpb $0x0, %al
je 0x79fbf
jmp 0x79fb6
movb $0x1, -0x1(%rbp)
jmp 0x7a0a9
jmp 0x79fc1
movq -0x38(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x79f82
movq -0x30(%rbp), %rcx
xorl %eax, %eax
subl 0x8(%rcx), %eax
cltq
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movb %al, %dl
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x50(%rbp), %ecx
movb %dl, 0x3(%rax,%rcx)
movq -0xd8(%rbp), %rax
shrq $0x8, %rax
movb %al, %dl
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x50(%rbp), %ecx
movb %dl, 0x2(%rax,%rcx)
movq -0xd8(%rbp), %rax
shrq $0x10, %rax
movb %al, %dl
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x50(%rbp), %ecx
movb %dl, 0x1(%rax,%rcx)
movq -0xd8(%rbp), %rax
shrq $0x18, %rax
movb %al, %dl
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x50(%rbp), %ecx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movl -0x50(%rbp), %eax
addq %rax, %rsi
addq $0x4, %rsi
movq -0x28(%rbp), %rdx
callq 0x97790
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x118(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0xa5(%rax), %eax
shlq $0x3, %rax
addq %rax, %rdx
movl $0x4, %ecx
callq 0x69030
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ma_ft_convert_to_ft2:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+320h]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
add rax, 458h
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
mov rax, [rax]
mov rcx, [rbp+var_30]
imul ecx, [rcx+14h], 0
mov ecx, ecx
add rax, rcx
mov [rbp+var_40], rax
lea rax, [rbp+var_68]
mov [rbp+var_70], rax
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+0A6h]
sub eax, 2
mov rcx, [rbp+var_38]
movzx ecx, word ptr [rcx+0AAh]
cdq
idiv ecx
mov [rbp+var_4C], eax
mov eax, [rbp+var_4C]
mov rcx, [rbp+var_30]
cmp eax, [rcx+8]
jbe short loc_79D60
mov rax, [rbp+var_30]
mov eax, [rax+8]
mov [rbp+var_4C], eax
loc_79D60:
jmp short $+2
loc_79D62:
mov eax, [rbp+var_4C]
mov rcx, [rbp+var_38]
movzx ecx, word ptr [rcx+0AAh]
imul eax, ecx
mov [rbp+var_4C], eax
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_79D99
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
add eax, 1
mov [rbp+var_50], eax
jmp short loc_79DC3
loc_79D99:
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_18]
mov rcx, [rcx]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
add eax, 3
mov [rbp+var_50], eax
loc_79DC3:
jmp short $+2
loc_79DC5:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _ma_ck_delete
movsx eax, al
cmp eax, 0
jnz short loc_79DDC
jmp short loc_79DC5
loc_79DDC:
mov rax, [rbp+var_10]
mov rdi, [rax+378h]
mov rax, [rbp+var_20]
mov eax, [rax+744h]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_38]
mov dl, [rax+0A5h]
mov rax, [rbp+var_10]
mov rax, [rax+378h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+744h]
sub ecx, 1
sub ecx, 1
sub ecx, 2
mov ecx, ecx
mov [rax+rcx], dl
mov eax, [rbp+var_4C]
mov rcx, [rbp+var_20]
add eax, [rcx+744h]
mov [rbp+var_CC], eax
mov eax, [rbp+var_CC]
mov dl, al
mov rax, [rbp+var_10]
mov rax, [rax+378h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+744h]
mov [rax+rcx-1], dl
mov eax, [rbp+var_CC]
shr eax, 8
mov dl, al
mov rax, [rbp+var_10]
mov rax, [rax+378h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+744h]
mov [rax+rcx-2], dl
mov rax, [rbp+var_10]
mov rdi, [rax+378h]
mov rax, [rbp+var_20]
mov eax, [rax+744h]
add rdi, rax
mov rsi, [rbp+var_40]
mov eax, [rbp+var_4C]
mov edx, eax
call _memcpy
mov rax, [rbp+var_10]
mov byte ptr [rax+684h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
mov rdi, [rbp+var_10]
mov esi, 3
lea rdx, [rbp+var_70]
call _ma_new
mov [rbp+var_28], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_79EE2
jmp short $+2
loc_79ED9:
mov [rbp+var_1], 1
jmp loc_7A0A9
loc_79EE2:
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov r8, [rax+378h]
lea rdi, [rbp+var_C8]
call _ma_page_setup
mov rax, [rbp+var_70]
mov esi, [rax+0Ch]
lea rdi, [rbp+var_C8]
mov edx, 3
call _ma_write_keypage
cmp al, 0
jz short loc_79F2C
jmp short $+2
loc_79F23:
mov [rbp+var_1], 1
jmp loc_7A0A9
loc_79F2C:
mov rax, [rbp+var_30]
mov rax, [rax]
mov rcx, [rbp+var_30]
mov ecx, [rcx+8]
mov rdx, [rbp+var_30]
imul ecx, [rdx+14h]
mov ecx, ecx
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
mov [rbp+var_88], rax
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+0AAh]
mov [rbp+var_80], eax
mov [rbp+var_7C], 0
mov [rbp+var_78], 0
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_40]
mov ecx, ecx
add rax, rcx
mov [rbp+var_40], rax
loc_79F82:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jnb short loc_79FDC
mov rax, [rbp+var_40]
mov [rbp+var_90], rax
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_90]
lea rdx, [rbp+var_28]
mov ecx, 4
call _ma_ck_real_write_btree
cmp al, 0
jz short loc_79FBF
jmp short $+2
loc_79FB6:
mov [rbp+var_1], 1
jmp loc_7A0A9
loc_79FBF:
jmp short $+2
loc_79FC1:
mov rax, [rbp+var_38]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_40]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_40], rax
jmp short loc_79F82
loc_79FDC:
mov rcx, [rbp+var_30]
xor eax, eax
sub eax, [rcx+8]
cdqe
mov [rbp+var_D8], rax
mov rax, [rbp+var_D8]
mov dl, al
mov rax, [rbp+var_18]
mov rax, [rax]
mov ecx, [rbp+var_50]
mov [rax+rcx+3], dl
mov rax, [rbp+var_D8]
shr rax, 8
mov dl, al
mov rax, [rbp+var_18]
mov rax, [rax]
mov ecx, [rbp+var_50]
mov [rax+rcx+2], dl
mov rax, [rbp+var_D8]
shr rax, 10h
mov dl, al
mov rax, [rbp+var_18]
mov rax, [rax]
mov ecx, [rbp+var_50]
mov [rax+rcx+1], dl
mov rax, [rbp+var_D8]
shr rax, 18h
mov dl, al
mov rax, [rbp+var_18]
mov rax, [rax]
mov ecx, [rbp+var_50]
mov [rax+rcx], dl
mov rdi, [rbp+var_20]
mov rax, [rbp+var_18]
mov rsi, [rax]
mov eax, [rbp+var_50]
add rsi, rax
add rsi, 4
mov rdx, [rbp+var_28]
call _ma_dpointer
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_20]
mov rdx, [rax+118h]
mov rax, [rbp+var_18]
mov rax, [rax+8]
movzx eax, byte ptr [rax+0A5h]
shl rax, 3
add rdx, rax
mov ecx, 4
call _ma_ck_real_write_btree
mov [rbp+var_1], al
loc_7A0A9:
mov al, [rbp+var_1]
add rsp, 0E0h
pop rbp
retn
| bool ma_ft_convert_to_ft2(long long *a1, long long *a2)
{
int v2; // eax
int v4; // [rsp+8h] [rbp-D8h]
unsigned int v5; // [rsp+14h] [rbp-CCh]
_BYTE v6[56]; // [rsp+18h] [rbp-C8h] BYREF
_QWORD v7[2]; // [rsp+50h] [rbp-90h] BYREF
int v8; // [rsp+60h] [rbp-80h]
int v9; // [rsp+64h] [rbp-7Ch]
int v10; // [rsp+68h] [rbp-78h]
char *v11; // [rsp+70h] [rbp-70h] BYREF
char v12; // [rsp+78h] [rbp-68h] BYREF
unsigned int v13; // [rsp+90h] [rbp-50h]
unsigned int v14; // [rsp+94h] [rbp-4Ch]
unsigned long long v15; // [rsp+98h] [rbp-48h]
unsigned long long v16; // [rsp+A0h] [rbp-40h]
long long v17; // [rsp+A8h] [rbp-38h]
long long v18; // [rsp+B0h] [rbp-30h]
long long v19; // [rsp+B8h] [rbp-28h] BYREF
long long v20; // [rsp+C0h] [rbp-20h]
long long *v21; // [rsp+C8h] [rbp-18h]
long long *v22; // [rsp+D0h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = *a1;
v18 = a1[100];
v17 = v20 + 1112;
v16 = *(_QWORD *)v18;
v11 = &v12;
v14 = (*(unsigned __int16 *)(v20 + 1278) - 2) / *(unsigned __int16 *)(v20 + 1282);
if ( v14 > *(_DWORD *)(v18 + 8) )
v14 = *(_DWORD *)(v18 + 8);
v14 *= *(unsigned __int16 *)(v17 + 170);
if ( *(unsigned __int8 *)*v21 == 255 )
v2 = _byteswap_ushort(*(_WORD *)(*v21 + 1)) + 3;
else
v2 = *(unsigned __int8 *)*v21 + 1;
v13 = v2;
while ( !ma_ck_delete(v22, v21) )
;
memset(v22[111], 0LL, *(unsigned int *)(v20 + 1860));
*(_BYTE *)(v22[111] + (unsigned int)(*(_DWORD *)(v20 + 1860) - 4)) = *(_BYTE *)(v17 + 165);
v5 = *(_DWORD *)(v20 + 1860) + v14;
*(_BYTE *)(v22[111] + *(unsigned int *)(v20 + 1860) - 1) = v5;
*(_BYTE *)(v22[111] + *(unsigned int *)(v20 + 1860) - 2) = BYTE1(v5);
memcpy(*(unsigned int *)(v20 + 1860) + v22[111], v16, v14);
*((_BYTE *)v22 + 1668) = 1;
*((_BYTE *)v22 + 1669) = 1;
v19 = ma_new(v22, 3LL, &v11);
if ( v19 == -1 )
return 1;
ma_page_setup(v6, v22, v17, v19, v22[111]);
if ( (unsigned __int8)ma_write_keypage(v6, *((unsigned int *)v11 + 3), 3LL) )
return 1;
v15 = (unsigned int)(*(_DWORD *)(v18 + 20) * *(_DWORD *)(v18 + 8)) + *(_QWORD *)v18;
v7[1] = v17;
v8 = *(unsigned __int16 *)(v17 + 170);
v9 = 0;
v10 = 0;
for ( v16 += v14; v16 < v15; v16 += *(unsigned __int16 *)(v17 + 170) )
{
v7[0] = v16;
if ( ma_ck_real_write_btree((long long)v22, (long long)v7, &v19, 4) )
return 1;
}
v4 = -*(_DWORD *)(v18 + 8);
*(_BYTE *)(*v21 + v13 + 3) = -*(_BYTE *)(v18 + 8);
*(_BYTE *)(*v21 + v13 + 2) = BYTE1(v4);
*(_BYTE *)(*v21 + v13 + 1) = BYTE2(v4);
*(_BYTE *)(*v21 + v13) = HIBYTE(v4);
ma_dpointer(v20, v13 + *v21 + 4, v19);
return ma_ck_real_write_btree(
(long long)v22,
(long long)v21,
(_QWORD *)(8LL * *(unsigned __int8 *)(v21[1] + 165) + *(_QWORD *)(v20 + 280)),
4);
}
| _ma_ft_convert_to_ft2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x320]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x458
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x30]
IMUL ECX,dword ptr [RCX + 0x14],0x0
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[RBP + -0x68]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0xa6]
SUB EAX,0x2
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,word ptr [RCX + 0xaa]
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x30]
CMP EAX,dword ptr [RCX + 0x8]
JBE 0x00179d60
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x4c],EAX
LAB_00179d60:
JMP 0x00179d62
LAB_00179d62:
MOV EAX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,word ptr [RCX + 0xaa]
IMUL EAX,ECX
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x00179d99
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
ADD EAX,0x1
MOV dword ptr [RBP + -0x50],EAX
JMP 0x00179dc3
LAB_00179d99:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
ADD EAX,0x3
MOV dword ptr [RBP + -0x50],EAX
LAB_00179dc3:
JMP 0x00179dc5
LAB_00179dc5:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0016e930
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00179ddc
JMP 0x00179dc5
LAB_00179ddc:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x378]
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x744]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2a0
MOV RAX,qword ptr [RBP + -0x38]
MOV DL,byte ptr [RAX + 0xa5]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x378]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x1
SUB ECX,0x1
SUB ECX,0x2
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x20]
ADD EAX,dword ptr [RCX + 0x744]
MOV dword ptr [RBP + -0xcc],EAX
MOV EAX,dword ptr [RBP + -0xcc]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x378]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x1],DL
MOV EAX,dword ptr [RBP + -0xcc]
SHR EAX,0x8
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x378]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x2],DL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x378]
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x744]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x4c]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x684],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x3
LEA RDX,[RBP + -0x70]
CALL 0x0019b930
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,-0x1
JNZ 0x00179ee2
JMP 0x00179ed9
LAB_00179ed9:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017a0a9
LAB_00179ee2:
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x378]
LEA RDI,[RBP + -0xc8]
CALL 0x0019b040
MOV RAX,qword ptr [RBP + -0x70]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[RBP + -0xc8]
MOV EDX,0x3
CALL 0x0019b360
CMP AL,0x0
JZ 0x00179f2c
JMP 0x00179f23
LAB_00179f23:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017a0a9
LAB_00179f2c:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x30]
IMUL ECX,dword ptr [RDX + 0x14]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV dword ptr [RBP + -0x80],EAX
MOV dword ptr [RBP + -0x7c],0x0
MOV dword ptr [RBP + -0x78],0x0
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00179f82:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x00179fdc
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x90],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x90]
LEA RDX,[RBP + -0x28]
MOV ECX,0x4
CALL 0x00169030
CMP AL,0x0
JZ 0x00179fbf
JMP 0x00179fb6
LAB_00179fb6:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017a0a9
LAB_00179fbf:
JMP 0x00179fc1
LAB_00179fc1:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00179f82
LAB_00179fdc:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
SUB EAX,dword ptr [RCX + 0x8]
CDQE
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0xd8]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x50]
MOV byte ptr [RAX + RCX*0x1 + 0x3],DL
MOV RAX,qword ptr [RBP + -0xd8]
SHR RAX,0x8
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x50]
MOV byte ptr [RAX + RCX*0x1 + 0x2],DL
MOV RAX,qword ptr [RBP + -0xd8]
SHR RAX,0x10
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x50]
MOV byte ptr [RAX + RCX*0x1 + 0x1],DL
MOV RAX,qword ptr [RBP + -0xd8]
SHR RAX,0x18
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x50]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x50]
ADD RSI,RAX
ADD RSI,0x4
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00197790
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX + 0x118]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX + 0xa5]
SHL RAX,0x3
ADD RDX,RAX
MOV ECX,0x4
CALL 0x00169030
MOV byte ptr [RBP + -0x1],AL
LAB_0017a0a9:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xe0
POP RBP
RET
|
int1 _ma_ft_convert_to_ft2(long *param_1,long *param_2)
{
char cVar1;
int iVar2;
ulong uVar3;
ulong extraout_RDX;
int1 local_d0 [56];
ulong local_98;
long local_90;
uint local_88;
int4 local_84;
int4 local_80;
int1 *local_78;
int1 local_70 [24];
uint local_58;
uint local_54;
ulong local_50;
void *local_48;
long local_40;
long *local_38;
long local_30;
long local_28;
long *local_20;
long *local_18;
int1 local_9;
local_28 = *param_1;
local_38 = (long *)param_1[100];
local_40 = local_28 + 0x458;
local_48 = (void *)*local_38;
local_78 = local_70;
iVar2 = *(ushort *)(local_28 + 0x4fe) - 2;
local_54 = iVar2 / (int)(uint)*(ushort *)(local_28 + 0x502);
uVar3 = (long)iVar2 % (long)(int)(uint)*(ushort *)(local_28 + 0x502) & 0xffffffff;
if (*(uint *)(local_38 + 1) < local_54) {
local_54 = *(uint *)(local_38 + 1);
}
local_54 = local_54 * *(ushort *)(local_28 + 0x502);
local_20 = param_2;
local_18 = param_1;
if (*(char *)*param_2 == -1) {
local_58 = CONCAT11(*(int1 *)(*param_2 + 1),*(int1 *)(*param_2 + 2)) + 3;
}
else {
local_58 = *(byte *)*param_2 + 1;
}
do {
cVar1 = _ma_ck_delete(local_18,local_20,uVar3);
uVar3 = extraout_RDX;
} while (cVar1 == '\0');
memset((void *)local_18[0x6f],0,(ulong)*(uint *)(local_28 + 0x744));
*(int1 *)(local_18[0x6f] + (ulong)(*(int *)(local_28 + 0x744) - 4)) =
*(int1 *)(local_40 + 0xa5);
iVar2 = local_54 + *(int *)(local_28 + 0x744);
*(char *)(local_18[0x6f] + -1 + (ulong)*(uint *)(local_28 + 0x744)) = (char)iVar2;
*(char *)(local_18[0x6f] + -2 + (ulong)*(uint *)(local_28 + 0x744)) = (char)((uint)iVar2 >> 8);
memcpy((void *)(local_18[0x6f] + (ulong)*(uint *)(local_28 + 0x744)),local_48,(ulong)local_54);
*(int1 *)((long)local_18 + 0x684) = 1;
*(int1 *)((long)local_18 + 0x685) = 1;
local_30 = _ma_new(local_18,3,&local_78);
if (local_30 == -1) {
local_9 = 1;
}
else {
_ma_page_setup(local_d0,local_18,local_40,local_30,local_18[0x6f]);
cVar1 = _ma_write_keypage(local_d0,*(int4 *)(local_78 + 0xc),3);
if (cVar1 == '\0') {
local_50 = *local_38 + (ulong)(uint)((int)local_38[1] * *(int *)((long)local_38 + 0x14));
local_90 = local_40;
local_88 = (uint)*(ushort *)(local_40 + 0xaa);
local_84 = 0;
local_80 = 0;
for (local_48 = (void *)((long)local_48 + (ulong)local_54); local_48 < local_50;
local_48 = (void *)((long)local_48 + (long)(int)(uint)*(ushort *)(local_40 + 0xaa))) {
local_98 = (ulong)local_48;
cVar1 = _ma_ck_real_write_btree(local_18,&local_98,&local_30,4);
if (cVar1 != '\0') {
return 1;
}
}
iVar2 = -(int)local_38[1];
*(char *)(*local_20 + 3 + (ulong)local_58) = (char)iVar2;
*(char *)(*local_20 + 2 + (ulong)local_58) = (char)((uint)iVar2 >> 8);
*(char *)(*local_20 + 1 + (ulong)local_58) = (char)((uint)iVar2 >> 0x10);
*(char *)(*local_20 + (ulong)local_58) = (char)((uint)iVar2 >> 0x18);
_ma_dpointer(local_28,*local_20 + (ulong)local_58 + 4,local_30);
local_9 = _ma_ck_real_write_btree
(local_18,local_20,
*(long *)(local_28 + 0x118) + (ulong)*(byte *)(local_20[1] + 0xa5) * 8,4)
;
}
else {
local_9 = 1;
}
}
return local_9;
}
| |
26,751 | my_mb_wc_eucjpms | eloqsql/strings/ctype-eucjpms.c | static int
my_mb_wc_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS X 0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjpms_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjpms_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_eucjpms:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xaf422
movzbl (%rdx), %edi
testb %dil, %dil
js 0xaf424
movq %rdi, (%rsi)
movl $0x1, %eax
popq %rbp
retq
leal 0x5f(%rdi), %eax
cmpb $0x5d, %al
ja 0xaf470
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xaf422
movzbl 0x1(%rdx), %eax
shll $0x9, %edi
leal (%rdi,%rax,2), %eax
leaq 0xace36(%rip), %rcx # 0x15c280
movzwl (%rax,%rcx), %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testq %rcx, %rcx
jne 0xaf422
movb 0x1(%rdx), %al
incb %al
xorl %ecx, %ecx
cmpb $-0x5e, %al
setb %cl
leal -0x2(,%rcx,2), %eax
jmp 0xaf422
cmpq $0x8f, %rdi
je 0xaf4b4
cmpl $0x8e, %edi
jne 0xaf4f6
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0xaf422
movzbl 0x1(%rdx), %ecx
leal 0x20(%rcx), %edx
movl $0x0, %eax
cmpb $-0x3f, %dl
jb 0xaf422
addq $0xfec0, %rcx # imm = 0xFEC0
movq %rcx, (%rsi)
movl $0x2, %eax
jmp 0xaf422
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0xaf422
movzwl 0x1(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
leaq 0xccda8(%rip), %rcx # 0x17c280
movzwl (%rcx,%rax,2), %ecx
movq %rcx, (%rsi)
movl $0x3, %eax
testq %rcx, %rcx
jne 0xaf422
movb 0x1(%rdx), %al
incb %al
cmpb $-0x5e, %al
jae 0xaf4fd
xorl %eax, %eax
jmp 0xaf422
movb 0x2(%rdx), %cl
movl $0x0, %eax
cmpb $-0x5f, %cl
jb 0xaf422
xorl %eax, %eax
cmpb $-0x1, %cl
sete %al
leal (%rax,%rax,2), %eax
addl $-0x3, %eax
jmp 0xaf422
| my_mb_wc_eucjpms:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_AF422
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_AF424
mov [rsi], rdi
mov eax, 1
loc_AF422:
pop rbp
retn
loc_AF424:
lea eax, [rdi+5Fh]
cmp al, 5Dh ; ']'
ja short loc_AF470
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_AF422
movzx eax, byte ptr [rdx+1]
shl edi, 9
lea eax, [rdi+rax*2]
lea rcx, jisx0208_eucjpms_to_unicode
movzx ecx, word ptr [rax+rcx]
mov [rsi], rcx
mov eax, 2
test rcx, rcx
jnz short loc_AF422
mov al, [rdx+1]
inc al
xor ecx, ecx
cmp al, 0A2h
setb cl
lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2]
jmp short loc_AF422
loc_AF470:
cmp rdi, 8Fh
jz short loc_AF4B4
cmp edi, 8Eh
jnz short loc_AF4F6
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_AF422
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+20h]
mov eax, 0
cmp dl, 0C1h
jb short loc_AF422
add rcx, 0FEC0h
mov [rsi], rcx
mov eax, 2
jmp loc_AF422
loc_AF4B4:
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja loc_AF422
movzx eax, word ptr [rdx+1]
rol ax, 8
movzx eax, ax
lea rcx, jisx0212_eucjpms_to_unicode
movzx ecx, word ptr [rcx+rax*2]
mov [rsi], rcx
mov eax, 3
test rcx, rcx
jnz loc_AF422
mov al, [rdx+1]
inc al
cmp al, 0A2h
jnb short loc_AF4FD
loc_AF4F6:
xor eax, eax
jmp loc_AF422
loc_AF4FD:
mov cl, [rdx+2]
mov eax, 0
cmp cl, 0A1h
jb loc_AF422
xor eax, eax
cmp cl, 0FFh
setz al
lea eax, [rax+rax*2]
add eax, 0FFFFFFFDh
jmp loc_AF422
| long long my_mb_wc_eucjpms(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
long long v6; // rcx
long long v7; // rcx
long long v8; // rcx
unsigned __int8 v9; // cl
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
v5 = *a3;
if ( (v5 & 0x80u) == 0LL )
{
*a2 = v5;
return 1LL;
}
if ( (unsigned __int8)(v5 + 95) <= 0x5Du )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = jisx0208_eucjpms_to_unicode[256 * (_DWORD)v5 + a3[1]];
*a2 = v6;
result = 2LL;
if ( !v6 )
return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2;
}
return result;
}
if ( v5 != 143 )
{
if ( (_DWORD)v5 == 142 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v7 = a3[1];
result = 0LL;
if ( (unsigned __int8)(v7 + 32) >= 0xC1u )
{
*a2 = v7 + 65216;
return 2LL;
}
}
return result;
}
return 0LL;
}
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v8 = jisx0212_eucjpms_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)];
*a2 = v8;
result = 3LL;
if ( v8 )
return result;
if ( (unsigned __int8)(a3[1] + 1) < 0xA2u )
return 0LL;
v9 = a3[2];
result = 0LL;
if ( v9 >= 0xA1u )
return 3 * (unsigned int)(v9 == 0xFF) - 3;
return result;
}
| my_mb_wc_eucjpms:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001af422
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x001af424
MOV qword ptr [RSI],RDI
MOV EAX,0x1
LAB_001af422:
POP RBP
RET
LAB_001af424:
LEA EAX,[RDI + 0x5f]
CMP AL,0x5d
JA 0x001af470
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001af422
MOVZX EAX,byte ptr [RDX + 0x1]
SHL EDI,0x9
LEA EAX,[RDI + RAX*0x2]
LEA RCX,[0x25c280]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST RCX,RCX
JNZ 0x001af422
MOV AL,byte ptr [RDX + 0x1]
INC AL
XOR ECX,ECX
CMP AL,0xa2
SETC CL
LEA EAX,[-0x2 + RCX*0x2]
JMP 0x001af422
LAB_001af470:
CMP RDI,0x8f
JZ 0x001af4b4
CMP EDI,0x8e
JNZ 0x001af4f6
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001af422
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x20]
MOV EAX,0x0
CMP DL,0xc1
JC 0x001af422
ADD RCX,0xfec0
MOV qword ptr [RSI],RCX
MOV EAX,0x2
JMP 0x001af422
LAB_001af4b4:
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x001af422
MOVZX EAX,word ptr [RDX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
LEA RCX,[0x27c280]
MOVZX ECX,word ptr [RCX + RAX*0x2]
MOV qword ptr [RSI],RCX
MOV EAX,0x3
TEST RCX,RCX
JNZ 0x001af422
MOV AL,byte ptr [RDX + 0x1]
INC AL
CMP AL,0xa2
JNC 0x001af4fd
LAB_001af4f6:
XOR EAX,EAX
JMP 0x001af422
LAB_001af4fd:
MOV CL,byte ptr [RDX + 0x2]
MOV EAX,0x0
CMP CL,0xa1
JC 0x001af422
XOR EAX,EAX
CMP CL,0xff
SETZ AL
LEA EAX,[RAX + RAX*0x2]
ADD EAX,-0x3
JMP 0x001af422
|
int my_mb_wc_eucjpms(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
iVar3 = -0x65;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((char)bVar1 < '\0') {
if ((byte)(bVar1 + 0x5f) < 0x5e) {
iVar3 = -0x66;
if (param_3 + 2 <= param_4) {
uVar2 = *(ushort *)
(jisx0208_eucjpms_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2));
*param_2 = (ulong)uVar2;
iVar3 = 2;
if ((ulong)uVar2 == 0) {
iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2;
}
}
}
else {
if ((ulong)bVar1 == 0x8f) {
if (param_4 < param_3 + 3) {
return -0x67;
}
uVar2 = *(ushort *)
(&jisx0212_eucjpms_to_unicode +
(ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) *
2);
*param_2 = (ulong)uVar2;
if ((ulong)uVar2 != 0) {
return 3;
}
if (0xa1 < (byte)(param_3[1] + 1)) {
if (param_3[2] < 0xa1) {
return 0;
}
return (uint)(param_3[2] == 0xff) * 3 + -3;
}
}
else if (bVar1 == 0x8e) {
if (param_4 < param_3 + 2) {
return -0x66;
}
if ((byte)(param_3[1] + 0x20) < 0xc1) {
return 0;
}
*param_2 = (ulong)param_3[1] + 0xfec0;
return 2;
}
iVar3 = 0;
}
}
else {
*param_2 = (ulong)bVar1;
iVar3 = 1;
}
}
return iVar3;
}
| |
26,752 | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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>*, 0>(int, 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>*) | monkey531[P]llama/common/json.hpp | static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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>*, 0>(int, 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>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x6276a(%rip), %rsi # 0xae983
leaq 0x6276f(%rip), %rdx # 0xae98f
leaq 0x28(%rsp), %rdi
callq 0x200f4
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x41306
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x18ab0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x181e0
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x181e0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x181e0
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x4c2c3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x186e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c2de
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x186e0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c2f5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186e0
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41502
leaq 0x930bd(%rip), %rax # 0xdf3c8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4c329
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186e0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4c3b7
movq 0x18(%rsp), %rsi
jmp 0x4c3af
movq %rax, %rbx
jmp 0x4c3a0
movq %rax, %rbx
jmp 0x4c3b7
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4c379
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186e0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x1950b
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c3b7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186e0
movq %rbx, %rdi
callq 0x18c10
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aOutOfRange; "out_of_range"
lea rdx, aOutOfRange+0Ch; ""
lea rdi, [rsp+0C8h+var_A0]
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, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_4C2C3
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C2C3:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4C2DE
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C2DE:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_4C2F5
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C2F5:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; `vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range
add rax, 10h
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_4C329
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C329:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_4C3B7
mov rsi, [rsp+arg_10]
jmp short loc_4C3AF
mov rbx, rax
jmp short loc_4C3A0
mov rbx, rax
jmp short loc_4C3B7
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_4C379
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C379:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1
mov rbx, [r12]
loc_4C3A0:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_4C3B7
mov rsi, [rsp+arg_30]
loc_4C3AF:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C3B7:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>((long long)v7, "out_of_range", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range + 2;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0014c212:
LEA RSI,[0x1ae983]
LEA RDX,[0x1ae98f]
LEA RDI,[RSP + 0x28]
CALL 0x001200f4
LAB_0014c22a:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x00141306
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_0014c269:
LEA RDI,[RSP + 0x8]
CALL 0x00118ab0
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x001181e0
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x001181e0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x001181e0
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0014c2c3
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x001186e0
LAB_0014c2c3:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014c2de
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001186e0
LAB_0014c2de:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0014c2f5
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001186e0
LAB_0014c2f5:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0014c2fa:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00141502
LAB_0014c304:
LEA RAX,[0x1df3c8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0014c329
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186e0
LAB_0014c329:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 0014c212 to 0014c229 has its CatchHandler @ 0014c357 */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"out_of_range","");
/* try { // try from 0014c22a to 0014c23a has its CatchHandler @ 0014c352 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 0014c269 to 0014c2ab has its CatchHandler @ 0014c35c */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 0014c2fa to 0014c303 has its CatchHandler @ 0014c33e */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_001df3d8;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
| |
26,753 | blst_fp_from_lendian | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c | void blst_fp_from_lendian(vec384 ret, const unsigned char a[48])
{
vec384 out;
limbs_from_le_bytes(out, a, sizeof(vec384));
mul_fp(ret, out, BLS12_381_RR);
} | O3 | c | blst_fp_from_lendian:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x2f, %eax
xorl %ecx, %ecx
shlq $0x8, %rcx
movzbl (%rsi,%rax), %edx
orq %rdx, %rcx
movq %rax, %rdx
andq $-0x8, %rdx
movq %rcx, -0x30(%rbp,%rdx)
addq $-0x1, %rax
jb 0x6380b
leaq 0x27361(%rip), %rdx # 0x8ab90
leaq 0x270da(%rip), %rcx # 0x8a910
leaq -0x30(%rbp), %rsi
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x72e60
addq $0x30, %rsp
popq %rbp
retq
| blst_fp_from_lendian:
push rbp
mov rbp, rsp
sub rsp, 30h
mov eax, 2Fh ; '/'
xor ecx, ecx
loc_6380B:
shl rcx, 8
movzx edx, byte ptr [rsi+rax]
or rcx, rdx
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdx+var_30], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_6380B
lea rdx, BLS12_381_RR
lea rcx, BLS12_381_P
lea rsi, [rbp+var_30]
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
add rsp, 30h
pop rbp
retn
| long long blst_fp_from_lendian(long long a1, long long a2)
{
long long v2; // rax
unsigned long long v3; // rcx
_QWORD v6[6]; // [rsp+0h] [rbp-30h] BYREF
v2 = 47LL;
v3 = 0LL;
do
{
v3 = *(unsigned __int8 *)(a2 + v2) | (v3 << 8);
*(_QWORD *)((char *)v6 + (v2 & 0xFFFFFFFFFFFFFFF8LL)) = v3;
}
while ( v2-- != 0 );
return mul_mont_384(a1, v6, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
}
| blst_fp_from_lendian:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV EAX,0x2f
XOR ECX,ECX
LAB_0016380b:
SHL RCX,0x8
MOVZX EDX,byte ptr [RSI + RAX*0x1]
OR RCX,RDX
MOV RDX,RAX
AND RDX,-0x8
MOV qword ptr [RBP + RDX*0x1 + -0x30],RCX
ADD RAX,-0x1
JC 0x0016380b
LEA RDX,[0x18ab90]
LEA RCX,[0x18a910]
LEA RSI,[RBP + -0x30]
MOV R8,-0x760c000300030003
CALL 0x00172e60
ADD RSP,0x30
POP RBP
RET
|
void blst_fp_from_lendian(int8 param_1,long param_2)
{
ulong uVar1;
ulong uVar2;
bool bVar3;
ulong local_38 [6];
uVar1 = 0x2f;
uVar2 = 0;
do {
uVar2 = uVar2 << 8 | (ulong)*(byte *)(param_2 + uVar1);
*(ulong *)((long)local_38 + (uVar1 & 0xfffffffffffffff8)) = uVar2;
bVar3 = uVar1 != 0;
uVar1 = uVar1 - 1;
} while (bVar3);
mul_mont_384(param_1,local_38,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd);
return;
}
| |
26,754 | ggml_vec_scale_f32 | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | inline static void ggml_vec_scale_f32(const int n, float * y, const float v) {
#if defined(GGML_USE_ACCELERATE)
vDSP_vsmul(y, 1, &v, y, 1, n);
#elif defined(GGML_SIMD)
const int np = (n & ~(GGML_F32_STEP - 1));
GGML_F32_VEC vx = GGML_F32_VEC_SET1(v);
GGML_F32_VEC ay[GGML_F32_ARR];
for (int i = 0; i < np; i += GGML_F32_STEP) {
for (int j = 0; j < GGML_F32_ARR; j++) {
ay[j] = GGML_F32_VEC_LOAD(y + i + j*GGML_F32_EPR);
ay[j] = GGML_F32_VEC_MUL(ay[j], vx);
GGML_F32_VEC_STORE(y + i + j*GGML_F32_EPR, ay[j]);
}
}
// leftovers
for (int i = np; i < n; ++i) {
y[i] *= v;
}
#else
// scalar
for (int i = 0; i < n; ++i) {
y[i] *= v;
}
#endif
} | O2 | c | ggml_vec_scale_f32:
movl %edi, %eax
andl $-0x20, %eax
vbroadcastss %xmm0, %ymm1
cltq
xorl %ecx, %ecx
movq %rsi, %rdx
cmpq %rax, %rcx
jge 0x8ce16
xorl %r8d, %r8d
cmpq $0x80, %r8
je 0x8ce0c
vmulps (%rdx,%r8), %ymm1, %ymm2
vmovups %ymm2, (%rdx,%r8)
addq $0x20, %r8
jmp 0x8cdf1
addq $0x20, %rcx
subq $-0x80, %rdx
jmp 0x8cde9
movslq %edi, %rcx
cmpq %rcx, %rax
jge 0x8ce2d
vmulss (%rsi,%rax,4), %xmm0, %xmm1
vmovss %xmm1, (%rsi,%rax,4)
incq %rax
jmp 0x8ce19
vzeroupper
retq
| ggml_vec_scale_f32:
mov eax, edi
and eax, 0FFFFFFE0h
vbroadcastss ymm1, xmm0
cdqe
xor ecx, ecx
mov rdx, rsi
loc_8CDE9:
cmp rcx, rax
jge short loc_8CE16
xor r8d, r8d
loc_8CDF1:
cmp r8, 80h
jz short loc_8CE0C
vmulps ymm2, ymm1, ymmword ptr [rdx+r8]
vmovups ymmword ptr [rdx+r8], ymm2
add r8, 20h ; ' '
jmp short loc_8CDF1
loc_8CE0C:
add rcx, 20h ; ' '
sub rdx, 0FFFFFFFFFFFFFF80h
jmp short loc_8CDE9
loc_8CE16:
movsxd rcx, edi
loc_8CE19:
cmp rax, rcx
jge short loc_8CE2D
vmulss xmm1, xmm0, dword ptr [rsi+rax*4]
vmovss dword ptr [rsi+rax*4], xmm1
inc rax
jmp short loc_8CE19
loc_8CE2D:
vzeroupper
retn
| long long ggml_vec_scale_f32(int a1, long long _RSI, __m128 _XMM0)
{
long long result; // rax
long long v5; // rcx
__asm { vbroadcastss ymm1, xmm0 }
result = (int)(a1 & 0xFFFFFFE0);
v5 = 0LL;
_RDX = _RSI;
while ( v5 < result )
{
for ( _R8 = 0LL; _R8 != 128; _R8 += 32LL )
{
__asm
{
vmulps ymm2, ymm1, ymmword ptr [rdx+r8]
vmovups ymmword ptr [rdx+r8], ymm2
}
}
v5 += 32LL;
_RDX += 128LL;
}
while ( result < a1 )
{
__asm
{
vmulss xmm1, xmm0, dword ptr [rsi+rax*4]
vmovss dword ptr [rsi+rax*4], xmm1
}
++result;
}
__asm { vzeroupper }
return result;
}
| ggml_vec_scale_f32:
MOV EAX,EDI
AND EAX,0xffffffe0
VBROADCASTSS YMM1,XMM0
CDQE
XOR ECX,ECX
MOV RDX,RSI
LAB_0018cde9:
CMP RCX,RAX
JGE 0x0018ce16
XOR R8D,R8D
LAB_0018cdf1:
CMP R8,0x80
JZ 0x0018ce0c
VMULPS YMM2,YMM1,ymmword ptr [RDX + R8*0x1]
VMOVUPS ymmword ptr [RDX + R8*0x1],YMM2
ADD R8,0x20
JMP 0x0018cdf1
LAB_0018ce0c:
ADD RCX,0x20
SUB RDX,-0x80
JMP 0x0018cde9
LAB_0018ce16:
MOVSXD RCX,EDI
LAB_0018ce19:
CMP RAX,RCX
JGE 0x0018ce2d
VMULSS XMM1,XMM0,dword ptr [RSI + RAX*0x4]
VMOVSS dword ptr [RSI + RAX*0x4],XMM1
INC RAX
JMP 0x0018ce19
LAB_0018ce2d:
VZEROUPPER
RET
|
void ggml_vec_scale_f32(float param_1,uint param_2,long param_3)
{
float *pfVar1;
float *pfVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
float in_register_0000129c;
lVar9 = (long)(int)(param_2 & 0xffffffe0);
lVar11 = param_3;
for (lVar10 = 0; lVar10 < lVar9; lVar10 = lVar10 + 0x20) {
for (lVar12 = 0; lVar12 != 0x80; lVar12 = lVar12 + 0x20) {
pfVar1 = (float *)(lVar11 + lVar12);
fVar3 = pfVar1[1];
fVar4 = pfVar1[2];
fVar5 = pfVar1[3];
fVar6 = pfVar1[4];
fVar7 = pfVar1[5];
fVar8 = pfVar1[6];
pfVar2 = (float *)(lVar11 + lVar12);
*pfVar2 = param_1 * *pfVar1;
pfVar2[1] = param_1 * fVar3;
pfVar2[2] = param_1 * fVar4;
pfVar2[3] = param_1 * fVar5;
pfVar2[4] = param_1 * fVar6;
pfVar2[5] = param_1 * fVar7;
pfVar2[6] = param_1 * fVar8;
pfVar2[7] = in_register_0000129c;
}
lVar11 = lVar11 + 0x80;
}
for (; lVar9 < (int)param_2; lVar9 = lVar9 + 1) {
*(float *)(param_3 + lVar9 * 4) = param_1 * *(float *)(param_3 + lVar9 * 4);
}
return;
}
| |
26,755 | finish_resize_simple_key_cache | eloqsql/mysys/mf_keycache.c | static
void finish_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache)
{
DBUG_ENTER("finish_resize_simple_key_cache");
mysql_mutex_assert_owner(&keycache->cache_lock);
/*
Mark the resize finished. This allows other threads to start a
resize or to request new cache blocks.
*/
keycache->in_resize= 0;
/* Signal waiting threads. */
release_whole_queue(&keycache->resize_queue);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_VOID_RETURN;
} | O3 | c | finish_resize_simple_key_cache:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, 0x1(%rdi)
addq $0x108, %rdi # imm = 0x108
callq 0x99c49
movq 0x100(%rbx), %rdi
testq %rdi, %rdi
jne 0x9b12c
addq $0xc0, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x291c0
leaq 0x2ecedd(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9b117
| finish_resize_simple_key_cache:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov byte ptr [rdi+1], 0
add rdi, 108h
call release_whole_queue
mov rdi, [rbx+100h]
test rdi, rdi
jnz short loc_9B12C
loc_9B117:
add rbx, 0C0h
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutex_unlock
loc_9B12C:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_9B117
| long long finish_resize_simple_key_cache(long long a1)
{
long long v2; // rdi
*(_BYTE *)(a1 + 1) = 0;
release_whole_queue((long long *)(a1 + 264));
v2 = *(_QWORD *)(a1 + 256);
if ( v2 )
((void ( *)(long long))PSI_server[44])(v2);
return pthread_mutex_unlock(a1 + 192);
}
| finish_resize_simple_key_cache:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV byte ptr [RDI + 0x1],0x0
ADD RDI,0x108
CALL 0x00199c49
MOV RDI,qword ptr [RBX + 0x100]
TEST RDI,RDI
JNZ 0x0019b12c
LAB_0019b117:
ADD RBX,0xc0
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001291c0
LAB_0019b12c:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019b117
|
void finish_resize_simple_key_cache(long param_1)
{
*(int1 *)(param_1 + 1) = 0;
release_whole_queue(param_1 + 0x108);
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0xc0));
return;
}
| |
26,756 | hi0bits | eloqsql/strings/dtoa.c | static int hi0bits(register ULong x)
{
register int k= 0;
if (!(x & 0xffff0000))
{
k= 16;
x<<= 16;
}
if (!(x & 0xff000000))
{
k+= 8;
x<<= 8;
}
if (!(x & 0xf0000000))
{
k+= 4;
x<<= 4;
}
if (!(x & 0xc0000000))
{
k+= 2;
x<<= 2;
}
if (!(x & 0x80000000))
{
k++;
if (!(x & 0x40000000))
return 32;
}
return k;
} | O3 | c | hi0bits:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shll $0x10, %eax
xorl %ecx, %ecx
cmpl $0x10000, %edi # imm = 0x10000
setb %cl
cmovael %edi, %eax
shll $0x4, %ecx
movl %eax, %edx
shll $0x8, %edx
cmpl $0x1000000, %eax # imm = 0x1000000
cmovael %eax, %edx
leal 0x8(%rcx), %eax
cmovael %ecx, %eax
movl %edx, %ecx
shll $0x4, %ecx
cmpl $0x10000000, %edx # imm = 0x10000000
cmovael %edx, %ecx
leal 0x4(%rax), %edx
cmovael %eax, %edx
leal (,%rcx,4), %esi
movl $0x40000000, %eax # imm = 0x40000000
cmpl %eax, %ecx
cmovael %ecx, %esi
leal 0x2(%rdx), %ecx
cmovael %edx, %ecx
leal 0x1(%rcx), %edx
cmpl %eax, %esi
movl $0x20, %eax
cmovael %edx, %eax
testl %esi, %esi
cmovsl %ecx, %eax
popq %rbp
retq
| hi0bits:
push rbp
mov rbp, rsp
mov eax, edi
shl eax, 10h
xor ecx, ecx
cmp edi, offset stru_10000
setb cl
cmovnb eax, edi
shl ecx, 4
mov edx, eax
shl edx, 8
cmp eax, 1000000h
cmovnb edx, eax
lea eax, [rcx+8]
cmovnb eax, ecx
mov ecx, edx
shl ecx, 4
cmp edx, 10000000h
cmovnb ecx, edx
lea edx, [rax+4]
cmovnb edx, eax
lea esi, ds:0[rcx*4]
mov eax, 40000000h
cmp ecx, eax
cmovnb esi, ecx
lea ecx, [rdx+2]
cmovnb ecx, edx
lea edx, [rcx+1]
cmp esi, eax
mov eax, 20h ; ' '
cmovnb eax, edx
test esi, esi
cmovs eax, ecx
pop rbp
retn
| long long hi0bits(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // edx
bool v3; // cf
int v4; // eax
unsigned int v5; // ecx
bool v6; // cf
int v7; // edx
int v8; // esi
bool v9; // cf
unsigned int v10; // ecx
long long result; // rax
v1 = a1 << 16;
if ( a1 >= (unsigned int)&stru_10000 )
v1 = a1;
v2 = v1 << 8;
v3 = v1 < 0x1000000;
if ( v1 >= 0x1000000 )
v2 = v1;
v4 = 16 * (a1 < (unsigned int)&stru_10000) + 8;
if ( !v3 )
v4 = 16 * (a1 < (unsigned int)&stru_10000);
v5 = 16 * v2;
v6 = v2 < 0x10000000;
if ( v2 >= 0x10000000 )
v5 = v2;
v7 = v4 + 4;
if ( !v6 )
v7 = v4;
v8 = 4 * v5;
v9 = v5 < 0x40000000;
if ( v5 >= 0x40000000 )
v8 = v5;
v10 = v7 + 2;
if ( !v9 )
v10 = v7;
result = 32LL;
if ( (unsigned int)v8 >= 0x40000000 )
result = v10 + 1;
if ( v8 < 0 )
return v10;
return result;
}
| hi0bits:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL EAX,0x10
XOR ECX,ECX
CMP EDI,0x10000
SETC CL
CMOVNC EAX,EDI
SHL ECX,0x4
MOV EDX,EAX
SHL EDX,0x8
CMP EAX,0x1000000
CMOVNC EDX,EAX
LEA EAX,[RCX + 0x8]
CMOVNC EAX,ECX
MOV ECX,EDX
SHL ECX,0x4
CMP EDX,0x10000000
CMOVNC ECX,EDX
LEA EDX,[RAX + 0x4]
CMOVNC EDX,EAX
LEA ESI,[RCX*0x4]
MOV EAX,0x40000000
CMP ECX,EAX
CMOVNC ESI,ECX
LEA ECX,[RDX + 0x2]
CMOVNC ECX,EDX
LEA EDX,[RCX + 0x1]
CMP ESI,EAX
MOV EAX,0x20
CMOVNC EAX,EDX
TEST ESI,ESI
CMOVS EAX,ECX
POP RBP
RET
|
int hi0bits(uint param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
uVar2 = param_1 << 0x10;
if (param_1 >= 0x10000) {
uVar2 = param_1;
}
iVar4 = (uint)(param_1 < 0x10000) * 0x10;
uVar1 = uVar2 << 8;
if (0xffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 8;
if (0xffffff < uVar2) {
iVar3 = iVar4;
}
uVar2 = uVar1 << 4;
if (0xfffffff < uVar1) {
uVar2 = uVar1;
}
iVar4 = iVar3 + 4;
if (0xfffffff < uVar1) {
iVar4 = iVar3;
}
uVar1 = uVar2 * 4;
if (0x3fffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 2;
if (0x3fffffff < uVar2) {
iVar3 = iVar4;
}
iVar4 = 0x20;
if (0x3fffffff < uVar1) {
iVar4 = iVar3 + 1;
}
if ((int)uVar1 < 0) {
iVar4 = iVar3;
}
return iVar4;
}
| |
26,757 | 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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) | llama.cpp/common/json.hpp | json_value(value_t t)
{
switch (t)
{
case value_t::object:
{
object = create<object_t>();
break;
}
case value_t::array:
{
array = create<array_t>();
break;
}
case value_t::string:
{
string = create<string_t>("");
break;
}
case value_t::binary:
{
binary = create<binary_t>();
break;
}
case value_t::boolean:
{
boolean = static_cast<boolean_t>(false);
break;
}
case value_t::number_integer:
{
number_integer = static_cast<number_integer_t>(0);
break;
}
case value_t::number_unsigned:
{
number_unsigned = static_cast<number_unsigned_t>(0);
break;
}
case value_t::number_float:
{
number_float = static_cast<number_float_t>(0.0);
break;
}
case value_t::null:
{
object = nullptr; // silence warning, see #821
break;
}
case value_t::discarded:
default:
{
object = nullptr; // silence warning, see #821
if (JSON_HEDLEY_UNLIKELY(t == value_t::null))
{
JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE
}
break;
}
}
} | O3 | cpp | 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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t):
pushq %rbx
movq %rdi, %rbx
cmpl $0x8, %esi
ja 0x7391d
movl %esi, %eax
leaq 0x9ee5c(%rip), %rcx # 0x112770
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, (%rbx)
jmp 0x73996
movl $0x30, %edi
callq 0x20210
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %edx, %edx
movq %rdx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rdx, 0x28(%rax)
jmp 0x73993
movb $0x0, (%rbx)
jmp 0x73996
movl $0x18, %edi
callq 0x20210
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
jmp 0x73993
leaq 0xabecd(%rip), %rdi # 0x11f841
callq 0x73998
jmp 0x73993
movl $0x28, %edi
callq 0x20210
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movb $0x0, 0x20(%rax)
movq %rax, (%rbx)
popq %rbx
retq
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE:
push rbx
mov rbx, rdi
cmp esi, 8; switch 9 cases
ja short def_7391B; jumptable 000000000007391B default case, cases 0,5-7
mov eax, esi
lea rcx, jpt_7391B
movsxd rax, ds:(jpt_7391B - 112770h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_7391B:
mov qword ptr [rbx], 0; jumptable 000000000007391B default case, cases 0,5-7
jmp short loc_73996
loc_73926:
mov edi, 30h ; '0'; jumptable 000000000007391B case 1
call __Znwm; operator new(ulong)
lea rcx, [rax+8]
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
xor edx, edx
mov [rax+10h], rdx
mov [rax+18h], rcx
mov [rax+20h], rcx
mov [rax+28h], rdx
jmp short loc_73993
loc_7394E:
mov byte ptr [rbx], 0; jumptable 000000000007391B case 4
jmp short loc_73996
loc_73953:
mov edi, 18h; jumptable 000000000007391B case 2
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
jmp short loc_73993
loc_7396D:
lea rdi, aExampleToolCal+1Dh; jumptable 000000000007391B case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRA1_KcEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,char const(&)[1]>(char const(&)[1] &&)
jmp short loc_73993
loc_7397B:
mov edi, 28h ; '('; jumptable 000000000007391B case 8
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
movups xmmword ptr [rax+10h], xmm0
mov byte ptr [rax+20h], 0
loc_73993:
mov [rbx], rax
loc_73996:
pop rbx
retn
| long long 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>::json_value::json_value(
_BYTE *a1,
unsigned int a2)
{
long long result; // rax
result = a2;
switch ( a2 )
{
case 1u:
result = operator new(0x30uLL);
*(_OWORD *)result = 0LL;
*(_QWORD *)(result + 16) = 0LL;
*(_QWORD *)(result + 24) = result + 8;
*(_QWORD *)(result + 32) = result + 8;
*(_QWORD *)(result + 40) = 0LL;
goto LABEL_8;
case 2u:
result = operator new(0x18uLL);
*(_OWORD *)result = 0LL;
*(_QWORD *)(result + 16) = 0LL;
goto LABEL_8;
case 3u:
result = 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>::create<std::string,char const(&)[1]>("");
goto LABEL_8;
case 4u:
*a1 = 0;
return result;
case 8u:
result = operator new(0x28uLL);
*(_OWORD *)result = 0LL;
*(_OWORD *)(result + 16) = 0LL;
*(_BYTE *)(result + 32) = 0;
LABEL_8:
*(_QWORD *)a1 = result;
break;
default:
*(_QWORD *)a1 = 0LL;
break;
}
return result;
}
| json_value:
PUSH RBX
MOV RBX,RDI
CMP ESI,0x8
JA 0x0017391d
MOV EAX,ESI
LEA RCX,[0x212770]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV qword ptr [RBX],0x0
JMP 0x00173996
caseD_1:
MOV EDI,0x30
CALL 0x00120210
LEA RCX,[RAX + 0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
XOR EDX,EDX
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RAX + 0x18],RCX
MOV qword ptr [RAX + 0x20],RCX
MOV qword ptr [RAX + 0x28],RDX
JMP 0x00173993
caseD_4:
MOV byte ptr [RBX],0x0
JMP 0x00173996
caseD_2:
MOV EDI,0x18
CALL 0x00120210
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
JMP 0x00173993
caseD_3:
LEA RDI,[0x21f841]
CALL 0x00173998
JMP 0x00173993
caseD_8:
MOV EDI,0x28
CALL 0x00120210
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV byte ptr [RAX + 0x20],0x0
LAB_00173993:
MOV qword ptr [RBX],RAX
LAB_00173996:
POP RBX
RET
|
/* 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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) */
void __thiscall
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>
::json_value::json_value(json_value *this,int4 param_2)
{
string *psVar1;
switch(param_2) {
default:
*(int8 *)this = 0;
return;
case 1:
psVar1 = (string *)operator_new(0x30);
*(int8 *)psVar1 = 0;
*(int8 *)(psVar1 + 8) = 0;
*(int8 *)(psVar1 + 0x10) = 0;
*(string **)(psVar1 + 0x18) = psVar1 + 8;
*(string **)(psVar1 + 0x20) = psVar1 + 8;
*(int8 *)(psVar1 + 0x28) = 0;
break;
case 2:
psVar1 = (string *)operator_new(0x18);
*(int8 *)psVar1 = 0;
*(int8 *)(psVar1 + 8) = 0;
*(int8 *)(psVar1 + 0x10) = 0;
break;
case 3:
psVar1 = create<std::__cxx11::string,char_const(&)[1]>("");
break;
case 4:
*this = (json_value)0x0;
return;
case 8:
psVar1 = (string *)operator_new(0x28);
*(int8 *)psVar1 = 0;
*(int8 *)(psVar1 + 8) = 0;
*(int8 *)(psVar1 + 0x10) = 0;
*(int8 *)(psVar1 + 0x18) = 0;
psVar1[0x20] = (string)0x0;
}
*(string **)this = psVar1;
return;
}
| |
26,758 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::end() | hkr04[P]cpp-mcp/common/json.hpp | iterator end() noexcept
{
iterator result(this);
result.set_end();
return result;
} | 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>::end():
movq %rdi, %rax
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movq %rsi, (%rax)
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %rdi, 0x18(%rax)
movzbl (%rsi), %edx
cmpl $0x2, %edx
je 0xf9b3
cmpl $0x1, %edx
jne 0xf9bd
movq $0x0, (%rcx)
jmp 0xf9c1
movq $0x0, 0x10(%rax)
jmp 0xf9c1
movq %rdi, 0x18(%rax)
cmpl $0x2, %edx
je 0xf9d7
cmpl $0x1, %edx
jne 0xf9e4
movq 0x8(%rsi), %rdx
movq 0x8(%rdx), %rdx
movq %rdx, (%rcx)
retq
movq 0x8(%rsi), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x10(%rax)
retq
movq $0x1, 0x18(%rax)
retq
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv:
mov rax, rdi
mov rdi, 8000000000000000h
mov [rax], rsi
lea rcx, [rax+8]
xorps xmm0, xmm0
movups xmmword ptr [rax+8], xmm0
mov [rax+18h], rdi
movzx edx, byte ptr [rsi]
cmp edx, 2
jz short loc_F9B3
cmp edx, 1
jnz short loc_F9BD
mov qword ptr [rcx], 0
jmp short loc_F9C1
loc_F9B3:
mov qword ptr [rax+10h], 0
jmp short loc_F9C1
loc_F9BD:
mov [rax+18h], rdi
loc_F9C1:
cmp edx, 2
jz short loc_F9D7
cmp edx, 1
jnz short loc_F9E4
mov rdx, [rsi+8]
mov rdx, [rdx+8]
mov [rcx], rdx
retn
loc_F9D7:
mov rcx, [rsi+8]
mov rcx, [rcx+8]
mov [rax+10h], rcx
retn
loc_F9E4:
mov qword ptr [rax+18h], 1
retn
| _QWORD * nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::end(
_QWORD *a1,
unsigned __int8 *a2)
{
_QWORD *result; // rax
_QWORD *v3; // rcx
int v4; // edx
result = a1;
*a1 = a2;
v3 = a1 + 1;
*(_OWORD *)(a1 + 1) = 0LL;
a1[3] = 0x8000000000000000LL;
v4 = *a2;
if ( v4 == 2 )
{
a1[2] = 0LL;
}
else if ( v4 == 1 )
{
*v3 = 0LL;
}
else
{
a1[3] = 0x8000000000000000LL;
}
if ( v4 == 2 )
{
a1[2] = *(_QWORD *)(*((_QWORD *)a2 + 1) + 8LL);
}
else if ( v4 == 1 )
{
*v3 = *(_QWORD *)(*((_QWORD *)a2 + 1) + 8LL);
}
else
{
a1[3] = 1LL;
}
return result;
}
| end:
MOV RAX,RDI
MOV RDI,-0x8000000000000000
MOV qword ptr [RAX],RSI
LEA RCX,[RAX + 0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x8],XMM0
MOV qword ptr [RAX + 0x18],RDI
MOVZX EDX,byte ptr [RSI]
CMP EDX,0x2
JZ 0x0010f9b3
CMP EDX,0x1
JNZ 0x0010f9bd
MOV qword ptr [RCX],0x0
JMP 0x0010f9c1
LAB_0010f9b3:
MOV qword ptr [RAX + 0x10],0x0
JMP 0x0010f9c1
LAB_0010f9bd:
MOV qword ptr [RAX + 0x18],RDI
LAB_0010f9c1:
CMP EDX,0x2
JZ 0x0010f9d7
CMP EDX,0x1
JNZ 0x0010f9e4
MOV RDX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RDX + 0x8]
MOV qword ptr [RCX],RDX
RET
LAB_0010f9d7:
MOV RCX,qword ptr [RSI + 0x8]
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
RET
LAB_0010f9e4:
MOV qword ptr [RAX + 0x18],0x1
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>::end() */
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>
::end(void)
{
char cVar1;
char *in_RSI;
int8 *in_RDI;
*in_RDI = in_RSI;
in_RDI[1] = 0;
in_RDI[2] = 0;
in_RDI[3] = 0x8000000000000000;
cVar1 = *in_RSI;
if (cVar1 == '\x02') {
in_RDI[2] = 0;
}
else if (cVar1 == '\x01') {
in_RDI[1] = 0;
}
else {
in_RDI[3] = 0x8000000000000000;
}
if (cVar1 != '\x02') {
if (cVar1 == '\x01') {
in_RDI[1] = *(int8 *)(*(long *)(in_RSI + 8) + 8);
return;
}
in_RDI[3] = 1;
return;
}
in_RDI[2] = *(int8 *)(*(long *)(in_RSI + 8) + 8);
return;
}
| |
26,759 | common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | llama.cpp/common/arg.cpp | bool common_arg::get_value_from_env(std::string & output) {
if (env == nullptr) return false;
char * value = std::getenv(env);
if (value) {
output = value;
return true;
}
return false;
} | O3 | cpp | common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
movq 0x88(%rdi), %rdi
testq %rdi, %rdi
je 0x295e6
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0x20ce0
testq %rax, %rax
je 0x295e9
movq %rax, %r14
movq 0x8(%rbx), %r15
movq %rax, %rdi
callq 0x20680
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x20860
movb $0x1, %al
jmp 0x295eb
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN10common_arg18get_value_from_envERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
mov rdi, [rdi+88h]
test rdi, rdi
jz short loc_295E6
push r15
push r14
push rbx
mov rbx, rsi
call _getenv
test rax, rax
jz short loc_295E9
mov r14, rax
mov r15, [rbx+8]
mov rdi, rax
call _strlen
mov rdi, rbx
xor esi, esi
mov rdx, r15
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov al, 1
jmp short loc_295EB
loc_295E6:
xor eax, eax
retn
loc_295E9:
xor eax, eax
loc_295EB:
pop rbx
pop r14
pop r15
retn
| char common_arg::get_value_from_env(long long a1, long long a2)
{
long long v2; // rax
long long v3; // r14
long long v4; // r15
long long v5; // rax
if ( !*(_QWORD *)(a1 + 136) )
return 0;
v2 = getenv();
if ( !v2 )
return 0;
v3 = v2;
v4 = *(_QWORD *)(a2 + 8);
v5 = strlen(v2);
std::string::_M_replace(a2, 0LL, v4, v3, v5);
return 1;
}
| get_value_from_env:
MOV RDI,qword ptr [RDI + 0x88]
TEST RDI,RDI
JZ 0x001295e6
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
CALL 0x00120ce0
TEST RAX,RAX
JZ 0x001295e9
MOV R14,RAX
MOV R15,qword ptr [RBX + 0x8]
MOV RDI,RAX
CALL 0x00120680
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R15
MOV RCX,R14
MOV R8,RAX
CALL 0x00120860
MOV AL,0x1
JMP 0x001295eb
LAB_001295e6:
XOR EAX,EAX
RET
LAB_001295e9:
XOR EAX,EAX
LAB_001295eb:
POP RBX
POP R14
POP R15
RET
|
/* common_arg::get_value_from_env(std::__cxx11::string&) */
bool __thiscall common_arg::get_value_from_env(common_arg *this,string *param_1)
{
char *pcVar1;
char *__s;
if (*(char **)(this + 0x88) == (char *)0x0) {
return false;
}
__s = getenv(*(char **)(this + 0x88));
if (__s != (char *)0x0) {
pcVar1 = *(char **)(param_1 + 8);
strlen(__s);
std::__cxx11::string::_M_replace((ulong)param_1,0,pcVar1,(ulong)__s);
}
return __s != (char *)0x0;
}
| |
26,760 | parse_digits | bluesky950520[P]quickjs/libregexp.c | static int parse_digits(const uint8_t **pp, BOOL allow_overflow)
{
const uint8_t *p;
uint64_t v;
int c;
p = *pp;
v = 0;
for(;;) {
c = *p;
if (c < '0' || c > '9')
break;
v = v * 10 + c - '0';
if (v >= INT32_MAX) {
if (allow_overflow)
v = INT32_MAX;
else
return -1;
}
p++;
}
*pp = p;
return v;
} | O0 | c | parse_digits:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movq -0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rsp)
movq $0x0, -0x28(%rsp)
movq -0x20(%rsp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rsp)
cmpl $0x30, -0x2c(%rsp)
jl 0x108249
cmpl $0x39, -0x2c(%rsp)
jle 0x10824b
jmp 0x10829b
imulq $0xa, -0x28(%rsp), %rax
movslq -0x2c(%rsp), %rcx
addq %rcx, %rax
subq $0x30, %rax
movq %rax, -0x28(%rsp)
cmpq $0x7fffffff, -0x28(%rsp) # imm = 0x7FFFFFFF
jb 0x10828b
cmpl $0x0, -0x14(%rsp)
je 0x10827f
movq $0x7fffffff, -0x28(%rsp) # imm = 0x7FFFFFFF
jmp 0x108289
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x1082b1
jmp 0x10828b
movq -0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rsp)
jmp 0x10822f
movq -0x20(%rsp), %rcx
movq -0x10(%rsp), %rax
movq %rcx, (%rax)
movq -0x28(%rsp), %rax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
| parse_digits:
mov [rsp+var_10], rdi
mov [rsp+var_14], esi
mov rax, [rsp+var_10]
mov rax, [rax]
mov [rsp+var_20], rax
mov [rsp+var_28], 0
loc_10822F:
mov rax, [rsp+var_20]
movzx eax, byte ptr [rax]
mov [rsp+var_2C], eax
cmp [rsp+var_2C], 30h ; '0'
jl short loc_108249
cmp [rsp+var_2C], 39h ; '9'
jle short loc_10824B
loc_108249:
jmp short loc_10829B
loc_10824B:
imul rax, [rsp+var_28], 0Ah
movsxd rcx, [rsp+var_2C]
add rax, rcx
sub rax, 30h ; '0'
mov [rsp+var_28], rax
cmp [rsp+var_28], 7FFFFFFFh
jb short loc_10828B
cmp [rsp+var_14], 0
jz short loc_10827F
mov [rsp+var_28], 7FFFFFFFh
jmp short loc_108289
loc_10827F:
mov [rsp+var_4], 0FFFFFFFFh
jmp short loc_1082B1
loc_108289:
jmp short $+2
loc_10828B:
mov rax, [rsp+var_20]
add rax, 1
mov [rsp+var_20], rax
jmp short loc_10822F
loc_10829B:
mov rcx, [rsp+var_20]
mov rax, [rsp+var_10]
mov [rax], rcx
mov rax, [rsp+var_28]
mov [rsp+var_4], eax
loc_1082B1:
mov eax, [rsp+var_4]
retn
| long long parse_digits(unsigned __int8 **a1, int a2)
{
unsigned long long v3; // [rsp+4h] [rbp-28h]
unsigned __int8 *v4; // [rsp+Ch] [rbp-20h]
v4 = *a1;
v3 = 0LL;
while ( 1 )
{
if ( *v4 < 0x30u || *v4 > 0x39u )
{
*a1 = v4;
return (unsigned int)v3;
}
v3 = *v4 + 10 * v3 - 48;
if ( v3 >= 0x7FFFFFFF )
break;
LABEL_9:
++v4;
}
if ( a2 )
{
v3 = 0x7FFFFFFFLL;
goto LABEL_9;
}
return (unsigned int)-1;
}
| |||
26,761 | parse_digits | bluesky950520[P]quickjs/libregexp.c | static int parse_digits(const uint8_t **pp, BOOL allow_overflow)
{
const uint8_t *p;
uint64_t v;
int c;
p = *pp;
v = 0;
for(;;) {
c = *p;
if (c < '0' || c > '9')
break;
v = v * 10 + c - '0';
if (v >= INT32_MAX) {
if (allow_overflow)
v = INT32_MAX;
else
return -1;
}
p++;
}
*pp = p;
return v;
} | O2 | c | parse_digits:
movq (%rdi), %rcx
xorl %edx, %edx
pushq $-0x1
popq %rax
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
movzbl (%rcx), %r9d
leal -0x3a(%r9), %r10d
cmpb $-0xa, %r10b
jb 0x81e95
testl %esi, %esi
sete %r10b
imulq $0xa, %rdx, %rdx
addq %r9, %rdx
addq $-0x30, %rdx
cmpq $0x7fffffff, %rdx # imm = 0x7FFFFFFF
setae %r9b
testb %r10b, %r9b
jne 0x81e9a
cmpq %r8, %rdx
cmovaeq %r8, %rdx
incq %rcx
jmp 0x81e5a
movq %rcx, (%rdi)
movl %edx, %eax
retq
| parse_digits:
mov rcx, [rdi]
xor edx, edx
push 0FFFFFFFFFFFFFFFFh
pop rax
mov r8d, 7FFFFFFFh
loc_81E5A:
movzx r9d, byte ptr [rcx]
lea r10d, [r9-3Ah]
cmp r10b, 0F6h
jb short loc_81E95
test esi, esi
setz r10b
imul rdx, 0Ah
add rdx, r9
add rdx, 0FFFFFFFFFFFFFFD0h
cmp rdx, 7FFFFFFFh
setnb r9b
test r9b, r10b
jnz short locret_81E9A
cmp rdx, r8
cmovnb rdx, r8
inc rcx
jmp short loc_81E5A
loc_81E95:
mov [rdi], rcx
mov eax, edx
locret_81E9A:
retn
| long long parse_digits(unsigned __int8 **a1, int a2)
{
unsigned __int8 *v2; // rcx
unsigned long long v3; // rdx
long long result; // rax
long long v5; // r9
v2 = *a1;
v3 = 0LL;
result = -1LL;
while ( 1 )
{
v5 = *v2;
if ( (unsigned __int8)(v5 - 58) < 0xF6u )
break;
v3 = v5 + 10 * v3 - 48;
if ( a2 == 0 && v3 >= 0x7FFFFFFF )
return result;
if ( v3 >= 0x7FFFFFFF )
v3 = 0x7FFFFFFFLL;
++v2;
}
*a1 = v2;
return (unsigned int)v3;
}
| parse_digits:
MOV RCX,qword ptr [RDI]
XOR EDX,EDX
PUSH -0x1
POP RAX
MOV R8D,0x7fffffff
LAB_00181e5a:
MOVZX R9D,byte ptr [RCX]
LEA R10D,[R9 + -0x3a]
CMP R10B,0xf6
JC 0x00181e95
TEST ESI,ESI
SETZ R10B
IMUL RDX,RDX,0xa
ADD RDX,R9
ADD RDX,-0x30
CMP RDX,0x7fffffff
SETNC R9B
TEST R9B,R10B
JNZ 0x00181e9a
CMP RDX,R8
CMOVNC RDX,R8
INC RCX
JMP 0x00181e5a
LAB_00181e95:
MOV qword ptr [RDI],RCX
MOV EAX,EDX
LAB_00181e9a:
RET
|
ulong parse_digits(int8 *param_1,int param_2)
{
byte *pbVar1;
ulong uVar2;
pbVar1 = (byte *)*param_1;
uVar2 = 0;
while( true ) {
if ((byte)(*pbVar1 - 0x3a) < 0xf6) {
*param_1 = pbVar1;
return uVar2 & 0xffffffff;
}
uVar2 = (uVar2 * 10 + (ulong)*pbVar1) - 0x30;
if (0x7ffffffe < uVar2 && param_2 == 0) break;
if (0x7ffffffe < uVar2) {
uVar2 = 0x7fffffff;
}
pbVar1 = pbVar1 + 1;
}
return 0xffffffffffffffff;
}
| |
26,762 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool) | monkey531[P]llama/common/json.hpp | json_sax_dom_callback_parser(BasicJsonType& r,
const parser_callback_t cb,
const bool allow_exceptions_ = true)
: root(r), callback(cb), allow_exceptions(allow_exceptions_)
{
keep_stack.push_back(true);
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool):
subq $0x88, %rsp
movq %rdx, 0x48(%rsp)
movb %cl, %al
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
andb $0x1, %al
movb %al, 0x6f(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rcx
movq %rcx, (%rax)
movq %rax, %rdi
addq $0x8, %rdi
movq %rdi, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
callq 0xf2830
movaps 0x20(%rsp), %xmm0
movq 0x40(%rsp), %rax
movq %rax, %rdi
addq $0x20, %rdi
movq %rdi, 0x18(%rsp)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movq $0x0, 0x40(%rax)
callq 0x6ada0
movaps 0x20(%rsp), %xmm0
movq 0x40(%rsp), %rax
movq %rax, %rdi
addq $0x48, %rdi
movq %rdi, 0x38(%rsp)
movups %xmm0, 0x58(%rax)
movups %xmm0, 0x48(%rax)
movq $0x0, 0x68(%rax)
callq 0x6ada0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq $0x0, 0x70(%rdi)
movb $0x0, 0x78(%rdi)
subq $-0x80, %rdi
movq %rdi, 0x50(%rsp)
callq 0xeb0b0
jmp 0xedd9c
movq 0x40(%rsp), %rdi
movb 0x6f(%rsp), %al
andb $0x1, %al
movb %al, 0xa0(%rdi)
addq $0xa8, %rdi
movq %rdi, 0x8(%rsp)
movl $0x9, %esi
callq 0xf0660
jmp 0xeddc5
movq 0x40(%rsp), %rdi
addq $0x20, %rdi
movl $0x1, %esi
callq 0x71190
jmp 0xeddda
addq $0x88, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xede24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xede1a
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
callq 0xcb040
movq 0x50(%rsp), %rdi
callq 0xeaf90
movq 0x38(%rsp), %rdi
callq 0x66b30
movq 0x18(%rsp), %rdi
callq 0x66b30
movq 0x10(%rsp), %rdi
callq 0xf2840
movq 0x60(%rsp), %rdi
callq 0x56a10
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb:
sub rsp, 88h
mov [rsp+88h+var_40], rdx
mov al, cl
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_18], rdx
and al, 1
mov [rsp+88h+var_19], al
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_48], rax
mov rcx, [rsp+88h+var_10]
mov [rax], rcx
mov rdi, rax
add rdi, 8
mov [rsp+88h+var_78], rdi
xorps xmm0, xmm0
movaps [rsp+88h+var_68], xmm0
movups xmmword ptr [rax+8], xmm0
mov qword ptr [rax+18h], 0
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EEC2Ev; 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> *,std::allocator<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> *>>::vector(void)
movaps xmm0, [rsp+88h+var_68]
mov rax, [rsp+88h+var_48]
mov rdi, rax
add rdi, 20h ; ' '
mov [rsp+88h+var_70], rdi
movups xmmword ptr [rax+30h], xmm0
movups xmmword ptr [rax+20h], xmm0
mov qword ptr [rax+40h], 0
call _ZNSt6vectorIbSaIbEEC2Ev; std::vector<bool>::vector(void)
movaps xmm0, [rsp+88h+var_68]
mov rax, [rsp+88h+var_48]
mov rdi, rax
add rdi, 48h ; 'H'
mov [rsp+88h+var_50], rdi
movups xmmword ptr [rax+58h], xmm0
movups xmmword ptr [rax+48h], xmm0
mov qword ptr [rax+68h], 0
call _ZNSt6vectorIbSaIbEEC2Ev; std::vector<bool>::vector(void)
mov rdi, [rsp+88h+var_48]
mov rsi, [rsp+88h+var_40]
mov qword ptr [rdi+70h], 0
mov byte ptr [rdi+78h], 0
sub rdi, 0FFFFFFFFFFFFFF80h
mov [rsp+88h+var_38], rdi
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
jmp short $+2
loc_EDD9C:
mov rdi, [rsp+88h+var_48]
mov al, [rsp+88h+var_19]
and al, 1
mov [rdi+0A0h], al
add rdi, 0A8h
mov [rsp+88h+var_80], rdi
mov esi, 9
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ENS0_6detail7value_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>::basic_json(nlohmann::json_abi_v3_11_3::detail::value_t)
jmp short $+2
loc_EDDC5:
mov rdi, [rsp+88h+var_48]
add rdi, 20h ; ' '
mov esi, 1
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
jmp short $+2
loc_EDDDA:
add rsp, 88h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_EDE24
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_EDE1A
mov rdi, [rsp+arg_0]
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_EDE1A:
mov rdi, [rsp+arg_48]
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEED2Ev; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::~function()
loc_EDE24:
mov rdi, [rsp+arg_30]
call _ZNSt6vectorIbSaIbEED2Ev; std::vector<bool>::~vector()
mov rdi, [rsp+arg_10]
call _ZNSt6vectorIbSaIbEED2Ev; std::vector<bool>::~vector()
mov rdi, [rsp+arg_8]
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EED2Ev; 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> *,std::allocator<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> *>>::~vector()
mov rdi, [rsp+arg_58]
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser(
long long a1,
long long a2,
long long a3,
char a4)
{
char v6; // [rsp+6Fh] [rbp-19h]
v6 = a4 & 1;
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)(a1 + 24) = 0LL;
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> *,std::allocator<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> *>>::vector();
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_QWORD *)(a1 + 64) = 0LL;
std::vector<bool>::vector(a1 + 32);
*(_OWORD *)(a1 + 88) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
*(_QWORD *)(a1 + 104) = 0LL;
std::vector<bool>::vector(a1 + 72);
*(_QWORD *)(a1 + 112) = 0LL;
*(_BYTE *)(a1 + 120) = 0;
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
(std::_Function_base *)(a1 + 128),
a3);
*(_BYTE *)(a1 + 160) = v6 & 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>::basic_json(
a1 + 168,
9LL);
return std::vector<bool>::push_back(a1 + 32, 1);
}
| json_sax_dom_callback_parser:
SUB RSP,0x88
MOV qword ptr [RSP + 0x48],RDX
MOV AL,CL
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x70],RDX
AND AL,0x1
MOV byte ptr [RSP + 0x6f],AL
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x40],RAX
MOV RCX,qword ptr [RSP + 0x78]
MOV qword ptr [RAX],RCX
MOV RDI,RAX
ADD RDI,0x8
MOV qword ptr [RSP + 0x10],RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVUPS xmmword ptr [RAX + 0x8],XMM0
MOV qword ptr [RAX + 0x18],0x0
CALL 0x001f2830
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,RAX
ADD RDI,0x20
MOV qword ptr [RSP + 0x18],RDI
MOVUPS xmmword ptr [RAX + 0x30],XMM0
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOV qword ptr [RAX + 0x40],0x0
CALL 0x0016ada0
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,RAX
ADD RDI,0x48
MOV qword ptr [RSP + 0x38],RDI
MOVUPS xmmword ptr [RAX + 0x58],XMM0
MOVUPS xmmword ptr [RAX + 0x48],XMM0
MOV qword ptr [RAX + 0x68],0x0
CALL 0x0016ada0
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
MOV qword ptr [RDI + 0x70],0x0
MOV byte ptr [RDI + 0x78],0x0
SUB RDI,-0x80
MOV qword ptr [RSP + 0x50],RDI
LAB_001edd95:
CALL 0x001eb0b0
JMP 0x001edd9c
LAB_001edd9c:
MOV RDI,qword ptr [RSP + 0x40]
MOV AL,byte ptr [RSP + 0x6f]
AND AL,0x1
MOV byte ptr [RDI + 0xa0],AL
ADD RDI,0xa8
MOV qword ptr [RSP + 0x8],RDI
LAB_001eddb9:
MOV ESI,0x9
CALL 0x001f0660
JMP 0x001eddc5
LAB_001eddc5:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x20
LAB_001eddce:
MOV ESI,0x1
CALL 0x00171190
LAB_001eddd8:
JMP 0x001eddda
LAB_001eddda:
ADD RSP,0x88
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::json_sax_dom_callback_parser
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,int8 param_1,function *param_3,byte param_4)
{
*(int8 *)this = param_1;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::vector((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));
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x40) = 0;
std::vector<bool,std::allocator<bool>>::vector((vector<bool,std::allocator<bool>> *)(this + 0x20))
;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x68) = 0;
std::vector<bool,std::allocator<bool>>::vector((vector<bool,std::allocator<bool>> *)(this + 0x48))
;
*(int8 *)(this + 0x70) = 0;
this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
/* try { // try from 001edd95 to 001edd99 has its CatchHandler @ 001edde2 */
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)(this + 0x80),param_3);
this[0xa0] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)(param_4 & 1);
/* try { // try from 001eddb9 to 001eddc2 has its CatchHandler @ 001eddf2 */
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((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 + 0xa8),9);
/* try { // try from 001eddce to 001eddd7 has its CatchHandler @ 001ede02 */
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),true);
return;
}
| |
26,763 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool) | monkey531[P]llama/common/json.hpp | json_sax_dom_callback_parser(BasicJsonType& r,
const parser_callback_t cb,
const bool allow_exceptions_ = true)
: root(r), callback(cb), allow_exceptions(allow_exceptions_)
{
keep_stack.push_back(true);
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %r14
movq %rsi, (%rdi)
leaq 0x20(%rdi), %rbx
leaq 0x80(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movb $0x0, 0x78(%rdi)
movq %r15, %rdi
movq %rdx, %rsi
callq 0x52d70
movb %bpl, 0xa0(%r14)
leaq 0xa8(%r14), %r13
pushq $0x9
popq %rsi
movq %r13, %rdi
callq 0x54ec8
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x2b4ac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq %r13, %rdi
callq 0x46ce8
jmp 0x53ffd
movq %rax, %r12
movq %r15, %rdi
callq 0x2d672
jmp 0x5400a
movq %rax, %r12
leaq 0x8(%r14), %r15
addq $0x48, %r14
movq %r14, %rdi
callq 0x291fc
movq %rbx, %rdi
callq 0x291fc
movq %r15, %rdi
callq 0x55a44
movq %r12, %rdi
callq 0x22da0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, ecx
mov r14, rdi
mov [rdi], rsi
lea rbx, [rdi+20h]
lea r15, [rdi+80h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
movups xmmword ptr [rdi+18h], xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
movups xmmword ptr [rdi+48h], xmm0
movups xmmword ptr [rdi+58h], xmm0
movups xmmword ptr [rdi+68h], xmm0
mov byte ptr [rdi+78h], 0
mov rdi, r15
mov rsi, rdx
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
mov [r14+0A0h], bpl
lea r13, [r14+0A8h]
push 9
pop rsi
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ENS0_6detail7value_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>::basic_json(nlohmann::json_abi_v3_11_3::detail::value_t)
push 1
pop rsi
mov rdi, rbx
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r12, rax
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_53FFD
mov r12, rax
loc_53FFD:
mov rdi, r15; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_5400A
mov r12, rax
loc_5400A:
lea r15, [r14+8]
add r14, 48h ; 'H'
mov rdi, r14
call _ZNSt13_Bvector_baseISaIbEED2Ev; std::_Bvector_base<std::allocator<bool>>::~_Bvector_base()
mov rdi, rbx
call _ZNSt13_Bvector_baseISaIbEED2Ev; std::_Bvector_base<std::allocator<bool>>::~_Bvector_base()
mov rdi, r15
call _ZNSt12_Vector_baseIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEESaISF_EED2Ev; std::_Vector_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::~_Vector_base()
mov rdi, r12
call __Unwind_Resume
| _QWORD * nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser(
long long a1,
long long a2,
long long a3,
char a4)
{
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_OWORD *)(a1 + 24) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_BYTE *)(a1 + 120) = 0;
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
(_OWORD *)(a1 + 128),
a3);
*(_BYTE *)(a1 + 160) = a4;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
a1 + 168,
9LL);
return std::vector<bool>::push_back(a1 + 32, 1u);
}
| json_sax_dom_callback_parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R14,RDI
MOV qword ptr [RDI],RSI
LEA RBX,[RDI + 0x20]
LEA R15,[RDI + 0x80]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOVUPS xmmword ptr [RDI + 0x48],XMM0
MOVUPS xmmword ptr [RDI + 0x58],XMM0
MOVUPS xmmword ptr [RDI + 0x68],XMM0
MOV byte ptr [RDI + 0x78],0x0
LAB_00153faf:
MOV RDI,R15
MOV RSI,RDX
CALL 0x00152d70
MOV byte ptr [R14 + 0xa0],BPL
LEA R13,[R14 + 0xa8]
LAB_00153fc8:
PUSH 0x9
POP RSI
MOV RDI,R13
CALL 0x00154ec8
LAB_00153fd3:
PUSH 0x1
POP RSI
MOV RDI,RBX
CALL 0x0012b4ac
LAB_00153fde:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::json_sax_dom_callback_parser
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,int8 param_1,function *param_3,
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
param_4)
{
*(int8 *)this = param_1;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
/* try { // try from 00153faf to 00153fb9 has its CatchHandler @ 00154007 */
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)(this + 0x80),param_3);
this[0xa0] = param_4;
/* try { // try from 00153fc8 to 00153fd2 has its CatchHandler @ 00153ffa */
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(this + 0xa8,9);
/* try { // try from 00153fd3 to 00153fdd has its CatchHandler @ 00153fed */
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),true);
return;
}
| |
26,764 | test_im2col::build_graph(ggml_context*) | llama.cpp/tests/test-backend-ops.cpp | ggml_tensor * build_graph(ggml_context * ctx) override {
ggml_tensor * input = ggml_new_tensor(ctx, type_input, 4, ne_input.data());
ggml_set_param(ctx, input);
ggml_set_name(input, "input");
ggml_tensor * kernel = ggml_new_tensor(ctx, type_kernel, 4, ne_kernel.data());
ggml_set_name(kernel, "kernel");
ggml_tensor * out = ggml_im2col(ctx, kernel, input, s0, s1, p0, p1, d0, d1, is_2D, dst_type);
ggml_set_name(out, "out");
return out;
} | O3 | cpp | test_im2col::build_graph(ggml_context*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x38(%rdi), %esi
leaq 0x48(%rdi), %rcx
movq %rbx, %rdi
movl $0x4, %edx
callq 0x1cbe0
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2cc20
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ccb0
leaq 0x35c3c(%rip), %rsi # 0x68f31
movq %r15, %rdi
callq 0x1c690
movl 0x3c(%r14), %esi
leaq 0x68(%r14), %rcx
movq %rbx, %rdi
movl $0x4, %edx
callq 0x1cbe0
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2cc20
leaq 0x35c41(%rip), %rsi # 0x68f68
movq %r12, %rdi
callq 0x1c690
movl 0x40(%r14), %eax
movl 0x88(%r14), %ecx
movl 0x8c(%r14), %r8d
movl 0x90(%r14), %r9d
movl 0x94(%r14), %r10d
movl 0x98(%r14), %r11d
movl 0x9c(%r14), %r13d
movzbl 0xa0(%r14), %r14d
subq $0x8, %rsp
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
pushq %rax
pushq %r14
pushq %r13
pushq %r11
pushq %r10
callq 0x1c710
addq $0x30, %rsp
movq %rax, %rbx
leaq 0x3685d(%rip), %rsi # 0x69beb
movq %rax, %rdi
callq 0x1c690
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
| _ZN11test_im2col11build_graphEP12ggml_context:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rsi
mov r14, rdi
mov esi, [rdi+38h]
lea rcx, [rdi+48h]
mov rdi, rbx
mov edx, 4
call _ggml_new_tensor
mov r15, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov rdi, rbx
mov rsi, r15
call _ggml_set_param
lea rsi, aInput; "input"
mov rdi, r15
call _ggml_set_name
mov esi, [r14+3Ch]
lea rcx, [r14+68h]
mov rdi, rbx
mov edx, 4
call _ggml_new_tensor
mov r12, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
lea rsi, aKernel; "kernel"
mov rdi, r12
call _ggml_set_name
mov eax, [r14+40h]
mov ecx, [r14+88h]
mov r8d, [r14+8Ch]
mov r9d, [r14+90h]
mov r10d, [r14+94h]
mov r11d, [r14+98h]
mov r13d, [r14+9Ch]
movzx r14d, byte ptr [r14+0A0h]
sub rsp, 8
mov rdi, rbx
mov rsi, r12
mov rdx, r15
push rax
push r14
push r13
push r11
push r10
call _ggml_im2col
add rsp, 30h
mov rbx, rax
lea rsi, aSumOfOut+7; "out"
mov rdi, rax
call _ggml_set_name
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long test_im2col::build_graph(long long a1, long long a2)
{
long long v2; // r15
long long v3; // r12
long long v4; // rbx
v2 = ggml_new_tensor(a2, *(unsigned int *)(a1 + 56), 4LL);
test_case::add_sentinel(a1, a2);
ggml_set_param(a2, v2);
ggml_set_name(v2, "input");
v3 = ggml_new_tensor(a2, *(unsigned int *)(a1 + 60), 4LL);
test_case::add_sentinel(a1, a2);
ggml_set_name(v3, "kernel");
v4 = ggml_im2col(
a2,
v3,
v2,
*(unsigned int *)(a1 + 136),
*(unsigned int *)(a1 + 140),
*(unsigned int *)(a1 + 144),
*(unsigned int *)(a1 + 148),
*(unsigned int *)(a1 + 152),
*(unsigned int *)(a1 + 156),
*(unsigned __int8 *)(a1 + 160),
*(unsigned int *)(a1 + 64));
ggml_set_name(v4, "out");
return v4;
}
| build_graph:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x38]
LEA RCX,[RDI + 0x48]
MOV RDI,RBX
MOV EDX,0x4
CALL 0x0011cbe0
MOV R15,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012cc20
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011ccb0
LEA RSI,[0x168f31]
MOV RDI,R15
CALL 0x0011c690
MOV ESI,dword ptr [R14 + 0x3c]
LEA RCX,[R14 + 0x68]
MOV RDI,RBX
MOV EDX,0x4
CALL 0x0011cbe0
MOV R12,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012cc20
LEA RSI,[0x168f68]
MOV RDI,R12
CALL 0x0011c690
MOV EAX,dword ptr [R14 + 0x40]
MOV ECX,dword ptr [R14 + 0x88]
MOV R8D,dword ptr [R14 + 0x8c]
MOV R9D,dword ptr [R14 + 0x90]
MOV R10D,dword ptr [R14 + 0x94]
MOV R11D,dword ptr [R14 + 0x98]
MOV R13D,dword ptr [R14 + 0x9c]
MOVZX R14D,byte ptr [R14 + 0xa0]
SUB RSP,0x8
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
PUSH RAX
PUSH R14
PUSH R13
PUSH R11
PUSH R10
CALL 0x0011c710
ADD RSP,0x30
MOV RBX,RAX
LEA RSI,[0x169beb]
MOV RDI,RAX
CALL 0x0011c690
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* test_im2col::build_graph(ggml_context*) */
int8 __thiscall test_im2col::build_graph(test_im2col *this,ggml_context *param_1)
{
int8 uVar1;
int8 uVar2;
uVar1 = ggml_new_tensor(param_1,*(int4 *)(this + 0x38),4,this + 0x48);
test_case::add_sentinel((test_case *)this,param_1);
ggml_set_param(param_1,uVar1);
ggml_set_name(uVar1,"input");
uVar2 = ggml_new_tensor(param_1,*(int4 *)(this + 0x3c),4,this + 0x68);
test_case::add_sentinel((test_case *)this,param_1);
ggml_set_name(uVar2,"kernel");
uVar1 = ggml_im2col(param_1,uVar2,uVar1,*(int4 *)(this + 0x88),*(int4 *)(this + 0x8c),
*(int4 *)(this + 0x90),*(int4 *)(this + 0x94),
*(int4 *)(this + 0x98),*(int4 *)(this + 0x9c),this[0xa0],
*(int4 *)(this + 0x40));
ggml_set_name(uVar1,"out");
return uVar1;
}
| |
26,765 | test_write | eloqsql/storage/maria/ma_test3.c | int test_write(MARIA_HA *file,int id,int lock_type)
{
uint i,tries,count,lock;
lock=0;
if (rnd(2) == 0 || lock_type == F_RDLCK)
{
lock=1;
if (maria_lock_database(file,F_WRLCK))
{
if (lock_type == F_RDLCK && my_errno == EDEADLK)
{
printf("%2d: write: deadlock\n",id); fflush(stdout);
return 0;
}
fprintf(stderr,"%2d: Can't lock table (%d)\n",id,my_errno);
maria_close(file);
return 1;
}
if (rnd(2) == 0)
maria_extra(file,HA_EXTRA_WRITE_CACHE,0);
}
my_snprintf((char*) record.id, sizeof(record.id), "%7ld", (long) getpid());
strnmov((char*) record.text,"Testing...", sizeof(record.text));
tries=(uint) rnd(100)+10;
for (i=count=0 ; i < tries ; i++)
{
uint32 tmp=rnd(80000)+20000;
int4store(record.nr,tmp);
if (!maria_write(file,record.id))
count++;
else
{
if (my_errno != HA_ERR_FOUND_DUPP_KEY)
{
fprintf(stderr,"%2d: Got error %d (errno %d) from write\n",id,my_errno,
errno);
return 1;
}
}
}
if (lock)
{
maria_extra(file,HA_EXTRA_NO_CACHE,0);
if (maria_lock_database(file,F_UNLCK))
{
fprintf(stderr,"%2d: Can't unlock table\n",id);
exit(0);
}
}
printf("%2d: write: %5d\n",id,count); fflush(stdout);
return 0;
} | O3 | c | test_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r14
callq 0x29210
testl %r15d, %r15d
setne %r12b
andb %al, %r12b
je 0x30e30
movb %r12b, -0x29(%rbp)
movl %ebx, -0x30(%rbp)
callq 0x298d0
movslq %eax, %rcx
leaq 0x3ce6bf(%rip), %rdi # 0x3ff3d0
leaq 0xaa5d1(%rip), %rdx # 0xdb2e9
xorl %r15d, %r15d
movl $0x8, %esi
xorl %eax, %eax
callq 0xd9a12
leaq 0x3ce6ae(%rip), %rdi # 0x3ff3dc
leaq 0xaa5b9(%rip), %rsi # 0xdb2ee
movl $0xa, %edx
callq 0xd9e14
callq 0x29210
movq %rax, %r12
movabsq $-0x5c28f5c28f5c28f5, %rcx # imm = 0xA3D70A3D70A3D70B
imulq %rcx
addq %r12, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x6, %rdx
addl %eax, %edx
imull $0x64, %edx, %eax
subl %eax, %r12d
addl $0xa, %r12d
je 0x30dd6
xorl %r15d, %r15d
movabsq $0x346dc5d63886594b, %rbx # imm = 0x346DC5D63886594B
leaq 0x3ce64c(%rip), %r13 # 0x3ff3d0
callq 0x29210
movq %rax, %rcx
imulq %rbx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0xe, %rdx
addl %eax, %edx
imull $0x13880, %edx, %eax # imm = 0x13880
subl %eax, %ecx
addl $0x4e20, %ecx # imm = 0x4E20
movl %ecx, 0x3ce628(%rip) # 0x3ff3d8
movq %r14, %rdi
movq %r13, %rsi
callq 0x5203b
testl %eax, %eax
je 0x30dce
callq 0xa48d6
cmpl $0x79, (%rax)
je 0x30dd1
jmp 0x30ec5
incl %r15d
decl %r12d
jne 0x30d84
cmpb $0x0, -0x29(%rbp)
jne 0x30e00
movq %r14, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x362a4
movq %r14, %rdi
movl $0x2, %esi
callq 0x3e19c
testl %eax, %eax
jne 0x30f13
leaq 0xaa51b(%rip), %rsi # 0xdb322
xorl %r12d, %r12d
movl $0x1, %edi
movl -0x30(%rbp), %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x297d0
movq 0x35617d(%rip), %rax # 0x386fa0
movq (%rax), %rdi
callq 0x293d0
jmp 0x30f01
movq %r14, %rdi
movl $0x1, %esi
callq 0x3e19c
testl %eax, %eax
je 0x30ea4
testl %r15d, %r15d
jne 0x30e6a
callq 0xa48d6
cmpl $0x23, (%rax)
jne 0x30e6a
leaq 0xaa47b(%rip), %rsi # 0xdb2d2
xorl %r12d, %r12d
movl $0x1, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x297d0
jmp 0x30e1c
movq 0x356137(%rip), %rax # 0x386fa8
movq (%rax), %r15
callq 0xa48d6
movl (%rax), %r8d
leaq 0xaa3e1(%rip), %rdx # 0xdb264
movl $0x1, %r12d
movq %r15, %rdi
movl $0x1, %esi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x291d0
movq %r14, %rdi
callq 0x5891c
jmp 0x30f01
callq 0x29210
testb $0x1, %al
jne 0x30cfb
movq %r14, %rdi
movl $0xe, %esi
xorl %edx, %edx
callq 0x362a4
jmp 0x30cfb
movq 0x3560dc(%rip), %rax # 0x386fa8
movq (%rax), %r14
callq 0xa48d6
movl (%rax), %r15d
callq 0x29770
movl (%rax), %r9d
leaq 0xaa413(%rip), %rdx # 0xdb2f9
movl $0x1, %r12d
movq %r14, %rdi
movl $0x1, %esi
movl -0x30(%rbp), %ecx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x291d0
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x35608e(%rip), %rax # 0x386fa8
movq (%rax), %rdi
leaq 0xaa2f7(%rip), %rdx # 0xdb21b
movl $0x1, %esi
movl -0x30(%rbp), %ecx
xorl %eax, %eax
callq 0x291d0
xorl %edi, %edi
callq 0x29500
| test_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, edx
mov ebx, esi
mov r14, rdi
call _lrand48
test r15d, r15d
setnz r12b
and r12b, al
jz loc_30E30
loc_30CFB:
mov [rbp+var_29], r12b
mov [rbp+var_30], ebx
call _getpid
movsxd rcx, eax
lea rdi, record
lea rdx, a7ld; "%7ld"
xor r15d, r15d
mov esi, 8
xor eax, eax
call my_snprintf
lea rdi, unk_3FF3DC
lea rsi, aTesting; "Testing..."
mov edx, 0Ah
call strnmov
call _lrand48
mov r12, rax
mov rcx, 0A3D70A3D70A3D70Bh
imul rcx
add rdx, r12
mov rax, rdx
shr rax, 3Fh
shr rdx, 6
add edx, eax
imul eax, edx, 64h ; 'd'
sub r12d, eax
add r12d, 0Ah
jz short loc_30DD6
xor r15d, r15d
mov rbx, 346DC5D63886594Bh
lea r13, record
loc_30D84:
call _lrand48
mov rcx, rax
imul rbx
mov rax, rdx
shr rax, 3Fh
shr rdx, 0Eh
add edx, eax
imul eax, edx, 13880h
sub ecx, eax
add ecx, 4E20h
mov cs:dword_3FF3D8, ecx
mov rdi, r14
mov rsi, r13
call maria_write
test eax, eax
jz short loc_30DCE
call _my_thread_var
cmp dword ptr [rax], 79h ; 'y'
jz short loc_30DD1
jmp loc_30EC5
loc_30DCE:
inc r15d
loc_30DD1:
dec r12d
jnz short loc_30D84
loc_30DD6:
cmp [rbp+var_29], 0
jnz short loc_30E00
mov rdi, r14
mov esi, 4
xor edx, edx
call maria_extra
mov rdi, r14
mov esi, 2
call maria_lock_database
test eax, eax
jnz loc_30F13
loc_30E00:
lea rsi, a2dWrite5d; "%2d: write: %5d\n"
xor r12d, r12d
mov edi, 1
mov edx, [rbp+var_30]
mov ecx, r15d
xor eax, eax
call ___printf_chk
loc_30E1C:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
jmp loc_30F01
loc_30E30:
mov rdi, r14
mov esi, 1
call maria_lock_database
test eax, eax
jz short loc_30EA4
test r15d, r15d
jnz short loc_30E6A
call _my_thread_var
cmp dword ptr [rax], 23h ; '#'
jnz short loc_30E6A
lea rsi, a2dWriteDeadloc; "%2d: write: deadlock\n"
xor r12d, r12d
mov edi, 1
mov edx, ebx
xor eax, eax
call ___printf_chk
jmp short loc_30E1C
loc_30E6A:
mov rax, cs:stderr_ptr
mov r15, [rax]
call _my_thread_var
mov r8d, [rax]
lea rdx, a2dCanTLockTabl_0; "%2d: Can't lock table (%d)\n"
mov r12d, 1
mov rdi, r15
mov esi, 1
mov ecx, ebx
xor eax, eax
call ___fprintf_chk
mov rdi, r14
call maria_close
jmp short loc_30F01
loc_30EA4:
call _lrand48
test al, 1
jnz loc_30CFB
mov rdi, r14
mov esi, 0Eh
xor edx, edx
call maria_extra
jmp loc_30CFB
loc_30EC5:
mov rax, cs:stderr_ptr
mov r14, [rax]
call _my_thread_var
mov r15d, [rax]
call ___errno_location
mov r9d, [rax]
lea rdx, a2dGotErrorDErr; "%2d: Got error %d (errno %d) from write"...
mov r12d, 1
mov rdi, r14
mov esi, 1
mov ecx, [rbp+var_30]
mov r8d, r15d
xor eax, eax
call ___fprintf_chk
loc_30F01:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_30F13:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rdx, a2dCanTUnlockTa; "%2d: Can't unlock table\n"
mov esi, 1
mov ecx, [rbp+var_30]
xor eax, eax
call ___fprintf_chk
xor edi, edi
call _exit
| long long test_write(void *a1, int a2, int a3)
{
int v5; // eax
int v6; // r15d
int v7; // r8d
int v8; // r9d
void *v9; // rdi
int v10; // eax
int v11; // r12d
long long v12; // r15
_DWORD *v13; // rax
long long v14; // r14
int v15; // r15d
_DWORD *v16; // rax
unsigned int v17; // r12d
int v19; // [rsp+0h] [rbp-30h]
char v20; // [rsp+7h] [rbp-29h]
if ( ((unsigned __int8)lrand48(a1) & (a3 != 0)) == 0 )
{
if ( (unsigned int)maria_lock_database(a1, 1LL) )
{
if ( a3 || *(_DWORD *)my_thread_var(a1) != 35 )
{
v12 = stderr;
v13 = (_DWORD *)my_thread_var(a1);
v17 = 1;
__fprintf_chk(v12, 1LL, "%2d: Can't lock table (%d)\n", a2, *v13);
maria_close(a1);
return v17;
}
v17 = 0;
__printf_chk(1LL, "%2d: write: deadlock\n", a2);
goto LABEL_12;
}
if ( (lrand48(a1) & 1) == 0 )
maria_extra(a1, 14LL, 0LL);
}
v5 = getpid();
v6 = 0;
my_snprintf((unsigned int)&record, 8, (unsigned int)"%7ld", v5, v7, v8, a2);
v9 = &unk_3FF3DC;
strnmov(&unk_3FF3DC, "Testing...", 10LL);
v10 = lrand48(&unk_3FF3DC);
v11 = v10 % 100 + 10;
if ( v10 % 100 == -10 )
{
LABEL_9:
if ( !v20 )
{
maria_extra(a1, 4LL, 0LL);
if ( (unsigned int)maria_lock_database(a1, 2LL) )
{
__fprintf_chk(stderr, 1LL, "%2d: Can't unlock table\n", v19);
exit(0LL);
}
}
v17 = 0;
__printf_chk(1LL, "%2d: write: %5d\n", v19, v6);
LABEL_12:
fflush(stdout);
return v17;
}
v6 = 0;
while ( 1 )
{
dword_3FF3D8 = (int)lrand48(v9) % 80000 + 20000;
v9 = a1;
if ( !(unsigned int)maria_write(a1, &record) )
{
++v6;
goto LABEL_8;
}
if ( *(_DWORD *)my_thread_var(a1) != 121 )
break;
LABEL_8:
if ( !--v11 )
goto LABEL_9;
}
v14 = stderr;
v15 = *(_DWORD *)my_thread_var(v9);
v16 = (_DWORD *)__errno_location(v9);
v17 = 1;
__fprintf_chk(v14, 1LL, "%2d: Got error %d (errno %d) from write\n", v19, v15, *v16);
return v17;
}
| test_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,EDX
MOV EBX,ESI
MOV R14,RDI
CALL 0x00129210
TEST R15D,R15D
SETNZ R12B
AND R12B,AL
JZ 0x00130e30
LAB_00130cfb:
MOV byte ptr [RBP + -0x29],R12B
MOV dword ptr [RBP + -0x30],EBX
CALL 0x001298d0
MOVSXD RCX,EAX
LEA RDI,[0x4ff3d0]
LEA RDX,[0x1db2e9]
XOR R15D,R15D
MOV ESI,0x8
XOR EAX,EAX
CALL 0x001d9a12
LEA RDI,[0x4ff3dc]
LEA RSI,[0x1db2ee]
MOV EDX,0xa
CALL 0x001d9e14
CALL 0x00129210
MOV R12,RAX
MOV RCX,-0x5c28f5c28f5c28f5
IMUL RCX
ADD RDX,R12
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x6
ADD EDX,EAX
IMUL EAX,EDX,0x64
SUB R12D,EAX
ADD R12D,0xa
JZ 0x00130dd6
XOR R15D,R15D
MOV RBX,0x346dc5d63886594b
LEA R13,[0x4ff3d0]
LAB_00130d84:
CALL 0x00129210
MOV RCX,RAX
IMUL RBX
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0xe
ADD EDX,EAX
IMUL EAX,EDX,0x13880
SUB ECX,EAX
ADD ECX,0x4e20
MOV dword ptr [0x004ff3d8],ECX
MOV RDI,R14
MOV RSI,R13
CALL 0x0015203b
TEST EAX,EAX
JZ 0x00130dce
CALL 0x001a48d6
CMP dword ptr [RAX],0x79
JZ 0x00130dd1
JMP 0x00130ec5
LAB_00130dce:
INC R15D
LAB_00130dd1:
DEC R12D
JNZ 0x00130d84
LAB_00130dd6:
CMP byte ptr [RBP + -0x29],0x0
JNZ 0x00130e00
MOV RDI,R14
MOV ESI,0x4
XOR EDX,EDX
CALL 0x001362a4
MOV RDI,R14
MOV ESI,0x2
CALL 0x0013e19c
TEST EAX,EAX
JNZ 0x00130f13
LAB_00130e00:
LEA RSI,[0x1db322]
XOR R12D,R12D
MOV EDI,0x1
MOV EDX,dword ptr [RBP + -0x30]
MOV ECX,R15D
XOR EAX,EAX
CALL 0x001297d0
LAB_00130e1c:
MOV RAX,qword ptr [0x00486fa0]
MOV RDI,qword ptr [RAX]
CALL 0x001293d0
JMP 0x00130f01
LAB_00130e30:
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013e19c
TEST EAX,EAX
JZ 0x00130ea4
TEST R15D,R15D
JNZ 0x00130e6a
CALL 0x001a48d6
CMP dword ptr [RAX],0x23
JNZ 0x00130e6a
LEA RSI,[0x1db2d2]
XOR R12D,R12D
MOV EDI,0x1
MOV EDX,EBX
XOR EAX,EAX
CALL 0x001297d0
JMP 0x00130e1c
LAB_00130e6a:
MOV RAX,qword ptr [0x00486fa8]
MOV R15,qword ptr [RAX]
CALL 0x001a48d6
MOV R8D,dword ptr [RAX]
LEA RDX,[0x1db264]
MOV R12D,0x1
MOV RDI,R15
MOV ESI,0x1
MOV ECX,EBX
XOR EAX,EAX
CALL 0x001291d0
MOV RDI,R14
CALL 0x0015891c
JMP 0x00130f01
LAB_00130ea4:
CALL 0x00129210
TEST AL,0x1
JNZ 0x00130cfb
MOV RDI,R14
MOV ESI,0xe
XOR EDX,EDX
CALL 0x001362a4
JMP 0x00130cfb
LAB_00130ec5:
MOV RAX,qword ptr [0x00486fa8]
MOV R14,qword ptr [RAX]
CALL 0x001a48d6
MOV R15D,dword ptr [RAX]
CALL 0x00129770
MOV R9D,dword ptr [RAX]
LEA RDX,[0x1db2f9]
MOV R12D,0x1
MOV RDI,R14
MOV ESI,0x1
MOV ECX,dword ptr [RBP + -0x30]
MOV R8D,R15D
XOR EAX,EAX
CALL 0x001291d0
LAB_00130f01:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00130f13:
MOV RAX,qword ptr [0x00486fa8]
MOV RDI,qword ptr [RAX]
LEA RDX,[0x1db21b]
MOV ESI,0x1
MOV ECX,dword ptr [RBP + -0x30]
XOR EAX,EAX
CALL 0x001291d0
XOR EDI,EDI
CALL 0x00129500
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int4 test_write(int8 param_1,int4 param_2,int param_3)
{
int4 uVar1;
int8 uVar2;
__pid_t _Var3;
int iVar4;
long lVar5;
int *piVar6;
ulong uVar7;
int4 *puVar8;
byte bVar9;
int iVar10;
int iVar11;
lVar5 = lrand48();
bVar9 = param_3 != 0 & (byte)lVar5;
if (bVar9 == 0) {
iVar10 = maria_lock_database(param_1,1);
if (iVar10 != 0) {
if ((param_3 != 0) || (piVar6 = (int *)_my_thread_var(), *piVar6 != 0x23)) {
uVar2 = *(int8 *)PTR_stderr_00486fa8;
puVar8 = (int4 *)_my_thread_var();
__fprintf_chk(uVar2,1,"%2d: Can\'t lock table (%d)\n",param_2,*puVar8);
maria_close(param_1);
return 1;
}
__printf_chk(1,"%2d: write: deadlock\n",param_2);
goto LAB_00130e1c;
}
uVar7 = lrand48();
if ((uVar7 & 1) == 0) {
maria_extra(param_1,0xe,0);
}
}
_Var3 = getpid();
iVar11 = 0;
my_snprintf(&record,8,&DAT_001db2e9,(long)_Var3);
strnmov(&DAT_004ff3dc,"Testing...",10);
lVar5 = lrand48();
iVar10 = (int)lVar5 +
((int)(SUB168(SEXT816(lVar5) * ZEXT816(0xa3d70a3d70a3d70b),8) >> 6) -
(SUB164(SEXT816(lVar5) * ZEXT816(0xa3d70a3d70a3d70b),0xc) >> 0x1f)) * -100 + 10;
if (iVar10 != 0) {
iVar11 = 0;
do {
lVar5 = lrand48();
_DAT_004ff3d8 =
(int)lVar5 +
((int)(SUB168(SEXT816(lVar5) * SEXT816(0x346dc5d63886594b),8) >> 0xe) -
(SUB164(SEXT816(lVar5) * SEXT816(0x346dc5d63886594b),0xc) >> 0x1f)) * -80000 + 20000;
iVar4 = maria_write(param_1,&record);
if (iVar4 == 0) {
iVar11 = iVar11 + 1;
}
else {
piVar6 = (int *)_my_thread_var();
if (*piVar6 != 0x79) {
uVar2 = *(int8 *)PTR_stderr_00486fa8;
puVar8 = (int4 *)_my_thread_var();
uVar1 = *puVar8;
piVar6 = __errno_location();
__fprintf_chk(uVar2,1,"%2d: Got error %d (errno %d) from write\n",param_2,uVar1,*piVar6);
return 1;
}
}
iVar10 = iVar10 + -1;
} while (iVar10 != 0);
}
if (bVar9 == 0) {
maria_extra(param_1,4,0);
iVar10 = maria_lock_database(param_1,2);
if (iVar10 != 0) {
__fprintf_chk(*(int8 *)PTR_stderr_00486fa8,1,"%2d: Can\'t unlock table\n",param_2);
/* WARNING: Subroutine does not return */
exit(0);
}
}
__printf_chk(1,"%2d: write: %5d\n",param_2,iVar11);
LAB_00130e1c:
fflush(*(FILE **)PTR_stdout_00486fa0);
return 0;
}
| |
26,766 | my_mb_wc_utf8mb4_no_range | eloqsql/strings/ctype-utf8.c | static int
my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s)
{
uchar c;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (!IS_CONTINUATION_BYTE(s[1]))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
if (c < 0xf0)
{
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0x14018d
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x140389
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0x1401a4
movl $0x0, -0x4(%rbp)
jmp 0x140389
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0x140200
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x1401cd
movl $0x0, -0x4(%rbp)
jmp 0x140389
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x140389
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x1402a2
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x14024d
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x14024d
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0x140259
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x140259
movl $0x0, -0x4(%rbp)
jmp 0x140389
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x140389
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0x140380
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x14031b
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x14031b
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x14031b
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0x140301
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x14031b
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0x140324
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x140324
movl $0x0, -0x4(%rbp)
jmp 0x140389
movzbl -0x21(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
shlq $0x12, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0xc, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x140389
jmp 0x140382
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
| my_mb_wc_utf8mb4_no_range:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_20]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_14018D
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_140389
loc_14018D:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_1401A4
mov [rbp+var_4], 0
jmp loc_140389
loc_1401A4:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_140200
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_1401CD
mov [rbp+var_4], 0
jmp loc_140389
loc_1401CD:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_140389
loc_140200:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_1402A2
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_14024D
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_14024D
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_140259
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_140259
loc_14024D:
mov [rbp+var_4], 0
jmp loc_140389
loc_140259:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 3
jmp loc_140389
loc_1402A2:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_140380
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_14031B
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_14031B
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_14031B
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_140301
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_14031B
loc_140301:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_140324
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_140324
loc_14031B:
mov [rbp+var_4], 0
jmp short loc_140389
loc_140324:
movzx eax, [rbp+var_21]
and eax, 7
movsxd rcx, eax
shl rcx, 12h
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 0Ch
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_140389
loc_140380:
jmp short $+2
loc_140382:
mov [rbp+var_4], 0
loc_140389:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf8mb4_no_range(long long a1, unsigned long long *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
v4 = *a3;
if ( *a3 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
if ( v4 >= 0xF5u )
{
return 0;
}
else if ( (a3[1] ^ 0x80) < 64
&& (a3[2] ^ 0x80) < 64
&& (a3[3] ^ 0x80) < 64
&& (v4 >= 0xF1u || a3[1] >= 0x90u)
&& (v4 <= 0xF3u || a3[1] <= 0x8Fu) )
{
*a2 = a3[3] ^ 0x80u | ((long long)(a3[2] ^ 0x80u) << 6) | ((long long)(a3[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18);
return 4;
}
else
{
return 0;
}
}
else if ( (a3[1] ^ 0x80) < 64 && (a3[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a3[1] >= 0xA0u) )
{
*a2 = a3[2] ^ 0x80u | ((long long)(a3[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else if ( (a3[1] ^ 0x80) < 64 )
{
*a2 = a3[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else
{
*a2 = v4;
return 1;
}
}
| |||
26,767 | my_mb_wc_utf8mb4_no_range | eloqsql/strings/ctype-utf8.c | static int
my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s)
{
uchar c;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (!IS_CONTINUATION_BYTE(s[1]))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
if (c < 0xf0)
{
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movzbl (%rsi), %ecx
testb %cl, %cl
js 0xcf3f8
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0xcf3ff
xorl %eax, %eax
cmpb $-0x3e, %cl
jae 0xcf401
popq %rbp
retq
cmpb $-0x21, %cl
ja 0xcf424
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
cmpb $0x3f, %dl
ja 0xcf3ff
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0xcf3f3
cmpb $-0x11, %cl
ja 0xcf470
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0xcf3ff
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0xcf3ff
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
testb %r9b, %r8b
jne 0xcf3ff
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x3, %eax
movq %rsi, %rcx
jmp 0xcf3f3
cmpb $-0xc, %cl
ja 0xcf3ff
movzbl 0x1(%rsi), %r8d
cmpb $-0x41, %r8b
jg 0xcf3ff
movzbl 0x2(%rsi), %edx
cmpb $-0x41, %dl
jg 0xcf3ff
movzbl 0x3(%rsi), %esi
cmpb $-0x41, %sil
jg 0xcf3ff
cmpl $0xf0, %ecx
sete %r9b
cmpb $-0x70, %r8b
setb %r10b
testb %r10b, %r9b
jne 0xcf3ff
cmpl $0xf4, %ecx
sete %r9b
cmpb $-0x70, %r8b
setae %r10b
testb %r10b, %r9b
jne 0xcf3ff
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %r8d
shll $0xc, %r8d
orl %ecx, %r8d
andl $0x3f, %edx
shll $0x6, %edx
orl %r8d, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x4, %eax
jmp 0xcf46b
| my_mb_wc_utf8mb4_no_range:
push rbp
mov rbp, rsp
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_CF3F8
mov eax, 1
loc_CF3F3:
mov [rdi], rcx
jmp short loc_CF3FF
loc_CF3F8:
xor eax, eax
cmp cl, 0C2h
jnb short loc_CF401
loc_CF3FF:
pop rbp
retn
loc_CF401:
cmp cl, 0DFh
ja short loc_CF424
movzx edx, byte ptr [rsi+1]
xor edx, 80h
cmp dl, 3Fh ; '?'
ja short loc_CF3FF
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_CF3F3
loc_CF424:
cmp cl, 0EFh
ja short loc_CF470
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_CF3FF
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_CF3FF
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
test r8b, r9b
jnz short loc_CF3FF
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and esi, 3Fh
or rsi, rdx
mov eax, 3
loc_CF46B:
mov rcx, rsi
jmp short loc_CF3F3
loc_CF470:
cmp cl, 0F4h
ja short loc_CF3FF
movzx r8d, byte ptr [rsi+1]
cmp r8b, 0BFh
jg loc_CF3FF
movzx edx, byte ptr [rsi+2]
cmp dl, 0BFh
jg loc_CF3FF
movzx esi, byte ptr [rsi+3]
cmp sil, 0BFh
jg loc_CF3FF
cmp ecx, 0F0h
setz r9b
cmp r8b, 90h
setb r10b
test r9b, r10b
jnz loc_CF3FF
cmp ecx, 0F4h
setz r9b
cmp r8b, 90h
setnb r10b
test r9b, r10b
jnz loc_CF3FF
and ecx, 7
shl ecx, 12h
and r8d, 3Fh
shl r8d, 0Ch
or r8d, ecx
and edx, 3Fh
shl edx, 6
or edx, r8d
and esi, 3Fh
or rsi, rdx
mov eax, 4
jmp loc_CF46B
| long long my_mb_wc_utf8mb4_no_range(unsigned long long *a1, unsigned __int8 *a2)
{
unsigned long long v2; // rcx
long long result; // rax
char v4; // dl
char v5; // si
unsigned long long v6; // rsi
char v7; // r8
char v8; // dl
char v9; // si
v2 = *a2;
if ( (v2 & 0x80u) == 0LL )
{
result = 1LL;
LABEL_3:
*a1 = v2;
return result;
}
result = 0LL;
if ( (unsigned __int8)v2 >= 0xC2u )
{
if ( (unsigned __int8)v2 > 0xDFu )
{
if ( (unsigned __int8)v2 > 0xEFu )
{
if ( (unsigned __int8)v2 > 0xF4u )
return result;
v7 = a2[1];
if ( v7 > -65 )
return result;
v8 = a2[2];
if ( v8 > -65 )
return result;
v9 = a2[3];
if ( v9 > -65
|| (unsigned __int8)v7 < 0x90u && (_DWORD)v2 == 240
|| (unsigned __int8)v7 >= 0x90u && (_DWORD)v2 == 244 )
{
return result;
}
v6 = ((v2 & 7) << 18) | ((unsigned __int8)(v7 & 0x3F) << 12) | ((unsigned __int8)(v8 & 0x3F) << 6) | v9 & 0x3F;
result = 4LL;
}
else
{
v4 = a2[1];
if ( v4 > -65 )
return result;
v5 = a2[2];
if ( v5 > -65 || (unsigned __int8)v4 < 0xA0u && (_DWORD)v2 == 224 )
return result;
v6 = (unsigned __int16)((_WORD)v2 << 12) | ((unsigned __int8)(v4 & 0x3F) << 6) | (unsigned long long)(v5 & 0x3F);
result = 3LL;
}
v2 = v6;
goto LABEL_3;
}
if ( (a2[1] ^ 0x80u) <= 0x3F )
{
v2 = a2[1] ^ 0x80 | ((unsigned __int8)(v2 & 0x1F) << 6);
result = 2LL;
goto LABEL_3;
}
}
return result;
}
| my_mb_wc_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOVZX ECX,byte ptr [RSI]
TEST CL,CL
JS 0x001cf3f8
MOV EAX,0x1
LAB_001cf3f3:
MOV qword ptr [RDI],RCX
JMP 0x001cf3ff
LAB_001cf3f8:
XOR EAX,EAX
CMP CL,0xc2
JNC 0x001cf401
LAB_001cf3ff:
POP RBP
RET
LAB_001cf401:
CMP CL,0xdf
JA 0x001cf424
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
CMP DL,0x3f
JA 0x001cf3ff
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x001cf3f3
LAB_001cf424:
CMP CL,0xef
JA 0x001cf470
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x001cf3ff
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x001cf3ff
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
TEST R8B,R9B
JNZ 0x001cf3ff
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x3
LAB_001cf46b:
MOV RCX,RSI
JMP 0x001cf3f3
LAB_001cf470:
CMP CL,0xf4
JA 0x001cf3ff
MOVZX R8D,byte ptr [RSI + 0x1]
CMP R8B,0xbf
JG 0x001cf3ff
MOVZX EDX,byte ptr [RSI + 0x2]
CMP DL,0xbf
JG 0x001cf3ff
MOVZX ESI,byte ptr [RSI + 0x3]
CMP SIL,0xbf
JG 0x001cf3ff
CMP ECX,0xf0
SETZ R9B
CMP R8B,0x90
SETC R10B
TEST R9B,R10B
JNZ 0x001cf3ff
CMP ECX,0xf4
SETZ R9B
CMP R8B,0x90
SETNC R10B
TEST R9B,R10B
JNZ 0x001cf3ff
AND ECX,0x7
SHL ECX,0x12
AND R8D,0x3f
SHL R8D,0xc
OR R8D,ECX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,R8D
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x4
JMP 0x001cf46b
|
int8 my_mb_wc_utf8mb4_no_range(ulong *param_1,byte *param_2)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
ulong uVar5;
bVar1 = *param_2;
uVar5 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
if (bVar1 < 0xc2) {
return 0;
}
uVar4 = (uint)bVar1;
if (bVar1 < 0xe0) {
if (0x3f < (byte)(param_2[1] ^ 0x80)) {
return 0;
}
uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80);
uVar3 = 2;
}
else {
if (bVar1 < 0xf0) {
bVar2 = param_2[1];
if (-0x41 < (char)bVar2) {
return 0;
}
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (uVar4 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc;
uVar3 = 3;
}
else {
if (0xf4 < bVar1) {
return 0;
}
bVar1 = param_2[1];
if (-0x41 < (char)bVar1) {
return 0;
}
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (-0x41 < (char)param_2[3]) {
return 0;
}
if (uVar4 == 0xf0 && bVar1 < 0x90) {
return 0;
}
if (uVar4 == 0xf4 && 0x8f < bVar1) {
return 0;
}
uVar4 = param_2[3] & 0x3f |
(param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12;
uVar3 = 4;
}
uVar5 = (ulong)uVar4;
}
}
else {
uVar3 = 1;
}
*param_1 = uVar5;
return uVar3;
}
| |
26,768 | httplib::ClientImpl::close_socket(httplib::ClientImpl::Socket&) | hkr04[P]cpp-mcp/common/httplib.h | inline void ClientImpl::close_socket(Socket &socket) {
// If there are requests in flight in another thread, usually closing
// the socket will be fine and they will simply receive an error when
// using the closed socket, but it is still a bug since rarely the OS
// may reassign the socket id to be used for a new socket, and then
// suddenly they will be operating on a live socket that is different
// than the one they intended!
assert(socket_requests_in_flight_ == 0 ||
socket_requests_are_from_thread_ == std::this_thread::get_id());
// It is also a bug if this happens while SSL is still active
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
assert(socket.ssl == nullptr);
#endif
if (socket.sock == INVALID_SOCKET) { return; }
detail::close_socket(socket.sock);
socket.sock = INVALID_SOCKET;
} | O0 | c | httplib::ClientImpl::close_socket(httplib::ClientImpl::Socket&):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpl $-0x1, (%rax)
jne 0x123fa
jmp 0x12411
movq 0x8(%rsp), %rax
movl (%rax), %edi
callq 0x151e0
movq 0x8(%rsp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN7httplib10ClientImpl12close_socketERNS0_6SocketE:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_10]
cmp dword ptr [rax], 0FFFFFFFFh
jnz short loc_123FA
jmp short loc_12411
loc_123FA:
mov rax, [rsp+18h+var_10]
mov edi, [rax]; this
call _ZN7httplib6detail12close_socketEi; httplib::detail::close_socket(int)
mov rax, [rsp+18h+var_10]
mov dword ptr [rax], 0FFFFFFFFh
loc_12411:
add rsp, 18h
retn
| _DWORD * httplib::ClientImpl::close_socket(long long a1, _DWORD *a2)
{
_DWORD *result; // rax
result = a2;
if ( *a2 != -1 )
{
httplib::detail::close_socket((httplib::detail *)(unsigned int)*a2, (int)a2);
result = a2;
*a2 = -1;
}
return result;
}
| close_socket:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX],-0x1
JNZ 0x001123fa
JMP 0x00112411
LAB_001123fa:
MOV RAX,qword ptr [RSP + 0x8]
MOV EDI,dword ptr [RAX]
CALL 0x001151e0
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX],0xffffffff
LAB_00112411:
ADD RSP,0x18
RET
|
/* httplib::ClientImpl::close_socket(httplib::ClientImpl::Socket&) */
void __thiscall httplib::ClientImpl::close_socket(ClientImpl *this,Socket *param_1)
{
if (*(int *)param_1 != -1) {
detail::close_socket(*(int *)param_1);
*(int4 *)param_1 = 0xffffffff;
}
return;
}
| |
26,769 | type_can_convert | tsotchke[P]eshkol/src/core/utils/type_conversion.c | bool type_can_convert(Type* from, Type* to) {
if (!from || !to) return false;
// Same type
if (type_equals(from, to)) return true;
// Any type can be converted to void
if (to->kind == TYPE_VOID) return true;
// Any type can be converted to any
if (to->kind == TYPE_ANY) return true;
// Numeric conversions
if ((from->kind == TYPE_INTEGER || from->kind == TYPE_FLOAT) &&
(to->kind == TYPE_INTEGER || to->kind == TYPE_FLOAT)) {
return true;
}
// Char to int
if (from->kind == TYPE_CHAR && to->kind == TYPE_INTEGER) {
return true;
}
// Int to char
if (from->kind == TYPE_INTEGER && to->kind == TYPE_CHAR) {
return true;
}
// String to any
if (from->kind == TYPE_STRING && to->kind == TYPE_ANY) {
return true;
}
// Numeric to any
if ((from->kind == TYPE_INTEGER || from->kind == TYPE_FLOAT) && to->kind == TYPE_ANY) {
return true;
}
// Subtype relationship
if (type_is_subtype(from, to)) {
return true;
}
return false;
} | O1 | c | type_can_convert:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x196d3
movq %rsi, %rbx
movq %rdi, %r14
callq 0x181b4
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x196d5
movl (%rbx), %ecx
testl %ecx, %ecx
je 0x196d5
cmpl $0xc, %ecx
je 0x196d5
movl (%r14), %edx
movl %edx, %esi
andl $-0x2, %esi
movl %esi, %edi
xorl $0x2, %edi
movl %ecx, %r8d
andl $-0x2, %r8d
xorl $0x2, %r8d
orl %edi, %r8d
je 0x196d5
movl %edx, %edi
xorl $0x4, %edi
movl %ecx, %r8d
xorl $0x2, %r8d
orl %edi, %r8d
je 0x196d5
movl %edx, %edi
xorl $0x2, %edi
movl %ecx, %r8d
xorl $0x4, %r8d
orl %edi, %r8d
je 0x196d5
cmpl $0x2, %esi
sete %sil
cmpl $0x5, %edx
sete %dl
cmpl $0xc, %ecx
sete %cl
testb %dl, %cl
jne 0x196d5
andb %sil, %cl
jne 0x196d5
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18400
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| type_can_convert:
push r14
push rbx
push rax
test rdi, rdi
setz al
test rsi, rsi
setz cl
or cl, al
jnz loc_196D3
mov rbx, rsi
mov r14, rdi
call type_equals
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_196D5
mov ecx, [rbx]
test ecx, ecx
jz short loc_196D5
cmp ecx, 0Ch
jz short loc_196D5
mov edx, [r14]
mov esi, edx
and esi, 0FFFFFFFEh
mov edi, esi
xor edi, 2
mov r8d, ecx
and r8d, 0FFFFFFFEh
xor r8d, 2
or r8d, edi
jz short loc_196D5
mov edi, edx
xor edi, 4
mov r8d, ecx
xor r8d, 2
or r8d, edi
jz short loc_196D5
mov edi, edx
xor edi, 2
mov r8d, ecx
xor r8d, 4
or r8d, edi
jz short loc_196D5
cmp esi, 2
setz sil
cmp edx, 5
setz dl
cmp ecx, 0Ch
setz cl
test cl, dl
jnz short loc_196D5
and cl, sil
jnz short loc_196D5
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp type_is_subtype
loc_196D3:
xor eax, eax
loc_196D5:
add rsp, 8
pop rbx
pop r14
retn
| char type_can_convert(int *a1, int *a2)
{
char v2; // cl
char result; // al
int v4; // ecx
int v5; // edx
bool v6; // cl
if ( a1 == 0LL || a2 == 0LL )
return 0;
v2 = type_equals(a1, (long long)a2);
result = 1;
if ( !v2 )
{
v4 = *a2;
if ( *a2 )
{
if ( v4 != 12 )
{
v5 = *a1;
if ( *a1 & 0xFFFFFFFE ^ 2 | v4 & 0xFFFFFFFE ^ 2 )
{
if ( v5 ^ 4 | v4 ^ 2 )
{
if ( v5 ^ 2 | v4 ^ 4 )
{
v6 = v4 == 12;
if ( (v5 != 5 || !v6) && ((*a1 & 0xFFFFFFFE) != 2 || !v6) )
return type_is_subtype((long long)a1, (long long)a2);
}
}
}
}
}
}
return result;
}
| type_can_convert:
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
SETZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
JNZ 0x001196d3
MOV RBX,RSI
MOV R14,RDI
CALL 0x001181b4
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x001196d5
MOV ECX,dword ptr [RBX]
TEST ECX,ECX
JZ 0x001196d5
CMP ECX,0xc
JZ 0x001196d5
MOV EDX,dword ptr [R14]
MOV ESI,EDX
AND ESI,0xfffffffe
MOV EDI,ESI
XOR EDI,0x2
MOV R8D,ECX
AND R8D,0xfffffffe
XOR R8D,0x2
OR R8D,EDI
JZ 0x001196d5
MOV EDI,EDX
XOR EDI,0x4
MOV R8D,ECX
XOR R8D,0x2
OR R8D,EDI
JZ 0x001196d5
MOV EDI,EDX
XOR EDI,0x2
MOV R8D,ECX
XOR R8D,0x4
OR R8D,EDI
JZ 0x001196d5
CMP ESI,0x2
SETZ SIL
CMP EDX,0x5
SETZ DL
CMP ECX,0xc
SETZ CL
TEST CL,DL
JNZ 0x001196d5
AND CL,SIL
JNZ 0x001196d5
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00118400
LAB_001196d3:
XOR EAX,EAX
LAB_001196d5:
ADD RSP,0x8
POP RBX
POP R14
RET
|
int8 type_can_convert(uint *param_1,uint *param_2)
{
uint uVar1;
uint uVar2;
char cVar3;
int8 uVar4;
if (param_2 == (uint *)0x0 || param_1 == (uint *)0x0) {
uVar4 = 0;
}
else {
cVar3 = type_equals();
uVar4 = 1;
if (((cVar3 == '\0') && (uVar1 = *param_2, uVar1 != 0)) && (uVar1 != 0xc)) {
uVar2 = *param_1;
if ((((uVar1 & 0xfffffffe) != 2 || (uVar2 & 0xfffffffe) != 2) && (uVar1 != 2 || uVar2 != 4))
&& (uVar1 != 4 || uVar2 != 2)) {
if ((uVar1 != 0xc || uVar2 != 5) && (uVar1 != 0xc || (uVar2 & 0xfffffffe) != 2)) {
uVar4 = type_is_subtype(param_1,param_2);
return uVar4;
}
}
}
}
return uVar4;
}
| |
26,770 | type_can_convert | tsotchke[P]eshkol/src/core/utils/type_conversion.c | bool type_can_convert(Type* from, Type* to) {
if (!from || !to) return false;
// Same type
if (type_equals(from, to)) return true;
// Any type can be converted to void
if (to->kind == TYPE_VOID) return true;
// Any type can be converted to any
if (to->kind == TYPE_ANY) return true;
// Numeric conversions
if ((from->kind == TYPE_INTEGER || from->kind == TYPE_FLOAT) &&
(to->kind == TYPE_INTEGER || to->kind == TYPE_FLOAT)) {
return true;
}
// Char to int
if (from->kind == TYPE_CHAR && to->kind == TYPE_INTEGER) {
return true;
}
// Int to char
if (from->kind == TYPE_INTEGER && to->kind == TYPE_CHAR) {
return true;
}
// String to any
if (from->kind == TYPE_STRING && to->kind == TYPE_ANY) {
return true;
}
// Numeric to any
if ((from->kind == TYPE_INTEGER || from->kind == TYPE_FLOAT) && to->kind == TYPE_ANY) {
return true;
}
// Subtype relationship
if (type_is_subtype(from, to)) {
return true;
}
return false;
} | O3 | c | type_can_convert:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x1884c
movq %rsi, %rbx
movq %rdi, %r14
callq 0x174ec
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x1884e
movl (%rbx), %ecx
testl %ecx, %ecx
je 0x1884e
cmpl $0xc, %ecx
je 0x1884e
movl (%r14), %edx
movl %edx, %esi
andl $-0x2, %esi
cmpl $0x2, %esi
jne 0x18856
movl %ecx, %esi
andl $-0x2, %esi
cmpl $0x2, %esi
je 0x1884e
xorl $0x2, %edx
movl %ecx, %esi
xorl $0x4, %esi
orl %edx, %esi
sete %dl
cmpl $0xc, %ecx
je 0x1884e
testb %dl, %dl
je 0x18860
jmp 0x1884e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl $0x4, %edx
xorl $0x2, %ecx
orl %edx, %ecx
je 0x1884e
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x176bf
| type_can_convert:
push r14
push rbx
push rax
test rdi, rdi
setz al
test rsi, rsi
setz cl
or cl, al
jnz short loc_1884C
mov rbx, rsi
mov r14, rdi
call type_equals
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_1884E
mov ecx, [rbx]
test ecx, ecx
jz short loc_1884E
cmp ecx, 0Ch
jz short loc_1884E
mov edx, [r14]
mov esi, edx
and esi, 0FFFFFFFEh
cmp esi, 2
jnz short loc_18856
mov esi, ecx
and esi, 0FFFFFFFEh
cmp esi, 2
jz short loc_1884E
xor edx, 2
mov esi, ecx
xor esi, 4
or esi, edx
setz dl
cmp ecx, 0Ch
jz short loc_1884E
test dl, dl
jz short loc_18860
jmp short loc_1884E
loc_1884C:
xor eax, eax
loc_1884E:
add rsp, 8
pop rbx
pop r14
retn
loc_18856:
xor edx, 4
xor ecx, 2
or ecx, edx
jz short loc_1884E
loc_18860:
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp type_is_subtype
| char type_can_convert(int *a1, int *a2)
{
char v2; // cl
char result; // al
int v4; // ecx
int v5; // edx
if ( a1 == 0LL || a2 == 0LL )
return 0;
v2 = type_equals(a1, a2);
result = 1;
if ( !v2 )
{
v4 = *a2;
if ( *a2 )
{
if ( v4 != 12 )
{
v5 = *a1;
if ( (*a1 & 0xFFFFFFFE) == 2 )
{
if ( (v4 & 0xFFFFFFFE) == 2 || !(v5 ^ 2 | v4 ^ 4) )
return result;
}
else if ( !(v5 ^ 4 | v4 ^ 2) )
{
return result;
}
return type_is_subtype((long long)a1, (long long)a2);
}
}
}
return result;
}
| type_can_convert:
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
SETZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
JNZ 0x0011884c
MOV RBX,RSI
MOV R14,RDI
CALL 0x001174ec
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0011884e
MOV ECX,dword ptr [RBX]
TEST ECX,ECX
JZ 0x0011884e
CMP ECX,0xc
JZ 0x0011884e
MOV EDX,dword ptr [R14]
MOV ESI,EDX
AND ESI,0xfffffffe
CMP ESI,0x2
JNZ 0x00118856
MOV ESI,ECX
AND ESI,0xfffffffe
CMP ESI,0x2
JZ 0x0011884e
XOR EDX,0x2
MOV ESI,ECX
XOR ESI,0x4
OR ESI,EDX
SETZ DL
CMP ECX,0xc
JZ 0x0011884e
TEST DL,DL
JZ 0x00118860
JMP 0x0011884e
LAB_0011884c:
XOR EAX,EAX
LAB_0011884e:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00118856:
XOR EDX,0x4
XOR ECX,0x2
OR ECX,EDX
JZ 0x0011884e
LAB_00118860:
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001176bf
|
int8 type_can_convert(uint *param_1,uint *param_2)
{
uint uVar1;
uint uVar2;
char cVar3;
int8 uVar4;
if (param_2 == (uint *)0x0 || param_1 == (uint *)0x0) {
uVar4 = 0;
}
else {
cVar3 = type_equals();
uVar4 = 1;
if (((cVar3 == '\0') && (uVar1 = *param_2, uVar1 != 0)) && (uVar1 != 0xc)) {
uVar2 = *param_1;
if ((uVar2 & 0xfffffffe) == 2) {
if ((uVar1 & 0xfffffffe) != 2) {
if ((uVar1 != 0xc) && (uVar1 != 4 || uVar2 != 2)) goto LAB_00118860;
}
}
else if (uVar1 != 2 || uVar2 != 4) {
LAB_00118860:
uVar4 = type_is_subtype(param_1,param_2);
return uVar4;
}
}
}
return uVar4;
}
| |
26,771 | Modbus::bytesToString[abi:cxx11](unsigned char const*, unsigned int) | serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp | String bytesToString(const uint8_t* buff, uint32_t count)
{
String str;
for (uint32_t i = 0; i < count; ++i)
{
uint8_t num = buff[i];
str += hexDigit(num >> 4);
str += hexDigit(num & 0xF);
str += CharLiteral(' ');
}
return str;
} | O2 | cpp | Modbus::bytesToString[abi:cxx11](unsigned char const*, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl %edx, %r15d
xorl %r12d, %r12d
pushq $0x20
popq %rbp
cmpq %r12, %r15
je 0x7376
movb (%r14,%r12), %r13b
movl %r13d, %eax
shrb $0x4, %al
leal 0x30(%rax), %ecx
addb $0x37, %al
cmpb $-0x60, %r13b
movzbl %cl, %ecx
movzbl %al, %eax
cmovbl %ecx, %eax
movzbl %al, %esi
movq %rbx, %rdi
callq 0x52d0
andb $0xf, %r13b
leal 0x30(%r13), %eax
leal 0x37(%r13), %ecx
cmpb $0xa, %r13b
movzbl %al, %eax
movzbl %cl, %ecx
cmovbl %eax, %ecx
movzbl %cl, %esi
movq %rbx, %rdi
callq 0x52d0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x52d0
incq %r12
jmp 0x7317
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5190
movq %r14, %rdi
callq 0x5570
| _ZN6Modbus13bytesToStringB5cxx11EPKhj:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov r15d, edx
xor r12d, r12d
push 20h ; ' '
pop rbp
loc_7317:
cmp r15, r12
jz short loc_7376
mov r13b, [r14+r12]
mov eax, r13d
shr al, 4
lea ecx, [rax+30h]
add al, 37h ; '7'
cmp r13b, 0A0h
movzx ecx, cl
movzx eax, al
cmovb eax, ecx
movzx esi, al
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
and r13b, 0Fh
lea eax, [r13+30h]
lea ecx, [r13+37h]
cmp r13b, 0Ah
movzx eax, al
movzx ecx, cl
cmovb ecx, eax
movzx esi, cl
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
mov esi, ebp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
inc r12
jmp short loc_7317
loc_7376:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long Modbus::bytesToString[abi:cxx11](long long a1, long long a2, unsigned int a3)
{
long long v3; // r15
long long i; // r12
unsigned __int8 v5; // r13
unsigned __int8 v6; // al
unsigned __int8 v7; // r13
unsigned __int8 v8; // cl
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v3 = a3;
for ( i = 0LL; v3 != i; ++i )
{
v5 = *(_BYTE *)(a2 + i);
v6 = (v5 >> 4) + 55;
if ( v5 < 0xA0u )
v6 = (v5 >> 4) + 48;
std::string::push_back(a1, v6);
v7 = v5 & 0xF;
v8 = v7 + 55;
if ( v7 < 0xAu )
v8 = v7 + 48;
std::string::push_back(a1, v8);
std::string::push_back(a1, 32LL);
}
return a1;
}
| bytesToString[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV R15D,EDX
XOR R12D,R12D
PUSH 0x20
POP RBP
LAB_00107317:
CMP R15,R12
JZ 0x00107376
MOV R13B,byte ptr [R14 + R12*0x1]
MOV EAX,R13D
SHR AL,0x4
LEA ECX,[RAX + 0x30]
ADD AL,0x37
CMP R13B,0xa0
MOVZX ECX,CL
MOVZX EAX,AL
CMOVC EAX,ECX
MOVZX ESI,AL
LAB_0010733b:
MOV RDI,RBX
CALL 0x001052d0
AND R13B,0xf
LEA EAX,[R13 + 0x30]
LEA ECX,[R13 + 0x37]
CMP R13B,0xa
MOVZX EAX,AL
MOVZX ECX,CL
CMOVC ECX,EAX
MOVZX ESI,CL
MOV RDI,RBX
CALL 0x001052d0
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001052d0
LAB_00107371:
INC R12
JMP 0x00107317
LAB_00107376:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Modbus::bytesToString[abi:cxx11](unsigned char const*, unsigned int) */
uchar * Modbus::bytesToString_abi_cxx11_(uchar *param_1,uint param_2)
{
uint in_EDX;
char cVar1;
ulong uVar2;
*(uchar **)param_1 = param_1 + 0x10;
param_1[8] = '\0';
param_1[9] = '\0';
param_1[10] = '\0';
param_1[0xb] = '\0';
param_1[0xc] = '\0';
param_1[0xd] = '\0';
param_1[0xe] = '\0';
param_1[0xf] = '\0';
param_1[0x10] = '\0';
for (uVar2 = 0; in_EDX != uVar2; uVar2 = uVar2 + 1) {
cVar1 = (char)param_1;
/* try { // try from 0010733b to 00107370 has its CatchHandler @ 00107388 */
std::__cxx11::string::push_back(cVar1);
std::__cxx11::string::push_back(cVar1);
std::__cxx11::string::push_back(cVar1);
}
return param_1;
}
| |
26,772 | Modbus::bytesToString[abi:cxx11](unsigned char const*, unsigned int) | serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp | String bytesToString(const uint8_t* buff, uint32_t count)
{
String str;
for (uint32_t i = 0; i < count; ++i)
{
uint8_t num = buff[i];
str += hexDigit(num >> 4);
str += hexDigit(num & 0xF);
str += CharLiteral(' ');
}
return str;
} | O3 | cpp | Modbus::bytesToString[abi:cxx11](unsigned char const*, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
testl %edx, %edx
je 0x7fd3
movq %rsi, %r14
movl %edx, %r12d
xorl %r13d, %r13d
movb (%r14,%r13), %bpl
movl %ebp, %eax
shrb $0x4, %al
leal 0x30(%rax), %ecx
addb $0x37, %al
cmpb $-0x60, %bpl
movzbl %cl, %ecx
movzbl %al, %eax
cmovbl %ecx, %eax
movzbl %al, %esi
movq %rbx, %rdi
callq 0x52c0
andb $0xf, %bpl
leal 0x30(%rbp), %eax
leal 0x37(%rbp), %ecx
cmpb $0xa, %bpl
movzbl %al, %eax
movzbl %cl, %ecx
cmovbl %eax, %ecx
movzbl %cl, %esi
movq %rbx, %rdi
callq 0x52c0
movq %rbx, %rdi
movl $0x20, %esi
callq 0x52c0
incq %r13
cmpq %r13, %r12
jne 0x7f76
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x7ffb
movq (%r15), %rsi
incq %rsi
callq 0x5310
movq %r14, %rdi
callq 0x5550
| _ZN6Modbus13bytesToStringB5cxx11EPKhj:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
test edx, edx
jz short loc_7FD3
mov r14, rsi
mov r12d, edx
xor r13d, r13d
loc_7F76:
mov bpl, [r14+r13]
mov eax, ebp
shr al, 4
lea ecx, [rax+30h]
add al, 37h ; '7'
cmp bpl, 0A0h
movzx ecx, cl
movzx eax, al
cmovb eax, ecx
movzx esi, al
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
and bpl, 0Fh
lea eax, [rbp+30h]
lea ecx, [rbp+37h]
cmp bpl, 0Ah
movzx eax, al
movzx ecx, cl
cmovb ecx, eax
movzx esi, cl
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
mov esi, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
inc r13
cmp r12, r13
jnz short loc_7F76
loc_7FD3:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_7FFB
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7FFB:
mov rdi, r14
call __Unwind_Resume
| long long Modbus::bytesToString[abi:cxx11](long long a1, long long a2, unsigned int a3)
{
long long v3; // r12
long long i; // r13
unsigned __int8 v5; // bp
unsigned __int8 v6; // al
unsigned __int8 v7; // bp
unsigned __int8 v8; // cl
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
if ( a3 )
{
v3 = a3;
for ( i = 0LL; i != v3; ++i )
{
v5 = *(_BYTE *)(a2 + i);
v6 = (v5 >> 4) + 55;
if ( v5 < 0xA0u )
v6 = (v5 >> 4) + 48;
std::string::push_back(a1, v6);
v7 = v5 & 0xF;
v8 = v7 + 55;
if ( v7 < 0xAu )
v8 = v7 + 48;
std::string::push_back(a1, v8);
std::string::push_back(a1, 32LL);
}
}
return a1;
}
| bytesToString[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
TEST EDX,EDX
JZ 0x00107fd3
MOV R14,RSI
MOV R12D,EDX
XOR R13D,R13D
LAB_00107f76:
MOV BPL,byte ptr [R14 + R13*0x1]
MOV EAX,EBP
SHR AL,0x4
LEA ECX,[RAX + 0x30]
ADD AL,0x37
CMP BPL,0xa0
MOVZX ECX,CL
MOVZX EAX,AL
CMOVC EAX,ECX
MOVZX ESI,AL
LAB_00107f94:
MOV RDI,RBX
CALL 0x001052c0
AND BPL,0xf
LEA EAX,[RBP + 0x30]
LEA ECX,[RBP + 0x37]
CMP BPL,0xa
MOVZX EAX,AL
MOVZX ECX,CL
CMOVC ECX,EAX
MOVZX ESI,CL
MOV RDI,RBX
CALL 0x001052c0
MOV RDI,RBX
MOV ESI,0x20
CALL 0x001052c0
LAB_00107fcb:
INC R13
CMP R12,R13
JNZ 0x00107f76
LAB_00107fd3:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Modbus::bytesToString[abi:cxx11](unsigned char const*, unsigned int) */
Modbus * __thiscall Modbus::bytesToString_abi_cxx11_(Modbus *this,uchar *param_1,uint param_2)
{
char cVar1;
ulong uVar2;
*(Modbus **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (Modbus)0x0;
if (param_2 != 0) {
uVar2 = 0;
do {
cVar1 = (char)this;
/* try { // try from 00107f94 to 00107fca has its CatchHandler @ 00107fe5 */
std::__cxx11::string::push_back(cVar1);
std::__cxx11::string::push_back(cVar1);
std::__cxx11::string::push_back(cVar1);
uVar2 = uVar2 + 1;
} while (param_2 != uVar2);
}
return this;
}
| |
26,773 | mju_compare | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_util_sparse.c | static int mju_compare(const int* vec1, const int* vec2, int n) {
#ifdef mjUSEAVX
return mju_compare_avx(vec1, vec2, n);
#else
return !memcmp(vec1, vec2, n*sizeof(int));
#endif // mjUSEAVX
} | O3 | c | mju_compare:
xorl %ecx, %ecx
cmpl $0x4, %edx
jl 0xa3507
leal -0x4(%rdx), %r8d
xorl %eax, %eax
xorl %ecx, %ecx
vmovdqu (%rdi,%rcx,4), %xmm0
vpxor (%rsi,%rcx,4), %xmm0, %xmm0
vptest %xmm0, %xmm0
jne 0xa352d
addq $0x4, %rcx
cmpl %ecx, %r8d
jge 0xa34ed
pushq %rax
movl %ecx, %eax
leaq (%rdi,%rax,4), %rdi
leaq (%rsi,%rax,4), %rsi
subl %ecx, %edx
movslq %edx, %rdx
shlq $0x2, %rdx
callq 0x2de30
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x8, %rsp
retq
| mju_compare:
xor ecx, ecx
cmp edx, 4
jl short loc_A3507
lea r8d, [rdx-4]
xor eax, eax
xor ecx, ecx
loc_A34ED:
vmovdqu xmm0, xmmword ptr [rdi+rcx*4]
vpxor xmm0, xmm0, xmmword ptr [rsi+rcx*4]
vptest xmm0, xmm0
jnz short locret_A352D
add rcx, 4
cmp r8d, ecx
jge short loc_A34ED
loc_A3507:
push rax
mov eax, ecx
lea rdi, [rdi+rax*4]
lea rsi, [rsi+rax*4]
sub edx, ecx
movsxd rdx, edx
shl rdx, 2
call _bcmp
mov ecx, eax
xor eax, eax
test ecx, ecx
setz al
add rsp, 8
locret_A352D:
retn
| _BOOL8 mju_compare(long long _RDI, long long a2, int a3)
{
_BOOL8 result; // rax
LODWORD(_RCX) = 0;
if ( a3 < 4 )
return (unsigned int)bcmp(_RDI + 4LL * (unsigned int)_RCX, a2 + 4LL * (unsigned int)_RCX, 4LL * (a3 - (int)_RCX)) == 0;
result = 0LL;
_RCX = 0LL;
while ( 1 )
{
__asm
{
vmovdqu xmm0, xmmword ptr [rdi+rcx*4]
vpxor xmm0, xmm0, xmmword ptr [rsi+rcx*4]
vptest xmm0, xmm0
}
if ( !_ZF )
break;
_RCX += 4LL;
if ( a3 - 4 < (int)_RCX )
return (unsigned int)bcmp(_RDI + 4LL * (unsigned int)_RCX, a2 + 4LL * (unsigned int)_RCX, 4LL * (a3 - (int)_RCX)) == 0;
}
return result;
}
| mju_compare:
XOR ECX,ECX
CMP EDX,0x4
JL 0x001a3507
LEA R8D,[RDX + -0x4]
XOR EAX,EAX
XOR ECX,ECX
LAB_001a34ed:
VMOVDQU XMM0,xmmword ptr [RDI + RCX*0x4]
VPXOR XMM0,XMM0,xmmword ptr [RSI + RCX*0x4]
VPTEST XMM0,XMM0
JNZ 0x001a352d
ADD RCX,0x4
CMP R8D,ECX
JGE 0x001a34ed
LAB_001a3507:
PUSH RAX
MOV EAX,ECX
LEA RDI,[RDI + RAX*0x4]
LEA RSI,[RSI + RAX*0x4]
SUB EDX,ECX
MOVSXD RDX,EDX
SHL RDX,0x2
CALL 0x0012de30
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
SETZ AL
ADD RSP,0x8
LAB_001a352d:
RET
|
bool mju_compare(long param_1,long param_2,int param_3)
{
int1 auVar1 [16];
int iVar2;
ulong uVar3;
uVar3 = 0;
if (3 < param_3) {
uVar3 = 0;
iVar2 = 0;
do {
auVar1 = *(int1 (*) [16])(param_1 + uVar3 * 4) ^
*(int1 (*) [16])(param_2 + uVar3 * 4);
vptest_avx(auVar1,auVar1);
if (iVar2 != 0) {
return false;
}
uVar3 = uVar3 + 4;
iVar2 = (param_3 + -4) - (int)uVar3;
} while ((int)uVar3 <= param_3 + -4);
}
iVar2 = bcmp((void *)(param_1 + (uVar3 & 0xffffffff) * 4),
(void *)(param_2 + (uVar3 & 0xffffffff) * 4),(long)(param_3 - (int)uVar3) << 2);
return iVar2 == 0;
}
| |
26,774 | rw_pr_unlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_unlock(rw_pr_lock_t *rwlock)
{
if (rwlock->active_writer)
{
/* We are unlocking wr-lock. */
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
rwlock->active_writer= FALSE;
if (rwlock->writers_waiting_readers)
{
/*
Avoid expensive cond signal in case when there is no contention
or it is wr-only.
Note that from view point of performance it would be better to
signal on the condition variable after unlocking mutex (as it
reduces number of contex switches).
Unfortunately this would mean that such rwlock can't be safely
used by MDL subsystem, which relies on the fact that it is OK
to destroy rwlock once it is in unlocked state.
*/
pthread_cond_signal(&rwlock->no_active_readers);
}
pthread_mutex_unlock(&rwlock->lock);
}
else
{
/* We are unlocking rd-lock. */
pthread_mutex_lock(&rwlock->lock);
rwlock->active_readers--;
if (rwlock->active_readers == 0 &&
rwlock->writers_waiting_readers)
{
/*
If we are last reader and there are waiting
writers wake them up.
*/
pthread_cond_signal(&rwlock->no_active_readers);
}
pthread_mutex_unlock(&rwlock->lock);
}
return 0;
} | O3 | c | rw_pr_unlock:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x60(%rdi)
je 0x2aa20
movb $0x0, 0x60(%rbx)
cmpl $0x0, 0x5c(%rbx)
je 0x2aa2d
leaq 0x28(%rbx), %rdi
callq 0x24040
jmp 0x2aa2d
movq %rbx, %rdi
callq 0x244c0
decl 0x58(%rbx)
je 0x2aa0f
movq %rbx, %rdi
callq 0x24210
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| rw_pr_unlock:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
cmp byte ptr [rdi+60h], 0
jz short loc_2AA20
mov byte ptr [rbx+60h], 0
loc_2AA0F:
cmp dword ptr [rbx+5Ch], 0
jz short loc_2AA2D
lea rdi, [rbx+28h]
call _pthread_cond_signal
jmp short loc_2AA2D
loc_2AA20:
mov rdi, rbx
call _pthread_mutex_lock
dec dword ptr [rbx+58h]
jz short loc_2AA0F
loc_2AA2D:
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
| long long rw_pr_unlock(long long a1)
{
if ( *(_BYTE *)(a1 + 96) )
{
*(_BYTE *)(a1 + 96) = 0;
}
else
{
pthread_mutex_lock(a1);
if ( (*(_DWORD *)(a1 + 88))-- != 1 )
goto LABEL_6;
}
if ( *(_DWORD *)(a1 + 92) )
pthread_cond_signal(a1 + 40);
LABEL_6:
pthread_mutex_unlock(a1);
return 0LL;
}
| rw_pr_unlock:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP byte ptr [RDI + 0x60],0x0
JZ 0x0012aa20
MOV byte ptr [RBX + 0x60],0x0
LAB_0012aa0f:
CMP dword ptr [RBX + 0x5c],0x0
JZ 0x0012aa2d
LEA RDI,[RBX + 0x28]
CALL 0x00124040
JMP 0x0012aa2d
LAB_0012aa20:
MOV RDI,RBX
CALL 0x001244c0
DEC dword ptr [RBX + 0x58]
JZ 0x0012aa0f
LAB_0012aa2d:
MOV RDI,RBX
CALL 0x00124210
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_unlock(pthread_mutex_t *param_1)
{
int *piVar1;
if (*(char *)((long)param_1 + 0x60) == '\0') {
pthread_mutex_lock(param_1);
piVar1 = (int *)((long)param_1 + 0x58);
*piVar1 = *piVar1 + -1;
if (*piVar1 != 0) goto LAB_0012aa2d;
}
else {
*(int1 *)((long)param_1 + 0x60) = 0;
}
if (*(int *)((long)param_1 + 0x5c) != 0) {
pthread_cond_signal((pthread_cond_t *)(param_1 + 1));
}
LAB_0012aa2d:
pthread_mutex_unlock(param_1);
return 0;
}
| |
26,775 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> uppercase<char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | msxemulator/build_O3/_deps/picotool-src/main.cpp | std::basic_string<T> uppercase(const std::basic_string<T>& s)
{
std::basic_string<T> s2 = s;
std::transform(s2.begin(), s2.end(), s2.begin(), toupper);
return s2;
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> uppercase<char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x1d410
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x3b02d
movq (%rbx), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0xf800
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x3b017
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _Z9uppercaseIcENSt7__cxx1112basic_stringIT_St11char_traitsIS2_ESaIS2_EEERKS6_:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi]
mov rdx, [rsi+8]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov r14, [rbx+8]
test r14, r14
jz short loc_3B02D
mov r15, [rbx]
xor r12d, r12d
loc_3B017:
movsx edi, byte ptr [r15+r12]
call _toupper
mov [r15+r12], al
inc r12
cmp r14, r12
jnz short loc_3B017
loc_3B02D:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long * uppercase<char>(long long *a1, long long a2)
{
long long v2; // r14
long long v3; // r15
long long i; // r12
*a1 = (long long)(a1 + 2);
std::string::_M_construct<char *>((long long)a1, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
v2 = a1[1];
if ( v2 )
{
v3 = *a1;
for ( i = 0LL; i != v2; ++i )
*(_BYTE *)(v3 + i) = toupper((unsigned int)*(char *)(v3 + i));
}
return a1;
}
| uppercase<char>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x0011d410
MOV R14,qword ptr [RBX + 0x8]
TEST R14,R14
JZ 0x0013b02d
MOV R15,qword ptr [RBX]
XOR R12D,R12D
LAB_0013b017:
MOVSX EDI,byte ptr [R15 + R12*0x1]
CALL 0x0010f800
MOV byte ptr [R15 + R12*0x1],AL
INC R12
CMP R14,R12
JNZ 0x0013b017
LAB_0013b02d:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string uppercase<char>(std::__cxx11::string const&) */
string * uppercase<char>(string *param_1)
{
long lVar1;
long lVar2;
int iVar3;
long *in_RSI;
long lVar4;
*(string **)param_1 = param_1 + 0x10;
std::__cxx11::string::_M_construct<char*>(param_1,*in_RSI,in_RSI[1] + *in_RSI);
lVar1 = *(long *)(param_1 + 8);
if (lVar1 != 0) {
lVar2 = *(long *)param_1;
lVar4 = 0;
do {
iVar3 = toupper((int)*(char *)(lVar2 + lVar4));
*(char *)(lVar2 + lVar4) = (char)iVar3;
lVar4 = lVar4 + 1;
} while (lVar1 != lVar4);
}
return param_1;
}
| |
26,776 | my_utf16_uni | eloqsql/strings/ctype-ucs2.c | int
my_utf16_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
return my_mb_wc_utf16_quick(pwc, s, e);
} | O3 | c | my_utf16_uni:
pushq %rbp
movq %rsp, %rbp
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x6657c
movzbl (%rdx), %edi
movl %edi, %r9d
andl $-0x4, %r9d
xorl %eax, %eax
cmpl $0xdc, %r9d
je 0x6657c
cmpl $0xd8, %r9d
jne 0x66569
leaq 0x4(%rdx), %r9
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %r9
ja 0x6657c
movzbl (%r8), %ecx
movl %ecx, %r8d
andl $-0x4, %r8d
movl $0x0, %eax
cmpl $0xdc, %r8d
jne 0x6657c
shll $0x12, %edi
shll $0x8, %ecx
orl %edi, %ecx
movzbl 0x1(%rdx), %eax
shll $0xa, %eax
movzbl 0x3(%rdx), %edx
andl $0xc0300, %ecx # imm = 0xC0300
orl %edx, %ecx
addl %eax, %ecx
addl $0x10000, %ecx # imm = 0x10000
movl $0x4, %eax
jmp 0x66577
shll $0x8, %edi
movzbl 0x1(%rdx), %ecx
orl %edi, %ecx
movl $0x2, %eax
movl %ecx, %ecx
movq %rcx, (%rsi)
popq %rbp
retq
| my_utf16_uni:
push rbp
mov rbp, rsp
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja loc_6657C
movzx edi, byte ptr [rdx]
mov r9d, edi
and r9d, 0FFFFFFFCh
xor eax, eax
cmp r9d, 0DCh
jz short loc_6657C
cmp r9d, 0D8h
jnz short loc_66569
lea r9, [rdx+4]
mov eax, 0FFFFFF98h
cmp r9, rcx
ja short loc_6657C
movzx ecx, byte ptr [r8]
mov r8d, ecx
and r8d, 0FFFFFFFCh
mov eax, 0
cmp r8d, 0DCh
jnz short loc_6657C
shl edi, 12h
shl ecx, 8
or ecx, edi
movzx eax, byte ptr [rdx+1]
shl eax, 0Ah
movzx edx, byte ptr [rdx+3]
and ecx, 0C0300h
or ecx, edx
add ecx, eax
add ecx, 10000h
mov eax, 4
jmp short loc_66577
loc_66569:
shl edi, 8
movzx ecx, byte ptr [rdx+1]
or ecx, edi
mov eax, 2
loc_66577:
mov ecx, ecx
mov [rsi], rcx
loc_6657C:
pop rbp
retn
| long long my_utf16_uni(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
_BYTE *v4; // r8
long long result; // rax
int v6; // edi
int v7; // r9d
unsigned int v8; // ecx
v4 = a3 + 2;
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = *a3;
v7 = v6 & 0xFC;
result = 0LL;
if ( v7 != 220 )
{
if ( v7 != 216 )
{
v8 = (v6 << 8) | a3[1];
result = 2LL;
goto LABEL_8;
}
result = 4294967192LL;
if ( (unsigned long long)(a3 + 4) <= a4 )
{
result = 0LL;
if ( (*v4 & 0xFC) == 0xDC )
{
v8 = (a3[1] << 10) + (a3[3] | ((v6 << 18) | ((unsigned __int8)*v4 << 8)) & 0xC0300) + 0x10000;
result = 4LL;
LABEL_8:
*a2 = v8;
}
}
}
}
return result;
}
| my_utf16_uni:
PUSH RBP
MOV RBP,RSP
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x0016657c
MOVZX EDI,byte ptr [RDX]
MOV R9D,EDI
AND R9D,0xfffffffc
XOR EAX,EAX
CMP R9D,0xdc
JZ 0x0016657c
CMP R9D,0xd8
JNZ 0x00166569
LEA R9,[RDX + 0x4]
MOV EAX,0xffffff98
CMP R9,RCX
JA 0x0016657c
MOVZX ECX,byte ptr [R8]
MOV R8D,ECX
AND R8D,0xfffffffc
MOV EAX,0x0
CMP R8D,0xdc
JNZ 0x0016657c
SHL EDI,0x12
SHL ECX,0x8
OR ECX,EDI
MOVZX EAX,byte ptr [RDX + 0x1]
SHL EAX,0xa
MOVZX EDX,byte ptr [RDX + 0x3]
AND ECX,0xc0300
OR ECX,EDX
ADD ECX,EAX
ADD ECX,0x10000
MOV EAX,0x4
JMP 0x00166577
LAB_00166569:
SHL EDI,0x8
MOVZX ECX,byte ptr [RDX + 0x1]
OR ECX,EDI
MOV EAX,0x2
LAB_00166577:
MOV ECX,ECX
MOV qword ptr [RSI],RCX
LAB_0016657c:
POP RBP
RET
|
int8 my_utf16_uni(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
uVar3 = 0xffffff9a;
if (param_3 + 2 <= param_4) {
bVar1 = *param_3;
uVar3 = 0;
if ((bVar1 & 0xfc) != 0xdc) {
if ((bVar1 & 0xfc) == 0xd8) {
if (param_4 < param_3 + 4) {
return 0xffffff98;
}
bVar2 = param_3[2];
if ((bVar2 & 0xfc) != 0xdc) {
return 0;
}
uVar4 = (((uint)bVar2 << 8 | (uint)bVar1 << 0x12) & 0xc0300 | (uint)param_3[3]) +
(uint)param_3[1] * 0x400 + 0x10000;
uVar3 = 4;
}
else {
uVar4 = (uint)CONCAT11(bVar1,param_3[1]);
uVar3 = 2;
}
*param_2 = (ulong)uVar4;
}
}
return uVar3;
}
| |
26,777 | 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>::size() const | monkey531[P]llama/common/./json.hpp | size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
// all other types have size 1
return 1;
}
}
} | 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>::size() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x2e186
cmpl $0x1, %eax
je 0x2e163
cmpl $0x2, %eax
jne 0x2e181
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
retq
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
retq
movl $0x1, %eax
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short locret_2E186
cmp eax, 1
jz short loc_2E163
cmp eax, 2
jnz short loc_2E181
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
sar rax, 4
retn
loc_2E163:
mov rax, [rdi+8]
mov rcx, [rax+8]
sub rcx, [rax]
sar rcx, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul rax, rcx
retn
loc_2E181:
mov eax, 1
locret_2E186:
retn
| 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>::size(
unsigned __int8 *a1)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
if ( (_DWORD)result == 1 )
{
return 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4);
}
else if ( (_DWORD)result == 2 )
{
return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4;
}
else
{
return 1LL;
}
}
return result;
}
| size:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x0012e186
CMP EAX,0x1
JZ 0x0012e163
CMP EAX,0x2
JNZ 0x0012e181
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SAR RAX,0x4
RET
LAB_0012e163:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RAX]
SAR RCX,0x4
MOV RAX,-0x5555555555555555
IMUL RAX,RCX
RET
LAB_0012e181:
MOV EAX,0x1
LAB_0012e186:
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>::size() const */
ulong __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>
::size(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)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
ulong uVar2;
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4) * -0x5555555555555555;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
| |
26,778 | 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>::size() const | monkey531[P]llama/common/./json.hpp | size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
// all other types have size 1
return 1;
}
}
} | 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>::size() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x2f8f4
cmpl $0x1, %eax
je 0x2f8dd
cmpl $0x2, %eax
jne 0x2f8f1
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
retq
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
pushq $0x30
popq %rcx
cqto
idivq %rcx
retq
pushq $0x1
popq %rax
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short locret_2F8F4
cmp eax, 1
jz short loc_2F8DD
cmp eax, 2
jnz short loc_2F8F1
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
sar rax, 4
retn
loc_2F8DD:
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
push 30h ; '0'
pop rcx
cqo
idiv rcx
retn
loc_2F8F1:
push 1
pop rax
locret_2F8F4:
retn
| 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>::size(
unsigned __int8 *a1)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
if ( (_DWORD)result == 1 )
{
return (*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) / 48LL;
}
else if ( (_DWORD)result == 2 )
{
return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4;
}
else
{
return 1LL;
}
}
return result;
}
| size:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x0012f8f4
CMP EAX,0x1
JZ 0x0012f8dd
CMP EAX,0x2
JNZ 0x0012f8f1
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SAR RAX,0x4
RET
LAB_0012f8dd:
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
PUSH 0x30
POP RCX
CQO
IDIV RCX
RET
LAB_0012f8f1:
PUSH 0x1
POP RAX
LAB_0012f8f4:
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>::size() const */
ulong __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>
::size(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)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
ulong uVar2;
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8)) / 0x30;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
| |
26,779 | 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>::size() const | monkey531[P]llama/common/./json.hpp | size_type size() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
{
// null values are empty
return 0;
}
case value_t::array:
{
// delegate call to array_t::size()
return m_data.m_value.array->size();
}
case value_t::object:
{
// delegate call to object_t::size()
return m_data.m_value.object->size();
}
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
// all other types have size 1
return 1;
}
}
} | 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>::size() const:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x2d418
cmpl $0x1, %eax
je 0x2d3f5
cmpl $0x2, %eax
jne 0x2d413
movq 0x8(%rdi), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x4, %rax
retq
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
retq
movl $0x1, %eax
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv:
movzx eax, byte ptr [rdi]
test eax, eax
jz short locret_2D418
cmp eax, 1
jz short loc_2D3F5
cmp eax, 2
jnz short loc_2D413
mov rcx, [rdi+8]
mov rax, [rcx+8]
sub rax, [rcx]
sar rax, 4
retn
loc_2D3F5:
mov rax, [rdi+8]
mov rcx, [rax+8]
sub rcx, [rax]
sar rcx, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul rax, rcx
retn
loc_2D413:
mov eax, 1
locret_2D418:
retn
| 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>::size(
unsigned __int8 *a1)
{
long long result; // rax
result = *a1;
if ( *a1 )
{
if ( (_DWORD)result == 1 )
{
return 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4);
}
else if ( (_DWORD)result == 2 )
{
return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4;
}
else
{
return 1LL;
}
}
return result;
}
| size:
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x0012d418
CMP EAX,0x1
JZ 0x0012d3f5
CMP EAX,0x2
JNZ 0x0012d413
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX]
SAR RAX,0x4
RET
LAB_0012d3f5:
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,qword ptr [RAX]
SAR RCX,0x4
MOV RAX,-0x5555555555555555
IMUL RAX,RCX
RET
LAB_0012d413:
MOV EAX,0x1
LAB_0012d418:
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>::size() const */
ulong __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>
::size(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)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
ulong uVar2;
bVar1 = *this;
uVar2 = (ulong)(byte)bVar1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
return ((*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4) * -0x5555555555555555;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4;
}
uVar2 = 1;
}
return uVar2;
}
| |
26,780 | minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
Value result;
bool first = true;
for (const auto& part : parts) {
if (!part) throw std::runtime_error("FilterExpr.part is null");
if (first) {
first = false;
result = part->evaluate(context);
} else {
if (auto ce = dynamic_cast<CallExpr*>(part.get())) {
auto target = ce->object->evaluate(context);
ArgumentsValue args = ce->args.evaluate(context);
args.args.insert(args.args.begin(), result);
result = target.call(context, args);
} else {
auto callable = part->evaluate(context);
ArgumentsValue args;
args.args.insert(args.args.begin(), result);
result = callable.call(context, args);
}
}
}
return result;
} | O2 | cpp | minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x678b4
movq 0x20(%r15), %rbp
movq 0x28(%r15), %rax
movq %rax, 0x8(%rsp)
movb $0x1, %al
leaq 0x48(%rsp), %r15
movq %r12, (%rsp)
cmpq 0x8(%rsp), %rbp
je 0x70b07
movq (%rbp), %r13
testq %r13, %r13
je 0x70b1c
testb $0x1, %al
je 0x70a15
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x642e8
movq %r12, %rdi
movq %r15, %rsi
callq 0x690f2
jmp 0x70af4
movq %r13, %rdi
leaq 0x8c961(%rip), %rsi # 0xfd380
leaq 0x8cec2(%rip), %rdx # 0xfd8e8
xorl %ecx, %ecx
callq 0x23a20
testq %rax, %rax
je 0x70a8a
movq %rax, %r12
movq 0x20(%rax), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x642e8
addq $0x30, %r12
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x6df8e
movq 0x10(%rsp), %rsi
movq %r13, %rdi
movq (%rsp), %r12
movq %r12, %rdx
callq 0x6f7e6
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x6ed0a
jmp 0x70ad9
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x642e8
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x10(%rsp), %r13
movq %r13, %rdi
xorl %esi, %esi
movq (%rsp), %r12
movq %r12, %rdx
callq 0x6f7e6
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x6ed0a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x690f2
movq %rbx, %rdi
callq 0x64578
movq %r13, %rdi
callq 0x6edee
movq %r15, %rdi
callq 0x64578
addq $0x10, %rbp
xorl %eax, %eax
jmp 0x709db
movq %r12, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r15
leaq 0x452a6(%rip), %rsi # 0xb5dd4
movq %rax, %rdi
callq 0x23330
movq 0x8e4ab(%rip), %rsi # 0xfefe8
movq 0x8e404(%rip), %rdx # 0xfef48
movq %r15, %rdi
callq 0x23fb0
jmp 0x70b5b
jmp 0x70b5b
jmp 0x70b83
jmp 0x70b5b
movq %rax, %r14
jmp 0x70b68
jmp 0x70b83
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6edee
leaq 0x48(%rsp), %rdi
callq 0x64578
jmp 0x70b86
jmp 0x70b83
movq %rax, %r14
movq %r15, %rdi
callq 0x23690
jmp 0x70b86
movq %rax, %r14
movq (%rsp), %rdi
callq 0x64578
movq %r14, %rdi
callq 0x24030
nop
| _ZNK5minja10FilterExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov r14, rdx
mov r15, rsi
mov r12, rdi
call _ZN5minja5ValueC2Ev; minja::Value::Value(void)
mov rbp, [r15+20h]
mov rax, [r15+28h]
mov [rsp+118h+var_110], rax
mov al, 1
lea r15, [rsp+118h+var_D0]
mov [rsp+118h+var_118], r12
loc_709DB:
cmp rbp, [rsp+118h+var_110]
jz loc_70B07
mov r13, [rbp+0]
test r13, r13
jz loc_70B1C
test al, 1
jz short loc_70A15
mov rdi, r15
mov rsi, r13
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, r12
mov rsi, r15
call _ZN5minja5ValueaSEOS0_; minja::Value::operator=(minja::Value&&)
jmp loc_70AF4
loc_70A15:
mov rdi, r13; lpsrc
lea rsi, _ZTIN5minja10ExpressionE; lpstype
lea rdx, _ZTIN5minja8CallExprE; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
test rax, rax
jz short loc_70A8A
mov r12, rax
mov rsi, [rax+20h]
mov rdi, r15
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
add r12, 30h ; '0'
lea r13, [rsp+118h+var_108]
mov rdi, r13
mov rsi, r12
mov rdx, r14
call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)
mov rsi, qword ptr [rsp+118h+var_108]
mov rdi, r13
mov r12, [rsp+118h+var_118]
mov rdx, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
lea rbx, [rsp+118h+var_80]
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov rcx, r13
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
jmp short loc_70AD9
loc_70A8A:
mov rdi, r15
mov rsi, r13
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
xorps xmm0, xmm0
movaps [rsp+118h+var_E8], xmm0
movaps [rsp+118h+var_F8], xmm0
movaps [rsp+118h+var_108], xmm0
lea r13, [rsp+118h+var_108]
mov rdi, r13
xor esi, esi
mov r12, [rsp+118h+var_118]
mov rdx, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
lea rbx, [rsp+118h+var_80]
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov rcx, r13
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
loc_70AD9:
mov rdi, r12
mov rsi, rbx
call _ZN5minja5ValueaSEOS0_; minja::Value::operator=(minja::Value&&)
mov rdi, rbx; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r13; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
loc_70AF4:
mov rdi, r15; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add rbp, 10h
xor eax, eax
jmp loc_709DB
loc_70B07:
mov rax, r12
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_70B1C:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aFilterexprPart; "FilterExpr.part is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_70B5B
jmp short loc_70B5B
jmp short loc_70B83
jmp short loc_70B5B
mov r14, rax
jmp short loc_70B68
jmp short loc_70B83
loc_70B5B:
mov r14, rax
lea rdi, [rsp+118h+var_108]; this
call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue()
loc_70B68:
lea rdi, [rsp+118h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_70B86
jmp short loc_70B83
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_70B86
loc_70B83:
mov r14, rax
loc_70B86:
mov rdi, [rsp+118h+var_118]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r14
call __Unwind_Resume
| long long minja::FilterExpr::do_evaluate(minja::Value *a1, long long a2)
{
long long v2; // r12
void (****v3)(void); // rbp
char v4; // al
void (***v5)(void); // r13
void (****v6)(void); // rax
void (****v7)(void); // r12
std::runtime_error *exception; // r15
void (****v10)(void); // [rsp+8h] [rbp-110h]
_OWORD v11[3]; // [rsp+10h] [rbp-108h] BYREF
_BYTE v12[80]; // [rsp+48h] [rbp-D0h] BYREF
_BYTE v13[128]; // [rsp+98h] [rbp-80h] BYREF
v2 = (long long)a1;
minja::Value::Value(a1);
v3 = *(void (*****)(void))(a2 + 32);
v10 = *(void (*****)(void))(a2 + 40);
v4 = 1;
while ( v3 != v10 )
{
v5 = *v3;
if ( !*v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterExpr.part is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( (v4 & 1) != 0 )
{
minja::Expression::evaluate((long long)v12, *v3);
minja::Value::operator=(v2, (long long)v12);
}
else
{
v6 = (void (****)(void))__dynamic_cast(
*v3,
(const struct __class_type_info *)&`typeinfo for'minja::Expression,
(const struct __class_type_info *)&`typeinfo for'minja::CallExpr,
0LL);
if ( v6 )
{
v7 = v6;
minja::Expression::evaluate((long long)v12, v6[4]);
minja::ArgumentsExpression::evaluate(v11, (void (*****)(void))v7 + 6);
v2 = (long long)a1;
std::vector<minja::Value>::insert((long long *)v11, *(long long *)&v11[0], a1);
}
else
{
minja::Expression::evaluate((long long)v12, v5);
memset(v11, 0, sizeof(v11));
v2 = (long long)a1;
std::vector<minja::Value>::insert((long long *)v11, 0LL, a1);
}
minja::Value::call((long long)v13, (long long)v12);
minja::Value::operator=(v2, (long long)v13);
minja::Value::~Value((minja::Value *)v13);
minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v11);
}
minja::Value::~Value((minja::Value *)v12);
v3 += 2;
v4 = 0;
}
return v2;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
CALL 0x001678b4
MOV RBP,qword ptr [R15 + 0x20]
MOV RAX,qword ptr [R15 + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV AL,0x1
LEA R15,[RSP + 0x48]
MOV qword ptr [RSP],R12
LAB_001709db:
CMP RBP,qword ptr [RSP + 0x8]
JZ 0x00170b07
MOV R13,qword ptr [RBP]
TEST R13,R13
JZ 0x00170b1c
TEST AL,0x1
JZ 0x00170a15
LAB_001709f7:
MOV RDI,R15
MOV RSI,R13
MOV RDX,R14
CALL 0x001642e8
MOV RDI,R12
MOV RSI,R15
CALL 0x001690f2
JMP 0x00170af4
LAB_00170a15:
MOV RDI,R13
LEA RSI,[0x1fd380]
LEA RDX,[0x1fd8e8]
XOR ECX,ECX
CALL 0x00123a20
TEST RAX,RAX
JZ 0x00170a8a
MOV R12,RAX
MOV RSI,qword ptr [RAX + 0x20]
LAB_00170a39:
MOV RDI,R15
MOV RDX,R14
CALL 0x001642e8
ADD R12,0x30
LAB_00170a48:
LEA R13,[RSP + 0x10]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R14
CALL 0x0016df8e
MOV RSI,qword ptr [RSP + 0x10]
LAB_00170a60:
MOV RDI,R13
MOV R12,qword ptr [RSP]
MOV RDX,R12
CALL 0x0016f7e6
LAB_00170a6f:
LEA RBX,[RSP + 0x98]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,R13
CALL 0x0016ed0a
JMP 0x00170ad9
LAB_00170a8a:
MOV RDI,R15
MOV RSI,R13
MOV RDX,R14
CALL 0x001642e8
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LAB_00170aaa:
LEA R13,[RSP + 0x10]
MOV RDI,R13
XOR ESI,ESI
MOV R12,qword ptr [RSP]
MOV RDX,R12
CALL 0x0016f7e6
LAB_00170ac0:
LEA RBX,[RSP + 0x98]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV RCX,R13
CALL 0x0016ed0a
LAB_00170ad9:
MOV RDI,R12
MOV RSI,RBX
CALL 0x001690f2
MOV RDI,RBX
CALL 0x00164578
MOV RDI,R13
CALL 0x0016edee
LAB_00170af4:
MOV RDI,R15
CALL 0x00164578
ADD RBP,0x10
XOR EAX,EAX
JMP 0x001709db
LAB_00170b07:
MOV RAX,R12
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00170b1c:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R15,RAX
LAB_00170b27:
LEA RSI,[0x1b5dd4]
MOV RDI,RAX
CALL 0x00123330
LAB_00170b36:
MOV RSI,qword ptr [0x001fefe8]
MOV RDX,qword ptr [0x001fef48]
MOV RDI,R15
CALL 0x00123fb0
|
/* minja::FilterExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
FilterExpr * __thiscall minja::FilterExpr::do_evaluate(FilterExpr *this,shared_ptr *param_1)
{
int8 *puVar1;
shared_ptr *psVar2;
bool bVar3;
long lVar4;
runtime_error *this_00;
int8 *puVar5;
int8 local_108;
int8 uStack_100;
int8 local_f8;
int8 uStack_f0;
int8 local_e8;
int8 uStack_e0;
Expression local_d0 [80];
Value local_80 [80];
Value::Value((Value *)this);
puVar5 = *(int8 **)(param_1 + 0x20);
puVar1 = *(int8 **)(param_1 + 0x28);
bVar3 = true;
while( true ) {
if (puVar5 == puVar1) {
return this;
}
psVar2 = (shared_ptr *)*puVar5;
if (psVar2 == (shared_ptr *)0x0) break;
if (bVar3) {
/* try { // try from 001709f7 to 00170a04 has its CatchHandler @ 00170b83 */
Expression::evaluate(local_d0,psVar2);
Value::operator=((Value *)this,(Value *)local_d0);
}
else {
lVar4 = __dynamic_cast(psVar2,&Expression::typeinfo,&CallExpr::typeinfo,0);
if (lVar4 == 0) {
/* try { // try from 00170a8a to 00170a97 has its CatchHandler @ 00170b50 */
Expression::evaluate(local_d0,psVar2);
local_e8 = 0;
uStack_e0 = 0;
local_f8 = 0;
uStack_f0 = 0;
local_108 = 0;
uStack_100 = 0;
/* try { // try from 00170aaa to 00170abf has its CatchHandler @ 00170b4e */
std::vector<minja::Value,std::allocator<minja::Value>>::insert
((vector<minja::Value,std::allocator<minja::Value>> *)&local_108,0,this);
/* try { // try from 00170ac0 to 00170ad8 has its CatchHandler @ 00170b4c */
Value::call(local_80,(ArgumentsValue *)local_d0);
}
else {
/* try { // try from 00170a39 to 00170a43 has its CatchHandler @ 00170b59 */
Expression::evaluate(local_d0,*(shared_ptr **)(lVar4 + 0x20));
/* try { // try from 00170a48 to 00170a5a has its CatchHandler @ 00170b54 */
ArgumentsExpression::evaluate
((ArgumentsExpression *)&local_108,(shared_ptr *)(lVar4 + 0x30));
/* try { // try from 00170a60 to 00170a6e has its CatchHandler @ 00170b52 */
std::vector<minja::Value,std::allocator<minja::Value>>::insert
((vector<minja::Value,std::allocator<minja::Value>> *)&local_108,local_108,this);
/* try { // try from 00170a6f to 00170a87 has its CatchHandler @ 00170b5b */
Value::call(local_80,(ArgumentsValue *)local_d0);
}
Value::operator=((Value *)this,local_80);
Value::~Value(local_80);
ArgumentsValue::~ArgumentsValue((ArgumentsValue *)&local_108);
}
Value::~Value((Value *)local_d0);
puVar5 = puVar5 + 2;
bVar3 = false;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00170b27 to 00170b35 has its CatchHandler @ 00170b76 */
std::runtime_error::runtime_error(this_00,"FilterExpr.part is null");
/* try { // try from 00170b36 to 00170b4b has its CatchHandler @ 00170b74 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48);
}
| |
26,781 | ggml_tallocr_new | 7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c | ggml_tallocr_t ggml_tallocr_new(void * data, size_t size, size_t alignment) {
struct ggml_backend_buffer * buffer = ggml_backend_cpu_buffer_from_ptr(data, size);
ggml_tallocr_t alloc = (ggml_tallocr_t)malloc(sizeof(struct ggml_tallocr));
*alloc = (struct ggml_tallocr) {
/*.buffer = */ buffer,
/*.buffer_owned = */ true,
/*.base = */ ggml_backend_buffer_get_base(buffer),
/*.alignment = */ alignment,
/*.n_free_blocks = */ 0,
/*.free_blocks = */ {{0}},
/*.max_size = */ 0,
/*.measure = */ false,
#ifdef GGML_ALLOCATOR_DEBUG
/*.allocated_tensors = */ {0},
#endif
};
ggml_tallocr_reset(alloc);
return alloc;
} | O0 | c | ggml_tallocr_new:
subq $0x1068, %rsp # imm = 0x1068
movq %rdi, 0x1060(%rsp)
movq %rsi, 0x1058(%rsp)
movq %rdx, 0x1050(%rsp)
movq 0x1060(%rsp), %rdi
movq 0x1058(%rsp), %rsi
callq 0x167c60
movq %rax, 0x1048(%rsp)
movl $0x1038, %edi # imm = 0x1038
callq 0xba00
movq %rax, 0x1040(%rsp)
movq 0x1040(%rsp), %rax
movq %rax, (%rsp)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x1038, %edx # imm = 0x1038
callq 0xb390
movq 0x1048(%rsp), %rax
movq %rax, 0x8(%rsp)
movb $0x1, 0x10(%rsp)
movq 0x1048(%rsp), %rdi
callq 0x1669b0
movq (%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x1050(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x8(%rsp), %rsi
movl $0x1038, %edx # imm = 0x1038
callq 0xb600
movq 0x1040(%rsp), %rdi
callq 0x164b60
movq 0x1040(%rsp), %rax
addq $0x1068, %rsp # imm = 0x1068
retq
nopl (%rax)
| ggml_tallocr_new:
sub rsp, 1068h
mov [rsp+1068h+var_8], rdi
mov [rsp+1068h+var_10], rsi
mov [rsp+1068h+var_18], rdx
mov rdi, [rsp+1068h+var_8]
mov rsi, [rsp+1068h+var_10]
call ggml_backend_cpu_buffer_from_ptr
mov [rsp+1068h+var_20], rax
mov edi, 1038h
call _malloc
mov [rsp+1068h+var_28], rax
mov rax, [rsp+1068h+var_28]
mov [rsp+1068h+var_1068], rax
lea rdi, [rsp+1068h+var_1060]
xor esi, esi
mov edx, 1038h
call _memset
mov rax, [rsp+1068h+var_20]
mov [rsp+1068h+var_1060], rax
mov [rsp+1068h+var_1058], 1
mov rdi, [rsp+1068h+var_20]
call ggml_backend_buffer_get_base
mov rdi, [rsp+1068h+var_1068]
mov [rsp+1068h+var_1050], rax
mov rax, [rsp+1068h+var_18]
mov [rsp+1068h+var_1048], rax
lea rsi, [rsp+1068h+var_1060]
mov edx, 1038h
call _memcpy
mov rdi, [rsp+1068h+var_28]
call ggml_tallocr_reset
mov rax, [rsp+1068h+var_28]
add rsp, 1068h
retn
| long long ggml_tallocr_new(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-1068h]
long long v5; // [rsp+8h] [rbp-1060h] BYREF
char v6; // [rsp+10h] [rbp-1058h]
long long base; // [rsp+18h] [rbp-1050h]
long long v8; // [rsp+20h] [rbp-1048h]
long long v9; // [rsp+1040h] [rbp-28h]
long long v10; // [rsp+1048h] [rbp-20h]
long long v11; // [rsp+1050h] [rbp-18h]
long long v12; // [rsp+1058h] [rbp-10h]
long long v13; // [rsp+1060h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = ggml_backend_cpu_buffer_from_ptr(a1, a2);
v9 = malloc(4152LL);
v4 = v9;
memset(&v5, 0LL, 4152LL);
v5 = v10;
v6 = 1;
base = ggml_backend_buffer_get_base(v10);
v8 = v11;
memcpy(v4, &v5, 4152LL);
ggml_tallocr_reset(v9);
return v9;
}
| |||
26,782 | ggml_tallocr_new | 7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c | ggml_tallocr_t ggml_tallocr_new(void * data, size_t size, size_t alignment) {
struct ggml_backend_buffer * buffer = ggml_backend_cpu_buffer_from_ptr(data, size);
ggml_tallocr_t alloc = (ggml_tallocr_t)malloc(sizeof(struct ggml_tallocr));
*alloc = (struct ggml_tallocr) {
/*.buffer = */ buffer,
/*.buffer_owned = */ true,
/*.base = */ ggml_backend_buffer_get_base(buffer),
/*.alignment = */ alignment,
/*.n_free_blocks = */ 0,
/*.free_blocks = */ {{0}},
/*.max_size = */ 0,
/*.measure = */ false,
#ifdef GGML_ALLOCATOR_DEBUG
/*.allocated_tensors = */ {0},
#endif
};
ggml_tallocr_reset(alloc);
return alloc;
} | O2 | c | ggml_tallocr_new:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
callq 0x9079c
movq %rax, %r14
movl $0x1038, %edi # imm = 0x1038
callq 0xa7e0
movq %rax, %r15
movq %r14, %rdi
callq 0x8fc60
movq %r14, (%r15)
movb $0x1, 0x8(%r15)
andl $0x0, 0x9(%r15)
andl $0x0, 0xc(%r15)
movq %rax, 0x10(%r15)
movq %rbx, 0x18(%r15)
leaq 0x20(%r15), %rdi
movl $0x1018, %edx # imm = 0x1018
xorl %esi, %esi
callq 0xa2f0
movq %r15, %rdi
callq 0x8eea9
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
| ggml_tallocr_new:
push r15
push r14
push rbx
mov rbx, rdx
call ggml_backend_cpu_buffer_from_ptr
mov r14, rax
mov edi, 1038h
call _malloc
mov r15, rax
mov rdi, r14
call ggml_backend_buffer_get_base
mov [r15], r14
mov byte ptr [r15+8], 1
and dword ptr [r15+9], 0
and dword ptr [r15+0Ch], 0
mov [r15+10h], rax
mov [r15+18h], rbx
lea rdi, [r15+20h]
mov edx, 1018h
xor esi, esi
call _memset
mov rdi, r15
call ggml_tallocr_reset
mov rax, r15
pop rbx
pop r14
pop r15
retn
| long long ggml_tallocr_new(long long a1, long long a2, long long a3)
{
long long v4; // r14
long long v5; // r15
long long base; // rax
v4 = ggml_backend_cpu_buffer_from_ptr();
v5 = malloc(4152LL);
base = ggml_backend_buffer_get_base(v4);
*(_QWORD *)v5 = v4;
*(_BYTE *)(v5 + 8) = 1;
*(_DWORD *)(v5 + 9) = 0;
*(_DWORD *)(v5 + 12) = 0;
*(_QWORD *)(v5 + 16) = base;
*(_QWORD *)(v5 + 24) = a3;
memset(v5 + 32, 0LL, 4120LL);
ggml_tallocr_reset(v5);
return v5;
}
| ggml_tallocr_new:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
CALL 0x0019079c
MOV R14,RAX
MOV EDI,0x1038
CALL 0x0010a7e0
MOV R15,RAX
MOV RDI,R14
CALL 0x0018fc60
MOV qword ptr [R15],R14
MOV byte ptr [R15 + 0x8],0x1
AND dword ptr [R15 + 0x9],0x0
AND dword ptr [R15 + 0xc],0x0
MOV qword ptr [R15 + 0x10],RAX
MOV qword ptr [R15 + 0x18],RBX
LEA RDI,[R15 + 0x20]
MOV EDX,0x1018
XOR ESI,ESI
CALL 0x0010a2f0
MOV RDI,R15
CALL 0x0018eea9
MOV RAX,R15
POP RBX
POP R14
POP R15
RET
|
int8 * ggml_tallocr_new(int8 param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
int8 *puVar2;
int8 uVar3;
uVar1 = ggml_backend_cpu_buffer_from_ptr();
puVar2 = (int8 *)malloc(0x1038);
uVar3 = ggml_backend_buffer_get_base(uVar1);
*puVar2 = uVar1;
*(int1 *)(puVar2 + 1) = 1;
*(int4 *)((long)puVar2 + 9) = 0;
*(int4 *)((long)puVar2 + 0xc) = 0;
puVar2[2] = uVar3;
puVar2[3] = param_3;
memset(puVar2 + 4,0,0x1018);
ggml_tallocr_reset(puVar2);
return puVar2;
}
| |
26,783 | my_hash_sort_bin | eloqsql/strings/ctype-bin.c | void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,ulong *nr1, ulong *nr2)
{
const uchar *end = key + len;
ulong tmp1= *nr1;
ulong tmp2= *nr2;
for (; key < end ; key++)
{
MY_HASH_ADD(tmp1, tmp2, (uint) *key);
}
*nr1= tmp1;
*nr2= tmp2;
} | O0 | c | my_hash_sort_bin:
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 -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x34fee
jmp 0x34fa6
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x34fe0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x34f9a
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_sort_bin:
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 rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_40], rax
loc_34F9A:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jnb short loc_34FEE
jmp short $+2
loc_34FA6:
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
jmp short $+2
loc_34FE0:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_34F9A
loc_34FEE:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
pop rbp
retn
| _QWORD * my_hash_sort_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
_QWORD *result; // rax
long long v6; // [rsp+0h] [rbp-40h]
long long v7; // [rsp+8h] [rbp-38h]
unsigned __int8 *v8; // [rsp+30h] [rbp-10h]
v8 = a2;
v7 = *a4;
v6 = *a5;
while ( v8 < &a2[a3] )
{
v7 ^= (v7 << 8) + *v8 * (v6 + (v7 & 0x3F));
v6 += 3LL;
++v8;
}
*a4 = v7;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_bin:
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 RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_00134f9a:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00134fee
JMP 0x00134fa6
LAB_00134fa6:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00134fe0
LAB_00134fe0:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00134f9a
LAB_00134fee:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void my_hash_sort_bin(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
long local_48;
ulong local_40;
byte *local_18;
local_40 = *param_4;
local_48 = *param_5;
for (local_18 = param_2; local_18 < param_2 + param_3; local_18 = local_18 + 1) {
local_40 = ((local_40 & 0x3f) + local_48) * (ulong)*local_18 + local_40 * 0x100 ^ local_40;
local_48 = local_48 + 3;
}
*param_4 = local_40;
*param_5 = local_48;
return;
}
| |
26,784 | MainWindow::MainWindow(QWidget*) | MarsToPluto[P]llmstudio/src/mainwindow.cpp | MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
{
setupUi();
loadDummyData();
applyBasicStyling(); // Apply basic dark theme
setWindowTitle("LM Studio Clone - Qt Demo");
setMinimumSize(800, 600); // Set a reasonable minimum size
} | O3 | cpp | MainWindow::MainWindow(QWidget*):
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
xorl %edx, %edx
callq 0x5130
leaq 0x8038(%rip), %rax # 0xdb28
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
addq $0x1c8, %rax # imm = 0x1C8
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x5bbe
movq %rbx, %rdi
callq 0x5c74
callq 0x5fb4
leaq 0x45a3(%rip), %rdx # 0xa0c0
leaq 0x20(%rsp), %rdi
movl $0x19, %esi
callq 0x5350
movaps 0x20(%rsp), %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsi)
movq %rbx, %rdi
callq 0x54e0
movq (%rsp), %rax
testq %rax, %rax
je 0x5b69
lock
decl (%rax)
jne 0x5b69
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x5310
movq %rbx, %rdi
movl $0x320, %esi # imm = 0x320
movl $0x258, %edx # imm = 0x258
callq 0x51c0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq (%rsp), %rax
testq %rax, %rax
je 0x5bae
lock
decl (%rax)
jne 0x5bae
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x5310
jmp 0x5bae
jmp 0x5bab
movq %rax, %r14
movq %rbx, %rdi
callq 0x52e0
movq %r14, %rdi
callq 0x5220
| _ZN10MainWindowC2EP7QWidget:
push r14; Alternative name is 'MainWindow::MainWindow(QWidget *)'
push rbx
sub rsp, 38h
mov rbx, rdi
xor edx, edx
call __ZN11QMainWindowC2EP7QWidget6QFlagsIN2Qt10WindowTypeEE; QMainWindow::QMainWindow(QWidget *,QFlags<Qt::WindowType>)
lea rax, _ZTV10MainWindow; `vtable for'MainWindow
lea rcx, [rax+10h]
mov [rbx], rcx
add rax, 1C8h
mov [rbx+10h], rax
mov rdi, rbx; this
call _ZN10MainWindow7setupUiEv; MainWindow::setupUi(void)
mov rdi, rbx; this
call _ZN10MainWindow13loadDummyDataEv; MainWindow::loadDummyData(void)
call _ZN10MainWindow17applyBasicStylingEv; MainWindow::applyBasicStyling(void)
lea rdx, aLmStudioCloneQ; "LM Studio Clone - Qt Demo"
lea rdi, [rsp+48h+var_28]
mov esi, 19h
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movaps xmm0, [rsp+48h+var_28]
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov rax, [rsp+48h+var_18]
mov [rsi+10h], rax
mov rdi, rbx
call __ZN7QWidget14setWindowTitleERK7QString; QWidget::setWindowTitle(QString const&)
mov rax, [rsp+48h+var_48]
test rax, rax
jz short loc_5B69
lock dec dword ptr [rax]
jnz short loc_5B69
mov rdi, [rsp+48h+var_48]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_5B69:
mov rdi, rbx; this
mov esi, 320h; int
mov edx, 258h; int
call __ZN7QWidget14setMinimumSizeEii; QWidget::setMinimumSize(int,int)
add rsp, 38h
pop rbx
pop r14
retn
mov r14, rax
mov rax, [rsp+0]
test rax, rax
jz short loc_5BAE
lock dec dword ptr [rax]
jnz short loc_5BAE
mov rdi, [rsp+0]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
jmp short loc_5BAE
jmp short $+2
loc_5BAB:
mov r14, rax
loc_5BAE:
mov rdi, rbx; this
call __ZN11QMainWindowD2Ev; QMainWindow::~QMainWindow()
mov rdi, r14
call __Unwind_Resume
| void MainWindow::MainWindow(MainWindow *this, QWidget *a2)
{
volatile signed __int32 *v2; // [rsp+0h] [rbp-48h]
__int128 v3; // [rsp+20h] [rbp-28h] BYREF
QMainWindow::QMainWindow(this, a2, 0LL);
*(_QWORD *)this = &`vtable for'MainWindow + 2;
*((_QWORD *)this + 2) = &`vtable for'MainWindow + 57;
MainWindow::setupUi(this);
MainWindow::loadDummyData(this);
MainWindow::applyBasicStyling(this);
QString::fromUtf8(&v3, 25LL, "LM Studio Clone - Qt Demo");
v2 = (volatile signed __int32 *)v3;
QWidget::setWindowTitle(this);
if ( v2 && !_InterlockedDecrement(v2) )
QArrayData::deallocate(v2, 2LL, 8LL);
QWidget::setMinimumSize(this, 800, 600);
}
| MainWindow:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
XOR EDX,EDX
CALL 0x00105130
LEA RAX,[0x10db28]
LEA RCX,[RAX + 0x10]
MOV qword ptr [RBX],RCX
ADD RAX,0x1c8
MOV qword ptr [RBX + 0x10],RAX
LAB_00105b01:
MOV RDI,RBX
CALL 0x00105bbe
MOV RDI,RBX
CALL 0x00105c74
CALL 0x00105fb4
LAB_00105b16:
LEA RDX,[0x10a0c0]
LEA RDI,[RSP + 0x20]
MOV ESI,0x19
CALL 0x00105350
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSI + 0x10],RAX
LAB_00105b40:
MOV RDI,RBX
CALL 0x001054e0
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00105b69
DEC.LOCK dword ptr [RAX]
JNZ 0x00105b69
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00105310
LAB_00105b69:
MOV RDI,RBX
MOV ESI,0x320
MOV EDX,0x258
CALL 0x001051c0
LAB_00105b7b:
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* MainWindow::MainWindow(QWidget*) */
void __thiscall MainWindow::MainWindow(MainWindow *this,QWidget *param_1)
{
QArrayData *local_28 [3];
QMainWindow::QMainWindow((QMainWindow *)this,param_1,0);
*(int ***)this = &PTR_metaObject_0010db38;
*(int ***)(this + 0x10) = &PTR__MainWindow_0010dcf0;
/* try { // try from 00105b01 to 00105b15 has its CatchHandler @ 00105bab */
setupUi(this);
loadDummyData(this);
applyBasicStyling();
/* try { // try from 00105b16 to 00105b2b has its CatchHandler @ 00105ba9 */
QString::fromUtf8(local_28,0x19,"LM Studio Clone - Qt Demo");
/* try { // try from 00105b40 to 00105b47 has its CatchHandler @ 00105b83 */
QWidget::setWindowTitle((QString *)this);
if (local_28[0] != (QArrayData *)0x0) {
LOCK();
*(int *)local_28[0] = *(int *)local_28[0] + -1;
UNLOCK();
if (*(int *)local_28[0] == 0) {
QArrayData::deallocate(local_28[0],2,8);
}
}
/* try { // try from 00105b69 to 00105b7a has its CatchHandler @ 00105bab */
QWidget::setMinimumSize((int)this,800);
return;
}
| |
26,785 | MainWindow::applyBasicStyling() | MarsToPluto[P]llmstudio/src/mainwindow.cpp | void MainWindow::applyBasicStyling()
{
// Use Fusion style for a more modern look than default Windows/macOS styles
QApplication::setStyle(QStyleFactory::create("Fusion"));
// Basic Dark Theme Palette
QPalette darkPalette;
darkPalette.setColor(QPalette::Window, QColor(53, 53, 53));
darkPalette.setColor(QPalette::WindowText, Qt::white);
darkPalette.setColor(QPalette::Base, QColor(35, 35, 35)); // Background for text entry widgets
darkPalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53)); // Used in list/table views
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
darkPalette.setColor(QPalette::ToolTipText, QColor(53, 53, 53));
darkPalette.setColor(QPalette::Text, Qt::white);
darkPalette.setColor(QPalette::Button, QColor(53, 53, 53));
darkPalette.setColor(QPalette::ButtonText, Qt::white);
darkPalette.setColor(QPalette::BrightText, Qt::red); // Often used for highlighting
darkPalette.setColor(QPalette::Link, QColor(42, 130, 218));
darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); // Selection color
darkPalette.setColor(QPalette::HighlightedText, Qt::black);
// Disabled state colors
darkPalette.setColor(QPalette::Disabled, QPalette::Text, QColor(127, 127, 127));
darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, QColor(127, 127, 127));
darkPalette.setColor(QPalette::Disabled, QPalette::WindowText, QColor(127, 127, 127));
QApplication::setPalette(darkPalette);
// Optional: Apply some basic QSS for finer control (Example)
// This is where you'd do the detailed styling matching the screenshot
// qApp->setStyleSheet("QMainWindow { background-color: #2d2d2d; } "
// "QDockWidget { titlebar-close-icon: url(close.png); titlebar-normal-icon: url(undock.png); }" // Needs icons
// "#chatListWidget { background-color: #3a3a3a; border: none; }"
// "#chatHistoryDisplay { background-color: #303030; border: 1px solid #444; }"
// "QPushButton { background-color: #4a4a4a; border: 1px solid #555; padding: 5px; } QPushButton:hover { background-color: #5a5a5a; } "
// );
} | O2 | cpp | MainWindow::applyBasicStyling():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
leaq 0x2d9a(%rip), %rsi # 0x8953
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x791c
movq %rbx, %rdi
callq 0x54c0
movq %rax, %rdi
callq 0x54b0
leaq 0x18(%rsp), %rdi
callq 0x7bd8
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x5540
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
movabsq $0x353535353535ffff, %r14 # imm = 0x353535353535FFFF
movq %r14, 0x4(%rdx)
andw $0x0, 0xc(%rdx)
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x7b0e
leaq 0x8(%rsp), %rbx
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x55d0
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x7b0e
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
movabsq $0x232323232323ffff, %rax # imm = 0x232323232323FFFF
movq %rax, 0x4(%rdx)
andw $0x0, 0xc(%rdx)
leaq 0x18(%rsp), %rdi
pushq $0x9
popq %rsi
callq 0x7b0e
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
movq %r14, 0x4(%rdx)
andw $0x0, 0xc(%rdx)
leaq 0x18(%rsp), %rdi
pushq $0x10
popq %rsi
callq 0x7b0e
leaq 0x8(%rsp), %rbx
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x55d0
leaq 0x18(%rsp), %rdi
pushq $0x12
popq %rsi
movq %rbx, %rdx
callq 0x7b0e
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
movq %r14, 0x4(%rdx)
andw $0x0, 0xc(%rdx)
leaq 0x18(%rsp), %rdi
pushq $0x13
popq %rsi
callq 0x7b0e
leaq 0x8(%rsp), %rbx
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x55d0
leaq 0x18(%rsp), %rdi
pushq $0x6
popq %rsi
movq %rbx, %rdx
callq 0x7b0e
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
movq %r14, 0x4(%rdx)
andw $0x0, 0xc(%rdx)
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x7b0e
leaq 0x8(%rsp), %rbx
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x55d0
leaq 0x18(%rsp), %rdi
pushq $0x8
popq %rsi
movq %rbx, %rdx
callq 0x7b0e
leaq 0x8(%rsp), %rbx
pushq $0x7
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x55d0
leaq 0x18(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x7b0e
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
movabsq $-0x25257d7dd5d50001, %rbx # imm = 0xDADA82822A2AFFFF
movq %rbx, 0x4(%rdx)
andw $0x0, 0xc(%rdx)
leaq 0x18(%rsp), %rdi
pushq $0xe
popq %rsi
callq 0x7b0e
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
movq %rbx, 0x4(%rdx)
andw $0x0, 0xc(%rdx)
leaq 0x18(%rsp), %rdi
pushq $0xc
popq %rsi
callq 0x7b0e
leaq 0x8(%rsp), %rbx
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x55d0
leaq 0x18(%rsp), %rdi
pushq $0xd
popq %rsi
movq %rbx, %rdx
callq 0x7b0e
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
movabsq $0x7f7f7f7f7f7fffff, %rbx # imm = 0x7F7F7F7F7F7FFFFF
movq %rbx, 0x4(%rcx)
andw $0x0, 0xc(%rcx)
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x6
popq %rdx
callq 0x7b1c
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
movq %rbx, 0x4(%rcx)
andw $0x0, 0xc(%rcx)
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
callq 0x7b1c
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
movq %rbx, 0x4(%rcx)
andw $0x0, 0xc(%rcx)
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x7b1c
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x5580
leaq 0x18(%rsp), %rdi
callq 0x5110
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
jmp 0x5e64
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5110
movq %rbx, %rdi
callq 0x5230
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x7bd8
jmp 0x5e71
| _ZN10MainWindow17applyBasicStylingEv:
push rbp
push r14
push rbx
sub rsp, 30h
lea rsi, aFusion; "Fusion"
lea rbx, [rsp+48h+var_30]
mov rdi, rbx; this
call _ZN7QStringC2EPKc; QString::QString(char const*)
mov rdi, rbx
call __ZN13QStyleFactory6createERK7QString; QStyleFactory::create(QString const&)
mov rdi, rax
call __ZN12QApplication8setStyleEP6QStyle; QApplication::setStyle(QStyle *)
lea rdi, [rsp+48h+var_30]
call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer()
lea rbx, [rsp+48h+var_30]
mov rdi, rbx; this
call __ZN8QPaletteC1Ev; QPalette::QPalette(void)
lea rdx, [rsp+48h+var_40]
mov dword ptr [rdx], 1
mov r14, 353535353535FFFFh
mov [rdx+4], r14
and word ptr [rdx+0Ch], 0
push 0Ah
pop rsi
mov rdi, rbx
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rbx, [rsp+48h+var_40]
push 3
pop rsi
mov rdi, rbx
call __ZN6QColorC1EN2Qt11GlobalColorE; QColor::QColor(Qt::GlobalColor)
lea rdi, [rsp+48h+var_30]
xor esi, esi
mov rdx, rbx
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rdx, [rsp+48h+var_40]
mov dword ptr [rdx], 1
mov rax, 232323232323FFFFh
mov [rdx+4], rax
and word ptr [rdx+0Ch], 0
lea rdi, [rsp+48h+var_30]
push 9
pop rsi
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rdx, [rsp+48h+var_40]
mov dword ptr [rdx], 1
mov [rdx+4], r14
and word ptr [rdx+0Ch], 0
lea rdi, [rsp+48h+var_30]
push 10h
pop rsi
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rbx, [rsp+48h+var_40]
push 3
pop rsi
mov rdi, rbx
call __ZN6QColorC1EN2Qt11GlobalColorE; QColor::QColor(Qt::GlobalColor)
lea rdi, [rsp+48h+var_30]
push 12h
pop rsi
mov rdx, rbx
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rdx, [rsp+48h+var_40]
mov dword ptr [rdx], 1
mov [rdx+4], r14
and word ptr [rdx+0Ch], 0
lea rdi, [rsp+48h+var_30]
push 13h
pop rsi
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rbx, [rsp+48h+var_40]
push 3
pop rsi
mov rdi, rbx
call __ZN6QColorC1EN2Qt11GlobalColorE; QColor::QColor(Qt::GlobalColor)
lea rdi, [rsp+48h+var_30]
push 6
pop rsi
mov rdx, rbx
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rdx, [rsp+48h+var_40]
mov dword ptr [rdx], 1
mov [rdx+4], r14
and word ptr [rdx+0Ch], 0
lea rdi, [rsp+48h+var_30]
push 1
pop rsi
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rbx, [rsp+48h+var_40]
push 3
pop rsi
mov rdi, rbx
call __ZN6QColorC1EN2Qt11GlobalColorE; QColor::QColor(Qt::GlobalColor)
lea rdi, [rsp+48h+var_30]
push 8
pop rsi
mov rdx, rbx
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rbx, [rsp+48h+var_40]
push 7
pop rbp
mov rdi, rbx
mov esi, ebp
call __ZN6QColorC1EN2Qt11GlobalColorE; QColor::QColor(Qt::GlobalColor)
lea rdi, [rsp+48h+var_30]
mov esi, ebp
mov rdx, rbx
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rdx, [rsp+48h+var_40]
mov dword ptr [rdx], 1
mov rbx, 0DADA82822A2AFFFFh
mov [rdx+4], rbx
and word ptr [rdx+0Ch], 0
lea rdi, [rsp+48h+var_30]
push 0Eh
pop rsi
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rdx, [rsp+48h+var_40]
mov dword ptr [rdx], 1
mov [rdx+4], rbx
and word ptr [rdx+0Ch], 0
lea rdi, [rsp+48h+var_30]
push 0Ch
pop rsi
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rbx, [rsp+48h+var_40]
push 2
pop rsi
mov rdi, rbx
call __ZN6QColorC1EN2Qt11GlobalColorE; QColor::QColor(Qt::GlobalColor)
lea rdi, [rsp+48h+var_30]
push 0Dh
pop rsi
mov rdx, rbx
call _ZN8QPalette8setColorENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorRole,QColor const&)
lea rcx, [rsp+48h+var_40]
mov dword ptr [rcx], 1
mov rbx, 7F7F7F7F7F7FFFFFh
mov [rcx+4], rbx
and word ptr [rcx+0Ch], 0
lea rdi, [rsp+48h+var_30]
push 1
pop rsi
push 6
pop rdx
call _ZN8QPalette8setColorENS_10ColorGroupENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorGroup,QPalette::ColorRole,QColor const&)
lea rcx, [rsp+48h+var_40]
mov dword ptr [rcx], 1
mov [rcx+4], rbx
and word ptr [rcx+0Ch], 0
lea rdi, [rsp+48h+var_30]
push 1
pop rsi
push 8
pop rdx
call _ZN8QPalette8setColorENS_10ColorGroupENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorGroup,QPalette::ColorRole,QColor const&)
lea rcx, [rsp+48h+var_40]
mov dword ptr [rcx], 1
mov [rcx+4], rbx
and word ptr [rcx+0Ch], 0
lea rdi, [rsp+48h+var_30]
push 1
pop rsi
xor edx, edx
call _ZN8QPalette8setColorENS_10ColorGroupENS_9ColorRoleERK6QColor; QPalette::setColor(QPalette::ColorGroup,QPalette::ColorRole,QColor const&)
lea rdi, [rsp+48h+var_30]; this
xor esi, esi; QPalette *
call __ZN12QApplication10setPaletteERK8QPalettePKc; QApplication::setPalette(QPalette const&,char const*)
lea rdi, [rsp+48h+var_30]; this
call __ZN8QPaletteD1Ev; QPalette::~QPalette()
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short loc_5E64
jmp short $+2
loc_5E64:
mov rbx, rax
lea rdi, [rsp+arg_10]; this
call __ZN8QPaletteD1Ev; QPalette::~QPalette()
loc_5E71:
mov rdi, rbx
call __Unwind_Resume
mov rbx, rax
lea rdi, [rsp+arg_10]
call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer()
jmp short loc_5E71
| void MainWindow::applyBasicStyling(MainWindow *this)
{
long long v1; // rax
const char *v2; // rdx
int v3; // [rsp+8h] [rbp-40h] BYREF
unsigned long long v4; // [rsp+Ch] [rbp-3Ch]
__int16 v5; // [rsp+14h] [rbp-34h]
_BYTE v6[48]; // [rsp+18h] [rbp-30h] BYREF
QString::QString((QString *)v6, "Fusion");
v1 = QStyleFactory::create((QStyleFactory *)v6, (const QString *)"Fusion");
QApplication::setStyle(v1);
QArrayDataPointer<char16_t>::~QArrayDataPointer(v6);
QPalette::QPalette((QPalette *)v6);
v3 = 1;
v4 = 0x353535353535FFFFLL;
v5 = 0;
QPalette::setColor(v6, 10LL, &v3);
QColor::QColor(&v3, 3LL);
QPalette::setColor(v6, 0LL, &v3);
v3 = 1;
v4 = 0x232323232323FFFFLL;
v5 = 0;
QPalette::setColor(v6, 9LL, &v3);
v3 = 1;
v4 = 0x353535353535FFFFLL;
v5 = 0;
QPalette::setColor(v6, 16LL, &v3);
QColor::QColor(&v3, 3LL);
QPalette::setColor(v6, 18LL, &v3);
v3 = 1;
v4 = 0x353535353535FFFFLL;
v5 = 0;
QPalette::setColor(v6, 19LL, &v3);
QColor::QColor(&v3, 3LL);
QPalette::setColor(v6, 6LL, &v3);
v3 = 1;
v4 = 0x353535353535FFFFLL;
v5 = 0;
QPalette::setColor(v6, 1LL, &v3);
QColor::QColor(&v3, 3LL);
QPalette::setColor(v6, 8LL, &v3);
QColor::QColor(&v3, 7LL);
QPalette::setColor(v6, 7LL, &v3);
v3 = 1;
v4 = 0xDADA82822A2AFFFFLL;
v5 = 0;
QPalette::setColor(v6, 14LL, &v3);
v3 = 1;
v4 = 0xDADA82822A2AFFFFLL;
v5 = 0;
QPalette::setColor(v6, 12LL, &v3);
QColor::QColor(&v3, 2LL);
QPalette::setColor(v6, 13LL, &v3);
v3 = 1;
v4 = 0x7F7F7F7F7F7FFFFFLL;
v5 = 0;
QPalette::setColor(v6, 1LL, 6LL, &v3);
v3 = 1;
v4 = 0x7F7F7F7F7F7FFFFFLL;
v5 = 0;
QPalette::setColor(v6, 1LL, 8LL, &v3);
v3 = 1;
v4 = 0x7F7F7F7F7F7FFFFFLL;
v5 = 0;
QPalette::setColor(v6, 1LL, 0LL, &v3);
QApplication::setPalette((QApplication *)v6, 0LL, v2);
QPalette::~QPalette((QPalette *)v6);
}
| applyBasicStyling:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
LEA RSI,[0x108953]
LEA RBX,[RSP + 0x18]
MOV RDI,RBX
CALL 0x0010791c
LAB_00105bc6:
MOV RDI,RBX
CALL 0x001054c0
MOV RDI,RAX
CALL 0x001054b0
LAB_00105bd6:
LEA RDI,[RSP + 0x18]
CALL 0x00107bd8
LEA RBX,[RSP + 0x18]
MOV RDI,RBX
CALL 0x00105540
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],0x1
MOV R14,0x353535353535ffff
MOV qword ptr [RDX + 0x4],R14
AND word ptr [RDX + 0xc],0x0
LAB_00105c0b:
PUSH 0xa
POP RSI
MOV RDI,RBX
CALL 0x00107b0e
LEA RBX,[RSP + 0x8]
PUSH 0x3
POP RSI
MOV RDI,RBX
CALL 0x001055d0
LAB_00105c26:
LEA RDI,[RSP + 0x18]
XOR ESI,ESI
MOV RDX,RBX
CALL 0x00107b0e
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],0x1
MOV RAX,0x232323232323ffff
MOV qword ptr [RDX + 0x4],RAX
AND word ptr [RDX + 0xc],0x0
LAB_00105c53:
LEA RDI,[RSP + 0x18]
PUSH 0x9
POP RSI
CALL 0x00107b0e
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],0x1
MOV qword ptr [RDX + 0x4],R14
AND word ptr [RDX + 0xc],0x0
LAB_00105c74:
LEA RDI,[RSP + 0x18]
PUSH 0x10
POP RSI
CALL 0x00107b0e
LEA RBX,[RSP + 0x8]
PUSH 0x3
POP RSI
MOV RDI,RBX
CALL 0x001055d0
LAB_00105c91:
LEA RDI,[RSP + 0x18]
PUSH 0x12
POP RSI
MOV RDX,RBX
CALL 0x00107b0e
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],0x1
MOV qword ptr [RDX + 0x4],R14
AND word ptr [RDX + 0xc],0x0
LAB_00105cb5:
LEA RDI,[RSP + 0x18]
PUSH 0x13
POP RSI
CALL 0x00107b0e
LEA RBX,[RSP + 0x8]
PUSH 0x3
POP RSI
MOV RDI,RBX
CALL 0x001055d0
LAB_00105cd2:
LEA RDI,[RSP + 0x18]
PUSH 0x6
POP RSI
MOV RDX,RBX
CALL 0x00107b0e
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],0x1
MOV qword ptr [RDX + 0x4],R14
AND word ptr [RDX + 0xc],0x0
LAB_00105cf6:
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RSI
CALL 0x00107b0e
LEA RBX,[RSP + 0x8]
PUSH 0x3
POP RSI
MOV RDI,RBX
CALL 0x001055d0
LAB_00105d13:
LEA RDI,[RSP + 0x18]
PUSH 0x8
POP RSI
MOV RDX,RBX
CALL 0x00107b0e
LEA RBX,[RSP + 0x8]
PUSH 0x7
POP RBP
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001055d0
LAB_00105d35:
LEA RDI,[RSP + 0x18]
MOV ESI,EBP
MOV RDX,RBX
CALL 0x00107b0e
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],0x1
MOV RBX,-0x25257d7dd5d50001
MOV qword ptr [RDX + 0x4],RBX
AND word ptr [RDX + 0xc],0x0
LAB_00105d62:
LEA RDI,[RSP + 0x18]
PUSH 0xe
POP RSI
CALL 0x00107b0e
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],0x1
MOV qword ptr [RDX + 0x4],RBX
AND word ptr [RDX + 0xc],0x0
LAB_00105d83:
LEA RDI,[RSP + 0x18]
PUSH 0xc
POP RSI
CALL 0x00107b0e
LEA RBX,[RSP + 0x8]
PUSH 0x2
POP RSI
MOV RDI,RBX
CALL 0x001055d0
LAB_00105da0:
LEA RDI,[RSP + 0x18]
PUSH 0xd
POP RSI
MOV RDX,RBX
CALL 0x00107b0e
LEA RCX,[RSP + 0x8]
MOV dword ptr [RCX],0x1
MOV RBX,0x7f7f7f7f7f7fffff
MOV qword ptr [RCX + 0x4],RBX
AND word ptr [RCX + 0xc],0x0
LAB_00105dce:
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RSI
PUSH 0x6
POP RDX
CALL 0x00107b1c
LEA RCX,[RSP + 0x8]
MOV dword ptr [RCX],0x1
MOV qword ptr [RCX + 0x4],RBX
AND word ptr [RCX + 0xc],0x0
LAB_00105df2:
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RSI
PUSH 0x8
POP RDX
CALL 0x00107b1c
LEA RCX,[RSP + 0x8]
MOV dword ptr [RCX],0x1
MOV qword ptr [RCX + 0x4],RBX
AND word ptr [RCX + 0xc],0x0
LAB_00105e16:
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RSI
XOR EDX,EDX
CALL 0x00107b1c
LAB_00105e25:
LEA RDI,[RSP + 0x18]
XOR ESI,ESI
CALL 0x00105580
LAB_00105e31:
LEA RDI,[RSP + 0x18]
CALL 0x00105110
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
|
/* MainWindow::applyBasicStyling() */
void MainWindow::applyBasicStyling(void)
{
QStyle *pQVar1;
int4 local_40;
int8 local_3c;
int2 local_34;
QString local_30 [24];
QString::QString(local_30,"Fusion");
/* try { // try from 00105bc6 to 00105bd5 has its CatchHandler @ 00105e79 */
pQVar1 = (QStyle *)QStyleFactory::create(local_30);
QApplication::setStyle(pQVar1);
QArrayDataPointer<char16_t>::~QArrayDataPointer((QArrayDataPointer<char16_t> *)local_30);
QPalette::QPalette((QPalette *)local_30);
local_40 = 1;
local_3c = 0x353535353535ffff;
local_34 = 0;
/* try { // try from 00105c0b to 00105c15 has its CatchHandler @ 00105e64 */
QPalette::setColor((QPalette *)local_30,10);
QColor::QColor((QColor *)&local_40,3);
/* try { // try from 00105c26 to 00105c34 has its CatchHandler @ 00105e62 */
QPalette::setColor((QPalette *)local_30,0,(QColor *)&local_40);
local_40 = 1;
local_3c = 0x232323232323ffff;
local_34 = 0;
/* try { // try from 00105c53 to 00105c5f has its CatchHandler @ 00105e60 */
QPalette::setColor((QPalette *)local_30,9);
local_40 = 1;
local_3c = 0x353535353535ffff;
local_34 = 0;
/* try { // try from 00105c74 to 00105c80 has its CatchHandler @ 00105e5e */
QPalette::setColor((QPalette *)local_30,0x10);
QColor::QColor((QColor *)&local_40,3);
/* try { // try from 00105c91 to 00105ca0 has its CatchHandler @ 00105e5c */
QPalette::setColor((QPalette *)local_30,0x12,(QColor *)&local_40);
local_40 = 1;
local_3c = 0x353535353535ffff;
local_34 = 0;
/* try { // try from 00105cb5 to 00105cc1 has its CatchHandler @ 00105e5a */
QPalette::setColor((QPalette *)local_30,0x13);
QColor::QColor((QColor *)&local_40,3);
/* try { // try from 00105cd2 to 00105ce1 has its CatchHandler @ 00105e58 */
QPalette::setColor((QPalette *)local_30,6,(QColor *)&local_40);
local_40 = 1;
local_3c = 0x353535353535ffff;
local_34 = 0;
/* try { // try from 00105cf6 to 00105d02 has its CatchHandler @ 00105e56 */
QPalette::setColor((QPalette *)local_30,1);
QColor::QColor((QColor *)&local_40,3);
/* try { // try from 00105d13 to 00105d22 has its CatchHandler @ 00105e54 */
QPalette::setColor((QPalette *)local_30,8,(QColor *)&local_40);
QColor::QColor((QColor *)&local_40,7);
/* try { // try from 00105d35 to 00105d43 has its CatchHandler @ 00105e52 */
QPalette::setColor((QPalette *)local_30,7,(QColor *)&local_40);
local_40 = 1;
local_3c = 0xdada82822a2affff;
local_34 = 0;
/* try { // try from 00105d62 to 00105d6e has its CatchHandler @ 00105e50 */
QPalette::setColor((QPalette *)local_30,0xe);
local_40 = 1;
local_3c = 0xdada82822a2affff;
local_34 = 0;
/* try { // try from 00105d83 to 00105d8f has its CatchHandler @ 00105e4e */
QPalette::setColor((QPalette *)local_30,0xc);
QColor::QColor((QColor *)&local_40,2);
/* try { // try from 00105da0 to 00105daf has its CatchHandler @ 00105e4c */
QPalette::setColor((QPalette *)local_30,0xd,(QColor *)&local_40);
local_40 = 1;
local_3c = 0x7f7f7f7f7f7fffff;
local_34 = 0;
/* try { // try from 00105dce to 00105ddd has its CatchHandler @ 00105e4a */
QPalette::setColor((QPalette *)local_30,1,6);
local_40 = 1;
local_3c = 0x7f7f7f7f7f7fffff;
local_34 = 0;
/* try { // try from 00105df2 to 00105e01 has its CatchHandler @ 00105e48 */
QPalette::setColor((QPalette *)local_30,1,8);
local_40 = 1;
local_3c = 0x7f7f7f7f7f7fffff;
local_34 = 0;
/* try { // try from 00105e16 to 00105e24 has its CatchHandler @ 00105e46 */
QPalette::setColor((QPalette *)local_30,1,0);
/* try { // try from 00105e25 to 00105e30 has its CatchHandler @ 00105e44 */
QApplication::setPalette((QPalette *)local_30,(char *)0x0);
QPalette::~QPalette((QPalette *)local_30);
return;
}
| |
26,786 | bf_add_epsilon | bluesky950520[P]quickjs/libbf.c | static int bf_add_epsilon(bf_t *r, const bf_t *a, slimb_t e, int e_sign,
limb_t prec, int flags)
{
bf_t T_s, *T = &T_s;
int ret;
/* small argument case: result = 1 + epsilon * sign(x) */
bf_init(a->ctx, T);
bf_set_ui(T, 1);
T->sign = e_sign;
T->expn += e;
ret = bf_add(r, r, T, prec, flags);
bf_delete(T);
return ret;
} | O0 | c | bf_add_epsilon:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq %r8, 0x40(%rsp)
movl %r9d, 0x3c(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0xe5f70
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0xe60a0
movl 0x4c(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x50(%rsp), %rcx
movq 0x8(%rsp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq 0x60(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x40(%rsp), %rcx
movl 0x3c(%rsp), %r8d
callq 0xea170
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdi
callq 0xe93d0
movl 0x4(%rsp), %eax
addq $0x68, %rsp
retq
nop
| bf_add_epsilon:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_1C], ecx
mov [rsp+68h+var_28], r8
mov [rsp+68h+var_2C], r9d
lea rax, [rsp+68h+var_58]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_10]
mov rdi, [rax]
mov rsi, [rsp+68h+var_60]
call bf_init
mov rdi, [rsp+68h+var_60]
mov esi, 1
call bf_set_ui
mov ecx, [rsp+68h+var_1C]
mov rax, [rsp+68h+var_60]
mov [rax+8], ecx
mov rcx, [rsp+68h+var_18]
mov rax, [rsp+68h+var_60]
add rcx, [rax+10h]
mov [rax+10h], rcx
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_8]
mov rdx, [rsp+68h+var_60]
mov rcx, [rsp+68h+var_28]
mov r8d, [rsp+68h+var_2C]
call bf_add
mov [rsp+68h+var_64], eax
mov rdi, [rsp+68h+var_60]
call bf_delete_0
mov eax, [rsp+68h+var_64]
add rsp, 68h
retn
| long long bf_add_epsilon(long long a1, long long *a2, long long a3, int a4, long long a5, unsigned int a6)
{
long long v6; // rsi
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
unsigned int v12; // [rsp+4h] [rbp-64h]
long long v13; // [rsp+10h] [rbp-58h] BYREF
int v14; // [rsp+18h] [rbp-50h]
long long v15; // [rsp+20h] [rbp-48h]
unsigned int v16; // [rsp+3Ch] [rbp-2Ch]
long long v17; // [rsp+40h] [rbp-28h]
int v18; // [rsp+4Ch] [rbp-1Ch]
long long v19; // [rsp+50h] [rbp-18h]
long long *v20; // [rsp+58h] [rbp-10h]
long long v21; // [rsp+60h] [rbp-8h]
v21 = a1;
v20 = a2;
v19 = a3;
v18 = a4;
v17 = a5;
v16 = a6;
bf_init(*a2, (long long)&v13);
bf_set_ui((long long)&v13, 1LL);
v14 = v18;
v15 += v19;
v6 = v21;
v12 = bf_add(v21, v21, (long long)&v13, v17, v16);
bf_delete_0(&v13, v6, v7, v8, v9, v10);
return v12;
}
| bf_add_epsilon:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV dword ptr [RSP + 0x4c],ECX
MOV qword ptr [RSP + 0x40],R8
MOV dword ptr [RSP + 0x3c],R9D
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001e5f70
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1
CALL 0x001e60a0
MOV ECX,dword ptr [RSP + 0x4c]
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x8],ECX
MOV RCX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x8]
ADD RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x40]
MOV R8D,dword ptr [RSP + 0x3c]
CALL 0x001ea170
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001e93d0
MOV EAX,dword ptr [RSP + 0x4]
ADD RSP,0x68
RET
|
int4
bf_add_epsilon(int8 param_1,int8 *param_2,long param_3,int4 param_4,
int8 param_5,int4 param_6)
{
int4 uVar1;
int1 local_58 [8];
int4 local_50;
long local_48;
int4 local_2c;
int8 local_28;
int4 local_1c;
long local_18;
int8 *local_10;
int8 local_8;
local_2c = param_6;
local_28 = param_5;
local_1c = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
bf_init(*param_2,local_58);
bf_set_ui(local_58,1);
local_50 = local_1c;
local_48 = local_18 + local_48;
uVar1 = bf_add(local_8,local_8,local_58,local_28,local_2c);
bf_delete(local_58);
return uVar1;
}
| |
26,787 | bf_add_epsilon | bluesky950520[P]quickjs/libbf.c | static int bf_add_epsilon(bf_t *r, const bf_t *a, slimb_t e, int e_sign,
limb_t prec, int flags)
{
bf_t T_s, *T = &T_s;
int ret;
/* small argument case: result = 1 + epsilon * sign(x) */
bf_init(a->ctx, T);
bf_set_ui(T, 1);
T->sign = e_sign;
T->expn += e;
ret = bf_add(r, r, T, prec, flags);
bf_delete(T);
return ret;
} | O1 | c | bf_add_epsilon:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %r12
movq (%rsi), %rax
movq %rsp, %r13
movq %rax, (%r13)
movl $0x0, 0x8(%r13)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movl $0x1, %esi
movq %r13, %rdi
callq 0x84abb
movl %ebp, 0x8(%r13)
addq %r15, 0x10(%r13)
leaq -0x30d6(%rip), %r9 # 0x87bd4
movq %r12, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x87b3a
movl %eax, %ebx
movq (%r13), %rax
testq %rax, %rax
je 0x8acdb
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x8acdb
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_add_epsilon:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r9d
mov r14, r8
mov ebp, ecx
mov r15, rdx
mov r12, rdi
mov rax, [rsi]
mov r13, rsp
mov [r13+0], rax
mov dword ptr [r13+8], 0
mov rax, 8000000000000000h
mov [r13+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
mov esi, 1
mov rdi, r13
call bf_set_ui
mov [r13+8], ebp
add [r13+10h], r15
lea r9, __bf_add
mov rdi, r12
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8d, ebx
call bf_op2
mov ebx, eax
mov rax, [r13+0]
test rax, rax
jz short loc_8ACDB
mov rsi, [rsp+58h+var_38]
test rsi, rsi
jz short loc_8ACDB
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8ACDB:
mov eax, ebx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_add_epsilon(__int128 *a1, _QWORD *a2, long long a3, int a4, long long a5, unsigned int a6)
{
unsigned int v10; // ebx
__int128 v12; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v13; // [rsp+10h] [rbp-48h]
__int128 v14; // [rsp+18h] [rbp-40h]
*(_QWORD *)&v12 = *a2;
DWORD2(v12) = 0;
v13 = 0x8000000000000000LL;
v14 = 0LL;
bf_set_ui((_QWORD **)&v12, 1uLL);
DWORD2(v12) = a4;
v13 += a3;
v10 = bf_op2(a1, a1, &v12, a5, a6, (long long ( *)(__int128 *))_bf_add);
if ( (_QWORD)v12 && *((_QWORD *)&v14 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v12 + 8))(*(_QWORD *)v12, *((_QWORD *)&v14 + 1), 0LL);
return v10;
}
| |||
26,788 | bf_add_epsilon | bluesky950520[P]quickjs/libbf.c | static int bf_add_epsilon(bf_t *r, const bf_t *a, slimb_t e, int e_sign,
limb_t prec, int flags)
{
bf_t T_s, *T = &T_s;
int ret;
/* small argument case: result = 1 + epsilon * sign(x) */
bf_init(a->ctx, T);
bf_set_ui(T, 1);
T->sign = e_sign;
T->expn += e;
ret = bf_add(r, r, T, prec, flags);
bf_delete(T);
return ret;
} | O2 | c | bf_add_epsilon:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %r12
movq (%rsi), %rax
movq %rsp, %r13
movq %rax, (%r13)
andl $0x0, 0x8(%r13)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0x6f556
movl %ebp, 0x8(%r13)
addq %r15, 0x10(%r13)
movq %r12, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x71c49
movl %eax, %ebx
movq %r13, %rdi
callq 0x7145e
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_add_epsilon:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r9d
mov r14, r8
mov ebp, ecx
mov r15, rdx
mov r12, rdi
mov rax, [rsi]
mov r13, rsp
mov [r13+0], rax
and dword ptr [r13+8], 0
mov rax, 8000000000000000h
mov [r13+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
push 1
pop rsi
mov rdi, r13
call bf_set_ui
mov [r13+8], ebp
add [r13+10h], r15
mov rdi, r12
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8d, ebx
call bf_add
mov ebx, eax
mov rdi, r13
call bf_delete_0
mov eax, ebx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_add_epsilon(long long a1, long long *a2, long long a3, int a4, long long a5, unsigned int a6)
{
unsigned int v10; // ebx
long long v12; // [rsp+0h] [rbp-58h] BYREF
int v13; // [rsp+8h] [rbp-50h]
unsigned long long v14; // [rsp+10h] [rbp-48h]
__int128 v15; // [rsp+18h] [rbp-40h]
v12 = *a2;
v13 = 0;
v14 = 0x8000000000000000LL;
v15 = 0LL;
bf_set_ui((long long)&v12, 1uLL);
v13 = a4;
v14 += a3;
v10 = bf_add(a1, a1, (long long)&v12, a5, a6);
bf_delete_0(&v12);
return v10;
}
| bf_add_epsilon:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R9D
MOV R14,R8
MOV EBP,ECX
MOV R15,RDX
MOV R12,RDI
MOV RAX,qword ptr [RSI]
MOV R13,RSP
MOV qword ptr [R13],RAX
AND dword ptr [R13 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R13 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x18],XMM0
PUSH 0x1
POP RSI
MOV RDI,R13
CALL 0x0016f556
MOV dword ptr [R13 + 0x8],EBP
ADD qword ptr [R13 + 0x10],R15
MOV RDI,R12
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8D,EBX
CALL 0x00171c49
MOV EBX,EAX
MOV RDI,R13
CALL 0x0017145e
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
bf_add_epsilon(int8 param_1,int8 *param_2,long param_3,int4 param_4,
int8 param_5,int4 param_6)
{
int4 uVar1;
int8 local_58;
int4 local_50;
long local_48;
int8 local_40;
int8 uStack_38;
local_58 = *param_2;
local_50 = 0;
local_48 = -0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
bf_set_ui(&local_58,1);
local_48 = local_48 + param_3;
local_50 = param_4;
uVar1 = bf_add(param_1,param_1,&local_58,param_5,param_6);
bf_delete(&local_58);
return uVar1;
}
| |
26,789 | bf_add_epsilon | bluesky950520[P]quickjs/libbf.c | static int bf_add_epsilon(bf_t *r, const bf_t *a, slimb_t e, int e_sign,
limb_t prec, int flags)
{
bf_t T_s, *T = &T_s;
int ret;
/* small argument case: result = 1 + epsilon * sign(x) */
bf_init(a->ctx, T);
bf_set_ui(T, 1);
T->sign = e_sign;
T->expn += e;
ret = bf_add(r, r, T, prec, flags);
bf_delete(T);
return ret;
} | O3 | c | bf_add_epsilon:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %r12
movq %rsp, %r13
movq %rsi, (%r13)
movl $0x0, 0x8(%r13)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movl $0x1, %esi
movq %r13, %rdi
callq 0x87504
movl %ebp, 0x8(%r13)
addq %r15, 0x10(%r13)
leaq -0x306c(%rip), %r9 # 0x8a6d3
movq %r12, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x8a639
movl %eax, %ebx
movq (%r13), %rax
testq %rax, %rax
je 0x8d770
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x8d770
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_add_epsilon:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r9d
mov r14, r8
mov ebp, ecx
mov r15, rdx
mov r12, rdi
mov r13, rsp
mov [r13+0], rsi
mov dword ptr [r13+8], 0
mov rax, 8000000000000000h
mov [r13+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
mov esi, 1
mov rdi, r13
call bf_set_ui
mov [r13+8], ebp
add [r13+10h], r15
lea r9, __bf_add
mov rdi, r12
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8d, ebx
call bf_op2
mov ebx, eax
mov rax, [r13+0]
test rax, rax
jz short loc_8D770
mov rsi, [rsp+58h+var_38]
test rsi, rsi
jz short loc_8D770
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8D770:
mov eax, ebx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_add_epsilon(__int128 *a1, long long a2, long long a3, int a4, long long a5, unsigned int a6)
{
unsigned int v10; // ebx
__int128 v12; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v13; // [rsp+10h] [rbp-48h]
__int128 v14; // [rsp+18h] [rbp-40h]
*(_QWORD *)&v12 = a2;
DWORD2(v12) = 0;
v13 = 0x8000000000000000LL;
v14 = 0LL;
bf_set_ui((_QWORD **)&v12, 1uLL);
DWORD2(v12) = a4;
v13 += a3;
v10 = bf_op2(a1, a1, &v12, a5, a6, (long long ( *)(__int128 *))_bf_add);
if ( (_QWORD)v12 && *((_QWORD *)&v14 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v12 + 8))(*(_QWORD *)v12, *((_QWORD *)&v14 + 1), 0LL);
return v10;
}
| bf_add_epsilon:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R9D
MOV R14,R8
MOV EBP,ECX
MOV R15,RDX
MOV R12,RDI
MOV R13,RSP
MOV qword ptr [R13],RSI
MOV dword ptr [R13 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R13 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x18],XMM0
MOV ESI,0x1
MOV RDI,R13
CALL 0x00187504
MOV dword ptr [R13 + 0x8],EBP
ADD qword ptr [R13 + 0x10],R15
LEA R9,[0x18a6d3]
MOV RDI,R12
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8D,EBX
CALL 0x0018a639
MOV EBX,EAX
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x0018d770
MOV RSI,qword ptr [RSP + 0x20]
TEST RSI,RSI
JZ 0x0018d770
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018d770:
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
bf_add_epsilon(int8 param_1,int8 *param_2,long param_3,int4 param_4,
int8 param_5,int4 param_6)
{
int4 uVar1;
int8 *local_58;
int4 local_50;
long local_48;
int8 local_40;
long lStack_38;
local_50 = 0;
local_48 = -0x8000000000000000;
local_40 = 0;
lStack_38 = 0;
local_58 = param_2;
bf_set_ui(&local_58,1);
local_48 = local_48 + param_3;
local_50 = param_4;
uVar1 = bf_op2(param_1,param_1,&local_58,param_5,param_6,__bf_add);
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
return uVar1;
}
| |
26,790 | minja::FilterNode::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 {
if (!filter) throw std::runtime_error("FilterNode.filter is null");
if (!body) throw std::runtime_error("FilterNode.body is null");
auto filter_value = filter->evaluate(context);
if (!filter_value.is_callable()) {
throw std::runtime_error("Filter must be a callable: " + filter_value.dump());
}
std::string rendered_body = body->render(context);
ArgumentsValue filter_args = {{Value(rendered_body)}, {}};
auto result = filter_value.call(context, filter_args);
out << result.to_str();
} | O3 | cpp | minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0xa442d
movq %rdi, %r14
cmpq $0x0, 0x30(%rdi)
je 0xa444b
movq %rdx, %r15
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
callq 0x89ab4
cmpq $0x0, 0x30(%r12)
je 0xa447d
movq 0x30(%r14), %rsi
leaq 0xa0(%rsp), %rdi
movq %r15, %rdx
callq 0xa28ba
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x8de04
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rcx
movl $0x1, %edx
callq 0x96fcc
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq $0x0, 0x28(%rsp)
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5c5ee
movq %r14, %rdi
callq 0x61a6a
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0xa423e
callq 0x7140a
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xa424d
callq 0x7140a
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xa425c
callq 0x7140a
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xa4292
movq 0x8bd0b(%rip), %rax # 0x12ff78
cmpb $0x0, (%rax)
je 0xa427d
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa4287
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa4292
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x18(%rsp), %r14
leaq 0x50(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %rsp, %rcx
movq %r15, %rdx
callq 0x973ae
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x9a6a6
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x1bbc0
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa42eb
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1ba60
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5c5ee
movq %rbx, %rdi
callq 0x61a6a
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xa4313
callq 0x7140a
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xa4322
callq 0x7140a
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xa4331
callq 0x7140a
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xa4367
movq 0x8bc36(%rip), %rax # 0x12ff78
cmpb $0x0, (%rax)
je 0xa4352
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa435c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa4367
movq (%rdi), %rax
callq *0x18(%rax)
movq %r14, %rdi
callq 0x986f6
movq %rsp, %rdi
callq 0x91588
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4398
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1ba60
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5c5ee
movq %rbx, %rdi
callq 0x61a6a
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xa43c0
callq 0x7140a
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0xa43d2
callq 0x7140a
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0xa43e4
callq 0x7140a
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0xa441d
movq 0x8bb80(%rip), %rax # 0x12ff78
cmpb $0x0, (%rax)
je 0xa4408
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa4412
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa441d
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b4d0
movq %rax, %r14
leaq 0x4fd4e(%rip), %rsi # 0xf418f
movq %rax, %rdi
callq 0x1b370
jmp 0xa4467
movl $0x10, %edi
callq 0x1b4d0
movq %rax, %r14
leaq 0x4fd4a(%rip), %rsi # 0xf41a9
movq %rax, %rdi
callq 0x1b370
movq 0x8bb7a(%rip), %rsi # 0x12ffe8
movq 0x8badb(%rip), %rdx # 0x12ff50
movq %r14, %rdi
callq 0x1c1c0
movl $0x10, %edi
callq 0x1b4d0
movq %rax, %r14
movq %rsp, %rdi
leaq 0xc0(%rsp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8a0c8
leaq 0x4fd19(%rip), %rsi # 0xf41c1
leaq 0x50(%rsp), %rdi
movq %rsp, %rdx
callq 0x7c85d
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x1c0a0
xorl %ebp, %ebp
movq 0x8bb1a(%rip), %rsi # 0x12ffe8
movq 0x8ba7b(%rip), %rdx # 0x12ff50
movq %r14, %rdi
callq 0x1c1c0
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa44fb
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1ba60
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4516
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1ba60
testb %bpl, %bpl
jne 0xa4543
jmp 0xa45de
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4543
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1ba60
jmp 0xa4543
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b760
jmp 0xa45de
jmp 0xa4552
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b760
jmp 0xa45eb
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4585
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1ba60
jmp 0xa4585
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x89da6
jmp 0xa4594
movq %rax, %rbx
movq %r14, %rdi
callq 0x986f6
movq %rsp, %rdi
callq 0x91588
jmp 0xa45b8
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x89da6
jmp 0xa45b8
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa45de
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1ba60
jmp 0xa45de
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x89da6
movq %rbx, %rdi
callq 0x1c250
nop
| _ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_A442D
mov r14, rdi
cmp qword ptr [rdi+30h], 0
jz loc_A444B
mov r15, rdx
lea r12, [rsp+138h+var_78]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp qword ptr [r12+30h], 0
jz loc_A447D
mov rsi, [r14+30h]
lea rdi, [rsp+138h+var_98]
mov rdx, r15
call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&)
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_98]
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, rsp
lea rsi, [rsp+138h+var_E8]
lea rcx, [rsp+138h+var_108]
mov edx, 1
call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&)
xorps xmm0, xmm0
movups [rsp+138h+var_120], xmm0
mov [rsp+138h+var_110], 0
lea r14, [rsp+138h+var_A8]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_A423E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A423E:
mov rdi, [rsp+138h+var_C0]
test rdi, rdi
jz short loc_A424D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A424D:
mov rdi, [rsp+138h+var_D0]
test rdi, rdi
jz short loc_A425C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A425C:
mov rdi, [rsp+138h+var_E0]
test rdi, rdi
jz short loc_A4292
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A427D
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A4287
loc_A427D:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A4287:
cmp eax, 1
jnz short loc_A4292
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A4292:
lea r14, [rsp+138h+var_120]
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_78]
mov rcx, rsp
mov rdx, r15
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
lea rdi, [rsp+138h+var_108]
lea rsi, [rsp+138h+var_E8]
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
mov rsi, [rsp+138h+var_108]
mov rdx, [rsp+138h+var_100]
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)
lea rax, [rsp+138h+var_F8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A42EB
mov rsi, [rsp+138h+var_F8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A42EB:
lea rbx, [rsp+138h+var_A8]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_A4313
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A4313:
mov rdi, [rsp+138h+var_C0]
test rdi, rdi
jz short loc_A4322
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A4322:
mov rdi, [rsp+138h+var_D0]
test rdi, rdi
jz short loc_A4331
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A4331:
mov rdi, [rsp+138h+var_E0]
test rdi, rdi
jz short loc_A4367
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A4352
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A435C
loc_A4352:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A435C:
cmp eax, 1
jnz short loc_A4367
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A4367:
mov rdi, r14
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
lea rax, [rsp+138h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4398
mov rsi, [rsp+138h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A4398:
lea rbx, [rsp+138h+var_38]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_A43C0
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A43C0:
mov rdi, [rsp+138h+var_50]
test rdi, rdi
jz short loc_A43D2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A43D2:
mov rdi, [rsp+138h+var_60]
test rdi, rdi
jz short loc_A43E4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A43E4:
mov rdi, [rsp+138h+var_70]
test rdi, rdi
jz short loc_A441D
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A4408
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A4412
loc_A4408:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A4412:
cmp eax, 1
jnz short loc_A441D
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A441D:
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A442D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeFilt; "FilterNode.filter is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_A4467
loc_A444B:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeBody; "FilterNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_A4467:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_A447D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
lea rsi, [rsp+138h+var_78]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aFilterMustBeAC; "Filter must be a callable: "
lea rdi, [rsp+138h+var_E8]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+138h+var_E8]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rax, [rsp+138h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A44FB
mov rsi, [rsp+138h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A44FB:
lea rax, [rsp+138h+var_128]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4516
mov rsi, [rsp+138h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A4516:
test bpl, bpl
jnz short loc_A4543
jmp loc_A45DE
mov rbx, rax
lea rax, [rsp+138h+var_128]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4543
mov rsi, [rsp+138h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A4543
mov rbx, rax
loc_A4543:
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_A45DE
jmp short $+2
loc_A4552:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_A45EB
mov rbx, rax
lea rax, [rsp+138h+var_F8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4585
mov rsi, [rsp+138h+var_F8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A4585
mov rbx, rax
loc_A4585:
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_A4594
mov rbx, rax
loc_A4594:
mov rdi, r14
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp short loc_A45B8
mov rbx, rax
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_A45B8
mov rbx, rax
loc_A45B8:
lea rax, [rsp+138h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A45DE
mov rsi, [rsp+138h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A45DE
mov rbx, rax
loc_A45DE:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_A45EB:
mov rdi, rbx
call __Unwind_Resume
| long long minja::FilterNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
long long v4; // rdi
signed __int32 v5; // eax
long long v6; // rdi
signed __int32 v7; // eax
long long result; // rax
long long v9; // rdi
std::runtime_error *exception; // r14
void *v11; // r14
_QWORD v12[2]; // [rsp+0h] [rbp-138h] BYREF
__int128 v13; // [rsp+18h] [rbp-120h] BYREF
long long v14; // [rsp+28h] [rbp-110h]
void *v15[2]; // [rsp+30h] [rbp-108h] BYREF
long long v16; // [rsp+40h] [rbp-F8h] BYREF
_BYTE v17[8]; // [rsp+50h] [rbp-E8h] BYREF
long long v18; // [rsp+58h] [rbp-E0h]
volatile signed __int32 *v19; // [rsp+68h] [rbp-D0h]
volatile signed __int32 *v20; // [rsp+78h] [rbp-C0h]
volatile signed __int32 *v21; // [rsp+88h] [rbp-B0h]
char v22[16]; // [rsp+90h] [rbp-A8h] BYREF
void *v23[2]; // [rsp+A0h] [rbp-98h] BYREF
long long v24; // [rsp+B0h] [rbp-88h] BYREF
_BYTE v25[8]; // [rsp+C0h] [rbp-78h] BYREF
long long v26; // [rsp+C8h] [rbp-70h]
volatile signed __int32 *v27; // [rsp+D8h] [rbp-60h]
volatile signed __int32 *v28; // [rsp+E8h] [rbp-50h]
long long v29; // [rsp+F0h] [rbp-48h]
volatile signed __int32 *v30; // [rsp+F8h] [rbp-40h]
char v31[56]; // [rsp+100h] [rbp-38h] BYREF
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.filter is null");
goto LABEL_47;
}
if ( !*(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.body is null");
LABEL_47:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v25, v3);
if ( !v29 )
{
v11 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v12, (long long)v25, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v17, (long long)"Filter must be a callable: ", (long long)v12);
std::runtime_error::runtime_error(v11, v17);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::TemplateNode::render[abi:cxx11]((long long)v23, *(long long ( ****)(_QWORD))(a1 + 48));
minja::Value::Value((long long)v17, (long long)v23);
std::vector<minja::Value>::vector((long long)v12, (long long)v17, 1LL);
v13 = 0LL;
v14 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v22);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22);
if ( v21 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21);
if ( v20 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
v4 = v18;
if ( v18 )
{
if ( _libc_single_threaded )
{
v5 = *(_DWORD *)(v18 + 12);
*(_DWORD *)(v18 + 12) = v5 - 1;
}
else
{
v5 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF);
}
if ( v5 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v4 + 24LL))(v4, 0LL);
}
minja::Value::call((long long)v17, (long long)v25);
minja::Value::to_str[abi:cxx11](v15, (long long)v17);
std::__ostream_insert<char,std::char_traits<char>>(a2, v15[0], v15[1]);
if ( v15[0] != &v16 )
operator delete(v15[0], v16 + 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(v22);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22);
if ( v21 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21);
if ( v20 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
v6 = v18;
if ( v18 )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(v18 + 12);
*(_DWORD *)(v18 + 12) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
std::vector<std::pair<std::string,minja::Value>>::~vector((char **)&v13);
std::vector<minja::Value>::~vector(v12);
if ( v23[0] != &v24 )
operator delete(v23[0], v24 + 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(v31);
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v31);
if ( v30 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30);
if ( v28 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v28);
if ( v27 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v27);
v9 = v26;
if ( v26 )
{
if ( _libc_single_threaded )
{
result = *(unsigned int *)(v26 + 12);
*(_DWORD *)(v26 + 12) = result - 1;
}
else
{
result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v26 + 12), 0xFFFFFFFF);
}
if ( (_DWORD)result == 1 )
return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL);
}
return result;
}
| do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x001a442d
MOV R14,RDI
CMP qword ptr [RDI + 0x30],0x0
JZ 0x001a444b
MOV R15,RDX
LEA R12,[RSP + 0xc0]
MOV RDI,R12
CALL 0x00189ab4
CMP qword ptr [R12 + 0x30],0x0
JZ 0x001a447d
MOV RSI,qword ptr [R14 + 0x30]
LAB_001a41cc:
LEA RDI,[RSP + 0xa0]
MOV RDX,R15
CALL 0x001a28ba
LAB_001a41dc:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xa0]
CALL 0x0018de04
LAB_001a41ee:
MOV RDI,RSP
LEA RSI,[RSP + 0x50]
LEA RCX,[RSP + 0x30]
MOV EDX,0x1
CALL 0x00196fcc
LAB_001a4205:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV qword ptr [RSP + 0x28],0x0
LEA R14,[RSP + 0x90]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015c5ee
MOV RDI,R14
CALL 0x00161a6a
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001a423e
CALL 0x0017140a
LAB_001a423e:
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x001a424d
CALL 0x0017140a
LAB_001a424d:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x001a425c
CALL 0x0017140a
LAB_001a425c:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x001a4292
MOV RAX,qword ptr [0x0022ff78]
CMP byte ptr [RAX],0x0
JZ 0x001a427d
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a4287
LAB_001a427d:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a4287:
CMP EAX,0x1
JNZ 0x001a4292
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a4292:
LEA R14,[RSP + 0x18]
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xc0]
MOV RCX,RSP
MOV RDX,R15
CALL 0x001973ae
LAB_001a42af:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x50]
CALL 0x0019a6a6
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
LAB_001a42c8:
MOV RDI,RBX
CALL 0x0011bbc0
LAB_001a42d0:
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a42eb
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011ba60
LAB_001a42eb:
LEA RBX,[RSP + 0x90]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0015c5ee
MOV RDI,RBX
CALL 0x00161a6a
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x001a4313
CALL 0x0017140a
LAB_001a4313:
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x001a4322
CALL 0x0017140a
LAB_001a4322:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x001a4331
CALL 0x0017140a
LAB_001a4331:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x001a4367
MOV RAX,qword ptr [0x0022ff78]
CMP byte ptr [RAX],0x0
JZ 0x001a4352
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a435c
LAB_001a4352:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a435c:
CMP EAX,0x1
JNZ 0x001a4367
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a4367:
MOV RDI,R14
CALL 0x001986f6
MOV RDI,RSP
CALL 0x00191588
LEA RAX,[RSP + 0xb0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a4398
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x0011ba60
LAB_001a4398:
LEA RBX,[RSP + 0x100]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0015c5ee
MOV RDI,RBX
CALL 0x00161a6a
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x001a43c0
CALL 0x0017140a
LAB_001a43c0:
MOV RDI,qword ptr [RSP + 0xe8]
TEST RDI,RDI
JZ 0x001a43d2
CALL 0x0017140a
LAB_001a43d2:
MOV RDI,qword ptr [RSP + 0xd8]
TEST RDI,RDI
JZ 0x001a43e4
CALL 0x0017140a
LAB_001a43e4:
MOV RDI,qword ptr [RSP + 0xc8]
TEST RDI,RDI
JZ 0x001a441d
MOV RAX,qword ptr [0x0022ff78]
CMP byte ptr [RAX],0x0
JZ 0x001a4408
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a4412
LAB_001a4408:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a4412:
CMP EAX,0x1
JNZ 0x001a441d
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a441d:
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a442d:
MOV EDI,0x10
CALL 0x0011b4d0
MOV R14,RAX
LAB_001a443a:
LEA RSI,[0x1f418f]
MOV RDI,RAX
CALL 0x0011b370
LAB_001a4449:
JMP 0x001a4467
LAB_001a444b:
MOV EDI,0x10
CALL 0x0011b4d0
MOV R14,RAX
LAB_001a4458:
LEA RSI,[0x1f41a9]
MOV RDI,RAX
CALL 0x0011b370
LAB_001a4467:
MOV RSI,qword ptr [0x0022ffe8]
MOV RDX,qword ptr [0x0022ff50]
MOV RDI,R14
CALL 0x0011c1c0
LAB_001a447d:
MOV EDI,0x10
CALL 0x0011b4d0
MOV R14,RAX
LAB_001a448a:
MOV RDI,RSP
LEA RSI,[RSP + 0xc0]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018a0c8
LAB_001a44a1:
LEA RSI,[0x1f41c1]
LEA RDI,[RSP + 0x50]
MOV RDX,RSP
CALL 0x0017c85d
MOV BPL,0x1
LAB_001a44b8:
LEA RSI,[RSP + 0x50]
MOV RDI,R14
CALL 0x0011c0a0
XOR EBP,EBP
MOV RSI,qword ptr [0x0022ffe8]
MOV RDX,qword ptr [0x0022ff50]
MOV RDI,R14
CALL 0x0011c1c0
|
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int iVar2;
runtime_error *prVar3;
vector<minja::Value,std::allocator<minja::Value>> avStack_138 [24];
int8 local_120;
int8 uStack_118;
int8 local_110;
long *local_108;
long local_100;
long local_f8 [2];
Value local_e8 [8];
long *local_e0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_d0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_c0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b0;
data local_a8 [16];
long *local_98 [2];
long local_88 [2];
Expression local_78 [8];
long *local_70;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
long local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
data local_38 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a443a to 001a4448 has its CatchHandler @ 001a4552 */
std::runtime_error::runtime_error(prVar3,"FilterNode.filter is null");
}
else {
if (*(long *)(param_1 + 0x30) != 0) {
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 001a41cc to 001a41db has its CatchHandler @ 001a45db */
TemplateNode::render_abi_cxx11_((TemplateNode *)local_98,*(shared_ptr **)(param_1 + 0x30));
/* try { // try from 001a41dc to 001a41ed has its CatchHandler @ 001a45b5 */
Value::Value(local_e8,(string *)local_98);
/* try { // try from 001a41ee to 001a4204 has its CatchHandler @ 001a45a6 */
std::vector<minja::Value,std::allocator<minja::Value>>::vector
(avStack_138,local_e8,1,&local_108);
local_120 = 0;
uStack_118 = 0;
local_110 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_a8,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_a8);
if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0);
}
if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0);
}
if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0);
}
if (local_e0 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ff78 == '\0') {
LOCK();
piVar1 = (int *)((long)local_e0 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_e0 + 0xc);
*(int *)((long)local_e0 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_e0 + 0x18))();
}
}
/* try { // try from 001a4292 to 001a42ae has its CatchHandler @ 001a4591 */
Value::call((shared_ptr *)local_e8,(ArgumentsValue *)local_78);
/* try { // try from 001a42af to 001a42bd has its CatchHandler @ 001a4582 */
Value::to_str_abi_cxx11_();
/* try { // try from 001a42c8 to 001a42cf has its CatchHandler @ 001a4562 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_108,local_100);
if (local_108 != local_f8) {
operator_delete(local_108,local_f8[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_a8,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_a8);
if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0);
}
if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0);
}
if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0);
}
if (local_e0 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ff78 == '\0') {
LOCK();
piVar1 = (int *)((long)local_e0 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_e0 + 0xc);
*(int *)((long)local_e0 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_e0 + 0x18))();
}
}
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::~vector((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
*)&local_120);
std::vector<minja::Value,std::allocator<minja::Value>>::~vector(avStack_138);
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_38,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_38);
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_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
if (local_70 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ff78 == '\0') {
LOCK();
piVar1 = (int *)((long)local_70 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_70 + 0xc);
*(int *)((long)local_70 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_70 + 0x18))();
}
}
return;
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a448a to 001a44a0 has its CatchHandler @ 001a4540 */
Value::dump_abi_cxx11_((int)avStack_138,SUB81(local_78,0));
/* try { // try from 001a44a1 to 001a44b4 has its CatchHandler @ 001a4520 */
std::operator+((char *)local_e8,(string *)"Filter must be a callable: ");
/* try { // try from 001a44b8 to 001a44dc has its CatchHandler @ 001a44dd */
std::runtime_error::runtime_error(prVar3,(string *)local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50);
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a4458 to 001a4466 has its CatchHandler @ 001a4550 */
std::runtime_error::runtime_error(prVar3,"FilterNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50);
}
| |
26,791 | GetHostName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) | ng-log[P]ng-log/src/logging.cc | static void GetHostName(string* hostname) {
#if defined(HAVE_SYS_UTSNAME_H)
struct utsname buf;
if (uname(&buf) < 0) {
// ensure null termination on failure
*buf.nodename = '\0';
}
*hostname = buf.nodename;
#elif defined(NGLOG_OS_WINDOWS)
char buf[MAX_COMPUTERNAME_LENGTH + 1];
DWORD len = MAX_COMPUTERNAME_LENGTH + 1;
if (GetComputerNameA(buf, &len)) {
*hostname = buf;
} else {
hostname->clear();
}
#else
# warning There is no way to retrieve the host name.
*hostname = "(unknown)";
#endif
} | O0 | cpp | GetHostName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*):
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp # imm = 0x190
movq %rdi, -0x8(%rbp)
leaq -0x18e(%rbp), %rdi
callq 0x90e0
cmpl $0x0, %eax
jge 0xd167
movb $0x0, -0x14d(%rbp)
leaq -0x18e(%rbp), %rsi
addq $0x41, %rsi
movq -0x8(%rbp), %rdi
callq 0x9a30
addq $0x190, %rsp # imm = 0x190
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZL11GetHostNamePNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 190h
mov [rbp+var_8], rdi
lea rdi, [rbp+var_18E]
call _uname
cmp eax, 0
jge short loc_D167
mov [rbp+var_14D], 0
loc_D167:
lea rsi, [rbp+var_18E]
add rsi, 41h ; 'A'
mov rdi, [rbp+var_8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
add rsp, 190h
pop rbp
retn
| long long GetHostName(long long a1)
{
_BYTE v2[65]; // [rsp+2h] [rbp-18Eh] BYREF
_BYTE v3[325]; // [rsp+43h] [rbp-14Dh] BYREF
long long v4; // [rsp+188h] [rbp-8h]
v4 = a1;
if ( (int)uname(v2) < 0 )
v3[0] = 0;
return std::string::operator=(v4, v3);
}
| GetHostName:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x190
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x18e]
CALL 0x001090e0
CMP EAX,0x0
JGE 0x0010d167
MOV byte ptr [RBP + -0x14d],0x0
LAB_0010d167:
LEA RSI,[RBP + -0x18e]
ADD RSI,0x41
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00109a30
ADD RSP,0x190
POP RBP
RET
|
/* GetHostName(std::__cxx11::string*) */
void GetHostName(string *param_1)
{
int iVar1;
utsname local_196;
string *local_10;
local_10 = param_1;
iVar1 = uname(&local_196);
if (iVar1 < 0) {
local_196.nodename[0] = '\0';
}
std::__cxx11::string::operator=(local_10,local_196.nodename);
return;
}
| |
26,792 | GetHostName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) | ng-log[P]ng-log/src/logging.cc | static void GetHostName(string* hostname) {
#if defined(HAVE_SYS_UTSNAME_H)
struct utsname buf;
if (uname(&buf) < 0) {
// ensure null termination on failure
*buf.nodename = '\0';
}
*hostname = buf.nodename;
#elif defined(NGLOG_OS_WINDOWS)
char buf[MAX_COMPUTERNAME_LENGTH + 1];
DWORD len = MAX_COMPUTERNAME_LENGTH + 1;
if (GetComputerNameA(buf, &len)) {
*hostname = buf;
} else {
hostname->clear();
}
#else
# warning There is no way to retrieve the host name.
*hostname = "(unknown)";
#endif
} | O1 | cpp | GetHostName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x190, %rsp # imm = 0x190
movq %rdi, %rbx
leaq 0xa(%rsp), %rdi
callq 0x70a0
testl %eax, %eax
jns 0x9566
movb $0x0, 0x4b(%rsp)
leaq 0x4b(%rsp), %r14
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x71f0
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x7880
addq $0x190, %rsp # imm = 0x190
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZL11GetHostNamePNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 190h
mov rbx, rdi
lea rdi, [rsp+1A8h+var_19E]
call _uname
test eax, eax
jns short loc_9566
mov [rsp+1A8h+var_15D], 0
loc_9566:
lea r14, [rsp+1A8h+var_15D]
mov r15, [rbx+8]
mov rdi, r14
call _strlen
mov rdi, rbx
xor esi, esi
mov rdx, r15
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
add rsp, 190h
pop rbx
pop r14
pop r15
retn
| long long GetHostName(long long a1)
{
long long v1; // r15
long long v2; // rax
_BYTE v4[65]; // [rsp+Ah] [rbp-19Eh] BYREF
_BYTE v5[349]; // [rsp+4Bh] [rbp-15Dh] BYREF
if ( (int)uname(v4) < 0 )
v5[0] = 0;
v1 = *(_QWORD *)(a1 + 8);
v2 = strlen(v5);
return std::string::_M_replace(a1, 0LL, v1, v5, v2);
}
| GetHostName:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x190
MOV RBX,RDI
LEA RDI,[RSP + 0xa]
CALL 0x001070a0
TEST EAX,EAX
JNS 0x00109566
MOV byte ptr [RSP + 0x4b],0x0
LAB_00109566:
LEA R14,[RSP + 0x4b]
MOV R15,qword ptr [RBX + 0x8]
MOV RDI,R14
CALL 0x001071f0
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R15
MOV RCX,R14
MOV R8,RAX
CALL 0x00107880
ADD RSP,0x190
POP RBX
POP R14
POP R15
RET
|
/* GetHostName(std::__cxx11::string*) */
void GetHostName(string *param_1)
{
char *pcVar1;
int iVar2;
utsname local_19e;
iVar2 = uname(&local_19e);
if (iVar2 < 0) {
local_19e.nodename[0] = '\0';
}
pcVar1 = *(char **)(param_1 + 8);
strlen(local_19e.nodename);
std::__cxx11::string::_M_replace((ulong)param_1,0,pcVar1,(ulong)local_19e.nodename);
return;
}
| |
26,793 | common_sampler::set_logits(llama_context*, int) | monkey531[P]llama/common/sampling.cpp | void set_logits(struct llama_context * ctx, int idx) {
const auto * logits = llama_get_logits_ith(ctx, idx);
const llama_model * model = llama_get_model(ctx);
const llama_vocab * vocab = llama_model_get_vocab(model);
const int n_vocab = llama_vocab_n_tokens(vocab);
cur.resize(n_vocab);
for (llama_token token_id = 0; token_id < n_vocab; token_id++) {
cur[token_id] = llama_token_data{token_id, logits[token_id], 0.0f};
}
cur_p = { cur.data(), cur.size(), -1, false };
} | O3 | cpp | common_sampler::set_logits(llama_context*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x1ada0
movq %rax, %r14
movq %r15, %rdi
callq 0x1a7b0
movq %rax, %rdi
callq 0x1b140
movq %rax, %rdi
callq 0x1b0d0
movl %eax, %ebp
leaq 0x180(%rbx), %rdi
movslq %eax, %r15
movq %r15, %rsi
callq 0xcf0ce
movq 0x180(%rbx), %rax
testl %r15d, %r15d
jle 0xceed8
movl %ebp, %ecx
leaq 0x8(%rax), %rdx
xorl %esi, %esi
movss (%r14,%rsi,4), %xmm0
movl %esi, -0x8(%rdx)
movss %xmm0, -0x4(%rdx)
movl $0x0, (%rdx)
incq %rsi
addq $0xc, %rdx
cmpq %rsi, %rcx
jne 0xceeb8
movq 0x188(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq %rax, 0x198(%rbx)
movq %rdx, 0x1a0(%rbx)
movq $-0x1, 0x1a8(%rbx)
movb $0x0, 0x1b0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN14common_sampler10set_logitsEP13llama_contexti:
push rbp
push r15
push r14
push rbx
push rax
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, edx
call _llama_get_logits_ith
mov r14, rax
mov rdi, r15
call _llama_get_model
mov rdi, rax
call _llama_model_get_vocab
mov rdi, rax
call _llama_vocab_n_tokens
mov ebp, eax
lea rdi, [rbx+180h]
movsxd r15, eax
mov rsi, r15
call _ZNSt6vectorI16llama_token_dataSaIS0_EE6resizeEm; std::vector<llama_token_data>::resize(ulong)
mov rax, [rbx+180h]
test r15d, r15d
jle short loc_CEED8
mov ecx, ebp
lea rdx, [rax+8]
xor esi, esi
loc_CEEB8:
movss xmm0, dword ptr [r14+rsi*4]
mov [rdx-8], esi
movss dword ptr [rdx-4], xmm0
mov dword ptr [rdx], 0
inc rsi
add rdx, 0Ch
cmp rcx, rsi
jnz short loc_CEEB8
loc_CEED8:
mov rcx, [rbx+188h]
sub rcx, rax
sar rcx, 2
mov rdx, 0AAAAAAAAAAAAAAABh
imul rdx, rcx
mov [rbx+198h], rax
mov [rbx+1A0h], rdx
mov qword ptr [rbx+1A8h], 0FFFFFFFFFFFFFFFFh
mov byte ptr [rbx+1B0h], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long common_sampler::set_logits(long long a1, long long a2, unsigned int a3)
{
long long v6; // rsi
long long logits_ith; // r14
long long model; // rax
long long vocab; // rax
int v10; // ebp
long long result; // rax
_DWORD *v12; // rdx
long long i; // rsi
int v14; // xmm0_4
unsigned long long v15; // rdx
v6 = a3;
logits_ith = llama_get_logits_ith(a2, a3);
model = llama_get_model(a2);
vocab = llama_model_get_vocab(model, v6);
v10 = llama_vocab_n_tokens(vocab);
std::vector<llama_token_data>::resize(a1 + 384, v10);
result = *(_QWORD *)(a1 + 384);
if ( v10 > 0 )
{
v12 = (_DWORD *)(result + 8);
for ( i = 0LL; i != v10; ++i )
{
v14 = *(_DWORD *)(logits_ith + 4 * i);
*(v12 - 2) = i;
*(v12 - 1) = v14;
*v12 = 0;
v12 += 3;
}
}
v15 = 0xAAAAAAAAAAAAAAABLL * ((*(_QWORD *)(a1 + 392) - result) >> 2);
*(_QWORD *)(a1 + 408) = result;
*(_QWORD *)(a1 + 416) = v15;
*(_QWORD *)(a1 + 424) = -1LL;
*(_BYTE *)(a1 + 432) = 0;
return result;
}
| set_logits:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,EDX
CALL 0x0011ada0
MOV R14,RAX
MOV RDI,R15
CALL 0x0011a7b0
MOV RDI,RAX
CALL 0x0011b140
MOV RDI,RAX
CALL 0x0011b0d0
MOV EBP,EAX
LEA RDI,[RBX + 0x180]
MOVSXD R15,EAX
MOV RSI,R15
CALL 0x001cf0ce
MOV RAX,qword ptr [RBX + 0x180]
TEST R15D,R15D
JLE 0x001ceed8
MOV ECX,EBP
LEA RDX,[RAX + 0x8]
XOR ESI,ESI
LAB_001ceeb8:
MOVSS XMM0,dword ptr [R14 + RSI*0x4]
MOV dword ptr [RDX + -0x8],ESI
MOVSS dword ptr [RDX + -0x4],XMM0
MOV dword ptr [RDX],0x0
INC RSI
ADD RDX,0xc
CMP RCX,RSI
JNZ 0x001ceeb8
LAB_001ceed8:
MOV RCX,qword ptr [RBX + 0x188]
SUB RCX,RAX
SAR RCX,0x2
MOV RDX,-0x5555555555555555
IMUL RDX,RCX
MOV qword ptr [RBX + 0x198],RAX
MOV qword ptr [RBX + 0x1a0],RDX
MOV qword ptr [RBX + 0x1a8],-0x1
MOV byte ptr [RBX + 0x1b0],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* common_sampler::set_logits(llama_context*, int) */
void __thiscall common_sampler::set_logits(common_sampler *this,llama_context *param_1,int param_2)
{
int4 uVar1;
long lVar2;
uint uVar3;
long lVar4;
int8 uVar5;
int4 *puVar6;
ulong uVar7;
lVar4 = llama_get_logits_ith(param_1,param_2);
uVar5 = llama_get_model(param_1);
uVar5 = llama_model_get_vocab(uVar5);
uVar3 = llama_vocab_n_tokens(uVar5);
std::vector<llama_token_data,std::allocator<llama_token_data>>::resize
((vector<llama_token_data,std::allocator<llama_token_data>> *)(this + 0x180),
(long)(int)uVar3);
lVar2 = *(long *)(this + 0x180);
if (0 < (int)uVar3) {
puVar6 = (int4 *)(lVar2 + 8);
uVar7 = 0;
do {
uVar1 = *(int4 *)(lVar4 + uVar7 * 4);
puVar6[-2] = (int)uVar7;
puVar6[-1] = uVar1;
*puVar6 = 0;
uVar7 = uVar7 + 1;
puVar6 = puVar6 + 3;
} while (uVar3 != uVar7);
}
*(long *)(this + 0x198) = lVar2;
*(long *)(this + 0x1a0) = (*(long *)(this + 0x188) - lVar2 >> 2) * -0x5555555555555555;
*(int8 *)(this + 0x1a8) = 0xffffffffffffffff;
this[0x1b0] = (common_sampler)0x0;
return;
}
| |
26,794 | testing::TestInfo* testing::RegisterTest<testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0>(char const*, char const*, char const*, char const*, char const*, int, testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0) | AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest.h | TestInfo* RegisterTest(const char* test_suite_name, const char* test_name,
const char* type_param, const char* value_param,
const char* file, int line, Factory factory) {
using TestT = typename std::remove_pointer<decltype(factory())>::type;
class FactoryImpl : public internal::TestFactoryBase {
public:
explicit FactoryImpl(Factory f) : factory_(std::move(f)) {}
Test* CreateTest() override { return factory_(); }
private:
Factory factory_;
};
return internal::MakeAndRegisterTestInfo(
test_suite_name, test_name, type_param, value_param,
internal::CodeLocation(file, line), internal::GetTypeId<TestT>(),
internal::SuiteApiResolver<TestT>::GetSetUpCaseOrSuite(file, line),
internal::SuiteApiResolver<TestT>::GetTearDownCaseOrSuite(file, line),
new FactoryImpl{std::move(factory)});
} | O0 | c | testing::TestInfo* testing::RegisterTest<testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0>(char const*, char const*, char const*, char const*, char const*, int, testing::internal::InsertSyntheticTestCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::internal::CodeLocation, bool)::$_0):
subq $0x1b8, %rsp # imm = 0x1B8
movq 0x1c0(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %rdi, 0x1b0(%rsp)
movq %rsi, 0x1a8(%rsp)
movq %rdx, 0x1a0(%rsp)
movq %rcx, 0x198(%rsp)
movq %r8, 0x190(%rsp)
movl %r9d, 0x18c(%rsp)
movq 0x1b0(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x167(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x14c90
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x168(%rsp), %rdi
callq 0x1a6a0
jmp 0xbdb72
movq 0x1a8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x1a0(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x198(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x107(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x14c90
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq 0x108(%rsp), %rdi
callq 0x1a6a0
jmp 0xbdbd1
movl 0x18c(%rsp), %edx
leaq 0x128(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x1a760
jmp 0xbdbef
callq 0xdec80
movq %rax, 0x38(%rsp)
movq 0x190(%rsp), %rdi
movl 0x18c(%rsp), %esi
callq 0xdec90
movq %rax, 0x40(%rsp)
jmp 0xbdc14
movq 0x190(%rsp), %rdi
movl 0x18c(%rsp), %esi
callq 0xdedf0
movq %rax, 0x30(%rsp)
jmp 0xbdc2f
movl $0x78, %edi
callq 0x146c0
movq %rax, 0x28(%rsp)
jmp 0xbdc40
movq 0x70(%rsp), %rsi
movb $0x1, 0x8f(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xdf370
jmp 0xbdc5c
movq 0x28(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xdf3d0
jmp 0xbdc70
movq 0x38(%rsp), %r9
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %r8
movq 0x28(%rsp), %r10
movb $0x0, 0x8f(%rsp)
movq %rsp, %rax
movq %r10, 0x10(%rax)
movq %r8, 0x8(%rax)
movq %rdi, (%rax)
leaq 0x168(%rsp), %rdi
leaq 0x128(%rsp), %r8
callq 0xc69b0
movq %rax, 0x20(%rsp)
jmp 0xbdcc5
leaq 0x90(%rsp), %rdi
callq 0xbde20
leaq 0x128(%rsp), %rdi
callq 0x1aab0
leaq 0x108(%rsp), %rdi
callq 0x1aac0
leaq 0x107(%rsp), %rdi
callq 0x14750
leaq 0x168(%rsp), %rdi
callq 0x1aac0
leaq 0x167(%rsp), %rdi
callq 0x14750
movq 0x20(%rsp), %rax
addq $0x1b8, %rsp # imm = 0x1B8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0xbde06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0xbddec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0xbdddf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0xbddd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0xbddb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xbde20
testb $0x1, 0x8f(%rsp)
jne 0xbddc1
jmp 0xbddd0
movq 0x28(%rsp), %rdi
movl $0x78, %esi
callq 0x146e0
jmp 0xbddd2
leaq 0x128(%rsp), %rdi
callq 0x1aab0
leaq 0x108(%rsp), %rdi
callq 0x1aac0
leaq 0x107(%rsp), %rdi
callq 0x14750
leaq 0x168(%rsp), %rdi
callq 0x1aac0
leaq 0x167(%rsp), %rdi
callq 0x14750
movq 0x158(%rsp), %rdi
callq 0x14c80
| _ZN7testing12RegisterTestITpTnRiJEZNS_8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvE3$_0EEPNS_8TestInfoEPKcS8_S8_S8_S8_iT0_:
sub rsp, 1B8h
mov rax, qword ptr [rsp+1B8h+arg_0]
mov qword ptr [rsp+1B8h+var_148], rax; int
mov qword ptr [rsp+1B8h+var_8], rdi
mov qword ptr [rsp+1B8h+var_10], rsi
mov qword ptr [rsp+1B8h+var_18], rdx
mov qword ptr [rsp+1B8h+var_20], rcx
mov qword ptr [rsp+1B8h+var_28], r8
mov [rsp+1B8h+var_2C], r9d
mov rax, qword ptr [rsp+1B8h+var_8]
mov qword ptr [rsp+1B8h+var_140], rax; int
lea rdi, [rsp+1B8h+var_51]
mov qword ptr [rsp+1B8h+var_138], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, qword ptr [rsp+1B8h+var_140]
mov rdx, qword ptr [rsp+1B8h+var_138]
lea rdi, [rsp+1B8h+var_51+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_BDB72:
mov rax, qword ptr [rsp+1B8h+var_10]
mov qword ptr [rsp+1B8h+var_170], rax; int
mov rax, qword ptr [rsp+1B8h+var_18]
mov qword ptr [rsp+1B8h+var_168], rax; int
mov rax, qword ptr [rsp+1B8h+var_20]
mov qword ptr [rsp+1B8h+var_160], rax; char
mov rax, qword ptr [rsp+1B8h+var_28]
mov qword ptr [rsp+1B8h+var_158], rax; int
lea rdi, [rsp+1B8h+var_B1]
mov qword ptr [rsp+1B8h+var_150], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, qword ptr [rsp+1B8h+var_158]
mov rdx, qword ptr [rsp+1B8h+var_150]
lea rdi, [rsp+1B8h+var_B1+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_BDBD1:
mov edx, [rsp+1B8h+var_2C]
lea rdi, [rsp+1B8h+var_90]
lea rsi, [rsp+1B8h+var_B1+1]
call _ZN7testing8internal12CodeLocationC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; testing::internal::CodeLocation::CodeLocation(std::string,int)
jmp short $+2
loc_BDBEF:
call _ZN7testing8internal9GetTypeIdINS0_12_GLOBAL__N_111FailureTestEEEPKvv; testing::internal::GetTypeId<testing::internal::`anonymous namespace'::FailureTest>(void)
mov [rsp+1B8h+var_180], rax; void *
mov rdi, qword ptr [rsp+1B8h+var_28]
mov esi, [rsp+1B8h+var_2C]
call _ZN7testing8internal16SuiteApiResolverINS0_12_GLOBAL__N_111FailureTestEE19GetSetUpCaseOrSuiteEPKci; testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetSetUpCaseOrSuite(char const*,int)
mov qword ptr [rsp+1B8h+var_178], rax; int
jmp short $+2
loc_BDC14:
mov rdi, qword ptr [rsp+1B8h+var_28]
mov esi, [rsp+1B8h+var_2C]
call _ZN7testing8internal16SuiteApiResolverINS0_12_GLOBAL__N_111FailureTestEE22GetTearDownCaseOrSuiteEPKci; testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetTearDownCaseOrSuite(char const*,int)
mov qword ptr [rsp+1B8h+var_188], rax; int
jmp short $+2
loc_BDC2F:
mov edi, 78h ; 'x'; unsigned __int64
call __Znwm; operator new(ulong)
mov qword ptr [rsp+1B8h+var_190], rax; int
jmp short $+2
loc_BDC40:
mov rsi, qword ptr [rsp+1B8h+var_148]
mov [rsp+1B8h+var_129], 1
lea rdi, [rsp+1B8h+var_128]
call _ZZN7testing8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvEN3$_0C2EOS2_; testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations(void)::$_0::$_0($_0&&)
jmp short $+2
loc_BDC5C:
mov rdi, qword ptr [rsp+1B8h+var_190]; int
lea rsi, [rsp+1B8h+var_128]; int
call _ZZN7testing12RegisterTestITpTnRiJEZNS_8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvE3$_0EEPNS_8TestInfoEPKcS8_S8_S8_S8_iT0_EN11FactoryImplC2ES4_
jmp short $+2
loc_BDC70:
mov r9, [rsp+1B8h+var_180]
mov rcx, qword ptr [rsp+1B8h+var_160]
mov rdx, qword ptr [rsp+1B8h+var_168]
mov rsi, qword ptr [rsp+1B8h+var_170]
mov rdi, qword ptr [rsp+1B8h+var_178]
mov r8, qword ptr [rsp+1B8h+var_188]
mov r10, qword ptr [rsp+1B8h+var_190]
mov [rsp+1B8h+var_129], 0
mov rax, rsp
mov [rax+10h], r10
mov [rax+8], r8
mov [rax], rdi
lea rdi, [rsp+1B8h+var_51+1]; int
lea r8, [rsp+1B8h+var_90]
call _ZN7testing8internal23MakeAndRegisterTestInfoENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcS8_S8_NS0_12CodeLocationEPKvPFvvESD_PNS0_15TestFactoryBaseE; testing::internal::MakeAndRegisterTestInfo(std::string,char const*,char const*,char const*,testing::internal::CodeLocation,void const*,void (*)(void),void (*)(void),testing::internal::TestFactoryBase *)
mov [rsp+1B8h+var_198], rax
jmp short $+2
loc_BDCC5:
lea rdi, [rsp+1B8h+var_128]
call _ZZN7testing8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvEN3$_0D2Ev; testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations(void)::$_0::~$_0()
lea rdi, [rsp+1B8h+var_90]; this
call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation()
lea rdi, [rsp+1B8h+var_B1+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+1B8h+var_B1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+1B8h+var_51+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+1B8h+var_51]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+1B8h+var_198]
add rsp, 1B8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_150], rcx
mov [rsp+arg_14C], eax
jmp loc_BDE06
mov rcx, rax
mov eax, edx
mov [rsp+arg_150], rcx
mov [rsp+arg_14C], eax
jmp loc_BDDEC
mov rcx, rax
mov eax, edx
mov [rsp+arg_150], rcx
mov [rsp+arg_14C], eax
jmp short loc_BDDDF
mov rcx, rax
mov eax, edx
mov [rsp+arg_150], rcx
mov [rsp+arg_14C], eax
jmp short loc_BDDD2
mov rcx, rax
mov eax, edx
mov [rsp+arg_150], rcx
mov [rsp+arg_14C], eax
jmp short loc_BDDB5
mov rcx, rax
mov eax, edx
mov [rsp+arg_150], rcx
mov [rsp+arg_14C], eax
lea rdi, [rsp+arg_88]
call _ZZN7testing8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvEN3$_0D2Ev; testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations(void)::$_0::~$_0()
loc_BDDB5:
test [rsp+arg_87], 1
jnz short loc_BDDC1
jmp short loc_BDDD0
loc_BDDC1:
mov rdi, [rsp+arg_20]; void *
mov esi, 78h ; 'x'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BDDD0:
jmp short $+2
loc_BDDD2:
lea rdi, [rsp+arg_120]; this
call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation()
loc_BDDDF:
lea rdi, [rsp+arg_100]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_BDDEC:
lea rdi, [rsp+arg_FF]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+arg_160]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_BDE06:
lea rdi, [rsp+arg_15F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+arg_150]
call __Unwind_Resume
| long long ZN7testing12RegisterTestITpTnRiJEZNS_8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvE3__0EEPNS_8TestInfoEPKcS8_S8_S8_S8_iT0_(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
int a7)
{
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
int v15; // edx
int v16; // ecx
int v17; // r8d
int v18; // r9d
int v19; // edx
int v20; // ecx
int v21; // r8d
int v22; // r9d
const char *v23; // rsi
testing::internal::TestFactoryBase *v25; // [rsp+0h] [rbp-1B8h]
int v26; // [rsp+8h] [rbp-1B0h]
int v27; // [rsp+10h] [rbp-1A8h]
long long v28; // [rsp+18h] [rbp-1A0h]
int v29; // [rsp+18h] [rbp-1A0h]
int v30; // [rsp+20h] [rbp-198h]
long long v31; // [rsp+20h] [rbp-198h]
long long v32; // [rsp+28h] [rbp-190h]
void (*TearDownCaseOrSuite)(void); // [rsp+30h] [rbp-188h]
void *v34; // [rsp+38h] [rbp-180h]
void (*SetUpCaseOrSuite)(void); // [rsp+40h] [rbp-178h]
int v36[2]; // [rsp+48h] [rbp-170h]
int v37; // [rsp+50h] [rbp-168h]
char v38; // [rsp+58h] [rbp-160h]
long long v39; // [rsp+60h] [rbp-158h]
long long v40; // [rsp+88h] [rbp-130h]
int v41; // [rsp+90h] [rbp-128h] BYREF
char v42; // [rsp+98h] [rbp-120h]
int v43; // [rsp+A0h] [rbp-118h]
int v44; // [rsp+A8h] [rbp-110h]
int v45; // [rsp+B0h] [rbp-108h]
char v46; // [rsp+B8h] [rbp-100h]
int v47[8]; // [rsp+107h] [rbp-B1h] BYREF
_BYTE v48[63]; // [rsp+128h] [rbp-90h] BYREF
char v49; // [rsp+167h] [rbp-51h] BYREF
_BYTE v50[36]; // [rsp+168h] [rbp-50h] BYREF
int v51; // [rsp+18Ch] [rbp-2Ch]
int v52[2]; // [rsp+190h] [rbp-28h]
char v53[8]; // [rsp+198h] [rbp-20h]
int v54[2]; // [rsp+1A0h] [rbp-18h]
int v55[2]; // [rsp+1A8h] [rbp-10h]
int v56[2]; // [rsp+1B0h] [rbp-8h]
*(_QWORD *)v56 = a1;
*(_QWORD *)v55 = a2;
*(_QWORD *)v54 = a3;
*(_QWORD *)v53 = a4;
*(_QWORD *)v52 = a5;
v51 = a6;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v50, a1, (long long)&v49);
*(_QWORD *)v36 = *(_QWORD *)v55;
v37 = v54[0];
v38 = v53[0];
v39 = *(_QWORD *)v52;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v47 + 1, v39, (long long)v47);
testing::internal::CodeLocation::CodeLocation((long long)v48, (long long)v47 + 1, v51);
v34 = (void *)testing::internal::GetTypeId<testing::internal::`anonymous namespace'::FailureTest>();
SetUpCaseOrSuite = (void (*)(void))testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetSetUpCaseOrSuite(
v52[0],
v51,
v7,
v8,
v9,
v10);
TearDownCaseOrSuite = (void (*)(void))testing::internal::SuiteApiResolver<testing::internal::`anonymous namespace'::FailureTest>::GetTearDownCaseOrSuite(
v52[0],
v51,
v11,
v12,
v13,
v14);
v32 = operator new(0x78uLL);
testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations(void)::$_0::$_0(
(unsigned int)&v41,
a7,
v15,
v16,
v17,
v18);
ZZN7testing12RegisterTestITpTnRiJEZNS_8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvE3__0EEPNS_8TestInfoEPKcS8_S8_S8_S8_iT0_EN11FactoryImplC2ES4_(
v32,
(int)&v41,
v19,
v20,
v21,
v22,
v25,
v26,
v27,
v28);
v23 = *(const char **)v36;
HIBYTE(v40) = 0;
v31 = testing::internal::MakeAndRegisterTestInfo(
(int)v50,
SetUpCaseOrSuite,
TearDownCaseOrSuite,
v32,
v29,
v30,
v32,
(int)TearDownCaseOrSuite,
v34,
(int)SetUpCaseOrSuite,
v36[0],
v37,
v38,
v39,
(int)v47,
a7,
a1,
(int)&v49,
v40,
v41,
v42,
v43,
v44,
v45,
v46);
testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations(void)::$_0::~$_0(&v41);
testing::internal::CodeLocation::~CodeLocation((testing::internal::CodeLocation *)v48);
std::string::~string((char *)v47 + 1);
std::allocator<char>::~allocator(v47, v23);
std::string::~string(v50);
std::allocator<char>::~allocator(&v49, v23);
return v31;
}
| _ZN7testing12RegisterTestITpTnRiJEZNS_8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvE3$_0EEPNS_8TestInfoEPKcS8_S8_S8_S8_iT0_:
SUB RSP,0x1b8
MOV RAX,qword ptr [RSP + 0x1c0]
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x1b0],RDI
MOV qword ptr [RSP + 0x1a8],RSI
MOV qword ptr [RSP + 0x1a0],RDX
MOV qword ptr [RSP + 0x198],RCX
MOV qword ptr [RSP + 0x190],R8
MOV dword ptr [RSP + 0x18c],R9D
MOV RAX,qword ptr [RSP + 0x1b0]
MOV qword ptr [RSP + 0x78],RAX
LEA RDI,[RSP + 0x167]
MOV qword ptr [RSP + 0x80],RDI
CALL 0x00114c90
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
LAB_001bdb63:
LEA RDI,[RSP + 0x168]
CALL 0x0011a6a0
JMP 0x001bdb72
LAB_001bdb72:
MOV RAX,qword ptr [RSP + 0x1a8]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x1a0]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x198]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x190]
MOV qword ptr [RSP + 0x60],RAX
LEA RDI,[RSP + 0x107]
MOV qword ptr [RSP + 0x68],RDI
CALL 0x00114c90
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
LAB_001bdbc2:
LEA RDI,[RSP + 0x108]
CALL 0x0011a6a0
JMP 0x001bdbd1
LAB_001bdbd1:
MOV EDX,dword ptr [RSP + 0x18c]
LAB_001bdbd8:
LEA RDI,[RSP + 0x128]
LEA RSI,[RSP + 0x108]
CALL 0x0011a760
JMP 0x001bdbef
LAB_001bdbef:
CALL 0x001dec80
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x190]
MOV ESI,dword ptr [RSP + 0x18c]
LAB_001bdc08:
CALL 0x001dec90
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001bdc14
LAB_001bdc14:
MOV RDI,qword ptr [RSP + 0x190]
MOV ESI,dword ptr [RSP + 0x18c]
CALL 0x001dedf0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001bdc2f
LAB_001bdc2f:
MOV EDI,0x78
CALL 0x001146c0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001bdc40
LAB_001bdc40:
MOV RSI,qword ptr [RSP + 0x70]
MOV byte ptr [RSP + 0x8f],0x1
LAB_001bdc4d:
LEA RDI,[RSP + 0x90]
CALL 0x001df370
JMP 0x001bdc5c
LAB_001bdc5c:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x90]
CALL 0x001df3d0
JMP 0x001bdc70
LAB_001bdc70:
MOV R9,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RSP + 0x40]
MOV R8,qword ptr [RSP + 0x30]
MOV R10,qword ptr [RSP + 0x28]
MOV byte ptr [RSP + 0x8f],0x0
MOV RAX,RSP
MOV qword ptr [RAX + 0x10],R10
MOV qword ptr [RAX + 0x8],R8
MOV qword ptr [RAX],RDI
LEA RDI,[RSP + 0x168]
LEA R8,[RSP + 0x128]
CALL 0x001c69b0
LAB_001bdcbe:
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001bdcc5
LAB_001bdcc5:
LEA RDI,[RSP + 0x90]
CALL 0x001bde20
LEA RDI,[RSP + 0x128]
CALL 0x0011aab0
LEA RDI,[RSP + 0x108]
CALL 0x0011aac0
LEA RDI,[RSP + 0x107]
CALL 0x00114750
LEA RDI,[RSP + 0x168]
CALL 0x0011aac0
LEA RDI,[RSP + 0x167]
CALL 0x00114750
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x1b8
RET
|
int8
_ZN7testing12RegisterTestITpTnRiJEZNS_8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvE3__0EEPNS_8TestInfoEPKcS8_S8_S8_S8_iT0_
(char *param_1,int8 param_2,int8 param_3,int8 param_4,char *param_5,
int param_6,__0 *param_7)
{
char *pcVar1;
int8 uVar2;
int8 uVar3;
void *pvVar4;
int8 uVar5;
int8 uVar6;
void *pvVar7;
int8 uVar8;
__0 local_128 [119];
allocator local_b1;
string local_b0 [32];
CodeLocation local_90 [63];
allocator local_51;
string local_50 [36];
int local_2c;
char *local_28;
int8 local_20;
int8 local_18;
int8 local_10;
char *local_8;
local_2c = param_6;
local_28 = param_5;
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
std::allocator<char>::allocator();
/* try { // try from 001bdb63 to 001bdb6f has its CatchHandler @ 001bdd20 */
std::__cxx11::string::string<std::allocator<char>>(local_50,param_1,&local_51);
uVar3 = local_10;
uVar2 = local_18;
uVar8 = local_20;
pcVar1 = local_28;
std::allocator<char>::allocator();
/* try { // try from 001bdbc2 to 001bdbce has its CatchHandler @ 001bdd39 */
std::__cxx11::string::string<std::allocator<char>>(local_b0,pcVar1,&local_b1);
/* try { // try from 001bdbd8 to 001bdbec has its CatchHandler @ 001bdd52 */
testing::internal::CodeLocation::CodeLocation(local_90,local_b0,local_2c);
pvVar4 = testing::internal::GetTypeId<testing::internal::(anonymous_namespace)::FailureTest>();
/* try { // try from 001bdc08 to 001bdc38 has its CatchHandler @ 001bdd68 */
uVar5 = testing::internal::SuiteApiResolver<testing::internal::(anonymous_namespace)::FailureTest>
::GetSetUpCaseOrSuite(local_28,local_2c);
uVar6 = testing::internal::SuiteApiResolver<testing::internal::(anonymous_namespace)::FailureTest>
::GetTearDownCaseOrSuite(local_28,local_2c);
pvVar7 = operator_new(0x78);
/* try { // try from 001bdc4d to 001bdc59 has its CatchHandler @ 001bdd7e */
testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations()::$_0::__0
(local_128,param_7);
/* try { // try from 001bdc5c to 001bdcbd has its CatchHandler @ 001bdd94 */
_ZZN7testing12RegisterTestITpTnRiJEZNS_8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEvE3__0EEPNS_8TestInfoEPKcS8_S8_S8_S8_iT0_EN11FactoryImplC2ES4_
(pvVar7,local_128);
uVar8 = testing::internal::MakeAndRegisterTestInfo
(local_50,uVar3,uVar2,uVar8,local_90,pvVar4,uVar5,uVar6,pvVar7);
testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations()::$_0::~__0
(local_128);
testing::internal::CodeLocation::~CodeLocation(local_90);
std::__cxx11::string::~string(local_b0);
std::allocator<char>::~allocator((allocator<char> *)&local_b1);
std::__cxx11::string::~string(local_50);
std::allocator<char>::~allocator((allocator<char> *)&local_51);
return uVar8;
}
| |
26,795 | lunasvg::SVGStopElement::gradientStop(float) const | dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp | GradientStop SVGStopElement::gradientStop(float opacity) const
{
Color stopColor = m_stop_color.colorWithAlpha(m_stop_opacity * opacity);
GradientStop gradientStop = {
m_offset.value(), { stopColor.redF(), stopColor.greenF(), stopColor.blueF(), stopColor.alphaF() }
};
return gradientStop;
} | O3 | cpp | lunasvg::SVGStopElement::gradientStop(float) const:
mulss 0x84(%rsi), %xmm0
movl 0x80(%rsi), %ecx
movl %ecx, %eax
shrl $0x18, %eax
cvtsi2ss %eax, %xmm1
movss 0x2bfdb(%rip), %xmm2 # 0x430f4
minss %xmm0, %xmm2
xorps %xmm3, %xmm3
cmpltss %xmm3, %xmm0
andnps %xmm2, %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %edx
movq %rdi, %rax
movss 0x7c(%rsi), %xmm0
movl %ecx, %esi
shrl $0x10, %esi
movl %ecx, %edi
shrl $0x8, %edi
movl $0xff, %r8d
andl %r8d, %edi
andl %r8d, %esi
movd %esi, %xmm1
pinsrw $0x2, %edi, %xmm1
movss %xmm0, (%rax)
andl %r8d, %ecx
pinsrw $0x4, %ecx, %xmm1
andl %r8d, %edx
pinsrw $0x6, %edx, %xmm1
cvtdq2ps %xmm1, %xmm0
divps 0x2cb0b(%rip), %xmm0 # 0x43c80
movups %xmm0, 0x4(%rax)
retq
| _ZNK7lunasvg14SVGStopElement12gradientStopEf:
mulss xmm0, dword ptr [rsi+84h]
mov ecx, [rsi+80h]
mov eax, ecx
shr eax, 18h
cvtsi2ss xmm1, eax
movss xmm2, cs:flt_430F4
minss xmm2, xmm0
xorps xmm3, xmm3
cmpltss xmm0, xmm3
andnps xmm0, xmm2
mulss xmm0, xmm1
cvttss2si edx, xmm0
mov rax, rdi
movss xmm0, dword ptr [rsi+7Ch]
mov esi, ecx
shr esi, 10h
mov edi, ecx
shr edi, 8
mov r8d, 0FFh
and edi, r8d
and esi, r8d
movd xmm1, esi
pinsrw xmm1, edi, 2
movss dword ptr [rax], xmm0
and ecx, r8d
pinsrw xmm1, ecx, 4
and edx, r8d
pinsrw xmm1, edx, 6
cvtdq2ps xmm0, xmm1
divps xmm0, cs:xmmword_43C80
movups xmmword ptr [rax+4], xmm0
retn
| lunasvg::SVGStopElement * lunasvg::SVGStopElement::gradientStop(
lunasvg::SVGStopElement *this,
__m128 a2,
long long a3)
{
unsigned int v3; // ecx
__m128 v4; // xmm2
lunasvg::SVGStopElement *result; // rax
a2.m128_f32[0] = a2.m128_f32[0] * *(float *)(a3 + 132);
v3 = *(_DWORD *)(a3 + 128);
v4 = (__m128)0x3F800000u;
v4.m128_f32[0] = fminf(1.0, a2.m128_f32[0]);
result = this;
*(_DWORD *)this = *(_DWORD *)(a3 + 124);
*(__m128 *)((char *)this + 4) = _mm_div_ps(
_mm_cvtepi32_ps(
_mm_insert_epi16(
_mm_insert_epi16(
_mm_insert_epi16(_mm_cvtsi32_si128(BYTE2(v3)), BYTE1(v3), 2),
(unsigned __int8)v3,
4),
(unsigned __int8)(int)(float)(_mm_andnot_ps(_mm_cmplt_ss(a2, (__m128)0LL), v4).m128_f32[0]
* (float)HIBYTE(v3)),
6)),
(__m128)xmmword_43C80);
return result;
}
| gradientStop:
MULSS XMM0,dword ptr [RSI + 0x84]
MOV ECX,dword ptr [RSI + 0x80]
MOV EAX,ECX
SHR EAX,0x18
CVTSI2SS XMM1,EAX
MOVSS XMM2,dword ptr [0x001430f4]
MINSS XMM2,XMM0
XORPS XMM3,XMM3
CMPLTSS XMM0,XMM3
ANDNPS XMM0,XMM2
MULSS XMM0,XMM1
CVTTSS2SI EDX,XMM0
MOV RAX,RDI
MOVSS XMM0,dword ptr [RSI + 0x7c]
MOV ESI,ECX
SHR ESI,0x10
MOV EDI,ECX
SHR EDI,0x8
MOV R8D,0xff
AND EDI,R8D
AND ESI,R8D
MOVD XMM1,ESI
PINSRW XMM1,EDI,0x2
MOVSS dword ptr [RAX],XMM0
AND ECX,R8D
PINSRW XMM1,ECX,0x4
AND EDX,R8D
PINSRW XMM1,EDX,0x6
CVTDQ2PS XMM0,XMM1
DIVPS XMM0,xmmword ptr [0x00143c80]
MOVUPS xmmword ptr [RAX + 0x4],XMM0
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* lunasvg::SVGStopElement::gradientStop(float) const */
void lunasvg::SVGStopElement::gradientStop(float param_1)
{
uint uVar1;
uint6 uVar2;
long in_RSI;
int4 *in_RDI;
float fVar3;
int1 auVar4 [16];
float fVar5;
fVar3 = param_1 * *(float *)(in_RSI + 0x84);
uVar1 = *(uint *)(in_RSI + 0x80);
fVar5 = DAT_001430f4;
if (fVar3 <= DAT_001430f4) {
fVar5 = fVar3;
}
uVar2 = CONCAT24((short)(uVar1 >> 8),uVar1 >> 0x10) & 0xff000000ff;
*in_RDI = *(int4 *)(in_RSI + 0x7c);
auVar4._0_4_ = (float)(int)uVar2;
auVar4._4_4_ = (float)(ushort)(uVar2 >> 0x20);
auVar4._8_4_ = (float)((ushort)uVar1 & 0xff);
auVar4._12_4_ =
(float)((ushort)(int)((float)(~-(uint)(fVar3 < 0.0) & (uint)fVar5) * (float)(uVar1 >> 0x18))
& 0xff);
auVar4 = divps(auVar4,_DAT_00143c80);
*(int1 (*) [16])(in_RDI + 1) = auVar4;
return;
}
| |
26,796 | ExampleGuardedVector<main::Payload16B>::~ExampleGuardedVector() | BadAccessGuards/benchmarks/../examples/GuardedVectorExample.h | ~ExampleGuardedVector()
{
BA_GUARD_DESTROY(BAShadow);
} | O0 | c | ExampleGuardedVector<main::Payload16B>::~ExampleGuardedVector():
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
addq $0x18, %rax
leaq -0x50(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
je 0xf3da
movq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x10370
jmp 0xf3d8
jmp 0xf3da
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq $0x2, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rbp, %rcx
andq $-0x4, %rcx
movq -0x10(%rbp), %rdx
orq %rdx, %rcx
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x58(%rbp), %rdi
callq 0xf070
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0xf7b0
nop
| _ZN20ExampleGuardedVectorImED2Ev:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_48], rdi
mov rax, [rbp+var_48]
mov [rbp+var_58], rax
add rax, 18h
lea rcx, [rbp+var_50]
mov [rbp+var_28], rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
and rax, 3
cmp rax, 0
jz short loc_F3DA
mov rdi, [rbp+var_38]
mov esi, 1
call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState)
jmp short $+2
loc_F3D8:
jmp short $+2
loc_F3DA:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
mov [rbp+var_10], 2
mov rax, [rbp+var_8]
mov rcx, rbp
and rcx, 0FFFFFFFFFFFFFFFCh
mov rdx, [rbp+var_10]
or rcx, rdx
mov [rbp+var_18], rcx
mov rcx, [rbp+var_18]
mov [rax], rcx
mov rdi, [rbp+var_58]
call _ZNSt6vectorImSaImEED2Ev; std::vector<ulong>::~vector()
add rsp, 60h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
| long long ExampleGuardedVector<unsigned long>::~ExampleGuardedVector(long long *a1)
{
_QWORD v2[2]; // [rsp+10h] [rbp-50h] BYREF
long long v3; // [rsp+20h] [rbp-40h]
long long v4; // [rsp+28h] [rbp-38h]
_QWORD *v5; // [rsp+30h] [rbp-30h]
_QWORD *v6; // [rsp+38h] [rbp-28h]
long long v7; // [rsp+40h] [rbp-20h]
char *v8; // [rsp+48h] [rbp-18h]
long long v9; // [rsp+50h] [rbp-10h]
_QWORD *v10; // [rsp+58h] [rbp-8h]
long long savedregs; // [rsp+60h] [rbp+0h] BYREF
v2[1] = a1;
v6 = v2;
v5 = a1 + 3;
v2[0] = a1 + 3;
v3 = a1[3];
v4 = v3;
v7 = v3;
if ( (v3 & 3) != 0 )
BAGuardHandleBadAccess(v4, 1LL);
v10 = v5;
v9 = 2LL;
v8 = (char *)&savedregs + 2;
*v5 = (char *)&savedregs + 2;
return std::vector<unsigned long>::~vector(a1);
}
| ~ExampleGuardedVector:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x48],RDI
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x58],RAX
ADD RAX,0x18
LEA RCX,[RBP + -0x50]
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x3
CMP RAX,0x0
JZ 0x0010f3da
MOV RDI,qword ptr [RBP + -0x38]
LAB_0010f3cc:
MOV ESI,0x1
CALL 0x00110370
JMP 0x0010f3d8
LAB_0010f3d8:
JMP 0x0010f3da
LAB_0010f3da:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x10],0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RBP
AND RCX,-0x4
MOV RDX,qword ptr [RBP + -0x10]
OR RCX,RDX
MOV qword ptr [RBP + -0x18],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0010f070
ADD RSP,0x60
POP RBP
RET
|
/* ExampleGuardedVector<unsigned long>::~ExampleGuardedVector() */
void __thiscall
ExampleGuardedVector<unsigned_long>::~ExampleGuardedVector
(ExampleGuardedVector<unsigned_long> *this)
{
ExampleGuardedVector<unsigned_long> *local_58;
ExampleGuardedVector<unsigned_long> *local_50;
ulong local_48;
ulong local_40;
ExampleGuardedVector<unsigned_long> *local_38;
ExampleGuardedVector<unsigned_long> **local_30;
ulong local_28;
ulong local_20;
int8 local_18;
ExampleGuardedVector<unsigned_long> *local_10;
local_38 = this + 0x18;
local_30 = &local_58;
local_48 = *(ulong *)local_38;
local_50 = this;
local_40 = local_48;
local_28 = local_48;
local_58 = local_38;
if ((local_48 & 3) != 0) {
/* try { // try from 0010f3cc to 0010f3d5 has its CatchHandler @ 0010f416 */
BAGuardHandleBadAccess(local_48,1);
}
local_10 = local_38;
local_18 = 2;
local_20 = (ulong)&stack0xfffffffffffffff8 | 2;
*(ulong *)local_38 = local_20;
std::vector<unsigned_long,std::allocator<unsigned_long>>::~vector
((vector<unsigned_long,std::allocator<unsigned_long>> *)this);
return;
}
| |
26,797 | ExampleGuardedVector<main::Payload16B>::~ExampleGuardedVector() | BadAccessGuards/benchmarks/../examples/GuardedVectorExample.h | ~ExampleGuardedVector()
{
BA_GUARD_DESTROY(BAShadow);
} | O3 | c | ExampleGuardedVector<main::Payload16B>::~ExampleGuardedVector():
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testb $0x3, %dil
jne 0x606d
movq %rbp, %rax
andq $-0x4, %rax
orq $0x2, %rax
movq %rax, 0x18(%rbx)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6066
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3300
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x1, %esi
callq 0x63a5
jmp 0x603d
movq %rax, %rdi
callq 0x6109
nop
| _ZN20ExampleGuardedVectorImED2Ev:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+18h]
test dil, 3
jnz short loc_606D
loc_603D:
mov rax, rbp
and rax, 0FFFFFFFFFFFFFFFCh
or rax, 2
mov [rbx+18h], rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_6066
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
add rsp, 8
pop rbx
pop rbp
jmp __ZdlPvm; operator delete(void *,ulong)
loc_6066:
add rsp, 8
pop rbx
pop rbp
retn
loc_606D:
mov esi, 1
call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState)
jmp short loc_603D
mov rdi, rax
call __clang_call_terminate
| void ExampleGuardedVector<unsigned long>::~ExampleGuardedVector(long long a1)
{
long long v2; // rdi
long long savedregs; // [rsp+8h] [rbp+0h] BYREF
v2 = *(_QWORD *)(a1 + 24);
if ( (v2 & 3) != 0 )
BAGuardHandleBadAccess(v2, 1LL);
*(_QWORD *)(a1 + 24) = (char *)&savedregs + 2;
if ( *(_QWORD *)a1 )
operator delete(*(void **)a1, *(_QWORD *)(a1 + 16) - *(_QWORD *)a1);
}
| ~ExampleGuardedVector:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
TEST DIL,0x3
JNZ 0x0010606d
LAB_0010603d:
MOV RAX,RBP
AND RAX,-0x4
OR RAX,0x2
MOV qword ptr [RBX + 0x18],RAX
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x00106066
MOV RSI,qword ptr [RBX + 0x10]
SUB RSI,RDI
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00103300
LAB_00106066:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0010606d:
MOV ESI,0x1
CALL 0x001063a5
JMP 0x0010603d
|
/* ExampleGuardedVector<unsigned long>::~ExampleGuardedVector() */
void __thiscall
ExampleGuardedVector<unsigned_long>::~ExampleGuardedVector
(ExampleGuardedVector<unsigned_long> *this)
{
void *pvVar1;
if ((*(ulong *)(this + 0x18) & 3) != 0) {
/* try { // try from 0010606d to 00106076 has its CatchHandler @ 00106079 */
BAGuardHandleBadAccess(*(ulong *)(this + 0x18),1);
}
*(ulong *)(this + 0x18) = (ulong)&stack0xfffffffffffffff8 | 2;
pvVar1 = *(void **)this;
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,*(long *)(this + 0x10) - (long)pvVar1);
return;
}
return;
}
| |
26,798 | my_is_symlink | eloqsql/mysys/my_symlink.c | int my_is_symlink(const char *filename __attribute__((unused)))
{
#if defined (HAVE_LSTAT) && defined (S_ISLNK)
struct stat stat_buff;
if (lstat(filename, &stat_buff))
return 0;
MSAN_STAT_WORKAROUND(&stat_buff);
return !!S_ISLNK(stat_buff.st_mode);
#elif defined (_WIN32)
DWORD dwAttr = GetFileAttributes(filename);
return (dwAttr != INVALID_FILE_ATTRIBUTES) &&
(dwAttr & FILE_ATTRIBUTE_REPARSE_POINT);
#else /* No symlinks */
return 0;
#endif
} | O0 | c | my_is_symlink:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x26480
cmpl $0x0, %eax
je 0x5bc5d
movl $0x0, -0x4(%rbp)
jmp 0x5bc7c
movl -0x88(%rbp), %eax
andl $0xf000, %eax # imm = 0xF000
cmpl $0xa000, %eax # imm = 0xA000
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_is_symlink:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_A0]
call _lstat64
cmp eax, 0
jz short loc_5BC5D
mov [rbp+var_4], 0
jmp short loc_5BC7C
loc_5BC5D:
mov eax, [rbp+var_88]
and eax, 0F000h
cmp eax, 0A000h
setz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_4], eax
loc_5BC7C:
mov eax, [rbp+var_4]
add rsp, 0A0h
pop rbp
retn
| _BOOL8 my_is_symlink(long long a1)
{
_BYTE v2[24]; // [rsp+0h] [rbp-A0h] BYREF
int v3; // [rsp+18h] [rbp-88h]
long long v4; // [rsp+90h] [rbp-10h]
v4 = a1;
return !(unsigned int)lstat64(a1, v2) && (v3 & 0xF000) == 40960;
}
| my_is_symlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0xa0]
CALL 0x00126480
CMP EAX,0x0
JZ 0x0015bc5d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015bc7c
LAB_0015bc5d:
MOV EAX,dword ptr [RBP + -0x88]
AND EAX,0xf000
CMP EAX,0xa000
SETZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
LAB_0015bc7c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xa0
POP RBP
RET
|
bool my_is_symlink(char *param_1)
{
int iVar1;
stat64 local_a8;
char *local_18;
local_18 = param_1;
iVar1 = lstat64(param_1,&local_a8);
return iVar1 == 0 && (local_a8.st_mode & 0xf000) == 0xa000;
}
| |
26,799 | my_well_formed_char_length_ucs2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_well_formed_char_length_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *b, const char *e,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t length= e - b;
if (nchars * 2 <= length)
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= b + (nchars * 2);
return nchars;
}
if (length % 2)
{
status->m_well_formed_error_pos= status->m_source_end_pos= e - 1;
}
else
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= e;
}
return length / 2;
} | O0 | c | my_well_formed_char_length_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
shlq %rax
cmpq -0x38(%rbp), %rax
ja 0x5a9df
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
shlq %rax
addq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5aa28
movq -0x38(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x5aa06
movq -0x20(%rbp), %rcx
addq $-0x1, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x5aa1d
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
shrq %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
| my_well_formed_char_length_ucs2:
push rbp
mov rbp, rsp
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 rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
shl rax, 1
cmp rax, [rbp+var_38]
ja short loc_5A9DF
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
shl rax, 1
add rcx, rax
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_5AA28
loc_5A9DF:
mov rax, [rbp+var_38]
and rax, 1
cmp rax, 0
jz short loc_5AA06
mov rcx, [rbp+var_20]
add rcx, 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_30]
mov [rax+8], rcx
jmp short loc_5AA1D
loc_5AA06:
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_5AA1D:
mov rax, [rbp+var_38]
shr rax, 1
mov [rbp+var_8], rax
loc_5AA28:
mov rax, [rbp+var_8]
pop rbp
retn
| unsigned long long my_well_formed_char_length_ucs2(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned long long v6; // [rsp+0h] [rbp-38h]
v6 = a3 - a2;
if ( 2 * a4 > (unsigned long long)(a3 - a2) )
{
if ( (v6 & 1) != 0 )
{
*a5 = a3 - 1;
a5[1] = a3 - 1;
}
else
{
a5[1] = 0LL;
*a5 = a3;
}
return v6 >> 1;
}
else
{
a5[1] = 0LL;
*a5 = 2 * a4 + a2;
return a4;
}
}
| my_well_formed_char_length_ucs2:
PUSH RBP
MOV RBP,RSP
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 RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
CMP RAX,qword ptr [RBP + -0x38]
JA 0x0015a9df
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015aa28
LAB_0015a9df:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x1
CMP RAX,0x0
JZ 0x0015aa06
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,-0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0015aa1d
LAB_0015aa06:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0015aa1d:
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
LAB_0015aa28:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_well_formed_char_length_ucs2
(int8 param_1,long param_2,long param_3,ulong param_4,long *param_5)
{
ulong local_10;
local_10 = param_3 - param_2;
if (param_4 * 2 < local_10 || param_4 * 2 - local_10 == 0) {
param_5[1] = 0;
*param_5 = param_2 + param_4 * 2;
local_10 = param_4;
}
else {
if ((local_10 & 1) == 0) {
param_5[1] = 0;
*param_5 = param_3;
}
else {
*param_5 = param_3 + -1;
param_5[1] = param_3 + -1;
}
local_10 = local_10 >> 1;
}
return local_10;
}
|
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.