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
|
---|---|---|---|---|---|---|---|---|---|---|---|
65,100 |
evmone::EOF1Header::get_type(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, unsigned long) const
|
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/eof.hpp
|
[[nodiscard]] EOFCodeType get_type(bytes_view container, size_t type_idx) const noexcept
{
const auto offset = type_section_offset + type_idx * TYPE_ENTRY_SIZE;
// TODO: Make EOFCodeType aggregate type and use designated initializers.
return EOFCodeType{
container[offset], // inputs
container[offset + 1], // outputs
read_uint16_be(&container[offset + 2]) // max_stack_height
};
}
|
O0
|
cpp
|
evmone::EOF1Header::get_type(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>, unsigned long) const:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
leaq (%rax,%rcx,4), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x18(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x67e90
movq -0x40(%rbp), %rdi
movzbl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x67e90
movq -0x40(%rbp), %rdi
movzbl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rsi
addq $0x2, %rsi
callq 0x67e90
movq %rax, %rdi
callq 0x6e310
movl -0x38(%rbp), %esi
movl -0x34(%rbp), %edx
movzwl %ax, %ecx
leaq -0x4(%rbp), %rdi
callq 0x6eaa0
jmp 0x6ea56
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x36420
nopw (%rax,%rax)
|
_ZNK6evmone10EOF1Header8get_typeESt17basic_string_viewIhN4evmc11byte_traitsIhEEEm:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_18], rsi
mov [rbp+var_10], rdx
mov [rbp+var_20], rdi
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
lea rax, [rax+rcx*4]
mov [rbp+var_30], rax
mov rsi, [rbp+var_30]
lea rdi, [rbp+var_18]
mov [rbp+var_40], rdi
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEEixEm; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::operator[](ulong)
mov rdi, [rbp+var_40]
movzx eax, byte ptr [rax]
mov dword ptr [rbp+var_38], eax
mov rsi, [rbp+var_30]
inc rsi
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEEixEm; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::operator[](ulong)
mov rdi, [rbp+var_40]
movzx eax, byte ptr [rax]
mov dword ptr [rbp+var_34], eax
mov rsi, [rbp+var_30]
add rsi, 2
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEEixEm; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::operator[](ulong)
mov rdi, rax
call _ZN6evmone14read_uint16_beIPKhEEtT_; evmone::read_uint16_be<uchar const*>(uchar const*)
mov esi, dword ptr [rbp+var_38]; unsigned __int8
mov edx, dword ptr [rbp+var_34]; unsigned __int8
movzx ecx, ax; unsigned __int16
lea rdi, [rbp+var_4]; this
call _ZN6evmone11EOFCodeTypeC2Ehht; evmone::EOFCodeType::EOFCodeType(uchar,uchar,ushort)
jmp short $+2
loc_6EA56:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
|
long long evmone::EOF1Header::get_type(long long a1, long long a2, long long a3, long long a4)
{
_BYTE *v4; // rax
unsigned __int16 uint16; // ax
unsigned __int8 v7; // [rsp+8h] [rbp-38h]
unsigned __int8 v8; // [rsp+Ch] [rbp-34h]
long long v9; // [rsp+10h] [rbp-30h]
_QWORD v10[2]; // [rsp+28h] [rbp-18h] BYREF
unsigned int v11; // [rsp+3Ch] [rbp-4h] BYREF
v10[0] = a2;
v10[1] = a3;
v9 = *(_QWORD *)(a1 + 8) + 4 * a4;
v7 = *(_BYTE *)std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::operator[]((long long)v10, v9);
v8 = *(_BYTE *)std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::operator[](
(long long)v10,
v9 + 1);
v4 = (_BYTE *)std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::operator[]((long long)v10, v9 + 2);
uint16 = evmone::read_uint16_be<unsigned char const*>(v4);
evmone::EOFCodeType::EOFCodeType((evmone::EOFCodeType *)&v11, v7, v8, uint16);
return v11;
}
|
get_type:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
LEA RAX,[RAX + RCX*0x4]
MOV qword ptr [RBP + -0x30],RAX
MOV RSI,qword ptr [RBP + -0x30]
LEA RDI,[RBP + -0x18]
MOV qword ptr [RBP + -0x40],RDI
CALL 0x00167e90
MOV RDI,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
MOV RSI,qword ptr [RBP + -0x30]
INC RSI
CALL 0x00167e90
MOV RDI,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
MOV RSI,qword ptr [RBP + -0x30]
ADD RSI,0x2
CALL 0x00167e90
MOV RDI,RAX
CALL 0x0016e310
MOV ESI,dword ptr [RBP + -0x38]
MOV EDX,dword ptr [RBP + -0x34]
MOVZX ECX,AX
LAB_0016ea4b:
LEA RDI,[RBP + -0x4]
CALL 0x0016eaa0
JMP 0x0016ea56
LAB_0016ea56:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
/* evmone::EOF1Header::get_type(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned
char> >, unsigned long) const */
int4
evmone::EOF1Header::get_type(long param_1,int8 param_2,int8 param_3,long param_4)
{
ulong uVar1;
uchar uVar2;
uchar uVar3;
ushort uVar4;
uchar *puVar5;
int8 local_20;
int8 local_18;
int4 local_c;
uVar1 = *(long *)(param_1 + 8) + param_4 * 4;
local_20 = param_2;
local_18 = param_3;
puVar5 = (uchar *)std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::
operator[]((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)
&local_20,uVar1);
uVar2 = *puVar5;
puVar5 = (uchar *)std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::
operator[]((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)
&local_20,uVar1 + 1);
uVar3 = *puVar5;
puVar5 = (uchar *)std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::
operator[]((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)
&local_20,uVar1 + 2);
uVar4 = read_uint16_be<unsigned_char_const*>(puVar5);
/* try { // try from 0016ea4b to 0016ea53 has its CatchHandler @ 0016ea5f */
EOFCodeType::EOFCodeType((EOFCodeType *)&local_c,uVar2,uVar3,uVar4);
return local_c;
}
|
|
65,101 |
translog_get_total_chunk_length
|
eloqsql/storage/maria/ma_loghandler.c
|
static uint16 translog_get_total_chunk_length(uchar *page, uint16 offset)
{
DBUG_ENTER("translog_get_total_chunk_length");
switch (page[offset] & TRANSLOG_CHUNK_TYPE) {
case TRANSLOG_CHUNK_LSN:
{
/* 0 chunk referred as LSN (head or tail) */
translog_size_t rec_len;
uchar *start= page + offset;
uchar *ptr= start + 1 + 2; /* chunk type and short trid */
uint16 chunk_len, header_len, page_rest;
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LSN"));
rec_len= translog_variable_record_1group_decode_len(&ptr);
chunk_len= uint2korr(ptr);
header_len= (uint16) (ptr -start) + 2;
DBUG_PRINT("info", ("rec len: %lu chunk len: %u header len: %u",
(ulong) rec_len, (uint) chunk_len, (uint) header_len));
if (chunk_len)
{
DBUG_PRINT("info", ("chunk len: %u + %u = %u",
(uint) header_len, (uint) chunk_len,
(uint) (chunk_len + header_len)));
DBUG_RETURN(chunk_len + header_len);
}
page_rest= TRANSLOG_PAGE_SIZE - offset;
DBUG_PRINT("info", ("page_rest %u", (uint) page_rest));
if (rec_len + header_len < page_rest)
DBUG_RETURN(rec_len + header_len);
DBUG_RETURN(page_rest);
}
case TRANSLOG_CHUNK_FIXED:
{
uchar *ptr;
uint type= page[offset] & TRANSLOG_REC_TYPE;
uint length;
int i;
/* 1 (pseudo)fixed record (also LSN) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_FIXED"));
DBUG_ASSERT(log_record_type_descriptor[type].rclass ==
LOGRECTYPE_FIXEDLENGTH ||
log_record_type_descriptor[type].rclass ==
LOGRECTYPE_PSEUDOFIXEDLENGTH);
if (log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH)
{
DBUG_PRINT("info",
("Fixed length: %u",
(uint) (log_record_type_descriptor[type].fixed_length + 3)));
DBUG_RETURN(log_record_type_descriptor[type].fixed_length + 3);
}
ptr= page + offset + 3; /* first compressed LSN */
length= log_record_type_descriptor[type].fixed_length + 3;
for (i= 0; i < log_record_type_descriptor[type].compressed_LSN; i++)
{
/* first 2 bits is length - 2 */
uint len= (((uint8) (*ptr)) >> 6) + 2;
if (ptr[0] == 0 && ((uint8) ptr[1]) == 1)
len+= LSN_STORE_SIZE; /* case of full LSN storing */
ptr+= len;
/* subtract saved bytes */
length-= (LSN_STORE_SIZE - len);
}
DBUG_PRINT("info", ("Pseudo-fixed length: %u", length));
DBUG_RETURN(length);
}
case TRANSLOG_CHUNK_NOHDR:
/* 2 no header chunk (till page end) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_NOHDR length: %u",
(uint) (TRANSLOG_PAGE_SIZE - offset)));
DBUG_RETURN(TRANSLOG_PAGE_SIZE - offset);
case TRANSLOG_CHUNK_LNGTH: /* 3 chunk with chunk length */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH"));
DBUG_ASSERT(TRANSLOG_PAGE_SIZE - offset >= 3);
DBUG_PRINT("info", ("length: %u", uint2korr(page + offset + 1) + 3));
DBUG_RETURN(uint2korr(page + offset + 1) + 3);
default:
DBUG_ASSERT(0);
DBUG_RETURN(0);
}
}
|
O0
|
c
|
translog_get_total_chunk_length:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
movzwl -0x12(%rbp), %ecx
movzbl (%rax,%rcx), %eax
andl $0xc0, %eax
movl %eax, -0x4c(%rbp)
je 0x527ac
jmp 0x5277b
movl -0x4c(%rbp), %eax
subl $0x40, %eax
je 0x52863
jmp 0x52789
movl -0x4c(%rbp), %eax
subl $0x80, %eax
je 0x52980
jmp 0x52799
movl -0x4c(%rbp), %eax
subl $0xc0, %eax
je 0x52997
jmp 0x529be
movq -0x10(%rbp), %rax
movzwl -0x12(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x527d0
leaq -0x28(%rbp), %rdi
callq 0x58fc0
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x2a(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movzwl %ax, %eax
addl $0x2, %eax
movw %ax, -0x2c(%rbp)
jmp 0x527fe
cmpw $0x0, -0x2a(%rbp)
je 0x5281e
jmp 0x52807
jmp 0x52809
jmp 0x5280b
movzwl -0x2a(%rbp), %eax
movzwl -0x2c(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x2(%rbp)
jmp 0x529ca
movzwl -0x12(%rbp), %ecx
movl $0x2000, %eax # imm = 0x2000
subl %ecx, %eax
movw %ax, -0x2e(%rbp)
jmp 0x5282f
movl -0x18(%rbp), %eax
movzwl -0x2c(%rbp), %ecx
addl %ecx, %eax
movzwl -0x2e(%rbp), %ecx
cmpl %ecx, %eax
jae 0x52854
jmp 0x52842
movl -0x18(%rbp), %eax
movzwl -0x2c(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0x2(%rbp)
jmp 0x529ca
jmp 0x52856
movw -0x2e(%rbp), %ax
movw %ax, -0x2(%rbp)
jmp 0x529ca
movq -0x10(%rbp), %rax
movzwl -0x12(%rbp), %ecx
movzbl (%rax,%rcx), %eax
andl $0x3f, %eax
movl %eax, -0x3c(%rbp)
jmp 0x52877
jmp 0x52879
jmp 0x5287b
movl -0x3c(%rbp), %eax
movl %eax, %ecx
leaq 0x425939(%rip), %rax # 0x4781c0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x3, (%rax)
jne 0x528bc
jmp 0x52895
jmp 0x52897
jmp 0x52899
movl -0x3c(%rbp), %eax
movl %eax, %ecx
leaq 0x42591b(%rip), %rax # 0x4781c0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
addl $0x3, %eax
movw %ax, -0x2(%rbp)
jmp 0x529ca
movq -0x10(%rbp), %rax
movzwl -0x12(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, %ecx
leaq 0x4258e2(%rip), %rax # 0x4781c0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
addl $0x3, %eax
movl %eax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl -0x3c(%rbp), %ecx
movl %ecx, %edx
leaq 0x4258bb(%rip), %rcx # 0x4781c0
imulq $0x48, %rdx, %rdx
addq %rdx, %rcx
movswl 0x20(%rcx), %ecx
cmpl %ecx, %eax
jge 0x52971
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
sarl $0x6, %eax
addl $0x2, %eax
movl %eax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x52946
movq -0x38(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x1, %eax
jne 0x52946
movl -0x48(%rbp), %eax
addl $0x7, %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x7, %ecx
subl -0x48(%rbp), %ecx
movl -0x40(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x528f6
jmp 0x52973
jmp 0x52975
jmp 0x52977
movl -0x40(%rbp), %eax
movw %ax, -0x2(%rbp)
jmp 0x529ca
jmp 0x52982
jmp 0x52984
jmp 0x52986
movzwl -0x12(%rbp), %ecx
movl $0x2000, %eax # imm = 0x2000
subl %ecx, %eax
movw %ax, -0x2(%rbp)
jmp 0x529ca
jmp 0x52999
jmp 0x5299b
jmp 0x5299d
jmp 0x5299f
jmp 0x529a1
jmp 0x529a3
jmp 0x529a5
movq -0x10(%rbp), %rax
movzwl -0x12(%rbp), %ecx
movslq %ecx, %rcx
movzwl 0x1(%rax,%rcx), %eax
addl $0x3, %eax
movw %ax, -0x2(%rbp)
jmp 0x529ca
jmp 0x529c0
jmp 0x529c2
jmp 0x529c4
movw $0x0, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_get_total_chunk_length:
push rbp
mov rbp, rsp
sub rsp, 50h
mov ax, si
mov [rbp+var_10], rdi
mov [rbp+var_12], ax
mov rax, [rbp+var_10]
movzx ecx, [rbp+var_12]
movzx eax, byte ptr [rax+rcx]
and eax, 0C0h
mov [rbp+var_4C], eax
jz short loc_527AC
jmp short $+2
loc_5277B:
mov eax, [rbp+var_4C]
sub eax, 40h ; '@'
jz loc_52863
jmp short $+2
loc_52789:
mov eax, [rbp+var_4C]
sub eax, 80h
jz loc_52980
jmp short $+2
loc_52799:
mov eax, [rbp+var_4C]
sub eax, 0C0h
jz loc_52997
jmp loc_529BE
loc_527AC:
mov rax, [rbp+var_10]
movzx ecx, [rbp+var_12]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, 1
add rax, 2
mov [rbp+var_28], rax
jmp short $+2
loc_527D0:
lea rdi, [rbp+var_28]
call translog_variable_record_1group_decode_len
mov [rbp+var_18], eax
mov rax, [rbp+var_28]
mov ax, [rax]
mov [rbp+var_2A], ax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
sub rax, rcx
movzx eax, ax
add eax, 2
mov [rbp+var_2C], ax
jmp short $+2
loc_527FE:
cmp [rbp+var_2A], 0
jz short loc_5281E
jmp short $+2
loc_52807:
jmp short $+2
loc_52809:
jmp short $+2
loc_5280B:
movzx eax, [rbp+var_2A]
movzx ecx, [rbp+var_2C]
add eax, ecx
mov [rbp+var_2], ax
jmp loc_529CA
loc_5281E:
movzx ecx, [rbp+var_12]
mov eax, 2000h
sub eax, ecx
mov [rbp+var_2E], ax
jmp short $+2
loc_5282F:
mov eax, [rbp+var_18]
movzx ecx, [rbp+var_2C]
add eax, ecx
movzx ecx, [rbp+var_2E]
cmp eax, ecx
jnb short loc_52854
jmp short $+2
loc_52842:
mov eax, [rbp+var_18]
movzx ecx, [rbp+var_2C]
add eax, ecx
mov [rbp+var_2], ax
jmp loc_529CA
loc_52854:
jmp short $+2
loc_52856:
mov ax, [rbp+var_2E]
mov [rbp+var_2], ax
jmp loc_529CA
loc_52863:
mov rax, [rbp+var_10]
movzx ecx, [rbp+var_12]
movzx eax, byte ptr [rax+rcx]
and eax, 3Fh
mov [rbp+var_3C], eax
jmp short $+2
loc_52877:
jmp short $+2
loc_52879:
jmp short $+2
loc_5287B:
mov eax, [rbp+var_3C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp dword ptr [rax], 3
jnz short loc_528BC
jmp short $+2
loc_52895:
jmp short $+2
loc_52897:
jmp short $+2
loc_52899:
mov eax, [rbp+var_3C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
movzx eax, word ptr [rax+4]
add eax, 3
mov [rbp+var_2], ax
jmp loc_529CA
loc_528BC:
mov rax, [rbp+var_10]
movzx ecx, [rbp+var_12]
movsxd rcx, ecx
add rax, rcx
add rax, 3
mov [rbp+var_38], rax
mov eax, [rbp+var_3C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
movzx eax, word ptr [rax+4]
add eax, 3
mov [rbp+var_40], eax
mov [rbp+var_44], 0
loc_528F6:
mov eax, [rbp+var_44]
mov ecx, [rbp+var_3C]
mov edx, ecx
lea rcx, log_record_type_descriptor
imul rdx, 48h ; 'H'
add rcx, rdx
movsx ecx, word ptr [rcx+20h]
cmp eax, ecx
jge short loc_52971
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
sar eax, 6
add eax, 2
mov [rbp+var_48], eax
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_52946
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax+1]
cmp eax, 1
jnz short loc_52946
mov eax, [rbp+var_48]
add eax, 7
mov [rbp+var_48], eax
loc_52946:
mov ecx, [rbp+var_48]
mov rax, [rbp+var_38]
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
mov ecx, 7
sub ecx, [rbp+var_48]
mov eax, [rbp+var_40]
sub eax, ecx
mov [rbp+var_40], eax
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp short loc_528F6
loc_52971:
jmp short $+2
loc_52973:
jmp short $+2
loc_52975:
jmp short $+2
loc_52977:
mov eax, [rbp+var_40]
mov [rbp+var_2], ax
jmp short loc_529CA
loc_52980:
jmp short $+2
loc_52982:
jmp short $+2
loc_52984:
jmp short $+2
loc_52986:
movzx ecx, [rbp+var_12]
mov eax, 2000h
sub eax, ecx
mov [rbp+var_2], ax
jmp short loc_529CA
loc_52997:
jmp short $+2
loc_52999:
jmp short $+2
loc_5299B:
jmp short $+2
loc_5299D:
jmp short $+2
loc_5299F:
jmp short $+2
loc_529A1:
jmp short $+2
loc_529A3:
jmp short $+2
loc_529A5:
mov rax, [rbp+var_10]
movzx ecx, [rbp+var_12]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx+1]
add eax, 3
mov [rbp+var_2], ax
jmp short loc_529CA
loc_529BE:
jmp short $+2
loc_529C0:
jmp short $+2
loc_529C2:
jmp short $+2
loc_529C4:
mov [rbp+var_2], 0
loc_529CA:
mov ax, [rbp+var_2]
add rsp, 50h
pop rbp
retn
|
__int16 translog_get_total_chunk_length(long long a1, unsigned __int16 a2)
{
int v3; // [rsp+4h] [rbp-4Ch]
unsigned int v4; // [rsp+8h] [rbp-48h]
int i; // [rsp+Ch] [rbp-44h]
__int16 v6; // [rsp+10h] [rbp-40h]
unsigned __int8 *v7; // [rsp+18h] [rbp-38h]
unsigned __int16 v8; // [rsp+24h] [rbp-2Ch]
_WORD *v9; // [rsp+28h] [rbp-28h] BYREF
long long v10; // [rsp+30h] [rbp-20h]
int v11; // [rsp+38h] [rbp-18h]
unsigned __int16 v12; // [rsp+3Eh] [rbp-12h]
long long v13; // [rsp+40h] [rbp-10h]
v13 = a1;
v12 = a2;
v3 = *(_BYTE *)(a1 + a2) & 0xC0;
if ( (*(_BYTE *)(a1 + a2) & 0xC0) != 0 )
{
switch ( v3 )
{
case 64:
if ( log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F)] == 3 )
{
return LOWORD(log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F) + 1]) + 3;
}
else
{
v7 = (unsigned __int8 *)(v12 + v13 + 3);
v6 = LOWORD(log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F) + 1]) + 3;
for ( i = 0; i < SLOWORD(log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F) + 8]); ++i )
{
v4 = ((int)*v7 >> 6) + 2;
if ( !*v7 && v7[1] == 1 )
v4 = ((int)*v7 >> 6) + 9;
v7 += v4;
v6 -= 7 - v4;
}
return v6;
}
case 128:
return 0x2000 - v12;
case 192:
return *(_WORD *)(v13 + v12 + 1) + 3;
default:
return 0;
}
}
else
{
v10 = v12 + v13;
v9 = (_WORD *)(v10 + 3);
v11 = translog_variable_record_1group_decode_len(&v9);
v8 = (_WORD)v9 - v10 + 2;
if ( *v9 )
{
return v8 + *v9;
}
else if ( (unsigned int)v8 + v11 >= (unsigned __int16)(0x2000 - v12) )
{
return 0x2000 - v12;
}
else
{
return v8 + v11;
}
}
}
|
translog_get_total_chunk_length:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AX,SI
MOV qword ptr [RBP + -0x10],RDI
MOV word ptr [RBP + -0x12],AX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RBP + -0x12]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0xc0
MOV dword ptr [RBP + -0x4c],EAX
JZ 0x001527ac
JMP 0x0015277b
LAB_0015277b:
MOV EAX,dword ptr [RBP + -0x4c]
SUB EAX,0x40
JZ 0x00152863
JMP 0x00152789
LAB_00152789:
MOV EAX,dword ptr [RBP + -0x4c]
SUB EAX,0x80
JZ 0x00152980
JMP 0x00152799
LAB_00152799:
MOV EAX,dword ptr [RBP + -0x4c]
SUB EAX,0xc0
JZ 0x00152997
JMP 0x001529be
LAB_001527ac:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RBP + -0x12]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001527d0
LAB_001527d0:
LEA RDI,[RBP + -0x28]
CALL 0x00158fc0
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV AX,word ptr [RAX]
MOV word ptr [RBP + -0x2a],AX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOVZX EAX,AX
ADD EAX,0x2
MOV word ptr [RBP + -0x2c],AX
JMP 0x001527fe
LAB_001527fe:
CMP word ptr [RBP + -0x2a],0x0
JZ 0x0015281e
JMP 0x00152807
LAB_00152807:
JMP 0x00152809
LAB_00152809:
JMP 0x0015280b
LAB_0015280b:
MOVZX EAX,word ptr [RBP + -0x2a]
MOVZX ECX,word ptr [RBP + -0x2c]
ADD EAX,ECX
MOV word ptr [RBP + -0x2],AX
JMP 0x001529ca
LAB_0015281e:
MOVZX ECX,word ptr [RBP + -0x12]
MOV EAX,0x2000
SUB EAX,ECX
MOV word ptr [RBP + -0x2e],AX
JMP 0x0015282f
LAB_0015282f:
MOV EAX,dword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RBP + -0x2c]
ADD EAX,ECX
MOVZX ECX,word ptr [RBP + -0x2e]
CMP EAX,ECX
JNC 0x00152854
JMP 0x00152842
LAB_00152842:
MOV EAX,dword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RBP + -0x2c]
ADD EAX,ECX
MOV word ptr [RBP + -0x2],AX
JMP 0x001529ca
LAB_00152854:
JMP 0x00152856
LAB_00152856:
MOV AX,word ptr [RBP + -0x2e]
MOV word ptr [RBP + -0x2],AX
JMP 0x001529ca
LAB_00152863:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RBP + -0x12]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0x3f
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00152877
LAB_00152877:
JMP 0x00152879
LAB_00152879:
JMP 0x0015287b
LAB_0015287b:
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
LEA RAX,[0x5781c0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP dword ptr [RAX],0x3
JNZ 0x001528bc
JMP 0x00152895
LAB_00152895:
JMP 0x00152897
LAB_00152897:
JMP 0x00152899
LAB_00152899:
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
LEA RAX,[0x5781c0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x4]
ADD EAX,0x3
MOV word ptr [RBP + -0x2],AX
JMP 0x001529ca
LAB_001528bc:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RBP + -0x12]
MOVSXD RCX,ECX
ADD RAX,RCX
ADD RAX,0x3
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
LEA RAX,[0x5781c0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x4]
ADD EAX,0x3
MOV dword ptr [RBP + -0x40],EAX
MOV dword ptr [RBP + -0x44],0x0
LAB_001528f6:
MOV EAX,dword ptr [RBP + -0x44]
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDX,ECX
LEA RCX,[0x5781c0]
IMUL RDX,RDX,0x48
ADD RCX,RDX
MOVSX ECX,word ptr [RCX + 0x20]
CMP EAX,ECX
JGE 0x00152971
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
SAR EAX,0x6
ADD EAX,0x2
MOV dword ptr [RBP + -0x48],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x00152946
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x1
JNZ 0x00152946
MOV EAX,dword ptr [RBP + -0x48]
ADD EAX,0x7
MOV dword ptr [RBP + -0x48],EAX
LAB_00152946:
MOV ECX,dword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV ECX,0x7
SUB ECX,dword ptr [RBP + -0x48]
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,ECX
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001528f6
LAB_00152971:
JMP 0x00152973
LAB_00152973:
JMP 0x00152975
LAB_00152975:
JMP 0x00152977
LAB_00152977:
MOV EAX,dword ptr [RBP + -0x40]
MOV word ptr [RBP + -0x2],AX
JMP 0x001529ca
LAB_00152980:
JMP 0x00152982
LAB_00152982:
JMP 0x00152984
LAB_00152984:
JMP 0x00152986
LAB_00152986:
MOVZX ECX,word ptr [RBP + -0x12]
MOV EAX,0x2000
SUB EAX,ECX
MOV word ptr [RBP + -0x2],AX
JMP 0x001529ca
LAB_00152997:
JMP 0x00152999
LAB_00152999:
JMP 0x0015299b
LAB_0015299b:
JMP 0x0015299d
LAB_0015299d:
JMP 0x0015299f
LAB_0015299f:
JMP 0x001529a1
LAB_001529a1:
JMP 0x001529a3
LAB_001529a3:
JMP 0x001529a5
LAB_001529a5:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RBP + -0x12]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x1 + 0x1]
ADD EAX,0x3
MOV word ptr [RBP + -0x2],AX
JMP 0x001529ca
LAB_001529be:
JMP 0x001529c0
LAB_001529c0:
JMP 0x001529c2
LAB_001529c2:
JMP 0x001529c4
LAB_001529c4:
MOV word ptr [RBP + -0x2],0x0
LAB_001529ca:
MOV AX,word ptr [RBP + -0x2]
ADD RSP,0x50
POP RBP
RET
|
int8 translog_get_total_chunk_length(long param_1,ushort param_2)
{
ushort uVar1;
uint uVar2;
int iVar3;
ulong uVar4;
uint local_50;
int local_4c;
uint local_48;
byte *local_40;
ushort *local_30;
long local_28;
ushort local_1a;
long local_18;
ushort local_a;
uVar2 = *(byte *)(param_1 + (ulong)param_2) & 0xc0;
if ((*(byte *)(param_1 + (ulong)param_2) & 0xc0) == 0) {
local_28 = param_1 + (int)(uint)param_2;
local_30 = (ushort *)(local_28 + 3);
local_1a = param_2;
local_18 = param_1;
iVar3 = translog_variable_record_1group_decode_len(&local_30);
uVar1 = ((short)local_30 - (short)local_28) + 2;
if (*local_30 == 0) {
local_a = 0x2000 - local_1a;
if (iVar3 + (uint)uVar1 < (uint)local_a) {
uVar4 = (ulong)(iVar3 + (uint)uVar1);
local_a = (ushort)(iVar3 + (uint)uVar1);
}
else {
uVar4 = (ulong)CONCAT22((short)(iVar3 + (uint)uVar1 >> 0x10),local_a);
}
}
else {
uVar2 = (uint)*local_30 + (uint)uVar1;
uVar4 = (ulong)uVar2;
local_a = (ushort)uVar2;
}
}
else if (uVar2 == 0x40) {
uVar2 = *(byte *)(param_1 + (ulong)param_2) & 0x3f;
if (*(int *)(log_record_type_descriptor + (ulong)uVar2 * 0x48) == 3) {
uVar4 = (ulong)(*(ushort *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 4) + 3);
local_a = (ushort)(*(ushort *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 4) + 3);
}
else {
local_40 = (byte *)(param_1 + (int)(uint)param_2 + 3);
local_48 = *(ushort *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 4) + 3;
for (local_4c = 0;
local_4c < *(short *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 0x20);
local_4c = local_4c + 1) {
local_50 = ((int)(uint)*local_40 >> 6) + 2;
if ((*local_40 == 0) && (local_40[1] == 1)) {
local_50 = ((int)(uint)*local_40 >> 6) + 9;
}
local_40 = local_40 + local_50;
local_48 = local_48 - (7 - local_50);
}
uVar4 = (ulong)local_48;
local_a = (ushort)local_48;
}
}
else if (uVar2 == 0x80) {
uVar4 = (ulong)(0x2000 - param_2);
local_a = (ushort)(0x2000 - param_2);
}
else {
uVar4 = (ulong)(uVar2 - 0xc0);
if (uVar2 - 0xc0 == 0) {
uVar2 = *(ushort *)(param_1 + 1 + (long)(int)(uint)param_2) + 3;
uVar4 = (ulong)uVar2;
local_a = (ushort)uVar2;
}
else {
local_a = 0;
}
}
return CONCAT62((int6)(uVar4 >> 0x10),local_a);
}
|
|
65,102 |
translog_get_total_chunk_length
|
eloqsql/storage/maria/ma_loghandler.c
|
static uint16 translog_get_total_chunk_length(uchar *page, uint16 offset)
{
DBUG_ENTER("translog_get_total_chunk_length");
switch (page[offset] & TRANSLOG_CHUNK_TYPE) {
case TRANSLOG_CHUNK_LSN:
{
/* 0 chunk referred as LSN (head or tail) */
translog_size_t rec_len;
uchar *start= page + offset;
uchar *ptr= start + 1 + 2; /* chunk type and short trid */
uint16 chunk_len, header_len, page_rest;
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LSN"));
rec_len= translog_variable_record_1group_decode_len(&ptr);
chunk_len= uint2korr(ptr);
header_len= (uint16) (ptr -start) + 2;
DBUG_PRINT("info", ("rec len: %lu chunk len: %u header len: %u",
(ulong) rec_len, (uint) chunk_len, (uint) header_len));
if (chunk_len)
{
DBUG_PRINT("info", ("chunk len: %u + %u = %u",
(uint) header_len, (uint) chunk_len,
(uint) (chunk_len + header_len)));
DBUG_RETURN(chunk_len + header_len);
}
page_rest= TRANSLOG_PAGE_SIZE - offset;
DBUG_PRINT("info", ("page_rest %u", (uint) page_rest));
if (rec_len + header_len < page_rest)
DBUG_RETURN(rec_len + header_len);
DBUG_RETURN(page_rest);
}
case TRANSLOG_CHUNK_FIXED:
{
uchar *ptr;
uint type= page[offset] & TRANSLOG_REC_TYPE;
uint length;
int i;
/* 1 (pseudo)fixed record (also LSN) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_FIXED"));
DBUG_ASSERT(log_record_type_descriptor[type].rclass ==
LOGRECTYPE_FIXEDLENGTH ||
log_record_type_descriptor[type].rclass ==
LOGRECTYPE_PSEUDOFIXEDLENGTH);
if (log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH)
{
DBUG_PRINT("info",
("Fixed length: %u",
(uint) (log_record_type_descriptor[type].fixed_length + 3)));
DBUG_RETURN(log_record_type_descriptor[type].fixed_length + 3);
}
ptr= page + offset + 3; /* first compressed LSN */
length= log_record_type_descriptor[type].fixed_length + 3;
for (i= 0; i < log_record_type_descriptor[type].compressed_LSN; i++)
{
/* first 2 bits is length - 2 */
uint len= (((uint8) (*ptr)) >> 6) + 2;
if (ptr[0] == 0 && ((uint8) ptr[1]) == 1)
len+= LSN_STORE_SIZE; /* case of full LSN storing */
ptr+= len;
/* subtract saved bytes */
length-= (LSN_STORE_SIZE - len);
}
DBUG_PRINT("info", ("Pseudo-fixed length: %u", length));
DBUG_RETURN(length);
}
case TRANSLOG_CHUNK_NOHDR:
/* 2 no header chunk (till page end) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_NOHDR length: %u",
(uint) (TRANSLOG_PAGE_SIZE - offset)));
DBUG_RETURN(TRANSLOG_PAGE_SIZE - offset);
case TRANSLOG_CHUNK_LNGTH: /* 3 chunk with chunk length */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH"));
DBUG_ASSERT(TRANSLOG_PAGE_SIZE - offset >= 3);
DBUG_PRINT("info", ("length: %u", uint2korr(page + offset + 1) + 3));
DBUG_RETURN(uint2korr(page + offset + 1) + 3);
default:
DBUG_ASSERT(0);
DBUG_RETURN(0);
}
}
|
O3
|
c
|
translog_get_total_chunk_length:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %esi, %eax
leaq (%rdi,%rax), %r15
movzbl (%rdi,%rax), %eax
movl %eax, %ecx
shrl $0x6, %ecx
leaq 0x9693a(%rip), %rdx # 0xe12b0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x3(%r15), %rax
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
movq %r14, %rdi
callq 0x4f100
movl %eax, %ecx
movq (%r14), %rax
movzwl (%rax), %edx
subl %r15d, %eax
addl $0x2, %eax
testw %dx, %dx
je 0x4aa20
addl %edx, %eax
jmp 0x4a9d5
movl $0x2000, %eax # imm = 0x2000
subl %ebx, %eax
jmp 0x4a9d5
movzwl 0x1(%r15), %eax
jmp 0x4a9d2
andl $0x3f, %eax
leaq (%rax,%rax,8), %rcx
leaq 0x3b2bf9(%rip), %rdx # 0x3fd5c0
cmpl $0x3, (%rdx,%rcx,8)
movzwl 0x4(%rdx,%rcx,8), %eax
jne 0x4a9e0
addl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq (%rdx,%rcx,8), %rcx
addl $0x3, %eax
movswl 0x20(%rcx), %ecx
testl %ecx, %ecx
jle 0x4a9d5
addq $0x3, %r15
movzbl (%r15), %esi
movl %esi, %edx
shrl $0x6, %edx
addl $0x2, %edx
testl %esi, %esi
jne 0x4aa10
cmpb $0x1, 0x1(%r15)
leal 0x7(%rdx), %esi
cmovnel %edx, %esi
movl %esi, %edx
movl %edx, %esi
addq %rsi, %r15
addl %edx, %eax
addl $-0x7, %eax
decl %ecx
jne 0x4a9f3
jmp 0x4a9d5
movl $0x2000, %edx # imm = 0x2000
subl %ebx, %edx
movzwl %ax, %eax
addl %eax, %ecx
movzwl %dx, %eax
cmpl %eax, %ecx
cmovael %edx, %ecx
movl %ecx, %eax
jmp 0x4a9d5
|
translog_get_total_chunk_length:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov eax, esi
lea r15, [rdi+rax]
movzx eax, byte ptr [rdi+rax]
mov ecx, eax
shr ecx, 6
lea rdx, jpt_4A97D
movsxd rcx, ds:(jpt_4A97D - 0E12B0h)[rdx+rcx*4]; switch 4 cases
add rcx, rdx
jmp rcx; switch jump
loc_4A97F:
lea rax, [r15+3]; jumptable 000000000004A97D case 0
lea r14, [rbp+var_20]
mov [r14], rax
mov rdi, r14
call translog_variable_record_1group_decode_len
mov ecx, eax
mov rax, [r14]
movzx edx, word ptr [rax]
sub eax, r15d
add eax, 2
test dx, dx
jz short loc_4AA20
add eax, edx
jmp short loc_4A9D5
loc_4A9A9:
mov eax, 2000h; jumptable 000000000004A97D case 2
sub eax, ebx
jmp short loc_4A9D5
loc_4A9B2:
movzx eax, word ptr [r15+1]; jumptable 000000000004A97D case 3
jmp short loc_4A9D2
loc_4A9B9:
and eax, 3Fh; jumptable 000000000004A97D case 1
lea rcx, [rax+rax*8]
lea rdx, log_record_type_descriptor
cmp dword ptr [rdx+rcx*8], 3
movzx eax, word ptr [rdx+rcx*8+4]
jnz short loc_4A9E0
loc_4A9D2:
add eax, 3
loc_4A9D5:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4A9E0:
lea rcx, [rdx+rcx*8]
add eax, 3
movsx ecx, word ptr [rcx+20h]
test ecx, ecx
jle short loc_4A9D5
add r15, 3
loc_4A9F3:
movzx esi, byte ptr [r15]
mov edx, esi
shr edx, 6
add edx, 2
test esi, esi
jnz short loc_4AA10
cmp byte ptr [r15+1], 1
lea esi, [rdx+7]
cmovnz esi, edx
mov edx, esi
loc_4AA10:
mov esi, edx
add r15, rsi
add eax, edx
add eax, 0FFFFFFF9h
dec ecx
jnz short loc_4A9F3
jmp short loc_4A9D5
loc_4AA20:
mov edx, 2000h
sub edx, ebx
movzx eax, ax
add ecx, eax
movzx eax, dx
cmp ecx, eax
cmovnb ecx, edx
mov eax, ecx
jmp short loc_4A9D5
|
long long translog_get_total_chunk_length(long long a1, unsigned int a2)
{
unsigned __int16 *v2; // rax
unsigned __int8 *v3; // r15
int v4; // ecx
int v5; // edx
int v6; // eax
long long result; // rax
int v8; // eax
int v9; // ecx
unsigned __int8 *v10; // r15
unsigned int v11; // edx
int v12; // esi
unsigned int v13; // ecx
unsigned __int16 *v14; // [rsp+0h] [rbp-20h] BYREF
v14 = v2;
v3 = (unsigned __int8 *)(a1 + a2);
switch ( *v3 >> 6 )
{
case 0:
v14 = (unsigned __int16 *)(v3 + 3);
v4 = translog_variable_record_1group_decode_len(&v14);
v5 = *v14;
v6 = (_DWORD)v14 - (_DWORD)v3 + 2;
if ( (_WORD)v5 )
{
result = (unsigned int)(v5 + v6);
}
else
{
v13 = (unsigned __int16)v6 + v4;
if ( v13 >= (unsigned __int16)(0x2000 - a2) )
v13 = 0x2000 - a2;
result = v13;
}
break;
case 1:
v8 = *((unsigned __int16 *)&log_record_type_descriptor + 36 * (*v3 & 0x3F) + 2);
if ( *((_DWORD *)&log_record_type_descriptor + 18 * (*v3 & 0x3F)) == 3 )
goto LABEL_7;
result = (unsigned int)(v8 + 3);
v9 = *((__int16 *)&log_record_type_descriptor + 36 * (*v3 & 0x3F) + 16);
if ( v9 > 0 )
{
v10 = v3 + 3;
do
{
v11 = (*v10 >> 6) + 2;
if ( !*v10 )
{
v12 = (*v10 >> 6) + 9;
if ( v10[1] != 1 )
v12 = (*v10 >> 6) + 2;
v11 = v12;
}
v10 += v11;
result = v11 + (unsigned int)result - 7;
--v9;
}
while ( v9 );
}
break;
case 2:
result = 0x2000 - a2;
break;
case 3:
v8 = *(unsigned __int16 *)(v3 + 1);
LABEL_7:
result = (unsigned int)(v8 + 3);
break;
}
return result;
}
|
translog_get_total_chunk_length:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV EAX,ESI
LEA R15,[RDI + RAX*0x1]
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOV ECX,EAX
SHR ECX,0x6
LEA RDX,[0x1e12b0]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
JMP RCX
|
void translog_get_total_chunk_length(long param_1,uint param_2)
{
/* WARNING: Could not recover jumptable at 0x0014a97d. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_001e12b0 +
*(int *)(&DAT_001e12b0 + (ulong)(*(byte *)(param_1 + (ulong)param_2) >> 6) * 4)))();
return;
}
|
|
65,103 |
my_coll_parser_scan_shift_sequence
|
eloqsql/strings/ctype-uca.c
|
static int
my_coll_parser_scan_shift_sequence(MY_COLL_RULE_PARSER *p)
{
MY_COLL_RULE before_extend;
memset(&p->rule.curr, 0, sizeof(p->rule.curr));
/* Scan single shift character or contraction */
if (!my_coll_parser_scan_character_list(p, p->rule.curr,
MY_UCA_MAX_CONTRACTION,
"Contraction"))
return 0;
before_extend= p->rule; /* Remember the part before "/" */
/* Append the part after "/" as expansion */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_EXTEND)
{
my_coll_parser_scan(p);
if (!my_coll_parser_scan_character_list(p, p->rule.base,
MY_UCA_MAX_EXPANSION,
"Expansion"))
return 0;
}
else if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CONTEXT)
{
/*
We support 2-character long context sequences only:
one character is the previous context, plus the current character.
It's OK as Unicode's CLDR does not have longer examples.
*/
my_coll_parser_scan(p);
p->rule.with_context= TRUE;
if (!my_coll_parser_scan_character_list(p, p->rule.curr + 1, 1, "context"))
return 0;
}
/* Add rule to the rule list */
if (my_coll_rules_add(p->rules, &p->rule))
return 0;
p->rule= before_extend; /* Restore to the state before "/" */
return 1;
}
|
O0
|
c
|
my_coll_parser_scan_shift_sequence:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
addq $0x50, %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x291f0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x50, %rsi
movl $0x6, %edx
leaq 0x2f4e1(%rip), %rcx # 0xe8ab4
callq 0xb9bc0
cmpl $0x0, %eax
jne 0xb95e9
movl $0x0, -0x4(%rbp)
jmp 0xb96e8
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
leaq -0xb0(%rbp), %rdi
movl $0xa0, %edx
callq 0x292d0
movq -0x10(%rbp), %rdi
callq 0xb8c00
cmpl $0x8, (%rax)
jne 0xb9649
movq -0x10(%rbp), %rdi
callq 0xb93e0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
movl $0xa, %edx
leaq 0x2f2a8(%rip), %rcx # 0xe88d9
callq 0xb9bc0
cmpl $0x0, %eax
jne 0xb9647
movl $0x0, -0x4(%rbp)
jmp 0xb96e8
jmp 0xb96a2
movq -0x10(%rbp), %rdi
callq 0xb8c00
cmpl $0x9, (%rax)
jne 0xb96a0
movq -0x10(%rbp), %rdi
callq 0xb93e0
movq -0x10(%rbp), %rax
movb $0x1, 0xe8(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
addq $0x50, %rsi
addq $0x8, %rsi
movl $0x1, %edx
leaq 0x2ff67(%rip), %rcx # 0xe95f2
callq 0xb9bc0
cmpl $0x0, %eax
jne 0xb969e
movl $0x0, -0x4(%rbp)
jmp 0xb96e8
jmp 0xb96a0
jmp 0xb96a2
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
callq 0xb9f10
cmpl $0x0, %eax
je 0xb96c8
movl $0x0, -0x4(%rbp)
jmp 0xb96e8
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
leaq -0xb0(%rbp), %rsi
movl $0xa0, %edx
callq 0x292d0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_coll_parser_scan_shift_sequence:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
add rdi, 50h ; 'P'
xor esi, esi
mov edx, 30h ; '0'
call _memset
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
add rsi, 50h ; 'P'
mov edx, 6
lea rcx, aContraction; "Contraction"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_B95E9
mov [rbp+var_4], 0
jmp loc_B96E8
loc_B95E9:
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
lea rdi, [rbp+var_B0]
mov edx, 0A0h
call _memcpy
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 8
jnz short loc_B9649
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
mov edx, 0Ah
lea rcx, aExpansion; "Expansion"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_B9647
mov [rbp+var_4], 0
jmp loc_B96E8
loc_B9647:
jmp short loc_B96A2
loc_B9649:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 9
jnz short loc_B96A0
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov rax, [rbp+var_10]
mov byte ptr [rax+0E8h], 1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
add rsi, 50h ; 'P'
add rsi, 8
mov edx, 1
lea rcx, aCharsetsCharse_52+23h; "context"
call my_coll_parser_scan_character_list
cmp eax, 0
jnz short loc_B969E
mov [rbp+var_4], 0
jmp short loc_B96E8
loc_B969E:
jmp short $+2
loc_B96A0:
jmp short $+2
loc_B96A2:
mov rax, [rbp+var_10]
mov rdi, [rax+0F0h]
mov rsi, [rbp+var_10]
add rsi, 50h ; 'P'
call my_coll_rules_add
cmp eax, 0
jz short loc_B96C8
mov [rbp+var_4], 0
jmp short loc_B96E8
loc_B96C8:
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
lea rsi, [rbp+var_B0]
mov edx, 0A0h
call _memcpy
mov [rbp+var_4], 1
loc_B96E8:
mov eax, [rbp+var_4]
add rsp, 0B0h
pop rbp
retn
|
long long my_coll_parser_scan_shift_sequence(long long a1)
{
_BYTE v2[160]; // [rsp+0h] [rbp-B0h] BYREF
long long v3; // [rsp+A0h] [rbp-10h]
v3 = a1;
memset(a1 + 160, 0LL, 48LL);
if ( (unsigned int)my_coll_parser_scan_character_list(v3, v3 + 160, 6LL, "Contraction") )
{
memcpy(v2, v3 + 80, sizeof(v2));
if ( *(_DWORD *)my_coll_parser_curr(v3) == 8 )
{
my_coll_parser_scan(v3);
if ( !(unsigned int)my_coll_parser_scan_character_list(v3, v3 + 80, 10LL, "Expansion") )
return 0;
}
else if ( *(_DWORD *)my_coll_parser_curr(v3) == 9 )
{
my_coll_parser_scan(v3);
*(_BYTE *)(v3 + 232) = 1;
if ( !(unsigned int)my_coll_parser_scan_character_list(v3, v3 + 168, 1LL, "context") )
return 0;
}
if ( (unsigned int)my_coll_rules_add(*(_QWORD *)(v3 + 240), v3 + 80) )
{
return 0;
}
else
{
memcpy(v3 + 80, v2, 160LL);
return 1;
}
}
else
{
return 0;
}
}
|
my_coll_parser_scan_shift_sequence:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
ADD RDI,0x50
XOR ESI,ESI
MOV EDX,0x30
CALL 0x001291f0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
ADD RSI,0x50
MOV EDX,0x6
LEA RCX,[0x1e8ab4]
CALL 0x001b9bc0
CMP EAX,0x0
JNZ 0x001b95e9
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b96e8
LAB_001b95e9:
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
LEA RDI,[RBP + -0xb0]
MOV EDX,0xa0
CALL 0x001292d0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001b8c00
CMP dword ptr [RAX],0x8
JNZ 0x001b9649
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001b93e0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
MOV EDX,0xa
LEA RCX,[0x1e88d9]
CALL 0x001b9bc0
CMP EAX,0x0
JNZ 0x001b9647
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b96e8
LAB_001b9647:
JMP 0x001b96a2
LAB_001b9649:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001b8c00
CMP dword ptr [RAX],0x9
JNZ 0x001b96a0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001b93e0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xe8],0x1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
ADD RSI,0x50
ADD RSI,0x8
MOV EDX,0x1
LEA RCX,[0x1e95f2]
CALL 0x001b9bc0
CMP EAX,0x0
JNZ 0x001b969e
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b96e8
LAB_001b969e:
JMP 0x001b96a0
LAB_001b96a0:
JMP 0x001b96a2
LAB_001b96a2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0xf0]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x50
CALL 0x001b9f10
CMP EAX,0x0
JZ 0x001b96c8
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b96e8
LAB_001b96c8:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
LEA RSI,[RBP + -0xb0]
MOV EDX,0xa0
CALL 0x001292d0
MOV dword ptr [RBP + -0x4],0x1
LAB_001b96e8:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xb0
POP RBP
RET
|
int4 my_coll_parser_scan_shift_sequence(long param_1)
{
int iVar1;
int *piVar2;
int1 local_b8 [160];
long local_18;
int4 local_c;
local_18 = param_1;
memset((void *)(param_1 + 0xa0),0,0x30);
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0xa0,6,"Contraction");
if (iVar1 == 0) {
local_c = 0;
}
else {
memcpy(local_b8,(void *)(local_18 + 0x50),0xa0);
piVar2 = (int *)my_coll_parser_curr(local_18);
if (*piVar2 == 8) {
my_coll_parser_scan(local_18);
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0x50,10,"Expansion");
if (iVar1 == 0) {
return 0;
}
}
else {
piVar2 = (int *)my_coll_parser_curr(local_18);
if (*piVar2 == 9) {
my_coll_parser_scan(local_18);
*(int1 *)(local_18 + 0xe8) = 1;
iVar1 = my_coll_parser_scan_character_list(local_18,local_18 + 0xa8,1,"context");
if (iVar1 == 0) {
return 0;
}
}
}
iVar1 = my_coll_rules_add(*(int8 *)(local_18 + 0xf0),local_18 + 0x50);
if (iVar1 == 0) {
memcpy((void *)(local_18 + 0x50),local_b8,0xa0);
local_c = 1;
}
else {
local_c = 0;
}
}
return local_c;
}
|
|
65,104 |
translog_set_file_size
|
eloqsql/storage/maria/ma_loghandler.c
|
void translog_set_file_size(uint32 size)
{
struct st_translog_buffer *old_buffer= NULL;
DBUG_ENTER("translog_set_file_size");
translog_lock();
DBUG_PRINT("enter", ("Size: %lu", (ulong) size));
DBUG_ASSERT(size % TRANSLOG_PAGE_SIZE == 0);
DBUG_ASSERT(size >= TRANSLOG_MIN_FILE_SIZE);
log_descriptor.log_file_max_size= size;
/* if current file longer then finish it*/
if (LSN_OFFSET(log_descriptor.horizon) >= log_descriptor.log_file_max_size)
{
old_buffer= log_descriptor.bc.buffer;
translog_buffer_next(&log_descriptor.horizon, &log_descriptor.bc, 1);
translog_buffer_unlock(old_buffer);
}
translog_unlock();
if (old_buffer)
{
translog_buffer_lock(old_buffer);
translog_buffer_flush(old_buffer);
translog_buffer_unlock(old_buffer);
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
translog_set_file_size:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x324df
movl %ebx, 0x3c69e8(%rip) # 0x3fdf00
cmpl %ebx, 0xbc761a(%rip) # 0xbfeb38
jae 0x37524
xorl %ebx, %ebx
jmp 0x3755f
movq 0xbc763d(%rip), %rbx # 0xbfeb68
leaq 0xbc7606(%rip), %rdi # 0xbfeb38
leaq 0xbc7607(%rip), %rsi # 0xbfeb40
movl $0x1, %edx
callq 0x375f3
movq 0x1000d0(%rbx), %rdi
testq %rdi, %rdi
jne 0x375de
leaq 0x100090(%rbx), %rdi
callq 0x291c0
movq 0xbc7602(%rip), %r14 # 0xbfeb68
movq 0x1000d0(%r14), %rdi
testq %rdi, %rdi
jne 0x375ba
addq $0x100090, %r14 # imm = 0x100090
movq %r14, %rdi
callq 0x291c0
testq %rbx, %rbx
je 0x375b5
movq %rbx, %rdi
callq 0x3257f
movq %rbx, %rdi
callq 0x3624d
movq 0x1000d0(%rbx), %rdi
testq %rdi, %rdi
jne 0x375cc
addq $0x100090, %rbx # imm = 0x100090
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x291c0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x34ea4f(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37572
leaq 0x34ea3d(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x375a2
leaq 0x34ea2b(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x37553
|
translog_set_file_size:
push rbp
mov rbp, rsp
push r14
push rbx
mov ebx, edi
call translog_lock
mov cs:dword_3FDF00, ebx
cmp dword ptr cs:qword_BFEB38, ebx
jnb short loc_37524
xor ebx, ebx
jmp short loc_3755F
loc_37524:
mov rbx, qword ptr cs:xmmword_BFEB60+8
lea rdi, qword_BFEB38
lea rsi, xmmword_BFEB40
mov edx, 1
call translog_buffer_next
mov rdi, ds:qword_1000D0[rbx]
test rdi, rdi
jnz loc_375DE
loc_37553:
lea rdi, unk_100090[rbx]
call _pthread_mutex_unlock
loc_3755F:
mov r14, qword ptr cs:xmmword_BFEB60+8
mov rdi, ds:qword_1000D0[r14]
test rdi, rdi
jnz short loc_375BA
loc_37572:
add r14, 100090h
mov rdi, r14
call _pthread_mutex_unlock
test rbx, rbx
jz short loc_375B5
mov rdi, rbx
call translog_buffer_lock
mov rdi, rbx
call translog_buffer_flush
mov rdi, ds:qword_1000D0[rbx]
test rdi, rdi
jnz short loc_375CC
loc_375A2:
add rbx, 100090h
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _pthread_mutex_unlock
loc_375B5:
pop rbx
pop r14
pop rbp
retn
loc_375BA:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_37572
loc_375CC:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_375A2
loc_375DE:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_37553
|
long long translog_set_file_size(unsigned int a1)
{
long long v1; // rbx
long long v2; // r14
long long result; // rax
translog_lock();
dword_3FDF00 = a1;
if ( (unsigned int)qword_BFEB38 >= a1 )
{
v1 = *((_QWORD *)&xmmword_BFEB60 + 1);
translog_buffer_next(&qword_BFEB38, &xmmword_BFEB40, 1LL);
if ( *(long long *)((char *)&qword_1000D0 + v1) )
PSI_server[44]();
pthread_mutex_unlock((char *)&unk_100090 + v1);
}
else
{
v1 = 0LL;
}
v2 = *((_QWORD *)&xmmword_BFEB60 + 1);
if ( *(long long *)((char *)&qword_1000D0 + *((_QWORD *)&xmmword_BFEB60 + 1)) )
PSI_server[44]();
result = pthread_mutex_unlock(v2 + 1048720);
if ( v1 )
{
translog_buffer_lock(v1);
translog_buffer_flush(v1);
if ( *(long long *)((char *)&qword_1000D0 + v1) )
PSI_server[44]();
return pthread_mutex_unlock(v1 + 1048720);
}
return result;
}
|
translog_set_file_size:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EBX,EDI
CALL 0x001324df
MOV dword ptr [0x004fdf00],EBX
CMP dword ptr [0x00cfeb38],EBX
JNC 0x00137524
XOR EBX,EBX
JMP 0x0013755f
LAB_00137524:
MOV RBX,qword ptr [0x00cfeb68]
LEA RDI,[0xcfeb38]
LEA RSI,[0xcfeb40]
MOV EDX,0x1
CALL 0x001375f3
MOV RDI,qword ptr [RBX + 0x1000d0]
TEST RDI,RDI
JNZ 0x001375de
LAB_00137553:
LEA RDI,[RBX + 0x100090]
CALL 0x001291c0
LAB_0013755f:
MOV R14,qword ptr [0x00cfeb68]
MOV RDI,qword ptr [R14 + 0x1000d0]
TEST RDI,RDI
JNZ 0x001375ba
LAB_00137572:
ADD R14,0x100090
MOV RDI,R14
CALL 0x001291c0
TEST RBX,RBX
JZ 0x001375b5
MOV RDI,RBX
CALL 0x0013257f
MOV RDI,RBX
CALL 0x0013624d
MOV RDI,qword ptr [RBX + 0x1000d0]
TEST RDI,RDI
JNZ 0x001375cc
LAB_001375a2:
ADD RBX,0x100090
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x001291c0
LAB_001375b5:
POP RBX
POP R14
POP RBP
RET
LAB_001375ba:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137572
LAB_001375cc:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001375a2
LAB_001375de:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00137553
|
void translog_set_file_size(uint param_1)
{
long lVar1;
long lVar2;
translog_lock();
lVar2 = DAT_00cfeb68;
DAT_004fdf00 = param_1;
if ((uint)DAT_00cfeb38 < param_1) {
lVar2 = 0;
}
else {
translog_buffer_next(&DAT_00cfeb38,&DAT_00cfeb40,1);
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + lVar2) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar2));
}
lVar1 = DAT_00cfeb68;
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00cfeb68) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar1));
if (lVar2 != 0) {
translog_buffer_lock(lVar2);
translog_buffer_flush(lVar2);
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + lVar2) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar2));
return;
}
return;
}
|
|
65,105 |
minja::Context::at(minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
virtual Value & at(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->at(key);
throw std::runtime_error("Undefined variable: " + key.dump());
}
|
O1
|
cpp
|
minja::Context::at(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x54ee6
testb %al, %al
je 0x60a23
movq %r15, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x54ce8
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x60a42
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movl $0x10, %edi
callq 0x18350
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x3dd5a
leaq 0x4ce93(%rip), %rsi # 0xad8fd
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x2463f
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x18a80
xorl %ebp, %ebp
movq 0x7d55e(%rip), %rsi # 0xddff0
movq 0x7d4d7(%rip), %rdx # 0xddf70
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x60ac7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x60ac7
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x60aea
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x60aea
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x60af7
movq %rbx, %rdi
callq 0x184f0
movq %r14, %rdi
callq 0x18ba0
nop
|
_ZN5minja7Context2atERKNS_5ValueE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+18h]
mov rdi, r15; this
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_60A23
mov rdi, r15; this
mov rsi, r14; minja::Value *
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
loc_60A23:
mov rdi, [rbx+68h]
test rdi, rdi
jz short loc_60A42
mov rax, [rdi]
mov rax, [rax+18h]
mov rsi, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp rax
loc_60A42:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUndefinedVaria; "Undefined variable: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_60AC7
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_60AC7
mov r14, rax
mov bpl, 1
loc_60AC7:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_60AEA
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_60AEA
mov r14, rax
mov bpl, 1
loc_60AEA:
test bpl, bpl
jz short loc_60AF7
mov rdi, rbx; void *
call ___cxa_free_exception
loc_60AF7:
mov rdi, r14
call __Unwind_Resume
|
unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3)
{
long long v4; // rdi
void *exception; // rbx
_BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF
if ( (unsigned __int8)minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) )
return minja::Value::at((minja::Context *)((char *)this + 24), a2);
v4 = *((_QWORD *)this + 13);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2);
}
|
at:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x18]
MOV RDI,R15
CALL 0x00154ee6
TEST AL,AL
JZ 0x00160a23
MOV RDI,R15
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00154ce8
LAB_00160a23:
MOV RDI,qword ptr [RBX + 0x68]
TEST RDI,RDI
JZ 0x00160a42
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP RAX
LAB_00160a42:
MOV EDI,0x10
CALL 0x00118350
MOV RBX,RAX
LAB_00160a4f:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0013dd5a
LAB_00160a63:
LEA RSI,[0x1ad8fd]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0012463f
MOV BPL,0x1
LAB_00160a7c:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00118a80
XOR EBP,EBP
MOV RSI,qword ptr [0x001ddff0]
MOV RDX,qword ptr [0x001ddf70]
MOV RDI,RBX
CALL 0x00118b30
|
/* minja::Context::at(minja::Value const&) */
void __thiscall minja::Context::at(Context *this,Value *param_1)
{
long *plVar1;
char cVar2;
runtime_error *this_00;
int1 local_60 [32];
string local_40 [32];
cVar2 = Value::contains((Value *)(this + 0x18),param_1);
if (cVar2 != '\0') {
Value::at((Value *)(this + 0x18),param_1);
return;
}
plVar1 = *(long **)(this + 0x68);
if (plVar1 != (long *)0x0) {
/* WARNING: Could not recover jumptable at 0x00160a40. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar1 + 0x18))(plVar1,param_1);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00160a4f to 00160a62 has its CatchHandler @ 00160ae4 */
Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0));
/* try { // try from 00160a63 to 00160a78 has its CatchHandler @ 00160ac1 */
std::operator+((char *)local_40,(string *)"Undefined variable: ");
/* try { // try from 00160a7c to 00160aa0 has its CatchHandler @ 00160aa1 */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001ddff0,PTR__runtime_error_001ddf70);
}
|
|
65,106 |
minja::Context::at(minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
virtual Value & at(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->at(key);
throw std::runtime_error("Undefined variable: " + key.dump());
}
|
O3
|
cpp
|
minja::Context::at(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x53eca
testb %al, %al
je 0x5f945
movq %r15, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x53cb8
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x5f964
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movl $0x10, %edi
callq 0x18350
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x3d172
leaq 0x4bf61(%rip), %rsi # 0xab8ed
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x2434d
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x18a80
xorl %ebp, %ebp
movq 0x7c63c(%rip), %rsi # 0xdbff0
movq 0x7c5b5(%rip), %rdx # 0xdbf70
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5f9e1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5f9fc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x5fa26
jmp 0x5fa2e
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5fa26
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x5fa26
movq %rax, %r14
movq %rbx, %rdi
callq 0x184f0
movq %r14, %rdi
callq 0x18ba0
|
_ZN5minja7Context2atERKNS_5ValueE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+18h]
mov rdi, r15; this
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_5F945
mov rdi, r15; this
mov rsi, r14; minja::Value *
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
loc_5F945:
mov rdi, [rbx+68h]
test rdi, rdi
jz short loc_5F964
mov rax, [rdi]
mov rax, [rax+18h]
mov rsi, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp rax
loc_5F964:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUndefinedVaria; "Undefined variable: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5F9E1
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5F9E1:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5F9FC
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5F9FC:
test bpl, bpl
jnz short loc_5FA26
jmp short loc_5FA2E
mov r14, rax
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5FA26
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5FA26
mov r14, rax
loc_5FA26:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_5FA2E:
mov rdi, r14
call __Unwind_Resume
|
unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3)
{
long long v4; // rdi
void *exception; // rbx
_BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF
if ( minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) )
return minja::Value::at((minja::Context *)((char *)this + 24), a2);
v4 = *((_QWORD *)this + 13);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2);
}
|
at:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x18]
MOV RDI,R15
CALL 0x00153eca
TEST AL,AL
JZ 0x0015f945
MOV RDI,R15
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00153cb8
LAB_0015f945:
MOV RDI,qword ptr [RBX + 0x68]
TEST RDI,RDI
JZ 0x0015f964
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP RAX
LAB_0015f964:
MOV EDI,0x10
CALL 0x00118350
MOV RBX,RAX
LAB_0015f971:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0013d172
LAB_0015f985:
LEA RSI,[0x1ab8ed]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0012434d
MOV BPL,0x1
LAB_0015f99e:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00118a80
XOR EBP,EBP
MOV RSI,qword ptr [0x001dbff0]
MOV RDX,qword ptr [0x001dbf70]
MOV RDI,RBX
CALL 0x00118b30
|
/* minja::Context::at(minja::Value const&) */
void __thiscall minja::Context::at(Context *this,Value *param_1)
{
long *plVar1;
char cVar2;
runtime_error *this_00;
int1 local_60 [32];
string local_40 [32];
cVar2 = Value::contains((Value *)(this + 0x18),param_1);
if (cVar2 != '\0') {
Value::at((Value *)(this + 0x18),param_1);
return;
}
plVar1 = *(long **)(this + 0x68);
if (plVar1 != (long *)0x0) {
/* WARNING: Could not recover jumptable at 0x0015f962. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar1 + 0x18))(plVar1,param_1);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015f971 to 0015f984 has its CatchHandler @ 0015fa23 */
Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0));
/* try { // try from 0015f985 to 0015f99a has its CatchHandler @ 0015fa03 */
std::operator+((char *)local_40,(string *)"Undefined variable: ");
/* try { // try from 0015f99e to 0015f9c2 has its CatchHandler @ 0015f9c3 */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001dbff0,PTR__runtime_error_001dbf70);
}
|
|
65,107 |
aimrt::plugins::net_plugin::HttpChannelBackend::Start()
|
aimrt_mujoco_sim/_deps/aimrt-src/src/plugins/net_plugin/http/http_channel_backend.cc
|
void HttpChannelBackend::Start() {
AIMRT_CHECK_ERROR_THROW(
std::atomic_exchange(&state_, State::kStart) == State::kInit,
"Method can only be called when state is 'Init'.");
}
|
O3
|
cpp
|
aimrt::plugins::net_plugin::HttpChannelBackend::Start():
pushq %rbx
subq $0x40, %rsp
movl $0x2, %eax
xchgl %eax, 0x38(%rdi)
cmpl $0x1, %eax
jne 0xa7caa
addq $0x40, %rsp
popq %rbx
retq
leaq 0x184ab8(%rip), %rsi # 0x22c769
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %r8
movl $0x2f, %edx
xorl %ecx, %ecx
callq 0xb8f1d
callq 0x98994
leaq 0x30(%rsp), %rdi
movq %rax, (%rdi)
callq 0xb4132
cmpl $0x4, %eax
ja 0xa7d0e
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1849f5(%rip), %rcx # 0x22c6e8
leaq 0x184a9f(%rip), %r8 # 0x22c799
leaq 0x30(%rsp), %rdi
movl $0x4, %esi
movl $0x4d, %edx
callq 0xb4212
movl $0x28, %edi
callq 0x91050
leaq 0x27bb69(%rip), %rcx # 0x323888
movq %rcx, (%rax)
leaq 0x18(%rax), %rdx
movq %rdx, 0x8(%rax)
leaq 0x20(%rsp), %rcx
movq -0x10(%rcx), %rsi
cmpq %rcx, %rsi
jne 0xa7d40
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0xa7d4d
movq %rsi, 0x8(%rax)
movq 0x20(%rsp), %rdx
movq %rdx, 0x18(%rax)
movq 0x18(%rsp), %rdx
movq %rdx, 0x10(%rax)
movq %rcx, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
leaq 0x27a1b0(%rip), %rsi # 0x321f20
leaq 0xc581(%rip), %rdx # 0xb42f8
movq %rax, %rdi
callq 0x94390
jmp 0xa7d83
jmp 0xa7d83
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa7da1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x927a0
movq %rbx, %rdi
callq 0x945e0
nop
|
_ZN5aimrt7plugins10net_plugin18HttpChannelBackend5StartEv:
push rbx
sub rsp, 40h
mov eax, 2
xchg eax, [rdi+38h]
cmp eax, 1
jnz short loc_A7CAA
add rsp, 40h
pop rbx
retn
loc_A7CAA:
lea rsi, aMethodCanOnlyB; "Method can only be called when state is"...
lea rdi, [rsp+48h+var_38]; this
lea r8, [rsp+48h+var_18]; int
mov edx, 2Fh ; '/'; int
xor ecx, ecx; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
call _ZN5aimrt7plugins10net_plugin9GetLoggerEv; aimrt::plugins::net_plugin::GetLogger(void)
lea rdi, [rsp+48h+var_18]; this
mov [rdi], rax
call _ZNK5aimrt6logger9LoggerRef11GetLogLevelEv; aimrt::logger::LoggerRef::GetLogLevel(void)
cmp eax, 4
ja short loc_A7D0E
mov r9, [rsp+48h+var_38]; char *
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_48], rax; unsigned __int64
lea rcx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/aimrt_"...
lea r8, aStart; "Start"
lea rdi, [rsp+48h+var_18]; this
mov esi, 4; unsigned int
mov edx, 4Dh ; 'M'; unsigned int
call _ZNK5aimrt6logger9LoggerRef3LogEjjPKcS3_S3_m; aimrt::logger::LoggerRef::Log(uint,uint,char const*,char const*,char const*,ulong)
loc_A7D0E:
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
lea rcx, off_323888
mov [rax], rcx
lea rdx, [rax+18h]
mov [rax+8], rdx
lea rcx, [rsp+48h+var_28]
mov rsi, [rcx-10h]
cmp rsi, rcx
jnz short loc_A7D40
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
jmp short loc_A7D4D
loc_A7D40:
mov [rax+8], rsi
mov rdx, [rsp+48h+var_28]
mov [rax+18h], rdx
loc_A7D4D:
mov rdx, [rsp+48h+var_30]
mov [rax+10h], rdx
mov [rsp+48h+var_38], rcx
mov [rsp+48h+var_30], 0
mov byte ptr [rsp+48h+var_28], 0
lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo
lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *)
mov rdi, rax; void *
call ___cxa_throw
jmp short loc_A7D83
jmp short $+2
loc_A7D83:
mov rbx, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A7DA1
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A7DA1:
mov rdi, rbx
call __Unwind_Resume
|
long long aimrt::plugins::net_plugin::HttpChannelBackend::Start(
aimrt::plugins::net_plugin::HttpChannelBackend *this,
long long a2,
long long a3,
long long a4,
long long a5,
int a6)
{
long long result; // rax
char *exception; // rax
void *v8; // [rsp+0h] [rbp-48h]
int v9; // [rsp+8h] [rbp-40h]
char *v10; // [rsp+10h] [rbp-38h] BYREF
unsigned long long v11; // [rsp+18h] [rbp-30h]
__int128 v12; // [rsp+20h] [rbp-28h] BYREF
_QWORD v13[3]; // [rsp+30h] [rbp-18h] BYREF
result = (unsigned int)_InterlockedExchange((volatile __int32 *)this + 14, 2);
if ( (_DWORD)result != 1 )
{
fmt::v10::vformat[abi:cxx11](
(int)&v10,
(int)"Method can only be called when state is 'Init'.",
47,
0,
(int)v13,
a6,
v8,
v9,
(unsigned long long)v10);
v13[0] = aimrt::plugins::net_plugin::GetLogger((aimrt::plugins::net_plugin *)&v10);
if ( (unsigned int)aimrt::logger::LoggerRef::GetLogLevel((aimrt::logger::LoggerRef *)v13) <= 4 )
aimrt::logger::LoggerRef::Log(
(aimrt::logger::LoggerRef *)v13,
4u,
0x4Du,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/plugins/net_plugin/http/http_channel_backend.cc",
"Start",
v10,
v11);
exception = (char *)__cxa_allocate_exception(0x28uLL);
*(_QWORD *)exception = off_323888;
*((_QWORD *)exception + 1) = exception + 24;
if ( v10 == (char *)&v12 )
{
*(_OWORD *)(exception + 24) = v12;
}
else
{
*((_QWORD *)exception + 1) = v10;
*((_QWORD *)exception + 3) = v12;
}
*((_QWORD *)exception + 2) = v11;
v10 = (char *)&v12;
v11 = 0LL;
LOBYTE(v12) = 0;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException,
aimrt::common::util::AimRTException::~AimRTException);
}
return result;
}
|
Start:
PUSH RBX
SUB RSP,0x40
MOV EAX,0x2
XCHG dword ptr [RDI + 0x38],EAX
CMP EAX,0x1
JNZ 0x001a7caa
ADD RSP,0x40
POP RBX
RET
LAB_001a7caa:
LEA RSI,[0x32c769]
LEA RDI,[RSP + 0x10]
LEA R8,[RSP + 0x30]
MOV EDX,0x2f
XOR ECX,ECX
CALL 0x001b8f1d
LAB_001a7cc7:
CALL 0x00198994
LEA RDI,[RSP + 0x30]
MOV qword ptr [RDI],RAX
LAB_001a7cd4:
CALL 0x001b4132
CMP EAX,0x4
JA 0x001a7d0e
MOV R9,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
LAB_001a7ce8:
MOV qword ptr [RSP],RAX
LEA RCX,[0x32c6e8]
LEA R8,[0x32c799]
LEA RDI,[RSP + 0x30]
MOV ESI,0x4
MOV EDX,0x4d
CALL 0x001b4212
LAB_001a7d0e:
MOV EDI,0x28
CALL 0x00191050
LEA RCX,[0x423888]
MOV qword ptr [RAX],RCX
LEA RDX,[RAX + 0x18]
MOV qword ptr [RAX + 0x8],RDX
LEA RCX,[RSP + 0x20]
MOV RSI,qword ptr [RCX + -0x10]
CMP RSI,RCX
JNZ 0x001a7d40
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
JMP 0x001a7d4d
LAB_001a7d40:
MOV qword ptr [RAX + 0x8],RSI
MOV RDX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RDX
LAB_001a7d4d:
MOV RDX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],0x0
MOV byte ptr [RSP + 0x20],0x0
LAB_001a7d69:
LEA RSI,[0x421f20]
LEA RDX,[0x1b42f8]
MOV RDI,RAX
CALL 0x00194390
|
/* aimrt::plugins::net_plugin::HttpChannelBackend::Start() */
void __thiscall aimrt::plugins::net_plugin::HttpChannelBackend::Start(HttpChannelBackend *this)
{
int iVar1;
uint uVar2;
int8 *puVar3;
uint *local_38;
int8 local_30;
uint local_28;
int4 uStack_24;
int4 uStack_20;
int4 uStack_1c;
int8 local_18 [2];
LOCK();
iVar1 = *(int *)(this + 0x38);
*(int *)(this + 0x38) = 2;
UNLOCK();
if (iVar1 == 1) {
return;
}
fmt::v10::vformat_abi_cxx11_
(&local_38,"Method can only be called when state is \'Init\'.",0x2f,0,local_18);
/* try { // try from 001a7cc7 to 001a7ccb has its CatchHandler @ 001a7d83 */
local_18[0] = GetLogger();
/* try { // try from 001a7cd4 to 001a7cd8 has its CatchHandler @ 001a7d81 */
uVar2 = logger::LoggerRef::GetLogLevel((LoggerRef *)local_18);
if (uVar2 < 5) {
/* try { // try from 001a7ce8 to 001a7d0d has its CatchHandler @ 001a7d7f */
logger::LoggerRef::Log
((uint)local_18,4,(char *)0x4d,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/plugins/net_plugin/http/http_channel_backend.cc"
,"Start",(ulong)local_38);
}
puVar3 = (int8 *)__cxa_allocate_exception(0x28);
*puVar3 = &PTR__AimRTException_00423888;
puVar3[1] = puVar3 + 3;
if (local_38 == &local_28) {
*(uint *)(puVar3 + 3) = local_28;
*(int4 *)((long)puVar3 + 0x1c) = uStack_24;
*(int4 *)(puVar3 + 4) = uStack_20;
*(int4 *)((long)puVar3 + 0x24) = uStack_1c;
}
else {
puVar3[1] = local_38;
puVar3[3] = CONCAT44(uStack_24,local_28);
}
puVar3[2] = local_30;
local_30 = 0;
local_28 = local_28 & 0xffffff00;
local_38 = &local_28;
/* try { // try from 001a7d69 to 001a7d7e has its CatchHandler @ 001a7d81 */
/* WARNING: Subroutine does not return */
__cxa_throw(puVar3,&common::util::AimRTException::typeinfo,
common::util::AimRTException::~AimRTException);
}
|
|
65,108 |
minja::ArgumentsValue::expectArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::pair<unsigned long, unsigned long> const&, std::pair<unsigned long, unsigned long> const&)
|
monkey531[P]llama/common/minja.hpp
|
void expectArgs(const std::string & method_name, const std::pair<size_t, size_t> & pos_count, const std::pair<size_t, size_t> & kw_count) {
if (args.size() < pos_count.first || args.size() > pos_count.second || kwargs.size() < kw_count.first || kwargs.size() > kw_count.second) {
std::ostringstream out;
out << method_name << " must have between " << pos_count.first << " and " << pos_count.second << " positional arguments and between " << kw_count.first << " and " << kw_count.second << " keyword arguments";
throw std::runtime_error(out.str());
}
}
|
O3
|
cpp
|
minja::ArgumentsValue::expectArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::pair<unsigned long, unsigned long> const&, std::pair<unsigned long, unsigned long> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq 0x8(%rdi), %rcx
subq (%rdi), %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rax # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rax
cmpq (%rdx), %rax
jb 0xa06cd
cmpq 0x8(%r14), %rax
ja 0xa06cd
movq 0x20(%rdi), %rcx
subq 0x18(%rdi), %rcx
sarq $0x4, %rcx
movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
cmpq (%rbx), %rax
jb 0xa06cd
cmpq 0x8(%rbx), %rax
ja 0xa06cd
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x1bbd0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x1ba10
movq %rax, %r15
leaq 0x5e151(%rip), %rsi # 0xfe844
movl $0x13, %edx
movq %rax, %rdi
callq 0x1ba10
movq (%r14), %rsi
movq %r15, %rdi
callq 0x1b600
movq %rax, %r15
leaq 0x5e143(%rip), %rsi # 0xfe858
movl $0x5, %edx
movq %rax, %rdi
callq 0x1ba10
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x1b600
movq %rax, %r14
leaq 0x5e126(%rip), %rsi # 0xfe85e
movl $0x22, %edx
movq %rax, %rdi
callq 0x1ba10
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x1b600
movq %rax, %r14
leaq 0x5e0fe(%rip), %rsi # 0xfe858
movl $0x5, %edx
movq %rax, %rdi
callq 0x1ba10
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x1b600
leaq 0x5e107(%rip), %rsi # 0xfe881
movl $0x12, %edx
movq %rax, %rdi
callq 0x1ba10
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1be10
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be80
xorl %ebp, %ebp
movq 0x9a82c(%rip), %rsi # 0x13afe8
movq 0x9a795(%rip), %rdx # 0x13af58
movq %rbx, %rdi
callq 0x1bf90
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa07e9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
testb %bpl, %bpl
jne 0xa07f3
jmp 0xa0800
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b680
jmp 0xa0800
movq %rax, %r14
movq 0x9a769(%rip), %rsi # 0x13af70
leaq 0x28(%rsp), %rdi
callq 0x1b4b0
leaq 0x98(%rsp), %rdi
callq 0x1b2c0
movq %r14, %rdi
callq 0x1c020
|
_ZN5minja14ArgumentsValue10expectArgsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt4pairImmESC_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 1A0h
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov rcx, [rdi+8]
sub rcx, [rdi]
sar rcx, 4
mov rax, 0CCCCCCCCCCCCCCCDh
imul rax, rcx
cmp rax, [rdx]
jb short loc_A06CD
cmp rax, [r14+8]
ja short loc_A06CD
mov rcx, [rdi+20h]
sub rcx, [rdi+18h]
sar rcx, 4
mov rax, 6DB6DB6DB6DB6DB7h
imul rax, rcx
cmp rax, [rbx]
jb short loc_A06CD
cmp rax, [rbx+8]
ja short loc_A06CD
add rsp, 1A0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A06CD:
lea r12, [rsp+1C8h+var_1A0]
mov rdi, r12
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rsi, [r15]
mov rdx, [r15+8]
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 r15, rax
lea rsi, aMustHaveBetwee; " must have between "
mov edx, 13h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
mov rdi, r15
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r15, rax
lea rsi, aAnd; " and "
mov edx, 5
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14+8]
mov rdi, r15
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, aPositionalArgu; " positional arguments and between "
mov edx, 22h ; '"'
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rbx]
mov rdi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, aAnd; " and "
mov edx, 5
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rbx+8]
mov rdi, r14
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aKeywordArgumen; " keyword arguments"
mov edx, 12h
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, [rsp+1C8h+var_198]
lea rdi, [rsp+1C8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
lea rsi, [rsp+1C8h+var_1C0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+1C8h+var_1B0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A07E9
mov rsi, [rsp+1C8h+var_1B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A07E9:
test bpl, bpl
jnz short loc_A07F3
jmp short loc_A0800
mov r14, rax
loc_A07F3:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_A0800
mov r14, rax
loc_A0800:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1C8h+var_1A0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1C8h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, r14
call __Unwind_Resume
|
unsigned long long minja::ArgumentsValue::expectArgs(
_QWORD *a1,
_QWORD *a2,
unsigned long long *a3,
unsigned long long *a4)
{
unsigned long long v6; // rax
unsigned long long result; // rax
long long v8; // r15
long long v9; // r15
long long v10; // r14
long long v11; // r14
long long v12; // rax
void *exception; // rbx
_BYTE v14[16]; // [rsp+8h] [rbp-1C0h] BYREF
_BYTE v15[8]; // [rsp+28h] [rbp-1A0h] BYREF
_BYTE v16[104]; // [rsp+30h] [rbp-198h] BYREF
v6 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(a1[1] - *a1) >> 4);
if ( v6 < *a3
|| v6 > a3[1]
|| (result = 0x6DB6DB6DB6DB6DB7LL * ((long long)(a1[4] - a1[3]) >> 4), result < *a4)
|| result > a4[1] )
{
std::ostringstream::basic_ostringstream(v15);
v8 = std::__ostream_insert<char,std::char_traits<char>>(v15, *a2, a2[1]);
std::__ostream_insert<char,std::char_traits<char>>(v8, " must have between ", 19LL);
v9 = std::ostream::_M_insert<unsigned long>(v8, *a3);
std::__ostream_insert<char,std::char_traits<char>>(v9, " and ", 5LL);
v10 = std::ostream::_M_insert<unsigned long>(v9, a3[1]);
std::__ostream_insert<char,std::char_traits<char>>(v10, " positional arguments and between ", 34LL);
v11 = std::ostream::_M_insert<unsigned long>(v10, *a4);
std::__ostream_insert<char,std::char_traits<char>>(v11, " and ", 5LL);
v12 = std::ostream::_M_insert<unsigned long>(v11, a4[1]);
std::__ostream_insert<char,std::char_traits<char>>(v12, " keyword arguments", 18LL);
exception = __cxa_allocate_exception(0x10uLL);
std::stringbuf::str(v14, v16);
std::runtime_error::runtime_error(exception, v14);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return result;
}
|
expectArgs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1a0
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV RCX,qword ptr [RDI + 0x8]
SUB RCX,qword ptr [RDI]
SAR RCX,0x4
MOV RAX,-0x3333333333333333
IMUL RAX,RCX
CMP RAX,qword ptr [RDX]
JC 0x001a06cd
CMP RAX,qword ptr [R14 + 0x8]
JA 0x001a06cd
MOV RCX,qword ptr [RDI + 0x20]
SUB RCX,qword ptr [RDI + 0x18]
SAR RCX,0x4
MOV RAX,0x6db6db6db6db6db7
IMUL RAX,RCX
CMP RAX,qword ptr [RBX]
JC 0x001a06cd
CMP RAX,qword ptr [RBX + 0x8]
JA 0x001a06cd
ADD RSP,0x1a0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a06cd:
LEA R12,[RSP + 0x28]
MOV RDI,R12
CALL 0x0011bbd0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LAB_001a06e1:
MOV RDI,R12
CALL 0x0011ba10
MOV R15,RAX
LEA RSI,[0x1fe844]
MOV EDX,0x13
MOV RDI,RAX
CALL 0x0011ba10
MOV RSI,qword ptr [R14]
MOV RDI,R15
CALL 0x0011b600
MOV R15,RAX
LEA RSI,[0x1fe858]
MOV EDX,0x5
MOV RDI,RAX
CALL 0x0011ba10
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x0011b600
MOV R14,RAX
LEA RSI,[0x1fe85e]
MOV EDX,0x22
MOV RDI,RAX
CALL 0x0011ba10
MOV RSI,qword ptr [RBX]
MOV RDI,R14
CALL 0x0011b600
MOV R14,RAX
LEA RSI,[0x1fe858]
MOV EDX,0x5
MOV RDI,RAX
CALL 0x0011ba10
MOV RSI,qword ptr [RBX + 0x8]
MOV RDI,R14
CALL 0x0011b600
LEA RSI,[0x1fe881]
MOV EDX,0x12
MOV RDI,RAX
CALL 0x0011ba10
LAB_001a0787:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LEA RSI,[RSP + 0x30]
LAB_001a0799:
LEA RDI,[RSP + 0x8]
CALL 0x0011be10
MOV BPL,0x1
LAB_001a07a6:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011be80
XOR EBP,EBP
MOV RSI,qword ptr [0x0023afe8]
MOV RDX,qword ptr [0x0023af58]
MOV RDI,RBX
CALL 0x0011bf90
|
/* minja::ArgumentsValue::expectArgs(std::__cxx11::string const&, std::pair<unsigned long, unsigned
long> const&, std::pair<unsigned long, unsigned long> const&) */
void __thiscall
minja::ArgumentsValue::expectArgs(ArgumentsValue *this,string *param_1,pair *param_2,pair *param_3)
{
ulong uVar1;
ostream *poVar2;
runtime_error *this_00;
string local_1c0 [32];
ostringstream local_1a0 [376];
uVar1 = (*(long *)(this + 8) - *(long *)this >> 4) * -0x3333333333333333;
if ((((*(ulong *)param_2 <= uVar1) &&
(uVar1 < *(ulong *)(param_2 + 8) || uVar1 - *(ulong *)(param_2 + 8) == 0)) &&
(uVar1 = (*(long *)(this + 0x20) - *(long *)(this + 0x18) >> 4) * 0x6db6db6db6db6db7,
*(ulong *)param_3 <= uVar1)) &&
(uVar1 < *(ulong *)(param_3 + 8) || uVar1 - *(ulong *)(param_3 + 8) == 0)) {
return;
}
std::__cxx11::ostringstream::ostringstream(local_1a0);
/* try { // try from 001a06e1 to 001a0786 has its CatchHandler @ 001a07fd */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a0,*(char **)param_1,*(long *)(param_1 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2," must have between ",0x13);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," and ",5);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>
(poVar2," positional arguments and between ",0x22);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," and ",5);
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," keyword arguments",0x12);
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a0799 to 001a07a2 has its CatchHandler @ 001a07f0 */
std::__cxx11::stringbuf::str();
/* try { // try from 001a07a6 to 001a07ca has its CatchHandler @ 001a07cb */
std::runtime_error::runtime_error(this_00,local_1c0);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0023afe8,PTR__runtime_error_0023af58);
}
|
|
65,109 |
net_field_length_ll
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static unsigned long long
net_field_length_ll(uchar **packet)
{
reg1 uchar *pos= *packet;
if (*pos < 251)
{
(*packet)++;
return (unsigned long long) *pos;
}
if (*pos == 251)
{
(*packet)++;
return (unsigned long long) NULL_LENGTH;
}
if (*pos == 252)
{
(*packet)+=3;
return (unsigned long long) uint2korr(pos+1);
}
if (*pos == 253)
{
(*packet)+=4;
return (unsigned long long) uint3korr(pos+1);
}
(*packet)+=9; /* Must be 254 when here */
#ifdef NO_CLIENT_LONGLONG
return (unsigned long long) uint4korr(pos+1);
#else
return (unsigned long long) uint8korr(pos+1);
#endif
}
|
O0
|
c
|
net_field_length_ll:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfb, %eax
jge 0x249af
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0x24adc
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfb, %eax
jne 0x249d8
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x24adc
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfc, %eax
jne 0x24a1b
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x3, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %eax
movq %rax, -0x8(%rbp)
jmp 0x24adc
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfd, %eax
jne 0x24a61
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0x24adc
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x9, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shll $0x18, %ecx
addl %ecx, %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
movq -0x18(%rbp), %rdx
movzbl 0x6(%rdx), %edx
shll $0x8, %edx
addl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x7(%rdx), %edx
shll $0x10, %edx
addl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x8(%rdx), %edx
shll $0x18, %edx
addl %edx, %ecx
movl %ecx, %ecx
shlq $0x20, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
net_field_length_ll:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FBh
jge short loc_249AF
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov [rbp+var_8], rax
jmp loc_24ADC
loc_249AF:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FBh
jnz short loc_249D8
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_24ADC
loc_249D8:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FCh
jnz short loc_24A1B
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 3
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx eax, ax
mov [rbp+var_8], rax
jmp loc_24ADC
loc_24A1B:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FDh
jnz short loc_24A61
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
shl ecx, 10h
add eax, ecx
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_24ADC
loc_24A61:
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 9
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+4]
shl ecx, 18h
add eax, ecx
mov eax, eax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+5]
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+6]
shl edx, 8
add ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+7]
shl edx, 10h
add ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+8]
shl edx, 18h
add ecx, edx
mov ecx, ecx
shl rcx, 20h
add rax, rcx
mov [rbp+var_8], rax
loc_24ADC:
mov rax, [rbp+var_8]
pop rbp
retn
|
unsigned long long net_field_length_ll(unsigned __int8 **a1)
{
unsigned __int8 *v3; // [rsp+0h] [rbp-18h]
v3 = *a1;
if ( **a1 >= 0xFBu )
{
switch ( *v3 )
{
case 0xFBu:
++*a1;
return -1LL;
case 0xFCu:
*a1 += 3;
return (unsigned __int16)((v3[2] << 8) + v3[1]);
case 0xFDu:
*a1 += 4;
return (v3[3] << 16) + (v3[2] << 8) + (unsigned int)v3[1];
default:
*a1 += 9;
return ((unsigned long long)((v3[8] << 24) + (v3[7] << 16) + (v3[6] << 8) + (unsigned int)v3[5]) << 32)
+ (v3[4] << 24)
+ (v3[3] << 16)
+ (v3[2] << 8)
+ (unsigned int)v3[1];
}
}
else
{
++*a1;
return *v3;
}
}
|
net_field_length_ll:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfb
JGE 0x001249af
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00124adc
LAB_001249af:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfb
JNZ 0x001249d8
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00124adc
LAB_001249d8:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfc
JNZ 0x00124a1b
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x3
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX EAX,AX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00124adc
LAB_00124a1b:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfd
JNZ 0x00124a61
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x10
ADD EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00124adc
LAB_00124a61:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x9
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x4]
SHL ECX,0x18
ADD EAX,ECX
MOV EAX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x5]
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x6]
SHL EDX,0x8
ADD ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x7]
SHL EDX,0x10
ADD ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x8]
SHL EDX,0x18
ADD ECX,EDX
MOV ECX,ECX
SHL RCX,0x20
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_00124adc:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong net_field_length_ll(long *param_1)
{
byte *pbVar1;
ulong local_10;
pbVar1 = (byte *)*param_1;
if (*pbVar1 < 0xfb) {
*param_1 = *param_1 + 1;
local_10 = (ulong)*pbVar1;
}
else if (*pbVar1 == 0xfb) {
*param_1 = *param_1 + 1;
local_10 = 0xffffffffffffffff;
}
else if (*pbVar1 == 0xfc) {
*param_1 = *param_1 + 3;
local_10 = (ulong)((uint)pbVar1[1] + (uint)pbVar1[2] * 0x100 & 0xffff);
}
else if (*pbVar1 == 0xfd) {
*param_1 = *param_1 + 4;
local_10 = (ulong)((uint)pbVar1[1] + (uint)pbVar1[2] * 0x100 + (uint)pbVar1[3] * 0x10000);
}
else {
*param_1 = *param_1 + 9;
local_10 = CONCAT44((uint)pbVar1[5] + (uint)pbVar1[6] * 0x100 + (uint)pbVar1[7] * 0x10000 +
(uint)pbVar1[8] * 0x1000000,
(uint)pbVar1[1] + (uint)pbVar1[2] * 0x100 + (uint)pbVar1[3] * 0x10000 +
(uint)pbVar1[4] * 0x1000000);
}
return local_10;
}
|
|
65,110 |
BranchPredictor::update(unsigned int, bool)
|
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/BranchPredictor.cpp
|
void BranchPredictor::update(uint32_t pc, bool branch) {
int id = pc % PRED_BUF_SIZE;
PredictorState state = this->predbuf[id];
if (branch) {
if (state == STRONG_NOT_TAKEN) {
this->predbuf[id] = WEAK_NOT_TAKEN;
} else if (state == WEAK_NOT_TAKEN) {
this->predbuf[id] = WEAK_TAKEN;
} else if (state == WEAK_TAKEN) {
this->predbuf[id] = STRONG_TAKEN;
} // do nothing if STRONG_TAKEN
} else { // not branch
if (state == STRONG_TAKEN) {
this->predbuf[id] = WEAK_TAKEN;
} else if (state == WEAK_TAKEN) {
this->predbuf[id] = WEAK_NOT_TAKEN;
} else if (state == WEAK_NOT_TAKEN) {
this->predbuf[id] = STRONG_NOT_TAKEN;
} // do noting if STRONG_NOT_TAKEN
}
}
|
O2
|
cpp
|
BranchPredictor::update(unsigned int, bool):
andl $0xfff, %esi # imm = 0xFFF
movl 0x4(%rdi,%rsi,4), %eax
testl %edx, %edx
je 0x131d0
decl %eax
cmpl $0x3, %eax
jb 0x131d7
retq
cmpl $0x2, %eax
ja 0x131cf
incl %eax
movl %eax, 0x4(%rdi,%rsi,4)
retq
|
_ZN15BranchPredictor6updateEjb:
and esi, 0FFFh
mov eax, [rdi+rsi*4+4]
test edx, edx
jz short loc_131D0
dec eax
cmp eax, 3
jb short loc_131D7
locret_131CF:
retn
loc_131D0:
cmp eax, 2
ja short locret_131CF
inc eax
loc_131D7:
mov [rdi+rsi*4+4], eax
retn
|
long long BranchPredictor::update(BranchPredictor *this, __int16 a2, int a3)
{
long long v3; // rsi
long long result; // rax
v3 = a2 & 0xFFF;
result = *((unsigned int *)this + v3 + 1);
if ( a3 )
{
result = (unsigned int)(result - 1);
if ( (unsigned int)result >= 3 )
return result;
LABEL_6:
*((_DWORD *)this + v3 + 1) = result;
return result;
}
if ( (unsigned int)result <= 2 )
{
result = (unsigned int)(result + 1);
goto LABEL_6;
}
return result;
}
|
update:
AND ESI,0xfff
MOV EAX,dword ptr [RDI + RSI*0x4 + 0x4]
TEST EDX,EDX
JZ 0x001131d0
DEC EAX
CMP EAX,0x3
JC 0x001131d7
LAB_001131cf:
RET
LAB_001131d0:
CMP EAX,0x2
JA 0x001131cf
INC EAX
LAB_001131d7:
MOV dword ptr [RDI + RSI*0x4 + 0x4],EAX
RET
|
/* BranchPredictor::update(unsigned int, bool) */
void __thiscall BranchPredictor::update(BranchPredictor *this,uint param_1,bool param_2)
{
uint uVar1;
int3 in_register_00000011;
uVar1 = *(uint *)(this + (ulong)(param_1 & 0xfff) * 4 + 4);
if (CONCAT31(in_register_00000011,param_2) == 0) {
if (uVar1 < 3) {
uVar1 = uVar1 + 1;
goto LAB_001131d7;
}
}
else {
uVar1 = uVar1 - 1;
if (uVar1 < 3) {
LAB_001131d7:
*(uint *)(this + (ulong)(param_1 & 0xfff) * 4 + 4) = uVar1;
return;
}
}
return;
}
|
|
65,111 |
BranchPredictor::update(unsigned int, bool)
|
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/BranchPredictor.cpp
|
void BranchPredictor::update(uint32_t pc, bool branch) {
int id = pc % PRED_BUF_SIZE;
PredictorState state = this->predbuf[id];
if (branch) {
if (state == STRONG_NOT_TAKEN) {
this->predbuf[id] = WEAK_NOT_TAKEN;
} else if (state == WEAK_NOT_TAKEN) {
this->predbuf[id] = WEAK_TAKEN;
} else if (state == WEAK_TAKEN) {
this->predbuf[id] = STRONG_TAKEN;
} // do nothing if STRONG_TAKEN
} else { // not branch
if (state == STRONG_TAKEN) {
this->predbuf[id] = WEAK_TAKEN;
} else if (state == WEAK_TAKEN) {
this->predbuf[id] = WEAK_NOT_TAKEN;
} else if (state == WEAK_NOT_TAKEN) {
this->predbuf[id] = STRONG_NOT_TAKEN;
} // do noting if STRONG_NOT_TAKEN
}
}
|
O3
|
cpp
|
BranchPredictor::update(unsigned int, bool):
andl $0xfff, %esi # imm = 0xFFF
movl 0x4(%rdi,%rsi,4), %eax
testl %edx, %edx
je 0x132ac
decl %eax
cmpl $0x3, %eax
jb 0x132b3
retq
cmpl $0x2, %eax
ja 0x132ab
incl %eax
movl %eax, 0x4(%rdi,%rsi,4)
retq
|
_ZN15BranchPredictor6updateEjb:
and esi, 0FFFh
mov eax, [rdi+rsi*4+4]
test edx, edx
jz short loc_132AC
dec eax
cmp eax, 3
jb short loc_132B3
locret_132AB:
retn
loc_132AC:
cmp eax, 2
ja short locret_132AB
inc eax
loc_132B3:
mov [rdi+rsi*4+4], eax
retn
|
long long BranchPredictor::update(BranchPredictor *this, __int16 a2, int a3)
{
long long v3; // rsi
long long result; // rax
v3 = a2 & 0xFFF;
result = *((unsigned int *)this + v3 + 1);
if ( a3 )
{
result = (unsigned int)(result - 1);
if ( (unsigned int)result >= 3 )
return result;
LABEL_6:
*((_DWORD *)this + v3 + 1) = result;
return result;
}
if ( (unsigned int)result <= 2 )
{
result = (unsigned int)(result + 1);
goto LABEL_6;
}
return result;
}
|
update:
AND ESI,0xfff
MOV EAX,dword ptr [RDI + RSI*0x4 + 0x4]
TEST EDX,EDX
JZ 0x001132ac
DEC EAX
CMP EAX,0x3
JC 0x001132b3
LAB_001132ab:
RET
LAB_001132ac:
CMP EAX,0x2
JA 0x001132ab
INC EAX
LAB_001132b3:
MOV dword ptr [RDI + RSI*0x4 + 0x4],EAX
RET
|
/* BranchPredictor::update(unsigned int, bool) */
void __thiscall BranchPredictor::update(BranchPredictor *this,uint param_1,bool param_2)
{
uint uVar1;
int3 in_register_00000011;
uVar1 = *(uint *)(this + (ulong)(param_1 & 0xfff) * 4 + 4);
if (CONCAT31(in_register_00000011,param_2) == 0) {
if (uVar1 < 3) {
uVar1 = uVar1 + 1;
goto LAB_001132b3;
}
}
else {
uVar1 = uVar1 - 1;
if (uVar1 < 3) {
LAB_001132b3:
*(uint *)(this + (ulong)(param_1 & 0xfff) * 4 + 4) = uVar1;
return;
}
}
return;
}
|
|
65,112 |
host_set_storage
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c
|
static evmone_storage_status host_set_storage(void* context, const evmc_address* addr, const evmc_bytes32* key, const evmc_bytes32* value) {
evmone_context_t* ctx = (evmone_context_t*) context;
debug_print_address("set_storage for account", addr);
debug_print_bytes32("set_storage key", key);
debug_print_bytes32("set_storage value", value);
evmc_bytes32 current_value = host_get_storage(context, addr, key);
bool created_account = false;
bool created_storage = false;
if (memcmp(current_value.bytes, value->bytes, 32) == 0) {
EVM_LOG("set_storage: UNCHANGED");
return EVMONE_STORAGE_UNCHANGED;
}
set_changed_storage(ctx, addr->bytes, key->bytes, value->bytes, &created_account, &created_storage);
if (created_account) {
EVM_LOG("set_storage: ADDED (created account)");
return EVMONE_STORAGE_ADDED;
}
if (bytes_all_zero(bytes(value->bytes, 32))) {
EVM_LOG("set_storage: DELETED");
return EVMONE_STORAGE_DELETED;
}
if (!created_storage) {
EVM_LOG("set_storage: MODIFIED_AGAIN");
return EVMONE_STORAGE_MODIFIED_AGAIN;
}
if (created_storage && bytes_all_zero(bytes(current_value.bytes, 32))) {
EVM_LOG("set_storage: ADDED (created storage)");
return EVMONE_STORAGE_ADDED;
}
EVM_LOG("set_storage: MODIFIED");
return EVMONE_STORAGE_MODIFIED;
}
|
O3
|
c
|
host_set_storage:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x277fc
xorl %eax, %eax
movb %al, 0xf(%rsp)
movb %al, 0xe(%rsp)
movdqu (%r13), %xmm0
movdqu 0x10(%r13), %xmm1
movdqu (%rbx), %xmm2
pcmpeqb %xmm0, %xmm2
movdqu 0x10(%rbx), %xmm0
pcmpeqb %xmm1, %xmm0
pand %xmm2, %xmm0
pmovmskb %xmm0, %ecx
cmpl $0xffff, %ecx # imm = 0xFFFF
je 0x27a7b
leaq 0xf(%rsp), %r13
leaq 0xe(%rsp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r13, %r8
callq 0x27eb4
movl $0x3, %eax
cmpb $0x0, (%r13)
jne 0x27a7b
movl $0x20, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x51165
movl %eax, %ecx
movl $0x4, %eax
testb %cl, %cl
jne 0x27a7b
movl $0x2, %eax
cmpb $0x1, 0xe(%rsp)
jne 0x27a7b
leaq 0x10(%rsp), %rsi
movl $0x20, %edi
xorl %edx, %edx
callq 0x51165
movzbl %al, %eax
leal 0x1(,%rax,2), %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
host_set_storage:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
lea r13, [rsp+58h+var_48]
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
call host_get_storage
xor eax, eax
mov [rsp+58h+var_49], al
mov [rsp+58h+var_4A], al
movdqu xmm0, xmmword ptr [r13+0]
movdqu xmm1, xmmword ptr [r13+10h]
movdqu xmm2, xmmword ptr [rbx]
pcmpeqb xmm2, xmm0
movdqu xmm0, xmmword ptr [rbx+10h]
pcmpeqb xmm0, xmm1
pand xmm0, xmm2
pmovmskb ecx, xmm0
cmp ecx, 0FFFFh
jz short loc_27A7B
lea r13, [rsp+58h+var_49]
lea r9, [rsp+58h+var_4A]
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov rcx, rbx
mov r8, r13
call set_changed_storage
mov eax, 3
cmp byte ptr [r13+0], 0
jnz short loc_27A7B
mov edi, 20h ; ' '
mov rsi, rbx
xor edx, edx
call bytes_all_equal
mov ecx, eax
mov eax, 4
test cl, cl
jnz short loc_27A7B
mov eax, 2
cmp [rsp+58h+var_4A], 1
jnz short loc_27A7B
lea rsi, [rsp+58h+var_48]
mov edi, 20h ; ' '
xor edx, edx
call bytes_all_equal
movzx eax, al
lea eax, ds:1[rax*2]
loc_27A7B:
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long host_set_storage(const __m128i *a1, const __m128i *a2, const __m128i *a3, const __m128i *a4)
{
long long result; // rax
char v7; // cl
char v8; // [rsp+Eh] [rbp-4Ah] BYREF
char v9; // [rsp+Fh] [rbp-49h] BYREF
__m128i v10; // [rsp+10h] [rbp-48h] BYREF
__m128i v11[3]; // [rsp+20h] [rbp-38h] BYREF
host_get_storage(&v10, a1, a2, a3);
result = 0LL;
v9 = 0;
v8 = 0;
if ( _mm_movemask_epi8(
_mm_and_si128(
_mm_cmpeq_epi8(_mm_loadu_si128(a4 + 1), _mm_loadu_si128(v11)),
_mm_cmpeq_epi8(_mm_loadu_si128(a4), _mm_loadu_si128(&v10)))) != 0xFFFF )
{
set_changed_storage(a1, a2, a3, a4, &v9, &v8);
result = 3LL;
if ( !v9 )
{
v7 = bytes_all_equal(32LL, a4, 0LL);
result = 4LL;
if ( !v7 )
{
result = 2LL;
if ( v8 == 1 )
return 2 * (unsigned int)(unsigned __int8)bytes_all_equal(32LL, &v10, 0LL) + 1;
}
}
}
return result;
}
|
host_set_storage:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
LEA R13,[RSP + 0x10]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
CALL 0x001277fc
XOR EAX,EAX
MOV byte ptr [RSP + 0xf],AL
MOV byte ptr [RSP + 0xe],AL
MOVDQU XMM0,xmmword ptr [R13]
MOVDQU XMM1,xmmword ptr [R13 + 0x10]
MOVDQU XMM2,xmmword ptr [RBX]
PCMPEQB XMM2,XMM0
MOVDQU XMM0,xmmword ptr [RBX + 0x10]
PCMPEQB XMM0,XMM1
PAND XMM0,XMM2
PMOVMSKB ECX,XMM0
CMP ECX,0xffff
JZ 0x00127a7b
LEA R13,[RSP + 0xf]
LEA R9,[RSP + 0xe]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
MOV R8,R13
CALL 0x00127eb4
MOV EAX,0x3
CMP byte ptr [R13],0x0
JNZ 0x00127a7b
MOV EDI,0x20
MOV RSI,RBX
XOR EDX,EDX
CALL 0x00151165
MOV ECX,EAX
MOV EAX,0x4
TEST CL,CL
JNZ 0x00127a7b
MOV EAX,0x2
CMP byte ptr [RSP + 0xe],0x1
JNZ 0x00127a7b
LEA RSI,[RSP + 0x10]
MOV EDI,0x20
XOR EDX,EDX
CALL 0x00151165
MOVZX EAX,AL
LEA EAX,[0x1 + RAX*0x2]
LAB_00127a7b:
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int host_set_storage(int8 param_1,int8 param_2,int8 param_3,char *param_4)
{
char cVar1;
byte bVar2;
int iVar3;
int1 auVar4 [16];
int1 auVar5 [16];
char local_4a;
char local_49;
char local_48;
char cStack_47;
char cStack_46;
char cStack_45;
char cStack_44;
char cStack_43;
char cStack_42;
char cStack_41;
char cStack_40;
char cStack_3f;
char cStack_3e;
char cStack_3d;
char cStack_3c;
char cStack_3b;
char cStack_3a;
char cStack_39;
int1 local_38 [16];
host_get_storage(&local_48,param_1,param_2,param_3);
iVar3 = 0;
local_49 = '\0';
local_4a = '\0';
auVar5[0] = -(*param_4 == local_48);
auVar5[1] = -(param_4[1] == cStack_47);
auVar5[2] = -(param_4[2] == cStack_46);
auVar5[3] = -(param_4[3] == cStack_45);
auVar5[4] = -(param_4[4] == cStack_44);
auVar5[5] = -(param_4[5] == cStack_43);
auVar5[6] = -(param_4[6] == cStack_42);
auVar5[7] = -(param_4[7] == cStack_41);
auVar5[8] = -(param_4[8] == cStack_40);
auVar5[9] = -(param_4[9] == cStack_3f);
auVar5[10] = -(param_4[10] == cStack_3e);
auVar5[0xb] = -(param_4[0xb] == cStack_3d);
auVar5[0xc] = -(param_4[0xc] == cStack_3c);
auVar5[0xd] = -(param_4[0xd] == cStack_3b);
auVar5[0xe] = -(param_4[0xe] == cStack_3a);
auVar5[0xf] = -(param_4[0xf] == cStack_39);
auVar4[0] = -(param_4[0x10] == local_38[0]);
auVar4[1] = -(param_4[0x11] == local_38[1]);
auVar4[2] = -(param_4[0x12] == local_38[2]);
auVar4[3] = -(param_4[0x13] == local_38[3]);
auVar4[4] = -(param_4[0x14] == local_38[4]);
auVar4[5] = -(param_4[0x15] == local_38[5]);
auVar4[6] = -(param_4[0x16] == local_38[6]);
auVar4[7] = -(param_4[0x17] == local_38[7]);
auVar4[8] = -(param_4[0x18] == local_38[8]);
auVar4[9] = -(param_4[0x19] == local_38[9]);
auVar4[10] = -(param_4[0x1a] == local_38[10]);
auVar4[0xb] = -(param_4[0x1b] == local_38[0xb]);
auVar4[0xc] = -(param_4[0x1c] == local_38[0xc]);
auVar4[0xd] = -(param_4[0x1d] == local_38[0xd]);
auVar4[0xe] = -(param_4[0x1e] == local_38[0xe]);
auVar4[0xf] = -(param_4[0x1f] == local_38[0xf]);
auVar4 = auVar4 & auVar5;
if ((ushort)((ushort)(SUB161(auVar4 >> 7,0) & 1) | (ushort)(SUB161(auVar4 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar4 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar4 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar4 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar4 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar4 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar4 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar4 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar4 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar4 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar4 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar4 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar4 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar4 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar4[0xf] >> 7) << 0xf) != 0xffff) {
set_changed_storage(param_1,param_2,param_3,param_4,&local_49,&local_4a);
iVar3 = 3;
if (local_49 == '\0') {
cVar1 = bytes_all_equal(0x20,param_4,0);
iVar3 = 4;
if ((cVar1 == '\0') && (iVar3 = 2, local_4a == '\x01')) {
bVar2 = bytes_all_equal(0x20,&local_48,0);
iVar3 = (uint)bVar2 * 2 + 1;
}
}
}
return iVar3;
}
|
|
65,113 |
minja::Value::at(unsigned long)
|
monkey531[P]llama/common/./minja.hpp
|
Value& at(size_t index) {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_array()) return array_->at(index);
if (is_object()) return object_->at(index);
throw std::runtime_error("Value is not an array or object: " + dump());
}
|
O2
|
cpp
|
minja::Value::at(unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
callq 0x3c0b0
testb %al, %al
jne 0x4bd6d
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x4bd51
movq %rbx, %rsi
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4bf72
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x4bd9d
leaq 0x8(%rsp), %rsi
callq 0x4bf90
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %rbx
leaq 0x4e482(%rip), %rsi # 0x9a201
movq %rax, %rdi
callq 0x20280
movq 0x9625a(%rip), %rsi # 0xe1fe8
movq 0x961db(%rip), %rdx # 0xe1f70
movq %rbx, %rdi
callq 0x20b30
pushq $0x10
popq %rdi
callq 0x20390
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x3b614
leaq 0x52591(%rip), %rsi # 0x9e352
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x30398
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x20aa0
xorl %ebp, %ebp
movq 0x961ff(%rip), %rsi # 0xe1fe8
movq 0x96180(%rip), %rdx # 0xe1f70
movq %rbx, %rdi
callq 0x20b30
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x20d78
jmp 0x4be0d
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x20d78
testb %bpl, %bpl
jne 0x4be23
jmp 0x4be2b
jmp 0x4be20
movq %rax, %r14
movq %rbx, %rdi
callq 0x20520
movq %r14, %rdi
callq 0x20b90
nop
|
_ZN5minja5Value2atEm:
push rbp
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r14, rdi
mov [rsp+68h+var_60], rsi
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jnz short loc_4BD6D
mov rdi, [r14+10h]
test rdi, rdi
jz short loc_4BD51
mov rsi, rbx
add rsp, 50h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong)
loc_4BD51:
mov rdi, [r14+20h]
test rdi, rdi
jz short loc_4BD9D
lea rsi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_4BD6D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_4BD9D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_58]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4BE0D
mov r14, rax
mov bpl, 1
loc_4BE0D:
lea rdi, [rsp+68h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_4BE23
jmp short loc_4BE2B
jmp short $+2
loc_4BE20:
mov r14, rax
loc_4BE23:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_4BE2B:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::at(minja::Value *this, long long a2)
{
long long v3; // rdi
long long v5; // rdi
std::runtime_error *exception; // rbx
void *v7; // rbx
long long v8; // [rsp+8h] [rbp-60h] BYREF
_BYTE v9[32]; // [rsp+10h] [rbp-58h] BYREF
_BYTE v10[56]; // [rsp+30h] [rbp-38h] BYREF
v8 = a2;
if ( minja::Value::is_null(this) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = *((_QWORD *)this + 2);
if ( v3 )
return std::vector<minja::Value>::at(v3, a2);
v5 = *((_QWORD *)this + 4);
if ( !v5 )
{
v7 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Value is not an array or object: ", (long long)v9);
std::runtime_error::runtime_error(v7, v10);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
v5,
&v8);
}
|
at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
CALL 0x0013c0b0
TEST AL,AL
JNZ 0x0014bd6d
MOV RDI,qword ptr [R14 + 0x10]
TEST RDI,RDI
JZ 0x0014bd51
MOV RSI,RBX
ADD RSP,0x50
POP RBX
POP R14
POP RBP
JMP 0x0014bf72
LAB_0014bd51:
MOV RDI,qword ptr [R14 + 0x20]
TEST RDI,RDI
JZ 0x0014bd9d
LEA RSI,[RSP + 0x8]
CALL 0x0014bf90
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_0014bd6d:
PUSH 0x10
POP RDI
CALL 0x00120390
MOV RBX,RAX
LAB_0014bd78:
LEA RSI,[0x19a201]
MOV RDI,RAX
CALL 0x00120280
LAB_0014bd87:
MOV RSI,qword ptr [0x001e1fe8]
MOV RDX,qword ptr [0x001e1f70]
MOV RDI,RBX
CALL 0x00120b30
LAB_0014bd9d:
PUSH 0x10
POP RDI
CALL 0x00120390
MOV RBX,RAX
LAB_0014bda8:
LEA RDI,[RSP + 0x10]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0013b614
LAB_0014bdba:
LEA RSI,[0x19e352]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x00130398
MOV BPL,0x1
LAB_0014bdd3:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00120aa0
XOR EBP,EBP
MOV RSI,qword ptr [0x001e1fe8]
MOV RDX,qword ptr [0x001e1f70]
MOV RDI,RBX
CALL 0x00120b30
|
/* minja::Value::at(unsigned long) */
void __thiscall minja::Value::at(Value *this,ulong param_1)
{
char cVar1;
runtime_error *prVar2;
ulong local_60;
int1 local_58 [32];
string local_38 [32];
local_60 = param_1;
cVar1 = is_null(this);
if (cVar1 != '\0') {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0014bd78 to 0014bd86 has its CatchHandler @ 0014be20 */
std::runtime_error::runtime_error(prVar2,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70);
}
if (*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10) !=
(vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::at
(*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10),param_1);
return;
}
if (*(long *)(this + 0x20) != 0) {
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(*(long *)(this + 0x20),&local_60);
return;
}
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0014bda8 to 0014bdb9 has its CatchHandler @ 0014be1e */
dump_abi_cxx11_((int)local_58,SUB81(this,0));
/* try { // try from 0014bdba to 0014bdcf has its CatchHandler @ 0014be07 */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 0014bdd3 to 0014bdf7 has its CatchHandler @ 0014bdf8 */
std::runtime_error::runtime_error(prVar2,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001e1fe8,PTR__runtime_error_001e1f70);
}
|
|
65,114 |
translog_max_lsn_to_header
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_max_lsn_to_header(File file, LSN lsn)
{
uchar lsn_buff[LSN_STORE_SIZE];
my_bool rc;
DBUG_ENTER("translog_max_lsn_to_header");
DBUG_PRINT("enter", ("File descriptor: %ld "
"lsn: " LSN_FMT,
(long) file,
LSN_IN_PARTS(lsn)));
lsn_store(lsn_buff, lsn);
rc= (my_pwrite(file, lsn_buff,
LSN_STORE_SIZE,
(LOG_HEADER_DATA_SIZE - LSN_STORE_SIZE),
log_write_flags) != 0 ||
mysql_file_sync(file, MYF(MY_WME)) != 0);
/*
We should not increase counter in case of error above, but it is so
unlikely that we can ignore this case
*/
translog_syncs++;
DBUG_RETURN(rc);
}
|
O0
|
c
|
translog_max_lsn_to_header:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x14(%rbp)
movq %rsi, -0x20(%rbp)
jmp 0x52f2e
jmp 0x52f30
jmp 0x52f32
movq -0x20(%rbp), %rax
sarq $0x20, %rax
movb %al, -0xf(%rbp)
movq -0x20(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, -0xe(%rbp)
movq -0x20(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, -0xd(%rbp)
jmp 0x52f5b
leaq -0xf(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x30(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x52f7f
movl -0x14(%rbp), %edi
leaq -0xf(%rbp), %rsi
movl $0x7, %edx
movl $0x25, %ecx
movl $0x34, %r8d
callq 0xf3dc0
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x31(%rbp)
jne 0x52fcb
movl -0x14(%rbp), %edx
leaq 0xfdb45(%rip), %rdi # 0x150af8
movl $0x4a9, %esi # imm = 0x4A9
movl $0x10, %ecx
callq 0x52990
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x21(%rbp)
movq 0x423b5b(%rip), %rax # 0x476b38
addq $0x1, %rax
movq %rax, 0x423b50(%rip) # 0x476b38
movb -0x21(%rbp), %al
movb %al, -0x32(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x53009
movb -0x32(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
callq 0x2a260
nop
|
translog_max_lsn_to_header:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_14], edi
mov [rbp+var_20], rsi
jmp short $+2
loc_52F2E:
jmp short $+2
loc_52F30:
jmp short $+2
loc_52F32:
mov rax, [rbp+var_20]
sar rax, 20h
mov [rbp+var_F], al
mov rax, [rbp+var_20]
sar rax, 20h
shr eax, 8
mov [rbp+var_E], al
mov rax, [rbp+var_20]
sar rax, 20h
shr eax, 10h
mov [rbp+var_D], al
jmp short $+2
loc_52F5B:
lea rax, [rbp+var_F]
add rax, 3
mov [rbp+var_30], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_20]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax], ecx
jmp short $+2
loc_52F7F:
mov edi, [rbp+var_14]
lea rsi, [rbp+var_F]
mov edx, 7
mov ecx, 25h ; '%'
mov r8d, 34h ; '4'
call my_pwrite
mov rcx, rax
mov al, 1
cmp rcx, 0
mov [rbp+var_31], al
jnz short loc_52FCB
mov edx, [rbp+var_14]
lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4A9h
mov ecx, 10h
call inline_mysql_file_sync_3
cmp eax, 0
setnz al
mov [rbp+var_31], al
loc_52FCB:
mov al, [rbp+var_31]
and al, 1
movzx eax, al
mov [rbp+var_21], al
mov rax, cs:translog_syncs
add rax, 1
mov cs:translog_syncs, rax
mov al, [rbp+var_21]
mov [rbp+var_32], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_53009
mov al, [rbp+var_32]
add rsp, 40h
pop rbp
retn
loc_53009:
call ___stack_chk_fail
|
bool translog_max_lsn_to_header(unsigned int a1, long long a2)
{
bool v3; // [rsp+Fh] [rbp-31h]
__int16 v4; // [rsp+31h] [rbp-Fh] BYREF
char v5; // [rsp+33h] [rbp-Dh]
int v6; // [rsp+34h] [rbp-Ch]
unsigned long long v7; // [rsp+38h] [rbp-8h]
v7 = __readfsqword(0x28u);
v4 = WORD2(a2);
v5 = BYTE6(a2);
v6 = a2;
v3 = 1;
if ( !my_pwrite(a1, &v4, 7LL, 37LL, 52LL) )
v3 = (unsigned int)inline_mysql_file_sync_3(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x4A9u,
a1,
16LL) != 0;
++translog_syncs;
return v3;
}
|
translog_max_lsn_to_header:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x14],EDI
MOV qword ptr [RBP + -0x20],RSI
JMP 0x00152f2e
LAB_00152f2e:
JMP 0x00152f30
LAB_00152f30:
JMP 0x00152f32
LAB_00152f32:
MOV RAX,qword ptr [RBP + -0x20]
SAR RAX,0x20
MOV byte ptr [RBP + -0xf],AL
MOV RAX,qword ptr [RBP + -0x20]
SAR RAX,0x20
SHR EAX,0x8
MOV byte ptr [RBP + -0xe],AL
MOV RAX,qword ptr [RBP + -0x20]
SAR RAX,0x20
SHR EAX,0x10
MOV byte ptr [RBP + -0xd],AL
JMP 0x00152f5b
LAB_00152f5b:
LEA RAX,[RBP + -0xf]
ADD RAX,0x3
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x20]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
JMP 0x00152f7f
LAB_00152f7f:
MOV EDI,dword ptr [RBP + -0x14]
LEA RSI,[RBP + -0xf]
MOV EDX,0x7
MOV ECX,0x25
MOV R8D,0x34
CALL 0x001f3dc0
MOV RCX,RAX
MOV AL,0x1
CMP RCX,0x0
MOV byte ptr [RBP + -0x31],AL
JNZ 0x00152fcb
MOV EDX,dword ptr [RBP + -0x14]
LEA RDI,[0x250af8]
MOV ESI,0x4a9
MOV ECX,0x10
CALL 0x00152990
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_00152fcb:
MOV AL,byte ptr [RBP + -0x31]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [0x00576b38]
ADD RAX,0x1
MOV qword ptr [0x00576b38],RAX
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0x32],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00153009
MOV AL,byte ptr [RBP + -0x32]
ADD RSP,0x40
POP RBP
RET
LAB_00153009:
CALL 0x0012a260
|
int8 translog_max_lsn_to_header(int4 param_1,int8 param_2)
{
int iVar1;
long lVar2;
long in_FS_OFFSET;
bool local_39;
int1 local_17;
int1 local_16;
int1 local_15;
int4 local_14;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_17 = (int1)((ulong)param_2 >> 0x20);
local_16 = (int1)((ulong)param_2 >> 0x28);
local_15 = (int1)((ulong)param_2 >> 0x30);
local_14 = (int4)param_2;
lVar2 = my_pwrite(param_1,&local_17,7,0x25,0x34);
local_39 = true;
if (lVar2 == 0) {
iVar1 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x4a9,param_1,0x10);
local_39 = iVar1 != 0;
}
translog_syncs = translog_syncs + 1;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_39);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
65,115 |
u32toa_radix
|
bluesky950520[P]quickjs/cutils.c
|
size_t u32toa_radix(char buf[minimum_length(33)], uint32_t n, unsigned base)
{
int shift;
#ifdef USE_SPECIAL_RADIX_10
if (likely(base == 10))
return u32toa(buf, n);
#endif
if (n < base) {
buf[0] = digits36[n];
buf[1] = '\0';
return 1;
}
shift = radix_shift[base & 63];
if (shift) {
uint32_t mask = (1 << shift) - 1;
size_t len = (32 - clz32(n) + shift - 1) / shift;
size_t last = n & mask;
char *end = buf + len;
n >>= shift;
*end-- = '\0';
*end-- = digits36[last];
while (n >= base) {
size_t quo = n & mask;
n >>= shift;
*end-- = digits36[quo];
}
*end = digits36[n];
return len;
} else {
size_t len = 2;
size_t last = n % base;
n /= base;
uint32_t nbase = base;
while (n >= nbase) {
nbase *= base;
len++;
}
char *end = buf + len;
*end-- = '\0';
*end-- = digits36[last];
while (n >= base) {
size_t quo = n % base;
n /= base;
*end-- = digits36[quo];
}
*end = digits36[n];
return len;
}
}
|
O0
|
c
|
u32toa_radix:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movl %edx, 0x50(%rsp)
cmpl $0xa, 0x50(%rsp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x1fbc2
movq 0x58(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0x1f710
movq %rax, 0x60(%rsp)
jmp 0x1fe35
movl 0x54(%rsp), %eax
cmpl 0x50(%rsp), %eax
jae 0x1fbfa
movl 0x54(%rsp), %eax
movl %eax, %ecx
leaq 0xea867(%rip), %rax # 0x10a440
movb (%rax,%rcx), %cl
movq 0x58(%rsp), %rax
movb %cl, (%rax)
movq 0x58(%rsp), %rax
movb $0x0, 0x1(%rax)
movq $0x1, 0x60(%rsp)
jmp 0x1fe35
movl 0x50(%rsp), %eax
andl $0x3f, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0xea864(%rip), %rax # 0x10a470
movzbl (%rax,%rcx), %eax
movl %eax, 0x4c(%rsp)
cmpl $0x0, 0x4c(%rsp)
je 0x1fd29
movl 0x4c(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0x48(%rsp)
movl 0x54(%rsp), %edi
callq 0x1fe40
movl %eax, %ecx
movl $0x20, %eax
subl %ecx, %eax
addl 0x4c(%rsp), %eax
subl $0x1, %eax
cltd
idivl 0x4c(%rsp)
cltq
movq %rax, 0x40(%rsp)
movl 0x54(%rsp), %eax
andl 0x48(%rsp), %eax
movl %eax, %eax
movq %rax, 0x38(%rsp)
movq 0x58(%rsp), %rax
addq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x4c(%rsp), %ecx
movl 0x54(%rsp), %eax
shrl %cl, %eax
movl %eax, 0x54(%rsp)
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, 0x30(%rsp)
movb $0x0, (%rax)
movq 0x38(%rsp), %rcx
leaq 0xea79e(%rip), %rax # 0x10a440
movb (%rax,%rcx), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, (%rax)
movl 0x54(%rsp), %eax
cmpl 0x50(%rsp), %eax
jb 0x1fd03
movl 0x54(%rsp), %eax
andl 0x48(%rsp), %eax
movl %eax, %eax
movq %rax, 0x28(%rsp)
movl 0x4c(%rsp), %ecx
movl 0x54(%rsp), %eax
shrl %cl, %eax
movl %eax, 0x54(%rsp)
movq 0x28(%rsp), %rcx
leaq 0xea755(%rip), %rax # 0x10a440
movb (%rax,%rcx), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, (%rax)
jmp 0x1fcb8
movl 0x54(%rsp), %eax
movl %eax, %ecx
leaq 0xea730(%rip), %rax # 0x10a440
movb (%rax,%rcx), %cl
movq 0x30(%rsp), %rax
movb %cl, (%rax)
movq 0x40(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x1fe35
movq $0x2, 0x20(%rsp)
movl 0x54(%rsp), %eax
xorl %edx, %edx
divl 0x50(%rsp)
movl %edx, %eax
movq %rax, 0x18(%rsp)
movl 0x50(%rsp), %ecx
movl 0x54(%rsp), %eax
xorl %edx, %edx
divl %ecx
movl %eax, 0x54(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x54(%rsp), %eax
cmpl 0x14(%rsp), %eax
jb 0x1fd82
movl 0x50(%rsp), %eax
imull 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x1fd5b
movq 0x58(%rsp), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rsp)
movb $0x0, (%rax)
movq 0x18(%rsp), %rcx
leaq 0xea68f(%rip), %rax # 0x10a440
movb (%rax,%rcx), %cl
movq 0x8(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x8(%rsp)
movb %cl, (%rax)
movl 0x54(%rsp), %eax
cmpl 0x50(%rsp), %eax
jb 0x1fe14
movl 0x54(%rsp), %eax
xorl %edx, %edx
divl 0x50(%rsp)
movl %edx, %eax
movq %rax, (%rsp)
movl 0x50(%rsp), %ecx
movl 0x54(%rsp), %eax
xorl %edx, %edx
divl %ecx
movl %eax, 0x54(%rsp)
movq (%rsp), %rcx
leaq 0xea644(%rip), %rax # 0x10a440
movb (%rax,%rcx), %cl
movq 0x8(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x8(%rsp)
movb %cl, (%rax)
jmp 0x1fdc7
movl 0x54(%rsp), %eax
movl %eax, %ecx
leaq 0xea61f(%rip), %rax # 0x10a440
movb (%rax,%rcx), %cl
movq 0x8(%rsp), %rax
movb %cl, (%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nop
|
u32toa_radix:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_14], esi
mov [rsp+68h+var_18], edx
cmp [rsp+68h+var_18], 0Ah
setz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_1FBC2
mov rdi, [rsp+68h+var_10]
mov esi, [rsp+68h+var_14]
call u32toa
mov [rsp+68h+var_8], rax
jmp loc_1FE35
loc_1FBC2:
mov eax, [rsp+68h+var_14]
cmp eax, [rsp+68h+var_18]
jnb short loc_1FBFA
mov eax, [rsp+68h+var_14]
mov ecx, eax
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+68h+var_10]
mov [rax], cl
mov rax, [rsp+68h+var_10]
mov byte ptr [rax+1], 0
mov [rsp+68h+var_8], 1
jmp loc_1FE35
loc_1FBFA:
mov eax, [rsp+68h+var_18]
and eax, 3Fh
mov eax, eax
mov ecx, eax
lea rax, radix_shift
movzx eax, byte ptr [rax+rcx]
mov [rsp+68h+var_1C], eax
cmp [rsp+68h+var_1C], 0
jz loc_1FD29
mov ecx, [rsp+68h+var_1C]
mov eax, 1
shl eax, cl
sub eax, 1
mov [rsp+68h+var_20], eax
mov edi, [rsp+68h+var_14]
call clz32
mov ecx, eax
mov eax, 20h ; ' '
sub eax, ecx
add eax, [rsp+68h+var_1C]
sub eax, 1
cdq
idiv [rsp+68h+var_1C]
cdqe
mov [rsp+68h+var_28], rax
mov eax, [rsp+68h+var_14]
and eax, [rsp+68h+var_20]
mov eax, eax
mov [rsp+68h+var_30], rax
mov rax, [rsp+68h+var_10]
add rax, [rsp+68h+var_28]
mov [rsp+68h+var_38], rax
mov ecx, [rsp+68h+var_1C]
mov eax, [rsp+68h+var_14]
shr eax, cl
mov [rsp+68h+var_14], eax
mov rax, [rsp+68h+var_38]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_38], rcx
mov byte ptr [rax], 0
mov rcx, [rsp+68h+var_30]
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+68h+var_38]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_38], rdx
mov [rax], cl
loc_1FCB8:
mov eax, [rsp+68h+var_14]
cmp eax, [rsp+68h+var_18]
jb short loc_1FD03
mov eax, [rsp+68h+var_14]
and eax, [rsp+68h+var_20]
mov eax, eax
mov [rsp+68h+var_40], rax
mov ecx, [rsp+68h+var_1C]
mov eax, [rsp+68h+var_14]
shr eax, cl
mov [rsp+68h+var_14], eax
mov rcx, [rsp+68h+var_40]
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+68h+var_38]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_38], rdx
mov [rax], cl
jmp short loc_1FCB8
loc_1FD03:
mov eax, [rsp+68h+var_14]
mov ecx, eax
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+68h+var_38]
mov [rax], cl
mov rax, [rsp+68h+var_28]
mov [rsp+68h+var_8], rax
jmp loc_1FE35
loc_1FD29:
mov [rsp+68h+var_48], 2
mov eax, [rsp+68h+var_14]
xor edx, edx
div [rsp+68h+var_18]
mov eax, edx
mov [rsp+68h+var_50], rax
mov ecx, [rsp+68h+var_18]
mov eax, [rsp+68h+var_14]
xor edx, edx
div ecx
mov [rsp+68h+var_14], eax
mov eax, [rsp+68h+var_18]
mov [rsp+68h+var_54], eax
loc_1FD5B:
mov eax, [rsp+68h+var_14]
cmp eax, [rsp+68h+var_54]
jb short loc_1FD82
mov eax, [rsp+68h+var_18]
imul eax, [rsp+68h+var_54]
mov [rsp+68h+var_54], eax
mov rax, [rsp+68h+var_48]
add rax, 1
mov [rsp+68h+var_48], rax
jmp short loc_1FD5B
loc_1FD82:
mov rax, [rsp+68h+var_10]
add rax, [rsp+68h+var_48]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_60], rcx
mov byte ptr [rax], 0
mov rcx, [rsp+68h+var_50]
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+68h+var_60]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_60], rdx
mov [rax], cl
loc_1FDC7:
mov eax, [rsp+68h+var_14]
cmp eax, [rsp+68h+var_18]
jb short loc_1FE14
mov eax, [rsp+68h+var_14]
xor edx, edx
div [rsp+68h+var_18]
mov eax, edx
mov [rsp+68h+var_68], rax
mov ecx, [rsp+68h+var_18]
mov eax, [rsp+68h+var_14]
xor edx, edx
div ecx
mov [rsp+68h+var_14], eax
mov rcx, [rsp+68h+var_68]
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+68h+var_60]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_60], rdx
mov [rax], cl
jmp short loc_1FDC7
loc_1FE14:
mov eax, [rsp+68h+var_14]
mov ecx, eax
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rax+rcx]
mov rax, [rsp+68h+var_60]
mov [rax], cl
mov rax, [rsp+68h+var_48]
mov [rsp+68h+var_8], rax
loc_1FE35:
mov rax, [rsp+68h+var_8]
add rsp, 68h
retn
|
long long u32toa_radix(_BYTE *a1, unsigned int a2, unsigned int a3)
{
long long v3; // rcx
_BYTE *v4; // rax
_BYTE *v5; // rax
long long v7; // [rsp+0h] [rbp-68h]
_BYTE *v8; // [rsp+8h] [rbp-60h]
unsigned int v9; // [rsp+14h] [rbp-54h]
long long v10; // [rsp+20h] [rbp-48h]
long long v11; // [rsp+28h] [rbp-40h]
_BYTE *v12; // [rsp+30h] [rbp-38h]
long long v13; // [rsp+40h] [rbp-28h]
int v14; // [rsp+48h] [rbp-20h]
int v15; // [rsp+4Ch] [rbp-1Ch]
unsigned int v17; // [rsp+54h] [rbp-14h]
unsigned int v18; // [rsp+54h] [rbp-14h]
if ( a3 == 10 )
return u32toa(a1, a2);
if ( a2 >= a3 )
{
v3 = a3 & 0x3F;
v15 = radix_shift[v3];
if ( radix_shift[v3] )
{
v14 = (1 << v15) - 1;
v13 = (int)(v15 + 32 - clz32(a2) - 1) / v15;
v17 = a2 >> v15;
a1[v13] = 0;
v12 = &a1[v13 - 2];
a1[v13 - 1] = digits36[v14 & a2];
while ( v17 >= a3 )
{
v11 = v14 & v17;
v17 >>= v15;
v4 = v12--;
*v4 = digits36[v11];
}
*v12 = digits36[v17];
return v13;
}
else
{
v10 = 2LL;
v18 = a2 / a3;
v9 = a3;
while ( v18 >= v9 )
{
v9 *= a3;
++v10;
}
a1[v10] = 0;
v8 = &a1[v10 - 2];
a1[v10 - 1] = digits36[a2 % a3];
while ( v18 >= a3 )
{
v7 = v18 % a3;
v18 /= a3;
v5 = v8--;
*v5 = digits36[v7];
}
*v8 = digits36[v18];
return v10;
}
}
else
{
*a1 = digits36[a2];
a1[1] = 0;
return 1LL;
}
}
|
u32toa_radix:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV dword ptr [RSP + 0x54],ESI
MOV dword ptr [RSP + 0x50],EDX
CMP dword ptr [RSP + 0x50],0xa
SETZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0011fbc2
MOV RDI,qword ptr [RSP + 0x58]
MOV ESI,dword ptr [RSP + 0x54]
CALL 0x0011f710
MOV qword ptr [RSP + 0x60],RAX
JMP 0x0011fe35
LAB_0011fbc2:
MOV EAX,dword ptr [RSP + 0x54]
CMP EAX,dword ptr [RSP + 0x50]
JNC 0x0011fbfa
MOV EAX,dword ptr [RSP + 0x54]
MOV ECX,EAX
LEA RAX,[0x20a440]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x58]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x58]
MOV byte ptr [RAX + 0x1],0x0
MOV qword ptr [RSP + 0x60],0x1
JMP 0x0011fe35
LAB_0011fbfa:
MOV EAX,dword ptr [RSP + 0x50]
AND EAX,0x3f
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x20a470]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0x4c],EAX
CMP dword ptr [RSP + 0x4c],0x0
JZ 0x0011fd29
MOV ECX,dword ptr [RSP + 0x4c]
MOV EAX,0x1
SHL EAX,CL
SUB EAX,0x1
MOV dword ptr [RSP + 0x48],EAX
MOV EDI,dword ptr [RSP + 0x54]
CALL 0x0011fe40
MOV ECX,EAX
MOV EAX,0x20
SUB EAX,ECX
ADD EAX,dword ptr [RSP + 0x4c]
SUB EAX,0x1
CDQ
IDIV dword ptr [RSP + 0x4c]
CDQE
MOV qword ptr [RSP + 0x40],RAX
MOV EAX,dword ptr [RSP + 0x54]
AND EAX,dword ptr [RSP + 0x48]
MOV EAX,EAX
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x58]
ADD RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x30],RAX
MOV ECX,dword ptr [RSP + 0x4c]
MOV EAX,dword ptr [RSP + 0x54]
SHR EAX,CL
MOV dword ptr [RSP + 0x54],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + 0x30],RCX
MOV byte ptr [RAX],0x0
MOV RCX,qword ptr [RSP + 0x38]
LEA RAX,[0x20a440]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x30]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + 0x30],RDX
MOV byte ptr [RAX],CL
LAB_0011fcb8:
MOV EAX,dword ptr [RSP + 0x54]
CMP EAX,dword ptr [RSP + 0x50]
JC 0x0011fd03
MOV EAX,dword ptr [RSP + 0x54]
AND EAX,dword ptr [RSP + 0x48]
MOV EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOV ECX,dword ptr [RSP + 0x4c]
MOV EAX,dword ptr [RSP + 0x54]
SHR EAX,CL
MOV dword ptr [RSP + 0x54],EAX
MOV RCX,qword ptr [RSP + 0x28]
LEA RAX,[0x20a440]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x30]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + 0x30],RDX
MOV byte ptr [RAX],CL
JMP 0x0011fcb8
LAB_0011fd03:
MOV EAX,dword ptr [RSP + 0x54]
MOV ECX,EAX
LEA RAX,[0x20a440]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x30]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x0011fe35
LAB_0011fd29:
MOV qword ptr [RSP + 0x20],0x2
MOV EAX,dword ptr [RSP + 0x54]
XOR EDX,EDX
DIV dword ptr [RSP + 0x50]
MOV EAX,EDX
MOV qword ptr [RSP + 0x18],RAX
MOV ECX,dword ptr [RSP + 0x50]
MOV EAX,dword ptr [RSP + 0x54]
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + 0x54],EAX
MOV EAX,dword ptr [RSP + 0x50]
MOV dword ptr [RSP + 0x14],EAX
LAB_0011fd5b:
MOV EAX,dword ptr [RSP + 0x54]
CMP EAX,dword ptr [RSP + 0x14]
JC 0x0011fd82
MOV EAX,dword ptr [RSP + 0x50]
IMUL EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x0011fd5b
LAB_0011fd82:
MOV RAX,qword ptr [RSP + 0x58]
ADD RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + 0x8],RCX
MOV byte ptr [RAX],0x0
MOV RCX,qword ptr [RSP + 0x18]
LEA RAX,[0x20a440]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + 0x8],RDX
MOV byte ptr [RAX],CL
LAB_0011fdc7:
MOV EAX,dword ptr [RSP + 0x54]
CMP EAX,dword ptr [RSP + 0x50]
JC 0x0011fe14
MOV EAX,dword ptr [RSP + 0x54]
XOR EDX,EDX
DIV dword ptr [RSP + 0x50]
MOV EAX,EDX
MOV qword ptr [RSP],RAX
MOV ECX,dword ptr [RSP + 0x50]
MOV EAX,dword ptr [RSP + 0x54]
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + 0x54],EAX
MOV RCX,qword ptr [RSP]
LEA RAX,[0x20a440]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + 0x8],RDX
MOV byte ptr [RAX],CL
JMP 0x0011fdc7
LAB_0011fe14:
MOV EAX,dword ptr [RSP + 0x54]
MOV ECX,EAX
LEA RAX,[0x20a440]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x8]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x60],RAX
LAB_0011fe35:
MOV RAX,qword ptr [RSP + 0x60]
ADD RSP,0x68
RET
|
long u32toa_radix(char *param_1,uint param_2,uint param_3)
{
byte bVar1;
ulong uVar2;
uint uVar3;
int iVar4;
uint uVar5;
char *local_60;
uint local_54;
long local_48;
char *local_38;
uint local_14;
long local_8;
if (param_3 == 10) {
local_8 = u32toa(param_1,param_2);
}
else if (param_2 < param_3) {
*param_1 = "0123456789abcdefghijklmnopqrstuvwxyz"[param_2];
param_1[1] = '\0';
local_8 = 1;
}
else {
bVar1 = radix_shift[param_3 & 0x3f];
uVar5 = (uint)bVar1;
if (uVar5 == 0) {
local_48 = 2;
local_14 = param_2 / param_3;
for (local_54 = param_3; local_54 <= local_14; local_54 = param_3 * local_54) {
local_48 = local_48 + 1;
}
param_1 = param_1 + local_48;
*param_1 = '\0';
param_1[-1] = "0123456789abcdefghijklmnopqrstuvwxyz"[(ulong)param_2 % (ulong)param_3];
local_60 = param_1 + -2;
while (param_3 <= local_14) {
uVar2 = (ulong)local_14;
local_14 = local_14 / param_3;
*local_60 = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar2 % (ulong)param_3];
local_60 = local_60 + -1;
}
*local_60 = "0123456789abcdefghijklmnopqrstuvwxyz"[local_14];
local_8 = local_48;
}
else {
uVar3 = (1 << (bVar1 & 0x1f)) - 1;
iVar4 = clz32(param_2);
local_8 = (long)((int)((uVar5 - iVar4) + 0x1f) / (int)uVar5);
param_1 = param_1 + local_8;
local_14 = param_2 >> (bVar1 & 0x1f);
*param_1 = '\0';
param_1[-1] = "0123456789abcdefghijklmnopqrstuvwxyz"[param_2 & uVar3];
local_38 = param_1 + -2;
while (param_3 <= local_14) {
uVar5 = local_14 & uVar3;
local_14 = local_14 >> (bVar1 & 0x1f);
*local_38 = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar5];
local_38 = local_38 + -1;
}
*local_38 = "0123456789abcdefghijklmnopqrstuvwxyz"[local_14];
}
}
return local_8;
}
|
|
65,116 |
u32toa_radix
|
bluesky950520[P]quickjs/cutils.c
|
size_t u32toa_radix(char buf[minimum_length(33)], uint32_t n, unsigned base)
{
int shift;
#ifdef USE_SPECIAL_RADIX_10
if (likely(base == 10))
return u32toa(buf, n);
#endif
if (n < base) {
buf[0] = digits36[n];
buf[1] = '\0';
return 1;
}
shift = radix_shift[base & 63];
if (shift) {
uint32_t mask = (1 << shift) - 1;
size_t len = (32 - clz32(n) + shift - 1) / shift;
size_t last = n & mask;
char *end = buf + len;
n >>= shift;
*end-- = '\0';
*end-- = digits36[last];
while (n >= base) {
size_t quo = n & mask;
n >>= shift;
*end-- = digits36[quo];
}
*end = digits36[n];
return len;
} else {
size_t len = 2;
size_t last = n % base;
n /= base;
uint32_t nbase = base;
while (n >= nbase) {
nbase *= base;
len++;
}
char *end = buf + len;
*end-- = '\0';
*end-- = digits36[last];
while (n >= base) {
size_t quo = n % base;
n /= base;
*end-- = digits36[quo];
}
*end = digits36[n];
return len;
}
}
|
O2
|
c
|
u32toa_radix:
cmpl $0xa, %edx
jne 0x16615
jmp 0x16482
movl %edx, %r8d
cmpl %edx, %esi
jae 0x16637
movl %esi, %eax
leaq 0x6cc9b(%rip), %rcx # 0x832c0
movb (%rax,%rcx), %al
movb %al, (%rdi)
movb $0x0, 0x1(%rdi)
pushq $0x1
popq %r9
jmp 0x16700
movl %r8d, %eax
andl $0x3f, %eax
leaq 0x6ccac(%rip), %rcx # 0x832f0
movzbl (%rax,%rcx), %ecx
testl %ecx, %ecx
je 0x166af
pushq $-0x1
popq %r10
shll %cl, %r10d
notl %r10d
bsrl %esi, %eax
xorl $0x1f, %eax
negl %eax
addl %ecx, %eax
addl $0x1f, %eax
xorl %edx, %edx
divw %cx
movzwl %ax, %r9d
movl %r10d, %r11d
andl %esi, %r11d
leaq (%rdi,%r9), %rax
addq $-0x2, %rax
movb $0x0, 0x2(%rax)
leaq 0x6cc3b(%rip), %rdx # 0x832c0
movb (%r11,%rdx), %dil
movb %dil, 0x1(%rax)
movl %esi, %esi
shrq %cl, %rsi
cmpl %r8d, %esi
jb 0x166a8
movl %esi, %edi
andl %r10d, %edi
movb (%rdi,%rdx), %dil
movb %dil, (%rax)
decq %rax
jmp 0x1668d
movb (%rsi,%rdx), %cl
movb %cl, (%rax)
jmp 0x16700
movl %esi, %eax
xorl %edx, %edx
divl %r8d
pushq $0x2
popq %r9
movl %r8d, %ecx
cmpl %ecx, %eax
jb 0x166ca
imull %r8d, %ecx
incq %r9
jmp 0x166bd
movl %edx, %edx
leaq (%rdi,%r9), %rcx
addq $-0x2, %rcx
movb $0x0, 0x2(%rcx)
leaq 0x6cbe1(%rip), %rsi # 0x832c0
movb (%rdx,%rsi), %dl
movb %dl, 0x1(%rcx)
cmpl %r8d, %eax
jb 0x166f9
xorl %edx, %edx
divl %r8d
movb (%rdx,%rsi), %dl
movb %dl, (%rcx)
decq %rcx
jmp 0x166e5
movl %eax, %eax
movb (%rax,%rsi), %al
movb %al, (%rcx)
movq %r9, %rax
retq
|
u32toa_radix:
cmp edx, 0Ah
jnz short loc_16615
jmp u32toa
loc_16615:
mov r8d, edx
cmp esi, edx
jnb short loc_16637
mov eax, esi
lea rcx, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov al, [rax+rcx]
mov [rdi], al
mov byte ptr [rdi+1], 0
push 1
pop r9
jmp loc_16700
loc_16637:
mov eax, r8d
and eax, 3Fh
lea rcx, radix_shift
movzx ecx, byte ptr [rax+rcx]
test ecx, ecx
jz short loc_166AF
push 0FFFFFFFFFFFFFFFFh
pop r10
shl r10d, cl
not r10d
bsr eax, esi
xor eax, 1Fh
neg eax
add eax, ecx
add eax, 1Fh
xor edx, edx
div cx
movzx r9d, ax
mov r11d, r10d
and r11d, esi
lea rax, [rdi+r9]
add rax, 0FFFFFFFFFFFFFFFEh
mov byte ptr [rax+2], 0
lea rdx, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov dil, [r11+rdx]
mov [rax+1], dil
loc_1668D:
mov esi, esi
shr rsi, cl
cmp esi, r8d
jb short loc_166A8
mov edi, esi
and edi, r10d
mov dil, [rdi+rdx]
mov [rax], dil
dec rax
jmp short loc_1668D
loc_166A8:
mov cl, [rsi+rdx]
mov [rax], cl
jmp short loc_16700
loc_166AF:
mov eax, esi
xor edx, edx
div r8d
push 2
pop r9
mov ecx, r8d
loc_166BD:
cmp eax, ecx
jb short loc_166CA
imul ecx, r8d
inc r9
jmp short loc_166BD
loc_166CA:
mov edx, edx
lea rcx, [rdi+r9]
add rcx, 0FFFFFFFFFFFFFFFEh
mov byte ptr [rcx+2], 0
lea rsi, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov dl, [rdx+rsi]
mov [rcx+1], dl
loc_166E5:
cmp eax, r8d
jb short loc_166F9
xor edx, edx
div r8d
mov dl, [rdx+rsi]
mov [rcx], dl
dec rcx
jmp short loc_166E5
loc_166F9:
mov eax, eax
mov al, [rax+rsi]
mov [rcx], al
loc_16700:
mov rax, r9
retn
|
long long u32toa_radix(_BYTE *a1, unsigned long long a2, unsigned int a3)
{
long long v5; // r9
long long v6; // rax
unsigned __int16 v7; // cx
unsigned int v8; // eax
_BYTE *v9; // rax
unsigned int v10; // eax
unsigned int v11; // ecx
_BYTE *v12; // rcx
long long v13; // rdx
if ( a3 == 10 )
return u32toa(a1, a2);
if ( (unsigned int)a2 >= a3 )
{
v6 = a3 & 0x3F;
v7 = radix_shift[v6];
if ( radix_shift[v6] )
{
_BitScanReverse(&v8, a2);
v5 = (unsigned __int16)((unsigned __int16)(v7 - (v8 ^ 0x1F) + 31) / v7);
v9 = &a1[v5 - 2];
v9[2] = 0;
v9[1] = digits36[(unsigned int)a2 & ~(-1 << v7)];
while ( 1 )
{
a2 = (unsigned long long)(unsigned int)a2 >> v7;
if ( (unsigned int)a2 < a3 )
break;
*v9-- = digits36[~(-1 << v7) & (unsigned int)a2];
}
*v9 = digits36[a2];
}
else
{
v10 = (unsigned int)a2 / a3;
v5 = 2LL;
v11 = a3;
while ( v10 >= v11 )
{
v11 *= a3;
++v5;
}
v12 = &a1[v5 - 2];
v12[2] = 0;
v12[1] = digits36[(unsigned int)a2 % a3];
while ( v10 >= a3 )
{
v13 = v10 % a3;
v10 /= a3;
*v12-- = digits36[v13];
}
*v12 = digits36[v10];
}
}
else
{
*a1 = digits36[(unsigned int)a2];
a1[1] = 0;
return 1LL;
}
return v5;
}
|
u32toa_radix:
CMP EDX,0xa
JNZ 0x00116615
JMP 0x00116482
LAB_00116615:
MOV R8D,EDX
CMP ESI,EDX
JNC 0x00116637
MOV EAX,ESI
LEA RCX,[0x1832c0]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDI],AL
MOV byte ptr [RDI + 0x1],0x0
PUSH 0x1
POP R9
JMP 0x00116700
LAB_00116637:
MOV EAX,R8D
AND EAX,0x3f
LEA RCX,[0x1832f0]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
TEST ECX,ECX
JZ 0x001166af
PUSH -0x1
POP R10
SHL R10D,CL
NOT R10D
BSR EAX,ESI
XOR EAX,0x1f
NEG EAX
ADD EAX,ECX
ADD EAX,0x1f
XOR EDX,EDX
DIV CX
MOVZX R9D,AX
MOV R11D,R10D
AND R11D,ESI
LEA RAX,[RDI + R9*0x1]
ADD RAX,-0x2
MOV byte ptr [RAX + 0x2],0x0
LEA RDX,[0x1832c0]
MOV DIL,byte ptr [R11 + RDX*0x1]
MOV byte ptr [RAX + 0x1],DIL
LAB_0011668d:
MOV ESI,ESI
SHR RSI,CL
CMP ESI,R8D
JC 0x001166a8
MOV EDI,ESI
AND EDI,R10D
MOV DIL,byte ptr [RDI + RDX*0x1]
MOV byte ptr [RAX],DIL
DEC RAX
JMP 0x0011668d
LAB_001166a8:
MOV CL,byte ptr [RSI + RDX*0x1]
MOV byte ptr [RAX],CL
JMP 0x00116700
LAB_001166af:
MOV EAX,ESI
XOR EDX,EDX
DIV R8D
PUSH 0x2
POP R9
MOV ECX,R8D
LAB_001166bd:
CMP EAX,ECX
JC 0x001166ca
IMUL ECX,R8D
INC R9
JMP 0x001166bd
LAB_001166ca:
MOV EDX,EDX
LEA RCX,[RDI + R9*0x1]
ADD RCX,-0x2
MOV byte ptr [RCX + 0x2],0x0
LEA RSI,[0x1832c0]
MOV DL,byte ptr [RDX + RSI*0x1]
MOV byte ptr [RCX + 0x1],DL
LAB_001166e5:
CMP EAX,R8D
JC 0x001166f9
XOR EDX,EDX
DIV R8D
MOV DL,byte ptr [RDX + RSI*0x1]
MOV byte ptr [RCX],DL
DEC RCX
JMP 0x001166e5
LAB_001166f9:
MOV EAX,EAX
MOV AL,byte ptr [RAX + RSI*0x1]
MOV byte ptr [RCX],AL
LAB_00116700:
MOV RAX,R9
RET
|
ulong u32toa_radix(char *param_1,ulong param_2,uint param_3)
{
byte bVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
char *pcVar5;
ulong uVar6;
uint uVar7;
ulong uVar8;
uint uVar9;
if (param_3 == 10) {
uVar4 = u32toa();
return uVar4;
}
uVar4 = (ulong)param_3;
uVar7 = (uint)param_2;
if (uVar7 < param_3) {
*param_1 = "0123456789abcdefghijklmnopqrstuvwxyz"[param_2 & 0xffffffff];
param_1[1] = '\0';
uVar8 = 1;
}
else {
bVar1 = radix_shift[param_3 & 0x3f];
if (bVar1 == 0) {
uVar3 = (param_2 & 0xffffffff) / (ulong)param_3;
uVar8 = 2;
for (uVar6 = uVar4; (uint)uVar6 <= (uint)uVar3; uVar6 = (ulong)((uint)uVar6 * param_3)) {
uVar8 = uVar8 + 1;
}
param_1 = param_1 + uVar8;
pcVar5 = param_1 + -2;
*param_1 = '\0';
param_1[-1] = "0123456789abcdefghijklmnopqrstuvwxyz"[(param_2 & 0xffffffff) % (ulong)param_3];
for (; param_3 <= (uint)uVar3; uVar3 = uVar3 / uVar4) {
*pcVar5 = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar3 % uVar4];
pcVar5 = pcVar5 + -1;
}
*pcVar5 = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar3];
}
else {
uVar9 = ~(-1 << (bVar1 & 0x1f));
uVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> uVar2 == 0; uVar2 = uVar2 - 1) {
}
}
uVar8 = (ulong)(ushort)((((uint)bVar1 - (uVar2 ^ 0x1f)) + 0x1f & 0xffff) / (uint)bVar1);
param_1 = param_1 + uVar8;
pcVar5 = param_1 + -2;
*param_1 = '\0';
param_1[-1] = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar9 & uVar7];
while( true ) {
param_2 = (param_2 & 0xffffffff) >> (bVar1 & 0x3f);
if ((uint)param_2 < param_3) break;
*pcVar5 = "0123456789abcdefghijklmnopqrstuvwxyz"[(uint)param_2 & uVar9];
pcVar5 = pcVar5 + -1;
}
*pcVar5 = "0123456789abcdefghijklmnopqrstuvwxyz"[param_2];
}
}
return uVar8;
}
|
|
65,117 |
u32toa_radix
|
bluesky950520[P]quickjs/cutils.c
|
size_t u32toa_radix(char buf[minimum_length(33)], uint32_t n, unsigned base)
{
int shift;
#ifdef USE_SPECIAL_RADIX_10
if (likely(base == 10))
return u32toa(buf, n);
#endif
if (n < base) {
buf[0] = digits36[n];
buf[1] = '\0';
return 1;
}
shift = radix_shift[base & 63];
if (shift) {
uint32_t mask = (1 << shift) - 1;
size_t len = (32 - clz32(n) + shift - 1) / shift;
size_t last = n & mask;
char *end = buf + len;
n >>= shift;
*end-- = '\0';
*end-- = digits36[last];
while (n >= base) {
size_t quo = n & mask;
n >>= shift;
*end-- = digits36[quo];
}
*end = digits36[n];
return len;
} else {
size_t len = 2;
size_t last = n % base;
n /= base;
uint32_t nbase = base;
while (n >= nbase) {
nbase *= base;
len++;
}
char *end = buf + len;
*end-- = '\0';
*end-- = digits36[last];
while (n >= base) {
size_t quo = n % base;
n /= base;
*end-- = digits36[quo];
}
*end = digits36[n];
return len;
}
}
|
O3
|
c
|
u32toa_radix:
cmpl $0xa, %edx
je 0x1c568
movl %edx, %r8d
cmpl %edx, %esi
jae 0x1c72e
movl %esi, %eax
leaq 0x82c16(%rip), %rcx # 0x9f330
movb (%rax,%rcx), %al
movb %al, (%rdi)
movb $0x0, 0x1(%rdi)
movl $0x1, %r9d
jmp 0x1c7d8
movl %r8d, %eax
andl $0x3f, %eax
leaq 0x82c25(%rip), %rcx # 0x9f360
movzbl (%rax,%rcx), %ecx
testl %ecx, %ecx
je 0x1c7a7
movl $0xffffffff, %r10d # imm = 0xFFFFFFFF
shll %cl, %r10d
notl %r10d
bsrl %esi, %eax
xorl $0x1f, %eax
negl %eax
addl %ecx, %eax
addl $0x1f, %eax
xorl %edx, %edx
divw %cx
movzwl %ax, %r9d
movl %r10d, %r11d
andl %esi, %r11d
leaq (%rdi,%r9), %rax
addq $-0x2, %rax
movb $0x0, 0x2(%rax)
leaq 0x82bb2(%rip), %rdx # 0x9f330
movb (%r11,%rdx), %dil
movb %dil, 0x1(%rax)
shrl %cl, %esi
cmpl %r8d, %esi
jb 0x1c79e
movl %esi, %edi
andl %r10d, %edi
movb (%rdi,%rdx), %dil
movb %dil, (%rax)
decq %rax
jmp 0x1c786
movl %esi, %ecx
movb (%rcx,%rdx), %cl
movb %cl, (%rax)
jmp 0x1c7d8
movl %esi, %eax
xorl %edx, %edx
divl %r8d
cmpl %r8d, %eax
jae 0x1c7dc
movb $0x0, 0x2(%rdi)
leaq 0x82b72(%rip), %rcx # 0x9f330
movb (%rdx,%rcx), %cl
movb %cl, 0x1(%rdi)
movl $0x2, %r9d
movl %eax, %eax
leaq 0x82b5d(%rip), %rcx # 0x9f330
movb (%rax,%rcx), %al
movb %al, (%rdi)
movq %r9, %rax
retq
movl $0x2, %r9d
movl %r8d, %ecx
imull %r8d, %ecx
incq %r9
incq %rdi
cmpl %ecx, %eax
jae 0x1c7e5
movb $0x0, 0x2(%rdi)
leaq 0x82b32(%rip), %rcx # 0x9f330
movb (%rdx,%rcx), %dl
movb %dl, 0x1(%rdi)
cmpl %r8d, %eax
jb 0x1c7ca
xorl %edx, %edx
divl %r8d
movb (%rdx,%rcx), %dl
movb %dl, (%rdi)
decq %rdi
jmp 0x1c804
|
u32toa_radix:
cmp edx, 0Ah
jz u32toa
mov r8d, edx
cmp esi, edx
jnb short loc_1C72E
mov eax, esi
lea rcx, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov al, [rax+rcx]
mov [rdi], al
mov byte ptr [rdi+1], 0
mov r9d, 1
jmp loc_1C7D8
loc_1C72E:
mov eax, r8d
and eax, 3Fh
lea rcx, radix_shift
movzx ecx, byte ptr [rax+rcx]
test ecx, ecx
jz short loc_1C7A7
mov r10d, 0FFFFFFFFh
shl r10d, cl
not r10d
bsr eax, esi
xor eax, 1Fh
neg eax
add eax, ecx
add eax, 1Fh
xor edx, edx
div cx
movzx r9d, ax
mov r11d, r10d
and r11d, esi
lea rax, [rdi+r9]
add rax, 0FFFFFFFFFFFFFFFEh
mov byte ptr [rax+2], 0
lea rdx, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov dil, [r11+rdx]
mov [rax+1], dil
loc_1C786:
shr esi, cl
cmp esi, r8d
jb short loc_1C79E
mov edi, esi
and edi, r10d
mov dil, [rdi+rdx]
mov [rax], dil
dec rax
jmp short loc_1C786
loc_1C79E:
mov ecx, esi
mov cl, [rcx+rdx]
mov [rax], cl
jmp short loc_1C7D8
loc_1C7A7:
mov eax, esi
xor edx, edx
div r8d
cmp eax, r8d
jnb short loc_1C7DC
mov byte ptr [rdi+2], 0
lea rcx, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov cl, [rdx+rcx]
mov [rdi+1], cl
mov r9d, 2
loc_1C7CA:
mov eax, eax
lea rcx, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov al, [rax+rcx]
mov [rdi], al
loc_1C7D8:
mov rax, r9
retn
loc_1C7DC:
mov r9d, 2
mov ecx, r8d
loc_1C7E5:
imul ecx, r8d
inc r9
inc rdi
cmp eax, ecx
jnb short loc_1C7E5
mov byte ptr [rdi+2], 0
lea rcx, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov dl, [rdx+rcx]
mov [rdi+1], dl
loc_1C804:
cmp eax, r8d
jb short loc_1C7CA
xor edx, edx
div r8d
mov dl, [rdx+rcx]
mov [rdi], dl
dec rdi
jmp short loc_1C804
|
long long u32toa_radix(_BYTE *a1, unsigned int a2, unsigned int a3)
{
long long v4; // r9
long long v5; // rax
unsigned __int16 v6; // cx
unsigned int v7; // eax
_BYTE *v8; // rax
unsigned int v9; // eax
long long v10; // rdx
unsigned int v12; // ecx
long long v13; // rdx
if ( a3 == 10 )
return u32toa((long long)a1, a2);
if ( a2 >= a3 )
{
v5 = a3 & 0x3F;
v6 = radix_shift[v5];
if ( radix_shift[v5] )
{
_BitScanReverse(&v7, a2);
v4 = (unsigned __int16)((unsigned __int16)(v6 - (v7 ^ 0x1F) + 31) / v6);
v8 = &a1[v4 - 2];
v8[2] = 0;
v8[1] = digits36[a2 & ~(-1 << v6)];
while ( 1 )
{
a2 >>= v6;
if ( a2 < a3 )
break;
*v8-- = digits36[~(-1 << v6) & a2];
}
*v8 = digits36[a2];
}
else
{
v10 = a2 % a3;
v9 = a2 / a3;
if ( a2 / a3 >= a3 )
{
v4 = 2LL;
v12 = a3;
do
{
v12 *= a3;
++v4;
++a1;
}
while ( v9 >= v12 );
a1[2] = 0;
a1[1] = digits36[v10];
while ( v9 >= a3 )
{
v13 = v9 % a3;
v9 /= a3;
*a1-- = digits36[v13];
}
}
else
{
a1[2] = 0;
a1[1] = digits36[v10];
v4 = 2LL;
}
*a1 = digits36[v9];
}
}
else
{
*a1 = digits36[a2];
a1[1] = 0;
return 1LL;
}
return v4;
}
|
u32toa_radix:
CMP EDX,0xa
JZ 0x0011c568
MOV R8D,EDX
CMP ESI,EDX
JNC 0x0011c72e
MOV EAX,ESI
LEA RCX,[0x19f330]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDI],AL
MOV byte ptr [RDI + 0x1],0x0
MOV R9D,0x1
JMP 0x0011c7d8
LAB_0011c72e:
MOV EAX,R8D
AND EAX,0x3f
LEA RCX,[0x19f360]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
TEST ECX,ECX
JZ 0x0011c7a7
MOV R10D,0xffffffff
SHL R10D,CL
NOT R10D
BSR EAX,ESI
XOR EAX,0x1f
NEG EAX
ADD EAX,ECX
ADD EAX,0x1f
XOR EDX,EDX
DIV CX
MOVZX R9D,AX
MOV R11D,R10D
AND R11D,ESI
LEA RAX,[RDI + R9*0x1]
ADD RAX,-0x2
MOV byte ptr [RAX + 0x2],0x0
LEA RDX,[0x19f330]
MOV DIL,byte ptr [R11 + RDX*0x1]
MOV byte ptr [RAX + 0x1],DIL
LAB_0011c786:
SHR ESI,CL
CMP ESI,R8D
JC 0x0011c79e
MOV EDI,ESI
AND EDI,R10D
MOV DIL,byte ptr [RDI + RDX*0x1]
MOV byte ptr [RAX],DIL
DEC RAX
JMP 0x0011c786
LAB_0011c79e:
MOV ECX,ESI
MOV CL,byte ptr [RCX + RDX*0x1]
MOV byte ptr [RAX],CL
JMP 0x0011c7d8
LAB_0011c7a7:
MOV EAX,ESI
XOR EDX,EDX
DIV R8D
CMP EAX,R8D
JNC 0x0011c7dc
MOV byte ptr [RDI + 0x2],0x0
LEA RCX,[0x19f330]
MOV CL,byte ptr [RDX + RCX*0x1]
MOV byte ptr [RDI + 0x1],CL
MOV R9D,0x2
LAB_0011c7ca:
MOV EAX,EAX
LEA RCX,[0x19f330]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDI],AL
LAB_0011c7d8:
MOV RAX,R9
RET
LAB_0011c7dc:
MOV R9D,0x2
MOV ECX,R8D
LAB_0011c7e5:
IMUL ECX,R8D
INC R9
INC RDI
CMP EAX,ECX
JNC 0x0011c7e5
MOV byte ptr [RDI + 0x2],0x0
LEA RCX,[0x19f330]
MOV DL,byte ptr [RDX + RCX*0x1]
MOV byte ptr [RDI + 0x1],DL
LAB_0011c804:
CMP EAX,R8D
JC 0x0011c7ca
XOR EDX,EDX
DIV R8D
MOV DL,byte ptr [RDX + RCX*0x1]
MOV byte ptr [RDI],DL
DEC RDI
JMP 0x0011c804
|
ulong u32toa_radix(byte *param_1,ulong param_2,uint param_3)
{
byte bVar1;
long lVar2;
byte *pbVar3;
uint uVar4;
ulong uVar5;
uint uVar6;
ulong uVar7;
long lVar8;
ulong uVar9;
uint uVar10;
uVar6 = (uint)param_2;
if (param_3 != 10) {
if (uVar6 < param_3) {
*param_1 = "0123456789abcdefghijklmnopqrstuvwxyz"[param_2 & 0xffffffff];
param_1[1] = 0;
uVar9 = 1;
}
else {
bVar1 = radix_shift[param_3 & 0x3f];
if (bVar1 == 0) {
uVar5 = (param_2 & 0xffffffff) / (ulong)param_3;
uVar6 = (uint)uVar5;
uVar7 = (param_2 & 0xffffffff) % (ulong)param_3;
if (uVar6 < param_3) {
param_1[2] = 0;
param_1[1] = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar7];
uVar9 = 2;
}
else {
uVar9 = 2;
uVar4 = param_3;
do {
pbVar3 = param_1;
uVar4 = uVar4 * param_3;
uVar9 = uVar9 + 1;
param_1 = pbVar3 + 1;
} while (uVar4 <= uVar6);
pbVar3[3] = 0;
pbVar3[2] = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar7];
while( true ) {
uVar6 = (uint)uVar5;
if (uVar6 < param_3) break;
*param_1 = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar5 % (ulong)param_3];
param_1 = param_1 + -1;
uVar5 = uVar5 / param_3;
}
}
*param_1 = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar6];
}
else {
uVar10 = ~(-1 << (bVar1 & 0x1f));
uVar4 = 0x1f;
if (uVar6 != 0) {
for (; uVar6 >> uVar4 == 0; uVar4 = uVar4 - 1) {
}
}
uVar9 = (ulong)(ushort)((((uint)bVar1 - (uVar4 ^ 0x1f)) + 0x1f & 0xffff) / (uint)bVar1);
param_1 = param_1 + uVar9;
pbVar3 = param_1 + -2;
*param_1 = 0;
param_1[-1] = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar10 & uVar6];
while( true ) {
uVar6 = (uint)param_2 >> (bVar1 & 0x1f);
param_2 = (ulong)uVar6;
if (uVar6 < param_3) break;
*pbVar3 = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar6 & uVar10];
pbVar3 = pbVar3 + -1;
}
*pbVar3 = "0123456789abcdefghijklmnopqrstuvwxyz"[uVar6];
}
}
return uVar9;
}
if (uVar6 < 10) {
*param_1 = (byte)param_2 | 0x30;
param_1[1] = 0;
return 1;
}
if (9999999 < uVar6) {
uVar5 = (param_2 & 0xffffffff) / 10000000;
uVar4 = (uint)uVar5;
if (uVar6 < 100000000) {
lVar2 = 1;
lVar8 = 0;
}
else {
lVar2 = 1;
lVar8 = 0;
do {
uVar10 = (uint)uVar5;
uVar4 = (uint)(uVar5 / 10);
lVar8 = lVar8 * 0x100 + (ulong)(uVar10 + (int)(uVar5 / 10) * -10) + 0x30;
lVar2 = lVar2 + 1;
uVar5 = uVar5 / 10;
} while (99 < uVar10);
lVar8 = lVar8 * 0x100;
}
*(ulong *)param_1 = (ulong)uVar4 + lVar8 + 0x30;
param_1[lVar2 + 7] = 0;
uVar5 = 7;
uVar6 = uVar6 + (int)((param_2 & 0xffffffff) / 10000000) * -10000000;
do {
uVar4 = uVar6 / 10;
(param_1 + lVar2)[uVar5 - 1] = (char)uVar6 + (char)(uVar6 / 10) * -10 | 0x30;
uVar5 = uVar5 - 1;
uVar6 = uVar4;
} while (1 < uVar5);
param_1[lVar2] = (char)uVar4 + 0x30;
return lVar2 + 7;
}
uVar5 = 1;
lVar2 = 0;
do {
uVar6 = (uint)param_2;
uVar7 = param_2 & 0xffffffff;
param_2 = uVar7 / 10;
lVar2 = lVar2 * 0x100 + (ulong)(uVar6 + (int)(uVar7 / 10) * -10) + 0x30;
uVar5 = uVar5 + 1;
} while (99 < uVar6);
*(ulong *)param_1 = lVar2 * 0x100 + param_2 + 0x30;
return uVar5;
}
|
|
65,118 |
translog_max_lsn_to_header
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_max_lsn_to_header(File file, LSN lsn)
{
uchar lsn_buff[LSN_STORE_SIZE];
my_bool rc;
DBUG_ENTER("translog_max_lsn_to_header");
DBUG_PRINT("enter", ("File descriptor: %ld "
"lsn: " LSN_FMT,
(long) file,
LSN_IN_PARTS(lsn)));
lsn_store(lsn_buff, lsn);
rc= (my_pwrite(file, lsn_buff,
LSN_STORE_SIZE,
(LOG_HEADER_DATA_SIZE - LSN_STORE_SIZE),
log_write_flags) != 0 ||
mysql_file_sync(file, MYF(MY_WME)) != 0);
/*
We should not increase counter in case of error above, but it is so
unlikely that we can ignore this case
*/
translog_syncs++;
DBUG_RETURN(rc);
}
|
O3
|
c
|
translog_max_lsn_to_header:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movl %edi, %ebx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movq %rsi, %rcx
shrq $0x20, %rcx
leaq -0x1f(%rbp), %rax
movb %cl, (%rax)
movq %rsi, %rcx
shrq $0x28, %rcx
movb %cl, 0x1(%rax)
movq %rsi, %rcx
shrq $0x30, %rcx
movb %cl, 0x2(%rax)
movl %esi, 0x3(%rax)
movl $0x7, %edx
movl $0x25, %ecx
movl $0x34, %r8d
movq %rax, %rsi
callq 0xa796a
movq %rax, %rcx
movb $0x1, %al
testq %rcx, %rcx
jne 0x6e2ff
leaq 0x322c03(%rip), %rax # 0x390ed8
movq (%rax), %rax
leaq -0x70(%rbp), %rdi
movl %ebx, %esi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x6e31e
movl $0x10, %esi
movl %ebx, %edi
callq 0xa875c
testl %eax, %eax
setne %al
incq 0x39b3a2(%rip) # 0x4096a8
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x6e334
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x24(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2e2ff
movl (%r14), %eax
jmp 0x6e2fa
callq 0x2a240
|
translog_max_lsn_to_header:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov ebx, edi
mov rax, fs:28h
mov [rbp+var_18], rax
mov rcx, rsi
shr rcx, 20h
lea rax, [rbp+var_1F]
mov [rax], cl
mov rcx, rsi
shr rcx, 28h
mov [rax+1], cl
mov rcx, rsi
shr rcx, 30h
mov [rax+2], cl
mov [rax+3], esi
mov edx, 7
mov ecx, 25h ; '%'
mov r8d, 34h ; '4'
mov rsi, rax
call my_pwrite
mov rcx, rax
mov al, 1
test rcx, rcx
jnz short loc_6E2FF
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_70]
mov esi, ebx
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz short loc_6E31E
mov esi, 10h
mov edi, ebx
call my_sync
loc_6E2FA:
test eax, eax
setnz al
loc_6E2FF:
inc cs:translog_syncs
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_6E334
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_6E31E:
lea r14, [rbp+var_24]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call translog_max_lsn_to_header_cold_1
mov eax, [r14]
jmp short loc_6E2FA
loc_6E334:
call ___stack_chk_fail
|
bool translog_max_lsn_to_header(long long a1, long long a2)
{
long long v2; // rcx
bool result; // al
long long v4; // rax
int v5; // eax
_BYTE v6[76]; // [rsp+0h] [rbp-70h] BYREF
int v7; // [rsp+4Ch] [rbp-24h] BYREF
_BYTE v8[3]; // [rsp+51h] [rbp-1Fh] BYREF
int v9; // [rsp+54h] [rbp-1Ch]
unsigned long long v10; // [rsp+58h] [rbp-18h]
v10 = __readfsqword(0x28u);
v8[0] = BYTE4(a2);
v8[1] = BYTE5(a2);
v8[2] = BYTE6(a2);
v9 = a2;
v2 = my_pwrite(a1, v8, 7LL, 37LL, 52LL);
result = 1;
if ( !v2 )
{
v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, (unsigned int)a1, 16LL);
if ( v4 )
{
translog_max_lsn_to_header_cold_1(v4, a1, &v7);
v5 = v7;
}
else
{
v5 = my_sync((unsigned int)a1, 16LL);
}
result = v5 != 0;
}
++translog_syncs;
return result;
}
|
translog_max_lsn_to_header:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV EBX,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,RSI
SHR RCX,0x20
LEA RAX,[RBP + -0x1f]
MOV byte ptr [RAX],CL
MOV RCX,RSI
SHR RCX,0x28
MOV byte ptr [RAX + 0x1],CL
MOV RCX,RSI
SHR RCX,0x30
MOV byte ptr [RAX + 0x2],CL
MOV dword ptr [RAX + 0x3],ESI
MOV EDX,0x7
MOV ECX,0x25
MOV R8D,0x34
MOV RSI,RAX
CALL 0x001a796a
MOV RCX,RAX
MOV AL,0x1
TEST RCX,RCX
JNZ 0x0016e2ff
LEA RAX,[0x490ed8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x70]
MOV ESI,EBX
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0016e31e
MOV ESI,0x10
MOV EDI,EBX
CALL 0x001a875c
LAB_0016e2fa:
TEST EAX,EAX
SETNZ AL
LAB_0016e2ff:
INC qword ptr [0x005096a8]
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0016e334
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_0016e31e:
LEA R14,[RBP + -0x24]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012e2ff
MOV EAX,dword ptr [R14]
JMP 0x0016e2fa
LAB_0016e334:
CALL 0x0012a240
|
bool translog_max_lsn_to_header(ulong param_1,int8 param_2)
{
long lVar1;
long in_FS_OFFSET;
bool bVar2;
int1 local_78 [76];
uint local_2c;
int1 local_27;
int1 local_26;
int1 local_25;
int4 local_24;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_27 = (int1)((ulong)param_2 >> 0x20);
local_26 = (int1)((ulong)param_2 >> 0x28);
local_25 = (int1)((ulong)param_2 >> 0x30);
local_24 = (int4)param_2;
lVar1 = my_pwrite(param_1,&local_27,7,0x25,0x34);
bVar2 = true;
if (lVar1 == 0) {
lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1 & 0xffffffff,0x10);
if (lVar1 == 0) {
local_2c = my_sync(param_1 & 0xffffffff,0x10);
}
else {
translog_max_lsn_to_header_cold_1(lVar1,param_1 & 0xffffffff,&local_2c);
}
bVar2 = local_2c != 0;
}
translog_syncs = translog_syncs + 1;
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return bVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
65,119 |
my_caseup_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_caseup_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_toupper_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
}
|
O0
|
c
|
my_caseup_utf16:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x599a8
jmp 0x599aa
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x50(%rbp), %rcx
movb %al, -0x61(%rbp)
jae 0x599db
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x50(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x599e4
jmp 0x59a3f
movq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5cf30
movl -0x44(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq *%rax
movl %eax, %ecx
movl -0x68(%rbp), %eax
cmpl %ecx, %eax
je 0x59a18
jmp 0x59a3f
movl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x44(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x599aa
movq -0x18(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
|
my_caseup_utf16:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_50], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_58], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_60], rax
jmp short $+2
loc_599A8:
jmp short $+2
loc_599AA:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_50]
mov [rbp+var_61], al
jnb short loc_599DB
mov rax, [rbp+var_38]
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_50]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_44], eax
cmp eax, 0
setnle al
mov [rbp+var_61], al
loc_599DB:
mov al, [rbp+var_61]
test al, 1
jnz short loc_599E4
jmp short loc_59A3F
loc_599E4:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_30]
call my_toupper_utf16
mov eax, [rbp+var_44]
mov [rbp+var_68], eax
mov rax, [rbp+var_40]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_58]
call rax
mov ecx, eax
mov eax, [rbp+var_68]
cmp eax, ecx
jz short loc_59A18
jmp short loc_59A3F
loc_59A18:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_44]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_599AA
loc_59A3F:
mov rax, [rbp+var_18]
add rsp, 70h
pop rbp
retn
|
long long my_caseup_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
bool v6; // [rsp+Fh] [rbp-61h]
long long v7; // [rsp+10h] [rbp-60h]
long long v8; // [rsp+18h] [rbp-58h]
unsigned long long v9; // [rsp+20h] [rbp-50h]
int v10; // [rsp+2Ch] [rbp-44h]
unsigned int ( *v11)(long long, _QWORD, long long, long long); // [rsp+30h] [rbp-40h]
long long ( *v12)(long long, _QWORD *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-38h]
_QWORD v13[2]; // [rsp+40h] [rbp-30h] BYREF
long long v14; // [rsp+50h] [rbp-20h]
long long v15; // [rsp+58h] [rbp-18h]
unsigned long long v16; // [rsp+60h] [rbp-10h]
long long v17; // [rsp+68h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13[1] = a5;
v12 = *(long long ( **)(long long, _QWORD *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL);
v11 = *(unsigned int ( **)(long long, _QWORD, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL);
v9 = a3 + a2;
v8 = a5 + a4;
v7 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v6 = 0;
if ( v16 < v9 )
{
v10 = v12(v17, v13, v16, v9);
v6 = v10 > 0;
}
if ( !v6 )
break;
my_toupper_utf16(v7, v13);
if ( v10 != v11(v17, v13[0], v14, v8) )
break;
v16 += v10;
v14 += v10;
}
return v15;
}
|
my_caseup_utf16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001599a8
LAB_001599a8:
JMP 0x001599aa
LAB_001599aa:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x50]
MOV byte ptr [RBP + -0x61],AL
JNC 0x001599db
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x61],AL
LAB_001599db:
MOV AL,byte ptr [RBP + -0x61]
TEST AL,0x1
JNZ 0x001599e4
JMP 0x00159a3f
LAB_001599e4:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x30]
CALL 0x0015cf30
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x68],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x58]
CALL RAX
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x68]
CMP EAX,ECX
JZ 0x00159a18
JMP 0x00159a3f
LAB_00159a18:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001599aa
LAB_00159a3f:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x70
POP RBP
RET
|
long my_caseup_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
code *pcVar1;
code *pcVar2;
int8 uVar3;
bool bVar4;
int iVar5;
int local_4c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar3 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar4 = false;
if (local_18 < param_2 + param_3) {
local_4c = (*pcVar1)(local_10,&local_38,local_18,param_2 + param_3);
bVar4 = 0 < local_4c;
}
if (!bVar4) break;
my_toupper_utf16(uVar3,&local_38);
iVar5 = (*pcVar2)(local_10,local_38,local_28,param_4 + param_5);
if (local_4c != iVar5) {
return local_20;
}
local_18 = local_18 + (long)local_4c;
local_28 = local_28 + local_4c;
}
return local_20;
}
|
|
65,120 |
net_stmt_close
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
static my_bool net_stmt_close(MYSQL_STMT *stmt, my_bool remove)
{
char stmt_id[STMT_ID_LENGTH];
MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root;
/* clear memory */
ma_free_root(&stmt->result.alloc, MYF(0)); /* allocated in mysql_stmt_store_result */
ma_free_root(&stmt->mem_root,MYF(0));
ma_free_root(fields_ma_alloc_root, MYF(0));
if (stmt->mysql)
{
CLEAR_CLIENT_ERROR(stmt->mysql);
/* remove from stmt list */
if (remove)
stmt->mysql->stmts= list_delete(stmt->mysql->stmts, &stmt->list);
/* check if all data are fetched */
if (stmt->mysql->status != MYSQL_STATUS_READY)
{
do {
stmt->mysql->methods->db_stmt_flush_unbuffered(stmt);
} while(mysql_stmt_more_results(stmt));
stmt->mysql->status= MYSQL_STATUS_READY;
}
if (stmt->state > MYSQL_STMT_INITTED)
{
int4store(stmt_id, stmt->stmt_id);
if (stmt->mysql->methods->db_command(stmt->mysql,COM_STMT_CLOSE, stmt_id,
sizeof(stmt_id), 1, stmt))
{
UPDATE_STMT_ERROR(stmt);
return 1;
}
}
}
return 0;
}
|
O0
|
c
|
net_stmt_close:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movq 0x340(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x3f420
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x3f420
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x3f420
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x43295
jmp 0x4305b
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, 0x90(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x27b2c(%rip), %rsi # 0x6abaf
callq 0x143d0
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x97(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
cmpq $0x0, 0x2a0(%rax)
je 0x430bf
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x2a0(%rax), %rax
movl $0x0, 0x4(%rax)
jmp 0x430c1
cmpb $0x0, -0x19(%rbp)
je 0x430f8
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4c8(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x320, %rsi # imm = 0x320
callq 0x3d5a0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rcx, 0x4c8(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x0, 0x488(%rax)
je 0x43143
jmp 0x4310b
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x78(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
movq -0x18(%rbp), %rdi
callq 0x46a20
cmpb $0x0, %al
jne 0x4310b
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, 0x488(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jbe 0x43293
jmp 0x43153
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movb %al, -0xc(%rbp)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x8, %rax
movb %al, -0xb(%rbp)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x10, %rax
movb %al, -0xa(%rbp)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x18, %rax
movb %al, -0x9(%rbp)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x38(%rcx), %rdi
leaq -0xc(%rbp), %rdx
movq -0x18(%rbp), %r9
movl $0x19, %esi
movl $0x4, %ecx
movl $0x1, %r8d
callq *%rax
cmpl $0x0, %eax
je 0x43291
jmp 0x431cb
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x108(%rax)
movq -0x18(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x14220
movq -0x18(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x18(%rbp), %rax
addq $0x10c, %rax # imm = 0x10C
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
cmpq $0x0, %rax
je 0x43248
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
movq %rax, -0x38(%rbp)
jmp 0x4326e
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x3dc4a(%rip), %rax # 0x80eb0
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x14220
movq -0x18(%rbp), %rax
movb $0x0, 0x30b(%rax)
movb $0x1, -0xd(%rbp)
jmp 0x43299
jmp 0x43293
jmp 0x43295
movb $0x0, -0xd(%rbp)
movb -0xd(%rbp), %al
movb %al, -0x39(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x432ba
movb -0x39(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
callq 0x144c0
nop
|
net_stmt_close:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, sil
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_18], rdi
mov [rbp+var_19], al
mov rax, [rbp+var_18]
mov rax, [rax+340h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
add rdi, 80h
add rdi, 10h
xor esi, esi
call ma_free_root
mov rdi, [rbp+var_18]
xor esi, esi
call ma_free_root
mov rdi, [rbp+var_28]
xor esi, esi
call ma_free_root
mov rax, [rbp+var_18]
cmp qword ptr [rax+38h], 0
jz loc_43295
jmp short $+2
loc_4305B:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 0
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 297h
lea rsi, a00000; "00000"
call _strcpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+97h], 0
mov rax, [rbp+var_18]
mov rax, [rax+38h]
cmp qword ptr [rax+2A0h], 0
jz short loc_430BF
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rax, [rax+2A0h]
mov dword ptr [rax+4], 0
loc_430BF:
jmp short $+2
loc_430C1:
cmp [rbp+var_19], 0
jz short loc_430F8
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rdi, [rax+4C8h]
mov rsi, [rbp+var_18]
add rsi, 320h
call list_delete
mov rcx, rax
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov [rax+4C8h], rcx
loc_430F8:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
cmp dword ptr [rax+488h], 0
jz short loc_43143
jmp short $+2
loc_4310B:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+78h]
mov rdi, [rbp+var_18]
call rax
mov rdi, [rbp+var_18]
call mysql_stmt_more_results
cmp al, 0
jnz short loc_4310B
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov dword ptr [rax+488h], 0
loc_43143:
mov rax, [rbp+var_18]
cmp dword ptr [rax+50h], 0
jbe loc_43293
jmp short $+2
loc_43153:
mov rax, [rbp+var_18]
mov rax, [rax+40h]
mov [rbp+var_C], al
mov rax, [rbp+var_18]
mov rax, [rax+40h]
shr rax, 8
mov [rbp+var_B], al
mov rax, [rbp+var_18]
mov rax, [rax+40h]
shr rax, 10h
mov [rbp+var_A], al
mov rax, [rbp+var_18]
mov rax, [rax+40h]
shr rax, 18h
mov [rbp+var_9], al
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+10h]
mov rcx, [rbp+var_18]
mov rdi, [rcx+38h]
lea rdx, [rbp+var_C]
mov r9, [rbp+var_18]
mov esi, 19h
mov ecx, 4
mov r8d, 1
call rax
cmp eax, 0
jz loc_43291
jmp short $+2
loc_431CB:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov ecx, [rax+90h]
mov rax, [rbp+var_18]
mov [rax+108h], ecx
mov rdi, [rbp+var_18]
add rdi, 30Dh
mov rax, [rbp+var_18]
mov rsi, [rax+38h]
add rsi, 297h
mov edx, 5
call _strncpy
mov rax, [rbp+var_18]
mov byte ptr [rax+312h], 0
mov rax, [rbp+var_18]
add rax, 10Ch
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+38h]
add rax, 97h
cmp rax, 0
jz short loc_43248
mov rax, [rbp+var_18]
mov rax, [rax+38h]
add rax, 97h
mov [rbp+var_38], rax
jmp short loc_4326E
loc_43248:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov eax, [rax+90h]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_38], rax
loc_4326E:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_18]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_D], 1
jmp short loc_43299
loc_43291:
jmp short $+2
loc_43293:
jmp short $+2
loc_43295:
mov [rbp+var_D], 0
loc_43299:
mov al, [rbp+var_D]
mov [rbp+var_39], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_432BA
mov al, [rbp+var_39]
add rsp, 40h
pop rbp
retn
loc_432BA:
call ___stack_chk_fail
|
char net_stmt_close(long long a1, char a2)
{
char *v2; // rax
_QWORD *v4; // [rsp+18h] [rbp-28h]
_BYTE v6[4]; // [rsp+34h] [rbp-Ch] BYREF
unsigned long long v7; // [rsp+38h] [rbp-8h]
v7 = __readfsqword(0x28u);
v4 = *(_QWORD **)(a1 + 832);
ma_free_root((_QWORD *)(a1 + 144), 0);
ma_free_root((_QWORD *)a1, 0);
ma_free_root(v4, 0);
if ( !*(_QWORD *)(a1 + 56) )
return 0;
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 0;
strcpy(*(_QWORD *)(a1 + 56) + 663LL, "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) )
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) + 4LL) = 0;
if ( a2 )
*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1224LL) = list_delete(
*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1224LL),
(_QWORD *)(a1 + 800));
if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) )
{
do
(*(void ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 120LL))(a1);
while ( (unsigned __int8)mysql_stmt_more_results(a1) );
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 0;
}
if ( !*(_DWORD *)(a1 + 80) )
return 0;
v6[0] = *(_QWORD *)(a1 + 64);
v6[1] = BYTE1(*(_QWORD *)(a1 + 64));
v6[2] = BYTE2(*(_QWORD *)(a1 + 64));
v6[3] = BYTE3(*(_QWORD *)(a1 + 64));
if ( !(*(unsigned int ( **)(_QWORD, long long, _BYTE *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL)
+ 16LL))(
*(_QWORD *)(a1 + 56),
25LL,
v6,
4LL,
1LL,
a1) )
return 0;
*(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL);
strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL);
*(_BYTE *)(a1 + 786) = 0;
if ( *(_QWORD *)(a1 + 56) == -151LL )
v2 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000];
else
v2 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
strncpy(a1 + 268, v2, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
|
net_stmt_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV AL,SIL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x18],RDI
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x340]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x80
ADD RDI,0x10
XOR ESI,ESI
CALL 0x0013f420
MOV RDI,qword ptr [RBP + -0x18]
XOR ESI,ESI
CALL 0x0013f420
MOV RDI,qword ptr [RBP + -0x28]
XOR ESI,ESI
CALL 0x0013f420
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x00143295
JMP 0x0014305b
LAB_0014305b:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RSI,[0x16abaf]
CALL 0x001143d0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x97],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
CMP qword ptr [RAX + 0x2a0],0x0
JZ 0x001430bf
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x2a0]
MOV dword ptr [RAX + 0x4],0x0
LAB_001430bf:
JMP 0x001430c1
LAB_001430c1:
CMP byte ptr [RBP + -0x19],0x0
JZ 0x001430f8
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RAX + 0x4c8]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x320
CALL 0x0013d5a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RAX + 0x4c8],RCX
LAB_001430f8:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
CMP dword ptr [RAX + 0x488],0x0
JZ 0x00143143
JMP 0x0014310b
LAB_0014310b:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x78]
MOV RDI,qword ptr [RBP + -0x18]
CALL RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00146a20
CMP AL,0x0
JNZ 0x0014310b
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x488],0x0
LAB_00143143:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x50],0x0
JBE 0x00143293
JMP 0x00143153
LAB_00143153:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
MOV byte ptr [RBP + -0xc],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x8
MOV byte ptr [RBP + -0xb],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x10
MOV byte ptr [RBP + -0xa],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x18
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RCX + 0x38]
LEA RDX,[RBP + -0xc]
MOV R9,qword ptr [RBP + -0x18]
MOV ESI,0x19
MOV ECX,0x4
MOV R8D,0x1
CALL RAX
CMP EAX,0x0
JZ 0x00143291
JMP 0x001431cb
LAB_001431cb:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x108],ECX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x30d
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x38]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00114220
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x312],0x0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x10c
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
CMP RAX,0x0
JZ 0x00143248
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0014326e
LAB_00143248:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x90]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x180eb0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014326e:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x200
CALL 0x00114220
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x30b],0x0
MOV byte ptr [RBP + -0xd],0x1
JMP 0x00143299
LAB_00143291:
JMP 0x00143293
LAB_00143293:
JMP 0x00143295
LAB_00143295:
MOV byte ptr [RBP + -0xd],0x0
LAB_00143299:
MOV AL,byte ptr [RBP + -0xd]
MOV byte ptr [RBP + -0x39],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001432ba
MOV AL,byte ptr [RBP + -0x39]
ADD RSP,0x40
POP RBP
RET
LAB_001432ba:
CALL 0x001144c0
|
int8 net_stmt_close(long param_1,char param_2)
{
char cVar1;
int iVar2;
int8 uVar3;
long in_FS_OFFSET;
char *local_40;
int1 local_15;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = *(int8 *)(param_1 + 0x340);
ma_free_root(param_1 + 0x90,0);
ma_free_root(param_1,0);
ma_free_root(uVar3,0);
if (*(long *)(param_1 + 0x38) != 0) {
*(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0;
strcpy((char *)(*(long *)(param_1 + 0x38) + 0x297),"00000");
*(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0;
if (*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) != 0) {
*(int4 *)(*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) + 4) = 0;
}
if (param_2 != '\0') {
uVar3 = list_delete(*(int8 *)(*(long *)(param_1 + 0x38) + 0x4c8),param_1 + 800);
*(int8 *)(*(long *)(param_1 + 0x38) + 0x4c8) = uVar3;
}
if (*(int *)(*(long *)(param_1 + 0x38) + 0x488) != 0) {
do {
(**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x78))(param_1);
cVar1 = mysql_stmt_more_results(param_1);
} while (cVar1 != '\0');
*(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 0;
}
if (*(int *)(param_1 + 0x50) != 0) {
local_14 = (int1)*(int8 *)(param_1 + 0x40);
local_13 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 8);
local_12 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10);
local_11 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18);
iVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10))
(*(int8 *)(param_1 + 0x38),0x19,&local_14,4,1,param_1);
if (iVar2 != 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
if (*(long *)(param_1 + 0x38) == -0x97) {
local_40 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000];
}
else {
local_40 = (char *)(*(long *)(param_1 + 0x38) + 0x97);
}
strncpy((char *)(param_1 + 0x10c),local_40,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_15 = 1;
goto LAB_00143299;
}
}
}
local_15 = 0;
LAB_00143299:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_15);
}
|
|
65,121 |
wsystem_ctrl
|
navaro[P]qoraal-tictactoe/src/services/www/html/wsystem.c
|
const char*
wsystem_ctrl (HTTP_USER_T *user, uint32_t method, char* endpoint, uint32_t type)
{
if (type == WSERVER_CTRL_METADATA_HEADING) {
return "System" ;
}
if (type == WSERVER_CTRL_METADATA_HEADERS) {
char* groupname = strchr (endpoint, '?') ;
if (groupname) {
groupname++ ;
}
if (groupname && strncmp(groupname, "reset", 5) == 0) {
return "<meta http-equiv=\"refresh\" content=\"5; url=/\">" ;
}
}
return 0 ;
}
|
O3
|
c
|
wsystem_ctrl:
cmpl $0x3, %ecx
je 0x13853
pushq %rbp
movq %rsp, %rbp
cmpl $0x2, %ecx
jne 0x1384f
movq %rdx, %rdi
movl $0x3f, %esi
callq 0x61d0
testq %rax, %rax
je 0x1384f
incq %rax
leaq 0x170de(%rip), %rsi # 0x2a91c
movl $0x5, %edx
movq %rax, %rdi
callq 0x60a0
testl %eax, %eax
je 0x1385b
xorl %eax, %eax
popq %rbp
retq
leaq 0x170bb(%rip), %rax # 0x2a915
retq
leaq 0x170c0(%rip), %rax # 0x2a922
jmp 0x13851
|
wsystem_ctrl:
cmp ecx, 3
jz short loc_13853
push rbp
mov rbp, rsp
cmp ecx, 2
jnz short loc_1384F
mov rdi, rdx
mov esi, 3Fh ; '?'
call _strchr
test rax, rax
jz short loc_1384F
inc rax
lea rsi, aReset; "reset"
mov edx, 5
mov rdi, rax
call _strncmp
test eax, eax
jz short loc_1385B
loc_1384F:
xor eax, eax
loc_13851:
pop rbp
retn
loc_13853:
lea rax, aSystem; "System"
retn
loc_1385B:
lea rax, aMetaHttpEquivR_1; "<meta http-equiv=\"refresh\" content=\""...
jmp short loc_13851
|
char * wsystem_ctrl(long long a1, long long a2, long long a3, int a4)
{
long long v4; // rax
if ( a4 == 3 )
return aSystem;
if ( a4 == 2 )
{
v4 = strchr(a3, 63LL);
if ( v4 )
{
if ( !(unsigned int)strncmp(v4 + 1, aReset, 5LL) )
return aMetaHttpEquivR_1;
}
}
return 0LL;
}
|
wsystem_ctrl:
CMP ECX,0x3
JZ 0x00113853
PUSH RBP
MOV RBP,RSP
CMP ECX,0x2
JNZ 0x0011384f
MOV RDI,RDX
MOV ESI,0x3f
CALL 0x001061d0
TEST RAX,RAX
JZ 0x0011384f
INC RAX
LEA RSI,[0x12a91c]
MOV EDX,0x5
MOV RDI,RAX
CALL 0x001060a0
TEST EAX,EAX
JZ 0x0011385b
LAB_0011384f:
XOR EAX,EAX
LAB_00113851:
POP RBP
RET
LAB_00113853:
LEA RAX,[0x12a915]
RET
LAB_0011385b:
LEA RAX,[0x12a922]
JMP 0x00113851
|
char * wsystem_ctrl(int8 param_1,int8 param_2,char *param_3,int param_4)
{
int iVar1;
char *pcVar2;
if (param_4 == 3) {
return s_System_0012a915;
}
if (((param_4 == 2) && (pcVar2 = strchr(param_3,0x3f), pcVar2 != (char *)0x0)) &&
(iVar1 = strncmp(pcVar2 + 1,s_reset_0012a91c,5), iVar1 == 0)) {
return s_<meta_http_equiv__refresh__conte_0012a922;
}
return (char *)0x0;
}
|
|
65,122 |
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>::basic_json<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>>, 0>(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>> const&)
|
llama.cpp/common/json.hpp
|
basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}
|
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>::basic_json<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>>, 0>(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>> const&):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xd10bc
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x858ca
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x858ca
movq %r14, %rdi
xorl %esi, %esi
callq 0x858ca
movq %r14, %rdi
callq 0x89fe4
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea r14, [rsp+28h+var_20]
mov rdi, 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)
movups xmm0, xmmword ptr [r14]
movups xmmword ptr [rbx], xmm0
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 byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, rbx
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
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()
add rsp, 18h
pop rbx
pop r14
retn
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_(
char *a1,
long long a2)
{
_OWORD v3[2]; // [rsp+8h] [rbp-20h] BYREF
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(
(unsigned __int8 *)v3,
a2);
*(_OWORD *)a1 = v3[0];
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v3);
LOBYTE(v3[0]) = 0;
*((_QWORD *)&v3[0] + 1) = 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(a1);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v3);
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(v3);
}
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001d10bc
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RBX],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x001858ca
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,RBX
MOV ESI,0x1
CALL 0x001858ca
MOV RDI,R14
XOR ESI,ESI
CALL 0x001858ca
MOV RDI,R14
CALL 0x00189fe4
ADD RSP,0x18
POP RBX
POP R14
RET
|
void _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_
(int8 *param_1)
{
bool bVar1;
data local_20;
int7 uStack_1f;
int8 uStack_18;
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>>
::moved_or_copied();
*param_1 = CONCAT71(uStack_1f,local_20);
param_1[1] = uStack_18;
bVar1 = SUB81(&local_20,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(bVar1);
local_20 = (data)0x0;
uStack_18 = 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(param_1,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(bVar1);
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_20);
return;
}
|
|
65,123 |
ma_dynmap_file
|
eloqsql/storage/maria/ma_dynrec.c
|
my_bool _ma_dynmap_file(MARIA_HA *info, my_off_t size)
{
DBUG_ENTER("_ma_dynmap_file");
if (size > (my_off_t) (~((size_t) 0)) - MEMMAP_EXTRA_MARGIN)
{
DBUG_PRINT("warning", ("File is too large for mmap"));
DBUG_RETURN(1);
}
/*
Ingo wonders if it is good to use MAP_NORESERVE. From the Linux man page:
MAP_NORESERVE
Do not reserve swap space for this mapping. When swap space is
reserved, one has the guarantee that it is possible to modify the
mapping. When swap space is not reserved one might get SIGSEGV
upon a write if no physical memory is available.
*/
info->s->file_map= (uchar*)
my_mmap(0, (size_t)(size + MEMMAP_EXTRA_MARGIN),
info->s->mode==O_RDONLY ? PROT_READ :
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_NORESERVE,
info->dfile.file, 0L);
if (info->s->file_map == (uchar*) MAP_FAILED)
{
info->s->file_map= NULL;
DBUG_RETURN(1);
}
#if defined(HAVE_MADVISE)
madvise((char*) info->s->file_map, size, MADV_RANDOM);
#endif
info->s->mmaped_length= size;
DBUG_RETURN(0);
}
|
O0
|
c
|
ma_dynmap_file:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $-0x8, -0x18(%rbp)
jbe 0x4e3e6
jmp 0x4e3d9
jmp 0x4e3db
jmp 0x4e3dd
movb $0x1, -0x1(%rbp)
jmp 0x4e49a
movq -0x18(%rbp), %rsi
addq $0x7, %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x7a4(%rax), %ecx
movl $0x3, %edx
movl $0x1, %eax
cmpl $0x0, %ecx
cmovel %eax, %edx
movq -0x10(%rbp), %rax
movl 0x480(%rax), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x4001, %ecx # imm = 0x4001
movq %r9, %rdi
callq 0x2a5a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x5f0(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq $-0x1, %rcx
cmpq %rcx, 0x5f0(%rax)
jne 0x4e468
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq $0x0, 0x5f0(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x4e49a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x5f0(%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x2a450
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xa00(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_dynmap_file:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_18], 0FFFFFFFFFFFFFFF8h
jbe short loc_4E3E6
jmp short $+2
loc_4E3D9:
jmp short $+2
loc_4E3DB:
jmp short $+2
loc_4E3DD:
mov [rbp+var_1], 1
jmp loc_4E49A
loc_4E3E6:
mov rsi, [rbp+var_18]
add rsi, 7
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rax+7A4h]
mov edx, 3
mov eax, 1
cmp ecx, 0
cmovz edx, eax
mov rax, [rbp+var_10]
mov r8d, [rax+480h]
xor eax, eax
mov r9d, eax
mov ecx, 4001h
mov rdi, r9
call _mmap64
mov rcx, rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+5F0h], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, 0FFFFFFFFFFFFFFFFh
cmp [rax+5F0h], rcx
jnz short loc_4E468
mov rax, [rbp+var_10]
mov rax, [rax]
mov qword ptr [rax+5F0h], 0
mov [rbp+var_1], 1
jmp short loc_4E49A
loc_4E468:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdi, [rax+5F0h]
mov rsi, [rbp+var_18]
mov edx, 1
call _madvise
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+0A00h], rcx
mov [rbp+var_1], 0
loc_4E49A:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char ma_dynmap_file(unsigned int *a1, unsigned long long a2)
{
long long v2; // rdx
if ( a2 > 0xFFFFFFFFFFFFFFF8LL )
return 1;
v2 = 3LL;
if ( !*(_DWORD *)(*(_QWORD *)a1 + 1956LL) )
v2 = 1LL;
*(_QWORD *)(*(_QWORD *)a1 + 1520LL) = mmap64(0LL, a2 + 7, v2, 16385LL, a1[288]);
if ( *(_QWORD *)(*(_QWORD *)a1 + 1520LL) == -1LL )
{
*(_QWORD *)(*(_QWORD *)a1 + 1520LL) = 0LL;
return 1;
}
else
{
madvise(*(_QWORD *)(*(_QWORD *)a1 + 1520LL), a2, 1LL);
*(_QWORD *)(*(_QWORD *)a1 + 2560LL) = a2;
return 0;
}
}
|
_ma_dynmap_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x18],-0x8
JBE 0x0014e3e6
JMP 0x0014e3d9
LAB_0014e3d9:
JMP 0x0014e3db
LAB_0014e3db:
JMP 0x0014e3dd
LAB_0014e3dd:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014e49a
LAB_0014e3e6:
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x7
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x7a4]
MOV EDX,0x3
MOV EAX,0x1
CMP ECX,0x0
CMOVZ EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RAX + 0x480]
XOR EAX,EAX
MOV R9D,EAX
MOV ECX,0x4001
MOV RDI,R9
CALL 0x0012a5a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x5f0],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,-0x1
CMP qword ptr [RAX + 0x5f0],RCX
JNZ 0x0014e468
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x5f0],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014e49a
LAB_0014e468:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x5f0]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x1
CALL 0x0012a450
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xa00],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_0014e49a:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 _ma_dynmap_file(long *param_1,ulong param_2)
{
void *pvVar1;
int __prot;
int1 local_9;
if (param_2 < 0xfffffffffffffff9) {
__prot = 3;
if (*(int *)(*param_1 + 0x7a4) == 0) {
__prot = 1;
}
pvVar1 = mmap64((void *)0x0,param_2 + 7,__prot,0x4001,(int)param_1[0x90],0);
*(void **)(*param_1 + 0x5f0) = pvVar1;
if (*(long *)(*param_1 + 0x5f0) == -1) {
*(int8 *)(*param_1 + 0x5f0) = 0;
local_9 = 1;
}
else {
madvise(*(void **)(*param_1 + 0x5f0),param_2,1);
*(ulong *)(*param_1 + 0xa00) = param_2;
local_9 = 0;
}
}
else {
local_9 = 1;
}
return local_9;
}
|
|
65,124 |
ma_dynmap_file
|
eloqsql/storage/maria/ma_dynrec.c
|
my_bool _ma_dynmap_file(MARIA_HA *info, my_off_t size)
{
DBUG_ENTER("_ma_dynmap_file");
if (size > (my_off_t) (~((size_t) 0)) - MEMMAP_EXTRA_MARGIN)
{
DBUG_PRINT("warning", ("File is too large for mmap"));
DBUG_RETURN(1);
}
/*
Ingo wonders if it is good to use MAP_NORESERVE. From the Linux man page:
MAP_NORESERVE
Do not reserve swap space for this mapping. When swap space is
reserved, one has the guarantee that it is possible to modify the
mapping. When swap space is not reserved one might get SIGSEGV
upon a write if no physical memory is available.
*/
info->s->file_map= (uchar*)
my_mmap(0, (size_t)(size + MEMMAP_EXTRA_MARGIN),
info->s->mode==O_RDONLY ? PROT_READ :
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_NORESERVE,
info->dfile.file, 0L);
if (info->s->file_map == (uchar*) MAP_FAILED)
{
info->s->file_map= NULL;
DBUG_RETURN(1);
}
#if defined(HAVE_MADVISE)
madvise((char*) info->s->file_map, size, MADV_RANDOM);
#endif
info->s->mmaped_length= size;
DBUG_RETURN(0);
}
|
O3
|
c
|
ma_dynmap_file:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %bl
cmpq $-0x8, %rsi
ja 0x46ae8
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
xorl %ecx, %ecx
cmpl $0x0, 0x7a4(%rax)
leaq 0x7(%rsi), %rsi
setne %cl
leal 0x1(,%rcx,2), %edx
movl 0x480(%rdi), %r8d
xorl %edi, %edi
movl $0x4001, %ecx # imm = 0x4001
xorl %r9d, %r9d
callq 0x295e0
movq (%r15), %rcx
movq %rax, 0x5f0(%rcx)
movq (%r15), %rax
movq 0x5f0(%rax), %rdi
cmpq $-0x1, %rdi
je 0x46add
movq %r14, %rsi
movl $0x1, %edx
callq 0x29480
movq (%r15), %rax
movq %r14, 0xa00(%rax)
xorl %ebx, %ebx
jmp 0x46ae8
movq $0x0, 0x5f0(%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ma_dynmap_file:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov bl, 1
cmp rsi, 0FFFFFFFFFFFFFFF8h
ja short loc_46AE8
mov r14, rsi
mov r15, rdi
mov rax, [rdi]
xor ecx, ecx
cmp dword ptr [rax+7A4h], 0
lea rsi, [rsi+7]
setnz cl
lea edx, ds:1[rcx*2]
mov r8d, [rdi+480h]
xor edi, edi
mov ecx, 4001h
xor r9d, r9d
call _mmap64
mov rcx, [r15]
mov [rcx+5F0h], rax
mov rax, [r15]
mov rdi, [rax+5F0h]
cmp rdi, 0FFFFFFFFFFFFFFFFh
jz short loc_46ADD
mov rsi, r14
mov edx, 1
call _madvise
mov rax, [r15]
mov [rax+0A00h], r14
xor ebx, ebx
jmp short loc_46AE8
loc_46ADD:
mov qword ptr [rax+5F0h], 0
loc_46AE8:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long ma_dynmap_file(unsigned int *a1, unsigned long long a2)
{
long long v2; // rax
unsigned int v3; // ebx
long long v5; // rax
long long v6; // rdi
LOBYTE(v3) = 1;
if ( a2 <= 0xFFFFFFFFFFFFFFF8LL )
{
*(_QWORD *)(*(_QWORD *)a1 + 1520LL) = mmap64(
0LL,
a2 + 7,
2 * (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 1956LL) != 0) + 1,
16385LL,
a1[288],
0LL,
v2);
v5 = *(_QWORD *)a1;
v6 = *(_QWORD *)(*(_QWORD *)a1 + 1520LL);
if ( v6 == -1 )
{
*(_QWORD *)(v5 + 1520) = 0LL;
}
else
{
madvise(v6, a2, 1LL);
*(_QWORD *)(*(_QWORD *)a1 + 2560LL) = a2;
return 0;
}
}
return v3;
}
|
_ma_dynmap_file:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV BL,0x1
CMP RSI,-0x8
JA 0x00146ae8
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI]
XOR ECX,ECX
CMP dword ptr [RAX + 0x7a4],0x0
LEA RSI,[RSI + 0x7]
SETNZ CL
LEA EDX,[0x1 + RCX*0x2]
MOV R8D,dword ptr [RDI + 0x480]
XOR EDI,EDI
MOV ECX,0x4001
XOR R9D,R9D
CALL 0x001295e0
MOV RCX,qword ptr [R15]
MOV qword ptr [RCX + 0x5f0],RAX
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX + 0x5f0]
CMP RDI,-0x1
JZ 0x00146add
MOV RSI,R14
MOV EDX,0x1
CALL 0x00129480
MOV RAX,qword ptr [R15]
MOV qword ptr [RAX + 0xa00],R14
XOR EBX,EBX
JMP 0x00146ae8
LAB_00146add:
MOV qword ptr [RAX + 0x5f0],0x0
LAB_00146ae8:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong _ma_dynmap_file(long *param_1,ulong param_2)
{
void *pvVar1;
int8 unaff_RBX;
ulong uVar2;
uVar2 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (param_2 < 0xfffffffffffffff9) {
pvVar1 = mmap64((void *)0x0,param_2 + 7,(uint)(*(int *)(*param_1 + 0x7a4) != 0) * 2 + 1,0x4001,
(int)param_1[0x90],0);
*(void **)(*param_1 + 0x5f0) = pvVar1;
pvVar1 = *(void **)(*param_1 + 0x5f0);
if (pvVar1 == (void *)0xffffffffffffffff) {
*(int8 *)(*param_1 + 0x5f0) = 0;
}
else {
madvise(pvVar1,param_2,1);
*(ulong *)(*param_1 + 0xa00) = param_2;
uVar2 = 0;
}
}
return uVar2 & 0xffffffff;
}
|
|
65,125 |
lunasvg::SVGNumberList::parse(std::basic_string_view<char, std::char_traits<char>>)
|
dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp
|
bool SVGNumberList::parse(std::string_view input)
{
m_values.clear();
stripLeadingSpaces(input);
while(!input.empty()) {
float value = 0.f;
if(!parseNumber(input, value))
return false;
skipOptionalSpacesOrComma(input);
m_values.push_back(value);
}
return true;
}
|
O1
|
cpp
|
lunasvg::SVGNumberList::parse(std::basic_string_view<char, std::char_traits<char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x10(%rdi), %rax
cmpq %rax, 0x18(%rdi)
je 0x1fb37
movq %rax, 0x18(%rbx)
testq %rsi, %rsi
je 0x1fb91
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
leaq (%rdx,%rsi), %rax
movabsq $0x100002600, %r8 # imm = 0x100002600
xorl %r9d, %r9d
movq %rdx, %r10
movq %rsi, %r11
movzbl (%rdx,%r9), %r14d
cmpq $0x20, %r14
ja 0x1fb87
btq %r14, %r8
jae 0x1fb87
incq %r10
decq %r11
incq %r9
movq %r11, %rcx
movq %r10, %rdi
cmpq %r9, %rsi
jne 0x1fb5d
xorl %ecx, %ecx
movq %rax, %rdi
movq %rdi, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
leaq 0x10(%rbx), %r14
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq 0x8(%rsp), %r13
testq %r13, %r13
je 0x1fbfd
movl $0x0, 0x4(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x172e2
testb %al, %al
je 0x1fbfd
movl %eax, %ebp
movq %r15, %rdi
movl $0x2c, %esi
callq 0x176d5
movq 0x18(%rbx), %rsi
cmpq 0x20(%rbx), %rsi
je 0x1fbed
movss 0x4(%rsp), %xmm0
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rbx)
jmp 0x1fbf8
movq %r14, %rdi
movq %r12, %rdx
callq 0x20af2
testb %bpl, %bpl
jne 0x1fb9f
testq %r13, %r13
sete %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN7lunasvg13SVGNumberList5parseESt17basic_string_viewIcSt11char_traitsIcEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov [rsp+48h+var_40], rsi
mov [rsp+48h+var_38], rdx
mov rax, [rdi+10h]
cmp [rdi+18h], rax
jz short loc_1FB37
mov [rbx+18h], rax
loc_1FB37:
test rsi, rsi
jz short loc_1FB91
mov rcx, [rsp+48h+var_40]
mov rdi, [rsp+48h+var_38]
lea rax, [rdx+rsi]
mov r8, 100002600h
xor r9d, r9d
mov r10, rdx
mov r11, rsi
loc_1FB5D:
movzx r14d, byte ptr [rdx+r9]
cmp r14, 20h ; ' '
ja short loc_1FB87
bt r8, r14
jnb short loc_1FB87
inc r10
dec r11
inc r9
mov rcx, r11
mov rdi, r10
cmp rsi, r9
jnz short loc_1FB5D
xor ecx, ecx
mov rdi, rax
loc_1FB87:
mov [rsp+48h+var_38], rdi
mov [rsp+48h+var_40], rcx
loc_1FB91:
lea r14, [rbx+10h]
lea r15, [rsp+48h+var_40]
lea r12, [rsp+48h+var_44]
loc_1FB9F:
mov r13, [rsp+48h+var_40]
test r13, r13
jz short loc_1FBFD
mov [rsp+48h+var_44], 0
mov rdi, r15
mov rsi, r12
call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &)
test al, al
jz short loc_1FBFD
mov ebp, eax
mov rdi, r15
mov esi, 2Ch ; ','
call _ZN7lunasvg29skipOptionalSpacesOrDelimiterERSt17basic_string_viewIcSt11char_traitsIcEEc; lunasvg::skipOptionalSpacesOrDelimiter(std::string_view &,char)
mov rsi, [rbx+18h]
cmp rsi, [rbx+20h]
jz short loc_1FBED
movss xmm0, [rsp+48h+var_44]
movss dword ptr [rsi], xmm0
add rsi, 4
mov [rbx+18h], rsi
jmp short loc_1FBF8
loc_1FBED:
mov rdi, r14
mov rdx, r12
call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJRKfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float const&>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float const&)
loc_1FBF8:
test bpl, bpl
jnz short loc_1FB9F
loc_1FBFD:
test r13, r13
setz al
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
bool lunasvg::SVGNumberList::parse(_QWORD *a1, long long a2, long long a3)
{
long long v4; // rax
long long v5; // rcx
long long v6; // rdi
long long v7; // r8
long long v8; // r9
long long v9; // r10
long long v10; // r11
unsigned long long v11; // r14
long long v12; // r13
_DWORD *v13; // rsi
int v15; // [rsp+4h] [rbp-44h] BYREF
long long v16; // [rsp+8h] [rbp-40h] BYREF
long long v17; // [rsp+10h] [rbp-38h]
v16 = a2;
v17 = a3;
v4 = a1[2];
if ( a1[3] != v4 )
a1[3] = v4;
if ( a2 )
{
v5 = v16;
v6 = v17;
v7 = 0x100002600LL;
v8 = 0LL;
v9 = a3;
v10 = a2;
while ( 1 )
{
v11 = *(unsigned __int8 *)(a3 + v8);
if ( v11 > 0x20 || !_bittest64(&v7, v11) )
break;
++v9;
--v10;
++v8;
v5 = v10;
v6 = v9;
if ( a2 == v8 )
{
v5 = 0LL;
v6 = a3 + a2;
break;
}
}
v17 = v6;
v16 = v5;
}
while ( 1 )
{
v12 = v16;
if ( !v16 )
break;
v15 = 0;
if ( !lunasvg::parseNumber<float>(&v16, (float *)&v15) )
break;
lunasvg::skipOptionalSpacesOrDelimiter(&v16, 44);
v13 = (_DWORD *)a1[3];
if ( v13 == (_DWORD *)a1[4] )
{
std::vector<float>::_M_realloc_insert<float const&>(a1 + 2, v13, &v15);
}
else
{
*v13 = v15;
a1[3] = v13 + 1;
}
}
return v12 == 0;
}
|
parse:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RDI + 0x10]
CMP qword ptr [RDI + 0x18],RAX
JZ 0x0011fb37
MOV qword ptr [RBX + 0x18],RAX
LAB_0011fb37:
TEST RSI,RSI
JZ 0x0011fb91
MOV RCX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
LEA RAX,[RDX + RSI*0x1]
MOV R8,0x100002600
XOR R9D,R9D
MOV R10,RDX
MOV R11,RSI
LAB_0011fb5d:
MOVZX R14D,byte ptr [RDX + R9*0x1]
CMP R14,0x20
JA 0x0011fb87
BT R8,R14
JNC 0x0011fb87
INC R10
DEC R11
INC R9
MOV RCX,R11
MOV RDI,R10
CMP RSI,R9
JNZ 0x0011fb5d
XOR ECX,ECX
MOV RDI,RAX
LAB_0011fb87:
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RCX
LAB_0011fb91:
LEA R14,[RBX + 0x10]
LEA R15,[RSP + 0x8]
LEA R12,[RSP + 0x4]
LAB_0011fb9f:
MOV R13,qword ptr [RSP + 0x8]
TEST R13,R13
JZ 0x0011fbfd
MOV dword ptr [RSP + 0x4],0x0
MOV RDI,R15
MOV RSI,R12
CALL 0x001172e2
TEST AL,AL
JZ 0x0011fbfd
MOV EBP,EAX
MOV RDI,R15
MOV ESI,0x2c
CALL 0x001176d5
MOV RSI,qword ptr [RBX + 0x18]
CMP RSI,qword ptr [RBX + 0x20]
JZ 0x0011fbed
MOVSS XMM0,dword ptr [RSP + 0x4]
MOVSS dword ptr [RSI],XMM0
ADD RSI,0x4
MOV qword ptr [RBX + 0x18],RSI
JMP 0x0011fbf8
LAB_0011fbed:
MOV RDI,R14
MOV RDX,R12
CALL 0x00120af2
LAB_0011fbf8:
TEST BPL,BPL
JNZ 0x0011fb9f
LAB_0011fbfd:
TEST R13,R13
SETZ AL
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* lunasvg::SVGNumberList::parse(std::basic_string_view<char, std::char_traits<char> >) */
bool lunasvg::SVGNumberList::parse(long param_1,long param_2,long param_3)
{
float *pfVar1;
bool bVar2;
long lVar3;
float local_44;
long local_40;
long local_38;
if (*(long *)(param_1 + 0x18) != *(long *)(param_1 + 0x10)) {
*(long *)(param_1 + 0x18) = *(long *)(param_1 + 0x10);
}
local_40 = param_2;
local_38 = param_3;
if (param_2 != 0) {
lVar3 = 0;
local_38 = param_3;
do {
if ((0x20 < (ulong)*(byte *)(param_3 + lVar3)) ||
((0x100002600U >> ((ulong)*(byte *)(param_3 + lVar3) & 0x3f) & 1) == 0)) goto LAB_0011fb91;
local_38 = local_38 + 1;
local_40 = local_40 + -1;
lVar3 = lVar3 + 1;
} while (param_2 != lVar3);
local_40 = 0;
local_38 = param_3 + param_2;
}
LAB_0011fb91:
do {
lVar3 = local_40;
if (local_40 == 0) break;
local_44 = 0.0;
bVar2 = parseNumber<float>((basic_string_view *)&local_40,&local_44);
if (!bVar2) break;
skipOptionalSpacesOrDelimiter((basic_string_view *)&local_40,',');
pfVar1 = *(float **)(param_1 + 0x18);
if (pfVar1 == *(float **)(param_1 + 0x20)) {
std::vector<float,std::allocator<float>>::_M_realloc_insert<float_const&>
((vector<float,std::allocator<float>> *)(param_1 + 0x10),pfVar1,&local_44);
}
else {
*pfVar1 = local_44;
*(float **)(param_1 + 0x18) = pfVar1 + 1;
}
} while (bVar2);
return lVar3 == 0;
}
|
|
65,126 |
my_wildcmp_uca_impl
|
eloqsql/strings/ctype-uca.c
|
static
int my_wildcmp_uca_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
my_wc_t s_wc, w_wc;
int scan;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (1)
{
my_bool escaped= 0;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
result= 1; /* Found an anchor char */
break;
}
wildstr+= scan;
if (w_wc == (my_wc_t) escape && wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
escaped= 1;
}
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
if (!escaped && w_wc == (my_wc_t) w_one)
{
result= 1; /* Found an anchor char */
}
else
{
if (my_uca_charcmp(cs,s_wc,w_wc))
return 1; /* No match */
}
if (wildstr == wildend)
return (str != str_end); /* Match if both are at end */
}
if (w_wc == (my_wc_t) w_many)
{ /* Found w_many */
/* Remove any '%' and '_' from the wild search string */
for ( ; wildstr != wildend ; )
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
wildstr+= scan;
continue;
}
if (w_wc == (my_wc_t) w_one)
{
wildstr+= scan;
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return 0; /* Ok if w_many is last */
if (str == str_end)
return -1;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
if (w_wc == (my_wc_t) escape)
{
if (wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
}
}
while (1)
{
/* Skip until the first character from wildstr is found */
while (str != str_end)
{
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
if (!my_uca_charcmp(cs,s_wc,w_wc))
break;
str+= scan;
}
if (str == str_end)
return -1;
str+= scan;
result= my_wildcmp_uca_impl(cs, str, str_end, wildstr, wildend,
escape, w_one, w_many,
recurse_level + 1);
if (result <= 0)
return result;
}
}
}
return (str != str_end ? 1 : 0);
}
|
O0
|
c
|
my_wildcmp_uca_impl:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
leaq 0x354163(%rip), %rax # 0x406d40
cmpq $0x0, (%rax)
je 0xb2c03
leaq 0x354156(%rip), %rax # 0x406d40
movq (%rax), %rax
movl 0x20(%rbp), %edi
callq *%rax
cmpl $0x0, %eax
je 0xb2c03
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
jmp 0xb2c05
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0xb2fc5
jmp 0xb2c15
movb $0x0, -0x59(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0xb2c43
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
movq -0x48(%rbp), %rax
movslq 0x18(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb2c5c
movl $0x1, -0x38(%rbp)
jmp 0xb2d65
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x48(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb2cc3
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xb2cc3
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0xb2cae
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movb $0x1, -0x59(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0xb2ced
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
movl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpb $0x0, -0x59(%rbp)
jne 0xb2d1a
movq -0x48(%rbp), %rax
movslq 0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb2d1a
movl $0x1, -0x38(%rbp)
jmp 0xb2d3e
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0xb7fa0
cmpl $0x0, %eax
je 0xb2d3c
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
jmp 0xb2d3e
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xb2d60
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0xb2fdd
jmp 0xb2c15
movq -0x48(%rbp), %rax
movslq 0x18(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb2fc0
jmp 0xb2d78
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0xb2e30
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0xb2db0
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
movq -0x48(%rbp), %rax
movslq 0x18(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb2dd0
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0xb2d78
movq -0x48(%rbp), %rax
movslq 0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb2e2e
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0xb2e18
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
movl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xb2d78
jmp 0xb2e30
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xb2e46
movl $0x0, -0x4(%rbp)
jmp 0xb2fdd
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xb2e5c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb2fdd
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0xb2e86
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x48(%rbp), %rax
movslq -0x34(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb2eeb
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xb2ee9
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0xb2ed8
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
movl -0x4c(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0xb2eeb
jmp 0xb2eed
jmp 0xb2eef
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xb2f4e
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
jg 0xb2f23
movl $0x1, -0x4(%rbp)
jmp 0xb2fdd
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0xb7fa0
cmpl $0x0, %eax
jne 0xb2f3b
jmp 0xb2f4e
movl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xb2eef
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xb2f61
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb2fdd
movl -0x4c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl 0x20(%rbp), %eax
addl $0x1, %eax
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0xb2b90
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jg 0xb2fbb
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb2fdd
jmp 0xb2eed
jmp 0xb2c05
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wildcmp_uca_impl:
push rbp
mov rbp, rsp
sub rsp, 80h
mov eax, [rbp+arg_10]
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
mov [rbp+var_38], 0FFFFFFFFh
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
lea rax, my_string_stack_guard
cmp qword ptr [rax], 0
jz short loc_B2C03
lea rax, my_string_stack_guard
mov rax, [rax]
mov edi, [rbp+arg_10]
call rax
cmp eax, 0
jz short loc_B2C03
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2C03:
jmp short $+2
loc_B2C05:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz loc_B2FC5
jmp short $+2
loc_B2C15:
mov [rbp+var_59], 0
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_B2C43
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2C43:
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_8]
cmp rax, rcx
jnz short loc_B2C5C
mov [rbp+var_38], 1
jmp loc_B2D65
loc_B2C5C:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_34]
cmp rax, rcx
jnz short loc_B2CC3
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_B2CC3
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_B2CAE
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2CAE:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov [rbp+var_59], 1
loc_B2CC3:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_40]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_B2CED
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2CED:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
cmp [rbp+var_59], 0
jnz short loc_B2D1A
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_0]
cmp rax, rcx
jnz short loc_B2D1A
mov [rbp+var_38], 1
jmp short loc_B2D3E
loc_B2D1A:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
call my_uca_charcmp
cmp eax, 0
jz short loc_B2D3C
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2D3C:
jmp short $+2
loc_B2D3E:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_B2D60
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
setnz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp loc_B2FDD
loc_B2D60:
jmp loc_B2C15
loc_B2D65:
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_8]
cmp rax, rcx
jnz loc_B2FC0
jmp short $+2
loc_B2D78:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz loc_B2E30
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_B2DB0
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2DB0:
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_8]
cmp rax, rcx
jnz short loc_B2DD0
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp short loc_B2D78
loc_B2DD0:
mov rax, [rbp+var_48]
movsxd rcx, [rbp+arg_0]
cmp rax, rcx
jnz short loc_B2E2E
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_40]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_B2E18
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2E18:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp loc_B2D78
loc_B2E2E:
jmp short $+2
loc_B2E30:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_B2E46
mov [rbp+var_4], 0
jmp loc_B2FDD
loc_B2E46:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_B2E5C
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_B2FDD
loc_B2E5C:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_B2E86
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2E86:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_34]
cmp rax, rcx
jnz short loc_B2EEB
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_B2EE9
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_B2ED8
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2ED8:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
loc_B2EE9:
jmp short $+2
loc_B2EEB:
jmp short $+2
loc_B2EED:
jmp short $+2
loc_B2EEF:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jz short loc_B2F4E
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_40]
call rax
mov [rbp+var_4C], eax
cmp eax, 0
jg short loc_B2F23
mov [rbp+var_4], 1
jmp loc_B2FDD
loc_B2F23:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
call my_uca_charcmp
cmp eax, 0
jnz short loc_B2F3B
jmp short loc_B2F4E
loc_B2F3B:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_B2EEF
loc_B2F4E:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_B2F61
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_B2FDD
loc_B2F61:
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9d, [rbp+var_34]
mov r11d, [rbp+arg_0]
mov r10d, [rbp+arg_8]
mov eax, [rbp+arg_10]
add eax, 1
mov [rsp+80h+var_80], r11d
mov [rsp+80h+var_78], r10d
mov [rsp+80h+var_70], eax
call my_wildcmp_uca_impl
mov [rbp+var_38], eax
cmp [rbp+var_38], 0
jg short loc_B2FBB
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp short loc_B2FDD
loc_B2FBB:
jmp loc_B2EED
loc_B2FC0:
jmp loc_B2C05
loc_B2FC5:
mov rdx, [rbp+var_18]
mov rsi, [rbp+var_20]
xor eax, eax
mov ecx, 1
cmp rdx, rsi
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_B2FDD:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long my_wildcmp_uca_impl(
long long a1,
unsigned long long a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
char v10; // [rsp+27h] [rbp-59h]
long long ( *v11)(long long, long long *, unsigned long long, unsigned long long); // [rsp+28h] [rbp-58h]
int v12; // [rsp+34h] [rbp-4Ch]
int v13; // [rsp+34h] [rbp-4Ch]
int v14; // [rsp+34h] [rbp-4Ch]
int v15; // [rsp+34h] [rbp-4Ch]
int v16; // [rsp+34h] [rbp-4Ch]
int v17; // [rsp+34h] [rbp-4Ch]
long long v18; // [rsp+38h] [rbp-48h] BYREF
long long v19; // [rsp+40h] [rbp-40h] BYREF
int v20; // [rsp+48h] [rbp-38h]
int v21; // [rsp+4Ch] [rbp-34h]
unsigned long long v22; // [rsp+50h] [rbp-30h]
unsigned long long v23; // [rsp+58h] [rbp-28h]
unsigned long long v24; // [rsp+60h] [rbp-20h]
unsigned long long v25; // [rsp+68h] [rbp-18h]
long long v26; // [rsp+70h] [rbp-10h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = -1;
v11 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) )
{
return 1;
}
else
{
do
{
if ( v23 == v22 )
return v25 != v24;
while ( 1 )
{
v10 = 0;
v12 = v11(v26, &v18, v23, v22);
if ( v12 <= 0 )
return 1;
if ( v18 == a8 )
break;
v23 += v12;
if ( v18 == v21 && v23 < v22 )
{
v13 = v11(v26, &v18, v23, v22);
if ( v13 <= 0 )
return 1;
v23 += v13;
v10 = 1;
}
v14 = v11(v26, &v19, v25, v24);
if ( v14 <= 0 )
return 1;
v25 += v14;
if ( v10 || v18 != a7 )
{
if ( (unsigned int)my_uca_charcmp(v26, v19, v18) )
return 1;
}
else
{
v20 = 1;
}
if ( v23 == v22 )
return v25 != v24;
}
v20 = 1;
}
while ( v18 != a8 );
while ( v23 != v22 )
{
v15 = v11(v26, &v18, v23, v22);
if ( v15 <= 0 )
return 1;
if ( v18 == a8 )
{
v23 += v15;
}
else
{
if ( v18 != a7 )
break;
v23 += v15;
v16 = v11(v26, &v19, v25, v24);
if ( v16 <= 0 )
return 1;
v25 += v16;
}
}
if ( v23 == v22 )
{
return 0;
}
else if ( v25 == v24 )
{
return (unsigned int)-1;
}
else
{
v17 = v11(v26, &v18, v23, v22);
if ( v17 > 0 )
{
v23 += v17;
if ( v18 == v21 && v23 < v22 )
{
v17 = v11(v26, &v18, v23, v22);
if ( v17 > 0 )
{
v23 += v17;
goto LABEL_45;
}
return 1;
}
else
{
do
{
LABEL_45:
while ( v25 != v24 )
{
v17 = v11(v26, &v19, v25, v24);
if ( v17 <= 0 )
return 1;
if ( !(unsigned int)my_uca_charcmp(v26, v19, v18) )
break;
v25 += v17;
}
if ( v25 == v24 )
return (unsigned int)-1;
v25 += v17;
v20 = my_wildcmp_uca_impl(v26, v25, v24, v23, v22, v21, a7, a8, a9 + 1);
}
while ( v20 > 0 );
return (unsigned int)v20;
}
}
else
{
return 1;
}
}
}
}
|
my_wildcmp_uca_impl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV EAX,dword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOV dword ptr [RBP + -0x38],0xffffffff
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RAX
LEA RAX,[0x506d40]
CMP qword ptr [RAX],0x0
JZ 0x001b2c03
LEA RAX,[0x506d40]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
CMP EAX,0x0
JZ 0x001b2c03
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2c03:
JMP 0x001b2c05
LAB_001b2c05:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x001b2fc5
JMP 0x001b2c15
LAB_001b2c15:
MOV byte ptr [RBP + -0x59],0x0
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x001b2c43
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2c43:
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x18]
CMP RAX,RCX
JNZ 0x001b2c5c
MOV dword ptr [RBP + -0x38],0x1
JMP 0x001b2d65
LAB_001b2c5c:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x34]
CMP RAX,RCX
JNZ 0x001b2cc3
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001b2cc3
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x001b2cae
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2cae:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV byte ptr [RBP + -0x59],0x1
LAB_001b2cc3:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x001b2ced
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2ced:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
CMP byte ptr [RBP + -0x59],0x0
JNZ 0x001b2d1a
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x10]
CMP RAX,RCX
JNZ 0x001b2d1a
MOV dword ptr [RBP + -0x38],0x1
JMP 0x001b2d3e
LAB_001b2d1a:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x001b7fa0
CMP EAX,0x0
JZ 0x001b2d3c
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2d3c:
JMP 0x001b2d3e
LAB_001b2d3e:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001b2d60
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b2fdd
LAB_001b2d60:
JMP 0x001b2c15
LAB_001b2d65:
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x18]
CMP RAX,RCX
JNZ 0x001b2fc0
JMP 0x001b2d78
LAB_001b2d78:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x001b2e30
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x001b2db0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2db0:
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x18]
CMP RAX,RCX
JNZ 0x001b2dd0
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001b2d78
LAB_001b2dd0:
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + 0x10]
CMP RAX,RCX
JNZ 0x001b2e2e
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x001b2e18
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2e18:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001b2d78
LAB_001b2e2e:
JMP 0x001b2e30
LAB_001b2e30:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001b2e46
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001b2fdd
LAB_001b2e46:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001b2e5c
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001b2fdd
LAB_001b2e5c:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x001b2e86
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2e86:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x34]
CMP RAX,RCX
JNZ 0x001b2eeb
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001b2ee9
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x001b2ed8
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2ed8:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_001b2ee9:
JMP 0x001b2eeb
LAB_001b2eeb:
JMP 0x001b2eed
LAB_001b2eed:
JMP 0x001b2eef
LAB_001b2eef:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x001b2f4e
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JG 0x001b2f23
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b2fdd
LAB_001b2f23:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x001b7fa0
CMP EAX,0x0
JNZ 0x001b2f3b
JMP 0x001b2f4e
LAB_001b2f3b:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001b2eef
LAB_001b2f4e:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001b2f61
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001b2fdd
LAB_001b2f61:
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,dword ptr [RBP + -0x34]
MOV R11D,dword ptr [RBP + 0x10]
MOV R10D,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP],R11D
MOV dword ptr [RSP + 0x8],R10D
MOV dword ptr [RSP + 0x10],EAX
CALL 0x001b2b90
MOV dword ptr [RBP + -0x38],EAX
CMP dword ptr [RBP + -0x38],0x0
JG 0x001b2fbb
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b2fdd
LAB_001b2fbb:
JMP 0x001b2eed
LAB_001b2fc0:
JMP 0x001b2c05
LAB_001b2fc5:
MOV RDX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,RSI
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001b2fdd:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
uint my_wildcmp_uca_impl(long param_1,long param_2,long param_3,ulong param_4,ulong param_5,
int param_6,int param_7,int param_8,int param_9)
{
code *pcVar1;
bool bVar2;
int iVar3;
int local_54;
long local_50;
int8 local_48;
uint local_40;
int local_3c;
ulong local_38;
ulong local_30;
long local_28;
long local_20;
long local_18;
uint local_c;
local_40 = 0xffffffff;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_3c = param_6;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((my_string_stack_guard == (code *)0x0) ||
(iVar3 = (*my_string_stack_guard)(param_9), iVar3 == 0)) {
do {
if (local_30 == local_38) {
return (uint)(local_20 != local_28);
}
while( true ) {
bVar2 = false;
iVar3 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (iVar3 < 1) {
return 1;
}
if (local_50 == param_8) break;
local_30 = local_30 + (long)iVar3;
if ((local_50 == local_3c) && (local_30 < local_38)) {
iVar3 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (iVar3 < 1) {
return 1;
}
local_30 = local_30 + (long)iVar3;
bVar2 = true;
}
iVar3 = (*pcVar1)(local_18,&local_48,local_20,local_28);
if (iVar3 < 1) {
return 1;
}
local_20 = local_20 + iVar3;
if ((bVar2) || (local_50 != param_7)) {
iVar3 = my_uca_charcmp(local_18,local_48,local_50);
if (iVar3 != 0) {
return 1;
}
}
else {
local_40 = 1;
}
if (local_30 == local_38) {
return (uint)(local_20 != local_28);
}
}
local_40 = 1;
} while (local_50 != param_8);
while (local_30 != local_38) {
iVar3 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (iVar3 < 1) {
return 1;
}
if (local_50 == param_8) {
local_30 = local_30 + (long)iVar3;
}
else {
if (local_50 != param_7) break;
local_30 = local_30 + (long)iVar3;
iVar3 = (*pcVar1)(local_18,&local_48,local_20,local_28);
if (iVar3 < 1) {
return 1;
}
local_20 = local_20 + iVar3;
}
}
if (local_30 == local_38) {
local_c = 0;
}
else if (local_20 == local_28) {
local_c = 0xffffffff;
}
else {
local_54 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (local_54 < 1) {
local_c = 1;
}
else {
local_30 = local_30 + (long)local_54;
if ((local_50 == local_3c) && (local_30 < local_38)) {
local_54 = (*pcVar1)(local_18,&local_50,local_30,local_38);
if (local_54 < 1) {
return 1;
}
local_30 = local_30 + (long)local_54;
}
LAB_001b2eef:
do {
if (local_20 != local_28) {
local_54 = (*pcVar1)(local_18,&local_48,local_20,local_28);
if (local_54 < 1) {
return 1;
}
iVar3 = my_uca_charcmp(local_18,local_48,local_50);
if (iVar3 != 0) {
local_20 = local_20 + local_54;
goto LAB_001b2eef;
}
}
if (local_20 == local_28) {
return 0xffffffff;
}
local_20 = local_20 + local_54;
local_40 = my_wildcmp_uca_impl(local_18,local_20,local_28,local_30,local_38,local_3c,
param_7,param_8,param_9 + 1);
local_c = local_40;
} while (0 < (int)local_40);
}
}
}
else {
local_c = 1;
}
return local_c;
}
|
|
65,127 |
ma_apply_undo_key_insert
|
eloqsql/storage/maria/ma_key_recover.c
|
my_bool _ma_apply_undo_key_insert(MARIA_HA *info, LSN undo_lsn,
const uchar *header, uint length)
{
LSN lsn;
my_bool res;
uint keynr;
uchar key_buff[MARIA_MAX_KEY_BUFF];
MARIA_SHARE *share= info->s;
MARIA_KEY key;
my_off_t new_root;
struct st_msg_to_write_hook_for_undo_key msg;
DBUG_ENTER("_ma_apply_undo_key_insert");
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
keynr= key_nr_korr(header);
length-= KEY_NR_STORE_SIZE;
/* We have to copy key as _ma_ck_real_delete() may change it */
memcpy(key_buff, header + KEY_NR_STORE_SIZE, length);
DBUG_DUMP("key_buff", key_buff, length);
new_root= share->state.key_root[keynr];
/*
Change the key to an internal structure.
It's safe to have SEARCH_USER_KEY_HAS_TRANSID even if there isn't
a transaction id, as ha_key_cmp() will stop comparison when key length
is reached.
For index with transid flag, the ref_length of the key is not correct.
This should however be safe as long as this key is only used for
comparsion against other keys (not for packing or for read-next etc as
in this case we use data_length + ref_length, which is correct.
*/
key.keyinfo= share->keyinfo + keynr;
key.data= key_buff;
key.data_length= length - share->rec_reflength;
key.ref_length= share->rec_reflength;
key.flag= SEARCH_USER_KEY_HAS_TRANSID;
res= ((share->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE) ?
maria_rtree_real_delete(info, &key, &new_root) :
_ma_ck_real_delete(info, &key, &new_root));
if (res)
_ma_mark_file_crashed(share);
msg.root= &share->state.key_root[keynr];
msg.value= new_root;
msg.keynr= keynr;
if (_ma_write_clr(info, undo_lsn, *msg.root == msg.value ?
LOGREC_UNDO_KEY_INSERT : LOGREC_UNDO_KEY_INSERT_WITH_ROOT,
0, 0, &lsn, (void*) &msg))
res= 1;
_ma_fast_unlock_key_del(info);
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
}
|
O3
|
c
|
ma_apply_undo_key_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa48, %rsp # imm = 0xA48
movl %ecx, %r12d
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %r15
orl $0x1b1, 0x170(%r15) # imm = 0x1B1
movq %rsi, -0xa20(%rbp)
movzbl (%rdx), %r14d
decl %r12d
leaq 0x1(%rdx), %rsi
leaq -0xa10(%rbp), %r13
movl $0x9d3, %ecx # imm = 0x9D3
movq %r13, %rdi
movq %r12, %rdx
callq 0x2a400
movq 0x118(%r15), %rax
movq (%rax,%r14,8), %rax
movq %rax, -0xa18(%rbp)
movq 0x570(%r15), %rax
imulq $0x118, %r14, %rcx # imm = 0x118
leaq (%rax,%rcx), %rdx
movq %rdx, -0xa40(%rbp)
movq %r13, -0xa48(%rbp)
movl 0x740(%r15), %edx
subl %edx, %r12d
movl %r12d, -0xa38(%rbp)
movl %edx, -0xa34(%rbp)
movl $0x80000, -0xa30(%rbp) # imm = 0x80000
cmpb $0x2, 0xa4(%rax,%rcx)
jne 0x418ad
leaq -0xa48(%rbp), %rsi
leaq -0xa18(%rbp), %rdx
movq %rbx, %rdi
callq 0x62f33
jmp 0x418c3
leaq -0xa48(%rbp), %rsi
leaq -0xa18(%rbp), %rdx
movq %rbx, %rdi
callq 0x59904
movl %eax, %r12d
testb %al, %al
je 0x418d2
movq %r15, %rdi
callq 0x434ea
movq 0x118(%r15), %rax
leaq (%rax,%r14,8), %rax
leaq -0xa68(%rbp), %rcx
movq %rax, (%rcx)
movq -0xa18(%rbp), %rsi
movq %rsi, 0x8(%rcx)
movl %r14d, 0x10(%rcx)
xorl %edx, %edx
cmpq %rsi, (%rax)
setne %dl
addl $0x15, %edx
movq %rcx, (%rsp)
leaq -0xa28(%rbp), %r9
movq %rbx, %rdi
movq -0xa20(%rbp), %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x40675
movl %eax, %r14d
cmpb $0x0, 0x67e(%rbx)
je 0x41934
movq %rbx, %rdi
callq 0x41cb2
testb %r14b, %r14b
movzbl %r12b, %eax
movl $0x1, %r14d
cmovel %eax, %r14d
movq -0xa28(%rbp), %rsi
movq %rbx, %rdi
callq 0x405f8
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x41987
movl %r14d, %eax
addq $0xa48, %rsp # imm = 0xA48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a240
|
_ma_apply_undo_key_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A48h
mov r12d, ecx
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r15, [rdi]
or dword ptr [r15+170h], 1B1h
mov [rbp+var_A20], rsi
movzx r14d, byte ptr [rdx]
dec r12d
lea rsi, [rdx+1]
lea r13, [rbp+var_A10]
mov ecx, 9D3h
mov rdi, r13
mov rdx, r12
call ___memcpy_chk
mov rax, [r15+118h]
mov rax, [rax+r14*8]
mov [rbp+var_A18], rax
mov rax, [r15+570h]
imul rcx, r14, 118h
lea rdx, [rax+rcx]
mov [rbp+var_A40], rdx
mov [rbp+var_A48], r13
mov edx, [r15+740h]
sub r12d, edx
mov [rbp+var_A38], r12d
mov [rbp+var_A34], edx
mov [rbp+var_A30], 80000h
cmp byte ptr [rax+rcx+0A4h], 2
jnz short loc_418AD
lea rsi, [rbp+var_A48]
lea rdx, [rbp+var_A18]
mov rdi, rbx
call maria_rtree_real_delete
jmp short loc_418C3
loc_418AD:
lea rsi, [rbp+var_A48]
lea rdx, [rbp+var_A18]
mov rdi, rbx
call _ma_ck_real_delete
loc_418C3:
mov r12d, eax
test al, al
jz short loc_418D2
mov rdi, r15
call _ma_mark_file_crashed
loc_418D2:
mov rax, [r15+118h]
lea rax, [rax+r14*8]
lea rcx, [rbp+var_A68]
mov [rcx], rax
mov rsi, [rbp+var_A18]
mov [rcx+8], rsi
mov [rcx+10h], r14d
xor edx, edx
cmp [rax], rsi
setnz dl
add edx, 15h
mov [rsp+0A70h+var_A70], rcx
lea r9, [rbp+var_A28]
mov rdi, rbx
mov rsi, [rbp+var_A20]
xor ecx, ecx
xor r8d, r8d
call _ma_write_clr
mov r14d, eax
cmp byte ptr [rbx+67Eh], 0
jz short loc_41934
mov rdi, rbx
call _ma_unlock_key_del
loc_41934:
test r14b, r14b
movzx eax, r12b
mov r14d, 1
cmovz r14d, eax
mov rsi, [rbp+var_A28]
mov rdi, rbx
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_41987
mov eax, r14d
add rsp, 0A48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_41987:
call ___stack_chk_fail
|
long long ma_apply_undo_key_insert(long long a1, long long a2, unsigned __int8 *a3, int a4)
{
long long v4; // r15
long long v5; // r14
long long v6; // r12
int v7; // edx
unsigned __int8 v8; // al
unsigned __int8 v9; // r12
char v10; // r14
bool v11; // zf
unsigned int v12; // r14d
_QWORD v14[2]; // [rsp+8h] [rbp-A68h] BYREF
int v15; // [rsp+18h] [rbp-A58h]
_BYTE *v16; // [rsp+28h] [rbp-A48h] BYREF
long long v17; // [rsp+30h] [rbp-A40h]
int v18; // [rsp+38h] [rbp-A38h]
int v19; // [rsp+3Ch] [rbp-A34h]
int v20; // [rsp+40h] [rbp-A30h]
signed long long v21; // [rsp+48h] [rbp-A28h] BYREF
long long v22; // [rsp+50h] [rbp-A20h]
long long v23; // [rsp+58h] [rbp-A18h] BYREF
_BYTE v24[2528]; // [rsp+60h] [rbp-A10h] BYREF
unsigned long long v25; // [rsp+A40h] [rbp-30h]
v25 = __readfsqword(0x28u);
v4 = *(_QWORD *)a1;
*(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x1B1u;
v22 = a2;
v5 = *a3;
v6 = (unsigned int)(a4 - 1);
__memcpy_chk(v24, a3 + 1, v6, 2515LL);
v23 = *(_QWORD *)(*(_QWORD *)(v4 + 280) + 8 * v5);
v17 = *(_QWORD *)(v4 + 1392) + 280 * v5;
v16 = v24;
v7 = *(_DWORD *)(v4 + 1856);
v18 = v6 - v7;
v19 = v7;
v20 = 0x80000;
if ( *(_BYTE *)(v17 + 164) == 2 )
v8 = maria_rtree_real_delete(a1, &v16, &v23);
else
v8 = ma_ck_real_delete(a1, &v16, &v23);
v9 = v8;
if ( v8 )
ma_mark_file_crashed(v4);
v14[0] = *(_QWORD *)(v4 + 280) + 8 * v5;
v14[1] = v23;
v15 = v5;
v10 = ma_write_clr(
(long long *)a1,
v22,
(unsigned int)(*(_QWORD *)v14[0] != v23) + 21,
0,
0,
(unsigned long long)&v21,
(long long)v14);
if ( *(_BYTE *)(a1 + 1662) )
ma_unlock_key_del(a1);
v11 = v10 == 0;
v12 = 1;
if ( v11 )
v12 = v9;
ma_unpin_all_pages(a1, v21);
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL;
return v12;
}
|
_ma_apply_undo_key_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa48
MOV R12D,ECX
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R15,qword ptr [RDI]
OR dword ptr [R15 + 0x170],0x1b1
MOV qword ptr [RBP + -0xa20],RSI
MOVZX R14D,byte ptr [RDX]
DEC R12D
LEA RSI,[RDX + 0x1]
LEA R13,[RBP + -0xa10]
MOV ECX,0x9d3
MOV RDI,R13
MOV RDX,R12
CALL 0x0012a400
MOV RAX,qword ptr [R15 + 0x118]
MOV RAX,qword ptr [RAX + R14*0x8]
MOV qword ptr [RBP + -0xa18],RAX
MOV RAX,qword ptr [R15 + 0x570]
IMUL RCX,R14,0x118
LEA RDX,[RAX + RCX*0x1]
MOV qword ptr [RBP + -0xa40],RDX
MOV qword ptr [RBP + -0xa48],R13
MOV EDX,dword ptr [R15 + 0x740]
SUB R12D,EDX
MOV dword ptr [RBP + -0xa38],R12D
MOV dword ptr [RBP + -0xa34],EDX
MOV dword ptr [RBP + -0xa30],0x80000
CMP byte ptr [RAX + RCX*0x1 + 0xa4],0x2
JNZ 0x001418ad
LEA RSI,[RBP + -0xa48]
LEA RDX,[RBP + -0xa18]
MOV RDI,RBX
CALL 0x00162f33
JMP 0x001418c3
LAB_001418ad:
LEA RSI,[RBP + -0xa48]
LEA RDX,[RBP + -0xa18]
MOV RDI,RBX
CALL 0x00159904
LAB_001418c3:
MOV R12D,EAX
TEST AL,AL
JZ 0x001418d2
MOV RDI,R15
CALL 0x001434ea
LAB_001418d2:
MOV RAX,qword ptr [R15 + 0x118]
LEA RAX,[RAX + R14*0x8]
LEA RCX,[RBP + -0xa68]
MOV qword ptr [RCX],RAX
MOV RSI,qword ptr [RBP + -0xa18]
MOV qword ptr [RCX + 0x8],RSI
MOV dword ptr [RCX + 0x10],R14D
XOR EDX,EDX
CMP qword ptr [RAX],RSI
SETNZ DL
ADD EDX,0x15
MOV qword ptr [RSP],RCX
LEA R9,[RBP + -0xa28]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0xa20]
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00140675
MOV R14D,EAX
CMP byte ptr [RBX + 0x67e],0x0
JZ 0x00141934
MOV RDI,RBX
CALL 0x00141cb2
LAB_00141934:
TEST R14B,R14B
MOVZX EAX,R12B
MOV R14D,0x1
CMOVZ R14D,EAX
MOV RSI,qword ptr [RBP + -0xa28]
MOV RDI,RBX
CALL 0x001405f8
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00141987
MOV EAX,R14D
ADD RSP,0xa48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00141987:
CALL 0x0012a240
|
char _ma_apply_undo_key_insert(long *param_1,int8 param_2,byte *param_3,int param_4)
{
byte bVar1;
long lVar2;
char cVar3;
char cVar4;
char cVar5;
ulong uVar6;
long in_FS_OFFSET;
long *local_a70;
long local_a68;
uint local_a60;
int1 *local_a50;
long local_a48;
int local_a40;
int local_a3c;
int4 local_a38;
int8 local_a30;
int8 local_a28;
long local_a20;
int1 local_a18 [2528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = *param_1;
*(uint *)(lVar2 + 0x170) = *(uint *)(lVar2 + 0x170) | 0x1b1;
bVar1 = *param_3;
uVar6 = (ulong)bVar1;
local_a28 = param_2;
__memcpy_chk(local_a18,param_3 + 1,param_4 + -1,0x9d3);
local_a20 = *(long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8);
local_a48 = *(long *)(lVar2 + 0x570) + uVar6 * 0x118;
local_a3c = *(int *)(lVar2 + 0x740);
local_a40 = (param_4 + -1) - local_a3c;
local_a38 = 0x80000;
local_a50 = local_a18;
if (*(char *)(*(long *)(lVar2 + 0x570) + 0xa4 + uVar6 * 0x118) == '\x02') {
cVar3 = maria_rtree_real_delete(param_1,&local_a50,&local_a20);
}
else {
cVar3 = _ma_ck_real_delete(param_1,&local_a50,&local_a20);
}
if (cVar3 != '\0') {
_ma_mark_file_crashed(lVar2);
}
local_a70 = (long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8);
local_a68 = local_a20;
local_a60 = (uint)bVar1;
cVar4 = _ma_write_clr(param_1,local_a28,(*local_a70 != local_a20) + '\x15',0,0,&local_a30,
&local_a70);
if (*(char *)((long)param_1 + 0x67e) != '\0') {
_ma_unlock_key_del(param_1);
}
cVar5 = '\x01';
if (cVar4 == '\0') {
cVar5 = cVar3;
}
_ma_unpin_all_pages(param_1,local_a30);
*(int8 *)(param_1[1] + 0x90) = 0;
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return cVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
65,128 |
my_strntoull_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static ulonglong
my_strntoull_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register ulonglong cutoff;
register unsigned int cutlim;
register ulonglong res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr + l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr !=NULL )
*endptr = (char*)s;
err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+=cnv;
} while (1);
bs:
overflow = 0;
res = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+=cnv;
if ( wc>='0' && wc<='9')
wc -= '0';
else if ( wc>='A' && wc<='Z')
wc = wc - 'A' + 10;
else if ( wc>='a' && wc<='z')
wc = wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow = 1;
else
{
res *= (ulonglong) base;
res += wc;
}
}
else if (cnv==MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*)s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) res) : (longlong) res);
}
|
O0
|
c
|
my_strntoull_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rdx
movq -0x80(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0xd92d1
movq -0x50(%rbp), %rax
addq $-0x9, %rax
movq %rax, -0x90(%rbp)
subq $0x24, %rax
ja 0xd92cd
movq -0x90(%rbp), %rax
leaq 0x15f8e1(%rip), %rcx # 0x238b8c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xd92cf
jmp 0xd92cf
cmpl $0x0, -0x3c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0xd92cf
jmp 0xd92cf
jmp 0xd9328
jmp 0xd9309
cmpq $0x0, -0x30(%rbp)
je 0xd92e3
movq -0x78(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %edx
movl $0x21, %ecx
movl $0x54, %eax
cmpl $0x0, %edx
cmovel %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xd950c
movl -0x44(%rbp), %ecx
movq -0x78(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0xd926a
jmp 0xd9326
jmp 0xd9328
movl $0x0, -0x40(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x60(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x64(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x78(%rbp), %rdx
movq -0x80(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0xd9455
movl -0x44(%rbp), %ecx
movq -0x78(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
cmpq $0x30, -0x50(%rbp)
jb 0xd93ba
cmpq $0x39, -0x50(%rbp)
ja 0xd93ba
movq -0x50(%rbp), %rax
subq $0x30, %rax
movq %rax, -0x50(%rbp)
jmp 0xd9403
cmpq $0x41, -0x50(%rbp)
jb 0xd93da
cmpq $0x5a, -0x50(%rbp)
ja 0xd93da
movq -0x50(%rbp), %rax
subq $0x41, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0xd9401
cmpq $0x61, -0x50(%rbp)
jb 0xd93fa
cmpq $0x7a, -0x50(%rbp)
ja 0xd93fa
movq -0x50(%rbp), %rax
subq $0x61, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0xd93ff
jmp 0xd9494
jmp 0xd9401
jmp 0xd9403
movq -0x50(%rbp), %rax
cmpl -0x24(%rbp), %eax
jl 0xd9411
jmp 0xd9494
movq -0x70(%rbp), %rax
cmpq -0x60(%rbp), %rax
ja 0xd9431
movq -0x70(%rbp), %rax
cmpq -0x60(%rbp), %rax
jne 0xd943a
movq -0x50(%rbp), %rax
movl -0x64(%rbp), %ecx
cmpq %rcx, %rax
jbe 0xd943a
movl $0x1, -0x40(%rbp)
jmp 0xd9453
movslq -0x24(%rbp), %rax
imulq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x50(%rbp), %rax
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0xd9486
cmpl $0x0, -0x44(%rbp)
jne 0xd9484
cmpq $0x0, -0x30(%rbp)
je 0xd946d
movq -0x78(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl $0x54, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xd950c
jmp 0xd9494
jmp 0xd9488
movb $0x1, %al
testb $0x1, %al
jne 0xd936b
jmp 0xd9494
cmpq $0x0, -0x30(%rbp)
je 0xd94a6
movq -0x78(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0xd94c7
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xd950c
cmpl $0x0, -0x40(%rbp)
je 0xd94e1
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0xd950c
cmpl $0x0, -0x3c(%rbp)
je 0xd94f6
xorl %eax, %eax
subq -0x70(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0xd9501
movq -0x70(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
|
my_strntoull_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_3C], 0
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov [rbp+var_78], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_80], rax
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
loc_D926A:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_78]
mov rcx, [rbp+var_80]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle short loc_D92D1
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases
mov [rbp+var_90], rax
sub rax, 24h
ja short def_D92B2; jumptable 00000000000D92B2 default case, cases 10-31,33-42,44
mov rax, [rbp+var_90]
lea rcx, jpt_D92B2
movsxd rax, ds:(jpt_D92B2 - 238B8Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_D92B4:
jmp short loc_D92CF; jumptable 00000000000D92B2 case 32
loc_D92B6:
jmp short loc_D92CF; jumptable 00000000000D92B2 case 9
loc_D92B8:
cmp [rbp+var_3C], 0; jumptable 00000000000D92B2 case 45
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_3C], eax
jmp short loc_D92CF
loc_D92CB:
jmp short loc_D92CF; jumptable 00000000000D92B2 case 43
def_D92B2:
jmp short loc_D9328; jumptable 00000000000D92B2 default case, cases 10-31,33-42,44
loc_D92CF:
jmp short loc_D9309
loc_D92D1:
cmp [rbp+var_30], 0
jz short loc_D92E3
mov rcx, [rbp+var_78]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_D92E3:
mov edx, [rbp+var_44]
mov ecx, 21h ; '!'
mov eax, 54h ; 'T'
cmp edx, 0
cmovz ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov [rbp+var_8], 0
jmp loc_D950C
loc_D9309:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_78]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_78], rax
mov al, 1
test al, 1
jnz loc_D926A
jmp short $+2
loc_D9326:
jmp short $+2
loc_D9328:
mov [rbp+var_40], 0
mov [rbp+var_70], 0
mov rax, [rbp+var_78]
mov [rbp+var_88], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov [rbp+var_60], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_64], eax
loc_D936B:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_78]
mov rcx, [rbp+var_80]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle loc_D9455
mov ecx, [rbp+var_44]
mov rax, [rbp+var_78]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_78], rax
cmp [rbp+var_50], 30h ; '0'
jb short loc_D93BA
cmp [rbp+var_50], 39h ; '9'
ja short loc_D93BA
mov rax, [rbp+var_50]
sub rax, 30h ; '0'
mov [rbp+var_50], rax
jmp short loc_D9403
loc_D93BA:
cmp [rbp+var_50], 41h ; 'A'
jb short loc_D93DA
cmp [rbp+var_50], 5Ah ; 'Z'
ja short loc_D93DA
mov rax, [rbp+var_50]
sub rax, 41h ; 'A'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_D9401
loc_D93DA:
cmp [rbp+var_50], 61h ; 'a'
jb short loc_D93FA
cmp [rbp+var_50], 7Ah ; 'z'
ja short loc_D93FA
mov rax, [rbp+var_50]
sub rax, 61h ; 'a'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_D93FF
loc_D93FA:
jmp loc_D9494
loc_D93FF:
jmp short $+2
loc_D9401:
jmp short $+2
loc_D9403:
mov rax, [rbp+var_50]
cmp eax, [rbp+var_24]
jl short loc_D9411
jmp loc_D9494
loc_D9411:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_60]
ja short loc_D9431
mov rax, [rbp+var_70]
cmp rax, [rbp+var_60]
jnz short loc_D943A
mov rax, [rbp+var_50]
mov ecx, [rbp+var_64]
cmp rax, rcx
jbe short loc_D943A
loc_D9431:
mov [rbp+var_40], 1
jmp short loc_D9453
loc_D943A:
movsxd rax, [rbp+var_24]
imul rax, [rbp+var_70]
mov [rbp+var_70], rax
mov rax, [rbp+var_50]
add rax, [rbp+var_70]
mov [rbp+var_70], rax
loc_D9453:
jmp short loc_D9486
loc_D9455:
cmp [rbp+var_44], 0
jnz short loc_D9484
cmp [rbp+var_30], 0
jz short loc_D946D
mov rcx, [rbp+var_78]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_D946D:
mov rax, [rbp+var_38]
mov dword ptr [rax], 54h ; 'T'
mov [rbp+var_8], 0
jmp loc_D950C
loc_D9484:
jmp short loc_D9494
loc_D9486:
jmp short $+2
loc_D9488:
mov al, 1
test al, 1
jnz loc_D936B
jmp short $+2
loc_D9494:
cmp [rbp+var_30], 0
jz short loc_D94A6
mov rcx, [rbp+var_78]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_D94A6:
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jnz short loc_D94C7
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp short loc_D950C
loc_D94C7:
cmp [rbp+var_40], 0
jz short loc_D94E1
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_D950C
loc_D94E1:
cmp [rbp+var_3C], 0
jz short loc_D94F6
xor eax, eax
sub rax, [rbp+var_70]
mov [rbp+var_98], rax
jmp short loc_D9501
loc_D94F6:
mov rax, [rbp+var_70]
mov [rbp+var_98], rax
loc_D9501:
mov rax, [rbp+var_98]
mov [rbp+var_8], rax
loc_D950C:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
|
long long my_strntoull_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6)
{
int v6; // ecx
long long v9; // [rsp+18h] [rbp-88h]
long long v10; // [rsp+20h] [rbp-80h]
long long v11; // [rsp+28h] [rbp-78h]
unsigned long long v12; // [rsp+30h] [rbp-70h]
unsigned int v13; // [rsp+3Ch] [rbp-64h]
unsigned long long v14; // [rsp+40h] [rbp-60h]
long long ( *v15)(long long, unsigned long long *, long long, long long); // [rsp+48h] [rbp-58h]
unsigned long long v16; // [rsp+50h] [rbp-50h] BYREF
int v17; // [rsp+5Ch] [rbp-44h]
int v18; // [rsp+60h] [rbp-40h]
BOOL v19; // [rsp+64h] [rbp-3Ch]
int *v20; // [rsp+68h] [rbp-38h]
_QWORD *v21; // [rsp+70h] [rbp-30h]
int v22; // [rsp+7Ch] [rbp-24h]
long long v23; // [rsp+80h] [rbp-20h]
long long v24; // [rsp+88h] [rbp-18h]
long long v25; // [rsp+90h] [rbp-10h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
v20 = a6;
v19 = 0;
v15 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v11 = a2;
v10 = a3 + a2;
*a6 = 0;
while ( 2 )
{
v17 = v15(v25, &v16, v11, v10);
if ( v17 <= 0 )
{
if ( v21 )
*v21 = v11;
v6 = 33;
if ( !v17 )
v6 = 84;
*v20 = v6;
return 0LL;
}
else
{
switch ( v16 )
{
case 9uLL:
case 0x20uLL:
case 0x2BuLL:
goto LABEL_10;
case 0x2DuLL:
v19 = !v19;
LABEL_10:
v11 += v17;
continue;
default:
v18 = 0;
v12 = 0LL;
v9 = v11;
v14 = 0xFFFFFFFFFFFFFFFFLL / v22;
v13 = 0xFFFFFFFFFFFFFFFFLL % v22;
break;
}
while ( 1 )
{
v17 = v15(v25, &v16, v11, v10);
if ( v17 <= 0 )
break;
v11 += v17;
if ( v16 < 0x30 || v16 > 0x39 )
{
if ( v16 < 0x41 || v16 > 0x5A )
{
if ( v16 < 0x61 || v16 > 0x7A )
goto LABEL_33;
v16 = v16 - 97 + 10;
}
else
{
v16 = v16 - 65 + 10;
}
}
else
{
v16 -= 48LL;
}
if ( (int)v16 >= v22 )
goto LABEL_33;
if ( v12 > v14 || v12 == v14 && v16 > v13 )
v18 = 1;
else
v12 = v12 * v22 + v16;
}
if ( v17 )
{
LABEL_33:
if ( v21 )
*v21 = v11;
if ( v11 == v9 )
{
*v20 = 33;
return 0LL;
}
else if ( v18 )
{
*v20 = 34;
return -1LL;
}
else if ( v19 )
{
return -(long long)v12;
}
else
{
return v12;
}
}
if ( v21 )
*v21 = v11;
*v20 = 84;
return 0LL;
}
}
}
|
my_strntoull_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
LAB_001d926a:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x80]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x001d92d1
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,-0x9
MOV qword ptr [RBP + -0x90],RAX
SUB RAX,0x24
JA 0x001d92cd
MOV RAX,qword ptr [RBP + -0x90]
LEA RCX,[0x338b8c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_20:
JMP 0x001d92cf
caseD_9:
JMP 0x001d92cf
caseD_2d:
CMP dword ptr [RBP + -0x3c],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001d92cf
caseD_2b:
JMP 0x001d92cf
caseD_a:
JMP 0x001d9328
LAB_001d92cf:
JMP 0x001d9309
LAB_001d92d1:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001d92e3
MOV RCX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001d92e3:
MOV EDX,dword ptr [RBP + -0x44]
MOV ECX,0x21
MOV EAX,0x54
CMP EDX,0x0
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001d950c
LAB_001d9309:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x78]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
MOV AL,0x1
TEST AL,0x1
JNZ 0x001d926a
JMP 0x001d9326
LAB_001d9326:
JMP 0x001d9328
LAB_001d9328:
MOV dword ptr [RBP + -0x40],0x0
MOV qword ptr [RBP + -0x70],0x0
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x88],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x60],RAX
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV RAX,-0x1
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x64],EAX
LAB_001d936b:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x80]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x001d9455
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x78]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
CMP qword ptr [RBP + -0x50],0x30
JC 0x001d93ba
CMP qword ptr [RBP + -0x50],0x39
JA 0x001d93ba
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x30
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001d9403
LAB_001d93ba:
CMP qword ptr [RBP + -0x50],0x41
JC 0x001d93da
CMP qword ptr [RBP + -0x50],0x5a
JA 0x001d93da
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x41
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001d9401
LAB_001d93da:
CMP qword ptr [RBP + -0x50],0x61
JC 0x001d93fa
CMP qword ptr [RBP + -0x50],0x7a
JA 0x001d93fa
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x61
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001d93ff
LAB_001d93fa:
JMP 0x001d9494
LAB_001d93ff:
JMP 0x001d9401
LAB_001d9401:
JMP 0x001d9403
LAB_001d9403:
MOV RAX,qword ptr [RBP + -0x50]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x001d9411
JMP 0x001d9494
LAB_001d9411:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x60]
JA 0x001d9431
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x60]
JNZ 0x001d943a
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x64]
CMP RAX,RCX
JBE 0x001d943a
LAB_001d9431:
MOV dword ptr [RBP + -0x40],0x1
JMP 0x001d9453
LAB_001d943a:
MOVSXD RAX,dword ptr [RBP + -0x24]
IMUL RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x70],RAX
LAB_001d9453:
JMP 0x001d9486
LAB_001d9455:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x001d9484
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001d946d
MOV RCX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001d946d:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x54
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001d950c
LAB_001d9484:
JMP 0x001d9494
LAB_001d9486:
JMP 0x001d9488
LAB_001d9488:
MOV AL,0x1
TEST AL,0x1
JNZ 0x001d936b
JMP 0x001d9494
LAB_001d9494:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001d94a6
MOV RCX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001d94a6:
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JNZ 0x001d94c7
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001d950c
LAB_001d94c7:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x001d94e1
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001d950c
LAB_001d94e1:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001d94f6
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001d9501
LAB_001d94f6:
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x98],RAX
LAB_001d9501:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x8],RAX
LAB_001d950c:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001d9324) */
/* WARNING: Removing unreachable block (ram,0x001d9492) */
ulong my_strntoull_mb2_or_mb4
(long param_1,long param_2,long param_3,int param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
int1 auVar2 [16];
int1 auVar3 [16];
long lVar4;
ulong uVar5;
int4 uVar6;
ulong local_a0;
long local_80;
ulong local_78;
ulong local_58;
int local_4c;
int local_48;
uint local_44;
int4 *local_40;
long *local_38;
int local_2c;
long local_28;
long local_20;
long local_18;
ulong local_10;
local_44 = 0;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_6 = 0;
local_80 = param_2;
local_40 = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
lVar4 = local_80;
local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3);
if (local_4c < 1) {
if (local_38 != (long *)0x0) {
*local_38 = local_80;
}
uVar6 = 0x21;
if (local_4c == 0) {
uVar6 = 0x54;
}
*local_40 = uVar6;
return 0;
}
switch(local_58) {
case 9:
break;
default:
local_48 = 0;
local_78 = 0;
auVar2._8_8_ = 0;
auVar2._0_8_ = (long)local_2c;
uVar5 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar2,0);
auVar3._8_8_ = 0;
auVar3._0_8_ = (long)local_2c;
goto LAB_001d936b;
case 0x20:
break;
case 0x2b:
break;
case 0x2d:
local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1);
}
local_80 = local_80 + local_4c;
} while( true );
LAB_001d936b:
local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3);
if (local_4c < 1) {
if (local_4c == 0) {
if (local_38 != (long *)0x0) {
*local_38 = local_80;
}
*local_40 = 0x54;
local_10 = 0;
}
else {
LAB_001d9494:
if (local_38 != (long *)0x0) {
*local_38 = local_80;
}
if (local_80 == lVar4) {
*local_40 = 0x21;
local_10 = 0;
}
else if (local_48 == 0) {
if (local_44 == 0) {
local_a0 = local_78;
}
else {
local_a0 = -local_78;
}
local_10 = local_a0;
}
else {
*local_40 = 0x22;
local_10 = 0xffffffffffffffff;
}
}
return local_10;
}
local_80 = local_80 + local_4c;
if ((local_58 < 0x30) || (0x39 < local_58)) {
if ((local_58 < 0x41) || (0x5a < local_58)) {
if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_001d9494;
local_58 = local_58 - 0x57;
}
else {
local_58 = local_58 - 0x37;
}
}
else {
local_58 = local_58 - 0x30;
}
if (local_2c <= (int)local_58) goto LAB_001d9494;
if ((uVar5 < local_78) ||
((local_78 == uVar5 &&
(SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar3,0) < local_58)))) {
local_48 = 1;
}
else {
local_78 = local_58 + (long)local_2c * local_78;
}
goto LAB_001d936b;
}
|
|
65,129 |
ma_apply_redo_bitmap_new_page
|
eloqsql/storage/maria/ma_bitmap.c
|
my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info,
LSN lsn __attribute__ ((unused)),
const uchar *header)
{
MARIA_SHARE *share= info->s;
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
my_bool error;
pgcache_page_no_t from, to, min_from;
DBUG_ENTER("_ma_apply_redo_bitmap_new_page");
from= page_korr(header);
to= page_korr(header + PAGE_STORE_SIZE);
DBUG_PRINT("info", ("from: %lu to: %lu", (ulong)from, (ulong)to));
if ((from > to) ||
(from % bitmap->pages_covered) != 0 ||
(to % bitmap->pages_covered) != 0)
{
error= TRUE; /* corrupted log record */
goto err;
}
min_from= (share->state.state.data_file_length / bitmap->block_size - 1) /
bitmap->pages_covered + 1;
min_from*= bitmap->pages_covered;
if (from < min_from)
{
DBUG_PRINT("info", ("overwrite bitmap pages from %lu", (ulong)min_from));
/*
We have to overwrite. It could be that there was a bitmap page in
memory, covering a data page which went to disk, then crash: the
bitmap page is now full of zeros and is ==min_from, we have to overwrite
it with correct checksum.
*/
}
share->state.changed|= STATE_CHANGED;
bzero(info->buff, bitmap->block_size);
if (!(error=
_ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to,
info->buff)))
share->state.state.data_file_length= (to + 1) * bitmap->block_size;
err:
DBUG_RETURN(error);
}
|
O0
|
c
|
ma_apply_redo_bitmap_new_page:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x635d0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
addq $0x5, %rdi
callq 0x635d0
movq %rax, -0x40(%rbp)
jmp 0x63a8d
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x63ac5
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
cmpq $0x0, %rdx
jne 0x63ac5
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
cmpq $0x0, %rdx
je 0x63ace
movb $0x1, -0x29(%rbp)
jmp 0x63b9a
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rcx
movl 0x134(%rcx), %ecx
xorl %edx, %edx
divq %rcx
subq $0x1, %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x138(%rax), %rax
imulq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x63b22
jmp 0x63b1e
jmp 0x63b20
jmp 0x63b22
movq -0x20(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x170(%rax)
movq -0x8(%rbp), %rax
movq 0x378(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x29280
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x378(%rax), %r8
callq 0x63bb0
movb %al, -0x29(%rbp)
cmpb $0x0, %al
jne 0x63b98
movq -0x40(%rbp), %rcx
addq $0x1, %rcx
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
imulq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x63b9a
jmp 0x63b9c
movb -0x29(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ma_apply_redo_bitmap_new_page:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, 0A10h
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
call uint5korr_1
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
add rdi, 5
call uint5korr_1
mov [rbp+var_40], rax
jmp short $+2
loc_63A8D:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
ja short loc_63AC5
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
cmp rdx, 0
jnz short loc_63AC5
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
cmp rdx, 0
jz short loc_63ACE
loc_63AC5:
mov [rbp+var_29], 1
jmp loc_63B9A
loc_63ACE:
mov rax, [rbp+var_20]
mov rax, [rax+40h]
mov rcx, [rbp+var_28]
mov ecx, [rcx+134h]
xor edx, edx
div rcx
sub rax, 1
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rax, [rax+138h]
imul rax, [rbp+var_48]
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jnb short loc_63B22
jmp short $+2
loc_63B1E:
jmp short $+2
loc_63B20:
jmp short $+2
loc_63B22:
mov rax, [rbp+var_20]
mov ecx, [rax+170h]
or ecx, 1
mov [rax+170h], ecx
mov rax, [rbp+var_8]
mov rdi, [rax+378h]
mov rax, [rbp+var_28]
mov eax, [rax+134h]
mov edx, eax
xor esi, esi
call _memset
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_40]
mov rax, [rbp+var_8]
mov r8, [rax+378h]
call _ma_bitmap_create_missing_into_pagecache
mov [rbp+var_29], al
cmp al, 0
jnz short loc_63B98
mov rcx, [rbp+var_40]
add rcx, 1
mov rax, [rbp+var_28]
mov eax, [rax+134h]
imul rcx, rax
mov rax, [rbp+var_20]
mov [rax+40h], rcx
loc_63B98:
jmp short $+2
loc_63B9A:
jmp short $+2
loc_63B9C:
mov al, [rbp+var_29]
mov [rbp+var_49], al
mov al, [rbp+var_49]
add rsp, 50h
pop rbp
retn
|
char ma_apply_redo_bitmap_new_page(long long *a1, long long a2, unsigned int *a3)
{
unsigned long long v4; // [rsp+10h] [rbp-40h]
unsigned long long v5; // [rsp+18h] [rbp-38h]
char missing_into_pagecache; // [rsp+27h] [rbp-29h]
long long v7; // [rsp+28h] [rbp-28h]
long long v8; // [rsp+30h] [rbp-20h]
v8 = *a1;
v7 = *a1 + 2576;
v5 = uint5korr_1(a3);
v4 = uint5korr_1((unsigned int *)((char *)a3 + 5));
if ( v5 > v4 || v5 % *(_QWORD *)(v7 + 312) || v4 % *(_QWORD *)(v7 + 312) )
return 1;
*(_DWORD *)(v8 + 368) |= 1u;
memset(a1[111], 0LL, *(unsigned int *)(v7 + 308));
missing_into_pagecache = ma_bitmap_create_missing_into_pagecache(v8, v7, v5, v4, a1[111]);
if ( !missing_into_pagecache )
*(_QWORD *)(v8 + 64) = *(unsigned int *)(v7 + 308) * (v4 + 1);
return missing_into_pagecache;
}
|
_ma_apply_redo_bitmap_new_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001635d0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x5
CALL 0x001635d0
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00163a8d
LAB_00163a8d:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x00163ac5
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
CMP RDX,0x0
JNZ 0x00163ac5
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
CMP RDX,0x0
JZ 0x00163ace
LAB_00163ac5:
MOV byte ptr [RBP + -0x29],0x1
JMP 0x00163b9a
LAB_00163ace:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x134]
XOR EDX,EDX
DIV RCX
SUB RAX,0x1
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x138]
IMUL RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x00163b22
JMP 0x00163b1e
LAB_00163b1e:
JMP 0x00163b20
LAB_00163b20:
JMP 0x00163b22
LAB_00163b22:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x1
MOV dword ptr [RAX + 0x170],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x378]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00129280
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x8]
MOV R8,qword ptr [RAX + 0x378]
CALL 0x00163bb0
MOV byte ptr [RBP + -0x29],AL
CMP AL,0x0
JNZ 0x00163b98
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x40],RCX
LAB_00163b98:
JMP 0x00163b9a
LAB_00163b9a:
JMP 0x00163b9c
LAB_00163b9c:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x49],AL
MOV AL,byte ptr [RBP + -0x49]
ADD RSP,0x50
POP RBP
RET
|
char _ma_apply_redo_bitmap_new_page(long *param_1,int8 param_2,long param_3)
{
long lVar1;
ulong uVar2;
ulong uVar3;
char local_31;
lVar1 = *param_1;
uVar2 = uint5korr(param_3);
uVar3 = uint5korr(param_3 + 5);
if (((uVar3 < uVar2) || (uVar2 % *(ulong *)(lVar1 + 0xb48) != 0)) ||
(uVar3 % *(ulong *)(lVar1 + 0xb48) != 0)) {
local_31 = '\x01';
}
else {
*(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 1;
memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar1 + 0xb44));
local_31 = _ma_bitmap_create_missing_into_pagecache
(lVar1,lVar1 + 0xa10,uVar2,uVar3,param_1[0x6f]);
if (local_31 == '\0') {
*(ulong *)(lVar1 + 0x40) = (uVar3 + 1) * (ulong)*(uint *)(lVar1 + 0xb44);
}
}
return local_31;
}
|
|
65,130 |
ma_apply_redo_bitmap_new_page
|
eloqsql/storage/maria/ma_bitmap.c
|
my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info,
LSN lsn __attribute__ ((unused)),
const uchar *header)
{
MARIA_SHARE *share= info->s;
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
my_bool error;
pgcache_page_no_t from, to, min_from;
DBUG_ENTER("_ma_apply_redo_bitmap_new_page");
from= page_korr(header);
to= page_korr(header + PAGE_STORE_SIZE);
DBUG_PRINT("info", ("from: %lu to: %lu", (ulong)from, (ulong)to));
if ((from > to) ||
(from % bitmap->pages_covered) != 0 ||
(to % bitmap->pages_covered) != 0)
{
error= TRUE; /* corrupted log record */
goto err;
}
min_from= (share->state.state.data_file_length / bitmap->block_size - 1) /
bitmap->pages_covered + 1;
min_from*= bitmap->pages_covered;
if (from < min_from)
{
DBUG_PRINT("info", ("overwrite bitmap pages from %lu", (ulong)min_from));
/*
We have to overwrite. It could be that there was a bitmap page in
memory, covering a data page which went to disk, then crash: the
bitmap page is now full of zeros and is ==min_from, we have to overwrite
it with correct checksum.
*/
}
share->state.changed|= STATE_CHANGED;
bzero(info->buff, bitmap->block_size);
if (!(error=
_ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to,
info->buff)))
share->state.state.data_file_length= (to + 1) * bitmap->block_size;
err:
DBUG_RETURN(error);
}
|
O3
|
c
|
ma_apply_redo_bitmap_new_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdx), %eax
movl 0x5(%rdx), %ecx
movzbl 0x4(%rdx), %r12d
shlq $0x20, %r12
orq %rax, %r12
movzbl 0x9(%rdx), %r14d
shlq $0x20, %r14
orq %rcx, %r14
movb $0x1, %bl
cmpq %r14, %r12
ja 0x53825
movq %rdi, %r13
movq (%rdi), %r15
movq 0xb48(%r15), %rcx
movq %r12, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x53825
movq %r14, %rax
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0x53825
orb $0x1, 0x170(%r15)
leaq 0xa10(%r15), %rax
movq %rax, -0x30(%rbp)
movq 0x378(%r13), %rdi
movl 0xb44(%r15), %edx
xorl %esi, %esi
callq 0x29270
movq 0x378(%r13), %r8
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x53836
testb %al, %al
jne 0x53825
incq %r14
movl 0xb44(%r15), %eax
imulq %r14, %rax
movq %rax, 0x40(%r15)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_apply_redo_bitmap_new_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov eax, [rdx]
mov ecx, [rdx+5]
movzx r12d, byte ptr [rdx+4]
shl r12, 20h
or r12, rax
movzx r14d, byte ptr [rdx+9]
shl r14, 20h
or r14, rcx
mov bl, 1
cmp r12, r14
ja loc_53825
mov r13, rdi
mov r15, [rdi]
mov rcx, [r15+0B48h]
mov rax, r12
xor edx, edx
div rcx
test rdx, rdx
jnz short loc_53825
mov rax, r14
xor edx, edx
div rcx
test rdx, rdx
jnz short loc_53825
or byte ptr [r15+170h], 1
lea rax, [r15+0A10h]
mov [rbp+var_30], rax
mov rdi, [r13+378h]
mov edx, [r15+0B44h]
xor esi, esi
call _memset
mov r8, [r13+378h]
mov rdi, r15
mov rsi, [rbp+var_30]
mov rdx, r12
mov rcx, r14
call _ma_bitmap_create_missing_into_pagecache
test al, al
jnz short loc_53825
inc r14
mov eax, [r15+0B44h]
imul rax, r14
mov [r15+40h], rax
xor ebx, ebx
loc_53825:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_apply_redo_bitmap_new_page(_QWORD *a1, long long a2, unsigned int *a3)
{
unsigned int v3; // ebx
unsigned long long v4; // r12
unsigned long long v5; // r14
long long v6; // r15
unsigned long long v7; // rcx
v4 = *a3 | ((unsigned long long)*((unsigned __int8 *)a3 + 4) << 32);
v5 = *(unsigned int *)((char *)a3 + 5) | ((unsigned long long)*((unsigned __int8 *)a3 + 9) << 32);
LOBYTE(v3) = 1;
if ( v4 <= v5 )
{
v6 = *a1;
v7 = *(_QWORD *)(*a1 + 2888LL);
if ( !(v4 % v7) && !(v5 % v7) )
{
*(_BYTE *)(v6 + 368) |= 1u;
memset(a1[111], 0LL, *(unsigned int *)(v6 + 2884));
if ( !(unsigned __int8)ma_bitmap_create_missing_into_pagecache(v6, v6 + 2576, v4, v5, a1[111]) )
{
*(_QWORD *)(v6 + 64) = (v5 + 1) * *(unsigned int *)(v6 + 2884);
return 0;
}
}
}
return v3;
}
|
_ma_apply_redo_bitmap_new_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EAX,dword ptr [RDX]
MOV ECX,dword ptr [RDX + 0x5]
MOVZX R12D,byte ptr [RDX + 0x4]
SHL R12,0x20
OR R12,RAX
MOVZX R14D,byte ptr [RDX + 0x9]
SHL R14,0x20
OR R14,RCX
MOV BL,0x1
CMP R12,R14
JA 0x00153825
MOV R13,RDI
MOV R15,qword ptr [RDI]
MOV RCX,qword ptr [R15 + 0xb48]
MOV RAX,R12
XOR EDX,EDX
DIV RCX
TEST RDX,RDX
JNZ 0x00153825
MOV RAX,R14
XOR EDX,EDX
DIV RCX
TEST RDX,RDX
JNZ 0x00153825
OR byte ptr [R15 + 0x170],0x1
LEA RAX,[R15 + 0xa10]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [R13 + 0x378]
MOV EDX,dword ptr [R15 + 0xb44]
XOR ESI,ESI
CALL 0x00129270
MOV R8,qword ptr [R13 + 0x378]
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R12
MOV RCX,R14
CALL 0x00153836
TEST AL,AL
JNZ 0x00153825
INC R14
MOV EAX,dword ptr [R15 + 0xb44]
IMUL RAX,R14
MOV qword ptr [R15 + 0x40],RAX
XOR EBX,EBX
LAB_00153825:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _ma_apply_redo_bitmap_new_page(long *param_1,int8 param_2,uint5 *param_3)
{
long lVar1;
char cVar2;
int8 unaff_RBX;
ulong uVar3;
ulong uVar4;
ulong uVar5;
uVar4 = (ulong)*param_3;
uVar5 = (ulong)*(uint5 *)((long)param_3 + 5);
uVar3 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (uVar4 <= uVar5) {
lVar1 = *param_1;
if ((uVar4 % *(ulong *)(lVar1 + 0xb48) == 0) && (uVar5 % *(ulong *)(lVar1 + 0xb48) == 0)) {
*(byte *)(lVar1 + 0x170) = *(byte *)(lVar1 + 0x170) | 1;
memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar1 + 0xb44));
cVar2 = _ma_bitmap_create_missing_into_pagecache
(lVar1,lVar1 + 0xa10,uVar4,uVar5,param_1[0x6f]);
if (cVar2 == '\0') {
*(ulong *)(lVar1 + 0x40) = (ulong)*(uint *)(lVar1 + 0xb44) * (uVar5 + 1);
uVar3 = 0;
}
}
}
return uVar3 & 0xffffffff;
}
|
|
65,131 |
test_upscale_ext::build_graph(ggml_context*)
|
llama.cpp/tests/test-backend-ops.cpp
|
ggml_tensor * build_graph(ggml_context * ctx) override {
ggml_tensor * a = ggml_new_tensor(ctx, type, 4, ne.data());
ggml_set_name(a, "a");
ggml_tensor * out = ggml_upscale_ext(ctx, a, ne_tgt[0], ne_tgt[1],ne_tgt[2], ne_tgt[3], mode);
ggml_set_name(out, "out");
return out;
}
|
O3
|
cpp
|
test_upscale_ext::build_graph(ggml_context*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x38(%rdi), %esi
leaq 0x40(%rdi), %rcx
movq %rbx, %rdi
movl $0x4, %edx
callq 0x1cbe0
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2cc20
leaq 0x17eb2(%rip), %rsi # 0x690c4
movq %r15, %rdi
callq 0x1c690
movl 0x60(%r14), %edx
movl 0x68(%r14), %ecx
movl 0x70(%r14), %r8d
movl 0x78(%r14), %r9d
movl 0x80(%r14), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c280
movq %rax, %rbx
leaq 0x189a2(%rip), %rsi # 0x69beb
movq %rax, %rdi
callq 0x1c690
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
_ZN16test_upscale_ext11build_graphEP12ggml_context:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14, rdi
mov esi, [rdi+38h]
lea rcx, [rdi+40h]
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 *)
lea rsi, aViewOfA_0+8; "a"
mov rdi, r15
call _ggml_set_name
mov edx, [r14+60h]
mov ecx, [r14+68h]
mov r8d, [r14+70h]
mov r9d, [r14+78h]
mov eax, [r14+80h]
mov [rsp+28h+var_28], eax
mov rdi, rbx
mov rsi, r15
call _ggml_upscale_ext
mov rbx, rax
lea rsi, aSumOfOut+7; "out"
mov rdi, rax
call _ggml_set_name
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long test_upscale_ext::build_graph(unsigned int *a1, long long a2)
{
long long v2; // r15
long long v3; // rbx
v2 = ggml_new_tensor(a2, a1[14], 4LL);
test_case::add_sentinel((long long)a1, a2);
ggml_set_name(v2, "a");
v3 = ggml_upscale_ext(a2, v2, a1[24], a1[26], a1[28], a1[30], a1[32]);
ggml_set_name(v3, "out");
return v3;
}
|
build_graph:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x38]
LEA RCX,[RDI + 0x40]
MOV RDI,RBX
MOV EDX,0x4
CALL 0x0011cbe0
MOV R15,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012cc20
LEA RSI,[0x1690c4]
MOV RDI,R15
CALL 0x0011c690
MOV EDX,dword ptr [R14 + 0x60]
MOV ECX,dword ptr [R14 + 0x68]
MOV R8D,dword ptr [R14 + 0x70]
MOV R9D,dword ptr [R14 + 0x78]
MOV EAX,dword ptr [R14 + 0x80]
MOV dword ptr [RSP],EAX
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c280
MOV RBX,RAX
LEA RSI,[0x169beb]
MOV RDI,RAX
CALL 0x0011c690
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* test_upscale_ext::build_graph(ggml_context*) */
int8 __thiscall test_upscale_ext::build_graph(test_upscale_ext *this,ggml_context *param_1)
{
int8 uVar1;
uVar1 = ggml_new_tensor(param_1,*(int4 *)(this + 0x38),4,this + 0x40);
test_case::add_sentinel((test_case *)this,param_1);
ggml_set_name(uVar1,"a");
uVar1 = ggml_upscale_ext(param_1,uVar1,*(int4 *)(this + 0x60),*(int4 *)(this + 0x68),
*(int4 *)(this + 0x70),*(int4 *)(this + 0x78),
*(int4 *)(this + 0x80));
ggml_set_name(uVar1,"out");
return uVar1;
}
|
|
65,132 |
pfs_end_file_close_wait_v1
|
eloqsql/storage/perfschema/pfs.cc
|
void pfs_end_file_close_wait_v1(PSI_file_locker *locker, int rc)
{
PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker);
assert(state != NULL);
pfs_end_file_wait_v1(locker, 0);
if (rc == 0)
{
PFS_thread *thread= reinterpret_cast<PFS_thread*> (state->m_thread);
PFS_file *file= reinterpret_cast<PFS_file*> (state->m_file);
/* Release or destroy the file if necessary */
switch(state->m_operation)
{
case PSI_FILE_CLOSE:
if (file != NULL)
{
if (file->m_temporary)
{
assert(file->m_file_stat.m_open_count <= 1);
destroy_file(thread, file);
}
else
release_file(file);
}
break;
case PSI_FILE_STREAM_CLOSE:
if (file != NULL)
release_file(file);
break;
case PSI_FILE_DELETE:
if (file != NULL)
destroy_file(thread, file);
break;
default:
assert(false);
break;
}
}
return;
}
|
O0
|
cpp
|
pfs_end_file_close_wait_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x496d0
cmpl $0x0, -0xc(%rbp)
jne 0x49c67
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0x4, %eax
je 0x49c0b
jmp 0x49bf7
movl -0x2c(%rbp), %eax
subl $0x5, %eax
je 0x49c3b
jmp 0x49c01
movl -0x2c(%rbp), %eax
subl $0xe, %eax
je 0x49c4d
jmp 0x49c63
cmpq $0x0, -0x28(%rbp)
je 0x49c39
movq -0x28(%rbp), %rax
testb $0x1, 0x2a8(%rax)
je 0x49c2e
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x30430
jmp 0x49c37
movq -0x28(%rbp), %rdi
callq 0x30410
jmp 0x49c39
jmp 0x49c65
cmpq $0x0, -0x28(%rbp)
je 0x49c4b
movq -0x28(%rbp), %rdi
callq 0x30410
jmp 0x49c65
cmpq $0x0, -0x28(%rbp)
je 0x49c61
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x30430
jmp 0x49c65
jmp 0x49c65
jmp 0x49c67
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
pfs_end_file_close_wait_v1:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call pfs_end_file_wait_v1
cmp [rbp+var_C], 0
jnz loc_49C67
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov eax, [rax+4]
mov [rbp+var_2C], eax
sub eax, 4
jz short loc_49C0B
jmp short $+2
loc_49BF7:
mov eax, [rbp+var_2C]
sub eax, 5
jz short loc_49C3B
jmp short $+2
loc_49C01:
mov eax, [rbp+var_2C]
sub eax, 0Eh
jz short loc_49C4D
jmp short loc_49C63
loc_49C0B:
cmp [rbp+var_28], 0
jz short loc_49C39
mov rax, [rbp+var_28]
test byte ptr [rax+2A8h], 1
jz short loc_49C2E
mov rdi, [rbp+var_20]; PFS_thread *
mov rsi, [rbp+var_28]; PFS_file *
call _Z12destroy_fileP10PFS_threadP8PFS_file; destroy_file(PFS_thread *,PFS_file *)
jmp short loc_49C37
loc_49C2E:
mov rdi, [rbp+var_28]
call _Z12release_fileP8PFS_file; release_file(PFS_file *)
loc_49C37:
jmp short $+2
loc_49C39:
jmp short loc_49C65
loc_49C3B:
cmp [rbp+var_28], 0
jz short loc_49C4B
mov rdi, [rbp+var_28]
call _Z12release_fileP8PFS_file; release_file(PFS_file *)
loc_49C4B:
jmp short loc_49C65
loc_49C4D:
cmp [rbp+var_28], 0
jz short loc_49C61
mov rdi, [rbp+var_20]; PFS_thread *
mov rsi, [rbp+var_28]; PFS_file *
call _Z12destroy_fileP10PFS_threadP8PFS_file; destroy_file(PFS_thread *,PFS_file *)
loc_49C61:
jmp short loc_49C65
loc_49C63:
jmp short $+2
loc_49C65:
jmp short $+2
loc_49C67:
add rsp, 30h
pop rbp
retn
|
unsigned long long pfs_end_file_close_wait_v1(long long a1, int a2)
{
unsigned long long result; // rax
int v3; // [rsp+4h] [rbp-2Ch]
PFS_file *v4; // [rsp+8h] [rbp-28h]
result = (unsigned long long)pfs_end_file_wait_v1((int *)a1, 0LL);
if ( !a2 )
{
v4 = *(PFS_file **)(a1 + 8);
v3 = *(_DWORD *)(a1 + 4);
result = (unsigned int)(v3 - 4);
if ( v3 == 4 )
{
if ( v4 )
{
if ( (*((_BYTE *)v4 + 680) & 1) != 0 )
return destroy_file(*(PFS_thread **)(a1 + 32), v4);
return (unsigned long long)release_file(v4);
}
}
else
{
result = (unsigned int)(v3 - 5);
if ( v3 == 5 )
{
if ( v4 )
return (unsigned long long)release_file(v4);
}
else
{
result = (unsigned int)(v3 - 14);
if ( v3 == 14 && v4 )
return destroy_file(*(PFS_thread **)(a1 + 32), v4);
}
}
}
return result;
}
|
pfs_end_file_close_wait_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001496d0
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x00149c67
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x2c],EAX
SUB EAX,0x4
JZ 0x00149c0b
JMP 0x00149bf7
LAB_00149bf7:
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,0x5
JZ 0x00149c3b
JMP 0x00149c01
LAB_00149c01:
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,0xe
JZ 0x00149c4d
JMP 0x00149c63
LAB_00149c0b:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00149c39
MOV RAX,qword ptr [RBP + -0x28]
TEST byte ptr [RAX + 0x2a8],0x1
JZ 0x00149c2e
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00130430
JMP 0x00149c37
LAB_00149c2e:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00130410
LAB_00149c37:
JMP 0x00149c39
LAB_00149c39:
JMP 0x00149c65
LAB_00149c3b:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00149c4b
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00130410
LAB_00149c4b:
JMP 0x00149c65
LAB_00149c4d:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00149c61
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00130430
LAB_00149c61:
JMP 0x00149c65
LAB_00149c63:
JMP 0x00149c65
LAB_00149c65:
JMP 0x00149c67
LAB_00149c67:
ADD RSP,0x30
POP RBP
RET
|
void pfs_end_file_close_wait_v1(long param_1,int param_2)
{
int iVar1;
PFS_file *pPVar2;
pfs_end_file_wait_v1(param_1,0);
if (param_2 == 0) {
pPVar2 = *(PFS_file **)(param_1 + 8);
iVar1 = *(int *)(param_1 + 4);
if (iVar1 == 4) {
if (pPVar2 != (PFS_file *)0x0) {
if (((byte)pPVar2[0x2a8] & 1) == 0) {
release_file(pPVar2);
}
else {
destroy_file(*(PFS_thread **)(param_1 + 0x20),pPVar2);
}
}
}
else if (iVar1 == 5) {
if (pPVar2 != (PFS_file *)0x0) {
release_file(pPVar2);
}
}
else if ((iVar1 == 0xe) && (pPVar2 != (PFS_file *)0x0)) {
destroy_file(*(PFS_thread **)(param_1 + 0x20),pPVar2);
}
}
return;
}
|
|
65,133 |
minja::Value::operator<(minja::Value const&) const
|
monkey531[P]llama/common/minja.hpp
|
bool operator<(const Value & other) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_number() && other.is_number()) return get<double>() < other.get<double>();
if (is_string() && other.is_string()) return get<std::string>() < other.get<std::string>();
throw std::runtime_error("Cannot compare values: " + dump() + " < " + other.dump());
}
|
O3
|
cpp
|
minja::Value::operator<(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x20(%rdi)
movb 0x40(%rdi), %al
jne 0x97535
cmpq $0x0, 0x10(%r15)
jne 0x97535
testb %al, %al
jne 0x97535
cmpq $0x0, 0x30(%r15)
je 0x97638
leal -0x5(%rax), %ecx
cmpb $0x2, %cl
ja 0x9756f
movb 0x40(%r14), %al
addb $-0x5, %al
cmpb $0x2, %al
ja 0x9766a
movq %r15, %rdi
callq 0x8659c
movsd %xmm0, 0x48(%rsp)
movq %r14, %rdi
callq 0x8659c
ucomisd 0x48(%rsp), %xmm0
seta %bl
jmp 0x97626
cmpb $0x3, %al
jne 0x9766a
cmpb $0x3, 0x40(%r14)
jne 0x9766a
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x87536
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x87536
movq 0x30(%rsp), %r15
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r12
cmpq %r15, %r12
movq %r15, %rdx
cmovbq %r12, %rdx
testq %rdx, %rdx
je 0x975cd
movq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x1a410
movl %eax, %ebx
testl %eax, %eax
jne 0x975ee
subq %r12, %r15
cmpq $-0x7fffffff, %r15 # imm = 0x80000001
movq $-0x80000000, %rbx # imm = 0x80000000
cmovgeq %r15, %rbx
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
cmpq %rax, %rbx
cmovgeq %rax, %rbx
leaq 0x18(%rsp), %rax
cmpq %rax, %r14
je 0x97608
movq 0x18(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x1a8f0
shrl $0x1f, %ebx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x97626
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8f0
movl %ebx, %eax
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a450
movq %rax, %rbx
leaq 0x58e1e(%rip), %rsi # 0xf046a
movq %rax, %rdi
callq 0x1a330
movq 0x94995(%rip), %rsi # 0x12bff0
movq 0x948fe(%rip), %rdx # 0x12bf60
movq %rbx, %rdi
callq 0x1af30
movl $0x10, %edi
callq 0x1a450
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x866e8
leaq 0x599cd(%rip), %rsi # 0xf105f
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x78e09
leaq 0x599cc(%rip), %rsi # 0xf1077
leaq 0x90(%rsp), %rdi
callq 0x1b100
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x976d9
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x976e6
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x866e8
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x78eda
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ae30
xorl %ebp, %ebp
movq 0x948b1(%rip), %rsi # 0x12bff0
movq 0x9481a(%rip), %rdx # 0x12bf60
movq %rbx, %rdi
callq 0x1af30
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x97774
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x97774
movq %rax, %r14
movb $0x1, %bpl
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9779d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x9779d
movq %rax, %r14
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x977bc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x977bc
movq %rax, %r14
movb $0x1, %bpl
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x977dd
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x977f8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0x97844
jmp 0x9784c
movq %rax, %r14
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x97844
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x97844
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9784c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x9784c
jmp 0x97841
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afb0
|
_ZNK5minja5ValueltERKS0_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 0B0h
mov r14, rsi
mov r15, rdi
cmp qword ptr [rdi+20h], 0
mov al, [rdi+40h]
jnz short loc_97535
cmp qword ptr [r15+10h], 0
jnz short loc_97535
test al, al
jnz short loc_97535
cmp qword ptr [r15+30h], 0
jz loc_97638
loc_97535:
lea ecx, [rax-5]
cmp cl, 2
ja short loc_9756F
mov al, [r14+40h]
add al, 0FBh
cmp al, 2
ja loc_9766A
mov rdi, r15
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+0D8h+var_90], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
ucomisd xmm0, [rsp+0D8h+var_90]
setnbe bl
jmp loc_97626
loc_9756F:
cmp al, 3
jnz loc_9766A
cmp byte ptr [r14+40h], 3
jnz loc_9766A
lea rdi, [rsp+0D8h+var_B0]
mov rsi, r15
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
lea rdi, [rsp+0D8h+var_D0]
mov rsi, r14
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov r15, [rsp+0D8h+var_A8]
mov r14, [rsp+0D8h+var_D0]
mov r12, [rsp+0D8h+var_C8]
cmp r12, r15
mov rdx, r15
cmovb rdx, r12
test rdx, rdx
jz short loc_975CD
mov rdi, [rsp+0D8h+var_B0]
mov rsi, r14
call _memcmp
mov ebx, eax
test eax, eax
jnz short loc_975EE
loc_975CD:
sub r15, r12
cmp r15, 0FFFFFFFF80000001h
mov rbx, 0FFFFFFFF80000000h
cmovge rbx, r15
mov eax, 7FFFFFFFh
cmp rbx, rax
cmovge rbx, rax
loc_975EE:
lea rax, [rsp+0D8h+var_C0]
cmp r14, rax
jz short loc_97608
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_97608:
shr ebx, 1Fh
lea rax, [rsp+0D8h+var_A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_97626
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_97626:
mov eax, ebx
add rsp, 0B0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_97638:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_9766A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+0D8h+var_88]
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aCannotCompareV; "Cannot compare values: "
lea rdi, [rsp+0D8h+var_48]
lea rdx, [rsp+0D8h+var_88]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rsi, asc_F1077; " < "
lea rdi, [rsp+0D8h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+0D8h+var_C0]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_976D9
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
jmp short loc_976E6
loc_976D9:
mov [rsp+0D8h+var_D0], rdx
mov rdx, [rcx]
mov [rsp+0D8h+var_C0], rdx
loc_976E6:
mov rdx, [rax+8]
mov [rsp+0D8h+var_C8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+0D8h+var_68]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rdi, [rsp+0D8h+var_B0]
lea rsi, [rsp+0D8h+var_D0]
lea rdx, [rsp+0D8h+var_68]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
mov bpl, 1
lea rsi, [rsp+0D8h+var_B0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+0D8h+var_A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_97774
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_97774
mov r14, rax
mov bpl, 1
loc_97774:
lea rax, [rsp+0D8h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9779D
mov rsi, [rsp+0D8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9779D
mov r14, rax
mov bpl, 1
loc_9779D:
mov rdi, [rsp+0D8h+var_D0]; void *
cmp rdi, r15
jz short loc_977BC
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_977BC
mov r14, rax
mov bpl, 1
loc_977BC:
lea rax, [rsp+0D8h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_977DD
mov rsi, [rsp+0D8h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_977DD:
lea rax, [rsp+0D8h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_977F8
mov rsi, [rsp+0D8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_977F8:
test bpl, bpl
jnz short loc_97844
jmp short loc_9784C
mov r14, rax
lea rax, [rsp+0D8h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_97844
mov rsi, [rsp+0D8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_97844
mov r14, rax
lea rax, [rsp+0D8h+var_A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9784C
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9784C
jmp short $+2
loc_97841:
mov r14, rax
loc_97844:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_9784C:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::operator<(long long a1, long long a2)
{
unsigned int v2; // ebx
char v3; // al
unsigned long long v4; // r15
__int128 *v5; // r14
unsigned long long v6; // r12
unsigned long long v7; // rdx
long long v8; // rbx
long long v9; // r15
std::runtime_error *exception; // rbx
void *v12; // rbx
long long v13; // rax
__int128 *v14; // rcx
void *v15; // [rsp+8h] [rbp-D0h] BYREF
unsigned long long v16; // [rsp+10h] [rbp-C8h]
__int128 v17; // [rsp+18h] [rbp-C0h] BYREF
long long *v18; // [rsp+28h] [rbp-B0h] BYREF
unsigned long long v19; // [rsp+30h] [rbp-A8h]
long long v20; // [rsp+38h] [rbp-A0h] BYREF
double v21; // [rsp+48h] [rbp-90h]
_BYTE v22[16]; // [rsp+50h] [rbp-88h] BYREF
_QWORD v23[2]; // [rsp+70h] [rbp-68h] BYREF
_BYTE v24[16]; // [rsp+90h] [rbp-48h] BYREF
v3 = *(_BYTE *)(a1 + 64);
if ( !*(_QWORD *)(a1 + 32) && !*(_QWORD *)(a1 + 16) && !v3 && !*(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( (unsigned __int8)(v3 - 5) <= 2u )
{
if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) <= 2u )
{
v21 = minja::Value::get<double>(a1);
LOBYTE(v2) = minja::Value::get<double>(a2) > v21;
return v2;
}
LABEL_24:
v12 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v22, a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v24, (long long)"Cannot compare values: ", (long long)v22);
v13 = std::string::append(v24, " < ");
v15 = &v17;
v14 = (__int128 *)(v13 + 16);
if ( *(_QWORD *)v13 == v13 + 16 )
{
v17 = *v14;
}
else
{
v15 = *(void **)v13;
*(_QWORD *)&v17 = *(_QWORD *)v14;
}
v16 = *(_QWORD *)(v13 + 8);
*(_QWORD *)v13 = v14;
*(_QWORD *)(v13 + 8) = 0LL;
*(_BYTE *)(v13 + 16) = 0;
minja::Value::dump[abi:cxx11]((long long)v23, a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)&v18, &v15, v23);
std::runtime_error::runtime_error(v12, &v18);
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 != 3 || *(_BYTE *)(a2 + 64) != 3 )
goto LABEL_24;
minja::Value::get<std::string>((long long)&v18, (_QWORD *)a1);
minja::Value::get<std::string>((long long)&v15, (_QWORD *)a2);
v4 = v19;
v5 = (__int128 *)v15;
v6 = v16;
v7 = v19;
if ( v16 < v19 )
v7 = v16;
if ( !v7 || (LODWORD(v8) = memcmp(v18, v15), !(_DWORD)v8) )
{
v9 = v4 - v6;
v8 = 0xFFFFFFFF80000000LL;
if ( v9 >= -2147483647 )
v8 = v9;
if ( v8 >= 0x7FFFFFFF )
LODWORD(v8) = 0x7FFFFFFF;
}
if ( v5 != &v17 )
operator delete(v5, v17 + 1);
v2 = (unsigned int)v8 >> 31;
if ( v18 != &v20 )
operator delete(v18, v20 + 1);
return v2;
}
|
operator<:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xb0
MOV R14,RSI
MOV R15,RDI
CMP qword ptr [RDI + 0x20],0x0
MOV AL,byte ptr [RDI + 0x40]
JNZ 0x00197535
CMP qword ptr [R15 + 0x10],0x0
JNZ 0x00197535
TEST AL,AL
JNZ 0x00197535
CMP qword ptr [R15 + 0x30],0x0
JZ 0x00197638
LAB_00197535:
LEA ECX,[RAX + -0x5]
CMP CL,0x2
JA 0x0019756f
MOV AL,byte ptr [R14 + 0x40]
ADD AL,0xfb
CMP AL,0x2
JA 0x0019766a
MOV RDI,R15
CALL 0x0018659c
MOVSD qword ptr [RSP + 0x48],XMM0
MOV RDI,R14
CALL 0x0018659c
UCOMISD XMM0,qword ptr [RSP + 0x48]
SETA BL
JMP 0x00197626
LAB_0019756f:
CMP AL,0x3
JNZ 0x0019766a
CMP byte ptr [R14 + 0x40],0x3
JNZ 0x0019766a
LEA RDI,[RSP + 0x28]
MOV RSI,R15
CALL 0x00187536
LAB_0019758f:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00187536
LAB_0019759c:
MOV R15,qword ptr [RSP + 0x30]
MOV R14,qword ptr [RSP + 0x8]
MOV R12,qword ptr [RSP + 0x10]
CMP R12,R15
MOV RDX,R15
CMOVC RDX,R12
TEST RDX,RDX
JZ 0x001975cd
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,R14
CALL 0x0011a410
MOV EBX,EAX
TEST EAX,EAX
JNZ 0x001975ee
LAB_001975cd:
SUB R15,R12
CMP R15,-0x7fffffff
MOV RBX,-0x80000000
CMOVGE RBX,R15
MOV EAX,0x7fffffff
CMP RBX,RAX
CMOVGE RBX,RAX
LAB_001975ee:
LEA RAX,[RSP + 0x18]
CMP R14,RAX
JZ 0x00197608
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
MOV RDI,R14
CALL 0x0011a8f0
LAB_00197608:
SHR EBX,0x1f
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00197626
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a8f0
LAB_00197626:
MOV EAX,EBX
ADD RSP,0xb0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00197638:
MOV EDI,0x10
CALL 0x0011a450
MOV RBX,RAX
LAB_00197645:
LEA RSI,[0x1f046a]
MOV RDI,RAX
CALL 0x0011a330
LAB_00197654:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,RBX
CALL 0x0011af30
LAB_0019766a:
MOV EDI,0x10
CALL 0x0011a450
MOV RBX,RAX
LAB_00197677:
LEA RDI,[RSP + 0x50]
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001866e8
LAB_0019768b:
LEA RSI,[0x1f105f]
LEA RDI,[RSP + 0x90]
LEA RDX,[RSP + 0x50]
CALL 0x00178e09
LAB_001976a4:
LEA RSI,[0x1f1077]
LEA RDI,[RSP + 0x90]
CALL 0x0011b100
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x001976d9
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
JMP 0x001976e6
LAB_001976d9:
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
LAB_001976e6:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001976fe:
LEA RDI,[RSP + 0x70]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001866e8
LAB_00197712:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x70]
CALL 0x00178eda
MOV BPL,0x1
LAB_00197729:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0011ae30
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,RBX
CALL 0x0011af30
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
ulong __thiscall minja::Value::operator<(Value *this,Value *param_1)
{
Value VVar1;
double dVar2;
uint uVar3;
runtime_error *prVar4;
long *plVar5;
long *plVar6;
ulong uVar7;
int8 unaff_RBX;
long *local_d0;
ulong local_c8;
long local_c0;
long lStack_b8;
long *local_b0;
ulong local_a8;
long local_a0 [2];
double local_90;
int1 local_88 [32];
int1 local_68 [32];
char local_48 [32];
VVar1 = this[0x40];
if ((((*(long *)(this + 0x20) == 0) && (*(long *)(this + 0x10) == 0)) && (VVar1 == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00197645 to 00197653 has its CatchHandler @ 00197841 */
std::runtime_error::runtime_error(prVar4,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
if ((byte)((char)VVar1 - 5U) < 3) {
if (2 < (byte)((char)param_1[0x40] - 5U)) {
LAB_0019766a:
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00197677 to 0019768a has its CatchHandler @ 0019783f */
dump_abi_cxx11_((int)local_88,SUB81(this,0));
/* try { // try from 0019768b to 001976a3 has its CatchHandler @ 001977ff */
std::operator+(local_48,(string *)"Cannot compare values: ");
/* try { // try from 001976a4 to 001976b7 has its CatchHandler @ 001977b6 */
plVar5 = (long *)std::__cxx11::string::append(local_48);
local_d0 = (long *)*plVar5;
plVar6 = plVar5 + 2;
if (local_d0 == plVar6) {
local_c0 = *plVar6;
lStack_b8 = plVar5[3];
local_d0 = &local_c0;
}
else {
local_c0 = *plVar6;
}
local_c8 = plVar5[1];
*plVar5 = (long)plVar6;
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
/* try { // try from 001976fe to 00197711 has its CatchHandler @ 00197797 */
dump_abi_cxx11_((int)local_68,SUB81(param_1,0));
/* try { // try from 00197712 to 00197725 has its CatchHandler @ 0019776e */
std::operator+((string *)&local_b0,(string *)&local_d0);
/* try { // try from 00197729 to 0019774d has its CatchHandler @ 0019774e */
std::runtime_error::runtime_error(prVar4,(string *)&local_b0);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
local_90 = get<double>(this);
dVar2 = get<double>(param_1);
uVar7 = CONCAT71((int7)((ulong)unaff_RBX >> 8),local_90 < dVar2);
goto LAB_00197626;
}
if ((VVar1 != (Value)0x3) || (param_1[0x40] != (Value)0x3)) goto LAB_0019766a;
get<std::__cxx11::string>();
/* try { // try from 0019758f to 0019759b has its CatchHandler @ 0019781f */
get<std::__cxx11::string>();
uVar7 = local_a8;
if (local_c8 < local_a8) {
uVar7 = local_c8;
}
if (uVar7 == 0) {
LAB_001975cd:
uVar7 = 0xffffffff80000000;
if (-0x80000000 < (long)(local_a8 - local_c8)) {
uVar7 = local_a8 - local_c8;
}
if (0x7ffffffe < (long)uVar7) {
uVar7 = 0;
}
}
else {
uVar3 = memcmp(local_b0,local_d0,uVar7);
uVar7 = (ulong)uVar3;
if (uVar3 == 0) goto LAB_001975cd;
}
if (local_d0 != &local_c0) {
operator_delete(local_d0,local_c0 + 1);
}
uVar7 = uVar7 >> 0x1f & 1;
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
LAB_00197626:
return uVar7 & 0xffffffff;
}
|
|
65,134 |
my_load_path
|
eloqsql/mysys/mf_loadpath.c
|
char * my_load_path(char * to, const char *path,
const char *own_path_prefix)
{
char buff[FN_REFLEN+1];
const char *from= buff;
int is_cur;
DBUG_ENTER("my_load_path");
DBUG_PRINT("enter",("path: %s prefix: %s",path,
own_path_prefix ? own_path_prefix : ""));
if ((path[0] == FN_HOMELIB && path[1] == FN_LIBCHAR) ||
test_if_hard_path(path))
from= path;
else if ((is_cur=(path[0] == FN_CURLIB && path[1] == FN_LIBCHAR)) ||
(is_prefix(path,FN_PARENTDIR)) ||
! own_path_prefix)
{
if (is_cur)
is_cur=2; /* Remove current dir */
if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0)))
{
size_t length= strlen(buff);
(void) strmake(buff + length, path+is_cur, FN_REFLEN - length);
}
else
from= path; /* Return org file name */
}
else
(void) strxnmov(buff, FN_REFLEN, own_path_prefix, path, NullS);
strmake(to, from, FN_REFLEN-1);
DBUG_PRINT("exit",("to: %s",to));
DBUG_RETURN(to);
}
|
O3
|
c
|
my_load_path:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpb $0x7e, (%rsi)
jne 0x65a56
cmpb $0x2f, 0x1(%r14)
je 0x65a62
movq %r14, %rdi
callq 0x61666
testl %eax, %eax
je 0x65a9d
movq %r14, %r12
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9292c
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x65b44
movq %rbx, %rax
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x2e, (%r14)
jne 0x65ab0
movl $0x2, %r13d
cmpb $0x2f, 0x1(%r14)
je 0x65aef
leaq 0x33a0a(%rip), %rsi # 0x994c1
movq %r14, %rdi
callq 0x90ff0
xorl %r13d, %r13d
testq %r15, %r15
je 0x65aef
testl %eax, %eax
jne 0x65aef
leaq -0x240(%rbp), %r12
movl $0x200, %esi # imm = 0x200
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x92a4c
jmp 0x65a65
movq %r14, %rdi
callq 0x36410
leal 0x200(%r13), %esi
subl %eax, %esi
leaq -0x240(%rbp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x614d0
testl %eax, %eax
jne 0x65a62
movq %r12, %rdi
callq 0x36410
leaq (%rax,%rbp), %rdi
addq $-0x240, %rdi # imm = 0xFDC0
addq %r13, %r14
movl $0x200, %edx # imm = 0x200
subq %rax, %rdx
movq %r14, %rsi
callq 0x9292c
jmp 0x65a65
callq 0x362b0
nopl (%rax)
|
my_load_path:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp byte ptr [rsi], 7Eh ; '~'
jnz short loc_65A56
cmp byte ptr [r14+1], 2Fh ; '/'
jz short loc_65A62
loc_65A56:
mov rdi, r14
call test_if_hard_path
test eax, eax
jz short loc_65A9D
loc_65A62:
mov r12, r14
loc_65A65:
mov edx, 1FFh
mov rdi, rbx
mov rsi, r12
call strmake
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_65B44
mov rax, rbx
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_65A9D:
cmp byte ptr [r14], 2Eh ; '.'
jnz short loc_65AB0
mov r13d, 2
cmp byte ptr [r14+1], 2Fh ; '/'
jz short loc_65AEF
loc_65AB0:
lea rsi, asc_994C1; ".."
mov rdi, r14
call is_prefix
xor r13d, r13d
test r15, r15
jz short loc_65AEF
test eax, eax
jnz short loc_65AEF
lea r12, [rbp+var_240]
mov esi, 200h
mov rdi, r12
mov rdx, r15
mov rcx, r14
xor r8d, r8d
xor eax, eax
call strxnmov
jmp loc_65A65
loc_65AEF:
mov rdi, r14
call _strlen
lea esi, [r13+200h]
sub esi, eax
lea r12, [rbp+var_240]
mov rdi, r12
xor edx, edx
call my_getwd
test eax, eax
jnz loc_65A62
mov rdi, r12
call _strlen
lea rdi, [rax+rbp]
add rdi, 0FFFFFFFFFFFFFDC0h
add r14, r13
mov edx, 200h
sub rdx, rax
mov rsi, r14
call strmake
jmp loc_65A65
loc_65B44:
call ___stack_chk_fail
|
long long my_load_path(long long a1, char *a2, long long a3)
{
char *v4; // r12
long long v6; // r13
int v7; // eax
int v8; // r9d
int v9; // eax
long long v10; // rax
char v11[528]; // [rsp+0h] [rbp-240h] BYREF
unsigned long long v12; // [rsp+210h] [rbp-30h]
v12 = __readfsqword(0x28u);
if ( (*a2 != 126 || a2[1] != 47) && !test_if_hard_path(a2) )
{
if ( *a2 != 46 || (v6 = 2LL, a2[1] != 47) )
{
v7 = is_prefix(a2, "..");
v6 = 0LL;
if ( a3 )
{
if ( !v7 )
{
v4 = v11;
strxnmov((unsigned int)v11, 512, a3, (_DWORD)a2, 0, v8, v11[0]);
goto LABEL_5;
}
}
}
v9 = strlen(a2);
v4 = v11;
if ( !(unsigned int)my_getwd(v11, (unsigned int)(v6 + 512 - v9), 0) )
{
v10 = strlen(v11);
strmake(&v11[v10], &a2[v6], 512 - v10);
goto LABEL_5;
}
}
v4 = a2;
LABEL_5:
strmake(a1, v4, 511LL);
return a1;
}
|
my_load_path:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP byte ptr [RSI],0x7e
JNZ 0x00165a56
CMP byte ptr [R14 + 0x1],0x2f
JZ 0x00165a62
LAB_00165a56:
MOV RDI,R14
CALL 0x00161666
TEST EAX,EAX
JZ 0x00165a9d
LAB_00165a62:
MOV R12,R14
LAB_00165a65:
MOV EDX,0x1ff
MOV RDI,RBX
MOV RSI,R12
CALL 0x0019292c
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00165b44
MOV RAX,RBX
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00165a9d:
CMP byte ptr [R14],0x2e
JNZ 0x00165ab0
MOV R13D,0x2
CMP byte ptr [R14 + 0x1],0x2f
JZ 0x00165aef
LAB_00165ab0:
LEA RSI,[0x1994c1]
MOV RDI,R14
CALL 0x00190ff0
XOR R13D,R13D
TEST R15,R15
JZ 0x00165aef
TEST EAX,EAX
JNZ 0x00165aef
LEA R12,[RBP + -0x240]
MOV ESI,0x200
MOV RDI,R12
MOV RDX,R15
MOV RCX,R14
XOR R8D,R8D
XOR EAX,EAX
CALL 0x00192a4c
JMP 0x00165a65
LAB_00165aef:
MOV RDI,R14
CALL 0x00136410
LEA ESI,[R13 + 0x200]
SUB ESI,EAX
LEA R12,[RBP + -0x240]
MOV RDI,R12
XOR EDX,EDX
CALL 0x001614d0
TEST EAX,EAX
JNZ 0x00165a62
MOV RDI,R12
CALL 0x00136410
LEA RDI,[RAX + RBP*0x1]
ADD RDI,-0x240
ADD R14,R13
MOV EDX,0x200
SUB RDX,RAX
MOV RSI,R14
CALL 0x0019292c
JMP 0x00165a65
LAB_00165b44:
CALL 0x001362b0
|
int8 my_load_path(int8 param_1,char *param_2,long param_3)
{
int iVar1;
size_t sVar2;
long lVar3;
long in_FS_OFFSET;
char local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (((*param_2 != '~') || (param_2[1] != '/')) && (iVar1 = test_if_hard_path(param_2), iVar1 == 0)
) {
if ((*param_2 != '.') || (lVar3 = 2, param_2[1] != '/')) {
iVar1 = is_prefix(param_2,&DAT_001994c1);
lVar3 = 0;
if ((param_3 != 0) && (iVar1 == 0)) {
strxnmov(local_248,0x200,param_3,param_2,0);
param_2 = local_248;
goto LAB_00165a65;
}
}
sVar2 = strlen(param_2);
iVar1 = my_getwd(local_248,((int)lVar3 + 0x200) - (int)sVar2,0);
if (iVar1 == 0) {
sVar2 = strlen(local_248);
strmake(local_248 + sVar2,param_2 + lVar3,0x200 - sVar2);
param_2 = local_248;
}
}
LAB_00165a65:
strmake(param_1,param_2,0x1ff);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
}
|
|
65,135 |
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 0x7c5d1
movq (%rsi), %rbx
movq 0x8(%rsi), %r14
cmpq %r14, 0x8(%r15)
jne 0x7c5c8
movb $0x1, %bpl
testq %r14, %r14
je 0x7c5d3
movq (%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1a790
testl %eax, %eax
je 0x7c5d3
addq $0x70, %r15
cmpq %r12, %r15
jne 0x7c5a8
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_7C5D1
mov rbx, [rsi]
mov r14, [rsi+8]
loc_7C5A8:
cmp [r15+8], r14
jnz short loc_7C5C8
mov bpl, 1
test r14, r14
jz short loc_7C5D3
mov rdi, [r15]
mov rsi, rbx
mov rdx, r14
call _bcmp
test eax, eax
jz short loc_7C5D3
loc_7C5C8:
add r15, 70h ; 'p'
cmp r15, r12
jnz short loc_7C5A8
loc_7C5D1:
xor ebp, ebp
loc_7C5D3:
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 0x0017c5d1
MOV RBX,qword ptr [RSI]
MOV R14,qword ptr [RSI + 0x8]
LAB_0017c5a8:
CMP qword ptr [R15 + 0x8],R14
JNZ 0x0017c5c8
MOV BPL,0x1
TEST R14,R14
JZ 0x0017c5d3
MOV RDI,qword ptr [R15]
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011a790
TEST EAX,EAX
JZ 0x0017c5d3
LAB_0017c5c8:
ADD R15,0x70
CMP R15,R12
JNZ 0x0017c5a8
LAB_0017c5d1:
XOR EBP,EBP
LAB_0017c5d3:
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_0017c5d3;
iVar2 = bcmp((void *)*puVar3,__s2,__n);
if (iVar2 == 0) goto LAB_0017c5d3;
}
puVar3 = puVar3 + 0xe;
} while (puVar3 != puVar1);
}
unaff_RBP = 0;
LAB_0017c5d3:
return unaff_RBP & 0xffffffff;
}
|
|
65,136 |
open_cached_file
|
eloqsql/mysys/mf_cache.c
|
my_bool open_cached_file(IO_CACHE *cache, const char* dir, const char *prefix,
size_t cache_size, myf cache_myflags)
{
DBUG_ENTER("open_cached_file");
cache->dir= dir;
if (prefix)
{
DBUG_ASSERT(strlen(prefix) == 2);
memcpy(cache->prefix, prefix, 3);
}
else
cache->prefix[0]= 0;
cache->file_name=0;
cache->buffer=0; /* Mark that not open */
if (!init_io_cache(cache, -1, cache_size, WRITE_CACHE, 0L, 0,
MYF(cache_myflags | MY_NABP)))
{
DBUG_RETURN(0);
}
DBUG_RETURN(1);
}
|
O3
|
c
|
open_cached_file:
movq %rsi, 0xc8(%rdi)
leaq 0xd0(%rdi), %rax
testq %rdx, %rdx
je 0xa836f
movb 0x2(%rdx), %sil
movb %sil, 0x2(%rax)
movzwl (%rdx), %edx
movw %dx, (%rax)
jmp 0xa8372
movb $0x0, (%rax)
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
movq %rax, 0xc0(%rdi)
movq %rax, 0x20(%rdi)
orq $0x4, %r8
movq %r8, (%rsp)
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
movq %rcx, %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x94b0a
testl %eax, %eax
setne %al
addq $0x10, %rsp
popq %rbp
retq
|
open_cached_file:
mov [rdi+0C8h], rsi
lea rax, [rdi+0D0h]
test rdx, rdx
jz short loc_A836F
mov sil, [rdx+2]
mov [rax+2], sil
movzx edx, word ptr [rdx]
mov [rax], dx
jmp short loc_A8372
loc_A836F:
mov byte ptr [rax], 0
loc_A8372:
push rbp
mov rbp, rsp
sub rsp, 10h
xor eax, eax
mov [rdi+0C0h], rax
mov [rdi+20h], rax
or r8, 4
mov [rsp+18h+var_18], r8
mov esi, 0FFFFFFFFh
mov rdx, rcx
mov ecx, 2
xor r8d, r8d
xor r9d, r9d
call init_io_cache
test eax, eax
setnz al
add rsp, 10h
pop rbp
retn
|
bool open_cached_file(long long a1, long long a2, long long a3, unsigned long long a4, long long a5)
{
_WORD *v5; // rax
*(_QWORD *)(a1 + 200) = a2;
v5 = (_WORD *)(a1 + 208);
if ( a3 )
{
*(_BYTE *)(a1 + 210) = *(_BYTE *)(a3 + 2);
*v5 = *(_WORD *)a3;
}
else
{
*(_BYTE *)v5 = 0;
}
*(_QWORD *)(a1 + 192) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
return (unsigned int)init_io_cache(a1, 0xFFFFFFFF, a4, 2, 0LL, 0, a5 | 4) != 0;
}
|
open_cached_file:
MOV qword ptr [RDI + 0xc8],RSI
LEA RAX,[RDI + 0xd0]
TEST RDX,RDX
JZ 0x001a836f
MOV SIL,byte ptr [RDX + 0x2]
MOV byte ptr [RAX + 0x2],SIL
MOVZX EDX,word ptr [RDX]
MOV word ptr [RAX],DX
JMP 0x001a8372
LAB_001a836f:
MOV byte ptr [RAX],0x0
LAB_001a8372:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
XOR EAX,EAX
MOV qword ptr [RDI + 0xc0],RAX
MOV qword ptr [RDI + 0x20],RAX
OR R8,0x4
MOV qword ptr [RSP],R8
MOV ESI,0xffffffff
MOV RDX,RCX
MOV ECX,0x2
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00194b0a
TEST EAX,EAX
SETNZ AL
ADD RSP,0x10
POP RBP
RET
|
bool open_cached_file(long param_1,int8 param_2,int2 *param_3,int8 param_4,
ulong param_5)
{
int iVar1;
*(int8 *)(param_1 + 200) = param_2;
if (param_3 == (int2 *)0x0) {
*(int1 *)(param_1 + 0xd0) = 0;
}
else {
*(int1 *)(param_1 + 0xd2) = *(int1 *)(param_3 + 1);
*(int2 *)(param_1 + 0xd0) = *param_3;
}
*(int8 *)(param_1 + 0xc0) = 0;
*(int8 *)(param_1 + 0x20) = 0;
iVar1 = init_io_cache(param_1,0xffffffff,param_4,2,0,0,param_5 | 4);
return iVar1 != 0;
}
|
|
65,137 |
minja::ExpressionTemplateToken::~ExpressionTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
ExpressionTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && e) : TemplateToken(Type::Expression, location, pre, post), expr(std::move(e)) {}
|
O1
|
cpp
|
minja::ExpressionTemplateToken::~ExpressionTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x94d47(%rip), %rax # 0x12faf8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x9adc6
callq 0x6fa60
leaq 0x9451b(%rip), %rax # 0x12f2e8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9ade2
callq 0x6fa60
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1b8e0
|
_ZN5minja23ExpressionTemplateTokenD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja23ExpressionTemplateTokenE; `vtable for'minja::ExpressionTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_9ADC6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9ADC6:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_9ADE2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9ADE2:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void minja::ExpressionTemplateToken::~ExpressionTemplateToken(minja::ExpressionTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::ExpressionTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
|
~ExpressionTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22faf8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0019adc6
CALL 0x0016fa60
LAB_0019adc6:
LEA RAX,[0x22f2e8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0019ade2
CALL 0x0016fa60
LAB_0019ade2:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x0011b8e0
|
/* minja::ExpressionTemplateToken::~ExpressionTemplateToken() */
void __thiscall
minja::ExpressionTemplateToken::~ExpressionTemplateToken(ExpressionTemplateToken *this)
{
*(int ***)this = &PTR__ExpressionTemplateToken_0022fb08;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_0022f2f8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
}
operator_delete(this,0x40);
return;
}
|
|
65,138 |
minja::ExpressionTemplateToken::~ExpressionTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
ExpressionTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && e) : TemplateToken(Type::Expression, location, pre, post), expr(std::move(e)) {}
|
O2
|
cpp
|
minja::ExpressionTemplateToken::~ExpressionTemplateToken():
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %r14
pushq $0x1
popq %rsi
callq 0x62fe4
leaq 0x8af49(%rip), %rax # 0xfdaf8
addq $0x10, %rax
movq %rax, (%r14)
andq $0x0, 0x38(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN5minja23ExpressionTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, r8
mov r8d, ecx
mov ecx, edx
mov rdx, rsi
mov r14, rdi
push 1
pop rsi
call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling)
lea rax, _ZTVN5minja23ExpressionTemplateTokenE; `vtable for'minja::ExpressionTemplateToken
add rax, 10h
mov [r14], rax
and qword ptr [r14+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+30h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
|
long long * minja::ExpressionTemplateToken::ExpressionTemplateToken(
long long a1,
long long a2,
int a3,
int a4,
__int128 *a5)
{
long long *result; // rax
__int128 v7; // xmm0
minja::TemplateToken::TemplateToken(a1, 1, a2, a3, a4);
result = &`vtable for'minja::ExpressionTemplateToken + 2;
*(_QWORD *)a1 = &`vtable for'minja::ExpressionTemplateToken + 2;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a5 = 0LL;
return result;
}
|
ExpressionTemplateToken:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R8D,ECX
MOV ECX,EDX
MOV RDX,RSI
MOV R14,RDI
PUSH 0x1
POP RSI
CALL 0x00162fe4
LEA RAX,[0x1fdaf8]
ADD RAX,0x10
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x30],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&,
minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::ExpressionTemplateToken::ExpressionTemplateToken
(ExpressionTemplateToken *this,int8 param_1,int4 param_3,int4 param_4,
int8 *param_5)
{
int8 uVar1;
TemplateToken::TemplateToken((TemplateToken *)this,1,param_1,param_3,param_4);
*(int ***)this = &PTR__ExpressionTemplateToken_001fdb08;
*(int8 *)(this + 0x38) = 0;
uVar1 = param_5[1];
param_5[1] = 0;
*(int8 *)(this + 0x30) = *param_5;
*(int8 *)(this + 0x38) = uVar1;
*param_5 = 0;
return;
}
|
|
65,139 |
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<unsigned char, 0>(unsigned char)
|
llama.cpp/common/json.hpp
|
void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},
{{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},
{{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},
{{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},
{{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},
{{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},
{{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},
{{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},
{{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},
{{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},
}
};
// special case for "0"
if (x == 0)
{
o->write_character('0');
return;
}
// use a pointer to fill the buffer
auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
number_unsigned_t abs_value;
unsigned int n_chars{};
if (is_negative_number(x))
{
*buffer_ptr = '-';
abs_value = remove_sign(static_cast<number_integer_t>(x));
// account one more byte for the minus sign
n_chars = 1 + count_digits(abs_value);
}
else
{
abs_value = static_cast<number_unsigned_t>(x);
n_chars = count_digits(abs_value);
}
// spare 1 byte for '\0'
JSON_ASSERT(n_chars < number_buffer.size() - 1);
// jump to the end to generate the string from backward,
// so we later avoid reversing the result
buffer_ptr += n_chars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu
// See: https://www.youtube.com/watch?v=o4-CwDo2zpg
while (abs_value >= 100)
{
const auto digits_index = static_cast<unsigned>((abs_value % 100));
abs_value /= 100;
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
if (abs_value >= 10)
{
const auto digits_index = static_cast<unsigned>(abs_value);
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
else
{
*(--buffer_ptr) = static_cast<char>('0' + abs_value);
}
o->write_characters(number_buffer.data(), n_chars);
}
|
O3
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_integer<unsigned char, 0>(unsigned char):
testl %esi, %esi
je 0x80c30
movl %esi, %eax
leaq 0x10(%rdi), %rsi
movzbl %al, %ecx
movl $0x1, %edx
cmpb $0xa, %cl
jb 0x80c16
movl $0x2, %edx
cmpb $0x64, %al
jae 0x80c40
leaq (%rsi,%rdx), %r8
cmpb $0xa, %al
jb 0x80c6b
leaq 0x9e4f7(%rip), %rax # 0x11f11c
movzwl (%rax,%rcx,2), %eax
movw %ax, -0x2(%r8)
jmp 0x80c71
movq (%rdi), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0x30, %esi
jmpq *%rax
leal (%rcx,%rcx,4), %edx
leal (%rcx,%rdx,8), %ecx
shrl $0xc, %ecx
imull $0x64, %ecx, %edx
subb %dl, %al
movzbl %al, %eax
leaq 0x9e4c4(%rip), %rdx # 0x11f11c
movzwl (%rdx,%rax,2), %eax
leaq 0x11(%rdi), %r8
movw %ax, 0x11(%rdi)
movl $0x3, %edx
movl %ecx, %eax
orb $0x30, %al
movb %al, -0x1(%r8)
movq (%rdi), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
jmpq *%rax
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
test esi, esi
jz short loc_80C30
mov eax, esi
lea rsi, [rdi+10h]
movzx ecx, al
mov edx, 1
cmp cl, 0Ah
jb short loc_80C16
mov edx, 2
cmp al, 64h ; 'd'
jnb short loc_80C40
loc_80C16:
lea r8, [rsi+rdx]
cmp al, 0Ah
jb short loc_80C6B
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
movzx eax, word ptr [rax+rcx*2]
mov [r8-2], ax
jmp short loc_80C71
loc_80C30:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax]
mov esi, 30h ; '0'
jmp rax
loc_80C40:
lea edx, [rcx+rcx*4]
lea ecx, [rcx+rdx*8]
shr ecx, 0Ch
imul edx, ecx, 64h ; 'd'
sub al, dl
movzx eax, al
lea rdx, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
movzx eax, word ptr [rdx+rax*2]
lea r8, [rdi+11h]
mov [rdi+11h], ax
mov edx, 3
mov eax, ecx
loc_80C6B:
or al, 30h
mov [r8-1], al
loc_80C71:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax+8]
jmp rax
|
long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
_QWORD *a1,
int a2)
{
char v2; // al
long long v3; // rdx
char *v4; // r8
if ( !a2 )
return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL);
v2 = a2;
v3 = 1LL;
if ( (unsigned __int8)a2 >= 0xAu )
{
v3 = 2LL;
if ( (unsigned __int8)a2 >= 0x64u )
{
v4 = (char *)a1 + 17;
*(_WORD *)((char *)a1 + 17) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2 % 0x64u];
v2 = (unsigned __int8)a2 / 0x64u;
goto LABEL_8;
}
}
v4 = (char *)a1 + v3 + 16;
if ( (unsigned __int8)a2 < 0xAu )
{
LABEL_8:
*(v4 - 1) = v2 | 0x30;
return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1);
}
*((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2];
return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1);
}
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
TEST ESI,ESI
JZ 0x00180c30
MOV EAX,ESI
LEA RSI,[RDI + 0x10]
MOVZX ECX,AL
MOV EDX,0x1
CMP CL,0xa
JC 0x00180c16
MOV EDX,0x2
CMP AL,0x64
JNC 0x00180c40
LAB_00180c16:
LEA R8,[RSI + RDX*0x1]
CMP AL,0xa
JC 0x00180c6b
LEA RAX,[0x21f11c]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV word ptr [R8 + -0x2],AX
JMP 0x00180c71
LAB_00180c30:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX]
MOV ESI,0x30
JMP RAX
LAB_00180c40:
LEA EDX,[RCX + RCX*0x4]
LEA ECX,[RCX + RDX*0x8]
SHR ECX,0xc
IMUL EDX,ECX,0x64
SUB AL,DL
MOVZX EAX,AL
LEA RDX,[0x21f11c]
MOVZX EAX,word ptr [RDX + RAX*0x2]
LEA R8,[RDI + 0x11]
MOV word ptr [RDI + 0x11],AX
MOV EDX,0x3
MOV EAX,ECX
LAB_00180c6b:
OR AL,0x30
MOV byte ptr [R8 + -0x1],AL
LAB_00180c71:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
JMP RAX
|
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_
(int8 *param_1,uint param_2)
{
byte bVar1;
byte bVar2;
long lVar3;
long lVar4;
if (param_2 == 0) {
/* WARNING: Could not recover jumptable at 0x00180c3e. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)**(int8 **)*param_1)((int8 *)*param_1,0x30);
return;
}
bVar1 = (byte)param_2;
lVar3 = 1;
if ((bVar1 < 10) || (lVar3 = 2, bVar1 < 100)) {
lVar4 = (long)(param_1 + 2) + lVar3;
bVar2 = bVar1;
if (9 < bVar1) {
*(int2 *)(lVar4 + -2) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ (ulong)bVar1 * 2);
goto LAB_00180c71;
}
}
else {
bVar2 = (byte)((param_2 & 0xff) + ((param_2 & 0xff) + (param_2 & 0xff) * 4) * 8 >> 0xc);
lVar4 = (long)param_1 + 0x11;
*(int2 *)((long)param_1 + 0x11) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ (ulong)(byte)(bVar1 + bVar2 * -100) * 2);
lVar3 = 3;
}
*(byte *)(lVar4 + -1) = bVar2 | 0x30;
LAB_00180c71:
/* WARNING: Could not recover jumptable at 0x00180c7b. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(long *)*param_1 + 8))((long *)*param_1,param_1 + 2,lVar3);
return;
}
|
|
65,140 |
LefDefParser::lefwLayerAntennaCumRoutingPlusCut()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwLayerAntennaCumRoutingPlusCut()
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING &&
lefwState != LEFW_LAYER_START && lefwState != LEFW_LAYER)
return LEFW_BAD_ORDER;
if (!lefwIsRouting && !lefwIsCut)
return LEFW_BAD_DATA;
/* WANDA
if ((versionNum < 5.4) &&
(diffUseOnly && strcmp(diffUseOnly, "DIFFUSEONLY") == 0))
return LEFW_WRONG_VERSION;
*/
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " ANTENNACUMROUTINGPLUSCUT ;\n");
else {
fprintf(lefwFile, " ANTENNACUMROUTINGPLUSCUT ;\n");
}
lefwLines++;
return LEFW_OK;
}
|
O3
|
cpp
|
LefDefParser::lefwLayerAntennaCumRoutingPlusCut():
leaq 0x17b51(%rip), %rax # 0x24e00
movq (%rax), %rcx
testq %rcx, %rcx
je 0xd30a
leaq 0x17d92(%rip), %rax # 0x25050
movl (%rax), %edx
movl $0x2, %eax
cmpl $0x1f, %edx
ja 0xd335
movl $0x900000c0, %esi # imm = 0x900000C0
btl %edx, %esi
jae 0xd335
leaq 0x17de9(%rip), %rdx # 0x250c4
leaq 0x17da2(%rip), %rax # 0x25084
movl (%rax), %esi
movl $0x3, %eax
orl (%rdx), %esi
je 0xd335
pushq %rax
cmpb $0x1, 0x17df7(%rip) # 0x250ec
jne 0xd310
leaq 0xdc39(%rip), %rsi # 0x1af37
movq %rcx, %rdi
xorl %eax, %eax
callq 0x18c35
jmp 0xd326
movl $0x1, %eax
retq
leaq 0xdc20(%rip), %rdi # 0x1af37
movl $0x1e, %esi
movl $0x1, %edx
callq 0x1110
leaq 0x17d1f(%rip), %rax # 0x2504c
incl (%rax)
xorl %eax, %eax
addq $0x8, %rsp
retq
|
_ZN12LefDefParser33lefwLayerAntennaCumRoutingPlusCutEv:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rcx, [rax]
test rcx, rcx
jz short loc_D30A
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov edx, [rax]
mov eax, 2
cmp edx, 1Fh
ja short locret_D335
mov esi, 900000C0h
bt esi, edx
jnb short locret_D335
lea rdx, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting
lea rax, _ZN12LefDefParser9lefwIsCutE; LefDefParser::lefwIsCut
mov esi, [rax]
mov eax, 3
or esi, [rdx]
jz short locret_D335
push rax
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_D310
lea rsi, aAntennacumrout; " ANTENNACUMROUTINGPLUSCUT ;\n"
mov rdi, rcx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_D326
loc_D30A:
mov eax, 1
retn
loc_D310:
lea rdi, aAntennacumrout; " ANTENNACUMROUTINGPLUSCUT ;\n"
mov esi, 1Eh
mov edx, 1
call _fwrite
loc_D326:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
xor eax, eax
add rsp, 8
locret_D335:
retn
|
long long LefDefParser::lefwLayerAntennaCumRoutingPlusCut(
LefDefParser *this,
long long a2,
long long a3,
long long a4,
int a5,
int a6)
{
long long result; // rax
int v7; // esi
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
result = 2LL;
if ( LefDefParser::lefwState <= 0x1F )
{
v7 = -1879048000;
if ( _bittest(&v7, LefDefParser::lefwState) )
{
result = 3LL;
if ( LefDefParser::lefwIsRouting | LefDefParser::lefwIsCut )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" ANTENNACUMROUTINGPLUSCUT ;\n",
(unsigned int)&LefDefParser::lefwIsRouting,
LefDefParser::lefwFile,
a5,
a6);
else
fwrite(" ANTENNACUMROUTINGPLUSCUT ;\n", 30LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
++LefDefParser::lefwLines;
return 0LL;
}
}
}
return result;
}
|
lefwLayerAntennaCumRoutingPlusCut:
LEA RAX,[0x124e00]
MOV RCX,qword ptr [RAX]
TEST RCX,RCX
JZ 0x0010d30a
LEA RAX,[0x125050]
MOV EDX,dword ptr [RAX]
MOV EAX,0x2
CMP EDX,0x1f
JA 0x0010d335
MOV ESI,0x900000c0
BT ESI,EDX
JNC 0x0010d335
LEA RDX,[0x1250c4]
LEA RAX,[0x125084]
MOV ESI,dword ptr [RAX]
MOV EAX,0x3
OR ESI,dword ptr [RDX]
JZ 0x0010d335
PUSH RAX
CMP byte ptr [0x001250ec],0x1
JNZ 0x0010d310
LEA RSI,[0x11af37]
MOV RDI,RCX
XOR EAX,EAX
CALL 0x00118c35
JMP 0x0010d326
LAB_0010d30a:
MOV EAX,0x1
RET
LAB_0010d310:
LEA RDI,[0x11af37]
MOV ESI,0x1e
MOV EDX,0x1
CALL 0x00101110
LAB_0010d326:
LEA RAX,[0x12504c]
INC dword ptr [RAX]
XOR EAX,EAX
ADD RSP,0x8
LAB_0010d335:
RET
|
/* LefDefParser::lefwLayerAntennaCumRoutingPlusCut() */
int8 LefDefParser::lefwLayerAntennaCumRoutingPlusCut(void)
{
int8 uVar1;
if (lefwFile != (_IO_FILE *)0x0) {
uVar1 = 2;
if (((lefwState < 0x20) && ((0x900000c0U >> (lefwState & 0x1f) & 1) != 0)) &&
(uVar1 = 3, lefwIsCut != 0 || lefwIsRouting != 0)) {
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile," ANTENNACUMROUTINGPLUSCUT ;\n");
}
else {
fwrite(" ANTENNACUMROUTINGPLUSCUT ;\n",0x1e,1,lefwFile);
}
lefwLines = lefwLines + 1;
uVar1 = 0;
}
return uVar1;
}
return 1;
}
|
|
65,141 |
params_parse(int, char**, train_params*)
|
monkey531[P]llama/examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp
|
static bool params_parse(int argc, char ** argv, struct train_params * params) {
bool invalid_param = false;
bool reqd_param_found = false;
std::string arg;
struct train_params default_params = get_default_train_params();
const std::string arg_prefix = "--";
for (int i = 1; i < argc; i++) {
arg = argv[i];
if (arg.compare(0, arg_prefix.size(), arg_prefix) == 0) {
std::replace(arg.begin(), arg.end(), '_', '-');
}
if (arg == "--copy-vocab-from-model") {
if (++i >= argc) {
invalid_param = true;
break;
}
params->fn_vocab_model = argv[i];
} else if (arg == "--llama2c-model") {
if (++i >= argc) {
invalid_param = true;
break;
}
reqd_param_found = true;
params->fn_llama2c_model = argv[i];
} else if (arg == "--llama2c-output-model") {
if (++i >= argc) {
invalid_param = true;
break;
}
params->fn_llama2c_output_model = argv[i];
} else if (arg == "-h" || arg == "--help") {
print_usage(argc, argv, &default_params);
exit(0);
} else {
fprintf(stderr, "error: unknown argument: %s\n", arg.c_str());
print_usage(argc, argv, &default_params);
exit(1);
}
}
if (invalid_param) {
fprintf(stderr, "error: invalid parameter for argument: %s\n", arg.c_str());
print_usage(argc, argv, &default_params);
exit(1);
}
if (!reqd_param_found){
fprintf(stderr, "error: please specify a llama2.c .bin file to be converted with argument --llama2c-model\n");
print_usage(argc, argv, &default_params);
exit(1);
}
return true;
}
|
O0
|
cpp
|
params_parse(int, char**, train_params*):
subq $0x168, %rsp # imm = 0x168
movl %edi, 0x164(%rsp)
movq %rsi, 0x158(%rsp)
movq %rdx, 0x150(%rsp)
movb $0x0, 0x14f(%rsp)
movb $0x0, 0x14e(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x55510
leaq 0x88(%rsp), %rdi
callq 0x5a160
leaq 0x67(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x55e80
movq 0x30(%rsp), %rdx
leaq 0x167e79(%rip), %rsi # 0x1c216c
leaq 0x68(%rsp), %rdi
callq 0x5def0
jmp 0x5a2ff
leaq 0x67(%rsp), %rdi
callq 0x56270
movl $0x1, 0x50(%rsp)
movl 0x50(%rsp), %eax
cmpl 0x164(%rsp), %eax
jge 0x5a61d
movq 0x158(%rsp), %rax
movslq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x128(%rsp), %rdi
callq 0x55610
jmp 0x5a342
leaq 0x68(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x55440
movq 0x20(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0x128(%rsp), %rdi
callq 0x56020
movl %eax, 0x2c(%rsp)
jmp 0x5a370
movl 0x2c(%rsp), %eax
cmpl $0x0, %eax
jne 0x5a404
leaq 0x128(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x55780
movq 0x18(%rsp), %rdi
movq %rax, 0x48(%rsp)
callq 0x55850
movq %rax, 0x40(%rsp)
movb $0x5f, 0x3f(%rsp)
movb $0x2d, 0x3e(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
leaq 0x3f(%rsp), %rdx
leaq 0x3e(%rsp), %rcx
callq 0x5dfb0
jmp 0x5a3c8
jmp 0x5a404
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x67(%rsp), %rdi
callq 0x56270
jmp 0x5a6ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x56290
jmp 0x5a6ec
leaq 0x167d64(%rip), %rsi # 0x1c216f
leaq 0x128(%rsp), %rdi
callq 0x5e030
movb %al, 0x17(%rsp)
jmp 0x5a41e
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x5a428
jmp 0x5a46a
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
cmpl 0x164(%rsp), %eax
jl 0x5a449
movb $0x1, 0x14f(%rsp)
jmp 0x5a61d
movq 0x158(%rsp), %rax
movslq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x150(%rsp), %rax
movq %rcx, (%rax)
jmp 0x5a60b
leaq 0x167d16(%rip), %rsi # 0x1c2187
leaq 0x128(%rsp), %rdi
callq 0x5e030
movb %al, 0x16(%rsp)
jmp 0x5a484
movb 0x16(%rsp), %al
testb $0x1, %al
jne 0x5a48e
jmp 0x5a4d9
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
cmpl 0x164(%rsp), %eax
jl 0x5a4af
movb $0x1, 0x14f(%rsp)
jmp 0x5a61d
movb $0x1, 0x14e(%rsp)
movq 0x158(%rsp), %rax
movslq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x150(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x5a609
leaq 0x167cb7(%rip), %rsi # 0x1c2197
leaq 0x128(%rsp), %rdi
callq 0x5e030
movb %al, 0x15(%rsp)
jmp 0x5a4f3
movb 0x15(%rsp), %al
testb $0x1, %al
jne 0x5a4fd
jmp 0x5a540
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
cmpl 0x164(%rsp), %eax
jl 0x5a51e
movb $0x1, 0x14f(%rsp)
jmp 0x5a61d
movq 0x158(%rsp), %rax
movslq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x150(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x5a607
leaq 0x167c67(%rip), %rsi # 0x1c21ae
leaq 0x128(%rsp), %rdi
callq 0x5e030
movb %al, 0x14(%rsp)
jmp 0x5a55a
movb 0x14(%rsp), %al
testb $0x1, %al
jne 0x5a588
jmp 0x5a564
leaq 0x167c46(%rip), %rsi # 0x1c21b1
leaq 0x128(%rsp), %rdi
callq 0x5e030
movb %al, 0x13(%rsp)
jmp 0x5a57e
movb 0x13(%rsp), %al
testb $0x1, %al
jne 0x5a588
jmp 0x5a5ad
movl 0x164(%rsp), %edi
movq 0x158(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x5d760
jmp 0x5a5a6
xorl %edi, %edi
callq 0x55a60
movq 0x1ec994(%rip), %rax # 0x246f48
movq (%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x55190
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x167be0(%rip), %rsi # 0x1c21b8
xorl %eax, %eax
callq 0x55290
movl 0x164(%rsp), %edi
movq 0x158(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x5d760
jmp 0x5a5fd
movl $0x1, %edi
callq 0x55a60
jmp 0x5a609
jmp 0x5a60b
jmp 0x5a60d
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x5a311
testb $0x1, 0x14f(%rsp)
je 0x5a67f
movq 0x1ec91a(%rip), %rax # 0x246f48
movq (%rax), %rax
movq %rax, (%rsp)
leaq 0x128(%rsp), %rdi
callq 0x55190
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x167b85(%rip), %rsi # 0x1c21d5
xorl %eax, %eax
callq 0x55290
movl 0x164(%rsp), %edi
movq 0x158(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x5d760
jmp 0x5a675
movl $0x1, %edi
callq 0x55a60
testb $0x1, 0x14e(%rsp)
jne 0x5a6c9
movq 0x1ec8b8(%rip), %rax # 0x246f48
movq (%rax), %rdi
leaq 0x167b66(%rip), %rsi # 0x1c2200
xorl %eax, %eax
callq 0x55290
movl 0x164(%rsp), %edi
movq 0x158(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x5d760
jmp 0x5a6bf
movl $0x1, %edi
callq 0x55a60
leaq 0x68(%rsp), %rdi
callq 0x56290
leaq 0x128(%rsp), %rdi
callq 0x56290
movb $0x1, %al
andb $0x1, %al
addq $0x168, %rsp # imm = 0x168
retq
leaq 0x128(%rsp), %rdi
callq 0x56290
movq 0x58(%rsp), %rdi
callq 0x55a10
nopw %cs:(%rax,%rax)
|
_ZL12params_parseiPPcP12train_params:
sub rsp, 168h
mov [rsp+168h+var_4], edi
mov [rsp+168h+var_10], rsi
mov [rsp+168h+var_18], rdx
mov [rsp+168h+var_19], 0
mov [rsp+168h+var_1A], 0
lea rdi, [rsp+168h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
lea rdi, [rsp+168h+var_E0]
call _ZL24get_default_train_paramsv; get_default_train_params(void)
lea rdi, [rsp+168h+var_101]
mov [rsp+168h+var_138], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+168h+var_138]
lea rsi, asc_1C216C; "--"
lea rdi, [rsp+168h+var_100]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_5A2FF:
lea rdi, [rsp+168h+var_101]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov [rsp+168h+var_118], 1
loc_5A311:
mov eax, [rsp+168h+var_118]
cmp eax, [rsp+168h+var_4]
jge loc_5A61D
mov rax, [rsp+168h+var_10]
movsxd rcx, [rsp+168h+var_118]
mov rsi, [rax+rcx*8]
lea rdi, [rsp+168h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_5A342:
lea rdi, [rsp+168h+var_100]
mov [rsp+168h+var_148], rdi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, [rsp+168h+var_148]
mov rdx, rax
xor eax, eax
mov esi, eax
lea rdi, [rsp+168h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmRKS4_; std::string::compare(ulong,ulong,std::string const&)
mov [rsp+168h+var_13C], eax
jmp short $+2
loc_5A370:
mov eax, [rsp+168h+var_13C]
cmp eax, 0
jnz loc_5A404
lea rdi, [rsp+168h+var_40]
mov [rsp+168h+var_150], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov rdi, [rsp+168h+var_150]
mov [rsp+168h+var_120], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rsp+168h+var_128], rax
mov [rsp+168h+var_129], 5Fh ; '_'
mov [rsp+168h+var_12A], 2Dh ; '-'
mov rdi, [rsp+168h+var_120]
mov rsi, [rsp+168h+var_128]
lea rdx, [rsp+168h+var_129]
lea rcx, [rsp+168h+var_12A]
call _ZSt7replaceIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcEvT_SA_RKT0_SD_; std::replace<__gnu_cxx::__normal_iterator<char *,std::string>,char>(__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__normal_iterator<char *,std::string>,char const&,char const&)
jmp short $+2
loc_5A3C8:
jmp short loc_5A404
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_5F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_5A6EC
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_5A6EC
loc_5A404:
lea rsi, aCopyVocabFromM; "--copy-vocab-from-model"
lea rdi, [rsp+168h+var_40]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+168h+var_151], al
jmp short $+2
loc_5A41E:
mov al, [rsp+168h+var_151]
test al, 1
jnz short loc_5A428
jmp short loc_5A46A
loc_5A428:
mov eax, [rsp+168h+var_118]
add eax, 1
mov [rsp+168h+var_118], eax
cmp eax, [rsp+168h+var_4]
jl short loc_5A449
mov [rsp+168h+var_19], 1
jmp loc_5A61D
loc_5A449:
mov rax, [rsp+168h+var_10]
movsxd rcx, [rsp+168h+var_118]
mov rcx, [rax+rcx*8]
mov rax, [rsp+168h+var_18]
mov [rax], rcx
jmp loc_5A60B
loc_5A46A:
lea rsi, aLlama2cModel; "--llama2c-model"
lea rdi, [rsp+168h+var_40]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+168h+var_152], al
jmp short $+2
loc_5A484:
mov al, [rsp+168h+var_152]
test al, 1
jnz short loc_5A48E
jmp short loc_5A4D9
loc_5A48E:
mov eax, [rsp+168h+var_118]
add eax, 1
mov [rsp+168h+var_118], eax
cmp eax, [rsp+168h+var_4]
jl short loc_5A4AF
mov [rsp+168h+var_19], 1
jmp loc_5A61D
loc_5A4AF:
mov [rsp+168h+var_1A], 1
mov rax, [rsp+168h+var_10]
movsxd rcx, [rsp+168h+var_118]
mov rcx, [rax+rcx*8]
mov rax, [rsp+168h+var_18]
mov [rax+8], rcx
jmp loc_5A609
loc_5A4D9:
lea rsi, aLlama2cOutputM; "--llama2c-output-model"
lea rdi, [rsp+168h+var_40]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+168h+var_153], al
jmp short $+2
loc_5A4F3:
mov al, [rsp+168h+var_153]
test al, 1
jnz short loc_5A4FD
jmp short loc_5A540
loc_5A4FD:
mov eax, [rsp+168h+var_118]
add eax, 1
mov [rsp+168h+var_118], eax
cmp eax, [rsp+168h+var_4]
jl short loc_5A51E
mov [rsp+168h+var_19], 1
jmp loc_5A61D
loc_5A51E:
mov rax, [rsp+168h+var_10]
movsxd rcx, [rsp+168h+var_118]
mov rcx, [rax+rcx*8]
mov rax, [rsp+168h+var_18]
mov [rax+10h], rcx
jmp loc_5A607
loc_5A540:
lea rsi, asc_1C21AE; "-h"
lea rdi, [rsp+168h+var_40]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+168h+var_154], al
jmp short $+2
loc_5A55A:
mov al, [rsp+168h+var_154]
test al, 1
jnz short loc_5A588
jmp short $+2
loc_5A564:
lea rsi, aHelp; "--help"
lea rdi, [rsp+168h+var_40]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+168h+var_155], al
jmp short $+2
loc_5A57E:
mov al, [rsp+168h+var_155]
test al, 1
jnz short loc_5A588
jmp short loc_5A5AD
loc_5A588:
mov edi, [rsp+168h+var_4]
mov rsi, [rsp+168h+var_10]
lea rdx, [rsp+168h+var_E0]
call _ZL11print_usageiPPcPK12train_params; print_usage(int,char **,train_params const*)
jmp short $+2
loc_5A5A6:
xor edi, edi
call _exit
loc_5A5AD:
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rsp+168h+var_160], rax
lea rdi, [rsp+168h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+168h+var_160]
mov rdx, rax
lea rsi, aErrorUnknownAr; "error: unknown argument: %s\n"
xor eax, eax
call _fprintf
mov edi, [rsp+168h+var_4]
mov rsi, [rsp+168h+var_10]
lea rdx, [rsp+168h+var_E0]
call _ZL11print_usageiPPcPK12train_params; print_usage(int,char **,train_params const*)
jmp short $+2
loc_5A5FD:
mov edi, 1
call _exit
loc_5A607:
jmp short $+2
loc_5A609:
jmp short $+2
loc_5A60B:
jmp short $+2
loc_5A60D:
mov eax, [rsp+168h+var_118]
add eax, 1
mov [rsp+168h+var_118], eax
jmp loc_5A311
loc_5A61D:
test [rsp+168h+var_19], 1
jz short loc_5A67F
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rsp+168h+var_168], rax
lea rdi, [rsp+168h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+168h+var_168]
mov rdx, rax
lea rsi, aErrorInvalidPa; "error: invalid parameter for argument: "...
xor eax, eax
call _fprintf
mov edi, [rsp+168h+var_4]
mov rsi, [rsp+168h+var_10]
lea rdx, [rsp+168h+var_E0]
call _ZL11print_usageiPPcPK12train_params; print_usage(int,char **,train_params const*)
jmp short $+2
loc_5A675:
mov edi, 1
call _exit
loc_5A67F:
test [rsp+168h+var_1A], 1
jnz short loc_5A6C9
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aErrorPleaseSpe; "error: please specify a llama2.c .bin f"...
xor eax, eax
call _fprintf
mov edi, [rsp+168h+var_4]
mov rsi, [rsp+168h+var_10]
lea rdx, [rsp+168h+var_E0]
call _ZL11print_usageiPPcPK12train_params; print_usage(int,char **,train_params const*)
jmp short $+2
loc_5A6BF:
mov edi, 1
call _exit
loc_5A6C9:
lea rdi, [rsp+168h+var_100]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+168h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, 1
and al, 1
add rsp, 168h
retn
loc_5A6EC:
lea rdi, [rsp+arg_120]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_50]
call __Unwind_Resume
|
char params_parse(int a1, long long a2, _QWORD *a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long v6; // rax
const char *v7; // rax
const char *v8; // rax
long long v10; // [rsp+0h] [rbp-168h]
long long v11; // [rsp+8h] [rbp-160h]
char v12; // [rsp+3Eh] [rbp-12Ah] BYREF
char v13; // [rsp+3Fh] [rbp-129h] BYREF
long long v14; // [rsp+40h] [rbp-128h]
long long v15; // [rsp+48h] [rbp-120h]
int i; // [rsp+50h] [rbp-118h]
char v17; // [rsp+67h] [rbp-101h] BYREF
_BYTE v18[32]; // [rsp+68h] [rbp-100h] BYREF
_BYTE v19[160]; // [rsp+88h] [rbp-E0h] BYREF
_BYTE v20[38]; // [rsp+128h] [rbp-40h] BYREF
char v21; // [rsp+14Eh] [rbp-1Ah]
char v22; // [rsp+14Fh] [rbp-19h]
_QWORD *v23; // [rsp+150h] [rbp-18h]
long long v24; // [rsp+158h] [rbp-10h]
int v25; // [rsp+164h] [rbp-4h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = 0;
v21 = 0;
std::string::basic_string(v20);
get_default_train_params((long long)v19);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((unsigned int)v18, (unsigned int)"--", (unsigned int)&v17, v3, v4, v5);
std::allocator<char>::~allocator(&v17);
for ( i = 1; i < v25; ++i )
{
std::string::operator=(v20, *(_QWORD *)(v24 + 8LL * i));
v6 = std::string::size();
if ( !(unsigned int)std::string::compare(v20, 0LL, v6, v18) )
{
v15 = std::string::begin();
v14 = std::string::end(v20);
v13 = 95;
v12 = 45;
std::replace<__gnu_cxx::__normal_iterator<char *,std::string>,char>(v15, v14, &v13, &v12);
}
if ( (std::operator==<char>(v20, "--copy-vocab-from-model") & 1) != 0 )
{
if ( ++i >= v25 )
{
v22 = 1;
break;
}
*v23 = *(_QWORD *)(v24 + 8LL * i);
}
else if ( (std::operator==<char>(v20, "--llama2c-model") & 1) != 0 )
{
if ( ++i >= v25 )
{
v22 = 1;
break;
}
v21 = 1;
v23[1] = *(_QWORD *)(v24 + 8LL * i);
}
else
{
if ( (std::operator==<char>(v20, "--llama2c-output-model") & 1) == 0 )
{
if ( (std::operator==<char>(v20, "-h") & 1) != 0 || (std::operator==<char>(v20, "--help") & 1) != 0 )
{
print_usage((unsigned int)v25, v24, v19);
exit(0LL);
}
v11 = stderr;
v7 = (const char *)std::string::c_str(v20);
fprintf(v11, "error: unknown argument: %s\n", v7);
print_usage((unsigned int)v25, v24, v19);
exit(1LL);
}
if ( ++i >= v25 )
{
v22 = 1;
break;
}
v23[2] = *(_QWORD *)(v24 + 8LL * i);
}
}
if ( (v22 & 1) != 0 )
{
v10 = stderr;
v8 = (const char *)std::string::c_str(v20);
fprintf(v10, "error: invalid parameter for argument: %s\n", v8);
print_usage((unsigned int)v25, v24, v19);
exit(1LL);
}
if ( (v21 & 1) == 0 )
{
fprintf(stderr, "error: please specify a llama2.c .bin file to be converted with argument --llama2c-model\n");
print_usage((unsigned int)v25, v24, v19);
exit(1LL);
}
std::string::~string(v18);
std::string::~string(v20);
return 1;
}
|
params_parse:
SUB RSP,0x168
MOV dword ptr [RSP + 0x164],EDI
MOV qword ptr [RSP + 0x158],RSI
MOV qword ptr [RSP + 0x150],RDX
MOV byte ptr [RSP + 0x14f],0x0
MOV byte ptr [RSP + 0x14e],0x0
LEA RDI,[RSP + 0x128]
CALL 0x00155510
LEA RDI,[RSP + 0x88]
CALL 0x0015a160
LEA RDI,[RSP + 0x67]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x00155e80
MOV RDX,qword ptr [RSP + 0x30]
LAB_0015a2ec:
LEA RSI,[0x2c216c]
LEA RDI,[RSP + 0x68]
CALL 0x0015def0
JMP 0x0015a2ff
LAB_0015a2ff:
LEA RDI,[RSP + 0x67]
CALL 0x00156270
MOV dword ptr [RSP + 0x50],0x1
LAB_0015a311:
MOV EAX,dword ptr [RSP + 0x50]
CMP EAX,dword ptr [RSP + 0x164]
JGE 0x0015a61d
MOV RAX,qword ptr [RSP + 0x158]
MOVSXD RCX,dword ptr [RSP + 0x50]
MOV RSI,qword ptr [RAX + RCX*0x8]
LAB_0015a333:
LEA RDI,[RSP + 0x128]
CALL 0x00155610
JMP 0x0015a342
LAB_0015a342:
LEA RDI,[RSP + 0x68]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00155440
MOV RCX,qword ptr [RSP + 0x20]
MOV RDX,RAX
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0x128]
CALL 0x00156020
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x0015a370
LAB_0015a370:
MOV EAX,dword ptr [RSP + 0x2c]
CMP EAX,0x0
JNZ 0x0015a404
LEA RDI,[RSP + 0x128]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00155780
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x48],RAX
CALL 0x00155850
MOV qword ptr [RSP + 0x40],RAX
MOV byte ptr [RSP + 0x3f],0x5f
MOV byte ptr [RSP + 0x3e],0x2d
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
LEA RDX,[RSP + 0x3f]
LEA RCX,[RSP + 0x3e]
CALL 0x0015dfb0
JMP 0x0015a3c8
LAB_0015a3c8:
JMP 0x0015a404
LAB_0015a404:
LEA RSI,[0x2c216f]
LEA RDI,[RSP + 0x128]
CALL 0x0015e030
MOV byte ptr [RSP + 0x17],AL
JMP 0x0015a41e
LAB_0015a41e:
MOV AL,byte ptr [RSP + 0x17]
TEST AL,0x1
JNZ 0x0015a428
JMP 0x0015a46a
LAB_0015a428:
MOV EAX,dword ptr [RSP + 0x50]
ADD EAX,0x1
MOV dword ptr [RSP + 0x50],EAX
CMP EAX,dword ptr [RSP + 0x164]
JL 0x0015a449
MOV byte ptr [RSP + 0x14f],0x1
JMP 0x0015a61d
LAB_0015a449:
MOV RAX,qword ptr [RSP + 0x158]
MOVSXD RCX,dword ptr [RSP + 0x50]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x150]
MOV qword ptr [RAX],RCX
JMP 0x0015a60b
LAB_0015a46a:
LEA RSI,[0x2c2187]
LEA RDI,[RSP + 0x128]
CALL 0x0015e030
MOV byte ptr [RSP + 0x16],AL
JMP 0x0015a484
LAB_0015a484:
MOV AL,byte ptr [RSP + 0x16]
TEST AL,0x1
JNZ 0x0015a48e
JMP 0x0015a4d9
LAB_0015a48e:
MOV EAX,dword ptr [RSP + 0x50]
ADD EAX,0x1
MOV dword ptr [RSP + 0x50],EAX
CMP EAX,dword ptr [RSP + 0x164]
JL 0x0015a4af
MOV byte ptr [RSP + 0x14f],0x1
JMP 0x0015a61d
LAB_0015a4af:
MOV byte ptr [RSP + 0x14e],0x1
MOV RAX,qword ptr [RSP + 0x158]
MOVSXD RCX,dword ptr [RSP + 0x50]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x150]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0015a609
LAB_0015a4d9:
LEA RSI,[0x2c2197]
LEA RDI,[RSP + 0x128]
CALL 0x0015e030
MOV byte ptr [RSP + 0x15],AL
JMP 0x0015a4f3
LAB_0015a4f3:
MOV AL,byte ptr [RSP + 0x15]
TEST AL,0x1
JNZ 0x0015a4fd
JMP 0x0015a540
LAB_0015a4fd:
MOV EAX,dword ptr [RSP + 0x50]
ADD EAX,0x1
MOV dword ptr [RSP + 0x50],EAX
CMP EAX,dword ptr [RSP + 0x164]
JL 0x0015a51e
MOV byte ptr [RSP + 0x14f],0x1
JMP 0x0015a61d
LAB_0015a51e:
MOV RAX,qword ptr [RSP + 0x158]
MOVSXD RCX,dword ptr [RSP + 0x50]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x150]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x0015a607
LAB_0015a540:
LEA RSI,[0x2c21ae]
LEA RDI,[RSP + 0x128]
CALL 0x0015e030
MOV byte ptr [RSP + 0x14],AL
JMP 0x0015a55a
LAB_0015a55a:
MOV AL,byte ptr [RSP + 0x14]
TEST AL,0x1
JNZ 0x0015a588
JMP 0x0015a564
LAB_0015a564:
LEA RSI,[0x2c21b1]
LEA RDI,[RSP + 0x128]
CALL 0x0015e030
MOV byte ptr [RSP + 0x13],AL
JMP 0x0015a57e
LAB_0015a57e:
MOV AL,byte ptr [RSP + 0x13]
TEST AL,0x1
JNZ 0x0015a588
JMP 0x0015a5ad
LAB_0015a588:
MOV EDI,dword ptr [RSP + 0x164]
MOV RSI,qword ptr [RSP + 0x158]
LEA RDX,[RSP + 0x88]
CALL 0x0015d760
JMP 0x0015a5a6
LAB_0015a5a6:
XOR EDI,EDI
CALL 0x00155a60
LAB_0015a5ad:
MOV RAX,qword ptr [0x00346f48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x128]
CALL 0x00155190
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,RAX
LEA RSI,[0x2c21b8]
XOR EAX,EAX
CALL 0x00155290
MOV EDI,dword ptr [RSP + 0x164]
MOV RSI,qword ptr [RSP + 0x158]
LEA RDX,[RSP + 0x88]
CALL 0x0015d760
JMP 0x0015a5fd
LAB_0015a5fd:
MOV EDI,0x1
CALL 0x00155a60
LAB_0015a607:
JMP 0x0015a609
LAB_0015a609:
JMP 0x0015a60b
LAB_0015a60b:
JMP 0x0015a60d
LAB_0015a60d:
MOV EAX,dword ptr [RSP + 0x50]
ADD EAX,0x1
MOV dword ptr [RSP + 0x50],EAX
JMP 0x0015a311
LAB_0015a61d:
TEST byte ptr [RSP + 0x14f],0x1
JZ 0x0015a67f
MOV RAX,qword ptr [0x00346f48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x128]
CALL 0x00155190
MOV RDI,qword ptr [RSP]
MOV RDX,RAX
LEA RSI,[0x2c21d5]
XOR EAX,EAX
CALL 0x00155290
MOV EDI,dword ptr [RSP + 0x164]
MOV RSI,qword ptr [RSP + 0x158]
LEA RDX,[RSP + 0x88]
CALL 0x0015d760
JMP 0x0015a675
LAB_0015a675:
MOV EDI,0x1
CALL 0x00155a60
LAB_0015a67f:
TEST byte ptr [RSP + 0x14e],0x1
JNZ 0x0015a6c9
MOV RAX,qword ptr [0x00346f48]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x2c2200]
XOR EAX,EAX
CALL 0x00155290
MOV EDI,dword ptr [RSP + 0x164]
MOV RSI,qword ptr [RSP + 0x158]
LEA RDX,[RSP + 0x88]
CALL 0x0015d760
LAB_0015a6bd:
JMP 0x0015a6bf
LAB_0015a6bf:
MOV EDI,0x1
CALL 0x00155a60
LAB_0015a6c9:
LEA RDI,[RSP + 0x68]
CALL 0x00156290
LEA RDI,[RSP + 0x128]
CALL 0x00156290
MOV AL,0x1
AND AL,0x1
ADD RSP,0x168
RET
|
/* params_parse(int, char**, train_params*) */
int8 params_parse(int param_1,char **param_2,train_params *param_3)
{
FILE *pFVar1;
bool bVar2;
int iVar3;
string *psVar4;
int8 uVar5;
int1 local_12a;
int1 local_129;
int8 local_128;
int8 local_120;
int local_118;
allocator local_101;
string local_100 [32];
train_params local_e0 [160];
string local_40 [38];
byte local_1a;
byte local_19;
train_params *local_18;
char **local_10;
int local_4;
local_19 = 0;
local_1a = 0;
local_18 = param_3;
local_10 = param_2;
local_4 = param_1;
std::__cxx11::string::string(local_40);
get_default_train_params();
std::allocator<char>::allocator();
/* try { // try from 0015a2ec to 0015a2fc has its CatchHandler @ 0015a3ca */
std::__cxx11::string::string<std::allocator<char>>(local_100,"--",&local_101);
std::allocator<char>::~allocator((allocator<char> *)&local_101);
local_118 = 1;
do {
if (local_4 <= local_118) {
LAB_0015a61d:
if ((local_19 & 1) != 0) {
pFVar1 = *(FILE **)PTR_stderr_00346f48;
uVar5 = std::__cxx11::string::c_str();
fprintf(pFVar1,"error: invalid parameter for argument: %s\n",uVar5);
print_usage(local_4,local_10,local_e0);
/* WARNING: Subroutine does not return */
exit(1);
}
if ((local_1a & 1) != 0) {
std::__cxx11::string::~string(local_100);
std::__cxx11::string::~string(local_40);
return 1;
}
fprintf(*(FILE **)PTR_stderr_00346f48,
"error: please specify a llama2.c .bin file to be converted with argument --llama2c-model\n"
);
print_usage(local_4,local_10,local_e0);
/* WARNING: Subroutine does not return */
exit(1);
}
/* try { // try from 0015a333 to 0015a6bc has its CatchHandler @ 0015a3e7 */
std::__cxx11::string::operator=(local_40,local_10[local_118]);
psVar4 = (string *)std::__cxx11::string::size();
iVar3 = std::__cxx11::string::compare((ulong)local_40,0,psVar4);
if (iVar3 == 0) {
local_120 = std::__cxx11::string::begin();
local_128 = std::__cxx11::string::end();
local_129 = 0x5f;
local_12a = 0x2d;
std::replace<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,char>
(local_120,local_128,&local_129,&local_12a);
}
bVar2 = std::operator==(local_40,"--copy-vocab-from-model");
if (bVar2) {
local_118 = local_118 + 1;
if (local_4 <= local_118) {
local_19 = 1;
goto LAB_0015a61d;
}
*(char **)local_18 = local_10[local_118];
}
else {
bVar2 = std::operator==(local_40,"--llama2c-model");
if (bVar2) {
local_118 = local_118 + 1;
if (local_4 <= local_118) {
local_19 = 1;
goto LAB_0015a61d;
}
local_1a = 1;
*(char **)(local_18 + 8) = local_10[local_118];
}
else {
bVar2 = std::operator==(local_40,"--llama2c-output-model");
if (!bVar2) {
bVar2 = std::operator==(local_40,"-h");
if ((!bVar2) && (bVar2 = std::operator==(local_40,"--help"), !bVar2)) {
pFVar1 = *(FILE **)PTR_stderr_00346f48;
uVar5 = std::__cxx11::string::c_str();
fprintf(pFVar1,"error: unknown argument: %s\n",uVar5);
print_usage(local_4,local_10,local_e0);
/* WARNING: Subroutine does not return */
exit(1);
}
print_usage(local_4,local_10,local_e0);
/* WARNING: Subroutine does not return */
exit(0);
}
local_118 = local_118 + 1;
if (local_4 <= local_118) {
local_19 = 1;
goto LAB_0015a61d;
}
*(char **)(local_18 + 0x10) = local_10[local_118];
}
}
local_118 = local_118 + 1;
} while( true );
}
|
|
65,142 |
void ggml::cpu::aarch64::gemm<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int)
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
void gemm<block_iq4_nl, 4, 4>(int n, float * s, size_t bs, const void * vx, const void * vy, int nr, int nc) {
ggml_gemm_iq4_nl_4x4_q8_0(n, s, bs, vx, vy, nr, nc);
}
|
O1
|
cpp
|
void ggml::cpu::aarch64::gemm<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %r8, 0x20(%rsp)
movq %rcx, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
leal 0x1f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movq %rdi, 0x78(%rsp)
testb $0x1f, %dil
jne 0x2d51c
testb $0x3, %r9b
jne 0x2d53b
movl 0x140(%rsp), %ecx
movq %rcx, (%rsp)
testb $0x3, %cl
jne 0x2d55a
sarl $0x2, %r9d
testl %r9d, %r9d
jle 0x2d507
sarl $0x5, %eax
movq (%rsp), %rcx
sarl $0x2, %ecx
movq %rcx, (%rsp)
movq %rdx, %rcx
shlq $0x4, %rcx
movq %rcx, 0x60(%rsp)
shlq $0x2, %rdx
movslq %eax, %rcx
movl %r9d, %eax
movq %rax, 0x58(%rsp)
movl %ecx, %eax
movq %rax, 0x88(%rsp)
movq 0x20(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x40(%rsp)
movq %rcx, %rax
shlq $0x7, %rax
leaq (%rax,%rcx,8), %rax
movq %rax, 0x50(%rsp)
movq %rcx, 0x38(%rsp)
leaq (,%rcx,8), %rax
movq 0x30(%rsp), %rcx
addq $0x8, %rcx
movq %rcx, 0x48(%rsp)
leaq (%rax,%rax,8), %rax
movq %rax, 0x68(%rsp)
movq $0x0, 0x8(%rsp)
vxorps %xmm0, %xmm0, %xmm0
movq 0x1bcb4(%rip), %r12 # 0x48f68
leaq 0xc365(%rip), %r8 # 0x39620
movq %rdx, 0x70(%rsp)
cmpl $0x0, (%rsp)
jle 0x2d4db
movq 0x8(%rsp), %rax
imulq 0x38(%rsp), %rax
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x28(%rsp), %rsi
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq %rsi, 0x80(%rsp)
vmovups %ymm0, 0xe0(%rsp)
vmovups %ymm0, 0xc0(%rsp)
cmpl $0x20, 0x78(%rsp)
jl 0x2d485
movq 0x10(%rsp), %rax
imulq 0x38(%rsp), %rax
leaq (%rax,%rax,8), %rax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x98(%rsp)
movq 0x18(%rsp), %r11
movq 0x40(%rsp), %r13
xorl %esi, %esi
leaq (%rsi,%rsi,8), %rax
movq 0x98(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rsi, %rdx
shlq $0x7, %rdx
movq %rsi, 0xa0(%rsp)
leaq (%rdx,%rsi,8), %rdi
addq 0x90(%rsp), %rdi
movq %r11, 0xb0(%rsp)
movq %r13, 0xa8(%rsp)
xorl %ecx, %ecx
movq %rcx, 0xb8(%rsp)
movq %r13, %r14
xorl %ebx, %ebx
movzwl (%rdi,%rbx,2), %edx
vmovss (%r12,%rdx,4), %xmm1
movq %r11, %r10
xorl %ebp, %ebp
xorl %r9d, %r9d
xorl %edx, %edx
movzbl (%r10,%r9), %ecx
movl %ecx, %r15d
andl $0xf, %r15d
movsbl (%r15,%r8), %r15d
shrl $0x4, %ecx
movsbl (%rcx,%r8), %ecx
movsbl -0x40(%r14,%r9), %esi
imull %r15d, %esi
addl %edx, %esi
movsbl (%r14,%r9), %edx
imull %ecx, %edx
addl %esi, %edx
incq %r9
cmpq $0x4, %r9
jne 0x2d3b4
vcvtsi2ss %edx, %xmm3, %xmm2
movzwl (%rax,%rbp,2), %edx
vmulss (%r12,%rdx,4), %xmm2, %xmm2
movq %rbx, %rdx
shlq $0x4, %rdx
addq %rsp, %rdx
addq $0xc0, %rdx
vfmadd213ss (%rdx,%rbp,4), %xmm1, %xmm2 # xmm2 = (xmm1 * xmm2) + mem
vmovss %xmm2, (%rdx,%rbp,4)
incq %rbp
addq $0x4, %r10
cmpq $0x4, %rbp
jne 0x2d3af
incq %rbx
addq $0x4, %r14
cmpq $0x4, %rbx
jne 0x2d3a0
movq 0xb8(%rsp), %rcx
incq %rcx
addq $0x10, %r13
addq $0x10, %r11
cmpq $0x4, %rcx
jne 0x2d393
movq 0xa0(%rsp), %rsi
incq %rsi
movq 0xa8(%rsp), %r13
addq $0x88, %r13
movq 0xb0(%rsp), %r11
addq $0x48, %r11
cmpq 0x88(%rsp), %rsi
jne 0x2d356
movq 0x80(%rsp), %rsi
movq %rsi, %rax
xorl %ecx, %ecx
movq 0x70(%rsp), %rdx
vmovups 0xc0(%rsp,%rcx), %xmm1
vmovups %xmm1, (%rax)
addq $0x10, %rcx
addq %rdx, %rax
cmpq $0x40, %rcx
jne 0x2d497
movq 0x10(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %rax
addq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
addq $0x10, %rsi
movq %rcx, 0x10(%rsp)
cmpq (%rsp), %rcx
jne 0x2d305
movq 0x8(%rsp), %rcx
incq %rcx
movq 0x50(%rsp), %rax
addq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
addq %rax, 0x28(%rsp)
movq %rcx, 0x8(%rsp)
cmpq 0x58(%rsp), %rcx
jne 0x2d2c0
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
leaq 0xc36d(%rip), %rdi # 0x39890
leaq 0xc234(%rip), %rsi # 0x3975e
leaq 0xc6d6(%rip), %rcx # 0x39c07
movl $0xda1, %edx # imm = 0xDA1
callq 0x83b0
leaq 0xc5cb(%rip), %rdi # 0x39b0d
leaq 0xc215(%rip), %rsi # 0x3975e
leaq 0xc6b7(%rip), %rcx # 0x39c07
movl $0xda2, %edx # imm = 0xDA2
callq 0x83b0
leaq 0xc3b2(%rip), %rdi # 0x39913
leaq 0xc1f6(%rip), %rsi # 0x3975e
leaq 0xc698(%rip), %rcx # 0x39c07
movl $0xda3, %edx # imm = 0xDA3
callq 0x83b0
|
_ZN4ggml3cpu7aarch644gemmI12block_iq4_nlLl4ELl4EEEviPfmPKvS6_ii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 108h
mov [rsp+138h+var_118], r8
mov [rsp+138h+var_108], rcx
mov [rsp+138h+var_110], rsi
lea eax, [rdi+1Fh]
test edi, edi
cmovns eax, edi
mov [rsp+138h+var_C0], rdi
test dil, 1Fh
jnz loc_2D51C
test r9b, 3
jnz loc_2D53B
mov ecx, [rsp+138h+arg_0]
mov [rsp+138h+var_138], rcx
test cl, 3
jnz loc_2D55A
sar r9d, 2
test r9d, r9d
jle loc_2D507
sar eax, 5
mov rcx, [rsp+138h+var_138]
sar ecx, 2
mov [rsp+138h+var_138], rcx
mov rcx, rdx
shl rcx, 4
mov [rsp+138h+var_D8], rcx
shl rdx, 2
movsxd rcx, eax
mov eax, r9d
mov [rsp+138h+var_E0], rax
mov eax, ecx
mov [rsp+138h+var_B0], rax
mov rax, [rsp+138h+var_118]
add rax, 48h ; 'H'
mov [rsp+138h+var_F8], rax
mov rax, rcx
shl rax, 7
lea rax, [rax+rcx*8]
mov [rsp+138h+var_E8], rax
mov [rsp+138h+var_100], rcx
lea rax, ds:0[rcx*8]
mov rcx, [rsp+138h+var_108]
add rcx, 8
mov [rsp+138h+var_F0], rcx
lea rax, [rax+rax*8]
mov [rsp+138h+var_D0], rax
mov [rsp+138h+var_130], 0
vxorps xmm0, xmm0, xmm0
mov r12, cs:ggml_table_f32_f16_ptr
lea r8, kvalues_iq4nl
mov [rsp+138h+var_C8], rdx
loc_2D2C0:
cmp dword ptr [rsp+138h+var_138], 0
jle loc_2D4DB
mov rax, [rsp+138h+var_130]
imul rax, [rsp+138h+var_100]
mov rcx, rax
shl rcx, 7
lea rax, [rcx+rax*8]
add rax, [rsp+138h+var_118]
mov [rsp+138h+var_A8], rax
mov rsi, [rsp+138h+var_110]
mov rax, [rsp+138h+var_F0]
mov [rsp+138h+var_120], rax
mov [rsp+138h+var_128], 0
loc_2D305:
mov [rsp+138h+var_B8], rsi
vmovups [rsp+138h+var_58], ymm0
vmovups [rsp+138h+var_78], ymm0
cmp dword ptr [rsp+138h+var_C0], 20h ; ' '
jl loc_2D485
mov rax, [rsp+138h+var_128]
imul rax, [rsp+138h+var_100]
lea rax, [rax+rax*8]
mov rcx, [rsp+138h+var_108]
lea rax, [rcx+rax*8]
mov [rsp+138h+var_A0], rax
mov r11, [rsp+138h+var_120]
mov r13, [rsp+138h+var_F8]
xor esi, esi
loc_2D356:
lea rax, [rsi+rsi*8]
mov rcx, [rsp+138h+var_A0]
lea rax, [rcx+rax*8]
mov rdx, rsi
shl rdx, 7
mov [rsp+138h+var_98], rsi
lea rdi, [rdx+rsi*8]
add rdi, [rsp+138h+var_A8]
mov [rsp+138h+var_88], r11
mov [rsp+138h+var_90], r13
xor ecx, ecx
loc_2D393:
mov [rsp+138h+var_80], rcx
mov r14, r13
xor ebx, ebx
loc_2D3A0:
movzx edx, word ptr [rdi+rbx*2]
vmovss xmm1, dword ptr [r12+rdx*4]
mov r10, r11
xor ebp, ebp
loc_2D3AF:
xor r9d, r9d
xor edx, edx
loc_2D3B4:
movzx ecx, byte ptr [r10+r9]
mov r15d, ecx
and r15d, 0Fh
movsx r15d, byte ptr [r15+r8]
shr ecx, 4
movsx ecx, byte ptr [rcx+r8]
movsx esi, byte ptr [r14+r9-40h]
imul esi, r15d
add esi, edx
movsx edx, byte ptr [r14+r9]
imul edx, ecx
add edx, esi
inc r9
cmp r9, 4
jnz short loc_2D3B4
vcvtsi2ss xmm2, xmm3, edx
movzx edx, word ptr [rax+rbp*2]
vmulss xmm2, xmm2, dword ptr [r12+rdx*4]
mov rdx, rbx
shl rdx, 4
add rdx, rsp
add rdx, 0C0h
vfmadd213ss xmm2, xmm1, dword ptr [rdx+rbp*4]
vmovss dword ptr [rdx+rbp*4], xmm2
inc rbp
add r10, 4
cmp rbp, 4
jnz short loc_2D3AF
inc rbx
add r14, 4
cmp rbx, 4
jnz loc_2D3A0
mov rcx, [rsp+138h+var_80]
inc rcx
add r13, 10h
add r11, 10h
cmp rcx, 4
jnz loc_2D393
mov rsi, [rsp+138h+var_98]
inc rsi
mov r13, [rsp+138h+var_90]
add r13, 88h
mov r11, [rsp+138h+var_88]
add r11, 48h ; 'H'
cmp rsi, [rsp+138h+var_B0]
jnz loc_2D356
loc_2D485:
mov rsi, [rsp+138h+var_B8]
mov rax, rsi
xor ecx, ecx
mov rdx, [rsp+138h+var_C8]
loc_2D497:
vmovups xmm1, xmmword ptr [rsp+rcx+138h+var_78]
vmovups xmmword ptr [rax], xmm1
add rcx, 10h
add rax, rdx
cmp rcx, 40h ; '@'
jnz short loc_2D497
mov rcx, [rsp+138h+var_128]
inc rcx
mov rax, [rsp+138h+var_120]
add rax, [rsp+138h+var_D0]
mov [rsp+138h+var_120], rax
add rsi, 10h
mov [rsp+138h+var_128], rcx
cmp rcx, [rsp+138h+var_138]
jnz loc_2D305
loc_2D4DB:
mov rcx, [rsp+138h+var_130]
inc rcx
mov rax, [rsp+138h+var_E8]
add [rsp+138h+var_F8], rax
mov rax, [rsp+138h+var_D8]
add [rsp+138h+var_110], rax
mov [rsp+138h+var_130], rcx
cmp rcx, [rsp+138h+var_E0]
jnz loc_2D2C0
loc_2D507:
add rsp, 108h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
loc_2D51C:
lea rdi, aNQk0; "n % qk == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmIq; "void ggml_gemm_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 0DA1h
call ___assert_fail
loc_2D53B:
lea rdi, aNr40; "nr % 4 == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmIq; "void ggml_gemm_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 0DA2h
call ___assert_fail
loc_2D55A:
lea rdi, aNcNcolsInterle; "nc % ncols_interleaved == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmIq; "void ggml_gemm_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 0DA3h
call ___assert_fail
|
long long ggml::cpu::aarch64::gemm<block_iq4_nl,4l,4l>(
int a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
__m128 _XMM0,
double a8,
double a9,
__m128 _XMM3,
int a11)
{
long long result; // rax
int v13; // r9d
long long v16; // rsi
long long v17; // r11
long long v18; // r13
long long v19; // rsi
long long v20; // rcx
long long v21; // r14
long long j; // rbx
long long v25; // r10
long long v27; // r9
int v28; // edx
long long v36; // [rsp+0h] [rbp-138h]
long long v37; // [rsp+8h] [rbp-130h]
long long i; // [rsp+10h] [rbp-128h]
long long v39; // [rsp+18h] [rbp-120h]
long long v41; // [rsp+38h] [rbp-100h]
long long v42; // [rsp+40h] [rbp-F8h]
long long v43; // [rsp+48h] [rbp-F0h]
long long v44; // [rsp+50h] [rbp-E8h]
long long v45; // [rsp+58h] [rbp-E0h]
long long v46; // [rsp+60h] [rbp-D8h]
long long v47; // [rsp+70h] [rbp-C8h]
long long v48; // [rsp+80h] [rbp-B8h]
long long v49; // [rsp+88h] [rbp-B0h]
long long v50; // [rsp+A0h] [rbp-98h]
long long v51; // [rsp+A8h] [rbp-90h]
long long v52; // [rsp+B0h] [rbp-88h]
long long v53; // [rsp+B8h] [rbp-80h]
__m256 v54; // [rsp+C0h] [rbp-78h] BYREF
result = (unsigned int)(a1 + 31);
if ( a1 >= 0 )
result = (unsigned int)a1;
if ( (a1 & 0x1F) != 0 )
__assert_fail(
"n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3489LL,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a6 & 3) != 0 )
__assert_fail(
"nr % 4 == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3490LL,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a11 & 3) != 0 )
__assert_fail(
"nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp");
v13 = a6 >> 2;
if ( v13 > 0 )
{
v36 = (unsigned int)(a11 >> 2);
v46 = 16 * a3;
v45 = (unsigned int)v13;
v49 = (unsigned int)((int)result >> 5);
v42 = a5 + 72;
v44 = 136LL * ((int)result >> 5);
v41 = (int)result >> 5;
v43 = a4 + 8;
v37 = 0LL;
__asm { vxorps xmm0, xmm0, xmm0 }
_R12 = &ggml_table_f32_f16;
v47 = 4 * a3;
do
{
if ( (int)v36 > 0 )
{
v16 = a2;
v39 = v43;
for ( i = 0LL; i != v36; ++i )
{
v48 = v16;
__asm
{
vmovups [rsp+138h+var_58], ymm0
vmovups [rsp+138h+var_78], ymm0
}
if ( a1 >= 32 )
{
v17 = v39;
v18 = v42;
v19 = 0LL;
do
{
v50 = v19;
v52 = v17;
v51 = v18;
v20 = 0LL;
do
{
v53 = v20;
v21 = v18;
for ( j = 0LL; j != 4; ++j )
{
_RDX = *(unsigned __int16 *)(a5 + 136 * v41 * v37 + 136 * v19 + 2 * j);
__asm { vmovss xmm1, dword ptr [r12+rdx*4] }
v25 = v17;
for ( _RBP = 0LL; _RBP != 4; ++_RBP )
{
v27 = 0LL;
v28 = 0;
do
{
v28 += *((char *)&kvalues_iq4nl + (*(_BYTE *)(v25 + v27) & 0xF)) * *(char *)(v21 + v27 - 64)
+ *((char *)&kvalues_iq4nl + (*(unsigned __int8 *)(v25 + v27) >> 4)) * *(char *)(v21 + v27);
++v27;
}
while ( v27 != 4 );
__asm
{
vcvtsi2ss xmm2, xmm3, edx
vmulss xmm2, xmm2, dword ptr [r12+rdx*4]
}
_RDX = (char *)&v54 + 16 * j;
__asm
{
vfmadd213ss xmm2, xmm1, dword ptr [rdx+rbp*4]
vmovss dword ptr [rdx+rbp*4], xmm2
}
v25 += 4LL;
}
v21 += 4LL;
}
++v20;
v18 += 16LL;
v17 += 16LL;
}
while ( v53 != 3 );
++v19;
v18 = v51 + 136;
v17 = v52 + 72;
}
while ( v50 + 1 != v49 );
}
_RAX = v48;
for ( _RCX = 0LL; _RCX != 64; _RCX += 16LL )
{
__asm
{
vmovups xmm1, xmmword ptr [rsp+rcx+138h+var_78]
vmovups xmmword ptr [rax], xmm1
}
_RAX += v47;
}
v39 += 72 * v41;
v16 = v48 + 16;
}
}
v42 += v44;
result = v46;
a2 += v46;
++v37;
}
while ( v37 != v45 );
}
__asm { vzeroupper }
return result;
}
|
gemm<block_iq4_nl,4l,4l>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x108
MOV qword ptr [RSP + 0x20],R8
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x28],RSI
LEA EAX,[RDI + 0x1f]
TEST EDI,EDI
CMOVNS EAX,EDI
MOV qword ptr [RSP + 0x78],RDI
TEST DIL,0x1f
JNZ 0x0012d51c
TEST R9B,0x3
JNZ 0x0012d53b
MOV ECX,dword ptr [RSP + 0x140]
MOV qword ptr [RSP],RCX
TEST CL,0x3
JNZ 0x0012d55a
SAR R9D,0x2
TEST R9D,R9D
JLE 0x0012d507
SAR EAX,0x5
MOV RCX,qword ptr [RSP]
SAR ECX,0x2
MOV qword ptr [RSP],RCX
MOV RCX,RDX
SHL RCX,0x4
MOV qword ptr [RSP + 0x60],RCX
SHL RDX,0x2
MOVSXD RCX,EAX
MOV EAX,R9D
MOV qword ptr [RSP + 0x58],RAX
MOV EAX,ECX
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x48
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,RCX
SHL RAX,0x7
LEA RAX,[RAX + RCX*0x8]
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x38],RCX
LEA RAX,[RCX*0x8]
MOV RCX,qword ptr [RSP + 0x30]
ADD RCX,0x8
MOV qword ptr [RSP + 0x48],RCX
LEA RAX,[RAX + RAX*0x8]
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x8],0x0
VXORPS XMM0,XMM0,XMM0
MOV R12,qword ptr [0x00148f68]
LEA R8,[0x139620]
MOV qword ptr [RSP + 0x70],RDX
LAB_0012d2c0:
CMP dword ptr [RSP],0x0
JLE 0x0012d4db
MOV RAX,qword ptr [RSP + 0x8]
IMUL RAX,qword ptr [RSP + 0x38]
MOV RCX,RAX
SHL RCX,0x7
LEA RAX,[RCX + RAX*0x8]
ADD RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x90],RAX
MOV RSI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],0x0
LAB_0012d305:
MOV qword ptr [RSP + 0x80],RSI
VMOVUPS ymmword ptr [RSP + 0xe0],YMM0
VMOVUPS ymmword ptr [RSP + 0xc0],YMM0
CMP dword ptr [RSP + 0x78],0x20
JL 0x0012d485
MOV RAX,qword ptr [RSP + 0x10]
IMUL RAX,qword ptr [RSP + 0x38]
LEA RAX,[RAX + RAX*0x8]
MOV RCX,qword ptr [RSP + 0x30]
LEA RAX,[RCX + RAX*0x8]
MOV qword ptr [RSP + 0x98],RAX
MOV R11,qword ptr [RSP + 0x18]
MOV R13,qword ptr [RSP + 0x40]
XOR ESI,ESI
LAB_0012d356:
LEA RAX,[RSI + RSI*0x8]
MOV RCX,qword ptr [RSP + 0x98]
LEA RAX,[RCX + RAX*0x8]
MOV RDX,RSI
SHL RDX,0x7
MOV qword ptr [RSP + 0xa0],RSI
LEA RDI,[RDX + RSI*0x8]
ADD RDI,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xb0],R11
MOV qword ptr [RSP + 0xa8],R13
XOR ECX,ECX
LAB_0012d393:
MOV qword ptr [RSP + 0xb8],RCX
MOV R14,R13
XOR EBX,EBX
LAB_0012d3a0:
MOVZX EDX,word ptr [RDI + RBX*0x2]
VMOVSS XMM1,dword ptr [R12 + RDX*0x4]
MOV R10,R11
XOR EBP,EBP
LAB_0012d3af:
XOR R9D,R9D
XOR EDX,EDX
LAB_0012d3b4:
MOVZX ECX,byte ptr [R10 + R9*0x1]
MOV R15D,ECX
AND R15D,0xf
MOVSX R15D,byte ptr [R15 + R8*0x1]
SHR ECX,0x4
MOVSX ECX,byte ptr [RCX + R8*0x1]
MOVSX ESI,byte ptr [R14 + R9*0x1 + -0x40]
IMUL ESI,R15D
ADD ESI,EDX
MOVSX EDX,byte ptr [R14 + R9*0x1]
IMUL EDX,ECX
ADD EDX,ESI
INC R9
CMP R9,0x4
JNZ 0x0012d3b4
VCVTSI2SS XMM2,XMM3,EDX
MOVZX EDX,word ptr [RAX + RBP*0x2]
VMULSS XMM2,XMM2,dword ptr [R12 + RDX*0x4]
MOV RDX,RBX
SHL RDX,0x4
ADD RDX,RSP
ADD RDX,0xc0
VFMADD213SS XMM2,XMM1,dword ptr [RDX + RBP*0x4]
VMOVSS dword ptr [RDX + RBP*0x4],XMM2
INC RBP
ADD R10,0x4
CMP RBP,0x4
JNZ 0x0012d3af
INC RBX
ADD R14,0x4
CMP RBX,0x4
JNZ 0x0012d3a0
MOV RCX,qword ptr [RSP + 0xb8]
INC RCX
ADD R13,0x10
ADD R11,0x10
CMP RCX,0x4
JNZ 0x0012d393
MOV RSI,qword ptr [RSP + 0xa0]
INC RSI
MOV R13,qword ptr [RSP + 0xa8]
ADD R13,0x88
MOV R11,qword ptr [RSP + 0xb0]
ADD R11,0x48
CMP RSI,qword ptr [RSP + 0x88]
JNZ 0x0012d356
LAB_0012d485:
MOV RSI,qword ptr [RSP + 0x80]
MOV RAX,RSI
XOR ECX,ECX
MOV RDX,qword ptr [RSP + 0x70]
LAB_0012d497:
VMOVUPS XMM1,xmmword ptr [RSP + RCX*0x1 + 0xc0]
VMOVUPS xmmword ptr [RAX],XMM1
ADD RCX,0x10
ADD RAX,RDX
CMP RCX,0x40
JNZ 0x0012d497
MOV RCX,qword ptr [RSP + 0x10]
INC RCX
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x18],RAX
ADD RSI,0x10
MOV qword ptr [RSP + 0x10],RCX
CMP RCX,qword ptr [RSP]
JNZ 0x0012d305
LAB_0012d4db:
MOV RCX,qword ptr [RSP + 0x8]
INC RCX
MOV RAX,qword ptr [RSP + 0x50]
ADD qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x60]
ADD qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x8],RCX
CMP RCX,qword ptr [RSP + 0x58]
JNZ 0x0012d2c0
LAB_0012d507:
ADD RSP,0x108
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
LAB_0012d51c:
LEA RDI,[0x139890]
LEA RSI,[0x13975e]
LEA RCX,[0x139c07]
MOV EDX,0xda1
CALL 0x001083b0
LAB_0012d53b:
LEA RDI,[0x139b0d]
LEA RSI,[0x13975e]
LEA RCX,[0x139c07]
MOV EDX,0xda2
CALL 0x001083b0
LAB_0012d55a:
LEA RDI,[0x139913]
LEA RSI,[0x13975e]
LEA RCX,[0x139c07]
MOV EDX,0xda3
CALL 0x001083b0
|
/* void ggml::cpu::aarch64::gemm<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void
const*, int, int) */
void ggml::cpu::aarch64::gemm<block_iq4_nl,4l,4l>
(int param_1,float *param_2,ulong param_3,void *param_4,void *param_5,int param_6,
int param_7)
{
uint uVar1;
int1 auVar2 [16];
int8 uVar3;
int *puVar4;
int iVar5;
float *pfVar6;
long lVar7;
long lVar8;
int iVar9;
long lVar10;
long lVar11;
float *pfVar12;
ulong uVar13;
long lVar14;
long lVar15;
long lVar16;
long lVar17;
long lVar18;
long lVar19;
long lVar20;
ulong local_130;
ulong local_128;
long local_120;
float *local_110;
long local_f8;
uint local_78 [2];
int8 auStack_70 [8];
puVar4 = PTR_ggml_table_f32_f16_00148f68;
iVar5 = param_1 + 0x1f;
if (-1 < param_1) {
iVar5 = param_1;
}
if ((param_1 & 0x1fU) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0xda1,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
if ((param_6 & 3U) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("nr % 4 == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0xda2,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
if ((param_7 & 3U) == 0) {
if (0 < param_6 >> 2) {
lVar7 = (long)(iVar5 >> 5);
local_f8 = (long)param_5 + 0x48;
local_130 = 0;
local_110 = param_2;
do {
if (0 < param_7 >> 2) {
local_128 = 0;
pfVar12 = local_110;
local_120 = (long)param_4 + 8;
do {
auStack_70[3] = 0;
auStack_70[4] = 0;
auStack_70[5] = 0;
auStack_70[6] = 0;
local_78[0] = 0;
local_78[1] = 0;
auStack_70[0] = 0;
auStack_70[1] = 0;
auStack_70[2] = 0;
if (0x1f < param_1) {
uVar13 = 0;
lVar17 = local_120;
lVar19 = local_f8;
do {
lVar8 = 0;
lVar16 = lVar17;
lVar18 = lVar19;
do {
lVar10 = 0;
lVar20 = lVar18;
do {
uVar1 = *(uint *)(puVar4 + (ulong)*(ushort *)
((long)param_5 +
lVar10 * 2 +
uVar13 * 0x88 + local_130 * lVar7 * 0x88) * 4
);
lVar11 = 0;
lVar15 = lVar16;
do {
lVar14 = 0;
iVar9 = 0;
do {
iVar9 = (int)*(char *)(lVar20 + lVar14) *
(int)(char)kvalues_iq4nl[*(byte *)(lVar15 + lVar14) >> 4] +
(int)*(char *)(lVar20 + -0x40 + lVar14) *
(int)(char)kvalues_iq4nl[*(byte *)(lVar15 + lVar14) & 0xf] + iVar9;
lVar14 = lVar14 + 1;
} while (lVar14 != 4);
auVar2 = vfmadd213ss_fma(ZEXT416((uint)((float)iVar9 *
*(float *)(puVar4 + (ulong)*(ushort *)
((long)
param_4 + lVar11 * 2 +
uVar13 * 0x48 + local_128 * lVar7 * 0x48
) * 4))),ZEXT416(uVar1),
ZEXT416(*(uint *)((long)auStack_70 +
lVar11 * 4 + lVar10 * 0x10 + -8)));
*(int *)((long)auStack_70 + lVar11 * 4 + lVar10 * 0x10 + -8) = auVar2._0_4_;
lVar11 = lVar11 + 1;
lVar15 = lVar15 + 4;
} while (lVar11 != 4);
lVar10 = lVar10 + 1;
lVar20 = lVar20 + 4;
} while (lVar10 != 4);
lVar8 = lVar8 + 1;
lVar18 = lVar18 + 0x10;
lVar16 = lVar16 + 0x10;
} while (lVar8 != 4);
uVar13 = uVar13 + 1;
lVar19 = lVar19 + 0x88;
lVar17 = lVar17 + 0x48;
} while (uVar13 != (uint)(iVar5 >> 5));
}
lVar17 = 0;
pfVar6 = pfVar12;
do {
uVar3 = *(int8 *)((long)auStack_70 + lVar17);
*(int8 *)pfVar6 = *(int8 *)((long)auStack_70 + lVar17 + -8);
*(int8 *)(pfVar6 + 2) = uVar3;
lVar17 = lVar17 + 0x10;
pfVar6 = pfVar6 + param_3;
} while (lVar17 != 0x40);
local_128 = local_128 + 1;
local_120 = local_120 + lVar7 * 0x48;
pfVar12 = pfVar12 + 4;
} while (local_128 != (uint)(param_7 >> 2));
}
local_130 = local_130 + 1;
local_f8 = local_f8 + lVar7 * 0x88;
local_110 = local_110 + param_3 * 4;
} while (local_130 != (uint)(param_6 >> 2));
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0xda3,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
|
|
65,143 |
void ggml::cpu::aarch64::gemm<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int)
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
void gemm<block_iq4_nl, 4, 4>(int n, float * s, size_t bs, const void * vx, const void * vy, int nr, int nc) {
ggml_gemm_iq4_nl_4x4_q8_0(n, s, bs, vx, vy, nr, nc);
}
|
O2
|
cpp
|
void ggml::cpu::aarch64::gemm<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rdx, %r11
pushq $0x20
popq %r10
movl %edi, %eax
cltd
idivl %r10d
movq %r8, 0x10(%rsp)
movq %rcx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
testb $0x1f, %dil
jne 0x2b357
testb $0x3, %r9b
jne 0x2b376
movl 0x140(%rsp), %ecx
testb $0x3, %cl
jne 0x2b395
movl %r9d, %edx
sarl $0x2, %edx
movl %ecx, %esi
sarl $0x2, %esi
movl %eax, %edi
sarl $0x1f, %edi
andnl %eax, %edi, %edi
movq %rdi, 0x98(%rsp)
movslq %eax, %rdi
sarl $0x1f, %ecx
andnl %esi, %ecx, %eax
movq %rax, 0x78(%rsp)
sarl $0x1f, %r9d
andnl %edx, %r9d, %eax
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %rax
addq $0x48, %rax
movq %rax, 0x28(%rsp)
imulq $0x88, %rdi, %rax
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0x30(%rsp)
imulq $0x48, %rdi, %rax
movq %rax, 0x70(%rsp)
movq %r11, %rax
shlq $0x4, %rax
movq %rax, 0x48(%rsp)
shlq $0x2, %r11
movq %r11, 0x80(%rsp)
xorl %eax, %eax
movq 0x1ae8e(%rip), %rbx # 0x45f68
leaq 0xb5ff(%rip), %r8 # 0x366e0
cmpq 0x60(%rsp), %rax
je 0x2b345
movq %rax, 0x68(%rsp)
imulq 0x30(%rsp), %rax
imulq $0x88, %rax, %rax
addq 0x10(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %ecx, %ecx
cmpq 0x78(%rsp), %rcx
je 0x2b321
movq %rcx, 0x40(%rsp)
leaq 0xc0(%rsp), %rax
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x2b15b
xorl %edx, %edx
cmpq $0x4, %rdx
je 0x2b152
andl $0x0, (%rax,%rdx,4)
incq %rdx
jmp 0x2b143
incq %rcx
addq $0x10, %rax
jmp 0x2b13b
movq 0x40(%rsp), %rax
imulq 0x30(%rsp), %rax
imulq $0x48, %rax, %rax
addq 0x20(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x8(%rsp), %rax
movq 0x28(%rsp), %r11
xorl %edx, %edx
cmpq 0x98(%rsp), %rdx
je 0x2b2c2
imulq $0x48, %rdx, %r15
addq 0x90(%rsp), %r15
movq %rdx, 0xa0(%rsp)
imulq $0x88, %rdx, %rbp
addq 0x88(%rsp), %rbp
movq %rax, 0xb0(%rsp)
movq %r11, 0xa8(%rsp)
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x2b297
movq %r11, 0xb8(%rsp)
xorl %r10d, %r10d
cmpq $0x4, %r10
je 0x2b27f
movzwl (%rbp,%r10,2), %edx
vmovss (%rbx,%rdx,4), %xmm0
movq %rax, %r9
xorl %r14d, %r14d
cmpq $0x4, %r14
je 0x2b273
xorl %r13d, %r13d
xorl %esi, %esi
cmpq $0x4, %r13
je 0x2b23f
movzbl (%r9,%r13), %edi
movl %edi, %r12d
andl $0xf, %r12d
movsbl (%r12,%r8), %r12d
shrl $0x4, %edi
movsbl (%rdi,%r8), %edi
movsbl -0x40(%r11,%r13), %edx
imull %r12d, %edx
movsbl (%r11,%r13), %r12d
imull %edi, %r12d
addl %esi, %edx
addl %r12d, %edx
incq %r13
movl %edx, %esi
jmp 0x2b201
vcvtsi2ss %esi, %xmm2, %xmm1
movzwl (%r15,%r14,2), %edx
vmulss (%rbx,%rdx,4), %xmm1, %xmm1
movq %r10, %rdx
shlq $0x4, %rdx
addq %rsp, %rdx
addq $0xc0, %rdx
vfmadd213ss (%rdx,%r14,4), %xmm0, %xmm1 # xmm1 = (xmm0 * xmm1) + mem
vmovss %xmm1, (%rdx,%r14,4)
incq %r14
addq $0x4, %r9
jmp 0x2b1f6
incq %r10
addq $0x4, %r11
jmp 0x2b1db
incq %rcx
movq 0xb8(%rsp), %r11
addq $0x10, %r11
addq $0x10, %rax
jmp 0x2b1c6
movq 0xa0(%rsp), %rdx
incq %rdx
movq 0xa8(%rsp), %r11
addq $0x88, %r11
movq 0xb0(%rsp), %rax
addq $0x48, %rax
jmp 0x2b183
leaq 0xc0(%rsp), %rax
movq 0x38(%rsp), %rcx
xorl %edx, %edx
cmpq $0x4, %rdx
je 0x2b2ff
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x2b2ee
vmovss (%rax,%rsi,4), %xmm0
vmovss %xmm0, (%rcx,%rsi,4)
incq %rsi
jmp 0x2b2d9
incq %rdx
addq 0x80(%rsp), %rcx
addq $0x10, %rax
jmp 0x2b2d1
movq 0x40(%rsp), %rcx
incq %rcx
movq 0x8(%rsp), %rax
addq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x10, 0x38(%rsp)
jmp 0x2b121
movq 0x68(%rsp), %rcx
incq %rcx
movq 0x58(%rsp), %rax
addq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
addq %rax, 0x18(%rsp)
movq %rcx, %rax
jmp 0x2b0e1
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb5ea(%rip), %rdi # 0x36948
leaq 0xb4b1(%rip), %rsi # 0x36816
leaq 0xb953(%rip), %rcx # 0x36cbf
movl $0xda1, %edx # imm = 0xDA1
callq 0x8460
leaq 0xb848(%rip), %rdi # 0x36bc5
leaq 0xb492(%rip), %rsi # 0x36816
leaq 0xb934(%rip), %rcx # 0x36cbf
movl $0xda2, %edx # imm = 0xDA2
callq 0x8460
leaq 0xb62f(%rip), %rdi # 0x369cb
leaq 0xb473(%rip), %rsi # 0x36816
leaq 0xb915(%rip), %rcx # 0x36cbf
movl $0xda3, %edx # imm = 0xDA3
callq 0x8460
|
_ZN4ggml3cpu7aarch644gemmI12block_iq4_nlLl4ELl4EEEviPfmPKvS6_ii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 108h
mov r11, rdx
push 20h ; ' '
pop r10
mov eax, edi
cdq
idiv r10d
mov [rsp+138h+var_128], r8
mov [rsp+138h+var_118], rcx
mov [rsp+138h+var_120], rsi
test dil, 1Fh
jnz loc_2B357
test r9b, 3
jnz loc_2B376
mov ecx, [rsp+138h+arg_0]
test cl, 3
jnz loc_2B395
mov edx, r9d
sar edx, 2
mov esi, ecx
sar esi, 2
mov edi, eax
sar edi, 1Fh
andn edi, edi, eax
mov [rsp+138h+var_A0], rdi
movsxd rdi, eax
sar ecx, 1Fh
andn eax, ecx, esi
mov [rsp+138h+var_C0], rax
sar r9d, 1Fh
andn eax, r9d, edx
mov [rsp+138h+var_D8], rax
mov rax, [rsp+138h+var_128]
add rax, 48h ; 'H'
mov [rsp+138h+var_110], rax
imul rax, rdi, 88h
mov [rsp+138h+var_E0], rax
mov rax, [rsp+138h+var_118]
add rax, 8
mov [rsp+138h+var_E8], rax
mov [rsp+138h+var_108], rdi
imul rax, rdi, 48h ; 'H'
mov [rsp+138h+var_C8], rax
mov rax, r11
shl rax, 4
mov [rsp+138h+var_F0], rax
shl r11, 2
mov [rsp+138h+var_B8], r11
xor eax, eax
mov rbx, cs:ggml_table_f32_f16_ptr
lea r8, kvalues_iq4nl
loc_2B0E1:
cmp rax, [rsp+138h+var_D8]
jz loc_2B345
mov [rsp+138h+var_D0], rax
imul rax, [rsp+138h+var_108]
imul rax, 88h
add rax, [rsp+138h+var_128]
mov [rsp+138h+var_B0], rax
mov rax, [rsp+138h+var_120]
mov [rsp+138h+var_100], rax
mov rax, [rsp+138h+var_E8]
mov [rsp+138h+var_130], rax
xor ecx, ecx
loc_2B121:
cmp rcx, [rsp+138h+var_C0]
jz loc_2B321
mov [rsp+138h+var_F8], rcx
lea rax, [rsp+138h+var_78]
xor ecx, ecx
loc_2B13B:
cmp rcx, 4
jz short loc_2B15B
xor edx, edx
loc_2B143:
cmp rdx, 4
jz short loc_2B152
and dword ptr [rax+rdx*4], 0
inc rdx
jmp short loc_2B143
loc_2B152:
inc rcx
add rax, 10h
jmp short loc_2B13B
loc_2B15B:
mov rax, [rsp+138h+var_F8]
imul rax, [rsp+138h+var_108]
imul rax, 48h ; 'H'
add rax, [rsp+138h+var_118]
mov [rsp+138h+var_A8], rax
mov rax, [rsp+138h+var_130]
mov r11, [rsp+138h+var_110]
xor edx, edx
loc_2B183:
cmp rdx, [rsp+138h+var_A0]
jz loc_2B2C2
imul r15, rdx, 48h ; 'H'
add r15, [rsp+138h+var_A8]
mov [rsp+138h+var_98], rdx
imul rbp, rdx, 88h
add rbp, [rsp+138h+var_B0]
mov [rsp+138h+var_88], rax
mov [rsp+138h+var_90], r11
xor ecx, ecx
loc_2B1C6:
cmp rcx, 4
jz loc_2B297
mov [rsp+138h+var_80], r11
xor r10d, r10d
loc_2B1DB:
cmp r10, 4
jz loc_2B27F
movzx edx, word ptr [rbp+r10*2+0]
vmovss xmm0, dword ptr [rbx+rdx*4]
mov r9, rax
xor r14d, r14d
loc_2B1F6:
cmp r14, 4
jz short loc_2B273
xor r13d, r13d
xor esi, esi
loc_2B201:
cmp r13, 4
jz short loc_2B23F
movzx edi, byte ptr [r9+r13]
mov r12d, edi
and r12d, 0Fh
movsx r12d, byte ptr [r12+r8]
shr edi, 4
movsx edi, byte ptr [rdi+r8]
movsx edx, byte ptr [r11+r13-40h]
imul edx, r12d
movsx r12d, byte ptr [r11+r13]
imul r12d, edi
add edx, esi
add edx, r12d
inc r13
mov esi, edx
jmp short loc_2B201
loc_2B23F:
vcvtsi2ss xmm1, xmm2, esi
movzx edx, word ptr [r15+r14*2]
vmulss xmm1, xmm1, dword ptr [rbx+rdx*4]
mov rdx, r10
shl rdx, 4
add rdx, rsp
add rdx, 0C0h
vfmadd213ss xmm1, xmm0, dword ptr [rdx+r14*4]
vmovss dword ptr [rdx+r14*4], xmm1
inc r14
add r9, 4
jmp short loc_2B1F6
loc_2B273:
inc r10
add r11, 4
jmp loc_2B1DB
loc_2B27F:
inc rcx
mov r11, [rsp+138h+var_80]
add r11, 10h
add rax, 10h
jmp loc_2B1C6
loc_2B297:
mov rdx, [rsp+138h+var_98]
inc rdx
mov r11, [rsp+138h+var_90]
add r11, 88h
mov rax, [rsp+138h+var_88]
add rax, 48h ; 'H'
jmp loc_2B183
loc_2B2C2:
lea rax, [rsp+138h+var_78]
mov rcx, [rsp+138h+var_100]
xor edx, edx
loc_2B2D1:
cmp rdx, 4
jz short loc_2B2FF
xor esi, esi
loc_2B2D9:
cmp rsi, 4
jz short loc_2B2EE
vmovss xmm0, dword ptr [rax+rsi*4]
vmovss dword ptr [rcx+rsi*4], xmm0
inc rsi
jmp short loc_2B2D9
loc_2B2EE:
inc rdx
add rcx, [rsp+138h+var_B8]
add rax, 10h
jmp short loc_2B2D1
loc_2B2FF:
mov rcx, [rsp+138h+var_F8]
inc rcx
mov rax, [rsp+138h+var_130]
add rax, [rsp+138h+var_C8]
mov [rsp+138h+var_130], rax
add [rsp+138h+var_100], 10h
jmp loc_2B121
loc_2B321:
mov rcx, [rsp+138h+var_D0]
inc rcx
mov rax, [rsp+138h+var_E0]
add [rsp+138h+var_110], rax
mov rax, [rsp+138h+var_F0]
add [rsp+138h+var_120], rax
mov rax, rcx
jmp loc_2B0E1
loc_2B345:
add rsp, 108h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2B357:
lea rdi, aNQk0; "n % qk == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmIq; "void ggml_gemm_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 0DA1h
call ___assert_fail
loc_2B376:
lea rdi, aNr40; "nr % 4 == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmIq; "void ggml_gemm_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 0DA2h
call ___assert_fail
loc_2B395:
lea rdi, aNcNcolsInterle; "nc % ncols_interleaved == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmIq; "void ggml_gemm_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 0DA3h
call ___assert_fail
|
long long ggml::cpu::aarch64::gemm<block_iq4_nl,4l,4l>(
int a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
double a7,
double a8,
__m128 _XMM2,
int a10)
{
int v10; // eax
long long result; // rax
long long v13; // rcx
_OWORD *v14; // rax
long long i; // rcx
long long j; // rdx
long long v17; // rax
long long v18; // r11
long long v19; // rdx
long long v20; // rbp
long long k; // rcx
long long m; // r10
long long v25; // r9
long long v27; // r13
int v28; // esi
int v29; // r12d
int v30; // edx
long long n; // rdx
long long v40; // [rsp+8h] [rbp-130h]
long long v43; // [rsp+28h] [rbp-110h]
long long v44; // [rsp+30h] [rbp-108h]
long long v45; // [rsp+38h] [rbp-100h]
long long v46; // [rsp+40h] [rbp-F8h]
long long v47; // [rsp+48h] [rbp-F0h]
long long v48; // [rsp+58h] [rbp-E0h]
long long v49; // [rsp+60h] [rbp-D8h]
long long v50; // [rsp+68h] [rbp-D0h]
long long v51; // [rsp+70h] [rbp-C8h]
long long v52; // [rsp+80h] [rbp-B8h]
long long v53; // [rsp+88h] [rbp-B0h]
long long v54; // [rsp+98h] [rbp-A0h]
long long v55; // [rsp+A0h] [rbp-98h]
long long v56; // [rsp+A8h] [rbp-90h]
long long v57; // [rsp+B0h] [rbp-88h]
long long v58; // [rsp+B8h] [rbp-80h]
_OWORD v59[7]; // [rsp+C0h] [rbp-78h] BYREF
v10 = a1 / 32;
if ( (a1 & 0x1F) != 0 )
__assert_fail(
"n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3489LL,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a6 & 3) != 0 )
__assert_fail(
"nr % 4 == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3490LL,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a10 & 3) != 0 )
__assert_fail(
"nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp");
v54 = v10 & (unsigned int)~(v10 >> 31);
v49 = (a6 >> 2) & (unsigned int)~(a6 >> 31);
v43 = a5 + 72;
v48 = 136LL * v10;
v44 = v10;
v51 = 72LL * v10;
v47 = 16 * a3;
v52 = 4 * a3;
result = 0LL;
_RBX = &ggml_table_f32_f16;
while ( result != v49 )
{
v50 = result;
v53 = a5 + 136 * v44 * result;
v45 = a2;
v40 = a4 + 8;
v13 = 0LL;
while ( v13 != ((a10 >> 2) & ~(a10 >> 31)) )
{
v46 = v13;
v14 = v59;
for ( i = 0LL; i != 4; ++i )
{
for ( j = 0LL; j != 4; ++j )
*((_DWORD *)v14 + j) = 0;
++v14;
}
v17 = v40;
v18 = v43;
v19 = 0LL;
while ( v19 != v54 )
{
v55 = v19;
v20 = v53 + 136 * v19;
v57 = v17;
v56 = v18;
for ( k = 0LL; k != 4; ++k )
{
v58 = v18;
for ( m = 0LL; m != 4; ++m )
{
_RDX = *(unsigned __int16 *)(v20 + 2 * m);
__asm { vmovss xmm0, dword ptr [rbx+rdx*4] }
v25 = v17;
for ( _R14 = 0LL; _R14 != 4; ++_R14 )
{
v27 = 0LL;
v28 = 0;
while ( v27 != 4 )
{
v29 = *((char *)&kvalues_iq4nl + (*(unsigned __int8 *)(v25 + v27) >> 4)) * *(char *)(v18 + v27);
v30 = v28 + *((char *)&kvalues_iq4nl + (*(_BYTE *)(v25 + v27) & 0xF)) * *(char *)(v18 + v27 - 64);
++v27;
v28 = v29 + v30;
}
__asm
{
vcvtsi2ss xmm1, xmm2, esi
vmulss xmm1, xmm1, dword ptr [rbx+rdx*4]
}
_RDX = &v59[m];
__asm
{
vfmadd213ss xmm1, xmm0, dword ptr [rdx+r14*4]
vmovss dword ptr [rdx+r14*4], xmm1
}
v25 += 4LL;
}
v18 += 4LL;
}
v18 = v58 + 16;
v17 += 16LL;
}
v19 = v55 + 1;
v18 = v56 + 136;
v17 = v57 + 72;
}
_RAX = v59;
_RCX = v45;
for ( n = 0LL; n != 4; ++n )
{
for ( _RSI = 0LL; _RSI != 4; ++_RSI )
{
__asm
{
vmovss xmm0, dword ptr [rax+rsi*4]
vmovss dword ptr [rcx+rsi*4], xmm0
}
}
_RCX += v52;
++_RAX;
}
v13 = v46 + 1;
v40 += v51;
v45 += 16LL;
}
v43 += v48;
a2 += v47;
result = v50 + 1;
}
return result;
}
|
gemm<block_iq4_nl,4l,4l>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x108
MOV R11,RDX
PUSH 0x20
POP R10
MOV EAX,EDI
CDQ
IDIV R10D
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x18],RSI
TEST DIL,0x1f
JNZ 0x0012b357
TEST R9B,0x3
JNZ 0x0012b376
MOV ECX,dword ptr [RSP + 0x140]
TEST CL,0x3
JNZ 0x0012b395
MOV EDX,R9D
SAR EDX,0x2
MOV ESI,ECX
SAR ESI,0x2
MOV EDI,EAX
SAR EDI,0x1f
ANDN EDI,EDI,EAX
MOV qword ptr [RSP + 0x98],RDI
MOVSXD RDI,EAX
SAR ECX,0x1f
ANDN EAX,ECX,ESI
MOV qword ptr [RSP + 0x78],RAX
SAR R9D,0x1f
ANDN EAX,R9D,EDX
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x48
MOV qword ptr [RSP + 0x28],RAX
IMUL RAX,RDI,0x88
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x8
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x30],RDI
IMUL RAX,RDI,0x48
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,R11
SHL RAX,0x4
MOV qword ptr [RSP + 0x48],RAX
SHL R11,0x2
MOV qword ptr [RSP + 0x80],R11
XOR EAX,EAX
MOV RBX,qword ptr [0x00145f68]
LEA R8,[0x1366e0]
LAB_0012b0e1:
CMP RAX,qword ptr [RSP + 0x60]
JZ 0x0012b345
MOV qword ptr [RSP + 0x68],RAX
IMUL RAX,qword ptr [RSP + 0x30]
IMUL RAX,RAX,0x88
ADD RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RAX
XOR ECX,ECX
LAB_0012b121:
CMP RCX,qword ptr [RSP + 0x78]
JZ 0x0012b321
MOV qword ptr [RSP + 0x40],RCX
LEA RAX,[RSP + 0xc0]
XOR ECX,ECX
LAB_0012b13b:
CMP RCX,0x4
JZ 0x0012b15b
XOR EDX,EDX
LAB_0012b143:
CMP RDX,0x4
JZ 0x0012b152
AND dword ptr [RAX + RDX*0x4],0x0
INC RDX
JMP 0x0012b143
LAB_0012b152:
INC RCX
ADD RAX,0x10
JMP 0x0012b13b
LAB_0012b15b:
MOV RAX,qword ptr [RSP + 0x40]
IMUL RAX,qword ptr [RSP + 0x30]
IMUL RAX,RAX,0x48
ADD RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV R11,qword ptr [RSP + 0x28]
XOR EDX,EDX
LAB_0012b183:
CMP RDX,qword ptr [RSP + 0x98]
JZ 0x0012b2c2
IMUL R15,RDX,0x48
ADD R15,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xa0],RDX
IMUL RBP,RDX,0x88
ADD RBP,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xb0],RAX
MOV qword ptr [RSP + 0xa8],R11
XOR ECX,ECX
LAB_0012b1c6:
CMP RCX,0x4
JZ 0x0012b297
MOV qword ptr [RSP + 0xb8],R11
XOR R10D,R10D
LAB_0012b1db:
CMP R10,0x4
JZ 0x0012b27f
MOVZX EDX,word ptr [RBP + R10*0x2]
VMOVSS XMM0,dword ptr [RBX + RDX*0x4]
MOV R9,RAX
XOR R14D,R14D
LAB_0012b1f6:
CMP R14,0x4
JZ 0x0012b273
XOR R13D,R13D
XOR ESI,ESI
LAB_0012b201:
CMP R13,0x4
JZ 0x0012b23f
MOVZX EDI,byte ptr [R9 + R13*0x1]
MOV R12D,EDI
AND R12D,0xf
MOVSX R12D,byte ptr [R12 + R8*0x1]
SHR EDI,0x4
MOVSX EDI,byte ptr [RDI + R8*0x1]
MOVSX EDX,byte ptr [R11 + R13*0x1 + -0x40]
IMUL EDX,R12D
MOVSX R12D,byte ptr [R11 + R13*0x1]
IMUL R12D,EDI
ADD EDX,ESI
ADD EDX,R12D
INC R13
MOV ESI,EDX
JMP 0x0012b201
LAB_0012b23f:
VCVTSI2SS XMM1,XMM2,ESI
MOVZX EDX,word ptr [R15 + R14*0x2]
VMULSS XMM1,XMM1,dword ptr [RBX + RDX*0x4]
MOV RDX,R10
SHL RDX,0x4
ADD RDX,RSP
ADD RDX,0xc0
VFMADD213SS XMM1,XMM0,dword ptr [RDX + R14*0x4]
VMOVSS dword ptr [RDX + R14*0x4],XMM1
INC R14
ADD R9,0x4
JMP 0x0012b1f6
LAB_0012b273:
INC R10
ADD R11,0x4
JMP 0x0012b1db
LAB_0012b27f:
INC RCX
MOV R11,qword ptr [RSP + 0xb8]
ADD R11,0x10
ADD RAX,0x10
JMP 0x0012b1c6
LAB_0012b297:
MOV RDX,qword ptr [RSP + 0xa0]
INC RDX
MOV R11,qword ptr [RSP + 0xa8]
ADD R11,0x88
MOV RAX,qword ptr [RSP + 0xb0]
ADD RAX,0x48
JMP 0x0012b183
LAB_0012b2c2:
LEA RAX,[RSP + 0xc0]
MOV RCX,qword ptr [RSP + 0x38]
XOR EDX,EDX
LAB_0012b2d1:
CMP RDX,0x4
JZ 0x0012b2ff
XOR ESI,ESI
LAB_0012b2d9:
CMP RSI,0x4
JZ 0x0012b2ee
VMOVSS XMM0,dword ptr [RAX + RSI*0x4]
VMOVSS dword ptr [RCX + RSI*0x4],XMM0
INC RSI
JMP 0x0012b2d9
LAB_0012b2ee:
INC RDX
ADD RCX,qword ptr [RSP + 0x80]
ADD RAX,0x10
JMP 0x0012b2d1
LAB_0012b2ff:
MOV RCX,qword ptr [RSP + 0x40]
INC RCX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x8],RAX
ADD qword ptr [RSP + 0x38],0x10
JMP 0x0012b121
LAB_0012b321:
MOV RCX,qword ptr [RSP + 0x68]
INC RCX
MOV RAX,qword ptr [RSP + 0x58]
ADD qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x48]
ADD qword ptr [RSP + 0x18],RAX
MOV RAX,RCX
JMP 0x0012b0e1
LAB_0012b345:
ADD RSP,0x108
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012b357:
LEA RDI,[0x136948]
LEA RSI,[0x136816]
LEA RCX,[0x136cbf]
MOV EDX,0xda1
CALL 0x00108460
LAB_0012b376:
LEA RDI,[0x136bc5]
LEA RSI,[0x136816]
LEA RCX,[0x136cbf]
MOV EDX,0xda2
CALL 0x00108460
LAB_0012b395:
LEA RDI,[0x1369cb]
LEA RSI,[0x136816]
LEA RCX,[0x136cbf]
MOV EDX,0xda3
CALL 0x00108460
|
/* void ggml::cpu::aarch64::gemm<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void
const*, int, int) */
void ggml::cpu::aarch64::gemm<block_iq4_nl,4l,4l>
(int param_1,float *param_2,ulong param_3,void *param_4,void *param_5,int param_6,
int param_7)
{
uint uVar1;
int1 auVar2 [16];
int *puVar3;
uint uVar4;
long lVar5;
uint *puVar6;
long lVar7;
long lVar8;
float *pfVar9;
ulong uVar10;
ulong uVar11;
int iVar12;
long lVar13;
ulong uVar14;
long lVar15;
long lVar16;
long lVar17;
long lVar18;
long lVar19;
long lVar20;
long lVar21;
long local_130;
float *local_120;
long local_110;
float *local_100;
uint local_78 [18];
puVar3 = PTR_ggml_table_f32_f16_00145f68;
uVar4 = param_1 / 0x20;
if ((param_1 & 0x1fU) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0xda1,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
if ((param_6 & 3U) == 0) {
if ((param_7 & 3U) == 0) {
lVar15 = (long)(int)uVar4;
local_110 = (long)param_5 + 0x48;
local_120 = param_2;
for (uVar11 = 0; uVar11 != (uint)(~(param_6 >> 0x1f) & param_6 >> 2); uVar11 = uVar11 + 1) {
local_100 = local_120;
local_130 = (long)param_4 + 8;
for (uVar10 = 0; uVar10 != (uint)(~(param_7 >> 0x1f) & param_7 >> 2); uVar10 = uVar10 + 1) {
puVar6 = local_78;
for (lVar7 = 0; lVar7 != 4; lVar7 = lVar7 + 1) {
for (lVar13 = 0; lVar13 != 4; lVar13 = lVar13 + 1) {
puVar6[lVar13] = 0;
}
puVar6 = puVar6 + 4;
}
lVar7 = local_130;
lVar13 = local_110;
for (uVar14 = 0; uVar14 != (~((int)uVar4 >> 0x1f) & uVar4); uVar14 = uVar14 + 1) {
lVar5 = lVar7;
lVar19 = lVar13;
for (lVar8 = 0; lVar8 != 4; lVar8 = lVar8 + 1) {
lVar18 = lVar19;
for (lVar17 = 0; lVar17 != 4; lVar17 = lVar17 + 1) {
uVar1 = *(uint *)(puVar3 + (ulong)*(ushort *)
((long)param_5 +
lVar17 * 2 +
uVar14 * 0x88 + uVar11 * lVar15 * 0x88) * 4);
lVar16 = lVar5;
for (lVar21 = 0; lVar21 != 4; lVar21 = lVar21 + 1) {
iVar12 = 0;
for (lVar20 = 0; lVar20 != 4; lVar20 = lVar20 + 1) {
iVar12 = (int)*(char *)(lVar18 + -0x40 + lVar20) *
(int)(char)kvalues_iq4nl[*(byte *)(lVar16 + lVar20) & 0xf] + iVar12 +
(int)*(char *)(lVar18 + lVar20) *
(int)(char)kvalues_iq4nl[*(byte *)(lVar16 + lVar20) >> 4];
}
auVar2 = vfmadd213ss_fma(ZEXT416((uint)((float)iVar12 *
*(float *)(puVar3 + (ulong)*(ushort *)
((long)param_4
+ lVar21 * 2 +
uVar14 * 0x48
+ uVar10 *
lVar15 * 0x48) * 4))),ZEXT416(uVar1),
ZEXT416(local_78[lVar17 * 4 + lVar21]));
local_78[lVar17 * 4 + lVar21] = auVar2._0_4_;
lVar16 = lVar16 + 4;
}
lVar18 = lVar18 + 4;
}
lVar19 = lVar19 + 0x10;
lVar5 = lVar5 + 0x10;
}
lVar13 = lVar13 + 0x88;
lVar7 = lVar7 + 0x48;
}
puVar6 = local_78;
pfVar9 = local_100;
for (lVar7 = 0; lVar7 != 4; lVar7 = lVar7 + 1) {
for (lVar13 = 0; lVar13 != 4; lVar13 = lVar13 + 1) {
pfVar9[lVar13] = (float)puVar6[lVar13];
}
pfVar9 = pfVar9 + param_3;
puVar6 = puVar6 + 4;
}
local_130 = local_130 + lVar15 * 0x48;
local_100 = local_100 + 4;
}
local_110 = local_110 + lVar15 * 0x88;
local_120 = local_120 + param_3 * 4;
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0xda3,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
/* WARNING: Subroutine does not return */
__assert_fail("nr % 4 == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0xda2,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
|
|
65,144 |
void ggml::cpu::aarch64::gemm<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int)
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
void gemm<block_iq4_nl, 4, 4>(int n, float * s, size_t bs, const void * vx, const void * vy, int nr, int nc) {
ggml_gemm_iq4_nl_4x4_q8_0(n, s, bs, vx, vy, nr, nc);
}
|
O3
|
cpp
|
void ggml::cpu::aarch64::gemm<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void const*, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r8, 0x40(%rsp)
movq %rcx, 0x10(%rsp)
movq %rsi, 0x18(%rsp)
leal 0x1f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movq %rdi, 0x68(%rsp)
testb $0x1f, %dil
jne 0x2dd6c
testb $0x3, %r9b
jne 0x2dd8b
movl 0x120(%rsp), %ecx
movq %rcx, (%rsp)
testb $0x3, %cl
jne 0x2ddaa
sarl $0x2, %r9d
testl %r9d, %r9d
jle 0x2dd57
sarl $0x5, %eax
movq (%rsp), %rcx
sarl $0x2, %ecx
movq %rcx, (%rsp)
movq %rdx, %rcx
shlq $0x4, %rcx
movq %rcx, 0x50(%rsp)
shlq $0x2, %rdx
movslq %eax, %rcx
movl %r9d, %eax
movq %rax, 0x48(%rsp)
movl %ecx, %eax
movq %rax, 0x80(%rsp)
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
leaq (,%rcx,8), %rax
leaq (%rax,%rax,8), %rax
movq %rax, 0x58(%rsp)
movq $0x0, 0x8(%rsp)
vxorps %xmm0, %xmm0, %xmm0
leaq 0xa0(%rsp), %rsi
movq 0x1b488(%rip), %rbp # 0x48f68
vpbroadcastd 0xbc07(%rip), %xmm1 # 0x396f0
leaq 0xbc40(%rip), %r14 # 0x39730
movq %rdx, 0x60(%rsp)
cmpl $0x0, (%rsp)
jle 0x2dd35
movq 0x8(%rsp), %rax
imulq 0x38(%rsp), %rax
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rax
addq 0x40(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x70(%rsp)
movq %rdi, 0x78(%rsp)
vmovups %ymm0, 0xc0(%rsp)
vmovups %ymm0, 0xa0(%rsp)
cmpl $0x20, 0x68(%rsp)
jl 0x2dce7
movq 0x28(%rsp), %r11
movq 0x20(%rsp), %r9
xorl %eax, %eax
movq %rax, %rcx
shlq $0x7, %rcx
movq %rax, 0x90(%rsp)
leaq (%rcx,%rax,8), %rdi
addq 0x88(%rsp), %rdi
movq %r9, 0x98(%rsp)
xorl %r15d, %r15d
movq %r15, %rcx
shlq $0x4, %rcx
movq %rsi, %r13
xorl %r10d, %r10d
movzwl (%rdi,%r10,2), %ebx
vmovss (%rbp,%rbx,4), %xmm2
leaq (%rcx,%r10,4), %rbx
vpmovsxbd 0x8(%rdi,%rbx), %xmm3
vpmovsxbd 0x48(%rdi,%rbx), %xmm4
xorl %ebx, %ebx
vpmovzxbd (%r9,%rbx,4), %xmm5
vpand %xmm1, %xmm5, %xmm6
vpmovzxdq %xmm6, %ymm6 # ymm6 = xmm6[0],zero,xmm6[1],zero,xmm6[2],zero,xmm6[3],zero
vmovq %xmm6, %r8
vpextrq $0x1, %xmm6, %r12
vextracti128 $0x1, %ymm6, %xmm6
vmovq %xmm6, %rdx
vpextrq $0x1, %xmm6, %rax
movzbl (%r8,%r14), %r8d
vmovd %r8d, %xmm6
vpinsrb $0x1, (%r12,%r14), %xmm6, %xmm6
vpinsrb $0x2, (%rdx,%r14), %xmm6, %xmm6
vpinsrb $0x3, (%rax,%r14), %xmm6, %xmm6
vpmovsxbd %xmm6, %xmm6
vpmulld %xmm6, %xmm3, %xmm6
vpsrld $0x4, %xmm5, %xmm5
vpmovzxdq %xmm5, %ymm5 # ymm5 = xmm5[0],zero,xmm5[1],zero,xmm5[2],zero,xmm5[3],zero
vmovq %xmm5, %rax
vpextrq $0x1, %xmm5, %rdx
vextracti128 $0x1, %ymm5, %xmm5
vmovq %xmm5, %r8
vpextrq $0x1, %xmm5, %r12
movzbl (%rax,%r14), %eax
vmovd %eax, %xmm5
vpinsrb $0x1, (%rdx,%r14), %xmm5, %xmm5
vpinsrb $0x2, (%r8,%r14), %xmm5, %xmm5
vpinsrb $0x3, (%r12,%r14), %xmm5, %xmm5
vpmovsxbd %xmm5, %xmm5
vpmulld %xmm5, %xmm4, %xmm5
vpaddd %xmm5, %xmm6, %xmm5
vphaddd %xmm5, %xmm5, %xmm5
vphaddd %xmm5, %xmm5, %xmm5
vcvtdq2ps %xmm5, %xmm5
movzwl (%r11,%rbx,2), %eax
vmulss (%rbp,%rax,4), %xmm5, %xmm5
vfmadd213ss (%r13,%rbx,4), %xmm2, %xmm5 # xmm5 = (xmm2 * xmm5) + mem
vmovss %xmm5, (%r13,%rbx,4)
incq %rbx
cmpq $0x4, %rbx
jne 0x2dbc2
incq %r10
addq $0x10, %r13
cmpq $0x4, %r10
jne 0x2dba3
incq %r15
addq $0x10, %r9
cmpq $0x4, %r15
jne 0x2db96
movq 0x90(%rsp), %rax
incq %rax
movq 0x98(%rsp), %r9
addq $0x48, %r9
addq $0x48, %r11
cmpq 0x80(%rsp), %rax
jne 0x2db70
movq 0x78(%rsp), %rdi
movq %rdi, %rax
xorl %ecx, %ecx
movq 0x60(%rsp), %rdx
vmovups 0xa0(%rsp,%rcx), %xmm2
vmovups %xmm2, (%rax)
addq $0x10, %rcx
addq %rdx, %rax
cmpq $0x40, %rcx
jne 0x2dcf6
movq 0x70(%rsp), %rcx
incq %rcx
movq 0x58(%rsp), %rax
addq %rax, 0x20(%rsp)
addq %rax, 0x28(%rsp)
addq $0x10, %rdi
cmpq (%rsp), %rcx
jne 0x2db3d
movq 0x8(%rsp), %rcx
incq %rcx
movq 0x50(%rsp), %rax
addq %rax, 0x18(%rsp)
movq %rcx, 0x8(%rsp)
cmpq 0x48(%rsp), %rcx
jne 0x2daf5
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
leaq 0xbccf(%rip), %rdi # 0x39a42
leaq 0xbb96(%rip), %rsi # 0x39910
leaq 0xc038(%rip), %rcx # 0x39db9
movl $0xda1, %edx # imm = 0xDA1
callq 0x83b0
leaq 0xbf2d(%rip), %rdi # 0x39cbf
leaq 0xbb77(%rip), %rsi # 0x39910
leaq 0xc019(%rip), %rcx # 0x39db9
movl $0xda2, %edx # imm = 0xDA2
callq 0x83b0
leaq 0xbd14(%rip), %rdi # 0x39ac5
leaq 0xbb58(%rip), %rsi # 0x39910
leaq 0xbffa(%rip), %rcx # 0x39db9
movl $0xda3, %edx # imm = 0xDA3
callq 0x83b0
|
_ZN4ggml3cpu7aarch644gemmI12block_iq4_nlLl4ELl4EEEviPfmPKvS6_ii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_D8], r8
mov [rsp+118h+var_108], rcx
mov [rsp+118h+var_100], rsi
lea eax, [rdi+1Fh]
test edi, edi
cmovns eax, edi
mov [rsp+118h+var_B0], rdi
test dil, 1Fh
jnz loc_2DD6C
test r9b, 3
jnz loc_2DD8B
mov ecx, [rsp+118h+arg_0]
mov [rsp+118h+var_118], rcx
test cl, 3
jnz loc_2DDAA
sar r9d, 2
test r9d, r9d
jle loc_2DD57
sar eax, 5
mov rcx, [rsp+118h+var_118]
sar ecx, 2
mov [rsp+118h+var_118], rcx
mov rcx, rdx
shl rcx, 4
mov [rsp+118h+var_C8], rcx
shl rdx, 2
movsxd rcx, eax
mov eax, r9d
mov [rsp+118h+var_D0], rax
mov eax, ecx
mov [rsp+118h+var_98], rax
mov rax, [rsp+118h+var_108]
add rax, 8
mov [rsp+118h+var_E8], rax
mov [rsp+118h+var_E0], rcx
lea rax, ds:0[rcx*8]
lea rax, [rax+rax*8]
mov [rsp+118h+var_C0], rax
mov [rsp+118h+var_110], 0
vxorps xmm0, xmm0, xmm0
lea rsi, [rsp+118h+var_78]
mov rbp, cs:ggml_table_f32_f16_ptr
vpbroadcastd xmm1, cs:dword_396F0
lea r14, kvalues_iq4nl
mov [rsp+118h+var_B8], rdx
loc_2DAF5:
cmp dword ptr [rsp+118h+var_118], 0
jle loc_2DD35
mov rax, [rsp+118h+var_110]
imul rax, [rsp+118h+var_E0]
mov rcx, rax
shl rcx, 7
lea rax, [rcx+rax*8]
add rax, [rsp+118h+var_D8]
mov [rsp+118h+var_90], rax
mov rdi, [rsp+118h+var_100]
mov rax, [rsp+118h+var_108]
mov [rsp+118h+var_F0], rax
mov rax, [rsp+118h+var_E8]
mov [rsp+118h+var_F8], rax
xor ecx, ecx
loc_2DB3D:
mov [rsp+118h+var_A8], rcx
mov [rsp+118h+var_A0], rdi
vmovups [rsp+118h+var_58], ymm0
vmovups [rsp+118h+var_78], ymm0
cmp dword ptr [rsp+118h+var_B0], 20h ; ' '
jl loc_2DCE7
mov r11, [rsp+118h+var_F0]
mov r9, [rsp+118h+var_F8]
xor eax, eax
loc_2DB70:
mov rcx, rax
shl rcx, 7
mov [rsp+118h+var_88], rax
lea rdi, [rcx+rax*8]
add rdi, [rsp+118h+var_90]
mov [rsp+118h+var_80], r9
xor r15d, r15d
loc_2DB96:
mov rcx, r15
shl rcx, 4
mov r13, rsi
xor r10d, r10d
loc_2DBA3:
movzx ebx, word ptr [rdi+r10*2]
vmovss xmm2, dword ptr [rbp+rbx*4+0]
lea rbx, [rcx+r10*4]
vpmovsxbd xmm3, dword ptr [rdi+rbx+8]
vpmovsxbd xmm4, dword ptr [rdi+rbx+48h]
xor ebx, ebx
loc_2DBC2:
vpmovzxbd xmm5, dword ptr [r9+rbx*4]
vpand xmm6, xmm5, xmm1
vpmovzxdq ymm6, xmm6
vmovq r8, xmm6
vpextrq r12, xmm6, 1
vextracti128 xmm6, ymm6, 1
vmovq rdx, xmm6
vpextrq rax, xmm6, 1
movzx r8d, byte ptr [r8+r14]
vmovd xmm6, r8d
vpinsrb xmm6, xmm6, byte ptr [r12+r14], 1
vpinsrb xmm6, xmm6, byte ptr [rdx+r14], 2
vpinsrb xmm6, xmm6, byte ptr [rax+r14], 3
vpmovsxbd xmm6, xmm6
vpmulld xmm6, xmm3, xmm6
vpsrld xmm5, xmm5, 4
vpmovzxdq ymm5, xmm5
vmovq rax, xmm5
vpextrq rdx, xmm5, 1
vextracti128 xmm5, ymm5, 1
vmovq r8, xmm5
vpextrq r12, xmm5, 1
movzx eax, byte ptr [rax+r14]
vmovd xmm5, eax
vpinsrb xmm5, xmm5, byte ptr [rdx+r14], 1
vpinsrb xmm5, xmm5, byte ptr [r8+r14], 2
vpinsrb xmm5, xmm5, byte ptr [r12+r14], 3
vpmovsxbd xmm5, xmm5
vpmulld xmm5, xmm4, xmm5
vpaddd xmm5, xmm6, xmm5
vphaddd xmm5, xmm5, xmm5
vphaddd xmm5, xmm5, xmm5
vcvtdq2ps xmm5, xmm5
movzx eax, word ptr [r11+rbx*2]
vmulss xmm5, xmm5, dword ptr [rbp+rax*4+0]
vfmadd213ss xmm5, xmm2, dword ptr [r13+rbx*4+0]
vmovss dword ptr [r13+rbx*4+0], xmm5
inc rbx
cmp rbx, 4
jnz loc_2DBC2
inc r10
add r13, 10h
cmp r10, 4
jnz loc_2DBA3
inc r15
add r9, 10h
cmp r15, 4
jnz loc_2DB96
mov rax, [rsp+118h+var_88]
inc rax
mov r9, [rsp+118h+var_80]
add r9, 48h ; 'H'
add r11, 48h ; 'H'
cmp rax, [rsp+118h+var_98]
jnz loc_2DB70
loc_2DCE7:
mov rdi, [rsp+118h+var_A0]
mov rax, rdi
xor ecx, ecx
mov rdx, [rsp+118h+var_B8]
loc_2DCF6:
vmovups xmm2, xmmword ptr [rsp+rcx+118h+var_78]
vmovups xmmword ptr [rax], xmm2
add rcx, 10h
add rax, rdx
cmp rcx, 40h ; '@'
jnz short loc_2DCF6
mov rcx, [rsp+118h+var_A8]
inc rcx
mov rax, [rsp+118h+var_C0]
add [rsp+118h+var_F8], rax
add [rsp+118h+var_F0], rax
add rdi, 10h
cmp rcx, [rsp+118h+var_118]
jnz loc_2DB3D
loc_2DD35:
mov rcx, [rsp+118h+var_110]
inc rcx
mov rax, [rsp+118h+var_C8]
add [rsp+118h+var_100], rax
mov [rsp+118h+var_110], rcx
cmp rcx, [rsp+118h+var_D0]
jnz loc_2DAF5
loc_2DD57:
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
loc_2DD6C:
lea rdi, aNQk0; "n % qk == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmIq; "void ggml_gemm_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 0DA1h
call ___assert_fail
loc_2DD8B:
lea rdi, aNr40; "nr % 4 == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmIq; "void ggml_gemm_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 0DA2h
call ___assert_fail
loc_2DDAA:
lea rdi, aNcNcolsInterle; "nc % ncols_interleaved == 0"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlGemmIq; "void ggml_gemm_iq4_nl_4x4_q8_0(int, flo"...
mov edx, 0DA3h
call ___assert_fail
|
long long ggml::cpu::aarch64::gemm<block_iq4_nl,4l,4l>(
int a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
__m128 _XMM0,
int a8)
{
long long result; // rax
int v10; // r9d
long long v14; // rdi
long long v15; // rcx
long long v16; // r11
long long v18; // rax
long long i; // r15
long long j; // r10
long long v65; // [rsp+0h] [rbp-118h]
long long v66; // [rsp+8h] [rbp-110h]
long long v69; // [rsp+20h] [rbp-F8h]
long long v70; // [rsp+28h] [rbp-F0h]
long long v71; // [rsp+30h] [rbp-E8h]
long long v72; // [rsp+38h] [rbp-E0h]
long long v74; // [rsp+48h] [rbp-D0h]
long long v75; // [rsp+50h] [rbp-C8h]
long long v76; // [rsp+58h] [rbp-C0h]
long long v77; // [rsp+60h] [rbp-B8h]
long long v79; // [rsp+70h] [rbp-A8h]
long long v80; // [rsp+78h] [rbp-A0h]
long long v81; // [rsp+80h] [rbp-98h]
long long v82; // [rsp+90h] [rbp-88h]
long long v83; // [rsp+98h] [rbp-80h]
__m256 v84; // [rsp+A0h] [rbp-78h] BYREF
result = (unsigned int)(a1 + 31);
if ( a1 >= 0 )
result = (unsigned int)a1;
if ( (a1 & 0x1F) != 0 )
__assert_fail(
"n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3489LL,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a6 & 3) != 0 )
__assert_fail(
"nr % 4 == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp",
3490LL,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)");
if ( (a8 & 3) != 0 )
__assert_fail(
"nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp");
v10 = a6 >> 2;
if ( v10 > 0 )
{
v65 = (unsigned int)(a8 >> 2);
v75 = 16 * a3;
v74 = (unsigned int)v10;
v81 = (unsigned int)((int)result >> 5);
v71 = a4 + 8;
v72 = (int)result >> 5;
v76 = 72 * v72;
v66 = 0LL;
__asm { vxorps xmm0, xmm0, xmm0 }
_RBP = &ggml_table_f32_f16;
__asm { vpbroadcastd xmm1, cs:dword_396F0 }
v77 = 4 * a3;
do
{
if ( (int)v65 > 0 )
{
v14 = a2;
v70 = a4;
v69 = v71;
v15 = 0LL;
do
{
v79 = v15;
v80 = v14;
__asm
{
vmovups [rsp+118h+var_58], ymm0
vmovups [rsp+118h+var_78], ymm0
}
if ( a1 >= 32 )
{
v16 = v70;
_R9 = v69;
v18 = 0LL;
do
{
v82 = v18;
_RDI = a5 + 136 * v72 * v66 + 136 * v18;
v83 = _R9;
for ( i = 0LL; i != 4; ++i )
{
_R13 = &v84;
for ( j = 0LL; j != 4; ++j )
{
_RBX = *(unsigned __int16 *)(_RDI + 2 * j);
__asm { vmovss xmm2, dword ptr [rbp+rbx*4+0] }
_RBX = 16 * i + 4 * j;
__asm
{
vpmovsxbd xmm3, dword ptr [rdi+rbx+8]
vpmovsxbd xmm4, dword ptr [rdi+rbx+48h]
}
for ( _RBX = 0LL; _RBX != 4; ++_RBX )
{
__asm
{
vpmovzxbd xmm5, dword ptr [r9+rbx*4]
vpand xmm6, xmm5, xmm1
vpmovzxdq ymm6, xmm6
vmovq r8, xmm6
vpextrq r12, xmm6, 1
vextracti128 xmm6, ymm6, 1
vmovq rdx, xmm6
vpextrq rax, xmm6, 1
}
LODWORD(_R8) = *((unsigned __int8 *)&kvalues_iq4nl + _R8);
__asm
{
vmovd xmm6, r8d
vpinsrb xmm6, xmm6, byte ptr [r12+r14], 1
vpinsrb xmm6, xmm6, byte ptr [rdx+r14], 2
vpinsrb xmm6, xmm6, byte ptr [rax+r14], 3
vpmovsxbd xmm6, xmm6
vpmulld xmm6, xmm3, xmm6
vpsrld xmm5, xmm5, 4
vpmovzxdq ymm5, xmm5
vmovq rax, xmm5
vpextrq rdx, xmm5, 1
vextracti128 xmm5, ymm5, 1
vmovq r8, xmm5
vpextrq r12, xmm5, 1
}
LODWORD(_RAX) = *((unsigned __int8 *)&kvalues_iq4nl + _RAX);
__asm
{
vmovd xmm5, eax
vpinsrb xmm5, xmm5, byte ptr [rdx+r14], 1
vpinsrb xmm5, xmm5, byte ptr [r8+r14], 2
vpinsrb xmm5, xmm5, byte ptr [r12+r14], 3
vpmovsxbd xmm5, xmm5
vpmulld xmm5, xmm4, xmm5
vpaddd xmm5, xmm6, xmm5
vphaddd xmm5, xmm5, xmm5
vphaddd xmm5, xmm5, xmm5
vcvtdq2ps xmm5, xmm5
vmulss xmm5, xmm5, dword ptr [rbp+rax*4+0]
vfmadd213ss xmm5, xmm2, dword ptr [r13+rbx*4+0]
vmovss dword ptr [r13+rbx*4+0], xmm5
}
}
_R13 = (__m256 *)((char *)_R13 + 16);
}
_R9 += 16LL;
}
v18 = v82 + 1;
_R9 = v83 + 72;
v16 += 72LL;
}
while ( v82 + 1 != v81 );
}
_RAX = v80;
for ( _RCX = 0LL; _RCX != 64; _RCX += 16LL )
{
__asm
{
vmovups xmm2, xmmword ptr [rsp+rcx+118h+var_78]
vmovups xmmword ptr [rax], xmm2
}
_RAX += v77;
}
v15 = v79 + 1;
v69 += v76;
v70 += v76;
v14 = v80 + 16;
}
while ( v79 + 1 != v65 );
}
result = v75;
a2 += v75;
++v66;
}
while ( v66 != v74 );
}
__asm { vzeroupper }
return result;
}
|
gemm<block_iq4_nl,4l,4l>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x40],R8
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],RSI
LEA EAX,[RDI + 0x1f]
TEST EDI,EDI
CMOVNS EAX,EDI
MOV qword ptr [RSP + 0x68],RDI
TEST DIL,0x1f
JNZ 0x0012dd6c
TEST R9B,0x3
JNZ 0x0012dd8b
MOV ECX,dword ptr [RSP + 0x120]
MOV qword ptr [RSP],RCX
TEST CL,0x3
JNZ 0x0012ddaa
SAR R9D,0x2
TEST R9D,R9D
JLE 0x0012dd57
SAR EAX,0x5
MOV RCX,qword ptr [RSP]
SAR ECX,0x2
MOV qword ptr [RSP],RCX
MOV RCX,RDX
SHL RCX,0x4
MOV qword ptr [RSP + 0x50],RCX
SHL RDX,0x2
MOVSXD RCX,EAX
MOV EAX,R9D
MOV qword ptr [RSP + 0x48],RAX
MOV EAX,ECX
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x8
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RCX
LEA RAX,[RCX*0x8]
LEA RAX,[RAX + RAX*0x8]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x8],0x0
VXORPS XMM0,XMM0,XMM0
LEA RSI,[RSP + 0xa0]
MOV RBP,qword ptr [0x00148f68]
VPBROADCASTD XMM1,dword ptr [0x001396f0]
LEA R14,[0x139730]
MOV qword ptr [RSP + 0x60],RDX
LAB_0012daf5:
CMP dword ptr [RSP],0x0
JLE 0x0012dd35
MOV RAX,qword ptr [RSP + 0x8]
IMUL RAX,qword ptr [RSP + 0x38]
MOV RCX,RAX
SHL RCX,0x7
LEA RAX,[RCX + RAX*0x8]
ADD RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
XOR ECX,ECX
LAB_0012db3d:
MOV qword ptr [RSP + 0x70],RCX
MOV qword ptr [RSP + 0x78],RDI
VMOVUPS ymmword ptr [RSP + 0xc0],YMM0
VMOVUPS ymmword ptr [RSP + 0xa0],YMM0
CMP dword ptr [RSP + 0x68],0x20
JL 0x0012dce7
MOV R11,qword ptr [RSP + 0x28]
MOV R9,qword ptr [RSP + 0x20]
XOR EAX,EAX
LAB_0012db70:
MOV RCX,RAX
SHL RCX,0x7
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RCX + RAX*0x8]
ADD RDI,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x98],R9
XOR R15D,R15D
LAB_0012db96:
MOV RCX,R15
SHL RCX,0x4
MOV R13,RSI
XOR R10D,R10D
LAB_0012dba3:
MOVZX EBX,word ptr [RDI + R10*0x2]
VMOVSS XMM2,dword ptr [RBP + RBX*0x4]
LEA RBX,[RCX + R10*0x4]
VPMOVSXBD XMM3,dword ptr [RDI + RBX*0x1 + 0x8]
VPMOVSXBD XMM4,dword ptr [RDI + RBX*0x1 + 0x48]
XOR EBX,EBX
LAB_0012dbc2:
VPMOVZXBD XMM5,dword ptr [R9 + RBX*0x4]
VPAND XMM6,XMM5,XMM1
VPMOVZXDQ YMM6,XMM6
VMOVQ R8,XMM6
VPEXTRQ R12,XMM6,0x1
VEXTRACTI128 XMM6,YMM6,0x1
VMOVQ RDX,XMM6
VPEXTRQ RAX,XMM6,0x1
MOVZX R8D,byte ptr [R8 + R14*0x1]
VMOVD XMM6,R8D
VPINSRB XMM6,XMM6,byte ptr [R12 + R14*0x1],0x1
VPINSRB XMM6,XMM6,byte ptr [RDX + R14*0x1],0x2
VPINSRB XMM6,XMM6,byte ptr [RAX + R14*0x1],0x3
VPMOVSXBD XMM6,XMM6
VPMULLD XMM6,XMM3,XMM6
VPSRLD XMM5,XMM5,0x4
VPMOVZXDQ YMM5,XMM5
VMOVQ RAX,XMM5
VPEXTRQ RDX,XMM5,0x1
VEXTRACTI128 XMM5,YMM5,0x1
VMOVQ R8,XMM5
VPEXTRQ R12,XMM5,0x1
MOVZX EAX,byte ptr [RAX + R14*0x1]
VMOVD XMM5,EAX
VPINSRB XMM5,XMM5,byte ptr [RDX + R14*0x1],0x1
VPINSRB XMM5,XMM5,byte ptr [R8 + R14*0x1],0x2
VPINSRB XMM5,XMM5,byte ptr [R12 + R14*0x1],0x3
VPMOVSXBD XMM5,XMM5
VPMULLD XMM5,XMM4,XMM5
VPADDD XMM5,XMM6,XMM5
VPHADDD XMM5,XMM5,XMM5
VPHADDD XMM5,XMM5,XMM5
VCVTDQ2PS XMM5,XMM5
MOVZX EAX,word ptr [R11 + RBX*0x2]
VMULSS XMM5,XMM5,dword ptr [RBP + RAX*0x4]
VFMADD213SS XMM5,XMM2,dword ptr [R13 + RBX*0x4]
VMOVSS dword ptr [R13 + RBX*0x4],XMM5
INC RBX
CMP RBX,0x4
JNZ 0x0012dbc2
INC R10
ADD R13,0x10
CMP R10,0x4
JNZ 0x0012dba3
INC R15
ADD R9,0x10
CMP R15,0x4
JNZ 0x0012db96
MOV RAX,qword ptr [RSP + 0x90]
INC RAX
MOV R9,qword ptr [RSP + 0x98]
ADD R9,0x48
ADD R11,0x48
CMP RAX,qword ptr [RSP + 0x80]
JNZ 0x0012db70
LAB_0012dce7:
MOV RDI,qword ptr [RSP + 0x78]
MOV RAX,RDI
XOR ECX,ECX
MOV RDX,qword ptr [RSP + 0x60]
LAB_0012dcf6:
VMOVUPS XMM2,xmmword ptr [RSP + RCX*0x1 + 0xa0]
VMOVUPS xmmword ptr [RAX],XMM2
ADD RCX,0x10
ADD RAX,RDX
CMP RCX,0x40
JNZ 0x0012dcf6
MOV RCX,qword ptr [RSP + 0x70]
INC RCX
MOV RAX,qword ptr [RSP + 0x58]
ADD qword ptr [RSP + 0x20],RAX
ADD qword ptr [RSP + 0x28],RAX
ADD RDI,0x10
CMP RCX,qword ptr [RSP]
JNZ 0x0012db3d
LAB_0012dd35:
MOV RCX,qword ptr [RSP + 0x8]
INC RCX
MOV RAX,qword ptr [RSP + 0x50]
ADD qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x8],RCX
CMP RCX,qword ptr [RSP + 0x48]
JNZ 0x0012daf5
LAB_0012dd57:
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
LAB_0012dd6c:
LEA RDI,[0x139a42]
LEA RSI,[0x139910]
LEA RCX,[0x139db9]
MOV EDX,0xda1
CALL 0x001083b0
LAB_0012dd8b:
LEA RDI,[0x139cbf]
LEA RSI,[0x139910]
LEA RCX,[0x139db9]
MOV EDX,0xda2
CALL 0x001083b0
LAB_0012ddaa:
LEA RDI,[0x139ac5]
LEA RSI,[0x139910]
LEA RCX,[0x139db9]
MOV EDX,0xda3
CALL 0x001083b0
|
/* void ggml::cpu::aarch64::gemm<block_iq4_nl, 4l, 4l>(int, float*, unsigned long, void const*, void
const*, int, int) */
void ggml::cpu::aarch64::gemm<block_iq4_nl,4l,4l>
(int param_1,float *param_2,ulong param_3,void *param_4,void *param_5,int param_6,
int param_7)
{
uint uVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [32];
long lVar7;
int8 uVar8;
long lVar9;
int *puVar10;
int iVar11;
uint uVar12;
long lVar13;
ulong uVar14;
float *pfVar15;
ulong uVar16;
long lVar17;
float *pfVar18;
long lVar19;
long lVar20;
long lVar21;
void *pvVar22;
long lVar23;
int8 *puVar24;
long lVar25;
int1 auVar26 [16];
int1 auVar27 [16];
ulong local_110;
float *local_100;
long local_f8;
void *local_f0;
int8 local_78 [9];
puVar10 = PTR_ggml_table_f32_f16_00148f68;
iVar11 = param_1 + 0x1f;
if (-1 < param_1) {
iVar11 = param_1;
}
if ((param_1 & 0x1fU) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("n % qk == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0xda1,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
if ((param_6 & 3U) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("nr % 4 == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0xda2,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
if ((param_7 & 3U) != 0) {
/* WARNING: Subroutine does not return */
__assert_fail("nc % ncols_interleaved == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp"
,0xda3,
"void ggml_gemm_iq4_nl_4x4_q8_0(int, float *__restrict, size_t, const void *__restrict, const void *__restrict, int, int)"
);
}
if (0 < param_6 >> 2) {
uVar12 = iVar11 >> 5;
lVar7 = (long)(int)uVar12 * 0x48;
local_110 = 0;
auVar26._4_4_ = DAT_001396f0;
auVar26._0_4_ = DAT_001396f0;
auVar26._8_4_ = DAT_001396f0;
auVar26._12_4_ = DAT_001396f0;
local_100 = param_2;
do {
if (0 < param_7 >> 2) {
uVar16 = 0;
pfVar18 = local_100;
local_f8 = (long)param_4 + 8;
local_f0 = param_4;
do {
local_78[4] = 0;
local_78[5] = 0;
local_78[6] = 0;
local_78[7] = 0;
local_78[0] = 0;
local_78[1] = 0;
local_78[2] = 0;
local_78[3] = 0;
if (0x1f < param_1) {
uVar14 = 0;
lVar20 = local_f8;
pvVar22 = local_f0;
do {
lVar9 = uVar14 * 0x88 + local_110 * (long)(int)uVar12 * 0x88;
lVar25 = 0;
lVar19 = lVar20;
do {
lVar21 = 0;
puVar24 = local_78;
do {
uVar1 = *(uint *)(puVar10 +
(ulong)*(ushort *)((long)param_5 + lVar21 * 2 + lVar9) * 4);
lVar17 = lVar25 * 0x10 + lVar21 * 4;
auVar2 = vpmovsxbd_avx(ZEXT416(*(uint *)((long)param_5 + lVar17 + lVar9 + 8)));
auVar3 = vpmovsxbd_avx(ZEXT416(*(uint *)((long)param_5 + lVar17 + lVar9 + 0x48)));
lVar17 = 0;
do {
auVar4 = vpmovzxbd_avx(ZEXT416(*(uint *)(lVar19 + lVar17 * 4)));
auVar27 = vpand_avx(auVar4,auVar26);
auVar6 = vpmovzxdq_avx2(auVar27);
lVar23 = vpextrq_avx(auVar6._0_16_,1);
lVar13 = vpextrq_avx(auVar6._16_16_,1);
auVar27 = vpinsrb_avx(ZEXT116((byte)kvalues_iq4nl[auVar6._0_8_]),
(uint)(byte)kvalues_iq4nl[lVar23],1);
auVar27 = vpinsrb_avx(auVar27,(uint)(byte)kvalues_iq4nl[auVar6._16_8_],2);
auVar27 = vpinsrb_avx(auVar27,(uint)(byte)kvalues_iq4nl[lVar13],3);
auVar27 = vpmovsxbd_avx(auVar27);
auVar5 = vpmulld_avx(auVar2,auVar27);
auVar27 = vpsrld_avx(auVar4,4);
auVar6 = vpmovzxdq_avx2(auVar27);
lVar13 = vpextrq_avx(auVar6._0_16_,1);
lVar23 = vpextrq_avx(auVar6._16_16_,1);
auVar27 = vpinsrb_avx(ZEXT116((byte)kvalues_iq4nl[auVar6._0_8_]),
(uint)(byte)kvalues_iq4nl[lVar13],1);
auVar27 = vpinsrb_avx(auVar27,(uint)(byte)kvalues_iq4nl[auVar6._16_8_],2);
auVar27 = vpinsrb_avx(auVar27,(uint)(byte)kvalues_iq4nl[lVar23],3);
auVar27 = vpmovsxbd_avx(auVar27);
auVar27 = vpmulld_avx(auVar3,auVar27);
auVar27 = vpaddd_avx(auVar5,auVar27);
auVar27 = vphaddd_avx(auVar27,auVar27);
auVar27 = vphaddd_avx(auVar27,auVar27);
auVar27 = vcvtdq2ps_avx(auVar27);
auVar27 = vfmadd213ss_fma(ZEXT416((uint)(auVar27._0_4_ *
*(float *)(puVar10 +
(ulong)*(ushort *)
((long)pvVar22 +
lVar17 * 2) * 4))),
ZEXT416(uVar1),
ZEXT416(*(uint *)((long)puVar24 + lVar17 * 4)));
*(int *)((long)puVar24 + lVar17 * 4) = auVar27._0_4_;
lVar17 = lVar17 + 1;
} while (lVar17 != 4);
lVar21 = lVar21 + 1;
puVar24 = puVar24 + 2;
} while (lVar21 != 4);
lVar25 = lVar25 + 1;
lVar19 = lVar19 + 0x10;
} while (lVar25 != 4);
uVar14 = uVar14 + 1;
lVar20 = lVar20 + 0x48;
pvVar22 = (void *)((long)pvVar22 + 0x48);
} while (uVar14 != uVar12);
}
lVar20 = 0;
pfVar15 = pfVar18;
do {
uVar8 = *(int8 *)((long)local_78 + lVar20 + 8);
*(int8 *)pfVar15 = *(int8 *)((long)local_78 + lVar20);
*(int8 *)(pfVar15 + 2) = uVar8;
lVar20 = lVar20 + 0x10;
pfVar15 = pfVar15 + param_3;
} while (lVar20 != 0x40);
uVar16 = uVar16 + 1;
local_f8 = local_f8 + lVar7;
local_f0 = (void *)((long)local_f0 + lVar7);
pfVar18 = pfVar18 + 4;
} while (uVar16 != (uint)(param_7 >> 2));
}
local_110 = local_110 + 1;
local_100 = local_100 + param_3 * 4;
} while (local_110 != (uint)(param_6 >> 2));
}
return;
}
|
|
65,145 |
corofx::handler_impl<yield, print_elems()::$_0>::handle(yield&&, corofx::resumer<yield>&)
|
corofx/include/corofx/handler.hpp
|
[[nodiscard]]
auto handle(E&& eff, resumer<E>& resume) noexcept -> frame<> final {
auto task = fn_(std::move(eff), resume);
auto& p = task.frame_->promise();
p.set_cont(cont_);
if constexpr (not std::is_void_v<value_type>) p.set_output(*output_);
task_type::effect_types::apply(
[&]<effect... Es>() { (p.set_handler(ev_vec_.template get_handler<Es>()), ...); });
return std::move(task);
}
|
O3
|
cpp
|
corofx::handler_impl<yield, print_elems()::$_0>::handle(yield&&, corofx::resumer<yield>&):
endbr64
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl $0x38, %edi
callq 0x1210
leaq 0x146(%rip), %rcx # 0x16e8
movq %rcx, (%rax)
leaq 0x1e4(%rip), %rcx # 0x1790
movq %rcx, 0x8(%rax)
movq %r12, 0x28(%rax)
movq %r15, 0x20(%rax)
movb $0x0, 0x30(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
endbr64
movq %rax, %rdi
callq 0x1a77
|
_ZN6corofx12handler_implI5yieldZ11print_elemsvE3$_0E6handleEOS1_RNS_7resumerIS1_EE:
endbr64
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r12, rcx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, _ZZ11print_elemsvENK3$_0clI5yieldRN6corofx7resumerIS1_EEEENS2_4taskIvJEEEOT_OT0__resume
mov [rax], rcx
lea rcx, _ZZ11print_elemsvENK3$_0clI5yieldRN6corofx7resumerIS1_EEEENS2_4taskIvJEEEOT_OT0__destroy
mov [rax+8], rcx
mov [rax+28h], r12
mov [rax+20h], r15
mov byte ptr [rax+30h], 0
mov rcx, [r14+10h]
mov [rax+10h], rcx
mov [rbx], rax
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
endbr64
mov rdi, rax
call __clang_call_terminate
|
_QWORD * corofx::handler_impl<yield,print_elems(void)::$_0>::handle(
_QWORD *a1,
long long a2,
long long a3,
long long a4)
{
long long v6; // rax
v6 = operator new(0x38uLL);
*(_QWORD *)v6 = print_elems(void)::$_0::operator()<yield,corofx::resumer<yield> &>;
*(_QWORD *)(v6 + 8) = print_elems(void)::$_0::operator()<yield,corofx::resumer<yield> &>;
*(_QWORD *)(v6 + 40) = a4;
*(_QWORD *)(v6 + 32) = a3;
*(_BYTE *)(v6 + 48) = 0;
*(_QWORD *)(v6 + 16) = *(_QWORD *)(a2 + 16);
*a1 = v6;
return a1;
}
|
handle:
ENDBR64
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R12,RCX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LAB_00101591:
MOV EDI,0x38
CALL 0x00101210
LEA RCX,[0x1016e8]
MOV qword ptr [RAX],RCX
LEA RCX,[0x101790]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x28],R12
MOV qword ptr [RAX + 0x20],R15
MOV byte ptr [RAX + 0x30],0x0
MOV RCX,qword ptr [R14 + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RBX],RAX
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* corofx::handler_impl<yield, print_elems()::$_0>::handle(yield&&, corofx::resumer<yield>&) */
yield * corofx::handler_impl<yield,print_elems()::$_0>::handle(yield *param_1,resumer *param_2)
{
int8 *puVar1;
int8 in_RCX;
int8 in_RDX;
/* try { // try from 00101591 to 0010159a has its CatchHandler @ 001015d3 */
puVar1 = (int8 *)operator_new(0x38);
*puVar1 = print_elems()::$_0::operator();
puVar1[1] = print_elems()::$_0::operator();
puVar1[5] = in_RCX;
puVar1[4] = in_RDX;
*(int1 *)(puVar1 + 6) = 0;
puVar1[2] = *(int8 *)(param_2 + 0x10);
*(int8 **)param_1 = puVar1;
return param_1;
}
|
|
65,146 |
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) {
std::vector<std::string> rules;
for (size_t i = 0; i < alt_schemas.size(); i++) {
rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i)));
}
return string_join(rules, " | ");
}
|
O2
|
cpp
|
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r14
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%r14), %rbx
movq 0x8(%r14), %rax
subq %rbx, %rax
sarq $0x4, %rax
cmpq %rax, %rbp
jae 0x91161
movq 0x18(%rsp), %rsi
cmpq $0x0, 0x8(%rsi)
leaq 0x1f14d(%rip), %rdx # 0xb0219
leaq 0x28030(%rip), %rax # 0xb9103
cmoveq %rax, %rdx
leaq 0x58(%rsp), %rdi
callq 0x27794
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x42493
leaq 0x98(%rsp), %r15
movq %r15, %rdi
leaq 0x58(%rsp), %rsi
movq %r12, %rdx
callq 0x39f53
addq %r13, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x8f200
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x3b5a4
movq %r12, %rdi
callq 0x24208
movq %r15, %rdi
callq 0x24208
leaq 0x78(%rsp), %rdi
callq 0x24208
leaq 0x58(%rsp), %rdi
callq 0x24208
incq %rbp
addq $0x10, %r13
jmp 0x910a4
leaq 0x28152(%rip), %rsi # 0xb92ba
leaq 0x38(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x26cb4
leaq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5467a
leaq 0x38(%rsp), %rdi
callq 0x24208
leaq 0x20(%rsp), %rdi
callq 0x26d2a
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x911fe
jmp 0x91205
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x24208
jmp 0x911d8
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x24208
jmp 0x911ef
movq %rax, %rbx
jmp 0x911f9
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x24208
leaq 0x58(%rsp), %rdi
callq 0x24208
jmp 0x91208
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x26d2a
movq %rbx, %rdi
callq 0x23fc0
|
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rcx
mov [rsp+0E8h+var_D0], rdx
mov [rsp+0E8h+var_D8], rsi
mov [rsp+0E8h+var_E0], rdi
xorps xmm0, xmm0
lea rax, [rsp+0E8h+var_C8]
movaps xmmword ptr [rax], xmm0
and qword ptr [rax+10h], 0
xor r13d, r13d
xor ebp, ebp
loc_910A4:
mov rbx, [r14]
mov rax, [r14+8]
sub rax, rbx
sar rax, 4
cmp rbp, rax
jnb loc_91161
mov rsi, [rsp+0E8h+var_D0]
cmp qword ptr [rsi+8], 0
lea rdx, asc_B0218+1; "-"
lea rax, aAlternative; "alternative-"
cmovz rdx, rax
lea rdi, [rsp+0E8h+var_90]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea r12, [rsp+0E8h+var_70]
mov rdi, r12; this
mov rsi, rbp; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea r15, [rsp+0E8h+var_50]
mov rdi, r15
lea rsi, [rsp+0E8h+var_90]
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
add rbx, r13
lea r12, [rsp+0E8h+var_B0]
mov rdi, r12
mov rsi, [rsp+0E8h+var_D8]
mov rdx, rbx
mov rcx, r15
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::string const&)
lea rdi, [rsp+0E8h+var_C8]
mov rsi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
inc rbp
add r13, 10h
jmp loc_910A4
loc_91161:
lea rsi, asc_B92B9+1; " | "
lea rdi, [rsp+0E8h+var_B0]
lea rdx, [rsp+0E8h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, [rsp+0E8h+var_C8]
lea rdx, [rsp+0E8h+var_B0]
mov rbx, [rsp+0E8h+var_E0]
mov rdi, rbx
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rdi, [rsp+0E8h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_C8]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_30]
jmp short loc_911FE
jmp short loc_91205
mov rbx, rax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_911D8
mov rbx, rax
loc_911D8:
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_911EF
mov rbx, rax
jmp short loc_911F9
mov rbx, rax
loc_911EF:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_911F9:
lea rdi, [rsp+arg_50]; void *
loc_911FE:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_91208
loc_91205:
mov rbx, rax
loc_91208:
lea rdi, [rsp+arg_18]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
long long SchemaConverter::_generate_union_rule(long long a1, long long a2, long long a3, long long *a4)
{
long long v5; // r13
unsigned long long i; // rbp
long long v7; // rbx
char *v8; // rdx
__int128 v11; // [rsp+20h] [rbp-C8h] BYREF
long long v12; // [rsp+30h] [rbp-B8h]
_QWORD v13[4]; // [rsp+38h] [rbp-B0h] BYREF
_QWORD v14[4]; // [rsp+58h] [rbp-90h] BYREF
_QWORD v15[4]; // [rsp+78h] [rbp-70h] BYREF
_BYTE v16[80]; // [rsp+98h] [rbp-50h] BYREF
v11 = 0LL;
v12 = 0LL;
v5 = 0LL;
for ( i = 0LL; ; ++i )
{
v7 = *a4;
if ( i >= (a4[1] - *a4) >> 4 )
break;
v8 = "-";
if ( !*(_QWORD *)(a3 + 8) )
v8 = "alternative-";
std::operator+<char>((long long)v14, a3, (long long)v8);
std::to_string((std::__cxx11 *)v15, i);
std::operator+<char>((long long)v16, v14, v15);
SchemaConverter::visit(v13, a2, (unsigned __int8 *)(v5 + v7), (long long)v16, (__m128d)0LL);
std::vector<std::string>::emplace_back<std::string>((long long)&v11, (long long)v13);
std::string::~string(v13);
std::string::~string(v16);
std::string::~string(v15);
std::string::~string(v14);
v5 += 16LL;
}
std::string::basic_string<std::allocator<char>>(v13, (long long)" | ");
string_join(a1, (long long *)&v11, (long long)v13);
std::string::~string(v13);
std::vector<std::string>::~vector((void **)&v11);
return a1;
}
|
_generate_union_rule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RCX
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDI
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX],XMM0
AND qword ptr [RAX + 0x10],0x0
XOR R13D,R13D
XOR EBP,EBP
LAB_001910a4:
MOV RBX,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
SUB RAX,RBX
SAR RAX,0x4
CMP RBP,RAX
JNC 0x00191161
MOV RSI,qword ptr [RSP + 0x18]
CMP qword ptr [RSI + 0x8],0x0
LEA RDX,[0x1b0219]
LEA RAX,[0x1b9103]
CMOVZ RDX,RAX
LAB_001910d7:
LEA RDI,[RSP + 0x58]
CALL 0x00127794
LAB_001910e1:
LEA R12,[RSP + 0x78]
MOV RDI,R12
MOV RSI,RBP
CALL 0x00142493
LAB_001910f1:
LEA R15,[RSP + 0x98]
MOV RDI,R15
LEA RSI,[RSP + 0x58]
MOV RDX,R12
CALL 0x00139f53
LAB_00191109:
ADD RBX,R13
LEA R12,[RSP + 0x38]
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBX
MOV RCX,R15
CALL 0x0018f200
LAB_00191124:
LEA RDI,[RSP + 0x20]
MOV RSI,R12
CALL 0x0013b5a4
MOV RDI,R12
CALL 0x00124208
MOV RDI,R15
CALL 0x00124208
LEA RDI,[RSP + 0x78]
CALL 0x00124208
LEA RDI,[RSP + 0x58]
CALL 0x00124208
INC RBP
ADD R13,0x10
JMP 0x001910a4
LAB_00191161:
LEA RSI,[0x1b92ba]
LEA RDI,[RSP + 0x38]
LEA RDX,[RSP + 0x98]
CALL 0x00126cb4
LAB_0019117a:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x38]
MOV RBX,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x0015467a
LAB_00191191:
LEA RDI,[RSP + 0x38]
CALL 0x00124208
LEA RDI,[RSP + 0x20]
CALL 0x00126d2a
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&,
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> > > const&) */
string * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2)
{
long *in_RCX;
char *in_RDX;
ulong uVar1;
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
string local_b0 [32];
string local_90 [32];
__cxx11 local_70 [32];
string local_50 [32];
local_c8 = 0;
uStack_c0 = 0;
local_b8 = 0;
for (uVar1 = 0; uVar1 < (ulong)(in_RCX[1] - *in_RCX >> 4); uVar1 = uVar1 + 1) {
/* try { // try from 001910d7 to 001910e0 has its CatchHandler @ 00191205 */
std::operator+(local_90,in_RDX);
/* try { // try from 001910e1 to 001910f0 has its CatchHandler @ 001911e7 */
std::__cxx11::to_string(local_70,uVar1);
/* try { // try from 001910f1 to 00191108 has its CatchHandler @ 001911ec */
std::operator+(local_50,local_90);
/* try { // try from 00191109 to 00191123 has its CatchHandler @ 001911d5 */
visit(local_b0,(string *)param_2);
/* try { // try from 00191124 to 00191130 has its CatchHandler @ 001911c6 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8,
local_b0);
std::__cxx11::string::~string(local_b0);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)local_70);
std::__cxx11::string::~string(local_90);
}
/* try { // try from 00191161 to 00191179 has its CatchHandler @ 001911c4 */
std::__cxx11::string::string<std::allocator<char>>(local_b0," | ",(allocator *)local_50);
/* try { // try from 0019117a to 00191190 has its CatchHandler @ 001911ba */
string_join((vector *)param_1,(string *)&local_c8);
std::__cxx11::string::~string(local_b0);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8);
return param_1;
}
|
|
65,147 |
Item_int::val_decimal(my_decimal*)
|
eloqsql/sql/item.cc
|
my_decimal *Item_int::val_decimal(my_decimal *decimal_value)
{
int2my_decimal(E_DEC_FATAL_ERROR, value, unsigned_flag, decimal_value);
return decimal_value;
}
|
O3
|
cpp
|
Item_int::val_decimal(my_decimal*):
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rax
movq 0x70(%rdi), %rdi
cmpb $0x0, 0xe(%rax)
je 0x91e440
movq %rbx, %rsi
callq 0xd0233a
jmp 0x91e448
movq %rbx, %rsi
callq 0xd02449
testb $0x1e, %al
je 0x91e461
leaq 0x468abf(%rip), %rsi # 0xd86f12
leaq 0x420ecc(%rip), %rdx # 0xd3f326
movl %eax, %edi
callq 0x9da634
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
|
_ZN8Item_int11val_decimalEP10my_decimal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rsi
mov rax, rdi
mov rdi, [rdi+70h]
cmp byte ptr [rax+0Eh], 0
jz short loc_91E440
mov rsi, rbx
call ulonglong2decimal
jmp short loc_91E448
loc_91E440:
mov rsi, rbx
call longlong2decimal
loc_91E448:
test al, 1Eh
jz short loc_91E461
lea rsi, byte_D86F12; char *
lea rdx, aDecimal; "DECIMAL"
mov edi, eax; int
call _Z25decimal_operation_resultsiPKcS0_; decimal_operation_results(int,char const*,char const*)
loc_91E461:
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
|
my_decimal * Item_int::val_decimal(Item_int *this, my_decimal *a2)
{
long long v3; // rdi
int v4; // eax
v3 = *((_QWORD *)this + 14);
if ( *((_BYTE *)this + 14) )
v4 = ulonglong2decimal(v3, a2);
else
v4 = longlong2decimal(v3, a2);
if ( (v4 & 0x1E) != 0 )
decimal_operation_results(v4, &byte_D86F12, "DECIMAL");
return a2;
}
|
Item_append_extended_type_info:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
POP RBP
RET
|
/* Type_handler::Item_append_extended_type_info(Send_field_extended_metadata*, Item const*) const */
int8
Type_handler::Item_append_extended_type_info(Send_field_extended_metadata *param_1,Item *param_2)
{
return 0;
}
|
|
65,148 |
my_dir
|
eloqsql/mysys/my_lib.c
|
MY_DIR *my_dir(const char *path, myf MyFlags)
{
MY_DIR_HANDLE *dirh;
FILEINFO finfo;
DIR *dirp;
struct dirent *dp;
char tmp_path[FN_REFLEN + 2], *tmp_file;
char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1];
DBUG_ENTER("my_dir");
DBUG_PRINT("my",("path: '%s' MyFlags: %lu",path,MyFlags));
tmp_file= directory_file_name(tmp_path, path);
if (!(dirp= opendir(tmp_path)))
{
my_errno= errno;
goto err_open;
}
if (!(dirh= my_malloc(key_memory_MY_DIR, sizeof(*dirh),
MYF(MyFlags | MY_ZEROFILL))))
goto err_alloc;
if (my_init_dynamic_array(key_memory_MY_DIR, &dirh->array, sizeof(FILEINFO),
ENTRIES_START_SIZE, ENTRIES_INCREMENT,
MYF(MyFlags)))
goto error;
init_alloc_root(key_memory_MY_DIR, &dirh->root, NAMES_START_SIZE,
NAMES_START_SIZE, MYF(MyFlags));
dp= (struct dirent*) dirent_tmp;
while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
{
MY_STAT statbuf, *mystat= 0;
if (dp->d_name[0] == '.' &&
(dp->d_name[1] == '\0' ||
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
continue; /* . or .. */
if (MyFlags & MY_WANT_STAT)
{
mystat= &statbuf;
bzero(mystat, sizeof(*mystat));
(void) strmov(tmp_file, dp->d_name);
(void) my_stat(tmp_path, mystat, MyFlags);
if (!(mystat->st_mode & MY_S_IREAD))
continue;
}
if (!(finfo.name= strdup_root(&dirh->root, dp->d_name)))
goto error;
if (mystat &&
!((mystat= memdup_root(&dirh->root, mystat, sizeof(*mystat)))))
goto error;
finfo.mystat= mystat;
if (push_dynamic(&dirh->array, (uchar*)&finfo))
goto error;
}
(void) closedir(dirp);
if (MyFlags & MY_WANT_SORT)
sort_dynamic(&dirh->array, (qsort_cmp) comp_names);
dirh->dir.dir_entry= dynamic_element(&dirh->array, 0, FILEINFO *);
dirh->dir.number_of_files= dirh->array.elements;
DBUG_RETURN(&dirh->dir);
error:
my_dirend(&dirh->dir);
err_alloc:
(void) closedir(dirp);
err_open:
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_DIR, MYF(ME_BELL), path, my_errno);
DBUG_RETURN(NULL);
}
|
O0
|
c
|
my_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x530, %rsp # imm = 0x530
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x440(%rbp)
movq %rsi, -0x448(%rbp)
jmp 0x29478
leaq -0x210(%rbp), %rdi
movq -0x440(%rbp), %rsi
callq 0x29820
movq %rax, -0x478(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x24500
movq %rax, -0x468(%rbp)
cmpq $0x0, %rax
jne 0x294ca
callq 0x24040
movl (%rax), %eax
movl %eax, -0x514(%rbp)
callq 0x2bad0
movl -0x514(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x2979b
leaq 0x35fc53(%rip), %rax # 0x389124
movl (%rax), %edi
movq -0x448(%rbp), %rdx
orq $0x20, %rdx
movl $0x78, %esi
callq 0x29a30
movq %rax, -0x450(%rbp)
cmpq $0x0, %rax
jne 0x294fa
jmp 0x2978f
leaq 0x35fc23(%rip), %rax # 0x389124
movl (%rax), %edi
movq -0x450(%rbp), %rsi
addq $0x10, %rsi
movq -0x448(%rbp), %rax
movl $0x10, %edx
xorl %ecx, %ecx
movl $0x200, %r8d # imm = 0x200
movl $0x1000, %r9d # imm = 0x1000
movq %rax, (%rsp)
callq 0x2d910
cmpb $0x0, %al
je 0x2953a
jmp 0x29783
leaq 0x35fbe3(%rip), %rax # 0x389124
movl (%rax), %edi
movq -0x450(%rbp), %rsi
addq $0x38, %rsi
movq -0x448(%rbp), %r8
movl $0x8000, %ecx # imm = 0x8000
movq %rcx, %rdx
callq 0x35150
leaq -0x430(%rbp), %rax
movq %rax, -0x470(%rbp)
movq -0x468(%rbp), %rdi
callq 0x241e0
movq %rax, -0x470(%rbp)
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x29597
jmp 0x296fc
movq $0x0, -0x510(%rbp)
movq -0x470(%rbp), %rax
movsbl 0x13(%rax), %eax
cmpl $0x2e, %eax
jne 0x295e4
movq -0x470(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
je 0x295e2
movq -0x470(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x2e, %eax
jne 0x295e4
movq -0x470(%rbp), %rax
movsbl 0x15(%rax), %eax
cmpl $0x0, %eax
jne 0x295e4
jmp 0x29570
movq -0x448(%rbp), %rax
andq $0x4000, %rax # imm = 0x4000
cmpq $0x0, %rax
je 0x29664
leaq -0x508(%rbp), %rax
movq %rax, -0x510(%rbp)
movq -0x510(%rbp), %rdi
xorl %esi, %esi
movl $0x90, %edx
callq 0x241b0
movq -0x478(%rbp), %rdi
movq -0x470(%rbp), %rsi
addq $0x13, %rsi
callq 0x24320
leaq -0x210(%rbp), %rdi
movq -0x510(%rbp), %rsi
movq -0x448(%rbp), %rdx
callq 0x29890
movq -0x510(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
jne 0x29662
jmp 0x29570
jmp 0x29664
movq -0x450(%rbp), %rdi
addq $0x38, %rdi
movq -0x470(%rbp), %rsi
addq $0x13, %rsi
callq 0x35c80
movq %rax, -0x460(%rbp)
cmpq $0x0, %rax
jne 0x29691
jmp 0x29783
cmpq $0x0, -0x510(%rbp)
je 0x296c9
movq -0x450(%rbp), %rdi
addq $0x38, %rdi
movq -0x510(%rbp), %rsi
movl $0x90, %edx
callq 0x35d20
movq %rax, -0x510(%rbp)
cmpq $0x0, %rax
jne 0x296c9
jmp 0x29783
movq -0x510(%rbp), %rax
movq %rax, -0x458(%rbp)
movq -0x450(%rbp), %rdi
addq $0x10, %rdi
leaq -0x460(%rbp), %rsi
callq 0x2da40
cmpb $0x0, %al
je 0x296f7
jmp 0x29783
jmp 0x29570
movq -0x468(%rbp), %rdi
callq 0x24580
movq -0x448(%rbp), %rax
andq $0x2000, %rax # imm = 0x2000
cmpq $0x0, %rax
je 0x2974a
movq -0x450(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x450(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, %esi
movq -0x450(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, %edx
leaq 0x23b(%rip), %rcx # 0x29980
callq 0x33780
movq -0x450(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x450(%rbp), %rax
movq %rcx, (%rax)
movq -0x450(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x450(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x450(%rbp), %rax
movq %rax, -0x438(%rbp)
jmp 0x297e6
movq -0x450(%rbp), %rdi
callq 0x29400
movq -0x468(%rbp), %rdi
callq 0x24580
movq -0x448(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0x297d9
movq -0x440(%rbp), %rax
movq %rax, -0x520(%rbp)
callq 0x2bad0
movq -0x520(%rbp), %rdx
movl (%rax), %ecx
movl $0xc, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x27d80
jmp 0x297db
movq $0x0, -0x438(%rbp)
movq -0x438(%rbp), %rax
movq %rax, -0x528(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x29816
movq -0x528(%rbp), %rax
addq $0x530, %rsp # imm = 0x530
popq %rbp
retq
callq 0x24370
nopl (%rax,%rax)
|
my_dir:
push rbp
mov rbp, rsp
sub rsp, 530h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_440], rdi
mov [rbp+var_448], rsi
jmp short $+2
loc_29478:
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_440]
call directory_file_name
mov [rbp+var_478], rax
lea rdi, [rbp+var_210]
call _opendir
mov [rbp+var_468], rax
cmp rax, 0
jnz short loc_294CA
call ___errno_location
mov eax, [rax]
mov [rbp+var_514], eax
call _my_thread_var
mov ecx, [rbp+var_514]
mov [rax], ecx
jmp loc_2979B
loc_294CA:
lea rax, key_memory_MY_DIR
mov edi, [rax]
mov rdx, [rbp+var_448]
or rdx, 20h
mov esi, 78h ; 'x'
call my_malloc
mov [rbp+var_450], rax
cmp rax, 0
jnz short loc_294FA
jmp loc_2978F
loc_294FA:
lea rax, key_memory_MY_DIR
mov edi, [rax]
mov rsi, [rbp+var_450]
add rsi, 10h
mov rax, [rbp+var_448]
mov edx, 10h
xor ecx, ecx
mov r8d, 200h
mov r9d, 1000h
mov [rsp+530h+var_530], rax
call init_dynamic_array2
cmp al, 0
jz short loc_2953A
jmp loc_29783
loc_2953A:
lea rax, key_memory_MY_DIR
mov edi, [rax]
mov rsi, [rbp+var_450]
add rsi, 38h ; '8'
mov r8, [rbp+var_448]
mov ecx, 8000h
mov rdx, rcx
call init_alloc_root
lea rax, [rbp+var_430]
mov [rbp+var_470], rax
loc_29570:
mov rdi, [rbp+var_468]
call _readdir64
mov [rbp+var_470], rax
cmp rax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_29597
jmp loc_296FC
loc_29597:
mov [rbp+var_510], 0
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+13h]
cmp eax, 2Eh ; '.'
jnz short loc_295E4
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+14h]
cmp eax, 0
jz short loc_295E2
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+14h]
cmp eax, 2Eh ; '.'
jnz short loc_295E4
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+15h]
cmp eax, 0
jnz short loc_295E4
loc_295E2:
jmp short loc_29570
loc_295E4:
mov rax, [rbp+var_448]
and rax, 4000h
cmp rax, 0
jz short loc_29664
lea rax, [rbp+var_508]
mov [rbp+var_510], rax
mov rdi, [rbp+var_510]
xor esi, esi
mov edx, 90h
call _memset
mov rdi, [rbp+var_478]
mov rsi, [rbp+var_470]
add rsi, 13h
call _stpcpy
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_510]
mov rdx, [rbp+var_448]
call my_stat
mov rax, [rbp+var_510]
mov eax, [rax+18h]
and eax, 100h
cmp eax, 0
jnz short loc_29662
jmp loc_29570
loc_29662:
jmp short $+2
loc_29664:
mov rdi, [rbp+var_450]
add rdi, 38h ; '8'
mov rsi, [rbp+var_470]
add rsi, 13h
call strdup_root
mov [rbp+var_460], rax
cmp rax, 0
jnz short loc_29691
jmp loc_29783
loc_29691:
cmp [rbp+var_510], 0
jz short loc_296C9
mov rdi, [rbp+var_450]
add rdi, 38h ; '8'
mov rsi, [rbp+var_510]
mov edx, 90h
call memdup_root
mov [rbp+var_510], rax
cmp rax, 0
jnz short loc_296C9
jmp loc_29783
loc_296C9:
mov rax, [rbp+var_510]
mov [rbp+var_458], rax
mov rdi, [rbp+var_450]
add rdi, 10h
lea rsi, [rbp+var_460]
call insert_dynamic
cmp al, 0
jz short loc_296F7
jmp loc_29783
loc_296F7:
jmp loc_29570
loc_296FC:
mov rdi, [rbp+var_468]
call _closedir
mov rax, [rbp+var_448]
and rax, 2000h
cmp rax, 0
jz short loc_2974A
mov rax, [rbp+var_450]
mov rdi, [rax+10h]
mov rax, [rbp+var_450]
mov eax, [rax+18h]
mov esi, eax
mov rax, [rbp+var_450]
mov eax, [rax+24h]
mov edx, eax
lea rcx, comp_names
call my_qsort
loc_2974A:
mov rax, [rbp+var_450]
mov rcx, [rax+10h]
mov rax, [rbp+var_450]
mov [rax], rcx
mov rax, [rbp+var_450]
mov ecx, [rax+18h]
mov rax, [rbp+var_450]
mov [rax+8], ecx
mov rax, [rbp+var_450]
mov [rbp+var_438], rax
jmp short loc_297E6
loc_29783:
mov rdi, [rbp+var_450]
call my_dirend
loc_2978F:
mov rdi, [rbp+var_468]
call _closedir
loc_2979B:
mov rax, [rbp+var_448]
and rax, 18h
cmp rax, 0
jz short loc_297D9
mov rax, [rbp+var_440]
mov [rbp+var_520], rax
call _my_thread_var
mov rdx, [rbp+var_520]
mov ecx, [rax]
mov edi, 0Ch
mov esi, 4
mov al, 0
call my_error
loc_297D9:
jmp short $+2
loc_297DB:
mov [rbp+var_438], 0
loc_297E6:
mov rax, [rbp+var_438]
mov [rbp+var_528], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_29816
mov rax, [rbp+var_528]
add rsp, 530h
pop rbp
retn
loc_29816:
call ___stack_chk_fail
|
long long my_dir(long long a1, long long a2)
{
unsigned int *v2; // rax
long long v4; // [rsp+10h] [rbp-520h]
int v5; // [rsp+1Ch] [rbp-514h]
_BYTE *v6; // [rsp+20h] [rbp-510h]
_BYTE v7[24]; // [rsp+28h] [rbp-508h] BYREF
__int16 v8; // [rsp+40h] [rbp-4F0h]
long long v9; // [rsp+B8h] [rbp-478h]
char *v10; // [rsp+C0h] [rbp-470h]
long long v11; // [rsp+C8h] [rbp-468h]
_QWORD v12[2]; // [rsp+D0h] [rbp-460h] BYREF
long long v13; // [rsp+E0h] [rbp-450h]
long long v14; // [rsp+E8h] [rbp-448h]
long long v15; // [rsp+F0h] [rbp-440h]
char v17; // [rsp+100h] [rbp-430h] BYREF
_BYTE v18[520]; // [rsp+320h] [rbp-210h] BYREF
unsigned long long v19; // [rsp+528h] [rbp-8h]
v19 = __readfsqword(0x28u);
v15 = a1;
v14 = a2;
v9 = directory_file_name(v18, a1);
v11 = opendir(v18);
if ( !v11 )
{
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v5;
LABEL_24:
if ( (v14 & 0x18) != 0 )
{
v4 = v15;
v2 = (unsigned int *)my_thread_var();
my_error(0xCu, 4LL, v4, *v2);
}
return 0LL;
}
v13 = my_malloc(key_memory_MY_DIR, 120LL, v14 | 0x20);
if ( !v13 )
{
LABEL_23:
closedir(v11);
goto LABEL_24;
}
if ( (unsigned __int8)init_dynamic_array2(key_memory_MY_DIR, (int)v13 + 16, 16, 0, 512, 4096, v14) )
{
LABEL_22:
my_dirend(v13);
goto LABEL_23;
}
init_alloc_root(key_memory_MY_DIR, v13 + 56, 0x8000LL, 0x8000LL, v14);
v10 = &v17;
while ( 1 )
{
v10 = (char *)readdir64(v11);
if ( !v10 )
break;
v6 = 0LL;
if ( v10[19] != 46 || v10[20] && (v10[20] != 46 || v10[21]) )
{
if ( (v14 & 0x4000) == 0
|| (v6 = v7, memset(v7, 0LL, 144LL), stpcpy(v9, v10 + 19), my_stat(v18, v7, v14), (v8 & 0x100) != 0) )
{
v12[0] = strdup_root(v13 + 56, v10 + 19);
if ( !v12[0] )
goto LABEL_22;
if ( v6 )
{
v6 = (_BYTE *)memdup_root(v13 + 56, v6, 144LL);
if ( !v6 )
goto LABEL_22;
}
v12[1] = v6;
if ( (unsigned __int8)insert_dynamic(v13 + 16, v12) )
goto LABEL_22;
}
}
}
closedir(v11);
if ( (v14 & 0x2000) != 0 )
my_qsort(*(_QWORD *)(v13 + 16), *(unsigned int *)(v13 + 24), *(unsigned int *)(v13 + 36), comp_names);
*(_QWORD *)v13 = *(_QWORD *)(v13 + 16);
*(_DWORD *)(v13 + 8) = *(_DWORD *)(v13 + 24);
return v13;
}
|
my_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x530
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x440],RDI
MOV qword ptr [RBP + -0x448],RSI
JMP 0x00129478
LAB_00129478:
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x440]
CALL 0x00129820
MOV qword ptr [RBP + -0x478],RAX
LEA RDI,[RBP + -0x210]
CALL 0x00124500
MOV qword ptr [RBP + -0x468],RAX
CMP RAX,0x0
JNZ 0x001294ca
CALL 0x00124040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x514],EAX
CALL 0x0012bad0
MOV ECX,dword ptr [RBP + -0x514]
MOV dword ptr [RAX],ECX
JMP 0x0012979b
LAB_001294ca:
LEA RAX,[0x489124]
MOV EDI,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x448]
OR RDX,0x20
MOV ESI,0x78
CALL 0x00129a30
MOV qword ptr [RBP + -0x450],RAX
CMP RAX,0x0
JNZ 0x001294fa
JMP 0x0012978f
LAB_001294fa:
LEA RAX,[0x489124]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x450]
ADD RSI,0x10
MOV RAX,qword ptr [RBP + -0x448]
MOV EDX,0x10
XOR ECX,ECX
MOV R8D,0x200
MOV R9D,0x1000
MOV qword ptr [RSP],RAX
CALL 0x0012d910
CMP AL,0x0
JZ 0x0012953a
JMP 0x00129783
LAB_0012953a:
LEA RAX,[0x489124]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x450]
ADD RSI,0x38
MOV R8,qword ptr [RBP + -0x448]
MOV ECX,0x8000
MOV RDX,RCX
CALL 0x00135150
LEA RAX,[RBP + -0x430]
MOV qword ptr [RBP + -0x470],RAX
LAB_00129570:
MOV RDI,qword ptr [RBP + -0x468]
CALL 0x001241e0
MOV qword ptr [RBP + -0x470],RAX
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x00129597
JMP 0x001296fc
LAB_00129597:
MOV qword ptr [RBP + -0x510],0x0
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x13]
CMP EAX,0x2e
JNZ 0x001295e4
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x0
JZ 0x001295e2
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x2e
JNZ 0x001295e4
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x15]
CMP EAX,0x0
JNZ 0x001295e4
LAB_001295e2:
JMP 0x00129570
LAB_001295e4:
MOV RAX,qword ptr [RBP + -0x448]
AND RAX,0x4000
CMP RAX,0x0
JZ 0x00129664
LEA RAX,[RBP + -0x508]
MOV qword ptr [RBP + -0x510],RAX
MOV RDI,qword ptr [RBP + -0x510]
XOR ESI,ESI
MOV EDX,0x90
CALL 0x001241b0
MOV RDI,qword ptr [RBP + -0x478]
MOV RSI,qword ptr [RBP + -0x470]
ADD RSI,0x13
CALL 0x00124320
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x510]
MOV RDX,qword ptr [RBP + -0x448]
CALL 0x00129890
MOV RAX,qword ptr [RBP + -0x510]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0x100
CMP EAX,0x0
JNZ 0x00129662
JMP 0x00129570
LAB_00129662:
JMP 0x00129664
LAB_00129664:
MOV RDI,qword ptr [RBP + -0x450]
ADD RDI,0x38
MOV RSI,qword ptr [RBP + -0x470]
ADD RSI,0x13
CALL 0x00135c80
MOV qword ptr [RBP + -0x460],RAX
CMP RAX,0x0
JNZ 0x00129691
JMP 0x00129783
LAB_00129691:
CMP qword ptr [RBP + -0x510],0x0
JZ 0x001296c9
MOV RDI,qword ptr [RBP + -0x450]
ADD RDI,0x38
MOV RSI,qword ptr [RBP + -0x510]
MOV EDX,0x90
CALL 0x00135d20
MOV qword ptr [RBP + -0x510],RAX
CMP RAX,0x0
JNZ 0x001296c9
JMP 0x00129783
LAB_001296c9:
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RBP + -0x458],RAX
MOV RDI,qword ptr [RBP + -0x450]
ADD RDI,0x10
LEA RSI,[RBP + -0x460]
CALL 0x0012da40
CMP AL,0x0
JZ 0x001296f7
JMP 0x00129783
LAB_001296f7:
JMP 0x00129570
LAB_001296fc:
MOV RDI,qword ptr [RBP + -0x468]
CALL 0x00124580
MOV RAX,qword ptr [RBP + -0x448]
AND RAX,0x2000
CMP RAX,0x0
JZ 0x0012974a
MOV RAX,qword ptr [RBP + -0x450]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x450]
MOV EAX,dword ptr [RAX + 0x18]
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x450]
MOV EAX,dword ptr [RAX + 0x24]
MOV EDX,EAX
LEA RCX,[0x129980]
CALL 0x00133780
LAB_0012974a:
MOV RAX,qword ptr [RBP + -0x450]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x450]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x450]
MOV ECX,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x450]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x450]
MOV qword ptr [RBP + -0x438],RAX
JMP 0x001297e6
LAB_00129783:
MOV RDI,qword ptr [RBP + -0x450]
CALL 0x00129400
LAB_0012978f:
MOV RDI,qword ptr [RBP + -0x468]
CALL 0x00124580
LAB_0012979b:
MOV RAX,qword ptr [RBP + -0x448]
AND RAX,0x18
CMP RAX,0x0
JZ 0x001297d9
MOV RAX,qword ptr [RBP + -0x440]
MOV qword ptr [RBP + -0x520],RAX
CALL 0x0012bad0
MOV RDX,qword ptr [RBP + -0x520]
MOV ECX,dword ptr [RAX]
MOV EDI,0xc
MOV ESI,0x4
MOV AL,0x0
CALL 0x00127d80
LAB_001297d9:
JMP 0x001297db
LAB_001297db:
MOV qword ptr [RBP + -0x438],0x0
LAB_001297e6:
MOV RAX,qword ptr [RBP + -0x438]
MOV qword ptr [RBP + -0x528],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00129816
MOV RAX,qword ptr [RBP + -0x528]
ADD RSP,0x530
POP RBP
RET
LAB_00129816:
CALL 0x00124370
|
int8 * my_dir(int8 param_1,ulong param_2)
{
int iVar1;
int8 uVar2;
char cVar3;
int *piVar4;
int4 *puVar5;
long in_FS_OFFSET;
int1 *local_518;
int1 local_510 [24];
uint local_4f8;
char *local_480;
dirent64 *local_478;
DIR *local_470;
long local_468;
int1 *local_460;
int8 *local_458;
ulong local_450;
int8 local_448;
int8 *local_440;
dirent64 local_438;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_450 = param_2;
local_448 = param_1;
local_480 = (char *)directory_file_name(local_218,param_1);
local_470 = opendir(local_218);
if (local_470 == (DIR *)0x0) {
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
}
else {
local_458 = (int8 *)my_malloc(key_memory_MY_DIR,0x78,local_450 | 0x20);
if (local_458 != (int8 *)0x0) {
cVar3 = init_dynamic_array2(key_memory_MY_DIR,local_458 + 2,0x10,0,0x200,0x1000,local_450);
if (cVar3 == '\0') {
init_alloc_root(key_memory_MY_DIR,local_458 + 7,0x8000,0x8000,local_450);
local_478 = &local_438;
LAB_00129570:
do {
do {
local_478 = readdir64(local_470);
if (local_478 == (dirent64 *)0x0) {
closedir(local_470);
if ((local_450 & 0x2000) != 0) {
my_qsort(local_458[2],*(int4 *)(local_458 + 3),
*(int4 *)((long)local_458 + 0x24),comp_names);
}
*local_458 = local_458[2];
*(int4 *)(local_458 + 1) = *(int4 *)(local_458 + 3);
local_440 = local_458;
goto LAB_001297e6;
}
local_518 = (int1 *)0x0;
} while ((local_478->d_name[0] == '.') &&
((local_478->d_name[1] == '\0' ||
((local_478->d_name[1] == '.' && (local_478->d_name[2] == '\0'))))));
if ((local_450 & 0x4000) != 0) {
local_518 = local_510;
memset(local_518,0,0x90);
stpcpy(local_480,local_478->d_name);
my_stat(local_218,local_518,local_450);
if ((local_4f8 & 0x100) == 0) goto LAB_00129570;
}
local_468 = strdup_root(local_458 + 7,local_478->d_name);
if ((local_468 == 0) ||
((local_518 != (int1 *)0x0 &&
(local_518 = (int1 *)memdup_root(local_458 + 7,local_518,0x90),
local_518 == (int1 *)0x0)))) break;
local_460 = local_518;
cVar3 = insert_dynamic(local_458 + 2);
if (cVar3 != '\0') break;
} while( true );
}
my_dirend(local_458);
}
closedir(local_470);
}
uVar2 = local_448;
if ((local_450 & 0x18) != 0) {
puVar5 = (int4 *)_my_thread_var();
my_error(0xc,4,uVar2,*puVar5);
}
local_440 = (int8 *)0x0;
LAB_001297e6:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_440;
}
|
|
65,149 |
Send_field_packed_extended_metadata::append_chunk(mariadb_field_attr_t, st_mysql_const_lex_string const&)
|
eloqsql/sql/protocol.cc
|
bool append_chunk(mariadb_field_attr_t type, const LEX_CSTRING &value)
{
/*
If we eventually support many metadata chunk types and long metadata
values, we'll need to encode type and length using net_store_length()
and do corresponding changes to the unpacking code in libmariadb.
For now let's just assert that type and length fit into one byte.
*/
DBUG_ASSERT(net_length_size(type) == 1);
DBUG_ASSERT(net_length_size(value.length) == 1);
size_t nbytes= 1/*type*/ + 1/*length*/ + value.length;
if (reserve(nbytes))
return true;
qs_append((char) (uchar) type);
qs_append((char) (uchar) value.length);
qs_append(&value);
return false;
}
|
O0
|
cpp
|
Send_field_packed_extended_metadata::append_chunk(mariadb_field_attr_t, st_mysql_const_lex_string const&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x8dc58d
jmp 0x8dc58f
jmp 0x8dc591
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
callq 0x87dcd0
cmpl $0x0, %eax
je 0x8dc5b9
movb $0x1, -0x1(%rbp)
jmp 0x8dc5ed
movq -0x30(%rbp), %rdi
movl -0x14(%rbp), %eax
movsbl %al, %esi
callq 0x8dc600
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movsbl %al, %esi
callq 0x8dc600
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x8dc640
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN35Send_field_packed_extended_metadata12append_chunkE20mariadb_field_attr_tRK25st_mysql_const_lex_string:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
jmp short $+2
loc_8DC58D:
jmp short $+2
loc_8DC58F:
jmp short $+2
loc_8DC591:
mov rdi, [rbp+var_30]; this
mov rax, [rbp+var_20]
mov rax, [rax+8]
add rax, 2
mov [rbp+var_28], rax
mov rsi, [rbp+var_28]; unsigned __int64
call _ZN13Binary_string7reserveEm; Binary_string::reserve(ulong)
cmp eax, 0
jz short loc_8DC5B9
mov [rbp+var_1], 1
jmp short loc_8DC5ED
loc_8DC5B9:
mov rdi, [rbp+var_30]; this
mov eax, [rbp+var_14]
movsx esi, al; char
call _ZN13Binary_string9qs_appendEc; Binary_string::qs_append(char)
mov rdi, [rbp+var_30]; this
mov rax, [rbp+var_20]
mov rax, [rax+8]
movsx esi, al; char
call _ZN13Binary_string9qs_appendEc; Binary_string::qs_append(char)
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_20]
call _ZN13Binary_string9qs_appendEPK25st_mysql_const_lex_string; Binary_string::qs_append(st_mysql_const_lex_string const*)
mov [rbp+var_1], 0
loc_8DC5ED:
mov al, [rbp+var_1]
and al, 1
add rsp, 30h
pop rbp
retn
|
char Send_field_packed_extended_metadata::append_chunk(Binary_string *a1, char a2, long long a3)
{
if ( (unsigned int)Binary_string::reserve(a1, *(_QWORD *)(a3 + 8) + 2LL) )
return 1;
Binary_string::qs_append(a1, a2);
Binary_string::qs_append(a1, *(_QWORD *)(a3 + 8));
Binary_string::qs_append(a1, a3);
return 0;
}
|
__cxx_global_var_init.8:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x26d6758]
MOV ESI,0x1800000
CALL 0x008fd530
POP RBP
RET
|
void __cxx_global_var_init_8(void)
{
date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_NO_ZEROS,0x1800000);
return;
}
|
|
65,150 |
fill_uchar
|
eloqsql/strings/ctype.c
|
static int fill_uchar(uchar *a,uint size,const char *str, size_t len)
{
uint i= 0;
const char *s, *b, *e=str+len;
for (s=str ; s < e ; i++)
{
for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ;
b=s;
for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ;
if (s == b || i > size)
break;
a[i]= (uchar) strtoul(b,NULL,16);
}
return 0;
}
|
O0
|
c
|
fill_uchar:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x74126
jmp 0x74052
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0x7407e
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0xfb31(%rip), %rdi # 0x83ba0
callq 0x24100
cmpq $0x0, %rax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x74087
jmp 0x74097
jmp 0x74089
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x74052
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x42(%rbp)
jae 0x740cd
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0xfae4(%rip), %rdi # 0x83ba0
callq 0x24100
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x740d6
jmp 0x740e6
jmp 0x740d8
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x7409f
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x740f8
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x740fa
jmp 0x74126
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x243c0
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x74042
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nop
|
fill_uchar:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_74042:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_40]
jnb loc_74126
jmp short $+2
loc_74052:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jnb short loc_7407E
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_83BA0; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
mov [rbp+var_41], al
loc_7407E:
mov al, [rbp+var_41]
test al, 1
jnz short loc_74087
jmp short loc_74097
loc_74087:
jmp short $+2
loc_74089:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_74052
loc_74097:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
loc_7409F:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_42], al
jnb short loc_740CD
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_83BA0; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
xor al, 0FFh
mov [rbp+var_42], al
loc_740CD:
mov al, [rbp+var_42]
test al, 1
jnz short loc_740D6
jmp short loc_740E6
loc_740D6:
jmp short $+2
loc_740D8:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_7409F
loc_740E6:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_740F8
mov eax, [rbp+var_24]
cmp eax, [rbp+var_C]
jbe short loc_740FA
loc_740F8:
jmp short loc_74126
loc_740FA:
mov rdi, [rbp+var_38]
xor eax, eax
mov esi, eax
mov edx, 10h
call ___isoc23_strtoul
mov dl, al
mov rax, [rbp+var_8]
mov ecx, [rbp+var_24]
mov [rax+rcx], dl
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_74042
loc_74126:
xor eax, eax
add rsp, 50h
pop rbp
retn
|
long long fill_uchar(long long a1, unsigned int a2, char *a3, long long a4)
{
char v5; // [rsp+Eh] [rbp-42h]
bool v6; // [rsp+Fh] [rbp-41h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
char *v8; // [rsp+18h] [rbp-38h]
char *v9; // [rsp+20h] [rbp-30h]
unsigned int v10; // [rsp+2Ch] [rbp-24h]
v10 = 0;
v7 = (unsigned long long)&a3[a4];
v9 = a3;
while ( (unsigned long long)v9 < v7 )
{
while ( 1 )
{
v6 = 0;
if ( (unsigned long long)v9 < v7 )
v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0;
if ( !v6 )
break;
++v9;
}
v8 = v9;
while ( 1 )
{
v5 = 0;
if ( (unsigned long long)v9 < v7 )
v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0);
if ( (v5 & 1) == 0 )
break;
++v9;
}
if ( v9 == v8 || v10 > a2 )
break;
*(_BYTE *)(a1 + v10++) = __isoc23_strtoul(v8, 0LL, 16LL);
}
return 0LL;
}
|
fill_uchar:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_00174042:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00174126
JMP 0x00174052
LAB_00174052:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JNC 0x0017407e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x183ba0]
CALL 0x00124100
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_0017407e:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x00174087
JMP 0x00174097
LAB_00174087:
JMP 0x00174089
LAB_00174089:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00174052
LAB_00174097:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LAB_0017409f:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x42],AL
JNC 0x001740cd
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x183ba0]
CALL 0x00124100
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x42],AL
LAB_001740cd:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x001740d6
JMP 0x001740e6
LAB_001740d6:
JMP 0x001740d8
LAB_001740d8:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0017409f
LAB_001740e6:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001740f8
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0xc]
JBE 0x001740fa
LAB_001740f8:
JMP 0x00174126
LAB_001740fa:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0x10
CALL 0x001243c0
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x24]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00174042
LAB_00174126:
XOR EAX,EAX
ADD RSP,0x50
POP RBP
RET
|
int8 fill_uchar(long param_1,uint param_2,char *param_3,long param_4)
{
char *pcVar1;
int1 uVar2;
char *pcVar3;
char *pcVar4;
bool bVar5;
char *local_38;
uint local_2c;
local_2c = 0;
pcVar3 = param_3 + param_4;
local_38 = param_3;
while( true ) {
if (pcVar3 <= local_38) {
return 0;
}
while( true ) {
pcVar1 = local_38;
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 != (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
while( true ) {
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 == (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
if (local_38 == pcVar1) break;
if (param_2 < local_2c) {
return 0;
}
uVar2 = __isoc23_strtoul(pcVar1,0,0x10);
*(int1 *)(param_1 + (ulong)local_2c) = uVar2;
local_2c = local_2c + 1;
}
return 0;
}
|
|
65,151 |
fill_uchar
|
eloqsql/strings/ctype.c
|
static int fill_uchar(uchar *a,uint size,const char *str, size_t len)
{
uint i= 0;
const char *s, *b, *e=str+len;
for (s=str ; s < e ; i++)
{
for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ;
b=s;
for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ;
if (s == b || i > size)
break;
a[i]= (uchar) strtoul(b,NULL,16);
}
return 0;
}
|
O3
|
c
|
fill_uchar:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
testq %rcx, %rcx
jle 0x58eb8
movq %rcx, %rbx
movq %rdx, %r12
addq %rdx, %rbx
movl %esi, %eax
movq %rax, -0x30(%rbp)
xorl %r14d, %r14d
leaq 0xad23(%rip), %r15 # 0x63b68
movq %r12, %r13
movsbl (%r13), %esi
movl $0x5, %edx
movq %r15, %rdi
callq 0x24340
testq %rax, %rax
je 0x58e67
incq %r13
cmpq %rbx, %r13
jb 0x58e48
cmpq %rbx, %r13
jae 0x58eb8
movq %r13, %r12
movsbl (%r12), %esi
movl $0x5, %edx
movq %r15, %rdi
callq 0x24340
testq %rax, %rax
jne 0x58e8e
incq %r12
cmpq %rbx, %r12
jb 0x58e6f
cmpq %r13, %r12
je 0x58eb8
cmpq -0x30(%rbp), %r14
ja 0x58eb8
movq %r13, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x24410
movq -0x38(%rbp), %rcx
movb %al, (%rcx,%r14)
incq %r14
cmpq %rbx, %r12
jb 0x58e45
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
fill_uchar:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], rdi
test rcx, rcx
jle loc_58EB8
mov rbx, rcx
mov r12, rdx
add rbx, rdx
mov eax, esi
mov [rbp+var_30], rax
xor r14d, r14d
lea r15, asc_63B68; " \t\r\n"
loc_58E45:
mov r13, r12
loc_58E48:
movsx esi, byte ptr [r13+0]
mov edx, 5
mov rdi, r15
call _memchr
test rax, rax
jz short loc_58E67
inc r13
cmp r13, rbx
jb short loc_58E48
loc_58E67:
cmp r13, rbx
jnb short loc_58EB8
mov r12, r13
loc_58E6F:
movsx esi, byte ptr [r12]
mov edx, 5
mov rdi, r15
call _memchr
test rax, rax
jnz short loc_58E8E
inc r12
cmp r12, rbx
jb short loc_58E6F
loc_58E8E:
cmp r12, r13
jz short loc_58EB8
cmp r14, [rbp+var_30]
ja short loc_58EB8
mov rdi, r13
xor esi, esi
mov edx, 10h
call ___isoc23_strtoul
mov rcx, [rbp+var_38]
mov [rcx+r14], al
inc r14
cmp r12, rbx
jb short loc_58E45
loc_58EB8:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
void fill_uchar(long long a1, unsigned int a2, char *a3, long long a4)
{
char *v4; // r12
unsigned long long v5; // rbx
unsigned long long v6; // r14
char *v7; // r13
if ( a4 > 0 )
{
v4 = a3;
v5 = (unsigned long long)&a3[a4];
v6 = 0LL;
do
{
v7 = v4;
do
{
if ( !memchr(" \t\r\n", (unsigned int)*v7, 5LL) )
break;
++v7;
}
while ( (unsigned long long)v7 < v5 );
if ( (unsigned long long)v7 >= v5 )
break;
v4 = v7;
do
{
if ( memchr(" \t\r\n", (unsigned int)*v4, 5LL) )
break;
++v4;
}
while ( (unsigned long long)v4 < v5 );
if ( v4 == v7 )
break;
if ( v6 > a2 )
break;
*(_BYTE *)(a1 + v6++) = __isoc23_strtoul(v7, 0LL, 16LL);
}
while ( (unsigned long long)v4 < v5 );
}
}
|
fill_uchar:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],RDI
TEST RCX,RCX
JLE 0x00158eb8
MOV RBX,RCX
MOV R12,RDX
ADD RBX,RDX
MOV EAX,ESI
MOV qword ptr [RBP + -0x30],RAX
XOR R14D,R14D
LEA R15,[0x163b68]
LAB_00158e45:
MOV R13,R12
LAB_00158e48:
MOVSX ESI,byte ptr [R13]
MOV EDX,0x5
MOV RDI,R15
CALL 0x00124340
TEST RAX,RAX
JZ 0x00158e67
INC R13
CMP R13,RBX
JC 0x00158e48
LAB_00158e67:
CMP R13,RBX
JNC 0x00158eb8
MOV R12,R13
LAB_00158e6f:
MOVSX ESI,byte ptr [R12]
MOV EDX,0x5
MOV RDI,R15
CALL 0x00124340
TEST RAX,RAX
JNZ 0x00158e8e
INC R12
CMP R12,RBX
JC 0x00158e6f
LAB_00158e8e:
CMP R12,R13
JZ 0x00158eb8
CMP R14,qword ptr [RBP + -0x30]
JA 0x00158eb8
MOV RDI,R13
XOR ESI,ESI
MOV EDX,0x10
CALL 0x00124410
MOV RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RCX + R14*0x1],AL
INC R14
CMP R12,RBX
JC 0x00158e45
LAB_00158eb8:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void fill_uchar(long param_1,ulong param_2,char *param_3,long param_4)
{
int1 uVar1;
void *pvVar2;
char *pcVar3;
char *pcVar4;
ulong uVar5;
if (param_4 < 1) {
return;
}
pcVar3 = param_3 + param_4;
uVar5 = 0;
LAB_00158e48:
do {
pvVar2 = memchr(&DAT_00163b68,(int)*param_3,5);
pcVar4 = param_3;
if (pvVar2 != (void *)0x0) {
param_3 = param_3 + 1;
pcVar4 = param_3;
if (param_3 < pcVar3) goto LAB_00158e48;
}
param_3 = pcVar4;
if (pcVar3 <= pcVar4) {
return;
}
do {
pvVar2 = memchr(&DAT_00163b68,(int)*param_3,5);
if (pvVar2 != (void *)0x0) break;
param_3 = param_3 + 1;
} while (param_3 < pcVar3);
if (param_3 == pcVar4) {
return;
}
if ((param_2 & 0xffffffff) < uVar5) {
return;
}
uVar1 = __isoc23_strtoul(pcVar4,0,0x10);
*(int1 *)(param_1 + uVar5) = uVar1;
uVar5 = uVar5 + 1;
if (pcVar3 <= param_3) {
return;
}
} while( true );
}
|
|
65,152 |
js_array_toSorted
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_toSorted(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue arr, obj, ret, *arrp, *pval;
JSObject *p;
int64_t i, len;
uint32_t count32;
int ok;
ok = JS_IsUndefined(argv[0]) || JS_IsFunction(ctx, argv[0]);
if (!ok)
return JS_ThrowTypeError(ctx, "not a function");
ret = JS_EXCEPTION;
arr = JS_UNDEFINED;
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &len, obj))
goto exception;
if (len > UINT32_MAX) {
JS_ThrowRangeError(ctx, "invalid array length");
goto exception;
}
arr = JS_NewArray(ctx);
if (JS_IsException(arr))
goto exception;
if (len > 0) {
p = JS_VALUE_GET_OBJ(arr);
if (expand_fast_array(ctx, p, len) < 0)
goto exception;
p->u.array.count = len;
i = 0;
pval = p->u.array.u.values;
if (js_get_fast_array(ctx, obj, &arrp, &count32) && count32 == len) {
for (; i < len; i++, pval++)
*pval = js_dup(arrp[i]);
} else {
for (; i < len; i++, pval++) {
if (-1 == JS_TryGetPropertyInt64(ctx, obj, i, pval)) {
for (; i < len; i++, pval++)
*pval = JS_UNDEFINED;
goto exception;
}
}
}
if (JS_SetProperty(ctx, arr, JS_ATOM_length, js_int64(len)) < 0)
goto exception;
}
ret = js_array_sort(ctx, arr, argc, argv);
if (JS_IsException(ret))
goto exception;
JS_FreeValue(ctx, ret);
ret = arr;
arr = JS_UNDEFINED;
exception:
JS_FreeValue(ctx, arr);
JS_FreeValue(ctx, obj);
return ret;
}
|
O1
|
c
|
js_array_toSorted:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %rbp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%r8), %rdx
cmpl $0x3, %edx
je 0x76b89
movq (%rbp), %rsi
movq %rbx, %rdi
callq 0x22dbe
testl %eax, %eax
je 0x76c35
movl $0x0, 0x28(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x26ddd
movq %rax, %r14
movq %rdx, %r15
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %rdx
movq %r15, %rcx
callq 0x22adc
movl $0x3, %edx
movl $0x6, %r12d
testl %eax, %eax
je 0x76bce
xorl %r13d, %r13d
xorl %ebp, %ebp
jmp 0x76bfd
movq 0x60(%rsp), %rcx
movabsq $0x100000000, %rax # imm = 0x100000000
cmpq %rax, %rcx
jl 0x76c51
leaq 0x285b5(%rip), %rsi # 0x9f19e
xorl %r13d, %r13d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20add
xorl %ebp, %ebp
movl $0x3, %edx
movq 0x28(%rsp), %rsi
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d8c6
movl %r13d, %r14d
orq %rbp, %r14
movq %r14, %rax
movq %r12, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29694(%rip), %rsi # 0xa02d0
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %r12d
jmp 0x76c20
movq %rcx, 0x38(%rsp)
movq 0x38(%rbx), %rsi
incl (%rsi)
movq %rbx, %rdi
movl $0x2, %edx
callq 0xf516
movq %rax, 0x28(%rsp)
cmpl $0x6, %edx
je 0x76bc7
movq %rax, %rcx
movq 0x38(%rsp), %r13
testq %r13, %r13
movq %rdx, 0x20(%rsp)
jle 0x76dde
movq %rcx, 0x50(%rsp)
movq 0x28(%rsp), %rsi
movq %rbx, %rdi
movq %rsi, 0x30(%rsp)
movl %r13d, %edx
callq 0x3dbb8
testl %eax, %eax
js 0x76e7a
movq 0x30(%rsp), %rax
movl %r13d, 0x40(%rax)
movq 0x38(%rax), %rsi
movq %r14, 0x40(%rsp)
cmpl $-0x1, %r15d
jne 0x76cdd
movq 0x40(%rsp), %rax
cmpw $0x2, 0x6(%rax)
jne 0x76cdd
testb $0x8, 0x5(%rax)
jne 0x76e89
xorl %ecx, %ecx
xorl %edx, %edx
cmpq $0x2, %r13
movl $0x1, %r9d
cmovgeq %r13, %r9
testb %dl, %dl
je 0x76d2b
cmpq %rcx, %r13
jne 0x76d2b
xorl %ecx, %ecx
movq %rsi, %r8
movq (%rax,%rcx), %rdx
movq 0x8(%rax,%rcx), %rsi
movq %rdx, 0x40(%rsp)
cmpl $-0x9, %esi
jb 0x76d17
movq 0x40(%rsp), %rdi
incl (%rdi)
movq %rdx, (%r8,%rcx)
movq %rsi, 0x8(%r8,%rcx)
addq $0x10, %rcx
decq %r9
jne 0x76cfd
jmp 0x76d6a
xorl %ecx, %ecx
movq %rsi, %r13
movq %r9, 0x58(%rsp)
movq %rcx, 0x30(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %r8
callq 0x4d6d1
cmpl $-0x1, %eax
je 0x76e41
movq 0x30(%rsp), %rcx
incq %rcx
addq $0x10, %r13
movq 0x58(%rsp), %r9
cmpq %rcx, %r9
jne 0x76d35
movq 0x38(%rsp), %rcx
movq %rcx, %rax
shrq $0x1f, %rax
cvtsi2sd %rcx, %xmm0
movl %ecx, %ecx
movq %xmm0, %r8
cmoveq %rcx, %r8
movl $0x7, %r9d
cmoveq %rax, %r9
movq 0x28(%rsp), %rsi
movq %rsi, 0x40(%rsp)
movq 0x20(%rsp), %r13
movq %r13, 0x48(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x18(%rsp)
movl $0x4000, 0x10(%rsp) # imm = 0x4000
movq %rbx, %rdi
movq %r13, %rdx
movl $0x32, %ecx
callq 0x24388
movq %r13, %rdx
movq 0x50(%rsp), %rcx
testl %eax, %eax
js 0x76bc7
movq %rbx, %rdi
movq %rcx, %r12
movq %rcx, %rsi
movq %rbp, %r8
callq 0x767cf
movq %r12, %rbp
movq %rax, %r13
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x76e10
movq %r13, %rbp
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rax, %rbp
jmp 0x76e7f
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1d8c6
movq %rbp, %r13
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rax, %rbp
movl $0x0, 0x28(%rsp)
movq 0x20(%rsp), %r12
jmp 0x76bf8
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rsi
cmpq %rax, %rsi
jge 0x76e7a
movq %r13, %rcx
xorl %r13d, %r13d
movq 0x20(%rsp), %rdx
movl $0x0, (%rcx)
movq $0x3, 0x8(%rcx)
incq %rsi
addq $0x10, %rcx
cmpq %rax, %rsi
jl 0x76e5b
jmp 0x76bca
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x20(%rsp), %rdx
jmp 0x76bfd
movl 0x40(%rax), %ecx
movq 0x38(%rax), %rax
movb $0x1, %dl
jmp 0x76ce1
|
js_array_toSorted:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbp, r8
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdx, [r8+8]
cmp edx, 3
jz short loc_76B89
mov rsi, [rbp+0]
mov rdi, rbx
call JS_IsFunction
test eax, eax
jz loc_76C35
loc_76B89:
mov dword ptr [rsp+98h+var_70], 0
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_ToObject
mov r14, rax
mov r15, rdx
lea rsi, [rsp+98h+var_38]
mov rdi, rbx
mov rdx, rax
mov rcx, r15
call js_get_length64
mov edx, 3
mov r12d, 6
test eax, eax
jz short loc_76BCE
loc_76BC7:
xor r13d, r13d
loc_76BCA:
xor ebp, ebp
jmp short loc_76BFD
loc_76BCE:
mov rcx, [rsp+98h+var_38]
mov rax, 100000000h
cmp rcx, rax
jl short loc_76C51
lea rsi, aInvalidArrayLe; "invalid array length"
xor r13d, r13d
mov rdi, rbx
xor eax, eax
call JS_ThrowRangeError
xor ebp, ebp
loc_76BF8:
mov edx, 3
loc_76BFD:
mov rsi, [rsp+98h+var_70]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
call JS_FreeValueRT
mov r14d, r13d
or r14, rbp
loc_76C20:
mov rax, r14
mov rdx, r12
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_76C35:
lea rsi, aSetAddIsNotAFu+0Bh; "not a function"
xor r14d, r14d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r12d, 6
jmp short loc_76C20
loc_76C51:
mov [rsp+98h+var_60], rcx
mov rsi, [rbx+38h]
inc dword ptr [rsi]
mov rdi, rbx
mov edx, 2
call JS_NewObjectFromShape
mov [rsp+98h+var_70], rax
cmp edx, 6
jz loc_76BC7
mov rcx, rax
mov r13, [rsp+98h+var_60]
test r13, r13
mov [rsp+98h+var_78], rdx
jle loc_76DDE
mov [rsp+98h+var_48], rcx
mov rsi, [rsp+98h+var_70]
mov rdi, rbx
mov [rsp+98h+var_68], rsi
mov edx, r13d
call expand_fast_array
test eax, eax
js loc_76E7A
mov rax, [rsp+98h+var_68]
mov [rax+40h], r13d
mov rsi, [rax+38h]
mov qword ptr [rsp+98h+var_58], r14
cmp r15d, 0FFFFFFFFh
jnz short loc_76CDD
mov rax, qword ptr [rsp+98h+var_58]
cmp word ptr [rax+6], 2
jnz short loc_76CDD
test byte ptr [rax+5], 8
jnz loc_76E89
loc_76CDD:
xor ecx, ecx
xor edx, edx
loc_76CE1:
cmp r13, 2
mov r9d, 1
cmovge r9, r13
test dl, dl
jz short loc_76D2B
cmp r13, rcx
jnz short loc_76D2B
xor ecx, ecx
mov r8, rsi
loc_76CFD:
mov rdx, [rax+rcx]
mov rsi, [rax+rcx+8]
mov qword ptr [rsp+98h+var_58], rdx
cmp esi, 0FFFFFFF7h
jb short loc_76D17
mov rdi, qword ptr [rsp+98h+var_58]
inc dword ptr [rdi]
loc_76D17:
mov [r8+rcx], rdx
mov [r8+rcx+8], rsi
add rcx, 10h
dec r9
jnz short loc_76CFD
jmp short loc_76D6A
loc_76D2B:
xor ecx, ecx
mov r13, rsi
mov [rsp+98h+var_40], r9
loc_76D35:
mov [rsp+98h+var_68], rcx
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov r8, r13
call JS_TryGetPropertyInt64
cmp eax, 0FFFFFFFFh
jz loc_76E41
mov rcx, [rsp+98h+var_68]
inc rcx
add r13, 10h
mov r9, [rsp+98h+var_40]
cmp r9, rcx
jnz short loc_76D35
loc_76D6A:
mov rcx, [rsp+98h+var_60]
mov rax, rcx
shr rax, 1Fh
cvtsi2sd xmm0, rcx
mov ecx, ecx
movq r8, xmm0
cmovz r8, rcx
mov r9d, 7
cmovz r9, rax
mov rsi, [rsp+98h+var_70]
mov qword ptr [rsp+98h+var_58], rsi
mov r13, [rsp+98h+var_78]
mov qword ptr [rsp+98h+var_58+8], r13
movups xmm0, [rsp+98h+var_58]
movups [rsp+98h+var_98], xmm0
mov [rsp+98h+var_80], 0
mov [rsp+98h+var_88], 4000h
mov rdi, rbx
mov rdx, r13
mov ecx, 32h ; '2'
call JS_SetPropertyInternal2
mov rdx, r13
mov rcx, [rsp+98h+var_48]
test eax, eax
js loc_76BC7
loc_76DDE:
mov rdi, rbx
mov r12, rcx
mov rsi, rcx
mov r8, rbp
call js_array_sort
mov rbp, r12
mov r13, rax
mov r12, rdx
cmp r12d, 6
jnz short loc_76E10
mov rbp, r13
mov rax, 0FFFFFFFF00000000h
and rbp, rax
jmp short loc_76E7F
loc_76E10:
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
mov r13, rbp
mov rax, 0FFFFFFFF00000000h
and rbp, rax
mov dword ptr [rsp+98h+var_70], 0
mov r12, [rsp+98h+var_78]
jmp loc_76BF8
loc_76E41:
mov rax, [rsp+98h+var_60]
mov rsi, [rsp+98h+var_68]
cmp rsi, rax
jge short loc_76E7A
mov rcx, r13
xor r13d, r13d
mov rdx, [rsp+98h+var_78]
loc_76E5B:
mov dword ptr [rcx], 0
mov qword ptr [rcx+8], 3
inc rsi
add rcx, 10h
cmp rsi, rax
jl short loc_76E5B
jmp loc_76BCA
loc_76E7A:
xor r13d, r13d
xor ebp, ebp
loc_76E7F:
mov rdx, [rsp+98h+var_78]
jmp loc_76BFD
loc_76E89:
mov ecx, [rax+40h]
mov rax, [rax+38h]
mov dl, 1
jmp loc_76CE1
|
unsigned long long js_array_toSorted(
long long a1,
long long a2,
long long a3,
long long a4,
__m128 *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned long long v16; // rdx
long long v17; // rdx
_DWORD *v18; // r14
long long v19; // rdx
long long v20; // r15
int length64; // eax
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rdx
unsigned int v27; // r13d
unsigned long long v28; // rbp
long long v29; // r14
_DWORD *v31; // rsi
long long v32; // rax
long long v33; // r9
__m128 v34; // xmm4
__m128 v35; // xmm5
long long v36; // rcx
double v37; // xmm4_8
double v38; // xmm5_8
_DWORD *v39; // rax
long long v40; // rcx
char v41; // dl
long long v42; // r9
long long v43; // rcx
long long v44; // r8
long long v45; // rdx
long long v46; // rsi
unsigned long long v47; // rcx
long long v48; // r13
double v49; // r8
long long v50; // r9
int v51; // eax
long long v52; // r12
unsigned long long v53; // rax
long long v54; // rdx
long long v55; // rsi
long long v56; // rcx
char v57; // [rsp+0h] [rbp-98h]
unsigned long long v58; // [rsp+20h] [rbp-78h]
long long v59; // [rsp+28h] [rbp-70h]
signed long long v60; // [rsp+30h] [rbp-68h]
long long v61; // [rsp+38h] [rbp-60h]
__m128 v62; // [rsp+40h] [rbp-58h]
long long v63; // [rsp+50h] [rbp-48h]
long long v64; // [rsp+58h] [rbp-40h]
long long v65[7]; // [rsp+60h] [rbp-38h] BYREF
v16 = a5->m128_u64[1];
if ( (_DWORD)v16 != 3 && !(unsigned int)JS_IsFunction(a1, a5->m128_u64[0], v16) )
{
v29 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a function", v17, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v57);
return v29;
}
LODWORD(v59) = 0;
v18 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v20 = v19;
length64 = js_get_length64(a1, v65, (int)v18, v19);
v26 = 3LL;
if ( length64 )
goto LABEL_4;
if ( v65[0] >= 0x100000000LL )
{
v27 = 0;
JS_ThrowRangeError(
a1,
(long long)"invalid array length",
3LL,
v65[0],
v22,
v23,
a7,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
v57);
v28 = 0LL;
LABEL_8:
v26 = 3LL;
goto LABEL_9;
}
v61 = v65[0];
v31 = *(_DWORD **)(a1 + 56);
++*v31;
v32 = JS_NewObjectFromShape(a1, v31, 2u);
v59 = v32;
if ( (_DWORD)v26 == 6 )
goto LABEL_4;
v36 = v32;
v58 = v26;
if ( v61 <= 0 )
{
LABEL_36:
v52 = v36;
v53 = (unsigned long long)js_array_sort(
a1,
v36,
v26,
v36,
a5,
v33,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v34,
v35,
a13,
a14);
v27 = v53;
if ( (_DWORD)v54 != 6 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v53, v54);
v27 = v52;
v28 = v52 & 0xFFFFFFFF00000000LL;
LODWORD(v59) = 0;
goto LABEL_8;
}
v28 = v53 & 0xFFFFFFFF00000000LL;
LABEL_44:
v26 = v58;
goto LABEL_9;
}
v63 = v32;
if ( (int)expand_fast_array(a1, v32, v61) < 0 )
{
LABEL_43:
v27 = 0;
v28 = 0LL;
goto LABEL_44;
}
v39 = (_DWORD *)v59;
*(_DWORD *)(v59 + 64) = v61;
if ( (_DWORD)v20 == -1 && (v39 = v18, *((_WORD *)v18 + 3) == 2) && (*((_BYTE *)v18 + 5) & 8) != 0 )
{
v40 = (unsigned int)v18[16];
v39 = (_DWORD *)*((_QWORD *)v18 + 7);
v41 = 1;
}
else
{
v40 = 0LL;
v41 = 0;
}
v42 = 1LL;
if ( v61 >= 2 )
v42 = v61;
if ( !v41 || v61 != v40 )
{
v47 = 0LL;
v48 = *(_QWORD *)(v59 + 56);
v64 = v42;
while ( 1 )
{
v60 = v47;
if ( (unsigned int)JS_TryGetPropertyInt64(a1, (long long)v18, v20, v47, v48) == -1 )
break;
v47 = v60 + 1;
v48 += 16LL;
if ( v64 == v60 + 1 )
goto LABEL_31;
}
v55 = v60;
if ( v60 < v61 )
{
v56 = v48;
v27 = 0;
v26 = v58;
do
{
*(_DWORD *)v56 = 0;
*(_QWORD *)(v56 + 8) = 3LL;
++v55;
v56 += 16LL;
}
while ( v55 < v61 );
goto LABEL_5;
}
goto LABEL_43;
}
v43 = 0LL;
v44 = *(_QWORD *)(v59 + 56);
do
{
v45 = *(_QWORD *)&v39[v43];
v46 = *(_QWORD *)&v39[v43 + 2];
if ( (unsigned int)v46 >= 0xFFFFFFF7 )
++**(_DWORD **)&v39[v43];
*(_QWORD *)(v44 + v43 * 4) = v45;
*(_QWORD *)(v44 + v43 * 4 + 8) = v46;
v43 += 4LL;
--v42;
}
while ( v42 );
LABEL_31:
v49 = (double)(int)v61;
if ( !((unsigned long long)v61 >> 31) )
*(_QWORD *)&v49 = (unsigned int)v61;
v50 = 7LL;
if ( !((unsigned long long)v61 >> 31) )
v50 = (unsigned long long)v61 >> 31;
v62.m128_u64[0] = v59;
v62.m128_u64[1] = v58;
a7.m128_u64[0] = v59;
v51 = JS_SetPropertyInternal2(
a1,
v59,
v58,
0x32u,
*(_DWORD **)&v49,
v50,
v62,
a8,
a9,
a10,
v37,
v38,
a13,
a14,
v59,
v58,
0x4000u,
0LL);
v26 = v58;
v36 = v63;
if ( v51 >= 0 )
goto LABEL_36;
LABEL_4:
v27 = 0;
LABEL_5:
v28 = 0LL;
LABEL_9:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v59, v26);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v18, v20);
return v28 | v27;
}
| |||
65,153 |
js_array_toSorted
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_toSorted(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue arr, obj, ret, *arrp, *pval;
JSObject *p;
int64_t i, len;
uint32_t count32;
int ok;
ok = JS_IsUndefined(argv[0]) || JS_IsFunction(ctx, argv[0]);
if (!ok)
return JS_ThrowTypeError(ctx, "not a function");
ret = JS_EXCEPTION;
arr = JS_UNDEFINED;
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &len, obj))
goto exception;
if (len > UINT32_MAX) {
JS_ThrowRangeError(ctx, "invalid array length");
goto exception;
}
arr = JS_NewArray(ctx);
if (JS_IsException(arr))
goto exception;
if (len > 0) {
p = JS_VALUE_GET_OBJ(arr);
if (expand_fast_array(ctx, p, len) < 0)
goto exception;
p->u.array.count = len;
i = 0;
pval = p->u.array.u.values;
if (js_get_fast_array(ctx, obj, &arrp, &count32) && count32 == len) {
for (; i < len; i++, pval++)
*pval = js_dup(arrp[i]);
} else {
for (; i < len; i++, pval++) {
if (-1 == JS_TryGetPropertyInt64(ctx, obj, i, pval)) {
for (; i < len; i++, pval++)
*pval = JS_UNDEFINED;
goto exception;
}
}
}
if (JS_SetProperty(ctx, arr, JS_ATOM_length, js_int64(len)) < 0)
goto exception;
}
ret = js_array_sort(ctx, arr, argc, argv);
if (JS_IsException(ret))
goto exception;
JS_FreeValue(ctx, ret);
ret = arr;
arr = JS_UNDEFINED;
exception:
JS_FreeValue(ctx, arr);
JS_FreeValue(ctx, obj);
return ret;
}
|
O2
|
c
|
js_array_toSorted:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%r8), %rdx
cmpl $0x3, %edx
je 0x63d73
movq (%rbp), %rsi
movq %rbx, %rdi
callq 0x1ce7d
testl %eax, %eax
je 0x63e25
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x20b92
movq %rax, %r15
movq %rdx, %rcx
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %rdx
movq %rcx, 0x18(%rsp)
callq 0x1cc43
pushq $0x3
popq %rdx
testl %eax, %eax
je 0x63db3
xorl %r14d, %r14d
xorl %eax, %eax
xorl %r12d, %r12d
xorl %r13d, %r13d
pushq $0x6
popq %rbp
jmp 0x63de9
movq 0x38(%rsp), %r12
movabsq $0x100000000, %rax # imm = 0x100000000
cmpq %rax, %r12
jl 0x63e3e
leaq 0x22320(%rip), %rsi # 0x860ee
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1acb3
xorl %eax, %eax
xorl %r12d, %r12d
xorl %r13d, %r13d
pushq $0x6
popq %rbp
pushq $0x3
popq %rdx
shlq $0x20, %r14
movl %eax, %esi
orq %r14, %rsi
movq %rbx, %rdi
callq 0x1801e
movq %rbx, %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rdx
callq 0x1801e
movl %r12d, %r14d
orq %r13, %r14
movq %r14, %rax
movq %rbp, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x233de(%rip), %rsi # 0x8720a
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rbp
jmp 0x63e10
movq %rbx, %rdi
callq 0x1b2bb
movq %rax, %r13
movq %rax, %r14
shrq $0x20, %r14
cmpl $0x6, %edx
jne 0x63e60
xorl %r12d, %r12d
movq %r13, %rax
jmp 0x63dab
testq %r12, %r12
movq %r15, 0x8(%rsp)
jle 0x63f6d
movq %rdx, 0x10(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movl %r12d, %edx
callq 0x363a5
testl %eax, %eax
js 0x63ee8
movl %r12d, 0x40(%r13)
movq %r13, 0x28(%rsp)
movq 0x38(%r13), %r13
leaq 0x40(%rsp), %rdx
leaq 0x24(%rsp), %rcx
movq %r15, %rdi
movq 0x18(%rsp), %rsi
callq 0x3a26c
testl %eax, %eax
movq %r12, 0x30(%rsp)
je 0x63efb
movl 0x24(%rsp), %eax
cmpq %rax, %r12
jne 0x63efb
movq 0x40(%rsp), %rax
xorl %ecx, %ecx
subq $0x1, %r12
jb 0x63f32
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdi
cmpl $-0x9, %edi
jb 0x63ed8
incl (%rsi)
movq %rsi, (%r13,%rcx)
movq %rdi, 0x8(%r13,%rcx)
addq $0x10, %rcx
jmp 0x63ec2
xorl %r12d, %r12d
movq %r13, %rax
xorl %r13d, %r13d
movq 0x10(%rsp), %rdx
jmp 0x63dae
xorl %r12d, %r12d
movq 0x30(%rsp), %r15
subq %r12, %r15
je 0x63f32
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x42688
cmpl $-0x1, %eax
je 0x63fce
incq %r12
addq $0x10, %r13
jmp 0x63efe
movq 0x30(%rsp), %rdi
callq 0x20a0b
movq %rdx, %r9
pushq $0x32
popq %rcx
movq %rbx, %rdi
movq 0x28(%rsp), %r13
movq %r13, %rsi
movq 0x10(%rsp), %r15
movq %r15, %rdx
movq %rax, %r8
callq 0x1e446
movq %r15, %rdx
testl %eax, %eax
movq 0x8(%rsp), %r15
js 0x63e55
movq %rbx, %rdi
movq %r13, %rsi
movq %rdx, %r15
movq %rbp, %r8
callq 0x63a1b
movq %rax, %r12
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x63fa1
movq %r13, %rax
movq %r12, %r13
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rcx, %r13
movq %r15, %rdx
jmp 0x63ffa
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1801e
movq %r13, %r12
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rax, %r13
xorl %eax, %eax
movq %r15, %rbp
movq 0x8(%rsp), %r15
jmp 0x63de6
xorl %r12d, %r12d
pushq $0x6
popq %rbp
movq 0x10(%rsp), %rdx
subq $0x1, %r15
jb 0x63ff2
andl $0x0, (%r13)
movq $0x3, 0x8(%r13)
addq $0x10, %r13
jmp 0x63fd9
movq 0x28(%rsp), %rax
xorl %r13d, %r13d
movq 0x8(%rsp), %r15
jmp 0x63de9
|
js_array_toSorted:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbp, r8
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdx, [r8+8]
cmp edx, 3
jz short loc_63D73
mov rsi, [rbp+0]
mov rdi, rbx
call JS_IsFunction
test eax, eax
jz loc_63E25
loc_63D73:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_ToObject
mov r15, rax
mov rcx, rdx
lea rsi, [rsp+78h+var_40]
mov rdi, rbx
mov rdx, rax
mov [rsp+78h+var_60], rcx
call js_get_length64
push 3
pop rdx
test eax, eax
jz short loc_63DB3
xor r14d, r14d
xor eax, eax
xor r12d, r12d
loc_63DAB:
xor r13d, r13d
loc_63DAE:
push 6
pop rbp
jmp short loc_63DE9
loc_63DB3:
mov r12, [rsp+78h+var_40]
mov rax, 100000000h
cmp r12, rax
jl short loc_63E3E
lea rsi, aInvalidArrayLe; "invalid array length"
xor r14d, r14d
mov rdi, rbx
xor eax, eax
call JS_ThrowRangeError
xor eax, eax
xor r12d, r12d
xor r13d, r13d
push 6
pop rbp
loc_63DE6:
push 3
pop rdx
loc_63DE9:
shl r14, 20h
mov esi, eax
or rsi, r14
mov rdi, rbx
call JS_FreeValue
mov rdi, rbx
mov rsi, r15
mov rdx, [rsp+78h+var_60]
call JS_FreeValue
mov r14d, r12d
or r14, r13
loc_63E10:
mov rax, r14
mov rdx, rbp
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_63E25:
lea rsi, aSetAddIsNotAFu+0Bh; "not a function"
xor r14d, r14d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
push 6
pop rbp
jmp short loc_63E10
loc_63E3E:
mov rdi, rbx
call JS_NewArray
mov r13, rax
mov r14, rax
shr r14, 20h
cmp edx, 6
jnz short loc_63E60
loc_63E55:
xor r12d, r12d
mov rax, r13
jmp loc_63DAB
loc_63E60:
test r12, r12
mov [rsp+78h+var_70], r15
jle loc_63F6D
mov [rsp+78h+var_68], rdx
mov rdi, rbx
mov rsi, r13
mov edx, r12d
call expand_fast_array
test eax, eax
js short loc_63EE8
mov [r13+40h], r12d
mov [rsp+78h+var_50], r13
mov r13, [r13+38h]
lea rdx, [rsp+78h+var_38]
lea rcx, [rsp+78h+var_54]
mov rdi, r15
mov rsi, [rsp+78h+var_60]
call js_get_fast_array
test eax, eax
mov [rsp+78h+var_48], r12
jz short loc_63EFB
mov eax, [rsp+78h+var_54]
cmp r12, rax
jnz short loc_63EFB
mov rax, [rsp+78h+var_38]
xor ecx, ecx
loc_63EC2:
sub r12, 1
jb short loc_63F32
mov rsi, [rax+rcx]
mov rdi, [rax+rcx+8]
cmp edi, 0FFFFFFF7h
jb short loc_63ED8
inc dword ptr [rsi]
loc_63ED8:
mov [r13+rcx+0], rsi
mov [r13+rcx+8], rdi
add rcx, 10h
jmp short loc_63EC2
loc_63EE8:
xor r12d, r12d
mov rax, r13
xor r13d, r13d
mov rdx, [rsp+78h+var_68]
jmp loc_63DAE
loc_63EFB:
xor r12d, r12d
loc_63EFE:
mov r15, [rsp+78h+var_48]
sub r15, r12
jz short loc_63F32
mov rdi, rbx
mov rsi, [rsp+78h+var_70]
mov rdx, [rsp+78h+var_60]
mov rcx, r12
mov r8, r13
call JS_TryGetPropertyInt64
cmp eax, 0FFFFFFFFh
jz loc_63FCE
inc r12
add r13, 10h
jmp short loc_63EFE
loc_63F32:
mov rdi, [rsp+78h+var_48]
call js_int64
mov r9, rdx
push 32h ; '2'
pop rcx
mov rdi, rbx
mov r13, [rsp+78h+var_50]
mov rsi, r13
mov r15, [rsp+78h+var_68]
mov rdx, r15
mov r8, rax
call JS_SetProperty
mov rdx, r15
test eax, eax
mov r15, [rsp+78h+var_70]
js loc_63E55
loc_63F6D:
mov rdi, rbx
mov rsi, r13
mov r15, rdx
mov r8, rbp
call js_array_sort
mov r12, rax
mov rbp, rdx
cmp ebp, 6
jnz short loc_63FA1
mov rax, r13
mov r13, r12
mov rcx, 0FFFFFFFF00000000h
and r13, rcx
mov rdx, r15
jmp short loc_63FFA
loc_63FA1:
mov rdi, rbx
mov rsi, r12
mov rdx, rbp
call JS_FreeValue
mov r12, r13
mov rax, 0FFFFFFFF00000000h
and r13, rax
xor eax, eax
mov rbp, r15
mov r15, [rsp+78h+var_70]
jmp loc_63DE6
loc_63FCE:
xor r12d, r12d
push 6
pop rbp
mov rdx, [rsp+78h+var_68]
loc_63FD9:
sub r15, 1
jb short loc_63FF2
and dword ptr [r13+0], 0
mov qword ptr [r13+8], 3
add r13, 10h
jmp short loc_63FD9
loc_63FF2:
mov rax, [rsp+78h+var_50]
xor r13d, r13d
loc_63FFA:
mov r15, [rsp+78h+var_70]
jmp loc_63DE9
|
unsigned long long js_array_toSorted(
long long a1,
long long a2,
long long a3,
long long a4,
__m128 *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned long long v17; // rdx
long long v18; // rdx
long long v19; // r15
long long v20; // rdx
int length64; // eax
long long v22; // rcx
long long v23; // r8
long long v24; // r9
__m128 v25; // xmm4
__m128 v26; // xmm5
long long v27; // rdx
unsigned long long v28; // r14
unsigned int v29; // eax
long long v30; // r12
unsigned long long v31; // r13
long long v32; // r12
long long v33; // r14
unsigned long long v35; // rax
long long v36; // rcx
long long v37; // r9
__m128 v38; // xmm4
__m128 v39; // xmm5
long long v40; // r13
long long v41; // r13
int fast_array; // eax
long long v43; // rax
long long i; // rcx
bool v45; // cf
_DWORD *v46; // rsi
long long v47; // rdi
unsigned long long j; // r12
long long v49; // r15
int v50; // eax
int v51; // edx
int v52; // eax
long long v53; // r15
long long v54; // rax
long long v55; // rdx
char v56; // [rsp+0h] [rbp-78h]
long long v57; // [rsp+8h] [rbp-70h]
long long v58; // [rsp+10h] [rbp-68h]
long long v59; // [rsp+18h] [rbp-60h]
int v60; // [rsp+24h] [rbp-54h] BYREF
long long v61; // [rsp+28h] [rbp-50h]
long long v62; // [rsp+30h] [rbp-48h]
long long v63; // [rsp+38h] [rbp-40h] BYREF
_QWORD v64[7]; // [rsp+40h] [rbp-38h] BYREF
v17 = a5->m128_u64[1];
if ( (_DWORD)v17 != 3 && !(unsigned int)JS_IsFunction(a1, a5->m128_u64[0], v17) )
{
v33 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a function", v18, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v56);
return v33;
}
v19 = JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v59 = v20;
length64 = js_get_length64(a1, &v63, v19, v20);
v27 = 3LL;
if ( !length64 )
{
v32 = v63;
if ( v63 < 0x100000000LL )
{
v35 = JS_NewArray(a1);
v40 = v35;
v28 = HIDWORD(v35);
if ( (_DWORD)v27 == 6 )
goto LABEL_13;
v57 = v19;
if ( v32 > 0 )
{
v58 = v27;
if ( (int)expand_fast_array(a1, v35, v32) < 0 )
{
LODWORD(v30) = 0;
v29 = v40;
v31 = 0LL;
v27 = v58;
goto LABEL_9;
}
*(_DWORD *)(v40 + 64) = v32;
v61 = v40;
v41 = *(_QWORD *)(v40 + 56);
fast_array = js_get_fast_array(v19, v59, v64, &v60);
v62 = v32;
if ( fast_array && v32 == v60 )
{
v43 = v64[0];
for ( i = 0LL; ; i += 16LL )
{
v45 = v32-- == 0;
if ( v45 )
break;
v46 = *(_DWORD **)(v43 + i);
v47 = *(_QWORD *)(v43 + i + 8);
if ( (unsigned int)v47 >= 0xFFFFFFF7 )
++*v46;
*(_QWORD *)(v41 + i) = v46;
*(_QWORD *)(v41 + i + 8) = v47;
}
}
else
{
for ( j = 0LL; ; ++j )
{
v49 = v62 - j;
if ( v62 == j )
break;
if ( (unsigned int)JS_TryGetPropertyInt64(a1, v57, v59, j, v41) == -1 )
{
LODWORD(v30) = 0;
v27 = v58;
while ( 1 )
{
v45 = v49-- == 0;
if ( v45 )
break;
*(_DWORD *)v41 = 0;
*(_QWORD *)(v41 + 8) = 3LL;
v41 += 16LL;
}
v29 = v61;
v31 = 0LL;
goto LABEL_36;
}
v41 += 16LL;
}
}
v50 = js_int64(v62);
v40 = v61;
v52 = JS_SetProperty(a1, v61, v58, 50, v50, v51);
v27 = v58;
v19 = v57;
if ( v52 < 0 )
{
LABEL_13:
LODWORD(v30) = 0;
v29 = v40;
goto LABEL_5;
}
}
v53 = v27;
v54 = js_array_sort(a1, v40, v27, v36, a5, v37, *(double *)a7.m128_u64, a8, a9, a10, v38, v39, a13, a14);
v30 = v54;
if ( (_DWORD)v55 == 6 )
{
v29 = v40;
v31 = v30 & 0xFFFFFFFF00000000LL;
v27 = v53;
LABEL_36:
v19 = v57;
goto LABEL_9;
}
JS_FreeValue(a1, v54, v55);
LODWORD(v30) = v40;
v31 = v40 & 0xFFFFFFFF00000000LL;
v29 = 0;
v19 = v57;
}
else
{
v28 = 0LL;
JS_ThrowRangeError(
a1,
(long long)"invalid array length",
3LL,
v22,
v23,
v24,
a7,
a8,
a9,
a10,
v25,
v26,
a13,
a14,
v56);
v29 = 0;
LODWORD(v30) = 0;
v31 = 0LL;
}
v27 = 3LL;
goto LABEL_9;
}
v28 = 0LL;
v29 = 0;
LODWORD(v30) = 0;
LABEL_5:
v31 = 0LL;
LABEL_9:
JS_FreeValue(a1, (v28 << 32) | v29, v27);
JS_FreeValue(a1, v19, v59);
return v31 | (unsigned int)v30;
}
|
js_array_toSorted:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBP,R8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDX,qword ptr [R8 + 0x8]
CMP EDX,0x3
JZ 0x00163d73
MOV RSI,qword ptr [RBP]
MOV RDI,RBX
CALL 0x0011ce7d
TEST EAX,EAX
JZ 0x00163e25
LAB_00163d73:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00120b92
MOV R15,RAX
MOV RCX,RDX
LEA RSI,[RSP + 0x38]
MOV RDI,RBX
MOV RDX,RAX
MOV qword ptr [RSP + 0x18],RCX
CALL 0x0011cc43
PUSH 0x3
POP RDX
TEST EAX,EAX
JZ 0x00163db3
XOR R14D,R14D
XOR EAX,EAX
XOR R12D,R12D
LAB_00163dab:
XOR R13D,R13D
LAB_00163dae:
PUSH 0x6
POP RBP
JMP 0x00163de9
LAB_00163db3:
MOV R12,qword ptr [RSP + 0x38]
MOV RAX,0x100000000
CMP R12,RAX
JL 0x00163e3e
LEA RSI,[0x1860ee]
XOR R14D,R14D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011acb3
XOR EAX,EAX
XOR R12D,R12D
XOR R13D,R13D
PUSH 0x6
POP RBP
LAB_00163de6:
PUSH 0x3
POP RDX
LAB_00163de9:
SHL R14,0x20
MOV ESI,EAX
OR RSI,R14
MOV RDI,RBX
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R15
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x0011801e
MOV R14D,R12D
OR R14,R13
LAB_00163e10:
MOV RAX,R14
MOV RDX,RBP
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00163e25:
LEA RSI,[0x18720a]
XOR R14D,R14D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP RBP
JMP 0x00163e10
LAB_00163e3e:
MOV RDI,RBX
CALL 0x0011b2bb
MOV R13,RAX
MOV R14,RAX
SHR R14,0x20
CMP EDX,0x6
JNZ 0x00163e60
LAB_00163e55:
XOR R12D,R12D
MOV RAX,R13
JMP 0x00163dab
LAB_00163e60:
TEST R12,R12
MOV qword ptr [RSP + 0x8],R15
JLE 0x00163f6d
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,RBX
MOV RSI,R13
MOV EDX,R12D
CALL 0x001363a5
TEST EAX,EAX
JS 0x00163ee8
MOV dword ptr [R13 + 0x40],R12D
MOV qword ptr [RSP + 0x28],R13
MOV R13,qword ptr [R13 + 0x38]
LEA RDX,[RSP + 0x40]
LEA RCX,[RSP + 0x24]
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0013a26c
TEST EAX,EAX
MOV qword ptr [RSP + 0x30],R12
JZ 0x00163efb
MOV EAX,dword ptr [RSP + 0x24]
CMP R12,RAX
JNZ 0x00163efb
MOV RAX,qword ptr [RSP + 0x40]
XOR ECX,ECX
LAB_00163ec2:
SUB R12,0x1
JC 0x00163f32
MOV RSI,qword ptr [RAX + RCX*0x1]
MOV RDI,qword ptr [RAX + RCX*0x1 + 0x8]
CMP EDI,-0x9
JC 0x00163ed8
INC dword ptr [RSI]
LAB_00163ed8:
MOV qword ptr [R13 + RCX*0x1],RSI
MOV qword ptr [R13 + RCX*0x1 + 0x8],RDI
ADD RCX,0x10
JMP 0x00163ec2
LAB_00163ee8:
XOR R12D,R12D
MOV RAX,R13
XOR R13D,R13D
MOV RDX,qword ptr [RSP + 0x10]
JMP 0x00163dae
LAB_00163efb:
XOR R12D,R12D
LAB_00163efe:
MOV R15,qword ptr [RSP + 0x30]
SUB R15,R12
JZ 0x00163f32
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,R12
MOV R8,R13
CALL 0x00142688
CMP EAX,-0x1
JZ 0x00163fce
INC R12
ADD R13,0x10
JMP 0x00163efe
LAB_00163f32:
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00120a0b
MOV R9,RDX
PUSH 0x32
POP RCX
MOV RDI,RBX
MOV R13,qword ptr [RSP + 0x28]
MOV RSI,R13
MOV R15,qword ptr [RSP + 0x10]
MOV RDX,R15
MOV R8,RAX
CALL 0x0011e446
MOV RDX,R15
TEST EAX,EAX
MOV R15,qword ptr [RSP + 0x8]
JS 0x00163e55
LAB_00163f6d:
MOV RDI,RBX
MOV RSI,R13
MOV R15,RDX
MOV R8,RBP
CALL 0x00163a1b
MOV R12,RAX
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00163fa1
MOV RAX,R13
MOV R13,R12
MOV RCX,-0x100000000
AND R13,RCX
MOV RDX,R15
JMP 0x00163ffa
LAB_00163fa1:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,RBP
CALL 0x0011801e
MOV R12,R13
MOV RAX,-0x100000000
AND R13,RAX
XOR EAX,EAX
MOV RBP,R15
MOV R15,qword ptr [RSP + 0x8]
JMP 0x00163de6
LAB_00163fce:
XOR R12D,R12D
PUSH 0x6
POP RBP
MOV RDX,qword ptr [RSP + 0x10]
LAB_00163fd9:
SUB R15,0x1
JC 0x00163ff2
AND dword ptr [R13],0x0
MOV qword ptr [R13 + 0x8],0x3
ADD R13,0x10
JMP 0x00163fd9
LAB_00163ff2:
MOV RAX,qword ptr [RSP + 0x28]
XOR R13D,R13D
LAB_00163ffa:
MOV R15,qword ptr [RSP + 0x8]
JMP 0x00163de9
|
int1 [16]
js_array_toSorted(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int *piVar1;
int8 uVar2;
int iVar3;
uint uVar4;
int8 uVar5;
long lVar6;
int8 uVar8;
uint uVar9;
ulong uVar10;
int4 *puVar11;
ulong uVar12;
ulong uVar13;
long lVar14;
bool bVar15;
int1 auVar16 [16];
int1 auVar17 [16];
int8 uStack_80;
uint local_54;
ulong local_40;
long local_38;
int8 uVar7;
if (((int)param_5[1] != 3) && (iVar3 = JS_IsFunction(param_1,*param_5), iVar3 == 0)) {
uVar12 = 0;
JS_ThrowTypeError(param_1,"not a function");
uStack_80 = 6;
goto LAB_00163e10;
}
auVar16 = JS_ToObject(param_1,param_2,param_3);
uVar7 = auVar16._8_8_;
uVar5 = auVar16._0_8_;
iVar3 = js_get_length64(param_1,&local_40,uVar5);
if (iVar3 == 0) {
if ((long)local_40 < 0x100000000) {
auVar16 = JS_NewArray(param_1);
uVar8 = auVar16._8_8_;
uVar12 = auVar16._0_8_;
uVar13 = uVar12 >> 0x20;
if (auVar16._8_4_ != 6) {
if ((long)local_40 < 1) {
LAB_00163f6d:
auVar17 = js_array_sort(param_1,uVar12);
if (auVar17._8_4_ != 6) {
JS_FreeValue(param_1,auVar17._0_8_,auVar17._8_8_);
uVar12 = uVar12 & 0xffffffff00000000;
goto LAB_00163de6;
}
uVar12 = auVar17._0_8_ & 0xffffffff00000000;
LAB_00163ffa:
uStack_80 = auVar17._8_8_;
uVar9 = auVar17._0_4_;
uVar4 = auVar16._0_4_;
goto LAB_00163de9;
}
iVar3 = expand_fast_array(param_1,uVar12,local_40 & 0xffffffff);
if (-1 < iVar3) {
*(int *)(uVar12 + 0x40) = (int)local_40;
puVar11 = *(int4 **)(uVar12 + 0x38);
iVar3 = js_get_fast_array(uVar5,uVar7,&local_38);
if ((iVar3 == 0) || (local_40 != local_54)) {
lVar6 = 0;
LAB_00163efe:
lVar14 = local_40 - lVar6;
if (lVar14 != 0) {
iVar3 = JS_TryGetPropertyInt64(param_1,uVar5,uVar7,lVar6,puVar11);
if (iVar3 != -1) goto code_r0x00163f29;
auVar17 = ZEXT816(6) << 0x40;
while (bVar15 = lVar14 != 0, lVar14 = lVar14 + -1, bVar15) {
*puVar11 = 0;
*(int8 *)(puVar11 + 2) = 3;
puVar11 = puVar11 + 4;
}
uVar12 = 0;
goto LAB_00163ffa;
}
goto LAB_00163f32;
}
lVar6 = 0;
uVar10 = local_40;
while (bVar15 = uVar10 != 0, uVar10 = uVar10 - 1, bVar15) {
piVar1 = *(int **)(local_38 + lVar6);
uVar2 = *(int8 *)(local_38 + 8 + lVar6);
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
*(int **)((long)puVar11 + lVar6) = piVar1;
*(int8 *)((long)puVar11 + lVar6 + 8) = uVar2;
lVar6 = lVar6 + 0x10;
}
LAB_00163f32:
auVar17 = js_int64(local_40);
iVar3 = JS_SetProperty(param_1,uVar12,uVar8,0x32,auVar17._0_8_,auVar17._8_8_);
if (-1 < iVar3) goto LAB_00163f6d;
}
}
goto LAB_00163dae;
}
uVar13 = 0;
JS_ThrowRangeError(param_1,"invalid array length");
uVar12 = 0;
auVar16 = ZEXT816(6) << 0x40;
LAB_00163de6:
uStack_80 = auVar16._8_8_;
uVar9 = auVar16._0_4_;
uVar4 = 0;
uVar8 = 3;
}
else {
uVar13 = 0;
auVar16 = ZEXT816(3) << 0x40;
LAB_00163dae:
uVar8 = auVar16._8_8_;
uVar9 = 0;
uVar12 = 0;
uVar4 = auVar16._0_4_;
uStack_80 = 6;
}
LAB_00163de9:
JS_FreeValue(param_1,(ulong)uVar4 | uVar13 << 0x20,uVar8);
JS_FreeValue(param_1,uVar5,uVar7);
uVar12 = uVar9 | uVar12;
LAB_00163e10:
auVar16._8_8_ = uStack_80;
auVar16._0_8_ = uVar12;
return auVar16;
code_r0x00163f29:
lVar6 = lVar6 + 1;
puVar11 = puVar11 + 4;
goto LAB_00163efe;
}
|
|
65,154 |
serial_cpp::Serial::Serial(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, serial_cpp::Timeout, serial_cpp::bytesize_t, serial_cpp::parity_t, serial_cpp::stopbits_t, serial_cpp::flowcontrol_t)
|
ami-iit[P]serial_cpp/src/serial.cc
|
Serial::Serial (const string &port, uint32_t baudrate, serial_cpp::Timeout timeout,
bytesize_t bytesize, parity_t parity, stopbits_t stopbits,
flowcontrol_t flowcontrol)
: pimpl_(new SerialImpl (port, baudrate, bytesize, parity,
stopbits, flowcontrol))
{
pimpl_->setTimeout(timeout);
}
|
O0
|
cpp
|
serial_cpp::Serial::Serial(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, serial_cpp::Timeout, serial_cpp::bytesize_t, serial_cpp::parity_t, serial_cpp::stopbits_t, serial_cpp::flowcontrol_t):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x28(%rbp), %eax
leaq 0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0x11f08(%rip), %rcx # 0x16c80
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movl $0xb8, %edi
callq 0x3320
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
movl -0x20(%rbp), %r9d
movl 0x28(%rbp), %r10d
movq %rsp, %rax
movl %r10d, (%rax)
callq 0x87a0
jmp 0x4dbc
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq %rdx, (%rcx)
movq 0x8(%rax), %rdi
callq 0xa960
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0xb8, %esi
callq 0x3330
movq -0x28(%rbp), %rdi
callq 0x35d0
nopw %cs:(%rax,%rax)
|
_ZN10serial_cpp6SerialC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjNS_7TimeoutENS_10bytesize_tENS_8parity_tENS_10stopbits_tENS_13flowcontrol_tE:
push rbp; Alternative name is 'serial_cpp::Serial::Serial(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int, serial_cpp::Timeout, serial_cpp::bytesize_t, serial_cpp::parity_t, serial_cpp::stopbits_t, serial_cpp::flowcontrol_t)'
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_18]
lea rax, [rbp+arg_0]
mov [rbp+var_50], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov [rbp+var_1C], r8d
mov [rbp+var_20], r9d
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
lea rcx, off_16C80
mov [rax], rcx
add rax, 8
mov [rbp+var_40], rax
mov edi, 0B8h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
mov rax, rdi
mov [rbp+var_38], rax
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
mov ecx, [rbp+var_18]
mov r8d, [rbp+var_1C]
mov r9d, [rbp+var_20]
mov r10d, [rbp+arg_18]
mov rax, rsp
mov [rax], r10d
call _ZN10serial_cpp6Serial10SerialImplC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmNS_10bytesize_tENS_8parity_tENS_10stopbits_tENS_13flowcontrol_tE; serial_cpp::Serial::SerialImpl::SerialImpl(std::string const&,ulong,serial_cpp::bytesize_t,serial_cpp::parity_t,serial_cpp::stopbits_t,serial_cpp::flowcontrol_t)
jmp short $+2
loc_4DBC:
mov rsi, [rbp+var_50]; serial_cpp::Timeout *
mov rax, [rbp+var_48]
mov rcx, [rbp+var_40]
mov rdx, [rbp+var_38]
mov [rcx], rdx
mov rdi, [rax+8]; this
call _ZN10serial_cpp6Serial10SerialImpl10setTimeoutERNS_7TimeoutE; serial_cpp::Serial::SerialImpl::setTimeout(serial_cpp::Timeout &)
add rsp, 60h
pop rbp
retn
mov rdi, [rbp+var_38]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
mov esi, 0B8h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rbp+var_28]
call __Unwind_Resume
|
long long serial_cpp::Serial::Serial(
long long a1,
int a2,
int a3,
int a4,
int a5,
int a6,
char a7,
int a8,
int a9,
int a10)
{
void *v11; // [rsp+28h] [rbp-38h]
*(_QWORD *)a1 = off_16C80;
v11 = (void *)operator new(0xB8uLL);
serial_cpp::Serial::SerialImpl::SerialImpl((_DWORD)v11, a2, a3, a4, a5, a6, a10);
*(_QWORD *)(a1 + 8) = v11;
return serial_cpp::Serial::SerialImpl::setTimeout(
*(serial_cpp::Serial::SerialImpl **)(a1 + 8),
(serial_cpp::Timeout *)&a7);
}
|
Serial:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x28]
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV dword ptr [RBP + -0x1c],R8D
MOV dword ptr [RBP + -0x20],R9D
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RAX
LEA RCX,[0x116c80]
MOV qword ptr [RAX],RCX
ADD RAX,0x8
MOV qword ptr [RBP + -0x40],RAX
MOV EDI,0xb8
CALL 0x00103320
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x38],RAX
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
MOV ECX,dword ptr [RBP + -0x18]
MOV R8D,dword ptr [RBP + -0x1c]
MOV R9D,dword ptr [RBP + -0x20]
MOV R10D,dword ptr [RBP + 0x28]
LAB_00104daf:
MOV RAX,RSP
MOV dword ptr [RAX],R10D
CALL 0x001087a0
LAB_00104dba:
JMP 0x00104dbc
LAB_00104dbc:
MOV RSI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX],RDX
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0010a960
ADD RSP,0x60
POP RBP
RET
|
/* serial_cpp::Serial::Serial(std::__cxx11::string const&, unsigned int, serial_cpp::Timeout,
serial_cpp::bytesize_t, serial_cpp::parity_t, serial_cpp::stopbits_t, serial_cpp::flowcontrol_t)
*/
void __thiscall
serial_cpp::Serial::Serial
(Serial *this,int8 param_1,int4 param_2,int4 param_4,int4 param_5,
int4 param_6)
{
SerialImpl *pSVar1;
int4 in_stack_00000020;
*(int ***)this = &PTR__Serial_00116c80;
pSVar1 = (SerialImpl *)operator_new(0xb8);
/* try { // try from 00104daf to 00104db9 has its CatchHandler @ 00104dde */
SerialImpl::SerialImpl(pSVar1,param_1,param_2,param_4,param_5,param_6,in_stack_00000020);
*(SerialImpl **)(this + 8) = pSVar1;
SerialImpl::setTimeout(*(SerialImpl **)(this + 8),(Timeout *)&stack0x00000008);
return;
}
|
|
65,155 |
my_caseup_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static size_t
my_caseup_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
while ((src < srcend) &&
(srcres= my_mb_wc_utf8mb4(cs, &wc,
(uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
}
|
O3
|
c
|
my_caseup_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x38(%rbp)
movq %rcx, %r13
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x5335d
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq -0x30(%rbp), %r13
addq %r13, -0x38(%rbp)
movq 0x78(%rdi), %r14
leaq -0x40(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x563ee
testl %eax, %eax
jle 0x5335d
movl %eax, %ebx
movq -0x40(%rbp), %rsi
cmpq (%r14), %rsi
ja 0x5333e
movq 0x8(%r14), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x5333e
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdx
movq -0x38(%rbp), %rcx
callq 0x530dd
testl %eax, %eax
jle 0x5335d
movl %ebx, %ecx
addq %rcx, %r12
movl %eax, %eax
addq %rax, %r13
cmpq %r15, %r12
jb 0x532fd
subq -0x30(%rbp), %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_caseup_utf8mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], r8
mov r13, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle short loc_5335D
mov r15, rdx
mov r12, rsi
add r15, rsi
mov r13, [rbp+var_30]
add [rbp+var_38], r13
mov r14, [rdi+78h]
loc_532FD:
lea rdi, [rbp+var_40]
mov rsi, r12
mov rdx, r15
call my_mb_wc_utf8mb4_quick_0
test eax, eax
jle short loc_5335D
mov ebx, eax
mov rsi, [rbp+var_40]
cmp rsi, [r14]
ja short loc_5333E
mov rax, [r14+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_5333E
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4]
mov [rbp+var_40], rsi
loc_5333E:
mov rdx, r13
mov rcx, [rbp+var_38]
call my_wc_mb_utf8mb4
test eax, eax
jle short loc_5335D
mov ecx, ebx
add r12, rcx
mov eax, eax
add r13, rax
cmp r12, r15
jb short loc_532FD
loc_5335D:
sub r13, [rbp+var_30]
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_BYTE * my_caseup_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, unsigned long long a5)
{
_BYTE *v5; // r13
unsigned long long v6; // r12
unsigned long long v7; // r15
unsigned long long *v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
int v13; // eax
unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+8h] [rbp-38h]
_BYTE *v17; // [rsp+10h] [rbp-30h]
v16 = a5;
v5 = a4;
v17 = a4;
if ( a3 > 0 )
{
v6 = a2;
v7 = a2 + a3;
v5 = v17;
v16 += (unsigned long long)v17;
v8 = *(unsigned long long **)(a1 + 120);
do
{
v9 = my_mb_wc_utf8mb4_quick_0(&v15, v6, v7);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v15;
if ( v15 <= *v8 )
{
v12 = *(_QWORD *)(v8[1] + 8 * (v15 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v15);
v15 = v11;
}
}
v13 = my_wc_mb_utf8mb4((long long)&v15, v11, v5, v16);
if ( v13 <= 0 )
break;
v6 += v10;
v5 += (unsigned int)v13;
}
while ( v6 < v7 );
}
return (_BYTE *)(v5 - v17);
}
|
my_caseup_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],R8
MOV R13,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x0015335d
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV R13,qword ptr [RBP + -0x30]
ADD qword ptr [RBP + -0x38],R13
MOV R14,qword ptr [RDI + 0x78]
LAB_001532fd:
LEA RDI,[RBP + -0x40]
MOV RSI,R12
MOV RDX,R15
CALL 0x001563ee
TEST EAX,EAX
JLE 0x0015335d
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
CMP RSI,qword ptr [R14]
JA 0x0015333e
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x0015333e
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_0015333e:
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x001530dd
TEST EAX,EAX
JLE 0x0015335d
MOV ECX,EBX
ADD R12,RCX
MOV EAX,EAX
ADD R13,RAX
CMP R12,R15
JC 0x001532fd
LAB_0015335d:
SUB R13,qword ptr [RBP + -0x30]
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong *puVar1;
long lVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
ulong local_48;
long local_40;
long local_38;
local_38 = param_4;
if (0 < param_3) {
uVar5 = param_3 + param_2;
local_40 = param_5 + param_4;
puVar1 = *(ulong **)(param_1 + 0x78);
do {
uVar3 = my_mb_wc_utf8mb4_quick(&local_48,param_2,uVar5);
if ((int)uVar3 < 1) break;
if ((local_48 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (local_48 >> 8) * 8), lVar2 != 0))
{
local_48 = (ulong)*(uint *)(lVar2 + (local_48 & 0xff) * 0xc);
}
uVar4 = my_wc_mb_utf8mb4();
if ((int)uVar4 < 1) break;
param_2 = param_2 + uVar3;
param_4 = param_4 + (ulong)uVar4;
} while (param_2 < uVar5);
}
return param_4 - local_38;
}
|
|
65,156 |
parse_json_tool_calls(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::optional<std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>>> const&, std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&)
|
monkey531[P]llama/common/chat.cpp
|
static common_chat_msg parse_json_tool_calls(
const std::string& input,
const std::optional<std::regex> & trigger_opt,
const std::regex & function_regex,
const std::regex & close_regex) {
std::smatch match;
common_chat_msg result;
result.role = "assistant";
auto end = input.end();
auto it = input.begin();
if (trigger_opt) {
if (!std::regex_search(it, end, match, *trigger_opt)) {
result.content = input;
return result;
}
result.content = match.prefix().str();
it = match.suffix().first;
}
while (it != end) {
std::sregex_iterator rend;
std::sregex_iterator rit(it, end, function_regex);
if (rit == rend) {
fprintf(stderr, "No more tool calls found\n");
result.content += std::string(it, end);
break;
}
auto name = rit->str(1);
result.content += std::string(it, rit->prefix().second);
it = rit->suffix().first;
json arguments;
if (!parse_json(it, end, arguments)) {
throw std::runtime_error("Failed to parse json tool call arguments");
}
if (!std::regex_search(it, end, match, close_regex)) {
throw std::runtime_error("Malformed input, missing closing pattern");
}
it = match.suffix().first;
result.tool_calls.push_back({name, arguments.is_string() ? arguments.get<std::string>() : arguments.dump(), /* id= */ ""});
}
return result;
}
|
O2
|
cpp
|
parse_json_tool_calls(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::optional<std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>>> const&, std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %r8, 0x58(%rsp)
movq %rcx, 0x60(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
callq 0x8842a
leaq 0x558cb(%rip), %rsi # 0x103dc7
movq %r12, %rdi
callq 0x29580
movq (%r14), %rbx
movq 0x8(%r14), %rbp
addq %rbx, %rbp
movq %rbp, 0x68(%rsp)
movq %rbx, 0x18(%rsp)
cmpb $0x1, 0x20(%r15)
movq %r12, 0x10(%rsp)
jne 0xae5c5
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x63b2e
testb %al, %al
je 0xae866
movq 0x28(%rsp), %rsi
movq %rsi, %rax
subq 0x20(%rsp), %rax
cqto
pushq $0x18
popq %r14
idivq %r14
leaq -0x30(%rsi), %rcx
addq $-0x48, %rsi
cmpq $0x4, %rax
cmovaeq %rcx, %rsi
leaq 0x80(%rsp), %rdi
movq 0x10(%rsp), %r12
callq 0x62074
leaq 0x20(%r12), %rdi
leaq 0x80(%rsp), %rbx
movq %rbx, %rsi
callq 0x28d80
movq %rbx, %rdi
callq 0x29678
movq 0x28(%rsp), %rcx
movq %rcx, %rax
subq 0x20(%rsp), %rax
cqto
idivq %r14
leaq -0x18(%rcx), %rdx
addq $-0x48, %rcx
cmpq $0x4, %rax
cmovaeq %rdx, %rcx
movq (%rcx), %rbx
movq %rbx, 0x18(%rsp)
leaq 0x20(%r12), %rax
movq %rax, 0x48(%rsp)
leaq 0x40(%r12), %rax
movq %rax, 0x50(%rsp)
leaq 0x100(%rsp), %r12
leaq 0x80(%rsp), %r13
leaq 0x70(%rsp), %r15
cmpq %rbp, %rbx
je 0xae877
leaq 0x160(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movups %xmm0, 0x14c(%rsp)
movaps %xmm0, 0x140(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq 0x60(%rsp), %rcx
xorl %r8d, %r8d
callq 0xa0128
movq %r12, %r14
movq %r12, %rdi
leaq 0x140(%rsp), %rsi
callq 0xa0360
movl %eax, %r12d
testb %al, %al
jne 0xae81a
leaq 0xe0(%rsp), %rdi
leaq 0x120(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0xc025c
movq 0x128(%rsp), %rcx
movq %rcx, %rax
subq 0x120(%rsp), %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
leaq -0x30(%rcx), %rdx
addq $-0x48, %rcx
cmpq $0x4, %rax
cmovaeq %rdx, %rcx
movq 0x8(%rcx), %rdx
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x620ae
movq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x295b0
movq %r13, %rdi
callq 0x29678
movq 0x128(%rsp), %rcx
movq %rcx, %rax
subq 0x120(%rsp), %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
leaq -0x18(%rcx), %rdx
addq $-0x48, %rcx
cmpq $0x4, %rax
cmovaeq %rdx, %rcx
movq (%rcx), %rax
movq %rax, 0x18(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x3eb74
leaq 0x18(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq %r15, %rdx
callq 0xae9d2
testb %al, %al
je 0xae898
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
leaq 0x20(%rsp), %rdx
movq 0x58(%rsp), %rcx
xorl %r8d, %r8d
callq 0x63b2e
testb %al, %al
je 0xae8b4
movq 0x28(%rsp), %rcx
movq %rcx, %rax
subq 0x20(%rsp), %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
leaq -0x18(%rcx), %rdx
addq $-0x48, %rcx
cmpq $0x4, %rax
cmovaeq %rdx, %rcx
movq (%rcx), %rbx
movq %rbx, 0x18(%rsp)
movq %r13, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x28f50
cmpb $0x3, 0x70(%rsp)
jne 0xae793
leaq 0xa0(%rsp), %rdi
movq %r15, %rsi
callq 0x6d682
jmp 0xae7af
leaq 0xa0(%rsp), %rdi
movq %r15, %rsi
pushq $-0x1
popq %rdx
pushq $0x20
popq %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x66606
leaq 0xc0(%rsp), %rdi
leaq 0x4753a(%rip), %rsi # 0xf5cf8
leaq 0xf(%rsp), %rdx
callq 0x3bddc
movq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0xbfdd2
movq %r13, %rdi
callq 0x7afaa
movq %r15, %rdi
callq 0x3f736
leaq 0xe0(%rsp), %rdi
callq 0x29678
leaq 0x120(%rsp), %rdi
callq 0x3df18
leaq 0x160(%rsp), %rdi
callq 0x3df18
testb %r12b, %r12b
movq %r14, %r12
je 0xae5ee
jmp 0xae877
movq 0xb8767(%rip), %rax # 0x166f88
movq (%rax), %rcx
leaq 0x53bdd(%rip), %rdi # 0x102408
pushq $0x19
popq %rsi
pushq $0x1
popq %rdx
callq 0x295a0
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x620ae
movq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x295b0
movq %r13, %rdi
jmp 0xae7ed
movq 0x10(%rsp), %rax
leaq 0x20(%rax), %rdi
movq %r14, %rsi
callq 0x28600
leaq 0x20(%rsp), %rdi
callq 0x3df18
movq 0x10(%rsp), %rax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x28580
movq %rax, %r14
leaq 0x53b78(%rip), %rsi # 0x102422
movq %rax, %rdi
callq 0x28410
jmp 0xae8ce
pushq $0x10
popq %rdi
callq 0x28580
movq %rax, %r14
leaq 0x53b85(%rip), %rsi # 0x10244b
movq %rax, %rdi
callq 0x28410
movq 0xb871b(%rip), %rsi # 0x166ff0
movq 0xb867c(%rip), %rdx # 0x166f58
movq %r14, %rdi
callq 0x29320
jmp 0xae905
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0xae994
jmp 0xae975
movq %rax, %rbx
movq 0x10(%rsp), %r12
jmp 0xae9b8
movq %rax, %rbx
jmp 0xae9b8
movq %rax, %rbx
jmp 0xae9c0
jmp 0xae917
movq %rax, %rbx
movq %r14, %rdi
callq 0x28830
jmp 0xae982
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x29678
jmp 0xae939
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x29678
jmp 0xae982
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x7afaa
jmp 0xae982
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x29678
jmp 0xae98c
jmp 0xae97f
movq %rax, %rbx
jmp 0xae98c
jmp 0xae97f
movq %rax, %rbx
jmp 0xae999
movq %rax, %rbx
jmp 0xae9a6
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x3f736
leaq 0xe0(%rsp), %rdi
callq 0x29678
leaq 0x120(%rsp), %rdi
callq 0x3df18
movq 0x10(%rsp), %r12
leaq 0x160(%rsp), %rdi
callq 0x3df18
movq %r12, %rdi
callq 0x7abf0
leaq 0x20(%rsp), %rdi
callq 0x3df18
movq %rbx, %rdi
callq 0x293c0
|
_ZL21parse_json_tool_callsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8optionalINS_11basic_regexIcNS_12regex_traitsIcEEEEERKSB_SG_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 188h
mov [rsp+1B8h+var_160], r8
mov [rsp+1B8h+var_158], rcx
mov r15, rdx
mov r14, rsi
mov r12, rdi
xorps xmm0, xmm0
movaps [rsp+1B8h+var_188], xmm0
movaps [rsp+1B8h+var_198], xmm0
call _ZN15common_chat_msgC2Ev; common_chat_msg::common_chat_msg(void)
lea rsi, aYouAreAHelpful+12h; "assistant"
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
mov rbx, [r14]
mov rbp, [r14+8]
add rbp, rbx
mov [rsp+1B8h+var_150], rbp
mov [rsp+1B8h+var_1A0], rbx
cmp byte ptr [r15+20h], 1
mov [rsp+1B8h+var_1A8], r12
jnz loc_AE5C5
lea rdx, [rsp+1B8h+var_198]
mov rdi, rbx
mov rsi, rbp
mov rcx, r15
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
test al, al
jz loc_AE866
mov rsi, qword ptr [rsp+1B8h+var_198+8]
mov rax, rsi
sub rax, qword ptr [rsp+1B8h+var_198]
cqo
push 18h
pop r14
idiv r14
lea rcx, [rsi-30h]
add rsi, 0FFFFFFFFFFFFFFB8h
cmp rax, 4
cmovnb rsi, rcx
lea rdi, [rsp+1B8h+var_138]
mov r12, [rsp+1B8h+var_1A8]
call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void)
lea rdi, [r12+20h]
lea rbx, [rsp+1B8h+var_138]
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rcx, qword ptr [rsp+1B8h+var_198+8]
mov rax, rcx
sub rax, qword ptr [rsp+1B8h+var_198]
cqo
idiv r14
lea rdx, [rcx-18h]
add rcx, 0FFFFFFFFFFFFFFB8h
cmp rax, 4
cmovnb rcx, rdx
mov rbx, [rcx]
mov [rsp+1B8h+var_1A0], rbx
loc_AE5C5:
lea rax, [r12+20h]
mov [rsp+1B8h+var_170], rax
lea rax, [r12+40h]
mov [rsp+1B8h+var_168], rax
lea r12, [rsp+1B8h+var_B8]
lea r13, [rsp+1B8h+var_138]
lea r15, [rsp+1B8h+var_148]
loc_AE5EE:
cmp rbx, rbp
jz loc_AE877
lea rax, [rsp+1B8h+var_58]
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
movups xmmword ptr [rax], xmm0
movups [rsp+1B8h+var_6C], xmm0
movaps xmmword ptr [rsp+140h], xmm0
mov rdi, r12
mov rsi, rbx
mov rdx, rbp
mov rcx, [rsp+1B8h+var_158]
xor r8d, r8d
call _ZNSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcEEEC2ESA_SA_RKNS_11basic_regexIcSC_EENSt15regex_constants15match_flag_typeE; std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>>::regex_iterator(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
mov r14, r12
mov rdi, r12
lea rsi, [rsp+1B8h+var_78]
call _ZNKSt7__cxx1114regex_iteratorIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcEEEeqERKSD_; std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>>::operator==(std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>> const&)
mov r12d, eax
test al, al
jnz loc_AE81A
lea rdi, [rsp+1B8h+var_D8]
lea rsi, [rsp+1B8h+var_98]
push 1
pop rdx
call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE3strEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(ulong)
mov rcx, [rsp+1B8h+var_90]
mov rax, rcx
sub rax, [rsp+1B8h+var_98]
cqo
push 18h
pop rsi
idiv rsi
lea rdx, [rcx-30h]
add rcx, 0FFFFFFFFFFFFFFB8h
cmp rax, 4
cmovnb rcx, rdx
mov rdx, [rcx+8]
lea rax, [rsp+1B8h+var_128]
mov [rsp+1B8h+var_138], rax
mov rdi, r13
mov rsi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rdi, [rsp+1B8h+var_170]
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rcx, [rsp+1B8h+var_90]
mov rax, rcx
sub rax, [rsp+1B8h+var_98]
cqo
push 18h
pop rsi
idiv rsi
lea rdx, [rcx-18h]
add rcx, 0FFFFFFFFFFFFFFB8h
cmp rax, 4
cmovnb rcx, rdx
mov rax, [rcx]
mov [rsp+1B8h+var_1A0], rax
mov rdi, r15
xor esi, esi
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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(decltype(nullptr))
lea rdi, [rsp+1B8h+var_1A0]
lea rsi, [rsp+1B8h+var_150]
mov rdx, r15
call _ZL10parse_jsonRN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKS9_RN8nlohmann16json_abi_v3_11_310basic_jsonINSE_11ordered_mapESt6vectorS8_blmdSaNSE_14adl_serializerESH_IhSaIhEEvEE; 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> &)
test al, al
jz loc_AE898
mov rdi, [rsp+1B8h+var_1A0]
mov rsi, rbp
lea rdx, [rsp+1B8h+var_198]
mov rcx, [rsp+1B8h+var_160]
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
test al, al
jz loc_AE8B4
mov rcx, qword ptr [rsp+1B8h+var_198+8]
mov rax, rcx
sub rax, qword ptr [rsp+1B8h+var_198]
cqo
push 18h
pop rsi
idiv rsi
lea rdx, [rcx-18h]
add rcx, 0FFFFFFFFFFFFFFB8h
cmp rax, 4
cmovnb rcx, rdx
mov rbx, [rcx]
mov [rsp+1B8h+var_1A0], rbx
mov rdi, r13
lea rsi, [rsp+1B8h+var_D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
cmp [rsp+1B8h+var_148], 3
jnz short loc_AE793
lea rdi, [rsp+1B8h+var_118]
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_AE7AF
loc_AE793:
lea rdi, [rsp+1B8h+var_118]
mov rsi, r15
push 0FFFFFFFFFFFFFFFFh
pop rdx
push 20h ; ' '
pop rcx
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
loc_AE7AF:
lea rdi, [rsp+1B8h+var_F8]
lea rsi, aDataDone+0Eh; ""
lea rdx, [rsp+1B8h+var_1A9]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, [rsp+1B8h+var_168]
mov rsi, r13
call _ZNSt6vectorI16common_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_tool_call>::emplace_back<common_tool_call>(common_tool_call &&)
mov rdi, r13; this
call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call()
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+1B8h+var_D8]; void *
loc_AE7ED:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+1B8h+var_98]
call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base()
lea rdi, [rsp+1B8h+var_58]
call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base()
test r12b, r12b
mov r12, r14
jz loc_AE5EE
jmp short loc_AE877
loc_AE81A:
mov rax, cs:stderr_ptr
mov rcx, [rax]
lea rdi, aNoMoreToolCall; "No more tool calls found\n"
push 19h
pop rsi
push 1
pop rdx
call _fwrite
lea rax, [rsp+1B8h+var_128]
mov [rsp+1B8h+var_138], rax
mov rdi, r13
mov rsi, rbx
mov rdx, rbp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rdi, [rsp+1B8h+var_170]
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
mov rdi, r13
jmp short loc_AE7ED
loc_AE866:
mov rax, [rsp+1B8h+var_1A8]
lea rdi, [rax+20h]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_AE877:
lea rdi, [rsp+1B8h+var_198]
call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base()
mov rax, [rsp+1B8h+var_1A8]
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AE898:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFailedToParseJ_0; "Failed to parse json tool call argument"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_AE8CE
loc_AE8B4:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aMalformedInput_0; "Malformed input, missing closing patter"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_AE8CE:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_AE905
mov rbx, rax
lea rdi, [rsp+1B8h+var_138]
jmp loc_AE994
jmp short loc_AE975
mov rbx, rax
mov r12, [rsp+1B8h+var_1A8]
jmp loc_AE9B8
loc_AE905:
mov rbx, rax
jmp loc_AE9B8
mov rbx, rax
jmp loc_AE9C0
jmp short $+2
loc_AE917:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_AE982
mov rbx, rax
lea rdi, [rsp+1B8h+var_118]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_AE939
mov rbx, rax
loc_AE939:
lea rdi, [rsp+1B8h+var_138]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_AE982
mov rbx, rax
lea rdi, [rsp+1B8h+var_138]; this
call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call()
jmp short loc_AE982
mov rbx, rax
lea rdi, [rsp+1B8h+var_138]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_AE98C
jmp short loc_AE97F
mov rbx, rax
jmp short loc_AE98C
jmp short loc_AE97F
loc_AE975:
mov rbx, rax
jmp short loc_AE999
mov rbx, rax
jmp short loc_AE9A6
loc_AE97F:
mov rbx, rax
loc_AE982:
lea rdi, [rsp+1B8h+var_148]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_AE98C:
lea rdi, [rsp+1B8h+var_D8]; void *
loc_AE994:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_AE999:
lea rdi, [rsp+1B8h+var_98]
call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base()
loc_AE9A6:
mov r12, [rsp+1B8h+var_1A8]
lea rdi, [rsp+1B8h+var_58]
call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base()
loc_AE9B8:
mov rdi, r12; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
loc_AE9C0:
lea rdi, [rsp+1B8h+var_198]
call _ZNSt12_Vector_baseINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS0_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISC_EED2Ev; std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base()
mov rdi, rbx
call __Unwind_Resume
|
common_chat_msg * parse_json_tool_calls(common_chat_msg *a1, long long a2, long long a3, long long a4, long long a5)
{
common_chat_msg *v6; // r12
long long *v7; // rbx
long long v8; // rbp
long long *v9; // rsi
long long **v10; // rcx
char *v11; // r12
char *v12; // r14
char v13; // r12
long long v14; // rcx
long long v15; // rdx
long long **v16; // rcx
long long **v17; // rcx
_BYTE *v18; // rdi
bool v19; // zf
std::runtime_error *exception; // r14
long long *v23; // [rsp+18h] [rbp-1A0h] BYREF
_OWORD v24[2]; // [rsp+20h] [rbp-198h] BYREF
char *v25; // [rsp+48h] [rbp-170h]
char *v26; // [rsp+50h] [rbp-168h]
long long v27; // [rsp+58h] [rbp-160h]
long long v28; // [rsp+60h] [rbp-158h]
long long v29; // [rsp+68h] [rbp-150h] BYREF
_BYTE v30[16]; // [rsp+70h] [rbp-148h] BYREF
_QWORD v31[2]; // [rsp+80h] [rbp-138h] BYREF
_BYTE v32[16]; // [rsp+90h] [rbp-128h] BYREF
_BYTE v33[32]; // [rsp+A0h] [rbp-118h] BYREF
long long v34[4]; // [rsp+C0h] [rbp-F8h] BYREF
_BYTE v35[32]; // [rsp+E0h] [rbp-D8h] BYREF
char v36; // [rsp+100h] [rbp-B8h] BYREF
long long v37; // [rsp+120h] [rbp-98h] BYREF
long long v38; // [rsp+128h] [rbp-90h]
_DWORD v39[8]; // [rsp+140h] [rbp-78h] BYREF
_QWORD v40[11]; // [rsp+160h] [rbp-58h] BYREF
v27 = a5;
v28 = a4;
v6 = a1;
memset(v24, 0, sizeof(v24));
common_chat_msg::common_chat_msg(a1);
std::string::assign(a1, "assistant");
v7 = *(long long **)a2;
v8 = *(_QWORD *)a2 + *(_QWORD *)(a2 + 8);
v29 = v8;
v23 = v7;
if ( *(_BYTE *)(a3 + 32) != 1 )
{
LABEL_8:
v25 = (char *)v6 + 32;
v26 = (char *)v6 + 64;
v11 = &v36;
while ( 1 )
{
if ( v7 == (long long *)v8 )
goto LABEL_27;
memset(v40, 0, 32);
memset(v39, 0, 28);
std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>>::regex_iterator(
(long long)v11,
v7,
v8,
v28,
0);
v12 = v11;
v13 = std::regex_iterator<__gnu_cxx::__normal_iterator<char const*,std::string>,char,std::regex_traits<char>>::operator==(
(long long)v11,
(long long)v39);
if ( v13 )
{
fwrite("No more tool calls found\n", 25LL, 1LL, stderr);
v31[0] = v32;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)v31, v7, v8);
std::string::append(v25, v31);
v18 = v31;
}
else
{
std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(v35, &v37, 1LL);
v14 = v38 - 72;
if ( (unsigned long long)((v38 - v37) / 24) >= 4 )
v14 = v38 - 48;
v15 = *(_QWORD *)(v14 + 8);
v31[0] = v32;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)v31, v7, v15);
std::string::append(v25, v31);
std::string::~string(v31);
v16 = (long long **)(v38 - 72);
if ( (unsigned long long)((v38 - v37) / 24) >= 4 )
v16 = (long long **)(v38 - 24);
v23 = *v16;
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((long long)v30);
if ( !(unsigned __int8)parse_json(&v23, &v29, v30) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Failed to parse json tool call arguments");
goto LABEL_30;
}
if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(
v23,
v8,
(long long **)v24,
v27,
0) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Malformed input, missing closing pattern");
LABEL_30:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v17 = (long long **)(*((_QWORD *)&v24[0] + 1) - 72LL);
if ( (unsigned long long)((*((_QWORD *)&v24[0] + 1) - *(_QWORD *)&v24[0]) / 24LL) >= 4 )
v17 = (long long **)(*((_QWORD *)&v24[0] + 1) - 24LL);
v7 = *v17;
v23 = *v17;
std::string::basic_string(v31, v35);
if ( v30[0] == 3 )
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v33,
(long long)v30);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v33,
(long long)v30,
-1,
32,
0,
0);
std::string::basic_string<std::allocator<char>>(v34, (long long)"");
std::vector<common_tool_call>::emplace_back<common_tool_call>(v26, v31);
common_tool_call::~common_tool_call((common_tool_call *)v31);
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(v30);
v18 = v35;
}
std::string::~string(v18);
std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base(&v37);
std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base(v40);
v19 = v13 == 0;
v11 = v12;
if ( !v19 )
goto LABEL_27;
}
}
if ( std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(
v7,
v8,
(long long **)v24,
a3,
0) )
{
v9 = (long long *)(*((_QWORD *)&v24[0] + 1) - 72LL);
if ( (unsigned long long)((*((_QWORD *)&v24[0] + 1) - *(_QWORD *)&v24[0]) / 24LL) >= 4 )
v9 = (long long *)(*((_QWORD *)&v24[0] + 1) - 48LL);
v6 = a1;
std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)v31, v9);
std::string::operator=((char *)a1 + 32, v31);
std::string::~string(v31);
v10 = (long long **)(*((_QWORD *)&v24[0] + 1) - 72LL);
if ( (unsigned long long)((*((_QWORD *)&v24[0] + 1) - *(_QWORD *)&v24[0]) / 24LL) >= 4 )
v10 = (long long **)(*((_QWORD *)&v24[0] + 1) - 24LL);
v7 = *v10;
v23 = *v10;
goto LABEL_8;
}
std::string::_M_assign((char *)a1 + 32, a2);
LABEL_27:
std::_Vector_base<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~_Vector_base(v24);
return a1;
}
|
parse_json_tool_calls:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x188
MOV qword ptr [RSP + 0x58],R8
MOV qword ptr [RSP + 0x60],RCX
MOV R15,RDX
MOV R14,RSI
MOV R12,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LAB_001ae4f0:
CALL 0x0018842a
LAB_001ae4f5:
LEA RSI,[0x203dc7]
MOV RDI,R12
CALL 0x00129580
MOV RBX,qword ptr [R14]
MOV RBP,qword ptr [R14 + 0x8]
ADD RBP,RBX
MOV qword ptr [RSP + 0x68],RBP
MOV qword ptr [RSP + 0x18],RBX
CMP byte ptr [R15 + 0x20],0x1
MOV qword ptr [RSP + 0x10],R12
JNZ 0x001ae5c5
LAB_001ae528:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV RSI,RBP
MOV RCX,R15
XOR R8D,R8D
CALL 0x00163b2e
TEST AL,AL
JZ 0x001ae866
MOV RSI,qword ptr [RSP + 0x28]
MOV RAX,RSI
SUB RAX,qword ptr [RSP + 0x20]
CQO
PUSH 0x18
POP R14
IDIV R14
LEA RCX,[RSI + -0x30]
ADD RSI,-0x48
CMP RAX,0x4
CMOVNC RSI,RCX
LAB_001ae56c:
LEA RDI,[RSP + 0x80]
MOV R12,qword ptr [RSP + 0x10]
CALL 0x00162074
LEA RDI,[R12 + 0x20]
LEA RBX,[RSP + 0x80]
MOV RSI,RBX
CALL 0x00128d80
MOV RDI,RBX
CALL 0x00129678
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,RCX
SUB RAX,qword ptr [RSP + 0x20]
CQO
IDIV R14
LEA RDX,[RCX + -0x18]
ADD RCX,-0x48
CMP RAX,0x4
CMOVNC RCX,RDX
MOV RBX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RBX
LAB_001ae5c5:
LEA RAX,[R12 + 0x20]
MOV qword ptr [RSP + 0x48],RAX
LEA RAX,[R12 + 0x40]
MOV qword ptr [RSP + 0x50],RAX
LEA R12,[RSP + 0x100]
LEA R13,[RSP + 0x80]
LEA R15,[RSP + 0x70]
LAB_001ae5ee:
CMP RBX,RBP
JZ 0x001ae877
LEA RAX,[RSP + 0x160]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOVUPS xmmword ptr [RSP + 0x14c],XMM0
MOVAPS xmmword ptr [RSP + 0x140],XMM0
LAB_001ae619:
MOV RDI,R12
MOV RSI,RBX
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x60]
XOR R8D,R8D
CALL 0x001a0128
MOV R14,R12
MOV RDI,R12
LEA RSI,[RSP + 0x140]
CALL 0x001a0360
MOV R12D,EAX
TEST AL,AL
JNZ 0x001ae81a
LAB_001ae64d:
LEA RDI,[RSP + 0xe0]
LEA RSI,[RSP + 0x120]
PUSH 0x1
POP RDX
CALL 0x001c025c
MOV RCX,qword ptr [RSP + 0x128]
MOV RAX,RCX
SUB RAX,qword ptr [RSP + 0x120]
CQO
PUSH 0x18
POP RSI
IDIV RSI
LEA RDX,[RCX + -0x30]
ADD RCX,-0x48
CMP RAX,0x4
CMOVNC RCX,RDX
MOV RDX,qword ptr [RCX + 0x8]
LEA RAX,[RSP + 0x90]
MOV qword ptr [RSP + 0x80],RAX
LAB_001ae6a4:
MOV RDI,R13
MOV RSI,RBX
CALL 0x001620ae
LAB_001ae6af:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,R13
CALL 0x001295b0
MOV RDI,R13
CALL 0x00129678
MOV RCX,qword ptr [RSP + 0x128]
MOV RAX,RCX
SUB RAX,qword ptr [RSP + 0x120]
CQO
PUSH 0x18
POP RSI
IDIV RSI
LEA RDX,[RCX + -0x18]
ADD RCX,-0x48
CMP RAX,0x4
CMOVNC RCX,RDX
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013eb74
LAB_001ae701:
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x68]
MOV RDX,R15
CALL 0x001ae9d2
TEST AL,AL
JZ 0x001ae898
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RBP
LEA RDX,[RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x58]
XOR R8D,R8D
CALL 0x00163b2e
TEST AL,AL
JZ 0x001ae8b4
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,RCX
SUB RAX,qword ptr [RSP + 0x20]
CQO
PUSH 0x18
POP RSI
IDIV RSI
LEA RDX,[RCX + -0x18]
ADD RCX,-0x48
CMP RAX,0x4
CMOVNC RCX,RDX
MOV RBX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RBX
LAB_001ae76a:
MOV RDI,R13
LEA RSI,[RSP + 0xe0]
CALL 0x00128f50
CMP byte ptr [RSP + 0x70],0x3
JNZ 0x001ae793
LAB_001ae781:
LEA RDI,[RSP + 0xa0]
MOV RSI,R15
CALL 0x0016d682
JMP 0x001ae7af
LAB_001ae793:
LEA RDI,[RSP + 0xa0]
MOV RSI,R15
PUSH -0x1
POP RDX
PUSH 0x20
POP RCX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00166606
LAB_001ae7af:
LEA RDI,[RSP + 0xc0]
LEA RSI,[0x1f5cf8]
LEA RDX,[RSP + 0xf]
CALL 0x0013bddc
LAB_001ae7c8:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,R13
CALL 0x001bfdd2
MOV RDI,R13
CALL 0x0017afaa
MOV RDI,R15
CALL 0x0013f736
LEA RDI,[RSP + 0xe0]
LAB_001ae7ed:
CALL 0x00129678
LEA RDI,[RSP + 0x120]
CALL 0x0013df18
LEA RDI,[RSP + 0x160]
CALL 0x0013df18
TEST R12B,R12B
MOV R12,R14
JZ 0x001ae5ee
JMP 0x001ae877
LAB_001ae81a:
MOV RAX,qword ptr [0x00266f88]
MOV RCX,qword ptr [RAX]
LEA RDI,[0x202408]
PUSH 0x19
POP RSI
PUSH 0x1
POP RDX
CALL 0x001295a0
LEA RAX,[RSP + 0x90]
MOV qword ptr [RSP + 0x80],RAX
LAB_001ae846:
MOV RDI,R13
MOV RSI,RBX
MOV RDX,RBP
CALL 0x001620ae
LAB_001ae854:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,R13
CALL 0x001295b0
MOV RDI,R13
JMP 0x001ae7ed
LAB_001ae866:
MOV RAX,qword ptr [RSP + 0x10]
LEA RDI,[RAX + 0x20]
LAB_001ae86f:
MOV RSI,R14
CALL 0x00128600
LAB_001ae877:
LEA RDI,[RSP + 0x20]
CALL 0x0013df18
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ae898:
PUSH 0x10
POP RDI
CALL 0x00128580
MOV R14,RAX
LAB_001ae8a3:
LEA RSI,[0x202422]
MOV RDI,RAX
CALL 0x00128410
LAB_001ae8b2:
JMP 0x001ae8ce
LAB_001ae8b4:
PUSH 0x10
POP RDI
CALL 0x00128580
MOV R14,RAX
LAB_001ae8bf:
LEA RSI,[0x20244b]
MOV RDI,RAX
CALL 0x00128410
LAB_001ae8ce:
MOV RSI,qword ptr [0x00266ff0]
MOV RDX,qword ptr [0x00266f58]
MOV RDI,R14
CALL 0x00129320
|
/* parse_json_tool_calls(std::__cxx11::string const&, std::optional<std::__cxx11::basic_regex<char,
std::__cxx11::regex_traits<char> > > const&, std::__cxx11::basic_regex<char,
std::__cxx11::regex_traits<char> > const&, std::__cxx11::basic_regex<char,
std::__cxx11::regex_traits<char> > const&) */
string * parse_json_tool_calls
(string *param_1,optional *param_2,basic_regex *param_3,basic_regex *param_4)
{
bool bVar1;
char cVar2;
char cVar3;
runtime_error *this;
long lVar4;
long *plVar5;
long lVar6;
long lVar7;
string *this_00;
int8 in_R8;
allocator local_1a9;
string *local_1a8;
long local_1a0;
long local_198;
long lStack_190;
int8 local_188;
int8 uStack_180;
string *local_170;
string *local_168;
int8 local_160;
basic_regex *local_158;
long local_150;
data local_148 [16];
int1 *local_138 [2];
int1 local_128 [16];
int1 local_118 [32];
string local_f8 [32];
string local_d8 [32];
regex_iterator<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,char,std::__cxx11::regex_traits<char>>
local_b8 [32];
long local_98;
long local_90;
int8 local_78;
int4 uStack_70;
int4 local_6c;
int4 uStack_68;
int8 uStack_64;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
local_188 = 0;
uStack_180 = 0;
local_198 = 0;
lStack_190 = 0;
local_160 = in_R8;
local_158 = param_4;
/* try { // try from 001ae4f0 to 001ae4f4 has its CatchHandler @ 001ae90d */
common_chat_msg::common_chat_msg((common_chat_msg *)param_1);
/* try { // try from 001ae4f5 to 001ae503 has its CatchHandler @ 001ae905 */
std::__cxx11::string::assign((char *)param_1);
lVar6 = *(long *)param_2;
lVar7 = *(long *)(param_2 + 8) + lVar6;
local_1a8 = param_1;
local_150 = lVar7;
if (param_3[0x20] == (basic_regex)0x1) {
/* try { // try from 001ae528 to 001ae53d has its CatchHandler @ 001ae8f8 */
local_1a0 = lVar6;
bVar1 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>
(lVar6,lVar7,&local_198,param_3,0);
param_1 = local_1a8;
if (!bVar1) {
/* try { // try from 001ae86f to 001ae876 has its CatchHandler @ 001ae8f8 */
std::__cxx11::string::_M_assign(local_1a8 + 0x20);
goto LAB_001ae877;
}
/* try { // try from 001ae56c to 001ae57d has its CatchHandler @ 001ae8e4 */
std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str();
std::__cxx11::string::operator=(param_1 + 0x20,(string *)local_138);
std::__cxx11::string::~string((string *)local_138);
plVar5 = (long *)(lStack_190 + -0x48);
if (3 < (ulong)((lStack_190 - local_198) / 0x18)) {
plVar5 = (long *)(lStack_190 + -0x18);
}
lVar6 = *plVar5;
}
local_170 = param_1 + 0x20;
local_168 = param_1 + 0x40;
local_1a0 = lVar6;
do {
if (lVar6 == lVar7) break;
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
uStack_68 = 0;
uStack_64 = 0;
local_78 = 0;
uStack_70 = 0;
local_6c = 0;
/* try { // try from 001ae619 to 001ae62e has its CatchHandler @ 001ae97a */
std::__cxx11::
regex_iterator<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,char,std::__cxx11::regex_traits<char>>
::regex_iterator(local_b8,lVar6,lVar7,local_158,0);
cVar2 = std::__cxx11::
regex_iterator<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,char,std::__cxx11::regex_traits<char>>
::operator==(local_b8,(regex_iterator *)&local_78);
if (cVar2 == '\0') {
/* try { // try from 001ae64d to 001ae664 has its CatchHandler @ 001ae975 */
std::__cxx11::
match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
::str((ulong)local_d8);
lVar4 = local_90 + -0x48;
if (3 < (ulong)((local_90 - local_98) / 0x18)) {
lVar4 = local_90 + -0x30;
}
local_138[0] = local_128;
/* try { // try from 001ae6a4 to 001ae6ae has its CatchHandler @ 001ae96e */
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
((string *)local_138,lVar6,*(int8 *)(lVar4 + 8));
/* try { // try from 001ae6af to 001ae6bb has its CatchHandler @ 001ae95a */
std::__cxx11::string::append(local_170);
std::__cxx11::string::~string((string *)local_138);
plVar5 = (long *)(local_90 + -0x48);
if (3 < (ulong)((local_90 - local_98) / 0x18)) {
plVar5 = (long *)(local_90 + -0x18);
}
local_1a0 = *plVar5;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json((_func_decltype_nullptr *)local_148);
/* try { // try from 001ae701 to 001ae734 has its CatchHandler @ 001ae97f */
cVar3 = parse_json((__normal_iterator *)&local_1a0,(__normal_iterator *)&local_150,
(basic_json *)local_148);
if (cVar3 == '\0') {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001ae8a3 to 001ae8b1 has its CatchHandler @ 001ae917 */
std::runtime_error::runtime_error(this,"Failed to parse json tool call arguments");
LAB_001ae8ce:
/* try { // try from 001ae8ce to 001ae8e3 has its CatchHandler @ 001ae96c */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00266ff0,PTR__runtime_error_00266f58);
}
bVar1 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>
(local_1a0,lVar7,&local_198,local_160);
if (!bVar1) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001ae8bf to 001ae8cd has its CatchHandler @ 001ae915 */
std::runtime_error::runtime_error(this,"Malformed input, missing closing pattern");
goto LAB_001ae8ce;
}
plVar5 = (long *)(lStack_190 + -0x48);
if (3 < (ulong)((lStack_190 - local_198) / 0x18)) {
plVar5 = (long *)(lStack_190 + -0x18);
}
lVar6 = *plVar5;
/* try { // try from 001ae76a to 001ae779 has its CatchHandler @ 001ae973 */
local_1a0 = lVar6;
std::__cxx11::string::string((string *)local_138,local_d8);
if (local_148[0] == (data)0x3) {
/* try { // try from 001ae781 to 001ae7ae has its CatchHandler @ 001ae936 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_118,local_148);
}
else {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_118,local_148,0xffffffffffffffff,0x20,0,0);
}
/* try { // try from 001ae7af to 001ae7c7 has its CatchHandler @ 001ae924 */
std::__cxx11::string::string<std::allocator<char>>(local_f8,"",&local_1a9);
/* try { // try from 001ae7c8 to 001ae7d4 has its CatchHandler @ 001ae948 */
std::vector<common_tool_call,std::allocator<common_tool_call>>::emplace_back<common_tool_call>
((vector<common_tool_call,std::allocator<common_tool_call>> *)local_168,
(common_tool_call *)local_138);
common_tool_call::~common_tool_call((common_tool_call *)local_138);
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_148);
this_00 = local_d8;
}
else {
fwrite("No more tool calls found\n",0x19,1,*(FILE **)PTR_stderr_00266f88);
local_138[0] = local_128;
/* try { // try from 001ae846 to 001ae853 has its CatchHandler @ 001ae8f6 */
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
((string *)local_138,lVar6,lVar7);
/* try { // try from 001ae854 to 001ae860 has its CatchHandler @ 001ae8e6 */
std::__cxx11::string::append(local_170);
this_00 = (string *)local_138;
}
std::__cxx11::string::~string(this_00);
std::
_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
::~_Vector_base((_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
*)&local_98);
std::
_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
::~_Vector_base((_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
*)&local_58);
} while (cVar2 == '\0');
LAB_001ae877:
std::
_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
::~_Vector_base((_Vector_base<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>
*)&local_198);
return local_1a8;
}
|
|
65,157 |
ggml_vec_dot_iq2_xxs_q8_K
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-quants.c
|
void ggml_vec_dot_iq2_xxs_q8_K(int n, float * restrict s, size_t bs, const void * restrict vx, size_t bx, const void * restrict vy, size_t by, int nrc) {
assert(n % QK_K == 0);
assert(nrc == 1);
UNUSED(nrc);
UNUSED(bx);
UNUSED(by);
UNUSED(bs);
const block_iq2_xxs * restrict x = vx;
const block_q8_K * restrict y = vy;
const int nb = n / QK_K;
#if defined(__ARM_NEON)
const uint64_t * signs64 = (const uint64_t *)keven_signs_q2xs;
uint32_t aux32[4];
const uint8_t * aux8 = (const uint8_t *)aux32;
ggml_int8x16x4_t q2u;
ggml_int8x16x4_t q2s;
ggml_int8x16x4_t q8b;
float sumf = 0;
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * restrict q2 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
float sumf1 = 0, sumf2 = 0;
for (int ib32 = 0; ib32 < QK_K/32; ib32 += 2) {
q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
memcpy(aux32, q2, 4*sizeof(uint32_t)); q2 += 8;
q2u.val[0] = vcombine_s8(vld1_s8((const void *)(iq2xxs_grid + aux8[ 0])), vld1_s8((const void *)(iq2xxs_grid + aux8[ 1])));
q2u.val[1] = vcombine_s8(vld1_s8((const void *)(iq2xxs_grid + aux8[ 2])), vld1_s8((const void *)(iq2xxs_grid + aux8[ 3])));
q2u.val[2] = vcombine_s8(vld1_s8((const void *)(iq2xxs_grid + aux8[ 8])), vld1_s8((const void *)(iq2xxs_grid + aux8[ 9])));
q2u.val[3] = vcombine_s8(vld1_s8((const void *)(iq2xxs_grid + aux8[10])), vld1_s8((const void *)(iq2xxs_grid + aux8[11])));
q2s.val[0] = vcombine_s8(vld1_s8((const void *)(signs64 + ((aux32[1] >> 0) & 127))), vld1_s8((const void *)(signs64 + ((aux32[1] >> 7) & 127))));
q2s.val[1] = vcombine_s8(vld1_s8((const void *)(signs64 + ((aux32[1] >> 14) & 127))), vld1_s8((const void *)(signs64 + ((aux32[1] >> 21) & 127))));
q2s.val[2] = vcombine_s8(vld1_s8((const void *)(signs64 + ((aux32[3] >> 0) & 127))), vld1_s8((const void *)(signs64 + ((aux32[3] >> 7) & 127))));
q2s.val[3] = vcombine_s8(vld1_s8((const void *)(signs64 + ((aux32[3] >> 14) & 127))), vld1_s8((const void *)(signs64 + ((aux32[3] >> 21) & 127))));
q2u.val[0] = vmulq_s8(q2u.val[0], q2s.val[0]);
q2u.val[1] = vmulq_s8(q2u.val[1], q2s.val[1]);
q2u.val[2] = vmulq_s8(q2u.val[2], q2s.val[2]);
q2u.val[3] = vmulq_s8(q2u.val[3], q2s.val[3]);
const int32x4_t p1 = ggml_vdotq_s32(ggml_vdotq_s32(vdupq_n_s32(0), q2u.val[0], q8b.val[0]), q2u.val[1], q8b.val[1]);
const int32x4_t p2 = ggml_vdotq_s32(ggml_vdotq_s32(vdupq_n_s32(0), q2u.val[2], q8b.val[2]), q2u.val[3], q8b.val[3]);
sumf1 += vaddvq_s32(p1) * (0.5f + (aux32[1] >> 28));
sumf2 += vaddvq_s32(p2) * (0.5f + (aux32[3] >> 28));
}
sumf += d*(sumf1 + sumf2);
}
*s = 0.25f * sumf;
#elif defined(__AVX2__)
const uint64_t * signs64 = (const uint64_t *)keven_signs_q2xs;
uint32_t aux32[4];
const uint8_t * aux8 = (const uint8_t *)aux32;
__m256 accumf = _mm256_setzero_ps();
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * restrict q2 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
__m256i sumi1 = _mm256_setzero_si256();
__m256i sumi2 = _mm256_setzero_si256();
for (int ib32 = 0; ib32 < QK_K/32; ib32 += 2) {
const __m256i q8_1 = _mm256_loadu_si256((const __m256i *)q8); q8 += 32;
const __m256i q8_2 = _mm256_loadu_si256((const __m256i *)q8); q8 += 32;
memcpy(aux32, q2, 4*sizeof(uint32_t)); q2 += 8;
const __m256i q2_1 = _mm256_set_epi64x(iq2xxs_grid[aux8[ 3]], iq2xxs_grid[aux8[ 2]], iq2xxs_grid[aux8[1]], iq2xxs_grid[aux8[0]]);
const __m256i q2_2 = _mm256_set_epi64x(iq2xxs_grid[aux8[11]], iq2xxs_grid[aux8[10]], iq2xxs_grid[aux8[9]], iq2xxs_grid[aux8[8]]);
const __m256i s2_1 = _mm256_set_epi64x(signs64[(aux32[1] >> 21) & 127], signs64[(aux32[1] >> 14) & 127],
signs64[(aux32[1] >> 7) & 127], signs64[(aux32[1] >> 0) & 127]);
const __m256i s2_2 = _mm256_set_epi64x(signs64[(aux32[3] >> 21) & 127], signs64[(aux32[3] >> 14) & 127],
signs64[(aux32[3] >> 7) & 127], signs64[(aux32[3] >> 0) & 127]);
const __m256i q8s_1 = _mm256_sign_epi8(q8_1, s2_1);
const __m256i q8s_2 = _mm256_sign_epi8(q8_2, s2_2);
const __m256i dot1 = _mm256_maddubs_epi16(q2_1, q8s_1);
const __m256i dot2 = _mm256_maddubs_epi16(q2_2, q8s_2);
const uint16_t ls1 = aux32[1] >> 28;
const uint16_t ls2 = aux32[3] >> 28;
const __m256i p1 = _mm256_madd_epi16(dot1, _mm256_set1_epi16(2*ls1+1));
const __m256i p2 = _mm256_madd_epi16(dot2, _mm256_set1_epi16(2*ls2+1));
sumi1 = _mm256_add_epi32(sumi1, p1);
sumi2 = _mm256_add_epi32(sumi2, p2);
}
accumf = _mm256_fmadd_ps(_mm256_set1_ps(d), _mm256_cvtepi32_ps(_mm256_add_epi32(sumi1, sumi2)), accumf);
}
*s = 0.125f * hsum_float_8(accumf);
#elif defined(__AVX__)
const uint64_t * signs64 = (const uint64_t *)keven_signs_q2xs;
uint32_t aux32[4];
const uint8_t * aux8 = (const uint8_t *)aux32;
__m256 accumf = _mm256_setzero_ps();
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * restrict q2 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
__m128i sumi1_0 = _mm_setzero_si128();
__m128i sumi1_1 = _mm_setzero_si128();
__m128i sumi2_0 = _mm_setzero_si128();
__m128i sumi2_1 = _mm_setzero_si128();
for (int ib32 = 0; ib32 < QK_K/32; ib32 += 2) {
const __m128i q8_1_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_1_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_2_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8_2_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
memcpy(aux32, q2, 4*sizeof(uint32_t)); q2 += 8;
const __m128i q2_1_0 = _mm_set_epi64x(iq2xxs_grid[aux8[1]], iq2xxs_grid[aux8[0]]);
const __m128i q2_1_1 = _mm_set_epi64x(iq2xxs_grid[aux8[3]], iq2xxs_grid[aux8[2]]);
const __m128i q2_2_0 = _mm_set_epi64x(iq2xxs_grid[aux8[9]], iq2xxs_grid[aux8[8]]);
const __m128i q2_2_1 = _mm_set_epi64x(iq2xxs_grid[aux8[11]], iq2xxs_grid[aux8[10]]);
const __m128i s2_1_0 = _mm_set_epi64x(signs64[(aux32[1] >> 7) & 127], signs64[(aux32[1] >> 0) & 127]);
const __m128i s2_1_1 = _mm_set_epi64x(signs64[(aux32[1] >> 21) & 127], signs64[(aux32[1] >> 14) & 127]);
const __m128i s2_2_0 = _mm_set_epi64x(signs64[(aux32[3] >> 7) & 127], signs64[(aux32[3] >> 0) & 127]);
const __m128i s2_2_1 = _mm_set_epi64x(signs64[(aux32[3] >> 21) & 127], signs64[(aux32[3] >> 14) & 127]);
const __m128i q8s_1_0 = _mm_sign_epi8(q8_1_0, s2_1_0);
const __m128i q8s_1_1 = _mm_sign_epi8(q8_1_1, s2_1_1);
const __m128i q8s_2_0 = _mm_sign_epi8(q8_2_0, s2_2_0);
const __m128i q8s_2_1 = _mm_sign_epi8(q8_2_1, s2_2_1);
const __m128i dot1_0 = _mm_maddubs_epi16(q2_1_0, q8s_1_0);
const __m128i dot1_1 = _mm_maddubs_epi16(q2_1_1, q8s_1_1);
const __m128i dot2_0 = _mm_maddubs_epi16(q2_2_0, q8s_2_0);
const __m128i dot2_1 = _mm_maddubs_epi16(q2_2_1, q8s_2_1);
const uint16_t ls1 = aux32[1] >> 28;
const uint16_t ls2 = aux32[3] >> 28;
const __m128i p1_0 = _mm_madd_epi16(dot1_0, _mm_set1_epi16(2*ls1+1));
const __m128i p1_1 = _mm_madd_epi16(dot1_1, _mm_set1_epi16(2*ls1+1));
const __m128i p2_0 = _mm_madd_epi16(dot2_0, _mm_set1_epi16(2*ls2+1));
const __m128i p2_1 = _mm_madd_epi16(dot2_1, _mm_set1_epi16(2*ls2+1));
sumi1_0 = _mm_add_epi32(sumi1_0, p1_0);
sumi1_1 = _mm_add_epi32(sumi1_1, p1_1);
sumi2_0 = _mm_add_epi32(sumi2_0, p2_0);
sumi2_1 = _mm_add_epi32(sumi2_1, p2_1);
}
accumf = _mm256_add_ps(_mm256_mul_ps(_mm256_set1_ps(d), _mm256_cvtepi32_ps(MM256_SET_M128I(_mm_add_epi32(sumi1_1, sumi2_1), _mm_add_epi32(sumi1_0, sumi2_0)))), accumf);
}
*s = 0.125f * hsum_float_8(accumf);
#elif defined(__POWER9_VECTOR__)
const vector int v0 = vec_splats((int32_t)0);
vector float vsumf0 = vec_splats(0.0f);
vector float vsumf1 = vec_splats(0.0f);
vector float vsumf2 = vec_splats(0.0f);
vector float vsumf3 = vec_splats(0.0f);
const uint64_t * signs64 = (const uint64_t *)keven_signs_q2xs;
for (int i = 0; i < nb; ++i) {
vector float vxd = vec_splats(GGML_FP16_TO_FP32(x[i].d));
vector float vyd = vec_splats(y[i].d);
vector float vd = vec_mul(vxd, vyd);
vector signed int vsumi0 = v0;
vector signed int vsumi1 = v0;
vector signed int vsumi2 = v0;
vector signed int vsumi3 = v0;
const uint16_t * restrict q2 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
for (int j = 0; j < QK_K/32; j += 2) {
__builtin_prefetch(q2, 0, 1);
__builtin_prefetch(q8, 0, 1);
uint32_t aux32[4];
const uint8_t * aux8 = (const uint8_t *)aux32;
memcpy(aux32, q2, 4*sizeof(uint32_t));
q2 += 8;
vector signed long long aux64x2_0 = {*(const int64_t *)(iq2xxs_grid + aux8[ 0]), *(const int64_t *)(iq2xxs_grid + aux8[ 1])};
vector signed long long aux64x2_1 = {*(const int64_t *)(iq2xxs_grid + aux8[ 2]), *(const int64_t *)(iq2xxs_grid + aux8[ 3])};
vector signed long long aux64x2_2 = {*(const int64_t *)(iq2xxs_grid + aux8[ 8]), *(const int64_t *)(iq2xxs_grid + aux8[ 9])};
vector signed long long aux64x2_3 = {*(const int64_t *)(iq2xxs_grid + aux8[10]), *(const int64_t *)(iq2xxs_grid + aux8[11])};
vector signed long long vsigns0 = {*(const int64_t *)(signs64 + ((aux32[1] >> 0) & 127)), *(const int64_t *)(signs64 + ((aux32[1] >> 7) & 127))};
vector signed long long vsigns1 = {*(const int64_t *)(signs64 + ((aux32[1] >> 14) & 127)), *(const int64_t *)(signs64 + ((aux32[1] >> 21) & 127))};
vector signed long long vsigns2 = {*(const int64_t *)(signs64 + ((aux32[3] >> 0) & 127)), *(const int64_t *)(signs64 + ((aux32[3] >> 7) & 127))};
vector signed long long vsigns3 = {*(const int64_t *)(signs64 + ((aux32[3] >> 14) & 127)), *(const int64_t *)(signs64 + ((aux32[3] >> 21) & 127))};
vector signed char q2x0 = (vector signed char)vec_mul((vector signed char)vsigns0, (vector signed char)aux64x2_0);
vector signed char q2x1 = (vector signed char)vec_mul((vector signed char)vsigns1, (vector signed char)aux64x2_1);
vector signed char q2x2 = (vector signed char)vec_mul((vector signed char)vsigns2, (vector signed char)aux64x2_2);
vector signed char q2x3 = (vector signed char)vec_mul((vector signed char)vsigns3, (vector signed char)aux64x2_3);
vector signed char q8y0 = vec_xl( 0, q8);
vector signed char q8y1 = vec_xl(16, q8);
vector signed char q8y2 = vec_xl(32, q8);
vector signed char q8y3 = vec_xl(48, q8);
q8 += 64;
vector signed short qv0 = vec_add(vec_mule(q2x0, q8y0), vec_mulo(q2x0, q8y0));
vector signed short qv1 = vec_add(vec_mule(q2x1, q8y1), vec_mulo(q2x1, q8y1));
vector signed short qv2 = vec_add(vec_mule(q2x2, q8y2), vec_mulo(q2x2, q8y2));
vector signed short qv3 = vec_add(vec_mule(q2x3, q8y3), vec_mulo(q2x3, q8y3));
const uint16_t ls0 = aux32[1] >> 28;
const uint16_t ls1 = aux32[3] >> 28;
vector signed short vscales01 = vec_splats((int16_t)(2*ls0+1));
vector signed short vscales23 = vec_splats((int16_t)(2*ls1+1));
vsumi0 = vec_msum(qv0, vscales01, vsumi0);
vsumi1 = vec_msum(qv1, vscales01, vsumi1);
vsumi2 = vec_msum(qv2, vscales23, vsumi2);
vsumi3 = vec_msum(qv3, vscales23, vsumi3);
}
vsumf0 = vec_madd(vec_ctf(vsumi0, 0), vd, vsumf0);
vsumf1 = vec_madd(vec_ctf(vsumi1, 0), vd, vsumf1);
vsumf2 = vec_madd(vec_ctf(vsumi2, 0), vd, vsumf2);
vsumf3 = vec_madd(vec_ctf(vsumi3, 0), vd, vsumf3);
}
vsumf0 = vec_add(vsumf0, vsumf2);
vsumf1 = vec_add(vsumf1, vsumf3);
vsumf0 = vec_add(vsumf0, vsumf1);
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 4));
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 8));
*s = 0.125f * vec_extract(vsumf0, 0);
#elif defined(__loongarch_asx)
const uint64_t * signs64 = (const uint64_t *)keven_signs_q2xs;
uint32_t aux32[4];
const uint8_t * aux8 = (const uint8_t *)aux32;
__m256 accumf = (__m256)__lasx_xvldi(0);
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * restrict q2 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
__m256i sumi1 = __lasx_xvldi(0);
__m256i sumi2 = __lasx_xvldi(0);
for (int ib32 = 0; ib32 < QK_K/32; ib32 += 2) {
const __m256i q8_1 = __lasx_xvld((const __m256i *)q8, 0); q8 += 32;
const __m256i q8_2 = __lasx_xvld((const __m256i *)q8, 0); q8 += 32;
memcpy(aux32, q2, 4*sizeof(uint32_t)); q2 += 8;
const __m256i q2_1 = lasx_set_d(iq2xxs_grid[aux8[ 3]], iq2xxs_grid[aux8[ 2]], iq2xxs_grid[aux8[1]], iq2xxs_grid[aux8[0]]);
const __m256i q2_2 = lasx_set_d(iq2xxs_grid[aux8[11]], iq2xxs_grid[aux8[10]], iq2xxs_grid[aux8[9]], iq2xxs_grid[aux8[8]]);
const __m256i s2_1 = lasx_set_d(signs64[(aux32[1] >> 21) & 127], signs64[(aux32[1] >> 14) & 127],
signs64[(aux32[1] >> 7) & 127], signs64[(aux32[1] >> 0) & 127]);
const __m256i s2_2 = lasx_set_d(signs64[(aux32[3] >> 21) & 127], signs64[(aux32[3] >> 14) & 127],
signs64[(aux32[3] >> 7) & 127], signs64[(aux32[3] >> 0) & 127]);
const __m256i q8s_1 = __lasx_xvsigncov_b(s2_1, q8_1);
const __m256i q8s_2 = __lasx_xvsigncov_b(s2_2, q8_2);
const __m256i dot1 = lasx_maddubs_h(q2_1, q8s_1);
const __m256i dot2 = lasx_maddubs_h(q2_2, q8s_2);
const uint16_t ls1 = aux32[1] >> 28;
const uint16_t ls2 = aux32[3] >> 28;
const __m256i p1 = lasx_madd_h(dot1, __lasx_xvreplgr2vr_h(2*ls1+1));
const __m256i p2 = lasx_madd_h(dot2, __lasx_xvreplgr2vr_h(2*ls2+1));
sumi1 = __lasx_xvadd_w(sumi1, p1);
sumi2 = __lasx_xvadd_w(sumi2, p2);
}
accumf = __lasx_xvfmadd_s(__lasx_xvreplfr2vr_s(d), __lasx_xvffint_s_w(__lasx_xvadd_w(sumi1, sumi2)), accumf);
}
*s = 0.125f * hsum_float_8(accumf);
#else
uint32_t aux32[2];
const uint8_t * aux8 = (const uint8_t *)aux32;
float sumf = 0.f;
for (int i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d) * y[i].d;
const uint16_t * restrict q2 = x[i].qs;
const int8_t * restrict q8 = y[i].qs;
int32_t bsum = 0;
for (int ib32 = 0; ib32 < QK_K/32; ++ib32) {
memcpy(aux32, q2, 2*sizeof(uint32_t));
q2 += 4;
const uint32_t ls = 2*(aux32[1] >> 28) + 1;
int32_t sumi = 0;
for (int l = 0; l < 4; ++l) {
const uint8_t * grid = (const uint8_t *)(iq2xxs_grid + aux8[l]);
const uint8_t signs = ksigns_iq2xs[(aux32[1] >> 7*l) & 127];
for (int j = 0; j < 8; ++j) {
sumi += grid[j] * q8[j] * (signs & kmask_iq2xs[j] ? -1 : 1);
}
q8 += 8;
}
bsum += sumi * ls;
}
sumf += d * bsum;
}
*s = 0.125f * sumf;
#endif
}
|
O3
|
c
|
ggml_vec_dot_iq2_xxs_q8_K:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testb %dil, %dil
jne 0x33fe9
cmpl $0x1, 0x48(%rsp)
jne 0x34008
sarl $0x8, %edi
testl %edi, %edi
jle 0x33fb0
movl %edi, %eax
leaq 0x2(%rcx), %rdx
leaq 0x4(%r9), %rdi
vxorps %xmm2, %xmm2, %xmm2
xorl %r8d, %r8d
movq 0x15191(%rip), %r10 # 0x48f68
leaq 0x6c22(%rip), %r11 # 0x3aa00
vpbroadcastq 0x67b1(%rip), %xmm0 # 0x3a598
vpbroadcastd 0x654c(%rip), %xmm1 # 0x3a33c
leaq 0x6809(%rip), %rbx # 0x3a600
movq %r8, %r14
shlq $0x6, %r14
leaq (%r14,%r8,2), %r14
movzwl (%rcx,%r14), %r14d
vmovss (%r10,%r14,4), %xmm21
imulq $0x124, %r8, %r14 # imm = 0x124
vmovss (%r9,%r14), %xmm4
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
xorl %r14d, %r14d
vpxor %xmm5, %xmm5, %xmm5
vpxor %xmm6, %xmm6, %xmm6
movzbl (%rdx,%r14), %r15d
movzbl 0x3(%rdx,%r14), %r12d
vmovq (%r11,%r12,8), %xmm8
movzbl 0x1(%rdx,%r14), %r12d
movzbl 0x2(%rdx,%r14), %r13d
vmovq (%r11,%r13,8), %xmm10
vmovq (%r11,%r12,8), %xmm7
movzbl 0x9(%rdx,%r14), %r13d
movzbl 0xb(%rdx,%r14), %r12d
vmovq (%r11,%r15,8), %xmm9
vmovq (%r11,%r12,8), %xmm11
movzbl 0xa(%rdx,%r14), %r15d
movl 0x4(%rdx,%r14), %r12d
vmovq (%r11,%r15,8), %xmm12
vmovq (%r11,%r13,8), %xmm13
movl 0xc(%rdx,%r14), %r15d
vpbroadcastd %r12d, %xmm14
movl %r12d, %r13d
shrl $0x7, %r13d
vpbroadcastd %r15d, %xmm15
vpinsrd $0x1, %r13d, %xmm14, %xmm16
movl %r15d, %r13d
shrl $0x7, %r13d
vpinsrd $0x1, %r13d, %xmm15, %xmm17
movzbl 0x8(%rdx,%r14), %r13d
vmovq (%r11,%r13,8), %xmm18
shrl $0x1b, %r12d
orl $0x1, %r12d
vpbroadcastw %r12d, %ymm19
shrl $0x1b, %r15d
orl $0x1, %r15d
vpbroadcastw %r15d, %ymm20
vpsrlvd %xmm0, %xmm14, %xmm14
vpunpcklqdq %xmm14, %xmm16, %xmm14 # xmm14 = xmm16[0],xmm14[0]
kxnorw %k0, %k0, %k1
vpxor %xmm3, %xmm3, %xmm3
vpand %xmm1, %xmm14, %xmm14
vpgatherdq (%rbx,%xmm14,8), %ymm3 {%k1}
vpunpcklqdq %xmm8, %xmm10, %xmm8 # xmm8 = xmm10[0],xmm8[0]
vpsrlvd %xmm0, %xmm15, %xmm10
vpunpcklqdq %xmm10, %xmm17, %xmm10 # xmm10 = xmm17[0],xmm10[0]
vpand %xmm1, %xmm10, %xmm10
kxnorw %k0, %k0, %k1
vpxor %xmm14, %xmm14, %xmm14
vpunpcklqdq %xmm7, %xmm9, %xmm7 # xmm7 = xmm9[0],xmm7[0]
vpgatherdq (%rbx,%xmm10,8), %ymm14 {%k1}
vinserti128 $0x1, %xmm8, %ymm7, %ymm7
vpunpcklqdq %xmm11, %xmm12, %xmm8 # xmm8 = xmm12[0],xmm11[0]
vpunpcklqdq %xmm13, %xmm18, %xmm9 # xmm9 = xmm18[0],xmm13[0]
vinserti128 $0x1, %xmm8, %ymm9, %ymm8
vmovdqu (%rdi,%r14,4), %ymm9
vpsignb %ymm3, %ymm9, %ymm3
vmovdqu 0x20(%rdi,%r14,4), %ymm9
vpsignb %ymm14, %ymm9, %ymm9
vpmaddubsw %ymm3, %ymm7, %ymm3
vpmaddubsw %ymm9, %ymm8, %ymm7
vpmaddwd %ymm19, %ymm3, %ymm3
vpaddd %ymm5, %ymm3, %ymm5
vpmaddwd %ymm20, %ymm7, %ymm3
vpaddd %ymm6, %ymm3, %ymm6
addq $0x10, %r14
addl $0x2, %ebp
cmpl $0x6, %ebp
jb 0x33e2b
vmulss %xmm4, %xmm21, %xmm3
vbroadcastss %xmm3, %ymm4
vpaddd %ymm6, %ymm5, %ymm3
vcvtdq2ps %ymm3, %ymm3
vfmadd213ps %ymm2, %ymm4, %ymm3 # ymm3 = (ymm4 * ymm3) + ymm2
incq %r8
addq $0x42, %rdx
addq $0x124, %rdi # imm = 0x124
vmovaps %ymm3, %ymm2
cmpq %rax, %r8
jne 0x33df7
jmp 0x33fb4
vxorps %xmm3, %xmm3, %xmm3
vextractf128 $0x1, %ymm3, %xmm0
vaddps %xmm3, %xmm0, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
vmulss 0x636d(%rip), %xmm0, %xmm0 # 0x3a340
vmovss %xmm0, (%rsi)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
leaq 0xf650(%rip), %rdi # 0x43640
leaq 0xeff9(%rip), %rsi # 0x42ff0
leaq 0xf83c(%rip), %rcx # 0x4383a
movl $0x1d0d, %edx # imm = 0x1D0D
callq 0x83b0
leaq 0x2c27(%rip), %rdi # 0x36c36
leaq 0xefda(%rip), %rsi # 0x42ff0
leaq 0xf81d(%rip), %rcx # 0x4383a
movl $0x1d0e, %edx # imm = 0x1D0E
callq 0x83b0
|
ggml_vec_dot_iq2_xxs_q8_K:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test dil, dil
jnz loc_33FE9
cmp [rsp+38h+arg_8], 1
jnz loc_34008
sar edi, 8
test edi, edi
jle loc_33FB0
mov eax, edi
lea rdx, [rcx+2]
lea rdi, [r9+4]
vxorps xmm2, xmm2, xmm2
xor r8d, r8d
mov r10, cs:ggml_table_f32_f16_ptr
lea r11, iq2xxs_grid
vpbroadcastq xmm0, cs:qword_3A598
vpbroadcastd xmm1, cs:dword_3A33C
lea rbx, keven_signs_q2xs
loc_33DF7:
mov r14, r8
shl r14, 6
lea r14, [r14+r8*2]
movzx r14d, word ptr [rcx+r14]
vmovss xmm21, dword ptr [r10+r14*4]
imul r14, r8, 124h
vmovss xmm4, dword ptr [r9+r14]
mov ebp, 0FFFFFFFEh
xor r14d, r14d
vpxor xmm5, xmm5, xmm5
vpxor xmm6, xmm6, xmm6
loc_33E2B:
movzx r15d, byte ptr [rdx+r14]
movzx r12d, byte ptr [rdx+r14+3]
vmovq xmm8, qword ptr [r11+r12*8]
movzx r12d, byte ptr [rdx+r14+1]
movzx r13d, byte ptr [rdx+r14+2]
vmovq xmm10, qword ptr [r11+r13*8]
vmovq xmm7, qword ptr [r11+r12*8]
movzx r13d, byte ptr [rdx+r14+9]
movzx r12d, byte ptr [rdx+r14+0Bh]
vmovq xmm9, qword ptr [r11+r15*8]
vmovq xmm11, qword ptr [r11+r12*8]
movzx r15d, byte ptr [rdx+r14+0Ah]
mov r12d, [rdx+r14+4]
vmovq xmm12, qword ptr [r11+r15*8]
vmovq xmm13, qword ptr [r11+r13*8]
mov r15d, [rdx+r14+0Ch]
vpbroadcastd xmm14, r12d
mov r13d, r12d
shr r13d, 7
vpbroadcastd xmm15, r15d
vpinsrd xmm16, xmm14, r13d, 1
mov r13d, r15d
shr r13d, 7
vpinsrd xmm17, xmm15, r13d, 1
movzx r13d, byte ptr [rdx+r14+8]
vmovq xmm18, qword ptr [r11+r13*8]
shr r12d, 1Bh
or r12d, 1
vpbroadcastw ymm19, r12d
shr r15d, 1Bh
or r15d, 1
vpbroadcastw ymm20, r15d
vpsrlvd xmm14, xmm14, xmm0
vpunpcklqdq xmm14, xmm16, xmm14
kxnorw k1, k0, k0
vpxor xmm3, xmm3, xmm3
vpand xmm14, xmm14, xmm1
vpgatherdq ymm3{k1}, ymmword ptr [rbx+xmm14*8]
vpunpcklqdq xmm8, xmm10, xmm8
vpsrlvd xmm10, xmm15, xmm0
vpunpcklqdq xmm10, xmm17, xmm10
vpand xmm10, xmm10, xmm1
kxnorw k1, k0, k0
vpxor xmm14, xmm14, xmm14
vpunpcklqdq xmm7, xmm9, xmm7
vpgatherdq ymm14{k1}, ymmword ptr [rbx+xmm10*8]
vinserti128 ymm7, ymm7, xmm8, 1
vpunpcklqdq xmm8, xmm12, xmm11
vpunpcklqdq xmm9, xmm18, xmm13
vinserti128 ymm8, ymm9, xmm8, 1
vmovdqu ymm9, ymmword ptr [rdi+r14*4]
vpsignb ymm3, ymm9, ymm3
vmovdqu ymm9, ymmword ptr [rdi+r14*4+20h]
vpsignb ymm9, ymm9, ymm14
vpmaddubsw ymm3, ymm7, ymm3
vpmaddubsw ymm7, ymm8, ymm9
vpmaddwd ymm3, ymm3, ymm19
vpaddd ymm5, ymm3, ymm5
vpmaddwd ymm3, ymm7, ymm20
vpaddd ymm6, ymm3, ymm6
add r14, 10h
add ebp, 2
cmp ebp, 6
jb loc_33E2B
vmulss xmm3, xmm21, xmm4
vbroadcastss ymm4, xmm3
vpaddd ymm3, ymm5, ymm6
vcvtdq2ps ymm3, ymm3
vfmadd213ps ymm3, ymm4, ymm2
inc r8
add rdx, 42h ; 'B'
add rdi, 124h
vmovaps ymm2, ymm3
cmp r8, rax
jnz loc_33DF7
jmp short loc_33FB4
loc_33FB0:
vxorps xmm3, xmm3, xmm3
loc_33FB4:
vextractf128 xmm0, ymm3, 1
vaddps xmm0, xmm0, xmm3
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmulss xmm0, xmm0, cs:dword_3A340
vmovss dword ptr [rsi], xmm0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
loc_33FE9:
lea rdi, aNQkK0; "n % QK_K == 0"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlVecDot_14; "void ggml_vec_dot_iq2_xxs_q8_K(int, flo"...
mov edx, 1D0Dh
call ___assert_fail
loc_34008:
lea rdi, aNrc1; "nrc == 1"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGgmlVecDot_14; "void ggml_vec_dot_iq2_xxs_q8_K(int, flo"...
mov edx, 1D0Eh
call ___assert_fail
|
long long ggml_vec_dot_iq2_xxs_q8_K(
int a1,
long long _RSI,
double a3,
double a4,
__m128 _XMM2,
__m128 _XMM3,
double a7,
__m128 _XMM5,
__m128 _XMM6,
long long a10,
long long a11,
long long a12,
long long _R9,
int a14,
int a15)
{
long long result; // rax
int v19; // edi
long long v20; // rdx
long long v23; // r8
unsigned int v33; // ebp
if ( (_BYTE)a1 )
__assert_fail(
"n % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-quants.c",
7437LL,
"void ggml_vec_dot_iq2_xxs_q8_K(int, float *restrict, size_t, const void *restrict, size_t, const void *restrict, size_t, int)");
if ( a15 != 1 )
__assert_fail(
"nrc == 1",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-quants.c",
7438LL,
"void ggml_vec_dot_iq2_xxs_q8_K(int, float *restrict, size_t, const void *restrict, size_t, const void *restrict, size_t, int)");
v19 = a1 >> 8;
if ( v19 <= 0 )
{
__asm { vxorps xmm3, xmm3, xmm3 }
}
else
{
result = (unsigned int)v19;
v20 = a11 + 2;
_RDI = _R9 + 4;
__asm { vxorps xmm2, xmm2, xmm2 }
v23 = 0LL;
_R10 = &ggml_table_f32_f16;
_R11 = &iq2xxs_grid;
__asm
{
vpbroadcastq xmm0, cs:qword_3A598
vpbroadcastd xmm1, cs:dword_3A33C
}
_RBX = &keven_signs_q2xs;
do
{
_R14 = *(unsigned __int16 *)(a11 + 66 * v23);
__asm { vmovss xmm21, dword ptr [r10+r14*4] }
_R14 = 292 * v23;
__asm { vmovss xmm4, dword ptr [r9+r14] }
v33 = -2;
_R14 = 0LL;
__asm
{
vpxor xmm5, xmm5, xmm5
vpxor xmm6, xmm6, xmm6
}
do
{
_R15 = *(unsigned __int8 *)(v20 + _R14);
_R12 = *(unsigned __int8 *)(v20 + _R14 + 3);
__asm { vmovq xmm8, qword ptr [r11+r12*8] }
_R12 = *(unsigned __int8 *)(v20 + _R14 + 1);
_R13 = *(unsigned __int8 *)(v20 + _R14 + 2);
__asm
{
vmovq xmm10, qword ptr [r11+r13*8]
vmovq xmm7, qword ptr [r11+r12*8]
}
_R13 = *(unsigned __int8 *)(v20 + _R14 + 9);
_R12 = *(unsigned __int8 *)(v20 + _R14 + 11);
__asm
{
vmovq xmm9, qword ptr [r11+r15*8]
vmovq xmm11, qword ptr [r11+r12*8]
}
_R15 = *(unsigned __int8 *)(v20 + _R14 + 10);
LODWORD(_R12) = *(_DWORD *)(v20 + _R14 + 4);
__asm
{
vmovq xmm12, qword ptr [r11+r15*8]
vmovq xmm13, qword ptr [r11+r13*8]
}
LODWORD(_R15) = *(_DWORD *)(v20 + _R14 + 12);
__asm
{
vpbroadcastd xmm14, r12d
vpbroadcastd xmm15, r15d
vpinsrd xmm16, xmm14, r13d, 1
vpinsrd xmm17, xmm15, r13d, 1
}
_R13 = *(unsigned __int8 *)(v20 + _R14 + 8);
__asm { vmovq xmm18, qword ptr [r11+r13*8] }
LODWORD(_R12) = ((unsigned int)_R12 >> 27) | 1;
__asm { vpbroadcastw ymm19, r12d }
LODWORD(_R15) = ((unsigned int)_R15 >> 27) | 1;
__asm
{
vpbroadcastw ymm20, r15d
vpsrlvd xmm14, xmm14, xmm0
vpunpcklqdq xmm14, xmm16, xmm14
kxnorw k1, k0, k0
vpxor xmm3, xmm3, xmm3
vpand xmm14, xmm14, xmm1
vpgatherdq ymm3{k1}, ymmword ptr [rbx+xmm14*8]
vpunpcklqdq xmm8, xmm10, xmm8
vpsrlvd xmm10, xmm15, xmm0
vpunpcklqdq xmm10, xmm17, xmm10
vpand xmm10, xmm10, xmm1
kxnorw k1, k0, k0
vpxor xmm14, xmm14, xmm14
vpunpcklqdq xmm7, xmm9, xmm7
vpgatherdq ymm14{k1}, ymmword ptr [rbx+xmm10*8]
vinserti128 ymm7, ymm7, xmm8, 1
vpunpcklqdq xmm8, xmm12, xmm11
vpunpcklqdq xmm9, xmm18, xmm13
vinserti128 ymm8, ymm9, xmm8, 1
vmovdqu ymm9, ymmword ptr [rdi+r14*4]
vpsignb ymm3, ymm9, ymm3
vmovdqu ymm9, ymmword ptr [rdi+r14*4+20h]
vpsignb ymm9, ymm9, ymm14
vpmaddubsw ymm3, ymm7, ymm3
vpmaddubsw ymm7, ymm8, ymm9
vpmaddwd ymm3, ymm3, ymm19
vpaddd ymm5, ymm3, ymm5
vpmaddwd ymm3, ymm7, ymm20
vpaddd ymm6, ymm3, ymm6
}
_R14 += 16LL;
v33 += 2;
}
while ( v33 < 6 );
__asm
{
vmulss xmm3, xmm21, xmm4
vbroadcastss ymm4, xmm3
vpaddd ymm3, ymm5, ymm6
vcvtdq2ps ymm3, ymm3
vfmadd213ps ymm3, ymm4, ymm2
}
++v23;
v20 += 66LL;
_RDI += 292LL;
__asm { vmovaps ymm2, ymm3 }
}
while ( v23 != result );
}
__asm
{
vextractf128 xmm0, ymm3, 1
vaddps xmm0, xmm0, xmm3
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
vmulss xmm0, xmm0, cs:dword_3A340
vmovss dword ptr [rsi], xmm0
vzeroupper
}
return result;
}
|
ggml_vec_dot_iq2_xxs_q8_K:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST DIL,DIL
JNZ 0x00133fe9
CMP dword ptr [RSP + 0x48],0x1
JNZ 0x00134008
SAR EDI,0x8
TEST EDI,EDI
JLE 0x00133fb0
MOV EAX,EDI
LEA RDX,[RCX + 0x2]
LEA RDI,[R9 + 0x4]
VXORPS XMM2,XMM2,XMM2
XOR R8D,R8D
MOV R10,qword ptr [0x00148f68]
LEA R11,[0x13aa00]
VPBROADCASTQ XMM0,qword ptr [0x0013a598]
VPBROADCASTD XMM1,dword ptr [0x0013a33c]
LEA RBX,[0x13a600]
MOV R14,R8
SHL R14,0x6
LEA R14,[R14 + R8*0x2]
MOVZX R14D,word ptr [RCX + R14*0x1]
VMOVSS XMM5{K0},dword ptr [R10 + R14*0x4]
IMUL R14,R8,0x124
VMOVSS XMM4,dword ptr [R9 + R14*0x1]
MOV EBP,0xfffffffe
XOR R14D,R14D
VPXOR XMM5,XMM5,XMM5
VPXOR XMM6,XMM6,XMM6
MOVZX R15D,byte ptr [RDX + R14*0x1]
MOVZX R12D,byte ptr [RDX + R14*0x1 + 0x3]
VMOVQ XMM8,qword ptr [R11 + R12*0x8]
MOVZX R12D,byte ptr [RDX + R14*0x1 + 0x1]
MOVZX R13D,byte ptr [RDX + R14*0x1 + 0x2]
VMOVQ XMM10,qword ptr [R11 + R13*0x8]
VMOVQ XMM7,qword ptr [R11 + R12*0x8]
MOVZX R13D,byte ptr [RDX + R14*0x1 + 0x9]
MOVZX R12D,byte ptr [RDX + R14*0x1 + 0xb]
VMOVQ XMM9,qword ptr [R11 + R15*0x8]
VMOVQ XMM11,qword ptr [R11 + R12*0x8]
MOVZX R15D,byte ptr [RDX + R14*0x1 + 0xa]
MOV R12D,dword ptr [RDX + R14*0x1 + 0x4]
VMOVQ XMM12,qword ptr [R11 + R15*0x8]
VMOVQ XMM13,qword ptr [R11 + R13*0x8]
MOV R15D,dword ptr [RDX + R14*0x1 + 0xc]
VPBROADCASTD XMM14
MOV R13D,R12D
SHR R13D,0x7
VPBROADCASTD XMM15
VPINSRD XMM0,XMM14,R13D,0x1
MOV R13D,R15D
SHR R13D,0x7
VPINSRD XMM1,XMM15,R13D,0x1
MOVZX R13D,byte ptr [RDX + R14*0x1 + 0x8]
VMOVQ XMM2,qword ptr [R11 + R13*0x8]
SHR R12D,0x1b
OR R12D,0x1
VPBROADCASTW YMM3
SHR R15D,0x1b
OR R15D,0x1
VPBROADCASTW YMM4
VPSRLVD XMM14,XMM14,XMM0
VPUNPCKLQDQ XMM14,XMM0,XMM14
LAB_00133fb0:
VXORPS XMM3,XMM3,XMM3
VEXTRACTF128 XMM0,YMM3,0x1
VADDPS XMM0,XMM0,XMM3
VSHUFPD XMM1,XMM0,XMM0,0x1
VADDPS XMM0,XMM0,XMM1
VHADDPS XMM0,XMM0,XMM0
VMULSS XMM0,XMM0,dword ptr [0x0013a340]
VMOVSS dword ptr [RSI],XMM0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
LAB_00133fe9:
LEA RDI,[0x143640]
LEA RSI,[0x142ff0]
LEA RCX,[0x14383a]
MOV EDX,0x1d0d
CALL 0x001083b0
LAB_00134008:
LEA RDI,[0x136c36]
LEA RSI,[0x142ff0]
LEA RCX,[0x14383a]
MOV EDX,0x1d0e
CALL 0x001083b0
|
/* WARNING: Control flow encountered bad instruction data */
void ggml_vec_dot_iq2_xxs_q8_K(int param_1,float *param_2,int8 param_3,long param_4)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
int in_stack_00000010;
if ((char)param_1 != '\0') {
/* WARNING: Subroutine does not return */
__assert_fail("n % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-quants.c"
,0x1d0d,
"void ggml_vec_dot_iq2_xxs_q8_K(int, float *restrict, size_t, const void *restrict, size_t, const void *restrict, size_t, int)"
);
}
if (in_stack_00000010 != 1) {
/* WARNING: Subroutine does not return */
__assert_fail("nrc == 1",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-quants.c"
,0x1d0e,
"void ggml_vec_dot_iq2_xxs_q8_K(int, float *restrict, size_t, const void *restrict, size_t, const void *restrict, size_t, int)"
);
}
if (param_1 >> 8 < 1) {
auVar1 = vshufpd_avx(ZEXT816(0),ZEXT816(0),1);
auVar3._0_4_ = auVar1._0_4_ + 0.0;
auVar3._4_4_ = auVar1._4_4_ + 0.0;
auVar3._8_4_ = auVar1._8_4_ + 0.0;
auVar3._12_4_ = auVar1._12_4_ + 0.0;
auVar1 = vhaddps_avx(auVar3,auVar3);
*param_2 = auVar1._0_4_ * DAT_0013a340;
return;
}
auVar1 = vpbroadcastd_avx512vl();
auVar2 = vpbroadcastd_avx512vl();
auVar3 = vpinsrd_avx512dq(auVar1,*(uint *)(param_4 + 6) >> 7,1);
vpinsrd_avx512dq(auVar2,*(uint *)(param_4 + 0xe) >> 7,1);
vpbroadcastw_avx512vl();
vpbroadcastw_avx512vl();
auVar1 = vpsrlvd_avx2(auVar1,auVar3);
vpunpcklqdq_avx512vl(auVar3,auVar1);
/* WARNING: Bad instruction - Truncating control flow here */
halt_baddata();
}
|
|
65,158 |
uf_zerofill_skip_zero
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_zerofill_skip_zero(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
if (get_bit(bit_buff))
bzero((char*) to,(uint) (end-to));
else
{
end-=rec->space_length_bits;
decode_bytes(rec,bit_buff,to,end);
bzero((char*) end,rec->space_length_bits);
}
}
|
O0
|
c
|
uf_zerofill_skip_zero:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xbe0b7
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xbe0db
jmp 0xbe0f7
movq -0x10(%rbp), %rdi
callq 0xbdc10
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0xbe0f7
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x29280
jmp 0xbe13b
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xbe320
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x29280
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
uf_zerofill_skip_zero_0:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_BE0B7
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_BE0DB
jmp short loc_BE0F7
loc_BE0B7:
mov rdi, [rbp+var_10]
call fill_buffer_0
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_BE0F7
loc_BE0DB:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
jmp short loc_BE13B
loc_BE0F7:
mov rax, [rbp+var_8]
mov ecx, [rax+1Ch]
mov rax, [rbp+var_20]
mov ecx, ecx
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call decode_bytes_0
mov rdi, [rbp+var_20]
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov edx, eax
xor esi, esi
call _memset
loc_BE13B:
add rsp, 20h
pop rbp
retn
|
long long uf_zerofill_skip_zero_0(long long a1, int *a2, long long a3, long long a4)
{
int v4; // eax
int v5; // ecx
long long v8; // [rsp+0h] [rbp-20h]
if ( a2[1] )
{
v4 = *a2;
v5 = a2[1] - 1;
a2[1] = v5;
if ( ((1 << v5) & v4) == 0 )
goto LABEL_6;
return memset(a3, 0LL, (unsigned int)(a4 - a3));
}
fill_buffer_0((long long)a2);
a2[1] = 31;
if ( *a2 < 0 )
return memset(a3, 0LL, (unsigned int)(a4 - a3));
LABEL_6:
v8 = a4 - *(unsigned int *)(a1 + 28);
decode_bytes_0(a1, a2, a3, v8);
return memset(v8, 0LL, *(unsigned int *)(a1 + 28));
}
|
uf_zerofill_skip_zero:
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 qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001be0b7
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001be0db
JMP 0x001be0f7
LAB_001be0b7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001bdc10
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x001be0f7
LAB_001be0db:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00129280
JMP 0x001be13b
LAB_001be0f7:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,ECX
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x001be320
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00129280
LAB_001be13b:
ADD RSP,0x20
POP RBP
RET
|
void uf_zerofill_skip_zero(long param_1,uint *param_2,void *param_3,long param_4)
{
uint uVar1;
void *__s;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
__s = (void *)(param_4 - (ulong)*(uint *)(param_1 + 0x1c));
decode_bytes(param_1,param_2,param_3,__s);
memset(__s,0,(ulong)*(uint *)(param_1 + 0x1c));
}
else {
memset(param_3,0,(ulong)(uint)((int)param_4 - (int)param_3));
}
return;
}
|
|
65,159 |
computational_node_sin
|
tsotchke[P]eshkol/src/core/utils/autodiff.c
|
ComputationalNode* computational_node_sin(ComputationalGraph* graph, ComputationalNode* input) {
assert(graph != NULL);
assert(input != NULL);
ComputationalNode* node = arena_alloc(graph->arena, sizeof(ComputationalNode));
if (!node) return NULL;
node->type = NODE_SIN;
node->value = sinf(input->value);
node->gradient = 0.0f;
node->left = input;
node->right = NULL;
node->constant = 0.0f;
return node;
}
|
O0
|
c
|
computational_node_sin:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xa739
jmp 0xa758
leaq 0x3da5(%rip), %rdi # 0xe4e5
leaq 0x3995(%rip), %rsi # 0xe0dc
movl $0x29b, %edx # imm = 0x29B
leaq 0x403c(%rip), %rcx # 0xe78f
callq 0x10b0
cmpq $0x0, -0x18(%rbp)
je 0xa761
jmp 0xa780
leaq 0x407c(%rip), %rdi # 0xe7e4
leaq 0x396d(%rip), %rsi # 0xe0dc
movl $0x29c, %edx # imm = 0x29C
leaq 0x4014(%rip), %rcx # 0xe78f
callq 0x10b0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x28, %esi
callq 0x38a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xa7a6
movq $0x0, -0x8(%rbp)
jmp 0xa7ff
movq -0x20(%rbp), %rax
movl $0x6, (%rax)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
callq 0x10c0
movq -0x20(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x20(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
computational_node_sin:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_10], 0
jz short loc_A739
jmp short loc_A758
loc_A739:
lea rdi, aGraphNull; "graph != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 29Bh
lea rcx, aComputationaln_5; "ComputationalNode *computational_node_s"...
call ___assert_fail
loc_A758:
cmp [rbp+var_18], 0
jz short loc_A761
jmp short loc_A780
loc_A761:
lea rdi, aInputNull; "input != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 29Ch
lea rcx, aComputationaln_5; "ComputationalNode *computational_node_s"...
call ___assert_fail
loc_A780:
mov rax, [rbp+var_10]
mov rdi, [rax]
mov esi, 28h ; '('
call arena_alloc
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_A7A6
mov [rbp+var_8], 0
jmp short loc_A7FF
loc_A7A6:
mov rax, [rbp+var_20]
mov dword ptr [rax], 6
mov rax, [rbp+var_18]
movss xmm0, dword ptr [rax+4]
call _sinf
mov rax, [rbp+var_20]
movss dword ptr [rax+4], xmm0
mov rax, [rbp+var_20]
xorps xmm0, xmm0
movss dword ptr [rax+8], xmm0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+10h], rcx
mov rax, [rbp+var_20]
mov qword ptr [rax+18h], 0
mov rax, [rbp+var_20]
xorps xmm0, xmm0
movss dword ptr [rax+20h], xmm0
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_A7FF:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
long long computational_node_sin(long long *a1, long long a2)
{
long long v3; // [rsp+0h] [rbp-20h]
if ( !a1 )
__assert_fail(
"graph != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
667LL,
"ComputationalNode *computational_node_sin(ComputationalGraph *, ComputationalNode *)");
if ( !a2 )
__assert_fail(
"input != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
668LL,
"ComputationalNode *computational_node_sin(ComputationalGraph *, ComputationalNode *)");
v3 = arena_alloc(*a1, 40LL);
if ( !v3 )
return 0LL;
*(_DWORD *)v3 = 6;
*(float *)(v3 + 4) = sinf(*(float *)(a2 + 4));
*(_DWORD *)(v3 + 8) = 0;
*(_QWORD *)(v3 + 16) = a2;
*(_QWORD *)(v3 + 24) = 0LL;
*(_DWORD *)(v3 + 32) = 0;
return v3;
}
|
computational_node_sin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0010a739
JMP 0x0010a758
LAB_0010a739:
LEA RDI,[0x10e4a3]
LEA RSI,[0x10e0ac]
MOV EDX,0x29b
LEA RCX,[0x10e74d]
CALL 0x001010b0
LAB_0010a758:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0010a761
JMP 0x0010a780
LAB_0010a761:
LEA RDI,[0x10e7a2]
LEA RSI,[0x10e0ac]
MOV EDX,0x29c
LEA RCX,[0x10e74d]
CALL 0x001010b0
LAB_0010a780:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV ESI,0x28
CALL 0x001038a0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0010a7a6
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010a7ff
LAB_0010a7a6:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x6
MOV RAX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RAX + 0x4]
CALL 0x001010c0
MOV RAX,qword ptr [RBP + -0x20]
MOVSS dword ptr [RAX + 0x4],XMM0
MOV RAX,qword ptr [RBP + -0x20]
XORPS XMM0,XMM0
MOVSS dword ptr [RAX + 0x8],XMM0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x20]
XORPS XMM0,XMM0
MOVSS dword ptr [RAX + 0x20],XMM0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_0010a7ff:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int4 * computational_node_sin(int8 *param_1,long param_2)
{
float fVar1;
int4 *local_10;
if (param_1 == (int8 *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("graph != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",0x29b,
"ComputationalNode *computational_node_sin(ComputationalGraph *, ComputationalNode *)"
);
}
if (param_2 != 0) {
local_10 = (int4 *)arena_alloc(*param_1,0x28);
if (local_10 == (int4 *)0x0) {
local_10 = (int4 *)0x0;
}
else {
*local_10 = 6;
fVar1 = sinf(*(float *)(param_2 + 4));
local_10[1] = fVar1;
local_10[2] = 0;
*(long *)(local_10 + 4) = param_2;
*(int8 *)(local_10 + 6) = 0;
local_10[8] = 0;
}
return local_10;
}
/* WARNING: Subroutine does not return */
__assert_fail("input != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",
0x29c,
"ComputationalNode *computational_node_sin(ComputationalGraph *, ComputationalNode *)"
);
}
|
|
65,160 |
computational_node_sin
|
tsotchke[P]eshkol/src/core/utils/autodiff.c
|
ComputationalNode* computational_node_sin(ComputationalGraph* graph, ComputationalNode* input) {
assert(graph != NULL);
assert(input != NULL);
ComputationalNode* node = arena_alloc(graph->arena, sizeof(ComputationalNode));
if (!node) return NULL;
node->type = NODE_SIN;
node->value = sinf(input->value);
node->gradient = 0.0f;
node->left = input;
node->right = NULL;
node->constant = 0.0f;
return node;
}
|
O3
|
c
|
computational_node_sin:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x747f
movq %rsi, %rbx
testq %rsi, %rsi
je 0x749e
movq (%rdi), %rdi
movl $0x28, %esi
callq 0x2f23
movq %rax, %r14
testq %rax, %rax
je 0x7474
movl $0x6, (%r14)
movss 0x4(%rbx), %xmm0
callq 0x10c0
movss %xmm0, 0x4(%r14)
xorl %eax, %eax
movl %eax, 0x8(%r14)
movq %rbx, 0x10(%r14)
movq $0x0, 0x18(%r14)
movl %eax, 0x20(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x41cf(%rip), %rdi # 0xb655
leaq 0x3dbf(%rip), %rsi # 0xb24c
leaq 0x446b(%rip), %rcx # 0xb8ff
movl $0x29b, %edx # imm = 0x29B
callq 0x10b0
leaq 0x44af(%rip), %rdi # 0xb954
leaq 0x3da0(%rip), %rsi # 0xb24c
leaq 0x444c(%rip), %rcx # 0xb8ff
movl $0x29c, %edx # imm = 0x29C
callq 0x10b0
|
computational_node_sin:
push r14
push rbx
push rax
test rdi, rdi
jz short loc_747F
mov rbx, rsi
test rsi, rsi
jz short loc_749E
mov rdi, [rdi]
mov esi, 28h ; '('
call arena_alloc
mov r14, rax
test rax, rax
jz short loc_7474
mov dword ptr [r14], 6
movss xmm0, dword ptr [rbx+4]
call _sinf
movss dword ptr [r14+4], xmm0
xor eax, eax
mov [r14+8], eax
mov [r14+10h], rbx
mov qword ptr [r14+18h], 0
mov [r14+20h], eax
loc_7474:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_747F:
lea rdi, aGraphNull; "graph != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aComputationaln_5; "ComputationalNode *computational_node_s"...
mov edx, 29Bh
call ___assert_fail
loc_749E:
lea rdi, aInputNull; "input != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aComputationaln_5; "ComputationalNode *computational_node_s"...
mov edx, 29Ch
call ___assert_fail
|
_DWORD * computational_node_sin(long long *a1, long long a2)
{
_DWORD *v2; // rax
_DWORD *v3; // r14
double v4; // xmm0_8
if ( !a1 )
__assert_fail(
"graph != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
667LL,
"ComputationalNode *computational_node_sin(ComputationalGraph *, ComputationalNode *)");
if ( !a2 )
__assert_fail(
"input != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
668LL,
"ComputationalNode *computational_node_sin(ComputationalGraph *, ComputationalNode *)");
v2 = (_DWORD *)arena_alloc(*a1, 40LL);
v3 = v2;
if ( v2 )
{
*v2 = 6;
v4 = sinf(*(float *)(a2 + 4));
*(_QWORD *)(v3 + 1) = LODWORD(v4);
*((_QWORD *)v3 + 2) = a2;
*((_QWORD *)v3 + 3) = 0LL;
v3[8] = 0;
}
return v3;
}
| |||
65,161 |
ma_dynmap_file
|
eloqsql/storage/maria/ma_dynrec.c
|
my_bool _ma_dynmap_file(MARIA_HA *info, my_off_t size)
{
DBUG_ENTER("_ma_dynmap_file");
if (size > (my_off_t) (~((size_t) 0)) - MEMMAP_EXTRA_MARGIN)
{
DBUG_PRINT("warning", ("File is too large for mmap"));
DBUG_RETURN(1);
}
/*
Ingo wonders if it is good to use MAP_NORESERVE. From the Linux man page:
MAP_NORESERVE
Do not reserve swap space for this mapping. When swap space is
reserved, one has the guarantee that it is possible to modify the
mapping. When swap space is not reserved one might get SIGSEGV
upon a write if no physical memory is available.
*/
info->s->file_map= (uchar*)
my_mmap(0, (size_t)(size + MEMMAP_EXTRA_MARGIN),
info->s->mode==O_RDONLY ? PROT_READ :
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_NORESERVE,
info->dfile.file, 0L);
if (info->s->file_map == (uchar*) MAP_FAILED)
{
info->s->file_map= NULL;
DBUG_RETURN(1);
}
#if defined(HAVE_MADVISE)
madvise((char*) info->s->file_map, size, MADV_RANDOM);
#endif
info->s->mmaped_length= size;
DBUG_RETURN(0);
}
|
O3
|
c
|
ma_dynmap_file:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %bl
cmpq $-0x8, %rsi
ja 0x4539c
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
xorl %ecx, %ecx
cmpl $0x0, 0x7a4(%rax)
leaq 0x7(%rsi), %rsi
setne %cl
leal 0x1(,%rcx,2), %edx
movl 0x480(%rdi), %r8d
xorl %edi, %edi
movl $0x4001, %ecx # imm = 0x4001
xorl %r9d, %r9d
callq 0x2a5e0
movq (%r15), %rcx
movq %rax, 0x5f0(%rcx)
movq (%r15), %rax
movq 0x5f0(%rax), %rdi
cmpq $-0x1, %rdi
je 0x45391
movq %r14, %rsi
movl $0x1, %edx
callq 0x2a470
movq (%r15), %rax
movq %r14, 0xa00(%rax)
xorl %ebx, %ebx
jmp 0x4539c
movq $0x0, 0x5f0(%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
_ma_dynmap_file:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov bl, 1
cmp rsi, 0FFFFFFFFFFFFFFF8h
ja short loc_4539C
mov r14, rsi
mov r15, rdi
mov rax, [rdi]
xor ecx, ecx
cmp dword ptr [rax+7A4h], 0
lea rsi, [rsi+7]
setnz cl
lea edx, ds:1[rcx*2]
mov r8d, [rdi+480h]
xor edi, edi
mov ecx, 4001h
xor r9d, r9d
call _mmap64
mov rcx, [r15]
mov [rcx+5F0h], rax
mov rax, [r15]
mov rdi, [rax+5F0h]
cmp rdi, 0FFFFFFFFFFFFFFFFh
jz short loc_45391
mov rsi, r14
mov edx, 1
call _madvise
mov rax, [r15]
mov [rax+0A00h], r14
xor ebx, ebx
jmp short loc_4539C
loc_45391:
mov qword ptr [rax+5F0h], 0
loc_4539C:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long ma_dynmap_file(unsigned int *a1, unsigned long long a2)
{
long long v2; // rax
unsigned int v3; // ebx
long long v5; // rax
long long v6; // rdi
LOBYTE(v3) = 1;
if ( a2 <= 0xFFFFFFFFFFFFFFF8LL )
{
*(_QWORD *)(*(_QWORD *)a1 + 1520LL) = mmap64(
0LL,
a2 + 7,
2 * (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 1956LL) != 0) + 1,
16385LL,
a1[288],
0LL,
v2);
v5 = *(_QWORD *)a1;
v6 = *(_QWORD *)(*(_QWORD *)a1 + 1520LL);
if ( v6 == -1 )
{
*(_QWORD *)(v5 + 1520) = 0LL;
}
else
{
madvise(v6, a2, 1LL);
*(_QWORD *)(*(_QWORD *)a1 + 2560LL) = a2;
return 0;
}
}
return v3;
}
|
_ma_dynmap_file:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV BL,0x1
CMP RSI,-0x8
JA 0x0014539c
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI]
XOR ECX,ECX
CMP dword ptr [RAX + 0x7a4],0x0
LEA RSI,[RSI + 0x7]
SETNZ CL
LEA EDX,[0x1 + RCX*0x2]
MOV R8D,dword ptr [RDI + 0x480]
XOR EDI,EDI
MOV ECX,0x4001
XOR R9D,R9D
CALL 0x0012a5e0
MOV RCX,qword ptr [R15]
MOV qword ptr [RCX + 0x5f0],RAX
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX + 0x5f0]
CMP RDI,-0x1
JZ 0x00145391
MOV RSI,R14
MOV EDX,0x1
CALL 0x0012a470
MOV RAX,qword ptr [R15]
MOV qword ptr [RAX + 0xa00],R14
XOR EBX,EBX
JMP 0x0014539c
LAB_00145391:
MOV qword ptr [RAX + 0x5f0],0x0
LAB_0014539c:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong _ma_dynmap_file(long *param_1,ulong param_2)
{
void *pvVar1;
int8 unaff_RBX;
ulong uVar2;
uVar2 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (param_2 < 0xfffffffffffffff9) {
pvVar1 = mmap64((void *)0x0,param_2 + 7,(uint)(*(int *)(*param_1 + 0x7a4) != 0) * 2 + 1,0x4001,
(int)param_1[0x90],0);
*(void **)(*param_1 + 0x5f0) = pvVar1;
pvVar1 = *(void **)(*param_1 + 0x5f0);
if (pvVar1 == (void *)0xffffffffffffffff) {
*(int8 *)(*param_1 + 0x5f0) = 0;
}
else {
madvise(pvVar1,param_2,1);
*(ulong *)(*param_1 + 0xa00) = param_2;
uVar2 = 0;
}
}
return uVar2 & 0xffffffff;
}
|
|
65,162 |
google::protobuf::Int32Value::ByteSizeLong() const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wrappers.pb.cc
|
size_t Int32Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Int32Value)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// int32 value = 1;
if (this->_internal_value() != 0) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_value());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
|
O0
|
cpp
|
google::protobuf::Int32Value::ByteSizeLong() const:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
callq 0x467b70
cmpl $0x0, %eax
je 0x463219
movq 0x8(%rsp), %rdi
callq 0x467b70
movl %eax, %edi
callq 0x467b80
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rdi, %rdx
addq $0x10, %rdx
addq $0x4, %rdx
callq 0x4305e0
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
_ZNK6google8protobuf10Int32Value12ByteSizeLongEv:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rdi, [rsp+28h+var_8]; this
mov [rsp+28h+var_20], rdi
mov [rsp+28h+var_10], 0
mov [rsp+28h+var_14], 0
call _ZNK6google8protobuf10Int32Value15_internal_valueEv; google::protobuf::Int32Value::_internal_value(void)
cmp eax, 0
jz short loc_463219
mov rdi, [rsp+28h+var_20]; this
call _ZNK6google8protobuf10Int32Value15_internal_valueEv; google::protobuf::Int32Value::_internal_value(void)
mov edi, eax; this
call _ZN6google8protobuf8internal14WireFormatLite16Int32SizePlusOneEi; google::protobuf::internal::WireFormatLite::Int32SizePlusOne(int)
add rax, [rsp+28h+var_10]
mov [rsp+28h+var_10], rax
loc_463219:
mov rdi, [rsp+28h+var_20]; this
mov rsi, [rsp+28h+var_10]; unsigned __int64
mov rdx, rdi
add rdx, 10h
add rdx, 4; google::protobuf::internal::CachedSize *
call _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *)
add rsp, 28h
retn
|
google::protobuf::internal * google::protobuf::Int32Value::ByteSizeLong(
google::protobuf::Int32Value *this,
int a2)
{
unsigned int v2; // eax
const google::protobuf::UnknownFieldSet *v4; // [rsp+18h] [rbp-10h]
v4 = 0LL;
if ( (unsigned int)google::protobuf::Int32Value::_internal_value(this) )
{
v2 = google::protobuf::Int32Value::_internal_value(this);
v4 = (const google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormatLite::Int32SizePlusOne(
(google::protobuf::internal::WireFormatLite *)v2,
a2);
}
return google::protobuf::Message::MaybeComputeUnknownFieldsSize(
this,
v4,
(google::protobuf::Int32Value *)((char *)this + 20));
}
|
end:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00464c50
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x18
RET
|
/* std::set<std::shared_ptr<YAML::detail::node>, std::less<std::shared_ptr<YAML::detail::node> >,
std::allocator<std::shared_ptr<YAML::detail::node> > >::end() const */
int8 __thiscall
std::
set<std::shared_ptr<YAML::detail::node>,std::less<std::shared_ptr<YAML::detail::node>>,std::allocator<std::shared_ptr<YAML::detail::node>>>
::end(set<std::shared_ptr<YAML::detail::node>,std::less<std::shared_ptr<YAML::detail::node>>,std::allocator<std::shared_ptr<YAML::detail::node>>>
*this)
{
int8 uVar1;
uVar1 = _Rb_tree<std::shared_ptr<YAML::detail::node>,std::shared_ptr<YAML::detail::node>,std::_Identity<std::shared_ptr<YAML::detail::node>>,std::less<std::shared_ptr<YAML::detail::node>>,std::allocator<std::shared_ptr<YAML::detail::node>>>
::end((_Rb_tree<std::shared_ptr<YAML::detail::node>,std::shared_ptr<YAML::detail::node>,std::_Identity<std::shared_ptr<YAML::detail::node>>,std::less<std::shared_ptr<YAML::detail::node>>,std::allocator<std::shared_ptr<YAML::detail::node>>>
*)this);
return uVar1;
}
|
|
65,163 |
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 0x6943d
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x69639
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0x69454
movl $0x0, -0x4(%rbp)
jmp 0x69639
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0x694b0
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x6947d
movl $0x0, -0x4(%rbp)
jmp 0x69639
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 0x69639
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x69552
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x694fd
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x694fd
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0x69509
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x69509
movl $0x0, -0x4(%rbp)
jmp 0x69639
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 0x69639
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0x69630
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x695cb
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x695cb
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x695cb
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0x695b1
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x695cb
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0x695d4
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x695d4
movl $0x0, -0x4(%rbp)
jmp 0x69639
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 0x69639
jmp 0x69632
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_6943D
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_69639
loc_6943D:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_69454
mov [rbp+var_4], 0
jmp loc_69639
loc_69454:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_694B0
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_6947D
mov [rbp+var_4], 0
jmp loc_69639
loc_6947D:
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_69639
loc_694B0:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_69552
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_694FD
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_694FD
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_69509
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_69509
loc_694FD:
mov [rbp+var_4], 0
jmp loc_69639
loc_69509:
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_69639
loc_69552:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_69630
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_695CB
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_695CB
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_695CB
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_695B1
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_695CB
loc_695B1:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_695D4
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_695D4
loc_695CB:
mov [rbp+var_4], 0
jmp short loc_69639
loc_695D4:
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_69639
loc_69630:
jmp short $+2
loc_69632:
mov [rbp+var_4], 0
loc_69639:
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;
}
}
|
my_mb_wc_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x20]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x80
JGE 0x0016943d
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00169639
LAB_0016943d:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xc2
JGE 0x00169454
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00169639
LAB_00169454:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe0
JGE 0x001694b0
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x0016947d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00169639
LAB_0016947d:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x1f
MOVSXD RCX,EAX
SHL RCX,0x6
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00169639
LAB_001694b0:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x00169552
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001694fd
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001694fd
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe1
JGE 0x00169509
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x00169509
LAB_001694fd:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00169639
LAB_00169509:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0xf
MOVSXD RCX,EAX
SHL RCX,0xc
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00169639
LAB_00169552:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf5
JGE 0x00169630
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001695cb
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001695cb
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001695cb
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf1
JGE 0x001695b1
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x90
JL 0x001695cb
LAB_001695b1:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf3
JLE 0x001695d4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x8f
JLE 0x001695d4
LAB_001695cb:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00169639
LAB_001695d4:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x7
MOVSXD RCX,EAX
SHL RCX,0x12
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0xc
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x00169639
LAB_00169630:
JMP 0x00169632
LAB_00169632:
MOV dword ptr [RBP + -0x4],0x0
LAB_00169639:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf8mb4_no_range(int8 param_1,ulong *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
bVar1 = *param_3;
if (bVar1 < 0x80) {
*param_2 = (ulong)bVar1;
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if ((param_3[1] ^ 0x80) < 0x40) {
*param_2 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_3[1] ^ 0x80);
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if ((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_3[1])))) {
*param_2 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_3[1] ^ 0x80) << 6 |
(long)(int)(param_3[2] ^ 0x80);
local_c = 3;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf5) {
if ((((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) &&
((param_3[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_3[1])))) &&
((bVar1 < 0xf4 || (param_3[1] < 0x90)))) {
*param_2 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_3[1] ^ 0x80) << 0xc |
(long)(int)(param_3[2] ^ 0x80) << 6 | (long)(int)(param_3[3] ^ 0x80);
local_c = 4;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
65,164 |
rtree_get_first
|
eloqsql/storage/myisam/rt_index.c
|
int rtree_get_first(MI_INFO *info, uint keynr, uint key_length)
{
my_off_t root;
MI_KEYDEF *keyinfo = info->s->keyinfo + keynr;
if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
info->rtree_recursion_depth = -1;
info->buff_used = 1;
return rtree_get_req(info, keyinfo, key_length, root, 0);
}
|
O3
|
c
|
rtree_get_first:
movq (%rdi), %rax
movl %esi, %ecx
movq 0x98(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x8cc89
imulq $0x70, %rcx, %rsi
addq 0x218(%rax), %rsi
movl $0xffffffff, 0x3c0(%rdi) # imm = 0xFFFFFFFF
movb $0x1, 0x33d(%rdi)
xorl %ecx, %ecx
jmp 0x8cc9f
pushq %rbp
movq %rsp, %rbp
callq 0xa8156
movl $0x89, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
|
rtree_get_first:
mov rax, [rdi]
mov ecx, esi
mov rdx, [rax+98h]
mov rdx, [rdx+rcx*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_8CC89
imul rsi, rcx, 70h ; 'p'
add rsi, [rax+218h]
mov dword ptr [rdi+3C0h], 0FFFFFFFFh
mov byte ptr [rdi+33Dh], 1
xor ecx, ecx
jmp short rtree_get_req
loc_8CC89:
push rbp
mov rbp, rsp
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 0FFFFFFFFh
pop rbp
retn
|
long long rtree_get_first(long long a1, unsigned int a2)
{
long long v2; // rdx
long long v3; // rsi
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 152LL) + 8LL * a2);
if ( v2 == -1 )
{
*(_DWORD *)my_thread_var(a1) = 137;
return 0xFFFFFFFFLL;
}
else
{
v3 = *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * a2;
*(_DWORD *)(a1 + 960) = -1;
*(_BYTE *)(a1 + 829) = 1;
return rtree_get_req(a1, v3, v2, 0LL);
}
}
|
rtree_get_first:
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RDX,qword ptr [RAX + 0x98]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP RDX,-0x1
JZ 0x0018cc89
IMUL RSI,RCX,0x70
ADD RSI,qword ptr [RAX + 0x218]
MOV dword ptr [RDI + 0x3c0],0xffffffff
MOV byte ptr [RDI + 0x33d],0x1
XOR ECX,ECX
JMP 0x0018cc9f
LAB_0018cc89:
PUSH RBP
MOV RBP,RSP
CALL 0x001a8156
MOV dword ptr [RAX],0x89
MOV EAX,0xffffffff
POP RBP
RET
|
int8 rtree_get_first(long *param_1,ulong param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 *puVar4;
lVar1 = *(long *)(*(long *)(*param_1 + 0x98) + (param_2 & 0xffffffff) * 8);
if (lVar1 != -1) {
lVar2 = *(long *)(*param_1 + 0x218);
*(int4 *)(param_1 + 0x78) = 0xffffffff;
*(int1 *)((long)param_1 + 0x33d) = 1;
uVar3 = rtree_get_req(param_1,(param_2 & 0xffffffff) * 0x70 + lVar2,lVar1,0);
return uVar3;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0xffffffff;
}
|
|
65,165 |
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 0x51bec
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0x51bf3
xorl %eax, %eax
cmpb $-0x3e, %cl
jae 0x51bf5
popq %rbp
retq
cmpb $-0x21, %cl
ja 0x51c18
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
cmpb $0x3f, %dl
ja 0x51bf3
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0x51be7
cmpb $-0x11, %cl
ja 0x51c64
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0x51bf3
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0x51bf3
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
testb %r9b, %r8b
jne 0x51bf3
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 0x51be7
cmpb $-0xc, %cl
ja 0x51bf3
movzbl 0x1(%rsi), %r8d
cmpb $-0x41, %r8b
jg 0x51bf3
movzbl 0x2(%rsi), %edx
cmpb $-0x41, %dl
jg 0x51bf3
movzbl 0x3(%rsi), %esi
cmpb $-0x41, %sil
jg 0x51bf3
cmpl $0xf0, %ecx
sete %r9b
cmpb $-0x70, %r8b
setb %r10b
testb %r10b, %r9b
jne 0x51bf3
cmpl $0xf4, %ecx
sete %r9b
cmpb $-0x70, %r8b
setae %r10b
testb %r10b, %r9b
jne 0x51bf3
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 0x51c5f
|
my_mb_wc_utf8mb4_no_range:
push rbp
mov rbp, rsp
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_51BEC
mov eax, 1
loc_51BE7:
mov [rdi], rcx
jmp short loc_51BF3
loc_51BEC:
xor eax, eax
cmp cl, 0C2h
jnb short loc_51BF5
loc_51BF3:
pop rbp
retn
loc_51BF5:
cmp cl, 0DFh
ja short loc_51C18
movzx edx, byte ptr [rsi+1]
xor edx, 80h
cmp dl, 3Fh ; '?'
ja short loc_51BF3
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_51BE7
loc_51C18:
cmp cl, 0EFh
ja short loc_51C64
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_51BF3
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_51BF3
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
test r8b, r9b
jnz short loc_51BF3
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_51C5F:
mov rcx, rsi
jmp short loc_51BE7
loc_51C64:
cmp cl, 0F4h
ja short loc_51BF3
movzx r8d, byte ptr [rsi+1]
cmp r8b, 0BFh
jg loc_51BF3
movzx edx, byte ptr [rsi+2]
cmp dl, 0BFh
jg loc_51BF3
movzx esi, byte ptr [rsi+3]
cmp sil, 0BFh
jg loc_51BF3
cmp ecx, 0F0h
setz r9b
cmp r8b, 90h
setb r10b
test r9b, r10b
jnz loc_51BF3
cmp ecx, 0F4h
setz r9b
cmp r8b, 90h
setnb r10b
test r9b, r10b
jnz loc_51BF3
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_51C5F
|
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 0x00151bec
MOV EAX,0x1
LAB_00151be7:
MOV qword ptr [RDI],RCX
JMP 0x00151bf3
LAB_00151bec:
XOR EAX,EAX
CMP CL,0xc2
JNC 0x00151bf5
LAB_00151bf3:
POP RBP
RET
LAB_00151bf5:
CMP CL,0xdf
JA 0x00151c18
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
CMP DL,0x3f
JA 0x00151bf3
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x00151be7
LAB_00151c18:
CMP CL,0xef
JA 0x00151c64
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x00151bf3
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x00151bf3
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
TEST R8B,R9B
JNZ 0x00151bf3
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_00151c5f:
MOV RCX,RSI
JMP 0x00151be7
LAB_00151c64:
CMP CL,0xf4
JA 0x00151bf3
MOVZX R8D,byte ptr [RSI + 0x1]
CMP R8B,0xbf
JG 0x00151bf3
MOVZX EDX,byte ptr [RSI + 0x2]
CMP DL,0xbf
JG 0x00151bf3
MOVZX ESI,byte ptr [RSI + 0x3]
CMP SIL,0xbf
JG 0x00151bf3
CMP ECX,0xf0
SETZ R9B
CMP R8B,0x90
SETC R10B
TEST R9B,R10B
JNZ 0x00151bf3
CMP ECX,0xf4
SETZ R9B
CMP R8B,0x90
SETNC R10B
TEST R9B,R10B
JNZ 0x00151bf3
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 0x00151c5f
|
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;
}
|
|
65,166 |
mysql_select_db_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_select_db_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_select_db,
(parms->mysql, parms->db),
parms->mysql,
int,
r_int)
}
|
O0
|
c
|
mysql_select_db_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x37750
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
mysql_select_db_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
call mysql_select_db
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
_DWORD * mysql_select_db_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL);
v2[2] = mysql_select_db(*a1, a1[1]);
result = v2;
*v2 = 0;
return result;
}
|
mysql_select_db_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00137750
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_select_db_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_select_db(*param_1,param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
65,167 |
mysql_select_db_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_select_db_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_select_db,
(parms->mysql, parms->db),
parms->mysql,
int,
r_int)
}
|
O3
|
c
|
mysql_select_db_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movq %rax, %rdi
callq 0x2aeff
movl %eax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_select_db_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rsi, [rdi+8]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
mov rdi, rax
call mysql_select_db
mov [rbx+8], eax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_select_db_start_internal(long long *a1)
{
_DWORD *v1; // rbx
long long result; // rax
v1 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL);
result = mysql_select_db(*a1, a1[1]);
v1[2] = result;
*v1 = 0;
return result;
}
|
mysql_select_db_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV RDI,RAX
CALL 0x0012aeff
MOV dword ptr [RBX + 0x8],EAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_select_db_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_select_db(*param_1,param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
65,168 |
ImPlot::SetNextMarkerStyle(int, float, ImVec4 const&, float, ImVec4 const&)
|
zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp
|
void SetNextMarkerStyle(ImPlotMarker marker, float size, const ImVec4& fill, float weight, const ImVec4& outline) {
ImPlotContext& gp = *GImPlot;
gp.NextItemData.Marker = marker;
gp.NextItemData.Colors[ImPlotCol_MarkerFill] = fill;
gp.NextItemData.MarkerSize = size;
gp.NextItemData.Colors[ImPlotCol_MarkerOutline] = outline;
gp.NextItemData.MarkerWeight = weight;
}
|
O1
|
cpp
|
ImPlot::SetNextMarkerStyle(int, float, ImVec4 const&, float, ImVec4 const&):
leaq 0x26ba72(%rip), %rax # 0x336ca0
movq (%rax), %rax
movl %edi, 0x58c(%rax)
movups (%rsi), %xmm2
movups %xmm2, 0x568(%rax)
movss %xmm0, 0x590(%rax)
movups (%rdx), %xmm0
movups %xmm0, 0x558(%rax)
movss %xmm1, 0x594(%rax)
retq
|
_ZN6ImPlot18SetNextMarkerStyleEifRK6ImVec4fS2_:
lea rax, GImPlot
mov rax, [rax]
mov [rax+58Ch], edi
movups xmm2, xmmword ptr [rsi]
movups xmmword ptr [rax+568h], xmm2
movss dword ptr [rax+590h], xmm0
movups xmm0, xmmword ptr [rdx]
movups xmmword ptr [rax+558h], xmm0
movss dword ptr [rax+594h], xmm1
retn
|
ImGui * ImPlot::SetNextMarkerStyle(int a1, _OWORD *a2, _OWORD *a3, float a4, float a5)
{
ImGui *result; // rax
result = GImPlot;
*((_DWORD *)GImPlot + 355) = a1;
*(_OWORD *)((char *)result + 1384) = *a2;
*((float *)result + 356) = a4;
*(_OWORD *)((char *)result + 1368) = *a3;
*((float *)result + 357) = a5;
return result;
}
|
SetNextMarkerStyle:
LEA RAX,[0x436ca0]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + 0x58c],EDI
MOVUPS XMM2,xmmword ptr [RSI]
MOVUPS xmmword ptr [RAX + 0x568],XMM2
MOVSS dword ptr [RAX + 0x590],XMM0
MOVUPS XMM0,xmmword ptr [RDX]
MOVUPS xmmword ptr [RAX + 0x558],XMM0
MOVSS dword ptr [RAX + 0x594],XMM1
RET
|
/* ImPlot::SetNextMarkerStyle(int, float, ImVec4 const&, float, ImVec4 const&) */
void ImPlot::SetNextMarkerStyle
(int param_1,float param_2,ImVec4 *param_3,float param_4,ImVec4 *param_5)
{
int8 uVar1;
long lVar2;
lVar2 = GImPlot;
*(int *)(GImPlot + 0x58c) = param_1;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(lVar2 + 0x568) = *(int8 *)param_3;
*(int8 *)(lVar2 + 0x570) = uVar1;
*(float *)(lVar2 + 0x590) = param_2;
uVar1 = *(int8 *)(param_5 + 8);
*(int8 *)(lVar2 + 0x558) = *(int8 *)param_5;
*(int8 *)(lVar2 + 0x560) = uVar1;
*(float *)(lVar2 + 0x594) = param_4;
return;
}
|
|
65,169 |
TextLabel::setFont(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
|
GhostEscape/src/affiliate/text_label.cpp
|
void TextLabel::setFont(const std::string &font_path, int font_size)
{
font_path_ = font_path;
font_size_ = font_size;
auto font = game_.getAssetStore()->getFont(font_path_, font_size_);
if (!ttf_text_) ttf_text_ = game_.createTTF_Text("", font_path_, font_size_);
TTF_SetTextFont(ttf_text_, font);
updateSize();
}
|
O3
|
cpp
|
TextLabel::setFont(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movq %rdi, %rbx
leaq 0x78(%rdi), %r15
movq %r15, %rdi
callq 0x5210
movl %r14d, 0x98(%rbx)
movq 0x10(%rbx), %rax
movq (%rax), %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x70c2
movq %rax, %r14
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
jne 0xc979
movq 0x10(%rbx), %r12
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x38d7(%rip), %rdx # 0x10206
leaq -0x48(%rbp), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x6b6c
movl 0x98(%rbx), %ecx
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x6252
movq %rax, %rdi
movq %rax, 0x70(%rbx)
movq -0x48(%rbp), %rax
leaq -0x38(%rbp), %rcx
cmpq %rcx, %rax
je 0xc979
movq -0x38(%rbp), %rsi
incq %rsi
movq %rax, %rdi
callq 0x53d0
movq 0x70(%rbx), %rdi
movq %r14, %rsi
callq 0x5150
movq %rbx, %rdi
callq 0xc9e6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xc9b4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x53d0
movq %rbx, %rdi
callq 0x5600
|
_ZN9TextLabel7setFontERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14d, edx
mov rbx, rdi
lea r15, [rdi+78h]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov [rbx+98h], r14d
mov rax, [rbx+10h]
mov rdi, [rax]
mov rsi, r15
mov edx, r14d
call _ZN10AssetStore7getFontERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; AssetStore::getFont(std::string const&,int)
mov r14, rax
mov rdi, [rbx+70h]
test rdi, rdi
jnz short loc_C979
mov r12, [rbx+10h]
lea rax, [rbp+var_38]
mov [rax-10h], rax
lea rdx, unk_10206
lea r13, [rbp+var_48]
mov rdi, r13
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov ecx, [rbx+98h]
mov rdi, r12
mov rsi, r13
mov rdx, r15
call _ZN4Game14createTTF_TextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_i; Game::createTTF_Text(std::string const&,std::string const&,int)
mov rdi, rax
mov [rbx+70h], rax
mov rax, [rbp+var_48]
lea rcx, [rbp+var_38]
cmp rax, rcx
jz short loc_C979
mov rsi, [rbp+var_38]
inc rsi; unsigned __int64
mov rdi, rax; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rbx+70h]
loc_C979:
mov rsi, r14
call _TTF_SetTextFont
mov rdi, rbx; this
call _ZN9TextLabel10updateSizeEv; TextLabel::updateSize(void)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rbp+var_48]; void *
lea rax, [rbp+var_38]
cmp rdi, rax
jz short loc_C9B4
mov rsi, [rbp+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C9B4:
mov rdi, rbx
call __Unwind_Resume
|
long long TextLabel::setFont(TextLabel *this, long long a2, int a3)
{
char *v5; // r15
long long Font; // r14
long long TTF_Text; // rdi
_QWORD *v8; // r12
void *v10[2]; // [rsp+8h] [rbp-48h] BYREF
_QWORD v11[7]; // [rsp+18h] [rbp-38h] BYREF
v5 = (char *)this + 120;
std::string::_M_assign((char *)this + 120);
*((_DWORD *)this + 38) = a3;
Font = AssetStore::getFont(**((_QWORD **)this + 2), (const char **)this + 15, a3);
TTF_Text = *((_QWORD *)this + 14);
if ( !TTF_Text )
{
v8 = (_QWORD *)*((_QWORD *)this + 2);
v10[0] = v11;
std::string::_M_construct<char const*>((long long)v10, &unk_10206, (long long)&unk_10206);
TTF_Text = Game::createTTF_Text(v8, v10, (long long)v5, *((_DWORD *)this + 38));
*((_QWORD *)this + 14) = TTF_Text;
if ( v10[0] != v11 )
{
operator delete(v10[0], v11[0] + 1LL);
TTF_Text = *((_QWORD *)this + 14);
}
}
TTF_SetTextFont(TTF_Text, Font);
return TextLabel::updateSize(this);
}
|
setFont:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14D,EDX
MOV RBX,RDI
LEA R15,[RDI + 0x78]
MOV RDI,R15
CALL 0x00105210
MOV dword ptr [RBX + 0x98],R14D
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,R15
MOV EDX,R14D
CALL 0x001070c2
MOV R14,RAX
MOV RDI,qword ptr [RBX + 0x70]
TEST RDI,RDI
JNZ 0x0010c979
MOV R12,qword ptr [RBX + 0x10]
LEA RAX,[RBP + -0x38]
MOV qword ptr [RAX + -0x10],RAX
LEA RDX,[0x110206]
LEA R13,[RBP + -0x48]
MOV RDI,R13
MOV RSI,RDX
CALL 0x00106b6c
MOV ECX,dword ptr [RBX + 0x98]
LAB_0010c944:
MOV RDI,R12
MOV RSI,R13
MOV RDX,R15
CALL 0x00106252
LAB_0010c952:
MOV RDI,RAX
MOV qword ptr [RBX + 0x70],RAX
MOV RAX,qword ptr [RBP + -0x48]
LEA RCX,[RBP + -0x38]
CMP RAX,RCX
JZ 0x0010c979
MOV RSI,qword ptr [RBP + -0x38]
INC RSI
MOV RDI,RAX
CALL 0x001053d0
MOV RDI,qword ptr [RBX + 0x70]
LAB_0010c979:
MOV RSI,R14
CALL 0x00105150
MOV RDI,RBX
CALL 0x0010c9e6
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* TextLabel::setFont(std::__cxx11::string const&, int) */
void __thiscall TextLabel::setFont(TextLabel *this,string *param_1,int param_2)
{
string *psVar1;
Game *this_00;
int8 uVar2;
long lVar3;
long *local_50 [2];
long local_40 [2];
psVar1 = (string *)(this + 0x78);
std::__cxx11::string::_M_assign(psVar1);
*(int *)(this + 0x98) = param_2;
uVar2 = AssetStore::getFont((AssetStore *)**(int8 **)(this + 0x10),psVar1,param_2);
lVar3 = *(long *)(this + 0x70);
if (lVar3 == 0) {
this_00 = *(Game **)(this + 0x10);
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char_const*>((string *)local_50,&DAT_00110206);
/* try { // try from 0010c944 to 0010c951 has its CatchHandler @ 0010c998 */
lVar3 = Game::createTTF_Text(this_00,(string *)local_50,psVar1,*(int *)(this + 0x98));
*(long *)(this + 0x70) = lVar3;
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
lVar3 = *(long *)(this + 0x70);
}
}
TTF_SetTextFont(lVar3,uVar2);
updateSize(this);
return;
}
|
|
65,170 |
test_bug2248
|
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
|
static int test_bug2248(MYSQL *mysql)
{
MYSQL_STMT *stmt;
int rc;
const char *query1= "SELECT DATABASE()";
const char *query2= "INSERT INTO test_bug2248 VALUES (10)";
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bug2248");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "CREATE TABLE test_bug2248 (id int)");
check_mysql_rc(rc, mysql);
stmt= mysql_stmt_init(mysql);
FAIL_IF(!stmt, mysql_error(mysql));
rc= mysql_stmt_prepare(stmt, SL(query1));
check_stmt_rc(rc, stmt);
/* This should not hang */
rc= mysql_stmt_fetch(stmt);
FAIL_IF(!rc, "Error expected");
/* And this too */
rc= mysql_stmt_store_result(stmt);
FAIL_IF(!rc, "Error expected");
mysql_stmt_close(stmt);
stmt= mysql_stmt_init(mysql);
FAIL_IF(!stmt, mysql_error(mysql));
rc= mysql_stmt_prepare(stmt, SL(query2));
check_stmt_rc(rc, stmt);
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
/* This too should not hang but should return proper error */
rc= mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc == 1, "rc != 1");
/* This too should not hang but should not bark */
rc= mysql_stmt_store_result(stmt);
check_stmt_rc(rc, stmt);
/* This should return proper error */
rc= mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc == 1, "rc != 1");
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE test_bug2248");
check_mysql_rc(rc, mysql);
return OK;
}
|
O0
|
c
|
test_bug2248:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x45a64(%rip), %rax # 0x685da
movq %rax, -0x28(%rbp)
leaq 0x45a6b(%rip), %rax # 0x685ec
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x45a81(%rip), %rsi # 0x68611
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22bea
movl -0x1c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
movl %eax, %ecx
leaq 0x42b0b(%rip), %rdi # 0x656d5
leaq 0x4349c(%rip), %r8 # 0x6606d
movl $0x4db, %r9d # imm = 0x4DB
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22bec
movq -0x10(%rbp), %rdi
leaq 0x45a3c(%rip), %rsi # 0x68633
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22c51
movl -0x1c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x4c(%rbp), %esi
movq -0x48(%rbp), %rdx
movl %eax, %ecx
leaq 0x42aa4(%rip), %rdi # 0x656d5
leaq 0x43435(%rip), %r8 # 0x6606d
movl $0x4de, %r9d # imm = 0x4DE
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22c53
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x22c99
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, %rsi
leaq 0x42916(%rip), %rdi # 0x65590
leaq 0x433ec(%rip), %rdx # 0x6606d
movl $0x4e1, %ecx # imm = 0x4E1
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22c9b
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x141a0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22cff
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x428b0(%rip), %rdi # 0x65590
leaq 0x43386(%rip), %rdx # 0x6606d
movl $0x4e3, %ecx # imm = 0x4E3
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22d01
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x22d40
leaq 0x42876(%rip), %rdi # 0x65590
leaq 0x44a68(%rip), %rsi # 0x67789
leaq 0x43345(%rip), %rdx # 0x6606d
movl $0x4e7, %ecx # imm = 0x4E7
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22d42
movq -0x18(%rbp), %rdi
callq 0x454d0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x22d81
leaq 0x42835(%rip), %rdi # 0x65590
leaq 0x44a27(%rip), %rsi # 0x67789
leaq 0x43304(%rip), %rdx # 0x6606d
movl $0x4eb, %ecx # imm = 0x4EB
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22d83
movq -0x18(%rbp), %rdi
callq 0x43eb0
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x22dd2
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, %rsi
leaq 0x427dd(%rip), %rdi # 0x65590
leaq 0x432b3(%rip), %rdx # 0x6606d
movl $0x4f0, %ecx # imm = 0x4F0
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22dd4
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rdi
callq 0x141a0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22e38
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x42777(%rip), %rdi # 0x65590
leaq 0x4324d(%rip), %rdx # 0x6606d
movl $0x4f2, %ecx # imm = 0x4F2
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22e3a
movq -0x18(%rbp), %rdi
callq 0x46580
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22e7e
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x42731(%rip), %rdi # 0x65590
leaq 0x43207(%rip), %rdx # 0x6606d
movl $0x4f5, %ecx # imm = 0x4F5
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22e80
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
je 0x22ebf
leaq 0x426f7(%rip), %rdi # 0x65590
leaq 0x457b6(%rip), %rsi # 0x68656
leaq 0x431c6(%rip), %rdx # 0x6606d
movl $0x4f8, %ecx # imm = 0x4F8
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22ec1
movq -0x18(%rbp), %rdi
callq 0x454d0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22f05
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x426aa(%rip), %rdi # 0x65590
leaq 0x43180(%rip), %rdx # 0x6606d
movl $0x4fc, %ecx # imm = 0x4FC
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22f07
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
je 0x22f43
leaq 0x42670(%rip), %rdi # 0x65590
leaq 0x4572f(%rip), %rsi # 0x68656
leaq 0x4313f(%rip), %rdx # 0x6606d
movl $0x4ff, %ecx # imm = 0x4FF
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22f45
movq -0x18(%rbp), %rdi
callq 0x43eb0
movq -0x10(%rbp), %rdi
leaq 0x45705(%rip), %rsi # 0x6865e
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22fb0
movl -0x1c(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x7c(%rbp), %esi
movq -0x78(%rbp), %rdx
movl %eax, %ecx
leaq 0x42742(%rip), %rdi # 0x656d5
leaq 0x430d3(%rip), %r8 # 0x6606d
movl $0x504, %r9d # imm = 0x504
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22fb2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
test_bug2248:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
lea rax, aSelectDatabase; "SELECT DATABASE()"
mov [rbp+var_28], rax
lea rax, aInsertIntoTest_7; "INSERT INTO test_bug2248 VALUES (10)"
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
lea rsi, aDropTableIfExi_13; "DROP TABLE IF EXISTS test_bug2248"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22BEA
mov eax, [rbp+var_1C]
mov [rbp+var_3C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_3C]
mov rdx, [rbp+var_38]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 4DBh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22BEA:
jmp short $+2
loc_22BEC:
mov rdi, [rbp+var_10]
lea rsi, aCreateTableTes_6; "CREATE TABLE test_bug2248 (id int)"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22C51
mov eax, [rbp+var_1C]
mov [rbp+var_4C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_48], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_4C]
mov rdx, [rbp+var_48]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 4DEh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22C51:
jmp short $+2
loc_22C53:
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_22C99
mov rdi, [rbp+var_10]
call mysql_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4E1h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22C99:
jmp short $+2
loc_22C9B:
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_28]
mov [rbp+var_58], rax
mov rdi, [rbp+var_28]
call _strlen
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_58]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22CFF
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4E3h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22CFF:
jmp short $+2
loc_22D01:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jnz short loc_22D40
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNoErrorExpecte+3; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4E7h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22D40:
jmp short $+2
loc_22D42:
mov rdi, [rbp+var_18]
call mysql_stmt_store_result
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jnz short loc_22D81
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNoErrorExpecte+3; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4EBh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22D81:
jmp short $+2
loc_22D83:
mov rdi, [rbp+var_18]
call mysql_stmt_close
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_22DD2
mov rdi, [rbp+var_10]
call mysql_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4F0h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22DD2:
jmp short $+2
loc_22DD4:
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
mov rax, [rbp+var_30]
mov [rbp+var_68], rax
mov rdi, [rbp+var_30]
call _strlen
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_68]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22E38
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4F2h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22E38:
jmp short $+2
loc_22E3A:
mov rdi, [rbp+var_18]
call mysql_stmt_execute
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22E7E
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4F5h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22E7E:
jmp short $+2
loc_22E80:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 1
jz short loc_22EBF
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRc1; "rc != 1"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4F8h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22EBF:
jmp short $+2
loc_22EC1:
mov rdi, [rbp+var_18]
call mysql_stmt_store_result
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22F05
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4FCh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22F05:
jmp short $+2
loc_22F07:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 1
jz short loc_22F43
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRc1; "rc != 1"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4FFh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_22FB9
loc_22F43:
jmp short $+2
loc_22F45:
mov rdi, [rbp+var_18]
call mysql_stmt_close
mov rdi, [rbp+var_10]
lea rsi, aDropTableTestB_0; "DROP TABLE test_bug2248"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22FB0
mov eax, [rbp+var_1C]
mov [rbp+var_7C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_78], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_7C]
mov rdx, [rbp+var_78]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 504h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_22FB9
loc_22FB0:
jmp short $+2
loc_22FB2:
mov [rbp+var_4], 0
loc_22FB9:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long test_bug2248(long long a1)
{
int v1; // eax
int v2; // eax
int v3; // eax
int v4; // r8d
int v5; // r9d
long long v6; // rax
int v7; // eax
int v8; // r8d
int v9; // r9d
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
int v14; // eax
int v15; // r8d
int v16; // r9d
long long v17; // rax
int v18; // eax
int v19; // r8d
int v20; // r9d
int v21; // eax
int v22; // r8d
int v23; // r9d
int v24; // r8d
int v25; // r9d
int v26; // eax
int v27; // r8d
int v28; // r9d
int v29; // r8d
int v30; // r9d
int v31; // eax
int v33; // [rsp+8h] [rbp-78h]
int v34; // [rsp+38h] [rbp-48h]
int v35; // [rsp+48h] [rbp-38h]
int v36; // [rsp+64h] [rbp-1Ch]
int v37; // [rsp+64h] [rbp-1Ch]
int v38; // [rsp+64h] [rbp-1Ch]
long long v39; // [rsp+68h] [rbp-18h]
long long v40; // [rsp+68h] [rbp-18h]
v36 = mysql_query(a1, "DROP TABLE IF EXISTS test_bug2248");
if ( v36 )
{
v35 = mysql_error(a1);
v1 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v36,
v35,
v1,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1243);
return 1;
}
else
{
v37 = mysql_query(a1, "CREATE TABLE test_bug2248 (id int)");
if ( v37 )
{
v34 = mysql_error(a1);
v2 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v37,
v34,
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1246);
return 1;
}
else
{
v39 = mysql_stmt_init(a1);
if ( v39 )
{
v6 = strlen("SELECT DATABASE()");
if ( (unsigned int)mysql_stmt_prepare(v39, "SELECT DATABASE()", v6) )
{
v7 = mysql_stmt_error(v39);
diag(
(unsigned int)"Error: %s (%s: %d)",
v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1251,
v8,
v9);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v39) )
{
if ( (unsigned int)mysql_stmt_store_result(v39) )
{
mysql_stmt_close(v39);
v40 = mysql_stmt_init(a1);
if ( v40 )
{
v17 = strlen("INSERT INTO test_bug2248 VALUES (10)");
if ( (unsigned int)mysql_stmt_prepare(v40, "INSERT INTO test_bug2248 VALUES (10)", v17) )
{
v18 = mysql_stmt_error(v40);
diag(
(unsigned int)"Error: %s (%s: %d)",
v18,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1266,
v19,
v20);
return 1;
}
else if ( (unsigned int)mysql_stmt_execute(v40) )
{
v21 = mysql_stmt_error(v40);
diag(
(unsigned int)"Error: %s (%s: %d)",
v21,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1269,
v22,
v23);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v40) == 1 )
{
if ( (unsigned int)mysql_stmt_store_result(v40) )
{
v26 = mysql_stmt_error(v40);
diag(
(unsigned int)"Error: %s (%s: %d)",
v26,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1276,
v27,
v28);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v40) == 1 )
{
mysql_stmt_close(v40);
v38 = mysql_query(a1, "DROP TABLE test_bug2248");
if ( v38 )
{
v33 = mysql_error(a1);
v31 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v38,
v33,
v31,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1284);
return 1;
}
else
{
return 0;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"rc != 1",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1279,
v29,
v30);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"rc != 1",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1272,
v24,
v25);
return 1;
}
}
else
{
v14 = mysql_error(a1);
diag(
(unsigned int)"Error: %s (%s: %d)",
v14,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1264,
v15,
v16);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1259,
v12,
v13);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1255,
v10,
v11);
return 1;
}
}
else
{
v3 = mysql_error(a1);
diag(
(unsigned int)"Error: %s (%s: %d)",
v3,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1249,
v4,
v5);
return 1;
}
}
}
}
|
test_bug2248:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x1685da]
MOV qword ptr [RBP + -0x28],RAX
LEA RAX,[0x1685ec]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x168611]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122bea
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x3c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x3c]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x4db
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122bea:
JMP 0x00122bec
LAB_00122bec:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x168633]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122c51
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x4c]
MOV RDX,qword ptr [RBP + -0x48]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x4de
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122c51:
JMP 0x00122c53
LAB_00122c53:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00122c99
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4e1
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122c99:
JMP 0x00122c9b
LAB_00122c9b:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122cff
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4e3
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122cff:
JMP 0x00122d01
LAB_00122d01:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x00122d40
LEA RDI,[0x165590]
LEA RSI,[0x167789]
LEA RDX,[0x16606d]
MOV ECX,0x4e7
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122d40:
JMP 0x00122d42
LAB_00122d42:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001454d0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x00122d81
LEA RDI,[0x165590]
LEA RSI,[0x167789]
LEA RDX,[0x16606d]
MOV ECX,0x4eb
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122d81:
JMP 0x00122d83
LAB_00122d83:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00122dd2
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4f0
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122dd2:
JMP 0x00122dd4
LAB_00122dd4:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122e38
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4f2
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122e38:
JMP 0x00122e3a
LAB_00122e3a:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00146580
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122e7e
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4f5
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122e7e:
JMP 0x00122e80
LAB_00122e80:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x1
JZ 0x00122ebf
LEA RDI,[0x165590]
LEA RSI,[0x168656]
LEA RDX,[0x16606d]
MOV ECX,0x4f8
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122ebf:
JMP 0x00122ec1
LAB_00122ec1:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001454d0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122f05
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4fc
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122f05:
JMP 0x00122f07
LAB_00122f07:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x1
JZ 0x00122f43
LEA RDI,[0x165590]
LEA RSI,[0x168656]
LEA RDX,[0x16606d]
MOV ECX,0x4ff
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122f43:
JMP 0x00122f45
LAB_00122f45:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16865e]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122fb0
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x7c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x7c]
MOV RDX,qword ptr [RBP + -0x78]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x504
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122fb0:
JMP 0x00122fb2
LAB_00122fb2:
MOV dword ptr [RBP + -0x4],0x0
LAB_00122fb9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4 test_bug2248(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
size_t sVar5;
int4 local_c;
iVar1 = mysql_query(param_1,"DROP TABLE IF EXISTS test_bug2248");
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,"CREATE TABLE test_bug2248 (id int)");
if (iVar1 == 0) {
lVar4 = mysql_stmt_init(param_1);
if (lVar4 == 0) {
uVar3 = mysql_error(param_1);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x4e1);
local_c = 1;
}
else {
sVar5 = strlen("SELECT DATABASE()");
iVar1 = mysql_stmt_prepare(lVar4,"SELECT DATABASE()",sVar5);
if (iVar1 == 0) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 0) {
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4e7);
local_c = 1;
}
else {
iVar1 = mysql_stmt_store_result(lVar4);
if (iVar1 == 0) {
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4eb);
local_c = 1;
}
else {
mysql_stmt_close(lVar4);
lVar4 = mysql_stmt_init(param_1);
if (lVar4 == 0) {
uVar3 = mysql_error(param_1);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4f0);
local_c = 1;
}
else {
sVar5 = strlen("INSERT INTO test_bug2248 VALUES (10)");
iVar1 = mysql_stmt_prepare(lVar4,"INSERT INTO test_bug2248 VALUES (10)",sVar5);
if (iVar1 == 0) {
iVar1 = mysql_stmt_execute(lVar4);
if (iVar1 == 0) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 1) {
iVar1 = mysql_stmt_store_result(lVar4);
if (iVar1 == 0) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 1) {
mysql_stmt_close(lVar4);
iVar1 = mysql_query(param_1,"DROP TABLE test_bug2248");
if (iVar1 == 0) {
local_c = 0;
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x504);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","rc != 1",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4ff);
local_c = 1;
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4fc);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","rc != 1",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4f8);
local_c = 1;
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4f5);
local_c = 1;
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4f2);
local_c = 1;
}
}
}
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x4e3);
local_c = 1;
}
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x4de
);
local_c = 1;
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x4db);
local_c = 1;
}
return local_c;
}
|
|
65,171 |
my_casedn_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static size_t my_casedn_utf8mb3(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->casedn_multiply == 1);
while ((src < srcend) &&
(srcres= my_utf8mb3_uni(cs, &wc, (uchar*) src, (uchar*)srcend)) > 0)
{
my_tolower_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
}
|
O3
|
c
|
my_casedn_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xd297a
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq -0x30(%rbp), %r13
addq %r13, %r14
movq 0x78(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0xd250f
testl %eax, %eax
jle 0xd297a
movl %eax, %ebx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movzbl %ah, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xd2959
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
movq %rax, -0x38(%rbp)
movq %rax, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0xd25d4
testl %eax, %eax
jle 0xd297a
movl %ebx, %ecx
addq %rcx, %r12
movl %eax, %eax
addq %rax, %r13
cmpq %r15, %r12
jb 0xd291d
subq -0x30(%rbp), %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_casedn_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle short loc_D297A
mov r14, r8
mov r15, rdx
mov r12, rsi
add r15, rsi
mov r13, [rbp+var_30]
add r14, r13
mov rax, [rdi+78h]
mov [rbp+var_40], rax
loc_D291D:
lea rsi, [rbp+var_38]
mov rdx, r12
mov rcx, r15
call my_utf8mb3_uni
test eax, eax
jle short loc_D297A
mov ebx, eax
mov rax, [rbp+var_40]
mov rcx, [rax+8]
mov rax, [rbp+var_38]
movzx edx, ah
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_D2959
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
mov [rbp+var_38], rax
loc_D2959:
mov rsi, rax
mov rdx, r13
mov rcx, r14
call my_uni_utf8mb3
test eax, eax
jle short loc_D297A
mov ecx, ebx
add r12, rcx
mov eax, eax
add r13, rax
cmp r12, r15
jb short loc_D291D
loc_D297A:
sub r13, [rbp+var_30]
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_BYTE * my_casedn_utf8mb3(long long a1, unsigned __int8 *a2, long long a3, _BYTE *a4, long long a5)
{
_BYTE *v5; // r13
unsigned __int8 *v6; // r12
unsigned long long v7; // r15
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rax
long long v12; // rcx
int v13; // eax
long long v15; // [rsp+0h] [rbp-40h]
unsigned long long v16; // [rsp+8h] [rbp-38h] BYREF
_BYTE *v17; // [rsp+10h] [rbp-30h]
v5 = a4;
v17 = a4;
if ( a3 > 0 )
{
v6 = a2;
v7 = (unsigned long long)&a2[a3];
v5 = v17;
v8 = (unsigned long long)&v17[a5];
v15 = *(_QWORD *)(a1 + 120);
do
{
v9 = my_utf8mb3_uni(a1, &v16, v6, v7);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v16;
v12 = *(_QWORD *)(*(_QWORD *)(v15 + 8) + 8LL * BYTE1(v16));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v16 + 4);
v16 = v11;
}
v13 = my_uni_utf8mb3(a1, v11, v5, v8);
if ( v13 <= 0 )
break;
v6 += v10;
v5 += (unsigned int)v13;
}
while ( (unsigned long long)v6 < v7 );
}
return (_BYTE *)(v5 - v17);
}
|
my_casedn_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x001d297a
MOV R14,R8
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV R13,qword ptr [RBP + -0x30]
ADD R14,R13
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x40],RAX
LAB_001d291d:
LEA RSI,[RBP + -0x38]
MOV RDX,R12
MOV RCX,R15
CALL 0x001d250f
TEST EAX,EAX
JLE 0x001d297a
MOV EBX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EDX,AH
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001d2959
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x38],RAX
LAB_001d2959:
MOV RSI,RAX
MOV RDX,R13
MOV RCX,R14
CALL 0x001d25d4
TEST EAX,EAX
JLE 0x001d297a
MOV ECX,EBX
ADD R12,RCX
MOV EAX,EAX
ADD R13,RAX
CMP R12,R15
JC 0x001d291d
LAB_001d297a:
SUB R13,qword ptr [RBP + -0x30]
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_utf8mb3(long param_1,ulong param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
uint uVar3;
uint uVar4;
long lVar5;
ulong uVar6;
int8 local_40;
lVar5 = param_4;
if (0 < param_3) {
uVar6 = param_3 + param_2;
lVar1 = *(long *)(param_1 + 0x78);
do {
uVar3 = my_utf8mb3_uni();
if ((int)uVar3 < 1) break;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8);
if (lVar2 != 0) {
local_40 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
uVar4 = my_uni_utf8mb3();
if ((int)uVar4 < 1) break;
param_2 = param_2 + uVar3;
lVar5 = lVar5 + (ulong)uVar4;
} while (param_2 < uVar6);
}
return lVar5 - param_4;
}
|
|
65,172 |
js_mark_module_def
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_mark_module_def(JSRuntime *rt, JSModuleDef *m,
JS_MarkFunc *mark_func)
{
int i;
for(i = 0; i < m->export_entries_count; i++) {
JSExportEntry *me = &m->export_entries[i];
if (me->export_type == JS_EXPORT_TYPE_LOCAL &&
me->u.local.var_ref) {
mark_func(rt, &me->u.local.var_ref->header);
}
}
JS_MarkValue(rt, m->module_ns, mark_func);
JS_MarkValue(rt, m->func_obj, mark_func);
JS_MarkValue(rt, m->eval_exception, mark_func);
JS_MarkValue(rt, m->meta_obj, mark_func);
JS_MarkValue(rt, m->promise, mark_func);
JS_MarkValue(rt, m->resolving_funcs[0], mark_func);
JS_MarkValue(rt, m->resolving_funcs[1], mark_func);
}
|
O0
|
c
|
js_mark_module_def:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x65e2a
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x65e1b
movq (%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x65e1b
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rdi
movq (%rsp), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
jmp 0x65e1d
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x65dcb
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
callq 0x30ed0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x68(%rax), %rsi
movq 0x70(%rax), %rdx
callq 0x30ed0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0xf8(%rax), %rsi
movq 0x100(%rax), %rdx
callq 0x30ed0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x108(%rax), %rsi
movq 0x110(%rax), %rdx
callq 0x30ed0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0xc0(%rax), %rsi
movq 0xc8(%rax), %rdx
callq 0x30ed0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0xd0(%rax), %rsi
movq 0xd8(%rax), %rdx
callq 0x30ed0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0xe0(%rax), %rsi
movq 0xe8(%rax), %rdx
callq 0x30ed0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_mark_module_def:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
mov [rsp+28h+var_1C], 0
loc_65DCB:
mov eax, [rsp+28h+var_1C]
mov rcx, [rsp+28h+var_10]
cmp eax, [rcx+30h]
jge short loc_65E2A
mov rax, [rsp+28h+var_10]
mov rax, [rax+28h]
movsxd rcx, [rsp+28h+var_1C]
shl rcx, 5
add rax, rcx
mov [rsp+28h+var_28], rax
mov rax, [rsp+28h+var_28]
cmp dword ptr [rax+10h], 0
jnz short loc_65E1B
mov rax, [rsp+28h+var_28]
cmp qword ptr [rax+8], 0
jz short loc_65E1B
mov rax, [rsp+28h+var_18]
mov rdi, [rsp+28h+var_8]
mov rcx, [rsp+28h+var_28]
mov rsi, [rcx+8]
call rax
loc_65E1B:
jmp short $+2
loc_65E1D:
mov eax, [rsp+28h+var_1C]
add eax, 1
mov [rsp+28h+var_1C], eax
jmp short loc_65DCB
loc_65E2A:
mov rdi, [rsp+28h+var_8]
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
mov rsi, [rax+58h]
mov rdx, [rax+60h]
call JS_MarkValue
mov rdi, [rsp+28h+var_8]
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
mov rsi, [rax+68h]
mov rdx, [rax+70h]
call JS_MarkValue
mov rdi, [rsp+28h+var_8]
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
mov rsi, [rax+0F8h]
mov rdx, [rax+100h]
call JS_MarkValue
mov rdi, [rsp+28h+var_8]
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
mov rsi, [rax+108h]
mov rdx, [rax+110h]
call JS_MarkValue
mov rdi, [rsp+28h+var_8]
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
mov rsi, [rax+0C0h]
mov rdx, [rax+0C8h]
call JS_MarkValue
mov rdi, [rsp+28h+var_8]
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
mov rsi, [rax+0D0h]
mov rdx, [rax+0D8h]
call JS_MarkValue
mov rdi, [rsp+28h+var_8]
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_18]
mov rsi, [rax+0E0h]
mov rdx, [rax+0E8h]
call JS_MarkValue
add rsp, 28h
retn
|
long long js_mark_module_def(long long a1, long long a2, long long ( *a3)(long long, long long))
{
long long v4; // [rsp+0h] [rbp-28h]
int i; // [rsp+Ch] [rbp-1Ch]
for ( i = 0; i < *(_DWORD *)(a2 + 48); ++i )
{
v4 = 32LL * i + *(_QWORD *)(a2 + 40);
if ( !*(_DWORD *)(v4 + 16) )
{
if ( *(_QWORD *)(v4 + 8) )
a3(a1, *(_QWORD *)(v4 + 8));
}
}
JS_MarkValue(a1, *(_QWORD *)(a2 + 88), *(_QWORD *)(a2 + 96), a3);
JS_MarkValue(a1, *(_QWORD *)(a2 + 104), *(_QWORD *)(a2 + 112), a3);
JS_MarkValue(a1, *(_QWORD *)(a2 + 248), *(_QWORD *)(a2 + 256), a3);
JS_MarkValue(a1, *(_QWORD *)(a2 + 264), *(_QWORD *)(a2 + 272), a3);
JS_MarkValue(a1, *(_QWORD *)(a2 + 192), *(_QWORD *)(a2 + 200), a3);
JS_MarkValue(a1, *(_QWORD *)(a2 + 208), *(_QWORD *)(a2 + 216), a3);
return JS_MarkValue(a1, *(_QWORD *)(a2 + 224), *(_QWORD *)(a2 + 232), a3);
}
|
js_mark_module_def:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV dword ptr [RSP + 0xc],0x0
LAB_00165dcb:
MOV EAX,dword ptr [RSP + 0xc]
MOV RCX,qword ptr [RSP + 0x18]
CMP EAX,dword ptr [RCX + 0x30]
JGE 0x00165e2a
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x28]
MOVSXD RCX,dword ptr [RSP + 0xc]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
CMP dword ptr [RAX + 0x10],0x0
JNZ 0x00165e1b
MOV RAX,qword ptr [RSP]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00165e1b
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP]
MOV RSI,qword ptr [RCX + 0x8]
CALL RAX
LAB_00165e1b:
JMP 0x00165e1d
LAB_00165e1d:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00165dcb
LAB_00165e2a:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x58]
MOV RDX,qword ptr [RAX + 0x60]
CALL 0x00130ed0
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x68]
MOV RDX,qword ptr [RAX + 0x70]
CALL 0x00130ed0
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0xf8]
MOV RDX,qword ptr [RAX + 0x100]
CALL 0x00130ed0
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0x108]
MOV RDX,qword ptr [RAX + 0x110]
CALL 0x00130ed0
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0xc0]
MOV RDX,qword ptr [RAX + 0xc8]
CALL 0x00130ed0
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0xd0]
MOV RDX,qword ptr [RAX + 0xd8]
CALL 0x00130ed0
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + 0xe0]
MOV RDX,qword ptr [RAX + 0xe8]
CALL 0x00130ed0
ADD RSP,0x28
RET
|
void js_mark_module_def(int8 param_1,long param_2,code *param_3)
{
long lVar1;
int4 local_1c;
for (local_1c = 0; local_1c < *(int *)(param_2 + 0x30); local_1c = local_1c + 1) {
lVar1 = *(long *)(param_2 + 0x28) + (long)local_1c * 0x20;
if ((*(int *)(lVar1 + 0x10) == 0) && (*(long *)(lVar1 + 8) != 0)) {
(*param_3)(param_1,*(int8 *)(lVar1 + 8));
}
}
JS_MarkValue(param_1,*(int8 *)(param_2 + 0x58),*(int8 *)(param_2 + 0x60),param_3);
JS_MarkValue(param_1,*(int8 *)(param_2 + 0x68),*(int8 *)(param_2 + 0x70),param_3);
JS_MarkValue(param_1,*(int8 *)(param_2 + 0xf8),*(int8 *)(param_2 + 0x100),param_3);
JS_MarkValue(param_1,*(int8 *)(param_2 + 0x108),*(int8 *)(param_2 + 0x110),param_3);
JS_MarkValue(param_1,*(int8 *)(param_2 + 0xc0),*(int8 *)(param_2 + 200),param_3);
JS_MarkValue(param_1,*(int8 *)(param_2 + 0xd0),*(int8 *)(param_2 + 0xd8),param_3);
JS_MarkValue(param_1,*(int8 *)(param_2 + 0xe0),*(int8 *)(param_2 + 0xe8),param_3);
return;
}
|
|
65,173 |
codegen_generate_identifier
|
tsotchke[P]eshkol/src/backend/codegen/identifiers.c
|
bool codegen_generate_identifier(CodegenContext* context, const AstNode* node) {
assert(context != NULL);
assert(node != NULL);
assert(node->type == AST_IDENTIFIER);
// Get output file
FILE* output = codegen_context_get_output(context);
// Replace hyphens with underscores in identifiers
char* identifier_name = strdup(node->as.identifier.name);
if (identifier_name) {
for (char* p = identifier_name; *p; p++) {
if (*p == '-') {
*p = '_';
}
}
fprintf(output, "%s", identifier_name);
free(identifier_name);
} else {
// Fallback if memory allocation fails
fprintf(output, "%s", node->as.identifier.name);
}
return true;
}
|
O0
|
c
|
codegen_generate_identifier:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x197b9
jmp 0x197d8
leaq 0xd5db(%rip), %rdi # 0x26d9b
leaq 0x140f2(%rip), %rsi # 0x2d8b9
movl $0x10, %edx
leaq 0x14142(%rip), %rcx # 0x2d915
callq 0x2160
cmpq $0x0, -0x10(%rbp)
je 0x197e1
jmp 0x19800
leaq 0xf262(%rip), %rdi # 0x28a4a
leaq 0x140ca(%rip), %rsi # 0x2d8b9
movl $0x11, %edx
leaq 0x1411a(%rip), %rcx # 0x2d915
callq 0x2160
movq -0x10(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x1980b
jmp 0x1982a
leaq 0xfa98(%rip), %rdi # 0x292aa
leaq 0x140a0(%rip), %rsi # 0x2d8b9
movl $0x12, %edx
leaq 0x140f0(%rip), %rcx # 0x2d915
callq 0x2160
movq -0x8(%rbp), %rdi
callq 0x11730
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x2280
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x198a4
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
je 0x19883
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x19873
movq -0x28(%rbp), %rax
movb $0x5f, (%rax)
jmp 0x19875
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x19857
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x108ed(%rip), %rsi # 0x2a17f
movb $0x0, %al
callq 0x21d0
movq -0x20(%rbp), %rdi
callq 0x2030
jmp 0x198be
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdx
leaq 0x108c8(%rip), %rsi # 0x2a17f
movb $0x0, %al
callq 0x21d0
movb $0x1, %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
codegen_generate_identifier:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
cmp [rbp+var_8], 0
jz short loc_197B9
jmp short loc_197D8
loc_197B9:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github/2025_star3"...
mov edx, 10h
lea rcx, aBoolCodegenGen_13; "_Bool codegen_generate_identifier(Codeg"...
call ___assert_fail
loc_197D8:
cmp [rbp+var_10], 0
jz short loc_197E1
jmp short loc_19800
loc_197E1:
lea rdi, aNodeNull; "node != NULL"
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github/2025_star3"...
mov edx, 11h
lea rcx, aBoolCodegenGen_13; "_Bool codegen_generate_identifier(Codeg"...
call ___assert_fail
loc_19800:
mov rax, [rbp+var_10]
cmp dword ptr [rax], 6
jnz short loc_1980B
jmp short loc_1982A
loc_1980B:
lea rdi, aNodeTypeAstIde; "node->type == AST_IDENTIFIER"
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github/2025_star3"...
mov edx, 12h
lea rcx, aBoolCodegenGen_13; "_Bool codegen_generate_identifier(Codeg"...
call ___assert_fail
loc_1982A:
mov rdi, [rbp+var_8]
call codegen_context_get_output
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rdi, [rax+48h]
call _strdup
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_198A4
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_19857:
mov rax, [rbp+var_28]
cmp byte ptr [rax], 0
jz short loc_19883
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_19873
mov rax, [rbp+var_28]
mov byte ptr [rax], 5Fh ; '_'
loc_19873:
jmp short $+2
loc_19875:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_19857
loc_19883:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rsi, aOpeningOutputF+15h; "%s"
mov al, 0
call _fprintf
mov rdi, [rbp+var_20]
call _free
jmp short loc_198BE
loc_198A4:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rdx, [rax+48h]
lea rsi, aOpeningOutputF+15h; "%s"
mov al, 0
call _fprintf
loc_198BE:
mov al, 1
and al, 1
add rsp, 30h
pop rbp
retn
|
char codegen_generate_identifier(long long a1, long long a2)
{
char *i; // [rsp+8h] [rbp-28h]
const char *v4; // [rsp+10h] [rbp-20h]
long long output; // [rsp+18h] [rbp-18h]
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/identifiers.c",
16LL,
"_Bool codegen_generate_identifier(CodegenContext *, const AstNode *)");
if ( !a2 )
__assert_fail(
"node != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/identifiers.c",
17LL,
"_Bool codegen_generate_identifier(CodegenContext *, const AstNode *)");
if ( *(_DWORD *)a2 != 6 )
__assert_fail(
"node->type == AST_IDENTIFIER",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/identifiers.c",
18LL,
"_Bool codegen_generate_identifier(CodegenContext *, const AstNode *)");
output = codegen_context_get_output(a1);
v4 = (const char *)strdup(*(_QWORD *)(a2 + 72));
if ( v4 )
{
for ( i = (char *)v4; *i; ++i )
{
if ( *i == 45 )
*i = 95;
}
fprintf(output, "%s", v4);
free(v4);
}
else
{
fprintf(output, "%s", *(const char **)(a2 + 72));
}
return 1;
}
|
codegen_generate_identifier:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001197b9
JMP 0x001197d8
LAB_001197b9:
LEA RDI,[0x126d9b]
LEA RSI,[0x12d8b9]
MOV EDX,0x10
LEA RCX,[0x12d915]
CALL 0x00102160
LAB_001197d8:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001197e1
JMP 0x00119800
LAB_001197e1:
LEA RDI,[0x128a4a]
LEA RSI,[0x12d8b9]
MOV EDX,0x11
LEA RCX,[0x12d915]
CALL 0x00102160
LAB_00119800:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX],0x6
JNZ 0x0011980b
JMP 0x0011982a
LAB_0011980b:
LEA RDI,[0x1292aa]
LEA RSI,[0x12d8b9]
MOV EDX,0x12
LEA RCX,[0x12d915]
CALL 0x00102160
LAB_0011982a:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00111730
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x00102280
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001198a4
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_00119857:
MOV RAX,qword ptr [RBP + -0x28]
CMP byte ptr [RAX],0x0
JZ 0x00119883
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x00119873
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x5f
LAB_00119873:
JMP 0x00119875
LAB_00119875:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00119857
LAB_00119883:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[0x12a17f]
MOV AL,0x0
CALL 0x001021d0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00102030
JMP 0x001198be
LAB_001198a4:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x48]
LEA RSI,[0x12a17f]
MOV AL,0x0
CALL 0x001021d0
LAB_001198be:
MOV AL,0x1
AND AL,0x1
ADD RSP,0x30
POP RBP
RET
|
int8 codegen_generate_identifier(long param_1,int *param_2)
{
FILE *__stream;
char *__ptr;
char *local_30;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/identifiers.c"
,0x10,"_Bool codegen_generate_identifier(CodegenContext *, const AstNode *)");
}
if (param_2 == (int *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("node != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/identifiers.c"
,0x11,"_Bool codegen_generate_identifier(CodegenContext *, const AstNode *)");
}
if (*param_2 != 6) {
/* WARNING: Subroutine does not return */
__assert_fail("node->type == AST_IDENTIFIER",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/identifiers.c"
,0x12,"_Bool codegen_generate_identifier(CodegenContext *, const AstNode *)");
}
__stream = (FILE *)codegen_context_get_output(param_1);
__ptr = strdup(*(char **)(param_2 + 0x12));
local_30 = __ptr;
if (__ptr == (char *)0x0) {
fprintf(__stream,"%s",*(int8 *)(param_2 + 0x12));
}
else {
for (; *local_30 != '\0'; local_30 = local_30 + 1) {
if (*local_30 == '-') {
*local_30 = '_';
}
}
fprintf(__stream,"%s",__ptr);
free(__ptr);
}
return 1;
}
|
|
65,174 |
trnman_free_trn
|
eloqsql/storage/maria/trnman.c
|
static void trnman_free_trn(TRN *trn)
{
/*
union is to solve strict aliasing issue.
without it gcc 3.4.3 doesn't notice that updating *(void **)&tmp
modifies the value of tmp.
*/
union { TRN *trn; void *v; } tmp;
DBUG_ASSERT(trn != &dummy_transaction_object);
mysql_mutex_lock(&trn->state_lock);
trn->short_id= 0;
mysql_mutex_unlock(&trn->state_lock);
tmp.trn= pool;
do
{
/*
without this volatile cast gcc-3.4.4 moves the assignment
down after the loop at -O2
*/
*(TRN * volatile *)&(trn->next)= tmp.trn;
} while (!my_atomic_casptr((void **)(char*)&pool, &tmp.v, trn));
}
|
O3
|
c
|
trnman_free_trn:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
cmpq $0x0, 0x50(%rdi)
jne 0x4697e
movq %r14, %rdi
callq 0x29220
movw $0x0, 0xac(%rbx)
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
jne 0x46994
movq %r14, %rdi
callq 0x291e0
movq 0x3b6ace(%rip), %rax # 0x3fd438
movq %rax, 0x68(%rbx)
lock
cmpxchgq %rbx, 0x3b6ac1(%rip) # 0x3fd438
jne 0x4696a
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x92d21(%rip), %rsi # 0xd96a6
movq %r14, %rdi
movl $0x22d, %edx # imm = 0x22D
callq 0x2eb8f
jmp 0x46949
leaq 0x33f675(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x4695b
|
trnman_free_trn:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
lea r14, [rdi+10h]
cmp qword ptr [rdi+50h], 0
jnz short loc_4697E
mov rdi, r14
call _pthread_mutex_lock
loc_46949:
mov word ptr [rbx+0ACh], 0
mov rdi, [rbx+50h]
test rdi, rdi
jnz short loc_46994
loc_4695B:
mov rdi, r14
call _pthread_mutex_unlock
mov rax, cs:pool
loc_4696A:
mov [rbx+68h], rax
lock cmpxchg cs:pool, rbx
jnz short loc_4696A
pop rbx
pop r14
pop rbp
retn
loc_4697E:
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r14
mov edx, 22Dh
call psi_mutex_lock
jmp short loc_46949
loc_46994:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_4695B
|
signed long long trnman_free_trn(signed long long a1)
{
signed long long result; // rax
signed long long v2; // rtt
if ( *(_QWORD *)(a1 + 80) )
psi_mutex_lock(a1 + 16, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x22Du);
else
pthread_mutex_lock(a1 + 16);
*(_WORD *)(a1 + 172) = 0;
if ( *(_QWORD *)(a1 + 80) )
PSI_server[44]();
pthread_mutex_unlock(a1 + 16);
result = pool;
do
{
*(_QWORD *)(a1 + 104) = result;
v2 = result;
result = _InterlockedCompareExchange64(&pool, a1, result);
}
while ( v2 != result );
return result;
}
|
trnman_free_trn:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R14,[RDI + 0x10]
CMP qword ptr [RDI + 0x50],0x0
JNZ 0x0014697e
MOV RDI,R14
CALL 0x00129220
LAB_00146949:
MOV word ptr [RBX + 0xac],0x0
MOV RDI,qword ptr [RBX + 0x50]
TEST RDI,RDI
JNZ 0x00146994
LAB_0014695b:
MOV RDI,R14
CALL 0x001291e0
MOV RAX,qword ptr [0x004fd438]
LAB_0014696a:
MOV qword ptr [RBX + 0x68],RAX
CMPXCHG.LOCK qword ptr [0x004fd438],RBX
JNZ 0x0014696a
POP RBX
POP R14
POP RBP
RET
LAB_0014697e:
LEA RSI,[0x1d96a6]
MOV RDI,R14
MOV EDX,0x22d
CALL 0x0012eb8f
JMP 0x00146949
LAB_00146994:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0014695b
|
void trnman_free_trn(long param_1)
{
pthread_mutex_t *__mutex;
long lVar1;
long lVar2;
bool bVar3;
__mutex = (pthread_mutex_t *)(param_1 + 0x10);
if (*(long *)(param_1 + 0x50) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x22d);
}
*(int2 *)(param_1 + 0xac) = 0;
if (*(long *)(param_1 + 0x50) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
lVar2 = pool;
do {
*(long *)(param_1 + 0x68) = lVar2;
LOCK();
bVar3 = lVar2 != pool;
lVar1 = param_1;
if (bVar3) {
lVar2 = pool;
lVar1 = pool;
}
pool = lVar1;
UNLOCK();
} while (bVar3);
return;
}
|
|
65,175 |
var_object_test
|
bluesky950520[P]quickjs/quickjs.c
|
static void var_object_test(JSContext *ctx, JSFunctionDef *s,
JSAtom var_name, int op, DynBuf *bc,
int *plabel_done, BOOL is_with)
{
dbuf_putc(bc, get_with_scope_opcode(op));
dbuf_put_u32(bc, JS_DupAtom(ctx, var_name));
*plabel_done = new_label_fd(s, *plabel_done);
dbuf_put_u32(bc, *plabel_done);
dbuf_putc(bc, is_with);
update_label(s, *plabel_done, 1);
s->jump_size++;
}
|
O1
|
c
|
var_object_test:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r12
movl 0x40(%rsp), %r13d
leal -0x44(%rcx), %eax
cmpl $0xb6, %ecx
movzbl %al, %eax
movl $0x73, %ecx
cmovnel %eax, %ecx
movzbl %cl, %esi
movq %r8, %rdi
callq 0x1a8bc
cmpl $0xe0, %ebp
jl 0x6e354
movq 0x18(%r12), %rax
movq 0x68(%rax), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rax
incl (%rax)
movq %rsp, %rsi
movl %ebp, (%rsi)
movl $0x4, %edx
movq %r15, %rdi
callq 0x1a80e
movl (%r14), %esi
movq %rbx, %rdi
callq 0x6bba5
movl %eax, (%r14)
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %r15, %rdi
callq 0x1a80e
movzbl %r13b, %esi
movq %r15, %rdi
callq 0x1a8bc
movslq (%r14), %rax
movq 0x170(%rbx), %rcx
leaq (%rax,%rax,2), %rax
incl (%rcx,%rax,8)
incl 0x1b0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
var_object_test:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r15, r8
mov ebp, edx
mov rbx, rsi
mov r12, rdi
mov r13d, [rsp+38h+arg_0]
lea eax, [rcx-44h]
cmp ecx, 0B6h
movzx eax, al
mov ecx, 73h ; 's'
cmovnz ecx, eax
movzx esi, cl
mov rdi, r8
call dbuf_putc
cmp ebp, 0E0h
jl short loc_6E354
mov rax, [r12+18h]
mov rax, [rax+68h]
mov ecx, ebp
mov rax, [rax+rcx*8]
inc dword ptr [rax]
loc_6E354:
mov rsi, rsp
mov [rsi], ebp
mov edx, 4
mov rdi, r15
call dbuf_put
mov esi, [r14]
mov rdi, rbx
call new_label_fd
mov [r14], eax
lea rsi, [rsp+38h+var_34]
mov [rsi], eax
mov edx, 4
mov rdi, r15
call dbuf_put
movzx esi, r13b
mov rdi, r15
call dbuf_putc
movsxd rax, dword ptr [r14]
mov rcx, [rbx+170h]
lea rax, [rax+rax*2]
inc dword ptr [rcx+rax*8]
inc dword ptr [rbx+1B0h]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long var_object_test(long long a1, long long a2, int a3, int a4, _QWORD *a5, int *a6, char a7)
{
long long v7; // rax
bool v11; // zf
char v12; // al
char v13; // cl
_DWORD *v14; // rax
int v15; // eax
long long result; // rax
_QWORD v17[7]; // [rsp-4h] [rbp-38h] BYREF
v17[0] = v7;
v11 = a4 == 182;
v12 = a4 - 68;
v13 = 115;
if ( !v11 )
v13 = v12;
dbuf_putc(a5, v13);
if ( a3 >= 224 )
{
v14 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a3);
++*v14;
}
LODWORD(v17[0]) = a3;
dbuf_put(a5, (long long)v17, 4LL);
v15 = new_label_fd(a2, *a6);
*a6 = v15;
HIDWORD(v17[0]) = v15;
dbuf_put(a5, (long long)v17 + 4, 4LL);
dbuf_putc(a5, a7);
result = 3LL * *a6;
++*(_DWORD *)(*(_QWORD *)(a2 + 368) + 24LL * *a6);
++*(_DWORD *)(a2 + 432);
return result;
}
|
var_object_test:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R15,R8
MOV EBP,EDX
MOV RBX,RSI
MOV R12,RDI
MOV R13D,dword ptr [RSP + 0x40]
LEA EAX,[RCX + -0x44]
CMP ECX,0xb6
MOVZX EAX,AL
MOV ECX,0x73
CMOVNZ ECX,EAX
MOVZX ESI,CL
MOV RDI,R8
CALL 0x0011a8bc
CMP EBP,0xe0
JL 0x0016e354
MOV RAX,qword ptr [R12 + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,EBP
MOV RAX,qword ptr [RAX + RCX*0x8]
INC dword ptr [RAX]
LAB_0016e354:
MOV RSI,RSP
MOV dword ptr [RSI],EBP
MOV EDX,0x4
MOV RDI,R15
CALL 0x0011a80e
MOV ESI,dword ptr [R14]
MOV RDI,RBX
CALL 0x0016bba5
MOV dword ptr [R14],EAX
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],EAX
MOV EDX,0x4
MOV RDI,R15
CALL 0x0011a80e
MOVZX ESI,R13B
MOV RDI,R15
CALL 0x0011a8bc
MOVSXD RAX,dword ptr [R14]
MOV RCX,qword ptr [RBX + 0x170]
LEA RAX,[RAX + RAX*0x2]
INC dword ptr [RCX + RAX*0x8]
INC dword ptr [RBX + 0x1b0]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void var_object_test(long param_1,long param_2,ulong param_3,int param_4,int8 param_5,
int *param_6,int1 param_7)
{
int *piVar1;
int iVar2;
int8 in_RAX;
uint uVar3;
int local_38;
int local_34;
local_34 = (int)((ulong)in_RAX >> 0x20);
uVar3 = 0x73;
if (param_4 != 0xb6) {
uVar3 = param_4 - 0x44U & 0xff;
}
dbuf_putc(param_5,uVar3,param_3,uVar3);
if (0xdf < (int)param_3) {
piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (param_3 & 0xffffffff) * 8);
*piVar1 = *piVar1 + 1;
}
_local_38 = CONCAT44(local_34,(int)param_3);
dbuf_put(param_5,&local_38,4);
iVar2 = new_label_fd(param_2,*param_6);
*param_6 = iVar2;
_local_38 = CONCAT44(iVar2,local_38);
dbuf_put(param_5,&local_34,4);
dbuf_putc(param_5,param_7);
piVar1 = (int *)(*(long *)(param_2 + 0x170) + (long)*param_6 * 0x18);
*piVar1 = *piVar1 + 1;
*(int *)(param_2 + 0x1b0) = *(int *)(param_2 + 0x1b0) + 1;
return;
}
|
|
65,176 |
var_object_test
|
bluesky950520[P]quickjs/quickjs.c
|
static void var_object_test(JSContext *ctx, JSFunctionDef *s,
JSAtom var_name, int op, DynBuf *bc,
int *plabel_done, BOOL is_with)
{
dbuf_putc(bc, get_with_scope_opcode(op));
dbuf_put_u32(bc, JS_DupAtom(ctx, var_name));
*plabel_done = new_label_fd(s, *plabel_done);
dbuf_put_u32(bc, *plabel_done);
dbuf_putc(bc, is_with);
update_label(s, *plabel_done, 1);
s->jump_size++;
}
|
O3
|
c
|
var_object_test:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r12
movl 0x40(%rsp), %r13d
leal -0x44(%rcx), %eax
cmpl $0xb6, %ecx
movzbl %al, %eax
movl $0x73, %ecx
cmovnel %eax, %ecx
movzbl %cl, %esi
movq %r8, %rdi
callq 0x1b1c5
cmpl $0xe0, %ebp
jl 0x706d1
movq 0x18(%r12), %rax
movq 0x68(%rax), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rax
incl (%rax)
movq %rsp, %rsi
movl %ebp, (%rsi)
movl $0x4, %edx
movq %r15, %rdi
callq 0x1b116
movl (%r14), %esi
movq %rbx, %rdi
callq 0x6dd3e
movl %eax, (%r14)
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %r15, %rdi
callq 0x1b116
movzbl %r13b, %esi
movq %r15, %rdi
callq 0x1b1c5
movslq (%r14), %rax
movq 0x170(%rbx), %rcx
leaq (%rax,%rax,2), %rax
incl (%rcx,%rax,8)
incl 0x1b0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
var_object_test:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r15, r8
mov ebp, edx
mov rbx, rsi
mov r12, rdi
mov r13d, [rsp+38h+arg_0]
lea eax, [rcx-44h]
cmp ecx, 0B6h
movzx eax, al
mov ecx, 73h ; 's'
cmovnz ecx, eax
movzx esi, cl
mov rdi, r8
call dbuf_putc
cmp ebp, 0E0h
jl short loc_706D1
mov rax, [r12+18h]
mov rax, [rax+68h]
mov ecx, ebp
mov rax, [rax+rcx*8]
inc dword ptr [rax]
loc_706D1:
mov rsi, rsp
mov [rsi], ebp
mov edx, 4
mov rdi, r15
call dbuf_put
mov esi, [r14]
mov rdi, rbx
call new_label_fd
mov [r14], eax
lea rsi, [rsp+38h+var_34]
mov [rsi], eax
mov edx, 4
mov rdi, r15
call dbuf_put
movzx esi, r13b
mov rdi, r15
call dbuf_putc
movsxd rax, dword ptr [r14]
mov rcx, [rbx+170h]
lea rax, [rax+rax*2]
inc dword ptr [rcx+rax*8]
inc dword ptr [rbx+1B0h]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long var_object_test(long long a1, long long a2, int a3, int a4, _QWORD *a5, int *a6, char a7)
{
long long v7; // rax
bool v11; // zf
char v12; // al
char v13; // cl
_DWORD *v14; // rax
int v15; // eax
long long result; // rax
_QWORD v17[7]; // [rsp-4h] [rbp-38h] BYREF
v17[0] = v7;
v11 = a4 == 182;
v12 = a4 - 68;
v13 = 115;
if ( !v11 )
v13 = v12;
dbuf_putc(a5, v13);
if ( a3 >= 224 )
{
v14 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a3);
++*v14;
}
LODWORD(v17[0]) = a3;
dbuf_put(a5, (long long)v17, 4LL);
v15 = new_label_fd(a2, *a6);
*a6 = v15;
HIDWORD(v17[0]) = v15;
dbuf_put(a5, (long long)v17 + 4, 4LL);
dbuf_putc(a5, a7);
result = 3LL * *a6;
++*(_DWORD *)(*(_QWORD *)(a2 + 368) + 24LL * *a6);
++*(_DWORD *)(a2 + 432);
return result;
}
|
var_object_test:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R15,R8
MOV EBP,EDX
MOV RBX,RSI
MOV R12,RDI
MOV R13D,dword ptr [RSP + 0x40]
LEA EAX,[RCX + -0x44]
CMP ECX,0xb6
MOVZX EAX,AL
MOV ECX,0x73
CMOVNZ ECX,EAX
MOVZX ESI,CL
MOV RDI,R8
CALL 0x0011b1c5
CMP EBP,0xe0
JL 0x001706d1
MOV RAX,qword ptr [R12 + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,EBP
MOV RAX,qword ptr [RAX + RCX*0x8]
INC dword ptr [RAX]
LAB_001706d1:
MOV RSI,RSP
MOV dword ptr [RSI],EBP
MOV EDX,0x4
MOV RDI,R15
CALL 0x0011b116
MOV ESI,dword ptr [R14]
MOV RDI,RBX
CALL 0x0016dd3e
MOV dword ptr [R14],EAX
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],EAX
MOV EDX,0x4
MOV RDI,R15
CALL 0x0011b116
MOVZX ESI,R13B
MOV RDI,R15
CALL 0x0011b1c5
MOVSXD RAX,dword ptr [R14]
MOV RCX,qword ptr [RBX + 0x170]
LEA RAX,[RAX + RAX*0x2]
INC dword ptr [RCX + RAX*0x8]
INC dword ptr [RBX + 0x1b0]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void var_object_test(long param_1,long param_2,ulong param_3,int param_4,int8 param_5,
int *param_6,int1 param_7)
{
int *piVar1;
int iVar2;
int8 in_RAX;
uint uVar3;
int local_38;
int local_34;
local_34 = (int)((ulong)in_RAX >> 0x20);
uVar3 = 0x73;
if (param_4 != 0xb6) {
uVar3 = param_4 - 0x44U & 0xff;
}
dbuf_putc(param_5,uVar3,param_3,uVar3);
if (0xdf < (int)param_3) {
piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (param_3 & 0xffffffff) * 8);
*piVar1 = *piVar1 + 1;
}
_local_38 = CONCAT44(local_34,(int)param_3);
dbuf_put(param_5,&local_38,4);
iVar2 = new_label_fd(param_2,*param_6);
*param_6 = iVar2;
_local_38 = CONCAT44(iVar2,local_38);
dbuf_put(param_5,&local_34,4);
dbuf_putc(param_5,param_7);
piVar1 = (int *)(*(long *)(param_2 + 0x170) + (long)*param_6 * 0x18);
*piVar1 = *piVar1 + 1;
*(int *)(param_2 + 0x1b0) = *(int *)(param_2 + 0x1b0) + 1;
return;
}
|
|
65,177 |
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
|
monkey531[P]llama/common/minja.hpp
|
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) {
std::map<std::string, size_t> named_positions;
for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i;
return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value {
auto args_obj = Value::object();
std::vector<bool> provided_args(params.size());
for (size_t i = 0, n = args.args.size(); i < n; i++) {
auto & arg = args.args[i];
if (i < params.size()) {
args_obj.set(params[i], arg);
provided_args[i] = true;
} else {
throw std::runtime_error("Too many positional params for " + fn_name);
}
}
for (auto & [name, value] : args.kwargs) {
auto named_pos_it = named_positions.find(name);
if (named_pos_it == named_positions.end()) {
throw std::runtime_error("Unknown argument " + name + " for function " + fn_name);
}
provided_args[named_pos_it->second] = true;
args_obj.set(name, value);
}
return fn(context, args_obj);
});
}
|
O0
|
cpp
|
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&):
subq $0x158, %rsp # imm = 0x158
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq %rdx, 0x140(%rsp)
movq %rcx, 0x138(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x16d010
movq $0x0, 0x100(%rsp)
movq 0x140(%rsp), %rdi
callq 0x8ae00
movq %rax, 0xf8(%rsp)
movq 0x100(%rsp), %rax
cmpq 0xf8(%rsp), %rax
jae 0xf3591
movq 0x100(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq 0x140(%rsp), %rdi
callq 0xf51e0
movq %rax, %rsi
leaq 0x108(%rsp), %rdi
callq 0x16d020
movq %rax, 0x28(%rsp)
jmp 0xf3555
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movq 0x100(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x100(%rsp)
jmp 0xf3512
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0xf36ed
leaq 0x40(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x140(%rsp), %rsi
callq 0x8b5b0
jmp 0xf35aa
leaq 0x58(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq 0x148(%rsp), %rsi
callq 0x591f0
jmp 0xf35c3
leaq 0x78(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0x108(%rsp), %rsi
callq 0x16d110
jmp 0xf35dc
leaq 0xa8(%rsp), %rdi
movq 0x138(%rsp), %rsi
callq 0x16d140
jmp 0xf35f3
leaq 0xc8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xf3710
jmp 0xf3607
movq 0x30(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x1387d0
jmp 0xf361b
leaq 0xc8(%rsp), %rdi
callq 0x138900
leaq 0x40(%rsp), %rdi
callq 0xf37c0
leaq 0x108(%rsp), %rdi
callq 0x16d1f0
movq 0x38(%rsp), %rax
addq $0x158, %rsp # imm = 0x158
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0xf36a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0xf3696
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
callq 0x16d1f0
movq 0x10(%rsp), %rdi
callq 0x5a4d8
movq 0x18(%rsp), %rdi
callq 0x60eb0
jmp 0xf36ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0xf36e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x138900
leaq 0x40(%rsp), %rdi
callq 0xf37c0
leaq 0x108(%rsp), %rdi
callq 0x16d1f0
movq 0xf0(%rsp), %rdi
callq 0x59b80
nopw (%rax,%rax)
|
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE:
sub rsp, 158h
mov [rsp+158h+var_128], rdi
mov rax, rdi
mov [rsp+158h+var_120], rax
mov [rsp+158h+var_8], rdi
mov [rsp+158h+var_10], rsi
mov [rsp+158h+var_18], rdx
mov [rsp+158h+var_20], rcx
lea rdi, [rsp+158h+var_50]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2Ev; std::map<std::string,ulong>::map(void)
mov [rsp+158h+var_58], 0
mov rdi, [rsp+158h+var_18]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov [rsp+158h+var_60], rax
loc_F3512:
mov rax, [rsp+158h+var_58]
cmp rax, [rsp+158h+var_60]
jnb short loc_F3591
mov rsi, [rsp+158h+var_58]
mov [rsp+158h+var_138], rsi
mov rdi, [rsp+158h+var_18]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong)
mov rsi, rax
lea rdi, [rsp+158h+var_50]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&)
mov [rsp+158h+var_130], rax
jmp short $+2
loc_F3555:
mov rax, [rsp+158h+var_130]
mov rcx, [rsp+158h+var_138]
mov [rax], rcx
mov rax, [rsp+158h+var_58]
add rax, 1
mov [rsp+158h+var_58], rax
jmp short loc_F3512
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
jmp loc_F36ED
loc_F3591:
lea rdi, [rsp+158h+var_118]
mov [rsp+158h+var_140], rdi
mov rsi, [rsp+158h+var_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
jmp short $+2
loc_F35AA:
lea rdi, [rsp+158h+var_100]
mov [rsp+158h+var_148], rdi
mov rsi, [rsp+158h+var_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_F35C3:
lea rdi, [rsp+158h+var_E0]
mov [rsp+158h+var_150], rdi
lea rsi, [rsp+158h+var_50]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2ERKSC_; std::map<std::string,ulong>::map(std::map<std::string,ulong> const&)
jmp short $+2
loc_F35DC:
lea rdi, [rsp+158h+var_B0]
mov rsi, [rsp+158h+var_20]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
jmp short $+2
loc_F35F3:
lea rdi, [rsp+158h+var_90]
lea rsi, [rsp+158h+var_118]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISH_SaISH_EERKS_IFS1_S6_RS1_EEE3$_0vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>(minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0 &&)
jmp short $+2
loc_F3607:
mov rdi, [rsp+158h+var_128]
lea rsi, [rsp+158h+var_90]
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
jmp short $+2
loc_F361B:
lea rdi, [rsp+158h+var_90]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function()
lea rdi, [rsp+158h+var_118]
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0()
lea rdi, [rsp+158h+var_50]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map()
mov rax, [rsp+158h+var_120]
add rsp, 158h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
jmp short loc_F36A0
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
jmp short loc_F3696
mov rdi, [rsp+arg_0]
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map()
loc_F3696:
mov rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_F36A0:
mov rdi, [rsp+arg_10]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_F36ED
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
jmp short loc_F36E3
mov rcx, rax
mov eax, edx
mov [rsp+arg_E8], rcx
mov [rsp+arg_E4], eax
lea rdi, [rsp+arg_C0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function()
loc_F36E3:
lea rdi, [rsp+arg_38]
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0()
loc_F36ED:
lea rdi, [rsp+arg_100]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map()
mov rdi, [rsp+arg_E8]
call __Unwind_Resume
|
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long v4; // rax
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
_QWORD v18[3]; // [rsp+40h] [rbp-118h] BYREF
_BYTE v19[32]; // [rsp+58h] [rbp-100h] BYREF
_BYTE v20[48]; // [rsp+78h] [rbp-E0h] BYREF
char v21; // [rsp+A8h] [rbp-B0h] BYREF
_BYTE v22[48]; // [rsp+C8h] [rbp-90h] BYREF
unsigned long long v23; // [rsp+F8h] [rbp-60h]
unsigned long long v24; // [rsp+100h] [rbp-58h]
_BYTE v25[48]; // [rsp+108h] [rbp-50h] BYREF
long long v26; // [rsp+138h] [rbp-20h]
_QWORD *v27; // [rsp+140h] [rbp-18h]
long long v28; // [rsp+148h] [rbp-10h]
long long v29; // [rsp+150h] [rbp-8h]
v29 = a1;
v28 = a2;
v27 = a3;
v26 = a4;
std::map<std::string,unsigned long>::map(v25);
v24 = 0LL;
v23 = std::vector<std::string>::size(v27);
while ( v24 < v23 )
{
v4 = std::vector<std::string>::operator[](v27, v24);
*(_QWORD *)std::map<std::string,unsigned long>::operator[](v25, v4) = v24++;
}
std::vector<std::string>::vector(v18, v27);
std::string::basic_string(v19, v28);
std::map<std::string,unsigned long>::map(v20, v25);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(
(unsigned int)&v21,
v26,
v5,
v6,
v7,
v8);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>(
(unsigned int)v22,
(unsigned int)v18,
v9,
v10,
v11,
v12);
minja::Value::callable(a1, (unsigned int)v22, v13, v14, v15, v16);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function(v22);
minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v18);
std::map<std::string,unsigned long>::~map(v25);
return a1;
}
|
simple_function:
SUB RSP,0x158
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x150],RDI
MOV qword ptr [RSP + 0x148],RSI
MOV qword ptr [RSP + 0x140],RDX
MOV qword ptr [RSP + 0x138],RCX
LEA RDI,[RSP + 0x108]
CALL 0x0026d010
MOV qword ptr [RSP + 0x100],0x0
MOV RDI,qword ptr [RSP + 0x140]
CALL 0x0018ae00
MOV qword ptr [RSP + 0xf8],RAX
LAB_001f3512:
MOV RAX,qword ptr [RSP + 0x100]
CMP RAX,qword ptr [RSP + 0xf8]
JNC 0x001f3591
MOV RSI,qword ptr [RSP + 0x100]
MOV qword ptr [RSP + 0x20],RSI
MOV RDI,qword ptr [RSP + 0x140]
CALL 0x001f51e0
MOV RSI,RAX
LAB_001f3541:
LEA RDI,[RSP + 0x108]
CALL 0x0026d020
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001f3555
LAB_001f3555:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x100]
ADD RAX,0x1
MOV qword ptr [RSP + 0x100],RAX
JMP 0x001f3512
LAB_001f3591:
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x18],RDI
MOV RSI,qword ptr [RSP + 0x140]
CALL 0x0018b5b0
JMP 0x001f35aa
LAB_001f35aa:
LEA RDI,[RSP + 0x58]
MOV qword ptr [RSP + 0x10],RDI
MOV RSI,qword ptr [RSP + 0x148]
LAB_001f35bc:
CALL 0x001591f0
JMP 0x001f35c3
LAB_001f35c3:
LEA RDI,[RSP + 0x78]
MOV qword ptr [RSP + 0x8],RDI
LAB_001f35cd:
LEA RSI,[RSP + 0x108]
CALL 0x0026d110
JMP 0x001f35dc
LAB_001f35dc:
LEA RDI,[RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0x138]
LAB_001f35ec:
CALL 0x0026d140
JMP 0x001f35f3
LAB_001f35f3:
LEA RDI,[RSP + 0xc8]
LEA RSI,[RSP + 0x40]
CALL 0x001f3710
JMP 0x001f3607
LAB_001f3607:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0xc8]
CALL 0x002387d0
LAB_001f3619:
JMP 0x001f361b
LAB_001f361b:
LEA RDI,[RSP + 0xc8]
CALL 0x00238900
LEA RDI,[RSP + 0x40]
CALL 0x001f37c0
LEA RDI,[RSP + 0x108]
CALL 0x0026d1f0
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0x158
RET
|
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, std::function<minja::Value
(std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */
minja * __thiscall
minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3)
{
ulong uVar1;
string *psVar2;
ulong *puVar3;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_118 [24];
string local_100 [32];
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_e0 [48];
function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_b0 [32];
function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> local_90 [48]
;
ulong local_60;
ulong local_58;
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_50 [48];
function *local_20;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18;
string *local_10;
minja *local_8;
local_20 = param_3;
local_18 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_2;
local_10 = param_1;
local_8 = this;
std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::map(local_50);
local_58 = 0;
local_60 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_18);
for (; uVar1 = local_58, local_58 < local_60; local_58 = local_58 + 1) {
psVar2 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[]
(local_18,local_58);
/* try { // try from 001f3541 to 001f35a7 has its CatchHandler @ 001f3578 */
puVar3 = (ulong *)std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::operator[](local_50,psVar2);
*puVar3 = uVar1;
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
(local_118,(vector *)local_18);
/* try { // try from 001f35bc to 001f35c0 has its CatchHandler @ 001f364c */
std::__cxx11::string::string(local_100,local_10);
/* try { // try from 001f35cd to 001f35d9 has its CatchHandler @ 001f3662 */
std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::map(local_e0,(map *)local_50);
/* try { // try from 001f35ec to 001f35f0 has its CatchHandler @ 001f3678 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
(local_b0,local_20);
/* try { // try from 001f35f3 to 001f3604 has its CatchHandler @ 001f36ac */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
function<minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::__0,void>
(local_90,(__0 *)local_118);
/* try { // try from 001f3607 to 001f3618 has its CatchHandler @ 001f36c2 */
Value::callable((Value *)this,(function *)local_90);
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
~function(local_90);
simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)
::$_0::~__0((__0 *)local_118);
std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~map(local_50);
return this;
}
|
|
65,178 |
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
|
monkey531[P]llama/common/minja.hpp
|
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) {
std::map<std::string, size_t> named_positions;
for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i;
return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value {
auto args_obj = Value::object();
std::vector<bool> provided_args(params.size());
for (size_t i = 0, n = args.args.size(); i < n; i++) {
auto & arg = args.args[i];
if (i < params.size()) {
args_obj.set(params[i], arg);
provided_args[i] = true;
} else {
throw std::runtime_error("Too many positional params for " + fn_name);
}
}
for (auto & [name, value] : args.kwargs) {
auto named_pos_it = named_positions.find(name);
if (named_pos_it == named_positions.end()) {
throw std::runtime_error("Unknown argument " + name + " for function " + fn_name);
}
provided_args[named_pos_it->second] = true;
args_obj.set(name, value);
}
return fn(context, args_obj);
});
}
|
O1
|
cpp
|
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0x28(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
leaq 0xc0(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x8(%rdx), %rbp
subq (%rdx), %rbp
je 0xd6cee
sarq $0x5, %rbp
cmpq $0x1, %rbp
adcq $0x0, %rbp
xorl %ebx, %ebx
leaq 0xb8(%rsp), %r13
xorl %r12d, %r12d
movq (%r15), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq 0xabb46
movq %r12, (%rax)
incq %r12
addq $0x20, %rbx
cmpq %r12, %rbp
jne 0xd6cd1
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x533c0
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x210f0
leaq 0x68(%rsp), %r14
leaq 0xb8(%rsp), %rsi
movq %r14, %rdi
callq 0xabfa0
leaq 0x98(%rsp), %r15
movq %r15, %rdi
movq 0x28(%rsp), %rsi
callq 0xabbc2
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x88, %edi
callq 0x1a870
movq %rax, %r12
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x533c0
leaq 0x18(%r12), %rdi
leaq 0x28(%r12), %rbp
movq %rbp, 0x18(%r12)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
callq 0x210f0
leaq 0x40(%r12), %rax
movq 0x78(%rsp), %rcx
testq %rcx, %rcx
je 0xd6dd9
leaq 0x70(%rsp), %rdx
movl (%rdx), %esi
movl %esi, 0x40(%r12)
movq %rcx, 0x48(%r12)
movups 0x10(%rdx), %xmm0
movups %xmm0, 0x50(%r12)
movq %rax, 0x8(%rcx)
leaq 0x90(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x60(%r12)
movq $0x0, -0x18(%rax)
movq %rdx, -0x10(%rax)
movq %rdx, -0x8(%rax)
jmp 0xd6dfa
movl $0x0, 0x40(%r12)
movq $0x0, 0x48(%r12)
movq %rax, 0x50(%r12)
movq %rax, 0x58(%r12)
leaq 0x60(%r12), %rax
movq $0x0, (%rax)
leaq 0x68(%r12), %rdi
movq %r15, %rsi
callq 0xabbc2
movq %rsp, %rsi
movq %r12, (%rsi)
leaq 0x1d5(%rip), %rax # 0xd6ff0
movq %rax, 0x18(%rsi)
leaq 0x866(%rip), %rax # 0xd768c
movq %rax, 0x10(%rsi)
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x9559c
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd6e4e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xa8(%rsp), %rax
testq %rax, %rax
je 0xd6e68
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0xac202
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0xd6e87
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x30(%rsp), %rdi
callq 0x20c6a
leaq 0xb8(%rsp), %rdi
callq 0xac202
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd6f47
jmp 0xd6f47
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd6f3b
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xd6f3b
jmp 0xd6f47
movq %rax, %rbx
movq %r12, %rdi
addq $0x38, %rdi
callq 0xac202
movq 0x18(%r12), %rdi
cmpq %rbp, %rdi
je 0xd6f05
movq (%rbp), %rsi
incq %rsi
callq 0x1a890
jmp 0xd6f05
movq %rax, %rbx
movq %r12, %rdi
callq 0x20c6a
jmp 0xd6f12
movq %rax, %rbx
movl $0x88, %esi
movq %r12, %rdi
callq 0x1a890
jmp 0xd6f24
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd6f3b
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x30(%rsp), %rdi
callq 0xd6fa2
jmp 0xd6f8c
movq %rax, %rdi
callq 0x20749
movq %rax, %rbx
movq %r14, %rdi
callq 0xac202
jmp 0xd6f5f
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0xd6f7b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xd6f7b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20c6a
jmp 0xd6f8c
jmp 0xd6f89
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0xac202
movq %rbx, %rdi
callq 0x1af20
nop
|
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_F0], rcx
mov r15, rdx
mov r14, rsi
mov [rsp+118h+var_F8], rdi
lea rax, [rsp+118h+var_58]
mov dword ptr [rax], 0
xor ecx, ecx
mov [rax+8], rcx
mov [rax+10h], rax
mov [rax+18h], rax
mov [rax+20h], rcx
mov rbp, [rdx+8]
sub rbp, [rdx]
jz short loc_D6CEE
sar rbp, 5
cmp rbp, 1
adc rbp, 0
xor ebx, ebx
lea r13, [rsp+118h+var_60]
xor r12d, r12d
loc_D6CD1:
mov rsi, [r15]
add rsi, rbx
mov rdi, r13
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&)
mov [rax], r12
inc r12
add rbx, 20h ; ' '
cmp rbp, r12
jnz short loc_D6CD1
loc_D6CEE:
lea rdi, [rsp+118h+var_E8]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea rdi, [rsp+118h+var_D0]
lea r13, [rsp+118h+var_C0]
mov [r13-10h], r13
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea r14, [rsp+118h+var_B0]
lea rsi, [rsp+118h+var_60]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&)
lea r15, [rsp+118h+var_80]
mov rdi, r15
mov rsi, [rsp+118h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
xorps xmm0, xmm0
movaps [rsp+118h+var_108], xmm0
movaps [rsp+118h+var_118], xmm0
mov edi, 88h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rsi, [rsp+118h+var_E8]
mov rdi, rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea rdi, [r12+18h]
lea rbp, [r12+28h]
mov [r12+18h], rbp
mov rsi, [rsp+118h+var_D0]
mov rdx, [rsp+118h+var_C8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rax, [r12+40h]
mov rcx, [rsp+118h+var_A0]
test rcx, rcx
jz short loc_D6DD9
lea rdx, [rsp+118h+var_A8]
mov esi, [rdx]
mov [r12+40h], esi
mov [r12+48h], rcx
movups xmm0, xmmword ptr [rdx+10h]
movups xmmword ptr [r12+50h], xmm0
mov [rcx+8], rax
lea rax, [rsp+118h+var_88]
mov rcx, [rax]
mov [r12+60h], rcx
mov qword ptr [rax-18h], 0
mov [rax-10h], rdx
mov [rax-8], rdx
jmp short loc_D6DFA
loc_D6DD9:
mov dword ptr [r12+40h], 0
mov qword ptr [r12+48h], 0
mov [r12+50h], rax
mov [r12+58h], rax
lea rax, [r12+60h]
loc_D6DFA:
mov qword ptr [rax], 0
lea rdi, [r12+68h]
mov rsi, r15
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
mov rsi, rsp
mov [rsi], r12
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8__0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation_0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
mov rbx, [rsp+118h+var_F8]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_D6E4E
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_D6E4E:
mov rax, [rsp+118h+var_70]
test rax, rax
jz short loc_D6E68
mov rdi, r15
mov rsi, r15
mov edx, 3
call rax
loc_D6E68:
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, [rsp+118h+var_D0]; void *
cmp rdi, r13
jz short loc_D6E87
mov rsi, [rsp+118h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D6E87:
lea rdi, [rsp+118h+var_E8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+118h+var_60]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_D6F47
jmp loc_D6F47
mov rbx, rax
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_D6F3B
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_D6F3B
jmp short loc_D6F47
mov rbx, rax
mov rdi, r12
add rdi, 38h ; '8'
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, [r12+18h]; void *
cmp rdi, rbp
jz short loc_D6F05
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D6F05
mov rbx, rax
loc_D6F05:
mov rdi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_D6F12
mov rbx, rax
loc_D6F12:
mov esi, 88h; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D6F24
mov rbx, rax
loc_D6F24:
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_D6F3B
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_D6F3B:
lea rdi, [rsp+118h+var_E8]
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0()
jmp short loc_D6F8C
loc_D6F47:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
jmp short loc_D6F5F
mov rbx, rax
loc_D6F5F:
mov rdi, [rsp+118h+var_D0]; void *
cmp rdi, r13
jz short loc_D6F7B
mov rsi, [rsp+118h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D6F7B
mov rbx, rax
loc_D6F7B:
lea rdi, [rsp+118h+var_E8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_D6F8C
jmp short $+2
loc_D6F89:
mov rbx, rax
loc_D6F8C:
lea rdi, [rsp+118h+var_60]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
|
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long v5; // rbp
long long v6; // rbp
long long v7; // rbx
long long v8; // r12
long long v9; // r12
long long v10; // rax
long long v11; // rcx
long long *v12; // rax
long long v13; // rbx
__int128 v15; // [rsp+0h] [rbp-118h] BYREF
__int128 v16; // [rsp+10h] [rbp-108h]
long long v17; // [rsp+20h] [rbp-F8h]
long long v18; // [rsp+28h] [rbp-F0h]
_QWORD v19[3]; // [rsp+30h] [rbp-E8h] BYREF
void *v20[2]; // [rsp+48h] [rbp-D0h] BYREF
_QWORD v21[2]; // [rsp+58h] [rbp-C0h] BYREF
_BYTE v22[8]; // [rsp+68h] [rbp-B0h] BYREF
int v23; // [rsp+70h] [rbp-A8h] BYREF
long long v24; // [rsp+78h] [rbp-A0h]
__int128 v25; // [rsp+80h] [rbp-98h]
long long v26; // [rsp+90h] [rbp-88h] BYREF
__int128 v27; // [rsp+98h] [rbp-80h] BYREF
void ( *v28)(__int128 *, __int128 *, long long); // [rsp+A8h] [rbp-70h]
_BYTE v29[8]; // [rsp+B8h] [rbp-60h] BYREF
int v30; // [rsp+C0h] [rbp-58h] BYREF
long long v31; // [rsp+C8h] [rbp-50h]
int *v32; // [rsp+D0h] [rbp-48h]
int *v33; // [rsp+D8h] [rbp-40h]
long long v34; // [rsp+E0h] [rbp-38h]
v18 = a4;
v17 = a1;
v30 = 0;
v31 = 0LL;
v32 = &v30;
v33 = &v30;
v34 = 0LL;
v5 = a3[1] - *a3;
if ( v5 )
{
v6 = (v5 >> 5 == 0) + (v5 >> 5);
v7 = 0LL;
v8 = 0LL;
do
{
*(_QWORD *)std::map<std::string,unsigned long>::operator[]((long long)v29, v7 + *a3) = v8++;
v7 += 32LL;
}
while ( v6 != v8 );
}
std::vector<std::string>::vector((long long)v19, a3);
v20[0] = v21;
std::string::_M_construct<char *>(v20, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree(
(long long)v22,
(long long)v29);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(&v27, v18);
v16 = 0LL;
v15 = 0LL;
v9 = operator new(0x88uLL);
std::vector<std::string>::vector(v9, v19);
*(_QWORD *)(v9 + 24) = v9 + 40;
std::string::_M_construct<char *>((_QWORD *)(v9 + 24), (_BYTE *)v20[0], (long long)v20[0] + (unsigned long long)v20[1]);
v10 = v9 + 64;
v11 = v24;
if ( v24 )
{
*(_DWORD *)(v9 + 64) = v23;
*(_QWORD *)(v9 + 72) = v11;
*(_OWORD *)(v9 + 80) = v25;
*(_QWORD *)(v11 + 8) = v10;
v12 = &v26;
*(_QWORD *)(v9 + 96) = v26;
v24 = 0LL;
*(_QWORD *)&v25 = &v23;
*((_QWORD *)&v25 + 1) = &v23;
}
else
{
*(_DWORD *)(v9 + 64) = 0;
*(_QWORD *)(v9 + 72) = 0LL;
*(_QWORD *)(v9 + 80) = v10;
*(_QWORD *)(v9 + 88) = v10;
v12 = (long long *)(v9 + 96);
}
*v12 = 0LL;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(
(_OWORD *)(v9 + 104),
(long long)&v27);
*(_QWORD *)&v15 = v9;
*((_QWORD *)&v16 + 1) = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke;
*(_QWORD *)&v16 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager;
v13 = v17;
minja::Value::callable(v17, (long long)&v15);
if ( (_QWORD)v16 )
((void ( *)(__int128 *, __int128 *, long long))v16)(&v15, &v15, 3LL);
if ( v28 )
v28(&v27, &v27, 3LL);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree((long long)v22);
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
std::vector<std::string>::~vector(v19);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree((long long)v29);
return v13;
}
|
simple_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x28],RCX
MOV R15,RDX
MOV R14,RSI
MOV qword ptr [RSP + 0x20],RDI
LEA RAX,[RSP + 0xc0]
MOV dword ptr [RAX],0x0
XOR ECX,ECX
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
MOV qword ptr [RAX + 0x20],RCX
MOV RBP,qword ptr [RDX + 0x8]
SUB RBP,qword ptr [RDX]
JZ 0x001d6cee
SAR RBP,0x5
CMP RBP,0x1
ADC RBP,0x0
XOR EBX,EBX
LEA R13,[RSP + 0xb8]
XOR R12D,R12D
LAB_001d6cd1:
MOV RSI,qword ptr [R15]
ADD RSI,RBX
LAB_001d6cd7:
MOV RDI,R13
CALL 0x001abb46
MOV qword ptr [RAX],R12
INC R12
ADD RBX,0x20
CMP RBP,R12
JNZ 0x001d6cd1
LAB_001d6cee:
LEA RDI,[RSP + 0x30]
MOV RSI,R15
CALL 0x001533c0
LEA RDI,[RSP + 0x48]
LEA R13,[RSP + 0x58]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_001d6d13:
CALL 0x001210f0
LEA R14,[RSP + 0x68]
LAB_001d6d1d:
LEA RSI,[RSP + 0xb8]
MOV RDI,R14
CALL 0x001abfa0
LEA R15,[RSP + 0x98]
LAB_001d6d35:
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001abbc2
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
LAB_001d6d4e:
MOV EDI,0x88
CALL 0x0011a870
LAB_001d6d58:
MOV R12,RAX
LEA RSI,[RSP + 0x30]
MOV RDI,RAX
CALL 0x001533c0
LEA RDI,[R12 + 0x18]
LEA RBP,[R12 + 0x28]
MOV qword ptr [R12 + 0x18],RBP
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RDX,RSI
LAB_001d6d84:
CALL 0x001210f0
LEA RAX,[R12 + 0x40]
MOV RCX,qword ptr [RSP + 0x78]
TEST RCX,RCX
JZ 0x001d6dd9
LEA RDX,[RSP + 0x70]
MOV ESI,dword ptr [RDX]
MOV dword ptr [R12 + 0x40],ESI
MOV qword ptr [R12 + 0x48],RCX
MOVUPS XMM0,xmmword ptr [RDX + 0x10]
MOVUPS xmmword ptr [R12 + 0x50],XMM0
MOV qword ptr [RCX + 0x8],RAX
LEA RAX,[RSP + 0x90]
MOV RCX,qword ptr [RAX]
MOV qword ptr [R12 + 0x60],RCX
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RDX
MOV qword ptr [RAX + -0x8],RDX
JMP 0x001d6dfa
LAB_001d6dd9:
MOV dword ptr [R12 + 0x40],0x0
MOV qword ptr [R12 + 0x48],0x0
MOV qword ptr [R12 + 0x50],RAX
MOV qword ptr [R12 + 0x58],RAX
LEA RAX,[R12 + 0x60]
LAB_001d6dfa:
MOV qword ptr [RAX],0x0
LEA RDI,[R12 + 0x68]
LAB_001d6e06:
MOV RSI,R15
CALL 0x001abbc2
MOV RSI,RSP
MOV qword ptr [RSI],R12
LEA RAX,[0x1d6ff0]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1d768c]
MOV qword ptr [RSI + 0x10],RAX
LAB_001d6e2a:
MOV RBX,qword ptr [RSP + 0x20]
MOV RDI,RBX
CALL 0x0019559c
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001d6e4e
LAB_001d6e41:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001d6e4e:
MOV RAX,qword ptr [RSP + 0xa8]
TEST RAX,RAX
JZ 0x001d6e68
LAB_001d6e5b:
MOV RDI,R15
MOV RSI,R15
MOV EDX,0x3
CALL RAX
LAB_001d6e68:
MOV RDI,R14
CALL 0x001ac202
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R13
JZ 0x001d6e87
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011a890
LAB_001d6e87:
LEA RDI,[RSP + 0x30]
CALL 0x00120c6a
LEA RDI,[RSP + 0xb8]
CALL 0x001ac202
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, std::function<minja::Value
(std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */
Value * __thiscall
minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3)
{
minja *pmVar1;
long *plVar2;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar3;
long lVar4;
long lVar5;
long lVar6;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_118;
int8 uStack_110;
code *local_108;
code *pcStack_100;
minja *local_f8;
function *local_f0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_e8 [24];
long *local_d0;
long local_c8;
long local_c0 [2];
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_b0 [8];
int4 local_a8 [2];
long local_a0;
int4 *local_98;
int4 *puStack_90;
int8 local_88;
function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_80 [16];
code *local_70;
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_60 [8];
int4 local_58 [2];
int8 local_50;
int4 *local_48;
int4 *local_40;
int8 local_38;
local_48 = local_58;
local_58[0] = 0;
local_50 = 0;
local_38 = 0;
local_f8 = this;
local_f0 = param_3;
local_40 = local_48;
if (*(long *)(param_2 + 8) - *(long *)param_2 != 0) {
lVar5 = *(long *)(param_2 + 8) - *(long *)param_2 >> 5;
lVar4 = 0;
lVar6 = 0;
do {
/* try { // try from 001d6cd7 to 001d6cde has its CatchHandler @ 001d6f89 */
plVar2 = (long *)std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::operator[](local_60,(string *)(*(long *)param_2 + lVar4));
*plVar2 = lVar6;
lVar6 = lVar6 + 1;
lVar4 = lVar4 + 0x20;
} while (lVar5 + (ulong)(lVar5 == 0) != lVar6);
}
/* try { // try from 001d6cee to 001d6cfa has its CatchHandler @ 001d6f87 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_e8,param_2);
local_d0 = local_c0;
/* try { // try from 001d6d13 to 001d6d17 has its CatchHandler @ 001d6f78 */
std::__cxx11::string::_M_construct<char*>
(&local_d0,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
/* try { // try from 001d6d1d to 001d6d2c has its CatchHandler @ 001d6f5c */
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::_Rb_tree(local_b0,(_Rb_tree *)local_60);
/* try { // try from 001d6d35 to 001d6d41 has its CatchHandler @ 001d6f4f */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
(local_80,local_f0);
local_108 = (code *)0x0;
pcStack_100 = (code *)0x0;
local_118 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0;
uStack_110 = 0;
/* try { // try from 001d6d4e to 001d6d57 has its CatchHandler @ 001d6f21 */
this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88);
/* try { // try from 001d6d58 to 001d6d67 has its CatchHandler @ 001d6f0f */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
(this_00,(vector *)local_e8);
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x18) =
this_00 + 0x28;
/* try { // try from 001d6d84 to 001d6d88 has its CatchHandler @ 001d6f02 */
std::__cxx11::string::_M_construct<char*>(this_00 + 0x18,local_d0,local_c8 + (long)local_d0);
pvVar3 = this_00 + 0x40;
if (local_a0 == 0) {
*(int4 *)(this_00 + 0x40) = 0;
*(int8 *)(this_00 + 0x48) = 0;
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x50) = pvVar3
;
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x58) = pvVar3
;
pvVar3 = this_00 + 0x60;
}
else {
*(int4 *)(this_00 + 0x40) = local_a8[0];
*(long *)(this_00 + 0x48) = local_a0;
*(int4 **)(this_00 + 0x50) = local_98;
*(int4 **)(this_00 + 0x58) = puStack_90;
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(local_a0 + 8) = pvVar3;
pvVar3 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88;
*(int8 *)(this_00 + 0x60) = local_88;
local_a0 = 0;
local_98 = local_a8;
puStack_90 = local_a8;
}
*(int8 *)pvVar3 = 0;
/* try { // try from 001d6e06 to 001d6e0d has its CatchHandler @ 001d6edb */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *)
(this_00 + 0x68),local_80);
pmVar1 = local_f8;
pcStack_100 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_invoke;
local_108 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_manager;
local_118 = this_00;
/* try { // try from 001d6e2a to 001d6e36 has its CatchHandler @ 001d6ebd */
Value::callable((Value *)local_f8,(function *)&local_118);
if (local_108 != (code *)0x0) {
/* try { // try from 001d6e41 to 001d6e4d has its CatchHandler @ 001d6eb8 */
(*local_108)(&local_118,&local_118,3);
}
if (local_70 != (code *)0x0) {
/* try { // try from 001d6e5b to 001d6e67 has its CatchHandler @ 001d6eb3 */
(*local_70)(local_80,local_80,3);
}
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~_Rb_tree(local_b0);
if (local_d0 != local_c0) {
operator_delete(local_d0,local_c0[0] + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_e8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
*)local_60);
return (Value *)pmVar1;
}
|
|
65,179 |
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
|
monkey531[P]llama/common/minja.hpp
|
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) {
std::map<std::string, size_t> named_positions;
for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i;
return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value {
auto args_obj = Value::object();
std::vector<bool> provided_args(params.size());
for (size_t i = 0, n = args.args.size(); i < n; i++) {
auto & arg = args.args[i];
if (i < params.size()) {
args_obj.set(params[i], arg);
provided_args[i] = true;
} else {
throw std::runtime_error("Too many positional params for " + fn_name);
}
}
for (auto & [name, value] : args.kwargs) {
auto named_pos_it = named_positions.find(name);
if (named_pos_it == named_positions.end()) {
throw std::runtime_error("Unknown argument " + name + " for function " + fn_name);
}
provided_args[named_pos_it->second] = true;
args_obj.set(name, value);
}
return fn(context, args_obj);
});
}
|
O2
|
cpp
|
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, %r12
leaq 0x38(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq %rdi, (%rsp)
movq 0x8(%rdx), %rbp
subq (%rdx), %rbp
sarq $0x5, %rbp
xorl %ebx, %ebx
leaq 0x30(%rsp), %r13
xorl %r14d, %r14d
cmpq %r14, %rbp
je 0x9e45a
movq (%r15), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq 0x7e458
movq %r14, (%rax)
incq %r14
addq $0x20, %rbx
jmp 0x9e43b
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x3904e
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x23ba0
leaq 0x98(%rsp), %r13
leaq 0x30(%rsp), %rsi
movq %r13, %rdi
callq 0x7e8a2
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0x7e4be
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movl $0x88, %edi
callq 0x23880
movq %rax, %r14
leaq 0x60(%rsp), %rsi
movq %rax, %rdi
callq 0x3904e
leaq 0x18(%r14), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x23ba0
leaq 0x40(%r14), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x3ba16
leaq 0x68(%r14), %rdi
movq %r12, %rsi
callq 0x7e4be
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x109(%rip), %rax # 0x9e60c
movq %rax, 0x18(%rsi)
leaq 0x42c(%rip), %rax # 0x9e93a
movq %rax, 0x10(%rsi)
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x6ed58
leaq 0x10(%rsp), %rdi
callq 0x47048
leaq 0x60(%rsp), %rdi
callq 0x9e5e4
leaq 0x30(%rsp), %rdi
callq 0x7eae8
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9e58b
movq %rax, %rbx
movq %r14, %rdi
addq $0x38, %rdi
callq 0x7eae8
movq %r13, %rdi
callq 0x24158
jmp 0x9e56f
movq %rax, %rbx
movq %r14, %rdi
callq 0x26bfa
jmp 0x9e57c
movq %rax, %rbx
movl $0x88, %esi
movq %r14, %rdi
callq 0x238a0
jmp 0x9e58e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x47048
leaq 0x60(%rsp), %rdi
callq 0x9e5e4
jmp 0x9e5d2
movq %rax, %rbx
movq %r13, %rdi
callq 0x7eae8
jmp 0x9e5b4
movq %rax, %rbx
movq %r15, %rdi
callq 0x24158
jmp 0x9e5c1
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x26bfa
jmp 0x9e5d2
jmp 0x9e5cf
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x7eae8
movq %rbx, %rdi
callq 0x23f10
|
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_110], rcx
mov r15, rdx
mov r12, rsi
lea rax, [rsp+118h+var_E0]
and dword ptr [rax], 0
and qword ptr [rax+8], 0
mov [rax+10h], rax
mov [rax+18h], rax
and qword ptr [rax+20h], 0
mov [rsp+118h+var_118], rdi
mov rbp, [rdx+8]
sub rbp, [rdx]
sar rbp, 5
xor ebx, ebx
lea r13, [rsp+118h+var_E8]
xor r14d, r14d
loc_9E43B:
cmp rbp, r14
jz short loc_9E45A
mov rsi, [r15]
add rsi, rbx
mov rdi, r13
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&)
mov [rax], r14
inc r14
add rbx, 20h ; ' '
jmp short loc_9E43B
loc_9E45A:
lea rdi, [rsp+118h+var_B8]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea r15, [rsp+118h+var_A0]
mov rdi, r15
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea r13, [rsp+118h+var_80]
lea rsi, [rsp+118h+var_E8]
mov rdi, r13
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&)
lea r12, [rsp+118h+var_50]
mov rdi, r12
mov rsi, [rsp+118h+var_110]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
xorps xmm0, xmm0
movaps [rsp+118h+var_F8], xmm0
movaps [rsp+118h+var_108], xmm0
mov edi, 88h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea rsi, [rsp+118h+var_B8]
mov rdi, rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea r13, [r14+18h]
mov rdi, r13
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea rdi, [r14+40h]
lea rsi, [rsp+118h+var_78]
call _ZNSt15_Rb_tree_headerC2EOS_; std::_Rb_tree_header::_Rb_tree_header(std::_Rb_tree_header&&)
lea rdi, [r14+68h]
mov rsi, r12
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
lea rsi, [rsp+118h+var_108]
mov [rsi], r14
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8__0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation_0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
mov rbx, [rsp+118h+var_118]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
lea rdi, [rsp+118h+var_108]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+118h+var_B8]
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0()
lea rdi, [rsp+118h+var_E8]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_9E58B
mov rbx, rax
mov rdi, r14
add rdi, 38h ; '8'
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9E56F
mov rbx, rax
loc_9E56F:
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_9E57C
mov rbx, rax
loc_9E57C:
mov esi, 88h; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9E58E
loc_9E58B:
mov rbx, rax
loc_9E58E:
lea rdi, [rsp+arg_8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+arg_58]
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0()
jmp short loc_9E5D2
mov rbx, rax
mov rdi, r13
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
jmp short loc_9E5B4
mov rbx, rax
loc_9E5B4:
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9E5C1
mov rbx, rax
loc_9E5C1:
lea rdi, [rsp+arg_58]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_9E5D2
jmp short $+2
loc_9E5CF:
mov rbx, rax
loc_9E5D2:
lea rdi, [rsp+arg_28]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
|
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long v5; // rbp
long long v6; // rbx
long long i; // r14
long long v8; // r14
__int128 v11; // [rsp+10h] [rbp-108h] BYREF
long long ( *v12)(); // [rsp+20h] [rbp-F8h]
long long ( *v13)(); // [rsp+28h] [rbp-F0h]
_BYTE v14[8]; // [rsp+30h] [rbp-E8h] BYREF
int v15; // [rsp+38h] [rbp-E0h] BYREF
long long v16; // [rsp+40h] [rbp-D8h]
int *v17; // [rsp+48h] [rbp-D0h]
int *v18; // [rsp+50h] [rbp-C8h]
long long v19; // [rsp+58h] [rbp-C0h]
_QWORD v20[3]; // [rsp+60h] [rbp-B8h] BYREF
_BYTE v21[32]; // [rsp+78h] [rbp-A0h] BYREF
_BYTE v22[8]; // [rsp+98h] [rbp-80h] BYREF
_BYTE v23[40]; // [rsp+A0h] [rbp-78h] BYREF
_OWORD v24[5]; // [rsp+C8h] [rbp-50h] BYREF
v15 = 0;
v16 = 0LL;
v17 = &v15;
v18 = &v15;
v19 = 0LL;
v5 = (long long)(a3[1] - *a3) >> 5;
v6 = 0LL;
for ( i = 0LL; v5 != i; ++i )
{
*(_QWORD *)std::map<std::string,unsigned long>::operator[]((long long)v14, v6 + *a3) = i;
v6 += 32LL;
}
std::vector<std::string>::vector(v20, a3);
std::string::basic_string(v21, a2);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree(
(long long)v22,
(long long)v14);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v24, a4);
v11 = 0LL;
v8 = operator new(0x88uLL);
std::vector<std::string>::vector((_QWORD *)v8, v20);
std::string::basic_string(v8 + 24, v21);
std::_Rb_tree_header::_Rb_tree_header(v8 + 64, (long long)v23);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(
(_OWORD *)(v8 + 104),
(long long)v24);
*(_QWORD *)&v11 = v8;
v13 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke;
v12 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager;
minja::Value::callable(a1);
std::_Function_base::~_Function_base((std::_Function_base *)&v11);
minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v20);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree((long long)v14);
return a1;
}
|
simple_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x8],RCX
MOV R15,RDX
MOV R12,RSI
LEA RAX,[RSP + 0x38]
AND dword ptr [RAX],0x0
AND qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
AND qword ptr [RAX + 0x20],0x0
MOV qword ptr [RSP],RDI
MOV RBP,qword ptr [RDX + 0x8]
SUB RBP,qword ptr [RDX]
SAR RBP,0x5
XOR EBX,EBX
LEA R13,[RSP + 0x30]
XOR R14D,R14D
LAB_0019e43b:
CMP RBP,R14
JZ 0x0019e45a
MOV RSI,qword ptr [R15]
ADD RSI,RBX
LAB_0019e446:
MOV RDI,R13
CALL 0x0017e458
MOV qword ptr [RAX],R14
INC R14
ADD RBX,0x20
JMP 0x0019e43b
LAB_0019e45a:
LEA RDI,[RSP + 0x60]
MOV RSI,R15
CALL 0x0013904e
LEA R15,[RSP + 0x78]
LAB_0019e46c:
MOV RDI,R15
MOV RSI,R12
CALL 0x00123ba0
LEA R13,[RSP + 0x98]
LAB_0019e47f:
LEA RSI,[RSP + 0x30]
MOV RDI,R13
CALL 0x0017e8a2
LEA R12,[RSP + 0xc8]
LAB_0019e494:
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0017e4be
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LAB_0019e4ae:
MOV EDI,0x88
CALL 0x00123880
LAB_0019e4b8:
MOV R14,RAX
LEA RSI,[RSP + 0x60]
MOV RDI,RAX
CALL 0x0013904e
LEA R13,[R14 + 0x18]
LAB_0019e4cc:
MOV RDI,R13
MOV RSI,R15
CALL 0x00123ba0
LEA RDI,[R14 + 0x40]
LEA RSI,[RSP + 0xa0]
CALL 0x0013ba16
LEA RDI,[R14 + 0x68]
LAB_0019e4ec:
MOV RSI,R12
CALL 0x0017e4be
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],R14
LEA RAX,[0x19e60c]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x19e93a]
MOV qword ptr [RSI + 0x10],RAX
LAB_0019e512:
MOV RBX,qword ptr [RSP]
MOV RDI,RBX
CALL 0x0016ed58
LAB_0019e51e:
LEA RDI,[RSP + 0x10]
CALL 0x00147048
LEA RDI,[RSP + 0x60]
CALL 0x0019e5e4
LEA RDI,[RSP + 0x30]
CALL 0x0017eae8
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, std::function<minja::Value
(std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */
minja * __thiscall
minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3)
{
long lVar1;
long lVar2;
long *plVar3;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00;
long lVar4;
long lVar5;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_108;
int8 uStack_100;
code *local_f8;
code *pcStack_f0;
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_e8 [8];
int4 local_e0 [2];
int8 local_d8;
int4 *local_d0;
int4 *local_c8;
int8 local_c0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_b8 [24];
string local_a0 [32];
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_80 [8];
_Rb_tree_header local_78 [40];
function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_50 [32];
local_d0 = local_e0;
local_e0[0] = 0;
local_d8 = 0;
local_c0 = 0;
lVar1 = *(long *)(param_2 + 8);
lVar2 = *(long *)param_2;
lVar4 = 0;
local_c8 = local_d0;
for (lVar5 = 0; lVar1 - lVar2 >> 5 != lVar5; lVar5 = lVar5 + 1) {
/* try { // try from 0019e446 to 0019e44d has its CatchHandler @ 0019e5cf */
plVar3 = (long *)std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::operator[](local_e8,(string *)(*(long *)param_2 + lVar4));
*plVar3 = lVar5;
lVar4 = lVar4 + 0x20;
}
/* try { // try from 0019e45a to 0019e466 has its CatchHandler @ 0019e5cd */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_b8,param_2);
/* try { // try from 0019e46c to 0019e476 has its CatchHandler @ 0019e5be */
std::__cxx11::string::string(local_a0,param_1);
/* try { // try from 0019e47f to 0019e48b has its CatchHandler @ 0019e5b1 */
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::_Rb_tree(local_80,(_Rb_tree *)local_e8);
/* try { // try from 0019e494 to 0019e4a0 has its CatchHandler @ 0019e5a4 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
(local_50,param_3);
local_f8 = (code *)0x0;
pcStack_f0 = (code *)0x0;
local_108 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0;
uStack_100 = 0;
/* try { // try from 0019e4ae to 0019e4b7 has its CatchHandler @ 0019e58b */
this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88);
/* try { // try from 0019e4b8 to 0019e4c7 has its CatchHandler @ 0019e579 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
(this_00,(vector *)local_b8);
/* try { // try from 0019e4cc to 0019e4d6 has its CatchHandler @ 0019e56c */
std::__cxx11::string::string((string *)(this_00 + 0x18),local_a0);
std::_Rb_tree_header::_Rb_tree_header((_Rb_tree_header *)(this_00 + 0x40),local_78);
/* try { // try from 0019e4ec to 0019e4f3 has its CatchHandler @ 0019e553 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *)
(this_00 + 0x68),local_50);
pcStack_f0 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_invoke;
local_f8 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_manager;
local_108 = this_00;
/* try { // try from 0019e512 to 0019e51d has its CatchHandler @ 0019e551 */
Value::callable(this);
std::_Function_base::~_Function_base((_Function_base *)&local_108);
simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)
::$_0::~__0((__0 *)local_b8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
*)local_e8);
return this;
}
|
|
65,180 |
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
|
monkey531[P]llama/common/minja.hpp
|
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) {
std::map<std::string, size_t> named_positions;
for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i;
return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value {
auto args_obj = Value::object();
std::vector<bool> provided_args(params.size());
for (size_t i = 0, n = args.args.size(); i < n; i++) {
auto & arg = args.args[i];
if (i < params.size()) {
args_obj.set(params[i], arg);
provided_args[i] = true;
} else {
throw std::runtime_error("Too many positional params for " + fn_name);
}
}
for (auto & [name, value] : args.kwargs) {
auto named_pos_it = named_positions.find(name);
if (named_pos_it == named_positions.end()) {
throw std::runtime_error("Unknown argument " + name + " for function " + fn_name);
}
provided_args[named_pos_it->second] = true;
args_obj.set(name, value);
}
return fn(context, args_obj);
});
}
|
O3
|
cpp
|
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0x28(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
leaq 0xc0(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x8(%rdx), %rbp
subq (%rdx), %rbp
je 0xd5927
sarq $0x5, %rbp
cmpq $0x1, %rbp
adcq $0x0, %rbp
xorl %ebx, %ebx
leaq 0xb8(%rsp), %r13
xorl %r12d, %r12d
movq (%r15), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq 0xab2ee
movq %r12, (%rax)
incq %r12
addq $0x20, %rbx
cmpq %r12, %rbp
jne 0xd590a
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x53db0
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x210fc
leaq 0x68(%rsp), %r14
leaq 0xb8(%rsp), %rsi
movq %r14, %rdi
callq 0xab748
leaq 0x98(%rsp), %r15
movq %r15, %rdi
movq 0x28(%rsp), %rsi
callq 0xab36a
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x88, %edi
callq 0x1a870
movq %rax, %r12
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x53db0
leaq 0x18(%r12), %rdi
leaq 0x28(%r12), %rbp
movq %rbp, 0x18(%r12)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
callq 0x210fc
leaq 0x40(%r12), %rax
movq 0x78(%rsp), %rdx
testq %rdx, %rdx
je 0xd5a0e
leaq 0x70(%rsp), %rdi
movl (%rdi), %ecx
movq %rdx, 0x48(%r12)
movq 0x10(%rdi), %r8
movq 0x18(%rdi), %rsi
movq %rax, 0x8(%rdx)
leaq 0x90(%rsp), %rdx
movq (%rdx), %rax
movq %rax, 0x60(%r12)
movq $0x0, -0x18(%rdx)
movq %rdi, -0x10(%rdx)
movq %rdi, -0x8(%rdx)
movq %r8, %rax
jmp 0xd5a21
movq $0x0, 0x48(%r12)
leaq 0x60(%r12), %rdx
xorl %ecx, %ecx
movq %rax, %rsi
movq %rax, 0x50(%r12)
movq %rsi, 0x58(%r12)
movq $0x0, (%rdx)
movl %ecx, 0x40(%r12)
leaq 0x68(%r12), %rdi
movq %r15, %rsi
callq 0xab36a
movq %rsp, %rsi
movq %r12, (%rsi)
leaq 0x1c9(%rip), %rax # 0xd5c1a
movq %rax, 0x18(%rsi)
leaq 0x84c(%rip), %rax # 0xd62a8
movq %rax, 0x10(%rsi)
movq 0x20(%rsp), %rdi
callq 0x94f08
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd5a81
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xa8(%rsp), %rax
testq %rax, %rax
je 0xd5a9b
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0xab9aa
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0xd5aba
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x30(%rsp), %rdi
callq 0x20c70
leaq 0xb8(%rsp), %rdi
callq 0xab9aa
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd5b62
jmp 0xd5b62
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd5b6d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xd5b6d
jmp 0xd5b62
movq %rax, %rbx
movq %r12, %rdi
addq $0x38, %rdi
callq 0xab9aa
movq 0x18(%r12), %rdi
cmpq %rbp, %rdi
je 0xd5b2f
movq (%rbp), %rsi
incq %rsi
callq 0x1a890
jmp 0xd5b2f
movq %rax, %rbx
movq %r12, %rdi
callq 0x20c70
jmp 0xd5b3c
movq %rax, %rbx
movl $0x88, %esi
movq %r12, %rdi
callq 0x1a890
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd5b6d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xd5b6d
movq %rax, %rdi
callq 0x20769
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xd5bcc
jmp 0xd5bb6
movq %rax, %rbx
movq %r14, %rdi
callq 0xab9aa
jmp 0xd5b89
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0xd5ba5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xd5ba5
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20c70
jmp 0xd5bb6
jmp 0xd5bb3
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0xab9aa
movq %rbx, %rdi
callq 0x1af20
nop
|
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_F0], rcx
mov r15, rdx
mov r14, rsi
mov [rsp+118h+var_F8], rdi
lea rax, [rsp+118h+var_58]
mov dword ptr [rax], 0
xor ecx, ecx
mov [rax+8], rcx
mov [rax+10h], rax
mov [rax+18h], rax
mov [rax+20h], rcx
mov rbp, [rdx+8]
sub rbp, [rdx]
jz short loc_D5927
sar rbp, 5
cmp rbp, 1
adc rbp, 0
xor ebx, ebx
lea r13, [rsp+118h+var_60]
xor r12d, r12d
loc_D590A:
mov rsi, [r15]
add rsi, rbx
mov rdi, r13
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&)
mov [rax], r12
inc r12
add rbx, 20h ; ' '
cmp rbp, r12
jnz short loc_D590A
loc_D5927:
lea rdi, [rsp+118h+var_E8]
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea rdi, [rsp+118h+var_D0]
lea r13, [rsp+118h+var_C0]
mov [r13-10h], r13
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea r14, [rsp+118h+var_B0]
lea rsi, [rsp+118h+var_60]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&)
lea r15, [rsp+118h+var_80]
mov rdi, r15
mov rsi, [rsp+118h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
xorps xmm0, xmm0
movaps [rsp+118h+var_108], xmm0
movaps [rsp+118h+var_118], xmm0
mov edi, 88h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rsi, [rsp+118h+var_E8]
mov rdi, rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
lea rdi, [r12+18h]
lea rbp, [r12+28h]
mov [r12+18h], rbp
mov rsi, [rsp+118h+var_D0]
mov rdx, [rsp+118h+var_C8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rax, [r12+40h]
mov rdx, [rsp+118h+var_A0]
test rdx, rdx
jz short loc_D5A0E
lea rdi, [rsp+118h+var_A8]
mov ecx, [rdi]
mov [r12+48h], rdx
mov r8, [rdi+10h]
mov rsi, [rdi+18h]
mov [rdx+8], rax
lea rdx, [rsp+118h+var_88]
mov rax, [rdx]
mov [r12+60h], rax
mov qword ptr [rdx-18h], 0
mov [rdx-10h], rdi
mov [rdx-8], rdi
mov rax, r8
jmp short loc_D5A21
loc_D5A0E:
mov qword ptr [r12+48h], 0
lea rdx, [r12+60h]
xor ecx, ecx
mov rsi, rax
loc_D5A21:
mov [r12+50h], rax
mov [r12+58h], rsi
mov qword ptr [rdx], 0
mov [r12+40h], ecx
lea rdi, [r12+68h]
mov rsi, r15
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)
mov rsi, rsp
mov [rsi], r12
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8__0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation_0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
mov rdi, [rsp+118h+var_F8]
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_D5A81
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_D5A81:
mov rax, [rsp+118h+var_70]
test rax, rax
jz short loc_D5A9B
mov rdi, r15
mov rsi, r15
mov edx, 3
call rax
loc_D5A9B:
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, [rsp+118h+var_D0]; void *
cmp rdi, r13
jz short loc_D5ABA
mov rsi, [rsp+118h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D5ABA:
lea rdi, [rsp+118h+var_E8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+118h+var_60]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_D5B62
jmp short loc_D5B62
mov rbx, rax
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_D5B6D
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_D5B6D
jmp short loc_D5B62
mov rbx, rax
mov rdi, r12
add rdi, 38h ; '8'
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, [r12+18h]; void *
cmp rdi, rbp
jz short loc_D5B2F
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D5B2F
mov rbx, rax
loc_D5B2F:
mov rdi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_D5B3C
mov rbx, rax
loc_D5B3C:
mov esi, 88h; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rax, qword ptr [rsp+118h+var_108]
test rax, rax
jz short loc_D5B6D
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_D5B6D
loc_D5B62:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_D5B6D:
lea rdi, [rsp+118h+var_E8]
call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0()
jmp short loc_D5BB6
mov rbx, rax
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
jmp short loc_D5B89
mov rbx, rax
loc_D5B89:
mov rdi, [rsp+118h+var_D0]; void *
cmp rdi, r13
jz short loc_D5BA5
mov rsi, [rsp+118h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D5BA5
mov rbx, rax
loc_D5BA5:
lea rdi, [rsp+118h+var_E8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_D5BB6
jmp short $+2
loc_D5BB3:
mov rbx, rax
loc_D5BB6:
lea rdi, [rsp+118h+var_60]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
|
void minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long v5; // rbp
long long v6; // rbp
long long v7; // rbx
long long v8; // r12
long long v9; // r12
long long v10; // rax
long long v11; // rdx
int v12; // ecx
int *v13; // r8
int *v14; // rsi
long long *v15; // rdx
__int128 v16; // [rsp+0h] [rbp-118h] BYREF
__int128 v17; // [rsp+10h] [rbp-108h]
long long v18; // [rsp+20h] [rbp-F8h]
long long v19; // [rsp+28h] [rbp-F0h]
_QWORD v20[3]; // [rsp+30h] [rbp-E8h] BYREF
void *v21[2]; // [rsp+48h] [rbp-D0h] BYREF
_QWORD v22[2]; // [rsp+58h] [rbp-C0h] BYREF
_BYTE v23[8]; // [rsp+68h] [rbp-B0h] BYREF
int v24; // [rsp+70h] [rbp-A8h] BYREF
long long v25; // [rsp+78h] [rbp-A0h]
int *v26; // [rsp+80h] [rbp-98h]
int *v27; // [rsp+88h] [rbp-90h]
long long v28; // [rsp+90h] [rbp-88h] BYREF
__int128 v29; // [rsp+98h] [rbp-80h] BYREF
void ( *v30)(__int128 *, __int128 *, long long); // [rsp+A8h] [rbp-70h]
_BYTE v31[8]; // [rsp+B8h] [rbp-60h] BYREF
int v32; // [rsp+C0h] [rbp-58h] BYREF
long long v33; // [rsp+C8h] [rbp-50h]
int *v34; // [rsp+D0h] [rbp-48h]
int *v35; // [rsp+D8h] [rbp-40h]
long long v36; // [rsp+E0h] [rbp-38h]
v19 = a4;
v18 = a1;
v32 = 0;
v33 = 0LL;
v34 = &v32;
v35 = &v32;
v36 = 0LL;
v5 = a3[1] - *a3;
if ( v5 )
{
v6 = (v5 >> 5 == 0) + (v5 >> 5);
v7 = 0LL;
v8 = 0LL;
do
{
*(_QWORD *)std::map<std::string,unsigned long>::operator[]((long long)v31, v7 + *a3) = v8++;
v7 += 32LL;
}
while ( v6 != v8 );
}
std::vector<std::string>::vector((long long)v20, a3);
v21[0] = v22;
std::string::_M_construct<char *>((long long)v21, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree(
(long long)v23,
(long long)v31);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(&v29, v19);
v17 = 0LL;
v16 = 0LL;
v9 = operator new(0x88uLL);
std::vector<std::string>::vector(v9, v20);
*(_QWORD *)(v9 + 24) = v9 + 40;
std::string::_M_construct<char *>(v9 + 24, (_BYTE *)v21[0], (long long)v21[0] + (unsigned long long)v21[1]);
v10 = v9 + 64;
v11 = v25;
if ( v25 )
{
v12 = v24;
*(_QWORD *)(v9 + 72) = v25;
v13 = v26;
v14 = v27;
*(_QWORD *)(v11 + 8) = v10;
v15 = &v28;
*(_QWORD *)(v9 + 96) = v28;
v25 = 0LL;
v26 = &v24;
v27 = &v24;
v10 = (long long)v13;
}
else
{
*(_QWORD *)(v9 + 72) = 0LL;
v15 = (long long *)(v9 + 96);
v12 = 0;
v14 = (int *)(v9 + 64);
}
*(_QWORD *)(v9 + 80) = v10;
*(_QWORD *)(v9 + 88) = v14;
*v15 = 0LL;
*(_DWORD *)(v9 + 64) = v12;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(
(_OWORD *)(v9 + 104),
(long long)&v29);
*(_QWORD *)&v16 = v9;
*((_QWORD *)&v17 + 1) = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke;
*(_QWORD *)&v17 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager;
minja::Value::callable(v18, (long long)&v16);
if ( (_QWORD)v17 )
((void ( *)(__int128 *, __int128 *, long long))v17)(&v16, &v16, 3LL);
if ( v30 )
v30(&v29, &v29, 3LL);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree((long long)v23);
if ( v21[0] != v22 )
operator delete(v21[0], v22[0] + 1LL);
std::vector<std::string>::~vector((long long)v20);
std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree((long long)v31);
}
|
simple_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x28],RCX
MOV R15,RDX
MOV R14,RSI
MOV qword ptr [RSP + 0x20],RDI
LEA RAX,[RSP + 0xc0]
MOV dword ptr [RAX],0x0
XOR ECX,ECX
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
MOV qword ptr [RAX + 0x20],RCX
MOV RBP,qword ptr [RDX + 0x8]
SUB RBP,qword ptr [RDX]
JZ 0x001d5927
SAR RBP,0x5
CMP RBP,0x1
ADC RBP,0x0
XOR EBX,EBX
LEA R13,[RSP + 0xb8]
XOR R12D,R12D
LAB_001d590a:
MOV RSI,qword ptr [R15]
ADD RSI,RBX
LAB_001d5910:
MOV RDI,R13
CALL 0x001ab2ee
MOV qword ptr [RAX],R12
INC R12
ADD RBX,0x20
CMP RBP,R12
JNZ 0x001d590a
LAB_001d5927:
LEA RDI,[RSP + 0x30]
MOV RSI,R15
CALL 0x00153db0
LEA RDI,[RSP + 0x48]
LEA R13,[RSP + 0x58]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_001d594c:
CALL 0x001210fc
LEA R14,[RSP + 0x68]
LAB_001d5956:
LEA RSI,[RSP + 0xb8]
MOV RDI,R14
CALL 0x001ab748
LEA R15,[RSP + 0x98]
LAB_001d596e:
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001ab36a
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
LAB_001d5987:
MOV EDI,0x88
CALL 0x0011a870
LAB_001d5991:
MOV R12,RAX
LEA RSI,[RSP + 0x30]
MOV RDI,RAX
CALL 0x00153db0
LEA RDI,[R12 + 0x18]
LEA RBP,[R12 + 0x28]
MOV qword ptr [R12 + 0x18],RBP
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RDX,RSI
LAB_001d59bd:
CALL 0x001210fc
LEA RAX,[R12 + 0x40]
MOV RDX,qword ptr [RSP + 0x78]
TEST RDX,RDX
JZ 0x001d5a0e
LEA RDI,[RSP + 0x70]
MOV ECX,dword ptr [RDI]
MOV qword ptr [R12 + 0x48],RDX
MOV R8,qword ptr [RDI + 0x10]
MOV RSI,qword ptr [RDI + 0x18]
MOV qword ptr [RDX + 0x8],RAX
LEA RDX,[RSP + 0x90]
MOV RAX,qword ptr [RDX]
MOV qword ptr [R12 + 0x60],RAX
MOV qword ptr [RDX + -0x18],0x0
MOV qword ptr [RDX + -0x10],RDI
MOV qword ptr [RDX + -0x8],RDI
MOV RAX,R8
JMP 0x001d5a21
LAB_001d5a0e:
MOV qword ptr [R12 + 0x48],0x0
LEA RDX,[R12 + 0x60]
XOR ECX,ECX
MOV RSI,RAX
LAB_001d5a21:
MOV qword ptr [R12 + 0x50],RAX
MOV qword ptr [R12 + 0x58],RSI
MOV qword ptr [RDX],0x0
MOV dword ptr [R12 + 0x40],ECX
LEA RDI,[R12 + 0x68]
LAB_001d5a3c:
MOV RSI,R15
CALL 0x001ab36a
MOV RSI,RSP
MOV qword ptr [RSI],R12
LEA RAX,[0x1d5c1a]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1d62a8]
MOV qword ptr [RSI + 0x10],RAX
LAB_001d5a60:
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00194f08
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001d5a81
LAB_001d5a74:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001d5a81:
MOV RAX,qword ptr [RSP + 0xa8]
TEST RAX,RAX
JZ 0x001d5a9b
LAB_001d5a8e:
MOV RDI,R15
MOV RSI,R15
MOV EDX,0x3
CALL RAX
LAB_001d5a9b:
MOV RDI,R14
CALL 0x001ab9aa
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R13
JZ 0x001d5aba
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011a890
LAB_001d5aba:
LEA RDI,[RSP + 0x30]
CALL 0x00120c70
LEA RDI,[RSP + 0xb8]
CALL 0x001ab9aa
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, std::function<minja::Value
(std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */
void __thiscall
minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3)
{
long *plVar1;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar2;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar3;
long lVar4;
long lVar5;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar6;
long lVar7;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_118;
int8 uStack_110;
code *local_108;
code *pcStack_100;
minja *local_f8;
function *local_f0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_e8 [24];
long *local_d0;
long local_c8;
long local_c0 [2];
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_b0 [8];
int4 local_a8 [2];
long local_a0;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_98;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_90;
int8 local_88;
function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_80 [16];
code *local_70;
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
local_60 [8];
int4 local_58 [2];
int8 local_50;
int4 *local_48;
int4 *local_40;
int8 local_38;
local_48 = local_58;
local_58[0] = 0;
local_50 = 0;
local_38 = 0;
local_f8 = this;
local_f0 = param_3;
local_40 = local_48;
if (*(long *)(param_2 + 8) - *(long *)param_2 != 0) {
lVar5 = *(long *)(param_2 + 8) - *(long *)param_2 >> 5;
lVar4 = 0;
lVar7 = 0;
do {
/* try { // try from 001d5910 to 001d5917 has its CatchHandler @ 001d5bb3 */
plVar1 = (long *)std::
map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::operator[](local_60,(string *)(*(long *)param_2 + lVar4));
*plVar1 = lVar7;
lVar7 = lVar7 + 1;
lVar4 = lVar4 + 0x20;
} while (lVar5 + (ulong)(lVar5 == 0) != lVar7);
}
/* try { // try from 001d5927 to 001d5933 has its CatchHandler @ 001d5bb1 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_e8,param_2);
local_d0 = local_c0;
/* try { // try from 001d594c to 001d5950 has its CatchHandler @ 001d5ba2 */
std::__cxx11::string::_M_construct<char*>
(&local_d0,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
/* try { // try from 001d5956 to 001d5965 has its CatchHandler @ 001d5b86 */
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::_Rb_tree(local_b0,(_Rb_tree *)local_60);
/* try { // try from 001d596e to 001d597a has its CatchHandler @ 001d5b79 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
(local_80,local_f0);
local_108 = (code *)0x0;
pcStack_100 = (code *)0x0;
local_118 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0;
uStack_110 = 0;
/* try { // try from 001d5987 to 001d5990 has its CatchHandler @ 001d5b6a */
this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88);
/* try { // try from 001d5991 to 001d59a0 has its CatchHandler @ 001d5b39 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
(this_00,(vector *)local_e8);
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x18) =
this_00 + 0x28;
/* try { // try from 001d59bd to 001d59c1 has its CatchHandler @ 001d5b2c */
std::__cxx11::string::_M_construct<char*>(this_00 + 0x18,local_d0,local_c8 + (long)local_d0);
pvVar2 = this_00 + 0x40;
if (local_a0 == 0) {
*(int8 *)(this_00 + 0x48) = 0;
pvVar3 = this_00 + 0x60;
local_a8[0] = 0;
pvVar6 = pvVar2;
}
else {
*(long *)(this_00 + 0x48) = local_a0;
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(local_a0 + 8) = pvVar2;
pvVar3 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88;
*(int8 *)(this_00 + 0x60) = local_88;
local_a0 = 0;
pvVar2 = local_98;
pvVar6 = local_90;
local_98 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8;
local_90 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8;
}
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x50) = pvVar2;
*(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x58) = pvVar6;
*(int8 *)pvVar3 = 0;
*(int4 *)(this_00 + 0x40) = local_a8[0];
/* try { // try from 001d5a3c to 001d5a43 has its CatchHandler @ 001d5b05 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function
((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *)
(this_00 + 0x68),local_80);
pcStack_100 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_invoke;
local_108 = std::
_Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0>
::_M_manager;
local_118 = this_00;
/* try { // try from 001d5a60 to 001d5a69 has its CatchHandler @ 001d5ae7 */
Value::callable((Value *)local_f8,(function *)&local_118);
if (local_108 != (code *)0x0) {
/* try { // try from 001d5a74 to 001d5a80 has its CatchHandler @ 001d5ae5 */
(*local_108)(&local_118,&local_118,3);
}
if (local_70 != (code *)0x0) {
/* try { // try from 001d5a8e to 001d5a9a has its CatchHandler @ 001d5ae3 */
(*local_70)(local_80,local_80,3);
}
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~_Rb_tree(local_b0);
if (local_d0 != local_c0) {
operator_delete(local_d0,local_c0[0] + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_e8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>>
*)local_60);
return;
}
|
|
65,181 |
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
// https://jinja.palletsprojects.com/en/3.0.x/templates/#for
if (!iterable) throw std::runtime_error("ForNode.iterable is null");
if (!body) throw std::runtime_error("ForNode.body is null");
auto iterable_value = iterable->evaluate(context);
Value::CallableType loop_function;
std::function<void(Value&)> visit = [&](Value& iter) {
auto filtered_items = Value::array();
if (!iter.is_null()) {
if (!iterable_value.is_iterable()) {
throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump());
}
iterable_value.for_each([&](Value & item) {
destructuring_assign(var_names, context, item);
if (!condition || condition->evaluate(context).to_bool()) {
filtered_items.push_back(item);
}
});
}
if (filtered_items.empty()) {
if (else_body) {
else_body->render(out, context);
}
} else {
auto loop = recursive ? Value::callable(loop_function) : Value::object();
loop.set("length", (int64_t) filtered_items.size());
size_t cycle_index = 0;
loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) {
if (args.args.empty() || !args.kwargs.empty()) {
throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg");
}
auto item = args.args[cycle_index];
cycle_index = (cycle_index + 1) % args.args.size();
return item;
}));
auto loop_context = Context::make(Value::object(), context);
loop_context->set("loop", loop);
for (size_t i = 0, n = filtered_items.size(); i < n; ++i) {
auto & item = filtered_items.at(i);
destructuring_assign(var_names, loop_context, item);
loop.set("index", (int64_t) i + 1);
loop.set("index0", (int64_t) i);
loop.set("revindex", (int64_t) (n - i));
loop.set("revindex0", (int64_t) (n - i - 1));
loop.set("length", (int64_t) n);
loop.set("first", i == 0);
loop.set("last", i == (n - 1));
loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value());
loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value());
try {
body->render(out, loop_context);
} catch (const LoopControlException & e) {
if (e.control_type == LoopControlType::Break) break;
if (e.control_type == LoopControlType::Continue) continue;
}
}
}
};
if (recursive) {
loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) {
if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) {
throw std::runtime_error("loop() expects exactly 1 positional iterable argument");
}
auto & items = args.args[0];
visit(items);
return Value();
};
}
visit(iterable_value);
}
|
O1
|
cpp
|
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq 0x38(%rdi), %rsi
testq %rsi, %rsi
je 0x9c5ad
movq %rdi, %rbx
cmpq $0x0, 0x58(%rdi)
je 0x9c5cb
movq %rdx, %r15
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x87a32
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl $0x28, %edi
callq 0x1b8c0
movq %r12, (%rax)
movq %rbx, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
leaq 0x20(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq %rax, (%rsp)
leaq 0x32f(%rip), %rax # 0x9c7de
movq %rax, 0x18(%rsp)
leaq 0x32b(%rip), %rax # 0x9c7e6
movq %rax, 0x10(%rsp)
cmpb $0x1, 0x68(%rbx)
jne 0x9c4db
movq %rsp, %rax
leaq 0x40(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x9c75a
cmpq $0x0, 0x10(%rsp)
je 0x9c5fd
movq %rsp, %rdi
leaq 0x48(%rsp), %rsi
callq *0x18(%rdi)
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x9c509
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x9c522
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x59472
movq %rbx, %rdi
callq 0x5ec5e
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x9c54a
callq 0x6e5ca
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x9c559
callq 0x6e5ca
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x9c568
callq 0x6e5ca
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x9c59e
movq 0x92a0f(%rip), %rax # 0x12ef88
cmpb $0x0, (%rax)
je 0x9c589
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x9c593
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x9c59e
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x1b450
movq %rax, %r14
leaq 0x576ec(%rip), %rsi # 0xf3cad
movq %rax, %rdi
callq 0x1b330
jmp 0x9c5e7
movl $0x10, %edi
callq 0x1b450
movq %rax, %r14
leaq 0x576e7(%rip), %rsi # 0xf3cc6
movq %rax, %rdi
callq 0x1b330
movq 0x92a02(%rip), %rsi # 0x12eff0
movq 0x9296b(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf10
callq 0x1b320
jmp 0x9c604
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b690
jmp 0x9c657
jmp 0x9c661
jmp 0x9c661
movq %rax, %rbx
jmp 0x9c634
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x9c634
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x9c64d
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x48(%rsp), %rdi
callq 0x87d28
movq %rbx, %rdi
callq 0x1bf90
jmp 0x9c661
movq %rax, %rdi
callq 0x231d1
nop
|
_ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 98h
mov r14, rsi
mov rsi, [rdi+38h]
test rsi, rsi
jz loc_9C5AD
mov rbx, rdi
cmp qword ptr [rdi+58h], 0
jz loc_9C5CB
mov r15, rdx
lea r12, [rsp+0B8h+var_70]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
xorps xmm0, xmm0
movaps [rsp+0B8h+var_88], xmm0
movaps [rsp+0B8h+var_98], xmm0
movaps [rsp+0B8h+var_A8], xmm0
movaps [rsp+0B8h+var_B8], xmm0
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], r12
mov [rax+8], rbx
mov [rax+10h], r15
mov [rax+18h], r14
lea rcx, [rsp+0B8h+var_98]
mov [rax+20h], rcx
mov qword ptr [rsp+0B8h+var_B8], rax
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &)
mov qword ptr [rsp+0B8h+var_A8+8], rax
lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E10_M_managerERSt9_Any_dataRKSJ_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+0B8h+var_A8], rax
cmp byte ptr [rbx+68h], 1
jnz short loc_9C4DB
mov rax, rsp
lea rsi, [rsp+0B8h+var_78]
mov [rsi], rax
lea rdi, [rsp+0B8h+var_98]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_
loc_9C4DB:
cmp qword ptr [rsp+0B8h+var_A8], 0
jz loc_9C5FD
mov rdi, rsp
lea rsi, [rsp+0B8h+var_70]
call qword ptr [rdi+18h]
mov rax, qword ptr [rsp+0B8h+var_A8]
test rax, rax
jz short loc_9C509
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_9C509:
mov rax, qword ptr [rsp+0B8h+var_88]
test rax, rax
jz short loc_9C522
lea rdi, [rsp+0B8h+var_98]
mov rsi, rdi
mov edx, 3
call rax
loc_9C522:
lea rbx, [rsp+0B8h+var_30]
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_9C54A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9C54A:
mov rdi, [rsp+0B8h+var_48]
test rdi, rdi
jz short loc_9C559
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9C559:
mov rdi, [rsp+0B8h+var_58]
test rdi, rdi
jz short loc_9C568
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9C568:
mov rdi, [rsp+0B8h+var_68]
test rdi, rdi
jz short loc_9C59E
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_9C589
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_9C593
loc_9C589:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_9C593:
cmp eax, 1
jnz short loc_9C59E
mov rax, [rdi]
call qword ptr [rax+18h]
loc_9C59E:
add rsp, 98h
pop rbx
pop r12
pop r14
pop r15
retn
loc_9C5AD:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFornodeIterabl; "ForNode.iterable is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_9C5E7
loc_9C5CB:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFornodeBodyIsN; "ForNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_9C5E7:
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_9C5FD:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short $+2
loc_9C604:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_9C657
jmp short loc_9C661
jmp short loc_9C661
mov rbx, rax
jmp short loc_9C634
mov rbx, rax
mov rax, qword ptr [rsp+0B8h+var_A8]
test rax, rax
jz short loc_9C634
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_9C634:
mov rax, qword ptr [rsp+0B8h+var_88]
test rax, rax
jz short loc_9C64D
lea rdi, [rsp+0B8h+var_98]
mov rsi, rdi
mov edx, 3
call rax
loc_9C64D:
lea rdi, [rsp+0B8h+var_70]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_9C657:
mov rdi, rbx
call __Unwind_Resume
jmp short $+2
loc_9C661:
mov rdi, rax
call __clang_call_terminate
|
long long minja::ForNode::do_render(long long a1, long long a2, long long a3)
{
void (***v4)(void); // rsi
_QWORD *v6; // rax
long long result; // rax
long long v8; // rdi
std::runtime_error *exception; // r14
__int128 v10; // [rsp+0h] [rbp-B8h] BYREF
long long ( *v11)(); // [rsp+10h] [rbp-A8h]
long long ( *v12)(); // [rsp+18h] [rbp-A0h]
__int128 v13; // [rsp+20h] [rbp-98h] BYREF
__int128 v14; // [rsp+30h] [rbp-88h]
__int128 *v15; // [rsp+40h] [rbp-78h]
_BYTE v16[8]; // [rsp+48h] [rbp-70h] BYREF
long long v17; // [rsp+50h] [rbp-68h]
volatile signed __int32 *v18; // [rsp+60h] [rbp-58h]
volatile signed __int32 *v19; // [rsp+70h] [rbp-48h]
volatile signed __int32 *v20; // [rsp+80h] [rbp-38h]
char v21[48]; // [rsp+88h] [rbp-30h] BYREF
v4 = *(void (****)(void))(a1 + 56);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ForNode.iterable is null");
goto LABEL_25;
}
if ( !*(_QWORD *)(a1 + 88) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ForNode.body is null");
LABEL_25:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v16, v4);
v14 = 0LL;
v13 = 0LL;
v10 = 0LL;
v6 = (_QWORD *)operator new(0x28uLL);
*v6 = v16;
v6[1] = a1;
v6[2] = a3;
v6[3] = a2;
v6[4] = &v13;
*(_QWORD *)&v10 = v6;
v12 = std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke;
v11 = std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager;
if ( *(_BYTE *)(a1 + 104) == 1 )
{
v15 = &v10;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(&v13);
}
if ( !v11 )
std::__throw_bad_function_call();
((void ( *)(__int128 *, _BYTE *))v12)(&v10, v16);
if ( v11 )
((void ( *)(__int128 *, __int128 *, long long))v11)(&v10, &v10, 3LL);
if ( (_QWORD)v14 )
((void ( *)(__int128 *, __int128 *, long long))v14)(&v13, &v13, 3LL);
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(v21);
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(v21);
if ( v20 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20);
if ( v19 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
if ( v18 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18);
v8 = v17;
if ( v17 )
{
if ( _libc_single_threaded )
{
result = *(unsigned int *)(v17 + 12);
*(_DWORD *)(v17 + 12) = result - 1;
}
else
{
result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF);
}
if ( (_DWORD)result == 1 )
return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL);
}
return result;
}
|
do_render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R14,RSI
MOV RSI,qword ptr [RDI + 0x38]
TEST RSI,RSI
JZ 0x0019c5ad
MOV RBX,RDI
CMP qword ptr [RDI + 0x58],0x0
JZ 0x0019c5cb
MOV R15,RDX
LEA R12,[RSP + 0x48]
MOV RDI,R12
CALL 0x00187a32
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
LAB_0019c482:
MOV EDI,0x28
CALL 0x0011b8c0
MOV qword ptr [RAX],R12
MOV qword ptr [RAX + 0x8],RBX
MOV qword ptr [RAX + 0x10],R15
MOV qword ptr [RAX + 0x18],R14
LEA RCX,[RSP + 0x20]
MOV qword ptr [RAX + 0x20],RCX
MOV qword ptr [RSP],RAX
LEA RAX,[0x19c7de]
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[0x19c7e6]
MOV qword ptr [RSP + 0x10],RAX
CMP byte ptr [RBX + 0x68],0x1
JNZ 0x0019c4db
MOV RAX,RSP
LEA RSI,[RSP + 0x40]
MOV qword ptr [RSI],RAX
LEA RDI,[RSP + 0x20]
CALL 0x0019c75a
LAB_0019c4db:
CMP qword ptr [RSP + 0x10],0x0
JZ 0x0019c5fd
LAB_0019c4e7:
MOV RDI,RSP
LEA RSI,[RSP + 0x48]
CALL qword ptr [RDI + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0019c509
LAB_0019c4fc:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0019c509:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x0019c522
LAB_0019c513:
LEA RDI,[RSP + 0x20]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0019c522:
LEA RBX,[RSP + 0x88]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00159472
MOV RDI,RBX
CALL 0x0015ec5e
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x0019c54a
CALL 0x0016e5ca
LAB_0019c54a:
MOV RDI,qword ptr [RSP + 0x70]
TEST RDI,RDI
JZ 0x0019c559
CALL 0x0016e5ca
LAB_0019c559:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x0019c568
CALL 0x0016e5ca
LAB_0019c568:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x0019c59e
MOV RAX,qword ptr [0x0022ef88]
CMP byte ptr [RAX],0x0
JZ 0x0019c589
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0019c593
LAB_0019c589:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0019c593:
CMP EAX,0x1
JNZ 0x0019c59e
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0019c59e:
ADD RSP,0x98
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0019c5ad:
MOV EDI,0x10
CALL 0x0011b450
MOV R14,RAX
LAB_0019c5ba:
LEA RSI,[0x1f3cad]
MOV RDI,RAX
CALL 0x0011b330
LAB_0019c5c9:
JMP 0x0019c5e7
LAB_0019c5cb:
MOV EDI,0x10
CALL 0x0011b450
MOV R14,RAX
LAB_0019c5d8:
LEA RSI,[0x1f3cc6]
MOV RDI,RAX
CALL 0x0011b330
LAB_0019c5e7:
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf10
LAB_0019c5fd:
CALL 0x0011b320
|
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int iVar2;
runtime_error *this_00;
int8 *local_b8;
int8 uStack_b0;
code *local_a8;
code *pcStack_a0;
int8 local_98;
int8 uStack_90;
code *local_88;
int8 uStack_80;
int1 *local_78;
Expression local_70 [8];
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
data local_30 [16];
if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019c5ba to 0019c5c8 has its CatchHandler @ 0019c604 */
std::runtime_error::runtime_error(this_00,"ForNode.iterable is null");
}
else {
if (*(long *)(this + 0x58) != 0) {
Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38));
local_88 = (code *)0x0;
uStack_80 = 0;
local_98 = 0;
uStack_90 = 0;
local_a8 = (code *)0x0;
pcStack_a0 = (code *)0x0;
local_b8 = (int8 *)0x0;
uStack_b0 = 0;
/* try { // try from 0019c482 to 0019c48b has its CatchHandler @ 0019c615 */
local_b8 = (int8 *)operator_new(0x28);
*local_b8 = local_70;
local_b8[1] = this;
local_b8[2] = param_2;
local_b8[3] = param_1;
local_b8[4] = &local_98;
pcStack_a0 = std::
_Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}>
::_M_invoke;
local_a8 = std::
_Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}>
::_M_manager;
if (this[0x68] == (ForNode)0x1) {
local_78 = (int1 *)&local_b8;
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>
*)&local_98,
(_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *)
&local_78);
}
if (local_a8 != (code *)0x0) {
/* try { // try from 0019c4e7 to 0019c4f1 has its CatchHandler @ 0019c61a */
(*pcStack_a0)(&local_b8,local_70);
if (local_a8 != (code *)0x0) {
/* try { // try from 0019c4fc to 0019c508 has its CatchHandler @ 0019c613 */
(*local_a8)(&local_b8,&local_b8,3);
}
if (local_88 != (code *)0x0) {
/* try { // try from 0019c513 to 0019c521 has its CatchHandler @ 0019c611 */
(*local_88)(&local_98,&local_98,3);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_30,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_30);
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ef88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_68 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_68 + 0xc);
*(int *)((long)local_68 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_68 + 0x18))();
}
}
return;
}
/* WARNING: Subroutine does not return */
/* try { // try from 0019c5fd to 0019c601 has its CatchHandler @ 0019c61a */
std::__throw_bad_function_call();
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019c5d8 to 0019c5e6 has its CatchHandler @ 0019c602 */
std::runtime_error::runtime_error(this_00,"ForNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
|
|
65,182 |
my_cset_init_8bit
|
eloqsql/strings/ctype-simple.c
|
static my_bool
my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
cs->state|= my_8bit_charset_flags_from_data(cs);
cs->caseup_multiply= 1;
cs->casedn_multiply= 1;
cs->pad_char= ' ';
if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni)
return TRUE;
return create_fromuni(cs, loader);
}
|
O0
|
c
|
my_cset_init_8bit:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x47560
movl %eax, %ecx
movq -0x10(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x94(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x95(%rax)
movq -0x10(%rbp), %rax
movb $0x20, 0xb0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x48322
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x48322
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x48322
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x48328
movb $0x1, -0x1(%rbp)
jmp 0x48338
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x48410
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_cset_init_8bit:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
call my_8bit_charset_flags_from_data
mov ecx, eax
mov rax, [rbp+var_10]
or ecx, [rax+0Ch]
mov [rax+0Ch], ecx
mov rax, [rbp+var_10]
mov byte ptr [rax+94h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+95h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+0B0h], 20h ; ' '
mov rax, [rbp+var_10]
cmp qword ptr [rax+48h], 0
jz short loc_48322
mov rax, [rbp+var_10]
cmp qword ptr [rax+50h], 0
jz short loc_48322
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz short loc_48322
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_48328
loc_48322:
mov [rbp+var_1], 1
jmp short loc_48338
loc_48328:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call create_fromuni
mov [rbp+var_1], al
loc_48338:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char my_cset_init_8bit(long long a1, long long a2)
{
*(_DWORD *)(a1 + 12) |= my_8bit_charset_flags_from_data(a1);
*(_BYTE *)(a1 + 148) = 1;
*(_BYTE *)(a1 + 149) = 1;
*(_BYTE *)(a1 + 176) = 32;
if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && *(_QWORD *)(a1 + 64) && *(_QWORD *)(a1 + 104) )
return create_fromuni(a1, a2);
else
return 1;
}
|
my_cset_init_8bit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00147560
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
OR ECX,dword ptr [RAX + 0xc]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x94],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x95],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xb0],0x20
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x00148322
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x00148322
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00148322
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x00148328
LAB_00148322:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00148338
LAB_00148328:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00148410
MOV byte ptr [RBP + -0x1],AL
LAB_00148338:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_cset_init_8bit(long param_1,int8 param_2)
{
uint uVar1;
int1 local_9;
uVar1 = my_8bit_charset_flags_from_data(param_1);
*(uint *)(param_1 + 0xc) = uVar1 | *(uint *)(param_1 + 0xc);
*(int1 *)(param_1 + 0x94) = 1;
*(int1 *)(param_1 + 0x95) = 1;
*(int1 *)(param_1 + 0xb0) = 0x20;
if ((((*(long *)(param_1 + 0x48) == 0) || (*(long *)(param_1 + 0x50) == 0)) ||
(*(long *)(param_1 + 0x40) == 0)) || (*(long *)(param_1 + 0x68) == 0)) {
local_9 = 1;
}
else {
local_9 = create_fromuni(param_1,param_2);
}
return local_9;
}
|
|
65,183 |
ggml_diag
|
llama.cpp/ggml/src/ggml.c
|
struct ggml_tensor * ggml_diag(
struct ggml_context * ctx,
struct ggml_tensor * a) {
GGML_ASSERT(a->ne[1] == 1);
const int64_t ne[4] = { a->ne[0], a->ne[0], a->ne[2], a->ne[3] };
struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, 4, ne);
result->op = GGML_OP_DIAG;
result->src[0] = a;
return result;
}
|
O3
|
c
|
ggml_diag:
pushq %rbx
subq $0x20, %rsp
cmpq $0x1, 0x18(%rsi)
jne 0x1c4a9
movq %rsi, %rbx
movq 0x10(%rsi), %rax
movq %rsp, %rcx
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
movups 0x20(%rsi), %xmm0
movaps %xmm0, 0x10(%rcx)
movl (%rsi), %esi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x19be7
movl $0x28, 0x50(%rax)
movq %rbx, 0x98(%rax)
addq $0x20, %rsp
popq %rbx
retq
leaq 0x2e163(%rip), %rdi # 0x4a613
leaq 0x2e197(%rip), %rdx # 0x4a64e
leaq 0x2e715(%rip), %rcx # 0x4abd3
movl $0xd22, %esi # imm = 0xD22
xorl %eax, %eax
callq 0x17c80
|
ggml_diag:
push rbx
sub rsp, 20h
cmp qword ptr [rsi+18h], 1
jnz short loc_1C4A9
mov rbx, rsi
mov rax, [rsi+10h]
mov rcx, rsp
mov [rcx], rax
mov [rcx+8], rax
movups xmm0, xmmword ptr [rsi+20h]
movaps xmmword ptr [rcx+10h], xmm0
mov esi, [rsi]
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov dword ptr [rax+50h], 28h ; '('
mov [rax+98h], rbx
add rsp, 20h
pop rbx
retn
loc_1C4A9:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe11; "a->ne[1] == 1"
mov esi, 0D22h
xor eax, eax
call _ggml_abort
|
long long ggml_diag(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long result; // rax
_QWORD v7[2]; // [rsp+0h] [rbp-28h] BYREF
__int128 v8; // [rsp+10h] [rbp-18h]
if ( *(_QWORD *)(a2 + 24) != 1LL )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c",
3362,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"a->ne[1] == 1",
a5,
a6);
v7[0] = *(_QWORD *)(a2 + 16);
v7[1] = v7[0];
v8 = *(_OWORD *)(a2 + 32);
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, v7, 0LL, 0LL);
*(_DWORD *)(result + 80) = 40;
*(_QWORD *)(result + 152) = a2;
return result;
}
|
ggml_diag:
PUSH RBX
SUB RSP,0x20
CMP qword ptr [RSI + 0x18],0x1
JNZ 0x0011c4a9
MOV RBX,RSI
MOV RAX,qword ptr [RSI + 0x10]
MOV RCX,RSP
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],RAX
MOVUPS XMM0,xmmword ptr [RSI + 0x20]
MOVAPS xmmword ptr [RCX + 0x10],XMM0
MOV ESI,dword ptr [RSI]
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00119be7
MOV dword ptr [RAX + 0x50],0x28
MOV qword ptr [RAX + 0x98],RBX
ADD RSP,0x20
POP RBX
RET
LAB_0011c4a9:
LEA RDI,[0x14a613]
LEA RDX,[0x14a64e]
LEA RCX,[0x14abd3]
MOV ESI,0xd22
XOR EAX,EAX
CALL 0x00117c80
|
void ggml_diag(int8 param_1,int4 *param_2)
{
long lVar1;
int8 local_28;
int8 local_20;
int4 local_18;
int4 uStack_14;
int4 uStack_10;
int4 uStack_c;
if (*(long *)(param_2 + 6) == 1) {
local_28 = *(int8 *)(param_2 + 4);
local_18 = param_2[8];
uStack_14 = param_2[9];
uStack_10 = param_2[10];
uStack_c = param_2[0xb];
local_20 = local_28;
lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,&local_28,0,0);
*(int4 *)(lVar1 + 0x50) = 0x28;
*(int4 **)(lVar1 + 0x98) = param_2;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c",0xd22,
"GGML_ASSERT(%s) failed","a->ne[1] == 1");
}
|
|
65,184 |
pfs_create_prepared_stmt_v1
|
eloqsql/storage/perfschema/pfs.cc
|
PSI_prepared_stmt*
pfs_create_prepared_stmt_v1(void *identity, uint stmt_id,
PSI_statement_locker *locker,
const char *stmt_name, size_t stmt_name_length)
{
PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker);
PFS_events_statements *pfs_stmt= reinterpret_cast<PFS_events_statements*> (state->m_statement);
PFS_program *pfs_program= reinterpret_cast<PFS_program *>(state->m_parent_sp_share);
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
PFS_prepared_stmt *pfs= create_prepared_stmt(identity,
pfs_thread, pfs_program,
pfs_stmt, stmt_id,
stmt_name, static_cast<uint>(stmt_name_length));
state->m_parent_prepared_stmt= reinterpret_cast<PSI_prepared_stmt*>(pfs);
state->m_in_prepare= true;
return reinterpret_cast<PSI_prepared_stmt*>(pfs);
}
|
O0
|
cpp
|
pfs_create_prepared_stmt_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x170(%rax), %rax
movq %rax, -0x48(%rbp)
callq 0x45700
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4d283
movq $0x0, -0x8(%rbp)
jmp 0x4d2ca
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl -0x14(%rbp), %r8d
movq -0x28(%rbp), %r9
movq -0x30(%rbp), %rax
movl %eax, (%rsp)
callq 0x53cb0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x178(%rax)
movq -0x38(%rbp), %rax
movb $0x1, 0x1(%rax)
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
pfs_create_prepared_stmt_v1:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rax, [rax+170h]
mov [rbp+var_48], rax
call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void)
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4D283
mov [rbp+var_8], 0
jmp short loc_4D2CA
loc_4D283:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
mov rcx, [rbp+var_40]
mov r8d, [rbp+var_14]
mov r9, [rbp+var_28]
mov rax, [rbp+var_30]
mov [rsp+60h+var_60], eax
call _Z20create_prepared_stmtPvP10PFS_threadP11PFS_programP21PFS_events_statementsjPKcj; create_prepared_stmt(void *,PFS_thread *,PFS_program *,PFS_events_statements *,uint,char const*,uint)
mov [rbp+var_58], rax
mov rcx, [rbp+var_58]
mov rax, [rbp+var_38]
mov [rax+178h], rcx
mov rax, [rbp+var_38]
mov byte ptr [rax+1], 1
mov rax, [rbp+var_58]
mov [rbp+var_8], rax
loc_4D2CA:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
|
long long pfs_create_prepared_stmt_v1(int a1, int a2, long long a3, int a4, int a5)
{
long long prepared_stmt; // [rsp+8h] [rbp-58h]
long long THR_PFS; // [rsp+10h] [rbp-50h]
long long v8; // [rsp+18h] [rbp-48h]
long long v9; // [rsp+20h] [rbp-40h]
v9 = *(_QWORD *)(a3 + 40);
v8 = *(_QWORD *)(a3 + 368);
THR_PFS = my_thread_get_THR_PFS();
if ( !THR_PFS )
return 0LL;
prepared_stmt = create_prepared_stmt(a1, THR_PFS, v8, v9, a2, a4, a5);
*(_QWORD *)(a3 + 376) = prepared_stmt;
*(_BYTE *)(a3 + 1) = 1;
return prepared_stmt;
}
|
pfs_create_prepared_stmt_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x170]
MOV qword ptr [RBP + -0x48],RAX
CALL 0x00145700
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014d283
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014d2ca
LAB_0014d283:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
MOV R8D,dword ptr [RBP + -0x14]
MOV R9,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RSP],EAX
CALL 0x00153cb0
MOV qword ptr [RBP + -0x58],RAX
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x178],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x1],0x1
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014d2ca:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
int8
pfs_create_prepared_stmt_v1(void *param_1,uint param_2,long param_3,char *param_4,uint param_5)
{
PFS_events_statements *pPVar1;
PFS_program *pPVar2;
PFS_thread *pPVar3;
int8 local_10;
pPVar1 = *(PFS_events_statements **)(param_3 + 0x28);
pPVar2 = *(PFS_program **)(param_3 + 0x170);
pPVar3 = (PFS_thread *)my_thread_get_THR_PFS();
if (pPVar3 == (PFS_thread *)0x0) {
local_10 = 0;
}
else {
local_10 = create_prepared_stmt(param_1,pPVar3,pPVar2,pPVar1,param_2,param_4,param_5);
*(int8 *)(param_3 + 0x178) = local_10;
*(int1 *)(param_3 + 1) = 1;
}
return local_10;
}
|
|
65,185 |
mysql_stmt_prepare_start
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
int STDCALL
mysql_stmt_prepare_start(int *ret, MYSQL_STMT *stmt, const char *query,
unsigned long length)
{
MK_ASYNC_START_BODY(
mysql_stmt_prepare,
stmt->mysql,
{
WIN_SET_NONBLOCKING(stmt->mysql)
parms.stmt= stmt;
parms.query= query;
parms.length= length;
},
1,
r_int,
/* If stmt->mysql==NULL then we will not block so can call directly. */
if (!stmt->mysql)
{
*ret= mysql_stmt_prepare(stmt, query, length);
return 0;
})
}
|
O0
|
c
|
mysql_stmt_prepare_start:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x414a8
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2f520
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x415c9
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x38(%rbp), %rdi
addq $0x38, %rdi
leaq 0xf2(%rip), %rsi # 0x415e0
leaq -0x50(%rbp), %rdx
callq 0x43fc0
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rax
movb $0x0, 0x15(%rax)
movq -0x38(%rbp), %rax
movb $0x0, 0x14(%rax)
cmpl $0x0, -0x2c(%rbp)
jle 0x41526
movq -0x38(%rbp), %rax
movb $0x1, 0x15(%rax)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x415c9
cmpl $0x0, -0x2c(%rbp)
jge 0x415b5
jmp 0x41532
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x22be6(%rip), %rax # 0x64140
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x29c(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x97, %rdi
leaq 0x22bc4(%rip), %rax # 0x64150
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x296(%rax)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x415c2
movq -0x38(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_stmt_prepare_start:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
cmp qword ptr [rax+38h], 0
jnz short loc_414A8
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call mysql_stmt_prepare
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], ecx
mov [rbp+var_4], 0
jmp loc_415C9
loc_414A8:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
mov rax, [rbp+var_20]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov byte ptr [rax+14h], 1
mov rdi, [rbp+var_38]
add rdi, 38h ; '8'
lea rsi, mysql_stmt_prepare_start_internal
lea rdx, [rbp+var_50]
call my_context_spawn
mov [rbp+var_2C], eax
mov rax, [rbp+var_38]
mov byte ptr [rax+15h], 0
mov rax, [rbp+var_38]
mov byte ptr [rax+14h], 0
cmp [rbp+var_2C], 0
jle short loc_41526
mov rax, [rbp+var_38]
mov byte ptr [rax+15h], 1
mov rax, [rbp+var_38]
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_415C9
loc_41526:
cmp [rbp+var_2C], 0
jge loc_415B5
jmp short $+2
loc_41532:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 7D8h
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+29Ch], 0
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+296h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax], 1
jmp short loc_415C2
loc_415B5:
mov rax, [rbp+var_38]
mov ecx, [rax+8]
mov rax, [rbp+var_10]
mov [rax], ecx
loc_415C2:
mov [rbp+var_4], 0
loc_415C9:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long mysql_stmt_prepare_start(_DWORD *a1, long long a2, long long a3, long long a4)
{
_QWORD v5[3]; // [rsp+0h] [rbp-50h] BYREF
unsigned int *v6; // [rsp+18h] [rbp-38h]
int v7; // [rsp+24h] [rbp-2Ch]
long long v8; // [rsp+28h] [rbp-28h]
long long v9; // [rsp+30h] [rbp-20h]
long long v10; // [rsp+38h] [rbp-18h]
_DWORD *v11; // [rsp+40h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
if ( *(_QWORD *)(a2 + 56) )
{
v6 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v10 + 56) + 1152LL) + 40LL);
v5[0] = v10;
v5[1] = v9;
v5[2] = v8;
*((_BYTE *)v6 + 20) = 1;
v7 = my_context_spawn(v6 + 14, mysql_stmt_prepare_start_internal, v5);
*((_BYTE *)v6 + 21) = 0;
*((_BYTE *)v6 + 20) = 0;
if ( v7 <= 0 )
{
if ( v7 >= 0 )
{
*v11 = v6[2];
}
else
{
*(_DWORD *)(*(_QWORD *)(v10 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(v10 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(v10 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(v10 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(v10 + 56) + 662LL) = 0;
*v11 = 1;
}
return 0;
}
else
{
*((_BYTE *)v6 + 21) = 1;
return *v6;
}
}
else
{
*v11 = mysql_stmt_prepare(v10, v9, v8);
return 0;
}
}
|
mysql_stmt_prepare_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
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 RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x001414a8
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0012f520
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001415c9
LAB_001414a8:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x14],0x1
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x38
LEA RSI,[0x1415e0]
LEA RDX,[RBP + -0x50]
CALL 0x00143fc0
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x15],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x14],0x0
CMP dword ptr [RBP + -0x2c],0x0
JLE 0x00141526
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + 0x15],0x1
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001415c9
LAB_00141526:
CMP dword ptr [RBP + -0x2c],0x0
JGE 0x001415b5
JMP 0x00141532
LAB_00141532:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RAX,[0x164140]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x29c],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x97
LEA RAX,[0x164150]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x296],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],0x1
JMP 0x001415c2
LAB_001415b5:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
LAB_001415c2:
MOV dword ptr [RBP + -0x4],0x0
LAB_001415c9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4
mysql_stmt_prepare_start(int4 *param_1,long param_2,int8 param_3,int8 param_4)
{
int4 uVar1;
long local_58;
int8 local_50;
int8 local_48;
int4 *local_40;
int local_34;
int8 local_30;
int8 local_28;
long local_20;
int4 *local_18;
int4 local_c;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (*(long *)(param_2 + 0x38) == 0) {
uVar1 = mysql_stmt_prepare(param_2,param_3,param_4);
*local_18 = uVar1;
local_c = 0;
}
else {
local_40 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
*(int1 *)(local_40 + 5) = 1;
local_58 = param_2;
local_50 = param_3;
local_48 = param_4;
local_34 = my_context_spawn(local_40 + 0xe,mysql_stmt_prepare_start_internal,&local_58);
*(int1 *)((long)local_40 + 0x15) = 0;
*(int1 *)(local_40 + 5) = 0;
if (local_34 < 1) {
if (local_34 < 0) {
*(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00164190,
0x1ff);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0;
*local_18 = 1;
}
else {
*local_18 = local_40[2];
}
local_c = 0;
}
else {
*(int1 *)((long)local_40 + 0x15) = 1;
local_c = *local_40;
}
}
return local_c;
}
|
|
65,186 |
pagecache_delete_pages
|
eloqsql/storage/maria/ma_pagecache.c
|
my_bool pagecache_delete_pages(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
uint page_count,
enum pagecache_page_lock lock,
my_bool flush)
{
pgcache_page_no_t page_end;
DBUG_ENTER("pagecache_delete_pages");
DBUG_ASSERT(page_count > 0);
page_end= pageno + page_count;
do
{
if (pagecache_delete(pagecache, file, pageno,
lock, flush))
DBUG_RETURN(1);
} while (++pageno != page_end);
DBUG_RETURN(0);
}
|
O3
|
c
|
pagecache_delete_pages:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, -0x2c(%rbp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl %ecx, %ebx
movsbl %r9b, %r13d
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl -0x2c(%rbp), %ecx
movl %r13d, %r8d
callq 0x4df7f
testb %al, %al
jne 0x4e2d1
incq %r14
decq %rbx
jne 0x4e2ad
xorl %eax, %eax
jmp 0x4e2d3
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
pagecache_delete_pages:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rbp+var_2C], r8d
mov r14, rdx
mov r15, rsi
mov r12, rdi
mov ebx, ecx
movsx r13d, r9b
loc_4E2AD:
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov ecx, [rbp+var_2C]
mov r8d, r13d
call pagecache_delete
test al, al
jnz short loc_4E2D1
inc r14
dec rbx
jnz short loc_4E2AD
xor eax, eax
jmp short loc_4E2D3
loc_4E2D1:
mov al, 1
loc_4E2D3:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char pagecache_delete_pages(long long a1, long long a2, long long a3, unsigned int a4, unsigned int a5, char a6)
{
long long v7; // rbx
v7 = a4;
while ( !(unsigned __int8)pagecache_delete(a1, a2, a3, a5, a6) )
{
++a3;
if ( !--v7 )
return 0;
}
return 1;
}
|
pagecache_delete_pages:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV dword ptr [RBP + -0x2c],R8D
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
MOV EBX,ECX
MOVSX R13D,R9B
LAB_0014e2ad:
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV ECX,dword ptr [RBP + -0x2c]
MOV R8D,R13D
CALL 0x0014df7f
TEST AL,AL
JNZ 0x0014e2d1
INC R14
DEC RBX
JNZ 0x0014e2ad
XOR EAX,EAX
JMP 0x0014e2d3
LAB_0014e2d1:
MOV AL,0x1
LAB_0014e2d3:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
pagecache_delete_pages
(int8 param_1,int8 param_2,long param_3,uint param_4,int4 param_5,
char param_6)
{
char cVar1;
ulong uVar2;
uVar2 = (ulong)param_4;
do {
cVar1 = pagecache_delete(param_1,param_2,param_3,param_5,(int)param_6);
if (cVar1 != '\0') {
return 1;
}
param_3 = param_3 + 1;
uVar2 = uVar2 - 1;
} while (uVar2 != 0);
return 0;
}
|
|
65,187 |
type_function_create
|
tsotchke[P]eshkol/src/core/utils/type_creation.c
|
Type* type_function_create(Arena* arena, size_t param_count, Type** params, Type* return_type, bool variadic) {
assert(return_type != NULL);
assert(param_count == 0 || params != NULL);
Type* type = arena_alloc(arena, sizeof(Type));
if (!type) return NULL;
type->kind = TYPE_FUNCTION;
type->function.param_count = param_count;
type->function.params = params;
type->function.return_type = return_type;
type->function.variadic = variadic;
return type;
}
|
O1
|
c
|
type_function_create:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x18079
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
setne %cl
orb %al, %cl
je 0x18098
movl %r8d, %ebx
movl $0x28, %esi
callq 0x33af
testq %rax, %rax
je 0x1806b
movl $0x9, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movb %bl, 0x20(%rax)
jmp 0x1806d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xaa7c(%rip), %rdi # 0x22afc
leaq 0xa994(%rip), %rsi # 0x22a1b
leaq 0xaa82(%rip), %rcx # 0x22b10
movl $0x91, %edx
callq 0x2180
leaq 0xaab5(%rip), %rdi # 0x22b54
leaq 0xa975(%rip), %rsi # 0x22a1b
leaq 0xaa63(%rip), %rcx # 0x22b10
movl $0x92, %edx
callq 0x2180
|
type_function_create:
push r15
push r14
push r12
push rbx
push rax
test rcx, rcx
jz short loc_18079
mov r14, rcx
mov r15, rdx
mov r12, rsi
test rsi, rsi
setz al
test rdx, rdx
setnz cl
or cl, al
jz short loc_18098
mov ebx, r8d
mov esi, 28h ; '('
call arena_alloc
test rax, rax
jz short loc_1806B
mov dword ptr [rax], 9
mov [rax+8], r12
mov [rax+10h], r15
mov [rax+18h], r14
mov [rax+20h], bl
jmp short loc_1806D
loc_1806B:
xor eax, eax
loc_1806D:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_18079:
lea rdi, aReturnTypeNull; "return_type != NULL"
lea rsi, aWorkspaceLlm4b_26; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aTypeTypeFuncti; "Type *type_function_create(Arena *, siz"...
mov edx, 91h
call ___assert_fail
loc_18098:
lea rdi, aParamCount0Par; "param_count == 0 || params != NULL"
lea rsi, aWorkspaceLlm4b_26; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aTypeTypeFuncti; "Type *type_function_create(Arena *, siz"...
mov edx, 92h
call ___assert_fail
|
long long type_function_create(long long a1, long long a2, long long a3, long long a4, char a5)
{
long long result; // rax
if ( !a4 )
__assert_fail(
"return_type != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_creation.c",
145LL,
"Type *type_function_create(Arena *, size_t, Type **, Type *, _Bool)");
if ( a2 != 0 && a3 == 0 )
__assert_fail(
"param_count == 0 || params != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_creation.c",
146LL,
"Type *type_function_create(Arena *, size_t, Type **, Type *, _Bool)");
result = arena_alloc(a1, 40LL);
if ( !result )
return 0LL;
*(_DWORD *)result = 9;
*(_QWORD *)(result + 8) = a2;
*(_QWORD *)(result + 16) = a3;
*(_QWORD *)(result + 24) = a4;
*(_BYTE *)(result + 32) = a5;
return result;
}
|
type_function_create:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST RCX,RCX
JZ 0x00118079
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
TEST RSI,RSI
SETZ AL
TEST RDX,RDX
SETNZ CL
OR CL,AL
JZ 0x00118098
MOV EBX,R8D
MOV ESI,0x28
CALL 0x001033af
TEST RAX,RAX
JZ 0x0011806b
MOV dword ptr [RAX],0x9
MOV qword ptr [RAX + 0x8],R12
MOV qword ptr [RAX + 0x10],R15
MOV qword ptr [RAX + 0x18],R14
MOV byte ptr [RAX + 0x20],BL
JMP 0x0011806d
LAB_0011806b:
XOR EAX,EAX
LAB_0011806d:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00118079:
LEA RDI,[0x122afc]
LEA RSI,[0x122a1b]
LEA RCX,[0x122b10]
MOV EDX,0x91
CALL 0x00102180
LAB_00118098:
LEA RDI,[0x122b54]
LEA RSI,[0x122a1b]
LEA RCX,[0x122b10]
MOV EDX,0x92
CALL 0x00102180
|
int4 *
type_function_create(int8 param_1,long param_2,long param_3,long param_4,int1 param_5)
{
int4 *puVar1;
if (param_4 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("return_type != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_creation.c"
,0x91,"Type *type_function_create(Arena *, size_t, Type **, Type *, _Bool)");
}
if (param_3 != 0 || param_2 == 0) {
puVar1 = (int4 *)arena_alloc(param_1,0x28);
if (puVar1 == (int4 *)0x0) {
puVar1 = (int4 *)0x0;
}
else {
*puVar1 = 9;
*(long *)(puVar1 + 2) = param_2;
*(long *)(puVar1 + 4) = param_3;
*(long *)(puVar1 + 6) = param_4;
*(int1 *)(puVar1 + 8) = param_5;
}
return puVar1;
}
/* WARNING: Subroutine does not return */
__assert_fail("param_count == 0 || params != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_creation.c"
,0x92,"Type *type_function_create(Arena *, size_t, Type **, Type *, _Bool)");
}
|
|
65,188 |
resolve_charset
|
eloqsql/mysys/charset.c
|
my_bool resolve_charset(const char *cs_name,
CHARSET_INFO *default_cs,
CHARSET_INFO **cs,
myf flags)
{
*cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, flags);
if (*cs == NULL)
{
*cs= default_cs;
return TRUE;
}
return FALSE;
}
|
O3
|
c
|
resolve_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq -0xc8(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0x12f0(%rip), %rax # 0x62b52
movq %rax, 0x80(%rdi)
leaq -0x12ef(%rip), %rax # 0x62b61
movq %rax, 0x88(%rdi)
leaq -0x12e2(%rip), %rax # 0x62b7c
movq %rax, 0x90(%rdi)
leaq 0x73ea(%rip), %rax # 0x6b256
movq %rax, 0x98(%rdi)
leaq 0x2e99e6(%rip), %rax # 0x34d860
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0x12f1(%rip), %rax # 0x62b9a
movq %rax, 0xa8(%rdi)
movl $0x20, %edx
callq 0x63c94
movq %rax, %rcx
testq %rax, %rax
sete %al
cmovneq %rcx, %r14
movq %r14, (%rbx)
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x63ec7
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x372b0
|
resolve_charset:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0C0h
mov rbx, rdx
mov r14, rsi
mov rsi, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, [rbp+var_C8]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
mov edx, 20h ; ' '
call my_charset_get_by_name
mov rcx, rax
test rax, rax
setz al
cmovnz r14, rcx
mov [rbx], r14
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_63EC7
add rsp, 0C0h
pop rbx
pop r14
pop rbp
retn
loc_63EC7:
call ___stack_chk_fail
|
bool resolve_charset(long long a1, long long a2, long long *a3, long long a4)
{
long long v6; // rcx
bool result; // al
char v8[128]; // [rsp+8h] [rbp-C8h] BYREF
long long ( *v9)(long long); // [rsp+88h] [rbp-48h]
long long ( *v10)(long long); // [rsp+90h] [rbp-40h]
long long ( *v11)(long long, long long); // [rsp+98h] [rbp-38h]
long long ( *v12)(_QWORD); // [rsp+A0h] [rbp-30h]
long long ( *v13)(); // [rsp+A8h] [rbp-28h]
long long ( *v14)(unsigned int *); // [rsp+B0h] [rbp-20h]
unsigned long long v15; // [rsp+B8h] [rbp-18h]
v15 = __readfsqword(0x28u);
v8[0] = 0;
v9 = my_once_alloc_c;
v10 = my_malloc_c;
v11 = my_realloc_c;
v12 = my_free;
v13 = my_charset_error_reporter;
v14 = add_collation;
v6 = my_charset_get_by_name((long long)v8, a1, 0x20u, a4);
result = v6 == 0;
if ( v6 )
a2 = v6;
*a3 = a2;
return result;
}
|
resolve_charset:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xc0
MOV RBX,RDX
MOV R14,RSI
MOV RSI,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0xc8]
MOV byte ptr [RDI],0x0
LEA RAX,[0x162b52]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x162b61]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x162b7c]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x16b256]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x44d860]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x162b9a]
MOV qword ptr [RDI + 0xa8],RAX
MOV EDX,0x20
CALL 0x00163c94
MOV RCX,RAX
TEST RAX,RAX
SETZ AL
CMOVNZ R14,RCX
MOV qword ptr [RBX],R14
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x00163ec7
ADD RSP,0xc0
POP RBX
POP R14
POP RBP
RET
LAB_00163ec7:
CALL 0x001372b0
|
bool resolve_charset(int8 param_1,long param_2,long *param_3)
{
long lVar1;
long in_FS_OFFSET;
int1 local_d0 [128];
code *local_50;
code *local_48;
code *local_40;
code *local_38;
int *local_30;
code *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_d0[0] = 0;
local_50 = my_once_alloc_c;
local_48 = my_malloc_c;
local_40 = my_realloc_c;
local_38 = my_free;
local_30 = my_charset_error_reporter;
local_28 = add_collation;
lVar1 = my_charset_get_by_name(local_d0,param_1,0x20);
if (lVar1 != 0) {
param_2 = lVar1;
}
*param_3 = param_2;
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return lVar1 == 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
65,189 |
ma_ft_store
|
eloqsql/storage/maria/ma_ft_update.c
|
static int _ma_ft_store(MARIA_HA *info, uint keynr, uchar *keybuf,
FT_WORD *wlist, my_off_t filepos)
{
DBUG_ENTER("_ma_ft_store");
for (; wlist->pos; wlist++)
{
MARIA_KEY key;
_ma_ft_make_key(info, &key, keynr, keybuf, wlist, filepos);
if (_ma_ck_write(info, &key))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
|
O0
|
c
|
ma_ft_store:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x8c87d
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0x50(%rbp), %rsi
callq 0x8c610
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x81f80
cmpb $0x0, %al
je 0x8c86d
jmp 0x8c864
movl $0x1, -0x4(%rbp)
jmp 0x8c886
jmp 0x8c86f
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
jmp 0x8c82b
jmp 0x8c87f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
|
_ma_ft_store:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
loc_8C82B:
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jz short loc_8C87D
mov rdi, [rbp+var_10]
mov edx, [rbp+var_14]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
mov r9, [rbp+var_30]
lea rsi, [rbp+var_50]
call _ma_ft_make_key
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_50]
call _ma_ck_write
cmp al, 0
jz short loc_8C86D
jmp short $+2
loc_8C864:
mov [rbp+var_4], 1
jmp short loc_8C886
loc_8C86D:
jmp short $+2
loc_8C86F:
mov rax, [rbp+var_28]
add rax, 18h
mov [rbp+var_28], rax
jmp short loc_8C82B
loc_8C87D:
jmp short $+2
loc_8C87F:
mov [rbp+var_4], 0
loc_8C886:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long ma_ft_store(_DWORD *a1, unsigned int a2, _BYTE *a3, _QWORD *a4, long long a5)
{
_BYTE v6[32]; // [rsp+0h] [rbp-50h] BYREF
long long v7; // [rsp+20h] [rbp-30h]
_QWORD *v8; // [rsp+28h] [rbp-28h]
_BYTE *v9; // [rsp+30h] [rbp-20h]
unsigned int v10; // [rsp+3Ch] [rbp-14h]
_DWORD *v11; // [rsp+40h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v7 = a5;
while ( *v8 )
{
ma_ft_make_key(v11, (long long)v6, v10, v9, (long long)v8, v7);
if ( ma_ck_write((long long)v11, (long long)v6) )
return 1;
v8 += 3;
}
return 0;
}
|
_ma_ft_store:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
LAB_0018c82b:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JZ 0x0018c87d
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x50]
CALL 0x0018c610
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x50]
CALL 0x00181f80
CMP AL,0x0
JZ 0x0018c86d
JMP 0x0018c864
LAB_0018c864:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0018c886
LAB_0018c86d:
JMP 0x0018c86f
LAB_0018c86f:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x18
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0018c82b
LAB_0018c87d:
JMP 0x0018c87f
LAB_0018c87f:
MOV dword ptr [RBP + -0x4],0x0
LAB_0018c886:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4
_ma_ft_store(int8 param_1,int4 param_2,int8 param_3,long *param_4,
int8 param_5)
{
char cVar1;
int1 local_58 [32];
int8 local_38;
long *local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
while( true ) {
if (*local_30 == 0) {
return 0;
}
_ma_ft_make_key(local_18,local_58,local_1c,local_28,local_30,local_38);
cVar1 = _ma_ck_write(local_18,local_58);
if (cVar1 != '\0') break;
local_30 = local_30 + 3;
}
return 1;
}
|
|
65,190 |
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment()
|
llama.cpp/common/json.hpp
|
bool scan_comment()
{
switch (get())
{
// single-line comments skip input until a newline or EOF is read
case '/':
{
while (true)
{
switch (get())
{
case '\n':
case '\r':
case char_traits<char_type>::eof():
case '\0':
return true;
default:
break;
}
}
}
// multi-line comments skip input until */ is read
case '*':
{
while (true)
{
switch (get())
{
case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
return false;
}
case '*':
{
switch (get())
{
case '/':
return true;
default:
{
unget();
continue;
}
}
}
default:
continue;
}
}
}
// unexpected character after reading '/'
default:
{
error_message = "invalid comment; expecting '/' or '*' after '/'";
return false;
}
}
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x21856
cmpl $0x2f, %eax
je 0x85dc5
cmpl $0x2a, %eax
jne 0x85de2
movq %rbx, %rdi
callq 0x21856
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x85deb
cmpl $0x2a, %eax
jne 0x85d99
movq %rbx, %rdi
callq 0x21856
cmpl $0x2f, %eax
je 0x85dde
movq %rbx, %rdi
callq 0x86654
jmp 0x85d99
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x21856
incl %eax
cmpl $0xf, %eax
jae 0x85dca
btl %eax, %ebp
jae 0x85dca
movb $0x1, %al
jmp 0x85df8
leaq 0x93e50(%rip), %rax # 0x119c39
jmp 0x85df2
leaq 0x93e21(%rip), %rax # 0x119c13
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv:
push rbp
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,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>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_85DC5
cmp eax, 2Ah ; '*'
jnz short loc_85DE2
loc_85D99:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,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>>>::get(void)
lea ecx, [rax+1]
cmp ecx, 2
jb short loc_85DEB
cmp eax, 2Ah ; '*'
jnz short loc_85D99
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,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>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_85DDE
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,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>>>::unget(void)
jmp short loc_85D99
loc_85DC5:
mov ebp, 4803h
loc_85DCA:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,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>>>::get(void)
inc eax
cmp eax, 0Fh
jnb short loc_85DCA
bt ebp, eax
jnb short loc_85DCA
loc_85DDE:
mov al, 1
jmp short loc_85DF8
loc_85DE2:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_85DF2
loc_85DEB:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_85DF2:
mov [rbx+70h], rax
xor eax, eax
loc_85DF8:
add rsp, 8
pop rbx
pop rbp
retn
|
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(
__m128i *a1)
{
int v1; // eax
int v2; // eax
int v3; // ebp
unsigned int v4; // eax
const char *v6; // rax
v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v1 == 47 )
{
v3 = 18435;
do
{
do
v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1)
+ 1;
while ( v4 >= 0xF );
}
while ( !_bittest(&v3, v4) );
return 1;
}
else
{
if ( v1 == 42 )
{
while ( 1 )
{
v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( (unsigned int)(v2 + 1) < 2 )
break;
if ( v2 == 42 )
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 )
return 1;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
}
}
v6 = "invalid comment; missing closing '*/'";
}
else
{
v6 = "invalid comment; expecting '/' or '*' after '/'";
}
a1[7].m128i_i64[0] = (long long)v6;
return 0;
}
}
|
scan_comment:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00121856
CMP EAX,0x2f
JZ 0x00185dc5
CMP EAX,0x2a
JNZ 0x00185de2
LAB_00185d99:
MOV RDI,RBX
CALL 0x00121856
LEA ECX,[RAX + 0x1]
CMP ECX,0x2
JC 0x00185deb
CMP EAX,0x2a
JNZ 0x00185d99
MOV RDI,RBX
CALL 0x00121856
CMP EAX,0x2f
JZ 0x00185dde
MOV RDI,RBX
CALL 0x00186654
JMP 0x00185d99
LAB_00185dc5:
MOV EBP,0x4803
LAB_00185dca:
MOV RDI,RBX
CALL 0x00121856
INC EAX
CMP EAX,0xf
JNC 0x00185dca
BT EBP,EAX
JNC 0x00185dca
LAB_00185dde:
MOV AL,0x1
JMP 0x00185df8
LAB_00185de2:
LEA RAX,[0x219c39]
JMP 0x00185df2
LAB_00185deb:
LEA RAX,[0x219c13]
LAB_00185df2:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_00185df8:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_comment() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int8 uVar2;
char *pcVar3;
iVar1 = get(this);
if (iVar1 == 0x2f) {
do {
do {
iVar1 = get(this);
} while (0xe < iVar1 + 1U);
} while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0);
LAB_00185dde:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
while (iVar1 = get(this), 1 < iVar1 + 1U) {
if (iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_00185dde;
unget(this);
}
}
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
|
|
65,191 |
maria_rtree_get_first
|
eloqsql/storage/maria/ma_rt_index.c
|
int maria_rtree_get_first(MARIA_HA *info, uint keynr, uint key_length)
{
my_off_t root;
MARIA_KEYDEF *keyinfo= info->s->keyinfo + keynr;
if ((root= info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
info->maria_rtree_recursion_depth= -1;
info->keyread_buff_used= 1;
return maria_rtree_get_req(info, keyinfo, key_length, root, 0);
}
|
O3
|
c
|
maria_rtree_get_first:
movq (%rdi), %rax
movl %esi, %ecx
movq 0x118(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x618df
imulq $0x118, %rcx, %rsi # imm = 0x118
addq 0x570(%rax), %rsi
movl $0xffffffff, 0x6f0(%rdi) # imm = 0xFFFFFFFF
movb $0x1, 0x685(%rdi)
xorl %ecx, %ecx
jmp 0x618f5
pushq %rbp
movq %rsp, %rbp
callq 0xa1c32
movl $0x89, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
|
maria_rtree_get_first:
mov rax, [rdi]
mov ecx, esi
mov rdx, [rax+118h]
mov rdx, [rdx+rcx*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_618DF
imul rsi, rcx, 118h
add rsi, [rax+570h]
mov dword ptr [rdi+6F0h], 0FFFFFFFFh
mov byte ptr [rdi+685h], 1
xor ecx, ecx
jmp short maria_rtree_get_req
loc_618DF:
push rbp
mov rbp, rsp
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 0FFFFFFFFh
pop rbp
retn
|
long long maria_rtree_get_first(long long a1, unsigned int a2)
{
long long v2; // rdx
long long v3; // rsi
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 280LL) + 8LL * a2);
if ( v2 == -1 )
{
*(_DWORD *)my_thread_var(a1) = 137;
return 0xFFFFFFFFLL;
}
else
{
v3 = *(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 280LL * a2;
*(_DWORD *)(a1 + 1776) = -1;
*(_BYTE *)(a1 + 1669) = 1;
return maria_rtree_get_req(a1, v3, v2, 0LL);
}
}
|
maria_rtree_get_first:
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RDX,qword ptr [RAX + 0x118]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP RDX,-0x1
JZ 0x001618df
IMUL RSI,RCX,0x118
ADD RSI,qword ptr [RAX + 0x570]
MOV dword ptr [RDI + 0x6f0],0xffffffff
MOV byte ptr [RDI + 0x685],0x1
XOR ECX,ECX
JMP 0x001618f5
LAB_001618df:
PUSH RBP
MOV RBP,RSP
CALL 0x001a1c32
MOV dword ptr [RAX],0x89
MOV EAX,0xffffffff
POP RBP
RET
|
int8 maria_rtree_get_first(long *param_1,ulong param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 *puVar4;
lVar1 = *(long *)(*(long *)(*param_1 + 0x118) + (param_2 & 0xffffffff) * 8);
if (lVar1 != -1) {
lVar2 = *(long *)(*param_1 + 0x570);
*(int4 *)(param_1 + 0xde) = 0xffffffff;
*(int1 *)((long)param_1 + 0x685) = 1;
uVar3 = maria_rtree_get_req(param_1,(param_2 & 0xffffffff) * 0x118 + lVar2,lVar1,0);
return uVar3;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0xffffffff;
}
|
|
65,192 |
my_snprintf_8bit
|
eloqsql/strings/ctype-simple.c
|
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n __attribute__((unused)),
const char* fmt, ...)
{
va_list args;
size_t result;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
}
|
O3
|
c
|
my_snprintf_8bit:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rsi, %rdi
leaq -0xd0(%rbp), %rsi
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x386bd
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rax
movq %rsi, 0x10(%rax)
leaq 0x10(%rbp), %rsi
movq %rsi, 0x8(%rax)
movabsq $0x3000000020, %rsi # imm = 0x3000000020
movq %rsi, (%rax)
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x5a335
addq $0xd0, %rsp
popq %rbp
retq
|
my_snprintf_8bit:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rdi, rsi
lea rsi, [rbp+var_D0]
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_386BD
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_386BD:
lea rax, [rbp+var_20]
mov [rax+10h], rsi
lea rsi, [rbp+arg_0]
mov [rax+8], rsi
mov rsi, 3000000020h
mov [rax], rsi
mov rsi, rdx
mov rdx, rcx
mov rcx, rax
call my_vsnprintf
add rsp, 0D0h
pop rbp
retn
|
long long my_snprintf_8bit(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14,
char a15)
{
char v16; // [rsp+0h] [rbp-D0h] BYREF
long long v17; // [rsp+20h] [rbp-B0h]
long long v18; // [rsp+28h] [rbp-A8h]
__m128 v19; // [rsp+30h] [rbp-A0h]
__m128 v20; // [rsp+40h] [rbp-90h]
__m128 v21; // [rsp+50h] [rbp-80h]
__m128 v22; // [rsp+60h] [rbp-70h]
__m128 v23; // [rsp+70h] [rbp-60h]
__m128 v24; // [rsp+80h] [rbp-50h]
__m128 v25; // [rsp+90h] [rbp-40h]
__m128 v26; // [rsp+A0h] [rbp-30h]
long long v27; // [rsp+B0h] [rbp-20h]
char *v28; // [rsp+B8h] [rbp-18h]
char *v29; // [rsp+C0h] [rbp-10h]
v19 = a1;
v20 = a2;
v21 = a3;
v22 = a4;
v23 = a5;
v24 = a6;
v25 = a7;
v26 = a8;
v17 = a13;
v18 = a14;
v29 = &v16;
v28 = &a15;
v27 = 0x3000000020LL;
return my_vsnprintf(a10, a11, a12);
}
|
my_snprintf_8bit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RDI,RSI
LEA RSI,[RBP + -0xd0]
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x001386bd
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_001386bd:
LEA RAX,[RBP + -0x20]
MOV qword ptr [RAX + 0x10],RSI
LEA RSI,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RSI
MOV RSI,0x3000000020
MOV qword ptr [RAX],RSI
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,RAX
CALL 0x0015a335
ADD RSP,0xd0
POP RBP
RET
|
void my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_d8 [32];
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
int1 *local_20;
int1 *local_18;
local_18 = local_d8;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_20 = &stack0x00000008;
local_28 = 0x3000000020;
local_b8 = param_13;
local_b0 = param_14;
my_vsnprintf(param_10,param_11,param_12,&local_28);
return;
}
|
|
65,193 |
my_error_unregister_all
|
eloqsql/mysys/my_error.c
|
void my_error_unregister_all(void)
{
struct my_err_head *cursor, *saved_next;
for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next)
{
/* We need this ptr, but we're about to free its container, so save it. */
saved_next= cursor->meh_next;
my_free(cursor);
}
my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */
my_errmsgs_list= &my_errmsgs_globerrs;
}
|
O0
|
c
|
my_error_unregister_all:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x1d7b79(%rip), %rax # 0x2cab38
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xf2fe8
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xfa370
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf2fc3
movq $0x0, 0x1d7b45(%rip) # 0x2cab38
leaq 0x1d7b3e(%rip), %rax # 0x2cab38
movq %rax, 0x1d7b2f(%rip) # 0x2cab30
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_error_unregister_all:
push rbp
mov rbp, rsp
sub rsp, 10h
mov rax, cs:my_errmsgs_globerrs
mov [rbp+var_8], rax
loc_F2FC3:
cmp [rbp+var_8], 0
jz short loc_F2FE8
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rdi, [rbp+var_8]
call my_free
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp short loc_F2FC3
loc_F2FE8:
mov cs:my_errmsgs_globerrs, 0
lea rax, my_errmsgs_globerrs
mov cs:my_errmsgs_list, rax
add rsp, 10h
pop rbp
retn
|
long long *my_error_unregister_all()
{
long long *result; // rax
_QWORD *v1; // [rsp+0h] [rbp-10h]
_QWORD *i; // [rsp+8h] [rbp-8h]
for ( i = (_QWORD *)my_errmsgs_globerrs; i; i = v1 )
{
v1 = (_QWORD *)*i;
my_free(i);
}
my_errmsgs_globerrs = 0LL;
result = &my_errmsgs_globerrs;
my_errmsgs_list = &my_errmsgs_globerrs;
return result;
}
|
my_error_unregister_all:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,qword ptr [0x003cab38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001f2fc3:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001f2fe8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001fa370
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f2fc3
LAB_001f2fe8:
MOV qword ptr [0x003cab38],0x0
LEA RAX,[0x3cab38]
MOV qword ptr [0x003cab30],RAX
ADD RSP,0x10
POP RBP
RET
|
void my_error_unregister_all(void)
{
int8 *puVar1;
int8 *local_10;
local_10 = my_errmsgs_globerrs;
while (local_10 != (int8 *)0x0) {
puVar1 = (int8 *)*local_10;
my_free(local_10);
local_10 = puVar1;
}
my_errmsgs_globerrs = (int8 *)0x0;
my_errmsgs_list = (int *)&my_errmsgs_globerrs;
return;
}
|
|
65,194 |
ma_write_init_block_record
|
eloqsql/storage/maria/ma_blockrec.c
|
MARIA_RECORD_POS _ma_write_init_block_record(MARIA_HA *info,
const uchar *record)
{
DBUG_ENTER("_ma_write_init_block_record");
calc_record_size(info, record, &info->cur_row);
if (allocate_and_write_block_record(info, record,
&info->cur_row, LSN_ERROR))
DBUG_RETURN(HA_OFFSET_ERROR);
DBUG_RETURN(info->cur_row.lastpos);
}
|
O0
|
c
|
ma_write_init_block_record:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x80, %rdx
callq 0x51830
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x80, %rdx
movl $0x1, %ecx
callq 0x51e50
cmpb $0x0, %al
je 0x51815
jmp 0x5180b
movq $-0x1, -0x8(%rbp)
jmp 0x51826
jmp 0x51817
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
|
_ma_write_init_block_record:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_10]
add rdx, 80h
call calc_record_size
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_10]
add rdx, 80h
mov ecx, 1
call allocate_and_write_block_record
cmp al, 0
jz short loc_51815
jmp short $+2
loc_5180B:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_51826
loc_51815:
jmp short $+2
loc_51817:
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_8], rax
loc_51826:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
long long ma_write_init_block_record(long long a1, long long a2)
{
calc_record_size(a1, a2, a1 + 128);
if ( (unsigned __int8)allocate_and_write_block_record(a1, a2, a1 + 128, 1LL) )
return -1LL;
else
return *(_QWORD *)(a1 + 152);
}
|
_ma_write_init_block_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x80
CALL 0x00151830
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x80
MOV ECX,0x1
CALL 0x00151e50
CMP AL,0x0
JZ 0x00151815
JMP 0x0015180b
LAB_0015180b:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00151826
LAB_00151815:
JMP 0x00151817
LAB_00151817:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x8],RAX
LAB_00151826:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int8 _ma_write_init_block_record(long param_1,int8 param_2)
{
char cVar1;
int8 local_10;
calc_record_size(param_1,param_2,param_1 + 0x80);
cVar1 = allocate_and_write_block_record(param_1,param_2,param_1 + 0x80,1);
if (cVar1 == '\0') {
local_10 = *(int8 *)(param_1 + 0x98);
}
else {
local_10 = 0xffffffffffffffff;
}
return local_10;
}
|
|
65,195 |
ImPlot::PlotBarsG(char const*, ImPlotPoint (*)(int, void*), void*, int, double, int)
|
zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp
|
void PlotBarsG(const char* label_id, ImPlotGetter getter_func, void* data, int count, double bar_size, ImPlotBarsFlags flags) {
if (ImHasFlag(flags, ImPlotBarsFlags_Horizontal)) {
GetterFuncPtr getter1(getter_func, data, count);
GetterOverrideX<GetterFuncPtr> getter2(getter1,0);
PlotBarsHEx(label_id, getter1, getter2, bar_size, flags);
}
else {
GetterFuncPtr getter1(getter_func, data, count);
GetterOverrideY<GetterFuncPtr> getter2(getter1,0);
PlotBarsVEx(label_id, getter1, getter2, bar_size, flags);
}
}
|
O1
|
cpp
|
ImPlot::PlotBarsG(char const*, ImPlotPoint (*)(int, void*), void*, int, double, int):
subq $0xa8, %rsp
btl $0xa, %r8d
jb 0xcba80
leaq 0x60(%rsp), %rax
movq %rsi, (%rax)
movq %rdx, 0x8(%rax)
movl %ecx, 0x10(%rax)
movq (%rax), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movl 0x14(%rax), %edx
movl %ecx, 0x40(%rsp)
movl %edx, 0x44(%rsp)
movq $0x0, 0x48(%rsp)
movl %ecx, 0x50(%rsp)
movq 0x50(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movaps 0x30(%rsp), %xmm1
movaps 0x40(%rsp), %xmm2
movups %xmm2, 0x10(%rsp)
movups %xmm1, (%rsp)
movq %rax, %rsi
movl %r8d, %edx
callq 0x1059c1
jmp 0xcbac4
leaq 0x90(%rsp), %rax
movq %rsi, (%rax)
movq %rdx, 0x8(%rax)
movl %ecx, 0x10(%rax)
movq (%rax), %rsi
movq 0x8(%rax), %r9
leaq 0x60(%rsp), %rdx
movq %rsi, (%rdx)
movq %r9, 0x8(%rdx)
movl 0x14(%rax), %esi
movl %ecx, 0x10(%rdx)
movl %esi, 0x14(%rdx)
movq $0x0, 0x18(%rdx)
movl %ecx, 0x20(%rdx)
movq %rax, %rsi
movl %r8d, %ecx
callq 0x1058b8
addq $0xa8, %rsp
retq
|
_ZN6ImPlot9PlotBarsGEPKcPF11ImPlotPointiPvES3_idi:
sub rsp, 0A8h
bt r8d, 0Ah
jb short loc_CBA80
lea rax, [rsp+0A8h+var_48]
mov [rax], rsi
mov [rax+8], rdx
mov [rax+10h], ecx
mov rdx, [rax]
mov qword ptr [rsp+0A8h+var_78], rdx
mov rdx, [rax+8]
mov qword ptr [rsp+0A8h+var_78+8], rdx
mov edx, [rax+14h]
mov dword ptr [rsp+0A8h+var_68], ecx
mov dword ptr [rsp+0A8h+var_68+4], edx
mov qword ptr [rsp+0A8h+var_68+8], 0
mov dword ptr [rsp+0A8h+var_58], ecx
mov rcx, [rsp+0A8h+var_58]
mov [rsp+0A8h+var_88], rcx
movaps xmm1, [rsp+0A8h+var_78]
movaps xmm2, [rsp+0A8h+var_68]
movups [rsp+0A8h+var_98], xmm2
movups [rsp+0A8h+var_A8], xmm1
mov rsi, rax
mov edx, r8d
call _ZN6ImPlot11PlotBarsVExINS_13GetterFuncPtrENS_15GetterOverrideYIS1_EEEEvPKcRKT_T0_di; ImPlot::PlotBarsVEx<ImPlot::GetterFuncPtr,ImPlot::GetterOverrideY<ImPlot::GetterFuncPtr>>(char const*,ImPlot::GetterFuncPtr const&,ImPlot::GetterOverrideY<ImPlot::GetterFuncPtr>,double,int)
jmp short loc_CBAC4
loc_CBA80:
lea rax, [rsp+0A8h+var_18]
mov [rax], rsi
mov [rax+8], rdx
mov [rax+10h], ecx
mov rsi, [rax]
mov r9, [rax+8]
lea rdx, [rsp+0A8h+var_48]
mov [rdx], rsi
mov [rdx+8], r9
mov esi, [rax+14h]
mov [rdx+10h], ecx
mov [rdx+14h], esi
mov qword ptr [rdx+18h], 0
mov [rdx+20h], ecx
mov rsi, rax
mov ecx, r8d
call _ZN6ImPlot11PlotBarsHExINS_13GetterFuncPtrENS_15GetterOverrideXIS1_EEEEvPKcRKT_RKT0_di; ImPlot::PlotBarsHEx<ImPlot::GetterFuncPtr,ImPlot::GetterOverrideX<ImPlot::GetterFuncPtr>>(char const*,ImPlot::GetterFuncPtr const&,ImPlot::GetterOverrideX<ImPlot::GetterFuncPtr> const&,double,int)
loc_CBAC4:
add rsp, 0A8h
retn
|
long long ImPlot::PlotBarsG(long long a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6)
{
long long v7; // [rsp+60h] [rbp-48h] BYREF
long long v8; // [rsp+68h] [rbp-40h]
unsigned int v9; // [rsp+70h] [rbp-38h]
unsigned int v10; // [rsp+74h] [rbp-34h]
long long v11; // [rsp+78h] [rbp-30h]
unsigned int v12; // [rsp+80h] [rbp-28h]
_QWORD v13[2]; // [rsp+90h] [rbp-18h] BYREF
unsigned int v14; // [rsp+A0h] [rbp-8h]
unsigned int v15; // [rsp+A4h] [rbp-4h]
if ( (a5 & 0x400) != 0 )
{
v13[0] = a2;
v13[1] = a3;
v14 = a4;
v7 = a2;
v8 = a3;
v9 = a4;
v10 = v15;
v11 = 0LL;
v12 = a4;
return ImPlot::PlotBarsHEx<ImPlot::GetterFuncPtr,ImPlot::GetterOverrideX<ImPlot::GetterFuncPtr>>(
a1,
v13,
&v7,
(unsigned int)a5);
}
else
{
v7 = a2;
v8 = a3;
v9 = a4;
return ImPlot::PlotBarsVEx<ImPlot::GetterFuncPtr,ImPlot::GetterOverrideY<ImPlot::GetterFuncPtr>>(
a1,
&v7,
(unsigned int)a5,
a4,
a5,
a6,
a2,
a3,
__PAIR64__(v10, a4),
0LL,
a4);
}
}
|
PlotBarsG:
SUB RSP,0xa8
BT R8D,0xa
JC 0x001cba80
LEA RAX,[RSP + 0x60]
MOV qword ptr [RAX],RSI
MOV qword ptr [RAX + 0x8],RDX
MOV dword ptr [RAX + 0x10],ECX
MOV RDX,qword ptr [RAX]
MOV qword ptr [RSP + 0x30],RDX
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x38],RDX
MOV EDX,dword ptr [RAX + 0x14]
MOV dword ptr [RSP + 0x40],ECX
MOV dword ptr [RSP + 0x44],EDX
MOV qword ptr [RSP + 0x48],0x0
MOV dword ptr [RSP + 0x50],ECX
MOV RCX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x20],RCX
MOVAPS XMM1,xmmword ptr [RSP + 0x30]
MOVAPS XMM2,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP + 0x10],XMM2
MOVUPS xmmword ptr [RSP],XMM1
MOV RSI,RAX
MOV EDX,R8D
CALL 0x002059c1
JMP 0x001cbac4
LAB_001cba80:
LEA RAX,[RSP + 0x90]
MOV qword ptr [RAX],RSI
MOV qword ptr [RAX + 0x8],RDX
MOV dword ptr [RAX + 0x10],ECX
MOV RSI,qword ptr [RAX]
MOV R9,qword ptr [RAX + 0x8]
LEA RDX,[RSP + 0x60]
MOV qword ptr [RDX],RSI
MOV qword ptr [RDX + 0x8],R9
MOV ESI,dword ptr [RAX + 0x14]
MOV dword ptr [RDX + 0x10],ECX
MOV dword ptr [RDX + 0x14],ESI
MOV qword ptr [RDX + 0x18],0x0
MOV dword ptr [RDX + 0x20],ECX
MOV RSI,RAX
MOV ECX,R8D
CALL 0x002058b8
LAB_001cbac4:
ADD RSP,0xa8
RET
|
/* ImPlot::PlotBarsG(char const*, ImPlotPoint (*)(int, void*), void*, int, double, int) */
void ImPlot::PlotBarsG(char *param_1,_func_ImPlotPoint_int_void_ptr *param_2,void *param_3,
int param_4,double param_5,int param_6)
{
_func_ImPlotPoint_int_void_ptr *local_48;
void *local_40;
int local_38;
int8 local_30;
int local_28;
_func_ImPlotPoint_int_void_ptr *local_18;
void *local_10;
int local_8;
local_48 = param_2;
local_40 = param_3;
local_38 = param_4;
if (((uint)param_6 >> 10 & 1) == 0) {
PlotBarsVEx<ImPlot::GetterFuncPtr,ImPlot::GetterOverrideY<ImPlot::GetterFuncPtr>>
(param_1,&local_48,param_6);
}
else {
local_30 = 0;
local_28 = param_4;
local_18 = param_2;
local_10 = param_3;
local_8 = param_4;
PlotBarsHEx<ImPlot::GetterFuncPtr,ImPlot::GetterOverrideX<ImPlot::GetterFuncPtr>>
(param_1,(GetterFuncPtr *)&local_18,(GetterOverrideX *)&local_48,param_5,param_6);
}
return;
}
|
|
65,196 |
google::protobuf::compiler::java::ImmutableStringFieldLiteGenerator::GenerateMembers(google::protobuf::io::Printer*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field_lite.cc
|
void ImmutableStringFieldLiteGenerator::GenerateMembers(
io::Printer* printer) const {
printer->Print(variables_, "private java.lang.String $name$_;\n");
PrintExtraFieldInfo(variables_, printer);
if (HasHazzer(descriptor_)) {
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(
variables_,
"@java.lang.Override\n"
"$deprecation$public boolean ${$has$capitalized_name$$}$() {\n"
" return $get_has_field_bit_message$;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
}
WriteFieldAccessorDocComment(printer, descriptor_, GETTER);
printer->Print(
variables_,
"@java.lang.Override\n"
"$deprecation$public java.lang.String ${$get$capitalized_name$$}$() {\n"
" return $name$_;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER);
printer->Print(
variables_,
"@java.lang.Override\n"
"$deprecation$public com.google.protobuf.ByteString\n"
" ${$get$capitalized_name$Bytes$}$() {\n"
" return com.google.protobuf.ByteString.copyFromUtf8($name$_);\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldAccessorDocComment(printer, descriptor_, SETTER);
printer->Print(variables_,
"private void set$capitalized_name$(\n"
" java.lang.String value) {\n"
"$null_check$"
" $set_has_field_bit_message$\n"
" $name$_ = value;\n"
"}\n");
WriteFieldAccessorDocComment(printer, descriptor_, CLEARER);
printer->Print(variables_,
"private void clear$capitalized_name$() {\n"
" $clear_has_field_bit_message$\n"
// The default value is not a simple literal so we want to
// avoid executing it multiple times. Instead, get the default
// out of the default instance.
" $name$_ = getDefaultInstance().get$capitalized_name$();\n"
"}\n");
WriteFieldStringBytesAccessorDocComment(printer, descriptor_, SETTER);
printer->Print(variables_,
"private void set$capitalized_name$Bytes(\n"
" com.google.protobuf.ByteString value) {\n");
if (CheckUtf8(descriptor_)) {
printer->Print(variables_, " checkByteStringIsUtf8(value);\n");
}
printer->Print(variables_,
" $name$_ = value.toStringUtf8();\n"
" $set_has_field_bit_message$\n"
"}\n");
}
|
O3
|
cpp
|
google::protobuf::compiler::java::ImmutableStringFieldLiteGenerator::GenerateMembers(google::protobuf::io::Printer*) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x10(%rdi), %r14
leaq 0xfa644(%rip), %rdx # 0x1e3fb8
movq %rsi, %rdi
movq %r14, %rsi
callq 0x16cd32
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd5ca2
movq 0x8(%r15), %r12
movb 0x1(%r12), %al
notb %al
testb $0x60, %al
je 0xe99fa
movq %r12, %rdi
callq 0x11d7ce
testq %rax, %rax
jne 0xe99be
movb 0x1(%r12), %al
testb $0x2, %al
jne 0xe99be
movq 0x10(%r12), %rcx
cmpb $0x2, 0x3(%rcx)
jne 0xe9b2d
movq 0x8(%r15), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xcff9a
leaq 0xef827(%rip), %rdx # 0x1d91fc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq 0x8(%r15), %rcx
leaq 0x1066ee(%rip), %rsi # 0x1f00d9
leaq 0xf6cdb(%rip), %rdx # 0x1e06cd
movq %rbx, %rdi
callq 0xafc7e
movq 0x8(%r15), %rsi
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xcff9a
leaq 0xfa5c7(%rip), %rdx # 0x1e3fdb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq 0x8(%r15), %rcx
leaq 0x1066af(%rip), %r12 # 0x1f00d9
leaq 0xf6c9c(%rip), %r13 # 0x1e06cd
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r15), %rsi
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xd033e
leaq 0xfa5f0(%rip), %rdx # 0x1e4049
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq 0x8(%r15), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r15), %rsi
movq %rbx, %rdi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0xcff9a
leaq 0xfa66b(%rip), %rdx # 0x1e40fb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq 0x8(%r15), %rsi
movq %rbx, %rdi
movl $0x3, %edx
xorl %ecx, %ecx
callq 0xcff9a
leaq 0xfa6c8(%rip), %rdx # 0x1e417d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq 0x8(%r15), %rsi
movq %rbx, %rdi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0xd033e
leaq 0xfa729(%rip), %rdx # 0x1e4203
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
movq 0x8(%r15), %rax
movq 0x10(%rax), %rax
cmpb $0x3, 0x3(%rax)
je 0xe9b00
movq 0x78(%rax), %rax
cmpb $0x1, 0x9a(%rax)
jne 0xe9b12
leaq 0xf846f(%rip), %rdx # 0x1e1f76
movq %rbx, %rdi
movq %r14, %rsi
callq 0x16cd32
leaq 0xfa740(%rip), %rdx # 0x1e4259
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x16cd32
testb $0x10, %al
sete %cl
movq 0x28(%r12), %rax
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0xe99fa
cmpl $0x1, 0x4(%rax)
jne 0xe99be
movq 0x20(%rax), %rax
testb $0x2, 0x1(%rax)
je 0xe99be
jmp 0xe99fa
|
_ZNK6google8protobuf8compiler4java33ImmutableStringFieldLiteGenerator15GenerateMembersEPNS0_2io7PrinterE:
push r15; int
push r14; int
push r13; char
push r12; int
push rbx; void *
mov rbx, rsi
mov r15, rdi
lea r14, [rdi+10h]
lea rdx, aPrivateJavaLan_0; "private java.lang.String $name$_;\n"
mov rdi, rsi; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rdi, r14
mov rsi, rbx
call _ZN6google8protobuf8compiler4java19PrintExtraFieldInfoERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPNS0_2io7PrinterE; google::protobuf::compiler::java::PrintExtraFieldInfo(std::map<std::string,std::string> const&,google::protobuf::io::Printer *)
mov r12, [r15+8]
mov al, [r12+1]
not al
test al, 60h
jz short loc_E99FA
mov rdi, r12; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
test rax, rax
jnz short loc_E99BE
mov al, [r12+1]
test al, 2
jnz short loc_E99BE
mov rcx, [r12+10h]
cmp byte ptr [rcx+3], 2
jnz loc_E9B2D
loc_E99BE:
mov rsi, [r15+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
xor edx, edx
xor ecx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aJavaLangOverri_58; "@java.lang.Override\n$deprecation$publi"...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r15+8]
lea rsi, a0oneof1+0Bh; "{"
lea rdx, aKotlinJvmJvmsy_32+0E3h; "}"
mov rdi, rbx
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
loc_E99FA:
mov rsi, [r15+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 1
xor ecx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aJavaLangOverri_87; "@java.lang.Override\n$deprecation$publi"...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r15+8]
lea r12, a0oneof1+0Bh; "{"
lea r13, aKotlinJvmJvmsy_32+0E3h; "}"
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r15+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 1
xor ecx, ecx
call _ZN6google8protobuf8compiler4java39WriteFieldStringBytesAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldStringBytesAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aJavaLangOverri_88; "@java.lang.Override\n$deprecation$publi"...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r15+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r15+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 2
xor ecx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aPrivateVoidSet_5; "private void set$capitalized_name$(\n "...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rsi, [r15+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 3
xor ecx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aPrivateVoidCle_4; "private void clear$capitalized_name$() "...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rsi, [r15+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 2
xor ecx, ecx
call _ZN6google8protobuf8compiler4java39WriteFieldStringBytesAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldStringBytesAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aPrivateVoidSet_6; "private void set$capitalized_name$Bytes"...
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rax, [r15+8]
mov rax, [rax+10h]
cmp byte ptr [rax+3], 3
jz short loc_E9B00
mov rax, [rax+78h]
cmp byte ptr [rax+9Ah], 1
jnz short loc_E9B12
loc_E9B00:
lea rdx, aCheckbytestrin; " checkByteStringIsUtf8(value);\n"
mov rdi, rbx; this
mov rsi, r14
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
loc_E9B12:
lea rdx, aNameValueTostr; " $name$_ = value.toStringUtf8();\n $s"...
mov rdi, rbx; this
mov rsi, r14
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
loc_E9B2D:
test al, 10h
setz cl
mov rax, [r12+28h]
test rax, rax
setz dl
or dl, cl
jnz loc_E99FA
cmp dword ptr [rax+4], 1
jnz loc_E99BE
mov rax, [rax+20h]
test byte ptr [rax+1], 2
jz loc_E99BE
jmp loc_E99FA
|
GenerateMembers:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RDI + 0x10]
LEA RDX,[0x2e3fb8]
MOV RDI,RSI
MOV RSI,R14
CALL 0x0026cd32
MOV RDI,R14
MOV RSI,RBX
CALL 0x001d5ca2
MOV R12,qword ptr [R15 + 0x8]
MOV AL,byte ptr [R12 + 0x1]
NOT AL
TEST AL,0x60
JZ 0x001e99fa
MOV RDI,R12
CALL 0x0021d7ce
TEST RAX,RAX
JNZ 0x001e99be
MOV AL,byte ptr [R12 + 0x1]
TEST AL,0x2
JNZ 0x001e99be
MOV RCX,qword ptr [R12 + 0x10]
CMP byte ptr [RCX + 0x3],0x2
JNZ 0x001e9b2d
LAB_001e99be:
MOV RSI,qword ptr [R15 + 0x8]
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001cff9a
LEA RDX,[0x2d91fc]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV RCX,qword ptr [R15 + 0x8]
LEA RSI,[0x2f00d9]
LEA RDX,[0x2e06cd]
MOV RDI,RBX
CALL 0x001afc7e
LAB_001e99fa:
MOV RSI,qword ptr [R15 + 0x8]
MOV RDI,RBX
MOV EDX,0x1
XOR ECX,ECX
CALL 0x001cff9a
LEA RDX,[0x2e3fdb]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV RCX,qword ptr [R15 + 0x8]
LEA R12,[0x2f00d9]
LEA R13,[0x2e06cd]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R15 + 0x8]
MOV RDI,RBX
MOV EDX,0x1
XOR ECX,ECX
CALL 0x001d033e
LEA RDX,[0x2e4049]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV RCX,qword ptr [R15 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R15 + 0x8]
MOV RDI,RBX
MOV EDX,0x2
XOR ECX,ECX
CALL 0x001cff9a
LEA RDX,[0x2e40fb]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV RSI,qword ptr [R15 + 0x8]
MOV RDI,RBX
MOV EDX,0x3
XOR ECX,ECX
CALL 0x001cff9a
LEA RDX,[0x2e417d]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV RSI,qword ptr [R15 + 0x8]
MOV RDI,RBX
MOV EDX,0x2
XOR ECX,ECX
CALL 0x001d033e
LEA RDX,[0x2e4203]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
MOV RAX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
CMP byte ptr [RAX + 0x3],0x3
JZ 0x001e9b00
MOV RAX,qword ptr [RAX + 0x78]
CMP byte ptr [RAX + 0x9a],0x1
JNZ 0x001e9b12
LAB_001e9b00:
LEA RDX,[0x2e1f76]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0026cd32
LAB_001e9b12:
LEA RDX,[0x2e4259]
MOV RDI,RBX
MOV RSI,R14
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x0026cd32
LAB_001e9b2d:
TEST AL,0x10
SETZ CL
MOV RAX,qword ptr [R12 + 0x28]
TEST RAX,RAX
SETZ DL
OR DL,CL
JNZ 0x001e99fa
CMP dword ptr [RAX + 0x4],0x1
JNZ 0x001e99be
MOV RAX,qword ptr [RAX + 0x20]
TEST byte ptr [RAX + 0x1],0x2
JZ 0x001e99be
JMP 0x001e99fa
|
/* google::protobuf::compiler::java::ImmutableStringFieldLiteGenerator::GenerateMembers(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::java::ImmutableStringFieldLiteGenerator::GenerateMembers
(ImmutableStringFieldLiteGenerator *this,Printer *param_1)
{
map *pmVar1;
FieldDescriptor *this_00;
long lVar2;
pmVar1 = (map *)(this + 0x10);
io::Printer::Print(param_1,pmVar1,"private java.lang.String $name$_;\n");
PrintExtraFieldInfo(pmVar1,param_1);
this_00 = *(FieldDescriptor **)(this + 8);
if (((~(byte)this_00[1] & 0x60) != 0) &&
((((lVar2 = FieldDescriptor::message_type(this_00), lVar2 != 0 || (((byte)this_00[1] & 2) != 0)
) || (*(char *)(*(long *)(this_00 + 0x10) + 3) == '\x02')) ||
((lVar2 = *(long *)(this_00 + 0x28), lVar2 != 0 && ((byte)this_00[1] & 0x10) != 0 &&
((*(int *)(lVar2 + 4) != 1 || ((*(byte *)(*(long *)(lVar2 + 0x20) + 1) & 2) == 0)))))))) {
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),0,0);
io::Printer::Print(param_1,pmVar1,
"@java.lang.Override\n$deprecation$public boolean ${$has$capitalized_name$$}$() {\n return $get_has_field_bit_message$;\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
}
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),1,0);
io::Printer::Print(param_1,pmVar1,
"@java.lang.Override\n$deprecation$public java.lang.String ${$get$capitalized_name$$}$() {\n return $name$_;\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldStringBytesAccessorDocComment(param_1,*(int8 *)(this + 8),1,0);
io::Printer::Print(param_1,pmVar1,
"@java.lang.Override\n$deprecation$public com.google.protobuf.ByteString\n ${$get$capitalized_name$Bytes$}$() {\n return com.google.protobuf.ByteString.copyFromUtf8($name$_);\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),2,0);
io::Printer::Print(param_1,pmVar1,
"private void set$capitalized_name$(\n java.lang.String value) {\n$null_check$ $set_has_field_bit_message$\n $name$_ = value;\n}\n"
);
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),3,0);
io::Printer::Print(param_1,pmVar1,
"private void clear$capitalized_name$() {\n $clear_has_field_bit_message$\n $name$_ = getDefaultInstance().get$capitalized_name$();\n}\n"
);
WriteFieldStringBytesAccessorDocComment(param_1,*(int8 *)(this + 8),2,0);
io::Printer::Print(param_1,pmVar1,
"private void set$capitalized_name$Bytes(\n com.google.protobuf.ByteString value) {\n"
);
if ((*(char *)(*(long *)(*(long *)(this + 8) + 0x10) + 3) == '\x03') ||
(*(char *)(*(long *)(*(long *)(*(long *)(this + 8) + 0x10) + 0x78) + 0x9a) == '\x01')) {
io::Printer::Print(param_1,pmVar1," checkByteStringIsUtf8(value);\n");
}
io::Printer::Print(param_1,pmVar1,
" $name$_ = value.toStringUtf8();\n $set_has_field_bit_message$\n}\n");
return;
}
|
||
65,197 |
lf_dynarray_value
|
eloqsql/mysys/lf_dynarray.c
|
void *lf_dynarray_value(LF_DYNARRAY *array, uint idx)
{
void * ptr, * volatile * ptr_ptr= 0;
int i;
for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--)
/* no-op */;
ptr_ptr= &array->level[i];
idx-= dynarray_idxes_in_prev_levels[i];
for (; i > 0; i--)
{
if (!(ptr= *ptr_ptr))
return(NULL);
ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i];
idx %= dynarray_idxes_in_prev_level[i];
}
if (!(ptr= *ptr_ptr))
return(NULL);
return ((uchar*)ptr) + array->size_of_element * idx;
}
|
O3
|
c
|
lf_dynarray_value:
pushq %rbp
movq %rsp, %rbp
movl %esi, %edx
movl %esi, %r8d
leaq 0x20(%rdi), %rax
movl $0x5, %esi
movl $0x4, %ecx
leaq 0x39fde(%rip), %r9 # 0x81150
movq -0x8(%r9,%rcx,8), %r10
decl %esi
decq %rcx
addq $-0x8, %rax
cmpq %r8, %r10
ja 0x47172
subl %r10d, %edx
testq %rcx, %rcx
jle 0x471bd
leal -0x1(%rsi), %ecx
movl %ecx, %ecx
leaq 0x39fd7(%rip), %r8 # 0x81170
leaq (%r8,%rcx,8), %r8
xorl %ecx, %ecx
movq (%rax), %r9
testq %r9, %r9
je 0x471d0
movl %edx, %eax
xorl %edx, %edx
divq (%r8)
leaq (%r9,%rax,8), %rax
decl %esi
addq $-0x8, %r8
cmpl $0x1, %esi
jg 0x4719f
movq (%rax), %rcx
testq %rcx, %rcx
je 0x471ce
imull 0x20(%rdi), %edx
addq %rdx, %rcx
jmp 0x471d0
xorl %ecx, %ecx
movq %rcx, %rax
popq %rbp
retq
|
lf_dynarray_value:
push rbp
mov rbp, rsp
mov edx, esi
mov r8d, esi
lea rax, [rdi+20h]
mov esi, 5
mov ecx, 4
lea r9, dynarray_idxes_in_prev_levels
loc_47172:
mov r10, [r9+rcx*8-8]
dec esi
dec rcx
add rax, 0FFFFFFFFFFFFFFF8h
cmp r10, r8
ja short loc_47172
sub edx, r10d
test rcx, rcx
jle short loc_471BD
lea ecx, [rsi-1]
mov ecx, ecx
lea r8, dynarray_idxes_in_prev_level
lea r8, [r8+rcx*8]
xor ecx, ecx
loc_4719F:
mov r9, [rax]
test r9, r9
jz short loc_471D0
mov eax, edx
xor edx, edx
div qword ptr [r8]
lea rax, [r9+rax*8]
dec esi
add r8, 0FFFFFFFFFFFFFFF8h
cmp esi, 1
jg short loc_4719F
loc_471BD:
mov rcx, [rax]
test rcx, rcx
jz short loc_471CE
imul edx, [rdi+20h]
add rcx, rdx
jmp short loc_471D0
loc_471CE:
xor ecx, ecx
loc_471D0:
mov rax, rcx
pop rbp
retn
|
long long lf_dynarray_value(long long a1, unsigned int a2)
{
unsigned long long v3; // r8
_QWORD *v4; // rax
int v5; // esi
long long v6; // rcx
unsigned long long v7; // r10
unsigned long long v8; // rdx
_QWORD *v9; // r8
long long v10; // rcx
unsigned long long v11; // rtt
v3 = a2;
v4 = (_QWORD *)(a1 + 32);
v5 = 5;
v6 = 4LL;
do
{
v7 = dynarray_idxes_in_prev_levels[v6 - 1];
--v5;
--v6;
--v4;
}
while ( v7 > v3 );
LODWORD(v8) = a2 - v7;
if ( v6 <= 0 )
{
LABEL_7:
if ( *v4 )
return (unsigned int)(*(_DWORD *)(a1 + 32) * v8) + *v4;
else
return 0LL;
}
else
{
v9 = (_QWORD *)((char *)&dynarray_idxes_in_prev_level + 8 * (unsigned int)(v5 - 1));
v10 = 0LL;
while ( *v4 )
{
v11 = (unsigned int)v8;
v8 = (unsigned long long)(unsigned int)v8 % *v9;
v4 = (_QWORD *)(*v4 + 8 * (v11 / *v9));
--v5;
--v9;
if ( v5 <= 1 )
goto LABEL_7;
}
}
return v10;
}
|
lf_dynarray_value:
PUSH RBP
MOV RBP,RSP
MOV EDX,ESI
MOV R8D,ESI
LEA RAX,[RDI + 0x20]
MOV ESI,0x5
MOV ECX,0x4
LEA R9,[0x181150]
LAB_00147172:
MOV R10,qword ptr [R9 + RCX*0x8 + -0x8]
DEC ESI
DEC RCX
ADD RAX,-0x8
CMP R10,R8
JA 0x00147172
SUB EDX,R10D
TEST RCX,RCX
JLE 0x001471bd
LEA ECX,[RSI + -0x1]
MOV ECX,ECX
LEA R8,[0x181170]
LEA R8,[R8 + RCX*0x8]
XOR ECX,ECX
LAB_0014719f:
MOV R9,qword ptr [RAX]
TEST R9,R9
JZ 0x001471d0
MOV EAX,EDX
XOR EDX,EDX
DIV qword ptr [R8]
LEA RAX,[R9 + RAX*0x8]
DEC ESI
ADD R8,-0x8
CMP ESI,0x1
JG 0x0014719f
LAB_001471bd:
MOV RCX,qword ptr [RAX]
TEST RCX,RCX
JZ 0x001471ce
IMUL EDX,dword ptr [RDI + 0x20]
ADD RCX,RDX
JMP 0x001471d0
LAB_001471ce:
XOR ECX,ECX
LAB_001471d0:
MOV RAX,RCX
POP RBP
RET
|
long lf_dynarray_value(long param_1,uint param_2)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
ulong uVar4;
long *plVar5;
long lVar6;
ulong uVar7;
int iVar8;
int iVar9;
ulong *puVar10;
plVar5 = (long *)(param_1 + 0x20);
lVar6 = 4;
iVar9 = 5;
do {
iVar8 = iVar9;
lVar1 = lVar6 * 8;
iVar9 = iVar8 + -1;
lVar6 = lVar6 + -1;
plVar5 = plVar5 + -1;
} while ((ulong)param_2 < *(ulong *)(&UNK_00181148 + lVar1));
param_2 = param_2 - (int)*(ulong *)(&UNK_00181148 + lVar1);
uVar7 = (ulong)param_2;
if (0 < lVar6) {
puVar10 = (ulong *)(dynarray_idxes_in_prev_level + (ulong)(iVar8 - 2) * 8);
do {
if (*plVar5 == 0) {
return 0;
}
uVar4 = uVar7 & 0xffffffff;
auVar2._8_8_ = 0;
auVar2._0_8_ = *puVar10;
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar4;
uVar7 = SUB168(auVar3 % auVar2,0);
param_2 = SUB164(auVar3 % auVar2,0);
plVar5 = (long *)(*plVar5 + (uVar4 / *puVar10) * 8);
iVar9 = iVar9 + -1;
puVar10 = puVar10 + -1;
} while (1 < iVar9);
}
if (*plVar5 == 0) {
lVar6 = 0;
}
else {
lVar6 = *plVar5 + (ulong)(param_2 * *(int *)(param_1 + 0x20));
}
return lVar6;
}
|
|
65,198 |
used_buffs_register_unlock
|
eloqsql/storage/maria/ma_loghandler.c
|
static void
used_buffs_register_unlock(TRUNSLOG_USED_BUFFERS *buffs,
struct st_translog_buffer *buff
__attribute__((unused)) )
{
DBUG_ENTER("used_buffs_register_unlock");
DBUG_PRINT("enter", ("SUB buffs: %p unlk %u (%p) wrt_ptr: %u (%p)"
" buff %p (%u)",
buffs,
buffs->wrt_ptr, buffs->buff[buffs->wrt_ptr],
buffs->unlck_ptr, buffs->buff[buffs->unlck_ptr],
buff, buff->buffer_no));
DBUG_ASSERT(buffs->buff[buffs->unlck_ptr] == buff);
buffs->unlck_ptr++;
DBUG_VOID_RETURN;
}
|
O0
|
c
|
used_buffs_register_unlock:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x39c2e
jmp 0x39c30
jmp 0x39c32
movq -0x8(%rbp), %rax
movb 0x19(%rax), %cl
addb $0x1, %cl
movb %cl, 0x19(%rax)
jmp 0x39c41
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
used_buffs_register_unlock:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_39C2E:
jmp short $+2
loc_39C30:
jmp short $+2
loc_39C32:
mov rax, [rbp+var_8]
mov cl, [rax+19h]
add cl, 1
mov [rax+19h], cl
jmp short $+2
loc_39C41:
pop rbp
retn
|
long long used_buffs_register_unlock(long long a1)
{
long long result; // rax
result = a1;
++*(_BYTE *)(a1 + 25);
return result;
}
|
used_buffs_register_unlock:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x00139c2e
LAB_00139c2e:
JMP 0x00139c30
LAB_00139c30:
JMP 0x00139c32
LAB_00139c32:
MOV RAX,qword ptr [RBP + -0x8]
MOV CL,byte ptr [RAX + 0x19]
ADD CL,0x1
MOV byte ptr [RAX + 0x19],CL
JMP 0x00139c41
LAB_00139c41:
POP RBP
RET
|
void used_buffs_register_unlock(long param_1)
{
*(char *)(param_1 + 0x19) = *(char *)(param_1 + 0x19) + '\x01';
return;
}
|
|
65,199 |
ma_SHA1Init
|
eloqsql/libmariadb/libmariadb/ma_sha1.c
|
void ma_SHA1Init(_MA_SHA1_CTX * context)
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants.
*/
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
context->state[4] = 0xc3d2e1f0;
}
|
O3
|
c
|
ma_SHA1Init:
pushq %rbp
movq %rsp, %rbp
movl $0x0, 0x18(%rdi)
movaps 0x17f6(%rip), %xmm0 # 0x34070
movups %xmm0, (%rdi)
movl $0xc3d2e1f0, %eax # imm = 0xC3D2E1F0
movq %rax, 0x10(%rdi)
popq %rbp
retq
|
ma_SHA1Init:
push rbp
mov rbp, rsp
mov dword ptr [rdi+18h], 0
movaps xmm0, cs:xmmword_34070
movups xmmword ptr [rdi], xmm0
mov eax, 0C3D2E1F0h
mov [rdi+10h], rax
pop rbp
retn
|
long long ma_SHA1Init(long long a1)
{
long long result; // rax
*(_DWORD *)(a1 + 24) = 0;
*(_OWORD *)a1 = xmmword_34070;
result = 3285377520LL;
*(_QWORD *)(a1 + 16) = 3285377520LL;
return result;
}
|
ma_SHA1Init:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RDI + 0x18],0x0
MOVAPS XMM0,xmmword ptr [0x00134070]
MOVUPS xmmword ptr [RDI],XMM0
MOV EAX,0xc3d2e1f0
MOV qword ptr [RDI + 0x10],RAX
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ma_SHA1Init(int8 *param_1)
{
int8 uVar1;
*(int4 *)(param_1 + 3) = 0;
uVar1 = _UNK_00134078;
*param_1 = _DAT_00134070;
param_1[1] = uVar1;
param_1[2] = 0xc3d2e1f0;
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.