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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
40,200 | my_fwrite | eloqsql/mysys/my_fstream.c | size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
{
size_t writtenbytes =0;
my_off_t seekptr;
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
uint errors;
#endif
DBUG_ENTER("my_fwrite");
DBUG_PRINT("my",("stream:%p Buffer:%p Count: %u MyFlags: %lu",
stream, Buffer, (uint) Count, MyFlags));
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
errors=0;
#endif
seekptr= ftell(stream);
for (;;)
{
size_t written;
if ((written = (size_t) fwrite((char*) Buffer,sizeof(char),
Count, stream)) != Count)
{
DBUG_PRINT("error",("Write only %d bytes", (int) writtenbytes));
my_errno=errno;
if (written != (size_t) -1)
{
seekptr+=written;
Buffer+=written;
writtenbytes+=written;
Count-=written;
}
#ifdef EINTR
if (errno == EINTR)
{
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
continue;
}
#endif
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
if ((errno == ENOSPC || errno == EDQUOT) &&
(MyFlags & MY_WAIT_IF_FULL))
{
wait_for_free_space("[stream]", errors);
errors++;
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
continue;
}
#endif
if (ferror(stream) || (MyFlags & (MY_NABP | MY_FNABP)))
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
my_error(EE_WRITE, MYF(ME_BELL),
my_filename(my_fileno(stream)), errno);
}
writtenbytes= (size_t) -1; /* Return that we got error */
break;
}
}
if (MyFlags & (MY_NABP | MY_FNABP))
writtenbytes= 0; /* Everything OK */
else
writtenbytes+= written;
break;
}
DBUG_RETURN(writtenbytes);
} | O0 | c | my_fwrite:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
jmp 0x862b2
movq -0x8(%rbp), %rdi
callq 0x38c50
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x38ae0
movq %rax, -0x38(%rbp)
cmpq -0x18(%rbp), %rax
je 0x863bd
jmp 0x862e5
jmp 0x862e7
callq 0x389e0
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
callq 0x8ca30
movl -0x3c(%rbp), %ecx
movl %ecx, (%rax)
cmpq $-0x1, -0x38(%rbp)
je 0x86335
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
callq 0x389e0
cmpl $0x4, (%rax)
jne 0x86357
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x86400
jmp 0x862bf
movq -0x8(%rbp), %rdi
callq 0x387e0
cmpl $0x0, %eax
jne 0x86373
movq -0x20(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x863bb
movq -0x20(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
je 0x863b1
movq -0x8(%rbp), %rdi
callq 0x86270
movl %eax, %edi
callq 0x92730
movq %rax, -0x48(%rbp)
callq 0x389e0
movq -0x48(%rbp), %rdx
movl (%rax), %ecx
movl $0x3, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x85630
movq $-0x1, -0x28(%rbp)
jmp 0x863e3
jmp 0x863bd
movq -0x20(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x863d5
movq $0x0, -0x28(%rbp)
jmp 0x863e1
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x863e3
jmp 0x863e5
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_fwrite:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], 0
jmp short $+2
loc_862B2:
mov rdi, [rbp+var_8]
call _ftello64
mov [rbp+var_30], rax
loc_862BF:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_8]
mov esi, 1
call _fwrite
mov [rbp+var_38], rax
cmp rax, [rbp+var_18]
jz loc_863BD
jmp short $+2
loc_862E5:
jmp short $+2
loc_862E7:
call ___errno_location
mov eax, [rax]
mov [rbp+var_3C], eax
call _my_thread_var
mov ecx, [rbp+var_3C]
mov [rax], ecx
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_86335
mov rax, [rbp+var_38]
add rax, [rbp+var_30]
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rcx, [rbp+var_38]
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
loc_86335:
call ___errno_location
cmp dword ptr [rax], 4
jnz short loc_86357
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
xor edx, edx
xor eax, eax
mov ecx, eax
call my_fseek
jmp loc_862BF
loc_86357:
mov rdi, [rbp+var_8]
call _ferror
cmp eax, 0
jnz short loc_86373
mov rax, [rbp+var_20]
and rax, 6
cmp rax, 0
jz short loc_863BB
loc_86373:
mov rax, [rbp+var_20]
and rax, 1Ah
cmp rax, 0
jz short loc_863B1
mov rdi, [rbp+var_8]
call my_fileno
mov edi, eax
call my_filename
mov [rbp+var_48], rax
call ___errno_location
mov rdx, [rbp+var_48]
mov ecx, [rax]
mov edi, 3
mov esi, 4
mov al, 0
call my_error
loc_863B1:
mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jmp short loc_863E3
loc_863BB:
jmp short $+2
loc_863BD:
mov rax, [rbp+var_20]
and rax, 6
cmp rax, 0
jz short loc_863D5
mov [rbp+var_28], 0
jmp short loc_863E1
loc_863D5:
mov rax, [rbp+var_38]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
loc_863E1:
jmp short $+2
loc_863E3:
jmp short $+2
loc_863E5:
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
add rsp, 50h
pop rbp
retn
| long long my_fwrite(long long a1, long long a2, long long a3, char a4)
{
long long v4; // rdi
long long v5; // rdi
unsigned int *v6; // rax
long long v8; // [rsp+8h] [rbp-48h]
int v9; // [rsp+14h] [rbp-3Ch]
long long v10; // [rsp+18h] [rbp-38h]
long long i; // [rsp+20h] [rbp-30h]
long long v12; // [rsp+28h] [rbp-28h]
v12 = 0LL;
for ( i = ftello64(a1); ; my_fseek(a1, i, 0LL, 0LL) )
{
v4 = a2;
v10 = fwrite(a2, 1LL, a3, a1);
if ( v10 == a3 )
goto LABEL_12;
v9 = *(_DWORD *)__errno_location(a2);
*(_DWORD *)my_thread_var() = v9;
if ( v10 != -1 )
{
i += v10;
a2 += v10;
v12 += v10;
a3 -= v10;
}
if ( *(_DWORD *)__errno_location(v4) != 4 )
break;
}
if ( !(unsigned int)ferror(a1) && (a4 & 6) == 0 )
{
LABEL_12:
if ( (a4 & 6) != 0 )
return 0LL;
else
return v12 + v10;
}
if ( (a4 & 0x1A) != 0 )
{
v5 = (unsigned int)my_fileno(a1);
v8 = my_filename(v5);
v6 = (unsigned int *)__errno_location(v5);
my_error(3u, 4LL, v8, *v6);
}
return -1LL;
}
| my_fwrite:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],0x0
JMP 0x001862b2
LAB_001862b2:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00138c50
MOV qword ptr [RBP + -0x30],RAX
LAB_001862bf:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x00138ae0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x001863bd
JMP 0x001862e5
LAB_001862e5:
JMP 0x001862e7
LAB_001862e7:
CALL 0x001389e0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CALL 0x0018ca30
MOV ECX,dword ptr [RBP + -0x3c]
MOV dword ptr [RAX],ECX
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x00186335
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_00186335:
CALL 0x001389e0
CMP dword ptr [RAX],0x4
JNZ 0x00186357
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
XOR EDX,EDX
XOR EAX,EAX
MOV ECX,EAX
CALL 0x00186400
JMP 0x001862bf
LAB_00186357:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001387e0
CMP EAX,0x0
JNZ 0x00186373
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001863bb
LAB_00186373:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x1a
CMP RAX,0x0
JZ 0x001863b1
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00186270
MOV EDI,EAX
CALL 0x00192730
MOV qword ptr [RBP + -0x48],RAX
CALL 0x001389e0
MOV RDX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX]
MOV EDI,0x3
MOV ESI,0x4
MOV AL,0x0
CALL 0x00185630
LAB_001863b1:
MOV qword ptr [RBP + -0x28],-0x1
JMP 0x001863e3
LAB_001863bb:
JMP 0x001863bd
LAB_001863bd:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001863d5
MOV qword ptr [RBP + -0x28],0x0
JMP 0x001863e1
LAB_001863d5:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
LAB_001863e1:
JMP 0x001863e3
LAB_001863e3:
JMP 0x001863e5
LAB_001863e5:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x50
POP RBP
RET
|
long my_fwrite(FILE *param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
int4 uVar2;
size_t sVar3;
int *piVar4;
int8 uVar5;
long local_38;
long local_30;
size_t local_20;
void *local_18;
local_30 = 0;
local_38 = ftello64(param_1);
local_20 = param_3;
local_18 = param_2;
do {
sVar3 = fwrite(local_18,1,local_20,param_1);
if (sVar3 == local_20) {
LAB_001863bd:
if ((param_4 & 6) == 0) {
local_30 = sVar3 + local_30;
}
else {
local_30 = 0;
}
return local_30;
}
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if (sVar3 != 0xffffffffffffffff) {
local_38 = sVar3 + local_38;
local_18 = (void *)(sVar3 + (long)local_18);
local_30 = sVar3 + local_30;
local_20 = local_20 - sVar3;
}
piVar4 = __errno_location();
if (*piVar4 != 4) {
iVar1 = ferror(param_1);
if ((iVar1 != 0) || ((param_4 & 6) != 0)) {
if ((param_4 & 0x1a) != 0) {
uVar2 = my_fileno(param_1);
uVar5 = my_filename(uVar2);
piVar4 = __errno_location();
my_error(3,4,uVar5,*piVar4);
}
return -1;
}
goto LAB_001863bd;
}
my_fseek(param_1,local_38,0,0);
} while( true );
}
| |
40,201 | decltype(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::MatchResultListener*) | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h | static const M& Get(const MatcherBase& m) {
return static_cast<Shared*>(m.buffer_.shared)->value;
} | O3 | c | decltype(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::MatchResultListener*):
movq 0x10(%rdi), %rax
movq 0x8(%rsi), %rdx
cmpq 0x10(%rax), %rdx
jne 0x39791
testq %rdx, %rdx
je 0x39794
pushq %rax
movq 0x8(%rax), %rax
movq (%rsi), %rdi
movq %rax, %rsi
callq 0x8500
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
movb $0x1, %al
retq
nop
| _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE19MatchAndExplainImplINSA_11ValuePolicyINS0_9EqMatcherIS7_EELb0EEEEEDTcldtclsrT_3Getfp_E15MatchAndExplainfp0_clptfp1_6streamEEERKSA_S9_PNS_19MatchResultListenerE:
mov rax, [rdi+10h]
mov rdx, [rsi+8]
cmp rdx, [rax+10h]
jnz short loc_39791
test rdx, rdx
jz short loc_39794
push rax
mov rax, [rax+8]
mov rdi, [rsi]
mov rsi, rax
call _bcmp
test eax, eax
setz al
add rsp, 8
retn
loc_39791:
xor eax, eax
retn
loc_39794:
mov al, 1
retn
| bool testing::internal::MatcherBase<std::string const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::string const&>::ValuePolicy<testing::internal::EqMatcher<std::string>,false>>(
long long a1,
_QWORD *a2)
{
long long v2; // rax
long long v3; // rdx
v2 = *(_QWORD *)(a1 + 16);
v3 = a2[1];
if ( v3 != *(_QWORD *)(v2 + 16) )
return 0;
if ( v3 )
return (unsigned int)bcmp(*a2, *(_QWORD *)(v2 + 8)) == 0;
return 1;
}
| MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string_const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>:
MOV RAX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RSI + 0x8]
CMP RDX,qword ptr [RAX + 0x10]
JNZ 0x00139791
TEST RDX,RDX
JZ 0x00139794
PUSH RAX
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RSI]
MOV RSI,RAX
CALL 0x00108500
TEST EAX,EAX
SETZ AL
ADD RSP,0x8
RET
LAB_00139791:
XOR EAX,EAX
RET
LAB_00139794:
MOV AL,0x1
RET
|
/* decltype (((testing::internal::MatcherBase<std::__cxx11::string
const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >,
false>::Get({parm#1})).MatchAndExplain)({parm#2}, ({parm#3}->stream)()))
testing::internal::MatcherBase<std::__cxx11::string
const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string
const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >, false>
>(testing::internal::MatcherBase<std::__cxx11::string const&> const&, std::__cxx11::string
const&, testing::MatchResultListener*) */
int8
testing::internal::MatcherBase<std::__cxx11::string_const&>::
MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string_const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>
(MatcherBase *param_1,string *param_2,MatchResultListener *param_3)
{
long lVar1;
size_t __n;
int iVar2;
int4 extraout_var;
lVar1 = *(long *)(param_1 + 0x10);
__n = *(size_t *)(param_2 + 8);
if (__n != *(size_t *)(lVar1 + 0x10)) {
return 0;
}
if (__n != 0) {
iVar2 = bcmp(*(void **)param_2,*(void **)(lVar1 + 8),__n);
return CONCAT71((int7)(CONCAT44(extraout_var,iVar2) >> 8),iVar2 == 0);
}
return CONCAT71((int7)((ulong)lVar1 >> 8),1);
}
| |
40,202 | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::decode(unsigned char&, unsigned int&, unsigned char) | monkey531[P]llama/common/json.hpp | static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept
{
static const std::array<std::uint8_t, 400> utf8d =
{
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF
8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF
0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF
0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF
0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2
1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4
1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6
1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8
}
};
JSON_ASSERT(byte < utf8d.size());
const std::uint8_t type = utf8d[byte];
codep = (state != UTF8_ACCEPT)
? (byte & 0x3fu) | (codep << 6u)
: (0xFFu >> type) & (byte);
const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
JSON_ASSERT(index < utf8d.size());
state = utf8d[index];
return state;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::decode(unsigned char&, unsigned int&, unsigned char):
pushq %rax
movl %edx, %ecx
leaq 0x3fb45(%rip), %rax # 0xf75bd
movzbl (%rax,%rcx), %ecx
cmpb $0x0, (%rdi)
je 0xb7a92
andb $0x3f, %dl
movzbl %dl, %r8d
movl (%rsi), %edx
shll $0x6, %edx
orl %r8d, %edx
jmp 0xb7aa1
movl $0xff, %r8d
shrl %cl, %r8d
movzbl %dl, %edx
andl %r8d, %edx
movl %edx, (%rsi)
movzbl (%rdi), %edx
shll $0x4, %edx
movl %ecx, %ecx
addq %rdx, %rcx
addq $0x100, %rcx # imm = 0x100
cmpq $0x190, %rcx # imm = 0x190
jae 0xb7ac5
movb (%rax,%rcx), %al
movb %al, (%rdi)
popq %rcx
retq
leaq 0x38117(%rip), %rdi # 0xefbe3
leaq 0x3266d(%rip), %rdx # 0xea140
leaq 0x3d76e(%rip), %rcx # 0xf5248
movl $0x49fb, %esi # imm = 0x49FB
xorl %eax, %eax
callq 0x1be80
movq %rax, %rdi
callq 0x21b33
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjh:
push rax
mov ecx, edx
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjhE5utf8d; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::decode(uchar &,uint &,uchar)::utf8d
movzx ecx, byte ptr [rax+rcx]
cmp byte ptr [rdi], 0
jz short loc_B7A92
and dl, 3Fh
movzx r8d, dl
mov edx, [rsi]
shl edx, 6
or edx, r8d
jmp short loc_B7AA1
loc_B7A92:
mov r8d, 0FFh
shr r8d, cl
movzx edx, dl
and edx, r8d
loc_B7AA1:
mov [rsi], edx
movzx edx, byte ptr [rdi]
shl edx, 4
mov ecx, ecx
add rcx, rdx
add rcx, 100h
cmp rcx, 190h
jnb short loc_B7AC5
mov al, [rax+rcx]
mov [rdi], al
pop rcx
retn
loc_B7AC5:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndexUtf8dSize; "index < utf8d.size()"
mov esi, 49FBh
xor eax, eax
call _ggml_abort
mov rdi, rax
call __clang_call_terminate
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<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>>::decode(
unsigned __int8 *a1,
unsigned int *a2,
int a3)
{
unsigned int v3; // ecx
unsigned int v4; // edx
unsigned long long v5; // rcx
unsigned __int8 result; // al
void *v7; // rax
v3 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<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>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[a3];
if ( *a1 )
v4 = a3 & 0x3F | (*a2 << 6);
else
v4 = (0xFFu >> v3) & (unsigned __int8)a3;
*a2 = v4;
v5 = 16 * (unsigned int)*a1 + (unsigned long long)v3 + 256;
if ( v5 >= 0x190 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
18939LL,
"GGML_ASSERT(%s) failed",
"index < utf8d.size()");
_clang_call_terminate(v7);
}
result = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<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>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[v5];
*a1 = result;
return result;
}
| decode:
PUSH RAX
MOV ECX,EDX
LEA RAX,[0x1f75bd]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
CMP byte ptr [RDI],0x0
JZ 0x001b7a92
AND DL,0x3f
MOVZX R8D,DL
MOV EDX,dword ptr [RSI]
SHL EDX,0x6
OR EDX,R8D
JMP 0x001b7aa1
LAB_001b7a92:
MOV R8D,0xff
SHR R8D,CL
MOVZX EDX,DL
AND EDX,R8D
LAB_001b7aa1:
MOV dword ptr [RSI],EDX
MOVZX EDX,byte ptr [RDI]
SHL EDX,0x4
MOV ECX,ECX
ADD RCX,RDX
ADD RCX,0x100
CMP RCX,0x190
JNC 0x001b7ac5
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDI],AL
POP RCX
RET
LAB_001b7ac5:
LEA RDI,[0x1efbe3]
LEA RDX,[0x1ea140]
LEA RCX,[0x1f5248]
MOV ESI,0x49fb
XOR EAX,EAX
CALL 0x0011be80
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::decode(unsigned char&, unsigned int&, unsigned char) */
void nlohmann::json_abi_v3_11_3::detail::
serializer<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>>
::decode(uchar *param_1,uint *param_2,uchar param_3)
{
byte bVar1;
long lVar2;
uint uVar3;
int7 in_register_00000011;
bVar1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d
[CONCAT71(in_register_00000011,param_3) & 0xffffffff];
if (*param_1 == '\0') {
uVar3 = (uint)param_3 & 0xffU >> (bVar1 & 0x1f);
}
else {
uVar3 = *param_2 << 6 | (uint)(param_3 & 0x3f);
}
*param_2 = uVar3;
lVar2 = (ulong)bVar1 + (ulong)*param_1 * 0x10;
if (lVar2 + 0x100U < 400) {
*param_1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d[lVar2 + 0x100];
return;
}
/* try { // try from 001b7ac5 to 001b7ae5 has its CatchHandler @ 001b7ae6 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x49fb,
"GGML_ASSERT(%s) failed","index < utf8d.size()");
}
| |
40,203 | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::decode(unsigned char&, unsigned int&, unsigned char) | monkey531[P]llama/common/json.hpp | static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept
{
static const std::array<std::uint8_t, 400> utf8d =
{
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF
8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF
0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF
0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF
0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2
1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4
1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6
1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8
}
};
JSON_ASSERT(byte < utf8d.size());
const std::uint8_t type = utf8d[byte];
codep = (state != UTF8_ACCEPT)
? (byte & 0x3fu) | (codep << 6u)
: (0xFFu >> type) & (byte);
const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
JSON_ASSERT(index < utf8d.size());
state = utf8d[index];
return state;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<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>>::decode(unsigned char&, unsigned int&, unsigned char):
pushq %rax
movl %edx, %ecx
leaq 0x3e395(%rip), %rax # 0xf55ad
movzbl (%rax,%rcx), %ecx
cmpb $0x0, (%rdi)
je 0xb7232
andb $0x3f, %dl
movzbl %dl, %r8d
movl (%rsi), %edx
shll $0x6, %edx
orl %r8d, %edx
jmp 0xb7241
movl $0xff, %r8d
shrl %cl, %r8d
movzbl %dl, %edx
andl %r8d, %edx
movl %edx, (%rsi)
movzbl (%rdi), %edx
shll $0x4, %edx
movl %ecx, %ecx
addq %rdx, %rcx
addq $0x100, %rcx # imm = 0x100
cmpq $0x190, %rcx # imm = 0x190
jae 0xb7265
movb (%rax,%rcx), %al
movb %al, (%rdi)
popq %rcx
retq
leaq 0x36977(%rip), %rdi # 0xedbe3
leaq 0x30ecd(%rip), %rdx # 0xe8140
leaq 0x3bfbe(%rip), %rcx # 0xf3238
movl $0x49fb, %esi # imm = 0x49FB
xorl %eax, %eax
callq 0x1be80
movq %rax, %rdi
callq 0x21ae5
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjh:
push rax
mov ecx, edx
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjhE5utf8d; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::decode(uchar &,uint &,uchar)::utf8d
movzx ecx, byte ptr [rax+rcx]
cmp byte ptr [rdi], 0
jz short loc_B7232
and dl, 3Fh
movzx r8d, dl
mov edx, [rsi]
shl edx, 6
or edx, r8d
jmp short loc_B7241
loc_B7232:
mov r8d, 0FFh
shr r8d, cl
movzx edx, dl
and edx, r8d
loc_B7241:
mov [rsi], edx
movzx edx, byte ptr [rdi]
shl edx, 4
mov ecx, ecx
add rcx, rdx
add rcx, 100h
cmp rcx, 190h
jnb short loc_B7265
mov al, [rax+rcx]
mov [rdi], al
pop rcx
retn
loc_B7265:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndexUtf8dSize; "index < utf8d.size()"
mov esi, 49FBh
xor eax, eax
call _ggml_abort
mov rdi, rax
call __clang_call_terminate
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<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>>::decode(
unsigned __int8 *a1,
unsigned int *a2,
int a3)
{
unsigned int v3; // ecx
unsigned int v4; // edx
unsigned long long v5; // rcx
unsigned __int8 result; // al
void *v7; // rax
v3 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<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>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[a3];
if ( *a1 )
v4 = a3 & 0x3F | (*a2 << 6);
else
v4 = (0xFFu >> v3) & (unsigned __int8)a3;
*a2 = v4;
v5 = 16 * (unsigned int)*a1 + (unsigned long long)v3 + 256;
if ( v5 >= 0x190 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
18939LL,
"GGML_ASSERT(%s) failed",
"index < utf8d.size()");
_clang_call_terminate(v7);
}
result = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<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>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[v5];
*a1 = result;
return result;
}
| decode:
PUSH RAX
MOV ECX,EDX
LEA RAX,[0x1f55ad]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
CMP byte ptr [RDI],0x0
JZ 0x001b7232
AND DL,0x3f
MOVZX R8D,DL
MOV EDX,dword ptr [RSI]
SHL EDX,0x6
OR EDX,R8D
JMP 0x001b7241
LAB_001b7232:
MOV R8D,0xff
SHR R8D,CL
MOVZX EDX,DL
AND EDX,R8D
LAB_001b7241:
MOV dword ptr [RSI],EDX
MOVZX EDX,byte ptr [RDI]
SHL EDX,0x4
MOV ECX,ECX
ADD RCX,RDX
ADD RCX,0x100
CMP RCX,0x190
JNC 0x001b7265
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDI],AL
POP RCX
RET
LAB_001b7265:
LEA RDI,[0x1edbe3]
LEA RDX,[0x1e8140]
LEA RCX,[0x1f3238]
MOV ESI,0x49fb
XOR EAX,EAX
CALL 0x0011be80
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::decode(unsigned char&, unsigned int&, unsigned char) */
void nlohmann::json_abi_v3_11_3::detail::
serializer<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>>
::decode(uchar *param_1,uint *param_2,uchar param_3)
{
byte bVar1;
long lVar2;
uint uVar3;
int7 in_register_00000011;
bVar1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d
[CONCAT71(in_register_00000011,param_3) & 0xffffffff];
if (*param_1 == '\0') {
uVar3 = (uint)param_3 & 0xffU >> (bVar1 & 0x1f);
}
else {
uVar3 = *param_2 << 6 | (uint)(param_3 & 0x3f);
}
*param_2 = uVar3;
lVar2 = (ulong)bVar1 + (ulong)*param_1 * 0x10;
if (lVar2 + 0x100U < 400) {
*param_1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d[lVar2 + 0x100];
return;
}
/* try { // try from 001b7265 to 001b7285 has its CatchHandler @ 001b7286 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x49fb,
"GGML_ASSERT(%s) failed","index < utf8d.size()");
}
| |
40,204 | common_log::common_log(unsigned long) | monkey531[P]llama/common/log.cpp | common_log(size_t capacity) {
file = nullptr;
prefix = false;
timestamps = false;
running = false;
t_start = t_us();
// initial message size - will be expanded if longer messages arrive
entries.resize(capacity);
for (auto & entry : entries) {
entry.msg.resize(256);
}
head = 0;
tail = 0;
resume();
} | O1 | cpp | common_log::common_log(unsigned long):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %r14, %rdi
callq 0x1abe0
leaq 0x78(%rbx), %r15
xorl %eax, %eax
movq %rax, 0x88(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0xb0(%rbx)
movq %rax, 0xc0(%rbx)
movq %rax, 0x60(%rbx)
movl $0x0, 0x67(%rbx)
callq 0x1a090
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, 0x70(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0xcc2ac
movq 0x78(%rbx), %r12
movq 0x80(%rbx), %r13
cmpq %r13, %r12
je 0xcc248
leaq 0x10(%r12), %rdi
movl $0x100, %esi # imm = 0x100
callq 0x7dad8
addq $0x30, %r12
jmp 0xcc22e
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rbx)
movq %rbx, %rdi
callq 0xcbccc
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xcc266
movq %rax, %r12
leaq 0xb0(%rbx), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xcc287
movq 0xc0(%rbx), %rsi
subq %rdi, %rsi
callq 0x1a890
movq %r15, %rdi
callq 0xcc2ee
movq %r14, %rdi
callq 0x1af90
cmpq $0x0, 0x28(%rbx)
jne 0xcc2a6
movq %r12, %rdi
callq 0x1af20
callq 0x1a200
nop
| _ZN10common_logC2Em:
push r15
push r14
push r13
push r12
push rbx
mov r12, rsi
mov rbx, rdi
lea r14, [rdi+30h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov rdi, r14; this
call __ZNSt18condition_variableC1Ev; std::condition_variable::condition_variable(void)
lea r15, [rbx+78h]
xor eax, eax
mov [rbx+88h], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+78h], xmm0
movups xmmword ptr [rbx+0B0h], xmm0
mov [rbx+0C0h], rax
mov [rbx+60h], rax
mov dword ptr [rbx+67h], 0
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov rcx, 20C49BA5E353F7CFh
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 7
add rdx, rax
mov [rbx+70h], rdx
mov rdi, r15
mov rsi, r12
call _ZNSt6vectorI16common_log_entrySaIS0_EE6resizeEm; std::vector<common_log_entry>::resize(ulong)
mov r12, [rbx+78h]
mov r13, [rbx+80h]
loc_CC22E:
cmp r12, r13
jz short loc_CC248
lea rdi, [r12+10h]
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
add r12, 30h ; '0'
jmp short loc_CC22E
loc_CC248:
xorps xmm0, xmm0
movups xmmword ptr [rbx+90h], xmm0
mov rdi, rbx; this
call _ZN10common_log6resumeEv; common_log::resume(void)
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_CC266:
mov r12, rax
lea rax, [rbx+0B0h]
mov rdi, [rax]; void *
test rdi, rdi
jz short loc_CC287
mov rsi, [rbx+0C0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CC287:
mov rdi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
mov rdi, r14; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
cmp qword ptr [rbx+28h], 0
jnz short loc_CC2A6
mov rdi, r12
call __Unwind_Resume
loc_CC2A6:
call __ZSt9terminatev; std::terminate(void)
| void common_log::common_log(common_log *this, long long a2)
{
std::condition_variable *v3; // rdi
long long v4; // r12
long long v5; // r13
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
v3 = (common_log *)((char *)this + 48);
std::condition_variable::condition_variable(v3);
*((_QWORD *)this + 17) = 0LL;
*(_OWORD *)((char *)this + 120) = 0LL;
*((_OWORD *)this + 11) = 0LL;
*((_QWORD *)this + 24) = 0LL;
*((_QWORD *)this + 12) = 0LL;
*(_DWORD *)((char *)this + 103) = 0;
*((_QWORD *)this + 14) = std::chrono::_V2::system_clock::now(v3) / 1000LL;
std::vector<common_log_entry>::resize((char *)this + 120, a2);
v4 = *((_QWORD *)this + 15);
v5 = *((_QWORD *)this + 16);
while ( v4 != v5 )
{
std::vector<char>::resize((_QWORD *)(v4 + 16), 0x100uLL);
v4 += 48LL;
}
*((_OWORD *)this + 9) = 0LL;
common_log::resume(this);
}
| common_log:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R12,RSI
MOV RBX,RDI
LEA R14,[RDI + 0x30]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI,R14
CALL 0x0011abe0
LEA R15,[RBX + 0x78]
XOR EAX,EAX
MOV qword ptr [RBX + 0x88],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x78],XMM0
MOVUPS xmmword ptr [RBX + 0xb0],XMM0
MOV qword ptr [RBX + 0xc0],RAX
MOV qword ptr [RBX + 0x60],RAX
MOV dword ptr [RBX + 0x67],0x0
CALL 0x0011a090
MOV RCX,0x20c49ba5e353f7cf
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x7
ADD RDX,RAX
MOV qword ptr [RBX + 0x70],RDX
LAB_001cc218:
MOV RDI,R15
MOV RSI,R12
CALL 0x001cc2ac
MOV R12,qword ptr [RBX + 0x78]
MOV R13,qword ptr [RBX + 0x80]
LAB_001cc22e:
CMP R12,R13
JZ 0x001cc248
LEA RDI,[R12 + 0x10]
LAB_001cc238:
MOV ESI,0x100
CALL 0x0017dad8
ADD R12,0x30
JMP 0x001cc22e
LAB_001cc248:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x90],XMM0
LAB_001cc252:
MOV RDI,RBX
CALL 0x001cbccc
LAB_001cc25a:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* common_log::common_log(unsigned long) */
void __thiscall common_log::common_log(common_log *this,ulong param_1)
{
long lVar1;
long lVar2;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
std::condition_variable::condition_variable((condition_variable *)(this + 0x30));
*(int8 *)(this + 0x88) = 0;
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0xb0) = 0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 0x60) = 0;
*(int4 *)(this + 0x67) = 0;
lVar2 = std::chrono::_V2::system_clock::now();
*(long *)(this + 0x70) = lVar2 / 1000;
/* try { // try from 001cc218 to 001cc222 has its CatchHandler @ 001cc264 */
std::vector<common_log_entry,std::allocator<common_log_entry>>::resize
((vector<common_log_entry,std::allocator<common_log_entry>> *)(this + 0x78),param_1);
lVar1 = *(long *)(this + 0x80);
for (lVar2 = *(long *)(this + 0x78); lVar2 != lVar1; lVar2 = lVar2 + 0x30) {
/* try { // try from 001cc238 to 001cc241 has its CatchHandler @ 001cc266 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar2 + 0x10),0x100);
}
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
/* try { // try from 001cc252 to 001cc259 has its CatchHandler @ 001cc264 */
resume(this);
return;
}
| |
40,205 | common_log::common_log(unsigned long) | monkey531[P]llama/common/log.cpp | common_log(size_t capacity) {
file = nullptr;
prefix = false;
timestamps = false;
running = false;
t_start = t_us();
// initial message size - will be expanded if longer messages arrive
entries.resize(capacity);
for (auto & entry : entries) {
entry.msg.resize(256);
}
head = 0;
tail = 0;
resume();
} | O3 | cpp | common_log::common_log(unsigned long):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %r14, %rdi
callq 0x1abe0
leaq 0x78(%rbx), %r15
xorl %eax, %eax
movq %rax, 0x88(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0xb0(%rbx)
movq %rax, 0xc0(%rbx)
movq %rax, 0x60(%rbx)
movl $0x0, 0x67(%rbx)
callq 0x1a090
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, 0x70(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0xcb7f0
movq 0x78(%rbx), %r12
movq 0x80(%rbx), %r13
cmpq %r13, %r12
je 0xcb78c
leaq 0x10(%r12), %rdi
movl $0x100, %esi # imm = 0x100
callq 0x7dae2
addq $0x30, %r12
jmp 0xcb772
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rbx)
movq %rbx, %rdi
callq 0xcb20e
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xcb7aa
movq %rax, %r12
leaq 0xb0(%rbx), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xcb7cb
movq 0xc0(%rbx), %rsi
subq %rdi, %rsi
callq 0x1a890
movq %r15, %rdi
callq 0xcb832
movq %r14, %rdi
callq 0x1af90
cmpq $0x0, 0x28(%rbx)
jne 0xcb7ea
movq %r12, %rdi
callq 0x1af20
callq 0x1a200
nop
| _ZN10common_logC2Em:
push r15
push r14
push r13
push r12
push rbx
mov r12, rsi
mov rbx, rdi
lea r14, [rdi+30h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov rdi, r14; this
call __ZNSt18condition_variableC1Ev; std::condition_variable::condition_variable(void)
lea r15, [rbx+78h]
xor eax, eax
mov [rbx+88h], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+78h], xmm0
movups xmmword ptr [rbx+0B0h], xmm0
mov [rbx+0C0h], rax
mov [rbx+60h], rax
mov dword ptr [rbx+67h], 0
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov rcx, 20C49BA5E353F7CFh
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 7
add rdx, rax
mov [rbx+70h], rdx
mov rdi, r15
mov rsi, r12
call _ZNSt6vectorI16common_log_entrySaIS0_EE6resizeEm; std::vector<common_log_entry>::resize(ulong)
mov r12, [rbx+78h]
mov r13, [rbx+80h]
loc_CB772:
cmp r12, r13
jz short loc_CB78C
lea rdi, [r12+10h]
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
add r12, 30h ; '0'
jmp short loc_CB772
loc_CB78C:
xorps xmm0, xmm0
movups xmmword ptr [rbx+90h], xmm0
mov rdi, rbx; this
call _ZN10common_log6resumeEv; common_log::resume(void)
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_CB7AA:
mov r12, rax
lea rax, [rbx+0B0h]
mov rdi, [rax]; void *
test rdi, rdi
jz short loc_CB7CB
mov rsi, [rbx+0C0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CB7CB:
mov rdi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
mov rdi, r14; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
cmp qword ptr [rbx+28h], 0
jnz short loc_CB7EA
mov rdi, r12
call __Unwind_Resume
loc_CB7EA:
call __ZSt9terminatev; std::terminate(void)
| void common_log::common_log(common_log *this, long long a2)
{
std::condition_variable *v3; // rdi
long long v4; // r12
long long v5; // r13
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
v3 = (common_log *)((char *)this + 48);
std::condition_variable::condition_variable(v3);
*((_QWORD *)this + 17) = 0LL;
*(_OWORD *)((char *)this + 120) = 0LL;
*((_OWORD *)this + 11) = 0LL;
*((_QWORD *)this + 24) = 0LL;
*((_QWORD *)this + 12) = 0LL;
*(_DWORD *)((char *)this + 103) = 0;
*((_QWORD *)this + 14) = std::chrono::_V2::system_clock::now(v3) / 1000LL;
std::vector<common_log_entry>::resize((char *)this + 120, a2);
v4 = *((_QWORD *)this + 15);
v5 = *((_QWORD *)this + 16);
while ( v4 != v5 )
{
std::vector<char>::resize((_QWORD *)(v4 + 16), 0x100uLL);
v4 += 48LL;
}
*((_OWORD *)this + 9) = 0LL;
common_log::resume(this);
}
| common_log:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R12,RSI
MOV RBX,RDI
LEA R14,[RDI + 0x30]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI,R14
CALL 0x0011abe0
LEA R15,[RBX + 0x78]
XOR EAX,EAX
MOV qword ptr [RBX + 0x88],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x78],XMM0
MOVUPS xmmword ptr [RBX + 0xb0],XMM0
MOV qword ptr [RBX + 0xc0],RAX
MOV qword ptr [RBX + 0x60],RAX
MOV dword ptr [RBX + 0x67],0x0
CALL 0x0011a090
MOV RCX,0x20c49ba5e353f7cf
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x7
ADD RDX,RAX
MOV qword ptr [RBX + 0x70],RDX
LAB_001cb75c:
MOV RDI,R15
MOV RSI,R12
CALL 0x001cb7f0
MOV R12,qword ptr [RBX + 0x78]
MOV R13,qword ptr [RBX + 0x80]
LAB_001cb772:
CMP R12,R13
JZ 0x001cb78c
LEA RDI,[R12 + 0x10]
LAB_001cb77c:
MOV ESI,0x100
CALL 0x0017dae2
ADD R12,0x30
JMP 0x001cb772
LAB_001cb78c:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x90],XMM0
LAB_001cb796:
MOV RDI,RBX
CALL 0x001cb20e
LAB_001cb79e:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* common_log::common_log(unsigned long) */
void __thiscall common_log::common_log(common_log *this,ulong param_1)
{
long lVar1;
long lVar2;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
std::condition_variable::condition_variable((condition_variable *)(this + 0x30));
*(int8 *)(this + 0x88) = 0;
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0xb0) = 0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 0x60) = 0;
*(int4 *)(this + 0x67) = 0;
lVar2 = std::chrono::_V2::system_clock::now();
*(long *)(this + 0x70) = lVar2 / 1000;
/* try { // try from 001cb75c to 001cb766 has its CatchHandler @ 001cb7a8 */
std::vector<common_log_entry,std::allocator<common_log_entry>>::resize
((vector<common_log_entry,std::allocator<common_log_entry>> *)(this + 0x78),param_1);
lVar1 = *(long *)(this + 0x80);
for (lVar2 = *(long *)(this + 0x78); lVar2 != lVar1; lVar2 = lVar2 + 0x30) {
/* try { // try from 001cb77c to 001cb785 has its CatchHandler @ 001cb7aa */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar2 + 0x10),0x100);
}
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
/* try { // try from 001cb796 to 001cb79d has its CatchHandler @ 001cb7a8 */
resume(this);
return;
}
| |
40,206 | Arg_comparator::set_cmp_func_real(THD*) | eloqsql/sql/item_cmpfunc.cc | bool Arg_comparator::set_cmp_func_real(THD *thd)
{
if ((((*a)->result_type() == DECIMAL_RESULT && !(*a)->const_item() &&
(*b)->result_type() == STRING_RESULT && (*b)->const_item()) ||
((*b)->result_type() == DECIMAL_RESULT && !(*b)->const_item() &&
(*a)->result_type() == STRING_RESULT && (*a)->const_item())))
{
/*
<non-const decimal expression> <cmp> <const string expression>
or
<const string expression> <cmp> <non-const decimal expression>
Do comparison as decimal rather than float, in order not to lose precision.
*/
m_compare_handler= &type_handler_newdecimal;
return set_cmp_func_decimal(thd);
}
func= is_owner_equal_func() ? &Arg_comparator::compare_e_real :
&Arg_comparator::compare_real;
if ((*a)->decimals < NOT_FIXED_DEC && (*b)->decimals < NOT_FIXED_DEC)
{
precision= 5 / log_10[MY_MAX((*a)->decimals, (*b)->decimals) + 1];
if (func == &Arg_comparator::compare_real)
func= &Arg_comparator::compare_real_fixed;
else if (func == &Arg_comparator::compare_e_real)
func= &Arg_comparator::compare_e_real_fixed;
}
a= cache_converted_constant(thd, a, &a_cache, compare_type_handler());
b= cache_converted_constant(thd, b, &b_cache, compare_type_handler());
return false;
} | O0 | cpp | Arg_comparator::set_cmp_func_real(THD*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq (%rax), %rax
movq (%rax), %rdi
callq 0x4bc140
cmpl $0x4, %eax
jne 0x91998c
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x208(%rax)
testb $0x1, %al
jne 0x91998c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
callq 0x4bc140
cmpl $0x0, %eax
jne 0x91998c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x208(%rax)
testb $0x1, %al
jne 0x9199e6
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
callq 0x4bc140
cmpl $0x4, %eax
jne 0x919a08
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x208(%rax)
testb $0x1, %al
jne 0x919a08
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x4bc140
cmpl $0x0, %eax
jne 0x919a08
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x208(%rax)
testb $0x1, %al
jne 0x9199e6
jmp 0x919a08
movq -0x20(%rbp), %rdi
leaq 0xcd704f(%rip), %rax # 0x15f0a40
movq %rax, 0x10(%rdi)
movq -0x18(%rbp), %rsi
callq 0x919c00
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x919bee
movq -0x20(%rbp), %rdi
callq 0x92cbc0
movb %al, %sil
movq -0x20(%rbp), %rax
leaq 0x2b1(%rip), %rdx # 0x919cd0
leaq 0x37a(%rip), %rcx # 0x919da0
testb %sil, %sil
cmovneq %rdx, %rcx
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq (%rax), %rax
movq (%rax), %rax
movzwl 0xc(%rax), %eax
cmpl $0x27, %eax
jge 0x919b65
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movzwl 0xc(%rax), %eax
cmpl $0x27, %eax
jge 0x919b65
movq -0x20(%rbp), %rcx
movq (%rcx), %rax
movq (%rax), %rax
movzwl 0xc(%rax), %eax
movq 0x8(%rcx), %rcx
movq (%rcx), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jle 0x919a95
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movw 0xc(%rax), %ax
movw %ax, -0x22(%rbp)
jmp 0x919aa8
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movw 0xc(%rax), %ax
movw %ax, -0x22(%rbp)
movq -0x20(%rbp), %rax
movw -0x22(%rbp), %cx
movzwl %cx, %ecx
movl %ecx, %edx
leaq 0x4f2284(%rip), %rcx # 0xe0bd40
movsd 0x8(%rcx,%rdx,8), %xmm1
movsd 0x4f2cee(%rip), %xmm0 # 0xe0c7b8
divsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rax)
movq 0x20(%rax), %rcx
movq 0x28(%rax), %rdx
leaq 0x2be(%rip), %rax # 0x919da0
cmpq %rax, %rcx
sete %al
cmpq $0x0, %rcx
sete %cl
cmpq $0x0, %rdx
sete %dl
orb %dl, %cl
andb %cl, %al
testb $0x1, %al
jne 0x919b00
jmp 0x919b19
movq -0x20(%rbp), %rax
leaq 0x375(%rip), %rcx # 0x919e80
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
jmp 0x919b63
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rcx
movq 0x28(%rax), %rdx
leaq 0x1a4(%rip), %rax # 0x919cd0
cmpq %rax, %rcx
sete %al
cmpq $0x0, %rcx
sete %cl
cmpq $0x0, %rdx
sete %dl
orb %dl, %cl
andb %cl, %al
testb $0x1, %al
jne 0x919b4a
jmp 0x919b61
movq -0x20(%rbp), %rax
leaq 0x43b(%rip), %rcx # 0x919f90
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
jmp 0x919b63
jmp 0x919b65
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq (%rdi), %rax
movq %rax, -0x50(%rbp)
movq %rdi, %rax
addq $0x50, %rax
movq %rax, -0x48(%rbp)
callq 0x645110
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rdi
movq %rax, %r8
callq 0x9188f0
movq -0x20(%rbp), %rdi
movq %rax, (%rdi)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x8(%rdi), %rax
movq %rax, -0x38(%rbp)
movq %rdi, %rax
addq $0x58, %rax
movq %rax, -0x30(%rbp)
callq 0x645110
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rdi
movq %rax, %r8
callq 0x9188f0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN14Arg_comparator17set_cmp_func_realEP3THD:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rax]
mov rdi, [rax]; this
call _ZNK4Item11result_typeEv; Item::result_type(void)
cmp eax, 4
jnz short loc_91998C
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdi, [rax]
mov rax, [rdi]
call qword ptr [rax+208h]
test al, 1
jnz short loc_91998C
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rdi, [rax]; this
call _ZNK4Item11result_typeEv; Item::result_type(void)
cmp eax, 0
jnz short loc_91998C
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rdi, [rax]
mov rax, [rdi]
call qword ptr [rax+208h]
test al, 1
jnz short loc_9199E6
loc_91998C:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rdi, [rax]; this
call _ZNK4Item11result_typeEv; Item::result_type(void)
cmp eax, 4
jnz short loc_919A08
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rdi, [rax]
mov rax, [rdi]
call qword ptr [rax+208h]
test al, 1
jnz short loc_919A08
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdi, [rax]; this
call _ZNK4Item11result_typeEv; Item::result_type(void)
cmp eax, 0
jnz short loc_919A08
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdi, [rax]
mov rax, [rdi]
call qword ptr [rax+208h]
test al, 1
jnz short loc_9199E6
jmp short loc_919A08
loc_9199E6:
mov rdi, [rbp+var_20]; this
lea rax, type_handler_newdecimal
mov [rdi+10h], rax
mov rsi, [rbp+var_18]; THD *
call _ZN14Arg_comparator20set_cmp_func_decimalEP3THD; Arg_comparator::set_cmp_func_decimal(THD *)
and al, 1
mov [rbp+var_1], al
jmp loc_919BEE
loc_919A08:
mov rdi, [rbp+var_20]; this
call _ZN14Arg_comparator19is_owner_equal_funcEv; Arg_comparator::is_owner_equal_func(void)
mov sil, al
mov rax, [rbp+var_20]
lea rdx, _ZN14Arg_comparator14compare_e_realEv; Arg_comparator::compare_e_real(void)
lea rcx, _ZN14Arg_comparator12compare_realEv; Arg_comparator::compare_real(void)
test sil, sil
cmovnz rcx, rdx
mov [rax+20h], rcx
mov qword ptr [rax+28h], 0
mov rax, [rax]
mov rax, [rax]
movzx eax, word ptr [rax+0Ch]
cmp eax, 27h ; '''
jge loc_919B65
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rax, [rax]
movzx eax, word ptr [rax+0Ch]
cmp eax, 27h ; '''
jge loc_919B65
mov rcx, [rbp+var_20]
mov rax, [rcx]
mov rax, [rax]
movzx eax, word ptr [rax+0Ch]
mov rcx, [rcx+8]
mov rcx, [rcx]
movzx ecx, word ptr [rcx+0Ch]
cmp eax, ecx
jle short loc_919A95
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax]
mov ax, [rax+0Ch]
mov [rbp+var_22], ax
jmp short loc_919AA8
loc_919A95:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rax, [rax]
mov ax, [rax+0Ch]
mov [rbp+var_22], ax
loc_919AA8:
mov rax, [rbp+var_20]
mov cx, [rbp+var_22]
movzx ecx, cx
mov edx, ecx
lea rcx, log_10
movsd xmm1, qword ptr [rcx+rdx*8+8]
movsd xmm0, cs:qword_E0C7B8
divsd xmm0, xmm1
movsd qword ptr [rax+48h], xmm0
mov rcx, [rax+20h]
mov rdx, [rax+28h]
lea rax, _ZN14Arg_comparator12compare_realEv; Arg_comparator::compare_real(void)
cmp rcx, rax
setz al
cmp rcx, 0
setz cl
cmp rdx, 0
setz dl
or cl, dl
and al, cl
test al, 1
jnz short loc_919B00
jmp short loc_919B19
loc_919B00:
mov rax, [rbp+var_20]
lea rcx, _ZN14Arg_comparator18compare_real_fixedEv; Arg_comparator::compare_real_fixed(void)
mov [rax+20h], rcx
mov qword ptr [rax+28h], 0
jmp short loc_919B63
loc_919B19:
mov rax, [rbp+var_20]
mov rcx, [rax+20h]
mov rdx, [rax+28h]
lea rax, _ZN14Arg_comparator14compare_e_realEv; Arg_comparator::compare_e_real(void)
cmp rcx, rax
setz al
cmp rcx, 0
setz cl
cmp rdx, 0
setz dl
or cl, dl
and al, cl
test al, 1
jnz short loc_919B4A
jmp short loc_919B61
loc_919B4A:
mov rax, [rbp+var_20]
lea rcx, _ZN14Arg_comparator20compare_e_real_fixedEv; Arg_comparator::compare_e_real_fixed(void)
mov [rax+20h], rcx
mov qword ptr [rax+28h], 0
loc_919B61:
jmp short $+2
loc_919B63:
jmp short $+2
loc_919B65:
mov rdi, [rbp+var_20]; this
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
mov rax, [rdi]
mov [rbp+var_50], rax
mov rax, rdi
add rax, 50h ; 'P'
mov [rbp+var_48], rax
call _ZNK14Arg_comparator20compare_type_handlerEv; Arg_comparator::compare_type_handler(void)
mov rsi, [rbp+var_58]; THD *
mov rdx, [rbp+var_50]; Item **
mov rcx, [rbp+var_48]; Item **
mov rdi, [rbp+var_20]; this
mov r8, rax; Type_handler *
call _ZN14Arg_comparator24cache_converted_constantEP3THDPP4ItemS4_PK12Type_handler; Arg_comparator::cache_converted_constant(THD *,Item **,Item **,Type_handler const*)
mov rdi, [rbp+var_20]; this
mov [rdi], rax
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rdi+8]
mov [rbp+var_38], rax
mov rax, rdi
add rax, 58h ; 'X'
mov [rbp+var_30], rax
call _ZNK14Arg_comparator20compare_type_handlerEv; Arg_comparator::compare_type_handler(void)
mov rsi, [rbp+var_40]; THD *
mov rdx, [rbp+var_38]; Item **
mov rcx, [rbp+var_30]; Item **
mov rdi, [rbp+var_20]; this
mov r8, rax; Type_handler *
call _ZN14Arg_comparator24cache_converted_constantEP3THDPP4ItemS4_PK12Type_handler; Arg_comparator::cache_converted_constant(THD *,Item **,Item **,Type_handler const*)
mov rcx, rax
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov [rbp+var_1], 0
loc_919BEE:
mov al, [rbp+var_1]
and al, 1
add rsp, 60h
pop rbp
retn
| char Arg_comparator::set_cmp_func_real(long long **this, LEX **a2)
{
char is_owner_equal_func; // si
long long ( *v3)(Arg_comparator *__hidden); // rcx
long long v4; // rax
const Type_handler *v5; // rax
const Type_handler *v6; // rax
Item **v8; // [rsp+10h] [rbp-50h]
Item **v9; // [rsp+28h] [rbp-38h]
if ( ((unsigned int)Item::result_type((Item *)**this) != 4
|| ((*(long long ( **)(long long))(*(_QWORD *)**this + 520LL))(**this) & 1) != 0
|| (unsigned int)Item::result_type((Item *)*this[1])
|| ((*(long long ( **)(_QWORD))(*(_QWORD *)*this[1] + 520LL))(*this[1]) & 1) == 0)
&& ((unsigned int)Item::result_type((Item *)*this[1]) != 4
|| ((*(long long ( **)(_QWORD))(*(_QWORD *)*this[1] + 520LL))(*this[1]) & 1) != 0
|| (unsigned int)Item::result_type((Item *)**this)
|| ((*(long long ( **)(long long))(*(_QWORD *)**this + 520LL))(**this) & 1) == 0) )
{
is_owner_equal_func = Arg_comparator::is_owner_equal_func((Arg_comparator *)this);
v3 = Arg_comparator::compare_real;
if ( is_owner_equal_func )
v3 = Arg_comparator::compare_e_real;
this[4] = (long long *)v3;
this[5] = 0LL;
if ( *(unsigned __int16 *)(**this + 12) < 0x27u && *(unsigned __int16 *)(*this[1] + 12) < 0x27u )
{
if ( *(unsigned __int16 *)(**this + 12) <= (int)*(unsigned __int16 *)(*this[1] + 12) )
v4 = *this[1];
else
v4 = **this;
*((double *)this + 9) = 5.0 / log_10[*(unsigned __int16 *)(v4 + 12) + 1];
if ( (this[5] == 0LL || this[4] == 0LL) && this[4] == (long long *)Arg_comparator::compare_real )
{
this[4] = (long long *)Arg_comparator::compare_real_fixed;
this[5] = 0LL;
}
else if ( (this[5] == 0LL || this[4] == 0LL) && this[4] == (long long *)Arg_comparator::compare_e_real )
{
this[4] = (long long *)Arg_comparator::compare_e_real_fixed;
this[5] = 0LL;
}
}
v8 = (Item **)*this;
v5 = (const Type_handler *)Arg_comparator::compare_type_handler((Arg_comparator *)this);
*this = (long long *)Arg_comparator::cache_converted_constant((Arg_comparator *)this, a2, v8, (Item **)this + 10, v5);
v9 = (Item **)this[1];
v6 = (const Type_handler *)Arg_comparator::compare_type_handler((Arg_comparator *)this);
this[1] = (long long *)Arg_comparator::cache_converted_constant(
(Arg_comparator *)this,
a2,
v9,
(Item **)this + 11,
v6);
return 0;
}
else
{
this[2] = (long long *)&type_handler_newdecimal;
return Arg_comparator::set_cmp_func_decimal((Arg_comparator *)this, (THD *)a2) & 1;
}
}
| _Head_base<THD*&>:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
/* std::_Head_base<1ul, THD*, false>::_Head_base<THD*&>(THD*&) */
void __thiscall
std::_Head_base<1ul,THD*,false>::_Head_base<THD*&>(_Head_base<1ul,THD*,false> *this,THD **param_1)
{
*(THD **)this = *param_1;
return;
}
| |
40,207 | 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&) | monkey531[P]llama/common/./json.hpp | basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x2a578
movq %rsp, %rdi
movq %rax, %rsi
callq 0x29bca
jmp 0x2a58a
movups (%rsi), %xmm0
movaps %xmm0, (%rsp)
movb $0x0, (%rsi)
movq $0x0, 0x8(%rsi)
movq %rsp, %rdi
movaps (%rdi), %xmm0
movups %xmm0, (%rbx)
movb $0x0, (%rdi)
movq $0x0, 0x8(%rdi)
callq 0x2968c
addq $0x10, %rsp
popq %rbx
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 rbx
sub rsp, 10h
mov rbx, rdi
mov rax, [rsi+10h]
test rax, rax
jz short loc_2A578
mov rdi, rsp
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_2A58A
loc_2A578:
movups xmm0, xmmword ptr [rsi]
movaps [rsp+18h+var_18], xmm0
mov byte ptr [rsi], 0
mov qword ptr [rsi+8], 0
loc_2A58A:
mov rdi, rsp
movaps xmm0, xmmword ptr [rdi]
movups xmmword ptr [rbx], xmm0
mov byte ptr [rdi], 0
mov qword ptr [rdi+8], 0
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, 10h
pop rbx
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_(
_OWORD *a1,
unsigned __int8 **a2)
{
__int128 v3; // [rsp+0h] [rbp-18h] BYREF
if ( a2[2] )
{
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)&v3,
a2[2]);
}
else
{
v3 = *(_OWORD *)a2;
*(_BYTE *)a2 = 0;
a2[1] = 0LL;
}
*a1 = v3;
LOBYTE(v3) = 0;
*((_QWORD *)&v3 + 1) = 0LL;
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 RBX
SUB RSP,0x10
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x0012a578
MOV RDI,RSP
MOV RSI,RAX
CALL 0x00129bca
JMP 0x0012a58a
LAB_0012a578:
MOVUPS XMM0,xmmword ptr [RSI]
MOVAPS xmmword ptr [RSP],XMM0
MOV byte ptr [RSI],0x0
MOV qword ptr [RSI + 0x8],0x0
LAB_0012a58a:
MOV RDI,RSP
MOVAPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RBX],XMM0
MOV byte ptr [RDI],0x0
MOV qword ptr [RDI + 0x8],0x0
CALL 0x0012968c
ADD RSP,0x10
POP RBX
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_
(ulong *param_1,ulong *param_2)
{
ulong local_18;
ulong uStack_10;
if ((basic_json *)param_2[2] == (basic_json *)0x0) {
local_18 = *param_2;
uStack_10 = param_2[1];
*(int1 *)param_2 = 0;
param_2[1] = 0;
}
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>
::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)&local_18,(basic_json *)param_2[2]);
}
*param_1 = local_18;
param_1[1] = uStack_10;
local_18 = local_18 & 0xffffffffffffff00;
uStack_10 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_18);
return;
}
| |
40,208 | 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;
} | O3 | c | my_caseup_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xc44cd
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x78(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r14
addq %r15, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *-0x58(%rbp)
testl %eax, %eax
jle 0xc44cd
movl %eax, %ebx
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rax
cmpq (%rax), %rsi
ja 0xc44af
movq 0x8(%rax), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xc44af
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x48(%rbp)
cmpl %eax, %ebx
jne 0xc44cd
movl %ebx, %eax
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r12
jb 0xc4469
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_caseup_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_38], r8
mov [rbp+var_30], rdx
test rdx, rdx
jle loc_C44CD
mov r15, rcx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+78h]
mov [rbp+var_50], rax
mov rax, [rdi+0B8h]
mov rcx, [rax+28h]
mov [rbp+var_58], rcx
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
lea r14, [rsi+rax]
add [rbp+var_38], r15
loc_C4469:
mov rdi, r13
lea rsi, [rbp+var_40]
mov rdx, r12
mov rcx, r14
call [rbp+var_58]
test eax, eax
jle short loc_C44CD
mov ebx, eax
mov rsi, [rbp+var_40]
mov rax, [rbp+var_50]
cmp rsi, [rax]
ja short loc_C44AF
mov rax, [rax+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_C44AF
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4]
mov [rbp+var_40], rsi
loc_C44AF:
mov rdi, r13
mov rdx, r15
mov rcx, [rbp+var_38]
call [rbp+var_48]
cmp ebx, eax
jnz short loc_C44CD
mov eax, ebx
add r12, rax
add r15, rax
cmp r12, r14
jb short loc_C4469
loc_C44CD:
mov rax, [rbp+var_30]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_caseup_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
long long v5; // r15
unsigned long long v6; // r12
long long v7; // rax
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
unsigned long long *v15; // [rsp+10h] [rbp-50h]
unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h]
unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF
long long v18; // [rsp+28h] [rbp-38h]
long long v19; // [rsp+30h] [rbp-30h]
v18 = a5;
v19 = a3;
if ( a3 > 0 )
{
v5 = a4;
v6 = a2;
v15 = *(unsigned long long **)(a1 + 120);
v7 = *(_QWORD *)(a1 + 184);
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40);
v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48);
v8 = a2 + v19;
v18 += a4;
do
{
v9 = v14(a1, &v17, v6, v8);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v17;
if ( v17 <= *v15 )
{
v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17);
v17 = v11;
}
}
if ( v10 != v16(a1, v11, v5, v18) )
break;
v6 += v10;
v5 += v10;
}
while ( v6 < v8 );
}
return v19;
}
| my_caseup_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDX
TEST RDX,RDX
JLE 0x001c44cd
MOV R15,RCX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R14,[RSI + RAX*0x1]
ADD qword ptr [RBP + -0x38],R15
LAB_001c4469:
MOV RDI,R13
LEA RSI,[RBP + -0x40]
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RBP + -0x58]
TEST EAX,EAX
JLE 0x001c44cd
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
CMP RSI,qword ptr [RAX]
JA 0x001c44af
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001c44af
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_001c44af:
MOV RDI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x48]
CMP EBX,EAX
JNZ 0x001c44cd
MOV EAX,EBX
ADD R12,RAX
ADD R15,RAX
CMP R12,R14
JC 0x001c4469
LAB_001c44cd:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong uVar1;
ulong *puVar2;
code *pcVar3;
code *pcVar4;
long lVar5;
uint uVar6;
uint uVar7;
ulong local_48;
long local_40;
long local_38;
local_38 = param_3;
if (0 < param_3) {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar1 = param_2 + param_3;
local_40 = param_5 + param_4;
do {
uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1);
if ((int)uVar6 < 1) {
return local_38;
}
if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0))
{
local_48 = (ulong)*(uint *)(lVar5 + (local_48 & 0xff) * 0xc);
}
uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40);
if (uVar6 != uVar7) {
return local_38;
}
param_2 = param_2 + uVar6;
param_4 = param_4 + (ulong)uVar6;
} while (param_2 < uVar1);
}
return local_38;
}
| |
40,209 | ntt_fft_partial | bluesky950520[P]quickjs/libbf.c | static int ntt_fft_partial(BFNTTState *s, NTTLimb *buf1,
int k1, int k2, limb_t n1, limb_t n2, int inverse,
limb_t m_idx)
{
limb_t i, j, c_mul, c0, m, m_inv, strip_len, l;
NTTLimb *buf2, *buf3;
buf2 = NULL;
buf3 = ntt_malloc(s, sizeof(NTTLimb) * n1);
if (!buf3)
goto fail;
if (k2 == 0) {
if (ntt_fft(s, buf1, buf1, buf3, k1, inverse, m_idx))
goto fail;
} else {
strip_len = STRIP_LEN;
buf2 = ntt_malloc(s, sizeof(NTTLimb) * n1 * strip_len);
if (!buf2)
goto fail;
m = ntt_mods[m_idx];
m_inv = s->ntt_mods_div[m_idx];
c0 = s->ntt_proot_pow[m_idx][inverse][k1 + k2];
c_mul = 1;
assert((n2 % strip_len) == 0);
for(j = 0; j < n2; j += strip_len) {
for(i = 0; i < n1; i++) {
for(l = 0; l < strip_len; l++) {
buf2[i + l * n1] = buf1[i * n2 + (j + l)];
}
}
for(l = 0; l < strip_len; l++) {
if (inverse)
mul_trig(buf2 + l * n1, n1, c_mul, m, m_inv);
if (ntt_fft(s, buf2 + l * n1, buf2 + l * n1, buf3, k1, inverse, m_idx))
goto fail;
if (!inverse)
mul_trig(buf2 + l * n1, n1, c_mul, m, m_inv);
c_mul = mul_mod_fast(c_mul, c0, m, m_inv);
}
for(i = 0; i < n1; i++) {
for(l = 0; l < strip_len; l++) {
buf1[i * n2 + (j + l)] = buf2[i + l *n1];
}
}
}
ntt_free(s, buf2);
}
ntt_free(s, buf3);
return 0;
fail:
ntt_free(s, buf2);
ntt_free(s, buf3);
return -1;
} | O2 | c | ntt_fft_partial:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, 0x48(%rsp)
movq %r8, %r13
movl %ecx, %ebx
movl %edx, 0x14(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, %r15
leaq (,%r8,8), %r12
movq (%rdi), %rax
movq (%rax), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
movq %r12, %rdx
callq *0x8(%rax)
movq %rax, %rbp
testq %rax, %rax
je 0x7b4a8
movq 0xa8(%rsp), %rax
movl 0xa0(%rsp), %r9d
testl %ebx, %ebx
je 0x7b475
movq %r13, %rdx
shlq $0x7, %rdx
movq (%r15), %rax
movq (%rax), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq *0x8(%rax)
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x7b4a8
movq %rbp, 0x28(%rsp)
leaq 0xece8(%rip), %rax # 0x89fa0
movq 0xa8(%rsp), %rbp
movq (%rax,%rbp,8), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%r15,%rbp,8), %rax
movq %rax, 0x38(%rsp)
imulq $0x340, %rbp, %rax # imm = 0x340
movq %r15, 0x30(%rsp)
addq %r15, %rax
movl 0xa0(%rsp), %r9d
movl %r9d, %ecx
addl 0x14(%rsp), %ebx
movslq %ebx, %rdx
imulq $0x1a0, %rcx, %rcx # imm = 0x1A0
addq %rax, %rcx
movq 0x30(%rcx,%rdx,8), %rax
movq %rax, 0x60(%rsp)
movq 0x48(%rsp), %rax
leaq (,%rax,8), %r11
pushq $0x1
popq %rbx
xorl %ecx, %ecx
pushq $0x10
popq %r14
movq 0x18(%rsp), %r10
movq 0x20(%rsp), %r15
movq %r11, 0x50(%rsp)
cmpq %rax, %rcx
jae 0x7b4d2
movq %rcx, 0x58(%rsp)
movq %r15, %rax
movq %r10, %rcx
xorl %edx, %edx
cmpq %r13, %rdx
je 0x7b36e
movq %rax, %rsi
xorl %edi, %edi
cmpq $0x10, %rdi
je 0x7b362
movq (%rcx,%rdi,8), %r8
movq %r8, (%rsi)
incq %rdi
addq %r12, %rsi
jmp 0x7b34d
incq %rdx
addq %r11, %rcx
addq $0x8, %rax
jmp 0x7b343
movq %r10, 0x18(%rsp)
subq $0x1, %r14
jb 0x7b418
testl %r9d, %r9d
je 0x7b3a2
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
callq 0x7b6fa
movl 0xa0(%rsp), %r9d
movl %ebp, (%rsp)
movq 0x30(%rsp), %rdi
movq %r15, %rsi
movq %r15, %rdx
movq 0x28(%rsp), %rcx
movl 0x14(%rsp), %r8d
movl %r9d, %ebp
callq 0x7b4fc
testl %eax, %eax
jne 0x7b499
testl %ebp, %ebp
jne 0x7b3e6
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
callq 0x7b6fa
movq %rbx, %rdi
movq 0x60(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
callq 0x7b1d8
movq %rax, %rbx
addq %r12, %r15
movl 0xa0(%rsp), %r9d
movq 0xa8(%rsp), %rbp
jmp 0x7b373
movq 0x20(%rsp), %r15
movq %r15, %rax
movq 0x18(%rsp), %r10
movq %r10, %rcx
xorl %edx, %edx
movq 0x50(%rsp), %r11
pushq $0x10
popq %r14
cmpq %r13, %rdx
je 0x7b45e
movq %rax, %rsi
xorl %edi, %edi
cmpq $0x10, %rdi
je 0x7b452
movq (%rsi), %r8
movq %r8, (%rcx,%rdi,8)
incq %rdi
addq %r12, %rsi
jmp 0x7b43d
incq %rdx
addq %r11, %rcx
addq $0x8, %rax
jmp 0x7b433
movq 0x58(%rsp), %rcx
addq $0x10, %rcx
subq $-0x80, %r10
movq 0x48(%rsp), %rax
jmp 0x7b32d
movl %eax, (%rsp)
movq %r15, %rdi
movq 0x18(%rsp), %rdx
movq %rdx, %rsi
movq %rbp, %rcx
movl 0x14(%rsp), %r8d
callq 0x7b4fc
testl %eax, %eax
je 0x7b4ea
xorl %r14d, %r14d
jmp 0x7b4a8
movq 0x20(%rsp), %r14
movq 0x30(%rsp), %r15
movq 0x28(%rsp), %rbp
movq %r15, %rdi
movq %r14, %rsi
callq 0x7a902
movq %r15, %rdi
movq %rbp, %rsi
callq 0x7a902
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rsi
movq 0x30(%rsp), %r15
movq (%r15), %rax
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq 0x28(%rsp), %rbp
movq (%r15), %rax
movq (%rax), %rdi
xorl %ebx, %ebx
movq %rbp, %rsi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x7b4c1
| ntt_fft_partial:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rsp+98h+var_50], r9
mov r13, r8
mov ebx, ecx
mov [rsp+98h+var_84], edx
mov [rsp+98h+var_80], rsi
mov r15, rdi
lea r12, ds:0[r8*8]
mov rax, [rdi]
mov rdi, [rax]
xor r14d, r14d
xor esi, esi
mov rdx, r12
call qword ptr [rax+8]
mov rbp, rax
test rax, rax
jz loc_7B4A8
mov rax, [rsp+98h+arg_8]
mov r9d, [rsp+98h+arg_0]
test ebx, ebx
jz loc_7B475
mov rdx, r13
shl rdx, 7
mov rax, [r15]
mov rdi, [rax]
xor r14d, r14d
xor esi, esi
call qword ptr [rax+8]
mov [rsp+98h+var_78], rax
test rax, rax
jz loc_7B4A8
mov [rsp+98h+var_70], rbp
lea rax, ntt_mods
mov rbp, [rsp+98h+arg_8]
mov rax, [rax+rbp*8]
mov [rsp+98h+var_58], rax
mov rax, [r15+rbp*8+8]
mov [rsp+98h+var_60], rax
imul rax, rbp, 340h
mov [rsp+98h+var_68], r15
add rax, r15
mov r9d, [rsp+98h+arg_0]
mov ecx, r9d
add ebx, [rsp+98h+var_84]
movsxd rdx, ebx
imul rcx, 1A0h
add rcx, rax
mov rax, [rcx+rdx*8+30h]
mov [rsp+98h+var_38], rax
mov rax, [rsp+98h+var_50]
lea r11, ds:0[rax*8]
push 1
pop rbx
xor ecx, ecx
push 10h
pop r14
mov r10, [rsp+98h+var_80]
mov r15, [rsp+98h+var_78]
mov [rsp+98h+var_48], r11
loc_7B32D:
cmp rcx, rax
jnb loc_7B4D2
mov [rsp+98h+var_40], rcx
mov rax, r15
mov rcx, r10
xor edx, edx
loc_7B343:
cmp rdx, r13
jz short loc_7B36E
mov rsi, rax
xor edi, edi
loc_7B34D:
cmp rdi, 10h
jz short loc_7B362
mov r8, [rcx+rdi*8]
mov [rsi], r8
inc rdi
add rsi, r12
jmp short loc_7B34D
loc_7B362:
inc rdx
add rcx, r11
add rax, 8
jmp short loc_7B343
loc_7B36E:
mov [rsp+98h+var_80], r10
loc_7B373:
sub r14, 1
jb loc_7B418
test r9d, r9d
jz short loc_7B3A2
mov rdi, r15
mov rsi, r13
mov rdx, rbx
mov rcx, [rsp+98h+var_58]
mov r8, [rsp+98h+var_60]
call mul_trig
mov r9d, [rsp+98h+arg_0]
loc_7B3A2:
mov [rsp+98h+var_98], ebp
mov rdi, [rsp+98h+var_68]
mov rsi, r15
mov rdx, r15
mov rcx, [rsp+98h+var_70]
mov r8d, [rsp+98h+var_84]
mov ebp, r9d
call ntt_fft
test eax, eax
jnz loc_7B499
test ebp, ebp
jnz short loc_7B3E6
mov rdi, r15
mov rsi, r13
mov rdx, rbx
mov rcx, [rsp+98h+var_58]
mov r8, [rsp+98h+var_60]
call mul_trig
loc_7B3E6:
mov rdi, rbx
mov rsi, [rsp+98h+var_38]
mov rdx, [rsp+98h+var_58]
mov rcx, [rsp+98h+var_60]
call mul_mod_fast
mov rbx, rax
add r15, r12
mov r9d, [rsp+98h+arg_0]
mov rbp, [rsp+98h+arg_8]
jmp loc_7B373
loc_7B418:
mov r15, [rsp+98h+var_78]
mov rax, r15
mov r10, [rsp+98h+var_80]
mov rcx, r10
xor edx, edx
mov r11, [rsp+98h+var_48]
push 10h
pop r14
loc_7B433:
cmp rdx, r13
jz short loc_7B45E
mov rsi, rax
xor edi, edi
loc_7B43D:
cmp rdi, 10h
jz short loc_7B452
mov r8, [rsi]
mov [rcx+rdi*8], r8
inc rdi
add rsi, r12
jmp short loc_7B43D
loc_7B452:
inc rdx
add rcx, r11
add rax, 8
jmp short loc_7B433
loc_7B45E:
mov rcx, [rsp+98h+var_40]
add rcx, 10h
sub r10, 0FFFFFFFFFFFFFF80h
mov rax, [rsp+98h+var_50]
jmp loc_7B32D
loc_7B475:
mov [rsp+98h+var_98], eax
mov rdi, r15
mov rdx, [rsp+98h+var_80]
mov rsi, rdx
mov rcx, rbp
mov r8d, [rsp+98h+var_84]
call ntt_fft
test eax, eax
jz short loc_7B4EA
xor r14d, r14d
jmp short loc_7B4A8
loc_7B499:
mov r14, [rsp+98h+var_78]
mov r15, [rsp+98h+var_68]
mov rbp, [rsp+98h+var_70]
loc_7B4A8:
mov rdi, r15
mov rsi, r14
call ntt_free
mov rdi, r15
mov rsi, rbp
call ntt_free
push 0FFFFFFFFFFFFFFFFh
pop rbx
loc_7B4C1:
mov eax, ebx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7B4D2:
mov rsi, r15
mov r15, [rsp+98h+var_68]
mov rax, [r15]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov rbp, [rsp+98h+var_70]
loc_7B4EA:
mov rax, [r15]
mov rdi, [rax]
xor ebx, ebx
mov rsi, rbp
xor edx, edx
call qword ptr [rax+8]
jmp short loc_7B4C1
| long long ntt_fft_partial(
_QWORD **a1,
long long a2,
int a3,
int a4,
long long a5,
unsigned long long a6,
unsigned int a7,
long long a8)
{
_QWORD **v10; // r15
long long v11; // r12
long long v12; // r14
long long v13; // rcx
long long v14; // rbp
long long v15; // r8
int v16; // ebp
unsigned int v17; // r9d
unsigned long long v18; // rax
long long v19; // r11
unsigned long long v20; // rbx
unsigned long long v21; // rcx
long long v22; // r14
long long v23; // r10
long long v24; // r15
_QWORD *v25; // rax
long long v26; // rcx
long long i; // rdx
_QWORD *v28; // rsi
long long j; // rdi
unsigned int v31; // ebp
_QWORD *v32; // rax
long long v33; // rcx
long long v34; // rdx
_QWORD *v35; // rsi
long long k; // rdi
unsigned int v37; // ebx
long long v39; // rsi
int v40; // [rsp+0h] [rbp-98h]
long long v42; // [rsp+18h] [rbp-80h]
long long v43; // [rsp+20h] [rbp-78h]
long long v44; // [rsp+28h] [rbp-70h]
long long v46; // [rsp+38h] [rbp-60h]
long long v47; // [rsp+40h] [rbp-58h]
unsigned long long v49; // [rsp+58h] [rbp-40h]
unsigned long long v50; // [rsp+60h] [rbp-38h]
v10 = a1;
v11 = 8 * a5;
v12 = 0LL;
v14 = ((long long ( *)(_QWORD, _QWORD, long long))(*a1)[1])(**a1, 0LL, 8 * a5);
if ( v14 )
{
if ( a4 )
{
v12 = 0LL;
v43 = ((long long ( *)(_QWORD, _QWORD, long long, long long, long long, _QWORD))(*a1)[1])(
**a1,
0LL,
a5 << 7,
v13,
v15,
a7);
if ( v43 )
{
v44 = v14;
v16 = a8;
v47 = ntt_mods[a8];
v46 = (long long)a1[a8 + 1];
v17 = a7;
v50 = (unsigned long long)(&(&(&a1[104 * a8])[52 * a7])[a3])[a4 + 6];
v18 = a6;
v19 = 8 * a6;
v20 = 1LL;
v21 = 0LL;
v22 = 16LL;
v23 = a2;
v24 = v43;
while ( v21 < v18 )
{
v49 = v21;
v25 = (_QWORD *)v24;
v26 = v23;
for ( i = 0LL; i != a5; ++i )
{
v28 = v25;
for ( j = 0LL; j != 16; ++j )
{
*v28 = *(_QWORD *)(v26 + 8 * j);
v28 = (_QWORD *)((char *)v28 + v11);
}
v26 += v19;
++v25;
}
v42 = v23;
while ( v22-- != 0 )
{
if ( v17 )
{
mul_trig(v24, a5, v20, v47, v46);
v17 = a7;
}
v40 = v16;
v31 = v17;
if ( (unsigned int)ntt_fft((_DWORD)a1, v24, v24, v44, a3, v17, v40) )
{
v12 = v43;
v10 = a1;
v14 = v44;
goto LABEL_30;
}
if ( !v31 )
mul_trig(v24, a5, v20, v47, v46);
v20 = mul_mod_fast(v20, v50, v47, v46);
v24 += v11;
v17 = a7;
v16 = a8;
}
v24 = v43;
v32 = (_QWORD *)v43;
v33 = v42;
v34 = 0LL;
v19 = 8 * a6;
v22 = 16LL;
while ( v34 != a5 )
{
v35 = v32;
for ( k = 0LL; k != 16; ++k )
{
*(_QWORD *)(v33 + 8 * k) = *v35;
v35 = (_QWORD *)((char *)v35 + v11);
}
++v34;
v33 += 8 * a6;
++v32;
}
v21 = v49 + 16;
v23 = v42 + 128;
v18 = a6;
}
v39 = v24;
v10 = a1;
((void ( *)(_QWORD, long long, _QWORD))(*a1)[1])(**a1, v39, 0LL);
v14 = v44;
goto LABEL_33;
}
}
else
{
if ( !(unsigned int)ntt_fft((_DWORD)a1, a2, a2, v14, a3, a7, a8) )
{
LABEL_33:
v37 = 0;
((void ( *)(_QWORD, long long, _QWORD))(*v10)[1])(**v10, v14, 0LL);
return v37;
}
v12 = 0LL;
}
}
LABEL_30:
ntt_free(v10, v12);
ntt_free(v10, v14);
return (unsigned int)-1;
}
| ntt_fft_partial:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x48],R9
MOV R13,R8
MOV EBX,ECX
MOV dword ptr [RSP + 0x14],EDX
MOV qword ptr [RSP + 0x18],RSI
MOV R15,RDI
LEA R12,[R8*0x8]
MOV RAX,qword ptr [RDI]
MOV RDI,qword ptr [RAX]
XOR R14D,R14D
XOR ESI,ESI
MOV RDX,R12
CALL qword ptr [RAX + 0x8]
MOV RBP,RAX
TEST RAX,RAX
JZ 0x0017b4a8
MOV RAX,qword ptr [RSP + 0xa8]
MOV R9D,dword ptr [RSP + 0xa0]
TEST EBX,EBX
JZ 0x0017b475
MOV RDX,R13
SHL RDX,0x7
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX]
XOR R14D,R14D
XOR ESI,ESI
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x0017b4a8
MOV qword ptr [RSP + 0x28],RBP
LEA RAX,[0x189fa0]
MOV RBP,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RAX + RBP*0x8]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [R15 + RBP*0x8 + 0x8]
MOV qword ptr [RSP + 0x38],RAX
IMUL RAX,RBP,0x340
MOV qword ptr [RSP + 0x30],R15
ADD RAX,R15
MOV R9D,dword ptr [RSP + 0xa0]
MOV ECX,R9D
ADD EBX,dword ptr [RSP + 0x14]
MOVSXD RDX,EBX
IMUL RCX,RCX,0x1a0
ADD RCX,RAX
MOV RAX,qword ptr [RCX + RDX*0x8 + 0x30]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x48]
LEA R11,[RAX*0x8]
PUSH 0x1
POP RBX
XOR ECX,ECX
PUSH 0x10
POP R14
MOV R10,qword ptr [RSP + 0x18]
MOV R15,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x50],R11
LAB_0017b32d:
CMP RCX,RAX
JNC 0x0017b4d2
MOV qword ptr [RSP + 0x58],RCX
MOV RAX,R15
MOV RCX,R10
XOR EDX,EDX
LAB_0017b343:
CMP RDX,R13
JZ 0x0017b36e
MOV RSI,RAX
XOR EDI,EDI
LAB_0017b34d:
CMP RDI,0x10
JZ 0x0017b362
MOV R8,qword ptr [RCX + RDI*0x8]
MOV qword ptr [RSI],R8
INC RDI
ADD RSI,R12
JMP 0x0017b34d
LAB_0017b362:
INC RDX
ADD RCX,R11
ADD RAX,0x8
JMP 0x0017b343
LAB_0017b36e:
MOV qword ptr [RSP + 0x18],R10
LAB_0017b373:
SUB R14,0x1
JC 0x0017b418
TEST R9D,R9D
JZ 0x0017b3a2
MOV RDI,R15
MOV RSI,R13
MOV RDX,RBX
MOV RCX,qword ptr [RSP + 0x40]
MOV R8,qword ptr [RSP + 0x38]
CALL 0x0017b6fa
MOV R9D,dword ptr [RSP + 0xa0]
LAB_0017b3a2:
MOV dword ptr [RSP],EBP
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,R15
MOV RDX,R15
MOV RCX,qword ptr [RSP + 0x28]
MOV R8D,dword ptr [RSP + 0x14]
MOV EBP,R9D
CALL 0x0017b4fc
TEST EAX,EAX
JNZ 0x0017b499
TEST EBP,EBP
JNZ 0x0017b3e6
MOV RDI,R15
MOV RSI,R13
MOV RDX,RBX
MOV RCX,qword ptr [RSP + 0x40]
MOV R8,qword ptr [RSP + 0x38]
CALL 0x0017b6fa
LAB_0017b3e6:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x38]
CALL 0x0017b1d8
MOV RBX,RAX
ADD R15,R12
MOV R9D,dword ptr [RSP + 0xa0]
MOV RBP,qword ptr [RSP + 0xa8]
JMP 0x0017b373
LAB_0017b418:
MOV R15,qword ptr [RSP + 0x20]
MOV RAX,R15
MOV R10,qword ptr [RSP + 0x18]
MOV RCX,R10
XOR EDX,EDX
MOV R11,qword ptr [RSP + 0x50]
PUSH 0x10
POP R14
LAB_0017b433:
CMP RDX,R13
JZ 0x0017b45e
MOV RSI,RAX
XOR EDI,EDI
LAB_0017b43d:
CMP RDI,0x10
JZ 0x0017b452
MOV R8,qword ptr [RSI]
MOV qword ptr [RCX + RDI*0x8],R8
INC RDI
ADD RSI,R12
JMP 0x0017b43d
LAB_0017b452:
INC RDX
ADD RCX,R11
ADD RAX,0x8
JMP 0x0017b433
LAB_0017b45e:
MOV RCX,qword ptr [RSP + 0x58]
ADD RCX,0x10
SUB R10,-0x80
MOV RAX,qword ptr [RSP + 0x48]
JMP 0x0017b32d
LAB_0017b475:
MOV dword ptr [RSP],EAX
MOV RDI,R15
MOV RDX,qword ptr [RSP + 0x18]
MOV RSI,RDX
MOV RCX,RBP
MOV R8D,dword ptr [RSP + 0x14]
CALL 0x0017b4fc
TEST EAX,EAX
JZ 0x0017b4ea
XOR R14D,R14D
JMP 0x0017b4a8
LAB_0017b499:
MOV R14,qword ptr [RSP + 0x20]
MOV R15,qword ptr [RSP + 0x30]
MOV RBP,qword ptr [RSP + 0x28]
LAB_0017b4a8:
MOV RDI,R15
MOV RSI,R14
CALL 0x0017a902
MOV RDI,R15
MOV RSI,RBP
CALL 0x0017a902
PUSH -0x1
POP RBX
LAB_0017b4c1:
MOV EAX,EBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017b4d2:
MOV RSI,R15
MOV R15,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV RBP,qword ptr [RSP + 0x28]
LAB_0017b4ea:
MOV RAX,qword ptr [R15]
MOV RDI,qword ptr [RAX]
XOR EBX,EBX
MOV RSI,RBP
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x0017b4c1
|
int4
ntt_fft_partial(long *param_1,long param_2,int param_3,int param_4,long param_5,ulong param_6,
uint param_7,long param_8)
{
int8 uVar1;
long lVar2;
long lVar3;
int iVar4;
long lVar5;
int8 *puVar6;
int8 uVar7;
int8 *puVar8;
long lVar9;
ulong uVar10;
long lVar11;
int8 *puVar12;
long lVar13;
long lVar14;
bool bVar15;
lVar5 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,0,param_5 * 8);
puVar8 = (int8 *)0x0;
if (lVar5 != 0) {
if (param_4 == 0) {
iVar4 = ntt_fft(param_1,param_2,param_2,lVar5,param_3,param_7,(int)param_8);
if (iVar4 == 0) goto LAB_0017b4ea;
puVar8 = (int8 *)0x0;
}
else {
puVar6 = (int8 *)
(*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,0,param_5 << 7);
puVar8 = (int8 *)0x0;
if (puVar6 != (int8 *)0x0) {
uVar1 = (&ntt_mods)[param_8];
lVar2 = param_1[param_8 + 1];
lVar3 = param_1[param_8 * 0x68 + (ulong)param_7 * 0x34 + (long)(param_4 + param_3) + 6];
uVar7 = 1;
for (uVar10 = 0; lVar14 = 0x10, uVar10 < param_6; uVar10 = uVar10 + 0x10) {
puVar8 = puVar6;
lVar9 = param_2;
for (lVar11 = 0; puVar12 = puVar6, lVar11 != param_5; lVar11 = lVar11 + 1) {
puVar12 = puVar8;
for (lVar13 = 0; lVar13 != 0x10; lVar13 = lVar13 + 1) {
*puVar12 = *(int8 *)(lVar9 + lVar13 * 8);
puVar12 = puVar12 + param_5;
}
lVar9 = lVar9 + param_6 * 8;
puVar8 = puVar8 + 1;
}
while (bVar15 = lVar14 != 0, lVar14 = lVar14 + -1, bVar15) {
if (param_7 != 0) {
mul_trig(puVar12,param_5,uVar7,uVar1,lVar2);
}
iVar4 = ntt_fft(param_1,puVar12,puVar12,lVar5,param_3,param_7,(int)param_8);
puVar8 = puVar6;
if (iVar4 != 0) goto LAB_0017b4a8;
if (param_7 == 0) {
mul_trig(puVar12,param_5,uVar7,uVar1,lVar2);
}
uVar7 = mul_mod_fast(uVar7,lVar3,uVar1,lVar2);
puVar12 = puVar12 + param_5;
}
puVar8 = puVar6;
lVar14 = param_2;
for (lVar9 = 0; lVar9 != param_5; lVar9 = lVar9 + 1) {
puVar12 = puVar8;
for (lVar11 = 0; lVar11 != 0x10; lVar11 = lVar11 + 1) {
*(int8 *)(lVar14 + lVar11 * 8) = *puVar12;
puVar12 = puVar12 + param_5;
}
lVar14 = lVar14 + param_6 * 8;
puVar8 = puVar8 + 1;
}
param_2 = param_2 + 0x80;
}
(*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,puVar6,0);
LAB_0017b4ea:
(*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,lVar5,0);
return 0;
}
}
}
LAB_0017b4a8:
ntt_free(param_1,puVar8);
ntt_free(param_1,lVar5);
return 0xffffffff;
}
| |
40,210 | hash_to_field | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/hash_to_field.c | static void hash_to_field(vec384 elems[], size_t nelems,
const unsigned char *aug, size_t aug_len,
const unsigned char *msg, size_t msg_len,
const unsigned char *DST, size_t DST_len)
{
size_t L = sizeof(vec384) + 128/8; /* ceil((ceil(log2(p)) + k) / 8) */
size_t len_in_bytes = L * nelems; /* divisible by 64, hurray! */
#if !defined(__STDC_VERSION__) || __STDC_VERSION__<199901 \
|| defined(__STDC_NO_VLA__)
limb_t *pseudo_random = alloca(len_in_bytes);
#else
limb_t pseudo_random[len_in_bytes/sizeof(limb_t)];
#endif
unsigned char *bytes;
vec768 elem;
aug_len = aug!=NULL ? aug_len : 0;
DST_len = DST!=NULL ? DST_len : 0;
expand_message_xmd((unsigned char *)pseudo_random, len_in_bytes,
aug, aug_len, msg, msg_len, DST, DST_len);
vec_zero(elem, sizeof(elem));
bytes = (unsigned char *)pseudo_random;
while (nelems--) {
limbs_from_be_bytes(elem, bytes, L);
bytes += L;
/*
* L-bytes block % P, output is in Montgomery domain...
*/
redc_mont_384(elems[0], elem, BLS12_381_P, p0);
mul_mont_384(elems[0], elems[0], BLS12_381_RRRR, BLS12_381_P, p0);
elems++;
}
} | O3 | c | hash_to_field:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rbp), %rax
shlq $0x6, %rsi
movq %rsp, %r15
subq %rsi, %r15
movq %r15, %rsp
testq %rdx, %rdx
cmoveq %rdx, %rcx
movq %rax, %r10
testq %rax, %rax
je 0x65031
movq 0x18(%rbp), %r10
movq %r15, %rdi
pushq %r10
pushq %rax
callq 0x570ce
addq $0x10, %rsp
xorl %eax, %eax
movq $0x0, -0x90(%rbp,%rax,8)
incq %rax
cmpq $0xc, %rax
jne 0x65042
leaq -0x90(%rbp), %rax
testq %rbx, %rbx
je 0x650da
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
leaq 0x2589c(%rip), %r13 # 0x8a910
movl $0x3f, %eax
xorl %ecx, %ecx
movq %r15, %rdx
shlq $0x8, %rcx
movzbl (%rdx), %esi
incq %rdx
orq %rsi, %rcx
movq %rax, %rsi
andq $-0x8, %rsi
movq %rcx, -0x90(%rbp,%rsi)
addq $-0x1, %rax
jb 0x6507e
addq $0x40, %r15
movq %r14, %rdi
leaq -0x90(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x72760
movq %r14, %rdi
movq %r14, %rsi
leaq 0x2673a(%rip), %rdx # 0x8b800
movq %r13, %rcx
movq %r12, %r8
callq 0x72e60
addq $0x30, %r14
decq %rbx
jne 0x65074
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| hash_to_field:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, rsi
mov r14, rdi
mov rax, [rbp+arg_0]
shl rsi, 6
mov r15, rsp
sub r15, rsi
mov rsp, r15
test rdx, rdx
cmovz rcx, rdx
mov r10, rax
test rax, rax
jz short loc_65031
mov r10, [rbp+arg_8]
loc_65031:
mov rdi, r15
push r10
push rax
call expand_message_xmd
add rsp, 10h
xor eax, eax
loc_65042:
mov [rbp+rax*8+var_90], 0
inc rax
cmp rax, 0Ch
jnz short loc_65042
lea rax, [rbp+var_90]
test rbx, rbx
jz short loc_650DA
mov r12, 89F3FFFCFFFCFFFDh
lea r13, BLS12_381_P
loc_65074:
mov eax, 3Fh ; '?'
xor ecx, ecx
mov rdx, r15
loc_6507E:
shl rcx, 8
movzx esi, byte ptr [rdx]
inc rdx
or rcx, rsi
mov rsi, rax
and rsi, 0FFFFFFFFFFFFFFF8h
mov [rbp+rsi+var_90], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_6507E
add r15, 40h ; '@'
mov rdi, r14
lea rsi, [rbp+var_90]
mov rdx, r13
mov rcx, r12
call redc_mont_384
mov rdi, r14
mov rsi, r14
lea rdx, BLS12_381_RRRR
mov rcx, r13
mov r8, r12
call mul_mont_384
add r14, 30h ; '0'
dec rbx
jnz short loc_65074
loc_650DA:
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| // bad sp value at call has been detected, the output may be wrong!
_QWORD * hash_to_field(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long *a7,
unsigned long long a8)
{
long long v8; // rbx
long long v10; // rsi
char *v11; // r15
unsigned long long v12; // r10
long long i; // rax
_QWORD *result; // rax
long long v15; // rax
long long v16; // rcx
unsigned __int8 *v17; // rdx
long long v18; // rsi
_QWORD v20[18]; // [rsp+0h] [rbp-90h] BYREF
v8 = a2;
v10 = a2 << 6;
v11 = (char *)v20 - v10;
if ( !a3 )
a4 = 0LL;
v12 = (unsigned long long)a7;
if ( a7 )
v12 = a8;
expand_message_xmd((long long)v20 - v10, v10, a3, a4, a5, a6, a7, v12);
for ( i = 0LL; i != 12; ++i )
v20[i] = 0LL;
for ( result = v20; v8; --v8 )
{
v15 = 63LL;
v16 = 0LL;
v17 = (unsigned __int8 *)v11;
do
{
v18 = *v17++;
v16 = v18 | (v16 << 8);
*(_QWORD *)((char *)v20 + (v15 & 0xFFFFFFFFFFFFFFF8LL)) = v16;
}
while ( v15-- != 0 );
v11 += 64;
redc_mont_384(a1, v20, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
result = (_QWORD *)mul_mont_384(a1, a1, &BLS12_381_RRRR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
a1 += 48LL;
}
return result;
}
| hash_to_field:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RBP + 0x10]
SHL RSI,0x6
MOV R15,RSP
SUB R15,RSI
MOV RSP,R15
TEST RDX,RDX
CMOVZ RCX,RDX
MOV R10,RAX
TEST RAX,RAX
JZ 0x00165031
MOV R10,qword ptr [RBP + 0x18]
LAB_00165031:
MOV RDI,R15
PUSH R10
PUSH RAX
CALL 0x001570ce
ADD RSP,0x10
XOR EAX,EAX
LAB_00165042:
MOV qword ptr [RBP + RAX*0x8 + -0x90],0x0
INC RAX
CMP RAX,0xc
JNZ 0x00165042
LEA RAX,[RBP + -0x90]
TEST RBX,RBX
JZ 0x001650da
MOV R12,-0x760c000300030003
LEA R13,[0x18a910]
LAB_00165074:
MOV EAX,0x3f
XOR ECX,ECX
MOV RDX,R15
LAB_0016507e:
SHL RCX,0x8
MOVZX ESI,byte ptr [RDX]
INC RDX
OR RCX,RSI
MOV RSI,RAX
AND RSI,-0x8
MOV qword ptr [RBP + RSI*0x1 + -0x90],RCX
ADD RAX,-0x1
JC 0x0016507e
ADD R15,0x40
MOV RDI,R14
LEA RSI,[RBP + -0x90]
MOV RDX,R13
MOV RCX,R12
CALL 0x00172760
MOV RDI,R14
MOV RSI,R14
LEA RDX,[0x18b800]
MOV RCX,R13
MOV R8,R12
CALL 0x00172e60
ADD R14,0x30
DEC RBX
JNZ 0x00165074
LAB_001650da:
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Type propagation algorithm not settling */
byte * hash_to_field(long param_1,long param_2)
{
byte bVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
byte *pbVar5;
byte *pbVar6;
byte *pbVar7;
byte *pbVar8;
byte *pbVar9;
bool bVar10;
long in_stack_00000008;
long in_stack_00000010;
byte abStack_b0 [24];
ulong local_98 [13];
pbVar9 = abStack_b0 + (param_2 * -8 + 3) * 8;
lVar2 = in_stack_00000008;
if (in_stack_00000008 != 0) {
lVar2 = in_stack_00000010;
}
*(long *)(abStack_b0 + (param_2 * -8 + 2) * 8) = lVar2;
*(long *)(abStack_b0 + (param_2 * -8 + 1) * 8) = in_stack_00000008;
pbVar6 = abStack_b0 + param_2 * -0x40;
pbVar6[0] = 0x3c;
pbVar6[1] = 0x50;
pbVar6[2] = 0x16;
pbVar6[3] = 0;
pbVar6[4] = 0;
pbVar6[5] = 0;
pbVar6[6] = 0;
pbVar6[7] = 0;
expand_message_xmd(pbVar9);
lVar2 = 0;
do {
pbVar5 = abStack_b0 + (lVar2 + 3) * 8;
pbVar5[0] = 0;
pbVar5[1] = 0;
pbVar5[2] = 0;
pbVar5[3] = 0;
pbVar5[4] = 0;
pbVar5[5] = 0;
pbVar5[6] = 0;
pbVar5[7] = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 0xc);
pbVar5 = abStack_b0 + 0x18;
lVar2 = param_2;
if (param_2 != 0) {
do {
uVar3 = 0x3f;
uVar4 = 0;
pbVar5 = pbVar9;
do {
bVar1 = *pbVar5;
pbVar5 = pbVar5 + 1;
uVar4 = uVar4 << 8 | (ulong)bVar1;
*(ulong *)(abStack_b0 + (uVar3 & 0xfffffffffffffff8) + 0x18) = uVar4;
bVar10 = uVar3 != 0;
uVar3 = uVar3 - 1;
} while (bVar10);
pbVar9 = pbVar9 + 0x40;
pbVar7 = abStack_b0 + (param_2 * -8 + 2) * 8;
pbVar7[0] = 0xb9;
pbVar7[1] = 0x50;
pbVar7[2] = 0x16;
pbVar7[3] = 0;
pbVar7[4] = 0;
pbVar7[5] = 0;
pbVar7[6] = 0;
pbVar7[7] = 0;
redc_mont_384(param_1,abStack_b0 + 0x18,BLS12_381_P,0x89f3fffcfffcfffd);
pbVar8 = abStack_b0 + (param_2 * -8 + 2) * 8;
pbVar8[0] = 0xd1;
pbVar8[1] = 0x50;
pbVar8[2] = 0x16;
pbVar8[3] = 0;
pbVar8[4] = 0;
pbVar8[5] = 0;
pbVar8[6] = 0;
pbVar8[7] = 0;
pbVar5 = (byte *)mul_mont_384(param_1,param_1,BLS12_381_RRRR,BLS12_381_P,0x89f3fffcfffcfffd);
param_1 = param_1 + 0x30;
lVar2 = lVar2 + -1;
} while (lVar2 != 0);
}
return pbVar5;
}
| |
40,211 | mysql_stmt_send_long_data_start | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_send_long_data_start(my_bool *ret, MYSQL_STMT *stmt,
unsigned int param_number,
const char *data, unsigned long length)
{
MK_ASYNC_START_BODY(
mysql_stmt_send_long_data,
stmt->mysql,
{
WIN_SET_NONBLOCKING(stmt->mysql)
parms.stmt= stmt;
parms.param_number= param_number;
parms.data= data;
parms.length= length;
},
TRUE,
r_my_bool,
/* If stmt->mysql==NULL then we will not block so can call directly. */
if (!stmt->mysql)
{
*ret= mysql_stmt_send_long_data(stmt, param_number, data, length);
return 0;
})
} | O0 | c | mysql_stmt_send_long_data_start:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x3e19e
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x2c570
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3e2c2
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x40(%rbp), %rdi
addq $0x38, %rdi
leaq 0xe6(%rip), %rsi # 0x3e2d0
leaq -0x60(%rbp), %rdx
callq 0x3f430
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
movb $0x0, 0x15(%rax)
movq -0x40(%rbp), %rax
movb $0x0, 0x14(%rax)
cmpl $0x0, -0x34(%rbp)
jle 0x3e222
movq -0x40(%rbp), %rax
movb $0x1, 0x15(%rax)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3e2c2
cmpl $0x0, -0x34(%rbp)
jge 0x3e2ae
jmp 0x3e22e
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 0x21cba(%rip), %rax # 0x5ff10
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 0x21c98(%rip), %rax # 0x5ff20
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
movb $0x1, (%rax)
jmp 0x3e2bb
movq -0x40(%rbp), %rax
movb 0x8(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mysql_stmt_send_long_data_start:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_18]
cmp qword ptr [rax+38h], 0
jnz short loc_3E19E
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call mysql_stmt_send_long_data
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov [rbp+var_4], 0
jmp loc_3E2C2
loc_3E19E:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov eax, [rbp+var_1C]
mov [rbp+var_58], eax
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
mov rax, [rbp+var_30]
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov byte ptr [rax+14h], 1
mov rdi, [rbp+var_40]
add rdi, 38h ; '8'
lea rsi, mysql_stmt_send_long_data_start_internal
lea rdx, [rbp+var_60]
call my_context_spawn
mov [rbp+var_34], eax
mov rax, [rbp+var_40]
mov byte ptr [rax+15h], 0
mov rax, [rbp+var_40]
mov byte ptr [rax+14h], 0
cmp [rbp+var_34], 0
jle short loc_3E222
mov rax, [rbp+var_40]
mov byte ptr [rax+15h], 1
mov rax, [rbp+var_40]
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_3E2C2
loc_3E222:
cmp [rbp+var_34], 0
jge loc_3E2AE
jmp short $+2
loc_3E22E:
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 byte ptr [rax], 1
jmp short loc_3E2BB
loc_3E2AE:
mov rax, [rbp+var_40]
mov cl, [rax+8]
mov rax, [rbp+var_10]
mov [rax], cl
loc_3E2BB:
mov [rbp+var_4], 0
loc_3E2C2:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long mysql_stmt_send_long_data_start(char *a1, long long a2, unsigned int a3, long long a4, long long a5)
{
long long v6; // [rsp+0h] [rbp-60h] BYREF
unsigned int v7; // [rsp+8h] [rbp-58h]
long long v8; // [rsp+10h] [rbp-50h]
long long v9; // [rsp+18h] [rbp-48h]
_BYTE *v10; // [rsp+20h] [rbp-40h]
int v11; // [rsp+2Ch] [rbp-34h]
long long v12; // [rsp+30h] [rbp-30h]
long long v13; // [rsp+38h] [rbp-28h]
unsigned int v14; // [rsp+44h] [rbp-1Ch]
long long v15; // [rsp+48h] [rbp-18h]
char *v16; // [rsp+50h] [rbp-10h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = a5;
if ( *(_QWORD *)(a2 + 56) )
{
v10 = *(_BYTE **)(*(_QWORD *)(*(_QWORD *)(v15 + 56) + 1152LL) + 40LL);
v6 = v15;
v7 = v14;
v8 = v13;
v9 = v12;
v10[20] = 1;
v11 = my_context_spawn(v10 + 56, mysql_stmt_send_long_data_start_internal, &v6);
v10[21] = 0;
v10[20] = 0;
if ( v11 <= 0 )
{
if ( v11 >= 0 )
{
*v16 = v10[8];
}
else
{
*(_DWORD *)(*(_QWORD *)(v15 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(v15 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(v15 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(v15 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(v15 + 56) + 662LL) = 0;
*v16 = 1;
}
return 0;
}
else
{
v10[21] = 1;
return *(unsigned int *)v10;
}
}
else
{
*v16 = mysql_stmt_send_long_data(v15, v14, v13, v12);
return 0;
}
}
| mysql_stmt_send_long_data_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x0013e19e
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0012c570
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013e2c2
LAB_0013e19e:
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 + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x14],0x1
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x38
LEA RSI,[0x13e2d0]
LEA RDX,[RBP + -0x60]
CALL 0x0013f430
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x15],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x14],0x0
CMP dword ptr [RBP + -0x34],0x0
JLE 0x0013e222
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x15],0x1
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013e2c2
LAB_0013e222:
CMP dword ptr [RBP + -0x34],0x0
JGE 0x0013e2ae
JMP 0x0013e22e
LAB_0013e22e:
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,[0x15ff10]
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,[0x15ff20]
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 byte ptr [RAX],0x1
JMP 0x0013e2bb
LAB_0013e2ae:
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,byte ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
LAB_0013e2bb:
MOV dword ptr [RBP + -0x4],0x0
LAB_0013e2c2:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4
mysql_stmt_send_long_data_start
(int1 *param_1,long param_2,int4 param_3,int8 param_4,int8 param_5
)
{
int1 uVar1;
long local_68;
int4 local_60;
int8 local_58;
int8 local_50;
int4 *local_48;
int local_3c;
int8 local_38;
int8 local_30;
int4 local_24;
long local_20;
int1 *local_18;
int4 local_c;
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
if (*(long *)(param_2 + 0x38) == 0) {
uVar1 = mysql_stmt_send_long_data(param_2,param_3,param_4,param_5);
*local_18 = uVar1;
local_c = 0;
}
else {
local_48 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
*(int1 *)(local_48 + 5) = 1;
local_68 = param_2;
local_60 = param_3;
local_58 = param_4;
local_50 = param_5;
local_3c = my_context_spawn(local_48 + 0xe,mysql_stmt_send_long_data_start_internal,&local_68);
*(int1 *)((long)local_48 + 0x15) = 0;
*(int1 *)(local_48 + 5) = 0;
if (local_3c < 1) {
if (local_3c < 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_0015ff60,
0x1ff);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0;
*local_18 = 1;
}
else {
*local_18 = *(int1 *)(local_48 + 2);
}
local_c = 0;
}
else {
*(int1 *)((long)local_48 + 0x15) = 1;
local_c = *local_48;
}
}
return local_c;
}
| |
40,212 | mysql_stmt_send_long_data_start | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_send_long_data_start(my_bool *ret, MYSQL_STMT *stmt,
unsigned int param_number,
const char *data, unsigned long length)
{
MK_ASYNC_START_BODY(
mysql_stmt_send_long_data,
stmt->mysql,
{
WIN_SET_NONBLOCKING(stmt->mysql)
parms.stmt= stmt;
parms.param_number= param_number;
parms.data= data;
parms.length= length;
},
TRUE,
r_my_bool,
/* If stmt->mysql==NULL then we will not block so can call directly. */
if (!stmt->mysql)
{
*ret= mysql_stmt_send_long_data(stmt, param_number, data, length);
return 0;
})
} | O3 | c | mysql_stmt_send_long_data_start:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
testq %rax, %rax
je 0x2cc4c
movq 0x480(%rax), %rax
movq 0x28(%rax), %r15
leaq -0x38(%rbp), %rax
movq %r14, (%rax)
movl %edx, 0x8(%rax)
movq %rcx, 0x10(%rax)
movq %r8, 0x18(%rax)
movb $0x1, 0x14(%r15)
leaq 0x38(%r15), %rdi
leaq 0xad(%rip), %rsi # 0x2ccd9
movq %rax, %rdx
callq 0x2d85c
movw $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x2cc5e
movb $0x1, 0x15(%r15)
movl (%r15), %eax
jmp 0x2ccce
movq %r14, %rdi
movl %edx, %esi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x21fa8
jmp 0x2ccca
js 0x2cc66
movb 0x8(%r15), %al
jmp 0x2ccca
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1bddc(%rip), %rax # 0x48a60
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1bdc1(%rip), %rax # 0x48a70
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movb $0x1, %al
movb %al, (%rbx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_send_long_data_start:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
test rax, rax
jz short loc_2CC4C
mov rax, [rax+480h]
mov r15, [rax+28h]
lea rax, [rbp+var_38]
mov [rax], r14
mov [rax+8], edx
mov [rax+10h], rcx
mov [rax+18h], r8
mov byte ptr [r15+14h], 1
lea rdi, [r15+38h]
lea rsi, mysql_stmt_send_long_data_start_internal
mov rdx, rax
call my_context_spawn
mov word ptr [r15+14h], 0
test eax, eax
jle short loc_2CC5E
mov byte ptr [r15+15h], 1
mov eax, [r15]
jmp loc_2CCCE
loc_2CC4C:
mov rdi, r14
mov esi, edx
mov rdx, rcx
mov rcx, r8
call mysql_stmt_send_long_data
jmp short loc_2CCCA
loc_2CC5E:
js short loc_2CC66
mov al, [r15+8]
jmp short loc_2CCCA
loc_2CC66:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov al, 1
loc_2CCCA:
mov [rbx], al
xor eax, eax
loc_2CCCE:
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_send_long_data_start(char *a1, long long a2, unsigned int a3, long long a4, long long a5)
{
long long v5; // rax
_BYTE *v6; // r15
int v7; // eax
char v9; // al
long long v10; // [rsp+8h] [rbp-38h] BYREF
unsigned int v11; // [rsp+10h] [rbp-30h]
long long v12; // [rsp+18h] [rbp-28h]
long long v13; // [rsp+20h] [rbp-20h]
v5 = *(_QWORD *)(a2 + 56);
if ( v5 )
{
v6 = *(_BYTE **)(*(_QWORD *)(v5 + 1152) + 40LL);
v10 = a2;
v11 = a3;
v12 = a4;
v13 = a5;
v6[20] = 1;
v7 = my_context_spawn(v6 + 56, mysql_stmt_send_long_data_start_internal, &v10);
*((_WORD *)v6 + 10) = 0;
if ( v7 > 0 )
{
v6[21] = 1;
return *(unsigned int *)v6;
}
if ( v7 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v9 = 1;
}
else
{
v9 = v6[8];
}
}
else
{
v9 = mysql_stmt_send_long_data(a2, a3, a4, a5);
}
*a1 = v9;
return 0LL;
}
| mysql_stmt_send_long_data_start:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
TEST RAX,RAX
JZ 0x0012cc4c
MOV RAX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RAX + 0x28]
LEA RAX,[RBP + -0x38]
MOV qword ptr [RAX],R14
MOV dword ptr [RAX + 0x8],EDX
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],R8
MOV byte ptr [R15 + 0x14],0x1
LEA RDI,[R15 + 0x38]
LEA RSI,[0x12ccd9]
MOV RDX,RAX
CALL 0x0012d85c
MOV word ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x0012cc5e
MOV byte ptr [R15 + 0x15],0x1
MOV EAX,dword ptr [R15]
JMP 0x0012ccce
LAB_0012cc4c:
MOV RDI,R14
MOV ESI,EDX
MOV RDX,RCX
MOV RCX,R8
CALL 0x00121fa8
JMP 0x0012ccca
LAB_0012cc5e:
JS 0x0012cc66
MOV AL,byte ptr [R15 + 0x8]
JMP 0x0012ccca
LAB_0012cc66:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x148a60]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x148a70]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV AL,0x1
LAB_0012ccca:
MOV byte ptr [RBX],AL
XOR EAX,EAX
LAB_0012ccce:
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4
mysql_stmt_send_long_data_start
(int1 *param_1,long param_2,int4 param_3,int8 param_4,int8 param_5
)
{
int4 *puVar1;
int1 uVar2;
int iVar3;
long local_40;
int4 local_38;
int8 local_30;
int8 local_28;
if (*(long *)(param_2 + 0x38) == 0) {
uVar2 = mysql_stmt_send_long_data(param_2,param_3,param_4,param_5);
}
else {
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
*(int1 *)(puVar1 + 5) = 1;
local_40 = param_2;
local_38 = param_3;
local_30 = param_4;
local_28 = param_5;
iVar3 = my_context_spawn(puVar1 + 0xe,mysql_stmt_send_long_data_start_internal,&local_40);
*(int2 *)(puVar1 + 5) = 0;
if (0 < iVar3) {
*(int1 *)((long)puVar1 + 0x15) = 1;
return *puVar1;
}
if (iVar3 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00148ab0,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar2 = 1;
}
else {
uVar2 = *(int1 *)(puVar1 + 2);
}
}
*param_1 = uVar2;
return 0;
}
| |
40,213 | stbi__getn | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n)
{
if (s->io.read) {
int blen = (int) (s->img_buffer_end - s->img_buffer);
if (blen < n) {
int res, count;
memcpy(buffer, s->img_buffer, blen);
count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen);
res = (count == (n-blen));
s->img_buffer = s->img_buffer_end;
return res;
}
}
if (s->img_buffer+n <= s->img_buffer_end) {
memcpy(buffer, s->img_buffer, n);
s->img_buffer += n;
return 1;
} else
return 0;
} | O1 | c | stbi__getn:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x15cc0
movq 0xc0(%rbx), %rsi
movq 0xc8(%rbx), %r13
subq %rsi, %r13
movl %ebp, %r15d
subl %r13d, %r15d
jle 0x15cbb
movslq %r13d, %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x3190
movq 0x28(%rbx), %rdi
addq %r14, %r12
movq %r12, %rsi
movl %r15d, %edx
callq *0x10(%rbx)
movl %eax, %ecx
xorl %eax, %eax
cmpl %r15d, %ecx
sete %al
movq 0xc8(%rbx), %rcx
movq %rcx, 0xc0(%rbx)
cmpl %r13d, %ebp
jg 0x15cf0
movq 0xc0(%rbx), %rsi
movslq %ebp, %r15
leaq (%rsi,%r15), %rcx
xorl %eax, %eax
cmpq 0xc8(%rbx), %rcx
ja 0x15cf0
movq %r14, %rdi
movq %r15, %rdx
callq 0x3190
addq %r15, 0xc0(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| stbi__getn:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, edx
mov r14, rsi
mov rbx, rdi
cmp qword ptr [rdi+10h], 0
jz short loc_15CC0
mov rsi, [rbx+0C0h]
mov r13, [rbx+0C8h]
sub r13, rsi
mov r15d, ebp
sub r15d, r13d
jle short loc_15CBB
movsxd r12, r13d
mov rdi, r14
mov rdx, r12
call _memcpy
mov rdi, [rbx+28h]
add r12, r14
mov rsi, r12
mov edx, r15d
call qword ptr [rbx+10h]
mov ecx, eax
xor eax, eax
cmp ecx, r15d
setz al
mov rcx, [rbx+0C8h]
mov [rbx+0C0h], rcx
loc_15CBB:
cmp ebp, r13d
jg short loc_15CF0
loc_15CC0:
mov rsi, [rbx+0C0h]
movsxd r15, ebp
lea rcx, [rsi+r15]
xor eax, eax
cmp rcx, [rbx+0C8h]
ja short loc_15CF0
mov rdi, r14
mov rdx, r15
call _memcpy
add [rbx+0C0h], r15
mov eax, 1
loc_15CF0:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BOOL8 stbi__getn(long long a1, long long a2, int a3)
{
long long v5; // rsi
long long v6; // r13
_BOOL8 result; // rax
long long v8; // rsi
if ( *(_QWORD *)(a1 + 16) && (v5 = *(_QWORD *)(a1 + 192), v6 = *(_QWORD *)(a1 + 200) - v5, a3 > (int)v6) )
{
memcpy(a2, v5, (int)v6);
result = (*(unsigned int ( **)(_QWORD, long long, _QWORD))(a1 + 16))(
*(_QWORD *)(a1 + 40),
a2 + (int)v6,
(unsigned int)(a3 - v6)) == a3 - (_DWORD)v6;
*(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200);
}
else
{
v8 = *(_QWORD *)(a1 + 192);
result = 0LL;
if ( (unsigned long long)(v8 + a3) <= *(_QWORD *)(a1 + 200) )
{
memcpy(a2, v8, a3);
*(_QWORD *)(a1 + 192) += a3;
return 1LL;
}
}
return result;
}
| stbi__getn:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
CMP qword ptr [RDI + 0x10],0x0
JZ 0x00115cc0
MOV RSI,qword ptr [RBX + 0xc0]
MOV R13,qword ptr [RBX + 0xc8]
SUB R13,RSI
MOV R15D,EBP
SUB R15D,R13D
JLE 0x00115cbb
MOVSXD R12,R13D
MOV RDI,R14
MOV RDX,R12
CALL 0x00103190
MOV RDI,qword ptr [RBX + 0x28]
ADD R12,R14
MOV RSI,R12
MOV EDX,R15D
CALL qword ptr [RBX + 0x10]
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,R15D
SETZ AL
MOV RCX,qword ptr [RBX + 0xc8]
MOV qword ptr [RBX + 0xc0],RCX
LAB_00115cbb:
CMP EBP,R13D
JG 0x00115cf0
LAB_00115cc0:
MOV RSI,qword ptr [RBX + 0xc0]
MOVSXD R15,EBP
LEA RCX,[RSI + R15*0x1]
XOR EAX,EAX
CMP RCX,qword ptr [RBX + 0xc8]
JA 0x00115cf0
MOV RDI,R14
MOV RDX,R15
CALL 0x00103190
ADD qword ptr [RBX + 0xc0],R15
MOV EAX,0x1
LAB_00115cf0:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void stbi__getn(long param_1,void *param_2,int param_3)
{
int iVar1;
size_t __n;
if (*(long *)(param_1 + 0x10) != 0) {
iVar1 = (int)*(int8 *)(param_1 + 200) - (int)*(void **)(param_1 + 0xc0);
if (param_3 - iVar1 != 0 && iVar1 <= param_3) {
memcpy(param_2,*(void **)(param_1 + 0xc0),(long)iVar1);
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x28),(long)iVar1 + (long)param_2,param_3 - iVar1);
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200);
}
if (iVar1 < param_3) {
return;
}
}
__n = (size_t)param_3;
if ((long)*(void **)(param_1 + 0xc0) + __n <= *(ulong *)(param_1 + 200)) {
memcpy(param_2,*(void **)(param_1 + 0xc0),__n);
*(long *)(param_1 + 0xc0) = *(long *)(param_1 + 0xc0) + __n;
}
return;
}
| |
40,214 | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) | monkey531[P]llama/common/json.hpp | std::pair<iterator, bool> insert( const value_type& value )
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, value.first))
{
return {it, false};
}
}
Container::push_back(value);
return {--this->end(), true};
} | O1 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %r13
cmpq %r13, %rbx
sete %bpl
je 0xbe687
movq (%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %r15
movq 0x8(%rbx), %rdx
cmpq %r15, %rdx
jne 0xbe672
testq %rdx, %rdx
je 0xbe681
movq (%rbx), %rdi
movq %r12, %rsi
callq 0x1b950
testl %eax, %eax
je 0xbe681
addq $0x30, %rbx
cmpq %r13, %rbx
sete %bpl
jne 0xbe655
jmp 0xbe687
testb $0x1, %bpl
je 0xbe6af
movq %r14, %rdi
movq (%rsp), %rsi
callq 0xbe6b4
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edx, %edx
jmp 0xbe69d
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rsi
mov r14, rdi
mov rbx, [rdi]
mov r13, [rdi+8]
cmp rbx, r13
setz bpl
jz short loc_BE687
mov rax, [rsp+38h+var_38]
mov r12, [rax]
mov r15, [rax+8]
loc_BE655:
mov rdx, [rbx+8]
cmp rdx, r15
jnz short loc_BE672
test rdx, rdx
jz short loc_BE681
mov rdi, [rbx]
mov rsi, r12
call _bcmp
test eax, eax
jz short loc_BE681
loc_BE672:
add rbx, 30h ; '0'
cmp rbx, r13
setz bpl
jnz short loc_BE655
jmp short loc_BE687
loc_BE681:
test bpl, 1
jz short loc_BE6AF
loc_BE687:
mov rdi, r14
mov rsi, [rsp+38h+var_38]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE9push_backERKSG_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::push_back(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFD0h
mov dl, 1
loc_BE69D:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_BE6AF:
xor edx, edx
jmp short loc_BE69D
| long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert(
_QWORD *a1,
long long *a2)
{
_QWORD *v2; // rbx
_QWORD *v3; // r13
bool v4; // bp
long long v5; // r12
long long v6; // r15
long long v7; // rdx
v2 = (_QWORD *)*a1;
v3 = (_QWORD *)a1[1];
v4 = *a1 == (_QWORD)v3;
if ( (_QWORD *)*a1 == v3 )
goto LABEL_9;
v5 = *a2;
v6 = a2[1];
while ( 1 )
{
v7 = v2[1];
if ( v7 == v6 && (!v7 || !(unsigned int)bcmp(*v2, v5)) )
break;
v2 += 6;
v4 = v2 == v3;
if ( v2 == v3 )
goto LABEL_9;
}
if ( v4 )
{
LABEL_9:
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::push_back(
a1,
a2);
return a1[1] - 48LL;
}
return (long long)v2;
}
| insert:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV R13,qword ptr [RDI + 0x8]
CMP RBX,R13
SETZ BPL
JZ 0x001be687
MOV RAX,qword ptr [RSP]
MOV R12,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
LAB_001be655:
MOV RDX,qword ptr [RBX + 0x8]
CMP RDX,R15
JNZ 0x001be672
TEST RDX,RDX
JZ 0x001be681
MOV RDI,qword ptr [RBX]
MOV RSI,R12
CALL 0x0011b950
TEST EAX,EAX
JZ 0x001be681
LAB_001be672:
ADD RBX,0x30
CMP RBX,R13
SETZ BPL
JNZ 0x001be655
JMP 0x001be687
LAB_001be681:
TEST BPL,0x1
JZ 0x001be6af
LAB_001be687:
MOV RDI,R14
MOV RSI,qword ptr [RSP]
CALL 0x001be6b4
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
LAB_001be69d:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001be6af:
XOR EDX,EDX
JMP 0x001be69d
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::insert(std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > const&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::insert(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,pair *param_1)
{
int8 *puVar1;
void *__s2;
size_t sVar2;
size_t __n;
int iVar3;
int8 extraout_RDX;
int8 uVar4;
int8 *puVar5;
bool bVar6;
int1 auVar7 [16];
puVar5 = *(int8 **)this;
puVar1 = *(int8 **)(this + 8);
bVar6 = puVar5 == puVar1;
if (!bVar6) {
__s2 = *(void **)param_1;
sVar2 = *(size_t *)(param_1 + 8);
do {
__n = puVar5[1];
if ((__n == sVar2) && ((__n == 0 || (iVar3 = bcmp((void *)*puVar5,__s2,__n), iVar3 == 0)))) {
if (!bVar6) {
uVar4 = 0;
goto LAB_001be69d;
}
break;
}
puVar5 = puVar5 + 6;
bVar6 = puVar5 == puVar1;
} while (!bVar6);
}
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::push_back((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,param_1);
puVar5 = (int8 *)(*(long *)(this + 8) + -0x30);
uVar4 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_001be69d:
auVar7._8_8_ = uVar4;
auVar7._0_8_ = puVar5;
return auVar7;
}
| |
40,215 | mi_read_mempack_record | eloqsql/storage/myisam/mi_packrec.c | static int _mi_read_mempack_record(MI_INFO *info, my_off_t filepos, uchar *buf)
{
MI_BLOCK_INFO block_info;
MYISAM_SHARE *share=info->s;
uchar *pos;
DBUG_ENTER("mi_read_mempack_record");
if (filepos == HA_OFFSET_ERROR)
DBUG_RETURN(-1); /* _search() didn't find record */
if (!(pos= (uchar*) _mi_mempack_get_block_info(info, &info->bit_buff,
&block_info, &info->rec_buff,
(uchar*) share->file_map+
filepos)))
DBUG_RETURN(-1);
/* No need to end-zero pos here for valgrind as data is memory mapped */
DBUG_RETURN(_mi_pack_rec_unpack(info, &info->bit_buff, buf,
pos, block_info.rec_len));
} | O0 | c | mi_read_mempack_record:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
cmpq $-0x1, -0x78(%rbp)
jne 0xbbfb4
jmp 0xbbfab
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
jmp 0xbc023
movq -0x70(%rbp), %rdi
movq -0x70(%rbp), %rsi
addq $0x50, %rsi
movq -0x70(%rbp), %rcx
addq $0x120, %rcx # imm = 0x120
movq -0x88(%rbp), %rax
movq 0x270(%rax), %r8
addq -0x78(%rbp), %r8
leaq -0x60(%rbp), %rdx
callq 0xbdf60
movq %rax, -0x90(%rbp)
cmpq $0x0, %rax
jne 0xbbffe
jmp 0xbbff5
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
jmp 0xbc023
jmp 0xbc000
movq -0x70(%rbp), %rdi
movq -0x70(%rbp), %rsi
addq $0x50, %rsi
movq -0x80(%rbp), %rdx
movq -0x90(%rbp), %rcx
movq -0x48(%rbp), %r8
callq 0xbb6f0
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x94(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xbc04d
movl -0x94(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| _mi_read_mempack_record:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_70], rdi
mov [rbp+var_78], rsi
mov [rbp+var_80], rdx
mov rax, [rbp+var_70]
mov rax, [rax]
mov [rbp+var_88], rax
cmp [rbp+var_78], 0FFFFFFFFFFFFFFFFh
jnz short loc_BBFB4
jmp short $+2
loc_BBFAB:
mov [rbp+var_64], 0FFFFFFFFh
jmp short loc_BC023
loc_BBFB4:
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_70]
add rsi, 50h ; 'P'
mov rcx, [rbp+var_70]
add rcx, 120h
mov rax, [rbp+var_88]
mov r8, [rax+270h]
add r8, [rbp+var_78]
lea rdx, [rbp+var_60]
call _mi_mempack_get_block_info
mov [rbp+var_90], rax
cmp rax, 0
jnz short loc_BBFFE
jmp short $+2
loc_BBFF5:
mov [rbp+var_64], 0FFFFFFFFh
jmp short loc_BC023
loc_BBFFE:
jmp short $+2
loc_BC000:
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_70]
add rsi, 50h ; 'P'
mov rdx, [rbp+var_80]
mov rcx, [rbp+var_90]
mov r8, [rbp+var_48]
call _mi_pack_rec_unpack
mov [rbp+var_64], eax
loc_BC023:
mov eax, [rbp+var_64]
mov [rbp+var_94], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_BC04D
mov eax, [rbp+var_94]
add rsp, 0A0h
pop rbp
retn
loc_BC04D:
call ___stack_chk_fail
| long long mi_read_mempack_record(long long *a1, long long a2, long long a3)
{
long long block_info; // [rsp+10h] [rbp-90h]
_BYTE v7[24]; // [rsp+40h] [rbp-60h] BYREF
long long v8; // [rsp+58h] [rbp-48h]
unsigned long long v9; // [rsp+98h] [rbp-8h]
v9 = __readfsqword(0x28u);
if ( a2 == -1 )
{
return (unsigned int)-1;
}
else
{
block_info = mi_mempack_get_block_info(a1, a1 + 10, v7, a1 + 36, a2 + *(_QWORD *)(*a1 + 624));
if ( block_info )
return (unsigned int)mi_pack_rec_unpack(a1, (long long)(a1 + 10), a3, block_info, v8);
else
return (unsigned int)-1;
}
}
| _mi_read_mempack_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x78],RSI
MOV qword ptr [RBP + -0x80],RDX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x88],RAX
CMP qword ptr [RBP + -0x78],-0x1
JNZ 0x001bbfb4
JMP 0x001bbfab
LAB_001bbfab:
MOV dword ptr [RBP + -0x64],0xffffffff
JMP 0x001bc023
LAB_001bbfb4:
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x70]
ADD RSI,0x50
MOV RCX,qword ptr [RBP + -0x70]
ADD RCX,0x120
MOV RAX,qword ptr [RBP + -0x88]
MOV R8,qword ptr [RAX + 0x270]
ADD R8,qword ptr [RBP + -0x78]
LEA RDX,[RBP + -0x60]
CALL 0x001bdf60
MOV qword ptr [RBP + -0x90],RAX
CMP RAX,0x0
JNZ 0x001bbffe
JMP 0x001bbff5
LAB_001bbff5:
MOV dword ptr [RBP + -0x64],0xffffffff
JMP 0x001bc023
LAB_001bbffe:
JMP 0x001bc000
LAB_001bc000:
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x70]
ADD RSI,0x50
MOV RDX,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x90]
MOV R8,qword ptr [RBP + -0x48]
CALL 0x001bb6f0
MOV dword ptr [RBP + -0x64],EAX
LAB_001bc023:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x94],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001bc04d
MOV EAX,dword ptr [RBP + -0x94]
ADD RSP,0xa0
POP RBP
RET
LAB_001bc04d:
CALL 0x0012a270
|
int4 _mi_read_mempack_record(long *param_1,long param_2,int8 param_3)
{
long lVar1;
long in_FS_OFFSET;
int4 local_6c;
int1 local_68 [24];
int8 local_50;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (param_2 == -1) {
local_6c = 0xffffffff;
}
else {
lVar1 = _mi_mempack_get_block_info
(param_1,param_1 + 10,local_68,param_1 + 0x24,
*(long *)(*param_1 + 0x270) + param_2);
if (lVar1 == 0) {
local_6c = 0xffffffff;
}
else {
local_6c = _mi_pack_rec_unpack(param_1,param_1 + 10,param_3,lVar1,local_50);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_6c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,216 | mysql_handle_local_infile | eloqsql/libmariadb/libmariadb/ma_loaddata.c | my_bool mysql_handle_local_infile(MYSQL *conn, const char *filename, my_bool can_local_infile)
{
unsigned int buflen= 4096;
int bufread;
unsigned char *buf= NULL;
void *info= NULL;
my_bool result= 1;
/* check if all callback functions exist */
if (!conn->options.local_infile_init || !conn->options.local_infile_end ||
!conn->options.local_infile_read || !conn->options.local_infile_error)
{
conn->options.local_infile_userdata= conn;
mysql_set_local_infile_default(conn);
}
if (!(conn->options.client_flag & CLIENT_LOCAL_FILES) ||
!can_local_infile)
{
my_set_error(conn, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, "Load data local infile forbidden");
/* write empty packet to server */
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* allocate buffer for reading data */
buf = (uchar *)malloc(buflen);
/* init handler: allocate read buffer and open file */
if (conn->options.local_infile_init(&info, filename,
conn->options.local_infile_userdata))
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno;
tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
ma_net_write(&conn->net, (unsigned char *)"", 0);
ma_net_flush(&conn->net);
goto infile_error;
}
/* read data */
while ((bufread= conn->options.local_infile_read(info, (char *)buf, buflen)) > 0)
{
if (ma_net_write(&conn->net, (unsigned char *)buf, bufread))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
}
/* send empty packet for eof */
if (ma_net_write(&conn->net, (unsigned char *)"", 0) ||
ma_net_flush(&conn->net))
{
my_set_error(conn, CR_SERVER_LOST, SQLSTATE_UNKNOWN, NULL);
goto infile_error;
}
/* error during read occurred */
if (bufread < 0)
{
char tmp_buf[MYSQL_ERRMSG_SIZE];
int tmp_errno= conn->options.local_infile_error(info, tmp_buf, sizeof(tmp_buf));
my_set_error(conn, tmp_errno, SQLSTATE_UNKNOWN, tmp_buf);
goto infile_error;
}
result = 0;
infile_error:
conn->options.local_infile_end(info);
free(buf);
return(result);
} | O0 | c | mysql_handle_local_infile:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp # imm = 0x450
movb %dl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x418(%rbp)
movq %rsi, -0x420(%rbp)
movb %al, -0x421(%rbp)
movl $0x1000, -0x428(%rbp) # imm = 0x1000
movq $0x0, -0x438(%rbp)
movq $0x0, -0x440(%rbp)
movb $0x1, -0x441(%rbp)
movq -0x418(%rbp), %rax
cmpq $0x0, 0x458(%rax)
je 0x2aa89
movq -0x418(%rbp), %rax
cmpq $0x0, 0x468(%rax)
je 0x2aa89
movq -0x418(%rbp), %rax
cmpq $0x0, 0x460(%rax)
je 0x2aa89
movq -0x418(%rbp), %rax
cmpq $0x0, 0x470(%rax)
jne 0x2aaaa
movq -0x418(%rbp), %rcx
movq -0x418(%rbp), %rax
movq %rcx, 0x478(%rax)
movq -0x418(%rbp), %rdi
callq 0x2a6a0
movq -0x418(%rbp), %rax
movq 0x3a8(%rax), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x2aacd
cmpb $0x0, -0x421(%rbp)
jne 0x2ab19
movq -0x418(%rbp), %rdi
leaq 0x31305(%rip), %rax # 0x5bde0
movq (%rax), %rdx
movl $0x7d0, %esi # imm = 0x7D0
leaq 0x1dbdd(%rip), %rcx # 0x486c7
movb $0x0, %al
callq 0x13270
movq -0x418(%rbp), %rdi
leaq 0x1d52c(%rip), %rsi # 0x4802b
xorl %eax, %eax
movl %eax, %edx
callq 0x431f0
movq -0x418(%rbp), %rdi
callq 0x42dd0
jmp 0x2acfc
movl -0x428(%rbp), %eax
movl %eax, %edi
callq 0x12590
movq %rax, -0x438(%rbp)
movq -0x418(%rbp), %rax
movq 0x458(%rax), %rax
movq -0x420(%rbp), %rsi
movq -0x418(%rbp), %rcx
movq 0x478(%rcx), %rdx
leaq -0x440(%rbp), %rdi
callq *%rax
cmpl $0x0, %eax
je 0x2abd4
movq -0x418(%rbp), %rax
movq 0x470(%rax), %rax
movq -0x440(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq *%rax
movl %eax, -0x448(%rbp)
movq -0x418(%rbp), %rdi
movl -0x448(%rbp), %esi
leaq 0x31245(%rip), %rax # 0x5bde0
movq (%rax), %rdx
leaq -0x210(%rbp), %rcx
movb $0x0, %al
callq 0x13270
movq -0x418(%rbp), %rdi
leaq 0x1d471(%rip), %rsi # 0x4802b
xorl %eax, %eax
movl %eax, %edx
callq 0x431f0
movq -0x418(%rbp), %rdi
callq 0x42dd0
jmp 0x2acfc
jmp 0x2abd6
movq -0x418(%rbp), %rax
movq 0x460(%rax), %rax
movq -0x440(%rbp), %rdi
movq -0x438(%rbp), %rsi
movl -0x428(%rbp), %edx
callq *%rax
movl %eax, -0x42c(%rbp)
cmpl $0x0, %eax
jle 0x2ac4c
movq -0x418(%rbp), %rdi
movq -0x438(%rbp), %rsi
movslq -0x42c(%rbp), %rdx
callq 0x431f0
cmpl $0x0, %eax
je 0x2ac4a
movq -0x418(%rbp), %rdi
leaq 0x311ae(%rip), %rax # 0x5bde0
movq (%rax), %rdx
movl $0x7dd, %esi # imm = 0x7DD
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x13270
jmp 0x2acfc
jmp 0x2abd6
movq -0x418(%rbp), %rdi
leaq 0x1d3d1(%rip), %rsi # 0x4802b
xorl %eax, %eax
movl %eax, %edx
callq 0x431f0
cmpl $0x0, %eax
jne 0x2ac79
movq -0x418(%rbp), %rdi
callq 0x42dd0
cmpl $0x0, %eax
je 0x2ac9c
movq -0x418(%rbp), %rdi
leaq 0x31159(%rip), %rax # 0x5bde0
movq (%rax), %rdx
movl $0x7dd, %esi # imm = 0x7DD
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x13270
jmp 0x2acfc
cmpl $0x0, -0x42c(%rbp)
jge 0x2acf5
movq -0x418(%rbp), %rax
movq 0x470(%rax), %rax
movq -0x440(%rbp), %rdi
leaq -0x410(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq *%rax
movl %eax, -0x44c(%rbp)
movq -0x418(%rbp), %rdi
movl -0x44c(%rbp), %esi
leaq 0x310fe(%rip), %rax # 0x5bde0
movq (%rax), %rdx
leaq -0x410(%rbp), %rcx
movb $0x0, %al
callq 0x13270
jmp 0x2acfc
movb $0x0, -0x441(%rbp)
movq -0x418(%rbp), %rax
movq 0x468(%rax), %rax
movq -0x440(%rbp), %rdi
callq *%rax
movq -0x438(%rbp), %rdi
callq 0x12500
movb -0x441(%rbp), %al
movb %al, -0x44d(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2ad4c
movb -0x44d(%rbp), %al
addq $0x450, %rsp # imm = 0x450
popq %rbp
retq
callq 0x12490
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| mysql_handle_local_infile:
push rbp
mov rbp, rsp
sub rsp, 450h
mov al, dl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_418], rdi
mov [rbp+var_420], rsi
mov [rbp+var_421], al
mov [rbp+var_428], 1000h
mov [rbp+var_438], 0
mov [rbp+var_440], 0
mov [rbp+var_441], 1
mov rax, [rbp+var_418]
cmp qword ptr [rax+458h], 0
jz short loc_2AA89
mov rax, [rbp+var_418]
cmp qword ptr [rax+468h], 0
jz short loc_2AA89
mov rax, [rbp+var_418]
cmp qword ptr [rax+460h], 0
jz short loc_2AA89
mov rax, [rbp+var_418]
cmp qword ptr [rax+470h], 0
jnz short loc_2AAAA
loc_2AA89:
mov rcx, [rbp+var_418]
mov rax, [rbp+var_418]
mov [rax+478h], rcx
mov rdi, [rbp+var_418]
call mysql_set_local_infile_default
loc_2AAAA:
mov rax, [rbp+var_418]
mov rax, [rax+3A8h]
and rax, 80h
cmp rax, 0
jz short loc_2AACD
cmp [rbp+var_421], 0
jnz short loc_2AB19
loc_2AACD:
mov rdi, [rbp+var_418]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D0h
lea rcx, aLoadDataLocalI; "Load data local infile forbidden"
mov al, 0
call my_set_error
mov rdi, [rbp+var_418]
lea rsi, aUsageSHostUser+23h; ""
xor eax, eax
mov edx, eax
call ma_net_write
mov rdi, [rbp+var_418]
call ma_net_flush
jmp loc_2ACFC
loc_2AB19:
mov eax, [rbp+var_428]
mov edi, eax
call _malloc
mov [rbp+var_438], rax
mov rax, [rbp+var_418]
mov rax, [rax+458h]
mov rsi, [rbp+var_420]
mov rcx, [rbp+var_418]
mov rdx, [rcx+478h]
lea rdi, [rbp+var_440]
call rax
cmp eax, 0
jz short loc_2ABD4
mov rax, [rbp+var_418]
mov rax, [rax+470h]
mov rdi, [rbp+var_440]
lea rsi, [rbp+var_210]
mov edx, 200h
call rax
mov [rbp+var_448], eax
mov rdi, [rbp+var_418]
mov esi, [rbp+var_448]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, [rbp+var_210]
mov al, 0
call my_set_error
mov rdi, [rbp+var_418]
lea rsi, aUsageSHostUser+23h; ""
xor eax, eax
mov edx, eax
call ma_net_write
mov rdi, [rbp+var_418]
call ma_net_flush
jmp loc_2ACFC
loc_2ABD4:
jmp short $+2
loc_2ABD6:
mov rax, [rbp+var_418]
mov rax, [rax+460h]
mov rdi, [rbp+var_440]
mov rsi, [rbp+var_438]
mov edx, [rbp+var_428]
call rax
mov [rbp+var_42C], eax
cmp eax, 0
jle short loc_2AC4C
mov rdi, [rbp+var_418]
mov rsi, [rbp+var_438]
movsxd rdx, [rbp+var_42C]
call ma_net_write
cmp eax, 0
jz short loc_2AC4A
mov rdi, [rbp+var_418]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7DDh
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp loc_2ACFC
loc_2AC4A:
jmp short loc_2ABD6
loc_2AC4C:
mov rdi, [rbp+var_418]
lea rsi, aUsageSHostUser+23h; ""
xor eax, eax
mov edx, eax
call ma_net_write
cmp eax, 0
jnz short loc_2AC79
mov rdi, [rbp+var_418]
call ma_net_flush
cmp eax, 0
jz short loc_2AC9C
loc_2AC79:
mov rdi, [rbp+var_418]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7DDh
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp short loc_2ACFC
loc_2AC9C:
cmp [rbp+var_42C], 0
jge short loc_2ACF5
mov rax, [rbp+var_418]
mov rax, [rax+470h]
mov rdi, [rbp+var_440]
lea rsi, [rbp+var_410]
mov edx, 200h
call rax
mov [rbp+var_44C], eax
mov rdi, [rbp+var_418]
mov esi, [rbp+var_44C]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, [rbp+var_410]
mov al, 0
call my_set_error
jmp short loc_2ACFC
loc_2ACF5:
mov [rbp+var_441], 0
loc_2ACFC:
mov rax, [rbp+var_418]
mov rax, [rax+468h]
mov rdi, [rbp+var_440]
call rax
mov rdi, [rbp+var_438]
call _free
mov al, [rbp+var_441]
mov [rbp+var_44D], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2AD4C
mov al, [rbp+var_44D]
add rsp, 450h
pop rbp
retn
loc_2AD4C:
call ___stack_chk_fail
| char mysql_handle_local_infile(_QWORD *a1, long long a2, char a3)
{
unsigned int v4; // [rsp+4h] [rbp-44Ch]
unsigned int v5; // [rsp+8h] [rbp-448h]
char v6; // [rsp+Fh] [rbp-441h]
long long v7; // [rsp+10h] [rbp-440h] BYREF
long long v8; // [rsp+18h] [rbp-438h]
int v9; // [rsp+24h] [rbp-42Ch]
unsigned int v10; // [rsp+28h] [rbp-428h]
char v11; // [rsp+2Fh] [rbp-421h]
long long v12; // [rsp+30h] [rbp-420h]
_QWORD *v13; // [rsp+38h] [rbp-418h]
_BYTE v14[512]; // [rsp+40h] [rbp-410h] BYREF
_BYTE v15[520]; // [rsp+240h] [rbp-210h] BYREF
unsigned long long v16; // [rsp+448h] [rbp-8h]
v16 = __readfsqword(0x28u);
v13 = a1;
v12 = a2;
v11 = a3;
v10 = 4096;
v8 = 0LL;
v7 = 0LL;
v6 = 1;
if ( !a1[139] || !v13[141] || !v13[140] || !v13[142] )
{
v13[143] = v13;
mysql_set_local_infile_default(v13);
}
if ( (v13[117] & 0x80LL) != 0 && v11 )
{
v8 = malloc(v10);
if ( ((unsigned int ( *)(long long *, long long, _QWORD))v13[139])(&v7, v12, v13[143]) )
{
v5 = ((long long ( *)(long long, _BYTE *, long long))v13[142])(v7, v15, 512LL);
my_set_error((long long)v13, v5, (long long)SQLSTATE_UNKNOWN, (long long)v15);
ma_net_write(v13, "", 0LL);
ma_net_flush(v13);
}
else
{
while ( 1 )
{
v9 = ((long long ( *)(long long, long long, _QWORD))v13[140])(v7, v8, v10);
if ( v9 <= 0 )
break;
if ( (unsigned int)ma_net_write(v13, v8, v9) )
goto LABEL_13;
}
if ( (unsigned int)ma_net_write(v13, "", 0LL) || (unsigned int)ma_net_flush(v13) )
{
LABEL_13:
my_set_error((long long)v13, 0x7DDu, (long long)SQLSTATE_UNKNOWN, 0LL);
goto LABEL_21;
}
if ( v9 >= 0 )
{
v6 = 0;
}
else
{
v4 = ((long long ( *)(long long, _BYTE *, long long))v13[142])(v7, v14, 512LL);
my_set_error((long long)v13, v4, (long long)SQLSTATE_UNKNOWN, (long long)v14);
}
}
}
else
{
my_set_error((long long)v13, 0x7D0u, (long long)SQLSTATE_UNKNOWN, (long long)"Load data local infile forbidden");
ma_net_write(v13, "", 0LL);
ma_net_flush(v13);
}
LABEL_21:
((void ( *)(long long))v13[141])(v7);
free(v8);
return v6;
}
| mysql_handle_local_infile:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x450
MOV AL,DL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x418],RDI
MOV qword ptr [RBP + -0x420],RSI
MOV byte ptr [RBP + -0x421],AL
MOV dword ptr [RBP + -0x428],0x1000
MOV qword ptr [RBP + -0x438],0x0
MOV qword ptr [RBP + -0x440],0x0
MOV byte ptr [RBP + -0x441],0x1
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x458],0x0
JZ 0x0012aa89
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x468],0x0
JZ 0x0012aa89
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x460],0x0
JZ 0x0012aa89
MOV RAX,qword ptr [RBP + -0x418]
CMP qword ptr [RAX + 0x470],0x0
JNZ 0x0012aaaa
LAB_0012aa89:
MOV RCX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RBP + -0x418]
MOV qword ptr [RAX + 0x478],RCX
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x0012a6a0
LAB_0012aaaa:
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x3a8]
AND RAX,0x80
CMP RAX,0x0
JZ 0x0012aacd
CMP byte ptr [RBP + -0x421],0x0
JNZ 0x0012ab19
LAB_0012aacd:
MOV RDI,qword ptr [RBP + -0x418]
LEA RAX,[0x15bde0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d0
LEA RCX,[0x1486c7]
MOV AL,0x0
CALL 0x00113270
MOV RDI,qword ptr [RBP + -0x418]
LEA RSI,[0x14802b]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001431f0
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x00142dd0
JMP 0x0012acfc
LAB_0012ab19:
MOV EAX,dword ptr [RBP + -0x428]
MOV EDI,EAX
CALL 0x00112590
MOV qword ptr [RBP + -0x438],RAX
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x458]
MOV RSI,qword ptr [RBP + -0x420]
MOV RCX,qword ptr [RBP + -0x418]
MOV RDX,qword ptr [RCX + 0x478]
LEA RDI,[RBP + -0x440]
CALL RAX
CMP EAX,0x0
JZ 0x0012abd4
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x470]
MOV RDI,qword ptr [RBP + -0x440]
LEA RSI,[RBP + -0x210]
MOV EDX,0x200
CALL RAX
MOV dword ptr [RBP + -0x448],EAX
MOV RDI,qword ptr [RBP + -0x418]
MOV ESI,dword ptr [RBP + -0x448]
LEA RAX,[0x15bde0]
MOV RDX,qword ptr [RAX]
LEA RCX,[RBP + -0x210]
MOV AL,0x0
CALL 0x00113270
MOV RDI,qword ptr [RBP + -0x418]
LEA RSI,[0x14802b]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001431f0
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x00142dd0
JMP 0x0012acfc
LAB_0012abd4:
JMP 0x0012abd6
LAB_0012abd6:
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x460]
MOV RDI,qword ptr [RBP + -0x440]
MOV RSI,qword ptr [RBP + -0x438]
MOV EDX,dword ptr [RBP + -0x428]
CALL RAX
MOV dword ptr [RBP + -0x42c],EAX
CMP EAX,0x0
JLE 0x0012ac4c
MOV RDI,qword ptr [RBP + -0x418]
MOV RSI,qword ptr [RBP + -0x438]
MOVSXD RDX,dword ptr [RBP + -0x42c]
CALL 0x001431f0
CMP EAX,0x0
JZ 0x0012ac4a
MOV RDI,qword ptr [RBP + -0x418]
LEA RAX,[0x15bde0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7dd
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00113270
JMP 0x0012acfc
LAB_0012ac4a:
JMP 0x0012abd6
LAB_0012ac4c:
MOV RDI,qword ptr [RBP + -0x418]
LEA RSI,[0x14802b]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001431f0
CMP EAX,0x0
JNZ 0x0012ac79
MOV RDI,qword ptr [RBP + -0x418]
CALL 0x00142dd0
CMP EAX,0x0
JZ 0x0012ac9c
LAB_0012ac79:
MOV RDI,qword ptr [RBP + -0x418]
LEA RAX,[0x15bde0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7dd
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00113270
JMP 0x0012acfc
LAB_0012ac9c:
CMP dword ptr [RBP + -0x42c],0x0
JGE 0x0012acf5
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x470]
MOV RDI,qword ptr [RBP + -0x440]
LEA RSI,[RBP + -0x410]
MOV EDX,0x200
CALL RAX
MOV dword ptr [RBP + -0x44c],EAX
MOV RDI,qword ptr [RBP + -0x418]
MOV ESI,dword ptr [RBP + -0x44c]
LEA RAX,[0x15bde0]
MOV RDX,qword ptr [RAX]
LEA RCX,[RBP + -0x410]
MOV AL,0x0
CALL 0x00113270
JMP 0x0012acfc
LAB_0012acf5:
MOV byte ptr [RBP + -0x441],0x0
LAB_0012acfc:
MOV RAX,qword ptr [RBP + -0x418]
MOV RAX,qword ptr [RAX + 0x468]
MOV RDI,qword ptr [RBP + -0x440]
CALL RAX
MOV RDI,qword ptr [RBP + -0x438]
CALL 0x00112500
MOV AL,byte ptr [RBP + -0x441]
MOV byte ptr [RBP + -0x44d],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012ad4c
MOV AL,byte ptr [RBP + -0x44d]
ADD RSP,0x450
POP RBP
RET
LAB_0012ad4c:
CALL 0x00112490
|
int8 mysql_handle_local_infile(long param_1,int8 param_2,char param_3)
{
int iVar1;
int4 uVar2;
long in_FS_OFFSET;
int1 local_449;
int8 local_448;
void *local_440;
int local_434;
uint local_430;
char local_429;
int8 local_428;
long local_420;
int1 local_418 [512];
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_430 = 0x1000;
local_440 = (void *)0x0;
local_448 = 0;
local_449 = 1;
local_429 = param_3;
local_428 = param_2;
local_420 = param_1;
if ((((*(long *)(param_1 + 0x458) == 0) || (*(long *)(param_1 + 0x468) == 0)) ||
(*(long *)(param_1 + 0x460) == 0)) || (*(long *)(param_1 + 0x470) == 0)) {
*(long *)(param_1 + 0x478) = param_1;
mysql_set_local_infile_default(param_1);
}
if (((*(ulong *)(local_420 + 0x3a8) & 0x80) == 0) || (local_429 == '\0')) {
my_set_error(local_420,2000,SQLSTATE_UNKNOWN,"Load data local infile forbidden");
ma_net_write(local_420,"",0);
ma_net_flush(local_420);
}
else {
local_440 = malloc((ulong)local_430);
iVar1 = (**(code **)(local_420 + 0x458))
(&local_448,local_428,*(int8 *)(local_420 + 0x478));
if (iVar1 == 0) {
do {
local_434 = (**(code **)(local_420 + 0x460))(local_448,local_440,local_430);
if (local_434 < 1) {
iVar1 = ma_net_write(local_420,"",0);
if ((iVar1 == 0) && (iVar1 = ma_net_flush(local_420), iVar1 == 0)) {
if (local_434 < 0) {
uVar2 = (**(code **)(local_420 + 0x470))(local_448,local_418,0x200);
my_set_error(local_420,uVar2,SQLSTATE_UNKNOWN,local_418);
}
else {
local_449 = 0;
}
}
else {
my_set_error(local_420,0x7dd,SQLSTATE_UNKNOWN,0);
}
goto LAB_0012acfc;
}
iVar1 = ma_net_write(local_420,local_440,(long)local_434);
} while (iVar1 == 0);
my_set_error(local_420,0x7dd,SQLSTATE_UNKNOWN,0);
}
else {
uVar2 = (**(code **)(local_420 + 0x470))(local_448,local_218,0x200);
my_set_error(local_420,uVar2,SQLSTATE_UNKNOWN,local_218);
ma_net_write(local_420,"",0);
ma_net_flush(local_420);
}
}
LAB_0012acfc:
(**(code **)(local_420 + 0x468))(local_448);
free(local_440);
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_449);
}
| |
40,217 | set_default_charset_by_name | eloqsql/libmariadb/libmariadb/mariadb_charset.c | my_bool set_default_charset_by_name(const char *cs_name, myf flags __attribute__((unused)))
{
MARIADB_CHARSET_INFO *new_charset;
new_charset = mysql_get_charset_by_name(cs_name);
if (!new_charset)
{
return(TRUE); /* error */
}
ma_default_charset_info = new_charset;
return(FALSE);
} | O0 | c | set_default_charset_by_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6c0b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6c189
movb $0x1, -0x1(%rbp)
jmp 0x6c19b
movq -0x20(%rbp), %rcx
leaq 0x3d0ea4(%rip), %rax # 0x43d038
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| set_default_charset_by_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rdi, [rbp+var_10]
call mysql_get_charset_by_name
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_6C189
mov [rbp+var_1], 1
jmp short loc_6C19B
loc_6C189:
mov rcx, [rbp+var_20]
lea rax, ma_default_charset_info
mov [rax], rcx
mov [rbp+var_1], 0
loc_6C19B:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char set_default_charset_by_name(long long a1)
{
char *charset_by_name; // [rsp+0h] [rbp-20h]
charset_by_name = mysql_get_charset_by_name(a1);
if ( !charset_by_name )
return 1;
ma_default_charset_info = charset_by_name;
return 0;
}
| set_default_charset_by_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016c0b0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0016c189
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016c19b
LAB_0016c189:
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x53d038]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_0016c19b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int8 set_default_charset_by_name(int8 param_1)
{
long lVar1;
int8 *puVar2;
bool local_9;
lVar1 = mysql_get_charset_by_name(param_1);
if (lVar1 != 0) {
puVar2 = &ma_default_charset_info;
ma_default_charset_info = lVar1;
}
else {
puVar2 = (int8 *)0x0;
}
local_9 = lVar1 == 0;
return CONCAT71((int7)((ulong)puVar2 >> 8),local_9);
}
| |
40,218 | set_default_charset_by_name | eloqsql/libmariadb/libmariadb/mariadb_charset.c | my_bool set_default_charset_by_name(const char *cs_name, myf flags __attribute__((unused)))
{
MARIADB_CHARSET_INFO *new_charset;
new_charset = mysql_get_charset_by_name(cs_name);
if (!new_charset)
{
return(TRUE); /* error */
}
ma_default_charset_info = new_charset;
return(FALSE);
} | O3 | c | set_default_charset_by_name:
pushq %rbp
movq %rsp, %rbp
callq 0x570e4
testq %rax, %rax
je 0x5713a
leaq 0x3abef5(%rip), %rcx # 0x403028
movq %rax, (%rcx)
xorl %eax, %eax
jmp 0x5713c
movb $0x1, %al
popq %rbp
retq
nop
| set_default_charset_by_name:
push rbp
mov rbp, rsp
call mysql_get_charset_by_name
test rax, rax
jz short loc_5713A
lea rcx, ma_default_charset_info
mov [rcx], rax
xor eax, eax
jmp short loc_5713C
loc_5713A:
mov al, 1
loc_5713C:
pop rbp
retn
| long long set_default_charset_by_name(long long a1)
{
_DWORD *charset_by_name; // rax
charset_by_name = mysql_get_charset_by_name(a1);
if ( !charset_by_name )
return 1LL;
ma_default_charset_info = charset_by_name;
return 0LL;
}
| set_default_charset_by_name:
PUSH RBP
MOV RBP,RSP
CALL 0x001570e4
TEST RAX,RAX
JZ 0x0015713a
LEA RCX,[0x503028]
MOV qword ptr [RCX],RAX
XOR EAX,EAX
JMP 0x0015713c
LAB_0015713a:
MOV AL,0x1
LAB_0015713c:
POP RBP
RET
|
bool set_default_charset_by_name(void)
{
long lVar1;
lVar1 = mysql_get_charset_by_name();
if (lVar1 != 0) {
ma_default_charset_info = lVar1;
}
return lVar1 == 0;
}
| |
40,219 | key_cache_read | eloqsql/mysys/mf_keycache.c | uchar *key_cache_read(KEY_CACHE *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length,
uint block_length, int return_buffer)
{
if (keycache->can_be_used)
return keycache->interface_funcs->read(keycache->keycache_cb,
file, filepos, level,
buff, length,
block_length, return_buffer);
/* We can't use mutex here as the key cache may not be initialized */
if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP)))
return (uchar *) 0;
return buff;
} | O3 | c | key_cache_read:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rdx, %rax
cmpb $0x0, 0x49(%rdi)
je 0x995b0
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rdi
movq 0x18(%rdi), %r11
movq %rdx, %rdi
movq %rax, %rdx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%r11
movl %r9d, %edx
movl $0x4, %r8d
movl %esi, %edi
movq %rbx, %rsi
movq %rax, %rcx
callq 0xa158c
xorl %ecx, %ecx
testq %rax, %rax
cmoveq %rbx, %rcx
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| key_cache_read:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, r8
mov rax, rdx
cmp byte ptr [rdi+49h], 0
jz short loc_995B0
mov rdx, [rdi+8]
mov rdi, [rdi+10h]
mov r11, [rdi+18h]
mov rdi, rdx
mov rdx, rax
mov r8, rbx
add rsp, 8
pop rbx
pop rbp
jmp r11
loc_995B0:
mov edx, r9d
mov r8d, 4
mov edi, esi
mov rsi, rbx
mov rcx, rax
call my_pread
xor ecx, ecx
test rax, rax
cmovz rcx, rbx
mov rax, rcx
add rsp, 8
pop rbx
pop rbp
retn
| long long key_cache_read(long long a1, long long a2, long long a3, long long a4, long long a5, unsigned int a6)
{
long long v8; // rax
long long v9; // rcx
if ( *(_BYTE *)(a1 + 73) )
return (*(long long ( **)(_QWORD, long long, long long, long long, long long))(*(_QWORD *)(a1 + 16) + 24LL))(
*(_QWORD *)(a1 + 8),
a2,
a3,
a4,
a5);
v8 = my_pread((unsigned int)a2, a5, a6, a3, 4LL);
v9 = 0LL;
if ( !v8 )
return a5;
return v9;
}
| key_cache_read:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV RAX,RDX
CMP byte ptr [RDI + 0x49],0x0
JZ 0x001995b0
MOV RDX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RDI + 0x10]
MOV R11,qword ptr [RDI + 0x18]
MOV RDI,RDX
MOV RDX,RAX
MOV R8,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP R11
LAB_001995b0:
MOV EDX,R9D
MOV R8D,0x4
MOV EDI,ESI
MOV RSI,RBX
MOV RCX,RAX
CALL 0x001a158c
XOR ECX,ECX
TEST RAX,RAX
CMOVZ RCX,RBX
MOV RAX,RCX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8
key_cache_read(long param_1,ulong param_2,int8 param_3,int8 param_4,int8 param_5,
int4 param_6)
{
int8 uVar1;
long lVar2;
if (*(char *)(param_1 + 0x49) != '\0') {
/* WARNING: Could not recover jumptable at 0x001995ad. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar1 = (**(code **)(*(long *)(param_1 + 0x10) + 0x18))
(*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5);
return uVar1;
}
lVar2 = my_pread(param_2 & 0xffffffff,param_5,param_6,param_3,4);
uVar1 = 0;
if (lVar2 == 0) {
uVar1 = param_5;
}
return uVar1;
}
| |
40,220 | translog_deassign_id_from_share | eloqsql/storage/maria/ma_loghandler.c | void translog_deassign_id_from_share(MARIA_SHARE *share)
{
DBUG_PRINT("info", ("id_to_share: %p id %u -> 0",
share, share->id));
/*
We don't need any mutex as we are called only when closing the last
instance of the table or at the end of REPAIR: no writes can be
happening. But a Checkpoint may be reading share->id, so we require this
mutex:
*/
mysql_mutex_assert_owner(&share->intern_lock);
my_atomic_storeptr((void **)&id_to_share[share->id], 0);
share->id= 0;
/* useless but safety: */
share->lsn_of_file_id= LSN_IMPOSSIBLE;
} | O0 | c | translog_deassign_id_from_share:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
jmp 0x56e7a
jmp 0x56e7c
jmp 0x56e7e
movq 0xc23453(%rip), %rcx # 0xc7a2d8
movq -0x8(%rbp), %rax
movzwl 0x620(%rax), %eax
movl %eax, %edx
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
xchgq %rax, (%rcx,%rdx,8)
movq -0x8(%rbp), %rax
movw $0x0, 0x620(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xc10(%rax)
popq %rbp
retq
| translog_deassign_id_from_share:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
jmp short $+2
loc_56E7A:
jmp short $+2
loc_56E7C:
jmp short $+2
loc_56E7E:
mov rcx, cs:id_to_share
mov rax, [rbp+var_8]
movzx eax, word ptr [rax+620h]
mov edx, eax
mov [rbp+var_10], 0
mov rax, [rbp+var_10]
xchg rax, [rcx+rdx*8]
mov rax, [rbp+var_8]
mov word ptr [rax+620h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+0C10h], 0
pop rbp
retn
| long long translog_deassign_id_from_share(long long a1)
{
long long result; // rax
_InterlockedExchange64((volatile long long *)(id_to_share + 8LL * *(unsigned __int16 *)(a1 + 1568)), 0LL);
*(_WORD *)(a1 + 1568) = 0;
result = a1;
*(_QWORD *)(a1 + 3088) = 0LL;
return result;
}
| translog_deassign_id_from_share:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00156e7a
LAB_00156e7a:
JMP 0x00156e7c
LAB_00156e7c:
JMP 0x00156e7e
LAB_00156e7e:
MOV RCX,qword ptr [0x00d7a2d8]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX + 0x620]
MOV EDX,EAX
MOV qword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x10]
XCHG qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x620],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xc10],0x0
POP RBP
RET
|
void translog_deassign_id_from_share(long param_1)
{
LOCK();
*(int8 *)(id_to_share + (ulong)*(ushort *)(param_1 + 0x620) * 8) = 0;
UNLOCK();
*(int2 *)(param_1 + 0x620) = 0;
*(int8 *)(param_1 + 0xc10) = 0;
return;
}
| |
40,221 | my_multi_malloc_large | eloqsql/mysys/mulalloc.c | void *my_multi_malloc_large(PSI_memory_key key, myf myFlags, ...)
{
va_list args;
char **ptr,*start,*res;
ulonglong tot_length,length;
DBUG_ENTER("my_multi_malloc");
va_start(args,myFlags);
tot_length=0;
while ((ptr=va_arg(args, char **)))
{
length=va_arg(args,ulonglong);
tot_length+=ALIGN_SIZE(length);
}
va_end(args);
if (!(start=(char *) my_malloc(key, (size_t) tot_length, myFlags)))
DBUG_RETURN(0); /* purecov: inspected */
va_start(args,myFlags);
res=start;
while ((ptr=va_arg(args, char **)))
{
*ptr=res;
length=va_arg(args,ulonglong);
res+=ALIGN_SIZE(length);
}
va_end(args);
DBUG_RETURN((void*) start);
} | O3 | c | my_multi_malloc_large:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %r10
movq %rsi, %rdx
leaq -0xe0(%rbp), %rbx
movq %r10, 0x10(%rbx)
movq %rcx, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, 0x28(%rbx)
testb %al, %al
je 0x5b145
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %rbx, -0x20(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movabsq $0x3000000010, %r14 # imm = 0x3000000010
movq %r14, -0x30(%rbp)
movl $0x10, %eax
xorl %esi, %esi
cmpl $0x28, %eax
ja 0x5b17b
movq %rcx, %r8
movl %eax, %ecx
addq %rbx, %rcx
addl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x5b183
leaq 0x8(%rcx), %r8
movq %r8, -0x28(%rbp)
cmpq $0x0, (%rcx)
je 0x5b1b7
cmpl $0x28, %eax
ja 0x5b19f
movq %r8, %rcx
movl %eax, %r8d
addq %rbx, %r8
addl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x5b1a7
leaq 0x8(%r8), %rcx
movq %rcx, -0x28(%rbp)
movq (%r8), %r8
addq $0x7, %r8
andq $-0x8, %r8
addq %r8, %rsi
jmp 0x5b166
callq 0x60401
testq %rax, %rax
je 0x5b237
movq %rbx, -0x20(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq %r14, -0x30(%rbp)
movl $0x10, %edx
movq %rax, %rcx
cmpl $0x28, %edx
ja 0x5b1ec
movl %edx, %esi
addq -0x20(%rbp), %rsi
addl $0x8, %edx
movl %edx, -0x30(%rbp)
jmp 0x5b1f8
movq -0x28(%rbp), %rsi
leaq 0x8(%rsi), %rdx
movq %rdx, -0x28(%rbp)
movq (%rsi), %rdx
testq %rdx, %rdx
je 0x5b237
movq %rcx, (%rdx)
movl -0x30(%rbp), %edx
cmpq $0x28, %rdx
ja 0x5b21b
movq %rdx, %rsi
addq -0x20(%rbp), %rsi
addl $0x8, %edx
movl %edx, -0x30(%rbp)
jmp 0x5b227
movq -0x28(%rbp), %rsi
leaq 0x8(%rsi), %rdi
movq %rdi, -0x28(%rbp)
movq (%rsi), %rsi
addq $0x7, %rsi
andq $-0x8, %rsi
addq %rsi, %rcx
jmp 0x5b1d9
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
| my_multi_malloc_large:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0D0h
mov r10, rdx
mov rdx, rsi
lea rbx, [rbp+var_E0]
mov [rbx+10h], r10
mov [rbx+18h], rcx
mov [rbx+20h], r8
mov [rbx+28h], r9
test al, al
jz short loc_5B145
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_5B145:
mov [rbp+var_20], rbx
lea rcx, [rbp+arg_0]
mov [rbp+var_28], rcx
mov r14, 3000000010h
mov [rbp+var_30], r14
mov eax, 10h
xor esi, esi
loc_5B166:
cmp eax, 28h ; '('
ja short loc_5B17B
mov r8, rcx
mov ecx, eax
add rcx, rbx
add eax, 8
mov dword ptr [rbp+var_30], eax
jmp short loc_5B183
loc_5B17B:
lea r8, [rcx+8]
mov [rbp+var_28], r8
loc_5B183:
cmp qword ptr [rcx], 0
jz short loc_5B1B7
cmp eax, 28h ; '('
ja short loc_5B19F
mov rcx, r8
mov r8d, eax
add r8, rbx
add eax, 8
mov dword ptr [rbp+var_30], eax
jmp short loc_5B1A7
loc_5B19F:
lea rcx, [r8+8]
mov [rbp+var_28], rcx
loc_5B1A7:
mov r8, [r8]
add r8, 7
and r8, 0FFFFFFFFFFFFFFF8h
add rsi, r8
jmp short loc_5B166
loc_5B1B7:
call my_malloc
test rax, rax
jz short loc_5B237
mov [rbp+var_20], rbx
lea rcx, [rbp+arg_0]
mov [rbp+var_28], rcx
mov [rbp+var_30], r14
mov edx, 10h
mov rcx, rax
loc_5B1D9:
cmp edx, 28h ; '('
ja short loc_5B1EC
mov esi, edx
add rsi, [rbp+var_20]
add edx, 8
mov dword ptr [rbp+var_30], edx
jmp short loc_5B1F8
loc_5B1EC:
mov rsi, [rbp+var_28]
lea rdx, [rsi+8]
mov [rbp+var_28], rdx
loc_5B1F8:
mov rdx, [rsi]
test rdx, rdx
jz short loc_5B237
mov [rdx], rcx
mov edx, dword ptr [rbp+var_30]
cmp rdx, 28h ; '('
ja short loc_5B21B
mov rsi, rdx
add rsi, [rbp+var_20]
add edx, 8
mov dword ptr [rbp+var_30], edx
jmp short loc_5B227
loc_5B21B:
mov rsi, [rbp+var_28]
lea rdi, [rsi+8]
mov [rbp+var_28], rdi
loc_5B227:
mov rsi, [rsi]
add rsi, 7
and rsi, 0FFFFFFFFFFFFFFF8h
add rcx, rsi
jmp short loc_5B1D9
loc_5B237:
add rsp, 0D0h
pop rbx
pop r14
pop rbp
retn
| long long my_multi_malloc_large(
long long a1,
_DWORD a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char *v15; // rcx
unsigned int v16; // eax
long long i; // rsi
char *v18; // r8
long long result; // rax
unsigned int v20; // edx
long long j; // rcx
char *v22; // rsi
char *v23; // rsi
_BYTE v24[16]; // [rsp+0h] [rbp-E0h] BYREF
long long v25; // [rsp+10h] [rbp-D0h]
long long v26; // [rsp+18h] [rbp-C8h]
long long v27; // [rsp+20h] [rbp-C0h]
long long v28; // [rsp+28h] [rbp-B8h]
__m128 v29; // [rsp+30h] [rbp-B0h]
__m128 v30; // [rsp+40h] [rbp-A0h]
__m128 v31; // [rsp+50h] [rbp-90h]
__m128 v32; // [rsp+60h] [rbp-80h]
__m128 v33; // [rsp+70h] [rbp-70h]
__m128 v34; // [rsp+80h] [rbp-60h]
__m128 v35; // [rsp+90h] [rbp-50h]
__m128 v36; // [rsp+A0h] [rbp-40h]
long long v37; // [rsp+B0h] [rbp-30h]
char *v38; // [rsp+B8h] [rbp-28h]
_BYTE *v39; // [rsp+C0h] [rbp-20h]
v29 = a7;
v30 = a8;
v31 = a9;
v32 = a10;
v33 = a11;
v34 = a12;
v35 = a13;
v36 = a14;
v25 = a3;
v26 = a4;
v27 = a5;
v28 = a6;
v39 = v24;
v15 = &a15;
v38 = &a15;
v37 = 0x3000000010LL;
v16 = 16;
for ( i = 0LL; ; i += (*(_QWORD *)v18 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( v16 > 0x28 )
{
v18 = v15 + 8;
v38 = v15 + 8;
}
else
{
v18 = v15;
v15 = &v24[v16];
v16 += 8;
LODWORD(v37) = v16;
}
if ( !*(_QWORD *)v15 )
break;
if ( v16 > 0x28 )
{
v15 = v18 + 8;
v38 = v18 + 8;
}
else
{
v15 = v18;
v18 = &v24[v16];
v16 += 8;
LODWORD(v37) = v16;
}
}
result = my_malloc(a1, i);
if ( result )
{
v39 = v24;
v38 = &a15;
v37 = 0x3000000010LL;
v20 = 16;
for ( j = result; ; j += (*(_QWORD *)v23 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( v20 > 0x28 )
{
v22 = v38;
v38 += 8;
}
else
{
v22 = &v39[v20];
LODWORD(v37) = v20 + 8;
}
if ( !*(_QWORD *)v22 )
break;
**(_QWORD **)v22 = j;
v20 = v37;
if ( (unsigned int)v37 > 0x28uLL )
{
v23 = v38;
v38 += 8;
}
else
{
v23 = &v39[(unsigned int)v37];
v20 = v37 + 8;
LODWORD(v37) = v37 + 8;
}
}
}
return result;
}
| my_multi_malloc_large:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xd0
MOV R10,RDX
MOV RDX,RSI
LEA RBX,[RBP + -0xe0]
MOV qword ptr [RBX + 0x10],R10
MOV qword ptr [RBX + 0x18],RCX
MOV qword ptr [RBX + 0x20],R8
MOV qword ptr [RBX + 0x28],R9
TEST AL,AL
JZ 0x0015b145
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_0015b145:
MOV qword ptr [RBP + -0x20],RBX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV R14,0x3000000010
MOV qword ptr [RBP + -0x30],R14
MOV EAX,0x10
XOR ESI,ESI
LAB_0015b166:
CMP EAX,0x28
JA 0x0015b17b
MOV R8,RCX
MOV ECX,EAX
ADD RCX,RBX
ADD EAX,0x8
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0015b183
LAB_0015b17b:
LEA R8,[RCX + 0x8]
MOV qword ptr [RBP + -0x28],R8
LAB_0015b183:
CMP qword ptr [RCX],0x0
JZ 0x0015b1b7
CMP EAX,0x28
JA 0x0015b19f
MOV RCX,R8
MOV R8D,EAX
ADD R8,RBX
ADD EAX,0x8
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0015b1a7
LAB_0015b19f:
LEA RCX,[R8 + 0x8]
MOV qword ptr [RBP + -0x28],RCX
LAB_0015b1a7:
MOV R8,qword ptr [R8]
ADD R8,0x7
AND R8,-0x8
ADD RSI,R8
JMP 0x0015b166
LAB_0015b1b7:
CALL 0x00160401
TEST RAX,RAX
JZ 0x0015b237
MOV qword ptr [RBP + -0x20],RBX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R14
MOV EDX,0x10
MOV RCX,RAX
LAB_0015b1d9:
CMP EDX,0x28
JA 0x0015b1ec
MOV ESI,EDX
ADD RSI,qword ptr [RBP + -0x20]
ADD EDX,0x8
MOV dword ptr [RBP + -0x30],EDX
JMP 0x0015b1f8
LAB_0015b1ec:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDX,[RSI + 0x8]
MOV qword ptr [RBP + -0x28],RDX
LAB_0015b1f8:
MOV RDX,qword ptr [RSI]
TEST RDX,RDX
JZ 0x0015b237
MOV qword ptr [RDX],RCX
MOV EDX,dword ptr [RBP + -0x30]
CMP RDX,0x28
JA 0x0015b21b
MOV RSI,RDX
ADD RSI,qword ptr [RBP + -0x20]
ADD EDX,0x8
MOV dword ptr [RBP + -0x30],EDX
JMP 0x0015b227
LAB_0015b21b:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RSI + 0x8]
MOV qword ptr [RBP + -0x28],RDI
LAB_0015b227:
MOV RSI,qword ptr [RSI]
ADD RSI,0x7
AND RSI,-0x8
ADD RCX,RSI
JMP 0x0015b1d9
LAB_0015b237:
ADD RSP,0xd0
POP RBX
POP R14
POP RBP
RET
|
void my_multi_malloc_large
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint uVar1;
long *plVar2;
ulong uVar3;
long lVar4;
long *plVar5;
long *plVar6;
long local_e8 [4];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
uint local_38;
int4 uStack_34;
long *local_30;
long *local_28;
local_e8[2] = param_11;
local_e8[3] = param_12;
local_c8 = param_13;
local_c0 = param_14;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
plVar5 = (long *)&stack0x00000008;
local_30 = plVar5;
local_38 = 0x10;
uStack_34 = 0x30;
uVar1 = 0x10;
lVar4 = 0;
while( true ) {
if (uVar1 < 0x29) {
uVar3 = (ulong)uVar1;
uVar1 = uVar1 + 8;
local_38 = uVar1;
plVar2 = (long *)((long)local_e8 + uVar3);
plVar6 = plVar5;
}
else {
plVar6 = plVar5 + 1;
local_30 = plVar6;
plVar2 = plVar5;
}
if (*plVar2 == 0) break;
if (uVar1 < 0x29) {
uVar3 = (ulong)uVar1;
uVar1 = uVar1 + 8;
local_38 = uVar1;
plVar5 = plVar6;
plVar6 = (long *)((long)local_e8 + uVar3);
}
else {
plVar5 = plVar6 + 1;
local_30 = plVar5;
}
lVar4 = lVar4 + (*plVar6 + 7U & 0xfffffffffffffff8);
}
lVar4 = my_malloc(param_9,lVar4,param_10);
if (lVar4 != 0) {
local_30 = (long *)&stack0x00000008;
uVar1 = 0x10;
uVar3 = 0x10;
while( true ) {
if ((uint)uVar3 < 0x29) {
uVar1 = (uint)uVar3 + 8;
plVar5 = (long *)((long)local_e8 + uVar3);
}
else {
plVar5 = local_30;
local_30 = local_30 + 1;
}
if ((long *)*plVar5 == (long *)0x0) break;
*(long *)*plVar5 = lVar4;
uVar3 = (ulong)uVar1;
if (uVar3 < 0x29) {
plVar5 = (long *)((long)local_e8 + uVar3);
uVar1 = uVar1 + 8;
uVar3 = (ulong)uVar1;
}
else {
plVar5 = local_30;
local_30 = local_30 + 1;
}
lVar4 = lVar4 + (*plVar5 + 7U & 0xfffffffffffffff8);
}
}
return;
}
| |
40,222 | get_length_arg | eloqsql/strings/my_vsnprintf.c | static const char *get_length_arg(const char *fmt, ARGS_INFO *args_arr,
size_t *arg_count, size_t *length, uint *flags)
{
fmt= get_length(fmt+1, length, flags);
*arg_count= MY_MAX(*arg_count, *length);
(*length)--;
DBUG_ASSERT(*fmt == '$' && *length < MAX_ARGS);
args_arr[*length].arg_type= 'd';
args_arr[*length].have_longlong= 0;
return fmt+1;
} | O0 | c | get_length_arg:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x80560
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x82372
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x8237d
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
addq $-0x1, %rcx
movq %rcx, (%rax)
jmp 0x82398
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movb $0x64, (%rax)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
addq $0x1, %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| get_length_arg:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rdi, [rbp+var_8]
add rdi, 1
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call get_length
mov [rbp+var_8], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov rcx, [rbp+var_20]
cmp rax, [rcx]
jbe short loc_82372
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_30], rax
jmp short loc_8237D
loc_82372:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_30], rax
loc_8237D:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_20]
mov rcx, [rax]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax], rcx
jmp short $+2
loc_82398:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
shl rcx, 5
add rax, rcx
mov byte ptr [rax], 64h ; 'd'
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
shl rcx, 5
add rax, rcx
mov dword ptr [rax+4], 0
mov rax, [rbp+var_8]
add rax, 1
add rsp, 30h
pop rbp
retn
| unsigned __int8 * get_length_arg(long long a1, long long a2, long long *a3, long long *a4, _DWORD *a5)
{
long long v6; // [rsp+0h] [rbp-30h]
unsigned __int8 *length; // [rsp+28h] [rbp-8h]
length = get_length((unsigned __int8 *)(a1 + 1), a4, a5);
if ( *a3 <= (unsigned long long)*a4 )
v6 = *a4;
else
v6 = *a3;
*a3 = v6;
--*a4;
*(_BYTE *)(32 * *a4 + a2) = 100;
*(_DWORD *)(32 * *a4 + a2 + 4) = 0;
return length + 1;
}
| get_length_arg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x1
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00180560
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX]
JBE 0x00182372
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0018237d
LAB_00182372:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
LAB_0018237d:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
ADD RCX,-0x1
MOV qword ptr [RAX],RCX
JMP 0x00182398
LAB_00182398:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SHL RCX,0x5
ADD RAX,RCX
MOV byte ptr [RAX],0x64
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SHL RCX,0x5
ADD RAX,RCX
MOV dword ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
ADD RSP,0x30
POP RBP
RET
|
long get_length_arg(long param_1,long param_2,ulong *param_3,ulong *param_4,int8 param_5)
{
long lVar1;
int8 local_38;
lVar1 = get_length(param_1 + 1,param_4,param_5);
if (*param_4 < *param_3) {
local_38 = *param_3;
}
else {
local_38 = *param_4;
}
*param_3 = local_38;
*param_4 = *param_4 - 1;
*(int1 *)(param_2 + *param_4 * 0x20) = 100;
*(int4 *)(param_2 + *param_4 * 0x20 + 4) = 0;
return lVar1 + 1;
}
| |
40,223 | my_strnncoll_simple | eloqsql/strings/ctype-simple.c | int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len = ( slen > tlen ) ? tlen : slen;
const uchar *map= cs->sort_order;
if (t_is_prefix && slen > tlen)
slen=tlen;
while (len--)
{
if (map[*s++] != map[*t++])
return ((int) map[s[-1]] - (int) map[t[-1]]);
}
/*
We can't use (slen - tlen) here as the result may be outside of the
precision of a signed int
*/
return slen > tlen ? 1 : slen < tlen ? -1 : 0 ;
} | O3 | c | my_strnncoll_simple:
pushq %rbp
movq %rsp, %rbp
cmpq %r8, %rdx
movq %r8, %r10
cmovbq %rdx, %r10
movq 0x58(%rdi), %rdi
testb %r9b, %r9b
cmovneq %r10, %rdx
xorl %r9d, %r9d
cmpq %r9, %r10
je 0x3d092
movzbl (%rsi,%r9), %eax
movzbl (%rdi,%rax), %eax
movzbl (%rcx,%r9), %r11d
movzbl (%rdi,%r11), %r11d
incq %r9
cmpb %r11b, %al
je 0x3d06d
subl %r11d, %eax
jmp 0x3d0a4
xorl %ecx, %ecx
cmpq %r8, %rdx
sbbl %ecx, %ecx
cmpq %r8, %rdx
movl $0x1, %eax
cmovbel %ecx, %eax
popq %rbp
retq
| my_strnncoll_simple:
push rbp
mov rbp, rsp
cmp rdx, r8
mov r10, r8
cmovb r10, rdx
mov rdi, [rdi+58h]
test r9b, r9b
cmovnz rdx, r10
xor r9d, r9d
loc_3D06D:
cmp r10, r9
jz short loc_3D092
movzx eax, byte ptr [rsi+r9]
movzx eax, byte ptr [rdi+rax]
movzx r11d, byte ptr [rcx+r9]
movzx r11d, byte ptr [rdi+r11]
inc r9
cmp al, r11b
jz short loc_3D06D
sub eax, r11d
jmp short loc_3D0A4
loc_3D092:
xor ecx, ecx
cmp rdx, r8
sbb ecx, ecx
cmp rdx, r8
mov eax, 1
cmovbe eax, ecx
loc_3D0A4:
pop rbp
retn
| long long my_strnncoll_simple(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned long long v6; // r10
long long v7; // rdi
long long v8; // r9
int v9; // eax
int v10; // r11d
long long result; // rax
v6 = a5;
if ( a3 < a5 )
v6 = a3;
v7 = *(_QWORD *)(a1 + 88);
if ( a6 )
a3 = v6;
v8 = 0LL;
while ( v6 != v8 )
{
v9 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a2 + v8));
v10 = *(unsigned __int8 *)(v7 + *(unsigned __int8 *)(a4 + v8++));
if ( (_BYTE)v9 != (_BYTE)v10 )
return (unsigned int)(v9 - v10);
}
result = 1LL;
if ( a3 <= a5 )
return (unsigned int)-(a3 < a5);
return result;
}
| my_strnncoll_simple:
PUSH RBP
MOV RBP,RSP
CMP RDX,R8
MOV R10,R8
CMOVC R10,RDX
MOV RDI,qword ptr [RDI + 0x58]
TEST R9B,R9B
CMOVNZ RDX,R10
XOR R9D,R9D
LAB_0013d06d:
CMP R10,R9
JZ 0x0013d092
MOVZX EAX,byte ptr [RSI + R9*0x1]
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOVZX R11D,byte ptr [RCX + R9*0x1]
MOVZX R11D,byte ptr [RDI + R11*0x1]
INC R9
CMP AL,R11B
JZ 0x0013d06d
SUB EAX,R11D
JMP 0x0013d0a4
LAB_0013d092:
XOR ECX,ECX
CMP RDX,R8
SBB ECX,ECX
CMP RDX,R8
MOV EAX,0x1
CMOVBE EAX,ECX
LAB_0013d0a4:
POP RBP
RET
|
int my_strnncoll_simple(long param_1,long param_2,ulong param_3,long param_4,ulong param_5,
char param_6)
{
byte bVar1;
byte bVar2;
ulong uVar3;
ulong uVar4;
uVar4 = param_5;
if (param_3 < param_5) {
uVar4 = param_3;
}
if (param_6 != '\0') {
param_3 = uVar4;
}
uVar3 = 0;
do {
if (uVar4 == uVar3) {
if (param_5 < param_3) {
return 1;
}
return -(uint)(param_3 < param_5);
}
bVar1 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_2 + uVar3));
bVar2 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_4 + uVar3));
uVar3 = uVar3 + 1;
} while (bVar1 == bVar2);
return (uint)bVar1 - (uint)bVar2;
}
| |
40,224 | void ImPlot::PlotLineEx<ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<signed char>>>(char const*, ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<signed char>> const&, int) | zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp | void PlotLineEx(const char* label_id, const _Getter& getter, ImPlotLineFlags flags) {
if (BeginItemEx(label_id, Fitter1<_Getter>(getter), flags, ImPlotCol_Line)) {
const ImPlotNextItemData& s = GetItemData();
if (getter.Count > 1) {
if (ImHasFlag(flags, ImPlotLineFlags_Shaded) && s.RenderFill) {
const ImU32 col_fill = ImGui::GetColorU32(s.Colors[ImPlotCol_Fill]);
GetterOverrideY<_Getter> getter2(getter, 0);
RenderPrimitives2<RendererShaded>(getter,getter2,col_fill);
}
if (s.RenderLine) {
const ImU32 col_line = ImGui::GetColorU32(s.Colors[ImPlotCol_Line]);
if (ImHasFlag(flags,ImPlotLineFlags_Segments)) {
RenderPrimitives1<RendererLineSegments1>(getter,col_line,s.LineWeight);
}
else if (ImHasFlag(flags, ImPlotLineFlags_Loop)) {
if (ImHasFlag(flags, ImPlotLineFlags_SkipNaN))
RenderPrimitives1<RendererLineStripSkip>(GetterLoop<_Getter>(getter),col_line,s.LineWeight);
else
RenderPrimitives1<RendererLineStrip>(GetterLoop<_Getter>(getter),col_line,s.LineWeight);
}
else {
if (ImHasFlag(flags, ImPlotLineFlags_SkipNaN))
RenderPrimitives1<RendererLineStripSkip>(getter,col_line,s.LineWeight);
else
RenderPrimitives1<RendererLineStrip>(getter,col_line,s.LineWeight);
}
}
}
// render markers
if (s.Marker != ImPlotMarker_None) {
if (ImHasFlag(flags, ImPlotLineFlags_NoClip)) {
PopPlotClipRect();
PushPlotClipRect(s.MarkerSize);
}
const ImU32 col_line = ImGui::GetColorU32(s.Colors[ImPlotCol_MarkerOutline]);
const ImU32 col_fill = ImGui::GetColorU32(s.Colors[ImPlotCol_MarkerFill]);
RenderMarkers<_Getter>(getter, s.Marker, s.MarkerSize, s.RenderMarkerFill, col_fill, s.RenderMarkerLine, col_line, s.MarkerWeight);
}
EndItem();
}
} | O1 | cpp | void ImPlot::PlotLineEx<ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<signed char>>>(char const*, ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<signed char>> const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rsp, %rsi
movq %rbx, (%rsi)
xorl %ecx, %ecx
callq 0x14c27c
testb %al, %al
je 0xcee8e
leaq 0x267f60(%rip), %r14 # 0x336ca0
movq (%r14), %r15
cmpl $0x2, 0x30(%rbx)
jl 0xcedf7
btl $0xe, %ebp
jae 0xced9f
cmpb $0x1, 0x5ad(%r15)
jne 0xced9f
leaq 0x548(%r15), %rdi
callq 0x215ebe
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movq %rsp, %rsi
movaps %xmm2, 0x20(%rsi)
movaps %xmm1, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq 0x30(%rbx), %rcx
movq %rcx, 0x30(%rsi)
movq $0x0, 0x38(%rsi)
movl %ecx, 0x40(%rsi)
movq %rbx, %rdi
movl %eax, %edx
callq 0x14c2e4
cmpb $0x1, 0x5ac(%r15)
jne 0xcedf7
leaq 0x538(%r15), %rdi
callq 0x215ebe
btl $0xa, %ebp
jb 0xcede4
btl $0xb, %ebp
jb 0xcee99
btl $0xc, %ebp
movss 0x588(%r15), %xmm0
movq %rbx, %rdi
movl %eax, %esi
jb 0xceeda
callq 0x14c4de
jmp 0xcedf7
movss 0x588(%r15), %xmm0
movq %rbx, %rdi
movl %eax, %esi
callq 0x14c346
cmpl $-0x1, 0x58c(%r15)
je 0xcee6a
btl $0xd, %ebp
jae 0xcee1a
callq 0xbd912
movss 0x590(%r15), %xmm0
callq 0xbd878
leaq 0x558(%r15), %rdi
callq 0x215ebe
movl %eax, %ebp
leaq 0x568(%r15), %rdi
callq 0x215ebe
movl 0x58c(%r15), %esi
movss 0x590(%r15), %xmm0
movzbl 0x5af(%r15), %edx
movzbl 0x5ae(%r15), %r8d
movss 0x594(%r15), %xmm1
movq %rbx, %rdi
movl %eax, %ecx
movl %ebp, %r9d
callq 0x14c544
movq (%r14), %rbx
callq 0xbd912
leaq 0x538(%rbx), %rdi
callq 0xc7cc2
movq 0x68(%rbx), %rax
movq %rax, 0x70(%rbx)
movq $0x0, 0x68(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
btl $0xc, %ebp
jb 0xceee4
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movq %rsp, %rdi
movaps %xmm2, 0x20(%rdi)
movaps %xmm1, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq 0x30(%rbx), %rcx
movq %rcx, 0x30(%rdi)
incl %ecx
movl %ecx, 0x38(%rdi)
movss 0x588(%r15), %xmm0
movl %eax, %esi
callq 0x14c412
jmp 0xcedf7
callq 0x14c478
jmp 0xcedf7
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movq %rsp, %rdi
movaps %xmm2, 0x20(%rdi)
movaps %xmm1, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq 0x30(%rbx), %rcx
movq %rcx, 0x30(%rdi)
incl %ecx
movl %ecx, 0x38(%rdi)
movss 0x588(%r15), %xmm0
movl %eax, %esi
callq 0x14c3ac
jmp 0xcedf7
| _ZN6ImPlot10PlotLineExINS_8GetterXYINS_10IndexerIdxIfEES3_EEEEvPKcRKT_i:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rsi
mov rsi, rsp
mov [rsi], rbx
xor ecx, ecx
call _ZN6ImPlot11BeginItemExINS_7Fitter1INS_8GetterXYINS_10IndexerIdxIfEES4_EEEEEEbPKcRKT_ii; ImPlot::BeginItemEx<ImPlot::Fitter1<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>>(char const*,ImPlot::Fitter1<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>> const&,int,int)
test al, al
jz loc_CEE8E
lea r14, GImPlot
mov r15, [r14]
cmp dword ptr [rbx+30h], 2
jl loc_CEDF7
bt ebp, 0Eh
jnb short loc_CED9F
cmp byte ptr [r15+5ADh], 1
jnz short loc_CED9F
lea rdi, [r15+548h]
call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&)
movups xmm0, xmmword ptr [rbx]
movups xmm1, xmmword ptr [rbx+10h]
movups xmm2, xmmword ptr [rbx+20h]
mov rsi, rsp
movaps xmmword ptr [rsi+20h], xmm2
movaps xmmword ptr [rsi+10h], xmm1
movaps xmmword ptr [rsi], xmm0
mov rcx, [rbx+30h]
mov [rsi+30h], rcx
mov qword ptr [rsi+38h], 0
mov [rsi+40h], ecx
mov rdi, rbx
mov edx, eax
call _ZN6ImPlot17RenderPrimitives2INS_14RendererShadedENS_8GetterXYINS_10IndexerIdxIfEES4_EENS_15GetterOverrideYIS5_EEJjEEEvRKT0_RKT1_DpT2_; ImPlot::RenderPrimitives2<ImPlot::RendererShaded,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,ImPlot::GetterOverrideY<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>,uint>(ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>> const&,ImPlot::GetterOverrideY<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>> const&,uint)
loc_CED9F:
cmp byte ptr [r15+5ACh], 1
jnz short loc_CEDF7
lea rdi, [r15+538h]
call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&)
bt ebp, 0Ah
jb short loc_CEDE4
bt ebp, 0Bh
jb loc_CEE99
bt ebp, 0Ch
movss xmm0, dword ptr [r15+588h]
mov rdi, rbx
mov esi, eax
jb loc_CEEDA
call _ZN6ImPlot17RenderPrimitives1INS_17RendererLineStripENS_8GetterXYINS_10IndexerIdxIfEES4_EEJjfEEEvRKT0_DpT1_; ImPlot::RenderPrimitives1<ImPlot::RendererLineStrip,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,uint,float>(ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>> const&,uint,float)
jmp short loc_CEDF7
loc_CEDE4:
movss xmm0, dword ptr [r15+588h]
mov rdi, rbx; this
mov esi, eax
call _ZN6ImPlot17RenderPrimitives1INS_21RendererLineSegments1ENS_8GetterXYINS_10IndexerIdxIfEES4_EEJjfEEEvRKT0_DpT1_; ImPlot::RenderPrimitives1<ImPlot::RendererLineSegments1,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,uint,float>(ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>> const&,uint,float)
loc_CEDF7:
cmp dword ptr [r15+58Ch], 0FFFFFFFFh
jz short loc_CEE6A
bt ebp, 0Dh
jnb short loc_CEE1A
call _ZN6ImPlot15PopPlotClipRectEv; ImPlot::PopPlotClipRect(void)
movss xmm0, dword ptr [r15+590h]; float
call _ZN6ImPlot16PushPlotClipRectEf; ImPlot::PushPlotClipRect(float)
loc_CEE1A:
lea rdi, [r15+558h]
call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&)
mov ebp, eax
lea rdi, [r15+568h]
call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&)
mov esi, [r15+58Ch]
movss xmm0, dword ptr [r15+590h]
movzx edx, byte ptr [r15+5AFh]
movzx r8d, byte ptr [r15+5AEh]
movss xmm1, dword ptr [r15+594h]
mov rdi, rbx; this
mov ecx, eax
mov r9d, ebp
call _ZN6ImPlot13RenderMarkersINS_8GetterXYINS_10IndexerIdxIfEES3_EEEEvRKT_ifbjbjf; ImPlot::RenderMarkers<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>(ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>> const&,int,float,bool,uint,bool,uint,float)
loc_CEE6A:
mov rbx, [r14]
call _ZN6ImPlot15PopPlotClipRectEv; ImPlot::PopPlotClipRect(void)
lea rdi, [rbx+538h]; this
call _ZN18ImPlotNextItemData5ResetEv; ImPlotNextItemData::Reset(void)
mov rax, [rbx+68h]
mov [rbx+70h], rax
mov qword ptr [rbx+68h], 0
loc_CEE8E:
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_CEE99:
bt ebp, 0Ch
jb short loc_CEEE4
movups xmm0, xmmword ptr [rbx]
movups xmm1, xmmword ptr [rbx+10h]
movups xmm2, xmmword ptr [rbx+20h]
mov rdi, rsp
movaps xmmword ptr [rdi+20h], xmm2
movaps xmmword ptr [rdi+10h], xmm1
movaps xmmword ptr [rdi], xmm0
mov rcx, [rbx+30h]
mov [rdi+30h], rcx
inc ecx
mov [rdi+38h], ecx
movss xmm0, dword ptr [r15+588h]
mov esi, eax
call _ZN6ImPlot17RenderPrimitives1INS_17RendererLineStripENS_10GetterLoopINS_8GetterXYINS_10IndexerIdxIfEES5_EEEEJjfEEEvRKT0_DpT1_; ImPlot::RenderPrimitives1<ImPlot::RendererLineStrip,ImPlot::GetterLoop<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>,uint,float>(ImPlot::GetterLoop<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>> const&,uint,float)
jmp loc_CEDF7
loc_CEEDA:
call _ZN6ImPlot17RenderPrimitives1INS_21RendererLineStripSkipENS_8GetterXYINS_10IndexerIdxIfEES4_EEJjfEEEvRKT0_DpT1_; ImPlot::RenderPrimitives1<ImPlot::RendererLineStripSkip,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,uint,float>(ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>> const&,uint,float)
jmp loc_CEDF7
loc_CEEE4:
movups xmm0, xmmword ptr [rbx]
movups xmm1, xmmword ptr [rbx+10h]
movups xmm2, xmmword ptr [rbx+20h]
mov rdi, rsp
movaps xmmword ptr [rdi+20h], xmm2
movaps xmmword ptr [rdi+10h], xmm1
movaps xmmword ptr [rdi], xmm0
mov rcx, [rbx+30h]
mov [rdi+30h], rcx
inc ecx
mov [rdi+38h], ecx
movss xmm0, dword ptr [r15+588h]
mov esi, eax
call _ZN6ImPlot17RenderPrimitives1INS_21RendererLineStripSkipENS_10GetterLoopINS_8GetterXYINS_10IndexerIdxIfEES5_EEEEJjfEEEvRKT0_DpT1_; ImPlot::RenderPrimitives1<ImPlot::RendererLineStripSkip,ImPlot::GetterLoop<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>,uint,float>(ImPlot::GetterLoop<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>> const&,uint,float)
jmp loc_CEDF7
| long long ImPlot::PlotLineEx<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>(
ImPlot *a1,
__int128 *a2,
long long a3)
{
__int16 v3; // bp
unsigned long long v5; // rsi
long long result; // rax
ImGui *v7; // r15
unsigned int ColorU32; // eax
__int128 v9; // xmm0
__int128 v10; // xmm1
unsigned int v11; // eax
float v12; // xmm0_4
unsigned int v13; // ebp
unsigned int v14; // eax
ImGui *v15; // rbx
__int128 v16; // xmm0
__int128 v17; // xmm1
__int128 v18; // [rsp+0h] [rbp-68h] BYREF
__int128 v19; // [rsp+10h] [rbp-58h]
__int128 v20; // [rsp+20h] [rbp-48h]
long long v21; // [rsp+30h] [rbp-38h]
long long v22; // [rsp+38h] [rbp-30h]
int v23; // [rsp+40h] [rbp-28h]
v3 = a3;
v5 = (unsigned long long)&v18;
*(_QWORD *)&v18 = a2;
result = ImPlot::BeginItemEx<ImPlot::Fitter1<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>>(
a1,
&v18,
a3,
0LL);
if ( (_BYTE)result )
{
v7 = GImPlot;
if ( *((int *)a2 + 12) >= 2 )
{
if ( (v3 & 0x4000) != 0 && *((_BYTE *)GImPlot + 1453) == 1 )
{
ColorU32 = ImGui::GetColorU32((char *)GImPlot + 1352);
v9 = *a2;
v10 = a2[1];
v5 = (unsigned long long)&v18;
v20 = a2[2];
v19 = v10;
v18 = v9;
v21 = *((_QWORD *)a2 + 6);
v22 = 0LL;
v23 = v21;
a1 = (ImPlot *)a2;
((void ( *)(__int128 *, __int128 *, _QWORD))ImPlot::RenderPrimitives2<ImPlot::RendererShaded,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,ImPlot::GetterOverrideY<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>,unsigned int>)(
a2,
&v18,
ColorU32);
}
if ( *((_BYTE *)v7 + 1452) == 1 )
{
v11 = ImGui::GetColorU32((char *)v7 + 1336);
if ( (v3 & 0x400) != 0 )
{
a1 = (ImPlot *)a2;
v5 = v11;
ImPlot::RenderPrimitives1<ImPlot::RendererLineSegments1,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,unsigned int,float>(
a2,
v11,
*((float *)v7 + 354));
}
else if ( (v3 & 0x800) != 0 )
{
v16 = *a2;
v17 = a2[1];
a1 = (ImPlot *)&v18;
v20 = a2[2];
v19 = v17;
v18 = v16;
v21 = *((_QWORD *)a2 + 6);
LODWORD(v22) = v21 + 1;
v5 = v11;
if ( (v3 & 0x1000) != 0 )
((void ( *)(__int128 *, _QWORD, float))ImPlot::RenderPrimitives1<ImPlot::RendererLineStripSkip,ImPlot::GetterLoop<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>,unsigned int,float>)(
&v18,
v11,
*((float *)v7 + 354));
else
((void ( *)(__int128 *, _QWORD, float))ImPlot::RenderPrimitives1<ImPlot::RendererLineStrip,ImPlot::GetterLoop<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>,unsigned int,float>)(
&v18,
v11,
*((float *)v7 + 354));
}
else
{
v12 = *((float *)v7 + 354);
a1 = (ImPlot *)a2;
v5 = v11;
if ( (v3 & 0x1000) != 0 )
ImPlot::RenderPrimitives1<ImPlot::RendererLineStripSkip,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,unsigned int,float>(
a2,
v11,
v12);
else
ImPlot::RenderPrimitives1<ImPlot::RendererLineStrip,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,unsigned int,float>(
a2,
v11,
v12);
}
}
}
if ( *((_DWORD *)v7 + 355) != -1 )
{
if ( (v3 & 0x2000) != 0 )
{
ImPlot::PopPlotClipRect(a1, (const char *)v5);
ImPlot::PushPlotClipRect(a1, (__m128)*((unsigned int *)v7 + 356), (const char *)v5);
}
v13 = ImGui::GetColorU32((char *)v7 + 1368);
v14 = ImGui::GetColorU32((char *)v7 + 1384);
v5 = *((unsigned int *)v7 + 355);
a1 = (ImPlot *)a2;
ImPlot::RenderMarkers<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>(
a2,
v5,
*((unsigned __int8 *)v7 + 1455),
v14,
*((unsigned __int8 *)v7 + 1454),
v13,
*((float *)v7 + 356),
*((float *)v7 + 357));
}
v15 = GImPlot;
ImPlot::PopPlotClipRect(a1, (const char *)v5);
ImPlotNextItemData::Reset((ImGui *)((char *)v15 + 1336));
result = *((_QWORD *)v15 + 13);
*((_QWORD *)v15 + 14) = result;
*((_QWORD *)v15 + 13) = 0LL;
}
return result;
}
| PlotLineEx<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RSI
MOV RSI,RSP
MOV qword ptr [RSI],RBX
XOR ECX,ECX
CALL 0x0024c27c
TEST AL,AL
JZ 0x001cee8e
LEA R14,[0x436ca0]
MOV R15,qword ptr [R14]
CMP dword ptr [RBX + 0x30],0x2
JL 0x001cedf7
BT EBP,0xe
JNC 0x001ced9f
CMP byte ptr [R15 + 0x5ad],0x1
JNZ 0x001ced9f
LEA RDI,[R15 + 0x548]
CALL 0x00315ebe
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS XMM1,xmmword ptr [RBX + 0x10]
MOVUPS XMM2,xmmword ptr [RBX + 0x20]
MOV RSI,RSP
MOVAPS xmmword ptr [RSI + 0x20],XMM2
MOVAPS xmmword ptr [RSI + 0x10],XMM1
MOVAPS xmmword ptr [RSI],XMM0
MOV RCX,qword ptr [RBX + 0x30]
MOV qword ptr [RSI + 0x30],RCX
MOV qword ptr [RSI + 0x38],0x0
MOV dword ptr [RSI + 0x40],ECX
MOV RDI,RBX
MOV EDX,EAX
CALL 0x0024c2e4
LAB_001ced9f:
CMP byte ptr [R15 + 0x5ac],0x1
JNZ 0x001cedf7
LEA RDI,[R15 + 0x538]
CALL 0x00315ebe
BT EBP,0xa
JC 0x001cede4
BT EBP,0xb
JC 0x001cee99
BT EBP,0xc
MOVSS XMM0,dword ptr [R15 + 0x588]
MOV RDI,RBX
MOV ESI,EAX
JC 0x001ceeda
CALL 0x0024c4de
JMP 0x001cedf7
LAB_001cede4:
MOVSS XMM0,dword ptr [R15 + 0x588]
MOV RDI,RBX
MOV ESI,EAX
CALL 0x0024c346
LAB_001cedf7:
CMP dword ptr [R15 + 0x58c],-0x1
JZ 0x001cee6a
BT EBP,0xd
JNC 0x001cee1a
CALL 0x001bd912
MOVSS XMM0,dword ptr [R15 + 0x590]
CALL 0x001bd878
LAB_001cee1a:
LEA RDI,[R15 + 0x558]
CALL 0x00315ebe
MOV EBP,EAX
LEA RDI,[R15 + 0x568]
CALL 0x00315ebe
MOV ESI,dword ptr [R15 + 0x58c]
MOVSS XMM0,dword ptr [R15 + 0x590]
MOVZX EDX,byte ptr [R15 + 0x5af]
MOVZX R8D,byte ptr [R15 + 0x5ae]
MOVSS XMM1,dword ptr [R15 + 0x594]
MOV RDI,RBX
MOV ECX,EAX
MOV R9D,EBP
CALL 0x0024c544
LAB_001cee6a:
MOV RBX,qword ptr [R14]
CALL 0x001bd912
LEA RDI,[RBX + 0x538]
CALL 0x001c7cc2
MOV RAX,qword ptr [RBX + 0x68]
MOV qword ptr [RBX + 0x70],RAX
MOV qword ptr [RBX + 0x68],0x0
LAB_001cee8e:
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001cee99:
BT EBP,0xc
JC 0x001ceee4
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS XMM1,xmmword ptr [RBX + 0x10]
MOVUPS XMM2,xmmword ptr [RBX + 0x20]
MOV RDI,RSP
MOVAPS xmmword ptr [RDI + 0x20],XMM2
MOVAPS xmmword ptr [RDI + 0x10],XMM1
MOVAPS xmmword ptr [RDI],XMM0
MOV RCX,qword ptr [RBX + 0x30]
MOV qword ptr [RDI + 0x30],RCX
INC ECX
MOV dword ptr [RDI + 0x38],ECX
MOVSS XMM0,dword ptr [R15 + 0x588]
MOV ESI,EAX
CALL 0x0024c412
JMP 0x001cedf7
LAB_001ceeda:
CALL 0x0024c478
JMP 0x001cedf7
LAB_001ceee4:
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS XMM1,xmmword ptr [RBX + 0x10]
MOVUPS XMM2,xmmword ptr [RBX + 0x20]
MOV RDI,RSP
MOVAPS xmmword ptr [RDI + 0x20],XMM2
MOVAPS xmmword ptr [RDI + 0x10],XMM1
MOVAPS xmmword ptr [RDI],XMM0
MOV RCX,qword ptr [RBX + 0x30]
MOV qword ptr [RDI + 0x30],RCX
INC ECX
MOV dword ptr [RDI + 0x38],ECX
MOVSS XMM0,dword ptr [R15 + 0x588]
MOV ESI,EAX
CALL 0x0024c3ac
JMP 0x001cedf7
|
/* void ImPlot::PlotLineEx<ImPlot::GetterXY<ImPlot::IndexerIdx<float>, ImPlot::IndexerIdx<float> >
>(char const*, ImPlot::GetterXY<ImPlot::IndexerIdx<float>, ImPlot::IndexerIdx<float> > const&,
int) */
void ImPlot::PlotLineEx<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>
(char *param_1,GetterXY *param_2,int param_3)
{
long lVar1;
bool bVar2;
uint uVar3;
uint uVar4;
GetterXY *local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 local_30;
int4 local_28;
local_68 = param_2;
bVar2 = BeginItemEx<ImPlot::Fitter1<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>>
(param_1,(Fitter1 *)&local_68,param_3,0);
lVar1 = GImPlot;
if (bVar2) {
if (1 < *(int *)(param_2 + 0x30)) {
if ((((uint)param_3 >> 0xe & 1) != 0) && (*(char *)(GImPlot + 0x5ad) == '\x01')) {
uVar3 = ImGui::GetColorU32((ImVec4 *)(GImPlot + 0x548));
local_68 = *(GetterXY **)param_2;
uStack_60 = *(int8 *)(param_2 + 8);
local_58 = *(int8 *)(param_2 + 0x10);
uStack_50 = *(int8 *)(param_2 + 0x18);
local_48 = *(int8 *)(param_2 + 0x20);
uStack_40 = *(int8 *)(param_2 + 0x28);
local_38 = *(int8 *)(param_2 + 0x30);
local_30 = 0;
local_28 = (int4)local_38;
RenderPrimitives2<ImPlot::RendererShaded,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,ImPlot::GetterOverrideY<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>,unsigned_int>
(param_2,(GetterOverrideY *)&local_68,uVar3);
}
if (*(char *)(lVar1 + 0x5ac) == '\x01') {
uVar3 = ImGui::GetColorU32((ImVec4 *)(lVar1 + 0x538));
if (((uint)param_3 >> 10 & 1) == 0) {
if (((uint)param_3 >> 0xb & 1) == 0) {
if (((uint)param_3 >> 0xc & 1) == 0) {
RenderPrimitives1<ImPlot::RendererLineStrip,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,unsigned_int,float>
(param_2,uVar3,*(float *)(lVar1 + 0x588));
}
else {
RenderPrimitives1<ImPlot::RendererLineStripSkip,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,unsigned_int,float>
(param_2,uVar3,*(float *)(lVar1 + 0x588));
}
}
else if (((uint)param_3 >> 0xc & 1) == 0) {
local_68 = *(GetterXY **)param_2;
uStack_60 = *(int8 *)(param_2 + 8);
local_58 = *(int8 *)(param_2 + 0x10);
uStack_50 = *(int8 *)(param_2 + 0x18);
local_48 = *(int8 *)(param_2 + 0x20);
uStack_40 = *(int8 *)(param_2 + 0x28);
local_38 = *(int8 *)(param_2 + 0x30);
local_30 = CONCAT44(local_30._4_4_,(int)local_38 + 1);
RenderPrimitives1<ImPlot::RendererLineStrip,ImPlot::GetterLoop<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>,unsigned_int,float>
((GetterLoop *)&local_68,uVar3,*(float *)(lVar1 + 0x588));
}
else {
local_68 = *(GetterXY **)param_2;
uStack_60 = *(int8 *)(param_2 + 8);
local_58 = *(int8 *)(param_2 + 0x10);
uStack_50 = *(int8 *)(param_2 + 0x18);
local_48 = *(int8 *)(param_2 + 0x20);
uStack_40 = *(int8 *)(param_2 + 0x28);
local_38 = *(int8 *)(param_2 + 0x30);
local_30 = CONCAT44(local_30._4_4_,(int)local_38 + 1);
RenderPrimitives1<ImPlot::RendererLineStripSkip,ImPlot::GetterLoop<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>,unsigned_int,float>
((GetterLoop *)&local_68,uVar3,*(float *)(lVar1 + 0x588));
}
}
else {
RenderPrimitives1<ImPlot::RendererLineSegments1,ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>,unsigned_int,float>
(param_2,uVar3,*(float *)(lVar1 + 0x588));
}
}
}
if (*(int *)(lVar1 + 0x58c) != -1) {
if (((uint)param_3 >> 0xd & 1) != 0) {
PopPlotClipRect();
PushPlotClipRect(*(float *)(lVar1 + 0x590));
}
uVar3 = ImGui::GetColorU32((ImVec4 *)(lVar1 + 0x558));
uVar4 = ImGui::GetColorU32((ImVec4 *)(lVar1 + 0x568));
RenderMarkers<ImPlot::GetterXY<ImPlot::IndexerIdx<float>,ImPlot::IndexerIdx<float>>>
(param_2,*(int *)(lVar1 + 0x58c),*(float *)(lVar1 + 0x590),*(bool *)(lVar1 + 0x5af),
uVar4,*(bool *)(lVar1 + 0x5ae),uVar3,*(float *)(lVar1 + 0x594));
}
lVar1 = GImPlot;
PopPlotClipRect();
ImPlotNextItemData::Reset((ImPlotNextItemData *)(lVar1 + 0x538));
*(int8 *)(lVar1 + 0x70) = *(int8 *)(lVar1 + 0x68);
*(int8 *)(lVar1 + 0x68) = 0;
}
return;
}
| |
40,225 | merkle_proof | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static bool merkle_proof(merkle_proof_data_t* proof, gindex_t start, gindex_t end, bytes32_t out) {
bytes32_t tmp = {0};
bytes_t start_data = merkle_get_data(proof, start);
if (start_data.len != 32) return false;
memcpy(out, start_data.data, 32);
while (start > end) {
log_debug_full("%l: %x", start, bytes(out, 32));
/*
fprintf(stderr, "s: %llu ", start);
print_hex(stderr, bytes(out, 32), " : ", "\n");
*/
gindex_t witness = start & 1 ? start - 1 : start + 1;
bytes_t witness_data = merkle_get_data(proof, witness);
if (witness_data.data == NULL) {
// how do we find the start for calculating this witness?
for (int i = 0; i < proof->leafes_len && witness_data.data == NULL; i++) {
gindex_t path = proof->leafes_gindex[i];
for (; path > 1; path >>= 1) {
if (path == witness && merkle_proof(proof, proof->leafes_gindex[i], witness, tmp)) {
witness_data = bytes(tmp, 32);
break;
}
}
}
if (witness_data.data == NULL) return false;
}
if (start & 1)
sha256_merkle(witness_data, bytes(out, 32), out);
else
sha256_merkle(bytes(out, 32), witness_data, out);
start >>= 1;
}
return true;
} | O0 | c | merkle_proof:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x5110
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1e2a0
movl %eax, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
cmpl $0x20, -0x60(%rbp)
je 0x1d44e
movb $0x0, -0x1(%rbp)
jmp 0x1d724
movq -0x28(%rbp), %rax
movq -0x58(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x1d720
jmp 0x1d484
movb $0x0, %al
callq 0x220e0
cmpl $0x5, %eax
jb 0x1d50b
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x5110
movq -0x18(%rbp), %rdx
movl $0x20, -0x88(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x88(%rbp), %ecx
movq -0x80(%rbp), %r8
leaq -0x78(%rbp), %rdi
leaq 0x36f5f(%rip), %rsi # 0x5442a
movb $0x0, %al
callq 0x19740
movq 0x51b07(%rip), %rax # 0x6efe0
movq (%rax), %rdi
movq -0x70(%rbp), %r9
leaq 0x34e91(%rip), %rsi # 0x52378
leaq 0x36f25(%rip), %rdx # 0x54413
leaq 0x36f3c(%rip), %rcx # 0x54431
movl $0x1e5, %r8d # imm = 0x1E5
movb $0x0, %al
callq 0x50d0
leaq -0x78(%rbp), %rdi
callq 0x18d90
jmp 0x1d50d
movq -0x18(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1d52c
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0xe8(%rbp)
jmp 0x1d53b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x1e2a0
movl %eax, -0xa0(%rbp)
movq %rdx, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
jne 0x1d690
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %ecx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpl 0x38(%rdx), %ecx
movb %al, -0xe9(%rbp)
jae 0x1d5a6
cmpq $0x0, -0x98(%rbp)
sete %al
movb %al, -0xe9(%rbp)
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x1d5b5
jmp 0x1d67b
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xa4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xb0(%rbp)
cmpq $0x1, -0xb0(%rbp)
jbe 0x1d665
movq -0xb0(%rbp), %rax
cmpq -0x90(%rbp), %rax
jne 0x1d64d
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xa4(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x90(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x1d400
testb $0x1, %al
jne 0x1d61a
jmp 0x1d64d
movl $0x20, -0xc0(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x1d665
jmp 0x1d64f
movq -0xb0(%rbp), %rax
shrq %rax
movq %rax, -0xb0(%rbp)
jmp 0x1d5cf
jmp 0x1d667
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x1d57e
cmpq $0x0, -0x98(%rbp)
jne 0x1d68e
movb $0x0, -0x1(%rbp)
jmp 0x1d724
jmp 0x1d690
movq -0x18(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1d6d8
movl $0x20, -0xd0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x28(%rbp), %r8
movl -0xa0(%rbp), %edi
movq -0x98(%rbp), %rsi
movl -0xd0(%rbp), %edx
movq -0xc8(%rbp), %rcx
callq 0x1f530
jmp 0x1d710
movl $0x20, -0xe0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x28(%rbp), %r8
movl -0xe0(%rbp), %edi
movq -0xd8(%rbp), %rsi
movl -0xa0(%rbp), %edx
movq -0x98(%rbp), %rcx
callq 0x1f530
movq -0x18(%rbp), %rax
shrq %rax
movq %rax, -0x18(%rbp)
jmp 0x1d474
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| merkle_proof:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
lea rdi, [rbp+var_50]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call merkle_get_data
mov [rbp+var_60], eax
mov [rbp+var_58], rdx
cmp [rbp+var_60], 20h ; ' '
jz short loc_1D44E
mov [rbp+var_1], 0
jmp loc_1D724
loc_1D44E:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_58]
mov rdx, [rcx]
mov [rax], rdx
mov rdx, [rcx+8]
mov [rax+8], rdx
mov rdx, [rcx+10h]
mov [rax+10h], rdx
mov rcx, [rcx+18h]
mov [rax+18h], rcx
loc_1D474:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jbe loc_1D720
jmp short $+2
loc_1D484:
mov al, 0
call c4_get_log_level
cmp eax, 5
jb short loc_1D50B
lea rdi, [rbp+var_78]
xor esi, esi
mov edx, 18h
call _memset
mov rdx, [rbp+var_18]
mov [rbp+var_88], 20h ; ' '
mov rax, [rbp+var_28]
mov [rbp+var_80], rax
mov ecx, [rbp+var_88]
mov r8, [rbp+var_80]
lea rdi, [rbp+var_78]
lea rsi, aLX; "%l: %x"
mov al, 0
call bprintf
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov r9, [rbp+var_70]
lea rsi, aS0m32mSD0mS; "%s\x1B[0m\x1B[32m %s:%d\x1B[0m %s\n"
lea rdx, a33mdebug; "\x1B[33mDEBUG"
lea rcx, aMerkleProof; "merkle_proof"
mov r8d, 1E5h
mov al, 0
call _fprintf
lea rdi, [rbp+var_78]
call buffer_free
loc_1D50B:
jmp short $+2
loc_1D50D:
mov rax, [rbp+var_18]
and rax, 1
cmp rax, 0
jz short loc_1D52C
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_E8], rax
jmp short loc_1D53B
loc_1D52C:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_E8], rax
loc_1D53B:
mov rax, [rbp+var_E8]
mov [rbp+var_90], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_90]
call merkle_get_data
mov dword ptr [rbp+var_A0], eax
mov [rbp+var_98], rdx
cmp [rbp+var_98], 0
jnz loc_1D690
mov [rbp+var_A4], 0
loc_1D57E:
mov ecx, [rbp+var_A4]
mov rdx, [rbp+var_10]
xor eax, eax
cmp ecx, [rdx+38h]
mov [rbp+var_E9], al
jnb short loc_1D5A6
cmp [rbp+var_98], 0
setz al
mov [rbp+var_E9], al
loc_1D5A6:
mov al, [rbp+var_E9]
test al, 1
jnz short loc_1D5B5
jmp loc_1D67B
loc_1D5B5:
mov rax, [rbp+var_10]
mov rax, [rax+30h]
movsxd rcx, [rbp+var_A4]
mov rax, [rax+rcx*8]
mov [rbp+var_B0], rax
loc_1D5CF:
cmp [rbp+var_B0], 1
jbe loc_1D665
mov rax, [rbp+var_B0]
cmp rax, [rbp+var_90]
jnz short loc_1D64D
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rax, [rax+30h]
movsxd rcx, [rbp+var_A4]
mov rsi, [rax+rcx*8]
mov rdx, [rbp+var_90]
lea rcx, [rbp+var_50]
call merkle_proof
test al, 1
jnz short loc_1D61A
jmp short loc_1D64D
loc_1D61A:
mov dword ptr [rbp+var_C0], 20h ; ' '
lea rax, [rbp+var_50]
mov [rbp+var_B8], rax
mov rax, [rbp+var_C0]
mov [rbp+var_A0], rax
mov rax, [rbp+var_B8]
mov [rbp+var_98], rax
jmp short loc_1D665
loc_1D64D:
jmp short $+2
loc_1D64F:
mov rax, [rbp+var_B0]
shr rax, 1
mov [rbp+var_B0], rax
jmp loc_1D5CF
loc_1D665:
jmp short $+2
loc_1D667:
mov eax, [rbp+var_A4]
add eax, 1
mov [rbp+var_A4], eax
jmp loc_1D57E
loc_1D67B:
cmp [rbp+var_98], 0
jnz short loc_1D68E
mov [rbp+var_1], 0
jmp loc_1D724
loc_1D68E:
jmp short $+2
loc_1D690:
mov rax, [rbp+var_18]
and rax, 1
cmp rax, 0
jz short loc_1D6D8
mov [rbp+var_D0], 20h ; ' '
mov rax, [rbp+var_28]
mov [rbp+var_C8], rax
mov r8, [rbp+var_28]
mov edi, dword ptr [rbp+var_A0]
mov rsi, [rbp+var_98]
mov edx, [rbp+var_D0]
mov rcx, [rbp+var_C8]
call sha256_merkle
jmp short loc_1D710
loc_1D6D8:
mov [rbp+var_E0], 20h ; ' '
mov rax, [rbp+var_28]
mov [rbp+var_D8], rax
mov r8, [rbp+var_28]
mov edi, [rbp+var_E0]
mov rsi, [rbp+var_D8]
mov edx, dword ptr [rbp+var_A0]
mov rcx, [rbp+var_98]
call sha256_merkle
loc_1D710:
mov rax, [rbp+var_18]
shr rax, 1
mov [rbp+var_18], rax
jmp loc_1D474
loc_1D720:
mov [rbp+var_1], 1
loc_1D724:
mov al, [rbp+var_1]
and al, 1
add rsp, 0F0h
pop rbp
retn
| char merkle_proof(
long long a1,
unsigned long long a2,
unsigned long long a3,
_QWORD *a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
_QWORD *v12; // rdx
_QWORD *v13; // rax
_QWORD *v14; // rcx
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
_BYTE *v18; // rdx
char v20; // [rsp+0h] [rbp-F0h]
bool v21; // [rsp+7h] [rbp-E9h]
unsigned long long v22; // [rsp+8h] [rbp-E8h]
unsigned long long j; // [rsp+40h] [rbp-B0h]
unsigned int i; // [rsp+4Ch] [rbp-A4h]
unsigned int v25; // [rsp+50h] [rbp-A0h]
_BYTE *v26; // [rsp+58h] [rbp-98h]
unsigned int v27; // [rsp+78h] [rbp-78h] BYREF
const char *v28; // [rsp+80h] [rbp-70h]
int data; // [rsp+90h] [rbp-60h]
_QWORD *v30; // [rsp+98h] [rbp-58h]
_BYTE v31[40]; // [rsp+A0h] [rbp-50h] BYREF
_QWORD *v32; // [rsp+C8h] [rbp-28h]
unsigned long long v33; // [rsp+D0h] [rbp-20h]
unsigned long long v34; // [rsp+D8h] [rbp-18h]
long long v35; // [rsp+E0h] [rbp-10h]
v35 = a1;
v34 = a2;
v33 = a3;
v32 = a4;
memset(v31, 0LL, 32LL);
data = merkle_get_data(v35, v34);
v30 = v12;
if ( data != 32 )
return 0;
v13 = v32;
v14 = v30;
*v32 = *v30;
v13[1] = v14[1];
v13[2] = v14[2];
v13[3] = v14[3];
while ( v34 > v33 )
{
if ( (unsigned int)c4_get_log_level() >= 5 )
{
memset(&v27, 0LL, 24LL);
bprintf(&v27, (long long)"%l: %x", v34, 32LL, (long long)v32, v15, a5, a6, a7, a8, v16, v17, a11, a12, v20);
fprintf(stderr, "%s\x1B[0m\x1B[32m %s:%d\x1B[0m %s\n", "\x1B[33mDEBUG", "merkle_proof", 485, v28);
buffer_free((long long)&v27);
}
if ( (v34 & 1) != 0 )
v22 = v34 - 1;
else
v22 = v34 + 1;
v25 = merkle_get_data(v35, v22);
v26 = v18;
if ( !v18 )
{
for ( i = 0; ; ++i )
{
v21 = 0;
if ( i < *(_DWORD *)(v35 + 56) )
v21 = v26 == 0LL;
if ( !v21 )
break;
for ( j = *(_QWORD *)(*(_QWORD *)(v35 + 48) + 8LL * (int)i); j > 1; j >>= 1 )
{
if ( j == v22 && (merkle_proof(v35, *(_QWORD *)(*(_QWORD *)(v35 + 48) + 8LL * (int)i), v22, v31) & 1) != 0 )
{
v25 = 32;
v26 = v31;
break;
}
}
}
if ( !v26 )
return 0;
}
if ( (v34 & 1) != 0 )
sha256_merkle(v25, v26, 32LL, v32, v32);
else
sha256_merkle(32LL, v32, v25, v26, v32);
v34 >>= 1;
}
return 1;
}
| merkle_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
LEA RDI,[RBP + -0x50]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00105110
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0011e2a0
MOV dword ptr [RBP + -0x60],EAX
MOV qword ptr [RBP + -0x58],RDX
CMP dword ptr [RBP + -0x60],0x20
JZ 0x0011d44e
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0011d724
LAB_0011d44e:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RDX
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RAX + 0x18],RCX
LAB_0011d474:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0011d720
JMP 0x0011d484
LAB_0011d484:
MOV AL,0x0
CALL 0x001220e0
CMP EAX,0x5
JC 0x0011d50b
LEA RDI,[RBP + -0x78]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00105110
MOV RDX,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x88],0x20
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x80],RAX
MOV ECX,dword ptr [RBP + -0x88]
MOV R8,qword ptr [RBP + -0x80]
LEA RDI,[RBP + -0x78]
LEA RSI,[0x15442a]
MOV AL,0x0
CALL 0x00119740
MOV RAX,qword ptr [0x0016efe0]
MOV RDI,qword ptr [RAX]
MOV R9,qword ptr [RBP + -0x70]
LEA RSI,[0x152378]
LEA RDX,[0x154413]
LEA RCX,[0x154431]
MOV R8D,0x1e5
MOV AL,0x0
CALL 0x001050d0
LEA RDI,[RBP + -0x78]
CALL 0x00118d90
LAB_0011d50b:
JMP 0x0011d50d
LAB_0011d50d:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x1
CMP RAX,0x0
JZ 0x0011d52c
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [RBP + -0xe8],RAX
JMP 0x0011d53b
LAB_0011d52c:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0xe8],RAX
LAB_0011d53b:
MOV RAX,qword ptr [RBP + -0xe8]
MOV qword ptr [RBP + -0x90],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x90]
CALL 0x0011e2a0
MOV dword ptr [RBP + -0xa0],EAX
MOV qword ptr [RBP + -0x98],RDX
CMP qword ptr [RBP + -0x98],0x0
JNZ 0x0011d690
MOV dword ptr [RBP + -0xa4],0x0
LAB_0011d57e:
MOV ECX,dword ptr [RBP + -0xa4]
MOV RDX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP ECX,dword ptr [RDX + 0x38]
MOV byte ptr [RBP + -0xe9],AL
JNC 0x0011d5a6
CMP qword ptr [RBP + -0x98],0x0
SETZ AL
MOV byte ptr [RBP + -0xe9],AL
LAB_0011d5a6:
MOV AL,byte ptr [RBP + -0xe9]
TEST AL,0x1
JNZ 0x0011d5b5
JMP 0x0011d67b
LAB_0011d5b5:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x30]
MOVSXD RCX,dword ptr [RBP + -0xa4]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0xb0],RAX
LAB_0011d5cf:
CMP qword ptr [RBP + -0xb0],0x1
JBE 0x0011d665
MOV RAX,qword ptr [RBP + -0xb0]
CMP RAX,qword ptr [RBP + -0x90]
JNZ 0x0011d64d
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x30]
MOVSXD RCX,dword ptr [RBP + -0xa4]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV RDX,qword ptr [RBP + -0x90]
LEA RCX,[RBP + -0x50]
CALL 0x0011d400
TEST AL,0x1
JNZ 0x0011d61a
JMP 0x0011d64d
LAB_0011d61a:
MOV dword ptr [RBP + -0xc0],0x20
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xc0]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0011d665
LAB_0011d64d:
JMP 0x0011d64f
LAB_0011d64f:
MOV RAX,qword ptr [RBP + -0xb0]
SHR RAX,0x1
MOV qword ptr [RBP + -0xb0],RAX
JMP 0x0011d5cf
LAB_0011d665:
JMP 0x0011d667
LAB_0011d667:
MOV EAX,dword ptr [RBP + -0xa4]
ADD EAX,0x1
MOV dword ptr [RBP + -0xa4],EAX
JMP 0x0011d57e
LAB_0011d67b:
CMP qword ptr [RBP + -0x98],0x0
JNZ 0x0011d68e
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0011d724
LAB_0011d68e:
JMP 0x0011d690
LAB_0011d690:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x1
CMP RAX,0x0
JZ 0x0011d6d8
MOV dword ptr [RBP + -0xd0],0x20
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xc8],RAX
MOV R8,qword ptr [RBP + -0x28]
MOV EDI,dword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x98]
MOV EDX,dword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0xc8]
CALL 0x0011f530
JMP 0x0011d710
LAB_0011d6d8:
MOV dword ptr [RBP + -0xe0],0x20
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xd8],RAX
MOV R8,qword ptr [RBP + -0x28]
MOV EDI,dword ptr [RBP + -0xe0]
MOV RSI,qword ptr [RBP + -0xd8]
MOV EDX,dword ptr [RBP + -0xa0]
MOV RCX,qword ptr [RBP + -0x98]
CALL 0x0011f530
LAB_0011d710:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0011d474
LAB_0011d720:
MOV byte ptr [RBP + -0x1],0x1
LAB_0011d724:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0xf0
POP RBP
RET
|
int1 merkle_proof(long param_1,ulong param_2,ulong param_3,int8 *param_4)
{
uint uVar1;
int4 uVar2;
ulong uVar3;
int1 *extraout_RDX;
int1 auVar4 [16];
ulong local_f0;
ulong local_b8;
uint local_ac;
int1 *local_a0;
int1 local_80 [8];
int8 local_78;
int4 local_68;
int8 *local_60;
int1 local_58 [40];
int8 *local_30;
ulong local_28;
ulong local_20;
long local_18;
int1 local_9;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
memset(local_58,0,0x20);
auVar4 = merkle_get_data(local_18);
local_60 = auVar4._8_8_;
if (auVar4._0_4_ == 0x20) {
*local_30 = *local_60;
local_30[1] = local_60[1];
local_30[2] = local_60[2];
local_30[3] = local_60[3];
local_68 = 0x20;
for (; local_28 < local_20; local_20 = local_20 >> 1) {
uVar1 = c4_get_log_level();
if (4 < uVar1) {
memset(local_80,0,0x18);
bprintf(local_80,&DAT_0015442a,local_20,0x20,local_30);
fprintf(*(FILE **)PTR_stderr_0016efe0,"%s\x1b[0m\x1b[32m %s:%d\x1b[0m %s\n",&DAT_00154413,
"merkle_proof",0x1e5,local_78);
buffer_free(local_80);
}
if ((local_20 & 1) == 0) {
local_f0 = local_20 + 1;
}
else {
local_f0 = local_20 - 1;
}
uVar2 = merkle_get_data(local_18,local_f0);
local_a0 = extraout_RDX;
if (extraout_RDX == (int1 *)0x0) {
for (local_ac = 0; local_ac < *(uint *)(local_18 + 0x38) && local_a0 == (int1 *)0x0;
local_ac = local_ac + 1) {
for (local_b8 = *(ulong *)(*(long *)(local_18 + 0x30) + (long)(int)local_ac * 8);
1 < local_b8; local_b8 = local_b8 >> 1) {
if ((local_b8 == local_f0) &&
(uVar3 = merkle_proof(local_18,*(int8 *)
(*(long *)(local_18 + 0x30) + (long)(int)local_ac * 8
),local_f0,local_58), (uVar3 & 1) != 0)) {
local_a0 = local_58;
uVar2 = 0x20;
break;
}
}
}
if (local_a0 == (int1 *)0x0) {
return 0;
}
}
if ((local_20 & 1) == 0) {
sha256_merkle(0x20,local_30,uVar2,local_a0,local_30);
}
else {
sha256_merkle(uVar2,local_a0,0x20,local_30,local_30);
}
}
local_9 = 1;
}
else {
local_9 = 0;
}
return local_9;
}
| |
40,226 | merkle_proof | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static bool merkle_proof(merkle_proof_data_t* proof, gindex_t start, gindex_t end, bytes32_t out) {
bytes32_t tmp = {0};
bytes_t start_data = merkle_get_data(proof, start);
if (start_data.len != 32) return false;
memcpy(out, start_data.data, 32);
while (start > end) {
log_debug_full("%l: %x", start, bytes(out, 32));
/*
fprintf(stderr, "s: %llu ", start);
print_hex(stderr, bytes(out, 32), " : ", "\n");
*/
gindex_t witness = start & 1 ? start - 1 : start + 1;
bytes_t witness_data = merkle_get_data(proof, witness);
if (witness_data.data == NULL) {
// how do we find the start for calculating this witness?
for (int i = 0; i < proof->leafes_len && witness_data.data == NULL; i++) {
gindex_t path = proof->leafes_gindex[i];
for (; path > 1; path >>= 1) {
if (path == witness && merkle_proof(proof, proof->leafes_gindex[i], witness, tmp)) {
witness_data = bytes(tmp, 32);
break;
}
}
}
if (witness_data.data == NULL) return false;
}
if (start & 1)
sha256_merkle(witness_data, bytes(out, 32), out);
else
sha256_merkle(bytes(out, 32), witness_data, out);
start >>= 1;
}
return true;
} | O1 | c | merkle_proof:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
callq 0x15fd2
cmpl $0x20, %eax
jne 0x159a3
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
leaq 0x20(%rsp), %r13
movq %r14, 0x18(%rsp)
movq %rbp, 0x10(%rsp)
cmpq %rbp, %rbx
setbe %al
movl %eax, 0x8(%rsp)
jbe 0x159ab
xorl %eax, %eax
callq 0x1869f
cmpl $0x5, %eax
jae 0x15989
movl %ebx, %r15d
andl $0x1, %r15d
negq %r15
orq $0x1, %r15
addq %rbx, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x15fd2
testq %rdx, %rdx
je 0x158c8
movq %rdx, %rcx
jmp 0x15954
cmpl $0x0, 0x38(%r12)
movl %eax, 0xc(%rsp)
je 0x1593a
xorl %ebp, %ebp
movq 0x30(%r12), %rax
movq (%rax,%rbp,8), %r14
cmpq $0x2, %r14
jb 0x15914
cmpq %r15, %r14
jne 0x15905
movq 0x30(%r12), %rax
movq (%rax,%rbp,8), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x1582b
testb %al, %al
jne 0x1592d
movq %r14, %rax
shrq %rax
cmpq $0x3, %r14
movq %rax, %r14
ja 0x158e5
xorl %ecx, %ecx
testq %rcx, %rcx
sete %al
jne 0x1593e
incq %rbp
movl 0x38(%r12), %edx
cmpq %rdx, %rbp
jb 0x158d6
jmp 0x1593e
movl $0x20, 0xc(%rsp)
movq %r13, %rcx
jmp 0x15916
movb $0x1, %al
xorl %ecx, %ecx
testb %al, %al
movq 0x18(%rsp), %r14
movq 0x10(%rsp), %rbp
movl 0xc(%rsp), %eax
je 0x15954
xorl %eax, %eax
jmp 0x1597f
testb $0x1, %bl
jne 0x15965
movl $0x20, %edi
movq %r14, %rsi
movl %eax, %edx
jmp 0x15972
movl %eax, %edi
movq %rcx, %rsi
movl $0x20, %edx
movq %r14, %rcx
movq %r14, %r8
callq 0x16af0
shrq %rbx
movb $0x1, %al
testb %al, %al
jne 0x1587f
jmp 0x159ab
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
leaq 0x48(%rsp), %rcx
callq 0x55b1
jmp 0x1589f
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| merkle_proof:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rcx
mov rbp, rdx
mov rbx, rsi
mov r12, rdi
xorps xmm0, xmm0
movaps [rsp+88h+var_58], xmm0
movaps [rsp+88h+var_68], xmm0
call merkle_get_data
cmp eax, 20h ; ' '
jnz loc_159A3
movups xmm0, xmmword ptr [rdx]
movups xmm1, xmmword ptr [rdx+10h]
movups xmmword ptr [r14+10h], xmm1
movups xmmword ptr [r14], xmm0
lea r13, [rsp+88h+var_68]
mov [rsp+88h+var_70], r14
mov [rsp+88h+var_78], rbp
loc_1587F:
cmp rbx, rbp
setbe al
mov [rsp+88h+var_80], eax
jbe loc_159AB
xor eax, eax
call c4_get_log_level
cmp eax, 5
jnb loc_15989
loc_1589F:
mov r15d, ebx
and r15d, 1
neg r15
or r15, 1
add r15, rbx
mov rdi, r12
mov rsi, r15
call merkle_get_data
test rdx, rdx
jz short loc_158C8
mov rcx, rdx
jmp loc_15954
loc_158C8:
cmp dword ptr [r12+38h], 0
mov [rsp+88h+var_7C], eax
jz short loc_1593A
xor ebp, ebp
loc_158D6:
mov rax, [r12+30h]
mov r14, [rax+rbp*8]
cmp r14, 2
jb short loc_15914
loc_158E5:
cmp r14, r15
jnz short loc_15905
mov rax, [r12+30h]
mov rsi, [rax+rbp*8]
mov rdi, r12
mov rdx, r15
mov rcx, r13
call merkle_proof
test al, al
jnz short loc_1592D
loc_15905:
mov rax, r14
shr rax, 1
cmp r14, 3
mov r14, rax
ja short loc_158E5
loc_15914:
xor ecx, ecx
loc_15916:
test rcx, rcx
setz al
jnz short loc_1593E
inc rbp
mov edx, [r12+38h]
cmp rbp, rdx
jb short loc_158D6
jmp short loc_1593E
loc_1592D:
mov [rsp+88h+var_7C], 20h ; ' '
mov rcx, r13
jmp short loc_15916
loc_1593A:
mov al, 1
xor ecx, ecx
loc_1593E:
test al, al
mov r14, [rsp+88h+var_70]
mov rbp, [rsp+88h+var_78]
mov eax, [rsp+88h+var_7C]
jz short loc_15954
xor eax, eax
jmp short loc_1597F
loc_15954:
test bl, 1
jnz short loc_15965
mov edi, 20h ; ' '
mov rsi, r14
mov edx, eax
jmp short loc_15972
loc_15965:
mov edi, eax
mov rsi, rcx
mov edx, 20h ; ' '
mov rcx, r14
loc_15972:
mov r8, r14
call sha256_merkle
shr rbx, 1
mov al, 1
loc_1597F:
test al, al
jnz loc_1587F
jmp short loc_159AB
loc_15989:
lea rdi, [rsp+88h+var_48]
mov rsi, rbx
mov rdx, r14
lea rcx, [rsp+88h+var_40]
call merkle_proof_cold_1
jmp loc_1589F
loc_159A3:
mov [rsp+88h+var_80], 0
loc_159AB:
mov eax, [rsp+88h+var_80]
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long merkle_proof(long long a1, unsigned long long a2, unsigned long long a3, _OWORD *a4)
{
long long v8; // rax
__int128 *v9; // rdx
__int128 v10; // xmm0
long long v11; // r8
int v12; // r9d
unsigned long long v13; // r15
unsigned int data; // eax
_OWORD *v15; // rdx
_OWORD *v16; // rcx
unsigned long long v17; // rbp
unsigned long long v18; // r14
bool v19; // cc
bool v20; // al
bool v21; // zf
long long v22; // rdi
_OWORD *v23; // rsi
long long v24; // rdx
unsigned int v26; // [rsp+8h] [rbp-80h]
int v27; // [rsp+Ch] [rbp-7Ch]
unsigned long long v28; // [rsp+10h] [rbp-78h]
_OWORD *v29; // [rsp+18h] [rbp-70h]
_OWORD v30[2]; // [rsp+20h] [rbp-68h] BYREF
_BYTE v31[8]; // [rsp+40h] [rbp-48h] BYREF
const char *v32; // [rsp+48h] [rbp-40h] BYREF
memset(v30, 0, sizeof(v30));
LODWORD(v8) = ((long long (*)(void))merkle_get_data)();
if ( (_DWORD)v8 == 32 )
{
v10 = *v9;
a4[1] = v9[1];
*a4 = v10;
v29 = a4;
v28 = a3;
while ( 1 )
{
LOBYTE(v8) = a2 <= a3;
v26 = v8;
if ( a2 <= a3 )
return v26;
if ( (unsigned int)c4_get_log_level() >= 5 )
merkle_proof_cold_1((long long)v31, a2, (int)a4, &v32, v11, v12);
v13 = a2 + (-(long long)(a2 & 1) | 1);
data = merkle_get_data(a1, v13);
if ( v15 )
break;
v27 = data;
if ( *(_DWORD *)(a1 + 56) )
{
v17 = 0LL;
do
{
v18 = *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8 * v17);
if ( v18 < 2 )
{
LABEL_14:
v16 = 0LL;
}
else
{
while ( v18 != v13
|| !(unsigned __int8)merkle_proof(a1, *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8 * v17), v13, v30) )
{
v19 = v18 <= 3;
v18 >>= 1;
if ( v19 )
goto LABEL_14;
}
v27 = 32;
v16 = v30;
}
v20 = v16 == 0LL;
if ( v16 )
break;
++v17;
}
while ( v17 < *(unsigned int *)(a1 + 56) );
}
else
{
v20 = 1;
v16 = 0LL;
}
v21 = !v20;
a4 = v29;
a3 = v28;
data = v27;
if ( v21 )
goto LABEL_22;
LODWORD(v8) = 0;
LABEL_26:
if ( !(_BYTE)v8 )
return v26;
}
v16 = v15;
LABEL_22:
if ( (a2 & 1) != 0 )
{
v22 = data;
v23 = v16;
v24 = 32LL;
v16 = a4;
}
else
{
v22 = 32LL;
v23 = a4;
v24 = data;
}
v8 = sha256_merkle(v22, v23, v24, v16, a4);
a2 >>= 1;
LOBYTE(v8) = 1;
goto LABEL_26;
}
return 0;
}
| merkle_proof:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RCX
MOV RBP,RDX
MOV RBX,RSI
MOV R12,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CALL 0x00115fd2
CMP EAX,0x20
JNZ 0x001159a3
MOVUPS XMM0,xmmword ptr [RDX]
MOVUPS XMM1,xmmword ptr [RDX + 0x10]
MOVUPS xmmword ptr [R14 + 0x10],XMM1
MOVUPS xmmword ptr [R14],XMM0
LEA R13,[RSP + 0x20]
MOV qword ptr [RSP + 0x18],R14
MOV qword ptr [RSP + 0x10],RBP
LAB_0011587f:
CMP RBX,RBP
SETBE AL
MOV dword ptr [RSP + 0x8],EAX
JBE 0x001159ab
XOR EAX,EAX
CALL 0x0011869f
CMP EAX,0x5
JNC 0x00115989
LAB_0011589f:
MOV R15D,EBX
AND R15D,0x1
NEG R15
OR R15,0x1
ADD R15,RBX
MOV RDI,R12
MOV RSI,R15
CALL 0x00115fd2
TEST RDX,RDX
JZ 0x001158c8
MOV RCX,RDX
JMP 0x00115954
LAB_001158c8:
CMP dword ptr [R12 + 0x38],0x0
MOV dword ptr [RSP + 0xc],EAX
JZ 0x0011593a
XOR EBP,EBP
LAB_001158d6:
MOV RAX,qword ptr [R12 + 0x30]
MOV R14,qword ptr [RAX + RBP*0x8]
CMP R14,0x2
JC 0x00115914
LAB_001158e5:
CMP R14,R15
JNZ 0x00115905
MOV RAX,qword ptr [R12 + 0x30]
MOV RSI,qword ptr [RAX + RBP*0x8]
MOV RDI,R12
MOV RDX,R15
MOV RCX,R13
CALL 0x0011582b
TEST AL,AL
JNZ 0x0011592d
LAB_00115905:
MOV RAX,R14
SHR RAX,0x1
CMP R14,0x3
MOV R14,RAX
JA 0x001158e5
LAB_00115914:
XOR ECX,ECX
LAB_00115916:
TEST RCX,RCX
SETZ AL
JNZ 0x0011593e
INC RBP
MOV EDX,dword ptr [R12 + 0x38]
CMP RBP,RDX
JC 0x001158d6
JMP 0x0011593e
LAB_0011592d:
MOV dword ptr [RSP + 0xc],0x20
MOV RCX,R13
JMP 0x00115916
LAB_0011593a:
MOV AL,0x1
XOR ECX,ECX
LAB_0011593e:
TEST AL,AL
MOV R14,qword ptr [RSP + 0x18]
MOV RBP,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0xc]
JZ 0x00115954
XOR EAX,EAX
JMP 0x0011597f
LAB_00115954:
TEST BL,0x1
JNZ 0x00115965
MOV EDI,0x20
MOV RSI,R14
MOV EDX,EAX
JMP 0x00115972
LAB_00115965:
MOV EDI,EAX
MOV RSI,RCX
MOV EDX,0x20
MOV RCX,R14
LAB_00115972:
MOV R8,R14
CALL 0x00116af0
SHR RBX,0x1
MOV AL,0x1
LAB_0011597f:
TEST AL,AL
JNZ 0x0011587f
JMP 0x001159ab
LAB_00115989:
LEA RDI,[RSP + 0x40]
MOV RSI,RBX
MOV RDX,R14
LEA RCX,[RSP + 0x48]
CALL 0x001055b1
JMP 0x0011589f
LAB_001159a3:
MOV dword ptr [RSP + 0x8],0x0
LAB_001159ab:
MOV EAX,dword ptr [RSP + 0x8]
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 merkle_proof(long param_1,ulong param_2,ulong param_3,int4 *param_4)
{
int4 uVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int8 uVar5;
char cVar6;
uint uVar7;
int8 uVar8;
int8 *puVar9;
int4 *puVar10;
int4 *puVar11;
ulong uVar12;
ulong uVar13;
ulong uVar14;
bool bVar15;
int1 auVar16 [16];
int4 local_80;
uint local_7c;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int1 local_48 [24];
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
auVar16 = merkle_get_data();
puVar10 = auVar16._8_8_;
uVar8 = auVar16._0_8_;
if (auVar16._0_4_ == 0x20) {
uVar1 = *puVar10;
uVar2 = puVar10[1];
uVar3 = puVar10[2];
uVar4 = puVar10[3];
uVar5 = *(int8 *)(puVar10 + 6);
*(int8 *)(param_4 + 4) = *(int8 *)(puVar10 + 4);
*(int8 *)(param_4 + 6) = uVar5;
*param_4 = uVar1;
param_4[1] = uVar2;
param_4[2] = uVar3;
param_4[3] = uVar4;
do {
local_80 = (int4)CONCAT71((int7)((ulong)uVar8 >> 8),param_2 <= param_3);
if (param_2 <= param_3) {
return local_80;
}
uVar7 = c4_get_log_level();
if (4 < uVar7) {
merkle_proof_cold_1(local_48,param_2,param_4);
}
uVar14 = (-(ulong)((uint)param_2 & 1) | 1) + param_2;
auVar16 = merkle_get_data(param_1,uVar14);
if (auVar16._8_8_ == 0) {
local_7c = auVar16._0_4_;
if (*(int *)(param_1 + 0x38) == 0) {
bVar15 = true;
puVar9 = (int8 *)0x0;
}
else {
uVar12 = 0;
do {
uVar13 = *(ulong *)(*(long *)(param_1 + 0x30) + uVar12 * 8);
if (1 < uVar13) {
do {
if ((uVar13 == uVar14) &&
(cVar6 = merkle_proof(param_1,*(int8 *)
(*(long *)(param_1 + 0x30) + uVar12 * 8),uVar14),
cVar6 != '\0')) {
local_7c = 0x20;
puVar9 = &local_68;
goto LAB_00115916;
}
bVar15 = 3 < uVar13;
uVar13 = uVar13 >> 1;
} while (bVar15);
}
puVar9 = (int8 *)0x0;
LAB_00115916:
bVar15 = puVar9 == (int8 *)0x0;
} while ((bVar15) && (uVar12 = uVar12 + 1, uVar12 < *(uint *)(param_1 + 0x38)));
}
auVar16._4_4_ = 0;
auVar16._0_4_ = local_7c;
auVar16._8_8_ = puVar9;
if (!bVar15) goto LAB_00115954;
uVar8 = 0;
}
else {
LAB_00115954:
puVar10 = auVar16._8_8_;
if ((param_2 & 1) == 0) {
uVar12 = 0x20;
uVar14 = auVar16._0_8_ & 0xffffffff;
puVar11 = puVar10;
puVar10 = param_4;
}
else {
uVar12 = auVar16._0_8_ & 0xffffffff;
uVar14 = 0x20;
puVar11 = param_4;
}
uVar8 = sha256_merkle(uVar12,puVar10,uVar14,puVar11,param_4);
param_2 = param_2 >> 1;
uVar8 = CONCAT71((int7)((ulong)uVar8 >> 8),1);
}
} while ((char)uVar8 != '\0');
}
else {
local_80 = 0;
}
return local_80;
}
| |
40,227 | merkle_proof | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static bool merkle_proof(merkle_proof_data_t* proof, gindex_t start, gindex_t end, bytes32_t out) {
bytes32_t tmp = {0};
bytes_t start_data = merkle_get_data(proof, start);
if (start_data.len != 32) return false;
memcpy(out, start_data.data, 32);
while (start > end) {
log_debug_full("%l: %x", start, bytes(out, 32));
/*
fprintf(stderr, "s: %llu ", start);
print_hex(stderr, bytes(out, 32), " : ", "\n");
*/
gindex_t witness = start & 1 ? start - 1 : start + 1;
bytes_t witness_data = merkle_get_data(proof, witness);
if (witness_data.data == NULL) {
// how do we find the start for calculating this witness?
for (int i = 0; i < proof->leafes_len && witness_data.data == NULL; i++) {
gindex_t path = proof->leafes_gindex[i];
for (; path > 1; path >>= 1) {
if (path == witness && merkle_proof(proof, proof->leafes_gindex[i], witness, tmp)) {
witness_data = bytes(tmp, 32);
break;
}
}
}
if (witness_data.data == NULL) return false;
}
if (start & 1)
sha256_merkle(witness_data, bytes(out, 32), out);
else
sha256_merkle(bytes(out, 32), witness_data, out);
start >>= 1;
}
return true;
} | O2 | c | merkle_proof:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
callq 0x14ae5
cmpl $0x20, %eax
jne 0x144bb
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
leaq 0x40(%rsp), %rbp
movq %rbx, 0x10(%rsp)
movq %r14, 0x8(%rsp)
cmpq %r14, %r15
setbe %al
jbe 0x144c5
movl %eax, 0x4(%rsp)
xorl %eax, %eax
callq 0x16e0f
cmpl $0x5, %eax
jae 0x14450
movq %r15, %rax
andl $0x1, %r15d
negq %r15
orq $0x1, %r15
movq %rax, 0x18(%rsp)
addq %rax, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x14ae5
movl %eax, %r13d
testq %rdx, %rdx
je 0x143b3
movq %rdx, %rcx
jmp 0x1441e
xorl %r14d, %r14d
xorl %ecx, %ecx
testq %rcx, %rcx
jne 0x1440b
movl 0x38(%r12), %eax
cmpq %rax, %r14
jae 0x1440b
movq 0x30(%r12), %rax
movq (%rax,%r14,8), %rbx
cmpq $0x2, %rbx
jb 0x143fb
cmpq %r15, %rbx
jne 0x143f6
movq 0x30(%r12), %rax
movq (%rax,%r14,8), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %rbp, %rcx
callq 0x14313
testb %al, %al
jne 0x143ff
shrq %rbx
jmp 0x143d0
xorl %ecx, %ecx
jmp 0x14406
pushq $0x20
popq %r13
movq %rbp, %rcx
incq %r14
jmp 0x143b8
testq %rcx, %rcx
movq 0x10(%rsp), %rbx
movq 0x8(%rsp), %r14
je 0x144cb
movq 0x18(%rsp), %r15
testb $0x1, %r15b
jne 0x14434
pushq $0x20
popq %rdi
movq %rbx, %rsi
movl %r13d, %edx
jmp 0x14440
movl %r13d, %edi
movq %rcx, %rsi
pushq $0x20
popq %rdx
movq %rbx, %rcx
movq %rbx, %r8
callq 0x15594
shrq %r15
jmp 0x14365
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0x20(%rsp), %r13
movq %r13, %rdi
leaq 0x25efd(%rip), %rsi # 0x3a36a
movq %r15, %rdx
pushq $0x20
popq %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1209b
movq 0x42b5c(%rip), %rax # 0x56fe0
movq (%rax), %rdi
movq 0x28(%rsp), %r9
leaq 0x23efe(%rip), %rsi # 0x38391
leaq 0x25eb9(%rip), %rdx # 0x3a353
leaq 0x25ed0(%rip), %rcx # 0x3a371
movl $0x1e5, %r8d # imm = 0x1E5
xorl %eax, %eax
callq 0x50d0
movq %r13, %rdi
callq 0x11ad1
jmp 0x14385
movl $0x0, 0x4(%rsp)
jmp 0x144cb
movb $0x1, %al
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| merkle_proof:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
xorps xmm0, xmm0
movaps [rsp+98h+var_48], xmm0
movaps [rsp+98h+var_58], xmm0
call merkle_get_data
cmp eax, 20h ; ' '
jnz loc_144BB
movups xmm0, xmmword ptr [rdx]
movups xmm1, xmmword ptr [rdx+10h]
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
lea rbp, [rsp+98h+var_58]
mov [rsp+98h+var_88], rbx
mov [rsp+98h+var_90], r14
loc_14365:
cmp r15, r14
setbe al
jbe loc_144C5
mov [rsp+98h+var_94], eax
xor eax, eax
call c4_get_log_level
cmp eax, 5
jnb loc_14450
loc_14385:
mov rax, r15
and r15d, 1
neg r15
or r15, 1
mov [rsp+98h+var_80], rax
add r15, rax
mov rdi, r12
mov rsi, r15
call merkle_get_data
mov r13d, eax
test rdx, rdx
jz short loc_143B3
mov rcx, rdx
jmp short loc_1441E
loc_143B3:
xor r14d, r14d
xor ecx, ecx
loc_143B8:
test rcx, rcx
jnz short loc_1440B
mov eax, [r12+38h]
cmp r14, rax
jnb short loc_1440B
mov rax, [r12+30h]
mov rbx, [rax+r14*8]
loc_143D0:
cmp rbx, 2
jb short loc_143FB
cmp rbx, r15
jnz short loc_143F6
mov rax, [r12+30h]
mov rsi, [rax+r14*8]
mov rdi, r12
mov rdx, r15
mov rcx, rbp
call merkle_proof
test al, al
jnz short loc_143FF
loc_143F6:
shr rbx, 1
jmp short loc_143D0
loc_143FB:
xor ecx, ecx
jmp short loc_14406
loc_143FF:
push 20h ; ' '
pop r13
mov rcx, rbp
loc_14406:
inc r14
jmp short loc_143B8
loc_1440B:
test rcx, rcx
mov rbx, [rsp+98h+var_88]
mov r14, [rsp+98h+var_90]
jz loc_144CB
loc_1441E:
mov r15, [rsp+98h+var_80]
test r15b, 1
jnz short loc_14434
push 20h ; ' '
pop rdi
mov rsi, rbx
mov edx, r13d
jmp short loc_14440
loc_14434:
mov edi, r13d
mov rsi, rcx
push 20h ; ' '
pop rdx
mov rcx, rbx
loc_14440:
mov r8, rbx
call sha256_merkle
shr r15, 1
jmp loc_14365
loc_14450:
xorps xmm0, xmm0
movaps [rsp+98h+var_78], xmm0
and [rsp+98h+var_68], 0
lea r13, [rsp+98h+var_78]
mov rdi, r13
lea rsi, aLX; "%l: %x"
mov rdx, r15
push 20h ; ' '
pop rcx
mov r8, rbx
xor eax, eax
call bprintf
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov r9, qword ptr [rsp+98h+var_78+8]
lea rsi, aS0m32mSD0mS; "%s\x1B[0m\x1B[32m %s:%d\x1B[0m %s\n"
lea rdx, a33mdebug; "\x1B[33mDEBUG"
lea rcx, aMerkleProof; "merkle_proof"
mov r8d, 1E5h
xor eax, eax
call _fprintf
mov rdi, r13
call buffer_free
jmp loc_14385
loc_144BB:
mov [rsp+98h+var_94], 0
jmp short loc_144CB
loc_144C5:
mov al, 1
mov [rsp+98h+var_94], eax
loc_144CB:
mov eax, [rsp+98h+var_94]
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long merkle_proof(long long a1, _OWORD *a2, unsigned long long a3, _OWORD *a4)
{
unsigned long long v6; // r15
long long v7; // r12
long long v8; // rax
__int128 *v9; // rdx
long long v10; // rcx
__int128 v11; // xmm0
long long v12; // r9
unsigned long long v13; // r15
_OWORD *v14; // rdx
unsigned int data; // r13d
_OWORD *v16; // rcx
unsigned long long v17; // r14
unsigned long long i; // rbx
long long v19; // rdx
unsigned int v21; // [rsp+4h] [rbp-94h]
unsigned long long v22; // [rsp+8h] [rbp-90h]
_OWORD *v23; // [rsp+10h] [rbp-88h]
unsigned long long v24; // [rsp+18h] [rbp-80h]
__int128 v25; // [rsp+20h] [rbp-78h] BYREF
long long v26; // [rsp+30h] [rbp-68h]
_OWORD v27[5]; // [rsp+40h] [rbp-58h] BYREF
v6 = (unsigned long long)a2;
v7 = a1;
memset(v27, 0, 32);
LODWORD(v8) = ((long long (*)(void))merkle_get_data)();
if ( (_DWORD)v8 == 32 )
{
v11 = *v9;
a4[1] = v9[1];
*a4 = v11;
v23 = a4;
v22 = a3;
while ( v6 > a3 )
{
LOBYTE(v8) = 0;
v21 = v8;
if ( (unsigned int)c4_get_log_level(a1, a2, v9, v10) >= 5 )
{
v25 = 0LL;
v26 = 0LL;
bprintf((unsigned int *)&v25, "%l: %x", v6, 32LL, (long long)a4, v12);
fprintf(
stderr,
"%s\x1B[0m\x1B[32m %s:%d\x1B[0m %s\n",
"\x1B[33mDEBUG",
"merkle_proof",
485,
*((const char **)&v25 + 1));
buffer_free((long long)&v25);
}
v24 = v6;
v13 = v6 + (-(long long)(v6 & 1) | 1);
data = merkle_get_data(v7, v13);
if ( v14 )
{
v16 = v14;
}
else
{
v17 = 0LL;
v16 = 0LL;
while ( !v16 && v17 < *(unsigned int *)(v7 + 56) )
{
for ( i = *(_QWORD *)(*(_QWORD *)(v7 + 48) + 8 * v17); ; i >>= 1 )
{
if ( i < 2 )
{
v16 = 0LL;
goto LABEL_18;
}
if ( i == v13 && (unsigned __int8)merkle_proof(v7, *(_QWORD *)(*(_QWORD *)(v7 + 48) + 8 * v17), v13, v27) )
break;
}
data = 32;
v16 = v27;
LABEL_18:
++v17;
}
a4 = v23;
a3 = v22;
if ( !v16 )
return v21;
}
if ( (v24 & 1) != 0 )
{
a1 = data;
a2 = v16;
v19 = 32LL;
v16 = a4;
}
else
{
a1 = 32LL;
a2 = a4;
v19 = data;
}
v8 = sha256_merkle(a1, a2, v19, v16, a4);
v6 = v24 >> 1;
}
LOBYTE(v8) = 1;
return (unsigned int)v8;
}
else
{
return 0;
}
}
| merkle_proof:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
CALL 0x00114ae5
CMP EAX,0x20
JNZ 0x001144bb
MOVUPS XMM0,xmmword ptr [RDX]
MOVUPS XMM1,xmmword ptr [RDX + 0x10]
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
LEA RBP,[RSP + 0x40]
MOV qword ptr [RSP + 0x10],RBX
MOV qword ptr [RSP + 0x8],R14
LAB_00114365:
CMP R15,R14
SETBE AL
JBE 0x001144c5
MOV dword ptr [RSP + 0x4],EAX
XOR EAX,EAX
CALL 0x00116e0f
CMP EAX,0x5
JNC 0x00114450
LAB_00114385:
MOV RAX,R15
AND R15D,0x1
NEG R15
OR R15,0x1
MOV qword ptr [RSP + 0x18],RAX
ADD R15,RAX
MOV RDI,R12
MOV RSI,R15
CALL 0x00114ae5
MOV R13D,EAX
TEST RDX,RDX
JZ 0x001143b3
MOV RCX,RDX
JMP 0x0011441e
LAB_001143b3:
XOR R14D,R14D
XOR ECX,ECX
LAB_001143b8:
TEST RCX,RCX
JNZ 0x0011440b
MOV EAX,dword ptr [R12 + 0x38]
CMP R14,RAX
JNC 0x0011440b
MOV RAX,qword ptr [R12 + 0x30]
MOV RBX,qword ptr [RAX + R14*0x8]
LAB_001143d0:
CMP RBX,0x2
JC 0x001143fb
CMP RBX,R15
JNZ 0x001143f6
MOV RAX,qword ptr [R12 + 0x30]
MOV RSI,qword ptr [RAX + R14*0x8]
MOV RDI,R12
MOV RDX,R15
MOV RCX,RBP
CALL 0x00114313
TEST AL,AL
JNZ 0x001143ff
LAB_001143f6:
SHR RBX,0x1
JMP 0x001143d0
LAB_001143fb:
XOR ECX,ECX
JMP 0x00114406
LAB_001143ff:
PUSH 0x20
POP R13
MOV RCX,RBP
LAB_00114406:
INC R14
JMP 0x001143b8
LAB_0011440b:
TEST RCX,RCX
MOV RBX,qword ptr [RSP + 0x10]
MOV R14,qword ptr [RSP + 0x8]
JZ 0x001144cb
LAB_0011441e:
MOV R15,qword ptr [RSP + 0x18]
TEST R15B,0x1
JNZ 0x00114434
PUSH 0x20
POP RDI
MOV RSI,RBX
MOV EDX,R13D
JMP 0x00114440
LAB_00114434:
MOV EDI,R13D
MOV RSI,RCX
PUSH 0x20
POP RDX
MOV RCX,RBX
LAB_00114440:
MOV R8,RBX
CALL 0x00115594
SHR R15,0x1
JMP 0x00114365
LAB_00114450:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
AND qword ptr [RSP + 0x30],0x0
LEA R13,[RSP + 0x20]
MOV RDI,R13
LEA RSI,[0x13a36a]
MOV RDX,R15
PUSH 0x20
POP RCX
MOV R8,RBX
XOR EAX,EAX
CALL 0x0011209b
MOV RAX,qword ptr [0x00156fe0]
MOV RDI,qword ptr [RAX]
MOV R9,qword ptr [RSP + 0x28]
LEA RSI,[0x138391]
LEA RDX,[0x13a353]
LEA RCX,[0x13a371]
MOV R8D,0x1e5
XOR EAX,EAX
CALL 0x001050d0
MOV RDI,R13
CALL 0x00111ad1
JMP 0x00114385
LAB_001144bb:
MOV dword ptr [RSP + 0x4],0x0
JMP 0x001144cb
LAB_001144c5:
MOV AL,0x1
MOV dword ptr [RSP + 0x4],EAX
LAB_001144cb:
MOV EAX,dword ptr [RSP + 0x4]
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 merkle_proof(long param_1,ulong param_2,ulong param_3,int8 *param_4)
{
int4 uVar1;
int4 uVar2;
int8 uVar3;
char cVar4;
uint uVar5;
int4 uVar6;
int7 uVar8;
int8 uVar7;
int8 *puVar9;
int8 *puVar10;
int4 uVar11;
int4 *puVar12;
int8 *extraout_RDX;
ulong uVar13;
ulong uVar14;
ulong uVar15;
int1 auVar16 [16];
int4 local_94;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
auVar16 = merkle_get_data();
puVar12 = auVar16._8_8_;
uVar7 = auVar16._0_8_;
if (auVar16._0_4_ == 0x20) {
uVar6 = *puVar12;
uVar11 = puVar12[1];
uVar1 = puVar12[2];
uVar2 = puVar12[3];
uVar3 = *(int8 *)(puVar12 + 6);
param_4[2] = *(int8 *)(puVar12 + 4);
param_4[3] = uVar3;
*(int4 *)param_4 = uVar6;
*(int4 *)((long)param_4 + 4) = uVar11;
*(int4 *)(param_4 + 1) = uVar1;
*(int4 *)((long)param_4 + 0xc) = uVar2;
while( true ) {
uVar8 = (int7)((ulong)uVar7 >> 8);
if (param_2 <= param_3) break;
uVar5 = c4_get_log_level();
if (4 < uVar5) {
local_78 = 0;
uStack_70 = 0;
local_68 = 0;
bprintf(&local_78,&DAT_0013a36a,param_2,0x20,param_4);
fprintf(*(FILE **)PTR_stderr_00156fe0,"%s\x1b[0m\x1b[32m %s:%d\x1b[0m %s\n",&DAT_0013a353,
"merkle_proof",0x1e5,uStack_70);
buffer_free(&local_78);
}
uVar15 = (-(ulong)((uint)param_2 & 1) | 1) + param_2;
uVar6 = merkle_get_data(param_1,uVar15);
puVar9 = extraout_RDX;
if (extraout_RDX == (int8 *)0x0) {
puVar9 = (int8 *)0x0;
for (uVar14 = 0; (puVar9 == (int8 *)0x0 && (uVar14 < *(uint *)(param_1 + 0x38)));
uVar14 = uVar14 + 1) {
for (uVar13 = *(ulong *)(*(long *)(param_1 + 0x30) + uVar14 * 8); 1 < uVar13;
uVar13 = uVar13 >> 1) {
if ((uVar13 == uVar15) &&
(cVar4 = merkle_proof(param_1,*(int8 *)(*(long *)(param_1 + 0x30) + uVar14 * 8)
,uVar15), cVar4 != '\0')) {
uVar6 = 0x20;
puVar9 = &local_58;
goto LAB_00114406;
}
}
puVar9 = (int8 *)0x0;
LAB_00114406:
}
if (puVar9 == (int8 *)0x0) {
return (int)CONCAT71(uVar8,param_2 <= param_3);
}
}
if ((param_2 & 1) == 0) {
puVar10 = puVar9;
puVar9 = param_4;
uVar11 = uVar6;
uVar6 = 0x20;
}
else {
uVar11 = 0x20;
puVar10 = param_4;
}
uVar7 = sha256_merkle(uVar6,puVar9,uVar11,puVar10,param_4);
param_2 = param_2 >> 1;
}
local_94 = (int4)CONCAT71(uVar8,1);
}
else {
local_94 = 0;
}
return local_94;
}
| |
40,228 | merkle_proof | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static bool merkle_proof(merkle_proof_data_t* proof, gindex_t start, gindex_t end, bytes32_t out) {
bytes32_t tmp = {0};
bytes_t start_data = merkle_get_data(proof, start);
if (start_data.len != 32) return false;
memcpy(out, start_data.data, 32);
while (start > end) {
log_debug_full("%l: %x", start, bytes(out, 32));
/*
fprintf(stderr, "s: %llu ", start);
print_hex(stderr, bytes(out, 32), " : ", "\n");
*/
gindex_t witness = start & 1 ? start - 1 : start + 1;
bytes_t witness_data = merkle_get_data(proof, witness);
if (witness_data.data == NULL) {
// how do we find the start for calculating this witness?
for (int i = 0; i < proof->leafes_len && witness_data.data == NULL; i++) {
gindex_t path = proof->leafes_gindex[i];
for (; path > 1; path >>= 1) {
if (path == witness && merkle_proof(proof, proof->leafes_gindex[i], witness, tmp)) {
witness_data = bytes(tmp, 32);
break;
}
}
}
if (witness_data.data == NULL) return false;
}
if (start & 1)
sha256_merkle(witness_data, bytes(out, 32), out);
else
sha256_merkle(bytes(out, 32), witness_data, out);
start >>= 1;
}
return true;
} | O3 | c | merkle_proof:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
callq 0x158d0
cmpl $0x20, %eax
jne 0x152ad
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movb $0x1, %al
cmpq %r15, %r14
jbe 0x152af
leaq 0x20(%rsp), %r13
movq %rbx, 0x18(%rsp)
movq %r15, 0x10(%rsp)
xorl %eax, %eax
callq 0x17e1b
cmpl $0x5, %eax
jae 0x15293
movl %r14d, %r15d
andl $0x1, %r15d
negq %r15
orq $0x1, %r15
addq %r14, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x158d0
testq %rdx, %rdx
je 0x151d3
movq %rdx, %rcx
jmp 0x15259
movl %eax, 0xc(%rsp)
movl 0x38(%r12), %eax
testl %eax, %eax
je 0x152ad
xorl %ebx, %ebx
movq 0x30(%r12), %rcx
movq (%rcx,%rbx,8), %rbp
cmpq $0x2, %rbp
jb 0x15228
cmpq %r15, %rbp
jne 0x15215
movq 0x30(%r12), %rax
movq (%rax,%rbx,8), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x1513d
testb %al, %al
jne 0x1522c
movq %rbp, %rax
shrq %rax
cmpq $0x3, %rbp
movq %rax, %rbp
ja 0x151f5
xorl %ecx, %ecx
jmp 0x15237
xorl %ecx, %ecx
jmp 0x1523c
movl $0x20, 0xc(%rsp)
movq %r13, %rcx
movl 0x38(%r12), %eax
testq %rcx, %rcx
jne 0x1524b
incq %rbx
movl %eax, %edx
cmpq %rdx, %rbx
jb 0x151e6
testq %rcx, %rcx
movq 0x18(%rsp), %rbx
movl 0xc(%rsp), %eax
je 0x152ad
testb $0x1, %r14b
jne 0x1526b
movl $0x20, %edi
movq %rbx, %rsi
movl %eax, %edx
jmp 0x15278
movl %eax, %edi
movq %rcx, %rsi
movl $0x20, %edx
movq %rbx, %rcx
movq %rbx, %r8
callq 0x163cc
movq 0x10(%rsp), %r15
shrq %r14
cmpq %r15, %r14
ja 0x1519a
jmp 0x152be
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
leaq 0x48(%rsp), %rcx
callq 0x55aa
jmp 0x151aa
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x152af
| merkle_proof:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rcx
mov r15, rdx
mov r14, rsi
mov r12, rdi
xorps xmm0, xmm0
movaps [rsp+88h+var_58], xmm0
movaps [rsp+88h+var_68], xmm0
call merkle_get_data
cmp eax, 20h ; ' '
jnz loc_152AD
movups xmm0, xmmword ptr [rdx]
movups xmm1, xmmword ptr [rdx+10h]
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
loc_15180:
mov al, 1
cmp r14, r15
jbe loc_152AF
lea r13, [rsp+88h+var_68]
mov [rsp+88h+var_70], rbx
mov [rsp+88h+var_78], r15
loc_1519A:
xor eax, eax
call c4_get_log_level
cmp eax, 5
jnb loc_15293
loc_151AA:
mov r15d, r14d
and r15d, 1
neg r15
or r15, 1
add r15, r14
mov rdi, r12
mov rsi, r15
call merkle_get_data
test rdx, rdx
jz short loc_151D3
mov rcx, rdx
jmp loc_15259
loc_151D3:
mov [rsp+88h+var_7C], eax
mov eax, [r12+38h]
test eax, eax
jz loc_152AD
xor ebx, ebx
loc_151E6:
mov rcx, [r12+30h]
mov rbp, [rcx+rbx*8]
cmp rbp, 2
jb short loc_15228
loc_151F5:
cmp rbp, r15
jnz short loc_15215
mov rax, [r12+30h]
mov rsi, [rax+rbx*8]
mov rdi, r12
mov rdx, r15
mov rcx, r13
call merkle_proof
test al, al
jnz short loc_1522C
loc_15215:
mov rax, rbp
shr rax, 1
cmp rbp, 3
mov rbp, rax
ja short loc_151F5
xor ecx, ecx
jmp short loc_15237
loc_15228:
xor ecx, ecx
jmp short loc_1523C
loc_1522C:
mov [rsp+88h+var_7C], 20h ; ' '
mov rcx, r13
loc_15237:
mov eax, [r12+38h]
loc_1523C:
test rcx, rcx
jnz short loc_1524B
inc rbx
mov edx, eax
cmp rbx, rdx
jb short loc_151E6
loc_1524B:
test rcx, rcx
mov rbx, [rsp+88h+var_70]
mov eax, [rsp+88h+var_7C]
jz short loc_152AD
loc_15259:
test r14b, 1
jnz short loc_1526B
mov edi, 20h ; ' '
mov rsi, rbx
mov edx, eax
jmp short loc_15278
loc_1526B:
mov edi, eax
mov rsi, rcx
mov edx, 20h ; ' '
mov rcx, rbx
loc_15278:
mov r8, rbx
call sha256_merkle
mov r15, [rsp+88h+var_78]
shr r14, 1
cmp r14, r15
ja loc_1519A
jmp short loc_152BE
loc_15293:
lea rdi, [rsp+88h+var_48]
mov rsi, r14
mov rdx, rbx
lea rcx, [rsp+88h+var_40]
call merkle_proof_cold_1
jmp loc_151AA
loc_152AD:
xor eax, eax
loc_152AF:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_152BE:
mov al, 1
jmp short loc_152AF
| char merkle_proof(long long a1, unsigned long long a2, unsigned long long a3, _OWORD *a4)
{
unsigned long long v6; // r14
__int128 *v8; // rdx
__int128 v9; // xmm0
char result; // al
long long v11; // r8
int v12; // r9d
unsigned long long v13; // r15
unsigned int data; // eax
_OWORD *v15; // rdx
_OWORD *v16; // rcx
unsigned int v17; // eax
unsigned long long i; // rbx
unsigned long long v19; // rbp
bool v20; // cc
long long v21; // rdi
_OWORD *v22; // rsi
long long v23; // rdx
int v24; // [rsp+Ch] [rbp-7Ch]
unsigned long long v25; // [rsp+10h] [rbp-78h]
_OWORD *v26; // [rsp+18h] [rbp-70h]
_OWORD v27[2]; // [rsp+20h] [rbp-68h] BYREF
_BYTE v28[8]; // [rsp+40h] [rbp-48h] BYREF
const char *v29; // [rsp+48h] [rbp-40h] BYREF
v6 = a2;
memset(v27, 0, sizeof(v27));
if ( (unsigned int)((long long (*)(void))merkle_get_data)() != 32 )
return 0;
v9 = *v8;
a4[1] = v8[1];
*a4 = v9;
result = 1;
if ( a2 > a3 )
{
v26 = a4;
v25 = a3;
do
{
if ( (unsigned int)c4_get_log_level() >= 5 )
merkle_proof_cold_1((long long)v28, v6, (int)a4, &v29, v11, v12);
v13 = v6 + (-(long long)(v6 & 1) | 1);
data = merkle_get_data(a1, v13);
if ( v15 )
{
v16 = v15;
}
else
{
v24 = data;
v17 = *(_DWORD *)(a1 + 56);
if ( !v17 )
return 0;
for ( i = 0LL; i < v17; ++i )
{
v19 = *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8 * i);
if ( v19 < 2 )
{
v16 = 0LL;
}
else
{
while ( v19 != v13
|| !(unsigned __int8)merkle_proof(a1, *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8 * i), v13, v27) )
{
v20 = v19 <= 3;
v19 >>= 1;
if ( v20 )
{
v16 = 0LL;
goto LABEL_17;
}
}
v24 = 32;
v16 = v27;
LABEL_17:
v17 = *(_DWORD *)(a1 + 56);
}
if ( v16 )
break;
}
a4 = v26;
data = v24;
if ( !v16 )
return 0;
}
if ( (v6 & 1) != 0 )
{
v21 = data;
v22 = v16;
v23 = 32LL;
v16 = a4;
}
else
{
v21 = 32LL;
v22 = a4;
v23 = data;
}
sha256_merkle(v21, v22, v23, v16, a4);
v6 >>= 1;
}
while ( v6 > v25 );
return 1;
}
return result;
}
| merkle_proof:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,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
CALL 0x001158d0
CMP EAX,0x20
JNZ 0x001152ad
MOVUPS XMM0,xmmword ptr [RDX]
MOVUPS XMM1,xmmword ptr [RDX + 0x10]
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
MOV AL,0x1
CMP R14,R15
JBE 0x001152af
LEA R13,[RSP + 0x20]
MOV qword ptr [RSP + 0x18],RBX
MOV qword ptr [RSP + 0x10],R15
LAB_0011519a:
XOR EAX,EAX
CALL 0x00117e1b
CMP EAX,0x5
JNC 0x00115293
LAB_001151aa:
MOV R15D,R14D
AND R15D,0x1
NEG R15
OR R15,0x1
ADD R15,R14
MOV RDI,R12
MOV RSI,R15
CALL 0x001158d0
TEST RDX,RDX
JZ 0x001151d3
MOV RCX,RDX
JMP 0x00115259
LAB_001151d3:
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [R12 + 0x38]
TEST EAX,EAX
JZ 0x001152ad
XOR EBX,EBX
LAB_001151e6:
MOV RCX,qword ptr [R12 + 0x30]
MOV RBP,qword ptr [RCX + RBX*0x8]
CMP RBP,0x2
JC 0x00115228
LAB_001151f5:
CMP RBP,R15
JNZ 0x00115215
MOV RAX,qword ptr [R12 + 0x30]
MOV RSI,qword ptr [RAX + RBX*0x8]
MOV RDI,R12
MOV RDX,R15
MOV RCX,R13
CALL 0x0011513d
TEST AL,AL
JNZ 0x0011522c
LAB_00115215:
MOV RAX,RBP
SHR RAX,0x1
CMP RBP,0x3
MOV RBP,RAX
JA 0x001151f5
XOR ECX,ECX
JMP 0x00115237
LAB_00115228:
XOR ECX,ECX
JMP 0x0011523c
LAB_0011522c:
MOV dword ptr [RSP + 0xc],0x20
MOV RCX,R13
LAB_00115237:
MOV EAX,dword ptr [R12 + 0x38]
LAB_0011523c:
TEST RCX,RCX
JNZ 0x0011524b
INC RBX
MOV EDX,EAX
CMP RBX,RDX
JC 0x001151e6
LAB_0011524b:
TEST RCX,RCX
MOV RBX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0xc]
JZ 0x001152ad
LAB_00115259:
TEST R14B,0x1
JNZ 0x0011526b
MOV EDI,0x20
MOV RSI,RBX
MOV EDX,EAX
JMP 0x00115278
LAB_0011526b:
MOV EDI,EAX
MOV RSI,RCX
MOV EDX,0x20
MOV RCX,RBX
LAB_00115278:
MOV R8,RBX
CALL 0x001163cc
MOV R15,qword ptr [RSP + 0x10]
SHR R14,0x1
CMP R14,R15
JA 0x0011519a
JMP 0x001152be
LAB_00115293:
LEA RDI,[RSP + 0x40]
MOV RSI,R14
MOV RDX,RBX
LEA RCX,[RSP + 0x48]
CALL 0x001055aa
JMP 0x001151aa
LAB_001152ad:
XOR EAX,EAX
LAB_001152af:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001152be:
MOV AL,0x1
JMP 0x001152af
|
int8 merkle_proof(long param_1,ulong param_2,ulong param_3,int4 *param_4)
{
bool bVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
char cVar6;
uint uVar7;
int8 uVar8;
int8 *puVar9;
int4 *puVar10;
int4 *puVar11;
ulong uVar12;
ulong uVar13;
ulong uVar14;
ulong uVar15;
int1 auVar16 [16];
uint local_7c;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int1 local_48 [8];
int1 local_40 [16];
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
auVar16 = merkle_get_data();
puVar10 = auVar16._8_8_;
if (auVar16._0_4_ == 0x20) {
uVar2 = *puVar10;
uVar3 = puVar10[1];
uVar4 = puVar10[2];
uVar5 = puVar10[3];
uVar8 = *(int8 *)(puVar10 + 6);
*(int8 *)(param_4 + 4) = *(int8 *)(puVar10 + 4);
*(int8 *)(param_4 + 6) = uVar8;
*param_4 = uVar2;
param_4[1] = uVar3;
param_4[2] = uVar4;
param_4[3] = uVar5;
uVar8 = 1;
if (param_3 < param_2) {
do {
uVar7 = c4_get_log_level();
if (4 < uVar7) {
merkle_proof_cold_1(local_48,param_2,param_4,local_40);
}
uVar15 = (-(ulong)((uint)param_2 & 1) | 1) + param_2;
auVar16 = merkle_get_data(param_1,uVar15);
if (auVar16._8_8_ == 0) {
local_7c = auVar16._0_4_;
uVar14 = (ulong)*(uint *)(param_1 + 0x38);
if (*(uint *)(param_1 + 0x38) == 0) goto LAB_001152ad;
uVar12 = 0;
do {
uVar13 = *(ulong *)(*(long *)(param_1 + 0x30) + uVar12 * 8);
if (uVar13 < 2) {
puVar9 = (int8 *)0x0;
}
else {
do {
if ((uVar13 == uVar15) &&
(cVar6 = merkle_proof(param_1,*(int8 *)
(*(long *)(param_1 + 0x30) + uVar12 * 8),uVar15),
cVar6 != '\0')) {
local_7c = 0x20;
puVar9 = &local_68;
goto LAB_00115237;
}
bVar1 = 3 < uVar13;
uVar13 = uVar13 >> 1;
} while (bVar1);
puVar9 = (int8 *)0x0;
LAB_00115237:
uVar14 = (ulong)*(uint *)(param_1 + 0x38);
}
} while ((puVar9 == (int8 *)0x0) && (uVar12 = uVar12 + 1, uVar12 < uVar14));
auVar16._4_4_ = 0;
auVar16._0_4_ = local_7c;
auVar16._8_8_ = puVar9;
if (puVar9 == (int8 *)0x0) goto LAB_001152ad;
}
puVar10 = auVar16._8_8_;
if ((param_2 & 1) == 0) {
uVar14 = 0x20;
uVar15 = auVar16._0_8_ & 0xffffffff;
puVar11 = puVar10;
puVar10 = param_4;
}
else {
uVar14 = auVar16._0_8_ & 0xffffffff;
uVar15 = 0x20;
puVar11 = param_4;
}
sha256_merkle(uVar14,puVar10,uVar15,puVar11,param_4);
param_2 = param_2 >> 1;
} while (param_3 < param_2);
uVar8 = 1;
}
}
else {
LAB_001152ad:
uVar8 = 0;
}
return uVar8;
}
| |
40,229 | rlUnloadRenderBatch | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h | void rlUnloadRenderBatch(rlRenderBatch batch)
{
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Unbind everything
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
// Unload all vertex buffers data
for (int i = 0; i < batch.bufferCount; i++)
{
// Unbind VAO attribs data
if (RLGL.ExtSupported.vao)
{
glBindVertexArray(batch.vertexBuffer[i].vaoId);
glDisableVertexAttribArray(RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION);
glDisableVertexAttribArray(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD);
glDisableVertexAttribArray(RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL);
glDisableVertexAttribArray(RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR);
glBindVertexArray(0);
}
// Delete VBOs from GPU (VRAM)
glDeleteBuffers(1, &batch.vertexBuffer[i].vboId[0]);
glDeleteBuffers(1, &batch.vertexBuffer[i].vboId[1]);
glDeleteBuffers(1, &batch.vertexBuffer[i].vboId[2]);
glDeleteBuffers(1, &batch.vertexBuffer[i].vboId[3]);
glDeleteBuffers(1, &batch.vertexBuffer[i].vboId[4]);
// Delete VAOs from GPU (VRAM)
if (RLGL.ExtSupported.vao) glDeleteVertexArrays(1, &batch.vertexBuffer[i].vaoId);
// Free vertex arrays memory from CPU (RAM)
RL_FREE(batch.vertexBuffer[i].vertices);
RL_FREE(batch.vertexBuffer[i].texcoords);
RL_FREE(batch.vertexBuffer[i].normals);
RL_FREE(batch.vertexBuffer[i].colors);
RL_FREE(batch.vertexBuffer[i].indices);
}
// Unload arrays
RL_FREE(batch.vertexBuffer);
RL_FREE(batch.draws);
#endif
} | O0 | c | rlUnloadRenderBatch:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x8892, %edi # imm = 0x8892
xorl %esi, %esi
callq *0x163d03(%rip) # 0x2182d0
movl $0x8893, %edi # imm = 0x8893
xorl %esi, %esi
callq *0x163cf6(%rip) # 0x2182d0
movl $0x0, -0x4(%rbp)
movq -0x10(%rbp), %rcx
movl -0x4(%rbp), %eax
cmpl (%rcx), %eax
jge 0xb47da
testb $0x1, 0x166669(%rip) # 0x21ac60
je 0xb4649
movq -0x10(%rbp), %rcx
movq 0x163d7c(%rip), %rax # 0x218380
movq 0x8(%rcx), %rcx
movslq -0x4(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rcx
movl 0x30(%rcx), %edi
callq *%rax
xorl %edi, %edi
callq *0x1641e0(%rip) # 0x218800
movl $0x1, %edi
callq *0x1641d5(%rip) # 0x218800
movl $0x2, %edi
callq *0x1641ca(%rip) # 0x218800
movl $0x3, %edi
callq *0x1641bf(%rip) # 0x218800
xorl %edi, %edi
callq *0x163d37(%rip) # 0x218380
movq -0x10(%rbp), %rcx
movq 0x1640bc(%rip), %rax # 0x218710
movq 0x8(%rcx), %rsi
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rsi
addq $0x34, %rsi
movl $0x1, %edi
callq *%rax
movq -0x10(%rbp), %rcx
movq 0x164097(%rip), %rax # 0x218710
movq 0x8(%rcx), %rsi
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rsi
addq $0x34, %rsi
addq $0x4, %rsi
movl $0x1, %edi
callq *%rax
movq -0x10(%rbp), %rcx
movq 0x16406e(%rip), %rax # 0x218710
movq 0x8(%rcx), %rsi
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rsi
addq $0x34, %rsi
addq $0x8, %rsi
movl $0x1, %edi
callq *%rax
movq -0x10(%rbp), %rcx
movq 0x164045(%rip), %rax # 0x218710
movq 0x8(%rcx), %rsi
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rsi
addq $0x34, %rsi
addq $0xc, %rsi
movl $0x1, %edi
callq *%rax
movq -0x10(%rbp), %rcx
movq 0x16401c(%rip), %rax # 0x218710
movq 0x8(%rcx), %rsi
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rsi
addq $0x34, %rsi
addq $0x10, %rsi
movl $0x1, %edi
callq *%rax
testb $0x1, 0x166547(%rip) # 0x21ac60
je 0xb4740
movq -0x10(%rbp), %rcx
movq 0x16407a(%rip), %rax # 0x2187a0
movq 0x8(%rcx), %rsi
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rsi
addq $0x30, %rsi
movl $0x1, %edi
callq *%rax
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0xa640
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0xa640
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0xa640
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
callq 0xa640
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rdi
callq 0xa640
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xb45e1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xa640
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xa640
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| rlUnloadRenderBatch:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, [rbp+arg_0]
mov [rbp+var_10], rax
mov edi, 8892h
xor esi, esi
call cs:glad_glBindBuffer
mov edi, 8893h
xor esi, esi
call cs:glad_glBindBuffer
mov [rbp+var_4], 0
loc_B45E1:
mov rcx, [rbp+var_10]
mov eax, [rbp+var_4]
cmp eax, [rcx]
jge loc_B47DA
test cs:byte_21AC60, 1
jz short loc_B4649
mov rcx, [rbp+var_10]
mov rax, cs:glad_glBindVertexArray
mov rcx, [rcx+8]
movsxd rdx, [rbp+var_4]
imul rdx, 48h ; 'H'
add rcx, rdx
mov edi, [rcx+30h]
call rax ; glad_glBindVertexArray
xor edi, edi
call cs:glad_glDisableVertexAttribArray
mov edi, 1
call cs:glad_glDisableVertexAttribArray
mov edi, 2
call cs:glad_glDisableVertexAttribArray
mov edi, 3
call cs:glad_glDisableVertexAttribArray
xor edi, edi
call cs:glad_glBindVertexArray
loc_B4649:
mov rcx, [rbp+var_10]
mov rax, cs:glad_glDeleteBuffers
mov rsi, [rcx+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rsi, rcx
add rsi, 34h ; '4'
mov edi, 1
call rax ; glad_glDeleteBuffers
mov rcx, [rbp+var_10]
mov rax, cs:glad_glDeleteBuffers
mov rsi, [rcx+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rsi, rcx
add rsi, 34h ; '4'
add rsi, 4
mov edi, 1
call rax ; glad_glDeleteBuffers
mov rcx, [rbp+var_10]
mov rax, cs:glad_glDeleteBuffers
mov rsi, [rcx+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rsi, rcx
add rsi, 34h ; '4'
add rsi, 8
mov edi, 1
call rax ; glad_glDeleteBuffers
mov rcx, [rbp+var_10]
mov rax, cs:glad_glDeleteBuffers
mov rsi, [rcx+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rsi, rcx
add rsi, 34h ; '4'
add rsi, 0Ch
mov edi, 1
call rax ; glad_glDeleteBuffers
mov rcx, [rbp+var_10]
mov rax, cs:glad_glDeleteBuffers
mov rsi, [rcx+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rsi, rcx
add rsi, 34h ; '4'
add rsi, 10h
mov edi, 1
call rax ; glad_glDeleteBuffers
test cs:byte_21AC60, 1
jz short loc_B4740
mov rcx, [rbp+var_10]
mov rax, cs:glad_glDeleteVertexArrays
mov rsi, [rcx+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rsi, rcx
add rsi, 30h ; '0'
mov edi, 1
call rax ; glad_glDeleteVertexArrays
loc_B4740:
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rax, rcx
mov rdi, [rax+8]
call _free
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rax, rcx
mov rdi, [rax+10h]
call _free
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rax, rcx
mov rdi, [rax+18h]
call _free
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rax, rcx
mov rdi, [rax+20h]
call _free
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rcx, [rbp+var_4]
imul rcx, 48h ; 'H'
add rax, rcx
mov rdi, [rax+28h]
call _free
mov eax, [rbp+var_4]
add eax, 1
mov [rbp+var_4], eax
jmp loc_B45E1
loc_B47DA:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
call _free
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
call _free
add rsp, 10h
pop rbp
retn
| long long rlUnloadRenderBatch(
_DWORD a1,
_DWORD a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
int a7,
long long a8,
long long a9)
{
int i; // [rsp+Ch] [rbp-4h]
glad_glBindBuffer(34962LL, 0LL);
glad_glBindBuffer(34963LL, 0LL);
for ( i = 0; i < a7; ++i )
{
if ( (byte_21AC60 & 1) != 0 )
{
glad_glBindVertexArray(*(unsigned int *)(72LL * i + a8 + 48));
glad_glDisableVertexAttribArray(0LL);
glad_glDisableVertexAttribArray(1LL);
glad_glDisableVertexAttribArray(2LL);
glad_glDisableVertexAttribArray(3LL);
glad_glBindVertexArray(0LL);
}
glad_glDeleteBuffers(1LL, 72LL * i + a8 + 52);
glad_glDeleteBuffers(1LL, 72LL * i + a8 + 56);
glad_glDeleteBuffers(1LL, 72LL * i + a8 + 60);
glad_glDeleteBuffers(1LL, 72LL * i + a8 + 64);
glad_glDeleteBuffers(1LL, 72LL * i + a8 + 68);
if ( (byte_21AC60 & 1) != 0 )
glad_glDeleteVertexArrays(1LL, 72LL * i + a8 + 48);
free(*(_QWORD *)(72LL * i + a8 + 8));
free(*(_QWORD *)(72LL * i + a8 + 16));
free(*(_QWORD *)(72LL * i + a8 + 24));
free(*(_QWORD *)(72LL * i + a8 + 32));
free(*(_QWORD *)(72LL * i + a8 + 40));
}
free(a8);
return free(a9);
}
| rlUnloadRenderBatch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV EDI,0x8892
XOR ESI,ESI
CALL qword ptr [0x003182d0]
MOV EDI,0x8893
XOR ESI,ESI
CALL qword ptr [0x003182d0]
MOV dword ptr [RBP + -0x4],0x0
LAB_001b45e1:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RCX]
JGE 0x001b47da
TEST byte ptr [0x0031ac60],0x1
JZ 0x001b4649
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x00318380]
MOV RCX,qword ptr [RCX + 0x8]
MOVSXD RDX,dword ptr [RBP + -0x4]
IMUL RDX,RDX,0x48
ADD RCX,RDX
MOV EDI,dword ptr [RCX + 0x30]
CALL RAX
XOR EDI,EDI
CALL qword ptr [0x00318800]
MOV EDI,0x1
CALL qword ptr [0x00318800]
MOV EDI,0x2
CALL qword ptr [0x00318800]
MOV EDI,0x3
CALL qword ptr [0x00318800]
XOR EDI,EDI
CALL qword ptr [0x00318380]
LAB_001b4649:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x00318710]
MOV RSI,qword ptr [RCX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RSI,RCX
ADD RSI,0x34
MOV EDI,0x1
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x00318710]
MOV RSI,qword ptr [RCX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RSI,RCX
ADD RSI,0x34
ADD RSI,0x4
MOV EDI,0x1
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x00318710]
MOV RSI,qword ptr [RCX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RSI,RCX
ADD RSI,0x34
ADD RSI,0x8
MOV EDI,0x1
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x00318710]
MOV RSI,qword ptr [RCX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RSI,RCX
ADD RSI,0x34
ADD RSI,0xc
MOV EDI,0x1
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x00318710]
MOV RSI,qword ptr [RCX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RSI,RCX
ADD RSI,0x34
ADD RSI,0x10
MOV EDI,0x1
CALL RAX
TEST byte ptr [0x0031ac60],0x1
JZ 0x001b4740
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x003187a0]
MOV RSI,qword ptr [RCX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RSI,RCX
ADD RSI,0x30
MOV EDI,0x1
CALL RAX
LAB_001b4740:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0010a640
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0010a640
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0010a640
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x0010a640
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x4]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RDI,qword ptr [RAX + 0x28]
CALL 0x0010a640
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b45e1
LAB_001b47da:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0010a640
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0010a640
ADD RSP,0x10
POP RBP
RET
|
void rlUnloadRenderBatch(void)
{
int in_stack_00000008;
void *in_stack_00000010;
void *in_stack_00000018;
int local_c;
(*glad_glBindBuffer)(0x8892,0);
(*glad_glBindBuffer)(0x8893,0);
for (local_c = 0; local_c < in_stack_00000008; local_c = local_c + 1) {
if ((DAT_0031ac60 & 1) != 0) {
(*glad_glBindVertexArray)
(*(int4 *)((long)in_stack_00000010 + (long)local_c * 0x48 + 0x30));
(*glad_glDisableVertexAttribArray)(0);
(*glad_glDisableVertexAttribArray)(1);
(*glad_glDisableVertexAttribArray)(2);
(*glad_glDisableVertexAttribArray)(3);
(*glad_glBindVertexArray)(0);
}
(*glad_glDeleteBuffers)(1,(long)in_stack_00000010 + (long)local_c * 0x48 + 0x34);
(*glad_glDeleteBuffers)(1,(long)in_stack_00000010 + (long)local_c * 0x48 + 0x38);
(*glad_glDeleteBuffers)(1,(long)in_stack_00000010 + (long)local_c * 0x48 + 0x3c);
(*glad_glDeleteBuffers)(1,(long)in_stack_00000010 + (long)local_c * 0x48 + 0x40);
(*glad_glDeleteBuffers)(1,(long)in_stack_00000010 + (long)local_c * 0x48 + 0x44);
if ((DAT_0031ac60 & 1) != 0) {
(*glad_glDeleteVertexArrays)(1,(long)in_stack_00000010 + (long)local_c * 0x48 + 0x30);
}
free(*(void **)((long)in_stack_00000010 + (long)local_c * 0x48 + 8));
free(*(void **)((long)in_stack_00000010 + (long)local_c * 0x48 + 0x10));
free(*(void **)((long)in_stack_00000010 + (long)local_c * 0x48 + 0x18));
free(*(void **)((long)in_stack_00000010 + (long)local_c * 0x48 + 0x20));
free(*(void **)((long)in_stack_00000010 + (long)local_c * 0x48 + 0x28));
}
free(in_stack_00000010);
free(in_stack_00000018);
return;
}
| |
40,230 | DepthAnything::predict(cv::Mat const&) | Depths-CPP/include/depth_anything.hpp | cv::Mat DepthAnything::predict(const cv::Mat &image)
{
try
{
std::vector<int64_t> inputTensorShape = {1, 3, inputImageShape.height, inputImageShape.width};
std::vector<float> blob;
cv::Mat preprocessedImage = preprocessSingle(image, blob, inputTensorShape);
Ort::MemoryInfo memoryInfo = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault);
Ort::Value inputTensor = Ort::Value::CreateTensor<float>(
memoryInfo,
blob.data(),
blob.size(),
inputTensorShape.data(),
inputTensorShape.size());
std::vector<Ort::Value> outputTensors = session->Run(
Ort::RunOptions{nullptr},
inputNames.data(),
&inputTensor,
numInputs,
outputNames.data(),
numOutputs);
return postprocessSingle(image.size(), outputTensors[0]);
}
catch (const Ort::Exception &e)
{
throw;
}
} | O0 | cpp | DepthAnything::predict(cv::Mat const&):
subq $0x1b8, %rsp # imm = 0x1B8
movq %rdi, 0x68(%rsp)
movq %rdi, %rax
movq %rax, 0x70(%rsp)
movq %rdi, 0x1b0(%rsp)
movq %rsi, 0x1a8(%rsp)
movq %rdx, 0x1a0(%rsp)
movq 0x1a8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq $0x1, 0x158(%rsp)
movq $0x3, 0x160(%rsp)
movslq 0x20(%rax), %rcx
movq %rcx, 0x168(%rsp)
movslq 0x1c(%rax), %rax
movq %rax, 0x170(%rsp)
leaq 0x158(%rsp), %rax
movq %rax, 0x178(%rsp)
movq $0x4, 0x180(%rsp)
leaq 0x157(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x21940
movq 0x80(%rsp), %rcx
movq 0x178(%rsp), %rsi
movq 0x180(%rsp), %rdx
leaq 0x188(%rsp), %rdi
callq 0x21950
jmp 0x1c901
leaq 0x157(%rsp), %rdi
callq 0x219e0
leaq 0x128(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x219f0
movq 0x78(%rsp), %rsi
movq 0x60(%rsp), %rcx
movq 0x1a0(%rsp), %rdx
leaq 0xc8(%rsp), %rdi
leaq 0x188(%rsp), %r8
callq 0x1b3d0
jmp 0x1c949
leaq 0xc0(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x21a00
jmp 0x1c95f
leaq 0xc0(%rsp), %rdi
callq 0x21ac0
movq %rax, 0x40(%rsp)
leaq 0x128(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x21ad0
movq 0x30(%rsp), %rdi
movq %rax, 0x48(%rsp)
callq 0x21af0
movq %rax, 0x50(%rsp)
leaq 0x188(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x21b10
movq 0x38(%rsp), %rdi
movq %rax, 0x58(%rsp)
callq 0x207f0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq %rax, %r9
leaq 0xb8(%rsp), %rdi
callq 0x21a60
jmp 0x1c9de
movq 0x78(%rsp), %rdi
addq $0x10, %rdi
callq 0x205d0
movq %rax, 0x28(%rsp)
xorl %eax, %eax
movl %eax, %esi
leaq 0x98(%rsp), %rdi
callq 0x21cc0
jmp 0x1ca04
movq 0x78(%rsp), %rdi
addq $0x40, %rdi
callq 0x21ce0
movq 0x78(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0xb8(%rdi), %rax
movq %rax, 0x20(%rsp)
addq $0x70, %rdi
callq 0x21ce0
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r9
movq %rax, %rdx
movq 0x78(%rsp), %rax
movq 0xc0(%rax), %rdi
movq %rsp, %rax
movq %rdi, 0x8(%rax)
movq %rdx, (%rax)
leaq 0xa0(%rsp), %rdi
leaq 0x98(%rsp), %rdx
leaq 0xb8(%rsp), %r8
callq 0x21b30
jmp 0x1ca78
leaq 0x98(%rsp), %rdi
callq 0x21d00
movq 0x1a0(%rsp), %rsi
addq $0x40, %rsi
leaq 0x90(%rsp), %rdi
callq 0x21d10
jmp 0x1caa0
xorl %eax, %eax
movl %eax, %esi
leaq 0xa0(%rsp), %rdi
callq 0x21d50
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq %rax, %rcx
leaq 0x90(%rsp), %rdx
callq 0x1c080
jmp 0x1cacd
leaq 0xa0(%rsp), %rdi
callq 0x21d70
leaq 0xb8(%rsp), %rdi
callq 0x21dd0
leaq 0xc0(%rsp), %rdi
callq 0x21de0
leaq 0xc8(%rsp), %rdi
callq 0x1a090
leaq 0x128(%rsp), %rdi
callq 0x20c70
leaq 0x188(%rsp), %rdi
callq 0x20b90
movq 0x70(%rsp), %rax
addq $0x1b8, %rsp # imm = 0x1B8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0x157(%rsp), %rdi
callq 0x219e0
jmp 0x1cc31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x1cc17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x1cc0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x1cbfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x1cbf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x21d00
jmp 0x1cbf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x21d70
leaq 0xb8(%rsp), %rdi
callq 0x21dd0
leaq 0xc0(%rsp), %rdi
callq 0x21de0
leaq 0xc8(%rsp), %rdi
callq 0x1a090
leaq 0x128(%rsp), %rdi
callq 0x20c70
leaq 0x188(%rsp), %rdi
callq 0x20b90
movl 0x144(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x1cc7a
movq 0x148(%rsp), %rdi
callq 0x1a340
movq %rax, 0x88(%rsp)
callq 0x1a530
jmp 0x1cc8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
callq 0x1a520
jmp 0x1cc78
jmp 0x1cc7a
movq 0x148(%rsp), %rdi
callq 0x1a3c0
movq %rax, %rdi
callq 0x20c60
nop
| _ZN13DepthAnything7predictERKN2cv3MatE:
sub rsp, 1B8h
mov qword ptr [rsp+1B8h+var_150], rdi; int
mov rax, rdi
mov qword ptr [rsp+1B8h+var_148], rax; int
mov [rsp+1B8h+var_8], rdi
mov qword ptr [rsp+1B8h+var_10], rsi
mov [rsp+1B8h+var_18], rdx
mov rax, qword ptr [rsp+1B8h+var_10]
mov qword ptr [rsp+1B8h+var_140], rax; int
mov qword ptr [rsp+1B8h+var_61+1], 1
mov [rsp+1B8h+var_58], 3
movsxd rcx, dword ptr [rax+20h]
mov [rsp+1B8h+var_50], rcx
movsxd rax, dword ptr [rax+1Ch]
mov [rsp+1B8h+var_48], rax
lea rax, [rsp+1B8h+var_61+1]
mov [rsp+1B8h+var_40], rax
mov [rsp+1B8h+var_38], 4
lea rdi, [rsp+1B8h+var_61]
mov qword ptr [rsp+1B8h+var_138], rdi; int
call _ZNSaIlEC2Ev; std::allocator<long>::allocator(void)
mov rcx, qword ptr [rsp+1B8h+var_138]
mov rsi, [rsp+1B8h+var_40]
mov rdx, [rsp+1B8h+var_38]
lea rdi, [rsp+1B8h+var_30]
call _ZNSt6vectorIlSaIlEEC2ESt16initializer_listIlERKS0_; std::vector<long>::vector(std::initializer_list<long>,std::allocator<long> const&)
jmp short $+2
loc_1C901:
lea rdi, [rsp+1B8h+var_61]
call _ZNSaIlED2Ev; std::allocator<long>::~allocator()
lea rdi, [rsp+1B8h+var_90]
mov qword ptr [rsp+1B8h+var_158], rdi; char
call _ZNSt6vectorIfSaIfEEC2Ev; std::vector<float>::vector(void)
mov rsi, qword ptr [rsp+1B8h+var_140]
mov rcx, qword ptr [rsp+1B8h+var_158]
mov rdx, [rsp+1B8h+var_18]
lea rdi, [rsp+1B8h+var_F0]
lea r8, [rsp+1B8h+var_30]
call _ZN13DepthAnything16preprocessSingleERKN2cv3MatERSt6vectorIfSaIfEERS4_IlSaIlEE; DepthAnything::preprocessSingle(cv::Mat const&,std::vector<float> &,std::vector&<long,std::allocator<long>>)
jmp short $+2
loc_1C949:
lea rdi, [rsp+1B8h+var_F8]
mov esi, 1
xor edx, edx
call _ZN3Ort10MemoryInfo9CreateCpuE16OrtAllocatorType10OrtMemType; Ort::MemoryInfo::CreateCpu(OrtAllocatorType,OrtMemType)
jmp short $+2
loc_1C95F:
lea rdi, [rsp+1B8h+var_F8]
call _ZNK3Ort6detail4BaseI13OrtMemoryInfoEcvPS2_Ev; Ort::detail::Base<OrtMemoryInfo>::operator OrtMemoryInfo*(void)
mov qword ptr [rsp+1B8h+var_178], rax; char
lea rdi, [rsp+1B8h+var_90]
mov qword ptr [rsp+1B8h+var_188], rdi; int
call _ZNSt6vectorIfSaIfEE4dataEv; std::vector<float>::data(void)
mov rdi, qword ptr [rsp+1B8h+var_188]
mov qword ptr [rsp+1B8h+var_170], rax; int
call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void)
mov qword ptr [rsp+1B8h+var_168], rax; int
lea rdi, [rsp+1B8h+var_30]
mov qword ptr [rsp+1B8h+var_180], rdi; int
call _ZNSt6vectorIlSaIlEE4dataEv; std::vector<long>::data(void)
mov rdi, qword ptr [rsp+1B8h+var_180]
mov qword ptr [rsp+1B8h+var_160], rax; int
call _ZNKSt6vectorIlSaIlEE4sizeEv; std::vector<long>::size(void)
mov rsi, qword ptr [rsp+1B8h+var_178]
mov rdx, qword ptr [rsp+1B8h+var_170]
mov rcx, qword ptr [rsp+1B8h+var_168]
mov r8, qword ptr [rsp+1B8h+var_160]
mov r9, rax
lea rdi, [rsp+1B8h+var_100]
call _ZN3Ort5Value12CreateTensorIfEES0_PK13OrtMemoryInfoPT_mPKlm; Ort::Value::CreateTensor<float>(OrtMemoryInfo const*,float *,ulong,long const*,ulong)
jmp short $+2
loc_1C9DE:
mov rdi, qword ptr [rsp+1B8h+var_140]
add rdi, 10h
call _ZNKSt10unique_ptrIN3Ort7SessionESt14default_deleteIS1_EEptEv; std::unique_ptr<Ort::Session>::operator->(void)
mov qword ptr [rsp+1B8h+var_190], rax; char
xor eax, eax
mov esi, eax
lea rdi, [rsp+1B8h+var_120]
call _ZN3Ort10RunOptionsC2EDn; Ort::RunOptions::RunOptions(decltype(nullptr))
jmp short $+2
loc_1CA04:
mov rdi, qword ptr [rsp+1B8h+var_140]
add rdi, 40h ; '@'
call _ZNSt6vectorIPKcSaIS1_EE4dataEv; std::vector<char const*>::data(void)
mov rdi, qword ptr [rsp+1B8h+var_140]
mov qword ptr [rsp+1B8h+var_1A0], rax; int
mov rax, [rdi+0B8h]
mov qword ptr [rsp+1B8h+var_198], rax; int
add rdi, 70h ; 'p'
call _ZNSt6vectorIPKcSaIS1_EE4dataEv; std::vector<char const*>::data(void)
mov rsi, qword ptr [rsp+1B8h+var_190]
mov rcx, qword ptr [rsp+1B8h+var_1A0]
mov r9, qword ptr [rsp+1B8h+var_198]
mov rdx, rax
mov rax, qword ptr [rsp+1B8h+var_140]
mov rdi, [rax+0C0h]
mov rax, rsp
mov [rax+8], rdi
mov [rax], rdx
lea rdi, [rsp+1B8h+var_118]
lea rdx, [rsp+1B8h+var_120]
lea r8, [rsp+1B8h+var_100]
call _ZN3Ort6detail11SessionImplI10OrtSessionE3RunERKNS_10RunOptionsEPKPKcPKNS_5ValueEmSA_m; Ort::detail::SessionImpl<OrtSession>::Run(Ort::RunOptions const&,char const* const*,Ort::Value const*,ulong,char const* const*,ulong)
jmp short $+2
loc_1CA78:
lea rdi, [rsp+1B8h+var_120]; this
call _ZN3Ort10RunOptionsD2Ev; Ort::RunOptions::~RunOptions()
mov rsi, [rsp+1B8h+var_18]
add rsi, 40h ; '@'
lea rdi, [rsp+1B8h+var_128]
call _ZNK2cv7MatSizeclEv; cv::MatSize::operator()(void)
jmp short $+2
loc_1CAA0:
xor eax, eax
mov esi, eax
lea rdi, [rsp+1B8h+var_118]
call _ZNSt6vectorIN3Ort5ValueESaIS1_EEixEm; std::vector<Ort::Value>::operator[](ulong)
mov rdi, qword ptr [rsp+1B8h+var_150]; int
mov rsi, qword ptr [rsp+1B8h+var_140]; int
mov rcx, rax; int
lea rdx, [rsp+1B8h+var_128]; int
call _ZN13DepthAnything17postprocessSingleERKN2cv5Size_IiEERKN3Ort5ValueE; DepthAnything::postprocessSingle(cv::Size_<int> const&,Ort::Value const&)
jmp short $+2
loc_1CACD:
lea rdi, [rsp+1B8h+var_118]
call _ZNSt6vectorIN3Ort5ValueESaIS1_EED2Ev; std::vector<Ort::Value>::~vector()
lea rdi, [rsp+1B8h+var_100]; this
call _ZN3Ort5ValueD2Ev; Ort::Value::~Value()
lea rdi, [rsp+1B8h+var_F8]; this
call _ZN3Ort10MemoryInfoD2Ev; Ort::MemoryInfo::~MemoryInfo()
lea rdi, [rsp+1B8h+var_F0]; this
call __ZN2cv3MatD1Ev; cv::Mat::~Mat()
lea rdi, [rsp+1B8h+var_90]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
lea rdi, [rsp+1B8h+var_30]
call _ZNSt6vectorIlSaIlEED2Ev; std::vector<long>::~vector()
mov rax, qword ptr [rsp+1B8h+var_148]
add rsp, 1B8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
lea rdi, [rsp+1B8h+var_61]
call _ZNSaIlED2Ev; std::allocator<long>::~allocator()
jmp loc_1CC31
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
jmp loc_1CC17
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
jmp loc_1CC0A
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
jmp short loc_1CBFD
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
jmp short loc_1CBF0
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
lea rdi, [rsp+1B8h+var_120]; this
call _ZN3Ort10RunOptionsD2Ev; Ort::RunOptions::~RunOptions()
jmp short loc_1CBF0
mov rcx, rax
mov eax, edx
mov [rsp+1B8h+var_70], rcx
mov [rsp+1B8h+var_74], eax
lea rdi, [rsp+1B8h+var_118]
call _ZNSt6vectorIN3Ort5ValueESaIS1_EED2Ev; std::vector<Ort::Value>::~vector()
loc_1CBF0:
lea rdi, [rsp+1B8h+var_100]; this
call _ZN3Ort5ValueD2Ev; Ort::Value::~Value()
loc_1CBFD:
lea rdi, [rsp+1B8h+var_F8]; this
call _ZN3Ort10MemoryInfoD2Ev; Ort::MemoryInfo::~MemoryInfo()
loc_1CC0A:
lea rdi, [rsp+1B8h+var_F0]; this
call __ZN2cv3MatD1Ev; cv::Mat::~Mat()
loc_1CC17:
lea rdi, [rsp+1B8h+var_90]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
lea rdi, [rsp+1B8h+var_30]
call _ZNSt6vectorIlSaIlEED2Ev; std::vector<long>::~vector()
loc_1CC31:
mov eax, [rsp+1B8h+var_74]
mov ecx, 1
cmp eax, ecx
jnz short loc_1CC7A
mov rdi, [rsp+1B8h+var_70]; void *
call ___cxa_begin_catch
mov [rsp+1B8h+var_130], rax
call ___cxa_rethrow
| DepthAnything * DepthAnything::predict(
DepthAnything *this,
const cv::Mat *a2,
cv::Mat *a3,
double a4,
__m128 a5)
{
int v5; // r8d
int v6; // r9d
long long v7; // rax
long long v8; // rax
long long v9; // rax
int v11; // [rsp+18h] [rbp-1A0h]
int v12[2]; // [rsp+20h] [rbp-198h]
int v13; // [rsp+28h] [rbp-190h]
char v14[8]; // [rsp+40h] [rbp-178h]
int v15[2]; // [rsp+48h] [rbp-170h]
int v16[2]; // [rsp+50h] [rbp-168h]
int v17[2]; // [rsp+58h] [rbp-160h]
int v18; // [rsp+90h] [rbp-128h] BYREF
_BYTE v19[8]; // [rsp+98h] [rbp-120h] BYREF
_BYTE v20[24]; // [rsp+A0h] [rbp-118h] BYREF
_BYTE v21[8]; // [rsp+B8h] [rbp-100h] BYREF
_BYTE v22[8]; // [rsp+C0h] [rbp-F8h] BYREF
char v23[96]; // [rsp+C8h] [rbp-F0h] BYREF
char v24[4]; // [rsp+128h] [rbp-90h] BYREF
char v25; // [rsp+157h] [rbp-61h] BYREF
_QWORD v26[4]; // [rsp+158h] [rbp-60h] BYREF
_QWORD *v27; // [rsp+178h] [rbp-40h]
long long v28; // [rsp+180h] [rbp-38h]
int v29[6]; // [rsp+188h] [rbp-30h] BYREF
cv::Mat *v30; // [rsp+1A0h] [rbp-18h]
int v31[2]; // [rsp+1A8h] [rbp-10h]
DepthAnything *v32; // [rsp+1B0h] [rbp-8h]
v32 = this;
*(_QWORD *)v31 = a2;
v30 = a3;
v26[0] = 1LL;
v26[1] = 3LL;
v26[2] = *((int *)a2 + 8);
v26[3] = *((int *)a2 + 7);
v27 = v26;
v28 = 4LL;
std::allocator<long>::allocator();
std::vector<long>::vector((unsigned int)v29, (_DWORD)v27, v28, (unsigned int)&v25, v5, v6);
std::allocator<long>::~allocator(&v25);
std::vector<float>::vector();
DepthAnything::preprocessSingle((DepthUtils *)v23, (long long)a2, v30, (long long)v24, (long long)v29, a4, a5);
Ort::MemoryInfo::CreateCpu(v22, 1LL, 0LL);
*(_QWORD *)v14 = Ort::detail::Base<OrtMemoryInfo>::operator OrtMemoryInfo*(v22);
*(_QWORD *)v15 = std::vector<float>::data();
*(_QWORD *)v16 = std::vector<float>::size(v24);
*(_QWORD *)v17 = std::vector<long>::data();
v7 = std::vector<long>::size(v29);
Ort::Value::CreateTensor<float>(v21, *(_QWORD *)v14, *(_QWORD *)v15, *(_QWORD *)v16, *(_QWORD *)v17, v7);
v13 = std::unique_ptr<Ort::Session>::operator->((char *)a2 + 16);
Ort::RunOptions::RunOptions(v19, 0LL);
v11 = std::vector<char const*>::data((char *)a2 + 64);
*(_QWORD *)v12 = *((_QWORD *)a2 + 23);
v8 = std::vector<char const*>::data((char *)a2 + 112);
Ort::detail::SessionImpl<OrtSession>::Run(
(unsigned int)v20,
v13,
(unsigned int)v19,
v11,
(unsigned int)v21,
v12[0],
v8,
*((_QWORD *)a2 + 24));
Ort::RunOptions::~RunOptions((Ort::RunOptions *)v19);
cv::MatSize::operator()(&v18, (char *)v30 + 64);
v9 = std::vector<Ort::Value>::operator[](v20, 0LL);
DepthAnything::postprocessSingle(this, (long long)a2, (long long)&v18, v9, a4, a5);
std::vector<Ort::Value>::~vector(v20);
Ort::Value::~Value((Ort::Value *)v21);
Ort::MemoryInfo::~MemoryInfo((Ort::MemoryInfo *)v22);
cv::Mat::~Mat((cv::Mat *)v23);
std::vector<float>::~vector(v24);
std::vector<long>::~vector(v29);
return this;
}
| predict:
SUB RSP,0x1b8
MOV qword ptr [RSP + 0x68],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x1b0],RDI
MOV qword ptr [RSP + 0x1a8],RSI
MOV qword ptr [RSP + 0x1a0],RDX
MOV RAX,qword ptr [RSP + 0x1a8]
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x158],0x1
MOV qword ptr [RSP + 0x160],0x3
MOVSXD RCX,dword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x168],RCX
MOVSXD RAX,dword ptr [RAX + 0x1c]
MOV qword ptr [RSP + 0x170],RAX
LEA RAX,[RSP + 0x158]
MOV qword ptr [RSP + 0x178],RAX
MOV qword ptr [RSP + 0x180],0x4
LEA RDI,[RSP + 0x157]
MOV qword ptr [RSP + 0x80],RDI
CALL 0x00121940
MOV RCX,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x178]
MOV RDX,qword ptr [RSP + 0x180]
LAB_0011c8f2:
LEA RDI,[RSP + 0x188]
CALL 0x00121950
JMP 0x0011c901
LAB_0011c901:
LEA RDI,[RSP + 0x157]
CALL 0x001219e0
LEA RDI,[RSP + 0x128]
MOV qword ptr [RSP + 0x60],RDI
CALL 0x001219f0
MOV RSI,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x1a0]
LAB_0011c932:
LEA RDI,[RSP + 0xc8]
LEA R8,[RSP + 0x188]
CALL 0x0011b3d0
JMP 0x0011c949
LAB_0011c949:
LEA RDI,[RSP + 0xc0]
MOV ESI,0x1
XOR EDX,EDX
CALL 0x00121a00
JMP 0x0011c95f
LAB_0011c95f:
LEA RDI,[RSP + 0xc0]
CALL 0x00121ac0
MOV qword ptr [RSP + 0x40],RAX
LEA RDI,[RSP + 0x128]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x00121ad0
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x48],RAX
CALL 0x00121af0
MOV qword ptr [RSP + 0x50],RAX
LEA RDI,[RSP + 0x188]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x00121b10
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x58],RAX
CALL 0x001207f0
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x50]
MOV R8,qword ptr [RSP + 0x58]
MOV R9,RAX
LAB_0011c9cf:
LEA RDI,[RSP + 0xb8]
CALL 0x00121a60
JMP 0x0011c9de
LAB_0011c9de:
MOV RDI,qword ptr [RSP + 0x78]
ADD RDI,0x10
CALL 0x001205d0
MOV qword ptr [RSP + 0x28],RAX
LAB_0011c9f1:
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0x98]
CALL 0x00121cc0
JMP 0x0011ca04
LAB_0011ca04:
MOV RDI,qword ptr [RSP + 0x78]
ADD RDI,0x40
CALL 0x00121ce0
MOV RDI,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV qword ptr [RSP + 0x20],RAX
ADD RDI,0x70
CALL 0x00121ce0
MOV RSI,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x18]
MOV R9,qword ptr [RSP + 0x20]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV RDI,qword ptr [RAX + 0xc0]
LAB_0011ca4f:
MOV RAX,RSP
MOV qword ptr [RAX + 0x8],RDI
MOV qword ptr [RAX],RDX
LEA RDI,[RSP + 0xa0]
LEA RDX,[RSP + 0x98]
LEA R8,[RSP + 0xb8]
CALL 0x00121b30
JMP 0x0011ca78
LAB_0011ca78:
LEA RDI,[RSP + 0x98]
CALL 0x00121d00
MOV RSI,qword ptr [RSP + 0x1a0]
ADD RSI,0x40
LAB_0011ca91:
LEA RDI,[RSP + 0x90]
CALL 0x00121d10
JMP 0x0011caa0
LAB_0011caa0:
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0xa0]
CALL 0x00121d50
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x78]
MOV RCX,RAX
LEA RDX,[RSP + 0x90]
CALL 0x0011c080
LAB_0011cacb:
JMP 0x0011cacd
LAB_0011cacd:
LEA RDI,[RSP + 0xa0]
CALL 0x00121d70
LEA RDI,[RSP + 0xb8]
CALL 0x00121dd0
LEA RDI,[RSP + 0xc0]
CALL 0x00121de0
LEA RDI,[RSP + 0xc8]
CALL 0x0011a090
LEA RDI,[RSP + 0x128]
CALL 0x00120c70
LEA RDI,[RSP + 0x188]
CALL 0x00120b90
MOV RAX,qword ptr [RSP + 0x70]
ADD RSP,0x1b8
RET
|
/* DepthAnything::predict(cv::Mat const&) */
Mat * DepthAnything::predict(Mat *param_1)
{
OrtMemoryInfo *pOVar1;
float *pfVar2;
ulong uVar3;
long *plVar4;
ulong uVar5;
char **ppcVar6;
vector *in_RDX;
vector *in_RSI;
MatSize local_128 [8];
RunOptions local_120 [8];
RunOptions local_118 [24];
Value local_100 [8];
MemoryInfo local_f8 [8];
Mat local_f0 [96];
vector<float,std::allocator<float>> local_90 [47];
allocator<long> local_61;
int8 local_60;
int8 local_58;
long local_50;
long local_48;
int8 *local_40;
int8 local_38;
vector<long,std::allocator<long>> local_30 [24];
vector *local_18;
Mat *local_8;
local_60 = 1;
local_58 = 3;
local_50 = (long)*(int *)(in_RSI + 0x20);
local_48 = (long)*(int *)(in_RSI + 0x1c);
local_40 = &local_60;
local_38 = 4;
local_18 = in_RDX;
local_8 = param_1;
std::allocator<long>::allocator(&local_61);
/* try { // try from 0011c8f2 to 0011c8fe has its CatchHandler @ 0011cb28 */
std::vector<long,std::allocator<long>>::vector(local_30,local_40,local_38,&local_61);
std::allocator<long>::~allocator(&local_61);
std::vector<float,std::allocator<float>>::vector(local_90);
/* try { // try from 0011c932 to 0011c946 has its CatchHandler @ 0011cb4e */
preprocessSingle(local_f0,in_RSI,local_18);
/* try { // try from 0011c949 to 0011c95c has its CatchHandler @ 0011cb67 */
Ort::MemoryInfo::CreateCpu(local_f8,1,0);
pOVar1 = Ort::detail::Base::operator_cast_to_OrtMemoryInfo_((Base *)local_f8);
pfVar2 = (float *)std::vector<float,std::allocator<float>>::data(local_90);
uVar3 = std::vector<float,std::allocator<float>>::size(local_90);
plVar4 = (long *)std::vector<long,std::allocator<long>>::data(local_30);
uVar5 = std::vector<long,std::allocator<long>>::size(local_30);
/* try { // try from 0011c9cf to 0011c9db has its CatchHandler @ 0011cb80 */
Ort::Value::CreateTensor<float>(local_100,pOVar1,pfVar2,uVar3,plVar4,uVar5);
ppcVar6 = (char **)std::unique_ptr<Ort::Session,std::default_delete<Ort::Session>>::operator->
((unique_ptr<Ort::Session,std::default_delete<Ort::Session>> *)
(in_RSI + 0x10));
/* try { // try from 0011c9f1 to 0011ca01 has its CatchHandler @ 0011cb96 */
Ort::RunOptions::RunOptions(local_120,(_func_decltype_nullptr *)0x0);
uVar5 = std::vector<char_const*,std::allocator<char_const*>>::data
((vector<char_const*,std::allocator<char_const*>> *)(in_RSI + 0x40));
uVar3 = *(ulong *)(in_RSI + 0xb8);
std::vector<char_const*,std::allocator<char_const*>>::data
((vector<char_const*,std::allocator<char_const*>> *)(in_RSI + 0x70));
/* try { // try from 0011ca4f to 0011ca75 has its CatchHandler @ 0011cbac */
Ort::detail::SessionImpl<OrtSession>::Run
(local_118,ppcVar6,(Value *)local_120,uVar5,(char **)local_100,uVar3);
Ort::RunOptions::~RunOptions(local_120);
/* try { // try from 0011ca91 to 0011caca has its CatchHandler @ 0011cbcf */
cv::MatSize::operator()(local_128);
std::vector<Ort::Value,std::allocator<Ort::Value>>::operator[]
((vector<Ort::Value,std::allocator<Ort::Value>> *)local_118,0);
postprocessSingle((Size_ *)param_1,(Value *)in_RSI);
std::vector<Ort::Value,std::allocator<Ort::Value>>::~vector
((vector<Ort::Value,std::allocator<Ort::Value>> *)local_118);
Ort::Value::~Value(local_100);
Ort::MemoryInfo::~MemoryInfo(local_f8);
cv::Mat::~Mat(local_f0);
std::vector<float,std::allocator<float>>::~vector(local_90);
std::vector<long,std::allocator<long>>::~vector(local_30);
return param_1;
}
| |
40,231 | ast_create_define | tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c | AstNode* ast_create_define(Arena* arena, AstNode* name, AstNode* value, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_DEFINE, line, column);
if (!node) {
return NULL;
}
node->as.define.name = name;
node->as.define.value = value;
return node;
} | O2 | c | ast_create_define:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x7
popq %rsi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x99ac
testq %rax, %rax
je 0x9b08
movq %r14, 0x48(%rax)
movq %rbx, 0x50(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| ast_create_define:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
push 7
pop rsi
mov rdx, rcx
mov rcx, r8
call ast_create_node
test rax, rax
jz short loc_9B08
mov [rax+48h], r14
mov [rax+50h], rbx
loc_9B08:
add rsp, 8
pop rbx
pop r14
retn
| long long ast_create_define(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long result; // rax
result = ast_create_node(a1, 7, a4, a5);
if ( result )
{
*(_QWORD *)(result + 72) = a2;
*(_QWORD *)(result + 80) = a3;
}
return result;
}
| ast_create_define:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
PUSH 0x7
POP RSI
MOV RDX,RCX
MOV RCX,R8
CALL 0x001099ac
TEST RAX,RAX
JZ 0x00109b08
MOV qword ptr [RAX + 0x48],R14
MOV qword ptr [RAX + 0x50],RBX
LAB_00109b08:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void ast_create_define(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
long lVar1;
lVar1 = ast_create_node(param_1,7,param_4,param_5);
if (lVar1 != 0) {
*(int8 *)(lVar1 + 0x48) = param_2;
*(int8 *)(lVar1 + 0x50) = param_3;
}
return;
}
| |
40,232 | my_getcputime | eloqsql/mysys/my_getsystime.c | ulonglong my_getcputime()
{
#ifdef CLOCK_THREAD_CPUTIME_ID
struct timespec tp;
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#elif defined(__NR_clock_gettime)
struct timespec tp;
if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#endif /* CLOCK_THREAD_CPUTIME_ID */
return 0;
} | O0 | c | my_getcputime:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x3, %edi
leaq -0x18(%rbp), %rsi
callq 0x2a2e0
cmpl $0x0, %eax
je 0xf68e5
movq $0x0, -0x8(%rbp)
jmp 0xf690d
imulq $0x989680, -0x18(%rbp), %rax # imm = 0x989680
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_getcputime:
push rbp
mov rbp, rsp
sub rsp, 20h
mov edi, 3
lea rsi, [rbp+var_18]
call _clock_gettime
cmp eax, 0
jz short loc_F68E5
mov [rbp+var_8], 0
jmp short loc_F690D
loc_F68E5:
imul rax, [rbp+var_18], 989680h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rax, rcx
mov [rbp+var_8], rax
loc_F690D:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| unsigned long long my_getcputime()
{
long long v1; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v2; // [rsp+10h] [rbp-10h]
if ( (unsigned int)clock_gettime(3LL, &v1) )
return 0LL;
else
return v2 / 0x64 + 10000000 * v1;
}
| my_getcputime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV EDI,0x3
LEA RSI,[RBP + -0x18]
CALL 0x0012a2e0
CMP EAX,0x0
JZ 0x001f68e5
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001f690d
LAB_001f68e5:
IMUL RAX,qword ptr [RBP + -0x18],0x989680
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x64
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_001f690d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long my_getcputime(void)
{
int iVar1;
timespec local_20;
long local_10;
iVar1 = clock_gettime(3,&local_20);
if (iVar1 == 0) {
local_10 = local_20.tv_sec * 10000000 + (ulong)local_20.tv_nsec / 100;
}
else {
local_10 = 0;
}
return local_10;
}
| |
40,233 | js_os_ttySetRaw | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_ttySetRaw(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
struct termios tty;
int fd;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
memset(&tty, 0, sizeof(tty));
tcgetattr(fd, &tty);
oldtty = tty;
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8;
tty.c_cc[VMIN] = 1;
tty.c_cc[VTIME] = 0;
tcsetattr(fd, TCSANOW, &tty);
atexit(term_exit);
return JS_UNDEFINED;
} | O0 | c | js_os_ttySetRaw:
subq $0x78, %rsp
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %rdi, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq %r8, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq %rsp, %rsi
callq 0x38f20
cmpl $0x0, %eax
je 0x18590
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
jmp 0x18637
leaq 0x4(%rsp), %rdi
xorl %esi, %esi
movl $0x3c, %edx
callq 0xe350
movl (%rsp), %edi
leaq 0x4(%rsp), %rsi
callq 0xe750
leaq 0x11e05b(%rip), %rdi # 0x136610
leaq 0x4(%rsp), %rsi
movl $0x3c, %edx
callq 0xe5b0
movl 0x4(%rsp), %eax
andl $0xfffffa14, %eax # imm = 0xFFFFFA14
movl %eax, 0x4(%rsp)
movl 0x8(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x8(%rsp)
movl 0x10(%rsp), %eax
andl $0xffff7fb5, %eax # imm = 0xFFFF7FB5
movl %eax, 0x10(%rsp)
movl 0xc(%rsp), %eax
andl $0xfffffecf, %eax # imm = 0xFFFFFECF
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
orl $0x30, %eax
movl %eax, 0xc(%rsp)
movb $0x1, 0x1b(%rsp)
movb $0x0, 0x1a(%rsp)
movl (%rsp), %edi
xorl %esi, %esi
leaq 0x4(%rsp), %rdx
callq 0xe760
leaq 0x46af(%rip), %rdi # 0x1ccd0
callq 0x1083b0
movl $0x0, 0x68(%rsp)
movq $0x3, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
| js_os_ttySetRaw:
sub rsp, 78h
mov [rsp+78h+var_20], rsi
mov [rsp+78h+var_18], rdx
mov [rsp+78h+var_28], rdi
mov [rsp+78h+var_2C], ecx
mov [rsp+78h+var_38], r8
mov rdi, [rsp+78h+var_28]
mov rax, [rsp+78h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
mov rsi, rsp
call JS_ToInt32
cmp eax, 0
jz short loc_18590
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
jmp loc_18637
loc_18590:
lea rdi, [rsp+78h+var_74]
xor esi, esi
mov edx, 3Ch ; '<'
call _memset
mov edi, [rsp+78h+var_78]
lea rsi, [rsp+78h+var_74]
call _tcgetattr
lea rdi, oldtty
lea rsi, [rsp+78h+var_74]
mov edx, 3Ch ; '<'
call _memcpy
mov eax, [rsp+78h+var_74]
and eax, 0FFFFFA14h
mov [rsp+78h+var_74], eax
mov eax, [rsp+78h+var_70]
or eax, 1
mov [rsp+78h+var_70], eax
mov eax, [rsp+78h+var_68]
and eax, 0FFFF7FB5h
mov [rsp+78h+var_68], eax
mov eax, [rsp+78h+var_6C]
and eax, 0FFFFFECFh
mov [rsp+78h+var_6C], eax
mov eax, [rsp+78h+var_6C]
or eax, 30h
mov [rsp+78h+var_6C], eax
mov [rsp+78h+var_5D], 1
mov [rsp+78h+var_5E], 0
mov edi, [rsp+78h+var_78]
xor esi, esi
lea rdx, [rsp+78h+var_74]
call _tcsetattr
lea rdi, term_exit
call atexit
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 3
loc_18637:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
| long long js_os_ttySetRaw(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
unsigned int v6; // [rsp+0h] [rbp-78h] BYREF
int v7; // [rsp+4h] [rbp-74h] BYREF
int v8; // [rsp+8h] [rbp-70h]
int v9; // [rsp+Ch] [rbp-6Ch]
int v10; // [rsp+10h] [rbp-68h]
char v11; // [rsp+1Ah] [rbp-5Eh]
char v12; // [rsp+1Bh] [rbp-5Dh]
_QWORD *v13; // [rsp+40h] [rbp-38h]
int v14; // [rsp+4Ch] [rbp-2Ch]
long long v15; // [rsp+50h] [rbp-28h]
long long v16; // [rsp+58h] [rbp-20h]
long long v17; // [rsp+60h] [rbp-18h]
long long v18; // [rsp+68h] [rbp-10h]
long long v19; // [rsp+70h] [rbp-8h]
v16 = a2;
v17 = a3;
v15 = a1;
v14 = a4;
v13 = a5;
if ( (unsigned int)JS_ToInt32(a1, &v6, *a5, a5[1]) )
{
LODWORD(v18) = 0;
v19 = 6LL;
}
else
{
memset(&v7, 0LL, 60LL);
tcgetattr(v6, &v7);
memcpy(&oldtty, &v7, 60LL);
v7 &= 0xFFFFFA14;
v8 |= 1u;
v10 &= 0xFFFF7FB5;
v9 &= 0xFFFFFECF;
v9 |= 0x30u;
v12 = 1;
v11 = 0;
tcsetattr(v6, 0LL, &v7);
atexit(term_exit);
LODWORD(v18) = 0;
v19 = 3LL;
}
return v18;
}
| js_os_ttySetRaw:
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x50],RDI
MOV dword ptr [RSP + 0x4c],ECX
MOV qword ptr [RSP + 0x40],R8
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
MOV RSI,RSP
CALL 0x00138f20
CMP EAX,0x0
JZ 0x00118590
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
JMP 0x00118637
LAB_00118590:
LEA RDI,[RSP + 0x4]
XOR ESI,ESI
MOV EDX,0x3c
CALL 0x0010e350
MOV EDI,dword ptr [RSP]
LEA RSI,[RSP + 0x4]
CALL 0x0010e750
LEA RDI,[0x236610]
LEA RSI,[RSP + 0x4]
MOV EDX,0x3c
CALL 0x0010e5b0
MOV EAX,dword ptr [RSP + 0x4]
AND EAX,0xfffffa14
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP + 0x8]
OR EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x10]
AND EAX,0xffff7fb5
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0xc]
AND EAX,0xfffffecf
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0xc]
OR EAX,0x30
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0x1b],0x1
MOV byte ptr [RSP + 0x1a],0x0
MOV EDI,dword ptr [RSP]
XOR ESI,ESI
LEA RDX,[RSP + 0x4]
CALL 0x0010e760
LEA RDI,[0x11ccd0]
CALL 0x002083b0
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x3
LAB_00118637:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16]
js_os_ttySetRaw(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int local_78;
termios local_74;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
iVar2 = JS_ToInt32(param_1,&local_78,*param_5,param_5[1]);
if (iVar2 == 0) {
memset(&local_74,0,0x3c);
tcgetattr(local_78,&local_74);
memcpy(oldtty,&local_74,0x3c);
local_74.c_iflag = local_74.c_iflag & 0xfffffa14;
local_74.c_oflag = local_74.c_oflag | 1;
local_74.c_lflag = local_74.c_lflag & 0xffff7fb5;
local_74.c_cflag = local_74.c_cflag & 0xfffffecf | 0x30;
local_74.c_cc[6] = '\x01';
local_74.c_cc[5] = '\0';
tcsetattr(local_78,0,&local_74);
atexit(term_exit);
local_8 = 3;
}
else {
local_8 = 6;
}
auVar1._4_8_ = local_8;
auVar1._0_4_ = uStack_c;
auVar1._12_4_ = 0;
return auVar1 << 0x20;
}
| |
40,234 | js_os_ttySetRaw | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_ttySetRaw(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
struct termios tty;
int fd;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
memset(&tty, 0, sizeof(tty));
tcgetattr(fd, &tty);
oldtty = tty;
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8;
tty.c_cc[VMIN] = 1;
tty.c_cc[VTIME] = 0;
tcsetattr(fd, TCSANOW, &tty);
atexit(term_exit);
return JS_UNDEFINED;
} | O1 | c | js_os_ttySetRaw:
pushq %rbx
subq $0x50, %rsp
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0xc(%rsp), %rsi
callq 0x279b0
movl $0x6, %edx
testl %eax, %eax
jne 0x18c9c
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movups %xmm0, 0x2c(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl 0xc(%rsp), %edi
movq %rbx, %rsi
callq 0xe760
movaps (%rbx), %xmm0
movaps 0x10(%rbx), %xmm1
movaps 0x20(%rbx), %xmm2
movups %xmm0, 0xb4979(%rip) # 0xcd5b8
movups %xmm1, 0xb4982(%rip) # 0xcd5c8
andl $0xfffffa14, (%rbx) # imm = 0xFFFFFA14
movups 0x2c(%rbx), %xmm0
orb $0x1, 0x4(%rbx)
movups %xmm2, 0xb497d(%rip) # 0xcd5d8
andl $0xffff7fb5, 0xc(%rbx) # imm = 0xFFFF7FB5
movups %xmm0, 0xb497b(%rip) # 0xcd5e4
movl $0xfffffecf, %eax # imm = 0xFFFFFECF
andl 0x8(%rbx), %eax
orl $0x30, %eax
movl %eax, 0x8(%rbx)
movw $0x100, 0x16(%rbx) # imm = 0x100
movl 0xc(%rsp), %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xe770
leaq 0x1e67(%rip), %rdi # 0x1aaf9
callq 0x9aa20
movl $0x3, %edx
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
retq
| js_os_ttySetRaw:
push rbx
sub rsp, 50h
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+58h+var_4C]
call JS_ToInt32
mov edx, 6
test eax, eax
jnz loc_18C9C
xorps xmm0, xmm0
lea rbx, [rsp+58h+var_48]
movups xmmword ptr [rbx+2Ch], xmm0
movaps xmmword ptr [rbx+20h], xmm0
movaps xmmword ptr [rbx+10h], xmm0
movaps xmmword ptr [rbx], xmm0
mov edi, [rsp+58h+var_4C]
mov rsi, rbx
call _tcgetattr
movaps xmm0, xmmword ptr [rbx]
movaps xmm1, xmmword ptr [rbx+10h]
movaps xmm2, xmmword ptr [rbx+20h]
movups cs:oldtty, xmm0
movups cs:xmmword_CD5C8, xmm1
and dword ptr [rbx], 0FFFFFA14h
movups xmm0, xmmword ptr [rbx+2Ch]
or byte ptr [rbx+4], 1
movups cs:xmmword_CD5D8, xmm2
and dword ptr [rbx+0Ch], 0FFFF7FB5h
movups cs:xmmword_CD5D8+0Ch, xmm0
mov eax, 0FFFFFECFh
and eax, [rbx+8]
or eax, 30h
mov [rbx+8], eax
mov word ptr [rbx+16h], 100h
mov edi, [rsp+58h+var_4C]
xor esi, esi
mov rdx, rbx
call _tcsetattr
lea rdi, term_exit
call atexit
mov edx, 3
loc_18C9C:
xor eax, eax
add rsp, 50h
pop rbx
retn
| long long js_os_ttySetRaw(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned int v6; // [rsp+Ch] [rbp-4Ch] BYREF
__int128 v7; // [rsp+10h] [rbp-48h] BYREF
__int128 v8; // [rsp+20h] [rbp-38h]
_OWORD v9[2]; // [rsp+30h] [rbp-28h] BYREF
if ( !(unsigned int)JS_ToInt32(a1, &v6, *a5, a5[1]) )
{
memset(v9, 0, 28);
v8 = 0LL;
v7 = 0LL;
tcgetattr(v6, &v7, 6LL);
oldtty = v7;
xmmword_CD5C8 = v8;
LODWORD(v7) = v7 & 0xFFFFFA14;
BYTE4(v7) |= 1u;
xmmword_CD5D8 = v9[0];
HIDWORD(v7) &= 0xFFFF7FB5;
*(__int128 *)((char *)&xmmword_CD5D8 + 12) = *(_OWORD *)((char *)v9 + 12);
DWORD2(v7) = DWORD2(v7) & 0xFFFFFECF | 0x30;
WORD3(v8) = 256;
tcsetattr(v6, 0LL, &v7);
atexit(term_exit);
}
return 0LL;
}
| |||
40,235 | js_os_ttySetRaw | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_ttySetRaw(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
struct termios tty;
int fd;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
memset(&tty, 0, sizeof(tty));
tcgetattr(fd, &tty);
oldtty = tty;
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8;
tty.c_cc[VMIN] = 1;
tty.c_cc[VTIME] = 0;
tcsetattr(fd, TCSANOW, &tty);
atexit(term_exit);
return JS_UNDEFINED;
} | O2 | c | js_os_ttySetRaw:
pushq %rbx
subq $0x50, %rsp
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0xc(%rsp), %rsi
callq 0x215d7
testl %eax, %eax
je 0x138aa
pushq $0x6
jmp 0x13939
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movups %xmm0, 0x2c(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl 0xc(%rsp), %edi
movq %rbx, %rsi
callq 0xe780
movaps (%rbx), %xmm0
movaps 0x10(%rbx), %xmm1
movaps 0x20(%rbx), %xmm2
movups %xmm0, 0xa7ce9(%rip) # 0xbb5c8
movups %xmm1, 0xa7cf2(%rip) # 0xbb5d8
andl $0xfffffa14, (%rbx) # imm = 0xFFFFFA14
movups 0x2c(%rbx), %xmm0
orb $0x1, 0x4(%rbx)
movups %xmm2, 0xa7ced(%rip) # 0xbb5e8
andl $0xffff7fb5, 0xc(%rbx) # imm = 0xFFFF7FB5
movups %xmm0, 0xa7ceb(%rip) # 0xbb5f4
movl $0xfffffecf, %eax # imm = 0xFFFFFECF
andl 0x8(%rbx), %eax
orl $0x30, %eax
movl %eax, 0x8(%rbx)
movw $0x100, 0x16(%rbx) # imm = 0x100
movl 0xc(%rsp), %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xe790
leaq 0x1e22(%rip), %rdi # 0x15754
callq 0x81250
pushq $0x3
popq %rdx
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
retq
| js_os_ttySetRaw:
push rbx
sub rsp, 50h
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+58h+var_4C]
call JS_ToInt32
test eax, eax
jz short loc_138AA
push 6
jmp loc_13939
loc_138AA:
xorps xmm0, xmm0
lea rbx, [rsp+58h+var_48]
movups xmmword ptr [rbx+2Ch], xmm0
movaps xmmword ptr [rbx+20h], xmm0
movaps xmmword ptr [rbx+10h], xmm0
movaps xmmword ptr [rbx], xmm0
mov edi, [rsp+58h+var_4C]
mov rsi, rbx
call _tcgetattr
movaps xmm0, xmmword ptr [rbx]
movaps xmm1, xmmword ptr [rbx+10h]
movaps xmm2, xmmword ptr [rbx+20h]
movups cs:oldtty, xmm0
movups cs:xmmword_BB5D8, xmm1
and dword ptr [rbx], 0FFFFFA14h
movups xmm0, xmmword ptr [rbx+2Ch]
or byte ptr [rbx+4], 1
movups cs:xmmword_BB5E8, xmm2
and dword ptr [rbx+0Ch], 0FFFF7FB5h
movups cs:xmmword_BB5E8+0Ch, xmm0
mov eax, 0FFFFFECFh
and eax, [rbx+8]
or eax, 30h
mov [rbx+8], eax
mov word ptr [rbx+16h], 100h
mov edi, [rsp+58h+var_4C]
xor esi, esi
mov rdx, rbx
call _tcsetattr
lea rdi, term_exit
call atexit
push 3
loc_13939:
pop rdx
xor eax, eax
add rsp, 50h
pop rbx
retn
| long long js_os_ttySetRaw(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned int v6; // [rsp+Ch] [rbp-4Ch] BYREF
__int128 v7; // [rsp+10h] [rbp-48h] BYREF
__int128 v8; // [rsp+20h] [rbp-38h]
_OWORD v9[2]; // [rsp+30h] [rbp-28h] BYREF
if ( !(unsigned int)JS_ToInt32(a1, &v6, *a5, a5[1]) )
{
memset(v9, 0, 28);
v8 = 0LL;
v7 = 0LL;
tcgetattr(v6, &v7);
oldtty = v7;
xmmword_BB5D8 = v8;
LODWORD(v7) = v7 & 0xFFFFFA14;
BYTE4(v7) |= 1u;
xmmword_BB5E8 = v9[0];
HIDWORD(v7) &= 0xFFFF7FB5;
*(__int128 *)((char *)&xmmword_BB5E8 + 12) = *(_OWORD *)((char *)v9 + 12);
DWORD2(v7) = DWORD2(v7) & 0xFFFFFECF | 0x30;
WORD3(v8) = 256;
tcsetattr(v6, 0LL, &v7);
atexit(term_exit);
}
return 0LL;
}
| js_os_ttySetRaw:
PUSH RBX
SUB RSP,0x50
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x001215d7
TEST EAX,EAX
JZ 0x001138aa
PUSH 0x6
JMP 0x00113939
LAB_001138aa:
XORPS XMM0,XMM0
LEA RBX,[RSP + 0x10]
MOVUPS xmmword ptr [RBX + 0x2c],XMM0
MOVAPS xmmword ptr [RBX + 0x20],XMM0
MOVAPS xmmword ptr [RBX + 0x10],XMM0
MOVAPS xmmword ptr [RBX],XMM0
MOV EDI,dword ptr [RSP + 0xc]
MOV RSI,RBX
CALL 0x0010e780
MOVAPS XMM0,xmmword ptr [RBX]
MOVAPS XMM1,xmmword ptr [RBX + 0x10]
MOVAPS XMM2,xmmword ptr [RBX + 0x20]
MOVUPS xmmword ptr [0x001bb5c8],XMM0
MOVUPS xmmword ptr [0x001bb5d8],XMM1
AND dword ptr [RBX],0xfffffa14
MOVUPS XMM0,xmmword ptr [RBX + 0x2c]
OR byte ptr [RBX + 0x4],0x1
MOVUPS xmmword ptr [0x001bb5e8],XMM2
AND dword ptr [RBX + 0xc],0xffff7fb5
MOVUPS xmmword ptr [0x001bb5f4],XMM0
MOV EAX,0xfffffecf
AND EAX,dword ptr [RBX + 0x8]
OR EAX,0x30
MOV dword ptr [RBX + 0x8],EAX
MOV word ptr [RBX + 0x16],0x100
MOV EDI,dword ptr [RSP + 0xc]
XOR ESI,ESI
MOV RDX,RBX
CALL 0x0010e790
LEA RDI,[0x115754]
CALL 0x00181250
PUSH 0x3
LAB_00113939:
POP RDX
XOR EAX,EAX
ADD RSP,0x50
POP RBX
RET
|
int1 [16] js_os_ttySetRaw(int8 param_1)
{
int1 auVar1 [16];
int iVar2;
int8 *in_R8;
ulong uStack_60;
int local_4c;
termios local_48;
iVar2 = JS_ToInt32(param_1,&local_4c,*in_R8,in_R8[1]);
if (iVar2 == 0) {
local_48.c_cc[0x1f] = '\0';
local_48._49_3_ = 0;
local_48.c_ispeed = 0;
local_48.c_ospeed = 0;
local_48.c_cc[0xf] = '\0';
local_48.c_cc[0x10] = '\0';
local_48.c_cc[0x11] = '\0';
local_48.c_cc[0x12] = '\0';
local_48.c_cc[0x13] = '\0';
local_48.c_cc[0x14] = '\0';
local_48.c_cc[0x15] = '\0';
local_48.c_cc[0x16] = '\0';
local_48.c_cc[0x17] = '\0';
local_48.c_cc[0x18] = '\0';
local_48.c_cc[0x19] = '\0';
local_48.c_cc[0x1a] = '\0';
local_48.c_cc[0x1b] = '\0';
local_48.c_cc[0x1c] = '\0';
local_48.c_cc[0x1d] = '\0';
local_48.c_cc[0x1e] = '\0';
local_48.c_line = '\0';
local_48.c_cc[0] = '\0';
local_48.c_cc[1] = '\0';
local_48.c_cc[2] = '\0';
local_48.c_cc[3] = '\0';
local_48.c_cc[4] = '\0';
local_48.c_cc[5] = '\0';
local_48.c_cc[6] = '\0';
local_48.c_cc[7] = '\0';
local_48.c_cc[8] = '\0';
local_48.c_cc[9] = '\0';
local_48.c_cc[10] = '\0';
local_48.c_cc[0xb] = '\0';
local_48.c_cc[0xc] = '\0';
local_48.c_cc[0xd] = '\0';
local_48.c_cc[0xe] = '\0';
local_48.c_iflag = 0;
local_48.c_oflag = 0;
local_48.c_cflag = 0;
local_48.c_lflag = 0;
tcgetattr(local_4c,&local_48);
oldtty._0_4_ = local_48.c_iflag;
oldtty._4_4_ = local_48.c_oflag;
oldtty._8_4_ = local_48.c_cflag;
oldtty._12_4_ = local_48.c_lflag;
oldtty[0x10] = local_48.c_line;
oldtty[0x11] = local_48.c_cc[0];
oldtty[0x12] = local_48.c_cc[1];
oldtty[0x13] = local_48.c_cc[2];
oldtty[0x14] = local_48.c_cc[3];
oldtty[0x15] = local_48.c_cc[4];
oldtty[0x16] = local_48.c_cc[5];
oldtty[0x17] = local_48.c_cc[6];
oldtty[0x18] = local_48.c_cc[7];
oldtty[0x19] = local_48.c_cc[8];
oldtty[0x1a] = local_48.c_cc[9];
oldtty[0x1b] = local_48.c_cc[10];
oldtty[0x1c] = local_48.c_cc[0xb];
oldtty[0x1d] = local_48.c_cc[0xc];
oldtty[0x1e] = local_48.c_cc[0xd];
oldtty[0x1f] = local_48.c_cc[0xe];
local_48._0_8_ = local_48._0_8_ & 0xfffffffffffffa14;
local_48._0_8_ = local_48._0_8_ | 0x100000000;
oldtty[0x20] = local_48.c_cc[0xf];
oldtty[0x21] = local_48.c_cc[0x10];
oldtty[0x22] = local_48.c_cc[0x11];
oldtty[0x23] = local_48.c_cc[0x12];
oldtty[0x24] = local_48.c_cc[0x13];
oldtty[0x25] = local_48.c_cc[0x14];
oldtty[0x26] = local_48.c_cc[0x15];
oldtty[0x27] = local_48.c_cc[0x16];
oldtty[0x28] = local_48.c_cc[0x17];
oldtty[0x29] = local_48.c_cc[0x18];
oldtty[0x2a] = local_48.c_cc[0x19];
oldtty[0x2b] = local_48.c_cc[0x1a];
oldtty[0x2c] = local_48.c_cc[0x1b];
oldtty[0x2d] = local_48.c_cc[0x1c];
oldtty[0x2e] = local_48.c_cc[0x1d];
oldtty[0x2f] = local_48.c_cc[0x1e];
oldtty._48_4_ = local_48._48_4_;
oldtty._52_4_ = local_48.c_ispeed;
oldtty._56_4_ = local_48.c_ospeed;
local_48._8_8_ = local_48._8_8_ & 0xffff7fb5fffffecf | 0x30;
local_48.c_cc._5_2_ = 0x100;
tcsetattr(local_4c,0,&local_48);
atexit(term_exit);
uStack_60 = 3;
}
else {
uStack_60 = 6;
}
auVar1._8_8_ = 0;
auVar1._0_8_ = uStack_60;
return auVar1 << 0x40;
}
| |
40,236 | js_os_ttySetRaw | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_ttySetRaw(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
struct termios tty;
int fd;
if (JS_ToInt32(ctx, &fd, argv[0]))
return JS_EXCEPTION;
memset(&tty, 0, sizeof(tty));
tcgetattr(fd, &tty);
oldtty = tty;
tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8;
tty.c_cc[VMIN] = 1;
tty.c_cc[VTIME] = 0;
tcsetattr(fd, TCSANOW, &tty);
atexit(term_exit);
return JS_UNDEFINED;
} | O3 | c | js_os_ttySetRaw:
pushq %rbx
subq $0x50, %rsp
movq (%r8), %rdx
movq 0x8(%r8), %rcx
leaq 0xc(%rsp), %rsi
callq 0x2803b
movl $0x6, %edx
testl %eax, %eax
jne 0x196be
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movups %xmm0, 0x2c(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl 0xc(%rsp), %edi
movq %rbx, %rsi
callq 0xe760
movaps (%rbx), %xmm0
movaps 0x10(%rbx), %xmm1
movaps 0x20(%rbx), %xmm2
movups %xmm0, 0xb6f57(%rip) # 0xd05b8
movups %xmm1, 0xb6f60(%rip) # 0xd05c8
andl $0xfffffa14, (%rbx) # imm = 0xFFFFFA14
movups 0x2c(%rbx), %xmm0
orb $0x1, 0x4(%rbx)
movups %xmm2, 0xb6f5b(%rip) # 0xd05d8
andl $0xffff7fb5, 0xc(%rbx) # imm = 0xFFFF7FB5
movups %xmm0, 0xb6f59(%rip) # 0xd05e4
movl $0xfffffecf, %eax # imm = 0xFFFFFECF
andl 0x8(%rbx), %eax
orl $0x30, %eax
movl %eax, 0x8(%rbx)
movw $0x100, 0x16(%rbx) # imm = 0x100
movl 0xc(%rsp), %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xe770
leaq 0x1d70(%rip), %rdi # 0x1b424
callq 0x9d350
movl $0x3, %edx
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
retq
| js_os_ttySetRaw:
push rbx
sub rsp, 50h
mov rdx, [r8]
mov rcx, [r8+8]
lea rsi, [rsp+58h+var_4C]
call JS_ToInt32
mov edx, 6
test eax, eax
jnz loc_196BE
xorps xmm0, xmm0
lea rbx, [rsp+58h+var_48]
movups xmmword ptr [rbx+2Ch], xmm0
movaps xmmword ptr [rbx+20h], xmm0
movaps xmmword ptr [rbx+10h], xmm0
movaps xmmword ptr [rbx], xmm0
mov edi, [rsp+58h+var_4C]
mov rsi, rbx
call _tcgetattr
movaps xmm0, xmmword ptr [rbx]
movaps xmm1, xmmword ptr [rbx+10h]
movaps xmm2, xmmword ptr [rbx+20h]
movups cs:oldtty, xmm0
movups cs:xmmword_D05C8, xmm1
and dword ptr [rbx], 0FFFFFA14h
movups xmm0, xmmword ptr [rbx+2Ch]
or byte ptr [rbx+4], 1
movups cs:xmmword_D05D8, xmm2
and dword ptr [rbx+0Ch], 0FFFF7FB5h
movups cs:xmmword_D05D8+0Ch, xmm0
mov eax, 0FFFFFECFh
and eax, [rbx+8]
or eax, 30h
mov [rbx+8], eax
mov word ptr [rbx+16h], 100h
mov edi, [rsp+58h+var_4C]
xor esi, esi
mov rdx, rbx
call _tcsetattr
lea rdi, term_exit
call atexit
mov edx, 3
loc_196BE:
xor eax, eax
add rsp, 50h
pop rbx
retn
| long long js_os_ttySetRaw(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned int v6; // [rsp+Ch] [rbp-4Ch] BYREF
__int128 v7; // [rsp+10h] [rbp-48h] BYREF
__int128 v8; // [rsp+20h] [rbp-38h]
_OWORD v9[2]; // [rsp+30h] [rbp-28h] BYREF
if ( !(unsigned int)JS_ToInt32(a1, &v6, *a5, a5[1]) )
{
memset(v9, 0, 28);
v8 = 0LL;
v7 = 0LL;
tcgetattr(v6, &v7, 6LL);
oldtty = v7;
xmmword_D05C8 = v8;
LODWORD(v7) = v7 & 0xFFFFFA14;
BYTE4(v7) |= 1u;
xmmword_D05D8 = v9[0];
HIDWORD(v7) &= 0xFFFF7FB5;
*(__int128 *)((char *)&xmmword_D05D8 + 12) = *(_OWORD *)((char *)v9 + 12);
DWORD2(v7) = DWORD2(v7) & 0xFFFFFECF | 0x30;
WORD3(v8) = 256;
tcsetattr(v6, 0LL, &v7);
atexit(term_exit);
}
return 0LL;
}
| js_os_ttySetRaw:
PUSH RBX
SUB RSP,0x50
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x0012803b
MOV EDX,0x6
TEST EAX,EAX
JNZ 0x001196be
XORPS XMM0,XMM0
LEA RBX,[RSP + 0x10]
MOVUPS xmmword ptr [RBX + 0x2c],XMM0
MOVAPS xmmword ptr [RBX + 0x20],XMM0
MOVAPS xmmword ptr [RBX + 0x10],XMM0
MOVAPS xmmword ptr [RBX],XMM0
MOV EDI,dword ptr [RSP + 0xc]
MOV RSI,RBX
CALL 0x0010e760
MOVAPS XMM0,xmmword ptr [RBX]
MOVAPS XMM1,xmmword ptr [RBX + 0x10]
MOVAPS XMM2,xmmword ptr [RBX + 0x20]
MOVUPS xmmword ptr [0x001d05b8],XMM0
MOVUPS xmmword ptr [0x001d05c8],XMM1
AND dword ptr [RBX],0xfffffa14
MOVUPS XMM0,xmmword ptr [RBX + 0x2c]
OR byte ptr [RBX + 0x4],0x1
MOVUPS xmmword ptr [0x001d05d8],XMM2
AND dword ptr [RBX + 0xc],0xffff7fb5
MOVUPS xmmword ptr [0x001d05e4],XMM0
MOV EAX,0xfffffecf
AND EAX,dword ptr [RBX + 0x8]
OR EAX,0x30
MOV dword ptr [RBX + 0x8],EAX
MOV word ptr [RBX + 0x16],0x100
MOV EDI,dword ptr [RSP + 0xc]
XOR ESI,ESI
MOV RDX,RBX
CALL 0x0010e770
LEA RDI,[0x11b424]
CALL 0x0019d350
MOV EDX,0x3
LAB_001196be:
XOR EAX,EAX
ADD RSP,0x50
POP RBX
RET
|
int1 [16] js_os_ttySetRaw(int8 param_1)
{
int1 auVar1 [16];
int iVar2;
ulong uVar3;
int8 *in_R8;
int local_4c;
termios local_48;
iVar2 = JS_ToInt32(param_1,&local_4c,*in_R8,in_R8[1]);
uVar3 = 6;
if (iVar2 == 0) {
local_48.c_cc[0x1f] = '\0';
local_48._49_3_ = 0;
local_48.c_ispeed = 0;
local_48.c_ospeed = 0;
local_48.c_cc[0xf] = '\0';
local_48.c_cc[0x10] = '\0';
local_48.c_cc[0x11] = '\0';
local_48.c_cc[0x12] = '\0';
local_48.c_cc[0x13] = '\0';
local_48.c_cc[0x14] = '\0';
local_48.c_cc[0x15] = '\0';
local_48.c_cc[0x16] = '\0';
local_48.c_cc[0x17] = '\0';
local_48.c_cc[0x18] = '\0';
local_48.c_cc[0x19] = '\0';
local_48.c_cc[0x1a] = '\0';
local_48.c_cc[0x1b] = '\0';
local_48.c_cc[0x1c] = '\0';
local_48.c_cc[0x1d] = '\0';
local_48.c_cc[0x1e] = '\0';
local_48.c_line = '\0';
local_48.c_cc[0] = '\0';
local_48.c_cc[1] = '\0';
local_48.c_cc[2] = '\0';
local_48.c_cc[3] = '\0';
local_48.c_cc[4] = '\0';
local_48.c_cc[5] = '\0';
local_48.c_cc[6] = '\0';
local_48.c_cc[7] = '\0';
local_48.c_cc[8] = '\0';
local_48.c_cc[9] = '\0';
local_48.c_cc[10] = '\0';
local_48.c_cc[0xb] = '\0';
local_48.c_cc[0xc] = '\0';
local_48.c_cc[0xd] = '\0';
local_48.c_cc[0xe] = '\0';
local_48.c_iflag = 0;
local_48.c_oflag = 0;
local_48.c_cflag = 0;
local_48.c_lflag = 0;
tcgetattr(local_4c,&local_48);
oldtty._0_4_ = local_48.c_iflag;
oldtty._4_4_ = local_48.c_oflag;
oldtty._8_4_ = local_48.c_cflag;
oldtty._12_4_ = local_48.c_lflag;
oldtty[0x10] = local_48.c_line;
oldtty[0x11] = local_48.c_cc[0];
oldtty[0x12] = local_48.c_cc[1];
oldtty[0x13] = local_48.c_cc[2];
oldtty[0x14] = local_48.c_cc[3];
oldtty[0x15] = local_48.c_cc[4];
oldtty[0x16] = local_48.c_cc[5];
oldtty[0x17] = local_48.c_cc[6];
oldtty[0x18] = local_48.c_cc[7];
oldtty[0x19] = local_48.c_cc[8];
oldtty[0x1a] = local_48.c_cc[9];
oldtty[0x1b] = local_48.c_cc[10];
oldtty[0x1c] = local_48.c_cc[0xb];
oldtty[0x1d] = local_48.c_cc[0xc];
oldtty[0x1e] = local_48.c_cc[0xd];
oldtty[0x1f] = local_48.c_cc[0xe];
local_48._0_8_ = local_48._0_8_ & 0xfffffffffffffa14;
local_48._0_8_ = local_48._0_8_ | 0x100000000;
oldtty[0x20] = local_48.c_cc[0xf];
oldtty[0x21] = local_48.c_cc[0x10];
oldtty[0x22] = local_48.c_cc[0x11];
oldtty[0x23] = local_48.c_cc[0x12];
oldtty[0x24] = local_48.c_cc[0x13];
oldtty[0x25] = local_48.c_cc[0x14];
oldtty[0x26] = local_48.c_cc[0x15];
oldtty[0x27] = local_48.c_cc[0x16];
oldtty[0x28] = local_48.c_cc[0x17];
oldtty[0x29] = local_48.c_cc[0x18];
oldtty[0x2a] = local_48.c_cc[0x19];
oldtty[0x2b] = local_48.c_cc[0x1a];
oldtty[0x2c] = local_48.c_cc[0x1b];
oldtty[0x2d] = local_48.c_cc[0x1c];
oldtty[0x2e] = local_48.c_cc[0x1d];
oldtty[0x2f] = local_48.c_cc[0x1e];
oldtty._48_4_ = local_48._48_4_;
oldtty._52_4_ = local_48.c_ispeed;
oldtty._56_4_ = local_48.c_ospeed;
local_48._8_8_ = local_48._8_8_ & 0xffff7fb5fffffecf | 0x30;
local_48.c_cc._5_2_ = 0x100;
tcsetattr(local_4c,0,&local_48);
atexit(term_exit);
uVar3 = 3;
}
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar3;
return auVar1 << 0x40;
}
| |
40,237 | d2b | eloqsql/strings/dtoa.c | static Bigint *d2b(U *d, int *e, int *bits, Stack_alloc *alloc)
{
Bigint *b;
int de, k;
ULong *x, y, z;
int i;
#define d0 word0(d)
#define d1 word1(d)
b= Balloc(1, alloc);
x= b->p.x;
z= d0 & Frac_mask;
d0 &= 0x7fffffff; /* clear sign bit, which we ignore */
if ((de= (int)(d0 >> Exp_shift)))
z|= Exp_msk1;
if ((y= d1))
{
if ((k= lo0bits(&y)))
{
x[0]= y | z << (32 - k);
z>>= k;
}
else
x[0]= y;
i= b->wds= (x[1]= z) ? 2 : 1;
}
else
{
k= lo0bits(&z);
x[0]= z;
i= b->wds= 1;
k+= 32;
}
if (de)
{
*e= de - Bias - (P-1) + k;
*bits= P - k;
}
else
{
*e= de - Bias - (P-1) + 1 + k;
*bits= 32*i - hi0bits(x[i-1]);
}
return b;
#undef d0
#undef d1
} | O0 | c | d2b:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movl $0x1, %edi
callq 0xa9160
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0xfffff, %eax # imm = 0xFFFFF
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
shrl $0x14, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0xa92e1
movl -0x40(%rbp), %eax
orl $0x100000, %eax # imm = 0x100000
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0xa935a
leaq -0x3c(%rbp), %rdi
callq 0xa9f20
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
je 0xa932b
movl -0x3c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x40(%rbp), %eax
movl $0x20, %ecx
subl -0x30(%rbp), %ecx
shll %cl, %eax
movl -0x48(%rbp), %ecx
orl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movl -0x30(%rbp), %ecx
movl -0x40(%rbp), %eax
shrl %cl, %eax
movl %eax, -0x40(%rbp)
jmp 0xa9334
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movl -0x40(%rbp), %edx
movq -0x38(%rbp), %rax
movl %edx, 0x4(%rax)
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movq -0x28(%rbp), %rcx
movl %eax, 0x14(%rcx)
movl %eax, -0x44(%rbp)
jmp 0xa938a
leaq -0x40(%rbp), %rdi
callq 0xa9f20
movl %eax, -0x30(%rbp)
movl -0x40(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movl $0x1, -0x44(%rbp)
movl -0x30(%rbp), %eax
addl $0x20, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0xa93b5
movl -0x2c(%rbp), %ecx
subl $0x3ff, %ecx # imm = 0x3FF
subl $0x34, %ecx
addl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x35, %ecx
subl -0x30(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0xa93f6
movl -0x2c(%rbp), %ecx
subl $0x3ff, %ecx # imm = 0x3FF
subl $0x34, %ecx
addl $0x1, %ecx
addl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x44(%rbp), %eax
shll $0x5, %eax
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edi
callq 0xaa050
movl -0x4c(%rbp), %ecx
subl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
| d2b:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rsi, [rbp+var_20]
mov edi, 1
call Balloc
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
mov eax, [rax+4]
and eax, 0FFFFFh
mov [rbp+var_40], eax
mov rax, [rbp+var_8]
mov ecx, [rax+4]
and ecx, 7FFFFFFFh
mov [rax+4], ecx
mov rax, [rbp+var_8]
mov eax, [rax+4]
shr eax, 14h
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_A92E1
mov eax, [rbp+var_40]
or eax, 100000h
mov [rbp+var_40], eax
loc_A92E1:
mov rax, [rbp+var_8]
mov eax, [rax]
mov [rbp+var_3C], eax
cmp eax, 0
jz short loc_A935A
lea rdi, [rbp+var_3C]
call lo0bits
mov [rbp+var_30], eax
cmp eax, 0
jz short loc_A932B
mov eax, [rbp+var_3C]
mov [rbp+var_48], eax
mov eax, [rbp+var_40]
mov ecx, 20h ; ' '
sub ecx, [rbp+var_30]
shl eax, cl
mov ecx, [rbp+var_48]
or ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov ecx, [rbp+var_30]
mov eax, [rbp+var_40]
shr eax, cl
mov [rbp+var_40], eax
jmp short loc_A9334
loc_A932B:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_38]
mov [rax], ecx
loc_A9334:
mov edx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax+4], edx
mov eax, 1
mov ecx, 2
cmp edx, 0
cmovnz eax, ecx
mov rcx, [rbp+var_28]
mov [rcx+14h], eax
mov [rbp+var_44], eax
jmp short loc_A938A
loc_A935A:
lea rdi, [rbp+var_40]
call lo0bits
mov [rbp+var_30], eax
mov ecx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax], ecx
mov rax, [rbp+var_28]
mov dword ptr [rax+14h], 1
mov [rbp+var_44], 1
mov eax, [rbp+var_30]
add eax, 20h ; ' '
mov [rbp+var_30], eax
loc_A938A:
cmp [rbp+var_2C], 0
jz short loc_A93B5
mov ecx, [rbp+var_2C]
sub ecx, 3FFh
sub ecx, 34h ; '4'
add ecx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], ecx
mov ecx, 35h ; '5'
sub ecx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], ecx
jmp short loc_A93F6
loc_A93B5:
mov ecx, [rbp+var_2C]
sub ecx, 3FFh
sub ecx, 34h ; '4'
add ecx, 1
add ecx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], ecx
mov eax, [rbp+var_44]
shl eax, 5
mov [rbp+var_4C], eax
mov rax, [rbp+var_38]
mov ecx, [rbp+var_44]
sub ecx, 1
movsxd rcx, ecx
mov edi, [rax+rcx*4]
call hi0bits
mov ecx, [rbp+var_4C]
sub ecx, eax
mov rax, [rbp+var_18]
mov [rax], ecx
loc_A93F6:
mov rax, [rbp+var_28]
add rsp, 50h
pop rbp
retn
| long long d2b(unsigned int *a1, _DWORD *a2, _DWORD *a3, long long a4)
{
unsigned int v4; // edx
int v5; // eax
int v7; // [rsp+Ch] [rbp-44h]
unsigned int v8; // [rsp+10h] [rbp-40h] BYREF
unsigned int v9; // [rsp+14h] [rbp-3Ch] BYREF
unsigned int *v10; // [rsp+18h] [rbp-38h]
int v11; // [rsp+20h] [rbp-30h]
unsigned int v12; // [rsp+24h] [rbp-2Ch]
long long v13; // [rsp+28h] [rbp-28h]
long long v14; // [rsp+30h] [rbp-20h]
_DWORD *v15; // [rsp+38h] [rbp-18h]
_DWORD *v16; // [rsp+40h] [rbp-10h]
unsigned int *v17; // [rsp+48h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = Balloc(1, a4);
v10 = *(unsigned int **)v13;
v8 = a1[1] & 0xFFFFF;
a1[1] &= ~0x80000000;
v12 = v17[1] >> 20;
if ( v12 )
v8 |= 0x100000u;
v9 = *v17;
if ( v9 )
{
v11 = lo0bits(&v9);
if ( v11 )
{
*v10 = (v8 << (32 - v11)) | v9;
v8 >>= v11;
}
else
{
*v10 = v9;
}
v4 = v8;
v10[1] = v8;
v5 = 1;
if ( v4 )
v5 = 2;
*(_DWORD *)(v13 + 20) = v5;
v7 = v5;
}
else
{
v11 = lo0bits(&v8);
*v10 = v8;
*(_DWORD *)(v13 + 20) = 1;
v7 = 1;
v11 += 32;
}
if ( v12 )
{
*v16 = v11 + v12 - 1075;
*v15 = 53 - v11;
}
else
{
*v16 = v11 - 1074;
*v15 = 32 * v7 - hi0bits(v10[v7 - 1]);
}
return v13;
}
| d2b:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RSI,qword ptr [RBP + -0x20]
MOV EDI,0x1
CALL 0x001a9160
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
AND EAX,0xfffff
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x4]
AND ECX,0x7fffffff
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
SHR EAX,0x14
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x001a92e1
MOV EAX,dword ptr [RBP + -0x40]
OR EAX,0x100000
MOV dword ptr [RBP + -0x40],EAX
LAB_001a92e1:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JZ 0x001a935a
LEA RDI,[RBP + -0x3c]
CALL 0x001a9f20
MOV dword ptr [RBP + -0x30],EAX
CMP EAX,0x0
JZ 0x001a932b
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x48],EAX
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,0x20
SUB ECX,dword ptr [RBP + -0x30]
SHL EAX,CL
MOV ECX,dword ptr [RBP + -0x48]
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x40]
SHR EAX,CL
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001a9334
LAB_001a932b:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
LAB_001a9334:
MOV EDX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],EDX
MOV EAX,0x1
MOV ECX,0x2
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV RCX,qword ptr [RBP + -0x28]
MOV dword ptr [RCX + 0x14],EAX
MOV dword ptr [RBP + -0x44],EAX
JMP 0x001a938a
LAB_001a935a:
LEA RDI,[RBP + -0x40]
CALL 0x001a9f20
MOV dword ptr [RBP + -0x30],EAX
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],0x1
MOV dword ptr [RBP + -0x44],0x1
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x20
MOV dword ptr [RBP + -0x30],EAX
LAB_001a938a:
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x001a93b5
MOV ECX,dword ptr [RBP + -0x2c]
SUB ECX,0x3ff
SUB ECX,0x34
ADD ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV ECX,0x35
SUB ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
JMP 0x001a93f6
LAB_001a93b5:
MOV ECX,dword ptr [RBP + -0x2c]
SUB ECX,0x3ff
SUB ECX,0x34
ADD ECX,0x1
ADD ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x44]
SHL EAX,0x5
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x44]
SUB ECX,0x1
MOVSXD RCX,ECX
MOV EDI,dword ptr [RAX + RCX*0x4]
CALL 0x001aa050
MOV ECX,dword ptr [RBP + -0x4c]
SUB ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
LAB_001a93f6:
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x50
POP RBP
RET
|
int8 * d2b(uint *param_1,int *param_2,int *param_3,int8 param_4)
{
int iVar1;
int local_4c;
uint local_48;
uint local_44;
uint *local_40;
int local_38;
uint local_34;
int8 *local_30;
int8 local_28;
int *local_20;
int *local_18;
uint *local_10;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_30 = (int8 *)Balloc(1,param_4);
local_40 = (uint *)*local_30;
local_48 = local_10[1] & 0xfffff;
local_10[1] = local_10[1] & 0x7fffffff;
local_34 = local_10[1] >> 0x14;
if (local_34 != 0) {
local_48 = local_48 | 0x100000;
}
local_44 = *local_10;
if (local_44 == 0) {
local_38 = lo0bits(&local_48);
*local_40 = local_48;
*(int4 *)((long)local_30 + 0x14) = 1;
local_4c = 1;
local_38 = local_38 + 0x20;
}
else {
local_38 = lo0bits(&local_44);
if (local_38 == 0) {
*local_40 = local_44;
}
else {
*local_40 = local_44 | local_48 << (0x20 - (byte)local_38 & 0x1f);
local_48 = local_48 >> ((byte)local_38 & 0x1f);
}
local_40[1] = local_48;
local_4c = 1;
if (local_48 != 0) {
local_4c = 2;
}
*(int *)((long)local_30 + 0x14) = local_4c;
}
if (local_34 == 0) {
*local_18 = local_38 + -0x432;
iVar1 = hi0bits(local_40[local_4c + -1]);
*local_20 = local_4c * 0x20 - iVar1;
}
else {
*local_18 = (local_34 - 0x433) + local_38;
*local_20 = 0x35 - local_38;
}
return local_30;
}
| |
40,238 | main | eloqsql/storage/myisam/myisampack.c | int main(int argc, char **argv)
{
int error,ok;
PACK_MRG_INFO merge;
char **default_argv;
MY_INIT(argv[0]);
load_defaults_or_exit("my", load_default_groups, &argc, &argv);
default_argv= argv;
get_options(&argc,&argv);
error=ok=isamchk_neaded=0;
if (join_table)
{
/*
Join files into one and create FRM file for the compressed table only if
the compression succeeds
*/
if (open_isam_files(&merge,argv,(uint) argc) ||
compress(&merge, join_table) || create_dest_frm(argv[0], join_table))
error=1;
}
else while (argc--)
{
MI_INFO *isam_file;
if (!(isam_file=open_isam_file(*argv++,O_RDWR)))
error=1;
else
{
merge.file= &isam_file;
merge.current=0;
merge.free_file=0;
merge.count=1;
if (compress(&merge,0))
error=1;
else
ok=1;
}
}
if (ok && isamchk_neaded && !silent)
puts("Remember to run myisamchk -rq on compressed tables");
(void) fflush(stdout);
(void) fflush(stderr);
free_defaults(default_argv);
my_end(verbose ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
exit(error ? 2 : 0);
#ifndef _lint
return 0; /* No compiler warning */
#endif
} | O0 | c | main:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
leaq 0x3dc6dc(%rip), %rax # 0x406040
movq %rcx, (%rax)
callq 0x89810
leaq 0xb98cd(%rip), %rdi # 0xe3240
leaq 0x21a696(%rip), %rsi # 0x244010
leaq -0x8(%rbp), %rdx
leaq -0x10(%rbp), %rcx
callq 0x6fc80
movl %eax, %ecx
movl %ecx, -0x6c(%rbp)
testl %eax, %eax
je 0x2999c
jmp 0x29992
movl -0x6c(%rbp), %eax
subl $0x4, %eax
je 0x2999e
jmp 0x299ac
jmp 0x299bd
xorl %edi, %edi
callq 0x89a50
xorl %edi, %edi
callq 0x294d0
xorl %edi, %edi
callq 0x89a50
movl $0x1, %edi
callq 0x294d0
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x29b50
movl $0x0, 0x3d3b24(%rip) # 0x3fd500
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
cmpq $0x0, 0x3d3b16(%rip) # 0x3fd508
je 0x29a45
movq -0x10(%rbp), %rsi
movl -0x8(%rbp), %edx
leaq -0x58(%rbp), %rdi
callq 0x29c00
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x29a39
movq 0x3d3af5(%rip), %rsi # 0x3fd508
leaq -0x58(%rbp), %rdi
callq 0x29f10
cmpl $0x0, %eax
jne 0x29a39
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x3d3ad9(%rip), %rsi # 0x3fd508
callq 0x2aa00
cmpl $0x0, %eax
je 0x29a40
movl $0x1, -0x14(%rbp)
jmp 0x29acf
jmp 0x29a47
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x8(%rbp)
cmpl $0x0, %eax
je 0x29acd
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq (%rax), %rdi
movl $0x2, %esi
callq 0x2aab0
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
jne 0x29a86
movl $0x1, -0x14(%rbp)
jmp 0x29ac8
leaq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x1, -0x3c(%rbp)
leaq -0x58(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x29f10
cmpl $0x0, %eax
je 0x29abf
movl $0x1, -0x14(%rbp)
jmp 0x29ac6
movl $0x1, -0x18(%rbp)
jmp 0x29ac8
jmp 0x29a47
jmp 0x29acf
cmpl $0x0, -0x18(%rbp)
je 0x29af3
cmpl $0x0, 0x3d3a24(%rip) # 0x3fd500
je 0x29af3
cmpl $0x0, 0x3d3a2b(%rip) # 0x3fd510
jne 0x29af3
leaq 0xb9755(%rip), %rdi # 0xe3243
callq 0x29650
movq 0x21a4c6(%rip), %rax # 0x243fc0
movq (%rax), %rdi
callq 0x29470
movq 0x21a4d7(%rip), %rax # 0x243fe0
movq (%rax), %rdi
callq 0x29470
movq -0x60(%rbp), %rdi
callq 0x704d0
movl 0x3d39f4(%rip), %ecx # 0x3fd514
movl $0x1, %edi
movl $0x3, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
callq 0x89a50
movl -0x14(%rbp), %ecx
xorl %edi, %edi
movl $0x2, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
callq 0x294d0
nopw (%rax,%rax)
| main:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_4], 0
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rcx, [rax]
lea rax, my_progname
mov [rax], rcx
call my_init
lea rdi, unk_E3240
lea rsi, load_default_groups
lea rdx, [rbp+var_8]
lea rcx, [rbp+var_10]
call load_defaults
mov ecx, eax
mov [rbp+var_6C], ecx
test eax, eax
jz short loc_2999C
jmp short $+2
loc_29992:
mov eax, [rbp+var_6C]
sub eax, 4
jz short loc_2999E
jmp short loc_299AC
loc_2999C:
jmp short loc_299BD
loc_2999E:
xor edi, edi
call my_end
xor edi, edi
call _exit
loc_299AC:
xor edi, edi
call my_end
mov edi, 1
call _exit
loc_299BD:
mov rax, [rbp+var_10]
mov [rbp+var_60], rax
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_10]
call get_options
mov cs:isamchk_neaded, 0
mov [rbp+var_18], 0
mov [rbp+var_14], 0
cmp cs:join_table, 0
jz short loc_29A45
mov rsi, [rbp+var_10]
mov edx, [rbp+var_8]
lea rdi, [rbp+var_58]
call open_isam_files
movsx eax, al
cmp eax, 0
jnz short loc_29A39
mov rsi, cs:join_table
lea rdi, [rbp+var_58]
call compress
cmp eax, 0
jnz short loc_29A39
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rsi, cs:join_table
call create_dest_frm
cmp eax, 0
jz short loc_29A40
loc_29A39:
mov [rbp+var_14], 1
loc_29A40:
jmp loc_29ACF
loc_29A45:
jmp short $+2
loc_29A47:
mov eax, [rbp+var_8]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_8], ecx
cmp eax, 0
jz short loc_29ACD
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 8
mov [rbp+var_10], rcx
mov rdi, [rax]
mov esi, 2
call open_isam_file
mov [rbp+var_68], rax
cmp rax, 0
jnz short loc_29A86
mov [rbp+var_14], 1
jmp short loc_29AC8
loc_29A86:
lea rax, [rbp+var_68]
mov [rbp+var_58], rax
mov [rbp+var_50], 0
mov [rbp+var_40], 0
mov [rbp+var_3C], 1
lea rdi, [rbp+var_58]
xor eax, eax
mov esi, eax
call compress
cmp eax, 0
jz short loc_29ABF
mov [rbp+var_14], 1
jmp short loc_29AC6
loc_29ABF:
mov [rbp+var_18], 1
loc_29AC6:
jmp short $+2
loc_29AC8:
jmp loc_29A47
loc_29ACD:
jmp short $+2
loc_29ACF:
cmp [rbp+var_18], 0
jz short loc_29AF3
cmp cs:isamchk_neaded, 0
jz short loc_29AF3
cmp cs:silent, 0
jnz short loc_29AF3
lea rdi, aRememberToRunM; "Remember to run myisamchk -rq on compre"...
call _puts
loc_29AF3:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fflush
mov rdi, [rbp+var_60]
call free_defaults
mov ecx, cs:verbose
mov edi, 1
mov eax, 3
cmp ecx, 0
cmovnz edi, eax
call my_end
mov ecx, [rbp+var_14]
xor edi, edi
mov eax, 2
cmp ecx, 0
cmovnz edi, eax
call _exit
| int __noreturn main(int argc, const char **argv, const char **envp)
{
const char **v4; // rax
long long v5; // rdi
long long v6; // rdi
int v7; // [rsp+4h] [rbp-6Ch]
long long v8; // [rsp+8h] [rbp-68h] BYREF
const char **v9; // [rsp+10h] [rbp-60h]
_QWORD v10[3]; // [rsp+18h] [rbp-58h] BYREF
int v11; // [rsp+30h] [rbp-40h]
int v12; // [rsp+34h] [rbp-3Ch]
int v13; // [rsp+58h] [rbp-18h]
int v14; // [rsp+5Ch] [rbp-14h]
const char **v15; // [rsp+60h] [rbp-10h] BYREF
_DWORD v16[2]; // [rsp+68h] [rbp-8h] BYREF
v16[1] = 0;
v16[0] = argc;
v15 = argv;
my_progname = *argv;
my_init(argc, argv, envp);
v7 = load_defaults(&unk_E3240, &load_default_groups, v16, &v15);
if ( v7 )
{
if ( v7 != 4 )
{
my_end(0LL);
exit(1LL);
}
my_end(0LL);
exit(0LL);
}
v9 = v15;
get_options(v16, &v15);
isamchk_neaded = 0;
v13 = 0;
v14 = 0;
if ( join_table )
{
if ( (unsigned __int8)open_isam_files(v10, v15, v16[0])
|| (unsigned int)compress(v10, join_table)
|| (unsigned int)create_dest_frm(*v15, join_table) )
{
v14 = 1;
}
}
else
{
while ( v16[0]-- )
{
v4 = v15++;
v8 = open_isam_file(*v4, 2LL);
if ( v8 )
{
v10[0] = &v8;
v10[1] = 0LL;
v11 = 0;
v12 = 1;
if ( (unsigned int)compress(v10, 0LL) )
v14 = 1;
else
v13 = 1;
}
else
{
v14 = 1;
}
}
}
if ( v13 && isamchk_neaded && !silent )
puts("Remember to run myisamchk -rq on compressed tables");
fflush(stdout);
fflush(stderr);
free_defaults(v9);
v5 = 1LL;
if ( verbose )
v5 = 3LL;
my_end(v5);
v6 = 0LL;
if ( v14 )
v6 = 2LL;
exit(v6);
}
| main:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV dword ptr [RBP + -0x4],0x0
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
LEA RAX,[0x506040]
MOV qword ptr [RAX],RCX
CALL 0x00189810
LEA RDI,[0x1e3240]
LEA RSI,[0x344010]
LEA RDX,[RBP + -0x8]
LEA RCX,[RBP + -0x10]
CALL 0x0016fc80
MOV ECX,EAX
MOV dword ptr [RBP + -0x6c],ECX
TEST EAX,EAX
JZ 0x0012999c
JMP 0x00129992
LAB_00129992:
MOV EAX,dword ptr [RBP + -0x6c]
SUB EAX,0x4
JZ 0x0012999e
JMP 0x001299ac
LAB_0012999c:
JMP 0x001299bd
LAB_0012999e:
XOR EDI,EDI
CALL 0x00189a50
XOR EDI,EDI
CALL 0x001294d0
LAB_001299ac:
XOR EDI,EDI
CALL 0x00189a50
MOV EDI,0x1
CALL 0x001294d0
LAB_001299bd:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0x10]
CALL 0x00129b50
MOV dword ptr [0x004fd500],0x0
MOV dword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x14],0x0
CMP qword ptr [0x004fd508],0x0
JZ 0x00129a45
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x58]
CALL 0x00129c00
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00129a39
MOV RSI,qword ptr [0x004fd508]
LEA RDI,[RBP + -0x58]
CALL 0x00129f10
CMP EAX,0x0
JNZ 0x00129a39
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [0x004fd508]
CALL 0x0012aa00
CMP EAX,0x0
JZ 0x00129a40
LAB_00129a39:
MOV dword ptr [RBP + -0x14],0x1
LAB_00129a40:
JMP 0x00129acf
LAB_00129a45:
JMP 0x00129a47
LAB_00129a47:
MOV EAX,dword ptr [RBP + -0x8]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x8],ECX
CMP EAX,0x0
JZ 0x00129acd
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RBP + -0x10],RCX
MOV RDI,qword ptr [RAX]
MOV ESI,0x2
CALL 0x0012aab0
MOV qword ptr [RBP + -0x68],RAX
CMP RAX,0x0
JNZ 0x00129a86
MOV dword ptr [RBP + -0x14],0x1
JMP 0x00129ac8
LAB_00129a86:
LEA RAX,[RBP + -0x68]
MOV qword ptr [RBP + -0x58],RAX
MOV qword ptr [RBP + -0x50],0x0
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x3c],0x1
LEA RDI,[RBP + -0x58]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00129f10
CMP EAX,0x0
JZ 0x00129abf
MOV dword ptr [RBP + -0x14],0x1
JMP 0x00129ac6
LAB_00129abf:
MOV dword ptr [RBP + -0x18],0x1
LAB_00129ac6:
JMP 0x00129ac8
LAB_00129ac8:
JMP 0x00129a47
LAB_00129acd:
JMP 0x00129acf
LAB_00129acf:
CMP dword ptr [RBP + -0x18],0x0
JZ 0x00129af3
CMP dword ptr [0x004fd500],0x0
JZ 0x00129af3
CMP dword ptr [0x004fd510],0x0
JNZ 0x00129af3
LEA RDI,[0x1e3243]
CALL 0x00129650
LAB_00129af3:
MOV RAX,qword ptr [0x00343fc0]
MOV RDI,qword ptr [RAX]
CALL 0x00129470
MOV RAX,qword ptr [0x00343fe0]
MOV RDI,qword ptr [RAX]
CALL 0x00129470
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001704d0
MOV ECX,dword ptr [0x004fd514]
MOV EDI,0x1
MOV EAX,0x3
CMP ECX,0x0
CMOVNZ EDI,EAX
CALL 0x00189a50
MOV ECX,dword ptr [RBP + -0x14]
XOR EDI,EDI
MOV EAX,0x2
CMP ECX,0x0
CMOVNZ EDI,EAX
CALL 0x001294d0
|
void main(int param_1,int8 *param_2)
{
int8 uVar1;
char cVar2;
int iVar3;
bool bVar4;
long local_70;
int8 *local_68;
long *local_60;
int8 local_58;
int4 local_48;
int4 local_44;
int local_20;
int local_1c;
int8 *local_18;
int local_10 [2];
local_10[1] = 0;
my_progname = *param_2;
local_18 = param_2;
local_10[0] = param_1;
my_init();
iVar3 = load_defaults(&DAT_001e3240,load_default_groups,local_10,&local_18);
if (iVar3 == 0) {
local_68 = local_18;
get_options(local_10,&local_18);
isamchk_neaded = 0;
local_20 = 0;
local_1c = 0;
if (join_table == 0) {
while (iVar3 = local_10[0] + -1, bVar4 = local_10[0] != 0, local_10[0] = iVar3, bVar4) {
uVar1 = *local_18;
local_18 = local_18 + 1;
local_70 = open_isam_file(uVar1,2);
if (local_70 == 0) {
local_1c = 1;
}
else {
local_60 = &local_70;
local_58 = 0;
local_48 = 0;
local_44 = 1;
iVar3 = compress(&local_60,0);
if (iVar3 == 0) {
local_20 = 1;
}
else {
local_1c = 1;
}
}
}
}
else {
cVar2 = open_isam_files(&local_60,local_18,local_10[0]);
if (((cVar2 != '\0') || (iVar3 = compress(&local_60,join_table), iVar3 != 0)) ||
(iVar3 = create_dest_frm(*local_18,join_table), iVar3 != 0)) {
local_1c = 1;
}
}
if (((local_20 != 0) && (isamchk_neaded != 0)) && (silent == 0)) {
puts("Remember to run myisamchk -rq on compressed tables");
}
fflush(*(FILE **)PTR_stdout_00343fc0);
fflush(*(FILE **)PTR_stderr_00343fe0);
free_defaults(local_68);
my_end();
iVar3 = 0;
if (local_1c != 0) {
iVar3 = 2;
}
/* WARNING: Subroutine does not return */
exit(iVar3);
}
if (iVar3 != 4) {
my_end(0);
/* WARNING: Subroutine does not return */
exit(1);
}
my_end();
/* WARNING: Subroutine does not return */
exit(0);
}
| |
40,239 | mi_nommap_pread | eloqsql/storage/myisam/mi_dynrec.c | size_t mi_nommap_pread(MI_INFO *info, uchar *Buffer,
size_t Count, my_off_t offset, myf MyFlags)
{
return mysql_file_pread(info->dfile, Buffer, Count, offset, MyFlags);
} | O3 | c | mi_nommap_pread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r13
movl 0x1c0(%rdi), %ebx
leaq 0x30e9b9(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x77699
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r8
callq 0xa0f50
movq %rax, %rbx
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x30e96d(%rip), %rax # 0x386010
movq (%rax), %rax
leaq 0x64652(%rip), %rdx # 0xdbcff
movq %r15, %rdi
movq %r14, %rsi
movl $0xca, %ecx
callq *0x210(%rax)
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r12
movq %r12, %r8
callq 0xa0f50
movq %rax, %rbx
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %r14
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, %r12b
cmovneq %r14, %rsi
leaq 0x30e918(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r15, %rdi
callq *0x218(%rax)
jmp 0x77687
| mi_nommap_pread:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], r8
mov r12, rcx
mov r14, rdx
mov r13, rsi
mov ebx, [rdi+1C0h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz short loc_77699
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r8, [rbp+var_30]
call my_pread
mov rbx, rax
loc_77687:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_77699:
mov r15, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov rsi, r14
mov ecx, 0CAh
call qword ptr [rax+210h]
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r12, [rbp+var_30]
mov r8, r12
call my_pread
mov rbx, rax
xor esi, esi
test rax, rax
cmovnz r14, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test r12b, 6
cmovnz rsi, r14
lea rax, PSI_server
mov rax, [rax]
mov rdi, r15
call qword ptr [rax+218h]
jmp short loc_77687
| long long mi_nommap_pread(long long a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v7; // ebx
long long v8; // rax
long long v9; // rbx
long long v11; // r15
_BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF
long long v13; // [rsp+50h] [rbp-30h]
v13 = a5;
v7 = *(_DWORD *)(a1 + 448);
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v7, 6LL);
if ( !v8 )
return my_pread(v7, a2, a3, a4, v13);
v11 = v8;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v8,
a3,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
202LL);
v9 = my_pread(v7, a2, a3, a4, v13);
((void ( *)(long long))PSI_server[67])(v11);
return v9;
}
| mi_nommap_pread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x30],R8
MOV R12,RCX
MOV R14,RDX
MOV R13,RSI
MOV EBX,dword ptr [RDI + 0x1c0]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00177699
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a0f50
MOV RBX,RAX
LAB_00177687:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00177699:
MOV R15,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1dbcff]
MOV RDI,R15
MOV RSI,R14
MOV ECX,0xca
CALL qword ptr [RAX + 0x210]
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R12,qword ptr [RBP + -0x30]
MOV R8,R12
CALL 0x001a0f50
MOV RBX,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ R14,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST R12B,0x6
CMOVNZ RSI,R14
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RDI,R15
CALL qword ptr [RAX + 0x218]
JMP 0x00177687
|
long mi_nommap_pread(long param_1,int8 param_2,long param_3,int8 param_4,ulong param_5)
{
int4 uVar1;
ulong uVar2;
long lVar3;
long lVar4;
long lVar5;
int1 local_80 [72];
ulong local_38;
uVar1 = *(int4 *)(param_1 + 0x1c0);
local_38 = param_5;
lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6);
if (lVar3 == 0) {
lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
0xca);
uVar2 = local_38;
lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
if (lVar4 != 0) {
param_3 = 0;
}
lVar5 = 0;
if (lVar4 != -1) {
lVar5 = lVar4;
}
if ((uVar2 & 6) != 0) {
lVar5 = param_3;
}
(**(code **)(PSI_server + 0x218))(lVar3,lVar5);
}
return lVar4;
}
| |
40,240 | Update | r3d/examples/pbr.c | void Update(float delta)
{
modelScale = Clamp(modelScale + GetMouseWheelMove() * 0.1, 0.25f, 2.5f);
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT))
{
float pitch = (GetMouseDelta().y * 0.005f) / modelScale;
float yaw = (GetMouseDelta().x * 0.005f) / modelScale;
model.transform = MatrixMultiply(
model.transform, MatrixRotateXYZ((Vector3) { pitch, yaw, 0.0f })
);
}
} | O0 | c | Update:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movss %xmm0, -0x4(%rbp)
movss 0x210538(%rip), %xmm0 # 0x2193e0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xc8(%rbp)
callq 0x282e0
movsd -0xc8(%rbp), %xmm1
cvtss2sd %xmm0, %xmm0
movsd 0x17439b(%rip), %xmm2 # 0x17d268
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss 0x174137(%rip), %xmm1 # 0x17d018
movss 0x174133(%rip), %xmm2 # 0x17d01c
callq 0x1b1e0
movss %xmm0, 0x2104ea(%rip) # 0x2193e0
xorl %edi, %edi
callq 0x28100
testb $0x1, %al
jne 0x8f06
jmp 0x9039
callq 0x28050
movlpd %xmm0, -0x10(%rbp)
movss -0xc(%rbp), %xmm0
movss 0x174103(%rip), %xmm1 # 0x17d020
movss %xmm1, -0xd4(%rbp)
mulss %xmm1, %xmm0
movss 0x2104af(%rip), %xmm1 # 0x2193e0
divss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
callq 0x28050
movss -0xd4(%rbp), %xmm1
movlpd %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
mulss %xmm1, %xmm0
movss 0x210483(%rip), %xmm1 # 0x2193e0
divss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0xac(%rbp)
movss -0x14(%rbp), %xmm0
movss %xmm0, -0xa8(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0xb8(%rbp)
movq -0xac(%rbp), %rax
movq %rax, -0xc0(%rbp)
movsd -0xc0(%rbp), %xmm0
movss -0xb8(%rbp), %xmm1
leaq -0xa0(%rbp), %rdi
callq 0x224d0
movups -0xa0(%rbp), %xmm0
movups -0x90(%rbp), %xmm1
movups -0x80(%rbp), %xmm2
movups -0x70(%rbp), %xmm3
movq %rsp, %rax
movq %rax, -0xd0(%rbp)
movups %xmm3, 0x70(%rax)
movups %xmm2, 0x60(%rax)
movups %xmm1, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups 0x213941(%rip), %xmm0 # 0x21c938
movups %xmm0, 0x30(%rax)
movups 0x213926(%rip), %xmm0 # 0x21c928
movups %xmm0, 0x20(%rax)
movups 0x21390b(%rip), %xmm0 # 0x21c918
movups %xmm0, 0x10(%rax)
movups 0x2138f0(%rip), %xmm0 # 0x21c908
movups %xmm0, (%rax)
leaq -0x5c(%rbp), %rdi
callq 0x21a50
leaq 0x2138dd(%rip), %rdi # 0x21c908
leaq -0x5c(%rbp), %rsi
movl $0x40, %edx
callq 0x82f0
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)
| Update:
push rbp
mov rbp, rsp
sub rsp, 160h
movss [rbp+var_4], xmm0
movss xmm0, cs:modelScale
cvtss2sd xmm0, xmm0
movsd [rbp+var_C8], xmm0
call GetMouseWheelMove
movsd xmm1, [rbp+var_C8]
cvtss2sd xmm0, xmm0
movsd xmm2, cs:qword_17D268
mulsd xmm0, xmm2
addsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
movss xmm1, cs:dword_17D018
movss xmm2, cs:dword_17D01C
call Clamp
movss cs:modelScale, xmm0
xor edi, edi
call IsMouseButtonDown
test al, 1
jnz short loc_8F06
jmp loc_9039
loc_8F06:
call GetMouseDelta
movlpd [rbp+var_10], xmm0
movss xmm0, dword ptr [rbp+var_10+4]
movss xmm1, cs:dword_17D020
movss [rbp+var_D4], xmm1
mulss xmm0, xmm1
movss xmm1, cs:modelScale
divss xmm0, xmm1
movss [rbp+var_8], xmm0
call GetMouseDelta
movss xmm1, [rbp+var_D4]
movlpd [rbp+var_1C], xmm0
movss xmm0, dword ptr [rbp+var_1C]
mulss xmm0, xmm1
movss xmm1, cs:modelScale
divss xmm0, xmm1
movss [rbp+var_14], xmm0
movss xmm0, [rbp+var_8]
movss dword ptr [rbp+var_AC], xmm0
movss xmm0, [rbp+var_14]
movss dword ptr [rbp+var_AC+4], xmm0
mov [rbp+var_A4], 0
mov eax, [rbp+var_A4]
mov [rbp+var_B8], eax
mov rax, [rbp+var_AC]
mov [rbp+var_C0], rax
movsd xmm0, [rbp+var_C0]
movss xmm1, [rbp+var_B8]
lea rdi, [rbp+var_A0]
call MatrixRotateXYZ
movups xmm0, [rbp+var_A0]
movups xmm1, [rbp+var_90]
movups xmm2, [rbp+var_80]
movups xmm3, [rbp+var_70]
mov rax, rsp
mov [rbp+var_D0], rax
movups xmmword ptr [rax+70h], xmm3
movups xmmword ptr [rax+60h], xmm2
movups xmmword ptr [rax+50h], xmm1
movups xmmword ptr [rax+40h], xmm0
movups xmm0, cs:xmmword_21C938
movups xmmword ptr [rax+30h], xmm0
movups xmm0, cs:xmmword_21C928
movups xmmword ptr [rax+20h], xmm0
movups xmm0, cs:xmmword_21C918
movups xmmword ptr [rax+10h], xmm0
movups xmm0, cs:model
movups xmmword ptr [rax], xmm0
lea rdi, [rbp+var_5C]
call MatrixMultiply
lea rdi, model
lea rsi, [rbp+var_5C]
mov edx, 40h ; '@'
call _memcpy
loc_9039:
add rsp, 160h
pop rbp
retn
| long long Update(float a1, long long a2, int a3)
{
float v3; // xmm0_4
long long result; // rax
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
_DWORD v9[36]; // [rsp+0h] [rbp-160h] BYREF
_DWORD *v10; // [rsp+90h] [rbp-D0h]
double v11; // [rsp+98h] [rbp-C8h]
double v12; // [rsp+A0h] [rbp-C0h]
int v13; // [rsp+A8h] [rbp-B8h]
double v14; // [rsp+B4h] [rbp-ACh]
int v15; // [rsp+BCh] [rbp-A4h]
_OWORD v16[4]; // [rsp+C0h] [rbp-A0h] BYREF
_BYTE v17[64]; // [rsp+104h] [rbp-5Ch] BYREF
double v18; // [rsp+144h] [rbp-1Ch]
float v19; // [rsp+14Ch] [rbp-14h]
double MouseDelta; // [rsp+150h] [rbp-10h]
float v21; // [rsp+158h] [rbp-8h]
float v22; // [rsp+15Ch] [rbp-4h]
v22 = a1;
v11 = *(float *)&modelScale;
v3 = GetMouseWheelMove() * 0.1 + v11;
modelScale = Clamp(v3, 0.25, 2.5);
result = IsMouseButtonDown(0LL);
if ( (result & 1) != 0 )
{
MouseDelta = GetMouseDelta();
v9[35] = 1000593162;
v21 = (float)(*((float *)&MouseDelta + 1) * 0.0049999999) / *(float *)&modelScale;
v18 = GetMouseDelta();
v19 = (float)(*(float *)&v18 * 0.0049999999) / *(float *)&modelScale;
*(float *)&v14 = v21;
*((float *)&v14 + 1) = v19;
v15 = 0;
v13 = 0;
v12 = v14;
MatrixRotateXYZ(v16, v14, 0.0);
v10 = v9;
MatrixMultiply(
(unsigned int)v17,
a3,
v5,
v6,
v7,
v8,
model,
DWORD2(model),
xmmword_21C918,
DWORD2(xmmword_21C918),
xmmword_21C928,
DWORD2(xmmword_21C928),
xmmword_21C938,
DWORD2(xmmword_21C938),
v16[0],
v16[1],
v16[2],
v16[3]);
return memcpy(&model, v17, 64LL);
}
return result;
}
| Update:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOVSS dword ptr [RBP + -0x4],XMM0
MOVSS XMM0,dword ptr [0x003193e0]
CVTSS2SD XMM0,XMM0
MOVSD qword ptr [RBP + -0xc8],XMM0
CALL 0x001282e0
MOVSD XMM1,qword ptr [RBP + -0xc8]
CVTSS2SD XMM0,XMM0
MOVSD XMM2,qword ptr [0x0027d268]
MULSD XMM0,XMM2
ADDSD XMM0,XMM1
CVTSD2SS XMM0,XMM0
MOVSS XMM1,dword ptr [0x0027d018]
MOVSS XMM2,dword ptr [0x0027d01c]
CALL 0x0011b1e0
MOVSS dword ptr [0x003193e0],XMM0
XOR EDI,EDI
CALL 0x00128100
TEST AL,0x1
JNZ 0x00108f06
JMP 0x00109039
LAB_00108f06:
CALL 0x00128050
MOVLPD qword ptr [RBP + -0x10],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS XMM1,dword ptr [0x0027d020]
MOVSS dword ptr [RBP + -0xd4],XMM1
MULSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x003193e0]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x8],XMM0
CALL 0x00128050
MOVSS XMM1,dword ptr [RBP + -0xd4]
MOVLPD qword ptr [RBP + -0x1c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x1c]
MULSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x003193e0]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x14],XMM0
MOVSS XMM0,dword ptr [RBP + -0x8]
MOVSS dword ptr [RBP + -0xac],XMM0
MOVSS XMM0,dword ptr [RBP + -0x14]
MOVSS dword ptr [RBP + -0xa8],XMM0
MOV dword ptr [RBP + -0xa4],0x0
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0xb8],EAX
MOV RAX,qword ptr [RBP + -0xac]
MOV qword ptr [RBP + -0xc0],RAX
MOVSD XMM0,qword ptr [RBP + -0xc0]
MOVSS XMM1,dword ptr [RBP + -0xb8]
LEA RDI,[RBP + -0xa0]
CALL 0x001224d0
MOVUPS XMM0,xmmword ptr [RBP + -0xa0]
MOVUPS XMM1,xmmword ptr [RBP + -0x90]
MOVUPS XMM2,xmmword ptr [RBP + -0x80]
MOVUPS XMM3,xmmword ptr [RBP + -0x70]
MOV RAX,RSP
MOV qword ptr [RBP + -0xd0],RAX
MOVUPS xmmword ptr [RAX + 0x70],XMM3
MOVUPS xmmword ptr [RAX + 0x60],XMM2
MOVUPS xmmword ptr [RAX + 0x50],XMM1
MOVUPS xmmword ptr [RAX + 0x40],XMM0
MOVUPS XMM0,xmmword ptr [0x0031c938]
MOVUPS xmmword ptr [RAX + 0x30],XMM0
MOVUPS XMM0,xmmword ptr [0x0031c928]
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOVUPS XMM0,xmmword ptr [0x0031c918]
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x0031c908]
MOVUPS xmmword ptr [RAX],XMM0
LEA RDI,[RBP + -0x5c]
CALL 0x00121a50
LEA RDI,[0x31c908]
LEA RSI,[RBP + -0x5c]
MOV EDX,0x40
CALL 0x001082f0
LAB_00109039:
ADD RSP,0x160
POP RBP
RET
|
void Update(int4 param_1)
{
ulong uVar1;
float fVar2;
int4 local_168 [16];
int8 local_128;
int8 uStack_120;
int4 local_118;
int4 uStack_114;
int4 uStack_110;
int4 uStack_10c;
int4 local_108;
int4 uStack_104;
int4 uStack_100;
int4 uStack_fc;
int4 local_f8;
int4 uStack_f4;
int4 uStack_f0;
int4 uStack_ec;
float local_dc;
int1 *local_d8;
double local_d0;
int8 local_c8;
int4 local_c0;
float local_b4;
float fStack_b0;
int4 local_ac;
int8 local_a8;
int8 uStack_a0;
int4 local_98;
int4 uStack_94;
int4 uStack_90;
int4 uStack_8c;
int4 local_88;
int4 uStack_84;
int4 uStack_80;
int4 uStack_7c;
int4 local_78;
int4 uStack_74;
int4 uStack_70;
int4 uStack_6c;
int1 local_64 [64];
int8 local_24;
float local_1c;
int8 local_18;
float local_10;
int4 local_c;
local_d0 = (double)modelScale;
local_c = param_1;
fVar2 = (float)GetMouseWheelMove();
modelScale = (float)Clamp((float)((double)fVar2 * DAT_0027d268 + local_d0),DAT_0027d018,
DAT_0027d01c);
uVar1 = IsMouseButtonDown(0);
if ((uVar1 & 1) != 0) {
local_18 = GetMouseDelta();
local_dc = DAT_0027d020;
local_10 = ((float)((ulong)local_18 >> 0x20) * DAT_0027d020) / modelScale;
local_24 = GetMouseDelta();
fStack_b0 = ((float)local_24 * local_dc) / modelScale;
local_b4 = local_10;
local_ac = 0;
local_c0 = 0;
local_c8 = CONCAT44(fStack_b0,local_10);
local_1c = fStack_b0;
MatrixRotateXYZ(local_10,0,&local_a8);
local_f8 = local_78;
uStack_f4 = uStack_74;
uStack_f0 = uStack_70;
uStack_ec = uStack_6c;
local_108 = local_88;
uStack_104 = uStack_84;
uStack_100 = uStack_80;
uStack_fc = uStack_7c;
local_118 = local_98;
uStack_114 = uStack_94;
uStack_110 = uStack_90;
uStack_10c = uStack_8c;
local_128 = local_a8;
uStack_120 = uStack_a0;
local_168[0xc] = model._48_4_;
local_168[0xd] = model._52_4_;
local_168[0xe] = model._56_4_;
local_168[0xf] = model._60_4_;
local_168[8] = model._32_4_;
local_168[9] = model._36_4_;
local_168[10] = model._40_4_;
local_168[0xb] = model._44_4_;
local_168[4] = model._16_4_;
local_168[5] = model._20_4_;
local_168[6] = model._24_4_;
local_168[7] = model._28_4_;
local_168[0] = model._0_4_;
local_168[1] = model._4_4_;
local_168[2] = model._8_4_;
local_168[3] = model._12_4_;
local_d8 = (int1 *)local_168;
MatrixMultiply(local_64);
memcpy(model,local_64,0x40);
}
return;
}
| |
40,241 | fmt::v10::detail::dragonbox::cache_accessor<double>::compute_left_endpoint_for_shorter_interval_case(fmt::v10::detail::uint128_fallback const&, int) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h | static auto compute_left_endpoint_for_shorter_interval_case(
const cache_entry_type& cache, int beta) noexcept -> carrier_uint {
return (cache.high() -
(cache.high() >> (num_significand_bits<double>() + 2))) >>
(64 - num_significand_bits<double>() - 1 - beta);
} | O0 | c | fmt::v10::detail::dragonbox::cache_accessor<double>::compute_left_endpoint_for_shorter_interval_case(fmt::v10::detail::uint128_fallback const&, int):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
callq 0xcbe10
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0xcbe10
movq %rax, (%rsp)
callq 0xcb020
movq (%rsp), %rdx
movl %eax, %ecx
movq 0x8(%rsp), %rax
addl $0x2, %ecx
movl %ecx, %ecx
shrq %cl, %rdx
movq %rdx, %rcx
subq %rcx, %rax
movq %rax, 0x10(%rsp)
callq 0xcb020
movl %eax, %edx
movq 0x10(%rsp), %rax
movl $0x40, %ecx
subl %edx, %ecx
subl $0x1, %ecx
subl 0x1c(%rsp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN3fmt3v106detail9dragonbox14cache_accessorIdE47compute_left_endpoint_for_shorter_interval_caseERKNS1_16uint128_fallbackEi:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov rdi, [rsp+28h+var_8]; this
call _ZNK3fmt3v106detail16uint128_fallback4highEv; fmt::v10::detail::uint128_fallback::high(void)
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_8]; this
call _ZNK3fmt3v106detail16uint128_fallback4highEv; fmt::v10::detail::uint128_fallback::high(void)
mov [rsp+28h+var_28], rax
call _ZN3fmt3v106detail20num_significand_bitsIdEEiv; fmt::v10::detail::num_significand_bits<double>(void)
mov rdx, [rsp+28h+var_28]
mov ecx, eax
mov rax, [rsp+28h+var_20]
add ecx, 2
mov ecx, ecx
shr rdx, cl
mov rcx, rdx
sub rax, rcx
mov [rsp+28h+var_18], rax
call _ZN3fmt3v106detail20num_significand_bitsIdEEiv; fmt::v10::detail::num_significand_bits<double>(void)
mov edx, eax
mov rax, [rsp+28h+var_18]
mov ecx, 40h ; '@'
sub ecx, edx
sub ecx, 1
sub ecx, [rsp+28h+var_C]
mov ecx, ecx
shr rax, cl
add rsp, 28h
retn
| unsigned long long fmt::v10::detail::dragonbox::cache_accessor<double>::compute_left_endpoint_for_shorter_interval_case(
fmt::v10::detail::uint128_fallback *a1,
char a2)
{
unsigned long long v3; // [rsp+0h] [rbp-28h]
long long v4; // [rsp+8h] [rbp-20h]
unsigned long long v5; // [rsp+10h] [rbp-18h]
v4 = fmt::v10::detail::uint128_fallback::high(a1);
v3 = fmt::v10::detail::uint128_fallback::high(a1);
v5 = v4 - (v3 >> ((unsigned __int8)fmt::v10::detail::num_significand_bits<double>() + 2));
return v5 >> (64 - (unsigned __int8)fmt::v10::detail::num_significand_bits<double>() - 1 - a2);
}
| compute_left_endpoint_for_shorter_interval_case:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001cbe10
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001cbe10
MOV qword ptr [RSP],RAX
CALL 0x001cb020
MOV RDX,qword ptr [RSP]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x8]
ADD ECX,0x2
MOV ECX,ECX
SHR RDX,CL
MOV RCX,RDX
SUB RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001cb020
MOV EDX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,0x40
SUB ECX,EDX
SUB ECX,0x1
SUB ECX,dword ptr [RSP + 0x1c]
MOV ECX,ECX
SHR RAX,CL
ADD RSP,0x28
RET
|
/* fmt::v10::detail::dragonbox::cache_accessor<double>::compute_left_endpoint_for_shorter_interval_case(fmt::v10::detail::uint128_fallback
const&, int) */
ulong fmt::v10::detail::dragonbox::cache_accessor<double>::
compute_left_endpoint_for_shorter_interval_case(uint128_fallback *param_1,int param_2)
{
int iVar1;
int iVar2;
long lVar3;
ulong uVar4;
lVar3 = uint128_fallback::high(param_1);
uVar4 = uint128_fallback::high(param_1);
iVar1 = num_significand_bits<double>();
iVar2 = num_significand_bits<double>();
return lVar3 - (uVar4 >> ((char)iVar1 + 2U & 0x3f)) >>
(('?' - (char)iVar2) - (char)param_2 & 0x3fU);
}
| |
40,242 | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) | monkey531[P]llama/common/minja.hpp | static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
} | O2 | cpp | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp # imm = 0x1A8
movq %rdx, %r12
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq (%rsi), %r13
movq 0x8(%rsi), %r15
addq %r13, %r15
leaq (%rdx,%r13), %rbp
movb $0xa, %r14b
leaq 0x30(%rsp), %rbx
movb %r14b, (%rbx)
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x722a1
movb %r14b, (%rbx)
movq %rax, %r14
leaq 0x30(%rsp), %rdx
movq %r13, %rdi
movq %r15, %rsi
callq 0x722a1
movq %rax, %r15
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x527f4
pushq $0xa
popq %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x25140
movq %rax, %rbp
movq %rbx, %rdi
callq 0x251b8
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x24b80
leaq 0x1512f(%rip), %rsi # 0xb6839
movq %rbx, %rdi
movq 0x28(%rsp), %rbx
callq 0x24880
leaq 0x1(%r14), %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0x24850
leaq 0x1167f(%rip), %rsi # 0xb2dac
movq %rax, %rdi
callq 0x24880
subq %rbp, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x24610
leaq 0x18f03(%rip), %rsi # 0xba64d
movq %rax, %rdi
callq 0x24880
testq %r14, %r14
jle 0xa178b
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
movq %r14, %rdx
callq 0xa1896
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0x247b0
leaq 0x1015d(%rip), %rsi # 0xb18d8
movq %rax, %rdi
callq 0x24880
movq %rsp, %rdi
callq 0x251b8
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
movq %r13, %rdx
callq 0xa1896
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0x247b0
leaq 0x10129(%rip), %rsi # 0xb18d8
movq %rax, %rdi
callq 0x24880
movq %rsp, %rdi
callq 0x251b8
decq %r12
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rsp, %rdi
pushq $0x20
popq %rdx
movq %r12, %rsi
callq 0x249f0
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0x247b0
leaq 0x15055(%rip), %rsi # 0xb6842
movq %rax, %rdi
callq 0x24880
movq %rsp, %rdi
callq 0x251b8
cmpq %r15, %r14
jge 0xa183a
addq $0x2, %r14
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
movq %r14, %rdx
callq 0xa1896
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0x247b0
leaq 0x100ae(%rip), %rsi # 0xb18d8
movq %rax, %rdi
callq 0x24880
movq %rsp, %rdi
callq 0x251b8
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x24d90
leaq 0x30(%rsp), %rdi
callq 0x241f0
movq %rbx, %rax
addq $0x1a8, %rsp # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa1881
jmp 0xa1881
jmp 0xa1874
jmp 0xa1881
jmp 0xa1881
jmp 0xa1874
jmp 0xa1874
movq %rax, %rbx
movq %rsp, %rdi
callq 0x251b8
jmp 0xa1884
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x241f0
movq %rbx, %rdi
callq 0x24f60
| _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1A8h
mov r12, rdx
mov [rsp+1D8h+var_1B0], rdi
mov [rsp+1D8h+var_1B8], rsi
mov r13, [rsi]
mov r15, [rsi+8]
add r15, r13
lea rbp, [rdx+r13]
mov r14b, 0Ah
lea rbx, [rsp+1D8h+var_1A8]
mov [rbx], r14b
mov rdi, r13
mov rsi, rbp
mov rdx, rbx
call _ZSt10__count_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEENSt15iterator_traitsIT_E15difference_typeESF_SF_T0_; std::__count_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>)
mov [rbx], r14b
mov r14, rax
lea rdx, [rsp+1D8h+var_1A8]
mov rdi, r13
mov rsi, r15
call _ZSt10__count_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEENSt15iterator_traitsIT_E15difference_typeESF_SF_T0_; std::__count_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>)
mov r15, rax
lea rax, [rsp+1D8h+var_198]
mov [rax-10h], rax
lea rbx, [rsp+1D8h+var_1A8]
mov rdi, rbx
mov rsi, r13
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)
push 0Ah
pop rsi
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rdi, rbx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
mov rbp, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rbx, [rsp+1D8h+var_1A8]
mov rdi, rbx
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
lea rsi, aAtRow; " at row "
mov rdi, rbx
mov rbx, [rsp+1D8h+var_1B0]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea r13, [r14+1]
mov rdi, rax
mov rsi, r13
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
lea rsi, aColumn; ", column "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
sub r12, rbp
mov rdi, rax
mov rsi, r12
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aJsonSchemaConv+1Dh; ":\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
test r14, r14
jle short loc_A178B
mov rdi, rsp
lea rsi, [rsp+1D8h+var_1B8]
mov rdx, r14
call _ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0; minja::error_location_suffix(std::string const&,ulong)::$_0::operator()(ulong)
lea rdi, [rsp+1D8h+var_1A8]
mov rsi, rsp
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aErrorWhileHand_0+33h; "\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_A178B:
mov rdi, rsp
lea rsi, [rsp+1D8h+var_1B8]
mov rdx, r13
call _ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0; minja::error_location_suffix(std::string const&,ulong)::$_0::operator()(ulong)
lea rdi, [rsp+1D8h+var_1A8]
mov rsi, rsp
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aErrorWhileHand_0+33h; "\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
dec r12
lea rax, [rsp+1D8h+var_1C8]
mov [rax-10h], rax
mov rdi, rsp
push 20h ; ' '
pop rdx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
lea rdi, [rsp+1D8h+var_1A8]
mov rsi, rsp
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, asc_B6842; "^\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r14, r15
jge short loc_A183A
add r14, 2
mov rdi, rsp
lea rsi, [rsp+1D8h+var_1B8]
mov rdx, r14
call _ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0; minja::error_location_suffix(std::string const&,ulong)::$_0::operator()(ulong)
lea rdi, [rsp+1D8h+var_1A8]
mov rsi, rsp
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aErrorWhileHand_0+33h; "\n"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_A183A:
lea rsi, [rsp+1D8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+1D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rax, rbx
add rsp, 1A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_A1881
jmp short loc_A1881
jmp short loc_A1874
jmp short loc_A1881
jmp short loc_A1881
jmp short loc_A1874
jmp short $+2
loc_A1874:
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_A1884
loc_A1881:
mov rbx, rax
loc_A1884:
lea rdi, [rsp+arg_28]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rdi, rbx
call __Unwind_Resume
| long long minja::error_location_suffix(long long a1, long long a2, long long a3)
{
_BYTE *v4; // r13
_BYTE *v5; // r15
_BYTE *v6; // rbp
long long v7; // rax
long long v8; // r14
long long v9; // r15
long long v10; // rbp
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // r12
long long v15; // rax
long long v16; // rax
long long v17; // rax
long long v18; // rax
long long v19; // rax
_QWORD v21[2]; // [rsp+0h] [rbp-1D8h] BYREF
char v22; // [rsp+10h] [rbp-1C8h] BYREF
_QWORD v23[2]; // [rsp+20h] [rbp-1B8h] BYREF
char *v24; // [rsp+30h] [rbp-1A8h] BYREF
_BYTE v25[8]; // [rsp+38h] [rbp-1A0h] BYREF
char v26; // [rsp+40h] [rbp-198h] BYREF
v23[1] = a1;
v23[0] = a2;
v4 = *(_BYTE **)a2;
v5 = (_BYTE *)(*(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
v6 = (_BYTE *)(a3 + *(_QWORD *)a2);
LOBYTE(v24) = 10;
v7 = std::__count_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v4,
v6,
&v24);
LOBYTE(v24) = 10;
v8 = v7;
v9 = std::__count_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v4,
v5,
&v24);
v24 = &v26;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v24, v4, (long long)v6);
v10 = std::string::rfind(&v24, 10LL, -1LL);
std::string::~string(&v24);
std::ostringstream::basic_ostringstream(&v24);
v11 = std::operator<<<std::char_traits<char>>(&v24, " at row ");
v12 = std::ostream::_M_insert<long>(v11, v8 + 1);
v13 = std::operator<<<std::char_traits<char>>(v12, ", column ");
v14 = a3 - v10;
v15 = std::ostream::_M_insert<unsigned long>(v13, v14);
std::operator<<<std::char_traits<char>>(v15, ":\n");
if ( v8 > 0 )
{
minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](v21, v23, v8);
v16 = std::operator<<<char>(&v24, v21);
std::operator<<<std::char_traits<char>>(v16, "\n");
std::string::~string(v21);
}
minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](v21, v23, v8 + 1);
v17 = std::operator<<<char>(&v24, v21);
std::operator<<<std::char_traits<char>>(v17, "\n");
std::string::~string(v21);
v21[0] = &v22;
std::string::_M_construct(v21, v14 - 1, 32LL);
v18 = std::operator<<<char>(&v24, v21);
std::operator<<<std::char_traits<char>>(v18, "^\n");
std::string::~string(v21);
if ( v8 < v9 )
{
minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](v21, v23, v8 + 2);
v19 = std::operator<<<char>(&v24, v21);
std::operator<<<std::char_traits<char>>(v19, "\n");
std::string::~string(v21);
}
std::stringbuf::str(a1, v25);
std::ostringstream::~ostringstream(&v24);
return a1;
}
| error_location_suffix:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1a8
MOV R12,RDX
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV R13,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
ADD R15,R13
LEA RBP,[RDX + R13*0x1]
MOV R14B,0xa
LEA RBX,[RSP + 0x30]
MOV byte ptr [RBX],R14B
MOV RDI,R13
MOV RSI,RBP
MOV RDX,RBX
CALL 0x001722a1
MOV byte ptr [RBX],R14B
MOV R14,RAX
LEA RDX,[RSP + 0x30]
MOV RDI,R13
MOV RSI,R15
CALL 0x001722a1
MOV R15,RAX
LEA RAX,[RSP + 0x40]
MOV qword ptr [RAX + -0x10],RAX
LEA RBX,[RSP + 0x30]
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x001527f4
PUSH 0xa
POP RSI
PUSH -0x1
POP RDX
MOV RDI,RBX
CALL 0x00125140
MOV RBP,RAX
MOV RDI,RBX
CALL 0x001251b8
LEA RBX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00124b80
LAB_001a1703:
LEA RSI,[0x1b6839]
MOV RDI,RBX
MOV RBX,qword ptr [RSP + 0x28]
CALL 0x00124880
LEA R13,[R14 + 0x1]
MOV RDI,RAX
MOV RSI,R13
CALL 0x00124850
LEA RSI,[0x1b2dac]
MOV RDI,RAX
CALL 0x00124880
SUB R12,RBP
MOV RDI,RAX
MOV RSI,R12
CALL 0x00124610
LEA RSI,[0x1ba64d]
MOV RDI,RAX
CALL 0x00124880
TEST R14,R14
JLE 0x001a178b
LAB_001a1757:
MOV RDI,RSP
LEA RSI,[RSP + 0x20]
MOV RDX,R14
CALL 0x001a1896
LAB_001a1767:
LEA RDI,[RSP + 0x30]
MOV RSI,RSP
CALL 0x001247b0
LEA RSI,[0x1b18d8]
MOV RDI,RAX
CALL 0x00124880
MOV RDI,RSP
CALL 0x001251b8
LAB_001a178b:
MOV RDI,RSP
LEA RSI,[RSP + 0x20]
MOV RDX,R13
CALL 0x001a1896
LAB_001a179b:
LEA RDI,[RSP + 0x30]
MOV RSI,RSP
CALL 0x001247b0
LEA RSI,[0x1b18d8]
MOV RDI,RAX
CALL 0x00124880
MOV RDI,RSP
CALL 0x001251b8
DEC R12
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + -0x10],RAX
LAB_001a17cb:
MOV RDI,RSP
PUSH 0x20
POP RDX
MOV RSI,R12
CALL 0x001249f0
LAB_001a17d9:
LEA RDI,[RSP + 0x30]
MOV RSI,RSP
CALL 0x001247b0
LEA RSI,[0x1b6842]
MOV RDI,RAX
CALL 0x00124880
MOV RDI,RSP
CALL 0x001251b8
CMP R14,R15
JGE 0x001a183a
ADD R14,0x2
LAB_001a1806:
MOV RDI,RSP
LEA RSI,[RSP + 0x20]
MOV RDX,R14
CALL 0x001a1896
LAB_001a1816:
LEA RDI,[RSP + 0x30]
MOV RSI,RSP
CALL 0x001247b0
LEA RSI,[0x1b18d8]
MOV RDI,RAX
CALL 0x00124880
MOV RDI,RSP
CALL 0x001251b8
LAB_001a183a:
LEA RSI,[RSP + 0x38]
LAB_001a183f:
MOV RDI,RBX
CALL 0x00124d90
LAB_001a1847:
LEA RDI,[RSP + 0x30]
CALL 0x001241f0
MOV RAX,RBX
ADD RSP,0x1a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::error_location_suffix(std::__cxx11::string const&, unsigned long) */
minja * __thiscall minja::error_location_suffix(minja *this,string *param_1,ulong param_2)
{
long lVar1;
minja *pmVar2;
char cVar3;
long lVar4;
long lVar5;
ostream *poVar6;
int1 *local_1d8 [2];
int1 local_1c8 [16];
string *local_1b8;
minja *local_1b0;
int1 *local_1a8 [2];
int1 local_198 [360];
lVar1 = *(long *)param_1;
lVar5 = *(long *)(param_1 + 8);
local_1a8[0]._0_1_ = (string)0xa;
local_1b8 = param_1;
local_1b0 = this;
lVar4 = std::
__count_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar1,param_2 + lVar1,local_1a8);
local_1a8[0] = (int1 *)CONCAT71(local_1a8[0]._1_7_,10);
lVar5 = std::
__count_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar1,lVar5 + lVar1,local_1a8);
local_1a8[0] = local_198;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
((string *)local_1a8,lVar1,param_2 + lVar1);
cVar3 = std::__cxx11::string::rfind((char)(string *)local_1a8,10);
std::__cxx11::string::~string((string *)local_1a8);
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
pmVar2 = local_1b0;
/* try { // try from 001a1703 to 001a1751 has its CatchHandler @ 001a1881 */
poVar6 = std::operator<<((ostream *)local_1a8," at row ");
poVar6 = std::ostream::_M_insert<long>((long)poVar6);
poVar6 = std::operator<<(poVar6,", column ");
poVar6 = std::ostream::_M_insert<unsigned_long>((ulong)poVar6);
std::operator<<(poVar6,":\n");
if (0 < lVar4) {
/* try { // try from 001a1757 to 001a1766 has its CatchHandler @ 001a1868 */
error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0::operator()[abi_cxx11_
((ulong)local_1d8);
/* try { // try from 001a1767 to 001a1782 has its CatchHandler @ 001a1870 */
poVar6 = std::operator<<((ostream *)local_1a8,(string *)local_1d8);
std::operator<<(poVar6,"\n");
std::__cxx11::string::~string((string *)local_1d8);
}
/* try { // try from 001a178b to 001a179a has its CatchHandler @ 001a186e */
error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0::operator()[abi_cxx11_
((ulong)local_1d8);
/* try { // try from 001a179b to 001a17b6 has its CatchHandler @ 001a1874 */
poVar6 = std::operator<<((ostream *)local_1a8,(string *)local_1d8);
std::operator<<(poVar6,"\n");
std::__cxx11::string::~string((string *)local_1d8);
local_1d8[0] = local_1c8;
/* try { // try from 001a17cb to 001a17d8 has its CatchHandler @ 001a186c */
std::__cxx11::string::_M_construct((ulong)local_1d8,((char)param_2 - cVar3) + -1);
/* try { // try from 001a17d9 to 001a17f4 has its CatchHandler @ 001a1872 */
poVar6 = std::operator<<((ostream *)local_1a8,(string *)local_1d8);
std::operator<<(poVar6,"^\n");
std::__cxx11::string::~string((string *)local_1d8);
if (lVar4 < lVar5) {
/* try { // try from 001a1806 to 001a1815 has its CatchHandler @ 001a1866 */
error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0::operator()[abi_cxx11_
((ulong)local_1d8);
/* try { // try from 001a1816 to 001a1831 has its CatchHandler @ 001a186a */
poVar6 = std::operator<<((ostream *)local_1a8,(string *)local_1d8);
std::operator<<(poVar6,"\n");
std::__cxx11::string::~string((string *)local_1d8);
}
/* try { // try from 001a183f to 001a1846 has its CatchHandler @ 001a1881 */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
return pmVar2;
}
| |
40,243 | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) | monkey531[P]llama/common/minja.hpp | static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
} | O3 | cpp | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, 0x38(%rsp)
movq (%rsi), %rsi
movq 0x8(%r14), %rax
testq %rdx, %rdx
je 0x778f3
xorl %ecx, %ecx
xorl %r12d, %r12d
xorl %edx, %edx
cmpb $0xa, (%rsi,%rcx)
sete %dl
addq %rdx, %r12
incq %rcx
cmpq %rcx, %r8
jne 0x778dd
jmp 0x778f6
xorl %r12d, %r12d
leaq (%rsi,%r8), %rdx
testq %rax, %rax
movq %r8, 0x28(%rsp)
je 0x77920
xorl %ecx, %ecx
xorl %r15d, %r15d
xorl %edi, %edi
cmpb $0xa, (%rsi,%rcx)
sete %dil
addq %rdi, %r15
incq %rcx
cmpq %rcx, %rax
jne 0x77909
jmp 0x77923
xorl %r15d, %r15d
leaq 0x50(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x70332
movq %rbx, %rdi
movl $0xa, %esi
movq $-0x1, %rdx
callq 0x1c120
movq %rax, %r13
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0x77965
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x1bb70
leaq 0x7aed0(%rip), %rsi # 0xf2849
movl $0x8, %edx
movq %rbx, %rdi
callq 0x1b9c0
movq 0x28(%rsp), %rbx
leaq 0x1(%r12), %rsi
leaq 0x40(%rsp), %rdi
movq %rsi, 0x30(%rsp)
callq 0x1b830
movq %rax, %rbp
leaq 0x773f1(%rip), %rsi # 0xeed9a
movl $0x9, %edx
movq %rax, %rdi
callq 0x1b9c0
subq %r13, %rbx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1b5e0
leaq 0x7ec8f(%rip), %rsi # 0xf665a
movl $0x2, %edx
movq %rax, %rdi
callq 0x1b9c0
testq %r12, %r12
jle 0x77a87
movq (%r14), %r13
cmpq $0x1, %r12
jne 0x779ef
movq %r13, %rsi
jmp 0x77a1b
leaq -0x1(%r12), %rbp
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r13, %rdi
leaq 0x7(%rsp), %rdx
callq 0x98c20
movq %rax, %r13
incq %r13
decq %rbp
jne 0x779f4
movq (%r14), %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r13, %rdi
callq 0x98c20
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x70332
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x1b9c0
leaq 0x75e72(%rip), %rsi # 0xed8d5
movl $0x1, %edx
movq %rax, %rdi
callq 0x1b9c0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x77a87
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq (%r14), %r13
cmpq $0x2, 0x30(%rsp)
jb 0x77acb
movq %rbx, 0x28(%rsp)
leaq 0x7(%rsp), %rbp
movq %r12, %rbx
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r13, %rdi
movq %rbp, %rdx
callq 0x98c20
movq %rax, %r13
incq %r13
decq %rbx
jne 0x77a9f
movq (%r14), %rsi
movq 0x28(%rsp), %rbx
jmp 0x77ace
movq %r13, %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r13, %rdi
callq 0x98c20
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x70332
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x1b9c0
leaq 0x75dbf(%rip), %rsi # 0xed8d5
movl $0x1, %edx
movq %rax, %rdi
callq 0x1b9c0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x77b3a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
decq %rbx
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq %rbx, %rsi
movl $0x20, %edx
callq 0x1b9f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x1b9c0
leaq 0x7ace5(%rip), %rsi # 0xf2852
movl $0x2, %edx
movq %rax, %rdi
callq 0x1b9c0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x77b91
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
cmpq %r15, %r12
jge 0x77c3d
movq (%r14), %r15
cmpq $-0x3, %r12
ja 0x77bd4
leaq 0x7(%rsp), %r13
movq 0x30(%rsp), %rbx
movq (%r14), %rsi
addq 0x8(%r14), %rsi
movb $0xa, 0x7(%rsp)
movq %r15, %rdi
movq %r13, %rdx
callq 0x98c20
movq %rax, %r15
incq %r15
decq %rbx
jne 0x77bad
movq (%r14), %rsi
jmp 0x77bd7
movq %r15, %rsi
addq 0x8(%r14), %rsi
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r15, %rdi
callq 0x98c20
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq %r15, %rsi
movq %rax, %rdx
callq 0x70332
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x1b9c0
leaq 0x75cbc(%rip), %rsi # 0xed8d5
movl $0x1, %edx
movq %rax, %rdi
callq 0x1b9c0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x77c3d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x1bd90
movq 0xb6315(%rip), %rsi # 0x12df68
leaq 0x40(%rsp), %rdi
callq 0x1b490
leaq 0xb0(%rsp), %rdi
callq 0x1b2b0
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x77ca6
jmp 0x77ca6
jmp 0x77c8a
jmp 0x77ca6
jmp 0x77ca6
jmp 0x77c8a
jmp 0x77c8a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x77ca9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0x77ca9
movq %rax, %rbx
movq 0xb62b8(%rip), %rsi # 0x12df68
leaq 0x40(%rsp), %rdi
callq 0x1b490
leaq 0xb0(%rsp), %rdi
callq 0x1b2b0
movq %rbx, %rdi
callq 0x1bf70
| _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B8h
mov r8, rdx
mov r14, rsi
mov [rsp+1E8h+var_1B0], rdi
mov rsi, [rsi]
mov rax, [r14+8]
test rdx, rdx
jz short loc_778F3
xor ecx, ecx
xor r12d, r12d
loc_778DD:
xor edx, edx
cmp byte ptr [rsi+rcx], 0Ah
setz dl
add r12, rdx
inc rcx
cmp r8, rcx
jnz short loc_778DD
jmp short loc_778F6
loc_778F3:
xor r12d, r12d
loc_778F6:
lea rdx, [rsi+r8]
test rax, rax
mov [rsp+1E8h+var_1C0], r8
jz short loc_77920
xor ecx, ecx
xor r15d, r15d
loc_77909:
xor edi, edi
cmp byte ptr [rsi+rcx], 0Ah
setz dil
add r15, rdi
inc rcx
cmp rax, rcx
jnz short loc_77909
jmp short loc_77923
loc_77920:
xor r15d, r15d
loc_77923:
lea rbp, [rsp+1E8h+var_198]
mov [rbp-10h], rbp
lea rbx, [rsp+1E8h+var_1A8]
mov rdi, 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, rbx
mov esi, 0Ah
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong)
mov r13, rax
mov rdi, [rbx]; void *
cmp rdi, rbp
jz short loc_77965
mov rsi, [rsp+1E8h+var_198]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77965:
lea rbx, [rsp+1E8h+var_1A8]
mov rdi, rbx
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
lea rsi, aAtRow; " at row "
mov edx, 8
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+1E8h+var_1C0]
lea rsi, [r12+1]
lea rdi, [rsp+1E8h+var_1A8]
mov [rsp+1E8h+var_1B8], rsi
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
mov rbp, rax
lea rsi, aColumn; ", column "
mov edx, 9
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)
sub rbx, r13
mov rdi, rbp
mov rsi, rbx
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
lea rsi, aJsonSchemaConv+1Dh; ":\n"
mov edx, 2
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)
test r12, r12
jle loc_77A87
mov r13, [r14]
cmp r12, 1
jnz short loc_779EF
mov rsi, r13
jmp short loc_77A1B
loc_779EF:
lea rbp, [r12-1]
loc_779F4:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r13
lea rdx, [rsp+1E8h+var_1E1]
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r13, rax
inc r13
dec rbp
jnz short loc_779F4
mov rsi, [r14]
loc_77A1B:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rbp, [rsp+1E8h+var_1D0]
mov [rbp-10h], rbp
lea rdi, [rsp+1E8h+var_1E0]
mov rsi, r13
mov rdx, rax
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 rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aErrorWhileHand_0+33h; "\n"
mov edx, 1
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 rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_77A87
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77A87:
mov r13, [r14]
cmp [rsp+1E8h+var_1B8], 2
jb short loc_77ACB
mov [rsp+1E8h+var_1C0], rbx
lea rbp, [rsp+1E8h+var_1E1]
mov rbx, r12
loc_77A9F:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r13
mov rdx, rbp
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r13, rax
inc r13
dec rbx
jnz short loc_77A9F
mov rsi, [r14]
mov rbx, [rsp+1E8h+var_1C0]
jmp short loc_77ACE
loc_77ACB:
mov rsi, r13
loc_77ACE:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rbp, [rsp+1E8h+var_1D0]
mov [rbp-10h], rbp
lea rdi, [rsp+1E8h+var_1E0]
mov rsi, r13
mov rdx, rax
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 rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aErrorWhileHand_0+33h; "\n"
mov edx, 1
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 rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_77B3A
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77B3A:
dec rbx
lea rdi, [rsp+1E8h+var_1E0]
mov [rdi], rbp
mov rsi, rbx
mov edx, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_F2852; "^\n"
mov edx, 2
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 rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_77B91
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77B91:
cmp r12, r15
jge loc_77C3D
mov r15, [r14]
cmp r12, 0FFFFFFFFFFFFFFFDh
ja short loc_77BD4
lea r13, [rsp+1E8h+var_1E1]
mov rbx, [rsp+1E8h+var_1B8]
loc_77BAD:
mov rsi, [r14]
add rsi, [r14+8]
mov [rsp+1E8h+var_1E1], 0Ah
mov rdi, r15
mov rdx, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r15, rax
inc r15
dec rbx
jnz short loc_77BAD
mov rsi, [r14]
jmp short loc_77BD7
loc_77BD4:
mov rsi, r15
loc_77BD7:
add rsi, [r14+8]
lea rdx, [rsp+1E8h+var_1E1]
mov byte ptr [rdx], 0Ah
mov rdi, r15
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rdi, [rsp+1E8h+var_1E0]
mov [rdi], rbp
mov rsi, r15
mov rdx, rax
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 rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aErrorWhileHand_0+33h; "\n"
mov edx, 1
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 rdi, [rsp+1E8h+var_1E0]; void *
cmp rdi, rbp
jz short loc_77C3D
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77C3D:
lea rsi, [rsp+1E8h+var_1A0]
mov rdi, [rsp+1E8h+var_1B0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 1B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_77CA6
jmp short loc_77CA6
jmp short loc_77C8A
jmp short loc_77CA6
jmp short loc_77CA6
jmp short loc_77C8A
jmp short $+2
loc_77C8A:
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_77CA9
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77CA9
loc_77CA6:
mov rbx, rax
loc_77CA9:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_38]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_A8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| void minja::error_location_suffix(long long a1, long long a2, long long a3)
{
_BYTE *v4; // rsi
long long v5; // rax
long long v6; // rcx
long long v7; // r12
long long v8; // rcx
long long v9; // r15
long long v10; // r13
long long v11; // rbp
long long v12; // rbx
long long v13; // rax
_BYTE *v14; // r13
_BYTE *v15; // rsi
long long v16; // rbp
long long v17; // rsi
_BYTE *v18; // rsi
long long v19; // rax
long long v20; // rax
_BYTE *v21; // r13
long long v22; // rbx
long long v23; // rsi
_BYTE *v24; // rsi
_BYTE *v25; // rsi
long long v26; // rax
long long v27; // rax
long long v28; // rax
_BYTE *v29; // r15
unsigned long long v30; // rbx
long long v31; // rsi
_BYTE *v32; // rsi
_BYTE *v33; // rsi
long long v34; // rax
long long v35; // rax
char v36; // [rsp+7h] [rbp-1E1h] BYREF
void *v37; // [rsp+8h] [rbp-1E0h] BYREF
long long v38; // [rsp+10h] [rbp-1D8h]
_QWORD v39[2]; // [rsp+18h] [rbp-1D0h] BYREF
long long v40; // [rsp+28h] [rbp-1C0h]
unsigned long long v41; // [rsp+30h] [rbp-1B8h]
long long v42; // [rsp+38h] [rbp-1B0h]
_QWORD *v43; // [rsp+40h] [rbp-1A8h] BYREF
char v44[8]; // [rsp+48h] [rbp-1A0h] BYREF
_QWORD v45[12]; // [rsp+50h] [rbp-198h] BYREF
char v46[312]; // [rsp+B0h] [rbp-138h] BYREF
v42 = a1;
v4 = *(_BYTE **)a2;
v5 = *(_QWORD *)(a2 + 8);
if ( a3 )
{
v6 = 0LL;
v7 = 0LL;
do
v7 += v4[v6++] == 10;
while ( a3 != v6 );
}
else
{
v7 = 0LL;
}
v40 = a3;
if ( v5 )
{
v8 = 0LL;
v9 = 0LL;
do
v9 += v4[v8++] == 10;
while ( v5 != v8 );
}
else
{
v9 = 0LL;
}
v43 = v45;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v43, v4, (long long)&v4[a3]);
v10 = std::string::rfind(&v43, 10LL, -1LL);
if ( v43 != v45 )
operator delete(v43, v45[0] + 1LL);
std::ostringstream::basic_ostringstream(&v43);
std::__ostream_insert<char,std::char_traits<char>>(&v43, " at row ", 8LL);
v41 = v7 + 1;
v11 = std::ostream::_M_insert<long>(&v43);
std::__ostream_insert<char,std::char_traits<char>>(v11, ", column ", 9LL);
v12 = v40 - v10;
v13 = std::ostream::_M_insert<unsigned long>(v11, v40 - v10);
std::__ostream_insert<char,std::char_traits<char>>(v13, ":\n", 2LL);
if ( v7 > 0 )
{
v14 = *(_BYTE **)a2;
if ( v7 == 1 )
{
v15 = *(_BYTE **)a2;
}
else
{
v16 = v7 - 1;
do
{
v17 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v14 = (_BYTE *)(std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v14,
v17,
&v36)
+ 1);
--v16;
}
while ( v16 );
v15 = *(_BYTE **)a2;
}
v18 = &v15[*(_QWORD *)(a2 + 8)];
v36 = 10;
v19 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v14,
v18,
&v36);
v37 = v39;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v14, v19);
v20 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v20, "\n", 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
}
v21 = *(_BYTE **)a2;
if ( v41 < 2 )
{
v24 = *(_BYTE **)a2;
}
else
{
v40 = v12;
v22 = v7;
do
{
v23 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v21 = (_BYTE *)(std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v21,
v23,
&v36)
+ 1);
--v22;
}
while ( v22 );
v24 = *(_BYTE **)a2;
v12 = v40;
}
v25 = &v24[*(_QWORD *)(a2 + 8)];
v36 = 10;
v26 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v21,
v25,
&v36);
v37 = v39;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v21, v26);
v27 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v27, "\n", 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
v37 = v39;
std::string::_M_construct(&v37, v12 - 1, 32LL);
v28 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v28, "^\n", 2LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
if ( v7 < v9 )
{
v29 = *(_BYTE **)a2;
if ( (unsigned long long)v7 > 0xFFFFFFFFFFFFFFFDLL )
{
v32 = *(_BYTE **)a2;
}
else
{
v30 = v41;
do
{
v31 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2;
v36 = 10;
v29 = (_BYTE *)(std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v29,
v31,
&v36)
+ 1);
--v30;
}
while ( v30 );
v32 = *(_BYTE **)a2;
}
v33 = &v32[*(_QWORD *)(a2 + 8)];
v36 = 10;
v34 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
v29,
v33,
&v36);
v37 = v39;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v29, v34);
v35 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38);
std::__ostream_insert<char,std::char_traits<char>>(v35, "\n", 1LL);
if ( v37 != v39 )
operator delete(v37, v39[0] + 1LL);
}
std::stringbuf::str(v42, v44);
std::ostringstream::~ostringstream(&v43, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v46);
}
| error_location_suffix:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b8
MOV R8,RDX
MOV R14,RSI
MOV qword ptr [RSP + 0x38],RDI
MOV RSI,qword ptr [RSI]
MOV RAX,qword ptr [R14 + 0x8]
TEST RDX,RDX
JZ 0x001778f3
XOR ECX,ECX
XOR R12D,R12D
LAB_001778dd:
XOR EDX,EDX
CMP byte ptr [RSI + RCX*0x1],0xa
SETZ DL
ADD R12,RDX
INC RCX
CMP R8,RCX
JNZ 0x001778dd
JMP 0x001778f6
LAB_001778f3:
XOR R12D,R12D
LAB_001778f6:
LEA RDX,[RSI + R8*0x1]
TEST RAX,RAX
MOV qword ptr [RSP + 0x28],R8
JZ 0x00177920
XOR ECX,ECX
XOR R15D,R15D
LAB_00177909:
XOR EDI,EDI
CMP byte ptr [RSI + RCX*0x1],0xa
SETZ DIL
ADD R15,RDI
INC RCX
CMP RAX,RCX
JNZ 0x00177909
JMP 0x00177923
LAB_00177920:
XOR R15D,R15D
LAB_00177923:
LEA RBP,[RSP + 0x50]
MOV qword ptr [RBP + -0x10],RBP
LEA RBX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x00170332
MOV RDI,RBX
MOV ESI,0xa
MOV RDX,-0x1
CALL 0x0011c120
MOV R13,RAX
MOV RDI,qword ptr [RBX]
CMP RDI,RBP
JZ 0x00177965
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0011b8b0
LAB_00177965:
LEA RBX,[RSP + 0x40]
MOV RDI,RBX
CALL 0x0011bb70
LAB_00177972:
LEA RSI,[0x1f2849]
MOV EDX,0x8
MOV RDI,RBX
CALL 0x0011b9c0
MOV RBX,qword ptr [RSP + 0x28]
LEA RSI,[R12 + 0x1]
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x30],RSI
CALL 0x0011b830
MOV RBP,RAX
LEA RSI,[0x1eed9a]
MOV EDX,0x9
MOV RDI,RAX
CALL 0x0011b9c0
SUB RBX,R13
MOV RDI,RBP
MOV RSI,RBX
CALL 0x0011b5e0
LEA RSI,[0x1f665a]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x0011b9c0
TEST R12,R12
JLE 0x00177a87
MOV R13,qword ptr [R14]
CMP R12,0x1
JNZ 0x001779ef
MOV RSI,R13
JMP 0x00177a1b
LAB_001779ef:
LEA RBP,[R12 + -0x1]
LAB_001779f4:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R13
LEA RDX,[RSP + 0x7]
CALL 0x00198c20
MOV R13,RAX
INC R13
DEC RBP
JNZ 0x001779f4
MOV RSI,qword ptr [R14]
LAB_00177a1b:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R13
CALL 0x00198c20
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
LAB_00177a38:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
MOV RDX,RAX
CALL 0x00170332
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00177a52:
LEA RDI,[RSP + 0x40]
CALL 0x0011b9c0
LEA RSI,[0x1ed8d5]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x0011b9c0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00177a87
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_00177a87:
MOV R13,qword ptr [R14]
CMP qword ptr [RSP + 0x30],0x2
JC 0x00177acb
MOV qword ptr [RSP + 0x28],RBX
LEA RBP,[RSP + 0x7]
MOV RBX,R12
LAB_00177a9f:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R13
MOV RDX,RBP
CALL 0x00198c20
MOV R13,RAX
INC R13
DEC RBX
JNZ 0x00177a9f
MOV RSI,qword ptr [R14]
MOV RBX,qword ptr [RSP + 0x28]
JMP 0x00177ace
LAB_00177acb:
MOV RSI,R13
LAB_00177ace:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R13
CALL 0x00198c20
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
LAB_00177aeb:
LEA RDI,[RSP + 0x8]
MOV RSI,R13
MOV RDX,RAX
CALL 0x00170332
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00177b05:
LEA RDI,[RSP + 0x40]
CALL 0x0011b9c0
LEA RSI,[0x1ed8d5]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x0011b9c0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00177b3a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_00177b3a:
DEC RBX
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RBP
LAB_00177b45:
MOV RSI,RBX
MOV EDX,0x20
CALL 0x0011b9f0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00177b5c:
LEA RDI,[RSP + 0x40]
CALL 0x0011b9c0
LEA RSI,[0x1f2852]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x0011b9c0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00177b91
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_00177b91:
CMP R12,R15
JGE 0x00177c3d
MOV R15,qword ptr [R14]
CMP R12,-0x3
JA 0x00177bd4
LEA R13,[RSP + 0x7]
MOV RBX,qword ptr [RSP + 0x30]
LAB_00177bad:
MOV RSI,qword ptr [R14]
ADD RSI,qword ptr [R14 + 0x8]
MOV byte ptr [RSP + 0x7],0xa
MOV RDI,R15
MOV RDX,R13
CALL 0x00198c20
MOV R15,RAX
INC R15
DEC RBX
JNZ 0x00177bad
MOV RSI,qword ptr [R14]
JMP 0x00177bd7
LAB_00177bd4:
MOV RSI,R15
LAB_00177bd7:
ADD RSI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R15
CALL 0x00198c20
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RBP
LAB_00177bf3:
MOV RSI,R15
MOV RDX,RAX
CALL 0x00170332
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00177c08:
LEA RDI,[RSP + 0x40]
CALL 0x0011b9c0
LEA RSI,[0x1ed8d5]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x0011b9c0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00177c3d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_00177c3d:
LEA RSI,[RSP + 0x48]
LAB_00177c42:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0011bd90
LAB_00177c4c:
MOV RSI,qword ptr [0x0022df68]
LEA RDI,[RSP + 0x40]
CALL 0x0011b490
LEA RDI,[RSP + 0xb0]
CALL 0x0011b2b0
ADD RSP,0x1b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::error_location_suffix(std::__cxx11::string const&, unsigned long) */
void __thiscall minja::error_location_suffix(minja *this,string *param_1,ulong param_2)
{
long lVar1;
ostream *poVar2;
int8 uVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
long lVar9;
int1 local_1e1;
long *local_1e0;
long local_1d8;
long local_1d0 [2];
ulong local_1c0;
ulong local_1b8;
minja *local_1b0;
long *local_1a8 [2];
long local_198 [12];
ios_base local_138 [264];
lVar1 = *(long *)param_1;
if (param_2 == 0) {
uVar8 = 0;
}
else {
uVar4 = 0;
uVar8 = 0;
do {
uVar8 = uVar8 + (*(char *)(lVar1 + uVar4) == '\n');
uVar4 = uVar4 + 1;
} while (param_2 != uVar4);
}
if (*(long *)(param_1 + 8) == 0) {
lVar9 = 0;
}
else {
lVar5 = 0;
lVar9 = 0;
do {
lVar9 = lVar9 + (ulong)(*(char *)(lVar1 + lVar5) == '\n');
lVar5 = lVar5 + 1;
} while (*(long *)(param_1 + 8) != lVar5);
}
local_1c0 = param_2;
local_1b0 = this;
local_1a8[0] = local_198;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(local_1a8,lVar1,lVar1 + param_2);
lVar1 = std::__cxx11::string::rfind((char)local_1a8,10);
if (local_1a8[0] != local_198) {
operator_delete(local_1a8[0],local_198[0] + 1);
}
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
/* try { // try from 00177972 to 001779d7 has its CatchHandler @ 00177ca6 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8," at row ",8);
uVar4 = local_1c0;
local_1b8 = uVar8 + 1;
poVar2 = std::ostream::_M_insert<long>((long)local_1a8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,", column ",9);
uVar4 = uVar4 - lVar1;
poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,":\n",2);
if (0 < (long)uVar8) {
lVar1 = *(long *)param_1;
lVar5 = lVar1;
if (uVar8 != 1) {
lVar7 = uVar8 - 1;
do {
local_1e1 = 10;
lVar5 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar5 = lVar5 + 1;
lVar7 = lVar7 + -1;
} while (lVar7 != 0);
lVar1 = *(long *)param_1;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,lVar1 + *(long *)(param_1 + 8));
/* try { // try from 00177a38 to 00177a47 has its CatchHandler @ 00177c7e */
local_1e0 = local_1d0;
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar5,uVar3);
/* try { // try from 00177a52 to 00177a6f has its CatchHandler @ 00177c86 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
}
lVar1 = *(long *)param_1;
lVar5 = lVar1;
if (1 < local_1b8) {
uVar6 = uVar8;
local_1c0 = uVar4;
do {
local_1e1 = 10;
lVar5 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar5 = lVar5 + 1;
uVar6 = uVar6 - 1;
} while (uVar6 != 0);
lVar1 = *(long *)param_1;
uVar4 = local_1c0;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar5,lVar1 + *(long *)(param_1 + 8));
/* try { // try from 00177aeb to 00177afa has its CatchHandler @ 00177c84 */
local_1e0 = local_1d0;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar5,uVar3);
/* try { // try from 00177b05 to 00177b22 has its CatchHandler @ 00177c8a */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
local_1e0 = local_1d0;
/* try { // try from 00177b45 to 00177b51 has its CatchHandler @ 00177c82 */
std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar4 + -1);
/* try { // try from 00177b5c to 00177b79 has its CatchHandler @ 00177c88 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"^\n",2);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
if ((long)uVar8 < lVar9) {
lVar1 = *(long *)param_1;
lVar9 = lVar1;
if (uVar8 < 0xfffffffffffffffe) {
uVar8 = local_1b8;
do {
local_1e1 = 10;
lVar9 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar9,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1);
lVar9 = lVar9 + 1;
uVar8 = uVar8 - 1;
} while (uVar8 != 0);
lVar1 = *(long *)param_1;
}
local_1e1 = 10;
uVar3 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar9,lVar1 + *(long *)(param_1 + 8));
local_1e0 = local_1d0;
/* try { // try from 00177bf3 to 00177bfd has its CatchHandler @ 00177c7c */
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_1e0,lVar9,uVar3);
/* try { // try from 00177c08 to 00177c25 has its CatchHandler @ 00177c80 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1e0,local_1d8);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
}
/* try { // try from 00177c42 to 00177c4b has its CatchHandler @ 00177ca6 */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
std::ios_base::~ios_base(local_138);
return;
}
| |
40,244 | 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);
} | O3 | c | my_wildcmp_uca_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, -0x54(%rbp)
movq %r8, %r12
movq %rcx, %r13
movq %rdx, -0x40(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
movl 0x20(%rbp), %eax
movq %rax, -0x60(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r14
leaq 0xb50caf(%rip), %rax # 0xc08e58
movq (%rax), %rax
testq %rax, %rax
je 0xb81c3
movl 0x20(%rbp), %edi
callq *%rax
movl $0x1, %ebx
testl %eax, %eax
jne 0xb8440
cmpq %r12, %r13
je 0xb82c4
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %ecx
cltq
movq %rax, -0x78(%rbp)
movslq -0x54(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq %ecx, %rax
movq %rax, -0x68(%rbp)
movq %r14, -0x48(%rbp)
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0xb843b
movq -0x38(%rbp), %rcx
cmpq -0x78(%rbp), %rcx
je 0xb82d6
movl %eax, %eax
addq %rax, %r13
cmpq -0x70(%rbp), %rcx
jne 0xb8272
cmpq %r12, %r13
jae 0xb8272
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0xb843b
movl %eax, %ebx
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
movq %r14, %rax
movq -0x30(%rbp), %r14
movq %r14, %rdx
movq -0x40(%rbp), %rcx
callq *%rax
testl %eax, %eax
jle 0xb843b
movl %ebx, %ecx
addq %rcx, %r13
movl %eax, %eax
addq %rax, %r14
movq %r14, -0x30(%rbp)
movq -0x38(%rbp), %rdx
movq -0x48(%rbp), %r14
jmp 0xb82a2
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rbx
movq %rbx, %rdx
movq -0x40(%rbp), %rcx
callq *%r14
testl %eax, %eax
jle 0xb843b
movl %eax, %eax
addq %rax, %rbx
movq %rbx, -0x30(%rbp)
movq -0x38(%rbp), %rdx
cmpq -0x68(%rbp), %rdx
je 0xb82bb
movq -0x50(%rbp), %rsi
movq %r15, %rdi
callq 0xbcc60
movl $0x1, %ebx
testl %eax, %eax
jne 0xb8440
cmpq %r12, %r13
jne 0xb81eb
xorl %ebx, %ebx
movq -0x40(%rbp), %rax
cmpq %rax, -0x30(%rbp)
setne %bl
jmp 0xb8440
xorl %ebx, %ebx
cmpq %r12, %r13
je 0xb8440
movq %r15, %rdi
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0xb843b
movl %eax, %r14d
movq -0x38(%rbp), %rax
cmpq -0x78(%rbp), %rax
jne 0xb831a
movl %r14d, %eax
addq %rax, %r13
cmpq %r12, %r13
movq -0x48(%rbp), %r14
jne 0xb82e1
jmp 0xb8440
cmpq -0x68(%rbp), %rax
jne 0xb8348
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq *-0x48(%rbp)
testl %eax, %eax
jle 0xb843b
movl %r14d, %ecx
addq %rcx, %r13
movl %eax, %eax
addq %rax, -0x30(%rbp)
jmp 0xb830c
movq -0x40(%rbp), %rax
cmpq %rax, -0x30(%rbp)
je 0xb8451
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
movq -0x48(%rbp), %r14
callq *%r14
testl %eax, %eax
jle 0xb843b
movl %eax, %eax
addq %rax, %r13
movq -0x70(%rbp), %rax
cmpq %rax, -0x38(%rbp)
jne 0xb83a3
cmpq %r12, %r13
jae 0xb83a3
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0xb843b
movl %eax, %eax
addq %rax, %r13
movq -0x60(%rbp), %rax
incl %eax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rbx
movq -0x40(%rbp), %rcx
cmpq %rcx, %rbx
je 0xb8451
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
jle 0xb843b
movl %eax, %r14d
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq %r15, %rdi
callq 0xbcc60
movl %r14d, %ecx
addq %rcx, %rbx
testl %eax, %eax
je 0xb83fb
movq -0x40(%rbp), %rcx
cmpq %rcx, %rbx
movq -0x48(%rbp), %r14
jne 0xb83be
jmp 0xb8451
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, -0x30(%rbp)
movq %rbx, %rsi
movq -0x40(%rbp), %rdx
movq %r13, %rcx
movq %r12, %r8
movl -0x54(%rbp), %r9d
pushq -0x60(%rbp)
movl 0x18(%rbp), %eax
pushq %rax
movl 0x10(%rbp), %eax
pushq %rax
callq 0xb816a
addq $0x20, %rsp
movl %eax, %ebx
testl %eax, %eax
movq -0x48(%rbp), %r14
jg 0xb83ad
jmp 0xb8440
movl $0x1, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0xb8440
| my_wildcmp_uca_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_54], r9d
mov r12, r8
mov r13, rcx
mov [rbp+var_40], rdx
mov [rbp+var_30], rsi
mov r15, rdi
mov eax, [rbp+arg_10]
mov [rbp+var_60], rax
mov rax, [rdi+0B8h]
mov r14, [rax+28h]
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_B81C3
mov edi, [rbp+arg_10]
call rax
mov ebx, 1
test eax, eax
jnz loc_B8440
loc_B81C3:
cmp r13, r12
jz loc_B82C4
mov eax, [rbp+arg_8]
mov ecx, [rbp+arg_0]
cdqe
mov [rbp+var_78], rax
movsxd rax, [rbp+var_54]
mov [rbp+var_70], rax
movsxd rax, ecx
mov [rbp+var_68], rax
mov [rbp+var_48], r14
loc_B81EB:
mov rdi, r15
lea rsi, [rbp+var_38]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_B843B
mov rcx, [rbp+var_38]
cmp rcx, [rbp+var_78]
jz loc_B82D6
mov eax, eax
add r13, rax
cmp rcx, [rbp+var_70]
jnz short loc_B8272
cmp r13, r12
jnb short loc_B8272
mov rdi, r15
lea rsi, [rbp+var_38]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_B843B
mov ebx, eax
mov rdi, r15
lea rsi, [rbp+var_50]
mov rax, r14
mov r14, [rbp+var_30]
mov rdx, r14
mov rcx, [rbp+var_40]
call rax
test eax, eax
jle loc_B843B
mov ecx, ebx
add r13, rcx
mov eax, eax
add r14, rax
mov [rbp+var_30], r14
mov rdx, [rbp+var_38]
mov r14, [rbp+var_48]
jmp short loc_B82A2
loc_B8272:
mov rdi, r15
lea rsi, [rbp+var_50]
mov rbx, [rbp+var_30]
mov rdx, rbx
mov rcx, [rbp+var_40]
call r14
test eax, eax
jle loc_B843B
mov eax, eax
add rbx, rax
mov [rbp+var_30], rbx
mov rdx, [rbp+var_38]
cmp rdx, [rbp+var_68]
jz short loc_B82BB
loc_B82A2:
mov rsi, [rbp+var_50]
mov rdi, r15
call my_uca_charcmp
mov ebx, 1
test eax, eax
jnz loc_B8440
loc_B82BB:
cmp r13, r12
jnz loc_B81EB
loc_B82C4:
xor ebx, ebx
mov rax, [rbp+var_40]
cmp [rbp+var_30], rax
setnz bl
jmp loc_B8440
loc_B82D6:
xor ebx, ebx
cmp r13, r12
jz loc_B8440
loc_B82E1:
mov rdi, r15
lea rsi, [rbp+var_38]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_B843B
mov r14d, eax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_78]
jnz short loc_B831A
mov eax, r14d
add r13, rax
loc_B830C:
cmp r13, r12
mov r14, [rbp+var_48]
jnz short loc_B82E1
jmp loc_B8440
loc_B831A:
cmp rax, [rbp+var_68]
jnz short loc_B8348
mov rdi, r15
lea rsi, [rbp+var_50]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_40]
call [rbp+var_48]
test eax, eax
jle loc_B843B
mov ecx, r14d
add r13, rcx
mov eax, eax
add [rbp+var_30], rax
jmp short loc_B830C
loc_B8348:
mov rax, [rbp+var_40]
cmp [rbp+var_30], rax
jz loc_B8451
lea rsi, [rbp+var_38]
mov rdi, r15
mov rdx, r13
mov rcx, r12
mov r14, [rbp+var_48]
call r14
test eax, eax
jle loc_B843B
mov eax, eax
add r13, rax
mov rax, [rbp+var_70]
cmp [rbp+var_38], rax
jnz short loc_B83A3
cmp r13, r12
jnb short loc_B83A3
lea rsi, [rbp+var_38]
mov rdi, r15
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_B843B
mov eax, eax
add r13, rax
loc_B83A3:
mov rax, [rbp+var_60]
inc eax
mov [rbp+var_60], rax
loc_B83AD:
mov rbx, [rbp+var_30]
mov rcx, [rbp+var_40]
cmp rbx, rcx
jz loc_B8451
loc_B83BE:
mov rdi, r15
lea rsi, [rbp+var_50]
mov rdx, rbx
call r14
test eax, eax
jle short loc_B843B
mov r14d, eax
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_38]
mov rdi, r15
call my_uca_charcmp
mov ecx, r14d
add rbx, rcx
test eax, eax
jz short loc_B83FB
mov rcx, [rbp+var_40]
cmp rbx, rcx
mov r14, [rbp+var_48]
jnz short loc_B83BE
jmp short loc_B8451
loc_B83FB:
sub rsp, 8
mov rdi, r15
mov [rbp+var_30], rbx
mov rsi, rbx
mov rdx, [rbp+var_40]
mov rcx, r13
mov r8, r12
mov r9d, [rbp+var_54]
push [rbp+var_60]
mov eax, [rbp+arg_8]
push rax
mov eax, [rbp+arg_0]
push rax
call my_wildcmp_uca_impl
add rsp, 20h
mov ebx, eax
test eax, eax
mov r14, [rbp+var_48]
jg loc_B83AD
jmp short loc_B8440
loc_B843B:
mov ebx, 1
loc_B8440:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B8451:
mov ebx, 0FFFFFFFFh
jmp short loc_B8440
| long long my_wildcmp_uca_impl(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
unsigned long long a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
long long ( *v11)(long long, long long *, unsigned long long, unsigned long long); // r14
unsigned int v12; // ebx
int v13; // eax
int v14; // eax
unsigned int v15; // ebx
long long ( *v16)(long long, long long *, long long, long long); // rax
long long v17; // r14
int v18; // eax
long long v19; // rdx
long long v20; // rbx
int v21; // eax
int v22; // eax
unsigned int v23; // r14d
int v24; // eax
long long ( *v25)(long long, long long *, unsigned long long, unsigned long long); // r14
int v26; // eax
unsigned long long v27; // r13
int v28; // eax
long long v29; // rbx
int v30; // eax
long long v33; // [rsp+30h] [rbp-50h] BYREF
long long ( *v34)(long long, long long *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-48h]
long long v35; // [rsp+40h] [rbp-40h]
long long v36; // [rsp+48h] [rbp-38h] BYREF
long long v37; // [rsp+50h] [rbp-30h]
v35 = a3;
v37 = a2;
v11 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( !my_string_stack_guard || (v12 = 1, !(unsigned int)my_string_stack_guard(a9)) )
{
if ( a4 != a5 )
{
v34 = v11;
while ( 1 )
{
v13 = v11(a1, &v36, a4, a5);
if ( v13 <= 0 )
return 1;
if ( v36 == a8 )
{
v12 = 0;
if ( a4 == a5 )
return v12;
while ( 1 )
{
v22 = v11(a1, &v36, a4, a5);
if ( v22 <= 0 )
return 1;
v23 = v22;
if ( v36 == a8 )
{
a4 += (unsigned int)v22;
}
else
{
if ( v36 != a7 )
{
if ( v37 == v35 )
return (unsigned int)-1;
v25 = v34;
v26 = v34(a1, &v36, a4, a5);
if ( v26 <= 0 )
return 1;
v27 = (unsigned int)v26 + a4;
if ( v36 == a6 && v27 < a5 )
{
v28 = v25(a1, &v36, v27, a5);
if ( v28 <= 0 )
return 1;
LODWORD(v27) = v28 + v27;
}
LABEL_32:
v29 = v37;
if ( v37 == v35 )
return (unsigned int)-1;
while ( 1 )
{
v30 = ((long long ( *)(long long, long long *, long long))v25)(a1, &v33, v29);
if ( v30 <= 0 )
return 1;
v29 += (unsigned int)v30;
if ( !(unsigned int)my_uca_charcmp(a1, v33, v36) )
{
v37 = v29;
v12 = my_wildcmp_uca_impl(a1, v29, v35, v27, a5, a6, a7, a8, a9 + 1);
v25 = v34;
if ( (int)v12 > 0 )
goto LABEL_32;
return v12;
}
v25 = v34;
if ( v29 == v35 )
return (unsigned int)-1;
}
}
v24 = v34(a1, &v33, v37, v35);
if ( v24 <= 0 )
return 1;
a4 += v23;
v37 += (unsigned int)v24;
}
v11 = v34;
if ( a4 == a5 )
return v12;
}
}
a4 += (unsigned int)v13;
if ( v36 == a6 && a4 < a5 )
break;
v20 = v37;
v21 = v11(a1, &v33, v37, v35);
if ( v21 <= 0 )
return 1;
v37 = (unsigned int)v21 + v20;
v19 = v36;
if ( v36 != a7 )
goto LABEL_14;
LABEL_15:
if ( a4 == a5 )
return v37 != v35;
}
v14 = v11(a1, &v36, a4, a5);
if ( v14 <= 0 )
return 1;
v15 = v14;
v16 = (long long ( *)(long long, long long *, long long, long long))v11;
v17 = v37;
v18 = v16(a1, &v33, v37, v35);
if ( v18 <= 0 )
return 1;
a4 += v15;
v37 = (unsigned int)v18 + v17;
v19 = v36;
v11 = v34;
LABEL_14:
v12 = 1;
if ( (unsigned int)my_uca_charcmp(a1, v33, v19) )
return v12;
goto LABEL_15;
}
return v37 != v35;
}
return v12;
}
| my_wildcmp_uca_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RBP + -0x54],R9D
MOV R12,R8
MOV R13,RCX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x30],RSI
MOV R15,RDI
MOV EAX,dword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV R14,qword ptr [RAX + 0x28]
LEA RAX,[0xd08e58]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001b81c3
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
MOV EBX,0x1
TEST EAX,EAX
JNZ 0x001b8440
LAB_001b81c3:
CMP R13,R12
JZ 0x001b82c4
MOV EAX,dword ptr [RBP + 0x18]
MOV ECX,dword ptr [RBP + 0x10]
CDQE
MOV qword ptr [RBP + -0x78],RAX
MOVSXD RAX,dword ptr [RBP + -0x54]
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RAX,ECX
MOV qword ptr [RBP + -0x68],RAX
MOV qword ptr [RBP + -0x48],R14
LAB_001b81eb:
MOV RDI,R15
LEA RSI,[RBP + -0x38]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x001b843b
MOV RCX,qword ptr [RBP + -0x38]
CMP RCX,qword ptr [RBP + -0x78]
JZ 0x001b82d6
MOV EAX,EAX
ADD R13,RAX
CMP RCX,qword ptr [RBP + -0x70]
JNZ 0x001b8272
CMP R13,R12
JNC 0x001b8272
MOV RDI,R15
LEA RSI,[RBP + -0x38]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x001b843b
MOV EBX,EAX
MOV RDI,R15
LEA RSI,[RBP + -0x50]
MOV RAX,R14
MOV R14,qword ptr [RBP + -0x30]
MOV RDX,R14
MOV RCX,qword ptr [RBP + -0x40]
CALL RAX
TEST EAX,EAX
JLE 0x001b843b
MOV ECX,EBX
ADD R13,RCX
MOV EAX,EAX
ADD R14,RAX
MOV qword ptr [RBP + -0x30],R14
MOV RDX,qword ptr [RBP + -0x38]
MOV R14,qword ptr [RBP + -0x48]
JMP 0x001b82a2
LAB_001b8272:
MOV RDI,R15
LEA RSI,[RBP + -0x50]
MOV RBX,qword ptr [RBP + -0x30]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x40]
CALL R14
TEST EAX,EAX
JLE 0x001b843b
MOV EAX,EAX
ADD RBX,RAX
MOV qword ptr [RBP + -0x30],RBX
MOV RDX,qword ptr [RBP + -0x38]
CMP RDX,qword ptr [RBP + -0x68]
JZ 0x001b82bb
LAB_001b82a2:
MOV RSI,qword ptr [RBP + -0x50]
MOV RDI,R15
CALL 0x001bcc60
MOV EBX,0x1
TEST EAX,EAX
JNZ 0x001b8440
LAB_001b82bb:
CMP R13,R12
JNZ 0x001b81eb
LAB_001b82c4:
XOR EBX,EBX
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RBP + -0x30],RAX
SETNZ BL
JMP 0x001b8440
LAB_001b82d6:
XOR EBX,EBX
CMP R13,R12
JZ 0x001b8440
LAB_001b82e1:
MOV RDI,R15
LEA RSI,[RBP + -0x38]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x001b843b
MOV R14D,EAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x78]
JNZ 0x001b831a
MOV EAX,R14D
ADD R13,RAX
LAB_001b830c:
CMP R13,R12
MOV R14,qword ptr [RBP + -0x48]
JNZ 0x001b82e1
JMP 0x001b8440
LAB_001b831a:
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x001b8348
MOV RDI,R15
LEA RSI,[RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x40]
CALL qword ptr [RBP + -0x48]
TEST EAX,EAX
JLE 0x001b843b
MOV ECX,R14D
ADD R13,RCX
MOV EAX,EAX
ADD qword ptr [RBP + -0x30],RAX
JMP 0x001b830c
LAB_001b8348:
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RBP + -0x30],RAX
JZ 0x001b8451
LEA RSI,[RBP + -0x38]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
MOV R14,qword ptr [RBP + -0x48]
CALL R14
TEST EAX,EAX
JLE 0x001b843b
MOV EAX,EAX
ADD R13,RAX
MOV RAX,qword ptr [RBP + -0x70]
CMP qword ptr [RBP + -0x38],RAX
JNZ 0x001b83a3
CMP R13,R12
JNC 0x001b83a3
LEA RSI,[RBP + -0x38]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x001b843b
MOV EAX,EAX
ADD R13,RAX
LAB_001b83a3:
MOV RAX,qword ptr [RBP + -0x60]
INC EAX
MOV qword ptr [RBP + -0x60],RAX
LAB_001b83ad:
MOV RBX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x40]
CMP RBX,RCX
JZ 0x001b8451
LAB_001b83be:
MOV RDI,R15
LEA RSI,[RBP + -0x50]
MOV RDX,RBX
CALL R14
TEST EAX,EAX
JLE 0x001b843b
MOV R14D,EAX
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x38]
MOV RDI,R15
CALL 0x001bcc60
MOV ECX,R14D
ADD RBX,RCX
TEST EAX,EAX
JZ 0x001b83fb
MOV RCX,qword ptr [RBP + -0x40]
CMP RBX,RCX
MOV R14,qword ptr [RBP + -0x48]
JNZ 0x001b83be
JMP 0x001b8451
LAB_001b83fb:
SUB RSP,0x8
MOV RDI,R15
MOV qword ptr [RBP + -0x30],RBX
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,R13
MOV R8,R12
MOV R9D,dword ptr [RBP + -0x54]
PUSH qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RBP + 0x18]
PUSH RAX
MOV EAX,dword ptr [RBP + 0x10]
PUSH RAX
CALL 0x001b816a
ADD RSP,0x20
MOV EBX,EAX
TEST EAX,EAX
MOV R14,qword ptr [RBP + -0x48]
JG 0x001b83ad
JMP 0x001b8440
LAB_001b843b:
MOV EBX,0x1
LAB_001b8440:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b8451:
MOV EBX,0xffffffff
JMP 0x001b8440
|
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)
{
int iVar1;
uint uVar2;
uint uVar3;
long lVar4;
code *pcVar5;
int8 local_58;
code *local_50;
long local_48;
long local_40;
long local_38;
pcVar5 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_48 = param_3;
local_38 = param_2;
if ((my_string_stack_guard != (code *)0x0) &&
(iVar1 = (*my_string_stack_guard)(param_9), iVar1 != 0)) {
return 1;
}
if (param_4 != param_5) {
local_50 = pcVar5;
do {
uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5);
lVar4 = local_38;
if ((int)uVar2 < 1) {
return 1;
}
if (local_40 == param_8) {
do {
if (param_4 == param_5) {
return 0;
}
uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5);
pcVar5 = local_50;
if ((int)uVar2 < 1) {
return 1;
}
if (local_40 != param_8) {
if (local_40 != param_7) {
if (local_38 == local_48) {
return 0xffffffff;
}
uVar2 = (*local_50)(param_1,&local_40,param_4,param_5);
if (0 < (int)uVar2) {
param_4 = param_4 + uVar2;
if ((local_40 == param_6) && (param_4 < param_5)) {
uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5);
if ((int)uVar2 < 1) {
return 1;
}
param_4 = param_4 + uVar2;
}
do {
lVar4 = local_38;
if (local_38 == local_48) {
return 0xffffffff;
}
while( true ) {
uVar2 = (*pcVar5)(param_1,&local_58,lVar4);
if ((int)uVar2 < 1) {
return 1;
}
iVar1 = my_uca_charcmp(param_1,local_58,local_40);
lVar4 = lVar4 + (ulong)uVar2;
if (iVar1 == 0) break;
pcVar5 = local_50;
if (lVar4 == local_48) {
return 0xffffffff;
}
}
local_38 = lVar4;
uVar2 = my_wildcmp_uca_impl(param_1,lVar4,local_48,param_4,param_5,param_6,param_7
,param_8,param_9 + 1);
pcVar5 = local_50;
if ((int)uVar2 < 1) {
return uVar2;
}
} while( true );
}
return 1;
}
uVar3 = (*local_50)(param_1,&local_58,local_38,local_48);
if ((int)uVar3 < 1) {
return 1;
}
local_38 = local_38 + (ulong)uVar3;
}
param_4 = param_4 + uVar2;
pcVar5 = local_50;
} while( true );
}
param_4 = param_4 + uVar2;
if ((local_40 == param_6) && (param_4 < param_5)) {
uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5);
lVar4 = local_38;
if ((int)uVar2 < 1) {
return 1;
}
uVar3 = (*pcVar5)(param_1,&local_58,local_38,local_48);
if ((int)uVar3 < 1) {
return 1;
}
param_4 = param_4 + uVar2;
local_38 = lVar4 + (ulong)uVar3;
pcVar5 = local_50;
LAB_001b82a2:
iVar1 = my_uca_charcmp(param_1,local_58,local_40);
if (iVar1 != 0) {
return 1;
}
}
else {
uVar2 = (*pcVar5)(param_1,&local_58,local_38,local_48);
if ((int)uVar2 < 1) {
return 1;
}
local_38 = lVar4 + (ulong)uVar2;
if (local_40 != param_7) goto LAB_001b82a2;
}
} while (param_4 != param_5);
}
return (uint)(local_38 != local_48);
}
| |
40,245 | bf_op2 | bluesky950520[P]quickjs/libbf.c | static no_inline int bf_op2(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec,
bf_flags_t flags, bf_op2_func_t *func)
{
bf_t tmp;
int ret;
if (r == a || r == b) {
bf_init(r->ctx, &tmp);
ret = func(&tmp, a, b, prec, flags);
bf_move(r, &tmp);
} else {
ret = func(r, a, b, prec, flags);
}
return ret;
} | O1 | c | bf_op2:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
cmpq %rsi, %rdi
setne %al
cmpq %rdx, %rdi
setne %dil
testb %dil, %al
jne 0x86fb2
movq (%rbx), %rax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movl $0x0, 0x8(%r14)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
movq %r14, %rdi
callq *%r9
movl %eax, %ebp
cmpq %rbx, %r14
je 0x86fa7
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x86f8d
movq (%rbx), %rax
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rbx)
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmpq *%r9
| bf_op2:
push rbp
push r14
push rbx
sub rsp, 30h
mov rbx, rdi
cmp rdi, rsi
setnz al
cmp rdi, rdx
setnz dil
test al, dil
jnz short loc_86FB2
mov rax, [rbx]
lea r14, [rsp+48h+var_40]
mov [r14], rax
mov dword ptr [r14+8], 0
mov rax, 8000000000000000h
mov [r14+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r14+18h], xmm0
mov rdi, r14
call r9 ; __bf_sub
mov ebp, eax
cmp r14, rbx
jz short loc_86FA7
mov rsi, [rbx+20h]
test rsi, rsi
jz short loc_86F8D
mov rax, [rbx]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_86F8D:
mov rax, [rsp+48h+var_20]
mov [rbx+20h], rax
movups xmm0, [rsp+48h+var_40]
movups xmm1, [rsp+48h+var_30]
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
loc_86FA7:
mov eax, ebp
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_86FB2:
mov rdi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp r9
| long long bf_op2(
__int128 *a1,
__int128 *a2,
__int128 *a3,
long long a4,
long long a5,
long long ( *a6)(__int128 *))
{
unsigned int v6; // ebp
long long v7; // rsi
__int128 v8; // xmm0
__int128 v10; // [rsp+8h] [rbp-40h] BYREF
_BYTE v11[24]; // [rsp+18h] [rbp-30h]
if ( a1 != a3 && a1 != a2 )
return a6(a1);
*(_QWORD *)&v10 = *(_QWORD *)a1;
DWORD2(v10) = 0;
*(_QWORD *)v11 = 0x8000000000000000LL;
*(_OWORD *)&v11[8] = 0LL;
v6 = a6(&v10);
if ( &v10 != a1 )
{
v7 = *((_QWORD *)a1 + 4);
if ( v7 )
(*(void ( **)(_QWORD, long long, _QWORD))(*(_QWORD *)a1 + 8LL))(**(_QWORD **)a1, v7, 0LL);
*((_QWORD *)a1 + 4) = *(_QWORD *)&v11[16];
v8 = v10;
a1[1] = *(_OWORD *)v11;
*a1 = v8;
}
return v6;
}
| bf_op2:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
CMP RDI,RSI
SETNZ AL
CMP RDI,RDX
SETNZ DIL
TEST AL,DIL
JNZ 0x00186fb2
MOV RAX,qword ptr [RBX]
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RAX
MOV dword ptr [R14 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R14 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x18],XMM0
MOV RDI,R14
CALL R9
MOV EBP,EAX
CMP R14,RBX
JZ 0x00186fa7
MOV RSI,qword ptr [RBX + 0x20]
TEST RSI,RSI
JZ 0x00186f8d
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_00186f8d:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RBX + 0x20],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS XMM1,xmmword ptr [RSP + 0x18]
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
LAB_00186fa7:
MOV EAX,EBP
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00186fb2:
MOV RDI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP R9
|
ulong bf_op2(long *param_1,long *param_2,long *param_3,int8 param_4,int8 param_5,
code *UNRECOVERED_JUMPTABLE)
{
uint uVar1;
ulong uVar2;
long local_40;
int4 uStack_38;
int4 uStack_34;
long local_30;
long lStack_28;
long lStack_20;
if (param_1 == param_2 || param_1 == param_3) {
local_40 = *param_1;
uStack_38 = 0;
local_30 = -0x8000000000000000;
lStack_28 = 0;
lStack_20 = 0;
uVar1 = (*UNRECOVERED_JUMPTABLE)(&local_40);
if (&local_40 != param_1) {
if (param_1[4] != 0) {
(*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
}
param_1[4] = lStack_20;
param_1[2] = local_30;
param_1[3] = lStack_28;
*param_1 = local_40;
param_1[1] = CONCAT44(uStack_34,uStack_38);
}
return (ulong)uVar1;
}
/* WARNING: Could not recover jumptable at 0x00186fbd. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar2 = (*UNRECOVERED_JUMPTABLE)(param_1);
return uVar2;
}
| |
40,246 | my_caseup_str_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->caseup_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
*dst= '\0';
return (size_t) (dst - dst0);
} | O3 | c | my_caseup_str_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %r14
je 0xcb67f
movq 0x78(%rdi), %r13
leaq -0x30(%rbp), %r15
movq %rbx, %r12
movq %rbx, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0xcbf58
testl %eax, %eax
je 0xcb67f
movq 0x8(%r13), %rdx
movq -0x30(%rbp), %rcx
movzbl %ch, %esi
movq (%rdx,%rsi,8), %rdx
testq %rdx, %rdx
je 0xcb60e
movzbl %cl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rdx,%rcx,4), %ecx
movq %rcx, -0x30(%rbp)
movl $0x1, %edx
cmpq $0x80, %rcx
jb 0xcb668
movl $0x2, %edx
cmpq $0x800, %rcx # imm = 0x800
jb 0xcb64f
cmpq $0xffff, %rcx # imm = 0xFFFF
ja 0xcb67f
movl %ecx, %edx
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x2(%r14)
shrq $0x6, %rcx
orq $0x800, %rcx # imm = 0x800
movl $0x3, %edx
movl %ecx, %esi
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%r14)
shrq $0x6, %rcx
orq $0xc0, %rcx
movb %cl, (%r14)
movl %eax, %eax
addq %rdx, %r14
cmpb $0x0, (%r12,%rax)
leaq (%r12,%rax), %r12
jne 0xcb5d9
movb $0x0, (%r14)
subq %rbx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_caseup_str_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
cmp byte ptr [rsi], 0
mov r14, rsi
jz loc_CB67F
mov r13, [rdi+78h]
lea r15, [rbp+var_30]
mov r12, rbx
mov r14, rbx
loc_CB5D9:
mov rdi, r15
mov rsi, r12
call my_utf8mb3_uni_no_range
test eax, eax
jz loc_CB67F
mov rdx, [r13+8]
mov rcx, [rbp+var_30]
movzx esi, ch
mov rdx, [rdx+rsi*8]
test rdx, rdx
jz short loc_CB60E
movzx ecx, cl
lea rcx, [rcx+rcx*2]
mov ecx, [rdx+rcx*4]
mov [rbp+var_30], rcx
loc_CB60E:
mov edx, 1
cmp rcx, 80h
jb short loc_CB668
mov edx, 2
cmp rcx, 800h
jb short loc_CB64F
cmp rcx, 0FFFFh
ja short loc_CB67F
mov edx, ecx
and dl, 3Fh
or dl, 80h
mov [r14+2], dl
shr rcx, 6
or rcx, 800h
mov edx, 3
loc_CB64F:
mov esi, ecx
and sil, 3Fh
or sil, 80h
mov [r14+1], sil
shr rcx, 6
or rcx, 0C0h
loc_CB668:
mov [r14], cl
mov eax, eax
add r14, rdx
cmp byte ptr [r12+rax], 0
lea r12, [r12+rax]
jnz loc_CB5D9
loc_CB67F:
mov byte ptr [r14], 0
sub r14, rbx
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_caseup_str_utf8mb3(long long a1, _BYTE *a2)
{
unsigned long long v2; // rax
_BYTE *v3; // r14
long long v4; // r13
_BYTE *v5; // r12
unsigned int v6; // eax
unsigned long long v7; // rcx
long long v8; // rdx
long long v9; // rdx
bool v10; // zf
unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF
v12 = v2;
v3 = a2;
if ( *a2 )
{
v4 = *(_QWORD *)(a1 + 120);
v5 = a2;
v3 = a2;
do
{
v6 = my_utf8mb3_uni_no_range(&v12, v5);
if ( !v6 )
break;
v7 = v12;
v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12));
if ( v8 )
{
v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12);
v12 = v7;
}
v9 = 1LL;
if ( v7 >= 0x80 )
{
v9 = 2LL;
if ( v7 >= 0x800 )
{
if ( v7 > 0xFFFF )
break;
v3[2] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0x800;
v9 = 3LL;
}
v3[1] = v7 & 0x3F | 0x80;
v7 = (v7 >> 6) | 0xC0;
}
*v3 = v7;
v3 += v9;
v10 = v5[v6] == 0;
v5 += v6;
}
while ( !v10 );
}
*v3 = 0;
return v3 - a2;
}
| my_caseup_str_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV R14,RSI
JZ 0x001cb67f
MOV R13,qword ptr [RDI + 0x78]
LEA R15,[RBP + -0x30]
MOV R12,RBX
MOV R14,RBX
LAB_001cb5d9:
MOV RDI,R15
MOV RSI,R12
CALL 0x001cbf58
TEST EAX,EAX
JZ 0x001cb67f
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ESI,CH
MOV RDX,qword ptr [RDX + RSI*0x8]
TEST RDX,RDX
JZ 0x001cb60e
MOVZX ECX,CL
LEA RCX,[RCX + RCX*0x2]
MOV ECX,dword ptr [RDX + RCX*0x4]
MOV qword ptr [RBP + -0x30],RCX
LAB_001cb60e:
MOV EDX,0x1
CMP RCX,0x80
JC 0x001cb668
MOV EDX,0x2
CMP RCX,0x800
JC 0x001cb64f
CMP RCX,0xffff
JA 0x001cb67f
MOV EDX,ECX
AND DL,0x3f
OR DL,0x80
MOV byte ptr [R14 + 0x2],DL
SHR RCX,0x6
OR RCX,0x800
MOV EDX,0x3
LAB_001cb64f:
MOV ESI,ECX
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [R14 + 0x1],SIL
SHR RCX,0x6
OR RCX,0xc0
LAB_001cb668:
MOV byte ptr [R14],CL
MOV EAX,EAX
ADD R14,RDX
CMP byte ptr [R12 + RAX*0x1],0x0
LEA R12,[R12 + RAX*0x1]
JNZ 0x001cb5d9
LAB_001cb67f:
MOV byte ptr [R14],0x0
SUB R14,RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_str_utf8mb3(long param_1,char *param_2)
{
char *pcVar1;
long lVar2;
uint uVar3;
ulong in_RAX;
ulong uVar4;
long lVar5;
char *pcVar6;
char *pcVar7;
ulong local_38;
pcVar7 = param_2;
if (*param_2 != '\0') {
lVar2 = *(long *)(param_1 + 0x78);
pcVar6 = param_2;
local_38 = in_RAX;
do {
uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6);
if (uVar3 == 0) break;
lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar5 != 0) {
local_38 = (ulong)*(uint *)(lVar5 + (local_38 & 0xff) * 0xc);
}
lVar5 = 1;
uVar4 = local_38;
if (0x7f < local_38) {
lVar5 = 2;
if (0x7ff < local_38) {
if (0xffff < local_38) break;
pcVar7[2] = (byte)local_38 & 0x3f | 0x80;
uVar4 = local_38 >> 6 | 0x800;
lVar5 = 3;
}
pcVar7[1] = (byte)uVar4 & 0x3f | 0x80;
uVar4 = uVar4 >> 6 | 0xc0;
}
*pcVar7 = (char)uVar4;
pcVar7 = pcVar7 + lVar5;
pcVar1 = pcVar6 + uVar3;
pcVar6 = pcVar6 + uVar3;
} while (*pcVar1 != '\0');
}
*pcVar7 = '\0';
return (long)pcVar7 - (long)param_2;
}
| |
40,247 | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | SetTemplateNode(const Location & location, const std::string & name, std::shared_ptr<TemplateNode> && tv)
: TemplateNode(location), name(name), template_value(std::move(tv)) {} | O2 | cpp | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
callq 0x74652
leaq 0x86b76(%rip), %rax # 0xfe3c8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0x23c60
andq $0x0, 0x48(%rbx)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x40(%rbx)
andq $0x0, (%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x792cc
movq %r14, %rdi
callq 0x24030
| _ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE:
push r15
push r14
push rbx
mov r14, rcx
mov r15, rdx
mov rbx, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja15SetTemplateNodeE; `vtable for'minja::SetTemplateNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
and qword ptr [rbx+48h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [rbx+40h], xmm0
and qword ptr [r14], 0
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; this
call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode()
mov rdi, r14
call __Unwind_Resume
| long long minja::SetTemplateNode::SetTemplateNode(long long a1, _QWORD *a2, long long a3, __int128 *a4)
{
long long result; // rax
__int128 v7; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::SetTemplateNode + 2;
result = std::string::basic_string(a1 + 32, a3);
*(_QWORD *)(a1 + 72) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 64) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
| SetTemplateNode:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RCX
MOV R15,RDX
MOV RBX,RDI
CALL 0x00174652
LEA RAX,[0x1fe3c8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_0017785d:
MOV RSI,R15
CALL 0x00123c60
LAB_00177865:
AND qword ptr [RBX + 0x48],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
AND qword ptr [R14],0x0
POP RBX
POP R14
POP R15
RET
|
/* minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::string const&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::SetTemplateNode::SetTemplateNode
(SetTemplateNode *this,Location *param_1,string *param_2,shared_ptr *param_3)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_001fe3d8;
/* try { // try from 0017785d to 00177864 has its CatchHandler @ 00177881 */
std::__cxx11::string::string((string *)(this + 0x20),param_2);
*(int8 *)(this + 0x48) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x40) = *(int8 *)param_3;
*(int8 *)(this + 0x48) = uVar1;
*(int8 *)param_3 = 0;
return;
}
| |
40,248 | LefDefParser::defiProp::print(_IO_FILE*) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiProp.cpp | void defiProp::print(FILE* f) const {
fprintf(f, "Prop type '%s'\n", propType());
if (hasString()) {
fprintf(f, " string '%s'\n", string());
}
if (hasNumber()) {
fprintf(f, " number %5.2f\n", number());
}
if (hasRange()) {
fprintf(f, " range %5.2f - %5.2f\n",
left(), right());
}
} | O0 | cpp | LefDefParser::defiProp::print(_IO_FILE*) const:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x46a90
movq 0x28(%rsp), %rdi
movq %rax, %rdx
leaq 0x2bc03(%rip), %rsi # 0x72779
movb $0x0, %al
callq 0x7300
movq 0x30(%rsp), %rdi
callq 0x46b00
cmpl $0x0, %eax
je 0x46bb6
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x46a80
movq 0x20(%rsp), %rdi
movq %rax, %rdx
leaq 0x2bbda(%rip), %rsi # 0x72789
movb $0x0, %al
callq 0x7300
movq 0x30(%rsp), %rdi
callq 0x46ab0
cmpl $0x0, %eax
je 0x46bec
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x46ad0
movq 0x18(%rsp), %rdi
leaq 0x2bbb3(%rip), %rsi # 0x72798
movb $0x1, %al
callq 0x7300
movq 0x30(%rsp), %rdi
callq 0x46ac0
cmpl $0x0, %eax
je 0x46c3b
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x46ae0
movq 0x30(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x46af0
movq 0x8(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
leaq 0x2bb74(%rip), %rsi # 0x727a8
movb $0x2, %al
callq 0x7300
addq $0x48, %rsp
retq
| _ZNK12LefDefParser8defiProp5printEP8_IO_FILE:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rdi, [rsp+48h+var_8]; this
mov [rsp+48h+var_18], rdi
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_20], rax
call _ZNK12LefDefParser8defiProp8propTypeEv; LefDefParser::defiProp::propType(void)
mov rdi, [rsp+48h+var_20]
mov rdx, rax
lea rsi, aPropTypeS; "Prop type '%s'\n"
mov al, 0
call _fprintf
mov rdi, [rsp+48h+var_18]; this
call _ZNK12LefDefParser8defiProp9hasStringEv; LefDefParser::defiProp::hasString(void)
cmp eax, 0
jz short loc_46BB6
mov rdi, [rsp+48h+var_18]; this
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_28], rax
call _ZNK12LefDefParser8defiProp6stringEv; LefDefParser::defiProp::string(void)
mov rdi, [rsp+48h+var_28]
mov rdx, rax
lea rsi, aStringS; " string '%s'\n"
mov al, 0
call _fprintf
loc_46BB6:
mov rdi, [rsp+48h+var_18]; this
call _ZNK12LefDefParser8defiProp9hasNumberEv; LefDefParser::defiProp::hasNumber(void)
cmp eax, 0
jz short loc_46BEC
mov rdi, [rsp+48h+var_18]; this
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_30], rax
call _ZNK12LefDefParser8defiProp6numberEv; LefDefParser::defiProp::number(void)
mov rdi, [rsp+48h+var_30]
lea rsi, aNumber52f; " number %5.2f\n"
mov al, 1
call _fprintf
loc_46BEC:
mov rdi, [rsp+48h+var_18]; this
call _ZNK12LefDefParser8defiProp8hasRangeEv; LefDefParser::defiProp::hasRange(void)
cmp eax, 0
jz short loc_46C3B
mov rdi, [rsp+48h+var_18]; this
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_40], rax
call _ZNK12LefDefParser8defiProp4leftEv; LefDefParser::defiProp::left(void)
mov rdi, [rsp+48h+var_18]; this
movsd [rsp+48h+var_38], xmm0
call _ZNK12LefDefParser8defiProp5rightEv; LefDefParser::defiProp::right(void)
mov rdi, [rsp+48h+var_40]
movaps xmm1, xmm0
movsd xmm0, [rsp+48h+var_38]
lea rsi, aRange52f52f; " range %5.2f - %5.2f\n"
mov al, 2
call _fprintf
loc_46C3B:
add rsp, 48h
retn
| long long LefDefParser::defiProp::print(LefDefParser::defiProp *a1, long long a2)
{
const char *v2; // rax
const char *v3; // rax
double v4; // xmm0_8
long long result; // rax
double v6; // xmm1_8
double v7; // [rsp+10h] [rbp-38h]
v2 = (const char *)LefDefParser::defiProp::propType(a1);
fprintf(a2, "Prop type '%s'\n", v2);
if ( LefDefParser::defiProp::hasString(a1) )
{
v3 = (const char *)LefDefParser::defiProp::string(a1);
fprintf(a2, " string '%s'\n", v3);
}
if ( (unsigned int)LefDefParser::defiProp::hasNumber(a1) )
{
v4 = LefDefParser::defiProp::number(a1);
fprintf(a2, " number %5.2f\n", v4);
}
result = LefDefParser::defiProp::hasRange(a1);
if ( (_DWORD)result )
{
v7 = LefDefParser::defiProp::left(a1);
v6 = LefDefParser::defiProp::right(a1);
return fprintf(a2, " range %5.2f - %5.2f\n", v7, v6);
}
return result;
}
| print:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x00146a90
MOV RDI,qword ptr [RSP + 0x28]
MOV RDX,RAX
LEA RSI,[0x172779]
MOV AL,0x0
CALL 0x00107300
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00146b00
CMP EAX,0x0
JZ 0x00146bb6
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x20],RAX
CALL 0x00146a80
MOV RDI,qword ptr [RSP + 0x20]
MOV RDX,RAX
LEA RSI,[0x172789]
MOV AL,0x0
CALL 0x00107300
LAB_00146bb6:
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00146ab0
CMP EAX,0x0
JZ 0x00146bec
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00146ad0
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x172798]
MOV AL,0x1
CALL 0x00107300
LAB_00146bec:
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00146ac0
CMP EAX,0x0
JZ 0x00146c3b
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00146ae0
MOV RDI,qword ptr [RSP + 0x30]
MOVSD qword ptr [RSP + 0x10],XMM0
CALL 0x00146af0
MOV RDI,qword ptr [RSP + 0x8]
MOVAPS XMM1,XMM0
MOVSD XMM0,qword ptr [RSP + 0x10]
LEA RSI,[0x1727a8]
MOV AL,0x2
CALL 0x00107300
LAB_00146c3b:
ADD RSP,0x48
RET
|
/* LefDefParser::defiProp::print(_IO_FILE*) const */
void __thiscall LefDefParser::defiProp::print(defiProp *this,_IO_FILE *param_1)
{
int iVar1;
int8 uVar2;
int4 uVar3;
uVar2 = propType(this);
fprintf(param_1,"Prop type \'%s\'\n",uVar2);
iVar1 = hasString(this);
if (iVar1 != 0) {
uVar2 = string(this);
fprintf(param_1," string \'%s\'\n",uVar2);
}
iVar1 = hasNumber(this);
if (iVar1 != 0) {
number(this);
fprintf(param_1," number %5.2f\n");
}
iVar1 = hasRange(this);
if (iVar1 != 0) {
uVar2 = left(this);
uVar3 = right(this);
fprintf(param_1," range %5.2f - %5.2f\n",uVar2,uVar3);
}
return;
}
| |
40,249 | LefDefParser::defiProp::print(_IO_FILE*) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiProp.cpp | void defiProp::print(FILE* f) const {
fprintf(f, "Prop type '%s'\n", propType());
if (hasString()) {
fprintf(f, " string '%s'\n", string());
}
if (hasNumber()) {
fprintf(f, " number %5.2f\n", number());
}
if (hasRange()) {
fprintf(f, " range %5.2f - %5.2f\n",
left(), right());
}
} | O3 | cpp | LefDefParser::defiProp::print(_IO_FILE*) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdx
leaq 0x19854(%rip), %rsi # 0x437fa
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6290
movq 0x18(%r14), %rdx
cmpb $0x0, (%rdx)
je 0x29fca
leaq 0x1984a(%rip), %rsi # 0x4380a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6290
cmpb $0x0, 0x15(%r14)
je 0x29fe8
movsd 0x38(%r14), %xmm0
leaq 0x1983b(%rip), %rsi # 0x43819
movq %rbx, %rdi
movb $0x1, %al
callq 0x6290
cmpb $0x0, 0x14(%r14)
je 0x2a013
movsd 0x28(%r14), %xmm0
movsd 0x30(%r14), %xmm1
leaq 0x19827(%rip), %rsi # 0x43829
movq %rbx, %rdi
movb $0x2, %al
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6290
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZNK12LefDefParser8defiProp5printEP8_IO_FILE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rdx, [rdi]
lea rsi, aPropTypeS; "Prop type '%s'\n"
mov rdi, rbx
xor eax, eax
call _fprintf
mov rdx, [r14+18h]
cmp byte ptr [rdx], 0
jz short loc_29FCA
lea rsi, aStringS; " string '%s'\n"
mov rdi, rbx
xor eax, eax
call _fprintf
loc_29FCA:
cmp byte ptr [r14+15h], 0
jz short loc_29FE8
movsd xmm0, qword ptr [r14+38h]
lea rsi, aNumber52f; " number %5.2f\n"
mov rdi, rbx
mov al, 1
call _fprintf
loc_29FE8:
cmp byte ptr [r14+14h], 0
jz short loc_2A013
movsd xmm0, qword ptr [r14+28h]
movsd xmm1, qword ptr [r14+30h]
lea rsi, aRange52f52f; " range %5.2f - %5.2f\n"
mov rdi, rbx
mov al, 2
add rsp, 8
pop rbx
pop r14
jmp _fprintf
loc_2A013:
add rsp, 8
pop rbx
pop r14
retn
| long long LefDefParser::defiProp::print(long long a1, long long a2)
{
long long result; // rax
const char *v3; // rdx
result = fprintf(a2, "Prop type '%s'\n", *(const char **)a1);
v3 = *(const char **)(a1 + 24);
if ( *v3 )
result = fprintf(a2, " string '%s'\n", v3);
if ( *(_BYTE *)(a1 + 21) )
result = fprintf(a2, " number %5.2f\n", *(double *)(a1 + 56));
if ( *(_BYTE *)(a1 + 20) )
return fprintf(a2, " range %5.2f - %5.2f\n", *(double *)(a1 + 40), *(double *)(a1 + 48));
return result;
}
| print:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RDX,qword ptr [RDI]
LEA RSI,[0x1437fa]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00106290
MOV RDX,qword ptr [R14 + 0x18]
CMP byte ptr [RDX],0x0
JZ 0x00129fca
LEA RSI,[0x14380a]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00106290
LAB_00129fca:
CMP byte ptr [R14 + 0x15],0x0
JZ 0x00129fe8
MOVSD XMM0,qword ptr [R14 + 0x38]
LEA RSI,[0x143819]
MOV RDI,RBX
MOV AL,0x1
CALL 0x00106290
LAB_00129fe8:
CMP byte ptr [R14 + 0x14],0x0
JZ 0x0012a013
MOVSD XMM0,qword ptr [R14 + 0x28]
MOVSD XMM1,qword ptr [R14 + 0x30]
LEA RSI,[0x143829]
MOV RDI,RBX
MOV AL,0x2
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00106290
LAB_0012a013:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* LefDefParser::defiProp::print(_IO_FILE*) const */
void __thiscall LefDefParser::defiProp::print(defiProp *this,_IO_FILE *param_1)
{
fprintf(param_1,"Prop type \'%s\'\n",*(int8 *)this);
if (**(char **)(this + 0x18) != '\0') {
fprintf(param_1," string \'%s\'\n");
}
if (this[0x15] != (defiProp)0x0) {
fprintf(param_1," number %5.2f\n",*(int8 *)(this + 0x38));
}
if (this[0x14] != (defiProp)0x0) {
fprintf(param_1," range %5.2f - %5.2f\n",*(int8 *)(this + 0x28),
*(int8 *)(this + 0x30));
return;
}
return;
}
| |
40,250 | my_thread_global_reinit | eloqsql/mysys/my_thr_init.c | void my_thread_global_reinit(void)
{
struct st_my_thread_var *tmp;
DBUG_ASSERT(my_thread_global_init_done);
#ifdef HAVE_PSI_INTERFACE
my_init_mysys_psi_keys();
#endif
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
tmp= my_thread_var;
DBUG_ASSERT(tmp);
my_thread_destory_thr_mutex(tmp);
my_thread_init_thr_mutex(tmp);
} | O0 | c | my_thread_global_reinit:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0x274fa
callq 0x26d70
callq 0x273a0
callq 0x27540
callq 0x27450
callq 0x27610
callq 0x27670
movq %rax, -0x8(%rbp)
jmp 0x2751e
movq -0x8(%rbp), %rdi
callq 0x27690
movq -0x8(%rbp), %rdi
callq 0x276c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_thread_global_reinit:
push rbp
mov rbp, rsp
sub rsp, 10h
jmp short $+2
loc_274FA:
call my_init_mysys_psi_keys
call my_thread_destroy_common_mutex
call my_thread_init_common_mutex
call my_thread_destroy_internal_mutex
call my_thread_init_internal_mutex
call _my_thread_var
mov [rbp+var_8], rax
jmp short $+2
loc_2751E:
mov rdi, [rbp+var_8]
call my_thread_destory_thr_mutex
mov rdi, [rbp+var_8]
call my_thread_init_thr_mutex
add rsp, 10h
pop rbp
retn
| long long my_thread_global_reinit()
{
long long v1; // [rsp+8h] [rbp-8h]
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
v1 = my_thread_var();
my_thread_destory_thr_mutex(v1);
return my_thread_init_thr_mutex(v1);
}
| my_thread_global_reinit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
JMP 0x001274fa
LAB_001274fa:
CALL 0x00126d70
CALL 0x001273a0
CALL 0x00127540
CALL 0x00127450
CALL 0x00127610
CALL 0x00127670
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012751e
LAB_0012751e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00127690
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001276c0
ADD RSP,0x10
POP RBP
RET
|
void my_thread_global_reinit(void)
{
int8 uVar1;
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
uVar1 = _my_thread_var();
my_thread_destory_thr_mutex(uVar1);
my_thread_init_thr_mutex(uVar1);
return;
}
| |
40,251 | mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long) | eloqsql/mysys/crc32/crc32c.cc | static uint32_t crc32c_slow(uint32_t crc, const char* buf, size_t size)
{
const uint8_t *p = reinterpret_cast<const uint8_t *>(buf);
const uint8_t *e = p + size;
uint64_t l = crc ^ 0xffffffffu;
// Point x at first 16-byte aligned byte in string. This might be
// just past the end of the string.
const uintptr_t pval = reinterpret_cast<uintptr_t>(p);
const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4));
if (x <= e)
// Process bytes until finished or p is 16-byte aligned
while (p != x)
STEP1;
// Process bytes 16 at a time
while ((e-p) >= 16)
{
Slow_CRC32(&l, &p);
Slow_CRC32(&l, &p);
}
// Process bytes 8 at a time
while ((e-p) >= 8)
Slow_CRC32(&l, &p);
// Process the last few bytes
while (p != e)
STEP1;
return static_cast<uint32_t>(l ^ 0xffffffffu);
} | O3 | cpp | mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %eax
addq %rsi, %rdx
notl %eax
leaq 0xf(%rsi), %rdi
andq $-0x10, %rdi
cmpq %rdi, %rdx
setb %r8b
movq %rdi, %rcx
subq %rsi, %rcx
sete %r9b
orb %r8b, %r9b
je 0xb1ff7
movq %rsi, %rdi
jmp 0xb2022
leaq 0x393f2(%rip), %r8 # 0xeb3f0
movq %rsi, %r9
movzbl %al, %r10d
movzbl (%r9), %r11d
incq %r9
xorl %r10d, %r11d
movl (%r8,%r11,4), %r10d
shrq $0x8, %rax
xorq %r10, %rax
cmpq %rdi, %r9
jne 0xb2001
addq %rcx, %rsi
movq %rdx, %rcx
subq %rdi, %rcx
cmpq $0x10, %rcx
jl 0xb2132
movq %rdx, %rcx
subq %rsi, %rcx
movl $0xff, %edi
leaq 0x397ac(%rip), %r8 # 0xeb7f0
leaq 0x39ba5(%rip), %r9 # 0xebbf0
movl $0x3fc, %r10d # imm = 0x3FC
leaq 0x39f98(%rip), %r11 # 0xebff0
leaq 0x39391(%rip), %rbx # 0xeb3f0
xorl (%rsi), %eax
movl %eax, %r15d
andl %edi, %r15d
movl %eax, %r14d
shrl $0x8, %r14d
andl %edi, %r14d
movl (%r9,%r14,4), %r14d
xorl (%r8,%r15,4), %r14d
movl %eax, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %r14d
shrl $0x18, %eax
xorl (%rbx,%rax,4), %r14d
xorl 0x4(%rsi), %r14d
movl %r14d, %r15d
andl %edi, %r15d
movl %r14d, %eax
shrl $0x8, %eax
andl %edi, %eax
movl (%r9,%rax,4), %eax
xorl (%r8,%r15,4), %eax
movl %r14d, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %eax
shrl $0x18, %r14d
xorl (%rbx,%r14,4), %eax
xorl 0x8(%rsi), %eax
movl %eax, %r15d
andl %edi, %r15d
movl %eax, %r14d
shrl $0x8, %r14d
andl %edi, %r14d
movl (%r9,%r14,4), %r14d
xorl (%r8,%r15,4), %r14d
movl %eax, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %r14d
shrl $0x18, %eax
xorl (%rbx,%rax,4), %r14d
xorl 0xc(%rsi), %r14d
addq $0x10, %rsi
movl %r14d, %r15d
andl %edi, %r15d
movl %r14d, %eax
shrl $0x8, %eax
andl %edi, %eax
movl (%r9,%rax,4), %eax
xorl (%r8,%r15,4), %eax
movl %r14d, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %eax
shrl $0x18, %r14d
xorl (%rbx,%r14,4), %eax
addq $-0x10, %rcx
cmpq $0xf, %rcx
jg 0xb205f
movl %eax, %eax
cmpq $0x8, %rcx
jl 0xb21d8
movq %rdx, %rcx
subq %rsi, %rcx
movl $0xff, %edi
leaq 0x396a2(%rip), %r8 # 0xeb7f0
leaq 0x39a9b(%rip), %r9 # 0xebbf0
movl $0x3fc, %r10d # imm = 0x3FC
leaq 0x39e8e(%rip), %r11 # 0xebff0
leaq 0x39287(%rip), %rbx # 0xeb3f0
xorl (%rsi), %eax
movl %eax, %r15d
andl %edi, %r15d
movl %eax, %r14d
shrl $0x8, %r14d
andl %edi, %r14d
movl (%r9,%r14,4), %r14d
xorl (%r8,%r15,4), %r14d
movl %eax, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %r14d
shrl $0x18, %eax
xorl (%rbx,%rax,4), %r14d
xorl 0x4(%rsi), %r14d
addq $0x8, %rsi
movl %r14d, %r15d
andl %edi, %r15d
movl %r14d, %eax
shrl $0x8, %eax
andl %edi, %eax
movl (%r9,%rax,4), %eax
xorl (%r8,%r15,4), %eax
movl %r14d, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %eax
shrl $0x18, %r14d
xorl (%rbx,%r14,4), %eax
addq $-0x8, %rcx
cmpq $0x7, %rcx
jg 0xb2169
movl %eax, %eax
cmpq %rdx, %rsi
je 0xb2201
leaq 0x3920c(%rip), %rcx # 0xeb3f0
movzbl %al, %edi
movzbl (%rsi), %r8d
incq %rsi
xorl %edi, %r8d
movl (%rcx,%r8,4), %edi
shrq $0x8, %rax
xorq %rdi, %rax
cmpq %rdx, %rsi
jne 0xb21e4
notl %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN15mysys_namespace6crc32cL11crc32c_slowEjPKcm:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
mov eax, edi
add rdx, rsi
not eax
lea rdi, [rsi+0Fh]
and rdi, 0FFFFFFFFFFFFFFF0h
cmp rdx, rdi
setb r8b
mov rcx, rdi
sub rcx, rsi
setz r9b
or r9b, r8b
jz short loc_B1FF7
mov rdi, rsi
jmp short loc_B2022
loc_B1FF7:
lea r8, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
mov r9, rsi
loc_B2001:
movzx r10d, al
movzx r11d, byte ptr [r9]
inc r9
xor r11d, r10d
mov r10d, [r8+r11*4]
shr rax, 8
xor rax, r10
cmp r9, rdi
jnz short loc_B2001
add rsi, rcx
loc_B2022:
mov rcx, rdx
sub rcx, rdi
cmp rcx, 10h
jl loc_B2132
mov rcx, rdx
sub rcx, rsi
mov edi, 0FFh
lea r8, _ZN15mysys_namespace6crc32cL7table3_E; mysys_namespace::crc32c::table3_
lea r9, _ZN15mysys_namespace6crc32cL7table2_E; mysys_namespace::crc32c::table2_
mov r10d, 3FCh
lea r11, _ZN15mysys_namespace6crc32cL7table1_E; mysys_namespace::crc32c::table1_
lea rbx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
loc_B205F:
xor eax, [rsi]
mov r15d, eax
and r15d, edi
mov r14d, eax
shr r14d, 8
and r14d, edi
mov r14d, [r9+r14*4]
xor r14d, [r8+r15*4]
mov r15d, eax
shr r15d, 0Eh
and r15d, r10d
xor r14d, [r15+r11]
shr eax, 18h
xor r14d, [rbx+rax*4]
xor r14d, [rsi+4]
mov r15d, r14d
and r15d, edi
mov eax, r14d
shr eax, 8
and eax, edi
mov eax, [r9+rax*4]
xor eax, [r8+r15*4]
mov r15d, r14d
shr r15d, 0Eh
and r15d, r10d
xor eax, [r15+r11]
shr r14d, 18h
xor eax, [rbx+r14*4]
xor eax, [rsi+8]
mov r15d, eax
and r15d, edi
mov r14d, eax
shr r14d, 8
and r14d, edi
mov r14d, [r9+r14*4]
xor r14d, [r8+r15*4]
mov r15d, eax
shr r15d, 0Eh
and r15d, r10d
xor r14d, [r15+r11]
shr eax, 18h
xor r14d, [rbx+rax*4]
xor r14d, [rsi+0Ch]
add rsi, 10h
mov r15d, r14d
and r15d, edi
mov eax, r14d
shr eax, 8
and eax, edi
mov eax, [r9+rax*4]
xor eax, [r8+r15*4]
mov r15d, r14d
shr r15d, 0Eh
and r15d, r10d
xor eax, [r15+r11]
shr r14d, 18h
xor eax, [rbx+r14*4]
add rcx, 0FFFFFFFFFFFFFFF0h
cmp rcx, 0Fh
jg loc_B205F
mov eax, eax
loc_B2132:
cmp rcx, 8
jl loc_B21D8
mov rcx, rdx
sub rcx, rsi
mov edi, 0FFh
lea r8, _ZN15mysys_namespace6crc32cL7table3_E; mysys_namespace::crc32c::table3_
lea r9, _ZN15mysys_namespace6crc32cL7table2_E; mysys_namespace::crc32c::table2_
mov r10d, 3FCh
lea r11, _ZN15mysys_namespace6crc32cL7table1_E; mysys_namespace::crc32c::table1_
lea rbx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
loc_B2169:
xor eax, [rsi]
mov r15d, eax
and r15d, edi
mov r14d, eax
shr r14d, 8
and r14d, edi
mov r14d, [r9+r14*4]
xor r14d, [r8+r15*4]
mov r15d, eax
shr r15d, 0Eh
and r15d, r10d
xor r14d, [r15+r11]
shr eax, 18h
xor r14d, [rbx+rax*4]
xor r14d, [rsi+4]
add rsi, 8
mov r15d, r14d
and r15d, edi
mov eax, r14d
shr eax, 8
and eax, edi
mov eax, [r9+rax*4]
xor eax, [r8+r15*4]
mov r15d, r14d
shr r15d, 0Eh
and r15d, r10d
xor eax, [r15+r11]
shr r14d, 18h
xor eax, [rbx+r14*4]
add rcx, 0FFFFFFFFFFFFFFF8h
cmp rcx, 7
jg short loc_B2169
mov eax, eax
loc_B21D8:
cmp rsi, rdx
jz short loc_B2201
lea rcx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
loc_B21E4:
movzx edi, al
movzx r8d, byte ptr [rsi]
inc rsi
xor r8d, edi
mov edi, [rcx+r8*4]
shr rax, 8
xor rax, rdi
cmp rsi, rdx
jnz short loc_B21E4
loc_B2201:
not eax
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysys_namespace::crc32c::crc32c_slow(
mysys_namespace::crc32c *this,
unsigned long long a2,
const char *a3)
{
const char *v3; // rdx
unsigned long long v4; // rax
unsigned long long v5; // rdi
unsigned __int8 *v6; // r9
int v7; // r11d
long long v8; // rcx
unsigned int v9; // r14d
unsigned int v10; // eax
unsigned int v11; // r14d
long long v12; // rcx
unsigned int v13; // r14d
int v14; // r8d
v3 = &a3[a2];
v4 = (unsigned int)~(_DWORD)this;
v5 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL;
if ( (unsigned long long)v3 < v5 || v5 == a2 )
{
v5 = a2;
}
else
{
v6 = (unsigned __int8 *)a2;
do
{
v7 = *v6++;
v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v7] ^ (v4 >> 8);
}
while ( v6 != (unsigned __int8 *)v5 );
a2 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL;
}
v8 = (long long)&v3[-v5];
if ( (long long)&v3[-v5] >= 16 )
{
v8 = (long long)&v3[-a2];
do
{
v9 = *(_DWORD *)(a2 + 4) ^ mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)];
v10 = *(_DWORD *)(a2 + 8) ^ mysys_namespace::crc32c::table0_[HIBYTE(v9)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v9 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)(a2 + 4) ^ LOBYTE(mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24]) ^ mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ LOBYTE(mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)]) ^ LOBYTE(mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)]))] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)(a2 + 4) ^ LOWORD(mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24]) ^ *(_WORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ LOWORD(mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)]) ^ LOWORD(mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)])) >> 8)];
v11 = *(_DWORD *)(a2 + 12) ^ mysys_namespace::crc32c::table0_[HIBYTE(v10)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v10 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v10] ^ mysys_namespace::crc32c::table2_[BYTE1(v10)];
a2 += 16LL;
LODWORD(v4) = mysys_namespace::crc32c::table0_[HIBYTE(v11)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v11 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v11] ^ mysys_namespace::crc32c::table2_[BYTE1(v11)];
v8 -= 16LL;
}
while ( v8 > 15 );
v4 = (unsigned int)v4;
}
if ( v8 >= 8 )
{
v12 = (long long)&v3[-a2];
do
{
v13 = *(_DWORD *)(a2 + 4) ^ mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)];
a2 += 8LL;
LODWORD(v4) = mysys_namespace::crc32c::table0_[HIBYTE(v13)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v13 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v13] ^ mysys_namespace::crc32c::table2_[BYTE1(v13)];
v12 -= 8LL;
}
while ( v12 > 7 );
v4 = (unsigned int)v4;
}
for ( ; (const char *)a2 != v3; v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v14] ^ (v4 >> 8) )
v14 = *(unsigned __int8 *)a2++;
return (unsigned int)~(_DWORD)v4;
}
| crc32c_slow:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
MOV EAX,EDI
ADD RDX,RSI
NOT EAX
LEA RDI,[RSI + 0xf]
AND RDI,-0x10
CMP RDX,RDI
SETC R8B
MOV RCX,RDI
SUB RCX,RSI
SETZ R9B
OR R9B,R8B
JZ 0x001b1ff7
MOV RDI,RSI
JMP 0x001b2022
LAB_001b1ff7:
LEA R8,[0x1eb3f0]
MOV R9,RSI
LAB_001b2001:
MOVZX R10D,AL
MOVZX R11D,byte ptr [R9]
INC R9
XOR R11D,R10D
MOV R10D,dword ptr [R8 + R11*0x4]
SHR RAX,0x8
XOR RAX,R10
CMP R9,RDI
JNZ 0x001b2001
ADD RSI,RCX
LAB_001b2022:
MOV RCX,RDX
SUB RCX,RDI
CMP RCX,0x10
JL 0x001b2132
MOV RCX,RDX
SUB RCX,RSI
MOV EDI,0xff
LEA R8,[0x1eb7f0]
LEA R9,[0x1ebbf0]
MOV R10D,0x3fc
LEA R11,[0x1ebff0]
LEA RBX,[0x1eb3f0]
LAB_001b205f:
XOR EAX,dword ptr [RSI]
MOV R15D,EAX
AND R15D,EDI
MOV R14D,EAX
SHR R14D,0x8
AND R14D,EDI
MOV R14D,dword ptr [R9 + R14*0x4]
XOR R14D,dword ptr [R8 + R15*0x4]
MOV R15D,EAX
SHR R15D,0xe
AND R15D,R10D
XOR R14D,dword ptr [R15 + R11*0x1]
SHR EAX,0x18
XOR R14D,dword ptr [RBX + RAX*0x4]
XOR R14D,dword ptr [RSI + 0x4]
MOV R15D,R14D
AND R15D,EDI
MOV EAX,R14D
SHR EAX,0x8
AND EAX,EDI
MOV EAX,dword ptr [R9 + RAX*0x4]
XOR EAX,dword ptr [R8 + R15*0x4]
MOV R15D,R14D
SHR R15D,0xe
AND R15D,R10D
XOR EAX,dword ptr [R15 + R11*0x1]
SHR R14D,0x18
XOR EAX,dword ptr [RBX + R14*0x4]
XOR EAX,dword ptr [RSI + 0x8]
MOV R15D,EAX
AND R15D,EDI
MOV R14D,EAX
SHR R14D,0x8
AND R14D,EDI
MOV R14D,dword ptr [R9 + R14*0x4]
XOR R14D,dword ptr [R8 + R15*0x4]
MOV R15D,EAX
SHR R15D,0xe
AND R15D,R10D
XOR R14D,dword ptr [R15 + R11*0x1]
SHR EAX,0x18
XOR R14D,dword ptr [RBX + RAX*0x4]
XOR R14D,dword ptr [RSI + 0xc]
ADD RSI,0x10
MOV R15D,R14D
AND R15D,EDI
MOV EAX,R14D
SHR EAX,0x8
AND EAX,EDI
MOV EAX,dword ptr [R9 + RAX*0x4]
XOR EAX,dword ptr [R8 + R15*0x4]
MOV R15D,R14D
SHR R15D,0xe
AND R15D,R10D
XOR EAX,dword ptr [R15 + R11*0x1]
SHR R14D,0x18
XOR EAX,dword ptr [RBX + R14*0x4]
ADD RCX,-0x10
CMP RCX,0xf
JG 0x001b205f
MOV EAX,EAX
LAB_001b2132:
CMP RCX,0x8
JL 0x001b21d8
MOV RCX,RDX
SUB RCX,RSI
MOV EDI,0xff
LEA R8,[0x1eb7f0]
LEA R9,[0x1ebbf0]
MOV R10D,0x3fc
LEA R11,[0x1ebff0]
LEA RBX,[0x1eb3f0]
LAB_001b2169:
XOR EAX,dword ptr [RSI]
MOV R15D,EAX
AND R15D,EDI
MOV R14D,EAX
SHR R14D,0x8
AND R14D,EDI
MOV R14D,dword ptr [R9 + R14*0x4]
XOR R14D,dword ptr [R8 + R15*0x4]
MOV R15D,EAX
SHR R15D,0xe
AND R15D,R10D
XOR R14D,dword ptr [R15 + R11*0x1]
SHR EAX,0x18
XOR R14D,dword ptr [RBX + RAX*0x4]
XOR R14D,dword ptr [RSI + 0x4]
ADD RSI,0x8
MOV R15D,R14D
AND R15D,EDI
MOV EAX,R14D
SHR EAX,0x8
AND EAX,EDI
MOV EAX,dword ptr [R9 + RAX*0x4]
XOR EAX,dword ptr [R8 + R15*0x4]
MOV R15D,R14D
SHR R15D,0xe
AND R15D,R10D
XOR EAX,dword ptr [R15 + R11*0x1]
SHR R14D,0x18
XOR EAX,dword ptr [RBX + R14*0x4]
ADD RCX,-0x8
CMP RCX,0x7
JG 0x001b2169
MOV EAX,EAX
LAB_001b21d8:
CMP RSI,RDX
JZ 0x001b2201
LEA RCX,[0x1eb3f0]
LAB_001b21e4:
MOVZX EDI,AL
MOVZX R8D,byte ptr [RSI]
INC RSI
XOR R8D,EDI
MOV EDI,dword ptr [RCX + R8*0x4]
SHR RAX,0x8
XOR RAX,RDI
CMP RSI,RDX
JNZ 0x001b21e4
LAB_001b2201:
NOT EAX
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long) */
uint __thiscall
mysys_namespace::crc32c::crc32c_slow(crc32c *this,uint param_1,char *param_2,ulong param_3)
{
uint uVar1;
ulong uVar2;
long lVar3;
uint *puVar4;
int4 in_register_00000034;
uint *puVar5;
uint *puVar6;
uint *puVar7;
uint *puVar8;
puVar5 = (uint *)CONCAT44(in_register_00000034,param_1);
puVar4 = (uint *)(param_2 + (long)puVar5);
uVar2 = (ulong)~(uint)this;
puVar6 = (uint *)((ulong)((long)puVar5 + 0xfU) & 0xfffffffffffffff0);
puVar7 = puVar5;
if ((long)puVar6 - (long)puVar5 != 0 && puVar6 <= puVar4) {
do {
puVar8 = (uint *)((long)puVar7 + 1);
uVar2 = uVar2 >> 8 ^
(ulong)*(uint *)(table0_ + (ulong)((uint)(byte)*puVar7 ^ (uint)uVar2 & 0xff) * 4);
puVar7 = puVar8;
} while (puVar8 != puVar6);
puVar5 = (uint *)((long)puVar5 + ((long)puVar6 - (long)puVar5));
puVar7 = puVar6;
}
lVar3 = (long)puVar4 - (long)puVar7;
if (0xf < lVar3) {
lVar3 = (long)puVar4 - (long)puVar5;
do {
uVar1 = (uint)uVar2 ^ *puVar5;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[1];
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[2];
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[3];
puVar5 = puVar5 + 4;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4);
uVar2 = (ulong)uVar1;
lVar3 = lVar3 + -0x10;
} while (0xf < lVar3);
uVar2 = (ulong)uVar1;
}
if (7 < lVar3) {
lVar3 = (long)puVar4 - (long)puVar5;
do {
uVar1 = (uint)uVar2 ^ *puVar5;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[1];
puVar5 = puVar5 + 2;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4);
uVar2 = (ulong)uVar1;
lVar3 = lVar3 + -8;
} while (7 < lVar3);
uVar2 = (ulong)uVar1;
}
for (; puVar5 != puVar4; puVar5 = (uint *)((long)puVar5 + 1)) {
uVar2 = uVar2 >> 8 ^
(ulong)*(uint *)(table0_ + (ulong)((uint)(byte)*puVar5 ^ (uint)uVar2 & 0xff) * 4);
}
return ~(uint)uVar2;
}
| |
40,252 | my_hash_iterate | eloqsql/mysys/hash.c | my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
} | O0 | c | my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x2cc65
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x28(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
cmpb $0x0, %al
je 0x2cc58
movb $0x1, -0x1(%rbp)
jmp 0x2cc69
jmp 0x2cc5a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2cc26
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_hash_iterate:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
loc_2CC26:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_2CC65
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx+28h]
mov edx, [rbp+var_28]
shl rdx, 4
add rcx, rdx
mov rdi, [rcx+8]
mov rsi, [rbp+var_20]
call rax
cmp al, 0
jz short loc_2CC58
mov [rbp+var_1], 1
jmp short loc_2CC69
loc_2CC58:
jmp short $+2
loc_2CC5A:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_2CC26
loc_2CC65:
mov [rbp+var_1], 0
loc_2CC69:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
unsigned int i; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
v5 = *(_QWORD *)(a1 + 24);
for ( i = 0; i < v5; ++i )
{
if ( a2(*(_QWORD *)(16LL * i + *(_QWORD *)(a1 + 40) + 8), a3) )
return 1;
}
return 0;
}
| my_hash_iterate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
LAB_0012cc26:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x0012cc65
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x28]
MOV EDX,dword ptr [RBP + -0x28]
SHL RDX,0x4
ADD RCX,RDX
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
CMP AL,0x0
JZ 0x0012cc58
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012cc69
LAB_0012cc58:
JMP 0x0012cc5a
LAB_0012cc5a:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0012cc26
LAB_0012cc65:
MOV byte ptr [RBP + -0x1],0x0
LAB_0012cc69:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
int8 uVar1;
char cVar2;
uint local_30;
uVar1 = *(int8 *)(param_1 + 0x18);
local_30 = 0;
while( true ) {
if ((uint)uVar1 <= local_30) {
return 0;
}
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + (ulong)local_30 * 0x10 + 8),
param_3);
if (cVar2 != '\0') break;
local_30 = local_30 + 1;
}
return 1;
}
| |
40,253 | check_struct_option | eloqsql/mysys/my_getopt.c | static char *check_struct_option(char *cur_arg, char *key_name)
{
char *ptr, *end;
DBUG_ENTER("check_struct_option");
ptr= strcend(cur_arg + 1, '.'); /* Skip the first character */
end= strcend(cur_arg, '=');
/*
If the first dot is after an equal sign, then it is part
of a variable value and the option is not a struct option.
Also, if the last character in the string before the ending
NULL, or the character right before equal sign is the first
dot found, the option is not a struct option.
*/
if (end - ptr > 1)
{
uint len= (uint) (ptr - cur_arg);
set_if_smaller(len, FN_REFLEN-1);
strmake(key_name, cur_arg, len);
DBUG_RETURN(++ptr);
}
else
{
key_name[0]= 0;
DBUG_RETURN(cur_arg);
}
} | O0 | c | check_struct_option:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
movl $0x2e, %esi
callq 0xca7e0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3d, %esi
callq 0xca7e0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x7c85d
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x2c(%rbp)
cmpl $0x1ff, -0x2c(%rbp) # imm = 0x1FF
jbe 0x7c837
movl $0x1ff, -0x2c(%rbp) # imm = 0x1FF
jmp 0x7c839
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
callq 0xca8c0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq %rax, -0x8(%rbp)
jmp 0x7c86c
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_struct_option:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
add rdi, 1
mov esi, 2Eh ; '.'
call strcend
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov esi, 3Dh ; '='
call strcend
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
sub rax, rcx
cmp rax, 1
jle short loc_7C85D
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
sub rax, rcx
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 1FFh
jbe short loc_7C837
mov [rbp+var_2C], 1FFh
loc_7C837:
jmp short $+2
loc_7C839:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_10]
mov eax, [rbp+var_2C]
mov edx, eax
call strmake
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov [rbp+var_8], rax
jmp short loc_7C86C
loc_7C85D:
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_7C86C:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long check_struct_option(long long a1, _BYTE *a2)
{
unsigned int v3; // [rsp+4h] [rbp-2Ch]
long long v4; // [rsp+10h] [rbp-20h]
v4 = strcend(a1 + 1, 46LL);
if ( strcend(a1, 61LL) - v4 <= 1 )
{
*a2 = 0;
return a1;
}
else
{
v3 = v4 - a1;
if ( (unsigned int)(v4 - a1) > 0x1FF )
v3 = 511;
strmake(a2, a1, v3);
return v4 + 1;
}
}
| check_struct_option:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x1
MOV ESI,0x2e
CALL 0x001ca7e0
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x3d
CALL 0x001ca7e0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x0017c85d
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x1ff
JBE 0x0017c837
MOV dword ptr [RBP + -0x2c],0x1ff
LAB_0017c837:
JMP 0x0017c839
LAB_0017c839:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
CALL 0x001ca8c0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017c86c
LAB_0017c85d:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017c86c:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long check_struct_option(long param_1,int1 *param_2)
{
long lVar1;
int4 local_34;
int8 local_10;
local_10 = strcend(param_1 + 1,0x2e);
lVar1 = strcend(param_1,0x3d);
if (lVar1 - local_10 < 2) {
*param_2 = 0;
local_10 = param_1;
}
else {
local_34 = (int)local_10 - (int)param_1;
if (0x1ff < local_34) {
local_34 = 0x1ff;
}
strmake(param_2,param_1,local_34);
local_10 = local_10 + 1;
}
return local_10;
}
| |
40,254 | JS_AtomIsNumericIndex | bluesky950520[P]quickjs/quickjs.c | static int JS_AtomIsNumericIndex(JSContext *ctx, JSAtom atom)
{
JSValue num;
num = JS_AtomIsNumericIndex1(ctx, atom);
if (likely(JS_IsUndefined(num)))
return FALSE;
if (JS_IsException(num))
return -1;
JS_FreeValue(ctx, num);
return TRUE;
} | O0 | c | JS_AtomIsNumericIndex:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x362a0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x2e260
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x311b7
movl $0x0, 0x34(%rsp)
jmp 0x311f1
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x311d5
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x311f1
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x23c90
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
| JS_AtomIsNumericIndex:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_14], esi
mov rdi, [rsp+38h+var_10]
mov esi, [rsp+38h+var_14]
call JS_AtomIsNumericIndex1
mov [rsp+38h+var_38], rax
mov [rsp+38h+var_30], rdx
mov rax, [rsp+38h+var_38]
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_20], rax
mov rdi, [rsp+38h+var_28]
mov rsi, [rsp+38h+var_20]
call JS_IsUndefined_0
cmp eax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_311B7
mov [rsp+38h+var_4], 0
jmp short loc_311F1
loc_311B7:
mov rdi, [rsp+38h+var_28]
mov rsi, [rsp+38h+var_20]
call JS_IsException_1
cmp eax, 0
jz short loc_311D5
mov [rsp+38h+var_4], 0FFFFFFFFh
jmp short loc_311F1
loc_311D5:
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_28]
mov rdx, [rsp+38h+var_20]
call JS_FreeValue
mov [rsp+38h+var_4], 1
loc_311F1:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long JS_AtomIsNumericIndex(long long a1, unsigned int a2)
{
long long v2; // rdx
long long IsNumericIndex1; // [rsp+0h] [rbp-38h]
long long v5; // [rsp+18h] [rbp-20h]
IsNumericIndex1 = JS_AtomIsNumericIndex1(a1, a2);
v5 = v2;
if ( JS_IsUndefined_0(IsNumericIndex1, v2) )
{
return 0;
}
else if ( JS_IsException_1(IsNumericIndex1, v5) )
{
return (unsigned int)-1;
}
else
{
JS_FreeValue(a1, IsNumericIndex1, v5);
return 1;
}
}
| JS_AtomIsNumericIndex:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV dword ptr [RSP + 0x24],ESI
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0x24]
CALL 0x001362a0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0012e260
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001311b7
MOV dword ptr [RSP + 0x34],0x0
JMP 0x001311f1
LAB_001311b7:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001311d5
MOV dword ptr [RSP + 0x34],0xffffffff
JMP 0x001311f1
LAB_001311d5:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x00123c90
MOV dword ptr [RSP + 0x34],0x1
LAB_001311f1:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
int4 JS_AtomIsNumericIndex(int8 param_1,int4 param_2)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int1 auVar4 [16];
int4 local_4;
auVar4 = JS_AtomIsNumericIndex1(param_1,param_2);
uVar3 = auVar4._8_8_;
uVar2 = auVar4._0_8_;
iVar1 = JS_IsUndefined(uVar2,uVar3);
if (iVar1 == 0) {
iVar1 = JS_IsException(uVar2,uVar3);
if (iVar1 == 0) {
JS_FreeValue(param_1,uVar2,uVar3);
local_4 = 1;
}
else {
local_4 = 0xffffffff;
}
}
else {
local_4 = 0;
}
return local_4;
}
| |
40,255 | JS_AtomIsNumericIndex | bluesky950520[P]quickjs/quickjs.c | static int JS_AtomIsNumericIndex(JSContext *ctx, JSAtom atom)
{
JSValue num;
num = JS_AtomIsNumericIndex1(ctx, atom);
if (likely(JS_IsUndefined(num)))
return FALSE;
if (JS_IsException(num))
return -1;
JS_FreeValue(ctx, num);
return TRUE;
} | O1 | c | JS_AtomIsNumericIndex:
pushq %rbx
movq %rdi, %rbx
callq 0x26855
xorl %ecx, %ecx
cmpl $0x3, %edx
jne 0x24074
movl %ecx, %eax
popq %rbx
retq
cmpl $0x6, %edx
jne 0x24080
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
jmp 0x24070
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x1d8c6
movl $0x1, %ecx
jmp 0x24070
| JS_AtomIsNumericIndex:
push rbx
mov rbx, rdi
call JS_AtomIsNumericIndex1
xor ecx, ecx
cmp edx, 3
jnz short loc_24074
loc_24070:
mov eax, ecx
pop rbx
retn
loc_24074:
cmp edx, 6
jnz short loc_24080
mov ecx, 0FFFFFFFFh
jmp short loc_24070
loc_24080:
mov rdi, [rbx+18h]
mov rsi, rax
call JS_FreeValueRT
mov ecx, 1
jmp short loc_24070
| long long JS_AtomIsNumericIndex(long long a1)
{
_DWORD *IsNumericIndex1; // rax
long long v2; // rdx
unsigned int v3; // ecx
IsNumericIndex1 = (_DWORD *)JS_AtomIsNumericIndex1();
v3 = 0;
if ( (_DWORD)v2 != 3 )
{
if ( (_DWORD)v2 == 6 )
{
return (unsigned int)-1;
}
else
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), IsNumericIndex1, v2);
return 1;
}
}
return v3;
}
| JS_AtomIsNumericIndex:
PUSH RBX
MOV RBX,RDI
CALL 0x00126855
XOR ECX,ECX
CMP EDX,0x3
JNZ 0x00124074
LAB_00124070:
MOV EAX,ECX
POP RBX
RET
LAB_00124074:
CMP EDX,0x6
JNZ 0x00124080
MOV ECX,0xffffffff
JMP 0x00124070
LAB_00124080:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
CALL 0x0011d8c6
MOV ECX,0x1
JMP 0x00124070
|
int8 JS_AtomIsNumericIndex(long param_1)
{
int8 uVar1;
int1 auVar2 [12];
auVar2 = JS_AtomIsNumericIndex1();
uVar1 = 0;
if (auVar2._8_4_ != 3) {
if (auVar2._8_4_ == 6) {
uVar1 = 0xffffffff;
}
else {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar2._0_8_);
uVar1 = 1;
}
}
return uVar1;
}
| |
40,256 | JS_AtomIsNumericIndex | bluesky950520[P]quickjs/quickjs.c | static int JS_AtomIsNumericIndex(JSContext *ctx, JSAtom atom)
{
JSValue num;
num = JS_AtomIsNumericIndex1(ctx, atom);
if (likely(JS_IsUndefined(num)))
return FALSE;
if (JS_IsException(num))
return -1;
JS_FreeValue(ctx, num);
return TRUE;
} | O2 | c | JS_AtomIsNumericIndex:
pushq %rbx
movq %rdi, %rbx
callq 0x202e2
xorl %ecx, %ecx
cmpl $0x3, %edx
jne 0x1e0a3
movl %ecx, %eax
popq %rbx
retq
cmpl $0x6, %edx
jne 0x1e0ac
pushq $-0x1
jmp 0x1e0b9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1801e
pushq $0x1
popq %rcx
jmp 0x1e09f
| JS_AtomIsNumericIndex:
push rbx
mov rbx, rdi
call JS_AtomIsNumericIndex1
xor ecx, ecx
cmp edx, 3
jnz short loc_1E0A3
loc_1E09F:
mov eax, ecx
pop rbx
retn
loc_1E0A3:
cmp edx, 6
jnz short loc_1E0AC
push 0FFFFFFFFFFFFFFFFh
jmp short loc_1E0B9
loc_1E0AC:
mov rdi, rbx
mov rsi, rax
call JS_FreeValue
push 1
loc_1E0B9:
pop rcx
jmp short loc_1E09F
| long long JS_AtomIsNumericIndex(long long a1)
{
long long IsNumericIndex1; // rax
long long v2; // rdx
unsigned int v3; // ecx
IsNumericIndex1 = JS_AtomIsNumericIndex1();
v3 = 0;
if ( (_DWORD)v2 != 3 )
{
if ( (_DWORD)v2 == 6 )
{
return (unsigned int)-1;
}
else
{
JS_FreeValue(a1, IsNumericIndex1, v2);
return 1;
}
}
return v3;
}
| JS_AtomIsNumericIndex:
PUSH RBX
MOV RBX,RDI
CALL 0x001202e2
XOR ECX,ECX
CMP EDX,0x3
JNZ 0x0011e0a3
LAB_0011e09f:
MOV EAX,ECX
POP RBX
RET
LAB_0011e0a3:
CMP EDX,0x6
JNZ 0x0011e0ac
PUSH -0x1
JMP 0x0011e0b9
LAB_0011e0ac:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011801e
PUSH 0x1
LAB_0011e0b9:
POP RCX
JMP 0x0011e09f
|
int4 JS_AtomIsNumericIndex(int8 param_1)
{
int4 uVar1;
int1 auVar2 [12];
auVar2 = JS_AtomIsNumericIndex1();
uVar1 = 0;
if (auVar2._8_4_ != 3) {
if (auVar2._8_4_ == 6) {
uVar1 = 0xffffffff;
}
else {
JS_FreeValue(param_1,auVar2._0_8_);
uVar1 = 1;
}
}
return uVar1;
}
| |
40,257 | Gis_multi_point::get_data_as_wkt(String*, char const**) const | eloqsql/sql/spatial.cc | bool Gis_multi_point::get_data_as_wkt(String *txt, const char **end) const
{
uint32 n_points;
if (no_data(m_data, 4))
return 1;
n_points= uint4korr(m_data);
if (n_points > max_n_points ||
not_enough_points(m_data+4, n_points, WKB_HEADER_SIZE) ||
txt->reserve(((MAX_DIGITS_IN_DOUBLE + 1) * 2 + 1) * n_points))
return 1;
*end= append_points(txt, n_points, m_data+4, WKB_HEADER_SIZE);
txt->length(txt->length()-1); // Remove end ','
return 0;
} | O0 | cpp | Gis_multi_point::get_data_as_wkt(String*, char const**) const:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq 0x8(%rdi), %rsi
movl $0x4, %edx
callq 0x986050
testb $0x1, %al
jne 0xa73d20
jmp 0xa73d29
movb $0x1, -0x1(%rbp)
jmp 0xa73dd1
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0xc30c30b, -0x24(%rbp) # imm = 0xC30C30B
ja 0xa73d76
movq -0x30(%rbp), %rdi
movq 0x8(%rdi), %rsi
addq $0x4, %rsi
movl -0x24(%rbp), %edx
movl $0x5, %ecx
callq 0xa78400
testb $0x1, %al
jne 0xa73d76
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
imull $0x47, -0x24(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x4adc70
cmpl $0x0, %eax
je 0xa73d7c
movb $0x1, -0x1(%rbp)
jmp 0xa73dd1
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
movq 0x8(%rdi), %rcx
addq $0x4, %rcx
movl $0x5, %r8d
callq 0xa6fe30
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x4a84f0
movq -0x38(%rbp), %rdi
subl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x4acad0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ZNK15Gis_multi_point15get_data_as_wktEP6StringPPKc:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]; this
mov [rbp+var_30], rdi
mov rsi, [rdi+8]; char *
mov edx, 4; unsigned __int64
call _ZNK8Geometry7no_dataEPKcm; Geometry::no_data(char const*,ulong)
test al, 1
jnz short loc_A73D20
jmp short loc_A73D29
loc_A73D20:
mov [rbp+var_1], 1
jmp loc_A73DD1
loc_A73D29:
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov eax, [rax]
mov [rbp+var_24], eax
cmp [rbp+var_24], 0C30C30Bh
ja short loc_A73D76
mov rdi, [rbp+var_30]; this
mov rsi, [rdi+8]
add rsi, 4; char *
mov edx, [rbp+var_24]; unsigned int
mov ecx, 5; unsigned int
call _ZNK8Geometry17not_enough_pointsEPKcjj; Geometry::not_enough_points(char const*,uint,uint)
test al, 1
jnz short loc_A73D76
mov rdi, [rbp+var_18]
add rdi, 8; this
imul eax, [rbp+var_24], 47h ; 'G'
mov eax, eax
mov esi, eax; unsigned __int64
call _ZN13Binary_string7reserveEm; Binary_string::reserve(ulong)
cmp eax, 0
jz short loc_A73D7C
loc_A73D76:
mov [rbp+var_1], 1
jmp short loc_A73DD1
loc_A73D7C:
mov rdi, [rbp+var_30]; this
mov rsi, [rbp+var_18]; String *
mov edx, [rbp+var_24]; unsigned int
mov rcx, [rdi+8]
add rcx, 4; char *
mov r8d, 5; unsigned int
call _ZNK8Geometry13append_pointsEP6StringjPKcj; Geometry::append_points(String *,uint,char const*,uint)
mov rcx, rax
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
add rdi, 8; this
call _ZNK13Binary_string6lengthEv; Binary_string::length(void)
mov rdi, [rbp+var_38]; this
sub eax, 1
mov eax, eax
mov esi, eax; unsigned __int64
call _ZN13Binary_string6lengthEm; Binary_string::length(ulong)
mov [rbp+var_1], 0
loc_A73DD1:
mov al, [rbp+var_1]
and al, 1
add rsp, 40h
pop rbp
retn
| char Gis_multi_point::get_data_as_wkt(const char **this, String *a2, char **a3)
{
int v3; // eax
unsigned int v5; // [rsp+1Ch] [rbp-24h]
if ( Geometry::no_data((Geometry *)this, this[1], 4LL) )
return 1;
v5 = *(_DWORD *)this[1];
if ( v5 > 0xC30C30B
|| (Geometry::not_enough_points((Geometry *)this, this[1] + 4, v5, 5u) & 1) != 0
|| (unsigned int)Binary_string::reserve((String *)((char *)a2 + 8), 71 * v5) )
{
return 1;
}
*a3 = Geometry::append_points((Geometry *)this, a2, v5, (char *)this[1] + 4, 5u);
v3 = Binary_string::length((String *)((char *)a2 + 8));
Binary_string::length((String *)((char *)a2 + 8), v3 - 1);
return 0;
}
| Item_func_udf_decimal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RDI
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00a73a20
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x1447df8]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x20
POP RBP
RET
|
/* Item_func_udf_decimal::Item_func_udf_decimal(Item_func_udf_decimal const&) */
void __thiscall
Item_func_udf_decimal::Item_func_udf_decimal
(Item_func_udf_decimal *this,Item_func_udf_decimal *param_1)
{
Item_udf_func::Item_udf_func((Item_udf_func *)this,(Item_udf_func *)param_1);
*(int ***)this = &PTR__Item_func_udf_decimal_01447e08;
return;
}
| |
40,258 | stbi__process_gif_raster | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g)
{
stbi_uc lzw_cs;
stbi__int32 len, init_code;
stbi__uint32 first;
stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear;
stbi__gif_lzw *p;
lzw_cs = stbi__get8(s);
if (lzw_cs > 12) return NULL;
clear = 1 << lzw_cs;
first = 1;
codesize = lzw_cs + 1;
codemask = (1 << codesize) - 1;
bits = 0;
valid_bits = 0;
for (init_code = 0; init_code < clear; init_code++) {
g->codes[init_code].prefix = -1;
g->codes[init_code].first = (stbi_uc) init_code;
g->codes[init_code].suffix = (stbi_uc) init_code;
}
// support no starting clear code
avail = clear+2;
oldcode = -1;
len = 0;
for(;;) {
if (valid_bits < codesize) {
if (len == 0) {
len = stbi__get8(s); // start new block
if (len == 0)
return g->out;
}
--len;
bits |= (stbi__int32) stbi__get8(s) << valid_bits;
valid_bits += 8;
} else {
stbi__int32 code = bits & codemask;
bits >>= codesize;
valid_bits -= codesize;
// @OPTIMIZE: is there some way we can accelerate the non-clear path?
if (code == clear) { // clear code
codesize = lzw_cs + 1;
codemask = (1 << codesize) - 1;
avail = clear + 2;
oldcode = -1;
first = 0;
} else if (code == clear + 1) { // end of stream code
stbi__skip(s, len);
while ((len = stbi__get8(s)) > 0)
stbi__skip(s,len);
return g->out;
} else if (code <= avail) {
if (first) {
return stbi__errpuc("no clear code", "Corrupt GIF");
}
if (oldcode >= 0) {
p = &g->codes[avail++];
if (avail > 8192) {
return stbi__errpuc("too many codes", "Corrupt GIF");
}
p->prefix = (stbi__int16) oldcode;
p->first = g->codes[oldcode].first;
p->suffix = (code == avail) ? p->first : g->codes[code].first;
} else if (code == avail)
return stbi__errpuc("illegal code in raster", "Corrupt GIF");
stbi__out_gif_code(g, (stbi__uint16) code);
if ((avail & codemask) == 0 && avail <= 0x0FFF) {
codesize++;
codemask = (1 << codesize) - 1;
}
oldcode = code;
} else {
return stbi__errpuc("illegal code in raster", "Corrupt GIF");
}
}
}
} | O0 | c | stbi__process_gif_raster:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6a1b0
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0xc, %eax
jle 0x700d2
movq $0x0, -0x8(%rbp)
jmp 0x703fb
movzbl -0x19(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x44(%rbp)
movl $0x1, -0x28(%rbp)
movzbl -0x19(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x70163
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw $0xffff, 0x834(%rax,%rcx,4) # imm = 0xFFFF
movl -0x24(%rbp), %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb %dl, 0x836(%rax,%rcx,4)
movl -0x24(%rbp), %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb %dl, 0x837(%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x70116
movl -0x44(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x20(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x701de
cmpl $0x0, -0x20(%rbp)
jne 0x701b0
movq -0x10(%rbp), %rdi
callq 0x6a1b0
movzbl %al, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x701ae
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x703fb
jmp 0x701b0
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6a1b0
movzbl %al, %eax
movl -0x40(%rbp), %ecx
shll %cl, %eax
orl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x40(%rbp)
jmp 0x703f6
movl -0x3c(%rbp), %eax
andl -0x30(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x2c(%rbp), %ecx
movl -0x3c(%rbp), %eax
sarl %cl, %eax
movl %eax, -0x3c(%rbp)
movl -0x2c(%rbp), %ecx
movl -0x40(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x44(%rbp), %eax
jne 0x7023b
movzbl -0x19(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x44(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x34(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x28(%rbp)
jmp 0x703f4
movl -0x54(%rbp), %eax
movl -0x44(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x70287
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x6be10
movq -0x10(%rbp), %rdi
callq 0x6a1b0
movzbl %al, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jle 0x70276
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x6be10
jmp 0x70254
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x703fb
movl -0x54(%rbp), %eax
cmpl -0x34(%rbp), %eax
jg 0x703d3
cmpl $0x0, -0x28(%rbp)
je 0x702b9
leaq 0x20845(%rip), %rdi # 0x90ae5
callq 0x66030
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x703fb
cmpl $0x0, -0x38(%rbp)
jl 0x70368
movq -0x18(%rbp), %rax
addq $0x834, %rax # imm = 0x834
movl -0x34(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
cmpl $0x2000, -0x34(%rbp) # imm = 0x2000
jle 0x7030f
leaq 0x207fd(%rip), %rdi # 0x90af3
callq 0x66030
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x703fb
movl -0x38(%rbp), %eax
movw %ax, %cx
movq -0x50(%rbp), %rax
movw %cx, (%rax)
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
movb 0x836(%rax,%rcx,4), %cl
movq -0x50(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x54(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0x70347
movq -0x50(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, -0x58(%rbp)
jmp 0x7035a
movq -0x18(%rbp), %rax
movslq -0x54(%rbp), %rcx
movzbl 0x836(%rax,%rcx,4), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movb %al, %cl
movq -0x50(%rbp), %rax
movb %cl, 0x3(%rax)
jmp 0x7038f
movl -0x54(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0x7038d
leaq 0x2078b(%rip), %rdi # 0x90b02
callq 0x66030
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x703fb
jmp 0x7038f
movq -0x18(%rbp), %rdi
movl -0x54(%rbp), %eax
movzwl %ax, %esi
callq 0x70410
movl -0x34(%rbp), %eax
andl -0x30(%rbp), %eax
cmpl $0x0, %eax
jne 0x703cb
cmpl $0xfff, -0x34(%rbp) # imm = 0xFFF
jg 0x703cb
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x703f0
leaq 0x20728(%rip), %rdi # 0x90b02
callq 0x66030
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x703fb
jmp 0x703f2
jmp 0x703f4
jmp 0x703f6
jmp 0x7017a
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| stbi__process_gif_raster:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
call stbi__get8
mov [rbp+var_19], al
movzx eax, [rbp+var_19]
cmp eax, 0Ch
jle short loc_700D2
mov [rbp+var_8], 0
jmp loc_703FB
loc_700D2:
movzx ecx, [rbp+var_19]
mov eax, 1
shl eax, cl
mov [rbp+var_44], eax
mov [rbp+var_28], 1
movzx eax, [rbp+var_19]
add eax, 1
mov [rbp+var_2C], eax
mov ecx, [rbp+var_2C]
mov eax, 1
shl eax, cl
sub eax, 1
mov [rbp+var_30], eax
mov [rbp+var_3C], 0
mov [rbp+var_40], 0
mov [rbp+var_24], 0
loc_70116:
mov eax, [rbp+var_24]
cmp eax, [rbp+var_44]
jge short loc_70163
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_24]
mov word ptr [rax+rcx*4+834h], 0FFFFh
mov eax, [rbp+var_24]
mov dl, al
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_24]
mov [rax+rcx*4+836h], dl
mov eax, [rbp+var_24]
mov dl, al
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_24]
mov [rax+rcx*4+837h], dl
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp short loc_70116
loc_70163:
mov eax, [rbp+var_44]
add eax, 2
mov [rbp+var_34], eax
mov [rbp+var_38], 0FFFFFFFFh
mov [rbp+var_20], 0
loc_7017A:
mov eax, [rbp+var_40]
cmp eax, [rbp+var_2C]
jge short loc_701DE
cmp [rbp+var_20], 0
jnz short loc_701B0
mov rdi, [rbp+var_10]
call stbi__get8
movzx eax, al
mov [rbp+var_20], eax
cmp [rbp+var_20], 0
jnz short loc_701AE
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp loc_703FB
loc_701AE:
jmp short $+2
loc_701B0:
mov eax, [rbp+var_20]
add eax, 0FFFFFFFFh
mov [rbp+var_20], eax
mov rdi, [rbp+var_10]
call stbi__get8
movzx eax, al
mov ecx, [rbp+var_40]
shl eax, cl
or eax, [rbp+var_3C]
mov [rbp+var_3C], eax
mov eax, [rbp+var_40]
add eax, 8
mov [rbp+var_40], eax
jmp loc_703F6
loc_701DE:
mov eax, [rbp+var_3C]
and eax, [rbp+var_30]
mov [rbp+var_54], eax
mov ecx, [rbp+var_2C]
mov eax, [rbp+var_3C]
sar eax, cl
mov [rbp+var_3C], eax
mov ecx, [rbp+var_2C]
mov eax, [rbp+var_40]
sub eax, ecx
mov [rbp+var_40], eax
mov eax, [rbp+var_54]
cmp eax, [rbp+var_44]
jnz short loc_7023B
movzx eax, [rbp+var_19]
add eax, 1
mov [rbp+var_2C], eax
mov ecx, [rbp+var_2C]
mov eax, 1
shl eax, cl
sub eax, 1
mov [rbp+var_30], eax
mov eax, [rbp+var_44]
add eax, 2
mov [rbp+var_34], eax
mov [rbp+var_38], 0FFFFFFFFh
mov [rbp+var_28], 0
jmp loc_703F4
loc_7023B:
mov eax, [rbp+var_54]
mov ecx, [rbp+var_44]
add ecx, 1
cmp eax, ecx
jnz short loc_70287
mov rdi, [rbp+var_10]
mov esi, [rbp+var_20]
call stbi__skip
loc_70254:
mov rdi, [rbp+var_10]
call stbi__get8
movzx eax, al
mov [rbp+var_20], eax
cmp eax, 0
jle short loc_70276
mov rdi, [rbp+var_10]
mov esi, [rbp+var_20]
call stbi__skip
jmp short loc_70254
loc_70276:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp loc_703FB
loc_70287:
mov eax, [rbp+var_54]
cmp eax, [rbp+var_34]
jg loc_703D3
cmp [rbp+var_28], 0
jz short loc_702B9
lea rdi, aNoClearCode; "no clear code"
call stbi__err
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rbp+var_8], rax
jmp loc_703FB
loc_702B9:
cmp [rbp+var_38], 0
jl loc_70368
mov rax, [rbp+var_18]
add rax, 834h
mov ecx, [rbp+var_34]
mov edx, ecx
add edx, 1
mov [rbp+var_34], edx
movsxd rcx, ecx
shl rcx, 2
add rax, rcx
mov [rbp+var_50], rax
cmp [rbp+var_34], 2000h
jle short loc_7030F
lea rdi, aTooManyCodes; "too many codes"
call stbi__err
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rbp+var_8], rax
jmp loc_703FB
loc_7030F:
mov eax, [rbp+var_38]
mov cx, ax
mov rax, [rbp+var_50]
mov [rax], cx
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_38]
mov cl, [rax+rcx*4+836h]
mov rax, [rbp+var_50]
mov [rax+2], cl
mov eax, [rbp+var_54]
cmp eax, [rbp+var_34]
jnz short loc_70347
mov rax, [rbp+var_50]
movzx eax, byte ptr [rax+2]
mov [rbp+var_58], eax
jmp short loc_7035A
loc_70347:
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_54]
movzx eax, byte ptr [rax+rcx*4+836h]
mov [rbp+var_58], eax
loc_7035A:
mov eax, [rbp+var_58]
mov cl, al
mov rax, [rbp+var_50]
mov [rax+3], cl
jmp short loc_7038F
loc_70368:
mov eax, [rbp+var_54]
cmp eax, [rbp+var_34]
jnz short loc_7038D
lea rdi, aIllegalCodeInR; "illegal code in raster"
call stbi__err
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rbp+var_8], rax
jmp short loc_703FB
loc_7038D:
jmp short $+2
loc_7038F:
mov rdi, [rbp+var_18]
mov eax, [rbp+var_54]
movzx esi, ax
call stbi__out_gif_code
mov eax, [rbp+var_34]
and eax, [rbp+var_30]
cmp eax, 0
jnz short loc_703CB
cmp [rbp+var_34], 0FFFh
jg short loc_703CB
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
mov ecx, [rbp+var_2C]
mov eax, 1
shl eax, cl
sub eax, 1
mov [rbp+var_30], eax
loc_703CB:
mov eax, [rbp+var_54]
mov [rbp+var_38], eax
jmp short loc_703F0
loc_703D3:
lea rdi, aIllegalCodeInR; "illegal code in raster"
call stbi__err
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rbp+var_8], rax
jmp short loc_703FB
loc_703F0:
jmp short $+2
loc_703F2:
jmp short $+2
loc_703F4:
jmp short $+2
loc_703F6:
jmp loc_7017A
loc_703FB:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| long long stbi__process_gif_raster(long long a1, long long a2)
{
unsigned __int8 v2; // al
unsigned __int8 v3; // al
int v4; // ecx
char v6; // [rsp+8h] [rbp-58h]
int v7; // [rsp+Ch] [rbp-54h]
long long v8; // [rsp+10h] [rbp-50h]
int v9; // [rsp+1Ch] [rbp-44h]
int v10; // [rsp+20h] [rbp-40h]
int v11; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+28h] [rbp-38h]
int v13; // [rsp+2Ch] [rbp-34h]
int v14; // [rsp+30h] [rbp-30h]
int v15; // [rsp+34h] [rbp-2Ch]
int v16; // [rsp+38h] [rbp-28h]
int i; // [rsp+3Ch] [rbp-24h]
int v18; // [rsp+40h] [rbp-20h]
unsigned __int8 v19; // [rsp+47h] [rbp-19h]
v19 = stbi__get8(a1);
if ( v19 > 0xCu )
return 0LL;
v9 = 1 << v19;
v16 = 1;
v15 = v19 + 1;
v14 = (1 << (v19 + 1)) - 1;
v11 = 0;
v10 = 0;
for ( i = 0; i < v9; ++i )
{
*(_WORD *)(a2 + 4LL * i + 2100) = -1;
*(_BYTE *)(a2 + 4LL * i + 2102) = i;
*(_BYTE *)(a2 + 4LL * i + 2103) = i;
}
v13 = v9 + 2;
v12 = -1;
v18 = 0;
while ( 1 )
{
while ( 1 )
{
while ( v10 < v15 )
{
if ( !v18 )
{
v2 = stbi__get8(a1);
v18 = v2;
if ( !v2 )
return *(_QWORD *)(a2 + 8);
}
--v18;
v11 |= (unsigned __int8)stbi__get8(a1) << v10;
v10 += 8;
}
v7 = v14 & v11;
v11 >>= v15;
v10 -= v15;
if ( v7 != v9 )
break;
v15 = v19 + 1;
v14 = (1 << (v19 + 1)) - 1;
v13 = v9 + 2;
v12 = -1;
v16 = 0;
}
if ( v7 == v9 + 1 )
break;
if ( v7 > v13 )
goto LABEL_32;
if ( v16 )
{
stbi__err((long long)"no clear code");
return 0LL;
}
if ( v12 < 0 )
{
if ( v7 == v13 )
{
LABEL_32:
stbi__err((long long)"illegal code in raster");
return 0LL;
}
}
else
{
v4 = v13++;
v8 = 4LL * v4 + a2 + 2100;
if ( v13 > 0x2000 )
{
stbi__err((long long)"too many codes");
return 0LL;
}
*(_WORD *)v8 = v12;
*(_BYTE *)(v8 + 2) = *(_BYTE *)(a2 + 4LL * v12 + 2102);
if ( v7 == v13 )
v6 = *(_BYTE *)(v8 + 2);
else
v6 = *(_BYTE *)(a2 + 4LL * v7 + 2102);
*(_BYTE *)(v8 + 3) = v6;
}
stbi__out_gif_code(a2, (unsigned __int16)v7);
if ( (v14 & v13) == 0 && v13 <= 4095 )
v14 = (1 << ++v15) - 1;
v12 = v7;
}
do
{
stbi__skip(a1, v18);
v3 = stbi__get8(a1);
v18 = v3;
}
while ( v3 );
return *(_QWORD *)(a2 + 8);
}
| stbi__process_gif_raster:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016a1b0
MOV byte ptr [RBP + -0x19],AL
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xc
JLE 0x001700d2
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001703fb
LAB_001700d2:
MOVZX ECX,byte ptr [RBP + -0x19]
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RBP + -0x44],EAX
MOV dword ptr [RBP + -0x28],0x1
MOVZX EAX,byte ptr [RBP + -0x19]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
MOV ECX,dword ptr [RBP + -0x2c]
MOV EAX,0x1
SHL EAX,CL
SUB EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
MOV dword ptr [RBP + -0x3c],0x0
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x24],0x0
LAB_00170116:
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x44]
JGE 0x00170163
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV word ptr [RAX + RCX*0x4 + 0x834],0xffff
MOV EAX,dword ptr [RBP + -0x24]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV byte ptr [RAX + RCX*0x4 + 0x836],DL
MOV EAX,dword ptr [RBP + -0x24]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x24]
MOV byte ptr [RAX + RCX*0x4 + 0x837],DL
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00170116
LAB_00170163:
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x2
MOV dword ptr [RBP + -0x34],EAX
MOV dword ptr [RBP + -0x38],0xffffffff
MOV dword ptr [RBP + -0x20],0x0
LAB_0017017a:
MOV EAX,dword ptr [RBP + -0x40]
CMP EAX,dword ptr [RBP + -0x2c]
JGE 0x001701de
CMP dword ptr [RBP + -0x20],0x0
JNZ 0x001701b0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016a1b0
MOVZX EAX,AL
MOV dword ptr [RBP + -0x20],EAX
CMP dword ptr [RBP + -0x20],0x0
JNZ 0x001701ae
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001703fb
LAB_001701ae:
JMP 0x001701b0
LAB_001701b0:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x20],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016a1b0
MOVZX EAX,AL
MOV ECX,dword ptr [RBP + -0x40]
SHL EAX,CL
OR EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x8
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001703f6
LAB_001701de:
MOV EAX,dword ptr [RBP + -0x3c]
AND EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x54],EAX
MOV ECX,dword ptr [RBP + -0x2c]
MOV EAX,dword ptr [RBP + -0x3c]
SAR EAX,CL
MOV dword ptr [RBP + -0x3c],EAX
MOV ECX,dword ptr [RBP + -0x2c]
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,ECX
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x54]
CMP EAX,dword ptr [RBP + -0x44]
JNZ 0x0017023b
MOVZX EAX,byte ptr [RBP + -0x19]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
MOV ECX,dword ptr [RBP + -0x2c]
MOV EAX,0x1
SHL EAX,CL
SUB EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x2
MOV dword ptr [RBP + -0x34],EAX
MOV dword ptr [RBP + -0x38],0xffffffff
MOV dword ptr [RBP + -0x28],0x0
JMP 0x001703f4
LAB_0017023b:
MOV EAX,dword ptr [RBP + -0x54]
MOV ECX,dword ptr [RBP + -0x44]
ADD ECX,0x1
CMP EAX,ECX
JNZ 0x00170287
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x20]
CALL 0x0016be10
LAB_00170254:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016a1b0
MOVZX EAX,AL
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JLE 0x00170276
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x20]
CALL 0x0016be10
JMP 0x00170254
LAB_00170276:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001703fb
LAB_00170287:
MOV EAX,dword ptr [RBP + -0x54]
CMP EAX,dword ptr [RBP + -0x34]
JG 0x001703d3
CMP dword ptr [RBP + -0x28],0x0
JZ 0x001702b9
LEA RDI,[0x190ae5]
CALL 0x00166030
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001703fb
LAB_001702b9:
CMP dword ptr [RBP + -0x38],0x0
JL 0x00170368
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x834
MOV ECX,dword ptr [RBP + -0x34]
MOV EDX,ECX
ADD EDX,0x1
MOV dword ptr [RBP + -0x34],EDX
MOVSXD RCX,ECX
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
CMP dword ptr [RBP + -0x34],0x2000
JLE 0x0017030f
LEA RDI,[0x190af3]
CALL 0x00166030
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001703fb
LAB_0017030f:
MOV EAX,dword ptr [RBP + -0x38]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x50]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x38]
MOV CL,byte ptr [RAX + RCX*0x4 + 0x836]
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX + 0x2],CL
MOV EAX,dword ptr [RBP + -0x54]
CMP EAX,dword ptr [RBP + -0x34]
JNZ 0x00170347
MOV RAX,qword ptr [RBP + -0x50]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV dword ptr [RBP + -0x58],EAX
JMP 0x0017035a
LAB_00170347:
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x54]
MOVZX EAX,byte ptr [RAX + RCX*0x4 + 0x836]
MOV dword ptr [RBP + -0x58],EAX
LAB_0017035a:
MOV EAX,dword ptr [RBP + -0x58]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX + 0x3],CL
JMP 0x0017038f
LAB_00170368:
MOV EAX,dword ptr [RBP + -0x54]
CMP EAX,dword ptr [RBP + -0x34]
JNZ 0x0017038d
LEA RDI,[0x190b02]
CALL 0x00166030
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001703fb
LAB_0017038d:
JMP 0x0017038f
LAB_0017038f:
MOV RDI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x54]
MOVZX ESI,AX
CALL 0x00170410
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,dword ptr [RBP + -0x30]
CMP EAX,0x0
JNZ 0x001703cb
CMP dword ptr [RBP + -0x34],0xfff
JG 0x001703cb
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
MOV ECX,dword ptr [RBP + -0x2c]
MOV EAX,0x1
SHL EAX,CL
SUB EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
LAB_001703cb:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x38],EAX
JMP 0x001703f0
LAB_001703d3:
LEA RDI,[0x190b02]
CALL 0x00166030
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001703fb
LAB_001703f0:
JMP 0x001703f2
LAB_001703f2:
JMP 0x001703f4
LAB_001703f4:
JMP 0x001703f6
LAB_001703f6:
JMP 0x0017017a
LAB_001703fb:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
int8 stbi__process_gif_raster(int8 param_1,long param_2)
{
int1 uVar1;
bool bVar2;
byte bVar3;
byte bVar4;
char cVar5;
uint uVar6;
uint uVar7;
int2 *puVar8;
uint uVar9;
int local_48;
uint local_44;
uint local_40;
uint local_3c;
uint local_38;
int local_34;
int local_2c;
uint local_28;
bVar3 = stbi__get8(param_1);
if (0xc < bVar3) {
return 0;
}
uVar6 = 1 << (bVar3 & 0x1f);
bVar2 = true;
local_34 = bVar3 + 1;
local_38 = (1 << ((byte)local_34 & 0x1f)) - 1;
local_44 = 0;
local_48 = 0;
for (local_2c = 0; local_2c < (int)uVar6; local_2c = local_2c + 1) {
*(int2 *)(param_2 + 0x834 + (long)local_2c * 4) = 0xffff;
*(char *)(param_2 + 0x836 + (long)local_2c * 4) = (char)local_2c;
*(char *)(param_2 + 0x837 + (long)local_2c * 4) = (char)local_2c;
}
local_3c = uVar6 + 2;
local_40 = 0xffffffff;
local_28 = 0;
while( true ) {
while( true ) {
for (; local_48 < local_34; local_48 = local_48 + 8) {
if (local_28 == 0) {
bVar4 = stbi__get8(param_1);
local_28 = (uint)bVar4;
if (local_28 == 0) {
return *(int8 *)(param_2 + 8);
}
}
local_28 = local_28 - 1;
bVar4 = stbi__get8(param_1);
local_44 = (uint)bVar4 << ((byte)local_48 & 0x1f) | local_44;
}
uVar7 = local_44 & local_38;
local_44 = (int)local_44 >> ((byte)local_34 & 0x1f);
local_48 = local_48 - local_34;
if (uVar7 != uVar6) break;
local_34 = bVar3 + 1;
local_38 = (1 << ((byte)local_34 & 0x1f)) - 1;
local_3c = uVar6 + 2;
local_40 = 0xffffffff;
bVar2 = false;
}
if (uVar7 == uVar6 + 1) {
stbi__skip(param_1,local_28);
while (cVar5 = stbi__get8(param_1), cVar5 != '\0') {
stbi__skip(param_1,cVar5);
}
return *(int8 *)(param_2 + 8);
}
if ((int)local_3c < (int)uVar7) break;
if (bVar2) {
stbi__err("no clear code");
return 0;
}
if ((int)local_40 < 0) {
if (uVar7 == local_3c) {
stbi__err("illegal code in raster");
return 0;
}
}
else {
uVar9 = local_3c + 1;
puVar8 = (int2 *)(param_2 + 0x834 + (long)(int)local_3c * 4);
if (0x2000 < (int)uVar9) {
stbi__err("too many codes");
return 0;
}
*puVar8 = (short)local_40;
*(int1 *)(puVar8 + 1) = *(int1 *)(param_2 + 0x836 + (long)(int)local_40 * 4);
if (uVar7 == uVar9) {
uVar1 = *(int1 *)(puVar8 + 1);
}
else {
uVar1 = *(int1 *)(param_2 + 0x836 + (long)(int)uVar7 * 4);
}
*(int1 *)((long)puVar8 + 3) = uVar1;
local_3c = uVar9;
}
stbi__out_gif_code(param_2,uVar7 & 0xffff);
local_40 = uVar7;
if (((local_3c & local_38) == 0) && ((int)local_3c < 0x1000)) {
local_34 = local_34 + 1;
local_38 = (1 << ((byte)local_34 & 0x1f)) - 1;
}
}
stbi__err("illegal code in raster");
return 0;
}
| |
40,259 | mysql_hex_string | eloqsql/libmariadb/libmariadb/mariadb_lib.c | ulong STDCALL mysql_hex_string(char *to, const char *from, unsigned long len)
{
char *start= to;
char hexdigits[]= "0123456789ABCDEF";
while (len--)
{
*to++= hexdigits[((unsigned char)*from) >> 4];
*to++= hexdigits[((unsigned char)*from) & 0x0F];
from++;
}
*to= 0;
return (ulong)(to - start);
} | O0 | c | mysql_hex_string:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x2cf50(%rip), %rax # 0x512b0
movq %rax, -0x20(%rbp)
movq 0x2cf4d(%rip), %rax # 0x512b8
movq %rax, -0x18(%rbp)
movb 0x2cf4b(%rip), %al # 0x512c0
movb %al, -0x10(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x38(%rbp)
cmpq $0x0, %rax
je 0x243dd
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
sarl $0x4, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xf, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x24378
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2440f
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
callq 0x134b0
nopw %cs:(%rax,%rax)
| mysql_hex_string:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, cs:qword_512B0
mov [rbp+var_20], rax
mov rax, cs:qword_512B8
mov [rbp+var_18], rax
mov al, cs:byte_512C0
mov [rbp+var_10], al
loc_24378:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rcx
cmp rax, 0
jz short loc_243DD
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
sar eax, 4
cdqe
mov cl, byte ptr [rbp+rax+var_20]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
and eax, 0Fh
cdqe
mov cl, byte ptr [rbp+rax+var_20]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_24378
loc_243DD:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_40]
sub rax, rcx
mov [rbp+var_48], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2440F
mov rax, [rbp+var_48]
add rsp, 50h
pop rbp
retn
loc_2440F:
call ___stack_chk_fail
| _BYTE * mysql_hex_string(_BYTE *a1, unsigned __int8 *a2, long long a3)
{
_BYTE *v4; // rax
_BYTE *v8; // [rsp+28h] [rbp-28h]
char v9[24]; // [rsp+30h] [rbp-20h] BYREF
unsigned long long v10; // [rsp+48h] [rbp-8h]
v10 = __readfsqword(0x28u);
v8 = a1;
strcpy(v9, "0123456789ABCDEF");
while ( a3-- )
{
*v8 = v9[(int)*a2 >> 4];
v4 = v8 + 1;
v8 += 2;
*v4 = v9[*a2++ & 0xF];
}
*v8 = 0;
return (_BYTE *)(v8 - a1);
}
| mysql_hex_string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [0x001512b0]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [0x001512b8]
MOV qword ptr [RBP + -0x18],RAX
MOV AL,byte ptr [0x001512c0]
MOV byte ptr [RBP + -0x10],AL
LAB_00124378:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x38],RCX
CMP RAX,0x0
JZ 0x001243dd
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
SAR EAX,0x4
CDQE
MOV CL,byte ptr [RBP + RAX*0x1 + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xf
CDQE
MOV CL,byte ptr [RBP + RAX*0x1 + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00124378
LAB_001243dd:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012440f
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x50
POP RBP
RET
LAB_0012440f:
CALL 0x001134b0
|
long mysql_hex_string(char *param_1,byte *param_2,long param_3)
{
char *pcVar1;
long in_FS_OFFSET;
long local_40;
byte *local_38;
char *local_30;
char local_28 [16];
char local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28._0_8_ = s_0123456789ABCDEF_001512b0._0_8_;
local_28._8_8_ = s_0123456789ABCDEF_001512b0._8_8_;
local_18 = s_0123456789ABCDEF_001512b0[0x10];
local_40 = param_3;
local_38 = param_2;
local_30 = param_1;
while (local_40 != 0) {
pcVar1 = local_30 + 1;
*local_30 = local_28[(int)(uint)*local_38 >> 4];
local_30 = local_30 + 2;
*pcVar1 = local_28[(int)(*local_38 & 0xf)];
local_38 = local_38 + 1;
local_40 = local_40 + -1;
}
*local_30 = '\0';
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return (long)local_30 - (long)param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,260 | wsrep_allowlist_service_v1::allowlist_key_from_native(wsrep_allowlist_key_t) | eloqsql/wsrep-lib/src/allowlist_service_v1.cpp | enum wsrep::allowlist_service::allowlist_key allowlist_key_from_native(wsrep_allowlist_key_t key)
{
switch (key)
{
case WSREP_ALLOWLIST_KEY_IP: return wsrep::allowlist_service::allowlist_key::allowlist_ip;
case WSREP_ALLOWLIST_KEY_SSL: return wsrep::allowlist_service::allowlist_key::allowlist_ssl;
default: throw wsrep::runtime_error("Unknown allowlist key");
}
} | O0 | cpp | wsrep_allowlist_service_v1::allowlist_key_from_native(wsrep_allowlist_key_t):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x18(%rbp)
testl %eax, %eax
je 0x13ddbf1
jmp 0x13ddbe7
movl -0x18(%rbp), %eax
subl $0x1, %eax
je 0x13ddbfa
jmp 0x13ddc03
movl $0x0, -0x4(%rbp)
jmp 0x13ddc53
movl $0x1, -0x4(%rbp)
jmp 0x13ddc53
movl $0x10, %edi
callq 0x776940
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x20(%rbp)
leaq 0xcca42(%rip), %rsi # 0x14aa660
callq 0xfd1440
jmp 0x13ddc25
movq -0x20(%rbp), %rdi
leaq 0x74acd0(%rip), %rsi # 0x1b28900
leaq -0x40c7a7(%rip), %rdx # 0xfd1490
callq 0x775920
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x7771f0
jmp 0x13ddc5c
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x775a20
nopw %cs:(%rax,%rax)
| _ZN26wsrep_allowlist_service_v125allowlist_key_from_nativeE21wsrep_allowlist_key_t:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], edi
mov eax, [rbp+var_8]
mov [rbp+var_18], eax
test eax, eax
jz short loc_13DDBF1
jmp short $+2
loc_13DDBE7:
mov eax, [rbp+var_18]
sub eax, 1
jz short loc_13DDBFA
jmp short loc_13DDC03
loc_13DDBF1:
mov [rbp+var_4], 0
jmp short loc_13DDC53
loc_13DDBFA:
mov [rbp+var_4], 1
jmp short loc_13DDC53
loc_13DDC03:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_20], rax
lea rsi, aUnknownAllowli; "Unknown allowlist key"
call _ZN5wsrep13runtime_errorC2EPKc; wsrep::runtime_error::runtime_error(char const*)
jmp short $+2
loc_13DDC25:
mov rdi, [rbp+var_20]; void *
lea rsi, _ZTIN5wsrep13runtime_errorE; lptinfo
lea rdx, _ZN5wsrep13runtime_errorD2Ev; void (*)(void *)
call ___cxa_throw
mov rdi, [rbp+var_20]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_10], rcx
mov [rbp+var_14], eax
call ___cxa_free_exception
jmp short loc_13DDC5C
loc_13DDC53:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
loc_13DDC5C:
mov rdi, [rbp+var_10]
call __Unwind_Resume
| long long wsrep_allowlist_service_v1::allowlist_key_from_native(int a1)
{
wsrep::runtime_error *exception; // [rsp+0h] [rbp-20h]
if ( a1 )
{
if ( a1 != 1 )
{
exception = (wsrep::runtime_error *)__cxa_allocate_exception(0x10uLL);
wsrep::runtime_error::runtime_error(exception, "Unknown allowlist key");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'wsrep::runtime_error,
(void (*)(void *))wsrep::runtime_error::~runtime_error);
}
return 1;
}
else
{
return 0;
}
}
| mi_records_in_range:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
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 RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x013dfd10
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JGE 0x013ddc11
JMP 0x013ddc04
LAB_013ddc04:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x013ddfba
LAB_013ddc11:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x1f4],0x2
JNZ 0x013ddc42
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
MOV EDX,0x1
CALL 0x013cfdd0
CMP EAX,0x0
JZ 0x013ddc42
JMP 0x013ddc35
LAB_013ddc35:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x013ddfba
LAB_013ddc42:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1d0]
AND ECX,0x401
MOV dword ptr [RAX + 0x1d0],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + 0x384],0x0
JZ 0x013ddc95
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x4c8]
MOVSXD RAX,dword ptr [RBP + -0x14]
IMUL RAX,RAX,0x98
ADD RDI,RAX
LEA RSI,[0x15a12fb]
MOV EDX,0x41
CALL 0x013ddfd0
LAB_013ddc95:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOVSXD RCX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0xc]
MOV dword ptr [RBP + -0x60],EAX
SUB EAX,0x1
JZ 0x013ddd7b
JMP 0x013ddcbe
LAB_013ddcbe:
MOV EAX,dword ptr [RBP + -0x60]
SUB EAX,0x2
JNZ 0x013ddd7d
JMP 0x013ddccc
LAB_013ddccc:
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x013ddce0
MOV qword ptr [RBP + -0x38],-0x1
JMP 0x013ddf60
LAB_013ddce0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x108]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x194]
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RAX + 0x10]
XOR EAX,EAX
MOV R9D,EAX
CALL 0x013cd830
MOV dword ptr [RBP + -0x5c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV R8D,EAX
LEA RAX,[0x1c87a60]
MOV R8D,dword ptr [RAX + R8*0x4]
CALL 0x013ec900
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JZ 0x013ddd63
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x68],RAX
JMP 0x013ddd6e
LAB_013ddd63:
MOV EAX,0x1
MOV qword ptr [RBP + -0x68],RAX
JMP 0x013ddd6e
LAB_013ddd6e:
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x013ddf60
LAB_013ddd7b:
JMP 0x013ddd7d
LAB_013ddd7d:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x013dddae
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x18]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x013de040
MOVSD qword ptr [RBP + -0x70],XMM0
JMP 0x013dddb8
LAB_013dddae:
XORPS XMM0,XMM0
MOVSD qword ptr [RBP + -0x70],XMM0
JMP 0x013dddb8
LAB_013dddb8:
MOVSD XMM0,qword ptr [RBP + -0x70]
MOVSD qword ptr [RBP + -0x40],XMM0
CMP qword ptr [RBP + -0x28],0x0
JZ 0x013dddf7
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x18]
MOV R8,qword ptr [RBP + -0x30]
ADD R8,0x8
CALL 0x013de040
MOVSD qword ptr [RBP + -0x78],XMM0
JMP 0x013dde2a
LAB_013dddf7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVQ XMM0,qword ptr [RAX]
MOVAPS XMM1,xmmword ptr [0x014e2050]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x014e2060]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x78],XMM0
LAB_013dde2a:
MOVSD XMM0,qword ptr [RBP + -0x78]
MOVSD qword ptr [RBP + -0x48],XMM0
MOVSD XMM1,qword ptr [RBP + -0x48]
MOVSD XMM0,qword ptr [RBP + -0x40]
UCOMISD XMM0,XMM1
JBE 0x013dde4c
XOR EAX,EAX
MOV qword ptr [RBP + -0x80],RAX
JMP 0x013ddeae
LAB_013dde4c:
MOVSD XMM0,qword ptr [RBP + -0x48]
UCOMISD XMM0,qword ptr [RBP + -0x40]
JNZ 0x013dde68
JP 0x013dde68
MOV EAX,0x1
MOV qword ptr [RBP + -0x88],RAX
JMP 0x013ddea3
LAB_013dde68:
MOVSD XMM0,qword ptr [RBP + -0x48]
MOVSD XMM1,qword ptr [RBP + -0x40]
SUBSD XMM0,XMM1
MOVAPS XMM1,XMM0
CVTTSD2SI RAX,XMM1
MOV RDX,RAX
SAR RDX,0x3f
MOVSD XMM1,qword ptr [0x015ab810]
SUBSD XMM0,XMM1
CVTTSD2SI RCX,XMM0
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x88],RAX
LAB_013ddea3:
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x80],RAX
LAB_013ddeae:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x38],RAX
MOVSD XMM0,qword ptr [RBP + -0x40]
MOVSD XMM1,qword ptr [0x015ab920]
UCOMISD XMM0,XMM1
JNZ 0x013ddecd
JP 0x013ddecd
JMP 0x013ddee2
LAB_013ddecd:
MOVSD XMM0,qword ptr [RBP + -0x48]
MOVSD XMM1,qword ptr [0x015ab920]
UCOMISD XMM0,XMM1
JNZ 0x013ddeec
JP 0x013ddeec
LAB_013ddee2:
MOV qword ptr [RBP + -0x38],-0x1
JMP 0x013ddf5e
LAB_013ddeec:
MOVSD XMM0,qword ptr [RBP + -0x48]
SUBSD XMM0,qword ptr [RBP + -0x40]
MOVSD qword ptr [RBP + -0x50],XMM0
MOVSD XMM0,qword ptr [RBP + -0x50]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x013ddf54
MOVSD XMM0,qword ptr [RBP + -0x50]
MOVSD XMM1,qword ptr [0x015ab8a8]
ADDSD XMM0,XMM1
MOVAPS XMM1,XMM0
CVTTSD2SI RAX,XMM1
MOV RDX,RAX
SAR RDX,0x3f
MOVSD XMM1,qword ptr [0x015ab810]
SUBSD XMM0,XMM1
CVTTSD2SI RCX,XMM0
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JNZ 0x013ddf52
MOV qword ptr [RBP + -0x38],0x1
LAB_013ddf52:
JMP 0x013ddf5c
LAB_013ddf54:
MOV qword ptr [RBP + -0x38],0x0
LAB_013ddf5c:
JMP 0x013ddf5e
LAB_013ddf5e:
JMP 0x013ddf60
LAB_013ddf60:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP byte ptr [RAX + 0x384],0x0
JZ 0x013ddf91
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x4c8]
MOVSXD RAX,dword ptr [RBP + -0x14]
IMUL RAX,RAX,0x98
ADD RDI,RAX
CALL 0x013de1b0
LAB_013ddf91:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x013ddfac
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x013cff30
LAB_013ddfac:
JMP 0x013ddfae
LAB_013ddfae:
JMP 0x013ddfb0
LAB_013ddfb0:
JMP 0x013ddfb2
LAB_013ddfb2:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_013ddfba:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong mi_records_in_range(long *param_1,int4 param_2,int8 *param_3,int8 *param_4,
long param_5)
{
int8 uVar1;
char cVar2;
int iVar3;
int iVar4;
int4 uVar5;
long lVar6;
double dVar7;
int1 auVar8 [16];
double local_80;
double local_78;
ulong local_70;
ulong local_40;
iVar3 = _mi_check_index(param_1,param_2);
if (iVar3 < 0) {
return 0xffffffffffffffff;
}
if ((*(int *)((long)param_1 + 500) == 2) && (iVar4 = _mi_readinfo(param_1,0,1), iVar4 != 0)) {
return 0xffffffffffffffff;
}
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 0x401;
if (*(char *)(*param_1 + 900) != '\0') {
inline_mysql_rwlock_rdlock
(*(long *)(*param_1 + 0x4c8) + (long)iVar3 * 0x98,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_range.c",0x41);
}
cVar2 = *(char *)(*(long *)(*param_1 + 0x218) + 0xc + (long)iVar3 * 0x70);
if ((cVar2 == '\x01') || (cVar2 != '\x02')) {
if (param_3 == (int8 *)0x0) {
local_78 = 0.0;
}
else {
local_78 = (double)_mi_record_pos(param_1,*param_3,param_3[2],*(int4 *)(param_3 + 3),
param_5);
}
if (param_4 == (int8 *)0x0) {
uVar1 = *(int8 *)param_1[1];
auVar8._8_4_ = (int)((ulong)uVar1 >> 0x20);
auVar8._0_8_ = uVar1;
auVar8._12_4_ = _UNK_014e2054;
local_80 = (auVar8._8_8_ - _UNK_014e2068) +
((double)CONCAT44(_DAT_014e2050,(int)uVar1) - _DAT_014e2060);
}
else {
local_80 = (double)_mi_record_pos(param_1,*param_4,param_4[2],*(int4 *)(param_4 + 3),
param_5 + 8);
}
if ((local_78 != DAT_015ab920) || (NAN(local_78) || NAN(DAT_015ab920))) {
if ((local_80 != DAT_015ab920) || (NAN(local_80) || NAN(DAT_015ab920))) {
if (local_80 - local_78 < 0.0) {
local_40 = 0;
}
else {
dVar7 = (local_80 - local_78) + DAT_015ab8a8;
local_40 = (ulong)dVar7;
local_40 = local_40 | (long)(dVar7 - DAT_015ab810) & (long)local_40 >> 0x3f;
if (local_40 == 0) {
local_40 = 1;
}
}
goto LAB_013ddf60;
}
}
local_40 = 0xffffffffffffffff;
}
else if (param_3 == (int8 *)0x0) {
local_40 = 0xffffffffffffffff;
}
else {
lVar6 = param_1[0x21] + (ulong)*(uint *)(*param_1 + 0x194);
uVar5 = _mi_pack_key(param_1,iVar3,lVar6,*param_3,param_3[2],0);
local_70 = rtree_estimate(param_1,iVar3,lVar6,uVar5,
*(int4 *)(myisam_read_vec + (ulong)*(uint *)(param_3 + 3) * 4));
if (local_70 == 0) {
local_70 = 1;
}
local_40 = local_70;
}
LAB_013ddf60:
if (*(char *)(*param_1 + 900) != '\0') {
inline_mysql_rwlock_unlock(*(long *)(*param_1 + 0x4c8) + (long)iVar3 * 0x98);
}
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
return local_40;
}
| |
40,261 | minja::Parser::parseExpansion() | llama.cpp/common/minja/minja.hpp | std::shared_ptr<Expression> parseExpansion() {
static std::regex expansion_tok(R"(\*\*?)");
auto op_str = consumeToken(expansion_tok);
auto expr = parseValueExpression();
if (op_str.empty()) return expr;
if (!expr) throw std::runtime_error("Expected expr of 'expansion' expression");
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op_str == "*" ? UnaryOpExpr::Op::Expansion : UnaryOpExpr::Op::ExpansionDict);
} | O3 | cpp | minja::Parser::parseExpansion():
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x82bb8(%rip), %rax # 0x1689e0
movb (%rax), %al
testb %al, %al
je 0xe5f6a
leaq 0x82b87(%rip), %rdx # 0x1689c0
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0xe245a
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xe6054
cmpq $0x0, 0x40(%rsp)
movq 0x10(%rsp), %rax
je 0xe5e95
testq %rax, %rax
je 0xe5fc1
movq (%r14), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0xe5eb6
movq 0x8010d(%rip), %rcx # 0x165f98
cmpb $0x0, (%rcx)
je 0xe5eb2
incl 0x8(%rax)
jmp 0xe5eb6
movq %rax, (%rbx)
movq 0x18(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, 0x18(%rsp)
movq %rax, 0x8(%rbx)
movq %rcx, 0x10(%rsp)
jmp 0xe5f38
lock
incl 0x8(%rax)
leaq 0x60(%rsp), %r15
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x8(%r15)
leaq 0x3d832(%rip), %rsi # 0x123700
leaq 0x38(%rsp), %rdi
callq 0x20fc0
cmpl $0x1, %eax
movl $0x4, %eax
sbbl $0x0, %eax
leaq 0x34(%rsp), %r9
movl %eax, (%r9)
leaq 0x28(%rsp), %r14
movq $0x0, -0x8(%r14)
leaq 0x20(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x58(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r14, %rdi
callq 0xef1b6
movaps 0x20(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movups %xmm0, (%rbx)
movq %rax, 0x20(%rsp)
movq %r14, %rdi
callq 0x7416e
movq %r15, %rdi
callq 0x7416e
leaq 0x18(%rsp), %rdi
callq 0x7416e
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe5f5d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x20180
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x82a6f(%rip), %rdi # 0x1689e0
callq 0x205d0
testl %eax, %eax
je 0xe5e32
leaq 0x82a3b(%rip), %rdi # 0x1689c0
leaq 0x3e938(%rip), %rsi # 0x1248c4
movl $0x10, %edx
callq 0x69ac0
leaq -0x7c431(%rip), %rdi # 0x69b6c
leaq 0x82a1c(%rip), %rsi # 0x1689c0
leaq 0x80afd(%rip), %rdx # 0x166aa8
callq 0x20f40
leaq 0x82a29(%rip), %rdi # 0x1689e0
callq 0x209c0
jmp 0xe5e32
movl $0x10, %edi
callq 0x20680
movq %rax, %r14
leaq 0x3e8f5(%rip), %rsi # 0x1248ca
movq %rax, %rdi
callq 0x20450
movq 0x7ffdc(%rip), %rsi # 0x165fc0
movq 0x7ff95(%rip), %rdx # 0x165f80
movq %r14, %rdi
callq 0x20ab0
movq %rax, %rbx
leaq 0x829e3(%rip), %rdi # 0x1689e0
callq 0x20700
jmp 0xe604b
movq %rax, %rbx
jmp 0xe6021
movq %rax, %rbx
movq %r14, %rdi
callq 0x20f60
jmp 0xe6021
movq %rax, %rbx
movq %r15, %rdi
callq 0x7416e
leaq 0x18(%rsp), %rdi
callq 0x7416e
jmp 0xe6030
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe604b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x20180
movq %rbx, %rdi
callq 0x20b50
nop
| _ZN5minja6Parser14parseExpansionEv:
push r15
push r14
push rbx
sub rsp, 70h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; `guard variable for'minja::Parser::parseExpansion(void)::expansion_tok
mov al, [rax]
test al, al
jz loc_E5F6A
loc_E5E32:
lea rdx, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; int
lea rdi, [rsp+88h+var_50]; int
mov rsi, r14; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+88h+var_78]; this
mov rsi, r14
call _ZN5minja6Parser20parseValueExpressionEv; minja::Parser::parseValueExpression(void)
cmp [rsp+88h+var_48], 0
mov rax, [rsp+88h+var_78]
jz short loc_E5E95
test rax, rax
jz loc_E5FC1
mov rax, [r14]
mov [rsp+88h+var_30], rax
mov rax, [r14+8]
mov [rsp+88h+var_28], rax
test rax, rax
jz short loc_E5EB6
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_E5EB2
inc dword ptr [rax+8]
jmp short loc_E5EB6
loc_E5E95:
mov [rbx], rax
mov rax, [rsp+88h+var_70]
xor ecx, ecx
mov [rsp+88h+var_70], rcx
mov [rbx+8], rax
mov [rsp+88h+var_78], rcx
jmp loc_E5F38
loc_E5EB2:
lock inc dword ptr [rax+8]
loc_E5EB6:
lea r15, [rsp+88h+var_28]
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [r15+8], rax
lea rsi, asc_1236FF+1; "*"
lea rdi, [rsp+88h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
cmp eax, 1
mov eax, 4
sbb eax, 0
lea r9, [rsp+88h+var_54]
mov [r9], eax
lea r14, [rsp+88h+var_68+8]
mov qword ptr [r14-8], 0
lea rsi, [rsp+88h+var_68]
lea rdx, [rsp+88h+var_79]
lea rcx, [rsp+88h+var_30]
lea r8, [rsp+88h+var_78]
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIvEJNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
movaps xmm0, [rsp+88h+var_68]
xor eax, eax
mov qword ptr [rsp+88h+var_68+8], rax
movups xmmword ptr [rbx], xmm0
mov qword ptr [rsp+88h+var_68], rax
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E5F38:
lea rdi, [rsp+88h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E5F5D
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E5F5D:
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
loc_E5F6A:
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_E5E32
lea rdi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rsi, asc_1248C4; "\\*\\*?"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_E5E32
loc_E5FC1:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf_0; "Expected expr of 'expansion' expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_E604B
mov rbx, rax
jmp short loc_E6021
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_E6021
mov rbx, rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E6021:
lea rdi, [rsp+88h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_E6030
mov rbx, rax
loc_E6030:
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E604B
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E604B:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseExpansion(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
volatile signed __int32 *v3; // rax
__int128 v4; // xmm0
std::runtime_error *exception; // r14
char v7; // [rsp+Fh] [rbp-79h] BYREF
long long v8; // [rsp+10h] [rbp-78h] BYREF
volatile signed __int32 *v9; // [rsp+18h] [rbp-70h] BYREF
__int128 v10; // [rsp+20h] [rbp-68h] BYREF
int v11; // [rsp+34h] [rbp-54h]
void *v12[2]; // [rsp+38h] [rbp-50h] BYREF
long long v13; // [rsp+48h] [rbp-40h] BYREF
long long v14; // [rsp+58h] [rbp-30h] BYREF
volatile signed __int32 *v15[5]; // [rsp+60h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
(long long)"\\*\\*?",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v12,
(long long)a2,
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
1u);
minja::Parser::parseValueExpression((minja::Parser *)&v8);
if ( v12[1] )
{
if ( !v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v14 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v15[0] = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v15[1] = (volatile signed __int32 *)(a2[4] - a2[2]);
v11 = 4 - ((unsigned int)std::string::compare(v12, "*") == 0);
*(_QWORD *)&v10 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
(char *)&v10 + 8,
&v10,
&v7,
&v14,
&v8);
v4 = v10;
*((_QWORD *)&v10 + 1) = 0LL;
*(_OWORD *)this = v4;
*(_QWORD *)&v10 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v10 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v15);
}
else
{
*(_QWORD *)this = v8;
v3 = v9;
v9 = 0LL;
*((_QWORD *)this + 1) = v3;
v8 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v9);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
return this;
}
| parseExpansion:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x2689e0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001e5f6a
LAB_001e5e32:
LEA RDX,[0x2689c0]
LEA RDI,[RSP + 0x38]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001e245a
LAB_001e5e4b:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x001e6054
CMP qword ptr [RSP + 0x40],0x0
MOV RAX,qword ptr [RSP + 0x10]
JZ 0x001e5e95
TEST RAX,RAX
JZ 0x001e5fc1
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x60],RAX
TEST RAX,RAX
JZ 0x001e5eb6
MOV RCX,qword ptr [0x00265f98]
CMP byte ptr [RCX],0x0
JZ 0x001e5eb2
INC dword ptr [RAX + 0x8]
JMP 0x001e5eb6
LAB_001e5e95:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x18]
XOR ECX,ECX
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RSP + 0x10],RCX
JMP 0x001e5f38
LAB_001e5eb2:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001e5eb6:
LEA R15,[RSP + 0x60]
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [R15 + 0x8],RAX
LEA RSI,[0x223700]
LEA RDI,[RSP + 0x38]
CALL 0x00120fc0
CMP EAX,0x1
MOV EAX,0x4
SBB EAX,0x0
LEA R9,[RSP + 0x34]
MOV dword ptr [R9],EAX
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + -0x8],0x0
LAB_001e5ef8:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x58]
LEA R8,[RSP + 0x10]
MOV RDI,R14
CALL 0x001ef1b6
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,R14
CALL 0x0017416e
MOV RDI,R15
CALL 0x0017416e
LAB_001e5f38:
LEA RDI,[RSP + 0x18]
CALL 0x0017416e
LEA RAX,[RSP + 0x48]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001e5f5d
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00120180
LAB_001e5f5d:
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
LAB_001e5f6a:
LEA RDI,[0x2689e0]
CALL 0x001205d0
TEST EAX,EAX
JZ 0x001e5e32
LAB_001e5f7e:
LEA RDI,[0x2689c0]
LEA RSI,[0x2248c4]
MOV EDX,0x10
CALL 0x00169ac0
LAB_001e5f96:
LEA RDI,[0x169b6c]
LEA RSI,[0x2689c0]
LEA RDX,[0x266aa8]
CALL 0x00120f40
LEA RDI,[0x2689e0]
CALL 0x001209c0
JMP 0x001e5e32
LAB_001e5fc1:
MOV EDI,0x10
CALL 0x00120680
MOV R14,RAX
LAB_001e5fce:
LEA RSI,[0x2248ca]
MOV RDI,RAX
CALL 0x00120450
LAB_001e5fdd:
MOV RSI,qword ptr [0x00265fc0]
MOV RDX,qword ptr [0x00265f80]
MOV RDI,R14
CALL 0x00120ab0
|
/* minja::Parser::parseExpansion() */
void minja::Parser::parseExpansion(void)
{
long lVar1;
int iVar2;
runtime_error *this;
int8 *in_RSI;
long *in_RDI;
int1 local_79;
long local_78;
long local_70;
long local_68;
long lStack_60;
int local_54;
long *local_50;
long local_48;
long local_40 [2];
int8 local_30;
long local_28;
long local_20;
if (parseExpansion()::expansion_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseExpansion()::expansion_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 001e5f7e to 001e5f95 has its CatchHandler @ 001e5ff3 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpansion()::expansion_tok_abi_cxx11_,"\\*\\*?",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpansion()::expansion_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpansion()::expansion_tok_abi_cxx11_);
}
}
consumeToken(&local_50);
/* try { // try from 001e5e4b to 001e5e57 has its CatchHandler @ 001e602d */
parseValueExpression();
lVar1 = local_70;
if (local_48 == 0) {
*in_RDI = local_78;
local_70 = 0;
in_RDI[1] = lVar1;
local_78 = 0;
}
else {
if (local_78 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e5fce to 001e5fdc has its CatchHandler @ 001e6009 */
std::runtime_error::runtime_error(this,"Expected expr of \'expansion\' expression");
/* try { // try from 001e5fdd to 001e5ff2 has its CatchHandler @ 001e6004 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00265fc0,PTR__runtime_error_00265f80);
}
local_30 = *in_RSI;
local_28 = in_RSI[1];
if (local_28 != 0) {
if (*PTR___libc_single_threaded_00265f98 == '\0') {
LOCK();
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
}
}
local_20 = in_RSI[4] - in_RSI[2];
iVar2 = std::__cxx11::string::compare((char *)&local_50);
local_54 = 4 - (uint)(iVar2 == 0);
local_68 = 0;
/* try { // try from 001e5ef8 to 001e5f13 has its CatchHandler @ 001e6016 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_60,&local_68,&local_79,
&local_30,&local_78);
lVar1 = lStack_60;
lStack_60 = 0;
*in_RDI = local_68;
in_RDI[1] = lVar1;
local_68 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_28);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return;
}
| |
40,262 | my_readlink | eloqsql/mysys/my_symlink.c | int my_readlink(char *to, const char *filename, myf MyFlags)
{
#ifndef HAVE_READLINK
strmov(to,filename);
return 1;
#else
int result=0;
int length;
DBUG_ENTER("my_readlink");
if ((length=readlink(filename, to, FN_REFLEN-1)) < 0)
{
/* Don't give an error if this wasn't a symlink */
if ((my_errno=errno) == EINVAL)
{
result= 1;
strmov(to,filename);
}
else
{
if (MyFlags & MY_WME)
my_error(EE_CANT_READLINK, MYF(0), filename, errno);
result= -1;
}
}
else
to[length]=0;
DBUG_PRINT("exit" ,("result: %d", result));
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
} | O0 | c | my_readlink:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x3b330
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jge 0xbbed1
callq 0x3bb30
movl (%rax), %eax
movl %eax, -0x24(%rbp)
callq 0xbc9e0
movq %rax, %rcx
movl -0x24(%rbp), %eax
movl %eax, (%rcx)
cmpl $0x16, %eax
jne 0xbbe97
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3bb10
jmp 0xbbecf
movq -0x18(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0xbbec8
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x3bb30
movq -0x30(%rbp), %rdx
movl (%rax), %ecx
movl $0x18, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0xb4ed0
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0xbbedd
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0xbbedf
jmp 0xbbee1
jmp 0xbbee3
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_readlink:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
mov edx, 1FFh
call _readlink
mov [rbp+var_20], eax
cmp eax, 0
jge short loc_BBED1
call ___errno_location
mov eax, [rax]
mov [rbp+var_24], eax
call _my_thread_var
mov rcx, rax
mov eax, [rbp+var_24]
mov [rcx], eax
cmp eax, 16h
jnz short loc_BBE97
mov [rbp+var_1C], 1
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _stpcpy
jmp short loc_BBECF
loc_BBE97:
mov rax, [rbp+var_18]
and rax, 10h
cmp rax, 0
jz short loc_BBEC8
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
call ___errno_location
mov rdx, [rbp+var_30]
mov ecx, [rax]
mov edi, 18h
xor eax, eax
mov esi, eax
mov al, 0
call my_error
loc_BBEC8:
mov [rbp+var_1C], 0FFFFFFFFh
loc_BBECF:
jmp short loc_BBEDD
loc_BBED1:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_20]
mov byte ptr [rax+rcx], 0
loc_BBEDD:
jmp short $+2
loc_BBEDF:
jmp short $+2
loc_BBEE1:
jmp short $+2
loc_BBEE3:
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
add rsp, 40h
pop rbp
retn
| long long my_readlink(long long a1, long long a2, char a3)
{
unsigned int *v3; // rax
int v5; // [rsp+1Ch] [rbp-24h]
int v6; // [rsp+20h] [rbp-20h]
unsigned int v7; // [rsp+24h] [rbp-1Ch]
v7 = 0;
v6 = readlink(a2, a1, 511LL);
if ( v6 >= 0 )
{
*(_BYTE *)(a1 + v6) = 0;
}
else
{
v5 = *(_DWORD *)__errno_location(a2);
*(_DWORD *)my_thread_var() = v5;
if ( v5 == 22 )
{
v7 = 1;
stpcpy(a1, a2);
}
else
{
if ( (a3 & 0x10) != 0 )
{
v3 = (unsigned int *)__errno_location(a2);
my_error(0x18u, 0LL, a2, *v3);
}
return (unsigned int)-1;
}
}
return v7;
}
| my_readlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
MOV EDX,0x1ff
CALL 0x0013b330
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JGE 0x001bbed1
CALL 0x0013bb30
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
CALL 0x001bc9e0
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RCX],EAX
CMP EAX,0x16
JNZ 0x001bbe97
MOV dword ptr [RBP + -0x1c],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0013bb10
JMP 0x001bbecf
LAB_001bbe97:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001bbec8
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x0013bb30
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX]
MOV EDI,0x18
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x001b4ed0
LAB_001bbec8:
MOV dword ptr [RBP + -0x1c],0xffffffff
LAB_001bbecf:
JMP 0x001bbedd
LAB_001bbed1:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x20]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001bbedd:
JMP 0x001bbedf
LAB_001bbedf:
JMP 0x001bbee1
LAB_001bbee1:
JMP 0x001bbee3
LAB_001bbee3:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x40
POP RBP
RET
|
int4 my_readlink(char *param_1,char *param_2,ulong param_3)
{
int iVar1;
ssize_t sVar2;
int *piVar3;
int4 local_24;
local_24 = 0;
sVar2 = readlink(param_2,param_1,0x1ff);
if ((int)sVar2 < 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if (iVar1 == 0x16) {
local_24 = 1;
stpcpy(param_1,param_2);
}
else {
if ((param_3 & 0x10) != 0) {
piVar3 = __errno_location();
my_error(0x18,0,param_2,*piVar3);
}
local_24 = 0xffffffff;
}
}
else {
param_1[(int)sVar2] = '\0';
}
return local_24;
}
| |
40,263 | replace_strings | eloqsql/extra/replace.c | static uint replace_strings(REPLACE *rep, char **start, uint *max_length,
char *from)
{
reg1 REPLACE *rep_pos;
reg2 REPLACE_STRING *rep_str;
char *to, *end, *pos, *new;
end=(to= *start) + *max_length-1;
rep_pos=rep+1;
for(;;)
{
while (!rep_pos->found)
{
rep_pos= rep_pos->next[(uchar) *from];
if (to == end)
{
(*max_length)+=8192;
if (!(new=my_realloc(PSI_NOT_INSTRUMENTED, *start,*max_length,MYF(MY_WME))))
return (uint) -1;
to=new+(to - *start);
end=(*start=new)+ *max_length-1;
}
*to++= *from++;
}
if (!(rep_str = ((REPLACE_STRING*) rep_pos))->replace_string)
return (uint) (to - *start)-1;
updated=1; /* Some char * is replaced */
to-=rep_str->to_offset;
for (pos=rep_str->replace_string; *pos ; pos++)
{
if (to == end)
{
(*max_length)*=2;
if (!(new=my_realloc(PSI_NOT_INSTRUMENTED, *start,*max_length,MYF(MY_WME))))
return (uint) -1;
to=new+(to - *start);
end=(*start=new)+ *max_length-1;
}
*to++= *pos;
}
if (!*(from-=rep_str->from_offset) && rep_pos->found != 2)
return (uint) (to - *start);
rep_pos=rep;
}
} | O0 | c | replace_strings:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
addq $0x808, %rax # imm = 0x808
movq %rax, -0x30(%rbp)
jmp 0x272e4
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x272f9
jmp 0x273b2
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rcx), %ecx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x2738b
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x2000, %ecx # imm = 0x2000
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
xorl %edi, %edi
movl $0x10, %ecx
callq 0x29c00
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0x27356
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27509
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
jmp 0x272e4
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0x273da
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x27509
movl $0x1, 0x36136c(%rip) # 0x388750
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpb $0x0, (%rax)
je 0x274ba
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x27492
movq -0x20(%rbp), %rax
movl (%rax), %ecx
shll %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
xorl %edi, %edi
movl $0x10, %ecx
callq 0x29c00
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0x2745d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27509
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x58(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2740b
movq -0x38(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
movq %rax, %rdx
addq %rcx, %rdx
movq %rdx, -0x28(%rbp)
cmpb $0x0, (%rax,%rcx)
jne 0x274fc
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x274fc
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x4(%rbp)
jmp 0x27509
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x272e2
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| replace_strings:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_40], rax
mov rcx, [rbp+var_20]
mov ecx, [rcx]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
add rax, 808h
mov [rbp+var_30], rax
loc_272E2:
jmp short $+2
loc_272E4:
mov rax, [rbp+var_30]
cmp byte ptr [rax], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_272F9
jmp loc_273B2
loc_272F9:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_28]
movzx ecx, byte ptr [rcx]
mov rax, [rax+rcx*8+8]
mov [rbp+var_30], rax
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jnz short loc_2738B
mov rax, [rbp+var_20]
mov ecx, [rax]
add ecx, 2000h
mov [rax], ecx
mov rax, [rbp+var_18]
mov rsi, [rax]
mov rax, [rbp+var_20]
mov eax, [rax]
mov edx, eax
xor edi, edi
mov ecx, 10h
call my_realloc
mov [rbp+var_58], rax
cmp rax, 0
jnz short loc_27356
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_27509
loc_27356:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
mov rdx, [rbp+var_18]
mov rdx, [rdx]
sub rcx, rdx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_18]
mov [rcx], rax
mov rcx, [rbp+var_20]
mov ecx, [rcx]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_48], rax
loc_2738B:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov cl, [rax]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 1
mov [rbp+var_40], rdx
mov [rax], cl
jmp loc_272E4
loc_273B2:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
cmp qword ptr [rax+8], 0
jnz short loc_273DA
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
sub rax, rcx
sub eax, 1
mov [rbp+var_4], eax
jmp loc_27509
loc_273DA:
mov cs:updated, 1
mov rax, [rbp+var_38]
mov ecx, [rax+10h]
mov rax, [rbp+var_40]
mov ecx, ecx
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_50], rax
loc_2740B:
mov rax, [rbp+var_50]
cmp byte ptr [rax], 0
jz loc_274BA
mov rax, [rbp+var_40]
cmp rax, [rbp+var_48]
jnz short loc_27492
mov rax, [rbp+var_20]
mov ecx, [rax]
shl ecx, 1
mov [rax], ecx
mov rax, [rbp+var_18]
mov rsi, [rax]
mov rax, [rbp+var_20]
mov eax, [rax]
mov edx, eax
xor edi, edi
mov ecx, 10h
call my_realloc
mov [rbp+var_58], rax
cmp rax, 0
jnz short loc_2745D
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_27509
loc_2745D:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_40]
mov rdx, [rbp+var_18]
mov rdx, [rdx]
sub rcx, rdx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_18]
mov [rcx], rax
mov rcx, [rbp+var_20]
mov ecx, [rcx]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_48], rax
loc_27492:
mov rax, [rbp+var_50]
mov cl, [rax]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 1
mov [rbp+var_40], rdx
mov [rax], cl
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp loc_2740B
loc_274BA:
mov rax, [rbp+var_38]
mov ecx, [rax+14h]
mov rax, [rbp+var_28]
movsxd rdx, ecx
xor ecx, ecx
sub rcx, rdx
mov rdx, rax
add rdx, rcx
mov [rbp+var_28], rdx
cmp byte ptr [rax+rcx], 0
jnz short loc_274FC
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_274FC
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
sub rax, rcx
mov [rbp+var_4], eax
jmp short loc_27509
loc_274FC:
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
jmp loc_272E2
loc_27509:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long replace_strings(long long a1, long long *a2, _DWORD *a3, unsigned __int8 *a4)
{
unsigned __int8 *v4; // rax
unsigned __int8 v5; // cl
unsigned __int8 *v6; // rax
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // rax
long long v10; // [rsp+8h] [rbp-58h]
long long v11; // [rsp+8h] [rbp-58h]
unsigned __int8 *j; // [rsp+10h] [rbp-50h]
long long v13; // [rsp+18h] [rbp-48h]
unsigned __int8 *v14; // [rsp+20h] [rbp-40h]
long long i; // [rsp+30h] [rbp-30h]
v14 = (unsigned __int8 *)*a2;
v13 = (unsigned int)*a3 + *a2 - 1;
for ( i = a1 + 2056; ; i = a1 )
{
while ( !*(_BYTE *)i )
{
i = *(_QWORD *)(i + 8LL * *a4 + 8);
if ( v14 == (unsigned __int8 *)v13 )
{
*a3 += 0x2000;
v10 = my_realloc(0LL, *a2, (unsigned int)*a3, 16LL);
if ( !v10 )
return (unsigned int)-1;
v14 = &v14[v10 - *a2];
*a2 = v10;
v13 = (unsigned int)*a3 + v10 - 1;
}
v4 = a4++;
v5 = *v4;
v6 = v14++;
*v6 = v5;
}
if ( !*(_QWORD *)(i + 8) )
return (unsigned int)((_DWORD)v14 - *a2 - 1);
updated = 1;
v14 -= *(unsigned int *)(i + 16);
for ( j = *(unsigned __int8 **)(i + 8); *j; ++j )
{
if ( v14 == (unsigned __int8 *)v13 )
{
*a3 *= 2;
v11 = my_realloc(0LL, *a2, (unsigned int)*a3, 16LL);
if ( !v11 )
return (unsigned int)-1;
v14 = &v14[v11 - *a2];
*a2 = v11;
v13 = (unsigned int)*a3 + v11 - 1;
}
v7 = v14++;
*v7 = *j;
}
v8 = a4;
a4 -= *(int *)(i + 20);
if ( !v8[-*(int *)(i + 20)] && *(_BYTE *)i != 2 )
break;
}
return (unsigned int)((_DWORD)v14 - *(_DWORD *)a2);
}
| replace_strings:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX]
ADD RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x808
MOV qword ptr [RBP + -0x30],RAX
LAB_001272e2:
JMP 0x001272e4
LAB_001272e4:
MOV RAX,qword ptr [RBP + -0x30]
CMP byte ptr [RAX],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001272f9
JMP 0x001273b2
LAB_001272f9:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x0012738b
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX]
ADD ECX,0x2000
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV EDX,EAX
XOR EDI,EDI
MOV ECX,0x10
CALL 0x00129c00
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JNZ 0x00127356
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00127509
LAB_00127356:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX]
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX]
ADD RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x48],RAX
LAB_0012738b:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x40],RDX
MOV byte ptr [RAX],CL
JMP 0x001272e4
LAB_001273b2:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x001273da
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
SUB EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00127509
LAB_001273da:
MOV dword ptr [0x00488750],0x1
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,ECX
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x50],RAX
LAB_0012740b:
MOV RAX,qword ptr [RBP + -0x50]
CMP byte ptr [RAX],0x0
JZ 0x001274ba
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x00127492
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX]
SHL ECX,0x1
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV EDX,EAX
XOR EDI,EDI
MOV ECX,0x10
CALL 0x00129c00
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JNZ 0x0012745d
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00127509
LAB_0012745d:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX]
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX]
ADD RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x48],RAX
LAB_00127492:
MOV RAX,qword ptr [RBP + -0x50]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x40],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0012740b
LAB_001274ba:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RDX,ECX
XOR ECX,ECX
SUB RCX,RDX
MOV RDX,RAX
ADD RDX,RCX
MOV qword ptr [RBP + -0x28],RDX
CMP byte ptr [RAX + RCX*0x1],0x0
JNZ 0x001274fc
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001274fc
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00127509
LAB_001274fc:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001272e2
LAB_00127509:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int replace_strings(char *param_1,long *param_2,uint *param_3,byte *param_4)
{
byte *pbVar1;
char *pcVar2;
long lVar3;
byte *pbVar4;
byte *local_58;
byte *local_50;
byte *local_48;
char *local_38;
byte *local_30;
local_48 = (byte *)*param_2;
local_50 = local_48 + ((ulong)*param_3 - 1);
pcVar2 = param_1 + 0x808;
local_30 = param_4;
do {
while (local_38 = pcVar2, *local_38 == '\0') {
pcVar2 = *(char **)(local_38 + (ulong)*local_30 * 8 + 8);
if (local_48 == local_50) {
*param_3 = *param_3 + 0x2000;
lVar3 = my_realloc(0,*param_2,*param_3,0x10);
if (lVar3 == 0) {
return -1;
}
local_48 = local_48 + (lVar3 - *param_2);
*param_2 = lVar3;
local_50 = (byte *)(lVar3 + (ulong)*param_3 + -1);
}
*local_48 = *local_30;
local_48 = local_48 + 1;
local_30 = local_30 + 1;
}
if (*(long *)(local_38 + 8) == 0) {
return ((int)local_48 - (int)*param_2) + -1;
}
updated = 1;
local_48 = local_48 + -(ulong)*(uint *)(local_38 + 0x10);
for (local_58 = *(byte **)(local_38 + 8); *local_58 != 0; local_58 = local_58 + 1) {
if (local_48 == local_50) {
*param_3 = *param_3 << 1;
lVar3 = my_realloc(0,*param_2,*param_3,0x10);
if (lVar3 == 0) {
return -1;
}
local_48 = local_48 + (lVar3 - *param_2);
*param_2 = lVar3;
local_50 = (byte *)(lVar3 + (ulong)*param_3 + -1);
}
*local_48 = *local_58;
local_48 = local_48 + 1;
}
pbVar4 = local_30 + -(long)*(int *)(local_38 + 0x14);
pbVar1 = local_30 + -(long)*(int *)(local_38 + 0x14);
pcVar2 = param_1;
local_30 = pbVar4;
} while ((*pbVar1 != 0) || (pcVar2 = param_1, *local_38 == '\x02'));
return (int)local_48 - (int)*param_2;
}
| |
40,264 | my_instr_simple | eloqsql/strings/ctype-simple.c | uint my_instr_simple(CHARSET_INFO *cs,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const uchar *str, *search, *end, *search_end;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
str= (const uchar*) b;
search= (const uchar*) s;
end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) s + s_length;
skip:
while (str != end)
{
if (cs->sort_order[*str++] == cs->sort_order[*search])
{
register const uchar *i,*j;
i= str;
j= search+1;
while (j != search_end)
if (cs->sort_order[*i++] != cs->sort_order[*j++])
goto skip;
if (nmatch > 0)
{
match[0].beg= 0;
match[0].end= (uint) (str- (const uchar*)b-1);
match[0].mb_len= match[0].end;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= match[1].end-match[1].beg;
}
}
return 2;
}
}
}
return 0;
} | O0 | c | my_instr_simple:
pushq %rbp
movq %rsp, %rbp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x127f7e
cmpq $0x0, -0x30(%rbp)
jne 0x127e16
cmpl $0x0, 0x10(%rbp)
je 0x127e0a
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x127f85
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
xorl %ecx, %ecx
subq -0x30(%rbp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x127e4d
movq -0x40(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x127f7c
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x40(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq -0x48(%rbp), %rdx
movzbl (%rdx), %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x127f77
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x127ef9
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x60(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq -0x68(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x68(%rbp)
movzbl (%rdx), %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x127ef7
jmp 0x127e4b
jmp 0x127ea8
cmpl $0x0, 0x10(%rbp)
jbe 0x127f6e
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x1, 0x10(%rbp)
jbe 0x127f6c
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
addq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x38(%rbp), %rax
subl 0xc(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x127f6e
movl $0x2, -0x4(%rbp)
jmp 0x127f85
jmp 0x127e4d
jmp 0x127f7e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_instr_simple:
push rbp
mov rbp, rsp
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_38], r9
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
ja loc_127F7E
cmp [rbp+var_30], 0
jnz short loc_127E16
cmp [rbp+arg_0], 0
jz short loc_127E0A
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+4], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+8], 0
loc_127E0A:
mov [rbp+var_4], 1
jmp loc_127F85
loc_127E16:
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
xor ecx, ecx
sub rcx, [rbp+var_30]
add rax, rcx
add rax, 1
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_58], rax
loc_127E4B:
jmp short $+2
loc_127E4D:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_50]
jz loc_127F7C
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov rcx, [rbp+var_40]
mov rdx, rcx
add rdx, 1
mov [rbp+var_40], rdx
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_10]
mov rcx, [rcx+58h]
mov rdx, [rbp+var_48]
movzx edx, byte ptr [rdx]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jnz loc_127F77
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_68], rax
loc_127EA8:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_58]
jz short loc_127EF9
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov rcx, [rbp+var_60]
mov rdx, rcx
add rdx, 1
mov [rbp+var_60], rdx
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_10]
mov rcx, [rcx+58h]
mov rdx, [rbp+var_68]
mov rsi, rdx
add rsi, 1
mov [rbp+var_68], rsi
movzx edx, byte ptr [rdx]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_127EF7
jmp loc_127E4B
loc_127EF7:
jmp short loc_127EA8
loc_127EF9:
cmp [rbp+arg_0], 0
jbe short loc_127F6E
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
sub rax, rcx
sub rax, 1
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+4], ecx
mov rax, [rbp+var_38]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
mov [rax+8], ecx
cmp [rbp+arg_0], 1
jbe short loc_127F6C
mov rax, [rbp+var_38]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
mov [rax+0Ch], ecx
mov rax, [rbp+var_38]
mov eax, [rax+4]
add rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+10h], ecx
mov rax, [rbp+var_38]
mov ecx, [rax+10h]
mov rax, [rbp+var_38]
sub ecx, [rax+0Ch]
mov rax, [rbp+var_38]
mov [rax+14h], ecx
loc_127F6C:
jmp short $+2
loc_127F6E:
mov [rbp+var_4], 2
jmp short loc_127F85
loc_127F77:
jmp loc_127E4D
loc_127F7C:
jmp short $+2
loc_127F7E:
mov [rbp+var_4], 0
loc_127F85:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_instr_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
_DWORD *a6,
unsigned int a7)
{
unsigned __int8 *v7; // rcx
unsigned __int8 *v8; // rcx
unsigned __int8 *v9; // rdx
unsigned __int8 *v11; // [rsp+0h] [rbp-68h]
unsigned __int8 *v12; // [rsp+8h] [rbp-60h]
unsigned __int8 *v13; // [rsp+10h] [rbp-58h]
long long v14; // [rsp+18h] [rbp-50h]
unsigned __int8 *v15; // [rsp+28h] [rbp-40h]
if ( a5 > a3 )
return 0;
if ( a5 )
{
v15 = a2;
v14 = (long long)&a2[a3 - a5 + 1];
v13 = &a4[a5];
LABEL_7:
while ( v15 != (unsigned __int8 *)v14 )
{
v7 = v15++;
if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v7) == *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *a4) )
{
v12 = v15;
v11 = a4 + 1;
while ( v11 != v13 )
{
v8 = v12++;
v9 = v11++;
if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v8) != *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v9) )
goto LABEL_7;
}
if ( a7 )
{
*a6 = 0;
a6[1] = (_DWORD)v15 - (_DWORD)a2 - 1;
a6[2] = a6[1];
if ( a7 > 1 )
{
a6[3] = a6[1];
a6[4] = a5 + a6[1];
a6[5] = a6[4] - a6[3];
}
}
return 2;
}
}
return 0;
}
if ( a7 )
{
*a6 = 0;
a6[1] = 0;
a6[2] = 0;
}
return 1;
}
| |||
40,265 | my_instr_simple | eloqsql/strings/ctype-simple.c | uint my_instr_simple(CHARSET_INFO *cs,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const uchar *str, *search, *end, *search_end;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
str= (const uchar*) b;
search= (const uchar*) s;
end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) s + s_length;
skip:
while (str != end)
{
if (cs->sort_order[*str++] == cs->sort_order[*search])
{
register const uchar *i,*j;
i= str;
j= search+1;
while (j != search_end)
if (cs->sort_order[*i++] != cs->sort_order[*j++])
goto skip;
if (nmatch > 0)
{
match[0].beg= 0;
match[0].end= (uint) (str- (const uchar*)b-1);
match[0].mb_len= match[0].end;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= match[1].end-match[1].beg;
}
}
return 2;
}
}
}
return 0;
} | O3 | c | my_instr_simple:
xorl %eax, %eax
cmpq %rdx, %r8
ja 0xbeb48
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x10(%rbp), %r11d
testq %r8, %r8
je 0xbeb0e
addq %rsi, %rdx
subq %r8, %rdx
incq %rdx
movq %rsi, %r10
cmpq %rdx, %r10
je 0xbeb3e
movq %r10, %rbx
movq 0x58(%rdi), %r14
incq %r10
movzbl (%rbx), %r15d
movb (%r14,%r15), %r15b
movzbl (%rcx), %r12d
cmpb (%r14,%r12), %r15b
jne 0xbea8e
movl $0x1, %r15d
cmpq %r15, %r8
je 0xbead7
movzbl (%rbx,%r15), %r12d
movb (%r14,%r12), %r12b
movzbl (%rcx,%r15), %r13d
incq %r15
cmpb (%r14,%r13), %r12b
je 0xbeab9
jmp 0xbea8e
movl $0x2, %eax
testl %r11d, %r11d
je 0xbeb3e
movl $0x0, (%r9)
notl %esi
addl %esi, %r10d
movl %r10d, 0x4(%r9)
movl %r10d, 0x8(%r9)
cmpl $0x1, %r11d
je 0xbeb3e
movl %r10d, 0xc(%r9)
addl %r8d, %r10d
movl $0x14, %ecx
movl $0x10, %edx
jmp 0xbeb2f
testl %r11d, %r11d
je 0xbeb39
movl $0x0, (%r9)
movl $0x1, %eax
movl $0x8, %ecx
xorl %r10d, %r10d
movl $0x4, %edx
xorl %r8d, %r8d
movl %r10d, (%r9,%rdx)
movl %r8d, (%r9,%rcx)
jmp 0xbeb3e
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_instr_simple:
xor eax, eax
cmp r8, rdx
ja locret_BEB48
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov r11d, [rbp+10h]
test r8, r8
jz loc_BEB0E
add rdx, rsi
sub rdx, r8
inc rdx
mov r10, rsi
loc_BEA8E:
cmp r10, rdx
jz loc_BEB3E
mov rbx, r10
mov r14, [rdi+58h]
inc r10
movzx r15d, byte ptr [rbx]
mov r15b, [r14+r15]
movzx r12d, byte ptr [rcx]
cmp r15b, [r14+r12]
jnz short loc_BEA8E
mov r15d, 1
loc_BEAB9:
cmp r8, r15
jz short loc_BEAD7
movzx r12d, byte ptr [rbx+r15]
mov r12b, [r14+r12]
movzx r13d, byte ptr [rcx+r15]
inc r15
cmp r12b, [r14+r13]
jz short loc_BEAB9
jmp short loc_BEA8E
loc_BEAD7:
mov eax, 2
test r11d, r11d
jz short loc_BEB3E
mov dword ptr [r9], 0
not esi
add r10d, esi
mov [r9+4], r10d
mov [r9+8], r10d
cmp r11d, 1
jz short loc_BEB3E
mov [r9+0Ch], r10d
add r10d, r8d
mov ecx, 14h
mov edx, 10h
jmp short loc_BEB2F
loc_BEB0E:
test r11d, r11d
jz short loc_BEB39
mov dword ptr [r9], 0
mov eax, 1
mov ecx, 8
xor r10d, r10d
mov edx, 4
xor r8d, r8d
loc_BEB2F:
mov [r9+rdx], r10d
mov [r9+rcx], r8d
jmp short loc_BEB3E
loc_BEB39:
mov eax, 1
loc_BEB3E:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_BEB48:
retn
| long long my_instr_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
_DWORD *a6,
int a7)
{
long long result; // rax
long long v8; // rdx
unsigned __int8 *v9; // r10
unsigned __int8 *v10; // rbx
long long v11; // r14
long long v12; // r15
char v13; // r12
long long v14; // r13
int v15; // r10d
int v16; // r10d
long long v17; // rcx
long long v18; // rdx
result = 0LL;
if ( a5 <= a3 )
{
if ( a5 )
{
v8 = (long long)&a2[a3 - a5 + 1];
v9 = a2;
LABEL_4:
while ( v9 != (unsigned __int8 *)v8 )
{
v10 = v9;
v11 = *(_QWORD *)(a1 + 88);
++v9;
if ( *(_BYTE *)(v11 + *v10) == *(_BYTE *)(v11 + *a4) )
{
v12 = 1LL;
while ( a5 != v12 )
{
v13 = *(_BYTE *)(v11 + v10[v12]);
v14 = a4[v12++];
if ( v13 != *(_BYTE *)(v11 + v14) )
goto LABEL_4;
}
result = 2LL;
if ( a7 )
{
*a6 = 0;
v15 = ~(_DWORD)a2 + (_DWORD)v9;
a6[1] = v15;
a6[2] = v15;
if ( a7 != 1 )
{
a6[3] = v15;
v16 = a5 + v15;
v17 = 5LL;
v18 = 4LL;
goto LABEL_15;
}
}
return result;
}
}
}
else if ( a7 )
{
*a6 = 0;
result = 1LL;
v17 = 2LL;
v16 = 0;
v18 = 1LL;
LODWORD(a5) = 0;
LABEL_15:
a6[v18] = v16;
a6[v17] = a5;
}
else
{
return 1LL;
}
}
return result;
}
| my_instr_simple:
XOR EAX,EAX
CMP R8,RDX
JA 0x001beb48
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R11D,dword ptr [RBP + 0x10]
TEST R8,R8
JZ 0x001beb0e
ADD RDX,RSI
SUB RDX,R8
INC RDX
MOV R10,RSI
LAB_001bea8e:
CMP R10,RDX
JZ 0x001beb3e
MOV RBX,R10
MOV R14,qword ptr [RDI + 0x58]
INC R10
MOVZX R15D,byte ptr [RBX]
MOV R15B,byte ptr [R14 + R15*0x1]
MOVZX R12D,byte ptr [RCX]
CMP R15B,byte ptr [R14 + R12*0x1]
JNZ 0x001bea8e
MOV R15D,0x1
LAB_001beab9:
CMP R8,R15
JZ 0x001bead7
MOVZX R12D,byte ptr [RBX + R15*0x1]
MOV R12B,byte ptr [R14 + R12*0x1]
MOVZX R13D,byte ptr [RCX + R15*0x1]
INC R15
CMP R12B,byte ptr [R14 + R13*0x1]
JZ 0x001beab9
JMP 0x001bea8e
LAB_001bead7:
MOV EAX,0x2
TEST R11D,R11D
JZ 0x001beb3e
MOV dword ptr [R9],0x0
NOT ESI
ADD R10D,ESI
MOV dword ptr [R9 + 0x4],R10D
MOV dword ptr [R9 + 0x8],R10D
CMP R11D,0x1
JZ 0x001beb3e
MOV dword ptr [R9 + 0xc],R10D
ADD R10D,R8D
MOV ECX,0x14
MOV EDX,0x10
JMP 0x001beb2f
LAB_001beb0e:
TEST R11D,R11D
JZ 0x001beb39
MOV dword ptr [R9],0x0
MOV EAX,0x1
MOV ECX,0x8
XOR R10D,R10D
MOV EDX,0x4
XOR R8D,R8D
LAB_001beb2f:
MOV dword ptr [R9 + RDX*0x1],R10D
MOV dword ptr [R9 + RCX*0x1],R8D
JMP 0x001beb3e
LAB_001beb39:
MOV EAX,0x1
LAB_001beb3e:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_001beb48:
RET
|
int8
my_instr_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5,
int4 *param_6,int param_7)
{
byte *pbVar1;
byte *pbVar2;
int8 uVar3;
long lVar4;
long lVar5;
int iVar6;
byte *pbVar7;
byte *pbVar8;
ulong uVar9;
uVar3 = 0;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 == 0) {
uVar3 = 1;
}
else {
*param_6 = 0;
uVar3 = 1;
lVar4 = 8;
iVar6 = 0;
lVar5 = 4;
param_5 = 0;
LAB_001beb2f:
*(int *)((long)param_6 + lVar5) = iVar6;
*(int *)((long)param_6 + lVar4) = (int)param_5;
}
}
else {
pbVar8 = param_2;
while (pbVar7 = pbVar8, pbVar7 != param_2 + (param_3 - param_5) + 1) {
lVar4 = *(long *)(param_1 + 0x58);
pbVar8 = pbVar7 + 1;
if (*(char *)(lVar4 + (ulong)*pbVar7) == *(char *)(lVar4 + (ulong)*param_4)) {
uVar9 = 1;
do {
if (param_5 == uVar9) {
uVar3 = 2;
if (param_7 == 0) {
return 2;
}
*param_6 = 0;
iVar6 = (int)pbVar8 + ~(uint)param_2;
param_6[1] = iVar6;
param_6[2] = iVar6;
if (param_7 == 1) {
return 2;
}
param_6[3] = iVar6;
iVar6 = iVar6 + (int)param_5;
lVar4 = 0x14;
lVar5 = 0x10;
goto LAB_001beb2f;
}
pbVar1 = pbVar7 + uVar9;
pbVar2 = param_4 + uVar9;
uVar9 = uVar9 + 1;
} while (*(char *)(lVar4 + (ulong)*pbVar1) == *(char *)(lVar4 + (ulong)*pbVar2));
}
}
}
}
return uVar3;
}
| |
40,266 | stbi__jpeg_test | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__jpeg_test(stbi__context *s)
{
int r;
stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg));
if (!j) return stbi__err("outofmem", "Out of memory");
memset(j, 0, sizeof(stbi__jpeg));
j->s = s;
stbi__setup_jpeg(j);
r = stbi__decode_jpeg_header(j, STBI__SCAN_type);
stbi__rewind(s);
STBI_FREE(j);
return r;
} | O1 | c | stbi__jpeg_test:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x4888, %edi # imm = 0x4888
callq 0xa400
testq %rax, %rax
je 0x3271e
movq %rax, %r14
movl $0x4888, %edx # imm = 0x4888
movq %rax, %rdi
xorl %esi, %esi
callq 0xa1e0
movq %rbx, (%r14)
leaq 0x4d51(%rip), %rax # 0x373ee
movq %rax, 0x4870(%r14)
leaq 0x54ac(%rip), %rax # 0x37b57
movq %rax, 0x4878(%r14)
leaq 0x569e(%rip), %rax # 0x37d57
movq %rax, 0x4880(%r14)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rax, 0x4848(%r14)
movb $-0x1, 0x4828(%r14)
movq %r14, %rdi
callq 0x37eec
movl $0x1, %ebp
cmpb $-0x28, %al
je 0x32706
movq %fs:0x0, %rax
leaq 0x15972(%rip), %rcx # 0x4806f
movq %rcx, -0x8(%rax)
xorl %ebp, %ebp
movups 0xd0(%rbx), %xmm0
movups %xmm0, 0xc0(%rbx)
movq %r14, %rdi
callq 0xa648
jmp 0x3273a
movq %fs:0x0, %rax
leaq 0x15472(%rip), %rcx # 0x47ba3
movq %rcx, -0x8(%rax)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
| stbi__jpeg_test:
push rbp
push r14
push rbx
mov rbx, rdi
mov edi, 4888h
call _malloc
test rax, rax
jz loc_3271E
mov r14, rax
mov edx, 4888h
mov rdi, rax
xor esi, esi
call _memset
mov [r14], rbx
lea rax, stbi__idct_simd
mov [r14+4870h], rax
lea rax, stbi__YCbCr_to_RGB_simd
mov [r14+4878h], rax
lea rax, stbi__resample_row_hv_2_simd
mov [r14+4880h], rax
mov rax, 0FFFFFFFF00000000h
mov [r14+4848h], rax
mov byte ptr [r14+4828h], 0FFh
mov rdi, r14
call stbi__get_marker
mov ebp, 1
cmp al, 0D8h
jz short loc_32706
mov rax, fs:0
lea rcx, aNoSoi; "no SOI"
mov [rax-8], rcx
xor ebp, ebp
loc_32706:
movups xmm0, xmmword ptr [rbx+0D0h]
movups xmmword ptr [rbx+0C0h], xmm0
mov rdi, r14
call free
jmp short loc_3273A
loc_3271E:
mov rax, fs:0
lea rcx, aOutofmem; "outofmem"
mov [rax-8], rcx
xor ebp, ebp
loc_3273A:
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
| long long stbi__jpeg_test(long long a1)
{
long long v1; // rax
long long v2; // r14
unsigned int v3; // ebp
v1 = malloc(18568LL);
if ( v1 )
{
v2 = v1;
memset(v1, 0LL, 18568LL);
*(_QWORD *)v2 = a1;
*(_QWORD *)(v2 + 18544) = stbi__idct_simd;
*(_QWORD *)(v2 + 18552) = stbi__YCbCr_to_RGB_simd;
*(_QWORD *)(v2 + 18560) = stbi__resample_row_hv_2_simd;
*(_QWORD *)(v2 + 18504) = 0xFFFFFFFF00000000LL;
*(_BYTE *)(v2 + 18472) = -1;
v3 = 1;
if ( (unsigned __int8)stbi__get_marker(v2) != 0xD8 )
{
*(_QWORD *)(__readfsqword(0) - 8) = "no SOI";
v3 = 0;
}
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
free(v2);
}
else
{
*(_QWORD *)(__readfsqword(0) - 8) = "outofmem";
return 0;
}
return v3;
}
| stbi__jpeg_test:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EDI,0x4888
CALL 0x0010a400
TEST RAX,RAX
JZ 0x0013271e
MOV R14,RAX
MOV EDX,0x4888
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010a1e0
MOV qword ptr [R14],RBX
LEA RAX,[0x1373ee]
MOV qword ptr [R14 + 0x4870],RAX
LEA RAX,[0x137b57]
MOV qword ptr [R14 + 0x4878],RAX
LEA RAX,[0x137d57]
MOV qword ptr [R14 + 0x4880],RAX
MOV RAX,-0x100000000
MOV qword ptr [R14 + 0x4848],RAX
MOV byte ptr [R14 + 0x4828],0xff
MOV RDI,R14
CALL 0x00137eec
MOV EBP,0x1
CMP AL,0xd8
JZ 0x00132706
MOV RAX,qword ptr FS:[0x0]
LEA RCX,[0x14806f]
MOV qword ptr [RAX + -0x8],RCX
XOR EBP,EBP
LAB_00132706:
MOVUPS XMM0,xmmword ptr [RBX + 0xd0]
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
MOV RDI,R14
CALL 0x0010a648
JMP 0x0013273a
LAB_0013271e:
MOV RAX,qword ptr FS:[0x0]
LEA RCX,[0x147ba3]
MOV qword ptr [RAX + -0x8],RCX
XOR EBP,EBP
LAB_0013273a:
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
|
bool stbi__jpeg_test(long param_1)
{
char cVar1;
long *__s;
long *in_FS_OFFSET;
bool bVar2;
__s = (long *)malloc(0x4888);
if (__s == (long *)0x0) {
*(char **)(*in_FS_OFFSET + -8) = "outofmem";
bVar2 = false;
}
else {
memset(__s,0,0x4888);
*__s = param_1;
__s[0x90e] = (long)stbi__idct_simd;
__s[0x90f] = (long)stbi__YCbCr_to_RGB_simd;
__s[0x910] = (long)stbi__resample_row_hv_2_simd;
__s[0x909] = -0x100000000;
*(int1 *)(__s + 0x905) = 0xff;
cVar1 = stbi__get_marker(__s);
bVar2 = cVar1 == -0x28;
if (!bVar2) {
*(char **)(*in_FS_OFFSET + -8) = "no SOI";
}
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
free(__s);
}
return bVar2;
}
| |
40,267 | mi_read_key_record | eloqsql/storage/myisam/mi_key.c | int _mi_read_key_record(MI_INFO *info, my_off_t filepos, uchar *buf)
{
fast_mi_writeinfo(info);
if (filepos != HA_OFFSET_ERROR)
{
if (info->lastinx >= 0)
{ /* Read only key */
if (_mi_put_key_in_record(info,(uint) info->lastinx, TRUE, buf))
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
return -1;
}
info->update|= HA_STATE_AKTIV; /* We should find a record */
return 0;
}
my_errno=HA_ERR_WRONG_INDEX;
}
return(-1); /* Wrong data to read */
} | O0 | c | mi_read_key_record:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x368(%rax)
jne 0x3746f
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x392e0
cmpq $-0x1, -0x18(%rbp)
je 0x374fb
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1d4(%rax)
jl 0x374f0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1d4(%rax), %esi
movq -0x20(%rbp), %rcx
movl $0x1, %edx
callq 0x37510
cmpl $0x0, %eax
je 0x374d4
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x36600
callq 0x82cc0
movl $0x7e, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x37502
movq -0x10(%rbp), %rax
movl 0x1d0(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x1d0(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x37502
callq 0x82cc0
movl $0x7c, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _mi_read_key_record:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+368h], 0
jnz short loc_3746F
mov rdi, [rbp+var_10]
xor esi, esi
call _mi_writeinfo
loc_3746F:
cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh
jz loc_374FB
mov rax, [rbp+var_10]
cmp dword ptr [rax+1D4h], 0
jl short loc_374F0
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov esi, [rax+1D4h]
mov rcx, [rbp+var_20]
mov edx, 1
call _mi_put_key_in_record
cmp eax, 0
jz short loc_374D4
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_37502
loc_374D4:
mov rax, [rbp+var_10]
mov ecx, [rax+1D0h]
or ecx, 2
mov [rax+1D0h], ecx
mov [rbp+var_4], 0
jmp short loc_37502
loc_374F0:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
loc_374FB:
mov [rbp+var_4], 0FFFFFFFFh
loc_37502:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long mi_read_key_record(int *a1, const char *a2, long long a3)
{
const char *v3; // rsi
const char *v6; // [rsp+8h] [rbp-18h]
v6 = a2;
if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) )
{
a2 = 0LL;
mi_writeinfo(a1, 0LL);
}
if ( v6 == (const char *)-1LL )
return (unsigned int)-1;
if ( a1[117] < 0 )
{
*(_DWORD *)my_thread_var(a1, a2) = 124;
return (unsigned int)-1;
}
if ( (unsigned int)mi_put_key_in_record(a1, (unsigned int)a1[117], 1LL, a3) )
{
v3 = *(const char **)(*(_QWORD *)a1 + 616LL);
mi_report_error(126, (long long)v3);
*(_DWORD *)my_thread_var(126LL, v3) = 126;
return (unsigned int)-1;
}
else
{
a1[116] |= 2u;
return 0;
}
}
| _mi_read_key_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x0013746f
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x001392e0
LAB_0013746f:
CMP qword ptr [RBP + -0x18],-0x1
JZ 0x001374fb
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x1d4],0x0
JL 0x001374f0
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x1d4]
MOV RCX,qword ptr [RBP + -0x20]
MOV EDX,0x1
CALL 0x00137510
CMP EAX,0x0
JZ 0x001374d4
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x00136600
CALL 0x00182cc0
MOV dword ptr [RAX],0x7e
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00137502
LAB_001374d4:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1d0]
OR ECX,0x2
MOV dword ptr [RAX + 0x1d0],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00137502
LAB_001374f0:
CALL 0x00182cc0
MOV dword ptr [RAX],0x7c
LAB_001374fb:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_00137502:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 _mi_read_key_record(long *param_1,long param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
if (param_2 != -1) {
if (-1 < *(int *)((long)param_1 + 0x1d4)) {
iVar1 = _mi_put_key_in_record(param_1,*(int4 *)((long)param_1 + 0x1d4),1,param_3);
if (iVar1 != 0) {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
return 0xffffffff;
}
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 2;
return 0;
}
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
}
return 0xffffffff;
}
| |
40,268 | my_uca_alloc_contractions | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_alloc_contractions(MY_CONTRACTIONS *contractions,
MY_CHARSET_LOADER *loader, size_t n)
{
size_t size= n * sizeof(MY_CONTRACTION);
if (!(contractions->item= (loader->once_alloc)(size)) ||
!(contractions->flags= (char *) (loader->once_alloc)(MY_UCA_CNT_FLAG_SIZE)))
return 1;
memset(contractions->item, 0, size);
memset(contractions->flags, 0, MY_UCA_CNT_FLAG_SIZE);
return 0;
} | O0 | c | my_uca_alloc_contractions:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
imulq $0x58, -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x28(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
je 0x58b39
movq -0x18(%rbp), %rax
movl $0x1000, %edi # imm = 0x1000
callq *0x80(%rax)
movq -0x10(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x58b3f
movb $0x1, -0x1(%rbp)
jmp 0x58b6a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rdx
xorl %esi, %esi
callq 0x25190
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
movl $0x1000, %edx # imm = 0x1000
callq 0x25190
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_alloc_contractions:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
imul rax, [rbp+var_20], 58h ; 'X'
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rax, [rax+80h]
mov rdi, [rbp+var_28]
call rax
mov rcx, [rbp+var_10]
mov [rcx+8], rax
cmp rax, 0
jz short loc_58B39
mov rax, [rbp+var_18]
mov edi, 1000h
call qword ptr [rax+80h]
mov rcx, [rbp+var_10]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_58B3F
loc_58B39:
mov [rbp+var_1], 1
jmp short loc_58B6A
loc_58B3F:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rdx, [rbp+var_28]
xor esi, esi
call _memset
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
xor esi, esi
mov edx, 1000h
call _memset
mov [rbp+var_1], 0
loc_58B6A:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_uca_alloc_contractions(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // rax
long long v6; // [rsp+8h] [rbp-28h]
v6 = 88 * a3;
v3 = (*(long long ( **)(long long))(a2 + 128))(88 * a3);
*(_QWORD *)(a1 + 8) = v3;
if ( !v3 )
return 1;
v4 = (*(long long ( **)(long long))(a2 + 128))(4096LL);
*(_QWORD *)(a1 + 16) = v4;
if ( !v4 )
return 1;
memset(*(_QWORD *)(a1 + 8), 0LL, v6);
memset(*(_QWORD *)(a1 + 16), 0LL, 4096LL);
return 0;
}
| my_uca_alloc_contractions:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
IMUL RAX,qword ptr [RBP + -0x20],0x58
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x28]
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JZ 0x00158b39
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,0x1000
CALL qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x00158b3f
LAB_00158b39:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00158b6a
LAB_00158b3f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
XOR ESI,ESI
CALL 0x00125190
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
XOR ESI,ESI
MOV EDX,0x1000
CALL 0x00125190
MOV byte ptr [RBP + -0x1],0x0
LAB_00158b6a:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_alloc_contractions(long param_1,long param_2,long param_3)
{
long lVar1;
lVar1 = (**(code **)(param_2 + 0x80))(param_3 * 0x58);
*(long *)(param_1 + 8) = lVar1;
if (lVar1 != 0) {
lVar1 = (**(code **)(param_2 + 0x80))(0x1000);
*(long *)(param_1 + 0x10) = lVar1;
if (lVar1 != 0) {
memset(*(void **)(param_1 + 8),0,param_3 * 0x58);
memset(*(void **)(param_1 + 0x10),0,0x1000);
return 0;
}
}
return 1;
}
| |
40,269 | find_type_eol | eloqsql/mysys/typelib.c | static int find_type_eol(const char **x, const TYPELIB *typelib, uint flags,
const char *eol)
{
int find,pos;
int UNINIT_VAR(findpos); /* guarded by find */
const char *UNINIT_VAR(termptr);
const char *i;
const char *j;
CHARSET_INFO *cs= &my_charset_latin1;
DBUG_ENTER("find_type_eol");
DBUG_PRINT("enter",("x: '%s' lib: %p", *x, typelib));
DBUG_ASSERT(!(flags & ~(FIND_TYPE_NO_PREFIX | FIND_TYPE_COMMA_TERM)));
if (!typelib->count)
{
DBUG_PRINT("exit",("no count"));
DBUG_RETURN(0);
}
find=0;
for (pos=0 ; (j=typelib->type_names[pos]) ; pos++)
{
for (i=*x ;
i < eol && !is_field_separator(flags, *i) &&
my_toupper(cs, *i) == my_toupper(cs, *j) ; i++, j++) ;
if (! *j)
{
while (i < eol && *i == ' ')
i++; /* skip_end_space */
if (i >= eol || is_field_separator(flags, *i))
{
*x= i;
DBUG_RETURN(pos+1);
}
}
if ((i >= eol && !is_field_separator(flags, *i)) &&
(!*j || !(flags & FIND_TYPE_NO_PREFIX)))
{
find++;
findpos=pos;
termptr=i;
}
}
if (find == 0 || *x == eol)
{
DBUG_PRINT("exit",("Couldn't find type"));
DBUG_RETURN(0);
}
else if (find != 1 || (flags & FIND_TYPE_NO_PREFIX))
{
DBUG_PRINT("exit",("Too many possibilities"));
DBUG_RETURN(-1);
}
*x= termptr;
DBUG_RETURN(findpos+1);
} | O0 | c | find_type_eol:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x25ae28(%rip), %rax # 0x2de280
movq %rax, -0x58(%rbp)
jmp 0x8345e
jmp 0x83460
jmp 0x83462
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x8347d
jmp 0x8346d
jmp 0x8346f
jmp 0x83471
movl $0x0, -0x4(%rbp)
jmp 0x83693
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x8363b
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x8351e
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x834f0
movq -0x48(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2c, %ecx
movb %al, -0x59(%rbp)
je 0x8351e
movq -0x48(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x3d, %ecx
movb %al, -0x59(%rbp)
je 0x8351e
movq -0x58(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x48(%rbp), %rcx
movzbl (%rcx), %ecx
movsbl (%rax,%rcx), %eax
movq -0x58(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq -0x50(%rbp), %rdx
movzbl (%rdx), %edx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x83527
jmp 0x83546
jmp 0x83529
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x834b4
movq -0x50(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x835d3
jmp 0x83555
movq -0x48(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x5a(%rbp)
jae 0x83574
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x5a(%rbp)
movb -0x5a(%rbp), %al
testb $0x1, %al
jne 0x8357d
jmp 0x8358b
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x83555
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x835b8
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x835d1
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x835b8
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x835d1
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x83693
jmp 0x835d3
movq -0x48(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x8362b
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x83600
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
je 0x8362b
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
je 0x8362b
movq -0x50(%rbp), %rax
cmpb $0x0, (%rax)
je 0x83614
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x8362b
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x8362d
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8348b
cmpl $0x0, -0x2c(%rbp)
je 0x8364e
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x8365d
jmp 0x83650
jmp 0x83652
jmp 0x83654
movl $0x0, -0x4(%rbp)
jmp 0x83693
cmpl $0x1, -0x2c(%rbp)
jne 0x8366e
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8367d
jmp 0x83670
jmp 0x83672
jmp 0x83674
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x83693
jmp 0x8367f
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| find_type_eol:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov eax, [rbp+var_34]
mov [rbp+var_34], eax
mov rax, [rbp+var_40]
mov [rbp+var_40], rax
lea rax, my_charset_latin1
mov [rbp+var_58], rax
jmp short $+2
loc_8345E:
jmp short $+2
loc_83460:
jmp short $+2
loc_83462:
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jnz short loc_8347D
jmp short $+2
loc_8346D:
jmp short $+2
loc_8346F:
jmp short $+2
loc_83471:
mov [rbp+var_4], 0
jmp loc_83693
loc_8347D:
mov [rbp+var_2C], 0
mov [rbp+var_30], 0
loc_8348B:
mov rax, [rbp+var_18]
mov rax, [rax+10h]
movsxd rcx, [rbp+var_30]
mov rax, [rax+rcx*8]
mov [rbp+var_50], rax
cmp rax, 0
jz loc_8363B
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_48], rax
loc_834B4:
mov rcx, [rbp+var_48]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_59], al
jnb short loc_8351E
mov eax, [rbp+var_1C]
and eax, 8
cmp eax, 0
jz short loc_834F0
mov rax, [rbp+var_48]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 2Ch ; ','
mov [rbp+var_59], al
jz short loc_8351E
mov rax, [rbp+var_48]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 3Dh ; '='
mov [rbp+var_59], al
jz short loc_8351E
loc_834F0:
mov rax, [rbp+var_58]
mov rax, [rax+50h]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx]
movsx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_58]
mov rcx, [rcx+50h]
mov rdx, [rbp+var_50]
movzx edx, byte ptr [rdx]
movsx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
setz al
mov [rbp+var_59], al
loc_8351E:
mov al, [rbp+var_59]
test al, 1
jnz short loc_83527
jmp short loc_83546
loc_83527:
jmp short $+2
loc_83529:
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp loc_834B4
loc_83546:
mov rax, [rbp+var_50]
cmp byte ptr [rax], 0
jnz loc_835D3
jmp short $+2
loc_83555:
mov rcx, [rbp+var_48]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_5A], al
jnb short loc_83574
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_5A], al
loc_83574:
mov al, [rbp+var_5A]
test al, 1
jnz short loc_8357D
jmp short loc_8358B
loc_8357D:
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp short loc_83555
loc_8358B:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_28]
jnb short loc_835B8
mov eax, [rbp+var_1C]
and eax, 8
cmp eax, 0
jz short loc_835D1
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jz short loc_835B8
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 3Dh ; '='
jnz short loc_835D1
loc_835B8:
mov rcx, [rbp+var_48]
mov rax, [rbp+var_10]
mov [rax], rcx
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_4], eax
jmp loc_83693
loc_835D1:
jmp short $+2
loc_835D3:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_28]
jb short loc_8362B
mov eax, [rbp+var_1C]
and eax, 8
cmp eax, 0
jz short loc_83600
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jz short loc_8362B
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 3Dh ; '='
jz short loc_8362B
loc_83600:
mov rax, [rbp+var_50]
cmp byte ptr [rax], 0
jz short loc_83614
mov eax, [rbp+var_1C]
and eax, 1
cmp eax, 0
jnz short loc_8362B
loc_83614:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
mov eax, [rbp+var_30]
mov [rbp+var_34], eax
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
loc_8362B:
jmp short $+2
loc_8362D:
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp loc_8348B
loc_8363B:
cmp [rbp+var_2C], 0
jz short loc_8364E
mov rax, [rbp+var_10]
mov rax, [rax]
cmp rax, [rbp+var_28]
jnz short loc_8365D
loc_8364E:
jmp short $+2
loc_83650:
jmp short $+2
loc_83652:
jmp short $+2
loc_83654:
mov [rbp+var_4], 0
jmp short loc_83693
loc_8365D:
cmp [rbp+var_2C], 1
jnz short loc_8366E
mov eax, [rbp+var_1C]
and eax, 1
cmp eax, 0
jz short loc_8367D
loc_8366E:
jmp short $+2
loc_83670:
jmp short $+2
loc_83672:
jmp short $+2
loc_83674:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_83693
loc_8367D:
jmp short $+2
loc_8367F:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax], rcx
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_4], eax
loc_83693:
mov eax, [rbp+var_4]
pop rbp
retn
| long long find_type_eol(_BYTE **a1, long long a2, char a3, _BYTE *a4)
{
bool v5; // [rsp+0h] [rbp-5Ah]
bool v6; // [rsp+1h] [rbp-59h]
_BYTE *v7; // [rsp+Ah] [rbp-50h]
_BYTE *j; // [rsp+12h] [rbp-48h]
_BYTE *v9; // [rsp+1Ah] [rbp-40h]
int v10; // [rsp+26h] [rbp-34h]
int i; // [rsp+2Ah] [rbp-30h]
int v12; // [rsp+2Eh] [rbp-2Ch]
if ( *(_DWORD *)a2 )
{
v12 = 0;
for ( i = 0; ; ++i )
{
v7 = *(_BYTE **)(*(_QWORD *)(a2 + 16) + 8LL * i);
if ( !v7 )
break;
for ( j = *a1; ; ++j )
{
v6 = 0;
if ( j < a4 )
{
if ( (a3 & 8) == 0 || (v6 = 0, *j != 44) && (v6 = 0, *j != 61) )
v6 = *(char *)(*((_QWORD *)&my_charset_latin1 + 10) + (unsigned __int8)*j) == *(char *)(*((_QWORD *)&my_charset_latin1 + 10)
+ (unsigned __int8)*v7);
}
if ( !v6 )
break;
++v7;
}
if ( !*v7 )
{
while ( 1 )
{
v5 = 0;
if ( j < a4 )
v5 = *j == 32;
if ( !v5 )
break;
++j;
}
if ( j >= a4 || (a3 & 8) != 0 && (*j == 44 || *j == 61) )
{
*a1 = j;
return (unsigned int)(i + 1);
}
}
if ( j >= a4 && ((a3 & 8) == 0 || *j != 44 && *j != 61) && (!*v7 || (a3 & 1) == 0) )
{
++v12;
v10 = i;
v9 = j;
}
}
if ( v12 && *a1 != a4 )
{
if ( v12 == 1 && (a3 & 1) == 0 )
{
*a1 = v9;
return (unsigned int)(v10 + 1);
}
else
{
return (unsigned int)-1;
}
}
else
{
return 0;
}
}
else
{
return 0;
}
}
| find_type_eol:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[0x3de280]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0018345e
LAB_0018345e:
JMP 0x00183460
LAB_00183460:
JMP 0x00183462
LAB_00183462:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JNZ 0x0018347d
JMP 0x0018346d
LAB_0018346d:
JMP 0x0018346f
LAB_0018346f:
JMP 0x00183471
LAB_00183471:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00183693
LAB_0018347d:
MOV dword ptr [RBP + -0x2c],0x0
MOV dword ptr [RBP + -0x30],0x0
LAB_0018348b:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JZ 0x0018363b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_001834b4:
MOV RCX,qword ptr [RBP + -0x48]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x59],AL
JNC 0x0018351e
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001834f0
MOV RAX,qword ptr [RBP + -0x48]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x2c
MOV byte ptr [RBP + -0x59],AL
JZ 0x0018351e
MOV RAX,qword ptr [RBP + -0x48]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x3d
MOV byte ptr [RBP + -0x59],AL
JZ 0x0018351e
LAB_001834f0:
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + 0x50]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RCX + 0x50]
MOV RDX,qword ptr [RBP + -0x50]
MOVZX EDX,byte ptr [RDX]
MOVSX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
SETZ AL
MOV byte ptr [RBP + -0x59],AL
LAB_0018351e:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x00183527
JMP 0x00183546
LAB_00183527:
JMP 0x00183529
LAB_00183529:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001834b4
LAB_00183546:
MOV RAX,qword ptr [RBP + -0x50]
CMP byte ptr [RAX],0x0
JNZ 0x001835d3
JMP 0x00183555
LAB_00183555:
MOV RCX,qword ptr [RBP + -0x48]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x5a],AL
JNC 0x00183574
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x5a],AL
LAB_00183574:
MOV AL,byte ptr [RBP + -0x5a]
TEST AL,0x1
JNZ 0x0018357d
JMP 0x0018358b
LAB_0018357d:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00183555
LAB_0018358b:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001835b8
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001835d1
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2c
JZ 0x001835b8
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3d
JNZ 0x001835d1
LAB_001835b8:
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00183693
LAB_001835d1:
JMP 0x001835d3
LAB_001835d3:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0018362b
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00183600
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2c
JZ 0x0018362b
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3d
JZ 0x0018362b
LAB_00183600:
MOV RAX,qword ptr [RBP + -0x50]
CMP byte ptr [RAX],0x0
JZ 0x00183614
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0018362b
LAB_00183614:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
LAB_0018362b:
JMP 0x0018362d
LAB_0018362d:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0018348b
LAB_0018363b:
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0018364e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0018365d
LAB_0018364e:
JMP 0x00183650
LAB_00183650:
JMP 0x00183652
LAB_00183652:
JMP 0x00183654
LAB_00183654:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00183693
LAB_0018365d:
CMP dword ptr [RBP + -0x2c],0x1
JNZ 0x0018366e
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0018367d
LAB_0018366e:
JMP 0x00183670
LAB_00183670:
JMP 0x00183672
LAB_00183672:
JMP 0x00183674
LAB_00183674:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00183693
LAB_0018367d:
JMP 0x0018367f
LAB_0018367f:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
LAB_00183693:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int find_type_eol(int8 *param_1,int *param_2,uint param_3,byte *param_4)
{
bool bVar1;
byte *local_58;
byte *local_50;
byte *local_48;
int local_3c;
int local_38;
int local_34;
int local_c;
if (*param_2 == 0) {
local_c = 0;
}
else {
local_34 = 0;
local_38 = 0;
while (local_58 = *(byte **)(*(long *)(param_2 + 4) + (long)local_38 * 8),
local_58 != (byte *)0x0) {
local_50 = (byte *)*param_1;
while( true ) {
bVar1 = false;
if ((local_50 < param_4) &&
(((param_3 & 8) == 0 ||
((bVar1 = false, *local_50 != 0x2c && (bVar1 = false, *local_50 != 0x3d)))))) {
bVar1 = PTR_to_upper_latin1_003de2d0[*local_50] == PTR_to_upper_latin1_003de2d0[*local_58]
;
}
if (!bVar1) break;
local_50 = local_50 + 1;
local_58 = local_58 + 1;
}
if (*local_58 == 0) {
while( true ) {
bVar1 = false;
if (local_50 < param_4) {
bVar1 = *local_50 == 0x20;
}
if (!bVar1) break;
local_50 = local_50 + 1;
}
if ((param_4 <= local_50) ||
(((param_3 & 8) != 0 && ((*local_50 == 0x2c || (*local_50 == 0x3d)))))) {
*param_1 = local_50;
return local_38 + 1;
}
}
if (((param_4 <= local_50) &&
(((param_3 & 8) == 0 || ((*local_50 != 0x2c && (*local_50 != 0x3d)))))) &&
((*local_58 == 0 || ((param_3 & 1) == 0)))) {
local_34 = local_34 + 1;
local_3c = local_38;
local_48 = local_50;
}
local_38 = local_38 + 1;
}
if ((local_34 == 0) || ((byte *)*param_1 == param_4)) {
local_c = 0;
}
else if ((local_34 == 1) && ((param_3 & 1) == 0)) {
*param_1 = local_48;
local_c = local_3c + 1;
}
else {
local_c = -1;
}
}
return local_c;
}
| |
40,270 | find_type_eol | eloqsql/mysys/typelib.c | static int find_type_eol(const char **x, const TYPELIB *typelib, uint flags,
const char *eol)
{
int find,pos;
int UNINIT_VAR(findpos); /* guarded by find */
const char *UNINIT_VAR(termptr);
const char *i;
const char *j;
CHARSET_INFO *cs= &my_charset_latin1;
DBUG_ENTER("find_type_eol");
DBUG_PRINT("enter",("x: '%s' lib: %p", *x, typelib));
DBUG_ASSERT(!(flags & ~(FIND_TYPE_NO_PREFIX | FIND_TYPE_COMMA_TERM)));
if (!typelib->count)
{
DBUG_PRINT("exit",("no count"));
DBUG_RETURN(0);
}
find=0;
for (pos=0 ; (j=typelib->type_names[pos]) ; pos++)
{
for (i=*x ;
i < eol && !is_field_separator(flags, *i) &&
my_toupper(cs, *i) == my_toupper(cs, *j) ; i++, j++) ;
if (! *j)
{
while (i < eol && *i == ' ')
i++; /* skip_end_space */
if (i >= eol || is_field_separator(flags, *i))
{
*x= i;
DBUG_RETURN(pos+1);
}
}
if ((i >= eol && !is_field_separator(flags, *i)) &&
(!*j || !(flags & FIND_TYPE_NO_PREFIX)))
{
find++;
findpos=pos;
termptr=i;
}
}
if (find == 0 || *x == eol)
{
DBUG_PRINT("exit",("Couldn't find type"));
DBUG_RETURN(0);
}
else if (find != 1 || (flags & FIND_TYPE_NO_PREFIX))
{
DBUG_PRINT("exit",("Too many possibilities"));
DBUG_RETURN(-1);
}
*x= termptr;
DBUG_RETURN(findpos+1);
} | O3 | c | find_type_eol:
xorl %eax, %eax
cmpl $0x0, (%rsi)
je 0x643f5
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x10(%rsi), %r8
movq (%r8), %r13
testq %r13, %r13
je 0x643eb
movq (%rdi), %r10
leaq 0x2ffad9(%rip), %rax # 0x363db0
movq 0x50(%rax), %rbx
movq %rcx, %r14
subq %r10, %r14
xorl %eax, %eax
xorl %r11d, %r11d
cmpq %rcx, %r10
jae 0x64329
leaq (%r14,%r13), %r9
movq %r10, %r15
movzbl (%r15), %r12d
testb $0x8, %dl
je 0x64307
cmpq $0x2c, %r12
je 0x6432c
cmpl $0x3d, %r12d
je 0x6432c
movb (%rbx,%r12), %sil
movzbl (%r13), %r12d
cmpb (%rbx,%r12), %sil
jne 0x64330
incq %r15
incq %r13
cmpq %rcx, %r15
jne 0x642f2
movq %rcx, %r15
movq %r9, %r13
jmp 0x6432c
movq %r10, %r15
movb (%r13), %r12b
testb %r12b, %r12b
je 0x64341
cmpq %rcx, %r15
jb 0x643a5
testb $0x8, %dl
jne 0x64381
jmp 0x64391
cmpq %rcx, %r15
jae 0x643e6
movq %rcx, %r9
subq %r15, %r9
movzbl (%r15), %r13d
cmpl $0x20, %r13d
jne 0x64364
incq %r15
decq %r9
jne 0x64350
jmp 0x643e3
testb $0x8, %dl
jne 0x64370
cmpq %rcx, %r15
jae 0x64391
jmp 0x643a5
cmpl $0x3d, %r13d
je 0x643e6
cmpl $0x2c, %r13d
je 0x643e6
cmpq %rcx, %r15
jb 0x643a5
movzbl (%r15), %r9d
cmpl $0x2c, %r9d
je 0x643a5
cmpl $0x3d, %r9d
je 0x643a5
testb $0x1, %dl
je 0x6439b
testb %r12b, %r12b
jne 0x643a5
incl %r11d
movl %eax, -0x2c(%rbp)
movq %r15, -0x38(%rbp)
movq 0x8(%r8,%rax,8), %r13
incq %rax
testq %r13, %r13
jne 0x642e6
xorl %eax, %eax
testl %r11d, %r11d
je 0x643eb
cmpq %rcx, (%rdi)
je 0x643eb
cmpl $0x1, %r11d
setne %cl
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
orb %cl, %dl
testb $0x1, %dl
jne 0x643eb
movl -0x2c(%rbp), %eax
incl %eax
movq -0x38(%rbp), %rcx
movq %rcx, (%rdi)
jmp 0x643eb
movq %rcx, %r15
movq %r15, (%rdi)
incl %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| find_type_eol:
xor eax, eax
cmp dword ptr [rsi], 0
jz locret_643F5
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov r8, [rsi+10h]
mov r13, [r8]
test r13, r13
jz loc_643EB
mov r10, [rdi]
lea rax, my_charset_latin1
mov rbx, [rax+50h]
mov r14, rcx
sub r14, r10
xor eax, eax
xor r11d, r11d
loc_642E6:
cmp r10, rcx
jnb short loc_64329
lea r9, [r14+r13]
mov r15, r10
loc_642F2:
movzx r12d, byte ptr [r15]
test dl, 8
jz short loc_64307
cmp r12, 2Ch ; ','
jz short loc_6432C
cmp r12d, 3Dh ; '='
jz short loc_6432C
loc_64307:
mov sil, [rbx+r12]
movzx r12d, byte ptr [r13+0]
cmp sil, [rbx+r12]
jnz short loc_64330
inc r15
inc r13
cmp r15, rcx
jnz short loc_642F2
mov r15, rcx
mov r13, r9
jmp short loc_6432C
loc_64329:
mov r15, r10
loc_6432C:
mov r12b, [r13+0]
loc_64330:
test r12b, r12b
jz short loc_64341
cmp r15, rcx
jb short loc_643A5
test dl, 8
jnz short loc_64381
jmp short loc_64391
loc_64341:
cmp r15, rcx
jnb loc_643E6
mov r9, rcx
sub r9, r15
loc_64350:
movzx r13d, byte ptr [r15]
cmp r13d, 20h ; ' '
jnz short loc_64364
inc r15
dec r9
jnz short loc_64350
jmp short loc_643E3
loc_64364:
test dl, 8
jnz short loc_64370
cmp r15, rcx
jnb short loc_64391
jmp short loc_643A5
loc_64370:
cmp r13d, 3Dh ; '='
jz short loc_643E6
cmp r13d, 2Ch ; ','
jz short loc_643E6
cmp r15, rcx
jb short loc_643A5
loc_64381:
movzx r9d, byte ptr [r15]
cmp r9d, 2Ch ; ','
jz short loc_643A5
cmp r9d, 3Dh ; '='
jz short loc_643A5
loc_64391:
test dl, 1
jz short loc_6439B
test r12b, r12b
jnz short loc_643A5
loc_6439B:
inc r11d
mov [rbp-2Ch], eax
mov [rbp-38h], r15
loc_643A5:
mov r13, [r8+rax*8+8]
inc rax
test r13, r13
jnz loc_642E6
xor eax, eax
test r11d, r11d
jz short loc_643EB
cmp [rdi], rcx
jz short loc_643EB
cmp r11d, 1
setnz cl
mov eax, 0FFFFFFFFh
or dl, cl
test dl, 1
jnz short loc_643EB
mov eax, [rbp-2Ch]
inc eax
mov rcx, [rbp-38h]
mov [rdi], rcx
jmp short loc_643EB
loc_643E3:
mov r15, rcx
loc_643E6:
mov [rdi], r15
inc eax
loc_643EB:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_643F5:
retn
| long long find_type_eol(_QWORD *a1, long long a2, char a3, unsigned __int8 *a4)
{
long long result; // rax
_BYTE **v5; // r8
_BYTE *v6; // r13
unsigned __int8 *v7; // r10
long long v8; // rbx
unsigned __int8 *v9; // r14
long long v10; // rax
int v11; // r11d
_BYTE *v12; // r9
unsigned __int8 *v13; // r15
long long v14; // r12
char v15; // si
long long v16; // r12
signed long long v17; // r9
int v18; // r13d
int v19; // r9d
long long v20; // [rsp-8h] [rbp-8h]
result = 0LL;
if ( !*(_DWORD *)a2 )
return result;
v5 = *(_BYTE ***)(a2 + 16);
v6 = *v5;
if ( !*v5 )
return result;
v7 = (unsigned __int8 *)*a1;
v8 = *((_QWORD *)&my_charset_latin1 + 10);
v9 = &a4[-*a1];
v10 = 0LL;
v11 = 0;
do
{
if ( v7 >= a4 )
{
v13 = v7;
}
else
{
v12 = &v6[(_QWORD)v9];
v13 = v7;
while ( 1 )
{
v14 = *v13;
if ( (a3 & 8) != 0 && (v14 == 44 || (_DWORD)v14 == 61) )
break;
v15 = *(_BYTE *)(v8 + v14);
v16 = (unsigned __int8)*v6;
if ( v15 != *(_BYTE *)(v8 + v16) )
goto LABEL_14;
++v13;
++v6;
if ( v13 == a4 )
{
v13 = a4;
v6 = v12;
break;
}
}
}
LOBYTE(v16) = *v6;
LABEL_14:
if ( (_BYTE)v16 )
{
if ( v13 < a4 )
goto LABEL_34;
if ( (a3 & 8) != 0 )
{
LABEL_29:
v19 = *v13;
if ( v19 == 44 || v19 == 61 )
goto LABEL_34;
}
LABEL_31:
if ( (a3 & 1) == 0 || !(_BYTE)v16 )
{
++v11;
*((_DWORD *)&v20 - 11) = v10;
*(&v20 - 7) = (long long)v13;
}
goto LABEL_34;
}
if ( v13 >= a4 )
goto LABEL_39;
v17 = a4 - v13;
while ( 1 )
{
v18 = *v13;
if ( v18 != 32 )
break;
++v13;
if ( !--v17 )
{
v13 = a4;
goto LABEL_39;
}
}
if ( (a3 & 8) == 0 )
{
if ( v13 < a4 )
goto LABEL_34;
goto LABEL_31;
}
if ( v18 == 61 || v18 == 44 )
{
LABEL_39:
*a1 = v13;
return (unsigned int)(v10 + 1);
}
if ( v13 >= a4 )
goto LABEL_29;
LABEL_34:
v6 = v5[++v10];
}
while ( v6 );
result = 0LL;
if ( v11 && (unsigned __int8 *)*a1 != a4 )
{
result = 0xFFFFFFFFLL;
if ( !((v11 != 1) | a3 & 1) )
{
result = (unsigned int)(*((_DWORD *)&v20 - 11) + 1);
*a1 = *(&v20 - 7);
}
}
return result;
}
| find_type_eol:
XOR EAX,EAX
CMP dword ptr [RSI],0x0
JZ 0x001643f5
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R8,qword ptr [RSI + 0x10]
MOV R13,qword ptr [R8]
TEST R13,R13
JZ 0x001643eb
MOV R10,qword ptr [RDI]
LEA RAX,[0x463db0]
MOV RBX,qword ptr [RAX + 0x50]
MOV R14,RCX
SUB R14,R10
XOR EAX,EAX
XOR R11D,R11D
LAB_001642e6:
CMP R10,RCX
JNC 0x00164329
LEA R9,[R14 + R13*0x1]
MOV R15,R10
LAB_001642f2:
MOVZX R12D,byte ptr [R15]
TEST DL,0x8
JZ 0x00164307
CMP R12,0x2c
JZ 0x0016432c
CMP R12D,0x3d
JZ 0x0016432c
LAB_00164307:
MOV SIL,byte ptr [RBX + R12*0x1]
MOVZX R12D,byte ptr [R13]
CMP SIL,byte ptr [RBX + R12*0x1]
JNZ 0x00164330
INC R15
INC R13
CMP R15,RCX
JNZ 0x001642f2
MOV R15,RCX
MOV R13,R9
JMP 0x0016432c
LAB_00164329:
MOV R15,R10
LAB_0016432c:
MOV R12B,byte ptr [R13]
LAB_00164330:
TEST R12B,R12B
JZ 0x00164341
CMP R15,RCX
JC 0x001643a5
TEST DL,0x8
JNZ 0x00164381
JMP 0x00164391
LAB_00164341:
CMP R15,RCX
JNC 0x001643e6
MOV R9,RCX
SUB R9,R15
LAB_00164350:
MOVZX R13D,byte ptr [R15]
CMP R13D,0x20
JNZ 0x00164364
INC R15
DEC R9
JNZ 0x00164350
JMP 0x001643e3
LAB_00164364:
TEST DL,0x8
JNZ 0x00164370
CMP R15,RCX
JNC 0x00164391
JMP 0x001643a5
LAB_00164370:
CMP R13D,0x3d
JZ 0x001643e6
CMP R13D,0x2c
JZ 0x001643e6
CMP R15,RCX
JC 0x001643a5
LAB_00164381:
MOVZX R9D,byte ptr [R15]
CMP R9D,0x2c
JZ 0x001643a5
CMP R9D,0x3d
JZ 0x001643a5
LAB_00164391:
TEST DL,0x1
JZ 0x0016439b
TEST R12B,R12B
JNZ 0x001643a5
LAB_0016439b:
INC R11D
MOV dword ptr [RBP + -0x2c],EAX
MOV qword ptr [RBP + -0x38],R15
LAB_001643a5:
MOV R13,qword ptr [R8 + RAX*0x8 + 0x8]
INC RAX
TEST R13,R13
JNZ 0x001642e6
XOR EAX,EAX
TEST R11D,R11D
JZ 0x001643eb
CMP qword ptr [RDI],RCX
JZ 0x001643eb
CMP R11D,0x1
SETNZ CL
MOV EAX,0xffffffff
OR DL,CL
TEST DL,0x1
JNZ 0x001643eb
MOV EAX,dword ptr [RBP + -0x2c]
INC EAX
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RDI],RCX
JMP 0x001643eb
LAB_001643e3:
MOV R15,RCX
LAB_001643e6:
MOV qword ptr [RDI],R15
INC EAX
LAB_001643eb:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_001643f5:
RET
|
int find_type_eol(int8 *param_1,int *param_2,byte param_3,byte *param_4)
{
byte *pbVar1;
byte bVar2;
byte *pbVar3;
int iVar4;
long lVar5;
long lVar6;
int iVar7;
byte bVar8;
byte *pbVar9;
byte *pbVar10;
byte *pbVar11;
byte *pbVar12;
byte *local_40;
int local_34;
iVar4 = 0;
if (*param_2 != 0) {
pbVar9 = (byte *)**(int8 **)(param_2 + 4);
if (pbVar9 != (byte *)0x0) {
pbVar3 = (byte *)*param_1;
lVar5 = 0;
iVar7 = 0;
do {
pbVar10 = pbVar9;
pbVar12 = pbVar3;
if (pbVar3 < param_4) {
pbVar1 = pbVar9 + ((long)param_4 - (long)pbVar3);
pbVar11 = pbVar3;
do {
bVar2 = *pbVar11;
pbVar12 = pbVar11;
if (((param_3 & 8) != 0) &&
((pbVar10 = pbVar9, (ulong)bVar2 == 0x2c || (bVar2 == 0x3d)))) break;
bVar8 = *pbVar9;
if (PTR_to_upper_latin1_00463e00[bVar2] != PTR_to_upper_latin1_00463e00[bVar8])
goto LAB_00164330;
pbVar11 = pbVar11 + 1;
pbVar9 = pbVar9 + 1;
pbVar10 = pbVar1;
pbVar12 = param_4;
} while (pbVar11 != param_4);
}
bVar8 = *pbVar10;
LAB_00164330:
if (bVar8 == 0) {
pbVar9 = pbVar12;
if (param_4 <= pbVar12) {
LAB_001643e6:
*param_1 = pbVar9;
return (int)lVar5 + 1;
}
lVar6 = (long)param_4 - (long)pbVar12;
while (bVar2 = *pbVar12, bVar2 == 0x20) {
pbVar12 = pbVar12 + 1;
lVar6 = lVar6 + -1;
pbVar9 = param_4;
if (lVar6 == 0) goto LAB_001643e6;
}
if ((param_3 & 8) == 0) {
if (param_4 <= pbVar12) goto LAB_00164391;
}
else {
pbVar9 = pbVar12;
if ((bVar2 == 0x3d) || (bVar2 == 0x2c)) goto LAB_001643e6;
if (param_4 <= pbVar12) goto LAB_00164381;
}
}
else if (param_4 <= pbVar12) {
if ((param_3 & 8) != 0) {
LAB_00164381:
if ((*pbVar12 == 0x2c) || (*pbVar12 == 0x3d)) goto LAB_001643a5;
}
LAB_00164391:
if (((param_3 & 1) == 0) || (bVar8 == 0)) {
iVar7 = iVar7 + 1;
local_40 = pbVar12;
local_34 = (int)lVar5;
}
}
LAB_001643a5:
pbVar9 = (byte *)(*(int8 **)(param_2 + 4))[lVar5 + 1];
lVar5 = lVar5 + 1;
} while (pbVar9 != (byte *)0x0);
iVar4 = 0;
if (((iVar7 != 0) && ((byte *)*param_1 != param_4)) &&
(iVar4 = -1, (param_3 & 1) == 0 && iVar7 == 1)) {
iVar4 = local_34 + 1;
*param_1 = local_40;
}
}
}
return iVar4;
}
| |
40,271 | ma_net_write | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_write(NET *net, const uchar *packet, size_t len)
{
uchar buff[NET_HEADER_SIZE];
while (len >= MAX_PACKET_LENGTH)
{
const ulong max_len= MAX_PACKET_LENGTH;
int3store(buff,max_len);
buff[3]= (uchar)net->pkt_nr++;
if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) ||
ma_net_write_buff(net, (char *)packet, max_len))
return 1;
packet+= max_len;
len-= max_len;
}
/* write last remaining packet, size can be zero */
int3store(buff, len);
buff[3]= (uchar)net->pkt_nr++;
if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) ||
ma_net_write_buff(net, (char *)packet, len))
return 1;
return 0;
} | O3 | c | ma_net_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpq $0xffffff, %rdx # imm = 0xFFFFFF
jb 0x58e74
leaq -0x34(%rbp), %r12
movl $0x1, %r13d
movw $0xffff, -0x34(%rbp) # imm = 0xFFFF
movb $-0x1, -0x32(%rbp)
movl 0x60(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x60(%r15)
movb %al, -0x31(%rbp)
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x58ee1
testl %eax, %eax
jne 0x58ebb
movl $0xffffff, %edx # imm = 0xFFFFFF
movq %r15, %rdi
movq %r14, %rsi
callq 0x58ee1
testl %eax, %eax
jne 0x58ebb
addq $0xffffff, %r14 # imm = 0xFFFFFF
addq $-0xffffff, %rbx # imm = 0xFF000001
cmpq $0xfffffe, %rbx # imm = 0xFFFFFE
ja 0x58e1d
leaq -0x34(%rbp), %rsi
movb %bl, (%rsi)
movb %bh, -0x33(%rbp)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x2(%rsi)
movl 0x60(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x60(%r15)
movb %al, 0x3(%rsi)
movl $0x4, %edx
movq %r15, %rdi
callq 0x58ee1
movl $0x1, %r13d
testl %eax, %eax
jne 0x58ebb
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x58ee1
movl %eax, %r13d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x58edc
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3a340
| ma_net_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp rdx, 0FFFFFFh
jb short loc_58E74
lea r12, [rbp+var_34]
mov r13d, 1
loc_58E1D:
mov [rbp+var_34], 0FFFFh
mov [rbp+var_32], 0FFh
mov eax, [r15+60h]
lea ecx, [rax+1]
mov [r15+60h], ecx
mov [rbp+var_31], al
mov edx, 4
mov rdi, r15
mov rsi, r12
call ma_net_write_buff
test eax, eax
jnz short loc_58EBB
mov edx, 0FFFFFFh
mov rdi, r15
mov rsi, r14
call ma_net_write_buff
test eax, eax
jnz short loc_58EBB
add r14, 0FFFFFFh
add rbx, 0FFFFFFFFFF000001h
cmp rbx, 0FFFFFEh
ja short loc_58E1D
loc_58E74:
lea rsi, [rbp+var_34]
mov [rsi], bl
mov byte ptr [rbp+var_34+1], bh
mov eax, ebx
shr eax, 10h
mov [rsi+2], al
mov eax, [r15+60h]
lea ecx, [rax+1]
mov [r15+60h], ecx
mov [rsi+3], al
mov edx, 4
mov rdi, r15
call ma_net_write_buff
mov r13d, 1
test eax, eax
jnz short loc_58EBB
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call ma_net_write_buff
mov r13d, eax
loc_58EBB:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_58EDC
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_58EDC:
call ___stack_chk_fail
| long long ma_net_write(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rbx
unsigned int v5; // r13d
int v6; // eax
int v7; // eax
__int16 v9; // [rsp+Ch] [rbp-34h] BYREF
char v10; // [rsp+Eh] [rbp-32h]
char v11; // [rsp+Fh] [rbp-31h]
unsigned long long v12; // [rsp+10h] [rbp-30h]
v3 = a3;
v12 = __readfsqword(0x28u);
if ( a3 < 0xFFFFFF )
{
LABEL_6:
v9 = v3;
v10 = BYTE2(v3);
v7 = *(_DWORD *)(a1 + 96);
*(_DWORD *)(a1 + 96) = v7 + 1;
v11 = v7;
v5 = 1;
if ( !(unsigned int)ma_net_write_buff(a1, &v9, 4LL) )
return (unsigned int)ma_net_write_buff(a1, a2, v3);
}
else
{
v5 = 1;
while ( 1 )
{
v9 = -1;
v10 = -1;
v6 = *(_DWORD *)(a1 + 96);
*(_DWORD *)(a1 + 96) = v6 + 1;
v11 = v6;
if ( (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, 0xFFFFFFLL) )
break;
a2 += 0xFFFFFFLL;
v3 -= 0xFFFFFFLL;
if ( v3 <= 0xFFFFFE )
goto LABEL_6;
}
}
return v5;
}
| ma_net_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP RDX,0xffffff
JC 0x00158e74
LEA R12,[RBP + -0x34]
MOV R13D,0x1
LAB_00158e1d:
MOV word ptr [RBP + -0x34],0xffff
MOV byte ptr [RBP + -0x32],0xff
MOV EAX,dword ptr [R15 + 0x60]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R15 + 0x60],ECX
MOV byte ptr [RBP + -0x31],AL
MOV EDX,0x4
MOV RDI,R15
MOV RSI,R12
CALL 0x00158ee1
TEST EAX,EAX
JNZ 0x00158ebb
MOV EDX,0xffffff
MOV RDI,R15
MOV RSI,R14
CALL 0x00158ee1
TEST EAX,EAX
JNZ 0x00158ebb
ADD R14,0xffffff
ADD RBX,-0xffffff
CMP RBX,0xfffffe
JA 0x00158e1d
LAB_00158e74:
LEA RSI,[RBP + -0x34]
MOV byte ptr [RSI],BL
MOV byte ptr [RBP + -0x33],BH
MOV EAX,EBX
SHR EAX,0x10
MOV byte ptr [RSI + 0x2],AL
MOV EAX,dword ptr [R15 + 0x60]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R15 + 0x60],ECX
MOV byte ptr [RSI + 0x3],AL
MOV EDX,0x4
MOV RDI,R15
CALL 0x00158ee1
MOV R13D,0x1
TEST EAX,EAX
JNZ 0x00158ebb
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00158ee1
MOV R13D,EAX
LAB_00158ebb:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00158edc
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00158edc:
CALL 0x0013a340
|
int4 ma_net_write(long param_1,long param_2,ulong param_3)
{
int iVar1;
int4 uVar2;
long in_FS_OFFSET;
int2 local_3c;
int1 local_3a;
int1 local_39;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (0xfffffe < param_3) {
uVar2 = 1;
do {
local_3c = 0xffff;
local_3a = 0xff;
iVar1 = *(int *)(param_1 + 0x60);
*(int *)(param_1 + 0x60) = iVar1 + 1;
local_39 = (int1)iVar1;
iVar1 = ma_net_write_buff(param_1,&local_3c,4);
if (iVar1 != 0) goto LAB_00158ebb;
iVar1 = ma_net_write_buff(param_1,param_2,0xffffff);
if (iVar1 != 0) goto LAB_00158ebb;
param_2 = param_2 + 0xffffff;
param_3 = param_3 - 0xffffff;
} while (0xfffffe < param_3);
}
local_3c = (int2)param_3;
local_3a = (int1)(param_3 >> 0x10);
iVar1 = *(int *)(param_1 + 0x60);
*(int *)(param_1 + 0x60) = iVar1 + 1;
local_39 = (int1)iVar1;
iVar1 = ma_net_write_buff(param_1,&local_3c,4);
uVar2 = 1;
if (iVar1 == 0) {
uVar2 = ma_net_write_buff(param_1,param_2,param_3);
}
LAB_00158ebb:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,272 | Balloc | eloqsql/strings/dtoa.c | static Bigint *Balloc(int k, Stack_alloc *alloc)
{
Bigint *rv;
DBUG_ASSERT(k <= Kmax);
if (k <= Kmax && alloc->freelist[k])
{
rv= alloc->freelist[k];
alloc->freelist[k]= rv->p.next;
}
else
{
int x, len;
x= 1 << k;
len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP);
if (alloc->free + len <= alloc->end)
{
rv= (Bigint*) alloc->free;
alloc->free+= len;
}
else
rv= (Bigint*) malloc(len);
rv->k= k;
rv->maxwds= x;
}
rv->sign= rv->wds= 0;
rv->p.x= (ULong*) (rv + 1);
return rv;
} | O3 | c | Balloc:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0xf, %edi
jg 0x8eb6d
movslq %ebx, %rcx
movq 0x18(%rsi,%rcx,8), %rax
testq %rax, %rax
je 0x8eb6d
movq (%rax), %rdx
movq %rdx, 0x18(%rsi,%rcx,8)
jmp 0x8eba8
movl $0x1, %r14d
movl %ebx, %ecx
shll %cl, %r14d
movl $0x4, %edx
shll %cl, %edx
addl $0x1f, %edx
andl $-0x8, %edx
movq 0x8(%rsi), %rax
movslq %edx, %rdi
leaq (%rax,%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jbe 0x8eb9d
callq 0x36900
jmp 0x8eba1
movq %rcx, 0x8(%rsi)
movl %ebx, 0x8(%rax)
movl %r14d, 0xc(%rax)
movq $0x0, 0x10(%rax)
leaq 0x18(%rax), %rcx
movq %rcx, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
| Balloc_0:
push rbp
mov rbp, rsp
push r14
push rbx
mov ebx, edi
cmp edi, 0Fh
jg short loc_8EB6D
movsxd rcx, ebx
mov rax, [rsi+rcx*8+18h]
test rax, rax
jz short loc_8EB6D
mov rdx, [rax]
mov [rsi+rcx*8+18h], rdx
jmp short loc_8EBA8
loc_8EB6D:
mov r14d, 1
mov ecx, ebx
shl r14d, cl
mov edx, 4
shl edx, cl
add edx, 1Fh
and edx, 0FFFFFFF8h
mov rax, [rsi+8]
movsxd rdi, edx
lea rcx, [rax+rdi]
cmp rcx, [rsi+10h]
jbe short loc_8EB9D
call _malloc
jmp short loc_8EBA1
loc_8EB9D:
mov [rsi+8], rcx
loc_8EBA1:
mov [rax+8], ebx
mov [rax+0Ch], r14d
loc_8EBA8:
mov qword ptr [rax+10h], 0
lea rcx, [rax+18h]
mov [rax], rcx
pop rbx
pop r14
pop rbp
retn
| long long Balloc_0(int a1, long long a2)
{
long long result; // rax
long long v4; // rdi
if ( a1 <= 15 && (result = *(_QWORD *)(a2 + 8LL * a1 + 24)) != 0 )
{
*(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)result;
}
else
{
result = *(_QWORD *)(a2 + 8);
v4 = (int)(((4 << a1) + 31) & 0xFFFFFFF8);
if ( (unsigned long long)(result + v4) <= *(_QWORD *)(a2 + 16) )
*(_QWORD *)(a2 + 8) = result + v4;
else
result = malloc(v4);
*(_DWORD *)(result + 8) = a1;
*(_DWORD *)(result + 12) = 1 << a1;
}
*(_QWORD *)(result + 16) = 0LL;
*(_QWORD *)result = result + 24;
return result;
}
| Balloc:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EBX,EDI
CMP EDI,0xf
JG 0x0018eb6d
MOVSXD RCX,EBX
MOV RAX,qword ptr [RSI + RCX*0x8 + 0x18]
TEST RAX,RAX
JZ 0x0018eb6d
MOV RDX,qword ptr [RAX]
MOV qword ptr [RSI + RCX*0x8 + 0x18],RDX
JMP 0x0018eba8
LAB_0018eb6d:
MOV R14D,0x1
MOV ECX,EBX
SHL R14D,CL
MOV EDX,0x4
SHL EDX,CL
ADD EDX,0x1f
AND EDX,0xfffffff8
MOV RAX,qword ptr [RSI + 0x8]
MOVSXD RDI,EDX
LEA RCX,[RAX + RDI*0x1]
CMP RCX,qword ptr [RSI + 0x10]
JBE 0x0018eb9d
CALL 0x00136900
JMP 0x0018eba1
LAB_0018eb9d:
MOV qword ptr [RSI + 0x8],RCX
LAB_0018eba1:
MOV dword ptr [RAX + 0x8],EBX
MOV dword ptr [RAX + 0xc],R14D
LAB_0018eba8:
MOV qword ptr [RAX + 0x10],0x0
LEA RCX,[RAX + 0x18]
MOV qword ptr [RAX],RCX
POP RBX
POP R14
POP RBP
RET
|
void Balloc(int param_1,long param_2)
{
ulong uVar1;
long *plVar2;
size_t __size;
if (param_1 < 0x10) {
plVar2 = *(long **)(param_2 + 0x18 + (long)param_1 * 8);
if (plVar2 != (long *)0x0) {
*(long *)(param_2 + 0x18 + (long)param_1 * 8) = *plVar2;
goto LAB_0018eba8;
}
}
plVar2 = *(long **)(param_2 + 8);
__size = (size_t)(int)((4 << ((byte)param_1 & 0x1f)) + 0x1fU & 0xfffffff8);
uVar1 = (long)plVar2 + __size;
if (*(ulong *)(param_2 + 0x10) < uVar1) {
plVar2 = (long *)malloc(__size);
}
else {
*(ulong *)(param_2 + 8) = uVar1;
}
*(int *)(plVar2 + 1) = param_1;
*(int *)((long)plVar2 + 0xc) = 1 << ((byte)param_1 & 0x1f);
LAB_0018eba8:
plVar2[2] = 0;
*plVar2 = (long)(plVar2 + 3);
return;
}
| |
40,273 | plutovg_paint_destroy | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-paint.c | void plutovg_paint_destroy(plutovg_paint_t* paint)
{
if(paint == NULL)
return;
if(--paint->ref_count == 0) {
if(paint->type == PLUTOVG_PAINT_TYPE_TEXTURE) {
plutovg_texture_paint_t* texture = (plutovg_texture_paint_t*)(paint);
plutovg_surface_destroy(texture->surface);
}
free(paint);
}
} | O1 | c | plutovg_paint_destroy:
pushq %rbx
testq %rdi, %rdi
je 0xa262
movq %rdi, %rbx
decl (%rdi)
je 0xa264
popq %rbx
retq
cmpl $0x2, 0x4(%rbx)
jne 0xa273
movq 0x28(%rbx), %rdi
callq 0xdc29
movq %rbx, %rdi
popq %rbx
jmp 0x32c0
| plutovg_paint_destroy:
push rbx
test rdi, rdi
jz short loc_A262
mov rbx, rdi
dec dword ptr [rdi]
jz short loc_A264
loc_A262:
pop rbx
retn
loc_A264:
cmp dword ptr [rbx+4], 2
jnz short loc_A273
mov rdi, [rbx+28h]
call plutovg_surface_destroy
loc_A273:
mov rdi, rbx
pop rbx
jmp free
| long long plutovg_paint_destroy(long long a1)
{
long long result; // rax
if ( a1 )
{
if ( (*(_DWORD *)a1)-- == 1 )
{
if ( *(_DWORD *)(a1 + 4) == 2 )
plutovg_surface_destroy(*(_QWORD *)(a1 + 40));
return free(a1);
}
}
return result;
}
| plutovg_paint_destroy:
PUSH RBX
TEST RDI,RDI
JZ 0x0010a262
MOV RBX,RDI
DEC dword ptr [RDI]
JZ 0x0010a264
LAB_0010a262:
POP RBX
RET
LAB_0010a264:
CMP dword ptr [RBX + 0x4],0x2
JNZ 0x0010a273
MOV RDI,qword ptr [RBX + 0x28]
CALL 0x0010dc29
LAB_0010a273:
MOV RDI,RBX
POP RBX
JMP 0x001032c0
|
void plutovg_paint_destroy(int *param_1)
{
if ((param_1 != (int *)0x0) && (*param_1 = *param_1 + -1, *param_1 == 0)) {
if (param_1[1] == 2) {
plutovg_surface_destroy(*(int8 *)(param_1 + 10));
}
free(param_1);
return;
}
return;
}
| |
40,274 | do_verify_prepare_field | eloqsql/libmariadb/unittest/libmariadb/my_test.h | int do_verify_prepare_field(MYSQL_RES *result,
unsigned int no, const char *name,
const char *org_name,
enum enum_field_types type __attribute__((unused)),
const char *table,
const char *org_table, const char *db,
unsigned long length __attribute__((unused)),
const char *def __attribute__((unused)),
const char *file __attribute__((unused)),
int line __attribute__((unused)))
{
MYSQL_FIELD *field;
/* MARIADB_CHARSET_INFO *cs; */
FAIL_IF(!(field= mysql_fetch_field_direct(result, no)), "FAILED to get result");
/* cs= mysql_find_charset_nr(field->charsetnr);
FAIL_UNLESS(cs, "Couldn't get character set"); */
FAIL_UNLESS(strcmp(field->name, name) == 0, "field->name differs");
FAIL_UNLESS(strcmp(field->org_name, org_name) == 0, "field->org_name differs");
/*
if ((expected_field_length= length * cs->mbmaxlen) > UINT_MAX32)
expected_field_length= UINT_MAX32;
*/
/*
XXX: silent column specification change works based on number of
bytes a column occupies. So CHAR -> VARCHAR upgrade is possible even
for CHAR(2) column if its character set is multibyte.
VARCHAR -> CHAR downgrade won't work for VARCHAR(3) as one would
expect.
*/
// if (cs->char_maxlen == 1)
// FAIL_UNLESS(field->type == type, "field->type differs");
if (table)
FAIL_UNLESS(strcmp(field->table, table) == 0, "field->table differs");
if (org_table)
FAIL_UNLESS(strcmp(field->org_table, org_table) == 0, "field->org_table differs");
if (strcmp(field->db,db))
diag("%s / %s", field->db, db);
FAIL_UNLESS(strcmp(field->db, db) == 0, "field->db differs");
/*
Character set should be taken into account for multibyte encodings, such
as utf8. Field length is calculated as number of characters * maximum
number of bytes a character can occupy.
*/
return OK;
} | O0 | c | do_verify_prepare_field:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x38(%rbp), %eax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x266f0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x139c9
leaq 0x3a743(%rip), %rdi # 0x4e0e6
leaq 0x3a74f(%rip), %rsi # 0x4e0f9
leaq 0x3a75d(%rip), %rdx # 0x4e10e
movl $0x119, %ecx # imm = 0x119
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x4(%rbp)
jmp 0x13b70
jmp 0x139cb
jmp 0x139cd
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
je 0x13a0f
leaq 0x3a6fd(%rip), %rdi # 0x4e0e6
leaq 0x3a770(%rip), %rsi # 0x4e160
leaq 0x3a717(%rip), %rdx # 0x4e10e
movl $0x11c, %ecx # imm = 0x11C
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x4(%rbp)
jmp 0x13b70
jmp 0x13a11
jmp 0x13a13
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
je 0x13a56
leaq 0x3a6b6(%rip), %rdi # 0x4e0e6
leaq 0x3a73d(%rip), %rsi # 0x4e174
leaq 0x3a6d0(%rip), %rdx # 0x4e10e
movl $0x11d, %ecx # imm = 0x11D
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x4(%rbp)
jmp 0x13b70
jmp 0x13a58
cmpq $0x0, -0x38(%rbp)
je 0x13aa8
jmp 0x13a61
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
je 0x13aa4
leaq 0x3a668(%rip), %rdi # 0x4e0e6
leaq 0x3a707(%rip), %rsi # 0x4e18c
leaq 0x3a682(%rip), %rdx # 0x4e10e
movl $0x12c, %ecx # imm = 0x12C
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x4(%rbp)
jmp 0x13b70
jmp 0x13aa6
jmp 0x13aa8
cmpq $0x0, 0x10(%rbp)
je 0x13af5
jmp 0x13ab1
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
je 0x13af1
leaq 0x3a618(%rip), %rdi # 0x4e0e6
leaq 0x3a6cc(%rip), %rsi # 0x4e1a1
leaq 0x3a632(%rip), %rdx # 0x4e10e
movl $0x12e, %ecx # imm = 0x12E
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x4(%rbp)
jmp 0x13b70
jmp 0x13af3
jmp 0x13af5
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rdi
movq 0x18(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
je 0x13b25
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x18(%rbp), %rdx
leaq 0x3a69c(%rip), %rdi # 0x4e1ba
movb $0x0, %al
callq 0x187a0
jmp 0x13b27
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rdi
movq 0x18(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
je 0x13b67
leaq 0x3a5a2(%rip), %rdi # 0x4e0e6
leaq 0x3a677(%rip), %rsi # 0x4e1c2
leaq 0x3a5bc(%rip), %rdx # 0x4e10e
movl $0x131, %ecx # imm = 0x131
movb $0x0, %al
callq 0x187a0
movl $0x1, -0x4(%rbp)
jmp 0x13b70
jmp 0x13b69
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| do_verify_prepare_field:
push rbp
mov rbp, rsp
sub rsp, 40h
mov eax, [rbp+arg_28]
mov rax, [rbp+arg_20]
mov rax, [rbp+arg_18]
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov [rbp+var_38], r9
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call mysql_fetch_field_direct
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_139C9
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aFailedToGetRes; "FAILED to get result"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 119h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_13B70
loc_139C9:
jmp short $+2
loc_139CB:
jmp short $+2
loc_139CD:
mov rax, [rbp+var_40]
mov rdi, [rax]
mov rsi, [rbp+var_20]
call _strcmp
cmp eax, 0
jz short loc_13A0F
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aFieldNameDiffe; "field->name differs"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 11Ch
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_13B70
loc_13A0F:
jmp short $+2
loc_13A11:
jmp short $+2
loc_13A13:
mov rax, [rbp+var_40]
mov rdi, [rax+8]
mov rsi, [rbp+var_28]
call _strcmp
cmp eax, 0
jz short loc_13A56
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aFieldOrgNameDi; "field->org_name differs"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 11Dh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_13B70
loc_13A56:
jmp short $+2
loc_13A58:
cmp [rbp+var_38], 0
jz short loc_13AA8
jmp short $+2
loc_13A61:
mov rax, [rbp+var_40]
mov rdi, [rax+10h]
mov rsi, [rbp+var_38]
call _strcmp
cmp eax, 0
jz short loc_13AA4
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aFieldTableDiff; "field->table differs"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 12Ch
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_13B70
loc_13AA4:
jmp short $+2
loc_13AA6:
jmp short $+2
loc_13AA8:
cmp [rbp+arg_0], 0
jz short loc_13AF5
jmp short $+2
loc_13AB1:
mov rax, [rbp+var_40]
mov rdi, [rax+18h]
mov rsi, [rbp+arg_0]
call _strcmp
cmp eax, 0
jz short loc_13AF1
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aFieldOrgTableD; "field->org_table differs"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 12Eh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_13B70
loc_13AF1:
jmp short $+2
loc_13AF3:
jmp short $+2
loc_13AF5:
mov rax, [rbp+var_40]
mov rdi, [rax+20h]
mov rsi, [rbp+arg_8]
call _strcmp
cmp eax, 0
jz short loc_13B25
mov rax, [rbp+var_40]
mov rsi, [rax+20h]
mov rdx, [rbp+arg_8]
lea rdi, aSS; "%s / %s"
mov al, 0
call diag
loc_13B25:
jmp short $+2
loc_13B27:
mov rax, [rbp+var_40]
mov rdi, [rax+20h]
mov rsi, [rbp+arg_8]
call _strcmp
cmp eax, 0
jz short loc_13B67
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aFieldDbDiffers; "field->db differs"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 131h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_13B70
loc_13B67:
jmp short $+2
loc_13B69:
mov [rbp+var_4], 0
loc_13B70:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long do_verify_prepare_field(
long long a1,
unsigned int a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8)
{
int v8; // r8d
int v9; // r9d
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
int v14; // r8d
int v15; // r9d
int v16; // r8d
int v17; // r9d
int v18; // ecx
int v19; // r8d
int v20; // r9d
int v21; // r8d
int v22; // r9d
_QWORD *field_direct; // [rsp+0h] [rbp-40h]
field_direct = (_QWORD *)mysql_fetch_field_direct(a1, a2);
if ( field_direct )
{
if ( !(unsigned int)strcmp(*field_direct, a3) )
{
if ( !(unsigned int)strcmp(field_direct[1], a4) )
{
if ( !a6 || !(unsigned int)strcmp(field_direct[2], a6) )
{
if ( !a7 || !(unsigned int)strcmp(field_direct[3], a7) )
{
if ( (unsigned int)strcmp(field_direct[4], a8) )
diag((unsigned int)"%s / %s", field_direct[4], a8, v18, v19, v20, (char)field_direct);
if ( !(unsigned int)strcmp(field_direct[4], a8) )
{
return 0;
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"field->db differs",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
305,
v21,
v22,
(char)field_direct);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"field->org_table differs",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
302,
v16,
v17,
(char)field_direct);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"field->table differs",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
300,
v14,
v15,
(char)field_direct);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"field->org_name differs",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
285,
v12,
v13,
(char)field_direct);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"field->name differs",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
284,
v10,
v11,
(char)field_direct);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"FAILED to get result",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
281,
v8,
v9,
0);
return 1;
}
}
| do_verify_prepare_field:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV EAX,dword ptr [RBP + 0x38]
MOV RAX,qword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
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 dword ptr [RBP + -0x2c],R8D
MOV qword ptr [RBP + -0x38],R9
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001266f0
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x001139c9
LEA RDI,[0x14e0e6]
LEA RSI,[0x14e0f9]
LEA RDX,[0x14e10e]
MOV ECX,0x119
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00113b70
LAB_001139c9:
JMP 0x001139cb
LAB_001139cb:
JMP 0x001139cd
LAB_001139cd:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001135f0
CMP EAX,0x0
JZ 0x00113a0f
LEA RDI,[0x14e0e6]
LEA RSI,[0x14e160]
LEA RDX,[0x14e10e]
MOV ECX,0x11c
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00113b70
LAB_00113a0f:
JMP 0x00113a11
LAB_00113a11:
JMP 0x00113a13
LAB_00113a13:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001135f0
CMP EAX,0x0
JZ 0x00113a56
LEA RDI,[0x14e0e6]
LEA RSI,[0x14e174]
LEA RDX,[0x14e10e]
MOV ECX,0x11d
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00113b70
LAB_00113a56:
JMP 0x00113a58
LAB_00113a58:
CMP qword ptr [RBP + -0x38],0x0
JZ 0x00113aa8
JMP 0x00113a61
LAB_00113a61:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001135f0
CMP EAX,0x0
JZ 0x00113aa4
LEA RDI,[0x14e0e6]
LEA RSI,[0x14e18c]
LEA RDX,[0x14e10e]
MOV ECX,0x12c
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00113b70
LAB_00113aa4:
JMP 0x00113aa6
LAB_00113aa6:
JMP 0x00113aa8
LAB_00113aa8:
CMP qword ptr [RBP + 0x10],0x0
JZ 0x00113af5
JMP 0x00113ab1
LAB_00113ab1:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RBP + 0x10]
CALL 0x001135f0
CMP EAX,0x0
JZ 0x00113af1
LEA RDI,[0x14e0e6]
LEA RSI,[0x14e1a1]
LEA RDX,[0x14e10e]
MOV ECX,0x12e
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00113b70
LAB_00113af1:
JMP 0x00113af3
LAB_00113af3:
JMP 0x00113af5
LAB_00113af5:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x20]
MOV RSI,qword ptr [RBP + 0x18]
CALL 0x001135f0
CMP EAX,0x0
JZ 0x00113b25
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RBP + 0x18]
LEA RDI,[0x14e1ba]
MOV AL,0x0
CALL 0x001187a0
LAB_00113b25:
JMP 0x00113b27
LAB_00113b27:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x20]
MOV RSI,qword ptr [RBP + 0x18]
CALL 0x001135f0
CMP EAX,0x0
JZ 0x00113b67
LEA RDI,[0x14e0e6]
LEA RSI,[0x14e1c2]
LEA RDX,[0x14e10e]
MOV ECX,0x131
MOV AL,0x0
CALL 0x001187a0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00113b70
LAB_00113b67:
JMP 0x00113b69
LAB_00113b69:
MOV dword ptr [RBP + -0x4],0x0
LAB_00113b70:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4
do_verify_prepare_field
(int8 param_1,int4 param_2,char *param_3,char *param_4,int8 param_5,
char *param_6,char *param_7,char *param_8)
{
int iVar1;
int8 *puVar2;
int4 local_c;
puVar2 = (int8 *)mysql_fetch_field_direct(param_1,param_2);
if (puVar2 == (int8 *)0x0) {
diag("Error: %s (%s: %d)","FAILED to get result",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x119);
local_c = 1;
}
else {
iVar1 = strcmp((char *)*puVar2,param_3);
if (iVar1 == 0) {
iVar1 = strcmp((char *)puVar2[1],param_4);
if (iVar1 == 0) {
if ((param_6 == (char *)0x0) || (iVar1 = strcmp((char *)puVar2[2],param_6), iVar1 == 0)) {
if ((param_7 == (char *)0x0) || (iVar1 = strcmp((char *)puVar2[3],param_7), iVar1 == 0)) {
iVar1 = strcmp((char *)puVar2[4],param_8);
if (iVar1 != 0) {
diag("%s / %s",puVar2[4],param_8);
}
iVar1 = strcmp((char *)puVar2[4],param_8);
if (iVar1 == 0) {
local_c = 0;
}
else {
diag("Error: %s (%s: %d)","field->db differs",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h"
,0x131);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","field->org_table differs",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h"
,0x12e);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","field->table differs",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
300);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","field->org_name differs",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
0x11d);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","field->name differs",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x11c
);
local_c = 1;
}
}
return local_c;
}
| |
40,275 | test_if_hard_path | eloqsql/mysys/my_getwd.c | int test_if_hard_path(register const char *dir_name)
{
if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR)
return (home_dir != NullS && test_if_hard_path(home_dir));
if (dir_name[0] == FN_LIBCHAR)
return (TRUE);
#ifdef FN_DEVCHAR
return (strchr(dir_name,FN_DEVCHAR) != 0);
#else
return FALSE;
#endif
} | O3 | c | test_if_hard_path:
pushq %rbp
movq %rsp, %rbp
leaq 0x33a027(%rip), %rax # 0x363c58
movq (%rax), %rax
movb (%rdi), %cl
cmpb $0x7e, %cl
jne 0x29c4d
cmpb $0x2f, 0x1(%rdi)
jne 0x29c4d
movq %rax, %rdi
testq %rax, %rax
jne 0x29c34
xorl %eax, %eax
jmp 0x29c55
xorl %eax, %eax
cmpb $0x2f, %cl
sete %al
popq %rbp
retq
| test_if_hard_path:
push rbp
mov rbp, rsp
lea rax, home_dir
mov rax, [rax]
loc_29C34:
mov cl, [rdi]
cmp cl, 7Eh ; '~'
jnz short loc_29C4D
cmp byte ptr [rdi+1], 2Fh ; '/'
jnz short loc_29C4D
mov rdi, rax
test rax, rax
jnz short loc_29C34
xor eax, eax
jmp short loc_29C55
loc_29C4D:
xor eax, eax
cmp cl, 2Fh ; '/'
setz al
loc_29C55:
pop rbp
retn
| _BOOL8 test_if_hard_path(_BYTE *a1)
{
while ( *a1 == 126 && a1[1] == 47 )
{
a1 = (_BYTE *)home_dir;
if ( !home_dir )
return 0LL;
}
return *a1 == 47;
}
| test_if_hard_path:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x463c58]
MOV RAX,qword ptr [RAX]
LAB_00129c34:
MOV CL,byte ptr [RDI]
CMP CL,0x7e
JNZ 0x00129c4d
CMP byte ptr [RDI + 0x1],0x2f
JNZ 0x00129c4d
MOV RDI,RAX
TEST RAX,RAX
JNZ 0x00129c34
XOR EAX,EAX
JMP 0x00129c55
LAB_00129c4d:
XOR EAX,EAX
CMP CL,0x2f
SETZ AL
LAB_00129c55:
POP RBP
RET
|
bool test_if_hard_path(char *param_1)
{
while ((*param_1 == '~' && (param_1[1] == '/'))) {
param_1 = home_dir;
if (home_dir == (char *)0x0) {
return false;
}
}
return *param_1 == '/';
}
| |
40,276 | calc_num_leafes | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static int calc_num_leafes(const ssz_ob_t* ob, bool only_used) {
const ssz_def_t* def = ob->def;
switch (def->type) {
case SSZ_TYPE_CONTAINER:
return def->def.container.len;
case SSZ_TYPE_VECTOR:
if (is_basic_type(def->def.vector.type))
return (def->def.vector.len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return def->def.vector.len;
case SSZ_TYPE_LIST: {
uint32_t len = only_used ? ssz_len(*ob) : def->def.vector.len;
if (is_basic_type(def->def.vector.type))
return (len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return len;
}
case SSZ_TYPE_BIT_LIST:
return (((only_used ? ssz_len(*ob) : def->def.vector.len) + 255) >> 8);
case SSZ_TYPE_BIT_VECTOR:
return (def->def.vector.len + 255) >> 8;
default:
return 1;
}
} | O0 | c | calc_num_leafes:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x4, %eax
ja 0x1dfd0
movq -0x30(%rbp), %rax
leaq 0x364f8(%rip), %rcx # 0x5437c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1dfd7
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1c560
testb $0x1, %al
jne 0x1deaf
jmp 0x1dee2
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1a210
movq %rax, %rcx
movq -0x38(%rbp), %rax
imulq %rcx, %rax
addq $0x1f, %rax
shrq $0x5, %rax
movl %eax, -0x4(%rbp)
jmp 0x1dfd7
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1dfd7
testb $0x1, -0x11(%rbp)
je 0x1df1e
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x1b380
movl %eax, -0x3c(%rbp)
jmp 0x1df28
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1c560
testb $0x1, %al
jne 0x1df41
jmp 0x1df6d
movl -0x24(%rbp), %eax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1a210
movq %rax, %rcx
movq -0x48(%rbp), %rax
imulq %rcx, %rax
addq $0x1f, %rax
shrq $0x5, %rax
movl %eax, -0x4(%rbp)
jmp 0x1dfd7
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1dfd7
testb $0x1, -0x11(%rbp)
je 0x1dfa2
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x1b380
movl %eax, -0x4c(%rbp)
jmp 0x1dfac
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addl $0xff, %eax
shrl $0x8, %eax
movl %eax, -0x4(%rbp)
jmp 0x1dfd7
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
addl $0xff, %eax
shrl $0x8, %eax
movl %eax, -0x4(%rbp)
jmp 0x1dfd7
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
| calc_num_leafes:
push rbp
mov rbp, rsp
sub rsp, 70h
mov al, sil
mov [rbp+var_10], rdi
and al, 1
mov [rbp+var_11], al
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax+8]
add eax, 0FFFFFFFEh; switch 5 cases
mov ecx, eax
mov [rbp+var_30], rcx
sub eax, 4
ja def_1DE8B; jumptable 000000000001DE8B default case
mov rax, [rbp+var_30]
lea rcx, jpt_1DE8B
movsxd rax, ds:(jpt_1DE8B - 5437Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1DE8D:
mov rax, [rbp+var_20]; jumptable 000000000001DE8B case 2
mov eax, [rax+18h]
mov [rbp+var_4], eax
jmp loc_1DFD7
loc_1DE9C:
mov rax, [rbp+var_20]; jumptable 000000000001DE8B case 3
mov rdi, [rax+10h]
call is_basic_type
test al, 1
jnz short loc_1DEAF
jmp short loc_1DEE2
loc_1DEAF:
mov rax, [rbp+var_20]
mov eax, [rax+18h]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
mov rdi, [rax+10h]
call ssz_fixed_length
mov rcx, rax
mov rax, [rbp+var_38]
imul rax, rcx
add rax, 1Fh
shr rax, 5
mov [rbp+var_4], eax
jmp loc_1DFD7
loc_1DEE2:
mov rax, [rbp+var_20]
mov eax, [rax+18h]
mov [rbp+var_4], eax
jmp loc_1DFD7
loc_1DEF1:
test [rbp+var_11], 1; jumptable 000000000001DE8B case 4
jz short loc_1DF1E
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rsp+70h+var_70], rcx
mov rcx, [rax+8]
mov [rsp+70h+var_68], rcx
mov rax, [rax+10h]
mov [rsp+70h+var_60], rax
call ssz_len
mov [rbp+var_3C], eax
jmp short loc_1DF28
loc_1DF1E:
mov rax, [rbp+var_20]
mov eax, [rax+18h]
mov [rbp+var_3C], eax
loc_1DF28:
mov eax, [rbp+var_3C]
mov [rbp+var_24], eax
mov rax, [rbp+var_20]
mov rdi, [rax+10h]
call is_basic_type
test al, 1
jnz short loc_1DF41
jmp short loc_1DF6D
loc_1DF41:
mov eax, [rbp+var_24]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov rdi, [rax+10h]
call ssz_fixed_length
mov rcx, rax
mov rax, [rbp+var_48]
imul rax, rcx
add rax, 1Fh
shr rax, 5
mov [rbp+var_4], eax
jmp short loc_1DFD7
loc_1DF6D:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_1DFD7
loc_1DF75:
test [rbp+var_11], 1; jumptable 000000000001DE8B case 6
jz short loc_1DFA2
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rsp+70h+var_70], rcx
mov rcx, [rax+8]
mov [rsp+70h+var_68], rcx
mov rax, [rax+10h]
mov [rsp+70h+var_60], rax
call ssz_len
mov [rbp+var_4C], eax
jmp short loc_1DFAC
loc_1DFA2:
mov rax, [rbp+var_20]
mov eax, [rax+18h]
mov [rbp+var_4C], eax
loc_1DFAC:
mov eax, [rbp+var_4C]
add eax, 0FFh
shr eax, 8
mov [rbp+var_4], eax
jmp short loc_1DFD7
loc_1DFBC:
mov rax, [rbp+var_20]; jumptable 000000000001DE8B case 5
mov eax, [rax+18h]
add eax, 0FFh
shr eax, 8
mov [rbp+var_4], eax
jmp short loc_1DFD7
def_1DE8B:
mov [rbp+var_4], 1; jumptable 000000000001DE8B default case
loc_1DFD7:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long calc_num_leafes(long long a1, char a2, int a3, long long a4, int a5, int a6)
{
int v7; // [rsp+24h] [rbp-4Ch]
unsigned int v8; // [rsp+34h] [rbp-3Ch]
long long v9; // [rsp+38h] [rbp-38h]
long long v10; // [rsp+50h] [rbp-20h]
unsigned int v11; // [rsp+6Ch] [rbp-4h]
v10 = *(_QWORD *)(a1 + 16);
switch ( *(_DWORD *)(v10 + 8) )
{
case 2:
v11 = *(_DWORD *)(v10 + 24);
break;
case 3:
if ( is_basic_type(*(_QWORD *)(v10 + 16)) )
{
v9 = *(unsigned int *)(v10 + 24);
v11 = (unsigned long long)(ssz_fixed_length(*(_DWORD **)(v10 + 16)) * v9 + 31) >> 5;
}
else
{
v11 = *(_DWORD *)(v10 + 24);
}
break;
case 4:
if ( (a2 & 1) != 0 )
v8 = ssz_len(
a1,
a2,
a3,
*(_QWORD *)(a1 + 8),
a5,
a6,
*(_QWORD *)a1,
*(unsigned __int8 **)(a1 + 8),
*(_QWORD *)(a1 + 16));
else
v8 = *(_DWORD *)(v10 + 24);
if ( is_basic_type(*(_QWORD *)(v10 + 16)) )
v11 = (ssz_fixed_length(*(_DWORD **)(v10 + 16)) * (unsigned long long)v8 + 31) >> 5;
else
v11 = v8;
break;
case 5:
v11 = (unsigned int)(*(_DWORD *)(v10 + 24) + 255) >> 8;
break;
case 6:
if ( (a2 & 1) != 0 )
v7 = ssz_len(
a1,
a2,
a3,
*(_QWORD *)(a1 + 8),
a5,
a6,
*(_QWORD *)a1,
*(unsigned __int8 **)(a1 + 8),
*(_QWORD *)(a1 + 16));
else
v7 = *(_DWORD *)(v10 + 24);
v11 = (unsigned int)(v7 + 255) >> 8;
break;
default:
v11 = 1;
break;
}
return v11;
}
| calc_num_leafes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV AL,SIL
MOV qword ptr [RBP + -0x10],RDI
AND AL,0x1
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x8]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x30],RCX
SUB EAX,0x4
JA 0x0011dfd0
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x15437c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011dfd7
caseD_3:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0011c560
TEST AL,0x1
JNZ 0x0011deaf
JMP 0x0011dee2
LAB_0011deaf:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0011a210
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
IMUL RAX,RCX
ADD RAX,0x1f
SHR RAX,0x5
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011dfd7
LAB_0011dee2:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011dfd7
caseD_4:
TEST byte ptr [RBP + -0x11],0x1
JZ 0x0011df1e
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0011b380
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0011df28
LAB_0011df1e:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x3c],EAX
LAB_0011df28:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0011c560
TEST AL,0x1
JNZ 0x0011df41
JMP 0x0011df6d
LAB_0011df41:
MOV EAX,dword ptr [RBP + -0x24]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x0011a210
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
IMUL RAX,RCX
ADD RAX,0x1f
SHR RAX,0x5
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011dfd7
LAB_0011df6d:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011dfd7
caseD_6:
TEST byte ptr [RBP + -0x11],0x1
JZ 0x0011dfa2
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0011b380
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0011dfac
LAB_0011dfa2:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x4c],EAX
LAB_0011dfac:
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0xff
SHR EAX,0x8
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011dfd7
caseD_5:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
ADD EAX,0xff
SHR EAX,0x8
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011dfd7
default:
MOV dword ptr [RBP + -0x4],0x1
LAB_0011dfd7:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
uint calc_num_leafes(long param_1,byte param_2)
{
uint uVar1;
ulong uVar2;
long lVar3;
int local_54;
uint local_44;
uint local_c;
lVar3 = *(long *)(param_1 + 0x10);
switch(*(int4 *)(lVar3 + 8)) {
case 2:
local_c = *(uint *)(lVar3 + 0x18);
break;
case 3:
uVar2 = is_basic_type(*(int8 *)(lVar3 + 0x10));
if ((uVar2 & 1) == 0) {
local_c = *(uint *)(lVar3 + 0x18);
}
else {
uVar1 = *(uint *)(lVar3 + 0x18);
lVar3 = ssz_fixed_length(*(int8 *)(lVar3 + 0x10));
local_c = (uint)((ulong)uVar1 * lVar3 + 0x1f >> 5);
}
break;
case 4:
if ((param_2 & 1) == 0) {
local_44 = *(uint *)(lVar3 + 0x18);
}
else {
local_44 = ssz_len();
}
uVar2 = is_basic_type(*(int8 *)(lVar3 + 0x10));
if ((uVar2 & 1) == 0) {
local_c = local_44;
}
else {
lVar3 = ssz_fixed_length(*(int8 *)(lVar3 + 0x10));
local_c = (uint)((ulong)local_44 * lVar3 + 0x1f >> 5);
}
break;
case 5:
local_c = *(int *)(lVar3 + 0x18) + 0xffU >> 8;
break;
case 6:
if ((param_2 & 1) == 0) {
local_54 = *(int *)(lVar3 + 0x18);
}
else {
local_54 = ssz_len();
}
local_c = local_54 + 0xffU >> 8;
break;
default:
local_c = 1;
}
return local_c;
}
| |
40,277 | calc_num_leafes | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static int calc_num_leafes(const ssz_ob_t* ob, bool only_used) {
const ssz_def_t* def = ob->def;
switch (def->type) {
case SSZ_TYPE_CONTAINER:
return def->def.container.len;
case SSZ_TYPE_VECTOR:
if (is_basic_type(def->def.vector.type))
return (def->def.vector.len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return def->def.vector.len;
case SSZ_TYPE_LIST: {
uint32_t len = only_used ? ssz_len(*ob) : def->def.vector.len;
if (is_basic_type(def->def.vector.type))
return (len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return len;
}
case SSZ_TYPE_BIT_LIST:
return (((only_used ? ssz_len(*ob) : def->def.vector.len) + 255) >> 8);
case SSZ_TYPE_BIT_VECTOR:
return (def->def.vector.len + 255) >> 8;
default:
return 1;
}
} | O1 | c | calc_num_leafes:
pushq %rbx
subq $0x20, %rsp
movq 0x10(%rdi), %rbx
movl 0x8(%rbx), %eax
addl $-0x2, %eax
cmpl $0x4, %eax
ja 0x15f42
leaq 0x293f0(%rip), %rcx # 0x3f2c4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x18(%rbx), %eax
jmp 0x15f82
testb %sil, %sil
je 0x15f49
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movups (%rdi), %xmm0
movups %xmm0, (%rsp)
callq 0x142c2
jmp 0x15f4c
testb %sil, %sil
je 0x15f56
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movups (%rdi), %xmm0
movups %xmm0, (%rsp)
callq 0x142c2
jmp 0x15f59
movl $0xff, %eax
addl 0x18(%rbx), %eax
jmp 0x15f51
movq 0x10(%rbx), %rdi
movl 0x8(%rdi), %eax
cmpl $0x8, %eax
ja 0x15edd
movl $0x103, %ecx # imm = 0x103
btl %eax, %ecx
jae 0x15edd
movl 0x18(%rbx), %ebx
jmp 0x15f71
movl $0x1, %eax
jmp 0x15f82
movl 0x18(%rbx), %eax
addl $0xff, %eax
shrl $0x8, %eax
jmp 0x15f82
movl 0x18(%rbx), %eax
movq 0x10(%rbx), %rdi
movl 0x8(%rdi), %ecx
cmpl $0x8, %ecx
ja 0x15f82
movl $0x103, %edx # imm = 0x103
btl %ecx, %edx
jae 0x15f82
movl %eax, %ebx
callq 0x13690
imulq %rbx, %rax
addq $0x1f, %rax
shrq $0x5, %rax
addq $0x20, %rsp
popq %rbx
retq
| calc_num_leafes:
push rbx
sub rsp, 20h
mov rbx, [rdi+10h]
mov eax, [rbx+8]
add eax, 0FFFFFFFEh; switch 5 cases
cmp eax, 4
ja short def_15EDB; jumptable 0000000000015EDB default case
lea rcx, jpt_15EDB
movsxd rax, ds:(jpt_15EDB - 3F2C4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_15EDD:
mov eax, [rbx+18h]; jumptable 0000000000015EDB case 2
jmp loc_15F82
loc_15EE5:
test sil, sil; jumptable 0000000000015EDB case 6
jz short loc_15F49
mov rax, [rdi+10h]
mov [rsp+28h+var_18], rax
movups xmm0, xmmword ptr [rdi]
movups [rsp+28h+var_28], xmm0
call ssz_len
jmp short loc_15F4C
loc_15F01:
test sil, sil; jumptable 0000000000015EDB case 4
jz short loc_15F56
mov rax, [rdi+10h]
mov [rsp+28h+var_18], rax
movups xmm0, xmmword ptr [rdi]
movups [rsp+28h+var_28], xmm0
call ssz_len
jmp short loc_15F59
loc_15F1D:
mov eax, 0FFh; jumptable 0000000000015EDB case 5
add eax, [rbx+18h]
jmp short loc_15F51
loc_15F27:
mov rdi, [rbx+10h]; jumptable 0000000000015EDB case 3
mov eax, [rdi+8]
cmp eax, 8
ja short loc_15EDD; jumptable 0000000000015EDB case 2
mov ecx, 103h
bt ecx, eax
jnb short loc_15EDD; jumptable 0000000000015EDB case 2
mov ebx, [rbx+18h]
jmp short loc_15F71
def_15EDB:
mov eax, 1; jumptable 0000000000015EDB default case
jmp short loc_15F82
loc_15F49:
mov eax, [rbx+18h]
loc_15F4C:
add eax, 0FFh
loc_15F51:
shr eax, 8
jmp short loc_15F82
loc_15F56:
mov eax, [rbx+18h]
loc_15F59:
mov rdi, [rbx+10h]
mov ecx, [rdi+8]
cmp ecx, 8
ja short loc_15F82
mov edx, 103h
bt edx, ecx
jnb short loc_15F82
mov ebx, eax
loc_15F71:
call ssz_fixed_length
imul rax, rbx
add rax, 1Fh
shr rax, 5
loc_15F82:
add rsp, 20h
pop rbx
retn
| long long calc_num_leafes(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long v6; // rbx
long long result; // rax
int v8; // eax
unsigned int v9; // eax
long long v10; // rdi
unsigned int v11; // eax
int v12; // ecx
long long v13; // rbx
unsigned int v14; // ecx
int v15; // edx
v6 = *(_QWORD *)(a1 + 16);
switch ( *(_DWORD *)(v6 + 8) )
{
case 2:
return *(unsigned int *)(v6 + 24);
case 3:
v10 = *(_QWORD *)(v6 + 16);
v11 = *(_DWORD *)(v10 + 8);
if ( v11 > 8 )
return *(unsigned int *)(v6 + 24);
v12 = 259;
if ( !_bittest(&v12, v11) )
return *(unsigned int *)(v6 + 24);
v13 = *(unsigned int *)(v6 + 24);
return (unsigned long long)(v13 * ssz_fixed_length(v10) + 31) >> 5;
case 4:
if ( (_BYTE)a2 )
result = ssz_len(a1, a2, a3, a4, a5, a6, *(_OWORD *)a1, *(unsigned int **)(a1 + 8), *(_QWORD *)(a1 + 16));
else
result = *(unsigned int *)(v6 + 24);
v10 = *(_QWORD *)(v6 + 16);
v14 = *(_DWORD *)(v10 + 8);
if ( v14 > 8 )
return result;
v15 = 259;
if ( !_bittest(&v15, v14) )
return result;
v13 = (unsigned int)result;
return (unsigned long long)(v13 * ssz_fixed_length(v10) + 31) >> 5;
case 5:
v9 = *(_DWORD *)(v6 + 24) + 255;
return v9 >> 8;
case 6:
if ( (_BYTE)a2 )
v8 = ssz_len(a1, a2, a3, a4, a5, a6, *(_OWORD *)a1, *(unsigned int **)(a1 + 8), *(_QWORD *)(a1 + 16));
else
v8 = *(_DWORD *)(v6 + 24);
v9 = v8 + 255;
return v9 >> 8;
default:
return 1LL;
}
}
| calc_num_leafes:
PUSH RBX
SUB RSP,0x20
MOV RBX,qword ptr [RDI + 0x10]
MOV EAX,dword ptr [RBX + 0x8]
ADD EAX,-0x2
CMP EAX,0x4
JA 0x00115f42
LEA RCX,[0x13f2c4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOV EAX,dword ptr [RBX + 0x18]
JMP 0x00115f82
caseD_6:
TEST SIL,SIL
JZ 0x00115f49
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x001142c2
JMP 0x00115f4c
caseD_4:
TEST SIL,SIL
JZ 0x00115f56
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x001142c2
JMP 0x00115f59
caseD_5:
MOV EAX,0xff
ADD EAX,dword ptr [RBX + 0x18]
JMP 0x00115f51
caseD_3:
MOV RDI,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,0x8
JA 0x00115edd
MOV ECX,0x103
BT ECX,EAX
JNC 0x00115edd
MOV EBX,dword ptr [RBX + 0x18]
JMP 0x00115f71
default:
MOV EAX,0x1
JMP 0x00115f82
LAB_00115f49:
MOV EAX,dword ptr [RBX + 0x18]
LAB_00115f4c:
ADD EAX,0xff
LAB_00115f51:
SHR EAX,0x8
JMP 0x00115f82
LAB_00115f56:
MOV EAX,dword ptr [RBX + 0x18]
LAB_00115f59:
MOV RDI,qword ptr [RBX + 0x10]
MOV ECX,dword ptr [RDI + 0x8]
CMP ECX,0x8
JA 0x00115f82
MOV EDX,0x103
BT EDX,ECX
JNC 0x00115f82
MOV EBX,EAX
LAB_00115f71:
CALL 0x00113690
IMUL RAX,RBX
ADD RAX,0x1f
SHR RAX,0x5
LAB_00115f82:
ADD RSP,0x20
POP RBX
RET
|
ulong calc_num_leafes(long param_1,char param_2)
{
uint uVar1;
int iVar2;
ulong uVar3;
long lVar4;
lVar4 = *(long *)(param_1 + 0x10);
switch(*(int4 *)(lVar4 + 8)) {
case 3:
uVar1 = *(uint *)(*(long *)(lVar4 + 0x10) + 8);
if ((uVar1 < 9) && ((0x103U >> (uVar1 & 0x1f) & 1) != 0)) {
uVar3 = (ulong)*(uint *)(lVar4 + 0x18);
goto LAB_00115f71;
}
case 2:
uVar3 = (ulong)*(uint *)(lVar4 + 0x18);
break;
case 4:
if (param_2 == '\0') {
uVar3 = (ulong)*(uint *)(lVar4 + 0x18);
}
else {
uVar3 = ssz_len();
}
uVar1 = *(uint *)(*(long *)(lVar4 + 0x10) + 8);
if (8 < uVar1) {
return uVar3;
}
if ((0x103U >> (uVar1 & 0x1f) & 1) == 0) {
return uVar3;
}
uVar3 = uVar3 & 0xffffffff;
LAB_00115f71:
lVar4 = ssz_fixed_length();
return lVar4 * uVar3 + 0x1f >> 5;
case 5:
iVar2 = *(int *)(lVar4 + 0x18);
goto LAB_00115f51;
case 6:
if (param_2 == '\0') {
iVar2 = *(int *)(lVar4 + 0x18);
}
else {
iVar2 = ssz_len();
}
LAB_00115f51:
uVar3 = (ulong)(iVar2 + 0xffU >> 8);
break;
default:
uVar3 = 1;
}
return uVar3;
}
| |
40,278 | calc_num_leafes | corpus-core[P]colibri-stateless/src/util/ssz_merkle.c | static int calc_num_leafes(const ssz_ob_t* ob, bool only_used) {
const ssz_def_t* def = ob->def;
switch (def->type) {
case SSZ_TYPE_CONTAINER:
return def->def.container.len;
case SSZ_TYPE_VECTOR:
if (is_basic_type(def->def.vector.type))
return (def->def.vector.len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return def->def.vector.len;
case SSZ_TYPE_LIST: {
uint32_t len = only_used ? ssz_len(*ob) : def->def.vector.len;
if (is_basic_type(def->def.vector.type))
return (len * ssz_fixed_length(def->def.vector.type) + 31) >> 5;
else
return len;
}
case SSZ_TYPE_BIT_LIST:
return (((only_used ? ssz_len(*ob) : def->def.vector.len) + 255) >> 8);
case SSZ_TYPE_BIT_VECTOR:
return (def->def.vector.len + 255) >> 8;
default:
return 1;
}
} | O3 | c | calc_num_leafes:
pushq %rbx
subq $0x20, %rsp
movq 0x10(%rdi), %rbx
movl 0x8(%rbx), %eax
addl $-0x2, %eax
cmpl $0x4, %eax
ja 0x15840
leaq 0x29aea(%rip), %rcx # 0x3f2bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x18(%rbx), %eax
jmp 0x15880
testb %sil, %sil
je 0x15847
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movups (%rdi), %xmm0
movups %xmm0, (%rsp)
callq 0x13de0
jmp 0x1584a
testb %sil, %sil
je 0x15854
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movups (%rdi), %xmm0
movups %xmm0, (%rsp)
callq 0x13de0
jmp 0x15857
movl $0xff, %eax
addl 0x18(%rbx), %eax
jmp 0x1584f
movq 0x10(%rbx), %rdi
movl 0x8(%rdi), %eax
cmpl $0x8, %eax
ja 0x157db
movl $0x103, %ecx # imm = 0x103
btl %eax, %ecx
jae 0x157db
movl 0x18(%rbx), %ebx
jmp 0x1586f
movl $0x1, %eax
jmp 0x15880
movl 0x18(%rbx), %eax
addl $0xff, %eax
shrl $0x8, %eax
jmp 0x15880
movl 0x18(%rbx), %eax
movq 0x10(%rbx), %rdi
movl 0x8(%rdi), %ecx
cmpl $0x8, %ecx
ja 0x15880
movl $0x103, %edx # imm = 0x103
btl %ecx, %edx
jae 0x15880
movl %eax, %ebx
callq 0x13330
imulq %rbx, %rax
addq $0x1f, %rax
shrq $0x5, %rax
addq $0x20, %rsp
popq %rbx
retq
| calc_num_leafes:
push rbx
sub rsp, 20h
mov rbx, [rdi+10h]
mov eax, [rbx+8]
add eax, 0FFFFFFFEh; switch 5 cases
cmp eax, 4
ja short def_157D9; jumptable 00000000000157D9 default case
lea rcx, jpt_157D9
movsxd rax, ds:(jpt_157D9 - 3F2BCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_157DB:
mov eax, [rbx+18h]; jumptable 00000000000157D9 case 2
jmp loc_15880
loc_157E3:
test sil, sil; jumptable 00000000000157D9 case 6
jz short loc_15847
mov rax, [rdi+10h]
mov [rsp+28h+var_18], rax
movups xmm0, xmmword ptr [rdi]
movups [rsp+28h+var_28], xmm0
call ssz_len
jmp short loc_1584A
loc_157FF:
test sil, sil; jumptable 00000000000157D9 case 4
jz short loc_15854
mov rax, [rdi+10h]
mov [rsp+28h+var_18], rax
movups xmm0, xmmword ptr [rdi]
movups [rsp+28h+var_28], xmm0
call ssz_len
jmp short loc_15857
loc_1581B:
mov eax, 0FFh; jumptable 00000000000157D9 case 5
add eax, [rbx+18h]
jmp short loc_1584F
loc_15825:
mov rdi, [rbx+10h]; jumptable 00000000000157D9 case 3
mov eax, [rdi+8]
cmp eax, 8
ja short loc_157DB; jumptable 00000000000157D9 case 2
mov ecx, 103h
bt ecx, eax
jnb short loc_157DB; jumptable 00000000000157D9 case 2
mov ebx, [rbx+18h]
jmp short loc_1586F
def_157D9:
mov eax, 1; jumptable 00000000000157D9 default case
jmp short loc_15880
loc_15847:
mov eax, [rbx+18h]
loc_1584A:
add eax, 0FFh
loc_1584F:
shr eax, 8
jmp short loc_15880
loc_15854:
mov eax, [rbx+18h]
loc_15857:
mov rdi, [rbx+10h]
mov ecx, [rdi+8]
cmp ecx, 8
ja short loc_15880
mov edx, 103h
bt edx, ecx
jnb short loc_15880
mov ebx, eax
loc_1586F:
call ssz_fixed_length
imul rax, rbx
add rax, 1Fh
shr rax, 5
loc_15880:
add rsp, 20h
pop rbx
retn
| long long calc_num_leafes(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
long long v6; // rbx
long long result; // rax
int v8; // eax
unsigned int v9; // eax
long long v10; // rdi
unsigned int v11; // eax
int v12; // ecx
long long v13; // rbx
unsigned int v14; // ecx
int v15; // edx
v6 = *(_QWORD *)(a1 + 16);
switch ( *(_DWORD *)(v6 + 8) )
{
case 2:
return *(unsigned int *)(v6 + 24);
case 3:
v10 = *(_QWORD *)(v6 + 16);
v11 = *(_DWORD *)(v10 + 8);
if ( v11 > 8 )
return *(unsigned int *)(v6 + 24);
v12 = 259;
if ( !_bittest(&v12, v11) )
return *(unsigned int *)(v6 + 24);
v13 = *(unsigned int *)(v6 + 24);
return (unsigned long long)(v13 * ssz_fixed_length(v10) + 31) >> 5;
case 4:
if ( (_BYTE)a2 )
result = ssz_len(a1, a2, a3, a4, a5, a6, *(_OWORD *)a1, *(unsigned int **)(a1 + 8), *(_QWORD *)(a1 + 16));
else
result = *(unsigned int *)(v6 + 24);
v10 = *(_QWORD *)(v6 + 16);
v14 = *(_DWORD *)(v10 + 8);
if ( v14 > 8 )
return result;
v15 = 259;
if ( !_bittest(&v15, v14) )
return result;
v13 = (unsigned int)result;
return (unsigned long long)(v13 * ssz_fixed_length(v10) + 31) >> 5;
case 5:
v9 = *(_DWORD *)(v6 + 24) + 255;
return v9 >> 8;
case 6:
if ( (_BYTE)a2 )
v8 = ssz_len(a1, a2, a3, a4, a5, a6, *(_OWORD *)a1, *(unsigned int **)(a1 + 8), *(_QWORD *)(a1 + 16));
else
v8 = *(_DWORD *)(v6 + 24);
v9 = v8 + 255;
return v9 >> 8;
default:
return 1LL;
}
}
| calc_num_leafes:
PUSH RBX
SUB RSP,0x20
MOV RBX,qword ptr [RDI + 0x10]
MOV EAX,dword ptr [RBX + 0x8]
ADD EAX,-0x2
CMP EAX,0x4
JA 0x00115840
LEA RCX,[0x13f2bc]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOV EAX,dword ptr [RBX + 0x18]
JMP 0x00115880
caseD_6:
TEST SIL,SIL
JZ 0x00115847
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00113de0
JMP 0x0011584a
caseD_4:
TEST SIL,SIL
JZ 0x00115854
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00113de0
JMP 0x00115857
caseD_5:
MOV EAX,0xff
ADD EAX,dword ptr [RBX + 0x18]
JMP 0x0011584f
caseD_3:
MOV RDI,qword ptr [RBX + 0x10]
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,0x8
JA 0x001157db
MOV ECX,0x103
BT ECX,EAX
JNC 0x001157db
MOV EBX,dword ptr [RBX + 0x18]
JMP 0x0011586f
default:
MOV EAX,0x1
JMP 0x00115880
LAB_00115847:
MOV EAX,dword ptr [RBX + 0x18]
LAB_0011584a:
ADD EAX,0xff
LAB_0011584f:
SHR EAX,0x8
JMP 0x00115880
LAB_00115854:
MOV EAX,dword ptr [RBX + 0x18]
LAB_00115857:
MOV RDI,qword ptr [RBX + 0x10]
MOV ECX,dword ptr [RDI + 0x8]
CMP ECX,0x8
JA 0x00115880
MOV EDX,0x103
BT EDX,ECX
JNC 0x00115880
MOV EBX,EAX
LAB_0011586f:
CALL 0x00113330
IMUL RAX,RBX
ADD RAX,0x1f
SHR RAX,0x5
LAB_00115880:
ADD RSP,0x20
POP RBX
RET
|
ulong calc_num_leafes(long param_1,char param_2)
{
uint uVar1;
int iVar2;
ulong uVar3;
long lVar4;
lVar4 = *(long *)(param_1 + 0x10);
switch(*(int4 *)(lVar4 + 8)) {
case 3:
uVar1 = *(uint *)(*(long *)(lVar4 + 0x10) + 8);
if ((uVar1 < 9) && ((0x103U >> (uVar1 & 0x1f) & 1) != 0)) {
uVar3 = (ulong)*(uint *)(lVar4 + 0x18);
goto LAB_0011586f;
}
case 2:
uVar3 = (ulong)*(uint *)(lVar4 + 0x18);
break;
case 4:
if (param_2 == '\0') {
uVar3 = (ulong)*(uint *)(lVar4 + 0x18);
}
else {
uVar3 = ssz_len();
}
uVar1 = *(uint *)(*(long *)(lVar4 + 0x10) + 8);
if (8 < uVar1) {
return uVar3;
}
if ((0x103U >> (uVar1 & 0x1f) & 1) == 0) {
return uVar3;
}
uVar3 = uVar3 & 0xffffffff;
LAB_0011586f:
lVar4 = ssz_fixed_length();
return lVar4 * uVar3 + 0x1f >> 5;
case 5:
iVar2 = *(int *)(lVar4 + 0x18);
goto LAB_0011584f;
case 6:
if (param_2 == '\0') {
iVar2 = *(int *)(lVar4 + 0x18);
}
else {
iVar2 = ssz_len();
}
LAB_0011584f:
uVar3 = (ulong)(iVar2 + 0xffU >> 8);
break;
default:
uVar3 = 1;
}
return uVar3;
}
| |
40,279 | my_rnd_ssl | eloqsql/mysys/my_rnd.c | double my_rnd_ssl(struct my_rnd_struct *rand_st)
{
#if defined(HAVE_OPENSSL)
rc= RAND_bytes((unsigned char *) &res, sizeof (unsigned int));
if (rc)
return (double)res / (double)UINT_MAX;
#endif /* defined(HAVE_OPENSSL) */
return my_rnd(rand_st);
} | O3 | c | my_rnd_ssl:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
leaq (%rax,%rax,2), %rax
addq %rsi, %rax
movq 0x10(%rdi), %r8
xorl %edx, %edx
divq %r8
movq %rdx, %rcx
leaq (%rsi,%rdx), %rax
addq $0x21, %rax
xorl %edx, %edx
divq %r8
movq %rdx, 0x8(%rdi)
movq %rcx, (%rdi)
movq %rcx, %xmm1
punpckldq 0x2fdc1(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x2fdc9(%rip), %xmm1 # 0xd90e0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
divsd 0x18(%rdi), %xmm0
popq %rbp
retq
nop
| my_rnd_ssl:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rsi, [rdi+8]
lea rax, [rax+rax*2]
add rax, rsi
mov r8, [rdi+10h]
xor edx, edx
div r8
mov rcx, rdx
lea rax, [rsi+rdx]
add rax, 21h ; '!'
xor edx, edx
div r8
mov [rdi+8], rdx
mov [rdi], rcx
movq xmm1, rcx
punpckldq xmm1, cs:xmmword_D90D0
subpd xmm1, cs:xmmword_D90E0
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
divsd xmm0, qword ptr [rdi+18h]
pop rbp
retn
| double my_rnd_ssl(long long a1)
{
long long v1; // rsi
unsigned long long v2; // r8
unsigned long long v3; // rcx
__m128d v4; // xmm1
v1 = *(_QWORD *)(a1 + 8);
v2 = *(_QWORD *)(a1 + 16);
v3 = (v1 + 3LL * *(_QWORD *)a1) % v2;
*(_QWORD *)(a1 + 8) = (v1 + v3 + 33) % v2;
*(_QWORD *)a1 = v3;
v4 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v3, (__m128i)xmmword_D90D0), (__m128d)xmmword_D90E0);
return (_mm_unpackhi_pd(v4, v4).m128d_f64[0] + v4.m128d_f64[0]) / *(double *)(a1 + 24);
}
| my_rnd_ssl:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
LEA RAX,[RAX + RAX*0x2]
ADD RAX,RSI
MOV R8,qword ptr [RDI + 0x10]
XOR EDX,EDX
DIV R8
MOV RCX,RDX
LEA RAX,[RSI + RDX*0x1]
ADD RAX,0x21
XOR EDX,EDX
DIV R8
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI],RCX
MOVQ XMM1,RCX
PUNPCKLDQ XMM1,xmmword ptr [0x001d90d0]
SUBPD XMM1,xmmword ptr [0x001d90e0]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
DIVSD XMM0,qword ptr [RDI + 0x18]
POP RBP
RET
|
ulong my_rnd_ssl(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
uVar1 = param_1[2];
uVar3 = (*param_1 * 3 + param_1[1]) % uVar1;
uVar2 = param_1[1] + uVar3 + 0x21;
param_1[1] = uVar2 % uVar1;
*param_1 = uVar3;
return uVar2 / uVar1;
}
| |
40,280 | ma_dynstr_realloc | eloqsql/libmariadb/libmariadb/ma_string.c | my_bool ma_dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size)
{
if (!additional_size) return(FALSE);
if (str->length + additional_size > str->max_length)
{
str->max_length=((str->length + additional_size+str->alloc_increment-1)/
str->alloc_increment)*str->alloc_increment;
if (!(str->str=(char*) realloc(str->str,str->max_length)))
return(TRUE);
}
return(FALSE);
} | O0 | c | ma_dynstr_realloc:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4c30d
movb $0x0, -0x1(%rbp)
jmp 0x4c386
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x4c382
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
addq 0x18(%rcx), %rax
subq $0x1, %rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq 0x18(%rcx)
movq %rax, %rcx
movq -0x10(%rbp), %rax
imulq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x14710
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x4c380
movb $0x1, -0x1(%rbp)
jmp 0x4c386
jmp 0x4c382
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nop
| ma_dynstr_realloc:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_18], 0
jnz short loc_4C30D
mov [rbp+var_1], 0
jmp short loc_4C386
loc_4C30D:
mov rax, [rbp+var_10]
mov rax, [rax+8]
add rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
jbe short loc_4C382
mov rax, [rbp+var_10]
mov rax, [rax+8]
add rax, [rbp+var_18]
mov rcx, [rbp+var_10]
add rax, [rcx+18h]
sub rax, 1
mov rcx, [rbp+var_10]
xor edx, edx
div qword ptr [rcx+18h]
mov rcx, rax
mov rax, [rbp+var_10]
imul rcx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
call _realloc
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jnz short loc_4C380
mov [rbp+var_1], 1
jmp short loc_4C386
loc_4C380:
jmp short $+2
loc_4C382:
mov [rbp+var_1], 0
loc_4C386:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| bool ma_dynstr_realloc(long long *a1, long long a2)
{
long long v2; // rax
char v4; // [rsp+1Fh] [rbp-1h]
if ( a2 )
{
v4 = 0;
if ( a2 + a1[1] > (unsigned long long)a1[2] )
{
a1[2] = a1[3] * ((a1[3] + a2 + a1[1] - 1) / (unsigned long long)a1[3]);
v2 = realloc(*a1, a1[2]);
*a1 = v2;
if ( !v2 )
return 1;
}
}
else
{
return 0;
}
return v4;
}
| ma_dynstr_realloc:
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],0x0
JNZ 0x0014c30d
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014c386
LAB_0014c30d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JBE 0x0014c382
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RCX + 0x18]
SUB RAX,0x1
MOV RCX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV qword ptr [RCX + 0x18]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x00114710
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x0014c380
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014c386
LAB_0014c380:
JMP 0x0014c382
LAB_0014c382:
MOV byte ptr [RBP + -0x1],0x0
LAB_0014c386:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 ma_dynstr_realloc(int8 *param_1,long param_2)
{
void *pvVar1;
if ((param_2 != 0) && ((ulong)param_1[2] < (ulong)(param_1[1] + param_2))) {
param_1[2] = (((param_1[1] + param_2 + param_1[3]) - 1U) / (ulong)param_1[3]) * param_1[3];
pvVar1 = realloc((void *)*param_1,param_1[2]);
*param_1 = pvVar1;
if (pvVar1 == (void *)0x0) {
return 1;
}
}
return 0;
}
| |
40,281 | wait_for_readers | eloqsql/mysys/mf_keycache.c | static void wait_for_readers(SIMPLE_KEY_CACHE_CB *keycache,
BLOCK_LINK *block)
{
struct st_my_thread_var *thread= my_thread_var;
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
DBUG_ASSERT(!(block->status & (BLOCK_IN_FLUSH | BLOCK_CHANGED)));
DBUG_ASSERT(block->hash_link);
DBUG_ASSERT(block->hash_link->block == block);
/* Linked in file_blocks or changed_blocks hash. */
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
/* Not linked in LRU ring. */
DBUG_ASSERT(!block->next_used);
DBUG_ASSERT(!block->prev_used);
while (block->hash_link->requests)
{
KEYCACHE_DBUG_PRINT("wait_for_readers: wait",
("suspend thread %ld block %u",
(ulong) thread->id, BLOCK_NUMBER(block)));
/* There must be no other waiter. We have no queue here. */
DBUG_ASSERT(!block->condvar);
block->condvar= &thread->suspend;
keycache_pthread_cond_wait(&thread->suspend, &keycache->cache_lock);
block->condvar= NULL;
}
} | O0 | c | wait_for_readers:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0xff280
movq %rax, -0x18(%rbp)
jmp 0xead4b
jmp 0xead4d
jmp 0xead4f
jmp 0xead51
jmp 0xead53
jmp 0xead55
jmp 0xead57
jmp 0xead59
jmp 0xead5b
jmp 0xead5d
jmp 0xead5f
jmp 0xead61
jmp 0xead63
jmp 0xead65
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpl $0x0, 0x28(%rax)
je 0xeadbd
jmp 0xead75
jmp 0xead77
jmp 0xead79
jmp 0xead7b
movq -0x18(%rbp), %rcx
addq $0x8, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
leaq 0x757c2(%rip), %rdx # 0x160567
movl $0x68f, %ecx # imm = 0x68F
callq 0xea6c0
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
jmp 0xead65
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| wait_for_readers_0:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
call _my_thread_var
mov [rbp+var_18], rax
jmp short $+2
loc_EAD4B:
jmp short $+2
loc_EAD4D:
jmp short $+2
loc_EAD4F:
jmp short $+2
loc_EAD51:
jmp short $+2
loc_EAD53:
jmp short $+2
loc_EAD55:
jmp short $+2
loc_EAD57:
jmp short $+2
loc_EAD59:
jmp short $+2
loc_EAD5B:
jmp short $+2
loc_EAD5D:
jmp short $+2
loc_EAD5F:
jmp short $+2
loc_EAD61:
jmp short $+2
loc_EAD63:
jmp short $+2
loc_EAD65:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
cmp dword ptr [rax+28h], 0
jz short loc_EADBD
jmp short $+2
loc_EAD75:
jmp short $+2
loc_EAD77:
jmp short $+2
loc_EAD79:
jmp short $+2
loc_EAD7B:
mov rcx, [rbp+var_18]
add rcx, 8
mov rax, [rbp+var_10]
mov [rax+68h], rcx
mov rdi, [rbp+var_18]
add rdi, 8
mov rsi, [rbp+var_8]
add rsi, 0C0h
lea rdx, aWorkspaceLlm4b_42; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 68Fh
call inline_mysql_cond_wait_5
mov rax, [rbp+var_10]
mov qword ptr [rax+68h], 0
jmp short loc_EAD65
loc_EADBD:
add rsp, 20h
pop rbp
retn
| long long wait_for_readers_0(long long a1, long long a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-18h]
v3 = my_thread_var(a1, (const char *)a2);
while ( 1 )
{
result = *(_QWORD *)(a2 + 32);
if ( !*(_DWORD *)(result + 40) )
break;
*(_QWORD *)(a2 + 104) = v3 + 8;
inline_mysql_cond_wait_5(
v3 + 8,
a1 + 192,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0x68Fu);
*(_QWORD *)(a2 + 104) = 0LL;
}
return result;
}
| wait_for_readers:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
CALL 0x001ff280
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001ead4b
LAB_001ead4b:
JMP 0x001ead4d
LAB_001ead4d:
JMP 0x001ead4f
LAB_001ead4f:
JMP 0x001ead51
LAB_001ead51:
JMP 0x001ead53
LAB_001ead53:
JMP 0x001ead55
LAB_001ead55:
JMP 0x001ead57
LAB_001ead57:
JMP 0x001ead59
LAB_001ead59:
JMP 0x001ead5b
LAB_001ead5b:
JMP 0x001ead5d
LAB_001ead5d:
JMP 0x001ead5f
LAB_001ead5f:
JMP 0x001ead61
LAB_001ead61:
JMP 0x001ead63
LAB_001ead63:
JMP 0x001ead65
LAB_001ead65:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
CMP dword ptr [RAX + 0x28],0x0
JZ 0x001eadbd
JMP 0x001ead75
LAB_001ead75:
JMP 0x001ead77
LAB_001ead77:
JMP 0x001ead79
LAB_001ead79:
JMP 0x001ead7b
LAB_001ead7b:
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],RCX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
LEA RDX,[0x260567]
MOV ECX,0x68f
CALL 0x001ea6c0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],0x0
JMP 0x001ead65
LAB_001eadbd:
ADD RSP,0x20
POP RBP
RET
|
void wait_for_readers(long param_1,long param_2)
{
long lVar1;
lVar1 = _my_thread_var();
while (*(int *)(*(long *)(param_2 + 0x20) + 0x28) != 0) {
*(long *)(param_2 + 0x68) = lVar1 + 8;
inline_mysql_cond_wait
(lVar1 + 8,param_1 + 0xc0,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x68f);
*(int8 *)(param_2 + 0x68) = 0;
}
return;
}
| |
40,282 | namelist_find | bluesky950520[P]quickjs/run-test262.c | int namelist_find(const namelist_t *lp, const char *name)
{
int a, b, m, cmp;
for (a = 0, b = lp->count; a < b;) {
m = a + (b - a) / 2;
cmp = namelist_cmp(lp->array[m], name);
if (cmp < 0)
a = m + 1;
else if (cmp > 0)
b = m;
else
return m;
}
return -1;
} | O0 | c | namelist_find:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x28(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x18(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x18(%rsp), %eax
jge 0xf552
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x18(%rsp), %eax
subl 0x1c(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xc(%rsp), %eax
addl %ecx, %eax
movl %eax, 0x14(%rsp)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x20(%rsp), %rsi
callq 0xf1f0
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jge 0xf533
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0xf550
cmpl $0x0, 0x10(%rsp)
jle 0xf544
movl 0x14(%rsp), %eax
movl %eax, 0x18(%rsp)
jmp 0xf54e
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0xf55a
jmp 0xf550
jmp 0xf4d2
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| namelist_find:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], 0
mov rax, [rsp+38h+var_10]
mov eax, [rax+8]
mov [rsp+38h+var_20], eax
loc_F4D2:
mov eax, [rsp+38h+var_1C]
cmp eax, [rsp+38h+var_20]
jge short loc_F552
mov eax, [rsp+38h+var_1C]
mov [rsp+38h+var_2C], eax
mov eax, [rsp+38h+var_20]
sub eax, [rsp+38h+var_1C]
mov ecx, 2
cdq
idiv ecx
mov ecx, eax
mov eax, [rsp+38h+var_2C]
add eax, ecx
mov [rsp+38h+var_24], eax
mov rax, [rsp+38h+var_10]
mov rax, [rax]
movsxd rcx, [rsp+38h+var_24]
mov rdi, [rax+rcx*8]
mov rsi, [rsp+38h+var_18]
call namelist_cmp
mov [rsp+38h+var_28], eax
cmp [rsp+38h+var_28], 0
jge short loc_F533
mov eax, [rsp+38h+var_24]
add eax, 1
mov [rsp+38h+var_1C], eax
jmp short loc_F550
loc_F533:
cmp [rsp+38h+var_28], 0
jle short loc_F544
mov eax, [rsp+38h+var_24]
mov [rsp+38h+var_20], eax
jmp short loc_F54E
loc_F544:
mov eax, [rsp+38h+var_24]
mov [rsp+38h+var_4], eax
jmp short loc_F55A
loc_F54E:
jmp short $+2
loc_F550:
jmp short loc_F4D2
loc_F552:
mov [rsp+38h+var_4], 0FFFFFFFFh
loc_F55A:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long namelist_find(long long a1, unsigned __int8 *a2)
{
int v3; // [rsp+10h] [rbp-28h]
int v4; // [rsp+14h] [rbp-24h]
int v5; // [rsp+18h] [rbp-20h]
int v6; // [rsp+1Ch] [rbp-1Ch]
v6 = 0;
v5 = *(_DWORD *)(a1 + 8);
while ( v6 < v5 )
{
v4 = (v5 - v6) / 2 + v6;
v3 = namelist_cmp(*(unsigned __int8 **)(*(_QWORD *)a1 + 8LL * v4), a2);
if ( v3 >= 0 )
{
if ( v3 <= 0 )
return (unsigned int)((v5 - v6) / 2 + v6);
v5 = (v5 - v6) / 2 + v6;
}
else
{
v6 = v4 + 1;
}
}
return (unsigned int)-1;
}
| namelist_find:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV dword ptr [RSP + 0x1c],0x0
MOV RAX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x18],EAX
LAB_0010f4d2:
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RSP + 0x18]
JGE 0x0010f552
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,dword ptr [RSP + 0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,ECX
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RSP + 0x14]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0010f1f0
MOV dword ptr [RSP + 0x10],EAX
CMP dword ptr [RSP + 0x10],0x0
JGE 0x0010f533
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x0010f550
LAB_0010f533:
CMP dword ptr [RSP + 0x10],0x0
JLE 0x0010f544
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x18],EAX
JMP 0x0010f54e
LAB_0010f544:
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x34],EAX
JMP 0x0010f55a
LAB_0010f54e:
JMP 0x0010f550
LAB_0010f550:
JMP 0x0010f4d2
LAB_0010f552:
MOV dword ptr [RSP + 0x34],0xffffffff
LAB_0010f55a:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
int namelist_find(long *param_1,int8 param_2)
{
int iVar1;
int iVar2;
int local_20;
int local_1c;
local_1c = 0;
local_20 = (int)param_1[1];
do {
while( true ) {
if (local_20 <= local_1c) {
return -1;
}
iVar1 = local_1c + (local_20 - local_1c) / 2;
iVar2 = namelist_cmp(*(int8 *)(*param_1 + (long)iVar1 * 8),param_2,
(long)(local_20 - local_1c) % 2 & 0xffffffff);
if (-1 < iVar2) break;
local_1c = iVar1 + 1;
}
local_20 = iVar1;
} while (0 < iVar2);
return iVar1;
}
| |
40,283 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | monkey531[P]llama/common/json.hpp | reference operator[](typename object_t::key_type key)
{
// implicitly convert null value to an empty object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value.object = create<object_t>();
assert_invariant();
}
// operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto result = m_data.m_value.object->emplace(std::move(key), nullptr);
return set_parent(result.first->second);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, (%rdi)
jne 0xabb86
movb $0x1, (%r14)
movl $0x20, %edi
callq 0x1b890
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x57bfe
cmpb $0x1, (%r14)
jne 0xabbf1
movq 0x8(%r14), %r14
movq %rsp, %r15
movb $0x0, (%r15)
movq $0x0, 0x8(%r15)
movq %r15, %rdi
movl $0x1, %esi
callq 0x57bfe
movq %r15, %rdi
movl $0x1, %esi
callq 0x57bfe
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x5eaaa
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x57bfe
movq %r14, %rdi
callq 0x5d3ea
addq $0x20, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e434
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4916f(%rip), %rsi # 0xf4d84
movq %rsp, %rdi
callq 0xabca0
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x5e1dc
xorl %ebp, %ebp
leaq 0x822bc(%rip), %rsi # 0x12def8
leaq -0x516cd(%rip), %rdx # 0x5a576
movq %rbx, %rdi
callq 0x1bef0
movq %rax, %r14
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x57bfe
movq %rbx, %rdi
callq 0x5d3ea
jmp 0xabc98
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xabc8b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0xabc8b
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xabc98
movq %rbx, %rdi
callq 0x1b650
movq %r14, %rdi
callq 0x1bf70
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rdi], 0
jnz short loc_ABB86
mov byte ptr [r14], 1
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_ABB86:
cmp byte ptr [r14], 1
jnz short loc_ABBF1
mov r14, [r14+8]
mov r15, rsp
mov byte ptr [r15], 0
mov qword ptr [r15+8], 0
mov rdi, r15
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, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov rsi, rbx
mov rdx, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(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>&&)
mov rbx, rax
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rbx, 20h ; ' '
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_ABBF1:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_28]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_ABC98
mov r14, rax
lea rax, [rsp+48h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_ABC8B
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_ABC8B
mov r14, rax
mov bpl, 1
loc_ABC8B:
test bpl, bpl
jz short loc_ABC98
mov rdi, rbx; void *
call ___cxa_free_exception
loc_ABC98:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long *a2)
{
long long v2; // rax
_QWORD *v3; // r14
long long v4; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v7[9]; // [rsp+0h] [rbp-48h] BYREF
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 1;
v2 = operator new(0x20uLL);
*(_OWORD *)v2 = 0LL;
*(_QWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7[4] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(
v7,
"cannot use operator[] with a string argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = *(_QWORD **)(a1 + 8);
LOBYTE(v7[0]) = 0;
v7[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((char *)v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7);
v4 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
v3,
a2,
(long long)v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v7);
return v4 + 32;
}
| operator[]:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RDI],0x0
JNZ 0x001abb86
MOV byte ptr [R14],0x1
MOV EDI,0x20
CALL 0x0011b890
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x00157bfe
LAB_001abb86:
CMP byte ptr [R14],0x1
JNZ 0x001abbf1
MOV R14,qword ptr [R14 + 0x8]
MOV R15,RSP
MOV byte ptr [R15],0x0
MOV qword ptr [R15 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00157bfe
MOV RDI,R15
MOV ESI,0x1
CALL 0x00157bfe
LAB_001abbb9:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x0015eaaa
LAB_001abbc7:
MOV RBX,RAX
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x00157bfe
MOV RDI,R14
CALL 0x0015d3ea
ADD RBX,0x20
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001abbf1:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e434
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001abc0e:
LEA RSI,[0x1f4d84]
MOV RDI,RSP
CALL 0x001abca0
MOV BPL,0x1
LAB_001abc20:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0015e1dc
XOR EBP,EBP
LEA RSI,[0x22def8]
LEA RDX,[0x15a576]
MOV RDI,RBX
CALL 0x0011bef0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](std::__cxx11::string) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,string *param_2)
{
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this_00;
int8 *puVar1;
long lVar2;
int8 uVar3;
bool bVar4;
basic_json local_48 [8];
int8 local_40;
char *local_28;
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
puVar1 = (int8 *)operator_new(0x20);
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
this_00 = *(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8);
local_48[0] = (basic_json)0x0;
local_40 = 0;
bVar4 = SUB81(local_48,0);
assert_invariant(bVar4);
assert_invariant(bVar4);
/* try { // try from 001abbb9 to 001abbc6 has its CatchHandler @ 001abc4b */
lVar2 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace(this_00,param_2,local_48);
assert_invariant(bVar4);
data::~data((data *)local_48);
return lVar2 + 0x20;
}
uVar3 = __cxa_allocate_exception(0x20);
local_28 = (char *)type_name(this);
/* try { // try from 001abc0e to 001abc1c has its CatchHandler @ 001abc85 */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
((detail *)local_48,"cannot use operator[] with a string argument with ",&local_28);
/* try { // try from 001abc20 to 001abc4a has its CatchHandler @ 001abc65 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x131,local_48,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
40,284 | my_tosort_unicode | eloqsql/strings/ctype-utf8.c | static inline void
my_tosort_unicode(MY_UNICASE_INFO *uni_plane, my_wc_t *wc, uint flags)
{
if (*wc <= uni_plane->maxchar)
{
MY_UNICASE_CHARACTER *page;
if ((page= uni_plane->page[*wc >> 8]))
*wc= (flags & MY_CS_LOWER_SORT) ?
page[*wc & 0xFF].tolower :
page[*wc & 0xFF].sort;
}
else
{
*wc= MY_CS_REPLACEMENT_CHARACTER;
}
} | O0 | c | my_tosort_unicode:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x65f8d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x65f8b
movl -0x14(%rbp), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
je 0x65f5e
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
andq $0xff, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x65f7d
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
andq $0xff, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x65f98
movq -0x10(%rbp), %rax
movq $0xfffd, (%rax) # imm = 0xFFFD
popq %rbp
retq
nopw (%rax,%rax)
| my_tosort_unicode:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_8]
cmp rax, [rcx]
ja short loc_65F8D
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
shr rcx, 8
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_65F8B
mov eax, [rbp+var_14]
and eax, 8000h
cmp eax, 0
jz short loc_65F5E
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
and rcx, 0FFh
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_24], eax
jmp short loc_65F7D
loc_65F5E:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
and rcx, 0FFh
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+8]
mov [rbp+var_24], eax
loc_65F7D:
mov eax, [rbp+var_24]
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
loc_65F8B:
jmp short loc_65F98
loc_65F8D:
mov rax, [rbp+var_10]
mov qword ptr [rax], 0FFFDh
loc_65F98:
pop rbp
retn
| _QWORD * my_tosort_unicode(_QWORD *a1, _QWORD *a2, __int16 a3)
{
_QWORD *result; // rax
unsigned int v4; // [rsp+0h] [rbp-24h]
if ( *a2 > *a1 )
{
result = a2;
*a2 = 65533LL;
}
else
{
result = *(_QWORD **)(a1[1] + 8LL * (*a2 >> 8));
if ( result )
{
if ( a3 < 0 )
v4 = *((_DWORD *)result + 3 * (unsigned __int8)*a2 + 1);
else
v4 = *((_DWORD *)result + 3 * (unsigned __int8)*a2 + 2);
result = a2;
*a2 = v4;
}
}
return result;
}
| my_tosort_unicode:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX]
JA 0x00165f8d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x00165f8b
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x8000
CMP EAX,0x0
JZ 0x00165f5e
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
AND RCX,0xff
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00165f7d
LAB_00165f5e:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
AND RCX,0xff
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x24],EAX
LAB_00165f7d:
MOV EAX,dword ptr [RBP + -0x24]
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
LAB_00165f8b:
JMP 0x00165f98
LAB_00165f8d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0xfffd
LAB_00165f98:
POP RBP
RET
|
void my_tosort_unicode(ulong *param_1,ulong *param_2,uint param_3)
{
long lVar1;
uint local_2c;
if (*param_1 < *param_2) {
*param_2 = 0xfffd;
}
else {
lVar1 = *(long *)(param_1[1] + (*param_2 >> 8) * 8);
if (lVar1 != 0) {
if ((param_3 & 0x8000) == 0) {
local_2c = *(uint *)(lVar1 + (*param_2 & 0xff) * 0xc + 8);
}
else {
local_2c = *(uint *)(lVar1 + (*param_2 & 0xff) * 0xc + 4);
}
*param_2 = (ulong)local_2c;
}
}
return;
}
| |
40,285 | js_parse_property_name | bluesky950520[P]quickjs/quickjs.c | static int __exception js_parse_property_name(JSParseState *s,
JSAtom *pname,
BOOL allow_method, BOOL allow_var,
BOOL allow_private)
{
int is_private = 0;
BOOL is_non_reserved_ident;
JSAtom name;
int prop_type;
prop_type = PROP_TYPE_IDENT;
if (allow_method) {
if (token_is_pseudo_keyword(s, JS_ATOM_get)
|| token_is_pseudo_keyword(s, JS_ATOM_set)) {
/* get x(), set x() */
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
prop_type = PROP_TYPE_GET + (name == JS_ATOM_set);
JS_FreeAtom(s->ctx, name);
} else if (s->token.val == '*') {
if (next_token(s))
goto fail;
prop_type = PROP_TYPE_STAR;
} else if (token_is_pseudo_keyword(s, JS_ATOM_async) &&
peek_token(s, TRUE) != '\n') {
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
JS_FreeAtom(s->ctx, name);
if (s->token.val == '*') {
if (next_token(s))
goto fail;
prop_type = PROP_TYPE_ASYNC_STAR;
} else {
prop_type = PROP_TYPE_ASYNC;
}
}
}
if (token_is_ident(s->token.val)) {
/* variable can only be a non-reserved identifier */
is_non_reserved_ident =
(s->token.val == TOK_IDENT && !s->token.u.ident.is_reserved);
/* keywords and reserved words have a valid atom */
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
ident_found:
if (is_non_reserved_ident &&
prop_type == PROP_TYPE_IDENT && allow_var) {
if (!(s->token.val == ':' ||
(s->token.val == '(' && allow_method))) {
prop_type = PROP_TYPE_VAR;
}
}
} else if (s->token.val == TOK_STRING) {
name = JS_ValueToAtom(s->ctx, s->token.u.str.str);
if (name == JS_ATOM_NULL)
goto fail;
if (next_token(s))
goto fail1;
} else if (s->token.val == TOK_NUMBER) {
JSValue val;
val = s->token.u.num.val;
name = JS_ValueToAtom(s->ctx, val);
if (name == JS_ATOM_NULL)
goto fail;
if (next_token(s))
goto fail1;
} else if (s->token.val == '[') {
if (next_token(s))
goto fail;
if (js_parse_expr(s))
goto fail;
if (js_parse_expect(s, ']'))
goto fail;
name = JS_ATOM_NULL;
} else if (s->token.val == TOK_PRIVATE_NAME && allow_private) {
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
is_private = PROP_TYPE_PRIVATE;
} else {
goto invalid_prop;
}
if (prop_type != PROP_TYPE_IDENT && prop_type != PROP_TYPE_VAR &&
s->token.val != '(') {
JS_FreeAtom(s->ctx, name);
invalid_prop:
js_parse_error(s, "invalid property name");
goto fail;
}
*pname = name;
return prop_type | is_private;
fail1:
JS_FreeAtom(s->ctx, name);
fail:
*pname = JS_ATOM_NULL;
return -1;
} | O2 | c | js_parse_property_name:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r13d
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
xorl %r12d, %r12d
testl %edx, %edx
je 0x560c9
pushq $0x42
popq %rsi
movq %r14, %rdi
callq 0x50fae
testl %eax, %eax
jne 0x5604e
pushq $0x43
popq %rsi
movq %r14, %rdi
callq 0x50fae
testl %eax, %eax
je 0x5617f
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x5606c
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x56164
movl %ebx, 0xc(%rsp)
movl 0x20(%r14), %eax
xorl %r12d, %r12d
pushq $0x1
popq %rbx
cmpq $0x3d, %rax
ja 0x560a4
movabsq $0x2c00110000000000, %rcx # imm = 0x2C00110000000000
btq %rax, %rcx
jb 0x5629a
cmpl $0x7d, %eax
je 0x5629a
xorl %r12d, %r12d
cmpl $0x43, %r15d
sete %r12b
orl $0x2, %r12d
movq (%r14), %rdi
movl %r15d, %esi
callq 0x19e19
jmp 0x560cd
movl %ebx, 0xc(%rsp)
movl 0x20(%r14), %eax
cmpl $-0x7d, %eax
setne %cl
leal 0x27(%rax), %edx
cmpl $-0x2e, %edx
setb %dl
testb %dl, %cl
je 0x56125
cmpl $-0x80, %eax
je 0x560fb
cmpl $0x5b, %eax
je 0x561a3
cmpl $-0x7f, %eax
jne 0x561d2
movq (%r14), %rdi
movq 0x38(%r14), %rsi
movq 0x40(%r14), %rdx
callq 0x1d540
testl %eax, %eax
je 0x5616f
movl %eax, %r15d
movq %r14, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x56164
xorl %eax, %eax
jmp 0x562cd
xorl %ebx, %ebx
cmpl $-0x7d, %eax
jne 0x56136
xorl %ebx, %ebx
cmpl $0x0, 0x40(%r14)
sete %bl
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x56154
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x4eed2
testl %eax, %eax
je 0x5629a
movq (%r14), %rdi
movl %r15d, %esi
callq 0x19e19
movq 0x10(%rsp), %rax
andl $0x0, (%rax)
pushq $-0x1
popq %rax
jmp 0x562e5
cmpl $0x2a, 0x20(%r14)
jne 0x5621c
movq %r14, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x5616f
movl %ebx, 0xc(%rsp)
pushq $0x4
popq %r12
jmp 0x560cd
movq %r14, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x5616f
movq %r14, %rdi
callq 0x593ea
testl %eax, %eax
jne 0x5616f
pushq $0x5d
popq %rsi
movq %r14, %rdi
callq 0x546bf
testl %eax, %eax
jne 0x5616f
xorl %r15d, %r15d
jmp 0x5611e
cmpl $-0x57, %eax
setne %al
testl %r13d, %r13d
sete %cl
orb %al, %cl
jne 0x562ff
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x56204
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x56164
pushq $0x10
popq %rax
jmp 0x562cd
movl %ebx, 0xc(%rsp)
movq %r14, %rdi
movl $0x86, %esi
callq 0x50fae
testl %eax, %eax
je 0x560cd
pushq $0x1
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
callq 0x50fc5
cmpl $0xa, %eax
je 0x560cd
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x56269
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x56164
movl 0x20(%r14), %eax
xorl %r12d, %r12d
cmpq $0x3d, %rax
ja 0x56315
movabsq $0x2c00110000000000, %rcx # imm = 0x2C00110000000000
btq %rax, %rcx
jae 0x56315
xorl %eax, %eax
cmpl $0x0, 0xc(%rsp)
je 0x562cd
testl %ebx, %ebx
je 0x562cd
testl %r12d, %r12d
jne 0x562cd
testl %ebp, %ebp
sete %al
movl 0x20(%r14), %ecx
cmpl $0x3a, %ecx
setne %dl
cmpl $0x28, %ecx
setne %cl
orb %al, %cl
andb %dl, %cl
movzbl %cl, %r12d
xorl %eax, %eax
jmp 0x562da
cmpl $0x2, %r12d
jb 0x562da
cmpl $0x28, 0x20(%r14)
jne 0x562f4
orl %r12d, %eax
movq 0x10(%rsp), %rcx
movl %r15d, (%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
movl %r15d, %esi
callq 0x19e19
leaq 0x30689(%rip), %rsi # 0x8698f
movq %r14, %rdi
xorl %eax, %eax
callq 0x278db
jmp 0x5616f
cmpl $0x7d, %eax
je 0x5629a
movq (%r14), %rdi
movl %r15d, %esi
callq 0x19e19
cmpl $0x2a, 0x20(%r14)
jne 0x56343
movq %r14, %rdi
callq 0x4eed2
testl %eax, %eax
jne 0x5616f
pushq $0x6
jmp 0x5619c
pushq $0x5
jmp 0x5619c
| js_parse_property_name:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13d, r8d
mov ebx, ecx
mov ebp, edx
mov [rsp+48h+var_38], rsi
mov r14, rdi
xor r12d, r12d
test edx, edx
jz loc_560C9
push 42h ; 'B'
pop rsi
mov rdi, r14
call token_is_pseudo_keyword
test eax, eax
jnz short loc_5604E
push 43h ; 'C'
pop rsi
mov rdi, r14
call token_is_pseudo_keyword
test eax, eax
jz loc_5617F
loc_5604E:
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_5606C
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_5606C:
mov rdi, r14
call next_token
test eax, eax
jnz loc_56164
mov [rsp+48h+var_3C], ebx
mov eax, [r14+20h]
xor r12d, r12d
push 1
pop rbx
cmp rax, 3Dh ; '='
ja short loc_560A4
mov rcx, 2C00110000000000h
bt rcx, rax
jb loc_5629A
loc_560A4:
cmp eax, 7Dh ; '}'
jz loc_5629A
xor r12d, r12d
cmp r15d, 43h ; 'C'
setz r12b
or r12d, 2
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
jmp short loc_560CD
loc_560C9:
mov [rsp+48h+var_3C], ebx
loc_560CD:
mov eax, [r14+20h]
cmp eax, 0FFFFFF83h
setnz cl
lea edx, [rax+27h]
cmp edx, 0FFFFFFD2h
setb dl
test cl, dl
jz short loc_56125
cmp eax, 0FFFFFF80h
jz short loc_560FB
cmp eax, 5Bh ; '['
jz loc_561A3
cmp eax, 0FFFFFF81h
jnz loc_561D2
loc_560FB:
mov rdi, [r14]
mov rsi, [r14+38h]
mov rdx, [r14+40h]
call JS_ValueToAtom
test eax, eax
jz short loc_5616F
mov r15d, eax
mov rdi, r14
call next_token
test eax, eax
jnz short loc_56164
loc_5611E:
xor eax, eax
jmp loc_562CD
loc_56125:
xor ebx, ebx
cmp eax, 0FFFFFF83h
jnz short loc_56136
xor ebx, ebx
cmp dword ptr [r14+40h], 0
setz bl
loc_56136:
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_56154
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_56154:
mov rdi, r14
call next_token
test eax, eax
jz loc_5629A
loc_56164:
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
loc_5616F:
mov rax, [rsp+48h+var_38]
and dword ptr [rax], 0
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp loc_562E5
loc_5617F:
cmp dword ptr [r14+20h], 2Ah ; '*'
jnz loc_5621C
mov rdi, r14
call next_token
test eax, eax
jnz short loc_5616F
mov [rsp+48h+var_3C], ebx
push 4
loc_5619C:
pop r12
jmp loc_560CD
loc_561A3:
mov rdi, r14
call next_token
test eax, eax
jnz short loc_5616F
mov rdi, r14
call js_parse_expr
test eax, eax
jnz short loc_5616F
push 5Dh ; ']'
pop rsi
mov rdi, r14
call js_parse_expect
test eax, eax
jnz short loc_5616F
xor r15d, r15d
jmp loc_5611E
loc_561D2:
cmp eax, 0FFFFFFA9h
setnz al
test r13d, r13d
setz cl
or cl, al
jnz loc_562FF
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_56204
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_56204:
mov rdi, r14
call next_token
test eax, eax
jnz loc_56164
push 10h
pop rax
jmp loc_562CD
loc_5621C:
mov [rsp+48h+var_3C], ebx
mov rdi, r14
mov esi, 86h
call token_is_pseudo_keyword
test eax, eax
jz loc_560CD
push 1
pop rbx
mov rdi, r14
mov esi, ebx
call peek_token
cmp eax, 0Ah
jz loc_560CD
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_56269
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_56269:
mov rdi, r14
call next_token
test eax, eax
jnz loc_56164
mov eax, [r14+20h]
xor r12d, r12d
cmp rax, 3Dh ; '='
ja loc_56315
mov rcx, 2C00110000000000h
bt rcx, rax
jnb short loc_56315
loc_5629A:
xor eax, eax
cmp [rsp+48h+var_3C], 0
jz short loc_562CD
test ebx, ebx
jz short loc_562CD
test r12d, r12d
jnz short loc_562CD
test ebp, ebp
setz al
mov ecx, [r14+20h]
cmp ecx, 3Ah ; ':'
setnz dl
cmp ecx, 28h ; '('
setnz cl
or cl, al
and cl, dl
movzx r12d, cl
xor eax, eax
jmp short loc_562DA
loc_562CD:
cmp r12d, 2
jb short loc_562DA
cmp dword ptr [r14+20h], 28h ; '('
jnz short loc_562F4
loc_562DA:
or eax, r12d
mov rcx, [rsp+48h+var_38]
mov [rcx], r15d
loc_562E5:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_562F4:
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
loc_562FF:
lea rsi, aInvalidPropert_1; "invalid property name"
mov rdi, r14
xor eax, eax
call js_parse_error
jmp loc_5616F
loc_56315:
cmp eax, 7Dh ; '}'
jz short loc_5629A
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
cmp dword ptr [r14+20h], 2Ah ; '*'
jnz short loc_56343
mov rdi, r14
call next_token
test eax, eax
jnz loc_5616F
push 6
jmp loc_5619C
loc_56343:
push 5
jmp loc_5619C
| long long js_parse_property_name(
long long a1,
long long a2,
int a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v14; // r13d
int v15; // ebx
unsigned int v17; // r12d
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // r15
_DWORD *v25; // rax
unsigned long long v26; // rax
BOOL v27; // ebx
long long v28; // rcx
int v29; // eax
long long v30; // rdx
long long v31; // rsi
int v32; // eax
long long v33; // rdx
long long v34; // rcx
long long v35; // r8
long long v36; // r9
__m128 v37; // xmm4
__m128 v38; // xmm5
int v39; // eax
_DWORD *v40; // rax
long long result; // rax
long long v42; // rdx
long long v43; // rcx
long long v44; // r8
long long v45; // r9
__m128 v46; // xmm4
__m128 v47; // xmm5
_DWORD *v48; // rax
long long v49; // rdx
_DWORD *v50; // rax
unsigned long long v51; // rax
long long v52; // rcx
long long v53; // rdx
int v54; // [rsp-8h] [rbp-50h]
char v55; // [rsp+0h] [rbp-48h]
int v56; // [rsp+Ch] [rbp-3Ch]
_DWORD *v57; // [rsp+10h] [rbp-38h]
v14 = a5;
v15 = a4;
v57 = (_DWORD *)a2;
v17 = 0;
if ( a3 )
{
a2 = 66LL;
if ( token_is_pseudo_keyword((_DWORD *)a1, 66) || (a2 = 67LL, token_is_pseudo_keyword((_DWORD *)a1, 67)) )
{
v24 = *(int *)(a1 + 56);
if ( v24 >= 224 )
{
v25 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v24);
++*v25;
}
if ( (unsigned int)next_token(a1, a2, v18, a7, a8, a9, a10, v22, v23, a13, a14, v19, v20, v21) )
goto LABEL_24;
v56 = v15;
v26 = *(unsigned int *)(a1 + 32);
v17 = 0;
v27 = 1;
if ( v26 <= 0x3D )
{
v28 = 0x2C00110000000000LL;
if ( _bittest64(&v28, v26) )
goto LABEL_46;
}
if ( (_DWORD)v26 == 125 )
goto LABEL_46;
v17 = ((_DWORD)v24 == 67) | 2;
a2 = (unsigned int)v24;
JS_FreeAtom(*(_QWORD *)a1, v24);
}
else
{
if ( *(_DWORD *)(a1 + 32) == 42 )
{
if ( (unsigned int)next_token(a1, 67LL, v18, a7, a8, a9, a10, v22, v23, a13, a14, v19, v20, v21) )
goto LABEL_25;
v56 = v15;
v54 = 4;
}
else
{
v56 = v15;
a2 = 134LL;
if ( !token_is_pseudo_keyword((_DWORD *)a1, 134) )
goto LABEL_12;
v27 = 1;
a2 = 1LL;
if ( (unsigned int)peek_token(a1, 1) == 10 )
goto LABEL_12;
v24 = *(int *)(a1 + 56);
if ( v24 >= 224 )
{
v50 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v24);
++*v50;
}
if ( (unsigned int)next_token(a1, 1LL, v49, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_24;
v51 = *(unsigned int *)(a1 + 32);
v17 = 0;
if ( v51 <= 0x3D )
{
v52 = 0x2C00110000000000LL;
if ( _bittest64(&v52, v51) )
goto LABEL_46;
}
if ( (_DWORD)v51 == 125 )
goto LABEL_46;
a2 = (unsigned int)v24;
JS_FreeAtom(*(_QWORD *)a1, v24);
if ( *(_DWORD *)(a1 + 32) == 42 )
{
if ( (unsigned int)next_token(a1, (unsigned int)v24, v53, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_25;
v54 = 6;
}
else
{
v54 = 5;
}
}
v17 = v54;
}
}
else
{
v56 = a4;
}
LABEL_12:
v29 = *(_DWORD *)(a1 + 32);
LOBYTE(a4) = v29 != -125;
v30 = (unsigned int)(v29 + 39);
LOBYTE(v30) = (unsigned int)v30 < 0xFFFFFFD2;
if ( ((unsigned __int8)v30 & (unsigned __int8)a4) != 0 )
{
switch ( v29 )
{
case -128:
goto LABEL_16;
case 91:
if ( (unsigned int)next_token(a1, a2, v30, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6)
|| (unsigned int)js_parse_expr(a1)
|| (unsigned int)js_parse_expect(a1, 93LL, v42, v43, v44, v45, a7, a8, a9, a10, v46, v47, a13, a14) )
{
goto LABEL_25;
}
LODWORD(v24) = 0;
goto LABEL_18;
case -127:
LABEL_16:
v31 = *(_QWORD *)(a1 + 56);
v32 = JS_ValueToAtom(*(_QWORD *)a1, v31, *(_QWORD *)(a1 + 64));
if ( !v32 )
{
LABEL_25:
*v57 = 0;
return -1LL;
}
LODWORD(v24) = v32;
if ( !(unsigned int)next_token(a1, v31, v33, a7, a8, a9, a10, v37, v38, a13, a14, v34, v35, v36) )
{
LABEL_18:
v39 = 0;
goto LABEL_50;
}
break;
default:
LOBYTE(a4) = v29 != -87 || v14 == 0;
if ( (_BYTE)a4 )
{
LABEL_54:
js_parse_error(
(long long *)a1,
(long long)"invalid property name",
v30,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v55);
goto LABEL_25;
}
v24 = *(int *)(a1 + 56);
if ( v24 >= 224 )
{
v48 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v24);
++*v48;
}
if ( !(unsigned int)next_token(a1, a2, v30, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
{
v39 = 16;
LABEL_50:
if ( v17 < 2 || *(_DWORD *)(a1 + 32) == 40 )
goto LABEL_52;
JS_FreeAtom(*(_QWORD *)a1, v24);
goto LABEL_54;
}
break;
}
LABEL_24:
JS_FreeAtom(*(_QWORD *)a1, v24);
goto LABEL_25;
}
v27 = 0;
if ( v29 == -125 )
v27 = *(_DWORD *)(a1 + 64) == 0;
v24 = *(int *)(a1 + 56);
if ( v24 >= 224 )
{
v40 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v24);
++*v40;
}
if ( (unsigned int)next_token(a1, a2, v30, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_24;
LABEL_46:
v39 = 0;
if ( !v56 || !v27 || v17 )
goto LABEL_50;
v17 = *(_DWORD *)(a1 + 32) != 58 && (a3 == 0 || *(_DWORD *)(a1 + 32) != 40);
v39 = 0;
LABEL_52:
result = v17 | v39;
*v57 = v24;
return result;
}
| js_parse_property_name:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13D,R8D
MOV EBX,ECX
MOV EBP,EDX
MOV qword ptr [RSP + 0x10],RSI
MOV R14,RDI
XOR R12D,R12D
TEST EDX,EDX
JZ 0x001560c9
PUSH 0x42
POP RSI
MOV RDI,R14
CALL 0x00150fae
TEST EAX,EAX
JNZ 0x0015604e
PUSH 0x43
POP RSI
MOV RDI,R14
CALL 0x00150fae
TEST EAX,EAX
JZ 0x0015617f
LAB_0015604e:
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x0015606c
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_0015606c:
MOV RDI,R14
CALL 0x0014eed2
TEST EAX,EAX
JNZ 0x00156164
MOV dword ptr [RSP + 0xc],EBX
MOV EAX,dword ptr [R14 + 0x20]
XOR R12D,R12D
PUSH 0x1
POP RBX
CMP RAX,0x3d
JA 0x001560a4
MOV RCX,0x2c00110000000000
BT RCX,RAX
JC 0x0015629a
LAB_001560a4:
CMP EAX,0x7d
JZ 0x0015629a
XOR R12D,R12D
CMP R15D,0x43
SETZ R12B
OR R12D,0x2
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x00119e19
JMP 0x001560cd
LAB_001560c9:
MOV dword ptr [RSP + 0xc],EBX
LAB_001560cd:
MOV EAX,dword ptr [R14 + 0x20]
CMP EAX,-0x7d
SETNZ CL
LEA EDX,[RAX + 0x27]
CMP EDX,-0x2e
SETC DL
TEST CL,DL
JZ 0x00156125
CMP EAX,-0x80
JZ 0x001560fb
CMP EAX,0x5b
JZ 0x001561a3
CMP EAX,-0x7f
JNZ 0x001561d2
LAB_001560fb:
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x38]
MOV RDX,qword ptr [R14 + 0x40]
CALL 0x0011d540
TEST EAX,EAX
JZ 0x0015616f
MOV R15D,EAX
MOV RDI,R14
CALL 0x0014eed2
TEST EAX,EAX
JNZ 0x00156164
LAB_0015611e:
XOR EAX,EAX
JMP 0x001562cd
LAB_00156125:
XOR EBX,EBX
CMP EAX,-0x7d
JNZ 0x00156136
XOR EBX,EBX
CMP dword ptr [R14 + 0x40],0x0
SETZ BL
LAB_00156136:
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x00156154
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_00156154:
MOV RDI,R14
CALL 0x0014eed2
TEST EAX,EAX
JZ 0x0015629a
LAB_00156164:
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x00119e19
LAB_0015616f:
MOV RAX,qword ptr [RSP + 0x10]
AND dword ptr [RAX],0x0
PUSH -0x1
POP RAX
JMP 0x001562e5
LAB_0015617f:
CMP dword ptr [R14 + 0x20],0x2a
JNZ 0x0015621c
MOV RDI,R14
CALL 0x0014eed2
TEST EAX,EAX
JNZ 0x0015616f
MOV dword ptr [RSP + 0xc],EBX
PUSH 0x4
LAB_0015619c:
POP R12
JMP 0x001560cd
LAB_001561a3:
MOV RDI,R14
CALL 0x0014eed2
TEST EAX,EAX
JNZ 0x0015616f
MOV RDI,R14
CALL 0x001593ea
TEST EAX,EAX
JNZ 0x0015616f
PUSH 0x5d
POP RSI
MOV RDI,R14
CALL 0x001546bf
TEST EAX,EAX
JNZ 0x0015616f
XOR R15D,R15D
JMP 0x0015611e
LAB_001561d2:
CMP EAX,-0x57
SETNZ AL
TEST R13D,R13D
SETZ CL
OR CL,AL
JNZ 0x001562ff
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x00156204
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_00156204:
MOV RDI,R14
CALL 0x0014eed2
TEST EAX,EAX
JNZ 0x00156164
PUSH 0x10
POP RAX
JMP 0x001562cd
LAB_0015621c:
MOV dword ptr [RSP + 0xc],EBX
MOV RDI,R14
MOV ESI,0x86
CALL 0x00150fae
TEST EAX,EAX
JZ 0x001560cd
PUSH 0x1
POP RBX
MOV RDI,R14
MOV ESI,EBX
CALL 0x00150fc5
CMP EAX,0xa
JZ 0x001560cd
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x00156269
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_00156269:
MOV RDI,R14
CALL 0x0014eed2
TEST EAX,EAX
JNZ 0x00156164
MOV EAX,dword ptr [R14 + 0x20]
XOR R12D,R12D
CMP RAX,0x3d
JA 0x00156315
MOV RCX,0x2c00110000000000
BT RCX,RAX
JNC 0x00156315
LAB_0015629a:
XOR EAX,EAX
CMP dword ptr [RSP + 0xc],0x0
JZ 0x001562cd
TEST EBX,EBX
JZ 0x001562cd
TEST R12D,R12D
JNZ 0x001562cd
TEST EBP,EBP
SETZ AL
MOV ECX,dword ptr [R14 + 0x20]
CMP ECX,0x3a
SETNZ DL
CMP ECX,0x28
SETNZ CL
OR CL,AL
AND CL,DL
MOVZX R12D,CL
XOR EAX,EAX
JMP 0x001562da
LAB_001562cd:
CMP R12D,0x2
JC 0x001562da
CMP dword ptr [R14 + 0x20],0x28
JNZ 0x001562f4
LAB_001562da:
OR EAX,R12D
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [RCX],R15D
LAB_001562e5:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001562f4:
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x00119e19
LAB_001562ff:
LEA RSI,[0x18698f]
MOV RDI,R14
XOR EAX,EAX
CALL 0x001278db
JMP 0x0015616f
LAB_00156315:
CMP EAX,0x7d
JZ 0x0015629a
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x00119e19
CMP dword ptr [R14 + 0x20],0x2a
JNZ 0x00156343
MOV RDI,R14
CALL 0x0014eed2
TEST EAX,EAX
JNZ 0x0015616f
PUSH 0x6
JMP 0x0015619c
LAB_00156343:
PUSH 0x5
JMP 0x0015619c
|
ulong js_parse_property_name(long *param_1,int4 *param_2,int param_3,int param_4,int param_5)
{
int *piVar1;
long lVar2;
int iVar3;
int iVar4;
uint uVar5;
uint uVar6;
int4 uVar7;
ulong uVar8;
bool bVar9;
uVar6 = 0;
if (param_3 == 0) goto LAB_001560cd;
iVar3 = token_is_pseudo_keyword(param_1,0x42);
if ((iVar3 == 0) && (iVar3 = token_is_pseudo_keyword(param_1,0x43), iVar3 == 0)) {
if ((int)param_1[4] == 0x2a) {
iVar3 = next_token(param_1);
if (iVar3 == 0) {
uVar6 = 4;
goto LAB_001560cd;
}
}
else {
iVar3 = token_is_pseudo_keyword(param_1,0x86);
uVar6 = 0;
if (iVar3 != 0) {
bVar9 = true;
iVar3 = peek_token(param_1,1);
uVar6 = 0;
if (iVar3 != 10) {
lVar2 = param_1[7];
uVar8 = (ulong)(int)lVar2;
if (0xdf < (long)uVar8) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar8 * 8);
*piVar1 = *piVar1 + 1;
}
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_00156164;
uVar5 = *(uint *)(param_1 + 4);
if ((((ulong)uVar5 < 0x3e) &&
(uVar6 = 0, (0x2c00110000000000U >> ((ulong)uVar5 & 0x3f) & 1) != 0)) ||
(uVar6 = 0, uVar5 == 0x7d)) goto LAB_0015629a;
JS_FreeAtom(*param_1,(int)lVar2);
if ((int)param_1[4] == 0x2a) {
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_0015616f;
uVar6 = 6;
}
else {
uVar6 = 5;
}
}
}
LAB_001560cd:
iVar3 = (int)param_1[4];
if (iVar3 == -0x7d || 0xffffffd1 < iVar3 + 0x27U) {
bVar9 = false;
if (iVar3 == -0x7d) {
bVar9 = (int)param_1[8] == 0;
}
uVar8 = (ulong)(int)param_1[7];
if (0xdf < (long)uVar8) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar8 * 8);
*piVar1 = *piVar1 + 1;
}
iVar3 = next_token(param_1);
if (iVar3 == 0) goto LAB_0015629a;
goto LAB_00156164;
}
if (iVar3 == -0x80) {
LAB_001560fb:
uVar5 = JS_ValueToAtom(*param_1,param_1[7],param_1[8]);
if (uVar5 == 0) goto LAB_0015616f;
uVar8 = (ulong)uVar5;
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_00156164;
LAB_0015611e:
uVar5 = 0;
goto LAB_001562cd;
}
if (iVar3 == 0x5b) {
iVar3 = next_token(param_1);
if (((iVar3 != 0) || (iVar3 = js_parse_expr(param_1), iVar3 != 0)) ||
(iVar3 = js_parse_expect(param_1,0x5d), iVar3 != 0)) goto LAB_0015616f;
uVar8 = 0;
goto LAB_0015611e;
}
if (iVar3 == -0x7f) goto LAB_001560fb;
if (param_5 != 0 && iVar3 == -0x57) {
uVar8 = (ulong)(int)param_1[7];
if (0xdf < (long)uVar8) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar8 * 8);
*piVar1 = *piVar1 + 1;
}
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_00156164;
uVar5 = 0x10;
goto LAB_001562cd;
}
LAB_001562ff:
js_parse_error(param_1,"invalid property name");
}
LAB_0015616f:
*param_2 = 0;
uVar8 = 0xffffffffffffffff;
}
else {
iVar3 = (int)param_1[7];
uVar8 = (ulong)iVar3;
if (0xdf < (long)uVar8) {
piVar1 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar8 * 8);
*piVar1 = *piVar1 + 1;
}
iVar4 = next_token(param_1);
if (iVar4 != 0) {
LAB_00156164:
JS_FreeAtom(*param_1,uVar8 & 0xffffffff);
goto LAB_0015616f;
}
uVar5 = *(uint *)(param_1 + 4);
bVar9 = true;
uVar6 = 0;
if (((0x3d < (ulong)uVar5) || ((0x2c00110000000000U >> ((ulong)uVar5 & 0x3f) & 1) == 0)) &&
(uVar5 != 0x7d)) {
JS_FreeAtom(*param_1,iVar3);
uVar6 = iVar3 == 0x43 | 2;
goto LAB_001560cd;
}
LAB_0015629a:
uVar7 = (int4)uVar8;
uVar5 = 0;
if (((param_4 == 0) || (!bVar9)) || (uVar6 != 0)) {
LAB_001562cd:
uVar7 = (int4)uVar8;
if ((1 < uVar6) && ((int)param_1[4] != 0x28)) {
JS_FreeAtom(*param_1,uVar8 & 0xffffffff);
goto LAB_001562ff;
}
}
else {
uVar6 = (uint)(((int)param_1[4] != 0x28 || param_3 == 0) && (int)param_1[4] != 0x3a);
uVar5 = 0;
}
uVar8 = (ulong)(uVar5 | uVar6);
*param_2 = uVar7;
}
return uVar8;
}
| |
40,286 | js_parse_property_name | bluesky950520[P]quickjs/quickjs.c | static int __exception js_parse_property_name(JSParseState *s,
JSAtom *pname,
BOOL allow_method, BOOL allow_var,
BOOL allow_private)
{
int is_private = 0;
BOOL is_non_reserved_ident;
JSAtom name;
int prop_type;
prop_type = PROP_TYPE_IDENT;
if (allow_method) {
if (token_is_pseudo_keyword(s, JS_ATOM_get)
|| token_is_pseudo_keyword(s, JS_ATOM_set)) {
/* get x(), set x() */
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
prop_type = PROP_TYPE_GET + (name == JS_ATOM_set);
JS_FreeAtom(s->ctx, name);
} else if (s->token.val == '*') {
if (next_token(s))
goto fail;
prop_type = PROP_TYPE_STAR;
} else if (token_is_pseudo_keyword(s, JS_ATOM_async) &&
peek_token(s, TRUE) != '\n') {
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
if (s->token.val == ':' || s->token.val == ',' ||
s->token.val == '}' || s->token.val == '(' ||
s->token.val == '=' || s->token.val == ';') {
is_non_reserved_ident = TRUE;
goto ident_found;
}
JS_FreeAtom(s->ctx, name);
if (s->token.val == '*') {
if (next_token(s))
goto fail;
prop_type = PROP_TYPE_ASYNC_STAR;
} else {
prop_type = PROP_TYPE_ASYNC;
}
}
}
if (token_is_ident(s->token.val)) {
/* variable can only be a non-reserved identifier */
is_non_reserved_ident =
(s->token.val == TOK_IDENT && !s->token.u.ident.is_reserved);
/* keywords and reserved words have a valid atom */
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
ident_found:
if (is_non_reserved_ident &&
prop_type == PROP_TYPE_IDENT && allow_var) {
if (!(s->token.val == ':' ||
(s->token.val == '(' && allow_method))) {
prop_type = PROP_TYPE_VAR;
}
}
} else if (s->token.val == TOK_STRING) {
name = JS_ValueToAtom(s->ctx, s->token.u.str.str);
if (name == JS_ATOM_NULL)
goto fail;
if (next_token(s))
goto fail1;
} else if (s->token.val == TOK_NUMBER) {
JSValue val;
val = s->token.u.num.val;
name = JS_ValueToAtom(s->ctx, val);
if (name == JS_ATOM_NULL)
goto fail;
if (next_token(s))
goto fail1;
} else if (s->token.val == '[') {
if (next_token(s))
goto fail;
if (js_parse_expr(s))
goto fail;
if (js_parse_expect(s, ']'))
goto fail;
name = JS_ATOM_NULL;
} else if (s->token.val == TOK_PRIVATE_NAME && allow_private) {
name = JS_DupAtom(s->ctx, s->token.u.ident.atom);
if (next_token(s))
goto fail1;
is_private = PROP_TYPE_PRIVATE;
} else {
goto invalid_prop;
}
if (prop_type != PROP_TYPE_IDENT && prop_type != PROP_TYPE_VAR &&
s->token.val != '(') {
JS_FreeAtom(s->ctx, name);
invalid_prop:
js_parse_error(s, "invalid property name");
goto fail;
}
*pname = name;
return prop_type | is_private;
fail1:
JS_FreeAtom(s->ctx, name);
fail:
*pname = JS_ATOM_NULL;
return -1;
} | O3 | c | js_parse_property_name:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r13d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
testl %edx, %edx
je 0x675b7
movl 0x20(%r14), %eax
cmpl $0x2a, %eax
je 0x67573
cmpl $-0x7d, %eax
jne 0x675b7
movl 0x38(%r14), %r15d
cmpl $0x86, %r15d
je 0x67591
cmpl $0x43, %r15d
je 0x674f7
cmpl $0x42, %r15d
jne 0x675b7
cmpl $0x0, 0x3c(%r14)
jne 0x675b7
movl %ecx, 0x4(%rsp)
movq %rbx, %r12
movq %r14, %rdi
callq 0x5f46a
testl %eax, %eax
jne 0x67721
movl 0x20(%r14), %eax
movl $0x0, (%rsp)
movl $0x1, %ebx
cmpq $0x3d, %rax
ja 0x67543
movabsq $0x2c00110000000000, %rcx # imm = 0x2C00110000000000
btq %rax, %rcx
jb 0x67663
cmpl $0x7d, %eax
je 0x67663
xorl %eax, %eax
cmpl $0x43, %r15d
sete %al
orl $0x2, %eax
movl %eax, (%rsp)
movq (%r14), %rdi
movl %r15d, %esi
callq 0x202f5
movq %r12, %rbx
movl (%rsp), %r12d
movl 0x4(%rsp), %ecx
jmp 0x675b7
movl %ecx, %r15d
movq %r14, %rdi
callq 0x5f46a
testl %eax, %eax
jne 0x6772f
movl $0x4, %r12d
movl %r15d, %ecx
jmp 0x675b7
cmpl $0x0, 0x3c(%r14)
jne 0x675b7
movq 0x70(%r14), %rdi
movl $0x1, %esi
movl %ecx, 0x4(%rsp)
callq 0x61a8f
movl 0x4(%rsp), %ecx
cmpl $0xa, %eax
jne 0x6778f
movl 0x20(%r14), %eax
cmpl $-0x7d, %eax
setne %sil
leal 0x27(%rax), %edx
cmpl $-0x2e, %edx
setb %dl
testb %dl, %sil
je 0x67619
cmpl $-0x80, %eax
je 0x675e7
cmpl $0x5b, %eax
je 0x676aa
cmpl $-0x7f, %eax
jne 0x676e0
movq (%r14), %rdi
movq 0x38(%r14), %rsi
movq 0x40(%r14), %rdx
callq 0x23ad1
testl %eax, %eax
je 0x6772f
movl %eax, %r15d
movq %r14, %rdi
callq 0x5f46a
testl %eax, %eax
jne 0x6771e
xorl %eax, %eax
jmp 0x6774f
movl %r12d, (%rsp)
movq %rbx, %r12
xorl %ebx, %ebx
cmpl $-0x7d, %eax
jne 0x67631
xorl %ebx, %ebx
cmpl $0x0, 0x40(%r14)
sete %bl
movl %ecx, 0x4(%rsp)
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x67653
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x5f46a
testl %eax, %eax
jne 0x67721
xorl %eax, %eax
cmpl $0x0, 0x4(%rsp)
je 0x6773c
testl %ebx, %ebx
je 0x6773c
movl (%rsp), %ecx
testl %ecx, %ecx
movq %r12, %rbx
jne 0x67745
testl %ebp, %ebp
sete %al
movl 0x20(%r14), %ecx
cmpl $0x3a, %ecx
setne %dl
cmpl $0x28, %ecx
setne %cl
orb %al, %cl
andb %dl, %cl
movzbl %cl, %r12d
xorl %eax, %eax
jmp 0x6775c
movq %r14, %rdi
callq 0x5f46a
testl %eax, %eax
jne 0x6772f
movq %r14, %rdi
movl $0x1, %esi
callq 0x6bfae
testl %eax, %eax
jne 0x6772f
movq %r14, %rdi
movl $0x5d, %esi
callq 0x654fc
testl %eax, %eax
jne 0x6772f
xorl %r15d, %r15d
jmp 0x67612
cmpl $-0x57, %eax
setne %al
testl %r13d, %r13d
sete %cl
orb %al, %cl
jne 0x6777c
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x67712
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %r14, %rdi
callq 0x5f46a
testl %eax, %eax
je 0x6774a
movq %rbx, %r12
movq (%r14), %rdi
movl %r15d, %esi
callq 0x202f5
movq %r12, %rbx
movl $0x0, (%rbx)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x67762
movq %r12, %rbx
movl (%rsp), %r12d
jmp 0x6774f
movl %ecx, %r12d
jmp 0x6774f
movl $0x10, %eax
cmpl $0x2, %r12d
jb 0x6775c
cmpl $0x28, 0x20(%r14)
jne 0x67771
orl %r12d, %eax
movl %r15d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
movl %r15d, %esi
callq 0x202f5
leaq 0x3b27c(%rip), %rsi # 0xa29ff
movq %r14, %rdi
xorl %eax, %eax
callq 0x2fed1
jmp 0x6772f
movslq 0x38(%r14), %r15
cmpq $0xe0, %r15
jl 0x677ad
movq (%r14), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rax
movq (%rax,%r15,8), %rax
incl (%rax)
movq %rbx, %r12
movq %r14, %rdi
callq 0x5f46a
testl %eax, %eax
jne 0x67721
movl 0x20(%r14), %eax
movl $0x0, (%rsp)
movl $0x1, %ebx
cmpq $0x3d, %rax
ja 0x677ea
movabsq $0x2c00110000000000, %rcx # imm = 0x2C00110000000000
btq %rax, %rcx
jb 0x67663
cmpl $0x7d, %eax
je 0x67663
movq (%r14), %rdi
movl %r15d, %esi
callq 0x202f5
cmpl $0x2a, 0x20(%r14)
movq %r12, %rbx
movl $0x5, %r12d
movl 0x4(%rsp), %ecx
jne 0x675b7
movq %r14, %rdi
callq 0x5f46a
testl %eax, %eax
jne 0x6772f
movl $0x6, %r12d
jmp 0x6756d
| js_parse_property_name:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13d, r8d
mov ebp, edx
mov rbx, rsi
mov r14, rdi
xor r12d, r12d
test edx, edx
jz loc_675B7
mov eax, [r14+20h]
cmp eax, 2Ah ; '*'
jz loc_67573
cmp eax, 0FFFFFF83h
jnz loc_675B7
mov r15d, [r14+38h]
cmp r15d, 86h
jz loc_67591
cmp r15d, 43h ; 'C'
jz short loc_674F7
cmp r15d, 42h ; 'B'
jnz loc_675B7
loc_674F7:
cmp dword ptr [r14+3Ch], 0
jnz loc_675B7
mov [rsp+38h+var_34], ecx
mov r12, rbx
mov rdi, r14
call next_token
test eax, eax
jnz loc_67721
mov eax, [r14+20h]
mov [rsp+38h+var_38], 0
mov ebx, 1
cmp rax, 3Dh ; '='
ja short loc_67543
mov rcx, 2C00110000000000h
bt rcx, rax
jb loc_67663
loc_67543:
cmp eax, 7Dh ; '}'
jz loc_67663
xor eax, eax
cmp r15d, 43h ; 'C'
setz al
or eax, 2
mov [rsp+38h+var_38], eax
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
mov rbx, r12
mov r12d, [rsp+38h+var_38]
loc_6756D:
mov ecx, [rsp+38h+var_34]
jmp short loc_675B7
loc_67573:
mov r15d, ecx
mov rdi, r14
call next_token
test eax, eax
jnz loc_6772F
mov r12d, 4
mov ecx, r15d
jmp short loc_675B7
loc_67591:
cmp dword ptr [r14+3Ch], 0
jnz short loc_675B7
mov rdi, [r14+70h]
mov esi, 1
mov [rsp+38h+var_34], ecx
call peek_token
mov ecx, [rsp+38h+var_34]
cmp eax, 0Ah
jnz loc_6778F
loc_675B7:
mov eax, [r14+20h]
cmp eax, 0FFFFFF83h
setnz sil
lea edx, [rax+27h]
cmp edx, 0FFFFFFD2h
setb dl
test sil, dl
jz short loc_67619
cmp eax, 0FFFFFF80h
jz short loc_675E7
cmp eax, 5Bh ; '['
jz loc_676AA
cmp eax, 0FFFFFF81h
jnz loc_676E0
loc_675E7:
mov rdi, [r14]
mov rsi, [r14+38h]
mov rdx, [r14+40h]
call JS_ValueToAtom
test eax, eax
jz loc_6772F
mov r15d, eax
mov rdi, r14
call next_token
test eax, eax
jnz loc_6771E
loc_67612:
xor eax, eax
jmp loc_6774F
loc_67619:
mov [rsp+38h+var_38], r12d
mov r12, rbx
xor ebx, ebx
cmp eax, 0FFFFFF83h
jnz short loc_67631
xor ebx, ebx
cmp dword ptr [r14+40h], 0
setz bl
loc_67631:
mov [rsp+38h+var_34], ecx
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_67653
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_67653:
mov rdi, r14
call next_token
test eax, eax
jnz loc_67721
loc_67663:
xor eax, eax
cmp [rsp+38h+var_34], 0
jz loc_6773C
test ebx, ebx
jz loc_6773C
mov ecx, [rsp+38h+var_38]
test ecx, ecx
mov rbx, r12
jnz loc_67745
test ebp, ebp
setz al
mov ecx, [r14+20h]
cmp ecx, 3Ah ; ':'
setnz dl
cmp ecx, 28h ; '('
setnz cl
or cl, al
and cl, dl
movzx r12d, cl
xor eax, eax
jmp loc_6775C
loc_676AA:
mov rdi, r14
call next_token
test eax, eax
jnz short loc_6772F
mov rdi, r14
mov esi, 1
call js_parse_expr2
test eax, eax
jnz short loc_6772F
mov rdi, r14
mov esi, 5Dh ; ']'
call js_parse_expect
test eax, eax
jnz short loc_6772F
xor r15d, r15d
jmp loc_67612
loc_676E0:
cmp eax, 0FFFFFFA9h
setnz al
test r13d, r13d
setz cl
or cl, al
jnz loc_6777C
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_67712
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_67712:
mov rdi, r14
call next_token
test eax, eax
jz short loc_6774A
loc_6771E:
mov r12, rbx
loc_67721:
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
mov rbx, r12
loc_6772F:
mov dword ptr [rbx], 0
mov eax, 0FFFFFFFFh
jmp short loc_67762
loc_6773C:
mov rbx, r12
mov r12d, [rsp+38h+var_38]
jmp short loc_6774F
loc_67745:
mov r12d, ecx
jmp short loc_6774F
loc_6774A:
mov eax, 10h
loc_6774F:
cmp r12d, 2
jb short loc_6775C
cmp dword ptr [r14+20h], 28h ; '('
jnz short loc_67771
loc_6775C:
or eax, r12d
mov [rbx], r15d
loc_67762:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_67771:
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
loc_6777C:
lea rsi, aInvalidPropert_1; "invalid property name"
mov rdi, r14
xor eax, eax
call js_parse_error
jmp short loc_6772F
loc_6778F:
movsxd r15, dword ptr [r14+38h]
cmp r15, 0E0h
jl short loc_677AD
mov rax, [r14]
mov rax, [rax+18h]
mov rax, [rax+68h]
mov rax, [rax+r15*8]
inc dword ptr [rax]
loc_677AD:
mov r12, rbx
mov rdi, r14
call next_token
test eax, eax
jnz loc_67721
mov eax, [r14+20h]
mov [rsp+38h+var_38], 0
mov ebx, 1
cmp rax, 3Dh ; '='
ja short loc_677EA
mov rcx, 2C00110000000000h
bt rcx, rax
jb loc_67663
loc_677EA:
cmp eax, 7Dh ; '}'
jz loc_67663
mov rdi, [r14]
mov esi, r15d
call JS_FreeAtom
cmp dword ptr [r14+20h], 2Ah ; '*'
mov rbx, r12
mov r12d, 5
mov ecx, [rsp+38h+var_34]
jnz loc_675B7
mov rdi, r14
call next_token
test eax, eax
jnz loc_6772F
mov r12d, 6
jmp loc_6756D
| long long js_parse_property_name(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
int v15; // r13d
int v16; // ebp
_DWORD *v17; // rbx
unsigned int v18; // r12d
int v19; // eax
long long v20; // r15
_DWORD *v21; // r12
unsigned long long v22; // rax
BOOL v23; // ebx
long long v24; // rcx
unsigned int v25; // r15d
int v26; // eax
long long v27; // rdx
int v28; // eax
long long v29; // rdx
long long v30; // rsi
int v31; // eax
long long v32; // rdx
long long v33; // rcx
long long v34; // r8
long long v35; // r9
__m128 v36; // xmm4
__m128 v37; // xmm5
int v38; // eax
_DWORD *v39; // rax
long long v40; // rdx
long long v41; // rcx
long long v42; // r8
long long v43; // r9
__m128 v44; // xmm4
__m128 v45; // xmm5
_DWORD *v46; // rax
long long result; // rax
_DWORD *v48; // rax
unsigned long long v49; // rax
long long v50; // rcx
long long v51; // rdx
unsigned int v52; // [rsp+0h] [rbp-38h]
unsigned int v53; // [rsp+4h] [rbp-34h]
LOBYTE(v52) = v14;
v15 = a5;
v16 = a3;
v17 = (_DWORD *)a2;
v18 = 0;
if ( (_DWORD)a3 )
{
v19 = *(_DWORD *)(a1 + 32);
if ( v19 == 42 )
{
v25 = a4;
if ( (unsigned int)next_token(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6) )
goto LABEL_44;
v18 = 4;
a4 = v25;
goto LABEL_18;
}
if ( v19 == -125 )
{
LODWORD(v20) = *(_DWORD *)(a1 + 56);
if ( (_DWORD)v20 == 134 )
{
if ( *(_DWORD *)(a1 + 60) )
goto LABEL_18;
a2 = 1LL;
v53 = a4;
v26 = peek_token(*(unsigned __int8 **)(a1 + 112), 1);
a4 = v53;
if ( v26 == 10 )
goto LABEL_18;
v20 = *(int *)(a1 + 56);
if ( v20 >= 224 )
{
v48 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v20);
++*v48;
}
v21 = v17;
if ( (unsigned int)next_token(a1, a7, a8, a9, a10, a11, a12, a13, a14, 1LL, v27, v53, a5, a6) )
goto LABEL_43;
v49 = *(unsigned int *)(a1 + 32);
v52 = 0;
v23 = 1;
if ( v49 <= 0x3D )
{
v50 = 0x2C00110000000000LL;
if ( _bittest64(&v50, v49) )
goto LABEL_30;
}
if ( (_DWORD)v49 == 125 )
goto LABEL_30;
a2 = (unsigned int)v20;
JS_FreeAtom(*(_QWORD *)a1, v20);
v17 = v21;
v18 = 5;
a4 = v53;
if ( *(_DWORD *)(a1 + 32) != 42 )
goto LABEL_18;
if ( (unsigned int)next_token(a1, a7, a8, a9, a10, a11, a12, a13, a14, (unsigned int)v20, v51, v53, a5, a6) )
goto LABEL_44;
v18 = 6;
}
else
{
if ( (_DWORD)v20 != 67 && (_DWORD)v20 != 66 || *(_DWORD *)(a1 + 60) )
goto LABEL_18;
v53 = a4;
v21 = (_DWORD *)a2;
if ( (unsigned int)next_token(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6) )
{
LABEL_43:
JS_FreeAtom(*(_QWORD *)a1, v20);
v17 = v21;
goto LABEL_44;
}
v22 = *(unsigned int *)(a1 + 32);
v52 = 0;
v23 = 1;
if ( v22 <= 0x3D )
{
v24 = 0x2C00110000000000LL;
if ( _bittest64(&v24, v22) )
goto LABEL_30;
}
if ( (_DWORD)v22 == 125 )
goto LABEL_30;
LOBYTE(v52) = ((_DWORD)v20 == 67) | 2;
a2 = (unsigned int)v20;
JS_FreeAtom(*(_QWORD *)a1, v20);
v17 = v21;
v18 = ((_DWORD)v20 == 67) | 2;
}
a4 = v53;
}
}
LABEL_18:
v28 = *(_DWORD *)(a1 + 32);
LOBYTE(a2) = v28 != -125;
v29 = (unsigned int)(v28 + 39);
LOBYTE(v29) = (unsigned int)v29 < 0xFFFFFFD2;
if ( ((unsigned __int8)v29 & (unsigned __int8)a2) != 0 )
{
switch ( v28 )
{
case -128:
goto LABEL_22;
case 91:
if ( (unsigned int)next_token(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, v29, a4, a5, a6)
|| (unsigned int)js_parse_expr2(a1, 1LL)
|| (unsigned int)js_parse_expect((long long *)a1, 93LL, v40, v41, v42, v43, a7, a8, a9, a10, v44, v45, a13, a14) )
{
goto LABEL_44;
}
LODWORD(v20) = 0;
goto LABEL_24;
case -127:
LABEL_22:
v30 = *(_QWORD *)(a1 + 56);
v31 = JS_ValueToAtom(*(_QWORD *)a1, v30, *(_QWORD *)(a1 + 64));
if ( v31 )
{
LODWORD(v20) = v31;
if ( !(unsigned int)next_token(a1, a7, a8, a9, a10, v36, v37, a13, a14, v30, v32, v33, v34, v35) )
{
LABEL_24:
v38 = 0;
goto LABEL_48;
}
goto LABEL_42;
}
LABEL_44:
*v17 = 0;
return 0xFFFFFFFFLL;
}
LOBYTE(a4) = v28 != -87 || v15 == 0;
if ( (_BYTE)a4 )
{
LABEL_53:
js_parse_error(
(long long *)a1,
(long long)"invalid property name",
v29,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v52);
goto LABEL_44;
}
v20 = *(int *)(a1 + 56);
if ( v20 >= 224 )
{
v46 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v20);
++*v46;
}
if ( (unsigned int)next_token(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, v29, a4, a5, a6) )
{
LABEL_42:
v21 = v17;
goto LABEL_43;
}
v38 = 16;
LABEL_48:
if ( v18 < 2 || *(_DWORD *)(a1 + 32) == 40 )
goto LABEL_50;
JS_FreeAtom(*(_QWORD *)a1, v20);
goto LABEL_53;
}
v52 = v18;
v21 = v17;
v23 = 0;
if ( v28 == -125 )
v23 = *(_DWORD *)(a1 + 64) == 0;
v53 = a4;
v20 = *(int *)(a1 + 56);
if ( v20 >= 224 )
{
v39 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 8 * v20);
++*v39;
}
if ( (unsigned int)next_token(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, v29, a4, a5, a6) )
goto LABEL_43;
LABEL_30:
v38 = 0;
if ( !v53 || !v23 )
{
v17 = v21;
v18 = v52;
goto LABEL_48;
}
v17 = v21;
if ( v52 )
{
v18 = v52;
goto LABEL_48;
}
v18 = *(_DWORD *)(a1 + 32) != 58 && (v16 == 0 || *(_DWORD *)(a1 + 32) != 40);
v38 = 0;
LABEL_50:
result = v18 | v38;
*v17 = v20;
return result;
}
| js_parse_property_name:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13D,R8D
MOV EBP,EDX
MOV RBX,RSI
MOV R14,RDI
XOR R12D,R12D
TEST EDX,EDX
JZ 0x001675b7
MOV EAX,dword ptr [R14 + 0x20]
CMP EAX,0x2a
JZ 0x00167573
CMP EAX,-0x7d
JNZ 0x001675b7
MOV R15D,dword ptr [R14 + 0x38]
CMP R15D,0x86
JZ 0x00167591
CMP R15D,0x43
JZ 0x001674f7
CMP R15D,0x42
JNZ 0x001675b7
LAB_001674f7:
CMP dword ptr [R14 + 0x3c],0x0
JNZ 0x001675b7
MOV dword ptr [RSP + 0x4],ECX
MOV R12,RBX
MOV RDI,R14
CALL 0x0015f46a
TEST EAX,EAX
JNZ 0x00167721
MOV EAX,dword ptr [R14 + 0x20]
MOV dword ptr [RSP],0x0
MOV EBX,0x1
CMP RAX,0x3d
JA 0x00167543
MOV RCX,0x2c00110000000000
BT RCX,RAX
JC 0x00167663
LAB_00167543:
CMP EAX,0x7d
JZ 0x00167663
XOR EAX,EAX
CMP R15D,0x43
SETZ AL
OR EAX,0x2
MOV dword ptr [RSP],EAX
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x001202f5
MOV RBX,R12
MOV R12D,dword ptr [RSP]
LAB_0016756d:
MOV ECX,dword ptr [RSP + 0x4]
JMP 0x001675b7
LAB_00167573:
MOV R15D,ECX
MOV RDI,R14
CALL 0x0015f46a
TEST EAX,EAX
JNZ 0x0016772f
MOV R12D,0x4
MOV ECX,R15D
JMP 0x001675b7
LAB_00167591:
CMP dword ptr [R14 + 0x3c],0x0
JNZ 0x001675b7
MOV RDI,qword ptr [R14 + 0x70]
MOV ESI,0x1
MOV dword ptr [RSP + 0x4],ECX
CALL 0x00161a8f
MOV ECX,dword ptr [RSP + 0x4]
CMP EAX,0xa
JNZ 0x0016778f
LAB_001675b7:
MOV EAX,dword ptr [R14 + 0x20]
CMP EAX,-0x7d
SETNZ SIL
LEA EDX,[RAX + 0x27]
CMP EDX,-0x2e
SETC DL
TEST SIL,DL
JZ 0x00167619
CMP EAX,-0x80
JZ 0x001675e7
CMP EAX,0x5b
JZ 0x001676aa
CMP EAX,-0x7f
JNZ 0x001676e0
LAB_001675e7:
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x38]
MOV RDX,qword ptr [R14 + 0x40]
CALL 0x00123ad1
TEST EAX,EAX
JZ 0x0016772f
MOV R15D,EAX
MOV RDI,R14
CALL 0x0015f46a
TEST EAX,EAX
JNZ 0x0016771e
LAB_00167612:
XOR EAX,EAX
JMP 0x0016774f
LAB_00167619:
MOV dword ptr [RSP],R12D
MOV R12,RBX
XOR EBX,EBX
CMP EAX,-0x7d
JNZ 0x00167631
XOR EBX,EBX
CMP dword ptr [R14 + 0x40],0x0
SETZ BL
LAB_00167631:
MOV dword ptr [RSP + 0x4],ECX
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x00167653
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_00167653:
MOV RDI,R14
CALL 0x0015f46a
TEST EAX,EAX
JNZ 0x00167721
LAB_00167663:
XOR EAX,EAX
CMP dword ptr [RSP + 0x4],0x0
JZ 0x0016773c
TEST EBX,EBX
JZ 0x0016773c
MOV ECX,dword ptr [RSP]
TEST ECX,ECX
MOV RBX,R12
JNZ 0x00167745
TEST EBP,EBP
SETZ AL
MOV ECX,dword ptr [R14 + 0x20]
CMP ECX,0x3a
SETNZ DL
CMP ECX,0x28
SETNZ CL
OR CL,AL
AND CL,DL
MOVZX R12D,CL
XOR EAX,EAX
JMP 0x0016775c
LAB_001676aa:
MOV RDI,R14
CALL 0x0015f46a
TEST EAX,EAX
JNZ 0x0016772f
MOV RDI,R14
MOV ESI,0x1
CALL 0x0016bfae
TEST EAX,EAX
JNZ 0x0016772f
MOV RDI,R14
MOV ESI,0x5d
CALL 0x001654fc
TEST EAX,EAX
JNZ 0x0016772f
XOR R15D,R15D
JMP 0x00167612
LAB_001676e0:
CMP EAX,-0x57
SETNZ AL
TEST R13D,R13D
SETZ CL
OR CL,AL
JNZ 0x0016777c
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x00167712
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_00167712:
MOV RDI,R14
CALL 0x0015f46a
TEST EAX,EAX
JZ 0x0016774a
LAB_0016771e:
MOV R12,RBX
LAB_00167721:
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x001202f5
MOV RBX,R12
LAB_0016772f:
MOV dword ptr [RBX],0x0
MOV EAX,0xffffffff
JMP 0x00167762
LAB_0016773c:
MOV RBX,R12
MOV R12D,dword ptr [RSP]
JMP 0x0016774f
LAB_00167745:
MOV R12D,ECX
JMP 0x0016774f
LAB_0016774a:
MOV EAX,0x10
LAB_0016774f:
CMP R12D,0x2
JC 0x0016775c
CMP dword ptr [R14 + 0x20],0x28
JNZ 0x00167771
LAB_0016775c:
OR EAX,R12D
MOV dword ptr [RBX],R15D
LAB_00167762:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00167771:
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x001202f5
LAB_0016777c:
LEA RSI,[0x1a29ff]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0012fed1
JMP 0x0016772f
LAB_0016778f:
MOVSXD R15,dword ptr [R14 + 0x38]
CMP R15,0xe0
JL 0x001677ad
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + R15*0x8]
INC dword ptr [RAX]
LAB_001677ad:
MOV R12,RBX
MOV RDI,R14
CALL 0x0015f46a
TEST EAX,EAX
JNZ 0x00167721
MOV EAX,dword ptr [R14 + 0x20]
MOV dword ptr [RSP],0x0
MOV EBX,0x1
CMP RAX,0x3d
JA 0x001677ea
MOV RCX,0x2c00110000000000
BT RCX,RAX
JC 0x00167663
LAB_001677ea:
CMP EAX,0x7d
JZ 0x00167663
MOV RDI,qword ptr [R14]
MOV ESI,R15D
CALL 0x001202f5
CMP dword ptr [R14 + 0x20],0x2a
MOV RBX,R12
MOV R12D,0x5
MOV ECX,dword ptr [RSP + 0x4]
JNZ 0x001675b7
MOV RDI,R14
CALL 0x0015f46a
TEST EAX,EAX
JNZ 0x0016772f
MOV R12D,0x6
JMP 0x0016756d
|
uint js_parse_property_name(long *param_1,int4 *param_2,int param_3,int param_4,int param_5)
{
uint uVar1;
int *piVar2;
long lVar3;
int iVar4;
uint uVar5;
int4 uVar6;
ulong uVar7;
bool bVar8;
uint local_38;
uVar5 = 0;
local_38 = 0;
if (param_3 != 0) {
if ((int)param_1[4] == 0x2a) {
iVar4 = next_token(param_1);
if (iVar4 != 0) goto LAB_0016772f;
local_38 = 4;
goto LAB_001675b7;
}
local_38 = uVar5;
if ((int)param_1[4] != -0x7d) goto LAB_001675b7;
uVar5 = *(uint *)(param_1 + 7);
uVar7 = (ulong)uVar5;
if (uVar5 == 0x86) {
if ((*(int *)((long)param_1 + 0x3c) == 0) && (iVar4 = peek_token(param_1[0xe],1), iVar4 != 10)
) {
lVar3 = param_1[7];
uVar7 = (ulong)(int)lVar3;
if (0xdf < (long)uVar7) {
piVar2 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar7 * 8);
*piVar2 = *piVar2 + 1;
}
iVar4 = next_token(param_1);
if (iVar4 != 0) goto LAB_00167721;
uVar5 = *(uint *)(param_1 + 4);
local_38 = 0;
bVar8 = true;
if ((((ulong)uVar5 < 0x3e) && ((0x2c00110000000000U >> ((ulong)uVar5 & 0x3f) & 1) != 0)) ||
(uVar5 == 0x7d)) goto LAB_00167663;
JS_FreeAtom(*param_1,(int)lVar3);
local_38 = 5;
if ((int)param_1[4] == 0x2a) {
iVar4 = next_token(param_1);
if (iVar4 != 0) goto LAB_0016772f;
local_38 = 6;
}
}
goto LAB_001675b7;
}
if (((uVar5 != 0x43) && (uVar5 != 0x42)) || (*(int *)((long)param_1 + 0x3c) != 0))
goto LAB_001675b7;
iVar4 = next_token(param_1);
if (iVar4 == 0) {
uVar1 = *(uint *)(param_1 + 4);
local_38 = 0;
bVar8 = true;
if (((0x3d < (ulong)uVar1) || ((0x2c00110000000000U >> ((ulong)uVar1 & 0x3f) & 1) == 0)) &&
(uVar1 != 0x7d)) {
local_38 = uVar5 == 0x43 | 2;
JS_FreeAtom(*param_1,uVar5);
goto LAB_001675b7;
}
goto LAB_00167663;
}
LAB_00167721:
JS_FreeAtom(*param_1,uVar7 & 0xffffffff);
goto LAB_0016772f;
}
LAB_001675b7:
iVar4 = (int)param_1[4];
if (iVar4 == -0x7d || 0xffffffd1 < iVar4 + 0x27U) {
bVar8 = false;
if (iVar4 == -0x7d) {
bVar8 = (int)param_1[8] == 0;
}
uVar7 = (ulong)(int)param_1[7];
if (0xdf < (long)uVar7) {
piVar2 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar7 * 8);
*piVar2 = *piVar2 + 1;
}
iVar4 = next_token(param_1);
if (iVar4 != 0) goto LAB_00167721;
LAB_00167663:
uVar6 = (int4)uVar7;
uVar5 = 0;
if (((param_4 != 0) && (bVar8)) && (uVar5 = 0, local_38 == 0)) {
local_38 = (uint)(((int)param_1[4] != 0x28 || param_3 == 0) && (int)param_1[4] != 0x3a);
uVar5 = 0;
goto LAB_0016775c;
}
LAB_0016774f:
uVar6 = (int4)uVar7;
if ((local_38 < 2) || ((int)param_1[4] == 0x28)) {
LAB_0016775c:
*param_2 = uVar6;
return uVar5 | local_38;
}
JS_FreeAtom(*param_1,uVar7 & 0xffffffff);
}
else {
if (iVar4 == -0x80) {
LAB_001675e7:
uVar5 = JS_ValueToAtom(*param_1,param_1[7],param_1[8]);
if (uVar5 == 0) goto LAB_0016772f;
uVar7 = (ulong)uVar5;
iVar4 = next_token(param_1);
if (iVar4 != 0) goto LAB_00167721;
LAB_00167612:
uVar5 = 0;
goto LAB_0016774f;
}
if (iVar4 == 0x5b) {
iVar4 = next_token(param_1);
if (((iVar4 != 0) || (iVar4 = js_parse_expr2(param_1,1), iVar4 != 0)) ||
(iVar4 = js_parse_expect(param_1,0x5d), iVar4 != 0)) goto LAB_0016772f;
uVar7 = 0;
goto LAB_00167612;
}
if (iVar4 == -0x7f) goto LAB_001675e7;
if (param_5 != 0 && iVar4 == -0x57) {
uVar7 = (ulong)(int)param_1[7];
if (0xdf < (long)uVar7) {
piVar2 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + uVar7 * 8);
*piVar2 = *piVar2 + 1;
}
iVar4 = next_token(param_1);
if (iVar4 != 0) goto LAB_00167721;
uVar5 = 0x10;
goto LAB_0016774f;
}
}
js_parse_error(param_1,"invalid property name");
LAB_0016772f:
*param_2 = 0;
return 0xffffffff;
}
| |
40,287 | my_numcells_eucjpms | eloqsql/strings/ctype-eucjpms.c | static
size_t my_numcells_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O0 | c | my_numcells_eucjpms:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x6f2f2
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x8e, %eax
jne 0x6f27e
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x6f2ed
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x8f, %eax
jne 0x6f2a6
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x28(%rbp)
jmp 0x6f2eb
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x6f2d1
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x6f2e9
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x6f2eb
jmp 0x6f2ed
jmp 0x6f248
movq -0x20(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| my_numcells_eucjpms:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov [rbp+var_20], 0
loc_6F248:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb loc_6F2F2
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 8Eh
jnz short loc_6F27E
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
jmp short loc_6F2ED
loc_6F27E:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 8Fh
jnz short loc_6F2A6
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 3
mov [rbp+var_28], rax
jmp short loc_6F2EB
loc_6F2A6:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_6F2D1
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
jmp short loc_6F2E9
loc_6F2D1:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
loc_6F2E9:
jmp short $+2
loc_6F2EB:
jmp short $+2
loc_6F2ED:
jmp loc_6F248
loc_6F2F2:
mov rax, [rbp+var_20]
pop rbp
retn
| long long my_numcells_eucjpms(long long a1, _BYTE *a2, unsigned long long a3)
{
long long v5; // [rsp+10h] [rbp-20h]
v5 = 0LL;
while ( (unsigned long long)a2 < a3 )
{
if ( (unsigned __int8)*a2 == 142 )
{
++v5;
a2 += 2;
}
else if ( (unsigned __int8)*a2 == 143 )
{
v5 += 2LL;
a2 += 3;
}
else if ( (*a2 & 0x80) != 0 )
{
v5 += 2LL;
a2 += 2;
}
else
{
++v5;
++a2;
}
}
return v5;
}
| my_numcells_eucjpms:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x20],0x0
LAB_0016f248:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0016f2f2
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x8e
JNZ 0x0016f27e
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0016f2ed
LAB_0016f27e:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x8f
JNZ 0x0016f2a6
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x3
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0016f2eb
LAB_0016f2a6:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0016f2d1
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0016f2e9
LAB_0016f2d1:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
LAB_0016f2e9:
JMP 0x0016f2eb
LAB_0016f2eb:
JMP 0x0016f2ed
LAB_0016f2ed:
JMP 0x0016f248
LAB_0016f2f2:
MOV RAX,qword ptr [RBP + -0x20]
POP RBP
RET
|
long my_numcells_eucjpms(int8 param_1,byte *param_2,byte *param_3)
{
byte *local_30;
long local_28;
local_28 = 0;
local_30 = param_2;
while (local_30 < param_3) {
if (*local_30 == 0x8e) {
local_28 = local_28 + 1;
local_30 = local_30 + 2;
}
else if (*local_30 == 0x8f) {
local_28 = local_28 + 2;
local_30 = local_30 + 3;
}
else if ((*local_30 & 0x80) == 0) {
local_28 = local_28 + 1;
local_30 = local_30 + 1;
}
else {
local_28 = local_28 + 2;
local_30 = local_30 + 2;
}
}
return local_28;
}
| |
40,288 | my_numcells_eucjpms | eloqsql/strings/ctype-eucjpms.c | static
size_t my_numcells_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O3 | c | my_numcells_eucjpms:
cmpq %rdx, %rsi
jae 0x53f71
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rsi), %edi
cmpl $0x8e, %edi
je 0x53f4a
cmpl $0x8f, %edi
jne 0x53f56
movl $0x3, %edi
movl $0x2, %ecx
jmp 0x53f64
movl $0x2, %edi
movl $0x1, %ecx
jmp 0x53f64
xorl %ecx, %ecx
testb %dil, %dil
sets %cl
incq %rcx
movq %rcx, %rdi
addq %rcx, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x53f2b
popq %rbp
retq
xorl %eax, %eax
retq
| my_numcells_eucjpms:
cmp rsi, rdx
jnb short loc_53F71
push rbp
mov rbp, rsp
xor eax, eax
loc_53F2B:
movzx edi, byte ptr [rsi]
cmp edi, 8Eh
jz short loc_53F4A
cmp edi, 8Fh
jnz short loc_53F56
mov edi, 3
mov ecx, 2
jmp short loc_53F64
loc_53F4A:
mov edi, 2
mov ecx, 1
jmp short loc_53F64
loc_53F56:
xor ecx, ecx
test dil, dil
sets cl
inc rcx
mov rdi, rcx
loc_53F64:
add rax, rcx
add rsi, rdi
cmp rsi, rdx
jb short loc_53F2B
pop rbp
retn
loc_53F71:
xor eax, eax
retn
| long long my_numcells_eucjpms(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
int v4; // edi
long long v5; // rdi
long long v6; // rcx
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = *a2;
if ( v4 == 142 )
{
v5 = 2LL;
v6 = 1LL;
}
else if ( v4 == 143 )
{
v5 = 3LL;
v6 = 2LL;
}
else
{
v6 = ((v4 & 0x80u) != 0) + 1LL;
v5 = v6;
}
result += v6;
a2 += v5;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
| my_numcells_eucjpms:
CMP RSI,RDX
JNC 0x00153f71
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_00153f2b:
MOVZX EDI,byte ptr [RSI]
CMP EDI,0x8e
JZ 0x00153f4a
CMP EDI,0x8f
JNZ 0x00153f56
MOV EDI,0x3
MOV ECX,0x2
JMP 0x00153f64
LAB_00153f4a:
MOV EDI,0x2
MOV ECX,0x1
JMP 0x00153f64
LAB_00153f56:
XOR ECX,ECX
TEST DIL,DIL
SETS CL
INC RCX
MOV RDI,RCX
LAB_00153f64:
ADD RAX,RCX
ADD RSI,RDI
CMP RSI,RDX
JC 0x00153f2b
POP RBP
RET
LAB_00153f71:
XOR EAX,EAX
RET
|
long my_numcells_eucjpms(int8 param_1,char *param_2,char *param_3)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_2 < param_3) {
lVar2 = 0;
do {
cVar1 = *param_2;
if (cVar1 == -0x72) {
lVar4 = 2;
lVar3 = 1;
}
else if (cVar1 == -0x71) {
lVar3 = 2;
lVar4 = 3;
}
else {
lVar3 = (ulong)(cVar1 < '\0') + 1;
lVar4 = lVar3;
}
lVar2 = lVar2 + lVar3;
param_2 = param_2 + lVar4;
} while (param_2 < param_3);
return lVar2;
}
return 0;
}
| |
40,289 | YogaTest_copy_style_modified_same_Test::TestBody() | yoga-mod/tests/YGStyleTest.cpp | TEST(YogaTest, copy_style_modified_same) {
YGNodeRef node0 = YGNodeNew();
YGNodeStyleSetFlexDirection(node0, YGFlexDirectionRow);
YGNodeStyleSetMaxHeight(node0, 10);
YGNodeCalculateLayout(node0, YGUndefined, YGUndefined, YGDirectionLTR);
YGNodeRef node1 = YGNodeNew();
YGNodeStyleSetFlexDirection(node1, YGFlexDirectionRow);
YGNodeStyleSetMaxHeight(node1, 10);
YGNodeCopyStyle(node0, node1);
YGNodeFree(node0);
YGNodeFree(node1);
} | O3 | cpp | YogaTest_copy_style_modified_same_Test::TestBody():
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x366b25
movq %rax, %rbx
movq %rax, %rdi
movl $0x2, %esi
callq 0x367b49
movss 0x2dd7ce(%rip), %xmm0 # 0x399014
movq %rbx, %rdi
callq 0x368bc9
movss 0x2dd7b2(%rip), %xmm0 # 0x399008
movq %rbx, %rdi
movaps %xmm0, %xmm1
movl $0x1, %esi
callq 0x366ffd
callq 0x366b25
movq %rax, %r14
movq %rax, %rdi
movl $0x2, %esi
callq 0x367b49
movq %r14, %rdi
movss 0x2dd78e(%rip), %xmm0 # 0x399014
callq 0x368bc9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x367ada
movq %rbx, %rdi
callq 0x366cdc
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x366cdc
| _ZN38YogaTest_copy_style_modified_same_Test8TestBodyEv:
push rbp
mov rbp, rsp
push r14
push rbx
call YGNodeNew
mov rbx, rax
mov rdi, rax
mov esi, 2
call YGNodeStyleSetFlexDirection
movss xmm0, cs:dword_399014
mov rdi, rbx
call YGNodeStyleSetMaxHeight
movss xmm0, cs:dword_399008
mov rdi, rbx
movaps xmm1, xmm0
mov esi, 1
call YGNodeCalculateLayout
call YGNodeNew
mov r14, rax
mov rdi, rax
mov esi, 2
call YGNodeStyleSetFlexDirection
mov rdi, r14
movss xmm0, cs:dword_399014
call YGNodeStyleSetMaxHeight
mov rdi, rbx; this
mov rsi, r14
call YGNodeCopyStyle
mov rdi, rbx; this
call YGNodeFree
mov rdi, r14; this
pop rbx
pop r14
pop rbp
jmp YGNodeFree
| long long YogaTest_copy_style_modified_same_Test::TestBody(YogaTest_copy_style_modified_same_Test *this)
{
facebook::yoga::Node *v1; // rbx
facebook::yoga::Node *v2; // r14
v1 = (facebook::yoga::Node *)YGNodeNew(this);
YGNodeStyleSetFlexDirection(v1, 2LL);
YGNodeStyleSetMaxHeight(v1, 10.0);
YGNodeCalculateLayout(v1, 1LL, NAN, NAN);
v2 = (facebook::yoga::Node *)YGNodeNew(v1);
YGNodeStyleSetFlexDirection(v2, 2LL);
YGNodeStyleSetMaxHeight(v2, 10.0);
YGNodeCopyStyle(v1);
YGNodeFree(v1);
return YGNodeFree(v2);
}
| TestBody:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
CALL 0x00466b25
MOV RBX,RAX
MOV RDI,RAX
MOV ESI,0x2
CALL 0x00467b49
MOVSS XMM0,dword ptr [0x00499014]
MOV RDI,RBX
CALL 0x00468bc9
MOVSS XMM0,dword ptr [0x00499008]
MOV RDI,RBX
MOVAPS XMM1,XMM0
MOV ESI,0x1
CALL 0x00466ffd
CALL 0x00466b25
MOV R14,RAX
MOV RDI,RAX
MOV ESI,0x2
CALL 0x00467b49
MOV RDI,R14
MOVSS XMM0,dword ptr [0x00499014]
CALL 0x00468bc9
MOV RDI,RBX
MOV RSI,R14
CALL 0x00467ada
MOV RDI,RBX
CALL 0x00466cdc
MOV RDI,R14
POP RBX
POP R14
POP RBP
JMP 0x00466cdc
|
/* YogaTest_copy_style_modified_same_Test::TestBody() */
void YogaTest_copy_style_modified_same_Test::TestBody(void)
{
int8 uVar1;
int8 uVar2;
uVar1 = YGNodeNew();
YGNodeStyleSetFlexDirection(uVar1,2);
YGNodeStyleSetMaxHeight(DAT_00499014,uVar1);
YGNodeCalculateLayout(DAT_00499008,DAT_00499008,uVar1,1);
uVar2 = YGNodeNew();
YGNodeStyleSetFlexDirection(uVar2,2);
YGNodeStyleSetMaxHeight(DAT_00499014,uVar2);
YGNodeCopyStyle(uVar1,uVar2);
YGNodeFree(uVar1);
YGNodeFree(uVar2);
return;
}
| |
40,290 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(nlohmann::json_abi_v3_11_3::detail::priority_tag<0u>) const | monkey531[P]llama/common/json.hpp | const noexcept(noexcept(
JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>())))
{
auto ret = ValueType();
JSONSerializer<ValueType>::from_json(*this, ret);
return ret;
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(nlohmann::json_abi_v3_11_3::detail::priority_tag<0u>) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x874b1
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x874a9
movq (%r15), %rsi
incq %rsi
callq 0x1b8b0
movq %r14, %rdi
callq 0x1bf70
| _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:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE; nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(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&,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>::string_t &)
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_874A9
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_874A9:
mov rdi, r14
call __Unwind_Resume
| long long 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 a1,
long long a2)
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
nlohmann::json_abi_v3_11_3::detail::from_json<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>>(
a2,
a1);
return a1;
}
| _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:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_0018747f:
MOV RDI,RSI
MOV RSI,RBX
CALL 0x001874b1
LAB_0018748a:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
string_t *
_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
(string_t *param_1,basic_json *param_2)
{
*(string_t **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string_t)0x0;
/* try { // try from 0018747f to 00187489 has its CatchHandler @ 00187493 */
nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(param_2,param_1);
return param_1;
}
| |
40,291 | minja::Parser::Parser(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, minja::Options const&) | monkey531[P]llama/common/minja.hpp | Parser(const std::shared_ptr<std::string>& template_str, const Options & options) : template_str(template_str), options(options) {
if (!template_str) throw std::runtime_error("Template string is null");
start = it = this->template_str->begin();
end = this->template_str->end();
} | O2 | cpp | minja::Parser::Parser(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, minja::Options const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x5fc8c
andq $0x0, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movb 0x2(%r14), %al
movb %al, 0x2a(%rbx)
movzwl (%r14), %eax
movw %ax, 0x28(%rbx)
cmpq $0x0, (%r15)
je 0x5cdf9
movq (%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x20(%rbx)
movq %rcx, 0x10(%rbx)
movq (%rax), %rcx
addq 0x8(%rax), %rcx
movq %rcx, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %r14
leaq 0x55934(%rip), %rsi # 0xb273f
movq %rax, %rdi
callq 0x23320
movq 0x9f1d6(%rip), %rsi # 0xfbff0
movq 0x9f137(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23f20
movq %rax, %r15
jmp 0x5ce39
movq %rax, %r15
movq %r14, %rdi
callq 0x236b0
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x4f1f0
movq %r15, %rdi
callq 0x23fa0
nop
| _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE:
push r15
push r14
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
call _ZNSt12__shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2EEC2ERKS8_; std::__shared_ptr<std::string,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<std::string,(__gnu_cxx::_Lock_policy)2> const&)
and qword ptr [rbx+20h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+10h], xmm0
mov al, [r14+2]
mov [rbx+2Ah], al
movzx eax, word ptr [r14]
mov [rbx+28h], ax
cmp qword ptr [r15], 0
jz short loc_5CDF9
mov rax, [rbx]
mov rcx, [rax]
mov [rbx+20h], rcx
mov [rbx+10h], rcx
mov rcx, [rax]
add rcx, [rax+8]
mov [rbx+18h], rcx
pop rbx
pop r14
pop r15
retn
loc_5CDF9:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aTemplateString; "Template string is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov r15, rax
jmp short loc_5CE39
mov r15, rax
mov rdi, r14; void *
call ___cxa_free_exception
loc_5CE39:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r15
call __Unwind_Resume
| long long * minja::Parser::Parser(long long **a1, _QWORD *a2, long long a3)
{
long long *result; // rax
long long *v5; // rcx
std::runtime_error *exception; // r14
std::__shared_ptr<std::string,(__gnu_cxx::_Lock_policy)2>::__shared_ptr();
a1[4] = 0LL;
*((_OWORD *)a1 + 1) = 0LL;
*((_BYTE *)a1 + 42) = *(_BYTE *)(a3 + 2);
*((_WORD *)a1 + 20) = *(_WORD *)a3;
if ( !*a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Template string is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
result = *a1;
v5 = (long long *)**a1;
a1[4] = v5;
a1[2] = v5;
a1[3] = (long long *)(result[1] + *result);
return result;
}
| Parser:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x0015fc8c
AND qword ptr [RBX + 0x20],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOV AL,byte ptr [R14 + 0x2]
MOV byte ptr [RBX + 0x2a],AL
MOVZX EAX,word ptr [R14]
MOV word ptr [RBX + 0x28],AX
CMP qword ptr [R15],0x0
JZ 0x0015cdf9
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBX + 0x20],RCX
MOV qword ptr [RBX + 0x10],RCX
MOV RCX,qword ptr [RAX]
ADD RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x18],RCX
POP RBX
POP R14
POP R15
RET
LAB_0015cdf9:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV R14,RAX
LAB_0015ce04:
LEA RSI,[0x1b273f]
MOV RDI,RAX
CALL 0x00123320
LAB_0015ce13:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123f20
|
/* minja::Parser::Parser(std::shared_ptr<std::__cxx11::string > const&, minja::Options const&) */
void __thiscall minja::Parser::Parser(Parser *this,shared_ptr *param_1,Options *param_2)
{
long *plVar1;
long lVar2;
runtime_error *this_00;
std::__shared_ptr<std::__cxx11::string,(__gnu_cxx::_Lock_policy)2>::__shared_ptr
((__shared_ptr<std::__cxx11::string,(__gnu_cxx::_Lock_policy)2> *)this,
(__shared_ptr *)param_1);
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(Options *)(this + 0x2a) = param_2[2];
*(int2 *)(this + 0x28) = *(int2 *)param_2;
if (*(long *)param_1 != 0) {
plVar1 = *(long **)this;
lVar2 = *plVar1;
*(long *)(this + 0x20) = lVar2;
*(long *)(this + 0x10) = lVar2;
*(long *)(this + 0x18) = *plVar1 + plVar1[1];
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015ce04 to 0015ce12 has its CatchHandler @ 0015ce2e */
std::runtime_error::runtime_error(this_00,"Template string is null");
/* try { // try from 0015ce13 to 0015ce28 has its CatchHandler @ 0015ce29 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
| |
40,292 | _bf_round | bluesky950520[P]quickjs/libbf.c | static int __bf_round(bf_t *r, limb_t prec1, bf_flags_t flags, limb_t l,
int ret)
{
limb_t v, a;
int shift, add_one, rnd_mode;
slimb_t i, bit_pos, pos, e_min, e_max, e_range, prec;
/* e_min and e_max are computed to match the IEEE 754 conventions */
e_range = (limb_t)1 << (bf_get_exp_bits(flags) - 1);
e_min = -e_range + 3;
e_max = e_range;
if (flags & BF_FLAG_RADPNT_PREC) {
/* 'prec' is the precision after the radix point */
if (prec1 != BF_PREC_INF)
prec = r->expn + prec1;
else
prec = prec1;
} else if (unlikely(r->expn < e_min) && (flags & BF_FLAG_SUBNORMAL)) {
/* restrict the precision in case of potentially subnormal
result */
assert(prec1 != BF_PREC_INF);
prec = prec1 - (e_min - r->expn);
} else {
prec = prec1;
}
/* round to prec bits */
rnd_mode = flags & BF_RND_MASK;
add_one = bf_get_rnd_add(&ret, r, l, prec, rnd_mode);
if (prec <= 0) {
if (add_one) {
bf_resize(r, 1); /* cannot fail */
r->tab[0] = (limb_t)1 << (LIMB_BITS - 1);
r->expn += 1 - prec;
ret |= BF_ST_UNDERFLOW | BF_ST_INEXACT;
return ret;
} else {
goto underflow;
}
} else if (add_one) {
limb_t carry;
/* add one starting at digit 'prec - 1' */
bit_pos = l * LIMB_BITS - 1 - (prec - 1);
pos = bit_pos >> LIMB_LOG2_BITS;
carry = (limb_t)1 << (bit_pos & (LIMB_BITS - 1));
for(i = pos; i < l; i++) {
v = r->tab[i] + carry;
carry = (v < carry);
r->tab[i] = v;
if (carry == 0)
break;
}
if (carry) {
/* shift right by one digit */
v = 1;
for(i = l - 1; i >= pos; i--) {
a = r->tab[i];
r->tab[i] = (a >> 1) | (v << (LIMB_BITS - 1));
v = a;
}
r->expn++;
}
}
/* check underflow */
if (unlikely(r->expn < e_min)) {
if (flags & BF_FLAG_SUBNORMAL) {
/* if inexact, also set the underflow flag */
if (ret & BF_ST_INEXACT)
ret |= BF_ST_UNDERFLOW;
} else {
underflow:
ret |= BF_ST_UNDERFLOW | BF_ST_INEXACT;
bf_set_zero(r, r->sign);
return ret;
}
}
/* check overflow */
if (unlikely(r->expn > e_max))
return bf_set_overflow(r, r->sign, prec1, flags);
/* keep the bits starting at 'prec - 1' */
bit_pos = l * LIMB_BITS - 1 - (prec - 1);
i = bit_pos >> LIMB_LOG2_BITS;
if (i >= 0) {
shift = bit_pos & (LIMB_BITS - 1);
if (shift != 0)
r->tab[i] &= limb_mask(shift, LIMB_BITS - 1);
} else {
i = 0;
}
/* remove trailing zeros */
while (r->tab[i] == 0)
i++;
if (i > 0) {
l -= i;
memmove(r->tab, r->tab + i, l * sizeof(limb_t));
}
bf_resize(r, l); /* cannot fail */
return ret;
} | O1 | c | _bf_round:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movl %edx, %ecx
shrl $0x5, %ecx
andl $0x3f, %ecx
movb $0x3c, %al
subb %cl, %al
cmpl $0x3f, %ecx
movzbl %al, %eax
movl $0x3d, %ecx
cmovnel %eax, %ecx
movl $0x1, %r10d
shlq %cl, %r10
movq %rdi, %rax
movl $0x3, %r13d
subq %r10, %r13
testb $0x10, %dl
jne 0x84e8b
movq 0x10(%rax), %rcx
movq %rsi, %rbx
cmpq %r13, %rcx
jge 0x84ea1
movq %rsi, %rbx
testb $0x8, %dl
je 0x84ea1
leaq -0x3(%r10), %rbx
addq %rsi, %rbx
addq %rcx, %rbx
jmp 0x84ea1
movabsq $0x3fffffffffffffff, %rbx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rbx, %rsi
je 0x84ea1
movq 0x10(%rax), %rbx
addq %rsi, %rbx
movl %edx, %ebp
andl $0x7, %ebp
movl $0x1, %r11d
cmpl $0x6, %ebp
movl %edx, 0xc(%rsp)
movq %rsi, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %r13, 0x20(%rsp)
je 0x84f13
movq %r14, %rcx
shlq $0x6, %rcx
testq %rbx, %rbx
movq $-0x1, %r9
movq $-0x1, %rdi
cmovnsq %rbx, %rdi
subq %rdi, %rcx
addq $-0x2, %rcx
movq %rcx, %rdi
sarq $0x6, %rdi
js 0x84f2d
andl $0x3f, %ecx
incl %ecx
movq $-0x1, %r15
shlq %cl, %r15
movq 0x20(%rax), %r12
cmpl $0x40, %ecx
notq %r15
cmoveq %r9, %r15
testq %r15, (%r12,%rdi,8)
je 0x84f23
movb $0x1, %cl
jmp 0x84f32
cmpq $0x0, -0x8(%r12,%rdi,8)
leaq -0x1(%rdi), %rdi
jne 0x84f13
testq %rdi, %rdi
setg %cl
jg 0x84f17
jmp 0x84f2f
xorl %ecx, %ecx
xorl %r11d, %r11d
movq %rax, %r10
movq 0x20(%rax), %r9
movq %r14, %rdi
shlq $0x6, %rdi
movq %rbx, %r15
notq %r15
leaq (%rdi,%r15), %r13
sarq $0x6, %r13
sets %dl
cmpq %r14, %r13
setae %al
xorl %r12d, %r12d
orb %dl, %al
jne 0x84f6f
movq (%r9,%r13,8), %rax
xorl %r13d, %r13d
btq %r15, %rax
setb %r13b
jmp 0x84f72
xorl %r13d, %r13d
orq %r13, %r11
movl %ebp, %eax
leaq 0x1d902(%rip), %rdx # 0xa2880
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
xorl %eax, %eax
cmpl $0x2, %ebp
sete %al
xorl %r12d, %r12d
movq %r10, %r13
cmpl %eax, 0x8(%r10)
cmovel %r11d, %r12d
jmp 0x84faa
movl %r13d, %r12d
jmp 0x84fa7
movl %r11d, %r12d
movq %r10, %r13
movl %r8d, %ebp
orl $0x10, %ebp
testq %r11, %r11
cmovel %r8d, %ebp
testq %rbx, %rbx
jle 0x8506e
testl %r12d, %r12d
je 0x85027
movq %rdi, %rcx
subq %rbx, %rcx
movq %rcx, %r8
sarq $0x6, %r8
cmpq %r14, %r8
jae 0x84ff7
movl $0x1, %r11d
shlq %cl, %r11
movq %r8, %rcx
addq %r11, (%r9,%rcx,8)
jae 0x85027
incq %rcx
movl $0x1, %r11d
cmpq %rcx, %r14
jne 0x84fe3
leaq -0x1(%r14), %rax
cmpq %r8, %rax
jl 0x85023
movl $0x1, %r11d
movq %r14, %rcx
movq -0x8(%r9,%rcx,8), %rax
shldq $0x3f, %rax, %r11
movq %r11, -0x8(%r9,%rcx,8)
decq %rcx
movq %rax, %r11
cmpq %r8, %rcx
jg 0x85009
incq 0x10(%r13)
movq 0x10(%r13), %rcx
cmpq 0x20(%rsp), %rcx
jl 0x8516a
cmpq 0x18(%rsp), %rcx
jg 0x851b1
subq %rbx, %rdi
movq %rdi, %rax
sarq $0x6, %rax
js 0x850c5
movl %edi, %ecx
andl $0x3f, %ecx
je 0x850c7
negb %cl
movq $-0x1, %rdx
shlq %cl, %rdx
notq %rdx
movl %edi, %ecx
shlq %cl, %rdx
andq %rdx, (%r9,%rax,8)
jmp 0x850c7
testl %r12d, %r12d
je 0x85171
cmpq $0x1, 0x18(%r13)
je 0x850a1
movq (%r13), %rax
movq (%rax), %rdi
movl $0x8, %edx
movq %r9, %rsi
callq *0x8(%rax)
testq %rax, %rax
je 0x850a1
movq %rax, 0x20(%r13)
movq $0x1, 0x18(%r13)
movq 0x20(%r13), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, (%rax)
movq 0x10(%r13), %rax
subq %rbx, %rax
incq %rax
movq %rax, 0x10(%r13)
orl $0x18, %ebp
jmp 0x8510d
xorl %eax, %eax
leaq -0x1(%rax), %rcx
leaq (,%r14,8), %rdx
shlq $0x3, %rax
subq %rax, %rdx
addq $0x8, %rdx
addq $-0x8, %rdx
cmpq $0x0, 0x8(%r9,%rcx,8)
leaq 0x1(%rcx), %rcx
je 0x850de
testq %rcx, %rcx
jle 0x85102
leaq (%r9,%rcx,8), %rsi
subq %rcx, %r14
movq %r9, %rdi
callq 0xe720
movq %r13, %rdi
movq %r14, %rsi
callq 0x84a70
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r13, %r13
sete %al
orb %al, %cl
movl %r13d, %r12d
movq %r10, %r13
jne 0x84faa
movq %rdi, %rcx
subq %rbx, %rcx
movq %rcx, %r15
sarq $0x6, %r15
sets %al
cmpq %r14, %r15
setae %dl
orb %al, %dl
movl $0x0, %r12d
jne 0x84faa
movq (%r9,%r15,8), %rax
xorl %r12d, %r12d
btq %rcx, %rax
setb %r12b
jmp 0x84faa
testb $0x8, 0xc(%rsp)
jne 0x851d4
movl 0x8(%r13), %r14d
cmpq $0x0, 0x18(%r13)
je 0x85197
movq (%r13), %rax
movq (%rax), %rdi
movq %r9, %rsi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%r13)
movq $0x0, 0x18(%r13)
orl $0x18, %ebp
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r13)
movl %r14d, 0x8(%r13)
jmp 0x8510d
movl 0x8(%r13), %esi
movq %r13, %rdi
movq 0x10(%rsp), %rdx
movl 0xc(%rsp), %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8bf54
movl %ebp, %eax
shrl %eax
andl $0x8, %eax
orl %eax, %ebp
jmp 0x85036
callq 0xe090
| __bf_round:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rcx
mov ecx, edx
shr ecx, 5
and ecx, 3Fh
mov al, 3Ch ; '<'
sub al, cl
cmp ecx, 3Fh ; '?'
movzx eax, al
mov ecx, 3Dh ; '='
cmovnz ecx, eax
mov r10d, 1
shl r10, cl
mov rax, rdi
mov r13d, 3
sub r13, r10
test dl, 10h
jnz short loc_84E8B
mov rcx, [rax+10h]
mov rbx, rsi
cmp rcx, r13
jge short loc_84EA1
mov rbx, rsi
test dl, 8
jz short loc_84EA1
lea rbx, [r10-3]
add rbx, rsi
add rbx, rcx
jmp short loc_84EA1
loc_84E8B:
mov rbx, 3FFFFFFFFFFFFFFFh
cmp rsi, rbx
jz short loc_84EA1
mov rbx, [rax+10h]
add rbx, rsi
loc_84EA1:
mov ebp, edx
and ebp, 7; switch 8 cases
mov r11d, 1
cmp ebp, 6
mov [rsp+58h+var_4C], edx
mov [rsp+58h+var_48], rsi
mov [rsp+58h+var_40], r10
mov [rsp+58h+var_38], r13
jz short loc_84F13
mov rcx, r14
shl rcx, 6
test rbx, rbx
mov r9, 0FFFFFFFFFFFFFFFFh
mov rdi, 0FFFFFFFFFFFFFFFFh
cmovns rdi, rbx
sub rcx, rdi
add rcx, 0FFFFFFFFFFFFFFFEh
mov rdi, rcx
sar rdi, 6
js short loc_84F2D
and ecx, 3Fh
inc ecx
mov r15, 0FFFFFFFFFFFFFFFFh
shl r15, cl
mov r12, [rax+20h]
cmp ecx, 40h ; '@'
not r15
cmovz r15, r9
test [r12+rdi*8], r15
jz short loc_84F23
loc_84F13:
mov cl, 1
jmp short loc_84F32
loc_84F17:
cmp qword ptr [r12+rdi*8-8], 0
lea rdi, [rdi-1]
jnz short loc_84F13
loc_84F23:
test rdi, rdi
setnle cl
jg short loc_84F17
jmp short loc_84F2F
loc_84F2D:
xor ecx, ecx
loc_84F2F:
xor r11d, r11d
loc_84F32:
mov r10, rax
mov r9, [rax+20h]
mov rdi, r14
shl rdi, 6
mov r15, rbx
not r15
lea r13, [rdi+r15]
sar r13, 6
sets dl
cmp r13, r14
setnb al
xor r12d, r12d
or al, dl
jnz short loc_84F6F
mov rax, [r9+r13*8]
xor r13d, r13d
bt rax, r15
setb r13b
jmp short loc_84F72
loc_84F6F:
xor r13d, r13d
loc_84F72:
or r11, r13
mov eax, ebp
lea rdx, jpt_84F85
movsxd rax, ds:(jpt_84F85 - 0A2880h)[rdx+rax*4]
add rax, rdx
jmp rax; switch jump
loc_84F87:
xor eax, eax; jumptable 0000000000084F85 cases 2,3
cmp ebp, 2
setz al
xor r12d, r12d
mov r13, r10
cmp [r10+8], eax
cmovz r12d, r11d
jmp short loc_84FAA
loc_84F9F:
mov r12d, r13d; jumptable 0000000000084F85 cases 4,6
jmp short loc_84FA7; jumptable 0000000000084F85 case 1
loc_84FA4:
mov r12d, r11d; jumptable 0000000000084F85 case 5
loc_84FA7:
mov r13, r10; jumptable 0000000000084F85 case 1
loc_84FAA:
mov ebp, r8d
or ebp, 10h
test r11, r11
cmovz ebp, r8d
test rbx, rbx
jle loc_8506E
test r12d, r12d
jz short loc_85027
mov rcx, rdi
sub rcx, rbx
mov r8, rcx
sar r8, 6
cmp r8, r14
jnb short loc_84FF7
mov r11d, 1
shl r11, cl
mov rcx, r8
loc_84FE3:
add [r9+rcx*8], r11
jnb short loc_85027
inc rcx
mov r11d, 1
cmp r14, rcx
jnz short loc_84FE3
loc_84FF7:
lea rax, [r14-1]
cmp rax, r8
jl short loc_85023
mov r11d, 1
mov rcx, r14
loc_85009:
mov rax, [r9+rcx*8-8]
shld r11, rax, 3Fh
mov [r9+rcx*8-8], r11
dec rcx
mov r11, rax
cmp rcx, r8
jg short loc_85009
loc_85023:
inc qword ptr [r13+10h]
loc_85027:
mov rcx, [r13+10h]
cmp rcx, [rsp+58h+var_38]
jl loc_8516A
loc_85036:
cmp rcx, [rsp+58h+var_40]
jg loc_851B1
sub rdi, rbx
mov rax, rdi
sar rax, 6
js short loc_850C5
mov ecx, edi
and ecx, 3Fh
jz short loc_850C7
neg cl
mov rdx, 0FFFFFFFFFFFFFFFFh
shl rdx, cl
not rdx
mov ecx, edi
shl rdx, cl
and [r9+rax*8], rdx
jmp short loc_850C7
loc_8506E:
test r12d, r12d
jz loc_85171
cmp qword ptr [r13+18h], 1
jz short loc_850A1
mov rax, [r13+0]
mov rdi, [rax]
mov edx, 8
mov rsi, r9
call qword ptr [rax+8]
test rax, rax
jz short loc_850A1
mov [r13+20h], rax
mov qword ptr [r13+18h], 1
loc_850A1:
mov rax, [r13+20h]
mov rcx, 8000000000000000h
mov [rax], rcx
mov rax, [r13+10h]
sub rax, rbx
inc rax
mov [r13+10h], rax
or ebp, 18h
jmp short loc_8510D
loc_850C5:
xor eax, eax
loc_850C7:
lea rcx, [rax-1]
lea rdx, ds:0[r14*8]
shl rax, 3
sub rdx, rax
add rdx, 8
loc_850DE:
add rdx, 0FFFFFFFFFFFFFFF8h
cmp qword ptr [r9+rcx*8+8], 0
lea rcx, [rcx+1]
jz short loc_850DE
test rcx, rcx
jle short loc_85102
lea rsi, [r9+rcx*8]
sub r14, rcx
mov rdi, r9
call _memmove
loc_85102:
mov rdi, r13
mov rsi, r14
call bf_resize
loc_8510D:
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8511E:
test r13, r13; jumptable 0000000000084F85 case 0
setz al
or cl, al
mov r12d, r13d
mov r13, r10
jnz loc_84FAA
mov rcx, rdi
sub rcx, rbx
mov r15, rcx
sar r15, 6
sets al
cmp r15, r14
setnb dl
or dl, al
mov r12d, 0
jnz loc_84FAA
mov rax, [r9+r15*8]
xor r12d, r12d
bt rax, rcx
setb r12b
jmp loc_84FAA
loc_8516A:
test byte ptr [rsp+58h+var_4C], 8
jnz short loc_851D4
loc_85171:
mov r14d, [r13+8]
cmp qword ptr [r13+18h], 0
jz short loc_85197
mov rax, [r13+0]
mov rdi, [rax]
mov rsi, r9
xor edx, edx
call qword ptr [rax+8]
mov [r13+20h], rax
mov qword ptr [r13+18h], 0
loc_85197:
or ebp, 18h
mov rax, 8000000000000000h
mov [r13+10h], rax
mov [r13+8], r14d
jmp loc_8510D
loc_851B1:
mov esi, [r13+8]
mov rdi, r13
mov rdx, [rsp+58h+var_48]
mov ecx, [rsp+58h+var_4C]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp bf_set_overflow
loc_851D4:
mov eax, ebp
shr eax, 1
and eax, 8
or ebp, eax
jmp loc_85036
loc_851E2:
call _abort; jumptable 0000000000084F85 case 7
| long long _bf_round(long long a1, long long a2, long long a3, unsigned long long a4, unsigned int a5)
{
unsigned int v6; // ecx
bool v7; // zf
unsigned int v8; // eax
signed long long v9; // rcx
long long v10; // r10
long long v12; // r13
long long v13; // rbx
int v14; // ebp
long long v15; // r11
long long v16; // rdi
long long v17; // rcx
long long v18; // rdi
long long v19; // r12
long long v20; // r15
long long v21; // r10
long long v22; // r9
const char *v23; // rdi
long long v24; // r13
int v25; // r12d
long long v26; // rax
long long v27; // r13
long long v28; // r11
_QWORD **v29; // r13
unsigned int v30; // ebp
long long v31; // r8
long long v32; // r11
long long v33; // rcx
bool v34; // cf
long long v35; // r11
signed long long v36; // rcx
__int128 v37; // rt0
long long v38; // rdi
long long v39; // rax
long long v40; // rax
long long v41; // rcx
long long v42; // rdx
long long v44; // r15
long long v45; // rax
int v46; // r14d
unsigned int v47; // [rsp+Ch] [rbp-4Ch]
signed long long v48; // [rsp+18h] [rbp-40h]
signed long long v49; // [rsp+20h] [rbp-38h]
v6 = ((unsigned int)a3 >> 5) & 0x3F;
v7 = v6 == 63;
v8 = (unsigned __int8)(60 - v6);
v9 = 61LL;
if ( !v7 )
v9 = v8;
v10 = 1LL << v9;
v12 = 3 - (1LL << v9);
if ( (a3 & 0x10) != 0 )
{
v13 = 0x3FFFFFFFFFFFFFFFLL;
if ( a2 != 0x3FFFFFFFFFFFFFFFLL )
v13 = a2 + *(_QWORD *)(a1 + 16);
}
else
{
v9 = *(_QWORD *)(a1 + 16);
v13 = a2;
if ( v9 < v12 )
{
v13 = a2;
if ( (a3 & 8) != 0 )
v13 = v9 + a2 + v10 - 3;
}
}
v14 = a3 & 7;
v15 = 1LL;
v47 = a3;
v48 = v10;
v49 = v12;
if ( v14 == 6 )
goto LABEL_16;
v16 = -1LL;
if ( v13 >= 0 )
v16 = v13;
v17 = (a4 << 6) - v16 - 2;
v18 = v17 >> 6;
if ( v17 >> 6 < 0 )
{
v9 = 0LL;
}
else
{
v9 = (unsigned int)(v17 & 0x3F) + 1;
v19 = *(_QWORD *)(a1 + 32);
v20 = ~(-1LL << v9);
if ( (_DWORD)v9 == 64 )
v20 = -1LL;
if ( (v20 & *(_QWORD *)(v19 + 8 * v18)) != 0 )
{
LABEL_16:
LOBYTE(v9) = 1;
goto LABEL_22;
}
while ( 1 )
{
LOBYTE(v9) = v18 > 0;
if ( v18 <= 0 )
break;
v7 = *(_QWORD *)(v19 + 8 * v18-- - 8) == 0LL;
if ( !v7 )
goto LABEL_16;
}
}
v15 = 0LL;
LABEL_22:
v21 = a1;
v22 = *(_QWORD *)(a1 + 32);
v23 = (const char *)(a4 << 6);
v24 = (long long)((a4 << 6) + ~v13) >> 6;
LOBYTE(a3) = v24 < 0;
v25 = 0;
if ( v24 < 0 || v24 >= a4 )
{
v27 = 0LL;
}
else
{
v26 = *(_QWORD *)(v22 + 8 * v24);
v27 = _bittest64(&v26, ~v13);
}
v28 = v27 | v15;
switch ( v14 )
{
case 0:
LOBYTE(v9) = (v27 == 0) | v9;
v25 = v27;
v29 = (_QWORD **)v21;
if ( !(_BYTE)v9 )
{
v9 = (signed long long)&v23[-v13];
v44 = (long long)&v23[-v13] >> 6;
v25 = 0;
if ( v44 >= 0 && v44 < a4 )
{
v45 = *(_QWORD *)(v22 + 8 * v44);
v25 = _bittest64(&v45, v9);
}
}
goto LABEL_32;
case 1:
goto LABEL_31;
case 2:
case 3:
v25 = 0;
v29 = (_QWORD **)v21;
if ( *(_DWORD *)(v21 + 8) == (v14 == 2) )
v25 = v28;
goto LABEL_32;
case 4:
case 6:
v25 = v27;
goto LABEL_31;
case 5:
v25 = v28;
LABEL_31:
v29 = (_QWORD **)v21;
LABEL_32:
v30 = a5 | 0x10;
if ( !v28 )
v30 = a5;
if ( v13 <= 0 )
{
if ( v25 )
{
if ( v29[3] != (_QWORD *)((char *)&dword_0 + 1) )
{
v40 = ((long long ( *)(_QWORD, long long, long long, signed long long))(*v29)[1])(**v29, v22, 8LL, v9);
if ( v40 )
{
v29[4] = (_QWORD *)v40;
v29[3] = (_QWORD *)(&dword_0 + 1);
}
}
*v29[4] = 0x8000000000000000LL;
v29[2] = (_QWORD *)((char *)v29[2] - v13 + 1);
v30 |= 0x18u;
return v30;
}
goto LABEL_65;
}
if ( v25 )
{
v31 = (long long)&v23[-v13] >> 6;
if ( v31 >= a4 )
{
LABEL_40:
if ( (long long)(a4 - 1) >= v31 )
{
v35 = 1LL;
v36 = a4;
do
{
*((_QWORD *)&v37 + 1) = v35;
*(_QWORD *)&v37 = *(_QWORD *)(v22 + 8 * v36 - 8);
*(_QWORD *)(v22 + 8 * v36-- - 8) = v37 >> 1;
v35 = v37;
}
while ( v36 > v31 );
}
v29[2] = (_QWORD *)((char *)v29[2] + 1);
}
else
{
v32 = 1LL << ((unsigned __int8)v23 - (unsigned __int8)v13);
v33 = (long long)&v23[-v13] >> 6;
while ( 1 )
{
v34 = __CFADD__(v32, *(_QWORD *)(v22 + 8 * v33));
*(_QWORD *)(v22 + 8 * v33) += v32;
if ( !v34 )
break;
++v33;
v32 = 1LL;
if ( a4 == v33 )
goto LABEL_40;
}
}
}
v9 = (signed long long)v29[2];
if ( v9 < v49 )
{
if ( (v47 & 8) != 0 )
{
v30 |= (v30 >> 1) & 8;
goto LABEL_45;
}
LABEL_65:
v46 = *((_DWORD *)v29 + 2);
if ( v29[3] )
{
v29[4] = (_QWORD *)((long long ( *)(_QWORD, long long, _QWORD, signed long long))(*v29)[1])(
**v29,
v22,
0LL,
v9);
v29[3] = 0LL;
}
v30 |= 0x18u;
v29[2] = (_QWORD *)0x8000000000000000LL;
*((_DWORD *)v29 + 2) = v46;
return v30;
}
LABEL_45:
if ( v9 <= v48 )
{
v38 = (long long)&v23[-v13];
v39 = v38 >> 6;
if ( v38 >> 6 < 0 )
{
v39 = 0LL;
}
else if ( (v38 & 0x3F) != 0 )
{
*(_QWORD *)(v22 + 8 * v39) &= ~(-1LL << -(v38 & 0x3F)) << v38;
}
v41 = v39 - 1;
v42 = 8 * a4 - 8 * v39 + 8;
do
{
v42 -= 8LL;
v7 = *(_QWORD *)(v22 + 8 * v41++ + 8) == 0LL;
}
while ( v7 );
if ( v41 > 0 )
{
a4 -= v41;
memmove(v22, v22 + 8 * v41, v42);
}
bf_resize((long long)v29, a4);
return v30;
}
return bf_set_overflow(v29, *((unsigned int *)v29 + 2), a2, v47);
case 7:
abort(v23, a2, a3, v9);
}
}
| __bf_round:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RCX
MOV ECX,EDX
SHR ECX,0x5
AND ECX,0x3f
MOV AL,0x3c
SUB AL,CL
CMP ECX,0x3f
MOVZX EAX,AL
MOV ECX,0x3d
CMOVNZ ECX,EAX
MOV R10D,0x1
SHL R10,CL
MOV RAX,RDI
MOV R13D,0x3
SUB R13,R10
TEST DL,0x10
JNZ 0x00184e8b
MOV RCX,qword ptr [RAX + 0x10]
MOV RBX,RSI
CMP RCX,R13
JGE 0x00184ea1
MOV RBX,RSI
TEST DL,0x8
JZ 0x00184ea1
LEA RBX,[R10 + -0x3]
ADD RBX,RSI
ADD RBX,RCX
JMP 0x00184ea1
LAB_00184e8b:
MOV RBX,0x3fffffffffffffff
CMP RSI,RBX
JZ 0x00184ea1
MOV RBX,qword ptr [RAX + 0x10]
ADD RBX,RSI
LAB_00184ea1:
MOV EBP,EDX
AND EBP,0x7
MOV R11D,0x1
CMP EBP,0x6
MOV dword ptr [RSP + 0xc],EDX
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x18],R10
MOV qword ptr [RSP + 0x20],R13
JZ 0x00184f13
MOV RCX,R14
SHL RCX,0x6
TEST RBX,RBX
MOV R9,-0x1
MOV RDI,-0x1
CMOVNS RDI,RBX
SUB RCX,RDI
ADD RCX,-0x2
MOV RDI,RCX
SAR RDI,0x6
JS 0x00184f2d
AND ECX,0x3f
INC ECX
MOV R15,-0x1
SHL R15,CL
MOV R12,qword ptr [RAX + 0x20]
CMP ECX,0x40
NOT R15
CMOVZ R15,R9
TEST qword ptr [R12 + RDI*0x8],R15
JZ 0x00184f23
LAB_00184f13:
MOV CL,0x1
JMP 0x00184f32
LAB_00184f17:
CMP qword ptr [R12 + RDI*0x8 + -0x8],0x0
LEA RDI,[RDI + -0x1]
JNZ 0x00184f13
LAB_00184f23:
TEST RDI,RDI
SETG CL
JG 0x00184f17
JMP 0x00184f2f
LAB_00184f2d:
XOR ECX,ECX
LAB_00184f2f:
XOR R11D,R11D
LAB_00184f32:
MOV R10,RAX
MOV R9,qword ptr [RAX + 0x20]
MOV RDI,R14
SHL RDI,0x6
MOV R15,RBX
NOT R15
LEA R13,[RDI + R15*0x1]
SAR R13,0x6
SETS DL
CMP R13,R14
SETNC AL
XOR R12D,R12D
OR AL,DL
JNZ 0x00184f6f
MOV RAX,qword ptr [R9 + R13*0x8]
XOR R13D,R13D
BT RAX,R15
SETC R13B
JMP 0x00184f72
LAB_00184f6f:
XOR R13D,R13D
LAB_00184f72:
OR R11,R13
MOV EAX,EBP
LEA RDX,[0x1a2880]
MOVSXD RAX,dword ptr [RDX + RAX*0x4]
ADD RAX,RDX
switchD:
JMP RAX
caseD_2:
XOR EAX,EAX
CMP EBP,0x2
SETZ AL
XOR R12D,R12D
MOV R13,R10
CMP dword ptr [R10 + 0x8],EAX
CMOVZ R12D,R11D
JMP 0x00184faa
caseD_4:
MOV R12D,R13D
JMP 0x00184fa7
caseD_5:
MOV R12D,R11D
caseD_1:
MOV R13,R10
LAB_00184faa:
MOV EBP,R8D
OR EBP,0x10
TEST R11,R11
CMOVZ EBP,R8D
TEST RBX,RBX
JLE 0x0018506e
TEST R12D,R12D
JZ 0x00185027
MOV RCX,RDI
SUB RCX,RBX
MOV R8,RCX
SAR R8,0x6
CMP R8,R14
JNC 0x00184ff7
MOV R11D,0x1
SHL R11,CL
MOV RCX,R8
LAB_00184fe3:
ADD qword ptr [R9 + RCX*0x8],R11
JNC 0x00185027
INC RCX
MOV R11D,0x1
CMP R14,RCX
JNZ 0x00184fe3
LAB_00184ff7:
LEA RAX,[R14 + -0x1]
CMP RAX,R8
JL 0x00185023
MOV R11D,0x1
MOV RCX,R14
LAB_00185009:
MOV RAX,qword ptr [R9 + RCX*0x8 + -0x8]
SHLD R11,RAX,0x3f
MOV qword ptr [R9 + RCX*0x8 + -0x8],R11
DEC RCX
MOV R11,RAX
CMP RCX,R8
JG 0x00185009
LAB_00185023:
INC qword ptr [R13 + 0x10]
LAB_00185027:
MOV RCX,qword ptr [R13 + 0x10]
CMP RCX,qword ptr [RSP + 0x20]
JL 0x0018516a
LAB_00185036:
CMP RCX,qword ptr [RSP + 0x18]
JG 0x001851b1
SUB RDI,RBX
MOV RAX,RDI
SAR RAX,0x6
JS 0x001850c5
MOV ECX,EDI
AND ECX,0x3f
JZ 0x001850c7
NEG CL
MOV RDX,-0x1
SHL RDX,CL
NOT RDX
MOV ECX,EDI
SHL RDX,CL
AND qword ptr [R9 + RAX*0x8],RDX
JMP 0x001850c7
LAB_0018506e:
TEST R12D,R12D
JZ 0x00185171
CMP qword ptr [R13 + 0x18],0x1
JZ 0x001850a1
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RAX]
MOV EDX,0x8
MOV RSI,R9
CALL qword ptr [RAX + 0x8]
TEST RAX,RAX
JZ 0x001850a1
MOV qword ptr [R13 + 0x20],RAX
MOV qword ptr [R13 + 0x18],0x1
LAB_001850a1:
MOV RAX,qword ptr [R13 + 0x20]
MOV RCX,-0x8000000000000000
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [R13 + 0x10]
SUB RAX,RBX
INC RAX
MOV qword ptr [R13 + 0x10],RAX
OR EBP,0x18
JMP 0x0018510d
LAB_001850c5:
XOR EAX,EAX
LAB_001850c7:
LEA RCX,[RAX + -0x1]
LEA RDX,[R14*0x8]
SHL RAX,0x3
SUB RDX,RAX
ADD RDX,0x8
LAB_001850de:
ADD RDX,-0x8
CMP qword ptr [R9 + RCX*0x8 + 0x8],0x0
LEA RCX,[RCX + 0x1]
JZ 0x001850de
TEST RCX,RCX
JLE 0x00185102
LEA RSI,[R9 + RCX*0x8]
SUB R14,RCX
MOV RDI,R9
CALL 0x0010e720
LAB_00185102:
MOV RDI,R13
MOV RSI,R14
CALL 0x00184a70
LAB_0018510d:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
caseD_0:
TEST R13,R13
SETZ AL
OR CL,AL
MOV R12D,R13D
MOV R13,R10
JNZ 0x00184faa
MOV RCX,RDI
SUB RCX,RBX
MOV R15,RCX
SAR R15,0x6
SETS AL
CMP R15,R14
SETNC DL
OR DL,AL
MOV R12D,0x0
JNZ 0x00184faa
MOV RAX,qword ptr [R9 + R15*0x8]
XOR R12D,R12D
BT RAX,RCX
SETC R12B
JMP 0x00184faa
LAB_0018516a:
TEST byte ptr [RSP + 0xc],0x8
JNZ 0x001851d4
LAB_00185171:
MOV R14D,dword ptr [R13 + 0x8]
CMP qword ptr [R13 + 0x18],0x0
JZ 0x00185197
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RAX]
MOV RSI,R9
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [R13 + 0x20],RAX
MOV qword ptr [R13 + 0x18],0x0
LAB_00185197:
OR EBP,0x18
MOV RAX,-0x8000000000000000
MOV qword ptr [R13 + 0x10],RAX
MOV dword ptr [R13 + 0x8],R14D
JMP 0x0018510d
LAB_001851b1:
MOV ESI,dword ptr [R13 + 0x8]
MOV RDI,R13
MOV RDX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018bf54
LAB_001851d4:
MOV EAX,EBP
SHR EAX,0x1
AND EAX,0x8
OR EBP,EAX
JMP 0x00185036
caseD_7:
CALL 0x0010e090
|
ulong __bf_round(long *param_1,ulong param_2,uint param_3,ulong param_4,uint param_5)
{
ulong *puVar1;
ulong uVar2;
void *__dest;
bool bVar3;
bool bVar4;
bool bVar5;
byte bVar6;
uint uVar7;
int iVar8;
long lVar9;
ulong uVar10;
size_t __n;
ulong uVar11;
long lVar12;
ulong uVar13;
long lVar14;
ulong uVar15;
ulong uVar16;
bool bVar17;
uVar7 = param_3 >> 5 & 0x3f;
bVar6 = 0x3d;
if (uVar7 != 0x3f) {
bVar6 = 0x3c - (char)uVar7;
}
lVar14 = 1L << (bVar6 & 0x3f);
if ((param_3 & 0x10) == 0) {
uVar11 = param_2;
if ((param_1[2] < 3 - lVar14) && ((param_3 & 8) != 0)) {
uVar11 = lVar14 + -3 + param_2 + param_1[2];
}
}
else {
uVar11 = 0x3fffffffffffffff;
if (param_2 != 0x3fffffffffffffff) {
uVar11 = param_1[2] + param_2;
}
}
uVar7 = param_3 & 7;
bVar6 = 1;
if (uVar7 == 6) {
LAB_00184f13:
bVar3 = true;
}
else {
uVar16 = 0xffffffffffffffff;
if (-1 < (long)uVar11) {
uVar16 = uVar11;
}
lVar9 = (param_4 * 0x40 - uVar16) + -2;
lVar12 = lVar9 >> 6;
if (-1 < lVar12) {
iVar8 = ((uint)lVar9 & 0x3f) + 1;
uVar16 = ~(-1L << ((byte)iVar8 & 0x3f));
if (iVar8 == 0x40) {
uVar16 = 0xffffffffffffffff;
}
uVar16 = *(ulong *)(param_1[4] + lVar12 * 8) & uVar16;
while (uVar16 == 0) {
bVar3 = 0 < lVar12;
if (lVar12 < 1) goto LAB_00184f2f;
lVar9 = lVar12 * 8;
lVar12 = lVar12 + -1;
uVar16 = *(ulong *)(param_1[4] + -8 + lVar9);
}
goto LAB_00184f13;
}
bVar3 = false;
LAB_00184f2f:
bVar6 = 0;
}
__dest = (void *)param_1[4];
lVar12 = param_4 * 0x40;
uVar16 = (long)(lVar12 + ~uVar11) >> 6;
if (uVar16 < param_4 && -1 < (long)uVar16) {
bVar17 = (*(ulong *)((long)__dest + uVar16 * 8) >> (~uVar11 & 0x3f) & 1) != 0;
}
else {
bVar17 = false;
}
bVar4 = (bool)(bVar6 | bVar17);
bVar5 = false;
switch(uVar7) {
case 0:
bVar5 = bVar17;
if (!bVar3 && bVar17) {
uVar16 = (long)(lVar12 - uVar11) >> 6;
bVar5 = false;
if (uVar16 < param_4 && -1 < (long)uVar16) {
bVar5 = (*(ulong *)((long)__dest + uVar16 * 8) >> (lVar12 - uVar11 & 0x3f) & 1) != 0;
}
}
goto LAB_00184faa;
case 1:
break;
default:
bVar5 = false;
if (*(uint *)(param_1 + 1) == (uint)(uVar7 == 2)) {
bVar5 = bVar4;
}
goto LAB_00184faa;
case 4:
case 6:
bVar5 = bVar17;
break;
case 5:
bVar5 = bVar4;
break;
case 7:
/* WARNING: Subroutine does not return */
abort();
}
LAB_00184faa:
uVar16 = (ulong)(param_5 | 0x10);
if (!bVar4) {
uVar16 = (ulong)param_5;
}
uVar7 = (uint)uVar16;
if ((long)uVar11 < 1) {
if (bVar5) {
if ((param_1[3] != 1) &&
(lVar14 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,__dest,8),
lVar14 != 0)) {
param_1[4] = lVar14;
param_1[3] = 1;
}
*(int8 *)param_1[4] = 0x8000000000000000;
param_1[2] = (param_1[2] - uVar11) + 1;
return (ulong)(uVar7 | 0x18);
}
LAB_00185171:
lVar14 = param_1[1];
if (param_1[3] != 0) {
lVar12 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,__dest,0);
param_1[4] = lVar12;
param_1[3] = 0;
}
uVar16 = (ulong)(uVar7 | 0x18);
param_1[2] = -0x8000000000000000;
*(int *)(param_1 + 1) = (int)lVar14;
}
else {
if (bVar5) {
uVar13 = (long)(lVar12 - uVar11) >> 6;
if (uVar13 < param_4) {
uVar15 = 1L << ((byte)(lVar12 - uVar11) & 0x3f);
uVar10 = uVar13;
do {
puVar1 = (ulong *)((long)__dest + uVar10 * 8);
uVar2 = *puVar1;
*puVar1 = *puVar1 + uVar15;
if (!CARRY8(uVar2,uVar15)) goto LAB_00185027;
uVar10 = uVar10 + 1;
uVar15 = 1;
} while (param_4 != uVar10);
}
if ((long)uVar13 <= (long)(param_4 - 1)) {
uVar10 = param_4;
uVar15 = 1;
do {
uVar2 = *(ulong *)((long)__dest + uVar10 * 8 + -8);
*(ulong *)((long)__dest + uVar10 * 8 + -8) = uVar15 << 0x3f | uVar2 >> 1;
uVar10 = uVar10 - 1;
uVar15 = uVar2;
} while ((long)uVar13 < (long)uVar10);
}
param_1[2] = param_1[2] + 1;
}
LAB_00185027:
if (param_1[2] < 3 - lVar14) {
if ((param_3 & 8) == 0) goto LAB_00185171;
uVar16 = (ulong)(uVar7 | (uint)(uVar16 >> 1) & 8);
}
if (lVar14 < param_1[2]) {
uVar11 = bf_set_overflow(param_1,(int)param_1[1],param_2,param_3);
return uVar11;
}
uVar11 = lVar12 - uVar11;
lVar14 = (long)uVar11 >> 6;
if (lVar14 < 0) {
lVar14 = 0;
}
else if ((uVar11 & 0x3f) != 0) {
puVar1 = (ulong *)((long)__dest + lVar14 * 8);
*puVar1 = *puVar1 & ~(-1L << (-((byte)uVar11 & 0x3f) & 0x3f)) << ((byte)uVar11 & 0x3f);
}
lVar12 = lVar14 + -1;
__n = param_4 * 8 + lVar14 * -8 + 8;
do {
__n = __n - 8;
lVar14 = lVar12 * 8;
lVar12 = lVar12 + 1;
} while (*(long *)((long)__dest + lVar14 + 8) == 0);
if (0 < lVar12) {
param_4 = param_4 - lVar12;
memmove(__dest,(void *)((long)__dest + lVar12 * 8),__n);
}
bf_resize(param_1,param_4);
}
return uVar16;
}
| |
40,293 | translog_file_init | eloqsql/storage/maria/ma_loghandler.c | static void translog_file_init(TRANSLOG_FILE *file, uint32 number,
my_bool is_sync)
{
pagecache_file_set_null_hooks(&file->handler);
file->handler.post_read_hook= translog_page_validator;
file->handler.flush_log_callback= maria_flush_log_for_page_none;
file->handler.callback_data= (uchar*)file;
file->number= number;
file->was_recovered= 0;
file->is_sync= is_sync;
} | O0 | c | translog_file_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x304b0
movq -0x8(%rbp), %rax
leaq 0x6994(%rip), %rcx # 0x58ab0
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
leaq 0xb8f5(%rip), %rcx # 0x5da20
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x50(%rax)
movb -0xd(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x51(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| translog_file_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_D], al
mov rdi, [rbp+var_8]
add rdi, 8
call pagecache_file_set_null_hooks
mov rax, [rbp+var_8]
lea rcx, translog_page_validator
mov [rax+28h], rcx
mov rax, [rbp+var_8]
lea rcx, maria_flush_log_for_page_none
mov [rax+40h], rcx
mov rcx, [rbp+var_8]
mov rax, [rbp+var_8]
mov [rax+48h], rcx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax], ecx
mov rax, [rbp+var_8]
mov byte ptr [rax+50h], 0
mov cl, [rbp+var_D]
mov rax, [rbp+var_8]
mov [rax+51h], cl
add rsp, 10h
pop rbp
retn
| long long translog_file_init(long long a1, int a2, char a3)
{
long long result; // rax
pagecache_file_set_null_hooks((_QWORD *)(a1 + 8));
*(_QWORD *)(a1 + 40) = translog_page_validator;
*(_QWORD *)(a1 + 64) = maria_flush_log_for_page_none;
*(_QWORD *)(a1 + 72) = a1;
*(_DWORD *)a1 = a2;
*(_BYTE *)(a1 + 80) = 0;
result = a1;
*(_BYTE *)(a1 + 81) = a3;
return result;
}
| translog_file_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV byte ptr [RBP + -0xd],AL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
CALL 0x001304b0
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x158ab0]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x15da20]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x48],RCX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x50],0x0
MOV CL,byte ptr [RBP + -0xd]
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x51],CL
ADD RSP,0x10
POP RBP
RET
|
void translog_file_init(int4 *param_1,int4 param_2,int1 param_3)
{
pagecache_file_set_null_hooks(param_1 + 2);
*(code **)(param_1 + 10) = translog_page_validator;
*(code **)(param_1 + 0x10) = maria_flush_log_for_page_none;
*(int4 **)(param_1 + 0x12) = param_1;
*param_1 = param_2;
*(int1 *)(param_1 + 0x14) = 0;
*(int1 *)((long)param_1 + 0x51) = param_3;
return;
}
| |
40,294 | JS_IsArray | bluesky950520[P]quickjs/quickjs.c | int JS_IsArray(JSContext *ctx, JSValue val)
{
JSObject *p;
if (JS_VALUE_GET_TAG(val) == JS_TAG_OBJECT) {
p = JS_VALUE_GET_OBJ(val);
if (unlikely(p->class_id == JS_CLASS_PROXY))
return js_proxy_isArray(ctx, val);
else
return p->class_id == JS_CLASS_ARRAY;
} else {
return FALSE;
}
} | O0 | c | JS_IsArray:
subq $0x28, %rsp
movq %rsi, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmpl $-0x1, %eax
jne 0x38958
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x30, %eax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3893f
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x38970
movl %eax, 0x24(%rsp)
jmp 0x38960
movq (%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x2, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x24(%rsp)
jmp 0x38960
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
| JS_IsArray:
sub rsp, 28h
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_10], rdx
mov [rsp+28h+var_20], rdi
mov rax, [rsp+28h+var_10]
cmp eax, 0FFFFFFFFh
jnz short loc_38958
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_28], rax
mov rax, [rsp+28h+var_28]
movzx eax, word ptr [rax+6]
cmp eax, 30h ; '0'
setz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_3893F
mov rdi, [rsp+28h+var_20]
mov rsi, [rsp+28h+var_18]
mov rdx, [rsp+28h+var_10]
call js_proxy_isArray
mov [rsp+28h+var_4], eax
jmp short loc_38960
loc_3893F:
mov rax, [rsp+28h+var_28]
movzx eax, word ptr [rax+6]
cmp eax, 2
setz al
and al, 1
movzx eax, al
mov [rsp+28h+var_4], eax
jmp short loc_38960
loc_38958:
mov [rsp+28h+var_4], 0
loc_38960:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long JS_IsArray(long long a1, long long a2, long long a3)
{
if ( (_DWORD)a3 == -1 )
{
if ( *(_WORD *)(a2 + 6) == 48 )
return (unsigned int)js_proxy_isArray(a1, a2, a3);
else
return *(unsigned __int16 *)(a2 + 6) == 2;
}
else
{
return 0;
}
}
| JS_IsArray:
SUB RSP,0x28
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,qword ptr [RSP + 0x18]
CMP EAX,-0x1
JNZ 0x00138958
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x30
SETZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0013893f
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x00138970
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00138960
LAB_0013893f:
MOV RAX,qword ptr [RSP]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x2
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00138960
LAB_00138958:
MOV dword ptr [RSP + 0x24],0x0
LAB_00138960:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
uint JS_IsArray(int8 param_1,long param_2,int8 param_3)
{
int4 local_4;
if ((int)param_3 == -1) {
if (*(short *)(param_2 + 6) == 0x30) {
local_4 = js_proxy_isArray(param_1,param_2,param_3);
}
else {
local_4 = (uint)(*(short *)(param_2 + 6) == 2);
}
}
else {
local_4 = 0;
}
return local_4;
}
| |
40,295 | JS_IsArray | bluesky950520[P]quickjs/quickjs.c | int JS_IsArray(JSContext *ctx, JSValue val)
{
JSObject *p;
if (JS_VALUE_GET_TAG(val) == JS_TAG_OBJECT) {
p = JS_VALUE_GET_OBJ(val);
if (unlikely(p->class_id == JS_CLASS_PROXY))
return js_proxy_isArray(ctx, val);
else
return p->class_id == JS_CLASS_ARRAY;
} else {
return FALSE;
}
} | O3 | c | JS_IsArray:
xorl %eax, %eax
cmpl $-0x1, %edx
jne 0x27d0c
movzwl 0x6(%rsi), %ecx
cmpw $0x30, %cx
je 0x27d0d
xorl %eax, %eax
cmpw $0x2, %cx
sete %al
retq
| JS_IsArray:
xor eax, eax
cmp edx, 0FFFFFFFFh
jnz short locret_27D0C
movzx ecx, word ptr [rsi+6]
cmp cx, 30h ; '0'
jz short js_proxy_isArray
xor eax, eax
cmp cx, 2
setz al
locret_27D0C:
retn
| long long JS_IsArray(long long a1, long long a2, long long a3)
{
long long result; // rax
__int16 v4; // cx
result = 0LL;
if ( (_DWORD)a3 == -1 )
{
v4 = *(_WORD *)(a2 + 6);
if ( v4 == 48 )
return js_proxy_isArray(a1, a2, a3);
else
return v4 == 2;
}
return result;
}
| JS_IsArray:
XOR EAX,EAX
CMP EDX,-0x1
JNZ 0x00127d0c
MOVZX ECX,word ptr [RSI + 0x6]
CMP CX,0x30
JZ 0x00127d0d
XOR EAX,EAX
CMP CX,0x2
SETZ AL
LAB_00127d0c:
RET
|
ulong JS_IsArray(long param_1,long param_2,int param_3)
{
int8 *puVar1;
ulong uVar2;
uVar2 = 0;
if (param_3 == -1) {
if (*(short *)(param_2 + 6) == 0x30) {
uVar2 = 0;
if ((*(short *)(param_2 + 6) == 0x30) &&
(puVar1 = *(int8 **)(param_2 + 0x30), puVar1 != (int8 *)0x0)) {
if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) {
JS_ThrowRangeError(param_1,"Maximum call stack size exceeded");
}
else {
if (*(char *)((long)puVar1 + 0x21) == '\0') {
uVar2 = JS_IsArray(param_1,*puVar1,puVar1[1]);
return uVar2;
}
JS_ThrowTypeError(param_1,"revoked proxy");
}
uVar2 = 0xffffffff;
}
return uVar2;
}
uVar2 = (ulong)(*(short *)(param_2 + 6) == 2);
}
return uVar2;
}
| |
40,296 | ma_tls_start | eloqsql/libmariadb/libmariadb/secure/openssl.c | int ma_tls_start(char *errmsg __attribute__((unused)), size_t errmsg_len __attribute__((unused)))
{
int rc= 1;
char *p;
if (ma_tls_initialized)
return 0;
/* lock mutex to prevent multiple initialization */
pthread_mutex_init(&LOCK_openssl_config, NULL);
pthread_mutex_lock(&LOCK_openssl_config);
#ifdef HAVE_OPENSSL_1_1_API
if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL))
goto end;
#else
if (ssl_thread_init())
{
strncpy(errmsg, "Not enough memory", errmsg_len);
goto end;
}
SSL_library_init();
#if SSLEAY_VERSION_NUMBER >= 0x00907000L
OPENSSL_config(NULL);
#endif
#endif
#ifndef HAVE_OPENSSL_1_1_API
/* load errors */
SSL_load_error_strings();
/* digests and ciphers */
OpenSSL_add_all_algorithms();
#endif
disable_sigpipe();
#ifdef OPENSSL_USE_BIOMETHOD
memcpy(&ma_BIO_method, BIO_s_socket(), sizeof(BIO_METHOD));
ma_BIO_method.bread= ma_bio_read;
ma_BIO_method.bwrite= ma_bio_write;
#endif
snprintf(tls_library_version, TLS_VERSION_LENGTH - 1, "%s",
#if defined(LIBRESSL_VERSION_NUMBER) || !defined(HAVE_OPENSSL_1_1_API)
SSLeay_version(SSLEAY_VERSION));
#else
OpenSSL_version(OPENSSL_VERSION));
#endif
/* remove date from version */
if ((p= strstr(tls_library_version, " ")))
*p= 0;
rc= 0;
ma_tls_initialized= TRUE;
end:
pthread_mutex_unlock(&LOCK_openssl_config);
return rc;
} | O3 | c | ma_tls_start:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2290b(%rip), %r15 # 0x4b040
xorl %ebx, %ebx
cmpb $0x0, (%r15)
jne 0x287cb
leaq 0x241d8(%rip), %rbx # 0x4c920
movq %rbx, %rdi
xorl %esi, %esi
callq 0x136b0
movq %rbx, %rdi
callq 0x136a0
movl $0x40, %edi
xorl %esi, %esi
callq 0x133c0
testl %eax, %eax
je 0x287ba
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x13840
leaq 0x241d6(%rip), %r14 # 0x4c950
leaq 0xcae2(%rip), %r8 # 0x35263
movl $0x3f, %esi
movl $0x40, %ecx
movq %r14, %rdi
movl $0x1, %edx
movq %rax, %r9
xorl %eax, %eax
callq 0x132c0
leaq 0xd902(%rip), %rsi # 0x360a6
movq %r14, %rdi
callq 0x13100
testq %rax, %rax
je 0x287b4
movb $0x0, (%rax)
movb $0x1, (%r15)
jmp 0x287bf
movl $0x1, %ebx
leaq 0x2415a(%rip), %rdi # 0x4c920
callq 0x13330
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| ma_tls_start:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea r15, ma_tls_initialized
xor ebx, ebx
cmp byte ptr [r15], 0
jnz loc_287CB
lea rbx, LOCK_openssl_config
mov rdi, rbx
xor esi, esi
call _pthread_mutex_init
mov rdi, rbx
call _pthread_mutex_lock
mov edi, 40h ; '@'
xor esi, esi
call _OPENSSL_init_ssl
test eax, eax
jz short loc_287BA
xor ebx, ebx
xor edi, edi
call _OpenSSL_version
lea r14, tls_library_version
lea r8, aCouldnTSetOpti+23h; "%s"
mov esi, 3Fh ; '?'
mov ecx, 40h ; '@'
mov rdi, r14
mov edx, 1
mov r9, rax
xor eax, eax
call ___snprintf_chk
lea rsi, asc_360A6; " "
mov rdi, r14
call _strstr
test rax, rax
jz short loc_287B4
mov byte ptr [rax], 0
loc_287B4:
mov byte ptr [r15], 1
jmp short loc_287BF
loc_287BA:
mov ebx, 1
loc_287BF:
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
loc_287CB:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_tls_start()
{
unsigned int v0; // ebx
const char *v1; // rax
_BYTE *v2; // rax
v0 = 0;
if ( !ma_tls_initialized )
{
pthread_mutex_init(&LOCK_openssl_config, 0LL);
pthread_mutex_lock(&LOCK_openssl_config);
if ( (unsigned int)OPENSSL_init_ssl(64LL, 0LL) )
{
v0 = 0;
v1 = (const char *)OpenSSL_version(0LL);
__snprintf_chk(&tls_library_version, 63LL, 1LL, 64LL, "%s", v1);
v2 = (_BYTE *)strstr(&tls_library_version, " ");
if ( v2 )
*v2 = 0;
ma_tls_initialized = 1;
}
else
{
v0 = 1;
}
pthread_mutex_unlock(&LOCK_openssl_config);
}
return v0;
}
| ma_tls_start:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA R15,[0x14b040]
XOR EBX,EBX
CMP byte ptr [R15],0x0
JNZ 0x001287cb
LEA RBX,[0x14c920]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001136b0
MOV RDI,RBX
CALL 0x001136a0
MOV EDI,0x40
XOR ESI,ESI
CALL 0x001133c0
TEST EAX,EAX
JZ 0x001287ba
XOR EBX,EBX
XOR EDI,EDI
CALL 0x00113840
LEA R14,[0x14c950]
LEA R8,[0x135263]
MOV ESI,0x3f
MOV ECX,0x40
MOV RDI,R14
MOV EDX,0x1
MOV R9,RAX
XOR EAX,EAX
CALL 0x001132c0
LEA RSI,[0x1360a6]
MOV RDI,R14
CALL 0x00113100
TEST RAX,RAX
JZ 0x001287b4
MOV byte ptr [RAX],0x0
LAB_001287b4:
MOV byte ptr [R15],0x1
JMP 0x001287bf
LAB_001287ba:
MOV EBX,0x1
LAB_001287bf:
LEA RDI,[0x14c920]
CALL 0x00113330
LAB_001287cb:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 ma_tls_start(void)
{
int iVar1;
int8 uVar2;
char *pcVar3;
int8 uVar4;
uVar4 = 0;
if (ma_tls_initialized == '\0') {
pthread_mutex_init((pthread_mutex_t *)LOCK_openssl_config,(pthread_mutexattr_t *)0x0);
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
iVar1 = OPENSSL_init_ssl(0x40,0);
if (iVar1 == 0) {
uVar4 = 1;
}
else {
uVar4 = 0;
uVar2 = OpenSSL_version(0);
__snprintf_chk(tls_library_version,0x3f,1,0x40,"%s",uVar2);
pcVar3 = strstr(tls_library_version," ");
if (pcVar3 != (char *)0x0) {
*pcVar3 = '\0';
}
ma_tls_initialized = '\x01';
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
}
return uVar4;
}
| |
40,297 | my_xml_parse | eloqsql/strings/xml.c | int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
{
my_xml_attr_rewind(p);
p->beg=str;
p->cur=str;
p->end=str+len;
while ( p->cur < p->end )
{
MY_XML_ATTR a;
if (p->cur[0] == '<')
{
int lex;
int question=0;
int exclam=0;
lex=my_xml_scan(p,&a);
if (MY_XML_COMMENT == lex)
continue;
if (lex == MY_XML_CDATA)
{
a.beg+= 9;
a.end-= 3;
my_xml_value(p, a.beg, (size_t) (a.end-a.beg));
continue;
}
lex=my_xml_scan(p,&a);
if (MY_XML_SLASH == lex)
{
if (MY_XML_IDENT != (lex=my_xml_scan(p,&a)))
{
sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
goto gt;
}
if (MY_XML_EXCLAM == lex)
{
lex=my_xml_scan(p,&a);
exclam=1;
}
else if (MY_XML_QUESTION == lex)
{
lex=my_xml_scan(p,&a);
question=1;
}
if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_TAG;
if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or '/' wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) ||
((MY_XML_STRING == lex && exclam)))
{
MY_XML_ATTR b;
if (MY_XML_EQ == (lex=my_xml_scan(p,&b)))
{
lex=my_xml_scan(p,&b);
if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) )
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or string wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
}
else if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else if ((MY_XML_STRING == lex) && exclam)
{
/*
We are in <!DOCTYPE>, e.g.
<!DOCTYPE name SYSTEM "SystemLiteral">
<!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral">
Just skip "SystemLiteral" and "PublicidLiteral"
*/
}
else
break;
}
if (lex == MY_XML_SLASH)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
gt:
if (question)
{
if (lex != MY_XML_QUESTION)
{
sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
if (exclam)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
}
if (lex != MY_XML_GT)
{
sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
}
else
{
a.beg=p->cur;
for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++);
a.end=p->cur;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(&a);
if (a.beg != a.end)
{
my_xml_value(p,a.beg,(size_t) (a.end-a.beg));
}
}
}
if (p->attr.start[0])
{
sprintf(p->errstr,"unexpected END-OF-INPUT");
return MY_XML_ERROR;
}
return MY_XML_OK;
} | O3 | c | my_xml_parse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x118(%rdi), %rcx
movq %rcx, 0x120(%rdi)
movq %rsi, 0x128(%rdi)
movq %rsi, 0x130(%rdi)
leaq (%rsi,%rdx), %rax
movq %rax, 0x138(%rdi)
testq %rdx, %rdx
jle 0x59849
leaq -0x40(%rbp), %r15
cmpb $0x3c, (%rsi)
jne 0x5958b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59913
cmpl $0x43, %eax
je 0x5982b
cmpl $0x44, %eax
jne 0x595f0
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0x5982b
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x9, %rsi
subq %rsi, %rdx
addq $-0x3, %rdx
jmp 0x595e6
movq %rsi, -0x40(%rbp)
movq %rsi, %rdx
cmpq %rax, %rsi
jae 0x595b1
subq %rsi, %rax
movq %rsi, %rdx
cmpb $0x3c, (%rdx)
je 0x595b1
incq %rdx
movq %rdx, 0x130(%rbx)
decq %rax
jne 0x5959d
movq %rdx, -0x38(%rbp)
testb $0x2, (%rbx)
jne 0x595ca
movq %r15, %rdi
callq 0x59f4b
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
cmpq %rdx, %rsi
je 0x5982b
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0x5982b
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
jmp 0x5982b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59913
cmpl $0x2f, %eax
jne 0x59642
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59913
cmpl $0x49, %eax
jne 0x598a9
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0x59c11
testl %eax, %eax
jne 0x598fb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59913
movl %eax, %r13d
jmp 0x59825
movl %eax, %r14d
cmpl $0x21, %eax
sete %r12b
cmpl $0x3f, %eax
je 0x59657
cmpl $0x21, %r14d
jne 0x59664
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59913
jmp 0x5966a
movb $0x1, %r12b
movl %r14d, %eax
cmpl $0x49, %eax
jne 0x59895
movl $0x0, 0x4(%rbx)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0x59dd4
testl %eax, %eax
jne 0x598fb
movb %r12b, -0x29(%rbp)
movl %r14d, %r12d
xorl $0x21, %r12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59913
movl %eax, %r13d
xorl $0x53, %eax
orl %r12d, %eax
sete %al
cmpl $0x49, %r13d
je 0x596c5
testb %al, %al
je 0x597ae
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x59913
cmpl $0x49, %eax
je 0x59753
movl %eax, %r13d
cmpl $0x3d, %eax
jne 0x59792
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0x59913
cmpl $0x53, %eax
je 0x596fc
cmpl $0x49, %eax
jne 0x598bd
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %r15
subq %r13, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x59dd4
testl %eax, %eax
jne 0x598fb
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0x59748
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
testl %eax, %eax
jne 0x598fb
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
jmp 0x59784
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r13
subq %r15, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x59dd4
testl %eax, %eax
jne 0x598fb
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x59c11
testl %eax, %eax
je 0x5979e
jmp 0x598fb
cmpl $0x21, %r14d
jne 0x597aa
cmpl $0x53, %r13d
jne 0x597aa
movq %rbx, %rdi
leaq -0x40(%rbp), %r15
jmp 0x596a3
leaq -0x40(%rbp), %r15
cmpl $0x2f, %r13d
movb -0x29(%rbp), %r12b
jne 0x597da
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x59c11
testl %eax, %eax
jne 0x598fb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59913
movl %eax, %r13d
testb %r12b, %r12b
jne 0x5980b
cmpl $0x3f, %r13d
jne 0x598d1
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x59c11
testl %eax, %eax
jne 0x598fb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x59913
movl %eax, %r13d
cmpl $0x21, %r14d
jne 0x59825
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x59c11
testl %eax, %eax
jne 0x598fb
cmpl $0x3e, %r13d
jne 0x59880
movq 0x130(%rbx), %rsi
movq 0x138(%rbx), %rax
cmpq %rax, %rsi
jb 0x59544
movq 0x118(%rbx), %rcx
cmpb $0x0, (%rcx)
je 0x59878
addq $0x8, %rbx
leaq 0x6004(%rip), %rcx # 0x5f85d
movl $0x1, %r14d
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x241a0
jmp 0x59901
xorl %r14d, %r14d
jmp 0x59901
addq $0x8, %rbx
movl %r13d, %edi
callq 0x59b76
leaq 0x5faf(%rip), %rcx # 0x5f842
jmp 0x598e4
addq $0x8, %rbx
movl %eax, %edi
callq 0x59b76
leaq 0x5f35(%rip), %rcx # 0x5f7dc
jmp 0x598e4
addq $0x8, %rbx
movl %eax, %edi
callq 0x59b76
leaq 0x5f04(%rip), %rcx # 0x5f7bf
jmp 0x598e4
addq $0x8, %rbx
movl %eax, %edi
callq 0x59b76
leaq 0x5f31(%rip), %rcx # 0x5f800
jmp 0x598e4
addq $0x8, %rbx
movl %r13d, %edi
callq 0x59b76
leaq 0x5f43(%rip), %rcx # 0x5f827
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %r8
xorl %eax, %eax
callq 0x241a0
movl $0x1, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_xml_parse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov rcx, [rdi+118h]
mov [rdi+120h], rcx
mov [rdi+128h], rsi
mov [rdi+130h], rsi
lea rax, [rsi+rdx]
mov [rdi+138h], rax
test rdx, rdx
jle loc_59849
lea r15, [rbp+var_40]
loc_59544:
cmp byte ptr [rsi], 3Ch ; '<'
jnz short loc_5958B
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 43h ; 'C'
jz loc_5982B
cmp eax, 44h ; 'D'
jnz loc_595F0
mov rax, [rbx+150h]
test rax, rax
jz loc_5982B
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
add rsi, 9
sub rdx, rsi
add rdx, 0FFFFFFFFFFFFFFFDh
jmp short loc_595E6
loc_5958B:
mov [rbp+var_40], rsi
mov rdx, rsi
cmp rsi, rax
jnb short loc_595B1
sub rax, rsi
mov rdx, rsi
loc_5959D:
cmp byte ptr [rdx], 3Ch ; '<'
jz short loc_595B1
inc rdx
mov [rbx+130h], rdx
dec rax
jnz short loc_5959D
loc_595B1:
mov [rbp+var_38], rdx
test byte ptr [rbx], 2
jnz short loc_595CA
mov rdi, r15
call my_xml_norm_text
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
loc_595CA:
cmp rsi, rdx
jz loc_5982B
mov rax, [rbx+150h]
test rax, rax
jz loc_5982B
sub rdx, rsi
loc_595E6:
mov rdi, rbx
call rax
jmp loc_5982B
loc_595F0:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 2Fh ; '/'
jnz short loc_59642
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 49h ; 'I'
jnz loc_598A9
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_leave
test eax, eax
jnz loc_598FB
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
jmp loc_59825
loc_59642:
mov r14d, eax
cmp eax, 21h ; '!'
setz r12b
cmp eax, 3Fh ; '?'
jz short loc_59657
cmp r14d, 21h ; '!'
jnz short loc_59664
loc_59657:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
jmp short loc_5966A
loc_59664:
mov r12b, 1
mov eax, r14d
loc_5966A:
cmp eax, 49h ; 'I'
jnz loc_59895
mov dword ptr [rbx+4], 0
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_enter
test eax, eax
jnz loc_598FB
mov [rbp+var_29], r12b
mov r12d, r14d
xor r12d, 21h
mov rdi, rbx
loc_596A3:
mov rsi, r15
call my_xml_scan
mov r13d, eax
xor eax, 53h
or eax, r12d
setz al
cmp r13d, 49h ; 'I'
jz short loc_596C5
test al, al
jz loc_597AE
loc_596C5:
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 49h ; 'I'
jz short loc_59753
mov r13d, eax
cmp eax, 3Dh ; '='
jnz loc_59792
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 53h ; 'S'
jz short loc_596FC
cmp eax, 49h ; 'I'
jnz loc_598BD
loc_596FC:
mov dword ptr [rbx+4], 1
mov r13, [rbp+var_40]
mov r15, [rbp+var_38]
sub r15, r13
mov rdi, rbx
mov rsi, r13
mov rdx, r15
call my_xml_enter
test eax, eax
jnz loc_598FB
mov rax, [rbx+150h]
test rax, rax
jz short loc_59748
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
sub rdx, rsi
mov rdi, rbx
call rax
test eax, eax
jnz loc_598FB
loc_59748:
mov rdi, rbx
mov rsi, r13
mov rdx, r15
jmp short loc_59784
loc_59753:
mov dword ptr [rbx+4], 1
mov r15, [rbp+var_40]
mov r13, [rbp+var_38]
sub r13, r15
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call my_xml_enter
test eax, eax
jnz loc_598FB
mov rdi, rbx
mov rsi, r15
mov rdx, r13
loc_59784:
call my_xml_leave
test eax, eax
jz short loc_5979E
jmp loc_598FB
loc_59792:
cmp r14d, 21h ; '!'
jnz short loc_597AA
cmp r13d, 53h ; 'S'
jnz short loc_597AA
loc_5979E:
mov rdi, rbx
lea r15, [rbp+var_40]
jmp loc_596A3
loc_597AA:
lea r15, [rbp+var_40]
loc_597AE:
cmp r13d, 2Fh ; '/'
mov r12b, [rbp+var_29]
jnz short loc_597DA
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_598FB
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_597DA:
test r12b, r12b
jnz short loc_5980B
cmp r13d, 3Fh ; '?'
jnz loc_598D1
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_598FB
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_5980B:
cmp r14d, 21h ; '!'
jnz short loc_59825
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_598FB
loc_59825:
cmp r13d, 3Eh ; '>'
jnz short loc_59880
loc_5982B:
mov rsi, [rbx+130h]
mov rax, [rbx+138h]
cmp rsi, rax
jb loc_59544
mov rcx, [rbx+118h]
loc_59849:
cmp byte ptr [rcx], 0
jz short loc_59878
add rbx, 8
lea rcx, aUnexpectedEndO; "unexpected END-OF-INPUT"
mov r14d, 1
mov edx, 80h
mov rdi, rbx
mov esi, 1
xor eax, eax
call ___sprintf_chk
jmp loc_59901
loc_59878:
xor r14d, r14d
jmp loc_59901
loc_59880:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan; "%s unexpected ('>' wanted)"
jmp short loc_598E4
loc_59895:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde; "%s unexpected (ident or '/' wanted)"
jmp short loc_598E4
loc_598A9:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_0; "%s unexpected (ident wanted)"
jmp short loc_598E4
loc_598BD:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_1; "%s unexpected (ident or string wanted)"
jmp short loc_598E4
loc_598D1:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan_0; "%s unexpected ('?' wanted)"
loc_598E4:
mov edx, 80h
mov rdi, rbx
mov esi, 1
mov r8, rax
xor eax, eax
call ___sprintf_chk
loc_598FB:
mov r14d, 1
loc_59901:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_xml_parse(long long a1, _BYTE *a2, long long a3)
{
_BYTE *v4; // rcx
_BYTE *v5; // rax
int v6; // eax
void ( *v7)(long long, _BYTE *, long long); // rax
long long v8; // rdx
_BYTE *v9; // rdx
long long v10; // rax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // r13d
unsigned int v14; // r14d
bool v15; // r12
long long i; // rdi
unsigned int v17; // eax
unsigned int v18; // eax
_BYTE *v19; // r13
long long v20; // r15
unsigned int ( *v21)(long long, _QWORD, _QWORD); // rax
long long v22; // rdi
_BYTE *v23; // rsi
long long v24; // rdx
_BYTE *v25; // r15
long long v26; // r13
bool v27; // r12
unsigned int v28; // r14d
long long v29; // rax
long long v30; // rax
long long v31; // rax
long long v32; // rax
long long v33; // rax
_QWORD v35[2]; // [rsp+0h] [rbp-50h] BYREF
_BYTE *v36; // [rsp+10h] [rbp-40h] BYREF
_BYTE *v37; // [rsp+18h] [rbp-38h]
bool v38; // [rsp+27h] [rbp-29h]
v4 = *(_BYTE **)(a1 + 280);
*(_QWORD *)(a1 + 288) = v4;
*(_QWORD *)(a1 + 296) = a2;
*(_QWORD *)(a1 + 304) = a2;
v5 = &a2[a3];
*(_QWORD *)(a1 + 312) = &a2[a3];
if ( a3 <= 0 )
goto LABEL_57;
while ( *a2 != 60 )
{
v36 = a2;
v9 = a2;
if ( a2 < v5 )
{
v10 = v5 - a2;
v9 = a2;
do
{
if ( *v9 == 60 )
break;
*(_QWORD *)(a1 + 304) = ++v9;
--v10;
}
while ( v10 );
}
v37 = v9;
if ( (*(_BYTE *)a1 & 2) == 0 )
{
my_xml_norm_text(&v36);
a2 = v36;
v9 = v37;
}
if ( a2 != v9 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( v7 )
{
v8 = v9 - a2;
LABEL_16:
v7(a1, a2, v8);
}
}
LABEL_55:
a2 = *(_BYTE **)(a1 + 304);
v5 = *(_BYTE **)(a1 + 312);
if ( a2 >= v5 )
{
v4 = *(_BYTE **)(a1 + 280);
LABEL_57:
if ( *v4 )
{
v28 = 1;
__sprintf_chk(a1 + 8, 1LL, 128LL, "unexpected END-OF-INPUT");
}
else
{
return 0;
}
return v28;
}
}
v6 = my_xml_scan(a1, &v36);
if ( v6 == 67 )
goto LABEL_55;
if ( v6 == 68 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( !v7 )
goto LABEL_55;
a2 = v36 + 9;
v8 = v37 - (v36 + 9) - 3;
goto LABEL_16;
}
v11 = my_xml_scan(a1, &v36);
if ( v11 == 47 )
{
v12 = my_xml_scan(a1, &v36);
if ( v12 == 73 )
{
if ( !(unsigned int)my_xml_leave(a1, v36, v37 - v36) )
{
v13 = my_xml_scan(a1, &v36);
goto LABEL_54;
}
}
else
{
v31 = lex2str(v12);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident wanted)", v31);
}
return 1;
}
v14 = v11;
v15 = v11 == 33;
if ( v11 == 63 || v11 == 33 )
v11 = my_xml_scan(a1, &v36);
else
v15 = 1;
if ( v11 != 73 )
{
v30 = lex2str(v11);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or '/' wanted)", v30);
return 1;
}
*(_DWORD *)(a1 + 4) = 0;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v38 = v15;
for ( i = a1; ; i = a1 )
{
v13 = my_xml_scan(i, &v36);
if ( v13 != 73 )
{
if ( v14 ^ 0x21 | v13 ^ 0x53 )
break;
}
v17 = my_xml_scan(a1, v35);
if ( v17 == 73 )
{
*(_DWORD *)(a1 + 4) = 1;
v25 = v36;
v26 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v22 = a1;
v23 = v25;
v24 = v26;
LABEL_40:
if ( (unsigned int)my_xml_leave(v22, v23, v24) )
return 1;
continue;
}
v13 = v17;
if ( v17 == 61 )
{
v18 = my_xml_scan(a1, v35);
if ( v18 != 83 && v18 != 73 )
{
v32 = lex2str(v18);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or string wanted)", v32);
return 1;
}
*(_DWORD *)(a1 + 4) = 1;
v19 = v36;
v20 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v21 = *(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 336);
if ( v21 )
{
if ( v21(a1, v35[0], v35[1] - v35[0]) )
return 1;
}
v22 = a1;
v23 = v19;
v24 = v20;
goto LABEL_40;
}
if ( v14 != 33 || v17 != 83 )
break;
}
v27 = v38;
if ( v13 == 47 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
}
if ( v27 )
goto LABEL_52;
if ( v13 == 63 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
LABEL_52:
if ( v14 != 33 || !(unsigned int)my_xml_leave(a1, 0LL, 0LL) )
{
LABEL_54:
if ( v13 == 62 )
goto LABEL_55;
v29 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('>' wanted)", v29);
}
}
else
{
v33 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('?' wanted)", v33);
}
return 1;
}
| my_xml_parse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RCX,qword ptr [RDI + 0x118]
MOV qword ptr [RDI + 0x120],RCX
MOV qword ptr [RDI + 0x128],RSI
MOV qword ptr [RDI + 0x130],RSI
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RDI + 0x138],RAX
TEST RDX,RDX
JLE 0x00159849
LEA R15,[RBP + -0x40]
LAB_00159544:
CMP byte ptr [RSI],0x3c
JNZ 0x0015958b
MOV RDI,RBX
MOV RSI,R15
CALL 0x00159913
CMP EAX,0x43
JZ 0x0015982b
CMP EAX,0x44
JNZ 0x001595f0
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x0015982b
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
ADD RSI,0x9
SUB RDX,RSI
ADD RDX,-0x3
JMP 0x001595e6
LAB_0015958b:
MOV qword ptr [RBP + -0x40],RSI
MOV RDX,RSI
CMP RSI,RAX
JNC 0x001595b1
SUB RAX,RSI
MOV RDX,RSI
LAB_0015959d:
CMP byte ptr [RDX],0x3c
JZ 0x001595b1
INC RDX
MOV qword ptr [RBX + 0x130],RDX
DEC RAX
JNZ 0x0015959d
LAB_001595b1:
MOV qword ptr [RBP + -0x38],RDX
TEST byte ptr [RBX],0x2
JNZ 0x001595ca
MOV RDI,R15
CALL 0x00159f4b
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
LAB_001595ca:
CMP RSI,RDX
JZ 0x0015982b
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x0015982b
SUB RDX,RSI
LAB_001595e6:
MOV RDI,RBX
CALL RAX
JMP 0x0015982b
LAB_001595f0:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00159913
CMP EAX,0x2f
JNZ 0x00159642
MOV RDI,RBX
MOV RSI,R15
CALL 0x00159913
CMP EAX,0x49
JNZ 0x001598a9
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x00159c11
TEST EAX,EAX
JNZ 0x001598fb
MOV RDI,RBX
MOV RSI,R15
CALL 0x00159913
MOV R13D,EAX
JMP 0x00159825
LAB_00159642:
MOV R14D,EAX
CMP EAX,0x21
SETZ R12B
CMP EAX,0x3f
JZ 0x00159657
CMP R14D,0x21
JNZ 0x00159664
LAB_00159657:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00159913
JMP 0x0015966a
LAB_00159664:
MOV R12B,0x1
MOV EAX,R14D
LAB_0015966a:
CMP EAX,0x49
JNZ 0x00159895
MOV dword ptr [RBX + 0x4],0x0
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x00159dd4
TEST EAX,EAX
JNZ 0x001598fb
MOV byte ptr [RBP + -0x29],R12B
MOV R12D,R14D
XOR R12D,0x21
MOV RDI,RBX
LAB_001596a3:
MOV RSI,R15
CALL 0x00159913
MOV R13D,EAX
XOR EAX,0x53
OR EAX,R12D
SETZ AL
CMP R13D,0x49
JZ 0x001596c5
TEST AL,AL
JZ 0x001597ae
LAB_001596c5:
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x00159913
CMP EAX,0x49
JZ 0x00159753
MOV R13D,EAX
CMP EAX,0x3d
JNZ 0x00159792
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x00159913
CMP EAX,0x53
JZ 0x001596fc
CMP EAX,0x49
JNZ 0x001598bd
LAB_001596fc:
MOV dword ptr [RBX + 0x4],0x1
MOV R13,qword ptr [RBP + -0x40]
MOV R15,qword ptr [RBP + -0x38]
SUB R15,R13
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
CALL 0x00159dd4
TEST EAX,EAX
JNZ 0x001598fb
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x00159748
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
SUB RDX,RSI
MOV RDI,RBX
CALL RAX
TEST EAX,EAX
JNZ 0x001598fb
LAB_00159748:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
JMP 0x00159784
LAB_00159753:
MOV dword ptr [RBX + 0x4],0x1
MOV R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x38]
SUB R13,R15
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x00159dd4
TEST EAX,EAX
JNZ 0x001598fb
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
LAB_00159784:
CALL 0x00159c11
TEST EAX,EAX
JZ 0x0015979e
JMP 0x001598fb
LAB_00159792:
CMP R14D,0x21
JNZ 0x001597aa
CMP R13D,0x53
JNZ 0x001597aa
LAB_0015979e:
MOV RDI,RBX
LEA R15,[RBP + -0x40]
JMP 0x001596a3
LAB_001597aa:
LEA R15,[RBP + -0x40]
LAB_001597ae:
CMP R13D,0x2f
MOV R12B,byte ptr [RBP + -0x29]
JNZ 0x001597da
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00159c11
TEST EAX,EAX
JNZ 0x001598fb
MOV RDI,RBX
MOV RSI,R15
CALL 0x00159913
MOV R13D,EAX
LAB_001597da:
TEST R12B,R12B
JNZ 0x0015980b
CMP R13D,0x3f
JNZ 0x001598d1
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00159c11
TEST EAX,EAX
JNZ 0x001598fb
MOV RDI,RBX
MOV RSI,R15
CALL 0x00159913
MOV R13D,EAX
LAB_0015980b:
CMP R14D,0x21
JNZ 0x00159825
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00159c11
TEST EAX,EAX
JNZ 0x001598fb
LAB_00159825:
CMP R13D,0x3e
JNZ 0x00159880
LAB_0015982b:
MOV RSI,qword ptr [RBX + 0x130]
MOV RAX,qword ptr [RBX + 0x138]
CMP RSI,RAX
JC 0x00159544
MOV RCX,qword ptr [RBX + 0x118]
LAB_00159849:
CMP byte ptr [RCX],0x0
JZ 0x00159878
ADD RBX,0x8
LEA RCX,[0x15f85d]
MOV R14D,0x1
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001241a0
JMP 0x00159901
LAB_00159878:
XOR R14D,R14D
JMP 0x00159901
LAB_00159880:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x00159b76
LEA RCX,[0x15f842]
JMP 0x001598e4
LAB_00159895:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x00159b76
LEA RCX,[0x15f7dc]
JMP 0x001598e4
LAB_001598a9:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x00159b76
LEA RCX,[0x15f7bf]
JMP 0x001598e4
LAB_001598bd:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x00159b76
LEA RCX,[0x15f800]
JMP 0x001598e4
LAB_001598d1:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x00159b76
LEA RCX,[0x15f827]
LAB_001598e4:
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
MOV R8,RAX
XOR EAX,EAX
CALL 0x001241a0
LAB_001598fb:
MOV R14D,0x1
LAB_00159901:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Type propagation algorithm not settling */
bool my_xml_parse(byte *param_1,char *param_2,long param_3)
{
char cVar1;
int iVar2;
int iVar3;
code *pcVar4;
int8 uVar5;
char *pcVar6;
char *pcVar7;
long lVar8;
bool bVar9;
long local_58;
long local_50;
char *local_48;
char *local_40;
char local_31;
pcVar7 = *(char **)(param_1 + 0x118);
*(char **)(param_1 + 0x120) = pcVar7;
*(char **)(param_1 + 0x128) = param_2;
*(char **)(param_1 + 0x130) = param_2;
pcVar6 = param_2 + param_3;
*(char **)(param_1 + 0x138) = pcVar6;
if (0 < param_3) {
do {
if (*param_2 == '<') {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x43) {
if (iVar2 == 0x44) {
pcVar4 = *(code **)(param_1 + 0x150);
if (pcVar4 != (code *)0x0) {
pcVar7 = local_40 + (-3 - (long)(local_48 + 9));
pcVar6 = local_48 + 9;
goto LAB_001595e6;
}
}
else {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x2f) {
bVar9 = iVar2 == 0x21;
if ((iVar2 == 0x3f) || (iVar2 == 0x21)) {
iVar3 = my_xml_scan(param_1,&local_48);
}
else {
bVar9 = true;
iVar3 = iVar2;
}
if (iVar3 == 0x49) {
param_1[4] = 0;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
iVar3 = my_xml_enter(param_1,local_48,(long)local_40 - (long)local_48);
local_31 = bVar9;
do {
if (iVar3 != 0) {
return true;
}
LAB_001596a3:
iVar3 = my_xml_scan(param_1,&local_48);
if ((iVar3 != 0x49) && (iVar3 != 0x53 || iVar2 != 0x21)) goto LAB_001597ae;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if (iVar3 == 0x49) {
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
goto joined_r0x00159775;
}
if (iVar3 != 0x3d) goto LAB_00159792;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if ((iVar3 != 0x53) && (iVar3 != 0x49)) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or string wanted)";
goto LAB_001598e4;
}
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
if (iVar3 != 0) {
return true;
}
if (*(code **)(param_1 + 0x150) != (code *)0x0) {
iVar3 = (**(code **)(param_1 + 0x150))(param_1,local_58,local_50 - local_58);
joined_r0x00159775:
if (iVar3 != 0) {
return true;
}
}
iVar3 = my_xml_leave(param_1,pcVar6,lVar8);
} while( true );
}
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or \'/\' wanted)";
LAB_001598e4:
__sprintf_chk(param_1 + 8,1,0x80,pcVar6,uVar5);
return true;
}
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x49) {
uVar5 = lex2str(iVar2);
pcVar6 = "%s unexpected (ident wanted)";
goto LAB_001598e4;
}
iVar2 = my_xml_leave(param_1,local_48,(long)local_40 - (long)local_48);
if (iVar2 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
LAB_00159825:
if (iVar3 != 0x3e) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'>\' wanted)";
goto LAB_001598e4;
}
}
}
}
else {
local_40 = param_2;
if (param_2 < pcVar6) {
lVar8 = (long)pcVar6 - (long)param_2;
do {
if (*local_40 == '<') break;
local_40 = local_40 + 1;
*(char **)(param_1 + 0x130) = local_40;
lVar8 = lVar8 + -1;
} while (lVar8 != 0);
}
local_48 = param_2;
if ((*param_1 & 2) == 0) {
my_xml_norm_text(&local_48);
}
if ((local_48 != local_40) && (pcVar4 = *(code **)(param_1 + 0x150), pcVar4 != (code *)0x0))
{
pcVar7 = local_40 + -(long)local_48;
pcVar6 = local_48;
LAB_001595e6:
(*pcVar4)(param_1,pcVar6,pcVar7);
}
}
param_2 = *(char **)(param_1 + 0x130);
pcVar6 = *(char **)(param_1 + 0x138);
} while (param_2 < pcVar6);
pcVar7 = *(char **)(param_1 + 0x118);
}
cVar1 = *pcVar7;
if (cVar1 != '\0') {
__sprintf_chk(param_1 + 8,1,0x80,"unexpected END-OF-INPUT");
}
return cVar1 != '\0';
LAB_00159792:
if ((iVar2 != 0x21) || (iVar3 != 0x53)) {
LAB_001597ae:
cVar1 = local_31;
if (iVar3 == 0x2f) {
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if (cVar1 == '\0') {
if (iVar3 != 0x3f) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'?\' wanted)";
goto LAB_001598e4;
}
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if ((iVar2 == 0x21) && (iVar2 = my_xml_leave(param_1,0,0), iVar2 != 0)) {
return true;
}
goto LAB_00159825;
}
goto LAB_001596a3;
}
| |
40,298 | get_bool_argument | eloqsql/mysys/my_getopt.c | static my_bool get_bool_argument(const struct my_option *opts,
const char *argument)
{
DBUG_ENTER("get_bool_argument");
if (!my_strcasecmp(&my_charset_latin1, argument, "true") ||
!my_strcasecmp(&my_charset_latin1, argument, "on") ||
!my_strcasecmp(&my_charset_latin1, argument, "1"))
DBUG_RETURN(1);
else if (!my_strcasecmp(&my_charset_latin1, argument, "false") ||
!my_strcasecmp(&my_charset_latin1, argument, "off") ||
!my_strcasecmp(&my_charset_latin1, argument, "0"))
DBUG_RETURN(0);
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': boolean value '%s' wasn't recognized. Set to OFF.",
opts->name, argument);
DBUG_RETURN(0);
} | O0 | c | get_bool_argument:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x255889(%rip), %rax # 0x280050
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x255873(%rip), %rdi # 0x280050
leaq 0x57fff(%rip), %rdx # 0x827e3
callq *%rax
cmpl $0x0, %eax
je 0x2a841
leaq 0x25585e(%rip), %rax # 0x280050
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x255848(%rip), %rdi # 0x280050
leaq 0x5b362(%rip), %rdx # 0x85b71
callq *%rax
cmpl $0x0, %eax
je 0x2a841
leaq 0x255833(%rip), %rax # 0x280050
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x25581d(%rip), %rdi # 0x280050
leaq 0x58bae(%rip), %rdx # 0x833e8
callq *%rax
cmpl $0x0, %eax
jne 0x2a84c
jmp 0x2a843
movb $0x1, -0x1(%rbp)
jmp 0x2a901
leaq 0x2557fd(%rip), %rax # 0x280050
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x2557e7(%rip), %rdi # 0x280050
leaq 0x57d40(%rip), %rdx # 0x825b0
callq *%rax
cmpl $0x0, %eax
je 0x2a8cd
leaq 0x2557d2(%rip), %rax # 0x280050
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x2557bc(%rip), %rdi # 0x280050
leaq 0x57f4d(%rip), %rdx # 0x827e8
callq *%rax
cmpl $0x0, %eax
je 0x2a8cd
leaq 0x2557a7(%rip), %rax # 0x280050
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x255791(%rip), %rdi # 0x280050
leaq 0x59b54(%rip), %rdx # 0x8441a
callq *%rax
cmpl $0x0, %eax
jne 0x2a8d5
jmp 0x2a8cf
movb $0x0, -0x1(%rbp)
jmp 0x2a901
jmp 0x2a8d7
leaq 0x1aef52(%rip), %rax # 0x1d9830
movq (%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %edi
leaq 0x5830e(%rip), %rsi # 0x82c06
movb $0x0, %al
callq *%r8
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| get_bool_argument:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aTrue; "true"
call rax
cmp eax, 0
jz short loc_2A841
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aExpansion+7; "on"
call rax
cmp eax, 0
jz short loc_2A841
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aIso88591_2+9; "1"
call rax
cmp eax, 0
jnz short loc_2A84C
loc_2A841:
jmp short $+2
loc_2A843:
mov [rbp+var_1], 1
jmp loc_2A901
loc_2A84C:
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aSomethingTrueO+12h; "false"
call rax
cmp eax, 0
jz short loc_2A8CD
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aOff; "off"
call rax
cmp eax, 0
jz short loc_2A8CD
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, unk_8441A
call rax
cmp eax, 0
jnz short loc_2A8D5
loc_2A8CD:
jmp short $+2
loc_2A8CF:
mov [rbp+var_1], 0
jmp short loc_2A901
loc_2A8D5:
jmp short $+2
loc_2A8D7:
lea rax, my_getopt_error_reporter
mov r8, [rax]
mov rax, [rbp+var_10]
mov rdx, [rax]
mov rcx, [rbp+var_18]
mov edi, 1
lea rsi, aOptionSBoolean; "option '%s': boolean value '%s' wasn't "...
mov al, 0
call r8
mov [rbp+var_1], 0
loc_2A901:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char get_bool_argument(const char **a1, const char *a2)
{
if ( !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"true")
|| !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"on")
|| !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"1") )
{
return 1;
}
if ( !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"false")
|| !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"off")
|| !(*(unsigned int ( **)(void *, const char *, void *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
&unk_8441A) )
{
return 0;
}
my_getopt_error_reporter(1, (long long)"option '%s': boolean value '%s' wasn't recognized. Set to OFF.", *a1, a2);
return 0;
}
| get_bool_argument:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
LEA RAX,[0x380050]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x380050]
LEA RDX,[0x1827e3]
CALL RAX
CMP EAX,0x0
JZ 0x0012a841
LEA RAX,[0x380050]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x380050]
LEA RDX,[0x185b71]
CALL RAX
CMP EAX,0x0
JZ 0x0012a841
LEA RAX,[0x380050]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x380050]
LEA RDX,[0x1833e8]
CALL RAX
CMP EAX,0x0
JNZ 0x0012a84c
LAB_0012a841:
JMP 0x0012a843
LAB_0012a843:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012a901
LAB_0012a84c:
LEA RAX,[0x380050]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x380050]
LEA RDX,[0x1825b0]
CALL RAX
CMP EAX,0x0
JZ 0x0012a8cd
LEA RAX,[0x380050]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x380050]
LEA RDX,[0x1827e8]
CALL RAX
CMP EAX,0x0
JZ 0x0012a8cd
LEA RAX,[0x380050]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x380050]
LEA RDX,[0x18441a]
CALL RAX
CMP EAX,0x0
JNZ 0x0012a8d5
LAB_0012a8cd:
JMP 0x0012a8cf
LAB_0012a8cf:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012a901
LAB_0012a8d5:
JMP 0x0012a8d7
LAB_0012a8d7:
LEA RAX,[0x2d9830]
MOV R8,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV EDI,0x1
LEA RSI,[0x182c06]
MOV AL,0x0
CALL R8
MOV byte ptr [RBP + -0x1],0x0
LAB_0012a901:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 get_bool_argument(int8 *param_1,int8 param_2)
{
int iVar1;
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00380110 + 0x40))
(&my_charset_latin1,param_2,&DAT_001827e3);
if (((iVar1 == 0) ||
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00380110 + 0x40))
(&my_charset_latin1,param_2,"on"), iVar1 == 0)) ||
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00380110 + 0x40))
(&my_charset_latin1,param_2,&DAT_001833e8), iVar1 == 0)) {
return 1;
}
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00380110 + 0x40))
(&my_charset_latin1,param_2,"false");
if (((iVar1 != 0) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00380110 + 0x40))
(&my_charset_latin1,param_2,&DAT_001827e8), iVar1 != 0)) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00380110 + 0x40))
(&my_charset_latin1,param_2,&DAT_0018441a), iVar1 != 0)) {
(*(code *)my_getopt_error_reporter)
(1,"option \'%s\': boolean value \'%s\' wasn\'t recognized. Set to OFF.",*param_1,
param_2);
return 0;
}
return 0;
}
| |
40,299 | google::protobuf::DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() {
// @@protoc_insertion_point(destructor:google.protobuf.DescriptorProto.ReservedRange)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
} | O3 | cpp | google::protobuf::DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
testb $0x1, 0x8(%rdi)
je 0xec03b
movq %rbx, %rdi
callq 0x734ec
leaq 0x11e4de(%rip), %rax # 0x20a520
addq $0x10, %rax
movq %rax, (%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x73456
movq %rax, %rdi
callq 0x33bfc
| _ZN6google8protobuf29DescriptorProto_ReservedRangeD2Ev:
push r14
push rbx
push rax
mov r14, rdi
lea rbx, [rdi+8]
test byte ptr [rdi+8], 1
jz short loc_EC03B
mov rdi, rbx
call _ZN6google8protobuf8internal16InternalMetadata21DeleteOutOfLineHelperINS0_15UnknownFieldSetEEEPNS0_5ArenaEv; google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>(void)
loc_EC03B:
lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite
add rax, 10h
mov [r14], rax
mov rdi, rbx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata()
mov rdi, rax
call __clang_call_terminate
| void google::protobuf::DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange(
google::protobuf::DescriptorProto_ReservedRange *this)
{
if ( (*((_BYTE *)this + 8) & 1) != 0 )
google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>((long long *)this + 1);
*(_QWORD *)this = &`vtable for'google::protobuf::MessageLite + 2;
google::protobuf::internal::InternalMetadata::~InternalMetadata((google::protobuf::DescriptorProto_ReservedRange *)((char *)this + 8));
}
| ~DescriptorProto_ReservedRange:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
LEA RBX,[RDI + 0x8]
TEST byte ptr [RDI + 0x8],0x1
JZ 0x001ec03b
LAB_001ec033:
MOV RDI,RBX
CALL 0x001734ec
LAB_001ec03b:
LEA RAX,[0x30a520]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00173456
|
/* google::protobuf::DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange() */
void __thiscall
google::protobuf::DescriptorProto_ReservedRange::~DescriptorProto_ReservedRange
(DescriptorProto_ReservedRange *this)
{
if (((byte)this[8] & 1) != 0) {
/* try { // try from 001ec033 to 001ec03a has its CatchHandler @ 001ec058 */
internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
}
*(int ***)this = &PTR__MessageLite_0030a530;
internal::InternalMetadata::~InternalMetadata((InternalMetadata *)(this + 8));
return;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.