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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
18,700
|
my_interval_timer
|
eloqsql/mysys/my_getsystime.c
|
ulonglong my_interval_timer()
{
#ifdef HAVE_CLOCK_GETTIME
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
return tp.tv_sec*1000000000ULL+tp.tv_nsec;
#elif defined(HAVE_GETHRTIME)
return gethrtime();
#elif defined(_WIN32)
DBUG_ASSERT(query_performance_frequency);
LARGE_INTEGER t_cnt;
QueryPerformanceCounter(&t_cnt);
return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) +
((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL /
query_performance_frequency);
#else
/* TODO: check for other possibilities for hi-res timestamping */
struct timeval tv;
gettimeofday(&tv,NULL);
return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL;
#endif
}
|
O3
|
c
|
my_interval_timer:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq -0x18(%rbp), %rbx
movl $0x1, %edi
movq %rbx, %rsi
callq 0x262e0
imulq $0x3b9aca00, (%rbx), %rax # imm = 0x3B9ACA00
addq 0x8(%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
|
my_interval_timer:
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
lea rbx, [rbp+var_18]
mov edi, 1
mov rsi, rbx
call _clock_gettime
imul rax, [rbx], 3B9ACA00h
add rax, [rbx+8]
add rsp, 18h
pop rbx
pop rbp
retn
|
long long my_interval_timer()
{
_QWORD v1[3]; // [rsp+8h] [rbp-18h] BYREF
clock_gettime(1LL, v1);
return v1[1] + 1000000000LL * v1[0];
}
|
my_interval_timer:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
LEA RBX,[RBP + -0x18]
MOV EDI,0x1
MOV RSI,RBX
CALL 0x001262e0
IMUL RAX,qword ptr [RBX],0x3b9aca00
ADD RAX,qword ptr [RBX + 0x8]
ADD RSP,0x18
POP RBX
POP RBP
RET
|
long my_interval_timer(void)
{
timespec local_20;
clock_gettime(1,&local_20);
return local_20.tv_sec * 1000000000 + local_20.tv_nsec;
}
|
|
18,701
|
dirname_part
|
eloqsql/mysys/mf_dirname.c
|
size_t dirname_part(char *to, const char *name, size_t *to_res_length)
{
size_t length;
DBUG_ENTER("dirname_part");
DBUG_PRINT("enter",("'%s'",name));
length=dirname_length(name);
*to_res_length= (size_t) (convert_dirname(to, name, name+length) - to);
DBUG_RETURN(length);
}
|
O0
|
c
|
dirname_part:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x581e6
movq -0x10(%rbp), %rdi
callq 0x58150
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x20(%rbp), %rdx
callq 0x58230
movq %rax, %rcx
movq -0x8(%rbp), %rax
subq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
dirname_part:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_581E6:
mov rdi, [rbp+var_10]
call dirname_length
mov [rbp+var_20], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_20]
call convert_dirname
mov rcx, rax
mov rax, [rbp+var_8]
sub rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
|
long long dirname_part(long long a1, _BYTE *a2, _QWORD *a3)
{
long long v4; // [rsp+10h] [rbp-20h]
v4 = dirname_length(a2);
*a3 = convert_dirname(a1, a2, &a2[v4]) - a1;
return v4;
}
|
dirname_part:
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
JMP 0x001581e6
LAB_001581e6:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00158150
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x20]
CALL 0x00158230
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
long dirname_part(long param_1,long param_2,long *param_3)
{
long lVar1;
long lVar2;
lVar1 = dirname_length(param_2);
lVar2 = convert_dirname(param_1,param_2,param_2 + lVar1);
*param_3 = lVar2 - param_1;
return lVar1;
}
|
|
18,702
|
eth_verify_account_proof_exec
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
|
INTERNAL bool eth_verify_account_proof_exec(verify_ctx_t* ctx, ssz_ob_t* proof, bytes32_t state_root, eth_account_field_t field, bytes_t values) {
ssz_ob_t account_proof = ssz_get(proof, "accountProof");
ssz_ob_t address = ssz_get(proof, "address");
bytes32_t address_hash = {0};
bytes_t rlp_account = {0};
bytes_t field_value = {0};
bytes32_t storage_hash = {0};
keccak(address.bytes, address_hash);
switch (field) {
case ETH_ACCOUNT_CODE_HASH:
memcpy(values.data, EMPTY_HASH, 32);
break;
case ETH_ACCOUNT_STORAGE_HASH:
memcpy(values.data, EMPTY_ROOT_HASH, 32);
break;
default:
memset(values.data, 0, 32);
break;
}
patricia_result_t result = patricia_verify(state_root, bytes(address_hash, 32), account_proof, &rlp_account);
if (result == PATRICIA_INVALID) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
if (result == PATRICIA_FOUND) { // 2 means not existing account
if (!rlp_account.data) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
if (rlp_decode(&rlp_account, 0, &rlp_account) != RLP_LIST) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
if (rlp_decode(&rlp_account, 2, &field_value) != RLP_ITEM) RETURN_VERIFY_ERROR(ctx, "invalid account proof for storage hash!");
// get the storage hash from the proof
if (field_value.len > 32) RETURN_VERIFY_ERROR(ctx, "invalid account proof for storage hash!");
memcpy(storage_hash, field_value.data, field_value.len);
// get the field value from the proof
if (field) {
if (rlp_decode(&rlp_account, field - 1, &field_value) != RLP_ITEM) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
if (field_value.len > 32) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
memcpy(values.data + 32 - field_value.len, field_value.data, field_value.len);
}
}
if (!verify_storage(ctx, ssz_get(proof, "storageProof"), storage_hash, field == ETH_ACCOUNT_STORAGE_HASH ? values : NULL_BYTES)) RETURN_VERIFY_ERROR(ctx, "invalid storage proof!");
return true;
}
|
O0
|
c
|
eth_verify_account_proof_exec:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
movl %r8d, -0x18(%rbp)
movq %r9, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movq -0x28(%rbp), %rsi
leaq 0xa9ce0(%rip), %rdx # 0xdcbcd
leaq -0x50(%rbp), %rdi
callq 0xa1c10
movq -0x28(%rbp), %rsi
leaq 0xaa952(%rip), %rdx # 0xdd853
leaq -0x68(%rbp), %rdi
callq 0xa1c10
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0xa4990
movl -0x34(%rbp), %eax
movl %eax, -0x114(%rbp)
subl $0x3, %eax
je 0x32f8f
jmp 0x32f57
movl -0x114(%rbp), %eax
subl $0x4, %eax
jne 0x32fba
jmp 0x32f64
movq -0x10(%rbp), %rax
movq 0x106501(%rip), %rcx # 0x139470
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)
jmp 0x32fca
movq -0x10(%rbp), %rax
movq 0x1064de(%rip), %rcx # 0x139478
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)
jmp 0x32fca
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x231c0
movq -0x30(%rbp), %rdi
movl $0x20, -0xe8(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl -0xe8(%rbp), %esi
movq -0xe0(%rbp), %rdx
leaq -0x50(%rbp), %rax
leaq -0xa0(%rbp), %rcx
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x35950
movl %eax, -0xd4(%rbp)
cmpl $0x0, -0xd4(%rbp)
jne 0x33052
jmp 0x3302d
movq -0x20(%rbp), %rdi
addq $0x70, %rdi
leaq 0xaad36(%rip), %rsi # 0xddd72
callq 0xa79c0
movq -0x20(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x332d8
cmpl $0x1, -0xd4(%rbp)
jne 0x33209
cmpq $0x0, -0x98(%rbp)
jne 0x33090
jmp 0x3306b
movq -0x20(%rbp), %rdi
addq $0x70, %rdi
leaq 0xaacf8(%rip), %rsi # 0xddd72
callq 0xa79c0
movq -0x20(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x332d8
leaq -0xa0(%rbp), %rdx
xorl %esi, %esi
movq %rdx, %rdi
callq 0x36280
cmpl $0x2, %eax
je 0x330cd
jmp 0x330a8
movq -0x20(%rbp), %rdi
addq $0x70, %rdi
leaq 0xaacbb(%rip), %rsi # 0xddd72
callq 0xa79c0
movq -0x20(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x332d8
leaq -0xa0(%rbp), %rdi
movl $0x2, %esi
leaq -0xb0(%rbp), %rdx
callq 0x36280
cmpl $0x1, %eax
je 0x33111
jmp 0x330ec
movq -0x20(%rbp), %rdi
addq $0x70, %rdi
leaq 0xaaeaf(%rip), %rsi # 0xddfaa
callq 0xa79c0
movq -0x20(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x332d8
cmpl $0x20, -0xb0(%rbp)
jbe 0x33141
jmp 0x3311c
movq -0x20(%rbp), %rdi
addq $0x70, %rdi
leaq 0xaae7f(%rip), %rsi # 0xddfaa
callq 0xa79c0
movq -0x20(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x332d8
leaq -0xd0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movl -0xb0(%rbp), %eax
movl %eax, %edx
callq 0x230a0
cmpl $0x0, -0x34(%rbp)
je 0x33207
movl -0x34(%rbp), %esi
subl $0x1, %esi
leaq -0xa0(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x36280
cmpl $0x1, %eax
je 0x331ab
jmp 0x33186
movq -0x20(%rbp), %rdi
addq $0x70, %rdi
leaq 0xaabdd(%rip), %rsi # 0xddd72
callq 0xa79c0
movq -0x20(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x332d8
cmpl $0x20, -0xb0(%rbp)
jbe 0x331db
jmp 0x331b6
movq -0x20(%rbp), %rdi
addq $0x70, %rdi
leaq 0xaabad(%rip), %rsi # 0xddd72
callq 0xa79c0
movq -0x20(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x332d8
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
movl -0xb0(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movq -0xa8(%rbp), %rsi
movl -0xb0(%rbp), %eax
movl %eax, %edx
callq 0x230a0
jmp 0x33209
movq -0x20(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x100(%rbp), %rdi
leaq 0xa99b4(%rip), %rdx # 0xdcbda
callq 0xa1c10
leaq -0xd0(%rbp), %rax
movq %rax, -0x120(%rbp)
cmpl $0x3, -0x34(%rbp)
jne 0x33257
movq -0x18(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
jmp 0x3326c
movl $0x0, -0x110(%rbp)
movq $0x0, -0x108(%rbp)
movq -0x120(%rbp), %rsi
movq -0x128(%rbp), %rdi
movl -0x110(%rbp), %edx
movq -0x108(%rbp), %rcx
leaq -0x100(%rbp), %rax
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x332f0
testb $0x1, %al
jne 0x332d4
jmp 0x332b2
movq -0x20(%rbp), %rdi
addq $0x70, %rdi
leaq 0xaad11(%rip), %rsi # 0xddfd2
callq 0xa79c0
movq -0x20(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x332d8
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
eth_verify_account_proof_exec:
push rbp
mov rbp, rsp
sub rsp, 140h
mov dword ptr [rbp+var_18], r8d
mov [rbp+var_10], r9
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_34], ecx
mov rsi, [rbp+var_28]
lea rdx, aAccountproof; "accountProof"
lea rdi, [rbp+var_50]
call ssz_get
mov rsi, [rbp+var_28]
lea rdx, aCodeAddress+7; "address"
lea rdi, [rbp+var_68]
call ssz_get
xorps xmm0, xmm0
movaps [rbp+var_80], xmm0
movaps [rbp+var_90], xmm0
movaps [rbp+var_A0], xmm0
movaps [rbp+var_B0], xmm0
movaps [rbp+var_C0], xmm0
movaps [rbp+var_D0], xmm0
mov edi, [rbp+var_68]
mov rsi, [rbp+var_60]
lea rdx, [rbp+var_90]
call keccak
mov eax, [rbp+var_34]
mov [rbp+var_114], eax
sub eax, 3
jz short loc_32F8F
jmp short $+2
loc_32F57:
mov eax, [rbp+var_114]
sub eax, 4
jnz short loc_32FBA
jmp short $+2
loc_32F64:
mov rax, [rbp+var_10]
mov rcx, cs:EMPTY_HASH
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
jmp short loc_32FCA
loc_32F8F:
mov rax, [rbp+var_10]
mov rcx, cs:EMPTY_ROOT_HASH
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
jmp short loc_32FCA
loc_32FBA:
mov rdi, [rbp+var_10]
xor esi, esi
mov edx, 20h ; ' '
call _memset
loc_32FCA:
mov rdi, [rbp+var_30]
mov [rbp+var_E8], 20h ; ' '
lea rax, [rbp+var_90]
mov [rbp+var_E0], rax
mov esi, [rbp+var_E8]
mov rdx, [rbp+var_E0]
lea rax, [rbp+var_50]
lea rcx, [rbp+var_A0]
mov r8, [rax]
mov [rsp+140h+var_140], r8
mov r8, [rax+8]
mov [rsp+140h+var_138], r8
mov rax, [rax+10h]
mov [rsp+140h+var_130], rax
call patricia_verify
mov [rbp+var_D4], eax
cmp [rbp+var_D4], 0
jnz short loc_33052
jmp short $+2
loc_3302D:
mov rdi, [rbp+var_20]
add rdi, 70h ; 'p'
lea rsi, aInvalidAccount_1; "invalid account proof on execution laye"...
call c4_state_add_error
mov rax, [rbp+var_20]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp loc_332D8
loc_33052:
cmp [rbp+var_D4], 1
jnz loc_33209
cmp qword ptr [rbp+var_A0+8], 0
jnz short loc_33090
jmp short $+2
loc_3306B:
mov rdi, [rbp+var_20]
add rdi, 70h ; 'p'
lea rsi, aInvalidAccount_1; "invalid account proof on execution laye"...
call c4_state_add_error
mov rax, [rbp+var_20]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp loc_332D8
loc_33090:
lea rdx, [rbp+var_A0]
xor esi, esi
mov rdi, rdx
call rlp_decode
cmp eax, 2
jz short loc_330CD
jmp short $+2
loc_330A8:
mov rdi, [rbp+var_20]
add rdi, 70h ; 'p'
lea rsi, aInvalidAccount_1; "invalid account proof on execution laye"...
call c4_state_add_error
mov rax, [rbp+var_20]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp loc_332D8
loc_330CD:
lea rdi, [rbp+var_A0]
mov esi, 2
lea rdx, [rbp+var_B0]
call rlp_decode
cmp eax, 1
jz short loc_33111
jmp short $+2
loc_330EC:
mov rdi, [rbp+var_20]
add rdi, 70h ; 'p'
lea rsi, aInvalidAccount_2; "invalid account proof for storage hash!"
call c4_state_add_error
mov rax, [rbp+var_20]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp loc_332D8
loc_33111:
cmp dword ptr [rbp+var_B0], 20h ; ' '
jbe short loc_33141
jmp short $+2
loc_3311C:
mov rdi, [rbp+var_20]
add rdi, 70h ; 'p'
lea rsi, aInvalidAccount_2; "invalid account proof for storage hash!"
call c4_state_add_error
mov rax, [rbp+var_20]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp loc_332D8
loc_33141:
lea rdi, [rbp+var_D0]
mov rsi, qword ptr [rbp+var_B0+8]
mov eax, dword ptr [rbp+var_B0]
mov edx, eax
call _memcpy
cmp [rbp+var_34], 0
jz loc_33207
mov esi, [rbp+var_34]
sub esi, 1
lea rdi, [rbp+var_A0]
lea rdx, [rbp+var_B0]
call rlp_decode
cmp eax, 1
jz short loc_331AB
jmp short $+2
loc_33186:
mov rdi, [rbp+var_20]
add rdi, 70h ; 'p'
lea rsi, aInvalidAccount_1; "invalid account proof on execution laye"...
call c4_state_add_error
mov rax, [rbp+var_20]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp loc_332D8
loc_331AB:
cmp dword ptr [rbp+var_B0], 20h ; ' '
jbe short loc_331DB
jmp short $+2
loc_331B6:
mov rdi, [rbp+var_20]
add rdi, 70h ; 'p'
lea rsi, aInvalidAccount_1; "invalid account proof on execution laye"...
call c4_state_add_error
mov rax, [rbp+var_20]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp loc_332D8
loc_331DB:
mov rdi, [rbp+var_10]
add rdi, 20h ; ' '
mov eax, dword ptr [rbp+var_B0]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rdi, rax
mov rsi, qword ptr [rbp+var_B0+8]
mov eax, dword ptr [rbp+var_B0]
mov edx, eax
call _memcpy
loc_33207:
jmp short $+2
loc_33209:
mov rax, [rbp+var_20]
mov [rbp+var_128], rax
mov rsi, [rbp+var_28]
lea rdi, [rbp+var_100]
lea rdx, aStorageproof; "storageProof"
call ssz_get
lea rax, [rbp+var_D0]
mov [rbp+var_120], rax
cmp [rbp+var_34], 3
jnz short loc_33257
mov rax, [rbp+var_18]
mov [rbp+var_110], rax
mov rax, [rbp+var_10]
mov [rbp+var_108], rax
jmp short loc_3326C
loc_33257:
mov dword ptr [rbp+var_110], 0
mov [rbp+var_108], 0
loc_3326C:
mov rsi, [rbp+var_120]
mov rdi, [rbp+var_128]
mov edx, dword ptr [rbp+var_110]
mov rcx, [rbp+var_108]
lea rax, [rbp+var_100]
mov r8, [rax]
mov [rsp+140h+var_140], r8
mov r8, [rax+8]
mov [rsp+140h+var_138], r8
mov rax, [rax+10h]
mov [rsp+140h+var_130], rax
call verify_storage
test al, 1
jnz short loc_332D4
jmp short $+2
loc_332B2:
mov rdi, [rbp+var_20]
add rdi, 70h ; 'p'
lea rsi, aInvalidStorage; "invalid storage proof!"
call c4_state_add_error
mov rax, [rbp+var_20]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp short loc_332D8
loc_332D4:
mov [rbp+var_1], 1
loc_332D8:
mov al, [rbp+var_1]
and al, 1
add rsp, 140h
pop rbp
retn
|
char eth_verify_account_proof_exec(long long a1, long long a2, long long a3, int a4, int a5, _QWORD *a6)
{
int v6; // r9d
_QWORD *v7; // rax
_QWORD *v8; // rcx
_QWORD *v9; // rax
_QWORD *v10; // rcx
int v11; // r9d
char v12; // al
int v14; // [rsp+18h] [rbp-128h]
long long v15; // [rsp+40h] [rbp-100h] BYREF
long long v16; // [rsp+48h] [rbp-F8h]
long long v17; // [rsp+50h] [rbp-F0h]
int v18; // [rsp+58h] [rbp-E8h]
_OWORD *v19; // [rsp+60h] [rbp-E0h]
int v20; // [rsp+6Ch] [rbp-D4h]
_OWORD v21[2]; // [rsp+70h] [rbp-D0h] BYREF
__int128 v22; // [rsp+90h] [rbp-B0h]
__int128 v23; // [rsp+A0h] [rbp-A0h] BYREF
_OWORD v24[2]; // [rsp+B0h] [rbp-90h] BYREF
unsigned int v25; // [rsp+D8h] [rbp-68h] BYREF
long long v26; // [rsp+E0h] [rbp-60h]
long long v27; // [rsp+F0h] [rbp-50h] BYREF
long long v28; // [rsp+F8h] [rbp-48h]
long long v29; // [rsp+100h] [rbp-40h]
int v30; // [rsp+10Ch] [rbp-34h]
long long v31; // [rsp+110h] [rbp-30h]
long long v32; // [rsp+118h] [rbp-28h]
long long v33; // [rsp+120h] [rbp-20h]
long long v34; // [rsp+128h] [rbp-18h]
_QWORD *v35; // [rsp+130h] [rbp-10h]
LODWORD(v34) = a5;
v35 = a6;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
ssz_get(&v27, a2, "accountProof");
ssz_get(&v25, v32, "address");
memset(v24, 0, sizeof(v24));
v23 = 0LL;
v22 = 0LL;
memset(v21, 0, sizeof(v21));
keccak(v25, v26, v24);
if ( v30 == 3 )
{
v9 = v35;
v10 = EMPTY_ROOT_HASH;
*v35 = *(_QWORD *)EMPTY_ROOT_HASH;
v9[1] = v10[1];
v9[2] = v10[2];
v9[3] = v10[3];
}
else if ( v30 == 4 )
{
v7 = v35;
v8 = EMPTY_HASH;
*v35 = *(_QWORD *)EMPTY_HASH;
v7[1] = v8[1];
v7[2] = v8[2];
v7[3] = v8[3];
}
else
{
memset(v35, 0LL, 32LL);
}
v18 = 32;
v19 = v24;
v20 = patricia_verify(v31, 32, (unsigned int)v24, (unsigned int)&v23, v28, v6, v27, v28, v29);
if ( !v20 )
goto LABEL_10;
if ( v20 == 1 )
{
if ( !*((_QWORD *)&v23 + 1) || (unsigned int)rlp_decode(&v23, 0LL) != 2 )
{
LABEL_10:
c4_state_add_error(v33 + 112, "invalid account proof on execution layer!");
*(_BYTE *)(v33 + 104) = 0;
return 0;
}
if ( (unsigned int)rlp_decode(&v23, 2LL) != 1 || (unsigned int)v22 > 0x20 )
{
c4_state_add_error(v33 + 112, "invalid account proof for storage hash!");
*(_BYTE *)(v33 + 104) = 0;
return 0;
}
memcpy(v21, *((_QWORD *)&v22 + 1), (unsigned int)v22);
if ( v30 )
{
if ( (unsigned int)rlp_decode(&v23, (unsigned int)(v30 - 1)) != 1 || (unsigned int)v22 > 0x20 )
{
c4_state_add_error(v33 + 112, "invalid account proof on execution layer!");
*(_BYTE *)(v33 + 104) = 0;
return 0;
}
memcpy((char *)v35 - (unsigned int)v22 + 32, *((_QWORD *)&v22 + 1), (unsigned int)v22);
}
}
v14 = v33;
ssz_get(&v15, v32, "storageProof");
if ( v30 == 3 )
v12 = verify_storage(v14, (unsigned int)v21, v34, (_DWORD)v35, v16, v11, v15, v16, v17);
else
v12 = verify_storage(v14, (unsigned int)v21, 0, 0, v16, v11, v15, v16, v17);
if ( (v12 & 1) != 0 )
return 1;
c4_state_add_error(v33 + 112, "invalid storage proof!");
*(_BYTE *)(v33 + 104) = 0;
return 0;
}
|
eth_verify_account_proof_exec:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
MOV dword ptr [RBP + -0x18],R8D
MOV qword ptr [RBP + -0x10],R9
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV dword ptr [RBP + -0x34],ECX
MOV RSI,qword ptr [RBP + -0x28]
LEA RDX,[0x1dcbcd]
LEA RDI,[RBP + -0x50]
CALL 0x001a1c10
MOV RSI,qword ptr [RBP + -0x28]
LEA RDX,[0x1dd853]
LEA RDI,[RBP + -0x68]
CALL 0x001a1c10
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x80],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOV EDI,dword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x60]
LEA RDX,[RBP + -0x90]
CALL 0x001a4990
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x114],EAX
SUB EAX,0x3
JZ 0x00132f8f
JMP 0x00132f57
LAB_00132f57:
MOV EAX,dword ptr [RBP + -0x114]
SUB EAX,0x4
JNZ 0x00132fba
JMP 0x00132f64
LAB_00132f64:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [0x00239470]
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
JMP 0x00132fca
LAB_00132f8f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [0x00239478]
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
JMP 0x00132fca
LAB_00132fba:
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x001231c0
LAB_00132fca:
MOV RDI,qword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0xe8],0x20
LEA RAX,[RBP + -0x90]
MOV qword ptr [RBP + -0xe0],RAX
MOV ESI,dword ptr [RBP + -0xe8]
MOV RDX,qword ptr [RBP + -0xe0]
LEA RAX,[RBP + -0x50]
LEA RCX,[RBP + -0xa0]
MOV R8,qword ptr [RAX]
MOV qword ptr [RSP],R8
MOV R8,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],R8
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00135950
MOV dword ptr [RBP + -0xd4],EAX
CMP dword ptr [RBP + -0xd4],0x0
JNZ 0x00133052
JMP 0x0013302d
LAB_0013302d:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x70
LEA RSI,[0x1ddd72]
CALL 0x001a79c0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001332d8
LAB_00133052:
CMP dword ptr [RBP + -0xd4],0x1
JNZ 0x00133209
CMP qword ptr [RBP + -0x98],0x0
JNZ 0x00133090
JMP 0x0013306b
LAB_0013306b:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x70
LEA RSI,[0x1ddd72]
CALL 0x001a79c0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001332d8
LAB_00133090:
LEA RDX,[RBP + -0xa0]
XOR ESI,ESI
MOV RDI,RDX
CALL 0x00136280
CMP EAX,0x2
JZ 0x001330cd
JMP 0x001330a8
LAB_001330a8:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x70
LEA RSI,[0x1ddd72]
CALL 0x001a79c0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001332d8
LAB_001330cd:
LEA RDI,[RBP + -0xa0]
MOV ESI,0x2
LEA RDX,[RBP + -0xb0]
CALL 0x00136280
CMP EAX,0x1
JZ 0x00133111
JMP 0x001330ec
LAB_001330ec:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x70
LEA RSI,[0x1ddfaa]
CALL 0x001a79c0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001332d8
LAB_00133111:
CMP dword ptr [RBP + -0xb0],0x20
JBE 0x00133141
JMP 0x0013311c
LAB_0013311c:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x70
LEA RSI,[0x1ddfaa]
CALL 0x001a79c0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001332d8
LAB_00133141:
LEA RDI,[RBP + -0xd0]
MOV RSI,qword ptr [RBP + -0xa8]
MOV EAX,dword ptr [RBP + -0xb0]
MOV EDX,EAX
CALL 0x001230a0
CMP dword ptr [RBP + -0x34],0x0
JZ 0x00133207
MOV ESI,dword ptr [RBP + -0x34]
SUB ESI,0x1
LEA RDI,[RBP + -0xa0]
LEA RDX,[RBP + -0xb0]
CALL 0x00136280
CMP EAX,0x1
JZ 0x001331ab
JMP 0x00133186
LAB_00133186:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x70
LEA RSI,[0x1ddd72]
CALL 0x001a79c0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001332d8
LAB_001331ab:
CMP dword ptr [RBP + -0xb0],0x20
JBE 0x001331db
JMP 0x001331b6
LAB_001331b6:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x70
LEA RSI,[0x1ddd72]
CALL 0x001a79c0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001332d8
LAB_001331db:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x20
MOV EAX,dword ptr [RBP + -0xb0]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0xa8]
MOV EAX,dword ptr [RBP + -0xb0]
MOV EDX,EAX
CALL 0x001230a0
LAB_00133207:
JMP 0x00133209
LAB_00133209:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x128],RAX
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x100]
LEA RDX,[0x1dcbda]
CALL 0x001a1c10
LEA RAX,[RBP + -0xd0]
MOV qword ptr [RBP + -0x120],RAX
CMP dword ptr [RBP + -0x34],0x3
JNZ 0x00133257
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x110],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x108],RAX
JMP 0x0013326c
LAB_00133257:
MOV dword ptr [RBP + -0x110],0x0
MOV qword ptr [RBP + -0x108],0x0
LAB_0013326c:
MOV RSI,qword ptr [RBP + -0x120]
MOV RDI,qword ptr [RBP + -0x128]
MOV EDX,dword ptr [RBP + -0x110]
MOV RCX,qword ptr [RBP + -0x108]
LEA RAX,[RBP + -0x100]
MOV R8,qword ptr [RAX]
MOV qword ptr [RSP],R8
MOV R8,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],R8
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001332f0
TEST AL,0x1
JNZ 0x001332d4
JMP 0x001332b2
LAB_001332b2:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x70
LEA RSI,[0x1ddfd2]
CALL 0x001a79c0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001332d8
LAB_001332d4:
MOV byte ptr [RBP + -0x1],0x1
LAB_001332d8:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x140
POP RBP
RET
|
bool eth_verify_account_proof_exec
(long param_1,int8 param_2,int8 param_3,int param_4,int4 param_5,
int8 *param_6)
{
int4 uVar1;
int *puVar2;
int *puVar3;
long lVar4;
int iVar5;
ulong uVar6;
bool bVar7;
int8 *local_110;
int1 local_108 [24];
int4 local_f0;
int8 *local_e8;
int local_dc;
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 uStack_c0;
ulong local_b8;
void *pvStack_b0;
int8 local_a8;
long lStack_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int4 local_70 [2];
int8 local_68;
int1 local_58 [28];
int local_3c;
int8 local_38;
int8 local_30;
long local_28;
int4 local_20;
int8 *local_18;
local_3c = param_4;
local_38 = param_3;
local_30 = param_2;
local_28 = param_1;
local_20 = param_5;
local_18 = param_6;
ssz_get(local_58,param_2,"accountProof");
ssz_get(local_70,local_30,"address");
local_88 = 0;
uStack_80 = 0;
local_98 = 0;
uStack_90 = 0;
local_a8 = 0;
lStack_a0 = 0;
local_b8 = 0;
pvStack_b0 = (void *)0x0;
local_c8 = 0;
uStack_c0 = 0;
local_d8 = 0;
uStack_d0 = 0;
keccak(local_70[0],local_68,&local_98);
puVar3 = EMPTY_ROOT_HASH;
puVar2 = EMPTY_HASH;
if (local_3c == 3) {
*local_18 = *(int8 *)EMPTY_ROOT_HASH;
local_18[1] = *(int8 *)(puVar3 + 8);
local_18[2] = *(int8 *)(puVar3 + 0x10);
local_18[3] = *(int8 *)(puVar3 + 0x18);
}
else if (local_3c == 4) {
*local_18 = *(int8 *)EMPTY_HASH;
local_18[1] = *(int8 *)(puVar2 + 8);
local_18[2] = *(int8 *)(puVar2 + 0x10);
local_18[3] = *(int8 *)(puVar2 + 0x18);
}
else {
memset(local_18,0,0x20);
}
local_f0 = 0x20;
local_e8 = &local_98;
local_dc = patricia_verify(local_38,0x20,local_e8,&local_a8);
if (local_dc == 0) {
c4_state_add_error(local_28 + 0x70,"invalid account proof on execution layer!");
*(int1 *)(local_28 + 0x68) = 0;
return false;
}
if (local_dc == 1) {
if (lStack_a0 == 0) {
c4_state_add_error(local_28 + 0x70,"invalid account proof on execution layer!");
*(int1 *)(local_28 + 0x68) = 0;
return false;
}
iVar5 = rlp_decode(&local_a8,0);
if (iVar5 != 2) {
c4_state_add_error(local_28 + 0x70,"invalid account proof on execution layer!");
*(int1 *)(local_28 + 0x68) = 0;
return false;
}
iVar5 = rlp_decode(&local_a8,2,&local_b8);
if (iVar5 != 1) {
c4_state_add_error(local_28 + 0x70,"invalid account proof for storage hash!");
*(int1 *)(local_28 + 0x68) = 0;
return false;
}
if (0x20 < (uint)local_b8) {
c4_state_add_error(local_28 + 0x70,"invalid account proof for storage hash!");
*(int1 *)(local_28 + 0x68) = 0;
return false;
}
memcpy(&local_d8,pvStack_b0,local_b8 & 0xffffffff);
if (local_3c != 0) {
iVar5 = rlp_decode(&local_a8,local_3c + -1,&local_b8);
if (iVar5 != 1) {
c4_state_add_error(local_28 + 0x70,"invalid account proof on execution layer!");
*(int1 *)(local_28 + 0x68) = 0;
return false;
}
if (0x20 < (uint)local_b8) {
c4_state_add_error(local_28 + 0x70,"invalid account proof on execution layer!");
*(int1 *)(local_28 + 0x68) = 0;
return false;
}
memcpy((void *)((long)local_18 + (0x20 - (local_b8 & 0xffffffff))),pvStack_b0,
local_b8 & 0xffffffff);
}
}
lVar4 = local_28;
ssz_get(local_108,local_30,"storageProof");
if (local_3c == 3) {
local_110 = local_18;
uVar1 = local_20;
}
else {
uVar1 = 0;
local_110 = (int8 *)0x0;
}
uVar6 = verify_storage(lVar4,&local_d8,uVar1,local_110);
bVar7 = (uVar6 & 1) != 0;
if (!bVar7) {
c4_state_add_error(local_28 + 0x70,"invalid storage proof!");
*(int1 *)(local_28 + 0x68) = 0;
}
return bVar7;
}
|
|
18,703
|
eth_verify_account_proof_exec
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
|
INTERNAL bool eth_verify_account_proof_exec(verify_ctx_t* ctx, ssz_ob_t* proof, bytes32_t state_root, eth_account_field_t field, bytes_t values) {
ssz_ob_t account_proof = ssz_get(proof, "accountProof");
ssz_ob_t address = ssz_get(proof, "address");
bytes32_t address_hash = {0};
bytes_t rlp_account = {0};
bytes_t field_value = {0};
bytes32_t storage_hash = {0};
keccak(address.bytes, address_hash);
switch (field) {
case ETH_ACCOUNT_CODE_HASH:
memcpy(values.data, EMPTY_HASH, 32);
break;
case ETH_ACCOUNT_STORAGE_HASH:
memcpy(values.data, EMPTY_ROOT_HASH, 32);
break;
default:
memset(values.data, 0, 32);
break;
}
patricia_result_t result = patricia_verify(state_root, bytes(address_hash, 32), account_proof, &rlp_account);
if (result == PATRICIA_INVALID) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
if (result == PATRICIA_FOUND) { // 2 means not existing account
if (!rlp_account.data) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
if (rlp_decode(&rlp_account, 0, &rlp_account) != RLP_LIST) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
if (rlp_decode(&rlp_account, 2, &field_value) != RLP_ITEM) RETURN_VERIFY_ERROR(ctx, "invalid account proof for storage hash!");
// get the storage hash from the proof
if (field_value.len > 32) RETURN_VERIFY_ERROR(ctx, "invalid account proof for storage hash!");
memcpy(storage_hash, field_value.data, field_value.len);
// get the field value from the proof
if (field) {
if (rlp_decode(&rlp_account, field - 1, &field_value) != RLP_ITEM) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
if (field_value.len > 32) RETURN_VERIFY_ERROR(ctx, "invalid account proof on execution layer!");
memcpy(values.data + 32 - field_value.len, field_value.data, field_value.len);
}
}
if (!verify_storage(ctx, ssz_get(proof, "storageProof"), storage_hash, field == ETH_ACCOUNT_STORAGE_HASH ? values : NULL_BYTES)) RETURN_VERIFY_ERROR(ctx, "invalid storage proof!");
return true;
}
|
O2
|
c
|
eth_verify_account_proof_exec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp # imm = 0x1A8
movq %r9, %r14
movl %r8d, 0x1c(%rsp)
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x48a99(%rip), %rdx # 0x74bf1
leaq 0xc8(%rsp), %rdi
callq 0x4d119
leaq 0x48a92(%rip), %rdx # 0x74bfe
leaq 0x178(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x4d119
xorps %xmm0, %xmm0
leaq 0x150(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movl (%r15), %edi
movq 0x8(%r15), %rsi
callq 0x4ebe8
cmpl $0x3, %r12d
je 0x2c1cc
cmpl $0x4, %r12d
jne 0x2c1e1
movq 0x90106(%rip), %rax # 0xbc2d0
jmp 0x2c1d3
movq 0x90105(%rip), %rax # 0xbc2d8
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%r14)
jmp 0x2c1e9
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq 0xd8(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0xc8(%rsp), %xmm0
movups %xmm0, (%rsp)
pushq $0x20
popq %rsi
leaq 0x150(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
callq 0x2d974
cmpl $0x1, %eax
je 0x2c42f
testl %eax, %eax
je 0x2c510
movq %rbp, %r15
leaq 0x489cd(%rip), %rdx # 0x74c06
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4d119
xorl %eax, %eax
cmpl $0x3, %r12d
cmovneq %rax, %r14
movl 0x1c(%rsp), %ecx
cmovnel %eax, %ecx
movl %ecx, 0x1c(%rsp)
movq 0x10(%rbx), %rax
movq %rax, 0x80(%rsp)
movups (%rbx), %xmm0
movaps %xmm0, 0x70(%rsp)
testq %r14, %r14
je 0x2c286
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq 0xc0(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0xb0(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x4c626
movl %eax, %ebp
testl %eax, %eax
je 0x2c2c9
movq 0x90027(%rip), %rsi # 0xbc2d8
leaq 0x90(%rsp), %rdi
pushq $0x20
popq %rdx
callq 0x22380
testl %eax, %eax
je 0x2c4a6
movq %r14, 0x48(%rsp)
movq %r15, 0x68(%rsp)
xorl %r13d, %r13d
testl %ebp, %ebp
cmovlel %r13d, %ebp
leaq 0x190(%rsp), %rbx
leaq 0x110(%rsp), %r15
pushq $0x20
popq %r14
cmpq %r13, %rbp
je 0x2c484
xorps %xmm0, %xmm0
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x70(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x4c4b1
leaq 0xf8(%rsp), %rdi
movq %rbx, %rsi
leaq 0x48219(%rip), %rdx # 0x74568
callq 0x4d119
leaq 0xe0(%rsp), %rdi
movq %rbx, %rsi
leaq 0x48d09(%rip), %rdx # 0x7506f
callq 0x4d119
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movl 0xe0(%rsp), %edi
movq 0xe8(%rsp), %rsi
leaq 0x130(%rsp), %r12
movq %r12, %rdx
callq 0x4ebe8
movq 0x108(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0xf8(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
pushq $0x20
popq %rsi
movq %r12, %rdx
leaq 0x50(%rsp), %rcx
callq 0x2d974
testl %eax, %eax
je 0x2c48b
movq %r15, %r12
movq %r15, %rdi
leaq 0x90(%rsp), %rsi
pushq $0x20
popq %rdx
callq 0x22380
testl %eax, %eax
jne 0x2c494
cmpq $0x0, 0x48(%rsp)
je 0x2c420
cmpl 0x1c(%rsp), %r14d
ja 0x2c420
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
movq %rdi, %rdx
callq 0x2de74
cmpl $0x1, %eax
jne 0x2c420
movslq %r14d, %rdi
addq 0x48(%rsp), %rdi
movl 0x50(%rsp), %edx
subq %rdx, %rdi
movq 0x58(%rsp), %rsi
callq 0x22090
incq %r13
addl $0x20, %r14d
movq %r12, %r15
jmp 0x2c2f0
cmpq $0x0, 0x38(%rsp)
je 0x2c510
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
movq %rdi, %rdx
callq 0x2de74
cmpl $0x2, %eax
jne 0x2c510
leaq 0x30(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0x20(%rsp), %rdx
callq 0x2de74
cmpl $0x1, %eax
jne 0x2c474
movl 0x20(%rsp), %edx
cmpq $0x21, %rdx
jb 0x2c4d2
leaq 0x70(%rbp), %rdi
leaq 0x4993a(%rip), %rsi # 0x75db9
jmp 0x2c51b
movb $0x1, %al
jmp 0x2c526
leaq 0x4994f(%rip), %rsi # 0x75de1
jmp 0x2c49b
leaq 0x49ab6(%rip), %rsi # 0x75f51
movq 0x68(%rsp), %r15
leaq 0x70(%r15), %rdi
jmp 0x2c4b1
leaq 0x70(%r15), %rdi
leaq 0x49a57(%rip), %rsi # 0x75f08
callq 0x50675
movb $0x0, 0x68(%r15)
leaq 0x70(%r15), %rdi
leaq 0x4991b(%rip), %rsi # 0x75de1
callq 0x50675
movb $0x0, 0x68(%r15)
jmp 0x2c524
movq 0x28(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x22090
testl %r12d, %r12d
je 0x2c22f
leal -0x1(%r12), %esi
leaq 0x30(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x2de74
cmpl $0x1, %eax
jne 0x2c510
movl 0x20(%rsp), %edx
cmpq $0x21, %rdx
jb 0x2c538
leaq 0x70(%rbp), %rdi
leaq 0x49666(%rip), %rsi # 0x75b81
callq 0x50675
movb $0x0, 0x68(%rbp)
xorl %eax, %eax
addq $0x1a8, %rsp # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
subq %rdx, %rdi
addq $0x20, %rdi
movq 0x28(%rsp), %rsi
callq 0x22090
jmp 0x2c22f
|
eth_verify_account_proof_exec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1A8h
mov r14, r9
mov [rsp+1D8h+var_1BC], r8d
mov r12d, ecx
mov rbx, rdx
mov r13, rsi
mov rbp, rdi
lea rdx, aAccountproof; "accountProof"
lea rdi, [rsp+1D8h+var_110]
call ssz_get
lea rdx, aAddress; "address"
lea r15, [rsp+1D8h+var_60]
mov rdi, r15
mov rsi, r13
call ssz_get
xorps xmm0, xmm0
lea rdx, [rsp+1D8h+var_88]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
movaps [rsp+1D8h+var_1A8], xmm0
movaps [rsp+1D8h+var_1B8], xmm0
movaps [rsp+1D8h+var_138], xmm0
movaps [rsp+1D8h+var_148], xmm0
mov edi, [r15]
mov rsi, [r15+8]
call keccak
cmp r12d, 3
jz short loc_2C1CC
cmp r12d, 4
jnz short loc_2C1E1
mov rax, cs:EMPTY_HASH
jmp short loc_2C1D3
loc_2C1CC:
mov rax, cs:EMPTY_ROOT_HASH
loc_2C1D3:
movups xmm0, xmmword ptr [rax]
movups xmm1, xmmword ptr [rax+10h]
movups xmmword ptr [r14+10h], xmm1
jmp short loc_2C1E9
loc_2C1E1:
xorps xmm0, xmm0
movups xmmword ptr [r14+10h], xmm0
loc_2C1E9:
movups xmmword ptr [r14], xmm0
mov rax, [rsp+1D8h+var_100]
mov [rsp+1D8h+var_1C8], rax
movups xmm0, [rsp+1D8h+var_110]
movups [rsp+1D8h+var_1D8], xmm0
push 20h ; ' '
pop rsi
lea rdx, [rsp+1D8h+var_88]
lea rcx, [rsp+1D8h+var_1A8]
mov rdi, rbx
call patricia_verify
cmp eax, 1
jz loc_2C42F
test eax, eax
jz loc_2C510
loc_2C22F:
mov r15, rbp
lea rdx, aStorageproof; "storageProof"
lea rbx, [rsp+1D8h+var_128]
mov rdi, rbx
mov rsi, r13
call ssz_get
xor eax, eax
cmp r12d, 3
cmovnz r14, rax
mov ecx, [rsp+1D8h+var_1BC]
cmovnz ecx, eax
mov [rsp+1D8h+var_1BC], ecx
mov rax, [rbx+10h]
mov [rsp+1D8h+var_158], rax
movups xmm0, xmmword ptr [rbx]
movaps [rsp+1D8h+var_168], xmm0
test r14, r14
jz short loc_2C286
xorps xmm0, xmm0
movups xmmword ptr [r14+10h], xmm0
movups xmmword ptr [r14], xmm0
loc_2C286:
mov rax, [rsp+1D8h+var_118]
mov [rsp+1D8h+var_1C8], rax
movups xmm0, [rsp+1D8h+var_128]
movups [rsp+1D8h+var_1D8], xmm0
call ssz_len
mov ebp, eax
test eax, eax
jz short loc_2C2C9
mov rsi, cs:EMPTY_ROOT_HASH
lea rdi, [rsp+1D8h+var_148]
push 20h ; ' '
pop rdx
call _bcmp
test eax, eax
jz loc_2C4A6
loc_2C2C9:
mov [rsp+1D8h+var_190], r14
mov [rsp+1D8h+var_170], r15
xor r13d, r13d
test ebp, ebp
cmovle ebp, r13d
lea rbx, [rsp+1D8h+var_48]
lea r15, [rsp+1D8h+var_C8]
push 20h ; ' '
pop r14
loc_2C2F0:
cmp rbp, r13
jz loc_2C484
xorps xmm0, xmm0
movaps [rsp+1D8h+var_98], xmm0
movaps [rsp+1D8h+var_A8], xmm0
movaps [rsp+1D8h+var_B8], xmm0
movaps [rsp+1D8h+var_C8], xmm0
mov rax, [rsp+1D8h+var_158]
mov [rsp+1D8h+var_1C8], rax
movaps xmm0, [rsp+1D8h+var_168]
movups [rsp+1D8h+var_1D8], xmm0
mov rdi, rbx
mov esi, r13d
call ssz_at
lea rdi, [rsp+1D8h+var_E0]
mov rsi, rbx
lea rdx, aChainTypeDoesN+1Eh; "proof"
call ssz_get
lea rdi, [rsp+1D8h+var_F8]
mov rsi, rbx
lea rdx, aAggregatepubke+0Ch; "key"
call ssz_get
xorps xmm0, xmm0
movaps [rsp+1D8h+var_188], xmm0
mov edi, [rsp+1D8h+var_F8]
mov rsi, [rsp+1D8h+var_F0]
lea r12, [rsp+1D8h+var_A8]
mov rdx, r12
call keccak
mov rax, [rsp+1D8h+var_D0]
mov [rsp+1D8h+var_1C8], rax
movups xmm0, [rsp+1D8h+var_E0]
movups [rsp+1D8h+var_1D8], xmm0
mov rdi, r15
push 20h ; ' '
pop rsi
mov rdx, r12
lea rcx, [rsp+1D8h+var_188]
call patricia_verify
test eax, eax
jz loc_2C48B
mov r12, r15
mov rdi, r15
lea rsi, [rsp+1D8h+var_148]
push 20h ; ' '
pop rdx
call _bcmp
test eax, eax
jnz loc_2C494
cmp [rsp+1D8h+var_190], 0
jz short loc_2C420
cmp r14d, [rsp+1D8h+var_1BC]
ja short loc_2C420
lea rdi, [rsp+1D8h+var_188]
xor esi, esi
mov rdx, rdi
call rlp_decode
cmp eax, 1
jnz short loc_2C420
movsxd rdi, r14d
add rdi, [rsp+1D8h+var_190]
mov edx, dword ptr [rsp+1D8h+var_188]
sub rdi, rdx
mov rsi, qword ptr [rsp+1D8h+var_188+8]
call _memcpy
loc_2C420:
inc r13
add r14d, 20h ; ' '
mov r15, r12
jmp loc_2C2F0
loc_2C42F:
cmp qword ptr [rsp+1D8h+var_1A8+8], 0
jz loc_2C510
lea rdi, [rsp+1D8h+var_1A8]
xor esi, esi
mov rdx, rdi
call rlp_decode
cmp eax, 2
jnz loc_2C510
lea rdi, [rsp+1D8h+var_1A8]
push 2
pop rsi
lea rdx, [rsp+1D8h+var_1B8]
call rlp_decode
cmp eax, 1
jnz short loc_2C474
mov edx, dword ptr [rsp+1D8h+var_1B8]
cmp rdx, 21h ; '!'
jb short loc_2C4D2
loc_2C474:
lea rdi, [rbp+70h]
lea rsi, aInvalidAccount_2; "invalid account proof for storage hash!"
jmp loc_2C51B
loc_2C484:
mov al, 1
jmp loc_2C526
loc_2C48B:
lea rsi, aInvalidStorage; "invalid storage proof!"
jmp short loc_2C49B
loc_2C494:
lea rsi, aInvalidStorage_0; "invalid storage root!"
loc_2C49B:
mov r15, [rsp+1D8h+var_170]
lea rdi, [r15+70h]
jmp short loc_2C4B1
loc_2C4A6:
lea rdi, [r15+70h]
lea rsi, aInvalidStorage_1; "invalid storage proof because an empty "...
loc_2C4B1:
call c4_state_add_error
mov byte ptr [r15+68h], 0
lea rdi, [r15+70h]
lea rsi, aInvalidStorage; "invalid storage proof!"
call c4_state_add_error
mov byte ptr [r15+68h], 0
jmp short loc_2C524
loc_2C4D2:
mov rsi, qword ptr [rsp+1D8h+var_1B8+8]
lea rdi, [rsp+1D8h+var_148]
call _memcpy
test r12d, r12d
jz loc_2C22F
lea esi, [r12-1]
lea rdi, [rsp+1D8h+var_1A8]
lea rdx, [rsp+1D8h+var_1B8]
call rlp_decode
cmp eax, 1
jnz short loc_2C510
mov edx, dword ptr [rsp+1D8h+var_1B8]
cmp rdx, 21h ; '!'
jb short loc_2C538
loc_2C510:
lea rdi, [rbp+70h]
lea rsi, aInvalidAccount_1; "invalid account proof on execution laye"...
loc_2C51B:
call c4_state_add_error
mov byte ptr [rbp+68h], 0
loc_2C524:
xor eax, eax
loc_2C526:
add rsp, 1A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2C538:
mov rdi, r14
sub rdi, rdx
add rdi, 20h ; ' '
mov rsi, qword ptr [rsp+1D8h+var_1B8+8]
call _memcpy
jmp loc_2C22F
|
char eth_verify_account_proof_exec(long long a1, long long a2, int a3, int a4, unsigned int a5, _OWORD *a6)
{
int v10; // r8d
int v11; // r9d
__int128 *v12; // rax
__int128 v13; // xmm0
int v14; // eax
long long v15; // r15
int v16; // edx
int v17; // r8d
int v18; // r9d
unsigned int v19; // ecx
unsigned int v20; // eax
int v21; // edx
long long v22; // rcx
int v23; // r8d
int v24; // r9d
long long v25; // rbp
long long v26; // r13
int i; // r14d
int v28; // r8d
int v29; // r9d
long long v30; // rcx
long long v31; // rdi
const char *v32; // rsi
const char *v34; // rsi
long long v35; // rdi
long long v36; // rcx
unsigned int v38; // [rsp+1Ch] [rbp-1BCh]
__int128 v39; // [rsp+20h] [rbp-1B8h] BYREF
__int128 v40; // [rsp+30h] [rbp-1A8h] BYREF
_OWORD *v41; // [rsp+48h] [rbp-190h]
__int128 v42; // [rsp+50h] [rbp-188h] BYREF
long long v43; // [rsp+68h] [rbp-170h]
__int128 v44; // [rsp+70h] [rbp-168h]
long long v45; // [rsp+80h] [rbp-158h]
_OWORD v46[2]; // [rsp+90h] [rbp-148h] BYREF
__int128 v47; // [rsp+B0h] [rbp-128h] BYREF
long long v48; // [rsp+C0h] [rbp-118h]
__int128 v49; // [rsp+C8h] [rbp-110h] BYREF
long long v50; // [rsp+D8h] [rbp-100h]
unsigned int v51; // [rsp+E0h] [rbp-F8h] BYREF
long long v52; // [rsp+E8h] [rbp-F0h]
__int128 v53; // [rsp+F8h] [rbp-E0h] BYREF
long long v54; // [rsp+108h] [rbp-D0h]
_OWORD v55[2]; // [rsp+110h] [rbp-C8h] BYREF
_OWORD v56[2]; // [rsp+130h] [rbp-A8h] BYREF
_BYTE v57[40]; // [rsp+150h] [rbp-88h] BYREF
unsigned int v58; // [rsp+178h] [rbp-60h] BYREF
long long v59; // [rsp+180h] [rbp-58h]
_BYTE v60[72]; // [rsp+190h] [rbp-48h] BYREF
ssz_get(&v49, a2, "accountProof");
ssz_get(&v58, a2, "address");
memset(v57, 0, 32);
v40 = 0LL;
v39 = 0LL;
memset(v46, 0, sizeof(v46));
keccak(v58, v59, v57);
if ( a4 == 3 )
{
v12 = (__int128 *)EMPTY_ROOT_HASH;
goto LABEL_5;
}
if ( a4 == 4 )
{
v12 = (__int128 *)EMPTY_HASH;
LABEL_5:
v13 = *v12;
a6[1] = v12[1];
goto LABEL_7;
}
v13 = 0LL;
a6[1] = 0LL;
LABEL_7:
*a6 = v13;
v14 = patricia_verify(a3, 32, (unsigned int)v57, (unsigned int)&v40, v10, v11, v49, v50);
if ( v14 == 1 )
{
if ( *((_QWORD *)&v40 + 1) && (unsigned int)rlp_decode(&v40, 0LL, &v40) == 2 )
{
if ( (unsigned int)rlp_decode(&v40, 2LL, &v39) != 1 || (unsigned int)v39 >= 0x21uLL )
{
v31 = a1 + 112;
v32 = "invalid account proof for storage hash!";
LABEL_43:
c4_state_add_error(v31, v32);
*(_BYTE *)(a1 + 104) = 0;
return 0;
}
memcpy(v46, *((_QWORD *)&v39 + 1), (unsigned int)v39, v30);
if ( !a4 )
goto LABEL_9;
if ( (unsigned int)rlp_decode(&v40, (unsigned int)(a4 - 1), &v39) == 1 && (unsigned int)v39 < 0x21uLL )
{
memcpy((char *)a6 - (unsigned int)v39 + 32, *((_QWORD *)&v39 + 1), (unsigned int)v39, v36);
goto LABEL_9;
}
}
LABEL_42:
v31 = a1 + 112;
v32 = "invalid account proof on execution layer!";
goto LABEL_43;
}
if ( !v14 )
goto LABEL_42;
LABEL_9:
v15 = a1;
ssz_get(&v47, a2, "storageProof");
if ( a4 != 3 )
a6 = 0LL;
v19 = a5;
if ( a4 != 3 )
v19 = 0;
v38 = v19;
v45 = v48;
v44 = v47;
if ( a6 )
{
a6[1] = 0LL;
*a6 = 0LL;
}
v20 = ssz_len((unsigned int)&v47, a2, v16, v19, v17, v18, v47, DWORD2(v47), v48);
v25 = v20;
if ( v20 && !(unsigned int)bcmp(v46, EMPTY_ROOT_HASH, 32LL) )
{
v35 = a1 + 112;
v34 = "invalid storage proof because an empty storage hash can not have values!";
}
else
{
v41 = a6;
v43 = a1;
v26 = 0LL;
if ( (int)v25 <= 0 )
v25 = 0LL;
for ( i = 32; ; i += 32 )
{
if ( v25 == v26 )
return 1;
memset(v56, 0, sizeof(v56));
memset(v55, 0, sizeof(v55));
ssz_at((unsigned int)v60, v26, v21, v22, v23, v24, v44, *((long long *)&v44 + 1), v45);
ssz_get(&v53, v60, "proof");
ssz_get(&v51, v60, "key");
v42 = 0LL;
keccak(v51, v52, v56);
if ( !(unsigned int)patricia_verify(
(unsigned int)v55,
32,
(unsigned int)v56,
(unsigned int)&v42,
v28,
v29,
v53,
v54) )
{
v34 = "invalid storage proof!";
goto LABEL_36;
}
if ( (unsigned int)bcmp(v55, v46, 32LL) )
break;
if ( v41 && i <= v38 && (unsigned int)rlp_decode(&v42, 0LL, &v42) == 1 )
memcpy((char *)&v41[i / 0x10u] - (unsigned int)v42, *((_QWORD *)&v42 + 1), (unsigned int)v42, v22);
++v26;
}
v34 = "invalid storage root!";
LABEL_36:
v15 = v43;
v35 = v43 + 112;
}
c4_state_add_error(v35, v34);
*(_BYTE *)(v15 + 104) = 0;
c4_state_add_error(v15 + 112, "invalid storage proof!");
*(_BYTE *)(v15 + 104) = 0;
return 0;
}
|
eth_verify_account_proof_exec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1a8
MOV R14,R9
MOV dword ptr [RSP + 0x1c],R8D
MOV R12D,ECX
MOV RBX,RDX
MOV R13,RSI
MOV RBP,RDI
LEA RDX,[0x174bf1]
LEA RDI,[RSP + 0xc8]
CALL 0x0014d119
LEA RDX,[0x174bfe]
LEA R15,[RSP + 0x178]
MOV RDI,R15
MOV RSI,R13
CALL 0x0014d119
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x150]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOV EDI,dword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
CALL 0x0014ebe8
CMP R12D,0x3
JZ 0x0012c1cc
CMP R12D,0x4
JNZ 0x0012c1e1
MOV RAX,qword ptr [0x001bc2d0]
JMP 0x0012c1d3
LAB_0012c1cc:
MOV RAX,qword ptr [0x001bc2d8]
LAB_0012c1d3:
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS XMM1,xmmword ptr [RAX + 0x10]
MOVUPS xmmword ptr [R14 + 0x10],XMM1
JMP 0x0012c1e9
LAB_0012c1e1:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x10],XMM0
LAB_0012c1e9:
MOVUPS xmmword ptr [R14],XMM0
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0xc8]
MOVUPS xmmword ptr [RSP],XMM0
PUSH 0x20
POP RSI
LEA RDX,[RSP + 0x150]
LEA RCX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x0012d974
CMP EAX,0x1
JZ 0x0012c42f
TEST EAX,EAX
JZ 0x0012c510
LAB_0012c22f:
MOV R15,RBP
LEA RDX,[0x174c06]
LEA RBX,[RSP + 0xb0]
MOV RDI,RBX
MOV RSI,R13
CALL 0x0014d119
XOR EAX,EAX
CMP R12D,0x3
CMOVNZ R14,RAX
MOV ECX,dword ptr [RSP + 0x1c]
CMOVNZ ECX,EAX
MOV dword ptr [RSP + 0x1c],ECX
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [RSP + 0x80],RAX
MOVUPS XMM0,xmmword ptr [RBX]
MOVAPS xmmword ptr [RSP + 0x70],XMM0
TEST R14,R14
JZ 0x0012c286
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x10],XMM0
MOVUPS xmmword ptr [R14],XMM0
LAB_0012c286:
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0xb0]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0014c626
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0012c2c9
MOV RSI,qword ptr [0x001bc2d8]
LEA RDI,[RSP + 0x90]
PUSH 0x20
POP RDX
CALL 0x00122380
TEST EAX,EAX
JZ 0x0012c4a6
LAB_0012c2c9:
MOV qword ptr [RSP + 0x48],R14
MOV qword ptr [RSP + 0x68],R15
XOR R13D,R13D
TEST EBP,EBP
CMOVLE EBP,R13D
LEA RBX,[RSP + 0x190]
LEA R15,[RSP + 0x110]
PUSH 0x20
POP R14
LAB_0012c2f0:
CMP RBP,R13
JZ 0x0012c484
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x140],XMM0
MOVAPS xmmword ptr [RSP + 0x130],XMM0
MOVAPS xmmword ptr [RSP + 0x120],XMM0
MOVAPS xmmword ptr [RSP + 0x110],XMM0
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x70]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOV ESI,R13D
CALL 0x0014c4b1
LEA RDI,[RSP + 0xf8]
MOV RSI,RBX
LEA RDX,[0x174568]
CALL 0x0014d119
LEA RDI,[RSP + 0xe0]
MOV RSI,RBX
LEA RDX,[0x17506f]
CALL 0x0014d119
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOV EDI,dword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0xe8]
LEA R12,[RSP + 0x130]
MOV RDX,R12
CALL 0x0014ebe8
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0xf8]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R15
PUSH 0x20
POP RSI
MOV RDX,R12
LEA RCX,[RSP + 0x50]
CALL 0x0012d974
TEST EAX,EAX
JZ 0x0012c48b
MOV R12,R15
MOV RDI,R15
LEA RSI,[RSP + 0x90]
PUSH 0x20
POP RDX
CALL 0x00122380
TEST EAX,EAX
JNZ 0x0012c494
CMP qword ptr [RSP + 0x48],0x0
JZ 0x0012c420
CMP R14D,dword ptr [RSP + 0x1c]
JA 0x0012c420
LEA RDI,[RSP + 0x50]
XOR ESI,ESI
MOV RDX,RDI
CALL 0x0012de74
CMP EAX,0x1
JNZ 0x0012c420
MOVSXD RDI,R14D
ADD RDI,qword ptr [RSP + 0x48]
MOV EDX,dword ptr [RSP + 0x50]
SUB RDI,RDX
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00122090
LAB_0012c420:
INC R13
ADD R14D,0x20
MOV R15,R12
JMP 0x0012c2f0
LAB_0012c42f:
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0012c510
LEA RDI,[RSP + 0x30]
XOR ESI,ESI
MOV RDX,RDI
CALL 0x0012de74
CMP EAX,0x2
JNZ 0x0012c510
LEA RDI,[RSP + 0x30]
PUSH 0x2
POP RSI
LEA RDX,[RSP + 0x20]
CALL 0x0012de74
CMP EAX,0x1
JNZ 0x0012c474
MOV EDX,dword ptr [RSP + 0x20]
CMP RDX,0x21
JC 0x0012c4d2
LAB_0012c474:
LEA RDI,[RBP + 0x70]
LEA RSI,[0x175db9]
JMP 0x0012c51b
LAB_0012c484:
MOV AL,0x1
JMP 0x0012c526
LAB_0012c48b:
LEA RSI,[0x175de1]
JMP 0x0012c49b
LAB_0012c494:
LEA RSI,[0x175f51]
LAB_0012c49b:
MOV R15,qword ptr [RSP + 0x68]
LEA RDI,[R15 + 0x70]
JMP 0x0012c4b1
LAB_0012c4a6:
LEA RDI,[R15 + 0x70]
LEA RSI,[0x175f08]
LAB_0012c4b1:
CALL 0x00150675
MOV byte ptr [R15 + 0x68],0x0
LEA RDI,[R15 + 0x70]
LEA RSI,[0x175de1]
CALL 0x00150675
MOV byte ptr [R15 + 0x68],0x0
JMP 0x0012c524
LAB_0012c4d2:
MOV RSI,qword ptr [RSP + 0x28]
LEA RDI,[RSP + 0x90]
CALL 0x00122090
TEST R12D,R12D
JZ 0x0012c22f
LEA ESI,[R12 + -0x1]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x20]
CALL 0x0012de74
CMP EAX,0x1
JNZ 0x0012c510
MOV EDX,dword ptr [RSP + 0x20]
CMP RDX,0x21
JC 0x0012c538
LAB_0012c510:
LEA RDI,[RBP + 0x70]
LEA RSI,[0x175b81]
LAB_0012c51b:
CALL 0x00150675
MOV byte ptr [RBP + 0x68],0x0
LAB_0012c524:
XOR EAX,EAX
LAB_0012c526:
ADD RSP,0x1a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012c538:
MOV RDI,R14
SUB RDI,RDX
ADD RDI,0x20
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00122090
JMP 0x0012c22f
|
int8
eth_verify_account_proof_exec
(long param_1,int8 param_2,int8 param_3,int param_4,uint param_5,
int8 *param_6)
{
int8 uVar1;
int iVar2;
uint uVar3;
int4 *puVar4;
int8 *puVar5;
ulong uVar6;
char *pcVar7;
long lVar8;
ulong uVar9;
int4 uVar10;
int4 uVar11;
int4 uVar12;
int4 uVar13;
ulong local_1b8;
void *pvStack_1b0;
int8 local_1a8;
long lStack_1a0;
int8 *local_190;
ulong local_188;
void *pvStack_180;
long local_170;
int8 local_158;
int8 local_148;
int8 uStack_140;
int8 local_138;
int8 uStack_130;
int1 local_128 [16];
int8 local_118;
int1 local_110 [24];
int4 local_f8 [2];
int8 local_f0;
int1 local_e0 [24];
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
int8 uStack_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int4 local_60 [2];
int8 local_58;
int1 local_48 [24];
ssz_get(local_110,param_2,"accountProof");
ssz_get(local_60,param_2,"address");
local_78 = 0;
uStack_70 = 0;
local_88 = 0;
uStack_80 = 0;
local_1a8 = 0;
lStack_1a0 = 0;
local_1b8 = 0;
pvStack_1b0 = (void *)0x0;
local_138 = 0;
uStack_130 = 0;
local_148 = 0;
uStack_140 = 0;
keccak(local_60[0],local_58);
puVar4 = (int4 *)EMPTY_ROOT_HASH;
if ((param_4 == 3) || (puVar4 = (int4 *)EMPTY_HASH, param_4 == 4)) {
uVar10 = *puVar4;
uVar11 = puVar4[1];
uVar12 = puVar4[2];
uVar13 = puVar4[3];
uVar1 = *(int8 *)(puVar4 + 6);
param_6[2] = *(int8 *)(puVar4 + 4);
param_6[3] = uVar1;
}
else {
uVar10 = 0;
uVar11 = 0;
uVar12 = 0;
uVar13 = 0;
param_6[2] = 0;
param_6[3] = 0;
}
*(int4 *)param_6 = uVar10;
*(int4 *)((long)param_6 + 4) = uVar11;
*(int4 *)(param_6 + 1) = uVar12;
*(int4 *)((long)param_6 + 0xc) = uVar13;
iVar2 = patricia_verify(param_3,0x20,&local_88,&local_1a8);
if (iVar2 == 1) {
if ((lStack_1a0 != 0) && (iVar2 = rlp_decode(&local_1a8,0,&local_1a8), iVar2 == 2)) {
iVar2 = rlp_decode(&local_1a8,2,&local_1b8);
if ((iVar2 != 1) || (0x20 < (local_1b8 & 0xffffffff))) {
pcVar7 = "invalid account proof for storage hash!";
goto LAB_0012c51b;
}
memcpy(&local_148,pvStack_1b0,local_1b8 & 0xffffffff);
if (param_4 == 0) {
LAB_0012c22f:
ssz_get(local_128,param_2,"storageProof");
if (param_4 != 3) {
param_6 = (int8 *)0x0;
}
puVar5 = (int8 *)(ulong)param_5;
if (param_4 != 3) {
puVar5 = (int8 *)0x0;
}
local_158 = local_118;
if (param_6 != (int8 *)0x0) {
param_6[2] = 0;
param_6[3] = 0;
*param_6 = 0;
param_6[1] = 0;
}
uVar3 = ssz_len();
if ((uVar3 == 0) || (iVar2 = bcmp(&local_148,EMPTY_ROOT_HASH,0x20), iVar2 != 0)) {
uVar9 = 0;
uVar6 = (ulong)uVar3;
if ((int)uVar3 < 1) {
uVar6 = uVar9;
}
uVar3 = 0x20;
local_190 = param_6;
local_170 = param_1;
while( true ) {
if (uVar6 == uVar9) {
return 1;
}
local_98 = 0;
uStack_90 = 0;
local_a8 = 0;
uStack_a0 = 0;
local_b8 = 0;
uStack_b0 = 0;
local_c8 = 0;
uStack_c0 = 0;
ssz_at(local_48,uVar9 & 0xffffffff);
ssz_get(local_e0,local_48,"proof");
ssz_get(local_f8,local_48,"key");
local_188 = 0;
pvStack_180 = (void *)0x0;
keccak(local_f8[0],local_f0,&local_a8);
iVar2 = patricia_verify(&local_c8,0x20,&local_a8,&local_188);
if (iVar2 == 0) break;
iVar2 = bcmp(&local_c8,&local_148,0x20);
if (iVar2 != 0) {
pcVar7 = "invalid storage root!";
goto LAB_0012c49b;
}
if (((local_190 != (int8 *)0x0) && (uVar3 <= (uint)puVar5)) &&
(iVar2 = rlp_decode(&local_188,0,&local_188), iVar2 == 1)) {
memcpy((void *)((long)local_190 + ((long)(int)uVar3 - (local_188 & 0xffffffff))),
pvStack_180,local_188 & 0xffffffff);
}
uVar9 = uVar9 + 1;
uVar3 = uVar3 + 0x20;
}
pcVar7 = "invalid storage proof!";
LAB_0012c49b:
lVar8 = local_170 + 0x70;
param_1 = local_170;
}
else {
lVar8 = param_1 + 0x70;
pcVar7 = "invalid storage proof because an empty storage hash can not have values!";
}
c4_state_add_error(lVar8,pcVar7);
*(int1 *)(param_1 + 0x68) = 0;
c4_state_add_error(param_1 + 0x70,"invalid storage proof!");
*(int1 *)(param_1 + 0x68) = 0;
return 0;
}
iVar2 = rlp_decode(&local_1a8,param_4 + -1,&local_1b8);
if ((iVar2 == 1) && (uVar6 = local_1b8 & 0xffffffff, uVar6 < 0x21)) {
memcpy((void *)((long)param_6 + (0x20 - uVar6)),pvStack_1b0,uVar6);
goto LAB_0012c22f;
}
}
}
else if (iVar2 != 0) goto LAB_0012c22f;
pcVar7 = "invalid account proof on execution layer!";
LAB_0012c51b:
c4_state_add_error(param_1 + 0x70,pcVar7);
*(int1 *)(param_1 + 0x68) = 0;
return 0;
}
|
|
18,704
|
google::protobuf::FloatToBuffer(float, char*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc
|
char* FloatToBuffer(float value, char* buffer) {
// FLT_DIG is 6 for IEEE-754 floats, which are used on almost all
// platforms these days. Just in case some system exists where FLT_DIG
// is significantly larger -- and risks overflowing our buffer -- we have
// this assert.
static_assert(FLT_DIG < 10, "FLT_DIG_is_too_big");
if (value == std::numeric_limits<double>::infinity()) {
strcpy(buffer, "inf");
return buffer;
} else if (value == -std::numeric_limits<double>::infinity()) {
strcpy(buffer, "-inf");
return buffer;
} else if (std::isnan(value)) {
strcpy(buffer, "nan");
return buffer;
}
int snprintf_result =
snprintf(buffer, kFloatToBufferSize, "%.*g", FLT_DIG, value);
// The snprintf should never overflow because the buffer is significantly
// larger than the precision we asked for.
GOOGLE_DCHECK(snprintf_result > 0 && snprintf_result < kFloatToBufferSize);
float parsed_value;
if (!safe_strtof(buffer, &parsed_value) || parsed_value != value) {
snprintf_result =
snprintf(buffer, kFloatToBufferSize, "%.*g", FLT_DIG + 3, value);
// Should never overflow; see above.
GOOGLE_DCHECK(snprintf_result > 0 && snprintf_result < kFloatToBufferSize);
}
DelocalizeRadix(buffer);
return buffer;
}
|
O3
|
cpp
|
google::protobuf::FloatToBuffer(float, char*):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
ucomiss 0x9c8fb(%rip), %xmm0 # 0xb5878
jb 0x18f8a
movl $0x666e69, (%rbx) # imm = 0x666E69
jmp 0x1901a
movss 0x9c8ea(%rip), %xmm1 # 0xb587c
ucomiss %xmm0, %xmm1
jb 0x18fa3
movb $0x0, 0x4(%rbx)
movl $0x666e692d, (%rbx) # imm = 0x666E692D
jmp 0x1901a
ucomiss %xmm0, %xmm0
jp 0x19023
movss %xmm0, (%rsp)
cvtss2sd %xmm0, %xmm0
leaq 0x9c9a4(%rip), %rdx # 0xb595c
movl $0x18, %esi
movq %rbx, %rdi
movl $0x6, %ecx
movsd %xmm0, 0x8(%rsp)
movb $0x1, %al
callq 0xf4f0
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x19616
testb %al, %al
je 0x18ff1
movss 0x4(%rsp), %xmm0
ucomiss (%rsp), %xmm0
jne 0x18ff1
jnp 0x19012
leaq 0x9c964(%rip), %rdx # 0xb595c
movl $0x18, %esi
movq %rbx, %rdi
movl $0x9, %ecx
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0xf4f0
movq %rbx, %rdi
callq 0x1902b
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
movl $0x6e616e, (%rbx) # imm = 0x6E616E
jmp 0x1901a
|
_ZN6google8protobuf13FloatToBufferEfPc:
push rbx
sub rsp, 10h
mov rbx, rdi
ucomiss xmm0, cs:dword_B5878
jb short loc_18F8A
mov dword ptr [rbx], 666E69h
jmp loc_1901A
loc_18F8A:
movss xmm1, cs:dword_B587C
ucomiss xmm1, xmm0
jb short loc_18FA3
mov byte ptr [rbx+4], 0
mov dword ptr [rbx], 666E692Dh
jmp short loc_1901A
loc_18FA3:
ucomiss xmm0, xmm0
jp short loc_19023
movss [rsp+18h+var_18], xmm0
cvtss2sd xmm0, xmm0
lea rdx, aG; "%.*g"
mov esi, 18h
mov rdi, rbx
mov ecx, 6
movsd [rsp+18h+var_10], xmm0
mov al, 1
call _snprintf
lea rsi, [rsp+18h+var_14]; char *
mov rdi, rbx; this
call _ZN6google8protobuf11safe_strtofEPKcPf; google::protobuf::safe_strtof(char const*,float *)
test al, al
jz short loc_18FF1
movss xmm0, dword ptr [rsp+18h+var_14]
ucomiss xmm0, [rsp+18h+var_18]
jnz short loc_18FF1
jnp short loc_19012
loc_18FF1:
lea rdx, aG; "%.*g"
mov esi, offset off_18; char *
mov rdi, rbx
mov ecx, 9
movsd xmm0, [rsp+18h+var_10]
mov al, 1
call _snprintf
loc_19012:
mov rdi, rbx; this
call _ZN6google8protobuf15DelocalizeRadixEPc; google::protobuf::DelocalizeRadix(char *)
loc_1901A:
mov rax, rbx
add rsp, 10h
pop rbx
retn
loc_19023:
mov dword ptr [rbx], 6E616Eh
jmp short loc_1901A
|
google::protobuf * google::protobuf::FloatToBuffer(google::protobuf *this, float a2, char *a3)
{
char *v3; // rsi
float *v4; // rdx
char v6[4]; // [rsp+4h] [rbp-14h] BYREF
double v7; // [rsp+8h] [rbp-10h]
if ( a2 < INFINITY )
{
if ( a2 > -INFINITY )
{
v7 = a2;
snprintf(this, 24LL, "%.*g", 6, a2);
v3 = v6;
if ( !(unsigned __int8)google::protobuf::safe_strtof(this, v6, v4) || *(float *)v6 != a2 )
{
v3 = (char *)off_18;
snprintf(this, off_18, "%.*g", 9, v7);
}
google::protobuf::DelocalizeRadix(this, v3);
}
else
{
strcpy((char *)this, "-inf");
}
}
else
{
*(_DWORD *)this = 6712937;
}
return this;
}
|
FloatToBuffer:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
UCOMISS XMM0,dword ptr [0x001b5878]
JC 0x00118f8a
MOV dword ptr [RBX],0x666e69
JMP 0x0011901a
LAB_00118f8a:
MOVSS XMM1,dword ptr [0x001b587c]
UCOMISS XMM1,XMM0
JC 0x00118fa3
MOV byte ptr [RBX + 0x4],0x0
MOV dword ptr [RBX],0x666e692d
JMP 0x0011901a
LAB_00118fa3:
UCOMISS XMM0,XMM0
JP 0x00119023
MOVSS dword ptr [RSP],XMM0
CVTSS2SD XMM0,XMM0
LEA RDX,[0x1b595c]
MOV ESI,0x18
MOV RDI,RBX
MOV ECX,0x6
MOVSD qword ptr [RSP + 0x8],XMM0
MOV AL,0x1
CALL 0x0010f4f0
LEA RSI,[RSP + 0x4]
MOV RDI,RBX
CALL 0x00119616
TEST AL,AL
JZ 0x00118ff1
MOVSS XMM0,dword ptr [RSP + 0x4]
UCOMISS XMM0,dword ptr [RSP]
JNZ 0x00118ff1
JNP 0x00119012
LAB_00118ff1:
LEA RDX,[0x1b595c]
MOV ESI,0x18
MOV RDI,RBX
MOV ECX,0x9
MOVSD XMM0,qword ptr [RSP + 0x8]
MOV AL,0x1
CALL 0x0010f4f0
LAB_00119012:
MOV RDI,RBX
CALL 0x0011902b
LAB_0011901a:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
RET
LAB_00119023:
MOV dword ptr [RBX],0x6e616e
JMP 0x0011901a
|
/* google::protobuf::FloatToBuffer(float, char*) */
char * google::protobuf::FloatToBuffer(float param_1,char *param_2)
{
char cVar1;
float local_14;
double local_10;
if (DAT_001b5878 <= param_1) {
builtin_strncpy(param_2,"inf",4);
return param_2;
}
if (param_1 <= DAT_001b587c) {
builtin_strncpy(param_2,"-inf",5);
return param_2;
}
if (NAN(param_1)) {
builtin_strncpy(param_2,"nan",4);
return param_2;
}
local_10 = (double)param_1;
snprintf(param_2,0x18,"%.*g",6);
cVar1 = safe_strtof(param_2,&local_14);
if (cVar1 != '\0') {
if ((local_14 == param_1) && (!NAN(local_14) && !NAN(param_1))) goto LAB_00119012;
}
snprintf(param_2,0x18,"%.*g",local_10,9);
LAB_00119012:
DelocalizeRadix(param_2);
return param_2;
}
|
|
18,705
|
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};
}
|
O3
|
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, %r15
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %rbp
cmpq %rbp, %rbx
je 0xb7bde
movq (%r15), %r12
movq 0x8(%r15), %r13
cmpq %r13, 0x8(%rbx)
jne 0xb7bd5
testq %r13, %r13
je 0xb7bf5
movq (%rbx), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1a8d0
testl %eax, %eax
je 0xb7bf5
addq $0x30, %rbx
cmpq %rbp, %rbx
jne 0xb7bb8
movq %r14, %rdi
movq %r15, %rsi
callq 0xb7c0a
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
jmp 0xb7bf7
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
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 r15, rsi
mov r14, rdi
mov rbx, [rdi]
mov rbp, [rdi+8]
cmp rbx, rbp
jz short loc_B7BDE
mov r12, [r15]
mov r13, [r15+8]
loc_B7BB8:
cmp [rbx+8], r13
jnz short loc_B7BD5
test r13, r13
jz short loc_B7BF5
mov rdi, [rbx]
mov rsi, r12
mov rdx, r13
call _bcmp
test eax, eax
jz short loc_B7BF5
loc_B7BD5:
add rbx, 30h ; '0'
cmp rbx, rbp
jnz short loc_B7BB8
loc_B7BDE:
mov rdi, r14
mov rsi, r15
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
jmp short loc_B7BF7
loc_B7BF5:
xor edx, edx
loc_B7BF7:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert(
_QWORD *a1,
long long *a2)
{
_QWORD *v2; // rbx
_QWORD *v3; // rbp
long long v4; // r12
long long v5; // r13
v2 = (_QWORD *)*a1;
v3 = (_QWORD *)a1[1];
if ( (_QWORD *)*a1 == v3 )
{
LABEL_7:
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;
}
else
{
v4 = *a2;
v5 = a2[1];
while ( v2[1] != v5 || v5 && (unsigned int)bcmp(*v2, v4) )
{
v2 += 6;
if ( v2 == v3 )
goto LABEL_7;
}
}
return (long long)v2;
}
|
insert:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV RBP,qword ptr [RDI + 0x8]
CMP RBX,RBP
JZ 0x001b7bde
MOV R12,qword ptr [R15]
MOV R13,qword ptr [R15 + 0x8]
LAB_001b7bb8:
CMP qword ptr [RBX + 0x8],R13
JNZ 0x001b7bd5
TEST R13,R13
JZ 0x001b7bf5
MOV RDI,qword ptr [RBX]
MOV RSI,R12
MOV RDX,R13
CALL 0x0011a8d0
TEST EAX,EAX
JZ 0x001b7bf5
LAB_001b7bd5:
ADD RBX,0x30
CMP RBX,RBP
JNZ 0x001b7bb8
LAB_001b7bde:
MOV RDI,R14
MOV RSI,R15
CALL 0x001b7c0a
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
JMP 0x001b7bf7
LAB_001b7bf5:
XOR EDX,EDX
LAB_001b7bf7:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::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 __n;
int iVar2;
int8 extraout_RDX;
int8 uVar3;
int8 *puVar4;
int1 auVar5 [16];
puVar4 = *(int8 **)this;
puVar1 = *(int8 **)(this + 8);
if (puVar4 != puVar1) {
__s2 = *(void **)param_1;
__n = *(size_t *)(param_1 + 8);
do {
if (puVar4[1] == __n) {
if (__n != 0) {
iVar2 = bcmp((void *)*puVar4,__s2,__n);
if (iVar2 != 0) goto LAB_001b7bd5;
}
uVar3 = 0;
goto LAB_001b7bf7;
}
LAB_001b7bd5:
puVar4 = puVar4 + 6;
} while (puVar4 != puVar1);
}
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);
puVar4 = (int8 *)(*(long *)(this + 8) + -0x30);
uVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_001b7bf7:
auVar5._8_8_ = uVar3;
auVar5._0_8_ = puVar4;
return auVar5;
}
|
|
18,706
|
lf_hash_insert
|
eloqsql/mysys/lf_hash.cc
|
int lf_hash_insert(LF_HASH *hash, LF_PINS *pins, const void *data)
{
int csize, bucket, hashnr;
LF_SLIST *node, **el;
node= (LF_SLIST *)lf_alloc_new(pins);
if (unlikely(!node))
return -1;
hash->initializer(hash, node + 1, data);
node->key= hash_key(hash, (uchar *)(node+1), &node->keylen);
hashnr= hash->hash_function(hash->charset, node->key, node->keylen) & INT_MAX32;
bucket= hashnr % hash->size;
el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, bucket);
if (unlikely(!el))
return -1;
if (*el == NULL && unlikely(initialize_bucket(hash, el, bucket, pins)))
return -1;
node->hashnr= my_reverse_bits(hashnr) | 1; /* normal node */
if (l_insert(el, hash->charset, node, pins, hash->flags))
{
lf_alloc_free(pins, node);
return 1;
}
csize= hash->size;
if ((my_atomic_add32(&hash->count, 1)+1.0) / csize > MAX_LOAD)
my_atomic_cas32(&hash->size, &csize, csize*2);
return 0;
}
|
O0
|
cpp
|
lf_hash_insert:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5bb80
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x5c7b1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5c97d
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x20, %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x20, %rsi
movq -0x38(%rbp), %rdx
addq $0x10, %rdx
callq 0x5c990
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xa8(%rcx), %rdi
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rsi
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rdx
callq *%rax
movl %eax, %eax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0xc0(%rcx), %ecx
cltd
idivl %ecx
movl %edx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x5bfd0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x5c868
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5c97d
movq -0x40(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x5c897
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl -0x28(%rbp), %edx
movq -0x18(%rbp), %rcx
callq 0x5ca10
cmpl $0x0, %eax
je 0x5c897
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5c97d
movl -0x2c(%rbp), %edi
callq 0x5cb90
movl %eax, %ecx
orl $0x1, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rsi
movq -0x38(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movl 0xbc(%rax), %r8d
callq 0x5cc10
cmpq $0x0, %rax
je 0x5c8f1
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x5b980
movl $0x1, -0x4(%rbp)
jmp 0x5c97d
movq -0x10(%rbp), %rax
movl 0xc0(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rcx
movl $0x1, -0x44(%rbp)
movl -0x44(%rbp), %eax
lock
xaddl %eax, 0xc4(%rcx)
movl %eax, -0x48(%rbp)
cvtsi2sdl -0x48(%rbp), %xmm0
movsd 0x5736c(%rip), %xmm1 # 0xb3c90
addsd %xmm1, %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd 0x57357(%rip), %xmm1 # 0xb3c90
ucomisd %xmm1, %xmm0
jbe 0x5c976
movq -0x10(%rbp), %rcx
movl -0x24(%rbp), %eax
addl %eax, %eax
movl %eax, -0x4c(%rbp)
movl -0x24(%rbp), %eax
movl -0x4c(%rbp), %edx
lock
cmpxchgl %edx, 0xc0(%rcx)
movl %eax, %ecx
sete %al
movb %al, -0x55(%rbp)
movl %ecx, -0x54(%rbp)
testb $0x1, %al
jne 0x5c96e
movl -0x54(%rbp), %eax
movl %eax, -0x24(%rbp)
movb -0x55(%rbp), %al
andb $0x1, %al
movb %al, -0x4d(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
lf_hash_insert:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_18]
call lf_alloc_new
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_5C7B1
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_5C97D
loc_5C7B1:
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
add rsi, 20h ; ' '
mov rdx, [rbp+var_20]
call rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
add rsi, 20h ; ' '
mov rdx, [rbp+var_38]
add rdx, 10h
call _ZL8hash_keyPK10st_lf_hashPKhPm; hash_key(st_lf_hash const*,uchar const*,ulong *)
mov rcx, rax
mov rax, [rbp+var_38]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov rax, [rax+0A0h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+0A8h]
mov rcx, [rbp+var_38]
mov rsi, [rcx+8]
mov rcx, [rbp+var_38]
mov rdx, [rcx+10h]
call rax
mov eax, eax
and rax, 7FFFFFFFh
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_10]
mov ecx, [rcx+0C0h]
cdq
idiv ecx
mov [rbp+var_28], edx
mov rdi, [rbp+var_10]
mov esi, [rbp+var_28]
call lf_dynarray_lvalue
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_5C868
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_5C97D
loc_5C868:
mov rax, [rbp+var_40]
cmp qword ptr [rax], 0
jnz short loc_5C897
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_40]
mov edx, [rbp+var_28]
mov rcx, [rbp+var_18]
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
cmp eax, 0
jz short loc_5C897
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_5C97D
loc_5C897:
mov edi, [rbp+var_2C]; unsigned int
call _ZL15my_reverse_bitsj; my_reverse_bits(uint)
mov ecx, eax
or ecx, 1
mov rax, [rbp+var_38]
mov [rax+18h], ecx
mov rdi, [rbp+var_40]
mov rax, [rbp+var_10]
mov rsi, [rax+0A8h]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov r8d, [rax+0BCh]
call _ZL8l_insertPP8LF_SLISTPK15charset_info_stS0_P7LF_PINSj; l_insert(LF_SLIST **,charset_info_st const*,LF_SLIST *,LF_PINS *,uint)
cmp rax, 0
jz short loc_5C8F1
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_38]
call lf_pinbox_free
mov [rbp+var_4], 1
jmp loc_5C97D
loc_5C8F1:
mov rax, [rbp+var_10]
mov eax, [rax+0C0h]
mov [rbp+var_24], eax
mov rcx, [rbp+var_10]
mov [rbp+var_44], 1
mov eax, [rbp+var_44]
lock xadd [rcx+0C4h], eax
mov [rbp+var_48], eax
cvtsi2sd xmm0, [rbp+var_48]
movsd xmm1, cs:qword_B3C90
addsd xmm0, xmm1
cvtsi2sd xmm1, [rbp+var_24]
divsd xmm0, xmm1
movsd xmm1, cs:qword_B3C90
ucomisd xmm0, xmm1
jbe short loc_5C976
mov rcx, [rbp+var_10]
mov eax, [rbp+var_24]
add eax, eax
mov [rbp+var_4C], eax
mov eax, [rbp+var_24]
mov edx, [rbp+var_4C]
lock cmpxchg [rcx+0C0h], edx
mov ecx, eax
setz al
mov [rbp+var_55], al
mov [rbp+var_54], ecx
test al, 1
jnz short loc_5C96E
mov eax, [rbp+var_54]
mov [rbp+var_24], eax
loc_5C96E:
mov al, [rbp+var_55]
and al, 1
mov [rbp+var_4D], al
loc_5C976:
mov [rbp+var_4], 0
loc_5C97D:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long lf_hash_insert(long long a1, long long a2, long long a3)
{
_QWORD *v4; // [rsp+20h] [rbp-40h]
long long v5; // [rsp+28h] [rbp-38h]
signed int v6; // [rsp+34h] [rbp-2Ch]
unsigned int v7; // [rsp+38h] [rbp-28h]
signed __int32 v8; // [rsp+3Ch] [rbp-24h]
v5 = lf_alloc_new(a2);
if ( v5 )
{
(*(void ( **)(long long, long long, long long))(a1 + 152))(a1, v5 + 32, a3);
*(_QWORD *)(v5 + 8) = hash_key(a1, v5 + 32, v5 + 16);
v6 = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(a1 + 160))(
*(_QWORD *)(a1 + 168),
*(_QWORD *)(v5 + 8),
*(_QWORD *)(v5 + 16)) & 0x7FFFFFFF;
v7 = v6 % *(_DWORD *)(a1 + 192);
v4 = (_QWORD *)lf_dynarray_lvalue(a1, v7);
if ( v4 )
{
if ( *v4 || !(unsigned int)initialize_bucket(a1, v4, v7, a2) )
{
*(_DWORD *)(v5 + 24) = my_reverse_bits(v6) | 1;
if ( l_insert(v4, *(_QWORD *)(a1 + 168), v5, a2, *(unsigned int *)(a1 + 188)) )
{
lf_pinbox_free(a2, v5);
return 1;
}
else
{
v8 = *(_DWORD *)(a1 + 192);
if ( ((double)_InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 196), 1u) + 1.0) / (double)v8 > 1.0 )
_InterlockedCompareExchange((volatile signed __int32 *)(a1 + 192), 2 * v8, v8);
return 0;
}
}
else
{
return (unsigned int)-1;
}
}
else
{
return (unsigned int)-1;
}
}
else
{
return (unsigned int)-1;
}
}
|
lf_hash_insert:
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 RDI,qword ptr [RBP + -0x18]
CALL 0x0015bb80
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0015c7b1
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015c97d
LAB_0015c7b1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
ADD RSI,0x20
MOV RDX,qword ptr [RBP + -0x20]
CALL RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
ADD RSI,0x20
MOV RDX,qword ptr [RBP + -0x38]
ADD RDX,0x10
CALL 0x0015c990
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xa0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0xa8]
MOV RCX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RCX + 0x10]
CALL RAX
MOV EAX,EAX
AND RAX,0x7fffffff
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0xc0]
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x28],EDX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x28]
CALL 0x0015bfd0
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0015c868
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015c97d
LAB_0015c868:
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RAX],0x0
JNZ 0x0015c897
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
CALL 0x0015ca10
CMP EAX,0x0
JZ 0x0015c897
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0015c97d
LAB_0015c897:
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x0015cb90
MOV ECX,EAX
OR ECX,0x1
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x18],ECX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0xa8]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RAX + 0xbc]
CALL 0x0015cc10
CMP RAX,0x0
JZ 0x0015c8f1
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0015b980
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015c97d
LAB_0015c8f1:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc0]
MOV dword ptr [RBP + -0x24],EAX
MOV RCX,qword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x44],0x1
MOV EAX,dword ptr [RBP + -0x44]
XADD.LOCK dword ptr [RCX + 0xc4],EAX
MOV dword ptr [RBP + -0x48],EAX
CVTSI2SD XMM0,dword ptr [RBP + -0x48]
MOVSD XMM1,qword ptr [0x001b3c90]
ADDSD XMM0,XMM1
CVTSI2SD XMM1,dword ptr [RBP + -0x24]
DIVSD XMM0,XMM1
MOVSD XMM1,qword ptr [0x001b3c90]
UCOMISD XMM0,XMM1
JBE 0x0015c976
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,EAX
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RBP + -0x4c]
CMPXCHG.LOCK dword ptr [RCX + 0xc0],EDX
MOV ECX,EAX
SETZ AL
MOV byte ptr [RBP + -0x55],AL
MOV dword ptr [RBP + -0x54],ECX
TEST AL,0x1
JNZ 0x0015c96e
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x24],EAX
LAB_0015c96e:
MOV AL,byte ptr [RBP + -0x55]
AND AL,0x1
MOV byte ptr [RBP + -0x4d],AL
LAB_0015c976:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015c97d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 lf_hash_insert(st_lf_hash *param_1,LF_PINS *param_2,int8 param_3)
{
st_lf_hash *psVar1;
int iVar2;
uint uVar3;
int iVar4;
LF_SLIST *pLVar5;
int8 uVar6;
LF_SLIST **ppLVar7;
long lVar8;
uint uVar9;
int4 local_c;
pLVar5 = (LF_SLIST *)lf_alloc_new(param_2);
if (pLVar5 == (LF_SLIST *)0x0) {
local_c = 0xffffffff;
}
else {
(**(code **)(param_1 + 0x98))(param_1,pLVar5 + 0x20,param_3);
uVar6 = hash_key(param_1,(uchar *)(pLVar5 + 0x20),(ulong *)(pLVar5 + 0x10));
*(int8 *)(pLVar5 + 8) = uVar6;
uVar3 = (**(code **)(param_1 + 0xa0))
(*(int8 *)(param_1 + 0xa8),*(int8 *)(pLVar5 + 8),
*(int8 *)(pLVar5 + 0x10));
uVar9 = (int)(uVar3 & 0x7fffffff) % *(int *)(param_1 + 0xc0);
ppLVar7 = (LF_SLIST **)lf_dynarray_lvalue(param_1,uVar9);
if (ppLVar7 == (LF_SLIST **)0x0) {
local_c = 0xffffffff;
}
else if ((*ppLVar7 == (LF_SLIST *)0x0) &&
(iVar4 = initialize_bucket(param_1,ppLVar7,uVar9,param_2), iVar4 != 0)) {
local_c = 0xffffffff;
}
else {
uVar3 = my_reverse_bits(uVar3 & 0x7fffffff);
*(uint *)(pLVar5 + 0x18) = uVar3 | 1;
lVar8 = l_insert(ppLVar7,*(charset_info_st **)(param_1 + 0xa8),pLVar5,param_2,
*(uint *)(param_1 + 0xbc));
if (lVar8 == 0) {
iVar2 = *(int *)(param_1 + 0xc0);
LOCK();
psVar1 = param_1 + 0xc4;
iVar4 = *(int *)psVar1;
*(int *)psVar1 = *(int *)psVar1 + 1;
UNLOCK();
if (DAT_001b3c90 < ((double)iVar4 + DAT_001b3c90) / (double)iVar2) {
LOCK();
if (iVar2 == *(int *)(param_1 + 0xc0)) {
*(int *)(param_1 + 0xc0) = iVar2 * 2;
}
UNLOCK();
}
local_c = 0;
}
else {
lf_pinbox_free(param_2,pLVar5);
local_c = 1;
}
}
}
return local_c;
}
|
|
18,707
|
my_strcasecmp_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static int
my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
my_tolower_utf8mb4(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t);
if (res <= 0)
return strcmp(s, t);
t+= res;
my_tolower_utf8mb4(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int) (uchar) s[0]) - ((int) (uchar) t[0]);
}
|
O0
|
c
|
my_strcasecmp_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0x70a21
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x70a2d
jmp 0x70b56
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x70a67
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2f8825(%rip), %rax # 0x369270
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x70ab4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x30(%rbp), %rsi
callq 0x70160
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jg 0x70a96
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x243e0
movl %eax, -0x4(%rbp)
jmp 0x70b69
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x70550
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x70aee
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2f879e(%rip), %rax # 0x369270
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x70b38
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x70160
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x70b1a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x243e0
movl %eax, -0x4(%rbp)
jmp 0x70b69
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x70550
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x70b51
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x70b69
jmp 0x70a00
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strcasecmp_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov [rbp+var_28], rax
loc_70A00:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_41], al
jz short loc_70A21
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_41], al
loc_70A21:
mov al, [rbp+var_41]
test al, 1
jnz short loc_70A2D
jmp loc_70B56
loc_70A2D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_70A67
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_70AB4
loc_70A67:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jg short loc_70A96
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp loc_70B69
loc_70A96:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb4
loc_70AB4:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_70AEE
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_70B38
loc_70AEE:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
lea rsi, [rbp+var_38]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_70B1A
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp short loc_70B69
loc_70B1A:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_38]
call my_tolower_utf8mb4
loc_70B38:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_70B51
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_70B69
loc_70B51:
jmp loc_70A00
loc_70B56:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_4], eax
loc_70B69:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
bool v4; // [rsp+Fh] [rbp-41h]
int v5; // [rsp+10h] [rbp-40h]
int v6; // [rsp+14h] [rbp-3Ch]
unsigned long long v7; // [rsp+18h] [rbp-38h] BYREF
unsigned long long v8; // [rsp+20h] [rbp-30h] BYREF
_QWORD *v9; // [rsp+28h] [rbp-28h]
unsigned __int8 *v10; // [rsp+30h] [rbp-20h]
unsigned __int8 *v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+40h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
v4 = 0;
if ( *v11 )
v4 = *v10 != 0;
if ( !v4 )
break;
if ( *v11 >= 0x80u )
{
v6 = my_mb_wc_utf8mb4_no_range(v12, &v8, v11);
if ( v6 <= 0 )
return (unsigned int)strcmp(v11, v10);
v11 += v6;
my_tolower_utf8mb4(v9, &v8);
}
else
{
v8 = my_unicase_default_page00[3 * *v11++ + 1];
}
if ( *v10 >= 0x80u )
{
v5 = my_mb_wc_utf8mb4_no_range(v12, &v7, v10);
if ( v5 <= 0 )
return (unsigned int)strcmp(v11, v10);
v10 += v5;
my_tolower_utf8mb4(v9, &v7);
}
else
{
v7 = my_unicase_default_page00[3 * *v10++ + 1];
}
if ( v8 != v7 )
return (unsigned int)(v8 - v7);
}
return (unsigned int)(*v11 - *v10);
}
|
my_strcasecmp_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x28],RAX
LAB_00170a00:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x00170a21
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_00170a21:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x00170a2d
JMP 0x00170b56
LAB_00170a2d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x00170a67
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x469270]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00170ab4
LAB_00170a67:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x30]
CALL 0x00170160
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JG 0x00170a96
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001243e0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00170b69
LAB_00170a96:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x00170550
LAB_00170ab4:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x00170aee
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x469270]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00170b38
LAB_00170aee:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x38]
CALL 0x00170160
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x00170b1a
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001243e0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00170b69
LAB_00170b1a:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x38]
CALL 0x00170550
LAB_00170b38:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x00170b51
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00170b69
LAB_00170b51:
JMP 0x00170a00
LAB_00170b56:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_00170b69:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3)
{
int iVar1;
bool bVar2;
ulong local_40;
ulong local_38;
int8 local_30;
byte *local_28;
byte *local_20;
long local_18;
local_30 = *(int8 *)(param_1 + 0x78);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
bVar2 = false;
if (*local_20 != 0) {
bVar2 = *local_28 != 0;
}
if (!bVar2) {
return (uint)*local_20 - (uint)*local_28;
}
if (*local_20 < 0x80) {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4);
local_20 = local_20 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_38,local_20);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_20 = local_20 + iVar1;
my_tolower_utf8mb4(local_30,&local_38);
}
if (*local_28 < 0x80) {
local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4);
local_28 = local_28 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_40,local_28);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_28 = local_28 + iVar1;
my_tolower_utf8mb4(local_30,&local_40);
}
} while (local_38 == local_40);
return (int)local_38 - (int)local_40;
}
|
|
18,708
|
my_uca_context_weight_find
|
eloqsql/strings/ctype-uca.c
|
static inline const MY_CONTRACTION *
my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc,
size_t max_char_length)
{
const MY_CONTRACTION *cnt;
DBUG_ASSERT(scanner->level->contractions.nitems);
/*
If we have scanned a character which can have previous context,
and there were some more characters already before,
then reconstruct codepoint of the previous character
from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
together form a real previous context pair.
Note, we support only 2-character long sequences with previous
context at the moment. CLDR does not have longer sequences.
*/
if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
wc[0]) &&
scanner->wbeg != nochar && /* if not the very first character */
my_uca_can_be_previous_context_head(&scanner->level->contractions,
(wc[1]= ((scanner->page << 8) +
scanner->code))) &&
(cnt= my_uca_previous_context_find(scanner, wc[1], wc[0])))
{
scanner->page= scanner->code= 0; /* Clear for the next character */
return cnt;
}
else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
wc[0]))
{
/* Check if w[0] starts a contraction */
if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length)))
return cnt;
}
return NULL;
}
|
O0
|
c
|
my_uca_context_weight_find:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x59d26
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x59ed0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x59dd1
movq -0x10(%rbp), %rax
leaq 0x160c4b(%rip), %rcx # 0x1ba9a0
cmpq %rcx, (%rax)
je 0x59dd1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
addl 0x28(%rcx), %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rax
movq %rsi, 0x8(%rax)
callq 0x59f00
movsbl %al, %eax
cmpl $0x0, %eax
je 0x59dd1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0x59f30
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x59dd1
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x59e1e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x51340
cmpb $0x0, %al
je 0x59e14
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x59fe0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x59e12
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x59e1e
jmp 0x59e14
jmp 0x59e16
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_uca_context_weight_find:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_59D26:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_previous_context_tail
movsx eax, al
cmp eax, 0
jz loc_59DD1
mov rax, [rbp+var_10]
lea rcx, nochar
cmp [rax], rcx
jz short loc_59DD1
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_10]
mov eax, [rax+24h]
shl eax, 8
mov rcx, [rbp+var_10]
add eax, [rcx+28h]
movsxd rsi, eax
mov rax, [rbp+var_18]
mov [rax+8], rsi
call my_uca_can_be_previous_context_head
movsx eax, al
cmp eax, 0
jz short loc_59DD1
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
mov rax, [rbp+var_18]
mov rdx, [rax]
call my_uca_previous_context_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_59DD1
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+24h], 0
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_59E1E
loc_59DD1:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_contraction_head
cmp al, 0
jz short loc_59E14
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_uca_scanner_contraction_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_59E12
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_59E1E
loc_59E12:
jmp short $+2
loc_59E14:
jmp short $+2
loc_59E16:
mov [rbp+var_8], 0
loc_59E1E:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long my_uca_context_weight_find(long long a1, _QWORD *a2, long long a3)
{
long long v3; // rdi
long long v5; // [rsp+8h] [rbp-28h]
long long v6; // [rsp+8h] [rbp-28h]
if ( (unsigned __int8)my_uca_can_be_previous_context_tail(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& *(_UNKNOWN **)a1 != &nochar
&& (v3 = *(_QWORD *)(a1 + 24) + 24LL,
a2[1] = *(_DWORD *)(a1 + 40) + (*(_DWORD *)(a1 + 36) << 8),
(unsigned __int8)my_uca_can_be_previous_context_head(v3))
&& (v5 = my_uca_previous_context_find(a1, a2[1], *a2)) != 0 )
{
*(_DWORD *)(a1 + 40) = 0;
*(_DWORD *)(a1 + 36) = 0;
return v5;
}
else if ( (unsigned __int8)my_uca_can_be_contraction_head(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& (v6 = my_uca_scanner_contraction_find(a1, a2, a3)) != 0 )
{
return v6;
}
else
{
return 0LL;
}
}
|
my_uca_context_weight_find:
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
JMP 0x00159d26
LAB_00159d26:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
CALL 0x00159ed0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00159dd1
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2ba9a0]
CMP qword ptr [RAX],RCX
JZ 0x00159dd1
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x24]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x28]
MOVSXD RSI,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RSI
CALL 0x00159f00
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00159dd1
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX]
CALL 0x00159f30
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x00159dd1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00159e1e
LAB_00159dd1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
CALL 0x00151340
CMP AL,0x0
JZ 0x00159e14
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00159fe0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x00159e12
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00159e1e
LAB_00159e12:
JMP 0x00159e14
LAB_00159e14:
JMP 0x00159e16
LAB_00159e16:
MOV qword ptr [RBP + -0x8],0x0
LAB_00159e1e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long my_uca_context_weight_find(int8 *param_1,int8 *param_2,int8 param_3)
{
char cVar1;
long lVar2;
long local_10;
cVar1 = my_uca_can_be_previous_context_tail(param_1[3] + 0x18,*param_2);
if ((cVar1 != '\0') && ((int4 *)*param_1 != &nochar)) {
lVar2 = param_1[3];
param_2[1] = (long)(*(int *)((long)param_1 + 0x24) * 0x100 + *(int *)(param_1 + 5));
cVar1 = my_uca_can_be_previous_context_head(lVar2 + 0x18);
if ((cVar1 != '\0') &&
(lVar2 = my_uca_previous_context_find(param_1,param_2[1],*param_2), lVar2 != 0)) {
*(int4 *)(param_1 + 5) = 0;
*(int4 *)((long)param_1 + 0x24) = 0;
return lVar2;
}
}
cVar1 = my_uca_can_be_contraction_head(param_1[3] + 0x18,*param_2);
if ((cVar1 == '\0') ||
(local_10 = my_uca_scanner_contraction_find(param_1,param_2,param_3), local_10 == 0)) {
local_10 = 0;
}
return local_10;
}
|
|
18,709
|
my_uca_context_weight_find
|
eloqsql/strings/ctype-uca.c
|
static inline const MY_CONTRACTION *
my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc,
size_t max_char_length)
{
const MY_CONTRACTION *cnt;
DBUG_ASSERT(scanner->level->contractions.nitems);
/*
If we have scanned a character which can have previous context,
and there were some more characters already before,
then reconstruct codepoint of the previous character
from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
together form a real previous context pair.
Note, we support only 2-character long sequences with previous
context at the moment. CLDR does not have longer sequences.
*/
if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
wc[0]) &&
scanner->wbeg != nochar && /* if not the very first character */
my_uca_can_be_previous_context_head(&scanner->level->contractions,
(wc[1]= ((scanner->page << 8) +
scanner->code))) &&
(cnt= my_uca_previous_context_find(scanner, wc[1], wc[0])))
{
scanner->page= scanner->code= 0; /* Clear for the next character */
return cnt;
}
else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
wc[0]))
{
/* Check if w[0] starts a contraction */
if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length)))
return cnt;
}
return NULL;
}
|
O3
|
c
|
my_uca_context_weight_find:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq 0x18(%rdi), %rcx
movq (%rsi), %rdx
movq 0x28(%rcx), %rsi
movl %edx, %eax
andl $0xfff, %eax # imm = 0xFFF
cmpb $0x0, (%rsi,%rax)
js 0x45db4
movq 0x28(%rcx), %rcx
testb $0x1, (%rcx,%rax)
je 0x45f00
movq %rdi, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
cmpq $0x2, -0x30(%rbp)
jb 0x45f00
movq -0x40(%rbp), %r13
movq 0x8(%r13), %r12
movb $0x4, %r15b
movl $0x1, %edx
movl $0x8, %ebx
movq %rdx, -0x38(%rbp)
movq 0x10(%r13), %rcx
movq 0x30(%r13), %rdi
movq 0xb8(%rdi), %rax
leaq (%r14,%rbx), %rsi
movq %r12, %rdx
callq *0x28(%rax)
testl %eax, %eax
jle 0x45e34
movl %eax, %eax
addq %rax, %r12
movq -0x38(%rbp), %rdx
movq %r12, -0x80(%rbp,%rdx,8)
movq 0x18(%r13), %rcx
movq (%r14,%rdx,8), %rax
movq 0x28(%rcx), %rsi
andl $0xfff, %eax # imm = 0xFFF
testb %r15b, (%rsi,%rax)
je 0x45e50
incq %rdx
addb %r15b, %r15b
addq $0x8, %rbx
cmpq %rdx, -0x30(%rbp)
jne 0x45d4d
movq -0x30(%rbp), %rdx
jmp 0x45e38
leaq 0x213b95(%rip), %rsi # 0x259950
cmpq %rsi, (%rdi)
je 0x45d0c
movl 0x24(%rdi), %esi
shll $0x8, %esi
movslq 0x28(%rdi), %r8
movslq %esi, %rsi
addq %r8, %rsi
movq %rsi, 0x8(%r14)
movq 0x28(%rcx), %rcx
movl %esi, %r8d
andl $0xfff, %r8d # imm = 0xFFF
testb $0x40, (%rcx,%r8)
movq 0x18(%rdi), %rcx
je 0x45d0c
movq 0x18(%rcx), %r8
testq %r8, %r8
jle 0x45d0c
movq 0x20(%rcx), %r12
imulq $0x58, %r8, %r8
addq %r12, %r8
cmpb $0x0, 0x52(%r12)
je 0x45e26
cmpq %rsi, (%r12)
jne 0x45e26
cmpq %rdx, 0x8(%r12)
je 0x45f2c
addq $0x58, %r12
cmpq %r8, %r12
jb 0x45e0d
jmp 0x45d0c
movq -0x38(%rbp), %rdx
cmpq $0x2, %rdx
jb 0x45f00
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rcx
movq 0x28(%rcx), %rsi
jmp 0x45e53
incq %rdx
leaq (,%rdx,8), %rdi
movq %rsi, -0x48(%rbp)
movq %rdx, %r8
decq %rdx
movq -0x8(%r14,%r8,8), %rax
andl $0xfff, %eax # imm = 0xFFF
testb $0x2, (%rsi,%rax)
je 0x45eee
movq 0x18(%rcx), %rax
testq %rax, %rax
jle 0x45eee
movq 0x20(%rcx), %r12
imulq $0x58, %rax, %rax
addq %r12, %rax
leaq (,%r8,8), %rsi
movq %rsi, -0x50(%rbp)
movq %rdi, -0x38(%rbp)
movq %rax, -0x30(%rbp)
cmpq $0x5, %r8
ja 0x45eaa
cmpq $0x0, (%r12,%rdi)
jne 0x45ee5
cmpb $0x0, 0x52(%r12)
jne 0x45ee5
movq %r12, %rdi
movq %r14, %rsi
movq %rdx, %r15
movq -0x50(%rbp), %rdx
movq %r14, %r13
movq %rcx, %rbx
movq %r8, %r14
callq 0x24300
movq %r14, %r8
movq -0x38(%rbp), %rdi
movq %rbx, %rcx
movq %r15, %rdx
movq %r13, %r14
testl %eax, %eax
movq -0x30(%rbp), %rax
je 0x45f15
addq $0x58, %r12
cmpq %rax, %r12
jb 0x45e9d
addq $-0x8, %rdi
cmpq $0x1, %rdx
movq -0x48(%rbp), %rsi
ja 0x45e5f
xorl %r12d, %r12d
movq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32(%r12), %rax
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
movq -0x80(%rbp,%rdx,8), %rax
movq %rax, 0x8(%rcx)
jmp 0x45f03
leaq 0x32(%r12), %rax
movq %rax, (%rdi)
movq $0x0, 0x24(%rdi)
jmp 0x45f03
|
my_uca_context_weight_find:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], rdx
mov r14, rsi
mov rcx, [rdi+18h]
mov rdx, [rsi]
mov rsi, [rcx+28h]
mov eax, edx
and eax, 0FFFh
cmp byte ptr [rsi+rax], 0
js loc_45DB4
loc_45D0C:
mov rcx, [rcx+28h]
test byte ptr [rcx+rax], 1
jz loc_45F00
mov [rbp+var_40], rdi
xorps xmm0, xmm0
movaps [rbp+var_60], xmm0
movaps [rbp+var_70], xmm0
movaps [rbp+var_80], xmm0
cmp [rbp+var_30], 2
jb loc_45F00
mov r13, [rbp+var_40]
mov r12, [r13+8]
mov r15b, 4
mov edx, 1
mov ebx, 8
loc_45D4D:
mov [rbp+var_38], rdx
mov rcx, [r13+10h]
mov rdi, [r13+30h]
mov rax, [rdi+0B8h]
lea rsi, [r14+rbx]
mov rdx, r12
call qword ptr [rax+28h]
test eax, eax
jle loc_45E34
mov eax, eax
add r12, rax
mov rdx, [rbp+var_38]
mov qword ptr [rbp+rdx*8+var_80], r12
mov rcx, [r13+18h]
mov rax, [r14+rdx*8]
mov rsi, [rcx+28h]
and eax, 0FFFh
test [rsi+rax], r15b
jz loc_45E50
inc rdx
add r15b, r15b
add rbx, 8
cmp [rbp+var_30], rdx
jnz short loc_45D4D
mov rdx, [rbp+var_30]
jmp loc_45E38
loc_45DB4:
lea rsi, nochar
cmp [rdi], rsi
jz loc_45D0C
mov esi, [rdi+24h]
shl esi, 8
movsxd r8, dword ptr [rdi+28h]
movsxd rsi, esi
add rsi, r8
mov [r14+8], rsi
mov rcx, [rcx+28h]
mov r8d, esi
and r8d, 0FFFh
test byte ptr [rcx+r8], 40h
mov rcx, [rdi+18h]
jz loc_45D0C
mov r8, [rcx+18h]
test r8, r8
jle loc_45D0C
mov r12, [rcx+20h]
imul r8, 58h ; 'X'
add r8, r12
loc_45E0D:
cmp byte ptr [r12+52h], 0
jz short loc_45E26
cmp [r12], rsi
jnz short loc_45E26
cmp [r12+8], rdx
jz loc_45F2C
loc_45E26:
add r12, 58h ; 'X'
cmp r12, r8
jb short loc_45E0D
jmp loc_45D0C
loc_45E34:
mov rdx, [rbp+var_38]
loc_45E38:
cmp rdx, 2
jb loc_45F00
mov rax, [rbp+var_40]
mov rcx, [rax+18h]
mov rsi, [rcx+28h]
jmp short loc_45E53
loc_45E50:
inc rdx
loc_45E53:
lea rdi, ds:0[rdx*8]
mov [rbp+var_48], rsi
loc_45E5F:
mov r8, rdx
dec rdx
mov rax, [r14+r8*8-8]
and eax, 0FFFh
test byte ptr [rsi+rax], 2
jz short loc_45EEE
mov rax, [rcx+18h]
test rax, rax
jle short loc_45EEE
mov r12, [rcx+20h]
imul rax, 58h ; 'X'
add rax, r12
lea rsi, ds:0[r8*8]
mov [rbp+var_50], rsi
mov [rbp+var_38], rdi
mov [rbp+var_30], rax
loc_45E9D:
cmp r8, 5
ja short loc_45EAA
cmp qword ptr [r12+rdi], 0
jnz short loc_45EE5
loc_45EAA:
cmp byte ptr [r12+52h], 0
jnz short loc_45EE5
mov rdi, r12
mov rsi, r14
mov r15, rdx
mov rdx, [rbp+var_50]
mov r13, r14
mov rbx, rcx
mov r14, r8
call _bcmp
mov r8, r14
mov rdi, [rbp+var_38]
mov rcx, rbx
mov rdx, r15
mov r14, r13
test eax, eax
mov rax, [rbp+var_30]
jz short loc_45F15
loc_45EE5:
add r12, 58h ; 'X'
cmp r12, rax
jb short loc_45E9D
loc_45EEE:
add rdi, 0FFFFFFFFFFFFFFF8h
cmp rdx, 1
mov rsi, [rbp+var_48]
ja loc_45E5F
loc_45F00:
xor r12d, r12d
loc_45F03:
mov rax, r12
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_45F15:
lea rax, [r12+32h]
mov rcx, [rbp+var_40]
mov [rcx], rax
mov rax, qword ptr [rbp+rdx*8+var_80]
mov [rcx+8], rax
jmp short loc_45F03
loc_45F2C:
lea rax, [r12+32h]
mov [rdi], rax
mov qword ptr [rdi+24h], 0
jmp short loc_45F03
|
unsigned long long my_uca_context_weight_find(
long long a1,
_QWORD *a2,
unsigned long long a3,
long long a4,
long long a5,
long long a6)
{
_QWORD *v6; // r14
_QWORD *v7; // rcx
long long v8; // rdx
long long v9; // rax
_QWORD *v10; // r13
long long v11; // r12
char v12; // r15
long long v13; // rdx
long long v14; // rbx
int v15; // eax
long long v16; // rdx
_QWORD *v17; // rcx
long long v18; // rsi
unsigned long long v19; // rdx
long long v20; // rsi
bool v21; // zf
unsigned long long v22; // r12
long long v23; // rdi
unsigned long long v24; // r8
long long v25; // rax
unsigned long long v26; // rax
_QWORD *v27; // rsi
unsigned long long v28; // r15
_QWORD *v29; // r13
_QWORD *v30; // rbx
unsigned long long v31; // r14
int v32; // eax
_QWORD *v34; // rcx
__int128 v35; // [rsp+0h] [rbp-80h]
__int128 v36; // [rsp+10h] [rbp-70h]
__int128 v37; // [rsp+20h] [rbp-60h]
long long v38; // [rsp+30h] [rbp-50h]
long long v39; // [rsp+38h] [rbp-48h]
_QWORD *v40; // [rsp+40h] [rbp-40h]
long long v41; // [rsp+48h] [rbp-38h]
unsigned long long v42; // [rsp+50h] [rbp-30h]
v42 = a3;
v6 = a2;
v7 = *(_QWORD **)(a1 + 24);
v8 = *a2;
v9 = *a2 & 0xFFFLL;
if ( *(char *)(v7[5] + v9) >= 0
|| *(_UNKNOWN **)a1 == &nochar
|| (v20 = *(int *)(a1 + 40) + (long long)(int)(*(_DWORD *)(a1 + 36) << 8),
v6[1] = v20,
a5 = v20 & 0xFFF,
v21 = (*(_BYTE *)(v7[5] + a5) & 0x40) == 0,
v7 = *(_QWORD **)(a1 + 24),
v21)
|| (a5 = v7[3], a5 <= 0) )
{
LABEL_2:
if ( (*(_BYTE *)(v7[5] + v9) & 1) != 0 && (v40 = (_QWORD *)a1, v37 = 0LL, v36 = 0LL, v35 = 0LL, v42 >= 2) )
{
v10 = v40;
v11 = v40[1];
v12 = 4;
v13 = 1LL;
v14 = 1LL;
while ( 1 )
{
v41 = v13;
v15 = (*(long long ( **)(_QWORD, _QWORD *, long long, _QWORD, long long, long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(v10[6] + 184LL) + 40LL))(
v10[6],
&v6[v14],
v11,
v10[2],
a5,
a6,
v35,
*((_QWORD *)&v35 + 1),
v36,
*((_QWORD *)&v36 + 1),
v37,
*((_QWORD *)&v37 + 1));
if ( v15 <= 0 )
break;
v11 += (unsigned int)v15;
v16 = v41;
*((_QWORD *)&v35 + v41) = v11;
v17 = (_QWORD *)v10[3];
v18 = v17[5];
if ( ((unsigned __int8)v12 & *(_BYTE *)(v18 + (v6[v16] & 0xFFFLL))) == 0 )
{
v19 = v16 + 1;
goto LABEL_22;
}
v13 = v16 + 1;
v12 *= 2;
++v14;
if ( v42 == v13 )
{
v19 = v42;
goto LABEL_19;
}
}
v19 = v41;
LABEL_19:
if ( v19 < 2 )
return 0LL;
v17 = (_QWORD *)v40[3];
v18 = v17[5];
LABEL_22:
v23 = 8 * v19;
v39 = v18;
while ( 1 )
{
v24 = v19--;
if ( (*(_BYTE *)(v18 + (v6[v24 - 1] & 0xFFFLL)) & 2) != 0 )
{
v25 = v17[3];
if ( v25 > 0 )
break;
}
LABEL_31:
v23 -= 8LL;
v18 = v39;
if ( v19 <= 1 )
return 0LL;
}
v22 = v17[4];
v26 = v22 + 88 * v25;
v38 = 8 * v24;
v41 = v23;
v42 = v26;
while ( 1 )
{
if ( (v24 > 5 || !*(_QWORD *)(v22 + v23)) && !*(_BYTE *)(v22 + 82) )
{
v27 = v6;
v28 = v19;
v29 = v6;
v30 = v17;
v31 = v24;
v32 = bcmp(v22, v27, v38);
v24 = v31;
v23 = v41;
v17 = v30;
v19 = v28;
v6 = v29;
v21 = v32 == 0;
v26 = v42;
if ( v21 )
break;
}
v22 += 88LL;
if ( v22 >= v26 )
goto LABEL_31;
}
v34 = v40;
*v40 = v22 + 50;
v34[1] = *((_QWORD *)&v35 + v28);
}
else
{
return 0LL;
}
}
else
{
v22 = v7[4];
a5 = v22 + 88 * a5;
while ( !*(_BYTE *)(v22 + 82) || *(_QWORD *)v22 != v20 || *(_QWORD *)(v22 + 8) != v8 )
{
v22 += 88LL;
if ( v22 >= a5 )
goto LABEL_2;
}
*(_QWORD *)a1 = v22 + 50;
*(_QWORD *)(a1 + 36) = 0LL;
}
return v22;
}
|
my_uca_context_weight_find:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x30],RDX
MOV R14,RSI
MOV RCX,qword ptr [RDI + 0x18]
MOV RDX,qword ptr [RSI]
MOV RSI,qword ptr [RCX + 0x28]
MOV EAX,EDX
AND EAX,0xfff
CMP byte ptr [RSI + RAX*0x1],0x0
JS 0x00145db4
LAB_00145d0c:
MOV RCX,qword ptr [RCX + 0x28]
TEST byte ptr [RCX + RAX*0x1],0x1
JZ 0x00145f00
MOV qword ptr [RBP + -0x40],RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVAPS xmmword ptr [RBP + -0x80],XMM0
CMP qword ptr [RBP + -0x30],0x2
JC 0x00145f00
MOV R13,qword ptr [RBP + -0x40]
MOV R12,qword ptr [R13 + 0x8]
MOV R15B,0x4
MOV EDX,0x1
MOV EBX,0x8
LAB_00145d4d:
MOV qword ptr [RBP + -0x38],RDX
MOV RCX,qword ptr [R13 + 0x10]
MOV RDI,qword ptr [R13 + 0x30]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RSI,[R14 + RBX*0x1]
MOV RDX,R12
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x00145e34
MOV EAX,EAX
ADD R12,RAX
MOV RDX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + RDX*0x8 + -0x80],R12
MOV RCX,qword ptr [R13 + 0x18]
MOV RAX,qword ptr [R14 + RDX*0x8]
MOV RSI,qword ptr [RCX + 0x28]
AND EAX,0xfff
TEST byte ptr [RSI + RAX*0x1],R15B
JZ 0x00145e50
INC RDX
ADD R15B,R15B
ADD RBX,0x8
CMP qword ptr [RBP + -0x30],RDX
JNZ 0x00145d4d
MOV RDX,qword ptr [RBP + -0x30]
JMP 0x00145e38
LAB_00145db4:
LEA RSI,[0x359950]
CMP qword ptr [RDI],RSI
JZ 0x00145d0c
MOV ESI,dword ptr [RDI + 0x24]
SHL ESI,0x8
MOVSXD R8,dword ptr [RDI + 0x28]
MOVSXD RSI,ESI
ADD RSI,R8
MOV qword ptr [R14 + 0x8],RSI
MOV RCX,qword ptr [RCX + 0x28]
MOV R8D,ESI
AND R8D,0xfff
TEST byte ptr [RCX + R8*0x1],0x40
MOV RCX,qword ptr [RDI + 0x18]
JZ 0x00145d0c
MOV R8,qword ptr [RCX + 0x18]
TEST R8,R8
JLE 0x00145d0c
MOV R12,qword ptr [RCX + 0x20]
IMUL R8,R8,0x58
ADD R8,R12
LAB_00145e0d:
CMP byte ptr [R12 + 0x52],0x0
JZ 0x00145e26
CMP qword ptr [R12],RSI
JNZ 0x00145e26
CMP qword ptr [R12 + 0x8],RDX
JZ 0x00145f2c
LAB_00145e26:
ADD R12,0x58
CMP R12,R8
JC 0x00145e0d
JMP 0x00145d0c
LAB_00145e34:
MOV RDX,qword ptr [RBP + -0x38]
LAB_00145e38:
CMP RDX,0x2
JC 0x00145f00
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RCX + 0x28]
JMP 0x00145e53
LAB_00145e50:
INC RDX
LAB_00145e53:
LEA RDI,[RDX*0x8]
MOV qword ptr [RBP + -0x48],RSI
LAB_00145e5f:
MOV R8,RDX
DEC RDX
MOV RAX,qword ptr [R14 + R8*0x8 + -0x8]
AND EAX,0xfff
TEST byte ptr [RSI + RAX*0x1],0x2
JZ 0x00145eee
MOV RAX,qword ptr [RCX + 0x18]
TEST RAX,RAX
JLE 0x00145eee
MOV R12,qword ptr [RCX + 0x20]
IMUL RAX,RAX,0x58
ADD RAX,R12
LEA RSI,[R8*0x8]
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x30],RAX
LAB_00145e9d:
CMP R8,0x5
JA 0x00145eaa
CMP qword ptr [R12 + RDI*0x1],0x0
JNZ 0x00145ee5
LAB_00145eaa:
CMP byte ptr [R12 + 0x52],0x0
JNZ 0x00145ee5
MOV RDI,R12
MOV RSI,R14
MOV R15,RDX
MOV RDX,qword ptr [RBP + -0x50]
MOV R13,R14
MOV RBX,RCX
MOV R14,R8
CALL 0x00124300
MOV R8,R14
MOV RDI,qword ptr [RBP + -0x38]
MOV RCX,RBX
MOV RDX,R15
MOV R14,R13
TEST EAX,EAX
MOV RAX,qword ptr [RBP + -0x30]
JZ 0x00145f15
LAB_00145ee5:
ADD R12,0x58
CMP R12,RAX
JC 0x00145e9d
LAB_00145eee:
ADD RDI,-0x8
CMP RDX,0x1
MOV RSI,qword ptr [RBP + -0x48]
JA 0x00145e5f
LAB_00145f00:
XOR R12D,R12D
LAB_00145f03:
MOV RAX,R12
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00145f15:
LEA RAX,[R12 + 0x32]
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [RBP + RDX*0x8 + -0x80]
MOV qword ptr [RCX + 0x8],RAX
JMP 0x00145f03
LAB_00145f2c:
LEA RAX,[R12 + 0x32]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x24],0x0
JMP 0x00145f03
|
long * my_uca_context_weight_find(long *param_1,long *param_2,ulong param_3)
{
uint uVar1;
int iVar2;
long *plVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
long lVar9;
long *plVar10;
byte bVar11;
long local_88 [7];
long local_50;
long *local_48;
ulong local_40;
long *local_38;
lVar9 = param_1[3];
uVar5 = (ulong)((uint)*param_2 & 0xfff);
if ((*(char *)(*(long *)(lVar9 + 0x28) + uVar5) < '\0') && ((int4 *)*param_1 != &nochar)) {
lVar8 = (long)(*(int *)((long)param_1 + 0x24) << 8) + (long)(int)param_1[5];
param_2[1] = lVar8;
plVar10 = (long *)(lVar9 + 0x28);
lVar9 = param_1[3];
if (((*(byte *)(*plVar10 + (ulong)((uint)lVar8 & 0xfff)) & 0x40) != 0) &&
(0 < *(long *)(lVar9 + 0x18))) {
plVar10 = *(long **)(lVar9 + 0x20);
plVar3 = plVar10 + *(long *)(lVar9 + 0x18) * 0xb;
do {
if (((*(char *)((long)plVar10 + 0x52) != '\0') && (*plVar10 == lVar8)) &&
(plVar10[1] == *param_2)) {
*param_1 = (long)plVar10 + 0x32;
*(int8 *)((long)param_1 + 0x24) = 0;
return plVar10;
}
plVar10 = plVar10 + 0xb;
} while (plVar10 < plVar3);
}
}
if ((*(byte *)(*(long *)(lVar9 + 0x28) + uVar5) & 1) != 0) {
local_88[4] = 0;
local_88[5] = 0;
local_88[2] = 0;
local_88[3] = 0;
local_88[0] = 0;
local_88[1] = 0;
if (1 < param_3) {
lVar9 = param_1[1];
bVar11 = 4;
uVar5 = 1;
lVar8 = 8;
local_48 = param_1;
local_38 = (long *)param_3;
do {
local_40 = uVar5;
uVar1 = (**(code **)(*(long *)(param_1[6] + 0xb8) + 0x28))
(param_1[6],(long)param_2 + lVar8,lVar9,param_1[2]);
if ((int)uVar1 < 1) break;
lVar9 = lVar9 + (ulong)uVar1;
local_88[local_40] = lVar9;
lVar4 = param_1[3];
local_50 = *(long *)(lVar4 + 0x28);
if ((*(byte *)(local_50 + (ulong)((uint)param_2[local_40] & 0xfff)) & bVar11) == 0) {
local_40 = local_40 + 1;
goto LAB_00145e53;
}
uVar5 = local_40 + 1;
bVar11 = bVar11 * '\x02';
lVar8 = lVar8 + 8;
local_40 = (ulong)local_38;
} while (local_38 != (long *)uVar5);
if (1 < local_40) {
lVar4 = local_48[3];
local_50 = *(long *)(lVar4 + 0x28);
LAB_00145e53:
uVar5 = local_40 * 8;
uVar6 = local_40;
do {
uVar7 = uVar6 - 1;
if (((*(byte *)(local_50 + (ulong)((uint)param_2[uVar6 - 1] & 0xfff)) & 2) != 0) &&
(0 < *(long *)(lVar4 + 0x18))) {
plVar10 = *(long **)(lVar4 + 0x20);
plVar3 = plVar10 + *(long *)(lVar4 + 0x18) * 0xb;
local_88[6] = uVar6 * 8;
local_40 = uVar5;
local_38 = plVar3;
do {
if (((5 < uVar6) || (*(long *)((long)plVar10 + uVar5) == 0)) &&
((*(char *)((long)plVar10 + 0x52) == '\0' &&
(iVar2 = bcmp(plVar10,param_2,local_88[6]), plVar3 = local_38, uVar5 = local_40,
iVar2 == 0)))) {
*local_48 = (long)plVar10 + 0x32;
local_48[1] = local_88[uVar7];
return plVar10;
}
plVar10 = plVar10 + 0xb;
} while (plVar10 < plVar3);
}
uVar5 = uVar5 + -8;
uVar6 = uVar7;
} while (1 < uVar7);
}
}
}
return (long *)0x0;
}
|
|
18,710
|
my_strnxfrm_simple_internal
|
eloqsql/strings/ctype-simple.c
|
size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs,
uchar *dst, size_t dstlen, uint *nweights,
const uchar *src, size_t srclen)
{
const uchar *map= cs->sort_order;
uchar *d0= dst;
uint frmlen;
if ((frmlen= (uint)MY_MIN(dstlen, *nweights)) > srclen)
frmlen= (uint)srclen;
if (dst != src)
{
const uchar *end;
for (end= src + frmlen; src < end;)
*dst++= map[*src++];
}
else
{
const uchar *end;
for (end= dst + frmlen; dst < end; dst++)
*dst= map[(uchar) *dst];
}
*nweights-= frmlen;
return dst - d0;
}
|
O0
|
c
|
my_strnxfrm_simple_internal:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jae 0x44b79
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x44b83
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl %eax, -0x44(%rbp)
movl %eax, %eax
cmpq -0x30(%rbp), %rax
jbe 0x44b99
movq -0x30(%rbp), %rax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x44be9
movq -0x28(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x44be7
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x44bb1
jmp 0x44c25
movq -0x10(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x44c23
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x44bf7
jmp 0x44c25
movl -0x44(%rbp), %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nop
|
my_strnxfrm_simple_internal:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_20]
mov ecx, [rcx]
cmp rax, rcx
jnb short loc_44B79
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
jmp short loc_44B83
loc_44B79:
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_60], rax
loc_44B83:
mov rax, [rbp+var_60]
mov [rbp+var_44], eax
mov eax, eax
cmp rax, [rbp+var_30]
jbe short loc_44B99
mov rax, [rbp+var_30]
mov [rbp+var_44], eax
loc_44B99:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_28]
jz short loc_44BE9
mov rax, [rbp+var_28]
mov ecx, [rbp+var_44]
add rax, rcx
mov [rbp+var_50], rax
loc_44BB1:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_50]
jnb short loc_44BE7
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_44BB1
loc_44BE7:
jmp short loc_44C25
loc_44BE9:
mov rax, [rbp+var_10]
mov ecx, [rbp+var_44]
add rax, rcx
mov [rbp+var_58], rax
loc_44BF7:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_58]
jnb short loc_44C23
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_44BF7
loc_44C23:
jmp short $+2
loc_44C25:
mov edx, [rbp+var_44]
mov rax, [rbp+var_20]
mov ecx, [rax]
sub ecx, edx
mov [rax], ecx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_40]
sub rax, rcx
pop rbp
retn
|
_BYTE * my_strnxfrm_simple_internal(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned int *a4,
unsigned __int8 *a5,
unsigned long long a6)
{
unsigned __int8 *v6; // rcx
unsigned __int8 *v7; // rax
unsigned int v9; // [rsp+0h] [rbp-60h]
int v10; // [rsp+1Ch] [rbp-44h]
long long v11; // [rsp+28h] [rbp-38h]
unsigned __int8 *v12; // [rsp+38h] [rbp-28h]
unsigned __int8 *v14; // [rsp+50h] [rbp-10h]
v14 = a2;
v12 = a5;
v11 = *(_QWORD *)(a1 + 88);
if ( a3 >= *a4 )
v9 = *a4;
else
v9 = a3;
v10 = v9;
if ( v9 > a6 )
v10 = a6;
if ( a2 == a5 )
{
while ( v14 < &a2[v10] )
{
*v14 = *(_BYTE *)(v11 + *v14);
++v14;
}
}
else
{
while ( v12 < &a5[v10] )
{
v6 = v12++;
v7 = v14++;
*v7 = *(_BYTE *)(v11 + *v6);
}
}
*a4 -= v10;
return (_BYTE *)(v14 - a2);
}
|
my_strnxfrm_simple_internal:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX]
CMP RAX,RCX
JNC 0x00144b79
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00144b83
LAB_00144b79:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
LAB_00144b83:
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,EAX
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x00144b99
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x44],EAX
LAB_00144b99:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x00144be9
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_00144bb1:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x00144be7
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x00144bb1
LAB_00144be7:
JMP 0x00144c25
LAB_00144be9:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
LAB_00144bf7:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x58]
JNC 0x00144c23
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00144bf7
LAB_00144c23:
JMP 0x00144c25
LAB_00144c25:
MOV EDX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX]
SUB ECX,EDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
POP RBP
RET
|
long my_strnxfrm_simple_internal
(long param_1,byte *param_2,ulong param_3,uint *param_4,byte *param_5,ulong param_6)
{
long lVar1;
ulong local_68;
uint local_4c;
byte *local_30;
byte *local_18;
lVar1 = *(long *)(param_1 + 0x58);
local_68 = param_3;
if (*param_4 <= param_3) {
local_68 = (ulong)*param_4;
}
local_4c = (uint)local_68;
if (param_6 < (local_68 & 0xffffffff)) {
local_4c = (uint)param_6;
}
if (param_2 == param_5) {
for (local_18 = param_2; local_18 < param_2 + local_4c; local_18 = local_18 + 1) {
*local_18 = *(byte *)(lVar1 + (ulong)*local_18);
}
}
else {
local_30 = param_5;
local_18 = param_2;
while (local_30 < param_5 + local_4c) {
*local_18 = *(byte *)(lVar1 + (ulong)*local_30);
local_30 = local_30 + 1;
local_18 = local_18 + 1;
}
}
*param_4 = *param_4 - local_4c;
return (long)local_18 - (long)param_2;
}
|
|
18,711
|
expand_message_xmd
|
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/hash_to_field.c
|
static void expand_message_xmd(unsigned char *bytes, size_t len_in_bytes,
const unsigned char *aug, size_t aug_len,
const unsigned char *msg, size_t msg_len,
const unsigned char *DST, size_t DST_len)
{
union { limb_t align; unsigned char c[32]; } b_0;
union { limb_t align; unsigned char c[33+256+31]; } b_i;
unsigned char *p;
size_t i, b_i_bits, b_i_blocks;
SHA256_CTX ctx;
/*
* compose template for 'strxor(b_0, b_(i-1)) || I2OSP(i, 1) || DST_prime'
*/
if (DST_len > 255) {
sha256_init(&ctx);
sha256_update(&ctx, "H2C-OVERSIZE-DST-", 17);
sha256_update(&ctx, DST, DST_len);
sha256_final(b_0.c, &ctx);
DST = b_0.c, DST_len = 32;
}
b_i_blocks = ((33 + DST_len + 1 + 9) + 63) & -64;
vec_zero(b_i.c + b_i_blocks - 64, 64);
p = b_i.c + 33;
for (i = 0; i < DST_len; i++)
p[i] = DST[i];
p[i++] = (unsigned char)DST_len;
p[i++] = 0x80;
p[i+6] = p[i+5] = p[i+4] = p[i+3] = p[i+2] = p[i+1] = p[i+0] = 0;
b_i_bits = (33 + DST_len + 1) * 8;
p = b_i.c + b_i_blocks;
p[-2] = (unsigned char)(b_i_bits >> 8);
p[-1] = (unsigned char)(b_i_bits);
sha256_init_Zpad(&ctx); /* Z_pad | */
sha256_update(&ctx, aug, aug_len); /* | aug | */
sha256_update(&ctx, msg, msg_len); /* | msg | */
/* | I2OSP(len_in_bytes, 2) || I2OSP(0, 1) || DST_prime */
b_i.c[30] = (unsigned char)(len_in_bytes >> 8);
b_i.c[31] = (unsigned char)(len_in_bytes);
b_i.c[32] = 0;
sha256_update(&ctx, b_i.c + 30, 3 + DST_len + 1);
sha256_final(b_0.c, &ctx);
sha256_init_h(ctx.h);
vec_copy(b_i.c, b_0.c, 32);
++b_i.c[32];
sha256_block_data_order(ctx.h, b_i.c, b_i_blocks / 64);
sha256_emit(bytes, ctx.h);
len_in_bytes += 31; /* ell = ceil(len_in_bytes / b_in_bytes), with */
len_in_bytes /= 32; /* caller being responsible for accordingly large
* buffer. hash_to_field passes one with length
* divisible by 64, remember? which works... */
while (--len_in_bytes) {
sha256_init_h(ctx.h);
vec_xor(b_i.c, b_0.c, bytes, 32);
bytes += 32;
++b_i.c[32];
sha256_block_data_order(ctx.h, b_i.c, b_i_blocks / 64);
sha256_emit(bytes, ctx.h);
}
}
|
O1
|
c
|
expand_message_xmd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rsi, -0x38(%rbp)
movq %rdi, %rbx
movq 0x18(%rbp), %r12
movq 0x10(%rbp), %r15
cmpq $0x100, %r12 # imm = 0x100
movq %r9, -0x58(%rbp)
movq %r8, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
jb 0x1907c
movaps 0x26755(%rip), %xmm0 # 0x3f750
leaq -0xc0(%rbp), %rax
movups %xmm0, -0x28(%rax)
movaps 0x26753(%rip), %xmm0 # 0x3f760
movups %xmm0, -0x18(%rax)
movq $0x0, -0x8(%rax)
movl $0x5, %ecx
movq $0x0, -0xe8(%rbp,%rcx,8)
incq %rcx
cmpq $0xd, %rcx
jne 0x1901e
leaq -0xe8(%rbp), %r14
movq $0x0, 0x68(%r14)
leaq 0x26dc7(%rip), %rsi # 0x3fe10
movl $0x11, %edx
movq %r14, %rdi
callq 0x25cca
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x25cca
leaq -0x78(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq %r14, %rsi
callq 0x25dd2
movl $0x20, %r12d
jmp 0x19080
movq %r15, -0x30(%rbp)
leaq 0x6a(%r12), %r14
movl %r14d, %eax
andl $0x1c0, %eax # imm = 0x1C0
leaq (%rax,%rbp), %r15
addq $-0x230, %r15 # imm = 0xFDD0
addq %rbp, %rax
addq $-0x270, %rax # imm = 0xFD90
movq $-0x40, %rcx
movq $0x0, (%r15,%rcx)
addq $0x8, %rcx
jne 0x190a8
leaq -0x20f(%rbp), %r13
xorl %ecx, %ecx
testq %r12, %r12
je 0x190da
movq %r13, %rdi
movq -0x30(%rbp), %rsi
movq %r12, %rdx
callq 0x5060
xorl %ecx, %ecx
movq %r12, %rax
jmp 0x190dc
xorl %eax, %eax
movb %r12b, -0x20f(%rbp,%rax)
movb $-0x80, -0x20e(%rbp,%rax)
movl %ecx, 0x5(%r13,%rax)
movl %ecx, 0x2(%r13,%rax)
leal 0x110(,%r12,8), %eax
rolw $0x8, %ax
movw %ax, -0x2(%r15)
movaps 0x26662(%rip), %xmm0 # 0x3f770
leaq -0xc0(%rbp), %rax
movups %xmm0, -0x28(%rax)
movaps 0x26660(%rip), %xmm0 # 0x3f780
movups %xmm0, -0x18(%rax)
movq $0x40, -0x8(%rax)
movl $0x5, %ecx
movq $0x0, -0xe8(%rbp,%rcx,8)
incq %rcx
cmpq $0xd, %rcx
jne 0x19131
leaq -0xe8(%rbp), %r15
movq $0x0, 0x68(%r15)
movq %r15, %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x25cca
movq %r15, %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x25cca
leaq -0x212(%rbp), %r13
movq -0x38(%rbp), %rax
movb %ah, -0x212(%rbp)
movb %al, 0x1(%r13)
movb $0x0, 0x2(%r13)
addq $0x4, %r12
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x25cca
leaq -0x78(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x25dd2
movaps 0x26599(%rip), %xmm0 # 0x3f750
movups %xmm0, (%r15)
movaps 0x2659e(%rip), %xmm0 # 0x3f760
movups %xmm0, 0x10(%r15)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movaps %xmm0, -0x1e(%r13)
movaps %xmm1, -0xe(%r13)
incb 0x2(%r13)
shrq $0x6, %r14
leaq -0x230(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x2ab80
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2cee0
movq -0x38(%rbp), %r13
addq $0x1f, %r13
shrq $0x5, %r13
decq %r13
je 0x19279
leaq -0x230(%rbp), %r12
movaps 0x26530(%rip), %xmm0 # 0x3f750
movups %xmm0, -0xe8(%rbp)
movaps 0x26532(%rip), %xmm0 # 0x3f760
movups %xmm0, -0xd8(%rbp)
xorl %eax, %eax
movq (%rbx,%rax,8), %rcx
xorq -0x78(%rbp,%rax,8), %rcx
movq %rcx, -0x230(%rbp,%rax,8)
incq %rax
cmpq $0x4, %rax
jne 0x19237
addq $0x20, %rbx
incb -0x210(%rbp)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2ab80
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2cee0
decq %r13
jne 0x19219
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
expand_message_xmd:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 208h
mov [rbp+var_38], rsi
mov rbx, rdi
mov r12, [rbp+arg_8]
mov r15, [rbp+arg_0]
cmp r12, 100h
mov [rbp+var_58], r9
mov [rbp+var_50], r8
mov [rbp+var_48], rcx
mov [rbp+var_40], rdx
jb loc_1907C
movaps xmm0, cs:xmmword_3F750
lea rax, [rbp+var_C0]
movups xmmword ptr [rax-28h], xmm0
movaps xmm0, cs:xmmword_3F760
movups xmmword ptr [rax-18h], xmm0
mov qword ptr [rax-8], 0
mov ecx, 5
loc_1901E:
mov qword ptr [rbp+rcx*8+var_E8], 0
inc rcx
cmp rcx, 0Dh
jnz short loc_1901E
lea r14, [rbp+var_E8]
mov qword ptr [r14+68h], 0
lea rsi, aH2cOversizeDst; "H2C-OVERSIZE-DST-"
mov edx, 11h
mov rdi, r14
call sha256_update
mov rdi, r14
mov rsi, r15
mov rdx, r12
call sha256_update
lea rdi, [rbp+var_78]
mov [rbp+var_30], rdi
mov rsi, r14
call sha256_final
mov r12d, 20h ; ' '
jmp short loc_19080
loc_1907C:
mov [rbp+var_30], r15
loc_19080:
lea r14, [r12+6Ah]
mov eax, r14d
and eax, 1C0h
lea r15, [rax+rbp]
add r15, 0FFFFFFFFFFFFFDD0h
add rax, rbp
add rax, 0FFFFFFFFFFFFFD90h
mov rcx, 0FFFFFFFFFFFFFFC0h
loc_190A8:
mov qword ptr [r15+rcx], 0
add rcx, 8
jnz short loc_190A8
lea r13, [rbp+var_20F]
xor ecx, ecx
test r12, r12
jz short loc_190DA
mov rdi, r13
mov rsi, [rbp+var_30]
mov rdx, r12
call _memcpy
xor ecx, ecx
mov rax, r12
jmp short loc_190DC
loc_190DA:
xor eax, eax
loc_190DC:
mov [rbp+rax+var_20F], r12b
mov [rbp+rax+var_20E], 80h
mov [r13+rax+5], ecx
mov [r13+rax+2], ecx
lea eax, ds:110h[r12*8]
rol ax, 8
mov [r15-2], ax
movaps xmm0, cs:xmmword_3F770
lea rax, [rbp+var_C0]
movups xmmword ptr [rax-28h], xmm0
movaps xmm0, cs:xmmword_3F780
movups xmmword ptr [rax-18h], xmm0
mov qword ptr [rax-8], 40h ; '@'
mov ecx, 5
loc_19131:
mov qword ptr [rbp+rcx*8+var_E8], 0
inc rcx
cmp rcx, 0Dh
jnz short loc_19131
lea r15, [rbp+var_E8]
mov qword ptr [r15+68h], 0
mov rdi, r15
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
call sha256_update
mov rdi, r15
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_58]
call sha256_update
lea r13, [rbp+var_212]
mov rax, [rbp+var_38]
mov [rbp+var_212], ah
mov [r13+1], al
mov byte ptr [r13+2], 0
add r12, 4
mov rdi, r15
mov rsi, r13
mov rdx, r12
call sha256_update
lea r12, [rbp+var_78]
mov rdi, r12
mov rsi, r15
call sha256_final
movaps xmm0, cs:xmmword_3F750
movups xmmword ptr [r15], xmm0
movaps xmm0, cs:xmmword_3F760
movups xmmword ptr [r15+10h], xmm0
movups xmm0, xmmword ptr [r12]
movups xmm1, xmmword ptr [r12+10h]
movaps xmmword ptr [r13-1Eh], xmm0
movaps xmmword ptr [r13-0Eh], xmm1
inc byte ptr [r13+2]
shr r14, 6
lea rsi, [rbp+var_230]
mov rdi, r15
mov rdx, r14
call blst_sha256_block_data_order
mov rdi, rbx
mov rsi, r15
call blst_sha256_emit
mov r13, [rbp+var_38]
add r13, 1Fh
shr r13, 5
dec r13
jz short loc_19279
lea r12, [rbp+var_230]
loc_19219:
movaps xmm0, cs:xmmword_3F750
movups [rbp+var_E8], xmm0
movaps xmm0, cs:xmmword_3F760
movups [rbp+var_D8], xmm0
xor eax, eax
loc_19237:
mov rcx, [rbx+rax*8]
xor rcx, [rbp+rax*8+var_78]
mov [rbp+rax*8+var_230], rcx
inc rax
cmp rax, 4
jnz short loc_19237
add rbx, 20h ; ' '
inc [rbp+var_210]
mov rdi, r15
mov rsi, r12
mov rdx, r14
call blst_sha256_block_data_order
mov rdi, rbx
mov rsi, r15
call blst_sha256_emit
dec r13
jnz short loc_19219
loc_19279:
add rsp, 208h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long expand_message_xmd(
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 v9; // r12
long long i; // rcx
char *v11; // r15
long long v12; // rcx
long long v13; // rax
long long j; // rcx
unsigned long long v15; // r14
int v16; // ecx
int v17; // r8d
int v18; // r9d
long long result; // rax
int v20; // r8d
int v21; // r9d
unsigned long long v22; // r13
long long k; // rax
long long v24; // rcx
long long v25[3]; // [rsp+0h] [rbp-230h] BYREF
__int128 v26; // [rsp+18h] [rbp-218h] BYREF
long long v27; // [rsp+28h] [rbp-208h]
long long v28; // [rsp+30h] [rbp-200h]
long long v29; // [rsp+38h] [rbp-1F8h]
long long v30; // [rsp+40h] [rbp-1F0h]
long long v31; // [rsp+48h] [rbp-1E8h]
long long v32; // [rsp+50h] [rbp-1E0h]
long long v33; // [rsp+58h] [rbp-1D8h]
long long v34; // [rsp+60h] [rbp-1D0h]
long long v35; // [rsp+68h] [rbp-1C8h]
__int128 v36; // [rsp+148h] [rbp-E8h] BYREF
__int128 v37; // [rsp+158h] [rbp-D8h]
long long v38; // [rsp+168h] [rbp-C8h]
long long v39; // [rsp+1B0h] [rbp-80h]
long long v40[4]; // [rsp+1B8h] [rbp-78h] BYREF
long long v41; // [rsp+1D8h] [rbp-58h]
long long v42; // [rsp+1E0h] [rbp-50h]
long long v43; // [rsp+1E8h] [rbp-48h]
long long v44; // [rsp+1F0h] [rbp-40h]
long long v45; // [rsp+1F8h] [rbp-38h]
long long *v46; // [rsp+200h] [rbp-30h]
v45 = a2;
v8 = a1;
v9 = a8;
v41 = a6;
v42 = a5;
v43 = a4;
v44 = a3;
if ( a8 < 0x100 )
{
v46 = a7;
}
else
{
v36 = xmmword_3F750;
v37 = xmmword_3F760;
v38 = 0LL;
for ( i = 5LL; i != 13; ++i )
*((_QWORD *)&v36 + i) = 0LL;
v39 = 0LL;
sha256_update(&v36, "H2C-OVERSIZE-DST-", 17LL);
sha256_update(&v36, a7, a8);
v46 = v40;
sha256_final(v40, &v36);
v9 = 32LL;
}
v11 = (char *)v25 + (((_WORD)v9 + 106) & 0x1C0);
v12 = -64LL;
do
{
*(_QWORD *)&v11[v12] = 0LL;
v12 += 8LL;
}
while ( v12 );
if ( v9 )
{
memcpy((char *)&v26 + 9, v46, v9);
v13 = v9;
}
else
{
v13 = 0LL;
}
*((_BYTE *)&v26 + v13 + 9) = v9;
*((_BYTE *)&v26 + v13 + 10) = 0x80;
*(_DWORD *)((char *)&v26 + v13 + 14) = 0;
*(_DWORD *)((char *)&v26 + v13 + 11) = 0;
*((_WORD *)v11 - 1) = __ROL2__(8 * v9 + 272, 8);
v36 = xmmword_3F770;
v37 = xmmword_3F780;
v38 = 64LL;
for ( j = 5LL; j != 13; ++j )
*((_QWORD *)&v36 + j) = 0LL;
v39 = 0LL;
sha256_update(&v36, v44, v43);
sha256_update(&v36, v42, v41);
BYTE6(v26) = BYTE1(v45);
*(_WORD *)((char *)&v26 + 7) = (unsigned __int8)v45;
sha256_update(&v36, (char *)&v26 + 6, v9 + 4);
sha256_final(v40, &v36);
v36 = xmmword_3F750;
v37 = xmmword_3F760;
++BYTE8(v26);
v15 = (unsigned long long)(v9 + 106) >> 6;
blst_sha256_block_data_order(
(unsigned int)&v36,
(unsigned int)v25,
v15,
v16,
v17,
v18,
v40[0],
v40[1],
v40[2],
v40[3],
*((long long *)&v26 + 1),
v27,
v28,
v29,
v30,
v31,
v32,
v33,
v34,
v35);
result = blst_sha256_emit(a1, &v36);
v22 = ((unsigned long long)(v45 + 31) >> 5) - 1;
if ( (unsigned long long)(v45 + 31) >> 5 != 1 )
{
do
{
v36 = xmmword_3F750;
v37 = xmmword_3F760;
for ( k = 0LL; k != 4; ++k )
{
v24 = v40[k] ^ *(_QWORD *)(v8 + 8 * k);
v25[k] = v24;
}
v8 += 32LL;
++BYTE8(v26);
blst_sha256_block_data_order(
(unsigned int)&v36,
(unsigned int)v25,
v15,
v24,
v20,
v21,
v25[0],
v25[1],
v25[2],
v26,
*((long long *)&v26 + 1),
v27,
v28,
v29,
v30,
v31,
v32,
v33,
v34,
v35);
result = blst_sha256_emit(v8, &v36);
--v22;
}
while ( v22 );
}
return result;
}
|
expand_message_xmd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x208
MOV qword ptr [RBP + -0x38],RSI
MOV RBX,RDI
MOV R12,qword ptr [RBP + 0x18]
MOV R15,qword ptr [RBP + 0x10]
CMP R12,0x100
MOV qword ptr [RBP + -0x58],R9
MOV qword ptr [RBP + -0x50],R8
MOV qword ptr [RBP + -0x48],RCX
MOV qword ptr [RBP + -0x40],RDX
JC 0x0011907c
MOVAPS XMM0,xmmword ptr [0x0013f750]
LEA RAX,[RBP + -0xc0]
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOVAPS XMM0,xmmword ptr [0x0013f760]
MOVUPS xmmword ptr [RAX + -0x18],XMM0
MOV qword ptr [RAX + -0x8],0x0
MOV ECX,0x5
LAB_0011901e:
MOV qword ptr [RBP + RCX*0x8 + -0xe8],0x0
INC RCX
CMP RCX,0xd
JNZ 0x0011901e
LEA R14,[RBP + -0xe8]
MOV qword ptr [R14 + 0x68],0x0
LEA RSI,[0x13fe10]
MOV EDX,0x11
MOV RDI,R14
CALL 0x00125cca
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
CALL 0x00125cca
LEA RDI,[RBP + -0x78]
MOV qword ptr [RBP + -0x30],RDI
MOV RSI,R14
CALL 0x00125dd2
MOV R12D,0x20
JMP 0x00119080
LAB_0011907c:
MOV qword ptr [RBP + -0x30],R15
LAB_00119080:
LEA R14,[R12 + 0x6a]
MOV EAX,R14D
AND EAX,0x1c0
LEA R15,[RAX + RBP*0x1]
ADD R15,-0x230
ADD RAX,RBP
ADD RAX,-0x270
MOV RCX,-0x40
LAB_001190a8:
MOV qword ptr [R15 + RCX*0x1],0x0
ADD RCX,0x8
JNZ 0x001190a8
LEA R13,[RBP + -0x20f]
XOR ECX,ECX
TEST R12,R12
JZ 0x001190da
MOV RDI,R13
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,R12
CALL 0x00105060
XOR ECX,ECX
MOV RAX,R12
JMP 0x001190dc
LAB_001190da:
XOR EAX,EAX
LAB_001190dc:
MOV byte ptr [RBP + RAX*0x1 + -0x20f],R12B
MOV byte ptr [RBP + RAX*0x1 + -0x20e],0x80
MOV dword ptr [R13 + RAX*0x1 + 0x5],ECX
MOV dword ptr [R13 + RAX*0x1 + 0x2],ECX
LEA EAX,[0x110 + R12*0x8]
ROL AX,0x8
MOV word ptr [R15 + -0x2],AX
MOVAPS XMM0,xmmword ptr [0x0013f770]
LEA RAX,[RBP + -0xc0]
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOVAPS XMM0,xmmword ptr [0x0013f780]
MOVUPS xmmword ptr [RAX + -0x18],XMM0
MOV qword ptr [RAX + -0x8],0x40
MOV ECX,0x5
LAB_00119131:
MOV qword ptr [RBP + RCX*0x8 + -0xe8],0x0
INC RCX
CMP RCX,0xd
JNZ 0x00119131
LEA R15,[RBP + -0xe8]
MOV qword ptr [R15 + 0x68],0x0
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x00125cca
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x58]
CALL 0x00125cca
LEA R13,[RBP + -0x212]
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RBP + -0x212],AH
MOV byte ptr [R13 + 0x1],AL
MOV byte ptr [R13 + 0x2],0x0
ADD R12,0x4
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
CALL 0x00125cca
LEA R12,[RBP + -0x78]
MOV RDI,R12
MOV RSI,R15
CALL 0x00125dd2
MOVAPS XMM0,xmmword ptr [0x0013f750]
MOVUPS xmmword ptr [R15],XMM0
MOVAPS XMM0,xmmword ptr [0x0013f760]
MOVUPS xmmword ptr [R15 + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS XMM1,xmmword ptr [R12 + 0x10]
MOVAPS xmmword ptr [R13 + -0x1e],XMM0
MOVAPS xmmword ptr [R13 + -0xe],XMM1
INC byte ptr [R13 + 0x2]
SHR R14,0x6
LEA RSI,[RBP + -0x230]
MOV RDI,R15
MOV RDX,R14
CALL 0x0012ab80
MOV RDI,RBX
MOV RSI,R15
CALL 0x0012cee0
MOV R13,qword ptr [RBP + -0x38]
ADD R13,0x1f
SHR R13,0x5
DEC R13
JZ 0x00119279
LEA R12,[RBP + -0x230]
LAB_00119219:
MOVAPS XMM0,xmmword ptr [0x0013f750]
MOVUPS xmmword ptr [RBP + -0xe8],XMM0
MOVAPS XMM0,xmmword ptr [0x0013f760]
MOVUPS xmmword ptr [RBP + -0xd8],XMM0
XOR EAX,EAX
LAB_00119237:
MOV RCX,qword ptr [RBX + RAX*0x8]
XOR RCX,qword ptr [RBP + RAX*0x8 + -0x78]
MOV qword ptr [RBP + RAX*0x8 + -0x230],RCX
INC RAX
CMP RAX,0x4
JNZ 0x00119237
ADD RBX,0x20
INC byte ptr [RBP + -0x210]
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
CALL 0x0012ab80
MOV RDI,RBX
MOV RSI,R15
CALL 0x0012cee0
DEC R13
JNZ 0x00119219
LAB_00119279:
ADD RSP,0x208
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void expand_message_xmd(long param_1,long param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 *param_7,size_t param_8)
{
ushort uVar1;
size_t sVar2;
long lVar3;
long lVar4;
ulong uVar5;
int8 uStack_240;
int8 local_238;
int4 uStack_230;
int4 uStack_22c;
int4 local_228;
int4 uStack_224;
int4 uStack_220;
int4 uStack_21c;
char local_218;
int1 local_217 [2];
int1 auStack_215 [293];
int8 local_f0 [2];
int8 local_e0;
int8 uStack_d8;
int8 local_d0;
int8 local_c8 [8];
int8 local_88;
int8 local_80;
int4 uStack_78;
int4 uStack_74;
int4 local_70;
int4 uStack_6c;
int4 uStack_68;
int4 uStack_64;
int8 local_60;
int8 local_58;
int8 local_50;
int8 local_48;
long local_40;
int8 *local_38;
local_60 = param_6;
local_58 = param_5;
local_50 = param_4;
local_48 = param_3;
local_40 = param_2;
if (param_8 < 0x100) {
local_38 = param_7;
}
else {
local_f0[0] = _DAT_0013f750;
local_f0[1] = _UNK_0013f758;
local_e0 = CONCAT44(_UNK_0013f764,_DAT_0013f760);
uStack_d8 = CONCAT44(_UNK_0013f76c,_UNK_0013f768);
local_d0 = 0;
lVar4 = 5;
do {
local_f0[lVar4] = 0;
lVar4 = lVar4 + 1;
} while (lVar4 != 0xd);
local_88 = 0;
uStack_240 = 0x119056;
sha256_update(local_f0,"H2C-OVERSIZE-DST-",0x11);
uStack_240 = 0x119064;
sha256_update(local_f0,param_7,param_8);
local_38 = &local_80;
uStack_240 = 0x119074;
sha256_final(local_38,local_f0);
param_8 = 0x20;
}
uVar5 = (ulong)((uint)(param_8 + 0x6a) & 0x1c0);
lVar4 = -0x40;
do {
*(int8 *)((long)&local_238 + lVar4 + uVar5) = 0;
lVar4 = lVar4 + 8;
} while (lVar4 != 0);
if (param_8 == 0) {
sVar2 = 0;
}
else {
uStack_240 = 0x1190d3;
memcpy(local_217,local_38,param_8);
sVar2 = param_8;
}
local_217[sVar2] = (char)param_8;
local_217[sVar2 + 1] = 0x80;
*(int4 *)(local_217 + sVar2 + 5) = 0;
*(int4 *)(local_217 + sVar2 + 2) = 0;
uVar1 = (short)param_8 * 8 + 0x110;
*(ushort *)((long)&uStack_240 + uVar5 + 6) = uVar1 * 0x100 | uVar1 >> 8;
local_f0[0] = _DAT_0013f770;
local_f0[1] = _UNK_0013f778;
local_e0 = CONCAT44(_UNK_0013f784,_DAT_0013f780);
uStack_d8 = CONCAT44(_UNK_0013f78c,_UNK_0013f788);
local_d0 = 0x40;
lVar4 = 5;
do {
local_f0[lVar4] = 0;
lVar4 = lVar4 + 1;
} while (lVar4 != 0xd);
local_88 = 0;
uStack_240 = 0x119165;
sha256_update(local_f0,local_48,local_50);
uStack_240 = 0x119175;
sha256_update(local_f0,local_58,local_60);
uStack_21c = CONCAT13((char)local_40,CONCAT12((char)((ulong)local_40 >> 8),(int2)uStack_21c)
);
local_218 = '\0';
uStack_240 = 0x1191a1;
sha256_update(local_f0,(long)&uStack_21c + 2,param_8 + 4);
uStack_240 = 0x1191b0;
sha256_final(&local_80,local_f0);
local_f0[0] = _DAT_0013f750;
local_f0[1] = _UNK_0013f758;
local_e0 = CONCAT44(_UNK_0013f764,_DAT_0013f760);
uStack_d8 = CONCAT44(_UNK_0013f76c,_UNK_0013f768);
local_238._0_4_ = (int4)local_80;
local_238._4_4_ = local_80._4_4_;
uStack_230 = uStack_78;
uStack_22c = uStack_74;
local_228 = local_70;
uStack_224 = uStack_6c;
uStack_220 = uStack_68;
uStack_21c = uStack_64;
local_218 = local_218 + '\x01';
uVar5 = param_8 + 0x6a >> 6;
uStack_240 = 0x1191f6;
blst_sha256_block_data_order(local_f0,&local_238,uVar5);
uStack_240 = 0x119201;
blst_sha256_emit(param_1,local_f0);
lVar4 = (local_40 + 0x1fU >> 5) - 1;
if (lVar4 != 0) {
do {
local_f0[0] = _DAT_0013f750;
local_f0[1] = _UNK_0013f758;
local_e0 = CONCAT44(_UNK_0013f764,_DAT_0013f760);
uStack_d8 = CONCAT44(_UNK_0013f76c,_UNK_0013f768);
lVar3 = 0;
do {
(&local_238)[lVar3] = *(ulong *)(param_1 + lVar3 * 8) ^ (&local_80)[lVar3];
lVar3 = lVar3 + 1;
} while (lVar3 != 4);
param_1 = param_1 + 0x20;
local_218 = local_218 + '\x01';
uStack_240 = 0x119269;
blst_sha256_block_data_order(local_f0,&local_238,uVar5);
uStack_240 = 0x119274;
blst_sha256_emit(param_1,local_f0);
lVar4 = lVar4 + -1;
} while (lVar4 != 0);
}
return;
}
|
|
18,712
|
mysql_find_charset_name
|
eloqsql/libmariadb/libmariadb/ma_charset.c
|
MARIADB_CHARSET_INFO * mysql_find_charset_name(const char *name)
{
MARIADB_CHARSET_INFO *c = (MARIADB_CHARSET_INFO *)mariadb_compiled_charsets;
const char *csname;
if (!strcasecmp(name, MADB_AUTODETECT_CHARSET_NAME))
csname= madb_get_os_character_set();
else
csname= (char *)name;
if (!strcasecmp("utf8",csname))
csname= "utf8mb3";
do {
if (!strcasecmp(c->csname, csname)) {
return(c);
}
++c;
} while (c[0].nr != 0);
return(NULL);
}
|
O3
|
c
|
mysql_find_charset_name:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x7eb1(%rip), %rsi # 0x3adcc
callq 0x134d0
testl %eax, %eax
jne 0x32f2c
callq 0x32f73
movq %rax, %rbx
leaq 0x48b8(%rip), %rdi # 0x377eb
movq %rbx, %rsi
callq 0x134d0
testl %eax, %eax
leaq 0x6436(%rip), %r14 # 0x3937a
cmovneq %rbx, %r14
leaq 0x11cf1(%rip), %rbx # 0x44c40
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x134d0
testl %eax, %eax
je 0x32f6b
cmpl $0x0, 0x48(%rbx)
leaq 0x48(%rbx), %rbx
jne 0x32f4f
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
|
mysql_find_charset_name:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
lea rsi, aAuto; "auto"
call _strcasecmp
test eax, eax
jnz short loc_32F2C
call madb_get_os_character_set
mov rbx, rax
loc_32F2C:
lea rdi, aUseUtf8+4; "utf8"
mov rsi, rbx
call _strcasecmp
test eax, eax
lea r14, aUtf8mb3; "utf8mb3"
cmovnz r14, rbx
lea rbx, mariadb_compiled_charsets
loc_32F4F:
mov rdi, [rbx+8]
mov rsi, r14
call _strcasecmp
test eax, eax
jz short loc_32F6B
cmp dword ptr [rbx+48h], 0
lea rbx, [rbx+48h]
jnz short loc_32F4F
xor ebx, ebx
loc_32F6B:
mov rax, rbx
pop rbx
pop r14
pop rbp
retn
|
_DWORD * mysql_find_charset_name(long long a1)
{
long long os_character_set; // rbx
const char *v2; // r14
_DWORD *i; // rbx
os_character_set = a1;
if ( !(unsigned int)strcasecmp(a1, "auto") )
os_character_set = madb_get_os_character_set();
v2 = "utf8mb3";
if ( (unsigned int)strcasecmp("utf8", os_character_set) )
v2 = (const char *)os_character_set;
for ( i = &mariadb_compiled_charsets; (unsigned int)strcasecmp(*((_QWORD *)i + 1), v2); i += 18 )
{
if ( i[18] == 0 )
return 0LL;
}
return i;
}
|
mysql_find_charset_name:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA RSI,[0x13adcc]
CALL 0x001134d0
TEST EAX,EAX
JNZ 0x00132f2c
CALL 0x00132f73
MOV RBX,RAX
LAB_00132f2c:
LEA RDI,[0x1377eb]
MOV RSI,RBX
CALL 0x001134d0
TEST EAX,EAX
LEA R14,[0x13937a]
CMOVNZ R14,RBX
LEA RBX,[0x144c40]
LAB_00132f4f:
MOV RDI,qword ptr [RBX + 0x8]
MOV RSI,R14
CALL 0x001134d0
TEST EAX,EAX
JZ 0x00132f6b
CMP dword ptr [RBX + 0x48],0x0
LEA RBX,[RBX + 0x48]
JNZ 0x00132f4f
XOR EBX,EBX
LAB_00132f6b:
MOV RAX,RBX
POP RBX
POP R14
POP RBP
RET
|
int4 * mysql_find_charset_name(char *param_1)
{
int *piVar1;
int iVar2;
int4 *puVar3;
char *__s2;
iVar2 = strcasecmp(param_1,"auto");
if (iVar2 == 0) {
param_1 = (char *)madb_get_os_character_set();
}
iVar2 = strcasecmp("utf8",param_1);
__s2 = "utf8mb3";
if (iVar2 != 0) {
__s2 = param_1;
}
puVar3 = &mariadb_compiled_charsets;
do {
iVar2 = strcasecmp(*(char **)(puVar3 + 2),__s2);
if (iVar2 == 0) {
return puVar3;
}
piVar1 = puVar3 + 0x12;
puVar3 = puVar3 + 0x12;
} while (*piVar1 != 0);
return (int4 *)0x0;
}
|
|
18,713
|
my_uni_utf16
|
eloqsql/strings/ctype-ucs2.c
|
int
my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (wc <= 0xFFFF)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (MY_UTF16_SURROGATE(wc))
return MY_CS_ILUNI;
*s++= (uchar) (wc >> 8);
*s= (uchar) (wc & 0xFF);
return 2;
}
if (wc <= 0x10FFFF)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
*s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8;
*s++= (uchar) (wc >> 10) & 0xFF;
*s++= (uchar) ((wc >> 8) & 3) | 0xDC;
*s= (uchar) wc & 0xFF;
return 4;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_uni_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rsi, %rbx
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x4a96b
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x4a9b3
movl %ebx, %eax
andl $0xf800, %eax # imm = 0xF800
cmpl $0xd800, %eax # imm = 0xD800
je 0x4a9b1
movb %bh, (%rdx)
incq %rdx
movl $0x2, %eax
jmp 0x4a9ad
cmpq $0x10ffff, %rbx # imm = 0x10FFFF
ja 0x4a9b1
leaq 0x4(%rdx), %rsi
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rsi
ja 0x4a9b3
leal -0x10000(%rbx), %eax
movl %eax, %ecx
shrl $0x12, %ecx
orb $-0x28, %cl
movb %cl, (%rdx)
shrl $0xa, %eax
movb %al, 0x1(%rdx)
movl %ebx, %eax
shrl $0x8, %eax
andb $0x3, %al
orb $-0x24, %al
movb %al, 0x2(%rdx)
addq $0x3, %rdx
movl $0x4, %eax
movb %bl, (%rdx)
jmp 0x4a9b3
xorl %eax, %eax
popq %rbx
popq %rbp
retq
|
my_uni_utf16:
push rbp
mov rbp, rsp
push rbx
mov rbx, rsi
cmp rsi, 0FFFFh
ja short loc_4A96B
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short loc_4A9B3
mov eax, ebx
and eax, 0F800h
cmp eax, 0D800h
jz short loc_4A9B1
mov [rdx], bh
inc rdx
mov eax, 2
jmp short loc_4A9AD
loc_4A96B:
cmp rbx, offset unk_10FFFF
ja short loc_4A9B1
lea rsi, [rdx+4]
mov eax, 0FFFFFF98h
cmp rsi, rcx
ja short loc_4A9B3
lea eax, [rbx-10000h]
mov ecx, eax
shr ecx, 12h
or cl, 0D8h
mov [rdx], cl
shr eax, 0Ah
mov [rdx+1], al
mov eax, ebx
shr eax, 8
and al, 3
or al, 0DCh
mov [rdx+2], al
add rdx, 3
mov eax, 4
loc_4A9AD:
mov [rdx], bl
jmp short loc_4A9B3
loc_4A9B1:
xor eax, eax
loc_4A9B3:
pop rbx
pop rbp
retn
|
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
_BYTE *v5; // rdx
if ( a2 > 0xFFFF )
{
if ( a2 <= (unsigned long long)&unk_10FFFF )
{
result = 4294967192LL;
if ( (unsigned long long)(a3 + 4) > a4 )
return result;
*a3 = ((unsigned int)(a2 - 0x10000) >> 18) | 0xD8;
a3[1] = (unsigned int)(a2 - 0x10000) >> 10;
a3[2] = BYTE1(a2) & 3 | 0xDC;
v5 = a3 + 3;
result = 4LL;
goto LABEL_8;
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) > a4 )
return result;
if ( (a2 & 0xF800) != 0xD800 )
{
*a3 = BYTE1(a2);
v5 = a3 + 1;
result = 2LL;
LABEL_8:
*v5 = a2;
return result;
}
}
return 0LL;
}
|
my_uni_utf16:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RBX,RSI
CMP RSI,0xffff
JA 0x0014a96b
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x0014a9b3
MOV EAX,EBX
AND EAX,0xf800
CMP EAX,0xd800
JZ 0x0014a9b1
MOV byte ptr [RDX],BH
INC RDX
MOV EAX,0x2
JMP 0x0014a9ad
LAB_0014a96b:
CMP RBX,0x10ffff
JA 0x0014a9b1
LEA RSI,[RDX + 0x4]
MOV EAX,0xffffff98
CMP RSI,RCX
JA 0x0014a9b3
LEA EAX,[RBX + -0x10000]
MOV ECX,EAX
SHR ECX,0x12
OR CL,0xd8
MOV byte ptr [RDX],CL
SHR EAX,0xa
MOV byte ptr [RDX + 0x1],AL
MOV EAX,EBX
SHR EAX,0x8
AND AL,0x3
OR AL,0xdc
MOV byte ptr [RDX + 0x2],AL
ADD RDX,0x3
MOV EAX,0x4
LAB_0014a9ad:
MOV byte ptr [RDX],BL
JMP 0x0014a9b3
LAB_0014a9b1:
XOR EAX,EAX
LAB_0014a9b3:
POP RBX
POP RBP
RET
|
int8 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
uint uVar1;
int8 uVar2;
byte bVar3;
bVar3 = (byte)(param_2 >> 8);
if (param_2 < 0x10000) {
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (((uint)param_2 & 0xf800) == 0xd800) {
return 0;
}
*param_3 = bVar3;
param_3 = param_3 + 1;
uVar2 = 2;
}
else {
if (0x10ffff < param_2) {
return 0;
}
if (param_4 < param_3 + 4) {
return 0xffffff98;
}
uVar1 = (uint)param_2 - 0x10000;
*param_3 = (byte)(uVar1 >> 0x12) | 0xd8;
param_3[1] = (byte)(uVar1 >> 10);
param_3[2] = bVar3 & 3 | 0xdc;
param_3 = param_3 + 3;
uVar2 = 4;
}
*param_3 = (byte)param_2;
return uVar2;
}
|
|
18,714
|
init_state_maps
|
eloqsql/mysys/charset.c
|
static my_bool init_state_maps(struct charset_info_st *cs)
{
uint i;
uchar *state_map;
uchar *ident_map;
if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME))))
return 1;
cs->ident_map= ident_map= state_map + 256;
/* Fill state_map with states to get a faster parser */
for (i=0; i < 256 ; i++)
{
if (my_isalpha(cs,i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isdigit(cs,i))
state_map[i]=(uchar) MY_LEX_NUMBER_IDENT;
else if (is_multi_byte_ident(cs, i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isspace(cs,i))
state_map[i]=(uchar) MY_LEX_SKIP;
else
state_map[i]=(uchar) MY_LEX_CHAR;
}
state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT;
state_map[(uchar)'\'']=(uchar) MY_LEX_STRING;
state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT;
state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP;
state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP;
state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL;
state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT;
state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON;
state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR;
state_map[0]=(uchar) MY_LEX_EOL;
state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE;
state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT;
state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT;
state_map[(uchar)'@']= (uchar) MY_LEX_USER_END;
state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER;
state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER;
state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT;
state_map[(uchar)',']= (uchar) MY_LEX_COMMA;
state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER;
/*
Create a second map to make it faster to find identifiers
*/
for (i=0; i < 256 ; i++)
{
ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT ||
state_map[i] == MY_LEX_NUMBER_IDENT);
}
/* Special handling of hex and binary strings */
state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX;
state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN;
state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR;
return 0;
}
|
O3
|
c
|
init_state_maps:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x200, %edi # imm = 0x200
movl $0x10, %esi
callq 0x251cc
movq %rax, 0x80(%r14)
testq %rax, %rax
je 0x27d7a
movq %rax, %rbx
movq %rax, %r13
addq $0x100, %r13 # imm = 0x100
movq %r13, 0x88(%r14)
xorl %r15d, %r15d
leaq -0x29(%rbp), %r12
movq 0x40(%r14), %rax
movzbl 0x1(%rax,%r15), %eax
testb $0x3, %al
je 0x27c86
movb $0x2, (%rbx,%r15)
jmp 0x27cc5
testb $0x4, %al
jne 0x27cc0
movb %r15b, -0x29(%rbp)
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %r12, %rsi
leaq -0x28(%rbp), %rdx
callq *0xc0(%rax)
addl $0x64, %eax
cmpl $-0x6, %eax
jae 0x27c7f
movq 0x40(%r14), %rax
testb $0x8, 0x1(%rax,%r15)
jne 0x27cd3
movb $0x1, (%rbx,%r15)
jmp 0x27cc5
movb $0xe, (%rbx,%r15)
incq %r15
cmpq $0x100, %r15 # imm = 0x100
jne 0x27c71
jmp 0x27cda
movb $0x1a, (%rbx,%r15)
jmp 0x27cc5
movw $0x1b02, 0x5f(%rbx) # imm = 0x1B02
movb $0x8, 0x3e(%rbx)
movb $0x11, 0x7c(%rbx)
movw $0xa11, 0x26(%rbx) # imm = 0xA11
movl $0x8091617, 0x3a(%rbx) # imm = 0x8091617
movb $0x12, (%rbx)
movb $0x13, 0x5c(%rbx)
movb $0x15, 0x2a(%rbx)
movl $0x20b2108, 0x21(%rbx) # imm = 0x20B2108
movl $0x14102224, 0x2c(%rbx) # imm = 0x14102224
movw $0x1823, 0x3f(%rbx) # imm = 0x1823
movq $-0x100, %rax
movdqa 0x36bed(%rip), %xmm0 # 0x5e910
movdqa 0x36bf5(%rip), %xmm1 # 0x5e920
movdqa 0x36bfd(%rip), %xmm2 # 0x5e930
movdqu (%r13,%rax), %xmm3
movdqa %xmm3, %xmm4
pcmpeqb %xmm0, %xmm4
pcmpeqb %xmm1, %xmm3
por %xmm4, %xmm3
pand %xmm2, %xmm3
movdqu %xmm3, 0x100(%r13,%rax)
addq $0x10, %rax
jne 0x27d33
movb $0x1e, %al
movb %al, 0x58(%rbx)
movb %al, 0x78(%rbx)
movb $0x1f, %al
movb %al, 0x42(%rbx)
movb %al, 0x62(%rbx)
movb $0x20, %al
movb %al, 0x4e(%rbx)
movb %al, 0x6e(%rbx)
xorl %eax, %eax
jmp 0x27d7c
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
init_state_maps:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
mov edi, 200h
mov esi, 10h
call my_once_alloc
mov [r14+80h], rax
test rax, rax
jz loc_27D7A
mov rbx, rax
mov r13, rax
add r13, 100h
mov [r14+88h], r13
xor r15d, r15d
lea r12, [rbp+var_29]
loc_27C71:
mov rax, [r14+40h]
movzx eax, byte ptr [rax+r15+1]
test al, 3
jz short loc_27C86
loc_27C7F:
mov byte ptr [rbx+r15], 2
jmp short loc_27CC5
loc_27C86:
test al, 4
jnz short loc_27CC0
mov [rbp+var_29], r15b
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, r12
lea rdx, [rbp+var_28]
call qword ptr [rax+0C0h]
add eax, 64h ; 'd'
cmp eax, 0FFFFFFFAh
jnb short loc_27C7F
mov rax, [r14+40h]
test byte ptr [rax+r15+1], 8
jnz short loc_27CD3
mov byte ptr [rbx+r15], 1
jmp short loc_27CC5
loc_27CC0:
mov byte ptr [rbx+r15], 0Eh
loc_27CC5:
inc r15
cmp r15, 100h
jnz short loc_27C71
jmp short loc_27CDA
loc_27CD3:
mov byte ptr [rbx+r15], 1Ah
jmp short loc_27CC5
loc_27CDA:
mov word ptr [rbx+5Fh], 1B02h
mov byte ptr [rbx+3Eh], 8
mov byte ptr [rbx+7Ch], 11h
mov word ptr [rbx+26h], 0A11h
mov dword ptr [rbx+3Ah], 8091617h
mov byte ptr [rbx], 12h
mov byte ptr [rbx+5Ch], 13h
mov byte ptr [rbx+2Ah], 15h
mov dword ptr [rbx+21h], 20B2108h
mov dword ptr [rbx+2Ch], 14102224h
mov word ptr [rbx+3Fh], 1823h
mov rax, 0FFFFFFFFFFFFFF00h
movdqa xmm0, cs:xmmword_5E910
movdqa xmm1, cs:xmmword_5E920
movdqa xmm2, cs:xmmword_5E930
loc_27D33:
movdqu xmm3, xmmword ptr [r13+rax+0]
movdqa xmm4, xmm3
pcmpeqb xmm4, xmm0
pcmpeqb xmm3, xmm1
por xmm3, xmm4
pand xmm3, xmm2
movdqu xmmword ptr [r13+rax+100h], xmm3
add rax, 10h
jnz short loc_27D33
mov al, 1Eh
mov [rbx+58h], al
mov [rbx+78h], al
mov al, 1Fh
mov [rbx+42h], al
mov [rbx+62h], al
mov al, 20h ; ' '
mov [rbx+4Eh], al
mov [rbx+6Eh], al
xor eax, eax
jmp short loc_27D7C
loc_27D7A:
mov al, 1
loc_27D7C:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long init_state_maps(_QWORD *a1)
{
long long v1; // rax
long long v2; // rax
long long v3; // rbx
long long v4; // r13
long long i; // r15
char v6; // al
long long v7; // rax
__m128i si128; // xmm0
__m128i v9; // xmm1
__m128i v10; // xmm2
__m128i v11; // xmm3
char v13; // [rsp+1h] [rbp-29h] BYREF
_BYTE v14[40]; // [rsp+2h] [rbp-28h] BYREF
v13 = HIBYTE(v1);
v2 = my_once_alloc(512LL, 16);
a1[16] = v2;
if ( !v2 )
return 1LL;
v3 = v2;
v4 = v2 + 256;
a1[17] = v2 + 256;
for ( i = 0LL; i != 256; ++i )
{
v6 = *(_BYTE *)(a1[8] + i + 1);
if ( (v6 & 3) != 0 )
{
LABEL_4:
*(_BYTE *)(v3 + i) = 2;
continue;
}
if ( (v6 & 4) != 0 )
{
*(_BYTE *)(v3 + i) = 14;
}
else
{
v13 = i;
if ( (*(unsigned int ( **)(_QWORD *, char *, _BYTE *))(a1[23] + 192LL))(a1, &v13, v14) + 100 >= 0xFFFFFFFA )
goto LABEL_4;
if ( (*(_BYTE *)(a1[8] + i + 1) & 8) != 0 )
*(_BYTE *)(v3 + i) = 26;
else
*(_BYTE *)(v3 + i) = 1;
}
}
*(_WORD *)(v3 + 95) = 6914;
*(_BYTE *)(v3 + 62) = 8;
*(_BYTE *)(v3 + 124) = 17;
*(_WORD *)(v3 + 38) = 2577;
*(_DWORD *)(v3 + 58) = 134813207;
*(_BYTE *)v3 = 18;
*(_BYTE *)(v3 + 92) = 19;
*(_BYTE *)(v3 + 42) = 21;
*(_DWORD *)(v3 + 33) = 34283784;
*(_DWORD *)(v3 + 44) = 336601636;
*(_WORD *)(v3 + 63) = 6179;
v7 = -256LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_5E910);
v9 = _mm_load_si128((const __m128i *)&xmmword_5E920);
v10 = _mm_load_si128((const __m128i *)&xmmword_5E930);
do
{
v11 = _mm_loadu_si128((const __m128i *)(v4 + v7));
*(__m128i *)(v4 + v7 + 256) = _mm_and_si128(_mm_or_si128(_mm_cmpeq_epi8(v11, v9), _mm_cmpeq_epi8(v11, si128)), v10);
v7 += 16LL;
}
while ( v7 );
*(_BYTE *)(v3 + 88) = 30;
*(_BYTE *)(v3 + 120) = 30;
*(_BYTE *)(v3 + 66) = 31;
*(_BYTE *)(v3 + 98) = 31;
*(_BYTE *)(v3 + 78) = 32;
*(_BYTE *)(v3 + 110) = 32;
return 0LL;
}
|
init_state_maps:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV EDI,0x200
MOV ESI,0x10
CALL 0x001251cc
MOV qword ptr [R14 + 0x80],RAX
TEST RAX,RAX
JZ 0x00127d7a
MOV RBX,RAX
MOV R13,RAX
ADD R13,0x100
MOV qword ptr [R14 + 0x88],R13
XOR R15D,R15D
LEA R12,[RBP + -0x29]
LAB_00127c71:
MOV RAX,qword ptr [R14 + 0x40]
MOVZX EAX,byte ptr [RAX + R15*0x1 + 0x1]
TEST AL,0x3
JZ 0x00127c86
LAB_00127c7f:
MOV byte ptr [RBX + R15*0x1],0x2
JMP 0x00127cc5
LAB_00127c86:
TEST AL,0x4
JNZ 0x00127cc0
MOV byte ptr [RBP + -0x29],R15B
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,R12
LEA RDX,[RBP + -0x28]
CALL qword ptr [RAX + 0xc0]
ADD EAX,0x64
CMP EAX,-0x6
JNC 0x00127c7f
MOV RAX,qword ptr [R14 + 0x40]
TEST byte ptr [RAX + R15*0x1 + 0x1],0x8
JNZ 0x00127cd3
MOV byte ptr [RBX + R15*0x1],0x1
JMP 0x00127cc5
LAB_00127cc0:
MOV byte ptr [RBX + R15*0x1],0xe
LAB_00127cc5:
INC R15
CMP R15,0x100
JNZ 0x00127c71
JMP 0x00127cda
LAB_00127cd3:
MOV byte ptr [RBX + R15*0x1],0x1a
JMP 0x00127cc5
LAB_00127cda:
MOV word ptr [RBX + 0x5f],0x1b02
MOV byte ptr [RBX + 0x3e],0x8
MOV byte ptr [RBX + 0x7c],0x11
MOV word ptr [RBX + 0x26],0xa11
MOV dword ptr [RBX + 0x3a],0x8091617
MOV byte ptr [RBX],0x12
MOV byte ptr [RBX + 0x5c],0x13
MOV byte ptr [RBX + 0x2a],0x15
MOV dword ptr [RBX + 0x21],0x20b2108
MOV dword ptr [RBX + 0x2c],0x14102224
MOV word ptr [RBX + 0x3f],0x1823
MOV RAX,-0x100
MOVDQA XMM0,xmmword ptr [0x0015e910]
MOVDQA XMM1,xmmword ptr [0x0015e920]
MOVDQA XMM2,xmmword ptr [0x0015e930]
LAB_00127d33:
MOVDQU XMM3,xmmword ptr [R13 + RAX*0x1]
MOVDQA XMM4,XMM3
PCMPEQB XMM4,XMM0
PCMPEQB XMM3,XMM1
POR XMM3,XMM4
PAND XMM3,XMM2
MOVDQU xmmword ptr [R13 + RAX*0x1 + 0x100],XMM3
ADD RAX,0x10
JNZ 0x00127d33
MOV AL,0x1e
MOV byte ptr [RBX + 0x58],AL
MOV byte ptr [RBX + 0x78],AL
MOV AL,0x1f
MOV byte ptr [RBX + 0x42],AL
MOV byte ptr [RBX + 0x62],AL
MOV AL,0x20
MOV byte ptr [RBX + 0x4e],AL
MOV byte ptr [RBX + 0x6e],AL
XOR EAX,EAX
JMP 0x00127d7c
LAB_00127d7a:
MOV AL,0x1
LAB_00127d7c:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 init_state_maps(long param_1)
{
char *pcVar1;
byte *pbVar2;
byte bVar3;
char cVar4;
char cVar5;
char cVar6;
char cVar7;
char cVar8;
char cVar9;
char cVar10;
char cVar11;
char cVar12;
char cVar13;
char cVar14;
char cVar15;
char cVar16;
char cVar17;
char cVar18;
char cVar19;
char cVar20;
char cVar21;
char cVar22;
char cVar23;
char cVar24;
char cVar25;
char cVar26;
char cVar27;
char cVar28;
char cVar29;
char cVar30;
char cVar31;
char cVar32;
char cVar33;
char cVar34;
char cVar35;
char cVar36;
char cVar37;
char cVar38;
char cVar39;
char cVar40;
char cVar41;
char cVar42;
char cVar43;
char cVar44;
char cVar45;
char cVar46;
char cVar47;
char cVar48;
char cVar49;
char cVar50;
byte bVar51;
byte bVar52;
byte bVar53;
byte bVar54;
byte bVar55;
byte bVar56;
byte bVar57;
byte bVar58;
byte bVar59;
byte bVar60;
byte bVar61;
byte bVar62;
byte bVar63;
byte bVar64;
byte bVar65;
int iVar66;
int8 in_RAX;
int1 *puVar67;
int8 uVar68;
long lVar69;
int8 uStack_38;
uStack_38 = in_RAX;
puVar67 = (int1 *)my_once_alloc(0x200,0x10);
*(int1 **)(param_1 + 0x80) = puVar67;
if (puVar67 == (int1 *)0x0) {
uVar68 = 1;
}
else {
*(int1 **)(param_1 + 0x88) = puVar67 + 0x100;
lVar69 = 0;
do {
bVar3 = *(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69);
if ((bVar3 & 3) == 0) {
if ((bVar3 & 4) == 0) {
uStack_38 = CONCAT17((char)lVar69,(int7)uStack_38);
iVar66 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,(long)&uStack_38 + 7,&stack0xffffffffffffffd0);
if (0xfffffff9 < iVar66 + 100U) goto LAB_00127c7f;
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69) & 8) == 0) {
puVar67[lVar69] = 1;
}
else {
puVar67[lVar69] = 0x1a;
}
}
else {
puVar67[lVar69] = 0xe;
}
}
else {
LAB_00127c7f:
puVar67[lVar69] = 2;
}
lVar69 = lVar69 + 1;
} while (lVar69 != 0x100);
*(int2 *)(puVar67 + 0x5f) = 0x1b02;
puVar67[0x3e] = 8;
puVar67[0x7c] = 0x11;
*(int2 *)(puVar67 + 0x26) = 0xa11;
*(int4 *)(puVar67 + 0x3a) = 0x8091617;
*puVar67 = 0x12;
puVar67[0x5c] = 0x13;
puVar67[0x2a] = 0x15;
*(int4 *)(puVar67 + 0x21) = 0x20b2108;
*(int4 *)(puVar67 + 0x2c) = 0x14102224;
*(int2 *)(puVar67 + 0x3f) = 0x1823;
bVar65 = UNK_0015e93f;
bVar64 = UNK_0015e93e;
bVar63 = UNK_0015e93d;
bVar62 = UNK_0015e93c;
bVar61 = UNK_0015e93b;
bVar60 = UNK_0015e93a;
bVar59 = UNK_0015e939;
bVar58 = UNK_0015e938;
bVar57 = UNK_0015e937;
bVar56 = UNK_0015e936;
bVar55 = UNK_0015e935;
bVar54 = UNK_0015e934;
bVar53 = UNK_0015e933;
bVar52 = UNK_0015e932;
bVar51 = UNK_0015e931;
bVar3 = DAT_0015e930;
cVar50 = UNK_0015e92f;
cVar49 = UNK_0015e92e;
cVar48 = UNK_0015e92d;
cVar47 = UNK_0015e92c;
cVar46 = UNK_0015e92b;
cVar45 = UNK_0015e92a;
cVar44 = UNK_0015e929;
cVar43 = UNK_0015e928;
cVar42 = UNK_0015e927;
cVar41 = UNK_0015e926;
cVar40 = UNK_0015e925;
cVar39 = UNK_0015e924;
cVar38 = UNK_0015e923;
cVar37 = UNK_0015e922;
cVar36 = UNK_0015e921;
cVar35 = DAT_0015e920;
cVar34 = UNK_0015e91f;
cVar33 = UNK_0015e91e;
cVar32 = UNK_0015e91d;
cVar31 = UNK_0015e91c;
cVar30 = UNK_0015e91b;
cVar29 = UNK_0015e91a;
cVar28 = UNK_0015e919;
cVar27 = UNK_0015e918;
cVar26 = UNK_0015e917;
cVar25 = UNK_0015e916;
cVar24 = UNK_0015e915;
cVar23 = UNK_0015e914;
cVar22 = UNK_0015e913;
cVar21 = UNK_0015e912;
cVar20 = UNK_0015e911;
cVar19 = DAT_0015e910;
lVar69 = -0x100;
do {
pcVar1 = puVar67 + 0x100 + lVar69;
cVar4 = pcVar1[1];
cVar5 = pcVar1[2];
cVar6 = pcVar1[3];
cVar7 = pcVar1[4];
cVar8 = pcVar1[5];
cVar9 = pcVar1[6];
cVar10 = pcVar1[7];
cVar11 = pcVar1[8];
cVar12 = pcVar1[9];
cVar13 = pcVar1[10];
cVar14 = pcVar1[0xb];
cVar15 = pcVar1[0xc];
cVar16 = pcVar1[0xd];
cVar17 = pcVar1[0xe];
cVar18 = pcVar1[0xf];
pbVar2 = puVar67 + lVar69 + 0x200;
*pbVar2 = (-(*pcVar1 == cVar35) | -(*pcVar1 == cVar19)) & bVar3;
pbVar2[1] = (-(cVar4 == cVar36) | -(cVar4 == cVar20)) & bVar51;
pbVar2[2] = (-(cVar5 == cVar37) | -(cVar5 == cVar21)) & bVar52;
pbVar2[3] = (-(cVar6 == cVar38) | -(cVar6 == cVar22)) & bVar53;
pbVar2[4] = (-(cVar7 == cVar39) | -(cVar7 == cVar23)) & bVar54;
pbVar2[5] = (-(cVar8 == cVar40) | -(cVar8 == cVar24)) & bVar55;
pbVar2[6] = (-(cVar9 == cVar41) | -(cVar9 == cVar25)) & bVar56;
pbVar2[7] = (-(cVar10 == cVar42) | -(cVar10 == cVar26)) & bVar57;
pbVar2[8] = (-(cVar11 == cVar43) | -(cVar11 == cVar27)) & bVar58;
pbVar2[9] = (-(cVar12 == cVar44) | -(cVar12 == cVar28)) & bVar59;
pbVar2[10] = (-(cVar13 == cVar45) | -(cVar13 == cVar29)) & bVar60;
pbVar2[0xb] = (-(cVar14 == cVar46) | -(cVar14 == cVar30)) & bVar61;
pbVar2[0xc] = (-(cVar15 == cVar47) | -(cVar15 == cVar31)) & bVar62;
pbVar2[0xd] = (-(cVar16 == cVar48) | -(cVar16 == cVar32)) & bVar63;
pbVar2[0xe] = (-(cVar17 == cVar49) | -(cVar17 == cVar33)) & bVar64;
pbVar2[0xf] = (-(cVar18 == cVar50) | -(cVar18 == cVar34)) & bVar65;
lVar69 = lVar69 + 0x10;
} while (lVar69 != 0);
puVar67[0x58] = 0x1e;
puVar67[0x78] = 0x1e;
puVar67[0x42] = 0x1f;
puVar67[0x62] = 0x1f;
puVar67[0x4e] = 0x20;
puVar67[0x6e] = 0x20;
uVar68 = 0;
}
return uVar68;
}
|
|
18,715
|
bf_ziv_rounding
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_ziv_rounding(bf_t *r, const bf_t *a,
limb_t prec, bf_flags_t flags,
ZivFunc *f, void *opaque)
{
int rnd_mode, ret;
slimb_t prec1, ziv_extra_bits;
rnd_mode = flags & BF_RND_MASK;
if (rnd_mode == BF_RNDF) {
/* no need to iterate */
f(r, a, prec, opaque);
ret = 0;
} else {
ziv_extra_bits = 32;
for(;;) {
prec1 = prec + ziv_extra_bits;
ret = f(r, a, prec1, opaque);
if (ret & (BF_ST_OVERFLOW | BF_ST_UNDERFLOW | BF_ST_MEM_ERROR)) {
/* overflow or underflow should never happen because
it indicates the rounding cannot be done correctly,
but we do not catch all the cases */
return ret;
}
/* if the result is exact, we can stop */
if (!(ret & BF_ST_INEXACT)) {
ret = 0;
break;
}
if (bf_can_round(r, prec, rnd_mode, prec1)) {
ret = BF_ST_INEXACT;
break;
}
ziv_extra_bits = ziv_extra_bits * 2;
// printf("ziv_extra_bits=%" PRId64 "\n", (int64_t)ziv_extra_bits);
}
}
if (r->len == 0)
return ret;
else
return __bf_round(r, prec, flags, r->len, ret);
}
|
O0
|
c
|
bf_ziv_rounding:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movq %r8, 0x28(%rsp)
movq %r9, 0x20(%rsp)
movl 0x34(%rsp), %eax
andl $0x7, %eax
movl %eax, 0x1c(%rsp)
cmpl $0x6, 0x1c(%rsp)
jne 0xee53b
movq 0x28(%rsp), %rax
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq *%rax
movl $0x0, 0x18(%rsp)
jmp 0xee5dc
movq $0x20, 0x8(%rsp)
movq 0x38(%rsp), %rax
addq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq *%rax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
andl $0x2c, %eax
cmpl $0x0, %eax
je 0xee58b
movl 0x18(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xee617
movl 0x18(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0xee5a1
movl $0x0, 0x18(%rsp)
jmp 0xee5da
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x1c(%rsp), %edx
movq 0x10(%rsp), %rcx
callq 0xe6ae0
cmpl $0x0, %eax
je 0xee5c8
movl $0x10, 0x18(%rsp)
jmp 0xee5da
movq 0x8(%rsp), %rax
shlq %rax
movq %rax, 0x8(%rsp)
jmp 0xee544
jmp 0xee5dc
movq 0x48(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xee5f2
movl 0x18(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xee617
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x34(%rsp), %edx
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rcx
movl 0x18(%rsp), %r8d
callq 0xe65c0
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
|
bf_ziv_rounding:
sub rsp, 58h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_20], rdx
mov [rsp+58h+var_24], ecx
mov [rsp+58h+var_30], r8
mov [rsp+58h+var_38], r9
mov eax, [rsp+58h+var_24]
and eax, 7
mov [rsp+58h+var_3C], eax
cmp [rsp+58h+var_3C], 6
jnz short loc_EE53B
mov rax, [rsp+58h+var_30]
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_20]
mov rcx, [rsp+58h+var_38]
call rax
mov [rsp+58h+var_40], 0
jmp loc_EE5DC
loc_EE53B:
mov [rsp+58h+var_50], 20h ; ' '
loc_EE544:
mov rax, [rsp+58h+var_20]
add rax, [rsp+58h+var_50]
mov [rsp+58h+var_48], rax
mov rax, [rsp+58h+var_30]
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_48]
mov rcx, [rsp+58h+var_38]
call rax
mov [rsp+58h+var_40], eax
mov eax, [rsp+58h+var_40]
and eax, 2Ch
cmp eax, 0
jz short loc_EE58B
mov eax, [rsp+58h+var_40]
mov [rsp+58h+var_4], eax
jmp loc_EE617
loc_EE58B:
mov eax, [rsp+58h+var_40]
and eax, 10h
cmp eax, 0
jnz short loc_EE5A1
mov [rsp+58h+var_40], 0
jmp short loc_EE5DA
loc_EE5A1:
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_20]
mov edx, [rsp+58h+var_3C]
mov rcx, [rsp+58h+var_48]
call bf_can_round
cmp eax, 0
jz short loc_EE5C8
mov [rsp+58h+var_40], 10h
jmp short loc_EE5DA
loc_EE5C8:
mov rax, [rsp+58h+var_50]
shl rax, 1
mov [rsp+58h+var_50], rax
jmp loc_EE544
loc_EE5DA:
jmp short $+2
loc_EE5DC:
mov rax, [rsp+58h+var_10]
cmp qword ptr [rax+18h], 0
jnz short loc_EE5F2
mov eax, [rsp+58h+var_40]
mov [rsp+58h+var_4], eax
jmp short loc_EE617
loc_EE5F2:
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_20]
mov edx, [rsp+58h+var_24]
mov rax, [rsp+58h+var_10]
mov rcx, [rax+18h]
mov r8d, [rsp+58h+var_40]
call __bf_round
mov [rsp+58h+var_4], eax
loc_EE617:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
|
long long bf_ziv_rounding(
_QWORD *a1,
long long a2,
long long a3,
unsigned int a4,
void ( *a5)(_QWORD *, long long, long long, long long),
long long a6)
{
long long i; // [rsp+8h] [rbp-50h]
unsigned int v8; // [rsp+18h] [rbp-40h]
unsigned int v9; // [rsp+18h] [rbp-40h]
int v10; // [rsp+1Ch] [rbp-3Ch]
v10 = a4 & 7;
if ( v10 == 6 )
{
a5(a1, a2, a3, a6);
v8 = 0;
}
else
{
for ( i = 32LL; ; i *= 2LL )
{
v9 = ((long long ( *)(_QWORD *, long long, long long, long long))a5)(a1, a2, i + a3, a6);
if ( (v9 & 0x2C) != 0 )
return v9;
if ( (v9 & 0x10) == 0 )
{
v8 = 0;
goto LABEL_11;
}
if ( bf_can_round(a1, a3, v10, i + a3) )
break;
}
v8 = 16;
}
LABEL_11:
if ( a1[3] )
return (unsigned int)_bf_round(a1, a3, a4, a1[3], v8);
else
return v8;
}
|
bf_ziv_rounding:
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV dword ptr [RSP + 0x34],ECX
MOV qword ptr [RSP + 0x28],R8
MOV qword ptr [RSP + 0x20],R9
MOV EAX,dword ptr [RSP + 0x34]
AND EAX,0x7
MOV dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x1c],0x6
JNZ 0x001ee53b
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x20]
CALL RAX
MOV dword ptr [RSP + 0x18],0x0
JMP 0x001ee5dc
LAB_001ee53b:
MOV qword ptr [RSP + 0x8],0x20
LAB_001ee544:
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x20]
CALL RAX
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0x18]
AND EAX,0x2c
CMP EAX,0x0
JZ 0x001ee58b
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001ee617
LAB_001ee58b:
MOV EAX,dword ptr [RSP + 0x18]
AND EAX,0x10
CMP EAX,0x0
JNZ 0x001ee5a1
MOV dword ptr [RSP + 0x18],0x0
JMP 0x001ee5da
LAB_001ee5a1:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x1c]
MOV RCX,qword ptr [RSP + 0x10]
CALL 0x001e6ae0
CMP EAX,0x0
JZ 0x001ee5c8
MOV dword ptr [RSP + 0x18],0x10
JMP 0x001ee5da
LAB_001ee5c8:
MOV RAX,qword ptr [RSP + 0x8]
SHL RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001ee544
LAB_001ee5da:
JMP 0x001ee5dc
LAB_001ee5dc:
MOV RAX,qword ptr [RSP + 0x48]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001ee5f2
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001ee617
LAB_001ee5f2:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x34]
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RAX + 0x18]
MOV R8D,dword ptr [RSP + 0x18]
CALL 0x001e65c0
MOV dword ptr [RSP + 0x54],EAX
LAB_001ee617:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
uint bf_ziv_rounding(long param_1,int8 param_2,long param_3,uint param_4,code *param_5,
int8 param_6)
{
int iVar1;
int8 local_50;
int4 local_40;
int4 local_4;
if ((param_4 & 7) == 6) {
(*param_5)(param_1,param_2,param_3,param_6);
local_40 = 0;
LAB_001ee5dc:
if (*(long *)(param_1 + 0x18) == 0) {
local_4 = local_40;
}
else {
local_4 = __bf_round(param_1,param_3,param_4,*(int8 *)(param_1 + 0x18),local_40);
}
}
else {
local_50 = 0x20;
while( true ) {
local_4 = (*param_5)(param_1,param_2,param_3 + local_50,param_6);
if ((local_4 & 0x2c) != 0) break;
if ((local_4 & 0x10) == 0) {
local_40 = 0;
goto LAB_001ee5dc;
}
iVar1 = bf_can_round(param_1,param_3,param_4 & 7,param_3 + local_50);
if (iVar1 != 0) {
local_40 = 0x10;
goto LAB_001ee5dc;
}
local_50 = local_50 << 1;
}
}
return local_4;
}
|
|
18,716
|
bf_ziv_rounding
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_ziv_rounding(bf_t *r, const bf_t *a,
limb_t prec, bf_flags_t flags,
ZivFunc *f, void *opaque)
{
int rnd_mode, ret;
slimb_t prec1, ziv_extra_bits;
rnd_mode = flags & BF_RND_MASK;
if (rnd_mode == BF_RNDF) {
/* no need to iterate */
f(r, a, prec, opaque);
ret = 0;
} else {
ziv_extra_bits = 32;
for(;;) {
prec1 = prec + ziv_extra_bits;
ret = f(r, a, prec1, opaque);
if (ret & (BF_ST_OVERFLOW | BF_ST_UNDERFLOW | BF_ST_MEM_ERROR)) {
/* overflow or underflow should never happen because
it indicates the rounding cannot be done correctly,
but we do not catch all the cases */
return ret;
}
/* if the result is exact, we can stop */
if (!(ret & BF_ST_INEXACT)) {
ret = 0;
break;
}
if (bf_can_round(r, prec, rnd_mode, prec1)) {
ret = BF_ST_INEXACT;
break;
}
ziv_extra_bits = ziv_extra_bits * 2;
// printf("ziv_extra_bits=%" PRId64 "\n", (int64_t)ziv_extra_bits);
}
}
if (r->len == 0)
return ret;
else
return __bf_round(r, prec, flags, r->len, ret);
}
|
O1
|
c
|
bf_ziv_rounding:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r13d
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %r15
movl %ecx, %ebx
andl $0x7, %ebx
cmpl $0x6, %ebx
jne 0x8ad23
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r9, %rcx
callq *%r8
xorl %eax, %eax
jmp 0x8ad94
leaq 0x20(%r14), %r12
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r9, %rcx
movq %r9, 0x8(%rsp)
movq %r8, 0x10(%rsp)
callq *%r8
testb $0x2c, %al
jne 0x8adbc
movl %r13d, 0x4(%rsp)
movl $0x20, %r13d
testb $0x10, %al
je 0x8ad86
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
callq 0x851e7
testl %eax, %eax
jne 0x8ad8a
leaq (%r14,%r13,2), %r12
addq %r13, %r13
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq 0x8(%rsp), %rcx
callq *0x10(%rsp)
testb $0x2c, %al
je 0x8ad4f
jmp 0x8adbc
xorl %eax, %eax
jmp 0x8ad8f
movl $0x10, %eax
movl 0x4(%rsp), %r13d
movq 0x18(%r15), %rcx
testq %rcx, %rcx
je 0x8adbc
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
movl %eax, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x84e26
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_ziv_rounding:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13d, ecx
mov r14, rdx
mov rbp, rsi
mov r15, rdi
mov ebx, ecx
and ebx, 7
cmp ebx, 6
jnz short loc_8AD23
mov rdi, r15
mov rsi, rbp
mov rdx, r14
mov rcx, r9
call r8 ; bf_exp_internal
xor eax, eax
jmp short loc_8AD94
loc_8AD23:
lea r12, [r14+20h]
mov rdi, r15
mov rsi, rbp
mov rdx, r12
mov rcx, r9
mov [rsp+48h+var_40], r9
mov [rsp+48h+var_38], r8
call r8 ; bf_exp_internal
test al, 2Ch
jnz short loc_8ADBC
mov [rsp+48h+var_44], r13d
mov r13d, 20h ; ' '
loc_8AD4F:
test al, 10h
jz short loc_8AD86
mov rdi, r15
mov rsi, r14
mov edx, ebx
mov rcx, r12
call bf_can_round
test eax, eax
jnz short loc_8AD8A
lea r12, [r14+r13*2]
add r13, r13
mov rdi, r15
mov rsi, rbp
mov rdx, r12
mov rcx, [rsp+48h+var_40]
call [rsp+48h+var_38]
test al, 2Ch
jz short loc_8AD4F
jmp short loc_8ADBC
loc_8AD86:
xor eax, eax
jmp short loc_8AD8F
loc_8AD8A:
mov eax, 10h
loc_8AD8F:
mov r13d, [rsp+48h+var_44]
loc_8AD94:
mov rcx, [r15+18h]
test rcx, rcx
jz short loc_8ADBC
mov rdi, r15
mov rsi, r14
mov edx, r13d
mov r8d, eax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __bf_round
loc_8ADBC:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_ziv_rounding(
_QWORD *a1,
long long a2,
long long a3,
unsigned int a4,
void ( *a5)(_QWORD *, long long, long long, long long),
long long a6)
{
unsigned int v6; // r13d
int v8; // ebx
long long result; // rax
long long v10; // r12
long long i; // r13
unsigned long long v12; // rcx
unsigned int v13; // [rsp+4h] [rbp-44h]
v6 = a4;
v8 = a4 & 7;
if ( v8 == 6 )
{
a5(a1, a2, a3, a6);
result = 0LL;
}
else
{
v10 = a3 + 32;
result = ((long long ( *)(_QWORD *, long long, long long, long long))a5)(a1, a2, a3 + 32, a6);
if ( (result & 0x2C) != 0 )
return result;
v13 = v6;
for ( i = 32LL; ; i *= 2LL )
{
if ( (result & 0x10) == 0 )
{
result = 0LL;
goto LABEL_11;
}
if ( bf_can_round(a1, a3, v8, v10) )
break;
v10 = a3 + 2 * i;
result = ((long long ( *)(_QWORD *, long long, long long, long long))a5)(a1, a2, v10, a6);
if ( (result & 0x2C) != 0 )
return result;
}
result = 16LL;
LABEL_11:
v6 = v13;
}
v12 = a1[3];
if ( v12 )
return _bf_round((long long)a1, a3, v6, v12, result);
return result;
}
| |||
18,717
|
bf_ziv_rounding
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_ziv_rounding(bf_t *r, const bf_t *a,
limb_t prec, bf_flags_t flags,
ZivFunc *f, void *opaque)
{
int rnd_mode, ret;
slimb_t prec1, ziv_extra_bits;
rnd_mode = flags & BF_RND_MASK;
if (rnd_mode == BF_RNDF) {
/* no need to iterate */
f(r, a, prec, opaque);
ret = 0;
} else {
ziv_extra_bits = 32;
for(;;) {
prec1 = prec + ziv_extra_bits;
ret = f(r, a, prec1, opaque);
if (ret & (BF_ST_OVERFLOW | BF_ST_UNDERFLOW | BF_ST_MEM_ERROR)) {
/* overflow or underflow should never happen because
it indicates the rounding cannot be done correctly,
but we do not catch all the cases */
return ret;
}
/* if the result is exact, we can stop */
if (!(ret & BF_ST_INEXACT)) {
ret = 0;
break;
}
if (bf_can_round(r, prec, rnd_mode, prec1)) {
ret = BF_ST_INEXACT;
break;
}
ziv_extra_bits = ziv_extra_bits * 2;
// printf("ziv_extra_bits=%" PRId64 "\n", (int64_t)ziv_extra_bits);
}
}
if (r->len == 0)
return ret;
else
return __bf_round(r, prec, flags, r->len, ret);
}
|
O2
|
c
|
bf_ziv_rounding:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r12d
movq %rdx, %r14
movq %rdi, %rbx
movl %ecx, %eax
andl $0x7, %eax
movl %eax, 0x4(%rsp)
cmpl $0x6, %eax
jne 0x744ba
movq %rbx, %rdi
movq %r14, %rdx
movq %r9, %rcx
callq *%r8
xorl %r8d, %r8d
jmp 0x74527
movl %r12d, (%rsp)
pushq $0x20
popq %r13
movq %r9, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %r14, %r15
leaq (%r14,%r13), %r12
movq %rbx, %rdi
movq %r12, %rdx
movq %r9, %rcx
movq %r8, %rbp
callq *%r8
testb $0x2c, %al
jne 0x7454f
testb $0x10, %al
je 0x7451d
movq %rbx, %rdi
movq %r15, %rsi
movl 0x4(%rsp), %edx
movq %r12, %rcx
callq 0x6fb30
addq %r13, %r13
testl %eax, %eax
movq %rbp, %r8
movq 0x10(%rsp), %r9
movq %r15, %r14
movq 0x8(%rsp), %rsi
je 0x744cc
movl (%rsp), %r12d
pushq $0x10
popq %r8
jmp 0x74527
xorl %r8d, %r8d
movl (%rsp), %r12d
movq %r15, %r14
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x7454c
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6f7b0
movl %r8d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_ziv_rounding:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12d, ecx
mov r14, rdx
mov rbx, rdi
mov eax, ecx
and eax, 7
mov [rsp+48h+var_44], eax
cmp eax, 6
jnz short loc_744BA
mov rdi, rbx
mov rdx, r14
mov rcx, r9
call r8 ; bf_exp_internal
xor r8d, r8d
jmp short loc_74527
loc_744BA:
mov [rsp+48h+var_48], r12d
push 20h ; ' '
pop r13
mov [rsp+48h+var_38], r9
mov [rsp+48h+var_40], rsi
loc_744CC:
mov r15, r14
lea r12, [r14+r13]
mov rdi, rbx
mov rdx, r12
mov rcx, r9
mov rbp, r8
call r8 ; bf_exp_internal
test al, 2Ch
jnz short loc_7454F
test al, 10h
jz short loc_7451D
mov rdi, rbx
mov rsi, r15
mov edx, [rsp+48h+var_44]
mov rcx, r12
call bf_can_round
add r13, r13
test eax, eax
mov r8, rbp
mov r9, [rsp+48h+var_38]
mov r14, r15
mov rsi, [rsp+48h+var_40]
jz short loc_744CC
mov r12d, [rsp+48h+var_48]
push 10h
pop r8
jmp short loc_74527
loc_7451D:
xor r8d, r8d
mov r12d, [rsp+48h+var_48]
mov r14, r15
loc_74527:
mov rcx, [rbx+18h]
test rcx, rcx
jz short loc_7454C
mov rdi, rbx
mov rsi, r14
mov edx, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __bf_round
loc_7454C:
mov eax, r8d
loc_7454F:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_ziv_rounding(
_QWORD *a1,
long long a2,
long long a3,
unsigned int a4,
void ( *a5)(_QWORD *, long long, long long, long long),
long long a6)
{
long long v8; // r8
long long v9; // r13
void ( *v10)(_QWORD *, long long, long long, long long); // rbp
long long result; // rax
BOOL can_round; // eax
unsigned long long v13; // rcx
int v14; // [rsp+4h] [rbp-44h]
long long v15; // [rsp+8h] [rbp-40h]
long long v16; // [rsp+10h] [rbp-38h]
v14 = a4 & 7;
if ( v14 == 6 )
{
a5(a1, a2, a3, a6);
v8 = 0LL;
LABEL_9:
v13 = a1[3];
if ( v13 )
return _bf_round((long long)a1, a3, a4, v13, v8);
else
return (unsigned int)v8;
}
else
{
v9 = 32LL;
v16 = a6;
v15 = a2;
while ( 1 )
{
v10 = a5;
result = ((long long ( *)(_QWORD *, long long, long long, long long))a5)(a1, a2, a3 + v9, a6);
if ( (result & 0x2C) != 0 )
break;
if ( (result & 0x10) == 0 )
{
v8 = 0LL;
goto LABEL_9;
}
can_round = bf_can_round(a1, a3, v14, a3 + v9);
v9 *= 2LL;
a5 = v10;
a6 = v16;
a2 = v15;
if ( can_round )
{
v8 = 16LL;
goto LABEL_9;
}
}
}
return result;
}
|
bf_ziv_rounding:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12D,ECX
MOV R14,RDX
MOV RBX,RDI
MOV EAX,ECX
AND EAX,0x7
MOV dword ptr [RSP + 0x4],EAX
CMP EAX,0x6
JNZ 0x001744ba
MOV RDI,RBX
MOV RDX,R14
MOV RCX,R9
CALL R8
XOR R8D,R8D
JMP 0x00174527
LAB_001744ba:
MOV dword ptr [RSP],R12D
PUSH 0x20
POP R13
MOV qword ptr [RSP + 0x10],R9
MOV qword ptr [RSP + 0x8],RSI
LAB_001744cc:
MOV R15,R14
LEA R12,[R14 + R13*0x1]
MOV RDI,RBX
MOV RDX,R12
MOV RCX,R9
MOV RBP,R8
CALL R8
TEST AL,0x2c
JNZ 0x0017454f
TEST AL,0x10
JZ 0x0017451d
MOV RDI,RBX
MOV RSI,R15
MOV EDX,dword ptr [RSP + 0x4]
MOV RCX,R12
CALL 0x0016fb30
ADD R13,R13
TEST EAX,EAX
MOV R8,RBP
MOV R9,qword ptr [RSP + 0x10]
MOV R14,R15
MOV RSI,qword ptr [RSP + 0x8]
JZ 0x001744cc
MOV R12D,dword ptr [RSP]
PUSH 0x10
POP R8
JMP 0x00174527
LAB_0017451d:
XOR R8D,R8D
MOV R12D,dword ptr [RSP]
MOV R14,R15
LAB_00174527:
MOV RCX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x0017454c
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0016f7b0
LAB_0017454c:
MOV EAX,R8D
LAB_0017454f:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong bf_ziv_rounding(long param_1,int8 param_2,long param_3,uint param_4,code *param_5,
int8 param_6)
{
int iVar1;
ulong uVar2;
long lVar3;
if ((param_4 & 7) == 6) {
(*param_5)(param_1,param_2,param_3,param_6);
uVar2 = 0;
}
else {
lVar3 = 0x20;
do {
uVar2 = (*param_5)(param_1,param_2,param_3 + lVar3,param_6);
if ((uVar2 & 0x2c) != 0) {
return uVar2;
}
if ((uVar2 & 0x10) == 0) {
uVar2 = 0;
goto LAB_00174527;
}
iVar1 = bf_can_round(param_1,param_3,param_4 & 7,param_3 + lVar3);
lVar3 = lVar3 * 2;
} while (iVar1 == 0);
uVar2 = 0x10;
}
LAB_00174527:
if (*(long *)(param_1 + 0x18) == 0) {
return uVar2;
}
uVar2 = __bf_round(param_1,param_3,param_4);
return uVar2;
}
|
|
18,718
|
JS_AddIntrinsicBigInt
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicBigInt(JSContext *ctx)
{
JSValue obj1;
ctx->class_proto[JS_CLASS_BIG_INT] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_BIG_INT],
js_bigint_proto_funcs,
countof(js_bigint_proto_funcs));
obj1 = JS_NewGlobalCConstructor(ctx, "BigInt", js_bigint_constructor, 1,
ctx->class_proto[JS_CLASS_BIG_INT]);
JS_SetPropertyFunctionList(ctx, obj1, js_bigint_funcs,
countof(js_bigint_funcs));
}
|
O2
|
c
|
JS_AddIntrinsicBigInt:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %r14
callq 0x1ee79
movq %rax, 0x220(%r14)
movq %rdx, 0x228(%r14)
movq 0x40(%rbx), %rax
movq 0x220(%rax), %rsi
movq 0x228(%rax), %rdx
leaq 0x9e5af(%rip), %rcx # 0xbbdf0
pushq $0x3
popq %r8
movq %rbx, %rdi
callq 0x2ffaf
movq 0x40(%rbx), %rax
movq 0x220(%rax), %r8
movq 0x228(%rax), %r9
leaq 0x6e140(%rip), %rsi # 0x8b9a6
leaq 0x173a5(%rip), %rdx # 0x34c12
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0x3093c
leaq 0x9c631(%rip), %rcx # 0xb9eb0
pushq $0x2
popq %r8
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2ffaf
|
JS_AddIntrinsicBigInt:
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+40h]
call JS_NewObject
mov [r14+220h], rax
mov [r14+228h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+220h]
mov rdx, [rax+228h]
lea rcx, js_bigint_proto_funcs
push 3
pop r8
mov rdi, rbx
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov r8, [rax+220h]
mov r9, [rax+228h]
lea rsi, aNotABigint+6; "BigInt"
lea rdx, js_bigint_constructor
push 1
pop rcx
mov rdi, rbx
call JS_NewGlobalCConstructor
lea rcx, js_bigint_funcs
push 2
pop r8
mov rdi, rbx
mov rsi, rax
add rsp, 8
pop rbx
pop r14
jmp JS_SetPropertyFunctionList
|
long long JS_AddIntrinsicBigInt(long long a1)
{
long long v1; // r14
long long v2; // rdx
long long v3; // rax
long long v4; // rdx
v1 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(v1 + 544) = JS_NewObject(a1);
*(_QWORD *)(v1 + 552) = v2;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 544LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 552LL),
&js_bigint_proto_funcs,
3LL);
v3 = JS_NewGlobalCConstructor(
a1,
"BigInt",
js_bigint_constructor,
1LL,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 544LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 552LL));
return JS_SetPropertyFunctionList(a1, v3, v4, &js_bigint_funcs, 2LL);
}
|
JS_AddIntrinsicBigInt:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x40]
CALL 0x0011ee79
MOV qword ptr [R14 + 0x220],RAX
MOV qword ptr [R14 + 0x228],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x220]
MOV RDX,qword ptr [RAX + 0x228]
LEA RCX,[0x1bbdf0]
PUSH 0x3
POP R8
MOV RDI,RBX
CALL 0x0012ffaf
MOV RAX,qword ptr [RBX + 0x40]
MOV R8,qword ptr [RAX + 0x220]
MOV R9,qword ptr [RAX + 0x228]
LEA RSI,[0x18b9a6]
LEA RDX,[0x134c12]
PUSH 0x1
POP RCX
MOV RDI,RBX
CALL 0x0013093c
LEA RCX,[0x1b9eb0]
PUSH 0x2
POP R8
MOV RDI,RBX
MOV RSI,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0012ffaf
|
void JS_AddIntrinsicBigInt(long param_1)
{
long lVar1;
int1 auVar2 [16];
lVar1 = *(long *)(param_1 + 0x40);
auVar2 = JS_NewObject();
*(int1 (*) [16])(lVar1 + 0x220) = auVar2;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x220),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x228),js_bigint_proto_funcs,3);
auVar2 = JS_NewGlobalCConstructor
(param_1,"BigInt",js_bigint_constructor,1,
*(int8 *)(*(long *)(param_1 + 0x40) + 0x220),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x228));
JS_SetPropertyFunctionList(param_1,auVar2._0_8_,auVar2._8_8_,js_bigint_funcs,2);
return;
}
|
|
18,719
|
my_strxfrm_pad_nweights_unicode
|
eloqsql/strings/ctype-utf8.c
|
size_t
my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights)
{
uchar *str0;
DBUG_ASSERT(str && str <= strend);
for (str0= str; str < strend && nweights; nweights--)
{
*str++= 0x00;
if (str < strend)
*str++= 0x20;
}
return str - str0;
}
|
O0
|
c
|
my_strxfrm_pad_nweights_unicode:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x64292
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x21(%rbp)
jae 0x642b4
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x642bd
jmp 0x642fb
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x642eb
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x20, (%rax)
jmp 0x642ed
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6429a
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopl (%rax,%rax)
|
my_strxfrm_pad_nweights_unicode:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_64292:
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
loc_6429A:
mov rcx, [rbp+var_8]
xor eax, eax
cmp rcx, [rbp+var_10]
mov [rbp+var_21], al
jnb short loc_642B4
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_21], al
loc_642B4:
mov al, [rbp+var_21]
test al, 1
jnz short loc_642BD
jmp short loc_642FB
loc_642BD:
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
cmp rax, [rbp+var_10]
jnb short loc_642EB
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 20h ; ' '
loc_642EB:
jmp short $+2
loc_642ED:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_6429A
loc_642FB:
mov rax, [rbp+var_8]
mov rcx, [rbp+var_20]
sub rax, rcx
pop rbp
retn
|
_BYTE * my_strxfrm_pad_nweights_unicode(_BYTE *a1, unsigned long long a2, long long a3)
{
_BYTE *v3; // rax
_BYTE *v4; // rax
bool v6; // [rsp+1h] [rbp-21h]
_BYTE *v8; // [rsp+1Ah] [rbp-8h]
v8 = a1;
while ( 1 )
{
v6 = 0;
if ( (unsigned long long)v8 < a2 )
v6 = a3 != 0;
if ( !v6 )
break;
v3 = v8++;
*v3 = 0;
if ( (unsigned long long)v8 < a2 )
{
v4 = v8++;
*v4 = 32;
}
--a3;
}
return (_BYTE *)(v8 - a1);
}
|
my_strxfrm_pad_nweights_unicode:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x00164292
LAB_00164292:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_0016429a:
MOV RCX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x10]
MOV byte ptr [RBP + -0x21],AL
JNC 0x001642b4
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_001642b4:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x001642bd
JMP 0x001642fb
LAB_001642bd:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x001642eb
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x20
LAB_001642eb:
JMP 0x001642ed
LAB_001642ed:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016429a
LAB_001642fb:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
POP RBP
RET
|
long my_strxfrm_pad_nweights_unicode(int1 *param_1,int1 *param_2,long param_3)
{
int1 *puVar1;
long local_20;
int1 *local_10;
local_10 = param_1;
for (local_20 = param_3; local_10 < param_2 && local_20 != 0; local_20 = local_20 + -1) {
puVar1 = local_10 + 1;
*local_10 = 0;
if (puVar1 < param_2) {
*puVar1 = 0x20;
puVar1 = local_10 + 2;
}
local_10 = puVar1;
}
return (long)local_10 - (long)param_1;
}
|
|
18,720
|
maria_reset
|
eloqsql/storage/maria/ma_extra.c
|
int maria_reset(MARIA_HA *info)
{
int error= 0;
MARIA_SHARE *share= info->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("maria_reset");
/*
Free buffers and reset the following flags:
EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK
If the row buffer cache is large (for dynamic tables), reduce it
to save memory.
*/
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
error= end_io_cache(&info->rec_cache);
}
/* Free memory used for keeping blobs */
if (share->base.blobs)
{
if (info->rec_buff_size > share->base.default_rec_buff_size)
{
info->rec_buff_size= 1; /* Force realloc */
_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
share->base.default_rec_buff_size, flag);
}
if (info->blob_buff_size > MARIA_SMALL_BLOB_BUFFER)
{
info->blob_buff_size= 1; /* Force realloc */
_ma_alloc_buffer(&info->blob_buff, &info->blob_buff_size,
MARIA_SMALL_BLOB_BUFFER, flag);
}
}
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
if (info->opt_flag & MEMMAP_USED)
madvise((char*) share->file_map, share->state.state.data_file_length,
MADV_RANDOM);
#endif
info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS);
info->quick_mode= 0;
info->lastinx= ~0; /* detect index changes */
info->last_search_keypage= info->cur_row.lastpos= HA_OFFSET_ERROR;
info->page_changed= 1;
info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND |
HA_STATE_PREV_FOUND);
info->error_count= 0;
DBUG_RETURN(error);
}
|
O0
|
c
|
maria_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl 0x7d9(%rax), %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl $0x10, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x12, %eax
cmpl $0x0, %eax
je 0x33047
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %ecx
andl $-0x13, %ecx
movl %ecx, 0x61c(%rax)
movq -0x8(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
callq 0xe21e0
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x3f0(%rax)
je 0x330f2
movq -0x8(%rbp), %rax
movq 0x460(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x420(%rcx), %ecx
cmpq %rcx, %rax
jbe 0x330ac
movq -0x8(%rbp), %rax
movq $0x1, 0x460(%rax)
movq -0x8(%rbp), %rdi
addq $0x3a0, %rdi # imm = 0x3A0
movq -0x8(%rbp), %rsi
addq $0x460, %rsi # imm = 0x460
movq -0x18(%rbp), %rax
movl 0x420(%rax), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
callq 0x654c0
movq -0x8(%rbp), %rax
cmpq $0x400, 0x468(%rax) # imm = 0x400
jbe 0x330f0
movq -0x8(%rbp), %rax
movq $0x1, 0x468(%rax)
movq -0x8(%rbp), %rdi
addq $0x3a8, %rdi # imm = 0x3A8
movq -0x8(%rbp), %rsi
addq $0x468, %rsi # imm = 0x468
movq -0x20(%rbp), %rcx
movl $0x400, %edx # imm = 0x400
callq 0x654c0
jmp 0x330f2
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x33121
movq -0x18(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
movl $0x1, %edx
callq 0x2a460
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %ecx
andl $-0x49, %ecx
movl %ecx, 0x61c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x682(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x62c(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq $-0x1, 0x98(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x448(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x8(%rbp), %rax
movl 0x624(%rax), %ecx
andl $0x1, %ecx
orl $0x10, %ecx
orl $0x20, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x624(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x628(%rax)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
|
maria_reset:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movsx edx, byte ptr [rax+7D9h]
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
or eax, 10h
mov eax, eax
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
mov eax, [rax+61Ch]
and eax, 12h
cmp eax, 0
jz short loc_33047
mov rax, [rbp+var_8]
mov ecx, [rax+61Ch]
and ecx, 0FFFFFFEDh
mov [rax+61Ch], ecx
mov rdi, [rbp+var_8]
add rdi, 4B8h
call end_io_cache
mov [rbp+var_C], eax
loc_33047:
mov rax, [rbp+var_18]
cmp dword ptr [rax+3F0h], 0
jz loc_330F2
mov rax, [rbp+var_8]
mov rax, [rax+460h]
mov rcx, [rbp+var_18]
mov ecx, [rcx+420h]
cmp rax, rcx
jbe short loc_330AC
mov rax, [rbp+var_8]
mov qword ptr [rax+460h], 1
mov rdi, [rbp+var_8]
add rdi, 3A0h
mov rsi, [rbp+var_8]
add rsi, 460h
mov rax, [rbp+var_18]
mov eax, [rax+420h]
mov edx, eax
mov rcx, [rbp+var_20]
call _ma_alloc_buffer
loc_330AC:
mov rax, [rbp+var_8]
cmp qword ptr [rax+468h], 400h
jbe short loc_330F0
mov rax, [rbp+var_8]
mov qword ptr [rax+468h], 1
mov rdi, [rbp+var_8]
add rdi, 3A8h
mov rsi, [rbp+var_8]
add rsi, 468h
mov rcx, [rbp+var_20]
mov edx, 400h
call _ma_alloc_buffer
loc_330F0:
jmp short $+2
loc_330F2:
mov rax, [rbp+var_8]
mov eax, [rax+61Ch]
and eax, 20h
cmp eax, 0
jz short loc_33121
mov rax, [rbp+var_18]
mov rdi, [rax+5F0h]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
mov edx, 1
call _madvise
loc_33121:
mov rax, [rbp+var_8]
mov ecx, [rax+61Ch]
and ecx, 0FFFFFFB7h
mov [rax+61Ch], ecx
mov rax, [rbp+var_8]
mov byte ptr [rax+682h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+62Ch], 0FFFFFFFFh
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov qword ptr [rax+448h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov byte ptr [rax+684h], 1
mov rax, [rbp+var_8]
mov ecx, [rax+624h]
and ecx, 1
or ecx, 10h
or ecx, 20h
mov rax, [rbp+var_8]
mov [rax+624h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+628h], 0
mov eax, [rbp+var_C]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
add rsp, 30h
pop rbp
retn
|
long long maria_reset(long long *a1)
{
int v1; // eax
long long v3; // [rsp+10h] [rbp-20h]
long long v4; // [rsp+18h] [rbp-18h]
unsigned int v5; // [rsp+24h] [rbp-Ch]
v5 = 0;
v4 = *a1;
v1 = 0;
if ( *(_BYTE *)(*a1 + 2009) )
v1 = 0x10000;
v3 = v1 | 0x10u;
if ( (*((_DWORD *)a1 + 391) & 0x12) != 0 )
{
*((_DWORD *)a1 + 391) &= 0xFFFFFFED;
v5 = end_io_cache(a1 + 151);
}
if ( *(_DWORD *)(v4 + 1008) )
{
if ( a1[140] > (unsigned long long)*(unsigned int *)(v4 + 1056) )
{
a1[140] = 1LL;
ma_alloc_buffer(a1 + 116, a1 + 140, *(unsigned int *)(v4 + 1056), v3);
}
if ( (unsigned long long)a1[141] > 0x400 )
{
a1[141] = 1LL;
ma_alloc_buffer(a1 + 117, a1 + 141, 1024LL, v3);
}
}
if ( (*((_DWORD *)a1 + 391) & 0x20) != 0 )
madvise(*(_QWORD *)(v4 + 1520), *(_QWORD *)(v4 + 64), 1LL);
*((_DWORD *)a1 + 391) &= 0xFFFFFFB7;
*((_BYTE *)a1 + 1666) = 0;
*((_DWORD *)a1 + 395) = -1;
a1[19] = -1LL;
a1[137] = -1LL;
*((_BYTE *)a1 + 1668) = 1;
*(long long *)((char *)a1 + 1572) = *((_DWORD *)a1 + 393) & 1 | 0x30u;
return v5;
}
|
maria_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EDX,byte ptr [RAX + 0x7d9]
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,0x10
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x12
CMP EAX,0x0
JZ 0x00133047
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x61c]
AND ECX,0xffffffed
MOV dword ptr [RAX + 0x61c],ECX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x4b8
CALL 0x001e21e0
MOV dword ptr [RBP + -0xc],EAX
LAB_00133047:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x3f0],0x0
JZ 0x001330f2
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x460]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x420]
CMP RAX,RCX
JBE 0x001330ac
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x460],0x1
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x3a0
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x460
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x420]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x001654c0
LAB_001330ac:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x468],0x400
JBE 0x001330f0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x468],0x1
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x3a8
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x468
MOV RCX,qword ptr [RBP + -0x20]
MOV EDX,0x400
CALL 0x001654c0
LAB_001330f0:
JMP 0x001330f2
LAB_001330f2:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x20
CMP EAX,0x0
JZ 0x00133121
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x5f0]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1
CALL 0x0012a460
LAB_00133121:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x61c]
AND ECX,0xffffffb7
MOV dword ptr [RAX + 0x61c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x682],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x62c],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x448],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x684],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x624]
AND ECX,0x1
OR ECX,0x10
OR ECX,0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x624],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x628],0x0
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
ADD RSP,0x30
POP RBP
RET
|
int4 maria_reset(long *param_1)
{
long lVar1;
uint uVar2;
int4 local_14;
local_14 = 0;
lVar1 = *param_1;
uVar2 = 0;
if (*(char *)(lVar1 + 0x7d9) != '\0') {
uVar2 = 0x10000;
}
if ((*(uint *)((long)param_1 + 0x61c) & 0x12) != 0) {
*(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) & 0xffffffed;
local_14 = end_io_cache(param_1 + 0x97);
}
if (*(int *)(lVar1 + 0x3f0) != 0) {
if ((ulong)*(uint *)(lVar1 + 0x420) < (ulong)param_1[0x8c]) {
param_1[0x8c] = 1;
_ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c,*(int4 *)(lVar1 + 0x420),uVar2 | 0x10);
}
if (0x400 < (ulong)param_1[0x8d]) {
param_1[0x8d] = 1;
_ma_alloc_buffer(param_1 + 0x75,param_1 + 0x8d,0x400,uVar2 | 0x10);
}
}
if ((*(uint *)((long)param_1 + 0x61c) & 0x20) != 0) {
madvise(*(void **)(lVar1 + 0x5f0),*(size_t *)(lVar1 + 0x40),1);
}
*(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) & 0xffffffb7;
*(int1 *)((long)param_1 + 0x682) = 0;
*(int4 *)((long)param_1 + 0x62c) = 0xffffffff;
param_1[0x13] = -1;
param_1[0x89] = -1;
*(int1 *)((long)param_1 + 0x684) = 1;
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 1 | 0x30;
*(int4 *)(param_1 + 0xc5) = 0;
return local_14;
}
|
|
18,721
|
translog_free_link
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_free_link(PAGECACHE_BLOCK_LINK *direct_link)
{
DBUG_ENTER("translog_free_link");
DBUG_PRINT("info", ("Direct link: %p",
direct_link));
if (direct_link)
pagecache_unlock_by_link(log_descriptor.pagecache, direct_link,
PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN,
LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_free_link:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x3104e
cmpq $0x0, -0x8(%rbp)
je 0x31088
movq 0x44ed34(%rip), %rdi # 0x47fd90
movq -0x8(%rbp), %rsi
movl $0x5, %edx
movl $0x3, %ecx
xorl %eax, %eax
movl %eax, %r9d
xorl %eax, %eax
movq %r9, %r8
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x3b210
jmp 0x3108a
jmp 0x3108c
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_free_link:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
jmp short $+2
loc_3104E:
cmp [rbp+var_8], 0
jz short loc_31088
mov rdi, cs:log_descriptor
mov rsi, [rbp+var_8]
mov edx, 5
mov ecx, 3
xor eax, eax
mov r9d, eax
xor eax, eax
mov r8, r9
mov [rsp+20h+var_20], 0
mov [rsp+20h+var_18], 0
call pagecache_unlock_by_link
loc_31088:
jmp short $+2
loc_3108A:
jmp short $+2
loc_3108C:
add rsp, 20h
pop rbp
retn
|
long long translog_free_link(long long a1)
{
long long result; // rax
if ( a1 )
return pagecache_unlock_by_link(log_descriptor[0], a1, 5, 3, 0, 0, 0, 0);
return result;
}
|
translog_free_link:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0013104e
LAB_0013104e:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00131088
MOV RDI,qword ptr [0x0057fd90]
MOV RSI,qword ptr [RBP + -0x8]
MOV EDX,0x5
MOV ECX,0x3
XOR EAX,EAX
MOV R9D,EAX
XOR EAX,EAX
MOV R8,R9
MOV dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],0x0
CALL 0x0013b210
LAB_00131088:
JMP 0x0013108a
LAB_0013108a:
JMP 0x0013108c
LAB_0013108c:
ADD RSP,0x20
POP RBP
RET
|
void translog_free_link(long param_1)
{
if (param_1 != 0) {
pagecache_unlock_by_link(log_descriptor,param_1,5,3,0,0,0,0);
}
return;
}
|
|
18,722
|
get_timer_raw_value_and_function(enum_timer_name, unsigned long long (**)())
|
eloqsql/storage/perfschema/pfs_timer.cc
|
ulonglong get_timer_raw_value_and_function(enum_timer_name timer_name, timer_fct_t *fct)
{
switch (timer_name)
{
case TIMER_NAME_CYCLE:
*fct= my_timer_cycles;
return my_timer_cycles();
case TIMER_NAME_NANOSEC:
*fct= my_timer_nanoseconds;
return my_timer_nanoseconds();
case TIMER_NAME_MICROSEC:
*fct= my_timer_microseconds;
return my_timer_microseconds();
case TIMER_NAME_MILLISEC:
*fct= my_timer_milliseconds;
return my_timer_milliseconds();
case TIMER_NAME_TICK:
*fct= my_timer_ticks;
return my_timer_ticks();
default:
*fct= NULL;
assert(false);
}
return 0;
}
|
O0
|
cpp
|
get_timer_raw_value_and_function(enum_timer_name, unsigned long long (**)()):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x4, %eax
ja 0x4b3f4
movq -0x20(%rbp), %rax
leaq 0x6d516(%rip), %rcx # 0xb8884
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
leaq -0x172(%rip), %rcx # 0x4b210
movq %rcx, (%rax)
callq 0x4b210
movq %rax, -0x8(%rbp)
jmp 0x4b407
movq -0x18(%rbp), %rax
leaq 0x16e35(%rip), %rcx # 0x621d0
movq %rcx, (%rax)
callq 0x621d0
movq %rax, -0x8(%rbp)
jmp 0x4b407
movq -0x18(%rbp), %rax
leaq 0x16e4c(%rip), %rcx # 0x62200
movq %rcx, (%rax)
callq 0x62200
movq %rax, -0x8(%rbp)
jmp 0x4b407
movq -0x18(%rbp), %rax
leaq 0x16e83(%rip), %rcx # 0x62250
movq %rcx, (%rax)
callq 0x62250
movq %rax, -0x8(%rbp)
jmp 0x4b407
movq -0x18(%rbp), %rax
leaq 0x16eaa(%rip), %rcx # 0x62290
movq %rcx, (%rax)
callq 0x62290
movq %rax, -0x8(%rbp)
jmp 0x4b407
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov eax, [rbp+var_C]
dec eax; switch 5 cases
mov ecx, eax
mov [rbp+var_20], rcx
sub eax, 4
ja def_4B375; jumptable 000000000004B375 default case
mov rax, [rbp+var_20]
lea rcx, jpt_4B375
movsxd rax, ds:(jpt_4B375 - 0B8884h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4B377:
mov rax, [rbp+var_18]; jumptable 000000000004B375 case 1
lea rcx, _ZL15my_timer_cyclesv; my_timer_cycles(void)
mov [rax], rcx
call _ZL15my_timer_cyclesv; my_timer_cycles(void)
mov [rbp+var_8], rax
jmp short loc_4B407
loc_4B390:
mov rax, [rbp+var_18]; jumptable 000000000004B375 case 2
lea rcx, my_timer_nanoseconds
mov [rax], rcx
call my_timer_nanoseconds
mov [rbp+var_8], rax
jmp short loc_4B407
loc_4B3A9:
mov rax, [rbp+var_18]; jumptable 000000000004B375 case 3
lea rcx, my_timer_microseconds
mov [rax], rcx
call my_timer_microseconds
mov [rbp+var_8], rax
jmp short loc_4B407
loc_4B3C2:
mov rax, [rbp+var_18]; jumptable 000000000004B375 case 4
lea rcx, my_timer_milliseconds
mov [rax], rcx
call my_timer_milliseconds
mov [rbp+var_8], rax
jmp short loc_4B407
loc_4B3DB:
mov rax, [rbp+var_18]; jumptable 000000000004B375 case 5
lea rcx, my_timer_ticks
mov [rax], rcx
call my_timer_ticks
mov [rbp+var_8], rax
jmp short loc_4B407
def_4B375:
mov rax, [rbp+var_18]; jumptable 000000000004B375 default case
mov qword ptr [rax], 0
mov [rbp+var_8], 0
loc_4B407:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
unsigned long long get_timer_raw_value_and_function(long long a1, unsigned long long (**a2)(void))
{
unsigned long long v3; // [rsp+18h] [rbp-8h]
switch ( (int)a1 )
{
case 1:
*a2 = my_timer_cycles;
v3 = my_timer_cycles();
break;
case 2:
*a2 = (unsigned long long (*)(void))my_timer_nanoseconds;
v3 = my_timer_nanoseconds(a1);
break;
case 3:
*a2 = (unsigned long long (*)(void))my_timer_microseconds;
v3 = my_timer_microseconds(a1);
break;
case 4:
*a2 = (unsigned long long (*)(void))my_timer_milliseconds;
v3 = my_timer_milliseconds(a1);
break;
case 5:
*a2 = (unsigned long long (*)(void))my_timer_ticks;
v3 = my_timer_ticks(a1);
break;
default:
*a2 = 0LL;
v3 = 0LL;
break;
}
return v3;
}
|
get_timer_raw_value_and_function:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV EAX,dword ptr [RBP + -0xc]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x20],RCX
SUB EAX,0x4
JA 0x0014b3f4
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x1b8884]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x14b210]
MOV qword ptr [RAX],RCX
CALL 0x0014b210
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014b407
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x1621d0]
MOV qword ptr [RAX],RCX
CALL 0x001621d0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014b407
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x162200]
MOV qword ptr [RAX],RCX
CALL 0x00162200
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014b407
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x162250]
MOV qword ptr [RAX],RCX
CALL 0x00162250
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014b407
caseD_5:
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x162290]
MOV qword ptr [RAX],RCX
CALL 0x00162290
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0014b407
default:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],0x0
MOV qword ptr [RBP + -0x8],0x0
LAB_0014b407:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
/* get_timer_raw_value_and_function(enum_timer_name, unsigned long long (**)()) */
int8 get_timer_raw_value_and_function(int4 param_1,int8 *param_2)
{
int8 local_10;
switch(param_1) {
case 1:
*param_2 = my_timer_cycles;
local_10 = my_timer_cycles();
break;
case 2:
*param_2 = my_timer_nanoseconds;
local_10 = my_timer_nanoseconds();
break;
case 3:
*param_2 = my_timer_microseconds;
local_10 = my_timer_microseconds();
break;
case 4:
*param_2 = my_timer_milliseconds;
local_10 = my_timer_milliseconds();
break;
case 5:
*param_2 = my_timer_ticks;
local_10 = my_timer_ticks();
break;
default:
*param_2 = 0;
local_10 = 0;
}
return local_10;
}
|
|
18,723
|
get_timer_raw_value_and_function(enum_timer_name, unsigned long long (**)())
|
eloqsql/storage/perfschema/pfs_timer.cc
|
ulonglong get_timer_raw_value_and_function(enum_timer_name timer_name, timer_fct_t *fct)
{
switch (timer_name)
{
case TIMER_NAME_CYCLE:
*fct= my_timer_cycles;
return my_timer_cycles();
case TIMER_NAME_NANOSEC:
*fct= my_timer_nanoseconds;
return my_timer_nanoseconds();
case TIMER_NAME_MICROSEC:
*fct= my_timer_microseconds;
return my_timer_microseconds();
case TIMER_NAME_MILLISEC:
*fct= my_timer_milliseconds;
return my_timer_milliseconds();
case TIMER_NAME_TICK:
*fct= my_timer_ticks;
return my_timer_ticks();
default:
*fct= NULL;
assert(false);
}
return 0;
}
|
O3
|
cpp
|
get_timer_raw_value_and_function(enum_timer_name, unsigned long long (**)()):
pushq %rbp
movq %rsp, %rbp
decl %edi
cmpl $0x4, %edi
ja 0x409cb
leaq 0x44fcf(%rip), %rax # 0x8593c
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq -0x73(%rip), %rax # 0x4090a
movq %rax, (%rsi)
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
jmp 0x409d4
leaq 0x9f8f(%rip), %rax # 0x4a921
movq %rax, (%rsi)
popq %rbp
jmp 0x4a921
leaq 0x9f03(%rip), %rax # 0x4a8a5
movq %rax, (%rsi)
popq %rbp
jmp 0x4a8a5
leaq 0x9f2f(%rip), %rax # 0x4a8e1
movq %rax, (%rsi)
popq %rbp
jmp 0x4a8e1
leaq 0x9eba(%rip), %rax # 0x4a87c
movq %rax, (%rsi)
popq %rbp
jmp 0x4a87c
movq $0x0, (%rsi)
xorl %eax, %eax
popq %rbp
retq
|
_Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE:
push rbp
mov rbp, rsp
dec edi; switch 5 cases
cmp edi, 4
ja short def_40974; jumptable 0000000000040974 default case
lea rax, jpt_40974
movsxd rcx, ds:(jpt_40974 - 8593Ch)[rax+rdi*4]
add rcx, rax
jmp rcx; switch jump
loc_40976:
lea rax, _ZL15my_timer_cyclesv; jumptable 0000000000040974 case 1
mov [rsi], rax
rdtsc
shl rdx, 20h
or rax, rdx
jmp short loc_409D4
loc_4098B:
lea rax, my_timer_ticks; jumptable 0000000000040974 case 5
mov [rsi], rax
pop rbp
jmp my_timer_ticks
loc_4099B:
lea rax, my_timer_microseconds; jumptable 0000000000040974 case 3
mov [rsi], rax
pop rbp
jmp my_timer_microseconds
loc_409AB:
lea rax, my_timer_milliseconds; jumptable 0000000000040974 case 4
mov [rsi], rax
pop rbp
jmp my_timer_milliseconds
loc_409BB:
lea rax, my_timer_nanoseconds; jumptable 0000000000040974 case 2
mov [rsi], rax
pop rbp
jmp my_timer_nanoseconds
def_40974:
mov qword ptr [rsi], 0; jumptable 0000000000040974 default case
xor eax, eax
loc_409D4:
pop rbp
retn
|
long long get_timer_raw_value_and_function(int a1, unsigned long long (**a2)(void))
{
long long result; // rax
switch ( a1 )
{
case 1:
*a2 = my_timer_cycles;
result = __rdtsc();
break;
case 2:
*a2 = (unsigned long long (*)(void))my_timer_nanoseconds;
result = my_timer_nanoseconds();
break;
case 3:
*a2 = (unsigned long long (*)(void))my_timer_microseconds;
result = my_timer_microseconds();
break;
case 4:
*a2 = (unsigned long long (*)(void))my_timer_milliseconds;
result = my_timer_milliseconds();
break;
case 5:
*a2 = (unsigned long long (*)(void))my_timer_ticks;
result = my_timer_ticks();
break;
default:
*a2 = 0LL;
result = 0LL;
break;
}
return result;
}
|
get_timer_raw_value_and_function:
PUSH RBP
MOV RBP,RSP
DEC EDI
CMP EDI,0x4
JA 0x001409cb
LEA RAX,[0x18593c]
MOVSXD RCX,dword ptr [RAX + RDI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
LEA RAX,[0x14090a]
MOV qword ptr [RSI],RAX
RDTSC
SHL RDX,0x20
OR RAX,RDX
JMP 0x001409d4
caseD_5:
LEA RAX,[0x14a921]
MOV qword ptr [RSI],RAX
POP RBP
JMP 0x0014a921
caseD_3:
LEA RAX,[0x14a8a5]
MOV qword ptr [RSI],RAX
POP RBP
JMP 0x0014a8a5
caseD_4:
LEA RAX,[0x14a8e1]
MOV qword ptr [RSI],RAX
POP RBP
JMP 0x0014a8e1
caseD_2:
LEA RAX,[0x14a87c]
MOV qword ptr [RSI],RAX
POP RBP
JMP 0x0014a87c
default:
MOV qword ptr [RSI],0x0
XOR EAX,EAX
LAB_001409d4:
POP RBP
RET
|
/* get_timer_raw_value_and_function(enum_timer_name, unsigned long long (**)()) */
int8 get_timer_raw_value_and_function(int4 param_1,int8 *param_2)
{
int8 uVar1;
switch(param_1) {
case 1:
*param_2 = my_timer_cycles;
uVar1 = rdtsc();
break;
case 2:
*param_2 = my_timer_nanoseconds;
uVar1 = my_timer_nanoseconds();
return uVar1;
case 3:
*param_2 = my_timer_microseconds;
uVar1 = my_timer_microseconds();
return uVar1;
case 4:
*param_2 = my_timer_milliseconds;
uVar1 = my_timer_milliseconds();
return uVar1;
case 5:
*param_2 = my_timer_ticks;
uVar1 = my_timer_ticks();
return uVar1;
default:
*param_2 = 0;
uVar1 = 0;
}
return uVar1;
}
|
|
18,724
|
llama_model_loader::get_mapping_range(unsigned long*, unsigned long*, void**, int, ggml_context*) const
|
monkey531[P]llama/src/llama-model-loader.cpp
|
void llama_model_loader::get_mapping_range(size_t * first, size_t * last, void ** addr, int idx, ggml_context * ctx) const {
GGML_ASSERT(!mappings.empty());
const auto & mapping = mappings.at(idx);
*first = mapping->size();
*last = 0;
*addr = mapping->addr();
for (ggml_tensor * tensor = ggml_get_first_tensor(ctx); tensor; tensor = ggml_get_next_tensor(ctx, tensor)) {
const auto * weight = get_weight(ggml_get_name(tensor));
if (!weight || weight->idx != idx) {
continue;
}
*first = std::min(*first, weight->offs);
*last = std::max(*last, weight->offs + ggml_nbytes(tensor));
}
}
|
O0
|
cpp
|
llama_model_loader::get_mapping_range(unsigned long*, unsigned long*, void**, int, ggml_context*) const:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movl %r8d, 0x44(%rsp)
movq %r9, 0x38(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x48, %rdi
callq 0x1f88a0
testb $0x1, %al
jne 0x2c9fab
jmp 0x2c9fcc
leaq 0x109b49(%rip), %rdi # 0x3d3afb
movl $0x348, %esi # imm = 0x348
leaq 0x1023ca(%rip), %rdx # 0x3cc388
leaq 0x109b8b(%rip), %rcx # 0x3d3b50
movb $0x0, %al
callq 0x217150
movq 0x10(%rsp), %rdi
addq $0x48, %rdi
movslq 0x44(%rsp), %rsi
callq 0x20c9a0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x21e2d0
movq %rax, %rdi
callq 0x200660
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x50(%rsp), %rax
movq $0x0, (%rax)
movq 0x30(%rsp), %rdi
callq 0x21e2d0
movq %rax, %rdi
callq 0x216490
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rdi
callq 0x1f5560
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x2ca0fa
movq 0x28(%rsp), %rdi
callq 0x208080
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x1f0e70
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x2ca077
movq 0x20(%rsp), %rax
movzwl (%rax), %eax
cmpl 0x44(%rsp), %eax
je 0x2ca079
jmp 0x2ca0e1
movq 0x58(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x8, %rsi
callq 0x1febb0
movq (%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x1eee90
movq (%rsp), %rdi
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x18(%rsp)
leaq 0x18(%rsp), %rsi
callq 0x20e160
movq (%rax), %rcx
movq 0x50(%rsp), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x205870
movq %rax, 0x28(%rsp)
jmp 0x2ca039
addq $0x68, %rsp
retq
nop
|
_ZNK18llama_model_loader17get_mapping_rangeEPmS0_PPviP12ggml_context:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_20], rcx
mov [rsp+68h+var_24], r8d
mov [rsp+68h+var_30], r9
mov rdi, [rsp+68h+var_8]
mov [rsp+68h+var_58], rdi
add rdi, 48h ; 'H'
call __ZNKSt6vectorISt10unique_ptrI10llama_mmapSt14default_deleteIS1_EESaIS4_EE5emptyEv; std::vector<std::unique_ptr<llama_mmap>>::empty(void)
test al, 1
jnz short loc_2C9FAB
jmp short loc_2C9FCC
loc_2C9FAB:
lea rdi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github/2025_star3"...
mov esi, 348h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMappingsEmpty; "!mappings.empty()"
mov al, 0
call _ggml_abort
loc_2C9FCC:
mov rdi, [rsp+68h+var_58]
add rdi, 48h ; 'H'
movsxd rsi, [rsp+68h+var_24]
call __ZNKSt6vectorISt10unique_ptrI10llama_mmapSt14default_deleteIS1_EESaIS4_EE2atEm; std::vector<std::unique_ptr<llama_mmap>>::at(ulong)
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_38]
call __ZNKSt10unique_ptrI10llama_mmapSt14default_deleteIS0_EEptEv; std::unique_ptr<llama_mmap>::operator->(void)
mov rdi, rax; this
call __ZNK10llama_mmap4sizeEv; llama_mmap::size(void)
mov rcx, rax
mov rax, [rsp+68h+var_10]
mov [rax], rcx
mov rax, [rsp+68h+var_18]
mov qword ptr [rax], 0
mov rdi, [rsp+68h+var_38]
call __ZNKSt10unique_ptrI10llama_mmapSt14default_deleteIS0_EEptEv; std::unique_ptr<llama_mmap>::operator->(void)
mov rdi, rax; this
call __ZNK10llama_mmap4addrEv; llama_mmap::addr(void)
mov rcx, rax
mov rax, [rsp+68h+var_20]
mov [rax], rcx
mov rdi, [rsp+68h+var_30]
call _ggml_get_first_tensor
mov [rsp+68h+var_40], rax
loc_2CA039:
cmp [rsp+68h+var_40], 0
jz loc_2CA0FA
mov rdi, [rsp+68h+var_40]
call _ggml_get_name
mov rdi, [rsp+68h+var_58]; this
mov rsi, rax; char *
call __ZNK18llama_model_loader10get_weightEPKc; llama_model_loader::get_weight(char const*)
mov [rsp+68h+var_48], rax
cmp [rsp+68h+var_48], 0
jz short loc_2CA077
mov rax, [rsp+68h+var_48]
movzx eax, word ptr [rax]
cmp eax, [rsp+68h+var_24]
jz short loc_2CA079
loc_2CA077:
jmp short loc_2CA0E1
loc_2CA079:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_48]
add rsi, 8
call __ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&)
mov rcx, [rax]
mov rax, [rsp+68h+var_10]
mov [rax], rcx
mov rax, [rsp+68h+var_18]
mov [rsp+68h+var_68], rax
mov rax, [rsp+68h+var_48]
mov rax, [rax+8]
mov [rsp+68h+var_60], rax
mov rdi, [rsp+68h+var_40]
call _ggml_nbytes
mov rdi, [rsp+68h+var_68]
mov rcx, rax
mov rax, [rsp+68h+var_60]
add rax, rcx
mov [rsp+68h+var_50], rax
lea rsi, [rsp+68h+var_50]
call __ZSt3maxImERKT_S2_S2_; std::max<ulong>(ulong const&,ulong const&)
mov rcx, [rax]
mov rax, [rsp+68h+var_18]
mov [rax], rcx
loc_2CA0E1:
mov rdi, [rsp+68h+var_30]
mov rsi, [rsp+68h+var_40]
call _ggml_get_next_tensor
mov [rsp+68h+var_40], rax
jmp loc_2CA039
loc_2CA0FA:
add rsp, 68h
retn
|
long long llama_model_loader::get_mapping_range(
llama_model_loader *a1,
_QWORD *a2,
_QWORD *a3,
_QWORD *a4,
int a5,
long long a6)
{
llama_mmap *v6; // rax
llama_mmap *v7; // rax
long long result; // rax
const char *name; // rax
_QWORD *v10; // rax
_QWORD *v11; // rax
_QWORD *v12; // [rsp+0h] [rbp-68h]
long long v13; // [rsp+8h] [rbp-60h]
long long v14; // [rsp+18h] [rbp-50h] BYREF
unsigned __int16 *weight; // [rsp+20h] [rbp-48h]
long long i; // [rsp+28h] [rbp-40h]
long long v17; // [rsp+30h] [rbp-38h]
long long v18; // [rsp+38h] [rbp-30h]
int v19; // [rsp+44h] [rbp-24h]
_QWORD *v20; // [rsp+48h] [rbp-20h]
_QWORD *v21; // [rsp+50h] [rbp-18h]
_QWORD *v22; // [rsp+58h] [rbp-10h]
llama_model_loader *v23; // [rsp+60h] [rbp-8h]
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v18 = a6;
if ( (std::vector<std::unique_ptr<llama_mmap>>::empty((char *)a1 + 72) & 1) != 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp",
840LL,
"GGML_ASSERT(%s) failed",
"!mappings.empty()");
v17 = std::vector<std::unique_ptr<llama_mmap>>::at((char *)a1 + 72, v19);
v6 = (llama_mmap *)std::unique_ptr<llama_mmap>::operator->(v17);
*v22 = llama_mmap::size(v6);
*v21 = 0LL;
v7 = (llama_mmap *)std::unique_ptr<llama_mmap>::operator->(v17);
*v20 = llama_mmap::addr(v7);
result = ggml_get_first_tensor(v18);
for ( i = result; i; i = result )
{
name = (const char *)ggml_get_name(i);
weight = (unsigned __int16 *)llama_model_loader::get_weight(a1, name);
if ( weight )
{
if ( *weight == v19 )
{
v10 = (_QWORD *)std::min<unsigned long>(v22, weight + 4);
*v22 = *v10;
v12 = v21;
v13 = *((_QWORD *)weight + 1);
v14 = ggml_nbytes(i) + v13;
v11 = (_QWORD *)std::max<unsigned long>(v12, &v14);
*v21 = *v11;
}
}
result = ggml_get_next_tensor(v18, i);
}
return result;
}
| |||
18,725
|
llama_model_loader::get_mapping_range(unsigned long*, unsigned long*, void**, int, ggml_context*) const
|
monkey531[P]llama/src/llama-model-loader.cpp
|
void llama_model_loader::get_mapping_range(size_t * first, size_t * last, void ** addr, int idx, ggml_context * ctx) const {
GGML_ASSERT(!mappings.empty());
const auto & mapping = mappings.at(idx);
*first = mapping->size();
*last = 0;
*addr = mapping->addr();
for (ggml_tensor * tensor = ggml_get_first_tensor(ctx); tensor; tensor = ggml_get_next_tensor(ctx, tensor)) {
const auto * weight = get_weight(ggml_get_name(tensor));
if (!weight || weight->idx != idx) {
continue;
}
*first = std::min(*first, weight->offs);
*last = std::max(*last, weight->offs + ggml_nbytes(tensor));
}
}
|
O2
|
cpp
|
llama_model_loader::get_mapping_range(unsigned long*, unsigned long*, void**, int, ggml_context*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq 0x48(%rdi), %rax
cmpq 0x50(%rdi), %rax
je 0xe678b
movq %r9, %rbx
movl %r8d, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
addq $0x48, %rdi
movslq %r8d, %rsi
callq 0xa3dd0
movq %rax, %r13
movq (%rax), %rdi
callq 0xa05b0
movq %rax, (%r15)
movq %r14, 0x10(%rsp)
andq $0x0, (%r14)
movq (%r13), %rdi
callq 0xa6670
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x9d4a0
movq %rax, %r13
testq %rax, %rax
je 0xe677c
movq %r13, %rdi
callq 0xa28b0
movq %r12, %rdi
movq %rax, %rsi
callq 0x9c0c0
testq %rax, %rax
je 0xe676f
movzwl (%rax), %ecx
cmpl %ebp, %ecx
jne 0xe676f
movl %ebp, %r14d
movq 0x8(%rax), %rcx
movq (%r15), %rdx
cmpq %rdx, %rcx
jb 0xe6747
movq %rdx, %rcx
movq %rcx, (%r15)
movq 0x8(%rax), %rbp
movq %r13, %rdi
callq 0x9b870
addq %rbp, %rax
movq 0x10(%rsp), %rdx
movq (%rdx), %rcx
cmpq %rax, %rcx
ja 0xe6769
movq %rax, %rcx
movq %rcx, (%rdx)
movl %r14d, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa1d40
jmp 0xe670e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f181(%rip), %rdi # 0x145913
leaq 0x57beb(%rip), %rdx # 0x13e384
leaq 0x5f1c8(%rip), %rcx # 0x145968
movl $0x348, %esi # imm = 0x348
xorl %eax, %eax
callq 0xa6ac0
|
_ZNK18llama_model_loader17get_mapping_rangeEPmS0_PPviP12ggml_context:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], rcx
mov rax, [rdi+48h]
cmp rax, [rdi+50h]
jz loc_E678B
mov rbx, r9
mov ebp, r8d
mov r14, rdx
mov r15, rsi
mov r12, rdi
add rdi, 48h ; 'H'
movsxd rsi, r8d
call __ZNKSt6vectorISt10unique_ptrI10llama_mmapSt14default_deleteIS1_EESaIS4_EE2atEm; std::vector<std::unique_ptr<llama_mmap>>::at(ulong)
mov r13, rax
mov rdi, [rax]; this
call __ZNK10llama_mmap4sizeEv; llama_mmap::size(void)
mov [r15], rax
mov [rsp+48h+var_38], r14
and qword ptr [r14], 0
mov rdi, [r13+0]; this
call __ZNK10llama_mmap4addrEv; llama_mmap::addr(void)
mov rcx, [rsp+48h+var_40]
mov [rcx], rax
mov rdi, rbx
call _ggml_get_first_tensor
loc_E670E:
mov r13, rax
test rax, rax
jz short loc_E677C
mov rdi, r13
call _ggml_get_name
mov rdi, r12; this
mov rsi, rax; char *
call __ZNK18llama_model_loader10get_weightEPKc; llama_model_loader::get_weight(char const*)
test rax, rax
jz short loc_E676F
movzx ecx, word ptr [rax]
cmp ecx, ebp
jnz short loc_E676F
mov r14d, ebp
mov rcx, [rax+8]
mov rdx, [r15]
cmp rcx, rdx
jb short loc_E6747
mov rcx, rdx
loc_E6747:
mov [r15], rcx
mov rbp, [rax+8]
mov rdi, r13
call _ggml_nbytes
add rax, rbp
mov rdx, [rsp+48h+var_38]
mov rcx, [rdx]
cmp rcx, rax
ja short loc_E6769
mov rcx, rax
loc_E6769:
mov [rdx], rcx
mov ebp, r14d
loc_E676F:
mov rdi, rbx
mov rsi, r13
call _ggml_get_next_tensor
jmp short loc_E670E
loc_E677C:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E678B:
lea rdi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMappingsEmpty; "!mappings.empty()"
mov esi, 348h
xor eax, eax
call _ggml_abort
|
long long llama_model_loader::get_mapping_range(
llama_model_loader *this,
unsigned long long *a2,
unsigned long long *a3,
_QWORD *a4,
int a5,
long long a6)
{
int v7; // ebp
llama_mmap **v9; // r13
long long result; // rax
long long v11; // r13
const char *name; // rax
unsigned __int16 *weight; // rax
int v14; // r14d
unsigned long long v15; // rcx
long long v16; // rbp
unsigned long long v17; // rax
unsigned long long v18; // rcx
unsigned long long *v20; // [rsp+10h] [rbp-38h]
if ( *((_QWORD *)this + 9) == *((_QWORD *)this + 10) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp",
840LL,
"GGML_ASSERT(%s) failed",
"!mappings.empty()");
return llama_model_loader::load_data_for((llama_model_loader *)"/workspace/llm4binary/github/2025_star3/monkey531[P]l"
"lama/src/llama-model-loader.cpp");
}
else
{
v7 = a5;
v9 = (llama_mmap **)std::vector<std::unique_ptr<llama_mmap>>::at((char *)this + 72, a5);
*a2 = llama_mmap::size(*v9);
v20 = a3;
*a3 = 0LL;
*a4 = llama_mmap::addr(*v9);
for ( result = ggml_get_first_tensor(a6); ; result = ggml_get_next_tensor(a6, v11) )
{
v11 = result;
if ( !result )
break;
name = (const char *)ggml_get_name(result);
weight = (unsigned __int16 *)llama_model_loader::get_weight(this, name);
if ( weight && *weight == v7 )
{
v14 = v7;
v15 = *((_QWORD *)weight + 1);
if ( v15 >= *a2 )
v15 = *a2;
*a2 = v15;
v16 = *((_QWORD *)weight + 1);
v17 = v16 + ggml_nbytes(v11);
v18 = *v20;
if ( *v20 <= v17 )
v18 = v17;
*v20 = v18;
v7 = v14;
}
}
}
return result;
}
|
get_mapping_range:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RDI + 0x48]
CMP RAX,qword ptr [RDI + 0x50]
JZ 0x001e678b
MOV RBX,R9
MOV EBP,R8D
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
ADD RDI,0x48
MOVSXD RSI,R8D
CALL 0x001a3dd0
MOV R13,RAX
MOV RDI,qword ptr [RAX]
CALL 0x001a05b0
MOV qword ptr [R15],RAX
MOV qword ptr [RSP + 0x10],R14
AND qword ptr [R14],0x0
MOV RDI,qword ptr [R13]
CALL 0x001a6670
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RCX],RAX
MOV RDI,RBX
CALL 0x0019d4a0
LAB_001e670e:
MOV R13,RAX
TEST RAX,RAX
JZ 0x001e677c
MOV RDI,R13
CALL 0x001a28b0
MOV RDI,R12
MOV RSI,RAX
CALL 0x0019c0c0
TEST RAX,RAX
JZ 0x001e676f
MOVZX ECX,word ptr [RAX]
CMP ECX,EBP
JNZ 0x001e676f
MOV R14D,EBP
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [R15]
CMP RCX,RDX
JC 0x001e6747
MOV RCX,RDX
LAB_001e6747:
MOV qword ptr [R15],RCX
MOV RBP,qword ptr [RAX + 0x8]
MOV RDI,R13
CALL 0x0019b870
ADD RAX,RBP
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RDX]
CMP RCX,RAX
JA 0x001e6769
MOV RCX,RAX
LAB_001e6769:
MOV qword ptr [RDX],RCX
MOV EBP,R14D
LAB_001e676f:
MOV RDI,RBX
MOV RSI,R13
CALL 0x001a1d40
JMP 0x001e670e
LAB_001e677c:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e678b:
LEA RDI,[0x245913]
LEA RDX,[0x23e384]
LEA RCX,[0x245968]
MOV ESI,0x348
XOR EAX,EAX
CALL 0x001a6ac0
|
/* llama_model_loader::get_mapping_range(unsigned long*, unsigned long*, void**, int, ggml_context*)
const */
void __thiscall
llama_model_loader::get_mapping_range
(llama_model_loader *this,ulong *param_1,ulong *param_2,void **param_3,int param_4,
ggml_context *param_5)
{
long lVar1;
int8 *puVar2;
ulong uVar3;
void *pvVar4;
long lVar5;
char *pcVar6;
ushort *puVar7;
long lVar8;
if (*(long *)(this + 0x48) != *(long *)(this + 0x50)) {
puVar2 = (int8 *)
std::
vector<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>,std::allocator<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>>>
::at((vector<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>,std::allocator<std::unique_ptr<llama_mmap,std::default_delete<llama_mmap>>>>
*)(this + 0x48),(long)param_4);
uVar3 = llama_mmap::size((llama_mmap *)*puVar2);
*param_1 = uVar3;
*param_2 = 0;
pvVar4 = (void *)llama_mmap::addr((llama_mmap *)*puVar2);
*param_3 = pvVar4;
for (lVar5 = ggml_get_first_tensor(param_5); lVar5 != 0;
lVar5 = ggml_get_next_tensor(param_5,lVar5)) {
pcVar6 = (char *)ggml_get_name(lVar5);
puVar7 = (ushort *)get_weight(this,pcVar6);
if ((puVar7 != (ushort *)0x0) && ((uint)*puVar7 == param_4)) {
uVar3 = *(ulong *)(puVar7 + 4);
if (*param_1 <= *(ulong *)(puVar7 + 4)) {
uVar3 = *param_1;
}
*param_1 = uVar3;
lVar1 = *(long *)(puVar7 + 4);
lVar8 = ggml_nbytes(lVar5);
uVar3 = *param_2;
if (*param_2 <= (ulong)(lVar8 + lVar1)) {
uVar3 = lVar8 + lVar1;
}
*param_2 = uVar3;
}
}
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp",
0x348,"GGML_ASSERT(%s) failed","!mappings.empty()");
}
|
|
18,726
|
my_init_mysys_psi_keys
|
eloqsql/mysys/my_init.c
|
void my_init_mysys_psi_keys()
{
const char* category= "mysys";
int count;
count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]);
mysql_mutex_register(category, all_mysys_mutexes, count);
count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]);
mysql_cond_register(category, all_mysys_conds, count);
count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]);
mysql_rwlock_register(category, all_mysys_rwlocks, count);
count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]);
mysql_thread_register(category, all_mysys_threads, count);
count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]);
mysql_file_register(category, all_mysys_files, count);
count= array_elements(all_mysys_stages);
mysql_stage_register(category, all_mysys_stages, count);
}
|
O3
|
c
|
my_init_mysys_psi_keys:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2e6907(%rip), %r14 # 0x386010
movq (%r14), %rax
leaq 0x3ce3c(%rip), %rbx # 0xdc54f
leaq 0x2e60e6(%rip), %rsi # 0x385800
movq %rbx, %rdi
movl $0x13, %edx
callq *(%rax)
movq (%r14), %rax
leaq 0x2e62a2(%rip), %rsi # 0x3859d0
movq %rbx, %rdi
movl $0x7, %edx
callq *0x10(%rax)
movq (%r14), %rax
leaq 0x2e633d(%rip), %rsi # 0x385a80
movq %rbx, %rdi
movl $0x1, %edx
callq *0x8(%rax)
movq (%r14), %rax
leaq 0x2e6348(%rip), %rsi # 0x385aa0
movq %rbx, %rdi
movl $0x1, %edx
callq *0x18(%rax)
movq (%r14), %rax
leaq 0x2e6353(%rip), %rsi # 0x385ac0
movq %rbx, %rdi
movl $0x2, %edx
callq *0x20(%rax)
movq (%r14), %rax
movq 0x28(%rax), %rax
leaq 0x2e606a(%rip), %rsi # 0x3857f0
movq %rbx, %rdi
movl $0x1, %edx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
|
my_init_mysys_psi_keys:
push rbp
mov rbp, rsp
push r14
push rbx
lea r14, PSI_server
mov rax, [r14]
lea rbx, aMysys; "mysys"
lea rsi, all_mysys_mutexes
mov rdi, rbx
mov edx, 13h
call qword ptr [rax]
mov rax, [r14]
lea rsi, all_mysys_conds
mov rdi, rbx
mov edx, 7
call qword ptr [rax+10h]
mov rax, [r14]
lea rsi, all_mysys_rwlocks
mov rdi, rbx
mov edx, 1
call qword ptr [rax+8]
mov rax, [r14]
lea rsi, all_mysys_threads
mov rdi, rbx
mov edx, 1
call qword ptr [rax+18h]
mov rax, [r14]
lea rsi, all_mysys_files
mov rdi, rbx
mov edx, 2
call qword ptr [rax+20h]
mov rax, [r14]
mov rax, [rax+28h]
lea rsi, all_mysys_stages
mov rdi, rbx
mov edx, 1
pop rbx
pop r14
pop rbp
jmp rax
|
long long my_init_mysys_psi_keys()
{
((void ( *)(const char *, _UNKNOWN **, long long))*PSI_server)("mysys", &all_mysys_mutexes, 19LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[2])("mysys", &all_mysys_conds, 7LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[1])("mysys", &all_mysys_rwlocks, 1LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[3])("mysys", &all_mysys_threads, 1LL);
((void ( *)(const char *, _UNKNOWN **, long long))PSI_server[4])("mysys", &all_mysys_files, 2LL);
return ((long long ( *)(const char *, _UNKNOWN **, long long))PSI_server[5])("mysys", &all_mysys_stages, 1LL);
}
|
my_init_mysys_psi_keys:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA R14,[0x486010]
MOV RAX,qword ptr [R14]
LEA RBX,[0x1dc54f]
LEA RSI,[0x485800]
MOV RDI,RBX
MOV EDX,0x13
CALL qword ptr [RAX]
MOV RAX,qword ptr [R14]
LEA RSI,[0x4859d0]
MOV RDI,RBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R14]
LEA RSI,[0x485a80]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14]
LEA RSI,[0x485aa0]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x18]
MOV RAX,qword ptr [R14]
LEA RSI,[0x485ac0]
MOV RDI,RBX
MOV EDX,0x2
CALL qword ptr [RAX + 0x20]
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x28]
LEA RSI,[0x4857f0]
MOV RDI,RBX
MOV EDX,0x1
POP RBX
POP R14
POP RBP
JMP RAX
|
void my_init_mysys_psi_keys(void)
{
(**(code **)PSI_server)("mysys",all_mysys_mutexes,0x13);
(**(code **)(PSI_server + 0x10))("mysys",all_mysys_conds,7);
(**(code **)(PSI_server + 8))("mysys",all_mysys_rwlocks,1);
(**(code **)(PSI_server + 0x18))("mysys",all_mysys_threads,1);
(**(code **)(PSI_server + 0x20))("mysys",all_mysys_files,2);
/* WARNING: Could not recover jumptable at 0x0019f792. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(PSI_server + 0x28))("mysys",&all_mysys_stages,1);
return;
}
|
|
18,727
|
std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>> ftxui::unpack<std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/include/ftxui/dom/take_any_args.hpp
|
Elements unpack(Args... args) {
std::vector<Element> vec;
(Merge(vec, std::move(args)), ...);
return vec;
}
|
O3
|
cpp
|
std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>> ftxui::unpack<std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups (%rsi), %xmm0
movq %rcx, 0x8(%rsi)
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
movq %rcx, (%rsi)
movq %rax, %rsi
callq 0x151b6
movups (%r15), %xmm0
xorl %eax, %eax
movq %rax, 0x8(%r15)
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rax, (%r15)
movq %rbx, %rdi
callq 0x151b6
movups (%r14), %xmm0
xorl %eax, %eax
movq %rax, 0x8(%r14)
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x151b6
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x23522
callq 0x14af8
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x23531
callq 0x14af8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x23540
callq 0x14af8
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x23564
callq 0x14af8
jmp 0x23564
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x23578
callq 0x14af8
jmp 0x23578
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x23587
callq 0x14af8
movq %rbx, %rdi
callq 0x1503a
movq %r14, %rdi
callq 0xb780
nop
|
_ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEES3_S3_EEESt6vectorIS3_SaIS3_EEDpT_:
push r15
push r14
push rbx
sub rsp, 30h
mov r14, rcx
mov r15, rdx
mov rbx, rdi
xor ecx, ecx
mov [rdi+10h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
movups xmm0, xmmword ptr [rsi]
mov [rsi+8], rcx
lea rax, [rsp+48h+var_28]
movaps xmmword ptr [rax], xmm0
mov [rsi], rcx
mov rsi, rax
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node> &&)
movups xmm0, xmmword ptr [r15]
xor eax, eax
mov [r15+8], rax
lea rsi, [rsp+48h+var_38]
movaps xmmword ptr [rsi], xmm0
mov [r15], rax
mov rdi, rbx
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node> &&)
movups xmm0, xmmword ptr [r14]
xor eax, eax
mov [r14+8], rax
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov [r14], rax
mov rdi, rbx
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node> &&)
mov rdi, [rsp+48h+var_40]
test rdi, rdi
jz short loc_23522
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23522:
mov rdi, [rsp+48h+var_30]
test rdi, rdi
jz short loc_23531
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23531:
mov rdi, [rsp+48h+var_20]
test rdi, rdi
jz short loc_23540
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23540:
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_23564
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_23564
mov r14, rax
loc_23564:
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_23578
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_23578
mov r14, rax
loc_23578:
mov rdi, [rsp+arg_20]
test rdi, rdi
jz short loc_23587
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_23587:
mov rdi, rbx
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rdi, r14
call __Unwind_Resume
|
long long ftxui::unpack<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(
long long a1,
long long a2,
long long a3,
long long a4)
{
__int128 v6; // xmm0
__int128 v7; // xmm0
__int128 v8; // xmm0
__int128 v10; // [rsp+0h] [rbp-48h] BYREF
__int128 v11; // [rsp+10h] [rbp-38h] BYREF
__int128 v12; // [rsp+20h] [rbp-28h] BYREF
*(_QWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v6 = *(_OWORD *)a2;
*(_QWORD *)(a2 + 8) = 0LL;
v12 = v6;
*(_QWORD *)a2 = 0LL;
std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(a1, &v12);
v7 = *(_OWORD *)a3;
*(_QWORD *)(a3 + 8) = 0LL;
v11 = v7;
*(_QWORD *)a3 = 0LL;
std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(a1, &v11);
v8 = *(_OWORD *)a4;
*(_QWORD *)(a4 + 8) = 0LL;
v10 = v8;
*(_QWORD *)a4 = 0LL;
std::vector<std::shared_ptr<ftxui::Node>>::emplace_back<std::shared_ptr<ftxui::Node>>(a1, &v10);
if ( *((_QWORD *)&v10 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v10 + 1));
if ( *((_QWORD *)&v11 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v11 + 1));
if ( *((_QWORD *)&v12 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v12 + 1));
return a1;
}
|
unpack<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RCX
MOV R15,RDX
MOV RBX,RDI
XOR ECX,ECX
MOV qword ptr [RDI + 0x10],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOVUPS XMM0,xmmword ptr [RSI]
MOV qword ptr [RSI + 0x8],RCX
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX],XMM0
MOV qword ptr [RSI],RCX
LAB_001234d3:
MOV RSI,RAX
CALL 0x001151b6
MOVUPS XMM0,xmmword ptr [R15]
XOR EAX,EAX
MOV qword ptr [R15 + 0x8],RAX
LEA RSI,[RSP + 0x10]
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [R15],RAX
LAB_001234f0:
MOV RDI,RBX
CALL 0x001151b6
MOVUPS XMM0,xmmword ptr [R14]
XOR EAX,EAX
MOV qword ptr [R14 + 0x8],RAX
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [R14],RAX
LAB_0012350b:
MOV RDI,RBX
CALL 0x001151b6
LAB_00123513:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00123522
CALL 0x00114af8
LAB_00123522:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00123531
CALL 0x00114af8
LAB_00123531:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00123540
CALL 0x00114af8
LAB_00123540:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node> > >
ftxui::unpack<std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>,
std::shared_ptr<ftxui::Node> >(std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>,
std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall
ftxui::
unpack<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>
(ftxui *this,int8 *param_2,int8 *param_3,int8 *param_4)
{
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
int8 local_28;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_20;
*(int8 *)(this + 0x10) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
local_28 = *param_2;
p_Stack_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1];
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 001234d3 to 001234da has its CatchHandler @ 00123575 */
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
emplace_back<std::shared_ptr<ftxui::Node>>
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
this,(shared_ptr *)&local_28);
local_38 = *param_3;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_3[1];
param_3[1] = 0;
*param_3 = 0;
/* try { // try from 001234f0 to 001234f7 has its CatchHandler @ 00123561 */
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
emplace_back<std::shared_ptr<ftxui::Node>>
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
this,(shared_ptr *)&local_38);
local_48 = *param_4;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_4[1];
param_4[1] = 0;
*param_4 = 0;
/* try { // try from 0012350b to 00123512 has its CatchHandler @ 0012354d */
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
emplace_back<std::shared_ptr<ftxui::Node>>
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
this,(shared_ptr *)&local_48);
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
if (p_Stack_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_20);
}
return this;
}
|
|
18,728
|
ma_init_dynamic_string
|
eloqsql/libmariadb/libmariadb/ma_string.c
|
my_bool ma_init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
size_t init_alloc, size_t alloc_increment)
{
uint length;
if (!alloc_increment)
alloc_increment=128;
length=1;
if (init_str && (length= (uint) strlen(init_str)+1) < init_alloc)
init_alloc=((length+alloc_increment-1)/alloc_increment)*alloc_increment;
if (!init_alloc)
init_alloc=alloc_increment;
if (!(str->str=(char*) malloc(init_alloc)))
return(TRUE);
str->length=length-1;
if (init_str)
memcpy(str->str,init_str,length);
str->max_length=init_alloc;
str->alloc_increment=alloc_increment;
return(FALSE);
}
|
O0
|
c
|
ma_init_dynamic_string:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x55807
movq $0x80, -0x28(%rbp)
movl $0x1, -0x2c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x55848
movq -0x18(%rbp), %rdi
callq 0x363e0
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl %eax, %eax
cmpq -0x20(%rbp), %rax
jae 0x55848
movl -0x2c(%rbp), %eax
addq -0x28(%rbp), %rax
subq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x28(%rbp)
imulq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x55857
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x368d0
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x55873
movb $0x1, -0x1(%rbp)
jmp 0x558bd
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x558a1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
callq 0x360b0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_init_dynamic_string:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
cmp [rbp+var_28], 0
jnz short loc_55807
mov [rbp+var_28], 80h
loc_55807:
mov [rbp+var_2C], 1
cmp [rbp+var_18], 0
jz short loc_55848
mov rdi, [rbp+var_18]
call _strlen
add eax, 1
mov [rbp+var_2C], eax
mov eax, eax
cmp rax, [rbp+var_20]
jnb short loc_55848
mov eax, [rbp+var_2C]
add rax, [rbp+var_28]
sub rax, 1
xor ecx, ecx
mov edx, ecx
div [rbp+var_28]
imul rax, [rbp+var_28]
mov [rbp+var_20], rax
loc_55848:
cmp [rbp+var_20], 0
jnz short loc_55857
mov rax, [rbp+var_28]
mov [rbp+var_20], rax
loc_55857:
mov rdi, [rbp+var_20]
call _malloc
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jnz short loc_55873
mov [rbp+var_1], 1
jmp short loc_558BD
loc_55873:
mov eax, [rbp+var_2C]
sub eax, 1
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+8], rcx
cmp [rbp+var_18], 0
jz short loc_558A1
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_2C]
mov edx, eax
call _memcpy
loc_558A1:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov [rbp+var_1], 0
loc_558BD:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char ma_init_dynamic_string(long long *a1, long long a2, unsigned long long a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v6; // [rsp+4h] [rbp-2Ch]
unsigned long long v7; // [rsp+8h] [rbp-28h]
v7 = a4;
if ( !a4 )
v7 = 128LL;
v6 = 1;
if ( a2 )
{
v6 = strlen(a2) + 1;
if ( v6 < a3 )
a3 = v7 * ((v7 + v6 - 1) / v7);
}
if ( !a3 )
a3 = v7;
v4 = malloc(a3);
*a1 = v4;
if ( !v4 )
return 1;
a1[1] = v6 - 1;
if ( a2 )
memcpy(*a1, a2, v6);
a1[2] = a3;
a1[3] = v7;
return 0;
}
|
ma_init_dynamic_string:
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 qword ptr [RBP + -0x28],RCX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00155807
MOV qword ptr [RBP + -0x28],0x80
LAB_00155807:
MOV dword ptr [RBP + -0x2c],0x1
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00155848
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001363e0
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,EAX
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00155848
MOV EAX,dword ptr [RBP + -0x2c]
ADD RAX,qword ptr [RBP + -0x28]
SUB RAX,0x1
XOR ECX,ECX
MOV EDX,ECX
DIV qword ptr [RBP + -0x28]
IMUL RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_00155848:
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00155857
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_00155857:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001368d0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x00155873
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001558bd
LAB_00155873:
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,0x1
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001558a1
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
CALL 0x001360b0
LAB_001558a1:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_001558bd:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 ma_init_dynamic_string(int8 *param_1,char *param_2,ulong param_3,ulong param_4)
{
size_t sVar1;
void *pvVar2;
uint local_34;
ulong local_30;
ulong local_28;
int1 local_9;
local_30 = param_4;
if (param_4 == 0) {
local_30 = 0x80;
}
local_34 = 1;
local_28 = param_3;
if (param_2 != (char *)0x0) {
sVar1 = strlen(param_2);
local_34 = (int)sVar1 + 1;
if (local_34 < param_3) {
local_28 = (((local_34 + local_30) - 1) / local_30) * local_30;
}
}
if (local_28 == 0) {
local_28 = local_30;
}
pvVar2 = malloc(local_28);
*param_1 = pvVar2;
if (pvVar2 == (void *)0x0) {
local_9 = 1;
}
else {
param_1[1] = (ulong)(local_34 - 1);
if (param_2 != (char *)0x0) {
memcpy((void *)*param_1,param_2,(ulong)local_34);
}
param_1[2] = local_28;
param_1[3] = local_30;
local_9 = 0;
}
return local_9;
}
|
|
18,729
|
buffer_add_bytes
|
corpus-core[P]colibri-stateless/src/util/bytes.c
|
void buffer_add_bytes(buffer_t* buf, uint32_t len, ...) {
buffer_grow(buf, buf->data.len + len);
va_list args;
va_start(args, len);
for (uint32_t i = 0; i < len; i++) {
buf->data.data[buf->data.len] = (uint8_t) va_arg(args, int);
buf->data.len++;
}
va_end(args);
}
|
O0
|
c
|
buffer_add_bytes:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp # imm = 0x110
testb %al, %al
je 0x9ea4b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %eax
addl -0xc(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x9dfa0
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x9eb48
leaq -0x30(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x9eaf6
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x9eb13
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movl (%rax), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movl (%rcx), %ecx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x9eaaf
addq $0x110, %rsp # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
buffer_add_bytes:
push rbp
mov rbp, rsp
sub rsp, 110h
test al, al
jz short loc_9EA4B
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_9EA4B:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_D8], rcx
mov [rbp+var_E0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rdi, [rbp+var_8]
mov rax, [rbp+var_8]
mov eax, [rax]
add eax, [rbp+var_C]
mov eax, eax
mov esi, eax
call buffer_grow
lea rax, [rbp+var_30]
lea rcx, [rbp+var_F0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov [rbp+var_34], 0
loc_9EAAF:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_C]
jnb loc_9EB48
lea rax, [rbp+var_30]
mov [rbp+var_100], rax
mov eax, [rbp+var_30]
mov [rbp+var_F4], eax
cmp eax, 28h ; '('
ja short loc_9EAF6
mov rcx, [rbp+var_100]
mov edx, [rbp+var_F4]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_108], rax
jmp short loc_9EB13
loc_9EAF6:
mov rcx, [rbp+var_100]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_108], rax
loc_9EB13:
mov rax, [rbp+var_108]
mov eax, [rax]
mov dl, al
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
mov ecx, [rcx]
mov [rax+rcx], dl
mov rax, [rbp+var_8]
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp loc_9EAAF
loc_9EB48:
add rsp, 110h
pop rbp
retn
|
long long buffer_add_bytes(_DWORD *a1, int a2, ...)
{
long long result; // rax
_DWORD *overflow_arg_area; // rax
unsigned int i; // [rsp+DCh] [rbp-34h]
va_list va; // [rsp+E0h] [rbp-30h] BYREF
unsigned int v6; // [rsp+104h] [rbp-Ch]
_DWORD *v7; // [rsp+108h] [rbp-8h]
va_start(va, a2);
v7 = a1;
v6 = a2;
buffer_grow((unsigned long long)a1, (unsigned int)(a2 + *a1));
for ( i = 0; ; ++i )
{
result = i;
if ( i >= v6 )
break;
if ( va[0].gp_offset > 0x28 )
{
overflow_arg_area = va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
*(_BYTE *)(*((_QWORD *)v7 + 1) + (unsigned int)(*v7)++) = *overflow_arg_area;
}
return result;
}
|
buffer_add_bytes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x110
TEST AL,AL
JZ 0x0019ea4b
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_0019ea4b:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0xd8],RCX
MOV qword ptr [RBP + -0xe0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
ADD EAX,dword ptr [RBP + -0xc]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0019dfa0
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xf0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV dword ptr [RBP + -0x34],0x0
LAB_0019eaaf:
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RBP + -0xc]
JNC 0x0019eb48
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x100],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0xf4],EAX
CMP EAX,0x28
JA 0x0019eaf6
MOV RCX,qword ptr [RBP + -0x100]
MOV EDX,dword ptr [RBP + -0xf4]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x108],RAX
JMP 0x0019eb13
LAB_0019eaf6:
MOV RCX,qword ptr [RBP + -0x100]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x108],RAX
LAB_0019eb13:
MOV RAX,qword ptr [RBP + -0x108]
MOV EAX,dword ptr [RAX]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0019eaaf
LAB_0019eb48:
ADD RSP,0x110
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void buffer_add_bytes(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
uint *param_9,uint param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int4 *local_110;
int4 local_f8 [4];
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
uint local_3c;
uint local_38;
int4 *local_30;
uint local_14;
uint *local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_e8 = param_11;
local_e0 = param_12;
local_d8 = param_13;
local_d0 = param_14;
local_14 = param_10;
local_10 = param_9;
buffer_grow(param_9,*param_9 + param_10);
local_30 = (int4 *)&stack0x00000008;
local_38 = 0x10;
for (local_3c = 0; local_3c < local_14; local_3c = local_3c + 1) {
if (local_38 < 0x29) {
local_110 = (int4 *)((long)local_f8 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_110 = local_30;
local_30 = local_30 + 2;
}
*(char *)(*(long *)(local_10 + 2) + (ulong)*local_10) = (char)*local_110;
*local_10 = *local_10 + 1;
}
return;
}
|
|
18,730
|
buffer_add_bytes
|
corpus-core[P]colibri-stateless/src/util/bytes.c
|
void buffer_add_bytes(buffer_t* buf, uint32_t len, ...) {
buffer_grow(buf, buf->data.len + len);
va_list args;
va_start(args, len);
for (uint32_t i = 0; i < len; i++) {
buf->data.data[buf->data.len] = (uint8_t) va_arg(args, int);
buf->data.len++;
}
va_end(args);
}
|
O2
|
c
|
buffer_add_bytes:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %rdx, 0x10(%r15)
movq %rcx, 0x18(%r15)
movq %r8, 0x20(%r15)
movq %r9, 0x28(%r15)
testb %al, %al
je 0x4b672
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl (%rdi), %esi
addl %ebx, %esi
callq 0x4b01d
movq %r15, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rsp)
subl $0x1, %ebx
jb 0x4b6d8
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x4b6b9
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x4b6c7
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movb (%rax), %al
movq 0x8(%r14), %rcx
movl (%r14), %edx
movb %al, (%rcx,%rdx)
incl (%r14)
jmp 0x4b69b
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
buffer_add_bytes:
push r15
push r14
push rbx
sub rsp, 0D0h
mov ebx, esi
mov r14, rdi
lea r15, [rsp+0E8h+var_C8]
mov [r15+10h], rdx
mov [r15+18h], rcx
mov [r15+20h], r8
mov [r15+28h], r9
test al, al
jz short loc_4B672
movaps [rsp+0E8h+var_98], xmm0
movaps [rsp+0E8h+var_88], xmm1
movaps [rsp+0E8h+var_78], xmm2
movaps [rsp+0E8h+var_68], xmm3
movaps [rsp+0E8h+var_58], xmm4
movaps [rsp+0E8h+var_48], xmm5
movaps [rsp+0E8h+var_38], xmm6
movaps [rsp+0E8h+var_28], xmm7
loc_4B672:
mov esi, [rdi]
add esi, ebx
call buffer_grow
mov [rsp+0E8h+var_D8], r15
lea rax, [rsp+0E8h+arg_0]
mov [rsp+0E8h+var_E0], rax
mov rax, 3000000010h
mov [rsp+0E8h+var_E8], rax
loc_4B69B:
sub ebx, 1
jb short loc_4B6D8
mov ecx, dword ptr [rsp+0E8h+var_E8]
cmp rcx, 28h ; '('
ja short loc_4B6B9
mov rax, rcx
add rax, [rsp+0E8h+var_D8]
add ecx, 8
mov dword ptr [rsp+0E8h+var_E8], ecx
jmp short loc_4B6C7
loc_4B6B9:
mov rax, [rsp+0E8h+var_E0]
lea rcx, [rax+8]
mov [rsp+0E8h+var_E0], rcx
loc_4B6C7:
mov al, [rax]
mov rcx, [r14+8]
mov edx, [r14]
mov [rcx+rdx], al
inc dword ptr [r14]
jmp short loc_4B69B
loc_4B6D8:
add rsp, 0D0h
pop rbx
pop r14
pop r15
retn
|
char buffer_add_bytes(long long a1, int a2, long long a3, long long a4, long long a5, long long a6, ...)
{
int v6; // ebx
char result; // al
char *v9; // rax
long long v10; // kr00_8
va_list va; // [rsp+0h] [rbp-E8h] BYREF
long long v12; // [rsp+30h] [rbp-B8h]
long long v13; // [rsp+38h] [rbp-B0h]
long long v14; // [rsp+40h] [rbp-A8h]
long long v15; // [rsp+48h] [rbp-A0h]
va_start(va, a6);
v6 = a2;
v12 = a3;
v13 = a4;
v14 = a5;
v15 = a6;
buffer_grow(a1, (unsigned int)(a2 + *(_DWORD *)a1));
result = 16;
va[0].gp_offset = 16;
while ( v6-- != 0 )
{
if ( va[0].gp_offset > 0x28uLL )
{
v10 = va_arg(va, _QWORD);
v9 = (char *)&v10;
}
else
{
v9 = (char *)va[0].reg_save_area + va[0].gp_offset;
va[0].gp_offset += 8;
}
result = *v9;
*(_BYTE *)(*(_QWORD *)(a1 + 8) + (unsigned int)(*(_DWORD *)a1)++) = result;
}
return result;
}
|
buffer_add_bytes:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xd0
MOV EBX,ESI
MOV R14,RDI
LEA R15,[RSP + 0x20]
MOV qword ptr [R15 + 0x10],RDX
MOV qword ptr [R15 + 0x18],RCX
MOV qword ptr [R15 + 0x20],R8
MOV qword ptr [R15 + 0x28],R9
TEST AL,AL
JZ 0x0014b672
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_0014b672:
MOV ESI,dword ptr [RDI]
ADD ESI,EBX
CALL 0x0014b01d
MOV qword ptr [RSP + 0x10],R15
LEA RAX,[RSP + 0xf0]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RSP],RAX
LAB_0014b69b:
SUB EBX,0x1
JC 0x0014b6d8
MOV ECX,dword ptr [RSP]
CMP RCX,0x28
JA 0x0014b6b9
MOV RAX,RCX
ADD RAX,qword ptr [RSP + 0x10]
ADD ECX,0x8
MOV dword ptr [RSP],ECX
JMP 0x0014b6c7
LAB_0014b6b9:
MOV RAX,qword ptr [RSP + 0x8]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
LAB_0014b6c7:
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [R14 + 0x8]
MOV EDX,dword ptr [R14]
MOV byte ptr [RCX + RDX*0x1],AL
INC dword ptr [R14]
JMP 0x0014b69b
LAB_0014b6d8:
ADD RSP,0xd0
POP RBX
POP R14
POP R15
RET
|
void buffer_add_bytes(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
uint *param_9,int param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 *puVar1;
uint uVar2;
ulong uVar3;
bool bVar4;
int1 *local_e0;
int1 local_c8 [16];
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
if (in_AL != '\0') {
local_98 = param_1;
local_88 = param_2;
local_78 = param_3;
local_68 = param_4;
local_58 = param_5;
local_48 = param_6;
local_38 = param_7;
local_28 = param_8;
}
local_b8 = param_11;
local_b0 = param_12;
local_a8 = param_13;
local_a0 = param_14;
buffer_grow(param_9,*param_9 + param_10);
local_e0 = &stack0x00000008;
uVar2 = 0x10;
while (bVar4 = param_10 != 0, param_10 = param_10 + -1, bVar4) {
uVar3 = (ulong)uVar2;
if (uVar3 < 0x29) {
uVar2 = uVar2 + 8;
puVar1 = local_c8 + uVar3;
}
else {
puVar1 = local_e0;
local_e0 = local_e0 + 8;
}
*(int1 *)(*(long *)(param_9 + 2) + (ulong)*param_9) = *puVar1;
*param_9 = *param_9 + 1;
}
return;
}
|
|
18,731
|
my_strntol_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static long
my_strntol_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr+l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr != NULL )
*endptr= (char*) s;
err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do {
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow= 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*) s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (negative)
{
if (res > (uint32) INT_MIN32)
overflow= 1;
}
else if (res > INT_MAX32)
overflow= 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) res) : (long) res);
}
|
O0
|
c
|
my_strntol_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x13c351
movq -0x50(%rbp), %rax
addq $-0x9, %rax
movq %rax, -0x88(%rbp)
subq $0x24, %rax
ja 0x13c34d
movq -0x88(%rbp), %rax
leaq 0x15e1e5(%rip), %rcx # 0x29a510
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x13c34f
jmp 0x13c34f
cmpl $0x0, -0x3c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0x13c34f
jmp 0x13c34f
jmp 0x13c3a8
jmp 0x13c389
cmpq $0x0, -0x30(%rbp)
je 0x13c363
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %edx
movl $0x21, %ecx
movl $0x54, %eax
cmpl $0x0, %edx
cmovel %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x13c5b1
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x13c2ea
jmp 0x13c3a6
jmp 0x13c3a8
movl $0x0, -0x40(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %eax, -0x60(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %edx, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x13c4b9
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
cmpq $0x30, -0x50(%rbp)
jb 0x13c427
cmpq $0x39, -0x50(%rbp)
ja 0x13c427
movq -0x50(%rbp), %rax
subq $0x30, %rax
movq %rax, -0x50(%rbp)
jmp 0x13c470
cmpq $0x41, -0x50(%rbp)
jb 0x13c447
cmpq $0x5a, -0x50(%rbp)
ja 0x13c447
movq -0x50(%rbp), %rax
subq $0x41, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x13c46e
cmpq $0x61, -0x50(%rbp)
jb 0x13c467
cmpq $0x7a, -0x50(%rbp)
ja 0x13c467
movq -0x50(%rbp), %rax
subq $0x61, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x13c46c
jmp 0x13c4f8
jmp 0x13c46e
jmp 0x13c470
movq -0x50(%rbp), %rax
cmpl -0x24(%rbp), %eax
jl 0x13c47b
jmp 0x13c4f8
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
ja 0x13c497
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
jne 0x13c4a0
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x13c4a0
movl $0x1, -0x40(%rbp)
jmp 0x13c4b7
movl -0x24(%rbp), %eax
imull -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x50(%rbp), %rcx
movl -0x64(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x64(%rbp)
jmp 0x13c4ea
cmpl $0x0, -0x44(%rbp)
jne 0x13c4e8
cmpq $0x0, -0x30(%rbp)
je 0x13c4d1
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl $0x54, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x13c5b1
jmp 0x13c4f8
jmp 0x13c4ec
movb $0x1, %al
testb $0x1, %al
jne 0x13c3d8
jmp 0x13c4f8
cmpq $0x0, -0x30(%rbp)
je 0x13c50a
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
cmpq -0x80(%rbp), %rax
jne 0x13c52b
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x13c5b1
cmpl $0x0, -0x3c(%rbp)
je 0x13c543
cmpl $0x80000000, -0x64(%rbp) # imm = 0x80000000
jbe 0x13c541
movl $0x1, -0x40(%rbp)
jmp 0x13c557
movl -0x64(%rbp), %eax
cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF
jle 0x13c555
movl $0x1, -0x40(%rbp)
jmp 0x13c557
cmpl $0x0, -0x40(%rbp)
je 0x13c583
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl -0x3c(%rbp), %edx
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq $-0x80000000, %rcx # imm = 0x80000000
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x13c5b1
cmpl $0x0, -0x3c(%rbp)
je 0x13c59c
movl -0x64(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0x13c5a6
movl -0x64(%rbp), %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
|
my_strntol_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_3C], 0
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_78], rax
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
loc_13C2EA:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle short loc_13C351
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases
mov [rbp+var_88], rax
sub rax, 24h
ja short def_13C332; jumptable 000000000013C332 default case, cases 10-31,33-42,44
mov rax, [rbp+var_88]
lea rcx, jpt_13C332
movsxd rax, ds:(jpt_13C332 - 29A510h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_13C334:
jmp short loc_13C34F; jumptable 000000000013C332 case 32
loc_13C336:
jmp short loc_13C34F; jumptable 000000000013C332 case 9
loc_13C338:
cmp [rbp+var_3C], 0; jumptable 000000000013C332 case 45
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_3C], eax
jmp short loc_13C34F
loc_13C34B:
jmp short loc_13C34F; jumptable 000000000013C332 case 43
def_13C332:
jmp short loc_13C3A8; jumptable 000000000013C332 default case, cases 10-31,33-42,44
loc_13C34F:
jmp short loc_13C389
loc_13C351:
cmp [rbp+var_30], 0
jz short loc_13C363
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_13C363:
mov edx, [rbp+var_44]
mov ecx, 21h ; '!'
mov eax, 54h ; 'T'
cmp edx, 0
cmovz ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov [rbp+var_8], 0
jmp loc_13C5B1
loc_13C389:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov al, 1
test al, 1
jnz loc_13C2EA
jmp short $+2
loc_13C3A6:
jmp short $+2
loc_13C3A8:
mov [rbp+var_40], 0
mov [rbp+var_64], 0
mov rax, [rbp+var_70]
mov [rbp+var_80], rax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_60], eax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_5C], edx
loc_13C3D8:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle loc_13C4B9
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
cmp [rbp+var_50], 30h ; '0'
jb short loc_13C427
cmp [rbp+var_50], 39h ; '9'
ja short loc_13C427
mov rax, [rbp+var_50]
sub rax, 30h ; '0'
mov [rbp+var_50], rax
jmp short loc_13C470
loc_13C427:
cmp [rbp+var_50], 41h ; 'A'
jb short loc_13C447
cmp [rbp+var_50], 5Ah ; 'Z'
ja short loc_13C447
mov rax, [rbp+var_50]
sub rax, 41h ; 'A'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_13C46E
loc_13C447:
cmp [rbp+var_50], 61h ; 'a'
jb short loc_13C467
cmp [rbp+var_50], 7Ah ; 'z'
ja short loc_13C467
mov rax, [rbp+var_50]
sub rax, 61h ; 'a'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_13C46C
loc_13C467:
jmp loc_13C4F8
loc_13C46C:
jmp short $+2
loc_13C46E:
jmp short $+2
loc_13C470:
mov rax, [rbp+var_50]
cmp eax, [rbp+var_24]
jl short loc_13C47B
jmp short loc_13C4F8
loc_13C47B:
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
ja short loc_13C497
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
jnz short loc_13C4A0
mov rax, [rbp+var_50]
mov ecx, [rbp+var_5C]
cmp rax, rcx
jbe short loc_13C4A0
loc_13C497:
mov [rbp+var_40], 1
jmp short loc_13C4B7
loc_13C4A0:
mov eax, [rbp+var_24]
imul eax, [rbp+var_64]
mov [rbp+var_64], eax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_64]
add rax, rcx
mov [rbp+var_64], eax
loc_13C4B7:
jmp short loc_13C4EA
loc_13C4B9:
cmp [rbp+var_44], 0
jnz short loc_13C4E8
cmp [rbp+var_30], 0
jz short loc_13C4D1
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_13C4D1:
mov rax, [rbp+var_38]
mov dword ptr [rax], 54h ; 'T'
mov [rbp+var_8], 0
jmp loc_13C5B1
loc_13C4E8:
jmp short loc_13C4F8
loc_13C4EA:
jmp short $+2
loc_13C4EC:
mov al, 1
test al, 1
jnz loc_13C3D8
jmp short $+2
loc_13C4F8:
cmp [rbp+var_30], 0
jz short loc_13C50A
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_13C50A:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_80]
jnz short loc_13C52B
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp loc_13C5B1
loc_13C52B:
cmp [rbp+var_3C], 0
jz short loc_13C543
cmp [rbp+var_64], 80000000h
jbe short loc_13C541
mov [rbp+var_40], 1
loc_13C541:
jmp short loc_13C557
loc_13C543:
mov eax, [rbp+var_64]
cmp rax, 7FFFFFFFh
jle short loc_13C555
mov [rbp+var_40], 1
loc_13C555:
jmp short $+2
loc_13C557:
cmp [rbp+var_40], 0
jz short loc_13C583
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov edx, [rbp+var_3C]
mov eax, 7FFFFFFFh
mov rcx, 0FFFFFFFF80000000h
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_8], rax
jmp short loc_13C5B1
loc_13C583:
cmp [rbp+var_3C], 0
jz short loc_13C59C
mov eax, [rbp+var_64]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_90], rax
jmp short loc_13C5A6
loc_13C59C:
mov eax, [rbp+var_64]
mov [rbp+var_90], rax
loc_13C5A6:
mov rax, [rbp+var_90]
mov [rbp+var_8], rax
loc_13C5B1:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
|
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
int v6; // ecx
long long v7; // rax
long long v10; // [rsp+10h] [rbp-80h]
long long v11; // [rsp+18h] [rbp-78h]
long long v12; // [rsp+20h] [rbp-70h]
unsigned int v13; // [rsp+2Ch] [rbp-64h]
unsigned int v14; // [rsp+30h] [rbp-60h]
unsigned int v15; // [rsp+34h] [rbp-5Ch]
long long ( *v16)(long long, unsigned long long *, long long, long long); // [rsp+38h] [rbp-58h]
unsigned long long v17; // [rsp+40h] [rbp-50h] BYREF
int v18; // [rsp+4Ch] [rbp-44h]
int v19; // [rsp+50h] [rbp-40h]
BOOL v20; // [rsp+54h] [rbp-3Ch]
int *v21; // [rsp+58h] [rbp-38h]
_QWORD *v22; // [rsp+60h] [rbp-30h]
unsigned int v23; // [rsp+6Ch] [rbp-24h]
long long v24; // [rsp+70h] [rbp-20h]
long long v25; // [rsp+78h] [rbp-18h]
long long v26; // [rsp+80h] [rbp-10h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = 0;
v16 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v12 = a2;
v11 = a3 + a2;
*a6 = 0;
while ( 2 )
{
v18 = v16(v26, &v17, v12, v11);
if ( v18 <= 0 )
{
if ( v22 )
*v22 = v12;
v6 = 33;
if ( !v18 )
v6 = 84;
*v21 = v6;
return 0LL;
}
else
{
switch ( v17 )
{
case 9uLL:
case 0x20uLL:
case 0x2BuLL:
goto LABEL_10;
case 0x2DuLL:
v20 = !v20;
LABEL_10:
v12 += v18;
continue;
default:
v19 = 0;
v13 = 0;
v10 = v12;
v14 = 0xFFFFFFFF / v23;
v15 = 0xFFFFFFFF % v23;
break;
}
while ( 1 )
{
v18 = v16(v26, &v17, v12, v11);
if ( v18 <= 0 )
break;
v12 += v18;
if ( v17 < 0x30 || v17 > 0x39 )
{
if ( v17 < 0x41 || v17 > 0x5A )
{
if ( v17 < 0x61 || v17 > 0x7A )
goto LABEL_33;
v17 = v17 - 97 + 10;
}
else
{
v17 = v17 - 65 + 10;
}
}
else
{
v17 -= 48LL;
}
if ( (int)v17 >= (int)v23 )
goto LABEL_33;
if ( v13 > v14 || v13 == v14 && v17 > v15 )
v19 = 1;
else
v13 = v17 + v13 * v23;
}
if ( v18 )
{
LABEL_33:
if ( v22 )
*v22 = v12;
if ( v12 == v10 )
{
*v21 = 33;
return 0LL;
}
else
{
if ( v20 )
{
if ( v13 > 0x80000000 )
v19 = 1;
}
else if ( v13 > 0x7FFFFFFFuLL )
{
v19 = 1;
}
if ( v19 )
{
*v21 = 34;
v7 = 0x7FFFFFFFLL;
if ( v20 )
return 0xFFFFFFFF80000000LL;
return v7;
}
else if ( v20 )
{
return -(long long)v13;
}
else
{
return v13;
}
}
}
if ( v22 )
*v22 = v12;
*v21 = 84;
return 0LL;
}
}
}
| |||
18,732
|
my_strntol_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static long
my_strntol_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr+l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr != NULL )
*endptr= (char*) s;
err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do {
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow= 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*) s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (negative)
{
if (res > (uint32) INT_MIN32)
overflow= 1;
}
else if (res > INT_MAX32)
overflow= 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) res) : (long) res);
}
|
O3
|
c
|
my_strntol_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r12
addq %rsi, %r13
movq %r9, -0x50(%rbp)
movl $0x0, (%r9)
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xcc12e
movl $0x0, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq -0x30(%rbp), %rcx
cmpq $0x2a, %rcx
jg 0xcc0fe
cmpq $0x9, %rcx
je 0xcc116
cmpq $0x20, %rcx
je 0xcc116
jmp 0xcc160
cmpq $0x2b, %rcx
je 0xcc116
cmpq $0x2d, %rcx
jne 0xcc160
xorl %ecx, %ecx
cmpl $0x0, -0x38(%rbp)
sete %cl
movl %ecx, -0x38(%rbp)
movl %eax, %eax
addq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jg 0xcc0e6
movq -0x40(%rbp), %rcx
testq %rcx, %rcx
je 0xcc13a
movq %r15, (%rcx)
testl %eax, %eax
movl $0x54, %eax
movl $0x21, %ecx
cmovel %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x34(%rbp)
movl %edx, %ebx
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xcc226
movl %ebx, %ecx
movq %rcx, -0x60(%rbp)
xorl %ecx, %ecx
movq %r15, %rbx
xorl %r8d, %r8d
movq %rbx, %rsi
movl %eax, %ebx
addq %rsi, %rbx
movq -0x30(%rbp), %rsi
leaq -0x30(%rsi), %rax
cmpq $0x9, %rax
ja 0xcc1b1
movq %rax, -0x30(%rbp)
jmp 0xcc1d6
leaq -0x41(%rsi), %rax
cmpq $0x19, %rax
ja 0xcc1c1
addq $-0x37, %rsi
jmp 0xcc1cf
leaq -0x61(%rsi), %rax
cmpq $0x19, %rax
ja 0xcc236
addq $-0x57, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
cmpl -0x34(%rbp), %eax
jge 0xcc236
movl $0x1, %esi
cmpl -0x44(%rbp), %ecx
ja 0xcc1f9
jne 0xcc1f0
movl -0x44(%rbp), %edi
cmpq -0x60(%rbp), %rax
ja 0xcc1fb
imull -0x34(%rbp), %ecx
addl %eax, %ecx
movl %r8d, %esi
movl %ecx, %edi
movl %edi, -0x54(%rbp)
movl %esi, -0x58(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *%r12
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %esi
movl %edi, %ecx
movl %esi, %r8d
testl %eax, %eax
jg 0xcc195
jmp 0xcc22d
xorl %edi, %edi
movq %r15, %rbx
xorl %esi, %esi
testl %eax, %eax
je 0xcc295
movl %esi, %r8d
movl %edi, %ecx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xcc242
movq %rbx, (%rax)
cmpq %r15, %rbx
je 0xcc286
cmpl $0x80000001, %ecx # imm = 0x80000001
movl $0x1, %eax
movl %r8d, %esi
cmovael %eax, %esi
testl %ecx, %ecx
cmovsl %eax, %r8d
movl -0x38(%rbp), %edi
testl %edi, %edi
cmovnel %esi, %r8d
testl %r8d, %r8d
je 0xcc2b0
testl %edi, %edi
movq -0x50(%rbp), %rax
movl $0x22, (%rax)
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movq $-0x80000000, %rax # imm = 0x80000000
jmp 0xcc2ba
movq -0x50(%rbp), %rax
movl $0x21, (%rax)
jmp 0xcc14f
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xcc2a1
movq %rbx, (%rax)
movq -0x50(%rbp), %rax
movl $0x54, (%rax)
jmp 0xcc14f
movl %ecx, %ecx
movq %rcx, %rax
negq %rax
testl %edi, %edi
cmoveq %rcx, %rax
jmp 0xcc151
|
my_strntol_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_40], r8
mov [rbp+var_34], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi+0B8h]
mov r12, [rax+28h]
add r13, rsi
mov [rbp+var_50], r9
mov dword ptr [r9], 0
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle short loc_CC12E
mov [rbp+var_38], 0
lea rbx, [rbp+var_30]
loc_CC0E6:
mov rcx, [rbp+var_30]
cmp rcx, 2Ah ; '*'
jg short loc_CC0FE
cmp rcx, 9
jz short loc_CC116
cmp rcx, 20h ; ' '
jz short loc_CC116
jmp short loc_CC160
loc_CC0FE:
cmp rcx, 2Bh ; '+'
jz short loc_CC116
cmp rcx, 2Dh ; '-'
jnz short loc_CC160
xor ecx, ecx
cmp [rbp+var_38], 0
setz cl
mov [rbp+var_38], ecx
loc_CC116:
mov eax, eax
add r15, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jg short loc_CC0E6
loc_CC12E:
mov rcx, [rbp+var_40]
test rcx, rcx
jz short loc_CC13A
mov [rcx], r15
loc_CC13A:
test eax, eax
mov eax, 54h ; 'T'
mov ecx, 21h ; '!'
cmovz ecx, eax
mov rax, [rbp+var_50]
mov [rax], ecx
loc_CC14F:
xor eax, eax
loc_CC151:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CC160:
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_34]
mov ebx, edx
mov [rbp+var_44], eax
lea rsi, [rbp+var_30]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle loc_CC226
mov ecx, ebx
mov [rbp+var_60], rcx
xor ecx, ecx
mov rbx, r15
xor r8d, r8d
loc_CC195:
mov rsi, rbx
mov ebx, eax
add rbx, rsi
mov rsi, [rbp+var_30]
lea rax, [rsi-30h]
cmp rax, 9
ja short loc_CC1B1
mov [rbp+var_30], rax
jmp short loc_CC1D6
loc_CC1B1:
lea rax, [rsi-41h]
cmp rax, 19h
ja short loc_CC1C1
add rsi, 0FFFFFFFFFFFFFFC9h
jmp short loc_CC1CF
loc_CC1C1:
lea rax, [rsi-61h]
cmp rax, 19h
ja short loc_CC236
add rsi, 0FFFFFFFFFFFFFFA9h
loc_CC1CF:
mov [rbp+var_30], rsi
mov rax, rsi
loc_CC1D6:
cmp eax, [rbp+var_34]
jge short loc_CC236
mov esi, 1
cmp ecx, [rbp+var_44]
ja short loc_CC1F9
jnz short loc_CC1F0
mov edi, [rbp+var_44]
cmp rax, [rbp+var_60]
ja short loc_CC1FB
loc_CC1F0:
imul ecx, [rbp+var_34]
add ecx, eax
mov esi, r8d
loc_CC1F9:
mov edi, ecx
loc_CC1FB:
mov [rbp+var_54], edi
mov [rbp+var_58], esi
mov rdi, r14
lea rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r13
call r12
mov edi, [rbp+var_54]
mov esi, [rbp+var_58]
mov ecx, edi
mov r8d, esi
test eax, eax
jg loc_CC195
jmp short loc_CC22D
loc_CC226:
xor edi, edi
mov rbx, r15
xor esi, esi
loc_CC22D:
test eax, eax
jz short loc_CC295
mov r8d, esi
mov ecx, edi
loc_CC236:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_CC242
mov [rax], rbx
loc_CC242:
cmp rbx, r15
jz short loc_CC286
cmp ecx, 80000001h
mov eax, 1
mov esi, r8d
cmovnb esi, eax
test ecx, ecx
cmovs r8d, eax
mov edi, [rbp+var_38]
test edi, edi
cmovnz r8d, esi
test r8d, r8d
jz short loc_CC2B0
test edi, edi
mov rax, [rbp+var_50]
mov dword ptr [rax], 22h ; '"'
mov ecx, 7FFFFFFFh
mov rax, 0FFFFFFFF80000000h
jmp short loc_CC2BA
loc_CC286:
mov rax, [rbp+var_50]
mov dword ptr [rax], 21h ; '!'
jmp loc_CC14F
loc_CC295:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_CC2A1
mov [rax], rbx
loc_CC2A1:
mov rax, [rbp+var_50]
mov dword ptr [rax], 54h ; 'T'
jmp loc_CC14F
loc_CC2B0:
mov ecx, ecx
mov rax, rcx
neg rax
test edi, edi
loc_CC2BA:
cmovz rax, rcx
jmp loc_CC151
|
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
long long v6; // r15
long long ( *v8)(long long, _QWORD *, long long, long long); // r12
long long v9; // r13
int v10; // eax
int v11; // ecx
long long result; // rax
int v13; // eax
long long v14; // rcx
long long v15; // rbx
long long v16; // r8
unsigned long long v17; // rax
long long v18; // rsi
unsigned int v19; // esi
unsigned int v20; // edi
int v21; // esi
bool v22; // zf
unsigned int v24; // [rsp+1Ch] [rbp-44h]
BOOL v26; // [rsp+28h] [rbp-38h]
_QWORD v28[6]; // [rsp+30h] [rbp-30h] BYREF
v6 = a2;
v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v9 = a2 + a3;
*a6 = 0;
v10 = v8(a1, v28, a2, a2 + a3);
if ( v10 <= 0 )
{
LABEL_11:
if ( a5 )
*a5 = v6;
v11 = 33;
if ( !v10 )
v11 = 84;
*a6 = v11;
return 0LL;
}
v26 = 0;
while ( 1 )
{
if ( v28[0] > 42LL )
{
if ( v28[0] != 43LL )
{
if ( v28[0] != 45LL )
break;
v26 = !v26;
}
goto LABEL_10;
}
if ( v28[0] != 9LL && v28[0] != 32LL )
break;
LABEL_10:
v6 += (unsigned int)v10;
v10 = v8(a1, v28, v6, v9);
if ( v10 <= 0 )
goto LABEL_11;
}
v24 = 0xFFFFFFFF / a4;
v13 = v8(a1, v28, v6, v9);
if ( v13 > 0 )
{
LODWORD(v14) = 0;
v15 = v6;
v16 = 0LL;
while ( 1 )
{
v15 += (unsigned int)v13;
v17 = v28[0] - 48LL;
if ( (unsigned long long)(v28[0] - 48LL) > 9 )
{
if ( (unsigned long long)(v28[0] - 65LL) > 0x19 )
{
if ( (unsigned long long)(v28[0] - 97LL) > 0x19 )
goto LABEL_37;
v18 = v28[0] - 87LL;
}
else
{
v18 = v28[0] - 55LL;
}
v28[0] = v18;
v17 = v18;
}
else
{
v28[0] -= 48LL;
}
if ( (int)v17 >= (int)a4 )
goto LABEL_37;
v19 = 1;
if ( (unsigned int)v14 <= v24 )
{
if ( (_DWORD)v14 == v24 )
{
v20 = 0xFFFFFFFF / a4;
if ( v17 > 0xFFFFFFFF % a4 )
goto LABEL_32;
}
LODWORD(v14) = v17 + a4 * v14;
v19 = v16;
}
v20 = v14;
LABEL_32:
v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long))v8)(a1, v28, v15, v9, v16);
LODWORD(v14) = v20;
v16 = v19;
if ( v13 <= 0 )
goto LABEL_35;
}
}
v20 = 0;
v15 = v6;
v19 = 0;
LABEL_35:
if ( !v13 )
{
if ( a5 )
*a5 = v15;
*a6 = 84;
return 0LL;
}
LODWORD(v16) = v19;
LODWORD(v14) = v20;
LABEL_37:
if ( a5 )
*a5 = v15;
if ( v15 == v6 )
{
*a6 = 33;
return 0LL;
}
v21 = v16;
if ( (unsigned int)v14 >= 0x80000001 )
v21 = 1;
if ( (int)v14 < 0 )
LODWORD(v16) = 1;
if ( v26 )
LODWORD(v16) = v21;
if ( (_DWORD)v16 )
{
v22 = !v26;
*a6 = 34;
v14 = 0x7FFFFFFFLL;
result = 0xFFFFFFFF80000000LL;
}
else
{
v14 = (unsigned int)v14;
result = -(long long)(unsigned int)v14;
v22 = !v26;
}
if ( v22 )
return v14;
return result;
}
|
my_strntol_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x34],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV R12,qword ptr [RAX + 0x28]
ADD R13,RSI
MOV qword ptr [RBP + -0x50],R9
MOV dword ptr [R9],0x0
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001cc12e
MOV dword ptr [RBP + -0x38],0x0
LEA RBX,[RBP + -0x30]
LAB_001cc0e6:
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x2a
JG 0x001cc0fe
CMP RCX,0x9
JZ 0x001cc116
CMP RCX,0x20
JZ 0x001cc116
JMP 0x001cc160
LAB_001cc0fe:
CMP RCX,0x2b
JZ 0x001cc116
CMP RCX,0x2d
JNZ 0x001cc160
XOR ECX,ECX
CMP dword ptr [RBP + -0x38],0x0
SETZ CL
MOV dword ptr [RBP + -0x38],ECX
LAB_001cc116:
MOV EAX,EAX
ADD R15,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JG 0x001cc0e6
LAB_001cc12e:
MOV RCX,qword ptr [RBP + -0x40]
TEST RCX,RCX
JZ 0x001cc13a
MOV qword ptr [RCX],R15
LAB_001cc13a:
TEST EAX,EAX
MOV EAX,0x54
MOV ECX,0x21
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_001cc14f:
XOR EAX,EAX
LAB_001cc151:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cc160:
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x34]
MOV EBX,EDX
MOV dword ptr [RBP + -0x44],EAX
LEA RSI,[RBP + -0x30]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001cc226
MOV ECX,EBX
MOV qword ptr [RBP + -0x60],RCX
XOR ECX,ECX
MOV RBX,R15
XOR R8D,R8D
LAB_001cc195:
MOV RSI,RBX
MOV EBX,EAX
ADD RBX,RSI
MOV RSI,qword ptr [RBP + -0x30]
LEA RAX,[RSI + -0x30]
CMP RAX,0x9
JA 0x001cc1b1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001cc1d6
LAB_001cc1b1:
LEA RAX,[RSI + -0x41]
CMP RAX,0x19
JA 0x001cc1c1
ADD RSI,-0x37
JMP 0x001cc1cf
LAB_001cc1c1:
LEA RAX,[RSI + -0x61]
CMP RAX,0x19
JA 0x001cc236
ADD RSI,-0x57
LAB_001cc1cf:
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
LAB_001cc1d6:
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x001cc236
MOV ESI,0x1
CMP ECX,dword ptr [RBP + -0x44]
JA 0x001cc1f9
JNZ 0x001cc1f0
MOV EDI,dword ptr [RBP + -0x44]
CMP RAX,qword ptr [RBP + -0x60]
JA 0x001cc1fb
LAB_001cc1f0:
IMUL ECX,dword ptr [RBP + -0x34]
ADD ECX,EAX
MOV ESI,R8D
LAB_001cc1f9:
MOV EDI,ECX
LAB_001cc1fb:
MOV dword ptr [RBP + -0x54],EDI
MOV dword ptr [RBP + -0x58],ESI
MOV RDI,R14
LEA RSI,[RBP + -0x30]
MOV RDX,RBX
MOV RCX,R13
CALL R12
MOV EDI,dword ptr [RBP + -0x54]
MOV ESI,dword ptr [RBP + -0x58]
MOV ECX,EDI
MOV R8D,ESI
TEST EAX,EAX
JG 0x001cc195
JMP 0x001cc22d
LAB_001cc226:
XOR EDI,EDI
MOV RBX,R15
XOR ESI,ESI
LAB_001cc22d:
TEST EAX,EAX
JZ 0x001cc295
MOV R8D,ESI
MOV ECX,EDI
LAB_001cc236:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001cc242
MOV qword ptr [RAX],RBX
LAB_001cc242:
CMP RBX,R15
JZ 0x001cc286
CMP ECX,0x80000001
MOV EAX,0x1
MOV ESI,R8D
CMOVNC ESI,EAX
TEST ECX,ECX
CMOVS R8D,EAX
MOV EDI,dword ptr [RBP + -0x38]
TEST EDI,EDI
CMOVNZ R8D,ESI
TEST R8D,R8D
JZ 0x001cc2b0
TEST EDI,EDI
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x22
MOV ECX,0x7fffffff
MOV RAX,-0x80000000
JMP 0x001cc2ba
LAB_001cc286:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x21
JMP 0x001cc14f
LAB_001cc295:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001cc2a1
MOV qword ptr [RAX],RBX
LAB_001cc2a1:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x54
JMP 0x001cc14f
LAB_001cc2b0:
MOV ECX,ECX
MOV RAX,RCX
NEG RAX
TEST EDI,EDI
LAB_001cc2ba:
CMOVZ RAX,RCX
JMP 0x001cc151
|
ulong my_strntol_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
bool bVar2;
bool bVar3;
bool bVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
int4 uVar8;
uint uVar9;
ulong uVar10;
long lVar11;
ulong local_38;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
param_3 = param_3 + param_2;
*param_6 = 0;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
if (0 < (int)uVar5) {
bVar2 = false;
do {
if ((long)local_38 < 0x2b) {
if ((local_38 != 9) && (local_38 != 0x20)) {
LAB_001cc160:
uVar5 = (uint)(0xffffffff / (ulong)param_4);
uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3);
lVar11 = param_2;
if ((int)uVar6 < 1) {
uVar9 = 0;
bVar3 = false;
goto LAB_001cc22d;
}
uVar9 = 0;
bVar3 = false;
goto LAB_001cc195;
}
}
else if (local_38 != 0x2b) {
if (local_38 != 0x2d) goto LAB_001cc160;
bVar2 = !bVar2;
}
param_2 = param_2 + (ulong)uVar5;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
} while (0 < (int)uVar5);
}
if (param_5 != (long *)0x0) {
*param_5 = param_2;
}
uVar8 = 0x21;
if (uVar5 == 0) {
uVar8 = 0x54;
}
*param_6 = uVar8;
return 0;
while( true ) {
if ((int)param_4 <= (int)uVar7) goto LAB_001cc236;
uVar6 = uVar9;
bVar4 = true;
if ((uVar9 <= uVar5) &&
((uVar9 != uVar5 || (uVar6 = uVar5, bVar4 = true, uVar7 <= 0xffffffffU % (ulong)param_4)))) {
uVar6 = uVar9 * param_4 + (int)uVar7;
bVar4 = bVar3;
}
bVar3 = bVar4;
uVar9 = uVar6;
local_38 = uVar7;
uVar6 = (*pcVar1)(param_1,&local_38,lVar11,param_3);
if ((int)uVar6 < 1) break;
LAB_001cc195:
lVar11 = (ulong)uVar6 + lVar11;
uVar7 = local_38 - 0x30;
if (9 < uVar7) {
if (local_38 - 0x41 < 0x1a) {
uVar7 = local_38 - 0x37;
}
else {
if (0x19 < local_38 - 0x61) goto LAB_001cc236;
uVar7 = local_38 - 0x57;
}
}
}
LAB_001cc22d:
if (uVar6 == 0) {
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
*param_6 = 0x54;
}
else {
LAB_001cc236:
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
if (lVar11 != param_2) {
bVar4 = bVar3;
if (0x80000000 < uVar9) {
bVar4 = true;
}
if ((int)uVar9 < 0) {
bVar3 = true;
}
if (bVar2) {
bVar3 = bVar4;
}
if (bVar3) {
*param_6 = 0x22;
uVar10 = 0x7fffffff;
uVar7 = 0xffffffff80000000;
}
else {
uVar10 = (ulong)uVar9;
uVar7 = -uVar10;
}
if (!bVar2) {
return uVar10;
}
return uVar7;
}
*param_6 = 0x21;
}
return 0;
}
|
|
18,733
|
POINTonE2_affine_on_curve
|
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e2.c
|
static bool_t POINTonE2_affine_on_curve(const POINTonE2_affine *p)
{
vec384x XXX, YY;
sqr_fp2(XXX, p->X);
mul_fp2(XXX, XXX, p->X); /* X^3 */
add_fp2(XXX, XXX, B_E2); /* X^3 + B */
sqr_fp2(YY, p->Y); /* Y^2 */
return vec_is_equal(XXX, YY, sizeof(XXX));
}
|
O1
|
c
|
POINTonE2_affine_on_curve:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r14
leaq 0x238ca(%rip), %r15 # 0x3fb20
leaq -0xf0(%rbp), %rbx
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x33a20
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x338e0
leaq 0x247ad(%rip), %rdx # 0x40a40
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x2f460
addq $0x60, %r14
leaq -0x90(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x33a20
movl $0x60, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x306c0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
POINTonE2_affine_on_curve:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r14, rdi
lea r15, BLS12_381_P
lea rbx, [rbp+var_F0]
mov r12, 89F3FFFCFFFCFFFDh
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, r12
call sqr_mont_384x
mov rdi, rbx
mov rsi, rbx
mov rdx, r14
mov rcx, r15
mov r8, r12
call mul_mont_384x
lea rdx, B_E2
mov rdi, rbx
mov rsi, rbx
mov rcx, r15
call add_mod_384x
add r14, 60h ; '`'
lea r13, [rbp+var_90]
mov rdi, r13
mov rsi, r14
mov rdx, r15
mov rcx, r12
call sqr_mont_384x
mov edx, 60h ; '`'
mov rdi, rbx
mov rsi, r13
call vec_is_equal_16x
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long POINTonE2_affine_on_curve(long long a1)
{
_BYTE v2[96]; // [rsp+0h] [rbp-F0h] BYREF
_BYTE v3[144]; // [rsp+60h] [rbp-90h] BYREF
sqr_mont_384x(v2, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v2, v2, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384x(v2, v2, &B_E2, &BLS12_381_P);
sqr_mont_384x(v3, a1 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
return vec_is_equal_16x(v2, v3, 96LL);
}
|
POINTonE2_affine_on_curve:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R14,RDI
LEA R15,[0x13fb20]
LEA RBX,[RBP + -0xf0]
MOV R12,-0x760c000300030003
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x00133a20
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R15
MOV R8,R12
CALL 0x001338e0
LEA RDX,[0x140a40]
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,R15
CALL 0x0012f460
ADD R14,0x60
LEA R13,[RBP + -0x90]
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x00133a20
MOV EDX,0x60
MOV RDI,RBX
MOV RSI,R13
CALL 0x001306c0
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void POINTonE2_affine_on_curve(long param_1)
{
int1 local_f8 [96];
int1 local_98 [104];
sqr_mont_384x(local_f8,param_1,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_f8,local_f8,param_1,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384x(local_f8,local_f8,B_E2,BLS12_381_P);
sqr_mont_384x(local_98,param_1 + 0x60,BLS12_381_P,0x89f3fffcfffcfffd);
vec_is_equal_16x(local_f8,local_98,0x60);
return;
}
|
|
18,734
|
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/common.cpp
|
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override)
{
auto vocab = llama_model_get_vocab(model);
std::string default_template_src = chat_template_override;
std::string template_tool_use_src = chat_template_override;
bool has_explicit_template = !chat_template_override.empty();
if (chat_template_override.empty()) {
auto str = llama_model_chat_template(model, /* name */ nullptr);
if (str) {
default_template_src = str;
has_explicit_template = true;
}
str = llama_model_chat_template(model, /* name */ "tool_use");
if (str) {
template_tool_use_src = str;
has_explicit_template = true;
}
}
if (default_template_src.empty() || default_template_src == "chatml") {
if (!template_tool_use_src.empty()) {
default_template_src = template_tool_use_src;
} else {
default_template_src = R"(
{%- for message in messages -%}
{{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- "<|im_start|>assistant\n" -}}
{%- endif -%}
)";
}
}
const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) {
if (token == LLAMA_TOKEN_NULL) {
if (default_template_src.find(jinja_variable_name) != std::string::npos
|| template_tool_use_src.find(jinja_variable_name) != std::string::npos) {
LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name);
}
return std::string();
} else {
return common_token_to_piece(vocab, token, true);
}
};
auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token");
auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token");
return {
has_explicit_template,
std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos),
template_tool_use_src.empty()
? nullptr
: std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos)
};
}
|
O2
|
cpp
|
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x24120
movq %rax, %r14
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x23ba0
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x23ba0
movb $0x1, %r15b
cmpq $0x0, 0x8(%rbp)
jne 0x568aa
movq %r13, %rdi
xorl %esi, %esi
callq 0x233c0
testq %rax, %rax
setne %r15b
je 0x56886
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x24080
leaq 0x5b93c(%rip), %rsi # 0xb21c9
movq %r13, %rdi
callq 0x233c0
testq %rax, %rax
je 0x568aa
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x24080
movb $0x1, %r15b
cmpq $0x0, 0x18(%rsp)
je 0x568c7
leaq 0x5b919(%rip), %rsi # 0xb21d2
leaq 0x10(%rsp), %rdi
callq 0x38a22
testb %al, %al
je 0x568f1
cmpq $0x0, 0x38(%rsp)
je 0x568e0
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x234b0
jmp 0x568f1
leaq 0x5b8f2(%rip), %rsi # 0xb21d9
leaq 0x10(%rsp), %rdi
callq 0x24080
leaq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r12, 0x58(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq %r14, %rdi
callq 0x23760
leaq 0x5ba06(%rip), %rcx # 0xb231f
leaq 0x5ba03(%rip), %r8 # 0xb2323
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x56a3e
movq 0x8(%rsp), %rdi
callq 0x23090
leaq 0x5b9e8(%rip), %rcx # 0xb232d
leaq 0x5b9e5(%rip), %r8 # 0xb2331
leaq 0x68(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x56a3e
movb %r15b, (%rbx)
leaq 0x8(%rbx), %r14
leaq 0x10(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r14, %rdi
callq 0x5b980
leaq 0x10(%rbx), %rdi
cmpq $0x0, 0x38(%rsp)
je 0x569a3
leaq 0x30(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
callq 0x5b980
jmp 0x569a7
andq $0x0, (%rdi)
leaq 0x68(%rsp), %rdi
callq 0x24158
leaq 0x88(%rsp), %rdi
callq 0x24158
leaq 0x30(%rsp), %rdi
callq 0x24158
leaq 0x10(%rsp), %rdi
callq 0x24158
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x5b9dc
jmp 0x569f9
jmp 0x56a1e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x24158
jmp 0x56a0f
movq %rax, %rbx
jmp 0x56a2b
jmp 0x56a1e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x24158
jmp 0x56a21
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x24158
leaq 0x10(%rsp), %rdi
callq 0x24158
movq %rbx, %rdi
callq 0x23f10
nop
|
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbp, rdx
mov r13, rsi
mov rbx, rdi
mov rdi, rsi
call _llama_model_get_vocab
mov r14, rax
mov [rsp+0D8h+var_D0], rax
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea r12, [rsp+0D8h+var_A8]
mov rdi, r12
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov r15b, 1
cmp qword ptr [rbp+8], 0
jnz short loc_568AA
mov rdi, r13
xor esi, esi
call _llama_model_chat_template
test rax, rax
setnz r15b
jz short loc_56886
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_56886:
lea rsi, aToolUse; "tool_use"
mov rdi, r13
call _llama_model_chat_template
test rax, rax
jz short loc_568AA
lea rdi, [rsp+0D8h+var_A8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
mov r15b, 1
loc_568AA:
cmp [rsp+0D8h+var_C0], 0
jz short loc_568C7
lea rsi, aChatml; "chatml"
lea rdi, [rsp+0D8h+var_C8]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_568F1
loc_568C7:
cmp [rsp+0D8h+var_A0], 0
jz short loc_568E0
lea rdi, [rsp+0D8h+var_C8]
lea rsi, [rsp+0D8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp short loc_568F1
loc_568E0:
lea rsi, aForMessageInMe; "\n {%- for message in me"...
lea rdi, [rsp+0D8h+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_568F1:
lea rax, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_88], rax
mov [rsp+0D8h+var_80], r12
lea rax, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_78], rax
mov rdi, r14
call _llama_vocab_bos
lea rcx, aBos; "BOS"
lea r8, aBosToken; "bos_token"
lea rdi, [rsp+0D8h+var_50]; void *
lea rsi, [rsp+0D8h+var_88]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov rdi, [rsp+0D8h+var_D0]
call _llama_vocab_eos
lea rcx, aEos; "EOS"
lea r8, aEosToken; "eos_token"
lea rdi, [rsp+0D8h+var_70]; void *
lea rsi, [rsp+0D8h+var_88]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov [rbx], r15b
lea r14, [rbx+8]
lea rsi, [rsp+0D8h+var_C8]
lea rdx, [rsp+0D8h+var_50]
lea rcx, [rsp+0D8h+var_70]
mov rdi, r14
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
lea rdi, [rbx+10h]
cmp [rsp+0D8h+var_A0], 0
jz short loc_569A3
lea rsi, [rsp+0D8h+var_A8]
lea rdx, [rsp+0D8h+var_50]
lea rcx, [rsp+0D8h+var_70]
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
jmp short loc_569A7
loc_569A3:
and qword ptr [rdi], 0
loc_569A7:
lea rdi, [rsp+0D8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, r14
call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EED2Ev; std::unique_ptr<minja::chat_template>::~unique_ptr()
jmp short loc_569F9
jmp short loc_56A1E
mov rbx, rax
loc_569F9:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_56A0F
mov rbx, rax
jmp short loc_56A2B
jmp short loc_56A1E
mov rbx, rax
loc_56A0F:
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_56A21
loc_56A1E:
mov rbx, rax
loc_56A21:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_56A2B:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
bool * common_chat_templates_from_model(bool *a1, long long a2, long long a3)
{
long long vocab; // r14
bool v6; // r15
const char *v7; // rax
const char *v8; // rax
_QWORD *v9; // rdi
long long v11; // [rsp+8h] [rbp-D0h] BYREF
char v12[8]; // [rsp+10h] [rbp-C8h] BYREF
long long v13; // [rsp+18h] [rbp-C0h]
char v14[8]; // [rsp+30h] [rbp-A8h] BYREF
long long v15; // [rsp+38h] [rbp-A0h]
char *v16; // [rsp+50h] [rbp-88h]
char *v17; // [rsp+58h] [rbp-80h]
long long *v18; // [rsp+60h] [rbp-78h]
_BYTE v19[32]; // [rsp+68h] [rbp-70h] BYREF
_BYTE v20[80]; // [rsp+88h] [rbp-50h] BYREF
vocab = llama_model_get_vocab(a2);
v11 = vocab;
std::string::basic_string(v12, a3);
std::string::basic_string(v14, a3);
v6 = 1;
if ( !*(_QWORD *)(a3 + 8) )
{
v7 = (const char *)llama_model_chat_template(a2, 0LL);
v6 = v7 != 0LL;
if ( v7 )
std::string::assign(v12, v7);
v8 = (const char *)llama_model_chat_template(a2, "tool_use");
if ( v8 )
{
std::string::assign(v14, v8);
v6 = 1;
}
}
if ( !v13 || std::operator==<char>((long long)v12) )
{
if ( v15 )
std::string::_M_assign(v12, v14);
else
std::string::assign(
v12,
"\n"
" {%- for message in messages -%}\n"
" {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n"
" {%- endfor -%}\n"
" {%- if add_generation_prompt -%}\n"
" {{- \"<|im_start|>assistant\\n\" -}}\n"
" {%- endif -%}\n"
" ");
}
v16 = v12;
v17 = v14;
v18 = &v11;
llama_vocab_bos(vocab);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v20);
llama_vocab_eos(v11);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v19);
*a1 = v6;
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(a1 + 8, v12, v20, v19);
v9 = a1 + 16;
if ( v15 )
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(v9, v14, v20, v19);
else
*v9 = 0LL;
std::string::~string(v19);
std::string::~string(v20);
std::string::~string(v14);
std::string::~string(v12);
return a1;
}
|
common_chat_templates_from_model:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBP,RDX
MOV R13,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x00124120
MOV R14,RAX
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x10]
MOV RSI,RBP
CALL 0x00123ba0
LAB_0015684c:
LEA R12,[RSP + 0x30]
MOV RDI,R12
MOV RSI,RBP
CALL 0x00123ba0
MOV R15B,0x1
CMP qword ptr [RBP + 0x8],0x0
JNZ 0x001568aa
LAB_00156866:
MOV RDI,R13
XOR ESI,ESI
CALL 0x001233c0
TEST RAX,RAX
SETNZ R15B
JZ 0x00156886
LEA RDI,[RSP + 0x10]
MOV RSI,RAX
CALL 0x00124080
LAB_00156886:
LEA RSI,[0x1b21c9]
MOV RDI,R13
CALL 0x001233c0
TEST RAX,RAX
JZ 0x001568aa
LEA RDI,[RSP + 0x30]
MOV RSI,RAX
CALL 0x00124080
MOV R15B,0x1
LAB_001568aa:
CMP qword ptr [RSP + 0x18],0x0
JZ 0x001568c7
LEA RSI,[0x1b21d2]
LEA RDI,[RSP + 0x10]
CALL 0x00138a22
TEST AL,AL
JZ 0x001568f1
LAB_001568c7:
CMP qword ptr [RSP + 0x38],0x0
JZ 0x001568e0
LAB_001568cf:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x30]
CALL 0x001234b0
JMP 0x001568f1
LAB_001568e0:
LEA RSI,[0x1b21d9]
LEA RDI,[RSP + 0x10]
CALL 0x00124080
LAB_001568f1:
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],R12
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x60],RAX
LAB_0015690a:
MOV RDI,R14
CALL 0x00123760
LEA RCX,[0x1b231f]
LEA R8,[0x1b2323]
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x50]
MOV EDX,EAX
CALL 0x00156a3e
MOV RDI,qword ptr [RSP + 0x8]
LAB_00156939:
CALL 0x00123090
LEA RCX,[0x1b232d]
LEA R8,[0x1b2331]
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x50]
MOV EDX,EAX
CALL 0x00156a3e
MOV byte ptr [RBX],R15B
LEA R14,[RBX + 0x8]
LAB_00156964:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x68]
MOV RDI,R14
CALL 0x0015b980
LEA RDI,[RBX + 0x10]
CMP qword ptr [RSP + 0x38],0x0
JZ 0x001569a3
LAB_0015698a:
LEA RSI,[RSP + 0x30]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x68]
CALL 0x0015b980
LAB_001569a1:
JMP 0x001569a7
LAB_001569a3:
AND qword ptr [RDI],0x0
LAB_001569a7:
LEA RDI,[RSP + 0x68]
CALL 0x00124158
LEA RDI,[RSP + 0x88]
CALL 0x00124158
LEA RDI,[RSP + 0x30]
CALL 0x00124158
LEA RDI,[RSP + 0x10]
CALL 0x00124158
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */
llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2)
{
bool bVar1;
uint uVar2;
int8 uVar3;
long lVar4;
string *in_RDX;
llama_model lVar5;
int8 local_d0;
string local_c8 [8];
long local_c0;
string local_a8 [8];
long local_a0;
string *local_88;
string *local_80;
int8 *local_78;
string local_70 [32];
string local_50 [32];
uVar3 = llama_model_get_vocab(param_2);
local_d0 = uVar3;
std::__cxx11::string::string(local_c8,in_RDX);
/* try { // try from 0015684c to 0015685b has its CatchHandler @ 00156a05 */
std::__cxx11::string::string(local_a8,in_RDX);
lVar5 = (llama_model)0x1;
if (*(long *)(in_RDX + 8) == 0) {
/* try { // try from 00156866 to 001568a6 has its CatchHandler @ 00156a0a */
lVar4 = llama_model_chat_template(param_2,0);
lVar5 = (llama_model)(lVar4 != 0);
if ((bool)lVar5) {
std::__cxx11::string::assign((char *)local_c8);
}
lVar4 = llama_model_chat_template(param_2,"tool_use");
if (lVar4 != 0) {
std::__cxx11::string::assign((char *)local_a8);
lVar5 = (llama_model)0x1;
}
}
if (local_c0 != 0) {
bVar1 = std::operator==(local_c8,"chatml");
if (!bVar1) goto LAB_001568f1;
}
if (local_a0 == 0) {
std::__cxx11::string::assign((char *)local_c8);
}
else {
/* try { // try from 001568cf to 001568f0 has its CatchHandler @ 001569f4 */
std::__cxx11::string::_M_assign(local_c8);
}
LAB_001568f1:
local_88 = local_c8;
local_78 = &local_d0;
local_80 = local_a8;
/* try { // try from 0015690a to 00156933 has its CatchHandler @ 00156a1e */
uVar2 = llama_vocab_bos(uVar3);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_50,(char *)&local_88,(char *)(ulong)uVar2);
/* try { // try from 00156939 to 0015695c has its CatchHandler @ 00156a0c */
uVar2 = llama_vocab_eos(local_d0);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_70,(char *)&local_88,(char *)(ulong)uVar2);
*param_1 = lVar5;
/* try { // try from 00156964 to 0015697d has its CatchHandler @ 001569f6 */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 8),local_c8,local_50);
if (local_a0 == 0) {
*(int8 *)(param_1 + 0x10) = 0;
}
else {
/* try { // try from 0015698a to 001569a0 has its CatchHandler @ 001569e7 */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 0x10),local_a8,local_50);
}
std::__cxx11::string::~string(local_70);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string(local_a8);
std::__cxx11::string::~string(local_c8);
return param_1;
}
|
|
18,735
|
ggml_conv_1d
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
struct ggml_tensor * ggml_conv_1d(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
int s0,
int p0,
int d0) {
struct ggml_tensor * im2col = ggml_im2col(ctx, a, b, s0, 0, p0, 0, d0, 0, false, GGML_TYPE_F16); // [N, OL, IC * K]
struct ggml_tensor * result =
ggml_mul_mat(ctx,
ggml_reshape_2d(ctx, im2col, im2col->ne[0], (im2col->ne[2] * im2col->ne[1])), // [N, OL, IC * K] => [N*OL, IC * K]
ggml_reshape_2d(ctx, a, (a->ne[0] * a->ne[1]), a->ne[2])); // [OC,IC, K] => [OC, IC * K]
result = ggml_reshape_3d(ctx, result, im2col->ne[1], a->ne[2], im2col->ne[2]); // [N, OC, OL]
return result;
}
|
O1
|
c
|
ggml_conv_1d:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %eax
movl %r8d, %r9d
movq %rsi, %r14
movq %rdi, %rbx
subq $0x8, %rsp
xorl %r10d, %r10d
xorl %r8d, %r8d
pushq $0x1
pushq %r10
pushq %r10
pushq %rax
pushq %r10
callq 0x18bf0
addq $0x30, %rsp
movq %rax, %r15
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
imulq 0x20(%rax), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x18cb0
movq %rax, %r12
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
imulq 0x10(%r14), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18cb0
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x17990
movq 0x20(%r14), %rcx
movq 0x18(%r15), %rdx
movq 0x20(%r15), %r8
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x180b0
|
ggml_conv_1d:
push r15
push r14
push r12
push rbx
push rax
mov eax, r9d
mov r9d, r8d
mov r14, rsi
mov rbx, rdi
sub rsp, 8
xor r10d, r10d
xor r8d, r8d
push 1
push r10
push r10
push rax
push r10
call _ggml_im2col
add rsp, 30h
mov r15, rax
mov rdx, [rax+10h]
mov rcx, [rax+18h]
imul rcx, [rax+20h]
mov rdi, rbx
mov rsi, rax
call _ggml_reshape_2d
mov r12, rax
mov rdx, [r14+18h]
mov rcx, [r14+20h]
imul rdx, [r14+10h]
mov rdi, rbx
mov rsi, r14
call _ggml_reshape_2d
mov rdi, rbx
mov rsi, r12
mov rdx, rax
call _ggml_mul_mat
mov rcx, [r14+20h]
mov rdx, [r15+18h]
mov r8, [r15+20h]
mov rdi, rbx
mov rsi, rax
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ggml_reshape_3d
|
long long ggml_conv_1d(long long a1, _QWORD *a2, _QWORD *a3, int a4, int a5, int a6, double a7)
{
long long *v7; // r15
_QWORD *v8; // r12
_QWORD *v9; // rax
long long v10; // rcx
int v11; // r8d
int v12; // r9d
long long v13; // rax
v7 = (long long *)ggml_im2col(a1, a2, a3, a4, 0, a5, a7, 0, a6, 0, 0, 1u);
v8 = (_QWORD *)ggml_reshape_2d(a1, (long long)v7, v7[2], v7[4] * v7[3], a7);
v9 = (_QWORD *)ggml_reshape_2d(a1, (long long)a2, a2[2] * a2[3], a2[4], a7);
v13 = ggml_mul_mat(a1, v8, v9, a7, v10, v11, v12);
return ggml_reshape_3d(a1, v13, v7[3], a2[4], v7[4], a7);
}
|
ggml_conv_1d:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV EAX,R9D
MOV R9D,R8D
MOV R14,RSI
MOV RBX,RDI
SUB RSP,0x8
XOR R10D,R10D
XOR R8D,R8D
PUSH 0x1
PUSH R10
PUSH R10
PUSH RAX
PUSH R10
CALL 0x00118bf0
ADD RSP,0x30
MOV R15,RAX
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
IMUL RCX,qword ptr [RAX + 0x20]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00118cb0
MOV R12,RAX
MOV RDX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [R14 + 0x20]
IMUL RDX,qword ptr [R14 + 0x10]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00118cb0
MOV RDI,RBX
MOV RSI,R12
MOV RDX,RAX
CALL 0x00117990
MOV RCX,qword ptr [R14 + 0x20]
MOV RDX,qword ptr [R15 + 0x18]
MOV R8,qword ptr [R15 + 0x20]
MOV RDI,RBX
MOV RSI,RAX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x001180b0
|
void ggml_conv_1d(int8 param_1,long param_2)
{
long lVar1;
int8 uVar2;
int8 uVar3;
lVar1 = ggml_im2col();
uVar2 = ggml_reshape_2d(param_1,lVar1,*(int8 *)(lVar1 + 0x10),
*(long *)(lVar1 + 0x18) * *(long *)(lVar1 + 0x20));
uVar3 = ggml_reshape_2d(param_1,param_2,*(long *)(param_2 + 0x18) * *(long *)(param_2 + 0x10),
*(int8 *)(param_2 + 0x20));
uVar2 = ggml_mul_mat(param_1,uVar2,uVar3);
ggml_reshape_3d(param_1,uVar2,*(int8 *)(lVar1 + 0x18),*(int8 *)(param_2 + 0x20),
*(int8 *)(lVar1 + 0x20));
return;
}
|
|
18,736
|
ggml_conv_1d
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
struct ggml_tensor * ggml_conv_1d(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
int s0,
int p0,
int d0) {
struct ggml_tensor * im2col = ggml_im2col(ctx, a, b, s0, 0, p0, 0, d0, 0, false, GGML_TYPE_F16); // [N, OL, IC * K]
struct ggml_tensor * result =
ggml_mul_mat(ctx,
ggml_reshape_2d(ctx, im2col, im2col->ne[0], (im2col->ne[2] * im2col->ne[1])), // [N, OL, IC * K] => [N*OL, IC * K]
ggml_reshape_2d(ctx, a, (a->ne[0] * a->ne[1]), a->ne[2])); // [OC,IC, K] => [OC, IC * K]
result = ggml_reshape_3d(ctx, result, im2col->ne[1], a->ne[2], im2col->ne[2]); // [N, OC, OL]
return result;
}
|
O2
|
c
|
ggml_conv_1d:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %eax
movq %rsi, %r14
movq %rdi, %rbx
andl $0x0, 0x18(%rsp)
andl $0x0, 0x10(%rsp)
andl $0x0, (%rsp)
movl %r9d, 0x8(%rsp)
movl $0x1, 0x20(%rsp)
xorl %r8d, %r8d
movl %eax, %r9d
callq 0x1f830
movq %rax, %r15
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
imulq 0x20(%rax), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1f960
movq %rax, %r12
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
imulq 0x10(%r14), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1f960
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1ddb0
movq 0x20(%r14), %rcx
movq 0x18(%r15), %rdx
movq 0x20(%r15), %r8
movq %rbx, %rdi
movq %rax, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1e800
|
ggml_conv_1d:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov eax, r8d
mov r14, rsi
mov rbx, rdi
and [rsp+48h+var_30], 0
and [rsp+48h+var_38], 0
and [rsp+48h+var_48], 0
mov [rsp+48h+var_40], r9d
mov [rsp+48h+var_28], 1
xor r8d, r8d
mov r9d, eax
call _ggml_im2col
mov r15, rax
mov rdx, [rax+10h]
mov rcx, [rax+18h]
imul rcx, [rax+20h]
mov rdi, rbx
mov rsi, rax
call _ggml_reshape_2d
mov r12, rax
mov rdx, [r14+18h]
mov rcx, [r14+20h]
imul rdx, [r14+10h]
mov rdi, rbx
mov rsi, r14
call _ggml_reshape_2d
mov rdi, rbx
mov rsi, r12
mov rdx, rax
call _ggml_mul_mat
mov rcx, [r14+20h]
mov rdx, [r15+18h]
mov r8, [r15+20h]
mov rdi, rbx
mov rsi, rax
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
jmp _ggml_reshape_3d
|
long long ggml_conv_1d(
long long a1,
_QWORD *a2,
_QWORD *a3,
int a4,
unsigned int a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long *v14; // r15
double v15; // xmm4_8
double v16; // xmm5_8
_QWORD *v17; // r12
double v18; // xmm4_8
double v19; // xmm5_8
long long v20; // rax
double v21; // xmm4_8
double v22; // xmm5_8
long long v23; // rax
double v24; // xmm4_8
double v25; // xmm5_8
v14 = (long long *)ggml_im2col(a1, a2, a3, a4, 0LL, a5, a7, a8, a9, a10, a11, a12, a13, a14, 0, a6, 0, 0, 1u);
v17 = (_QWORD *)ggml_reshape_2d(a1, (long long)v14, v14[2], v14[4] * v14[3], a7, a8, a9, a10, v15, v16, a13, a14);
v20 = ggml_reshape_2d(a1, (long long)a2, a2[2] * a2[3], a2[4], a7, a8, a9, a10, v18, v19, a13, a14);
v23 = ggml_mul_mat(a1, v17, v20, a7, a8, a9, a10, v21, v22, a13, a14);
return ggml_reshape_3d(a1, v23, v14[3], a2[4], v14[4], a7, a8, a9, a10, v24, v25, a13, a14);
}
|
ggml_conv_1d:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EAX,R8D
MOV R14,RSI
MOV RBX,RDI
AND dword ptr [RSP + 0x18],0x0
AND dword ptr [RSP + 0x10],0x0
AND dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],R9D
MOV dword ptr [RSP + 0x20],0x1
XOR R8D,R8D
MOV R9D,EAX
CALL 0x0011f830
MOV R15,RAX
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
IMUL RCX,qword ptr [RAX + 0x20]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011f960
MOV R12,RAX
MOV RDX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [R14 + 0x20]
IMUL RDX,qword ptr [R14 + 0x10]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011f960
MOV RDI,RBX
MOV RSI,R12
MOV RDX,RAX
CALL 0x0011ddb0
MOV RCX,qword ptr [R14 + 0x20]
MOV RDX,qword ptr [R15 + 0x18]
MOV R8,qword ptr [R15 + 0x20]
MOV RDI,RBX
MOV RSI,RAX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
JMP 0x0011e800
|
void ggml_conv_1d(int8 param_1,long param_2)
{
long lVar1;
int8 uVar2;
int8 uVar3;
lVar1 = ggml_im2col();
uVar2 = ggml_reshape_2d(param_1,lVar1,*(int8 *)(lVar1 + 0x10),
*(long *)(lVar1 + 0x18) * *(long *)(lVar1 + 0x20));
uVar3 = ggml_reshape_2d(param_1,param_2,*(long *)(param_2 + 0x18) * *(long *)(param_2 + 0x10),
*(int8 *)(param_2 + 0x20));
uVar2 = ggml_mul_mat(param_1,uVar2,uVar3);
ggml_reshape_3d(param_1,uVar2,*(int8 *)(lVar1 + 0x18),*(int8 *)(param_2 + 0x20),
*(int8 *)(lVar1 + 0x20));
return;
}
|
|
18,737
|
ggml_conv_1d
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
struct ggml_tensor * ggml_conv_1d(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
int s0,
int p0,
int d0) {
struct ggml_tensor * im2col = ggml_im2col(ctx, a, b, s0, 0, p0, 0, d0, 0, false, GGML_TYPE_F16); // [N, OL, IC * K]
struct ggml_tensor * result =
ggml_mul_mat(ctx,
ggml_reshape_2d(ctx, im2col, im2col->ne[0], (im2col->ne[2] * im2col->ne[1])), // [N, OL, IC * K] => [N*OL, IC * K]
ggml_reshape_2d(ctx, a, (a->ne[0] * a->ne[1]), a->ne[2])); // [OC,IC, K] => [OC, IC * K]
result = ggml_reshape_3d(ctx, result, im2col->ne[1], a->ne[2], im2col->ne[2]); // [N, OC, OL]
return result;
}
|
O3
|
c
|
ggml_conv_1d:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %eax
movl %r8d, %r9d
movq %rsi, %r14
movq %rdi, %rbx
subq $0x8, %rsp
xorl %r10d, %r10d
xorl %r8d, %r8d
pushq $0x1
pushq %r10
pushq %r10
pushq %rax
pushq %r10
callq 0x17be0
addq $0x30, %rsp
movq %rax, %r15
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
imulq 0x20(%rax), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x17ca0
movq %rax, %r12
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
imulq 0x10(%r14), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17ca0
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x16990
movq 0x20(%r14), %rcx
movq 0x18(%r15), %rdx
movq 0x20(%r15), %r8
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x170a0
|
ggml_conv_1d:
push r15
push r14
push r12
push rbx
push rax
mov eax, r9d
mov r9d, r8d
mov r14, rsi
mov rbx, rdi
sub rsp, 8
xor r10d, r10d
xor r8d, r8d
push 1
push r10
push r10
push rax
push r10
call _ggml_im2col
add rsp, 30h
mov r15, rax
mov rdx, [rax+10h]
mov rcx, [rax+18h]
imul rcx, [rax+20h]
mov rdi, rbx
mov rsi, rax
call _ggml_reshape_2d
mov r12, rax
mov rdx, [r14+18h]
mov rcx, [r14+20h]
imul rdx, [r14+10h]
mov rdi, rbx
mov rsi, r14
call _ggml_reshape_2d
mov rdi, rbx
mov rsi, r12
mov rdx, rax
call _ggml_mul_mat
mov rcx, [r14+20h]
mov rdx, [r15+18h]
mov r8, [r15+20h]
mov rdi, rbx
mov rsi, rax
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ggml_reshape_3d
|
long long ggml_conv_1d(long long a1, _QWORD *a2, _QWORD *a3, int a4, unsigned int a5, int a6, double a7)
{
long long *v7; // r15
_QWORD *v8; // r12
_QWORD *v9; // rax
long long v10; // rcx
long long v11; // r8
int v12; // r9d
long long v13; // rax
v7 = (long long *)ggml_im2col(a1, a2, a3, a4, 0, a5, a7, 0, a6, 0, 0, 1u);
v8 = (_QWORD *)ggml_reshape_2d(a1, (long long)v7, v7[2], v7[4] * v7[3], a7);
v9 = (_QWORD *)ggml_reshape_2d(a1, (long long)a2, a2[2] * a2[3], a2[4], a7);
v13 = ggml_mul_mat(a1, v8, v9, a7, v10, v11, v12);
return ggml_reshape_3d(a1, v13, v7[3], a2[4], v7[4], a7);
}
|
ggml_conv_1d:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV EAX,R9D
MOV R9D,R8D
MOV R14,RSI
MOV RBX,RDI
SUB RSP,0x8
XOR R10D,R10D
XOR R8D,R8D
PUSH 0x1
PUSH R10
PUSH R10
PUSH RAX
PUSH R10
CALL 0x00117be0
ADD RSP,0x30
MOV R15,RAX
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
IMUL RCX,qword ptr [RAX + 0x20]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00117ca0
MOV R12,RAX
MOV RDX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [R14 + 0x20]
IMUL RDX,qword ptr [R14 + 0x10]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00117ca0
MOV RDI,RBX
MOV RSI,R12
MOV RDX,RAX
CALL 0x00116990
MOV RCX,qword ptr [R14 + 0x20]
MOV RDX,qword ptr [R15 + 0x18]
MOV R8,qword ptr [R15 + 0x20]
MOV RDI,RBX
MOV RSI,RAX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x001170a0
|
void ggml_conv_1d(int8 param_1,long param_2)
{
long lVar1;
int8 uVar2;
int8 uVar3;
lVar1 = ggml_im2col();
uVar2 = ggml_reshape_2d(param_1,lVar1,*(int8 *)(lVar1 + 0x10),
*(long *)(lVar1 + 0x18) * *(long *)(lVar1 + 0x20));
uVar3 = ggml_reshape_2d(param_1,param_2,*(long *)(param_2 + 0x18) * *(long *)(param_2 + 0x10),
*(int8 *)(param_2 + 0x20));
uVar2 = ggml_mul_mat(param_1,uVar2,uVar3);
ggml_reshape_3d(param_1,uVar2,*(int8 *)(lVar1 + 0x18),*(int8 *)(param_2 + 0x20),
*(int8 *)(lVar1 + 0x20));
return;
}
|
|
18,738
|
bc_get_leb128
|
bluesky950520[P]quickjs/quickjs.c
|
static int bc_get_leb128(BCReaderState *s, uint32_t *pval)
{
int ret;
ret = get_leb128(pval, s->ptr, s->buf_end);
if (unlikely(ret < 0))
return bc_read_error_end(s);
s->ptr += ret;
return 0;
}
|
O0
|
c
|
bc_get_leb128:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdx
callq 0x792e0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
setl %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x80527
movq 0x18(%rsp), %rdi
callq 0x80780
movl %eax, 0x24(%rsp)
jmp 0x80546
movl 0xc(%rsp), %edx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
|
bc_get_leb128:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_10]
mov rsi, [rax+10h]
mov rax, [rsp+28h+var_10]
mov rdx, [rax+18h]
call get_leb128
mov [rsp+28h+var_1C], eax
cmp [rsp+28h+var_1C], 0
setl al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_80527
mov rdi, [rsp+28h+var_10]
call bc_read_error_end
mov [rsp+28h+var_4], eax
jmp short loc_80546
loc_80527:
mov edx, [rsp+28h+var_1C]
mov rax, [rsp+28h+var_10]
mov rcx, [rax+10h]
movsxd rdx, edx
add rcx, rdx
mov [rax+10h], rcx
mov [rsp+28h+var_4], 0
loc_80546:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long bc_get_leb128(long long a1, _DWORD *a2)
{
int leb128; // [rsp+Ch] [rbp-1Ch]
leb128 = get_leb128(a2, *(_BYTE **)(a1 + 16), *(_QWORD *)(a1 + 24));
if ( leb128 >= 0 )
{
*(_QWORD *)(a1 + 16) += leb128;
return 0;
}
else
{
return (unsigned int)bc_read_error_end(a1);
}
}
|
bc_get_leb128:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x001792e0
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
SETL AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00180527
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00180780
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00180546
LAB_00180527:
MOV EDX,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOVSXD RDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RSP + 0x24],0x0
LAB_00180546:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 bc_get_leb128(long param_1,int8 param_2)
{
int iVar1;
int4 local_4;
iVar1 = get_leb128(param_2,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
if (iVar1 < 0) {
local_4 = bc_read_error_end(param_1);
}
else {
*(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + (long)iVar1;
local_4 = 0;
}
return local_4;
}
|
|
18,739
|
bc_get_leb128
|
bluesky950520[P]quickjs/quickjs.c
|
static int bc_get_leb128(BCReaderState *s, uint32_t *pval)
{
int ret;
ret = get_leb128(pval, s->ptr, s->buf_end);
if (unlikely(ret < 0))
return bc_read_error_end(s);
s->ptr += ret;
return 0;
}
|
O1
|
c
|
bc_get_leb128:
pushq %rbx
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rdx
cmpq %rdx, %rax
jae 0x49b24
leaq 0x1(%rax), %r8
xorl %ecx, %ecx
xorl %r9d, %r9d
xorl %r10d, %r10d
movl %r10d, %r11d
movzbl -0x1(%r8), %ebx
movl %ebx, %r10d
andl $0x7f, %r10d
shll %cl, %r10d
orl %r11d, %r10d
testb %bl, %bl
jns 0x49b43
cmpl $0x4, %r9d
leal 0x1(%r9), %r9d
setb %r11b
cmpq %rdx, %r8
setb %bl
andb %r11b, %bl
addl $0x7, %ecx
incq %r8
cmpb $0x1, %bl
je 0x49aeb
movl $0x0, (%rsi)
movl $0xffffffff, %r9d # imm = 0xFFFFFFFF
testl %r9d, %r9d
js 0x49b4b
movl %r9d, %ecx
addq %rcx, %rax
movq %rax, 0x10(%rdi)
xorl %eax, %eax
popq %rbx
retq
movl %r10d, (%rsi)
incl %r9d
jmp 0x49b30
callq 0x1374a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x49b41
|
bc_get_leb128:
push rbx
mov rax, [rdi+10h]
mov rdx, [rdi+18h]
cmp rax, rdx
jnb short loc_49B24
lea r8, [rax+1]
xor ecx, ecx
xor r9d, r9d
xor r10d, r10d
loc_49AEB:
mov r11d, r10d
movzx ebx, byte ptr [r8-1]
mov r10d, ebx
and r10d, 7Fh
shl r10d, cl
or r10d, r11d
test bl, bl
jns short loc_49B43
cmp r9d, 4
lea r9d, [r9+1]
setb r11b
cmp r8, rdx
setb bl
and bl, r11b
add ecx, 7
inc r8
cmp bl, 1
jz short loc_49AEB
loc_49B24:
mov dword ptr [rsi], 0
mov r9d, 0FFFFFFFFh
loc_49B30:
test r9d, r9d
js short loc_49B4B
mov ecx, r9d
add rax, rcx
mov [rdi+10h], rax
xor eax, eax
loc_49B41:
pop rbx
retn
loc_49B43:
mov [rsi], r10d
inc r9d
jmp short loc_49B30
loc_49B4B:
call bc_get_leb128_cold_1
mov eax, 0FFFFFFFFh
jmp short loc_49B41
|
long long bc_get_leb128(long long a1, _DWORD *a2, long long a3, int a4, unsigned long long a5)
{
unsigned long long v5; // rax
unsigned long long v6; // rdx
unsigned int v7; // r9d
int v8; // r10d
bool v9; // cf
bool v10; // bl
int v11; // r9d
v5 = *(_QWORD *)(a1 + 16);
v6 = *(_QWORD *)(a1 + 24);
if ( v5 >= v6 )
{
LABEL_5:
*a2 = 0;
v11 = -1;
}
else
{
a5 = v5 + 1;
a4 = 0;
v7 = 0;
v8 = 0;
while ( 1 )
{
v8 |= (*(_BYTE *)(a5 - 1) & 0x7F) << a4;
if ( *(char *)(a5 - 1) >= 0 )
break;
v9 = v7++ < 4;
v10 = v9 && a5 < v6;
a4 += 7;
++a5;
if ( !v10 )
goto LABEL_5;
}
*a2 = v8;
v11 = v7 + 1;
}
if ( v11 < 0 )
{
bc_get_leb128_cold_1(a1, (long long)a2, v6, a4, a5, v11);
return 0xFFFFFFFFLL;
}
else
{
*(_QWORD *)(a1 + 16) = (unsigned int)v11 + v5;
return 0LL;
}
}
|
bc_get_leb128:
PUSH RBX
MOV RAX,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDI + 0x18]
CMP RAX,RDX
JNC 0x00149b24
LEA R8,[RAX + 0x1]
XOR ECX,ECX
XOR R9D,R9D
XOR R10D,R10D
LAB_00149aeb:
MOV R11D,R10D
MOVZX EBX,byte ptr [R8 + -0x1]
MOV R10D,EBX
AND R10D,0x7f
SHL R10D,CL
OR R10D,R11D
TEST BL,BL
JNS 0x00149b43
CMP R9D,0x4
LEA R9D,[R9 + 0x1]
SETC R11B
CMP R8,RDX
SETC BL
AND BL,R11B
ADD ECX,0x7
INC R8
CMP BL,0x1
JZ 0x00149aeb
LAB_00149b24:
MOV dword ptr [RSI],0x0
MOV R9D,0xffffffff
LAB_00149b30:
TEST R9D,R9D
JS 0x00149b4b
MOV ECX,R9D
ADD RAX,RCX
MOV qword ptr [RDI + 0x10],RAX
XOR EAX,EAX
LAB_00149b41:
POP RBX
RET
LAB_00149b43:
MOV dword ptr [RSI],R10D
INC R9D
JMP 0x00149b30
LAB_00149b4b:
CALL 0x0011374a
MOV EAX,0xffffffff
JMP 0x00149b41
|
int8 bc_get_leb128(long param_1,uint *param_2)
{
byte *pbVar1;
byte *pbVar2;
int8 uVar3;
byte bVar4;
byte *pbVar5;
uint uVar6;
ulong uVar7;
uint uVar8;
bool bVar9;
pbVar1 = *(byte **)(param_1 + 0x10);
if (pbVar1 < *(byte **)(param_1 + 0x18)) {
bVar4 = 0;
uVar6 = 0;
uVar8 = 0;
pbVar2 = pbVar1;
do {
pbVar5 = pbVar2 + 1;
uVar8 = (*pbVar2 & 0x7f) << (bVar4 & 0x1f) | uVar8;
if (-1 < (char)*pbVar2) {
*param_2 = uVar8;
uVar7 = (ulong)(uVar6 + 1);
goto LAB_00149b30;
}
bVar9 = uVar6 < 4;
uVar6 = uVar6 + 1;
bVar4 = bVar4 + 7;
pbVar2 = pbVar5;
} while (pbVar5 < *(byte **)(param_1 + 0x18) && bVar9);
}
*param_2 = 0;
uVar7 = 0xffffffff;
LAB_00149b30:
if ((int)uVar7 < 0) {
bc_get_leb128_cold_1();
uVar3 = 0xffffffff;
}
else {
*(byte **)(param_1 + 0x10) = pbVar1 + uVar7;
uVar3 = 0;
}
return uVar3;
}
|
|
18,740
|
bc_get_leb128
|
bluesky950520[P]quickjs/quickjs.c
|
static int bc_get_leb128(BCReaderState *s, uint32_t *pval)
{
int ret;
ret = get_leb128(pval, s->ptr, s->buf_end);
if (unlikely(ret < 0))
return bc_read_error_end(s);
s->ptr += ret;
return 0;
}
|
O2
|
c
|
bc_get_leb128:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rdx
movq %rax, %rdi
callq 0x3ec22
testl %eax, %eax
js 0x40d69
movl %eax, %eax
addq %rax, 0x10(%rbx)
xorl %eax, %eax
popq %rbx
retq
movq %rbx, %rdi
callq 0x40e2c
pushq $-0x1
popq %rax
jmp 0x40d67
|
bc_get_leb128:
push rbx
mov rax, rsi
mov rbx, rdi
mov rsi, [rdi+10h]
mov rdx, [rdi+18h]
mov rdi, rax
call get_leb128
test eax, eax
js short loc_40D69
mov eax, eax
add [rbx+10h], rax
xor eax, eax
loc_40D67:
pop rbx
retn
loc_40D69:
mov rdi, rbx
call bc_read_error_end
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_40D67
|
long long bc_get_leb128(long long a1, _DWORD *a2)
{
int leb128; // eax
leb128 = get_leb128(a2, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24));
if ( leb128 < 0 )
{
bc_read_error_end(a1);
return -1LL;
}
else
{
*(_QWORD *)(a1 + 16) += (unsigned int)leb128;
return 0LL;
}
}
|
bc_get_leb128:
PUSH RBX
MOV RAX,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x10]
MOV RDX,qword ptr [RDI + 0x18]
MOV RDI,RAX
CALL 0x0013ec22
TEST EAX,EAX
JS 0x00140d69
MOV EAX,EAX
ADD qword ptr [RBX + 0x10],RAX
XOR EAX,EAX
LAB_00140d67:
POP RBX
RET
LAB_00140d69:
MOV RDI,RBX
CALL 0x00140e2c
PUSH -0x1
POP RAX
JMP 0x00140d67
|
int8 bc_get_leb128(long param_1,int8 param_2)
{
uint uVar1;
int8 uStack_10;
uVar1 = get_leb128(param_2,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18));
if ((int)uVar1 < 0) {
bc_read_error_end(param_1);
uStack_10 = 0xffffffffffffffff;
}
else {
*(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + (ulong)uVar1;
uStack_10 = 0;
}
return uStack_10;
}
|
|
18,741
|
ftxui::(anonymous namespace)::Border::SetBox(ftxui::Box)
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/border.cpp
|
void SetBox(Box box) override {
Node::SetBox(box);
if (children_.size() == 2) {
Box title_box;
title_box.x_min = box.x_min + 1;
title_box.x_max = box.x_max - 1;
title_box.y_min = box.y_min;
title_box.y_max = box.y_min;
children_[1]->SetBox(title_box);
}
box.x_min++;
box.x_max--;
box.y_min++;
box.y_max--;
children_[0]->SetBox(box);
}
|
O0
|
cpp
|
ftxui::(anonymous namespace)::Border::SetBox(ftxui::Box):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x44670
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
callq 0x24980
cmpq $0x2, %rax
jne 0x3abae
leaq -0x38(%rbp), %rdi
callq 0x3e790
movq -0x60(%rbp), %rdi
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x2c(%rbp)
addq $0x8, %rdi
movl $0x1, %esi
callq 0x3e6a0
movq %rax, %rdi
callq 0x3e6c0
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x60(%rbp), %rdi
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3e6a0
movq %rax, %rdi
callq 0x3e6c0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN5ftxui12_GLOBAL__N_16Border6SetBoxENS_3BoxE:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rsi
mov [rbp+var_8], rdx
mov [rbp+var_18], rdi
mov rdi, [rbp+var_18]
mov [rbp+var_60], rdi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_20]
call _ZN5ftxui4Node6SetBoxENS_3BoxE; ftxui::Node::SetBox(ftxui::Box)
mov rdi, [rbp+var_60]
add rdi, 8
call _ZNKSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE4sizeEv; std::vector<std::shared_ptr<ftxui::Node>>::size(void)
cmp rax, 2
jnz short loc_3ABAE
lea rdi, [rbp+var_38]; this
call _ZN5ftxui3BoxC2Ev; ftxui::Box::Box(void)
mov rdi, [rbp+var_60]
mov eax, dword ptr [rbp+var_10]
add eax, 1
mov dword ptr [rbp+var_38], eax
mov eax, dword ptr [rbp+var_10+4]
sub eax, 1
mov dword ptr [rbp+var_38+4], eax
mov eax, dword ptr [rbp+var_8]
mov dword ptr [rbp+var_30], eax
mov eax, dword ptr [rbp+var_8]
mov dword ptr [rbp+var_30+4], eax
add rdi, 8
mov esi, 1
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EEixEm; std::vector<std::shared_ptr<ftxui::Node>>::operator[](ulong)
mov rdi, rax
call _ZNKSt19__shared_ptr_accessIN5ftxui4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rbp+var_38]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_40]
mov rax, [rdi]
call qword ptr [rax+18h]
loc_3ABAE:
mov rdi, [rbp+var_60]
mov eax, dword ptr [rbp+var_10]
add eax, 1
mov dword ptr [rbp+var_10], eax
mov eax, dword ptr [rbp+var_10+4]
add eax, 0FFFFFFFFh
mov dword ptr [rbp+var_10+4], eax
mov eax, dword ptr [rbp+var_8]
add eax, 1
mov dword ptr [rbp+var_8], eax
mov eax, dword ptr [rbp+var_8+4]
add eax, 0FFFFFFFFh
mov dword ptr [rbp+var_8+4], eax
add rdi, 8
xor eax, eax
mov esi, eax
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EEixEm; std::vector<std::shared_ptr<ftxui::Node>>::operator[](ulong)
mov rdi, rax
call _ZNKSt19__shared_ptr_accessIN5ftxui4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rbp+var_10]
mov [rbp+var_58], rax
mov rax, [rbp+var_8]
mov [rbp+var_50], rax
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_50]
mov rax, [rdi]
call qword ptr [rax+18h]
add rsp, 60h
pop rbp
retn
|
long long ftxui::`anonymous namespace'::Border::SetBox(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v8; // [rsp+28h] [rbp-38h] BYREF
long long v9; // [rsp+30h] [rbp-30h]
long long v10; // [rsp+38h] [rbp-28h]
long long v11; // [rsp+40h] [rbp-20h]
long long v12; // [rsp+48h] [rbp-18h]
long long v13; // [rsp+50h] [rbp-10h]
long long v14; // [rsp+58h] [rbp-8h]
v13 = a2;
v14 = a3;
v12 = a1;
v10 = a2;
v11 = a3;
ftxui::Node::SetBox(a1, a2, a3);
if ( std::vector<std::shared_ptr<ftxui::Node>>::size((_QWORD *)(a1 + 8)) == 2 )
{
ftxui::Box::Box((ftxui::Box *)&v8);
LODWORD(v8) = v13 + 1;
HIDWORD(v8) = HIDWORD(v13) - 1;
LODWORD(v9) = v14;
HIDWORD(v9) = v14;
v3 = std::vector<std::shared_ptr<ftxui::Node>>::operator[](a1 + 8, 1LL);
v4 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v3);
(*(void ( **)(long long, long long, long long))(*(_QWORD *)v4 + 24LL))(v4, v8, v9);
}
LODWORD(v13) = v13 + 1;
--HIDWORD(v13);
LODWORD(v14) = v14 + 1;
--HIDWORD(v14);
v5 = std::vector<std::shared_ptr<ftxui::Node>>::operator[](a1 + 8, 0LL);
v6 = std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v5);
return (*(long long ( **)(long long, long long, long long))(*(_QWORD *)v6 + 24LL))(v6, v13, v14);
}
|
SetBox:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x8],RDX
MOV qword ptr [RBP + -0x18],RDI
MOV RDI,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00144670
MOV RDI,qword ptr [RBP + -0x60]
ADD RDI,0x8
CALL 0x00124980
CMP RAX,0x2
JNZ 0x0013abae
LEA RDI,[RBP + -0x38]
CALL 0x0013e790
MOV RDI,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x2c],EAX
ADD RDI,0x8
MOV ESI,0x1
CALL 0x0013e6a0
MOV RDI,RAX
CALL 0x0013e6c0
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0013abae:
MOV RDI,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,-0x1
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x4],EAX
ADD RDI,0x8
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013e6a0
MOV RDI,RAX
CALL 0x0013e6c0
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x50],RAX
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
ADD RSP,0x60
POP RBP
RET
|
/* ftxui::(anonymous namespace)::Border::SetBox(ftxui::Box) */
void ftxui::(anonymous_namespace)::Border::SetBox
(long param_1,int8 param_2,int8 param_3)
{
long lVar1;
__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *p_Var2;
long *plVar3;
int local_40;
int iStack_3c;
int4 local_38;
int4 uStack_34;
int8 local_30;
int8 local_28;
long local_20;
int8 local_18;
int8 local_10;
local_30 = param_2;
local_28 = param_3;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
Node::SetBox(param_1,param_2,param_3);
lVar1 = std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
size((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
(param_1 + 8));
if (lVar1 == 2) {
Box::Box((Box *)&local_40);
local_40 = (int)local_18 + 1;
iStack_3c = local_18._4_4_ + -1;
local_38 = (int)local_10;
uStack_34 = (int)local_10;
p_Var2 = (__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *)
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
::operator[]((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
*)(param_1 + 8),1);
plVar3 = (long *)std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(p_Var2);
(**(code **)(*plVar3 + 0x18))(plVar3,CONCAT44(iStack_3c,local_40),CONCAT44(uStack_34,local_38));
}
local_18 = CONCAT44(local_18._4_4_ + -1,(int)local_18 + 1);
local_10 = CONCAT44(local_10._4_4_ + -1,(int)local_10 + 1);
p_Var2 = (__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false> *)
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::
operator[]((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>
*)(param_1 + 8),0);
plVar3 = (long *)std::__shared_ptr_access<ftxui::Node,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(p_Var2);
(**(code **)(*plVar3 + 0x18))(plVar3,local_18,local_10);
return;
}
|
|
18,742
|
Log_event::print_header(st_io_cache*, st_print_event_info*, bool)
|
eloqsql/sql/log_event_client.cc
|
bool Log_event::print_header(IO_CACHE* file,
PRINT_EVENT_INFO* print_event_info,
bool is_more __attribute__((unused)))
{
char llbuff[22];
my_off_t hexdump_from= print_event_info->hexdump_from;
DBUG_ENTER("Log_event::print_header");
if (my_b_write_byte(file, '#') ||
print_timestamp(file) ||
my_b_printf(file, " server id %lu end_log_pos %s ", (ulong) server_id,
llstr(log_pos,llbuff)))
goto err;
/* print the checksum */
if (checksum_alg != BINLOG_CHECKSUM_ALG_OFF &&
checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF)
{
char checksum_buf[BINLOG_CHECKSUM_LEN * 2 + 4]; // to fit to "%p "
size_t const bytes_written=
my_snprintf(checksum_buf, sizeof(checksum_buf), "0x%08x ", crc);
if (my_b_printf(file, "%s ", get_type(&binlog_checksum_typelib,
checksum_alg)) ||
my_b_printf(file, checksum_buf, bytes_written))
goto err;
}
/* mysqlbinlog --hexdump */
if (print_event_info->hexdump_from)
{
my_b_write_byte(file, '\n');
uchar *ptr= (uchar*)temp_buf;
my_off_t size= uint4korr(ptr + EVENT_LEN_OFFSET);
my_off_t hdr_len= get_header_len(print_event_info->common_header_len);
size-= hdr_len;
if (my_b_printf(file, "# Position\n"))
goto err;
/* Write the header, nicely formatted by field. */
if (hexdump_minimal_header_to_io_cache(file, hexdump_from, ptr))
goto err;
ptr+= hdr_len;
hexdump_from+= hdr_len;
/* Print the rest of the data, mimicking "hexdump -C" output. */
if (hexdump_data_to_io_cache(file, hexdump_from, ptr, size))
goto err;
/*
Prefix the next line so that the output from print_helper()
will appear as a comment.
*/
if (my_b_write(file, (uchar*)"# Event: ", 9))
goto err;
}
DBUG_RETURN(0);
err:
DBUG_RETURN(1);
}
|
O0
|
cpp
|
Log_event::print_header(st_io_cache*, st_print_event_info*, bool):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movb %cl, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
andb $0x1, %al
movb %al, -0x49(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rax
movq 0x360(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
movl $0x23, %esi
callq 0x528f0
cmpb $0x0, %al
jne 0x52722
movq -0x80(%rbp), %rdi
movq -0x40(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x52960
testb $0x1, %al
jne 0x52722
movq -0x80(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, -0x90(%rbp)
movl 0x40(%rax), %ecx
movq %rcx, -0x88(%rbp)
movq 0x8(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x109390
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rdx
movq %rax, %rcx
leaq 0xbf21f(%rip), %rsi # 0x111936
movb $0x0, %al
callq 0xafb80
cmpb $0x0, %al
je 0x52727
jmp 0x528b5
movq -0x80(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x527cc
movq -0x80(%rbp), %rax
cmpl $0xff, 0x88(%rax)
je 0x527cc
movq -0x80(%rbp), %rax
leaq -0x2c(%rbp), %rdi
movl 0x60(%rax), %ecx
movl $0xc, %esi
leaq 0xbf1f3(%rip), %rdx # 0x111956
movb $0x0, %al
callq 0x10bfb0
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, -0x60(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, -0x98(%rbp)
movl 0x88(%rax), %esi
leaq 0x237a4b(%rip), %rdi # 0x28a1d8
callq 0xbe220
movq -0x98(%rbp), %rdi
movq %rax, %rdx
leaq 0xbf1af(%rip), %rsi # 0x111952
movb $0x0, %al
callq 0xafb80
cmpb $0x0, %al
jne 0x527c5
movq -0x40(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
movq -0x60(%rbp), %rdx
movb $0x0, %al
callq 0xafb80
cmpb $0x0, %al
je 0x527ca
jmp 0x528b5
jmp 0x527cc
movq -0x48(%rbp), %rax
cmpq $0x0, 0x360(%rax)
je 0x528ad
movq -0x40(%rbp), %rdi
movl $0xa, %esi
callq 0x528f0
movq -0x80(%rbp), %rdi
movq 0x10(%rdi), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl 0x9(%rax), %eax
movq %rax, -0x70(%rbp)
movq -0x48(%rbp), %rax
movzbl 0x358(%rax), %eax
movl %eax, %esi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rcx
movq -0x70(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rdi
leaq 0xbf12a(%rip), %rsi # 0x11195e
movb $0x0, %al
callq 0xafb80
cmpb $0x0, %al
je 0x52841
jmp 0x528b5
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x52a00
testb $0x1, %al
jne 0x52858
jmp 0x5285a
jmp 0x528b5
movq -0x78(%rbp), %rax
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x78(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x70(%rbp), %rcx
callq 0x52ca0
testb $0x1, %al
jne 0x5288d
jmp 0x5288f
jmp 0x528b5
movq -0x40(%rbp), %rdi
leaq 0xbf0d0(%rip), %rsi # 0x11196a
movl $0x9, %edx
callq 0x53060
cmpl $0x0, %eax
je 0x528ab
jmp 0x528b5
jmp 0x528ad
jmp 0x528af
movb $0x0, -0x2d(%rbp)
jmp 0x528bb
jmp 0x528b7
movb $0x1, -0x2d(%rbp)
movb -0x2d(%rbp), %al
movb %al, -0x99(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x528e7
movb -0x99(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
callq 0x3b340
nopl (%rax)
|
_ZN9Log_event12print_headerEP11st_io_cacheP19st_print_event_infob:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov al, cl
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
and al, 1
mov [rbp+var_49], al
mov rax, [rbp+var_38]
mov [rbp+var_80], rax
mov rax, [rbp+var_48]
mov rax, [rax+360h]
mov [rbp+var_58], rax
mov rdi, [rbp+var_40]
mov esi, 23h ; '#'
call _ZL15my_b_write_byteP11st_io_cacheh; my_b_write_byte(st_io_cache *,uchar)
cmp al, 0
jnz short loc_52722
mov rdi, [rbp+var_80]
mov rsi, [rbp+var_40]
xor eax, eax
mov edx, eax
call _ZN9Log_event15print_timestampEP11st_io_cachePl; Log_event::print_timestamp(st_io_cache *,long *)
test al, 1
jnz short loc_52722
mov rax, [rbp+var_80]
mov rcx, [rbp+var_40]
mov [rbp+var_90], rcx
mov ecx, [rax+40h]
mov [rbp+var_88], rcx
mov rdi, [rax+8]
lea rsi, [rbp+var_20]
call llstr
mov rdi, [rbp+var_90]
mov rdx, [rbp+var_88]
mov rcx, rax
lea rsi, aServerIdLuEndL; " server id %lu end_log_pos %s "
mov al, 0
call my_b_printf
cmp al, 0
jz short loc_52727
loc_52722:
jmp loc_528B5
loc_52727:
mov rax, [rbp+var_80]
cmp dword ptr [rax+88h], 0
jz loc_527CC
mov rax, [rbp+var_80]
cmp dword ptr [rax+88h], 0FFh
jz loc_527CC
mov rax, [rbp+var_80]
lea rdi, [rbp+var_2C]
mov ecx, [rax+60h]
mov esi, 0Ch
lea rdx, a0x08x; "0x%08x "
mov al, 0
call my_snprintf
mov rcx, rax
mov rax, [rbp+var_80]
mov [rbp+var_60], rcx
mov rcx, [rbp+var_40]
mov [rbp+var_98], rcx
mov esi, [rax+88h]
lea rdi, binlog_checksum_typelib
call get_type
mov rdi, [rbp+var_98]
mov rdx, rax
lea rsi, aServerIdLuEndL+1Ch; "%s "
mov al, 0
call my_b_printf
cmp al, 0
jnz short loc_527C5
mov rdi, [rbp+var_40]
lea rsi, [rbp+var_2C]
mov rdx, [rbp+var_60]
mov al, 0
call my_b_printf
cmp al, 0
jz short loc_527CA
loc_527C5:
jmp loc_528B5
loc_527CA:
jmp short $+2
loc_527CC:
mov rax, [rbp+var_48]
cmp qword ptr [rax+360h], 0
jz loc_528AD
mov rdi, [rbp+var_40]
mov esi, 0Ah
call _ZL15my_b_write_byteP11st_io_cacheh; my_b_write_byte(st_io_cache *,uchar)
mov rdi, [rbp+var_80]
mov rax, [rdi+10h]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov eax, [rax+9]
mov [rbp+var_70], rax
mov rax, [rbp+var_48]
movzx eax, byte ptr [rax+358h]
mov esi, eax
mov rax, [rdi]
call qword ptr [rax+20h]
mov [rbp+var_78], rax
mov rcx, [rbp+var_78]
mov rax, [rbp+var_70]
sub rax, rcx
mov [rbp+var_70], rax
mov rdi, [rbp+var_40]
lea rsi, aPosition; "# Position\n"
mov al, 0
call my_b_printf
cmp al, 0
jz short loc_52841
jmp short loc_528B5
loc_52841:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_68]
call _ZL34hexdump_minimal_header_to_io_cacheP11st_io_cacheyPh; hexdump_minimal_header_to_io_cache(st_io_cache *,ulong long,uchar *)
test al, 1
jnz short loc_52858
jmp short loc_5285A
loc_52858:
jmp short loc_528B5
loc_5285A:
mov rax, [rbp+var_78]
add rax, [rbp+var_68]
mov [rbp+var_68], rax
mov rax, [rbp+var_78]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_68]
mov rcx, [rbp+var_70]
call _ZL24hexdump_data_to_io_cacheP11st_io_cacheyPhy; hexdump_data_to_io_cache(st_io_cache *,ulong long,uchar *,ulong long)
test al, 1
jnz short loc_5288D
jmp short loc_5288F
loc_5288D:
jmp short loc_528B5
loc_5288F:
mov rdi, [rbp+var_40]
lea rsi, aEvent; "# Event: "
mov edx, 9
call _ZL10my_b_writeP11st_io_cachePKhm; my_b_write(st_io_cache *,uchar const*,ulong)
cmp eax, 0
jz short loc_528AB
jmp short loc_528B5
loc_528AB:
jmp short $+2
loc_528AD:
jmp short $+2
loc_528AF:
mov [rbp+var_2D], 0
jmp short loc_528BB
loc_528B5:
jmp short $+2
loc_528B7:
mov [rbp+var_2D], 1
loc_528BB:
mov al, [rbp+var_2D]
mov [rbp+var_99], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_528E7
mov al, [rbp+var_99]
and al, 1
add rsp, 0A0h
pop rbp
retn
loc_528E7:
call ___stack_chk_fail
|
char Log_event::print_header(long long a1, long long a2, long long a3)
{
int v3; // eax
int v4; // r8d
int v5; // r9d
int v6; // r8d
int v7; // r9d
int type; // eax
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // ecx
int v13; // r8d
int v14; // r9d
int v15; // edx
int v16; // r8d
int v17; // r9d
int v19; // [rsp+18h] [rbp-88h]
long long v20; // [rsp+28h] [rbp-78h]
long long v21; // [rsp+30h] [rbp-70h]
long long v22; // [rsp+30h] [rbp-70h]
long long v23; // [rsp+38h] [rbp-68h]
int v24; // [rsp+40h] [rbp-60h]
long long v25; // [rsp+48h] [rbp-58h]
char v27; // [rsp+73h] [rbp-2Dh]
_BYTE v28[12]; // [rsp+74h] [rbp-2Ch] BYREF
_BYTE v29[24]; // [rsp+80h] [rbp-20h] BYREF
unsigned long long v30; // [rsp+98h] [rbp-8h]
v30 = __readfsqword(0x28u);
v25 = *(_QWORD *)(a3 + 864);
if ( (unsigned __int8)my_b_write_byte(a2, 35LL) )
goto LABEL_16;
if ( (Log_event::print_timestamp(a1, a2, 0LL) & 1) != 0 )
goto LABEL_16;
v19 = *(_DWORD *)(a1 + 64);
v3 = llstr(*(_QWORD *)(a1 + 8), v29);
if ( (unsigned __int8)my_b_printf(a2, (unsigned int)" server id %lu end_log_pos %s ", v19, v3, v4, v5) )
goto LABEL_16;
if ( *(_DWORD *)(a1 + 136) )
{
if ( *(_DWORD *)(a1 + 136) != 255 )
{
v24 = my_snprintf((unsigned int)v28, 12, (unsigned int)"0x%08x ", *(_DWORD *)(a1 + 96), v6, v7);
type = get_type(&binlog_checksum_typelib, *(unsigned int *)(a1 + 136));
if ( (unsigned __int8)my_b_printf(a2, (unsigned int)"%s ", type, v9, v10, v11)
|| (unsigned __int8)my_b_printf(a2, (unsigned int)v28, v24, v12, v13, v14) )
{
goto LABEL_16;
}
}
}
if ( *(_QWORD *)(a3 + 864)
&& ((my_b_write_byte(a2, 10LL),
v23 = *(_QWORD *)(a1 + 16),
v21 = *(unsigned int *)(v23 + 9),
v20 = (*(long long ( **)(long long, _QWORD))(*(_QWORD *)a1 + 32LL))(a1, *(unsigned __int8 *)(a3 + 856)),
v22 = v21 - v20,
(unsigned __int8)my_b_printf(a2, (unsigned int)"# Position\n", v15, v20, v16, v17))
|| (hexdump_minimal_header_to_io_cache(a2, v25, v23) & 1) != 0
|| (hexdump_data_to_io_cache(a2, v25 + v20, v23 + v20, v22) & 1) != 0
|| (unsigned int)my_b_write(a2, "# Event: ", 9LL)) )
{
LABEL_16:
v27 = 1;
}
else
{
v27 = 0;
}
return v27 & 1;
}
|
print_header:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV AL,CL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
AND AL,0x1
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x360]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,0x23
CALL 0x001528f0
CMP AL,0x0
JNZ 0x00152722
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0x40]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00152960
TEST AL,0x1
JNZ 0x00152722
MOV RAX,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x90],RCX
MOV ECX,dword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x88],RCX
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RBP + -0x20]
CALL 0x00209390
MOV RDI,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0x88]
MOV RCX,RAX
LEA RSI,[0x211936]
MOV AL,0x0
CALL 0x001afb80
CMP AL,0x0
JZ 0x00152727
LAB_00152722:
JMP 0x001528b5
LAB_00152727:
MOV RAX,qword ptr [RBP + -0x80]
CMP dword ptr [RAX + 0x88],0x0
JZ 0x001527cc
MOV RAX,qword ptr [RBP + -0x80]
CMP dword ptr [RAX + 0x88],0xff
JZ 0x001527cc
MOV RAX,qword ptr [RBP + -0x80]
LEA RDI,[RBP + -0x2c]
MOV ECX,dword ptr [RAX + 0x60]
MOV ESI,0xc
LEA RDX,[0x211956]
MOV AL,0x0
CALL 0x0020bfb0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x60],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x98],RCX
MOV ESI,dword ptr [RAX + 0x88]
LEA RDI,[0x38a1d8]
CALL 0x001be220
MOV RDI,qword ptr [RBP + -0x98]
MOV RDX,RAX
LEA RSI,[0x211952]
MOV AL,0x0
CALL 0x001afb80
CMP AL,0x0
JNZ 0x001527c5
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x60]
MOV AL,0x0
CALL 0x001afb80
CMP AL,0x0
JZ 0x001527ca
LAB_001527c5:
JMP 0x001528b5
LAB_001527ca:
JMP 0x001527cc
LAB_001527cc:
MOV RAX,qword ptr [RBP + -0x48]
CMP qword ptr [RAX + 0x360],0x0
JZ 0x001528ad
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,0xa
CALL 0x001528f0
MOV RDI,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RDI + 0x10]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV EAX,dword ptr [RAX + 0x9]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,byte ptr [RAX + 0x358]
MOV ESI,EAX
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x78],RAX
MOV RCX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x70]
SUB RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[0x21195e]
MOV AL,0x0
CALL 0x001afb80
CMP AL,0x0
JZ 0x00152841
JMP 0x001528b5
LAB_00152841:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x68]
CALL 0x00152a00
TEST AL,0x1
JNZ 0x00152858
JMP 0x0015285a
LAB_00152858:
JMP 0x001528b5
LAB_0015285a:
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x70]
CALL 0x00152ca0
TEST AL,0x1
JNZ 0x0015288d
JMP 0x0015288f
LAB_0015288d:
JMP 0x001528b5
LAB_0015288f:
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[0x21196a]
MOV EDX,0x9
CALL 0x00153060
CMP EAX,0x0
JZ 0x001528ab
JMP 0x001528b5
LAB_001528ab:
JMP 0x001528ad
LAB_001528ad:
JMP 0x001528af
LAB_001528af:
MOV byte ptr [RBP + -0x2d],0x0
JMP 0x001528bb
LAB_001528b5:
JMP 0x001528b7
LAB_001528b7:
MOV byte ptr [RBP + -0x2d],0x1
LAB_001528bb:
MOV AL,byte ptr [RBP + -0x2d]
MOV byte ptr [RBP + -0x99],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001528e7
MOV AL,byte ptr [RBP + -0x99]
AND AL,0x1
ADD RSP,0xa0
POP RBP
RET
LAB_001528e7:
CALL 0x0013b340
|
/* Log_event::print_header(st_io_cache*, st_print_event_info*, bool) */
int8 Log_event::print_header(st_io_cache *param_1,st_print_event_info *param_2,bool param_3)
{
int4 uVar1;
uint uVar2;
ulonglong uVar3;
uchar *puVar4;
char cVar5;
int iVar6;
ulong uVar7;
int8 uVar8;
int8 uVar9;
long lVar10;
int7 in_register_00000011;
long in_FS_OFFSET;
int1 local_35;
int1 local_34 [12];
int1 local_28 [24];
long local_10;
lVar10 = CONCAT71(in_register_00000011,param_3);
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = *(ulonglong *)(lVar10 + 0x360);
cVar5 = my_b_write_byte((st_io_cache *)param_2,'#');
if ((cVar5 == '\0') &&
(uVar7 = print_timestamp((Log_event *)param_1,(st_io_cache *)param_2,(long *)0x0),
(uVar7 & 1) == 0)) {
uVar1 = *(int4 *)(param_1 + 0x40);
uVar8 = llstr(*(int8 *)(param_1 + 8),local_28);
cVar5 = my_b_printf(param_2," server id %lu end_log_pos %s ",uVar1,uVar8);
if (cVar5 == '\0') {
if ((*(int *)(param_1 + 0x88) != 0) && (*(int *)(param_1 + 0x88) != 0xff)) {
uVar8 = my_snprintf(local_34,0xc,"0x%08x ",*(int4 *)(param_1 + 0x60));
uVar9 = get_type(binlog_checksum_typelib,*(int4 *)(param_1 + 0x88));
cVar5 = my_b_printf(param_2,"%s ",uVar9);
if ((cVar5 != '\0') || (cVar5 = my_b_printf(param_2,local_34,uVar8), cVar5 != '\0'))
goto LAB_001528b5;
}
if (*(long *)(lVar10 + 0x360) != 0) {
my_b_write_byte((st_io_cache *)param_2,'\n');
puVar4 = *(uchar **)(param_1 + 0x10);
uVar2 = *(uint *)(puVar4 + 9);
lVar10 = (**(code **)(*(long *)param_1 + 0x20))(param_1,*(int1 *)(lVar10 + 0x358));
cVar5 = my_b_printf(param_2,"# Position\n");
if ((((cVar5 != '\0') ||
(uVar7 = hexdump_minimal_header_to_io_cache((st_io_cache *)param_2,uVar3,puVar4),
(uVar7 & 1) != 0)) ||
(uVar7 = hexdump_data_to_io_cache
((st_io_cache *)param_2,lVar10 + uVar3,puVar4 + lVar10,
(ulong)uVar2 - lVar10), (uVar7 & 1) != 0)) ||
(iVar6 = my_b_write((st_io_cache *)param_2,(uchar *)"# Event: ",9), iVar6 != 0))
goto LAB_001528b5;
}
local_35 = 0;
goto LAB_001528bb;
}
}
LAB_001528b5:
local_35 = 1;
LAB_001528bb:
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_35);
}
|
|
18,743
|
JS_AddIntrinsicDate
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicDate(JSContext *ctx)
{
JSValue obj;
/* Date */
ctx->class_proto[JS_CLASS_DATE] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_DATE], js_date_proto_funcs,
countof(js_date_proto_funcs));
obj = JS_NewGlobalCConstructor(ctx, "Date", js_date_constructor, 7,
ctx->class_proto[JS_CLASS_DATE]);
JS_SetPropertyFunctionList(ctx, obj, js_date_funcs, countof(js_date_funcs));
}
|
O0
|
c
|
JS_AddIntrinsicDate:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0x2a570
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0xa0(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0xa8(%rax)
movq 0x40(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq 0xa0(%rax), %rsi
movq 0xa8(%rax), %rdx
leaq 0x10c942(%rip), %rcx # 0x1328e0
movl $0x2f, %r8d
callq 0x4cb00
movq 0x40(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq 0xa0(%rax), %r8
movq 0xa8(%rax), %r9
leaq 0xe970b(%rip), %rsi # 0x10f6d7
leaq 0x2f19d(%rip), %rdx # 0x55170
movl $0x7, %ecx
callq 0x4e170
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x10aeff(%rip), %rcx # 0x130f10
movl $0x3, %r8d
callq 0x4cb00
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_AddIntrinsicDate:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov rax, [rsp+48h+var_8]
mov rax, [rax+40h]
mov [rsp+48h+var_40], rax
mov rdi, [rsp+48h+var_8]
call JS_NewObject
mov rcx, rax
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_28], rcx
mov [rsp+48h+var_20], rdx
mov rcx, [rsp+48h+var_28]
mov [rax+0A0h], rcx
mov rcx, [rsp+48h+var_20]
mov [rax+0A8h], rcx
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_8]
mov rax, [rax+40h]
mov rsi, [rax+0A0h]
mov rdx, [rax+0A8h]
lea rcx, js_date_proto_funcs
mov r8d, 2Fh ; '/'
call JS_SetPropertyFunctionList
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_8]
mov rax, [rax+40h]
mov r8, [rax+0A0h]
mov r9, [rax+0A8h]
lea rsi, aInvalidDate+8; "Date"
lea rdx, js_date_constructor
mov ecx, 7
call JS_NewGlobalCConstructor
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_30], rdx
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_18], rax
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_10], rax
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rdx, [rsp+48h+var_10]
lea rcx, js_date_funcs
mov r8d, 3
call JS_SetPropertyFunctionList
add rsp, 48h
retn
|
long long JS_AddIntrinsicDate(long long a1)
{
long long v1; // rdx
long long v2; // rdx
long long v4; // [rsp+8h] [rbp-40h]
long long v5; // [rsp+10h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(v4 + 160) = JS_NewObject(a1);
*(_QWORD *)(v4 + 168) = v1;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 160LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 168LL),
&js_date_proto_funcs,
47LL);
v5 = JS_NewGlobalCConstructor(
a1,
"Date",
js_date_constructor,
7LL,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 160LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 168LL));
return JS_SetPropertyFunctionList(a1, v5, v2, &js_date_funcs, 3LL);
}
|
JS_AddIntrinsicDate:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0012a570
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x28],RDX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0xa0],RCX
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0xa8],RCX
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RAX + 0xa0]
MOV RDX,qword ptr [RAX + 0xa8]
LEA RCX,[0x2328e0]
MOV R8D,0x2f
CALL 0x0014cb00
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x40]
MOV R8,qword ptr [RAX + 0xa0]
MOV R9,qword ptr [RAX + 0xa8]
LEA RSI,[0x20f6d7]
LEA RDX,[0x155170]
MOV ECX,0x7
CALL 0x0014e170
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
LEA RCX,[0x230f10]
MOV R8D,0x3
CALL 0x0014cb00
ADD RSP,0x48
RET
|
void JS_AddIntrinsicDate(long param_1)
{
long lVar1;
int1 auVar2 [16];
lVar1 = *(long *)(param_1 + 0x40);
auVar2 = JS_NewObject(param_1);
*(int1 (*) [16])(lVar1 + 0xa0) = auVar2;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0xa0),
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa8),js_date_proto_funcs,0x2f);
auVar2 = JS_NewGlobalCConstructor
(param_1,"Date",js_date_constructor,7,
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa0),
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa8));
JS_SetPropertyFunctionList(param_1,auVar2._0_8_,auVar2._8_8_,js_date_funcs,3);
return;
}
|
|
18,744
|
JS_AddIntrinsicDate
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicDate(JSContext *ctx)
{
JSValue obj;
/* Date */
ctx->class_proto[JS_CLASS_DATE] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_DATE], js_date_proto_funcs,
countof(js_date_proto_funcs));
obj = JS_NewGlobalCConstructor(ctx, "Date", js_date_constructor, 7,
ctx->class_proto[JS_CLASS_DATE]);
JS_SetPropertyFunctionList(ctx, obj, js_date_funcs, countof(js_date_funcs));
}
|
O1
|
c
|
JS_AddIntrinsicDate:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %r14
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movl $0x1, %ecx
callq 0x20f05
movq %rax, 0xa0(%r14)
movq %rdx, 0xa8(%r14)
movq 0x40(%rbx), %rax
movq 0xa0(%rax), %rsi
movq 0xa8(%rax), %rdx
leaq 0xaaf37(%rip), %rcx # 0xc9800
movq %rbx, %rdi
movl $0x2f, %r8d
callq 0x32c67
movq 0x40(%rbx), %rax
movq 0xa0(%rax), %r14
movq 0xa8(%rax), %r15
movups 0x48(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x1860e(%rip), %rsi # 0x36f06
leaq 0x81d74(%rip), %r12 # 0xa0673
movq %rbx, %rdi
movq %r12, %rdx
movl $0x7, %ecx
movl $0x4, %r8d
xorl %r9d, %r9d
callq 0x21006
movq %rax, %r13
movq %rdx, %rbp
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x361aa
leaq 0xa9507(%rip), %rcx # 0xc7e40
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x3, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32c67
|
JS_AddIntrinsicDate:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r14, [rdi+40h]
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+0A0h], rax
mov [r14+0A8h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+0A0h]
mov rdx, [rax+0A8h]
lea rcx, js_date_proto_funcs
mov rdi, rbx
mov r8d, 2Fh ; '/'
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov r14, [rax+0A0h]
mov r15, [rax+0A8h]
movups xmm0, xmmword ptr [rbx+48h]
movups [rsp+48h+var_48], xmm0
lea rsi, js_date_constructor
lea r12, aInvalidDate+8; "Date"
mov rdi, rbx
mov rdx, r12
mov ecx, 7
mov r8d, 4
xor r9d, r9d
call JS_NewCFunction3
mov r13, rax
mov rbp, rdx
mov rdi, rbx
mov rsi, rax
mov rcx, r12
mov r8, r14
mov r9, r15
call JS_NewGlobalCConstructor2
lea rcx, js_date_funcs
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov r8d, 3
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_SetPropertyFunctionList
|
long long JS_AddIntrinsicDate(_QWORD *a1)
{
_QWORD *v1; // r14
long long v2; // rdx
long long v3; // rax
long long v4; // r14
long long v5; // r15
long long v6; // r13
long long v7; // rdx
long long v8; // rbp
v1 = (_QWORD *)a1[8];
v1[20] = JS_NewObjectProtoClass(a1, v1[2], v1[3], 1LL);
v1[21] = v2;
JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 160LL), *(_QWORD *)(a1[8] + 168LL), &js_date_proto_funcs, 47LL);
v3 = a1[8];
v4 = *(_QWORD *)(v3 + 160);
v5 = *(_QWORD *)(v3 + 168);
v6 = JS_NewCFunction3((_DWORD)a1, (unsigned int)js_date_constructor, (unsigned int)"Date", 7, 4, 0, a1[9], a1[10]);
v8 = v7;
JS_NewGlobalCConstructor2(a1, v6, v7, "Date", v4, v5);
return JS_SetPropertyFunctionList(a1, v6, v8, &js_date_funcs, 3LL);
}
|
JS_AddIntrinsicDate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x40]
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV ECX,0x1
CALL 0x00120f05
MOV qword ptr [R14 + 0xa0],RAX
MOV qword ptr [R14 + 0xa8],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0xa0]
MOV RDX,qword ptr [RAX + 0xa8]
LEA RCX,[0x1c9800]
MOV RDI,RBX
MOV R8D,0x2f
CALL 0x00132c67
MOV RAX,qword ptr [RBX + 0x40]
MOV R14,qword ptr [RAX + 0xa0]
MOV R15,qword ptr [RAX + 0xa8]
MOVUPS XMM0,xmmword ptr [RBX + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[0x136f06]
LEA R12,[0x1a0673]
MOV RDI,RBX
MOV RDX,R12
MOV ECX,0x7
MOV R8D,0x4
XOR R9D,R9D
CALL 0x00121006
MOV R13,RAX
MOV RBP,RDX
MOV RDI,RBX
MOV RSI,RAX
MOV RCX,R12
MOV R8,R14
MOV R9,R15
CALL 0x001361aa
LEA RCX,[0x1c7e40]
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV R8D,0x3
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00132c67
|
void JS_AddIntrinsicDate(long param_1)
{
long lVar1;
int8 uVar2;
int8 uVar3;
int1 auVar4 [16];
lVar1 = *(long *)(param_1 + 0x40);
auVar4 = JS_NewObjectProtoClass
(param_1,*(int8 *)(lVar1 + 0x10),*(int8 *)(lVar1 + 0x18),1);
*(int1 (*) [16])(lVar1 + 0xa0) = auVar4;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0xa0),
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa8),js_date_proto_funcs,0x2f);
uVar2 = *(int8 *)(*(long *)(param_1 + 0x40) + 0xa0);
uVar3 = *(int8 *)(*(long *)(param_1 + 0x40) + 0xa8);
auVar4 = JS_NewCFunction3(param_1,js_date_constructor,"Date",7,4,0,*(int4 *)(param_1 + 0x48)
,*(int4 *)(param_1 + 0x50));
JS_NewGlobalCConstructor2(param_1,auVar4._0_8_,auVar4._8_8_,"Date",uVar2,uVar3);
JS_SetPropertyFunctionList(param_1,auVar4._0_8_,auVar4._8_8_,js_date_funcs,3);
return;
}
|
|
18,745
|
JS_AddIntrinsicDate
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicDate(JSContext *ctx)
{
JSValue obj;
/* Date */
ctx->class_proto[JS_CLASS_DATE] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_DATE], js_date_proto_funcs,
countof(js_date_proto_funcs));
obj = JS_NewGlobalCConstructor(ctx, "Date", js_date_constructor, 7,
ctx->class_proto[JS_CLASS_DATE]);
JS_SetPropertyFunctionList(ctx, obj, js_date_funcs, countof(js_date_funcs));
}
|
O2
|
c
|
JS_AddIntrinsicDate:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %r14
callq 0x1b2c9
movq %rax, 0xa0(%r14)
movq %rdx, 0xa8(%r14)
movq 0x40(%rbx), %rax
movq 0xa0(%rax), %rsi
movq 0xa8(%rax), %rdx
leaq 0x9e6a8(%rip), %rcx # 0xb7800
pushq $0x2f
popq %r8
movq %rbx, %rdi
callq 0x2c3ff
movq 0x40(%rbx), %rax
movq 0xa0(%rax), %r8
movq 0xa8(%rax), %r9
leaq 0x6e430(%rip), %rsi # 0x875ad
leaq 0x1746a(%rip), %rdx # 0x305ee
pushq $0x7
popq %rcx
movq %rbx, %rdi
callq 0x2cd8c
leaq 0x9ccaa(%rip), %rcx # 0xb5e40
pushq $0x3
popq %r8
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2c3ff
|
JS_AddIntrinsicDate:
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+40h]
call JS_NewObject
mov [r14+0A0h], rax
mov [r14+0A8h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+0A0h]
mov rdx, [rax+0A8h]
lea rcx, js_date_proto_funcs
push 2Fh ; '/'
pop r8
mov rdi, rbx
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov r8, [rax+0A0h]
mov r9, [rax+0A8h]
lea rsi, aInvalidDate+8; "Date"
lea rdx, js_date_constructor
push 7
pop rcx
mov rdi, rbx
call JS_NewGlobalCConstructor
lea rcx, js_date_funcs
push 3
pop r8
mov rdi, rbx
mov rsi, rax
add rsp, 8
pop rbx
pop r14
jmp JS_SetPropertyFunctionList
|
long long JS_AddIntrinsicDate(long long a1)
{
long long v1; // r14
long long v2; // rdx
long long v3; // rax
long long v4; // rdx
v1 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(v1 + 160) = JS_NewObject(a1);
*(_QWORD *)(v1 + 168) = v2;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 160LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 168LL),
&js_date_proto_funcs,
47LL);
v3 = JS_NewGlobalCConstructor(
a1,
"Date",
js_date_constructor,
7LL,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 160LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 168LL));
return JS_SetPropertyFunctionList(a1, v3, v4, &js_date_funcs, 3LL);
}
|
JS_AddIntrinsicDate:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x40]
CALL 0x0011b2c9
MOV qword ptr [R14 + 0xa0],RAX
MOV qword ptr [R14 + 0xa8],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0xa0]
MOV RDX,qword ptr [RAX + 0xa8]
LEA RCX,[0x1b7800]
PUSH 0x2f
POP R8
MOV RDI,RBX
CALL 0x0012c3ff
MOV RAX,qword ptr [RBX + 0x40]
MOV R8,qword ptr [RAX + 0xa0]
MOV R9,qword ptr [RAX + 0xa8]
LEA RSI,[0x1875ad]
LEA RDX,[0x1305ee]
PUSH 0x7
POP RCX
MOV RDI,RBX
CALL 0x0012cd8c
LEA RCX,[0x1b5e40]
PUSH 0x3
POP R8
MOV RDI,RBX
MOV RSI,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0012c3ff
|
void JS_AddIntrinsicDate(long param_1)
{
long lVar1;
int1 auVar2 [16];
lVar1 = *(long *)(param_1 + 0x40);
auVar2 = JS_NewObject();
*(int1 (*) [16])(lVar1 + 0xa0) = auVar2;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0xa0),
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa8),js_date_proto_funcs,0x2f);
auVar2 = JS_NewGlobalCConstructor
(param_1,"Date",js_date_constructor,7,
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa0),
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa8));
JS_SetPropertyFunctionList(param_1,auVar2._0_8_,auVar2._8_8_,js_date_funcs,3);
return;
}
|
|
18,746
|
page_zip_write_blob_ptr(buf_block_t*, unsigned char const*, dict_index_t*, unsigned short const*, unsigned long, mtr_t*)
|
eloqsql/storage/innobase/page/page0zip.cc
|
void
page_zip_write_blob_ptr(
/*====================*/
buf_block_t* block, /*!< in/out: ROW_FORMAT=COMPRESSED page */
const byte* rec, /*!< in/out: record whose data is being
written */
dict_index_t* index, /*!< in: index of the page */
const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */
ulint n, /*!< in: column index */
mtr_t* mtr) /*!< in/out: mini-transaction */
{
const byte* field;
byte* externs;
const page_t* const page = block->page.frame;
page_zip_des_t* const page_zip = &block->page.zip;
ulint blob_no;
ulint len;
ut_ad(page_align(rec) == page);
ut_ad(index != NULL);
ut_ad(offsets != NULL);
ut_ad(page_simple_validate_new((page_t*) page));
ut_ad(page_zip_simple_validate(page_zip));
ut_ad(page_zip_get_size(page_zip)
> PAGE_DATA + page_zip_dir_size(page_zip));
ut_ad(rec_offs_comp(offsets));
ut_ad(rec_offs_validate(rec, NULL, offsets));
ut_ad(rec_offs_any_extern(offsets));
ut_ad(rec_offs_nth_extern(offsets, n));
ut_ad(page_zip->m_start >= PAGE_DATA);
ut_ad(page_zip_header_cmp(page_zip, page));
ut_ad(page_is_leaf(page));
ut_ad(dict_index_is_clust(index));
MEM_CHECK_DEFINED(page_zip->data, page_zip_get_size(page_zip));
MEM_CHECK_DEFINED(rec, rec_offs_data_size(offsets));
MEM_CHECK_DEFINED(rec - rec_offs_extra_size(offsets),
rec_offs_extra_size(offsets));
blob_no = page_zip_get_n_prev_extern(page_zip, rec, index)
+ rec_get_n_extern_new(rec, index, n);
ut_a(blob_no < page_zip->n_blobs);
externs = page_zip->data + page_zip_get_size(page_zip)
- (page_dir_get_n_heap(page) - PAGE_HEAP_NO_USER_LOW)
* PAGE_ZIP_CLUST_LEAF_SLOT_SIZE;
field = rec_get_nth_field(rec, offsets, n, &len);
externs -= (blob_no + 1) * BTR_EXTERN_FIELD_REF_SIZE;
field += len - BTR_EXTERN_FIELD_REF_SIZE;
mtr->zmemcpy<mtr_t::MAYBE_NOP>(*block, externs, field,
BTR_EXTERN_FIELD_REF_SIZE);
#ifdef UNIV_ZIP_DEBUG
ut_a(page_zip_validate(page_zip, page, index));
#endif /* UNIV_ZIP_DEBUG */
}
|
O0
|
cpp
|
page_zip_write_blob_ptr(buf_block_t*, unsigned char const*, dict_index_t*, unsigned short const*, unsigned long, mtr_t*):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x50(%rbp)
jmp 0x116918d
jmp 0x116918f
jmp 0x1169191
jmp 0x1169193
jmp 0x1169195
jmp 0x1169197
jmp 0x1169199
jmp 0x116919b
jmp 0x116919d
jmp 0x116919f
jmp 0x11691a1
jmp 0x11691a3
jmp 0x11691a5
jmp 0x11691a7
jmp 0x11691a9
jmp 0x11691ab
jmp 0x11691ad
jmp 0x11691af
jmp 0x11691b1
jmp 0x11691b3
jmp 0x11691b5
jmp 0x11691b7
jmp 0x11691b9
jmp 0x11691bb
jmp 0x11691bd
jmp 0x11691bf
jmp 0x11691c1
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1169300
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x117b6a0
movq %rax, %rcx
movq -0x68(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrl $0x11, %ecx
andl $0xfff, %ecx # imm = 0xFFF
movl %ecx, %ecx
cmpq %rcx, %rax
setb %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1169219
jmp 0x1169231
leaq 0x3253b0(%rip), %rdi # 0x148e5d0
leaq 0x325144(%rip), %rsi # 0x148e36b
movl $0xf1d, %edx # imm = 0xF1D
callq 0x1229220
jmp 0x1169233
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rdi
callq 0x1166eb0
movq %rax, %rcx
movq -0x80(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rdi
callq 0x1166dc0
movw %ax, %cx
movq -0x78(%rbp), %rax
movzwl %cx, %ecx
subl $0x2, %ecx
imull $0xf, %ecx, %ecx
movl %ecx, %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x1169040
movw %ax, %cx
movq -0x70(%rbp), %rax
movzwl %cx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x58(%rbp), %rax
addq $0x1, %rax
imulq $0x14, %rax, %rdx
movq -0x40(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x60(%rbp), %rax
subq $0x14, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x14, %r8d
callq 0x116dac0
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_Z23page_zip_write_blob_ptrP11buf_block_tPKhP12dict_index_tPKtmP5mtr_t:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
add rax, 38h ; '8'
mov [rbp+var_50], rax
jmp short $+2
loc_116918D:
jmp short $+2
loc_116918F:
jmp short $+2
loc_1169191:
jmp short $+2
loc_1169193:
jmp short $+2
loc_1169195:
jmp short $+2
loc_1169197:
jmp short $+2
loc_1169199:
jmp short $+2
loc_116919B:
jmp short $+2
loc_116919D:
jmp short $+2
loc_116919F:
jmp short $+2
loc_11691A1:
jmp short $+2
loc_11691A3:
jmp short $+2
loc_11691A5:
jmp short $+2
loc_11691A7:
jmp short $+2
loc_11691A9:
jmp short $+2
loc_11691AB:
jmp short $+2
loc_11691AD:
jmp short $+2
loc_11691AF:
jmp short $+2
loc_11691B1:
jmp short $+2
loc_11691B3:
jmp short $+2
loc_11691B5:
jmp short $+2
loc_11691B7:
jmp short $+2
loc_11691B9:
jmp short $+2
loc_11691BB:
jmp short $+2
loc_11691BD:
jmp short $+2
loc_11691BF:
jmp short $+2
loc_11691C1:
mov rdi, [rbp+var_50]; page_zip_des_t *
mov rsi, [rbp+var_10]; unsigned __int8 *
mov rdx, [rbp+var_18]; dict_index_t *
call _ZL26page_zip_get_n_prev_externPK14page_zip_des_tPKhPK12dict_index_t; page_zip_get_n_prev_extern(page_zip_des_t const*,uchar const*,dict_index_t const*)
mov [rbp+var_68], rax
mov rdi, [rbp+var_10]; unsigned __int8 *
mov rsi, [rbp+var_18]; dict_index_t *
mov rdx, [rbp+var_28]; unsigned __int64
call _Z20rec_get_n_extern_newPKhPK12dict_index_tm; rec_get_n_extern_new(uchar const*,dict_index_t const*,ulong)
mov rcx, rax
mov rax, [rbp+var_68]
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
mov ecx, [rcx+8]
shr ecx, 11h
and ecx, 0FFFh
mov ecx, ecx
cmp rax, rcx
setb al
xor al, 0FFh
test al, 1
jnz short loc_1169219
jmp short loc_1169231
loc_1169219:
lea rdi, aBlobNoPageZipN; "blob_no < page_zip->n_blobs"
lea rsi, aWorkspaceLlm4b_261; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0F1Dh; unsigned int
call _Z23ut_dbg_assertion_failedPKcS0_j; ut_dbg_assertion_failed(char const*,char const*,uint)
loc_1169231:
jmp short $+2
loc_1169233:
mov rax, [rbp+var_50]
mov rax, [rax]
mov [rbp+var_80], rax
mov rdi, [rbp+var_50]
call _ZL17page_zip_get_sizePK14page_zip_des_t_3; page_zip_get_size(page_zip_des_t const*)
mov rcx, rax
mov rax, [rbp+var_80]
add rax, rcx
mov [rbp+var_78], rax
mov rdi, [rbp+var_48]; unsigned __int8 *
call _ZL19page_dir_get_n_heapPKh_2; page_dir_get_n_heap(uchar const*)
mov cx, ax
mov rax, [rbp+var_78]
movzx ecx, cx
sub ecx, 2
imul ecx, 0Fh
mov ecx, ecx
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov [rbp+var_70], rax
mov rdi, [rbp+var_20]; unsigned __int16 *
mov rsi, [rbp+var_28]; unsigned __int64
lea rdx, [rbp+var_60]; unsigned __int64 *
call _ZL22rec_get_nth_field_offsPKtmPm_4; rec_get_nth_field_offs(ushort const*,ulong,ulong *)
mov cx, ax
mov rax, [rbp+var_70]
movzx ecx, cx
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_58]
add rax, 1
imul rdx, rax, 14h
mov rax, [rbp+var_40]
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_60]
sub rax, 14h
add rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_8]
mov rdx, [rbp+var_40]
mov rcx, [rbp+var_38]
mov r8d, 14h
call _ZN5mtr_t7zmemcpyILNS_10write_typeE1EEEvRK11buf_block_tPvPKvm; mtr_t::zmemcpy<(mtr_t::write_type)1>(buf_block_t const&,void *,void const*,ulong)
add rsp, 80h
pop rbp
retn
|
long long page_zip_write_blob_ptr(
unsigned __int8 **a1,
unsigned __int8 *a2,
dict_index_t *a3,
unsigned __int16 *a4,
unsigned long long a5,
mtr_t *a6)
{
unsigned __int16 nth_field_offs; // ax
long long v8; // [rsp+0h] [rbp-80h]
long long v9; // [rsp+8h] [rbp-78h]
unsigned __int8 *v10; // [rsp+10h] [rbp-70h]
long long n_prev_extern; // [rsp+18h] [rbp-68h]
unsigned long long v12; // [rsp+20h] [rbp-60h] BYREF
unsigned long long v13; // [rsp+28h] [rbp-58h]
page_zip_des_t *v14; // [rsp+30h] [rbp-50h]
unsigned __int8 *v15; // [rsp+38h] [rbp-48h]
long long v16; // [rsp+40h] [rbp-40h]
mtr_t *v17; // [rsp+50h] [rbp-30h]
unsigned long long v18; // [rsp+58h] [rbp-28h]
unsigned __int16 *v19; // [rsp+60h] [rbp-20h]
dict_index_t *v20; // [rsp+68h] [rbp-18h]
unsigned __int8 *v21; // [rsp+70h] [rbp-10h]
buf_block_t *v22; // [rsp+78h] [rbp-8h]
v22 = (buf_block_t *)a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
v15 = a1[6];
v14 = (page_zip_des_t *)(a1 + 7);
n_prev_extern = page_zip_get_n_prev_extern((const page_zip_des_t *)(a1 + 7), a2, a3);
v13 = rec_get_n_extern_new(a2, v20, v18) + n_prev_extern;
if ( v13 >= ((*((_DWORD *)a1 + 16) >> 17) & 0xFFFu) )
ut_dbg_assertion_failed(
"blob_no < page_zip->n_blobs",
"/workspace/llm4binary/github2025/eloqsql/storage/innobase/page/page0zip.cc",
0xF1Du);
v8 = *(_QWORD *)v14;
v9 = page_zip_get_size(v14) + v8;
v16 = v9 - 15 * ((unsigned int)(unsigned __int16)page_dir_get_n_heap(v15) - 2);
v10 = v21;
nth_field_offs = rec_get_nth_field_offs(v19, v18, &v12);
return mtr_t::zmemcpy<(mtr_t::write_type)1>(v17, v22, -20LL * (v13 + 1) + v16, &v10[nth_field_offs - 20 + v12], 20LL);
}
|
fil_space_read_crypt_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x220
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x190],RDI
MOV qword ptr [RBP + -0x198],RSI
MOV RDI,qword ptr [RBP + -0x190]
CALL 0x0116dda0
ADD RAX,0x26
MOV qword ptr [RBP + -0x1a0],RAX
MOV RDI,qword ptr [RBP + -0x198]
ADD RDI,qword ptr [RBP + -0x1a0]
LEA RSI,[0x16e5724]
MOV EDX,0x6
CALL 0x00876100
CMP EAX,0x0
JZ 0x011691c1
MOV qword ptr [RBP + -0x188],0x0
JMP 0x01169452
LAB_011691c1:
MOV RDI,qword ptr [RBP + -0x198]
ADD RDI,qword ptr [RBP + -0x1a0]
ADD RDI,0x6
CALL 0x011694c0
MOV byte ptr [RBP + -0x1a1],AL
MOV RDI,qword ptr [RBP + -0x198]
ADD RDI,qword ptr [RBP + -0x1a0]
ADD RDI,0x6
ADD RDI,0x1
CALL 0x011694c0
MOV byte ptr [RBP + -0x1a2],AL
MOVZX EAX,byte ptr [RBP + -0x1a1]
CMP EAX,0x0
JZ 0x01169217
MOVZX EAX,byte ptr [RBP + -0x1a1]
CMP EAX,0x1
JNZ 0x01169228
LAB_01169217:
MOVZX EAX,byte ptr [RBP + -0x1a2]
CMP RAX,0x10
JZ 0x0116934e
LAB_01169228:
LEA RDI,[RBP + -0x180]
MOV qword ptr [RBP + -0x1e0],RDI
XOR ESI,ESI
MOV EDX,0x178
CALL 0x008754f0
MOV RDI,qword ptr [RBP + -0x1e0]
CALL 0x008fe6b0
MOV RDI,qword ptr [RBP + -0x1e0]
LAB_01169255:
LEA RSI,[0x157d477]
CALL 0x01113140
MOV qword ptr [RBP + -0x1d8],RAX
JMP 0x0116926a
LAB_0116926a:
MOV RDI,qword ptr [RBP + -0x1d8]
LEA RSI,[RBP + -0x1a1]
CALL 0x0116dee0
MOV qword ptr [RBP + -0x1e8],RAX
JMP 0x01169286
LAB_01169286:
MOV RDI,qword ptr [RBP + -0x1e8]
LEA RSI,[0x150b4a1]
CALL 0x01113170
MOV qword ptr [RBP + -0x1f0],RAX
JMP 0x011692a2
LAB_011692a2:
MOV RDI,qword ptr [RBP + -0x1f0]
LEA RSI,[RBP + -0x1a2]
CALL 0x0116dee0
MOV qword ptr [RBP + -0x1f8],RAX
JMP 0x011692be
LAB_011692be:
MOV RDI,qword ptr [RBP + -0x1f8]
LEA RSI,[0x157d499]
CALL 0x01112a00
MOV qword ptr [RBP + -0x200],RAX
JMP 0x011692da
LAB_011692da:
MOV RDI,qword ptr [RBP + -0x198]
CALL 0x011694d0
MOV dword ptr [RBP + -0x204],EAX
JMP 0x011692ee
LAB_011692ee:
MOV RDI,qword ptr [RBP + -0x200]
MOV EAX,dword ptr [RBP + -0x204]
MOV dword ptr [RBP + -0x1c0],EAX
LEA RSI,[RBP + -0x1c0]
CALL 0x01111de0
LAB_0116930d:
JMP 0x0116930f
LAB_0116930f:
LEA RDI,[RBP + -0x180]
CALL 0x0132c110
MOV qword ptr [RBP + -0x188],0x0
JMP 0x01169452
LAB_0116934e:
MOV RDI,qword ptr [RBP + -0x198]
ADD RDI,qword ptr [RBP + -0x1a0]
ADD RDI,0x6
ADD RDI,0x2
MOVZX EAX,byte ptr [RBP + -0x1a2]
CDQE
ADD RDI,RAX
CALL 0x01169500
MOV dword ptr [RBP + -0x1c4],EAX
MOV RDI,qword ptr [RBP + -0x198]
ADD RDI,qword ptr [RBP + -0x1a0]
ADD RDI,0x6
ADD RDI,0x2
MOVZX EAX,byte ptr [RBP + -0x1a2]
CDQE
ADD RDI,RAX
ADD RDI,0x4
CALL 0x01169500
MOV dword ptr [RBP + -0x1c8],EAX
MOV RDI,qword ptr [RBP + -0x198]
ADD RDI,qword ptr [RBP + -0x1a0]
ADD RDI,0x6
ADD RDI,0x2
MOVZX EAX,byte ptr [RBP + -0x1a2]
CDQE
ADD RDI,RAX
ADD RDI,0x8
CALL 0x011694c0
MOVZX EAX,AL
MOV dword ptr [RBP + -0x1cc],EAX
MOV EDI,dword ptr [RBP + -0x1cc]
MOV ESI,dword ptr [RBP + -0x1c8]
CALL 0x01169090
MOV qword ptr [RBP + -0x1b0],RAX
MOVZX ECX,byte ptr [RBP + -0x1a1]
MOV RAX,qword ptr [RBP + -0x1b0]
MOV dword ptr [RAX + 0x54],ECX
MOV ECX,dword ptr [RBP + -0x1c4]
MOV RAX,qword ptr [RBP + -0x1b0]
MOV dword ptr [RAX + 0x60],ECX
MOV RDI,qword ptr [RBP + -0x1b0]
MOV RSI,qword ptr [RBP + -0x198]
ADD RSI,qword ptr [RBP + -0x1a0]
ADD RSI,0x6
ADD RSI,0x2
MOVZX EAX,byte ptr [RBP + -0x1a2]
MOV EDX,EAX
CALL 0x00876440
MOV RAX,qword ptr [RBP + -0x1b0]
MOV qword ptr [RBP + -0x188],RAX
LAB_01169452:
MOV RAX,qword ptr [RBP + -0x188]
MOV qword ptr [RBP + -0x210],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x011694ae
MOV RAX,qword ptr [RBP + -0x210]
ADD RSP,0x220
POP RBP
RET
LAB_011694ae:
CALL 0x008754c0
|
/* fil_space_read_crypt_data(unsigned long, unsigned char const*) */
void * fil_space_read_crypt_data(ulong param_1,uchar *param_2)
{
int1 uVar1;
int iVar2;
int4 uVar3;
int4 uVar4;
logger *plVar5;
long in_FS_OFFSET;
uint local_1c8 [4];
void *local_1b8;
byte local_1aa;
byte local_1a9;
long local_1a8;
uchar *local_1a0;
ulong local_198;
void *local_190;
error local_188 [376];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_1a0 = param_2;
local_198 = param_1;
local_1a8 = fsp_header_get_encryption_offset(param_1);
local_1a8 = local_1a8 + 0x26;
iVar2 = memcmp(local_1a0 + local_1a8,&CRYPT_MAGIC,6);
if (iVar2 == 0) {
local_1a9 = mach_read_from_1(local_1a0 + local_1a8 + 6);
local_1aa = mach_read_from_1(local_1a0 + local_1a8 + 7);
if (((local_1a9 == 0) || (local_1a9 == 1)) && (local_1aa == 0x10)) {
uVar3 = mach_read_from_4(local_1a0 + local_1a8 + 0x18);
uVar4 = mach_read_from_4(local_1a0 + (int)(uint)local_1aa + local_1a8 + 0xc);
uVar1 = mach_read_from_1(local_1a0 + (int)(uint)local_1aa + local_1a8 + 0x10);
local_1b8 = (void *)fil_space_create_crypt_data(uVar1,uVar4);
*(uint *)((long)local_1b8 + 0x54) = (uint)local_1a9;
*(int4 *)((long)local_1b8 + 0x60) = uVar3;
memcpy(local_1b8,local_1a0 + local_1a8 + 8,(ulong)local_1aa);
local_190 = local_1b8;
}
else {
memset(local_188,0,0x178);
ib::error::error(local_188);
/* try { // try from 01169255 to 0116930c has its CatchHandler @ 0116932b */
plVar5 = ib::logger::operator<<((logger *)local_188,"Found non sensible crypt scheme: ");
plVar5 = ib::logger::operator<<(plVar5,&local_1a9);
plVar5 = ib::logger::operator<<(plVar5,",");
plVar5 = ib::logger::operator<<(plVar5,&local_1aa);
plVar5 = ib::logger::operator<<(plVar5," for space: ");
local_1c8[0] = page_get_space_id(local_1a0);
ib::logger::operator<<(plVar5,local_1c8);
ib::error::~error(local_188);
local_190 = (void *)0x0;
}
}
else {
local_190 = (void *)0x0;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_190;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
18,747
|
page_zip_write_blob_ptr(buf_block_t*, unsigned char const*, dict_index_t*, unsigned short const*, unsigned long, mtr_t*)
|
eloqsql/storage/innobase/page/page0zip.cc
|
void
page_zip_write_blob_ptr(
/*====================*/
buf_block_t* block, /*!< in/out: ROW_FORMAT=COMPRESSED page */
const byte* rec, /*!< in/out: record whose data is being
written */
dict_index_t* index, /*!< in: index of the page */
const rec_offs* offsets,/*!< in: rec_get_offsets(rec, index) */
ulint n, /*!< in: column index */
mtr_t* mtr) /*!< in/out: mini-transaction */
{
const byte* field;
byte* externs;
const page_t* const page = block->page.frame;
page_zip_des_t* const page_zip = &block->page.zip;
ulint blob_no;
ulint len;
ut_ad(page_align(rec) == page);
ut_ad(index != NULL);
ut_ad(offsets != NULL);
ut_ad(page_simple_validate_new((page_t*) page));
ut_ad(page_zip_simple_validate(page_zip));
ut_ad(page_zip_get_size(page_zip)
> PAGE_DATA + page_zip_dir_size(page_zip));
ut_ad(rec_offs_comp(offsets));
ut_ad(rec_offs_validate(rec, NULL, offsets));
ut_ad(rec_offs_any_extern(offsets));
ut_ad(rec_offs_nth_extern(offsets, n));
ut_ad(page_zip->m_start >= PAGE_DATA);
ut_ad(page_zip_header_cmp(page_zip, page));
ut_ad(page_is_leaf(page));
ut_ad(dict_index_is_clust(index));
MEM_CHECK_DEFINED(page_zip->data, page_zip_get_size(page_zip));
MEM_CHECK_DEFINED(rec, rec_offs_data_size(offsets));
MEM_CHECK_DEFINED(rec - rec_offs_extra_size(offsets),
rec_offs_extra_size(offsets));
blob_no = page_zip_get_n_prev_extern(page_zip, rec, index)
+ rec_get_n_extern_new(rec, index, n);
ut_a(blob_no < page_zip->n_blobs);
externs = page_zip->data + page_zip_get_size(page_zip)
- (page_dir_get_n_heap(page) - PAGE_HEAP_NO_USER_LOW)
* PAGE_ZIP_CLUST_LEAF_SLOT_SIZE;
field = rec_get_nth_field(rec, offsets, n, &len);
externs -= (blob_no + 1) * BTR_EXTERN_FIELD_REF_SIZE;
field += len - BTR_EXTERN_FIELD_REF_SIZE;
mtr->zmemcpy<mtr_t::MAYBE_NOP>(*block, externs, field,
BTR_EXTERN_FIELD_REF_SIZE);
#ifdef UNIV_ZIP_DEBUG
ut_a(page_zip_validate(page_zip, page, index));
#endif /* UNIV_ZIP_DEBUG */
}
|
O3
|
cpp
|
page_zip_write_blob_ptr(buf_block_t*, unsigned char const*, dict_index_t*, unsigned short const*, unsigned long, mtr_t*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x58(%rbp)
movq %r8, %r13
movq %rcx, -0x30(%rbp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq 0x30(%rdi), %rax
movq %rax, -0x40(%rbp)
addq $0x38, %rdi
movq %rdi, -0x38(%rbp)
callq 0xc033b4
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xc0a498
movq %rax, %r15
addq %rbx, %r15
movq %r14, -0x50(%rbp)
movl 0x40(%r14), %edx
movl %edx, %eax
shrl $0x11, %eax
andl $0xfff, %eax # imm = 0xFFF
cmpq %rax, %r15
jae 0xc033af
movl %edx, %ecx
shrl $0x1d, %ecx
movl $0x200, %ebx # imm = 0x200
shll %cl, %ebx
xorl %eax, %eax
cmpl $0x20000000, %edx # imm = 0x20000000
cmovbl %eax, %ebx
testq %r13, %r13
je 0xc03235
movq -0x30(%rbp), %rsi
movzwl 0x4(%rsi,%r13,2), %eax
andl $0x3fff, %eax # imm = 0x3FFF
jmp 0xc03239
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rcx
movq (%rcx), %r14
movq -0x40(%rbp), %rdx
movb 0x2a(%rdx), %cl
movzbl 0x2b(%rdx), %r8d
movl $0xfffffffe, %edx # imm = 0xFFFFFFFE
movzwl 0x6(%rsi,%r13,2), %esi
movl %esi, %edi
andl $0xc000, %edi # imm = 0xC000
cmpl $0x8000, %edi # imm = 0x8000
je 0xc0327d
cmpl $0xc000, %edi # imm = 0xC000
je 0xc03280
andl $0x3fff, %esi # imm = 0x3FFF
subq %rax, %rsi
movq %rsi, %rdx
jmp 0xc03280
incq %rdx
addq %rax, %r12
leaq (%rdx,%r12), %rsi
addq $-0x14, %rsi
movzbl %cl, %eax
andl $0x7f, %eax
imull $0xf00, %eax, %r10d # imm = 0xF00
leal (%r8,%r8,4), %eax
leal (%rax,%rax,2), %eax
addl %r10d, %eax
addl $-0x1e, %eax
movq %rbx, %rcx
subq %rax, %rcx
leaq (,%r15,4), %rax
leaq (%rax,%rax,4), %r9
subq %r9, %rcx
leaq (%rcx,%r14), %rax
addq $-0x14, %rax
xorl %r13d, %r13d
movb (%rax,%r13), %cl
cmpb (%rsi,%r13), %cl
jne 0xc032dd
incq %r13
cmpq $0x14, %r13
jne 0xc032c5
jmp 0xc033a0
leaq -0x14(%rbx), %rdi
leal (%r8,%r8,4), %eax
leal (%rax,%rax,2), %eax
addl %r10d, %eax
addl $-0x1e, %eax
movq %rax, -0x30(%rbp)
subq %rax, %rdi
subq %r9, %rdi
addq %r14, %rdi
addq %r13, %rdi
movl $0x14, %edx
subq %r13, %rdx
movq %rdx, -0x40(%rbp)
addq %r13, %rsi
movq %r10, %r12
movq %r8, -0x48(%rbp)
movq %r9, -0x38(%rbp)
callq 0x6281d0
movq -0x50(%rbp), %rsi
movl 0x38(%rsi), %eax
leaq (%rbx,%r14), %rcx
addq $-0x14, %rcx
movq -0x48(%rbp), %r9
leal (%r9,%r9,4), %edx
leal (%rdx,%rdx,2), %edx
addl %r12d, %edx
movq %r12, %r8
movl %ecx, %r12d
subl %edx, %r12d
movq -0x38(%rbp), %rdi
subl %edi, %r12d
subl %eax, %r12d
addl %r13d, %r12d
addl %ebx, %r14d
leal (%r9,%r9,4), %edx
leal (%rdx,%rdx,2), %edx
subl %edx, %r14d
shll $0x2, %r15d
leal (%r15,%r15,4), %edx
subl %edx, %r14d
subl %r8d, %r14d
subl %eax, %r14d
leal (%r14,%r13), %eax
addl $0xa, %eax
subq -0x30(%rbp), %rcx
subq %rdi, %rcx
addq %r13, %rcx
movzwl %ax, %edx
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
movq -0x40(%rbp), %r14
movq %r14, %r8
callq 0xb547a2
leal (%r14,%r12), %eax
addl $0x1e, %eax
movw %ax, 0x8(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6866f7
|
_Z23page_zip_write_blob_ptrP11buf_block_tPKhP12dict_index_tPKtmP5mtr_t:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_58], r9
mov r13, r8
mov [rbp+var_30], rcx
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rax, [rdi+30h]
mov [rbp+var_40], rax
add rdi, 38h ; '8'
mov [rbp+var_38], rdi
call _ZL26page_zip_get_n_prev_externPK14page_zip_des_tPKhPK12dict_index_t; page_zip_get_n_prev_extern(page_zip_des_t const*,uchar const*,dict_index_t const*)
mov rbx, rax
mov rdi, r12; unsigned __int8 *
mov rsi, r15; dict_index_t *
mov rdx, r13; unsigned __int64
call _Z20rec_get_n_extern_newPKhPK12dict_index_tm; rec_get_n_extern_new(uchar const*,dict_index_t const*,ulong)
mov r15, rax
add r15, rbx
mov [rbp+var_50], r14
mov edx, [r14+40h]
mov eax, edx
shr eax, 11h
and eax, 0FFFh
cmp r15, rax
jnb loc_C033AF
mov ecx, edx
shr ecx, 1Dh
mov ebx, 200h
shl ebx, cl
xor eax, eax
cmp edx, 20000000h
cmovb ebx, eax
test r13, r13
jz short loc_C03235
mov rsi, [rbp+var_30]
movzx eax, word ptr [rsi+r13*2+4]
and eax, 3FFFh
jmp short loc_C03239
loc_C03235:
mov rsi, [rbp+var_30]
loc_C03239:
mov rcx, [rbp+var_38]
mov r14, [rcx]
mov rdx, [rbp+var_40]
mov cl, [rdx+2Ah]
movzx r8d, byte ptr [rdx+2Bh]
mov edx, 0FFFFFFFEh
movzx esi, word ptr [rsi+r13*2+6]
mov edi, esi
and edi, 0C000h
cmp edi, 8000h
jz short loc_C0327D
cmp edi, 0C000h
jz short loc_C03280
and esi, 3FFFh
sub rsi, rax
mov rdx, rsi
jmp short loc_C03280
loc_C0327D:
inc rdx
loc_C03280:
add r12, rax
lea rsi, [rdx+r12]
add rsi, 0FFFFFFFFFFFFFFECh
movzx eax, cl
and eax, 7Fh
imul r10d, eax, 0F00h
lea eax, [r8+r8*4]
lea eax, [rax+rax*2]
add eax, r10d
add eax, 0FFFFFFE2h
mov rcx, rbx
sub rcx, rax
lea rax, ds:0[r15*4]
lea r9, [rax+rax*4]
sub rcx, r9
lea rax, [rcx+r14]
add rax, 0FFFFFFFFFFFFFFECh
xor r13d, r13d
loc_C032C5:
mov cl, [rax+r13]
cmp cl, [rsi+r13]
jnz short loc_C032DD
inc r13
cmp r13, 14h
jnz short loc_C032C5
jmp loc_C033A0
loc_C032DD:
lea rdi, [rbx-14h]
lea eax, [r8+r8*4]
lea eax, [rax+rax*2]
add eax, r10d
add eax, 0FFFFFFE2h
mov [rbp+var_30], rax
sub rdi, rax
sub rdi, r9
add rdi, r14
add rdi, r13
mov edx, 14h
sub rdx, r13
mov [rbp+var_40], rdx
add rsi, r13
mov r12, r10
mov [rbp+var_48], r8
mov [rbp+var_38], r9
call _memcpy
mov rsi, [rbp+var_50]
mov eax, [rsi+38h]
lea rcx, [rbx+r14]
add rcx, 0FFFFFFFFFFFFFFECh
mov r9, [rbp+var_48]
lea edx, [r9+r9*4]
lea edx, [rdx+rdx*2]
add edx, r12d
mov r8, r12
mov r12d, ecx
sub r12d, edx
mov rdi, [rbp+var_38]
sub r12d, edi
sub r12d, eax
add r12d, r13d
add r14d, ebx
lea edx, [r9+r9*4]
lea edx, [rdx+rdx*2]
sub r14d, edx
shl r15d, 2
lea edx, [r15+r15*4]
sub r14d, edx
sub r14d, r8d
sub r14d, eax
lea eax, [r14+r13]
add eax, 0Ah
sub rcx, [rbp+var_30]
sub rcx, rdi
add rcx, r13
movzx edx, ax
mov rbx, [rbp+var_58]
mov rdi, rbx
mov r14, [rbp+var_40]
mov r8, r14
call _ZN5mtr_t10memcpy_lowERK11buf_block_ttPKvm; mtr_t::memcpy_low(buf_block_t const&,ushort,void const*,ulong)
lea eax, [r14+r12]
add eax, 1Eh
mov [rbx+8], ax
loc_C033A0:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C033AF:
call _Z23page_zip_write_blob_ptrP11buf_block_tPKhP12dict_index_tPKtmP5mtr_t_cold_1; page_zip_write_blob_ptr(buf_block_t *,uchar const*,dict_index_t *,ushort const*,ulong,mtr_t *) [clone]
|
long long page_zip_write_blob_ptr(
long long a1,
const unsigned __int8 *a2,
const dict_index_t *a3,
long long a4,
unsigned long long a5,
long long a6)
{
long long n_prev_extern; // rbx
unsigned long long v9; // r15
unsigned int v10; // edx
long long v11; // rbx
long long v12; // rax
long long v13; // r14
int v14; // r8d
long long v15; // rdx
int v16; // edi
long long v17; // rsi
int v18; // r10d
long long result; // rax
long long v20; // r13
int v21; // r12d
int v22; // eax
__int16 v23; // r8
int v24; // r12d
int v27; // [rsp+18h] [rbp-48h]
long long v28; // [rsp+20h] [rbp-40h]
long long v30; // [rsp+30h] [rbp-30h]
v28 = *(_QWORD *)(a1 + 48);
n_prev_extern = page_zip_get_n_prev_extern(a1 + 56, a2);
v9 = n_prev_extern + rec_get_n_extern_new(a2, a3, a5);
v10 = *(_DWORD *)(a1 + 64);
if ( v9 >= ((v10 >> 17) & 0xFFF) )
page_zip_write_blob_ptr();
v11 = (unsigned int)(512 << (v10 >> 29));
v12 = 0LL;
if ( v10 < 0x20000000 )
v11 = 0LL;
if ( a5 )
v12 = *(_WORD *)(a4 + 2 * a5 + 4) & 0x3FFF;
v13 = *(_QWORD *)(a1 + 56);
v14 = *(unsigned __int8 *)(v28 + 43);
v15 = 4294967294LL;
v16 = *(_WORD *)(a4 + 2 * a5 + 6) & 0xC000;
if ( v16 == 0x8000 )
{
v15 = 0xFFFFFFFFLL;
}
else if ( v16 != 49152 )
{
v15 = (*(_WORD *)(a4 + 2 * a5 + 6) & 0x3FFF) - v12;
}
v17 = (long long)&a2[v12 - 20 + v15];
v18 = 3840 * (*(_BYTE *)(v28 + 42) & 0x7F);
result = v11 - (unsigned int)(v18 + 15 * v14 - 30) - 20 * v9 + v13 - 20;
v20 = 0LL;
while ( *(_BYTE *)(result + v20) == *(_BYTE *)(v17 + v20) )
{
if ( ++v20 == 20 )
return result;
}
v30 = (unsigned int)(v18 + 15 * v14 - 30);
v21 = 3840 * (*(_BYTE *)(v28 + 42) & 0x7F);
v27 = *(unsigned __int8 *)(v28 + 43);
memcpy(v20 + v13 + v11 - 20 - v30 - 20 * v9, v20 + v17, 20 - v20);
v22 = *(_DWORD *)(a1 + 56);
v23 = v21;
v24 = v20 + v11 + v13 - 20 - (v21 + 15 * v27) - 20 * v9 - v22;
mtr_t::memcpy_low(
a6,
(_QWORD *)a1,
v11 + v13 - 15 * v27 - 20 * v9 - v23 - v22 + v20 + 10,
(const unsigned __int8 *)(v20 + v11 + v13 - 20 - v30 - 20 * v9),
20 - v20);
result = (unsigned int)(20 - v20 + v24 + 30);
*(_WORD *)(a6 + 8) = 20 - v20 + v24 + 30;
return result;
}
| |||
18,748
|
my_rw_wrlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_wrlock(my_rw_lock_t *rwp)
{
pthread_mutex_lock(&rwp->lock);
rwp->waiters++; /* another writer queued */
my_rw_lock_assert_not_write_owner(rwp);
while (rwp->state)
pthread_cond_wait(&rwp->writers, &rwp->lock);
rwp->state = -1;
rwp->waiters--;
#ifdef SAFE_MUTEX
rwp->write_thread= pthread_self();
#endif
pthread_mutex_unlock(&rwp->lock);
return(0);
}
|
O3
|
c
|
my_rw_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x264d0
movl 0x8c(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbx)
cmpl $0x0, 0x88(%rbx)
je 0x4698c
leaq 0x58(%rbx), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26550
cmpl $0x0, 0x88(%rbx)
jne 0x46970
movl 0x8c(%rbx), %eax
decl %eax
movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF
movl %eax, 0x8c(%rbx)
movq %rbx, %rdi
callq 0x26250
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
my_rw_wrlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov eax, [rbx+8Ch]
lea ecx, [rax+1]
mov [rbx+8Ch], ecx
cmp dword ptr [rbx+88h], 0
jz short loc_4698C
lea r14, [rbx+58h]
loc_46970:
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
cmp dword ptr [rbx+88h], 0
jnz short loc_46970
mov eax, [rbx+8Ch]
dec eax
loc_4698C:
mov dword ptr [rbx+88h], 0FFFFFFFFh
mov [rbx+8Ch], eax
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
pop rbx
pop r14
pop rbp
retn
|
long long my_rw_wrlock(long long a1)
{
int v1; // eax
pthread_mutex_lock(a1);
v1 = *(_DWORD *)(a1 + 140);
*(_DWORD *)(a1 + 140) = v1 + 1;
if ( *(_DWORD *)(a1 + 136) )
{
do
pthread_cond_wait(a1 + 88, a1);
while ( *(_DWORD *)(a1 + 136) );
v1 = *(_DWORD *)(a1 + 140) - 1;
}
*(_DWORD *)(a1 + 136) = -1;
*(_DWORD *)(a1 + 140) = v1;
pthread_mutex_unlock(a1);
return 0LL;
}
|
my_rw_wrlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x001264d0
MOV EAX,dword ptr [RBX + 0x8c]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x8c],ECX
CMP dword ptr [RBX + 0x88],0x0
JZ 0x0014698c
LEA R14,[RBX + 0x58]
LAB_00146970:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00126550
CMP dword ptr [RBX + 0x88],0x0
JNZ 0x00146970
MOV EAX,dword ptr [RBX + 0x8c]
DEC EAX
LAB_0014698c:
MOV dword ptr [RBX + 0x88],0xffffffff
MOV dword ptr [RBX + 0x8c],EAX
MOV RDI,RBX
CALL 0x00126250
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_wrlock(pthread_mutex_t *param_1)
{
int iVar1;
pthread_mutex_lock(param_1);
iVar1 = *(int *)((long)param_1 + 0x8c);
*(int *)((long)param_1 + 0x8c) = iVar1 + 1;
if (*(int *)((long)param_1 + 0x88) != 0) {
do {
pthread_cond_wait((pthread_cond_t *)((long)param_1 + 0x58),param_1);
} while (*(int *)((long)param_1 + 0x88) != 0);
iVar1 = *(int *)((long)param_1 + 0x8c) + -1;
}
*(int4 *)((long)param_1 + 0x88) = 0xffffffff;
*(int *)((long)param_1 + 0x8c) = iVar1;
pthread_mutex_unlock(param_1);
return 0;
}
|
|
18,749
|
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>> const&) const
|
monkey531[P]llama/common/json.hpp
|
const_reference operator[](const typename object_t::key_type& key) const
{
// const operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto it = m_data.m_value.object->find(key);
JSON_ASSERT(it != m_data.m_value.object->end());
return it->second;
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x7fde4
movq 0x8(%r14), %rdi
callq 0x7fe88
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x7fe40
addq $0x20, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %r14, %rdi
callq 0x44c82
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3671a(%rip), %rsi # 0xb6520
leaq 0x10(%rsp), %rdi
callq 0x7fb77
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x648b8
xorl %ebp, %ebp
leaq 0x7d107(%rip), %rsi # 0xfcf38
leaq -0x3e626(%rip), %rdx # 0x41812
movq %rbx, %rdi
callq 0x23fb0
leaq 0x31595(%rip), %rdi # 0xb13dc
leaq 0x2b510(%rip), %rdx # 0xab35e
leaq 0x366fe(%rip), %rcx # 0xb6553
movl $0x53ca, %esi # imm = 0x53CA
xorl %eax, %eax
callq 0x23f60
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x242a8
testb %bpl, %bpl
jne 0x7fe78
jmp 0x7fe80
movq %rax, %r14
movq %rbx, %rdi
callq 0x23690
movq %r14, %rdi
callq 0x24030
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_7FDE4
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_; 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>>>>::find(std::string const&)
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_7FE40
add rax, 20h ; ' '
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_7FDE4:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
lea rdi, [rsp+48h+var_38]
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
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_7FE40:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aItMDataMValueO; "it != m_data.m_value.object->end()"
mov esi, 53CAh
xor eax, eax
call _ggml_abort
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7FE78
jmp short loc_7FE80
mov r14, rax
loc_7FE78:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7FE80:
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)
{
void *v1; // rbx
char v2; // bp
long long v3; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
long long v6; // r14
const char *v7; // [rsp+8h] [rbp-40h] BYREF
_BYTE v8[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(
(long long)v8,
(long long)"cannot use operator[] with a string argument with ",
&v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
(long long)v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::find(*(_QWORD *)(a1 + 8));
if ( v3 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v6 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
21450LL,
"GGML_ASSERT(%s) failed",
"it != m_data.m_value.object->end()");
std::string::~string(v8);
if ( v2 )
__cxa_free_exception(v1);
_Unwind_Resume(v6);
}
return v3 + 32;
}
|
operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0017fde4
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0017fe88
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0017fe40
ADD RAX,0x20
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0017fde4:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
MOV RDI,R14
CALL 0x00144c82
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0017fdff:
LEA RSI,[0x1b6520]
LEA RDI,[RSP + 0x10]
CALL 0x0017fb77
MOV BPL,0x1
LAB_0017fe13:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x001648b8
XOR EBP,EBP
LEA RSI,[0x1fcf38]
LEA RDX,[0x141812]
MOV RDI,RBX
CALL 0x00123fb0
LAB_0017fe40:
LEA RDI,[0x1b13dc]
LEA RDX,[0x1ab35e]
LEA RCX,[0x1b6553]
MOV ESI,0x53ca
XOR EAX,EAX
CALL 0x00123f60
|
/* 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 const&) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,string *param_1)
{
long lVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0017fdff to 0017fe0f has its CatchHandler @ 0017fe75 */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
(local_38,"cannot use operator[] with a string argument with ",&local_40);
/* try { // try from 0017fe13 to 0017fe3f has its CatchHandler @ 0017fe61 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
lVar1 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::find(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8),param_1);
if (lVar1 != *(long *)(*(long *)(this + 8) + 8)) {
return lVar1 + 0x20;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x53ca,
"GGML_ASSERT(%s) failed","it != m_data.m_value.object->end()");
}
|
|
18,750
|
wake_up_waiters
|
eloqsql/mysys/thr_lock.c
|
static void wake_up_waiters(THR_LOCK *lock)
{
THR_LOCK_DATA *data;
enum thr_lock_type lock_type;
DBUG_ENTER("wake_up_waiters");
check_locks(lock, "before waking up waiters", TL_UNLOCK, 1);
if (!lock->write.data) /* If no active write locks */
{
data=lock->write_wait.data;
if (!lock->read.data) /* If no more locks in use */
{
/* Release write-locks with TL_WRITE or TL_WRITE_ONLY priority first */
if (data &&
(data->type != TL_WRITE_LOW_PRIORITY || !lock->read_wait.data ||
lock->read_wait.data->type < TL_READ_HIGH_PRIORITY))
{
if (lock->write_lock_count++ > max_write_lock_count)
{
/* Too many write locks in a row; Release all waiting read locks */
lock->write_lock_count=0;
if (lock->read_wait.data)
{
DBUG_PRINT("info",("Freeing all read_locks because of max_write_lock_count"));
free_all_read_locks(lock,0);
goto end;
}
}
for (;;)
{
if (((*data->prev)=data->next)) /* remove from wait-list */
data->next->prev= data->prev;
else
lock->write_wait.last=data->prev;
(*lock->write.last)=data; /* Put in execute list */
data->prev=lock->write.last;
data->next=0;
lock->write.last= &data->next;
if (data->type == TL_WRITE_CONCURRENT_INSERT &&
(*lock->check_status)(data->status_param))
data->type=TL_WRITE; /* Upgrade lock */
/* purecov: begin inspected */
DBUG_PRINT("lock",("giving write lock of type %d to thread: %lu",
data->type, (ulong) data->owner->thread_id));
/* purecov: end */
{
mysql_cond_t *cond= data->cond;
data->cond=0; /* Mark thread free */
mysql_cond_signal(cond); /* Start waiting thread */
}
if (data->type != TL_WRITE_ALLOW_WRITE ||
!lock->write_wait.data ||
lock->write_wait.data->type != TL_WRITE_ALLOW_WRITE)
break;
data=lock->write_wait.data; /* Free this too */
}
if (data->type >= TL_WRITE_LOW_PRIORITY)
goto end;
/* Release possible read locks together with the write lock */
}
if (lock->read_wait.data)
free_all_read_locks(lock,
data &&
(data->type == TL_WRITE_CONCURRENT_INSERT ||
data->type == TL_WRITE_ALLOW_WRITE));
else
{
DBUG_PRINT("lock",("No waiting read locks to free"));
}
}
else if (data &&
(lock_type=data->type) <= TL_WRITE_DELAYED &&
((lock_type != TL_WRITE_CONCURRENT_INSERT &&
lock_type != TL_WRITE_ALLOW_WRITE) ||
!lock->read_no_write_count))
{
/*
For DELAYED, ALLOW_READ, WRITE_ALLOW_WRITE or CONCURRENT_INSERT locks
start WRITE locks together with the READ locks
*/
if (lock_type == TL_WRITE_CONCURRENT_INSERT &&
(*lock->check_status)(data->status_param))
{
data->type=TL_WRITE; /* Upgrade lock */
if (lock->read_wait.data)
free_all_read_locks(lock,0);
goto end;
}
do {
mysql_cond_t *cond= data->cond;
if (((*data->prev)=data->next)) /* remove from wait-list */
data->next->prev= data->prev;
else
lock->write_wait.last=data->prev;
(*lock->write.last)=data; /* Put in execute list */
data->prev=lock->write.last;
lock->write.last= &data->next;
data->next=0; /* Only one write lock */
data->cond=0; /* Mark thread free */
mysql_cond_signal(cond); /* Start waiting thread */
} while (lock_type == TL_WRITE_ALLOW_WRITE &&
(data=lock->write_wait.data) &&
data->type == TL_WRITE_ALLOW_WRITE);
if (lock->read_wait.data)
free_all_read_locks(lock,
(lock_type == TL_WRITE_CONCURRENT_INSERT ||
lock_type == TL_WRITE_ALLOW_WRITE));
}
else if (!data && lock->read_wait.data)
free_all_read_locks(lock,0);
}
end:
check_locks(lock, "after waking up waiters", TL_UNLOCK, 0);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
wake_up_waiters:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0x84381
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x841b5
cmpq $0x0, -0x10(%rbp)
je 0x84152
movq -0x10(%rbp), %rax
cmpl $0xb, 0x40(%rax)
jne 0x83fce
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x83fce
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
cmpl $0x4, 0x40(%rax)
jge 0x84152
movq -0x8(%rbp), %rcx
movq 0xa0(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0xa0(%rcx)
leaq 0x1b4b5a(%rip), %rcx # 0x238b48
cmpq (%rcx), %rax
jbe 0x84023
movq -0x8(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x84021
jmp 0x8400f
jmp 0x84011
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x859f0
jmp 0x84383
jmp 0x84023
jmp 0x84025
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x84054
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0x84067
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rcx
addq $0x8, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
cmpl $0x8, 0x40(%rax)
jne 0x840dd
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x840dd
movq -0x10(%rbp), %rax
movl $0xd, 0x40(%rax)
jmp 0x840df
jmp 0x840e1
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x20(%rbp), %rdi
callq 0x85070
movq -0x10(%rbp), %rax
cmpl $0x7, 0x40(%rax)
jne 0x8412b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x8412b
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
cmpl $0x7, 0x40(%rax)
je 0x8412d
jmp 0x84141
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x84025
movq -0x10(%rbp), %rax
cmpl $0xb, 0x40(%rax)
jl 0x84150
jmp 0x84383
jmp 0x84152
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x841aa
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x29(%rbp)
je 0x84194
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpl $0x8, 0x40(%rcx)
movb %al, -0x39(%rbp)
je 0x8418e
movq -0x10(%rbp), %rax
cmpl $0x7, 0x40(%rax)
sete %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
movb %al, -0x29(%rbp)
movq -0x38(%rbp), %rdi
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %esi
callq 0x859f0
jmp 0x841b0
jmp 0x841ac
jmp 0x841ae
jmp 0x841b0
jmp 0x8437f
cmpq $0x0, -0x10(%rbp)
je 0x8435e
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x9, %eax
jg 0x8435e
cmpl $0x8, -0x14(%rbp)
je 0x841df
cmpl $0x7, -0x14(%rbp)
jne 0x841f0
movq -0x8(%rbp), %rax
cmpl $0x0, 0xa8(%rax)
jne 0x8435e
cmpl $0x8, -0x14(%rbp)
jne 0x84239
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x84239
movq -0x10(%rbp), %rax
movl $0xd, 0x40(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x84234
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x859f0
jmp 0x84383
jmp 0x8423b
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x84276
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0x84289
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
addq $0x8, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x28(%rbp), %rdi
callq 0x85070
xorl %eax, %eax
cmpl $0x7, -0x14(%rbp)
movb %al, -0x3a(%rbp)
jne 0x84315
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rcx
movq %rcx, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x3a(%rbp)
je 0x84315
movq -0x10(%rbp), %rax
cmpl $0x7, 0x40(%rax)
sete %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
testb $0x1, %al
jne 0x8423b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x8435c
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movb $0x1, %al
cmpl $0x8, -0x14(%rbp)
movb %al, -0x3b(%rbp)
je 0x84348
cmpl $0x7, -0x14(%rbp)
sete %al
movb %al, -0x3b(%rbp)
movq -0x48(%rbp), %rdi
movb -0x3b(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %esi
callq 0x859f0
jmp 0x8437d
cmpq $0x0, -0x10(%rbp)
jne 0x8437b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x8437b
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x859f0
jmp 0x8437d
jmp 0x8437f
jmp 0x84381
jmp 0x84383
jmp 0x84385
jmp 0x84387
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
wake_up_waiters:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+90h], 0
jnz loc_84381
mov rax, [rbp+var_8]
mov rax, [rax+80h]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+70h], 0
jnz loc_841B5
cmp [rbp+var_10], 0
jz loc_84152
mov rax, [rbp+var_10]
cmp dword ptr [rax+40h], 0Bh
jnz short loc_83FCE
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_83FCE
mov rax, [rbp+var_8]
mov rax, [rax+60h]
cmp dword ptr [rax+40h], 4
jge loc_84152
loc_83FCE:
mov rcx, [rbp+var_8]
mov rax, [rcx+0A0h]
mov rdx, rax
add rdx, 1
mov [rcx+0A0h], rdx
lea rcx, max_write_lock_count
cmp rax, [rcx]
jbe short loc_84023
mov rax, [rbp+var_8]
mov qword ptr [rax+0A0h], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_84021
jmp short $+2
loc_8400F:
jmp short $+2
loc_84011:
mov rdi, [rbp+var_8]
xor esi, esi
call free_all_read_locks
jmp loc_84383
loc_84021:
jmp short $+2
loc_84023:
jmp short $+2
loc_84025:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
mov [rcx], rax
cmp rax, 0
jz short loc_84054
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_84067
loc_84054:
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov [rax+88h], rcx
loc_84067:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax+98h]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+98h]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_10]
add rcx, 8
mov rax, [rbp+var_8]
mov [rax+98h], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+40h], 8
jnz short loc_840DD
mov rax, [rbp+var_8]
mov rax, [rax+0D8h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+28h]
call rax
movsx eax, al
cmp eax, 0
jz short loc_840DD
mov rax, [rbp+var_10]
mov dword ptr [rax+40h], 0Dh
loc_840DD:
jmp short $+2
loc_840DF:
jmp short $+2
loc_840E1:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov qword ptr [rax+20h], 0
mov rdi, [rbp+var_20]
call inline_mysql_cond_signal_2
mov rax, [rbp+var_10]
cmp dword ptr [rax+40h], 7
jnz short loc_8412B
mov rax, [rbp+var_8]
cmp qword ptr [rax+80h], 0
jz short loc_8412B
mov rax, [rbp+var_8]
mov rax, [rax+80h]
cmp dword ptr [rax+40h], 7
jz short loc_8412D
loc_8412B:
jmp short loc_84141
loc_8412D:
mov rax, [rbp+var_8]
mov rax, [rax+80h]
mov [rbp+var_10], rax
jmp loc_84025
loc_84141:
mov rax, [rbp+var_10]
cmp dword ptr [rax+40h], 0Bh
jl short loc_84150
jmp loc_84383
loc_84150:
jmp short $+2
loc_84152:
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_841AA
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
xor eax, eax
cmp [rbp+var_10], 0
mov [rbp+var_29], al
jz short loc_84194
mov rcx, [rbp+var_10]
mov al, 1
cmp dword ptr [rcx+40h], 8
mov [rbp+var_39], al
jz short loc_8418E
mov rax, [rbp+var_10]
cmp dword ptr [rax+40h], 7
setz al
mov [rbp+var_39], al
loc_8418E:
mov al, [rbp+var_39]
mov [rbp+var_29], al
loc_84194:
mov rdi, [rbp+var_38]
mov al, [rbp+var_29]
and al, 1
movzx eax, al
movsx esi, al
call free_all_read_locks
jmp short loc_841B0
loc_841AA:
jmp short $+2
loc_841AC:
jmp short $+2
loc_841AE:
jmp short $+2
loc_841B0:
jmp loc_8437F
loc_841B5:
cmp [rbp+var_10], 0
jz loc_8435E
mov rax, [rbp+var_10]
mov eax, [rax+40h]
mov [rbp+var_14], eax
cmp eax, 9
jg loc_8435E
cmp [rbp+var_14], 8
jz short loc_841DF
cmp [rbp+var_14], 7
jnz short loc_841F0
loc_841DF:
mov rax, [rbp+var_8]
cmp dword ptr [rax+0A8h], 0
jnz loc_8435E
loc_841F0:
cmp [rbp+var_14], 8
jnz short loc_84239
mov rax, [rbp+var_8]
mov rax, [rax+0D8h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+28h]
call rax
movsx eax, al
cmp eax, 0
jz short loc_84239
mov rax, [rbp+var_10]
mov dword ptr [rax+40h], 0Dh
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_84234
mov rdi, [rbp+var_8]
xor esi, esi
call free_all_read_locks
loc_84234:
jmp loc_84383
loc_84239:
jmp short $+2
loc_8423B:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
mov [rcx], rax
cmp rax, 0
jz short loc_84276
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_84289
loc_84276:
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov [rax+88h], rcx
loc_84289:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax+98h]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+98h]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rcx, [rbp+var_10]
add rcx, 8
mov rax, [rbp+var_8]
mov [rax+98h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+20h], 0
mov rdi, [rbp+var_28]
call inline_mysql_cond_signal_2
xor eax, eax
cmp [rbp+var_14], 7
mov [rbp+var_3A], al
jnz short loc_84315
mov rax, [rbp+var_8]
mov rcx, [rax+80h]
mov [rbp+var_10], rcx
xor eax, eax
cmp rcx, 0
mov [rbp+var_3A], al
jz short loc_84315
mov rax, [rbp+var_10]
cmp dword ptr [rax+40h], 7
setz al
mov [rbp+var_3A], al
loc_84315:
mov al, [rbp+var_3A]
test al, 1
jnz loc_8423B
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_8435C
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
mov al, 1
cmp [rbp+var_14], 8
mov [rbp+var_3B], al
jz short loc_84348
cmp [rbp+var_14], 7
setz al
mov [rbp+var_3B], al
loc_84348:
mov rdi, [rbp+var_48]
mov al, [rbp+var_3B]
and al, 1
movzx eax, al
movsx esi, al
call free_all_read_locks
loc_8435C:
jmp short loc_8437D
loc_8435E:
cmp [rbp+var_10], 0
jnz short loc_8437B
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_8437B
mov rdi, [rbp+var_8]
xor esi, esi
call free_all_read_locks
loc_8437B:
jmp short $+2
loc_8437D:
jmp short $+2
loc_8437F:
jmp short $+2
loc_84381:
jmp short $+2
loc_84383:
jmp short $+2
loc_84385:
jmp short $+2
loc_84387:
add rsp, 50h
pop rbp
retn
|
long long wake_up_waiters(long long a1)
{
long long result; // rax
unsigned long long v2; // rax
long long v3; // rax
long long v4; // rax
bool v5; // [rsp+15h] [rbp-3Bh]
bool v6; // [rsp+16h] [rbp-3Ah]
bool v7; // [rsp+17h] [rbp-39h]
bool v8; // [rsp+27h] [rbp-29h]
long long v9; // [rsp+28h] [rbp-28h]
long long v10; // [rsp+30h] [rbp-20h]
int v11; // [rsp+3Ch] [rbp-14h]
long long v12; // [rsp+40h] [rbp-10h]
result = a1;
if ( *(_QWORD *)(a1 + 144) )
return result;
v12 = *(_QWORD *)(a1 + 128);
result = a1;
if ( *(_QWORD *)(a1 + 112) )
{
if ( v12 )
{
result = *(unsigned int *)(v12 + 64);
v11 = result;
if ( (int)result <= 9 )
{
if ( (_DWORD)result != 8 && (_DWORD)result != 7 || (result = a1, !*(_DWORD *)(a1 + 168)) )
{
if ( v11 == 8 && (*(unsigned __int8 ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v12 + 40)) )
{
*(_DWORD *)(v12 + 64) = 13;
result = a1;
if ( *(_QWORD *)(a1 + 96) )
return free_all_read_locks(a1, 0LL);
}
else
{
do
{
v9 = *(_QWORD *)(v12 + 32);
v4 = *(_QWORD *)(v12 + 8);
**(_QWORD **)(v12 + 16) = v4;
if ( v4 )
*(_QWORD *)(*(_QWORD *)(v12 + 8) + 16LL) = *(_QWORD *)(v12 + 16);
else
*(_QWORD *)(a1 + 136) = *(_QWORD *)(v12 + 16);
**(_QWORD **)(a1 + 152) = v12;
*(_QWORD *)(v12 + 16) = *(_QWORD *)(a1 + 152);
*(_QWORD *)(a1 + 152) = v12 + 8;
*(_QWORD *)(v12 + 8) = 0LL;
*(_QWORD *)(v12 + 32) = 0LL;
inline_mysql_cond_signal_2(v9);
v6 = 0;
if ( v11 == 7 )
{
v12 = *(_QWORD *)(a1 + 128);
v6 = 0;
if ( v12 )
v6 = *(_DWORD *)(v12 + 64) == 7;
}
}
while ( v6 );
result = a1;
if ( *(_QWORD *)(a1 + 96) )
{
v5 = 1;
if ( v11 != 8 )
v5 = v11 == 7;
return free_all_read_locks(a1, v5);
}
}
return result;
}
}
}
if ( v12 )
return result;
result = a1;
if ( !*(_QWORD *)(a1 + 96) )
return result;
return free_all_read_locks(a1, 0LL);
}
if ( !v12 || *(_DWORD *)(v12 + 64) == 11 && *(_QWORD *)(a1 + 96) && *(int *)(*(_QWORD *)(a1 + 96) + 64LL) >= 4 )
{
LABEL_21:
result = a1;
if ( *(_QWORD *)(a1 + 96) )
{
v8 = 0;
if ( v12 )
{
v7 = 1;
if ( *(_DWORD *)(v12 + 64) != 8 )
v7 = *(_DWORD *)(v12 + 64) == 7;
v8 = v7;
}
return free_all_read_locks(a1, v8);
}
return result;
}
v2 = *(_QWORD *)(a1 + 160);
*(_QWORD *)(a1 + 160) = v2 + 1;
if ( v2 > max_write_lock_count )
{
*(_QWORD *)(a1 + 160) = 0LL;
if ( *(_QWORD *)(a1 + 96) )
return free_all_read_locks(a1, 0LL);
}
while ( 1 )
{
v3 = *(_QWORD *)(v12 + 8);
**(_QWORD **)(v12 + 16) = v3;
if ( v3 )
*(_QWORD *)(*(_QWORD *)(v12 + 8) + 16LL) = *(_QWORD *)(v12 + 16);
else
*(_QWORD *)(a1 + 136) = *(_QWORD *)(v12 + 16);
**(_QWORD **)(a1 + 152) = v12;
*(_QWORD *)(v12 + 16) = *(_QWORD *)(a1 + 152);
*(_QWORD *)(v12 + 8) = 0LL;
*(_QWORD *)(a1 + 152) = v12 + 8;
if ( *(_DWORD *)(v12 + 64) == 8 && (*(unsigned __int8 ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v12 + 40)) )
*(_DWORD *)(v12 + 64) = 13;
v10 = *(_QWORD *)(v12 + 32);
*(_QWORD *)(v12 + 32) = 0LL;
inline_mysql_cond_signal_2(v10);
if ( *(_DWORD *)(v12 + 64) != 7 || !*(_QWORD *)(a1 + 128) || *(_DWORD *)(*(_QWORD *)(a1 + 128) + 64LL) != 7 )
break;
v12 = *(_QWORD *)(a1 + 128);
}
result = v12;
if ( *(int *)(v12 + 64) < 11 )
goto LABEL_21;
return result;
}
|
wake_up_waiters:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x90],0x0
JNZ 0x00184381
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x001841b5
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00184152
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x40],0xb
JNZ 0x00183fce
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x00183fce
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x60]
CMP dword ptr [RAX + 0x40],0x4
JGE 0x00184152
LAB_00183fce:
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RCX + 0xa0]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RCX + 0xa0],RDX
LEA RCX,[0x338b48]
CMP RAX,qword ptr [RCX]
JBE 0x00184023
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xa0],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x00184021
JMP 0x0018400f
LAB_0018400f:
JMP 0x00184011
LAB_00184011:
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
CALL 0x001859f0
JMP 0x00184383
LAB_00184021:
JMP 0x00184023
LAB_00184023:
JMP 0x00184025
LAB_00184025:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x00184054
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00184067
LAB_00184054:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x88],RCX
LAB_00184067:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x98]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x40],0x8
JNZ 0x001840dd
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xd8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001840dd
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x40],0xd
LAB_001840dd:
JMP 0x001840df
LAB_001840df:
JMP 0x001840e1
LAB_001840e1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],0x0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00185070
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x40],0x7
JNZ 0x0018412b
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x80],0x0
JZ 0x0018412b
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x80]
CMP dword ptr [RAX + 0x40],0x7
JZ 0x0018412d
LAB_0018412b:
JMP 0x00184141
LAB_0018412d:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00184025
LAB_00184141:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x40],0xb
JL 0x00184150
JMP 0x00184383
LAB_00184150:
JMP 0x00184152
LAB_00184152:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001841aa
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
XOR EAX,EAX
CMP qword ptr [RBP + -0x10],0x0
MOV byte ptr [RBP + -0x29],AL
JZ 0x00184194
MOV RCX,qword ptr [RBP + -0x10]
MOV AL,0x1
CMP dword ptr [RCX + 0x40],0x8
MOV byte ptr [RBP + -0x39],AL
JZ 0x0018418e
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x40],0x7
SETZ AL
MOV byte ptr [RBP + -0x39],AL
LAB_0018418e:
MOV AL,byte ptr [RBP + -0x39]
MOV byte ptr [RBP + -0x29],AL
LAB_00184194:
MOV RDI,qword ptr [RBP + -0x38]
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOVZX EAX,AL
MOVSX ESI,AL
CALL 0x001859f0
JMP 0x001841b0
LAB_001841aa:
JMP 0x001841ac
LAB_001841ac:
JMP 0x001841ae
LAB_001841ae:
JMP 0x001841b0
LAB_001841b0:
JMP 0x0018437f
LAB_001841b5:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0018435e
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x40]
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x9
JG 0x0018435e
CMP dword ptr [RBP + -0x14],0x8
JZ 0x001841df
CMP dword ptr [RBP + -0x14],0x7
JNZ 0x001841f0
LAB_001841df:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0xa8],0x0
JNZ 0x0018435e
LAB_001841f0:
CMP dword ptr [RBP + -0x14],0x8
JNZ 0x00184239
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xd8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00184239
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x40],0xd
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x00184234
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
CALL 0x001859f0
LAB_00184234:
JMP 0x00184383
LAB_00184239:
JMP 0x0018423b
LAB_0018423b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x00184276
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00184289
LAB_00184276:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x88],RCX
LAB_00184289:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x98]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],0x0
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00185070
XOR EAX,EAX
CMP dword ptr [RBP + -0x14],0x7
MOV byte ptr [RBP + -0x3a],AL
JNZ 0x00184315
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0x10],RCX
XOR EAX,EAX
CMP RCX,0x0
MOV byte ptr [RBP + -0x3a],AL
JZ 0x00184315
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x40],0x7
SETZ AL
MOV byte ptr [RBP + -0x3a],AL
LAB_00184315:
MOV AL,byte ptr [RBP + -0x3a]
TEST AL,0x1
JNZ 0x0018423b
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0018435c
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV AL,0x1
CMP dword ptr [RBP + -0x14],0x8
MOV byte ptr [RBP + -0x3b],AL
JZ 0x00184348
CMP dword ptr [RBP + -0x14],0x7
SETZ AL
MOV byte ptr [RBP + -0x3b],AL
LAB_00184348:
MOV RDI,qword ptr [RBP + -0x48]
MOV AL,byte ptr [RBP + -0x3b]
AND AL,0x1
MOVZX EAX,AL
MOVSX ESI,AL
CALL 0x001859f0
LAB_0018435c:
JMP 0x0018437d
LAB_0018435e:
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0018437b
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0018437b
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
CALL 0x001859f0
LAB_0018437b:
JMP 0x0018437d
LAB_0018437d:
JMP 0x0018437f
LAB_0018437f:
JMP 0x00184381
LAB_00184381:
JMP 0x00184383
LAB_00184383:
JMP 0x00184385
LAB_00184385:
JMP 0x00184387
LAB_00184387:
ADD RSP,0x50
POP RBP
RET
|
void wake_up_waiters(long param_1)
{
int iVar1;
ulong uVar2;
long lVar3;
int8 uVar4;
char cVar5;
bool bVar6;
bool local_43;
bool local_41;
bool local_31;
long local_18;
if (*(long *)(param_1 + 0x90) == 0) {
local_18 = *(long *)(param_1 + 0x80);
if (*(long *)(param_1 + 0x70) == 0) {
if ((local_18 != 0) &&
(((*(int *)(local_18 + 0x40) != 0xb || (*(long *)(param_1 + 0x60) == 0)) ||
(*(int *)(*(long *)(param_1 + 0x60) + 0x40) < 4)))) {
uVar2 = *(ulong *)(param_1 + 0xa0);
*(ulong *)(param_1 + 0xa0) = uVar2 + 1;
if ((max_write_lock_count < uVar2) &&
(*(int8 *)(param_1 + 0xa0) = 0, *(long *)(param_1 + 0x60) != 0)) {
free_all_read_locks(param_1,0);
return;
}
while( true ) {
lVar3 = *(long *)(local_18 + 8);
**(long **)(local_18 + 0x10) = lVar3;
if (lVar3 == 0) {
*(int8 *)(param_1 + 0x88) = *(int8 *)(local_18 + 0x10);
}
else {
*(int8 *)(*(long *)(local_18 + 8) + 0x10) = *(int8 *)(local_18 + 0x10);
}
**(long **)(param_1 + 0x98) = local_18;
*(int8 *)(local_18 + 0x10) = *(int8 *)(param_1 + 0x98);
*(int8 *)(local_18 + 8) = 0;
*(long *)(param_1 + 0x98) = local_18 + 8;
if ((*(int *)(local_18 + 0x40) == 8) &&
(cVar5 = (**(code **)(param_1 + 0xd8))(*(int8 *)(local_18 + 0x28)), cVar5 != '\0'
)) {
*(int4 *)(local_18 + 0x40) = 0xd;
}
uVar4 = *(int8 *)(local_18 + 0x20);
*(int8 *)(local_18 + 0x20) = 0;
inline_mysql_cond_signal(uVar4);
if (((*(int *)(local_18 + 0x40) != 7) || (*(long *)(param_1 + 0x80) == 0)) ||
(*(int *)(*(long *)(param_1 + 0x80) + 0x40) != 7)) break;
local_18 = *(long *)(param_1 + 0x80);
}
if (10 < *(int *)(local_18 + 0x40)) {
return;
}
}
if (*(long *)(param_1 + 0x60) != 0) {
local_31 = false;
if (local_18 != 0) {
local_41 = true;
if (*(int *)(local_18 + 0x40) != 8) {
local_41 = *(int *)(local_18 + 0x40) == 7;
}
local_31 = local_41;
}
free_all_read_locks(param_1,local_31);
}
}
else if (((local_18 == 0) || (iVar1 = *(int *)(local_18 + 0x40), 9 < iVar1)) ||
(((iVar1 == 8 || (iVar1 == 7)) && (*(int *)(param_1 + 0xa8) != 0)))) {
if ((local_18 == 0) && (*(long *)(param_1 + 0x60) != 0)) {
free_all_read_locks(param_1,0);
}
}
else if ((iVar1 == 8) &&
(cVar5 = (**(code **)(param_1 + 0xd8))(*(int8 *)(local_18 + 0x28)), cVar5 != '\0')
) {
*(int4 *)(local_18 + 0x40) = 0xd;
if (*(long *)(param_1 + 0x60) != 0) {
free_all_read_locks(param_1,0);
}
}
else {
do {
uVar4 = *(int8 *)(local_18 + 0x20);
lVar3 = *(long *)(local_18 + 8);
**(long **)(local_18 + 0x10) = lVar3;
if (lVar3 == 0) {
*(int8 *)(param_1 + 0x88) = *(int8 *)(local_18 + 0x10);
}
else {
*(int8 *)(*(long *)(local_18 + 8) + 0x10) = *(int8 *)(local_18 + 0x10);
}
**(long **)(param_1 + 0x98) = local_18;
*(int8 *)(local_18 + 0x10) = *(int8 *)(param_1 + 0x98);
*(long *)(param_1 + 0x98) = local_18 + 8;
*(int8 *)(local_18 + 8) = 0;
*(int8 *)(local_18 + 0x20) = 0;
inline_mysql_cond_signal(uVar4);
bVar6 = false;
if (iVar1 == 7) {
local_18 = *(long *)(param_1 + 0x80);
bVar6 = false;
if (local_18 != 0) {
bVar6 = *(int *)(local_18 + 0x40) == 7;
}
}
} while (bVar6);
if (*(long *)(param_1 + 0x60) != 0) {
local_43 = iVar1 == 8 || iVar1 == 7;
free_all_read_locks(param_1,local_43);
}
}
}
return;
}
|
|
18,751
|
SchemaConverter::_generate_constant_rule(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string _generate_constant_rule(const json & value) {
return format_literal(value.dump());
}
|
O3
|
cpp
|
SchemaConverter::_generate_constant_rule(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x7ef7a
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0xbca40
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc328a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc32b3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq %rbx, %rdi
callq 0x1afa0
nop
|
_ZN15SchemaConverter23_generate_constant_ruleERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEE:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rsp+38h+var_30]
mov rdi, r14
mov rsi, rdx
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call _ZL14format_literalRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; format_literal(std::string const&)
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C328A
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C328A:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C32B3
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C32B3:
mov rdi, rbx
call __Unwind_Resume
|
long long SchemaConverter::_generate_constant_rule(long long a1, long long a2, long long a3)
{
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-20h] BYREF
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v4,
a3,
-1,
32,
0,
0);
format_literal(a1, (long long *)v4[0], (long long)v4[1]);
if ( v4[0] != &v5 )
operator delete(v4[0], v5 + 1);
return a1;
}
|
_generate_constant_rule:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RDX
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0017ef7a
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_001c3267:
MOV RDI,RBX
CALL 0x001bca40
LAB_001c326f:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001c328a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8e0
LAB_001c328a:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* SchemaConverter::_generate_constant_rule(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
basic_json * SchemaConverter::_generate_constant_rule(basic_json *param_1)
{
long *local_30 [2];
long local_20 [2];
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_30);
/* try { // try from 001c3267 to 001c326e has its CatchHandler @ 001c3295 */
format_literal((string *)param_1);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return param_1;
}
|
|
18,752
|
write_dynamic_record
|
eloqsql/storage/myisam/mi_dynrec.c
|
static int write_dynamic_record(MI_INFO *info, const uchar *record,
ulong reclength)
{
int flag;
ulong length;
my_off_t filepos;
DBUG_ENTER("write_dynamic_record");
flag=0;
/*
Check if we have enough room for the new record.
First we do simplified check to make usual case faster.
Then we do more precise check for the space left.
Though it still is not absolutely precise, as
we always use MI_MAX_DYN_BLOCK_HEADER while it can be
less in the most of the cases.
*/
if (unlikely(info->s->base.max_data_file_length -
info->state->data_file_length <
reclength + MI_MAX_DYN_BLOCK_HEADER))
{
if (info->s->base.max_data_file_length - info->state->data_file_length +
info->state->empty - info->state->del * MI_MAX_DYN_BLOCK_HEADER <
reclength + MI_MAX_DYN_BLOCK_HEADER)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
DBUG_RETURN(1);
}
}
do
{
if (_mi_find_writepos(info,reclength,&filepos,&length))
goto err;
if (_mi_write_part_record(info,filepos,length,
(info->append_insert_at_end ?
HA_OFFSET_ERROR : info->s->state.dellink),
(uchar**) &record,&reclength,&flag))
goto err;
} while (reclength);
DBUG_RETURN(0);
err:
DBUG_RETURN(1);
}
|
O0
|
c
|
write_dynamic_record:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x110(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq 0x28(%rcx), %rax
movq -0x20(%rbp), %rcx
addq $0x14, %rcx
cmpq %rcx, %rax
setb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xa7517
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x110(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq 0x28(%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq 0x10(%rcx), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
imulq $0x14, 0x8(%rcx), %rcx
subq %rcx, %rax
movq -0x20(%rbp), %rcx
addq $0x14, %rcx
cmpq %rcx, %rax
jae 0xa7515
callq 0xf55f0
movl $0x87, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xa75c9
jmp 0xa7517
jmp 0xa7519
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x38(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0xac0f0
cmpl $0x0, %eax
je 0xa7538
jmp 0xa75c0
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x33a(%rax), %eax
cmpl $0x0, %eax
je 0xa756d
movq $-0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0xa757c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x58(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rcx
leaq -0x18(%rbp), %r8
leaq -0x20(%rbp), %r9
leaq -0x24(%rbp), %rax
movq %rax, (%rsp)
callq 0xa8450
cmpl $0x0, %eax
je 0xa75a8
jmp 0xa75c0
jmp 0xa75aa
cmpq $0x0, -0x20(%rbp)
jne 0xa7519
jmp 0xa75b7
movl $0x0, -0x4(%rbp)
jmp 0xa75c9
jmp 0xa75c2
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
write_dynamic_record_0:
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_24], 0
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+110h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, [rcx+28h]
mov rcx, [rbp+var_20]
add rcx, 14h
cmp rax, rcx
setb al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_A7517
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+110h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, [rcx+28h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
add rax, [rcx+10h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
imul rcx, [rcx+8], 14h
sub rax, rcx
mov rcx, [rbp+var_20]
add rcx, 14h
cmp rax, rcx
jnb short loc_A7515
call _my_thread_var
mov dword ptr [rax], 87h
mov [rbp+var_4], 1
jmp loc_A75C9
loc_A7515:
jmp short $+2
loc_A7517:
jmp short $+2
loc_A7519:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
lea rdx, [rbp+var_38]
lea rcx, [rbp+var_30]
call _mi_find_writepos
cmp eax, 0
jz short loc_A7538
jmp loc_A75C0
loc_A7538:
mov rax, [rbp+var_10]
mov [rbp+var_50], rax
mov rax, [rbp+var_38]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+33Ah]
cmp eax, 0
jz short loc_A756D
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_58], rax
jmp short loc_A757C
loc_A756D:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+58h]
mov [rbp+var_58], rax
loc_A757C:
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_48]
mov rdi, [rbp+var_50]
mov rcx, [rbp+var_58]
lea r8, [rbp+var_18]
lea r9, [rbp+var_20]
lea rax, [rbp+var_24]
mov [rsp+60h+var_60], rax
call _mi_write_part_record
cmp eax, 0
jz short loc_A75A8
jmp short loc_A75C0
loc_A75A8:
jmp short $+2
loc_A75AA:
cmp [rbp+var_20], 0
jnz loc_A7519
jmp short $+2
loc_A75B7:
mov [rbp+var_4], 0
jmp short loc_A75C9
loc_A75C0:
jmp short $+2
loc_A75C2:
mov [rbp+var_4], 1
loc_A75C9:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long write_dynamic_record_0(_QWORD *a1, long long a2, long long a3, double a4)
{
long long v6; // [rsp+28h] [rbp-38h] BYREF
long long v7; // [rsp+30h] [rbp-30h] BYREF
int v8; // [rsp+3Ch] [rbp-24h] BYREF
long long v9; // [rsp+40h] [rbp-20h] BYREF
long long v10; // [rsp+48h] [rbp-18h] BYREF
_QWORD *v11; // [rsp+50h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = 0;
if ( *(_QWORD *)(*a1 + 272LL) - *(_QWORD *)(a1[1] + 40LL) >= (unsigned long long)(a3 + 20)
|| *(_QWORD *)(v11[1] + 16LL)
+ *(_QWORD *)(*v11 + 272LL)
- *(_QWORD *)(v11[1] + 40LL)
- 20LL * *(_QWORD *)(v11[1] + 8LL) >= (unsigned long long)(v9 + 20) )
{
while ( !(unsigned int)mi_find_writepos(v11, v9, &v6, &v7) )
{
if ( *((_BYTE *)v11 + 826)
? mi_write_part_record((_DWORD)v11, v6, v7, -1, (unsigned int)&v10, (unsigned int)&v9, (long long)&v8)
: (unsigned int)mi_write_part_record(
(_DWORD)v11,
v6,
v7,
*(_QWORD *)(*v11 + 88LL),
(unsigned int)&v10,
(unsigned int)&v9,
(long long)&v8) )
{
break;
}
if ( !v9 )
return 0;
}
return 1;
}
else
{
*(_DWORD *)my_thread_var(a4) = 135;
return 1;
}
}
|
write_dynamic_record:
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 dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x110]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX + 0x28]
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x14
CMP RAX,RCX
SETC AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001a7517
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x110]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,qword ptr [RCX + 0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
ADD RAX,qword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
IMUL RCX,qword ptr [RCX + 0x8],0x14
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x14
CMP RAX,RCX
JNC 0x001a7515
CALL 0x001f55f0
MOV dword ptr [RAX],0x87
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001a75c9
LAB_001a7515:
JMP 0x001a7517
LAB_001a7517:
JMP 0x001a7519
LAB_001a7519:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
LEA RDX,[RBP + -0x38]
LEA RCX,[RBP + -0x30]
CALL 0x001ac0f0
CMP EAX,0x0
JZ 0x001a7538
JMP 0x001a75c0
LAB_001a7538:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x33a]
CMP EAX,0x0
JZ 0x001a756d
MOV RAX,-0x1
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001a757c
LAB_001a756d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x58],RAX
LAB_001a757c:
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x58]
LEA R8,[RBP + -0x18]
LEA R9,[RBP + -0x20]
LEA RAX,[RBP + -0x24]
MOV qword ptr [RSP],RAX
CALL 0x001a8450
CMP EAX,0x0
JZ 0x001a75a8
JMP 0x001a75c0
LAB_001a75a8:
JMP 0x001a75aa
LAB_001a75aa:
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001a7519
JMP 0x001a75b7
LAB_001a75b7:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001a75c9
LAB_001a75c0:
JMP 0x001a75c2
LAB_001a75c2:
MOV dword ptr [RBP + -0x4],0x1
LAB_001a75c9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 write_dynamic_record(long *param_1,int8 param_2,long param_3)
{
int iVar1;
int4 *puVar2;
int8 local_60;
int8 local_40;
int8 local_38;
int4 local_2c;
long local_28;
int8 local_20;
long *local_18;
int4 local_c;
local_2c = 0;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (((ulong)(*(long *)(*param_1 + 0x110) - *(long *)(param_1[1] + 0x28)) < param_3 + 0x14U) &&
((ulong)((*(long *)(*param_1 + 0x110) - *(long *)(param_1[1] + 0x28)) +
*(long *)(param_1[1] + 0x10) + *(long *)(param_1[1] + 8) * -0x14) < param_3 + 0x14U))
{
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x87;
local_c = 1;
}
else {
do {
iVar1 = _mi_find_writepos(local_18,local_28,&local_40,&local_38);
if (iVar1 != 0) {
return 1;
}
if (*(char *)((long)local_18 + 0x33a) == '\0') {
local_60 = *(int8 *)(*local_18 + 0x58);
}
else {
local_60 = 0xffffffffffffffff;
}
iVar1 = _mi_write_part_record
(local_18,local_40,local_38,local_60,&local_20,&local_28,&local_2c);
if (iVar1 != 0) {
return 1;
}
} while (local_28 != 0);
local_c = 0;
}
return local_c;
}
|
|
18,753
|
translog_log_debug_info
|
eloqsql/storage/maria/ma_loghandler.c
|
my_bool translog_log_debug_info(TRN *trn __attribute__((unused)),
enum translog_debug_info_type type
__attribute__((unused)),
uchar *info __attribute__((unused)),
size_t length __attribute__((unused)))
{
#ifdef EXTRA_DEBUG
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
uchar debug_type;
LSN lsn;
if (!trn)
{
/*
We can't log the current transaction because we don't have
an active transaction. Use a temporary transaction object instead
*/
trn= &dummy_transaction_object;
}
debug_type= (uchar) type;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= &debug_type;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= 1;
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= info;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length;
return translog_write_record(&lsn, LOGREC_DEBUG_INFO,
trn, NULL,
(translog_size_t) (1+ length),
sizeof(log_array)/sizeof(log_array[0]),
log_array, NULL, NULL);
#else
return 0;
#endif
}
|
O3
|
c
|
translog_log_debug_info:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
popq %rbp
retq
|
translog_log_debug_info:
push rbp
mov rbp, rsp
xor eax, eax
pop rbp
retn
|
long long translog_log_debug_info()
{
return 0LL;
}
|
translog_log_debug_info:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
POP RBP
RET
|
int8 translog_log_debug_info(void)
{
return 0;
}
|
|
18,754
|
my_uni_utf16
|
eloqsql/strings/ctype-ucs2.c
|
int
my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (wc <= 0xFFFF)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (MY_UTF16_SURROGATE(wc))
return MY_CS_ILUNI;
*s++= (uchar) (wc >> 8);
*s= (uchar) (wc & 0xFF);
return 2;
}
if (wc <= 0x10FFFF)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
*s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8;
*s++= (uchar) (wc >> 10) & 0xFF;
*s++= (uchar) ((wc >> 8) & 3) | 0xDC;
*s= (uchar) wc & 0xFF;
return 4;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_uni_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rsi, %rbx
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x49b1b
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x49b63
movl %ebx, %eax
andl $0xf800, %eax # imm = 0xF800
cmpl $0xd800, %eax # imm = 0xD800
je 0x49b61
movb %bh, (%rdx)
incq %rdx
movl $0x2, %eax
jmp 0x49b5d
cmpq $0x10ffff, %rbx # imm = 0x10FFFF
ja 0x49b61
leaq 0x4(%rdx), %rsi
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rsi
ja 0x49b63
leal -0x10000(%rbx), %eax
movl %eax, %ecx
shrl $0x12, %ecx
orb $-0x28, %cl
movb %cl, (%rdx)
shrl $0xa, %eax
movb %al, 0x1(%rdx)
movl %ebx, %eax
shrl $0x8, %eax
andb $0x3, %al
orb $-0x24, %al
movb %al, 0x2(%rdx)
addq $0x3, %rdx
movl $0x4, %eax
movb %bl, (%rdx)
jmp 0x49b63
xorl %eax, %eax
popq %rbx
popq %rbp
retq
|
my_uni_utf16:
push rbp
mov rbp, rsp
push rbx
mov rbx, rsi
cmp rsi, 0FFFFh
ja short loc_49B1B
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short loc_49B63
mov eax, ebx
and eax, 0F800h
cmp eax, 0D800h
jz short loc_49B61
mov [rdx], bh
inc rdx
mov eax, 2
jmp short loc_49B5D
loc_49B1B:
cmp rbx, offset unk_10FFFF
ja short loc_49B61
lea rsi, [rdx+4]
mov eax, 0FFFFFF98h
cmp rsi, rcx
ja short loc_49B63
lea eax, [rbx-10000h]
mov ecx, eax
shr ecx, 12h
or cl, 0D8h
mov [rdx], cl
shr eax, 0Ah
mov [rdx+1], al
mov eax, ebx
shr eax, 8
and al, 3
or al, 0DCh
mov [rdx+2], al
add rdx, 3
mov eax, 4
loc_49B5D:
mov [rdx], bl
jmp short loc_49B63
loc_49B61:
xor eax, eax
loc_49B63:
pop rbx
pop rbp
retn
|
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
_BYTE *v5; // rdx
if ( a2 > 0xFFFF )
{
if ( a2 <= (unsigned long long)&unk_10FFFF )
{
result = 4294967192LL;
if ( (unsigned long long)(a3 + 4) > a4 )
return result;
*a3 = ((unsigned int)(a2 - 0x10000) >> 18) | 0xD8;
a3[1] = (unsigned int)(a2 - 0x10000) >> 10;
a3[2] = BYTE1(a2) & 3 | 0xDC;
v5 = a3 + 3;
result = 4LL;
goto LABEL_8;
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) > a4 )
return result;
if ( (a2 & 0xF800) != 0xD800 )
{
*a3 = BYTE1(a2);
v5 = a3 + 1;
result = 2LL;
LABEL_8:
*v5 = a2;
return result;
}
}
return 0LL;
}
|
my_uni_utf16:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RBX,RSI
CMP RSI,0xffff
JA 0x00149b1b
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x00149b63
MOV EAX,EBX
AND EAX,0xf800
CMP EAX,0xd800
JZ 0x00149b61
MOV byte ptr [RDX],BH
INC RDX
MOV EAX,0x2
JMP 0x00149b5d
LAB_00149b1b:
CMP RBX,0x10ffff
JA 0x00149b61
LEA RSI,[RDX + 0x4]
MOV EAX,0xffffff98
CMP RSI,RCX
JA 0x00149b63
LEA EAX,[RBX + -0x10000]
MOV ECX,EAX
SHR ECX,0x12
OR CL,0xd8
MOV byte ptr [RDX],CL
SHR EAX,0xa
MOV byte ptr [RDX + 0x1],AL
MOV EAX,EBX
SHR EAX,0x8
AND AL,0x3
OR AL,0xdc
MOV byte ptr [RDX + 0x2],AL
ADD RDX,0x3
MOV EAX,0x4
LAB_00149b5d:
MOV byte ptr [RDX],BL
JMP 0x00149b63
LAB_00149b61:
XOR EAX,EAX
LAB_00149b63:
POP RBX
POP RBP
RET
|
int8 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
uint uVar1;
int8 uVar2;
byte bVar3;
bVar3 = (byte)(param_2 >> 8);
if (param_2 < 0x10000) {
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (((uint)param_2 & 0xf800) == 0xd800) {
return 0;
}
*param_3 = bVar3;
param_3 = param_3 + 1;
uVar2 = 2;
}
else {
if (0x10ffff < param_2) {
return 0;
}
if (param_4 < param_3 + 4) {
return 0xffffff98;
}
uVar1 = (uint)param_2 - 0x10000;
*param_3 = (byte)(uVar1 >> 0x12) | 0xd8;
param_3[1] = (byte)(uVar1 >> 10);
param_3[2] = bVar3 & 3 | 0xdc;
param_3 = param_3 + 3;
uVar2 = 4;
}
*param_3 = (byte)param_2;
return uVar2;
}
|
|
18,755
|
server_task_result_cmpl_final::to_json[abi:cxx11]()
|
monkey531[P]llama/examples/server/server.cpp
|
virtual json to_json() override {
switch (oaicompat) {
case OAICOMPAT_TYPE_NONE:
return to_json_non_oaicompat();
case OAICOMPAT_TYPE_COMPLETION:
return to_json_oaicompat();
case OAICOMPAT_TYPE_CHAT:
return stream ? to_json_oaicompat_chat_stream() : to_json_oaicompat_chat();
default:
GGML_ASSERT(false && "Invalid oaicompat_type");
}
}
|
O3
|
cpp
|
server_task_result_cmpl_final::to_json[abi:cxx11]():
pushq %rbx
movq %rdi, %rbx
movl 0x804(%rsi), %eax
cmpl $0x2, %eax
je 0x948c8
cmpl $0x1, %eax
je 0x948b8
testl %eax, %eax
jne 0x948df
movq %rbx, %rdi
callq 0x949f2
jmp 0x948da
cmpb $0x1, 0x50(%rsi)
jne 0x948d2
movq %rbx, %rdi
callq 0x97708
jmp 0x948da
movq %rbx, %rdi
callq 0x95f9e
jmp 0x948da
movq %rbx, %rdi
callq 0x9894c
movq %rbx, %rax
popq %rbx
retq
leaq 0xb2078(%rip), %rdi # 0x14695e
leaq 0xb148d(%rip), %rdx # 0x145d7a
leaq 0xb6e64(%rip), %rcx # 0x14b758
movl $0x283, %esi # imm = 0x283
xorl %eax, %eax
callq 0x20250
|
_ZN29server_task_result_cmpl_final7to_jsonB5cxx11Ev:
push rbx; __int64
mov rbx, rdi
mov eax, [rsi+804h]
cmp eax, 2
jz short loc_948C8
cmp eax, 1
jz short loc_948B8
test eax, eax
jnz short loc_948DF
mov rdi, rbx; void *
call _ZN29server_task_result_cmpl_final21to_json_non_oaicompatB5cxx11Ev; server_task_result_cmpl_final::to_json_non_oaicompat(void)
jmp short loc_948DA
loc_948B8:
cmp byte ptr [rsi+50h], 1
jnz short loc_948D2
mov rdi, rbx; int
call _ZN29server_task_result_cmpl_final29to_json_oaicompat_chat_streamB5cxx11Ev; server_task_result_cmpl_final::to_json_oaicompat_chat_stream(void)
jmp short loc_948DA
loc_948C8:
mov rdi, rbx; void *
call _ZN29server_task_result_cmpl_final17to_json_oaicompatB5cxx11Ev; server_task_result_cmpl_final::to_json_oaicompat(void)
jmp short loc_948DA
loc_948D2:
mov rdi, rbx; void *
call _ZN29server_task_result_cmpl_final22to_json_oaicompat_chatB5cxx11Ev; server_task_result_cmpl_final::to_json_oaicompat_chat(void)
loc_948DA:
mov rax, rbx
pop rbx
retn
loc_948DF:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseInvalidOa; "false && \"Invalid oaicompat_type\""
mov esi, 283h
xor eax, eax
call _ggml_abort
|
void server_task_result_cmpl_final::to_json[abi:cxx11](void *a1, long long a2)
{
int v2; // eax
v2 = *(_DWORD *)(a2 + 2052);
if ( v2 == 2 )
{
server_task_result_cmpl_final::to_json_oaicompat[abi:cxx11](a1);
}
else if ( v2 == 1 )
{
if ( *(_BYTE *)(a2 + 80) == 1 )
server_task_result_cmpl_final::to_json_oaicompat_chat_stream[abi:cxx11](a1);
else
server_task_result_cmpl_final::to_json_oaicompat_chat[abi:cxx11](a1);
}
else if ( v2 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp",
643LL,
"GGML_ASSERT(%s) failed",
"false && \"Invalid oaicompat_type\"");
server_task_result_cmpl_final::~server_task_result_cmpl_final((server_task_result_cmpl_final *)"/workspace/llm4binary"
"/github/2025_star3/mo"
"nkey531[P]llama/examp"
"les/server/server.cpp");
}
else
{
server_task_result_cmpl_final::to_json_non_oaicompat[abi:cxx11](a1);
}
}
|
to_json[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RSI + 0x804]
CMP EAX,0x2
JZ 0x001948c8
CMP EAX,0x1
JZ 0x001948b8
TEST EAX,EAX
JNZ 0x001948df
MOV RDI,RBX
CALL 0x001949f2
JMP 0x001948da
LAB_001948b8:
CMP byte ptr [RSI + 0x50],0x1
JNZ 0x001948d2
MOV RDI,RBX
CALL 0x00197708
JMP 0x001948da
LAB_001948c8:
MOV RDI,RBX
CALL 0x00195f9e
JMP 0x001948da
LAB_001948d2:
MOV RDI,RBX
CALL 0x0019894c
LAB_001948da:
MOV RAX,RBX
POP RBX
RET
LAB_001948df:
LEA RDI,[0x24695e]
LEA RDX,[0x245d7a]
LEA RCX,[0x24b758]
MOV ESI,0x283
XOR EAX,EAX
CALL 0x00120250
|
/* server_task_result_cmpl_final::to_json[abi:cxx11]() */
void server_task_result_cmpl_final::to_json_abi_cxx11_(void)
{
int iVar1;
long in_RSI;
iVar1 = *(int *)(in_RSI + 0x804);
if (iVar1 == 2) {
to_json_oaicompat_abi_cxx11_();
}
else if (iVar1 == 1) {
if (*(char *)(in_RSI + 0x50) == '\x01') {
to_json_oaicompat_chat_stream_abi_cxx11_();
}
else {
to_json_oaicompat_chat_abi_cxx11_();
}
}
else {
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/server/server.cpp"
,0x283,"GGML_ASSERT(%s) failed","false && \"Invalid oaicompat_type\"");
}
to_json_non_oaicompat_abi_cxx11_();
}
return;
}
|
|
18,756
|
js_print
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_print(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
#ifdef _WIN32
HANDLE handle;
DWORD mode;
#endif
const char *s;
DynBuf b;
int i;
dbuf_init(&b);
for(i = 0; i < argc; i++) {
s = JS_ToCString(ctx, argv[i]);
if (s) {
dbuf_printf(&b, "%s%s", &" "[!i], s);
JS_FreeCString(ctx, s);
} else {
dbuf_printf(&b, "%s<exception>", &" "[!i]);
JS_FreeValue(ctx, JS_GetException(ctx));
}
}
dbuf_putc(&b, '\n');
#ifdef _WIN32
// use WriteConsoleA with CP_UTF8 for better Unicode handling vis-a-vis
// the mangling that happens when going through msvcrt's stdio layer,
// *except* when stdout is redirected to something that is not a console
handle = (HANDLE)_get_osfhandle(/*STDOUT_FILENO*/1); // don't CloseHandle
if (GetFileType(handle) != FILE_TYPE_CHAR)
goto fallback;
if (!GetConsoleMode(handle, &mode))
goto fallback;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
if (handle == INVALID_HANDLE_VALUE)
goto fallback;
mode = GetConsoleOutputCP();
SetConsoleOutputCP(CP_UTF8);
WriteConsoleA(handle, b.buf, b.size, NULL, NULL);
SetConsoleOutputCP(mode);
FlushFileBuffers(handle);
goto done;
fallback:
#endif
fwrite(b.buf, 1, b.size, stdout);
fflush(stdout);
goto done; // avoid unused label warning
done:
dbuf_free(&b);
return JS_UNDEFINED;
}
|
O0
|
c
|
js_print:
subq $0x98, %rsp
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x1e3d0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jge 0x11157
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rax
movslq 0x24(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x110e5
cmpl $0x0, 0x24(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
leaq 0xfcda3(%rip), %rdx # 0x10de5c
addq %rax, %rdx
movq 0x58(%rsp), %rcx
leaq 0x28(%rsp), %rdi
leaq 0xf9184(%rip), %rsi # 0x10a251
movb $0x0, %al
callq 0x1e750
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x29e50
jmp 0x11145
cmpl $0x0, 0x24(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
leaq 0xfcd5f(%rip), %rdx # 0x10de5c
addq %rax, %rdx
leaq 0x28(%rsp), %rdi
leaq 0xf914a(%rip), %rsi # 0x10a256
movb $0x0, %al
callq 0x1e750
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
callq 0x2cf70
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x23c90
jmp 0x11147
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x11064
leaq 0x28(%rsp), %rdi
movl $0xa, %esi
callq 0x1e6d0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x124e39(%rip), %rax # 0x135fb0
movq (%rax), %rcx
movl $0x1, %esi
callq 0xe8c0
movq 0x124e25(%rip), %rax # 0x135fb0
movq (%rax), %rdi
callq 0xe680
leaq 0x28(%rsp), %rdi
callq 0x1e930
movl $0x0, 0x88(%rsp)
movq $0x3, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopl (%rax)
|
js_print:
sub rsp, 98h
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_2C], ecx
mov [rsp+98h+var_38], r8
lea rdi, [rsp+98h+var_70]
call dbuf_init
mov [rsp+98h+var_74], 0
loc_11064:
mov eax, [rsp+98h+var_74]
cmp eax, [rsp+98h+var_2C]
jge loc_11157
mov rdi, [rsp+98h+var_28]
mov rax, [rsp+98h+var_38]
movsxd rcx, [rsp+98h+var_74]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+98h+var_40], rax
cmp [rsp+98h+var_40], 0
jz short loc_110E5
cmp [rsp+98h+var_74], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
lea rdx, asc_10DE53+9; " "
add rdx, rax
mov rcx, [rsp+98h+var_40]
lea rdi, [rsp+98h+var_70]
lea rsi, aSS; "%s%s"
mov al, 0
call dbuf_printf
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_40]
call JS_FreeCString
jmp short loc_11145
loc_110E5:
cmp [rsp+98h+var_74], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
lea rdx, asc_10DE53+9; " "
add rdx, rax
lea rdi, [rsp+98h+var_70]
lea rsi, aSException; "%s<exception>"
mov al, 0
call dbuf_printf
mov rax, [rsp+98h+var_28]
mov [rsp+98h+var_90], rax
mov rdi, [rsp+98h+var_28]
call JS_GetException
mov rdi, [rsp+98h+var_90]
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], rdx
mov rsi, [rsp+98h+var_88]
mov rdx, [rsp+98h+var_80]
call JS_FreeValue
loc_11145:
jmp short $+2
loc_11147:
mov eax, [rsp+98h+var_74]
add eax, 1
mov [rsp+98h+var_74], eax
jmp loc_11064
loc_11157:
lea rdi, [rsp+98h+var_70]
mov esi, 0Ah
call dbuf_putc
mov rdi, [rsp+98h+var_70]
mov rdx, [rsp+98h+var_68]
mov rax, cs:stdout_ptr
mov rcx, [rax]
mov esi, 1
call _fwrite
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
lea rdi, [rsp+98h+var_70]
call dbuf_free
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 3
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
|
long long js_print(long long a1, long long a2, long long a3, int a4, long long a5)
{
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v8; // rdx
char v10; // [rsp+0h] [rbp-98h]
long long v11; // [rsp+8h] [rbp-90h]
long long Exception; // [rsp+10h] [rbp-88h]
int i; // [rsp+24h] [rbp-74h]
_QWORD v14[6]; // [rsp+28h] [rbp-70h] BYREF
long long v15; // [rsp+58h] [rbp-40h]
long long v16; // [rsp+60h] [rbp-38h]
int v17; // [rsp+6Ch] [rbp-2Ch]
long long v18; // [rsp+70h] [rbp-28h]
long long v19; // [rsp+78h] [rbp-20h]
long long v20; // [rsp+80h] [rbp-18h]
long long v21; // [rsp+88h] [rbp-10h]
v19 = a2;
v20 = a3;
v18 = a1;
v17 = a4;
v16 = a5;
dbuf_init(v14);
for ( i = 0; i < v17; ++i )
{
v15 = JS_ToCString(v18, *(_QWORD *)(16LL * i + v16), *(_QWORD *)(16LL * i + v16 + 8));
if ( v15 )
{
dbuf_printf((unsigned int)v14, (unsigned int)"%s%s", (unsigned int)&asc_10DE53[(i == 0) + 9], v15, v6, v7, v10);
JS_FreeCString(v18, v15);
}
else
{
dbuf_printf(
(unsigned int)v14,
(unsigned int)"%s<exception>",
(unsigned int)&asc_10DE53[(i == 0) + 9],
v5,
v6,
v7,
v10);
v11 = v18;
Exception = JS_GetException(v18);
JS_FreeValue(v11, Exception, v8);
}
}
dbuf_putc(v14, 10LL);
fwrite(v14[0], 1LL, v14[1], stdout);
fflush(stdout);
dbuf_free(v14);
LODWORD(v21) = 0;
return v21;
}
|
js_print:
SUB RSP,0x98
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
LEA RDI,[RSP + 0x28]
CALL 0x0011e3d0
MOV dword ptr [RSP + 0x24],0x0
LAB_00111064:
MOV EAX,dword ptr [RSP + 0x24]
CMP EAX,dword ptr [RSP + 0x6c]
JGE 0x00111157
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x60]
MOVSXD RCX,dword ptr [RSP + 0x24]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001147e0
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x58],0x0
JZ 0x001110e5
CMP dword ptr [RSP + 0x24],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
LEA RDX,[0x20de5c]
ADD RDX,RAX
MOV RCX,qword ptr [RSP + 0x58]
LEA RDI,[RSP + 0x28]
LEA RSI,[0x20a251]
MOV AL,0x0
CALL 0x0011e750
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00129e50
JMP 0x00111145
LAB_001110e5:
CMP dword ptr [RSP + 0x24],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
LEA RDX,[0x20de5c]
ADD RDX,RAX
LEA RDI,[RSP + 0x28]
LEA RSI,[0x20a256]
MOV AL,0x0
CALL 0x0011e750
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x0012cf70
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x00123c90
LAB_00111145:
JMP 0x00111147
LAB_00111147:
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00111064
LAB_00111157:
LEA RDI,[RSP + 0x28]
MOV ESI,0xa
CALL 0x0011e6d0
MOV RDI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [0x00235fb0]
MOV RCX,qword ptr [RAX]
MOV ESI,0x1
CALL 0x0010e8c0
MOV RAX,qword ptr [0x00235fb0]
MOV RDI,qword ptr [RAX]
CALL 0x0010e680
LEA RDI,[RSP + 0x28]
CALL 0x0011e930
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x3
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_print(int8 param_1,int8 param_2,int8 param_3,int param_4,long param_5)
{
int8 uVar1;
int8 *puVar2;
int1 auVar3 [16];
int local_74;
void *local_70;
size_t local_68;
long local_40;
long local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
uint uStack_c;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
dbuf_init(&local_70);
for (local_74 = 0; local_74 < local_2c; local_74 = local_74 + 1) {
puVar2 = (int8 *)(local_38 + (long)local_74 * 0x10);
local_40 = JS_ToCString(local_28,*puVar2,puVar2[1]);
if (local_40 == 0) {
dbuf_printf(&local_70,"%s<exception>",&DAT_0020de5c + (int)(uint)((local_74 != 0 ^ 0xffU) & 1)
);
uVar1 = local_28;
auVar3 = JS_GetException(local_28);
JS_FreeValue(uVar1,auVar3._0_8_,auVar3._8_8_);
}
else {
dbuf_printf(&local_70,&DAT_0020a251,&DAT_0020de5c + (int)(uint)((local_74 != 0 ^ 0xffU) & 1),
local_40);
JS_FreeCString(local_28,local_40);
}
}
dbuf_putc(&local_70,10);
fwrite(local_70,1,local_68,*(FILE **)PTR_stdout_00235fb0);
fflush(*(FILE **)PTR_stdout_00235fb0);
dbuf_free(&local_70);
auVar3._8_8_ = 3;
auVar3._0_8_ = (ulong)uStack_c << 0x20;
return auVar3;
}
|
|
18,757
|
js_print
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_print(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
#ifdef _WIN32
HANDLE handle;
DWORD mode;
#endif
const char *s;
DynBuf b;
int i;
dbuf_init(&b);
for(i = 0; i < argc; i++) {
s = JS_ToCString(ctx, argv[i]);
if (s) {
dbuf_printf(&b, "%s%s", &" "[!i], s);
JS_FreeCString(ctx, s);
} else {
dbuf_printf(&b, "%s<exception>", &" "[!i]);
JS_FreeValue(ctx, JS_GetException(ctx));
}
}
dbuf_putc(&b, '\n');
#ifdef _WIN32
// use WriteConsoleA with CP_UTF8 for better Unicode handling vis-a-vis
// the mangling that happens when going through msvcrt's stdio layer,
// *except* when stdout is redirected to something that is not a console
handle = (HANDLE)_get_osfhandle(/*STDOUT_FILENO*/1); // don't CloseHandle
if (GetFileType(handle) != FILE_TYPE_CHAR)
goto fallback;
if (!GetConsoleMode(handle, &mode))
goto fallback;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
if (handle == INVALID_HANDLE_VALUE)
goto fallback;
mode = GetConsoleOutputCP();
SetConsoleOutputCP(CP_UTF8);
WriteConsoleA(handle, b.buf, b.size, NULL, NULL);
SetConsoleOutputCP(mode);
FlushFileBuffers(handle);
goto done;
fallback:
#endif
fwrite(b.buf, 1, b.size, stdout);
fflush(stdout);
goto done; // avoid unused label warning
done:
dbuf_free(&b);
return JS_UNDEFINED;
}
|
O1
|
c
|
js_print:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdi, %r14
leaq 0x8(%rsp), %rdi
callq 0x1b35b
testl %ebp, %ebp
jle 0x150f2
movl %ebp, %r15d
shlq $0x4, %r15
leaq 0x8(%rsp), %r12
xorl %r13d, %r13d
movq (%rbx,%r13), %rdx
movq 0x8(%rbx,%r13), %rcx
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20bf7
cmpq $0x1, %r13
leaq 0x89d60(%rip), %rdx # 0x9edf8
adcq $0x0, %rdx
testq %rax, %rax
je 0x150c5
movq %rax, %rbp
movq %r12, %rdi
leaq 0x8708b(%rip), %rsi # 0x9c139
movq %rax, %rcx
xorl %eax, %eax
callq 0x1b50f
movq %r14, %rdi
movq %rbp, %rsi
callq 0x20edd
jmp 0x150e9
movq %r12, %rdi
leaq 0x8706f(%rip), %rsi # 0x9c13e
xorl %eax, %eax
callq 0x1b50f
movq %r14, %rdi
callq 0x2236b
movq %r14, %rdi
movq %rax, %rsi
callq 0x1d8b3
addq $0x10, %r13
cmpq %r13, %r15
jne 0x15077
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x1b4d0
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
movq 0xb7e9e(%rip), %r14 # 0xccfb0
movq (%r14), %rcx
movl $0x1, %esi
callq 0xe8d0
movq (%r14), %rdi
callq 0xe680
movq %rbx, %rdi
callq 0x1b62a
movl $0x3, %edx
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_print:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r8
mov ebp, ecx
mov r14, rdi
lea rdi, [rsp+68h+var_60]
call dbuf_init
test ebp, ebp
jle loc_150F2
mov r15d, ebp
shl r15, 4
lea r12, [rsp+68h+var_60]
xor r13d, r13d
loc_15077:
mov rdx, [rbx+r13]
mov rcx, [rbx+r13+8]
mov rdi, r14
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
cmp r13, 1
lea rdx, asc_9EDEF+9; " "
adc rdx, 0
test rax, rax
jz short loc_150C5
mov rbp, rax
mov rdi, r12
lea rsi, aSS; "%s%s"
mov rcx, rax
xor eax, eax
call dbuf_printf
mov rdi, r14
mov rsi, rbp
call JS_FreeCString
jmp short loc_150E9
loc_150C5:
mov rdi, r12
lea rsi, aSException; "%s<exception>"
xor eax, eax
call dbuf_printf
mov rdi, r14
call JS_GetException
mov rdi, r14
mov rsi, rax
call JS_FreeValue
loc_150E9:
add r13, 10h
cmp r15, r13
jnz short loc_15077
loc_150F2:
lea rbx, [rsp+68h+var_60]
mov rdi, rbx
mov esi, 0Ah
call dbuf_putc
mov rdi, [rbx]
mov rdx, [rbx+8]
mov r14, cs:stdout_ptr
mov rcx, [r14]
mov esi, 1
call _fwrite
mov rdi, [r14]
call _fflush
mov rdi, rbx
call dbuf_free
mov edx, 3
xor eax, eax
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long js_print(long long a1, long long a2, long long a3, int a4, long long a5)
{
long long v7; // r15
long long v8; // r13
long long v9; // rax
int v10; // ecx
int v11; // r8d
int v12; // r9d
char *v13; // rdx
long long v14; // rbp
long long Exception; // rax
long long v16; // rdx
char v18; // [rsp+0h] [rbp-68h]
_QWORD v19[12]; // [rsp+8h] [rbp-60h] BYREF
dbuf_init(v19);
if ( a4 > 0 )
{
v7 = 16LL * (unsigned int)a4;
v8 = 0LL;
do
{
v9 = JS_ToCStringLen2(a1, 0LL, *(_QWORD *)(a5 + v8), *(_QWORD *)(a5 + v8 + 8), 0LL);
v13 = &asc_9EDEF[(v8 == 0) + 9];
if ( v9 )
{
v14 = v9;
dbuf_printf((unsigned int)v19, (unsigned int)"%s%s", (_DWORD)v13, v9, v11, v12, v18);
JS_FreeCString(a1, v14);
}
else
{
dbuf_printf((unsigned int)v19, (unsigned int)"%s<exception>", (_DWORD)v13, v10, v11, v12, v18);
Exception = JS_GetException(a1);
JS_FreeValue(a1, Exception, v16);
}
v8 += 16LL;
}
while ( v7 != v8 );
}
dbuf_putc(v19, 10LL);
fwrite(v19[0], 1LL, v19[1], stdout);
fflush(stdout);
dbuf_free(v19);
return 0LL;
}
|
js_print:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R8
MOV EBP,ECX
MOV R14,RDI
LEA RDI,[RSP + 0x8]
CALL 0x0011b35b
TEST EBP,EBP
JLE 0x001150f2
MOV R15D,EBP
SHL R15,0x4
LEA R12,[RSP + 0x8]
XOR R13D,R13D
LAB_00115077:
MOV RDX,qword ptr [RBX + R13*0x1]
MOV RCX,qword ptr [RBX + R13*0x1 + 0x8]
MOV RDI,R14
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00120bf7
CMP R13,0x1
LEA RDX,[0x19edf8]
ADC RDX,0x0
TEST RAX,RAX
JZ 0x001150c5
MOV RBP,RAX
MOV RDI,R12
LEA RSI,[0x19c139]
MOV RCX,RAX
XOR EAX,EAX
CALL 0x0011b50f
MOV RDI,R14
MOV RSI,RBP
CALL 0x00120edd
JMP 0x001150e9
LAB_001150c5:
MOV RDI,R12
LEA RSI,[0x19c13e]
XOR EAX,EAX
CALL 0x0011b50f
MOV RDI,R14
CALL 0x0012236b
MOV RDI,R14
MOV RSI,RAX
CALL 0x0011d8b3
LAB_001150e9:
ADD R13,0x10
CMP R15,R13
JNZ 0x00115077
LAB_001150f2:
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xa
CALL 0x0011b4d0
MOV RDI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV R14,qword ptr [0x001ccfb0]
MOV RCX,qword ptr [R14]
MOV ESI,0x1
CALL 0x0010e8d0
MOV RDI,qword ptr [R14]
CALL 0x0010e680
MOV RDI,RBX
CALL 0x0011b62a
MOV EDX,0x3
XOR EAX,EAX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_print(int8 param_1,int8 param_2,int8 param_3,uint param_4,long param_5)
{
int *puVar1;
long lVar2;
long lVar3;
void *local_60;
size_t local_58;
dbuf_init(&local_60);
if (0 < (int)param_4) {
lVar3 = 0;
do {
lVar2 = JS_ToCStringLen2(param_1,0,*(int8 *)(param_5 + lVar3),
*(int8 *)(param_5 + 8 + lVar3),0);
if (lVar2 == 0) {
dbuf_printf(&local_60,"%s<exception>",&DAT_0019edf8 + (lVar3 == 0));
JS_GetException(param_1);
JS_FreeValue(param_1);
}
else {
dbuf_printf(&local_60,&DAT_0019c139,&DAT_0019edf8 + (lVar3 == 0),lVar2);
JS_FreeCString(param_1);
}
lVar3 = lVar3 + 0x10;
} while ((ulong)param_4 << 4 != lVar3);
}
dbuf_putc(&local_60,10);
puVar1 = PTR_stdout_001ccfb0;
fwrite(local_60,1,local_58,*(FILE **)PTR_stdout_001ccfb0);
fflush(*(FILE **)puVar1);
dbuf_free(&local_60);
return ZEXT816(3) << 0x40;
}
|
|
18,758
|
js_print
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_print(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
#ifdef _WIN32
HANDLE handle;
DWORD mode;
#endif
const char *s;
DynBuf b;
int i;
dbuf_init(&b);
for(i = 0; i < argc; i++) {
s = JS_ToCString(ctx, argv[i]);
if (s) {
dbuf_printf(&b, "%s%s", &" "[!i], s);
JS_FreeCString(ctx, s);
} else {
dbuf_printf(&b, "%s<exception>", &" "[!i]);
JS_FreeValue(ctx, JS_GetException(ctx));
}
}
dbuf_putc(&b, '\n');
#ifdef _WIN32
// use WriteConsoleA with CP_UTF8 for better Unicode handling vis-a-vis
// the mangling that happens when going through msvcrt's stdio layer,
// *except* when stdout is redirected to something that is not a console
handle = (HANDLE)_get_osfhandle(/*STDOUT_FILENO*/1); // don't CloseHandle
if (GetFileType(handle) != FILE_TYPE_CHAR)
goto fallback;
if (!GetConsoleMode(handle, &mode))
goto fallback;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
if (handle == INVALID_HANDLE_VALUE)
goto fallback;
mode = GetConsoleOutputCP();
SetConsoleOutputCP(CP_UTF8);
WriteConsoleA(handle, b.buf, b.size, NULL, NULL);
SetConsoleOutputCP(mode);
FlushFileBuffers(handle);
goto done;
fallback:
#endif
fwrite(b.buf, 1, b.size, stdout);
fflush(stdout);
goto done; // avoid unused label warning
done:
dbuf_free(&b);
return JS_UNDEFINED;
}
|
O2
|
c
|
js_print:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movq %rdi, %r15
leaq 0x8(%rsp), %rdi
callq 0x15bc4
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
shlq $0x4, %r14
leaq 0x75d56(%rip), %rbp # 0x85d48
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x1006d
movq (%rbx,%r12), %rsi
movq 0x8(%rbx,%r12), %rdx
movq %r15, %rdi
callq 0x11a6c
cmpq $0x1, %r12
movq %rbp, %rdx
adcq $0x0, %rdx
testq %rax, %rax
je 0x10041
movq %rax, %r13
leaq 0x8(%rsp), %rdi
leaq 0x730b8(%rip), %rsi # 0x830e2
movq %rax, %rcx
xorl %eax, %eax
callq 0x15d70
movq %r15, %rdi
movq %r13, %rsi
callq 0x1b057
jmp 0x10067
leaq 0x8(%rsp), %rdi
leaq 0x7309a(%rip), %rsi # 0x830e7
xorl %eax, %eax
callq 0x15d70
movq %r15, %rdi
callq 0x1c481
movq %r15, %rdi
movq %rax, %rsi
callq 0x1801e
addq $0x10, %r12
jmp 0xfff5
leaq 0x8(%rsp), %rbx
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x15d33
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
movq 0xaaf25(%rip), %r14 # 0xbafb0
movq (%r14), %rcx
pushq $0x1
popq %rsi
callq 0xe8f0
movq (%r14), %rdi
callq 0xe6a0
movq %rbx, %rdi
callq 0x15e89
pushq $0x3
popq %rdx
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_print:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r8
mov r14d, ecx
mov r15, rdi
lea rdi, [rsp+68h+var_60]
call dbuf_init
xor eax, eax
test r14d, r14d
cmovle r14d, eax
shl r14, 4
lea rbp, asc_85D3F+9; " "
xor r12d, r12d
loc_FFF5:
cmp r14, r12
jz short loc_1006D
mov rsi, [rbx+r12]
mov rdx, [rbx+r12+8]
loc_10003:
mov rdi, r15
call JS_ToCString
cmp r12, 1
mov rdx, rbp
adc rdx, 0
test rax, rax
jz short loc_10041
mov r13, rax
lea rdi, [rsp+68h+var_60]
lea rsi, aSS; "%s%s"
mov rcx, rax
xor eax, eax
call dbuf_printf
mov rdi, r15
mov rsi, r13
call JS_FreeCString
jmp short loc_10067
loc_10041:
lea rdi, [rsp+68h+var_60]
lea rsi, aSException; "%s<exception>"
xor eax, eax
call dbuf_printf
mov rdi, r15
call JS_GetException
mov rdi, r15
mov rsi, rax
call JS_FreeValue
loc_10067:
add r12, 10h
jmp short loc_FFF5
loc_1006D:
lea rbx, [rsp+68h+var_60]
push 0Ah
pop rsi
mov rdi, rbx
call dbuf_putc
mov rdi, [rbx]
mov rdx, [rbx+8]
mov r14, cs:stdout_ptr
mov rcx, [r14]
push 1
pop rsi
call _fwrite
mov rdi, [r14]
call _fflush
mov rdi, rbx
call dbuf_free
push 3
pop rdx
xor eax, eax
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long js_print(long long a1, long long a2, long long a3, unsigned int a4, long long a5)
{
long long v6; // r14
long long v7; // r14
long long i; // r12
long long v9; // rax
int v10; // ecx
int v11; // r8d
int v12; // r9d
char *v13; // rdx
long long v14; // r13
long long Exception; // rax
long long v16; // rdx
char v18; // [rsp+0h] [rbp-68h]
_QWORD v19[12]; // [rsp+8h] [rbp-60h] BYREF
v6 = a4;
dbuf_init(v19);
if ( (int)v6 <= 0 )
v6 = 0LL;
v7 = 16 * v6;
for ( i = 0LL; v7 != i; i += 16LL )
{
v9 = JS_ToCString(a1, *(_QWORD *)(a5 + i), *(_QWORD *)(a5 + i + 8));
v13 = &asc_85D3F[(i == 0) + 9];
if ( v9 )
{
v14 = v9;
dbuf_printf((unsigned int)v19, (unsigned int)"%s%s", (_DWORD)v13, v9, v11, v12, v18);
JS_FreeCString(a1, v14);
}
else
{
dbuf_printf((unsigned int)v19, (unsigned int)"%s<exception>", (_DWORD)v13, v10, v11, v12, v18);
Exception = JS_GetException(a1);
JS_FreeValue(a1, Exception, v16);
}
}
dbuf_putc(v19, 10LL);
fwrite(v19[0], 1LL, v19[1], stdout);
fflush(stdout);
dbuf_free(v19);
return 0LL;
}
|
js_print:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R8
MOV R14D,ECX
MOV R15,RDI
LEA RDI,[RSP + 0x8]
CALL 0x00115bc4
XOR EAX,EAX
TEST R14D,R14D
CMOVLE R14D,EAX
SHL R14,0x4
LEA RBP,[0x185d48]
XOR R12D,R12D
LAB_0010fff5:
CMP R14,R12
JZ 0x0011006d
MOV RSI,qword ptr [RBX + R12*0x1]
MOV RDX,qword ptr [RBX + R12*0x1 + 0x8]
MOV RDI,R15
CALL 0x00111a6c
CMP R12,0x1
MOV RDX,RBP
ADC RDX,0x0
TEST RAX,RAX
JZ 0x00110041
MOV R13,RAX
LEA RDI,[RSP + 0x8]
LEA RSI,[0x1830e2]
MOV RCX,RAX
XOR EAX,EAX
CALL 0x00115d70
MOV RDI,R15
MOV RSI,R13
CALL 0x0011b057
JMP 0x00110067
LAB_00110041:
LEA RDI,[RSP + 0x8]
LEA RSI,[0x1830e7]
XOR EAX,EAX
CALL 0x00115d70
MOV RDI,R15
CALL 0x0011c481
MOV RDI,R15
MOV RSI,RAX
CALL 0x0011801e
LAB_00110067:
ADD R12,0x10
JMP 0x0010fff5
LAB_0011006d:
LEA RBX,[RSP + 0x8]
PUSH 0xa
POP RSI
MOV RDI,RBX
CALL 0x00115d33
MOV RDI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV R14,qword ptr [0x001bafb0]
MOV RCX,qword ptr [R14]
PUSH 0x1
POP RSI
CALL 0x0010e8f0
MOV RDI,qword ptr [R14]
CALL 0x0010e6a0
MOV RDI,RBX
CALL 0x00115e89
PUSH 0x3
POP RDX
XOR EAX,EAX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_print(int8 param_1,int8 param_2,int8 param_3,uint param_4,long param_5)
{
int *puVar1;
long lVar2;
int8 uVar3;
long lVar4;
ulong uVar5;
void *local_60;
size_t local_58;
uVar5 = (ulong)param_4;
dbuf_init(&local_60);
if ((int)param_4 < 1) {
uVar5 = 0;
}
for (lVar4 = 0; uVar5 * 0x10 != lVar4; lVar4 = lVar4 + 0x10) {
lVar2 = JS_ToCString(param_1,*(int8 *)(param_5 + lVar4),
*(int8 *)(param_5 + 8 + lVar4));
if (lVar2 == 0) {
dbuf_printf(&local_60,"%s<exception>",&DAT_00185d48 + (lVar4 == 0));
uVar3 = JS_GetException(param_1);
JS_FreeValue(param_1,uVar3);
}
else {
dbuf_printf(&local_60,&DAT_001830e2,&DAT_00185d48 + (lVar4 == 0),lVar2);
JS_FreeCString(param_1,lVar2);
}
}
dbuf_putc(&local_60,10);
puVar1 = PTR_stdout_001bafb0;
fwrite(local_60,1,local_58,*(FILE **)PTR_stdout_001bafb0);
fflush(*(FILE **)puVar1);
dbuf_free(&local_60);
return ZEXT816(3) << 0x40;
}
|
|
18,759
|
common_sampler_types_from_names(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, bool)
|
monkey531[P]llama/common/sampling.cpp
|
std::vector<common_sampler_type> common_sampler_types_from_names(const std::vector<std::string> & names, bool allow_alt_names) {
std::unordered_map<std::string, common_sampler_type> sampler_canonical_name_map {
{ "dry", COMMON_SAMPLER_TYPE_DRY },
{ "top_k", COMMON_SAMPLER_TYPE_TOP_K },
{ "top_p", COMMON_SAMPLER_TYPE_TOP_P },
{ "typ_p", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "min_p", COMMON_SAMPLER_TYPE_MIN_P },
{ "temperature", COMMON_SAMPLER_TYPE_TEMPERATURE },
{ "xtc", COMMON_SAMPLER_TYPE_XTC },
{ "infill", COMMON_SAMPLER_TYPE_INFILL },
{ "penalties", COMMON_SAMPLER_TYPE_PENALTIES },
};
// since samplers names are written multiple ways
// make it ready for both system names and input names
std::unordered_map<std::string, common_sampler_type> sampler_alt_name_map {
{ "top-k", COMMON_SAMPLER_TYPE_TOP_K },
{ "top-p", COMMON_SAMPLER_TYPE_TOP_P },
{ "nucleus", COMMON_SAMPLER_TYPE_TOP_P },
{ "typical-p", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "typical", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "typ-p", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "typ", COMMON_SAMPLER_TYPE_TYPICAL_P },
{ "min-p", COMMON_SAMPLER_TYPE_MIN_P },
{ "temp", COMMON_SAMPLER_TYPE_TEMPERATURE },
};
std::vector<common_sampler_type> samplers;
samplers.reserve(names.size());
for (const auto & name : names) {
auto sampler = sampler_canonical_name_map.find(name);
if (sampler != sampler_canonical_name_map.end()) {
samplers.push_back(sampler->second);
} else {
if (allow_alt_names) {
sampler = sampler_alt_name_map.find(name);
if (sampler != sampler_alt_name_map.end()) {
samplers.push_back(sampler->second);
}
}
}
}
return samplers;
}
|
O2
|
cpp
|
common_sampler_types_from_names(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x2051e(%rip), %rsi # 0xb859b
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x98960
leaq 0x90(%rsp), %r12
leaq 0x2c(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x204fb(%rip), %rsi # 0xb859f
movq %r12, %rdi
callq 0x98982
leaq 0xb8(%rsp), %r12
leaq 0x28(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x204e5(%rip), %rsi # 0xb85ab
movq %r12, %rdi
callq 0x98982
leaq 0xe0(%rsp), %r12
leaq 0x24(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x204bd(%rip), %rsi # 0xb85a5
movq %r12, %rdi
callq 0x98982
leaq 0x108(%rsp), %r12
leaq 0x20(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0x204a7(%rip), %rsi # 0xb85b1
movq %r12, %rdi
callq 0x98982
leaq 0x130(%rsp), %r12
leaq 0x1c(%rsp), %rdx
movl $0x7, (%rdx)
leaq 0x2048b(%rip), %rsi # 0xb85b7
movq %r12, %rdi
callq 0x989a4
leaq 0x158(%rsp), %r12
leaq 0x18(%rsp), %rdx
movl $0x8, (%rdx)
leaq 0x20475(%rip), %rsi # 0xb85c3
movq %r12, %rdi
callq 0x98960
leaq 0x180(%rsp), %r12
leaq 0x14(%rsp), %rdx
movl $0x9, (%rdx)
leaq 0x12a19(%rip), %rsi # 0xaab89
movq %r12, %rdi
callq 0x989c6
leaq 0x1a8(%rsp), %r12
leaq 0x10(%rsp), %rdx
movl $0xa, (%rdx)
leaq 0x20435(%rip), %rsi # 0xb85c7
movq %r12, %rdi
callq 0x989e8
leaq 0x1d0(%rsp), %rdx
leaq 0x9(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1d0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xc(%rsp), %r8
leaq 0xa(%rsp), %r9
xorl %ecx, %ecx
callq 0x98ff4
movl $0x140, %r15d # imm = 0x140
leaq (%rsp,%r15), %rdi
addq $0x68, %rdi
callq 0x241a8
addq $-0x28, %r15
cmpq $-0x28, %r15
jne 0x981cf
leaq 0x2c(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x12ba4(%rip), %rsi # 0xaad9c
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x98982
leaq 0x90(%rsp), %r12
leaq 0x28(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x12bb0(%rip), %rsi # 0xaadcf
movq %r12, %rdi
callq 0x98982
leaq 0xb8(%rsp), %r12
leaq 0x24(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x20390(%rip), %rsi # 0xb85d1
movq %r12, %rdi
callq 0x98a0a
leaq 0xe0(%rsp), %r12
leaq 0x20(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x20376(%rip), %rsi # 0xb85d9
movq %r12, %rdi
callq 0x989e8
leaq 0x108(%rsp), %r12
leaq 0x1c(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x12c38(%rip), %rsi # 0xaaebd
movq %r12, %rdi
callq 0x98a0a
leaq 0x130(%rsp), %r12
leaq 0x18(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x2033c(%rip), %rsi # 0xb85e3
movq %r12, %rdi
callq 0x98982
leaq 0x158(%rsp), %r12
leaq 0x14(%rsp), %rdx
movl $0x6, (%rdx)
leaq 0x20320(%rip), %rsi # 0xb85e9
movq %r12, %rdi
callq 0x98960
leaq 0x180(%rsp), %r12
leaq 0x10(%rsp), %rdx
movl $0x4, (%rdx)
leaq 0x12b1b(%rip), %rsi # 0xaae06
movq %r12, %rdi
callq 0x98982
leaq 0x1a8(%rsp), %r12
leaq 0xc(%rsp), %rdx
movl $0x7, (%rdx)
leaq 0x12a6c(%rip), %rsi # 0xaad79
movq %r12, %rdi
callq 0x98a2c
leaq 0x1d0(%rsp), %rdx
leaq 0xb(%rsp), %rax
movq %rax, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xa(%rsp), %r8
leaq 0x9(%rsp), %r9
xorl %ecx, %ecx
callq 0x98ff4
movl $0x140, %r15d # imm = 0x140
leaq (%rsp,%r15), %rdi
addq $0x68, %rdi
callq 0x241a8
addq $-0x28, %r15
cmpq $-0x28, %r15
jne 0x98347
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x5, %rsi
movq %rbx, %rdi
callq 0x98a4e
movq (%r14), %r15
movq 0x8(%r14), %r13
leaq 0x1d0(%rsp), %r14
leaq 0x30(%rsp), %r12
cmpq %r13, %r15
je 0x983d1
movq %r14, %rdi
movq %r15, %rsi
callq 0x994bc
testq %rax, %rax
je 0x983b6
addq $0x28, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x98ae4
jmp 0x983cb
testb %bpl, %bpl
je 0x983cb
movq %r12, %rdi
movq %r15, %rsi
callq 0x994bc
testq %rax, %rax
jne 0x983a5
addq $0x20, %r15
jmp 0x98390
leaq 0x30(%rsp), %rdi
callq 0x98d68
leaq 0x1d0(%rsp), %rdi
callq 0x98d68
movq %rbx, %rax
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x984c4
movq %rax, %r14
movl $0x140, %ebx # imm = 0x140
leaq (%rsp,%rbx), %rdi
addq $0x68, %rdi
callq 0x241a8
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x9840a
movb $0x1, %al
jmp 0x98438
jmp 0x98433
jmp 0x98433
jmp 0x98433
jmp 0x98433
jmp 0x98433
jmp 0x98433
jmp 0x98433
movq %rax, %r14
xorl %eax, %eax
cmpq %r12, %r15
sete %cl
testb %al, %al
jne 0x984d9
testb %cl, %cl
jne 0x984d9
addq $-0x28, %r12
movq %r12, %rdi
callq 0x241a8
cmpq %r15, %r12
jne 0x9844e
jmp 0x984d9
movq %rax, %r14
jmp 0x984d9
movq %rax, %r14
movl $0x140, %ebx # imm = 0x140
leaq (%rsp,%rbx), %rdi
addq $0x68, %rdi
callq 0x241a8
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x9846e
movb $0x1, %al
jmp 0x9849c
jmp 0x98497
jmp 0x98497
jmp 0x98497
jmp 0x98497
jmp 0x98497
jmp 0x98497
jmp 0x98497
movq %rax, %r14
xorl %eax, %eax
cmpq %r12, %r15
sete %cl
testb %al, %al
jne 0x984e6
testb %cl, %cl
jne 0x984e6
addq $-0x28, %r12
movq %r12, %rdi
callq 0x241a8
cmpq %r15, %r12
jne 0x984aa
jmp 0x984e6
movq %rax, %r14
jmp 0x984e6
jmp 0x984c4
movq %rax, %r14
movq %rbx, %rdi
callq 0x27720
leaq 0x30(%rsp), %rdi
callq 0x98d68
leaq 0x1d0(%rsp), %rdi
callq 0x98d68
movq %r14, %rdi
callq 0x23f70
|
_Z31common_sampler_types_from_namesRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 208h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea rdx, [rsp+238h+var_208]
mov dword ptr [rdx], 1
lea rsi, aDry; "dry"
lea r15, [rsp+238h+var_1D0]
mov rdi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_1A8]
lea rdx, [rsp+238h+var_20C]
mov dword ptr [rdx], 2
lea rsi, aTopK_0; "top_k"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_180]
lea rdx, [rsp+238h+var_210]
mov dword ptr [rdx], 3
lea rsi, aTopP_0; "top_p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_158]
lea rdx, [rsp+238h+var_214]
mov dword ptr [rdx], 6
lea rsi, aTypP; "typ_p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_130]
lea rdx, [rsp+238h+var_218]
mov dword ptr [rdx], 4
lea rsi, aMinP_0; "min_p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_108]
lea rdx, [rsp+238h+var_21C]
mov dword ptr [rdx], 7
lea rsi, aTemperature; "temperature"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_E0]
lea rdx, [rsp+238h+var_220]
mov dword ptr [rdx], 8
lea rsi, aXtc; "xtc"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_B8]
lea rdx, [rsp+238h+var_224]
mov dword ptr [rdx], 9
lea rsi, aSpmInfill+6; "infill"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_90]
lea rdx, [rsp+238h+var_228]
mov dword ptr [rdx], 0Ah
lea rsi, aPenalties; "penalties"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea rdx, [rsp+238h+var_68]
lea rax, [rsp+238h+var_22F]
mov [rsp+238h+var_238], rax
lea rdi, [rsp+238h+var_68]
lea rsi, [rsp+238h+var_1D0]
lea r8, [rsp+238h+var_22C]
lea r9, [rsp+238h+var_22E]
xor ecx, ecx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKS9_EET_SQ_mRKSG_RKSE_RKSA_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(std::pair<std::string const,common_sampler_type> const*,std::pair<std::string const,common_sampler_type> const*,ulong,std::hash<std::string> const&,std::equal_to<std::string> const&,std::allocator<std::pair<std::string const,common_sampler_type>> const&,std::integral_constant<bool,true>)
mov r15d, 140h
loc_981CF:
lea rdi, [rsp+r15+238h+var_238]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add r15, 0FFFFFFFFFFFFFFD8h
cmp r15, 0FFFFFFFFFFFFFFD8h
jnz short loc_981CF
lea rdx, [rsp+238h+var_20C]
mov dword ptr [rdx], 2
lea rsi, aTopK+2; "top-k"
lea r15, [rsp+238h+var_1D0]
mov rdi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_1A8]
lea rdx, [rsp+238h+var_210]
mov dword ptr [rdx], 3
lea rsi, aTopP+2; "top-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_180]
lea rdx, [rsp+238h+var_214]
mov dword ptr [rdx], 3
lea rsi, aNucleus; "nucleus"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_158]
lea rdx, [rsp+238h+var_218]
mov dword ptr [rdx], 6
lea rsi, aTypicalP; "typical-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_130]
lea rdx, [rsp+238h+var_21C]
mov dword ptr [rdx], 6
lea rsi, aTypical+2; "typical"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_108]
lea rdx, [rsp+238h+var_220]
mov dword ptr [rdx], 6
lea rsi, aTypP_0; "typ-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_E0]
lea rdx, [rsp+238h+var_224]
mov dword ptr [rdx], 6
lea rsi, aTyp; "typ"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_B8]
lea rdx, [rsp+238h+var_228]
mov dword ptr [rdx], 4
lea rsi, aMinP+2; "min-p"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea r12, [rsp+238h+var_90]
lea rdx, [rsp+238h+var_22C]
mov dword ptr [rdx], 7
lea rsi, aTemp+2; "temp"
mov rdi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
lea rdx, [rsp+238h+var_68]
lea rax, [rsp+238h+var_22D]
mov [rsp+238h+var_238], rax
lea rdi, [rsp+238h+var_208]
lea rsi, [rsp+238h+var_1D0]
lea r8, [rsp+238h+var_22E]
lea r9, [rsp+238h+var_22F]
xor ecx, ecx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEEC2IPKS9_EET_SQ_mRKSG_RKSE_RKSA_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(std::pair<std::string const,common_sampler_type> const*,std::pair<std::string const,common_sampler_type> const*,ulong,std::hash<std::string> const&,std::equal_to<std::string> const&,std::allocator<std::pair<std::string const,common_sampler_type>> const&,std::integral_constant<bool,true>)
mov r15d, 140h
loc_98347:
lea rdi, [rsp+r15+238h+var_238]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add r15, 0FFFFFFFFFFFFFFD8h
cmp r15, 0FFFFFFFFFFFFFFD8h
jnz short loc_98347
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
and qword ptr [rbx+10h], 0
mov rsi, [r14+8]
sub rsi, [r14]
sar rsi, 5
mov rdi, rbx
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE7reserveEm; std::vector<common_sampler_type>::reserve(ulong)
mov r15, [r14]
mov r13, [r14+8]
lea r14, [rsp+238h+var_68]
lea r12, [rsp+238h+var_208]
loc_98390:
cmp r15, r13
jz short loc_983D1
mov rdi, r14
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jz short loc_983B6
loc_983A5:
add rax, 28h ; '('
mov rdi, rbx
mov rsi, rax
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE9push_backERKS0_; std::vector<common_sampler_type>::push_back(common_sampler_type const&)
jmp short loc_983CB
loc_983B6:
test bpl, bpl
jz short loc_983CB
mov rdi, r12
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jnz short loc_983A5
loc_983CB:
add r15, 20h ; ' '
jmp short loc_98390
loc_983D1:
lea rdi, [rsp+238h+var_208]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea rdi, [rsp+238h+var_68]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rax, rbx
add rsp, 208h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_984C4
mov r14, rax
mov ebx, 140h
loc_9840A:
lea rdi, [rsp+rbx+0]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rbx, 0FFFFFFFFFFFFFFD8h
cmp rbx, 0FFFFFFFFFFFFFFD8h
jnz short loc_9840A
mov al, 1
jmp short loc_98438
jmp short loc_98433
jmp short loc_98433
jmp short loc_98433
jmp short loc_98433
jmp short loc_98433
jmp short loc_98433
jmp short $+2
loc_98433:
mov r14, rax
xor eax, eax
loc_98438:
cmp r15, r12
setz cl
test al, al
jnz loc_984D9
test cl, cl
jnz loc_984D9
loc_9844E:
add r12, 0FFFFFFFFFFFFFFD8h
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r12, r15
jnz short loc_9844E
jmp short loc_984D9
mov r14, rax
jmp short loc_984D9
mov r14, rax
mov ebx, 140h
loc_9846E:
lea rdi, [rsp+rbx+0]
add rdi, 68h ; 'h'; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rbx, 0FFFFFFFFFFFFFFD8h
cmp rbx, 0FFFFFFFFFFFFFFD8h
jnz short loc_9846E
mov al, 1
jmp short loc_9849C
jmp short loc_98497
jmp short loc_98497
jmp short loc_98497
jmp short loc_98497
jmp short loc_98497
jmp short loc_98497
jmp short $+2
loc_98497:
mov r14, rax
xor eax, eax
loc_9849C:
cmp r15, r12
setz cl
test al, al
jnz short loc_984E6
test cl, cl
jnz short loc_984E6
loc_984AA:
add r12, 0FFFFFFFFFFFFFFD8h
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp r12, r15
jnz short loc_984AA
jmp short loc_984E6
mov r14, rax
jmp short loc_984E6
jmp short $+2
loc_984C4:
mov r14, rax
mov rdi, rbx
call _ZNSt12_Vector_baseI19common_sampler_typeSaIS0_EED2Ev; std::_Vector_base<common_sampler_type>::~_Vector_base()
lea rdi, [rsp+arg_28]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
loc_984D9:
lea rdi, [rsp+arg_1C8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_19common_sampler_typeESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
loc_984E6:
mov rdi, r14
call __Unwind_Resume
|
long long common_sampler_types_from_names(long long a1, long long *a2, char a3)
{
long long i; // r15
long long j; // r15
long long v6; // r15
long long v7; // r13
long long v8; // rax
char v10; // [rsp+9h] [rbp-22Fh] BYREF
char v11; // [rsp+Ah] [rbp-22Eh] BYREF
char v12; // [rsp+Bh] [rbp-22Dh] BYREF
int v13; // [rsp+Ch] [rbp-22Ch] BYREF
int v14; // [rsp+10h] [rbp-228h] BYREF
int v15; // [rsp+14h] [rbp-224h] BYREF
int v16; // [rsp+18h] [rbp-220h] BYREF
int v17; // [rsp+1Ch] [rbp-21Ch] BYREF
int v18; // [rsp+20h] [rbp-218h] BYREF
int v19; // [rsp+24h] [rbp-214h] BYREF
int v20; // [rsp+28h] [rbp-210h] BYREF
int v21; // [rsp+2Ch] [rbp-20Ch] BYREF
_DWORD v22[14]; // [rsp+30h] [rbp-208h] BYREF
_BYTE v23[40]; // [rsp+68h] [rbp-1D0h] BYREF
_BYTE v24[40]; // [rsp+90h] [rbp-1A8h] BYREF
_BYTE v25[40]; // [rsp+B8h] [rbp-180h] BYREF
_BYTE v26[40]; // [rsp+E0h] [rbp-158h] BYREF
_BYTE v27[40]; // [rsp+108h] [rbp-130h] BYREF
_BYTE v28[40]; // [rsp+130h] [rbp-108h] BYREF
_BYTE v29[40]; // [rsp+158h] [rbp-E0h] BYREF
_BYTE v30[40]; // [rsp+180h] [rbp-B8h] BYREF
_BYTE v31[40]; // [rsp+1A8h] [rbp-90h] BYREF
_BYTE v32[104]; // [rsp+1D0h] [rbp-68h] BYREF
v22[0] = 1;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v23,
"dry",
v22);
v21 = 2;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v24,
"top_k",
&v21);
v20 = 3;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v25,
"top_p",
&v20);
v19 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v26,
"typ_p",
&v19);
v18 = 4;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v27,
"min_p",
&v18);
v17 = 7;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v28,
"temperature",
&v17);
v16 = 8;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v29,
"xtc",
&v16);
v15 = 9;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v30,
"infill",
&v15);
v14 = 10;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v31,
"penalties",
&v14);
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(
(unsigned int)v32,
(unsigned int)v23,
(unsigned int)v32,
0,
(unsigned int)&v13,
(unsigned int)&v11,
(long long)&v10);
for ( i = 320LL; i != -40; i -= 40LL )
std::string::~string(&v23[i]);
v21 = 2;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v23,
"top-k",
&v21);
v20 = 3;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v24,
"top-p",
&v20);
v19 = 3;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v25,
"nucleus",
&v19);
v18 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v26,
"typical-p",
&v18);
v17 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v27,
"typical",
&v17);
v16 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v28,
"typ-p",
&v16);
v15 = 6;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v29,
"typ",
&v15);
v14 = 4;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v30,
"min-p",
&v14);
v13 = 7;
ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(
v31,
"temp",
&v13);
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_Hashtable<std::pair<std::string const,common_sampler_type> const*>(
(unsigned int)v22,
(unsigned int)v23,
(unsigned int)v32,
0,
(unsigned int)&v11,
(unsigned int)&v10,
(long long)&v12);
for ( j = 320LL; j != -40; j -= 40LL )
std::string::~string(&v23[j]);
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::vector<common_sampler_type>::reserve(a1, (a2[1] - *a2) >> 5);
v6 = *a2;
v7 = a2[1];
while ( v6 != v7 )
{
v8 = std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v32,
v6);
if ( v8
|| a3
&& (v8 = std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
v22,
v6)) != 0 )
{
std::vector<common_sampler_type>::push_back(a1, v8 + 40);
}
v6 += 32LL;
}
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v22);
std::_Hashtable<std::string,std::pair<std::string const,common_sampler_type>,std::allocator<std::pair<std::string const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v32);
return a1;
}
|
common_sampler_types_from_names:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x208
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RDX,[RSP + 0x30]
MOV dword ptr [RDX],0x1
LAB_00198076:
LEA RSI,[0x1b859b]
LEA R15,[RSP + 0x68]
MOV RDI,R15
CALL 0x00198960
LEA R12,[RSP + 0x90]
LEA RDX,[RSP + 0x2c]
MOV dword ptr [RDX],0x2
LAB_0019809d:
LEA RSI,[0x1b859f]
MOV RDI,R12
CALL 0x00198982
LEA R12,[RSP + 0xb8]
LEA RDX,[RSP + 0x28]
MOV dword ptr [RDX],0x3
LAB_001980bf:
LEA RSI,[0x1b85ab]
MOV RDI,R12
CALL 0x00198982
LEA R12,[RSP + 0xe0]
LEA RDX,[RSP + 0x24]
MOV dword ptr [RDX],0x6
LAB_001980e1:
LEA RSI,[0x1b85a5]
MOV RDI,R12
CALL 0x00198982
LEA R12,[RSP + 0x108]
LEA RDX,[RSP + 0x20]
MOV dword ptr [RDX],0x4
LAB_00198103:
LEA RSI,[0x1b85b1]
MOV RDI,R12
CALL 0x00198982
LEA R12,[RSP + 0x130]
LEA RDX,[RSP + 0x1c]
MOV dword ptr [RDX],0x7
LAB_00198125:
LEA RSI,[0x1b85b7]
MOV RDI,R12
CALL 0x001989a4
LEA R12,[RSP + 0x158]
LEA RDX,[RSP + 0x18]
MOV dword ptr [RDX],0x8
LAB_00198147:
LEA RSI,[0x1b85c3]
MOV RDI,R12
CALL 0x00198960
LEA R12,[RSP + 0x180]
LEA RDX,[RSP + 0x14]
MOV dword ptr [RDX],0x9
LAB_00198169:
LEA RSI,[0x1aab89]
MOV RDI,R12
CALL 0x001989c6
LEA R12,[RSP + 0x1a8]
LEA RDX,[RSP + 0x10]
MOV dword ptr [RDX],0xa
LAB_0019818b:
LEA RSI,[0x1b85c7]
MOV RDI,R12
CALL 0x001989e8
LEA RDX,[RSP + 0x1d0]
LAB_001981a2:
LEA RAX,[RSP + 0x9]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x1d0]
LEA RSI,[RSP + 0x68]
LEA R8,[RSP + 0xc]
LEA R9,[RSP + 0xa]
XOR ECX,ECX
CALL 0x00198ff4
MOV R15D,0x140
LAB_001981cf:
LEA RDI,[RSP + R15*0x1]
ADD RDI,0x68
CALL 0x001241a8
ADD R15,-0x28
CMP R15,-0x28
JNZ 0x001981cf
LEA RDX,[RSP + 0x2c]
MOV dword ptr [RDX],0x2
LAB_001981f1:
LEA RSI,[0x1aad9c]
LEA R15,[RSP + 0x68]
MOV RDI,R15
CALL 0x00198982
LEA R12,[RSP + 0x90]
LEA RDX,[RSP + 0x28]
MOV dword ptr [RDX],0x3
LAB_00198218:
LEA RSI,[0x1aadcf]
MOV RDI,R12
CALL 0x00198982
LEA R12,[RSP + 0xb8]
LEA RDX,[RSP + 0x24]
MOV dword ptr [RDX],0x3
LAB_0019823a:
LEA RSI,[0x1b85d1]
MOV RDI,R12
CALL 0x00198a0a
LEA R12,[RSP + 0xe0]
LEA RDX,[RSP + 0x20]
MOV dword ptr [RDX],0x6
LAB_0019825c:
LEA RSI,[0x1b85d9]
MOV RDI,R12
CALL 0x001989e8
LEA R12,[RSP + 0x108]
LEA RDX,[RSP + 0x1c]
MOV dword ptr [RDX],0x6
LAB_0019827e:
LEA RSI,[0x1aaebd]
MOV RDI,R12
CALL 0x00198a0a
LEA R12,[RSP + 0x130]
LEA RDX,[RSP + 0x18]
MOV dword ptr [RDX],0x6
LAB_001982a0:
LEA RSI,[0x1b85e3]
MOV RDI,R12
CALL 0x00198982
LEA R12,[RSP + 0x158]
LEA RDX,[RSP + 0x14]
MOV dword ptr [RDX],0x6
LAB_001982c2:
LEA RSI,[0x1b85e9]
MOV RDI,R12
CALL 0x00198960
LEA R12,[RSP + 0x180]
LEA RDX,[RSP + 0x10]
MOV dword ptr [RDX],0x4
LAB_001982e4:
LEA RSI,[0x1aae06]
MOV RDI,R12
CALL 0x00198982
LEA R12,[RSP + 0x1a8]
LEA RDX,[RSP + 0xc]
MOV dword ptr [RDX],0x7
LAB_00198306:
LEA RSI,[0x1aad79]
MOV RDI,R12
CALL 0x00198a2c
LEA RDX,[RSP + 0x1d0]
LAB_0019831d:
LEA RAX,[RSP + 0xb]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x68]
LEA R8,[RSP + 0xa]
LEA R9,[RSP + 0x9]
XOR ECX,ECX
CALL 0x00198ff4
MOV R15D,0x140
LAB_00198347:
LEA RDI,[RSP + R15*0x1]
ADD RDI,0x68
CALL 0x001241a8
ADD R15,-0x28
CMP R15,-0x28
JNZ 0x00198347
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RBX + 0x10],0x0
MOV RSI,qword ptr [R14 + 0x8]
SUB RSI,qword ptr [R14]
SAR RSI,0x5
LAB_00198374:
MOV RDI,RBX
CALL 0x00198a4e
MOV R15,qword ptr [R14]
MOV R13,qword ptr [R14 + 0x8]
LEA R14,[RSP + 0x1d0]
LEA R12,[RSP + 0x30]
LAB_00198390:
CMP R15,R13
JZ 0x001983d1
LAB_00198395:
MOV RDI,R14
MOV RSI,R15
CALL 0x001994bc
TEST RAX,RAX
JZ 0x001983b6
LAB_001983a5:
ADD RAX,0x28
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00198ae4
JMP 0x001983cb
LAB_001983b6:
TEST BPL,BPL
JZ 0x001983cb
LAB_001983bb:
MOV RDI,R12
MOV RSI,R15
CALL 0x001994bc
LAB_001983c6:
TEST RAX,RAX
JNZ 0x001983a5
LAB_001983cb:
ADD R15,0x20
JMP 0x00198390
LAB_001983d1:
LEA RDI,[RSP + 0x30]
CALL 0x00198d68
LEA RDI,[RSP + 0x1d0]
CALL 0x00198d68
MOV RAX,RBX
ADD RSP,0x208
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_sampler_types_from_names(std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, bool) */
vector * common_sampler_types_from_names(vector *param_1,bool param_2)
{
string *psVar1;
char in_DL;
int7 in_register_00000031;
long *plVar2;
long lVar3;
string *psVar4;
int1 local_22f;
int1 local_22e;
int1 local_22d;
int4 local_22c;
int4 local_228;
int4 local_224;
int4 local_220;
int4 local_21c;
int4 local_218;
int4 local_214;
int4 local_210;
int4 local_20c;
int4 local_208 [14];
string local_1d0 [40];
int1 local_1a8 [40];
int1 local_180 [40];
int1 local_158 [40];
int1 local_130 [40];
int1 local_108 [40];
int1 local_e0 [40];
int1 local_b8 [40];
int1 local_90 [40];
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
local_68 [56];
plVar2 = (long *)CONCAT71(in_register_00000031,param_2);
local_208[0] = 1;
/* try { // try from 00198076 to 00198089 has its CatchHandler @ 001984bd */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1d0,&DAT_001b859b);
local_20c = 2;
/* try { // try from 0019809d to 001980ab has its CatchHandler @ 00198497 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1a8,"top_k");
local_210 = 3;
/* try { // try from 001980bf to 001980cd has its CatchHandler @ 00198495 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_180,"top_p");
local_214 = 6;
/* try { // try from 001980e1 to 001980ef has its CatchHandler @ 00198493 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_158,"typ_p");
local_218 = 4;
/* try { // try from 00198103 to 00198111 has its CatchHandler @ 00198491 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_130,"min_p");
local_21c = 7;
/* try { // try from 00198125 to 00198133 has its CatchHandler @ 0019848f */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA12_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_108,"temperature");
local_220 = 8;
/* try { // try from 00198147 to 00198155 has its CatchHandler @ 0019848d */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_e0,&DAT_001b85c3);
local_224 = 9;
/* try { // try from 00198169 to 00198177 has its CatchHandler @ 0019848b */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA7_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_b8,"infill");
local_228 = 10;
/* try { // try from 0019818b to 00198199 has its CatchHandler @ 00198489 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_90,"penalties");
/* try { // try from 001981a2 to 001981c8 has its CatchHandler @ 00198466 */
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::_Hashtable<std::pair<std::__cxx11::string_const,common_sampler_type>const*>
(local_68,local_1d0,local_68,0,&local_22c,&local_22e,&local_22f);
lVar3 = 0x140;
do {
std::__cxx11::string::~string(local_1d0 + lVar3);
lVar3 = lVar3 + -0x28;
} while (lVar3 != -0x28);
local_20c = 2;
/* try { // try from 001981f1 to 00198204 has its CatchHandler @ 00198461 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1d0,"top-k");
local_210 = 3;
/* try { // try from 00198218 to 00198226 has its CatchHandler @ 00198433 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_1a8,"top-p");
local_214 = 3;
/* try { // try from 0019823a to 00198248 has its CatchHandler @ 00198431 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_180,"nucleus");
local_218 = 6;
/* try { // try from 0019825c to 0019826a has its CatchHandler @ 0019842f */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA10_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_158,"typical-p");
local_21c = 6;
/* try { // try from 0019827e to 0019828c has its CatchHandler @ 0019842d */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA8_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_130,"typical");
local_220 = 6;
/* try { // try from 001982a0 to 001982ae has its CatchHandler @ 0019842b */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_108,"typ-p");
local_224 = 6;
/* try { // try from 001982c2 to 001982d0 has its CatchHandler @ 00198429 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA4_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_e0,&DAT_001b85e9);
local_228 = 4;
/* try { // try from 001982e4 to 001982f2 has its CatchHandler @ 00198427 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA6_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_b8,"min-p");
local_22c = 7;
/* try { // try from 00198306 to 00198314 has its CatchHandler @ 00198425 */
_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE19common_sampler_typeEC2IRA5_KcS7_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_
(local_90,"temp");
/* try { // try from 0019831d to 00198340 has its CatchHandler @ 00198402 */
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::_Hashtable<std::pair<std::__cxx11::string_const,common_sampler_type>const*>
(local_208,local_1d0,local_68,0,&local_22e,&local_22f,&local_22d);
lVar3 = 0x140;
do {
std::__cxx11::string::~string(local_1d0 + lVar3);
lVar3 = lVar3 + -0x28;
} while (lVar3 != -0x28);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 00198374 to 0019837b has its CatchHandler @ 001983fd */
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::reserve
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,
plVar2[1] - *plVar2 >> 5);
psVar4 = (string *)*plVar2;
psVar1 = (string *)plVar2[1];
do {
if (psVar4 == psVar1) {
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)local_208);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable(local_68);
return param_1;
}
/* try { // try from 00198395 to 001983b3 has its CatchHandler @ 001984c4 */
lVar3 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find(local_68,psVar4);
if (lVar3 == 0) {
if (in_DL != '\0') {
/* try { // try from 001983bb to 001983c5 has its CatchHandler @ 001984c2 */
lVar3 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,common_sampler_type>,std::allocator<std::pair<std::__cxx11::string_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)local_208,psVar4);
if (lVar3 != 0) goto LAB_001983a5;
}
}
else {
LAB_001983a5:
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::push_back
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,
(common_sampler_type *)(lVar3 + 0x28));
}
psVar4 = psVar4 + 0x20;
} while( true );
}
|
|
18,760
|
js_new_promise_capability
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_new_promise_capability(JSContext *ctx,
JSValue *resolving_funcs,
JSValue ctor)
{
JSValue executor, result_promise;
JSCFunctionDataRecord *s;
int i;
executor = js_promise_executor_new(ctx);
if (JS_IsException(executor))
return executor;
if (JS_IsUndefined(ctor)) {
result_promise = js_promise_constructor(ctx, ctor, 1,
&executor);
} else {
result_promise = JS_CallConstructor(ctx, ctor, 1,
&executor);
}
if (JS_IsException(result_promise))
goto fail;
s = JS_GetOpaque(executor, JS_CLASS_C_FUNCTION_DATA);
for(i = 0; i < 2; i++) {
if (check_function(ctx, s->data[i]))
goto fail;
}
for(i = 0; i < 2; i++)
resolving_funcs[i] = js_dup(s->data[i]);
JS_FreeValue(ctx, executor);
return result_promise;
fail:
JS_FreeValue(ctx, executor);
JS_FreeValue(ctx, result_promise);
return JS_EXCEPTION;
}
|
O0
|
c
|
js_new_promise_capability:
subq $0xa8, %rsp
movq %rdx, 0x88(%rsp)
movq %rcx, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x91400
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x53842
movq 0x68(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x53a57
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x2e260
cmpl $0x0, %eax
je 0x538a3
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl $0x1, %ecx
leaq 0x68(%rsp), %r8
callq 0x543c0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x538e8
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl $0x1, %ecx
leaq 0x68(%rsp), %r8
callq 0x48550
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x53901
jmp 0x53a12
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl $0xf, %edx
callq 0x38350
movq %rax, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
cmpl $0x2, 0x4c(%rsp)
jge 0x5396b
movq 0x80(%rsp), %rdi
movq 0x50(%rsp), %rax
addq $0x10, %rax
movslq 0x4c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x6da80
cmpl $0x0, %eax
je 0x5395c
jmp 0x53a12
jmp 0x5395e
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x53922
movl $0x0, 0x4c(%rsp)
cmpl $0x2, 0x4c(%rsp)
jge 0x539df
movq 0x78(%rsp), %rax
movslq 0x4c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rax
addq $0x10, %rax
movslq 0x4c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x216d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x53973
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x23c90
movq 0x58(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x53a57
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x23c90
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x23c90
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nop
|
js_new_promise_capability:
sub rsp, 0A8h
mov [rsp+0A8h+var_20], rdx
mov [rsp+0A8h+var_18], rcx
mov [rsp+0A8h+var_28], rdi
mov [rsp+0A8h+var_30], rsi
mov rdi, [rsp+0A8h+var_28]
call js_promise_executor_new
mov [rsp+0A8h+var_70], rax
mov [rsp+0A8h+var_68], rdx
mov rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_40], rax
mov rax, [rsp+0A8h+var_68]
mov [rsp+0A8h+var_38], rax
mov rdi, [rsp+0A8h+var_40]
mov rsi, [rsp+0A8h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_53842
mov rax, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_8], rax
jmp loc_53A57
loc_53842:
mov rdi, [rsp+0A8h+var_20]
mov rsi, [rsp+0A8h+var_18]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_538A3
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
mov ecx, 1
lea r8, [rsp+0A8h+var_40]
call js_promise_constructor
mov [rsp+0A8h+var_80], rax
mov [rsp+0A8h+var_78], rdx
mov rax, [rsp+0A8h+var_80]
mov [rsp+0A8h+var_50], rax
mov rax, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_48], rax
jmp short loc_538E8
loc_538A3:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
mov ecx, 1
lea r8, [rsp+0A8h+var_40]
call JS_CallConstructor
mov [rsp+0A8h+var_90], rax
mov [rsp+0A8h+var_88], rdx
mov rax, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_50], rax
mov rax, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_48], rax
loc_538E8:
mov rdi, [rsp+0A8h+var_50]
mov rsi, [rsp+0A8h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_53901
jmp loc_53A12
loc_53901:
mov rdi, [rsp+0A8h+var_40]
mov rsi, [rsp+0A8h+var_38]
mov edx, 0Fh
call JS_GetOpaque
mov [rsp+0A8h+var_58], rax
mov [rsp+0A8h+var_5C], 0
loc_53922:
cmp [rsp+0A8h+var_5C], 2
jge short loc_5396B
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_58]
add rax, 10h
movsxd rcx, [rsp+0A8h+var_5C]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
mov rdx, [rax+8]
call check_function
cmp eax, 0
jz short loc_5395C
jmp loc_53A12
loc_5395C:
jmp short $+2
loc_5395E:
mov eax, [rsp+0A8h+var_5C]
add eax, 1
mov [rsp+0A8h+var_5C], eax
jmp short loc_53922
loc_5396B:
mov [rsp+0A8h+var_5C], 0
loc_53973:
cmp [rsp+0A8h+var_5C], 2
jge short loc_539DF
mov rax, [rsp+0A8h+var_30]
movsxd rcx, [rsp+0A8h+var_5C]
shl rcx, 4
add rax, rcx
mov [rsp+0A8h+var_A8], rax
mov rax, [rsp+0A8h+var_58]
add rax, 10h
movsxd rcx, [rsp+0A8h+var_5C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rcx, rax
mov rax, [rsp+0A8h+var_A8]
mov [rsp+0A8h+var_A0], rcx
mov [rsp+0A8h+var_98], rdx
mov rcx, [rsp+0A8h+var_A0]
mov [rax], rcx
mov rcx, [rsp+0A8h+var_98]
mov [rax+8], rcx
mov eax, [rsp+0A8h+var_5C]
add eax, 1
mov [rsp+0A8h+var_5C], eax
jmp short loc_53973
loc_539DF:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_40]
mov rdx, [rsp+0A8h+var_38]
call JS_FreeValue
mov rax, [rsp+0A8h+var_50]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_8], rax
jmp short loc_53A57
loc_53A12:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_40]
mov rdx, [rsp+0A8h+var_38]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
call JS_FreeValue
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
loc_53A57:
mov rax, [rsp+0A8h+var_10]
mov rdx, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
|
long long js_new_promise_capability(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
double v13; // xmm4_8
double v14; // xmm5_8
long long v15; // rdx
long long v16; // rdx
_QWORD *v18; // [rsp+0h] [rbp-A8h]
int i; // [rsp+4Ch] [rbp-5Ch]
int j; // [rsp+4Ch] [rbp-5Ch]
long long Opaque; // [rsp+50h] [rbp-58h]
long long v22; // [rsp+58h] [rbp-50h]
long long v23; // [rsp+60h] [rbp-48h]
long long v24; // [rsp+68h] [rbp-40h] BYREF
long long v25; // [rsp+70h] [rbp-38h]
long long v26; // [rsp+78h] [rbp-30h]
long long v27; // [rsp+80h] [rbp-28h]
long long v28; // [rsp+88h] [rbp-20h]
unsigned long long v29; // [rsp+90h] [rbp-18h]
long long v30; // [rsp+98h] [rbp-10h]
long long v31; // [rsp+A0h] [rbp-8h]
v28 = a3;
v29 = a4;
v27 = a1;
v26 = a2;
v24 = js_promise_executor_new(a1);
v25 = v12;
if ( JS_IsException_1(v24, v12) )
{
v30 = v24;
v31 = v25;
}
else
{
if ( JS_IsUndefined_0(v28, v29) )
v22 = js_promise_constructor(v27, v28, v29, 1LL, &v24);
else
v22 = JS_CallConstructor(v27, v28, v29, 1u, (long long)&v24, a5, a6, a7, a8, v13, v14, a11, a12);
v23 = v15;
if ( JS_IsException_1(v22, v15) )
{
LABEL_15:
JS_FreeValue(v27, v24, v25);
JS_FreeValue(v27, v22, v23);
LODWORD(v30) = 0;
v31 = 6LL;
}
else
{
Opaque = JS_GetOpaque(v24, v25, 15);
for ( i = 0; i < 2; ++i )
{
if ( (unsigned int)check_function(
v27,
*(_QWORD *)(16LL * i + Opaque + 16),
*(_QWORD *)(16LL * i + Opaque + 16 + 8)) )
goto LABEL_15;
}
for ( j = 0; j < 2; ++j )
{
v18 = (_QWORD *)(16LL * j + v26);
*v18 = js_dup(*(_DWORD **)(16LL * j + Opaque + 16), *(_QWORD *)(16LL * j + Opaque + 16 + 8));
v18[1] = v16;
}
JS_FreeValue(v27, v24, v25);
v30 = v22;
v31 = v23;
}
}
return v30;
}
|
js_new_promise_capability:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x88],RDX
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV RDI,qword ptr [RSP + 0x80]
CALL 0x00191400
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x70],RAX
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00153842
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x00153a57
LAB_00153842:
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x90]
CALL 0x0012e260
CMP EAX,0x0
JZ 0x001538a3
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
MOV ECX,0x1
LEA R8,[RSP + 0x68]
CALL 0x001543c0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001538e8
LAB_001538a3:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
MOV ECX,0x1
LEA R8,[RSP + 0x68]
CALL 0x00148550
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x60],RAX
LAB_001538e8:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00153901
JMP 0x00153a12
LAB_00153901:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x70]
MOV EDX,0xf
CALL 0x00138350
MOV qword ptr [RSP + 0x50],RAX
MOV dword ptr [RSP + 0x4c],0x0
LAB_00153922:
CMP dword ptr [RSP + 0x4c],0x2
JGE 0x0015396b
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x50]
ADD RAX,0x10
MOVSXD RCX,dword ptr [RSP + 0x4c]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0016da80
CMP EAX,0x0
JZ 0x0015395c
JMP 0x00153a12
LAB_0015395c:
JMP 0x0015395e
LAB_0015395e:
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x00153922
LAB_0015396b:
MOV dword ptr [RSP + 0x4c],0x0
LAB_00153973:
CMP dword ptr [RSP + 0x4c],0x2
JGE 0x001539df
MOV RAX,qword ptr [RSP + 0x78]
MOVSXD RCX,dword ptr [RSP + 0x4c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x50]
ADD RAX,0x10
MOVSXD RCX,dword ptr [RSP + 0x4c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x00153973
LAB_001539df:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x00153a57
LAB_00153a12:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x00123c90
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
LAB_00153a57:
MOV RAX,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
int1 [16]
js_new_promise_capability(int8 param_1,long param_2,int8 param_3,int8 param_4)
{
int iVar1;
long lVar2;
int8 *puVar3;
int1 (*pauVar4) [16];
int1 auVar5 [16];
int1 auVar6 [16];
int local_5c;
int8 local_50;
int8 local_48;
int1 local_40 [16];
long local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_30 = param_2;
local_28 = param_1;
local_20 = param_3;
local_18 = param_4;
local_40 = js_promise_executor_new(param_1);
iVar1 = JS_IsException(local_40._0_8_,local_40._8_8_);
if (iVar1 == 0) {
iVar1 = JS_IsUndefined(local_20,local_18);
if (iVar1 == 0) {
auVar5 = JS_CallConstructor(local_28,local_20,local_18,1,local_40);
}
else {
auVar5 = js_promise_constructor(local_28,local_20,local_18,1,local_40);
}
local_48 = auVar5._8_8_;
local_50 = auVar5._0_8_;
iVar1 = JS_IsException(local_50,local_48);
if (iVar1 == 0) {
lVar2 = JS_GetOpaque(local_40._0_8_,local_40._8_8_,0xf);
for (local_5c = 0; local_5c < 2; local_5c = local_5c + 1) {
puVar3 = (int8 *)(lVar2 + 0x10 + (long)local_5c * 0x10);
iVar1 = check_function(local_28,*puVar3,puVar3[1]);
if (iVar1 != 0) goto LAB_00153a12;
}
local_5c = 0;
while( true ) {
if (1 < local_5c) break;
pauVar4 = (int1 (*) [16])(local_30 + (long)local_5c * 0x10);
puVar3 = (int8 *)(lVar2 + 0x10 + (long)local_5c * 0x10);
auVar6 = js_dup(*puVar3,puVar3[1]);
*pauVar4 = auVar6;
local_5c = local_5c + 1;
}
JS_FreeValue(local_28,local_40._0_8_,local_40._8_8_);
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
local_8 = local_48;
}
else {
LAB_00153a12:
JS_FreeValue(local_28,local_40._0_8_,local_40._8_8_);
JS_FreeValue(local_28,local_50,local_48);
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = local_40._0_4_;
uStack_c = local_40._4_4_;
local_8 = local_40._8_8_;
}
auVar5._4_4_ = uStack_c;
auVar5._0_4_ = local_10;
auVar5._8_8_ = local_8;
return auVar5;
}
|
|
18,761
|
js_new_promise_capability
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_new_promise_capability(JSContext *ctx,
JSValue *resolving_funcs,
JSValue ctor)
{
JSValue executor, result_promise;
JSCFunctionDataRecord *s;
int i;
executor = js_promise_executor_new(ctx);
if (JS_IsException(executor))
return executor;
if (JS_IsUndefined(ctor)) {
result_promise = js_promise_constructor(ctx, ctor, 1,
&executor);
} else {
result_promise = JS_CallConstructor(ctx, ctor, 1,
&executor);
}
if (JS_IsException(result_promise))
goto fail;
s = JS_GetOpaque(executor, JS_CLASS_C_FUNCTION_DATA);
for(i = 0; i < 2; i++) {
if (check_function(ctx, s->data[i]))
goto fail;
}
for(i = 0; i < 2; i++)
resolving_funcs[i] = js_dup(s->data[i]);
JS_FreeValue(ctx, executor);
return result_promise;
fail:
JS_FreeValue(ctx, executor);
JS_FreeValue(ctx, result_promise);
return JS_EXCEPTION;
}
|
O1
|
c
|
js_new_promise_capability:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r13
movq %rdx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x10(%rsp), %rbp
movl %eax, (%rbp)
movl $0x3, %ecx
movq %rcx, 0x8(%rbp)
movl %eax, 0x10(%rbp)
movq %rcx, 0x18(%rbp)
leaq 0x1c351(%rip), %rsi # 0x52644
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
movq %rbp, %r9
callq 0x210ea
movq %rdx, %r14
movq %rax, (%rbp)
movq %rdx, 0x8(%rbp)
cmpl $0x6, %r14d
jne 0x3632b
movq %rax, %r15
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x363a4
cmpl $0x3, %r13d
jne 0x36348
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x3670e
jmp 0x3636b
movq %rbx, %rdi
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
movq %r13, %rdx
movq %r13, %r8
movl $0x1, %r9d
pushq $0x2
pushq %rbp
callq 0x2fa61
addq $0x10, %rsp
movq %rax, %r15
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x363bc
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d8c6
movl $0x6, %r14d
xorl %r15d, %r15d
xorl %ecx, %ecx
movl %r15d, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd 0x10(%rsp), %xmm0
movl 0x18(%rsp), %eax
movsd %xmm0, (%rsp)
cmpl $-0x1, %eax
jne 0x363e1
movq (%rsp), %rax
cmpw $0xf, 0x6(%rax)
jne 0x363e1
movq 0x30(%rax), %r13
jmp 0x363e4
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x10(%r13,%rbp), %rsi
movq 0x18(%r13,%rbp), %rdx
movq %rbx, %rdi
callq 0x415b1
testl %eax, %eax
jne 0x36377
addq $0x10, %rbp
cmpq $0x10, %rbp
je 0x363e6
xorl %eax, %eax
movq 0x10(%r13,%rax), %rcx
movq 0x18(%r13,%rax), %rdx
movq %rcx, (%rsp)
cmpl $-0x9, %edx
jb 0x36425
movq (%rsp), %rsi
incl (%rsi)
movq %rcx, (%r12,%rax)
movq %rdx, 0x8(%r12,%rax)
addq $0x10, %rax
cmpq $0x10, %rax
je 0x3640c
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
jmp 0x36326
|
js_new_promise_capability:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, rcx
mov [rsp+68h+var_60], rdx
mov r12, rsi
mov rbx, rdi
xor eax, eax
lea rbp, [rsp+68h+var_58]
mov [rbp+0], eax
mov ecx, 3
mov [rbp+8], rcx
mov [rbp+10h], eax
mov [rbp+18h], rcx
lea rsi, js_promise_executor
mov edx, 2
xor ecx, ecx
mov r8d, 2
mov r9, rbp
call JS_NewCFunctionData
mov r14, rdx
mov [rbp+0], rax
mov [rbp+8], rdx
cmp r14d, 6
jnz short loc_3632B
mov r15, rax
mov rcx, 0FFFFFFFF00000000h
loc_36326:
and rcx, rax
jmp short loc_363A4
loc_3632B:
cmp r13d, 3
jnz short loc_36348
lea r8, [rsp+68h+var_58]
mov rdi, rbx
mov rsi, [rsp+68h+var_60]
mov rdx, r13
call js_promise_constructor
jmp short loc_3636B
loc_36348:
mov rdi, rbx
mov rcx, [rsp+68h+var_60]
mov rsi, rcx
mov rdx, r13
mov r8, r13
mov r9d, 1
push 2
push rbp
call JS_CallConstructorInternal
add rsp, 10h
loc_3636B:
mov r15, rax
mov r14, rdx
cmp r14d, 6
jnz short loc_363BC
loc_36377:
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
mov r14d, 6
xor r15d, r15d
xor ecx, ecx
loc_363A4:
mov eax, r15d
or rax, rcx
mov rdx, r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_363BC:
movsd xmm0, [rsp+68h+var_58]
mov eax, dword ptr [rsp+68h+var_50]
movsd [rsp+68h+var_68], xmm0
cmp eax, 0FFFFFFFFh
jnz short loc_363E1
mov rax, [rsp+68h+var_68]
cmp word ptr [rax+6], 0Fh
jnz short loc_363E1
mov r13, [rax+30h]
jmp short loc_363E4
loc_363E1:
xor r13d, r13d
loc_363E4:
xor ebp, ebp
loc_363E6:
mov rsi, [r13+rbp+10h]
mov rdx, [r13+rbp+18h]
mov rdi, rbx
call check_function
test eax, eax
jnz loc_36377
add rbp, 10h
cmp rbp, 10h
jz short loc_363E6
xor eax, eax
loc_3640C:
mov rcx, [r13+rax+10h]
mov rdx, [r13+rax+18h]
mov [rsp+68h+var_68], rcx
cmp edx, 0FFFFFFF7h
jb short loc_36425
mov rsi, [rsp+68h+var_68]
inc dword ptr [rsi]
loc_36425:
mov [r12+rax], rcx
mov [r12+rax+8], rdx
add rax, 10h
cmp rax, 10h
jz short loc_3640C
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
jmp loc_36326
|
unsigned long long js_new_promise_capability(
long long *a1,
long long a2,
unsigned long long a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
unsigned long long v13; // rax
long long v14; // rcx
__m128 v15; // xmm4
__m128 v16; // xmm5
long long v17; // rdx
_DWORD *v18; // r15
unsigned long long v19; // rcx
unsigned long long v20; // rcx
unsigned long long v21; // rax
long long v22; // rdx
long long v23; // r14
long long v25; // r13
long long v26; // rbp
long long v27; // rax
long long v28; // rcx
long long v29; // rdx
_DWORD *v31; // [rsp+10h] [rbp-58h] BYREF
long long v32; // [rsp+18h] [rbp-50h]
int v33; // [rsp+20h] [rbp-48h]
long long v34; // [rsp+28h] [rbp-40h]
LODWORD(v31) = 0;
v32 = 3LL;
v33 = 0;
v34 = 3LL;
v13 = JS_NewCFunctionData(a1, (long long)js_promise_executor, 2u, 0, 2, (long long)&v31);
v31 = (_DWORD *)v13;
v32 = v17;
if ( (_DWORD)v17 == 6 )
{
LODWORD(v18) = v13;
v19 = 0xFFFFFFFF00000000LL;
LABEL_3:
v20 = v13 & v19;
}
else
{
if ( (_DWORD)a4 == 3 )
v21 = js_promise_constructor(a1, a3, a4, v14, &v31);
else
v21 = JS_CallConstructorInternal(
(long long)a1,
a3,
a4,
a3,
a4,
1LL,
a5,
a6,
a7,
a8,
v15,
v16,
a11,
a12,
(long long)&v31,
2);
v18 = (_DWORD *)v21;
v23 = v22;
if ( (_DWORD)v22 != 6 )
{
if ( (_DWORD)v32 == -1 && *((_WORD *)v31 + 3) == 15 )
v25 = *((_QWORD *)v31 + 6);
else
v25 = 0LL;
v26 = 0LL;
while ( !(unsigned int)check_function(a1, *(_QWORD *)(v25 + v26 + 16), *(_QWORD *)(v25 + v26 + 24)) )
{
v26 += 16LL;
if ( v26 != 16 )
{
v27 = 0LL;
do
{
v28 = *(_QWORD *)(v25 + v27 + 16);
v29 = *(_QWORD *)(v25 + v27 + 24);
if ( (unsigned int)v29 >= 0xFFFFFFF7 )
++**(_DWORD **)(v25 + v27 + 16);
*(_QWORD *)(a2 + v27) = v28;
*(_QWORD *)(a2 + v27 + 8) = v29;
v27 += 16LL;
}
while ( v27 == 16 );
JS_FreeValueRT(a1[3], v31, v32);
v13 = 0xFFFFFFFF00000000LL;
v19 = (unsigned long long)v18;
goto LABEL_3;
}
}
}
JS_FreeValueRT(a1[3], v31, v32);
JS_FreeValueRT(a1[3], v18, v23);
LODWORD(v18) = 0;
v20 = 0LL;
}
return v20 | (unsigned int)v18;
}
| |||
18,762
|
js_new_promise_capability
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_new_promise_capability(JSContext *ctx,
JSValue *resolving_funcs,
JSValue ctor)
{
JSValue executor, result_promise;
JSCFunctionDataRecord *s;
int i;
executor = js_promise_executor_new(ctx);
if (JS_IsException(executor))
return executor;
if (JS_IsUndefined(ctor)) {
result_promise = js_promise_constructor(ctx, ctor, 1,
&executor);
} else {
result_promise = JS_CallConstructor(ctx, ctor, 1,
&executor);
}
if (JS_IsException(result_promise))
goto fail;
s = JS_GetOpaque(executor, JS_CLASS_C_FUNCTION_DATA);
for(i = 0; i < 2; i++) {
if (check_function(ctx, s->data[i]))
goto fail;
}
for(i = 0; i < 2; i++)
resolving_funcs[i] = js_dup(s->data[i]);
JS_FreeValue(ctx, executor);
return result_promise;
fail:
JS_FreeValue(ctx, executor);
JS_FreeValue(ctx, result_promise);
return JS_EXCEPTION;
}
|
O2
|
c
|
js_new_promise_capability:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, 0x8(%rsp)
leaq 0x10(%rsp), %r12
andl $0x0, (%r12)
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x3
popq %rax
movq %rax, 0x8(%r12)
andl $0x0, 0x10(%r12)
movq %rax, 0x18(%r12)
leaq 0x171b0(%rip), %rsi # 0x46b60
pushq $0x2
popq %rdx
xorl %ecx, %ecx
movl %edx, %r8d
movq %r12, %r9
callq 0x1b3ba
movq %rax, %r13
movq %rdx, %rbp
movq %rax, (%r12)
movq %rdx, 0x8(%r12)
cmpl $0x6, %ebp
jne 0x2f9e9
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r13, %rcx
andq %rax, %rcx
jmp 0x2faf6
cmpl $0x3, %r15d
jne 0x2fa0c
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x2ff48
movq %rax, %r15
movq %rdx, %r12
jmp 0x2fa35
pushq $0x1
popq %rcx
leaq 0x10(%rsp), %rbp
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movq %rbp, %r8
callq 0x283f2
movq %rax, %r15
movq %rdx, %r12
movq (%rbp), %r13
movq 0x8(%rbp), %rbp
cmpl $0x6, %r12d
je 0x2fa80
cmpl $-0x1, %ebp
jne 0x2fa4e
cmpw $0xf, 0x6(%r13)
jne 0x2fa4e
movq 0x30(%r13), %r13
jmp 0x2fa51
xorl %r13d, %r13d
xorl %ecx, %ecx
leaq 0x10(%rcx), %rbp
cmpq $0x30, %rbp
je 0x2faa6
movq 0x10(%r13,%rcx), %rsi
movq 0x18(%r13,%rcx), %rdx
movq %rbx, %rdi
callq 0x3949a
movq %rbp, %rcx
testl %eax, %eax
je 0x2fa53
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbp
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1801e
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1801e
pushq $0x6
popq %rbp
xorl %r13d, %r13d
xorl %ecx, %ecx
jmp 0x2faf6
xorl %eax, %eax
cmpq $0x20, %rax
je 0x2face
movq 0x10(%r13,%rax), %rcx
movq 0x18(%r13,%rax), %rdx
cmpl $-0x9, %edx
jb 0x2fabf
incl (%rcx)
movq %rcx, (%r14,%rax)
movq %rdx, 0x8(%r14,%rax)
addq $0x10, %rax
jmp 0x2faa8
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
andq %rax, %rcx
movq %r12, %rbp
movq %r15, %r13
movl %r13d, %eax
orq %rcx, %rax
movq %rbp, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_new_promise_capability:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, rcx
mov [rsp+68h+var_60], rdx
lea r12, [rsp+68h+var_58]
and dword ptr [r12], 0
mov r14, rsi
mov rbx, rdi
push 3
pop rax
mov [r12+8], rax
and dword ptr [r12+10h], 0
mov [r12+18h], rax
lea rsi, js_promise_executor
push 2
pop rdx
xor ecx, ecx
mov r8d, edx
mov r9, r12
call JS_NewCFunctionData
mov r13, rax
mov rbp, rdx
mov [r12], rax
mov [r12+8], rdx
cmp ebp, 6
jnz short loc_2F9E9
mov rax, 0FFFFFFFF00000000h
mov rcx, r13
and rcx, rax
jmp loc_2FAF6
loc_2F9E9:
cmp r15d, 3
jnz short loc_2FA0C
lea r8, [rsp+68h+var_58]
mov rdi, rbx
mov rsi, [rsp+68h+var_60]
mov rdx, r15
call js_promise_constructor
mov r15, rax
mov r12, rdx
jmp short loc_2FA35
loc_2FA0C:
push 1
pop rcx
lea rbp, [rsp+68h+var_58]
mov rdi, rbx
mov rsi, [rsp+68h+var_60]
mov rdx, r15
mov r8, rbp
call JS_CallConstructor
mov r15, rax
mov r12, rdx
mov r13, [rbp+0]
mov rbp, [rbp+8]
loc_2FA35:
cmp r12d, 6
jz short loc_2FA80
cmp ebp, 0FFFFFFFFh
jnz short loc_2FA4E
cmp word ptr [r13+6], 0Fh
jnz short loc_2FA4E
mov r13, [r13+30h]
jmp short loc_2FA51
loc_2FA4E:
xor r13d, r13d
loc_2FA51:
xor ecx, ecx
loc_2FA53:
lea rbp, [rcx+10h]
cmp rbp, 30h ; '0'
jz short loc_2FAA6
mov rsi, [r13+rcx+10h]
mov rdx, [r13+rcx+18h]
mov rdi, rbx
call check_function
mov rcx, rbp
test eax, eax
jz short loc_2FA53
mov r13, [rsp+68h+var_58]
mov rbp, [rsp+68h+var_50]
loc_2FA80:
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
call JS_FreeValue
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_FreeValue
push 6
pop rbp
xor r13d, r13d
xor ecx, ecx
jmp short loc_2FAF6
loc_2FAA6:
xor eax, eax
loc_2FAA8:
cmp rax, 20h ; ' '
jz short loc_2FACE
mov rcx, [r13+rax+10h]
mov rdx, [r13+rax+18h]
cmp edx, 0FFFFFFF7h
jb short loc_2FABF
inc dword ptr [rcx]
loc_2FABF:
mov [r14+rax], rcx
mov [r14+rax+8], rdx
add rax, 10h
jmp short loc_2FAA8
loc_2FACE:
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, rbx
call JS_FreeValue
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
and rcx, rax
mov rbp, r12
mov r13, r15
loc_2FAF6:
mov eax, r13d
or rax, rcx
mov rdx, rbp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_new_promise_capability(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v13; // rcx
unsigned long long v14; // r13
double v15; // xmm4_8
double v16; // xmm5_8
long long v17; // rdx
long long v18; // rbp
unsigned long long v19; // rcx
unsigned long long v20; // r15
long long v21; // rdx
long long v22; // r12
long long v23; // rdx
long long v24; // r13
long long v25; // rcx
long long v26; // rbp
int v27; // eax
long long i; // rax
_DWORD *v29; // rcx
long long v30; // rdx
unsigned long long v33; // [rsp+10h] [rbp-58h] BYREF
long long v34; // [rsp+18h] [rbp-50h]
int v35; // [rsp+20h] [rbp-48h]
long long v36; // [rsp+28h] [rbp-40h]
LODWORD(v33) = 0;
v34 = 3LL;
v35 = 0;
v36 = 3LL;
v14 = JS_NewCFunctionData(a1, (long long)js_promise_executor, 2u, 0, 2u, (long long)&v33);
v18 = v17;
v33 = v14;
v34 = v17;
if ( (_DWORD)v17 == 6 )
{
v19 = v14 & 0xFFFFFFFF00000000LL;
}
else
{
if ( (_DWORD)a4 == 3 )
{
v20 = js_promise_constructor(a1, a3, a4, v13, &v33);
v22 = v21;
}
else
{
v20 = JS_CallConstructor(a1, a3, a4, 1u, (long long)&v33, a5, a6, a7, a8, v15, v16, a11, a12);
v22 = v23;
v14 = v33;
v18 = v34;
}
if ( (_DWORD)v22 == 6 )
{
LABEL_15:
JS_FreeValue(a1, v14, v18);
JS_FreeValue(a1, v20, v22);
LODWORD(v14) = 0;
v19 = 0LL;
}
else
{
if ( (_DWORD)v18 == -1 && *(_WORD *)(v14 + 6) == 15 )
v24 = *(_QWORD *)(v14 + 48);
else
v24 = 0LL;
v25 = 0LL;
while ( 1 )
{
v26 = v25 + 16;
if ( v25 == 32 )
break;
v27 = check_function(a1, *(_QWORD *)(v24 + v25 + 16), *(_QWORD *)(v24 + v25 + 24));
v25 = v26;
if ( v27 )
{
v14 = v33;
v18 = v34;
goto LABEL_15;
}
}
for ( i = 0LL; i != 32; i += 16LL )
{
v29 = *(_DWORD **)(v24 + i + 16);
v30 = *(_QWORD *)(v24 + i + 24);
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
++*v29;
*(_QWORD *)(a2 + i) = v29;
*(_QWORD *)(a2 + i + 8) = v30;
}
JS_FreeValue(a1, v33, v34);
v19 = v20 & 0xFFFFFFFF00000000LL;
LODWORD(v14) = v20;
}
}
return v19 | (unsigned int)v14;
}
|
js_new_promise_capability:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,RCX
MOV qword ptr [RSP + 0x8],RDX
LEA R12,[RSP + 0x10]
AND dword ptr [R12],0x0
MOV R14,RSI
MOV RBX,RDI
PUSH 0x3
POP RAX
MOV qword ptr [R12 + 0x8],RAX
AND dword ptr [R12 + 0x10],0x0
MOV qword ptr [R12 + 0x18],RAX
LEA RSI,[0x146b60]
PUSH 0x2
POP RDX
XOR ECX,ECX
MOV R8D,EDX
MOV R9,R12
CALL 0x0011b3ba
MOV R13,RAX
MOV RBP,RDX
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],RDX
CMP EBP,0x6
JNZ 0x0012f9e9
MOV RAX,-0x100000000
MOV RCX,R13
AND RCX,RAX
JMP 0x0012faf6
LAB_0012f9e9:
CMP R15D,0x3
JNZ 0x0012fa0c
LEA R8,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R15
CALL 0x0012ff48
MOV R15,RAX
MOV R12,RDX
JMP 0x0012fa35
LAB_0012fa0c:
PUSH 0x1
POP RCX
LEA RBP,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R15
MOV R8,RBP
CALL 0x001283f2
MOV R15,RAX
MOV R12,RDX
MOV R13,qword ptr [RBP]
MOV RBP,qword ptr [RBP + 0x8]
LAB_0012fa35:
CMP R12D,0x6
JZ 0x0012fa80
CMP EBP,-0x1
JNZ 0x0012fa4e
CMP word ptr [R13 + 0x6],0xf
JNZ 0x0012fa4e
MOV R13,qword ptr [R13 + 0x30]
JMP 0x0012fa51
LAB_0012fa4e:
XOR R13D,R13D
LAB_0012fa51:
XOR ECX,ECX
LAB_0012fa53:
LEA RBP,[RCX + 0x10]
CMP RBP,0x30
JZ 0x0012faa6
MOV RSI,qword ptr [R13 + RCX*0x1 + 0x10]
MOV RDX,qword ptr [R13 + RCX*0x1 + 0x18]
MOV RDI,RBX
CALL 0x0013949a
MOV RCX,RBP
TEST EAX,EAX
JZ 0x0012fa53
MOV R13,qword ptr [RSP + 0x10]
MOV RBP,qword ptr [RSP + 0x18]
LAB_0012fa80:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0011801e
PUSH 0x6
POP RBP
XOR R13D,R13D
XOR ECX,ECX
JMP 0x0012faf6
LAB_0012faa6:
XOR EAX,EAX
LAB_0012faa8:
CMP RAX,0x20
JZ 0x0012face
MOV RCX,qword ptr [R13 + RAX*0x1 + 0x10]
MOV RDX,qword ptr [R13 + RAX*0x1 + 0x18]
CMP EDX,-0x9
JC 0x0012fabf
INC dword ptr [RCX]
LAB_0012fabf:
MOV qword ptr [R14 + RAX*0x1],RCX
MOV qword ptr [R14 + RAX*0x1 + 0x8],RDX
ADD RAX,0x10
JMP 0x0012faa8
LAB_0012face:
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RDI,RBX
CALL 0x0011801e
MOV RAX,-0x100000000
MOV RCX,R15
AND RCX,RAX
MOV RBP,R12
MOV R13,R15
LAB_0012faf6:
MOV EAX,R13D
OR RAX,RCX
MOV RDX,RBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_new_promise_capability(int8 param_1,long param_2,int8 param_3,int8 param_4)
{
int *piVar1;
int1 auVar2 [16];
int iVar3;
long lVar4;
ulong uVar5;
int8 uVar6;
long lVar7;
int8 uVar8;
int1 auVar9 [16];
int1 auVar10 [16];
int1 local_58 [16];
int4 local_48;
int8 local_40;
local_58._0_8_ = local_58._0_8_ & 0xffffffff00000000;
local_58._8_8_ = 3;
local_48 = 0;
local_40 = 3;
auVar9 = JS_NewCFunctionData(param_1,js_promise_executor,2,0,2,local_58);
if (auVar9._8_4_ == 6) {
uVar5 = auVar9._0_8_ & 0xffffffff00000000;
auVar10 = auVar9;
}
else {
local_58 = auVar9;
if ((int)param_4 == 3) {
auVar10 = js_promise_constructor(param_1,param_3,param_4);
auVar2 = local_58;
}
else {
auVar10 = JS_CallConstructor(param_1,param_3,param_4,1,local_58);
auVar9 = local_58;
auVar2 = local_58;
}
local_58 = auVar9;
if (auVar10._8_4_ != 6) {
if ((auVar9._8_4_ == -1) && (*(short *)(auVar9._0_8_ + 6) == 0xf)) {
lVar7 = *(long *)(auVar9._0_8_ + 0x30);
}
else {
lVar7 = 0;
}
lVar4 = 0;
local_58 = auVar2;
do {
if (lVar4 + 0x10 == 0x30) {
for (lVar4 = 0; lVar4 != 0x20; lVar4 = lVar4 + 0x10) {
piVar1 = *(int **)(lVar7 + 0x10 + lVar4);
uVar6 = *(int8 *)(lVar7 + 0x18 + lVar4);
if (0xfffffff6 < (uint)uVar6) {
*piVar1 = *piVar1 + 1;
}
*(int **)(param_2 + lVar4) = piVar1;
*(int8 *)(param_2 + 8 + lVar4) = uVar6;
}
JS_FreeValue(param_1,local_58._0_8_,local_58._8_8_);
uVar5 = auVar10._0_8_ & 0xffffffff00000000;
goto LAB_0012faf6;
}
iVar3 = check_function(param_1,*(int8 *)(lVar7 + 0x10 + lVar4),
*(int8 *)(lVar7 + 0x18 + lVar4));
lVar4 = lVar4 + 0x10;
auVar2 = local_58;
} while (iVar3 == 0);
}
uVar6 = local_58._8_8_;
uVar8 = local_58._0_8_;
local_58 = auVar2;
JS_FreeValue(param_1,uVar8,uVar6);
JS_FreeValue(param_1,auVar10._0_8_,auVar10._8_8_);
auVar10 = ZEXT816(6) << 0x40;
uVar5 = 0;
}
LAB_0012faf6:
auVar9._0_8_ = auVar10._0_8_ & 0xffffffff | uVar5;
auVar9._8_8_ = auVar10._8_8_;
return auVar9;
}
|
|
18,763
|
uf_varchar2
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_varchar2(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end __attribute__((unused)))
{
if (get_bit(bit_buff))
to[0]=to[1]=0; /* Zero lengths */
else
{
ulong length=get_bits(bit_buff,rec->space_length_bits);
int2store(to,length);
decode_bytes(rec,bit_buff,to+2,to+2+length);
}
}
|
O3
|
c
|
uf_varchar2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x8367b
movl (%r14), %r13d
decl %eax
movl %eax, 0x4(%r14)
btl %eax, %r13d
jae 0x83698
movw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x81f1d
movl $0x1f, 0x4(%r14)
movl (%r14), %r13d
movl $0x1f, %eax
testl %r13d, %r13d
js 0x83667
movl 0x1c(%r15), %r12d
movl %eax, %ecx
subl %r12d, %ecx
jae 0x836dd
subl %eax, %r12d
movl %eax, %eax
leaq 0x5e241(%rip), %rcx # 0xe18f0
andl (%rcx,%rax,4), %r13d
movl %r12d, %ecx
shll %cl, %r13d
movq %r14, %rdi
callq 0x81f1d
movl $0x20, %eax
subl %r12d, %eax
movl %eax, 0x4(%r14)
movl (%r14), %eax
negl %r12d
movl %r12d, %ecx
shrl %cl, %eax
addl %eax, %r13d
jmp 0x836f3
movl %ecx, 0x4(%r14)
shrl %cl, %r13d
movl 0x1c(%r15), %eax
leaq 0x5e201(%rip), %rcx # 0xe18f0
andl (%rcx,%rax,4), %r13d
movl %r13d, %eax
movw %r13w, (%rbx)
leaq (%rbx,%rax), %rcx
addq $0x2, %rcx
addq $0x2, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8280e
|
uf_varchar2_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_8367B
mov r13d, [r14]
dec eax
mov [r14+4], eax
bt r13d, eax
jnb short loc_83698
loc_83667:
mov word ptr [rbx], 0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8367B:
mov rdi, r14
call fill_buffer_0
mov dword ptr [r14+4], 1Fh
mov r13d, [r14]
mov eax, 1Fh
test r13d, r13d
js short loc_83667
loc_83698:
mov r12d, [r15+1Ch]
mov ecx, eax
sub ecx, r12d
jnb short loc_836DD
sub r12d, eax
mov eax, eax
lea rcx, mask_0
and r13d, [rcx+rax*4]
mov ecx, r12d
shl r13d, cl
mov rdi, r14
call fill_buffer_0
mov eax, 20h ; ' '
sub eax, r12d
mov [r14+4], eax
mov eax, [r14]
neg r12d
mov ecx, r12d
shr eax, cl
add r13d, eax
jmp short loc_836F3
loc_836DD:
mov [r14+4], ecx
shr r13d, cl
mov eax, [r15+1Ch]
lea rcx, mask_0
and r13d, [rcx+rax*4]
loc_836F3:
mov eax, r13d
mov [rbx], r13w
lea rcx, [rbx+rax]
add rcx, 2
add rbx, 2
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes_0
|
long long uf_varchar2_0(long long a1, unsigned int *a2, long long a3)
{
unsigned int v4; // eax
unsigned int v5; // r13d
long long result; // rax
unsigned int v7; // r12d
unsigned int v8; // ecx
int v9; // r12d
int v10; // r13d
unsigned int v11; // r13d
v4 = a2[1];
if ( v4 )
{
v5 = *a2;
result = v4 - 1;
a2[1] = result;
if ( _bittest((const int *)&v5, result) )
{
LABEL_3:
*(_WORD *)a3 = 0;
return result;
}
}
else
{
fill_buffer_0((long long)a2);
a2[1] = 31;
v5 = *a2;
result = 31LL;
if ( (*a2 & 0x80000000) != 0 )
goto LABEL_3;
}
v7 = *(_DWORD *)(a1 + 28);
v8 = result - v7;
if ( (unsigned int)result >= v7 )
{
a2[1] = v8;
v11 = mask_0[*(unsigned int *)(a1 + 28)] & (v5 >> v8);
}
else
{
v9 = v7 - result;
v10 = (mask_0[(unsigned int)result] & v5) << v9;
fill_buffer_0((long long)a2);
a2[1] = 32 - v9;
v11 = (*a2 >> -(char)v9) + v10;
}
*(_WORD *)a3 = v11;
return (long long)decode_bytes_0(a1, (long long)a2, (_BYTE *)(a3 + 2), (_BYTE *)(a3 + v11 + 2));
}
|
uf_varchar2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x0018367b
MOV R13D,dword ptr [R14]
DEC EAX
MOV dword ptr [R14 + 0x4],EAX
BT R13D,EAX
JNC 0x00183698
LAB_00183667:
MOV word ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018367b:
MOV RDI,R14
CALL 0x00181f1d
MOV dword ptr [R14 + 0x4],0x1f
MOV R13D,dword ptr [R14]
MOV EAX,0x1f
TEST R13D,R13D
JS 0x00183667
LAB_00183698:
MOV R12D,dword ptr [R15 + 0x1c]
MOV ECX,EAX
SUB ECX,R12D
JNC 0x001836dd
SUB R12D,EAX
MOV EAX,EAX
LEA RCX,[0x1e18f0]
AND R13D,dword ptr [RCX + RAX*0x4]
MOV ECX,R12D
SHL R13D,CL
MOV RDI,R14
CALL 0x00181f1d
MOV EAX,0x20
SUB EAX,R12D
MOV dword ptr [R14 + 0x4],EAX
MOV EAX,dword ptr [R14]
NEG R12D
MOV ECX,R12D
SHR EAX,CL
ADD R13D,EAX
JMP 0x001836f3
LAB_001836dd:
MOV dword ptr [R14 + 0x4],ECX
SHR R13D,CL
MOV EAX,dword ptr [R15 + 0x1c]
LEA RCX,[0x1e18f0]
AND R13D,dword ptr [RCX + RAX*0x4]
LAB_001836f3:
MOV EAX,R13D
MOV word ptr [RBX],R13W
LEA RCX,[RBX + RAX*0x1]
ADD RCX,0x2
ADD RBX,0x2
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018280e
|
void uf_varchar2(long param_1,uint *param_2,int2 *param_3)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
uVar3 = 0x1f;
if (-1 < (int)uVar5) goto LAB_00183698;
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) {
LAB_00183698:
uVar1 = *(uint *)(param_1 + 0x1c);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
*param_3 = (short)uVar5;
decode_bytes(param_1,param_2,param_3 + 1,(long)param_3 + (ulong)uVar5 + 2);
return;
}
}
*param_3 = 0;
return;
}
|
|
18,764
|
lunasvg::SVGGradientAttributes::setDefaultValues(lunasvg::SVGGradientElement const*)
|
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.h
|
void setDefaultValues(const SVGGradientElement* element) {
if(!m_gradientTransform) { m_gradientTransform = element; }
if(!m_spreadMethod) { m_spreadMethod = element; }
if(!m_gradientUnits) { m_gradientUnits = element; }
if(!m_gradientContentElement) { m_gradientContentElement = element; }
}
|
O0
|
c
|
lunasvg::SVGGradientAttributes::setDefaultValues(lunasvg::SVGGradientElement const*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, (%rax)
jne 0x386d5
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x386ec
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x38703
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3871a
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x18(%rax)
popq %rbp
retq
nopl (%rax)
|
_ZN7lunasvg21SVGGradientAttributes16setDefaultValuesEPKNS_18SVGGradientElementE:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
cmp qword ptr [rax], 0
jnz short loc_386D5
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov [rax], rcx
loc_386D5:
mov rax, [rbp+var_18]
cmp qword ptr [rax+8], 0
jnz short loc_386EC
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov [rax+8], rcx
loc_386EC:
mov rax, [rbp+var_18]
cmp qword ptr [rax+10h], 0
jnz short loc_38703
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov [rax+10h], rcx
loc_38703:
mov rax, [rbp+var_18]
cmp qword ptr [rax+18h], 0
jnz short loc_3871A
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov [rax+18h], rcx
loc_3871A:
pop rbp
retn
|
lunasvg::SVGGradientAttributes * lunasvg::SVGGradientAttributes::setDefaultValues(
lunasvg::SVGGradientAttributes *this,
const lunasvg::SVGGradientElement *a2)
{
lunasvg::SVGGradientAttributes *result; // rax
if ( !*(_QWORD *)this )
*(_QWORD *)this = a2;
if ( !*((_QWORD *)this + 1) )
*((_QWORD *)this + 1) = a2;
if ( !*((_QWORD *)this + 2) )
*((_QWORD *)this + 2) = a2;
result = this;
if ( !*((_QWORD *)this + 3) )
{
result = this;
*((_QWORD *)this + 3) = a2;
}
return result;
}
|
setDefaultValues:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RAX],0x0
JNZ 0x001386d5
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
LAB_001386d5:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x001386ec
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_001386ec:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x00138703
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
LAB_00138703:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x0013871a
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
LAB_0013871a:
POP RBP
RET
|
/* lunasvg::SVGGradientAttributes::setDefaultValues(lunasvg::SVGGradientElement const*) */
void __thiscall
lunasvg::SVGGradientAttributes::setDefaultValues
(SVGGradientAttributes *this,SVGGradientElement *param_1)
{
if (*(long *)this == 0) {
*(SVGGradientElement **)this = param_1;
}
if (*(long *)(this + 8) == 0) {
*(SVGGradientElement **)(this + 8) = param_1;
}
if (*(long *)(this + 0x10) == 0) {
*(SVGGradientElement **)(this + 0x10) = param_1;
}
if (*(long *)(this + 0x18) == 0) {
*(SVGGradientElement **)(this + 0x18) = param_1;
}
return;
}
|
|
18,765
|
lunasvg::SVGGradientAttributes::setDefaultValues(lunasvg::SVGGradientElement const*)
|
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.h
|
void setDefaultValues(const SVGGradientElement* element) {
if(!m_gradientTransform) { m_gradientTransform = element; }
if(!m_spreadMethod) { m_spreadMethod = element; }
if(!m_gradientUnits) { m_gradientUnits = element; }
if(!m_gradientContentElement) { m_gradientContentElement = element; }
}
|
O1
|
c
|
lunasvg::SVGGradientAttributes::setDefaultValues(lunasvg::SVGGradientElement const*):
cmpq $0x0, (%rdi)
jne 0x1907d
movq %rsi, (%rdi)
cmpq $0x0, 0x8(%rdi)
jne 0x19088
movq %rsi, 0x8(%rdi)
cmpq $0x0, 0x10(%rdi)
jne 0x19093
movq %rsi, 0x10(%rdi)
cmpq $0x0, 0x18(%rdi)
jne 0x1909e
movq %rsi, 0x18(%rdi)
cmpq $0x0, 0x20(%rdi)
jne 0x190a9
movq %rsi, 0x20(%rdi)
cmpq $0x0, 0x28(%rdi)
jne 0x190b4
movq %rsi, 0x28(%rdi)
cmpq $0x0, 0x30(%rdi)
je 0x190bc
retq
movq %rsi, 0x30(%rdi)
retq
nop
|
_ZN7lunasvg27SVGRadialGradientAttributes16setDefaultValuesEPKNS_24SVGRadialGradientElementE:
cmp qword ptr [rdi], 0
jnz short loc_1907D
mov [rdi], rsi
loc_1907D:
cmp qword ptr [rdi+8], 0
jnz short loc_19088
mov [rdi+8], rsi
loc_19088:
cmp qword ptr [rdi+10h], 0
jnz short loc_19093
mov [rdi+10h], rsi
loc_19093:
cmp qword ptr [rdi+18h], 0
jnz short loc_1909E
mov [rdi+18h], rsi
loc_1909E:
cmp qword ptr [rdi+20h], 0
jnz short loc_190A9
mov [rdi+20h], rsi
loc_190A9:
cmp qword ptr [rdi+28h], 0
jnz short loc_190B4
mov [rdi+28h], rsi
loc_190B4:
cmp qword ptr [rdi+30h], 0
jz short loc_190BC
retn
loc_190BC:
mov [rdi+30h], rsi
retn
|
void lunasvg::SVGRadialGradientAttributes::setDefaultValues(
lunasvg::SVGRadialGradientAttributes *this,
const lunasvg::SVGRadialGradientElement *a2)
{
if ( !*(_QWORD *)this )
*(_QWORD *)this = a2;
if ( !*((_QWORD *)this + 1) )
*((_QWORD *)this + 1) = a2;
if ( !*((_QWORD *)this + 2) )
*((_QWORD *)this + 2) = a2;
if ( !*((_QWORD *)this + 3) )
*((_QWORD *)this + 3) = a2;
if ( !*((_QWORD *)this + 4) )
*((_QWORD *)this + 4) = a2;
if ( !*((_QWORD *)this + 5) )
*((_QWORD *)this + 5) = a2;
if ( !*((_QWORD *)this + 6) )
*((_QWORD *)this + 6) = a2;
}
|
setDefaultValues:
CMP qword ptr [RDI],0x0
JNZ 0x0011907d
MOV qword ptr [RDI],RSI
LAB_0011907d:
CMP qword ptr [RDI + 0x8],0x0
JNZ 0x00119088
MOV qword ptr [RDI + 0x8],RSI
LAB_00119088:
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x00119093
MOV qword ptr [RDI + 0x10],RSI
LAB_00119093:
CMP qword ptr [RDI + 0x18],0x0
JNZ 0x0011909e
MOV qword ptr [RDI + 0x18],RSI
LAB_0011909e:
CMP qword ptr [RDI + 0x20],0x0
JNZ 0x001190a9
MOV qword ptr [RDI + 0x20],RSI
LAB_001190a9:
CMP qword ptr [RDI + 0x28],0x0
JNZ 0x001190b4
MOV qword ptr [RDI + 0x28],RSI
LAB_001190b4:
CMP qword ptr [RDI + 0x30],0x0
JZ 0x001190bc
RET
LAB_001190bc:
MOV qword ptr [RDI + 0x30],RSI
RET
|
/* lunasvg::SVGRadialGradientAttributes::setDefaultValues(lunasvg::SVGRadialGradientElement const*)
*/
void __thiscall
lunasvg::SVGRadialGradientAttributes::setDefaultValues
(SVGRadialGradientAttributes *this,SVGRadialGradientElement *param_1)
{
if (*(long *)this == 0) {
*(SVGRadialGradientElement **)this = param_1;
}
if (*(long *)(this + 8) == 0) {
*(SVGRadialGradientElement **)(this + 8) = param_1;
}
if (*(long *)(this + 0x10) == 0) {
*(SVGRadialGradientElement **)(this + 0x10) = param_1;
}
if (*(long *)(this + 0x18) == 0) {
*(SVGRadialGradientElement **)(this + 0x18) = param_1;
}
if (*(long *)(this + 0x20) == 0) {
*(SVGRadialGradientElement **)(this + 0x20) = param_1;
}
if (*(long *)(this + 0x28) == 0) {
*(SVGRadialGradientElement **)(this + 0x28) = param_1;
}
if (*(long *)(this + 0x30) != 0) {
return;
}
*(SVGRadialGradientElement **)(this + 0x30) = param_1;
return;
}
|
|
18,766
|
lunasvg::SVGGradientAttributes::setDefaultValues(lunasvg::SVGGradientElement const*)
|
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.h
|
void setDefaultValues(const SVGGradientElement* element) {
if(!m_gradientTransform) { m_gradientTransform = element; }
if(!m_spreadMethod) { m_spreadMethod = element; }
if(!m_gradientUnits) { m_gradientUnits = element; }
if(!m_gradientContentElement) { m_gradientContentElement = element; }
}
|
O3
|
c
|
lunasvg::SVGGradientAttributes::setDefaultValues(lunasvg::SVGGradientElement const*):
cmpq $0x0, (%rdi)
jne 0x18997
movq %rsi, (%rdi)
cmpq $0x0, 0x8(%rdi)
jne 0x189a2
movq %rsi, 0x8(%rdi)
cmpq $0x0, 0x10(%rdi)
jne 0x189ad
movq %rsi, 0x10(%rdi)
cmpq $0x0, 0x18(%rdi)
jne 0x189b8
movq %rsi, 0x18(%rdi)
cmpq $0x0, 0x20(%rdi)
jne 0x189c3
movq %rsi, 0x20(%rdi)
cmpq $0x0, 0x28(%rdi)
jne 0x189ce
movq %rsi, 0x28(%rdi)
cmpq $0x0, 0x30(%rdi)
je 0x189d6
retq
movq %rsi, 0x30(%rdi)
retq
nop
|
_ZN7lunasvg27SVGRadialGradientAttributes16setDefaultValuesEPKNS_24SVGRadialGradientElementE:
cmp qword ptr [rdi], 0
jnz short loc_18997
mov [rdi], rsi
loc_18997:
cmp qword ptr [rdi+8], 0
jnz short loc_189A2
mov [rdi+8], rsi
loc_189A2:
cmp qword ptr [rdi+10h], 0
jnz short loc_189AD
mov [rdi+10h], rsi
loc_189AD:
cmp qword ptr [rdi+18h], 0
jnz short loc_189B8
mov [rdi+18h], rsi
loc_189B8:
cmp qword ptr [rdi+20h], 0
jnz short loc_189C3
mov [rdi+20h], rsi
loc_189C3:
cmp qword ptr [rdi+28h], 0
jnz short loc_189CE
mov [rdi+28h], rsi
loc_189CE:
cmp qword ptr [rdi+30h], 0
jz short loc_189D6
retn
loc_189D6:
mov [rdi+30h], rsi
retn
|
void lunasvg::SVGRadialGradientAttributes::setDefaultValues(
lunasvg::SVGRadialGradientAttributes *this,
const lunasvg::SVGRadialGradientElement *a2)
{
if ( !*(_QWORD *)this )
*(_QWORD *)this = a2;
if ( !*((_QWORD *)this + 1) )
*((_QWORD *)this + 1) = a2;
if ( !*((_QWORD *)this + 2) )
*((_QWORD *)this + 2) = a2;
if ( !*((_QWORD *)this + 3) )
*((_QWORD *)this + 3) = a2;
if ( !*((_QWORD *)this + 4) )
*((_QWORD *)this + 4) = a2;
if ( !*((_QWORD *)this + 5) )
*((_QWORD *)this + 5) = a2;
if ( !*((_QWORD *)this + 6) )
*((_QWORD *)this + 6) = a2;
}
|
setDefaultValues:
CMP qword ptr [RDI],0x0
JNZ 0x00118997
MOV qword ptr [RDI],RSI
LAB_00118997:
CMP qword ptr [RDI + 0x8],0x0
JNZ 0x001189a2
MOV qword ptr [RDI + 0x8],RSI
LAB_001189a2:
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x001189ad
MOV qword ptr [RDI + 0x10],RSI
LAB_001189ad:
CMP qword ptr [RDI + 0x18],0x0
JNZ 0x001189b8
MOV qword ptr [RDI + 0x18],RSI
LAB_001189b8:
CMP qword ptr [RDI + 0x20],0x0
JNZ 0x001189c3
MOV qword ptr [RDI + 0x20],RSI
LAB_001189c3:
CMP qword ptr [RDI + 0x28],0x0
JNZ 0x001189ce
MOV qword ptr [RDI + 0x28],RSI
LAB_001189ce:
CMP qword ptr [RDI + 0x30],0x0
JZ 0x001189d6
RET
LAB_001189d6:
MOV qword ptr [RDI + 0x30],RSI
RET
|
/* lunasvg::SVGRadialGradientAttributes::setDefaultValues(lunasvg::SVGRadialGradientElement const*)
*/
void __thiscall
lunasvg::SVGRadialGradientAttributes::setDefaultValues
(SVGRadialGradientAttributes *this,SVGRadialGradientElement *param_1)
{
if (*(long *)this == 0) {
*(SVGRadialGradientElement **)this = param_1;
}
if (*(long *)(this + 8) == 0) {
*(SVGRadialGradientElement **)(this + 8) = param_1;
}
if (*(long *)(this + 0x10) == 0) {
*(SVGRadialGradientElement **)(this + 0x10) = param_1;
}
if (*(long *)(this + 0x18) == 0) {
*(SVGRadialGradientElement **)(this + 0x18) = param_1;
}
if (*(long *)(this + 0x20) == 0) {
*(SVGRadialGradientElement **)(this + 0x20) = param_1;
}
if (*(long *)(this + 0x28) == 0) {
*(SVGRadialGradientElement **)(this + 0x28) = param_1;
}
if (*(long *)(this + 0x30) != 0) {
return;
}
*(SVGRadialGradientElement **)(this + 0x30) = param_1;
return;
}
|
|
18,767
|
minja::ElifTemplateToken::~ElifTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
ElifTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, location, pre, post), condition(std::move(c)) {}
|
O1
|
cpp
|
minja::ElifTemplateToken::~ElifTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x94915(%rip), %rax # 0x12db78
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x99278
callq 0x6dc18
leaq 0x94079(%rip), %rax # 0x12d2f8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x99295
popq %rbx
jmp 0x6dc18
popq %rbx
retq
nop
|
_ZN5minja17ElifTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja17ElifTemplateTokenE; `vtable for'minja::ElifTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_99278
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_99278:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_99295
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_99295:
pop rbx
retn
|
void minja::ElifTemplateToken::~ElifTemplateToken(minja::ElifTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::ElifTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
|
~ElifTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22db78]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x00199278
CALL 0x0016dc18
LAB_00199278:
LEA RAX,[0x22d2f8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x00199295
POP RBX
JMP 0x0016dc18
LAB_00199295:
POP RBX
RET
|
/* minja::ElifTemplateToken::~ElifTemplateToken() */
void __thiscall minja::ElifTemplateToken::~ElifTemplateToken(ElifTemplateToken *this)
{
*(int ***)this = &PTR__ElifTemplateToken_0022db88;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_0022d308;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
return;
}
return;
}
|
|
18,768
|
process_str_arg
|
eloqsql/strings/my_vsnprintf.c
|
static char *process_str_arg(CHARSET_INFO *cs, char *to, const char *end,
longlong length_arg, size_t width, char *par,
uint print_type, my_bool nice_cut)
{
int well_formed_error;
uint dots= 0;
size_t plen, left_len= (size_t) (end - to) + 1, slen=0;
my_bool left_fill= 1;
size_t length;
/*
The sign of the length argument specific the string should be right
or left adjusted
*/
if (length_arg < 0)
{
length= (size_t) -length_arg;
left_fill= 0;
}
else
length= (size_t) length_arg;
if (!par)
par = (char*) "(null)";
if (nice_cut)
{
plen= slen= strnlen(par, width + 1);
if (plen > width)
plen= width;
if (left_len <= plen)
{
plen = left_len - 1;
length= plen;
}
if ((slen > plen))
{
if (plen < 3)
{
dots= (uint) plen;
plen= 0;
}
else
{
dots= 3;
plen-= 3;
}
}
}
else
{
plen= slen= strnlen(par, width);
dots= 0;
if (left_len <= plen)
{
plen = left_len - 1;
length= plen;
}
}
plen= my_well_formed_length(cs, par, par + plen, width, &well_formed_error);
if (print_type & ESCAPED_ARG)
{
const char *org_to= to;
to= backtick_string(cs, to, end, par, plen + dots, '`', MY_TEST(dots));
plen= (size_t) (to - org_to);
dots= 0;
}
else
{
if (left_fill)
{
if (plen + dots < length)
to= strfill(to, length - plen - dots, ' ');
}
to= strnmov(to,par,plen);
if (dots)
to= strfill(to, dots, '.');
}
if (!left_fill && plen + dots < length)
to= strfill(to, length - plen - dots, ' ');
return to;
}
|
O3
|
c
|
process_str_arg:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r15
movq %rdi, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq %rdx, %r14
movq %rsi, -0x38(%rbp)
subq %rsi, %r14
leaq 0x1(%r14), %rbx
movq %rcx, %r13
negq %r13
movq %rcx, -0x40(%rbp)
cmovsq %rcx, %r13
testq %r9, %r9
leaq 0x5e1c(%rip), %r12 # 0x6710a
cmovneq %r9, %r12
cmpb $0x0, 0x18(%rbp)
je 0x61336
leaq 0x1(%r15), %rsi
movq %r12, %rdi
callq 0x24610
cmpq %r15, %rax
movq %r15, %rdx
cmovbq %rax, %rdx
cmpq %rdx, %rbx
cmovbeq %r14, %rdx
cmovbeq %r14, %r13
movl $0x0, -0x2c(%rbp)
cmpq %rdx, %rax
movq %r13, -0x48(%rbp)
jbe 0x61367
cmpq $0x2, %rdx
ja 0x6135c
movl %edx, -0x2c(%rbp)
xorl %edx, %edx
jmp 0x61367
movq %r12, %rdi
movq %r15, %rsi
callq 0x24610
movq %rax, %rdx
cmpq %rax, %rbx
cmovbeq %r14, %rdx
cmovbeq %r14, %r13
movq %r13, -0x48(%rbp)
movl $0x0, -0x2c(%rbp)
jmp 0x61367
addq $-0x3, %rdx
movl $0x3, -0x2c(%rbp)
addq %r12, %rdx
movq -0x58(%rbp), %rdi
movq 0xb8(%rdi), %rax
leaq -0x70(%rbp), %rbx
movq %r12, %rsi
movq %r15, %rcx
movq %rbx, %r8
callq *0xc8(%rax)
movq (%rbx), %r13
subq %r12, %r13
movl 0x10(%rbp), %eax
testb $0x8, %al
jne 0x613cf
movq -0x40(%rbp), %rbx
testq %rbx, %rbx
js 0x614a2
movl -0x2c(%rbp), %r14d
movl %r14d, %eax
addq %r13, %rax
movq -0x48(%rbp), %rsi
subq %rax, %rsi
jbe 0x614ac
movq -0x38(%rbp), %rdi
movl $0x20, %edx
callq 0x61bf0
movq %rax, %rdi
jmp 0x614b0
movl -0x2c(%rbp), %eax
addq %rax, %r13
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
cmpq %r13, %r14
jbe 0x6152c
movq -0x38(%rbp), %rax
leaq 0x1(%rax), %r15
movb $0x60, (%rax)
testq %r13, %r13
jle 0x614db
addq %r12, %r13
xorl %r14d, %r14d
cmpl $0x0, -0x2c(%rbp)
je 0x61432
movl %r14d, %eax
movq %r15, -0x70(%rbp,%rax,8)
movl %r14d, %eax
incl %eax
movl $0xaaaaaaab, %ecx # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x21, %rax
leal (%rax,%rax,2), %eax
negl %eax
addl %eax, %r14d
incl %r14d
movb (%r12), %bl
movq -0x58(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x1, %ecx
cmovll %ecx, %eax
jge 0x61473
cmpb $0x60, %bl
jne 0x61473
leaq 0x1(%r15), %rdi
cmpq -0x50(%rbp), %rdi
jae 0x6152c
movb $0x60, (%r15)
jmp 0x61476
movq %r15, %rdi
movl %eax, %ebx
leaq (%rdi,%rbx), %rax
cmpq -0x50(%rbp), %rax
jae 0x6152c
movq %r12, %rsi
movq %rbx, %rdx
callq 0x61c50
movq %rax, %r15
addq %rbx, %r12
cmpq %r13, %r12
jb 0x61407
jmp 0x614de
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %r14d
jmp 0x614b0
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x61c50
movq %rax, %r15
testl %r14d, %r14d
je 0x61540
movl %r14d, %r14d
movq %r15, %rdi
movq %r14, %rsi
movl $0x2e, %edx
callq 0x61bf0
movq %rax, %r15
jmp 0x61543
xorl %r14d, %r14d
leaq 0x1(%r15), %rax
cmpq -0x50(%rbp), %rax
jae 0x6152c
cmpl $0x0, -0x2c(%rbp)
je 0x6158e
subl $0x1, %r14d
movl $0x2, %eax
cmovbl %eax, %r14d
movq -0x70(%rbp,%r14,8), %rdx
testq %rdx, %rdx
je 0x6152c
movl $0x1, %ecx
subl $0x1, %r14d
cmovbl %eax, %r14d
movq -0x70(%rbp,%r14,8), %r15
testq %r15, %r15
je 0x61576
incl %ecx
movq %r15, %rdx
cmpl $0x3, %ecx
jne 0x6150e
jmp 0x61579
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq %rax, %r15
movq -0x40(%rbp), %rbx
movq %r15, %r13
subq %rax, %r13
xorl %r14d, %r14d
testq %rbx, %rbx
jns 0x61564
addq %r14, %r13
movq -0x48(%rbp), %rsi
subq %r13, %rsi
jbe 0x61564
movq %r15, %rdi
movl $0x20, %edx
callq 0x61bf0
movq %rax, %r15
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movl %ecx, %ebx
movq %r15, %rdi
movl $0x2e, %esi
movq %rbx, %rdx
callq 0x241d0
addq %rbx, %r15
movb $0x60, (%r15)
incq %r15
movq -0x40(%rbp), %rbx
movq -0x38(%rbp), %rax
jmp 0x6153a
|
process_str_arg:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, r8
mov [rbp+var_58], rdi
mov [rbp+var_50], rdx
mov r14, rdx
mov [rbp+var_38], rsi
sub r14, rsi
lea rbx, [r14+1]
mov r13, rcx
neg r13
mov [rbp+var_40], rcx
cmovs r13, rcx
test r9, r9
lea r12, aNull; "(null)"
cmovnz r12, r9
cmp [rbp+arg_8], 0
jz short loc_61336
lea rsi, [r15+1]
mov rdi, r12
call _strnlen
cmp rax, r15
mov rdx, r15
cmovb rdx, rax
cmp rbx, rdx
cmovbe rdx, r14
cmovbe r13, r14
mov [rbp+var_2C], 0
cmp rax, rdx
mov [rbp+var_48], r13
jbe short loc_61367
cmp rdx, 2
ja short loc_6135C
mov [rbp+var_2C], edx
xor edx, edx
jmp short loc_61367
loc_61336:
mov rdi, r12
mov rsi, r15
call _strnlen
mov rdx, rax
cmp rbx, rax
cmovbe rdx, r14
cmovbe r13, r14
mov [rbp+var_48], r13
mov [rbp+var_2C], 0
jmp short loc_61367
loc_6135C:
add rdx, 0FFFFFFFFFFFFFFFDh
mov [rbp+var_2C], 3
loc_61367:
add rdx, r12
mov rdi, [rbp+var_58]
mov rax, [rdi+0B8h]
lea rbx, [rbp+var_70]
mov rsi, r12
mov rcx, r15
mov r8, rbx
call qword ptr [rax+0C8h]
mov r13, [rbx]
sub r13, r12
mov eax, [rbp+arg_0]
test al, 8
jnz short loc_613CF
mov rbx, [rbp+var_40]
test rbx, rbx
js loc_614A2
mov r14d, [rbp+var_2C]
mov eax, r14d
add rax, r13
mov rsi, [rbp+var_48]
sub rsi, rax
jbe loc_614AC
mov rdi, [rbp+var_38]
mov edx, 20h ; ' '
call strfill
mov rdi, rax
jmp loc_614B0
loc_613CF:
mov eax, [rbp+var_2C]
add r13, rax
xorps xmm0, xmm0
movaps [rbp+var_70], xmm0
mov [rbp+var_60], 0
cmp r14, r13
jbe loc_6152C
mov rax, [rbp+var_38]
lea r15, [rax+1]
mov byte ptr [rax], 60h ; '`'
test r13, r13
jle loc_614DB
add r13, r12
xor r14d, r14d
loc_61407:
cmp [rbp+var_2C], 0
jz short loc_61432
mov eax, r14d
mov qword ptr [rbp+rax*8+var_70], r15
mov eax, r14d
inc eax
mov ecx, 0AAAAAAABh
imul rax, rcx
shr rax, 21h
lea eax, [rax+rax*2]
neg eax
add r14d, eax
inc r14d
loc_61432:
mov bl, [r12]
mov rdi, [rbp+var_58]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 1
cmovl eax, ecx
jge short loc_61473
cmp bl, 60h ; '`'
jnz short loc_61473
lea rdi, [r15+1]
cmp rdi, [rbp+var_50]
jnb loc_6152C
mov byte ptr [r15], 60h ; '`'
jmp short loc_61476
loc_61473:
mov rdi, r15
loc_61476:
mov ebx, eax
lea rax, [rdi+rbx]
cmp rax, [rbp+var_50]
jnb loc_6152C
mov rsi, r12
mov rdx, rbx
call strnmov
mov r15, rax
add r12, rbx
cmp r12, r13
jb loc_61407
jmp short loc_614DE
loc_614A2:
mov rdi, [rbp+var_38]
mov r14d, [rbp+var_2C]
jmp short loc_614B0
loc_614AC:
mov rdi, [rbp+var_38]
loc_614B0:
mov rsi, r12
mov rdx, r13
call strnmov
mov r15, rax
test r14d, r14d
jz short loc_61540
mov r14d, r14d
mov rdi, r15
mov rsi, r14
mov edx, 2Eh ; '.'
call strfill
mov r15, rax
jmp short loc_61543
loc_614DB:
xor r14d, r14d
loc_614DE:
lea rax, [r15+1]
cmp rax, [rbp+var_50]
jnb short loc_6152C
cmp [rbp+var_2C], 0
jz loc_6158E
sub r14d, 1
mov eax, 2
cmovb r14d, eax
mov rdx, qword ptr [rbp+r14*8+var_70]
test rdx, rdx
jz short loc_6152C
mov ecx, 1
loc_6150E:
sub r14d, 1
cmovb r14d, eax
mov r15, qword ptr [rbp+r14*8+var_70]
test r15, r15
jz short loc_61576
inc ecx
mov rdx, r15
cmp ecx, 3
jnz short loc_6150E
jmp short loc_61579
loc_6152C:
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov r15, rax
mov rbx, [rbp+var_40]
loc_6153A:
mov r13, r15
sub r13, rax
loc_61540:
xor r14d, r14d
loc_61543:
test rbx, rbx
jns short loc_61564
add r13, r14
mov rsi, [rbp+var_48]
sub rsi, r13
jbe short loc_61564
mov rdi, r15
mov edx, 20h ; ' '
call strfill
mov r15, rax
loc_61564:
mov rax, r15
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_61576:
mov r15, rdx
loc_61579:
mov ebx, ecx
mov rdi, r15
mov esi, 2Eh ; '.'
mov rdx, rbx
call _memset
add r15, rbx
loc_6158E:
mov byte ptr [r15], 60h ; '`'
inc r15
mov rbx, [rbp+var_40]
mov rax, [rbp+var_38]
jmp short loc_6153A
|
long long process_str_arg(
long long a1,
_BYTE *a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
const char *a6,
char a7,
char a8)
{
unsigned long long v9; // r14
unsigned long long v10; // rbx
long long v11; // r13
const char *v12; // r12
unsigned long long v13; // rax
unsigned long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
long long v18; // r13
long long v19; // rbx
long long v20; // r14
unsigned long long v21; // rax
long long v22; // rdi
long long v23; // r13
_BYTE *v24; // r15
const char *v25; // r13
unsigned int v26; // r14d
char v27; // bl
unsigned int v28; // eax
_BYTE *v29; // rdi
long long v30; // rbx
long long v31; // rax
long long v32; // r15
bool v33; // cf
long long v34; // r14
long long v35; // rdx
unsigned int v36; // ecx
long long v37; // r15
_BYTE *v38; // rax
unsigned long long v39; // r13
long long v41; // rbx
__int128 v42; // [rsp+0h] [rbp-70h] BYREF
long long v43; // [rsp+10h] [rbp-60h]
long long v44; // [rsp+18h] [rbp-58h]
unsigned long long v45; // [rsp+20h] [rbp-50h]
unsigned long long v46; // [rsp+28h] [rbp-48h]
long long v47; // [rsp+30h] [rbp-40h]
_BYTE *v48; // [rsp+38h] [rbp-38h]
unsigned int v49; // [rsp+44h] [rbp-2Ch]
v44 = a1;
v45 = a3;
v48 = a2;
v9 = a3 - (_QWORD)a2;
v10 = a3 - (_QWORD)a2 + 1;
v11 = -a4;
v47 = a4;
if ( a4 > 0 )
v11 = a4;
v12 = "(null)";
if ( a6 )
v12 = a6;
if ( a8 )
{
v13 = strnlen(v12, a5 + 1);
v14 = a5;
if ( v13 < a5 )
v14 = v13;
if ( v10 <= v14 )
{
v14 = v9;
v11 = v9;
}
v49 = 0;
v46 = v11;
if ( v13 > v14 )
{
if ( v14 > 2 )
{
v14 -= 3LL;
v49 = 3;
}
else
{
v49 = v14;
v14 = 0LL;
}
}
}
else
{
v14 = strnlen(v12, a5);
if ( v10 <= v14 )
{
v14 = v9;
v11 = v9;
}
v46 = v11;
v49 = 0;
}
(*(void ( **)(long long, const char *, const char *, unsigned long long, __int128 *))(*(_QWORD *)(v44 + 184)
+ 200LL))(
v44,
v12,
&v12[v14],
a5,
&v42);
v18 = v42 - (_QWORD)v12;
if ( (a7 & 8) != 0 )
{
v23 = v49 + v18;
v42 = 0LL;
v43 = 0LL;
if ( v9 > v23 )
{
v24 = v48 + 1;
*v48 = 96;
if ( v23 > 0 )
{
v25 = &v12[v23];
v26 = 0;
while ( 1 )
{
if ( v49 )
{
*((_QWORD *)&v42 + v26) = v24;
v15 = 2863311531LL;
v26 += -3 * ((v26 + 1) / 3) + 1;
}
v27 = *v12;
v28 = (*(long long ( **)(long long, const char *, const char *, long long, long long, long long, _QWORD, _QWORD, long long))(*(_QWORD *)(v44 + 184) + 192LL))(
v44,
v12,
v25,
v15,
v16,
v17,
v42,
*((_QWORD *)&v42 + 1),
v43);
if ( (int)v28 < 2 && (v28 = 1, v27 == 96) )
{
v29 = v24 + 1;
if ( (unsigned long long)(v24 + 1) >= v45 )
goto LABEL_50;
*v24 = 96;
}
else
{
v29 = v24;
}
v30 = v28;
if ( (unsigned long long)&v29[v28] >= v45 )
goto LABEL_50;
v24 = (_BYTE *)strnmov(v29, v12, v28);
v12 += v30;
if ( v12 >= v25 )
goto LABEL_39;
}
}
v26 = 0;
LABEL_39:
if ( (unsigned long long)(v24 + 1) >= v45 )
goto LABEL_50;
if ( !v49 )
{
LABEL_59:
*v24 = 96;
v32 = (long long)(v24 + 1);
v19 = v47;
v38 = v48;
goto LABEL_51;
}
v33 = v26 == 0;
v34 = v26 - 1;
if ( v33 )
v34 = 2LL;
v35 = *((_QWORD *)&v42 + v34);
if ( v35 )
{
v36 = 1;
while ( 1 )
{
v33 = (_DWORD)v34 == 0;
v34 = (unsigned int)(v34 - 1);
if ( v33 )
v34 = 2LL;
v37 = *((_QWORD *)&v42 + v34);
if ( !v37 )
break;
++v36;
v35 = *((_QWORD *)&v42 + v34);
if ( v36 == 3 )
goto LABEL_58;
}
v37 = v35;
LABEL_58:
v41 = v36;
memset(v37, 46LL, v36);
v24 = (_BYTE *)(v41 + v37);
goto LABEL_59;
}
}
LABEL_50:
v38 = v48;
*v48 = 0;
v32 = (long long)v38;
v19 = v47;
LABEL_51:
v18 = v32 - (_QWORD)v38;
LABEL_52:
v20 = 0LL;
goto LABEL_53;
}
v19 = v47;
if ( v47 < 0 )
{
v22 = (long long)v48;
LODWORD(v20) = v49;
}
else
{
LODWORD(v20) = v49;
v21 = v18 + v49;
if ( v46 <= v21 )
v22 = (long long)v48;
else
v22 = strfill(v48, v46 - v21, 32LL);
}
v31 = strnmov(v22, v12, v18);
v32 = v31;
if ( !(_DWORD)v20 )
goto LABEL_52;
v20 = (unsigned int)v20;
v32 = strfill(v31, (unsigned int)v20, 46LL);
LABEL_53:
if ( v19 < 0 )
{
v39 = v20 + v18;
if ( v46 > v39 )
return strfill(v32, v46 - v39, 32LL);
}
return v32;
}
|
process_str_arg:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,R8
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x50],RDX
MOV R14,RDX
MOV qword ptr [RBP + -0x38],RSI
SUB R14,RSI
LEA RBX,[R14 + 0x1]
MOV R13,RCX
NEG R13
MOV qword ptr [RBP + -0x40],RCX
CMOVS R13,RCX
TEST R9,R9
LEA R12,[0x16710a]
CMOVNZ R12,R9
CMP byte ptr [RBP + 0x18],0x0
JZ 0x00161336
LEA RSI,[R15 + 0x1]
MOV RDI,R12
CALL 0x00124610
CMP RAX,R15
MOV RDX,R15
CMOVC RDX,RAX
CMP RBX,RDX
CMOVBE RDX,R14
CMOVBE R13,R14
MOV dword ptr [RBP + -0x2c],0x0
CMP RAX,RDX
MOV qword ptr [RBP + -0x48],R13
JBE 0x00161367
CMP RDX,0x2
JA 0x0016135c
MOV dword ptr [RBP + -0x2c],EDX
XOR EDX,EDX
JMP 0x00161367
LAB_00161336:
MOV RDI,R12
MOV RSI,R15
CALL 0x00124610
MOV RDX,RAX
CMP RBX,RAX
CMOVBE RDX,R14
CMOVBE R13,R14
MOV qword ptr [RBP + -0x48],R13
MOV dword ptr [RBP + -0x2c],0x0
JMP 0x00161367
LAB_0016135c:
ADD RDX,-0x3
MOV dword ptr [RBP + -0x2c],0x3
LAB_00161367:
ADD RDX,R12
MOV RDI,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RBX,[RBP + -0x70]
MOV RSI,R12
MOV RCX,R15
MOV R8,RBX
CALL qword ptr [RAX + 0xc8]
MOV R13,qword ptr [RBX]
SUB R13,R12
MOV EAX,dword ptr [RBP + 0x10]
TEST AL,0x8
JNZ 0x001613cf
MOV RBX,qword ptr [RBP + -0x40]
TEST RBX,RBX
JS 0x001614a2
MOV R14D,dword ptr [RBP + -0x2c]
MOV EAX,R14D
ADD RAX,R13
MOV RSI,qword ptr [RBP + -0x48]
SUB RSI,RAX
JBE 0x001614ac
MOV RDI,qword ptr [RBP + -0x38]
MOV EDX,0x20
CALL 0x00161bf0
MOV RDI,RAX
JMP 0x001614b0
LAB_001613cf:
MOV EAX,dword ptr [RBP + -0x2c]
ADD R13,RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOV qword ptr [RBP + -0x60],0x0
CMP R14,R13
JBE 0x0016152c
MOV RAX,qword ptr [RBP + -0x38]
LEA R15,[RAX + 0x1]
MOV byte ptr [RAX],0x60
TEST R13,R13
JLE 0x001614db
ADD R13,R12
XOR R14D,R14D
LAB_00161407:
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x00161432
MOV EAX,R14D
MOV qword ptr [RBP + RAX*0x8 + -0x70],R15
MOV EAX,R14D
INC EAX
MOV ECX,0xaaaaaaab
IMUL RAX,RCX
SHR RAX,0x21
LEA EAX,[RAX + RAX*0x2]
NEG EAX
ADD R14D,EAX
INC R14D
LAB_00161432:
MOV BL,byte ptr [R12]
MOV RDI,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x1
CMOVL EAX,ECX
JGE 0x00161473
CMP BL,0x60
JNZ 0x00161473
LEA RDI,[R15 + 0x1]
CMP RDI,qword ptr [RBP + -0x50]
JNC 0x0016152c
MOV byte ptr [R15],0x60
JMP 0x00161476
LAB_00161473:
MOV RDI,R15
LAB_00161476:
MOV EBX,EAX
LEA RAX,[RDI + RBX*0x1]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x0016152c
MOV RSI,R12
MOV RDX,RBX
CALL 0x00161c50
MOV R15,RAX
ADD R12,RBX
CMP R12,R13
JC 0x00161407
JMP 0x001614de
LAB_001614a2:
MOV RDI,qword ptr [RBP + -0x38]
MOV R14D,dword ptr [RBP + -0x2c]
JMP 0x001614b0
LAB_001614ac:
MOV RDI,qword ptr [RBP + -0x38]
LAB_001614b0:
MOV RSI,R12
MOV RDX,R13
CALL 0x00161c50
MOV R15,RAX
TEST R14D,R14D
JZ 0x00161540
MOV R14D,R14D
MOV RDI,R15
MOV RSI,R14
MOV EDX,0x2e
CALL 0x00161bf0
MOV R15,RAX
JMP 0x00161543
LAB_001614db:
XOR R14D,R14D
LAB_001614de:
LEA RAX,[R15 + 0x1]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x0016152c
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0016158e
SUB R14D,0x1
MOV EAX,0x2
CMOVC R14D,EAX
MOV RDX,qword ptr [RBP + R14*0x8 + -0x70]
TEST RDX,RDX
JZ 0x0016152c
MOV ECX,0x1
LAB_0016150e:
SUB R14D,0x1
CMOVC R14D,EAX
MOV R15,qword ptr [RBP + R14*0x8 + -0x70]
TEST R15,R15
JZ 0x00161576
INC ECX
MOV RDX,R15
CMP ECX,0x3
JNZ 0x0016150e
JMP 0x00161579
LAB_0016152c:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV R15,RAX
MOV RBX,qword ptr [RBP + -0x40]
LAB_0016153a:
MOV R13,R15
SUB R13,RAX
LAB_00161540:
XOR R14D,R14D
LAB_00161543:
TEST RBX,RBX
JNS 0x00161564
ADD R13,R14
MOV RSI,qword ptr [RBP + -0x48]
SUB RSI,R13
JBE 0x00161564
MOV RDI,R15
MOV EDX,0x20
CALL 0x00161bf0
MOV R15,RAX
LAB_00161564:
MOV RAX,R15
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00161576:
MOV R15,RDX
LAB_00161579:
MOV EBX,ECX
MOV RDI,R15
MOV ESI,0x2e
MOV RDX,RBX
CALL 0x001241d0
ADD R15,RBX
LAB_0016158e:
MOV byte ptr [R15],0x60
INC R15
MOV RBX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
JMP 0x0016153a
|
int1 *
process_str_arg(long param_1,int1 *param_2,int1 *param_3,ulong param_4,ulong param_5,
char *param_6,uint param_7,char param_8)
{
char cVar1;
void *pvVar2;
uint uVar3;
uint uVar4;
size_t sVar5;
int1 *puVar6;
void *__s;
long lVar7;
char *__string;
long lVar8;
ulong uVar9;
char *pcVar10;
int iVar11;
ulong uVar12;
long local_78 [4];
int1 *local_58;
ulong local_50;
ulong local_48;
int1 *local_40;
uint local_34;
uVar12 = (long)param_3 - (long)param_2;
local_50 = -param_4;
if (0 < (long)param_4) {
local_50 = param_4;
}
__string = "(null)";
if (param_6 != (char *)0x0) {
__string = param_6;
}
local_78[3] = param_1;
local_58 = param_3;
local_48 = param_4;
local_40 = param_2;
if (param_8 == '\0') {
uVar9 = strnlen(__string,param_5);
if (uVar12 + 1 <= uVar9) {
local_50 = uVar12;
uVar9 = uVar12;
}
local_34 = 0;
}
else {
sVar5 = strnlen(__string,param_5 + 1);
uVar9 = param_5;
if (sVar5 < param_5) {
uVar9 = sVar5;
}
if (uVar12 + 1 <= uVar9) {
local_50 = uVar12;
uVar9 = uVar12;
}
local_34 = 0;
if (uVar9 < sVar5) {
if (uVar9 < 3) {
local_34 = (uint)uVar9;
uVar9 = 0;
}
else {
uVar9 = uVar9 - 3;
local_34 = 3;
}
}
}
(**(code **)(*(long *)(local_78[3] + 0xb8) + 200))
(local_78[3],__string,__string + uVar9,param_5,local_78);
uVar4 = local_34;
uVar9 = local_48;
lVar8 = local_78[0] - (long)__string;
if ((param_7 & 8) == 0) {
puVar6 = local_40;
if ((-1 < (long)local_48) &&
(lVar7 = local_50 - ((ulong)local_34 + lVar8),
(ulong)local_34 + lVar8 <= local_50 && lVar7 != 0)) {
puVar6 = (int1 *)strfill(local_40,lVar7,0x20);
}
uVar12 = (ulong)uVar4;
puVar6 = (int1 *)strnmov(puVar6,__string,lVar8);
if (uVar4 != 0) {
puVar6 = (int1 *)strfill(puVar6,uVar12,0x2e);
goto LAB_00161543;
}
}
else {
uVar9 = lVar8 + (ulong)local_34;
local_78[0] = 0;
local_78[1] = 0;
local_78[2] = 0;
if (uVar9 < uVar12) {
puVar6 = local_40 + 1;
*local_40 = 0x60;
if ((long)uVar9 < 1) {
iVar11 = 0;
}
else {
pcVar10 = __string + uVar9;
uVar12 = 0;
do {
if (local_34 != 0) {
local_78[uVar12] = (long)puVar6;
uVar12 = (ulong)((int)uVar12 + (((int)uVar12 + 1U) / 3) * -3 + 1);
}
iVar11 = (int)uVar12;
cVar1 = *__string;
uVar4 = (**(code **)(*(long *)(local_78[3] + 0xb8) + 0xc0))(local_78[3],__string,pcVar10);
if (((int)uVar4 < 2) && (uVar4 = 1, cVar1 == '`')) {
if (local_58 <= puVar6 + 1) goto LAB_0016152c;
*puVar6 = 0x60;
puVar6 = puVar6 + 1;
}
uVar9 = (ulong)uVar4;
if (local_58 <= puVar6 + uVar9) goto LAB_0016152c;
puVar6 = (int1 *)strnmov(puVar6,__string,uVar9);
__string = __string + uVar9;
} while (__string < pcVar10);
}
if (local_58 <= puVar6 + 1) goto LAB_0016152c;
if (local_34 != 0) {
uVar4 = iVar11 - 1;
if (iVar11 == 0) {
uVar4 = 2;
}
uVar12 = (ulong)uVar4;
if ((void *)local_78[uVar12] == (void *)0x0) goto LAB_0016152c;
uVar4 = 1;
__s = (void *)local_78[uVar12];
do {
uVar3 = (int)uVar12 - 1;
if ((int)uVar12 == 0) {
uVar3 = 2;
}
uVar12 = (ulong)uVar3;
pvVar2 = (void *)local_78[uVar12];
} while ((pvVar2 != (void *)0x0) && (uVar4 = uVar4 + 1, __s = pvVar2, uVar4 != 3));
memset(__s,0x2e,(ulong)uVar4);
puVar6 = (int1 *)((long)__s + (ulong)uVar4);
}
*puVar6 = 0x60;
puVar6 = puVar6 + 1;
}
else {
LAB_0016152c:
*local_40 = 0;
puVar6 = local_40;
}
lVar8 = (long)puVar6 - (long)local_40;
uVar9 = local_48;
}
uVar12 = 0;
LAB_00161543:
if (((long)uVar9 < 0) &&
(lVar7 = local_50 - (lVar8 + uVar12), lVar8 + uVar12 <= local_50 && lVar7 != 0)) {
puVar6 = (int1 *)strfill(puVar6,lVar7,0x20);
}
return puVar6;
}
|
|
18,769
|
my_hash_update
|
eloqsql/mysys/hash.c
|
my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key,
size_t old_key_length)
{
uint new_index, new_pos_index, org_index, records, idx;
size_t length, empty, blength;
my_hash_value_type hash_nr;
HASH_LINK org_link,*data,*previous,*pos;
uchar *new_key;
DBUG_ENTER("my_hash_update");
new_key= (uchar*) my_hash_key(hash, record, &length, 1);
hash_nr= hash->hash_function(hash->charset, new_key, length);
if (HASH_UNIQUE & hash->flags)
{
HASH_SEARCH_STATE state;
uchar *found;
if ((found= my_hash_first_from_hash_value(hash, hash_nr, new_key, length,
&state)))
{
do
{
if (found != record)
DBUG_RETURN(1); /* Duplicate entry */
}
while ((found= my_hash_next(hash, new_key, length, &state)));
}
}
data=dynamic_element(&hash->array,0,HASH_LINK*);
blength=hash->blength; records=hash->records;
/* Search after record with key */
idx= my_hash_mask(hash->hash_function(hash->charset, old_key,
(old_key_length ? old_key_length :
hash->key_length)),
blength, records);
org_index= idx;
new_index= my_hash_mask(hash_nr, blength, records);
previous=0;
for (;;)
{
if ((pos= data+idx)->data == record)
break;
previous=pos;
if ((idx=pos->next) == NO_RECORD)
DBUG_RETURN(1); /* Not found in links */
}
if (org_index == new_index)
{
data[idx].hash_nr= hash_nr; /* Hash number may have changed */
DBUG_RETURN(0); /* Record is in right position */
}
org_link= *pos;
empty=idx;
/* Relink record from current chain */
if (!previous)
{
if (pos->next != NO_RECORD)
{
empty=pos->next;
*pos= data[pos->next];
}
}
else
previous->next=pos->next; /* unlink pos */
/* Move data to correct position */
if (new_index == empty)
{
/*
At this point record is unlinked from the old chain, thus it holds
random position. By the chance this position is equal to position
for the first element in the new chain. That means updated record
is the only record in the new chain.
*/
if (empty != idx)
{
/*
Record was moved while unlinking it from the old chain.
Copy data to a new position.
*/
data[empty]= org_link;
}
data[empty].next= NO_RECORD;
data[empty].hash_nr= hash_nr;
DBUG_RETURN(0);
}
pos=data+new_index;
new_pos_index= my_hash_rec_mask(pos, blength, records);
if (new_index != new_pos_index)
{ /* Other record in wrong position */
data[empty]= *pos;
movelink(data,new_index,new_pos_index, (uint) empty);
org_link.next=NO_RECORD;
data[new_index]= org_link;
data[new_index].hash_nr= hash_nr;
}
else
{ /* Link in chain at right position */
org_link.next=data[new_index].next;
data[empty]=org_link;
data[empty].hash_nr= hash_nr;
data[new_index].next= (uint) empty;
}
DBUG_RETURN(0);
}
|
O0
|
c
|
my_hash_update:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdx
movl $0x1, %ecx
callq 0x2f120
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x68(%rcx), %rdi
movq -0x90(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq *%rax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2f6aa
movq -0x10(%rbp), %rdi
movl -0x5c(%rbp), %esi
movq -0x90(%rbp), %rdx
movq -0x48(%rbp), %rcx
leaq -0x94(%rbp), %r8
callq 0x2e900
movq %rax, -0xa0(%rbp)
cmpq $0x0, %rax
je 0x2f6a8
jmp 0x2f664
movq -0xa0(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x2f67c
jmp 0x2f673
movb $0x1, -0x1(%rbp)
jmp 0x2f9c2
jmp 0x2f67e
movq -0x10(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x94(%rbp), %rcx
callq 0x2eb20
movq %rax, -0xa0(%rbp)
cmpq $0x0, %rax
jne 0x2f664
jmp 0x2f6a8
jmp 0x2f6aa
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2f70a
movq -0x28(%rbp), %rax
movq %rax, -0xc0(%rbp)
jmp 0x2f719
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
movq -0xa8(%rbp), %rsi
movq -0xb0(%rbp), %rdi
movq -0xc0(%rbp), %rdx
callq *%rax
movl %eax, %edi
movq -0x58(%rbp), %rsi
movl -0x38(%rbp), %eax
movl %eax, %edx
callq 0x2ea00
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x5c(%rbp), %edi
movq -0x58(%rbp), %rsi
movl -0x38(%rbp), %eax
movl %eax, %edx
callq 0x2ea00
movl %eax, -0x2c(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x78(%rbp), %rax
movl -0x3c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x2f78d
jmp 0x2f7b6
movq -0x88(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $-0x1, %eax
jne 0x2f7b4
jmp 0x2f7ab
movb $0x1, -0x1(%rbp)
jmp 0x2f9c2
jmp 0x2f76c
movl -0x34(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jne 0x2f7db
movl -0x5c(%rbp), %ecx
movq -0x78(%rbp), %rax
movl -0x3c(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x2f9c2
movq -0x88(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x70(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movl -0x3c(%rbp), %eax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x2f843
movq -0x88(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x2f841
movq -0x88(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x50(%rbp)
movq -0x88(%rbp), %rax
movq -0x78(%rbp), %rcx
movq -0x88(%rbp), %rdx
movl (%rdx), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x2f852
movq -0x88(%rbp), %rax
movl (%rax), %ecx
movq -0x80(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
cmpq -0x50(%rbp), %rax
jne 0x2f8b8
movq -0x50(%rbp), %rax
movl -0x3c(%rbp), %ecx
cmpq %rcx, %rax
je 0x2f885
movq -0x78(%rbp), %rax
movq -0x50(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x78(%rbp), %rax
movq -0x50(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movl -0x5c(%rbp), %ecx
movq -0x78(%rbp), %rax
movq -0x50(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x2f9c2
movq -0x78(%rbp), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
movq -0x58(%rbp), %rsi
movl -0x38(%rbp), %eax
movl %eax, %edx
callq 0x2eaf0
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
je 0x2f960
movq -0x78(%rbp), %rax
movq -0x50(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x88(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x78(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movq -0x50(%rbp), %rax
movl %eax, %ecx
callq 0x2f190
movl $0xffffffff, -0x70(%rbp) # imm = 0xFFFFFFFF
movq -0x78(%rbp), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x5c(%rbp), %ecx
movq -0x78(%rbp), %rax
movl -0x2c(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
jmp 0x2f9bc
movq -0x78(%rbp), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x70(%rbp)
movq -0x78(%rbp), %rax
movq -0x50(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x5c(%rbp), %ecx
movq -0x78(%rbp), %rax
movq -0x50(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x50(%rbp), %rax
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl -0x2c(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
jmp 0x2f9be
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xc0, %rsp
popq %rbp
retq
nop
|
my_hash_update:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
lea rdx, [rbp+var_48]
mov ecx, 1
call my_hash_key
mov [rbp+var_90], rax
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+68h]
mov rsi, [rbp+var_90]
mov rdx, [rbp+var_48]
call rax
mov [rbp+var_5C], eax
mov rax, [rbp+var_10]
mov eax, [rax+20h]
and eax, 1
cmp eax, 0
jz short loc_2F6AA
mov rdi, [rbp+var_10]
mov esi, [rbp+var_5C]
mov rdx, [rbp+var_90]
mov rcx, [rbp+var_48]
lea r8, [rbp+var_94]
call my_hash_first_from_hash_value
mov [rbp+var_A0], rax
cmp rax, 0
jz short loc_2F6A8
jmp short $+2
loc_2F664:
mov rax, [rbp+var_A0]
cmp rax, [rbp+var_18]
jz short loc_2F67C
jmp short $+2
loc_2F673:
mov [rbp+var_1], 1
jmp loc_2F9C2
loc_2F67C:
jmp short $+2
loc_2F67E:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_90]
mov rdx, [rbp+var_48]
lea rcx, [rbp+var_94]
call my_hash_next
mov [rbp+var_A0], rax
cmp rax, 0
jnz short loc_2F664
jmp short $+2
loc_2F6A8:
jmp short $+2
loc_2F6AA:
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_78], rax
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_58], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_38], eax
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov [rbp+var_B8], rax
mov rax, [rbp+var_10]
mov rax, [rax+68h]
mov [rbp+var_B0], rax
mov rax, [rbp+var_20]
mov [rbp+var_A8], rax
cmp [rbp+var_28], 0
jz short loc_2F70A
mov rax, [rbp+var_28]
mov [rbp+var_C0], rax
jmp short loc_2F719
loc_2F70A:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_C0], rax
loc_2F719:
mov rax, [rbp+var_B8]
mov rsi, [rbp+var_A8]
mov rdi, [rbp+var_B0]
mov rdx, [rbp+var_C0]
call rax
mov edi, eax
mov rsi, [rbp+var_58]
mov eax, [rbp+var_38]
mov edx, eax
call my_hash_mask
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
mov [rbp+var_34], eax
mov edi, [rbp+var_5C]
mov rsi, [rbp+var_58]
mov eax, [rbp+var_38]
mov edx, eax
call my_hash_mask
mov [rbp+var_2C], eax
mov [rbp+var_80], 0
loc_2F76C:
mov rax, [rbp+var_78]
mov ecx, [rbp+var_3C]
shl rcx, 4
add rax, rcx
mov [rbp+var_88], rax
mov rax, [rax+8]
cmp rax, [rbp+var_18]
jnz short loc_2F78D
jmp short loc_2F7B6
loc_2F78D:
mov rax, [rbp+var_88]
mov [rbp+var_80], rax
mov rax, [rbp+var_88]
mov eax, [rax]
mov [rbp+var_3C], eax
cmp eax, 0FFFFFFFFh
jnz short loc_2F7B4
jmp short $+2
loc_2F7AB:
mov [rbp+var_1], 1
jmp loc_2F9C2
loc_2F7B4:
jmp short loc_2F76C
loc_2F7B6:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_2C]
jnz short loc_2F7DB
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_78]
mov edx, [rbp+var_3C]
shl rdx, 4
add rax, rdx
mov [rax+4], ecx
mov [rbp+var_1], 0
jmp loc_2F9C2
loc_2F7DB:
mov rax, [rbp+var_88]
mov rcx, [rax]
mov [rbp+var_70], rcx
mov rax, [rax+8]
mov [rbp+var_68], rax
mov eax, [rbp+var_3C]
mov [rbp+var_50], rax
cmp [rbp+var_80], 0
jnz short loc_2F843
mov rax, [rbp+var_88]
cmp dword ptr [rax], 0FFFFFFFFh
jz short loc_2F841
mov rax, [rbp+var_88]
mov eax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_88]
mov rcx, [rbp+var_78]
mov rdx, [rbp+var_88]
mov edx, [rdx]
shl rdx, 4
add rcx, rdx
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
loc_2F841:
jmp short loc_2F852
loc_2F843:
mov rax, [rbp+var_88]
mov ecx, [rax]
mov rax, [rbp+var_80]
mov [rax], ecx
loc_2F852:
mov eax, [rbp+var_2C]
cmp rax, [rbp+var_50]
jnz short loc_2F8B8
mov rax, [rbp+var_50]
mov ecx, [rbp+var_3C]
cmp rax, rcx
jz short loc_2F885
mov rax, [rbp+var_78]
mov rcx, [rbp+var_50]
shl rcx, 4
add rax, rcx
mov rcx, [rbp+var_70]
mov [rax], rcx
mov rcx, [rbp+var_68]
mov [rax+8], rcx
loc_2F885:
mov rax, [rbp+var_78]
mov rcx, [rbp+var_50]
shl rcx, 4
add rax, rcx
mov dword ptr [rax], 0FFFFFFFFh
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_78]
mov rdx, [rbp+var_50]
shl rdx, 4
add rax, rdx
mov [rax+4], ecx
mov [rbp+var_1], 0
jmp loc_2F9C2
loc_2F8B8:
mov rax, [rbp+var_78]
mov ecx, [rbp+var_2C]
shl rcx, 4
add rax, rcx
mov [rbp+var_88], rax
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_58]
mov eax, [rbp+var_38]
mov edx, eax
call my_hash_rec_mask
mov [rbp+var_30], eax
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_30]
jz short loc_2F960
mov rax, [rbp+var_78]
mov rcx, [rbp+var_50]
shl rcx, 4
add rax, rcx
mov rcx, [rbp+var_88]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rdi, [rbp+var_78]
mov esi, [rbp+var_2C]
mov edx, [rbp+var_30]
mov rax, [rbp+var_50]
mov ecx, eax
call movelink
mov dword ptr [rbp+var_70], 0FFFFFFFFh
mov rax, [rbp+var_78]
mov ecx, [rbp+var_2C]
shl rcx, 4
add rax, rcx
mov rcx, [rbp+var_70]
mov [rax], rcx
mov rcx, [rbp+var_68]
mov [rax+8], rcx
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_78]
mov edx, [rbp+var_2C]
shl rdx, 4
add rax, rdx
mov [rax+4], ecx
jmp short loc_2F9BC
loc_2F960:
mov rax, [rbp+var_78]
mov ecx, [rbp+var_2C]
shl rcx, 4
add rax, rcx
mov eax, [rax]
mov dword ptr [rbp+var_70], eax
mov rax, [rbp+var_78]
mov rcx, [rbp+var_50]
shl rcx, 4
add rax, rcx
mov rcx, [rbp+var_70]
mov [rax], rcx
mov rcx, [rbp+var_68]
mov [rax+8], rcx
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_78]
mov rdx, [rbp+var_50]
shl rdx, 4
add rax, rdx
mov [rax+4], ecx
mov rax, [rbp+var_50]
mov ecx, eax
mov rax, [rbp+var_78]
mov edx, [rbp+var_2C]
shl rdx, 4
add rax, rdx
mov [rax], ecx
loc_2F9BC:
jmp short $+2
loc_2F9BE:
mov [rbp+var_1], 0
loc_2F9C2:
mov al, [rbp+var_1]
add rsp, 0C0h
pop rbp
retn
|
char my_hash_update(_QWORD *a1, long long a2, long long a3, long long a4)
{
unsigned int v4; // eax
unsigned int *v5; // rax
_QWORD *v6; // rcx
_QWORD *v7; // rax
_QWORD *v8; // rax
unsigned int *v9; // rcx
_QWORD *v10; // rax
_QWORD *v11; // rax
long long ( *v13)(long long, long long, long long); // [rsp+8h] [rbp-B8h]
long long v14; // [rsp+10h] [rbp-B0h]
long long v15; // [rsp+20h] [rbp-A0h]
unsigned int v16; // [rsp+2Ch] [rbp-94h] BYREF
long long v17; // [rsp+30h] [rbp-90h]
unsigned int *v18; // [rsp+38h] [rbp-88h]
_DWORD *v19; // [rsp+40h] [rbp-80h]
long long v20; // [rsp+48h] [rbp-78h]
long long v21; // [rsp+50h] [rbp-70h]
long long v22; // [rsp+58h] [rbp-68h]
unsigned int v23; // [rsp+64h] [rbp-5Ch]
unsigned long long v24; // [rsp+68h] [rbp-58h]
long long v25; // [rsp+70h] [rbp-50h]
long long v26; // [rsp+78h] [rbp-48h] BYREF
unsigned int v27; // [rsp+84h] [rbp-3Ch]
unsigned int v28; // [rsp+88h] [rbp-38h]
unsigned int v29; // [rsp+8Ch] [rbp-34h]
unsigned int v30; // [rsp+90h] [rbp-30h]
unsigned int v31; // [rsp+94h] [rbp-2Ch]
long long v32; // [rsp+98h] [rbp-28h]
long long v33; // [rsp+A0h] [rbp-20h]
long long v34; // [rsp+A8h] [rbp-18h]
_QWORD *v35; // [rsp+B0h] [rbp-10h]
v35 = a1;
v34 = a2;
v33 = a3;
v32 = a4;
v17 = my_hash_key((long long)a1, a2, &v26, 1);
v23 = ((long long ( *)(_QWORD, long long, long long))v35[11])(v35[13], v17, v26);
if ( (v35[4] & 1) != 0 && (v15 = my_hash_first_from_hash_value(v35, v23, v17, v26, &v16)) != 0 )
{
while ( v15 == v34 )
{
v15 = my_hash_next((long long)v35, v17, v26, &v16);
if ( !v15 )
goto LABEL_6;
}
return 1;
}
else
{
LABEL_6:
v20 = v35[5];
v24 = v35[2];
v28 = v35[3];
v13 = (long long ( *)(long long, long long, long long))v35[11];
v14 = v35[13];
if ( v32 )
v4 = v13(v14, v33, v32);
else
v4 = v13(v14, v33, v35[1]);
v27 = my_hash_mask(v4, v24, v28);
v29 = v27;
v31 = my_hash_mask(v23, v24, v28);
v19 = 0LL;
while ( 1 )
{
v18 = (unsigned int *)(16LL * v27 + v20);
if ( *((_QWORD *)v18 + 1) == v34 )
break;
v19 = v18;
v27 = *v18;
if ( v27 == -1 )
return 1;
}
if ( v29 == v31 )
{
*(_DWORD *)(16LL * v27 + v20 + 4) = v23;
return 0;
}
else
{
v21 = *(_QWORD *)v18;
v22 = *((_QWORD *)v18 + 1);
v25 = v27;
if ( v19 )
{
*v19 = *v18;
}
else if ( *v18 != -1 )
{
v25 = *v18;
v5 = v18;
v6 = (_QWORD *)(16LL * *v18 + v20);
*(_QWORD *)v18 = *v6;
*((_QWORD *)v5 + 1) = v6[1];
}
if ( v31 == v25 )
{
if ( v25 != v27 )
{
v7 = (_QWORD *)(16 * v25 + v20);
*v7 = v21;
v7[1] = v22;
}
*(_DWORD *)(16 * v25 + v20) = -1;
*(_DWORD *)(16 * v25 + v20 + 4) = v23;
return 0;
}
else
{
v18 = (unsigned int *)(16LL * v31 + v20);
v30 = my_hash_rec_mask((long long)v18, v24, v28);
if ( v31 == v30 )
{
LODWORD(v21) = *(_DWORD *)(16LL * v31 + v20);
v11 = (_QWORD *)(16 * v25 + v20);
*v11 = v21;
v11[1] = v22;
*(_DWORD *)(16 * v25 + v20 + 4) = v23;
*(_DWORD *)(16LL * v31 + v20) = v25;
}
else
{
v8 = (_QWORD *)(16 * v25 + v20);
v9 = v18;
*v8 = *(_QWORD *)v18;
v8[1] = *((_QWORD *)v9 + 1);
movelink(v20, v31, v30, v25);
LODWORD(v21) = -1;
v10 = (_QWORD *)(16LL * v31 + v20);
*v10 = v21;
v10[1] = v22;
*(_DWORD *)(16LL * v31 + v20 + 4) = v23;
}
return 0;
}
}
}
}
|
my_hash_update:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
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 RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0x48]
MOV ECX,0x1
CALL 0x0012f120
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x68]
MOV RSI,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0x48]
CALL RAX
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0012f6aa
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x5c]
MOV RDX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RBP + -0x48]
LEA R8,[RBP + -0x94]
CALL 0x0012e900
MOV qword ptr [RBP + -0xa0],RAX
CMP RAX,0x0
JZ 0x0012f6a8
JMP 0x0012f664
LAB_0012f664:
MOV RAX,qword ptr [RBP + -0xa0]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x0012f67c
JMP 0x0012f673
LAB_0012f673:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012f9c2
LAB_0012f67c:
JMP 0x0012f67e
LAB_0012f67e:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0x48]
LEA RCX,[RBP + -0x94]
CALL 0x0012eb20
MOV qword ptr [RBP + -0xa0],RAX
CMP RAX,0x0
JNZ 0x0012f664
JMP 0x0012f6a8
LAB_0012f6a8:
JMP 0x0012f6aa
LAB_0012f6aa:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0xa8],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0012f70a
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xc0],RAX
JMP 0x0012f719
LAB_0012f70a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xc0],RAX
LAB_0012f719:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [RBP + -0xa8]
MOV RDI,qword ptr [RBP + -0xb0]
MOV RDX,qword ptr [RBP + -0xc0]
CALL RAX
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RBP + -0x38]
MOV EDX,EAX
CALL 0x0012ea00
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x34],EAX
MOV EDI,dword ptr [RBP + -0x5c]
MOV RSI,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RBP + -0x38]
MOV EDX,EAX
CALL 0x0012ea00
MOV dword ptr [RBP + -0x2c],EAX
MOV qword ptr [RBP + -0x80],0x0
LAB_0012f76c:
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,dword ptr [RBP + -0x3c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x0012f78d
JMP 0x0012f7b6
LAB_0012f78d:
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,-0x1
JNZ 0x0012f7b4
JMP 0x0012f7ab
LAB_0012f7ab:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012f9c2
LAB_0012f7b4:
JMP 0x0012f76c
LAB_0012f7b6:
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RBP + -0x2c]
JNZ 0x0012f7db
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x78]
MOV EDX,dword ptr [RBP + -0x3c]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX + 0x4],ECX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012f9c2
LAB_0012f7db:
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x70],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x68],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x80],0x0
JNZ 0x0012f843
MOV RAX,qword ptr [RBP + -0x88]
CMP dword ptr [RAX],-0x1
JZ 0x0012f841
MOV RAX,qword ptr [RBP + -0x88]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x88]
MOV EDX,dword ptr [RDX]
SHL RDX,0x4
ADD RCX,RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_0012f841:
JMP 0x0012f852
LAB_0012f843:
MOV RAX,qword ptr [RBP + -0x88]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x80]
MOV dword ptr [RAX],ECX
LAB_0012f852:
MOV EAX,dword ptr [RBP + -0x2c]
CMP RAX,qword ptr [RBP + -0x50]
JNZ 0x0012f8b8
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x3c]
CMP RAX,RCX
JZ 0x0012f885
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],RCX
LAB_0012f885:
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x4
ADD RAX,RCX
MOV dword ptr [RAX],0xffffffff
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x50]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX + 0x4],ECX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012f9c2
LAB_0012f8b8:
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,dword ptr [RBP + -0x2c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x88],RAX
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RBP + -0x38]
MOV EDX,EAX
CALL 0x0012eaf0
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x30]
JZ 0x0012f960
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x88]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x78]
MOV ESI,dword ptr [RBP + -0x2c]
MOV EDX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,EAX
CALL 0x0012f190
MOV dword ptr [RBP + -0x70],0xffffffff
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,dword ptr [RBP + -0x2c]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x78]
MOV EDX,dword ptr [RBP + -0x2c]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX + 0x4],ECX
JMP 0x0012f9bc
LAB_0012f960:
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,dword ptr [RBP + -0x2c]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x70],EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x50]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x78]
MOV EDX,dword ptr [RBP + -0x2c]
SHL RDX,0x4
ADD RAX,RDX
MOV dword ptr [RAX],ECX
LAB_0012f9bc:
JMP 0x0012f9be
LAB_0012f9be:
MOV byte ptr [RBP + -0x1],0x0
LAB_0012f9c2:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xc0
POP RBP
RET
|
int1 my_hash_update(long param_1,long param_2,int8 param_3,long param_4)
{
int4 uVar1;
long lVar2;
uint *puVar3;
int8 *puVar4;
long local_c8;
int1 local_9c [4];
int8 local_98;
int8 *local_90;
uint *local_88;
long local_80;
int8 local_78;
int8 local_70;
int4 local_64;
int8 local_60;
ulong local_58;
int8 local_50;
uint local_44;
int4 local_40;
uint local_3c;
uint local_38;
uint local_34;
long local_30;
int8 local_28;
long local_20;
long local_18;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_98 = my_hash_key(param_1,param_2,&local_50,1);
local_64 = (**(code **)(local_18 + 0x58))(*(int8 *)(local_18 + 0x68),local_98,local_50);
if ((*(uint *)(local_18 + 0x20) & 1) != 0) {
lVar2 = my_hash_first_from_hash_value(local_18,local_64,local_98,local_50,local_9c);
while (lVar2 != 0) {
if (lVar2 != local_20) {
return 1;
}
lVar2 = my_hash_next(local_18,local_98,local_50,local_9c);
}
}
local_80 = *(long *)(local_18 + 0x28);
local_60 = *(int8 *)(local_18 + 0x10);
local_40 = (int4)*(int8 *)(local_18 + 0x18);
if (local_30 == 0) {
local_c8 = *(long *)(local_18 + 8);
}
else {
local_c8 = local_30;
}
uVar1 = (**(code **)(local_18 + 0x58))(*(int8 *)(local_18 + 0x68),local_28,local_c8);
local_44 = my_hash_mask(uVar1,local_60,local_40);
local_3c = local_44;
local_34 = my_hash_mask(local_64,local_60,local_40);
local_88 = (uint *)0x0;
while (puVar3 = (uint *)(local_80 + (ulong)local_44 * 0x10), *(long *)(puVar3 + 2) != local_20) {
local_44 = *puVar3;
local_88 = puVar3;
if (local_44 == 0xffffffff) {
return 1;
}
}
if (local_3c == local_34) {
*(int4 *)(local_80 + (ulong)local_44 * 0x10 + 4) = local_64;
return 0;
}
local_78 = *(int8 *)puVar3;
local_70 = *(int8 *)(puVar3 + 2);
local_58 = (ulong)local_44;
if (local_88 == (uint *)0x0) {
if (*puVar3 != 0xffffffff) {
local_58 = (ulong)*puVar3;
puVar4 = (int8 *)(local_80 + (ulong)*puVar3 * 0x10);
*(int8 *)puVar3 = *puVar4;
*(int8 *)(puVar3 + 2) = puVar4[1];
}
}
else {
*local_88 = *puVar3;
}
if (local_34 == local_58) {
if (local_58 != local_44) {
puVar4 = (int8 *)(local_80 + local_58 * 0x10);
*puVar4 = local_78;
puVar4[1] = local_70;
}
*(int4 *)(local_80 + local_58 * 0x10) = 0xffffffff;
*(int4 *)(local_80 + local_58 * 0x10 + 4) = local_64;
return 0;
}
local_90 = (int8 *)(local_80 + (ulong)local_34 * 0x10);
local_38 = my_hash_rec_mask(local_90,local_60,local_40);
if (local_34 == local_38) {
local_78 = CONCAT44(local_78._4_4_,*(int4 *)(local_80 + (ulong)local_34 * 0x10));
puVar4 = (int8 *)(local_80 + local_58 * 0x10);
*puVar4 = local_78;
puVar4[1] = local_70;
*(int4 *)(local_80 + local_58 * 0x10 + 4) = local_64;
*(int *)(local_80 + (ulong)local_34 * 0x10) = (int)local_58;
}
else {
puVar4 = (int8 *)(local_80 + local_58 * 0x10);
*puVar4 = *local_90;
puVar4[1] = local_90[1];
movelink(local_80,local_34,local_38,local_58 & 0xffffffff);
local_78 = CONCAT44(local_78._4_4_,0xffffffff);
puVar4 = (int8 *)(local_80 + (ulong)local_34 * 0x10);
*puVar4 = local_78;
puVar4[1] = local_70;
*(int4 *)(local_80 + (ulong)local_34 * 0x10 + 4) = local_64;
}
return 0;
}
|
|
18,770
|
mysql_stmt_fetch_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_stmt_fetch_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_fetch,
(parms->stmt),
parms->stmt->mysql,
int,
r_int)
}
|
O0
|
c
|
mysql_stmt_fetch_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x29820
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_stmt_fetch_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_stmt_fetch
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
_DWORD * mysql_stmt_fetch_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL);
v2[2] = mysql_stmt_fetch(*a1);
result = v2;
*v2 = 0;
return result;
}
|
mysql_stmt_fetch_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00129820
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_stmt_fetch_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_fetch(*param_1);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
18,771
|
mysql_stmt_fetch_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_stmt_fetch_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_fetch,
(parms->stmt),
parms->stmt->mysql,
int,
r_int)
}
|
O3
|
c
|
mysql_stmt_fetch_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x38(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rbx
callq 0x205cb
movl %eax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_stmt_fetch_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+38h]
mov rax, [rax+480h]
mov rbx, [rax+28h]
call mysql_stmt_fetch
mov [rbx+8], eax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_stmt_fetch_start_internal(long long *a1)
{
long long v1; // rdi
_DWORD *v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v1 + 56) + 1152LL) + 40LL);
result = mysql_stmt_fetch(v1);
v2[2] = result;
*v2 = 0;
return result;
}
|
mysql_stmt_fetch_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x001205cb
MOV dword ptr [RBX + 0x8],EAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_stmt_fetch_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_fetch();
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
18,772
|
pfs_end_temp_file_open_wait_and_bind_to_descriptor_v1
|
eloqsql/storage/perfschema/pfs.cc
|
void pfs_end_temp_file_open_wait_and_bind_to_descriptor_v1
(PSI_file_locker *locker, File file, const char *filename)
{
assert(filename != NULL);
PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker);
assert(state != NULL);
/* Set filename that was generated during creation of temporary file. */
state->m_name= filename;
pfs_end_file_open_wait_and_bind_to_descriptor_v1(locker, file);
PFS_file *pfs_file= reinterpret_cast<PFS_file *> (state->m_file);
if (pfs_file != NULL)
{
pfs_file->m_temporary= true;
}
}
|
O3
|
cpp
|
pfs_end_temp_file_open_wait_and_bind_to_descriptor_v1:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdx, 0x10(%rdi)
callq 0x3cc22
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x3cce3
movb $0x1, 0x2a8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
pfs_end_temp_file_open_wait_and_bind_to_descriptor_v1:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov [rdi+10h], rdx
call pfs_end_file_open_wait_and_bind_to_descriptor_v1
mov rax, [rbx+8]
test rax, rax
jz short loc_3CCE3
mov byte ptr [rax+2A8h], 1
loc_3CCE3:
add rsp, 8
pop rbx
pop rbp
retn
|
long long pfs_end_temp_file_open_wait_and_bind_to_descriptor_v1(long long a1, unsigned int a2, long long a3)
{
long long result; // rax
*(_QWORD *)(a1 + 16) = a3;
pfs_end_file_open_wait_and_bind_to_descriptor_v1(a1, a2);
result = *(_QWORD *)(a1 + 8);
if ( result )
*(_BYTE *)(result + 680) = 1;
return result;
}
|
pfs_end_temp_file_open_wait_and_bind_to_descriptor_v1:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV qword ptr [RDI + 0x10],RDX
CALL 0x0013cc22
MOV RAX,qword ptr [RBX + 0x8]
TEST RAX,RAX
JZ 0x0013cce3
MOV byte ptr [RAX + 0x2a8],0x1
LAB_0013cce3:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void pfs_end_temp_file_open_wait_and_bind_to_descriptor_v1
(long param_1,int8 param_2,int8 param_3)
{
*(int8 *)(param_1 + 0x10) = param_3;
pfs_end_file_open_wait_and_bind_to_descriptor_v1();
if (*(long *)(param_1 + 8) != 0) {
*(int1 *)(*(long *)(param_1 + 8) + 0x2a8) = 1;
}
return;
}
|
|
18,773
|
get_charset_number_internal
|
eloqsql/mysys/charset.c
|
static uint
get_charset_number_internal(const char *charset_name, uint cs_flags)
{
CHARSET_INFO **cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) &&
!my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name))
return cs[0]->number;
}
return 0;
}
|
O0
|
c
|
get_charset_number_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0x3afd0a(%rip), %rax # 0x411f80
movq %rax, -0x20(%rbp)
leaq 0x3afcff(%rip), %rax # 0x411f80
addq $0x4000, %rax # imm = 0x4000
cmpq %rax, -0x20(%rbp)
jae 0x62307
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x622f4
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x622f4
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
andl -0x14(%rbp), %eax
cmpl $0x0, %eax
je 0x622f4
leaq 0x25af92(%rip), %rax # 0x2bd250
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rsi
movq -0x10(%rbp), %rdx
leaq 0x25af71(%rip), %rdi # 0x2bd250
callq *%rax
cmpl $0x0, %eax
jne 0x622f4
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x6230e
jmp 0x622f6
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
jmp 0x6227a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
get_charset_number_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
lea rax, all_charsets
mov [rbp+var_20], rax
loc_6227A:
lea rax, all_charsets
add rax, 4000h
cmp [rbp+var_20], rax
jnb short loc_62307
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_622F4
mov rax, [rbp+var_20]
mov rax, [rax]
cmp qword ptr [rax+10h], 0
jz short loc_622F4
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+0Ch]
and eax, [rbp+var_14]
cmp eax, 0
jz short loc_622F4
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rsi, [rcx+10h]
mov rdx, [rbp+var_10]
lea rdi, my_charset_latin1
call rax
cmp eax, 0
jnz short loc_622F4
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_6230E
loc_622F4:
jmp short $+2
loc_622F6:
mov rax, [rbp+var_20]
add rax, 8
mov [rbp+var_20], rax
jmp loc_6227A
loc_62307:
mov [rbp+var_4], 0
loc_6230E:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long get_charset_number_internal(long long a1, int a2)
{
unsigned int **i; // [rsp+0h] [rbp-20h]
for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i )
{
if ( *i
&& *((_QWORD *)*i + 2)
&& (a2 & (*i)[3]) != 0
&& !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*((_QWORD *)*i + 2),
a1) )
{
return **i;
}
}
return 0;
}
|
get_charset_number_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
LEA RAX,[0x511f80]
MOV qword ptr [RBP + -0x20],RAX
LAB_0016227a:
LEA RAX,[0x511f80]
ADD RAX,0x4000
CMP qword ptr [RBP + -0x20],RAX
JNC 0x00162307
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JZ 0x001622f4
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x001622f4
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,dword ptr [RBP + -0x14]
CMP EAX,0x0
JZ 0x001622f4
LEA RAX,[0x3bd250]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x3bd250]
CALL RAX
CMP EAX,0x0
JNZ 0x001622f4
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016230e
LAB_001622f4:
JMP 0x001622f6
LAB_001622f6:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016227a
LAB_00162307:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016230e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 get_charset_number_internal(int8 param_1,uint param_2)
{
int iVar1;
long *local_28;
local_28 = &all_charsets;
while( true ) {
if ((long *)0x515f7f < local_28) {
return 0;
}
if ((((*local_28 != 0) && (*(long *)(*local_28 + 0x10) != 0)) &&
((*(uint *)(*local_28 + 0xc) & param_2) != 0)) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003bd310 + 0x40))
(&my_charset_latin1,*(int8 *)(*local_28 + 0x10),param_1), iVar1 == 0
)) break;
local_28 = local_28 + 1;
}
return *(int4 *)*local_28;
}
|
|
18,774
|
lock_io_cache
|
eloqsql/mysys/mf_iocache.c
|
static int lock_io_cache(IO_CACHE *cache, my_off_t pos)
{
IO_CACHE_SHARE *cshare= cache->share;
DBUG_ENTER("lock_io_cache");
/* Enter the lock. */
mysql_mutex_lock(&cshare->mutex);
cshare->running_threads--;
DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader", cache, (ulong) pos,
cshare->running_threads));
if (cshare->source_cache)
{
/* A write cache is synchronized to the read caches. */
if (cache == cshare->source_cache)
{
/* The writer waits until all readers are here. */
while (cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("writer waits in lock"));
mysql_cond_wait(&cshare->cond_writer, &cshare->mutex);
}
DBUG_PRINT("io_cache_share", ("writer awoke, going to copy"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* The last thread wakes the writer. */
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("waking writer"));
mysql_cond_signal(&cshare->cond_writer);
}
/*
Readers wait until the data is copied from the writer. Another
reason to stop waiting is the removal of the write thread. If this
happens, we leave the lock with old data in the buffer.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->source_cache)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/*
If the writer was removed from the share while this thread was
asleep, we need to simulate an EOF condition. The writer cannot
reset the share variables as they might still be in use by readers
of the last block. When we awake here then because the last
joining thread signalled us. If the writer is not the last, it
will not signal. So it is safe to clear the buffer here.
*/
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader found writer removed. EOF"));
cshare->read_end= cshare->buffer; /* Empty buffer. */
cshare->error= 0; /* EOF is not an error. */
}
}
else
{
/*
There are read caches only. The last thread arriving in
lock_io_cache() continues with a locked cache and reads the block.
*/
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("last thread joined, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/*
All other threads wait until the requested block is read by the
last thread arriving. Another reason to stop waiting is the
removal of a thread. If this leads to all threads being in the
lock, we have to continue also. The first of the awaken threads
will then do the read.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/* If the block is not yet read, continue with a locked cache and read. */
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader awoke, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* Another thread did read the block already. */
}
DBUG_PRINT("io_cache_share", ("reader awoke, going to process %u bytes",
(uint) (cshare->read_end ? (size_t)
(cshare->read_end - cshare->buffer) :
0)));
/*
Leave the lock. Do not call unlock_io_cache() later. The thread that
filled the buffer did this and marked all threads as running.
*/
mysql_mutex_unlock(&cshare->mutex);
DBUG_RETURN(0);
}
|
O0
|
c
|
lock_io_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x7c069(%rip), %rsi # 0x184c53
movl $0x3dd, %edx # imm = 0x3DD
callq 0x1075a0
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xd8(%rax)
jmp 0x108c09
movq -0x20(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0x108d44
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0xc0(%rcx), %rax
jne 0x108c73
jmp 0x108c2e
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
je 0x108c61
jmp 0x108c3d
jmp 0x108c3f
movq -0x20(%rbp), %rdi
addq $0x80, %rdi
movq -0x20(%rbp), %rsi
leaq 0x7bffe(%rip), %rdx # 0x184c53
movl $0x3ee, %ecx # imm = 0x3EE
callq 0x108e70
jmp 0x108c2e
jmp 0x108c63
jmp 0x108c65
jmp 0x108c67
movl $0x1, -0x4(%rbp)
jmp 0x108e0a
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
jne 0x108c94
jmp 0x108c82
jmp 0x108c84
movq -0x20(%rbp), %rdi
addq $0x80, %rdi
callq 0x107610
jmp 0x108c96
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0x108cba
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x21(%rbp)
jae 0x108ccc
movq -0x20(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x108cd5
jmp 0x108cf8
jmp 0x108cd7
jmp 0x108cd9
movq -0x20(%rbp), %rdi
addq $0x48, %rdi
movq -0x20(%rbp), %rsi
leaq 0x7bf67(%rip), %rdx # 0x184c53
movl $0x406, %ecx # imm = 0x406
callq 0x108e70
jmp 0x108c96
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0x108d17
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x108d3f
jmp 0x108d19
jmp 0x108d1b
movq -0x20(%rbp), %rax
movq 0xc8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0xe0(%rax)
jmp 0x108df6
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
jne 0x108d63
jmp 0x108d53
jmp 0x108d55
jmp 0x108d57
movl $0x1, -0x4(%rbp)
jmp 0x108e0a
jmp 0x108d65
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0x108d89
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x22(%rbp)
jae 0x108d9a
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
setne %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
testb $0x1, %al
jne 0x108da3
jmp 0x108dc6
jmp 0x108da5
jmp 0x108da7
movq -0x20(%rbp), %rdi
addq $0x48, %rdi
movq -0x20(%rbp), %rsi
leaq 0x7be99(%rip), %rdx # 0x184c53
movl $0x430, %ecx # imm = 0x430
callq 0x108e70
jmp 0x108d65
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0x108de5
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x108df4
jmp 0x108de7
jmp 0x108de9
jmp 0x108deb
movl $0x1, -0x4(%rbp)
jmp 0x108e0a
jmp 0x108df6
jmp 0x108df8
jmp 0x108dfa
movq -0x20(%rbp), %rdi
callq 0x1076d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
lock_io_cache:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
lea rsi, aWorkspaceLlm4b_45; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3DDh
call inline_mysql_mutex_lock_27
mov rax, [rbp+var_20]
mov ecx, [rax+0D8h]
add ecx, 0FFFFFFFFh
mov [rax+0D8h], ecx
jmp short $+2
loc_108C09:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0C0h], 0
jz loc_108D44
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
cmp rax, [rcx+0C0h]
jnz short loc_108C73
jmp short $+2
loc_108C2E:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
jz short loc_108C61
jmp short $+2
loc_108C3D:
jmp short $+2
loc_108C3F:
mov rdi, [rbp+var_20]
add rdi, 80h
mov rsi, [rbp+var_20]
lea rdx, aWorkspaceLlm4b_45; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 3EEh
call inline_mysql_cond_wait_5
jmp short loc_108C2E
loc_108C61:
jmp short $+2
loc_108C63:
jmp short $+2
loc_108C65:
jmp short $+2
loc_108C67:
mov [rbp+var_4], 1
jmp loc_108E0A
loc_108C73:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
jnz short loc_108C94
jmp short $+2
loc_108C82:
jmp short $+2
loc_108C84:
mov rdi, [rbp+var_20]
add rdi, 80h
call inline_mysql_cond_signal_2
loc_108C94:
jmp short $+2
loc_108C96:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_108CBA
mov rax, [rbp+var_20]
mov rcx, [rax+0B8h]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_21], al
jnb short loc_108CCC
loc_108CBA:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0C0h], 0
setnz al
mov [rbp+var_21], al
loc_108CCC:
mov al, [rbp+var_21]
test al, 1
jnz short loc_108CD5
jmp short loc_108CF8
loc_108CD5:
jmp short $+2
loc_108CD7:
jmp short $+2
loc_108CD9:
mov rdi, [rbp+var_20]
add rdi, 48h ; 'H'
mov rsi, [rbp+var_20]
lea rdx, aWorkspaceLlm4b_45; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 406h
call inline_mysql_cond_wait_5
jmp short loc_108C96
loc_108CF8:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_108D17
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
cmp rax, [rbp+var_18]
jnb short loc_108D3F
loc_108D17:
jmp short $+2
loc_108D19:
jmp short $+2
loc_108D1B:
mov rax, [rbp+var_20]
mov rcx, [rax+0C8h]
mov rax, [rbp+var_20]
mov [rax+0D0h], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax+0E0h], 0
loc_108D3F:
jmp loc_108DF6
loc_108D44:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
jnz short loc_108D63
jmp short $+2
loc_108D53:
jmp short $+2
loc_108D55:
jmp short $+2
loc_108D57:
mov [rbp+var_4], 1
jmp loc_108E0A
loc_108D63:
jmp short $+2
loc_108D65:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_108D89
mov rax, [rbp+var_20]
mov rcx, [rax+0B8h]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_22], al
jnb short loc_108D9A
loc_108D89:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
setnz al
mov [rbp+var_22], al
loc_108D9A:
mov al, [rbp+var_22]
test al, 1
jnz short loc_108DA3
jmp short loc_108DC6
loc_108DA3:
jmp short $+2
loc_108DA5:
jmp short $+2
loc_108DA7:
mov rdi, [rbp+var_20]
add rdi, 48h ; 'H'
mov rsi, [rbp+var_20]
lea rdx, aWorkspaceLlm4b_45; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 430h
call inline_mysql_cond_wait_5
jmp short loc_108D65
loc_108DC6:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_108DE5
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
cmp rax, [rbp+var_18]
jnb short loc_108DF4
loc_108DE5:
jmp short $+2
loc_108DE7:
jmp short $+2
loc_108DE9:
jmp short $+2
loc_108DEB:
mov [rbp+var_4], 1
jmp short loc_108E0A
loc_108DF4:
jmp short $+2
loc_108DF6:
jmp short $+2
loc_108DF8:
jmp short $+2
loc_108DFA:
mov rdi, [rbp+var_20]
call inline_mysql_mutex_unlock_28
mov [rbp+var_4], 0
loc_108E0A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long lock_io_cache(long long a1, unsigned long long a2)
{
bool v3; // [rsp+Eh] [rbp-22h]
bool v4; // [rsp+Fh] [rbp-21h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = *(_QWORD *)(a1 + 152);
inline_mysql_mutex_lock_27(v5, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x3DDu);
--*(_DWORD *)(v5 + 216);
if ( !*(_QWORD *)(v5 + 192) )
{
if ( !*(_DWORD *)(v5 + 216) )
return 1;
while ( 1 )
{
if ( !*(_QWORD *)(v5 + 208) || (v3 = 0, *(_QWORD *)(v5 + 184) < a2) )
v3 = *(_DWORD *)(v5 + 216) != 0;
if ( !v3 )
break;
inline_mysql_cond_wait_5(v5 + 72, v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1072LL);
}
if ( !*(_QWORD *)(v5 + 208) || *(_QWORD *)(v5 + 184) < a2 )
return 1;
LABEL_27:
inline_mysql_mutex_unlock_28(v5);
return 0;
}
if ( a1 != *(_QWORD *)(v5 + 192) )
{
if ( !*(_DWORD *)(v5 + 216) )
inline_mysql_cond_signal_2(v5 + 128);
while ( 1 )
{
if ( !*(_QWORD *)(v5 + 208) || (v4 = 0, *(_QWORD *)(v5 + 184) < a2) )
v4 = *(_QWORD *)(v5 + 192) != 0LL;
if ( !v4 )
break;
inline_mysql_cond_wait_5(v5 + 72, v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1030LL);
}
if ( !*(_QWORD *)(v5 + 208) || *(_QWORD *)(v5 + 184) < a2 )
{
*(_QWORD *)(v5 + 208) = *(_QWORD *)(v5 + 200);
*(_DWORD *)(v5 + 224) = 0;
}
goto LABEL_27;
}
while ( *(_DWORD *)(v5 + 216) )
inline_mysql_cond_wait_5(v5 + 128, v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1006LL);
return 1;
}
| |||
18,775
|
lock_io_cache
|
eloqsql/mysys/mf_iocache.c
|
static int lock_io_cache(IO_CACHE *cache, my_off_t pos)
{
IO_CACHE_SHARE *cshare= cache->share;
DBUG_ENTER("lock_io_cache");
/* Enter the lock. */
mysql_mutex_lock(&cshare->mutex);
cshare->running_threads--;
DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader", cache, (ulong) pos,
cshare->running_threads));
if (cshare->source_cache)
{
/* A write cache is synchronized to the read caches. */
if (cache == cshare->source_cache)
{
/* The writer waits until all readers are here. */
while (cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("writer waits in lock"));
mysql_cond_wait(&cshare->cond_writer, &cshare->mutex);
}
DBUG_PRINT("io_cache_share", ("writer awoke, going to copy"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* The last thread wakes the writer. */
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("waking writer"));
mysql_cond_signal(&cshare->cond_writer);
}
/*
Readers wait until the data is copied from the writer. Another
reason to stop waiting is the removal of the write thread. If this
happens, we leave the lock with old data in the buffer.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->source_cache)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/*
If the writer was removed from the share while this thread was
asleep, we need to simulate an EOF condition. The writer cannot
reset the share variables as they might still be in use by readers
of the last block. When we awake here then because the last
joining thread signalled us. If the writer is not the last, it
will not signal. So it is safe to clear the buffer here.
*/
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader found writer removed. EOF"));
cshare->read_end= cshare->buffer; /* Empty buffer. */
cshare->error= 0; /* EOF is not an error. */
}
}
else
{
/*
There are read caches only. The last thread arriving in
lock_io_cache() continues with a locked cache and reads the block.
*/
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("last thread joined, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/*
All other threads wait until the requested block is read by the
last thread arriving. Another reason to stop waiting is the
removal of a thread. If this leads to all threads being in the
lock, we have to continue also. The first of the awaken threads
will then do the read.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/* If the block is not yet read, continue with a locked cache and read. */
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader awoke, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* Another thread did read the block already. */
}
DBUG_PRINT("io_cache_share", ("reader awoke, going to process %u bytes",
(uint) (cshare->read_end ? (size_t)
(cshare->read_end - cshare->buffer) :
0)));
/*
Leave the lock. Do not call unlock_io_cache() later. The thread that
filled the buffer did this and marked all threads as running.
*/
mysql_mutex_unlock(&cshare->mutex);
DBUG_RETURN(0);
}
|
O3
|
c
|
lock_io_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq 0x98(%rdi), %rbx
cmpq $0x0, 0x40(%rbx)
jne 0xb2ae4
movq %rbx, %rdi
callq 0x2a230
movl 0xd8(%rbx), %eax
decl %eax
movl %eax, 0xd8(%rbx)
movq 0xc0(%rbx), %rcx
testq %rcx, %rcx
je 0xb29f7
cmpq %r15, %rcx
je 0xb2a97
testl %eax, %eax
jne 0xb299e
leaq 0x80(%rbx), %r15
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
jne 0xb2b12
movq %r15, %rdi
callq 0x2a630
leaq 0x48(%rbx), %r15
leaq 0x4d24e(%rip), %r12 # 0xffbf7
cmpq $0x0, 0xd0(%rbx)
je 0xb29c0
cmpq %r14, 0xb8(%rbx)
jae 0xb2a6d
cmpq $0x0, 0xc0(%rbx)
je 0xb2a55
cmpq $0x0, 0x78(%rbx)
jne 0xb29e2
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2a480
jmp 0xb29a9
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x406, %ecx # imm = 0x406
callq 0x315fb
jmp 0xb29a9
movl $0x1, %r15d
testl %eax, %eax
je 0xb2a85
leaq 0x48(%rbx), %r12
leaq 0x4d1e7(%rip), %r13 # 0xffbf7
cmpq $0x0, 0xd0(%rbx)
je 0xb2a23
cmpq %r14, 0xb8(%rbx)
jae 0xb2a6d
cmpl $0x0, 0xd8(%rbx)
je 0xb2a85
cmpq $0x0, 0x78(%rbx)
jne 0xb2a40
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2a480
jmp 0xb2a10
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl $0x430, %ecx # imm = 0x430
callq 0x315fb
jmp 0xb2a10
movq 0xc8(%rbx), %rax
movq %rax, 0xd0(%rbx)
movl $0x0, 0xe0(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0xb2afd
movq %rbx, %rdi
callq 0x2a1f0
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r15d
testl %eax, %eax
je 0xb2a85
leaq 0x80(%rbx), %r14
leaq 0x4d148(%rip), %r12 # 0xffbf7
cmpq $0x0, 0xb0(%rbx)
jne 0xb2acf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a480
cmpl $0x0, 0xd8(%rbx)
jne 0xb2aaf
jmp 0xb2a85
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x3ee, %ecx # imm = 0x3EE
callq 0x315fb
jmp 0xb2ac4
leaq 0x4d10c(%rip), %rsi # 0xffbf7
movq %rbx, %rdi
movl $0x3dd, %edx # imm = 0x3DD
callq 0x312ea
jmp 0xb2954
leaq 0x2fbf14(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xb2a7a
leaq 0x2fbeff(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xb2996
|
lock_io_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
mov rbx, [rdi+98h]
cmp qword ptr [rbx+40h], 0
jnz loc_B2AE4
mov rdi, rbx
call _pthread_mutex_lock
loc_B2954:
mov eax, [rbx+0D8h]
dec eax
mov [rbx+0D8h], eax
mov rcx, [rbx+0C0h]
test rcx, rcx
jz loc_B29F7
cmp rcx, r15
jz loc_B2A97
test eax, eax
jnz short loc_B299E
lea r15, [rbx+80h]
mov rdi, [rbx+0B0h]
test rdi, rdi
jnz loc_B2B12
loc_B2996:
mov rdi, r15
call _pthread_cond_signal
loc_B299E:
lea r15, [rbx+48h]
lea r12, aWorkspaceLlm4b_26; "/workspace/llm4binary/github2025/eloqsq"...
loc_B29A9:
cmp qword ptr [rbx+0D0h], 0
jz short loc_B29C0
cmp [rbx+0B8h], r14
jnb loc_B2A6D
loc_B29C0:
cmp qword ptr [rbx+0C0h], 0
jz loc_B2A55
cmp qword ptr [rbx+78h], 0
jnz short loc_B29E2
mov rdi, r15
mov rsi, rbx
call _pthread_cond_wait
jmp short loc_B29A9
loc_B29E2:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 406h
call psi_cond_wait
jmp short loc_B29A9
loc_B29F7:
mov r15d, 1
test eax, eax
jz loc_B2A85
lea r12, [rbx+48h]
lea r13, aWorkspaceLlm4b_26; "/workspace/llm4binary/github2025/eloqsq"...
loc_B2A10:
cmp qword ptr [rbx+0D0h], 0
jz short loc_B2A23
cmp [rbx+0B8h], r14
jnb short loc_B2A6D
loc_B2A23:
cmp dword ptr [rbx+0D8h], 0
jz short loc_B2A85
cmp qword ptr [rbx+78h], 0
jnz short loc_B2A40
mov rdi, r12
mov rsi, rbx
call _pthread_cond_wait
jmp short loc_B2A10
loc_B2A40:
mov rdi, r12
mov rsi, rbx
mov rdx, r13
mov ecx, 430h
call psi_cond_wait
jmp short loc_B2A10
loc_B2A55:
mov rax, [rbx+0C8h]
mov [rbx+0D0h], rax
mov dword ptr [rbx+0E0h], 0
loc_B2A6D:
mov rdi, [rbx+40h]
test rdi, rdi
jnz loc_B2AFD
loc_B2A7A:
mov rdi, rbx
call _pthread_mutex_unlock
xor r15d, r15d
loc_B2A85:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B2A97:
mov r15d, 1
test eax, eax
jz short loc_B2A85
lea r14, [rbx+80h]
lea r12, aWorkspaceLlm4b_26; "/workspace/llm4binary/github2025/eloqsq"...
loc_B2AAF:
cmp qword ptr [rbx+0B0h], 0
jnz short loc_B2ACF
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
loc_B2AC4:
cmp dword ptr [rbx+0D8h], 0
jnz short loc_B2AAF
jmp short loc_B2A85
loc_B2ACF:
mov rdi, r14
mov rsi, rbx
mov rdx, r12
mov ecx, 3EEh
call psi_cond_wait
jmp short loc_B2AC4
loc_B2AE4:
lea rsi, aWorkspaceLlm4b_26; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 3DDh
call psi_mutex_lock
jmp loc_B2954
loc_B2AFD:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_B2A7A
loc_B2B12:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_B2996
|
long long lock_io_cache(long long a1, unsigned long long a2)
{
long long v2; // rbx
int v3; // eax
long long v4; // rcx
long long v5; // rdi
unsigned int v6; // r15d
long long v7; // rdi
v2 = *(_QWORD *)(a1 + 152);
if ( *(_QWORD *)(v2 + 64) )
psi_mutex_lock(
*(_QWORD *)(a1 + 152),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x3DDu);
else
pthread_mutex_lock(*(_QWORD *)(a1 + 152));
v3 = *(_DWORD *)(v2 + 216) - 1;
*(_DWORD *)(v2 + 216) = v3;
v4 = *(_QWORD *)(v2 + 192);
if ( !v4 )
{
v6 = 1;
if ( !v3 )
return v6;
while ( !*(_QWORD *)(v2 + 208) || *(_QWORD *)(v2 + 184) < a2 )
{
if ( !*(_DWORD *)(v2 + 216) )
return v6;
if ( *(_QWORD *)(v2 + 120) )
psi_cond_wait(v2 + 72, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x430u);
else
pthread_cond_wait(v2 + 72, v2);
}
goto LABEL_23;
}
if ( v4 != a1 )
{
if ( !v3 )
{
v5 = *(_QWORD *)(v2 + 176);
if ( v5 )
((void ( *)(long long))PSI_server[46])(v5);
pthread_cond_signal(v2 + 128);
}
while ( !*(_QWORD *)(v2 + 208) || *(_QWORD *)(v2 + 184) < a2 )
{
if ( !*(_QWORD *)(v2 + 192) )
{
*(_QWORD *)(v2 + 208) = *(_QWORD *)(v2 + 200);
*(_DWORD *)(v2 + 224) = 0;
break;
}
if ( *(_QWORD *)(v2 + 120) )
psi_cond_wait(v2 + 72, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x406u);
else
pthread_cond_wait(v2 + 72, v2);
}
LABEL_23:
v7 = *(_QWORD *)(v2 + 64);
if ( v7 )
((void ( *)(long long))PSI_server[44])(v7);
pthread_mutex_unlock(v2);
return 0;
}
v6 = 1;
if ( v3 )
{
do
{
if ( *(_QWORD *)(v2 + 176) )
psi_cond_wait(v2 + 128, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x3EEu);
else
pthread_cond_wait(v2 + 128, v2);
}
while ( *(_DWORD *)(v2 + 216) );
}
return v6;
}
|
lock_io_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R15,RDI
MOV RBX,qword ptr [RDI + 0x98]
CMP qword ptr [RBX + 0x40],0x0
JNZ 0x001b2ae4
MOV RDI,RBX
CALL 0x0012a230
LAB_001b2954:
MOV EAX,dword ptr [RBX + 0xd8]
DEC EAX
MOV dword ptr [RBX + 0xd8],EAX
MOV RCX,qword ptr [RBX + 0xc0]
TEST RCX,RCX
JZ 0x001b29f7
CMP RCX,R15
JZ 0x001b2a97
TEST EAX,EAX
JNZ 0x001b299e
LEA R15,[RBX + 0x80]
MOV RDI,qword ptr [RBX + 0xb0]
TEST RDI,RDI
JNZ 0x001b2b12
LAB_001b2996:
MOV RDI,R15
CALL 0x0012a630
LAB_001b299e:
LEA R15,[RBX + 0x48]
LEA R12,[0x1ffbf7]
LAB_001b29a9:
CMP qword ptr [RBX + 0xd0],0x0
JZ 0x001b29c0
CMP qword ptr [RBX + 0xb8],R14
JNC 0x001b2a6d
LAB_001b29c0:
CMP qword ptr [RBX + 0xc0],0x0
JZ 0x001b2a55
CMP qword ptr [RBX + 0x78],0x0
JNZ 0x001b29e2
MOV RDI,R15
MOV RSI,RBX
CALL 0x0012a480
JMP 0x001b29a9
LAB_001b29e2:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0x406
CALL 0x001315fb
JMP 0x001b29a9
LAB_001b29f7:
MOV R15D,0x1
TEST EAX,EAX
JZ 0x001b2a85
LEA R12,[RBX + 0x48]
LEA R13,[0x1ffbf7]
LAB_001b2a10:
CMP qword ptr [RBX + 0xd0],0x0
JZ 0x001b2a23
CMP qword ptr [RBX + 0xb8],R14
JNC 0x001b2a6d
LAB_001b2a23:
CMP dword ptr [RBX + 0xd8],0x0
JZ 0x001b2a85
CMP qword ptr [RBX + 0x78],0x0
JNZ 0x001b2a40
MOV RDI,R12
MOV RSI,RBX
CALL 0x0012a480
JMP 0x001b2a10
LAB_001b2a40:
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R13
MOV ECX,0x430
CALL 0x001315fb
JMP 0x001b2a10
LAB_001b2a55:
MOV RAX,qword ptr [RBX + 0xc8]
MOV qword ptr [RBX + 0xd0],RAX
MOV dword ptr [RBX + 0xe0],0x0
LAB_001b2a6d:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001b2afd
LAB_001b2a7a:
MOV RDI,RBX
CALL 0x0012a1f0
XOR R15D,R15D
LAB_001b2a85:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b2a97:
MOV R15D,0x1
TEST EAX,EAX
JZ 0x001b2a85
LEA R14,[RBX + 0x80]
LEA R12,[0x1ffbf7]
LAB_001b2aaf:
CMP qword ptr [RBX + 0xb0],0x0
JNZ 0x001b2acf
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012a480
LAB_001b2ac4:
CMP dword ptr [RBX + 0xd8],0x0
JNZ 0x001b2aaf
JMP 0x001b2a85
LAB_001b2acf:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0x3ee
CALL 0x001315fb
JMP 0x001b2ac4
LAB_001b2ae4:
LEA RSI,[0x1ffbf7]
MOV RDI,RBX
MOV EDX,0x3dd
CALL 0x001312ea
JMP 0x001b2954
LAB_001b2afd:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001b2a7a
LAB_001b2b12:
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001b2996
|
int8 lock_io_cache(long param_1,ulong param_2)
{
pthread_mutex_t *__mutex;
int iVar1;
int8 uVar2;
__mutex = *(pthread_mutex_t **)(param_1 + 0x98);
if (*(long *)((long)__mutex + 0x40) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3dd);
}
iVar1 = *(int *)((long)__mutex + 0xd8) + -1;
*(int *)((long)__mutex + 0xd8) = iVar1;
if (*(long *)((long)__mutex + 0xc0) == 0) {
uVar2 = 1;
if (iVar1 != 0) {
while( true ) {
if ((*(long *)((long)__mutex + 0xd0) != 0) && (param_2 <= *(ulong *)((long)__mutex + 0xb8)))
goto LAB_001b2a6d;
if (*(int *)((long)__mutex + 0xd8) == 0) break;
if (__mutex[3].__align == 0) {
pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x430);
}
}
}
}
else if (*(long *)((long)__mutex + 0xc0) == param_1) {
uVar2 = 1;
if (iVar1 != 0) {
do {
if (*(long *)((long)__mutex + 0xb0) == 0) {
pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x80),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x80),__mutex,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3ee);
}
} while (*(int *)((long)__mutex + 0xd8) != 0);
}
}
else {
if (iVar1 == 0) {
if (*(long *)((long)__mutex + 0xb0) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)((long)__mutex + 0x80));
}
while( true ) {
if ((*(long *)((long)__mutex + 0xd0) != 0) && (param_2 <= *(ulong *)((long)__mutex + 0xb8)))
goto LAB_001b2a6d;
if (*(long *)((long)__mutex + 0xc0) == 0) break;
if (__mutex[3].__align == 0) {
pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x406);
}
}
*(long *)((long)__mutex + 0xd0) = __mutex[5].__align;
*(int4 *)((long)__mutex + 0xe0) = 0;
LAB_001b2a6d:
if (*(long *)((long)__mutex + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
uVar2 = 0;
}
return uVar2;
}
|
|
18,776
|
my_pread
|
eloqsql/mysys/my_pread.c
|
size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset,
myf MyFlags)
{
size_t readbytes, save_count= 0;
DBUG_ENTER("my_pread");
DBUG_PRINT("my",("fd: %d Seek: %llu Buffer: %p Count: %lu MyFlags: %lu",
Filedes, (ulonglong)offset, Buffer, (ulong)Count, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
for (;;)
{
errno= 0; /* Linux, Windows don't reset this on EOF/success */
#ifdef _WIN32
readbytes= my_win_pread(Filedes, Buffer, Count, offset);
#else
readbytes= pread(Filedes, Buffer, Count, offset);
#endif
if (readbytes != Count)
{
/* We should never read with wrong file descriptor! */
DBUG_ASSERT(readbytes != (size_t)-1 || errno != EBADF);
my_errno= errno;
if (errno == 0 || (readbytes != (size_t) -1 &&
(MyFlags & (MY_NABP | MY_FNABP))))
my_errno= HA_ERR_FILE_TOO_SHORT;
DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d",
(int) readbytes, (uint) Count,Filedes,my_errno));
if ((readbytes == 0 || readbytes == (size_t) -1) && errno == EINTR)
{
DBUG_PRINT("debug", ("my_pread() was interrupted and returned %d",
(int) readbytes));
continue; /* Interrupted */
}
/* Do a read retry if we didn't get enough data on first read */
if (readbytes != (size_t) -1 && readbytes != 0 &&
(MyFlags & MY_FULL_IO))
{
Buffer+= readbytes;
Count-= readbytes;
save_count+= readbytes;
offset+= readbytes;
continue;
}
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (readbytes == (size_t) -1)
my_error(EE_READ,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
}
if (readbytes == (size_t) -1 || (MyFlags & (MY_FNABP | MY_NABP)))
DBUG_RETURN(MY_FILE_ERROR); /* Return with error */
}
if (MyFlags & (MY_NABP | MY_FNABP))
readbytes= 0; /* Read went ok; Return 0 */
else
readbytes+= save_count;
DBUG_RETURN(readbytes);
}
}
|
O3
|
c
|
my_pread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, -0x58(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, -0x50(%rbp)
movl %edi, -0x2c(%rbp)
movq $0x0, -0x40(%rbp)
movl $0x0, %r15d
testb $0x1a, %r8b
jne 0x5d8be
leaq 0x358a0d(%rip), %rax # 0x3b62c8
movq (%rax), %r15
orq %r8, %r15
callq 0x28050
movq %rax, %r14
movq %r15, -0x48(%rbp)
movl $0x0, (%r14)
movl -0x2c(%rbp), %edi
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
movq -0x58(%rbp), %rcx
callq 0x28680
subq %rax, %rbx
je 0x5d9b5
movq %rax, %r12
testb $0x6, %r15b
sete %r13b
movl (%r14), %r15d
callq 0x5ecfe
movl %r15d, (%rax)
cmpq $-0x1, %r12
sete %al
cmpl $0x0, (%r14)
je 0x5d91c
orb %r13b, %al
jne 0x5d927
callq 0x5ecfe
movl $0xaf, (%rax)
leaq 0x1(%r12), %rax
cmpq $0x1, %rax
ja 0x5d93e
cmpl $0x4, (%r14)
movq -0x48(%rbp), %r15
je 0x5d8cd
jmp 0x5d966
movq -0x48(%rbp), %r15
btl $0x9, %r15d
jae 0x5d95e
addq %r12, -0x50(%rbp)
addq %r12, -0x40(%rbp)
addq %r12, -0x58(%rbp)
movq %rbx, -0x38(%rbp)
jmp 0x5d8cd
movq $0x0, -0x40(%rbp)
testb $0x1a, %r15b
je 0x5d99c
cmpq $-0x1, %r12
je 0x5d9c9
testb $0x6, %r15b
je 0x5d99c
andl $0x440, %r15d # imm = 0x440
orq $0x4, %r15
movl -0x2c(%rbp), %edi
callq 0x644c0
movq %rax, %rbx
callq 0x5ecfe
movl (%rax), %ecx
movl $0x9, %edi
jmp 0x5d9eb
movq $-0x1, %rax
cmpq $-0x1, %r12
je 0x5d9ff
movl %r15d, %ecx
movq %r12, -0x38(%rbp)
andl $0x6, %ecx
jne 0x5d9ff
movq -0x40(%rbp), %rcx
addq -0x38(%rbp), %rcx
xorl %eax, %eax
testb $0x6, %r15b
cmoveq %rcx, %rax
jmp 0x5d9ff
andl $0x440, %r15d # imm = 0x440
orq $0x4, %r15
movl -0x2c(%rbp), %edi
callq 0x644c0
movq %rax, %rbx
callq 0x5ecfe
movl (%rax), %ecx
movl $0x2, %edi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5b463
movq $-0x1, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_pread:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_58], rcx
mov [rbp+var_38], rdx
mov [rbp+var_50], rsi
mov [rbp+var_2C], edi
mov [rbp+var_40], 0
mov r15d, 0
test r8b, 1Ah
jnz short loc_5D8BE
lea rax, my_global_flags
mov r15, [rax]
loc_5D8BE:
or r15, r8
call ___errno_location
mov r14, rax
mov [rbp+var_48], r15
loc_5D8CD:
mov dword ptr [r14], 0
mov edi, [rbp+var_2C]
mov rsi, [rbp+var_50]
mov rbx, [rbp+var_38]
mov rdx, rbx
mov rcx, [rbp+var_58]
call _pread64
sub rbx, rax
jz loc_5D9B5
mov r12, rax
test r15b, 6
setz r13b
mov r15d, [r14]
call _my_thread_var
mov [rax], r15d
cmp r12, 0FFFFFFFFFFFFFFFFh
setz al
cmp dword ptr [r14], 0
jz short loc_5D91C
or al, r13b
jnz short loc_5D927
loc_5D91C:
call _my_thread_var
mov dword ptr [rax], 0AFh
loc_5D927:
lea rax, [r12+1]
cmp rax, 1
ja short loc_5D93E
cmp dword ptr [r14], 4
mov r15, [rbp+var_48]
jz short loc_5D8CD
jmp short loc_5D966
loc_5D93E:
mov r15, [rbp+var_48]
bt r15d, 9
jnb short loc_5D95E
add [rbp+var_50], r12
add [rbp+var_40], r12
add [rbp+var_58], r12
mov [rbp+var_38], rbx
jmp loc_5D8CD
loc_5D95E:
mov [rbp+var_40], 0
loc_5D966:
test r15b, 1Ah
jz short loc_5D99C
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_5D9C9
test r15b, 6
jz short loc_5D99C
and r15d, 440h
or r15, 4
mov edi, [rbp+var_2C]
call my_filename
mov rbx, rax
call _my_thread_var
mov ecx, [rax]
mov edi, 9
jmp short loc_5D9EB
loc_5D99C:
mov rax, 0FFFFFFFFFFFFFFFFh
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_5D9FF
mov ecx, r15d
mov [rbp+var_38], r12
and ecx, 6
jnz short loc_5D9FF
loc_5D9B5:
mov rcx, [rbp+var_40]
add rcx, [rbp+var_38]
xor eax, eax
test r15b, 6
cmovz rax, rcx
jmp short loc_5D9FF
loc_5D9C9:
and r15d, 440h
or r15, 4
mov edi, [rbp+var_2C]
call my_filename
mov rbx, rax
call _my_thread_var
mov ecx, [rax]
mov edi, 2
loc_5D9EB:
mov rsi, r15
mov rdx, rbx
xor eax, eax
call my_error
mov rax, 0FFFFFFFFFFFFFFFFh
loc_5D9FF:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_pread(long long a1, const char *a2, long long a3, long long a4, __int16 a5)
{
__int16 v5; // r15
__int16 v6; // r15
int *v7; // r14
long long v8; // rax
long long v9; // rbx
long long v10; // r12
bool v11; // r13
int v12; // r15d
long long v13; // r15
long long v14; // rbx
long long v15; // rcx
unsigned int v16; // edi
long long result; // rax
__int16 v20; // [rsp+18h] [rbp-48h]
long long v21; // [rsp+20h] [rbp-40h]
v21 = 0LL;
v5 = 0;
if ( (a5 & 0x1A) == 0 )
v5 = my_global_flags;
v6 = a5 | v5;
v7 = (int *)__errno_location(a1);
v20 = v6;
while ( 1 )
{
while ( 1 )
{
*v7 = 0;
v8 = pread64((unsigned int)a1, a2, a3, a4);
v9 = a3 - v8;
if ( a3 == v8 )
goto LABEL_20;
v10 = v8;
v11 = (v6 & 6) == 0;
v12 = *v7;
*(_DWORD *)my_thread_var((unsigned int)a1, a2) = v12;
if ( !*v7 || !v11 && v10 != -1 )
*(_DWORD *)my_thread_var((unsigned int)a1, a2) = 175;
if ( (unsigned long long)(v10 + 1) > 1 )
break;
v6 = v20;
if ( *v7 != 4 )
goto LABEL_14;
}
v6 = v20;
if ( (v20 & 0x200) == 0 )
break;
a2 += v10;
v21 += v10;
a4 += v10;
a3 = v9;
}
v21 = 0LL;
LABEL_14:
if ( (v6 & 0x1A) != 0 )
{
if ( v10 == -1 )
{
v13 = v6 & 0x440 | 4LL;
v14 = my_filename((unsigned int)a1);
v15 = *(unsigned int *)my_thread_var((unsigned int)a1, a2);
v16 = 2;
goto LABEL_24;
}
if ( (v6 & 6) != 0 )
{
v13 = v6 & 0x440 | 4LL;
v14 = my_filename((unsigned int)a1);
v15 = *(unsigned int *)my_thread_var((unsigned int)a1, a2);
v16 = 9;
LABEL_24:
my_error(v16, v13, v14, v15);
return -1LL;
}
}
result = -1LL;
if ( v10 != -1 )
{
a3 = v10;
if ( (v6 & 6) == 0 )
{
LABEL_20:
result = 0LL;
if ( (v6 & 6) == 0 )
return a3 + v21;
}
}
return result;
}
|
my_pread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x58],RCX
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x50],RSI
MOV dword ptr [RBP + -0x2c],EDI
MOV qword ptr [RBP + -0x40],0x0
MOV R15D,0x0
TEST R8B,0x1a
JNZ 0x0015d8be
LEA RAX,[0x4b62c8]
MOV R15,qword ptr [RAX]
LAB_0015d8be:
OR R15,R8
CALL 0x00128050
MOV R14,RAX
MOV qword ptr [RBP + -0x48],R15
LAB_0015d8cd:
MOV dword ptr [R14],0x0
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,qword ptr [RBP + -0x50]
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x58]
CALL 0x00128680
SUB RBX,RAX
JZ 0x0015d9b5
MOV R12,RAX
TEST R15B,0x6
SETZ R13B
MOV R15D,dword ptr [R14]
CALL 0x0015ecfe
MOV dword ptr [RAX],R15D
CMP R12,-0x1
SETZ AL
CMP dword ptr [R14],0x0
JZ 0x0015d91c
OR AL,R13B
JNZ 0x0015d927
LAB_0015d91c:
CALL 0x0015ecfe
MOV dword ptr [RAX],0xaf
LAB_0015d927:
LEA RAX,[R12 + 0x1]
CMP RAX,0x1
JA 0x0015d93e
CMP dword ptr [R14],0x4
MOV R15,qword ptr [RBP + -0x48]
JZ 0x0015d8cd
JMP 0x0015d966
LAB_0015d93e:
MOV R15,qword ptr [RBP + -0x48]
BT R15D,0x9
JNC 0x0015d95e
ADD qword ptr [RBP + -0x50],R12
ADD qword ptr [RBP + -0x40],R12
ADD qword ptr [RBP + -0x58],R12
MOV qword ptr [RBP + -0x38],RBX
JMP 0x0015d8cd
LAB_0015d95e:
MOV qword ptr [RBP + -0x40],0x0
LAB_0015d966:
TEST R15B,0x1a
JZ 0x0015d99c
CMP R12,-0x1
JZ 0x0015d9c9
TEST R15B,0x6
JZ 0x0015d99c
AND R15D,0x440
OR R15,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x001644c0
MOV RBX,RAX
CALL 0x0015ecfe
MOV ECX,dword ptr [RAX]
MOV EDI,0x9
JMP 0x0015d9eb
LAB_0015d99c:
MOV RAX,-0x1
CMP R12,-0x1
JZ 0x0015d9ff
MOV ECX,R15D
MOV qword ptr [RBP + -0x38],R12
AND ECX,0x6
JNZ 0x0015d9ff
LAB_0015d9b5:
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,qword ptr [RBP + -0x38]
XOR EAX,EAX
TEST R15B,0x6
CMOVZ RAX,RCX
JMP 0x0015d9ff
LAB_0015d9c9:
AND R15D,0x440
OR R15,0x4
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x001644c0
MOV RBX,RAX
CALL 0x0015ecfe
MOV ECX,dword ptr [RAX]
MOV EDI,0x2
LAB_0015d9eb:
MOV RSI,R15
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0015b463
MOV RAX,-0x1
LAB_0015d9ff:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_pread(int param_1,void *param_2,size_t param_3,long param_4,ulong param_5)
{
int iVar1;
int4 uVar2;
int *piVar3;
size_t sVar4;
int *piVar5;
int4 *puVar6;
int8 uVar7;
long lVar8;
int8 uVar9;
ulong uVar10;
long local_60;
void *local_58;
long local_48;
size_t local_40;
local_48 = 0;
uVar10 = 0;
if ((param_5 & 0x1a) == 0) {
uVar10 = my_global_flags;
}
uVar10 = uVar10 | param_5;
piVar3 = __errno_location();
local_60 = param_4;
local_58 = param_2;
local_40 = param_3;
do {
while( true ) {
*piVar3 = 0;
sVar4 = pread64(param_1,local_58,local_40,local_60);
if (local_40 - sVar4 == 0) goto LAB_0015d9b5;
iVar1 = *piVar3;
piVar5 = (int *)_my_thread_var();
*piVar5 = iVar1;
if ((*piVar3 == 0) || (sVar4 != 0xffffffffffffffff && (uVar10 & 6) != 0)) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0xaf;
}
if (sVar4 + 1 < 2) break;
if (((uint)uVar10 >> 9 & 1) == 0) {
local_48 = 0;
goto LAB_0015d966;
}
local_58 = (void *)((long)local_58 + sVar4);
local_48 = local_48 + sVar4;
local_60 = local_60 + sVar4;
local_40 = local_40 - sVar4;
}
} while (*piVar3 == 4);
LAB_0015d966:
if ((uVar10 & 0x1a) == 0) {
LAB_0015d99c:
lVar8 = -1;
if ((sVar4 != 0xffffffffffffffff) && (local_40 = sVar4, (uVar10 & 6) == 0)) {
LAB_0015d9b5:
lVar8 = 0;
if ((uVar10 & 6) == 0) {
lVar8 = local_48 + local_40;
}
}
}
else {
if (sVar4 == 0xffffffffffffffff) {
uVar7 = my_filename(param_1);
puVar6 = (int4 *)_my_thread_var();
uVar2 = *puVar6;
uVar9 = 2;
}
else {
if ((uVar10 & 6) == 0) goto LAB_0015d99c;
uVar7 = my_filename(param_1);
puVar6 = (int4 *)_my_thread_var();
uVar2 = *puVar6;
uVar9 = 9;
}
my_error(uVar9,(uint)uVar10 & 0x440 | 4,uVar7,uVar2);
lVar8 = -1;
}
return lVar8;
}
|
|
18,777
|
lora_merge_ctx::copy_tensor(ggml_tensor*)
|
monkey531[P]llama/examples/export-lora/export-lora.cpp
|
void copy_tensor(struct ggml_tensor * base) {
printf("%s : %s [%s]\n", __func__, base->name, ggml_ne_string(base).c_str());
size_t len = ggml_nbytes(base);
base_model.read_tensor_data(base->name, read_buf);
fout.write((char* )read_buf.data(), len);
zeros(fout, GGML_PAD(len, GGUF_DEFAULT_ALIGNMENT) - len);
}
|
O2
|
cpp
|
lora_merge_ctx::copy_tensor(ggml_tensor*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x100(%rsi), %r15
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x26b77
movq (%r12), %rcx
leaq 0x8231f(%rip), %rdi # 0xac66d
leaq 0x82327(%rip), %rsi # 0xac67c
movq %r15, %rdx
xorl %eax, %eax
callq 0x24060
movq %r12, %rdi
callq 0x25478
movq %r14, %rdi
callq 0x24100
movq %rax, %r14
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x283ac
leaq 0x280(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2a692
leaq 0x8(%rsp), %rdi
callq 0x25478
movq 0x280(%rbx), %rsi
addq $0x2a8, %rbx # imm = 0x2A8
movq %rbx, %rdi
movq %r14, %rdx
callq 0x24d50
leaq 0x1f(%r14), %rsi
andq $-0x20, %rsi
subq %r14, %rsi
movq %rbx, %rdi
callq 0x26b3a
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25478
movq %rbx, %rdi
callq 0x251e0
|
_ZN14lora_merge_ctx11copy_tensorEP11ggml_tensor:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rsi+100h]
lea r12, [rsp+68h+var_40]
mov rdi, r12
call _ZL14ggml_ne_stringB5cxx11PK11ggml_tensor; ggml_ne_string(ggml_tensor const*)
mov rcx, [r12]
lea rdi, aSSS_0; "%s : %s [%s]\n"
lea rsi, aCopyTensor; "copy_tensor"
mov rdx, r15
xor eax, eax
call _printf
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call _ggml_nbytes
mov r14, rax
lea r12, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
mov rdi, r12
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdx, [rbx+280h]
mov rdi, rbx
mov rsi, r12
call _ZN10file_input16read_tensor_dataENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIhSaIhEE; file_input::read_tensor_data(std::string,std::vector<uchar> &)
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rsi, [rbx+280h]; char *
add rbx, 2A8h
mov rdi, rbx; this
mov rdx, r14; __int64
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
lea rsi, [r14+1Fh]
and rsi, 0FFFFFFFFFFFFFFE0h
sub rsi, r14
mov rdi, rbx; this
call _ZL5zerosRSt14basic_ofstreamIcSt11char_traitsIcEEm; zeros(std::ofstream &,ulong)
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
long long lora_merge_ctx::copy_tensor(long long a1, long long a2)
{
long long v2; // r14
_QWORD v4[4]; // [rsp+8h] [rbp-60h] BYREF
const char *v5[8]; // [rsp+28h] [rbp-40h] BYREF
ggml_ne_string[abi:cxx11]((long long)v5, a2);
printf("%s : %s [%s]\n", "copy_tensor", (const char *)(a2 + 256), v5[0]);
std::string::~string(v5);
v2 = ggml_nbytes(a2);
std::string::basic_string<std::allocator<char>>(v4, a2 + 256);
file_input::read_tensor_data(a1, v4, a1 + 640);
std::string::~string(v4);
std::ostream::write((std::ostream *)(a1 + 680), *(const char **)(a1 + 640), v2);
return zeros((std::ostream *)(a1 + 680), ((v2 + 31) & 0xFFFFFFFFFFFFFFE0LL) - v2);
}
|
copy_tensor:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSI + 0x100]
LEA R12,[RSP + 0x28]
MOV RDI,R12
CALL 0x00126b77
MOV RCX,qword ptr [R12]
LEA RDI,[0x1ac66d]
LEA RSI,[0x1ac67c]
MOV RDX,R15
XOR EAX,EAX
CALL 0x00124060
MOV RDI,R12
CALL 0x00125478
MOV RDI,R14
CALL 0x00124100
MOV R14,RAX
LEA R12,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
MOV RDI,R12
MOV RSI,R15
CALL 0x001283ac
LEA RDX,[RBX + 0x280]
LAB_0012a38e:
MOV RDI,RBX
MOV RSI,R12
CALL 0x0012a692
LAB_0012a399:
LEA RDI,[RSP + 0x8]
CALL 0x00125478
MOV RSI,qword ptr [RBX + 0x280]
ADD RBX,0x2a8
MOV RDI,RBX
MOV RDX,R14
CALL 0x00124d50
LEA RSI,[R14 + 0x1f]
AND RSI,-0x20
SUB RSI,R14
MOV RDI,RBX
CALL 0x00126b3a
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* lora_merge_ctx::copy_tensor(ggml_tensor*) */
void __thiscall lora_merge_ctx::copy_tensor(lora_merge_ctx *this,ggml_tensor *param_1)
{
long lVar1;
string local_60 [32];
int8 local_40 [4];
ggml_ne_string_abi_cxx11_((ggml_tensor *)local_40);
printf("%s : %s [%s]\n","copy_tensor",param_1 + 0x100,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
lVar1 = ggml_nbytes(param_1);
std::__cxx11::string::string<std::allocator<char>>
(local_60,(char *)(param_1 + 0x100),(allocator *)local_40);
/* try { // try from 0012a38e to 0012a398 has its CatchHandler @ 0012a3db */
file_input::read_tensor_data((file_input *)this,local_60,this + 0x280);
std::__cxx11::string::~string(local_60);
std::ostream::write((char *)(this + 0x2a8),*(long *)(this + 0x280));
zeros((ofstream *)(this + 0x2a8),(lVar1 + 0x1fU & 0xffffffffffffffe0) - lVar1);
return;
}
|
|
18,778
|
lora_merge_ctx::copy_tensor(ggml_tensor*)
|
monkey531[P]llama/examples/export-lora/export-lora.cpp
|
void copy_tensor(struct ggml_tensor * base) {
printf("%s : %s [%s]\n", __func__, base->name, ggml_ne_string(base).c_str());
size_t len = ggml_nbytes(base);
base_model.read_tensor_data(base->name, read_buf);
fout.write((char* )read_buf.data(), len);
zeros(fout, GGML_PAD(len, GGUF_DEFAULT_ALIGNMENT) - len);
}
|
O3
|
cpp
|
lora_merge_ctx::copy_tensor(ggml_tensor*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x100(%rsi), %r15
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x1ff6e
movq (%r12), %rcx
leaq 0xc3e21(%rip), %rdi # 0xe866d
leaq 0xc3e29(%rip), %rsi # 0xe867c
movq %r15, %rdx
xorl %eax, %eax
callq 0x1b070
movq (%r12), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x24878
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1ba20
movq %r14, %rdi
callq 0x1b110
movq %rax, %r14
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r15, %rdi
callq 0x1b460
leaq (%rax,%r15), %rdx
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x22b0c
leaq 0x280(%rbx), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x24bee
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x248ce
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1ba20
movq 0x280(%rbx), %rsi
addq $0x2a8, %rbx # imm = 0x2A8
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1bd00
leaq 0x1f(%r14), %rax
andq $-0x20, %rax
movb $0x0, 0x20(%rsp)
subq %rax, %r14
je 0x24913
leaq 0x20(%rsp), %r15
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1bd00
incq %r14
jne 0x248fe
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2493a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1ba20
movq %rbx, %rdi
callq 0x1c1e0
|
_ZN14lora_merge_ctx11copy_tensorEP11ggml_tensor:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
lea r15, [rsi+100h]
lea r12, [rsp+68h+var_48]
mov rdi, r12; int
call _ZL14ggml_ne_stringB5cxx11PK11ggml_tensor; ggml_ne_string(ggml_tensor const*)
mov rcx, [r12]
lea rdi, aSSS_0; "%s : %s [%s]\n"
lea rsi, aCopyTensor; "copy_tensor"
mov rdx, r15
xor eax, eax
call _printf
mov rdi, [r12]; void *
lea rax, [rsp+68h+var_38]
cmp rdi, rax
jz short loc_24878
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24878:
mov rdi, r14
call _ggml_nbytes
mov r14, rax
lea r13, [rsp+68h+var_58]
mov [r13-10h], r13
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov r12, rsp
mov rdi, r12
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdx, [rbx+280h]
mov rdi, rbx
mov rsi, r12
call _ZN10file_input16read_tensor_dataENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIhSaIhEE; file_input::read_tensor_data(std::string,std::vector<uchar> &)
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r13
jz short loc_248CE
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_248CE:
mov rsi, [rbx+280h]; char *
add rbx, 2A8h
mov rdi, rbx; this
mov rdx, r14; __int64
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
lea rax, [r14+1Fh]
and rax, 0FFFFFFFFFFFFFFE0h
mov [rsp+68h+var_48], 0
sub r14, rax
jz short loc_24913
lea r15, [rsp+68h+var_48]
loc_248FE:
mov edx, 1; __int64
mov rdi, rbx; this
mov rsi, r15; char *
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
inc r14
jnz short loc_248FE
loc_24913:
add rsp, 40h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r13
jz short loc_2493A
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2493A:
mov rdi, rbx
call __Unwind_Resume
|
unsigned long long lora_merge_ctx::copy_tensor(long long a1, long long a2)
{
_BYTE *v2; // r15
long long v3; // r14
long long v4; // rax
unsigned long long result; // rax
unsigned long long i; // r14
void *v7[2]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v8[2]; // [rsp+10h] [rbp-58h] BYREF
char v9[16]; // [rsp+20h] [rbp-48h] BYREF
long long v10; // [rsp+30h] [rbp-38h] BYREF
v2 = (_BYTE *)(a2 + 256);
ggml_ne_string[abi:cxx11]((long long)v9, a2);
printf("%s : %s [%s]\n", "copy_tensor", (const char *)(a2 + 256), *(const char **)v9);
if ( *(long long **)v9 != &v10 )
operator delete(*(void **)v9, v10 + 1);
v3 = ggml_nbytes(a2);
v7[0] = v8;
v4 = strlen(v2);
std::string::_M_construct<char const*>((long long)v7, v2, (long long)&v2[v4]);
file_input::read_tensor_data(a1, v7);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
std::ostream::write((std::ostream *)(a1 + 680), *(const char **)(a1 + 640), v3);
result = (v3 + 31) & 0xFFFFFFFFFFFFFFE0LL;
v9[0] = 0;
for ( i = v3 - result; i; ++i )
result = std::ostream::write((std::ostream *)(a1 + 680), v9, 1LL);
return result;
}
|
copy_tensor:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSI + 0x100]
LEA R12,[RSP + 0x20]
MOV RDI,R12
CALL 0x0011ff6e
MOV RCX,qword ptr [R12]
LEA RDI,[0x1e866d]
LEA RSI,[0x1e867c]
MOV RDX,R15
XOR EAX,EAX
CALL 0x0011b070
MOV RDI,qword ptr [R12]
LEA RAX,[RSP + 0x30]
CMP RDI,RAX
JZ 0x00124878
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011ba20
LAB_00124878:
MOV RDI,R14
CALL 0x0011b110
MOV R14,RAX
LEA R13,[RSP + 0x10]
MOV qword ptr [R13 + -0x10],R13
MOV RDI,R15
CALL 0x0011b460
LEA RDX,[RAX + R15*0x1]
MOV R12,RSP
MOV RDI,R12
MOV RSI,R15
CALL 0x00122b0c
LEA RDX,[RBX + 0x280]
LAB_001248ad:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00124bee
LAB_001248b8:
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x001248ce
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011ba20
LAB_001248ce:
MOV RSI,qword ptr [RBX + 0x280]
ADD RBX,0x2a8
MOV RDI,RBX
MOV RDX,R14
CALL 0x0011bd00
LEA RAX,[R14 + 0x1f]
AND RAX,-0x20
MOV byte ptr [RSP + 0x20],0x0
SUB R14,RAX
JZ 0x00124913
LEA R15,[RSP + 0x20]
LAB_001248fe:
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011bd00
INC R14
JNZ 0x001248fe
LAB_00124913:
ADD RSP,0x40
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* lora_merge_ctx::copy_tensor(ggml_tensor*) */
void __thiscall lora_merge_ctx::copy_tensor(lora_merge_ctx *this,ggml_tensor *param_1)
{
ggml_tensor *__s;
long lVar1;
size_t sVar2;
long *local_68 [2];
long local_58 [2];
ggml_tensor local_48;
int7 uStack_47;
long local_38 [2];
__s = param_1 + 0x100;
ggml_ne_string_abi_cxx11_(&local_48);
printf("%s : %s [%s]\n","copy_tensor",__s,CONCAT71(uStack_47,local_48));
if ((long *)CONCAT71(uStack_47,local_48) != local_38) {
operator_delete((long *)CONCAT71(uStack_47,local_48),local_38[0] + 1);
}
lVar1 = ggml_nbytes(param_1);
local_68[0] = local_58;
sVar2 = strlen((char *)__s);
std::__cxx11::string::_M_construct<char_const*>(local_68,__s,__s + sVar2);
/* try { // try from 001248ad to 001248b7 has its CatchHandler @ 00124921 */
file_input::read_tensor_data((file_input *)this,local_68,this + 0x280);
if (local_68[0] != local_58) {
operator_delete(local_68[0],local_58[0] + 1);
}
std::ostream::write((char *)(this + 0x2a8),*(long *)(this + 0x280));
local_48 = (ggml_tensor)0x0;
lVar1 = lVar1 - (lVar1 + 0x1fU & 0xffffffffffffffe0);
if (lVar1 != 0) {
do {
std::ostream::write((char *)(this + 0x2a8),(long)&local_48);
lVar1 = lVar1 + 1;
} while (lVar1 != 0);
}
return;
}
|
|
18,779
|
exchange_int64s
|
bluesky950520[P]quickjs/cutils.c
|
static void exchange_int64s(void *a, void *b, size_t size) {
uint64_t *ap = (uint64_t *)a;
uint64_t *bp = (uint64_t *)b;
for (size /= sizeof(uint64_t); size-- != 0;) {
uint64_t t = *ap;
*ap++ = *bp;
*bp++ = t;
}
}
|
O0
|
c
|
exchange_int64s:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x18(%rsp), %rax
shrq $0x3, %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rsp)
cmpq $0x0, %rax
je 0x2763c
movq -0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rsp)
movq -0x28(%rsp), %rax
movq (%rax), %rcx
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x20(%rsp)
movq %rcx, (%rax)
movq -0x30(%rsp), %rcx
movq -0x28(%rsp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x28(%rsp)
movq %rcx, (%rax)
jmp 0x275e1
retq
nopl (%rax)
|
exchange_int64s:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_18], rdx
mov rax, [rsp+var_8]
mov [rsp+var_20], rax
mov rax, [rsp+var_10]
mov [rsp+var_28], rax
mov rax, [rsp+var_18]
shr rax, 3
mov [rsp+var_18], rax
loc_275E1:
mov rax, [rsp+var_18]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rsp+var_18], rcx
cmp rax, 0
jz short locret_2763C
mov rax, [rsp+var_20]
mov rax, [rax]
mov [rsp+var_30], rax
mov rax, [rsp+var_28]
mov rcx, [rax]
mov rax, [rsp+var_20]
mov rdx, rax
add rdx, 8
mov [rsp+var_20], rdx
mov [rax], rcx
mov rcx, [rsp+var_30]
mov rax, [rsp+var_28]
mov rdx, rax
add rdx, 8
mov [rsp+var_28], rdx
mov [rax], rcx
jmp short loc_275E1
locret_2763C:
retn
|
long long exchange_int64s(long long *a1, long long *a2, unsigned long long a3)
{
long long result; // rax
long long *v4; // rax
long long *v5; // rax
long long v6; // [rsp+0h] [rbp-30h]
unsigned long long v9; // [rsp+18h] [rbp-18h]
v9 = a3 >> 3;
while ( 1 )
{
result = v9--;
if ( !result )
break;
v6 = *a1;
v4 = a1++;
*v4 = *a2;
v5 = a2++;
*v5 = v6;
}
return result;
}
|
exchange_int64s:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV qword ptr [RSP + -0x18],RDX
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x18]
SHR RAX,0x3
MOV qword ptr [RSP + -0x18],RAX
LAB_001275e1:
MOV RAX,qword ptr [RSP + -0x18]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RSP + -0x18],RCX
CMP RAX,0x0
JZ 0x0012763c
MOV RAX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + -0x30],RAX
MOV RAX,qword ptr [RSP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RSP + -0x20]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RSP + -0x20],RDX
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + -0x30]
MOV RAX,qword ptr [RSP + -0x28]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RSP + -0x28],RDX
MOV qword ptr [RAX],RCX
JMP 0x001275e1
LAB_0012763c:
RET
|
void exchange_int64s(int8 *param_1,int8 *param_2,ulong param_3)
{
int8 uVar1;
int8 *local_28;
int8 *local_20;
ulong local_18;
local_28 = param_2;
local_20 = param_1;
local_18 = param_3 >> 3;
while (local_18 != 0) {
uVar1 = *local_20;
*local_20 = *local_28;
*local_28 = uVar1;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
local_18 = local_18 - 1;
}
return;
}
|
|
18,780
|
c4_eth_verify
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_verify.c
|
bool c4_eth_verify(verify_ctx_t* ctx) {
if (ctx->chain_id != C4_CHAIN_MAINNET) return false;
if (!c4_update_from_sync_data(ctx)) return true;
#ifdef ETH_TX
if (ssz_is_type(&ctx->proof, eth_ssz_verification_type(ETH_SSZ_VERIFY_TRANSACTION_PROOF)))
verify_tx_proof(ctx);
else
#endif
#ifdef ETH_RECEIPT
if (ssz_is_type(&ctx->proof, eth_ssz_verification_type(ETH_SSZ_VERIFY_RECEIPT_PROOF)))
verify_receipt_proof(ctx);
else
#endif
#ifdef ETH_LOGS
if (ssz_is_type(&ctx->proof, eth_ssz_verification_type(ETH_SSZ_VERIFY_LOGS_PROOF)))
verify_logs_proof(ctx);
else
#endif
#ifdef ETH_ACCOUNT
if (ssz_is_type(&ctx->proof, eth_ssz_verification_type(ETH_SSZ_VERIFY_ACCOUNT_PROOF)))
verify_account_proof(ctx);
else
#endif
#ifdef ETH_CALL
if (ssz_is_type(&ctx->proof, eth_ssz_verification_type(ETH_SSZ_VERIFY_CALL_PROOF)))
verify_call_proof(ctx);
else
#endif
#ifdef ETH_BLOCK
if (ssz_is_type(&ctx->proof, eth_ssz_verification_type(ETH_SSZ_VERIFY_BLOCK_PROOF)))
verify_block_proof(ctx);
else
#endif
#ifdef ETH_UTIL
if (c4_eth_get_method_type(ctx->chain_id, ctx->method) == METHOD_LOCAL)
verify_eth_local(ctx);
else
#endif
if (ctx->method == NULL && ctx->proof.def->type == SSZ_TYPE_NONE && ctx->sync_data.def->type != SSZ_TYPE_NONE && ctx->data.def->type == SSZ_TYPE_NONE)
ctx->success = true; // if you only verify the sync data, this is ok
else {
ctx->state.error = strdup("proof is not a supported proof type or not enabled");
ctx->success = false;
}
return true;
}
|
O3
|
c
|
c4_eth_verify:
pushq %rbp
pushq %r14
pushq %rbx
movl 0x80(%rdi), %ebp
cmpl $0x1, %ebp
jne 0x2398d
movq %rdi, %rbx
callq 0x28390
testb %al, %al
je 0x2398d
leaq 0x20(%rbx), %r14
movl $0x7, %edi
callq 0x23998
movq %r14, %rdi
movq %rax, %rsi
callq 0x52841
testb %al, %al
je 0x23875
movq %rbx, %rdi
callq 0x24624
jmp 0x2398d
movl $0x8, %edi
callq 0x23998
movq %r14, %rdi
movq %rax, %rsi
callq 0x52841
testb %al, %al
je 0x2389b
movq %rbx, %rdi
callq 0x25a24
jmp 0x2398d
movl $0x9, %edi
callq 0x23998
movq %r14, %rdi
movq %rax, %rsi
callq 0x52841
testb %al, %al
je 0x238c1
movq %rbx, %rdi
callq 0x25f58
jmp 0x2398d
movl $0x6, %edi
callq 0x23998
movq %r14, %rdi
movq %rax, %rsi
callq 0x52841
testb %al, %al
je 0x238e7
movq %rbx, %rdi
callq 0x23bdc
jmp 0x2398d
movl $0xd, %edi
callq 0x23998
movq %r14, %rdi
movq %rax, %rsi
callq 0x52841
testb %al, %al
je 0x2390d
movq %rbx, %rdi
callq 0x26aa4
jmp 0x2398d
movl $0xf, %edi
callq 0x23998
movq %r14, %rdi
movq %rax, %rsi
callq 0x52841
testb %al, %al
je 0x23930
movq %rbx, %rdi
callq 0x24ecc
jmp 0x2398d
movl 0x80(%rbx), %edi
movq (%rbx), %r14
movq %r14, %rsi
callq 0x23770
cmpl $0x4, %eax
jne 0x23950
movq %rbx, %rdi
callq 0x28124
jmp 0x2398d
testq %r14, %r14
jne 0x23979
movq 0x30(%rbx), %rax
cmpl $0x8, 0x8(%rax)
jne 0x23979
movq 0x60(%rbx), %rax
cmpl $0x8, 0x8(%rax)
je 0x23979
movq 0x48(%rbx), %rax
cmpl $0x8, 0x8(%rax)
jne 0x23979
movb $0x1, 0x68(%rbx)
jmp 0x2398d
leaq 0x5b93c(%rip), %rdi # 0x7f2bc
callq 0x213d0
movq %rax, 0x78(%rbx)
movb $0x0, 0x68(%rbx)
cmpl $0x1, %ebp
sete %al
popq %rbx
popq %r14
popq %rbp
retq
|
c4_eth_verify:
push rbp
push r14
push rbx
mov ebp, [rdi+80h]
cmp ebp, 1
jnz loc_2398D
mov rbx, rdi
call c4_update_from_sync_data
test al, al
jz loc_2398D
lea r14, [rbx+20h]
mov edi, 7
call eth_ssz_verification_type
mov rdi, r14
mov rsi, rax
call ssz_is_type
test al, al
jz short loc_23875
mov rdi, rbx
call verify_tx_proof
jmp loc_2398D
loc_23875:
mov edi, 8
call eth_ssz_verification_type
mov rdi, r14
mov rsi, rax
call ssz_is_type
test al, al
jz short loc_2389B
mov rdi, rbx
call verify_receipt_proof
jmp loc_2398D
loc_2389B:
mov edi, 9
call eth_ssz_verification_type
mov rdi, r14
mov rsi, rax
call ssz_is_type
test al, al
jz short loc_238C1
mov rdi, rbx
call verify_logs_proof
jmp loc_2398D
loc_238C1:
mov edi, 6
call eth_ssz_verification_type
mov rdi, r14
mov rsi, rax
call ssz_is_type
test al, al
jz short loc_238E7
mov rdi, rbx
call verify_account_proof
jmp loc_2398D
loc_238E7:
mov edi, 0Dh
call eth_ssz_verification_type
mov rdi, r14
mov rsi, rax
call ssz_is_type
test al, al
jz short loc_2390D
mov rdi, rbx
call verify_call_proof
jmp loc_2398D
loc_2390D:
mov edi, 0Fh
call eth_ssz_verification_type
mov rdi, r14
mov rsi, rax
call ssz_is_type
test al, al
jz short loc_23930
mov rdi, rbx
call verify_block_proof
jmp short loc_2398D
loc_23930:
mov edi, [rbx+80h]
mov r14, [rbx]
mov rsi, r14
call c4_eth_get_method_type
cmp eax, 4
jnz short loc_23950
mov rdi, rbx
call verify_eth_local
jmp short loc_2398D
loc_23950:
test r14, r14
jnz short loc_23979
mov rax, [rbx+30h]
cmp dword ptr [rax+8], 8
jnz short loc_23979
mov rax, [rbx+60h]
cmp dword ptr [rax+8], 8
jz short loc_23979
mov rax, [rbx+48h]
cmp dword ptr [rax+8], 8
jnz short loc_23979
mov byte ptr [rbx+68h], 1
jmp short loc_2398D
loc_23979:
lea rdi, aProofIsNotASup; "proof is not a supported proof type or "...
call _strdup
mov [rbx+78h], rax
mov byte ptr [rbx+68h], 0
loc_2398D:
cmp ebp, 1
setz al
pop rbx
pop r14
pop rbp
retn
|
bool c4_eth_verify(long long a1)
{
int v1; // ebp
long long v2; // rax
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // r14
v1 = *(_DWORD *)(a1 + 128);
if ( v1 == 1 && (unsigned __int8)c4_update_from_sync_data() )
{
v2 = eth_ssz_verification_type(7LL);
if ( (unsigned __int8)ssz_is_type(a1 + 32, v2) )
{
verify_tx_proof(a1);
}
else
{
v3 = eth_ssz_verification_type(8LL);
if ( (unsigned __int8)ssz_is_type(a1 + 32, v3) )
{
verify_receipt_proof(a1);
}
else
{
v4 = eth_ssz_verification_type(9LL);
if ( (unsigned __int8)ssz_is_type(a1 + 32, v4) )
{
verify_logs_proof(a1);
}
else
{
v5 = eth_ssz_verification_type(6LL);
if ( (unsigned __int8)ssz_is_type(a1 + 32, v5) )
{
verify_account_proof(a1);
}
else
{
v6 = eth_ssz_verification_type(13LL);
if ( (unsigned __int8)ssz_is_type(a1 + 32, v6) )
{
verify_call_proof(a1);
}
else
{
v7 = eth_ssz_verification_type(15LL);
if ( (unsigned __int8)ssz_is_type(a1 + 32, v7) )
{
verify_block_proof(a1);
}
else
{
v8 = *(_QWORD *)a1;
if ( (unsigned int)c4_eth_get_method_type(*(_DWORD *)(a1 + 128), *(_QWORD *)a1) == 4 )
{
verify_eth_local(a1);
}
else if ( v8
|| *(_DWORD *)(*(_QWORD *)(a1 + 48) + 8LL) != 8
|| *(_DWORD *)(*(_QWORD *)(a1 + 96) + 8LL) == 8
|| *(_DWORD *)(*(_QWORD *)(a1 + 72) + 8LL) != 8 )
{
*(_QWORD *)(a1 + 120) = strdup("proof is not a supported proof type or not enabled");
*(_BYTE *)(a1 + 104) = 0;
}
else
{
*(_BYTE *)(a1 + 104) = 1;
}
}
}
}
}
}
}
}
return v1 == 1;
}
|
c4_eth_verify:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBP,dword ptr [RDI + 0x80]
CMP EBP,0x1
JNZ 0x0012398d
MOV RBX,RDI
CALL 0x00128390
TEST AL,AL
JZ 0x0012398d
LEA R14,[RBX + 0x20]
MOV EDI,0x7
CALL 0x00123998
MOV RDI,R14
MOV RSI,RAX
CALL 0x00152841
TEST AL,AL
JZ 0x00123875
MOV RDI,RBX
CALL 0x00124624
JMP 0x0012398d
LAB_00123875:
MOV EDI,0x8
CALL 0x00123998
MOV RDI,R14
MOV RSI,RAX
CALL 0x00152841
TEST AL,AL
JZ 0x0012389b
MOV RDI,RBX
CALL 0x00125a24
JMP 0x0012398d
LAB_0012389b:
MOV EDI,0x9
CALL 0x00123998
MOV RDI,R14
MOV RSI,RAX
CALL 0x00152841
TEST AL,AL
JZ 0x001238c1
MOV RDI,RBX
CALL 0x00125f58
JMP 0x0012398d
LAB_001238c1:
MOV EDI,0x6
CALL 0x00123998
MOV RDI,R14
MOV RSI,RAX
CALL 0x00152841
TEST AL,AL
JZ 0x001238e7
MOV RDI,RBX
CALL 0x00123bdc
JMP 0x0012398d
LAB_001238e7:
MOV EDI,0xd
CALL 0x00123998
MOV RDI,R14
MOV RSI,RAX
CALL 0x00152841
TEST AL,AL
JZ 0x0012390d
MOV RDI,RBX
CALL 0x00126aa4
JMP 0x0012398d
LAB_0012390d:
MOV EDI,0xf
CALL 0x00123998
MOV RDI,R14
MOV RSI,RAX
CALL 0x00152841
TEST AL,AL
JZ 0x00123930
MOV RDI,RBX
CALL 0x00124ecc
JMP 0x0012398d
LAB_00123930:
MOV EDI,dword ptr [RBX + 0x80]
MOV R14,qword ptr [RBX]
MOV RSI,R14
CALL 0x00123770
CMP EAX,0x4
JNZ 0x00123950
MOV RDI,RBX
CALL 0x00128124
JMP 0x0012398d
LAB_00123950:
TEST R14,R14
JNZ 0x00123979
MOV RAX,qword ptr [RBX + 0x30]
CMP dword ptr [RAX + 0x8],0x8
JNZ 0x00123979
MOV RAX,qword ptr [RBX + 0x60]
CMP dword ptr [RAX + 0x8],0x8
JZ 0x00123979
MOV RAX,qword ptr [RBX + 0x48]
CMP dword ptr [RAX + 0x8],0x8
JNZ 0x00123979
MOV byte ptr [RBX + 0x68],0x1
JMP 0x0012398d
LAB_00123979:
LEA RDI,[0x17f2bc]
CALL 0x001213d0
MOV qword ptr [RBX + 0x78],RAX
MOV byte ptr [RBX + 0x68],0x0
LAB_0012398d:
CMP EBP,0x1
SETZ AL
POP RBX
POP R14
POP RBP
RET
|
bool c4_eth_verify(long *param_1)
{
long *plVar1;
long lVar2;
long lVar3;
char cVar4;
int iVar5;
int8 uVar6;
char *pcVar7;
lVar3 = param_1[0x10];
if ((int)lVar3 == 1) {
cVar4 = c4_update_from_sync_data();
if (cVar4 != '\0') {
plVar1 = param_1 + 4;
uVar6 = eth_ssz_verification_type(7);
cVar4 = ssz_is_type(plVar1,uVar6);
if (cVar4 == '\0') {
uVar6 = eth_ssz_verification_type(8);
cVar4 = ssz_is_type(plVar1,uVar6);
if (cVar4 == '\0') {
uVar6 = eth_ssz_verification_type(9);
cVar4 = ssz_is_type(plVar1,uVar6);
if (cVar4 == '\0') {
uVar6 = eth_ssz_verification_type(6);
cVar4 = ssz_is_type(plVar1,uVar6);
if (cVar4 == '\0') {
uVar6 = eth_ssz_verification_type(0xd);
cVar4 = ssz_is_type(plVar1,uVar6);
if (cVar4 == '\0') {
uVar6 = eth_ssz_verification_type(0xf);
cVar4 = ssz_is_type(plVar1,uVar6);
if (cVar4 == '\0') {
lVar2 = *param_1;
iVar5 = c4_eth_get_method_type((int)param_1[0x10],lVar2);
if (iVar5 == 4) {
verify_eth_local(param_1);
}
else if ((((lVar2 == 0) && (*(int *)(param_1[6] + 8) == 8)) &&
(*(int *)(param_1[0xc] + 8) != 8)) && (*(int *)(param_1[9] + 8) == 8)) {
*(int1 *)(param_1 + 0xd) = 1;
}
else {
pcVar7 = strdup("proof is not a supported proof type or not enabled");
param_1[0xf] = (long)pcVar7;
*(int1 *)(param_1 + 0xd) = 0;
}
}
else {
verify_block_proof(param_1);
}
}
else {
verify_call_proof(param_1);
}
}
else {
verify_account_proof(param_1);
}
}
else {
verify_logs_proof(param_1);
}
}
else {
verify_receipt_proof(param_1);
}
}
else {
verify_tx_proof(param_1);
}
}
}
return (int)lVar3 == 1;
}
|
|
18,781
|
ftxui::vcenter(std::shared_ptr<ftxui::Node>)
|
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/composite_decorator.cpp
|
Element vcenter(Element child) {
return vbox(filler(), std::move(child), filler());
}
|
O2
|
cpp
|
ftxui::vcenter(std::shared_ptr<ftxui::Node>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsp), %rdi
callq 0x1e524
leaq 0x28(%rsp), %rbx
movups (%r15), %xmm0
andq $0x0, 0x8(%r15)
movaps %xmm0, -0x8(%rbx)
andq $0x0, (%r15)
movq %rsp, %rdi
callq 0x1e524
leaq 0x10(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
movq %r14, %rdi
callq 0x1e361
leaq 0x8(%rsp), %rdi
callq 0x13452
movq %rbx, %rdi
callq 0x13452
leaq 0x18(%rsp), %rdi
callq 0x13452
movq %r14, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x13452
jmp 0x1e178
movq %rax, %r14
movq %rbx, %rdi
callq 0x13452
leaq 0x18(%rsp), %rdi
callq 0x13452
movq %r14, %rdi
callq 0xc7f0
|
_ZN5ftxui7vcenterESt10shared_ptrINS_4NodeEE:
push r15
push r14
push rbx
sub rsp, 30h
mov r15, rsi
mov r14, rdi
lea rdi, [rsp+48h+var_38]; this
call _ZN5ftxui6fillerEv; ftxui::filler(void)
lea rbx, [rsp+48h+var_20]
movups xmm0, xmmword ptr [r15]
and qword ptr [r15+8], 0
movaps xmmword ptr [rbx-8], xmm0
and qword ptr [r15], 0
mov rdi, rsp; this
call _ZN5ftxui6fillerEv; ftxui::filler(void)
lea rsi, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_28]
mov rcx, rsp
mov rdi, r14
call _ZN5ftxui4vboxIJSt10shared_ptrINS_4NodeEES3_S3_EEES3_DpT_; ftxui::vbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>)
lea rdi, [rsp+48h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+48h+var_30]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, r14
add rsp, 30h
pop rbx
pop r14
pop r15
retn
mov r14, rax
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_1E178
mov r14, rax
loc_1E178:
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+arg_10]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
long long ftxui::vcenter(long long a1, __int128 *a2)
{
__int128 v2; // xmm0
int v3; // r8d
int v4; // r9d
char v6[8]; // [rsp+0h] [rbp-48h] BYREF
long long v7; // [rsp+8h] [rbp-40h] BYREF
_BYTE v8[8]; // [rsp+10h] [rbp-38h] BYREF
long long v9; // [rsp+18h] [rbp-30h] BYREF
_OWORD v10[2]; // [rsp+20h] [rbp-28h] BYREF
ftxui::filler((ftxui *)v8);
v2 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
v10[0] = v2;
*(_QWORD *)a2 = 0LL;
ftxui::filler((ftxui *)v6);
ftxui::vbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(
a1,
(unsigned int)v8,
(unsigned int)v10,
(unsigned int)v6,
v3,
v4,
v6[0]);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v10 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v9);
return a1;
}
|
vcenter:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R15,RSI
MOV R14,RDI
LEA RDI,[RSP + 0x10]
CALL 0x0011e524
LEA RBX,[RSP + 0x28]
MOVUPS XMM0,xmmword ptr [R15]
AND qword ptr [R15 + 0x8],0x0
MOVAPS xmmword ptr [RBX + -0x8],XMM0
AND qword ptr [R15],0x0
LAB_0011e120:
MOV RDI,RSP
CALL 0x0011e524
LAB_0011e128:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x20]
MOV RCX,RSP
MOV RDI,R14
CALL 0x0011e361
LAB_0011e13d:
LEA RDI,[RSP + 0x8]
CALL 0x00113452
MOV RDI,RBX
CALL 0x00113452
LEA RDI,[RSP + 0x18]
CALL 0x00113452
MOV RAX,R14
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* ftxui::vcenter(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::vcenter(ftxui *this,int8 *param_2)
{
ftxui afStack_48 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [8];
ftxui local_38 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_30 [8];
int8 local_28;
int8 uStack_20;
filler(local_38);
local_28 = *param_2;
uStack_20 = param_2[1];
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 0011e120 to 0011e127 has its CatchHandler @ 0011e175 */
filler(afStack_48);
/* try { // try from 0011e128 to 0011e13c has its CatchHandler @ 0011e166 */
vbox<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>
(this,local_38,&local_28,afStack_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_30);
return this;
}
|
|
18,782
|
ftxui::xframe(std::shared_ptr<ftxui::Node>)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/frame.cpp
|
Element xframe(Element child) {
return std::make_shared<Frame>(unpack(std::move(child)), true, false);
}
|
O3
|
cpp
|
ftxui::xframe(std::shared_ptr<ftxui::Node>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movups (%rsi), %xmm0
xorl %ecx, %ecx
movq %rcx, 0x8(%rsi)
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
movq %rcx, (%rsi)
movq %rsp, %rdi
movq %rax, %rsi
callq 0x22adb
movl $0x70, %edi
callq 0xb3e0
movq %rax, %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x20dc6(%rip), %rax # 0x58ac0
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
movq 0x10(%rsp), %rax
movaps (%rsp), %xmm0
xorl %ecx, %ecx
movq %rcx, 0x10(%rsp)
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rax, 0x10(%rsi)
movaps %xmm1, 0x30(%rsp)
movq %rcx, 0x40(%rsp)
movq %r15, %rdi
callq 0x23e0a
leaq 0x50(%rsp), %rdi
callq 0x1503a
leaq 0x20dc6(%rip), %rax # 0x58b10
movq %rax, 0x10(%r14)
movw $0x1, 0x6c(%r14)
leaq 0x30(%rsp), %rdi
callq 0x1503a
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq %rsp, %rdi
callq 0x1503a
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x37d7d
callq 0x14af8
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x1503a
leaq 0x30(%rsp), %rdi
callq 0x1503a
movl $0x70, %esi
movq %r14, %rdi
callq 0xb400
jmp 0x37db3
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1503a
jmp 0x37dc0
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x37dcf
callq 0x14af8
movq %rbx, %rdi
callq 0xb780
|
_ZN5ftxui6xframeESt10shared_ptrINS_4NodeEE:
push r15
push r14
push rbx
sub rsp, 70h
mov rbx, rdi
movups xmm0, xmmword ptr [rsi]
xor ecx, ecx
mov [rsi+8], rcx
lea rax, [rsp+88h+var_68]
movaps xmmword ptr [rax], xmm0
mov [rsi], rcx
mov rdi, rsp
mov rsi, rax
call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>)
mov edi, 70h ; 'p'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rax, 100000001h
mov [r14+8], rax
lea rax, off_58AC0
mov [r14], rax
mov r15, r14
add r15, 10h
mov rax, [rsp+88h+var_78]
movaps xmm0, [rsp+88h+var_88]
xor ecx, ecx
mov [rsp+88h+var_78], rcx
xorps xmm1, xmm1
movaps [rsp+88h+var_88], xmm1
lea rsi, [rsp+88h+var_38]
movaps xmmword ptr [rsi], xmm0
mov [rsi+10h], rax
movaps [rsp+88h+var_58], xmm1
mov [rsp+88h+var_48], rcx
mov rdi, r15
call _ZN5ftxui4NodeC2ESt6vectorISt10shared_ptrIS0_ESaIS3_EE; ftxui::Node::Node(std::vector<std::shared_ptr<ftxui::Node>>)
lea rdi, [rsp+88h+var_38]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
lea rax, off_58B10
mov [r14+10h], rax
mov word ptr [r14+6Ch], 1
lea rdi, [rsp+88h+var_58]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov [rbx], r15
mov [rbx+8], r14
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rdi, [rsp+88h+var_60]
test rdi, rdi
jz short loc_37D7D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_37D7D:
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_48]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
lea rdi, [rsp+arg_28]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov esi, 70h ; 'p'; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_37DB3
mov rbx, rax
loc_37DB3:
mov rdi, rsp
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
jmp short loc_37DC0
mov rbx, rax
loc_37DC0:
mov rdi, [rsp+arg_20]
test rdi, rdi
jz short loc_37DCF
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_37DCF:
mov rdi, rbx
call __Unwind_Resume
|
_QWORD * ftxui::xframe(_QWORD *a1, __int128 *a2)
{
__int128 v2; // xmm0
long long v3; // r14
long long v4; // rax
__int128 v5; // xmm0
__int128 v7; // [rsp+0h] [rbp-88h] BYREF
long long v8; // [rsp+10h] [rbp-78h]
__int128 v9; // [rsp+20h] [rbp-68h] BYREF
__int128 v10; // [rsp+30h] [rbp-58h] BYREF
long long v11; // [rsp+40h] [rbp-48h]
__int128 v12; // [rsp+50h] [rbp-38h] BYREF
long long v13; // [rsp+60h] [rbp-28h]
v2 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
v9 = v2;
*(_QWORD *)a2 = 0LL;
ftxui::unpack<std::shared_ptr<ftxui::Node>>((long long)&v7, (long long)&v9);
v3 = operator new(0x70uLL);
*(_QWORD *)(v3 + 8) = 0x100000001LL;
*(_QWORD *)v3 = off_58AC0;
v4 = v8;
v5 = v7;
v8 = 0LL;
v7 = 0LL;
v12 = v5;
v13 = v4;
v10 = 0LL;
v11 = 0LL;
ftxui::Node::Node(v3 + 16, (long long)&v12);
std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v12);
*(_QWORD *)(v3 + 16) = off_58B10;
*(_WORD *)(v3 + 108) = 1;
std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v10);
*a1 = v3 + 16;
a1[1] = v3;
std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v7);
if ( *((_QWORD *)&v9 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1));
return a1;
}
|
xframe:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI]
XOR ECX,ECX
MOV qword ptr [RSI + 0x8],RCX
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX],XMM0
MOV qword ptr [RSI],RCX
LAB_00137ccd:
MOV RDI,RSP
MOV RSI,RAX
CALL 0x00122adb
LAB_00137cd8:
MOV EDI,0x70
CALL 0x0010b3e0
MOV R14,RAX
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x158ac0]
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
MOV RAX,qword ptr [RSP + 0x10]
MOVAPS XMM0,xmmword ptr [RSP]
XOR ECX,ECX
MOV qword ptr [RSP + 0x10],RCX
XORPS XMM1,XMM1
MOVAPS xmmword ptr [RSP],XMM1
LEA RSI,[RSP + 0x50]
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],RAX
MOVAPS xmmword ptr [RSP + 0x30],XMM1
MOV qword ptr [RSP + 0x40],RCX
LAB_00137d31:
MOV RDI,R15
CALL 0x00123e0a
LAB_00137d39:
LEA RDI,[RSP + 0x50]
CALL 0x0011503a
LEA RAX,[0x158b10]
MOV qword ptr [R14 + 0x10],RAX
MOV word ptr [R14 + 0x6c],0x1
LEA RDI,[RSP + 0x30]
CALL 0x0011503a
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,RSP
CALL 0x0011503a
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00137d7d
CALL 0x00114af8
LAB_00137d7d:
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
|
/* ftxui::xframe(std::shared_ptr<ftxui::Node>) */
ftxui * __thiscall ftxui::xframe(ftxui *this,int8 *param_2)
{
int8 *puVar1;
int8 local_88;
int8 uStack_80;
int8 local_78;
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int8 local_58;
int8 uStack_50;
int8 local_48;
int4 local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
int8 local_28;
local_68 = *(int4 *)param_2;
uStack_64 = *(int4 *)((long)param_2 + 4);
uStack_60 = *(int4 *)(param_2 + 1);
uStack_5c = *(int4 *)((long)param_2 + 0xc);
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 00137ccd to 00137cd7 has its CatchHandler @ 00137dbd */
unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_88,&local_68);
/* try { // try from 00137cd8 to 00137ce1 has its CatchHandler @ 00137db0 */
puVar1 = (int8 *)operator_new(0x70);
local_28 = local_78;
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_00158ac0;
local_38 = (int4)local_88;
uStack_34 = local_88._4_4_;
uStack_30 = (int4)uStack_80;
uStack_2c = uStack_80._4_4_;
local_78 = 0;
local_88 = 0;
uStack_80 = 0;
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
/* try { // try from 00137d31 to 00137d38 has its CatchHandler @ 00137d8a */
Node::Node((Node *)(puVar1 + 2));
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_38);
puVar1[2] = &PTR__Node_00158b10;
*(int2 *)((long)puVar1 + 0x6c) = 1;
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_58);
*(Node **)this = (Node *)(puVar1 + 2);
*(int8 **)(this + 8) = puVar1;
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *)
&local_88);
if ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_5c,uStack_60) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_5c,uStack_60));
}
return this;
}
|
|
18,783
|
ftxui::Renderer(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::Node> ()>)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/renderer.cpp
|
Component Renderer(Component child, std::function<Element()> render) {
Component renderer = Renderer(std::move(render));
renderer->Add(std::move(child));
return renderer;
}
|
O3
|
cpp
|
ftxui::Renderer(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::Node> ()>):
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x18(%rdx), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rdx), %rax
testq %rax, %rax
je 0x2c8e7
movups (%rdx), %xmm1
addq $0x10, %rdx
movaps %xmm1, (%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rdx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2c80c
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2c909
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq (%rbx), %rdi
movups (%r14), %xmm0
xorl %eax, %eax
movq %rax, 0x8(%r14)
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rax, (%r14)
callq 0x26e5e
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2c935
callq 0x14af8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
jmp 0x2c986
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2c954
callq 0x14af8
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x2c97e
callq 0x14af8
jmp 0x2c97e
movq %rax, %r14
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2c97e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0xb780
movq %rax, %rdi
callq 0x1049a
|
_ZN5ftxui8RendererESt10shared_ptrINS_13ComponentBaseEESt8functionIFS0_INS_4NodeEEvEE:
push r14
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movaps [rsp+48h+var_48], xmm0
mov [rsp+48h+var_38], 0
mov rax, [rdx+18h]
mov [rsp+48h+var_30], rax
mov rax, [rdx+10h]
test rax, rax
jz short loc_2C8E7
movups xmm1, xmmword ptr [rdx]
add rdx, 10h
movaps [rsp+48h+var_48], xmm1
mov [rsp+48h+var_38], rax
movups xmmword ptr [rdx], xmm0
loc_2C8E7:
mov rsi, rsp
mov rdi, rbx
call _ZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEE; ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_2C909
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_2C909:
mov rdi, [rbx]
movups xmm0, xmmword ptr [r14]
xor eax, eax
mov [r14+8], rax
lea rsi, [rsp+48h+var_28]
movaps xmmword ptr [rsi], xmm0
mov [r14], rax
call _ZN5ftxui13ComponentBase3AddESt10shared_ptrIS0_E; ftxui::ComponentBase::Add(std::shared_ptr<ftxui::ComponentBase>)
mov rdi, [rsp+48h+var_20]
test rdi, rdi
jz short loc_2C935
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2C935:
mov rax, rbx
add rsp, 38h
pop rbx
pop r14
retn
jmp short loc_2C986
mov r14, rax
mov rdi, [rsp+48h+var_20]
test rdi, rdi
jz short loc_2C954
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2C954:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_2C97E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_2C97E
mov r14, rax
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_2C97E
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_2C97E:
mov rdi, r14
call __Unwind_Resume
loc_2C986:
mov rdi, rax
call __clang_call_terminate
|
long long * ftxui::Renderer(long long *a1, __int128 *a2, __int128 *a3)
{
void ( *v4)(__int128 *, __int128 *, long long); // rax
long long v5; // rdi
__int128 v6; // xmm0
__int128 v8; // [rsp+0h] [rbp-48h] BYREF
void ( *v9)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-38h]
long long v10; // [rsp+18h] [rbp-30h]
__int128 v11; // [rsp+20h] [rbp-28h] BYREF
v8 = 0LL;
v9 = 0LL;
v10 = *((_QWORD *)a3 + 3);
v4 = (void ( *)(__int128 *, __int128 *, long long))*((_QWORD *)a3 + 2);
if ( v4 )
{
v8 = *a3;
v9 = v4;
a3[1] = 0LL;
}
ftxui::Renderer(a1, (long long)&v8);
if ( v9 )
v9(&v8, &v8, 3LL);
v5 = *a1;
v6 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
v11 = v6;
*(_QWORD *)a2 = 0LL;
ftxui::ComponentBase::Add(v5, (ftxui::ComponentBase **)&v11);
if ( *((_QWORD *)&v11 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v11 + 1));
return a1;
}
|
Renderer:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RDX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RDX + 0x10]
TEST RAX,RAX
JZ 0x0012c8e7
MOVUPS XMM1,xmmword ptr [RDX]
ADD RDX,0x10
MOVAPS xmmword ptr [RSP],XMM1
MOV qword ptr [RSP + 0x10],RAX
MOVUPS xmmword ptr [RDX],XMM0
LAB_0012c8e7:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0012c80c
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0012c909
LAB_0012c8fc:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0012c909:
MOV RDI,qword ptr [RBX]
MOVUPS XMM0,xmmword ptr [R14]
XOR EAX,EAX
MOV qword ptr [R14 + 0x8],RAX
LEA RSI,[RSP + 0x20]
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [R14],RAX
LAB_0012c921:
CALL 0x00126e5e
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0012c935
CALL 0x00114af8
LAB_0012c935:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* ftxui::Renderer(std::shared_ptr<ftxui::ComponentBase>, std::function<std::shared_ptr<ftxui::Node>
()>) */
ftxui * __thiscall ftxui::Renderer(ftxui *this,int8 *param_2,int8 *param_3)
{
code *pcVar1;
ComponentBase *pCVar2;
int8 local_48;
int8 uStack_40;
code *local_38;
int8 local_30;
int4 local_28;
int4 uStack_24;
int4 uStack_20;
int4 uStack_1c;
local_48 = 0;
uStack_40 = 0;
local_38 = (code *)0x0;
local_30 = param_3[3];
pcVar1 = (code *)param_3[2];
if (pcVar1 != (code *)0x0) {
local_48 = *param_3;
uStack_40 = param_3[1];
param_3[2] = 0;
param_3[3] = 0;
local_38 = pcVar1;
}
/* try { // try from 0012c8e7 to 0012c8f1 has its CatchHandler @ 0012c964 */
Renderer(this,&local_48);
if (local_38 != (code *)0x0) {
/* try { // try from 0012c8fc to 0012c908 has its CatchHandler @ 0012c940 */
(*local_38)(&local_48,&local_48,3);
}
pCVar2 = *(ComponentBase **)this;
local_28 = *(int4 *)param_2;
uStack_24 = *(int4 *)((long)param_2 + 4);
uStack_20 = *(int4 *)(param_2 + 1);
uStack_1c = *(int4 *)((long)param_2 + 0xc);
param_2[1] = 0;
*param_2 = 0;
/* try { // try from 0012c921 to 0012c925 has its CatchHandler @ 0012c942 */
ComponentBase::Add(pCVar2);
if ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_1c,uStack_20) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_1c,uStack_20));
}
return this;
}
|
|
18,784
|
ft_stroke_border_get_counts
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-stroker.c
|
static PVG_FT_Error ft_stroke_border_get_counts(PVG_FT_StrokeBorder border,
PVG_FT_UInt* anum_points,
PVG_FT_UInt* anum_contours)
{
PVG_FT_Error error = 0;
PVG_FT_UInt num_points = 0;
PVG_FT_UInt num_contours = 0;
PVG_FT_UInt count = border->num_points;
PVG_FT_Vector* point = border->points;
PVG_FT_Byte* tags = border->tags;
PVG_FT_Int in_contour = 0;
for (; count > 0; count--, num_points++, point++, tags++) {
if (tags[0] & PVG_FT_STROKE_TAG_BEGIN) {
if (in_contour != 0) goto Fail;
in_contour = 1;
} else if (in_contour == 0)
goto Fail;
if (tags[0] & PVG_FT_STROKE_TAG_END) {
in_contour = 0;
num_contours++;
}
}
if (in_contour != 0) goto Fail;
border->valid = TRUE;
Exit:
*anum_points = num_points;
*anum_contours = num_contours;
return error;
Fail:
num_points = 0;
num_contours = 0;
goto Exit;
}
|
O1
|
c
|
ft_stroke_border_get_counts:
pushq %rbp
pushq %r14
pushq %rbx
movl (%rdi), %ecx
xorl %eax, %eax
testq %rcx, %rcx
je 0x1eac2
movq 0x10(%rdi), %r10
xorl %r9d, %r9d
xorl %r11d, %r11d
xorl %ebp, %ebp
xorl %r8d, %r8d
movzbl (%r10,%r11), %ebx
testb $0x4, %bl
sete %r14b
testl %ebp, %ebp
sete %bpl
cmpb %bpl, %r14b
je 0x1eae0
xorl %ebp, %ebp
andl $0x8, %ebx
sete %bpl
movl %ebx, %r14d
shrl $0x3, %r14d
addl %r14d, %r8d
incq %r11
cmpl %r11d, %ecx
jne 0x1ea88
testb %bl, %bl
setne %r10b
jmp 0x1eaca
movb $0x1, %r10b
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x0, %r9d
testb %r10b, %r10b
je 0x1eae2
movb $0x1, 0x20(%rdi)
movl %ecx, %eax
movl %r8d, %r9d
jmp 0x1eae2
xorl %eax, %eax
movl %eax, (%rsi)
movl %r9d, (%rdx)
popq %rbx
popq %r14
popq %rbp
retq
|
ft_stroke_border_get_counts:
push rbp
push r14
push rbx
mov ecx, [rdi]
xor eax, eax
test rcx, rcx
jz short loc_1EAC2
mov r10, [rdi+10h]
xor r9d, r9d
xor r11d, r11d
xor ebp, ebp
xor r8d, r8d
loc_1EA88:
movzx ebx, byte ptr [r10+r11]
test bl, 4
setz r14b
test ebp, ebp
setz bpl
cmp r14b, bpl
jz short loc_1EAE0
xor ebp, ebp
and ebx, 8
setz bpl
mov r14d, ebx
shr r14d, 3
add r8d, r14d
inc r11
cmp ecx, r11d
jnz short loc_1EA88
test bl, bl
setnz r10b
jmp short loc_1EACA
loc_1EAC2:
mov r10b, 1
xor ecx, ecx
xor r8d, r8d
loc_1EACA:
mov r9d, 0
test r10b, r10b
jz short loc_1EAE2
mov byte ptr [rdi+20h], 1
mov eax, ecx
mov r9d, r8d
jmp short loc_1EAE2
loc_1EAE0:
xor eax, eax
loc_1EAE2:
mov [rsi], eax
mov [rdx], r9d
pop rbx
pop r14
pop rbp
retn
|
long long ft_stroke_border_get_counts(unsigned int *a1, _DWORD *a2, _DWORD *a3)
{
unsigned int v3; // ecx
long long result; // rax
int v5; // r9d
long long v6; // r11
BOOL v7; // ebp
int v8; // r8d
char v9; // bl
unsigned int v10; // ebx
bool v11; // r10
v3 = *a1;
result = 0LL;
if ( *a1 )
{
v5 = 0;
v6 = 0LL;
v7 = 0;
v8 = 0;
while ( 1 )
{
v9 = *(_BYTE *)(*((_QWORD *)a1 + 2) + v6);
if ( ((v9 & 4) == 0) == !v7 )
break;
v10 = v9 & 8;
v7 = v10 == 0;
v8 += v10 >> 3;
if ( v3 == (_DWORD)++v6 )
{
v11 = (_BYTE)v10 != 0;
goto LABEL_7;
}
}
result = 0LL;
}
else
{
v11 = 1;
v3 = 0;
v8 = 0;
LABEL_7:
v5 = 0;
if ( v11 )
{
*((_BYTE *)a1 + 32) = 1;
result = v3;
v5 = v8;
}
}
*a2 = result;
*a3 = v5;
return result;
}
|
ft_stroke_border_get_counts:
PUSH RBP
PUSH R14
PUSH RBX
MOV ECX,dword ptr [RDI]
XOR EAX,EAX
TEST RCX,RCX
JZ 0x0011eac2
MOV R10,qword ptr [RDI + 0x10]
XOR R9D,R9D
XOR R11D,R11D
XOR EBP,EBP
XOR R8D,R8D
LAB_0011ea88:
MOVZX EBX,byte ptr [R10 + R11*0x1]
TEST BL,0x4
SETZ R14B
TEST EBP,EBP
SETZ BPL
CMP R14B,BPL
JZ 0x0011eae0
XOR EBP,EBP
AND EBX,0x8
SETZ BPL
MOV R14D,EBX
SHR R14D,0x3
ADD R8D,R14D
INC R11
CMP ECX,R11D
JNZ 0x0011ea88
TEST BL,BL
SETNZ R10B
JMP 0x0011eaca
LAB_0011eac2:
MOV R10B,0x1
XOR ECX,ECX
XOR R8D,R8D
LAB_0011eaca:
MOV R9D,0x0
TEST R10B,R10B
JZ 0x0011eae2
MOV byte ptr [RDI + 0x20],0x1
MOV EAX,ECX
MOV R9D,R8D
JMP 0x0011eae2
LAB_0011eae0:
XOR EAX,EAX
LAB_0011eae2:
MOV dword ptr [RSI],EAX
MOV dword ptr [RDX],R9D
POP RBX
POP R14
POP RBP
RET
|
void ft_stroke_border_get_counts(int *param_1,int *param_2,int *param_3)
{
byte bVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
long lVar6;
bool bVar7;
iVar3 = *param_1;
if (iVar3 == 0) {
bVar7 = true;
iVar3 = 0;
iVar4 = 0;
}
else {
iVar5 = 0;
lVar6 = 0;
bVar7 = false;
iVar4 = 0;
do {
bVar1 = *(byte *)(*(long *)(param_1 + 4) + lVar6);
if (((bVar1 & 4) == 0) == !bVar7) {
iVar2 = 0;
goto LAB_0011eae2;
}
bVar7 = (bVar1 & 8) == 0;
iVar4 = iVar4 + ((bVar1 & 8) >> 3);
lVar6 = lVar6 + 1;
} while (iVar3 != (int)lVar6);
bVar7 = (char)(bVar1 & 8) != '\0';
}
iVar2 = 0;
iVar5 = 0;
if (bVar7) {
*(int1 *)(param_1 + 8) = 1;
iVar2 = iVar3;
iVar5 = iVar4;
}
LAB_0011eae2:
*param_2 = iVar2;
*param_3 = iVar5;
return;
}
|
|
18,785
|
inline_mysql_file_create_with_symlink
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline File
inline_mysql_file_create_with_symlink(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *linkname, const char *filename, int create_flags,
int access_flags, myf flags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
flags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
flags);
return file;
}
|
O3
|
c
|
inline_mysql_file_create_with_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movl %r8d, %r14d
movq %rcx, %r15
movq %rdx, %r12
movl %esi, -0x2c(%rbp)
movl %edi, %esi
leaq 0x340ad8(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x80(%rbp), %rdi
leaq -0x38(%rbp), %r13
xorl %edx, %edx
movq %r13, %r8
callq *0x148(%rax)
movq %rax, (%r13)
testq %rax, %rax
jne 0x4557d
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %r14d, %ecx
movq %rbx, %r8
callq 0xa0c24
movl %eax, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x340a8c(%rip), %r13 # 0x386010
movq (%r13), %rcx
leaq 0x9405e(%rip), %rsi # 0xd95ed
movq %rax, %rdi
movl -0x2c(%rbp), %edx
callq *0x1f0(%rcx)
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %r14d, %ecx
movq %rbx, %r8
callq 0xa0c24
movl %eax, %ebx
movq (%r13), %rax
movq -0x38(%rbp), %rdi
movl %ebx, %esi
callq *0x200(%rax)
jmp 0x4556c
|
inline_mysql_file_create_with_symlink:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, r9
mov r14d, r8d
mov r15, rcx
mov r12, rdx
mov [rbp+var_2C], esi
mov esi, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_80]
lea r13, [rbp+var_38]
xor edx, edx
mov r8, r13
call qword ptr [rax+148h]
mov [r13+0], rax
test rax, rax
jnz short loc_4557D
mov rdi, r12
mov rsi, r15
xor edx, edx
mov ecx, r14d
mov r8, rbx
call my_create_with_symlink
mov ebx, eax
loc_4556C:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4557D:
lea r13, PSI_server
mov rcx, [r13+0]
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, [rbp+var_2C]
call qword ptr [rcx+1F0h]
mov rdi, r12
mov rsi, r15
xor edx, edx
mov ecx, r14d
mov r8, rbx
call my_create_with_symlink
mov ebx, eax
mov rax, [r13+0]
mov rdi, [rbp+var_38]
mov esi, ebx
call qword ptr [rax+200h]
jmp short loc_4556C
|
long long inline_mysql_file_create_with_symlink(
unsigned int a1,
unsigned int a2,
long long a3,
long long a4,
unsigned int a5,
long long a6)
{
long long v10; // rax
_BYTE v12[72]; // [rsp+0h] [rbp-80h] BYREF
long long v13; // [rsp+48h] [rbp-38h] BYREF
unsigned int v14; // [rsp+54h] [rbp-2Ch]
v14 = a2;
v10 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(v12, a1, 0LL, a4, &v13);
v13 = v10;
if ( v10 )
{
((void ( *)(long long, const char *, _QWORD))PSI_server[62])(
v10,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
v14);
a6 = (unsigned int)my_create_with_symlink(a3, a4, 0LL, a5, a6);
((void ( *)(long long, long long))PSI_server[64])(v13, a6);
}
else
{
LODWORD(a6) = my_create_with_symlink(a3, a4, 0LL, a5, a6);
}
return (unsigned int)a6;
}
|
inline_mysql_file_create_with_symlink:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,R9
MOV R14D,R8D
MOV R15,RCX
MOV R12,RDX
MOV dword ptr [RBP + -0x2c],ESI
MOV ESI,EDI
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x80]
LEA R13,[RBP + -0x38]
XOR EDX,EDX
MOV R8,R13
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R13],RAX
TEST RAX,RAX
JNZ 0x0014557d
MOV RDI,R12
MOV RSI,R15
XOR EDX,EDX
MOV ECX,R14D
MOV R8,RBX
CALL 0x001a0c24
MOV EBX,EAX
LAB_0014556c:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014557d:
LEA R13,[0x486010]
MOV RCX,qword ptr [R13]
LEA RSI,[0x1d95ed]
MOV RDI,RAX
MOV EDX,dword ptr [RBP + -0x2c]
CALL qword ptr [RCX + 0x1f0]
MOV RDI,R12
MOV RSI,R15
XOR EDX,EDX
MOV ECX,R14D
MOV R8,RBX
CALL 0x001a0c24
MOV EBX,EAX
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,EBX
CALL qword ptr [RAX + 0x200]
JMP 0x0014556c
|
int4
inline_mysql_file_create_with_symlink
(int4 param_1,int4 param_2,int8 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
int4 uVar1;
int1 local_88 [72];
long local_40;
int4 local_34;
local_34 = param_2;
local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_4,&local_40);
if (local_40 == 0) {
uVar1 = my_create_with_symlink(param_3,param_4,0,param_5,param_6);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_40,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
local_34);
uVar1 = my_create_with_symlink(param_3,param_4,0,param_5,param_6);
(**(code **)(PSI_server + 0x200))(local_40,uVar1);
}
return uVar1;
}
|
|
18,786
|
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);
}
|
O3
|
c
|
my_fwrite:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x30(%rbp)
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
callq 0x33530
movq %rax, %r13
movl $0x1, %esi
movq %rbx, -0x48(%rbp)
movq %rbx, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x33670
cmpq %r12, %rax
jne 0x3e0cb
movq $0x0, -0x38(%rbp)
jmp 0x3e163
movq %rax, %r15
movq $0x0, -0x38(%rbp)
callq 0x33050
movq %rax, -0x40(%rbp)
movq %r14, %rbx
movq -0x40(%rbp), %rax
movl (%rax), %r14d
callq 0x3814e
movl %r14d, (%rax)
movq %r13, %rsi
cmpq $-0x1, %r15
je 0x3e108
addq %r15, %rsi
addq %r15, -0x48(%rbp)
addq %r15, -0x38(%rbp)
subq %r15, %r12
movq -0x40(%rbp), %rax
cmpl $0x4, (%rax)
movq %rbx, %r14
movq %rbx, %rdi
jne 0x3e14b
movq %rsi, %r13
xorl %edx, %edx
callq 0x335e0
testl %eax, %eax
jne 0x3e12d
movq %r14, %rdi
callq 0x33530
movl $0x1, %esi
movq -0x48(%rbp), %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x33670
movq %rax, %r15
cmpq %r12, %rax
jne 0x3e0df
jmp 0x3e163
callq 0x33640
testl %eax, %eax
sete %al
testb $0x6, -0x30(%rbp)
sete %cl
movq %r15, %r12
testb %al, %cl
je 0x3e183
addq -0x38(%rbp), %r12
xorl %ebx, %ebx
testb $0x6, -0x30(%rbp)
cmoveq %r12, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %rbx
testb $0x1a, -0x30(%rbp)
je 0x3e171
movq %r14, %rdi
callq 0x33310
movl %eax, %edi
callq 0x40a20
movq -0x40(%rbp), %rcx
movl (%rcx), %ecx
movl $0x4, %esi
movl $0x3, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x34b43
jmp 0x3e171
|
my_fwrite:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_30], rcx
mov r12, rdx
mov rbx, rsi
mov r14, rdi
call _ftello64
mov r13, rax
mov esi, 1
mov [rbp+var_48], rbx
mov rdi, rbx
mov rdx, r12
mov rcx, r14
call _fwrite
cmp rax, r12
jnz short loc_3E0CB
mov [rbp+var_38], 0
jmp loc_3E163
loc_3E0CB:
mov r15, rax
mov [rbp+var_38], 0
call ___errno_location
mov [rbp+var_40], rax
loc_3E0DF:
mov rbx, r14
mov rax, [rbp+var_40]
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
mov rsi, r13
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_3E108
add rsi, r15
add [rbp+var_48], r15
add [rbp+var_38], r15
sub r12, r15
loc_3E108:
mov rax, [rbp+var_40]
cmp dword ptr [rax], 4
mov r14, rbx
mov rdi, rbx
jnz short loc_3E14B
mov r13, rsi
xor edx, edx
call _fseeko64
test eax, eax
jnz short loc_3E12D
mov rdi, r14
call _ftello64
loc_3E12D:
mov esi, 1
mov rdi, [rbp+var_48]
mov rdx, r12
mov rcx, r14
call _fwrite
mov r15, rax
cmp rax, r12
jnz short loc_3E0DF
jmp short loc_3E163
loc_3E14B:
call _ferror
test eax, eax
setz al
test byte ptr [rbp+var_30], 6
setz cl
mov r12, r15
test cl, al
jz short loc_3E183
loc_3E163:
add r12, [rbp+var_38]
xor ebx, ebx
test byte ptr [rbp+var_30], 6
cmovz rbx, r12
loc_3E171:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3E183:
mov rbx, 0FFFFFFFFFFFFFFFFh
test byte ptr [rbp+var_30], 1Ah
jz short loc_3E171
mov rdi, r14
call _fileno
mov edi, eax
call my_filename
mov rcx, [rbp+var_40]
mov ecx, [rcx]
mov esi, 4
mov edi, 3
mov rdx, rax
xor eax, eax
call my_error
jmp short loc_3E171
|
long long my_fwrite(long long a1, long long a2, long long a3, char a4)
{
long long v5; // r14
long long v6; // r13
long long v7; // rax
long long v8; // r15
long long v9; // rbx
unsigned int v10; // r14d
long long v11; // rsi
long long v12; // r12
long long v13; // rbx
unsigned int v15; // eax
long long v16; // rax
long long v17; // [rsp+8h] [rbp-48h]
unsigned int *v18; // [rsp+10h] [rbp-40h]
long long v19; // [rsp+18h] [rbp-38h]
v5 = a1;
v6 = ((long long (*)(void))ftello64)();
v17 = a2;
v7 = fwrite(a2, 1LL, a3, a1);
if ( v7 == a3 )
{
v19 = 0LL;
LABEL_12:
v12 = v19 + a3;
v13 = 0LL;
if ( (a4 & 6) == 0 )
return v12;
return v13;
}
v8 = v7;
v19 = 0LL;
v18 = (unsigned int *)__errno_location(a2);
while ( 1 )
{
v9 = v5;
v10 = *v18;
*(_DWORD *)my_thread_var() = v10;
v11 = v6;
if ( v8 != -1 )
{
v11 = v8 + v6;
v17 += v8;
v19 += v8;
a3 -= v8;
}
v5 = v9;
if ( *v18 != 4 )
break;
v6 = v11;
if ( !(unsigned int)fseeko64(v9, v11, 0LL) )
ftello64(v9);
v8 = fwrite(v17, 1LL, a3, v9);
if ( v8 == a3 )
goto LABEL_12;
}
a3 = v8;
if ( (unsigned int)ferror(v9) == 0 && (a4 & 6) == 0 )
goto LABEL_12;
v13 = -1LL;
if ( (a4 & 0x1A) != 0 )
{
v15 = fileno(v5);
v16 = my_filename(v15);
my_error(3u, 4LL, v16, *v18);
}
return v13;
}
|
my_fwrite:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x30],RCX
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
CALL 0x00133530
MOV R13,RAX
MOV ESI,0x1
MOV qword ptr [RBP + -0x48],RBX
MOV RDI,RBX
MOV RDX,R12
MOV RCX,R14
CALL 0x00133670
CMP RAX,R12
JNZ 0x0013e0cb
MOV qword ptr [RBP + -0x38],0x0
JMP 0x0013e163
LAB_0013e0cb:
MOV R15,RAX
MOV qword ptr [RBP + -0x38],0x0
CALL 0x00133050
MOV qword ptr [RBP + -0x40],RAX
LAB_0013e0df:
MOV RBX,R14
MOV RAX,qword ptr [RBP + -0x40]
MOV R14D,dword ptr [RAX]
CALL 0x0013814e
MOV dword ptr [RAX],R14D
MOV RSI,R13
CMP R15,-0x1
JZ 0x0013e108
ADD RSI,R15
ADD qword ptr [RBP + -0x48],R15
ADD qword ptr [RBP + -0x38],R15
SUB R12,R15
LAB_0013e108:
MOV RAX,qword ptr [RBP + -0x40]
CMP dword ptr [RAX],0x4
MOV R14,RBX
MOV RDI,RBX
JNZ 0x0013e14b
MOV R13,RSI
XOR EDX,EDX
CALL 0x001335e0
TEST EAX,EAX
JNZ 0x0013e12d
MOV RDI,R14
CALL 0x00133530
LAB_0013e12d:
MOV ESI,0x1
MOV RDI,qword ptr [RBP + -0x48]
MOV RDX,R12
MOV RCX,R14
CALL 0x00133670
MOV R15,RAX
CMP RAX,R12
JNZ 0x0013e0df
JMP 0x0013e163
LAB_0013e14b:
CALL 0x00133640
TEST EAX,EAX
SETZ AL
TEST byte ptr [RBP + -0x30],0x6
SETZ CL
MOV R12,R15
TEST CL,AL
JZ 0x0013e183
LAB_0013e163:
ADD R12,qword ptr [RBP + -0x38]
XOR EBX,EBX
TEST byte ptr [RBP + -0x30],0x6
CMOVZ RBX,R12
LAB_0013e171:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013e183:
MOV RBX,-0x1
TEST byte ptr [RBP + -0x30],0x1a
JZ 0x0013e171
MOV RDI,R14
CALL 0x00133310
MOV EDI,EAX
CALL 0x00140a20
MOV RCX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RCX]
MOV ESI,0x4
MOV EDI,0x3
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00134b43
JMP 0x0013e171
|
long my_fwrite(FILE *param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
__off64_t __off;
size_t sVar2;
int *piVar3;
int *piVar4;
int8 uVar5;
long lVar6;
void *local_50;
long local_40;
__off = ftello64(param_1);
sVar2 = fwrite(param_2,1,param_3,param_1);
if (sVar2 == param_3) {
local_40 = 0;
}
else {
local_40 = 0;
piVar3 = __errno_location();
local_50 = param_2;
do {
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if (sVar2 != 0xffffffffffffffff) {
__off = __off + sVar2;
local_50 = (void *)((long)local_50 + sVar2);
local_40 = local_40 + sVar2;
param_3 = param_3 - sVar2;
}
if (*piVar3 != 4) {
iVar1 = ferror(param_1);
param_3 = sVar2;
if ((param_4 & 6) != 0 || iVar1 != 0) {
if ((param_4 & 0x1a) == 0) {
return -1;
}
iVar1 = fileno(param_1);
uVar5 = my_filename(iVar1);
my_error(3,4,uVar5,*piVar3);
return -1;
}
break;
}
iVar1 = fseeko64(param_1,__off,0);
if (iVar1 == 0) {
ftello64(param_1);
}
sVar2 = fwrite(local_50,1,param_3,param_1);
} while (sVar2 != param_3);
}
lVar6 = 0;
if ((param_4 & 6) == 0) {
lVar6 = param_3 + local_40;
}
return lVar6;
}
|
|
18,787
|
free_block
|
eloqsql/mysys/mf_keycache.c
|
static void free_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block)
{
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block",
("block %u to be freed, hash_link %p status: %u",
BLOCK_NUMBER(block), block->hash_link,
block->status));
/*
Assert that the block is not free already. And that it is in a clean
state. Note that the block might just be assigned to a hash_link and
not yet read (BLOCK_READ may not be set here). In this case a reader
is registered in the hash_link and free_block() will wait for it
below.
*/
DBUG_ASSERT((block->status & BLOCK_IN_USE) &&
!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
BLOCK_REASSIGNED | BLOCK_IN_FLUSH |
BLOCK_CHANGED | BLOCK_FOR_UPDATE)));
/* Assert that the block is in a file_blocks chain. */
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
/* Assert that the block is not in the LRU ring. */
DBUG_ASSERT(!block->next_used && !block->prev_used);
/*
IMHO the below condition (if()) makes no sense. I can't see how it
could be possible that free_block() is entered with a NULL hash_link
pointer. The only place where it can become NULL is in free_block()
(or before its first use ever, but for those blocks free_block() is
not called). I don't remove the conditional as it cannot harm, but
place an DBUG_ASSERT to confirm my hypothesis. Eventually the
condition (if()) can be removed.
*/
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
if (block->hash_link)
{
/*
While waiting for readers to finish, new readers might request the
block. But since we set block->status|= BLOCK_REASSIGNED, they
will wait on block->wqueue[COND_FOR_SAVED]. They must be signalled
later.
*/
block->status|= BLOCK_REASSIGNED;
wait_for_readers(keycache, block);
/*
The block must not have been freed by another thread. Repeat some
checks. An additional requirement is that it must be read now
(BLOCK_READ).
*/
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
DBUG_ASSERT((block->status & (BLOCK_READ | BLOCK_IN_USE |
BLOCK_REASSIGNED)) &&
!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
BLOCK_IN_FLUSH | BLOCK_CHANGED |
BLOCK_FOR_UPDATE)));
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
DBUG_ASSERT(!block->prev_used);
/*
Unset BLOCK_REASSIGNED again. If we hand the block to an evicting
thread (through unreg_request() below), other threads must not see
this flag. They could become confused.
*/
block->status&= ~BLOCK_REASSIGNED;
/*
Do not release the hash_link until the block is off all lists.
At least not if we hand it over for eviction in unreg_request().
*/
}
/*
Unregister the block request and link the block into the LRU ring.
This enables eviction for the block. If the LRU ring was empty and
threads are waiting for a block, then the block wil be handed over
for eviction immediately. Otherwise we will unlink it from the LRU
ring again, without releasing the lock in between. So decrementing
the request counter and updating statistics are the only relevant
operation in this case. Assert that there are no other requests
registered.
*/
DBUG_ASSERT(block->requests == 1);
unreg_request(keycache, block, 0);
/*
Note that even without releasing the cache lock it is possible that
the block is immediately selected for eviction by link_block() and
thus not added to the LRU ring. In this case we must not touch the
block any more.
*/
if (block->status & BLOCK_IN_EVICTION)
return;
/* Error blocks are not put into the LRU ring. */
if (!(block->status & BLOCK_ERROR))
{
/* Here the block must be in the LRU ring. Unlink it again. */
DBUG_ASSERT(block->next_used && block->prev_used &&
*block->prev_used == block);
unlink_block(keycache, block);
}
if (block->temperature == BLOCK_WARM)
keycache->warm_blocks--;
block->temperature= BLOCK_COLD;
/* Remove from file_blocks hash. */
unlink_changed(block);
/* Remove reference to block from hash table. */
unlink_hash(keycache, block->hash_link);
block->hash_link= NULL;
block->status= 0;
block->length= 0;
block->offset= keycache->key_cache_block_size;
KEYCACHE_THREAD_TRACE("free block");
KEYCACHE_DBUG_PRINT("free_block", ("block is freed"));
/* Enforced by unlink_changed(), but just to be sure. */
DBUG_ASSERT(!block->next_changed && !block->prev_changed);
/* Enforced by unlink_block(): not in LRU ring nor in free_block_list. */
DBUG_ASSERT(!block->next_used && !block->prev_used);
/* Insert the free block in the free list. */
block->next_used= keycache->free_block_list;
keycache->free_block_list= block;
/* Keep track of the number of currently unused blocks. */
keycache->blocks_unused++;
/* All pending requests for this page must be resubmitted. */
release_whole_queue(&block->wqueue[COND_FOR_SAVED]);
}
|
O3
|
c
|
free_block:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x20(%rsi)
je 0x981db
orb $0x8, 0x50(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x98a33
andb $-0x9, 0x50(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x980ac
movl 0x50(%rbx), %eax
testb %al, %al
js 0x98226
testb $0x1, %al
jne 0x981fe
movq %r14, %rdi
movq %rbx, %rsi
callq 0x98abc
cmpl $0x1, 0x54(%rbx)
jne 0x98208
decq 0x68(%r14)
movl $0x0, 0x54(%rbx)
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rax
testq %rcx, %rcx
je 0x9822b
movq %rax, 0x18(%rcx)
movq 0x10(%rbx), %rcx
jmp 0x9822d
popq %rbx
popq %r14
popq %rbp
retq
xorl %ecx, %ecx
movq %rcx, (%rax)
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x987d1
xorl %eax, %eax
movq %rax, 0x20(%rbx)
movq %rax, 0x4c(%rbx)
movl 0x18(%r14), %eax
movl %eax, 0x48(%rbx)
movq 0x98(%r14), %rax
movq %rax, (%rbx)
movq %rbx, 0x98(%r14)
incq 0x58(%r14)
addq $0x30, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x989b9
|
free_block_0:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
cmp qword ptr [rsi+20h], 0
jz short loc_981DB
or byte ptr [rbx+50h], 8
mov rdi, r14
mov rsi, rbx
call wait_for_readers_0
and byte ptr [rbx+50h], 0F7h
loc_981DB:
mov rdi, r14
mov rsi, rbx
xor edx, edx
call unreg_request_0
mov eax, [rbx+50h]
test al, al
js short loc_98226
test al, 1
jnz short loc_981FE
mov rdi, r14
mov rsi, rbx
call unlink_block_0
loc_981FE:
cmp dword ptr [rbx+54h], 1
jnz short loc_98208
dec qword ptr [r14+68h]
loc_98208:
mov dword ptr [rbx+54h], 0
mov rcx, [rbx+10h]
mov rax, [rbx+18h]
test rcx, rcx
jz short loc_9822B
mov [rcx+18h], rax
mov rcx, [rbx+10h]
jmp short loc_9822D
loc_98226:
pop rbx
pop r14
pop rbp
retn
loc_9822B:
xor ecx, ecx
loc_9822D:
mov [rax], rcx
mov rsi, [rbx+20h]
mov rdi, r14
call unlink_hash_0
xor eax, eax
mov [rbx+20h], rax
mov [rbx+4Ch], rax
mov eax, [r14+18h]
mov [rbx+48h], eax
mov rax, [r14+98h]
mov [rbx], rax
mov [r14+98h], rbx
inc qword ptr [r14+58h]
add rbx, 30h ; '0'
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp release_whole_queue
|
long long free_block_0(long long a1, long long a2)
{
long long v2; // rdx
long long result; // rax
long long v4; // rcx
_QWORD *v5; // rax
long long v6; // rcx
if ( *(_QWORD *)(a2 + 32) )
{
*(_BYTE *)(a2 + 80) |= 8u;
wait_for_readers_0(a1, a2);
*(_BYTE *)(a2 + 80) &= ~8u;
}
unreg_request_0((_QWORD *)a1, a2, 0LL);
result = *(unsigned int *)(a2 + 80);
if ( (result & 0x80u) == 0LL )
{
if ( (result & 1) == 0 )
unlink_block_0(a1, a2, v2);
if ( *(_DWORD *)(a2 + 84) == 1 )
--*(_QWORD *)(a1 + 104);
*(_DWORD *)(a2 + 84) = 0;
v4 = *(_QWORD *)(a2 + 16);
v5 = *(_QWORD **)(a2 + 24);
if ( v4 )
{
*(_QWORD *)(v4 + 24) = v5;
v6 = *(_QWORD *)(a2 + 16);
}
else
{
v6 = 0LL;
}
*v5 = v6;
unlink_hash_0(a1, *(_QWORD *)(a2 + 32));
*(_QWORD *)(a2 + 32) = 0LL;
*(_QWORD *)(a2 + 76) = 0LL;
*(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 24);
*(_QWORD *)a2 = *(_QWORD *)(a1 + 152);
*(_QWORD *)(a1 + 152) = a2;
++*(_QWORD *)(a1 + 88);
return release_whole_queue(a2 + 48);
}
return result;
}
|
free_block:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CMP qword ptr [RSI + 0x20],0x0
JZ 0x001981db
OR byte ptr [RBX + 0x50],0x8
MOV RDI,R14
MOV RSI,RBX
CALL 0x00198a33
AND byte ptr [RBX + 0x50],0xf7
LAB_001981db:
MOV RDI,R14
MOV RSI,RBX
XOR EDX,EDX
CALL 0x001980ac
MOV EAX,dword ptr [RBX + 0x50]
TEST AL,AL
JS 0x00198226
TEST AL,0x1
JNZ 0x001981fe
MOV RDI,R14
MOV RSI,RBX
CALL 0x00198abc
LAB_001981fe:
CMP dword ptr [RBX + 0x54],0x1
JNZ 0x00198208
DEC qword ptr [R14 + 0x68]
LAB_00198208:
MOV dword ptr [RBX + 0x54],0x0
MOV RCX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x0019822b
MOV qword ptr [RCX + 0x18],RAX
MOV RCX,qword ptr [RBX + 0x10]
JMP 0x0019822d
LAB_00198226:
POP RBX
POP R14
POP RBP
RET
LAB_0019822b:
XOR ECX,ECX
LAB_0019822d:
MOV qword ptr [RAX],RCX
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,R14
CALL 0x001987d1
XOR EAX,EAX
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x4c],RAX
MOV EAX,dword ptr [R14 + 0x18]
MOV dword ptr [RBX + 0x48],EAX
MOV RAX,qword ptr [R14 + 0x98]
MOV qword ptr [RBX],RAX
MOV qword ptr [R14 + 0x98],RBX
INC qword ptr [R14 + 0x58]
ADD RBX,0x30
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x001989b9
|
void free_block(long param_1,int8 *param_2)
{
int8 *puVar1;
int8 uVar2;
if (param_2[4] != 0) {
*(byte *)(param_2 + 10) = *(byte *)(param_2 + 10) | 8;
wait_for_readers(param_1,param_2);
*(byte *)(param_2 + 10) = *(byte *)(param_2 + 10) & 0xf7;
}
unreg_request(param_1,param_2,0);
if (-1 < (char)*(uint *)(param_2 + 10)) {
if ((*(uint *)(param_2 + 10) & 1) == 0) {
unlink_block(param_1,param_2);
}
if (*(int *)((long)param_2 + 0x54) == 1) {
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + -1;
}
*(int4 *)((long)param_2 + 0x54) = 0;
puVar1 = (int8 *)param_2[3];
if (param_2[2] == 0) {
uVar2 = 0;
}
else {
*(int8 **)(param_2[2] + 0x18) = puVar1;
uVar2 = param_2[2];
}
*puVar1 = uVar2;
unlink_hash(param_1,param_2[4]);
param_2[4] = 0;
*(int8 *)((long)param_2 + 0x4c) = 0;
*(int4 *)(param_2 + 9) = *(int4 *)(param_1 + 0x18);
*param_2 = *(int8 *)(param_1 + 0x98);
*(int8 **)(param_1 + 0x98) = param_2;
*(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1;
release_whole_queue(param_2 + 6);
return;
}
return;
}
|
|
18,788
|
stbi_load_16
|
SDL3Lite/dependencies/stb_image.h
|
STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp)
{
FILE *f = stbi__fopen(filename, "rb");
stbi__uint16 *result;
if (!f) return (stbi_us *) stbi__errpuc("can't fopen", "Unable to open file");
result = stbi_load_from_file_16(f,x,y,comp,req_comp);
fclose(f);
return result;
}
|
O0
|
c
|
stbi_load_16:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xbce1(%rip), %rsi # 0x33fb8
callq 0x27e70
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x28304
leaq 0xbccd(%rip), %rdi # 0x33fbb
callq 0x27ea0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x28332
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
callq 0x280d0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x1a270
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
stbi_load_16:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov rdi, [rbp+var_10]; char *
lea rsi, aRb; "rb"
call _ZL11stbi__fopenPKcS0_; stbi__fopen(char const*,char const*)
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_28304
lea rdi, aCanTFopen; "can't fopen"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rbp+var_8], rax
jmp short loc_28332
loc_28304:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8d, [rbp+var_2C]
call stbi_load_from_file_16
mov [rbp+var_40], rax
mov rdi, [rbp+var_38]
call _fclose
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_28332:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long stbi_load_16(const char *a1, long long a2, long long a3, long long a4, unsigned int a5)
{
long long v6; // [rsp+0h] [rbp-40h]
long long v7; // [rsp+8h] [rbp-38h]
v7 = stbi__fopen(a1, "rb");
if ( v7 )
{
v6 = stbi_load_from_file_16(v7, a2, a3, a4, a5);
fclose(v7);
return v6;
}
else
{
stbi__err("can't fopen");
return 0LL;
}
}
|
stbi_load_16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x133fb8]
CALL 0x00127e70
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00128304
LEA RDI,[0x133fbb]
CALL 0x00127ea0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00128332
LAB_00128304:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RBP + -0x2c]
CALL 0x001280d0
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x0011a270
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00128332:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8
stbi_load_16(char *param_1,int8 param_2,int8 param_3,int8 param_4,
int4 param_5)
{
FILE *__stream;
int8 local_10;
__stream = (FILE *)stbi__fopen(param_1,"rb");
if (__stream == (FILE *)0x0) {
stbi__err("can\'t fopen");
local_10 = 0;
}
else {
local_10 = stbi_load_from_file_16(__stream,param_2,param_3,param_4,param_5);
fclose(__stream);
}
return local_10;
}
|
|
18,789
|
my_strnxfrm_tis620_nopad
|
eloqsql/strings/ctype-tis620.c
|
static size_t
my_strnxfrm_tis620_nopad(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
len= my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + len, dst + dstlen,
(uint)(dstlen - len), flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
{
size_t fill_length= dstlen0 - len;
memset(dst + len, 0x00, fill_length);
len= dstlen0;
}
return len;
}
|
O3
|
c
|
my_strnxfrm_tis620_nopad:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movl %ecx, %r15d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
cmpq %r9, %rdx
cmovbq %rdx, %r12
movq %rsi, %rdi
movq %r8, %rsi
movq %r12, %rdx
callq 0x24270
movq %r14, %rdi
movq %r12, %rsi
callq 0x444db
movl %r15d, %r8d
cmpq %rbx, %r8
cmovaeq %rbx, %r8
cmpq %r8, %r12
cmovaeq %r8, %r12
leaq (%r14,%r12), %rdx
leaq (%r14,%r8), %rcx
subl %r12d, %r8d
movl $0x0, (%rsp)
movq %r13, %rdi
movq %r14, %rsi
movl 0x10(%rbp), %r15d
movl %r15d, %r9d
callq 0x4136e
testb %r15b, %r15b
jns 0x44673
movq %rbx, %rdx
subq %rax, %rdx
jbe 0x44673
addq %rax, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x24190
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
my_strnxfrm_tis620_nopad:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, r9
mov r15d, ecx
mov rbx, rdx
mov r14, rsi
mov r13, rdi
cmp rdx, r9
cmovb r12, rdx
mov rdi, rsi
mov rsi, r8
mov rdx, r12
call _memcpy
mov rdi, r14
mov rsi, r12
call thai2sortable
mov r8d, r15d
cmp r8, rbx
cmovnb r8, rbx
cmp r12, r8
cmovnb r12, r8
lea rdx, [r14+r12]
lea rcx, [r14+r8]
sub r8d, r12d
mov [rsp+30h+var_30], 0
mov rdi, r13
mov rsi, r14
mov r15d, [rbp+arg_0]
mov r9d, r15d
call my_strxfrm_pad_desc_and_reverse_nopad
test r15b, r15b
jns short loc_44673
mov rdx, rbx
sub rdx, rax
jbe short loc_44673
add r14, rax
mov rdi, r14
xor esi, esi
call _memset
mov rax, rbx
loc_44673:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long my_strnxfrm_tis620_nopad(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
long long a4,
long long a5,
unsigned long long a6,
unsigned int a7)
{
unsigned long long v7; // r12
unsigned int v8; // r15d
unsigned long long v10; // r8
unsigned long long result; // rax
v7 = a6;
v8 = a4;
if ( a3 < a6 )
v7 = a3;
memcpy(a2, a5, v7, a4, a5, a6);
thai2sortable(a2, v7);
v10 = v8;
if ( v8 >= a3 )
v10 = a3;
if ( v7 >= v10 )
v7 = v10;
result = my_strxfrm_pad_desc_and_reverse_nopad(
a1,
(long long)a2,
(unsigned long long)&a2[v7],
(unsigned long long)&a2[v10],
(int)v10 - (int)v7,
a7,
0);
if ( (a7 & 0x80u) != 0 && a3 > result )
{
memset(&a2[result], 0LL, a3 - result);
return a3;
}
return result;
}
|
my_strnxfrm_tis620_nopad:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R9
MOV R15D,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R13,RDI
CMP RDX,R9
CMOVC R12,RDX
MOV RDI,RSI
MOV RSI,R8
MOV RDX,R12
CALL 0x00124270
MOV RDI,R14
MOV RSI,R12
CALL 0x001444db
MOV R8D,R15D
CMP R8,RBX
CMOVNC R8,RBX
CMP R12,R8
CMOVNC R12,R8
LEA RDX,[R14 + R12*0x1]
LEA RCX,[R14 + R8*0x1]
SUB R8D,R12D
MOV dword ptr [RSP],0x0
MOV RDI,R13
MOV RSI,R14
MOV R15D,dword ptr [RBP + 0x10]
MOV R9D,R15D
CALL 0x0014136e
TEST R15B,R15B
JNS 0x00144673
MOV RDX,RBX
SUB RDX,RAX
JBE 0x00144673
ADD R14,RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00124190
MOV RAX,RBX
LAB_00144673:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strnxfrm_tis620_nopad
(int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,int4 param_7)
{
int8 in_RAX;
ulong uVar1;
uint uVar2;
uVar2 = (uint)((ulong)in_RAX >> 0x20);
if (param_3 < param_6) {
param_6 = param_3;
}
memcpy(param_2,param_5,param_6);
thai2sortable(param_2,param_6);
uVar1 = (ulong)param_4;
if (param_3 <= param_4) {
uVar1 = param_3;
}
if (uVar1 <= param_6) {
param_6 = uVar1;
}
uVar1 = my_strxfrm_pad_desc_and_reverse_nopad
(param_1,param_2,(long)param_2 + param_6,(long)param_2 + uVar1,
(int)uVar1 - (int)param_6,param_7,(ulong)uVar2 << 0x20);
if (((char)param_7 < '\0') && (uVar1 <= param_3 && param_3 - uVar1 != 0)) {
memset((void *)((long)param_2 + uVar1),0,param_3 - uVar1);
uVar1 = param_3;
}
return uVar1;
}
|
|
18,790
|
my_cset_init_8bit
|
eloqsql/strings/ctype-simple.c
|
static my_bool
my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
cs->state|= my_8bit_charset_flags_from_data(cs);
cs->caseup_multiply= 1;
cs->casedn_multiply= 1;
cs->pad_char= ' ';
if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni)
return TRUE;
return create_fromuni(cs, loader);
}
|
O0
|
c
|
my_cset_init_8bit:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x45570
movl %eax, %ecx
movq -0x10(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x94(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x95(%rax)
movq -0x10(%rbp), %rax
movb $0x20, 0xb0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x46332
movq -0x10(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x46332
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x46332
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x46338
movb $0x1, -0x1(%rbp)
jmp 0x46348
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x46420
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_cset_init_8bit:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
call my_8bit_charset_flags_from_data
mov ecx, eax
mov rax, [rbp+var_10]
or ecx, [rax+0Ch]
mov [rax+0Ch], ecx
mov rax, [rbp+var_10]
mov byte ptr [rax+94h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+95h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+0B0h], 20h ; ' '
mov rax, [rbp+var_10]
cmp qword ptr [rax+48h], 0
jz short loc_46332
mov rax, [rbp+var_10]
cmp qword ptr [rax+50h], 0
jz short loc_46332
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz short loc_46332
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_46338
loc_46332:
mov [rbp+var_1], 1
jmp short loc_46348
loc_46338:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call create_fromuni
mov [rbp+var_1], al
loc_46348:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char my_cset_init_8bit(long long a1, long long a2)
{
*(_DWORD *)(a1 + 12) |= my_8bit_charset_flags_from_data(a1);
*(_BYTE *)(a1 + 148) = 1;
*(_BYTE *)(a1 + 149) = 1;
*(_BYTE *)(a1 + 176) = 32;
if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && *(_QWORD *)(a1 + 64) && *(_QWORD *)(a1 + 104) )
return create_fromuni(a1, a2);
else
return 1;
}
|
my_cset_init_8bit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00145570
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
OR ECX,dword ptr [RAX + 0xc]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x94],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x95],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0xb0],0x20
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x00146332
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x00146332
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00146332
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x00146338
LAB_00146332:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00146348
LAB_00146338:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00146420
MOV byte ptr [RBP + -0x1],AL
LAB_00146348:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_cset_init_8bit(long param_1,int8 param_2)
{
uint uVar1;
int1 local_9;
uVar1 = my_8bit_charset_flags_from_data(param_1);
*(uint *)(param_1 + 0xc) = uVar1 | *(uint *)(param_1 + 0xc);
*(int1 *)(param_1 + 0x94) = 1;
*(int1 *)(param_1 + 0x95) = 1;
*(int1 *)(param_1 + 0xb0) = 0x20;
if ((((*(long *)(param_1 + 0x48) == 0) || (*(long *)(param_1 + 0x50) == 0)) ||
(*(long *)(param_1 + 0x40) == 0)) || (*(long *)(param_1 + 0x68) == 0)) {
local_9 = 1;
}
else {
local_9 = create_fromuni(param_1,param_2);
}
return local_9;
}
|
|
18,791
|
my_thread_init_common_mutex
|
eloqsql/mysys/my_thr_init.c
|
static void my_thread_init_common_mutex(void)
{
mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW);
mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, MY_MUTEX_INIT_FAST);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_init(key_LOCK_localtime_r, &LOCK_localtime_r, MY_MUTEX_INIT_SLOW);
#endif
}
|
O0
|
c
|
my_thread_init_common_mutex:
pushq %rbp
movq %rsp, %rbp
leaq 0xb8aa0d(%rip), %rax # 0xc4b668
movl (%rax), %edi
leaq 0xb8b3ec(%rip), %rsi # 0xc4c050
leaq 0xb8b6e5(%rip), %rdx # 0xc4c350
callq 0xc1960
leaq 0xb8a9dd(%rip), %rax # 0xc4b654
movl (%rax), %edi
leaq 0xb8b418(%rip), %rsi # 0xc4c098
leaq 0xb8b6c9(%rip), %rdx # 0xc4c350
callq 0xc1960
leaq 0xb8a9cd(%rip), %rax # 0xc4b660
movl (%rax), %edi
leaq 0xb8b444(%rip), %rsi # 0xc4c0e0
xorl %eax, %eax
movl %eax, %edx
callq 0xc1960
leaq 0xb8a9c8(%rip), %rax # 0xc4b674
movl (%rax), %edi
leaq 0xb8b473(%rip), %rsi # 0xc4c128
leaq 0xb8b694(%rip), %rdx # 0xc4c350
callq 0xc1960
leaq 0xb8a988(%rip), %rax # 0xc4b650
movl (%rax), %edi
leaq 0xb8b49f(%rip), %rsi # 0xc4c170
leaq 0xb8b678(%rip), %rdx # 0xc4c350
callq 0xc1960
leaq 0xb8a980(%rip), %rax # 0xc4b664
movl (%rax), %edi
leaq 0xb8b4cb(%rip), %rsi # 0xc4c1b8
leaq 0xb8b65c(%rip), %rdx # 0xc4c350
callq 0xc1960
leaq 0xb8a94c(%rip), %rax # 0xc4b64c
movl (%rax), %edi
leaq 0xb8b4f7(%rip), %rsi # 0xc4c200
leaq 0xb8b640(%rip), %rdx # 0xc4c350
callq 0xc1960
popq %rbp
retq
nopw (%rax,%rax)
|
my_thread_init_common_mutex:
push rbp
mov rbp, rsp
lea rax, key_THR_LOCK_open
mov edi, [rax]
lea rsi, THR_LOCK_open
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_8
lea rax, key_THR_LOCK_lock
mov edi, [rax]
lea rsi, THR_LOCK_lock
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_8
lea rax, key_THR_LOCK_myisam
mov edi, [rax]
lea rsi, THR_LOCK_myisam
xor eax, eax
mov edx, eax
call inline_mysql_mutex_init_8
lea rax, key_THR_LOCK_myisam_mmap
mov edi, [rax]
lea rsi, THR_LOCK_myisam_mmap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_8
lea rax, key_THR_LOCK_heap
mov edi, [rax]
lea rsi, THR_LOCK_heap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_8
lea rax, key_THR_LOCK_net
mov edi, [rax]
lea rsi, THR_LOCK_net
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_8
lea rax, key_THR_LOCK_charset
mov edi, [rax]
lea rsi, THR_LOCK_charset
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_8
pop rbp
retn
|
long long my_thread_init_common_mutex()
{
inline_mysql_mutex_init_8(key_THR_LOCK_open, &THR_LOCK_open, &my_fast_mutexattr);
inline_mysql_mutex_init_8(key_THR_LOCK_lock, &THR_LOCK_lock, &my_fast_mutexattr);
inline_mysql_mutex_init_8(key_THR_LOCK_myisam, &THR_LOCK_myisam, 0LL);
inline_mysql_mutex_init_8(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, &my_fast_mutexattr);
inline_mysql_mutex_init_8(key_THR_LOCK_heap, &THR_LOCK_heap, &my_fast_mutexattr);
inline_mysql_mutex_init_8(key_THR_LOCK_net, &THR_LOCK_net, &my_fast_mutexattr);
return inline_mysql_mutex_init_8(key_THR_LOCK_charset, &THR_LOCK_charset, &my_fast_mutexattr);
}
|
my_thread_init_common_mutex:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0xd4b668]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd4c050]
LEA RDX,[0xd4c350]
CALL 0x001c1960
LEA RAX,[0xd4b654]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd4c098]
LEA RDX,[0xd4c350]
CALL 0x001c1960
LEA RAX,[0xd4b660]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd4c0e0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001c1960
LEA RAX,[0xd4b674]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd4c128]
LEA RDX,[0xd4c350]
CALL 0x001c1960
LEA RAX,[0xd4b650]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd4c170]
LEA RDX,[0xd4c350]
CALL 0x001c1960
LEA RAX,[0xd4b664]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd4c1b8]
LEA RDX,[0xd4c350]
CALL 0x001c1960
LEA RAX,[0xd4b64c]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd4c200]
LEA RDX,[0xd4c350]
CALL 0x001c1960
POP RBP
RET
|
void my_thread_init_common_mutex(void)
{
inline_mysql_mutex_init(key_THR_LOCK_open,THR_LOCK_open,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_lock,THR_LOCK_lock,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_myisam,THR_LOCK_myisam,0);
inline_mysql_mutex_init(key_THR_LOCK_myisam_mmap,THR_LOCK_myisam_mmap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_heap,THR_LOCK_heap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_net,THR_LOCK_net,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_charset,THR_LOCK_charset,&my_fast_mutexattr);
return;
}
|
|
18,792
|
mi_calc_blob_length
|
eloqsql/storage/myisam/mi_dynrec.c
|
ulong _mi_calc_blob_length(uint length, const uchar *pos)
{
switch (length) {
case 1:
return (uint) (uchar) *pos;
case 2:
return (uint) uint2korr(pos);
case 3:
return uint3korr(pos);
case 4:
return uint4korr(pos);
default:
break;
}
return 0; /* Impossible */
}
|
O0
|
c
|
mi_calc_blob_length:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
ja 0xab142
movq -0x20(%rbp), %rax
leaq 0xae2a6(%rip), %rcx # 0x15938c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0xab14c
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0xab14c
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0xab14c
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0xab14c
jmp 0xab144
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_mi_calc_blob_length:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov eax, [rbp+var_C]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_20], rcx
sub eax, 3
ja short def_AB0ED; jumptable 00000000000AB0ED default case
mov rax, [rbp+var_20]
lea rcx, jpt_AB0ED
movsxd rax, ds:(jpt_AB0ED - 15938Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_AB0EF:
mov rax, [rbp+var_18]; jumptable 00000000000AB0ED case 1
movzx eax, byte ptr [rax]
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_AB14C
loc_AB0FE:
mov rax, [rbp+var_18]; jumptable 00000000000AB0ED case 2
movzx eax, word ptr [rax]
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_AB14C
loc_AB10D:
mov rax, [rbp+var_18]; jumptable 00000000000AB0ED case 3
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_AB14C
loc_AB136:
mov rax, [rbp+var_18]; jumptable 00000000000AB0ED case 4
mov eax, [rax]
mov [rbp+var_8], rax
jmp short loc_AB14C
def_AB0ED:
jmp short $+2; jumptable 00000000000AB0ED default case
loc_AB144:
mov [rbp+var_8], 0
loc_AB14C:
mov rax, [rbp+var_8]
pop rbp
retn
|
long long mi_calc_blob_length(int a1, unsigned __int8 *a2)
{
long long v3; // [rsp+18h] [rbp-8h]
switch ( a1 )
{
case 1:
v3 = *a2;
break;
case 2:
v3 = *(unsigned __int16 *)a2;
break;
case 3:
v3 = (a2[2] << 16) | (unsigned int)*(unsigned __int16 *)a2;
break;
case 4:
v3 = *(unsigned int *)a2;
break;
default:
v3 = 0LL;
break;
}
return v3;
}
|
_mi_calc_blob_length:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV EAX,dword ptr [RBP + -0xc]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x20],RCX
SUB EAX,0x3
JA 0x001ab142
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x25938c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ab14c
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ab14c
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ab14c
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ab14c
default:
JMP 0x001ab144
LAB_001ab144:
MOV qword ptr [RBP + -0x8],0x0
LAB_001ab14c:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
uint _mi_calc_blob_length(int4 param_1,uint *param_2)
{
uint uVar1;
switch(param_1) {
case 1:
uVar1 = (uint)(byte)*param_2;
break;
case 2:
uVar1 = (uint)(ushort)*param_2;
break;
case 3:
uVar1 = (uint)(uint3)*param_2;
break;
case 4:
uVar1 = *param_2;
break;
default:
uVar1 = 0;
}
return uVar1;
}
|
|
18,793
|
uf_varchar2
|
eloqsql/storage/maria/ma_packrec.c
|
static void uf_varchar2(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end __attribute__((unused)))
{
if (get_bit(bit_buff))
to[0]=to[1]=0; /* Zero lengths */
else
{
ulong length=get_bits(bit_buff,rec->space_length_bits);
int2store(to,length);
decode_bytes(rec,bit_buff,to+2,to+2+length);
}
}
|
O0
|
c
|
uf_varchar2:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x3ace7
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x3ad0b
jmp 0x3ad1f
movq -0x10(%rbp), %rdi
callq 0x39690
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0x3ad1f
movq -0x18(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
jmp 0x3adb5
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jb 0x3ad62
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %ecx
movl %ecx, %edx
leaq 0x282586(%rip), %rcx # 0x2bd2e0
andl (%rcx,%rdx,4), %eax
movl %eax, -0x34(%rbp)
jmp 0x3ad75
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x38e40
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x2, %rdx
movq -0x18(%rbp), %rcx
addq $0x2, %rcx
addq -0x28(%rbp), %rcx
callq 0x399d0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
uf_varchar2:
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_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_3ACE7
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_3AD0B
jmp short loc_3AD1F
loc_3ACE7:
mov rdi, [rbp+var_10]
call fill_buffer
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_3AD1F
loc_3AD0B:
mov rax, [rbp+var_18]
mov byte ptr [rax+1], 0
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
jmp loc_3ADB5
loc_3AD1F:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+24h]
jb short loc_3AD62
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+24h]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+24h]
mov edx, ecx
lea rcx, mask
and eax, [rcx+rdx*4]
mov [rbp+var_34], eax
jmp short loc_3AD75
loc_3AD62:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+24h]
call fill_and_get_bits
mov [rbp+var_34], eax
loc_3AD75:
mov eax, [rbp+var_34]
mov eax, eax
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov cx, ax
mov rax, [rbp+var_30]
mov [rax], cx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
add rdx, 2
mov rcx, [rbp+var_18]
add rcx, 2
add rcx, [rbp+var_28]
call decode_bytes
loc_3ADB5:
add rsp, 40h
pop rbp
retn
|
long long uf_varchar2(long long a1, int *a2, _BYTE *a3)
{
int v3; // eax
int v4; // ecx
long long result; // rax
unsigned int v6; // eax
int v7; // ecx
int bits; // [rsp+Ch] [rbp-34h]
if ( a2[1] )
{
v3 = *a2;
v4 = a2[1] - 1;
a2[1] = v4;
if ( ((1 << v4) & v3) == 0 )
goto LABEL_6;
LABEL_5:
a3[1] = 0;
result = (long long)a3;
*a3 = 0;
return result;
}
fill_buffer((long long)a2);
a2[1] = 31;
if ( *a2 < 0 )
goto LABEL_5;
LABEL_6:
if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) )
{
bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36));
}
else
{
v6 = *a2;
v7 = a2[1] - *(_DWORD *)(a1 + 36);
a2[1] = v7;
bits = mask[*(unsigned int *)(a1 + 36)] & (v6 >> v7);
}
*(_WORD *)a3 = bits;
return decode_bytes(a1, (long long)a2, a3 + 2, &a3[bits + 2]);
}
|
uf_varchar2:
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 qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x0013ace7
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x0013ad0b
JMP 0x0013ad1f
LAB_0013ace7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00139690
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x0013ad1f
LAB_0013ad0b:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x1],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
JMP 0x0013adb5
LAB_0013ad1f:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x24]
JC 0x0013ad62
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x24]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x24]
MOV EDX,ECX
LEA RCX,[0x3bd2e0]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0013ad75
LAB_0013ad62:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x24]
CALL 0x00138e40
MOV dword ptr [RBP + -0x34],EAX
LAB_0013ad75:
MOV EAX,dword ptr [RBP + -0x34]
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],CX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x2
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x2
ADD RCX,qword ptr [RBP + -0x28]
CALL 0x001399d0
LAB_0013adb5:
ADD RSP,0x40
POP RBP
RET
|
void uf_varchar2(long param_1,uint *param_2,int2 *param_3)
{
uint uVar1;
uint local_3c;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
if (param_2[1] < *(uint *)(param_1 + 0x24)) {
local_3c = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x24);
param_2[1] = uVar1;
local_3c = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4);
}
*param_3 = (short)local_3c;
decode_bytes(param_1,param_2,param_3 + 1,(int1 *)((long)param_3 + (ulong)local_3c + 2));
}
else {
*(int1 *)((long)param_3 + 1) = 0;
*(int1 *)param_3 = 0;
}
return;
}
|
|
18,794
|
testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd(testing::TestSuite const&)
|
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
void PrettyUnitTestResultPrinter::OnTestCaseEnd(const TestCase& test_case) {
if (!GTEST_FLAG_GET(print_time)) return;
const std::string counts =
FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
ColoredPrintf(GTestColor::kGreen, "[----------] ");
printf("%s from %s (%s ms total)\n\n", counts.c_str(), test_case.name(),
internal::StreamableToString(test_case.elapsed_time()).c_str());
fflush(stdout);
}
|
O1
|
cpp
|
testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd(testing::TestSuite const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
cmpb $0x1, 0x4136eed(%rip) # 0x415dea1
jne 0x27088
movq %rsi, %rbx
movq 0x30(%rsi), %rax
movq 0x38(%rsi), %rcx
xorl %esi, %esi
cmpq %rcx, %rax
je 0x26fde
movq (%rax), %rdx
movzbl 0x80(%rdx), %edx
addl %edx, %esi
addq $0x8, %rax
jmp 0x26fc7
leaq 0x1b510(%rip), %rdx # 0x424f5
leaq 0x1b91c(%rip), %rcx # 0x42908
leaq 0x8(%rsp), %rdi
callq 0x26bc4
leaq 0x1c55f(%rip), %rsi # 0x4355c
movl $0x2, %edi
xorl %eax, %eax
callq 0x26396
movq 0x8(%rsp), %r14
movq 0x8(%rbx), %r15
movq 0x80(%rbx), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x30(%rsp), %rdi
callq 0x37aa0
leaq 0x40(%rsp), %rbx
movq -0x10(%rbx), %rcx
leaq 0x1c59b(%rip), %rdi # 0x435d6
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x9080
movq -0x10(%rbx), %rdi
cmpq %rbx, %rdi
je 0x2705e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x32f1b(%rip), %rax # 0x59f80
movq (%rax), %rdi
callq 0x95f0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27088
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x27094
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x270b2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq %rbx, %rdi
callq 0x99a0
|
_ZN7testing8internal27PrettyUnitTestResultPrinter13OnTestCaseEndERKNS_9TestSuiteE:
push r15
push r14
push rbx
sub rsp, 50h
cmp cs:_ZN7testing22FLAGS_gtest_print_timeE, 1; testing::FLAGS_gtest_print_time
jnz loc_27088
mov rbx, rsi
mov rax, [rsi+30h]
mov rcx, [rsi+38h]
xor esi, esi; int
loc_26FC7:
cmp rax, rcx
jz short loc_26FDE
mov rdx, [rax]
movzx edx, byte ptr [rdx+80h]
add esi, edx
add rax, 8
jmp short loc_26FC7
loc_26FDE:
lea rdx, aDeathtestPasse+36h; int
lea rcx, aAlsoRunDisable+12h; int
lea rdi, [rsp+68h+var_60]; int
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
lea rsi, asc_4355C; "[----------] "
mov edi, 2
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
mov r14, qword ptr [rsp+68h+var_60]
mov r15, [rbx+8]
mov rax, [rbx+80h]
lea rsi, [rsp+68h+var_40]
mov [rsi], rax
lea rdi, [rsp+68h+var_38]
call _ZN7testing8internal18StreamableToStringIlEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<long>(long const&)
lea rbx, [rsp+68h+var_28]
mov rcx, [rbx-10h]
lea rdi, aSFromSSMsTotal; "%s from %s (%s ms total)\n\n"
mov rsi, r14
mov rdx, r15
xor eax, eax
call _printf
mov rdi, [rbx-10h]; void *
cmp rdi, rbx
jz short loc_2705E
mov rsi, [rsp+68h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2705E:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_27088
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27088:
add rsp, 50h
pop rbx
pop r14
pop r15
retn
jmp short $+2
loc_27094:
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_270B2
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_270B2:
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd(
testing::internal::PrettyUnitTestResultPrinter *this,
const testing::TestSuite *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v11; // rax
long long v12; // rcx
int v13; // esi
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
const char *v20; // r14
const char *v21; // r15
char v22; // [rsp+0h] [rbp-68h]
int v23[2]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v24[3]; // [rsp+18h] [rbp-50h] BYREF
char *v25; // [rsp+30h] [rbp-38h] BYREF
long long v26; // [rsp+40h] [rbp-28h] BYREF
if ( testing::FLAGS_gtest_print_time == 1 )
{
v11 = *((_QWORD *)a2 + 6);
v12 = *((_QWORD *)a2 + 7);
v13 = 0;
while ( v11 != v12 )
{
v13 += *(unsigned __int8 *)(*(_QWORD *)v11 + 128LL);
v11 += 8LL;
}
testing::FormatCountableNoun[abi:cxx11]((long long)v23, v13, "test", "tests");
testing::internal::ColoredPrintf(
2,
(long long)"[----------] ",
v14,
v15,
v16,
v17,
a3,
a4,
a5,
a6,
v18,
v19,
a9,
a10,
v22);
v20 = *(const char **)v23;
v21 = (const char *)*((_QWORD *)a2 + 1);
v24[2] = *((_QWORD *)a2 + 16);
testing::internal::StreamableToString<long>(&v25);
printf("%s from %s (%s ms total)\n\n", v20, v21, v25);
if ( v25 != (char *)&v26 )
operator delete(v25, v26 + 1);
fflush(stdout);
if ( *(_QWORD **)v23 != v24 )
operator delete(*(void **)v23, v24[0] + 1LL);
}
}
|
OnTestCaseEnd:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
CMP byte ptr [0x0425dea1],0x1
JNZ 0x00127088
MOV RBX,RSI
MOV RAX,qword ptr [RSI + 0x30]
MOV RCX,qword ptr [RSI + 0x38]
XOR ESI,ESI
LAB_00126fc7:
CMP RAX,RCX
JZ 0x00126fde
MOV RDX,qword ptr [RAX]
MOVZX EDX,byte ptr [RDX + 0x80]
ADD ESI,EDX
ADD RAX,0x8
JMP 0x00126fc7
LAB_00126fde:
LEA RDX,[0x1424f5]
LEA RCX,[0x142908]
LEA RDI,[RSP + 0x8]
CALL 0x00126bc4
LAB_00126ff6:
LEA RSI,[0x14355c]
MOV EDI,0x2
XOR EAX,EAX
CALL 0x00126396
MOV R14,qword ptr [RSP + 0x8]
MOV R15,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x80]
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RAX
LAB_00127021:
LEA RDI,[RSP + 0x30]
CALL 0x00137aa0
LAB_0012702b:
LEA RBX,[RSP + 0x40]
MOV RCX,qword ptr [RBX + -0x10]
LEA RDI,[0x1435d6]
MOV RSI,R14
MOV RDX,R15
XOR EAX,EAX
CALL 0x00109080
MOV RDI,qword ptr [RBX + -0x10]
CMP RDI,RBX
JZ 0x0012705e
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x001094c0
LAB_0012705e:
MOV RAX,qword ptr [0x00159f80]
MOV RDI,qword ptr [RAX]
CALL 0x001095f0
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00127088
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001094c0
LAB_00127088:
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd(testing::TestSuite const&) */
void __thiscall
testing::internal::PrettyUnitTestResultPrinter::OnTestCaseEnd
(PrettyUnitTestResultPrinter *this,TestSuite *param_1)
{
int8 uVar1;
long *plVar2;
char *pcVar3;
long *local_60 [2];
long local_50 [2];
int8 local_40;
long *local_38 [2];
long local_28 [2];
if (FLAGS_gtest_print_time == '\x01') {
pcVar3 = (char *)0x0;
for (plVar2 = *(long **)(param_1 + 0x30); plVar2 != *(long **)(param_1 + 0x38);
plVar2 = plVar2 + 1) {
pcVar3 = (char *)(ulong)((int)pcVar3 + (uint)*(byte *)(*plVar2 + 0x80));
}
FormatCountableNoun_abi_cxx11_((int)local_60,pcVar3,"test");
/* try { // try from 00126ff6 to 00127008 has its CatchHandler @ 00127094 */
ColoredPrintf(2,"[----------] ");
plVar2 = local_60[0];
uVar1 = *(int8 *)(param_1 + 8);
local_40 = *(int8 *)(param_1 + 0x80);
/* try { // try from 00127021 to 0012702a has its CatchHandler @ 00127092 */
StreamableToString<long>((long *)local_38);
printf("%s from %s (%s ms total)\n\n",plVar2,uVar1,local_38[0]);
if (local_38[0] != local_28) {
operator_delete(local_38[0],local_28[0] + 1);
}
fflush(*(FILE **)PTR_stdout_00159f80);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
}
return;
}
|
|
18,795
|
alloc_dynamic
|
eloqsql/mysys/array.c
|
void *alloc_dynamic(DYNAMIC_ARRAY *array)
{
DBUG_ENTER("alloc_dynamic");
DBUG_ASSERT(array->size_of_element); /* Ensure init() is called */
if (array->elements == array->max_element)
{
char *new_ptr;
if (array->malloc_flags & MY_INIT_BUFFER_USED)
{
/*
In this scenario, the buffer is statically preallocated,
so we have to create an all-new malloc since we overflowed
*/
if (!(new_ptr= (char *) my_malloc(array->m_psi_key,
(array->max_element+
array->alloc_increment) *
array->size_of_element,
MYF(array->malloc_flags | MY_WME))))
DBUG_RETURN(0);
if (array->elements)
memcpy(new_ptr, array->buffer,
array->elements * array->size_of_element);
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
}
else if (!(new_ptr=(char*)
my_realloc(array->m_psi_key, array->buffer,
(array->max_element+ array->alloc_increment) *
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR |
array->malloc_flags))))
DBUG_RETURN(0);
array->buffer= (uchar*) new_ptr;
array->max_element+=array->alloc_increment;
}
DBUG_RETURN(array->buffer+(array->elements++ * array->size_of_element));
}
|
O3
|
c
|
alloc_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jne 0x6dd7b
movq 0x20(%rbx), %rcx
btl $0x8, %ecx
movl 0x18(%rbx), %edi
jb 0x6dd80
addl 0x10(%rbx), %eax
movq (%rbx), %rsi
imull 0x14(%rbx), %eax
orq $0x50, %rcx
movq %rax, %rdx
callq 0x6b14c
movq %rax, %r14
testq %rax, %rax
jne 0x6ddbd
jmp 0x6dddb
movq (%rbx), %r14
jmp 0x6ddc9
addl 0x10(%rbx), %eax
imull 0x14(%rbx), %eax
orq $0x10, %rcx
movq %rax, %rsi
movq %rcx, %rdx
callq 0x6b029
testq %rax, %rax
je 0x6dddb
movq %rax, %r14
movl 0x8(%rbx), %edx
testl %edx, %edx
je 0x6ddb4
movq (%rbx), %rsi
imull 0x14(%rbx), %edx
movq %r14, %rdi
callq 0x370a0
movl $0xfffffeff, %eax # imm = 0xFFFFFEFF
andq %rax, 0x20(%rbx)
movq %r14, (%rbx)
movl 0x8(%rbx), %eax
movl 0x10(%rbx), %ecx
addl %ecx, 0xc(%rbx)
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
imull 0x14(%rbx), %eax
addq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
jmp 0x6ddd6
|
alloc_dynamic:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov eax, [rdi+8]
cmp eax, [rdi+0Ch]
jnz short loc_6DD7B
mov rcx, [rbx+20h]
bt ecx, 8
mov edi, [rbx+18h]
jb short loc_6DD80
add eax, [rbx+10h]
mov rsi, [rbx]
imul eax, [rbx+14h]
or rcx, 50h
mov rdx, rax
call my_realloc
mov r14, rax
test rax, rax
jnz short loc_6DDBD
jmp short loc_6DDDB
loc_6DD7B:
mov r14, [rbx]
jmp short loc_6DDC9
loc_6DD80:
add eax, [rbx+10h]
imul eax, [rbx+14h]
or rcx, 10h
mov rsi, rax
mov rdx, rcx
call my_malloc
test rax, rax
jz short loc_6DDDB
mov r14, rax
mov edx, [rbx+8]
test edx, edx
jz short loc_6DDB4
mov rsi, [rbx]
imul edx, [rbx+14h]
mov rdi, r14
call _memcpy
loc_6DDB4:
mov eax, 0FFFFFEFFh
and [rbx+20h], rax
loc_6DDBD:
mov [rbx], r14
mov eax, [rbx+8]
mov ecx, [rbx+10h]
add [rbx+0Ch], ecx
loc_6DDC9:
lea ecx, [rax+1]
mov [rbx+8], ecx
imul eax, [rbx+14h]
add rax, r14
loc_6DDD6:
pop rbx
pop r14
pop rbp
retn
loc_6DDDB:
xor eax, eax
jmp short loc_6DDD6
|
long long alloc_dynamic(long long *a1)
{
int v2; // eax
long long v3; // rcx
unsigned int v4; // edi
long long v5; // rax
long long v6; // r14
long long v7; // rax
int v8; // edx
v2 = *((_DWORD *)a1 + 2);
if ( v2 != *((_DWORD *)a1 + 3) )
{
v6 = *a1;
LABEL_11:
*((_DWORD *)a1 + 2) = v2 + 1;
return v6 + (unsigned int)(*((_DWORD *)a1 + 5) * v2);
}
v3 = a1[4];
v4 = *((_DWORD *)a1 + 6);
if ( (v3 & 0x100) == 0 )
{
my_realloc(v4, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + v2)), v3 | 0x50);
v6 = v5;
if ( !v5 )
return 0LL;
goto LABEL_10;
}
my_malloc(v4, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + v2)), v3 | 0x10);
if ( v7 )
{
v6 = v7;
v8 = *((_DWORD *)a1 + 2);
if ( v8 )
memcpy(v7, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * v8));
a1[4] &= 0xFFFFFEFFuLL;
LABEL_10:
*a1 = v6;
v2 = *((_DWORD *)a1 + 2);
*((_DWORD *)a1 + 3) += *((_DWORD *)a1 + 4);
goto LABEL_11;
}
return 0LL;
}
|
alloc_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,dword ptr [RDI + 0xc]
JNZ 0x0016dd7b
MOV RCX,qword ptr [RBX + 0x20]
BT ECX,0x8
MOV EDI,dword ptr [RBX + 0x18]
JC 0x0016dd80
ADD EAX,dword ptr [RBX + 0x10]
MOV RSI,qword ptr [RBX]
IMUL EAX,dword ptr [RBX + 0x14]
OR RCX,0x50
MOV RDX,RAX
CALL 0x0016b14c
MOV R14,RAX
TEST RAX,RAX
JNZ 0x0016ddbd
JMP 0x0016dddb
LAB_0016dd7b:
MOV R14,qword ptr [RBX]
JMP 0x0016ddc9
LAB_0016dd80:
ADD EAX,dword ptr [RBX + 0x10]
IMUL EAX,dword ptr [RBX + 0x14]
OR RCX,0x10
MOV RSI,RAX
MOV RDX,RCX
CALL 0x0016b029
TEST RAX,RAX
JZ 0x0016dddb
MOV R14,RAX
MOV EDX,dword ptr [RBX + 0x8]
TEST EDX,EDX
JZ 0x0016ddb4
MOV RSI,qword ptr [RBX]
IMUL EDX,dword ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x001370a0
LAB_0016ddb4:
MOV EAX,0xfffffeff
AND qword ptr [RBX + 0x20],RAX
LAB_0016ddbd:
MOV qword ptr [RBX],R14
MOV EAX,dword ptr [RBX + 0x8]
MOV ECX,dword ptr [RBX + 0x10]
ADD dword ptr [RBX + 0xc],ECX
LAB_0016ddc9:
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x8],ECX
IMUL EAX,dword ptr [RBX + 0x14]
ADD RAX,R14
LAB_0016ddd6:
POP RBX
POP R14
POP RBP
RET
LAB_0016dddb:
XOR EAX,EAX
JMP 0x0016ddd6
|
long alloc_dynamic(long *param_1)
{
ulong uVar1;
int iVar2;
void *__dest;
long lVar3;
iVar2 = (int)param_1[1];
if (iVar2 == *(int *)((long)param_1 + 0xc)) {
uVar1 = param_1[4];
if (((uint)uVar1 >> 8 & 1) == 0) {
__dest = (void *)my_realloc((int)param_1[3],*param_1,
(iVar2 + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),
uVar1 | 0x50);
if (__dest != (void *)0x0) {
LAB_0016ddbd:
*param_1 = (long)__dest;
iVar2 = (int)param_1[1];
*(int *)((long)param_1 + 0xc) = *(int *)((long)param_1 + 0xc) + (int)param_1[2];
goto LAB_0016ddc9;
}
}
else {
__dest = (void *)my_malloc((int)param_1[3],
(iVar2 + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),
uVar1 | 0x10);
if (__dest != (void *)0x0) {
if ((int)param_1[1] != 0) {
memcpy(__dest,(void *)*param_1,
(ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14)));
}
param_1[4] = param_1[4] & 0xfffffeff;
goto LAB_0016ddbd;
}
}
lVar3 = 0;
}
else {
__dest = (void *)*param_1;
LAB_0016ddc9:
*(int *)(param_1 + 1) = iVar2 + 1;
lVar3 = (ulong)(uint)(iVar2 * *(int *)((long)param_1 + 0x14)) + (long)__dest;
}
return lVar3;
}
|
|
18,796
|
minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type)
|
monkey531[P]llama/common/minja.hpp
|
static std::string typeToString(Type t) {
switch (t) {
case Type::Text: return "text";
case Type::Expression: return "expression";
case Type::If: return "if";
case Type::Else: return "else";
case Type::Elif: return "elif";
case Type::EndIf: return "endif";
case Type::For: return "for";
case Type::EndFor: return "endfor";
case Type::Set: return "set";
case Type::EndSet: return "endset";
case Type::Comment: return "comment";
case Type::Macro: return "macro";
case Type::EndMacro: return "endmacro";
case Type::Filter: return "filter";
case Type::EndFilter: return "endfilter";
case Type::Generation: return "generation";
case Type::EndGeneration: return "endgeneration";
case Type::Break: return "break";
case Type::Continue: return "continue";
}
return "Unknown";
}
|
O1
|
cpp
|
minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type):
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0x12, %esi
ja 0x9feff
movl %esi, %eax
leaq 0x56d3f(%rip), %rcx # 0xf6ae4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x57ac8(%rip), %rsi # 0xf787d
leaq 0x57ac5(%rip), %rdx # 0xf7881
jmp 0x9ff0d
leaq 0x57e3f(%rip), %rsi # 0xf7c07
leaq 0x57e41(%rip), %rdx # 0xf7c10
jmp 0x9ff0d
leaq 0x57dff(%rip), %rsi # 0xf7bda
leaq 0x57e00(%rip), %rdx # 0xf7be2
jmp 0x9ff0d
leaq 0x57dc2(%rip), %rsi # 0xf7bb0
leaq 0x57dc1(%rip), %rdx # 0xf7bb6
jmp 0x9ff0d
leaq 0x57cb9(%rip), %rsi # 0xf7aba
leaq 0x57cb6(%rip), %rdx # 0xf7abe
jmp 0x9ff0d
leaq 0x58e28(%rip), %rsi # 0xf8c3c
leaq 0x58e28(%rip), %rdx # 0xf8c43
jmp 0x9ff0d
leaq 0x57d1e(%rip), %rsi # 0xf7b45
leaq 0x57d24(%rip), %rdx # 0xf7b52
jmp 0x9ff0d
leaq 0x509c7(%rip), %rsi # 0xf0801
leaq 0x509c2(%rip), %rdx # 0xf0803
jmp 0x9ff0d
leaq 0x57dbd(%rip), %rsi # 0xf7c0a
leaq 0x57dbc(%rip), %rdx # 0xf7c10
jmp 0x9ff0d
leaq 0x57c80(%rip), %rsi # 0xf7ae0
leaq 0x57c7d(%rip), %rdx # 0xf7ae4
jmp 0x9ff0d
leaq 0x57ccb(%rip), %rsi # 0xf7b3e
leaq 0x57cca(%rip), %rdx # 0xf7b44
jmp 0x9ff0d
leaq 0x57e2b(%rip), %rsi # 0xf7cb1
leaq 0x57e2e(%rip), %rdx # 0xf7cbb
jmp 0x9ff0d
leaq 0x57d7b(%rip), %rsi # 0xf7c11
leaq 0x57d79(%rip), %rdx # 0xf7c16
jmp 0x9ff0d
leaq 0x57c3f(%rip), %rsi # 0xf7ae5
leaq 0x57c3d(%rip), %rdx # 0xf7aea
jmp 0x9ff0d
leaq 0x57d27(%rip), %rsi # 0xf7bdd
leaq 0x57d25(%rip), %rdx # 0xf7be2
jmp 0x9ff0d
leaq 0x57c7b(%rip), %rsi # 0xf7b41
leaq 0x57c77(%rip), %rdx # 0xf7b44
jmp 0x9ff0d
leaq 0x57d41(%rip), %rsi # 0xf7c17
leaq 0x57d42(%rip), %rdx # 0xf7c1f
jmp 0x9ff0d
leaq 0x5cdf0(%rip), %rsi # 0xfccd6
leaq 0x5cdec(%rip), %rdx # 0xfccd9
jmp 0x9ff0d
leaq 0x57c52(%rip), %rsi # 0xf7b48
leaq 0x57c55(%rip), %rdx # 0xf7b52
jmp 0x9ff0d
leaq 0x58d3e(%rip), %rsi # 0xf8c44
leaq 0x58d3e(%rip), %rdx # 0xf8c4b
movq %rbx, %rdi
callq 0x28a68
movq %rbx, %rax
popq %rbx
retq
|
_ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
cmp esi, 12h; switch 19 cases
ja def_9FDAC; jumptable 000000000009FDAC default case
mov eax, esi
lea rcx, jpt_9FDAC
movsxd rax, ds:(jpt_9FDAC - 0F6AE4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9FDAE:
lea rsi, aText; jumptable 000000000009FDAC case 0
lea rdx, aText+4; ""
jmp loc_9FF0D
loc_9FDC1:
lea rsi, aEndfilter; jumptable 000000000009FDAC case 16
lea rdx, aEndfilter+9; ""
jmp loc_9FF0D
loc_9FDD4:
lea rsi, aEndmacro; jumptable 000000000009FDAC case 14
lea rdx, aEndmacro+8; ""
jmp loc_9FF0D
loc_9FDE7:
lea rsi, aEndset; jumptable 000000000009FDAC case 11
lea rdx, aEndset+6; ""
jmp loc_9FF0D
loc_9FDFA:
lea rsi, aElif; jumptable 000000000009FDAC case 4
lea rdx, aElif+4; ""
jmp loc_9FF0D
loc_9FE0D:
lea rsi, aComment; jumptable 000000000009FDAC case 12
lea rdx, aComment+7; ""
jmp loc_9FF0D
loc_9FE20:
lea rsi, aEndgeneration; jumptable 000000000009FDAC case 9
lea rdx, aEndgeneration+0Dh; ""
jmp loc_9FF0D
loc_9FE33:
lea rsi, aIf+1; jumptable 000000000009FDAC case 2
lea rdx, aIf+3; ""
jmp loc_9FF0D
loc_9FE46:
lea rsi, aEndfilter+3; jumptable 000000000009FDAC case 15
lea rdx, aEndfilter+9; ""
jmp loc_9FF0D
loc_9FE59:
lea rsi, aElse; jumptable 000000000009FDAC case 3
lea rdx, aElse+4; ""
jmp loc_9FF0D
loc_9FE6C:
lea rsi, aEndfor; jumptable 000000000009FDAC case 7
lea rdx, aEndfor+6; ""
jmp loc_9FF0D
loc_9FE7F:
lea rsi, aExpectedLeftSi_0+24h; jumptable 000000000009FDAC case 1
lea rdx, aExpectedLeftSi_0+2Eh; ""
jmp short loc_9FF0D
loc_9FE8F:
lea rsi, aBreak; jumptable 000000000009FDAC case 17
lea rdx, aBreak+5; ""
jmp short loc_9FF0D
loc_9FE9F:
lea rsi, aEndif; jumptable 000000000009FDAC case 5
lea rdx, aEndif+5; ""
jmp short loc_9FF0D
loc_9FEAF:
lea rsi, aEndmacro+3; jumptable 000000000009FDAC case 13
lea rdx, aEndmacro+8; ""
jmp short loc_9FF0D
loc_9FEBF:
lea rsi, aEndfor+3; jumptable 000000000009FDAC case 6
lea rdx, aEndfor+6; ""
jmp short loc_9FF0D
loc_9FECF:
lea rsi, aContinue; jumptable 000000000009FDAC case 18
lea rdx, aContinue+8; ""
jmp short loc_9FF0D
loc_9FEDF:
lea rsi, aAtLeastOneOfMi+2Fh; jumptable 000000000009FDAC case 10
lea rdx, aAtLeastOneOfMi+32h; ""
jmp short loc_9FF0D
loc_9FEEF:
lea rsi, aEndgeneration+3; jumptable 000000000009FDAC case 8
lea rdx, aEndgeneration+0Dh; ""
jmp short loc_9FF0D
def_9FDAC:
lea rsi, aUnknown; jumptable 000000000009FDAC default case
lea rdx, aUnknown+7; ""
loc_9FF0D:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
|
_QWORD * minja::TemplateToken::typeToString[abi:cxx11](_QWORD *a1, int a2)
{
char *v2; // rsi
char *v3; // rdx
*a1 = a1 + 2;
switch ( a2 )
{
case 0:
v2 = "text";
v3 = (char *)"";
break;
case 1:
v2 = (char *)"expression";
v3 = (char *)"";
break;
case 2:
v2 = "if";
v3 = "";
break;
case 3:
v2 = "else";
v3 = "";
break;
case 4:
v2 = "elif";
v3 = "";
break;
case 5:
v2 = "endif";
v3 = "";
break;
case 6:
v2 = "for";
v3 = "";
break;
case 7:
v2 = "endfor";
v3 = "";
break;
case 8:
v2 = "generation";
v3 = "";
break;
case 9:
v2 = "endgeneration";
v3 = "";
break;
case 10:
v2 = (char *)"set";
v3 = (char *)"";
break;
case 11:
v2 = "endset";
v3 = "";
break;
case 12:
v2 = "comment";
v3 = "";
break;
case 13:
v2 = "macro";
v3 = "";
break;
case 14:
v2 = "endmacro";
v3 = "";
break;
case 15:
v2 = "filter";
v3 = "";
break;
case 16:
v2 = "endfilter";
v3 = "";
break;
case 17:
v2 = "break";
v3 = "";
break;
case 18:
v2 = "continue";
v3 = "";
break;
default:
v2 = "Unknown";
v3 = "";
break;
}
std::string::_M_construct<char const*>(a1, v2, (long long)v3);
return a1;
}
|
typeToString[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
CMP ESI,0x12
JA 0x0019feff
MOV EAX,ESI
LEA RCX,[0x1f6ae4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[0x1f787d]
LEA RDX,[0x1f7881]
JMP 0x0019ff0d
caseD_10:
LEA RSI,[0x1f7c07]
LEA RDX,[0x1f7c10]
JMP 0x0019ff0d
caseD_e:
LEA RSI,[0x1f7bda]
LEA RDX,[0x1f7be2]
JMP 0x0019ff0d
caseD_b:
LEA RSI,[0x1f7bb0]
LEA RDX,[0x1f7bb6]
JMP 0x0019ff0d
caseD_4:
LEA RSI,[0x1f7aba]
LEA RDX,[0x1f7abe]
JMP 0x0019ff0d
caseD_c:
LEA RSI,[0x1f8c3c]
LEA RDX,[0x1f8c43]
JMP 0x0019ff0d
caseD_9:
LEA RSI,[0x1f7b45]
LEA RDX,[0x1f7b52]
JMP 0x0019ff0d
caseD_2:
LEA RSI,[0x1f0801]
LEA RDX,[0x1f0803]
JMP 0x0019ff0d
caseD_f:
LEA RSI,[0x1f7c0a]
LEA RDX,[0x1f7c10]
JMP 0x0019ff0d
caseD_3:
LEA RSI,[0x1f7ae0]
LEA RDX,[0x1f7ae4]
JMP 0x0019ff0d
caseD_7:
LEA RSI,[0x1f7b3e]
LEA RDX,[0x1f7b44]
JMP 0x0019ff0d
caseD_1:
LEA RSI,[0x1f7cb1]
LEA RDX,[0x1f7cbb]
JMP 0x0019ff0d
caseD_11:
LEA RSI,[0x1f7c11]
LEA RDX,[0x1f7c16]
JMP 0x0019ff0d
caseD_5:
LEA RSI,[0x1f7ae5]
LEA RDX,[0x1f7aea]
JMP 0x0019ff0d
caseD_d:
LEA RSI,[0x1f7bdd]
LEA RDX,[0x1f7be2]
JMP 0x0019ff0d
caseD_6:
LEA RSI,[0x1f7b41]
LEA RDX,[0x1f7b44]
JMP 0x0019ff0d
caseD_12:
LEA RSI,[0x1f7c17]
LEA RDX,[0x1f7c1f]
JMP 0x0019ff0d
caseD_a:
LEA RSI,[0x1fccd6]
LEA RDX,[0x1fccd9]
JMP 0x0019ff0d
caseD_8:
LEA RSI,[0x1f7b48]
LEA RDX,[0x1f7b52]
JMP 0x0019ff0d
default:
LEA RSI,[0x1f8c44]
LEA RDX,[0x1f8c4b]
LAB_0019ff0d:
MOV RDI,RBX
CALL 0x00128a68
MOV RAX,RBX
POP RBX
RET
|
/* minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type) */
TemplateToken * __thiscall
minja::TemplateToken::typeToString_abi_cxx11_(TemplateToken *this,int4 param_2)
{
char *pcVar1;
char *pcVar2;
*(TemplateToken **)this = this + 0x10;
switch(param_2) {
case 0:
pcVar2 = "text";
pcVar1 = "";
break;
case 1:
pcVar2 = "expression";
pcVar1 = "";
break;
case 2:
pcVar2 = "if";
pcVar1 = "";
break;
case 3:
pcVar2 = "else";
pcVar1 = "";
break;
case 4:
pcVar2 = "elif";
pcVar1 = "";
break;
case 5:
pcVar2 = "endif";
pcVar1 = "";
break;
case 6:
pcVar2 = "for";
pcVar1 = "";
break;
case 7:
pcVar2 = "endfor";
pcVar1 = "";
break;
case 8:
pcVar2 = "generation";
pcVar1 = "";
break;
case 9:
pcVar2 = "endgeneration";
pcVar1 = "";
break;
case 10:
pcVar2 = "set";
pcVar1 = "";
break;
case 0xb:
pcVar2 = "endset";
pcVar1 = "";
break;
case 0xc:
pcVar2 = "comment";
pcVar1 = "";
break;
case 0xd:
pcVar2 = "macro";
pcVar1 = "";
break;
case 0xe:
pcVar2 = "endmacro";
pcVar1 = "";
break;
case 0xf:
pcVar2 = "filter";
pcVar1 = "";
break;
case 0x10:
pcVar2 = "endfilter";
pcVar1 = "";
break;
case 0x11:
pcVar2 = "break";
pcVar1 = "";
break;
case 0x12:
pcVar2 = "continue";
pcVar1 = "";
break;
default:
pcVar2 = "Unknown";
pcVar1 = "";
}
std::__cxx11::string::_M_construct<char_const*>(this,pcVar2,pcVar1);
return this;
}
|
|
18,797
|
common_kv_cache_dump_view(llama_kv_cache_view const&, int)
|
monkey531[P]llama/common/common.cpp
|
void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
int seq_count = 0;
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) { seq_count++; }
}
putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]);
}
printf("\n=== Done dumping\n");
}
|
O3
|
cpp
|
common_kv_cache_dump_view(llama_kv_cache_view const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0x10(%rdi), %r9d
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
leaq 0x8581f(%rip), %rdi # 0xa8e7d
xorl %eax, %eax
callq 0x18070
cmpl $0x0, (%r14)
jle 0x236db
movq 0x20(%r14), %r12
movl $0x3e, %r13d
leaq 0x898d4(%rip), %r15 # 0xacf50
xorl %ebp, %ebp
movl %ebp, %eax
cltd
idivl %ebx
testl %edx, %edx
jne 0x23697
leaq 0x85879(%rip), %rdi # 0xa8f07
movl %ebp, %esi
xorl %eax, %eax
callq 0x18070
movslq 0x4(%r14), %rcx
testq %rcx, %rcx
jle 0x236b9
xorl %edx, %edx
xorl %eax, %eax
movl (%r12,%rdx,4), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x236a4
jmp 0x236bb
xorl %eax, %eax
cmpl $0x3e, %eax
cmovael %r13d, %eax
movsbl (%rax,%r15), %edi
callq 0x18900
incl %ebp
movslq 0x4(%r14), %rax
leaq (%r12,%rax,4), %r12
cmpl (%r14), %ebp
jl 0x2367e
leaq 0x89858(%rip), %rdi # 0xacf3a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x18a10
|
_Z25common_kv_cache_dump_viewRK19llama_kv_cache_viewi:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+0Ch]
mov r8d, [rdi+8]
mov r9d, [rdi+10h]
mov eax, [rdi+14h]
mov [rsp+38h+var_38], eax
lea rdi, aDumpingKvCache; "=== Dumping KV cache. total cells %d, m"...
xor eax, eax
call _printf
cmp dword ptr [r14], 0
jle short loc_236DB
mov r12, [r14+20h]
mov r13d, 3Eh ; '>'
lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
xor ebp, ebp
loc_2367E:
mov eax, ebp
cdq
idiv ebx
test edx, edx
jnz short loc_23697
lea rdi, a5d; "\n%5d: "
mov esi, ebp
xor eax, eax
call _printf
loc_23697:
movsxd rcx, dword ptr [r14+4]
test rcx, rcx
jle short loc_236B9
xor edx, edx
xor eax, eax
loc_236A4:
mov esi, [r12+rdx*4]
not esi
shr esi, 1Fh
add eax, esi
inc rdx
cmp rcx, rdx
jnz short loc_236A4
jmp short loc_236BB
loc_236B9:
xor eax, eax
loc_236BB:
cmp eax, 3Eh ; '>'
cmovnb eax, r13d
movsx edi, byte ptr [rax+r15]
call _putchar
inc ebp
movsxd rax, dword ptr [r14+4]
lea r12, [r12+rax*4]
cmp ebp, [r14]
jl short loc_2367E
loc_236DB:
lea rdi, aDoneDumping; "\n=== Done dumping"
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _puts
|
long long common_kv_cache_dump_view(long long a1, int a2)
{
long long v2; // r12
int v3; // ebp
long long v4; // rcx
long long v5; // rdx
long long v6; // rax
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d",
*(_DWORD *)a1,
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 12),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 16),
*(_DWORD *)(a1 + 20));
if ( *(int *)a1 > 0 )
{
v2 = *(_QWORD *)(a1 + 32);
v3 = 0;
do
{
if ( !(v3 % a2) )
printf("\n%5d: ", v3);
v4 = *(int *)(a1 + 4);
if ( v4 <= 0 )
{
v6 = 0LL;
}
else
{
v5 = 0LL;
LODWORD(v6) = 0;
do
v6 = (*(_DWORD *)(v2 + 4 * v5++) >= 0) + (unsigned int)v6;
while ( v4 != v5 );
}
if ( (unsigned int)v6 >= 0x3E )
v6 = 62LL;
putchar((unsigned int)common_kv_cache_dump_view(llama_kv_cache_view const&,int)::slot_chars[v6]);
++v3;
v2 += 4LL * *(int *)(a1 + 4);
}
while ( v3 < *(_DWORD *)a1 );
}
return puts("\n=== Done dumping");
}
|
common_kv_cache_dump_view:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0xc]
MOV R8D,dword ptr [RDI + 0x8]
MOV R9D,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
LEA RDI,[0x1a8e7d]
XOR EAX,EAX
CALL 0x00118070
CMP dword ptr [R14],0x0
JLE 0x001236db
MOV R12,qword ptr [R14 + 0x20]
MOV R13D,0x3e
LEA R15,[0x1acf50]
XOR EBP,EBP
LAB_0012367e:
MOV EAX,EBP
CDQ
IDIV EBX
TEST EDX,EDX
JNZ 0x00123697
LEA RDI,[0x1a8f07]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x00118070
LAB_00123697:
MOVSXD RCX,dword ptr [R14 + 0x4]
TEST RCX,RCX
JLE 0x001236b9
XOR EDX,EDX
XOR EAX,EAX
LAB_001236a4:
MOV ESI,dword ptr [R12 + RDX*0x4]
NOT ESI
SHR ESI,0x1f
ADD EAX,ESI
INC RDX
CMP RCX,RDX
JNZ 0x001236a4
JMP 0x001236bb
LAB_001236b9:
XOR EAX,EAX
LAB_001236bb:
CMP EAX,0x3e
CMOVNC EAX,R13D
MOVSX EDI,byte ptr [RAX + R15*0x1]
CALL 0x00118900
INC EBP
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA R12,[R12 + RAX*0x4]
CMP EBP,dword ptr [R14]
JL 0x0012367e
LAB_001236db:
LEA RDI,[0x1acf3a]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00118a10
|
/* common_kv_cache_dump_view(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view(llama_kv_cache_view *param_1,int param_2)
{
uint uVar1;
int8 in_RAX;
ulong uVar2;
long lVar3;
uint uVar4;
long lVar5;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(param_1 + 0x14)));
if (0 < *(int *)param_1) {
lVar5 = *(long *)(param_1 + 0x20);
uVar4 = 0;
do {
if ((int)uVar4 % param_2 == 0) {
printf("\n%5d: ",(ulong)uVar4);
}
if ((long)*(int *)(param_1 + 4) < 1) {
uVar1 = 0;
}
else {
lVar3 = 0;
uVar1 = 0;
do {
uVar1 = uVar1 - ((int)~*(uint *)(lVar5 + lVar3 * 4) >> 0x1f);
lVar3 = lVar3 + 1;
} while (*(int *)(param_1 + 4) != lVar3);
}
uVar2 = (ulong)uVar1;
if (0x3d < uVar1) {
uVar2 = 0x3e;
}
putchar((int)".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"[uVar2]);
uVar4 = uVar4 + 1;
lVar5 = lVar5 + (long)*(int *)(param_1 + 4) * 4;
} while ((int)uVar4 < *(int *)param_1);
}
puts("\n=== Done dumping");
return;
}
|
|
18,798
|
resize_key_cache
|
eloqsql/mysys/mf_keycache.c
|
int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
size_t use_mem, uint division_limit, uint age_threshold,
uint changed_blocks_hash_size)
{
int blocks= -1;
if (keycache->key_cache_inited)
{
pthread_mutex_lock(&keycache->op_lock);
if ((uint) keycache->param_partitions != keycache->partitions && use_mem)
blocks= repartition_key_cache_internal(keycache,
key_cache_block_size, use_mem,
division_limit, age_threshold,
changed_blocks_hash_size,
(uint) keycache->param_partitions,
0);
else
{
blocks= keycache->interface_funcs->resize(keycache->keycache_cb,
key_cache_block_size,
use_mem, division_limit,
age_threshold,
changed_blocks_hash_size);
if (keycache->partitions)
keycache->partitions=
((PARTITIONED_KEY_CACHE_CB *)(keycache->keycache_cb))->partitions;
}
keycache->key_cache_mem_size=
keycache->partitions ?
((PARTITIONED_KEY_CACHE_CB *)(keycache->keycache_cb))->key_cache_mem_size :
((SIMPLE_KEY_CACHE_CB *)(keycache->keycache_cb))->key_cache_mem_size;
keycache->can_be_used= (blocks >= 0);
pthread_mutex_unlock(&keycache->op_lock);
}
return blocks;
}
|
O0
|
c
|
resize_key_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
cmpb $0x0, 0x48(%rax)
je 0xe9911
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x2a200
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x8(%rbp), %rcx
cmpl 0x4c(%rcx), %eax
je 0xe986e
cmpq $0x0, -0x18(%rbp)
je 0xe986e
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl -0x24(%rbp), %r9d
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
xorl %r10d, %r10d
movl %eax, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xe9920
movl %eax, -0x28(%rbp)
jmp 0xe98b7
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl -0x24(%rbp), %r9d
callq *%rax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0xe98b5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4c(%rax)
jmp 0xe98b7
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0xe98d3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xe98e3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
cmpl $0x0, -0x28(%rbp)
setge %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x49(%rax)
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x2a1e0
movl -0x28(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
resize_key_cache:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_20], r8d
mov [rbp+var_24], r9d
mov [rbp+var_28], 0FFFFFFFFh
mov rax, [rbp+var_8]
cmp byte ptr [rax+48h], 0
jz loc_E9911
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_mutex_lock
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov rcx, [rbp+var_8]
cmp eax, [rcx+4Ch]
jz short loc_E986E
cmp [rbp+var_18], 0
jz short loc_E986E
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
mov r8d, [rbp+var_20]
mov r9d, [rbp+var_24]
mov rax, [rbp+var_8]
mov rax, [rax+38h]
xor r10d, r10d
mov [rsp+40h+var_40], eax
mov [rsp+40h+var_38], 0
call repartition_key_cache_internal
mov [rbp+var_28], eax
jmp short loc_E98B7
loc_E986E:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
mov r8d, [rbp+var_20]
mov r9d, [rbp+var_24]
call rax
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
cmp dword ptr [rax+4Ch], 0
jz short loc_E98B5
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov ecx, [rax+1Ch]
mov rax, [rbp+var_8]
mov [rax+4Ch], ecx
loc_E98B5:
jmp short $+2
loc_E98B7:
mov rax, [rbp+var_8]
cmp dword ptr [rax+4Ch], 0
jz short loc_E98D3
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rax, [rax+10h]
mov [rbp+var_30], rax
jmp short loc_E98E3
loc_E98D3:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rax, [rax+8]
mov [rbp+var_30], rax
loc_E98E3:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax+50h], rcx
cmp [rbp+var_28], 0
setnl al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_8]
mov [rax+49h], cl
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_mutex_unlock
loc_E9911:
mov eax, [rbp+var_28]
add rsp, 40h
pop rbp
retn
|
long long resize_key_cache(
long long a1,
unsigned int a2,
long long a3,
unsigned int a4,
unsigned int a5,
unsigned int a6)
{
long long v7; // [rsp+10h] [rbp-30h]
int v8; // [rsp+18h] [rbp-28h]
v8 = -1;
if ( *(_BYTE *)(a1 + 72) )
{
pthread_mutex_lock(a1 + 88);
if ( (unsigned int)*(_QWORD *)(a1 + 56) == *(_DWORD *)(a1 + 76) || !a3 )
{
v8 = (*(long long ( **)(_QWORD, _QWORD, long long, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 8LL))(
*(_QWORD *)(a1 + 8),
a2,
a3,
a4,
a5,
a6);
if ( *(_DWORD *)(a1 + 76) )
*(_DWORD *)(a1 + 76) = *(_DWORD *)(*(_QWORD *)(a1 + 8) + 28LL);
}
else
{
v8 = repartition_key_cache_internal(a1, a2, a3, a4, a5, a6, *(_QWORD *)(a1 + 56), 0);
}
if ( *(_DWORD *)(a1 + 76) )
v7 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL);
else
v7 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
*(_QWORD *)(a1 + 80) = v7;
*(_BYTE *)(a1 + 73) = v8 >= 0;
pthread_mutex_unlock(a1 + 88);
}
return (unsigned int)v8;
}
|
resize_key_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV dword ptr [RBP + -0x20],R8D
MOV dword ptr [RBP + -0x24],R9D
MOV dword ptr [RBP + -0x28],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x48],0x0
JZ 0x001e9911
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x0012a200
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x4c]
JZ 0x001e986e
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001e986e
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
MOV R8D,dword ptr [RBP + -0x20]
MOV R9D,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
XOR R10D,R10D
MOV dword ptr [RSP],EAX
MOV dword ptr [RSP + 0x8],0x0
CALL 0x001e9920
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001e98b7
LAB_001e986e:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
MOV R8D,dword ptr [RBP + -0x20]
MOV R9D,dword ptr [RBP + -0x24]
CALL RAX
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x4c],0x0
JZ 0x001e98b5
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x4c],ECX
LAB_001e98b5:
JMP 0x001e98b7
LAB_001e98b7:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x4c],0x0
JZ 0x001e98d3
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001e98e3
LAB_001e98d3:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
LAB_001e98e3:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x50],RCX
CMP dword ptr [RBP + -0x28],0x0
SETGE AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x49],CL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x0012a1e0
LAB_001e9911:
MOV EAX,dword ptr [RBP + -0x28]
ADD RSP,0x40
POP RBP
RET
|
int resize_key_cache(long param_1,int4 param_2,long param_3,int4 param_4,
int4 param_5,int4 param_6)
{
int8 local_38;
int4 local_30;
local_30 = -1;
if (*(char *)(param_1 + 0x48) != '\0') {
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58));
if (((int)*(int8 *)(param_1 + 0x38) == *(int *)(param_1 + 0x4c)) || (param_3 == 0)) {
local_30 = (**(code **)(*(long *)(param_1 + 0x10) + 8))
(*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5,param_6);
if (*(int *)(param_1 + 0x4c) != 0) {
*(int4 *)(param_1 + 0x4c) = *(int4 *)(*(long *)(param_1 + 8) + 0x1c);
}
}
else {
local_30 = repartition_key_cache_internal
(param_1,param_2,param_3,param_4,param_5,param_6,
(int)*(int8 *)(param_1 + 0x38),0);
}
if (*(int *)(param_1 + 0x4c) == 0) {
local_38 = *(int8 *)(*(long *)(param_1 + 8) + 8);
}
else {
local_38 = *(int8 *)(*(long *)(param_1 + 8) + 0x10);
}
*(int8 *)(param_1 + 0x50) = local_38;
*(bool *)(param_1 + 0x49) = -1 < local_30;
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58));
}
return local_30;
}
|
|
18,799
|
ggml_backend_cpu_aarch64_buffer_type()
|
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
ggml_backend_buffer_type_t ggml_backend_cpu_aarch64_buffer_type(void) {
static struct ggml_backend_buffer_type ggml_backend_cpu_buffer_type_aarch64 = {
/* .iface = */ {
/* .get_name = */ ggml_backend_cpu_aarch64_buffer_type_get_name,
/* .alloc_buffer = */ ggml_backend_cpu_aarch64_buffer_type_alloc_buffer,
/* .get_alignment = */ ggml_backend_cpu_aarch64_buffer_type_get_alignment,
/* .get_max_size = */ nullptr, // defaults to SIZE_MAX
/* .get_alloc_size = */ nullptr, // defaults to ggml_nbytes
/* .is_host = */ nullptr,
},
/* .device = */ ggml_backend_reg_dev_get(ggml_backend_cpu_reg(), 0),
/* .context = */ new ggml::cpu::aarch64::extra_buffer_type(),
};
return &ggml_backend_cpu_buffer_type_aarch64;
}
|
O0
|
cpp
|
ggml_backend_cpu_aarch64_buffer_type():
subq $0x28, %rsp
cmpb $0x0, 0xba315(%rip) # 0x10acb0
jne 0x50a6e
leaq 0xba308(%rip), %rdi # 0x10acb0
callq 0xd200
cmpl $0x0, %eax
je 0x50a6e
leaq 0xe3(%rip), %rax # 0x50aa0
movq %rax, 0xba2ac(%rip) # 0x10ac70
leaq 0xe5(%rip), %rax # 0x50ab0
movq %rax, 0xba2a6(%rip) # 0x10ac78
leaq 0x177(%rip), %rax # 0x50b50
movq %rax, 0xba2a0(%rip) # 0x10ac80
movq $0x0, 0xba29d(%rip) # 0x10ac88
movq $0x0, 0xba29a(%rip) # 0x10ac90
movq $0x0, 0xba297(%rip) # 0x10ac98
callq 0xc2f0
movq %rax, 0x10(%rsp)
jmp 0x50a0d
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd0a0
movq %rax, 0x8(%rsp)
jmp 0x50a22
movq 0x8(%rsp), %rax
movq %rax, 0xba272(%rip) # 0x10aca0
movl $0x8, %edi
callq 0xc9a0
movq %rax, (%rsp)
jmp 0x50a3e
movq (%rsp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0xc4c0
movq (%rsp), %rdi
callq 0xc5f0
movq (%rsp), %rax
movq %rax, 0xba246(%rip) # 0x10aca8
leaq 0xba247(%rip), %rdi # 0x10acb0
callq 0xc5c0
leaq 0xba1fb(%rip), %rax # 0x10ac70
addq $0x28, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0xba221(%rip), %rdi # 0x10acb0
callq 0xc5b0
movq 0x20(%rsp), %rdi
callq 0xd180
nop
|
_Z36ggml_backend_cpu_aarch64_buffer_typev:
sub rsp, 28h
cmp cs:_ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64, 0; `guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
jnz loc_50A6E
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz loc_50A6E
lea rax, _ZL45ggml_backend_cpu_aarch64_buffer_type_get_nameP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_name(ggml_backend_buffer_type *)
mov cs:_ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64, rax; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
lea rax, _ZL49ggml_backend_cpu_aarch64_buffer_type_alloc_bufferP24ggml_backend_buffer_typem; ggml_backend_cpu_aarch64_buffer_type_alloc_buffer(ggml_backend_buffer_type *,ulong)
mov cs:qword_10AC78, rax
lea rax, _ZL50ggml_backend_cpu_aarch64_buffer_type_get_alignmentP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_alignment(ggml_backend_buffer_type *)
mov cs:qword_10AC80, rax
mov cs:qword_10AC88, 0
mov cs:qword_10AC90, 0
mov cs:qword_10AC98, 0
call _ggml_backend_cpu_reg
mov [rsp+28h+var_18], rax
jmp short $+2
loc_50A0D:
mov rdi, [rsp+28h+var_18]
xor eax, eax
mov esi, eax
call _ggml_backend_reg_dev_get
mov [rsp+28h+var_20], rax
jmp short $+2
loc_50A22:
mov rax, [rsp+28h+var_20]
mov cs:qword_10ACA0, rax
mov edi, 8; unsigned __int64
call __Znwm; operator new(ulong)
mov [rsp+28h+var_28], rax
jmp short $+2
loc_50A3E:
mov rdi, [rsp+28h+var_28]
xor esi, esi
mov edx, 8
call _memset
mov rdi, [rsp+28h+var_28]; this
call __ZN4ggml3cpu7aarch6417extra_buffer_typeC2Ev; ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type(void)
mov rax, [rsp+28h+var_28]
mov cs:qword_10ACA8, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_release
loc_50A6E:
lea rax, _ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
add rsp, 28h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_abort
mov rdi, [rsp+arg_18]
call __Unwind_Resume
|
long long *ggml_backend_cpu_aarch64_buffer_type(void)
{
ggml::cpu::aarch64::extra_buffer_type *v1; // [rsp+0h] [rbp-28h]
long long v2; // [rsp+10h] [rbp-18h]
if ( !(_BYTE)`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
&& __cxa_guard_acquire(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64) )
{
ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_name;
qword_10AC78 = (long long)ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
qword_10AC80 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_alignment;
qword_10AC88 = 0LL;
qword_10AC90 = 0LL;
qword_10AC98 = 0LL;
v2 = ggml_backend_cpu_reg();
qword_10ACA0 = ggml_backend_reg_dev_get(v2, 0LL);
v1 = (ggml::cpu::aarch64::extra_buffer_type *)operator new(8uLL);
memset(v1, 0LL, 8LL);
ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type(v1);
qword_10ACA8 = (long long)v1;
__cxa_guard_release(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
}
return &ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64;
}
|
ggml_backend_cpu_aarch64_buffer_type:
SUB RSP,0x28
CMP byte ptr [0x0020acb0],0x0
JNZ 0x00150a6e
LEA RDI,[0x20acb0]
CALL 0x0010d200
CMP EAX,0x0
JZ 0x00150a6e
LEA RAX,[0x150aa0]
MOV qword ptr [0x0020ac70],RAX
LEA RAX,[0x150ab0]
MOV qword ptr [0x0020ac78],RAX
LEA RAX,[0x150b50]
MOV qword ptr [0x0020ac80],RAX
MOV qword ptr [0x0020ac88],0x0
MOV qword ptr [0x0020ac90],0x0
MOV qword ptr [0x0020ac98],0x0
LAB_00150a01:
CALL 0x0010c2f0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00150a0d
LAB_00150a0d:
MOV RDI,qword ptr [RSP + 0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010d0a0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00150a22
LAB_00150a22:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [0x0020aca0],RAX
MOV EDI,0x8
CALL 0x0010c9a0
LAB_00150a38:
MOV qword ptr [RSP],RAX
JMP 0x00150a3e
LAB_00150a3e:
MOV RDI,qword ptr [RSP]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x0010c4c0
MOV RDI,qword ptr [RSP]
CALL 0x0010c5f0
MOV RAX,qword ptr [RSP]
MOV qword ptr [0x0020aca8],RAX
LEA RDI,[0x20acb0]
CALL 0x0010c5c0
LAB_00150a6e:
LEA RAX,[0x20ac70]
ADD RSP,0x28
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ggml_backend_cpu_aarch64_buffer_type() */
int1 * ggml_backend_cpu_aarch64_buffer_type(void)
{
int iVar1;
int8 uVar2;
extra_buffer_type *this;
if (ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64 == '\0') {
iVar1 = __cxa_guard_acquire(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
if (iVar1 != 0) {
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._0_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_name;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._8_8_ =
ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._16_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_alignment;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._24_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._32_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._40_8_ = 0;
/* try { // try from 00150a01 to 00150a37 has its CatchHandler @ 00150a7a */
uVar2 = ggml_backend_cpu_reg();
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._48_8_ =
ggml_backend_reg_dev_get(uVar2);
this = (extra_buffer_type *)operator_new(8);
memset(this,0,8);
ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type(this);
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ = this;
__cxa_guard_release(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
}
}
return ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.