index int64 0 66.5k | func_name stringlengths 2 5.36k | func_dep stringlengths 16 2.19k | func stringlengths 8 55.3k | test stringlengths 0 7.07k | opt stringclasses 4
values | language stringclasses 2
values | asm stringlengths 0 45.4k | ida_asm stringlengths 0 44.7k | ida_pseudo stringlengths 0 44.3k | ghidra_asm stringlengths 0 49.1k | ghidra_pseudo stringlengths 0 64.7k |
|---|---|---|---|---|---|---|---|---|---|---|---|
40,700 | my_fstat | eloqsql/mysys/my_lib.c | int my_fstat(File Filedes, MY_STAT *stat_area,
myf MyFlags __attribute__((unused)))
{
DBUG_ENTER("my_fstat");
DBUG_PRINT("my",("fd: %d MyFlags: %lu", Filedes, MyFlags));
#ifdef _WIN32
DBUG_RETURN(my_win_fstat(Filedes, stat_area));
#elif defined HAVE_valgrind
{
int s= fstat(Filedes, stat_area);
if (!s)
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(s);
}
#else
DBUG_RETURN(fstat(Filedes, (struct stat *) stat_area));
#endif
} | O3 | c | my_fstat:
pushq %rbp
movq %rsp, %rbp
popq %rbp
jmp 0x24640
nopl (%rax)
| my_fstat:
push rbp
mov rbp, rsp
pop rbp
jmp _fstat64
| long long my_fstat()
{
return fstat64();
}
| my_fstat:
PUSH RBP
MOV RBP,RSP
POP RBP
JMP 0x00124640
|
void my_fstat(int param_1,stat64 *param_2)
{
fstat64(param_1,param_2);
return;
}
| |
40,701 | ggml_graph_nbytes | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static size_t ggml_graph_nbytes(size_t size, bool grads) {
size_t nbytes = sizeof(struct ggml_cgraph);
nbytes += size * sizeof(struct ggml_tensor *) * 2; // leafs + nodes
if (grads) {
nbytes += size * sizeof(struct ggml_tensor *); // grads
}
nbytes += ggml_hash_size(size * 2) * sizeof(struct ggml_tensor *); // hash set
return nbytes;
} | O1 | c | ggml_graph_nbytes:
leaq (%rdi,%rdi), %rax
movl $0x20, %r8d
xorl %edx, %edx
leaq 0x2e25e(%rip), %rcx # 0xc58f0
leaq (%r8,%rdx), %r9
shrq %r9
cmpq %rax, (%rcx,%r9,8)
jb 0x976a4
movq %r9, %r8
jmp 0x976aa
incq %r9
movq %r9, %rdx
cmpq %r8, %rdx
jb 0x97692
cmpq $0x1f, %rdx
ja 0x976bb
movq (%rcx,%rdx,8), %rax
jmp 0x976bf
orq $0x1, %rax
movq %rdi, %rcx
shlq $0x4, %rcx
shlq $0x3, %rdi
xorl %edx, %edx
testb %sil, %sil
cmovneq %rdi, %rdx
addq %rcx, %rdx
leaq (%rdx,%rax,8), %rax
addq $0x50, %rax
retq
| ggml_graph_nbytes:
lea rax, [rdi+rdi]
mov r8d, 20h ; ' '
xor edx, edx
lea rcx, ggml_hash_size_primes
loc_97692:
lea r9, [r8+rdx]
shr r9, 1
cmp [rcx+r9*8], rax
jb short loc_976A4
mov r8, r9
jmp short loc_976AA
loc_976A4:
inc r9
mov rdx, r9
loc_976AA:
cmp rdx, r8
jb short loc_97692
cmp rdx, 1Fh
ja short loc_976BB
mov rax, [rcx+rdx*8]
jmp short loc_976BF
loc_976BB:
or rax, 1
loc_976BF:
mov rcx, rdi
shl rcx, 4
shl rdi, 3
xor edx, edx
test sil, sil
cmovnz rdx, rdi
add rdx, rcx
lea rax, [rdx+rax*8]
add rax, 50h ; 'P'
retn
| long long ggml_graph_nbytes(long long a1, char a2)
{
unsigned long long v2; // rax
unsigned long long v3; // r8
unsigned long long v4; // rdx
unsigned long long v5; // r9
long long v6; // rax
long long v7; // rcx
long long v8; // rdi
long long v9; // rdx
v2 = 2 * a1;
v3 = 32LL;
v4 = 0LL;
do
{
v5 = (v3 + v4) >> 1;
if ( ggml_hash_size_primes[v5] < v2 )
v4 = v5 + 1;
else
v3 = (v3 + v4) >> 1;
}
while ( v4 < v3 );
if ( v4 > 0x1F )
v6 = v2 | 1;
else
v6 = ggml_hash_size_primes[v4];
v7 = 16 * a1;
v8 = 8 * a1;
v9 = 0LL;
if ( a2 )
v9 = v8;
return v7 + v9 + 8 * v6 + 80;
}
| |||
40,702 | ggml_graph_nbytes | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static size_t ggml_graph_nbytes(size_t size, bool grads) {
size_t nbytes = sizeof(struct ggml_cgraph);
nbytes += size * sizeof(struct ggml_tensor *) * 2; // leafs + nodes
if (grads) {
nbytes += size * sizeof(struct ggml_tensor *); // grads
}
nbytes += ggml_hash_size(size * 2) * sizeof(struct ggml_tensor *); // hash set
return nbytes;
} | O2 | c | ggml_graph_nbytes:
pushq %rbx
movq %rdi, %rax
shlq $0x4, %rax
leaq (,%rdi,8), %rcx
xorl %ebx, %ebx
testl %esi, %esi
cmovneq %rcx, %rbx
addq %rax, %rbx
addq %rdi, %rdi
callq 0x71cca
leaq (%rbx,%rax,8), %rax
addq $0x50, %rax
popq %rbx
retq
| ggml_graph_nbytes:
push rbx
mov rax, rdi
shl rax, 4
lea rcx, ds:0[rdi*8]
xor ebx, ebx
test esi, esi
cmovnz rbx, rcx
add rbx, rax
add rdi, rdi
call ggml_hash_size
lea rax, [rbx+rax*8]
add rax, 50h ; 'P'
pop rbx
retn
| long long ggml_graph_nbytes(long long a1, int a2)
{
long long v2; // rbx
v2 = 0LL;
if ( a2 )
v2 = 8 * a1;
return 16 * a1 + v2 + 8 * ggml_hash_size(2 * a1) + 80;
}
| ggml_graph_nbytes:
PUSH RBX
MOV RAX,RDI
SHL RAX,0x4
LEA RCX,[RDI*0x8]
XOR EBX,EBX
TEST ESI,ESI
CMOVNZ RBX,RCX
ADD RBX,RAX
ADD RDI,RDI
CALL 0x00171cca
LEA RAX,[RBX + RAX*0x8]
ADD RAX,0x50
POP RBX
RET
|
long ggml_graph_nbytes(long param_1,int param_2)
{
long lVar1;
long lVar2;
lVar2 = 0;
if (param_2 != 0) {
lVar2 = param_1 * 8;
}
lVar1 = ggml_hash_size(param_1 * 2);
return lVar2 + param_1 * 0x10 + lVar1 * 8 + 0x50;
}
| |
40,703 | ggml_graph_nbytes | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static size_t ggml_graph_nbytes(size_t size, bool grads) {
size_t nbytes = sizeof(struct ggml_cgraph);
nbytes += size * sizeof(struct ggml_tensor *) * 2; // leafs + nodes
if (grads) {
nbytes += size * sizeof(struct ggml_tensor *); // grads
}
nbytes += ggml_hash_size(size * 2) * sizeof(struct ggml_tensor *); // hash set
return nbytes;
} | O3 | c | ggml_graph_nbytes:
leaq (%rdi,%rdi), %rax
movl $0x20, %r8d
xorl %edx, %edx
leaq 0x2e2c5(%rip), %rcx # 0xc4930
leaq (%r8,%rdx), %r9
shrq %r9
cmpq %rax, (%rcx,%r9,8)
jb 0x9667d
movq %r9, %r8
jmp 0x96683
incq %r9
movq %r9, %rdx
cmpq %r8, %rdx
jb 0x9666b
cmpq $0x1f, %rdx
ja 0x96694
movq (%rcx,%rdx,8), %rax
jmp 0x96698
orq $0x1, %rax
movq %rdi, %rcx
shlq $0x4, %rcx
shlq $0x3, %rdi
xorl %edx, %edx
testb %sil, %sil
cmovneq %rdi, %rdx
addq %rcx, %rdx
leaq (%rdx,%rax,8), %rax
addq $0x50, %rax
retq
| ggml_graph_nbytes:
lea rax, [rdi+rdi]
mov r8d, 20h ; ' '
xor edx, edx
lea rcx, ggml_hash_size_primes
loc_9666B:
lea r9, [r8+rdx]
shr r9, 1
cmp [rcx+r9*8], rax
jb short loc_9667D
mov r8, r9
jmp short loc_96683
loc_9667D:
inc r9
mov rdx, r9
loc_96683:
cmp rdx, r8
jb short loc_9666B
cmp rdx, 1Fh
ja short loc_96694
mov rax, [rcx+rdx*8]
jmp short loc_96698
loc_96694:
or rax, 1
loc_96698:
mov rcx, rdi
shl rcx, 4
shl rdi, 3
xor edx, edx
test sil, sil
cmovnz rdx, rdi
add rdx, rcx
lea rax, [rdx+rax*8]
add rax, 50h ; 'P'
retn
| long long ggml_graph_nbytes(long long a1, char a2)
{
unsigned long long v2; // rax
unsigned long long v3; // r8
unsigned long long v4; // rdx
unsigned long long v5; // r9
long long v6; // rax
long long v7; // rcx
long long v8; // rdi
long long v9; // rdx
v2 = 2 * a1;
v3 = 32LL;
v4 = 0LL;
do
{
v5 = (v3 + v4) >> 1;
if ( ggml_hash_size_primes[v5] < v2 )
v4 = v5 + 1;
else
v3 = (v3 + v4) >> 1;
}
while ( v4 < v3 );
if ( v4 > 0x1F )
v6 = v2 | 1;
else
v6 = ggml_hash_size_primes[v4];
v7 = 16 * a1;
v8 = 8 * a1;
v9 = 0LL;
if ( a2 )
v9 = v8;
return v7 + v9 + 8 * v6 + 80;
}
| |||
40,704 | ggml_gallocr_new_n | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-alloc.c | ggml_gallocr_t ggml_gallocr_new_n(ggml_backend_buffer_type_t * bufts, int n_bufs) {
ggml_gallocr_t galloc = (ggml_gallocr_t)calloc(1, sizeof(struct ggml_gallocr));
GGML_ASSERT(galloc != NULL);
galloc->bufts = calloc(n_bufs, sizeof(ggml_backend_buffer_type_t));
GGML_ASSERT(galloc->bufts != NULL);
galloc->buffers = calloc(n_bufs, sizeof(ggml_backend_buffer_t));
GGML_ASSERT(galloc->buffers != NULL);
galloc->buf_tallocs = calloc(n_bufs, sizeof(struct ggml_dyn_tallocr *));
GGML_ASSERT(galloc->buf_tallocs != NULL);
for (int i = 0; i < n_bufs; i++) {
galloc->bufts[i] = bufts[i];
galloc->buffers[i] = NULL;
// check if the same buffer type is used multiple times and reuse the same allocator
for (int j = 0; j < i; j++) {
if (bufts[i] == bufts[j]) {
galloc->buf_tallocs[i] = galloc->buf_tallocs[j];
break;
}
}
if (galloc->buf_tallocs[i] == NULL) {
size_t alignment = ggml_backend_buft_get_alignment(bufts[i]);
galloc->buf_tallocs[i] = ggml_dyn_tallocr_new(alignment);
}
}
galloc->n_buffers = n_bufs;
return galloc;
} | O1 | c | ggml_gallocr_new_n:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, %edi
movl $0x60, %esi
callq 0x17b60
testq %rax, %rax
je 0x25291
movq %rax, %r15
movslq %ebx, %rbp
movl $0x8, %esi
movq %rbp, %rdi
callq 0x17b60
movq %rax, (%r15)
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x252ad
movl $0x8, %esi
movq %rbp, %rdi
callq 0x17b60
movq %rax, 0x8(%r15)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x252c9
movl $0x8, %esi
movq %rbp, %rdi
callq 0x17b60
movq %r15, 0x20(%rsp)
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x252e5
movl %ebx, 0xc(%rsp)
testl %ebx, %ebx
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rdx
jle 0x25273
movq %rax, %rbp
movl 0xc(%rsp), %r12d
xorl %r13d, %r13d
movq (%r14,%r13,8), %rdi
movq %rdi, (%rcx,%r13,8)
movq $0x0, (%rdx,%r13,8)
testq %r13, %r13
je 0x25205
xorl %eax, %eax
cmpq (%r14,%rax,8), %rdi
je 0x251fb
incq %rax
cmpq %rax, %r13
jne 0x251eb
jmp 0x25205
movq (%rbp,%rax,8), %rax
movq %rax, (%rbp,%r13,8)
cmpq $0x0, (%rbp,%r13,8)
jne 0x25267
callq 0x19260
movq %rax, %rbx
movl $0x1018, %edi # imm = 0x1018
callq 0x18650
movq %rax, %r15
movq %rbx, (%rax)
leaq 0x8(%rax), %rdi
movl $0x1010, %edx # imm = 0x1010
xorl %esi, %esi
callq 0x178f0
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movl $0x1, 0x8(%r15)
xorl %eax, %eax
movq %rax, 0x10(%r15)
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
movq %rsi, 0x18(%r15)
movq %rax, 0x1010(%r15)
movq %r15, (%rbp,%r13,8)
incq %r13
cmpq %r12, %r13
jne 0x251d4
movl 0xc(%rsp), %eax
movq 0x20(%rsp), %rcx
movl %eax, 0x18(%rcx)
movq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29cd0(%rip), %rdi # 0x4ef68
leaq 0x27322(%rip), %rdx # 0x4c5c1
leaq 0x29e47(%rip), %rcx # 0x4f0ed
movl $0x179, %esi # imm = 0x179
jmp 0x252ff
leaq 0x29cb4(%rip), %rdi # 0x4ef68
leaq 0x27306(%rip), %rdx # 0x4c5c1
leaq 0x29e3a(%rip), %rcx # 0x4f0fc
movl $0x17c, %esi # imm = 0x17C
jmp 0x252ff
leaq 0x29c98(%rip), %rdi # 0x4ef68
leaq 0x272ea(%rip), %rdx # 0x4c5c1
leaq 0x29e34(%rip), %rcx # 0x4f112
movl $0x17f, %esi # imm = 0x17F
jmp 0x252ff
leaq 0x29c7c(%rip), %rdi # 0x4ef68
leaq 0x272ce(%rip), %rdx # 0x4c5c1
leaq 0x29e30(%rip), %rcx # 0x4f12a
movl $0x182, %esi # imm = 0x182
xorl %eax, %eax
callq 0x18ce0
| ggml_gallocr_new_n:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
mov r14, rdi
mov edi, 1
mov esi, 60h ; '`'
call _calloc
test rax, rax
jz loc_25291
mov r15, rax
movsxd rbp, ebx
mov esi, 8
mov rdi, rbp
call _calloc
mov [r15], rax
mov [rsp+58h+var_40], rax
test rax, rax
jz loc_252AD
mov esi, 8
mov rdi, rbp
call _calloc
mov [r15+8], rax
mov [rsp+58h+var_48], rax
test rax, rax
jz loc_252C9
mov esi, 8
mov rdi, rbp
call _calloc
mov [rsp+58h+var_38], r15
mov [r15+10h], rax
test rax, rax
jz loc_252E5
mov [rsp+58h+var_4C], ebx
test ebx, ebx
mov rcx, [rsp+58h+var_40]
mov rdx, [rsp+58h+var_48]
jle loc_25273
mov rbp, rax
mov r12d, [rsp+58h+var_4C]
xor r13d, r13d
loc_251D4:
mov rdi, [r14+r13*8]
mov [rcx+r13*8], rdi
mov qword ptr [rdx+r13*8], 0
test r13, r13
jz short loc_25205
xor eax, eax
loc_251EB:
cmp rdi, [r14+rax*8]
jz short loc_251FB
inc rax
cmp r13, rax
jnz short loc_251EB
jmp short loc_25205
loc_251FB:
mov rax, [rbp+rax*8+0]
mov [rbp+r13*8+0], rax
loc_25205:
cmp qword ptr [rbp+r13*8+0], 0
jnz short loc_25267
call _ggml_backend_buft_get_alignment
mov rbx, rax
mov edi, 1018h
call _malloc
mov r15, rax
mov [rax], rbx
lea rdi, [rax+8]
mov edx, 1010h
xor esi, esi
call _memset
mov rdx, [rsp+58h+var_48]
mov rcx, [rsp+58h+var_40]
mov dword ptr [r15+8], 1
xor eax, eax
mov [r15+10h], rax
mov rsi, 7FFFFFFFFFFFFFFFh
mov [r15+18h], rsi
mov [r15+1010h], rax
mov [rbp+r13*8+0], r15
loc_25267:
inc r13
cmp r13, r12
jnz loc_251D4
loc_25273:
mov eax, [rsp+58h+var_4C]
mov rcx, [rsp+58h+var_38]
mov [rcx+18h], eax
mov rax, rcx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_25291:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGallocNull; "galloc != NULL"
mov esi, 179h
jmp short loc_252FF
loc_252AD:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGallocBuftsNul; "galloc->bufts != NULL"
mov esi, 17Ch
jmp short loc_252FF
loc_252C9:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGallocBuffersN; "galloc->buffers != NULL"
mov esi, 17Fh
jmp short loc_252FF
loc_252E5:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGallocBufTallo; "galloc->buf_tallocs != NULL"
mov esi, 182h
loc_252FF:
xor eax, eax
call _ggml_abort
| _QWORD * ggml_gallocr_new_n(long long a1, int a2)
{
long long v3; // rax
int v4; // r8d
int v5; // r9d
_QWORD *v6; // r15
long long v7; // rax
long long v8; // rax
long long v9; // rax
long long v10; // rcx
long long v11; // rdx
long long v12; // rbp
long long i; // r13
long long v14; // rdi
long long v15; // rax
long long alignment; // rbx
long long v17; // r15
const char *v19; // rcx
int v20; // esi
long long v21; // [rsp+10h] [rbp-48h]
long long v22; // [rsp+18h] [rbp-40h]
_QWORD *v23; // [rsp+20h] [rbp-38h]
v3 = calloc(1LL, 96LL);
if ( !v3 )
{
v19 = "galloc != NULL";
v20 = 377;
goto LABEL_21;
}
v6 = (_QWORD *)v3;
v7 = calloc(a2, 8LL);
*v6 = v7;
v22 = v7;
if ( !v7 )
{
v19 = "galloc->bufts != NULL";
v20 = 380;
goto LABEL_21;
}
v8 = calloc(a2, 8LL);
v6[1] = v8;
v21 = v8;
if ( !v8 )
{
v19 = "galloc->buffers != NULL";
v20 = 383;
goto LABEL_21;
}
v9 = calloc(a2, 8LL);
v23 = v6;
v6[2] = v9;
if ( !v9 )
{
v19 = "galloc->buf_tallocs != NULL";
v20 = 386;
LABEL_21:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-alloc.c",
v20,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v19,
v4,
v5);
}
v10 = v22;
v11 = v21;
if ( a2 > 0 )
{
v12 = v9;
for ( i = 0LL; i != a2; ++i )
{
v14 = *(_QWORD *)(a1 + 8 * i);
*(_QWORD *)(v10 + 8 * i) = v14;
*(_QWORD *)(v11 + 8 * i) = 0LL;
if ( i )
{
v15 = 0LL;
while ( v14 != *(_QWORD *)(a1 + 8 * v15) )
{
if ( i == ++v15 )
goto LABEL_13;
}
*(_QWORD *)(v12 + 8 * i) = *(_QWORD *)(v12 + 8 * v15);
}
LABEL_13:
if ( !*(_QWORD *)(v12 + 8 * i) )
{
alignment = ggml_backend_buft_get_alignment();
v17 = malloc(4120LL);
*(_QWORD *)v17 = alignment;
memset(v17 + 8, 0LL, 4112LL);
v11 = v21;
v10 = v22;
*(_DWORD *)(v17 + 8) = 1;
*(_QWORD *)(v17 + 16) = 0LL;
*(_QWORD *)(v17 + 24) = 0x7FFFFFFFFFFFFFFFLL;
*(_QWORD *)(v17 + 4112) = 0LL;
*(_QWORD *)(v12 + 8 * i) = v17;
}
}
}
*((_DWORD *)v23 + 6) = a2;
return v23;
}
| ggml_gallocr_new_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
MOV R14,RDI
MOV EDI,0x1
MOV ESI,0x60
CALL 0x00117b60
TEST RAX,RAX
JZ 0x00125291
MOV R15,RAX
MOVSXD RBP,EBX
MOV ESI,0x8
MOV RDI,RBP
CALL 0x00117b60
MOV qword ptr [R15],RAX
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x001252ad
MOV ESI,0x8
MOV RDI,RBP
CALL 0x00117b60
MOV qword ptr [R15 + 0x8],RAX
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x001252c9
MOV ESI,0x8
MOV RDI,RBP
CALL 0x00117b60
MOV qword ptr [RSP + 0x20],R15
MOV qword ptr [R15 + 0x10],RAX
TEST RAX,RAX
JZ 0x001252e5
MOV dword ptr [RSP + 0xc],EBX
TEST EBX,EBX
MOV RCX,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
JLE 0x00125273
MOV RBP,RAX
MOV R12D,dword ptr [RSP + 0xc]
XOR R13D,R13D
LAB_001251d4:
MOV RDI,qword ptr [R14 + R13*0x8]
MOV qword ptr [RCX + R13*0x8],RDI
MOV qword ptr [RDX + R13*0x8],0x0
TEST R13,R13
JZ 0x00125205
XOR EAX,EAX
LAB_001251eb:
CMP RDI,qword ptr [R14 + RAX*0x8]
JZ 0x001251fb
INC RAX
CMP R13,RAX
JNZ 0x001251eb
JMP 0x00125205
LAB_001251fb:
MOV RAX,qword ptr [RBP + RAX*0x8]
MOV qword ptr [RBP + R13*0x8],RAX
LAB_00125205:
CMP qword ptr [RBP + R13*0x8],0x0
JNZ 0x00125267
CALL 0x00119260
MOV RBX,RAX
MOV EDI,0x1018
CALL 0x00118650
MOV R15,RAX
MOV qword ptr [RAX],RBX
LEA RDI,[RAX + 0x8]
MOV EDX,0x1010
XOR ESI,ESI
CALL 0x001178f0
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV dword ptr [R15 + 0x8],0x1
XOR EAX,EAX
MOV qword ptr [R15 + 0x10],RAX
MOV RSI,0x7fffffffffffffff
MOV qword ptr [R15 + 0x18],RSI
MOV qword ptr [R15 + 0x1010],RAX
MOV qword ptr [RBP + R13*0x8],R15
LAB_00125267:
INC R13
CMP R13,R12
JNZ 0x001251d4
LAB_00125273:
MOV EAX,dword ptr [RSP + 0xc]
MOV RCX,qword ptr [RSP + 0x20]
MOV dword ptr [RCX + 0x18],EAX
MOV RAX,RCX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00125291:
LEA RDI,[0x14ef68]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14f0ed]
MOV ESI,0x179
JMP 0x001252ff
LAB_001252ad:
LEA RDI,[0x14ef68]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14f0fc]
MOV ESI,0x17c
JMP 0x001252ff
LAB_001252c9:
LEA RDI,[0x14ef68]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14f112]
MOV ESI,0x17f
JMP 0x001252ff
LAB_001252e5:
LEA RDI,[0x14ef68]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14f12a]
MOV ESI,0x182
LAB_001252ff:
XOR EAX,EAX
CALL 0x00118ce0
|
int8 * ggml_gallocr_new_n(long param_1,uint param_2)
{
long lVar1;
int8 *puVar2;
void *pvVar3;
void *pvVar4;
void *pvVar5;
ulong uVar6;
int8 uVar7;
int8 *puVar8;
char *pcVar9;
size_t __nmemb;
ulong uVar10;
puVar2 = (int8 *)calloc(1,0x60);
if (puVar2 == (int8 *)0x0) {
pcVar9 = "galloc != NULL";
uVar7 = 0x179;
}
else {
__nmemb = (size_t)(int)param_2;
pvVar3 = calloc(__nmemb,8);
*puVar2 = pvVar3;
if (pvVar3 == (void *)0x0) {
pcVar9 = "galloc->bufts != NULL";
uVar7 = 0x17c;
}
else {
pvVar4 = calloc(__nmemb,8);
puVar2[1] = pvVar4;
if (pvVar4 == (void *)0x0) {
pcVar9 = "galloc->buffers != NULL";
uVar7 = 0x17f;
}
else {
pvVar5 = calloc(__nmemb,8);
puVar2[2] = pvVar5;
if (pvVar5 != (void *)0x0) {
if (0 < (int)param_2) {
uVar10 = 0;
do {
lVar1 = *(long *)(param_1 + uVar10 * 8);
*(long *)((long)pvVar3 + uVar10 * 8) = lVar1;
*(int8 *)((long)pvVar4 + uVar10 * 8) = 0;
if (uVar10 != 0) {
uVar6 = 0;
do {
if (lVar1 == *(long *)(param_1 + uVar6 * 8)) {
*(int8 *)((long)pvVar5 + uVar10 * 8) =
*(int8 *)((long)pvVar5 + uVar6 * 8);
break;
}
uVar6 = uVar6 + 1;
} while (uVar10 != uVar6);
}
if (*(long *)((long)pvVar5 + uVar10 * 8) == 0) {
uVar7 = ggml_backend_buft_get_alignment();
puVar8 = (int8 *)malloc(0x1018);
*puVar8 = uVar7;
memset(puVar8 + 1,0,0x1010);
*(int4 *)(puVar8 + 1) = 1;
puVar8[2] = 0;
puVar8[3] = 0x7fffffffffffffff;
puVar8[0x202] = 0;
*(int8 **)((long)pvVar5 + uVar10 * 8) = puVar8;
}
uVar10 = uVar10 + 1;
} while (uVar10 != param_2);
}
*(uint *)(puVar2 + 3) = param_2;
return puVar2;
}
pcVar9 = "galloc->buf_tallocs != NULL";
uVar7 = 0x182;
}
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-alloc.c"
,uVar7,"GGML_ASSERT(%s) failed",pcVar9);
}
| |
40,705 | ggml_gallocr_new_n | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-alloc.c | ggml_gallocr_t ggml_gallocr_new_n(ggml_backend_buffer_type_t * bufts, int n_bufs) {
ggml_gallocr_t galloc = (ggml_gallocr_t)calloc(1, sizeof(struct ggml_gallocr));
GGML_ASSERT(galloc != NULL);
galloc->bufts = calloc(n_bufs, sizeof(ggml_backend_buffer_type_t));
GGML_ASSERT(galloc->bufts != NULL);
galloc->buffers = calloc(n_bufs, sizeof(ggml_backend_buffer_t));
GGML_ASSERT(galloc->buffers != NULL);
galloc->buf_tallocs = calloc(n_bufs, sizeof(struct ggml_dyn_tallocr *));
GGML_ASSERT(galloc->buf_tallocs != NULL);
for (int i = 0; i < n_bufs; i++) {
galloc->bufts[i] = bufts[i];
galloc->buffers[i] = NULL;
// check if the same buffer type is used multiple times and reuse the same allocator
for (int j = 0; j < i; j++) {
if (bufts[i] == bufts[j]) {
galloc->buf_tallocs[i] = galloc->buf_tallocs[j];
break;
}
}
if (galloc->buf_tallocs[i] == NULL) {
size_t alignment = ggml_backend_buft_get_alignment(bufts[i]);
galloc->buf_tallocs[i] = ggml_dyn_tallocr_new(alignment);
}
}
galloc->n_buffers = n_bufs;
return galloc;
} | O2 | c | ggml_gallocr_new_n:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x60
popq %rsi
callq 0x1e010
testq %rax, %rax
je 0x29c9e
movq %rax, %r15
movslq %ebx, %rbp
pushq $0x8
popq %rsi
movq %rbp, %rdi
callq 0x1e010
movq %rax, (%r15)
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x29cba
pushq $0x8
popq %rsi
movq %rbp, %rdi
callq 0x1e010
movq %rax, 0x8(%r15)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x29cd6
pushq $0x8
popq %rsi
movq %rbp, %rdi
callq 0x1e010
movq %r15, 0x20(%rsp)
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x29cf2
movq %rax, %rbp
xorl %r12d, %r12d
testl %ebx, %ebx
movl $0x0, %r13d
movl %ebx, 0xc(%rsp)
cmovgl %ebx, %r13d
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
cmpq %r13, %r12
je 0x29c80
movq (%r14,%r12,8), %rdi
movq %rdi, (%rdx,%r12,8)
andq $0x0, (%rsi,%r12,8)
xorl %eax, %eax
cmpq %rax, %r12
je 0x29c19
leaq 0x1(%rax), %rcx
cmpq (%r14,%rax,8), %rdi
movq %rcx, %rax
jne 0x29bfb
movq -0x8(%rbp,%rcx,8), %rax
movq %rax, (%rbp,%r12,8)
jmp 0x29c1e
movq (%rbp,%r12,8), %rax
testq %rax, %rax
jne 0x29c78
callq 0x201e0
movq %rax, %rbx
movl $0x1018, %edi # imm = 0x1018
callq 0x1f040
movq %rax, %r15
movq %rbx, (%rax)
leaq 0x8(%rax), %rdi
movl $0x1008, %edx # imm = 0x1008
xorl %esi, %esi
callq 0x1dcc0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl $0x1, 0x8(%r15)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x18(%r15)
andq $0x0, 0x1010(%r15)
movq %r15, (%rbp,%r12,8)
incq %r12
jmp 0x29be3
movl 0xc(%rsp), %eax
movq 0x20(%rsp), %rcx
movl %eax, 0x18(%rcx)
movq %rcx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x272d3(%rip), %rdi # 0x50f78
leaq 0x24929(%rip), %rdx # 0x4e5d5
leaq 0x2744a(%rip), %rcx # 0x510fd
movl $0x179, %esi # imm = 0x179
jmp 0x29d0c
leaq 0x272b7(%rip), %rdi # 0x50f78
leaq 0x2490d(%rip), %rdx # 0x4e5d5
leaq 0x2743d(%rip), %rcx # 0x5110c
movl $0x17c, %esi # imm = 0x17C
jmp 0x29d0c
leaq 0x2729b(%rip), %rdi # 0x50f78
leaq 0x248f1(%rip), %rdx # 0x4e5d5
leaq 0x27437(%rip), %rcx # 0x51122
movl $0x17f, %esi # imm = 0x17F
jmp 0x29d0c
leaq 0x2727f(%rip), %rdi # 0x50f78
leaq 0x248d5(%rip), %rdx # 0x4e5d5
leaq 0x27433(%rip), %rcx # 0x5113a
movl $0x182, %esi # imm = 0x182
xorl %eax, %eax
callq 0x1f9b0
| ggml_gallocr_new_n:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
mov r14, rdi
push 1
pop rdi
push 60h ; '`'
pop rsi
call _calloc
test rax, rax
jz loc_29C9E
mov r15, rax
movsxd rbp, ebx
push 8
pop rsi
mov rdi, rbp
call _calloc
mov [r15], rax
mov [rsp+58h+var_40], rax
test rax, rax
jz loc_29CBA
push 8
pop rsi
mov rdi, rbp
call _calloc
mov [r15+8], rax
mov [rsp+58h+var_48], rax
test rax, rax
jz loc_29CD6
push 8
pop rsi
mov rdi, rbp
call _calloc
mov [rsp+58h+var_38], r15
mov [r15+10h], rax
test rax, rax
jz loc_29CF2
mov rbp, rax
xor r12d, r12d
test ebx, ebx
mov r13d, 0
mov [rsp+58h+var_4C], ebx
cmovg r13d, ebx
mov rdx, [rsp+58h+var_40]
mov rsi, [rsp+58h+var_48]
loc_29BE3:
cmp r12, r13
jz loc_29C80
mov rdi, [r14+r12*8]
mov [rdx+r12*8], rdi
and qword ptr [rsi+r12*8], 0
xor eax, eax
loc_29BFB:
cmp r12, rax
jz short loc_29C19
lea rcx, [rax+1]
cmp rdi, [r14+rax*8]
mov rax, rcx
jnz short loc_29BFB
mov rax, [rbp+rcx*8-8]
mov [rbp+r12*8+0], rax
jmp short loc_29C1E
loc_29C19:
mov rax, [rbp+r12*8+0]
loc_29C1E:
test rax, rax
jnz short loc_29C78
call _ggml_backend_buft_get_alignment
mov rbx, rax
mov edi, 1018h
call _malloc
mov r15, rax
mov [rax], rbx
lea rdi, [rax+8]
mov edx, 1008h
xor esi, esi
call _memset
mov rsi, [rsp+58h+var_48]
mov rdx, [rsp+58h+var_40]
mov dword ptr [r15+8], 1
mov rax, 7FFFFFFFFFFFFFFFh
mov [r15+18h], rax
and qword ptr [r15+1010h], 0
mov [rbp+r12*8+0], r15
loc_29C78:
inc r12
jmp loc_29BE3
loc_29C80:
mov eax, [rsp+58h+var_4C]
mov rcx, [rsp+58h+var_38]
mov [rcx+18h], eax
mov rax, rcx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_29C9E:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGallocNull; "galloc != NULL"
mov esi, 179h
jmp short loc_29D0C
loc_29CBA:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGallocBuftsNul; "galloc->bufts != NULL"
mov esi, 17Ch
jmp short loc_29D0C
loc_29CD6:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGallocBuffersN; "galloc->buffers != NULL"
mov esi, 17Fh
jmp short loc_29D0C
loc_29CF2:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGallocBufTallo; "galloc->buf_tallocs != NULL"
mov esi, 182h
loc_29D0C:
xor eax, eax
call _ggml_abort
| _QWORD * ggml_gallocr_new_n(
long long a1,
int a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v11; // rax
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
_QWORD *v16; // r15
long long v17; // rax
long long v18; // rax
long long v19; // rax
long long v20; // rbp
long long v21; // r12
long long v22; // r13
long long v23; // rdx
long long v24; // rsi
long long v25; // rdi
long long v26; // rax
long long v27; // rcx
long long v29; // rax
long long alignment; // rbx
long long v31; // r15
const char *v33; // rcx
int v34; // esi
char v35; // [rsp+0h] [rbp-58h]
long long v37; // [rsp+10h] [rbp-48h]
long long v38; // [rsp+18h] [rbp-40h]
_QWORD *v39; // [rsp+20h] [rbp-38h]
v11 = calloc(1LL, 96LL);
if ( !v11 )
{
v33 = "galloc != NULL";
v34 = 377;
goto LABEL_22;
}
v16 = (_QWORD *)v11;
v17 = calloc(a2, 8LL);
*v16 = v17;
v38 = v17;
if ( !v17 )
{
v33 = "galloc->bufts != NULL";
v34 = 380;
goto LABEL_22;
}
v18 = calloc(a2, 8LL);
v16[1] = v18;
v37 = v18;
if ( !v18 )
{
v33 = "galloc->buffers != NULL";
v34 = 383;
goto LABEL_22;
}
v19 = calloc(a2, 8LL);
v39 = v16;
v16[2] = v19;
if ( !v19 )
{
v33 = "galloc->buf_tallocs != NULL";
v34 = 386;
LABEL_22:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-alloc.c",
v34,
(long long)"GGML_ASSERT(%s) failed",
(long long)v33,
v12,
v13,
a3,
a4,
a5,
a6,
v14,
v15,
a9,
a10,
v35);
}
v20 = v19;
v21 = 0LL;
v22 = 0LL;
if ( a2 > 0 )
v22 = (unsigned int)a2;
v23 = v38;
v24 = v37;
while ( v21 != v22 )
{
v25 = *(_QWORD *)(a1 + 8 * v21);
*(_QWORD *)(v23 + 8 * v21) = v25;
*(_QWORD *)(v24 + 8 * v21) = 0LL;
v26 = 0LL;
while ( v21 != v26 )
{
v27 = v26 + 1;
if ( v25 == *(_QWORD *)(a1 + 8 * v26++) )
{
v29 = *(_QWORD *)(v20 + 8 * v27 - 8);
*(_QWORD *)(v20 + 8 * v21) = v29;
goto LABEL_14;
}
}
v29 = *(_QWORD *)(v20 + 8 * v21);
LABEL_14:
if ( !v29 )
{
alignment = ggml_backend_buft_get_alignment();
v31 = malloc(4120LL);
*(_QWORD *)v31 = alignment;
memset(v31 + 8, 0LL, 4104LL);
v24 = v37;
v23 = v38;
*(_DWORD *)(v31 + 8) = 1;
*(_QWORD *)(v31 + 24) = 0x7FFFFFFFFFFFFFFFLL;
*(_QWORD *)(v31 + 4112) = 0LL;
*(_QWORD *)(v20 + 8 * v21) = v31;
}
++v21;
}
*((_DWORD *)v39 + 6) = a2;
return v39;
}
| ggml_gallocr_new_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
MOV R14,RDI
PUSH 0x1
POP RDI
PUSH 0x60
POP RSI
CALL 0x0011e010
TEST RAX,RAX
JZ 0x00129c9e
MOV R15,RAX
MOVSXD RBP,EBX
PUSH 0x8
POP RSI
MOV RDI,RBP
CALL 0x0011e010
MOV qword ptr [R15],RAX
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x00129cba
PUSH 0x8
POP RSI
MOV RDI,RBP
CALL 0x0011e010
MOV qword ptr [R15 + 0x8],RAX
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x00129cd6
PUSH 0x8
POP RSI
MOV RDI,RBP
CALL 0x0011e010
MOV qword ptr [RSP + 0x20],R15
MOV qword ptr [R15 + 0x10],RAX
TEST RAX,RAX
JZ 0x00129cf2
MOV RBP,RAX
XOR R12D,R12D
TEST EBX,EBX
MOV R13D,0x0
MOV dword ptr [RSP + 0xc],EBX
CMOVG R13D,EBX
MOV RDX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
LAB_00129be3:
CMP R12,R13
JZ 0x00129c80
MOV RDI,qword ptr [R14 + R12*0x8]
MOV qword ptr [RDX + R12*0x8],RDI
AND qword ptr [RSI + R12*0x8],0x0
XOR EAX,EAX
LAB_00129bfb:
CMP R12,RAX
JZ 0x00129c19
LEA RCX,[RAX + 0x1]
CMP RDI,qword ptr [R14 + RAX*0x8]
MOV RAX,RCX
JNZ 0x00129bfb
MOV RAX,qword ptr [RBP + RCX*0x8 + -0x8]
MOV qword ptr [RBP + R12*0x8],RAX
JMP 0x00129c1e
LAB_00129c19:
MOV RAX,qword ptr [RBP + R12*0x8]
LAB_00129c1e:
TEST RAX,RAX
JNZ 0x00129c78
CALL 0x001201e0
MOV RBX,RAX
MOV EDI,0x1018
CALL 0x0011f040
MOV R15,RAX
MOV qword ptr [RAX],RBX
LEA RDI,[RAX + 0x8]
MOV EDX,0x1008
XOR ESI,ESI
CALL 0x0011dcc0
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV dword ptr [R15 + 0x8],0x1
MOV RAX,0x7fffffffffffffff
MOV qword ptr [R15 + 0x18],RAX
AND qword ptr [R15 + 0x1010],0x0
MOV qword ptr [RBP + R12*0x8],R15
LAB_00129c78:
INC R12
JMP 0x00129be3
LAB_00129c80:
MOV EAX,dword ptr [RSP + 0xc]
MOV RCX,qword ptr [RSP + 0x20]
MOV dword ptr [RCX + 0x18],EAX
MOV RAX,RCX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00129c9e:
LEA RDI,[0x150f78]
LEA RDX,[0x14e5d5]
LEA RCX,[0x1510fd]
MOV ESI,0x179
JMP 0x00129d0c
LAB_00129cba:
LEA RDI,[0x150f78]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15110c]
MOV ESI,0x17c
JMP 0x00129d0c
LAB_00129cd6:
LEA RDI,[0x150f78]
LEA RDX,[0x14e5d5]
LEA RCX,[0x151122]
MOV ESI,0x17f
JMP 0x00129d0c
LAB_00129cf2:
LEA RDI,[0x150f78]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15113a]
MOV ESI,0x182
LAB_00129d0c:
XOR EAX,EAX
CALL 0x0011f9b0
|
int8 * ggml_gallocr_new_n(long param_1,uint param_2)
{
ulong uVar1;
long lVar2;
int8 *puVar3;
void *pvVar4;
void *pvVar5;
void *pvVar6;
ulong uVar7;
long lVar8;
int8 uVar9;
int8 *puVar10;
char *pcVar11;
size_t __nmemb;
ulong uVar12;
ulong uVar13;
puVar3 = (int8 *)calloc(1,0x60);
if (puVar3 == (int8 *)0x0) {
pcVar11 = "galloc != NULL";
uVar9 = 0x179;
}
else {
__nmemb = (size_t)(int)param_2;
pvVar4 = calloc(__nmemb,8);
*puVar3 = pvVar4;
if (pvVar4 == (void *)0x0) {
pcVar11 = "galloc->bufts != NULL";
uVar9 = 0x17c;
}
else {
pvVar5 = calloc(__nmemb,8);
puVar3[1] = pvVar5;
if (pvVar5 == (void *)0x0) {
pcVar11 = "galloc->buffers != NULL";
uVar9 = 0x17f;
}
else {
pvVar6 = calloc(__nmemb,8);
puVar3[2] = pvVar6;
if (pvVar6 != (void *)0x0) {
uVar12 = 0;
uVar13 = 0;
if (0 < (int)param_2) {
uVar13 = (ulong)param_2;
}
do {
if (uVar12 == uVar13) {
*(uint *)(puVar3 + 3) = param_2;
return puVar3;
}
lVar8 = *(long *)(param_1 + uVar12 * 8);
*(long *)((long)pvVar4 + uVar12 * 8) = lVar8;
*(int8 *)((long)pvVar5 + uVar12 * 8) = 0;
uVar7 = 0;
do {
if (uVar12 == uVar7) {
lVar8 = *(long *)((long)pvVar6 + uVar12 * 8);
goto LAB_00129c1e;
}
uVar1 = uVar7 + 1;
lVar2 = uVar7 * 8;
uVar7 = uVar1;
} while (lVar8 != *(long *)(param_1 + lVar2));
lVar8 = *(long *)((long)pvVar6 + uVar1 * 8 + -8);
*(long *)((long)pvVar6 + uVar12 * 8) = lVar8;
LAB_00129c1e:
if (lVar8 == 0) {
uVar9 = ggml_backend_buft_get_alignment();
puVar10 = (int8 *)malloc(0x1018);
*puVar10 = uVar9;
memset(puVar10 + 1,0,0x1008);
*(int4 *)(puVar10 + 1) = 1;
puVar10[3] = 0x7fffffffffffffff;
puVar10[0x202] = 0;
*(int8 **)((long)pvVar6 + uVar12 * 8) = puVar10;
}
uVar12 = uVar12 + 1;
} while( true );
}
pcVar11 = "galloc->buf_tallocs != NULL";
uVar9 = 0x182;
}
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-alloc.c"
,uVar9,"GGML_ASSERT(%s) failed",pcVar11);
}
| |
40,706 | translog_check_sector_protection | eloqsql/storage/maria/ma_loghandler.c | static my_bool
translog_check_sector_protection(uchar *page, TRANSLOG_FILE *file)
{
uint i, offset;
uchar *table= page + page_overhead[page[TRANSLOG_PAGE_FLAGS]] -
TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
uint8 current= table[0];
DBUG_ENTER("translog_check_sector_protection");
for (i= 1, offset= DISK_DRIVE_SECTOR_SIZE;
i < TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
i++, offset+= DISK_DRIVE_SECTOR_SIZE)
{
/*
TODO: add chunk counting for "suspecting" sectors (difference is
more than 1-2), if difference more then present chunks then it is
the problem.
*/
uint8 test= page[offset];
DBUG_PRINT("info", ("sector: #%u offset: %u current: %lx "
"read: 0x%x stored: 0x%x%x",
i, offset, (ulong) current,
(uint) uint2korr(page + offset), (uint) table[i],
(uint) table[i + 1]));
/*
3 is minimal possible record length. So we can have "distance"
between 2 sectors value more then DISK_DRIVE_SECTOR_SIZE / 3
only if it is old value, i.e. the sector was not written.
*/
if (((test < current) &&
((uint)(0xFFL - current + test) > DISK_DRIVE_SECTOR_SIZE / 3)) ||
((test >= current) &&
((uint)(test - current) > DISK_DRIVE_SECTOR_SIZE / 3)))
{
if (translog_recover_page_up_to_sector(page, offset))
DBUG_RETURN(1);
file->was_recovered= 1;
DBUG_RETURN(0);
}
/* Restore value on the page */
page[offset]= table[i];
current= test;
DBUG_PRINT("info", ("sector: #%u offset: %u current: %lx "
"read: 0x%x stored: 0x%x",
i, offset, (ulong) current,
(uint) page[offset], (uint) table[i]));
}
DBUG_RETURN(0);
} | O3 | c | translog_check_sector_protection:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movzbl 0x6(%rdi), %ecx
leaq 0xbccd73(%rip), %rax # 0xc08070
movl (%rax,%rcx,4), %ecx
addq %rdi, %rcx
addq $-0xf, %rcx
movb -0x1(%rcx), %r9b
movl $0x400, %r12d # imm = 0x400
movb -0x200(%r14,%r12), %dl
movzbl %dl, %edi
cmpb %r9b, %dil
jae 0x3b337
movl %r9d, %r8d
notb %r8b
movzbl %r8b, %r8d
addl %edi, %r8d
cmpl $0xaa, %r8d
ja 0x3b371
cmpb %r9b, %dl
jb 0x3b34b
movzbl %r9b, %r8d
subl %r8d, %edi
cmpl $0xab, %edi
jae 0x3b371
movb (%rcx), %dil
movb %dil, -0x200(%r14,%r12)
incq %rcx
addq $0x200, %r12 # imm = 0x200
movl %edx, %r9d
cmpq $0x2200, %r12 # imm = 0x2200
jne 0x3b311
jmp 0x3b433
movq %rsi, -0x30(%rbp)
leaq -0x200(%r12), %rbx
movzbl 0x6(%r14), %ecx
movsbl (%rax,%rcx,4), %r13d
movzwl %r13w, %r15d
movb (%r14,%r15), %al
cmpw %bx, %r13w
jae 0x3b3d3
cmpb $-0x1, %al
je 0x3b40a
movq %r14, %rdi
movl %r15d, %esi
callq 0x36d60
movl %eax, %ecx
movb $0x1, %al
testw %cx, %cx
je 0x3b435
movzwl %cx, %edx
addq %r15, %rdx
cmpq $0x2001, %rdx # imm = 0x2001
movl $0x0, %esi
cmovael %esi, %ecx
addl %ecx, %r13d
cmpl $0x2001, %edx # imm = 0x2001
jb 0x3b387
jmp 0x3b435
cmpb $-0x1, %al
movq -0x30(%rbp), %rbx
je 0x3b417
movzwl %r13w, %esi
movq %r14, %rdi
callq 0x36d60
testw %ax, %ax
je 0x3b410
movzwl %ax, %ecx
addq %rcx, %r15
cmpq %r12, %r15
ja 0x3b410
addl %r13d, %eax
movzwl %ax, %r15d
cmpb $-0x1, (%r14,%r15)
movl %eax, %r13d
jne 0x3b3db
jmp 0x3b413
movq -0x30(%rbp), %rbx
jmp 0x3b417
movl %r13d, %eax
movzwl %ax, %r15d
addq %r15, %r14
movl $0x2000, %edx # imm = 0x2000
subl %r15d, %edx
movq %r14, %rdi
movl $0xff, %esi
callq 0x2a2c0
movb $0x1, 0x50(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| translog_check_sector_protection:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
movzx ecx, byte ptr [rdi+6]
lea rax, page_overhead
mov ecx, [rax+rcx*4]
add rcx, rdi
add rcx, 0FFFFFFFFFFFFFFF1h
mov r9b, [rcx-1]
mov r12d, 400h
loc_3B311:
mov dl, [r14+r12-200h]
movzx edi, dl
cmp dil, r9b
jnb short loc_3B337
mov r8d, r9d
not r8b
movzx r8d, r8b
add r8d, edi
cmp r8d, 0AAh
ja short loc_3B371
loc_3B337:
cmp dl, r9b
jb short loc_3B34B
movzx r8d, r9b
sub edi, r8d
cmp edi, 0ABh
jnb short loc_3B371
loc_3B34B:
mov dil, [rcx]
mov [r14+r12-200h], dil
inc rcx
add r12, 200h
mov r9d, edx
cmp r12, 2200h
jnz short loc_3B311
jmp loc_3B433
loc_3B371:
mov [rbp+var_30], rsi
lea rbx, [r12-200h]
movzx ecx, byte ptr [r14+6]
movsx r13d, byte ptr [rax+rcx*4]
loc_3B387:
movzx r15d, r13w
mov al, [r14+r15]
cmp r13w, bx
jnb short loc_3B3D3
cmp al, 0FFh
jz short loc_3B40A
mov rdi, r14
mov esi, r15d
call translog_get_total_chunk_length
mov ecx, eax
mov al, 1
test cx, cx
jz loc_3B435
movzx edx, cx
add rdx, r15
cmp rdx, 2001h
mov esi, 0
cmovnb ecx, esi
add r13d, ecx
cmp edx, 2001h
jb short loc_3B387
jmp short loc_3B435
loc_3B3D3:
cmp al, 0FFh
mov rbx, [rbp+var_30]
jz short loc_3B417
loc_3B3DB:
movzx esi, r13w
mov rdi, r14
call translog_get_total_chunk_length
test ax, ax
jz short loc_3B410
movzx ecx, ax
add r15, rcx
cmp r15, r12
ja short loc_3B410
add eax, r13d
movzx r15d, ax
cmp byte ptr [r14+r15], 0FFh
mov r13d, eax
jnz short loc_3B3DB
jmp short loc_3B413
loc_3B40A:
mov rbx, [rbp+var_30]
jmp short loc_3B417
loc_3B410:
mov eax, r13d
loc_3B413:
movzx r15d, ax
loc_3B417:
add r14, r15
mov edx, 2000h
sub edx, r15d
mov rdi, r14
mov esi, 0FFh
call _memset
mov byte ptr [rbx+50h], 1
loc_3B433:
xor eax, eax
loc_3B435:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char translog_check_sector_protection(long long a1, long long a2)
{
_BYTE *v2; // rcx
unsigned __int8 v3; // r9
unsigned long long v4; // r12
unsigned __int8 v5; // dl
int v6; // r13d
long long v7; // r15
char v8; // al
int total_chunk_length; // ecx
char result; // al
unsigned long long v11; // rdx
long long v12; // rbx
int v13; // eax
int v14; // eax
v2 = (_BYTE *)(a1 + *((unsigned int *)&page_overhead + *(unsigned __int8 *)(a1 + 6)) - 15);
v3 = *(_BYTE *)(a1 + *((unsigned int *)&page_overhead + *(unsigned __int8 *)(a1 + 6)) - 16);
v4 = 1024LL;
while ( 1 )
{
v5 = *(_BYTE *)(a1 + v4 - 512);
if ( v5 < v3 && v5 + (unsigned int)(unsigned __int8)~v3 > 0xAA )
break;
if ( v5 >= v3 && v5 - (unsigned int)v3 >= 0xAB )
break;
*(_BYTE *)(a1 + v4 - 512) = *v2++;
v4 += 512LL;
v3 = v5;
if ( v4 == 8704 )
return 0;
}
v6 = *((char *)&page_overhead + 4 * *(unsigned __int8 *)(a1 + 6));
while ( 1 )
{
v7 = (unsigned __int16)v6;
v8 = *(_BYTE *)(a1 + (unsigned __int16)v6);
if ( (unsigned __int16)v6 >= (unsigned __int16)(v4 - 512) )
break;
if ( v8 == -1 )
{
v12 = a2;
goto LABEL_24;
}
total_chunk_length = translog_get_total_chunk_length(a1, (unsigned __int16)v6);
result = 1;
if ( (_WORD)total_chunk_length )
{
v11 = (unsigned __int16)v6 + (unsigned long long)(unsigned __int16)total_chunk_length;
if ( v11 >= 0x2001 )
total_chunk_length = 0;
v6 += total_chunk_length;
if ( (unsigned int)v11 < 0x2001 )
continue;
}
return result;
}
v12 = a2;
if ( v8 != -1 )
{
while ( 1 )
{
v13 = translog_get_total_chunk_length(a1, (unsigned __int16)v6);
if ( !(_WORD)v13 || (unsigned long long)(unsigned __int16)v13 + v7 > v4 )
break;
v14 = v6 + v13;
v7 = (unsigned __int16)v14;
v6 = v14;
if ( *(_BYTE *)(a1 + (unsigned __int16)v14) == 0xFF )
goto LABEL_23;
}
LOWORD(v14) = v6;
LABEL_23:
v7 = (unsigned __int16)v14;
}
LABEL_24:
memset(v7 + a1, 255LL, (unsigned int)(0x2000 - v7));
*(_BYTE *)(v12 + 80) = 1;
return 0;
}
| translog_check_sector_protection:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOVZX ECX,byte ptr [RDI + 0x6]
LEA RAX,[0xd08070]
MOV ECX,dword ptr [RAX + RCX*0x4]
ADD RCX,RDI
ADD RCX,-0xf
MOV R9B,byte ptr [RCX + -0x1]
MOV R12D,0x400
LAB_0013b311:
MOV DL,byte ptr [R14 + R12*0x1 + -0x200]
MOVZX EDI,DL
CMP DIL,R9B
JNC 0x0013b337
MOV R8D,R9D
NOT R8B
MOVZX R8D,R8B
ADD R8D,EDI
CMP R8D,0xaa
JA 0x0013b371
LAB_0013b337:
CMP DL,R9B
JC 0x0013b34b
MOVZX R8D,R9B
SUB EDI,R8D
CMP EDI,0xab
JNC 0x0013b371
LAB_0013b34b:
MOV DIL,byte ptr [RCX]
MOV byte ptr [R14 + R12*0x1 + -0x200],DIL
INC RCX
ADD R12,0x200
MOV R9D,EDX
CMP R12,0x2200
JNZ 0x0013b311
JMP 0x0013b433
LAB_0013b371:
MOV qword ptr [RBP + -0x30],RSI
LEA RBX,[R12 + -0x200]
MOVZX ECX,byte ptr [R14 + 0x6]
MOVSX R13D,byte ptr [RAX + RCX*0x4]
LAB_0013b387:
MOVZX R15D,R13W
MOV AL,byte ptr [R14 + R15*0x1]
CMP R13W,BX
JNC 0x0013b3d3
CMP AL,0xff
JZ 0x0013b40a
MOV RDI,R14
MOV ESI,R15D
CALL 0x00136d60
MOV ECX,EAX
MOV AL,0x1
TEST CX,CX
JZ 0x0013b435
MOVZX EDX,CX
ADD RDX,R15
CMP RDX,0x2001
MOV ESI,0x0
CMOVNC ECX,ESI
ADD R13D,ECX
CMP EDX,0x2001
JC 0x0013b387
JMP 0x0013b435
LAB_0013b3d3:
CMP AL,0xff
MOV RBX,qword ptr [RBP + -0x30]
JZ 0x0013b417
LAB_0013b3db:
MOVZX ESI,R13W
MOV RDI,R14
CALL 0x00136d60
TEST AX,AX
JZ 0x0013b410
MOVZX ECX,AX
ADD R15,RCX
CMP R15,R12
JA 0x0013b410
ADD EAX,R13D
MOVZX R15D,AX
CMP byte ptr [R14 + R15*0x1],0xff
MOV R13D,EAX
JNZ 0x0013b3db
JMP 0x0013b413
LAB_0013b40a:
MOV RBX,qword ptr [RBP + -0x30]
JMP 0x0013b417
LAB_0013b410:
MOV EAX,R13D
LAB_0013b413:
MOVZX R15D,AX
LAB_0013b417:
ADD R14,R15
MOV EDX,0x2000
SUB EDX,R15D
MOV RDI,R14
MOV ESI,0xff
CALL 0x0012a2c0
MOV byte ptr [RBX + 0x50],0x1
LAB_0013b433:
XOR EAX,EAX
LAB_0013b435:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 translog_check_sector_protection(long param_1,long param_2)
{
byte bVar1;
ushort uVar2;
int1 *puVar3;
ulong uVar4;
byte bVar5;
ulong uVar6;
ushort uVar7;
ulong uVar8;
puVar3 = (int1 *)
((ulong)*(uint *)(page_overhead + (ulong)*(byte *)(param_1 + 6) * 4) + param_1 + -0xf);
uVar6 = 0x400;
bVar5 = *(byte *)((ulong)*(uint *)(page_overhead + (ulong)*(byte *)(param_1 + 6) * 4) + param_1 +
-0x10);
while( true ) {
bVar1 = *(byte *)(param_1 + -0x200 + uVar6);
if (((bVar1 < bVar5) && (0xaa < (uint)(byte)~bVar5 + (uint)bVar1)) ||
((bVar5 <= bVar1 && (0xaa < (uint)bVar1 - (uint)bVar5)))) break;
*(int1 *)(param_1 + -0x200 + uVar6) = *puVar3;
puVar3 = puVar3 + 1;
uVar6 = uVar6 + 0x200;
bVar5 = bVar1;
if (uVar6 == 0x2200) {
return 0;
}
}
uVar7 = (ushort)(char)page_overhead[(ulong)*(byte *)(param_1 + 6) * 4];
while( true ) {
uVar8 = (ulong)uVar7;
if ((ushort)((short)uVar6 - 0x200U) <= uVar7) break;
if (*(char *)(param_1 + uVar8) == -1) goto LAB_0013b417;
uVar2 = translog_get_total_chunk_length(param_1,uVar8);
if (uVar2 == 0) {
return 1;
}
uVar4 = (ulong)uVar2;
if (0x2000 < uVar4 + uVar8) {
uVar2 = 0;
}
uVar7 = uVar7 + uVar2;
if (0x2000 < (uint)(uVar4 + uVar8)) {
return 1;
}
}
if (*(char *)(param_1 + uVar8) != -1) {
do {
uVar2 = translog_get_total_chunk_length(param_1,uVar7);
if ((uVar2 == 0) || (uVar6 < uVar8 + uVar2)) break;
uVar7 = uVar2 + uVar7;
uVar8 = (ulong)uVar7;
} while (*(char *)(param_1 + uVar8) != -1);
uVar8 = (ulong)uVar7;
}
LAB_0013b417:
memset((void *)(param_1 + uVar8),0xff,(ulong)(0x2000 - (int)uVar8));
*(int1 *)(param_2 + 0x50) = 1;
return 0;
}
| |
40,707 | ImageDrawLine | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color)
{
// Calculate differences in coordinates
int shortLen = endPosY - startPosY;
int longLen = endPosX - startPosX;
bool yLonger = false;
// Determine if the line is more vertical than horizontal
if (abs(shortLen) > abs(longLen))
{
// Swap the lengths if the line is more vertical
int temp = shortLen;
shortLen = longLen;
longLen = temp;
yLonger = true;
}
// Initialize variables for drawing loop
int endVal = longLen;
int sgnInc = 1;
// Adjust direction increment based on longLen sign
if (longLen < 0)
{
longLen = -longLen;
sgnInc = -1;
}
// Calculate fixed-point increment for shorter length
int decInc = (longLen == 0)? 0 : (shortLen << 16)/longLen;
// Draw the line pixel by pixel
if (yLonger)
{
// If line is more vertical, iterate over y-axis
for (int i = 0, j = 0; i != endVal; i += sgnInc, j += decInc)
{
// Calculate pixel position and draw it
ImageDrawPixel(dst, startPosX + (j >> 16), startPosY + i, color);
}
}
else
{
// If line is more horizontal, iterate over x-axis
for (int i = 0, j = 0; i != endVal; i += sgnInc, j += decInc)
{
// Calculate pixel position and draw it
ImageDrawPixel(dst, startPosX + i, startPosY + (j >> 16), color);
}
}
} | O2 | c | ImageDrawLine:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x4(%rsp)
movq %rdx, 0x10(%rsp)
subl %edx, %r8d
movq %rsi, 0x8(%rsp)
subl %esi, %ecx
movl %r8d, %esi
negl %esi
cmovsl %r8d, %esi
movl %ecx, %r9d
negl %r9d
cmovsl %ecx, %r9d
cmpl %r9d, %esi
movl %ecx, %r13d
cmoval %r8d, %r13d
movq %rdi, %r12
movl %r13d, %ebx
sarl $0x1f, %ebx
testl %r13d, %r13d
je 0x8534e
movl %r13d, %edi
negl %edi
cmovsl %r13d, %edi
cmpl %r9d, %esi
cmoval %ecx, %r8d
shll $0x10, %r8d
movl %r8d, %eax
cltd
idivl %edi
movl %eax, %ebp
jmp 0x85350
xorl %ebp, %ebp
orl $0x1, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpl %r9d, %esi
jbe 0x8538a
cmpl %r14d, %r13d
je 0x853b6
movl %r15d, %esi
sarl $0x10, %esi
addl 0x8(%rsp), %esi
movq 0x10(%rsp), %rax
leal (%rax,%r14), %edx
movq %r12, %rdi
movl 0x4(%rsp), %ecx
callq 0x84b48
addl %ebx, %r14d
addl %ebp, %r15d
jmp 0x8535e
cmpl %r14d, %r13d
je 0x853b6
movq 0x8(%rsp), %rax
leal (%rax,%r14), %esi
movl %r15d, %edx
sarl $0x10, %edx
addl 0x10(%rsp), %edx
movq %r12, %rdi
movl 0x4(%rsp), %ecx
callq 0x84b48
addl %ebx, %r14d
addl %ebp, %r15d
jmp 0x8538a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ImageDrawLine:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_44], r9d
mov [rsp+48h+var_38], rdx
sub r8d, edx
mov [rsp+48h+var_40], rsi
sub ecx, esi
mov esi, r8d
neg esi
cmovs esi, r8d
mov r9d, ecx
neg r9d
cmovs r9d, ecx
cmp esi, r9d
mov r13d, ecx
cmova r13d, r8d
mov r12, rdi
mov ebx, r13d
sar ebx, 1Fh
test r13d, r13d
jz short loc_8534E
mov edi, r13d
neg edi
cmovs edi, r13d
cmp esi, r9d
cmova r8d, ecx
shl r8d, 10h
mov eax, r8d
cdq
idiv edi
mov ebp, eax
jmp short loc_85350
loc_8534E:
xor ebp, ebp
loc_85350:
or ebx, 1
xor r14d, r14d
xor r15d, r15d
cmp esi, r9d
jbe short loc_8538A
loc_8535E:
cmp r13d, r14d
jz short loc_853B6
mov esi, r15d
sar esi, 10h
add esi, dword ptr [rsp+48h+var_40]
mov rax, [rsp+48h+var_38]
lea edx, [rax+r14]
mov rdi, r12
mov ecx, [rsp+48h+var_44]
call ImageDrawPixel
add r14d, ebx
add r15d, ebp
jmp short loc_8535E
loc_8538A:
cmp r13d, r14d
jz short loc_853B6
mov rax, [rsp+48h+var_40]
lea esi, [rax+r14]
mov edx, r15d
sar edx, 10h
add edx, dword ptr [rsp+48h+var_38]
mov rdi, r12
mov ecx, [rsp+48h+var_44]
call ImageDrawPixel
add r14d, ebx
add r15d, ebp
jmp short loc_8538A
loc_853B6:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char ImageDrawLine(long long *a1, int a2, int a3, int a4, int a5, unsigned int a6)
{
int v6; // r8d
int v7; // ecx
unsigned int v8; // esi
unsigned int v9; // r9d
int v10; // r13d
int v12; // edi
int v13; // eax
int v14; // ebp
int v15; // ebx
int v16; // r14d
int v17; // r15d
v6 = a5 - a3;
v7 = a4 - a2;
v8 = -v6;
if ( v6 > 0 )
v8 = v6;
v9 = -v7;
if ( v7 > 0 )
v9 = v7;
v10 = v7;
if ( v8 > v9 )
v10 = v6;
if ( v10 )
{
v12 = -v10;
if ( v10 > 0 )
v12 = v10;
if ( v8 > v9 )
v6 = v7;
v13 = (v6 << 16) / v12;
v14 = v13;
}
else
{
v14 = 0;
}
v15 = (v10 >> 31) | 1;
v16 = 0;
v17 = 0;
if ( v8 <= v9 )
{
while ( v10 != v16 )
{
LOBYTE(v13) = ImageDrawPixel(a1, a2 + v16, a3 + (v17 >> 16), a6);
v16 += v15;
v17 += v14;
}
}
else
{
while ( v10 != v16 )
{
LOBYTE(v13) = ImageDrawPixel(a1, a2 + (v17 >> 16), a3 + v16, a6);
v16 += v15;
v17 += v14;
}
}
return v13;
}
| ImageDrawLine:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RSP + 0x4],R9D
MOV qword ptr [RSP + 0x10],RDX
SUB R8D,EDX
MOV qword ptr [RSP + 0x8],RSI
SUB ECX,ESI
MOV ESI,R8D
NEG ESI
CMOVS ESI,R8D
MOV R9D,ECX
NEG R9D
CMOVS R9D,ECX
CMP ESI,R9D
MOV R13D,ECX
CMOVA R13D,R8D
MOV R12,RDI
MOV EBX,R13D
SAR EBX,0x1f
TEST R13D,R13D
JZ 0x0018534e
MOV EDI,R13D
NEG EDI
CMOVS EDI,R13D
CMP ESI,R9D
CMOVA R8D,ECX
SHL R8D,0x10
MOV EAX,R8D
CDQ
IDIV EDI
MOV EBP,EAX
JMP 0x00185350
LAB_0018534e:
XOR EBP,EBP
LAB_00185350:
OR EBX,0x1
XOR R14D,R14D
XOR R15D,R15D
CMP ESI,R9D
JBE 0x0018538a
LAB_0018535e:
CMP R13D,R14D
JZ 0x001853b6
MOV ESI,R15D
SAR ESI,0x10
ADD ESI,dword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
LEA EDX,[RAX + R14*0x1]
MOV RDI,R12
MOV ECX,dword ptr [RSP + 0x4]
CALL 0x00184b48
ADD R14D,EBX
ADD R15D,EBP
JMP 0x0018535e
LAB_0018538a:
CMP R13D,R14D
JZ 0x001853b6
MOV RAX,qword ptr [RSP + 0x8]
LEA ESI,[RAX + R14*0x1]
MOV EDX,R15D
SAR EDX,0x10
ADD EDX,dword ptr [RSP + 0x10]
MOV RDI,R12
MOV ECX,dword ptr [RSP + 0x4]
CALL 0x00184b48
ADD R14D,EBX
ADD R15D,EBP
JMP 0x0018538a
LAB_001853b6:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ImageDrawLine(int8 param_1,int param_2,int param_3,int param_4,int param_5,
int4 param_6)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
int iVar5;
uint uVar6;
uint uVar7;
int iVar8;
uVar6 = param_5 - param_3;
uVar4 = param_4 - param_2;
uVar1 = -uVar6;
if (0 < (int)uVar6) {
uVar1 = uVar6;
}
uVar7 = -uVar4;
if (0 < (int)uVar4) {
uVar7 = uVar4;
}
uVar2 = uVar4;
if (uVar7 < uVar1) {
uVar2 = uVar6;
}
if (uVar2 == 0) {
iVar5 = 0;
}
else {
uVar3 = -uVar2;
if (0 < (int)uVar2) {
uVar3 = uVar2;
}
if (uVar7 < uVar1) {
uVar6 = uVar4;
}
iVar5 = (int)(uVar6 << 0x10) / (int)uVar3;
}
uVar6 = (int)uVar2 >> 0x1f | 1;
uVar4 = 0;
iVar8 = 0;
if (uVar7 < uVar1) {
for (; uVar2 != uVar4; uVar4 = uVar4 + uVar6) {
ImageDrawPixel(param_1,(iVar8 >> 0x10) + param_2,param_3 + uVar4,param_6);
iVar8 = iVar8 + iVar5;
}
}
else {
for (; uVar2 != uVar4; uVar4 = uVar4 + uVar6) {
ImageDrawPixel(param_1,param_2 + uVar4,(iVar8 >> 0x10) + param_3,param_6);
iVar8 = iVar8 + iVar5;
}
}
return;
}
| |
40,708 | ImageDrawLine | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color)
{
// Calculate differences in coordinates
int shortLen = endPosY - startPosY;
int longLen = endPosX - startPosX;
bool yLonger = false;
// Determine if the line is more vertical than horizontal
if (abs(shortLen) > abs(longLen))
{
// Swap the lengths if the line is more vertical
int temp = shortLen;
shortLen = longLen;
longLen = temp;
yLonger = true;
}
// Initialize variables for drawing loop
int endVal = longLen;
int sgnInc = 1;
// Adjust direction increment based on longLen sign
if (longLen < 0)
{
longLen = -longLen;
sgnInc = -1;
}
// Calculate fixed-point increment for shorter length
int decInc = (longLen == 0)? 0 : (shortLen << 16)/longLen;
// Draw the line pixel by pixel
if (yLonger)
{
// If line is more vertical, iterate over y-axis
for (int i = 0, j = 0; i != endVal; i += sgnInc, j += decInc)
{
// Calculate pixel position and draw it
ImageDrawPixel(dst, startPosX + (j >> 16), startPosY + i, color);
}
}
else
{
// If line is more horizontal, iterate over x-axis
for (int i = 0, j = 0; i != endVal; i += sgnInc, j += decInc)
{
// Calculate pixel position and draw it
ImageDrawPixel(dst, startPosX + i, startPosY + (j >> 16), color);
}
}
} | O3 | c | ImageDrawLine:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
subl %edx, %r8d
subl %esi, %ecx
movl %r8d, %ebx
negl %ebx
cmovsl %r8d, %ebx
movl %ecx, %r14d
negl %r14d
cmovsl %ecx, %r14d
cmpl %r14d, %ebx
movl %ecx, %eax
cmoval %r8d, %eax
testl %eax, %eax
je 0x99d42
movl %r9d, %r10d
movl %edx, %r11d
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movl %eax, %ebp
sarl $0x1f, %ebp
orl $0x1, %ebp
movl %eax, %r9d
negl %r9d
movl %eax, 0x4(%rsp)
cmovsl %eax, %r9d
cmpl %r14d, %ebx
cmoval %ecx, %r8d
shll $0x10, %r8d
movl %r8d, %eax
cltd
idivl %r9d
movl %eax, %r13d
cmpl %r14d, %ebx
movl %r10d, %r15d
movq %r11, %rbx
jbe 0x99d00
xorl %r12d, %r12d
xorl %r14d, %r14d
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rdi
movl %r12d, %esi
sarl $0x10, %esi
addl %eax, %esi
leal (%r11,%r14), %edx
movl %r10d, %ecx
callq 0x99487
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rbx, %r11
movl %r15d, %r10d
addl %ebp, %r14d
addl %r13d, %r12d
cmpl %r14d, 0x4(%rsp)
jne 0x99ccd
jmp 0x99d42
xorl %r12d, %r12d
xorl %r14d, %r14d
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rdi
leal (%rax,%r14), %esi
movl %r12d, %edx
sarl $0x10, %edx
addl %r11d, %edx
movl %r10d, %ecx
callq 0x99487
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rbx, %r11
movl %r15d, %r10d
addl %ebp, %r14d
addl %r13d, %r12d
cmpl %r14d, 0x4(%rsp)
jne 0x99d10
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ImageDrawLine:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
sub r8d, edx
sub ecx, esi
mov ebx, r8d
neg ebx
cmovs ebx, r8d
mov r14d, ecx
neg r14d
cmovs r14d, ecx
cmp ebx, r14d
mov eax, ecx
cmova eax, r8d
test eax, eax
jz loc_99D42
mov r10d, r9d
mov r11d, edx
mov [rsp+48h+var_40], rdi
mov [rsp+48h+var_38], rsi
mov ebp, eax
sar ebp, 1Fh
or ebp, 1
mov r9d, eax
neg r9d
mov [rsp+48h+var_44], eax
cmovs r9d, eax
cmp ebx, r14d
cmova r8d, ecx
shl r8d, 10h
mov eax, r8d
cdq
idiv r9d
mov r13d, eax
cmp ebx, r14d
mov r15d, r10d
mov rbx, r11
jbe short loc_99D00
xor r12d, r12d
xor r14d, r14d
mov rax, [rsp+48h+var_38]
mov rdi, [rsp+48h+var_40]
loc_99CCD:
mov esi, r12d
sar esi, 10h
add esi, eax
lea edx, [r11+r14]
mov ecx, r10d
call ImageDrawPixel
mov rdi, [rsp+48h+var_40]
mov rax, [rsp+48h+var_38]
mov r11, rbx
mov r10d, r15d
add r14d, ebp
add r12d, r13d
cmp [rsp+48h+var_44], r14d
jnz short loc_99CCD
jmp short loc_99D42
loc_99D00:
xor r12d, r12d
xor r14d, r14d
mov rax, [rsp+48h+var_38]
mov rdi, [rsp+48h+var_40]
loc_99D10:
lea esi, [rax+r14]
mov edx, r12d
sar edx, 10h
add edx, r11d
mov ecx, r10d
call ImageDrawPixel
mov rdi, [rsp+48h+var_40]
mov rax, [rsp+48h+var_38]
mov r11, rbx
mov r10d, r15d
add r14d, ebp
add r12d, r13d
cmp [rsp+48h+var_44], r14d
jnz short loc_99D10
loc_99D42:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ImageDrawLine(long long *a1, long long a2, int a3, int a4, int a5, unsigned int a6)
{
int v6; // r8d
int v7; // ecx
unsigned int v8; // ebx
unsigned int v9; // r14d
long long result; // rax
int v12; // r11d
int v13; // ebp
int v14; // r9d
int v15; // r13d
bool v16; // cc
unsigned int v17; // r15d
int v19; // r12d
int v20; // r14d
int v21; // r12d
int v22; // r14d
int v23; // [rsp+4h] [rbp-44h]
long long *v24; // [rsp+8h] [rbp-40h]
v6 = a5 - a3;
v7 = a4 - a2;
v8 = -v6;
if ( v6 > 0 )
v8 = v6;
v9 = -v7;
if ( v7 > 0 )
v9 = v7;
result = (unsigned int)v7;
if ( v8 > v9 )
result = (unsigned int)v6;
if ( (_DWORD)result )
{
v12 = a3;
v24 = a1;
v13 = ((int)result >> 31) | 1;
v14 = -(int)result;
v23 = result;
if ( (int)result > 0 )
v14 = result;
if ( v8 > v9 )
v6 = v7;
v15 = (v6 << 16) / v14;
v16 = v8 <= v9;
v17 = a6;
if ( v16 )
{
v21 = 0;
v22 = 0;
LODWORD(result) = a2;
do
{
ImageDrawPixel(a1, result + v22, v12 + (v21 >> 16), a6);
a1 = v24;
result = a2;
v12 = a3;
a6 = v17;
v22 += v13;
v21 += v15;
}
while ( v23 != v22 );
}
else
{
v19 = 0;
v20 = 0;
LODWORD(result) = a2;
do
{
ImageDrawPixel(a1, result + (v19 >> 16), v12 + v20, a6);
a1 = v24;
result = a2;
v12 = a3;
a6 = v17;
v20 += v13;
v19 += v15;
}
while ( v23 != v20 );
}
}
return result;
}
| ImageDrawLine:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
SUB R8D,EDX
SUB ECX,ESI
MOV EBX,R8D
NEG EBX
CMOVS EBX,R8D
MOV R14D,ECX
NEG R14D
CMOVS R14D,ECX
CMP EBX,R14D
MOV EAX,ECX
CMOVA EAX,R8D
TEST EAX,EAX
JZ 0x00199d42
MOV R10D,R9D
MOV R11D,EDX
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV EBP,EAX
SAR EBP,0x1f
OR EBP,0x1
MOV R9D,EAX
NEG R9D
MOV dword ptr [RSP + 0x4],EAX
CMOVS R9D,EAX
CMP EBX,R14D
CMOVA R8D,ECX
SHL R8D,0x10
MOV EAX,R8D
CDQ
IDIV R9D
MOV R13D,EAX
CMP EBX,R14D
MOV R15D,R10D
MOV RBX,R11
JBE 0x00199d00
XOR R12D,R12D
XOR R14D,R14D
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x8]
LAB_00199ccd:
MOV ESI,R12D
SAR ESI,0x10
ADD ESI,EAX
LEA EDX,[R11 + R14*0x1]
MOV ECX,R10D
CALL 0x00199487
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
MOV R11,RBX
MOV R10D,R15D
ADD R14D,EBP
ADD R12D,R13D
CMP dword ptr [RSP + 0x4],R14D
JNZ 0x00199ccd
JMP 0x00199d42
LAB_00199d00:
XOR R12D,R12D
XOR R14D,R14D
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x8]
LAB_00199d10:
LEA ESI,[RAX + R14*0x1]
MOV EDX,R12D
SAR EDX,0x10
ADD EDX,R11D
MOV ECX,R10D
CALL 0x00199487
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
MOV R11,RBX
MOV R10D,R15D
ADD R14D,EBP
ADD R12D,R13D
CMP dword ptr [RSP + 0x4],R14D
JNZ 0x00199d10
LAB_00199d42:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ImageDrawLine(int8 param_1,int param_2,int param_3,int param_4,int param_5,
int4 param_6)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
int iVar6;
int iVar7;
uint uVar8;
uint uVar9;
uVar5 = param_5 - param_3;
uVar3 = param_4 - param_2;
uVar9 = -uVar5;
if (0 < (int)uVar5) {
uVar9 = uVar5;
}
uVar8 = -uVar3;
if (0 < (int)uVar3) {
uVar8 = uVar3;
}
uVar2 = uVar3;
if (uVar8 < uVar9) {
uVar2 = uVar5;
}
if (uVar2 != 0) {
uVar4 = (int)uVar2 >> 0x1f | 1;
uVar1 = -uVar2;
if (0 < (int)uVar2) {
uVar1 = uVar2;
}
if (uVar8 < uVar9) {
uVar5 = uVar3;
}
iVar7 = (int)(uVar5 << 0x10) / (int)uVar1;
if (uVar8 < uVar9) {
iVar6 = 0;
uVar9 = 0;
do {
ImageDrawPixel(param_1,(iVar6 >> 0x10) + param_2,param_3 + uVar9,param_6);
uVar9 = uVar9 + uVar4;
iVar6 = iVar6 + iVar7;
} while (uVar2 != uVar9);
}
else {
iVar6 = 0;
uVar9 = 0;
do {
ImageDrawPixel(param_1,param_2 + uVar9,(iVar6 >> 0x10) + param_3,param_6);
uVar9 = uVar9 + uVar4;
iVar6 = iVar6 + iVar7;
} while (uVar2 != uVar9);
}
}
return;
}
| |
40,709 | plutovg_font_face_get_glyph_metrics | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c | void plutovg_font_face_get_glyph_metrics(plutovg_font_face_t* face, float size, plutovg_codepoint_t codepoint, float* advance_width, float* left_side_bearing, plutovg_rect_t* extents)
{
float scale = plutovg_font_face_get_scale(face, size);
glyph_t* glyph = plutovg_font_face_get_glyph(face, codepoint);
if(advance_width) *advance_width = glyph->advance_width * scale;
if(left_side_bearing) *left_side_bearing = glyph->left_side_bearing * scale;
if(extents) {
extents->x = glyph->x1 * scale;
extents->y = glyph->y2 * -scale;
extents->w = (glyph->x2 - glyph->x1) * scale;
extents->h = (glyph->y1 - glyph->y2) * -scale;
}
} | O1 | c | plutovg_font_face_get_glyph_metrics:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq 0x28(%rdi), %rax
movslq 0x3c(%rdi), %rcx
movzwl 0x12(%rax,%rcx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movaps %xmm0, (%rsp)
callq 0x51c2
movaps (%rsp), %xmm2
testq %r15, %r15
je 0x5144
xorps %xmm0, %xmm0
cvtsi2ssl 0x10(%rax), %xmm0
mulss %xmm2, %xmm0
movss %xmm0, (%r15)
testq %r14, %r14
je 0x515a
xorps %xmm0, %xmm0
cvtsi2ssl 0x14(%rax), %xmm0
mulss %xmm2, %xmm0
movss %xmm0, (%r14)
testq %rbx, %rbx
je 0x51b8
movl 0x18(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
mulss %xmm2, %xmm0
movss %xmm0, (%rbx)
movl 0x24(%rax), %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
movaps 0x1e0fe(%rip), %xmm1 # 0x23280
xorps %xmm2, %xmm1
mulss %xmm1, %xmm0
movss %xmm0, 0x4(%rbx)
movl 0x20(%rax), %esi
subl %ecx, %esi
xorps %xmm0, %xmm0
cvtsi2ss %esi, %xmm0
mulss %xmm2, %xmm0
movss %xmm0, 0x8(%rbx)
movl 0x1c(%rax), %eax
subl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0xc(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| plutovg_font_face_get_glyph_metrics:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov rax, [rdi+28h]
movsxd rcx, dword ptr [rdi+3Ch]
movzx eax, word ptr [rax+rcx+12h]
rol ax, 8
movzx eax, ax
cvtsi2ss xmm1, eax
divss xmm0, xmm1
movaps [rsp+28h+var_28], xmm0
call plutovg_font_face_get_glyph
movaps xmm2, [rsp+28h+var_28]
test r15, r15
jz short loc_5144
xorps xmm0, xmm0
cvtsi2ss xmm0, dword ptr [rax+10h]
mulss xmm0, xmm2
movss dword ptr [r15], xmm0
loc_5144:
test r14, r14
jz short loc_515A
xorps xmm0, xmm0
cvtsi2ss xmm0, dword ptr [rax+14h]
mulss xmm0, xmm2
movss dword ptr [r14], xmm0
loc_515A:
test rbx, rbx
jz short loc_51B8
mov ecx, [rax+18h]
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
mulss xmm0, xmm2
movss dword ptr [rbx], xmm0
mov edx, [rax+24h]
xorps xmm0, xmm0
cvtsi2ss xmm0, edx
movaps xmm1, cs:xmmword_23280
xorps xmm1, xmm2
mulss xmm0, xmm1
movss dword ptr [rbx+4], xmm0
mov esi, [rax+20h]
sub esi, ecx
xorps xmm0, xmm0
cvtsi2ss xmm0, esi
mulss xmm0, xmm2
movss dword ptr [rbx+8], xmm0
mov eax, [rax+1Ch]
sub eax, edx
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
mulss xmm0, xmm1
movss dword ptr [rbx+0Ch], xmm0
loc_51B8:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| unsigned long long plutovg_font_face_get_glyph_metrics(
long long a1,
float a2,
long long a3,
float *a4,
float *a5,
float *a6)
{
unsigned long long result; // rax
int v10; // ecx
int v11; // edx
float v12; // [rsp+0h] [rbp-28h]
v12 = a2 / (float)(unsigned __int16)__ROL2__(*(_WORD *)(*(_QWORD *)(a1 + 40) + *(int *)(a1 + 60) + 18LL), 8);
result = plutovg_font_face_get_glyph();
if ( a4 )
*a4 = (float)*(int *)(result + 16) * v12;
if ( a5 )
*a5 = (float)*(int *)(result + 20) * v12;
if ( a6 )
{
v10 = *(_DWORD *)(result + 24);
*a6 = (float)v10 * v12;
v11 = *(_DWORD *)(result + 36);
a6[1] = (float)v11 * (float)-v12;
a6[2] = (float)(*(_DWORD *)(result + 32) - v10) * v12;
result = (unsigned int)(*(_DWORD *)(result + 28) - v11);
a6[3] = (float)(int)result * (float)-v12;
}
return result;
}
| plutovg_font_face_get_glyph_metrics:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV RAX,qword ptr [RDI + 0x28]
MOVSXD RCX,dword ptr [RDI + 0x3c]
MOVZX EAX,word ptr [RAX + RCX*0x1 + 0x12]
ROL AX,0x8
MOVZX EAX,AX
CVTSI2SS XMM1,EAX
DIVSS XMM0,XMM1
MOVAPS xmmword ptr [RSP],XMM0
CALL 0x001051c2
MOVAPS XMM2,xmmword ptr [RSP]
TEST R15,R15
JZ 0x00105144
XORPS XMM0,XMM0
CVTSI2SS XMM0,dword ptr [RAX + 0x10]
MULSS XMM0,XMM2
MOVSS dword ptr [R15],XMM0
LAB_00105144:
TEST R14,R14
JZ 0x0010515a
XORPS XMM0,XMM0
CVTSI2SS XMM0,dword ptr [RAX + 0x14]
MULSS XMM0,XMM2
MOVSS dword ptr [R14],XMM0
LAB_0010515a:
TEST RBX,RBX
JZ 0x001051b8
MOV ECX,dword ptr [RAX + 0x18]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MULSS XMM0,XMM2
MOVSS dword ptr [RBX],XMM0
MOV EDX,dword ptr [RAX + 0x24]
XORPS XMM0,XMM0
CVTSI2SS XMM0,EDX
MOVAPS XMM1,xmmword ptr [0x00123280]
XORPS XMM1,XMM2
MULSS XMM0,XMM1
MOVSS dword ptr [RBX + 0x4],XMM0
MOV ESI,dword ptr [RAX + 0x20]
SUB ESI,ECX
XORPS XMM0,XMM0
CVTSI2SS XMM0,ESI
MULSS XMM0,XMM2
MOVSS dword ptr [RBX + 0x8],XMM0
MOV EAX,dword ptr [RAX + 0x1c]
SUB EAX,EDX
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
MULSS XMM0,XMM1
MOVSS dword ptr [RBX + 0xc],XMM0
LAB_001051b8:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void plutovg_font_face_get_glyph_metrics
(float param_1,long param_2,int8 param_3,float *param_4,float *param_5,
float *param_6)
{
ushort uVar1;
int iVar2;
int iVar3;
long lVar4;
float fVar5;
uVar1 = *(ushort *)(*(long *)(param_2 + 0x28) + 0x12 + (long)*(int *)(param_2 + 0x3c));
param_1 = param_1 / (float)(ushort)(uVar1 << 8 | uVar1 >> 8);
lVar4 = plutovg_font_face_get_glyph();
if (param_4 != (float *)0x0) {
*param_4 = (float)*(int *)(lVar4 + 0x10) * param_1;
}
if (param_5 != (float *)0x0) {
*param_5 = (float)*(int *)(lVar4 + 0x14) * param_1;
}
if (param_6 != (float *)0x0) {
iVar2 = *(int *)(lVar4 + 0x18);
*param_6 = (float)iVar2 * param_1;
iVar3 = *(int *)(lVar4 + 0x24);
fVar5 = (float)(_DAT_00123280 ^ (uint)param_1);
param_6[1] = (float)iVar3 * fVar5;
param_6[2] = (float)(*(int *)(lVar4 + 0x20) - iVar2) * param_1;
param_6[3] = (float)(*(int *)(lVar4 + 0x1c) - iVar3) * fVar5;
}
return;
}
| |
40,710 | mi_munmap_file | eloqsql/storage/myisam/mi_dynrec.c | int mi_munmap_file(MI_INFO *info)
{
int ret;
DBUG_ENTER("mi_unmap_file");
if ((ret= my_munmap((void*) info->s->file_map, info->s->mmaped_length)))
DBUG_RETURN(ret);
info->s->file_read= mi_nommap_pread;
info->s->file_write= mi_nommap_pwrite;
info->s->file_map= 0;
info->s->mmaped_length= 0;
DBUG_RETURN(0);
} | O3 | c | mi_munmap_file:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x270(%rax), %rdi
movq 0x4d0(%rax), %rsi
callq 0x294d0
testl %eax, %eax
jne 0x76cd5
movq (%rbx), %rcx
leaq 0x35(%rip), %rdx # 0x76cdc
movq %rdx, 0x2e0(%rcx)
movq (%rbx), %rcx
leaq 0xfe(%rip), %rdx # 0x76db6
movq %rdx, 0x2e8(%rcx)
movq (%rbx), %rcx
xorl %edx, %edx
movq %rdx, 0x270(%rcx)
movq (%rbx), %rcx
movq %rdx, 0x4d0(%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mi_munmap_file:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rax, [rdi]
mov rdi, [rax+270h]
mov rsi, [rax+4D0h]
call _munmap
test eax, eax
jnz short loc_76CD5
mov rcx, [rbx]
lea rdx, mi_nommap_pread
mov [rcx+2E0h], rdx
mov rcx, [rbx]
lea rdx, mi_nommap_pwrite
mov [rcx+2E8h], rdx
mov rcx, [rbx]
xor edx, edx
mov [rcx+270h], rdx
mov rcx, [rbx]
mov [rcx+4D0h], rdx
loc_76CD5:
add rsp, 8
pop rbx
pop rbp
retn
| long long mi_munmap_file(long long a1)
{
long long result; // rax
result = munmap(*(_QWORD *)(*(_QWORD *)a1 + 624LL), *(_QWORD *)(*(_QWORD *)a1 + 1232LL));
if ( !(_DWORD)result )
{
*(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_nommap_pread;
*(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_nommap_pwrite;
*(_QWORD *)(*(_QWORD *)a1 + 624LL) = 0LL;
*(_QWORD *)(*(_QWORD *)a1 + 1232LL) = 0LL;
}
return result;
}
| mi_munmap_file:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RDI,qword ptr [RAX + 0x270]
MOV RSI,qword ptr [RAX + 0x4d0]
CALL 0x001294d0
TEST EAX,EAX
JNZ 0x00176cd5
MOV RCX,qword ptr [RBX]
LEA RDX,[0x176cdc]
MOV qword ptr [RCX + 0x2e0],RDX
MOV RCX,qword ptr [RBX]
LEA RDX,[0x176db6]
MOV qword ptr [RCX + 0x2e8],RDX
MOV RCX,qword ptr [RBX]
XOR EDX,EDX
MOV qword ptr [RCX + 0x270],RDX
MOV RCX,qword ptr [RBX]
MOV qword ptr [RCX + 0x4d0],RDX
LAB_00176cd5:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mi_munmap_file(long *param_1)
{
int iVar1;
iVar1 = munmap(*(void **)(*param_1 + 0x270),*(size_t *)(*param_1 + 0x4d0));
if (iVar1 == 0) {
*(code **)(*param_1 + 0x2e0) = mi_nommap_pread;
*(code **)(*param_1 + 0x2e8) = mi_nommap_pwrite;
*(int8 *)(*param_1 + 0x270) = 0;
*(int8 *)(*param_1 + 0x4d0) = 0;
}
return;
}
| |
40,711 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) | monkey531[P]llama/common/json.hpp | inline char* format_buffer(char* buf, int len, int decimal_exponent,
int min_exp, int max_exp)
{
JSON_ASSERT(min_exp < 0);
JSON_ASSERT(max_exp > 0);
const int k = len;
const int n = len + decimal_exponent;
// v = buf * 10^(n-k)
// k is the length of the buffer (number of decimal digits)
// n is the position of the decimal point relative to the start of the buffer.
if (k <= n && n <= max_exp)
{
// digits[000]
// len <= max_exp + 2
std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k));
// Make it look like a floating-point number (#362, #378)
buf[n + 0] = '.';
buf[n + 1] = '0';
return buf + (static_cast<size_t>(n) + 2);
}
if (0 < n && n <= max_exp)
{
// dig.its
// len <= max_digits10 + 1
JSON_ASSERT(k > n);
std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n));
buf[n] = '.';
return buf + (static_cast<size_t>(k) + 1U);
}
if (min_exp < n && n <= 0)
{
// 0.[000]digits
// len <= 2 + (-min_exp - 1) + max_digits10
std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k));
buf[0] = '0';
buf[1] = '.';
std::memset(buf + 2, '0', static_cast<size_t>(-n));
return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k));
}
if (k == 1)
{
// dE+123
// len <= 1 + 5
buf += 1;
}
else
{
// d.igitsE+123
// len <= max_digits10 + 1 + 5
std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1);
buf[1] = '.';
buf += 1 + static_cast<size_t>(k);
}
*buf++ = 'e';
return append_exponent(buf, n - 1);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %ecx, %ecx
jns 0xb87b3
testl %r8d, %r8d
jle 0xb87cf
movq %rdi, %rbx
leal (%rdx,%rsi), %r15d
testl %edx, %edx
sets %al
cmpl %r8d, %r15d
setg %dil
orb %al, %dil
je 0xb865c
cmpl %r8d, %r15d
setg %al
testl %r15d, %r15d
setle %dil
orb %al, %dil
je 0xb8689
testl %r15d, %r15d
setg %al
cmpl %ecx, %r15d
setle %cl
orb %al, %cl
jne 0xb86c4
negl %r15d
leaq (%rbx,%r15), %r14
addq $0x2, %r14
movslq %esi, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1add0
movw $0x2e30, (%rbx) # imm = 0x2E30
addq $0x2, %rbx
movq %rbx, %rdi
movl $0x30, %esi
movq %r15, %rdx
callq 0x1a4d0
addq %r12, %r14
jmp 0xb87a4
movslq %esi, %rax
leaq (%rbx,%rax), %rdi
movslq %r15d, %r14
movq %r14, %rdx
subq %rax, %rdx
movl $0x30, %esi
callq 0x1a4d0
addq %rbx, %r14
addq $0x2, %r14
movw $0x302e, -0x2(%r14) # imm = 0x302E
jmp 0xb87a4
testl %edx, %edx
jns 0xb87f0
movl %r15d, %ecx
leaq (%rbx,%rcx), %rax
leaq (%rbx,%rcx), %r14
incq %r14
movl %esi, %r15d
movq %r15, %rdx
subq %rcx, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1add0
movb $0x2e, -0x1(%r14)
leaq (%rbx,%r15), %r14
incq %r14
jmp 0xb87a4
cmpl $0x1, %esi
je 0xb86e7
leaq 0x2(%rbx), %rdi
leaq 0x1(%rbx), %rax
movslq %esi, %r14
leaq -0x1(%r14), %rdx
movq %rax, %rsi
callq 0x1add0
movb $0x2e, 0x1(%rbx)
addq %r14, %rbx
movb $0x65, 0x1(%rbx)
cmpl $0xfffffc19, %r15d # imm = 0xFFFFFC19
jle 0xb880c
cmpl $0x3e9, %r15d # imm = 0x3E9
jge 0xb8828
leaq 0x2(%rbx), %r14
leal -0x1(%r15), %ecx
testl %r15d, %r15d
setle %dl
addb %dl, %dl
addb $0x2b, %dl
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movb %dl, 0x2(%rbx)
cmpl $0x9, %eax
ja 0xb8731
movb $0x30, 0x3(%rbx)
addq $0x4, %rbx
jmp 0xb8755
cmpl $0x63, %eax
ja 0xb875c
movzbl %al, %eax
imull $0xcd, %eax, %ecx
shrl $0xb, %ecx
movl %ecx, %edx
orb $0x30, %dl
movb %dl, 0x3(%rbx)
addq $0x4, %rbx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subb %cl, %al
movl $0x3, %ecx
jmp 0xb879d
movl $0xffff, %ecx # imm = 0xFFFF
movl %eax, %edx
andl %ecx, %edx
shrl $0x2, %edx
imull $0x147b, %edx, %edx # imm = 0x147B
shrl $0x11, %edx
leal 0x30(%rdx), %esi
movb %sil, 0x3(%rbx)
imull $0x64, %edx, %edx
subl %edx, %eax
imull $0x67, %eax, %edx
andl %ecx, %edx
shrl $0xa, %edx
movl %edx, %ecx
orb $0x30, %cl
movb %cl, 0x4(%rbx)
addq $0x5, %rbx
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subb %cl, %al
movl $0x4, %ecx
addq %rcx, %r14
orb $0x30, %al
movb %al, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x33945(%rip), %rdi # 0xec0ff
leaq 0x33988(%rip), %rdx # 0xec149
leaq 0x392c5(%rip), %rcx # 0xf1a8d
movl $0x45e3, %esi # imm = 0x45E3
jmp 0xb87e9
leaq 0x33929(%rip), %rdi # 0xec0ff
leaq 0x3396c(%rip), %rdx # 0xec149
leaq 0x392b5(%rip), %rcx # 0xf1a99
movl $0x45e4, %esi # imm = 0x45E4
xorl %eax, %eax
callq 0x1ae30
leaq 0x33908(%rip), %rdi # 0xec0ff
leaq 0x3394b(%rip), %rdx # 0xec149
leaq 0x392a0(%rip), %rcx # 0xf1aa5
movl $0x45fe, %esi # imm = 0x45FE
jmp 0xb87e9
leaq 0x338ec(%rip), %rdi # 0xec0ff
leaq 0x3392f(%rip), %rdx # 0xec149
leaq 0x3928a(%rip), %rcx # 0xf1aab
movl $0x45ae, %esi # imm = 0x45AE
jmp 0xb87e9
leaq 0x338d0(%rip), %rdi # 0xec0ff
leaq 0x33913(%rip), %rdx # 0xec149
leaq 0x39278(%rip), %rcx # 0xf1ab5
movl $0x45af, %esi # imm = 0x45AF
jmp 0xb87e9
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl13format_bufferEPciiii:
push r15
push r14
push r12
push rbx
push rax
test ecx, ecx
jns loc_B87B3
test r8d, r8d
jle loc_B87CF
mov rbx, rdi
lea r15d, [rdx+rsi]
test edx, edx
sets al
cmp r15d, r8d
setnle dil
or dil, al
jz short loc_B865C
cmp r15d, r8d
setnle al
test r15d, r15d
setle dil
or dil, al
jz short loc_B8689
test r15d, r15d
setnle al
cmp r15d, ecx
setle cl
or cl, al
jnz loc_B86C4
neg r15d
lea r14, [rbx+r15]
add r14, 2
movsxd r12, esi
mov rdi, r14
mov rsi, rbx
mov rdx, r12
call _memmove
mov word ptr [rbx], 2E30h
add rbx, 2
mov rdi, rbx
mov esi, 30h ; '0'
mov rdx, r15
call _memset
add r14, r12
jmp loc_B87A4
loc_B865C:
movsxd rax, esi
lea rdi, [rbx+rax]
movsxd r14, r15d
mov rdx, r14
sub rdx, rax
mov esi, 30h ; '0'
call _memset
add r14, rbx
add r14, 2
mov word ptr [r14-2], 302Eh
jmp loc_B87A4
loc_B8689:
test edx, edx
jns loc_B87F0
mov ecx, r15d
lea rax, [rbx+rcx]
lea r14, [rbx+rcx]
inc r14
mov r15d, esi
mov rdx, r15
sub rdx, rcx
mov rdi, r14
mov rsi, rax
call _memmove
mov byte ptr [r14-1], 2Eh ; '.'
lea r14, [rbx+r15]
inc r14
jmp loc_B87A4
loc_B86C4:
cmp esi, 1
jz short loc_B86E7
lea rdi, [rbx+2]
lea rax, [rbx+1]
movsxd r14, esi
lea rdx, [r14-1]
mov rsi, rax
call _memmove
mov byte ptr [rbx+1], 2Eh ; '.'
add rbx, r14
loc_B86E7:
mov byte ptr [rbx+1], 65h ; 'e'
cmp r15d, 0FFFFFC19h
jle loc_B880C
cmp r15d, 3E9h
jge loc_B8828
lea r14, [rbx+2]
lea ecx, [r15-1]
test r15d, r15d
setle dl
add dl, dl
add dl, 2Bh ; '+'
mov eax, ecx
neg eax
cmovs eax, ecx
mov [rbx+2], dl
cmp eax, 9
ja short loc_B8731
mov byte ptr [rbx+3], 30h ; '0'
add rbx, 4
jmp short loc_B8755
loc_B8731:
cmp eax, 63h ; 'c'
ja short loc_B875C
movzx eax, al
imul ecx, eax, 0CDh
shr ecx, 0Bh
mov edx, ecx
or dl, 30h
mov [rbx+3], dl
add rbx, 4
add ecx, ecx
lea ecx, [rcx+rcx*4]
sub al, cl
loc_B8755:
mov ecx, 3
jmp short loc_B879D
loc_B875C:
mov ecx, 0FFFFh
mov edx, eax
and edx, ecx
shr edx, 2
imul edx, 147Bh
shr edx, 11h
lea esi, [rdx+30h]
mov [rbx+3], sil
imul edx, 64h ; 'd'
sub eax, edx
imul edx, eax, 67h ; 'g'
and edx, ecx
shr edx, 0Ah
mov ecx, edx
or cl, 30h
mov [rbx+4], cl
add rbx, 5
add edx, edx
lea ecx, [rdx+rdx*4]
sub al, cl
mov ecx, 4
loc_B879D:
add r14, rcx
or al, 30h
mov [rbx], al
loc_B87A4:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_B87B3:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMinExp0; "min_exp < 0"
mov esi, 45E3h
jmp short loc_B87E9
loc_B87CF:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaxExp0; "max_exp > 0"
mov esi, 45E4h
loc_B87E9:
xor eax, eax
call _ggml_abort
loc_B87F0:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKN; "k > n"
mov esi, 45FEh
jmp short loc_B87E9
loc_B880C:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000; "e > -1000"
mov esi, 45AEh
jmp short loc_B87E9
loc_B8828:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000_0; "e < 1000"
mov esi, 45AFh
jmp short loc_B87E9
| char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
int a3,
int a4,
int a5)
{
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v5; // rbx
int v6; // r15d
long long v7; // r15
char *v8; // r14
char *v9; // r14
char *v10; // r14
unsigned int v11; // eax
_BYTE *v12; // rbx
long long v13; // rcx
if ( a4 >= 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17891LL,
"GGML_ASSERT(%s) failed",
"min_exp < 0");
goto LABEL_26;
}
if ( a5 <= 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17892LL,
"GGML_ASSERT(%s) failed",
"max_exp > 0");
goto LABEL_26;
}
v5 = this;
v6 = a3 + (_DWORD)a2;
if ( a3 >= 0 && a3 + (int)a2 <= a5 )
{
memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2);
v8 = (char *)this + v6 + 2;
*(_WORD *)((char *)this + v6) = 12334;
return v8;
}
if ( v6 <= a5 && v6 > 0 )
{
if ( a3 < 0 )
{
v9 = (char *)this + (unsigned int)v6 + 1;
memmove(v9, (char *)this + (unsigned int)v6, (unsigned int)a2 - (unsigned long long)(unsigned int)v6);
*(v9 - 1) = 46;
return (char *)this + (unsigned int)a2 + 1;
}
goto LABEL_26;
}
if ( v6 > 0 || v6 <= a4 )
{
if ( (_DWORD)a2 != 1 )
{
memmove((char *)this + 2, (char *)this + 1, (int)a2 - 1LL);
*((_BYTE *)this + 1) = 46;
v5 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + (int)a2);
}
*((_BYTE *)v5 + 1) = 101;
if ( v6 <= -999 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17838LL,
"GGML_ASSERT(%s) failed",
"e > -1000");
}
else
{
if ( v6 < 1001 )
{
v10 = (char *)v5 + 2;
v11 = 1 - v6;
if ( 1 - v6 < 0 )
v11 = v6 - 1;
*((_BYTE *)v5 + 2) = 2 * (v6 <= 0) + 43;
if ( v11 > 9 )
{
if ( v11 > 0x63 )
{
*((_BYTE *)v5 + 3) = ((unsigned int)(5243 * ((unsigned __int16)v11 >> 2)) >> 17) + 48;
LOWORD(v11) = (unsigned __int16)v11 % 0x64u;
*((_BYTE *)v5 + 4) = ((unsigned __int16)(103 * v11) >> 10) | 0x30;
v12 = (char *)v5 + 5;
LOBYTE(v11) = v11 - 10 * ((unsigned __int16)(103 * v11) >> 10);
v13 = 4LL;
goto LABEL_22;
}
*((_BYTE *)v5 + 3) = ((unsigned __int8)v11 / 0xAu) | 0x30;
v12 = (char *)v5 + 4;
LOBYTE(v11) = (unsigned __int8)v11 % 0xAu;
}
else
{
*((_BYTE *)v5 + 3) = 48;
v12 = (char *)v5 + 4;
}
v13 = 3LL;
LABEL_22:
v8 = &v10[v13];
*v12 = v11 | 0x30;
return v8;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17839LL,
"GGML_ASSERT(%s) failed",
"e < 1000");
}
while ( 1 )
LABEL_26:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17918LL,
"GGML_ASSERT(%s) failed",
"k > n");
}
v7 = (unsigned int)-v6;
memmove((char *)this + v7 + 2, this, (int)a2);
*(_WORD *)this = 11824;
memset((char *)this + 2, 48LL, v7);
return (char *)this + v7 + (int)a2 + 2;
}
| format_buffer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST ECX,ECX
JNS 0x001b87b3
TEST R8D,R8D
JLE 0x001b87cf
MOV RBX,RDI
LEA R15D,[RDX + RSI*0x1]
TEST EDX,EDX
SETS AL
CMP R15D,R8D
SETG DIL
OR DIL,AL
JZ 0x001b865c
CMP R15D,R8D
SETG AL
TEST R15D,R15D
SETLE DIL
OR DIL,AL
JZ 0x001b8689
TEST R15D,R15D
SETG AL
CMP R15D,ECX
SETLE CL
OR CL,AL
JNZ 0x001b86c4
NEG R15D
LEA R14,[RBX + R15*0x1]
ADD R14,0x2
MOVSXD R12,ESI
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
CALL 0x0011add0
MOV word ptr [RBX],0x2e30
ADD RBX,0x2
MOV RDI,RBX
MOV ESI,0x30
MOV RDX,R15
CALL 0x0011a4d0
ADD R14,R12
JMP 0x001b87a4
LAB_001b865c:
MOVSXD RAX,ESI
LEA RDI,[RBX + RAX*0x1]
MOVSXD R14,R15D
MOV RDX,R14
SUB RDX,RAX
MOV ESI,0x30
CALL 0x0011a4d0
ADD R14,RBX
ADD R14,0x2
MOV word ptr [R14 + -0x2],0x302e
JMP 0x001b87a4
LAB_001b8689:
TEST EDX,EDX
JNS 0x001b87f0
MOV ECX,R15D
LEA RAX,[RBX + RCX*0x1]
LEA R14,[RBX + RCX*0x1]
INC R14
MOV R15D,ESI
MOV RDX,R15
SUB RDX,RCX
MOV RDI,R14
MOV RSI,RAX
CALL 0x0011add0
MOV byte ptr [R14 + -0x1],0x2e
LEA R14,[RBX + R15*0x1]
INC R14
JMP 0x001b87a4
LAB_001b86c4:
CMP ESI,0x1
JZ 0x001b86e7
LEA RDI,[RBX + 0x2]
LEA RAX,[RBX + 0x1]
MOVSXD R14,ESI
LEA RDX,[R14 + -0x1]
MOV RSI,RAX
CALL 0x0011add0
MOV byte ptr [RBX + 0x1],0x2e
ADD RBX,R14
LAB_001b86e7:
MOV byte ptr [RBX + 0x1],0x65
CMP R15D,0xfffffc19
JLE 0x001b880c
CMP R15D,0x3e9
JGE 0x001b8828
LEA R14,[RBX + 0x2]
LEA ECX,[R15 + -0x1]
TEST R15D,R15D
SETLE DL
ADD DL,DL
ADD DL,0x2b
MOV EAX,ECX
NEG EAX
CMOVS EAX,ECX
MOV byte ptr [RBX + 0x2],DL
CMP EAX,0x9
JA 0x001b8731
MOV byte ptr [RBX + 0x3],0x30
ADD RBX,0x4
JMP 0x001b8755
LAB_001b8731:
CMP EAX,0x63
JA 0x001b875c
MOVZX EAX,AL
IMUL ECX,EAX,0xcd
SHR ECX,0xb
MOV EDX,ECX
OR DL,0x30
MOV byte ptr [RBX + 0x3],DL
ADD RBX,0x4
ADD ECX,ECX
LEA ECX,[RCX + RCX*0x4]
SUB AL,CL
LAB_001b8755:
MOV ECX,0x3
JMP 0x001b879d
LAB_001b875c:
MOV ECX,0xffff
MOV EDX,EAX
AND EDX,ECX
SHR EDX,0x2
IMUL EDX,EDX,0x147b
SHR EDX,0x11
LEA ESI,[RDX + 0x30]
MOV byte ptr [RBX + 0x3],SIL
IMUL EDX,EDX,0x64
SUB EAX,EDX
IMUL EDX,EAX,0x67
AND EDX,ECX
SHR EDX,0xa
MOV ECX,EDX
OR CL,0x30
MOV byte ptr [RBX + 0x4],CL
ADD RBX,0x5
ADD EDX,EDX
LEA ECX,[RDX + RDX*0x4]
SUB AL,CL
MOV ECX,0x4
LAB_001b879d:
ADD R14,RCX
OR AL,0x30
MOV byte ptr [RBX],AL
LAB_001b87a4:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001b87b3:
LEA RDI,[0x1ec0ff]
LEA RDX,[0x1ec149]
LEA RCX,[0x1f1a8d]
MOV ESI,0x45e3
JMP 0x001b87e9
LAB_001b87cf:
LEA RDI,[0x1ec0ff]
LEA RDX,[0x1ec149]
LEA RCX,[0x1f1a99]
MOV ESI,0x45e4
LAB_001b87e9:
XOR EAX,EAX
CALL 0x0011ae30
LAB_001b87f0:
LEA RDI,[0x1ec0ff]
LEA RDX,[0x1ec149]
LEA RCX,[0x1f1aa5]
MOV ESI,0x45fe
JMP 0x001b87e9
LAB_001b880c:
LEA RDI,[0x1ec0ff]
LEA RDX,[0x1ec149]
LEA RCX,[0x1f1aab]
MOV ESI,0x45ae
JMP 0x001b87e9
LAB_001b8828:
LEA RDI,[0x1ec0ff]
LEA RDX,[0x1ec149]
LEA RCX,[0x1f1ab5]
MOV ESI,0x45af
JMP 0x001b87e9
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer
(char *param_1,int param_2,int param_3,int param_4,int param_5)
{
uint uVar1;
byte bVar2;
uint uVar3;
int iVar4;
ulong uVar5;
long lVar6;
char *pcVar7;
byte *pbVar8;
int8 uVar9;
uint uVar10;
if (-1 < param_4) {
pcVar7 = "min_exp < 0";
uVar9 = 0x45e3;
LAB_001b87e9:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar9,
"GGML_ASSERT(%s) failed",pcVar7);
}
if (param_5 < 1) {
pcVar7 = "max_exp > 0";
uVar9 = 0x45e4;
goto LAB_001b87e9;
}
uVar10 = param_3 + param_2;
if ((int)uVar10 <= param_5 && -1 < param_3) {
memset(param_1 + param_2,0x30,(long)(int)uVar10 - (long)param_2);
pcVar7 = param_1 + (int)uVar10;
pcVar7[0] = '.';
pcVar7[1] = '0';
return pcVar7 + 2;
}
if (0 < (int)uVar10 && (int)uVar10 <= param_5) {
if (param_3 < 0) {
uVar5 = (ulong)uVar10;
memmove(param_1 + uVar5 + 1,param_1 + uVar5,(uint)param_2 - uVar5);
param_1[uVar5] = '.';
return param_1 + (ulong)(uint)param_2 + 1;
}
pcVar7 = "k > n";
uVar9 = 0x45fe;
goto LAB_001b87e9;
}
if (param_4 < (int)uVar10 && (int)uVar10 < 1) {
memmove(param_1 + (ulong)-uVar10 + 2,param_1,(long)param_2);
param_1[0] = '0';
param_1[1] = '.';
memset(param_1 + 2,0x30,(ulong)-uVar10);
return param_1 + (ulong)-uVar10 + 2 + param_2;
}
if (param_2 != 1) {
memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1);
param_1[1] = '.';
param_1 = param_1 + param_2;
}
param_1[1] = 'e';
if ((int)uVar10 < -0x3e6) {
pcVar7 = "e > -1000";
uVar9 = 0x45ae;
goto LAB_001b87e9;
}
if (1000 < (int)uVar10) {
pcVar7 = "e < 1000";
uVar9 = 0x45af;
goto LAB_001b87e9;
}
uVar1 = uVar10 - 1;
uVar3 = -uVar1;
if (0 < (int)uVar1) {
uVar3 = uVar1;
}
param_1[2] = ((int)uVar10 < 1) * '\x02' + '+';
if (uVar3 < 10) {
param_1[3] = '0';
}
else {
if (99 < uVar3) {
uVar10 = (uVar3 & 0xffff) / 100;
param_1[3] = (char)uVar10 + '0';
iVar4 = uVar3 + uVar10 * -100;
bVar2 = (byte)((iVar4 * 0x67 & 0xffffU) >> 10);
param_1[4] = bVar2 | 0x30;
pbVar8 = (byte *)(param_1 + 5);
bVar2 = (char)iVar4 + bVar2 * -10;
lVar6 = 4;
goto LAB_001b879d;
}
bVar2 = (byte)((uVar3 & 0xff) / 10);
param_1[3] = bVar2 | 0x30;
uVar3 = (uint)(byte)((char)uVar3 + bVar2 * -10);
}
bVar2 = (byte)uVar3;
pbVar8 = (byte *)(param_1 + 4);
lVar6 = 3;
LAB_001b879d:
*pbVar8 = bVar2 | 0x30;
return param_1 + lVar6 + 2;
}
| |
40,712 | gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const | monkey531[P]llama/ggml/src/gguf.cpp | void write_tensor_data(const struct gguf_tensor_info & info, const size_t offset_data, const size_t alignment) const {
GGML_ASSERT(buf.size() - offset_data == info.offset);
GGML_ASSERT(ggml_is_contiguous(&info.t));
const size_t offset = buf.size();
const size_t nbytes = ggml_nbytes(&info.t);
buf.resize(offset + nbytes);
if (info.t.buffer) {
ggml_backend_tensor_get(&info.t, buf.data() + offset, 0, nbytes);
} else {
GGML_ASSERT(info.t.data);
memcpy(buf.data() + offset, info.t.data, nbytes);
}
pad(alignment);
} | O1 | cpp | gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rdi), %rax
addq (%rax), %rdx
movq 0x8(%rax), %rax
subq %rdx, %rax
cmpq 0x150(%rsi), %rax
jne 0x41423
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x16430
testb %al, %al
je 0x4143f
movq (%r14), %rax
movq 0x8(%rax), %r12
subq (%rax), %r12
movq %r15, %rdi
callq 0x161c0
movq %rax, %r13
movq (%r14), %rdi
leaq (%rax,%r12), %rsi
callq 0x16130
cmpq $0x0, 0x8(%r15)
je 0x413f2
movq (%r14), %rax
addq (%rax), %r12
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x172c0
jmp 0x4140f
movq 0xf8(%r15), %rsi
testq %rsi, %rsi
je 0x4145b
movq (%r14), %rax
addq (%rax), %r12
movq %r12, %rdi
movq %r13, %rdx
callq 0x16dc0
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x17300
leaq 0x188eb(%rip), %rdi # 0x59d15
leaq 0x9228(%rip), %rdx # 0x4a659
leaq 0x18fa2(%rip), %rcx # 0x5a3da
movl $0x4dd, %esi # imm = 0x4DD
jmp 0x41475
leaq 0x188cf(%rip), %rdi # 0x59d15
leaq 0x920c(%rip), %rdx # 0x4a659
leaq 0x18fae(%rip), %rcx # 0x5a402
movl $0x4df, %esi # imm = 0x4DF
jmp 0x41475
leaq 0x188b3(%rip), %rdi # 0x59d15
leaq 0x91f0(%rip), %rdx # 0x4a659
leaq 0x18fae(%rip), %rcx # 0x5a41e
movl $0x4e7, %esi # imm = 0x4E7
xorl %eax, %eax
callq 0x17c70
| _ZNK11gguf_writer17write_tensor_dataERK16gguf_tensor_infomm:
push r15
push r14
push r13
push r12
push rbx
mov rax, [rdi]
add rdx, [rax]
mov rax, [rax+8]
sub rax, rdx
cmp rax, [rsi+150h]
jnz loc_41423
mov rbx, rcx
mov r15, rsi
mov r14, rdi
mov rdi, rsi
call _ggml_is_contiguous
test al, al
jz loc_4143F
mov rax, [r14]
mov r12, [rax+8]
sub r12, [rax]
mov rdi, r15
call _ggml_nbytes
mov r13, rax
mov rdi, [r14]
lea rsi, [rax+r12]
call __ZNSt6vectorIaSaIaEE6resizeEm; std::vector<signed char>::resize(ulong)
cmp qword ptr [r15+8], 0
jz short loc_413F2
mov rax, [r14]
add r12, [rax]
mov rdi, r15
mov rsi, r12
xor edx, edx
mov rcx, r13
call _ggml_backend_tensor_get
jmp short loc_4140F
loc_413F2:
mov rsi, [r15+0F8h]
test rsi, rsi
jz short loc_4145B
mov rax, [r14]
add r12, [rax]
mov rdi, r12
mov rdx, r13
call _memcpy
loc_4140F:
mov rdi, r14; this
mov rsi, rbx; unsigned __int64
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp __ZNK11gguf_writer3padEm; gguf_writer::pad(ulong)
loc_41423:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufSizeOffsetD; "buf.size() - offset_data == info.offset"
mov esi, 4DDh
jmp short loc_41475
loc_4143F:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_21; "ggml_is_contiguous(&info.t)"
mov esi, 4DFh
jmp short loc_41475
loc_4145B:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aInfoTData; "info.t.data"
mov esi, 4E7h
loc_41475:
xor eax, eax
call _ggml_abort
| long long gguf_writer::write_tensor_data(
gguf_writer *this,
long long a2,
long long a3,
unsigned long long a4,
int a5,
int a6)
{
long long v7; // r12
unsigned long long v8; // r13
long long v9; // rsi
const char *v11; // rcx
int v12; // esi
if ( *(_QWORD *)(*(_QWORD *)this + 8LL) - (**(_QWORD **)this + a3) != *(_QWORD *)(a2 + 336) )
{
v11 = "buf.size() - offset_data == info.offset";
v12 = 1245;
goto LABEL_11;
}
if ( !(unsigned __int8)ggml_is_contiguous(a2) )
{
v11 = "ggml_is_contiguous(&info.t)";
v12 = 1247;
goto LABEL_11;
}
v7 = *(_QWORD *)(*(_QWORD *)this + 8LL) - **(_QWORD **)this;
v8 = ggml_nbytes((unsigned int *)a2);
std::vector<signed char>::resize(*(_QWORD *)this, v8 + v7);
if ( !*(_QWORD *)(a2 + 8) )
{
v9 = *(_QWORD *)(a2 + 248);
if ( v9 )
{
memcpy(**(_QWORD **)this + v7, v9, v8);
return gguf_writer::pad(this, a4);
}
v11 = "info.t.data";
v12 = 1255;
LABEL_11:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",
v12,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v11,
a5,
a6);
}
ggml_backend_tensor_get(a2, **(_QWORD **)this + v7, 0LL, v8);
return gguf_writer::pad(this, a4);
}
| write_tensor_data:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RDI]
ADD RDX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,RDX
CMP RAX,qword ptr [RSI + 0x150]
JNZ 0x00141423
MOV RBX,RCX
MOV R15,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x00116430
TEST AL,AL
JZ 0x0014143f
MOV RAX,qword ptr [R14]
MOV R12,qword ptr [RAX + 0x8]
SUB R12,qword ptr [RAX]
MOV RDI,R15
CALL 0x001161c0
MOV R13,RAX
MOV RDI,qword ptr [R14]
LEA RSI,[RAX + R12*0x1]
CALL 0x00116130
CMP qword ptr [R15 + 0x8],0x0
JZ 0x001413f2
MOV RAX,qword ptr [R14]
ADD R12,qword ptr [RAX]
MOV RDI,R15
MOV RSI,R12
XOR EDX,EDX
MOV RCX,R13
CALL 0x001172c0
JMP 0x0014140f
LAB_001413f2:
MOV RSI,qword ptr [R15 + 0xf8]
TEST RSI,RSI
JZ 0x0014145b
MOV RAX,qword ptr [R14]
ADD R12,qword ptr [RAX]
MOV RDI,R12
MOV RDX,R13
CALL 0x00116dc0
LAB_0014140f:
MOV RDI,R14
MOV RSI,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00117300
LAB_00141423:
LEA RDI,[0x159d15]
LEA RDX,[0x14a659]
LEA RCX,[0x15a3da]
MOV ESI,0x4dd
JMP 0x00141475
LAB_0014143f:
LEA RDI,[0x159d15]
LEA RDX,[0x14a659]
LEA RCX,[0x15a402]
MOV ESI,0x4df
JMP 0x00141475
LAB_0014145b:
LEA RDI,[0x159d15]
LEA RDX,[0x14a659]
LEA RCX,[0x15a41e]
MOV ESI,0x4e7
LAB_00141475:
XOR EAX,EAX
CALL 0x00117c70
|
/* gguf_writer::write_tensor_data(gguf_tensor_info const&, unsigned long, unsigned long) const */
void __thiscall
gguf_writer::write_tensor_data
(gguf_writer *this,gguf_tensor_info *param_1,ulong param_2,ulong param_3)
{
char cVar1;
size_t __n;
char *pcVar2;
int8 uVar3;
long lVar4;
if ((*(long **)this)[1] - (param_2 + **(long **)this) == *(long *)(param_1 + 0x150)) {
cVar1 = ggml_is_contiguous(param_1);
if (cVar1 != '\0') {
lVar4 = (*(long **)this)[1] - **(long **)this;
__n = ggml_nbytes(param_1);
std::vector<signed_char,std::allocator<signed_char>>::resize
(*(vector<signed_char,std::allocator<signed_char>> **)this,__n + lVar4);
if (*(long *)(param_1 + 8) == 0) {
if (*(void **)(param_1 + 0xf8) == (void *)0x0) {
pcVar2 = "info.t.data";
uVar3 = 0x4e7;
goto LAB_00141475;
}
memcpy((void *)(lVar4 + **(long **)this),*(void **)(param_1 + 0xf8),__n);
}
else {
ggml_backend_tensor_get(param_1,lVar4 + **(long **)this,0,__n);
}
pad(this,param_3);
return;
}
pcVar2 = "ggml_is_contiguous(&info.t)";
uVar3 = 0x4df;
}
else {
pcVar2 = "buf.size() - offset_data == info.offset";
uVar3 = 0x4dd;
}
LAB_00141475:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
40,713 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::unget() | monkey531[P]llama/common/./json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::unget():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movb $0x1, 0x18(%rax)
movq 0x20(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x20(%rax)
cmpq $0x0, 0x28(%rax)
jne 0x19f919
movq 0x8(%rsp), %rax
cmpq $0x0, 0x30(%rax)
jbe 0x19f917
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x30(%rax)
jmp 0x19f92a
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x28(%rax)
movq 0x8(%rsp), %rax
movl 0x14(%rax), %eax
movl %eax, 0x4(%rsp)
callq 0xaf170
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x19f950
jmp 0x19f95e
movq 0x8(%rsp), %rdi
addq $0x38, %rdi
callq 0xb0d00
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE5ungetEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_10], rax
mov byte ptr [rax+18h], 1
mov rcx, [rax+20h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+20h], rcx
cmp qword ptr [rax+28h], 0
jnz short loc_19F919
mov rax, [rsp+18h+var_10]
cmp qword ptr [rax+30h], 0
jbe short loc_19F917
mov rax, [rsp+18h+var_10]
mov rcx, [rax+30h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+30h], rcx
loc_19F917:
jmp short loc_19F92A
loc_19F919:
mov rax, [rsp+18h+var_10]
mov rcx, [rax+28h]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+28h], rcx
loc_19F92A:
mov rax, [rsp+18h+var_10]
mov eax, [rax+14h]
mov [rsp+18h+var_14], eax
call _ZNSt11char_traitsIcE3eofEv; std::char_traits<char>::eof(void)
mov ecx, eax
mov eax, [rsp+18h+var_14]
cmp eax, ecx
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_19F950
jmp short loc_19F95E
loc_19F950:
mov rdi, [rsp+18h+var_10]
add rdi, 38h ; '8'
call _ZNSt6vectorIcSaIcEE8pop_backEv; std::vector<char>::pop_back(void)
loc_19F95E:
add rsp, 18h
retn
| char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::unget(
long long a1)
{
int v1; // ecx
char result; // al
int v3; // [rsp+4h] [rbp-14h]
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
if ( *(_QWORD *)(a1 + 40) )
{
--*(_QWORD *)(a1 + 40);
}
else if ( *(_QWORD *)(a1 + 48) )
{
--*(_QWORD *)(a1 + 48);
}
v3 = *(_DWORD *)(a1 + 20);
v1 = std::char_traits<char>::eof();
result = v3 != v1;
if ( v3 != v1 )
return std::vector<char>::pop_back(a1 + 56);
return result;
}
| basic_json:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RCX,qword ptr [RSP + 0x18]
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RAX],XMM0
MOV RDI,qword ptr [RSP + 0x18]
XOR ESI,ESI
CALL 0x0019f9a0
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV byte ptr [RAX],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_0019f923:
CALL 0x0019faf0
JMP 0x0019f92a
LAB_0019f92a:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1
CALL 0x0019f9a0
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
void __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>
::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
int8 uVar1;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar1;
assert_invariant(SUB81(param_1,0));
*param_1 = (basic_json)0x0;
*(int8 *)(param_1 + 8) = 0;
/* try { // try from 0019f923 to 0019f927 has its CatchHandler @ 0019f93e */
set_parents();
assert_invariant(SUB81(this,0));
return;
}
| |
40,714 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::unget() | monkey531[P]llama/common/./json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x41851
leaq 0x28(%rdi), %rcx
jmp 0x4185e
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x41864
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x4187b
movq 0x40(%rdi), %rax
cmpq %rax, 0x38(%rdi)
je 0x4187c
decq %rax
movq %rax, 0x40(%rdi)
retq
pushq %rax
leaq 0x58f8c(%rip), %rdi # 0x9a810
leaq 0x585a3(%rip), %rsi # 0x99e2e
leaq 0x58f94(%rip), %rcx # 0x9a826
movl $0x2240, %edx # imm = 0x2240
callq 0x204a0
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_41851
lea rcx, [rdi+28h]
jmp short loc_4185E
loc_41851:
mov rax, [rdi+30h]
test rax, rax
jz short loc_41864
lea rcx, [rdi+30h]
loc_4185E:
dec rax
mov [rcx], rax
loc_41864:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_4187B
mov rax, [rdi+40h]
cmp [rdi+38h], rax
jz short loc_4187C
dec rax
mov [rdi+40h], rax
locret_4187B:
retn
loc_4187C:
push rax
lea rdi, aTokenStringEmp; "!token_string.empty()"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidNlohmannDe; "void nlohmann::detail::lexer<nlohmann::"...
mov edx, 2240h
call ___assert_fail
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
long long v3; // rax
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
{
v3 = *(_QWORD *)(a1 + 64);
if ( *(_QWORD *)(a1 + 56) == v3 )
__assert_fail(
"!token_string.empty()",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
8768LL,
"void nlohmann::detail::lexer<nlohmann::basic_json<nlohmann::ordered_map>, nlohmann::detail::iterator_input_adapt"
"er<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>>::unget() [BasicJsonType = nlohmann::bas"
"ic_json<nlohmann::ordered_map>, InputAdapterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_"
"iterator<const char *, std::basic_string<char>>>]");
result = v3 - 1;
*(_QWORD *)(a1 + 64) = result;
}
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x00141851
LEA RCX,[RDI + 0x28]
JMP 0x0014185e
LAB_00141851:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x00141864
LEA RCX,[RDI + 0x30]
LAB_0014185e:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_00141864:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x0014187b
MOV RAX,qword ptr [RDI + 0x40]
CMP qword ptr [RDI + 0x38],RAX
JZ 0x0014187c
DEC RAX
MOV qword ptr [RDI + 0x40],RAX
LAB_0014187b:
RET
LAB_0014187c:
PUSH RAX
LEA RDI,[0x19a810]
LEA RSI,[0x199e2e]
LEA RCX,[0x19a826]
MOV EDX,0x2240
CALL 0x001204a0
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_00141864;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_00141864:
if (*(int *)(this + 0x14) != -1) {
if (*(long *)(this + 0x38) == *(long *)(this + 0x40)) {
/* WARNING: Subroutine does not return */
__assert_fail("!token_string.empty()",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
0x2240,
"void nlohmann::detail::lexer<nlohmann::basic_json<nlohmann::ordered_map>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>>::unget() [BasicJsonType = nlohmann::basic_json<nlohmann::ordered_map>, InputAdapterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>]"
);
}
*(long *)(this + 0x40) = *(long *)(this + 0x40) + -1;
}
return;
}
| |
40,715 | wt_thd_lazy_init | eloqsql/mysys/waiting_threads.c | void wt_thd_lazy_init(WT_THD *thd, const ulong *ds, const ulong *ts,
const ulong *dl, const ulong *tl)
{
DBUG_ENTER("wt_thd_lazy_init");
thd->waiting_for= 0;
thd->weight= 0;
thd->deadlock_search_depth_short= ds;
thd->timeout_short= ts;
thd->deadlock_search_depth_long= dl;
thd->timeout_long= tl;
/* dynamic array is also initialized lazily - without memory allocations */
my_init_dynamic_array(PSI_INSTRUMENT_ME, &thd->my_resources,
sizeof(WT_RESOURCE *), 0, 5, MYF(0));
#ifndef DBUG_OFF
thd->name= my_thread_name();
#endif
DBUG_VOID_RETURN;
} | O3 | c | wt_thd_lazy_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, %rax
xorl %edi, %edi
movq %rdi, 0x28(%rax)
movq %rdi, 0x58(%rax)
movq %rsi, 0x40(%rax)
movq %rdx, 0x38(%rax)
movq %rcx, 0x50(%rax)
movq %r8, 0x48(%rax)
movq %rdi, (%rsp)
xorl %edi, %edi
movq %rax, %rsi
movl $0x8, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x5, %r9d
callq 0x94884
addq $0x10, %rsp
popq %rbp
retq
| wt_thd_lazy_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov rax, rdi
xor edi, edi
mov [rax+28h], rdi
mov [rax+58h], rdi
mov [rax+40h], rsi
mov [rax+38h], rdx
mov [rax+50h], rcx
mov [rax+48h], r8
mov [rsp+10h+var_10], rdi
xor edi, edi
mov rsi, rax
mov edx, 8
xor ecx, ecx
xor r8d, r8d
mov r9d, 5
call init_dynamic_array2
add rsp, 10h
pop rbp
retn
| long long wt_thd_lazy_init(_QWORD *a1, long long a2, long long a3, long long a4, long long a5)
{
a1[5] = 0LL;
a1[11] = 0LL;
a1[8] = a2;
a1[7] = a3;
a1[10] = a4;
a1[9] = a5;
return init_dynamic_array2(0LL, (long long)a1, 8u, 0LL, 0, 5u, 0LL);
}
| wt_thd_lazy_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,RDI
XOR EDI,EDI
MOV qword ptr [RAX + 0x28],RDI
MOV qword ptr [RAX + 0x58],RDI
MOV qword ptr [RAX + 0x40],RSI
MOV qword ptr [RAX + 0x38],RDX
MOV qword ptr [RAX + 0x50],RCX
MOV qword ptr [RAX + 0x48],R8
MOV qword ptr [RSP],RDI
XOR EDI,EDI
MOV RSI,RAX
MOV EDX,0x8
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x5
CALL 0x00194884
ADD RSP,0x10
POP RBP
RET
|
void wt_thd_lazy_init(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x40) = param_2;
*(int8 *)(param_1 + 0x38) = param_3;
*(int8 *)(param_1 + 0x50) = param_4;
*(int8 *)(param_1 + 0x48) = param_5;
init_dynamic_array2(0,param_1,8,0,0,5,0);
return;
}
| |
40,716 | JS_ConcatString | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ConcatString(JSContext *ctx, JSValue op1, JSValue op2)
{
JSValue ret;
JSString *p1, *p2;
if (unlikely(JS_VALUE_GET_TAG(op1) != JS_TAG_STRING)) {
op1 = JS_ToStringFree(ctx, op1);
if (JS_IsException(op1)) {
JS_FreeValue(ctx, op2);
return JS_EXCEPTION;
}
}
if (unlikely(JS_VALUE_GET_TAG(op2) != JS_TAG_STRING)) {
op2 = JS_ToStringFree(ctx, op2);
if (JS_IsException(op2)) {
JS_FreeValue(ctx, op1);
return JS_EXCEPTION;
}
}
p1 = JS_VALUE_GET_STRING(op1);
p2 = JS_VALUE_GET_STRING(op2);
/* XXX: could also check if p1 is empty */
if (p2->len == 0) {
goto ret_op1;
}
if (p1->header.ref_count == 1 && p1->is_wide_char == p2->is_wide_char
&& js_malloc_usable_size(ctx, p1) >= sizeof(*p1) + ((p1->len + p2->len) << p2->is_wide_char) + 1 - p1->is_wide_char) {
/* Concatenate in place in available space at the end of p1 */
if (p1->is_wide_char) {
memcpy(p1->u.str16 + p1->len, p2->u.str16, p2->len << 1);
p1->len += p2->len;
} else {
memcpy(p1->u.str8 + p1->len, p2->u.str8, p2->len);
p1->len += p2->len;
p1->u.str8[p1->len] = '\0';
}
ret_op1:
JS_FreeValue(ctx, op2);
return op1;
}
ret = JS_ConcatString1(ctx, p1, p2);
JS_FreeValue(ctx, op1);
JS_FreeValue(ctx, op2);
return ret;
} | O2 | c | JS_ConcatString:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
cmpl $-0x7, %ebx
jne 0x387b8
movl $0xfffffff9, %eax # imm = 0xFFFFFFF9
cmpl %eax, %ebp
jne 0x387d9
movq 0x4(%r15), %rdx
testl $0x7fffffff, %edx # imm = 0x7FFFFFFF
je 0x38795
cmpl $0x1, (%r14)
movq 0x4(%r14), %r13
jne 0x385f3
movl %r13d, %eax
xorl %edx, %eax
js 0x385f3
movq 0x18(%r12), %rax
movq %r14, %rdi
callq *0x20(%rax)
movq 0x4(%r14), %r13
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
movslq %r13d, %rsi
movl %r13d, %edi
andl %r8d, %edi
movq 0x4(%r15), %rdx
andl %edx, %r8d
addl %r8d, %edi
movl %edx, %ecx
shrl $0x1f, %ecx
shll %cl, %edi
movslq %edi, %rcx
sarq $0x1f, %rsi
addq %rsi, %rcx
addq $0x19, %rcx
cmpq %rcx, %rax
jae 0x386b6
movq %r15, (%rsp)
movl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
movl %r13d, %eax
andl %r15d, %eax
andl %edx, %r15d
addq %rax, %r15
cmpl $0x40000000, %r15d # imm = 0x40000000
jb 0x38632
leaq 0x4d2a5(%rip), %rsi # 0x858be
movq %r12, %r13
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x1acb3
pushq $0x6
popq %r15
jmp 0x38744
orl %edx, %r13d
movl %r13d, %edx
shrl $0x1f, %edx
movq %r12, 0x8(%rsp)
movq %r12, %rdi
movl %r15d, %esi
callq 0x1ad45
testq %rax, %rax
je 0x386aa
movq %rax, %r12
movq %rbp, 0x10(%rsp)
movq %rax, %rbp
addq $0x18, %rbp
testl %r13d, %r13d
js 0x38705
leaq 0x18(%r14), %rsi
movl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
movq 0x4(%r14), %rdx
andq %r13, %rdx
movq %rbp, %rdi
callq 0xe5c0
movq 0x4(%r14), %rdi
andq %r13, %rdi
addq %rbp, %rdi
movq (%rsp), %rax
leaq 0x18(%rax), %rsi
andq 0x4(%rax), %r13
movq %r13, %rdx
callq 0xe5c0
movb $0x0, (%rbp,%r15)
jmp 0x38736
pushq $0x6
popq %r15
xorl %r12d, %r12d
jmp 0x3873f
leaq 0x18(%r14), %rdi
movl %r13d, %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
leaq 0x18(%r15), %rsi
testl %r13d, %r13d
js 0x38769
addq %rax, %rdi
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
callq 0xe5c0
movq 0x4(%r14), %rax
movl 0x4(%r15), %ecx
addl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
andq $-0x80000000, %rax # imm = 0x80000000
orq %rcx, %rax
movq %rax, 0x4(%r14)
movb $0x0, 0x18(%r14,%rcx)
jmp 0x38795
movl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
movl 0x4(%r14), %edx
andl %r15d, %edx
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3a875
movl 0x4(%r14), %edi
addl %edi, %edi
addq %rbp, %rdi
movq (%rsp), %rsi
andl 0x4(%rsi), %r15d
movl %r15d, %edx
callq 0x3a875
pushq $-0x7
popq %r15
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
movq %r13, %rdi
movq (%rsp), %rsi
movq %rbp, %rdx
callq 0x1801e
movq %r12, %r14
movq %r15, %rbx
jmp 0x387a3
leaq (%rdi,%rax,2), %rdi
addl %r8d, %r8d
movslq %r8d, %rdx
callq 0xe5c0
movq 0x4(%r14), %rax
movl 0x4(%r15), %ecx
addl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
andq $-0x80000000, %rax # imm = 0x80000000
orq %rcx, %rax
movq %rax, 0x4(%r14)
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x1801e
movq %r14, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2e049
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x38805
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
jmp 0x387f8
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2e049
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x3880d
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
pushq $0x6
popq %rbx
xorl %r14d, %r14d
jmp 0x387a3
movq %rax, %r14
jmp 0x3857f
movq %rax, %r15
jmp 0x3858c
| JS_ConcatString:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbp, r8
mov r15, rcx
mov rbx, rdx
mov r14, rsi
mov r12, rdi
cmp ebx, 0FFFFFFF9h
jnz loc_387B8
loc_3857F:
mov eax, 0FFFFFFF9h
cmp ebp, eax
jnz loc_387D9
loc_3858C:
mov rdx, [r15+4]
test edx, 7FFFFFFFh
jz loc_38795
cmp dword ptr [r14], 1
mov r13, [r14+4]
jnz short loc_385F3
mov eax, r13d
xor eax, edx
js short loc_385F3
mov rax, [r12+18h]
mov rdi, r14
call qword ptr [rax+20h]
mov r13, [r14+4]
mov r8d, 7FFFFFFFh
movsxd rsi, r13d
mov edi, r13d
and edi, r8d
mov rdx, [r15+4]
and r8d, edx
add edi, r8d
mov ecx, edx
shr ecx, 1Fh
shl edi, cl
movsxd rcx, edi
sar rsi, 1Fh
add rcx, rsi
add rcx, 19h
cmp rax, rcx
jnb loc_386B6
loc_385F3:
mov [rsp+48h+var_48], r15
mov r15d, 7FFFFFFFh
mov eax, r13d
and eax, r15d
and r15d, edx
add r15, rax
cmp r15d, 40000000h
jb short loc_38632
lea rsi, aInvalidStringL; "invalid string length"
mov r13, r12
xor r12d, r12d
mov rdi, r13
xor eax, eax
call JS_ThrowRangeError
push 6
pop r15
jmp loc_38744
loc_38632:
or r13d, edx
mov edx, r13d
shr edx, 1Fh
mov [rsp+48h+var_40], r12
mov rdi, r12
mov esi, r15d
call js_alloc_string
test rax, rax
jz short loc_386AA
mov r12, rax
mov [rsp+48h+var_38], rbp
mov rbp, rax
add rbp, 18h
test r13d, r13d
js loc_38705
lea rsi, [r14+18h]
mov r13d, 7FFFFFFFh
mov rdx, [r14+4]
and rdx, r13
mov rdi, rbp
call _memcpy
mov rdi, [r14+4]
and rdi, r13
add rdi, rbp
mov rax, [rsp+48h+var_48]
lea rsi, [rax+18h]
and r13, [rax+4]
mov rdx, r13
call _memcpy
mov byte ptr [rbp+r15+0], 0
jmp loc_38736
loc_386AA:
push 6
pop r15
xor r12d, r12d
jmp loc_3873F
loc_386B6:
lea rdi, [r14+18h]
mov eax, r13d
and eax, 7FFFFFFFh
lea rsi, [r15+18h]
test r13d, r13d
js loc_38769
add rdi, rax
and edx, 7FFFFFFFh
call _memcpy
mov rax, [r14+4]
mov ecx, [r15+4]
add ecx, eax
and ecx, 7FFFFFFFh
and rax, 0FFFFFFFF80000000h
or rax, rcx
mov [r14+4], rax
mov byte ptr [r14+rcx+18h], 0
jmp loc_38795
loc_38705:
mov r15d, 7FFFFFFFh
mov edx, [r14+4]
and edx, r15d
mov rdi, rbp
mov rsi, r14
call copy_str16
mov edi, [r14+4]
add edi, edi
add rdi, rbp
mov rsi, [rsp+48h+var_48]
and r15d, [rsi+4]
mov edx, r15d
call copy_str16
loc_38736:
push 0FFFFFFFFFFFFFFF9h
pop r15
mov rbp, [rsp+48h+var_38]
loc_3873F:
mov r13, [rsp+48h+var_40]
loc_38744:
mov rdi, r13
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
mov rdi, r13
mov rsi, [rsp+48h+var_48]
mov rdx, rbp
call JS_FreeValue
mov r14, r12
mov rbx, r15
jmp short loc_387A3
loc_38769:
lea rdi, [rdi+rax*2]
add r8d, r8d
movsxd rdx, r8d
call _memcpy
mov rax, [r14+4]
mov ecx, [r15+4]
add ecx, eax
and ecx, 7FFFFFFFh
and rax, 0FFFFFFFF80000000h
or rax, rcx
mov [r14+4], rax
loc_38795:
mov rdi, r12
mov rsi, r15
mov rdx, rbp
call JS_FreeValue
loc_387A3:
mov rax, r14
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_387B8:
mov rdi, r12
mov rsi, r14
mov rdx, rbx
call JS_ToStringFree
mov rbx, rdx
cmp ebx, 6
jnz short loc_38805
mov rdi, r12
mov rsi, r15
mov rdx, rbp
jmp short loc_387F8
loc_387D9:
mov rdi, r12
mov rsi, r15
mov rdx, rbp
call JS_ToStringFree
mov rbp, rdx
cmp ebp, 6
jnz short loc_3880D
mov rdi, r12
mov rsi, r14
mov rdx, rbx
loc_387F8:
call JS_FreeValue
push 6
pop rbx
xor r14d, r14d
jmp short loc_387A3
loc_38805:
mov r14, rax
jmp loc_3857F
loc_3880D:
mov r15, rax
jmp loc_3858C
| long long JS_ConcatString(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rbp
long long v15; // r15
long long v16; // rbx
long long v17; // r14
long long v19; // rdx
long long v20; // r13
unsigned long long v21; // rax
long long v22; // r15
long long v23; // r13
long long v24; // r12
int v25; // r13d
long long v26; // rax
long long v27; // rbp
long long v28; // rdi
long long v29; // rax
long long v30; // rsi
long long v31; // rax
long long v32; // rcx
long long v34; // rax
long long v35; // rdx
long long v36; // rsi
long long v37; // rdx
long long v38; // rax
long long v39; // rdx
long long v40; // [rsp+0h] [rbp-48h]
long long v41; // [rsp+10h] [rbp-38h]
v14 = a5;
v15 = a4;
v16 = a3;
v17 = a2;
if ( (_DWORD)a3 != -7 )
{
v34 = JS_ToStringFree(a1, a2, a3);
v16 = v35;
if ( (_DWORD)v35 == 6 )
{
v36 = v15;
v37 = v14;
LABEL_26:
JS_FreeValue(a1, v36, v37);
return 0LL;
}
v17 = v34;
}
if ( (_DWORD)v14 == -7 )
goto LABEL_3;
v38 = JS_ToStringFree(a1, v15, v14);
v14 = v39;
if ( (_DWORD)v39 == 6 )
{
v36 = v17;
v37 = v16;
goto LABEL_26;
}
v15 = v38;
LABEL_3:
v19 = *(_QWORD *)(v15 + 4);
if ( (v19 & 0x7FFFFFFF) == 0 )
{
LABEL_20:
JS_FreeValue(a1, v15, v14);
return v17;
}
v20 = *(_QWORD *)(v17 + 4);
if ( *(_DWORD *)v17 == 1 && (int)(v19 ^ v20) >= 0 )
{
v21 = (*(long long ( **)(long long))(*(_QWORD *)(a1 + 24) + 32LL))(v17);
v20 = *(_QWORD *)(v17 + 4);
v19 = *(_QWORD *)(v15 + 4);
a5 = v19 & 0x7FFFFFFF;
a4 = ((long long)(int)v20 >> 31) + (int)(((v19 & 0x7FFFFFFF) + (v20 & 0x7FFFFFFF)) << ((int)v19 < 0)) + 25;
if ( v21 >= a4 )
{
v28 = v17 + 24;
v29 = v20 & 0x7FFFFFFF;
v30 = v15 + 24;
if ( (int)v20 < 0 )
{
memcpy(v28 + 2 * v29, v30, 2 * (int)v19);
*(_QWORD *)(v17 + 4) = ((unsigned int)*(_QWORD *)(v17 + 4) + *(_DWORD *)(v15 + 4)) & 0x7FFFFFFF | *(_QWORD *)(v17 + 4) & 0xFFFFFFFF80000000LL;
}
else
{
memcpy(v29 + v28, v30, v19 & 0x7FFFFFFF);
v31 = *(_QWORD *)(v17 + 4);
v32 = ((_DWORD)v31 + *(_DWORD *)(v15 + 4)) & 0x7FFFFFFF;
*(_QWORD *)(v17 + 4) = v32 | v31 & 0xFFFFFFFF80000000LL;
*(_BYTE *)(v17 + v32 + 24) = 0;
}
goto LABEL_20;
}
}
v40 = v15;
v22 = (v20 & 0x7FFFFFFF) + (v19 & 0x7FFFFFFF);
if ( (unsigned int)v22 < 0x40000000 )
{
v25 = v19 | v20;
v26 = js_alloc_string(a1, (unsigned int)v22, (unsigned int)v25 >> 31);
if ( v26 )
{
v24 = v26;
v41 = v14;
v27 = v26 + 24;
if ( v25 < 0 )
{
copy_str16(v26 + 24, v17, *(_DWORD *)(v17 + 4) & 0x7FFFFFFF);
copy_str16(v27 + (unsigned int)(2 * *(_DWORD *)(v17 + 4)), v40, *(_DWORD *)(v40 + 4) & 0x7FFFFFFF);
}
else
{
memcpy(v26 + 24, v17 + 24, *(_QWORD *)(v17 + 4) & 0x7FFFFFFFLL);
memcpy(v27 + (*(_QWORD *)(v17 + 4) & 0x7FFFFFFFLL), v40 + 24, *(_QWORD *)(v40 + 4) & 0x7FFFFFFFLL);
*(_BYTE *)(v27 + v22) = 0;
}
v14 = v41;
}
else
{
v24 = 0LL;
}
v23 = a1;
}
else
{
v23 = a1;
v24 = 0LL;
JS_ThrowRangeError(a1, (long long)"invalid string length", v19, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v40);
}
JS_FreeValue(v23, v17, v16);
JS_FreeValue(v23, v40, v14);
return v24;
}
| JS_ConcatString:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBP,R8
MOV R15,RCX
MOV RBX,RDX
MOV R14,RSI
MOV R12,RDI
CMP EBX,-0x7
JNZ 0x001387b8
LAB_0013857f:
MOV EAX,0xfffffff9
CMP EBP,EAX
JNZ 0x001387d9
LAB_0013858c:
MOV RDX,qword ptr [R15 + 0x4]
TEST EDX,0x7fffffff
JZ 0x00138795
CMP dword ptr [R14],0x1
MOV R13,qword ptr [R14 + 0x4]
JNZ 0x001385f3
MOV EAX,R13D
XOR EAX,EDX
JS 0x001385f3
MOV RAX,qword ptr [R12 + 0x18]
MOV RDI,R14
CALL qword ptr [RAX + 0x20]
MOV R13,qword ptr [R14 + 0x4]
MOV R8D,0x7fffffff
MOVSXD RSI,R13D
MOV EDI,R13D
AND EDI,R8D
MOV RDX,qword ptr [R15 + 0x4]
AND R8D,EDX
ADD EDI,R8D
MOV ECX,EDX
SHR ECX,0x1f
SHL EDI,CL
MOVSXD RCX,EDI
SAR RSI,0x1f
ADD RCX,RSI
ADD RCX,0x19
CMP RAX,RCX
JNC 0x001386b6
LAB_001385f3:
MOV qword ptr [RSP],R15
MOV R15D,0x7fffffff
MOV EAX,R13D
AND EAX,R15D
AND R15D,EDX
ADD R15,RAX
CMP R15D,0x40000000
JC 0x00138632
LEA RSI,[0x1858be]
MOV R13,R12
XOR R12D,R12D
MOV RDI,R13
XOR EAX,EAX
CALL 0x0011acb3
PUSH 0x6
POP R15
JMP 0x00138744
LAB_00138632:
OR R13D,EDX
MOV EDX,R13D
SHR EDX,0x1f
MOV qword ptr [RSP + 0x8],R12
MOV RDI,R12
MOV ESI,R15D
CALL 0x0011ad45
TEST RAX,RAX
JZ 0x001386aa
MOV R12,RAX
MOV qword ptr [RSP + 0x10],RBP
MOV RBP,RAX
ADD RBP,0x18
TEST R13D,R13D
JS 0x00138705
LEA RSI,[R14 + 0x18]
MOV R13D,0x7fffffff
MOV RDX,qword ptr [R14 + 0x4]
AND RDX,R13
MOV RDI,RBP
CALL 0x0010e5c0
MOV RDI,qword ptr [R14 + 0x4]
AND RDI,R13
ADD RDI,RBP
MOV RAX,qword ptr [RSP]
LEA RSI,[RAX + 0x18]
AND R13,qword ptr [RAX + 0x4]
MOV RDX,R13
CALL 0x0010e5c0
MOV byte ptr [RBP + R15*0x1],0x0
JMP 0x00138736
LAB_001386aa:
PUSH 0x6
POP R15
XOR R12D,R12D
JMP 0x0013873f
LAB_001386b6:
LEA RDI,[R14 + 0x18]
MOV EAX,R13D
AND EAX,0x7fffffff
LEA RSI,[R15 + 0x18]
TEST R13D,R13D
JS 0x00138769
ADD RDI,RAX
AND EDX,0x7fffffff
CALL 0x0010e5c0
MOV RAX,qword ptr [R14 + 0x4]
MOV ECX,dword ptr [R15 + 0x4]
ADD ECX,EAX
AND ECX,0x7fffffff
AND RAX,-0x80000000
OR RAX,RCX
MOV qword ptr [R14 + 0x4],RAX
MOV byte ptr [R14 + RCX*0x1 + 0x18],0x0
JMP 0x00138795
LAB_00138705:
MOV R15D,0x7fffffff
MOV EDX,dword ptr [R14 + 0x4]
AND EDX,R15D
MOV RDI,RBP
MOV RSI,R14
CALL 0x0013a875
MOV EDI,dword ptr [R14 + 0x4]
ADD EDI,EDI
ADD RDI,RBP
MOV RSI,qword ptr [RSP]
AND R15D,dword ptr [RSI + 0x4]
MOV EDX,R15D
CALL 0x0013a875
LAB_00138736:
PUSH -0x7
POP R15
MOV RBP,qword ptr [RSP + 0x10]
LAB_0013873f:
MOV R13,qword ptr [RSP + 0x8]
LAB_00138744:
MOV RDI,R13
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
MOV RDI,R13
MOV RSI,qword ptr [RSP]
MOV RDX,RBP
CALL 0x0011801e
MOV R14,R12
MOV RBX,R15
JMP 0x001387a3
LAB_00138769:
LEA RDI,[RDI + RAX*0x2]
ADD R8D,R8D
MOVSXD RDX,R8D
CALL 0x0010e5c0
MOV RAX,qword ptr [R14 + 0x4]
MOV ECX,dword ptr [R15 + 0x4]
ADD ECX,EAX
AND ECX,0x7fffffff
AND RAX,-0x80000000
OR RAX,RCX
MOV qword ptr [R14 + 0x4],RAX
LAB_00138795:
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBP
CALL 0x0011801e
LAB_001387a3:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001387b8:
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
CALL 0x0012e049
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x00138805
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBP
JMP 0x001387f8
LAB_001387d9:
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBP
CALL 0x0012e049
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x0013880d
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
LAB_001387f8:
CALL 0x0011801e
PUSH 0x6
POP RBX
XOR R14D,R14D
JMP 0x001387a3
LAB_00138805:
MOV R14,RAX
JMP 0x0013857f
LAB_0013880d:
MOV R15,RAX
JMP 0x0013858c
|
int1 [16]
JS_ConcatString(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int1 auVar1 [16];
ulong uVar2;
long lVar3;
uint uVar4;
void *__dest;
uint uVar5;
int *piVar6;
long lVar7;
long lVar8;
int8 uVar9;
int1 auVar10 [16];
int1 auVar11 [16];
auVar11._8_8_ = param_5;
auVar11._0_8_ = param_4;
auVar10._8_8_ = param_3;
auVar10._0_8_ = param_2;
if (((int)param_3 == -7) ||
(auVar10 = JS_ToStringFree(param_1,param_2,param_3), auVar1 = auVar11, auVar10._8_4_ != 6)) {
piVar6 = auVar10._0_8_;
if (((int)param_5 == -7) ||
(auVar11 = JS_ToStringFree(param_1,param_4,param_5), auVar1 = auVar10, auVar11._8_4_ != 6)) {
lVar7 = auVar11._0_8_;
uVar4 = (uint)*(ulong *)(lVar7 + 4);
if ((*(ulong *)(lVar7 + 4) & 0x7fffffff) == 0) {
LAB_00138795:
JS_FreeValue(param_1,lVar7,auVar11._8_8_);
return auVar10;
}
uVar5 = (uint)*(int8 *)(piVar6 + 1);
if ((*piVar6 == 1) && (-1 < (int)(uVar5 ^ uVar4))) {
uVar2 = (**(code **)(*(long *)(param_1 + 0x18) + 0x20))(piVar6);
uVar5 = (uint)*(int8 *)(piVar6 + 1);
uVar4 = (uint)*(ulong *)(lVar7 + 4);
if ((long)(int)((uVar5 & 0x7fffffff) + (uVar4 & 0x7fffffff) <<
((byte)(*(ulong *)(lVar7 + 4) >> 0x1f) & 1)) + ((long)(int)uVar5 >> 0x1f) +
0x19U <= uVar2) {
if ((int)uVar5 < 0) {
memcpy((void *)((long)piVar6 + (ulong)(uVar5 & 0x7fffffff) * 2 + 0x18),
(void *)(lVar7 + 0x18),(long)(int)((uVar4 & 0x7fffffff) * 2));
*(ulong *)(piVar6 + 1) =
*(ulong *)(piVar6 + 1) & 0xffffffff80000000 |
(ulong)(*(int *)(lVar7 + 4) + (int)*(ulong *)(piVar6 + 1) & 0x7fffffff);
}
else {
memcpy((void *)((long)piVar6 + (ulong)(uVar5 & 0x7fffffff) + 0x18),
(void *)(lVar7 + 0x18),(ulong)(uVar4 & 0x7fffffff));
uVar2 = (ulong)(*(int *)(lVar7 + 4) + (int)*(ulong *)(piVar6 + 1) & 0x7fffffff);
*(ulong *)(piVar6 + 1) = *(ulong *)(piVar6 + 1) & 0xffffffff80000000 | uVar2;
*(int1 *)((long)piVar6 + uVar2 + 0x18) = 0;
}
goto LAB_00138795;
}
}
lVar8 = (ulong)(uVar4 & 0x7fffffff) + (ulong)(uVar5 & 0x7fffffff);
if ((uint)lVar8 < 0x40000000) {
lVar3 = js_alloc_string(param_1,lVar8,(uVar5 | uVar4) >> 0x1f);
if (lVar3 == 0) {
uVar9 = 6;
lVar3 = 0;
}
else {
__dest = (void *)(lVar3 + 0x18);
if ((int)(uVar5 | uVar4) < 0) {
copy_str16(__dest,piVar6,piVar6[1] & 0x7fffffff);
copy_str16((ulong)(uint)(piVar6[1] * 2) + (long)__dest,lVar7,
*(uint *)(lVar7 + 4) & 0x7fffffff);
}
else {
memcpy(__dest,piVar6 + 6,*(ulong *)(piVar6 + 1) & 0x7fffffff);
memcpy((void *)((*(ulong *)(piVar6 + 1) & 0x7fffffff) + (long)__dest),
(void *)(lVar7 + 0x18),*(ulong *)(lVar7 + 4) & 0x7fffffff);
*(int1 *)((long)__dest + lVar8) = 0;
}
uVar9 = 0xfffffffffffffff9;
}
}
else {
lVar3 = 0;
JS_ThrowRangeError(param_1,"invalid string length");
uVar9 = 6;
}
auVar1._8_8_ = uVar9;
auVar1._0_8_ = lVar3;
JS_FreeValue(param_1,piVar6,auVar10._8_8_);
JS_FreeValue(param_1,lVar7,auVar11._8_8_);
return auVar1;
}
}
JS_FreeValue(param_1,auVar1._0_8_,auVar1._8_8_);
return ZEXT816(6) << 0x40;
}
| |
40,717 | 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";
} | O2 | cpp | minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $0x12, %esi
ja 0x7565d
movl %esi, %eax
leaq 0x3f5ee(%rip), %rcx # 0xb4b88
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x40377(%rip), %rsi # 0xb5921
jmp 0x75664
leaq 0x406f5(%rip), %rsi # 0xb5cab
jmp 0x75664
leaq 0x406bc(%rip), %rsi # 0xb5c7e
jmp 0x75664
leaq 0x40686(%rip), %rsi # 0xb5c54
jmp 0x75664
leaq 0x40584(%rip), %rsi # 0xb5b5e
jmp 0x75664
leaq 0x416fa(%rip), %rsi # 0xb6ce0
jmp 0x75664
leaq 0x405fa(%rip), %rsi # 0xb5be9
jmp 0x75664
leaq 0x385c1(%rip), %rsi # 0xadbb9
jmp 0x75664
leaq 0x406ad(%rip), %rsi # 0xb5cae
jmp 0x75664
leaq 0x4057a(%rip), %rsi # 0xb5b84
jmp 0x75664
leaq 0x405cf(%rip), %rsi # 0xb5be2
jmp 0x75664
leaq 0x40739(%rip), %rsi # 0xb5d55
jmp 0x75664
leaq 0x40690(%rip), %rsi # 0xb5cb5
jmp 0x75664
leaq 0x4055b(%rip), %rsi # 0xb5b89
jmp 0x75664
leaq 0x4064a(%rip), %rsi # 0xb5c81
jmp 0x75664
leaq 0x405a5(%rip), %rsi # 0xb5be5
jmp 0x75664
leaq 0x40672(%rip), %rsi # 0xb5cbb
jmp 0x75664
leaq 0x45747(%rip), %rsi # 0xbad99
jmp 0x75664
leaq 0x40591(%rip), %rsi # 0xb5bec
jmp 0x75664
leaq 0x41684(%rip), %rsi # 0xb6ce8
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x283ac
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
| _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE:
push rbx
sub rsp, 10h
mov rbx, rdi
cmp esi, 12h; switch 19 cases
ja def_755A1; jumptable 00000000000755A1 default case
mov eax, esi
lea rcx, jpt_755A1
movsxd rax, ds:(jpt_755A1 - 0B4B88h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_755A3:
lea rsi, aText; jumptable 00000000000755A1 case 0
jmp loc_75664
loc_755AF:
lea rsi, aEndfilter; jumptable 00000000000755A1 case 16
jmp loc_75664
loc_755BB:
lea rsi, aEndmacro; jumptable 00000000000755A1 case 14
jmp loc_75664
loc_755C7:
lea rsi, aEndset; jumptable 00000000000755A1 case 11
jmp loc_75664
loc_755D3:
lea rsi, aElif; jumptable 00000000000755A1 case 4
jmp loc_75664
loc_755DF:
lea rsi, aComment; jumptable 00000000000755A1 case 12
jmp short loc_75664
loc_755E8:
lea rsi, aEndgeneration; jumptable 00000000000755A1 case 9
jmp short loc_75664
loc_755F1:
lea rsi, aIf+1; jumptable 00000000000755A1 case 2
jmp short loc_75664
loc_755FA:
lea rsi, aEndfilter+3; jumptable 00000000000755A1 case 15
jmp short loc_75664
loc_75603:
lea rsi, aElse; jumptable 00000000000755A1 case 3
jmp short loc_75664
loc_7560C:
lea rsi, aEndfor; jumptable 00000000000755A1 case 7
jmp short loc_75664
loc_75615:
lea rsi, aExpectedLeftSi_0+24h; jumptable 00000000000755A1 case 1
jmp short loc_75664
loc_7561E:
lea rsi, aBreak; jumptable 00000000000755A1 case 17
jmp short loc_75664
loc_75627:
lea rsi, aEndif; jumptable 00000000000755A1 case 5
jmp short loc_75664
loc_75630:
lea rsi, aEndmacro+3; jumptable 00000000000755A1 case 13
jmp short loc_75664
loc_75639:
lea rsi, aEndfor+3; jumptable 00000000000755A1 case 6
jmp short loc_75664
loc_75642:
lea rsi, aContinue; jumptable 00000000000755A1 case 18
jmp short loc_75664
loc_7564B:
lea rsi, aAtLeastOneOfMi+2Fh; jumptable 00000000000755A1 case 10
jmp short loc_75664
loc_75654:
lea rsi, aEndgeneration+3; jumptable 00000000000755A1 case 8
jmp short loc_75664
def_755A1:
lea rsi, aUnknown; jumptable 00000000000755A1 default case
loc_75664:
lea rdx, [rsp+18h+var_9]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rax, rbx
add rsp, 10h
pop rbx
retn
| _QWORD * minja::TemplateToken::typeToString[abi:cxx11](_QWORD *a1, int a2)
{
char *v2; // rsi
switch ( a2 )
{
case 0:
v2 = "text";
break;
case 1:
v2 = (char *)"expression";
break;
case 2:
v2 = "if";
break;
case 3:
v2 = "else";
break;
case 4:
v2 = "elif";
break;
case 5:
v2 = "endif";
break;
case 6:
v2 = "for";
break;
case 7:
v2 = "endfor";
break;
case 8:
v2 = "generation";
break;
case 9:
v2 = "endgeneration";
break;
case 10:
v2 = (char *)"set";
break;
case 11:
v2 = "endset";
break;
case 12:
v2 = "comment";
break;
case 13:
v2 = "macro";
break;
case 14:
v2 = "endmacro";
break;
case 15:
v2 = "filter";
break;
case 16:
v2 = "endfilter";
break;
case 17:
v2 = "break";
break;
case 18:
v2 = "continue";
break;
default:
v2 = "Unknown";
break;
}
std::string::basic_string<std::allocator<char>>(a1, (long long)v2);
return a1;
}
| typeToString[abi:cxx11]:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
CMP ESI,0x12
JA 0x0017565d
MOV EAX,ESI
LEA RCX,[0x1b4b88]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[0x1b5921]
JMP 0x00175664
caseD_10:
LEA RSI,[0x1b5cab]
JMP 0x00175664
caseD_e:
LEA RSI,[0x1b5c7e]
JMP 0x00175664
caseD_b:
LEA RSI,[0x1b5c54]
JMP 0x00175664
caseD_4:
LEA RSI,[0x1b5b5e]
JMP 0x00175664
caseD_c:
LEA RSI,[0x1b6ce0]
JMP 0x00175664
caseD_9:
LEA RSI,[0x1b5be9]
JMP 0x00175664
caseD_2:
LEA RSI,[0x1adbb9]
JMP 0x00175664
caseD_f:
LEA RSI,[0x1b5cae]
JMP 0x00175664
caseD_3:
LEA RSI,[0x1b5b84]
JMP 0x00175664
caseD_7:
LEA RSI,[0x1b5be2]
JMP 0x00175664
caseD_1:
LEA RSI,[0x1b5d55]
JMP 0x00175664
caseD_11:
LEA RSI,[0x1b5cb5]
JMP 0x00175664
caseD_5:
LEA RSI,[0x1b5b89]
JMP 0x00175664
caseD_d:
LEA RSI,[0x1b5c81]
JMP 0x00175664
caseD_6:
LEA RSI,[0x1b5be5]
JMP 0x00175664
caseD_12:
LEA RSI,[0x1b5cbb]
JMP 0x00175664
caseD_a:
LEA RSI,[0x1bad99]
JMP 0x00175664
caseD_8:
LEA RSI,[0x1b5bec]
JMP 0x00175664
default:
LEA RSI,[0x1b6ce8]
LAB_00175664:
LEA RDX,[RSP + 0xf]
MOV RDI,RBX
CALL 0x001283ac
MOV RAX,RBX
ADD RSP,0x10
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;
allocator local_9;
switch(param_2) {
case 0:
pcVar1 = "text";
break;
case 1:
pcVar1 = "expression";
break;
case 2:
pcVar1 = "if";
break;
case 3:
pcVar1 = "else";
break;
case 4:
pcVar1 = "elif";
break;
case 5:
pcVar1 = "endif";
break;
case 6:
pcVar1 = "for";
break;
case 7:
pcVar1 = "endfor";
break;
case 8:
pcVar1 = "generation";
break;
case 9:
pcVar1 = "endgeneration";
break;
case 10:
pcVar1 = "set";
break;
case 0xb:
pcVar1 = "endset";
break;
case 0xc:
pcVar1 = "comment";
break;
case 0xd:
pcVar1 = "macro";
break;
case 0xe:
pcVar1 = "endmacro";
break;
case 0xf:
pcVar1 = "filter";
break;
case 0x10:
pcVar1 = "endfilter";
break;
case 0x11:
pcVar1 = "break";
break;
case 0x12:
pcVar1 = "continue";
break;
default:
pcVar1 = "Unknown";
}
std::__cxx11::string::string<std::allocator<char>>((string *)this,pcVar1,&local_9);
return this;
}
| |
40,718 | Settings::clearMasterShips() | 666mxvbee[P]BattleShip/lib/Settings/Settings.cpp | void Settings::clearMasterShips() {
std::lock_guard<std::mutex> lock(settings_mutex);
masterShips.clear();
} | O1 | cpp | Settings::clearMasterShips():
pushq %rbx
movq %rdi, %rbx
callq 0x5500
testl %eax, %eax
jne 0x7189
leaq 0x90(%rbx), %rdi
movq 0x90(%rbx), %rsi
callq 0x15150
movq %rbx, %rdi
popq %rbx
jmp 0x52d0
movl %eax, %edi
callq 0x5260
| _ZN8Settings16clearMasterShipsEv:
push rbx
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz short loc_7189
lea rdi, [rbx+90h]
mov rsi, [rbx+90h]
call _ZNSt6vectorI4ShipSaIS0_EE15_M_erase_at_endEPS0_; std::vector<Ship>::_M_erase_at_end(Ship*)
mov rdi, rbx
pop rbx
jmp _pthread_mutex_unlock
loc_7189:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
| long long Settings::clearMasterShips(Settings *this)
{
int v1; // eax
v1 = pthread_mutex_lock(this);
if ( v1 )
std::__throw_system_error(v1);
std::vector<Ship>::_M_erase_at_end((char *)this + 144, *((_QWORD *)this + 18));
return pthread_mutex_unlock(this);
}
| clearMasterShips:
PUSH RBX
MOV RBX,RDI
CALL 0x00105500
TEST EAX,EAX
JNZ 0x00107189
LEA RDI,[RBX + 0x90]
MOV RSI,qword ptr [RBX + 0x90]
CALL 0x00115150
MOV RDI,RBX
POP RBX
JMP 0x001052d0
LAB_00107189:
MOV EDI,EAX
CALL 0x00105260
|
/* Settings::clearMasterShips() */
void __thiscall Settings::clearMasterShips(Settings *this)
{
int iVar1;
iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar1 == 0) {
std::vector<Ship,std::allocator<Ship>>::_M_erase_at_end
((vector<Ship,std::allocator<Ship>> *)(this + 0x90),*(Ship **)(this + 0x90));
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
| |
40,719 | ma_dynstr_append_mem | eloqsql/libmariadb/libmariadb/ma_string.c | my_bool ma_dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
size_t length)
{
char *new_ptr;
if (str->length+length >= str->max_length)
{
size_t new_length=(str->length+length+str->alloc_increment)/
str->alloc_increment;
new_length*=str->alloc_increment;
if (!(new_ptr=(char*) realloc(str->str,new_length)))
return TRUE;
str->str=new_ptr;
str->max_length=new_length;
}
memcpy(str->str + str->length,append,length);
str->length+=length;
str->str[str->length]=0; /* Safety for C programs */
return FALSE;
} | O3 | c | ma_dynstr_append_mem:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rcx
movq 0x8(%rdi), %rdi
leaq (%rdi,%rdx), %r12
cmpq 0x10(%r14), %r12
jb 0x27fae
movq 0x18(%r14), %rsi
addq %rsi, %r12
movq %r12, %rax
xorl %edx, %edx
divq %rsi
subq %rdx, %r12
movq %rcx, %rdi
movq %r12, %rsi
callq 0x13730
testq %rax, %rax
je 0x27fd6
movq %rax, %rcx
movq %rax, (%r14)
movq %r12, 0x10(%r14)
movq 0x8(%r14), %rdi
addq %rcx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x13390
addq 0x8(%r14), %rbx
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movb $0x0, (%rax,%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x27fcd
| ma_dynstr_append_mem:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rcx, [rdi]
mov rdi, [rdi+8]
lea r12, [rdi+rdx]
cmp r12, [r14+10h]
jb short loc_27FAE
mov rsi, [r14+18h]
add r12, rsi
mov rax, r12
xor edx, edx
div rsi
sub r12, rdx
mov rdi, rcx
mov rsi, r12
call _realloc
test rax, rax
jz short loc_27FD6
mov rcx, rax
mov [r14], rax
mov [r14+10h], r12
mov rdi, [r14+8]
loc_27FAE:
add rdi, rcx
mov rsi, r15
mov rdx, rbx
call _memcpy
add rbx, [r14+8]
mov [r14+8], rbx
mov rax, [r14]
mov byte ptr [rax+rbx], 0
xor eax, eax
loc_27FCD:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_27FD6:
mov al, 1
jmp short loc_27FCD
| long long ma_dynstr_append_mem(long long *a1, long long a2, long long a3)
{
long long v5; // rcx
long long v6; // rdi
unsigned long long v7; // r12
long long v8; // rax
long long v9; // rbx
v5 = *a1;
v6 = a1[1];
if ( v6 + a3 < (unsigned long long)a1[2] )
goto LABEL_4;
v7 = a1[3] + v6 + a3 - (a1[3] + v6 + a3) % (unsigned long long)a1[3];
v8 = realloc(v5, v7);
if ( v8 )
{
v5 = v8;
*a1 = v8;
a1[2] = v7;
v6 = a1[1];
LABEL_4:
memcpy(v5 + v6, a2, a3);
v9 = a1[1] + a3;
a1[1] = v9;
*(_BYTE *)(*a1 + v9) = 0;
return 0LL;
}
return 1LL;
}
| ma_dynstr_append_mem:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RCX,qword ptr [RDI]
MOV RDI,qword ptr [RDI + 0x8]
LEA R12,[RDI + RDX*0x1]
CMP R12,qword ptr [R14 + 0x10]
JC 0x00127fae
MOV RSI,qword ptr [R14 + 0x18]
ADD R12,RSI
MOV RAX,R12
XOR EDX,EDX
DIV RSI
SUB R12,RDX
MOV RDI,RCX
MOV RSI,R12
CALL 0x00113730
TEST RAX,RAX
JZ 0x00127fd6
MOV RCX,RAX
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x10],R12
MOV RDI,qword ptr [R14 + 0x8]
LAB_00127fae:
ADD RDI,RCX
MOV RSI,R15
MOV RDX,RBX
CALL 0x00113390
ADD RBX,qword ptr [R14 + 0x8]
MOV qword ptr [R14 + 0x8],RBX
MOV RAX,qword ptr [R14]
MOV byte ptr [RAX + RBX*0x1],0x0
XOR EAX,EAX
LAB_00127fcd:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00127fd6:
MOV AL,0x1
JMP 0x00127fcd
|
int8 ma_dynstr_append_mem(long *param_1,void *param_2,size_t param_3)
{
void *__ptr;
long lVar1;
ulong uVar2;
size_t __size;
__ptr = (void *)*param_1;
lVar1 = param_1[1];
if ((ulong)param_1[2] <= lVar1 + param_3) {
uVar2 = lVar1 + param_3 + param_1[3];
__size = uVar2 - uVar2 % (ulong)param_1[3];
__ptr = realloc(__ptr,__size);
if (__ptr == (void *)0x0) {
return 1;
}
*param_1 = (long)__ptr;
param_1[2] = __size;
lVar1 = param_1[1];
}
memcpy((void *)(lVar1 + (long)__ptr),param_2,param_3);
lVar1 = param_1[1];
param_1[1] = param_3 + lVar1;
*(int1 *)(*param_1 + param_3 + lVar1) = 0;
return 0;
}
| |
40,720 | my_strnncoll_tis620 | eloqsql/strings/ctype-tis620.c | static
int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
uchar buf[80] ;
uchar *tc1, *tc2;
int i;
if (s2_is_prefix && len1 > len2)
len1= len2;
tc1= buf;
if ((len1 + len2 +2) > (int) sizeof(buf))
tc1= (uchar*) my_malloc(PSI_INSTRUMENT_ME, len1+len2+2, MYF(MY_FAE));
tc2= tc1 + len1+1;
memcpy((char*) tc1, (char*) s1, len1);
tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */
memcpy((char *)tc2, (char *)s2, len2);
tc2[len2]= 0; /* put end of string */
thai2sortable(tc1, len1);
thai2sortable(tc2, len2);
i= strcmp((char*)tc1, (char*)tc2);
if (tc1 != buf)
my_free(tc1);
return i;
} | O3 | c | my_strnncoll_tis620:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %rbx
movq %rcx, -0x88(%rbp)
movq %rsi, %rcx
movq %fs:0x28, %rax
cmpq %r8, %rdx
movq %r8, %r15
cmovbq %rdx, %r15
movq %rax, -0x30(%rbp)
testb %r9b, %r9b
cmoveq %rdx, %r15
leaq (%r8,%r15), %rsi
addq $0x2, %rsi
leaq -0x80(%rbp), %r14
cmpq $0x51, %rsi
jb 0x3e996
movl $0x8, %edx
xorl %edi, %edi
movq %rcx, %r14
callq 0x28289
movq %r14, %rcx
movq %rax, %r14
leaq (%r14,%r15), %r13
leaq (%r14,%r15), %r12
incq %r12
movq %r14, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x24240
xorl %eax, %eax
movb %al, -0x1(%r12)
movq %r12, %rdi
movq -0x88(%rbp), %rsi
movq %rbx, %rdx
callq 0x24240
xorl %eax, %eax
movb %al, 0x1(%rbx,%r13)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3ec23
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3ec23
movq %r14, %rdi
movq %r12, %rsi
callq 0x24490
movl %eax, %ebx
leaq -0x80(%rbp), %rax
cmpq %rax, %r14
je 0x3ea03
movq %r14, %rdi
callq 0x284b6
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3ea23
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24370
| my_strnncoll_tis620:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, r8
mov [rbp+var_88], rcx
mov rcx, rsi
mov rax, fs:28h
cmp rdx, r8
mov r15, r8
cmovb r15, rdx
mov [rbp+var_30], rax
test r9b, r9b
cmovz r15, rdx
lea rsi, [r8+r15]
add rsi, 2
lea r14, [rbp+var_80]
cmp rsi, 51h ; 'Q'
jb short loc_3E996
mov edx, 8
xor edi, edi
mov r14, rcx
call my_malloc
mov rcx, r14
mov r14, rax
loc_3E996:
lea r13, [r14+r15]
lea r12, [r14+r15]
inc r12
mov rdi, r14
mov rsi, rcx
mov rdx, r15
call _memcpy
xor eax, eax
mov [r12-1], al
mov rdi, r12
mov rsi, [rbp+var_88]
mov rdx, rbx
call _memcpy
xor eax, eax
mov [rbx+r13+1], al
mov rdi, r14
mov rsi, r15
call thai2sortable
mov rdi, r12
mov rsi, rbx
call thai2sortable
mov rdi, r14
mov rsi, r12
call _strcmp
mov ebx, eax
lea rax, [rbp+var_80]
cmp r14, rax
jz short loc_3EA03
mov rdi, r14
call my_free
loc_3EA03:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_3EA23
mov eax, ebx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3EA23:
call ___stack_chk_fail
| long long my_strnncoll_tis620(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned long long v8; // rax
unsigned long long v9; // r15
unsigned long long v10; // rsi
_BYTE *v11; // r14
long long v12; // r14
long long v13; // rax
unsigned int v14; // ebx
_BYTE v17[80]; // [rsp+10h] [rbp-80h] BYREF
unsigned long long v18; // [rsp+60h] [rbp-30h]
v8 = __readfsqword(0x28u);
v9 = a5;
if ( a3 < a5 )
v9 = a3;
v18 = v8;
if ( !a6 )
v9 = a3;
v10 = a5 + v9 + 2;
v11 = v17;
if ( v10 >= 0x51 )
{
v12 = a2;
v13 = my_malloc(0, v10, 8);
a2 = v12;
v11 = (_BYTE *)v13;
}
memcpy(v11, a2, v9);
v11[v9] = 0;
memcpy(&v11[v9 + 1], a4, a5);
v11[v9 + 1 + a5] = 0;
thai2sortable(v11, v9);
thai2sortable(&v11[v9 + 1], a5);
v14 = strcmp(v11, &v11[v9 + 1]);
if ( v11 != v17 )
my_free((long long)v11);
return v14;
}
| my_strnncoll_tis620:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,R8
MOV qword ptr [RBP + -0x88],RCX
MOV RCX,RSI
MOV RAX,qword ptr FS:[0x28]
CMP RDX,R8
MOV R15,R8
CMOVC R15,RDX
MOV qword ptr [RBP + -0x30],RAX
TEST R9B,R9B
CMOVZ R15,RDX
LEA RSI,[R8 + R15*0x1]
ADD RSI,0x2
LEA R14,[RBP + -0x80]
CMP RSI,0x51
JC 0x0013e996
MOV EDX,0x8
XOR EDI,EDI
MOV R14,RCX
CALL 0x00128289
MOV RCX,R14
MOV R14,RAX
LAB_0013e996:
LEA R13,[R14 + R15*0x1]
LEA R12,[R14 + R15*0x1]
INC R12
MOV RDI,R14
MOV RSI,RCX
MOV RDX,R15
CALL 0x00124240
XOR EAX,EAX
MOV byte ptr [R12 + -0x1],AL
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,RBX
CALL 0x00124240
XOR EAX,EAX
MOV byte ptr [RBX + R13*0x1 + 0x1],AL
MOV RDI,R14
MOV RSI,R15
CALL 0x0013ec23
MOV RDI,R12
MOV RSI,RBX
CALL 0x0013ec23
MOV RDI,R14
MOV RSI,R12
CALL 0x00124490
MOV EBX,EAX
LEA RAX,[RBP + -0x80]
CMP R14,RAX
JZ 0x0013ea03
MOV RDI,R14
CALL 0x001284b6
LAB_0013ea03:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013ea23
MOV EAX,EBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013ea23:
CALL 0x00124370
|
int my_strnncoll_tis620(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
int iVar1;
char *__s1;
ulong uVar2;
char *__s2;
ulong __n;
long in_FS_OFFSET;
char local_88 [80];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
__n = param_5;
if (param_3 < param_5) {
__n = param_3;
}
if (param_6 == '\0') {
__n = param_3;
}
uVar2 = param_5 + __n + 2;
__s1 = local_88;
if (0x50 < uVar2) {
__s1 = (char *)my_malloc(0,uVar2,8);
}
__s2 = __s1 + __n + 1;
memcpy(__s1,param_2,__n);
__s1[__n] = '\0';
memcpy(__s2,param_4,param_5);
__s1[param_5 + 1 + __n] = '\0';
thai2sortable(__s1,__n);
thai2sortable(__s2,param_5);
iVar1 = strcmp(__s1,__s2);
if (__s1 != local_88) {
my_free(__s1);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,721 | test_get_options | eloqsql/libmariadb/unittest/libmariadb/connection.c | static int test_get_options(MYSQL *unused __attribute__((unused)))
{
MYSQL *mysql= mysql_init(NULL);
int options_int[]= {MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_LOCAL_INFILE,
MYSQL_OPT_PROTOCOL, MYSQL_OPT_READ_TIMEOUT, MYSQL_OPT_WRITE_TIMEOUT, 0};
my_bool options_bool[]= {MYSQL_OPT_RECONNECT, MYSQL_REPORT_DATA_TRUNCATION,
MYSQL_OPT_COMPRESS, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_SECURE_AUTH,
#ifdef _WIN32
MYSQL_OPT_NAMED_PIPE,
#endif
0};
int options_char[]= {MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, MYSQL_SET_CHARSET_NAME,
MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CERT, MYSQL_OPT_SSL_CAPATH,
MYSQL_OPT_SSL_CIPHER, MYSQL_OPT_BIND, MARIADB_OPT_SSL_FP, MARIADB_OPT_SSL_FP_LIST,
MARIADB_OPT_TLS_PASSPHRASE, 0};
const char *init_command[3]= {"SET @a:=1", "SET @b:=2", "SET @c:=3"};
int elements= 0;
char **command;
int intval[2]= {1, 0};
my_bool boolval[2]= {1, 0};
const char *char1= "test";
char *char2;
int i;
MYSQL *userdata;
const char *attr_key[] = {"foo1", "foo2", "foo3"};
const char *attr_val[] = {"bar1", "bar2", "bar3"};
char **key, **val;
for (i=0; i < (int)(sizeof(options_int)/sizeof(int)); i++)
{
mysql_options(mysql, options_int[i], &intval[0]);
intval[1]= 0;
mysql_get_optionv(mysql, options_int[i], &intval[1]);
FAIL_IF(intval[0] != intval[1], "mysql_get_optionv (int) failed");
}
for (i=0; options_bool[i]; i++)
{
mysql_options(mysql, options_bool[i], &boolval[0]);
intval[1]= 0;
mysql_get_optionv(mysql, options_bool[i], &boolval[1]);
FAIL_IF(boolval[0] != boolval[1], "mysql_get_optionv (my_bool) failed");
}
for (i=0; options_char[i]; i++)
{
mysql_options(mysql, options_char[i], char1);
char2= NULL;
mysql_get_optionv(mysql, options_char[i], (void *)&char2);
if (options_char[i] != MYSQL_SET_CHARSET_NAME)
FAIL_IF(strcmp(char1, char2), "mysql_get_optionv (char) failed");
}
for (i=0; i < 3; i++)
mysql_options(mysql, MYSQL_INIT_COMMAND, init_command[i]);
mysql_get_optionv(mysql, MYSQL_INIT_COMMAND, &command, &elements);
FAIL_IF(elements != 3, "expected 3 elements");
for (i=0; i < 3; i++)
FAIL_IF(strcmp(init_command[i], command[i]), "wrong init command");
for (i=0; i < 3; i++)
mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_ADD, attr_key[i], attr_val[i]);
mysql_get_optionv(mysql, MYSQL_OPT_CONNECT_ATTRS, NULL, NULL, &elements);
FAIL_IF(elements != 3, "expected 3 connection attributes");
key= (char **)malloc(sizeof(char *) * elements);
val= (char **)malloc(sizeof(char *) * elements);
mysql_get_optionv(mysql, MYSQL_OPT_CONNECT_ATTRS, &key, &val, &elements);
for (i=0; i < elements; i++)
{
diag("%s => %s", key[i], val[i]);
}
free(key);
free(val);
mysql_optionsv(mysql, MARIADB_OPT_USERDATA, "my_app", (void *)mysql);
mysql_get_optionv(mysql, MARIADB_OPT_USERDATA, (char *)"my_app", &userdata);
FAIL_IF(mysql != userdata, "wrong userdata");
mysql_close(mysql);
return OK;
} | O3 | c | test_get_options:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorl %edi, %edi
callq 0x1efb5
movq %rax, %rbx
movl $0x0, -0x30(%rbp)
leaq -0x34(%rbp), %r14
movq $0x1, -0x4(%r14)
movw $0x1, -0x2a(%rbp)
leaq -0x38(%rbp), %r15
xorl %r13d, %r13d
leaq 0x2625f(%rip), %rax # 0x40270
movl (%r13,%rax), %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq 0x23221
movl $0x0, -0x34(%rbp)
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22be6
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0x1a2b2
addq $0x4, %r13
cmpq $0x18, %r13
jne 0x1a00a
leaq 0x22983(%rip), %r13 # 0x3c9db
leaq -0x2a(%rbp), %r15
xorl %r14d, %r14d
movsbl (%r14,%r13), %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq 0x23221
movl $0x0, -0x34(%rbp)
movq %rbx, %rdi
movl %r12d, %esi
leaq -0x29(%rbp), %rdx
xorl %eax, %eax
callq 0x22be6
movb -0x2a(%rbp), %al
cmpb -0x29(%rbp), %al
jne 0x1a2d1
incq %r14
cmpq $0x5, %r14
jne 0x1a05f
leaq 0x212ff(%rip), %r14 # 0x3b3a5
leaq -0x50(%rbp), %r15
xorl %r13d, %r13d
leaq 0x261ec(%rip), %rax # 0x402a0
movl (%r13,%rax), %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
callq 0x23221
movq $0x0, -0x50(%rbp)
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x22be6
cmpq $0x8, %r13
je 0x1a0f9
movq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0x13670
testl %eax, %eax
jne 0x1a2ed
addq $0x4, %r13
cmpq $0x30, %r13
jne 0x1a0ad
xorl %r14d, %r14d
leaq 0x2ea53(%rip), %r15 # 0x48b60
movq (%r14,%r15), %rdx
movq %rbx, %rdi
movl $0x3, %esi
callq 0x23221
addq $0x8, %r14
cmpq $0x18, %r14
jne 0x1a10d
leaq -0x58(%rbp), %rdx
leaq -0x30(%rbp), %r14
movq %rbx, %rdi
movl $0x3, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x22be6
cmpl $0x3, (%r14)
jne 0x1a309
movq -0x58(%rbp), %r14
xorl %r12d, %r12d
movq (%r12,%r15), %rdi
movq (%r14,%r12), %rsi
callq 0x13670
testl %eax, %eax
jne 0x1a325
addq $0x8, %r12
cmpq $0x18, %r12
jne 0x1a153
leaq 0x2610f(%rip), %r14 # 0x40288
leaq 0x26114(%rip), %r15 # 0x40294
xorl %r12d, %r12d
movslq (%r12,%r14), %rdx
addq %r14, %rdx
movslq (%r12,%r15), %rcx
addq %r15, %rcx
movq %rbx, %rdi
movl $0x21, %esi
xorl %eax, %eax
callq 0x1d336
addq $0x4, %r12
cmpq $0xc, %r12
jne 0x1a183
leaq -0x30(%rbp), %r14
movq %rbx, %rdi
movl $0x1b61, %esi # imm = 0x1B61
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x22be6
cmpl $0x3, (%r14)
jne 0x1a341
movl $0x18, %edi
callq 0x13630
leaq -0x48(%rbp), %r14
movq %rax, (%r14)
movl $0x18, %edi
callq 0x13630
leaq -0x40(%rbp), %rcx
movq %rax, (%rcx)
leaq -0x30(%rbp), %r15
movq %rbx, %rdi
movl $0x1b61, %esi # imm = 0x1B61
movq %r14, %rdx
movq %r15, %r8
xorl %eax, %eax
callq 0x22be6
cmpl $0x0, (%r15)
jle 0x1a23f
leaq 0x228a7(%rip), %r14 # 0x3cabd
xorl %r15d, %r15d
movq -0x48(%rbp), %rax
movq (%rax,%r15,8), %rsi
movq -0x40(%rbp), %rax
movq (%rax,%r15,8), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1bb8f
incq %r15
movslq -0x30(%rbp), %rax
cmpq %rax, %r15
jl 0x1a219
movq -0x48(%rbp), %rdi
callq 0x135a0
movq -0x40(%rbp), %rdi
callq 0x135a0
leaq 0x2286e(%rip), %r15 # 0x3cac6
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1b62, %esi # imm = 0x1B62
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1d336
leaq -0x60(%rbp), %r12
movq %rbx, %rdi
movl $0x1b62, %esi # imm = 0x1B62
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x22be6
cmpq (%r12), %rbx
je 0x1a37a
leaq 0x20d6e(%rip), %rdi # 0x3b008
leaq 0x2282c(%rip), %rsi # 0x3cacd
leaq 0x2130d(%rip), %rdx # 0x3b5b5
movl $0x3a7, %ecx # imm = 0x3A7
jmp 0x1a35b
leaq 0x20d4f(%rip), %rdi # 0x3b008
leaq 0x22753(%rip), %rsi # 0x3ca13
leaq 0x212ee(%rip), %rdx # 0x3b5b5
movl $0x379, %ecx # imm = 0x379
jmp 0x1a35b
leaq 0x20d30(%rip), %rdi # 0x3b008
leaq 0x22753(%rip), %rsi # 0x3ca32
leaq 0x212cf(%rip), %rdx # 0x3b5b5
movl $0x380, %ecx # imm = 0x380
jmp 0x1a35b
leaq 0x20d14(%rip), %rdi # 0x3b008
leaq 0x2275a(%rip), %rsi # 0x3ca55
leaq 0x212b3(%rip), %rdx # 0x3b5b5
movl $0x388, %ecx # imm = 0x388
jmp 0x1a35b
leaq 0x20cf8(%rip), %rdi # 0x3b008
leaq 0x2275e(%rip), %rsi # 0x3ca75
leaq 0x21297(%rip), %rdx # 0x3b5b5
movl $0x38f, %ecx # imm = 0x38F
jmp 0x1a35b
leaq 0x20cdc(%rip), %rdi # 0x3b008
leaq 0x22756(%rip), %rsi # 0x3ca89
leaq 0x2127b(%rip), %rdx # 0x3b5b5
movl $0x391, %ecx # imm = 0x391
jmp 0x1a35b
leaq 0x20cc0(%rip), %rdi # 0x3b008
leaq 0x2274d(%rip), %rsi # 0x3ca9c
leaq 0x2125f(%rip), %rdx # 0x3b5b5
movl $0x396, %ecx # imm = 0x396
xorl %eax, %eax
callq 0x1bb8f
movl $0x1, %r14d
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x20d0c
jmp 0x1a368
| test_get_options:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
xor edi, edi
call mysql_init
mov rbx, rax
mov [rbp+var_30], 0
lea r14, [rbp+var_34]
mov qword ptr [r14-4], 1
mov [rbp+var_2A], 1
lea r15, [rbp+var_38]
xor r13d, r13d
loc_1A00A:
lea rax, unk_40270
mov r12d, [r13+rax+0]
mov rdi, rbx
mov esi, r12d
mov rdx, r15
call mysql_options
mov [rbp+var_34], 0
mov rdi, rbx
mov esi, r12d
mov rdx, r14
xor eax, eax
call mysql_get_optionv
mov eax, [rbp+var_38]
cmp eax, [rbp+var_34]
jnz loc_1A2B2
add r13, 4
cmp r13, 18h
jnz short loc_1A00A
lea r13, unk_3C9DB
lea r15, [rbp+var_2A]
xor r14d, r14d
loc_1A05F:
movsx r12d, byte ptr [r14+r13]
mov rdi, rbx
mov esi, r12d
mov rdx, r15
call mysql_options
mov [rbp+var_34], 0
mov rdi, rbx
mov esi, r12d
lea rdx, [rbp+var_2A+1]
xor eax, eax
call mysql_get_optionv
mov al, byte ptr [rbp+var_2A]
cmp al, byte ptr [rbp+var_2A+1]
jnz loc_1A2D1
inc r14
cmp r14, 5
jnz short loc_1A05F
lea r14, aTest; "test"
lea r15, [rbp+var_50]
xor r13d, r13d
loc_1A0AD:
lea rax, unk_402A0
mov r12d, [r13+rax+0]
mov rdi, rbx
mov esi, r12d
mov rdx, r14
call mysql_options
mov [rbp+var_50], 0
mov rdi, rbx
mov esi, r12d
mov rdx, r15
xor eax, eax
call mysql_get_optionv
cmp r13, 8
jz short loc_1A0F9
mov rsi, [rbp+var_50]
mov rdi, r14
call _strcmp
test eax, eax
jnz loc_1A2ED
loc_1A0F9:
add r13, 4
cmp r13, 30h ; '0'
jnz short loc_1A0AD
xor r14d, r14d
lea r15, off_48B60; "SET @a:=1"
loc_1A10D:
mov rdx, [r14+r15]
mov rdi, rbx
mov esi, 3
call mysql_options
add r14, 8
cmp r14, 18h
jnz short loc_1A10D
lea rdx, [rbp+var_58]
lea r14, [rbp+var_30]
mov rdi, rbx
mov esi, 3
mov rcx, r14
xor eax, eax
call mysql_get_optionv
cmp dword ptr [r14], 3
jnz loc_1A309
mov r14, [rbp+var_58]
xor r12d, r12d
loc_1A153:
mov rdi, [r12+r15]
mov rsi, [r14+r12]
call _strcmp
test eax, eax
jnz loc_1A325
add r12, 8
cmp r12, 18h
jnz short loc_1A153
lea r14, unk_40288
lea r15, unk_40294
xor r12d, r12d
loc_1A183:
movsxd rdx, dword ptr [r12+r14]
add rdx, r14
movsxd rcx, dword ptr [r12+r15]
add rcx, r15
mov rdi, rbx
mov esi, 21h ; '!'
xor eax, eax
call mysql_optionsv
add r12, 4
cmp r12, 0Ch
jnz short loc_1A183
lea r14, [rbp+var_30]
mov rdi, rbx
mov esi, 1B61h
xor edx, edx
xor ecx, ecx
mov r8, r14
xor eax, eax
call mysql_get_optionv
cmp dword ptr [r14], 3
jnz loc_1A341
mov edi, 18h
call _malloc
lea r14, [rbp+var_48]
mov [r14], rax
mov edi, 18h
call _malloc
lea rcx, [rbp+var_40]
mov [rcx], rax
lea r15, [rbp+var_30]
mov rdi, rbx
mov esi, 1B61h
mov rdx, r14
mov r8, r15
xor eax, eax
call mysql_get_optionv
cmp dword ptr [r15], 0
jle short loc_1A23F
lea r14, aSS_1; "%s => %s"
xor r15d, r15d
loc_1A219:
mov rax, [rbp+var_48]
mov rsi, [rax+r15*8]
mov rax, [rbp+var_40]
mov rdx, [rax+r15*8]
mov rdi, r14
xor eax, eax
call diag
inc r15
movsxd rax, [rbp+var_30]
cmp r15, rax
jl short loc_1A219
loc_1A23F:
mov rdi, [rbp+var_48]
call _free
mov rdi, [rbp+var_40]
call _free
lea r15, aMyApp; "my_app"
xor r14d, r14d
mov rdi, rbx
mov esi, 1B62h
mov rdx, r15
mov rcx, rbx
xor eax, eax
call mysql_optionsv
lea r12, [rbp+var_60]
mov rdi, rbx
mov esi, 1B62h
mov rdx, r15
mov rcx, r12
xor eax, eax
call mysql_get_optionv
cmp rbx, [r12]
jz loc_1A37A
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aWrongUserdata; "wrong userdata"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 3A7h
jmp loc_1A35B
loc_1A2B2:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aMysqlGetOption; "mysql_get_optionv (int) failed"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 379h
jmp loc_1A35B
loc_1A2D1:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aMysqlGetOption_0; "mysql_get_optionv (my_bool) failed"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 380h
jmp short loc_1A35B
loc_1A2ED:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aMysqlGetOption_1; "mysql_get_optionv (char) failed"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 388h
jmp short loc_1A35B
loc_1A309:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aExpected3Eleme; "expected 3 elements"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 38Fh
jmp short loc_1A35B
loc_1A325:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aWrongInitComma; "wrong init command"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 391h
jmp short loc_1A35B
loc_1A341:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aExpected3Conne; "expected 3 connection attributes"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 396h
loc_1A35B:
xor eax, eax
call diag
mov r14d, 1
loc_1A368:
mov eax, r14d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1A37A:
mov rdi, rbx
call mysql_close
jmp short loc_1A368
| long long test_get_options()
{
long long v0; // rbx
long long i; // r13
unsigned int v2; // r12d
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // r8d
int v7; // r9d
long long j; // r14
unsigned int v9; // r12d
int v10; // ecx
int v11; // r8d
int v12; // r9d
long long k; // r13
unsigned int v14; // r12d
int v15; // ecx
int v16; // r8d
int v17; // r9d
long long m; // r14
int v19; // r8d
int v20; // r9d
long long v21; // r14
long long n; // r12
long long ii; // r12
int v24; // r9d
int v25; // ecx
int v26; // r8d
int v27; // r9d
long long jj; // r15
unsigned int v29; // r14d
int v30; // r8d
int v31; // r9d
int v32; // r8d
int v33; // r9d
const char *v34; // rsi
int v35; // ecx
long long v37; // [rsp+0h] [rbp-60h] BYREF
long long v38; // [rsp+8h] [rbp-58h] BYREF
long long v39; // [rsp+10h] [rbp-50h] BYREF
long long v40; // [rsp+18h] [rbp-48h] BYREF
long long v41; // [rsp+20h] [rbp-40h] BYREF
long long v42; // [rsp+28h] [rbp-38h] BYREF
int v43; // [rsp+30h] [rbp-30h] BYREF
_WORD v44[21]; // [rsp+36h] [rbp-2Ah] BYREF
v0 = mysql_init(0LL);
v43 = 0;
v42 = 1LL;
v44[0] = 1;
for ( i = 0LL; i != 24; i += 4LL )
{
v2 = *(_DWORD *)((char *)&unk_40270 + i);
mysql_options(v0, v2, &v42);
HIDWORD(v42) = 0;
mysql_get_optionv(v0, v2, (unsigned int)&v42 + 4, v3, v4, v5);
if ( (_DWORD)v42 != HIDWORD(v42) )
{
v34 = "mysql_get_optionv (int) failed";
v35 = 889;
LABEL_31:
diag(
(unsigned int)"Error: %s (%s: %d)",
(_DWORD)v34,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c",
v35,
v6,
v7);
return 1;
}
}
for ( j = 0LL; j != 5; ++j )
{
v9 = byte_3C9DB[j];
mysql_options(v0, v9, v44);
HIDWORD(v42) = 0;
mysql_get_optionv(v0, v9, (unsigned int)v44 + 1, v10, v11, v12);
if ( LOBYTE(v44[0]) != HIBYTE(v44[0]) )
{
v34 = "mysql_get_optionv (my_bool) failed";
v35 = 896;
goto LABEL_31;
}
}
for ( k = 0LL; k != 48; k += 4LL )
{
v14 = *(_DWORD *)((char *)&unk_402A0 + k);
mysql_options(v0, v14, "test");
v39 = 0LL;
mysql_get_optionv(v0, v14, (unsigned int)&v39, v15, v16, v17);
if ( k != 8 && (unsigned int)strcmp("test", v39) )
{
v34 = "mysql_get_optionv (char) failed";
v35 = 904;
goto LABEL_31;
}
}
for ( m = 0LL; m != 3; ++m )
mysql_options(v0, 3LL, off_48B60[m]);
mysql_get_optionv(v0, 3, (unsigned int)&v38, (unsigned int)&v43, v19, v20);
if ( v43 != 3 )
{
v34 = "expected 3 elements";
v35 = 911;
goto LABEL_31;
}
v21 = v38;
for ( n = 0LL; n != 3; ++n )
{
if ( (unsigned int)strcmp(off_48B60[n], *(_QWORD *)(v21 + n * 8)) )
{
v34 = "wrong init command";
v35 = 913;
goto LABEL_31;
}
}
for ( ii = 0LL; ii != 12; ii += 4LL )
mysql_optionsv(
v0,
33,
(unsigned int)&unk_40288 + *(_DWORD *)((char *)&unk_40288 + ii),
(unsigned int)&unk_40294 + *(_DWORD *)((char *)&unk_40294 + ii),
v6,
v7);
mysql_get_optionv(v0, 7009, 0, 0, (unsigned int)&v43, v7);
if ( v43 != 3 )
{
v34 = "expected 3 connection attributes";
v35 = 918;
goto LABEL_31;
}
v40 = malloc(24LL);
v41 = malloc(24LL);
mysql_get_optionv(v0, 7009, (unsigned int)&v40, (unsigned int)&v41, (unsigned int)&v43, v24);
if ( v43 > 0 )
{
for ( jj = 0LL; jj < v43; ++jj )
diag((unsigned int)"%s => %s", *(_QWORD *)(v40 + 8 * jj), *(_QWORD *)(v41 + 8 * jj), v25, v26, v27);
}
free(v40);
free(v41);
v29 = 0;
mysql_optionsv(v0, 7010, (unsigned int)"my_app", v0, v30, v31);
mysql_get_optionv(v0, 7010, (unsigned int)"my_app", (unsigned int)&v37, v32, v33);
if ( v0 != v37 )
{
v34 = "wrong userdata";
v35 = 935;
goto LABEL_31;
}
mysql_close(v0);
return v29;
}
| test_get_options:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
XOR EDI,EDI
CALL 0x0011efb5
MOV RBX,RAX
MOV dword ptr [RBP + -0x30],0x0
LEA R14,[RBP + -0x34]
MOV qword ptr [R14 + -0x4],0x1
MOV word ptr [RBP + -0x2a],0x1
LEA R15,[RBP + -0x38]
XOR R13D,R13D
LAB_0011a00a:
LEA RAX,[0x140270]
MOV R12D,dword ptr [R13 + RAX*0x1]
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,R15
CALL 0x00123221
MOV dword ptr [RBP + -0x34],0x0
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,R14
XOR EAX,EAX
CALL 0x00122be6
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x34]
JNZ 0x0011a2b2
ADD R13,0x4
CMP R13,0x18
JNZ 0x0011a00a
LEA R13,[0x13c9db]
LEA R15,[RBP + -0x2a]
XOR R14D,R14D
LAB_0011a05f:
MOVSX R12D,byte ptr [R14 + R13*0x1]
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,R15
CALL 0x00123221
MOV dword ptr [RBP + -0x34],0x0
MOV RDI,RBX
MOV ESI,R12D
LEA RDX,[RBP + -0x29]
XOR EAX,EAX
CALL 0x00122be6
MOV AL,byte ptr [RBP + -0x2a]
CMP AL,byte ptr [RBP + -0x29]
JNZ 0x0011a2d1
INC R14
CMP R14,0x5
JNZ 0x0011a05f
LEA R14,[0x13b3a5]
LEA R15,[RBP + -0x50]
XOR R13D,R13D
LAB_0011a0ad:
LEA RAX,[0x1402a0]
MOV R12D,dword ptr [R13 + RAX*0x1]
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,R14
CALL 0x00123221
MOV qword ptr [RBP + -0x50],0x0
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,R15
XOR EAX,EAX
CALL 0x00122be6
CMP R13,0x8
JZ 0x0011a0f9
MOV RSI,qword ptr [RBP + -0x50]
MOV RDI,R14
CALL 0x00113670
TEST EAX,EAX
JNZ 0x0011a2ed
LAB_0011a0f9:
ADD R13,0x4
CMP R13,0x30
JNZ 0x0011a0ad
XOR R14D,R14D
LEA R15,[0x148b60]
LAB_0011a10d:
MOV RDX,qword ptr [R14 + R15*0x1]
MOV RDI,RBX
MOV ESI,0x3
CALL 0x00123221
ADD R14,0x8
CMP R14,0x18
JNZ 0x0011a10d
LEA RDX,[RBP + -0x58]
LEA R14,[RBP + -0x30]
MOV RDI,RBX
MOV ESI,0x3
MOV RCX,R14
XOR EAX,EAX
CALL 0x00122be6
CMP dword ptr [R14],0x3
JNZ 0x0011a309
MOV R14,qword ptr [RBP + -0x58]
XOR R12D,R12D
LAB_0011a153:
MOV RDI,qword ptr [R12 + R15*0x1]
MOV RSI,qword ptr [R14 + R12*0x1]
CALL 0x00113670
TEST EAX,EAX
JNZ 0x0011a325
ADD R12,0x8
CMP R12,0x18
JNZ 0x0011a153
LEA R14,[0x140288]
LEA R15,[0x140294]
XOR R12D,R12D
LAB_0011a183:
MOVSXD RDX,dword ptr [R12 + R14*0x1]
ADD RDX,R14
MOVSXD RCX,dword ptr [R12 + R15*0x1]
ADD RCX,R15
MOV RDI,RBX
MOV ESI,0x21
XOR EAX,EAX
CALL 0x0011d336
ADD R12,0x4
CMP R12,0xc
JNZ 0x0011a183
LEA R14,[RBP + -0x30]
MOV RDI,RBX
MOV ESI,0x1b61
XOR EDX,EDX
XOR ECX,ECX
MOV R8,R14
XOR EAX,EAX
CALL 0x00122be6
CMP dword ptr [R14],0x3
JNZ 0x0011a341
MOV EDI,0x18
CALL 0x00113630
LEA R14,[RBP + -0x48]
MOV qword ptr [R14],RAX
MOV EDI,0x18
CALL 0x00113630
LEA RCX,[RBP + -0x40]
MOV qword ptr [RCX],RAX
LEA R15,[RBP + -0x30]
MOV RDI,RBX
MOV ESI,0x1b61
MOV RDX,R14
MOV R8,R15
XOR EAX,EAX
CALL 0x00122be6
CMP dword ptr [R15],0x0
JLE 0x0011a23f
LEA R14,[0x13cabd]
XOR R15D,R15D
LAB_0011a219:
MOV RAX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RAX + R15*0x8]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RAX + R15*0x8]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011bb8f
INC R15
MOVSXD RAX,dword ptr [RBP + -0x30]
CMP R15,RAX
JL 0x0011a219
LAB_0011a23f:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001135a0
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001135a0
LEA R15,[0x13cac6]
XOR R14D,R14D
MOV RDI,RBX
MOV ESI,0x1b62
MOV RDX,R15
MOV RCX,RBX
XOR EAX,EAX
CALL 0x0011d336
LEA R12,[RBP + -0x60]
MOV RDI,RBX
MOV ESI,0x1b62
MOV RDX,R15
MOV RCX,R12
XOR EAX,EAX
CALL 0x00122be6
CMP RBX,qword ptr [R12]
JZ 0x0011a37a
LEA RDI,[0x13b008]
LEA RSI,[0x13cacd]
LEA RDX,[0x13b5b5]
MOV ECX,0x3a7
JMP 0x0011a35b
LAB_0011a2b2:
LEA RDI,[0x13b008]
LEA RSI,[0x13ca13]
LEA RDX,[0x13b5b5]
MOV ECX,0x379
JMP 0x0011a35b
LAB_0011a2d1:
LEA RDI,[0x13b008]
LEA RSI,[0x13ca32]
LEA RDX,[0x13b5b5]
MOV ECX,0x380
JMP 0x0011a35b
LAB_0011a2ed:
LEA RDI,[0x13b008]
LEA RSI,[0x13ca55]
LEA RDX,[0x13b5b5]
MOV ECX,0x388
JMP 0x0011a35b
LAB_0011a309:
LEA RDI,[0x13b008]
LEA RSI,[0x13ca75]
LEA RDX,[0x13b5b5]
MOV ECX,0x38f
JMP 0x0011a35b
LAB_0011a325:
LEA RDI,[0x13b008]
LEA RSI,[0x13ca89]
LEA RDX,[0x13b5b5]
MOV ECX,0x391
JMP 0x0011a35b
LAB_0011a341:
LEA RDI,[0x13b008]
LEA RSI,[0x13ca9c]
LEA RDX,[0x13b5b5]
MOV ECX,0x396
LAB_0011a35b:
XOR EAX,EAX
CALL 0x0011bb8f
MOV R14D,0x1
LAB_0011a368:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011a37a:
MOV RDI,RBX
CALL 0x00120d0c
JMP 0x0011a368
|
int8 test_get_options(void)
{
char cVar1;
int4 uVar2;
int iVar3;
long lVar4;
int8 uVar5;
char *pcVar6;
long lVar7;
long local_68;
long local_60;
char *local_58;
void *local_50;
void *local_48;
int8 local_40;
int local_38;
int2 local_32;
lVar4 = mysql_init(0);
local_38 = 0;
local_40 = 1;
local_32 = 1;
lVar7 = 0;
do {
uVar2 = *(int4 *)((long)&DAT_00140270 + lVar7);
mysql_options(lVar4,uVar2,&local_40);
local_40 = local_40 & 0xffffffff;
mysql_get_optionv(lVar4,uVar2,(long)&local_40 + 4);
if ((int)local_40 != local_40._4_4_) {
pcVar6 = "mysql_get_optionv (int) failed";
uVar5 = 0x379;
goto LAB_0011a35b;
}
lVar7 = lVar7 + 4;
} while (lVar7 != 0x18);
lVar7 = 0;
do {
cVar1 = (&DAT_0013c9db)[lVar7];
mysql_options(lVar4,(int)cVar1,&local_32);
local_40 = local_40 & 0xffffffff;
mysql_get_optionv(lVar4,(int)cVar1,(long)&local_32 + 1);
if ((char)local_32 != local_32._1_1_) {
pcVar6 = "mysql_get_optionv (my_bool) failed";
uVar5 = 0x380;
goto LAB_0011a35b;
}
lVar7 = lVar7 + 1;
} while (lVar7 != 5);
lVar7 = 0;
do {
uVar2 = *(int4 *)((long)&DAT_001402a0 + lVar7);
mysql_options(lVar4,uVar2,&DAT_0013b3a5);
local_58 = (char *)0x0;
mysql_get_optionv(lVar4,uVar2,&local_58);
if ((lVar7 != 8) && (iVar3 = strcmp("test",local_58), iVar3 != 0)) {
pcVar6 = "mysql_get_optionv (char) failed";
uVar5 = 0x388;
goto LAB_0011a35b;
}
lVar7 = lVar7 + 4;
} while (lVar7 != 0x30);
lVar7 = 0;
do {
mysql_options(lVar4,3,*(int8 *)((long)&PTR_s_SET__a__1_00148b60 + lVar7));
lVar7 = lVar7 + 8;
} while (lVar7 != 0x18);
mysql_get_optionv(lVar4,3,&local_60,&local_38);
if (local_38 == 3) {
lVar7 = 0;
do {
iVar3 = strcmp(*(char **)((long)&PTR_s_SET__a__1_00148b60 + lVar7),
*(char **)(local_60 + lVar7));
if (iVar3 != 0) {
pcVar6 = "wrong init command";
uVar5 = 0x391;
goto LAB_0011a35b;
}
lVar7 = lVar7 + 8;
} while (lVar7 != 0x18);
lVar7 = 0;
do {
mysql_optionsv(lVar4,0x21,(long)&DAT_00140288 + (long)*(int *)((long)&DAT_00140288 + lVar7),
(long)&DAT_00140294 + (long)*(int *)((long)&DAT_00140294 + lVar7));
lVar7 = lVar7 + 4;
} while (lVar7 != 0xc);
mysql_get_optionv(lVar4,0x1b61,0,0,&local_38);
if (local_38 == 3) {
local_50 = malloc(0x18);
local_48 = malloc(0x18);
mysql_get_optionv(lVar4,0x1b61,&local_50,&local_48,&local_38);
if (0 < local_38) {
lVar7 = 0;
do {
diag("%s => %s",*(int8 *)((long)local_50 + lVar7 * 8),
*(int8 *)((long)local_48 + lVar7 * 8));
lVar7 = lVar7 + 1;
} while (lVar7 < local_38);
}
free(local_50);
free(local_48);
mysql_optionsv(lVar4,0x1b62,"my_app",lVar4);
mysql_get_optionv(lVar4,0x1b62,"my_app",&local_68);
if (lVar4 == local_68) {
mysql_close(lVar4);
return 0;
}
pcVar6 = "wrong userdata";
uVar5 = 0x3a7;
}
else {
pcVar6 = "expected 3 connection attributes";
uVar5 = 0x396;
}
}
else {
pcVar6 = "expected 3 elements";
uVar5 = 0x38f;
}
LAB_0011a35b:
diag("Error: %s (%s: %d)",pcVar6,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c",uVar5)
;
return 1;
}
| |
40,722 | ma_calc_bin_pack_key_length | eloqsql/storage/maria/ma_search.c | int _ma_calc_bin_pack_key_length(const MARIA_KEY *int_key,
uint nod_flag,
uchar *next_key,
uchar *org_key, uchar *prev_key,
MARIA_KEY_PARAM *s_temp)
{
uint length,key_length,ref_length;
const uchar *key= int_key->data;
s_temp->totlength= key_length= (int_key->data_length + int_key->ref_length+
nod_flag);
#ifdef HAVE_valgrind
s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */
#endif
s_temp->key=key;
s_temp->prev_key=org_key;
if (prev_key) /* If not first key in block */
{
/* pack key against previous key */
/*
As keys may be identical when running a sort in maria_chk, we
have to guard against the case where keys may be identical
*/
const uchar *end;
end=key+key_length;
for ( ; *key == *prev_key && key < end; key++,prev_key++) ;
s_temp->ref_length= ref_length=(uint) (key-s_temp->key);
length=key_length - ref_length + get_pack_length(ref_length);
}
else
{
/* No previous key */
s_temp->ref_length=ref_length=0;
length=key_length+1;
}
if ((s_temp->next_key_pos=next_key)) /* If another key after */
{
/* pack key against next key */
uint next_length,next_length_pack;
get_key_pack_length(next_length,next_length_pack,next_key);
/* If first key and next key is packed (only on delete) */
if (!prev_key && org_key && next_length)
{
const uchar *end;
for (key= s_temp->key, end=key+next_length ;
*key == *org_key && key < end;
key++,org_key++) ;
ref_length= (uint) (key - s_temp->key);
}
if (next_length > ref_length)
{
/*
We put a key with different case between two keys with the same prefix
Extend next key to have same prefix as this key
*/
s_temp->n_ref_length= ref_length;
s_temp->prev_length= next_length-ref_length;
s_temp->prev_key+= ref_length;
return s_temp->move_length= ((int) (length+ s_temp->prev_length -
next_length_pack +
get_pack_length(ref_length)));
}
/* Check how many characters are identical to next key */
key= s_temp->key+next_length;
s_temp->prev_length= 0;
while (*key++ == *next_key++) ;
if ((ref_length= (uint) (key - s_temp->key)-1) == next_length)
{
s_temp->next_key_pos=0;
return (s_temp->move_length= length); /* Can't pack next key */
}
s_temp->n_ref_length=ref_length;
return s_temp->move_length= (int) (length-(ref_length - next_length) -
next_length_pack +
get_pack_length(ref_length));
}
return (s_temp->move_length= (int) length);
} | O3 | c | ma_calc_bin_pack_key_length:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %eax
movq (%rdi), %rsi
addl 0x10(%rdi), %eax
addl 0x14(%rdi), %eax
movl %eax, 0x30(%r9)
movq %rsi, (%r9)
movq %rcx, 0x8(%r9)
testq %r8, %r8
je 0x598a7
movb (%rsi), %dil
cmpb (%r8), %dil
sete %dil
testl %eax, %eax
setne %r11b
andb %dil, %r11b
movq %rsi, %r10
cmpb $0x1, %r11b
jne 0x59889
movl %eax, %edi
addq %rsi, %rdi
leaq 0x1(%rsi), %rbx
leaq 0x1(%r8), %r11
movb (%rbx), %r14b
leaq 0x1(%rbx), %r10
cmpb (%r11), %r14b
jne 0x59886
incq %r11
cmpq %rdi, %rbx
movq %r10, %rbx
jb 0x5986f
decq %r10
subl %esi, %r10d
movl %r10d, 0x20(%r9)
subl %r10d, %eax
xorl %edi, %edi
cmpl $0xff, %r10d
setae %dil
leal (%rax,%rdi,2), %eax
incl %eax
jmp 0x598b4
movl $0x0, 0x20(%r9)
incl %eax
xorl %r10d, %r10d
movq %rdx, 0x10(%r9)
testq %rdx, %rdx
je 0x599ba
movzbl (%rdx), %r11d
cmpl $0xff, %r11d
je 0x598da
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
movl $0x1, %ebx
jmp 0x598f0
movzwl 0x1(%rdx), %edi
rolw $0x8, %di
movzwl %di, %r11d
movl $0xfffffffd, %edi # imm = 0xFFFFFFFD
movl $0x3, %ebx
testq %rcx, %rcx
je 0x59935
testq %r8, %r8
jne 0x59935
testl %r11d, %r11d
je 0x59935
movb (%rsi), %r8b
movq %rsi, %r10
cmpb (%rcx), %r8b
jne 0x59932
movl %r11d, %r8d
addq %rsi, %r8
leaq 0x1(%rsi), %r15
leaq 0x1(%rcx), %r14
movb (%r15), %r12b
leaq 0x1(%r15), %r10
cmpb (%r14), %r12b
jne 0x5992f
incq %r14
cmpq %r8, %r15
movq %r10, %r15
jb 0x59918
decq %r10
subl %esi, %r10d
movl %r11d, %r8d
subl %r10d, %r8d
jbe 0x59967
movl %r10d, 0x28(%r9)
movl %r8d, 0x38(%r9)
movl %r10d, %edx
addq %rdx, %rcx
movq %rcx, 0x8(%r9)
xorl %ecx, %ecx
cmpl $0xff, %r10d
setae %cl
addl %eax, %edi
addl %r8d, %edi
leal (%rdi,%rcx,2), %eax
incl %eax
jmp 0x599ba
addq %rbx, %rdx
movl %r11d, %r8d
addq %r8, %rsi
movl $0x0, 0x38(%r9)
xorl %ecx, %ecx
movq %rcx, %r10
movb (%rsi,%rcx), %r11b
incq %rcx
cmpb (%rdx,%r10), %r11b
je 0x5997a
cmpl $0x1, %ecx
jne 0x59999
movq $0x0, 0x10(%r9)
jmp 0x599ba
leaq (%r8,%rcx), %rdx
decq %rdx
movl %edx, 0x28(%r9)
xorl %esi, %esi
cmpl $0xff, %edx
setae %sil
addl %edi, %eax
leal (%rax,%rsi,2), %eax
subl %ecx, %eax
addl $0x2, %eax
movl %eax, 0x44(%r9)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ma_calc_bin_pack_key_length:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov eax, esi
mov rsi, [rdi]
add eax, [rdi+10h]
add eax, [rdi+14h]
mov [r9+30h], eax
mov [r9], rsi
mov [r9+8], rcx
test r8, r8
jz short loc_598A7
mov dil, [rsi]
cmp dil, [r8]
setz dil
test eax, eax
setnz r11b
and r11b, dil
mov r10, rsi
cmp r11b, 1
jnz short loc_59889
mov edi, eax
add rdi, rsi
lea rbx, [rsi+1]
lea r11, [r8+1]
loc_5986F:
mov r14b, [rbx]
lea r10, [rbx+1]
cmp r14b, [r11]
jnz short loc_59886
inc r11
cmp rbx, rdi
mov rbx, r10
jb short loc_5986F
loc_59886:
dec r10
loc_59889:
sub r10d, esi
mov [r9+20h], r10d
sub eax, r10d
xor edi, edi
cmp r10d, 0FFh
setnb dil
lea eax, [rax+rdi*2]
inc eax
jmp short loc_598B4
loc_598A7:
mov dword ptr [r9+20h], 0
inc eax
xor r10d, r10d
loc_598B4:
mov [r9+10h], rdx
test rdx, rdx
jz loc_599BA
movzx r11d, byte ptr [rdx]
cmp r11d, 0FFh
jz short loc_598DA
mov edi, 0FFFFFFFFh
mov ebx, 1
jmp short loc_598F0
loc_598DA:
movzx edi, word ptr [rdx+1]
rol di, 8
movzx r11d, di
mov edi, 0FFFFFFFDh
mov ebx, 3
loc_598F0:
test rcx, rcx
jz short loc_59935
test r8, r8
jnz short loc_59935
test r11d, r11d
jz short loc_59935
mov r8b, [rsi]
mov r10, rsi
cmp r8b, [rcx]
jnz short loc_59932
mov r8d, r11d
add r8, rsi
lea r15, [rsi+1]
lea r14, [rcx+1]
loc_59918:
mov r12b, [r15]
lea r10, [r15+1]
cmp r12b, [r14]
jnz short loc_5992F
inc r14
cmp r15, r8
mov r15, r10
jb short loc_59918
loc_5992F:
dec r10
loc_59932:
sub r10d, esi
loc_59935:
mov r8d, r11d
sub r8d, r10d
jbe short loc_59967
mov [r9+28h], r10d
mov [r9+38h], r8d
mov edx, r10d
add rcx, rdx
mov [r9+8], rcx
xor ecx, ecx
cmp r10d, 0FFh
setnb cl
add edi, eax
add edi, r8d
lea eax, [rdi+rcx*2]
inc eax
jmp short loc_599BA
loc_59967:
add rdx, rbx
mov r8d, r11d
add rsi, r8
mov dword ptr [r9+38h], 0
xor ecx, ecx
loc_5997A:
mov r10, rcx
mov r11b, [rsi+rcx]
inc rcx
cmp r11b, [rdx+r10]
jz short loc_5997A
cmp ecx, 1
jnz short loc_59999
mov qword ptr [r9+10h], 0
jmp short loc_599BA
loc_59999:
lea rdx, [r8+rcx]
dec rdx
mov [r9+28h], edx
xor esi, esi
cmp edx, 0FFh
setnb sil
add eax, edi
lea eax, [rax+rsi*2]
sub eax, ecx
add eax, 2
loc_599BA:
mov [r9+44h], eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_calc_bin_pack_key_length(
long long a1,
int a2,
unsigned __int8 *a3,
_BYTE *a4,
_BYTE *a5,
long long a6)
{
_BYTE *v7; // rsi
unsigned int v8; // eax
int v9; // r10d
_BYTE *v10; // rbx
_BYTE *v11; // r11
int v12; // r10d
bool v13; // cf
unsigned int v14; // r10d
long long result; // rax
unsigned int v16; // r11d
int v17; // edi
long long v18; // rbx
int v19; // r10d
_BYTE *v20; // r15
_BYTE *v21; // r14
int v22; // r10d
int v23; // r8d
unsigned __int8 *v24; // rdx
unsigned int v25; // r8d
_BYTE *v26; // rsi
long long v27; // rcx
long long v28; // r10
char v29; // r11
unsigned int v30; // edx
v7 = *(_BYTE **)a1;
v8 = *(_DWORD *)(a1 + 20) + *(_DWORD *)(a1 + 16) + a2;
*(_DWORD *)(a6 + 48) = v8;
*(_QWORD *)a6 = v7;
*(_QWORD *)(a6 + 8) = a4;
if ( a5 )
{
v9 = (int)v7;
if ( *v7 == *a5 && v8 != 0 )
{
v10 = v7 + 1;
v11 = a5 + 1;
do
{
v12 = (_DWORD)v10 + 1;
if ( *v10 != *v11 )
break;
++v11;
v13 = v10++ < &v7[v8];
}
while ( v13 );
v9 = v12 - 1;
}
v14 = v9 - (_DWORD)v7;
*(_DWORD *)(a6 + 32) = v14;
result = v8 - v14 + 2 * (v14 >= 0xFF) + 1;
}
else
{
*(_DWORD *)(a6 + 32) = 0;
result = v8 + 1;
v14 = 0;
}
*(_QWORD *)(a6 + 16) = a3;
if ( a3 )
{
v16 = *a3;
if ( v16 == 255 )
{
v16 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8);
v17 = -3;
v18 = 3LL;
}
else
{
v17 = -1;
v18 = 1LL;
}
if ( a4 && !a5 && v16 )
{
v19 = (int)v7;
if ( *v7 == *a4 )
{
v20 = v7 + 1;
v21 = a4 + 1;
do
{
v22 = (_DWORD)v20 + 1;
if ( *v20 != *v21 )
break;
++v21;
v13 = v20++ < &v7[v16];
}
while ( v13 );
v19 = v22 - 1;
}
v14 = v19 - (_DWORD)v7;
}
v23 = v16 - v14;
if ( v16 <= v14 )
{
v24 = &a3[v18];
v25 = v16;
v26 = &v7[v16];
*(_DWORD *)(a6 + 56) = 0;
v27 = 0LL;
do
{
v28 = v27;
v29 = v26[v27++];
}
while ( v29 == v24[v28] );
if ( (_DWORD)v27 == 1 )
{
*(_QWORD *)(a6 + 16) = 0LL;
}
else
{
v30 = v25 + v27 - 1;
*(_DWORD *)(a6 + 40) = v30;
result = v17 + (_DWORD)result + 2 * (v30 >= 0xFF) - (unsigned int)v27 + 2;
}
}
else
{
*(_DWORD *)(a6 + 40) = v14;
*(_DWORD *)(a6 + 56) = v23;
*(_QWORD *)(a6 + 8) = &a4[v14];
result = v23 + (_DWORD)result + v17 + 2 * (unsigned int)(v14 >= 0xFF) + 1;
}
}
*(_DWORD *)(a6 + 68) = result;
return result;
}
| _ma_calc_bin_pack_key_length:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EAX,ESI
MOV RSI,qword ptr [RDI]
ADD EAX,dword ptr [RDI + 0x10]
ADD EAX,dword ptr [RDI + 0x14]
MOV dword ptr [R9 + 0x30],EAX
MOV qword ptr [R9],RSI
MOV qword ptr [R9 + 0x8],RCX
TEST R8,R8
JZ 0x001598a7
MOV DIL,byte ptr [RSI]
CMP DIL,byte ptr [R8]
SETZ DIL
TEST EAX,EAX
SETNZ R11B
AND R11B,DIL
MOV R10,RSI
CMP R11B,0x1
JNZ 0x00159889
MOV EDI,EAX
ADD RDI,RSI
LEA RBX,[RSI + 0x1]
LEA R11,[R8 + 0x1]
LAB_0015986f:
MOV R14B,byte ptr [RBX]
LEA R10,[RBX + 0x1]
CMP R14B,byte ptr [R11]
JNZ 0x00159886
INC R11
CMP RBX,RDI
MOV RBX,R10
JC 0x0015986f
LAB_00159886:
DEC R10
LAB_00159889:
SUB R10D,ESI
MOV dword ptr [R9 + 0x20],R10D
SUB EAX,R10D
XOR EDI,EDI
CMP R10D,0xff
SETNC DIL
LEA EAX,[RAX + RDI*0x2]
INC EAX
JMP 0x001598b4
LAB_001598a7:
MOV dword ptr [R9 + 0x20],0x0
INC EAX
XOR R10D,R10D
LAB_001598b4:
MOV qword ptr [R9 + 0x10],RDX
TEST RDX,RDX
JZ 0x001599ba
MOVZX R11D,byte ptr [RDX]
CMP R11D,0xff
JZ 0x001598da
MOV EDI,0xffffffff
MOV EBX,0x1
JMP 0x001598f0
LAB_001598da:
MOVZX EDI,word ptr [RDX + 0x1]
ROL DI,0x8
MOVZX R11D,DI
MOV EDI,0xfffffffd
MOV EBX,0x3
LAB_001598f0:
TEST RCX,RCX
JZ 0x00159935
TEST R8,R8
JNZ 0x00159935
TEST R11D,R11D
JZ 0x00159935
MOV R8B,byte ptr [RSI]
MOV R10,RSI
CMP R8B,byte ptr [RCX]
JNZ 0x00159932
MOV R8D,R11D
ADD R8,RSI
LEA R15,[RSI + 0x1]
LEA R14,[RCX + 0x1]
LAB_00159918:
MOV R12B,byte ptr [R15]
LEA R10,[R15 + 0x1]
CMP R12B,byte ptr [R14]
JNZ 0x0015992f
INC R14
CMP R15,R8
MOV R15,R10
JC 0x00159918
LAB_0015992f:
DEC R10
LAB_00159932:
SUB R10D,ESI
LAB_00159935:
MOV R8D,R11D
SUB R8D,R10D
JBE 0x00159967
MOV dword ptr [R9 + 0x28],R10D
MOV dword ptr [R9 + 0x38],R8D
MOV EDX,R10D
ADD RCX,RDX
MOV qword ptr [R9 + 0x8],RCX
XOR ECX,ECX
CMP R10D,0xff
SETNC CL
ADD EDI,EAX
ADD EDI,R8D
LEA EAX,[RDI + RCX*0x2]
INC EAX
JMP 0x001599ba
LAB_00159967:
ADD RDX,RBX
MOV R8D,R11D
ADD RSI,R8
MOV dword ptr [R9 + 0x38],0x0
XOR ECX,ECX
LAB_0015997a:
MOV R10,RCX
MOV R11B,byte ptr [RSI + RCX*0x1]
INC RCX
CMP R11B,byte ptr [RDX + R10*0x1]
JZ 0x0015997a
CMP ECX,0x1
JNZ 0x00159999
MOV qword ptr [R9 + 0x10],0x0
JMP 0x001599ba
LAB_00159999:
LEA RDX,[R8 + RCX*0x1]
DEC RDX
MOV dword ptr [R9 + 0x28],EDX
XOR ESI,ESI
CMP EDX,0xff
SETNC SIL
ADD EAX,EDI
LEA EAX,[RAX + RSI*0x2]
SUB EAX,ECX
ADD EAX,0x2
LAB_001599ba:
MOV dword ptr [R9 + 0x44],EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void _ma_calc_bin_pack_key_length
(int8 *param_1,int param_2,byte *param_3,char *param_4,char *param_5,
int8 *param_6)
{
char *pcVar1;
char *pcVar2;
long lVar3;
long lVar4;
uint uVar5;
long lVar6;
long lVar7;
char *pcVar8;
long lVar9;
int iVar10;
int iVar11;
int iVar12;
uint uVar13;
int iVar14;
char *pcVar15;
bool bVar16;
pcVar2 = (char *)*param_1;
uVar5 = param_2 + *(int *)(param_1 + 2) + *(int *)((long)param_1 + 0x14);
*(uint *)(param_6 + 6) = uVar5;
*param_6 = pcVar2;
param_6[1] = param_4;
iVar11 = (int)pcVar2;
if (param_5 == (char *)0x0) {
*(int4 *)(param_6 + 4) = 0;
uVar13 = 0;
}
else {
iVar12 = iVar11;
if (uVar5 != 0 && *pcVar2 == *param_5) {
pcVar15 = param_5 + 1;
pcVar8 = pcVar2 + 1;
do {
pcVar1 = pcVar8 + 1;
if (*pcVar8 != *pcVar15) break;
pcVar15 = pcVar15 + 1;
bVar16 = pcVar8 < pcVar2 + uVar5;
pcVar8 = pcVar1;
} while (bVar16);
iVar12 = (int)pcVar1 + -1;
}
uVar13 = iVar12 - iVar11;
*(uint *)(param_6 + 4) = uVar13;
uVar5 = (uVar5 - uVar13) + (uint)(0xfe < uVar13) * 2;
}
iVar12 = uVar5 + 1;
param_6[2] = param_3;
if (param_3 != (byte *)0x0) {
uVar5 = (uint)*param_3;
if (*param_3 == 0xff) {
uVar5 = (uint)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8);
iVar10 = -3;
lVar9 = 3;
}
else {
iVar10 = -1;
lVar9 = 1;
}
if (((param_4 != (char *)0x0) && (param_5 == (char *)0x0)) && (uVar5 != 0)) {
iVar14 = iVar11;
if (*pcVar2 == *param_4) {
pcVar15 = param_4 + 1;
pcVar8 = pcVar2 + 1;
do {
pcVar1 = pcVar8 + 1;
if (*pcVar8 != *pcVar15) break;
pcVar15 = pcVar15 + 1;
bVar16 = pcVar8 < pcVar2 + uVar5;
pcVar8 = pcVar1;
} while (bVar16);
iVar14 = (int)pcVar1 + -1;
}
uVar13 = iVar14 - iVar11;
}
iVar11 = uVar5 - uVar13;
if (uVar5 < uVar13 || iVar11 == 0) {
*(int4 *)(param_6 + 7) = 0;
lVar6 = 0;
do {
lVar4 = lVar6 + (ulong)uVar5;
lVar7 = lVar6 + 1;
lVar3 = lVar6 + lVar9;
lVar6 = lVar7;
} while (pcVar2[lVar4] == param_3[lVar3]);
iVar11 = (int)lVar7;
if (iVar11 == 1) {
param_6[2] = 0;
}
else {
uVar5 = (uVar5 + iVar11) - 1;
*(uint *)(param_6 + 5) = uVar5;
iVar12 = ((iVar12 + iVar10 + (uint)(0xfe < uVar5) * 2) - iVar11) + 2;
}
}
else {
*(uint *)(param_6 + 5) = uVar13;
*(int *)(param_6 + 7) = iVar11;
param_6[1] = param_4 + uVar13;
iVar12 = iVar10 + iVar12 + iVar11 + (uint)(0xfe < uVar13) * 2 + 1;
}
}
*(int *)((long)param_6 + 0x44) = iVar12;
return;
}
| |
40,723 | mysql_refresh_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_refresh_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_refresh,
(parms->mysql, parms->refresh_options),
parms->mysql,
int,
r_int)
} | O0 | c | mysql_refresh_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x84fa0
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_refresh_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov esi, [rax+8]
call mysql_refresh
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_refresh_start_internal(long long a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
v2[2] = mysql_refresh(*(_QWORD *)a1, *(_DWORD *)(a1 + 8));
result = v2;
*v2 = 0;
return result;
}
| mysql_refresh_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x8]
CALL 0x00184fa0
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_refresh_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_refresh(*param_1,(int)param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
40,724 | json_parse_string | bluesky950520[P]quickjs/quickjs.c | static int json_parse_string(JSParseState *s, const uint8_t **pp)
{
const uint8_t *p, *p_next;
int i;
uint32_t c;
StringBuffer b_s, *b = &b_s;
if (string_buffer_init(s->ctx, b, 32))
goto fail;
p = *pp;
for(;;) {
if (p >= s->buf_end) {
goto end_of_input;
}
c = *p++;
if (c == '"')
break;
if (c < 0x20) {
json_parse_error(s, p - 1, "Bad control character in string literal");
goto fail;
}
if (c == '\\') {
c = *p++;
switch(c) {
case 'b': c = '\b'; break;
case 'f': c = '\f'; break;
case 'n': c = '\n'; break;
case 'r': c = '\r'; break;
case 't': c = '\t'; break;
case '\"': break;
case '\\': break;
case '/': break; /* for v8 compatibility */
case 'u':
c = 0;
for(i = 0; i < 4; i++) {
int h = from_hex(*p++);
if (h < 0) {
json_parse_error(s, p - 1, "Bad Unicode escape");
goto fail;
}
c = (c << 4) | h;
}
break;
default:
if (p > s->buf_end)
goto end_of_input;
json_parse_error(s, p - 1, "Bad escaped character");
goto fail;
}
} else
if (c >= 0x80) {
c = utf8_decode(p - 1, &p_next);
if (p_next == p) {
json_parse_error(s, p - 1, "Bad UTF-8 sequence");
goto fail;
}
p = p_next;
}
if (string_buffer_putc(b, c))
goto fail;
}
s->token.val = TOK_STRING;
s->token.u.str.sep = '"';
s->token.u.str.str = string_buffer_end(b);
*pp = p;
return 0;
end_of_input:
js_parse_error(s, "Unexpected end of JSON input");
fail:
string_buffer_free(b);
return -1;
} | O0 | c | json_parse_string:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
leaq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x78(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rsi
movl $0x20, %edx
callq 0x56930
cmpl $0x0, %eax
je 0x8c86c
jmp 0x8cb16
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq 0x78(%rsp), %rcx
cmpq 0x78(%rcx), %rax
jb 0x8c88e
jmp 0x8cb03
movq 0x68(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rsp)
movzbl (%rax), %eax
movl %eax, 0x58(%rsp)
cmpl $0x22, 0x58(%rsp)
jne 0x8c8b2
jmp 0x8ca99
cmpl $0x20, 0x58(%rsp)
jae 0x8c8d8
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %rsi
addq $-0x1, %rsi
leaq 0x8865d(%rip), %rdx # 0x114f2b
callq 0x8cce0
jmp 0x8cb16
cmpl $0x5c, 0x58(%rsp)
jne 0x8ca24
movq 0x68(%rsp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, 0x68(%rsp)
movzbl (%rax), %eax
movl %eax, 0x58(%rsp)
movl 0x58(%rsp), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x53, %eax
ja 0x8c9ee
movq 0x10(%rsp), %rax
leaq 0x8497f(%rip), %rcx # 0x11129c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x8, 0x58(%rsp)
jmp 0x8ca22
movl $0xc, 0x58(%rsp)
jmp 0x8ca22
movl $0xa, 0x58(%rsp)
jmp 0x8ca22
movl $0xd, 0x58(%rsp)
jmp 0x8ca22
movl $0x9, 0x58(%rsp)
jmp 0x8ca22
jmp 0x8ca22
jmp 0x8ca22
jmp 0x8ca22
movl $0x0, 0x58(%rsp)
movl $0x0, 0x5c(%rsp)
cmpl $0x4, 0x5c(%rsp)
jge 0x8c9ec
movq 0x68(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rsp)
movzbl (%rax), %edi
callq 0x8d070
movl %eax, 0x2c(%rsp)
cmpl $0x0, 0x2c(%rsp)
jge 0x8c9d0
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %rsi
addq $-0x1, %rsi
leaq 0x8858d(%rip), %rdx # 0x114f53
callq 0x8cce0
jmp 0x8cb16
movl 0x58(%rsp), %eax
shll $0x4, %eax
orl 0x2c(%rsp), %eax
movl %eax, 0x58(%rsp)
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x8c986
jmp 0x8ca22
movq 0x68(%rsp), %rax
movq 0x78(%rsp), %rcx
cmpq 0x78(%rcx), %rax
jbe 0x8ca03
jmp 0x8cb03
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %rsi
addq $-0x1, %rsi
leaq 0x8854e(%rip), %rdx # 0x114f66
callq 0x8cce0
jmp 0x8cb16
jmp 0x8ca7c
cmpl $0x80, 0x58(%rsp)
jb 0x8ca7a
movq 0x68(%rsp), %rdi
addq $-0x1, %rdi
leaq 0x60(%rsp), %rsi
callq 0x24e40
movl %eax, 0x58(%rsp)
movq 0x60(%rsp), %rax
cmpq 0x68(%rsp), %rax
jne 0x8ca70
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %rsi
addq $-0x1, %rsi
leaq 0x88516(%rip), %rdx # 0x114f7c
callq 0x8cce0
jmp 0x8cb16
movq 0x60(%rsp), %rax
movq %rax, 0x68(%rsp)
jmp 0x8ca7c
movq 0x30(%rsp), %rdi
movl 0x58(%rsp), %esi
callq 0x53d70
cmpl $0x0, %eax
je 0x8ca94
jmp 0x8cb16
jmp 0x8c879
movq 0x78(%rsp), %rax
movl $0xffffff81, 0x20(%rax) # imm = 0xFFFFFF81
movq 0x78(%rsp), %rax
movl $0x22, 0x48(%rax)
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x53df0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x40(%rax)
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x84(%rsp)
jmp 0x8cb2b
movq 0x78(%rsp), %rdi
leaq 0x88480(%rip), %rsi # 0x114f8f
movb $0x0, %al
callq 0x4e980
movq 0x30(%rsp), %rdi
callq 0x587a0
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw (%rax,%rax)
| json_parse_string:
sub rsp, 88h
mov [rsp+88h+var_10], rdi
mov [rsp+88h+var_18], rsi
lea rax, [rsp+88h+var_50]
mov [rsp+88h+var_58], rax
mov rax, [rsp+88h+var_10]
mov rdi, [rax]
mov rsi, [rsp+88h+var_58]
mov edx, 20h ; ' '
call string_buffer_init
cmp eax, 0
jz short loc_8C86C
jmp loc_8CB16
loc_8C86C:
mov rax, [rsp+88h+var_18]
mov rax, [rax]
mov [rsp+88h+var_20], rax
loc_8C879:
mov rax, [rsp+88h+var_20]
mov rcx, [rsp+88h+var_10]
cmp rax, [rcx+78h]
jb short loc_8C88E
jmp loc_8CB03
loc_8C88E:
mov rax, [rsp+88h+var_20]
mov rcx, rax
add rcx, 1
mov [rsp+88h+var_20], rcx
movzx eax, byte ptr [rax]
mov [rsp+88h+var_30], eax
cmp [rsp+88h+var_30], 22h ; '"'
jnz short loc_8C8B2
jmp loc_8CA99
loc_8C8B2:
cmp [rsp+88h+var_30], 20h ; ' '
jnb short loc_8C8D8
mov rdi, [rsp+88h+var_10]
mov rsi, [rsp+88h+var_20]
add rsi, 0FFFFFFFFFFFFFFFFh
lea rdx, aBadControlChar; "Bad control character in string literal"
call json_parse_error
jmp loc_8CB16
loc_8C8D8:
cmp [rsp+88h+var_30], 5Ch ; '\'
jnz loc_8CA24
mov rax, [rsp+88h+var_20]
mov rcx, rax
inc rcx
mov [rsp+88h+var_20], rcx
movzx eax, byte ptr [rax]
mov [rsp+88h+var_30], eax
mov eax, [rsp+88h+var_30]
add eax, 0FFFFFFDEh; switch 84 cases
mov ecx, eax
mov [rsp+88h+var_78], rcx
sub eax, 53h
ja def_8C924; jumptable 000000000008C924 default case, cases 35-46,48-91,93-97,99-101,103-109,111-113,115
mov rax, [rsp+88h+var_78]
lea rcx, jpt_8C924
movsxd rax, ds:(jpt_8C924 - 11129Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_8C926:
mov [rsp+88h+var_30], 8; jumptable 000000000008C924 case 98
jmp loc_8CA22
loc_8C933:
mov [rsp+88h+var_30], 0Ch; jumptable 000000000008C924 case 102
jmp loc_8CA22
loc_8C940:
mov [rsp+88h+var_30], 0Ah; jumptable 000000000008C924 case 110
jmp loc_8CA22
loc_8C94D:
mov [rsp+88h+var_30], 0Dh; jumptable 000000000008C924 case 114
jmp loc_8CA22
loc_8C95A:
mov [rsp+88h+var_30], 9; jumptable 000000000008C924 case 116
jmp loc_8CA22
loc_8C967:
jmp loc_8CA22; jumptable 000000000008C924 case 34
loc_8C96C:
jmp loc_8CA22; jumptable 000000000008C924 case 92
loc_8C971:
jmp loc_8CA22; jumptable 000000000008C924 case 47
loc_8C976:
mov [rsp+88h+var_30], 0; jumptable 000000000008C924 case 117
mov [rsp+88h+var_2C], 0
loc_8C986:
cmp [rsp+88h+var_2C], 4
jge short loc_8C9EC
mov rax, [rsp+88h+var_20]
mov rcx, rax
add rcx, 1
mov [rsp+88h+var_20], rcx
movzx edi, byte ptr [rax]
call from_hex
mov [rsp+88h+var_5C], eax
cmp [rsp+88h+var_5C], 0
jge short loc_8C9D0
mov rdi, [rsp+88h+var_10]
mov rsi, [rsp+88h+var_20]
add rsi, 0FFFFFFFFFFFFFFFFh
lea rdx, aBadUnicodeEsca; "Bad Unicode escape"
call json_parse_error
jmp loc_8CB16
loc_8C9D0:
mov eax, [rsp+88h+var_30]
shl eax, 4
or eax, [rsp+88h+var_5C]
mov [rsp+88h+var_30], eax
mov eax, [rsp+88h+var_2C]
add eax, 1
mov [rsp+88h+var_2C], eax
jmp short loc_8C986
loc_8C9EC:
jmp short loc_8CA22
def_8C924:
mov rax, [rsp+88h+var_20]; jumptable 000000000008C924 default case, cases 35-46,48-91,93-97,99-101,103-109,111-113,115
mov rcx, [rsp+88h+var_10]
cmp rax, [rcx+78h]
jbe short loc_8CA03
jmp loc_8CB03
loc_8CA03:
mov rdi, [rsp+88h+var_10]
mov rsi, [rsp+88h+var_20]
add rsi, 0FFFFFFFFFFFFFFFFh
lea rdx, aBadEscapedChar; "Bad escaped character"
call json_parse_error
jmp loc_8CB16
loc_8CA22:
jmp short loc_8CA7C
loc_8CA24:
cmp [rsp+88h+var_30], 80h
jb short loc_8CA7A
mov rdi, [rsp+88h+var_20]
add rdi, 0FFFFFFFFFFFFFFFFh
lea rsi, [rsp+88h+var_28]
call utf8_decode
mov [rsp+88h+var_30], eax
mov rax, [rsp+88h+var_28]
cmp rax, [rsp+88h+var_20]
jnz short loc_8CA70
mov rdi, [rsp+88h+var_10]
mov rsi, [rsp+88h+var_20]
add rsi, 0FFFFFFFFFFFFFFFFh
lea rdx, aBadUtf8Sequenc; "Bad UTF-8 sequence"
call json_parse_error
jmp loc_8CB16
loc_8CA70:
mov rax, [rsp+88h+var_28]
mov [rsp+88h+var_20], rax
loc_8CA7A:
jmp short $+2
loc_8CA7C:
mov rdi, [rsp+88h+var_58]
mov esi, [rsp+88h+var_30]
call string_buffer_putc
cmp eax, 0
jz short loc_8CA94
jmp loc_8CB16
loc_8CA94:
jmp loc_8C879
loc_8CA99:
mov rax, [rsp+88h+var_10]
mov dword ptr [rax+20h], 0FFFFFF81h
mov rax, [rsp+88h+var_10]
mov dword ptr [rax+48h], 22h ; '"'
mov rax, [rsp+88h+var_10]
mov [rsp+88h+var_80], rax
mov rdi, [rsp+88h+var_58]
call string_buffer_end
mov rcx, rax
mov rax, [rsp+88h+var_80]
mov [rsp+88h+var_70], rcx
mov [rsp+88h+var_68], rdx
mov rcx, [rsp+88h+var_70]
mov [rax+38h], rcx
mov rcx, [rsp+88h+var_68]
mov [rax+40h], rcx
mov rcx, [rsp+88h+var_20]
mov rax, [rsp+88h+var_18]
mov [rax], rcx
mov [rsp+88h+var_4], 0
jmp short loc_8CB2B
loc_8CB03:
mov rdi, [rsp+88h+var_10]
lea rsi, aUnexpectedEndO; "Unexpected end of JSON input"
mov al, 0
call js_parse_error
loc_8CB16:
mov rdi, [rsp+88h+var_58]
call string_buffer_free
mov [rsp+88h+var_4], 0FFFFFFFFh
loc_8CB2B:
mov eax, [rsp+88h+var_4]
add rsp, 88h
retn
| long long json_parse_string(
_QWORD *a1,
unsigned __int8 **a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v10; // rdx
long long v11; // r8
long long v12; // r9
__m128 v13; // xmm4
__m128 v14; // xmm5
_QWORD *v15; // rcx
unsigned __int8 *v16; // rax
unsigned __int8 *v17; // rax
unsigned __int8 *v18; // rax
long long v19; // rdx
char v21; // [rsp+0h] [rbp-88h]
_QWORD *v22; // [rsp+8h] [rbp-80h]
int v23; // [rsp+2Ch] [rbp-5Ch]
long long v24[4]; // [rsp+38h] [rbp-50h] BYREF
unsigned int v25; // [rsp+58h] [rbp-30h]
int v26; // [rsp+5Ch] [rbp-2Ch]
unsigned __int8 *v27; // [rsp+60h] [rbp-28h] BYREF
unsigned __int8 *v28; // [rsp+68h] [rbp-20h]
unsigned __int8 **v29; // [rsp+70h] [rbp-18h]
_QWORD *v30; // [rsp+78h] [rbp-10h]
v30 = a1;
v29 = a2;
if ( !(unsigned int)string_buffer_init(*a1, (long long)v24, 0x20u) )
{
v28 = *v29;
while ( 1 )
{
v15 = v30;
if ( (unsigned long long)v28 >= v30[15] )
break;
v16 = v28++;
v25 = *v16;
if ( v25 == 34 )
{
*((_DWORD *)v30 + 8) = -127;
*((_DWORD *)v30 + 18) = 34;
v22 = v30;
v22[7] = string_buffer_end((long long)v24);
v22[8] = v19;
*v29 = v28;
return 0;
}
if ( v25 < 0x20 )
{
json_parse_error(v30, v28 - 1, "Bad control character in string literal");
goto LABEL_31;
}
if ( v25 == 92 )
{
v17 = v28++;
v25 = *v17;
switch ( v25 )
{
case '"':
case '/':
case '\\':
goto LABEL_27;
case 'b':
v25 = 8;
goto LABEL_27;
case 'f':
v25 = 12;
goto LABEL_27;
case 'n':
v25 = 10;
goto LABEL_27;
case 'r':
v25 = 13;
goto LABEL_27;
case 't':
v25 = 9;
goto LABEL_27;
case 'u':
v25 = 0;
v26 = 0;
break;
default:
v15 = v30;
if ( (unsigned long long)v28 > v30[15] )
goto LABEL_30;
json_parse_error(v30, v28 - 1, "Bad escaped character");
goto LABEL_31;
}
while ( v26 < 4 )
{
v18 = v28++;
v23 = from_hex(*v18);
if ( v23 < 0 )
{
json_parse_error(v30, v28 - 1, "Bad Unicode escape");
goto LABEL_31;
}
v25 = v23 | (16 * v25);
++v26;
}
}
else if ( v25 >= 0x80 )
{
v25 = utf8_decode(v28 - 1, &v27);
if ( v27 == v28 )
{
json_parse_error(v30, v28 - 1, "Bad UTF-8 sequence");
goto LABEL_31;
}
v28 = v27;
}
LABEL_27:
if ( (unsigned int)string_buffer_putc((long long)v24, v25) )
goto LABEL_31;
}
LABEL_30:
js_parse_error(
v30,
(long long)"Unexpected end of JSON input",
v10,
(long long)v15,
v11,
v12,
a3,
a4,
a5,
a6,
v13,
v14,
a9,
a10,
v21);
}
LABEL_31:
string_buffer_free(v24);
return (unsigned int)-1;
}
| json_parse_string:
SUB RSP,0x88
MOV qword ptr [RSP + 0x78],RDI
MOV qword ptr [RSP + 0x70],RSI
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x30]
MOV EDX,0x20
CALL 0x00156930
CMP EAX,0x0
JZ 0x0018c86c
JMP 0x0018cb16
LAB_0018c86c:
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x68],RAX
LAB_0018c879:
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x78]
CMP RAX,qword ptr [RCX + 0x78]
JC 0x0018c88e
JMP 0x0018cb03
LAB_0018c88e:
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RSP + 0x68],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RSP + 0x58],EAX
CMP dword ptr [RSP + 0x58],0x22
JNZ 0x0018c8b2
JMP 0x0018ca99
LAB_0018c8b2:
CMP dword ptr [RSP + 0x58],0x20
JNC 0x0018c8d8
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x68]
ADD RSI,-0x1
LEA RDX,[0x214f2b]
CALL 0x0018cce0
JMP 0x0018cb16
LAB_0018c8d8:
CMP dword ptr [RSP + 0x58],0x5c
JNZ 0x0018ca24
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,RAX
INC RCX
MOV qword ptr [RSP + 0x68],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RSP + 0x58],EAX
MOV EAX,dword ptr [RSP + 0x58]
ADD EAX,-0x22
MOV ECX,EAX
MOV qword ptr [RSP + 0x10],RCX
SUB EAX,0x53
JA 0x0018c9ee
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x21129c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_62:
MOV dword ptr [RSP + 0x58],0x8
JMP 0x0018ca22
caseD_66:
MOV dword ptr [RSP + 0x58],0xc
JMP 0x0018ca22
caseD_6e:
MOV dword ptr [RSP + 0x58],0xa
JMP 0x0018ca22
caseD_72:
MOV dword ptr [RSP + 0x58],0xd
JMP 0x0018ca22
caseD_74:
MOV dword ptr [RSP + 0x58],0x9
JMP 0x0018ca22
caseD_22:
JMP 0x0018ca22
caseD_5c:
JMP 0x0018ca22
caseD_2f:
JMP 0x0018ca22
caseD_75:
MOV dword ptr [RSP + 0x58],0x0
MOV dword ptr [RSP + 0x5c],0x0
LAB_0018c986:
CMP dword ptr [RSP + 0x5c],0x4
JGE 0x0018c9ec
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RSP + 0x68],RCX
MOVZX EDI,byte ptr [RAX]
CALL 0x0018d070
MOV dword ptr [RSP + 0x2c],EAX
CMP dword ptr [RSP + 0x2c],0x0
JGE 0x0018c9d0
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x68]
ADD RSI,-0x1
LEA RDX,[0x214f53]
CALL 0x0018cce0
JMP 0x0018cb16
LAB_0018c9d0:
MOV EAX,dword ptr [RSP + 0x58]
SHL EAX,0x4
OR EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x58],EAX
MOV EAX,dword ptr [RSP + 0x5c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x5c],EAX
JMP 0x0018c986
LAB_0018c9ec:
JMP 0x0018ca22
caseD_23:
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x78]
CMP RAX,qword ptr [RCX + 0x78]
JBE 0x0018ca03
JMP 0x0018cb03
LAB_0018ca03:
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x68]
ADD RSI,-0x1
LEA RDX,[0x214f66]
CALL 0x0018cce0
JMP 0x0018cb16
LAB_0018ca22:
JMP 0x0018ca7c
LAB_0018ca24:
CMP dword ptr [RSP + 0x58],0x80
JC 0x0018ca7a
MOV RDI,qword ptr [RSP + 0x68]
ADD RDI,-0x1
LEA RSI,[RSP + 0x60]
CALL 0x00124e40
MOV dword ptr [RSP + 0x58],EAX
MOV RAX,qword ptr [RSP + 0x60]
CMP RAX,qword ptr [RSP + 0x68]
JNZ 0x0018ca70
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x68]
ADD RSI,-0x1
LEA RDX,[0x214f7c]
CALL 0x0018cce0
JMP 0x0018cb16
LAB_0018ca70:
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x68],RAX
LAB_0018ca7a:
JMP 0x0018ca7c
LAB_0018ca7c:
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,dword ptr [RSP + 0x58]
CALL 0x00153d70
CMP EAX,0x0
JZ 0x0018ca94
JMP 0x0018cb16
LAB_0018ca94:
JMP 0x0018c879
LAB_0018ca99:
MOV RAX,qword ptr [RSP + 0x78]
MOV dword ptr [RAX + 0x20],0xffffff81
MOV RAX,qword ptr [RSP + 0x78]
MOV dword ptr [RAX + 0x48],0x22
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00153df0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x20],RDX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x38],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RAX],RCX
MOV dword ptr [RSP + 0x84],0x0
JMP 0x0018cb2b
LAB_0018cb03:
MOV RDI,qword ptr [RSP + 0x78]
LEA RSI,[0x214f8f]
MOV AL,0x0
CALL 0x0014e980
LAB_0018cb16:
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001587a0
MOV dword ptr [RSP + 0x84],0xffffffff
LAB_0018cb2b:
MOV EAX,dword ptr [RSP + 0x84]
ADD RSP,0x88
RET
|
int4 json_parse_string(int8 *param_1,int8 *param_2)
{
byte bVar1;
int8 *puVar2;
int iVar3;
uint uVar4;
byte *pbVar5;
byte *pbVar6;
int1 auVar7 [16];
int1 local_50 [32];
uint local_30;
int local_2c;
byte *local_28;
byte *local_20;
int8 *local_18;
int8 *local_10;
local_18 = param_2;
local_10 = param_1;
iVar3 = string_buffer_init(*param_1,local_50,0x20);
if (iVar3 == 0) {
local_20 = (byte *)*local_18;
do {
puVar2 = local_10;
pbVar6 = local_20;
if ((byte *)local_10[0xf] <= local_20) {
LAB_0018cb03:
local_20 = pbVar6;
js_parse_error(local_10,"Unexpected end of JSON input");
break;
}
pbVar5 = local_20 + 1;
local_30 = (uint)*local_20;
if (local_30 == 0x22) {
*(int4 *)(local_10 + 4) = 0xffffff81;
*(int4 *)(local_10 + 9) = 0x22;
local_20 = pbVar5;
auVar7 = string_buffer_end(local_50);
*(int1 (*) [16])(puVar2 + 7) = auVar7;
*local_18 = local_20;
return 0;
}
if (local_30 < 0x20) {
local_20 = pbVar5;
json_parse_error(local_10,pbVar6,"Bad control character in string literal");
break;
}
if (local_30 == 0x5c) {
pbVar6 = local_20 + 2;
local_30 = (uint)*pbVar5;
switch(local_30) {
case 0x22:
local_20 = pbVar6;
break;
default:
if ((byte *)local_10[0xf] < pbVar6) goto LAB_0018cb03;
pbVar5 = local_20 + 1;
local_20 = pbVar6;
json_parse_error(local_10,pbVar5,"Bad escaped character");
goto LAB_0018cb16;
case 0x2f:
local_20 = pbVar6;
break;
case 0x5c:
local_20 = pbVar6;
break;
case 0x62:
local_30 = 8;
local_20 = pbVar6;
break;
case 0x66:
local_30 = 0xc;
local_20 = pbVar6;
break;
case 0x6e:
local_30 = 10;
local_20 = pbVar6;
break;
case 0x72:
local_30 = 0xd;
local_20 = pbVar6;
break;
case 0x74:
local_30 = 9;
local_20 = pbVar6;
break;
case 0x75:
local_30 = 0;
local_20 = pbVar6;
for (local_2c = 0; local_2c < 4; local_2c = local_2c + 1) {
bVar1 = *local_20;
local_20 = local_20 + 1;
uVar4 = from_hex(bVar1);
if ((int)uVar4 < 0) {
json_parse_error(local_10,local_20 + -1,"Bad Unicode escape");
goto LAB_0018cb16;
}
local_30 = local_30 << 4 | uVar4;
}
}
}
else {
local_20 = pbVar5;
if (0x7f < local_30) {
local_30 = utf8_decode(pbVar6,&local_28);
if (local_28 == local_20) {
json_parse_error(local_10,local_20 + -1,"Bad UTF-8 sequence");
break;
}
local_20 = local_28;
}
}
iVar3 = string_buffer_putc(local_50,local_30);
} while (iVar3 == 0);
}
LAB_0018cb16:
string_buffer_free(local_50);
return 0xffffffff;
}
| |
40,725 | json_parse_string | bluesky950520[P]quickjs/quickjs.c | static int json_parse_string(JSParseState *s, const uint8_t **pp)
{
const uint8_t *p, *p_next;
int i;
uint32_t c;
StringBuffer b_s, *b = &b_s;
if (string_buffer_init(s->ctx, b, 32))
goto fail;
p = *pp;
for(;;) {
if (p >= s->buf_end) {
goto end_of_input;
}
c = *p++;
if (c == '"')
break;
if (c < 0x20) {
json_parse_error(s, p - 1, "Bad control character in string literal");
goto fail;
}
if (c == '\\') {
c = *p++;
switch(c) {
case 'b': c = '\b'; break;
case 'f': c = '\f'; break;
case 'n': c = '\n'; break;
case 'r': c = '\r'; break;
case 't': c = '\t'; break;
case '\"': break;
case '\\': break;
case '/': break; /* for v8 compatibility */
case 'u':
c = 0;
for(i = 0; i < 4; i++) {
int h = from_hex(*p++);
if (h < 0) {
json_parse_error(s, p - 1, "Bad Unicode escape");
goto fail;
}
c = (c << 4) | h;
}
break;
default:
if (p > s->buf_end)
goto end_of_input;
json_parse_error(s, p - 1, "Bad escaped character");
goto fail;
}
} else
if (c >= 0x80) {
c = utf8_decode(p - 1, &p_next);
if (p_next == p) {
json_parse_error(s, p - 1, "Bad UTF-8 sequence");
goto fail;
}
p = p_next;
}
if (string_buffer_putc(b, c))
goto fail;
}
s->token.val = TOK_STRING;
s->token.u.str.sep = '"';
s->token.u.str.str = string_buffer_end(b);
*pp = p;
return 0;
end_of_input:
js_parse_error(s, "Unexpected end of JSON input");
fail:
string_buffer_free(b);
return -1;
} | O1 | c | json_parse_string:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movq %rdi, 0x8(%rsp)
movsd 0x51e67(%rip), %xmm0 # 0xa29f0
movups %xmm0, 0x18(%rsp)
movl $0x20, %esi
xorl %edx, %edx
callq 0x24bcf
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x50da7
movq %r14, 0x28(%rsp)
movq (%r14), %r12
leaq 0x8(%rsp), %r13
movq 0x78(%rbx), %rax
cmpq %rax, %r12
jae 0x50d5b
leaq 0x1(%r12), %r15
movzbl (%r12), %ebp
cmpl $0x22, %ebp
je 0x50d0d
cmpb $0x1f, %bpl
jbe 0x50d39
cmpl $0x5c, %ebp
jne 0x50c07
movzbl 0x1(%r12), %ebp
addq $0x2, %r12
cmpl $0x61, %ebp
jg 0x50c11
cmpl $0x22, %ebp
je 0x50c50
cmpl $0x2f, %ebp
je 0x50c50
cmpl $0x5c, %ebp
je 0x50c50
jmp 0x50d56
testb %bpl, %bpl
js 0x50c30
movq %r15, %r12
jmp 0x50c50
leal -0x6e(%rbp), %ecx
cmpl $0x7, %ecx
ja 0x50c67
leaq 0x50370(%rip), %rdx # 0xa0f90
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0xa, %ebp
jmp 0x50c50
movq %r12, %rdi
leaq 0x30(%rsp), %rsi
callq 0x1f785
movl %eax, %ebp
movq 0x30(%rsp), %rax
cmpq %r15, %rax
je 0x50d4d
movq %rax, %r12
movq %r13, %rdi
movl %ebp, %esi
callq 0x3744c
testl %eax, %eax
je 0x50bb5
jmp 0x50d6c
cmpl $0x62, %ebp
je 0x50d03
cmpl $0x66, %ebp
jne 0x50d56
movl $0xc, %ebp
jmp 0x50c50
xorl %r15d, %r15d
xorl %ebp, %ebp
movzbl (%r12,%r15), %eax
leal -0x30(%rax), %r14d
cmpl $0xa, %r14d
jb 0x50cb5
leal -0x41(%rax), %ecx
cmpl $0x5, %ecx
ja 0x50ca1
addl $-0x37, %eax
jmp 0x50cb2
leal -0x61(%rax), %ecx
addl $-0x57, %eax
cmpl $0x6, %ecx
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmovael %ecx, %eax
movl %eax, %r14d
testl %r14d, %r14d
js 0x50cc2
shll $0x4, %ebp
orl %r14d, %ebp
jmp 0x50cd5
leaq (%r12,%r15), %rsi
movq %rbx, %rdi
leaq 0x53297(%rip), %rdx # 0xa3f67
callq 0x50db9
testl %r14d, %r14d
js 0x50d6c
incq %r15
cmpl $0x4, %r15d
jne 0x50c85
addq %r15, %r12
jmp 0x50c50
movl $0x9, %ebp
jmp 0x50c50
movl $0xd, %ebp
jmp 0x50c50
movl $0x8, %ebp
jmp 0x50c50
movl $0xffffff81, 0x20(%rbx) # imm = 0xFFFFFF81
movl $0x22, 0x48(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x374a0
movq %rax, 0x38(%rbx)
movq %rdx, 0x40(%rbx)
movq 0x28(%rsp), %rax
movq %r15, (%rax)
xorl %eax, %eax
jmp 0x50d89
leaq 0x531ff(%rip), %rdx # 0xa3f3f
movq %rbx, %rdi
movq %r12, %rsi
callq 0x50db9
jmp 0x50d6c
leaq 0x5323c(%rip), %rdx # 0xa3f90
jmp 0x50d40
cmpq %rax, %r12
jbe 0x50d98
leaq 0x53241(%rip), %rsi # 0xa3fa3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x33d45
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x20bf5
movq $0x0, 0x10(%rsp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x531db(%rip), %rdx # 0xa3f7a
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x50d46
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x50d6c
| json_parse_string:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi]
mov [rsp+68h+var_60], rdi
movsd xmm0, cs:qword_A29F0
movups [rsp+68h+var_50], xmm0
mov esi, 20h ; ' '
xor edx, edx
call js_alloc_string
mov [rsp+68h+var_58], rax
test rax, rax
jz loc_50DA7
mov [rsp+68h+var_40], r14
mov r12, [r14]
lea r13, [rsp+68h+var_60]
loc_50BB5:
mov rax, [rbx+78h]
cmp r12, rax
jnb loc_50D5B
lea r15, [r12+1]
movzx ebp, byte ptr [r12]
cmp ebp, 22h ; '"'
jz loc_50D0D
cmp bpl, 1Fh
jbe loc_50D39
cmp ebp, 5Ch ; '\'
jnz short loc_50C07
movzx ebp, byte ptr [r12+1]
add r12, 2
cmp ebp, 61h ; 'a'
jg short loc_50C11
cmp ebp, 22h ; '"'
jz short loc_50C50
cmp ebp, 2Fh ; '/'
jz short loc_50C50
cmp ebp, 5Ch ; '\'
jz short loc_50C50
jmp loc_50D56; jumptable 0000000000050C27 cases 111-113,115
loc_50C07:
test bpl, bpl
js short loc_50C30
mov r12, r15
jmp short loc_50C50
loc_50C11:
lea ecx, [rbp-6Eh]; switch 8 cases
cmp ecx, 7
ja short def_50C27; jumptable 0000000000050C27 default case
lea rdx, jpt_50C27
movsxd rcx, ds:(jpt_50C27 - 0A0F90h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_50C29:
mov ebp, 0Ah; jumptable 0000000000050C27 case 110
jmp short loc_50C50
loc_50C30:
mov rdi, r12
lea rsi, [rsp+68h+var_38]
call utf8_decode
mov ebp, eax
mov rax, [rsp+68h+var_38]
cmp rax, r15
jz loc_50D4D
mov r12, rax
loc_50C50:
mov rdi, r13
mov esi, ebp
call string_buffer_putc
test eax, eax
jz loc_50BB5
jmp loc_50D6C
def_50C27:
cmp ebp, 62h ; 'b'; jumptable 0000000000050C27 default case
jz loc_50D03
cmp ebp, 66h ; 'f'
jnz loc_50D56; jumptable 0000000000050C27 cases 111-113,115
mov ebp, 0Ch
jmp short loc_50C50
loc_50C80:
xor r15d, r15d; jumptable 0000000000050C27 case 117
xor ebp, ebp
loc_50C85:
movzx eax, byte ptr [r12+r15]
lea r14d, [rax-30h]
cmp r14d, 0Ah
jb short loc_50CB5
lea ecx, [rax-41h]
cmp ecx, 5
ja short loc_50CA1
add eax, 0FFFFFFC9h
jmp short loc_50CB2
loc_50CA1:
lea ecx, [rax-61h]
add eax, 0FFFFFFA9h
cmp ecx, 6
mov ecx, 0FFFFFFFFh
cmovnb eax, ecx
loc_50CB2:
mov r14d, eax
loc_50CB5:
test r14d, r14d
js short loc_50CC2
shl ebp, 4
or ebp, r14d
jmp short loc_50CD5
loc_50CC2:
lea rsi, [r12+r15]
mov rdi, rbx
lea rdx, aBadUnicodeEsca; "Bad Unicode escape"
call json_parse_error
loc_50CD5:
test r14d, r14d
js loc_50D6C
inc r15
cmp r15d, 4
jnz short loc_50C85
add r12, r15
jmp loc_50C50
loc_50CEF:
mov ebp, 9; jumptable 0000000000050C27 case 116
jmp loc_50C50
loc_50CF9:
mov ebp, 0Dh; jumptable 0000000000050C27 case 114
jmp loc_50C50
loc_50D03:
mov ebp, 8
jmp loc_50C50
loc_50D0D:
mov dword ptr [rbx+20h], 0FFFFFF81h
mov dword ptr [rbx+48h], 22h ; '"'
lea rdi, [rsp+68h+var_60]
call string_buffer_end
mov [rbx+38h], rax
mov [rbx+40h], rdx
mov rax, [rsp+68h+var_40]
mov [rax], r15
xor eax, eax
jmp short loc_50D89
loc_50D39:
lea rdx, aBadControlChar; "Bad control character in string literal"
loc_50D40:
mov rdi, rbx
mov rsi, r12
loc_50D46:
call json_parse_error
jmp short loc_50D6C
loc_50D4D:
lea rdx, aBadUtf8Sequenc; "Bad UTF-8 sequence"
jmp short loc_50D40
loc_50D56:
cmp r12, rax; jumptable 0000000000050C27 cases 111-113,115
jbe short loc_50D98
loc_50D5B:
lea rsi, aUnexpectedEndO; "Unexpected end of JSON input"
mov rdi, rbx
xor eax, eax
call js_parse_error
loc_50D6C:
mov rdi, [rsp+68h+var_60]
mov rsi, [rsp+68h+var_58]
call js_free
mov [rsp+68h+var_58], 0
mov eax, 0FFFFFFFFh
loc_50D89:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_50D98:
lea rdx, aBadEscapedChar; "Bad escaped character"
mov rdi, rbx
mov rsi, r15
jmp short loc_50D46
loc_50DA7:
mov dword ptr [rsp+68h+var_50+4], 0
mov dword ptr [rsp+68h+var_50+0Ch], 0FFFFFFFFh
jmp short loc_50D6C
| long long json_parse_string(
long long a1,
char **a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v10; // rdx
long long v11; // rcx
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
char *v16; // r12
unsigned long long v17; // rax
char *v18; // r15
signed int v19; // ebp
long long v20; // r15
int v21; // eax
int v22; // r14d
int v23; // eax
unsigned int v24; // ecx
long long v25; // rdx
const char *v27; // rdx
char *v28; // rsi
char v29; // [rsp+0h] [rbp-68h]
long long v30; // [rsp+8h] [rbp-60h] BYREF
long long v31; // [rsp+10h] [rbp-58h]
__int128 v32; // [rsp+18h] [rbp-50h]
char **v33; // [rsp+28h] [rbp-40h]
char *v34; // [rsp+30h] [rbp-38h] BYREF
v30 = *(_QWORD *)a1;
v32 = 0x2000000000uLL;
v31 = js_alloc_string(v30, 32LL, 0);
if ( !v31 )
{
DWORD1(v32) = 0;
HIDWORD(v32) = -1;
goto LABEL_46;
}
v33 = a2;
v16 = *a2;
while ( 1 )
{
v17 = *(_QWORD *)(a1 + 120);
if ( (unsigned long long)v16 >= v17 )
goto LABEL_45;
v18 = v16 + 1;
v19 = (unsigned __int8)*v16;
if ( v19 == 34 )
{
*(_DWORD *)(a1 + 32) = -127;
*(_DWORD *)(a1 + 72) = 34;
*(_QWORD *)(a1 + 56) = string_buffer_end((long long)&v30);
*(_QWORD *)(a1 + 64) = v25;
*v33 = v18;
return 0LL;
}
if ( (unsigned __int8)v19 <= 0x1Fu )
{
v27 = "Bad control character in string literal";
LABEL_41:
v28 = v16;
LABEL_42:
json_parse_error(a1, v28, v27);
goto LABEL_46;
}
if ( v19 == 92 )
break;
if ( (v19 & 0x80u) != 0 )
{
v19 = utf8_decode(v16, &v34);
if ( v34 == v18 )
{
v27 = "Bad UTF-8 sequence";
goto LABEL_41;
}
v16 = v34;
}
else
{
++v16;
}
LABEL_18:
if ( (unsigned int)string_buffer_putc((long long)&v30, v19) )
goto LABEL_46;
}
v19 = (unsigned __int8)v16[1];
v16 += 2;
if ( v19 > 97 )
{
v11 = (unsigned int)(v19 - 110);
switch ( v19 )
{
case 'n':
v19 = 10;
goto LABEL_18;
case 'o':
case 'p':
case 'q':
case 's':
goto LABEL_44;
case 'r':
v19 = 13;
goto LABEL_18;
case 't':
v19 = 9;
goto LABEL_18;
case 'u':
v20 = 0LL;
v19 = 0;
do
{
v21 = (unsigned __int8)v16[v20];
v22 = v21 - 48;
if ( (unsigned int)(v21 - 48) >= 0xA )
{
if ( (unsigned int)(v21 - 65) > 5 )
{
v24 = v21 - 97;
v23 = v21 - 87;
if ( v24 >= 6 )
v23 = -1;
}
else
{
v23 = v21 - 55;
}
v22 = v23;
}
if ( v22 < 0 )
json_parse_error(a1, &v16[v20], "Bad Unicode escape");
else
v19 = v22 | (16 * v19);
if ( v22 < 0 )
goto LABEL_46;
++v20;
}
while ( (_DWORD)v20 != 4 );
v16 += v20;
goto LABEL_18;
default:
if ( v19 == 98 )
{
v19 = 8;
}
else
{
if ( v19 != 102 )
goto LABEL_44;
v19 = 12;
}
break;
}
goto LABEL_18;
}
if ( v19 == 34 || v19 == 47 || v19 == 92 )
goto LABEL_18;
LABEL_44:
if ( (unsigned long long)v16 <= v17 )
{
v27 = "Bad escaped character";
v28 = v18;
goto LABEL_42;
}
LABEL_45:
js_parse_error(
(long long *)a1,
(long long)"Unexpected end of JSON input",
v10,
v11,
v12,
v13,
(__m128)0x2000000000uLL,
a4,
a5,
a6,
v14,
v15,
a9,
a10,
v29);
LABEL_46:
js_free(v30, v31);
v31 = 0LL;
return 0xFFFFFFFFLL;
}
| json_parse_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RDI
MOVSD XMM0,qword ptr [0x001a29f0]
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV ESI,0x20
XOR EDX,EDX
CALL 0x00124bcf
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x00150da7
MOV qword ptr [RSP + 0x28],R14
MOV R12,qword ptr [R14]
LEA R13,[RSP + 0x8]
LAB_00150bb5:
MOV RAX,qword ptr [RBX + 0x78]
CMP R12,RAX
JNC 0x00150d5b
LEA R15,[R12 + 0x1]
MOVZX EBP,byte ptr [R12]
CMP EBP,0x22
JZ 0x00150d0d
CMP BPL,0x1f
JBE 0x00150d39
CMP EBP,0x5c
JNZ 0x00150c07
MOVZX EBP,byte ptr [R12 + 0x1]
ADD R12,0x2
CMP EBP,0x61
JG 0x00150c11
CMP EBP,0x22
JZ 0x00150c50
CMP EBP,0x2f
JZ 0x00150c50
CMP EBP,0x5c
JZ 0x00150c50
JMP 0x00150d56
LAB_00150c07:
TEST BPL,BPL
JS 0x00150c30
MOV R12,R15
JMP 0x00150c50
LAB_00150c11:
LEA ECX,[RBP + -0x6e]
CMP ECX,0x7
JA 0x00150c67
LEA RDX,[0x1a0f90]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_6e:
MOV EBP,0xa
JMP 0x00150c50
LAB_00150c30:
MOV RDI,R12
LEA RSI,[RSP + 0x30]
CALL 0x0011f785
MOV EBP,EAX
MOV RAX,qword ptr [RSP + 0x30]
CMP RAX,R15
JZ 0x00150d4d
MOV R12,RAX
LAB_00150c50:
MOV RDI,R13
MOV ESI,EBP
CALL 0x0013744c
TEST EAX,EAX
JZ 0x00150bb5
JMP 0x00150d6c
default:
CMP EBP,0x62
JZ 0x00150d03
CMP EBP,0x66
JNZ 0x00150d56
MOV EBP,0xc
JMP 0x00150c50
caseD_75:
XOR R15D,R15D
XOR EBP,EBP
LAB_00150c85:
MOVZX EAX,byte ptr [R12 + R15*0x1]
LEA R14D,[RAX + -0x30]
CMP R14D,0xa
JC 0x00150cb5
LEA ECX,[RAX + -0x41]
CMP ECX,0x5
JA 0x00150ca1
ADD EAX,-0x37
JMP 0x00150cb2
LAB_00150ca1:
LEA ECX,[RAX + -0x61]
ADD EAX,-0x57
CMP ECX,0x6
MOV ECX,0xffffffff
CMOVNC EAX,ECX
LAB_00150cb2:
MOV R14D,EAX
LAB_00150cb5:
TEST R14D,R14D
JS 0x00150cc2
SHL EBP,0x4
OR EBP,R14D
JMP 0x00150cd5
LAB_00150cc2:
LEA RSI,[R12 + R15*0x1]
MOV RDI,RBX
LEA RDX,[0x1a3f67]
CALL 0x00150db9
LAB_00150cd5:
TEST R14D,R14D
JS 0x00150d6c
INC R15
CMP R15D,0x4
JNZ 0x00150c85
ADD R12,R15
JMP 0x00150c50
caseD_74:
MOV EBP,0x9
JMP 0x00150c50
caseD_72:
MOV EBP,0xd
JMP 0x00150c50
LAB_00150d03:
MOV EBP,0x8
JMP 0x00150c50
LAB_00150d0d:
MOV dword ptr [RBX + 0x20],0xffffff81
MOV dword ptr [RBX + 0x48],0x22
LEA RDI,[RSP + 0x8]
CALL 0x001374a0
MOV qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],R15
XOR EAX,EAX
JMP 0x00150d89
LAB_00150d39:
LEA RDX,[0x1a3f3f]
LAB_00150d40:
MOV RDI,RBX
MOV RSI,R12
LAB_00150d46:
CALL 0x00150db9
JMP 0x00150d6c
LAB_00150d4d:
LEA RDX,[0x1a3f90]
JMP 0x00150d40
caseD_6f:
CMP R12,RAX
JBE 0x00150d98
LAB_00150d5b:
LEA RSI,[0x1a3fa3]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00133d45
LAB_00150d6c:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00120bf5
MOV qword ptr [RSP + 0x10],0x0
MOV EAX,0xffffffff
LAB_00150d89:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00150d98:
LEA RDX,[0x1a3f7a]
MOV RDI,RBX
MOV RSI,R15
JMP 0x00150d46
LAB_00150da7:
MOV dword ptr [RSP + 0x1c],0x0
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x00150d6c
|
int8 json_parse_string(int8 *param_1,long *param_2)
{
byte *pbVar1;
byte bVar2;
uint uVar3;
int iVar4;
char *pcVar5;
byte *pbVar6;
byte *pbVar7;
uint uVar8;
long lVar9;
int1 auVar10 [16];
int8 local_60;
long local_58;
ulong local_50;
int8 uStack_48;
long *local_40;
byte *local_38;
local_60 = *param_1;
local_50 = DAT_001a29f0;
uStack_48 = 0;
local_58 = js_alloc_string(local_60,0x20,0);
if (local_58 == 0) {
local_50 = local_50 & 0xffffffff;
uStack_48 = CONCAT44(0xffffffff,(int4)uStack_48);
}
else {
pbVar6 = (byte *)*param_2;
local_40 = param_2;
do {
if ((byte *)param_1[0xf] <= pbVar6) {
LAB_00150d5b:
js_parse_error(param_1,"Unexpected end of JSON input");
break;
}
pbVar1 = pbVar6 + 1;
bVar2 = *pbVar6;
uVar3 = (uint)bVar2;
if (bVar2 == 0x22) {
*(int4 *)(param_1 + 4) = 0xffffff81;
*(int4 *)(param_1 + 9) = 0x22;
auVar10 = string_buffer_end(&local_60);
*(int1 (*) [16])(param_1 + 7) = auVar10;
*local_40 = (long)pbVar1;
return 0;
}
if (bVar2 < 0x20) {
pcVar5 = "Bad control character in string literal";
LAB_00150d46:
json_parse_error(param_1,pbVar6,pcVar5);
break;
}
if (bVar2 != 0x5c) {
pbVar7 = pbVar1;
if ((-1 < (char)bVar2) ||
(uVar3 = utf8_decode(pbVar6,&local_38), pbVar7 = local_38, local_38 != pbVar1))
goto LAB_00150c50;
pcVar5 = "Bad UTF-8 sequence";
goto LAB_00150d46;
}
bVar2 = pbVar6[1];
pbVar7 = pbVar6 + 2;
if (bVar2 < 0x62) {
uVar3 = (uint)bVar2;
if (((bVar2 != 0x22) && (uVar3 = (uint)bVar2, bVar2 != 0x2f)) && (bVar2 != 0x5c)) {
switchD_00150c27_caseD_6f:
if ((byte *)param_1[0xf] < pbVar7) goto LAB_00150d5b;
pcVar5 = "Bad escaped character";
pbVar6 = pbVar1;
goto LAB_00150d46;
}
}
else {
switch(bVar2) {
case 0x6e:
uVar3 = 10;
break;
case 0x6f:
case 0x70:
case 0x71:
case 0x73:
goto switchD_00150c27_caseD_6f;
case 0x72:
uVar3 = 0xd;
break;
case 0x74:
uVar3 = 9;
break;
case 0x75:
lVar9 = 0;
uVar3 = 0;
do {
bVar2 = pbVar7[lVar9];
uVar8 = bVar2 - 0x30;
if (9 < uVar8) {
if (bVar2 - 0x41 < 6) {
uVar8 = bVar2 - 0x37;
}
else {
uVar8 = bVar2 - 0x57;
if (5 < bVar2 - 0x61) {
uVar8 = 0xffffffff;
}
}
}
if ((int)uVar8 < 0) {
json_parse_error(param_1,pbVar7 + lVar9,"Bad Unicode escape");
goto LAB_00150d6c;
}
uVar3 = uVar3 << 4 | uVar8;
lVar9 = lVar9 + 1;
} while ((int)lVar9 != 4);
pbVar7 = pbVar7 + lVar9;
break;
default:
if (bVar2 == 0x62) {
uVar3 = 8;
}
else {
if (bVar2 != 0x66) goto switchD_00150c27_caseD_6f;
uVar3 = 0xc;
}
}
}
LAB_00150c50:
iVar4 = string_buffer_putc(&local_60,uVar3);
pbVar6 = pbVar7;
} while (iVar4 == 0);
}
LAB_00150d6c:
js_free(local_60,local_58);
return 0xffffffff;
}
| |
40,726 | trnman_recreate_trn_from_recovery | eloqsql/storage/maria/trnman.c | TRN *trnman_recreate_trn_from_recovery(uint16 shortid, TrID longid)
{
TrID old_trid_generator= global_trid_generator;
TRN *trn;
DBUG_ASSERT(maria_in_recovery && !maria_multi_threaded);
global_trid_generator= longid-1; /* force a correct trid in the new trn */
if (unlikely((trn= trnman_new_trn(NULL)) == NULL))
return NULL;
/* deallocate excessive allocations of trnman_new_trn() */
global_trid_generator= old_trid_generator;
set_if_bigger(global_trid_generator, longid);
short_trid_to_active_trn[trn->short_id]= 0;
DBUG_ASSERT(short_trid_to_active_trn[shortid] == NULL);
short_trid_to_active_trn[shortid]= trn;
trn->short_id= shortid;
return trn;
} | O0 | c | trnman_recreate_trn_from_recovery:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %di, %ax
movw %ax, -0xa(%rbp)
movq %rsi, -0x18(%rbp)
movq 0xc00996(%rip), %rax # 0xc7bfc0
movq %rax, -0x20(%rbp)
jmp 0x7b630
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, 0xc00981(%rip) # 0xc7bfc0
xorl %eax, %eax
movl %eax, %edi
callq 0x7a4d0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x7b675
movq $0x0, -0x8(%rbp)
jmp 0x7b6e0
movq -0x20(%rbp), %rax
movq %rax, 0xc00940(%rip) # 0xc7bfc0
movq 0xc00939(%rip), %rax # 0xc7bfc0
cmpq -0x18(%rbp), %rax
jae 0x7b698
movq -0x18(%rbp), %rax
movq %rax, 0xc00928(%rip) # 0xc7bfc0
jmp 0x7b69a
movq 0xc0063f(%rip), %rax # 0xc7bce0
movq -0x28(%rbp), %rcx
movzwl 0xac(%rcx), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0x7b6b6
movq -0x28(%rbp), %rdx
movq 0xc0061f(%rip), %rax # 0xc7bce0
movzwl -0xa(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movw -0xa(%rbp), %cx
movq -0x28(%rbp), %rax
movw %cx, 0xac(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| trnman_recreate_trn_from_recovery:
push rbp
mov rbp, rsp
sub rsp, 30h
mov ax, di
mov [rbp+var_A], ax
mov [rbp+var_18], rsi
mov rax, cs:global_trid_generator
mov [rbp+var_20], rax
jmp short $+2
loc_7B630:
mov rax, [rbp+var_18]
sub rax, 1
mov cs:global_trid_generator, rax
xor eax, eax
mov edi, eax
call trnman_new_trn
mov [rbp+var_28], rax
cmp rax, 0
setz 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_7B675
mov [rbp+var_8], 0
jmp short loc_7B6E0
loc_7B675:
mov rax, [rbp+var_20]
mov cs:global_trid_generator, rax
mov rax, cs:global_trid_generator
cmp rax, [rbp+var_18]
jnb short loc_7B698
mov rax, [rbp+var_18]
mov cs:global_trid_generator, rax
loc_7B698:
jmp short $+2
loc_7B69A:
mov rax, cs:short_trid_to_active_trn
mov rcx, [rbp+var_28]
movzx ecx, word ptr [rcx+0ACh]
mov qword ptr [rax+rcx*8], 0
jmp short $+2
loc_7B6B6:
mov rdx, [rbp+var_28]
mov rax, cs:short_trid_to_active_trn
movzx ecx, [rbp+var_A]
mov [rax+rcx*8], rdx
mov cx, [rbp+var_A]
mov rax, [rbp+var_28]
mov [rax+0ACh], cx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_7B6E0:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long trnman_recreate_trn_from_recovery(unsigned __int16 a1, unsigned long long a2)
{
long long v3; // [rsp+8h] [rbp-28h]
unsigned long long v4; // [rsp+10h] [rbp-20h]
v4 = global_trid_generator;
global_trid_generator = a2 - 1;
v3 = trnman_new_trn(0LL);
if ( !v3 )
return 0LL;
global_trid_generator = v4;
if ( v4 < a2 )
global_trid_generator = a2;
*(_QWORD *)(short_trid_to_active_trn + 8LL * *(unsigned __int16 *)(v3 + 172)) = 0LL;
*(_QWORD *)(short_trid_to_active_trn + 8LL * a1) = v3;
*(_WORD *)(v3 + 172) = a1;
return v3;
}
| trnman_recreate_trn_from_recovery:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AX,DI
MOV word ptr [RBP + -0xa],AX
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [0x00d7bfc0]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0017b630
LAB_0017b630:
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [0x00d7bfc0],RAX
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0017a4d0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0017b675
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0017b6e0
LAB_0017b675:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [0x00d7bfc0],RAX
MOV RAX,qword ptr [0x00d7bfc0]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0017b698
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [0x00d7bfc0],RAX
LAB_0017b698:
JMP 0x0017b69a
LAB_0017b69a:
MOV RAX,qword ptr [0x00d7bce0]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,word ptr [RCX + 0xac]
MOV qword ptr [RAX + RCX*0x8],0x0
JMP 0x0017b6b6
LAB_0017b6b6:
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [0x00d7bce0]
MOVZX ECX,word ptr [RBP + -0xa]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV CX,word ptr [RBP + -0xa]
MOV RAX,qword ptr [RBP + -0x28]
MOV word ptr [RAX + 0xac],CX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017b6e0:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long trnman_recreate_trn_from_recovery(ushort param_1,ulong param_2)
{
ulong uVar1;
int8 local_10;
uVar1 = global_trid_generator;
global_trid_generator = param_2 - 1;
local_10 = trnman_new_trn(0);
if (local_10 == 0) {
local_10 = 0;
}
else {
global_trid_generator = uVar1;
if (uVar1 < param_2) {
global_trid_generator = param_2;
}
*(int8 *)(short_trid_to_active_trn + (ulong)*(ushort *)(local_10 + 0xac) * 8) = 0;
*(long *)(short_trid_to_active_trn + (ulong)param_1 * 8) = local_10;
*(ushort *)(local_10 + 0xac) = param_1;
}
return local_10;
}
| |
40,727 | minja::Value::operator-() const | monkey531[P]llama/common/minja.hpp | Value operator-() const {
if (is_number_integer())
return -get<int64_t>();
else
return -get<double>();
} | O3 | cpp | minja::Value::operator-() const:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x40(%rsi), %al
addb $-0x5, %al
leaq 0x40(%rdi), %r14
movq %rsi, %rdi
cmpb $0x1, %al
ja 0x85bfc
callq 0x85dbe
negq %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x601a6
jmp 0x85c26
callq 0x85f08
xorps 0x68c68(%rip), %xmm0 # 0xee870
xorps %xmm1, %xmm1
movups %xmm1, (%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm1, 0x20(%rbx)
movups %xmm1, 0x30(%rbx)
movups %xmm1, 0x40(%rbx)
movq %r14, %rdi
callq 0x5f76e
movq %r14, %rdi
movl $0x1, %esi
callq 0x58484
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZNK5minja5ValuengEv:
push r14
push rbx
push rax
mov rbx, rdi
mov al, [rsi+40h]
add al, 0FBh
lea r14, [rdi+40h]
mov rdi, rsi
cmp al, 1
ja short loc_85BFC
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
neg rax
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
movups xmmword ptr [rbx+40h], xmm0
mov rdi, r14
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,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>::number_integer_t)
jmp short loc_85C26
loc_85BFC:
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
xorps xmm0, cs:xmmword_EE870
xorps xmm1, xmm1
movups xmmword ptr [rbx], xmm1
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx+20h], xmm1
movups xmmword ptr [rbx+30h], xmm1
movups xmmword ptr [rbx+40h], xmm1
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,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>::number_float_t)
loc_85C26:
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| _OWORD * minja::Value::operator-(_OWORD *a1, long long a2)
{
unsigned __int8 *v2; // r14
long long v3; // rax
double v4; // xmm0_8
v2 = (unsigned __int8 *)(a1 + 4);
if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u )
{
v4 = minja::Value::get<double>(a2);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
a1[3] = 0LL;
a1[4] = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<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>>(
v2,
-v4);
}
else
{
v3 = minja::Value::get<long>(a2);
*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
a1[3] = 0LL;
a1[4] = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<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>>(
v2,
-v3);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v2);
return a1;
}
| operator-:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
ADD AL,0xfb
LEA R14,[RDI + 0x40]
MOV RDI,RSI
CMP AL,0x1
JA 0x00185bfc
CALL 0x00185dbe
NEG RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOV RSI,RAX
CALL 0x001601a6
JMP 0x00185c26
LAB_00185bfc:
CALL 0x00185f08
XORPS XMM0,xmmword ptr [0x001ee870]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [RBX],XMM1
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX + 0x20],XMM1
MOVUPS xmmword ptr [RBX + 0x30],XMM1
MOVUPS xmmword ptr [RBX + 0x40],XMM1
MOV RDI,R14
CALL 0x0015f76e
LAB_00185c26:
MOV RDI,R14
MOV ESI,0x1
CALL 0x00158484
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE() const */
Value * __thiscall minja::Value::operator-(Value *this)
{
Value *pVVar1;
double dVar2;
long lVar3;
Value *in_RSI;
uint uVar4;
pVVar1 = this + 0x40;
if ((byte)((char)in_RSI[0x40] - 5U) < 2) {
lVar3 = get<long>(in_RSI);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<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>>
(pVVar1,-lVar3);
}
else {
dVar2 = get<double>(in_RSI);
uVar4 = SUB84(dVar2,0) ^ _DAT_001ee870;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<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>>
(uVar4,pVVar1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(pVVar1,0));
return this;
}
| |
40,728 | label(QString const&, int) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | static QLabel* label(const QString& text, int maxWidth = -1)
{
auto label = new QLabel;
label->setTextInteractionFlags(Qt::TextSelectableByMouse);
label->setToolTip(text);
if (maxWidth < 0)
label->setText(text);
else {
label->setMaximumWidth(maxWidth);
label->setText(label->fontMetrics().elidedText(text, Qt::ElideRight, maxWidth));
}
return label;
} | O0 | cpp | label(QString const&, int):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x28, %edi
callq 0xf910
movq %rax, -0x58(%rbp)
movq %rax, -0x60(%rbp)
leaq -0x1c(%rbp), %rdi
callq 0x1add0
movq -0x58(%rbp), %rdi
movl -0x1c(%rbp), %edx
xorl %eax, %eax
movl %eax, %esi
callq 0xf120
jmp 0x1490f
movq -0x60(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x221d0
movq -0x68(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0xfbe0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xf5d0
cmpl $0x0, -0xc(%rbp)
jge 0x1497d
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xf690
jmp 0x14a0e
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x28, %esi
callq 0xf0d0
jmp 0x14a1b
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xf1b0
movq -0x18(%rbp), %rsi
movq %rsi, -0x78(%rbp)
leaq -0x50(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x221f0
movq -0x70(%rbp), %rsi
movq -0x8(%rbp), %rdx
movl -0xc(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %ecx
xorl %r9d, %r9d
callq 0xfc00
jmp 0x149bd
movq -0x78(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xf690
jmp 0x149cc
leaq -0x48(%rbp), %rdi
callq 0x1b1e0
leaq -0x50(%rbp), %rdi
callq 0xf4b0
jmp 0x14a0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x14a03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x1b1e0
leaq -0x50(%rbp), %rdi
callq 0xf4b0
jmp 0x14a1b
movq -0x18(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0xf410
nopw %cs:(%rax,%rax)
| _ZL5labelRK7QStringi:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_58], rax
mov [rbp+var_60], rax
lea rdi, [rbp+var_1C]
call _ZN6QFlagsIN2Qt10WindowTypeEEC2Ev; QFlags<Qt::WindowType>::QFlags(void)
mov rdi, [rbp+var_58]
mov edx, [rbp+var_1C]
xor eax, eax
mov esi, eax
call __ZN6QLabelC1EP7QWidget6QFlagsIN2Qt10WindowTypeEE; QLabel::QLabel(QWidget *,QFlags<Qt::WindowType>)
jmp short $+2
loc_1490F:
mov rax, [rbp+var_60]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov [rbp+var_68], rax
lea rdi, [rbp+var_30]
mov esi, 1
call _ZN6QFlagsIN2Qt19TextInteractionFlagEEC2ES1_; QFlags<Qt::TextInteractionFlag>::QFlags(Qt::TextInteractionFlag)
mov rdi, [rbp+var_68]
mov esi, [rbp+var_30]
call __ZN6QLabel23setTextInteractionFlagsE6QFlagsIN2Qt19TextInteractionFlagEE; QLabel::setTextInteractionFlags(QFlags<Qt::TextInteractionFlag>)
mov rdi, [rbp+var_18]; this
mov rsi, [rbp+var_8]; QString *
call __ZN7QWidget10setToolTipERK7QString; QWidget::setToolTip(QString const&)
cmp [rbp+var_C], 0
jge short loc_1497D
mov rdi, [rbp+var_18]; this
mov rsi, [rbp+var_8]; QString *
call __ZN6QLabel7setTextERK7QString; QLabel::setText(QString const&)
jmp loc_14A0E
mov rdi, [rbp+var_60]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_14A1B
loc_1497D:
mov rdi, [rbp+var_18]; this
mov esi, [rbp+var_C]; int
call __ZN7QWidget15setMaximumWidthEi; QWidget::setMaximumWidth(int)
mov rsi, [rbp+var_18]
mov [rbp+var_78], rsi
lea rdi, [rbp+var_50]; this
mov [rbp+var_70], rdi
call _ZNK7QWidget11fontMetricsEv; QWidget::fontMetrics(void)
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_8]
mov r8d, [rbp+var_C]
lea rdi, [rbp+var_48]
mov ecx, 1
xor r9d, r9d
call __ZNK12QFontMetrics10elidedTextERK7QStringN2Qt13TextElideModeEii; QFontMetrics::elidedText(QString const&,Qt::TextElideMode,int,int)
jmp short $+2
loc_149BD:
mov rdi, [rbp+var_78]; this
lea rsi, [rbp+var_48]; QString *
call __ZN6QLabel7setTextERK7QString; QLabel::setText(QString const&)
jmp short $+2
loc_149CC:
lea rdi, [rbp+var_48]; this
call _ZN7QStringD2Ev; QString::~QString()
lea rdi, [rbp+var_50]; this
call __ZN12QFontMetricsD1Ev; QFontMetrics::~QFontMetrics()
jmp short loc_14A0E
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
jmp short loc_14A03
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
lea rdi, [rbp+var_48]; this
call _ZN7QStringD2Ev; QString::~QString()
loc_14A03:
lea rdi, [rbp+var_50]; this
call __ZN12QFontMetricsD1Ev; QFontMetrics::~QFontMetrics()
jmp short loc_14A1B
loc_14A0E:
mov rax, [rbp+var_18]
add rsp, 80h
pop rbp
retn
loc_14A1B:
mov rdi, [rbp+var_28]
call __Unwind_Resume
| QWidget * label(const QString *a1, int a2)
{
QWidget *v3; // [rsp+8h] [rbp-78h]
QWidget *v4; // [rsp+20h] [rbp-60h]
_BYTE v5[8]; // [rsp+30h] [rbp-50h] BYREF
_BYTE v6[24]; // [rsp+38h] [rbp-48h] BYREF
unsigned int v7; // [rsp+50h] [rbp-30h] BYREF
unsigned int v8; // [rsp+64h] [rbp-1Ch] BYREF
QWidget *v9; // [rsp+68h] [rbp-18h]
int v10; // [rsp+74h] [rbp-Ch]
QString *v11; // [rsp+78h] [rbp-8h]
v11 = a1;
v10 = a2;
v4 = (QWidget *)operator new(0x28uLL);
QFlags<Qt::WindowType>::QFlags(&v8);
QLabel::QLabel(v4, 0LL, v8);
v9 = v4;
QFlags<Qt::TextInteractionFlag>::QFlags(&v7, 1LL);
QLabel::setTextInteractionFlags(v4, v7);
QWidget::setToolTip(v9, v11);
if ( v10 >= 0 )
{
QWidget::setMaximumWidth(v9, v10);
v3 = v9;
QWidget::fontMetrics((QWidget *)v5);
QFontMetrics::elidedText(v6, v5, v11, 1LL, (unsigned int)v10, 0LL);
QLabel::setText(v3, (const QString *)v6);
QString::~QString((QString *)v6);
QFontMetrics::~QFontMetrics((QFontMetrics *)v5);
}
else
{
QLabel::setText(v9, v11);
}
return v9;
}
| label:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV EDI,0x28
CALL 0x0010f910
MOV qword ptr [RBP + -0x58],RAX
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x1c]
CALL 0x0011add0
MOV RDI,qword ptr [RBP + -0x58]
MOV EDX,dword ptr [RBP + -0x1c]
LAB_00114904:
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010f120
LAB_0011490d:
JMP 0x0011490f
LAB_0011490f:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x68],RAX
LEA RDI,[RBP + -0x30]
MOV ESI,0x1
CALL 0x001221d0
MOV RDI,qword ptr [RBP + -0x68]
MOV ESI,dword ptr [RBP + -0x30]
CALL 0x0010fbe0
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x0010f5d0
CMP dword ptr [RBP + -0xc],0x0
JGE 0x0011497d
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x0010f690
JMP 0x00114a0e
LAB_0011497d:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x0010f1b0
MOV RSI,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x78],RSI
LEA RDI,[RBP + -0x50]
MOV qword ptr [RBP + -0x70],RDI
CALL 0x001221f0
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x8]
MOV R8D,dword ptr [RBP + -0xc]
LAB_001149aa:
LEA RDI,[RBP + -0x48]
MOV ECX,0x1
XOR R9D,R9D
CALL 0x0010fc00
JMP 0x001149bd
LAB_001149bd:
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x48]
CALL 0x0010f690
LAB_001149ca:
JMP 0x001149cc
LAB_001149cc:
LEA RDI,[RBP + -0x48]
CALL 0x0011b1e0
LEA RDI,[RBP + -0x50]
CALL 0x0010f4b0
JMP 0x00114a0e
LAB_00114a0e:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x80
POP RBP
RET
|
/* label(QString const&, int) */
QString * label(QString *param_1,int param_2)
{
QLabel *pQVar1;
QFontMetrics local_58 [8];
QString local_50 [24];
int4 local_38 [5];
int4 local_24;
QLabel *local_20;
int local_14;
QString *local_10;
local_14 = param_2;
local_10 = param_1;
pQVar1 = (QLabel *)operator_new(0x28);
QFlags<Qt::WindowType>::QFlags((QFlags<Qt::WindowType> *)&local_24);
/* try { // try from 00114904 to 0011490c has its CatchHandler @ 0011495e */
QLabel::QLabel(pQVar1,0,local_24);
local_20 = pQVar1;
QFlags<Qt::TextInteractionFlag>::QFlags((QFlags<Qt::TextInteractionFlag> *)local_38,1);
QLabel::setTextInteractionFlags(pQVar1,local_38[0]);
QWidget::setToolTip((QString *)local_20);
if (local_14 < 0) {
QLabel::setText((QString *)local_20);
}
else {
QWidget::setMaximumWidth((int)local_20);
pQVar1 = local_20;
QWidget::fontMetrics();
/* try { // try from 001149aa to 001149ba has its CatchHandler @ 001149e0 */
QFontMetrics::elidedText(local_50,local_58,local_10,1,local_14,0);
/* try { // try from 001149bd to 001149c9 has its CatchHandler @ 001149ee */
QLabel::setText((QString *)pQVar1);
QString::~QString(local_50);
QFontMetrics::~QFontMetrics(local_58);
}
return (QString *)local_20;
}
| |
40,729 | label(QString const&, int) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | static QLabel* label(const QString& text, int maxWidth = -1)
{
auto label = new QLabel;
label->setTextInteractionFlags(Qt::TextSelectableByMouse);
label->setToolTip(text);
if (maxWidth < 0)
label->setText(text);
else {
label->setMaximumWidth(maxWidth);
label->setText(label->fontMetrics().elidedText(text, Qt::ElideRight, maxWidth));
}
return label;
} | O1 | cpp | label(QString const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %r14
movl $0x28, %edi
callq 0xf910
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xf120
movq %rbx, %rdi
movl $0x1, %esi
callq 0xfbc0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf5e0
movq %rbx, %rdi
testl %ebp, %ebp
js 0x128e6
movl %ebp, %esi
callq 0xf1b0
movq 0x20(%rbx), %rsi
addq $0x38, %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0xff70
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x1, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0xfbe0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xf6a0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x128da
lock
decl (%rax)
jne 0x128da
movq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
leaq 0x8(%rsp), %rdi
callq 0xf4b0
jmp 0x128ee
movq %r14, %rsi
callq 0xf6a0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x12927
lock
decl (%rax)
jne 0x12927
movq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
jmp 0x12927
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xf4b0
jmp 0x12943
movq %rax, %r14
movl $0x28, %esi
movq %rbx, %rdi
callq 0xf0d0
movq %r14, %rdi
callq 0xf410
nop
| _ZL5labelRK7QStringi:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov ebp, esi
mov r14, rdi
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rdi, rax
xor esi, esi
xor edx, edx
call __ZN6QLabelC1EP7QWidget6QFlagsIN2Qt10WindowTypeEE; QLabel::QLabel(QWidget *,QFlags<Qt::WindowType>)
mov rdi, rbx
mov esi, 1
call __ZN6QLabel23setTextInteractionFlagsE6QFlagsIN2Qt19TextInteractionFlagEE; QLabel::setTextInteractionFlags(QFlags<Qt::TextInteractionFlag>)
mov rdi, rbx; this
mov rsi, r14; QString *
call __ZN7QWidget10setToolTipERK7QString; QWidget::setToolTip(QString const&)
mov rdi, rbx; this
test ebp, ebp
js short loc_128E6
mov esi, ebp; int
call __ZN7QWidget15setMaximumWidthEi; QWidget::setMaximumWidth(int)
mov rsi, [rbx+20h]
add rsi, 38h ; '8'
lea r15, [rsp+48h+var_40]
mov rdi, r15
call __ZN12QFontMetricsC1ERK5QFont; QFontMetrics::QFontMetrics(QFont const&)
lea rdi, [rsp+48h+var_38]
mov rsi, r15
mov rdx, r14
mov ecx, 1
mov r8d, ebp
xor r9d, r9d
call __ZNK12QFontMetrics10elidedTextERK7QStringN2Qt13TextElideModeEii; QFontMetrics::elidedText(QString const&,Qt::TextElideMode,int,int)
lea rsi, [rsp+48h+var_38]; QString *
mov rdi, rbx; this
call __ZN6QLabel7setTextERK7QString; QLabel::setText(QString const&)
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_128DA
lock dec dword ptr [rax]
jnz short loc_128DA
mov rdi, [rsp+48h+var_38]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_128DA:
lea rdi, [rsp+48h+var_40]; this
call __ZN12QFontMetricsD1Ev; QFontMetrics::~QFontMetrics()
jmp short loc_128EE
loc_128E6:
mov rsi, r14; QString *
call __ZN6QLabel7setTextERK7QString; QLabel::setText(QString const&)
loc_128EE:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rax, [rsp+arg_8]
test rax, rax
jz short loc_12927
lock dec dword ptr [rax]
jnz short loc_12927
mov rdi, [rsp+arg_8]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
jmp short loc_12927
mov r14, rax
loc_12927:
lea rdi, [rsp+arg_0]; this
call __ZN12QFontMetricsD1Ev; QFontMetrics::~QFontMetrics()
jmp short loc_12943
mov r14, rax
mov esi, 28h ; '('; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_12943:
mov rdi, r14
call __Unwind_Resume
| QWidget * label(const QString *a1, int a2)
{
QWidget *v2; // rbx
_BYTE v4[8]; // [rsp+8h] [rbp-40h] BYREF
volatile signed __int32 *v5[7]; // [rsp+10h] [rbp-38h] BYREF
v2 = (QWidget *)operator new(0x28uLL);
QLabel::QLabel(v2, 0LL, 0LL);
QLabel::setTextInteractionFlags(v2, 1LL);
QWidget::setToolTip(v2, a1);
if ( a2 < 0 )
{
QLabel::setText(v2, a1);
}
else
{
QWidget::setMaximumWidth(v2, a2);
QFontMetrics::QFontMetrics(v4, *((_QWORD *)v2 + 4) + 56LL);
QFontMetrics::elidedText(v5, v4, a1, 1LL, (unsigned int)a2, 0LL);
QLabel::setText(v2, (const QString *)v5);
if ( v5[0] && !_InterlockedDecrement(v5[0]) )
QArrayData::deallocate(v5[0], 2LL);
QFontMetrics::~QFontMetrics((QFontMetrics *)v4);
}
return v2;
}
| label:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV EBP,ESI
MOV R14,RDI
MOV EDI,0x28
CALL 0x0010f910
MOV RBX,RAX
LAB_00112848:
MOV RDI,RAX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0010f120
LAB_00112854:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0010fbc0
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010f5e0
MOV RDI,RBX
TEST EBP,EBP
JS 0x001128e6
MOV ESI,EBP
CALL 0x0010f1b0
MOV RSI,qword ptr [RBX + 0x20]
ADD RSI,0x38
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x0010ff70
LAB_0011288f:
LEA RDI,[RSP + 0x10]
MOV RSI,R15
MOV RDX,R14
MOV ECX,0x1
MOV R8D,EBP
XOR R9D,R9D
CALL 0x0010fbe0
LAB_001128aa:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0010f6a0
LAB_001128b7:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001128da
DEC.LOCK dword ptr [RAX]
JNZ 0x001128da
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x0010f610
LAB_001128da:
LEA RDI,[RSP + 0x8]
CALL 0x0010f4b0
JMP 0x001128ee
LAB_001128e6:
MOV RSI,R14
CALL 0x0010f6a0
LAB_001128ee:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* label(QString const&, int) */
QString * label(QString *param_1,int param_2)
{
QString *pQVar1;
QFontMetrics local_40 [8];
QArrayData *local_38 [3];
pQVar1 = (QString *)operator_new(0x28);
/* try { // try from 00112848 to 00112853 has its CatchHandler @ 00112933 */
QLabel::QLabel((QLabel *)pQVar1,0,0);
QLabel::setTextInteractionFlags(pQVar1,1);
QWidget::setToolTip(pQVar1);
if (param_2 < 0) {
QLabel::setText(pQVar1);
}
else {
QWidget::setMaximumWidth((int)pQVar1);
QFontMetrics::QFontMetrics(local_40,(QFont *)(*(long *)(pQVar1 + 0x20) + 0x38));
/* try { // try from 0011288f to 001128a9 has its CatchHandler @ 00112924 */
QFontMetrics::elidedText(local_38,local_40,param_1,1,param_2,0);
/* try { // try from 001128aa to 001128b6 has its CatchHandler @ 001128fc */
QLabel::setText(pQVar1);
if (local_38[0] != (QArrayData *)0x0) {
LOCK();
*(int *)local_38[0] = *(int *)local_38[0] + -1;
UNLOCK();
if (*(int *)local_38[0] == 0) {
QArrayData::deallocate(local_38[0],2,8);
}
}
QFontMetrics::~QFontMetrics(local_40);
}
return pQVar1;
}
| |
40,730 | inverse_fp12 | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/fp12_tower.c | static void inverse_fp12(vec384fp12 ret, const vec384fp12 a)
{
vec384fp6 t0, t1;
sqr_fp6(t0, a[0]);
sqr_fp6(t1, a[1]);
#ifdef mul_by_v_fp6
mul_by_v_fp6(t1, t1);
sub_fp6(t0, t0, t1);
#else
mul_by_u_plus_1_fp2(t1[2], t1[2]);
sub_fp2(t0[0], t0[0], t1[2]);
sub_fp2(t0[1], t0[1], t1[0]);
sub_fp2(t0[2], t0[2], t1[1]);
#endif
inverse_fp6(t1, t0);
mul_fp6(ret[0], a[0], t1);
mul_fp6(ret[1], a[1], t1);
neg_fp6(ret[1], ret[1]);
} | O3 | c | inverse_fp12:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp # imm = 0x448
movq %rsi, %rbx
movq %rsi, -0x38(%rbp)
movq %rdi, -0x48(%rbp)
leaq -0x230(%rbp), %r15
movq %r15, %rdi
callq 0x66415
movl $0x120, %eax # imm = 0x120
leaq (%rbx,%rax), %rsi
movq %rsi, -0x40(%rbp)
leaq -0x3b0(%rbp), %rbx
movq %rbx, %rdi
callq 0x66415
movl $0xc0, %r12d
leaq (%rbx,%r12), %r14
movq %r14, -0x30(%rbp)
leaq 0x2c871(%rip), %r13 # 0x8a910
movq %r14, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x6dec0
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x6de40
leaq -0x1d0(%rbp), %rdi
movq %rdi, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x6de40
addq %r15, %r12
leaq -0x350(%rbp), %rdx
movq %r12, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x6de40
leaq -0x290(%rbp), %rbx
movabsq $-0x760c000300030003, %r14 # imm = 0x89F3FFFCFFFCFFFD
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x71ca0
leaq -0x470(%rbp), %r15
movq %r15, %rdi
leaq -0x1d0(%rbp), %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x71b60
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x6dec0
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x6de40
leaq -0xb0(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x71ca0
movq %rbx, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x6dec0
movq %r15, %rdi
leaq -0x230(%rbp), %rsi
leaq -0x1d0(%rbp), %rbx
movq %rbx, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x71b60
leaq -0xb0(%rbp), %rdi
movq %rdi, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x6de40
leaq -0x110(%rbp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x71ca0
movq %r15, %rdi
leaq -0x230(%rbp), %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x71b60
leaq -0x110(%rbp), %rdi
movq %rdi, %rsi
movq %rdi, %rbx
movq %r15, %rdx
movq %r13, %rcx
callq 0x6de40
movq %r15, %rdi
leaq -0xb0(%rbp), %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x71b60
leaq -0x410(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
leaq -0x1d0(%rbp), %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x71b60
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x6d6e0
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x6dec0
movq %r12, %rdi
leaq -0x290(%rbp), %rbx
movq %rbx, %rsi
leaq -0x230(%rbp), %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x71b60
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x6d6e0
movq %r12, %rdi
movq %r15, %rsi
callq 0x6064b
leaq -0x3b0(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x71b60
leaq -0x350(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x71b60
movq -0x30(%rbp), %rdi
leaq -0x110(%rbp), %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x71b60
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
movq %r15, %rdx
callq 0x65bdf
movl $0x120, %eax # imm = 0x120
addq %rax, %rbx
movq %rbx, %rdi
movq -0x40(%rbp), %rsi
movq %r15, %rdx
callq 0x65bdf
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x6636d
addq $0x448, %rsp # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| inverse_fp12:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 448h
mov rbx, rsi
mov [rbp+var_38], rsi
mov [rbp+var_48], rdi
lea r15, [rbp+var_230]
mov rdi, r15
call sqr_fp6
mov eax, 120h
lea rsi, [rbx+rax]
mov [rbp+var_40], rsi
lea rbx, [rbp+var_3B0]
mov rdi, rbx
call sqr_fp6
mov r12d, 0C0h
lea r14, [rbx+r12]
mov [rbp+var_30], r14
lea r13, BLS12_381_P
mov rdi, r14
mov rsi, r14
mov rdx, r13
call mul_by_1_plus_i_mod_384x
mov rdi, r15
mov rsi, r15
mov rdx, r14
mov rcx, r13
call _sub_mod_384x
lea rdi, [rbp+var_1D0]
mov rsi, rdi
mov rdx, rbx
mov rcx, r13
call _sub_mod_384x
add r12, r15
lea rdx, [rbp+var_350]
mov rdi, r12
mov rsi, r12
mov rcx, r13
call _sub_mod_384x
lea rbx, [rbp+var_290]
mov r14, 89F3FFFCFFFCFFFDh
mov rdi, rbx
mov rsi, r15
mov rdx, r13
mov rcx, r14
call sqr_mont_384x
lea r15, [rbp+var_470]
mov rdi, r15
lea rsi, [rbp+var_1D0]
mov rdx, r12
mov rcx, r13
mov r8, r14
call mul_mont_384x
mov rdi, r15
mov rsi, r15
mov rdx, r13
call mul_by_1_plus_i_mod_384x
mov rdi, rbx
mov rsi, rbx
mov rdx, r15
mov rcx, r13
call _sub_mod_384x
lea rbx, [rbp+var_B0]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, r14
call sqr_mont_384x
mov rdi, rbx
mov rsi, rbx
mov rdx, r13
call mul_by_1_plus_i_mod_384x
mov rdi, r15
lea rsi, [rbp+var_230]
lea rbx, [rbp+var_1D0]
mov rdx, rbx
mov rcx, r13
mov r8, r14
call mul_mont_384x
lea rdi, [rbp+var_B0]
mov rsi, rdi
mov rdx, r15
mov rcx, r13
call _sub_mod_384x
lea rdi, [rbp+var_110]
mov rsi, rbx
mov rdx, r13
mov rcx, r14
call sqr_mont_384x
mov rdi, r15
lea rsi, [rbp+var_230]
mov rdx, r12
mov rcx, r13
mov r8, r14
call mul_mont_384x
lea rdi, [rbp+var_110]
mov rsi, rdi
mov rbx, rdi
mov rdx, r15
mov rcx, r13
call _sub_mod_384x
mov rdi, r15
lea rsi, [rbp+var_B0]
mov rdx, r12
mov rcx, r13
mov r8, r14
call mul_mont_384x
lea r12, [rbp+var_410]
mov rdi, r12
mov rsi, rbx
lea rdx, [rbp+var_1D0]
mov rcx, r13
mov r8, r14
call mul_mont_384x
mov rdi, r15
mov rsi, r15
mov rdx, r12
mov rcx, r13
call add_mod_384x
mov rdi, r15
mov rsi, r15
mov rdx, r13
call mul_by_1_plus_i_mod_384x
mov rdi, r12
lea rbx, [rbp+var_290]
mov rsi, rbx
lea rdx, [rbp+var_230]
mov rcx, r13
mov r8, r14
call mul_mont_384x
mov rdi, r15
mov rsi, r15
mov rdx, r12
mov rcx, r13
call add_mod_384x
mov rdi, r12
mov rsi, r15
call reciprocal_fp2
lea r15, [rbp+var_3B0]
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov rcx, r13
mov r8, r14
call mul_mont_384x
lea rdi, [rbp+var_350]
lea rsi, [rbp+var_B0]
mov rdx, r12
mov rcx, r13
mov r8, r14
call mul_mont_384x
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_110]
mov rdx, r12
mov rcx, r13
mov r8, r14
call mul_mont_384x
mov rbx, [rbp+var_48]
mov rdi, rbx
mov rsi, [rbp+var_38]
mov rdx, r15
call mul_fp6
mov eax, 120h
add rbx, rax
mov rdi, rbx
mov rsi, [rbp+var_40]
mov rdx, r15
call mul_fp6
mov rdi, rbx
mov rsi, rbx
call neg_fp6
add rsp, 448h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long inverse_fp12(long long a1, long long a2)
{
long long v2; // rbx
_BYTE v4[96]; // [rsp+0h] [rbp-470h] BYREF
_BYTE v5[96]; // [rsp+60h] [rbp-410h] BYREF
_BYTE v6[96]; // [rsp+C0h] [rbp-3B0h] BYREF
_BYTE v7[96]; // [rsp+120h] [rbp-350h] BYREF
_BYTE v8[96]; // [rsp+180h] [rbp-2F0h] BYREF
_BYTE v9[96]; // [rsp+1E0h] [rbp-290h] BYREF
_BYTE v10[96]; // [rsp+240h] [rbp-230h] BYREF
_BYTE v11[96]; // [rsp+2A0h] [rbp-1D0h] BYREF
_BYTE v12[96]; // [rsp+300h] [rbp-170h] BYREF
_BYTE v13[96]; // [rsp+360h] [rbp-110h] BYREF
_BYTE v14[104]; // [rsp+3C0h] [rbp-B0h] BYREF
long long v15; // [rsp+428h] [rbp-48h]
long long v16; // [rsp+430h] [rbp-40h]
long long v17; // [rsp+438h] [rbp-38h]
_BYTE *v18; // [rsp+440h] [rbp-30h]
v17 = a2;
v15 = a1;
sqr_fp6(v10);
v16 = a2 + 288;
sqr_fp6(v6);
v18 = v8;
mul_by_1_plus_i_mod_384x(v8, v8, &BLS12_381_P);
sub_mod_384x(v10, v10, v8, &BLS12_381_P);
sub_mod_384x(v11, v11, v6, &BLS12_381_P);
sub_mod_384x(v12, v12, v7, &BLS12_381_P);
sqr_mont_384x(v9, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v4, v11, v12, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_by_1_plus_i_mod_384x(v4, v4, &BLS12_381_P);
sub_mod_384x(v9, v9, v4, &BLS12_381_P);
sqr_mont_384x(v14, v12, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_by_1_plus_i_mod_384x(v14, v14, &BLS12_381_P);
mul_mont_384x(v4, v10, v11, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sub_mod_384x(v14, v14, v4, &BLS12_381_P);
sqr_mont_384x(v13, v11, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v4, v10, v12, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sub_mod_384x(v13, v13, v4, &BLS12_381_P);
mul_mont_384x(v4, v14, v12, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v5, v13, v11, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384x(v4, v4, v5, &BLS12_381_P);
mul_by_1_plus_i_mod_384x(v4, v4, &BLS12_381_P);
mul_mont_384x(v5, v9, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384x(v4, v4, v5, &BLS12_381_P);
reciprocal_fp2(v5, v4);
mul_mont_384x(v6, v9, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v7, v14, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v18, v13, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v2 = v15;
mul_fp6(v15, v17, v6);
v2 += 288LL;
mul_fp6(v2, v16, v6);
return neg_fp6(v2, v2);
}
| inverse_fp12:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x448
MOV RBX,RSI
MOV qword ptr [RBP + -0x38],RSI
MOV qword ptr [RBP + -0x48],RDI
LEA R15,[RBP + -0x230]
MOV RDI,R15
CALL 0x00166415
MOV EAX,0x120
LEA RSI,[RBX + RAX*0x1]
MOV qword ptr [RBP + -0x40],RSI
LEA RBX,[RBP + -0x3b0]
MOV RDI,RBX
CALL 0x00166415
MOV R12D,0xc0
LEA R14,[RBX + R12*0x1]
MOV qword ptr [RBP + -0x30],R14
LEA R13,[0x18a910]
MOV RDI,R14
MOV RSI,R14
MOV RDX,R13
CALL 0x0016dec0
MOV RDI,R15
MOV RSI,R15
MOV RDX,R14
MOV RCX,R13
CALL 0x0016de40
LEA RDI,[RBP + -0x1d0]
MOV RSI,RDI
MOV RDX,RBX
MOV RCX,R13
CALL 0x0016de40
ADD R12,R15
LEA RDX,[RBP + -0x350]
MOV RDI,R12
MOV RSI,R12
MOV RCX,R13
CALL 0x0016de40
LEA RBX,[RBP + -0x290]
MOV R14,-0x760c000300030003
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
MOV RCX,R14
CALL 0x00171ca0
LEA R15,[RBP + -0x470]
MOV RDI,R15
LEA RSI,[RBP + -0x1d0]
MOV RDX,R12
MOV RCX,R13
MOV R8,R14
CALL 0x00171b60
MOV RDI,R15
MOV RSI,R15
MOV RDX,R13
CALL 0x0016dec0
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R13
CALL 0x0016de40
LEA RBX,[RBP + -0xb0]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
CALL 0x00171ca0
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R13
CALL 0x0016dec0
MOV RDI,R15
LEA RSI,[RBP + -0x230]
LEA RBX,[RBP + -0x1d0]
MOV RDX,RBX
MOV RCX,R13
MOV R8,R14
CALL 0x00171b60
LEA RDI,[RBP + -0xb0]
MOV RSI,RDI
MOV RDX,R15
MOV RCX,R13
CALL 0x0016de40
LEA RDI,[RBP + -0x110]
MOV RSI,RBX
MOV RDX,R13
MOV RCX,R14
CALL 0x00171ca0
MOV RDI,R15
LEA RSI,[RBP + -0x230]
MOV RDX,R12
MOV RCX,R13
MOV R8,R14
CALL 0x00171b60
LEA RDI,[RBP + -0x110]
MOV RSI,RDI
MOV RBX,RDI
MOV RDX,R15
MOV RCX,R13
CALL 0x0016de40
MOV RDI,R15
LEA RSI,[RBP + -0xb0]
MOV RDX,R12
MOV RCX,R13
MOV R8,R14
CALL 0x00171b60
LEA R12,[RBP + -0x410]
MOV RDI,R12
MOV RSI,RBX
LEA RDX,[RBP + -0x1d0]
MOV RCX,R13
MOV R8,R14
CALL 0x00171b60
MOV RDI,R15
MOV RSI,R15
MOV RDX,R12
MOV RCX,R13
CALL 0x0016d6e0
MOV RDI,R15
MOV RSI,R15
MOV RDX,R13
CALL 0x0016dec0
MOV RDI,R12
LEA RBX,[RBP + -0x290]
MOV RSI,RBX
LEA RDX,[RBP + -0x230]
MOV RCX,R13
MOV R8,R14
CALL 0x00171b60
MOV RDI,R15
MOV RSI,R15
MOV RDX,R12
MOV RCX,R13
CALL 0x0016d6e0
MOV RDI,R12
MOV RSI,R15
CALL 0x0016064b
LEA R15,[RBP + -0x3b0]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV RCX,R13
MOV R8,R14
CALL 0x00171b60
LEA RDI,[RBP + -0x350]
LEA RSI,[RBP + -0xb0]
MOV RDX,R12
MOV RCX,R13
MOV R8,R14
CALL 0x00171b60
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x110]
MOV RDX,R12
MOV RCX,R13
MOV R8,R14
CALL 0x00171b60
MOV RBX,qword ptr [RBP + -0x48]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R15
CALL 0x00165bdf
MOV EAX,0x120
ADD RBX,RAX
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R15
CALL 0x00165bdf
MOV RDI,RBX
MOV RSI,RBX
CALL 0x0016636d
ADD RSP,0x448
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void inverse_fp12(long param_1,long param_2)
{
long lVar1;
int1 local_478 [96];
int1 local_418 [96];
int1 local_3b8 [96];
int1 local_358 [96];
int1 local_2f8 [96];
int1 local_298 [96];
int1 local_238 [96];
int1 local_1d8 [96];
int1 auStack_178 [96];
int1 local_118 [96];
int1 local_b8 [104];
long local_50;
long local_48;
long local_40;
int1 *local_38;
local_50 = param_1;
local_40 = param_2;
sqr_fp6(local_238);
local_48 = param_2 + 0x120;
sqr_fp6(local_3b8);
local_38 = local_2f8;
mul_by_1_plus_i_mod_384x(local_2f8,local_2f8,BLS12_381_P);
sub_mod_384x(local_238,local_238,local_2f8,BLS12_381_P);
sub_mod_384x(local_1d8,local_1d8,local_3b8,BLS12_381_P);
sub_mod_384x(auStack_178,auStack_178,local_358,BLS12_381_P);
sqr_mont_384x(local_298,local_238,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_478,local_1d8,auStack_178,BLS12_381_P,0x89f3fffcfffcfffd);
mul_by_1_plus_i_mod_384x(local_478,local_478,BLS12_381_P);
sub_mod_384x(local_298,local_298,local_478,BLS12_381_P);
sqr_mont_384x(local_b8,auStack_178,BLS12_381_P,0x89f3fffcfffcfffd);
mul_by_1_plus_i_mod_384x(local_b8,local_b8,BLS12_381_P);
mul_mont_384x(local_478,local_238,local_1d8,BLS12_381_P,0x89f3fffcfffcfffd);
sub_mod_384x(local_b8,local_b8,local_478,BLS12_381_P);
sqr_mont_384x(local_118,local_1d8,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_478,local_238,auStack_178,BLS12_381_P,0x89f3fffcfffcfffd);
sub_mod_384x(local_118,local_118,local_478,BLS12_381_P);
mul_mont_384x(local_478,local_b8,auStack_178,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_418,local_118,local_1d8,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384x(local_478,local_478,local_418,BLS12_381_P);
mul_by_1_plus_i_mod_384x(local_478,local_478,BLS12_381_P);
mul_mont_384x(local_418,local_298,local_238,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384x(local_478,local_478,local_418,BLS12_381_P);
reciprocal_fp2(local_418,local_478);
mul_mont_384x(local_3b8,local_298,local_418,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_358,local_b8,local_418,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_38,local_118,local_418,BLS12_381_P,0x89f3fffcfffcfffd);
lVar1 = local_50;
mul_fp6(local_50,local_40,local_3b8);
lVar1 = lVar1 + 0x120;
mul_fp6(lVar1,local_48,local_3b8);
neg_fp6(lVar1,lVar1);
return;
}
| |
40,731 | pfs_unlock_mutex_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_unlock_mutex_v1(PSI_mutex *mutex)
{
PFS_mutex *pfs_mutex= reinterpret_cast<PFS_mutex*> (mutex);
assert(pfs_mutex != NULL);
/*
Note that this code is still protected by the instrumented mutex,
and therefore is thread safe. See inline_mysql_mutex_unlock().
*/
/* Always update the instrumented state */
pfs_mutex->m_owner= NULL;
pfs_mutex->m_last_locked= 0;
#ifdef LATER_WL2333
/*
See WL#2333: SHOW ENGINE ... LOCK STATUS.
PFS_mutex::m_lock_stat is not exposed in user visible tables
currently, so there is no point spending time computing it.
*/
if (! pfs_mutex->m_enabled)
return;
if (! pfs_mutex->m_timed)
return;
ulonglong locked_time;
locked_time= get_timer_pico_value(wait_timer) - pfs_mutex->m_last_locked;
pfs_mutex->m_mutex_stat.m_lock_stat.aggregate_value(locked_time);
#endif
} | O0 | cpp | pfs_unlock_mutex_v1:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
popq %rbp
retq
nopw (%rax,%rax)
| pfs_unlock_mutex_v1:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov qword ptr [rax+40h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+48h], 0
pop rbp
retn
| long long pfs_unlock_mutex_v1(long long a1)
{
long long result; // rax
*(_QWORD *)(a1 + 64) = 0LL;
result = a1;
*(_QWORD *)(a1 + 72) = 0LL;
return result;
}
| pfs_unlock_mutex_v1:
PUSH RBP
MOV RBP,RSP
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 qword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x48],0x0
POP RBP
RET
|
void pfs_unlock_mutex_v1(long param_1)
{
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
return;
}
| |
40,732 | my_default_csname | eloqsql/mysys/charset.c | const char* my_default_csname()
{
const char* csname = NULL;
#ifdef _WIN32
char cpbuf[64];
int cp = GetConsoleCP();
if (cp == 0)
cp = GetACP();
snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp);
csname = my_os_charset_to_mysql_charset(cpbuf);
#elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO)
if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET)))
csname = my_os_charset_to_mysql_charset(csname);
#endif
return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME;
} | O0 | c | my_default_csname:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x8(%rbp)
xorl %edi, %edi
leaq 0x7b0eb(%rip), %rsi # 0x157ca4
callq 0x2a600
cmpq $0x0, %rax
je 0xdcbe5
movl $0xe, %edi
callq 0x2a5a0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0xdcbe5
movq -0x8(%rbp), %rdi
callq 0xdcc10
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xdcbf6
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xdcc03
leaq 0x772de(%rip), %rax # 0x153edb
movq %rax, -0x10(%rbp)
jmp 0xdcc03
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_default_csname:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], 0
xor edi, edi
lea rsi, asc_157CA0+4; ""
call _setlocale
cmp rax, 0
jz short loc_DCBE5
mov edi, 0Eh
call _nl_langinfo
mov [rbp+var_8], rax
cmp rax, 0
jz short loc_DCBE5
mov rdi, [rbp+var_8]
call my_os_charset_to_mysql_charset
mov [rbp+var_8], rax
loc_DCBE5:
cmp [rbp+var_8], 0
jz short loc_DCBF6
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
jmp short loc_DCC03
loc_DCBF6:
lea rax, aLatin1; "latin1"
mov [rbp+var_10], rax
jmp short $+2
loc_DCC03:
mov rax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
| const char *my_default_csname()
{
long long v2; // [rsp+8h] [rbp-8h]
v2 = 0LL;
if ( setlocale(0LL, "") )
{
v2 = nl_langinfo(14LL);
if ( v2 )
v2 = my_os_charset_to_mysql_charset(v2);
}
if ( v2 )
return (const char *)v2;
else
return "latin1";
}
| my_default_csname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],0x0
XOR EDI,EDI
LEA RSI,[0x257ca4]
CALL 0x0012a600
CMP RAX,0x0
JZ 0x001dcbe5
MOV EDI,0xe
CALL 0x0012a5a0
MOV qword ptr [RBP + -0x8],RAX
CMP RAX,0x0
JZ 0x001dcbe5
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001dcc10
MOV qword ptr [RBP + -0x8],RAX
LAB_001dcbe5:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001dcbf6
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001dcc03
LAB_001dcbf6:
LEA RAX,[0x253edb]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001dcc03
LAB_001dcc03:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
char * my_default_csname(void)
{
char *pcVar1;
char *local_18;
char *local_10;
local_10 = (char *)0x0;
pcVar1 = setlocale(0,"");
if (pcVar1 != (char *)0x0) {
local_10 = nl_langinfo(0xe);
if (local_10 != (char *)0x0) {
local_10 = (char *)my_os_charset_to_mysql_charset(local_10);
}
}
if (local_10 == (char *)0x0) {
local_18 = "latin1";
}
else {
local_18 = local_10;
}
return local_18;
}
| |
40,733 | mthd_stmt_read_prepare_response | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool mthd_stmt_read_prepare_response(MYSQL_STMT *stmt)
{
ulong packet_length;
uchar *p;
if ((packet_length= ma_net_safe_read(stmt->mysql)) == packet_error)
return(1);
p= (uchar *)stmt->mysql->net.read_pos;
if (0xFF == p[0]) /* Error occurred */
{
return(1);
}
p++;
stmt->stmt_id= uint4korr(p);
p+= 4;
stmt->field_count= uint2korr(p);
p+= 2;
stmt->param_count= uint2korr(p);
p+= 2;
/* filler */
p++;
/* for backward compatibility we also update mysql->warning_count */
stmt->mysql->warning_count= stmt->upsert_status.warning_count= uint2korr(p);
/* metadata not supported yet */
if (stmt->param_count &&
stmt->mysql->methods->db_stmt_get_param_metadata(stmt))
{
return 1;
}
/* allocated bind buffer for parameters */
if (stmt->field_count &&
stmt->mysql->methods->db_stmt_get_result_metadata(stmt))
{
return 1;
}
if (stmt->param_count)
{
if (stmt->prebind_params)
{
if (stmt->prebind_params != stmt->param_count)
{
SET_CLIENT_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0);
stmt->param_count= stmt->prebind_params;
return 1;
}
} else {
if (!(stmt->params= (MYSQL_BIND *)ma_alloc_root(&stmt->mem_root, stmt->param_count * sizeof(MYSQL_BIND))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return 1;
}
memset(stmt->params, '\0', stmt->param_count * sizeof(MYSQL_BIND));
}
}
/* allocated bind buffer for result */
if (stmt->field_count)
{
MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root;
if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return 1;
}
memset(stmt->bind, 0, sizeof(MYSQL_BIND) * stmt->field_count);
}
stmt->state = MYSQL_STMT_PREPARED;
return(0);
} | O0 | c | mthd_stmt_read_prepare_response:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x18050
movq %rax, -0x18(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x2c6b0
movb $0x1, -0x1(%rbp)
jmp 0x2ca70
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %ecx
movl $0xff, %eax
cmpl %ecx, %eax
jne 0x2c6d9
movb $0x1, -0x1(%rbp)
jmp 0x2ca70
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x20(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x18, %ecx
addl %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xf0(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl %ecx, 0x388(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x2c800
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x2c800
movb $0x1, -0x1(%rbp)
jmp 0x2ca70
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x2c834
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x2c834
movb $0x1, -0x1(%rbp)
jmp 0x2ca70
movq -0x10(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x2c99d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x378(%rax)
je 0x2c8f1
movq -0x10(%rbp), %rax
movl 0x378(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x64(%rcx), %eax
je 0x2c8ec
jmp 0x2c86c
movq -0x10(%rbp), %rax
movl $0x7f2, 0x108(%rax) # imm = 0x7F2
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x35744(%rip), %rax # 0x61fd0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x3572a(%rip), %rax # 0x61fe0
movq 0x110(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movq -0x10(%rbp), %rax
movl 0x378(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x64(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x2ca70
jmp 0x2c99b
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
imulq $0x70, %rax, %rsi
callq 0x26d50
movq -0x10(%rbp), %rcx
movq %rax, 0x70(%rcx)
cmpq $0x0, %rax
jne 0x2c981
jmp 0x2c915
movq -0x10(%rbp), %rax
movl $0x7d8, 0x108(%rax) # imm = 0x7D8
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x3569b(%rip), %rax # 0x61fd0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x35681(%rip), %rax # 0x61fe0
movq 0x40(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x2ca70
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x64(%rax), %eax
imulq $0x70, %rax, %rdx
xorl %esi, %esi
callq 0x13250
jmp 0x2c99d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x2ca61
movq -0x10(%rbp), %rax
movq 0x340(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
imulq $0x70, %rax, %rsi
callq 0x26d50
movq -0x10(%rbp), %rcx
movq %rax, 0x78(%rcx)
cmpq $0x0, %rax
jne 0x2ca47
jmp 0x2c9de
movq -0x10(%rbp), %rax
movl $0x7d8, 0x108(%rax) # imm = 0x7D8
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x355d2(%rip), %rax # 0x61fd0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x355b8(%rip), %rax # 0x61fe0
movq 0x40(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x2ca70
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x60(%rax), %eax
imulq $0x70, %rax, %rdx
xorl %esi, %esi
callq 0x13250
movq -0x10(%rbp), %rax
movl $0x1, 0x50(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| mthd_stmt_read_prepare_response:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call ma_net_safe_read
mov [rbp+var_18], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_2C6B0
mov [rbp+var_1], 1
jmp loc_2CA70
loc_2C6B0:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+20h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax]
mov eax, 0FFh
cmp eax, ecx
jnz short loc_2C6D9
mov [rbp+var_1], 1
jmp loc_2CA70
loc_2C6D9:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+3]
shl ecx, 18h
add eax, ecx
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov rax, [rbp+var_20]
add rax, 4
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+60h], ecx
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+64h], ecx
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+0F0h], ecx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rax+388h], ecx
mov rax, [rbp+var_10]
cmp dword ptr [rax+64h], 0
jz short loc_2C800
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+58h]
mov rdi, [rbp+var_10]
call rax
movsx eax, al
cmp eax, 0
jz short loc_2C800
mov [rbp+var_1], 1
jmp loc_2CA70
loc_2C800:
mov rax, [rbp+var_10]
cmp dword ptr [rax+60h], 0
jz short loc_2C834
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+50h]
mov rdi, [rbp+var_10]
call rax
movsx eax, al
cmp eax, 0
jz short loc_2C834
mov [rbp+var_1], 1
jmp loc_2CA70
loc_2C834:
mov rax, [rbp+var_10]
cmp dword ptr [rax+64h], 0
jz loc_2C99D
mov rax, [rbp+var_10]
cmp dword ptr [rax+378h], 0
jz loc_2C8F1
mov rax, [rbp+var_10]
mov eax, [rax+378h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+64h]
jz loc_2C8EC
jmp short $+2
loc_2C86C:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7F2h
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+110h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov rax, [rbp+var_10]
mov ecx, [rax+378h]
mov rax, [rbp+var_10]
mov [rax+64h], ecx
mov [rbp+var_1], 1
jmp loc_2CA70
loc_2C8EC:
jmp loc_2C99B
loc_2C8F1:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov eax, [rax+64h]
imul rsi, rax, 70h ; 'p'
call ma_alloc_root
mov rcx, [rbp+var_10]
mov [rcx+70h], rax
cmp rax, 0
jnz short loc_2C981
jmp short $+2
loc_2C915:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7D8h
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_1], 1
jmp loc_2CA70
loc_2C981:
mov rax, [rbp+var_10]
mov rdi, [rax+70h]
mov rax, [rbp+var_10]
mov eax, [rax+64h]
imul rdx, rax, 70h ; 'p'
xor esi, esi
call _memset
loc_2C99B:
jmp short $+2
loc_2C99D:
mov rax, [rbp+var_10]
cmp dword ptr [rax+60h], 0
jz loc_2CA61
mov rax, [rbp+var_10]
mov rax, [rax+340h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
mov rax, [rbp+var_10]
mov eax, [rax+60h]
imul rsi, rax, 70h ; 'p'
call ma_alloc_root
mov rcx, [rbp+var_10]
mov [rcx+78h], rax
cmp rax, 0
jnz short loc_2CA47
jmp short $+2
loc_2C9DE:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7D8h
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_1], 1
jmp short loc_2CA70
loc_2CA47:
mov rax, [rbp+var_10]
mov rdi, [rax+78h]
mov rax, [rbp+var_10]
mov eax, [rax+60h]
imul rdx, rax, 70h ; 'p'
xor esi, esi
call _memset
loc_2CA61:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 1
mov [rbp+var_1], 0
loc_2CA70:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char mthd_stmt_read_prepare_response(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
int v6; // ecx
char *v7; // rax
char *v8; // rax
unsigned __int8 *v10; // [rsp+10h] [rbp-20h]
unsigned __int8 *v11; // [rsp+10h] [rbp-20h]
if ( ma_net_safe_read(*(_QWORD *)(a1 + 56), a2, a3, a4, a5, a6) != 0xFFFFFFFFLL )
{
v10 = *(unsigned __int8 **)(*(_QWORD *)(a1 + 56) + 32LL);
if ( *v10 == 255 )
return 1;
v11 = v10 + 1;
*(_QWORD *)(a1 + 64) = (v11[3] << 24) + (v11[2] << 16) + (v11[1] << 8) + (unsigned int)*v11;
v11 += 4;
*(_DWORD *)(a1 + 96) = (unsigned __int16)((v11[1] << 8) + *v11);
v11 += 2;
*(_DWORD *)(a1 + 100) = (unsigned __int16)((v11[1] << 8) + *v11);
v6 = (unsigned __int16)((v11[4] << 8) + v11[3]);
*(_DWORD *)(a1 + 240) = v6;
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 904LL) = v6;
if ( *(_DWORD *)(a1 + 100)
&& (*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 88LL))(a1) )
{
return 1;
}
if ( *(_DWORD *)(a1 + 96)
&& (*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 80LL))(a1) )
{
return 1;
}
if ( *(_DWORD *)(a1 + 100) )
{
if ( *(_DWORD *)(a1 + 888) )
{
if ( *(_DWORD *)(a1 + 888) != *(_DWORD *)(a1 + 100) )
{
*(_DWORD *)(a1 + 264) = 2034;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[34], 512LL);
*(_BYTE *)(a1 + 779) = 0;
*(_DWORD *)(a1 + 100) = *(_DWORD *)(a1 + 888);
return 1;
}
}
else
{
v7 = ma_alloc_root((_QWORD **)a1, 112LL * *(unsigned int *)(a1 + 100));
*(_QWORD *)(a1 + 112) = v7;
if ( !v7 )
goto LABEL_17;
memset(*(_QWORD *)(a1 + 112), 0LL, 112LL * *(unsigned int *)(a1 + 100));
}
}
if ( !*(_DWORD *)(a1 + 96) )
{
LABEL_22:
*(_DWORD *)(a1 + 80) = 1;
return 0;
}
v8 = ma_alloc_root(*(_QWORD ***)(a1 + 832), 112LL * *(unsigned int *)(a1 + 96));
*(_QWORD *)(a1 + 120) = v8;
if ( v8 )
{
memset(*(_QWORD *)(a1 + 120), 0LL, 112LL * *(unsigned int *)(a1 + 96));
goto LABEL_22;
}
LABEL_17:
*(_DWORD *)(a1 + 264) = 2008;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[8], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
return 1;
}
| mthd_stmt_read_prepare_response:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x00118050
MOV qword ptr [RBP + -0x18],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x0012c6b0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012ca70
LAB_0012c6b0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX]
MOV EAX,0xff
CMP EAX,ECX
JNZ 0x0012c6d9
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012ca70
LAB_0012c6d9:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x18
ADD EAX,ECX
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x60],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x64],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xf0],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x388],ECX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x64],0x0
JZ 0x0012c800
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x58]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0012c800
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012ca70
LAB_0012c800:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x60],0x0
JZ 0x0012c834
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x50]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0012c834
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012ca70
LAB_0012c834:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x64],0x0
JZ 0x0012c99d
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x378],0x0
JZ 0x0012c8f1
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x378]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x64]
JZ 0x0012c8ec
JMP 0x0012c86c
LAB_0012c86c:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7f2
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x161fd0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x161fe0]
MOV RSI,qword ptr [RAX + 0x110]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x378]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x64],ECX
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012ca70
LAB_0012c8ec:
JMP 0x0012c99b
LAB_0012c8f1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x64]
IMUL RSI,RAX,0x70
CALL 0x00126d50
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x70],RAX
CMP RAX,0x0
JNZ 0x0012c981
JMP 0x0012c915
LAB_0012c915:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7d8
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x161fd0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x161fe0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012ca70
LAB_0012c981:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x70]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x64]
IMUL RDX,RAX,0x70
XOR ESI,ESI
CALL 0x00113250
LAB_0012c99b:
JMP 0x0012c99d
LAB_0012c99d:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x60],0x0
JZ 0x0012ca61
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x340]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x60]
IMUL RSI,RAX,0x70
CALL 0x00126d50
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x78],RAX
CMP RAX,0x0
JNZ 0x0012ca47
JMP 0x0012c9de
LAB_0012c9de:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7d8
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x161fd0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x161fe0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012ca70
LAB_0012ca47:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x60]
IMUL RDX,RAX,0x70
XOR ESI,ESI
CALL 0x00113250
LAB_0012ca61:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x1
MOV byte ptr [RBP + -0x1],0x0
LAB_0012ca70:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 mthd_stmt_read_prepare_response(long param_1)
{
char *pcVar1;
char cVar2;
long lVar3;
uint uVar4;
int1 local_9;
lVar3 = ma_net_safe_read(*(int8 *)(param_1 + 0x38));
if (lVar3 == 0xffffffff) {
local_9 = 1;
}
else {
pcVar1 = *(char **)(*(long *)(param_1 + 0x38) + 0x20);
if (*pcVar1 == -1) {
local_9 = 1;
}
else {
*(ulong *)(param_1 + 0x40) =
(ulong)((uint)(byte)pcVar1[1] + (uint)(byte)pcVar1[2] * 0x100 +
(uint)(byte)pcVar1[3] * 0x10000 + (uint)(byte)pcVar1[4] * 0x1000000);
*(uint *)(param_1 + 0x60) = (uint)(byte)pcVar1[5] + (uint)(byte)pcVar1[6] * 0x100 & 0xffff;
*(uint *)(param_1 + 100) = (uint)(byte)pcVar1[7] + (uint)(byte)pcVar1[8] * 0x100 & 0xffff;
uVar4 = (uint)(byte)pcVar1[10] + (uint)(byte)pcVar1[0xb] * 0x100 & 0xffff;
*(uint *)(param_1 + 0xf0) = uVar4;
*(uint *)(*(long *)(param_1 + 0x38) + 0x388) = uVar4;
if ((*(int *)(param_1 + 100) == 0) ||
(cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x58))(param_1),
cVar2 == '\0')) {
if ((*(int *)(param_1 + 0x60) == 0) ||
(cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x50))(param_1),
cVar2 == '\0')) {
if (*(int *)(param_1 + 100) != 0) {
if (*(int *)(param_1 + 0x378) == 0) {
lVar3 = ma_alloc_root(param_1);
*(long *)(param_1 + 0x70) = lVar3;
if (lVar3 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_00162020,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
memset(*(void **)(param_1 + 0x70),0,(ulong)*(uint *)(param_1 + 100) * 0x70);
}
else if (*(int *)(param_1 + 0x378) != *(int *)(param_1 + 100)) {
*(int4 *)(param_1 + 0x108) = 0x7f2;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Invalid_parameter_number_001620f0,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
*(int4 *)(param_1 + 100) = *(int4 *)(param_1 + 0x378);
return 1;
}
}
if (*(int *)(param_1 + 0x60) != 0) {
lVar3 = ma_alloc_root(*(int8 *)(param_1 + 0x340));
*(long *)(param_1 + 0x78) = lVar3;
if (lVar3 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_00162020,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
memset(*(void **)(param_1 + 0x78),0,(ulong)*(uint *)(param_1 + 0x60) * 0x70);
}
*(int4 *)(param_1 + 0x50) = 1;
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 1;
}
}
}
return local_9;
}
| |
40,734 | my_casedn_str_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->casedn_multiply == 1);
while (*src &&
(srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_tolower_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
/*
In rare cases lower string can be shorter than
the original string, for example:
"U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE"
(which is 0xC4B0 in utf8mb3, i.e. two bytes)
is converted into
"U+0069 LATIN SMALL LETTER I"
(which is 0x69 in utf8mb3, i.e. one byte)
So, we need to put '\0' terminator after converting.
*/
*dst= '\0';
return (size_t) (dst - dst0);
} | O0 | c | my_casedn_str_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x6db4e
jmp 0x6db50
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0x6db7e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rsi
callq 0x6e8e0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x6db87
jmp 0x6dbd6
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x6eba0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x6eaa0
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jg 0x6dbaf
jmp 0x6dbd6
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x6db50
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| my_casedn_str_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_38], rax
jmp short $+2
loc_6DB4E:
jmp short $+2
loc_6DB50:
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_39], al
jz short loc_6DB7E
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
lea rsi, [rbp+var_18]
call my_utf8mb3_uni_no_range
mov [rbp+var_1C], eax
cmp eax, 0
setnle al
mov [rbp+var_39], al
loc_6DB7E:
mov al, [rbp+var_39]
test al, 1
jnz short loc_6DB87
jmp short loc_6DBD6
loc_6DB87:
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_18]
call my_tolower_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call my_uni_utf8mb3_no_range
mov [rbp+var_20], eax
cmp eax, 0
jg short loc_6DBAF
jmp short loc_6DBD6
loc_6DBAF:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_20]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp loc_6DB50
loc_6DBD6:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
sub rax, rcx
add rsp, 40h
pop rbp
retn
| _BYTE * my_casedn_str_utf8mb3(long long a1, _BYTE *a2)
{
bool v3; // [rsp+7h] [rbp-39h]
long long v4; // [rsp+8h] [rbp-38h]
_BYTE *v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+20h] [rbp-20h]
int v7; // [rsp+24h] [rbp-1Ch]
long long v8; // [rsp+28h] [rbp-18h] BYREF
_BYTE *v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+38h] [rbp-8h]
v10 = a1;
v9 = a2;
v5 = a2;
v4 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v3 = 0;
if ( *v9 )
{
v7 = my_utf8mb3_uni_no_range(v10, &v8, v9);
v3 = v7 > 0;
}
if ( !v3 )
break;
my_tolower_utf8mb3(v4, &v8);
v6 = my_uni_utf8mb3_no_range(v10, v8, v5);
if ( v6 <= 0 )
break;
v9 += v7;
v5 += v6;
}
*v5 = 0;
return (_BYTE *)(v5 - a2);
}
| my_casedn_str_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0016db4e
LAB_0016db4e:
JMP 0x0016db50
LAB_0016db50:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x0016db7e
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x0016e8e0
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_0016db7e:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x0016db87
JMP 0x0016dbd6
LAB_0016db87:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x18]
CALL 0x0016eba0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0016eaa0
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JG 0x0016dbaf
JMP 0x0016dbd6
LAB_0016dbaf:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0016db50
LAB_0016dbd6:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_casedn_str_utf8mb3(long param_1,char *param_2)
{
int8 uVar1;
bool bVar2;
int iVar3;
char *local_30;
int local_24;
int8 local_20;
char *local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_2;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (*local_18 != '\0') {
local_24 = my_utf8mb3_uni_no_range(local_10,&local_20,local_18);
bVar2 = 0 < local_24;
}
if (!bVar2) break;
my_tolower_utf8mb3(uVar1,&local_20);
iVar3 = my_uni_utf8mb3_no_range(local_10,local_20,local_30);
if (iVar3 < 1) break;
local_18 = local_18 + local_24;
local_30 = local_30 + iVar3;
}
*local_30 = '\0';
return (long)local_30 - (long)param_2;
}
| |
40,735 | translog_first_file | eloqsql/storage/maria/ma_loghandler.c | static uint32 translog_first_file(TRANSLOG_ADDRESS horizon, int is_protected)
{
uint min_file= 0, max_file;
DBUG_ENTER("translog_first_file");
if (!is_protected)
mysql_mutex_lock(&log_descriptor.purger_lock);
if (log_descriptor.min_file_number &&
translog_is_file(log_descriptor.min_file_number))
{
DBUG_PRINT("info", ("cached %lu",
(ulong) log_descriptor.min_file_number));
if (!is_protected)
mysql_mutex_unlock(&log_descriptor.purger_lock);
DBUG_RETURN(log_descriptor.min_file_number);
}
max_file= LSN_FILE_NO(horizon);
/* binary search for last file */
while (min_file != max_file && min_file != (max_file - 1))
{
uint test= (min_file + max_file) / 2;
DBUG_PRINT("info", ("min_file: %u test: %u max_file: %u",
min_file, test, max_file));
if (test == max_file)
test--;
if (translog_is_file(test))
max_file= test;
else
min_file= test;
}
log_descriptor.min_file_number= max_file;
if (!is_protected)
mysql_mutex_unlock(&log_descriptor.purger_lock);
DBUG_PRINT("info", ("first file :%lu", (ulong) max_file));
DBUG_ASSERT(max_file >= 1);
DBUG_RETURN(max_file);
} | O0 | c | translog_first_file:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2ff9b
leaq 0x448ced(%rip), %rdi # 0x478c70
addq $0x800e80, %rdi # imm = 0x800E80
leaq 0x121679(%rip), %rsi # 0x15160a
movl $0x20f1, %edx # imm = 0x20F1
callq 0x2dd80
cmpl $0x0, 0xc49b4a(%rip) # 0xc79aec
je 0x2ffe4
movl 0xc49b42(%rip), %edi # 0xc79aec
callq 0x34f60
movsbl %al, %eax
cmpl $0x0, %eax
je 0x2ffe4
jmp 0x2ffb9
jmp 0x2ffbb
cmpl $0x0, -0x14(%rbp)
jne 0x2ffd4
leaq 0x448ca8(%rip), %rdi # 0x478c70
addq $0x800e80, %rdi # imm = 0x800E80
callq 0x2ddf0
jmp 0x2ffd6
movl 0xc49b10(%rip), %eax # 0xc79aec
movl %eax, -0x4(%rbp)
jmp 0x30082
movq -0x10(%rbp), %rax
sarq $0x20, %rax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %ecx
xorl %eax, %eax
cmpl -0x1c(%rbp), %ecx
movb %al, -0x21(%rbp)
je 0x3000d
movl -0x18(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x30016
jmp 0x30050
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
shrl %eax
movl %eax, -0x20(%rbp)
jmp 0x30023
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x30034
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edi
callq 0x34f60
cmpb $0x0, %al
je 0x30048
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x3004e
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x2ffef
movl -0x1c(%rbp), %eax
movl %eax, 0xc49a93(%rip) # 0xc79aec
cmpl $0x0, -0x14(%rbp)
jne 0x30072
leaq 0x448c0a(%rip), %rdi # 0x478c70
addq $0x800e80, %rdi # imm = 0x800E80
callq 0x2ddf0
jmp 0x30074
jmp 0x30076
jmp 0x30078
jmp 0x3007a
jmp 0x3007c
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| translog_first_file:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], 0
cmp [rbp+var_14], 0
jnz short loc_2FF9B
lea rdi, log_descriptor
add rdi, 800E80h
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 20F1h
call inline_mysql_mutex_lock
loc_2FF9B:
cmp cs:dword_C79AEC, 0
jz short loc_2FFE4
mov edi, cs:dword_C79AEC
call translog_is_file
movsx eax, al
cmp eax, 0
jz short loc_2FFE4
jmp short $+2
loc_2FFB9:
jmp short $+2
loc_2FFBB:
cmp [rbp+var_14], 0
jnz short loc_2FFD4
lea rdi, log_descriptor
add rdi, 800E80h
call inline_mysql_mutex_unlock
loc_2FFD4:
jmp short $+2
loc_2FFD6:
mov eax, cs:dword_C79AEC
mov [rbp+var_4], eax
jmp loc_30082
loc_2FFE4:
mov rax, [rbp+var_10]
sar rax, 20h
mov [rbp+var_1C], eax
loc_2FFEF:
mov ecx, [rbp+var_18]
xor eax, eax
cmp ecx, [rbp+var_1C]
mov [rbp+var_21], al
jz short loc_3000D
mov eax, [rbp+var_18]
mov ecx, [rbp+var_1C]
sub ecx, 1
cmp eax, ecx
setnz al
mov [rbp+var_21], al
loc_3000D:
mov al, [rbp+var_21]
test al, 1
jnz short loc_30016
jmp short loc_30050
loc_30016:
mov eax, [rbp+var_18]
add eax, [rbp+var_1C]
shr eax, 1
mov [rbp+var_20], eax
jmp short $+2
loc_30023:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_1C]
jnz short loc_30034
mov eax, [rbp+var_20]
add eax, 0FFFFFFFFh
mov [rbp+var_20], eax
loc_30034:
mov edi, [rbp+var_20]
call translog_is_file
cmp al, 0
jz short loc_30048
mov eax, [rbp+var_20]
mov [rbp+var_1C], eax
jmp short loc_3004E
loc_30048:
mov eax, [rbp+var_20]
mov [rbp+var_18], eax
loc_3004E:
jmp short loc_2FFEF
loc_30050:
mov eax, [rbp+var_1C]
mov cs:dword_C79AEC, eax
cmp [rbp+var_14], 0
jnz short loc_30072
lea rdi, log_descriptor
add rdi, 800E80h
call inline_mysql_mutex_unlock
loc_30072:
jmp short $+2
loc_30074:
jmp short $+2
loc_30076:
jmp short $+2
loc_30078:
jmp short $+2
loc_3007A:
jmp short $+2
loc_3007C:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_30082:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long translog_first_file(long long a1, int a2)
{
bool v3; // [rsp+Fh] [rbp-21h]
unsigned int v4; // [rsp+10h] [rbp-20h]
unsigned int v5; // [rsp+14h] [rbp-1Ch]
unsigned int v6; // [rsp+18h] [rbp-18h]
v6 = 0;
if ( !a2 )
inline_mysql_mutex_lock(
(long long)&log_descriptor[1049040],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x20F1u);
if ( dword_C79AEC && (unsigned __int8)translog_is_file((unsigned int)dword_C79AEC) )
{
if ( !a2 )
inline_mysql_mutex_unlock((long long)&log_descriptor[1049040]);
return (unsigned int)dword_C79AEC;
}
else
{
v5 = HIDWORD(a1);
while ( 1 )
{
v3 = 0;
if ( v6 != v5 )
v3 = v6 != v5 - 1;
if ( !v3 )
break;
v4 = (v5 + v6) >> 1;
if ( v4 == v5 )
--v4;
if ( (unsigned __int8)translog_is_file(v4) )
v5 = v4;
else
v6 = v4;
}
dword_C79AEC = v5;
if ( !a2 )
inline_mysql_mutex_unlock((long long)&log_descriptor[1049040]);
return v5;
}
}
| translog_first_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],0x0
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x0012ff9b
LEA RDI,[0x578c70]
ADD RDI,0x800e80
LEA RSI,[0x25160a]
MOV EDX,0x20f1
CALL 0x0012dd80
LAB_0012ff9b:
CMP dword ptr [0x00d79aec],0x0
JZ 0x0012ffe4
MOV EDI,dword ptr [0x00d79aec]
CALL 0x00134f60
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0012ffe4
JMP 0x0012ffb9
LAB_0012ffb9:
JMP 0x0012ffbb
LAB_0012ffbb:
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x0012ffd4
LEA RDI,[0x578c70]
ADD RDI,0x800e80
CALL 0x0012ddf0
LAB_0012ffd4:
JMP 0x0012ffd6
LAB_0012ffd6:
MOV EAX,dword ptr [0x00d79aec]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00130082
LAB_0012ffe4:
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
MOV dword ptr [RBP + -0x1c],EAX
LAB_0012ffef:
MOV ECX,dword ptr [RBP + -0x18]
XOR EAX,EAX
CMP ECX,dword ptr [RBP + -0x1c]
MOV byte ptr [RBP + -0x21],AL
JZ 0x0013000d
MOV EAX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
SUB ECX,0x1
CMP EAX,ECX
SETNZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_0013000d:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x00130016
JMP 0x00130050
LAB_00130016:
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,dword ptr [RBP + -0x1c]
SHR EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00130023
LAB_00130023:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x1c]
JNZ 0x00130034
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x20],EAX
LAB_00130034:
MOV EDI,dword ptr [RBP + -0x20]
CALL 0x00134f60
CMP AL,0x0
JZ 0x00130048
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0013004e
LAB_00130048:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x18],EAX
LAB_0013004e:
JMP 0x0012ffef
LAB_00130050:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [0x00d79aec],EAX
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00130072
LEA RDI,[0x578c70]
ADD RDI,0x800e80
CALL 0x0012ddf0
LAB_00130072:
JMP 0x00130074
LAB_00130074:
JMP 0x00130076
LAB_00130076:
JMP 0x00130078
LAB_00130078:
JMP 0x0013007a
LAB_0013007a:
JMP 0x0013007c
LAB_0013007c:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_00130082:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
uint translog_first_file(int8 param_1,int param_2)
{
char cVar1;
uint local_28;
uint local_24;
uint local_20;
uint local_c;
local_20 = 0;
if (param_2 == 0) {
inline_mysql_mutex_lock
(&DAT_00d79af0,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x20f1);
}
if ((_DAT_00d79aec == 0) || (cVar1 = translog_is_file(_DAT_00d79aec), cVar1 == '\0')) {
local_24 = (uint)((ulong)param_1 >> 0x20);
while (local_20 != local_24 && local_20 != local_24 - 1) {
local_28 = local_20 + local_24 >> 1;
if (local_28 == local_24) {
local_28 = local_28 - 1;
}
cVar1 = translog_is_file(local_28);
if (cVar1 == '\0') {
local_20 = local_28;
}
else {
local_24 = local_28;
}
}
_DAT_00d79aec = local_24;
if (param_2 == 0) {
inline_mysql_mutex_unlock(&DAT_00d79af0);
}
local_c = local_24;
}
else {
if (param_2 == 0) {
inline_mysql_mutex_unlock(&DAT_00d79af0);
}
local_c = _DAT_00d79aec;
}
return local_c;
}
| |
40,736 | ma_hashtbl_insert | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | my_bool ma_hashtbl_insert(MA_HASHTBL *info,const uchar *record)
{
int flag;
uint halfbuff,hash_nr,first_index,idx;
uchar *ptr_to_rec= NULL,*ptr_to_rec2= NULL;
MA_HASHTBL_LINK *data,*empty,*gpos= NULL,*gpos2 = NULL,*pos;
LINT_INIT(gpos); LINT_INIT(gpos2);
LINT_INIT(ptr_to_rec); LINT_INIT(ptr_to_rec2);
flag=0;
if (!(empty=(MA_HASHTBL_LINK*) ma_alloc_dynamic(&info->array)))
return(TRUE); /* No more memory */
info->current_record= NO_RECORD;
data=dynamic_element(&info->array,0,MA_HASHTBL_LINK*);
halfbuff= info->blength >> 1;
idx=first_index=info->records-halfbuff;
if (idx != info->records) /* If some records */
{
do
{
pos=data+idx;
hash_nr=rec_hashnr(info,pos->data);
if (flag == 0) /* First loop; Check if ok */
if (hash_mask(hash_nr,info->blength,info->records) != first_index)
break;
if (!(hash_nr & halfbuff))
{ /* Key will not move */
if (!(flag & LOWFIND))
{
if (flag & HIGHFIND)
{
flag=LOWFIND | HIGHFIND;
/* key shall be moved to the current empty position */
gpos=empty;
ptr_to_rec=pos->data;
empty=pos; /* This place is now free */
}
else
{
flag=LOWFIND | LOWUSED; /* key isn't changed */
gpos=pos;
ptr_to_rec=pos->data;
}
}
else
{
if (!(flag & LOWUSED))
{
/* Change link of previous LOW-key */
gpos->data=ptr_to_rec;
gpos->next=(uint) (pos-data);
flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED);
}
gpos=pos;
ptr_to_rec=pos->data;
}
}
else
{ /* key will be moved */
if (!(flag & HIGHFIND))
{
flag= (flag & LOWFIND) | HIGHFIND;
/* key shall be moved to the last (empty) position */
gpos2 = empty; empty=pos;
ptr_to_rec2=pos->data;
}
else
{
if (!(flag & HIGHUSED))
{
/* Change link of previous hash-key and save */
gpos2->data=ptr_to_rec2;
gpos2->next=(uint) (pos-data);
flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED);
}
gpos2=pos;
ptr_to_rec2=pos->data;
}
}
}
while ((idx=pos->next) != NO_RECORD);
if ((flag & (LOWFIND | LOWUSED)) == LOWFIND)
{
gpos->data=ptr_to_rec;
gpos->next=NO_RECORD;
}
if ((flag & (HIGHFIND | HIGHUSED)) == HIGHFIND)
{
gpos2->data=ptr_to_rec2;
gpos2->next=NO_RECORD;
}
}
/* Check if we are at the empty position */
idx=hash_mask(rec_hashnr(info,record),info->blength,info->records+1);
pos=data+idx;
if (pos == empty)
{
pos->data=(uchar*) record;
pos->next=NO_RECORD;
}
else
{
/* Check if more records in same hash-nr family */
empty[0]=pos[0];
gpos=data+hash_rec_mask(info,pos,info->blength,info->records+1);
if (pos == gpos)
{
pos->data=(uchar*) record;
pos->next=(uint) (empty - data);
}
else
{
pos->data=(uchar*) record;
pos->next=NO_RECORD;
movelink(data,(uint) (pos-data),(uint) (gpos-data),(uint) (empty-data));
}
}
if (++info->records == info->blength)
info->blength+= info->blength;
return(0);
} | O3 | c | ma_hashtbl_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x18, %rdi
callq 0x2f83a
testq %rax, %rax
je 0x309d3
movq %rax, %r13
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
movq 0x18(%rbx), %rcx
movl 0xc(%rbx), %edx
cmpl $0x2, %edx
movq %rbx, -0x70(%rbp)
movq %rcx, -0x68(%rbp)
movq %r14, -0x40(%rbp)
jb 0x309e2
movl 0x8(%rbx), %ebx
shrl %edx
subl %edx, %ebx
xorl %r12d, %r12d
movl %ebx, -0x74(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
movl %edx, %r14d
movq %r13, -0x30(%rbp)
movl %ebx, %r15d
shlq $0x4, %r15
movq 0x8(%rcx,%r15), %rdi
movq -0x70(%rbp), %r13
movq 0x30(%r13), %rax
testq %rax, %rax
je 0x3088e
leaq -0x34(%rbp), %rsi
xorl %edx, %edx
callq *%rax
movq %rax, %rdi
movl -0x34(%rbp), %esi
jmp 0x3089c
movl 0x4(%r13), %esi
movl %esi, -0x34(%rbp)
movl (%r13), %eax
addq %rax, %rdi
callq *0x40(%r13)
testl %r12d, %r12d
jne 0x308c4
movl 0xc(%r13), %ecx
leal -0x1(%rcx), %edx
andl %eax, %edx
shrl %ecx
decl %ecx
andl %eax, %ecx
cmpl 0x8(%r13), %edx
cmovbl %edx, %ecx
cmpl -0x74(%rbp), %ecx
jne 0x309da
movq -0x68(%rbp), %rcx
addq %rcx, %r15
movl %r14d, %edx
testl %r14d, %eax
je 0x308f9
testb $0x4, %r12b
jne 0x3092e
andl $0x1, %r12d
orl $0x4, %r12d
movq 0x8(%r15), %rax
movq %rax, -0x60(%rbp)
movq %r15, %r13
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x30988
testb $0x1, %r12b
jne 0x3095c
andl $0x4, %r12d
movl %r12d, %eax
shrl %eax
addl $0x3, %eax
testl %r12d, %r12d
movq 0x8(%r15), %rsi
movq %rsi, -0x50(%rbp)
movq %r15, %r13
movq -0x30(%rbp), %rsi
cmoveq %rsi, %r13
cmoveq %r15, %rsi
movl %eax, %r12d
movq %rsi, -0x48(%rbp)
jmp 0x30988
testb $0x8, %r12b
jne 0x3094a
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rsi
movq %rax, 0x8(%rsi)
movl %ebx, (%rsi)
andl $0x1, %r12d
orl $0xc, %r12d
movq 0x8(%r15), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %r13
movq %r15, -0x58(%rbp)
jmp 0x30988
testb $0x2, %r12b
jne 0x30978
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rsi
movq %rax, 0x8(%rsi)
movl %ebx, (%rsi)
andl $0x4, %r12d
orl $0x3, %r12d
movq 0x8(%r15), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %r13
movq %r15, -0x48(%rbp)
movl (%r15), %ebx
cmpl $-0x1, %ebx
jne 0x3085e
movl %r12d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x309b1
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rax, 0x8(%rcx)
movl $0xffffffff, (%rcx) # imm = 0xFFFFFFFF
andl $0xc, %r12d
cmpl $0x4, %r12d
movq -0x40(%rbp), %r14
jne 0x309e2
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rax, 0x8(%rcx)
movl $0xffffffff, (%rcx) # imm = 0xFFFFFFFF
jmp 0x309e2
movb $0x1, %al
jmp 0x30ac7
movq -0x30(%rbp), %r13
movq -0x40(%rbp), %r14
movq -0x70(%rbp), %r15
movq 0x30(%r15), %rax
testq %rax, %rax
je 0x30a06
leaq -0x78(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq *%rax
movq %rax, %rdi
movl (%r12), %esi
jmp 0x30a13
movl 0x4(%r15), %esi
movl %esi, -0x78(%rbp)
movl (%r15), %edi
addq %r14, %rdi
callq *0x40(%r15)
movl 0x8(%r15), %ecx
movl 0xc(%r15), %ebx
incl %ecx
leal -0x1(%rbx), %edx
andl %eax, %edx
shrl %ebx
decl %ebx
andl %eax, %ebx
cmpl %ecx, %edx
cmovbl %edx, %ebx
movq %rbx, %r14
shlq $0x4, %r14
addq -0x68(%rbp), %r14
cmpq %r13, %r14
je 0x30a79
movups (%r14), %xmm0
movups %xmm0, (%r13)
movl 0x8(%r15), %ecx
movl 0xc(%r15), %edx
incl %ecx
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x306f4
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%r14)
cmpl %eax, %ebx
jne 0x30a8a
subq -0x68(%rbp), %r13
shrq $0x4, %r13
movl %r13d, (%r14)
jmp 0x30aaf
movq -0x40(%rbp), %rax
movq %rax, 0x8(%r14)
movl $0xffffffff, (%r14) # imm = 0xFFFFFFFF
jmp 0x30aaf
movl $0xffffffff, (%r14) # imm = 0xFFFFFFFF
movq -0x68(%rbp), %rdx
subq %rdx, %r13
shrq $0x4, %r13
movl %eax, %ecx
shlq $0x4, %rcx
movl (%rdx,%rcx), %eax
cmpl %ebx, %eax
jne 0x30a9c
addq %rcx, %rdx
movl %r13d, (%rdx)
movq -0x70(%rbp), %rcx
movl 0x8(%rcx), %eax
incl %eax
movl %eax, 0x8(%rcx)
cmpl 0xc(%rcx), %eax
jne 0x30ac5
addl %eax, %eax
movl %eax, 0xc(%rcx)
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_hashtbl_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rsi
mov rbx, rdi
add rdi, 18h
call ma_alloc_dynamic
test rax, rax
jz loc_309D3
mov r13, rax
mov dword ptr [rbx+10h], 0FFFFFFFFh
mov rcx, [rbx+18h]
mov edx, [rbx+0Ch]
cmp edx, 2
mov [rbp+var_70], rbx
mov [rbp+var_68], rcx
mov [rbp+var_40], r14
jb loc_309E2
mov ebx, [rbx+8]
shr edx, 1
sub ebx, edx
xor r12d, r12d
mov [rbp+var_74], ebx
mov [rbp+var_50], 0
mov [rbp+var_60], 0
mov [rbp+var_48], 0
mov [rbp+var_58], 0
loc_3085E:
mov r14d, edx
mov [rbp+var_30], r13
mov r15d, ebx
shl r15, 4
mov rdi, [rcx+r15+8]
mov r13, [rbp+var_70]
mov rax, [r13+30h]
test rax, rax
jz short loc_3088E
lea rsi, [rbp+var_34]
xor edx, edx
call rax
mov rdi, rax
mov esi, [rbp+var_34]
jmp short loc_3089C
loc_3088E:
mov esi, [r13+4]
mov [rbp+var_34], esi
mov eax, [r13+0]
add rdi, rax
loc_3089C:
call qword ptr [r13+40h]
test r12d, r12d
jnz short loc_308C4
mov ecx, [r13+0Ch]
lea edx, [rcx-1]
and edx, eax
shr ecx, 1
dec ecx
and ecx, eax
cmp edx, [r13+8]
cmovb ecx, edx
cmp ecx, [rbp+var_74]
jnz loc_309DA
loc_308C4:
mov rcx, [rbp+var_68]
add r15, rcx
mov edx, r14d
test eax, r14d
jz short loc_308F9
test r12b, 4
jnz short loc_3092E
and r12d, 1
or r12d, 4
mov rax, [r15+8]
mov [rbp+var_60], rax
mov r13, r15
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
jmp loc_30988
loc_308F9:
test r12b, 1
jnz short loc_3095C
and r12d, 4
mov eax, r12d
shr eax, 1
add eax, 3
test r12d, r12d
mov rsi, [r15+8]
mov [rbp+var_50], rsi
mov r13, r15
mov rsi, [rbp+var_30]
cmovz r13, rsi
cmovz rsi, r15
mov r12d, eax
mov [rbp+var_48], rsi
jmp short loc_30988
loc_3092E:
test r12b, 8
jnz short loc_3094A
mov rax, [rbp+var_60]
mov rsi, [rbp+var_58]
mov [rsi+8], rax
mov [rsi], ebx
and r12d, 1
or r12d, 0Ch
loc_3094A:
mov rax, [r15+8]
mov [rbp+var_60], rax
mov r13, [rbp+var_30]
mov [rbp+var_58], r15
jmp short loc_30988
loc_3095C:
test r12b, 2
jnz short loc_30978
mov rax, [rbp+var_50]
mov rsi, [rbp+var_48]
mov [rsi+8], rax
mov [rsi], ebx
and r12d, 4
or r12d, 3
loc_30978:
mov rax, [r15+8]
mov [rbp+var_50], rax
mov r13, [rbp+var_30]
mov [rbp+var_48], r15
loc_30988:
mov ebx, [r15]
cmp ebx, 0FFFFFFFFh
jnz loc_3085E
mov eax, r12d
and eax, 3
cmp eax, 1
jnz short loc_309B1
mov rax, [rbp+var_50]
mov rcx, [rbp+var_48]
mov [rcx+8], rax
mov dword ptr [rcx], 0FFFFFFFFh
loc_309B1:
and r12d, 0Ch
cmp r12d, 4
mov r14, [rbp+var_40]
jnz short loc_309E2
mov rax, [rbp+var_60]
mov rcx, [rbp+var_58]
mov [rcx+8], rax
mov dword ptr [rcx], 0FFFFFFFFh
jmp short loc_309E2
loc_309D3:
mov al, 1
jmp loc_30AC7
loc_309DA:
mov r13, [rbp+var_30]
mov r14, [rbp+var_40]
loc_309E2:
mov r15, [rbp+var_70]
mov rax, [r15+30h]
test rax, rax
jz short loc_30A06
lea r12, [rbp+var_78]
mov rdi, r14
mov rsi, r12
xor edx, edx
call rax
mov rdi, rax
mov esi, [r12]
jmp short loc_30A13
loc_30A06:
mov esi, [r15+4]
mov [rbp+var_78], esi
mov edi, [r15]
add rdi, r14
loc_30A13:
call qword ptr [r15+40h]
mov ecx, [r15+8]
mov ebx, [r15+0Ch]
inc ecx
lea edx, [rbx-1]
and edx, eax
shr ebx, 1
dec ebx
and ebx, eax
cmp edx, ecx
cmovb ebx, edx
mov r14, rbx
shl r14, 4
add r14, [rbp+var_68]
cmp r14, r13
jz short loc_30A79
movups xmm0, xmmword ptr [r14]
movups xmmword ptr [r13+0], xmm0
mov ecx, [r15+8]
mov edx, [r15+0Ch]
inc ecx
mov rsi, [r14+8]
mov rdi, r15
call hash_rec_mask
mov rcx, [rbp+var_40]
mov [r14+8], rcx
cmp ebx, eax
jnz short loc_30A8A
sub r13, [rbp+var_68]
shr r13, 4
mov [r14], r13d
jmp short loc_30AAF
loc_30A79:
mov rax, [rbp+var_40]
mov [r14+8], rax
mov dword ptr [r14], 0FFFFFFFFh
jmp short loc_30AAF
loc_30A8A:
mov dword ptr [r14], 0FFFFFFFFh
mov rdx, [rbp+var_68]
sub r13, rdx
shr r13, 4
loc_30A9C:
mov ecx, eax
shl rcx, 4
mov eax, [rdx+rcx]
cmp eax, ebx
jnz short loc_30A9C
add rdx, rcx
mov [rdx], r13d
loc_30AAF:
mov rcx, [rbp+var_70]
mov eax, [rcx+8]
inc eax
mov [rcx+8], eax
cmp eax, [rcx+0Ch]
jnz short loc_30AC5
add eax, eax
mov [rcx+0Ch], eax
loc_30AC5:
xor eax, eax
loc_30AC7:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_hashtbl_insert(unsigned int *a1, long long a2)
{
long long v2; // r14
long long v3; // rax
_OWORD *v4; // r13
long long v5; // rcx
unsigned int v6; // edx
unsigned int v7; // edx
unsigned int v8; // ebx
int v9; // r12d
unsigned int v10; // r14d
long long v11; // r15
long long v12; // rdi
long long ( *v13)(long long, unsigned int *, _QWORD); // rax
long long v14; // rdi
long long v15; // rsi
int v16; // eax
unsigned int v17; // ecx
unsigned int v18; // edx
int v19; // ecx
long long v20; // r15
unsigned int v21; // r12d
unsigned int *v22; // rsi
unsigned int *v23; // rsi
unsigned int *v24; // rsi
unsigned int *v25; // rcx
unsigned int *v26; // rcx
long long ( **v28)(long long, long long); // r15
long long ( *v29)(long long, unsigned int *, _QWORD); // rax
long long v30; // rdi
long long v31; // rsi
int v32; // eax
unsigned int v33; // ebx
unsigned int v34; // edx
long long v35; // rbx
long long v36; // r14
unsigned int v37; // eax
unsigned long long v38; // r13
long long v39; // rcx
unsigned int *v40; // rcx
int v41; // eax
unsigned int v42; // [rsp+8h] [rbp-78h] BYREF
unsigned int v43; // [rsp+Ch] [rbp-74h]
unsigned int *v44; // [rsp+10h] [rbp-70h]
long long v45; // [rsp+18h] [rbp-68h]
long long v46; // [rsp+20h] [rbp-60h]
unsigned int *v47; // [rsp+28h] [rbp-58h]
long long v48; // [rsp+30h] [rbp-50h]
unsigned int *v49; // [rsp+38h] [rbp-48h]
long long v50; // [rsp+40h] [rbp-40h]
unsigned int v51; // [rsp+4Ch] [rbp-34h] BYREF
_OWORD *v52; // [rsp+50h] [rbp-30h]
v2 = a2;
v3 = ma_alloc_dynamic((long long)(a1 + 6));
if ( !v3 )
return 1LL;
v4 = (_OWORD *)v3;
a1[4] = -1;
v5 = *((_QWORD *)a1 + 3);
v6 = a1[3];
v44 = a1;
v45 = v5;
v50 = a2;
if ( v6 >= 2 )
{
v7 = v6 >> 1;
v8 = a1[2] - v7;
v9 = 0;
v43 = v8;
v48 = 0LL;
v46 = 0LL;
v49 = 0LL;
v47 = 0LL;
do
{
v10 = v7;
v52 = v4;
v11 = 16LL * v8;
v12 = *(_QWORD *)(v5 + v11 + 8);
v13 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)v44 + 6);
if ( v13 )
{
v14 = v13(v12, &v51, 0LL);
v15 = v51;
}
else
{
v15 = v44[1];
v51 = v44[1];
v14 = *v44 + v12;
}
v16 = (*((long long ( **)(long long, long long))v44 + 8))(v14, v15);
if ( !v9 )
{
v17 = v44[3];
v18 = v16 & (v17 - 1);
v19 = v16 & ((v17 >> 1) - 1);
if ( v18 < v44[2] )
v19 = v18;
if ( v19 != v43 )
{
v4 = v52;
v2 = v50;
goto LABEL_31;
}
}
v5 = v45;
v20 = v45 + v11;
v7 = v10;
if ( (v10 & v16) != 0 )
{
if ( (v9 & 4) != 0 )
{
if ( (v9 & 8) == 0 )
{
v23 = v47;
*((_QWORD *)v47 + 1) = v46;
*v23 = v8;
v9 = v9 & 1 | 0xC;
}
v46 = *(_QWORD *)(v20 + 8);
v4 = v52;
v47 = (unsigned int *)v20;
}
else
{
v9 = v9 & 1 | 4;
v46 = *(_QWORD *)(v20 + 8);
v4 = (_OWORD *)v20;
v47 = (unsigned int *)v52;
}
}
else if ( (v9 & 1) != 0 )
{
if ( (v9 & 2) == 0 )
{
v24 = v49;
*((_QWORD *)v49 + 1) = v48;
*v24 = v8;
v9 = v9 & 4 | 3;
}
v48 = *(_QWORD *)(v20 + 8);
v4 = v52;
v49 = (unsigned int *)v20;
}
else
{
v21 = v9 & 4;
v48 = *(_QWORD *)(v20 + 8);
v4 = (_OWORD *)v20;
v22 = (unsigned int *)v52;
if ( !v21 )
{
v4 = v52;
v22 = (unsigned int *)v20;
}
v9 = (v21 >> 1) + 3;
v49 = v22;
}
v8 = *(_DWORD *)v20;
}
while ( *(_DWORD *)v20 != -1 );
if ( (v9 & 3) == 1 )
{
v25 = v49;
*((_QWORD *)v49 + 1) = v48;
*v25 = -1;
}
v2 = v50;
if ( (v9 & 0xC) == 4 )
{
v26 = v47;
*((_QWORD *)v47 + 1) = v46;
*v26 = -1;
}
}
LABEL_31:
v28 = (long long ( **)(long long, long long))v44;
v29 = (long long ( *)(long long, unsigned int *, _QWORD))*((_QWORD *)v44 + 6);
if ( v29 )
{
v30 = v29(v2, &v42, 0LL);
v31 = v42;
}
else
{
v31 = v44[1];
v42 = v44[1];
v30 = v2 + *v44;
}
v32 = v28[8](v30, v31);
v33 = *((_DWORD *)v28 + 3);
v34 = v32 & (v33 - 1);
v35 = v32 & ((v33 >> 1) - 1);
if ( v34 < *((_DWORD *)v28 + 2) + 1 )
v35 = v34;
v36 = v45 + 16 * v35;
if ( (_OWORD *)v36 == v4 )
{
*(_QWORD *)(v36 + 8) = v50;
*(_DWORD *)v36 = -1;
}
else
{
*v4 = *(_OWORD *)v36;
v37 = hash_rec_mask((unsigned int *)v28, *(_QWORD *)(v36 + 8), *((_DWORD *)v28 + 3), *((_DWORD *)v28 + 2) + 1);
*(_QWORD *)(v36 + 8) = v50;
if ( (_DWORD)v35 == v37 )
{
*(_DWORD *)v36 = ((unsigned long long)v4 - v45) >> 4;
}
else
{
*(_DWORD *)v36 = -1;
v38 = ((unsigned long long)v4 - v45) >> 4;
do
{
v39 = 16LL * v37;
v37 = *(_DWORD *)(v45 + v39);
}
while ( v37 != (_DWORD)v35 );
*(_DWORD *)(v39 + v45) = v38;
}
}
v40 = v44;
v41 = v44[2] + 1;
v44[2] = v41;
if ( v41 == v40[3] )
v40[3] = 2 * v41;
return 0LL;
}
| ma_hashtbl_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RSI
MOV RBX,RDI
ADD RDI,0x18
CALL 0x0012f83a
TEST RAX,RAX
JZ 0x001309d3
MOV R13,RAX
MOV dword ptr [RBX + 0x10],0xffffffff
MOV RCX,qword ptr [RBX + 0x18]
MOV EDX,dword ptr [RBX + 0xc]
CMP EDX,0x2
MOV qword ptr [RBP + -0x70],RBX
MOV qword ptr [RBP + -0x68],RCX
MOV qword ptr [RBP + -0x40],R14
JC 0x001309e2
MOV EBX,dword ptr [RBX + 0x8]
SHR EDX,0x1
SUB EBX,EDX
XOR R12D,R12D
MOV dword ptr [RBP + -0x74],EBX
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x60],0x0
MOV qword ptr [RBP + -0x48],0x0
MOV qword ptr [RBP + -0x58],0x0
LAB_0013085e:
MOV R14D,EDX
MOV qword ptr [RBP + -0x30],R13
MOV R15D,EBX
SHL R15,0x4
MOV RDI,qword ptr [RCX + R15*0x1 + 0x8]
MOV R13,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [R13 + 0x30]
TEST RAX,RAX
JZ 0x0013088e
LEA RSI,[RBP + -0x34]
XOR EDX,EDX
CALL RAX
MOV RDI,RAX
MOV ESI,dword ptr [RBP + -0x34]
JMP 0x0013089c
LAB_0013088e:
MOV ESI,dword ptr [R13 + 0x4]
MOV dword ptr [RBP + -0x34],ESI
MOV EAX,dword ptr [R13]
ADD RDI,RAX
LAB_0013089c:
CALL qword ptr [R13 + 0x40]
TEST R12D,R12D
JNZ 0x001308c4
MOV ECX,dword ptr [R13 + 0xc]
LEA EDX,[RCX + -0x1]
AND EDX,EAX
SHR ECX,0x1
DEC ECX
AND ECX,EAX
CMP EDX,dword ptr [R13 + 0x8]
CMOVC ECX,EDX
CMP ECX,dword ptr [RBP + -0x74]
JNZ 0x001309da
LAB_001308c4:
MOV RCX,qword ptr [RBP + -0x68]
ADD R15,RCX
MOV EDX,R14D
TEST EAX,R14D
JZ 0x001308f9
TEST R12B,0x4
JNZ 0x0013092e
AND R12D,0x1
OR R12D,0x4
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0x60],RAX
MOV R13,R15
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00130988
LAB_001308f9:
TEST R12B,0x1
JNZ 0x0013095c
AND R12D,0x4
MOV EAX,R12D
SHR EAX,0x1
ADD EAX,0x3
TEST R12D,R12D
MOV RSI,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0x50],RSI
MOV R13,R15
MOV RSI,qword ptr [RBP + -0x30]
CMOVZ R13,RSI
CMOVZ RSI,R15
MOV R12D,EAX
MOV qword ptr [RBP + -0x48],RSI
JMP 0x00130988
LAB_0013092e:
TEST R12B,0x8
JNZ 0x0013094a
MOV RAX,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x58]
MOV qword ptr [RSI + 0x8],RAX
MOV dword ptr [RSI],EBX
AND R12D,0x1
OR R12D,0xc
LAB_0013094a:
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0x60],RAX
MOV R13,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],R15
JMP 0x00130988
LAB_0013095c:
TEST R12B,0x2
JNZ 0x00130978
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x48]
MOV qword ptr [RSI + 0x8],RAX
MOV dword ptr [RSI],EBX
AND R12D,0x4
OR R12D,0x3
LAB_00130978:
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0x50],RAX
MOV R13,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],R15
LAB_00130988:
MOV EBX,dword ptr [R15]
CMP EBX,-0x1
JNZ 0x0013085e
MOV EAX,R12D
AND EAX,0x3
CMP EAX,0x1
JNZ 0x001309b1
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX + 0x8],RAX
MOV dword ptr [RCX],0xffffffff
LAB_001309b1:
AND R12D,0xc
CMP R12D,0x4
MOV R14,qword ptr [RBP + -0x40]
JNZ 0x001309e2
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RCX + 0x8],RAX
MOV dword ptr [RCX],0xffffffff
JMP 0x001309e2
LAB_001309d3:
MOV AL,0x1
JMP 0x00130ac7
LAB_001309da:
MOV R13,qword ptr [RBP + -0x30]
MOV R14,qword ptr [RBP + -0x40]
LAB_001309e2:
MOV R15,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [R15 + 0x30]
TEST RAX,RAX
JZ 0x00130a06
LEA R12,[RBP + -0x78]
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
CALL RAX
MOV RDI,RAX
MOV ESI,dword ptr [R12]
JMP 0x00130a13
LAB_00130a06:
MOV ESI,dword ptr [R15 + 0x4]
MOV dword ptr [RBP + -0x78],ESI
MOV EDI,dword ptr [R15]
ADD RDI,R14
LAB_00130a13:
CALL qword ptr [R15 + 0x40]
MOV ECX,dword ptr [R15 + 0x8]
MOV EBX,dword ptr [R15 + 0xc]
INC ECX
LEA EDX,[RBX + -0x1]
AND EDX,EAX
SHR EBX,0x1
DEC EBX
AND EBX,EAX
CMP EDX,ECX
CMOVC EBX,EDX
MOV R14,RBX
SHL R14,0x4
ADD R14,qword ptr [RBP + -0x68]
CMP R14,R13
JZ 0x00130a79
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [R13],XMM0
MOV ECX,dword ptr [R15 + 0x8]
MOV EDX,dword ptr [R15 + 0xc]
INC ECX
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x001306f4
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [R14 + 0x8],RCX
CMP EBX,EAX
JNZ 0x00130a8a
SUB R13,qword ptr [RBP + -0x68]
SHR R13,0x4
MOV dword ptr [R14],R13D
JMP 0x00130aaf
LAB_00130a79:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [R14 + 0x8],RAX
MOV dword ptr [R14],0xffffffff
JMP 0x00130aaf
LAB_00130a8a:
MOV dword ptr [R14],0xffffffff
MOV RDX,qword ptr [RBP + -0x68]
SUB R13,RDX
SHR R13,0x4
LAB_00130a9c:
MOV ECX,EAX
SHL RCX,0x4
MOV EAX,dword ptr [RDX + RCX*0x1]
CMP EAX,EBX
JNZ 0x00130a9c
ADD RDX,RCX
MOV dword ptr [RDX],R13D
LAB_00130aaf:
MOV RCX,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RCX + 0x8]
INC EAX
MOV dword ptr [RCX + 0x8],EAX
CMP EAX,dword ptr [RCX + 0xc]
JNZ 0x00130ac5
ADD EAX,EAX
MOV dword ptr [RCX + 0xc],EAX
LAB_00130ac5:
XOR EAX,EAX
LAB_00130ac7:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ma_hashtbl_insert(uint *param_1,long param_2)
{
uint uVar1;
uint uVar2;
uint *puVar3;
long lVar4;
int8 uVar5;
ulong uVar6;
uint uVar7;
uint uVar8;
uint uVar9;
uint uVar10;
uint *puVar11;
uint *puVar12;
uint local_80;
uint local_7c;
uint *local_78;
long local_70;
int8 local_68;
uint *local_60;
int8 local_58;
uint *local_50;
long local_48;
uint local_3c;
uint *local_38;
puVar3 = (uint *)ma_alloc_dynamic(param_1 + 6);
if (puVar3 == (uint *)0x0) {
uVar5 = 1;
}
else {
param_1[4] = 0xffffffff;
local_70 = *(long *)(param_1 + 6);
local_78 = param_1;
local_48 = param_2;
if (1 < param_1[3]) {
uVar7 = param_1[3] >> 1;
uVar9 = param_1[2] - uVar7;
uVar10 = 0;
local_58 = 0;
local_68 = 0;
local_50 = (uint *)0x0;
local_60 = (uint *)0x0;
local_7c = uVar9;
do {
puVar12 = local_78;
lVar4 = *(long *)(local_70 + 8 + (ulong)uVar9 * 0x10);
local_38 = puVar3;
if (*(code **)(local_78 + 0xc) == (code *)0x0) {
local_3c = local_78[1];
lVar4 = lVar4 + (ulong)*local_78;
}
else {
lVar4 = (**(code **)(local_78 + 0xc))(lVar4,&local_3c,0);
}
uVar2 = (**(code **)(puVar12 + 0x10))(lVar4,local_3c);
if (uVar10 == 0) {
uVar8 = puVar12[3] - 1 & uVar2;
uVar1 = (puVar12[3] >> 1) - 1 & uVar2;
if (uVar8 < puVar12[2]) {
uVar1 = uVar8;
}
puVar3 = local_38;
if (uVar1 != local_7c) goto LAB_001309e2;
}
puVar12 = (uint *)((ulong)uVar9 * 0x10 + local_70);
puVar3 = puVar12;
if ((uVar2 & uVar7) == 0) {
if ((uVar10 & 1) == 0) {
uVar9 = uVar10 & 4;
uVar10 = (uVar9 >> 1) + 3;
local_58 = *(int8 *)(puVar12 + 2);
local_50 = local_38;
if (uVar9 == 0) {
puVar3 = local_38;
local_50 = puVar12;
}
}
else {
if ((uVar10 & 2) == 0) {
*(int8 *)(local_50 + 2) = local_58;
*local_50 = uVar9;
uVar10 = uVar10 & 4 | 3;
}
local_58 = *(int8 *)(puVar12 + 2);
puVar3 = local_38;
local_50 = puVar12;
}
}
else if ((uVar10 & 4) == 0) {
uVar10 = uVar10 & 1 | 4;
local_68 = *(int8 *)(puVar12 + 2);
local_60 = local_38;
}
else {
if ((uVar10 & 8) == 0) {
*(int8 *)(local_60 + 2) = local_68;
*local_60 = uVar9;
uVar10 = uVar10 & 1 | 0xc;
}
local_68 = *(int8 *)(puVar12 + 2);
puVar3 = local_38;
local_60 = puVar12;
}
uVar9 = *puVar12;
} while (uVar9 != 0xffffffff);
if ((uVar10 & 3) == 1) {
*(int8 *)(local_50 + 2) = local_58;
*local_50 = 0xffffffff;
}
if ((uVar10 & 0xc) == 4) {
*(int8 *)(local_60 + 2) = local_68;
*local_60 = 0xffffffff;
}
}
LAB_001309e2:
puVar12 = local_78;
if (*(code **)(local_78 + 0xc) == (code *)0x0) {
local_80 = local_78[1];
lVar4 = (ulong)*local_78 + local_48;
}
else {
lVar4 = (**(code **)(local_78 + 0xc))(local_48,&local_80,0);
}
uVar9 = (**(code **)(puVar12 + 0x10))(lVar4,local_80);
uVar10 = puVar12[3] - 1 & uVar9;
uVar9 = (puVar12[3] >> 1) - 1 & uVar9;
if (uVar10 < puVar12[2] + 1) {
uVar9 = uVar10;
}
puVar11 = (uint *)((ulong)uVar9 * 0x10 + local_70);
if (puVar11 == puVar3) {
*(long *)(puVar11 + 2) = local_48;
*puVar11 = 0xffffffff;
}
else {
uVar10 = puVar11[1];
uVar7 = puVar11[2];
uVar2 = puVar11[3];
*puVar3 = *puVar11;
puVar3[1] = uVar10;
puVar3[2] = uVar7;
puVar3[3] = uVar2;
uVar10 = hash_rec_mask(puVar12,*(int8 *)(puVar11 + 2),puVar12[3],puVar12[2] + 1);
*(long *)(puVar11 + 2) = local_48;
if (uVar9 == uVar10) {
*puVar11 = (uint)((ulong)((long)puVar3 - local_70) >> 4);
}
else {
*puVar11 = 0xffffffff;
do {
uVar6 = (ulong)uVar10;
uVar10 = *(uint *)(local_70 + uVar6 * 0x10);
} while (uVar10 != uVar9);
*(int *)(local_70 + uVar6 * 0x10) = (int)((ulong)((long)puVar3 - local_70) >> 4);
}
}
uVar9 = local_78[2] + 1;
local_78[2] = uVar9;
if (uVar9 == local_78[3]) {
local_78[3] = uVar9 * 2;
}
uVar5 = 0;
}
return uVar5;
}
| |
40,737 | stbi__is_16_main(stbi__context*) | mnn-tts/MNN/3rd_party/imageHelper/stb_image.h | static int stbi__is_16_main(stbi__context *s)
{
#ifndef STBI_NO_PNG
if (stbi__png_is16(s)) return 1;
#endif
#ifndef STBI_NO_PSD
if (stbi__psd_is16(s)) return 1;
#endif
return 0;
} | O0 | c | stbi__is_16_main(stbi__context*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x1e930
cmpl $0x0, %eax
je 0x4182
movl $0x1, 0x14(%rsp)
jmp 0x41a3
movq 0x8(%rsp), %rdi
callq 0x1e990
cmpl $0x0, %eax
je 0x419b
movl $0x1, 0x14(%rsp)
jmp 0x41a3
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
| _ZL16stbi__is_16_mainP13stbi__context:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov rdi, [rsp+18h+var_10]
call _ZL14stbi__png_is16P13stbi__context; stbi__png_is16(stbi__context *)
cmp eax, 0
jz short loc_4182
mov [rsp+18h+var_4], 1
jmp short loc_41A3
loc_4182:
mov rdi, [rsp+18h+var_10]
call _ZL14stbi__psd_is16P13stbi__context; stbi__psd_is16(stbi__context *)
cmp eax, 0
jz short loc_419B
mov [rsp+18h+var_4], 1
jmp short loc_41A3
loc_419B:
mov [rsp+18h+var_4], 0
loc_41A3:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| _BOOL8 stbi__is_16_main(long long a1)
{
return (unsigned int)stbi__png_is16(a1) || stbi__psd_is16(a1) != 0;
}
| stbi__is_16_main:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011e930
CMP EAX,0x0
JZ 0x00104182
MOV dword ptr [RSP + 0x14],0x1
JMP 0x001041a3
LAB_00104182:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011e990
CMP EAX,0x0
JZ 0x0010419b
MOV dword ptr [RSP + 0x14],0x1
JMP 0x001041a3
LAB_0010419b:
MOV dword ptr [RSP + 0x14],0x0
LAB_001041a3:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* stbi__is_16_main(stbi__context*) */
int4 stbi__is_16_main(stbi__context *param_1)
{
int iVar1;
int4 local_4;
iVar1 = stbi__png_is16(param_1);
if (iVar1 == 0) {
iVar1 = stbi__psd_is16(param_1);
if (iVar1 == 0) {
local_4 = 0;
}
else {
local_4 = 1;
}
}
else {
local_4 = 1;
}
return local_4;
}
| |
40,738 | my_hash_sort_utf8mb4 | eloqsql/strings/ctype-utf8.c | static void
my_hash_sort_utf8mb4(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
/*
Remove end space. We do this to be able to compare
'A ' and 'A' as identical
*/
const uchar *e= skip_trailing_space(s, slen);
my_hash_sort_utf8mb4_nopad(cs, s, e - s, nr1, nr2);
} | O3 | c | my_hash_sort_utf8mb4:
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rdx), %r10
cmpq $0x15, %rdx
jb 0x52dbb
movq %r10, %r9
andq $-0x4, %r9
cmpq %rsi, %r9
jbe 0x52dbb
leaq 0x3(%rsi), %rdx
andq $-0x4, %rdx
movq %r10, %rax
movb -0x1(%r10), %r11b
cmpq %r9, %r10
jbe 0x52de0
leaq -0x1(%rax), %r10
cmpb $0x20, %r11b
je 0x52da3
jmp 0x52dbe
movq %r10, %rax
movq %rax, %r9
subq %rsi, %r9
movq %r9, %rdx
cmpq %rsi, %rax
jbe 0x52dda
cmpb $0x20, -0x1(%rax)
leaq -0x1(%rax), %rax
leaq -0x1(%rdx), %r9
je 0x52dc4
popq %rbp
jmp 0x53064
cmpb $0x20, %r11b
setne %r10b
cmpq %r9, %rdx
setae %r9b
orb %r10b, %r9b
jne 0x52dbe
movq %rax, %r9
movq %r9, %rax
cmpq %rdx, %r9
jbe 0x52dbe
leaq -0x4(%rax), %r9
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
je 0x52df7
jmp 0x52dbe
| my_hash_sort_utf8mb4:
push rbp
mov rbp, rsp
lea r10, [rsi+rdx]
cmp rdx, 15h
jb short loc_52DBB
mov r9, r10
and r9, 0FFFFFFFFFFFFFFFCh
cmp r9, rsi
jbe short loc_52DBB
lea rdx, [rsi+3]
and rdx, 0FFFFFFFFFFFFFFFCh
loc_52DA3:
mov rax, r10
mov r11b, [r10-1]
cmp r10, r9
jbe short loc_52DE0
lea r10, [rax-1]
cmp r11b, 20h ; ' '
jz short loc_52DA3
jmp short loc_52DBE
loc_52DBB:
mov rax, r10
loc_52DBE:
mov r9, rax
sub r9, rsi
loc_52DC4:
mov rdx, r9
cmp rax, rsi
jbe short loc_52DDA
cmp byte ptr [rax-1], 20h ; ' '
lea rax, [rax-1]
lea r9, [rdx-1]
jz short loc_52DC4
loc_52DDA:
pop rbp
jmp my_hash_sort_utf8mb4_nopad
loc_52DE0:
cmp r11b, 20h ; ' '
setnz r10b
cmp rdx, r9
setnb r9b
or r9b, r10b
jnz short loc_52DBE
mov r9, rax
loc_52DF7:
mov rax, r9
cmp r9, rdx
jbe short loc_52DBE
lea r9, [rax-4]
cmp dword ptr [rax-4], 20202020h
jz short loc_52DF7
jmp short loc_52DBE
| long long my_hash_sort_utf8mb4(long long a1, unsigned long long a2, unsigned long long a3, long long a4, long long a5)
{
unsigned long long v5; // r10
unsigned long long v6; // r9
unsigned long long v7; // rdx
unsigned long long v8; // rax
char v9; // r11
unsigned long long v10; // r9
unsigned long long v11; // rdx
bool v12; // zf
unsigned long long v14; // r9
v5 = a2 + a3;
if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= a2) )
{
v8 = a2 + a3;
}
else
{
v7 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v8 = v5;
v9 = *(_BYTE *)(v5 - 1);
if ( v5 <= v6 )
break;
--v5;
if ( v9 != 32 )
goto LABEL_8;
}
if ( v9 == 32 && v7 < v6 )
{
v14 = v5;
do
{
v8 = v14;
if ( v14 <= v7 )
break;
v14 -= 4LL;
}
while ( *(_DWORD *)(v8 - 4) == 538976288 );
}
}
LABEL_8:
v10 = v8 - a2;
do
{
v11 = v10;
if ( v8 <= a2 )
break;
v12 = *(_BYTE *)--v8 == 32;
--v10;
}
while ( v12 );
return my_hash_sort_utf8mb4_nopad(a1, a2, v11, a4, a5, v10);
}
| my_hash_sort_utf8mb4:
PUSH RBP
MOV RBP,RSP
LEA R10,[RSI + RDX*0x1]
CMP RDX,0x15
JC 0x00152dbb
MOV R9,R10
AND R9,-0x4
CMP R9,RSI
JBE 0x00152dbb
LEA RDX,[RSI + 0x3]
AND RDX,-0x4
LAB_00152da3:
MOV RAX,R10
MOV R11B,byte ptr [R10 + -0x1]
CMP R10,R9
JBE 0x00152de0
LEA R10,[RAX + -0x1]
CMP R11B,0x20
JZ 0x00152da3
JMP 0x00152dbe
LAB_00152dbb:
MOV RAX,R10
LAB_00152dbe:
MOV R9,RAX
SUB R9,RSI
LAB_00152dc4:
MOV RDX,R9
CMP RAX,RSI
JBE 0x00152dda
CMP byte ptr [RAX + -0x1],0x20
LEA RAX,[RAX + -0x1]
LEA R9,[RDX + -0x1]
JZ 0x00152dc4
LAB_00152dda:
POP RBP
JMP 0x00153064
LAB_00152de0:
CMP R11B,0x20
SETNZ R10B
CMP RDX,R9
SETNC R9B
OR R9B,R10B
JNZ 0x00152dbe
MOV R9,RAX
LAB_00152df7:
MOV RAX,R9
CMP R9,RDX
JBE 0x00152dbe
LEA R9,[RAX + -0x4]
CMP dword ptr [RAX + -0x4],0x20202020
JZ 0x00152df7
JMP 0x00152dbe
|
void my_hash_sort_utf8mb4(int8 param_1,ulong param_2,ulong param_3)
{
char *pcVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
uVar3 = param_2 + param_3;
if ((0x14 < param_3) && (uVar5 = uVar3 & 0xfffffffffffffffc, param_2 < uVar5)) {
uVar4 = param_2 + 3 & 0xfffffffffffffffc;
uVar2 = uVar3;
do {
uVar3 = uVar2;
if (uVar3 <= uVar5) {
uVar2 = uVar3;
if (uVar4 < uVar5 && *(char *)(uVar3 - 1) == ' ') goto LAB_00152df7;
break;
}
uVar2 = uVar3 - 1;
} while (*(char *)(uVar3 - 1) == ' ');
}
goto LAB_00152dc4;
while (uVar2 = uVar3 - 4, *(int *)(uVar3 - 4) == 0x20202020) {
LAB_00152df7:
uVar3 = uVar2;
if (uVar3 <= uVar4) break;
}
LAB_00152dc4:
do {
if (uVar3 <= param_2) break;
pcVar1 = (char *)(uVar3 - 1);
uVar3 = uVar3 - 1;
} while (*pcVar1 == ' ');
my_hash_sort_utf8mb4_nopad();
return;
}
| |
40,739 | ma_tls_async_check_result | eloqsql/libmariadb/libmariadb/secure/openssl.c | static my_bool
ma_tls_async_check_result(int res, struct mysql_async_context *b, SSL *ssl)
{
int ssl_err;
b->events_to_wait_for= 0;
if (res >= 0)
return 1;
ssl_err= SSL_get_error(ssl, res);
if (ssl_err == SSL_ERROR_WANT_READ)
b->events_to_wait_for|= MYSQL_WAIT_READ;
else if (ssl_err == SSL_ERROR_WANT_WRITE)
b->events_to_wait_for|= MYSQL_WAIT_WRITE;
else
return 1;
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data);
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
return 0;
} | O3 | c | ma_tls_async_check_result:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl $0x0, (%rsi)
movb $0x1, %r14b
testl %edi, %edi
js 0x28329
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %edi, %esi
movq %rdx, %rdi
callq 0x13050
cmpl $0x2, %eax
je 0x28344
cmpl $0x3, %eax
jne 0x28321
movl $0x2, %eax
jmp 0x28349
movl $0x1, %eax
orl %eax, (%rbx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x2835f
movq 0x28(%rbx), %rsi
movl $0x1, %edi
callq *%rax
leaq 0x38(%rbx), %rdi
callq 0x2d751
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x2837e
movq 0x28(%rbx), %rsi
xorl %r14d, %r14d
xorl %edi, %edi
callq *%rax
jmp 0x28321
xorl %r14d, %r14d
jmp 0x28321
| ma_tls_async_check_result:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov dword ptr [rsi], 0
mov r14b, 1
test edi, edi
js short loc_28329
loc_28321:
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
loc_28329:
mov esi, edi
mov rdi, rdx
call _SSL_get_error
cmp eax, 2
jz short loc_28344
cmp eax, 3
jnz short loc_28321
mov eax, 2
jmp short loc_28349
loc_28344:
mov eax, 1
loc_28349:
or [rbx], eax
mov rax, [rbx+20h]
test rax, rax
jz short loc_2835F
mov rsi, [rbx+28h]
mov edi, 1
call rax
loc_2835F:
lea rdi, [rbx+38h]
call my_context_yield
mov rax, [rbx+20h]
test rax, rax
jz short loc_2837E
mov rsi, [rbx+28h]
xor r14d, r14d
xor edi, edi
call rax
jmp short loc_28321
loc_2837E:
xor r14d, r14d
jmp short loc_28321
| long long ma_tls_async_check_result(int a1, long long a2, long long a3)
{
unsigned int v3; // r14d
int error; // eax
int v6; // eax
void ( *v7)(long long, _QWORD); // rax
void ( *v8)(_QWORD, _QWORD); // rax
*(_DWORD *)a2 = 0;
LOBYTE(v3) = 1;
if ( a1 < 0 )
{
error = SSL_get_error(a3, (unsigned int)a1);
if ( error == 2 )
{
v6 = 1;
}
else
{
if ( error != 3 )
return v3;
v6 = 2;
}
*(_DWORD *)a2 |= v6;
v7 = *(void ( **)(long long, _QWORD))(a2 + 32);
if ( v7 )
v7(1LL, *(_QWORD *)(a2 + 40));
my_context_yield(a2 + 56);
v8 = *(void ( **)(_QWORD, _QWORD))(a2 + 32);
v3 = 0;
if ( v8 )
v8(0LL, *(_QWORD *)(a2 + 40));
}
return v3;
}
| ma_tls_async_check_result:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV dword ptr [RSI],0x0
MOV R14B,0x1
TEST EDI,EDI
JS 0x00128329
LAB_00128321:
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
LAB_00128329:
MOV ESI,EDI
MOV RDI,RDX
CALL 0x00113050
CMP EAX,0x2
JZ 0x00128344
CMP EAX,0x3
JNZ 0x00128321
MOV EAX,0x2
JMP 0x00128349
LAB_00128344:
MOV EAX,0x1
LAB_00128349:
OR dword ptr [RBX],EAX
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x0012835f
MOV RSI,qword ptr [RBX + 0x28]
MOV EDI,0x1
CALL RAX
LAB_0012835f:
LEA RDI,[RBX + 0x38]
CALL 0x0012d751
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x0012837e
MOV RSI,qword ptr [RBX + 0x28]
XOR R14D,R14D
XOR EDI,EDI
CALL RAX
JMP 0x00128321
LAB_0012837e:
XOR R14D,R14D
JMP 0x00128321
|
ulong ma_tls_async_check_result(int param_1,uint *param_2,SSL *param_3)
{
int iVar1;
uint uVar2;
int8 unaff_R14;
ulong uVar3;
*param_2 = 0;
uVar3 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1);
if (param_1 < 0) {
iVar1 = SSL_get_error(param_3,param_1);
if (iVar1 == 2) {
uVar2 = 1;
}
else {
if (iVar1 != 3) goto LAB_00128321;
uVar2 = 2;
}
*param_2 = *param_2 | uVar2;
if (*(code **)(param_2 + 8) != (code *)0x0) {
(**(code **)(param_2 + 8))(1,*(int8 *)(param_2 + 10));
}
my_context_yield(param_2 + 0xe);
if (*(code **)(param_2 + 8) == (code *)0x0) {
uVar3 = 0;
}
else {
uVar3 = 0;
(**(code **)(param_2 + 8))(0,*(int8 *)(param_2 + 10));
}
}
LAB_00128321:
return uVar3 & 0xffffffff;
}
| |
40,740 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom() | monkey531[P]llama/common/json.hpp | bool skip_bom()
{
if (get() == 0xEF)
{
// check if we completely parse the BOM
return get() == 0xBB && get() == 0xBF;
}
// the first character is not the beginning of the BOM; unget it to
// process is later
unget();
return true;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom():
pushq %rbx
movq %rdi, %rbx
callq 0x42ac8
cmpl $0xef, %eax
jne 0x4220d
movq %rbx, %rdi
callq 0x42ac8
cmpl $0xbb, %eax
jne 0x42219
movq %rbx, %rdi
callq 0x42ac8
cmpl $0xbf, %eax
sete %al
jmp 0x4221b
movq %rbx, %rdi
callq 0x42b3e
movb $0x1, %al
jmp 0x4221b
xorl %eax, %eax
popq %rbx
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv:
push rbx
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0EFh
jnz short loc_4220D
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0BBh
jnz short loc_42219
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 0BFh
setz al
jmp short loc_4221B
loc_4220D:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
mov al, 1
jmp short loc_4221B
loc_42219:
xor eax, eax
loc_4221B:
pop rbx
retn
| bool nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(
long long a1)
{
if ( (unsigned int)((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get)() == 239 )
return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 187
&& (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 191;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
return 1;
}
| skip_bom:
PUSH RBX
MOV RBX,RDI
CALL 0x00142ac8
CMP EAX,0xef
JNZ 0x0014220d
MOV RDI,RBX
CALL 0x00142ac8
CMP EAX,0xbb
JNZ 0x00142219
MOV RDI,RBX
CALL 0x00142ac8
CMP EAX,0xbf
SETZ AL
JMP 0x0014221b
LAB_0014220d:
MOV RDI,RBX
CALL 0x00142b3e
MOV AL,0x1
JMP 0x0014221b
LAB_00142219:
XOR EAX,EAX
LAB_0014221b:
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::skip_bom() */
bool __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::skip_bom(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
bool bVar2;
iVar1 = get(this);
if (iVar1 == 0xef) {
iVar1 = get(this);
if (iVar1 == 0xbb) {
iVar1 = get(this);
bVar2 = iVar1 == 0xbf;
}
else {
bVar2 = false;
}
}
else {
unget(this);
bVar2 = true;
}
return bVar2;
}
| |
40,741 | translog_truncate_log | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_truncate_log(TRANSLOG_ADDRESS addr)
{
uchar *page;
TRANSLOG_ADDRESS current_page;
uint32 next_page_offset, page_rest;
uint32 i;
File fd;
int rc;
TRANSLOG_VALIDATOR_DATA data;
char path[FN_REFLEN];
uchar page_buff[TRANSLOG_PAGE_SIZE];
DBUG_ENTER("translog_truncate_log");
/* TODO: write warning to the client */
DBUG_PRINT("warning", ("removing all records from " LSN_FMT " "
"till " LSN_FMT,
LSN_IN_PARTS(addr),
LSN_IN_PARTS(log_descriptor.horizon)));
DBUG_ASSERT(cmp_translog_addr(addr, log_descriptor.horizon) < 0);
/* remove files between the address and horizon */
for (i= LSN_FILE_NO(addr) + 1; i <= LSN_FILE_NO(log_descriptor.horizon); i++)
if (mysql_file_delete(key_file_translog,
translog_filename_by_fileno(i, path), MYF(MY_WME)))
{
translog_unlock();
DBUG_RETURN(1);
}
/* truncate the last file up to the last page */
next_page_offset= LSN_OFFSET(addr);
next_page_offset= (next_page_offset -
((next_page_offset - 1) % TRANSLOG_PAGE_SIZE + 1) +
TRANSLOG_PAGE_SIZE);
page_rest= next_page_offset - LSN_OFFSET(addr);
memset(page_buff, TRANSLOG_FILLER, page_rest);
rc= ((fd= open_logfile_by_number_no_cache(LSN_FILE_NO(addr))) < 0 ||
((mysql_file_chsize(fd, next_page_offset, TRANSLOG_FILLER, MYF(MY_WME)) ||
(page_rest && my_pwrite(fd, page_buff, page_rest, LSN_OFFSET(addr),
log_write_flags)) ||
mysql_file_sync(fd, MYF(MY_WME)))));
translog_syncs++;
rc|= (fd > 0 && mysql_file_close(fd, MYF(MY_WME)));
if (sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS)
{
rc|= sync_dir(log_descriptor.directory_fd, MYF(MY_WME | MY_IGNORE_BADFD));
translog_syncs++;
}
if (rc)
DBUG_RETURN(1);
/* fix the horizon */
log_descriptor.horizon= addr;
/* fix the buffer data */
current_page= MAKE_LSN(LSN_FILE_NO(addr), (next_page_offset -
TRANSLOG_PAGE_SIZE));
data.addr= ¤t_page;
if ((page= translog_get_page(&data, log_descriptor.buffers->buffer, NULL)) ==
NULL)
DBUG_RETURN(1);
if (page != log_descriptor.buffers->buffer)
memcpy(log_descriptor.buffers->buffer, page, TRANSLOG_PAGE_SIZE);
log_descriptor.bc.buffer->offset= current_page;
log_descriptor.bc.buffer->size= LSN_OFFSET(addr) - LSN_OFFSET(current_page);
log_descriptor.bc.ptr=
log_descriptor.buffers->buffer + log_descriptor.bc.buffer->size;
log_descriptor.bc.current_page_fill= log_descriptor.bc.buffer->size;
DBUG_RETURN(0);
} | O3 | c | translog_truncate_log:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2278, %rsp # imm = 0x2278
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x2240(%rbp)
shrq $0x20, %rdi
movq %rdi, -0x2250(%rbp)
leal 0x1(%rdi), %r12d
leaq -0x230(%rbp), %r13
leaq -0x2230(%rbp), %r14
leaq -0x2298(%rbp), %rbx
cmpl 0xbb7b71(%rip), %r12d # 0xbfddac
ja 0x462b5
leaq 0x3b5c60(%rip), %rax # 0x3fbea4
movl (%rax), %r15d
movl %r12d, %edi
movq %r13, %rsi
callq 0x43d75
leaq 0x33edb7(%rip), %rax # 0x385010
movq (%rax), %rax
movq %r14, %rdi
movl %r15d, %esi
movl $0xe, %edx
movq %r13, %rcx
movq %rbx, %r8
callq *0x148(%rax)
movq %rax, -0x2298(%rbp)
testq %rax, %rax
jne 0x46298
movl $0x10, %esi
movq %r13, %rdi
callq 0x9d890
incl %r12d
testl %eax, %eax
je 0x46234
jmp 0x4640d
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
leaq -0x2238(%rbp), %rcx
callq 0x2c6e1
movl -0x2238(%rbp), %eax
jmp 0x4628c
movq -0x2240(%rbp), %rax
movl %eax, %r12d
negl %r12d
orl $0xffffe000, %r12d # imm = 0xFFFFE000
leal (%r12,%rax), %ebx
movl $0x2000, %r13d # imm = 0x2000
addl %r13d, %r12d
leaq -0x2230(%rbp), %rdi
movl $0x2000, %ecx # imm = 0x2000
movl $0xff, %esi
movq %r12, %rdx
callq 0x297d0
movq -0x2250(%rbp), %rdi
callq 0x4409e
testl %eax, %eax
movl %ebx, -0x2244(%rbp)
js 0x4643a
movl %eax, %r15d
addl %ebx, %r13d
movl %r13d, %ebx
leaq 0x33ecf7(%rip), %rax # 0x385010
movq (%rax), %rax
leaq -0x2298(%rbp), %rdi
movl %r15d, %esi
movl $0xd, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x465ad
movl $0x10, %ecx
movl %r15d, %edi
movq %rbx, %rsi
movl $0xff, %edx
callq 0x9d6d8
movl $0x1, %r14d
testl %eax, %eax
jne 0x463c3
cmpl -0x2240(%rbp), %r13d
je 0x46385
movl -0x2240(%rbp), %ecx
leaq -0x2230(%rbp), %rsi
movl $0x34, %r8d
movl %r15d, %edi
movq %r12, %rdx
callq 0xa00b2
testq %rax, %rax
jne 0x463c3
leaq 0x33ec84(%rip), %rax # 0x385010
movq (%rax), %rax
leaq -0x2298(%rbp), %rdi
movl %r15d, %esi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x46605
movl $0x10, %esi
movl %r15d, %edi
callq 0xa0d68
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
incq 0x3b5b8e(%rip) # 0x3fbf58
testl %r15d, %r15d
je 0x4644b
leaq 0x33ec3a(%rip), %rax # 0x385010
movq (%rax), %rax
leaq -0x2298(%rbp), %rdi
movl %r15d, %esi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x465e9
movl $0x10, %esi
movl %r15d, %edi
callq 0x9fe49
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
jmp 0x4644d
movq 0xbb79c4(%rip), %rbx # 0xbfddd8
movq 0x1000d0(%rbx), %rdi
testq %rdi, %rdi
jne 0x46598
addq $0x100090, %rbx # imm = 0x100090
movq %rbx, %rdi
callq 0x291e0
movb $0x1, %bl
jmp 0x46571
incq 0x3b5b17(%rip) # 0x3fbf58
xorl %ecx, %ecx
movl $0x1, %r14d
jmp 0x4644d
xorl %ecx, %ecx
orl %ecx, %r14d
cmpq $0x2, 0x33cd48(%rip) # 0x3831a0
jb 0x4649d
movl 0x3b6ff0(%rip), %ebx # 0x3fd450
leaq 0x33eba9(%rip), %rax # 0x385010
movq (%rax), %rax
leaq -0x2298(%rbp), %rdi
movl %ebx, %esi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x465cd
movl $0x30, %esi
movl %ebx, %edi
callq 0xa0d68
orl %eax, %r14d
incq 0x3b5abb(%rip) # 0x3fbf58
movb $0x1, %bl
testl %r14d, %r14d
jne 0x46571
movq -0x2240(%rbp), %rcx
movq %rcx, 0xbb78f2(%rip) # 0xbfdda8
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
movl -0x2244(%rbp), %ecx
orq %rax, %rcx
movq %rcx, -0x2238(%rbp)
leaq -0x2298(%rbp), %rdi
leaq -0x2238(%rbp), %rax
movq %rax, (%rdi)
leaq 0x3b6f6d(%rip), %r14 # 0x3fd458
movq %r14, %rsi
xorl %edx, %edx
callq 0x45804
testq %rax, %rax
je 0x46571
cmpq %r14, %rax
je 0x46513
leaq 0x3b6f52(%rip), %rdi # 0x3fd458
movl $0x2000, %edx # imm = 0x2000
movq %rax, %rsi
callq 0x29090
movq -0x2238(%rbp), %rax
leaq 0x3b6c3f(%rip), %rcx # 0x3fd160
movq 0xbb78b0(%rip), %rdx # 0xbfddd8
movq %rax, 0x100010(%rdx)
movq -0x2240(%rbp), %rdx
subl %eax, %edx
movq 0xbb7899(%rip), %rax # 0xbfddd8
movl %edx, 0x100030(%rax)
movq 0xbb788c(%rip), %rax # 0xbfddd8
movl 0x100030(%rax), %edx
leaq 0x2f8(%rdx,%rcx), %rcx
movq %rcx, 0xbb786f(%rip) # 0xbfddd0
movzwl 0x100030(%rax), %eax
movw %ax, 0xbb7871(%rip) # 0xbfdde0
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x46621
movl %ebx, %eax
addq $0x2278, %rsp # imm = 0x2278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x33ea71(%rip), %rax # 0x385010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x46424
leaq -0x2238(%rbp), %r14
movq %rax, %rdi
movq %rbx, %rsi
movl %r15d, %edx
movq %r14, %rcx
callq 0x2c738
movl (%r14), %eax
jmp 0x4634f
leaq -0x2238(%rbp), %r15
movq %rax, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x2c854
movl (%r15), %eax
jmp 0x46493
leaq -0x2238(%rbp), %rbx
movq %rax, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x2c7fd
movl (%rbx), %eax
jmp 0x46404
leaq -0x2238(%rbp), %rbx
movq %rax, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x2c7a4
movl (%rbx), %eax
jmp 0x463ba
callq 0x29260
| translog_truncate_log:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2278h
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_2240], rdi
shr rdi, 20h
mov [rbp+var_2250], rdi
lea r12d, [rdi+1]
lea r13, [rbp+var_230]
lea r14, [rbp+var_2230]
lea rbx, [rbp+var_2298]
loc_46234:
cmp r12d, dword ptr cs:qword_BFDDA8+4
ja short loc_462B5
lea rax, key_file_translog
mov r15d, [rax]
mov edi, r12d
mov rsi, r13
call translog_filename_by_fileno
lea rax, PSI_server
mov rax, [rax]
mov rdi, r14
mov esi, r15d
mov edx, 0Eh
mov rcx, r13
mov r8, rbx
call qword ptr [rax+148h]
mov [rbp+var_2298], rax
test rax, rax
jnz short loc_46298
mov esi, 10h
mov rdi, r13
call my_delete
loc_4628C:
inc r12d
test eax, eax
jz short loc_46234
jmp loc_4640D
loc_46298:
mov rdi, rax
mov rsi, r13
mov rdx, rbx
lea rcx, [rbp+var_2238]
call translog_truncate_log_cold_1
mov eax, dword ptr [rbp+var_2238]
jmp short loc_4628C
loc_462B5:
mov rax, [rbp+var_2240]
mov r12d, eax
neg r12d
or r12d, 0FFFFE000h
lea ebx, [r12+rax]
mov r13d, 2000h
add r12d, r13d
lea rdi, [rbp+var_2230]
mov ecx, 2000h
mov esi, 0FFh
mov rdx, r12
call ___memset_chk
mov rdi, [rbp+var_2250]
call open_logfile_by_number_no_cache
test eax, eax
mov [rbp+var_2244], ebx
js loc_4643A
mov r15d, eax
add r13d, ebx
mov ebx, r13d
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_2298]
mov esi, r15d
mov edx, 0Dh
call qword ptr [rax+158h]
test rax, rax
jnz loc_465AD
mov ecx, 10h
mov edi, r15d
mov rsi, rbx
mov edx, 0FFh
call my_chsize
loc_4634F:
mov r14d, 1
test eax, eax
jnz short loc_463C3
cmp r13d, dword ptr [rbp+var_2240]
jz short loc_46385
mov ecx, dword ptr [rbp+var_2240]
lea rsi, [rbp+var_2230]
mov r8d, 34h ; '4'
mov edi, r15d
mov rdx, r12
call my_pwrite
test rax, rax
jnz short loc_463C3
loc_46385:
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_2298]
mov esi, r15d
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz loc_46605
mov esi, 10h
mov edi, r15d
call my_sync
loc_463BA:
xor r14d, r14d
test eax, eax
setnz r14b
loc_463C3:
inc cs:translog_syncs
test r15d, r15d
jz short loc_4644B
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_2298]
mov esi, r15d
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz loc_465E9
mov esi, 10h
mov edi, r15d
call my_close
loc_46404:
xor ecx, ecx
test eax, eax
setnz cl
jmp short loc_4644D
loc_4640D:
mov rbx, qword ptr cs:xmmword_BFDDD0+8
mov rdi, ds:qword_1000D0[rbx]
test rdi, rdi
jnz loc_46598
loc_46424:
add rbx, 100090h
mov rdi, rbx
call _pthread_mutex_unlock
mov bl, 1
jmp loc_46571
loc_4643A:
inc cs:translog_syncs
xor ecx, ecx
mov r14d, 1
jmp short loc_4644D
loc_4644B:
xor ecx, ecx
loc_4644D:
or r14d, ecx
cmp cs:sync_log_dir, 2
jb short loc_4649D
mov ebx, cs:dword_3FD450
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_2298]
mov esi, ebx
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz loc_465CD
mov esi, 30h ; '0'
mov edi, ebx
call my_sync
loc_46493:
or r14d, eax
inc cs:translog_syncs
loc_4649D:
mov bl, 1
test r14d, r14d
jnz loc_46571
mov rcx, [rbp+var_2240]
mov cs:qword_BFDDA8, rcx
mov rax, 0FFFFFFFF00000000h
and rax, rcx
mov ecx, [rbp+var_2244]
or rcx, rax
mov [rbp+var_2238], rcx
lea rdi, [rbp+var_2298]
lea rax, [rbp+var_2238]
mov [rdi], rax
lea r14, unk_3FD458
mov rsi, r14
xor edx, edx
call translog_get_page
test rax, rax
jz short loc_46571
cmp rax, r14
jz short loc_46513
lea rdi, unk_3FD458
mov edx, 2000h
mov rsi, rax
call _memcpy
loc_46513:
mov rax, [rbp+var_2238]
lea rcx, log_descriptor
mov rdx, qword ptr cs:xmmword_BFDDD0+8
mov ds:qword_100010[rdx], rax
mov rdx, [rbp+var_2240]
sub edx, eax
mov rax, qword ptr cs:xmmword_BFDDD0+8
mov dword ptr ds:qword_100030[rax], edx
mov rax, qword ptr cs:xmmword_BFDDD0+8
mov edx, dword ptr ds:qword_100030[rax]
lea rcx, [rdx+rcx+2F8h]
mov qword ptr cs:xmmword_BFDDD0, rcx
movzx eax, word ptr ds:qword_100030[rax]
mov word ptr cs:xmmword_BFDDE0, ax
xor ebx, ebx
loc_46571:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_46621
mov eax, ebx
add rsp, 2278h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_46598:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_46424
loc_465AD:
lea r14, [rbp+var_2238]
mov rdi, rax
mov rsi, rbx
mov edx, r15d
mov rcx, r14
call translog_truncate_log_cold_2
mov eax, [r14]
jmp loc_4634F
loc_465CD:
lea r15, [rbp+var_2238]
mov rdi, rax
mov esi, ebx
mov rdx, r15
call translog_truncate_log_cold_5
mov eax, [r15]
jmp loc_46493
loc_465E9:
lea rbx, [rbp+var_2238]
mov rdi, rax
mov esi, r15d
mov rdx, rbx
call translog_truncate_log_cold_4
mov eax, [rbx]
jmp loc_46404
loc_46605:
lea rbx, [rbp+var_2238]
mov rdi, rax
mov esi, r15d
mov rdx, rbx
call translog_truncate_log_cold_3
mov eax, [rbx]
jmp loc_463BA
loc_46621:
call ___stack_chk_fail
| long long translog_truncate_log(unsigned long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
unsigned int i; // r12d
unsigned int v7; // r15d
long long *v8; // rax
int v9; // eax
unsigned int v10; // r12d
unsigned long long *v11; // rbx
long long v12; // r12
long long v13; // rdx
long long v14; // rcx
int v15; // r8d
int v16; // r9d
int v17; // eax
unsigned int v18; // r15d
unsigned int v19; // r13d
long long v20; // rax
int v21; // eax
BOOL v22; // r14d
long long v23; // rax
int v24; // eax
long long v25; // rax
int v26; // eax
BOOL v27; // ecx
long long v28; // rbx
int v29; // r14d
long long v30; // rax
int v31; // eax
void *page; // rax
int v33; // eax
long long *v35[9]; // [rsp+8h] [rbp-2298h] BYREF
unsigned long long v36; // [rsp+50h] [rbp-2250h]
unsigned int v37; // [rsp+5Ch] [rbp-2244h]
long long v38; // [rsp+60h] [rbp-2240h]
unsigned long long v39; // [rsp+68h] [rbp-2238h] BYREF
_BYTE v40[8192]; // [rsp+70h] [rbp-2230h] BYREF
_BYTE v41[512]; // [rsp+2070h] [rbp-230h] BYREF
unsigned long long v42; // [rsp+2270h] [rbp-30h]
v42 = __readfsqword(0x28u);
v38 = a1;
v36 = HIDWORD(a1);
for ( i = HIDWORD(a1) + 1; i <= HIDWORD(qword_BFDDA8); ++i )
{
v7 = key_file_translog;
translog_filename_by_fileno(i, (long long)v41, a3, a4, a5, a6);
v8 = (long long *)((long long ( *)(_BYTE *, _QWORD, long long, _BYTE *, long long **))PSI_server[41])(
v40,
v7,
14LL,
v41,
v35);
v35[0] = v8;
if ( v8 )
{
translog_truncate_log_cold_1((long long)v8, (long long)v41, v35, (unsigned int *)&v39);
v9 = v39;
}
else
{
v9 = my_delete(v41, 16LL);
}
if ( v9 )
{
v28 = *((_QWORD *)&xmmword_BFDDD0 + 1);
if ( *(long long *)((char *)&qword_1000D0 + *((_QWORD *)&xmmword_BFDDD0 + 1)) )
PSI_server[44]();
v11 = (unsigned long long *)(v28 + 1048720);
pthread_mutex_unlock(v11);
LOBYTE(v11) = 1;
return (unsigned int)v11;
}
}
v10 = -(int)v38 | 0xFFFFE000;
LODWORD(v11) = v10 + v38;
v12 = v10 + 0x2000;
__memset_chk(v40, 255LL, v12, 0x2000LL);
v17 = open_logfile_by_number_no_cache(v36, 255LL, v13, v14, v15, v16);
v37 = (unsigned int)v11;
if ( v17 < 0 )
{
++translog_syncs;
v27 = 0;
v22 = 1;
}
else
{
v18 = v17;
v19 = (_DWORD)v11 + 0x2000;
LODWORD(v11) = (_DWORD)v11 + 0x2000;
v20 = ((long long ( *)(long long **, _QWORD, long long))PSI_server[43])(v35, (unsigned int)v17, 13LL);
if ( v20 )
{
translog_truncate_log_cold_2(v20, v19, v18, &v39);
v21 = v39;
}
else
{
v21 = my_chsize(v18, v19, 255LL, 16LL);
}
v22 = 1;
if ( !v21 && (v19 == (_DWORD)v38 || !my_pwrite(v18, v40, v12, (unsigned int)v38, 52LL)) )
{
v23 = ((long long ( *)(long long **, _QWORD, long long))PSI_server[43])(v35, v18, 16LL);
if ( v23 )
{
v11 = &v39;
translog_truncate_log_cold_3(v23, v18, &v39);
v24 = v39;
}
else
{
v24 = my_sync(v18, 16LL);
}
v22 = v24 != 0;
}
++translog_syncs;
if ( v18 )
{
v25 = ((long long ( *)(long long **, _QWORD, long long))PSI_server[43])(v35, v18, 4LL);
if ( v25 )
{
v11 = &v39;
translog_truncate_log_cold_4(v25, v18, (unsigned int *)&v39);
v26 = v39;
}
else
{
v26 = my_close(v18, 16LL);
}
v27 = v26 != 0;
}
else
{
v27 = 0;
}
}
v29 = v27 || v22;
if ( (unsigned long long)sync_log_dir >= 2 )
{
LODWORD(v11) = dword_3FD450;
v30 = ((long long ( *)(long long **, _QWORD, long long))PSI_server[43])(v35, (unsigned int)dword_3FD450, 16LL);
if ( v30 )
{
translog_truncate_log_cold_5(v30, (unsigned int)v11, &v39);
v31 = v39;
}
else
{
v31 = my_sync((unsigned int)v11, 48LL);
}
v29 |= v31;
++translog_syncs;
}
LOBYTE(v11) = 1;
if ( !v29 )
{
qword_BFDDA8 = v38;
v39 = v38 & 0xFFFFFFFF00000000LL | v37;
v35[0] = (long long *)&v39;
page = (void *)translog_get_page(v35, (long long)&unk_3FD458, 0LL);
if ( page )
{
if ( page != &unk_3FD458 )
memcpy(&unk_3FD458, page, 0x2000LL);
v33 = v39;
*(long long *)((char *)&qword_100010 + *((_QWORD *)&xmmword_BFDDD0 + 1)) = v39;
*(_DWORD *)((char *)&qword_100030 + *((_QWORD *)&xmmword_BFDDD0 + 1)) = v38 - v33;
*(_QWORD *)&xmmword_BFDDD0 = (char *)&log_descriptor[95]
+ *(unsigned int *)((char *)&qword_100030 + *((_QWORD *)&xmmword_BFDDD0 + 1));
LOWORD(xmmword_BFDDE0) = *(_WORD *)((char *)&qword_100030 + *((_QWORD *)&xmmword_BFDDD0 + 1));
LODWORD(v11) = 0;
}
}
return (unsigned int)v11;
}
| translog_truncate_log:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2278
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x2240],RDI
SHR RDI,0x20
MOV qword ptr [RBP + -0x2250],RDI
LEA R12D,[RDI + 0x1]
LEA R13,[RBP + -0x230]
LEA R14,[RBP + -0x2230]
LEA RBX,[RBP + -0x2298]
LAB_00146234:
CMP R12D,dword ptr [0x00cfddac]
JA 0x001462b5
LEA RAX,[0x4fbea4]
MOV R15D,dword ptr [RAX]
MOV EDI,R12D
MOV RSI,R13
CALL 0x00143d75
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
MOV RDI,R14
MOV ESI,R15D
MOV EDX,0xe
MOV RCX,R13
MOV R8,RBX
CALL qword ptr [RAX + 0x148]
MOV qword ptr [RBP + -0x2298],RAX
TEST RAX,RAX
JNZ 0x00146298
MOV ESI,0x10
MOV RDI,R13
CALL 0x0019d890
LAB_0014628c:
INC R12D
TEST EAX,EAX
JZ 0x00146234
JMP 0x0014640d
LAB_00146298:
MOV RDI,RAX
MOV RSI,R13
MOV RDX,RBX
LEA RCX,[RBP + -0x2238]
CALL 0x0012c6e1
MOV EAX,dword ptr [RBP + -0x2238]
JMP 0x0014628c
LAB_001462b5:
MOV RAX,qword ptr [RBP + -0x2240]
MOV R12D,EAX
NEG R12D
OR R12D,0xffffe000
LEA EBX,[R12 + RAX*0x1]
MOV R13D,0x2000
ADD R12D,R13D
LEA RDI,[RBP + -0x2230]
MOV ECX,0x2000
MOV ESI,0xff
MOV RDX,R12
CALL 0x001297d0
MOV RDI,qword ptr [RBP + -0x2250]
CALL 0x0014409e
TEST EAX,EAX
MOV dword ptr [RBP + -0x2244],EBX
JS 0x0014643a
MOV R15D,EAX
ADD R13D,EBX
MOV EBX,R13D
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x2298]
MOV ESI,R15D
MOV EDX,0xd
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001465ad
MOV ECX,0x10
MOV EDI,R15D
MOV RSI,RBX
MOV EDX,0xff
CALL 0x0019d6d8
LAB_0014634f:
MOV R14D,0x1
TEST EAX,EAX
JNZ 0x001463c3
CMP R13D,dword ptr [RBP + -0x2240]
JZ 0x00146385
MOV ECX,dword ptr [RBP + -0x2240]
LEA RSI,[RBP + -0x2230]
MOV R8D,0x34
MOV EDI,R15D
MOV RDX,R12
CALL 0x001a00b2
TEST RAX,RAX
JNZ 0x001463c3
LAB_00146385:
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x2298]
MOV ESI,R15D
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00146605
MOV ESI,0x10
MOV EDI,R15D
CALL 0x001a0d68
LAB_001463ba:
XOR R14D,R14D
TEST EAX,EAX
SETNZ R14B
LAB_001463c3:
INC qword ptr [0x004fbf58]
TEST R15D,R15D
JZ 0x0014644b
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x2298]
MOV ESI,R15D
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001465e9
MOV ESI,0x10
MOV EDI,R15D
CALL 0x0019fe49
LAB_00146404:
XOR ECX,ECX
TEST EAX,EAX
SETNZ CL
JMP 0x0014644d
LAB_0014640d:
MOV RBX,qword ptr [0x00cfddd8]
MOV RDI,qword ptr [RBX + 0x1000d0]
TEST RDI,RDI
JNZ 0x00146598
LAB_00146424:
ADD RBX,0x100090
MOV RDI,RBX
CALL 0x001291e0
MOV BL,0x1
JMP 0x00146571
LAB_0014643a:
INC qword ptr [0x004fbf58]
XOR ECX,ECX
MOV R14D,0x1
JMP 0x0014644d
LAB_0014644b:
XOR ECX,ECX
LAB_0014644d:
OR R14D,ECX
CMP qword ptr [0x004831a0],0x2
JC 0x0014649d
MOV EBX,dword ptr [0x004fd450]
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x2298]
MOV ESI,EBX
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001465cd
MOV ESI,0x30
MOV EDI,EBX
CALL 0x001a0d68
LAB_00146493:
OR R14D,EAX
INC qword ptr [0x004fbf58]
LAB_0014649d:
MOV BL,0x1
TEST R14D,R14D
JNZ 0x00146571
MOV RCX,qword ptr [RBP + -0x2240]
MOV qword ptr [0x00cfdda8],RCX
MOV RAX,-0x100000000
AND RAX,RCX
MOV ECX,dword ptr [RBP + -0x2244]
OR RCX,RAX
MOV qword ptr [RBP + -0x2238],RCX
LEA RDI,[RBP + -0x2298]
LEA RAX,[RBP + -0x2238]
MOV qword ptr [RDI],RAX
LEA R14,[0x4fd458]
MOV RSI,R14
XOR EDX,EDX
CALL 0x00145804
TEST RAX,RAX
JZ 0x00146571
CMP RAX,R14
JZ 0x00146513
LEA RDI,[0x4fd458]
MOV EDX,0x2000
MOV RSI,RAX
CALL 0x00129090
LAB_00146513:
MOV RAX,qword ptr [RBP + -0x2238]
LEA RCX,[0x4fd160]
MOV RDX,qword ptr [0x00cfddd8]
MOV qword ptr [RDX + 0x100010],RAX
MOV RDX,qword ptr [RBP + -0x2240]
SUB EDX,EAX
MOV RAX,qword ptr [0x00cfddd8]
MOV dword ptr [RAX + 0x100030],EDX
MOV RAX,qword ptr [0x00cfddd8]
MOV EDX,dword ptr [RAX + 0x100030]
LEA RCX,[RDX + RCX*0x1 + 0x2f8]
MOV qword ptr [0x00cfddd0],RCX
MOVZX EAX,word ptr [RAX + 0x100030]
MOV word ptr [0x00cfdde0],AX
XOR EBX,EBX
LAB_00146571:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00146621
MOV EAX,EBX
ADD RSP,0x2278
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00146598:
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00146424
LAB_001465ad:
LEA R14,[RBP + -0x2238]
MOV RDI,RAX
MOV RSI,RBX
MOV EDX,R15D
MOV RCX,R14
CALL 0x0012c738
MOV EAX,dword ptr [R14]
JMP 0x0014634f
LAB_001465cd:
LEA R15,[RBP + -0x2238]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R15
CALL 0x0012c854
MOV EAX,dword ptr [R15]
JMP 0x00146493
LAB_001465e9:
LEA RBX,[RBP + -0x2238]
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,RBX
CALL 0x0012c7fd
MOV EAX,dword ptr [RBX]
JMP 0x00146404
LAB_00146605:
LEA RBX,[RBP + -0x2238]
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,RBX
CALL 0x0012c7a4
MOV EAX,dword ptr [RBX]
JMP 0x001463ba
LAB_00146621:
CALL 0x00129260
|
ulong translog_truncate_log(ulong param_1)
{
int4 uVar1;
uint uVar2;
int iVar3;
int iVar4;
long lVar5;
int *__src;
ulong *puVar6;
pthread_mutex_t *__mutex;
ulong uVar7;
uint uVar8;
uint uVar9;
int iVar10;
long in_FS_OFFSET;
ulong *local_22a0 [9];
ulong local_2258;
uint local_224c;
ulong local_2248;
ulong local_2240;
int1 local_2238 [8192];
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_2258 = param_1 >> 0x20;
uVar8 = (uint)(param_1 >> 0x20);
local_2248 = param_1;
do {
uVar1 = key_file_translog;
uVar8 = uVar8 + 1;
if (DAT_00cfdda8._4_4_ < uVar8) {
uVar9 = -(int)local_2248 | 0xffffe000;
uVar8 = uVar9 + (int)local_2248;
puVar6 = (ulong *)(ulong)uVar8;
iVar10 = uVar9 + 0x2000;
__memset_chk(local_2238,0xff,iVar10);
iVar3 = open_logfile_by_number_no_cache(local_2258);
local_224c = uVar8;
if (iVar3 < 0) {
translog_syncs = translog_syncs + 1;
uVar8 = 0;
uVar9 = 1;
}
else {
puVar6 = (ulong *)(ulong)(uVar8 + 0x2000);
lVar5 = (**(code **)(PSI_server + 0x158))(local_22a0,iVar3,0xd);
if (lVar5 == 0) {
iVar4 = my_chsize(iVar3,puVar6,0xff);
}
else {
translog_truncate_log_cold_2(lVar5,puVar6,iVar3);
iVar4 = (uint)local_2240;
}
uVar9 = 1;
if (iVar4 == 0) {
if (uVar8 + 0x2000 != (uint)local_2248) {
lVar5 = my_pwrite(iVar3,local_2238,iVar10,local_2248 & 0xffffffff,0x34);
if (lVar5 != 0) goto LAB_001463c3;
}
lVar5 = (**(code **)(PSI_server + 0x158))(local_22a0,iVar3,0x10);
if (lVar5 == 0) {
iVar10 = my_sync(iVar3,0x10);
}
else {
puVar6 = &local_2240;
translog_truncate_log_cold_3(lVar5,iVar3,puVar6);
iVar10 = (uint)local_2240;
}
uVar9 = (uint)(iVar10 != 0);
}
LAB_001463c3:
translog_syncs = translog_syncs + 1;
if (iVar3 == 0) {
uVar8 = 0;
}
else {
lVar5 = (**(code **)(PSI_server + 0x158))(local_22a0,iVar3,4);
if (lVar5 == 0) {
iVar3 = my_close(iVar3,0x10);
}
else {
puVar6 = &local_2240;
translog_truncate_log_cold_4(lVar5,iVar3,puVar6);
iVar3 = (uint)local_2240;
}
uVar8 = (uint)(iVar3 != 0);
}
}
uVar2 = DAT_004fd450;
uVar9 = uVar9 | uVar8;
if (1 < sync_log_dir) {
puVar6 = (ulong *)(ulong)DAT_004fd450;
lVar5 = (**(code **)(PSI_server + 0x158))(local_22a0,DAT_004fd450,0x10);
if (lVar5 == 0) {
uVar8 = my_sync(uVar2,0x30);
}
else {
translog_truncate_log_cold_5(lVar5,uVar2,&local_2240);
uVar8 = (uint)local_2240;
}
uVar9 = uVar9 | uVar8;
translog_syncs = translog_syncs + 1;
}
uVar7 = CONCAT71((int7)((ulong)puVar6 >> 8),1);
if (uVar9 == 0) {
DAT_00cfdda8 = local_2248;
local_2240 = (ulong)local_224c | local_2248 & 0xffffffff00000000;
local_22a0[0] = &local_2240;
__src = (int *)translog_get_page(local_22a0,&DAT_004fd458,0);
if (__src != (int *)0x0) {
if (__src != &DAT_004fd458) {
memcpy(&DAT_004fd458,__src,0x2000);
}
*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00cfddd8 + 7) = local_2240;
*(int *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00cfddd8 + 0x27) =
(int)local_2248 - (int)local_2240;
DAT_00cfddd0 = &DAT_004fd458 +
*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00cfddd8 + 0x27);
DAT_00cfdde0 = *(int2 *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00cfddd8 + 0x27);
uVar7 = 0;
}
}
goto LAB_00146571;
}
translog_filename_by_fileno(uVar8,local_238);
local_22a0[0] =
(ulong *)(**(code **)(PSI_server + 0x148))(local_2238,uVar1,0xe,local_238,local_22a0);
if (local_22a0[0] == (ulong *)0x0) {
iVar3 = my_delete(local_238,0x10);
}
else {
translog_truncate_log_cold_1(local_22a0[0],local_238,local_22a0,&local_2240);
iVar3 = (uint)local_2240;
}
lVar5 = DAT_00cfddd8;
} while (iVar3 == 0);
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00cfddd8) != 0) {
(**(code **)(PSI_server + 0x160))();
}
__mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar5);
pthread_mutex_unlock(__mutex);
uVar7 = CONCAT71((int7)((ulong)__mutex >> 8),1);
LAB_00146571:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar7 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,742 | my_default_csname | eloqsql/mysys/charset.c | const char* my_default_csname()
{
const char* csname = NULL;
#ifdef _WIN32
char cpbuf[64];
int cp = GetConsoleCP();
if (cp == 0)
cp = GetACP();
snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp);
csname = my_os_charset_to_mysql_charset(cpbuf);
#elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO)
if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET)))
csname = my_os_charset_to_mysql_charset(csname);
#endif
return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME;
} | O0 | c | my_default_csname:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x0, -0x8(%rbp)
xorl %edi, %edi
leaq 0x7b1c1(%rip), %rsi # 0x157aca
callq 0x2a5f0
cmpq $0x0, %rax
je 0xdc935
movl $0xe, %edi
callq 0x2a590
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0xdc935
movq -0x8(%rbp), %rdi
callq 0xdc960
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xdc946
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xdc953
leaq 0x773b4(%rip), %rax # 0x153d01
movq %rax, -0x10(%rbp)
jmp 0xdc953
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_default_csname:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], 0
xor edi, edi
lea rsi, asc_157AC6+4; ""
call _setlocale
cmp rax, 0
jz short loc_DC935
mov edi, 0Eh
call _nl_langinfo
mov [rbp+var_8], rax
cmp rax, 0
jz short loc_DC935
mov rdi, [rbp+var_8]
call my_os_charset_to_mysql_charset
mov [rbp+var_8], rax
loc_DC935:
cmp [rbp+var_8], 0
jz short loc_DC946
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
jmp short loc_DC953
loc_DC946:
lea rax, aLatin1; "latin1"
mov [rbp+var_10], rax
jmp short $+2
loc_DC953:
mov rax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
| const char *my_default_csname()
{
long long v2; // [rsp+8h] [rbp-8h]
v2 = 0LL;
if ( setlocale(0LL, "") )
{
v2 = nl_langinfo(14LL);
if ( v2 )
v2 = my_os_charset_to_mysql_charset(v2);
}
if ( v2 )
return (const char *)v2;
else
return "latin1";
}
| my_default_csname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],0x0
XOR EDI,EDI
LEA RSI,[0x257aca]
CALL 0x0012a5f0
CMP RAX,0x0
JZ 0x001dc935
MOV EDI,0xe
CALL 0x0012a590
MOV qword ptr [RBP + -0x8],RAX
CMP RAX,0x0
JZ 0x001dc935
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001dc960
MOV qword ptr [RBP + -0x8],RAX
LAB_001dc935:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001dc946
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001dc953
LAB_001dc946:
LEA RAX,[0x253d01]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001dc953
LAB_001dc953:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
char * my_default_csname(void)
{
char *pcVar1;
char *local_18;
char *local_10;
local_10 = (char *)0x0;
pcVar1 = setlocale(0,"");
if (pcVar1 != (char *)0x0) {
local_10 = nl_langinfo(0xe);
if (local_10 != (char *)0x0) {
local_10 = (char *)my_os_charset_to_mysql_charset(local_10);
}
}
if (local_10 == (char *)0x0) {
local_18 = "latin1";
}
else {
local_18 = local_10;
}
return local_18;
}
| |
40,743 | my_default_csname | eloqsql/mysys/charset.c | const char* my_default_csname()
{
const char* csname = NULL;
#ifdef _WIN32
char cpbuf[64];
int cp = GetConsoleCP();
if (cp == 0)
cp = GetACP();
snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp);
csname = my_os_charset_to_mysql_charset(cpbuf);
#elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO)
if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET)))
csname = my_os_charset_to_mysql_charset(csname);
#endif
return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME;
} | O3 | c | my_default_csname:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x4c860(%rip), %rsi # 0xdfc46
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x29630
testq %rax, %rax
je 0x93442
movl $0xe, %edi
callq 0x295d0
testq %rax, %rax
je 0x9343f
movq %rax, %rbx
leaq 0x48b0e(%rip), %rdi # 0xdbf1c
leaq 0x2e8113(%rip), %r15 # 0x37b528
xorl %r14d, %r14d
movq %rbx, %rsi
callq 0x29650
testl %eax, %eax
je 0x93432
movq (%r15), %rdi
addq $0x18, %r15
testq %rdi, %rdi
jne 0x93418
jmp 0x93442
cmpl $0x2, -0x8(%r15)
jae 0x9343f
movq -0x10(%r15), %r14
jmp 0x93442
xorl %r14d, %r14d
testq %r14, %r14
leaq 0x48a46(%rip), %rax # 0xdbe92
cmovneq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_default_csname:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea rsi, asc_DFC42+4; ""
xor r14d, r14d
xor edi, edi
call _setlocale
test rax, rax
jz short loc_93442
mov edi, 0Eh
call _nl_langinfo
test rax, rax
jz short loc_9343F
mov rbx, rax
lea rdi, a646; "646"
lea r15, off_37B528; "ANSI_X3.4-1968"
xor r14d, r14d
loc_93418:
mov rsi, rbx
call _strcasecmp
test eax, eax
jz short loc_93432
mov rdi, [r15]
add r15, 18h
test rdi, rdi
jnz short loc_93418
jmp short loc_93442
loc_93432:
cmp dword ptr [r15-8], 2
jnb short loc_9343F
mov r14, [r15-10h]
jmp short loc_93442
loc_9343F:
xor r14d, r14d
loc_93442:
test r14, r14
lea rax, aLatin1; "latin1"
cmovnz rax, r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| const char *my_default_csname()
{
long long v0; // r14
long long v1; // rax
long long v2; // rbx
const char *v3; // rdi
const char **v4; // r15
const char *result; // rax
v0 = 0LL;
if ( setlocale(0LL, "") )
{
v1 = nl_langinfo(14LL);
if ( !v1 )
goto LABEL_9;
v2 = v1;
v3 = "646";
v4 = (const char **)off_37B528;
v0 = 0LL;
while ( (unsigned int)strcasecmp(v3, v2) )
{
v3 = *v4;
v4 += 3;
if ( !v3 )
goto LABEL_10;
}
if ( *((_DWORD *)v4 - 2) < 2u )
v0 = (long long)*(v4 - 2);
else
LABEL_9:
v0 = 0LL;
}
LABEL_10:
result = "latin1";
if ( v0 )
return (const char *)v0;
return result;
}
| my_default_csname:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA RSI,[0x1dfc46]
XOR R14D,R14D
XOR EDI,EDI
CALL 0x00129630
TEST RAX,RAX
JZ 0x00193442
MOV EDI,0xe
CALL 0x001295d0
TEST RAX,RAX
JZ 0x0019343f
MOV RBX,RAX
LEA RDI,[0x1dbf1c]
LEA R15,[0x47b528]
XOR R14D,R14D
LAB_00193418:
MOV RSI,RBX
CALL 0x00129650
TEST EAX,EAX
JZ 0x00193432
MOV RDI,qword ptr [R15]
ADD R15,0x18
TEST RDI,RDI
JNZ 0x00193418
JMP 0x00193442
LAB_00193432:
CMP dword ptr [R15 + -0x8],0x2
JNC 0x0019343f
MOV R14,qword ptr [R15 + -0x10]
JMP 0x00193442
LAB_0019343f:
XOR R14D,R14D
LAB_00193442:
TEST R14,R14
LEA RAX,[0x1dbe92]
CMOVNZ RAX,R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
char * my_default_csname(void)
{
int iVar1;
char *pcVar2;
char *__s1;
char *pcVar3;
long *plVar4;
pcVar3 = (char *)0x0;
pcVar2 = setlocale(0,"");
if (pcVar2 != (char *)0x0) {
pcVar2 = nl_langinfo(0xe);
if (pcVar2 == (char *)0x0) {
LAB_0019343f:
pcVar3 = (char *)0x0;
}
else {
__s1 = "646";
plVar4 = (long *)(charsets + 0x18);
pcVar3 = (char *)0x0;
do {
iVar1 = strcasecmp(__s1,pcVar2);
if (iVar1 == 0) {
if (1 < *(uint *)(plVar4 + -1)) goto LAB_0019343f;
pcVar3 = (char *)plVar4[-2];
break;
}
__s1 = (char *)*plVar4;
plVar4 = plVar4 + 3;
} while (__s1 != (char *)0x0);
}
}
pcVar2 = "latin1";
if (pcVar3 != (char *)0x0) {
pcVar2 = pcVar3;
}
return pcVar2;
}
| |
40,744 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[]<char const>(char const*) const | monkey531[P]llama/common/json.hpp | const_reference operator[](T* key) const
{
return operator[](typename object_t::key_type(key));
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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>::operator[]<char const>(char const*) const:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x578c2
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb02e8
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaa193
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b930
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 0xaa1bc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b930
movq %rbx, %rdi
callq 0x1c0d0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string const&)
mov rbx, rax
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AA193
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AA193:
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_AA1BC
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AA1BC:
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
long long a1,
_BYTE *a2)
{
long long v2; // rbx
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-20h] BYREF
std::string::basic_string<std::allocator<char>>(v4, a2);
v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
a1,
v4);
if ( v4[0] != &v5 )
operator delete(v4[0], v5 + 1);
return v2;
}
| operator[]<char_const>:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
CALL 0x001578c2
LAB_001aa16a:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001b02e8
LAB_001aa175:
MOV RBX,RAX
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001aa193
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b930
LAB_001aa193:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[]<char const>(char const*) const */
basic_json * __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[]<char_const>
(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,char *param_1)
{
basic_json *pbVar1;
allocator local_31;
long *local_30 [2];
long local_20 [2];
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31);
/* try { // try from 001aa16a to 001aa174 has its CatchHandler @ 001aa19e */
pbVar1 = (basic_json *)operator[](this,(string *)local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return pbVar1;
}
| |
40,745 | pfs_get_thread_file_descriptor_locker_v1 | eloqsql/storage/perfschema/pfs.cc | PSI_file_locker*
pfs_get_thread_file_descriptor_locker_v1(PSI_file_locker_state *state,
File file, PSI_file_operation op)
{
int index= static_cast<int> (file);
assert(static_cast<int> (op) >= 0);
assert(static_cast<uint> (op) < array_elements(file_operation_map));
assert(state != NULL);
if (unlikely((index < 0) || (index >= file_handle_max)))
return NULL;
PFS_file *pfs_file= file_handle_array[index];
if (unlikely(pfs_file == NULL))
return NULL;
/*
We are about to close a file by descriptor number,
and the calling code still holds the descriptor.
Cleanup the file descriptor <--> file instrument association.
Remove the instrumentation *before* the close to avoid race
conditions with another thread opening a file
(that could be given the same descriptor).
*/
if (op == PSI_FILE_CLOSE)
file_handle_array[index]= NULL;
if (! pfs_file->m_enabled)
return NULL;
assert(pfs_file->m_class != NULL);
PFS_file_class *klass= pfs_file->m_class;
/* Needed for the LF_HASH */
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
uint flags;
/* Always populated */
state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
if (flag_thread_instrumentation)
{
if (! pfs_thread->m_enabled)
return NULL;
flags= STATE_FLAG_THREAD;
if (pfs_file->m_timed)
flags|= STATE_FLAG_TIMED;
if (flag_events_waits_current)
{
if (unlikely(pfs_thread->m_events_waits_current >=
& pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE]))
{
locker_lost++;
return NULL;
}
PFS_events_waits *wait= pfs_thread->m_events_waits_current;
state->m_wait= wait;
flags|= STATE_FLAG_EVENT;
PFS_events_waits *parent_event= wait - 1;
wait->m_event_type= EVENT_TYPE_WAIT;
wait->m_nesting_event_id= parent_event->m_event_id;
wait->m_nesting_event_type= parent_event->m_event_type;
wait->m_thread_internal_id= pfs_thread->m_thread_internal_id;
wait->m_class= klass;
wait->m_timer_start= 0;
wait->m_timer_end= 0;
wait->m_object_instance_addr= pfs_file;
wait->m_weak_file= pfs_file;
wait->m_weak_version= pfs_file->get_version();
wait->m_event_id= pfs_thread->m_event_id++;
wait->m_end_event_id= 0;
wait->m_operation= file_operation_map[static_cast<int> (op)];
wait->m_wait_class= WAIT_CLASS_FILE;
pfs_thread->m_events_waits_current++;
}
}
else
{
if (pfs_file->m_timed)
{
flags= STATE_FLAG_TIMED;
}
else
{
/* TODO: consider a shortcut. */
flags= 0;
}
}
state->m_flags= flags;
state->m_file= reinterpret_cast<PSI_file*> (pfs_file);
state->m_operation= op;
state->m_name= NULL;
state->m_class= klass;
return reinterpret_cast<PSI_file_locker*> (state);
} | O3 | cpp | pfs_get_thread_file_descriptor_locker_v1:
xorl %eax, %eax
testl %esi, %esi
js 0x2945d
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movslq %esi, %rcx
leaq 0x3a3b53(%rip), %rdx # 0x3cce48
cmpq %rcx, (%rdx)
jle 0x29455
leaq 0x3a3bb3(%rip), %rax # 0x3cceb8
movq (%rax), %rax
movq (%rax,%rcx,8), %r15
testq %r15, %r15
je 0x29453
movq %rdi, %rbx
cmpl $0x4, %r14d
jne 0x29323
andq $0x0, (%rax,%rcx,8)
cmpb $0x1, 0x4(%r15)
jne 0x29453
movq 0x220(%r15), %r12
movl 0x3a6f31(%rip), %edi # 0x3d026c
callq 0x26540
testq %rax, %rax
je 0x29453
movq %rax, 0x20(%rbx)
leaq 0x3a78ec(%rip), %rcx # 0x3d0c40
cmpb $0x1, (%rcx)
jne 0x2942c
cmpb $0x1, 0x7e0(%rax)
jne 0x29453
movzbl 0x5(%r15), %ecx
orl $0x2, %ecx
leaq 0x3a77c7(%rip), %rdx # 0x3d0b40
cmpb $0x1, (%rdx)
jne 0x29431
movq 0x7f0(%rax), %rdx
movq %rax, %rsi
addq $0xc98, %rsi # imm = 0xC98
cmpq %rsi, %rdx
jae 0x29449
movq %rdx, 0x40(%rbx)
orl $0x4, %ecx
movl $0x4, 0x18(%rdx)
movq -0xa8(%rdx), %rsi
movq %rsi, 0x20(%rdx)
movl -0x98(%rdx), %esi
movl %esi, 0x28(%rdx)
movq 0x850(%rax), %rsi
movq %rsi, (%rdx)
movq %r12, 0x30(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdx)
movq %r15, 0x88(%rdx)
movq %r15, 0x68(%rdx)
movl (%r15), %esi
andl $-0x4, %esi
movl %esi, 0x80(%rdx)
movq 0x7f8(%rax), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x7f8(%rax)
movq %rsi, 0x8(%rdx)
andq $0x0, 0x10(%rdx)
movslq %r14d, %rsi
leaq 0x57bc1(%rip), %rdi # 0x80fd0
movl (%rdi,%rsi,4), %esi
movl %esi, 0x90(%rdx)
movl $0x5, 0x58(%rdx)
addq $0xb0, 0x7f0(%rax)
jmp 0x29431
movzbl 0x5(%r15), %ecx
movl %ecx, (%rbx)
movq %r15, 0x8(%rbx)
movl %r14d, 0x4(%rbx)
andq $0x0, 0x10(%rbx)
movq %r12, 0x18(%rbx)
movq %rbx, %rax
jmp 0x29455
leaq 0x3a3a40(%rip), %rax # 0x3cce90
incq (%rax)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| pfs_get_thread_file_descriptor_locker_v1:
xor eax, eax
test esi, esi
js locret_2945D
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, edx
movsxd rcx, esi
lea rdx, file_handle_max
cmp [rdx], rcx
jle loc_29455
lea rax, file_handle_array
mov rax, [rax]
mov r15, [rax+rcx*8]
test r15, r15
jz loc_29453
mov rbx, rdi
cmp r14d, 4
jnz short loc_29323
and qword ptr [rax+rcx*8], 0
loc_29323:
cmp byte ptr [r15+4], 1
jnz loc_29453
mov r12, [r15+220h]
mov edi, cs:THR_PFS
call _pthread_getspecific
test rax, rax
jz loc_29453
mov [rbx+20h], rax
lea rcx, flag_thread_instrumentation
cmp byte ptr [rcx], 1
jnz loc_2942C
cmp byte ptr [rax+7E0h], 1
jnz loc_29453
movzx ecx, byte ptr [r15+5]
or ecx, 2
lea rdx, flag_events_waits_current
cmp byte ptr [rdx], 1
jnz loc_29431
mov rdx, [rax+7F0h]
mov rsi, rax
add rsi, 0C98h
cmp rdx, rsi
jnb loc_29449
mov [rbx+40h], rdx
or ecx, 4
mov dword ptr [rdx+18h], 4
mov rsi, [rdx-0A8h]
mov [rdx+20h], rsi
mov esi, [rdx-98h]
mov [rdx+28h], esi
mov rsi, [rax+850h]
mov [rdx], rsi
mov [rdx+30h], r12
xorps xmm0, xmm0
movups xmmword ptr [rdx+38h], xmm0
mov [rdx+88h], r15
mov [rdx+68h], r15
mov esi, [r15]
and esi, 0FFFFFFFCh
mov [rdx+80h], esi
mov rsi, [rax+7F8h]
lea rdi, [rsi+1]
mov [rax+7F8h], rdi
mov [rdx+8], rsi
and qword ptr [rdx+10h], 0
movsxd rsi, r14d
lea rdi, _ZL18file_operation_map; file_operation_map
mov esi, [rdi+rsi*4]
mov [rdx+90h], esi
mov dword ptr [rdx+58h], 5
add qword ptr [rax+7F0h], 0B0h
jmp short loc_29431
loc_2942C:
movzx ecx, byte ptr [r15+5]
loc_29431:
mov [rbx], ecx
mov [rbx+8], r15
mov [rbx+4], r14d
and qword ptr [rbx+10h], 0
mov [rbx+18h], r12
mov rax, rbx
jmp short loc_29455
loc_29449:
lea rax, locker_lost
inc qword ptr [rax]
loc_29453:
xor eax, eax
loc_29455:
pop rbx
pop r12
pop r14
pop r15
pop rbp
locret_2945D:
retn
| long long pfs_get_thread_file_descriptor_locker_v1(long long a1, int a2, int a3)
{
long long result; // rax
long long v5; // r15
long long v6; // r12
long long v7; // rax
int v8; // ecx
unsigned long long v9; // rdx
long long v10; // rsi
result = 0LL;
if ( a2 >= 0 && file_handle_max > a2 )
{
v5 = *(_QWORD *)(file_handle_array + 8LL * a2);
if ( v5 )
{
if ( a3 == 4 )
*(_QWORD *)(file_handle_array + 8LL * a2) = 0LL;
if ( *(_BYTE *)(v5 + 4) == 1 )
{
v6 = *(_QWORD *)(v5 + 544);
v7 = pthread_getspecific((unsigned int)THR_PFS);
if ( v7 )
{
*(_QWORD *)(a1 + 32) = v7;
if ( flag_thread_instrumentation[0] != 1 )
{
v8 = *(unsigned __int8 *)(v5 + 5);
goto LABEL_14;
}
if ( *(_BYTE *)(v7 + 2016) == 1 )
{
v8 = *(unsigned __int8 *)(v5 + 5) | 2;
if ( flag_events_waits_current != 1 )
{
LABEL_14:
*(_DWORD *)a1 = v8;
*(_QWORD *)(a1 + 8) = v5;
*(_DWORD *)(a1 + 4) = a3;
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = v6;
return a1;
}
v9 = *(_QWORD *)(v7 + 2032);
if ( v9 < v7 + 3224 )
{
*(_QWORD *)(a1 + 64) = v9;
v8 |= 4u;
*(_DWORD *)(v9 + 24) = 4;
*(_QWORD *)(v9 + 32) = *(_QWORD *)(v9 - 168);
*(_DWORD *)(v9 + 40) = *(_DWORD *)(v9 - 152);
*(_QWORD *)v9 = *(_QWORD *)(v7 + 2128);
*(_QWORD *)(v9 + 48) = v6;
*(_OWORD *)(v9 + 56) = 0LL;
*(_QWORD *)(v9 + 136) = v5;
*(_QWORD *)(v9 + 104) = v5;
*(_DWORD *)(v9 + 128) = *(_DWORD *)v5 & 0xFFFFFFFC;
v10 = *(_QWORD *)(v7 + 2040);
*(_QWORD *)(v7 + 2040) = v10 + 1;
*(_QWORD *)(v9 + 8) = v10;
*(_QWORD *)(v9 + 16) = 0LL;
*(_DWORD *)(v9 + 144) = file_operation_map[a3];
*(_DWORD *)(v9 + 88) = 5;
*(_QWORD *)(v7 + 2032) += 176LL;
goto LABEL_14;
}
++locker_lost;
}
}
}
}
return 0LL;
}
return result;
}
| pfs_get_thread_file_descriptor_locker_v1:
XOR EAX,EAX
TEST ESI,ESI
JS 0x0012945d
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,EDX
MOVSXD RCX,ESI
LEA RDX,[0x4cce48]
CMP qword ptr [RDX],RCX
JLE 0x00129455
LEA RAX,[0x4cceb8]
MOV RAX,qword ptr [RAX]
MOV R15,qword ptr [RAX + RCX*0x8]
TEST R15,R15
JZ 0x00129453
MOV RBX,RDI
CMP R14D,0x4
JNZ 0x00129323
AND qword ptr [RAX + RCX*0x8],0x0
LAB_00129323:
CMP byte ptr [R15 + 0x4],0x1
JNZ 0x00129453
MOV R12,qword ptr [R15 + 0x220]
MOV EDI,dword ptr [0x004d026c]
CALL 0x00126540
TEST RAX,RAX
JZ 0x00129453
MOV qword ptr [RBX + 0x20],RAX
LEA RCX,[0x4d0c40]
CMP byte ptr [RCX],0x1
JNZ 0x0012942c
CMP byte ptr [RAX + 0x7e0],0x1
JNZ 0x00129453
MOVZX ECX,byte ptr [R15 + 0x5]
OR ECX,0x2
LEA RDX,[0x4d0b40]
CMP byte ptr [RDX],0x1
JNZ 0x00129431
MOV RDX,qword ptr [RAX + 0x7f0]
MOV RSI,RAX
ADD RSI,0xc98
CMP RDX,RSI
JNC 0x00129449
MOV qword ptr [RBX + 0x40],RDX
OR ECX,0x4
MOV dword ptr [RDX + 0x18],0x4
MOV RSI,qword ptr [RDX + -0xa8]
MOV qword ptr [RDX + 0x20],RSI
MOV ESI,dword ptr [RDX + -0x98]
MOV dword ptr [RDX + 0x28],ESI
MOV RSI,qword ptr [RAX + 0x850]
MOV qword ptr [RDX],RSI
MOV qword ptr [RDX + 0x30],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDX + 0x38],XMM0
MOV qword ptr [RDX + 0x88],R15
MOV qword ptr [RDX + 0x68],R15
MOV ESI,dword ptr [R15]
AND ESI,0xfffffffc
MOV dword ptr [RDX + 0x80],ESI
MOV RSI,qword ptr [RAX + 0x7f8]
LEA RDI,[RSI + 0x1]
MOV qword ptr [RAX + 0x7f8],RDI
MOV qword ptr [RDX + 0x8],RSI
AND qword ptr [RDX + 0x10],0x0
MOVSXD RSI,R14D
LEA RDI,[0x180fd0]
MOV ESI,dword ptr [RDI + RSI*0x4]
MOV dword ptr [RDX + 0x90],ESI
MOV dword ptr [RDX + 0x58],0x5
ADD qword ptr [RAX + 0x7f0],0xb0
JMP 0x00129431
LAB_0012942c:
MOVZX ECX,byte ptr [R15 + 0x5]
LAB_00129431:
MOV dword ptr [RBX],ECX
MOV qword ptr [RBX + 0x8],R15
MOV dword ptr [RBX + 0x4],R14D
AND qword ptr [RBX + 0x10],0x0
MOV qword ptr [RBX + 0x18],R12
MOV RAX,RBX
JMP 0x00129455
LAB_00129449:
LEA RAX,[0x4cce90]
INC qword ptr [RAX]
LAB_00129453:
XOR EAX,EAX
LAB_00129455:
POP RBX
POP R12
POP R14
POP R15
POP RBP
LAB_0012945d:
RET
|
uint * pfs_get_thread_file_descriptor_locker_v1(uint *param_1,int param_2,uint param_3)
{
byte bVar1;
uint *puVar2;
int8 uVar3;
int8 *puVar4;
void *pvVar5;
uint uVar6;
long lVar7;
if (param_2 < 0) {
return (uint *)0x0;
}
lVar7 = (long)param_2;
if (lVar7 < file_handle_max) {
puVar2 = *(uint **)(file_handle_array + lVar7 * 8);
if (puVar2 != (uint *)0x0) {
if (param_3 == 4) {
*(int8 *)(file_handle_array + lVar7 * 8) = 0;
}
if ((char)puVar2[1] == '\x01') {
uVar3 = *(int8 *)(puVar2 + 0x88);
pvVar5 = pthread_getspecific(THR_PFS);
if (pvVar5 != (void *)0x0) {
*(void **)(param_1 + 8) = pvVar5;
if (flag_thread_instrumentation == '\x01') {
if (*(char *)((long)pvVar5 + 0x7e0) != '\x01') {
return (uint *)0x0;
}
bVar1 = *(byte *)((long)puVar2 + 5);
uVar6 = bVar1 | 2;
if (flag_events_waits_current == '\x01') {
puVar4 = *(int8 **)((long)pvVar5 + 0x7f0);
if ((int8 *)((long)pvVar5 + 0xc98) <= puVar4) {
locker_lost = locker_lost + 1;
return (uint *)0x0;
}
*(int8 **)(param_1 + 0x10) = puVar4;
uVar6 = bVar1 | 6;
*(int4 *)(puVar4 + 3) = 4;
puVar4[4] = puVar4[-0x15];
*(int4 *)(puVar4 + 5) = *(int4 *)(puVar4 + -0x13);
*puVar4 = *(int8 *)((long)pvVar5 + 0x850);
puVar4[6] = uVar3;
puVar4[7] = 0;
puVar4[8] = 0;
puVar4[0x11] = puVar2;
puVar4[0xd] = puVar2;
*(uint *)(puVar4 + 0x10) = *puVar2 & 0xfffffffc;
lVar7 = *(long *)((long)pvVar5 + 0x7f8);
*(long *)((long)pvVar5 + 0x7f8) = lVar7 + 1;
puVar4[1] = lVar7;
puVar4[2] = 0;
*(int4 *)(puVar4 + 0x12) =
*(int4 *)(file_operation_map + (long)(int)param_3 * 4);
*(int4 *)(puVar4 + 0xb) = 5;
*(long *)((long)pvVar5 + 0x7f0) = *(long *)((long)pvVar5 + 0x7f0) + 0xb0;
}
}
else {
uVar6 = (uint)*(byte *)((long)puVar2 + 5);
}
*param_1 = uVar6;
*(uint **)(param_1 + 2) = puVar2;
param_1[1] = param_3;
param_1[4] = 0;
param_1[5] = 0;
*(int8 *)(param_1 + 6) = uVar3;
return param_1;
}
}
}
return (uint *)0x0;
}
return (uint *)0x0;
}
| |
40,746 | ok1 | eloqsql/unittest/mytap/tap.c | void
ok1(int const pass)
{
va_list ap;
memset(&ap, 0, sizeof(ap));
if (!pass && *g_test.todo == '\0')
++g_test.failed;
vemit_tap(pass, NULL, ap);
if (*g_test.todo != '\0')
emit_dir("todo", g_test.todo);
emit_endl();
} | O3 | c | ok1:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rbp)
movq $0x0, -0x10(%rbp)
testl %edi, %edi
jne 0x265c2
cmpb $0x0, 0x34361a(%rip) # 0x369bd4
jne 0x265c2
incl 0x34360e(%rip) # 0x369bd0
leaq -0x20(%rbp), %rdx
xorl %esi, %esi
callq 0x264e9
cmpb $0x0, 0x343600(%rip) # 0x369bd4
je 0x26609
movq 0x2cc9cb(%rip), %rbx # 0x2f2fa8
movq (%rbx), %rdi
leaq 0x37c81(%rip), %rdx # 0x5e268
leaq 0x37c09(%rip), %rcx # 0x5e1f7
leaq 0x3435df(%rip), %r8 # 0x369bd4
movl $0x1, %esi
xorl %eax, %eax
callq 0x25530
movq (%rbx), %rdi
callq 0x25360
movq 0x2cc998(%rip), %rbx # 0x2f2fa8
movq (%rbx), %rdi
leaq 0x38bd9(%rip), %rdx # 0x5f1f3
movl $0x1, %esi
xorl %eax, %eax
callq 0x25530
movq (%rbx), %rdi
callq 0x25360
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
| ok1:
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
xorps xmm0, xmm0
movaps [rbp+var_20], xmm0
mov [rbp+var_10], 0
test edi, edi
jnz short loc_265C2
cmp cs:byte_369BD4, 0
jnz short loc_265C2
inc cs:dword_369BD0
loc_265C2:
lea rdx, [rbp+var_20]
xor esi, esi
call vemit_tap
cmp cs:byte_369BD4, 0
jz short loc_26609
mov rbx, cs:stdout_ptr
mov rdi, [rbx]
lea rdx, aSS; " # %s %s"
lea rcx, aTodo; "todo"
lea r8, byte_369BD4
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
call _fflush
loc_26609:
mov rbx, cs:stdout_ptr
mov rdi, [rbx]
lea rdx, asc_5F1F0+3; "\n"
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [rbx]
call _fflush
add rsp, 18h
pop rbx
pop rbp
retn
| long long ok1(int a1)
{
long long v1; // rcx
long long v2; // r8
long long v3; // r9
__int128 v5; // [rsp+0h] [rbp-20h] BYREF
long long v6; // [rsp+10h] [rbp-10h]
v5 = 0LL;
v6 = 0LL;
if ( !a1 && !byte_369BD4 )
++dword_369BD0;
vemit_tap(a1, 0LL, (long long)&v5);
if ( byte_369BD4 )
{
__fprintf_chk(stdout, 1LL, " # %s %s", "todo", &byte_369BD4);
fflush(stdout);
}
__fprintf_chk(stdout, 1LL, "\n", v1, v2, v3, v5, v6);
return fflush(stdout);
}
| ok1:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x20],XMM0
MOV qword ptr [RBP + -0x10],0x0
TEST EDI,EDI
JNZ 0x001265c2
CMP byte ptr [0x00469bd4],0x0
JNZ 0x001265c2
INC dword ptr [0x00469bd0]
LAB_001265c2:
LEA RDX,[RBP + -0x20]
XOR ESI,ESI
CALL 0x001264e9
CMP byte ptr [0x00469bd4],0x0
JZ 0x00126609
MOV RBX,qword ptr [0x003f2fa8]
MOV RDI,qword ptr [RBX]
LEA RDX,[0x15e268]
LEA RCX,[0x15e1f7]
LEA R8,[0x469bd4]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00125530
MOV RDI,qword ptr [RBX]
CALL 0x00125360
LAB_00126609:
MOV RBX,qword ptr [0x003f2fa8]
MOV RDI,qword ptr [RBX]
LEA RDX,[0x15f1f3]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00125530
MOV RDI,qword ptr [RBX]
CALL 0x00125360
ADD RSP,0x18
POP RBX
POP RBP
RET
|
void ok1(int8 param_1)
{
int *puVar1;
int8 local_28;
int8 uStack_20;
int8 local_18;
local_28 = 0;
uStack_20 = 0;
local_18 = 0;
if (((int)param_1 == 0) && (DAT_00469bd4 == '\0')) {
DAT_00469bd0 = DAT_00469bd0 + 1;
}
vemit_tap(param_1,0,&local_28);
puVar1 = PTR_stdout_003f2fa8;
if (DAT_00469bd4 != '\0') {
__fprintf_chk(*(int8 *)PTR_stdout_003f2fa8,1," # %s %s",&DAT_0015e1f7,&DAT_00469bd4);
fflush(*(FILE **)puVar1);
}
puVar1 = PTR_stdout_003f2fa8;
__fprintf_chk(*(int8 *)PTR_stdout_003f2fa8,1,&DAT_0015f1f3);
fflush(*(FILE **)puVar1);
return;
}
| |
40,747 | bitmap_lock_set_next | eloqsql/mysys/my_bitmap.c | uint bitmap_lock_set_next(MY_BITMAP *map)
{
uint bit_found;
bitmap_lock(map);
bit_found= bitmap_set_next(map);
bitmap_unlock(map);
return bit_found;
} | O3 | c | bitmap_lock_set_next:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xa5425
cmpq $0x0, 0x40(%rdi)
jne 0xa5471
callq 0x2a200
movq %rbx, %rdi
callq 0xa4c00
movl %eax, %r14d
cmpl $-0x1, %eax
je 0xa544f
movq (%rbx), %rax
movl %r14d, %edx
movl %r14d, %ecx
andb $0x7, %cl
movl $0x1, %esi
shll %cl, %esi
shrl $0x3, %edx
orb %sil, (%rax,%rdx)
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0xa5469
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0xa5484
movq %rbx, %rdi
callq 0x2a1d0
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x42f53(%rip), %rsi # 0xe83cb
movl $0x81, %edx
callq 0x308cf
jmp 0xa5425
leaq 0x2ee5cd(%rip), %rax # 0x393a58
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa5461
| bitmap_lock_set_next:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_A5425
cmp qword ptr [rdi+40h], 0
jnz short loc_A5471
call _pthread_mutex_lock
loc_A5425:
mov rdi, rbx
call bitmap_get_first
mov r14d, eax
cmp eax, 0FFFFFFFFh
jz short loc_A544F
mov rax, [rbx]
mov edx, r14d
mov ecx, r14d
and cl, 7
mov esi, 1
shl esi, cl
shr edx, 3
or [rax+rdx], sil
loc_A544F:
mov rbx, [rbx+10h]
test rbx, rbx
jz short loc_A5469
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_A5484
loc_A5461:
mov rdi, rbx
call _pthread_mutex_unlock
loc_A5469:
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
loc_A5471:
lea rsi, aWorkspaceLlm4b_43; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 81h
call psi_mutex_lock
jmp short loc_A5425
loc_A5484:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A5461
| long long bitmap_lock_set_next(_QWORD *a1)
{
long long v2; // rdi
unsigned int first; // r14d
long long v4; // rbx
v2 = a1[2];
if ( v2 )
{
if ( *(_QWORD *)(v2 + 64) )
psi_mutex_lock(v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c", 0x81u);
else
pthread_mutex_lock(v2);
}
first = bitmap_get_first((long long)a1);
if ( first != -1 )
*(_BYTE *)(*a1 + (first >> 3)) |= 1 << (first & 7);
v4 = a1[2];
if ( v4 )
{
if ( *(_QWORD *)(v4 + 64) )
PSI_server[44]();
pthread_mutex_unlock(v4);
}
return first;
}
| bitmap_lock_set_next:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x001a5425
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x001a5471
CALL 0x0012a200
LAB_001a5425:
MOV RDI,RBX
CALL 0x001a4c00
MOV R14D,EAX
CMP EAX,-0x1
JZ 0x001a544f
MOV RAX,qword ptr [RBX]
MOV EDX,R14D
MOV ECX,R14D
AND CL,0x7
MOV ESI,0x1
SHL ESI,CL
SHR EDX,0x3
OR byte ptr [RAX + RDX*0x1],SIL
LAB_001a544f:
MOV RBX,qword ptr [RBX + 0x10]
TEST RBX,RBX
JZ 0x001a5469
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001a5484
LAB_001a5461:
MOV RDI,RBX
CALL 0x0012a1d0
LAB_001a5469:
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
LAB_001a5471:
LEA RSI,[0x1e83cb]
MOV EDX,0x81
CALL 0x001308cf
JMP 0x001a5425
LAB_001a5484:
LEA RAX,[0x493a58]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a5461
|
uint bitmap_lock_set_next(long *param_1)
{
byte *pbVar1;
pthread_mutex_t *ppVar2;
uint uVar3;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) == 0) {
pthread_mutex_lock(ppVar2);
}
else {
psi_mutex_lock(ppVar2,"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c",0x81);
}
}
uVar3 = bitmap_get_first(param_1);
if (uVar3 != 0xffffffff) {
pbVar1 = (byte *)(*param_1 + (ulong)(uVar3 >> 3));
*pbVar1 = *pbVar1 | (byte)(1 << ((byte)uVar3 & 7));
}
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar2);
}
return uVar3;
}
| |
40,748 | inline_mysql_cond_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_init(
#ifdef HAVE_PSI_COND_INTERFACE
PSI_cond_key key,
#endif
mysql_cond_t *that,
const pthread_condattr_t *attr)
{
#ifdef HAVE_PSI_COND_INTERFACE
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
#else
that->m_psi= NULL;
#endif
return pthread_cond_init(&that->m_cond, attr);
} | O0 | c | inline_mysql_cond_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1a75f6(%rip), %rax # 0x1cf8d0
movq (%rax), %rax
movq 0x60(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x24350
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| inline_mysql_cond_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+60h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_cond_init
add rsp, 20h
pop rbp
retn
| long long inline_mysql_cond_init(unsigned int a1, long long a2, long long a3)
{
*(_QWORD *)(a2 + 48) = (*((long long ( **)(_QWORD, long long))PSI_server[0] + 12))(a1, a2);
return pthread_cond_init(a2, a3);
}
| inline_mysql_cond_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x2cf8d0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x60]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00124350
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3)
{
longlong lVar1;
lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2);
param_2[1].__align = lVar1;
pthread_cond_init(param_2,param_3);
return;
}
| |
40,749 | minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) | llama.cpp/common/minja/minja.hpp | ForTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::vector<std::string> & vns, std::shared_ptr<Expression> && iter,
std::shared_ptr<Expression> && c, bool r)
: TemplateToken(Type::For, loc, pre, post), var_names(vns), iterable(std::move(iter)), condition(std::move(c)), recursive(r) {} | O3 | cpp | minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rdi, %rbx
leaq 0x75ceb(%rip), %r12 # 0x16c920
addq $0x10, %r12
movq %r12, (%rdi)
movl $0x6, 0x8(%rdi)
movq (%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0xf6c6c
movq 0x7733a(%rip), %rdi # 0x16df98
cmpb $0x0, (%rdi)
je 0xf6c68
incl 0x8(%rax)
jmp 0xf6c6c
lock
incl 0x8(%rax)
leaq 0x18(%rbx), %r15
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rbx)
movl %edx, 0x28(%rbx)
movl %ecx, 0x2c(%rbx)
leaq 0x764d3(%rip), %rax # 0x16d158
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x30(%rbx), %rdi
movq %r8, %rsi
callq 0x4128a
movb 0x38(%rsp), %al
movq 0x30(%rsp), %rcx
xorl %edx, %edx
movq %rdx, 0x50(%rbx)
movups (%r14), %xmm0
movq %rdx, 0x8(%r14)
movups %xmm0, 0x48(%rbx)
movq %rdx, (%r14)
movq %rdx, 0x60(%rbx)
movups (%rcx), %xmm0
movq %rdx, 0x8(%rcx)
movups %xmm0, 0x58(%rbx)
movq %rdx, (%rcx)
movb %al, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r12, (%rbx)
movq %r15, %rdi
callq 0x46496
movq %r14, %rdi
callq 0x21b20
nop
| _ZN5minja16ForTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEOSt10shared_ptrINS_10ExpressionEESJ_b:
push r15
push r14
push r12
push rbx
push rax
mov r14, r9
mov rbx, rdi
lea r12, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add r12, 10h
mov [rdi], r12
mov dword ptr [rdi+8], 6
mov rax, [rsi]
mov [rdi+10h], rax
mov rax, [rsi+8]
mov [rdi+18h], rax
test rax, rax
jz short loc_F6C6C
mov rdi, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rdi], 0
jz short loc_F6C68
inc dword ptr [rax+8]
jmp short loc_F6C6C
loc_F6C68:
lock inc dword ptr [rax+8]
loc_F6C6C:
lea r15, [rbx+18h]
mov rax, [rsi+10h]
mov [rbx+20h], rax
mov [rbx+28h], edx
mov [rbx+2Ch], ecx
lea rax, _ZTVN5minja16ForTemplateTokenE; `vtable for'minja::ForTemplateToken
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+30h]
mov rsi, r8
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
mov al, [rsp+28h+arg_8]
mov rcx, [rsp+28h+arg_0]
xor edx, edx
mov [rbx+50h], rdx
movups xmm0, xmmword ptr [r14]
mov [r14+8], rdx
movups xmmword ptr [rbx+48h], xmm0
mov [r14], rdx
mov [rbx+60h], rdx
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rdx
movups xmmword ptr [rbx+58h], xmm0
mov [rcx], rdx
mov [rbx+68h], al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r12
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| char minja::ForTemplateToken::ForTemplateToken(
long long a1,
_QWORD *a2,
int a3,
int a4,
_QWORD *a5,
__int128 *a6,
__int128 *a7,
char a8)
{
long long v9; // rax
char result; // al
__int128 v11; // xmm0
__int128 v12; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2;
*(_DWORD *)(a1 + 8) = 6;
*(_QWORD *)(a1 + 16) = *a2;
v9 = a2[1];
*(_QWORD *)(a1 + 24) = v9;
if ( v9 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v9 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v9 + 8));
}
*(_QWORD *)(a1 + 32) = a2[2];
*(_DWORD *)(a1 + 40) = a3;
*(_DWORD *)(a1 + 44) = a4;
*(_QWORD *)a1 = &`vtable for'minja::ForTemplateToken + 2;
std::vector<std::string>::vector(a1 + 48, a5);
result = a8;
*(_QWORD *)(a1 + 80) = 0LL;
v11 = *a6;
*((_QWORD *)a6 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v11;
*(_QWORD *)a6 = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v12 = *a7;
*((_QWORD *)a7 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v12;
*(_QWORD *)a7 = 0LL;
*(_BYTE *)(a1 + 104) = a8;
return result;
}
| ForTemplateToken:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV RBX,RDI
LEA R12,[0x26c920]
ADD R12,0x10
MOV qword ptr [RDI],R12
MOV dword ptr [RDI + 0x8],0x6
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x18],RAX
TEST RAX,RAX
JZ 0x001f6c6c
MOV RDI,qword ptr [0x0026df98]
CMP byte ptr [RDI],0x0
JZ 0x001f6c68
INC dword ptr [RAX + 0x8]
JMP 0x001f6c6c
LAB_001f6c68:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001f6c6c:
LEA R15,[RBX + 0x18]
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x20],RAX
MOV dword ptr [RBX + 0x28],EDX
MOV dword ptr [RBX + 0x2c],ECX
LEA RAX,[0x26d158]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x30]
LAB_001f6c90:
MOV RSI,R8
CALL 0x0014128a
LAB_001f6c98:
MOV AL,byte ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x30]
XOR EDX,EDX
MOV qword ptr [RBX + 0x50],RDX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOV qword ptr [R14],RDX
MOV qword ptr [RBX + 0x60],RDX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV qword ptr [RCX],RDX
MOV byte ptr [RBX + 0x68],AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >
const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) */
void __thiscall
minja::ForTemplateToken::ForTemplateToken
(ForTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4,
vector *param_5,int8 *param_6,int8 *param_7,ForTemplateToken param_8)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR__TemplateToken_0026c930;
*(int4 *)(this + 8) = 6;
*(int8 *)(this + 0x10) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x18) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0026df98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x20) = param_1[2];
*(int4 *)(this + 0x28) = param_3;
*(int4 *)(this + 0x2c) = param_4;
*(int ***)this = &PTR__ForTemplateToken_0026d168;
/* try { // try from 001f6c90 to 001f6c97 has its CatchHandler @ 001f6cd7 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30),
param_5);
*(int8 *)(this + 0x50) = 0;
uVar2 = param_6[1];
param_6[1] = 0;
*(int8 *)(this + 0x48) = *param_6;
*(int8 *)(this + 0x50) = uVar2;
*param_6 = 0;
*(int8 *)(this + 0x60) = 0;
uVar2 = param_7[1];
param_7[1] = 0;
*(int8 *)(this + 0x58) = *param_7;
*(int8 *)(this + 0x60) = uVar2;
*param_7 = 0;
this[0x68] = param_8;
return;
}
| |
40,750 | calc_hashnr_caseup | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | static uint calc_hashnr_caseup(const uchar *key,uint length)
{
register uint nr=1, nr2=4;
while (length--)
{
nr^= (((nr & 63)+nr2)*((uint) (uchar) toupper(*key++)))+ (nr << 8);
nr2+=3;
}
return((uint) nr);
} | O0 | c | calc_hashnr_caseup:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x1d0b4
movl -0x10(%rbp), %eax
andl $0x3f, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %edi
callq 0x17ac0
movl %eax, %ecx
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
imull %ecx, %eax
movl -0x10(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
xorl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x14(%rbp)
jmp 0x1d05d
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| calc_hashnr_caseup:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], 1
mov [rbp+var_14], 4
loc_1D05D:
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_C], ecx
cmp eax, 0
jz short loc_1D0B4
mov eax, [rbp+var_10]
and eax, 3Fh
add eax, [rbp+var_14]
mov [rbp+var_18], eax
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movzx edi, byte ptr [rax]
call _toupper
mov ecx, eax
mov eax, [rbp+var_18]
movzx ecx, cl
imul eax, ecx
mov ecx, [rbp+var_10]
shl ecx, 8
add eax, ecx
xor eax, [rbp+var_10]
mov [rbp+var_10], eax
mov eax, [rbp+var_14]
add eax, 3
mov [rbp+var_14], eax
jmp short loc_1D05D
loc_1D0B4:
mov eax, [rbp+var_10]
add rsp, 20h
pop rbp
retn
| long long calc_hashnr_caseup(unsigned __int8 *a1, int a2)
{
unsigned __int8 *v3; // rax
int i; // [rsp+Ch] [rbp-14h]
unsigned int v6; // [rsp+10h] [rbp-10h]
v6 = 1;
for ( i = 4; a2--; i += 3 )
{
v3 = a1++;
v6 ^= (v6 << 8) + (unsigned __int8)toupper(*v3) * (i + (v6 & 0x3F));
}
return v6;
}
| calc_hashnr_caseup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],0x1
MOV dword ptr [RBP + -0x14],0x4
LAB_0011d05d:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x0
JZ 0x0011d0b4
MOV EAX,dword ptr [RBP + -0x10]
AND EAX,0x3f
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVZX EDI,byte ptr [RAX]
CALL 0x00117ac0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x18]
MOVZX ECX,CL
IMUL EAX,ECX
MOV ECX,dword ptr [RBP + -0x10]
SHL ECX,0x8
ADD EAX,ECX
XOR EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x3
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0011d05d
LAB_0011d0b4:
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
uint calc_hashnr_caseup(byte *param_1,int param_2)
{
uint uVar1;
int local_1c;
uint local_18;
int local_14;
byte *local_10;
local_18 = 1;
local_1c = 4;
local_14 = param_2;
local_10 = param_1;
while (local_14 != 0) {
uVar1 = toupper((uint)*local_10);
local_18 = ((local_18 & 0x3f) + local_1c) * (uVar1 & 0xff) + local_18 * 0x100 ^ local_18;
local_1c = local_1c + 3;
local_14 = local_14 + -1;
local_10 = local_10 + 1;
}
return local_18;
}
| |
40,751 | mi_calc_bin_pack_key_length | eloqsql/storage/myisam/mi_search.c | int
_mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key,
uchar *org_key, uchar *prev_key, uchar *key,
MI_KEY_PARAM *s_temp)
{
uint length,key_length,ref_length;
s_temp->totlength=key_length=_mi_keylength(keyinfo,key)+nod_flag;
#ifdef HAVE_valgrind
s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */
#endif
s_temp->key=key;
s_temp->prev_key=org_key;
if (prev_key) /* If not first key in block */
{
/* pack key against previous key */
/*
As keys may be identical when running a sort in myisamchk, we
have to guard against the case where keys may be identical
*/
uchar *end;
end=key+key_length;
for ( ; *key == *prev_key && key < end; key++,prev_key++) ;
s_temp->ref_length= ref_length=(uint) (key-s_temp->key);
length=key_length - ref_length + get_pack_length(ref_length);
}
else
{
/* No previous key */
s_temp->ref_length=ref_length=0;
length=key_length+1;
}
if ((s_temp->next_key_pos=next_key)) /* If another key after */
{
/* pack key against next key */
uint next_length,next_length_pack;
get_key_pack_length(next_length,next_length_pack,next_key);
/* If first key and next key is packed (only on delete) */
if (!prev_key && org_key && next_length)
{
uchar *end;
for (key= s_temp->key, end=key+next_length ;
*key == *org_key && key < end;
key++,org_key++) ;
ref_length= (uint) (key - s_temp->key);
}
if (next_length > ref_length)
{
/* We put a key with different case between two keys with the same prefix
Extend next key to have same prefix as
this key */
s_temp->n_ref_length= ref_length;
s_temp->prev_length= next_length-ref_length;
s_temp->prev_key+= ref_length;
return (int) (length+ s_temp->prev_length - next_length_pack +
get_pack_length(ref_length));
}
/* Check how many characters are identical to next key */
key= s_temp->key+next_length;
s_temp->prev_length= 0;
while (*key++ == *next_key++) ;
if ((ref_length= (uint) (key - s_temp->key)-1) == next_length)
{
s_temp->next_key_pos=0;
return length; /* can't pack next key */
}
s_temp->n_ref_length=ref_length;
return (int) (length-(ref_length - next_length) - next_length_pack +
get_pack_length(ref_length));
}
return (int) length;
} | O3 | c | mi_calc_bin_pack_key_length:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movl %esi, %r13d
movq %r9, %rsi
callq 0x85b14
addl %r13d, %eax
movq 0x10(%rbp), %r13
movl %eax, 0x10(%r13)
movq %rbx, 0x20(%r13)
movq %r12, 0x28(%r13)
testq %r15, %r15
je 0x86873
movb (%rbx), %cl
cmpb (%r15), %cl
sete %cl
testl %eax, %eax
setne %sil
andb %cl, %sil
movq %rbx, %rdx
cmpb $0x1, %sil
jne 0x86859
movl %eax, %ecx
addq %rbx, %rcx
leaq 0x1(%r15), %rsi
leaq 0x1(%rbx), %rdi
movb (%rdi), %r8b
leaq 0x1(%rdi), %rdx
cmpb (%rsi), %r8b
jne 0x86856
incq %rsi
cmpq %rcx, %rdi
movq %rdx, %rdi
jb 0x8683f
decq %rdx
subl %ebx, %edx
movl %edx, (%r13)
subl %edx, %eax
xorl %ecx, %ecx
cmpl $0xff, %edx
setae %cl
leal (%rax,%rcx,2), %eax
incl %eax
jmp 0x8687f
movl $0x0, (%r13)
incl %eax
xorl %edx, %edx
movq %r14, 0x30(%r13)
testq %r14, %r14
je 0x86981
movzbl (%r14), %esi
cmpl $0xff, %esi
je 0x868a4
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movl $0x1, %edi
jmp 0x868ba
movzwl 0x1(%r14), %ecx
rolw $0x8, %cx
movzwl %cx, %esi
movl $0xfffffffd, %ecx # imm = 0xFFFFFFFD
movl $0x3, %edi
testq %r12, %r12
je 0x868ff
testq %r15, %r15
jne 0x868ff
testl %esi, %esi
je 0x868ff
movb (%rbx), %r8b
movq %rbx, %rdx
cmpb (%r12), %r8b
jne 0x868fd
movl %esi, %r8d
addq %rbx, %r8
leaq 0x1(%r12), %r9
leaq 0x1(%rbx), %r10
movb (%r10), %r11b
leaq 0x1(%r10), %rdx
cmpb (%r9), %r11b
jne 0x868fa
incq %r9
cmpq %r8, %r10
movq %rdx, %r10
jb 0x868e3
decq %rdx
subl %ebx, %edx
movl %esi, %r8d
subl %edx, %r8d
jbe 0x86930
movl %edx, 0x8(%r13)
movl %r8d, 0x18(%r13)
movl %edx, %esi
addq %rsi, %r12
movq %r12, 0x28(%r13)
xorl %esi, %esi
cmpl $0xff, %edx
setae %sil
addl %eax, %ecx
addl %r8d, %ecx
leal (%rcx,%rsi,2), %eax
incl %eax
jmp 0x86981
addq %rdi, %r14
movl %esi, %esi
addq %rsi, %rbx
movl $0x0, 0x18(%r13)
xorl %edx, %edx
movq %rdx, %rdi
movb (%rbx,%rdx), %r8b
incq %rdx
cmpb (%r14,%rdi), %r8b
je 0x86942
cmpl $0x1, %edx
jne 0x86961
movq $0x0, 0x30(%r13)
jmp 0x86981
addq %rdx, %rsi
decq %rsi
movl %esi, 0x8(%r13)
xorl %edi, %edi
cmpl $0xff, %esi
setae %dil
addl %ecx, %eax
leal (%rax,%rdi,2), %eax
subl %edx, %eax
addl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_calc_bin_pack_key_length:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r9
mov r15, r8
mov r12, rcx
mov r14, rdx
mov r13d, esi
mov rsi, r9
call _mi_keylength
add eax, r13d
mov r13, [rbp+arg_0]
mov [r13+10h], eax
mov [r13+20h], rbx
mov [r13+28h], r12
test r15, r15
jz short loc_86873
mov cl, [rbx]
cmp cl, [r15]
setz cl
test eax, eax
setnz sil
and sil, cl
mov rdx, rbx
cmp sil, 1
jnz short loc_86859
mov ecx, eax
add rcx, rbx
lea rsi, [r15+1]
lea rdi, [rbx+1]
loc_8683F:
mov r8b, [rdi]
lea rdx, [rdi+1]
cmp r8b, [rsi]
jnz short loc_86856
inc rsi
cmp rdi, rcx
mov rdi, rdx
jb short loc_8683F
loc_86856:
dec rdx
loc_86859:
sub edx, ebx
mov [r13+0], edx
sub eax, edx
xor ecx, ecx
cmp edx, 0FFh
setnb cl
lea eax, [rax+rcx*2]
inc eax
jmp short loc_8687F
loc_86873:
mov dword ptr [r13+0], 0
inc eax
xor edx, edx
loc_8687F:
mov [r13+30h], r14
test r14, r14
jz loc_86981
movzx esi, byte ptr [r14]
cmp esi, 0FFh
jz short loc_868A4
mov ecx, 0FFFFFFFFh
mov edi, 1
jmp short loc_868BA
loc_868A4:
movzx ecx, word ptr [r14+1]
rol cx, 8
movzx esi, cx
mov ecx, 0FFFFFFFDh
mov edi, 3
loc_868BA:
test r12, r12
jz short loc_868FF
test r15, r15
jnz short loc_868FF
test esi, esi
jz short loc_868FF
mov r8b, [rbx]
mov rdx, rbx
cmp r8b, [r12]
jnz short loc_868FD
mov r8d, esi
add r8, rbx
lea r9, [r12+1]
lea r10, [rbx+1]
loc_868E3:
mov r11b, [r10]
lea rdx, [r10+1]
cmp r11b, [r9]
jnz short loc_868FA
inc r9
cmp r10, r8
mov r10, rdx
jb short loc_868E3
loc_868FA:
dec rdx
loc_868FD:
sub edx, ebx
loc_868FF:
mov r8d, esi
sub r8d, edx
jbe short loc_86930
mov [r13+8], edx
mov [r13+18h], r8d
mov esi, edx
add r12, rsi
mov [r13+28h], r12
xor esi, esi
cmp edx, 0FFh
setnb sil
add ecx, eax
add ecx, r8d
lea eax, [rcx+rsi*2]
inc eax
jmp short loc_86981
loc_86930:
add r14, rdi
mov esi, esi
add rbx, rsi
mov dword ptr [r13+18h], 0
xor edx, edx
loc_86942:
mov rdi, rdx
mov r8b, [rbx+rdx]
inc rdx
cmp r8b, [r14+rdi]
jz short loc_86942
cmp edx, 1
jnz short loc_86961
mov qword ptr [r13+30h], 0
jmp short loc_86981
loc_86961:
add rsi, rdx
dec rsi
mov [r13+8], esi
xor edi, edi
cmp esi, 0FFh
setnb dil
add eax, ecx
lea eax, [rax+rdi*2]
sub eax, edx
add eax, 2
loc_86981:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_calc_bin_pack_key_length(
long long a1,
int a2,
unsigned __int8 *a3,
_BYTE *a4,
_BYTE *a5,
unsigned __int8 *a6,
long long a7)
{
int v11; // eax
int v12; // edx
_BYTE *v13; // rsi
unsigned __int8 *v14; // rdi
int v15; // edx
bool v16; // cf
unsigned int v17; // edx
long long result; // rax
unsigned int v19; // esi
int v20; // ecx
long long v21; // rdi
int v22; // edx
_BYTE *v23; // r9
unsigned __int8 *v24; // r10
int v25; // edx
int v26; // r8d
unsigned __int8 *v27; // r14
unsigned __int8 *v28; // rbx
long long v29; // rdx
long long v30; // rdi
unsigned __int8 v31; // r8
unsigned int v32; // esi
v11 = a2 + mi_keylength(a1, a6);
*(_DWORD *)(a7 + 16) = v11;
*(_QWORD *)(a7 + 32) = a6;
*(_QWORD *)(a7 + 40) = a4;
if ( a5 )
{
v12 = (int)a6;
if ( *a6 == *a5 && v11 != 0 )
{
v13 = a5 + 1;
v14 = a6 + 1;
do
{
v15 = (_DWORD)v14 + 1;
if ( *v14 != *v13 )
break;
++v13;
v16 = v14++ < &a6[v11];
}
while ( v16 );
v12 = v15 - 1;
}
v17 = v12 - (_DWORD)a6;
*(_DWORD *)a7 = v17;
result = v11 - v17 + 2 * (v17 >= 0xFF) + 1;
}
else
{
*(_DWORD *)a7 = 0;
result = (unsigned int)(v11 + 1);
v17 = 0;
}
*(_QWORD *)(a7 + 48) = a3;
if ( a3 )
{
v19 = *a3;
if ( v19 == 255 )
{
v19 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8);
v20 = -3;
v21 = 3LL;
}
else
{
v20 = -1;
v21 = 1LL;
}
if ( a4 && !a5 && v19 )
{
v22 = (int)a6;
if ( *a6 == *a4 )
{
v23 = a4 + 1;
v24 = a6 + 1;
do
{
v25 = (_DWORD)v24 + 1;
if ( *v24 != *v23 )
break;
++v23;
v16 = v24++ < &a6[v19];
}
while ( v16 );
v22 = v25 - 1;
}
v17 = v22 - (_DWORD)a6;
}
v26 = v19 - v17;
if ( v19 <= v17 )
{
v27 = &a3[v21];
v28 = &a6[v19];
*(_DWORD *)(a7 + 24) = 0;
v29 = 0LL;
do
{
v30 = v29;
v31 = v28[v29++];
}
while ( v31 == v27[v30] );
if ( (_DWORD)v29 == 1 )
{
*(_QWORD *)(a7 + 48) = 0LL;
}
else
{
v32 = v29 + v19 - 1;
*(_DWORD *)(a7 + 8) = v32;
return v20 + (_DWORD)result + 2 * (v32 >= 0xFF) - (unsigned int)v29 + 2;
}
}
else
{
*(_DWORD *)(a7 + 8) = v17;
*(_DWORD *)(a7 + 24) = v26;
*(_QWORD *)(a7 + 40) = &a4[v17];
return v26 + (_DWORD)result + v20 + 2 * (unsigned int)(v17 >= 0xFF) + 1;
}
}
return result;
}
| _mi_calc_bin_pack_key_length:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R9
MOV R15,R8
MOV R12,RCX
MOV R14,RDX
MOV R13D,ESI
MOV RSI,R9
CALL 0x00185b14
ADD EAX,R13D
MOV R13,qword ptr [RBP + 0x10]
MOV dword ptr [R13 + 0x10],EAX
MOV qword ptr [R13 + 0x20],RBX
MOV qword ptr [R13 + 0x28],R12
TEST R15,R15
JZ 0x00186873
MOV CL,byte ptr [RBX]
CMP CL,byte ptr [R15]
SETZ CL
TEST EAX,EAX
SETNZ SIL
AND SIL,CL
MOV RDX,RBX
CMP SIL,0x1
JNZ 0x00186859
MOV ECX,EAX
ADD RCX,RBX
LEA RSI,[R15 + 0x1]
LEA RDI,[RBX + 0x1]
LAB_0018683f:
MOV R8B,byte ptr [RDI]
LEA RDX,[RDI + 0x1]
CMP R8B,byte ptr [RSI]
JNZ 0x00186856
INC RSI
CMP RDI,RCX
MOV RDI,RDX
JC 0x0018683f
LAB_00186856:
DEC RDX
LAB_00186859:
SUB EDX,EBX
MOV dword ptr [R13],EDX
SUB EAX,EDX
XOR ECX,ECX
CMP EDX,0xff
SETNC CL
LEA EAX,[RAX + RCX*0x2]
INC EAX
JMP 0x0018687f
LAB_00186873:
MOV dword ptr [R13],0x0
INC EAX
XOR EDX,EDX
LAB_0018687f:
MOV qword ptr [R13 + 0x30],R14
TEST R14,R14
JZ 0x00186981
MOVZX ESI,byte ptr [R14]
CMP ESI,0xff
JZ 0x001868a4
MOV ECX,0xffffffff
MOV EDI,0x1
JMP 0x001868ba
LAB_001868a4:
MOVZX ECX,word ptr [R14 + 0x1]
ROL CX,0x8
MOVZX ESI,CX
MOV ECX,0xfffffffd
MOV EDI,0x3
LAB_001868ba:
TEST R12,R12
JZ 0x001868ff
TEST R15,R15
JNZ 0x001868ff
TEST ESI,ESI
JZ 0x001868ff
MOV R8B,byte ptr [RBX]
MOV RDX,RBX
CMP R8B,byte ptr [R12]
JNZ 0x001868fd
MOV R8D,ESI
ADD R8,RBX
LEA R9,[R12 + 0x1]
LEA R10,[RBX + 0x1]
LAB_001868e3:
MOV R11B,byte ptr [R10]
LEA RDX,[R10 + 0x1]
CMP R11B,byte ptr [R9]
JNZ 0x001868fa
INC R9
CMP R10,R8
MOV R10,RDX
JC 0x001868e3
LAB_001868fa:
DEC RDX
LAB_001868fd:
SUB EDX,EBX
LAB_001868ff:
MOV R8D,ESI
SUB R8D,EDX
JBE 0x00186930
MOV dword ptr [R13 + 0x8],EDX
MOV dword ptr [R13 + 0x18],R8D
MOV ESI,EDX
ADD R12,RSI
MOV qword ptr [R13 + 0x28],R12
XOR ESI,ESI
CMP EDX,0xff
SETNC SIL
ADD ECX,EAX
ADD ECX,R8D
LEA EAX,[RCX + RSI*0x2]
INC EAX
JMP 0x00186981
LAB_00186930:
ADD R14,RDI
MOV ESI,ESI
ADD RBX,RSI
MOV dword ptr [R13 + 0x18],0x0
XOR EDX,EDX
LAB_00186942:
MOV RDI,RDX
MOV R8B,byte ptr [RBX + RDX*0x1]
INC RDX
CMP R8B,byte ptr [R14 + RDI*0x1]
JZ 0x00186942
CMP EDX,0x1
JNZ 0x00186961
MOV qword ptr [R13 + 0x30],0x0
JMP 0x00186981
LAB_00186961:
ADD RSI,RDX
DEC RSI
MOV dword ptr [R13 + 0x8],ESI
XOR EDI,EDI
CMP ESI,0xff
SETNC DIL
ADD EAX,ECX
LEA EAX,[RAX + RDI*0x2]
SUB EAX,EDX
ADD EAX,0x2
LAB_00186981:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int _mi_calc_bin_pack_key_length
(int8 param_1,int param_2,byte *param_3,char *param_4,char *param_5,
char *param_6,uint *param_7)
{
char *pcVar1;
long lVar2;
long lVar3;
int iVar4;
uint uVar5;
int iVar6;
int iVar7;
uint uVar8;
int iVar9;
long lVar10;
long lVar11;
char *pcVar12;
char *pcVar13;
long lVar14;
uint uVar15;
bool bVar16;
iVar4 = _mi_keylength(param_1,param_6);
uVar5 = iVar4 + param_2;
param_7[4] = uVar5;
*(char **)(param_7 + 8) = param_6;
*(char **)(param_7 + 10) = param_4;
iVar4 = (int)param_6;
if (param_5 == (char *)0x0) {
*param_7 = 0;
uVar8 = 0;
}
else {
iVar7 = iVar4;
if (uVar5 != 0 && *param_6 == *param_5) {
pcVar12 = param_5 + 1;
pcVar13 = param_6 + 1;
do {
pcVar1 = pcVar13 + 1;
if (*pcVar13 != *pcVar12) break;
pcVar12 = pcVar12 + 1;
bVar16 = pcVar13 < param_6 + uVar5;
pcVar13 = pcVar1;
} while (bVar16);
iVar7 = (int)pcVar1 + -1;
}
uVar8 = iVar7 - iVar4;
*param_7 = uVar8;
uVar5 = (uVar5 - uVar8) + (uint)(0xfe < uVar8) * 2;
}
iVar7 = uVar5 + 1;
*(byte **)(param_7 + 0xc) = param_3;
if (param_3 != (byte *)0x0) {
uVar5 = (uint)*param_3;
if (*param_3 == 0xff) {
uVar5 = (uint)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8);
iVar6 = -3;
lVar14 = 3;
}
else {
iVar6 = -1;
lVar14 = 1;
}
if (((param_4 != (char *)0x0) && (param_5 == (char *)0x0)) && (uVar5 != 0)) {
iVar9 = iVar4;
if (*param_6 == *param_4) {
pcVar12 = param_4 + 1;
pcVar13 = param_6 + 1;
do {
pcVar1 = pcVar13 + 1;
if (*pcVar13 != *pcVar12) break;
pcVar12 = pcVar12 + 1;
bVar16 = pcVar13 < param_6 + uVar5;
pcVar13 = pcVar1;
} while (bVar16);
iVar9 = (int)pcVar1 + -1;
}
uVar8 = iVar9 - iVar4;
}
uVar15 = uVar5 - uVar8;
if (uVar5 < uVar8 || uVar15 == 0) {
param_7[6] = 0;
lVar10 = 0;
do {
lVar3 = lVar10 + (ulong)uVar5;
lVar11 = lVar10 + 1;
lVar2 = lVar10 + lVar14;
lVar10 = lVar11;
} while (param_6[lVar3] == param_3[lVar2]);
iVar4 = (int)lVar11;
if (iVar4 == 1) {
param_7[0xc] = 0;
param_7[0xd] = 0;
}
else {
uVar5 = (uVar5 + iVar4) - 1;
param_7[2] = uVar5;
iVar7 = ((iVar7 + iVar6 + (uint)(0xfe < uVar5) * 2) - iVar4) + 2;
}
}
else {
param_7[2] = uVar8;
param_7[6] = uVar15;
*(char **)(param_7 + 10) = param_4 + uVar8;
iVar7 = iVar6 + iVar7 + uVar15 + (uint)(0xfe < uVar8) * 2 + 1;
}
}
return iVar7;
}
| |
40,752 | minja::Parser::parseMathPow() | llama.cpp/common/minja/minja.hpp | std::shared_ptr<Expression> parseMathPow() {
auto left = parseMathPlusMinus();
if (!left) throw std::runtime_error("Expected left side of 'math pow' expression");
while (!consumeToken("**").empty()) {
auto right = parseMathPlusMinus();
if (!right) throw std::runtime_error("Expected right side of 'math pow' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul);
}
return left;
} | O3 | cpp | minja::Parser::parseMathPow():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0xe1a16
cmpq $0x0, (%rbx)
je 0xe1974
leaq 0x40(%rsp), %r12
leaq 0x30(%rsp), %rbp
leaq 0x7f738(%rip), %rax # 0x160f10
addq $0x10, %rax
movq %rax, 0x58(%rsp)
movq %r12, 0x30(%rsp)
movq %rbp, %rdi
leaq 0x39923(%rip), %rsi # 0x11b113
leaq 0x3991e(%rip), %rdx # 0x11b115
callq 0x28870
movq %rsp, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0xdf202
movq (%rsp), %rdi
movq 0x8(%rsp), %r14
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xe182f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xe1846
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x20180
testq %r14, %r14
je 0xe192e
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0xe1a16
cmpq $0x0, 0x20(%rsp)
je 0xe1940
movq (%r15), %rax
movq %rax, (%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0xe1892
movq 0x80714(%rip), %rcx # 0x161f98
cmpb $0x0, (%rcx)
je 0xe188e
incl 0x8(%rax)
jmp 0xe1892
lock
incl 0x8(%rax)
movq %r12, %r13
movq 0x20(%r15), %rax
subq 0x10(%r15), %rax
movq %rax, 0x10(%rsp)
movl $0x58, %edi
callq 0x20210
movq %rax, %r12
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r12)
movq 0x58(%rsp), %rax
movq %rax, (%r12)
movq %r12, %r14
addq $0x10, %r14
movq %r14, %rdi
movq %rsp, %rsi
movq %rbx, %rdx
leaq 0x20(%rsp), %rcx
movl $0x4, %r8d
callq 0xec386
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movups (%rbx), %xmm0
movq %r14, (%rbx)
movq %r12, 0x8(%rbx)
movaps %xmm0, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x70982
leaq 0x68(%rsp), %rdi
callq 0x70982
leaq 0x8(%rsp), %rdi
callq 0x70982
leaq 0x28(%rsp), %rdi
callq 0x70982
movq %r13, %r12
jmp 0xe17e1
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20640
movq %rax, %r15
leaq 0x3fa8b(%rip), %rsi # 0x1213df
movq %rax, %rdi
callq 0x20420
movq 0x8065d(%rip), %rsi # 0x161fc0
movq 0x80616(%rip), %rdx # 0x161f80
movq %r15, %rdi
callq 0x20a40
jmp 0xe19a6
movl $0x10, %edi
callq 0x20640
movq %rax, %r15
leaq 0x3fa2b(%rip), %rsi # 0x1213b3
movq %rax, %rdi
callq 0x20420
movq 0x80629(%rip), %rsi # 0x161fc0
movq 0x805e2(%rip), %rdx # 0x161f80
movq %r15, %rdi
callq 0x20a40
jmp 0xe19e2
movq %rax, %r14
movq %r15, %rdi
callq 0x20ef0
jmp 0xe1a01
movq %rax, %r14
jmp 0xe19d6
movq %rax, %r14
movq %r15, %rdi
callq 0x20ef0
jmp 0xe19d6
jmp 0xe19e2
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x70982
leaq 0x28(%rsp), %rdi
callq 0x70982
jmp 0xe1a01
movq %rax, %r14
jmp 0xe1a01
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0xe1a01
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x20180
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x70982
movq %r14, %rdi
callq 0x20ae0
nop
| _ZN5minja6Parser12parseMathPowEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r15, rsi
mov rbx, rdi
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp qword ptr [rbx], 0
jz loc_E1974
lea r12, [rsp+0A8h+var_68]
lea rbp, [rsp+0A8h+var_78]
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [rsp+0A8h+var_50], rax
loc_E17E1:
mov [rsp+0A8h+var_78], r12
mov rdi, rbp
lea rsi, asc_11B10D+6; "**"
lea rdx, asc_11B10D+8; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, rsp
mov rsi, r15
mov rdx, rbp
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+0A8h+var_A8]; void *
mov r14, [rsp+0A8h+var_A0]
lea rax, [rsp+0A8h+var_98]
cmp rdi, rax
jz short loc_E182F
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E182F:
mov rdi, [rsp+0A8h+var_78]; void *
cmp rdi, r12
jz short loc_E1846
mov rsi, [rsp+0A8h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E1846:
test r14, r14
jz loc_E192E
lea rdi, [rsp+0A8h+var_88]; this
mov rsi, r15
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp [rsp+0A8h+var_88], 0
jz loc_E1940
mov rax, [r15]
mov [rsp+0A8h+var_A8], rax
mov rax, [r15+8]
mov [rsp+0A8h+var_A0], rax
test rax, rax
jz short loc_E1892
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_E188E
inc dword ptr [rax+8]
jmp short loc_E1892
loc_E188E:
lock inc dword ptr [rax+8]
loc_E1892:
mov r13, r12
mov rax, [r15+20h]
sub rax, [r15+10h]
mov [rsp+0A8h+var_98], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov rax, 100000001h
mov [r12+8], rax
mov rax, [rsp+0A8h+var_50]
mov [r12], rax
mov r14, r12
add r14, 10h
mov rdi, r14
mov rsi, rsp
mov rdx, rbx
lea rcx, [rsp+0A8h+var_88]
mov r8d, 4
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
xorps xmm0, xmm0
movaps [rsp+0A8h+var_48], xmm0
movups xmm0, xmmword ptr [rbx]
mov [rbx], r14
mov [rbx+8], r12
movaps xmmword ptr [rsp+0A8h+var_78], xmm0
lea rdi, [rsp+0A8h+var_78+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0A8h+var_48+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0A8h+var_A0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0A8h+var_80]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov r12, r13
jmp loc_E17E1
loc_E192E:
mov rax, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E1940:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_E19A6
loc_E1974:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_E19A6:
jmp short loc_E19E2
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_E1A01
mov r14, rax
jmp short loc_E19D6
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_E19D6
jmp short loc_E19E2
mov r14, rax
lea rdi, [rsp+0A8h+var_A0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E19D6:
lea rdi, [rsp+0A8h+var_80]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_E1A01
loc_E19E2:
mov r14, rax
jmp short loc_E1A01
mov r14, rax
mov rdi, [rsp+0A8h+var_78]; void *
cmp rdi, r12
jz short loc_E1A01
mov rsi, [rsp+0A8h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E1A01:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathPow(minja::Parser *this, long long a2)
{
long long *v2; // r12
volatile signed __int32 *v3; // r14
volatile signed __int32 *v4; // rax
long long *v5; // r13
long long **v6; // r12
__int128 v7; // xmm0
std::runtime_error *v9; // r15
std::runtime_error *exception; // r15
void *v11; // [rsp+0h] [rbp-A8h] BYREF
volatile signed __int32 *v12; // [rsp+8h] [rbp-A0h] BYREF
long long v13; // [rsp+10h] [rbp-98h] BYREF
long long v14; // [rsp+20h] [rbp-88h] BYREF
volatile signed __int32 *v15; // [rsp+28h] [rbp-80h] BYREF
void *v16[2]; // [rsp+30h] [rbp-78h] BYREF
long long v17; // [rsp+40h] [rbp-68h] BYREF
long long *v18; // [rsp+58h] [rbp-50h]
__int128 v19; // [rsp+60h] [rbp-48h] BYREF
minja::Parser::parseMathPlusMinus(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v2 = &v17;
v18 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
while ( 1 )
{
v16[0] = v2;
std::string::_M_construct<char const*>((long long)v16, "**", (long long)"");
minja::Parser::consumeToken(&v11, a2, (_BYTE **)v16, 1u);
v3 = v12;
if ( v11 != &v13 )
operator delete(v11, v13 + 1);
if ( v16[0] != v2 )
operator delete(v16[0], v17 + 1);
if ( !v3 )
break;
minja::Parser::parseMathPlusMinus((minja::Parser *)&v14);
if ( !v14 )
{
v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v9, "Expected right side of 'math pow' expression");
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v11 = *(void **)a2;
v4 = *(volatile signed __int32 **)(a2 + 8);
v12 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v5 = v2;
v13 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16);
v6 = (long long **)operator new(0x58uLL);
v6[1] = (long long *)0x100000001LL;
*v6 = v18;
minja::BinaryOpExpr::BinaryOpExpr(v6 + 2, &v11, this, &v14, 4LL);
v19 = 0LL;
v7 = *(_OWORD *)this;
*(_QWORD *)this = v6 + 2;
*((_QWORD *)this + 1) = v6;
*(_OWORD *)v16 = v7;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v16[1]);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v19 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
v2 = v5;
}
return this;
}
| parseMathPow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15,RSI
MOV RBX,RDI
CALL 0x001e1a16
CMP qword ptr [RBX],0x0
JZ 0x001e1974
LEA R12,[RSP + 0x40]
LEA RBP,[RSP + 0x30]
LEA RAX,[0x260f10]
ADD RAX,0x10
MOV qword ptr [RSP + 0x58],RAX
LAB_001e17e1:
MOV qword ptr [RSP + 0x30],R12
LAB_001e17e6:
MOV RDI,RBP
LEA RSI,[0x21b113]
LEA RDX,[0x21b115]
CALL 0x00128870
LAB_001e17fc:
MOV RDI,RSP
MOV RSI,R15
MOV RDX,RBP
MOV ECX,0x1
CALL 0x001df202
MOV RDI,qword ptr [RSP]
MOV R14,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x001e182f
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00120180
LAB_001e182f:
MOV RDI,qword ptr [RSP + 0x30]
CMP RDI,R12
JZ 0x001e1846
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x00120180
LAB_001e1846:
TEST R14,R14
JZ 0x001e192e
LAB_001e184f:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x001e1a16
CMP qword ptr [RSP + 0x20],0x0
JZ 0x001e1940
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x001e1892
MOV RCX,qword ptr [0x00261f98]
CMP byte ptr [RCX],0x0
JZ 0x001e188e
INC dword ptr [RAX + 0x8]
JMP 0x001e1892
LAB_001e188e:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001e1892:
MOV R13,R12
MOV RAX,qword ptr [R15 + 0x20]
SUB RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
LAB_001e18a2:
MOV EDI,0x58
CALL 0x00120210
LAB_001e18ac:
MOV R12,RAX
MOV RAX,0x100000001
MOV qword ptr [R12 + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [R12],RAX
MOV R14,R12
ADD R14,0x10
MOV RDI,R14
MOV RSI,RSP
MOV RDX,RBX
LEA RCX,[RSP + 0x20]
MOV R8D,0x4
CALL 0x001ec386
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVUPS XMM0,xmmword ptr [RBX]
MOV qword ptr [RBX],R14
MOV qword ptr [RBX + 0x8],R12
MOVAPS xmmword ptr [RSP + 0x30],XMM0
LEA RDI,[RSP + 0x38]
CALL 0x00170982
LEA RDI,[RSP + 0x68]
CALL 0x00170982
LEA RDI,[RSP + 0x8]
CALL 0x00170982
LEA RDI,[RSP + 0x28]
CALL 0x00170982
MOV R12,R13
JMP 0x001e17e1
LAB_001e192e:
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e1940:
MOV EDI,0x10
CALL 0x00120640
MOV R15,RAX
LAB_001e194d:
LEA RSI,[0x2213df]
MOV RDI,RAX
CALL 0x00120420
LAB_001e195c:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R15
CALL 0x00120a40
LAB_001e1974:
MOV EDI,0x10
CALL 0x00120640
MOV R15,RAX
LAB_001e1981:
LEA RSI,[0x2213b3]
MOV RDI,RAX
CALL 0x00120420
LAB_001e1990:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R15
CALL 0x00120a40
|
/* minja::Parser::parseMathPow() */
void minja::Parser::parseMathPow(void)
{
long lVar1;
int8 *puVar2;
runtime_error *prVar3;
int8 *in_RSI;
long *in_RDI;
long *local_a8;
long local_a0;
long local_98 [2];
long local_88;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_80 [8];
long *local_78;
long lStack_70;
long local_68 [3];
int **local_50;
int8 local_48;
int8 auStack_40 [2];
parseMathPlusMinus();
if (*in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e1981 to 001e198f has its CatchHandler @ 001e19a8 */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'math pow\' expression");
/* try { // try from 001e1990 to 001e19a5 has its CatchHandler @ 001e19a6 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
local_50 = &PTR___Sp_counted_base_00260f20;
while( true ) {
local_78 = local_68;
/* try { // try from 001e17e6 to 001e17fb has its CatchHandler @ 001e19e2 */
std::__cxx11::string::_M_construct<char_const*>(&local_78,"**","");
/* try { // try from 001e17fc to 001e180e has its CatchHandler @ 001e19e7 */
consumeToken(&local_a8);
lVar1 = local_a0;
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
if (local_78 != local_68) {
operator_delete(local_78,local_68[0] + 1);
}
if (lVar1 == 0) break;
/* try { // try from 001e184f to 001e185b has its CatchHandler @ 001e19c7 */
parseMathPlusMinus();
if (local_88 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e194d to 001e195b has its CatchHandler @ 001e19ba */
std::runtime_error::runtime_error(prVar3,"Expected right side of \'math pow\' expression");
/* try { // try from 001e195c to 001e1971 has its CatchHandler @ 001e19b5 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
local_a8 = (long *)*in_RSI;
local_a0 = in_RSI[1];
if (local_a0 != 0) {
if (*PTR___libc_single_threaded_00261f98 == '\0') {
LOCK();
*(int *)(local_a0 + 8) = *(int *)(local_a0 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_a0 + 8) = *(int *)(local_a0 + 8) + 1;
}
}
local_98[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 001e18a2 to 001e18ab has its CatchHandler @ 001e19c9 */
puVar2 = (int8 *)operator_new(0x58);
puVar2[1] = 0x100000001;
*puVar2 = local_50;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_a8);
local_48 = 0;
auStack_40[0] = 0;
local_78 = (long *)*in_RDI;
lStack_70 = in_RDI[1];
*in_RDI = (long)(puVar2 + 2);
in_RDI[1] = (long)puVar2;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_70);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_a0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_80);
}
return;
}
| |
40,753 | plutovg_font_face_traverse_glyph_path | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c | float plutovg_font_face_traverse_glyph_path(plutovg_font_face_t* face, float size, float x, float y, plutovg_codepoint_t codepoint, plutovg_path_traverse_func_t traverse_func, void* closure)
{
float scale = plutovg_font_face_get_scale(face, size);
plutovg_matrix_t matrix;
plutovg_matrix_init_translate(&matrix, x, y);
plutovg_matrix_scale(&matrix, scale, -scale);
plutovg_point_t points[3];
plutovg_point_t current_point = {0, 0};
glyph_t* glyph = plutovg_font_face_get_glyph(face, codepoint);
for(int i = 0; i < glyph->nvertices; i++) {
switch(glyph->vertices[i].type) {
case STBTT_vmove:
points[0].x = glyph->vertices[i].x;
points[0].y = glyph->vertices[i].y;
current_point = points[0];
plutovg_matrix_map_points(&matrix, points, points, 1);
traverse_func(closure, PLUTOVG_PATH_COMMAND_MOVE_TO, points, 1);
break;
case STBTT_vline:
points[0].x = glyph->vertices[i].x;
points[0].y = glyph->vertices[i].y;
current_point = points[0];
plutovg_matrix_map_points(&matrix, points, points, 1);
traverse_func(closure, PLUTOVG_PATH_COMMAND_LINE_TO, points, 1);
break;
case STBTT_vcurve:
points[0].x = 2.f / 3.f * glyph->vertices[i].cx + 1.f / 3.f * current_point.x;
points[0].y = 2.f / 3.f * glyph->vertices[i].cy + 1.f / 3.f * current_point.y;
points[1].x = 2.f / 3.f * glyph->vertices[i].cx + 1.f / 3.f * glyph->vertices[i].x;
points[1].y = 2.f / 3.f * glyph->vertices[i].cy + 1.f / 3.f * glyph->vertices[i].y;
points[2].x = glyph->vertices[i].x;
points[2].y = glyph->vertices[i].y;
current_point = points[2];
plutovg_matrix_map_points(&matrix, points, points, 3);
traverse_func(closure, PLUTOVG_PATH_COMMAND_CUBIC_TO, points, 3);
break;
case STBTT_vcubic:
points[0].x = glyph->vertices[i].cx;
points[0].y = glyph->vertices[i].cy;
points[1].x = glyph->vertices[i].cx1;
points[1].y = glyph->vertices[i].cy1;
points[2].x = glyph->vertices[i].x;
points[2].y = glyph->vertices[i].y;
current_point = points[2];
plutovg_matrix_map_points(&matrix, points, points, 3);
traverse_func(closure, PLUTOVG_PATH_COMMAND_CUBIC_TO, points, 3);
break;
default:
assert(false);
}
}
return glyph->advance_width * scale;
} | O1 | c | plutovg_font_face_traverse_glyph_path:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, 0x30(%rsp)
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq 0x28(%rdi), %rax
movslq 0x3c(%rdi), %rcx
movzwl 0x12(%rax,%rcx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
cvtsi2ss %eax, %xmm3
divss %xmm3, %xmm0
movaps %xmm0, 0x50(%rsp)
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movaps %xmm1, %xmm0
movaps %xmm2, %xmm1
callq 0x7d2d
movaps 0x1db8f(%rip), %xmm1 # 0x23280
movaps 0x50(%rsp), %xmm0
xorps %xmm0, %xmm1
movq %r12, %rdi
callq 0x7ee0
movq %r15, %rdi
movl %ebp, %esi
callq 0x51c2
movq %rax, %r15
cmpl $0x0, 0x8(%rax)
jle 0x595c
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
xorl %ebp, %ebp
leaq 0x1d982(%rip), %r12 # 0x230ac
leaq 0x10(%rsp), %r13
xorl %ebx, %ebx
movss %xmm0, 0x8(%rsp)
movq (%r15), %rax
movzbl 0xc(%rax,%rbp), %ecx
decl %ecx
cmpl $0x3, %ecx
ja 0x597d
movslq (%r12,%rcx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movswl (%rax,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0xc(%rsp)
movss %xmm0, 0x10(%rsp)
movswl 0x2(%rax,%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x8(%rsp)
movss %xmm0, 0x14(%rsp)
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x8107
movq 0x30(%rsp), %rdi
xorl %esi, %esi
jmp 0x593d
movswl 0x4(%rax,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss 0x1dae9(%rip), %xmm2 # 0x232a0
movss 0xc(%rsp), %xmm4
mulss %xmm2, %xmm4
movss 0x1dadb(%rip), %xmm3 # 0x232a4
mulss %xmm3, %xmm0
addss %xmm0, %xmm4
movss %xmm4, 0x10(%rsp)
movswl 0x6(%rax,%rbp), %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
movss 0x8(%rsp), %xmm4
mulss %xmm2, %xmm4
mulss %xmm3, %xmm1
addss %xmm4, %xmm1
movss %xmm1, 0x14(%rsp)
movswl (%rax,%rbp), %ecx
xorps %xmm4, %xmm4
cvtsi2ss %ecx, %xmm4
movaps %xmm4, %xmm1
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x18(%rsp)
movswl 0x6(%rax,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movswl 0x2(%rax,%rbp), %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
mulss %xmm2, %xmm1
mulss %xmm3, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x1c(%rsp)
movss %xmm4, 0xc(%rsp)
movss %xmm4, 0x20(%rsp)
jmp 0x58ae
movswl 0x4(%rax,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0x10(%rsp)
movswl 0x6(%rax,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0x14(%rsp)
movswl 0x8(%rax,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0x18(%rsp)
movswl 0xa(%rax,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0x1c(%rsp)
movswl (%rax,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0xc(%rsp)
movss %xmm0, 0x20(%rsp)
movswl 0x2(%rax,%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x8(%rsp)
movss %xmm0, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
movq %r13, %rdx
movl $0x3, %ecx
callq 0x8107
movq 0x30(%rsp), %rdi
movl $0x2, %esi
movq %r13, %rdx
movl $0x3, %ecx
jmp 0x5945
movswl (%rax,%rbp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0xc(%rsp)
movss %xmm0, 0x10(%rsp)
movswl 0x2(%rax,%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x8(%rsp)
movss %xmm0, 0x14(%rsp)
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x8107
movq 0x30(%rsp), %rdi
movl $0x1, %esi
movq %r13, %rdx
movl $0x1, %ecx
callq *%r14
incq %rbx
movslq 0x8(%r15), %rax
addq $0xe, %rbp
cmpq %rax, %rbx
jl 0x5737
xorps %xmm1, %xmm1
cvtsi2ssl 0x10(%r15), %xmm1
movaps 0x50(%rsp), %xmm0
mulss %xmm1, %xmm0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d930(%rip), %rdi # 0x232b4
leaq 0x1d92f(%rip), %rsi # 0x232ba
leaq 0x1d9d9(%rip), %rcx # 0x2336b
movl $0x166, %edx # imm = 0x166
callq 0x30b0
| plutovg_font_face_traverse_glyph_path:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rsp+98h+var_68], rcx
mov r14, rdx
mov ebp, esi
mov r15, rdi
mov rax, [rdi+28h]
movsxd rcx, dword ptr [rdi+3Ch]
movzx eax, word ptr [rax+rcx+12h]
rol ax, 8
movzx eax, ax
cvtsi2ss xmm3, eax
divss xmm0, xmm3
movaps [rsp+98h+var_48], xmm0
lea r12, [rsp+98h+var_60]
mov rdi, r12
movaps xmm0, xmm1
movaps xmm1, xmm2
call plutovg_matrix_init_translate
movaps xmm1, cs:xmmword_23280
movaps xmm0, [rsp+98h+var_48]
xorps xmm1, xmm0
mov rdi, r12
call plutovg_matrix_scale
mov rdi, r15
mov esi, ebp
call plutovg_font_face_get_glyph
mov r15, rax
cmp dword ptr [rax+8], 0
jle loc_595C
xorps xmm0, xmm0
movss [rsp+98h+var_8C], xmm0
xor ebp, ebp
lea r12, jpt_5751
lea r13, [rsp+98h+var_88]
xor ebx, ebx
movss [rsp+98h+var_90], xmm0
loc_5737:
mov rax, [r15]
movzx ecx, byte ptr [rax+rbp+0Ch]
dec ecx; switch 4 cases
cmp ecx, 3
ja def_5751; jumptable 0000000000005751 default case
movsxd rcx, ds:(jpt_5751 - 230ACh)[r12+rcx*4]
add rcx, r12
jmp rcx; switch jump
loc_5753:
movsx ecx, word ptr [rax+rbp]; jumptable 0000000000005751 case 1
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
movss [rsp+98h+var_8C], xmm0
movss [rsp+98h+var_88], xmm0
movsx eax, word ptr [rax+rbp+2]
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
movss [rsp+98h+var_90], xmm0
movss [rsp+98h+var_84], xmm0
lea rdi, [rsp+98h+var_60]
mov rsi, r13
mov rdx, r13
mov ecx, 1
call plutovg_matrix_map_points
mov rdi, [rsp+98h+var_68]
xor esi, esi
jmp loc_593D
loc_57A3:
movsx ecx, word ptr [rax+rbp+4]; jumptable 0000000000005751 case 3
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
movss xmm2, cs:dword_232A0
movss xmm4, [rsp+98h+var_8C]
mulss xmm4, xmm2
movss xmm3, cs:dword_232A4
mulss xmm0, xmm3
addss xmm4, xmm0
movss [rsp+98h+var_88], xmm4
movsx ecx, word ptr [rax+rbp+6]
xorps xmm1, xmm1
cvtsi2ss xmm1, ecx
movss xmm4, [rsp+98h+var_90]
mulss xmm4, xmm2
mulss xmm1, xmm3
addss xmm1, xmm4
movss [rsp+98h+var_84], xmm1
movsx ecx, word ptr [rax+rbp]
xorps xmm4, xmm4
cvtsi2ss xmm4, ecx
movaps xmm1, xmm4
mulss xmm1, xmm2
addss xmm1, xmm0
movss [rsp+98h+var_80], xmm1
movsx ecx, word ptr [rax+rbp+6]
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
movsx ecx, word ptr [rax+rbp+2]
xorps xmm1, xmm1
cvtsi2ss xmm1, ecx
mulss xmm1, xmm2
mulss xmm0, xmm3
addss xmm0, xmm1
movss [rsp+98h+var_7C], xmm0
movss [rsp+98h+var_8C], xmm4
movss [rsp+98h+var_78], xmm4
jmp short loc_58AE
loc_584F:
movsx ecx, word ptr [rax+rbp+4]; jumptable 0000000000005751 case 4
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
movss [rsp+98h+var_88], xmm0
movsx ecx, word ptr [rax+rbp+6]
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
movss [rsp+98h+var_84], xmm0
movsx ecx, word ptr [rax+rbp+8]
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
movss [rsp+98h+var_80], xmm0
movsx ecx, word ptr [rax+rbp+0Ah]
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
movss [rsp+98h+var_7C], xmm0
movsx ecx, word ptr [rax+rbp]
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
movss [rsp+98h+var_8C], xmm0
movss [rsp+98h+var_78], xmm0
loc_58AE:
movsx eax, word ptr [rax+rbp+2]
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
movss [rsp+98h+var_90], xmm0
movss [rsp+98h+var_74], xmm0
lea rdi, [rsp+98h+var_60]
mov rsi, r13
mov rdx, r13
mov ecx, 3
call plutovg_matrix_map_points
mov rdi, [rsp+98h+var_68]
mov esi, 2
mov rdx, r13
mov ecx, 3
jmp short loc_5945
loc_58EF:
movsx ecx, word ptr [rax+rbp]; jumptable 0000000000005751 case 2
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
movss [rsp+98h+var_8C], xmm0
movss [rsp+98h+var_88], xmm0
movsx eax, word ptr [rax+rbp+2]
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
movss [rsp+98h+var_90], xmm0
movss [rsp+98h+var_84], xmm0
lea rdi, [rsp+98h+var_60]
mov rsi, r13
mov rdx, r13
mov ecx, 1
call plutovg_matrix_map_points
mov rdi, [rsp+98h+var_68]
mov esi, 1
loc_593D:
mov rdx, r13
mov ecx, 1
loc_5945:
call r14
inc rbx
movsxd rax, dword ptr [r15+8]
add rbp, 0Eh
cmp rbx, rax
jl loc_5737
loc_595C:
xorps xmm1, xmm1
cvtsi2ss xmm1, dword ptr [r15+10h]
movaps xmm0, [rsp+98h+var_48]
mulss xmm0, xmm1
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
def_5751:
lea rdi, aFalse; jumptable 0000000000005751 default case
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aFloatPlutovgFo; "float plutovg_font_face_traverse_glyph_"...
mov edx, 166h
call ___assert_fail
| float plutovg_font_face_traverse_glyph_path(
long long a1,
int a2,
void ( *a3)(long long, long long, float *, long long),
long long a4,
__m128 a5,
double a6,
double a7)
{
double v8; // xmm1_8
long long glyph; // r15
long long v10; // rbp
long long v11; // rbx
long long v12; // rax
long long v13; // rdi
long long v14; // rsi
float v15; // xmm0_4
float v16; // xmm4_4
long long v17; // rcx
float v19; // [rsp+8h] [rbp-90h]
float v20; // [rsp+Ch] [rbp-8Ch]
float v21; // [rsp+10h] [rbp-88h] BYREF
float v22; // [rsp+14h] [rbp-84h]
float v23; // [rsp+18h] [rbp-80h]
float v24; // [rsp+1Ch] [rbp-7Ch]
float v25; // [rsp+20h] [rbp-78h]
float v26; // [rsp+24h] [rbp-74h]
long long v27; // [rsp+30h] [rbp-68h]
_BYTE v28[24]; // [rsp+38h] [rbp-60h] BYREF
__m128 v29; // [rsp+50h] [rbp-48h]
v27 = a4;
a5.m128_f32[0] = a5.m128_f32[0]
/ (float)(unsigned __int16)__ROL2__(*(_WORD *)(*(_QWORD *)(a1 + 40) + *(int *)(a1 + 60) + 18LL), 8);
v29 = a5;
plutovg_matrix_init_translate(v28, a6, a7);
*(_QWORD *)&v8 = v29.m128_u64[0] ^ 0x8000000080000000LL;
plutovg_matrix_scale(v28);
glyph = plutovg_font_face_get_glyph(a1, a2);
if ( *(int *)(glyph + 8) > 0 )
{
v20 = 0.0;
v10 = 0LL;
v11 = 0LL;
v19 = 0.0;
while ( 2 )
{
v12 = *(_QWORD *)glyph;
switch ( *(_BYTE *)(*(_QWORD *)glyph + v10 + 12) )
{
case 1:
v20 = (float)*(__int16 *)(v12 + v10);
v21 = v20;
v19 = (float)*(__int16 *)(v12 + v10 + 2);
v22 = v19;
plutovg_matrix_map_points(v28, &v21, &v21, 1LL, v19, v8);
v13 = v27;
v14 = 0LL;
goto LABEL_9;
case 2:
v20 = (float)*(__int16 *)(v12 + v10);
v21 = v20;
v19 = (float)*(__int16 *)(v12 + v10 + 2);
v22 = v19;
plutovg_matrix_map_points(v28, &v21, &v21, 1LL, v19, v8);
v13 = v27;
v14 = 1LL;
LABEL_9:
v17 = 1LL;
goto LABEL_10;
case 3:
v15 = (float)*(__int16 *)(v12 + v10 + 4) * 0.66666669;
v21 = (float)(v20 * 0.33333334) + v15;
v22 = (float)((float)*(__int16 *)(v12 + v10 + 6) * 0.66666669) + (float)(v19 * 0.33333334);
v16 = (float)*(__int16 *)(v12 + v10);
v23 = (float)(v16 * 0.33333334) + v15;
HIDWORD(v8) = 0;
*(float *)&v8 = (float)*(__int16 *)(v12 + v10 + 2) * 0.33333334;
v24 = (float)((float)*(__int16 *)(v12 + v10 + 6) * 0.66666669) + *(float *)&v8;
v20 = v16;
v25 = v16;
goto LABEL_7;
case 4:
v21 = (float)*(__int16 *)(v12 + v10 + 4);
v22 = (float)*(__int16 *)(v12 + v10 + 6);
v23 = (float)*(__int16 *)(v12 + v10 + 8);
v24 = (float)*(__int16 *)(v12 + v10 + 10);
v20 = (float)*(__int16 *)(v12 + v10);
v25 = v20;
LABEL_7:
v19 = (float)*(__int16 *)(v12 + v10 + 2);
v26 = v19;
plutovg_matrix_map_points(v28, &v21, &v21, 3LL, v19, v8);
v13 = v27;
v14 = 2LL;
v17 = 3LL;
LABEL_10:
a3(v13, v14, &v21, v17);
++v11;
v10 += 14LL;
if ( v11 >= *(int *)(glyph + 8) )
return v29.m128_f32[0] * (float)*(int *)(glyph + 16);
continue;
default:
__assert_fail(
"false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c",
358LL,
"float plutovg_font_face_traverse_glyph_path(plutovg_font_face_t *, float, float, float, plutovg_codepoint_t,"
" plutovg_path_traverse_func_t, void *)");
}
}
}
return v29.m128_f32[0] * (float)*(int *)(glyph + 16);
}
| plutovg_font_face_traverse_glyph_path:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x30],RCX
MOV R14,RDX
MOV EBP,ESI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0x28]
MOVSXD RCX,dword ptr [RDI + 0x3c]
MOVZX EAX,word ptr [RAX + RCX*0x1 + 0x12]
ROL AX,0x8
MOVZX EAX,AX
CVTSI2SS XMM3,EAX
DIVSS XMM0,XMM3
MOVAPS xmmword ptr [RSP + 0x50],XMM0
LEA R12,[RSP + 0x38]
MOV RDI,R12
MOVAPS XMM0,XMM1
MOVAPS XMM1,XMM2
CALL 0x00107d2d
MOVAPS XMM1,xmmword ptr [0x00123280]
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
XORPS XMM1,XMM0
MOV RDI,R12
CALL 0x00107ee0
MOV RDI,R15
MOV ESI,EBP
CALL 0x001051c2
MOV R15,RAX
CMP dword ptr [RAX + 0x8],0x0
JLE 0x0010595c
XORPS XMM0,XMM0
MOVSS dword ptr [RSP + 0xc],XMM0
XOR EBP,EBP
LEA R12,[0x1230ac]
LEA R13,[RSP + 0x10]
XOR EBX,EBX
MOVSS dword ptr [RSP + 0x8],XMM0
LAB_00105737:
MOV RAX,qword ptr [R15]
MOVZX ECX,byte ptr [RAX + RBP*0x1 + 0xc]
DEC ECX
CMP ECX,0x3
JA 0x0010597d
MOVSXD RCX,dword ptr [R12 + RCX*0x4]
ADD RCX,R12
switchD:
JMP RCX
caseD_1:
MOVSX ECX,word ptr [RAX + RBP*0x1]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MOVSS dword ptr [RSP + 0xc],XMM0
MOVSS dword ptr [RSP + 0x10],XMM0
MOVSX EAX,word ptr [RAX + RBP*0x1 + 0x2]
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS dword ptr [RSP + 0x14],XMM0
LEA RDI,[RSP + 0x38]
MOV RSI,R13
MOV RDX,R13
MOV ECX,0x1
CALL 0x00108107
MOV RDI,qword ptr [RSP + 0x30]
XOR ESI,ESI
JMP 0x0010593d
caseD_3:
MOVSX ECX,word ptr [RAX + RBP*0x1 + 0x4]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MOVSS XMM2,dword ptr [0x001232a0]
MOVSS XMM4,dword ptr [RSP + 0xc]
MULSS XMM4,XMM2
MOVSS XMM3,dword ptr [0x001232a4]
MULSS XMM0,XMM3
ADDSS XMM4,XMM0
MOVSS dword ptr [RSP + 0x10],XMM4
MOVSX ECX,word ptr [RAX + RBP*0x1 + 0x6]
XORPS XMM1,XMM1
CVTSI2SS XMM1,ECX
MOVSS XMM4,dword ptr [RSP + 0x8]
MULSS XMM4,XMM2
MULSS XMM1,XMM3
ADDSS XMM1,XMM4
MOVSS dword ptr [RSP + 0x14],XMM1
MOVSX ECX,word ptr [RAX + RBP*0x1]
XORPS XMM4,XMM4
CVTSI2SS XMM4,ECX
MOVAPS XMM1,XMM4
MULSS XMM1,XMM2
ADDSS XMM1,XMM0
MOVSS dword ptr [RSP + 0x18],XMM1
MOVSX ECX,word ptr [RAX + RBP*0x1 + 0x6]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MOVSX ECX,word ptr [RAX + RBP*0x1 + 0x2]
XORPS XMM1,XMM1
CVTSI2SS XMM1,ECX
MULSS XMM1,XMM2
MULSS XMM0,XMM3
ADDSS XMM0,XMM1
MOVSS dword ptr [RSP + 0x1c],XMM0
MOVSS dword ptr [RSP + 0xc],XMM4
MOVSS dword ptr [RSP + 0x20],XMM4
JMP 0x001058ae
caseD_4:
MOVSX ECX,word ptr [RAX + RBP*0x1 + 0x4]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MOVSS dword ptr [RSP + 0x10],XMM0
MOVSX ECX,word ptr [RAX + RBP*0x1 + 0x6]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MOVSS dword ptr [RSP + 0x14],XMM0
MOVSX ECX,word ptr [RAX + RBP*0x1 + 0x8]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MOVSS dword ptr [RSP + 0x18],XMM0
MOVSX ECX,word ptr [RAX + RBP*0x1 + 0xa]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MOVSS dword ptr [RSP + 0x1c],XMM0
MOVSX ECX,word ptr [RAX + RBP*0x1]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MOVSS dword ptr [RSP + 0xc],XMM0
MOVSS dword ptr [RSP + 0x20],XMM0
LAB_001058ae:
MOVSX EAX,word ptr [RAX + RBP*0x1 + 0x2]
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS dword ptr [RSP + 0x24],XMM0
LEA RDI,[RSP + 0x38]
MOV RSI,R13
MOV RDX,R13
MOV ECX,0x3
CALL 0x00108107
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,0x2
MOV RDX,R13
MOV ECX,0x3
JMP 0x00105945
caseD_2:
MOVSX ECX,word ptr [RAX + RBP*0x1]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
MOVSS dword ptr [RSP + 0xc],XMM0
MOVSS dword ptr [RSP + 0x10],XMM0
MOVSX EAX,word ptr [RAX + RBP*0x1 + 0x2]
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS dword ptr [RSP + 0x14],XMM0
LEA RDI,[RSP + 0x38]
MOV RSI,R13
MOV RDX,R13
MOV ECX,0x1
CALL 0x00108107
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,0x1
LAB_0010593d:
MOV RDX,R13
MOV ECX,0x1
LAB_00105945:
CALL R14
INC RBX
MOVSXD RAX,dword ptr [R15 + 0x8]
ADD RBP,0xe
CMP RBX,RAX
JL 0x00105737
LAB_0010595c:
XORPS XMM1,XMM1
CVTSI2SS XMM1,dword ptr [R15 + 0x10]
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MULSS XMM0,XMM1
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
default:
LEA RDI,[0x1232b4]
LEA RSI,[0x1232ba]
LEA RCX,[0x12336b]
MOV EDX,0x166
CALL 0x001030b0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8
plutovg_font_face_traverse_glyph_path
(int8 param_1,int4 param_2,int4 param_3,long param_4,int4 param_5,
code *param_6,int8 param_7)
{
ushort uVar1;
long lVar2;
long *plVar3;
int8 uVar4;
long lVar5;
long lVar6;
int8 uVar7;
float local_90;
float local_8c;
float local_88;
float local_84;
float local_80;
float local_7c;
float local_78;
float local_74;
int8 local_68;
int1 local_60 [24];
float local_48;
int4 uStack_44;
uStack_44 = (int4)((ulong)param_1 >> 0x20);
uVar1 = *(ushort *)(*(long *)(param_4 + 0x28) + 0x12 + (long)*(int *)(param_4 + 0x3c));
local_48 = (float)param_1 / (float)(ushort)(uVar1 << 8 | uVar1 >> 8);
local_68 = param_7;
plutovg_matrix_init_translate(param_2,param_3,local_60);
plutovg_matrix_scale(local_48,_DAT_00123280 ^ (uint)local_48,local_60);
plVar3 = (long *)plutovg_font_face_get_glyph(param_4,param_5);
if (0 < (int)plVar3[1]) {
local_8c = 0.0;
lVar6 = 0;
lVar5 = 0;
local_90 = 0.0;
do {
lVar2 = *plVar3;
switch(*(int1 *)(lVar2 + 0xc + lVar6)) {
case 1:
local_8c = (float)(int)*(short *)(lVar2 + lVar6);
local_90 = (float)(int)*(short *)(lVar2 + 2 + lVar6);
local_88 = local_8c;
local_84 = local_90;
plutovg_matrix_map_points(local_60,&local_88,&local_88,1);
uVar7 = 0;
break;
case 2:
local_8c = (float)(int)*(short *)(lVar2 + lVar6);
local_90 = (float)(int)*(short *)(lVar2 + 2 + lVar6);
local_88 = local_8c;
local_84 = local_90;
plutovg_matrix_map_points(local_60,&local_88,&local_88,1);
uVar7 = 1;
break;
case 3:
local_80 = (float)(int)*(short *)(lVar2 + 4 + lVar6) * DAT_001232a4;
local_88 = local_8c * DAT_001232a0 + local_80;
local_84 = (float)(int)*(short *)(lVar2 + 6 + lVar6) * DAT_001232a4 +
local_90 * DAT_001232a0;
local_78 = (float)(int)*(short *)(lVar2 + lVar6);
local_80 = local_78 * DAT_001232a0 + local_80;
local_7c = (float)(int)*(short *)(lVar2 + 6 + lVar6) * DAT_001232a4 +
(float)(int)*(short *)(lVar2 + 2 + lVar6) * DAT_001232a0;
goto LAB_001058ae;
case 4:
local_88 = (float)(int)*(short *)(lVar2 + 4 + lVar6);
local_84 = (float)(int)*(short *)(lVar2 + 6 + lVar6);
local_80 = (float)(int)*(short *)(lVar2 + 8 + lVar6);
local_7c = (float)(int)*(short *)(lVar2 + 10 + lVar6);
local_78 = (float)(int)*(short *)(lVar2 + lVar6);
LAB_001058ae:
local_8c = local_78;
local_90 = (float)(int)*(short *)(lVar2 + 2 + lVar6);
local_74 = local_90;
plutovg_matrix_map_points(local_60,&local_88,&local_88,3);
uVar7 = 2;
uVar4 = 3;
goto LAB_00105945;
default:
/* WARNING: Subroutine does not return */
__assert_fail("false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c"
,0x166,
"float plutovg_font_face_traverse_glyph_path(plutovg_font_face_t *, float, float, float, plutovg_codepoint_t, plutovg_path_traverse_func_t, void *)"
);
}
uVar4 = 1;
LAB_00105945:
(*param_6)(local_68,uVar7,&local_88,uVar4);
lVar5 = lVar5 + 1;
lVar6 = lVar6 + 0xe;
} while (lVar5 < (int)plVar3[1]);
}
return CONCAT44(uStack_44,local_48 * (float)(int)plVar3[2]);
}
| |
40,754 | evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous namespace)::invoke<(evmone::Opcode)9>(std::array<short, 256ul> const&, intx::uint<256u> const*, evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/baseline_execution.cpp | [[release_inline]] inline Position invoke(const CostTable& cost_table, const uint256* stack_bottom,
Position pos, int64_t& gas, ExecutionState& state) noexcept
{
if (const auto status = check_requirements<Op>(cost_table, gas, pos.stack_top, stack_bottom);
status != EVMC_SUCCESS)
{
state.status = status;
return {nullptr, pos.stack_top};
}
const auto new_pos = invoke(instr::core::impl<Op>, pos, gas, state);
const auto new_stack_top = pos.stack_top + instr::traits[Op].stack_height_change;
return {new_pos, new_stack_top};
} | O1 | cpp | evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous namespace)::invoke<(evmone::Opcode)9>(std::array<short, 256ul> const&, intx::uint<256u> const*, evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %r14
movq %rsi, %rbx
addq $0x40, %rdi
cmpq %rdx, %rdi
jae 0x2171e
movq (%rcx), %rax
leaq -0x8(%rax), %rdx
movq %rdx, (%rcx)
xorl %ecx, %ecx
cmpq $0x8, %rax
setl %cl
leal (%rcx,%rcx,2), %eax
testl %eax, %eax
je 0x215dd
movl %eax, 0x78(%r8)
xorl %ebx, %ebx
movq %r14, %r15
jmp 0x21709
leaq -0x40(%r14), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x70(%rsp,%rax,8), %rdx
xorq (%r15,%rax,8), %rdx
orq %rdx, %rcx
incq %rax
cmpq $0x4, %rax
jne 0x215f5
xorps %xmm0, %xmm0
testq %rcx, %rcx
je 0x216e4
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
xorl %esi, %esi
movq -0x20(%r14,%rsi,8), %rcx
xorl %r9d, %r9d
xorl %edi, %edi
leaq (%rdi,%rsi), %r8
xorl %r10d, %r10d
addq 0x30(%rsp,%r8,8), %r9
setb %r10b
movq %rcx, %rax
mulq (%r14,%rdi,8)
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq %r9, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movaps %xmm0, 0x70(%rsp)
xorl %eax, %eax
xorl %edx, %edx
movq (%rsp,%rdx,8), %r9
movzbl %al, %eax
btl $0x0, %eax
adcq 0x20(%rsp,%rdx,8), %r9
setb %al
movq %r9, 0x70(%rsp,%rdx,8)
incq %rdx
cmpq $0x1, %rdx
je 0x21669
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %r9
movq %rax, 0x30(%rsp,%r8,8)
incq %rdi
cmpq $0x4, %rdi
jne 0x21636
movq %r9, 0x50(%rsp,%rsi,8)
incq %rsi
cmpq $0x4, %rsi
jne 0x2162c
leaq 0x70(%rsp), %r12
leaq 0x30(%rsp), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x42496
movq 0x40(%r12), %rax
movups 0x48(%r12), %xmm0
movaps %xmm0, (%rsp)
movq 0x58(%r12), %rcx
movq %rcx, 0x10(%rsp)
jmp 0x216f0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
xorl %eax, %eax
movq %rax, -0x40(%r14)
movaps (%rsp), %xmm0
movups %xmm0, -0x38(%r14)
movq 0x10(%rsp), %rax
movq %rax, -0x28(%r14)
incq %rbx
movq %rbx, %rax
movq %r15, %rdx
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x7
popq %rax
jmp 0x215cb
| _ZN6evmone8baseline12_GLOBAL__N_16invokeILNS_6OpcodeE9EEENS1_8PositionERKSt5arrayIsLm256EEPKN4intx4uintILj256EEES4_RlRNS_14ExecutionStateE:
push r15
push r14
push r12
push rbx
sub rsp, 0D8h
mov r14, rdx
mov rbx, rsi
add rdi, 40h ; '@'
cmp rdi, rdx
jnb loc_2171E
mov rax, [rcx]
lea rdx, [rax-8]
mov [rcx], rdx
xor ecx, ecx
cmp rax, 8
setl cl
lea eax, [rcx+rcx*2]
loc_215CB:
test eax, eax
jz short loc_215DD
mov [r8+78h], eax
xor ebx, ebx
mov r15, r14
jmp loc_21709
loc_215DD:
lea r15, [r14-40h]
xorps xmm0, xmm0
movaps [rsp+0F8h+var_78], xmm0
movaps [rsp+0F8h+var_88], xmm0
xor eax, eax
xor ecx, ecx
loc_215F5:
mov rdx, qword ptr [rsp+rax*8+0F8h+var_88]
xor rdx, [r15+rax*8]
or rcx, rdx
inc rax
cmp rax, 4
jnz short loc_215F5
xorps xmm0, xmm0
test rcx, rcx
jz loc_216E4
movaps [rsp+0F8h+var_98], xmm0
movaps [rsp+0F8h+var_A8], xmm0
movaps [rsp+0F8h+var_B8], xmm0
movaps [rsp+0F8h+var_C8], xmm0
xor esi, esi
loc_2162C:
mov rcx, [r14+rsi*8-20h]
xor r9d, r9d
xor edi, edi
loc_21636:
lea r8, [rdi+rsi]
xor r10d, r10d
add r9, qword ptr [rsp+r8*8+0F8h+var_C8]
setb r10b
mov rax, rcx
mul qword ptr [r14+rdi*8]
mov qword ptr [rsp+0F8h+var_F8], rax
mov qword ptr [rsp+0F8h+var_F8+8], rdx
mov [rsp+0F8h+var_D8], r9
mov [rsp+0F8h+var_D0], r10
movaps [rsp+0F8h+var_88], xmm0
xor eax, eax
xor edx, edx
loc_21669:
mov r9, qword ptr [rsp+rdx*8+0F8h+var_F8]
movzx eax, al
bt eax, 0
adc r9, [rsp+rdx*8+0F8h+var_D8]
setb al
mov qword ptr [rsp+rdx*8+0F8h+var_88], r9
inc rdx
cmp rdx, 1
jz short loc_21669
mov rax, qword ptr [rsp+0F8h+var_88]
mov r9, qword ptr [rsp+0F8h+var_88+8]
mov qword ptr [rsp+r8*8+0F8h+var_C8], rax
inc rdi
cmp rdi, 4
jnz short loc_21636
mov qword ptr [rsp+rsi*8+0F8h+var_A8], r9
inc rsi
cmp rsi, 4
jnz loc_2162C
lea r12, [rsp+0F8h+var_88]
lea rsi, [rsp+0F8h+var_C8]
mov rdi, r12
mov rdx, r15
call _ZN4intx7udivremILj512ELj256EEENS_10div_resultINS_4uintIXT_EEENS2_IXT0_EEEEERKS3_RKS4_; intx::udivrem<512u,256u>(intx::uint<512u> const&,intx::uint<256u> const&)
mov rax, [r12+40h]
movups xmm0, xmmword ptr [r12+48h]
movaps [rsp+0F8h+var_F8], xmm0
mov rcx, [r12+58h]
mov [rsp+0F8h+var_E8], rcx
jmp short loc_216F0
loc_216E4:
movaps [rsp+0F8h+var_F8], xmm0
and [rsp+0F8h+var_E8], 0
xor eax, eax
loc_216F0:
mov [r14-40h], rax
movaps xmm0, [rsp+0F8h+var_F8]
movups xmmword ptr [r14-38h], xmm0
mov rax, [rsp+0F8h+var_E8]
mov [r14-28h], rax
inc rbx
loc_21709:
mov rax, rbx
mov rdx, r15
add rsp, 0D8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_2171E:
push 7
pop rax
jmp loc_215CB
| long long evmone::baseline::`anonymous namespace'::invoke<(evmone::Opcode)9>(
long long a1,
long long a2,
unsigned long long a3,
long long *a4,
long long a5)
{
long long v7; // rax
int v8; // eax
long long v10; // rax
long long v11; // rcx
long long i; // rsi
unsigned long long v13; // rcx
long long v14; // r9
long long j; // rdi
bool v16; // cf
long long v17; // r9
char v18; // al
long long v19; // rdx
long long v20; // r9
long long v21; // r9
long long v22; // rax
unsigned __int128 v24; // [rsp+0h] [rbp-F8h]
long long v25; // [rsp+10h] [rbp-E8h]
_QWORD v26[2]; // [rsp+20h] [rbp-D8h]
_OWORD v27[2]; // [rsp+30h] [rbp-C8h] BYREF
_OWORD v28[2]; // [rsp+50h] [rbp-A8h] BYREF
_OWORD v29[4]; // [rsp+70h] [rbp-88h] BYREF
long long v30; // [rsp+B0h] [rbp-48h]
unsigned __int128 v31; // [rsp+B8h] [rbp-40h]
long long v32; // [rsp+C8h] [rbp-30h]
if ( a1 + 64 >= a3 )
{
v8 = 7;
}
else
{
v7 = *a4;
*a4 -= 8LL;
v8 = 3 * (v7 < 8);
}
if ( v8 )
{
*(_DWORD *)(a5 + 120) = v8;
return 0LL;
}
else
{
memset(v29, 0, 32);
v10 = 0LL;
v11 = 0LL;
do
{
v11 |= *(_QWORD *)(a3 - 64 + 8 * v10) ^ *((_QWORD *)v29 + v10);
++v10;
}
while ( v10 != 4 );
if ( v11 )
{
memset(v28, 0, sizeof(v28));
memset(v27, 0, sizeof(v27));
for ( i = 0LL; i != 4; ++i )
{
v13 = *(_QWORD *)(a3 + 8 * i - 32);
v14 = 0LL;
for ( j = 0LL; j != 4; ++j )
{
v16 = __CFADD__(*((_QWORD *)v27 + j + i), v14);
v17 = *((_QWORD *)v27 + j + i) + v14;
v24 = *(unsigned long long *)(a3 + 8 * j) * (unsigned __int128)v13;
v26[0] = v17;
v26[1] = v16;
v29[0] = 0LL;
v18 = 0;
v19 = 0LL;
do
{
v20 = *((_QWORD *)&v24 + v19);
v16 = __CFADD__((v18 & 1) != 0, v20);
v21 = ((v18 & 1) != 0) + v20;
v18 = v16 | __CFADD__(v26[v19], v21);
*((_QWORD *)v29 + v19) = v26[v19] + v21;
++v19;
}
while ( v19 == 1 );
v14 = *((_QWORD *)&v29[0] + 1);
*((_QWORD *)v27 + j + i) = *(_QWORD *)&v29[0];
}
*((_QWORD *)v28 + i) = v14;
}
intx::udivrem<512u,256u>(v29, v27, a3 - 64, 0.0);
v22 = v30;
v24 = v31;
v25 = v32;
}
else
{
v24 = 0LL;
v25 = 0LL;
v22 = 0LL;
}
*(_QWORD *)(a3 - 64) = v22;
*(_OWORD *)(a3 - 56) = v24;
*(_QWORD *)(a3 - 40) = v25;
return a2 + 1;
}
}
| invoke<(evmone::Opcode)9>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV R14,RDX
MOV RBX,RSI
ADD RDI,0x40
CMP RDI,RDX
JNC 0x0012171e
MOV RAX,qword ptr [RCX]
LEA RDX,[RAX + -0x8]
MOV qword ptr [RCX],RDX
XOR ECX,ECX
CMP RAX,0x8
SETL CL
LEA EAX,[RCX + RCX*0x2]
LAB_001215cb:
TEST EAX,EAX
JZ 0x001215dd
MOV dword ptr [R8 + 0x78],EAX
XOR EBX,EBX
MOV R15,R14
JMP 0x00121709
LAB_001215dd:
LEA R15,[R14 + -0x40]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
XOR EAX,EAX
XOR ECX,ECX
LAB_001215f5:
MOV RDX,qword ptr [RSP + RAX*0x8 + 0x70]
XOR RDX,qword ptr [R15 + RAX*0x8]
OR RCX,RDX
INC RAX
CMP RAX,0x4
JNZ 0x001215f5
XORPS XMM0,XMM0
TEST RCX,RCX
JZ 0x001216e4
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
XOR ESI,ESI
LAB_0012162c:
MOV RCX,qword ptr [R14 + RSI*0x8 + -0x20]
XOR R9D,R9D
XOR EDI,EDI
LAB_00121636:
LEA R8,[RDI + RSI*0x1]
XOR R10D,R10D
ADD R9,qword ptr [RSP + R8*0x8 + 0x30]
SETC R10B
MOV RAX,RCX
MUL qword ptr [R14 + RDI*0x8]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP + 0x20],R9
MOV qword ptr [RSP + 0x28],R10
MOVAPS xmmword ptr [RSP + 0x70],XMM0
XOR EAX,EAX
XOR EDX,EDX
LAB_00121669:
MOV R9,qword ptr [RSP + RDX*0x8]
MOVZX EAX,AL
BT EAX,0x0
ADC R9,qword ptr [RSP + RDX*0x8 + 0x20]
SETC AL
MOV qword ptr [RSP + RDX*0x8 + 0x70],R9
INC RDX
CMP RDX,0x1
JZ 0x00121669
MOV RAX,qword ptr [RSP + 0x70]
MOV R9,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + R8*0x8 + 0x30],RAX
INC RDI
CMP RDI,0x4
JNZ 0x00121636
MOV qword ptr [RSP + RSI*0x8 + 0x50],R9
INC RSI
CMP RSI,0x4
JNZ 0x0012162c
LEA R12,[RSP + 0x70]
LEA RSI,[RSP + 0x30]
MOV RDI,R12
MOV RDX,R15
CALL 0x00142496
MOV RAX,qword ptr [R12 + 0x40]
MOVUPS XMM0,xmmword ptr [R12 + 0x48]
MOVAPS xmmword ptr [RSP],XMM0
MOV RCX,qword ptr [R12 + 0x58]
MOV qword ptr [RSP + 0x10],RCX
JMP 0x001216f0
LAB_001216e4:
MOVAPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x10],0x0
XOR EAX,EAX
LAB_001216f0:
MOV qword ptr [R14 + -0x40],RAX
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [R14 + -0x38],XMM0
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [R14 + -0x28],RAX
INC RBX
LAB_00121709:
MOV RAX,RBX
MOV RDX,R15
ADD RSP,0xd8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0012171e:
PUSH 0x7
POP RAX
JMP 0x001215cb
|
/* evmone::baseline::(anonymous namespace)::Position evmone::baseline::(anonymous
namespace)::invoke<(evmone::Opcode)9>(std::array<short, 256ul> const&, intx::uint<256u> const*,
evmone::baseline::(anonymous namespace)::Position, long&, evmone::ExecutionState&) */
int1 [16]
evmone::baseline::(anonymous_namespace)::invoke<(evmone::Opcode)9>
(long param_1,long param_2,uint *param_3,long *param_4,long param_5)
{
ulong uVar1;
ulong uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
int iVar5;
long lVar6;
ulong uVar7;
long lVar8;
long lVar9;
uint *puVar10;
bool bVar11;
int1 auVar12 [16];
int1 local_f8 [16];
int8 local_e8;
ulong local_d8 [2];
ulong local_c8 [8];
ulong local_88 [8];
int8 local_48;
int8 local_40;
int8 uStack_38;
int8 local_30;
if ((uint *)(param_1 + 0x40) < param_3) {
lVar6 = *param_4;
*param_4 = lVar6 + -8;
iVar5 = (uint)(lVar6 < 8) * 3;
}
else {
iVar5 = 7;
}
if (iVar5 == 0) {
puVar10 = param_3 + -0x40;
local_88[2] = 0;
local_88[3] = 0;
local_88[0] = 0;
local_88[1] = 0;
lVar6 = 0;
uVar7 = 0;
do {
uVar7 = uVar7 | local_88[lVar6] ^ *(ulong *)(puVar10 + lVar6 * 8);
lVar6 = lVar6 + 1;
} while (lVar6 != 4);
if (uVar7 == 0) {
local_f8._0_8_ = 0;
local_f8._8_8_ = 0;
local_e8 = 0;
local_48 = 0;
}
else {
local_c8[6] = 0;
local_c8[7] = 0;
local_c8[4] = 0;
local_c8[5] = 0;
local_c8[2] = 0;
local_c8[3] = 0;
local_c8[0] = 0;
local_c8[1] = 0;
lVar6 = 0;
do {
uVar7 = *(ulong *)(param_3 + lVar6 * 8 + -0x20);
local_88[1] = 0;
lVar9 = 0;
do {
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar7;
auVar4._8_8_ = 0;
auVar4._0_8_ = *(ulong *)(param_3 + lVar9 * 8);
local_f8 = auVar3 * auVar4;
local_d8[0] = local_88[1] + local_c8[lVar9 + lVar6];
local_d8[1] = (ulong)CARRY8(local_88[1],local_c8[lVar9 + lVar6]);
local_88[0] = 0;
local_88[1] = 0;
bVar11 = false;
lVar8 = 0;
do {
uVar1 = (ulong)bVar11;
uVar2 = *(ulong *)(local_f8 + lVar8 * 8) + local_d8[lVar8];
bVar11 = CARRY8(*(ulong *)(local_f8 + lVar8 * 8),local_d8[lVar8]) || CARRY8(uVar2,uVar1)
;
local_88[lVar8] = uVar2 + uVar1;
lVar8 = lVar8 + 1;
} while (lVar8 == 1);
local_c8[lVar9 + lVar6] = local_88[0];
lVar9 = lVar9 + 1;
} while (lVar9 != 4);
local_c8[lVar6 + 4] = local_88[1];
lVar6 = lVar6 + 1;
} while (lVar6 != 4);
intx::udivrem<512u,256u>((intx *)local_88,(uint *)local_c8,puVar10);
local_f8._0_8_ = local_40;
local_f8._8_8_ = uStack_38;
local_e8 = local_30;
}
*(int8 *)(param_3 + -0x40) = local_48;
*(int8 *)(param_3 + -0x38) = local_f8._0_8_;
*(int8 *)(param_3 + -0x30) = local_f8._8_8_;
*(int8 *)(param_3 + -0x28) = local_e8;
param_2 = param_2 + 1;
}
else {
*(int *)(param_5 + 0x78) = iVar5;
param_2 = 0;
puVar10 = param_3;
}
auVar12._8_8_ = puVar10;
auVar12._0_8_ = param_2;
return auVar12;
}
| |
40,755 | maria_flush_log_for_page | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_flush_log_for_page(PAGECACHE_IO_HOOK_ARGS *args)
{
LSN lsn;
uchar *page= args->page;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
DBUG_ENTER("maria_flush_log_for_page");
/* share is 0 here only in unittest */
DBUG_ASSERT(!share || share->page_type == PAGECACHE_LSN_PAGE);
lsn= lsn_korr(page);
if (translog_flush(lsn))
DBUG_RETURN(1);
/*
Now when log is written, it's safe to incremented 'open' counter for
the table so that we know it was not closed properly.
*/
if (share && !share->global_changed)
_ma_mark_file_changed_now(share);
DBUG_RETURN(0);
} | O3 | c | maria_flush_log_for_page:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x10(%rdi), %rbx
movzwl (%rax), %ecx
shlq $0x20, %rcx
movzbl 0x2(%rax), %edx
shlq $0x30, %rdx
orq %rcx, %rdx
movl 0x3(%rax), %edi
orq %rdx, %rdi
callq 0x37ac7
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x3f611
testq %rbx, %rbx
je 0x3f60f
cmpb $0x0, 0x7df(%rbx)
jne 0x3f60f
movq %rbx, %rdi
callq 0x43d17
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| maria_flush_log_for_page:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rbx, [rdi+10h]
movzx ecx, word ptr [rax]
shl rcx, 20h
movzx edx, byte ptr [rax+2]
shl rdx, 30h
or rdx, rcx
mov edi, [rax+3]
or rdi, rdx
call translog_flush
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_3F611
test rbx, rbx
jz short loc_3F60F
cmp byte ptr [rbx+7DFh], 0
jnz short loc_3F60F
mov rdi, rbx
call _ma_mark_file_changed_now
loc_3F60F:
xor eax, eax
loc_3F611:
add rsp, 8
pop rbx
pop rbp
retn
| char maria_flush_log_for_page(unsigned __int16 **a1)
{
unsigned __int16 *v1; // rbx
char v2; // cl
char result; // al
v1 = a1[2];
v2 = translog_flush(((unsigned long long)**a1 << 32) | ((unsigned long long)*((unsigned __int8 *)*a1 + 2) << 48) | *(unsigned int *)((char *)*a1 + 3));
result = 1;
if ( !v2 )
{
if ( v1 )
{
if ( !*((_BYTE *)v1 + 2015) )
ma_mark_file_changed_now(v1);
}
return 0;
}
return result;
}
| maria_flush_log_for_page:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RBX,qword ptr [RDI + 0x10]
MOVZX ECX,word ptr [RAX]
SHL RCX,0x20
MOVZX EDX,byte ptr [RAX + 0x2]
SHL RDX,0x30
OR RDX,RCX
MOV EDI,dword ptr [RAX + 0x3]
OR RDI,RDX
CALL 0x00137ac7
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0013f611
TEST RBX,RBX
JZ 0x0013f60f
CMP byte ptr [RBX + 0x7df],0x0
JNZ 0x0013f60f
MOV RDI,RBX
CALL 0x00143d17
LAB_0013f60f:
XOR EAX,EAX
LAB_0013f611:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 maria_flush_log_for_page(int8 *param_1)
{
ushort *puVar1;
long lVar2;
char cVar3;
int8 uVar4;
puVar1 = (ushort *)*param_1;
lVar2 = param_1[2];
cVar3 = translog_flush((ulong)*(uint *)((long)puVar1 + 3) |
(ulong)(byte)puVar1[1] << 0x30 | (ulong)*puVar1 << 0x20);
uVar4 = 1;
if (cVar3 == '\0') {
if ((lVar2 != 0) && (*(char *)(lVar2 + 0x7df) == '\0')) {
_ma_mark_file_changed_now(lVar2);
}
uVar4 = 0;
}
return uVar4;
}
| |
40,756 | common_sampler::set_logits(llama_context*, int) | monkey531[P]llama/common/sampling.cpp | void set_logits(struct llama_context * ctx, int idx) {
const auto * logits = llama_get_logits_ith(ctx, idx);
const llama_model * model = llama_get_model(ctx);
const llama_vocab * vocab = llama_model_get_vocab(model);
const int n_vocab = llama_vocab_n_tokens(vocab);
cur.resize(n_vocab);
for (llama_token token_id = 0; token_id < n_vocab; token_id++) {
cur[token_id] = llama_token_data{token_id, logits[token_id], 0.0f};
}
cur_p = { cur.data(), cur.size(), -1, false };
} | O3 | cpp | common_sampler::set_logits(llama_context*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x1ad40
movq %rax, %r14
movq %r15, %rdi
callq 0x1a760
movq %rax, %rdi
callq 0x1b0d0
movq %rax, %rdi
callq 0x1b060
movl %eax, %ebp
leaq 0x180(%rbx), %rdi
movslq %eax, %r15
movq %r15, %rsi
callq 0xcf3a2
movq 0x180(%rbx), %rax
testl %r15d, %r15d
jle 0xcf1ac
movl %ebp, %ecx
leaq 0x8(%rax), %rdx
xorl %esi, %esi
movss (%r14,%rsi,4), %xmm0
movl %esi, -0x8(%rdx)
movss %xmm0, -0x4(%rdx)
movl $0x0, (%rdx)
incq %rsi
addq $0xc, %rdx
cmpq %rsi, %rcx
jne 0xcf18c
movq 0x188(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq %rax, 0x198(%rbx)
movq %rdx, 0x1a0(%rbx)
movq $-0x1, 0x1a8(%rbx)
movb $0x0, 0x1b0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN14common_sampler10set_logitsEP13llama_contexti:
push rbp
push r15
push r14
push rbx
push rax
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, edx
call _llama_get_logits_ith
mov r14, rax
mov rdi, r15
call _llama_get_model
mov rdi, rax
call _llama_model_get_vocab
mov rdi, rax
call _llama_vocab_n_tokens
mov ebp, eax
lea rdi, [rbx+180h]
movsxd r15, eax
mov rsi, r15
call _ZNSt6vectorI16llama_token_dataSaIS0_EE6resizeEm; std::vector<llama_token_data>::resize(ulong)
mov rax, [rbx+180h]
test r15d, r15d
jle short loc_CF1AC
mov ecx, ebp
lea rdx, [rax+8]
xor esi, esi
loc_CF18C:
movss xmm0, dword ptr [r14+rsi*4]
mov [rdx-8], esi
movss dword ptr [rdx-4], xmm0
mov dword ptr [rdx], 0
inc rsi
add rdx, 0Ch
cmp rcx, rsi
jnz short loc_CF18C
loc_CF1AC:
mov rcx, [rbx+188h]
sub rcx, rax
sar rcx, 2
mov rdx, 0AAAAAAAAAAAAAAABh
imul rdx, rcx
mov [rbx+198h], rax
mov [rbx+1A0h], rdx
mov qword ptr [rbx+1A8h], 0FFFFFFFFFFFFFFFFh
mov byte ptr [rbx+1B0h], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long common_sampler::set_logits(long long a1, long long a2, unsigned int a3)
{
long long logits_ith; // r14
long long model; // rax
long long vocab; // rax
int v6; // ebp
long long result; // rax
_DWORD *v8; // rdx
long long i; // rsi
int v10; // xmm0_4
unsigned long long v11; // rdx
logits_ith = llama_get_logits_ith(a2, a3);
model = llama_get_model(a2);
vocab = llama_model_get_vocab(model);
v6 = llama_vocab_n_tokens(vocab);
std::vector<llama_token_data>::resize(a1 + 384, v6);
result = *(_QWORD *)(a1 + 384);
if ( v6 > 0 )
{
v8 = (_DWORD *)(result + 8);
for ( i = 0LL; i != v6; ++i )
{
v10 = *(_DWORD *)(logits_ith + 4 * i);
*(v8 - 2) = i;
*(v8 - 1) = v10;
*v8 = 0;
v8 += 3;
}
}
v11 = 0xAAAAAAAAAAAAAAABLL * ((*(_QWORD *)(a1 + 392) - result) >> 2);
*(_QWORD *)(a1 + 408) = result;
*(_QWORD *)(a1 + 416) = v11;
*(_QWORD *)(a1 + 424) = -1LL;
*(_BYTE *)(a1 + 432) = 0;
return result;
}
| set_logits:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,EDX
CALL 0x0011ad40
MOV R14,RAX
MOV RDI,R15
CALL 0x0011a760
MOV RDI,RAX
CALL 0x0011b0d0
MOV RDI,RAX
CALL 0x0011b060
MOV EBP,EAX
LEA RDI,[RBX + 0x180]
MOVSXD R15,EAX
MOV RSI,R15
CALL 0x001cf3a2
MOV RAX,qword ptr [RBX + 0x180]
TEST R15D,R15D
JLE 0x001cf1ac
MOV ECX,EBP
LEA RDX,[RAX + 0x8]
XOR ESI,ESI
LAB_001cf18c:
MOVSS XMM0,dword ptr [R14 + RSI*0x4]
MOV dword ptr [RDX + -0x8],ESI
MOVSS dword ptr [RDX + -0x4],XMM0
MOV dword ptr [RDX],0x0
INC RSI
ADD RDX,0xc
CMP RCX,RSI
JNZ 0x001cf18c
LAB_001cf1ac:
MOV RCX,qword ptr [RBX + 0x188]
SUB RCX,RAX
SAR RCX,0x2
MOV RDX,-0x5555555555555555
IMUL RDX,RCX
MOV qword ptr [RBX + 0x198],RAX
MOV qword ptr [RBX + 0x1a0],RDX
MOV qword ptr [RBX + 0x1a8],-0x1
MOV byte ptr [RBX + 0x1b0],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* common_sampler::set_logits(llama_context*, int) */
void __thiscall common_sampler::set_logits(common_sampler *this,llama_context *param_1,int param_2)
{
int4 uVar1;
long lVar2;
uint uVar3;
long lVar4;
int8 uVar5;
int4 *puVar6;
ulong uVar7;
lVar4 = llama_get_logits_ith(param_1,param_2);
uVar5 = llama_get_model(param_1);
uVar5 = llama_model_get_vocab(uVar5);
uVar3 = llama_vocab_n_tokens(uVar5);
std::vector<llama_token_data,std::allocator<llama_token_data>>::resize
((vector<llama_token_data,std::allocator<llama_token_data>> *)(this + 0x180),
(long)(int)uVar3);
lVar2 = *(long *)(this + 0x180);
if (0 < (int)uVar3) {
puVar6 = (int4 *)(lVar2 + 8);
uVar7 = 0;
do {
uVar1 = *(int4 *)(lVar4 + uVar7 * 4);
puVar6[-2] = (int)uVar7;
puVar6[-1] = uVar1;
*puVar6 = 0;
uVar7 = uVar7 + 1;
puVar6 = puVar6 + 3;
} while (uVar3 != uVar7);
}
*(long *)(this + 0x198) = lVar2;
*(long *)(this + 0x1a0) = (*(long *)(this + 0x188) - lVar2 >> 2) * -0x5555555555555555;
*(int8 *)(this + 0x1a8) = 0xffffffffffffffff;
this[0x1b0] = (common_sampler)0x0;
return;
}
| |
40,757 | my_mb_wc_eucjpms | eloqsql/strings/ctype-eucjpms.c | static int
my_mb_wc_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS X 0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjpms_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjpms_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_eucjpms:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0xd053a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0xd0756
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0xd0562
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xd0756
cmpl $0xa1, -0x2c(%rbp)
jl 0xd0611
cmpl $0xfe, -0x2c(%rbp)
jg 0xd0611
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0xd0596
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xd0756
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x1d67d0(%rip), %rax # 0x2a6d80
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xd05cb
movl $0x2, %eax
movl %eax, -0x30(%rbp)
jmp 0xd0606
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x31(%rbp)
jl 0xd05f3
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd0756
cmpl $0x8e, -0x2c(%rbp)
jne 0xd0681
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0xd0634
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xd0756
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa1, %eax
jl 0xd0652
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xdf, %eax
jle 0xd065e
movl $0x0, -0x4(%rbp)
jmp 0xd0756
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl $0xfec0, %eax # imm = 0xFEC0
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0xd0756
cmpl $0x8f, -0x2c(%rbp)
jne 0xd074f
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0xd06a8
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0xd0756
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x1f66b9(%rip), %rax # 0x2c6d80
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xd06e2
movl $0x3, %eax
movl %eax, -0x38(%rbp)
jmp 0xd0747
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0xd0734
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xfe, %ecx
movb %al, -0x39(%rbp)
jg 0xd0734
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0xd0734
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %dl
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd0756
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_mb_wc_eucjpms:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_D053A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_D0756
loc_D053A:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_D0562
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_D0756
loc_D0562:
cmp [rbp+var_2C], 0A1h
jl loc_D0611
cmp [rbp+var_2C], 0FEh
jg loc_D0611
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_D0596
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_D0756
loc_D0596:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0208_eucjpms_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_D05CB
mov eax, 2
mov [rbp+var_30], eax
jmp short loc_D0606
loc_D05CB:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_31], al
jl short loc_D05F3
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
setnle al
mov [rbp+var_31], al
loc_D05F3:
mov dl, [rbp+var_31]
mov eax, 0FFFFFFFEh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_30], eax
loc_D0606:
mov eax, [rbp+var_30]
mov [rbp+var_4], eax
jmp loc_D0756
loc_D0611:
cmp [rbp+var_2C], 8Eh
jnz short loc_D0681
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_D0634
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_D0756
loc_D0634:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A1h
jl short loc_D0652
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0DFh
jle short loc_D065E
loc_D0652:
mov [rbp+var_4], 0
jmp loc_D0756
loc_D065E:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add eax, 0FEC0h
movsxd rcx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_D0756
loc_D0681:
cmp [rbp+var_2C], 8Fh
jnz loc_D074F
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_D06A8
mov [rbp+var_4], 0FFFFFF99h
jmp loc_D0756
loc_D06A8:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+2]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0212_eucjpms_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_D06E2
mov eax, 3
mov [rbp+var_38], eax
jmp short loc_D0747
loc_D06E2:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_D0734
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0FEh
mov [rbp+var_39], al
jg short loc_D0734
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+2]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_D0734
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
cmp eax, 0FEh
setnle al
mov [rbp+var_39], al
loc_D0734:
mov dl, [rbp+var_39]
mov eax, 0FFFFFFFDh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_38], eax
loc_D0747:
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp short loc_D0756
loc_D074F:
mov [rbp+var_4], 0
loc_D0756:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_eucjpms(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
long long v6; // rax
unsigned int v7; // eax
bool v9; // [rsp+1h] [rbp-39h]
bool v11; // [rsp+9h] [rbp-31h]
unsigned int v13; // [rsp+Eh] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v13 = *a3;
if ( v13 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 == 255 )
{
if ( v13 == 142 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( a3[1] >= 0xA1u && a3[1] <= 0xDFu )
{
*a2 = a3[1] + 65216;
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else if ( v13 == 143 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
v6 = jisx0212_eucjpms_to_unicode[256 * a3[1] + a3[2]];
*a2 = v6;
if ( v6 )
{
return 3;
}
else
{
v9 = 1;
if ( a3[1] >= 0xA1u )
{
v9 = 1;
if ( a3[1] != 255 )
{
v9 = 1;
if ( a3[2] >= 0xA1u )
v9 = a3[2] == 255;
}
}
v7 = -3;
if ( v9 )
v7 = 0;
return v7;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = jisx0208_eucjpms_to_unicode[a3[1] + (v13 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
v11 = 1;
if ( a3[1] >= 0xA1u )
v11 = a3[1] == 255;
v5 = -2;
if ( v11 )
v5 = 0;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_mb_wc_eucjpms:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001d053a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001d0756
LAB_001d053a:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x001d0562
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001d0756
LAB_001d0562:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x001d0611
CMP dword ptr [RBP + -0x2c],0xfe
JG 0x001d0611
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001d0596
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001d0756
LAB_001d0596:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x3a6d80]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001d05cb
MOV EAX,0x2
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d0606
LAB_001d05cb:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x31],AL
JL 0x001d05f3
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x31],AL
LAB_001d05f3:
MOV DL,byte ptr [RBP + -0x31]
MOV EAX,0xfffffffe
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x30],EAX
LAB_001d0606:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001d0756
LAB_001d0611:
CMP dword ptr [RBP + -0x2c],0x8e
JNZ 0x001d0681
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001d0634
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001d0756
LAB_001d0634:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa1
JL 0x001d0652
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xdf
JLE 0x001d065e
LAB_001d0652:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001d0756
LAB_001d065e:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
ADD EAX,0xfec0
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001d0756
LAB_001d0681:
CMP dword ptr [RBP + -0x2c],0x8f
JNZ 0x001d074f
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001d06a8
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x001d0756
LAB_001d06a8:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x3c6d80]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001d06e2
MOV EAX,0x3
MOV dword ptr [RBP + -0x38],EAX
JMP 0x001d0747
LAB_001d06e2:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x001d0734
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xfe
MOV byte ptr [RBP + -0x39],AL
JG 0x001d0734
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x001d0734
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_001d0734:
MOV DL,byte ptr [RBP + -0x39]
MOV EAX,0xfffffffd
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
LAB_001d0747:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001d0756
LAB_001d074f:
MOV dword ptr [RBP + -0x4],0x0
LAB_001d0756:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_eucjpms(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_40;
int4 local_38;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xfe < uVar3)) {
if (uVar3 == 0x8e) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((param_3[1] < 0xa1) || (0xdf < param_3[1])) {
local_c = 0;
}
else {
*param_2 = (long)(int)(param_3[1] + 0xfec0);
local_c = 2;
}
}
else if (uVar3 == 0x8f) {
if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
uVar1 = *(ushort *)
(&jisx0212_eucjpms_to_unicode +
(long)(int)((uint)param_3[1] * 0x100 + (uint)param_3[2]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (((0xa0 < param_3[1]) && (bVar2 = true, param_3[1] != 0xff)) &&
(bVar2 = true, 0xa0 < param_3[2])) {
bVar2 = 0xfe < param_3[2];
}
local_40 = 0xfffffffd;
if (bVar2) {
local_40 = 0;
}
}
else {
local_40 = 3;
}
local_c = local_40;
}
}
else {
local_c = 0;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)
(jisx0208_eucjpms_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (0xa0 < param_3[1]) {
bVar2 = 0xfe < param_3[1];
}
local_38 = 0xfffffffe;
if (bVar2) {
local_38 = 0;
}
}
else {
local_38 = 2;
}
local_c = local_38;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
40,758 | my_mb_wc_eucjpms | eloqsql/strings/ctype-eucjpms.c | static int
my_mb_wc_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS X 0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjpms_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjpms_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_eucjpms:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x8eb96
movzbl (%rdx), %edi
testb %dil, %dil
js 0x8eb98
movq %rdi, (%rsi)
movl $0x1, %eax
popq %rbp
retq
leal 0x5f(%rdi), %eax
cmpb $0x5d, %al
ja 0x8ebe4
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x8eb96
movzbl 0x1(%rdx), %eax
shll $0x9, %edi
leal (%rdi,%rax,2), %eax
leaq 0xb0282(%rip), %rcx # 0x13ee40
movzwl (%rax,%rcx), %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testq %rcx, %rcx
jne 0x8eb96
movb 0x1(%rdx), %al
incb %al
xorl %ecx, %ecx
cmpb $-0x5e, %al
setb %cl
leal -0x2(,%rcx,2), %eax
jmp 0x8eb96
cmpq $0x8f, %rdi
je 0x8ec28
cmpl $0x8e, %edi
jne 0x8ec6a
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x8eb96
movzbl 0x1(%rdx), %ecx
leal 0x20(%rcx), %edx
movl $0x0, %eax
cmpb $-0x3f, %dl
jb 0x8eb96
addq $0xfec0, %rcx # imm = 0xFEC0
movq %rcx, (%rsi)
movl $0x2, %eax
jmp 0x8eb96
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0x8eb96
movzwl 0x1(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
leaq 0xd01f4(%rip), %rcx # 0x15ee40
movzwl (%rcx,%rax,2), %ecx
movq %rcx, (%rsi)
movl $0x3, %eax
testq %rcx, %rcx
jne 0x8eb96
movb 0x1(%rdx), %al
incb %al
cmpb $-0x5e, %al
jae 0x8ec71
xorl %eax, %eax
jmp 0x8eb96
movb 0x2(%rdx), %cl
movl $0x0, %eax
cmpb $-0x5f, %cl
jb 0x8eb96
xorl %eax, %eax
cmpb $-0x1, %cl
sete %al
leal (%rax,%rax,2), %eax
addl $-0x3, %eax
jmp 0x8eb96
| my_mb_wc_eucjpms:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_8EB96
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_8EB98
mov [rsi], rdi
mov eax, 1
loc_8EB96:
pop rbp
retn
loc_8EB98:
lea eax, [rdi+5Fh]
cmp al, 5Dh ; ']'
ja short loc_8EBE4
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_8EB96
movzx eax, byte ptr [rdx+1]
shl edi, 9
lea eax, [rdi+rax*2]
lea rcx, jisx0208_eucjpms_to_unicode
movzx ecx, word ptr [rax+rcx]
mov [rsi], rcx
mov eax, 2
test rcx, rcx
jnz short loc_8EB96
mov al, [rdx+1]
inc al
xor ecx, ecx
cmp al, 0A2h
setb cl
lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2]
jmp short loc_8EB96
loc_8EBE4:
cmp rdi, 8Fh
jz short loc_8EC28
cmp edi, 8Eh
jnz short loc_8EC6A
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_8EB96
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+20h]
mov eax, 0
cmp dl, 0C1h
jb short loc_8EB96
add rcx, 0FEC0h
mov [rsi], rcx
mov eax, 2
jmp loc_8EB96
loc_8EC28:
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja loc_8EB96
movzx eax, word ptr [rdx+1]
rol ax, 8
movzx eax, ax
lea rcx, jisx0212_eucjpms_to_unicode
movzx ecx, word ptr [rcx+rax*2]
mov [rsi], rcx
mov eax, 3
test rcx, rcx
jnz loc_8EB96
mov al, [rdx+1]
inc al
cmp al, 0A2h
jnb short loc_8EC71
loc_8EC6A:
xor eax, eax
jmp loc_8EB96
loc_8EC71:
mov cl, [rdx+2]
mov eax, 0
cmp cl, 0A1h
jb loc_8EB96
xor eax, eax
cmp cl, 0FFh
setz al
lea eax, [rax+rax*2]
add eax, 0FFFFFFFDh
jmp loc_8EB96
| long long my_mb_wc_eucjpms(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
long long v6; // rcx
long long v7; // rcx
long long v8; // rcx
unsigned __int8 v9; // cl
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
v5 = *a3;
if ( (v5 & 0x80u) == 0LL )
{
*a2 = v5;
return 1LL;
}
if ( (unsigned __int8)(v5 + 95) <= 0x5Du )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = jisx0208_eucjpms_to_unicode[256 * (_DWORD)v5 + a3[1]];
*a2 = v6;
result = 2LL;
if ( !v6 )
return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2;
}
return result;
}
if ( v5 != 143 )
{
if ( (_DWORD)v5 == 142 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v7 = a3[1];
result = 0LL;
if ( (unsigned __int8)(v7 + 32) >= 0xC1u )
{
*a2 = v7 + 65216;
return 2LL;
}
}
return result;
}
return 0LL;
}
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v8 = jisx0212_eucjpms_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)];
*a2 = v8;
result = 3LL;
if ( v8 )
return result;
if ( (unsigned __int8)(a3[1] + 1) < 0xA2u )
return 0LL;
v9 = a3[2];
result = 0LL;
if ( v9 >= 0xA1u )
return 3 * (unsigned int)(v9 == 0xFF) - 3;
return result;
}
| my_mb_wc_eucjpms:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0018eb96
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x0018eb98
MOV qword ptr [RSI],RDI
MOV EAX,0x1
LAB_0018eb96:
POP RBP
RET
LAB_0018eb98:
LEA EAX,[RDI + 0x5f]
CMP AL,0x5d
JA 0x0018ebe4
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x0018eb96
MOVZX EAX,byte ptr [RDX + 0x1]
SHL EDI,0x9
LEA EAX,[RDI + RAX*0x2]
LEA RCX,[0x23ee40]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST RCX,RCX
JNZ 0x0018eb96
MOV AL,byte ptr [RDX + 0x1]
INC AL
XOR ECX,ECX
CMP AL,0xa2
SETC CL
LEA EAX,[-0x2 + RCX*0x2]
JMP 0x0018eb96
LAB_0018ebe4:
CMP RDI,0x8f
JZ 0x0018ec28
CMP EDI,0x8e
JNZ 0x0018ec6a
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x0018eb96
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x20]
MOV EAX,0x0
CMP DL,0xc1
JC 0x0018eb96
ADD RCX,0xfec0
MOV qword ptr [RSI],RCX
MOV EAX,0x2
JMP 0x0018eb96
LAB_0018ec28:
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x0018eb96
MOVZX EAX,word ptr [RDX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
LEA RCX,[0x25ee40]
MOVZX ECX,word ptr [RCX + RAX*0x2]
MOV qword ptr [RSI],RCX
MOV EAX,0x3
TEST RCX,RCX
JNZ 0x0018eb96
MOV AL,byte ptr [RDX + 0x1]
INC AL
CMP AL,0xa2
JNC 0x0018ec71
LAB_0018ec6a:
XOR EAX,EAX
JMP 0x0018eb96
LAB_0018ec71:
MOV CL,byte ptr [RDX + 0x2]
MOV EAX,0x0
CMP CL,0xa1
JC 0x0018eb96
XOR EAX,EAX
CMP CL,0xff
SETZ AL
LEA EAX,[RAX + RAX*0x2]
ADD EAX,-0x3
JMP 0x0018eb96
|
int my_mb_wc_eucjpms(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
iVar3 = -0x65;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((char)bVar1 < '\0') {
if ((byte)(bVar1 + 0x5f) < 0x5e) {
iVar3 = -0x66;
if (param_3 + 2 <= param_4) {
uVar2 = *(ushort *)
(jisx0208_eucjpms_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2));
*param_2 = (ulong)uVar2;
iVar3 = 2;
if ((ulong)uVar2 == 0) {
iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2;
}
}
}
else {
if ((ulong)bVar1 == 0x8f) {
if (param_4 < param_3 + 3) {
return -0x67;
}
uVar2 = *(ushort *)
(&jisx0212_eucjpms_to_unicode +
(ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) *
2);
*param_2 = (ulong)uVar2;
if ((ulong)uVar2 != 0) {
return 3;
}
if (0xa1 < (byte)(param_3[1] + 1)) {
if (param_3[2] < 0xa1) {
return 0;
}
return (uint)(param_3[2] == 0xff) * 3 + -3;
}
}
else if (bVar1 == 0x8e) {
if (param_4 < param_3 + 2) {
return -0x66;
}
if ((byte)(param_3[1] + 0x20) < 0xc1) {
return 0;
}
*param_2 = (ulong)param_3[1] + 0xfec0;
return 2;
}
iVar3 = 0;
}
}
else {
*param_2 = (ulong)bVar1;
iVar3 = 1;
}
}
return iVar3;
}
| |
40,759 | skip_trailing_space | eloqsql/strings/strings_def.h | static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
{
const uchar *end= ptr + len;
if (len > 20)
{
const uchar *end_words= (const uchar *)(intptr)
(((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
const uchar *start_words= (const uchar *)(intptr)
((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
if (end_words > ptr)
{
while (end > end_words && end[-1] == 0x20)
end--;
if (end[-1] == 0x20 && start_words < end_words)
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
end -= SIZEOF_INT;
}
}
while (end > ptr && end[-1] == 0x20)
end--;
return (end);
} | O0 | c | skip_trailing_space:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x14, -0x10(%rbp)
jbe 0x580fa
movq -0x18(%rbp), %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
subq $0x1, %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x5805d
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0x580f8
jmp 0x5806d
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x29(%rbp)
jbe 0x5808d
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x58096
jmp 0x580a4
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x5806d
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
jne 0x580f6
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x580f6
jmp 0x580bd
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x2a(%rbp)
jbe 0x580dd
movq -0x18(%rbp), %rax
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x580e6
jmp 0x580f4
movq -0x18(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x580bd
jmp 0x580f6
jmp 0x580f8
jmp 0x580fa
jmp 0x580fc
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x2b(%rbp)
jbe 0x5811c
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0x58125
jmp 0x58133
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x580fc
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| skip_trailing_space_2:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_10], 14h
jbe loc_580FA
mov rax, [rbp+var_18]
shr rax, 2
shl rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
add rax, 4
sub rax, 1
shr rax, 2
shl rax, 2
mov [rbp+var_28], rax
jmp short $+2
loc_5805D:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_8]
jbe loc_580F8
jmp short $+2
loc_5806D:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_29], al
jbe short loc_5808D
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_29], al
loc_5808D:
mov al, [rbp+var_29]
test al, 1
jnz short loc_58096
jmp short loc_580A4
loc_58096:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_5806D
loc_580A4:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
jnz short loc_580F6
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnb short loc_580F6
jmp short $+2
loc_580BD:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_2A], al
jbe short loc_580DD
mov rax, [rbp+var_18]
cmp dword ptr [rax-4], 20202020h
setz al
mov [rbp+var_2A], al
loc_580DD:
mov al, [rbp+var_2A]
test al, 1
jnz short loc_580E6
jmp short loc_580F4
loc_580E6:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rax
jmp short loc_580BD
loc_580F4:
jmp short $+2
loc_580F6:
jmp short $+2
loc_580F8:
jmp short $+2
loc_580FA:
jmp short $+2
loc_580FC:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_2B], al
jbe short loc_5811C
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_2B], al
loc_5811C:
mov al, [rbp+var_2B]
test al, 1
jnz short loc_58125
jmp short loc_58133
loc_58125:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_580FC
loc_58133:
mov rax, [rbp+var_18]
pop rbp
retn
| unsigned long long skip_trailing_space_2(unsigned long long a1, unsigned long long a2)
{
bool v3; // [rsp+1h] [rbp-2Bh]
bool v4; // [rsp+2h] [rbp-2Ah]
bool v5; // [rsp+3h] [rbp-29h]
unsigned long long v6; // [rsp+4h] [rbp-28h]
unsigned long long v7; // [rsp+Ch] [rbp-20h]
unsigned long long v8; // [rsp+14h] [rbp-18h]
v8 = a2 + a1;
if ( a2 > 0x14 )
{
v7 = 4 * (v8 >> 2);
v6 = 4 * ((a1 + 3) >> 2);
if ( v7 > a1 )
{
while ( 1 )
{
v5 = 0;
if ( v8 > v7 )
v5 = *(_BYTE *)(v8 - 1) == 32;
if ( !v5 )
break;
--v8;
}
if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 )
{
while ( 1 )
{
v4 = 0;
if ( v8 > v6 )
v4 = *(_DWORD *)(v8 - 4) == 538976288;
if ( !v4 )
break;
v8 -= 4LL;
}
}
}
}
while ( 1 )
{
v3 = 0;
if ( v8 > a1 )
v3 = *(_BYTE *)(v8 - 1) == 32;
if ( !v3 )
break;
--v8;
}
return v8;
}
| skip_trailing_space:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x10],0x14
JBE 0x001580fa
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x4
SUB RAX,0x1
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015805d
LAB_0015805d:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x8]
JBE 0x001580f8
JMP 0x0015806d
LAB_0015806d:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x29],AL
JBE 0x0015808d
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_0015808d:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x00158096
JMP 0x001580a4
LAB_00158096:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0015806d
LAB_001580a4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
JNZ 0x001580f6
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001580f6
JMP 0x001580bd
LAB_001580bd:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x2a],AL
JBE 0x001580dd
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + -0x4],0x20202020
SETZ AL
MOV byte ptr [RBP + -0x2a],AL
LAB_001580dd:
MOV AL,byte ptr [RBP + -0x2a]
TEST AL,0x1
JNZ 0x001580e6
JMP 0x001580f4
LAB_001580e6:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001580bd
LAB_001580f4:
JMP 0x001580f6
LAB_001580f6:
JMP 0x001580f8
LAB_001580f8:
JMP 0x001580fa
LAB_001580fa:
JMP 0x001580fc
LAB_001580fc:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x2b],AL
JBE 0x0015811c
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x2b],AL
LAB_0015811c:
MOV AL,byte ptr [RBP + -0x2b]
TEST AL,0x1
JNZ 0x00158125
JMP 0x00158133
LAB_00158125:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001580fc
LAB_00158133:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
ulong skip_trailing_space(ulong param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
bool bVar3;
ulong local_20;
local_20 = param_1 + param_2;
if (0x14 < param_2) {
uVar1 = local_20 & 0xfffffffffffffffc;
uVar2 = param_1 + 3 & 0xfffffffffffffffc;
if (param_1 < uVar1) {
while( true ) {
bVar3 = false;
if (uVar1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) {
while( true ) {
bVar3 = false;
if (uVar2 < local_20) {
bVar3 = *(int *)(local_20 - 4) == 0x20202020;
}
if (!bVar3) break;
local_20 = local_20 - 4;
}
}
}
}
while( true ) {
bVar3 = false;
if (param_1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
return local_20;
}
| |
40,760 | run_scheduler | eloqsql/client/mysqlslap.c | static int
run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
{
uint x;
struct timeval start_time, end_time;
thread_context con;
pthread_t mainthread; /* Thread descriptor */
pthread_attr_t attr; /* Thread attributes */
DBUG_ENTER("run_scheduler");
con.stmt= stmts;
con.limit= limit;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr,
PTHREAD_CREATE_DETACHED);
pthread_mutex_lock(&counter_mutex);
thread_counter= 0;
pthread_mutex_lock(&sleeper_mutex);
master_wakeup= 1;
pthread_mutex_unlock(&sleeper_mutex);
for (x= 0; x < concur; x++)
{
/* now you create the thread */
if (pthread_create(&mainthread, &attr, run_task,
(void *)&con) != 0)
{
fprintf(stderr,"%s: Could not create thread\n",
my_progname);
exit(0);
}
thread_counter++;
}
pthread_mutex_unlock(&counter_mutex);
pthread_attr_destroy(&attr);
pthread_mutex_lock(&sleeper_mutex);
master_wakeup= 0;
pthread_cond_broadcast(&sleep_threshhold);
pthread_mutex_unlock(&sleeper_mutex);
gettimeofday(&start_time, NULL);
/*
We loop until we know that all children have cleaned up.
*/
pthread_mutex_lock(&counter_mutex);
while (thread_counter)
{
struct timespec abstime;
set_timespec(abstime, 3);
pthread_cond_timedwait(&count_threshhold, &counter_mutex, &abstime);
}
pthread_mutex_unlock(&counter_mutex);
gettimeofday(&end_time, NULL);
sptr->timing= timedif(end_time, start_time);
sptr->users= concur;
sptr->rows= limit;
DBUG_RETURN(0);
} | O0 | c | run_scheduler:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x48(%rbp)
movq %rsi, -0x50(%rbp)
movl %edx, -0x54(%rbp)
movq %rcx, -0x60(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x371a0
leaq -0x40(%rbp), %rdi
movl $0x1, %esi
callq 0x37820
leaq 0x3b520d(%rip), %rdi # 0x3ef2d8
callq 0x37290
movl $0x0, 0x3b5346(%rip) # 0x3ef420
leaq 0x3b524f(%rip), %rdi # 0x3ef330
callq 0x37290
movl $0x1, 0x3b5318(%rip) # 0x3ef408
leaq 0x3b5239(%rip), %rdi # 0x3ef330
callq 0x37260
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x54(%rbp), %eax
jae 0x3a171
leaq -0xa0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq 0x6f3(%rip), %rdx # 0x3a810
leaq -0x98(%rbp), %rcx
callq 0x37b80
cmpl $0x0, %eax
je 0x3a157
movq 0x1f9ea3(%rip), %rax # 0x233fd8
movq (%rax), %rdi
leaq 0x3bf6d1(%rip), %rax # 0x3f9810
movq (%rax), %rdx
leaq 0x949f7(%rip), %rsi # 0xceb40
movb $0x0, %al
callq 0x371e0
xorl %edi, %edi
callq 0x37670
movl 0x3b52c3(%rip), %eax # 0x3ef420
addl $0x1, %eax
movl %eax, 0x3b52ba(%rip) # 0x3ef420
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x3a103
leaq 0x3b5160(%rip), %rdi # 0x3ef2d8
callq 0x37260
leaq -0x40(%rbp), %rdi
callq 0x37710
leaq 0x3b51a3(%rip), %rdi # 0x3ef330
callq 0x37290
movl $0x0, 0x3b526c(%rip) # 0x3ef408
leaq 0x3b51b5(%rip), %rdi # 0x3ef358
callq 0x37900
leaq 0x3b5181(%rip), %rdi # 0x3ef330
callq 0x37260
leaq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x374a0
leaq 0x3b5110(%rip), %rdi # 0x3ef2d8
callq 0x37290
cmpl $0x0, 0x3b524c(%rip) # 0x3ef420
je 0x3a252
jmp 0x3a1d8
callq 0x7e8b0
movq %rax, -0xc0(%rbp)
imulq $0x3e8, -0xc0(%rbp), %rax # imm = 0x3E8
movabsq $0xb2d05e00, %rcx # imm = 0xB2D05E00
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, -0xb0(%rbp)
movq -0xb8(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, -0xa8(%rbp)
leaq 0x3b50c6(%rip), %rdi # 0x3ef300
leaq 0x3b5097(%rip), %rsi # 0x3ef2d8
leaq -0xb0(%rbp), %rdx
callq 0x37850
jmp 0x3a1cd
leaq 0x3b507f(%rip), %rdi # 0x3ef2d8
callq 0x37260
leaq -0x88(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x374a0
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq -0x70(%rbp), %rcx
callq 0x3ca10
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movl -0x54(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x3a2a8
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3a2c5
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbp
retq
callq 0x372c0
nopw (%rax,%rax)
| run_scheduler:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov [rbp+var_54], edx
mov [rbp+var_60], rcx
mov rax, [rbp+var_50]
mov [rbp+var_98], rax
mov rax, [rbp+var_60]
mov [rbp+var_90], rax
lea rdi, [rbp+var_40]
call _pthread_attr_init
lea rdi, [rbp+var_40]
mov esi, 1
call _pthread_attr_setdetachstate
lea rdi, counter_mutex
call _pthread_mutex_lock
mov cs:thread_counter, 0
lea rdi, sleeper_mutex
call _pthread_mutex_lock
mov cs:master_wakeup, 1
lea rdi, sleeper_mutex
call _pthread_mutex_unlock
mov [rbp+var_64], 0
loc_3A103:
mov eax, [rbp+var_64]
cmp eax, [rbp+var_54]
jnb short loc_3A171
lea rdi, [rbp+var_A0]
lea rsi, [rbp+var_40]
lea rdx, run_task
lea rcx, [rbp+var_98]
call _pthread_create
cmp eax, 0
jz short loc_3A157
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, my_progname
mov rdx, [rax]
lea rsi, aSCouldNotCreat; "%s: Could not create thread\n"
mov al, 0
call _fprintf
xor edi, edi
call _exit
loc_3A157:
mov eax, cs:thread_counter
add eax, 1
mov cs:thread_counter, eax
mov eax, [rbp+var_64]
add eax, 1
mov [rbp+var_64], eax
jmp short loc_3A103
loc_3A171:
lea rdi, counter_mutex
call _pthread_mutex_unlock
lea rdi, [rbp+var_40]
call _pthread_attr_destroy
lea rdi, sleeper_mutex
call _pthread_mutex_lock
mov cs:master_wakeup, 0
lea rdi, sleep_threshhold
call _pthread_cond_broadcast
lea rdi, sleeper_mutex
call _pthread_mutex_unlock
lea rdi, [rbp+var_78]
xor eax, eax
mov esi, eax
call _gettimeofday
lea rdi, counter_mutex
call _pthread_mutex_lock
loc_3A1CD:
cmp cs:thread_counter, 0
jz short loc_3A252
jmp short $+2
loc_3A1D8:
call my_hrtime
mov [rbp+var_C0], rax
imul rax, [rbp+var_C0], 3E8h
mov rcx, 0B2D05E00h
add rax, rcx
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_B0], rax
mov rax, [rbp+var_B8]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_A8], rdx
lea rdi, count_threshhold
lea rsi, counter_mutex
lea rdx, [rbp+var_B0]
call _pthread_cond_timedwait
jmp loc_3A1CD
loc_3A252:
lea rdi, counter_mutex
call _pthread_mutex_unlock
lea rdi, [rbp+var_88]
xor eax, eax
mov esi, eax
call _gettimeofday
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_78]
mov rcx, [rbp+var_70]
call timedif
mov rcx, rax
mov rax, [rbp+var_48]
mov [rax], rcx
mov ecx, [rbp+var_54]
mov rax, [rbp+var_48]
mov [rax+8], ecx
mov rcx, [rbp+var_60]
mov rax, [rbp+var_48]
mov [rax+10h], rcx
jmp short $+2
loc_3A2A8:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_3A2C5
xor eax, eax
add rsp, 0C0h
pop rbp
retn
loc_3A2C5:
call ___stack_chk_fail
| long long run_scheduler(long long a1, long long a2, unsigned int a3, long long a4)
{
long long v4; // rax
unsigned long long v6; // [rsp+8h] [rbp-B8h]
_QWORD v7[2]; // [rsp+10h] [rbp-B0h] BYREF
_BYTE v8[8]; // [rsp+20h] [rbp-A0h] BYREF
_QWORD v9[2]; // [rsp+28h] [rbp-98h] BYREF
long long v10; // [rsp+38h] [rbp-88h] BYREF
long long v11; // [rsp+40h] [rbp-80h]
_QWORD v12[2]; // [rsp+48h] [rbp-78h] BYREF
unsigned int i; // [rsp+5Ch] [rbp-64h]
long long v14; // [rsp+60h] [rbp-60h]
unsigned int v15; // [rsp+6Ch] [rbp-54h]
long long v16; // [rsp+70h] [rbp-50h]
long long v17; // [rsp+78h] [rbp-48h]
_BYTE v18[56]; // [rsp+80h] [rbp-40h] BYREF
unsigned long long v19; // [rsp+B8h] [rbp-8h]
v19 = __readfsqword(0x28u);
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v9[0] = a2;
v9[1] = a4;
pthread_attr_init(v18);
pthread_attr_setdetachstate(v18, 1LL);
pthread_mutex_lock(&counter_mutex);
thread_counter = 0;
pthread_mutex_lock(&sleeper_mutex);
master_wakeup = 1;
pthread_mutex_unlock(&sleeper_mutex);
for ( i = 0; i < v15; ++i )
{
if ( (unsigned int)pthread_create(v8, v18, run_task, v9) )
{
fprintf(stderr, "%s: Could not create thread\n", my_progname);
exit(0LL);
}
++thread_counter;
}
pthread_mutex_unlock(&counter_mutex);
pthread_attr_destroy(v18);
pthread_mutex_lock(&sleeper_mutex);
master_wakeup = 0;
pthread_cond_broadcast(&sleep_threshhold);
pthread_mutex_unlock(&sleeper_mutex);
gettimeofday(v12, 0LL);
pthread_mutex_lock(&counter_mutex);
while ( thread_counter )
{
v6 = 1000 * my_hrtime() + 3000000000LL;
v7[0] = v6 / 0x3B9ACA00;
v7[1] = v6 % 0x3B9ACA00;
pthread_cond_timedwait(&count_threshhold, &counter_mutex, v7);
}
pthread_mutex_unlock(&counter_mutex);
gettimeofday(&v10, 0LL);
v4 = timedif(v10, v11, v12[0], v12[1]);
*(_QWORD *)v17 = v4;
*(_DWORD *)(v17 + 8) = v15;
*(_QWORD *)(v17 + 16) = v14;
return 0LL;
}
| run_scheduler:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RSI
MOV dword ptr [RBP + -0x54],EDX
MOV qword ptr [RBP + -0x60],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x90],RAX
LEA RDI,[RBP + -0x40]
CALL 0x001371a0
LEA RDI,[RBP + -0x40]
MOV ESI,0x1
CALL 0x00137820
LEA RDI,[0x4ef2d8]
CALL 0x00137290
MOV dword ptr [0x004ef420],0x0
LEA RDI,[0x4ef330]
CALL 0x00137290
MOV dword ptr [0x004ef408],0x1
LEA RDI,[0x4ef330]
CALL 0x00137260
MOV dword ptr [RBP + -0x64],0x0
LAB_0013a103:
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x54]
JNC 0x0013a171
LEA RDI,[RBP + -0xa0]
LEA RSI,[RBP + -0x40]
LEA RDX,[0x13a810]
LEA RCX,[RBP + -0x98]
CALL 0x00137b80
CMP EAX,0x0
JZ 0x0013a157
MOV RAX,qword ptr [0x00333fd8]
MOV RDI,qword ptr [RAX]
LEA RAX,[0x4f9810]
MOV RDX,qword ptr [RAX]
LEA RSI,[0x1ceb40]
MOV AL,0x0
CALL 0x001371e0
XOR EDI,EDI
CALL 0x00137670
LAB_0013a157:
MOV EAX,dword ptr [0x004ef420]
ADD EAX,0x1
MOV dword ptr [0x004ef420],EAX
MOV EAX,dword ptr [RBP + -0x64]
ADD EAX,0x1
MOV dword ptr [RBP + -0x64],EAX
JMP 0x0013a103
LAB_0013a171:
LEA RDI,[0x4ef2d8]
CALL 0x00137260
LEA RDI,[RBP + -0x40]
CALL 0x00137710
LEA RDI,[0x4ef330]
CALL 0x00137290
MOV dword ptr [0x004ef408],0x0
LEA RDI,[0x4ef358]
CALL 0x00137900
LEA RDI,[0x4ef330]
CALL 0x00137260
LEA RDI,[RBP + -0x78]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001374a0
LEA RDI,[0x4ef2d8]
CALL 0x00137290
LAB_0013a1cd:
CMP dword ptr [0x004ef420],0x0
JZ 0x0013a252
JMP 0x0013a1d8
LAB_0013a1d8:
CALL 0x0017e8b0
MOV qword ptr [RBP + -0xc0],RAX
IMUL RAX,qword ptr [RBP + -0xc0],0x3e8
MOV RCX,0xb2d05e00
ADD RAX,RCX
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xa8],RDX
LEA RDI,[0x4ef300]
LEA RSI,[0x4ef2d8]
LEA RDX,[RBP + -0xb0]
CALL 0x00137850
JMP 0x0013a1cd
LAB_0013a252:
LEA RDI,[0x4ef2d8]
CALL 0x00137260
LEA RDI,[RBP + -0x88]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001374a0
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x70]
CALL 0x0013ca10
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],RCX
MOV ECX,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x8],ECX
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x0013a2a8
LAB_0013a2a8:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0013a2c5
XOR EAX,EAX
ADD RSP,0xc0
POP RBP
RET
LAB_0013a2c5:
CALL 0x001372c0
|
int8 run_scheduler(int8 *param_1,int8 param_2,uint param_3,int8 param_4)
{
int iVar1;
long lVar2;
int8 uVar3;
long in_FS_OFFSET;
timespec local_b8;
pthread_t local_a8;
int8 local_a0;
int8 local_98;
timeval local_90;
timeval local_80;
uint local_6c;
int8 local_68;
uint local_5c;
int8 local_58;
int8 *local_50;
pthread_attr_t local_48;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_a0 = param_2;
local_98 = param_4;
local_68 = param_4;
local_5c = param_3;
local_58 = param_2;
local_50 = param_1;
pthread_attr_init(&local_48);
pthread_attr_setdetachstate(&local_48,1);
pthread_mutex_lock((pthread_mutex_t *)counter_mutex);
thread_counter = 0;
pthread_mutex_lock((pthread_mutex_t *)sleeper_mutex);
master_wakeup = 1;
pthread_mutex_unlock((pthread_mutex_t *)sleeper_mutex);
for (local_6c = 0; local_6c < local_5c; local_6c = local_6c + 1) {
iVar1 = pthread_create(&local_a8,&local_48,run_task,&local_a0);
if (iVar1 != 0) {
fprintf(*(FILE **)PTR_stderr_00333fd8,"%s: Could not create thread\n",my_progname);
/* WARNING: Subroutine does not return */
exit(0);
}
thread_counter = thread_counter + 1;
}
pthread_mutex_unlock((pthread_mutex_t *)counter_mutex);
pthread_attr_destroy(&local_48);
pthread_mutex_lock((pthread_mutex_t *)sleeper_mutex);
master_wakeup = 0;
pthread_cond_broadcast((pthread_cond_t *)sleep_threshhold);
pthread_mutex_unlock((pthread_mutex_t *)sleeper_mutex);
gettimeofday(&local_80,(__timezone_ptr_t)0x0);
pthread_mutex_lock((pthread_mutex_t *)counter_mutex);
while (thread_counter != 0) {
lVar2 = my_hrtime();
local_b8.tv_nsec = lVar2 * 1000 + 3000000000;
local_b8.tv_sec = (ulong)local_b8.tv_nsec / 1000000000;
local_b8.tv_nsec = (ulong)local_b8.tv_nsec % 1000000000;
pthread_cond_timedwait
((pthread_cond_t *)count_threshhold,(pthread_mutex_t *)counter_mutex,&local_b8);
}
pthread_mutex_unlock((pthread_mutex_t *)counter_mutex);
gettimeofday(&local_90,(__timezone_ptr_t)0x0);
uVar3 = timedif(local_90.tv_sec,local_90.tv_usec,local_80.tv_sec,local_80.tv_usec);
*local_50 = uVar3;
*(uint *)(local_50 + 1) = local_5c;
local_50[2] = local_68;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,761 | SchemaConverter::check_errors() | monkey531[P]llama/common/json-schema-to-grammar.cpp | void check_errors() {
if (!_errors.empty()) {
throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n"));
}
if (!_warnings.empty()) {
fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str());
}
} | O3 | cpp | SchemaConverter::check_errors():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq 0xc8(%rdi), %rax
cmpq 0xd0(%rdi), %rax
jne 0x9976d
movq 0xe0(%r14), %rax
cmpq 0xe8(%r14), %rax
jne 0x99712
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x42887(%rip), %rax # 0xdbfa0
movq (%rax), %r15
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x18466(%rip), %rsi # 0xb1b92
leaq 0x18461(%rip), %rdx # 0xb1b94
leaq 0x8(%rsp), %rdi
callq 0x1ca72
addq $0xe0, %r14
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x1dcbd
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x19d7a
jmp 0x99707
movl $0x10, %edi
callq 0x18350
movq %rax, %rbx
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe65a(%rip), %rsi # 0xa7de4
leaq 0xe654(%rip), %rdx # 0xa7de5
leaq 0x28(%rsp), %rdi
callq 0x1ca72
addq $0xc8, %r14
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
callq 0x1dcbd
leaq 0x18383(%rip), %rsi # 0xb1b3e
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x245f5
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x18a80
xorl %ebp, %ebp
movq 0x4280d(%rip), %rsi # 0xdbff0
movq 0x42786(%rip), %rdx # 0xdbf70
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99818
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x99818
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99833
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x9984a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x99870
jmp 0x99899
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x99870
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x99870
movq %rax, %r14
movq %rbx, %rdi
callq 0x184f0
jmp 0x99899
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x99899
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x99899
movq %rax, %r14
movq %r14, %rdi
callq 0x18bb0
nop
| _ZN15SchemaConverter12check_errorsEv:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov r14, rdi
mov rax, [rdi+0C8h]
cmp rax, [rdi+0D0h]
jnz short loc_9976D
mov rax, [r14+0E0h]
cmp rax, [r14+0E8h]
jnz short loc_99712
loc_99707:
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_99712:
mov rax, cs:stderr_ptr
mov r15, [rax]
lea rbx, [rsp+88h+var_70]
mov [rbx-10h], rbx
lea rsi, asc_B1B92; "; "
lea rdx, asc_B1B92+2; ""
lea rdi, [rsp+88h+var_80]
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)
add r14, 0E0h
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
mov rsi, r15
mov rcx, rbx
call _ZN15SchemaConverter12check_errorsEv_cold_1; SchemaConverter::check_errors(void) [clone]
jmp short loc_99707
loc_9976D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+88h+var_50]
mov [r15-10h], r15
lea rsi, aEndIndexOutOfB+18h; "\n"
lea rdx, aEndIndexOutOfB+19h; ""
lea rdi, [rsp+88h+var_60]
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)
add r14, 0C8h
lea rdi, [rsp+88h+var_80]
lea rdx, [rsp+88h+var_60]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n"
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+88h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+88h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99818
mov rsi, [rsp+88h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_99818
mov r14, rax
mov bpl, 1
loc_99818:
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99833
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99833:
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r15
jz short loc_9984A
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9984A:
test bpl, bpl
jnz short loc_99870
jmp short loc_99899
mov r14, rax
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r15
jz short loc_99870
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_99870
mov r14, rax
loc_99870:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_99899
mov r14, rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, rbx
jz short loc_99899
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_99899
mov r14, rax
loc_99899:
mov rdi, r14
call __Unwind_Resume
| void SchemaConverter::check_errors(SchemaConverter *this)
{
long long v1; // r15
void *exception; // rbx
void *v3[2]; // [rsp+8h] [rbp-80h] BYREF
void *v4[2]; // [rsp+18h] [rbp-70h] BYREF
void *v5[2]; // [rsp+28h] [rbp-60h] BYREF
long long v6; // [rsp+38h] [rbp-50h] BYREF
const char *v7[2]; // [rsp+48h] [rbp-40h] BYREF
if ( *((_QWORD *)this + 25) != *((_QWORD *)this + 26) )
{
exception = __cxa_allocate_exception(0x10uLL);
v5[0] = &v6;
std::string::_M_construct<char const*>((long long)v5, "\n", (long long)"");
string_join((long long)v3, (long long *)this + 25, v5);
std::operator+<char>((long long)v7, (long long)"JSON schema conversion failed:\n", (long long)v3);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)this + 28) != *((_QWORD *)this + 29) )
{
v1 = stderr;
v3[0] = v4;
std::string::_M_construct<char const*>((long long)v3, "; ", (long long)"");
string_join((long long)v7, (long long *)this + 28, v3);
SchemaConverter::check_errors(v7, v1, v3, v4);
}
}
| check_errors:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xc8]
CMP RAX,qword ptr [RDI + 0xd0]
JNZ 0x0019976d
MOV RAX,qword ptr [R14 + 0xe0]
CMP RAX,qword ptr [R14 + 0xe8]
JNZ 0x00199712
LAB_00199707:
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00199712:
MOV RAX,qword ptr [0x001dbfa0]
MOV R15,qword ptr [RAX]
LEA RBX,[RSP + 0x18]
MOV qword ptr [RBX + -0x10],RBX
LAB_00199725:
LEA RSI,[0x1b1b92]
LEA RDX,[0x1b1b94]
LEA RDI,[RSP + 0x8]
CALL 0x0011ca72
LAB_0019973d:
ADD R14,0xe0
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RSI,R14
CALL 0x0011dcbd
LAB_00199756:
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RSI,R15
MOV RCX,RBX
CALL 0x00119d7a
JMP 0x00199707
LAB_0019976d:
MOV EDI,0x10
CALL 0x00118350
MOV RBX,RAX
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
LAB_00199783:
LEA RSI,[0x1a7de4]
LEA RDX,[0x1a7de5]
LEA RDI,[RSP + 0x28]
CALL 0x0011ca72
LAB_0019979b:
ADD R14,0xc8
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
MOV RSI,R14
CALL 0x0011dcbd
LAB_001997b4:
LEA RSI,[0x1b1b3e]
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
CALL 0x001245f5
MOV BPL,0x1
LAB_001997cd:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00118a80
XOR EBP,EBP
MOV RSI,qword ptr [0x001dbff0]
MOV RDX,qword ptr [0x001dbf70]
MOV RDI,RBX
CALL 0x00118b30
|
/* SchemaConverter::check_errors() */
void __thiscall SchemaConverter::check_errors(SchemaConverter *this)
{
runtime_error *this_00;
int1 *local_80 [2];
int1 local_70 [16];
int1 *local_60 [2];
int1 local_50 [16];
vector local_40 [32];
if (*(long *)(this + 200) == *(long *)(this + 0xd0)) {
if (*(long *)(this + 0xe0) != *(long *)(this + 0xe8)) {
local_80[0] = local_70;
/* try { // try from 00199725 to 0019973c has its CatchHandler @ 00199896 */
std::__cxx11::string::_M_construct<char_const*>(local_80,&DAT_001b1b92,&DAT_001b1b94);
/* try { // try from 0019973d to 00199755 has its CatchHandler @ 0019987a */
string_join(local_40,(string *)(this + 0xe0));
check_errors();
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
local_60[0] = local_50;
/* try { // try from 00199783 to 0019979a has its CatchHandler @ 0019986d */
std::__cxx11::string::_M_construct<char_const*>(local_60,"\n","");
/* try { // try from 0019979b to 001997b3 has its CatchHandler @ 00199851 */
string_join((vector *)local_80,(string *)(this + 200));
/* try { // try from 001997b4 to 001997c9 has its CatchHandler @ 00199812 */
std::operator+((char *)local_40,(string *)"JSON schema conversion failed:\n");
/* try { // try from 001997cd to 001997f1 has its CatchHandler @ 001997f2 */
std::runtime_error::runtime_error(this_00,(string *)local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001dbff0,PTR__runtime_error_001dbf70);
}
| |
40,762 | ma_log_split | eloqsql/storage/maria/ma_write.c | static my_bool _ma_log_split(MARIA_PAGE *ma_page,
uint org_length, uint new_length,
const uchar *key_pos, uint key_length,
int move_length, enum en_key_op prefix_or_suffix,
const uchar *data, uint data_length,
uint changed_length)
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 2 + 3+3+3+3+3+2 +7];
uchar *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6];
uint offset= (uint) (key_pos - ma_page->buff);
uint translog_parts, extra_length;
MARIA_HA *info= ma_page->info;
my_off_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_split");
DBUG_PRINT("enter", ("page: %lu org_length: %u new_length: %u",
(ulong) page, org_length, new_length));
DBUG_ASSERT(changed_length >= data_length);
DBUG_ASSERT(org_length <= info->s->max_index_block_size);
DBUG_ASSERT(new_length == ma_page->size);
DBUG_ASSERT(org_length == ma_page->org_size);
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page);
log_pos+= PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
(*log_pos++)= KEY_OP_DEBUG;
(*log_pos++)= KEY_OP_DEBUG_LOG_SPLIT;
#endif
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, ma_page->buff);
if (new_length <= offset || !key_pos)
{
/*
Page was split before inserted key. Write redo entry where
we just cut current page at page_length
*/
uint length_offset= org_length - new_length;
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos+1, length_offset);
log_pos+= 3;
translog_parts= 1;
extra_length= 0;
DBUG_ASSERT(data_length == 0);
}
else
{
/* Key was added to page which was split after the inserted key */
uint max_key_length;
/*
Handle case when split happened directly after the newly inserted key.
*/
max_key_length= new_length - offset;
extra_length= MY_MIN(key_length, max_key_length);
if (offset + move_length > new_length)
{
/* This is true when move_length includes changes for next packed key */
move_length= new_length - offset;
}
if ((int) new_length < (int) (org_length + move_length + data_length))
{
/* Shorten page */
uint diff= org_length + move_length + data_length - new_length;
log_pos[0]= KEY_OP_DEL_SUFFIX;
int2store(log_pos + 1, diff);
log_pos+= 3;
DBUG_ASSERT(data_length == 0); /* Page is shortened */
DBUG_ASSERT(offset <= org_length - diff);
}
else
{
DBUG_ASSERT(new_length == org_length + move_length + data_length);
DBUG_ASSERT(offset <= org_length);
}
log_pos[0]= KEY_OP_OFFSET;
int2store(log_pos+1, offset);
log_pos+= 3;
if (move_length)
{
log_pos[0]= KEY_OP_SHIFT;
int2store(log_pos+1, move_length);
log_pos+= 3;
}
log_pos[0]= KEY_OP_CHANGE;
int2store(log_pos+1, extra_length);
log_pos+= 3;
/* Point to original inserted key data */
if (prefix_or_suffix == KEY_OP_ADD_PREFIX)
key_pos+= data_length;
translog_parts= 2;
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= extra_length;
}
if (data_length)
{
/* Add prefix or suffix */
log_pos[0]= prefix_or_suffix;
int2store(log_pos+1, data_length);
log_pos+= 3;
if (prefix_or_suffix == KEY_OP_ADD_PREFIX)
{
int2store(log_pos+1, changed_length);
log_pos+= 2;
data_length= changed_length;
}
log_array[TRANSLOG_INTERNAL_PARTS + translog_parts].str= data;
log_array[TRANSLOG_INTERNAL_PARTS + translog_parts].length= data_length;
translog_parts++;
extra_length+= data_length;
}
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &extra_length, &translog_parts);
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS +
0].length + extra_length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL));
} | O3 | c | ma_log_split:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rcx, %r10
movl %edx, %r11d
movl 0x20(%rbp), %ebx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq (%rdi), %rcx
movq 0x10(%rdi), %r15
movq 0x18(%rdi), %rax
movq (%rcx), %r14
movl 0x7bc(%r14), %r12d
xorl %edx, %edx
divq %r12
movl %eax, -0x4e(%rbp)
shrq $0x20, %rax
movb %al, -0x4a(%rbp)
movl 0x10(%rbp), %edx
movb $0xa, -0x49(%rbp)
movl 0x744(%r14), %eax
addl $-0x3, %eax
movb (%r15,%rax), %al
movb %al, -0x48(%rbp)
xorl %eax, %eax
testq %r10, %r10
je 0x669cc
movq %r10, %r14
subq %r15, %r14
movl %r11d, %r15d
subl %r14d, %r15d
jbe 0x669cc
cmpl %r8d, %r15d
cmovbl %r15d, %r8d
leal (%r14,%r9), %eax
cmpl %r11d, %eax
cmoval %r15d, %r9d
addl %ebx, %esi
addl %r9d, %esi
subl %r11d, %esi
jle 0x669e5
leaq -0x44(%rbp), %r11
movb $0x7, -0x3(%r11)
movw %si, -0x2(%r11)
jmp 0x669e9
subl %r11d, %esi
leaq -0x44(%rbp), %r11
movb $0x7, -0x3(%r11)
movw %si, -0x2(%r11)
movl $0x1, %r9d
jmp 0x66a3d
leaq -0x47(%rbp), %r11
movb $0x1, (%r11)
movw %r14w, 0x1(%r11)
testl %r9d, %r9d
je 0x66a07
movb $0x2, 0x3(%r11)
movw %r9w, 0x4(%r11)
addq $0x6, %r11
jmp 0x66a0b
addq $0x3, %r11
movb $0x3, (%r11)
movw %r8w, 0x1(%r11)
addq $0x3, %r11
xorl %eax, %eax
cmpl $0x4, %edx
cmovel %ebx, %eax
addq %rax, %r10
movq %r10, -0xb0(%rbp)
movl %r8d, %eax
movq %rax, -0xa8(%rbp)
movl $0x2, %r9d
movl %r8d, %eax
testl %ebx, %ebx
je 0x66a82
movq 0x18(%rbp), %rsi
movb %dl, (%r11)
movw %bx, 0x1(%r11)
cmpl $0x4, %edx
jne 0x66a60
movl 0x28(%rbp), %ebx
movw %bx, 0x4(%r11)
addq $0x5, %r11
jmp 0x66a64
addq $0x3, %r11
movl %r9d, %edx
shll $0x4, %edx
leaq -0xe0(%rbp), %r8
movq %rsi, 0x20(%rdx,%r8)
movl %ebx, %esi
movq %rsi, 0x28(%rdx,%r8)
incl %r9d
addl %ebx, %eax
leaq -0x50(%rbp), %r10
leaq -0xe0(%rbp), %rbx
movq %r10, 0x20(%rbx)
subq %r10, %r11
movl %r11d, %edx
movq %rdx, 0x28(%rbx)
movl 0x20(%rdi), %edx
movl %edx, 0x24(%rdi)
movq 0x8(%rcx), %rdx
addl %r11d, %eax
addl $0x2, %r9d
subq $0x8, %rsp
leaq -0x58(%rbp), %rdi
movl $0xc, %esi
movl %eax, %r8d
pushq $0x0
pushq %r10
pushq %rbx
callq 0x2a8ac
addq $0x20, %rsp
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x66ae9
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_log_split:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 0C0h
mov r10, rcx
mov r11d, edx
mov ebx, [rbp+arg_10]
mov rax, fs:28h
mov [rbp+var_28], rax
mov rcx, [rdi]
mov r15, [rdi+10h]
mov rax, [rdi+18h]
mov r14, [rcx]
mov r12d, [r14+7BCh]
xor edx, edx
div r12
mov [rbp+var_4E], eax
shr rax, 20h
mov [rbp+var_4A], al
mov edx, [rbp+arg_0]
mov [rbp+var_49], 0Ah
mov eax, [r14+744h]
add eax, 0FFFFFFFDh
mov al, [r15+rax]
mov [rbp+var_48], al
xor eax, eax
test r10, r10
jz short loc_669CC
mov r14, r10
sub r14, r15
mov r15d, r11d
sub r15d, r14d
jbe short loc_669CC
cmp r15d, r8d
cmovb r8d, r15d
lea eax, [r14+r9]
cmp eax, r11d
cmova r9d, r15d
add esi, ebx
add esi, r9d
sub esi, r11d
jle short loc_669E5
lea r11, [rbp+var_44]
mov byte ptr [r11-3], 7
mov [r11-2], si
jmp short loc_669E9
loc_669CC:
sub esi, r11d
lea r11, [rbp+var_44]
mov byte ptr [r11-3], 7
mov [r11-2], si
mov r9d, 1
jmp short loc_66A3D
loc_669E5:
lea r11, [rbp+var_47]
loc_669E9:
mov byte ptr [r11], 1
mov [r11+1], r14w
test r9d, r9d
jz short loc_66A07
mov byte ptr [r11+3], 2
mov [r11+4], r9w
add r11, 6
jmp short loc_66A0B
loc_66A07:
add r11, 3
loc_66A0B:
mov byte ptr [r11], 3
mov [r11+1], r8w
add r11, 3
xor eax, eax
cmp edx, 4
cmovz eax, ebx
add r10, rax
mov [rbp+var_B0], r10
mov eax, r8d
mov [rbp+var_A8], rax
mov r9d, 2
mov eax, r8d
loc_66A3D:
test ebx, ebx
jz short loc_66A82
mov rsi, [rbp+arg_8]
mov [r11], dl
mov [r11+1], bx
cmp edx, 4
jnz short loc_66A60
mov ebx, [rbp+arg_18]
mov [r11+4], bx
add r11, 5
jmp short loc_66A64
loc_66A60:
add r11, 3
loc_66A64:
mov edx, r9d
shl edx, 4
lea r8, [rbp+var_E0]
mov [rdx+r8+20h], rsi
mov esi, ebx
mov [rdx+r8+28h], rsi
inc r9d
add eax, ebx
loc_66A82:
lea r10, [rbp+var_50]
lea rbx, [rbp+var_E0]
mov [rbx+20h], r10
sub r11, r10
mov edx, r11d
mov [rbx+28h], rdx
mov edx, [rdi+20h]
mov [rdi+24h], edx
mov rdx, [rcx+8]
add eax, r11d
add r9d, 2
sub rsp, 8
lea rdi, [rbp+var_58]
mov esi, 0Ch
mov r8d, eax
push 0
push r10
push rbx
call translog_write_record
add rsp, 20h
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_66AE9
add rsp, 0C0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_66AE9:
call ___stack_chk_fail
| long long ma_log_split(
long long **a1,
int a2,
unsigned int a3,
long long a4,
unsigned int a5,
unsigned int a6,
int a7,
long long a8,
unsigned int a9,
unsigned int a10)
{
unsigned int v11; // ebx
long long *v12; // rcx
long long *v13; // r15
long long v14; // r14
unsigned long long v15; // rax
unsigned int v16; // eax
unsigned int v17; // r14d
unsigned int v18; // r15d
int v19; // esi
bool v20; // cc
__int16 v21; // si
char *v22; // r11
_BYTE *v23; // r11
int v24; // r9d
char *v25; // r11
long long v26; // rax
long long v27; // rdx
long long v28; // r11
_OWORD v30[2]; // [rsp+0h] [rbp-E0h] BYREF
__int16 *v31; // [rsp+20h] [rbp-C0h]
long long v32; // [rsp+28h] [rbp-B8h]
long long v33; // [rsp+30h] [rbp-B0h]
long long v34; // [rsp+38h] [rbp-A8h]
_BYTE v35[8]; // [rsp+88h] [rbp-58h] BYREF
__int16 v36; // [rsp+90h] [rbp-50h] BYREF
int v37; // [rsp+92h] [rbp-4Eh]
char v38; // [rsp+96h] [rbp-4Ah]
char v39; // [rsp+97h] [rbp-49h]
char v40; // [rsp+98h] [rbp-48h]
char v41; // [rsp+99h] [rbp-47h] BYREF
__int16 v42; // [rsp+9Ah] [rbp-46h]
_BYTE v43[28]; // [rsp+9Ch] [rbp-44h] BYREF
unsigned long long v44; // [rsp+B8h] [rbp-28h]
v11 = a9;
v44 = __readfsqword(0x28u);
v12 = *a1;
v13 = a1[2];
v14 = **a1;
v15 = (unsigned long long)a1[3] / *(unsigned int *)(v14 + 1980);
v37 = v15;
v38 = BYTE4(v15);
v39 = 10;
v40 = *((_BYTE *)v13 + (unsigned int)(*(_DWORD *)(v14 + 1860) - 3));
v16 = 0;
if ( a4 && (v17 = a4 - (_DWORD)v13, v18 = a3 - (a4 - (_DWORD)v13), a3 > v17) )
{
if ( v18 < a5 )
a5 = v18;
if ( v17 + a6 > a3 )
a6 = v18;
v19 = a6 + a9 + a2;
v20 = v19 <= (int)a3;
v21 = v19 - a3;
if ( v20 )
{
v22 = &v41;
}
else
{
v22 = v43;
v41 = 7;
v42 = v21;
}
*v22 = 1;
*(_WORD *)(v22 + 1) = v17;
if ( a6 )
{
v22[3] = 2;
*((_WORD *)v22 + 2) = a6;
v25 = v22 + 6;
}
else
{
v25 = v22 + 3;
}
*v25 = 3;
*(_WORD *)(v25 + 1) = a5;
v23 = v25 + 3;
v26 = 0LL;
if ( a7 == 4 )
v26 = a9;
v33 = v26 + a4;
v34 = a5;
v24 = 2;
v16 = a5;
}
else
{
v23 = v43;
v41 = 7;
v42 = a2 - a3;
v24 = 1;
}
if ( a9 )
{
*v23 = a7;
*(_WORD *)(v23 + 1) = a9;
if ( a7 == 4 )
{
v11 = a10;
*((_WORD *)v23 + 2) = a10;
v23 += 5;
}
else
{
v23 += 3;
}
v27 = (unsigned int)(16 * v24);
*(_QWORD *)((char *)&v30[2] + v27) = a8;
*(_QWORD *)((char *)&v30[2] + v27 + 8) = v11;
++v24;
v16 += v11;
}
v31 = &v36;
v28 = v23 - (_BYTE *)&v36;
v32 = (unsigned int)v28;
*((_DWORD *)a1 + 9) = *((_DWORD *)a1 + 8);
return translog_write_record(
(unsigned long long)v35,
&byte_9[3],
v12[1],
v12,
(unsigned int)v28 + v16,
v24 + 2,
v30,
&v36,
0LL);
}
| _ma_log_split:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xc0
MOV R10,RCX
MOV R11D,EDX
MOV EBX,dword ptr [RBP + 0x20]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x10]
MOV RAX,qword ptr [RDI + 0x18]
MOV R14,qword ptr [RCX]
MOV R12D,dword ptr [R14 + 0x7bc]
XOR EDX,EDX
DIV R12
MOV dword ptr [RBP + -0x4e],EAX
SHR RAX,0x20
MOV byte ptr [RBP + -0x4a],AL
MOV EDX,dword ptr [RBP + 0x10]
MOV byte ptr [RBP + -0x49],0xa
MOV EAX,dword ptr [R14 + 0x744]
ADD EAX,-0x3
MOV AL,byte ptr [R15 + RAX*0x1]
MOV byte ptr [RBP + -0x48],AL
XOR EAX,EAX
TEST R10,R10
JZ 0x001669cc
MOV R14,R10
SUB R14,R15
MOV R15D,R11D
SUB R15D,R14D
JBE 0x001669cc
CMP R15D,R8D
CMOVC R8D,R15D
LEA EAX,[R14 + R9*0x1]
CMP EAX,R11D
CMOVA R9D,R15D
ADD ESI,EBX
ADD ESI,R9D
SUB ESI,R11D
JLE 0x001669e5
LEA R11,[RBP + -0x44]
MOV byte ptr [R11 + -0x3],0x7
MOV word ptr [R11 + -0x2],SI
JMP 0x001669e9
LAB_001669cc:
SUB ESI,R11D
LEA R11,[RBP + -0x44]
MOV byte ptr [R11 + -0x3],0x7
MOV word ptr [R11 + -0x2],SI
MOV R9D,0x1
JMP 0x00166a3d
LAB_001669e5:
LEA R11,[RBP + -0x47]
LAB_001669e9:
MOV byte ptr [R11],0x1
MOV word ptr [R11 + 0x1],R14W
TEST R9D,R9D
JZ 0x00166a07
MOV byte ptr [R11 + 0x3],0x2
MOV word ptr [R11 + 0x4],R9W
ADD R11,0x6
JMP 0x00166a0b
LAB_00166a07:
ADD R11,0x3
LAB_00166a0b:
MOV byte ptr [R11],0x3
MOV word ptr [R11 + 0x1],R8W
ADD R11,0x3
XOR EAX,EAX
CMP EDX,0x4
CMOVZ EAX,EBX
ADD R10,RAX
MOV qword ptr [RBP + -0xb0],R10
MOV EAX,R8D
MOV qword ptr [RBP + -0xa8],RAX
MOV R9D,0x2
MOV EAX,R8D
LAB_00166a3d:
TEST EBX,EBX
JZ 0x00166a82
MOV RSI,qword ptr [RBP + 0x18]
MOV byte ptr [R11],DL
MOV word ptr [R11 + 0x1],BX
CMP EDX,0x4
JNZ 0x00166a60
MOV EBX,dword ptr [RBP + 0x28]
MOV word ptr [R11 + 0x4],BX
ADD R11,0x5
JMP 0x00166a64
LAB_00166a60:
ADD R11,0x3
LAB_00166a64:
MOV EDX,R9D
SHL EDX,0x4
LEA R8,[RBP + -0xe0]
MOV qword ptr [RDX + R8*0x1 + 0x20],RSI
MOV ESI,EBX
MOV qword ptr [RDX + R8*0x1 + 0x28],RSI
INC R9D
ADD EAX,EBX
LAB_00166a82:
LEA R10,[RBP + -0x50]
LEA RBX,[RBP + -0xe0]
MOV qword ptr [RBX + 0x20],R10
SUB R11,R10
MOV EDX,R11D
MOV qword ptr [RBX + 0x28],RDX
MOV EDX,dword ptr [RDI + 0x20]
MOV dword ptr [RDI + 0x24],EDX
MOV RDX,qword ptr [RCX + 0x8]
ADD EAX,R11D
ADD R9D,0x2
SUB RSP,0x8
LEA RDI,[RBP + -0x58]
MOV ESI,0xc
MOV R8D,EAX
PUSH 0x0
PUSH R10
PUSH RBX
CALL 0x0012a8ac
ADD RSP,0x20
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x00166ae9
ADD RSP,0xc0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00166ae9:
CALL 0x00129270
|
void _ma_log_split(long *param_1,int param_2,uint param_3,long param_4,uint param_5,uint param_6,
int param_7,int8 param_8,uint param_9,uint param_10)
{
long *plVar1;
int1 auVar2 [16];
uint uVar3;
int iVar4;
int iVar5;
int1 *puVar6;
uint uVar7;
long lVar8;
uint uVar9;
long in_FS_OFFSET;
int1 local_e8 [32];
int1 *local_c8;
ulong local_c0 [12];
int1 local_60 [8];
int1 local_58 [2];
int4 local_56;
int1 local_52;
int1 local_51;
int1 local_50;
int1 local_4f;
short local_4e;
int1 local_4c [28];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
auVar2._8_8_ = 0;
auVar2._0_8_ = param_1[3];
auVar2 = auVar2 / ZEXT416(*(uint *)(*plVar1 + 0x7bc));
local_56 = auVar2._0_4_;
local_52 = auVar2[4];
local_51 = 10;
local_50 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3));
uVar3 = 0;
if (param_4 != 0) {
lVar8 = param_4 - param_1[2];
uVar7 = (uint)lVar8;
uVar9 = param_3 - uVar7;
if (uVar7 <= param_3 && uVar9 != 0) {
uVar3 = param_5;
if (uVar9 < param_5) {
uVar3 = uVar9;
}
if (param_3 < uVar7 + param_6) {
param_6 = uVar9;
}
iVar4 = param_2 + param_9 + param_6;
iVar5 = iVar4 - param_3;
if (iVar5 == 0 || iVar4 < (int)param_3) {
puVar6 = &local_4f;
}
else {
puVar6 = local_4c;
local_4f = 7;
local_4e = (short)iVar5;
}
*puVar6 = 1;
*(short *)(puVar6 + 1) = (short)lVar8;
if (param_6 == 0) {
puVar6 = puVar6 + 3;
}
else {
puVar6[3] = 2;
*(short *)(puVar6 + 4) = (short)param_6;
puVar6 = puVar6 + 6;
}
*puVar6 = 3;
*(short *)(puVar6 + 1) = (short)uVar3;
puVar6 = puVar6 + 3;
uVar7 = 0;
if (param_7 == 4) {
uVar7 = param_9;
}
local_c0[1] = param_4 + (ulong)uVar7;
local_c0[2] = (ulong)uVar3;
iVar4 = 2;
goto LAB_00166a3d;
}
}
local_4e = (short)param_2 - (short)param_3;
puVar6 = local_4c;
local_4f = 7;
iVar4 = 1;
LAB_00166a3d:
if (param_9 != 0) {
*puVar6 = (char)param_7;
*(short *)(puVar6 + 1) = (short)param_9;
if (param_7 == 4) {
*(short *)(puVar6 + 4) = (short)param_10;
puVar6 = puVar6 + 5;
}
else {
puVar6 = puVar6 + 3;
param_10 = param_9;
}
*(int8 *)((long)&local_c8 + (ulong)(uint)(iVar4 << 4)) = param_8;
*(ulong *)((long)local_c0 + (ulong)(uint)(iVar4 << 4)) = (ulong)param_10;
iVar4 = iVar4 + 1;
uVar3 = uVar3 + param_10;
}
local_c8 = local_58;
local_c0[0] = (long)puVar6 - (long)local_c8 & 0xffffffff;
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
translog_write_record
(local_60,0xc,plVar1[1],plVar1,uVar3 + (int)((long)puVar6 - (long)local_c8),iVar4 + 2,
local_e8,local_c8,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,763 | my_readlink | eloqsql/mysys/my_symlink.c | int my_readlink(char *to, const char *filename, myf MyFlags)
{
#ifndef HAVE_READLINK
strmov(to,filename);
return 1;
#else
int result=0;
int length;
DBUG_ENTER("my_readlink");
if ((length=readlink(filename, to, FN_REFLEN-1)) < 0)
{
/* Don't give an error if this wasn't a symlink */
if ((my_errno=errno) == EINVAL)
{
result= 1;
strmov(to,filename);
}
else
{
if (MyFlags & MY_WME)
my_error(EE_CANT_READLINK, MYF(0), filename, errno);
result= -1;
}
}
else
to[length]=0;
DBUG_PRINT("exit" ,("result: %d", result));
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
} | O0 | c | my_readlink:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x25380
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jge 0x32221
callq 0x25040
movl (%rax), %eax
movl %eax, -0x24(%rbp)
callq 0x32d30
movq %rax, %rcx
movl -0x24(%rbp), %eax
movl %eax, (%rcx)
cmpl $0x16, %eax
jne 0x321e7
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x25350
jmp 0x3221f
movq -0x18(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x32218
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x25040
movq -0x30(%rbp), %rdx
movl (%rax), %ecx
movl $0x18, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x2bdd0
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0x3222d
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x3222f
jmp 0x32231
jmp 0x32233
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_readlink:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
mov edx, 1FFh
call _readlink
mov [rbp+var_20], eax
cmp eax, 0
jge short loc_32221
call ___errno_location
mov eax, [rax]
mov [rbp+var_24], eax
call _my_thread_var
mov rcx, rax
mov eax, [rbp+var_24]
mov [rcx], eax
cmp eax, 16h
jnz short loc_321E7
mov [rbp+var_1C], 1
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _stpcpy
jmp short loc_3221F
loc_321E7:
mov rax, [rbp+var_18]
and rax, 10h
cmp rax, 0
jz short loc_32218
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
call ___errno_location
mov rdx, [rbp+var_30]
mov ecx, [rax]
mov edi, 18h
xor eax, eax
mov esi, eax
mov al, 0
call my_error
loc_32218:
mov [rbp+var_1C], 0FFFFFFFFh
loc_3221F:
jmp short loc_3222D
loc_32221:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_20]
mov byte ptr [rax+rcx], 0
loc_3222D:
jmp short $+2
loc_3222F:
jmp short $+2
loc_32231:
jmp short $+2
loc_32233:
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
add rsp, 40h
pop rbp
retn
| long long my_readlink(long long a1, long long a2, char a3)
{
unsigned int *v3; // rax
int v5; // [rsp+1Ch] [rbp-24h]
int v6; // [rsp+20h] [rbp-20h]
unsigned int v7; // [rsp+24h] [rbp-1Ch]
v7 = 0;
v6 = readlink(a2, a1, 511LL);
if ( v6 >= 0 )
{
*(_BYTE *)(a1 + v6) = 0;
}
else
{
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v5;
if ( v5 == 22 )
{
v7 = 1;
stpcpy(a1, a2);
}
else
{
if ( (a3 & 0x10) != 0 )
{
v3 = (unsigned int *)__errno_location();
my_error(0x18u, 0LL, a2, *v3);
}
return (unsigned int)-1;
}
}
return v7;
}
| my_readlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
MOV EDX,0x1ff
CALL 0x00125380
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JGE 0x00132221
CALL 0x00125040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
CALL 0x00132d30
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RCX],EAX
CMP EAX,0x16
JNZ 0x001321e7
MOV dword ptr [RBP + -0x1c],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00125350
JMP 0x0013221f
LAB_001321e7:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x10
CMP RAX,0x0
JZ 0x00132218
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00125040
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX]
MOV EDI,0x18
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x0012bdd0
LAB_00132218:
MOV dword ptr [RBP + -0x1c],0xffffffff
LAB_0013221f:
JMP 0x0013222d
LAB_00132221:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x20]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_0013222d:
JMP 0x0013222f
LAB_0013222f:
JMP 0x00132231
LAB_00132231:
JMP 0x00132233
LAB_00132233:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x40
POP RBP
RET
|
int4 my_readlink(char *param_1,char *param_2,ulong param_3)
{
int iVar1;
ssize_t sVar2;
int *piVar3;
int4 local_24;
local_24 = 0;
sVar2 = readlink(param_2,param_1,0x1ff);
if ((int)sVar2 < 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if (iVar1 == 0x16) {
local_24 = 1;
stpcpy(param_1,param_2);
}
else {
if ((param_3 & 0x10) != 0) {
piVar3 = __errno_location();
my_error(0x18,0,param_2,*piVar3);
}
local_24 = 0xffffffff;
}
}
else {
param_1[(int)sVar2] = '\0';
}
return local_24;
}
| |
40,764 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateEdgeVerticesFromParentEdges() {
//
// This is straightforward. All child edges of parent edges are assigned
// their first vertex from the child vertex of the edge -- so it is common
// to both. The second vertex is the child vertex of the vertex at the
// end of the parent edge.
//
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
ConstIndexArray pEdgeVerts = _parent->getEdgeVertices(pEdge),
pEdgeChildren = getEdgeChildEdges(pEdge);
// May want to unroll this trivial loop of 2...
for (int j = 0; j < 2; ++j) {
Index cEdge = pEdgeChildren[j];
if (IndexIsValid(cEdge)) {
IndexArray cEdgeVerts = _child->getEdgeVertices(cEdge);
cEdgeVerts[0] = _edgeChildVertIndex[pEdge];
cEdgeVerts[1] = _vertChildVertIndex[pEdgeVerts[j]];
}
}
}
} | O0 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges():
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x90(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, -0x94(%rbp)
movq 0x8(%rax), %rdi
callq 0xca130
movl %eax, %ecx
movl -0x94(%rbp), %eax
cmpl %ecx, %eax
jge 0xfa329
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xd32c0
movq -0x90(%rbp), %rdi
movl %edx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %esi
callq 0xd6850
movl %edx, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x64(%rbp)
cmpl $0x2, -0x64(%rbp)
jge 0xfa319
movl -0x64(%rbp), %esi
leaq -0x40(%rbp), %rdi
callq 0xcabf0
movl (%rax), %eax
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %edi
callq 0xd63b0
testb $0x1, %al
jne 0xfa259
jmp 0xfa309
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x68(%rbp), %esi
callq 0xd6c40
movq -0x90(%rbp), %rdi
movl %edx, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x70(%rbp)
addq $0xd8, %rdi
movslq -0xc(%rbp), %rsi
callq 0xc7140
movl (%rax), %eax
movl %eax, -0xa4(%rbp)
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
callq 0xc37f0
movl -0xa4(%rbp), %edx
movq %rax, %rcx
movq -0x90(%rbp), %rax
movl %edx, (%rcx)
addq $0xf0, %rax
movq %rax, -0xa0(%rbp)
movl -0x64(%rbp), %esi
leaq -0x20(%rbp), %rdi
callq 0xcabf0
movq -0xa0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xc7140
movl (%rax), %eax
movl %eax, -0x98(%rbp)
leaq -0x78(%rbp), %rdi
movl $0x1, %esi
callq 0xc37f0
movl -0x98(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xfa30b
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xfa22d
jmp 0xfa31b
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xfa1a1
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement35populateEdgeVerticesFromParentEdgesEv:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_90], rax
mov [rbp+var_C], 0
loc_FA1A1:
mov rax, [rbp+var_90]
mov ecx, [rbp+var_C]
mov [rbp+var_94], ecx
mov rdi, [rax+8]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(void)
mov ecx, eax
mov eax, [rbp+var_94]
cmp eax, ecx
jge loc_FA329
mov rax, [rbp+var_90]
mov rdi, [rax+8]; this
mov esi, [rbp+var_C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getEdgeVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeVertices(int)
mov rdi, [rbp+var_90]; this
mov [rbp+var_28], edx
mov [rbp+var_30], rax
mov eax, [rbp+var_28]
mov [rbp+var_18], eax
mov rax, [rbp+var_30]
mov [rbp+var_20], rax
mov esi, [rbp+var_C]; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17getEdgeChildEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getEdgeChildEdges(int)
mov [rbp+var_58], edx
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov [rbp+var_50], rax
mov eax, [rbp+var_58]
mov dword ptr [rbp+var_48], eax
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov dword ptr [rbp+var_68+4], 0
loc_FA22D:
cmp dword ptr [rbp+var_68+4], 2
jge loc_FA319
mov esi, dword ptr [rbp+var_68+4]; int
lea rdi, [rbp+var_40]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov eax, [rax]
mov dword ptr [rbp+var_68], eax
mov edi, dword ptr [rbp+var_68]; this
call __ZN10OpenSubdiv6v3_6_03Vtr12IndexIsValidEi; OpenSubdiv::v3_6_0::Vtr::IndexIsValid(int)
test al, 1
jnz short loc_FA259
jmp loc_FA309
loc_FA259:
mov rax, [rbp+var_90]
mov rdi, [rax+10h]; this
mov esi, dword ptr [rbp+var_68]; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level15getEdgeVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeVertices(int)
mov rdi, [rbp+var_90]
mov [rbp+var_80], edx
mov [rbp+var_88], rax
mov rax, [rbp+var_88]
mov [rbp+var_78], rax
mov eax, [rbp+var_80]
mov [rbp+var_70], eax
add rdi, 0D8h
movsxd rsi, [rbp+var_C]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov eax, [rax]
mov [rbp+var_A4], eax
lea rdi, [rbp+var_78]
xor esi, esi
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov edx, [rbp+var_A4]
mov rcx, rax
mov rax, [rbp+var_90]
mov [rcx], edx
add rax, 0F0h
mov [rbp+var_A0], rax
mov esi, dword ptr [rbp+var_68+4]
lea rdi, [rbp+var_20]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_A0]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov eax, [rax]
mov [rbp+var_98], eax
lea rdi, [rbp+var_78]
mov esi, 1
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov ecx, [rbp+var_98]
mov [rax], ecx
loc_FA309:
jmp short $+2
loc_FA30B:
mov eax, dword ptr [rbp+var_68+4]
add eax, 1
mov dword ptr [rbp+var_68+4], eax
jmp loc_FA22D
loc_FA319:
jmp short $+2
loc_FA31B:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp loc_FA1A1
loc_FA329:
add rsp, 0B0h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges(
OpenSubdiv::v3_6_0::Vtr::internal::Level **this)
{
int NumEdges; // ecx
long long result; // rax
long long EdgeVertices; // rax
int v4; // edx
long long EdgeChildEdges; // rax
int v6; // edx
int v7; // esi
int v8; // edx
int *v9; // rax
int v10; // [rsp+Ch] [rbp-A4h]
int v11; // [rsp+18h] [rbp-98h]
int v12; // [rsp+1Ch] [rbp-94h]
long long v13; // [rsp+38h] [rbp-78h] BYREF
int v14; // [rsp+40h] [rbp-70h]
unsigned int v15; // [rsp+48h] [rbp-68h]
int j; // [rsp+4Ch] [rbp-64h]
long long v17; // [rsp+50h] [rbp-60h]
int v18; // [rsp+58h] [rbp-58h]
long long v19; // [rsp+60h] [rbp-50h]
long long v20; // [rsp+68h] [rbp-48h]
_QWORD v21[3]; // [rsp+70h] [rbp-40h] BYREF
int v22; // [rsp+88h] [rbp-28h]
long long v23; // [rsp+90h] [rbp-20h] BYREF
int v24; // [rsp+98h] [rbp-18h]
int i; // [rsp+A4h] [rbp-Ch]
OpenSubdiv::v3_6_0::Vtr::internal::Level **v26; // [rsp+A8h] [rbp-8h]
v26 = this;
for ( i = 0; ; ++i )
{
v12 = i;
NumEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(this[1]);
result = (unsigned int)v12;
if ( v12 >= NumEdges )
break;
EdgeVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeVertices(this[1], i);
v22 = v4;
v21[2] = EdgeVertices;
v24 = v4;
v23 = EdgeVertices;
EdgeChildEdges = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getEdgeChildEdges(
(OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)this,
i);
v18 = v6;
v17 = EdgeChildEdges;
v19 = EdgeChildEdges;
LODWORD(v20) = v6;
v21[0] = EdgeChildEdges;
v21[1] = v20;
for ( j = 0; j < 2; ++j )
{
v7 = j;
v15 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](v21, (unsigned int)j);
if ( (OpenSubdiv::v3_6_0::Vtr::IndexIsValid((OpenSubdiv::v3_6_0::Vtr *)v15, v7) & 1) != 0 )
{
v13 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeVertices(this[2], v15);
v14 = v8;
v10 = *(_DWORD *)std::vector<int>::operator[](this + 27, i);
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v13, 0LL) = v10;
v9 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v23, (unsigned int)j);
v11 = *(_DWORD *)std::vector<int>::operator[](this + 30, *v9);
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v13, 1LL) = v11;
}
}
}
return result;
}
| populateEdgeVerticesFromParentEdges:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x90],RAX
MOV dword ptr [RBP + -0xc],0x0
LAB_001fa1a1:
MOV RAX,qword ptr [RBP + -0x90]
MOV ECX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x94],ECX
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001ca130
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x94]
CMP EAX,ECX
JGE 0x001fa329
MOV RAX,qword ptr [RBP + -0x90]
MOV RDI,qword ptr [RAX + 0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001d32c0
MOV RDI,qword ptr [RBP + -0x90]
MOV dword ptr [RBP + -0x28],EDX
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x20],RAX
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001d6850
MOV dword ptr [RBP + -0x58],EDX
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x48],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x64],0x0
LAB_001fa22d:
CMP dword ptr [RBP + -0x64],0x2
JGE 0x001fa319
MOV ESI,dword ptr [RBP + -0x64]
LEA RDI,[RBP + -0x40]
CALL 0x001cabf0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x68],EAX
MOV EDI,dword ptr [RBP + -0x68]
CALL 0x001d63b0
TEST AL,0x1
JNZ 0x001fa259
JMP 0x001fa309
LAB_001fa259:
MOV RAX,qword ptr [RBP + -0x90]
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,dword ptr [RBP + -0x68]
CALL 0x001d6c40
MOV RDI,qword ptr [RBP + -0x90]
MOV dword ptr [RBP + -0x80],EDX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x78],RAX
MOV EAX,dword ptr [RBP + -0x80]
MOV dword ptr [RBP + -0x70],EAX
ADD RDI,0xd8
MOVSXD RSI,dword ptr [RBP + -0xc]
CALL 0x001c7140
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xa4],EAX
LEA RDI,[RBP + -0x78]
XOR ESI,ESI
CALL 0x001c37f0
MOV EDX,dword ptr [RBP + -0xa4]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV dword ptr [RCX],EDX
ADD RAX,0xf0
MOV qword ptr [RBP + -0xa0],RAX
MOV ESI,dword ptr [RBP + -0x64]
LEA RDI,[RBP + -0x20]
CALL 0x001cabf0
MOV RDI,qword ptr [RBP + -0xa0]
MOVSXD RSI,dword ptr [RAX]
CALL 0x001c7140
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x98],EAX
LEA RDI,[RBP + -0x78]
MOV ESI,0x1
CALL 0x001c37f0
MOV ECX,dword ptr [RBP + -0x98]
MOV dword ptr [RAX],ECX
LAB_001fa309:
JMP 0x001fa30b
LAB_001fa30b:
MOV EAX,dword ptr [RBP + -0x64]
ADD EAX,0x1
MOV dword ptr [RBP + -0x64],EAX
JMP 0x001fa22d
LAB_001fa319:
JMP 0x001fa31b
LAB_001fa31b:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001fa1a1
LAB_001fa329:
ADD RSP,0xb0
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges
(QuadRefinement *this)
{
int4 uVar1;
int iVar2;
int iVar3;
int *piVar4;
ulong uVar5;
int4 *puVar6;
int1 auVar7 [12];
int1 local_80 [12];
int local_70;
int local_6c;
int1 local_68 [12];
int1 local_58 [12];
int4 uStack_4c;
int8 local_48;
int8 local_40;
int1 local_38 [12];
int1 local_28 [12];
int local_14;
QuadRefinement *local_10;
auVar7._8_4_ = local_68._8_4_;
auVar7._0_8_ = local_68._0_8_;
local_14 = 0;
local_10 = this;
while( true ) {
iVar2 = local_14;
local_68 = auVar7;
iVar3 = Level::getNumEdges(*(Level **)(this + 8));
if (iVar3 <= iVar2) break;
auVar7 = Level::getEdgeVertices(*(Level **)(this + 8),local_14);
local_38 = auVar7;
local_28 = auVar7;
auVar7 = Refinement::getEdgeChildEdges((Refinement *)this,local_14);
local_48 = auVar7._0_8_;
local_40 = CONCAT44(uStack_4c,auVar7._8_4_);
local_58 = auVar7;
for (local_6c = 0; local_6c < 2; local_6c = local_6c + 1) {
local_68 = auVar7;
piVar4 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)&local_48,local_6c);
local_70 = *piVar4;
uVar5 = IndexIsValid(local_70);
auVar7 = local_68;
if ((uVar5 & 1) != 0) {
auVar7 = Level::getEdgeVertices(*(Level **)(this + 0x10),local_70);
local_80 = auVar7;
puVar6 = (int4 *)
std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)(this + 0xd8),(long)local_14);
uVar1 = *puVar6;
puVar6 = (int4 *)Array<int>::operator[]((Array<int> *)local_80,0);
*puVar6 = uVar1;
piVar4 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)local_28,local_6c);
puVar6 = (int4 *)
std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)(this + 0xf0),(long)*piVar4);
uVar1 = *puVar6;
puVar6 = (int4 *)Array<int>::operator[]((Array<int> *)local_80,1);
*puVar6 = uVar1;
auVar7 = local_68;
}
}
local_14 = local_14 + 1;
}
return;
}
| |
40,765 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateEdgeVerticesFromParentEdges() {
//
// This is straightforward. All child edges of parent edges are assigned
// their first vertex from the child vertex of the edge -- so it is common
// to both. The second vertex is the child vertex of the vertex at the
// end of the parent edge.
//
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
ConstIndexArray pEdgeVerts = _parent->getEdgeVertices(pEdge),
pEdgeChildren = getEdgeChildEdges(pEdge);
// May want to unroll this trivial loop of 2...
for (int j = 0; j < 2; ++j) {
Index cEdge = pEdgeChildren[j];
if (IndexIsValid(cEdge)) {
IndexArray cEdgeVerts = _child->getEdgeVertices(cEdge);
cEdgeVerts[0] = _edgeChildVertIndex[pEdge];
cEdgeVerts[1] = _vertChildVertIndex[pEdgeVerts[j]];
}
}
}
} | O1 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
cmpl $0x0, 0x4(%rax)
jle 0x471c6
movq 0x78(%rax), %rcx
movq 0xc0(%rdi), %rdx
xorl %esi, %esi
movq 0x10(%rdi), %r8
movq 0xd8(%rdi), %r9
movq 0xf0(%rdi), %r10
xorl %r11d, %r11d
movslq (%rdx,%r11,4), %rbx
cmpq $-0x1, %rbx
je 0x471a9
movq 0x78(%r8), %r14
movl (%r9,%rsi,4), %ebp
movl %ebp, (%r14,%rbx,8)
movslq (%rcx,%r11,4), %r15
movl (%r10,%r15,4), %ebp
movl %ebp, 0x4(%r14,%rbx,8)
incq %r11
cmpq $0x1, %r11
je 0x47186
incq %rsi
movslq 0x4(%rax), %r8
addq $0x8, %rcx
addq $0x8, %rdx
cmpq %r8, %rsi
jl 0x47171
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement35populateEdgeVerticesFromParentEdgesEv:
push rbp
push r15
push r14
push rbx
mov rax, [rdi+8]
cmp dword ptr [rax+4], 0
jle short loc_471C6
mov rcx, [rax+78h]
mov rdx, [rdi+0C0h]
xor esi, esi
loc_47171:
mov r8, [rdi+10h]
mov r9, [rdi+0D8h]
mov r10, [rdi+0F0h]
xor r11d, r11d
loc_47186:
movsxd rbx, dword ptr [rdx+r11*4]
cmp rbx, 0FFFFFFFFFFFFFFFFh
jz short loc_471A9
mov r14, [r8+78h]
mov ebp, [r9+rsi*4]
mov [r14+rbx*8], ebp
movsxd r15, dword ptr [rcx+r11*4]
mov ebp, [r10+r15*4]
mov [r14+rbx*8+4], ebp
loc_471A9:
inc r11
cmp r11, 1
jz short loc_47186
inc rsi
movsxd r8, dword ptr [rax+4]
add rcx, 8
add rdx, 8
cmp rsi, r8
jl short loc_47171
loc_471C6:
pop rbx
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges(
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this)
{
long long result; // rax
long long v2; // rcx
long long v3; // rdx
long long v4; // rsi
long long v5; // r8
long long v6; // r9
long long v7; // r10
long long v8; // r11
long long v9; // rbx
long long v10; // r14
result = *((_QWORD *)this + 1);
if ( *(int *)(result + 4) > 0 )
{
v2 = *(_QWORD *)(result + 120);
v3 = *((_QWORD *)this + 24);
v4 = 0LL;
do
{
v5 = *((_QWORD *)this + 2);
v6 = *((_QWORD *)this + 27);
v7 = *((_QWORD *)this + 30);
v8 = 0LL;
do
{
v9 = *(int *)(v3 + 4 * v8);
if ( v9 != -1 )
{
v10 = *(_QWORD *)(v5 + 120);
*(_DWORD *)(v10 + 8 * v9) = *(_DWORD *)(v6 + 4 * v4);
*(_DWORD *)(v10 + 8 * v9 + 4) = *(_DWORD *)(v7 + 4LL * *(int *)(v2 + 4 * v8));
}
++v8;
}
while ( v8 == 1 );
++v4;
v2 += 8LL;
v3 += 8LL;
}
while ( v4 < *(int *)(result + 4) );
}
return result;
}
| populateEdgeVerticesFromParentEdges:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
MOV RAX,qword ptr [RDI + 0x8]
CMP dword ptr [RAX + 0x4],0x0
JLE 0x001471c6
MOV RCX,qword ptr [RAX + 0x78]
MOV RDX,qword ptr [RDI + 0xc0]
XOR ESI,ESI
LAB_00147171:
MOV R8,qword ptr [RDI + 0x10]
MOV R9,qword ptr [RDI + 0xd8]
MOV R10,qword ptr [RDI + 0xf0]
XOR R11D,R11D
LAB_00147186:
MOVSXD RBX,dword ptr [RDX + R11*0x4]
CMP RBX,-0x1
JZ 0x001471a9
MOV R14,qword ptr [R8 + 0x78]
MOV EBP,dword ptr [R9 + RSI*0x4]
MOV dword ptr [R14 + RBX*0x8],EBP
MOVSXD R15,dword ptr [RCX + R11*0x4]
MOV EBP,dword ptr [R10 + R15*0x4]
MOV dword ptr [R14 + RBX*0x8 + 0x4],EBP
LAB_001471a9:
INC R11
CMP R11,0x1
JZ 0x00147186
INC RSI
MOVSXD R8,dword ptr [RAX + 0x4]
ADD RCX,0x8
ADD RDX,0x8
CMP RSI,R8
JL 0x00147171
LAB_001471c6:
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges
(QuadRefinement *this)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
lVar1 = *(long *)(this + 8);
if (0 < *(int *)(lVar1 + 4)) {
lVar6 = *(long *)(lVar1 + 0x78);
lVar7 = *(long *)(this + 0xc0);
lVar9 = 0;
do {
lVar2 = *(long *)(this + 0x10);
lVar3 = *(long *)(this + 0xd8);
lVar4 = *(long *)(this + 0xf0);
lVar10 = 0;
do {
lVar8 = (long)*(int *)(lVar7 + lVar10 * 4);
if (lVar8 != -1) {
lVar5 = *(long *)(lVar2 + 0x78);
*(int4 *)(lVar5 + lVar8 * 8) = *(int4 *)(lVar3 + lVar9 * 4);
*(int4 *)(lVar5 + 4 + lVar8 * 8) =
*(int4 *)(lVar4 + (long)*(int *)(lVar6 + lVar10 * 4) * 4);
}
lVar10 = lVar10 + 1;
} while (lVar10 == 1);
lVar9 = lVar9 + 1;
lVar6 = lVar6 + 8;
lVar7 = lVar7 + 8;
} while (lVar9 < *(int *)(lVar1 + 4));
}
return;
}
| |
40,766 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateEdgeVerticesFromParentEdges() {
//
// This is straightforward. All child edges of parent edges are assigned
// their first vertex from the child vertex of the edge -- so it is common
// to both. The second vertex is the child vertex of the vertex at the
// end of the parent edge.
//
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
ConstIndexArray pEdgeVerts = _parent->getEdgeVertices(pEdge),
pEdgeChildren = getEdgeChildEdges(pEdge);
// May want to unroll this trivial loop of 2...
for (int j = 0; j < 2; ++j) {
Index cEdge = pEdgeChildren[j];
if (IndexIsValid(cEdge)) {
IndexArray cEdgeVerts = _child->getEdgeVertices(cEdge);
cEdgeVerts[0] = _edgeChildVertIndex[pEdge];
cEdgeVerts[1] = _vertChildVertIndex[pEdgeVerts[j]];
}
}
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
movq 0xc0(%rdi), %rcx
xorl %edx, %edx
xorl %esi, %esi
movslq 0x4(%rax), %r8
cmpq %r8, %rsi
jge 0x5f4fe
movq 0x10(%rdi), %r8
movq 0xd8(%rdi), %r9
movq 0xf0(%rdi), %r10
movq 0x78(%rax), %r11
addq %rdx, %r11
xorl %ebx, %ebx
cmpq $0x2, %rbx
je 0x5f4f1
movslq (%rcx,%rbx,4), %r14
cmpq $-0x1, %r14
je 0x5f4ec
movq 0x78(%r8), %r15
movl (%r9,%rsi,4), %ebp
movl %ebp, (%r15,%r14,8)
movslq (%r11,%rbx,4), %r12
movl (%r10,%r12,4), %ebp
movl %ebp, 0x4(%r15,%r14,8)
incq %rbx
jmp 0x5f4c3
incq %rsi
addq $0x8, %rdx
addq $0x8, %rcx
jmp 0x5f49f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement35populateEdgeVerticesFromParentEdgesEv:
push rbp
push r15
push r14
push r12
push rbx
mov rax, [rdi+8]
mov rcx, [rdi+0C0h]
xor edx, edx
xor esi, esi
loc_5F49F:
movsxd r8, dword ptr [rax+4]
cmp rsi, r8
jge short loc_5F4FE
mov r8, [rdi+10h]
mov r9, [rdi+0D8h]
mov r10, [rdi+0F0h]
mov r11, [rax+78h]
add r11, rdx
xor ebx, ebx
loc_5F4C3:
cmp rbx, 2
jz short loc_5F4F1
movsxd r14, dword ptr [rcx+rbx*4]
cmp r14, 0FFFFFFFFFFFFFFFFh
jz short loc_5F4EC
mov r15, [r8+78h]
mov ebp, [r9+rsi*4]
mov [r15+r14*8], ebp
movsxd r12, dword ptr [r11+rbx*4]
mov ebp, [r10+r12*4]
mov [r15+r14*8+4], ebp
loc_5F4EC:
inc rbx
jmp short loc_5F4C3
loc_5F4F1:
inc rsi
add rdx, 8
add rcx, 8
jmp short loc_5F49F
loc_5F4FE:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges(
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this)
{
long long result; // rax
long long v2; // rcx
long long v3; // rdx
long long i; // rsi
long long v5; // r8
long long v6; // r9
long long v7; // r10
long long v8; // r11
long long j; // rbx
long long v10; // r14
long long v11; // r15
result = *((_QWORD *)this + 1);
v2 = *((_QWORD *)this + 24);
v3 = 0LL;
for ( i = 0LL; i < *(int *)(result + 4); ++i )
{
v5 = *((_QWORD *)this + 2);
v6 = *((_QWORD *)this + 27);
v7 = *((_QWORD *)this + 30);
v8 = v3 + *(_QWORD *)(result + 120);
for ( j = 0LL; j != 2; ++j )
{
v10 = *(int *)(v2 + 4 * j);
if ( v10 != -1 )
{
v11 = *(_QWORD *)(v5 + 120);
*(_DWORD *)(v11 + 8 * v10) = *(_DWORD *)(v6 + 4 * i);
*(_DWORD *)(v11 + 8 * v10 + 4) = *(_DWORD *)(v7 + 4LL * *(int *)(v8 + 4 * j));
}
}
v3 += 8LL;
v2 += 8LL;
}
return result;
}
| populateEdgeVerticesFromParentEdges:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0xc0]
XOR EDX,EDX
XOR ESI,ESI
LAB_0015f49f:
MOVSXD R8,dword ptr [RAX + 0x4]
CMP RSI,R8
JGE 0x0015f4fe
MOV R8,qword ptr [RDI + 0x10]
MOV R9,qword ptr [RDI + 0xd8]
MOV R10,qword ptr [RDI + 0xf0]
MOV R11,qword ptr [RAX + 0x78]
ADD R11,RDX
XOR EBX,EBX
LAB_0015f4c3:
CMP RBX,0x2
JZ 0x0015f4f1
MOVSXD R14,dword ptr [RCX + RBX*0x4]
CMP R14,-0x1
JZ 0x0015f4ec
MOV R15,qword ptr [R8 + 0x78]
MOV EBP,dword ptr [R9 + RSI*0x4]
MOV dword ptr [R15 + R14*0x8],EBP
MOVSXD R12,dword ptr [R11 + RBX*0x4]
MOV EBP,dword ptr [R10 + R12*0x4]
MOV dword ptr [R15 + R14*0x8 + 0x4],EBP
LAB_0015f4ec:
INC RBX
JMP 0x0015f4c3
LAB_0015f4f1:
INC RSI
ADD RDX,0x8
ADD RCX,0x8
JMP 0x0015f49f
LAB_0015f4fe:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges
(QuadRefinement *this)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
lVar1 = *(long *)(this + 8);
lVar7 = *(long *)(this + 0xc0);
lVar8 = 0;
for (lVar10 = 0; lVar10 < *(int *)(lVar1 + 4); lVar10 = lVar10 + 1) {
lVar2 = *(long *)(this + 0x10);
lVar3 = *(long *)(this + 0xd8);
lVar4 = *(long *)(this + 0xf0);
lVar5 = *(long *)(lVar1 + 0x78);
for (lVar9 = 0; lVar9 != 2; lVar9 = lVar9 + 1) {
lVar11 = (long)*(int *)(lVar7 + lVar9 * 4);
if (lVar11 != -1) {
lVar6 = *(long *)(lVar2 + 0x78);
*(int4 *)(lVar6 + lVar11 * 8) = *(int4 *)(lVar3 + lVar10 * 4);
*(int4 *)(lVar6 + 4 + lVar11 * 8) =
*(int4 *)(lVar4 + (long)*(int *)(lVar5 + lVar8 + lVar9 * 4) * 4);
}
}
lVar8 = lVar8 + 8;
lVar7 = lVar7 + 8;
}
return;
}
| |
40,767 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateEdgeVerticesFromParentEdges() {
//
// This is straightforward. All child edges of parent edges are assigned
// their first vertex from the child vertex of the edge -- so it is common
// to both. The second vertex is the child vertex of the vertex at the
// end of the parent edge.
//
for (Index pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
ConstIndexArray pEdgeVerts = _parent->getEdgeVertices(pEdge),
pEdgeChildren = getEdgeChildEdges(pEdge);
// May want to unroll this trivial loop of 2...
for (int j = 0; j < 2; ++j) {
Index cEdge = pEdgeChildren[j];
if (IndexIsValid(cEdge)) {
IndexArray cEdgeVerts = _child->getEdgeVertices(cEdge);
cEdgeVerts[0] = _edgeChildVertIndex[pEdge];
cEdgeVerts[1] = _vertChildVertIndex[pEdgeVerts[j]];
}
}
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
cmpl $0x0, 0x4(%rax)
jle 0x4888f
movq 0x78(%rax), %rcx
movq 0xc0(%rdi), %rdx
xorl %esi, %esi
leaq (%rcx,%rsi,8), %r8
leaq (%rdx,%rsi,8), %r9
movq 0x10(%rdi), %r10
movq 0xd8(%rdi), %r11
movq 0xf0(%rdi), %rbx
movb $0x1, %bpl
xorl %r14d, %r14d
movslq (%r9,%r14,4), %r15
cmpq $-0x1, %r15
je 0x48872
movq 0x78(%r10), %r12
movl (%r11,%rsi,4), %r13d
movl %r13d, (%r12,%r15,8)
movslq (%r8,%r14,4), %r14
movl (%rbx,%r14,4), %r14d
movl %r14d, 0x4(%r12,%r15,8)
movl $0x1, %r14d
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x4884f
incq %rsi
movslq 0x4(%rax), %r8
cmpq %r8, %rsi
jl 0x4882f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement35populateEdgeVerticesFromParentEdgesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
mov rax, [rdi+8]
cmp dword ptr [rax+4], 0
jle short loc_4888F
mov rcx, [rax+78h]
mov rdx, [rdi+0C0h]
xor esi, esi
loc_4882F:
lea r8, [rcx+rsi*8]
lea r9, [rdx+rsi*8]
mov r10, [rdi+10h]
mov r11, [rdi+0D8h]
mov rbx, [rdi+0F0h]
mov bpl, 1
xor r14d, r14d
loc_4884F:
movsxd r15, dword ptr [r9+r14*4]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_48872
mov r12, [r10+78h]
mov r13d, [r11+rsi*4]
mov [r12+r15*8], r13d
movsxd r14, dword ptr [r8+r14*4]
mov r14d, [rbx+r14*4]
mov [r12+r15*8+4], r14d
loc_48872:
mov r14d, 1
test bpl, 1
mov ebp, 0
jnz short loc_4884F
inc rsi
movsxd r8, dword ptr [rax+4]
cmp rsi, r8
jl short loc_4882F
loc_4888F:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges(
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this)
{
long long result; // rax
long long v2; // rcx
long long v3; // rdx
long long v4; // rsi
long long v5; // r10
long long v6; // r11
long long v7; // rbx
char v8; // bp
long long v9; // r14
long long v10; // r15
long long v11; // r12
bool v12; // zf
result = *((_QWORD *)this + 1);
if ( *(int *)(result + 4) > 0 )
{
v2 = *(_QWORD *)(result + 120);
v3 = *((_QWORD *)this + 24);
v4 = 0LL;
do
{
v5 = *((_QWORD *)this + 2);
v6 = *((_QWORD *)this + 27);
v7 = *((_QWORD *)this + 30);
v8 = 1;
v9 = 0LL;
do
{
v10 = *(int *)(v3 + 8 * v4 + 4 * v9);
if ( v10 != -1 )
{
v11 = *(_QWORD *)(v5 + 120);
*(_DWORD *)(v11 + 8 * v10) = *(_DWORD *)(v6 + 4 * v4);
*(_DWORD *)(v11 + 8 * v10 + 4) = *(_DWORD *)(v7 + 4LL * *(int *)(v2 + 8 * v4 + 4 * v9));
}
v9 = 1LL;
v12 = (v8 & 1) == 0;
v8 = 0;
}
while ( !v12 );
++v4;
}
while ( v4 < *(int *)(result + 4) );
}
return result;
}
| populateEdgeVerticesFromParentEdges:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RDI + 0x8]
CMP dword ptr [RAX + 0x4],0x0
JLE 0x0014888f
MOV RCX,qword ptr [RAX + 0x78]
MOV RDX,qword ptr [RDI + 0xc0]
XOR ESI,ESI
LAB_0014882f:
LEA R8,[RCX + RSI*0x8]
LEA R9,[RDX + RSI*0x8]
MOV R10,qword ptr [RDI + 0x10]
MOV R11,qword ptr [RDI + 0xd8]
MOV RBX,qword ptr [RDI + 0xf0]
MOV BPL,0x1
XOR R14D,R14D
LAB_0014884f:
MOVSXD R15,dword ptr [R9 + R14*0x4]
CMP R15,-0x1
JZ 0x00148872
MOV R12,qword ptr [R10 + 0x78]
MOV R13D,dword ptr [R11 + RSI*0x4]
MOV dword ptr [R12 + R15*0x8],R13D
MOVSXD R14,dword ptr [R8 + R14*0x4]
MOV R14D,dword ptr [RBX + R14*0x4]
MOV dword ptr [R12 + R15*0x8 + 0x4],R14D
LAB_00148872:
MOV R14D,0x1
TEST BPL,0x1
MOV EBP,0x0
JNZ 0x0014884f
INC RSI
MOVSXD R8,dword ptr [RAX + 0x4]
CMP RSI,R8
JL 0x0014882f
LAB_0014888f:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateEdgeVerticesFromParentEdges
(QuadRefinement *this)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
bool bVar8;
bool bVar9;
long lVar10;
long lVar11;
long lVar12;
lVar1 = *(long *)(this + 8);
if (0 < *(int *)(lVar1 + 4)) {
lVar2 = *(long *)(lVar1 + 0x78);
lVar3 = *(long *)(this + 0xc0);
lVar10 = 0;
do {
lVar4 = *(long *)(this + 0x10);
lVar5 = *(long *)(this + 0xd8);
lVar6 = *(long *)(this + 0xf0);
lVar11 = 0;
bVar8 = true;
do {
bVar9 = bVar8;
lVar12 = (long)*(int *)(lVar3 + lVar10 * 8 + lVar11 * 4);
if (lVar12 != -1) {
lVar7 = *(long *)(lVar4 + 0x78);
*(int4 *)(lVar7 + lVar12 * 8) = *(int4 *)(lVar5 + lVar10 * 4);
*(int4 *)(lVar7 + 4 + lVar12 * 8) =
*(int4 *)(lVar6 + (long)*(int *)(lVar2 + lVar10 * 8 + lVar11 * 4) * 4);
}
lVar11 = 1;
bVar8 = false;
} while (bVar9);
lVar10 = lVar10 + 1;
} while (lVar10 < *(int *)(lVar1 + 4));
}
return;
}
| |
40,768 | my_ll10tostr_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static size_t
my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs,
char *dst, size_t len, int radix, longlong val)
{
char buffer[65];
register char *p, *db, *de;
long long_val;
int sl= 0;
ulonglong uval= (ulonglong) val;
if (radix < 0)
{
if (val < 0)
{
sl= 1;
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulonglong)0 - uval;
}
}
p= &buffer[sizeof(buffer)-1];
*p='\0';
if (uval == 0)
{
*--p= '0';
goto cnv;
}
while (uval > (ulonglong) LONG_MAX)
{
ulonglong quo= uval/(uint) 10;
uint rem= (uint) (uval- quo* (uint) 10);
*--p= '0' + rem;
uval= quo;
}
long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
*--p= (char) ('0' + (long_val - quo*10));
long_val= quo;
}
cnv:
if (sl)
{
*--p= '-';
}
for ( db= dst, de= dst + len ; (dst < de) && *p ; p++)
{
int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de);
if (cnvres > 0)
dst+= cnvres;
else
break;
}
return (int) (dst -db);
} | O3 | c | my_ll10tostr_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
testl %ecx, %ecx
setns %al
testq %r8, %r8
setns %sil
orb %al, %sil
movq %r8, %rcx
negq %rcx
testb %sil, %sil
cmovneq %r8, %rcx
movb $0x0, -0x40(%rbp)
testq %rcx, %rcx
je 0xcc01e
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
js 0xcc029
leaq -0x40(%rbp), %r13
jmp 0xcc049
leaq -0x41(%rbp), %r13
movb $0x30, (%r13)
jmp 0xcc06d
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
leaq -0x41(%rbp), %r13
imull $0xf6, %edx, %eax
addl %eax, %ecx
addb $0x30, %cl
movb %cl, (%r13)
movq %rdx, %rcx
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
imull $0xf6, %edx, %eax
addl %ecx, %eax
addb $0x30, %al
movb %al, -0x1(%r13)
decq %r13
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0xcc049
testb %sil, %sil
jne 0xcc07a
movb $0x2d, -0x1(%r13)
decq %r13
movq %rbx, %r12
testq %r14, %r14
jle 0xcc0b6
addq %rbx, %r14
movq %rbx, %r12
movsbq (%r13), %rsi
testq %rsi, %rsi
je 0xcc0b6
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq *0x30(%rax)
testl %eax, %eax
jle 0xcc0b6
movl %eax, %eax
addq %rax, %r12
incq %r13
cmpq %r14, %r12
jb 0xcc088
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xcc0da
subl %ebx, %r12d
movslq %r12d, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a240
| my_ll10tostr_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
test ecx, ecx
setns al
test r8, r8
setns sil
or sil, al
mov rcx, r8
neg rcx
test sil, sil
cmovnz rcx, r8
mov [rbp+var_40], 0
test rcx, rcx
jz short loc_CC01E
mov rdi, 0CCCCCCCCCCCCCCCDh
js short loc_CC029
lea r13, [rbp+var_40]
jmp short loc_CC049
loc_CC01E:
lea r13, [rbp+var_41]
mov byte ptr [r13+0], 30h ; '0'
jmp short loc_CC06D
loc_CC029:
mov rax, rcx
mul rdi
shr rdx, 3
lea r13, [rbp+var_41]
imul eax, edx, 0F6h
add ecx, eax
add cl, 30h ; '0'
mov [r13+0], cl
mov rcx, rdx
loc_CC049:
mov rax, rcx
mul rdi
shr rdx, 3
imul eax, edx, 0F6h
add eax, ecx
add al, 30h ; '0'
mov [r13-1], al
dec r13
cmp rcx, 9
mov rcx, rdx
ja short loc_CC049
loc_CC06D:
test sil, sil
jnz short loc_CC07A
mov byte ptr [r13-1], 2Dh ; '-'
dec r13
loc_CC07A:
mov r12, rbx
test r14, r14
jle short loc_CC0B6
add r14, rbx
mov r12, rbx
loc_CC088:
movsx rsi, byte ptr [r13+0]
test rsi, rsi
jz short loc_CC0B6
mov rax, [r15+0B8h]
mov rdi, r15
mov rdx, r12
mov rcx, r14
call qword ptr [rax+30h]
test eax, eax
jle short loc_CC0B6
mov eax, eax
add r12, rax
inc r13
cmp r12, r14
jb short loc_CC088
loc_CC0B6:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_CC0DA
sub r12d, ebx
movsxd rax, r12d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CC0DA:
call ___stack_chk_fail
| long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, signed long long a5)
{
bool v6; // si
unsigned long long v7; // rcx
char *v8; // r13
bool v9; // cc
unsigned long long v10; // r12
unsigned long long v11; // r14
int v12; // eax
char v14; // [rsp+3Fh] [rbp-41h] BYREF
char v15; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+50h] [rbp-30h]
v16 = __readfsqword(0x28u);
v6 = a4 >= 0 || a5 >= 0;
v7 = -a5;
if ( v6 )
v7 = a5;
v15 = 0;
if ( v7 )
{
if ( (v7 & 0x8000000000000000LL) != 0LL )
{
v8 = &v14;
v14 = v7 % 0xA + 48;
v7 /= 0xAuLL;
}
else
{
v8 = &v15;
}
do
{
*--v8 = v7 % 0xA + 48;
v9 = v7 <= 9;
v7 /= 0xAuLL;
}
while ( !v9 );
}
else
{
v8 = &v14;
v14 = 48;
}
if ( !v6 )
*--v8 = 45;
LODWORD(v10) = a2;
if ( a3 > 0 )
{
v11 = a2 + a3;
v10 = a2;
do
{
if ( !*v8 )
break;
v12 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
*v8,
v10,
v11);
if ( v12 <= 0 )
break;
v10 += (unsigned int)v12;
++v8;
}
while ( v10 < v11 );
}
return (int)v10 - (int)a2;
}
| my_ll10tostr_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
TEST ECX,ECX
SETNS AL
TEST R8,R8
SETNS SIL
OR SIL,AL
MOV RCX,R8
NEG RCX
TEST SIL,SIL
CMOVNZ RCX,R8
MOV byte ptr [RBP + -0x40],0x0
TEST RCX,RCX
JZ 0x001cc01e
MOV RDI,-0x3333333333333333
JS 0x001cc029
LEA R13,[RBP + -0x40]
JMP 0x001cc049
LAB_001cc01e:
LEA R13,[RBP + -0x41]
MOV byte ptr [R13],0x30
JMP 0x001cc06d
LAB_001cc029:
MOV RAX,RCX
MUL RDI
SHR RDX,0x3
LEA R13,[RBP + -0x41]
IMUL EAX,EDX,0xf6
ADD ECX,EAX
ADD CL,0x30
MOV byte ptr [R13],CL
MOV RCX,RDX
LAB_001cc049:
MOV RAX,RCX
MUL RDI
SHR RDX,0x3
IMUL EAX,EDX,0xf6
ADD EAX,ECX
ADD AL,0x30
MOV byte ptr [R13 + -0x1],AL
DEC R13
CMP RCX,0x9
MOV RCX,RDX
JA 0x001cc049
LAB_001cc06d:
TEST SIL,SIL
JNZ 0x001cc07a
MOV byte ptr [R13 + -0x1],0x2d
DEC R13
LAB_001cc07a:
MOV R12,RBX
TEST R14,R14
JLE 0x001cc0b6
ADD R14,RBX
MOV R12,RBX
LAB_001cc088:
MOVSX RSI,byte ptr [R13]
TEST RSI,RSI
JZ 0x001cc0b6
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RAX + 0x30]
TEST EAX,EAX
JLE 0x001cc0b6
MOV EAX,EAX
ADD R12,RAX
INC R13
CMP R12,R14
JC 0x001cc088
LAB_001cc0b6:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001cc0da
SUB R12D,EBX
MOVSXD RAX,R12D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cc0da:
CALL 0x0012a240
|
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5)
{
bool bVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
char *pcVar5;
long in_FS_OFFSET;
char local_49 [17];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = -param_5;
if ((long)param_5 >= 0 || param_4 >= 0) {
uVar4 = param_5;
}
local_49[1] = 0;
if (uVar4 == 0) {
pcVar5 = local_49;
local_49[0] = '0';
}
else {
if ((long)uVar4 < 0) {
uVar3 = uVar4 / 10;
pcVar5 = local_49;
local_49[0] = (char)uVar4 + (char)uVar3 * -10 + '0';
}
else {
pcVar5 = local_49 + 1;
uVar3 = uVar4;
}
do {
pcVar5[-1] = (char)(uVar3 / 10) * -10 + (char)uVar3 + '0';
pcVar5 = pcVar5 + -1;
bVar1 = 9 < uVar3;
uVar3 = uVar3 / 10;
} while (bVar1);
}
if ((long)param_5 < 0 && param_4 < 0) {
pcVar5[-1] = '-';
pcVar5 = pcVar5 + -1;
}
uVar4 = param_2;
if (0 < param_3) {
do {
if ((long)*pcVar5 == 0) break;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,(long)*pcVar5,uVar4,param_3 + param_2);
if ((int)uVar2 < 1) break;
uVar4 = uVar4 + uVar2;
pcVar5 = pcVar5 + 1;
} while (uVar4 < param_3 + param_2);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return (long)((int)uVar4 - (int)param_2);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,769 | lunasvg::resolveDominantBaseline(lunasvg::SVGTextPositioningElement const*) | dmazzella[P]pylunasvg/lunasvg/source/svgtextelement.cpp | static AlignmentBaseline resolveDominantBaseline(const SVGTextPositioningElement* element)
{
switch(element->dominant_baseline()) {
case DominantBaseline::Auto:
case DominantBaseline::UseScript:
case DominantBaseline::NoChange:
case DominantBaseline::ResetSize:
return AlignmentBaseline::Auto;
case DominantBaseline::Ideographic:
return AlignmentBaseline::Ideographic;
case DominantBaseline::Alphabetic:
return AlignmentBaseline::Alphabetic;
case DominantBaseline::Hanging:
return AlignmentBaseline::Hanging;
case DominantBaseline::Mathematical:
return AlignmentBaseline::Mathematical;
case DominantBaseline::Central:
return AlignmentBaseline::Central;
case DominantBaseline::Middle:
return AlignmentBaseline::Middle;
case DominantBaseline::TextAfterEdge:
return AlignmentBaseline::TextAfterEdge;
case DominantBaseline::TextBeforeEdge:
return AlignmentBaseline::TextBeforeEdge;
default:
assert(false);
}
return AlignmentBaseline::Auto;
} | O0 | cpp | lunasvg::resolveDominantBaseline(lunasvg::SVGTextPositioningElement const*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x508f0
movzbl %al, %ecx
movq %rcx, -0x18(%rbp)
subb $0xb, %al
ja 0x4f31a
movq -0x18(%rbp), %rax
leaq 0x3e23d(%rip), %rcx # 0x8d518
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x0, -0x1(%rbp)
jmp 0x4f339
movb $0x8, -0x1(%rbp)
jmp 0x4f339
movb $0x9, -0x1(%rbp)
jmp 0x4f339
movb $0xa, -0x1(%rbp)
jmp 0x4f339
movb $0xb, -0x1(%rbp)
jmp 0x4f339
movb $0x5, -0x1(%rbp)
jmp 0x4f339
movb $0x4, -0x1(%rbp)
jmp 0x4f339
movb $0x7, -0x1(%rbp)
jmp 0x4f339
movb $0x3, -0x1(%rbp)
jmp 0x4f339
leaq 0x3d27e(%rip), %rdi # 0x8c59f
leaq 0x3e27a(%rip), %rsi # 0x8d5a2
movl $0x2e, %edx
leaq 0x3e3a6(%rip), %rcx # 0x8d6da
callq 0xb210
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN7lunasvgL23resolveDominantBaselineEPKNS_25SVGTextPositioningElementE:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]; this
call _ZNK7lunasvg25SVGTextPositioningElement17dominant_baselineEv; lunasvg::SVGTextPositioningElement::dominant_baseline(void)
movzx ecx, al
mov [rbp+var_18], rcx
sub al, 0Bh; switch 12 cases
ja short def_4F2E2; jumptable 000000000004F2E2 default case
mov rax, [rbp+var_18]
lea rcx, jpt_4F2E2
movsxd rax, ds:(jpt_4F2E2 - 8D518h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4F2E4:
mov [rbp+var_1], 0; jumptable 000000000004F2E2 cases 0-3
jmp short loc_4F339
loc_4F2EA:
mov [rbp+var_1], 8; jumptable 000000000004F2E2 case 4
jmp short loc_4F339
loc_4F2F0:
mov [rbp+var_1], 9; jumptable 000000000004F2E2 case 5
jmp short loc_4F339
loc_4F2F6:
mov [rbp+var_1], 0Ah; jumptable 000000000004F2E2 case 6
jmp short loc_4F339
loc_4F2FC:
mov [rbp+var_1], 0Bh; jumptable 000000000004F2E2 case 7
jmp short loc_4F339
loc_4F302:
mov [rbp+var_1], 5; jumptable 000000000004F2E2 case 8
jmp short loc_4F339
loc_4F308:
mov [rbp+var_1], 4; jumptable 000000000004F2E2 case 9
jmp short loc_4F339
loc_4F30E:
mov [rbp+var_1], 7; jumptable 000000000004F2E2 case 10
jmp short loc_4F339
loc_4F314:
mov [rbp+var_1], 3; jumptable 000000000004F2E2 case 11
jmp short loc_4F339
def_4F2E2:
lea rdi, aFalse; jumptable 000000000004F2E2 default case
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 2Eh ; '.'
lea rcx, aAlignmentbasel; "AlignmentBaseline lunasvg::resolveDomin"...
call ___assert_fail
loc_4F339:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char lunasvg::resolveDominantBaseline(lunasvg *this, const lunasvg::SVGTextPositioningElement *a2)
{
char v3; // [rsp+1Fh] [rbp-1h]
switch ( (unsigned __int8)lunasvg::SVGTextPositioningElement::dominant_baseline(this) )
{
case 0u:
case 1u:
case 2u:
case 3u:
v3 = 0;
break;
case 4u:
v3 = 8;
break;
case 5u:
v3 = 9;
break;
case 6u:
v3 = 10;
break;
case 7u:
v3 = 11;
break;
case 8u:
v3 = 5;
break;
case 9u:
v3 = 4;
break;
case 0xAu:
v3 = 7;
break;
case 0xBu:
v3 = 3;
break;
default:
__assert_fail(
"false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgtextelement.cpp",
46LL,
"AlignmentBaseline lunasvg::resolveDominantBaseline(const SVGTextPositioningElement *)");
}
return v3;
}
| resolveDominantBaseline:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001508f0
MOVZX ECX,AL
MOV qword ptr [RBP + -0x18],RCX
SUB AL,0xb
JA 0x0014f31a
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x18d518]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0014f339
caseD_4:
MOV byte ptr [RBP + -0x1],0x8
JMP 0x0014f339
caseD_5:
MOV byte ptr [RBP + -0x1],0x9
JMP 0x0014f339
caseD_6:
MOV byte ptr [RBP + -0x1],0xa
JMP 0x0014f339
caseD_7:
MOV byte ptr [RBP + -0x1],0xb
JMP 0x0014f339
caseD_8:
MOV byte ptr [RBP + -0x1],0x5
JMP 0x0014f339
caseD_9:
MOV byte ptr [RBP + -0x1],0x4
JMP 0x0014f339
caseD_a:
MOV byte ptr [RBP + -0x1],0x7
JMP 0x0014f339
caseD_b:
MOV byte ptr [RBP + -0x1],0x3
JMP 0x0014f339
LAB_0014f31a:
LEA RDI,[0x18c59f]
LEA RSI,[0x18d5a2]
MOV EDX,0x2e
LEA RCX,[0x18d6da]
CALL 0x0010b210
LAB_0014f339:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
/* lunasvg::resolveDominantBaseline(lunasvg::SVGTextPositioningElement const*) */
int8 lunasvg::resolveDominantBaseline(SVGTextPositioningElement *param_1)
{
byte bVar1;
int1 local_9;
bVar1 = SVGTextPositioningElement::dominant_baseline(param_1);
if (bVar1 < 0xc) {
switch(bVar1) {
default:
local_9 = 0;
break;
case 4:
local_9 = 8;
break;
case 5:
local_9 = 9;
break;
case 6:
local_9 = 10;
break;
case 7:
local_9 = 0xb;
break;
case 8:
local_9 = 5;
break;
case 9:
local_9 = 4;
break;
case 10:
local_9 = 7;
break;
case 0xb:
local_9 = 3;
}
return CONCAT71((int7)((ulong)((long)&switchD_0014f2e2::switchdataD_0018d518 +
(long)(int)(&switchD_0014f2e2::switchdataD_0018d518)[bVar1]) >> 8)
,local_9);
}
/* WARNING: Subroutine does not return */
__assert_fail("false",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgtextelement.cpp"
,0x2e,
"AlignmentBaseline lunasvg::resolveDominantBaseline(const SVGTextPositioningElement *)"
);
}
| |
40,770 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) | monkey531[P]llama/common/json.hpp | serializer(output_adapter_t<char> s, const char ichar,
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
, thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
, decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
{} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x8(%rdi)
movups (%rsi), %xmm0
movq %r15, 0x8(%rsi)
movups %xmm0, (%rdi)
movq %r15, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
callq 0x1aef0
movq %rax, 0x50(%rbx)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x8c499
movb (%rcx), %r15b
movb %r15b, 0x58(%rbx)
movq (%rax), %rax
testq %rax, %rax
je 0x8c4a9
movb (%rax), %al
jmp 0x8c4ab
xorl %eax, %eax
movb %al, 0x59(%rbx)
leaq 0x5a(%rbx), %rdi
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
callq 0x1a440
movb %r14b, 0x25a(%rbx)
leaq 0x260(%rbx), %rdi
leaq 0x270(%rbx), %rax
movq %rax, 0x260(%rbx)
movsbl %r14b, %edx
movl $0x200, %esi # imm = 0x200
callq 0x1a900
movl %ebp, 0x280(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x8c50a
callq 0x32b80
movq %r14, %rdi
callq 0x1adc0
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r14d, edx
mov rbx, rdi
xor r15d, r15d
mov [rdi+8], r15
movups xmm0, xmmword ptr [rsi]
mov [rsi+8], r15
movups xmmword ptr [rdi], xmm0
mov [rsi], r15
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
call _localeconv
mov [rbx+50h], rax
mov rcx, [rax+8]
test rcx, rcx
jz short loc_8C499
mov r15b, [rcx]
loc_8C499:
mov [rbx+58h], r15b
mov rax, [rax]
test rax, rax
jz short loc_8C4A9
mov al, [rax]
jmp short loc_8C4AB
loc_8C4A9:
xor eax, eax
loc_8C4AB:
mov [rbx+59h], al
lea rdi, [rbx+5Ah]
mov edx, 200h
xor esi, esi
call _memset
mov [rbx+25Ah], r14b
lea rdi, [rbx+260h]
lea rax, [rbx+270h]
mov [rbx+260h], rax
movsx edx, r14b
mov esi, 200h
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov [rbx+280h], ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_8C50A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C50A:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer(
long long a1,
__int128 *a2,
char a3,
int a4)
{
char v6; // r15
__int128 v7; // xmm0
long long v8; // rax
char *v9; // rcx
char *v10; // rax
char v11; // al
long long result; // rax
v6 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
v7 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
*(_OWORD *)a1 = v7;
*(_QWORD *)a2 = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
v8 = localeconv(a1);
*(_QWORD *)(a1 + 80) = v8;
v9 = *(char **)(v8 + 8);
if ( v9 )
v6 = *v9;
*(_BYTE *)(a1 + 88) = v6;
v10 = *(char **)v8;
if ( v10 )
v11 = *v10;
else
v11 = 0;
*(_BYTE *)(a1 + 89) = v11;
memset(a1 + 90, 0LL, 512LL);
*(_BYTE *)(a1 + 602) = a3;
*(_QWORD *)(a1 + 608) = a1 + 624;
result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3);
*(_DWORD *)(a1 + 640) = a4;
return result;
}
| serializer:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R14D,EDX
MOV RBX,RDI
XOR R15D,R15D
MOV qword ptr [RDI + 0x8],R15
MOVUPS XMM0,xmmword ptr [RSI]
MOV qword ptr [RSI + 0x8],R15
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RSI],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
CALL 0x0011aef0
MOV qword ptr [RBX + 0x50],RAX
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x0018c499
MOV R15B,byte ptr [RCX]
LAB_0018c499:
MOV byte ptr [RBX + 0x58],R15B
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x0018c4a9
MOV AL,byte ptr [RAX]
JMP 0x0018c4ab
LAB_0018c4a9:
XOR EAX,EAX
LAB_0018c4ab:
MOV byte ptr [RBX + 0x59],AL
LEA RDI,[RBX + 0x5a]
MOV EDX,0x200
XOR ESI,ESI
CALL 0x0011a440
MOV byte ptr [RBX + 0x25a],R14B
LEA RDI,[RBX + 0x260]
LEA RAX,[RBX + 0x270]
MOV qword ptr [RBX + 0x260],RAX
LAB_0018c4da:
MOVSX EDX,R14B
MOV ESI,0x200
CALL 0x0011a900
LAB_0018c4e8:
MOV dword ptr [RBX + 0x280],EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>
>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::serializer(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,int8 *param_2,
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
param_3,int4 param_4)
{
int8 uVar1;
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
sVar2;
lconv *plVar3;
sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
*(int8 *)(this + 8) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)this = *param_2;
*(int8 *)(this + 8) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
plVar3 = localeconv();
*(lconv **)(this + 0x50) = plVar3;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->thousands_sep !=
(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->thousands_sep;
}
this[0x58] = sVar2;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->decimal_point ==
(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
}
else {
sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->decimal_point;
}
this[0x59] = sVar2;
memset(this + 0x5a,0,0x200);
this[0x25a] = param_3;
*(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
**)(this + 0x260) = this + 0x270;
/* try { // try from 0018c4da to 0018c4e7 has its CatchHandler @ 0018c4f9 */
std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0');
*(int4 *)(this + 0x280) = param_4;
return;
}
| |
40,771 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) | monkey531[P]llama/common/json.hpp | serializer(output_adapter_t<char> s, const char ichar,
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
, thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
, decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
{} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x8(%rdi)
movups (%rsi), %xmm0
movq %r15, 0x8(%rsi)
movups %xmm0, (%rdi)
movq %r15, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
callq 0x19ef0
movq %rax, 0x50(%rbx)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x8a015
movb (%rcx), %r15b
movb %r15b, 0x58(%rbx)
movq (%rax), %rax
testq %rax, %rax
je 0x8a025
movb (%rax), %al
jmp 0x8a027
xorl %eax, %eax
movb %al, 0x59(%rbx)
leaq 0x5a(%rbx), %rdi
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
callq 0x19440
movb %r14b, 0x25a(%rbx)
leaq 0x260(%rbx), %rdi
leaq 0x270(%rbx), %rax
movq %rax, 0x260(%rbx)
movsbl %r14b, %edx
movl $0x200, %esi # imm = 0x200
callq 0x19900
movl %ebp, 0x280(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x8a086
callq 0x31b9a
movq %r14, %rdi
callq 0x19dc0
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r14d, edx
mov rbx, rdi
xor r15d, r15d
mov [rdi+8], r15
movups xmm0, xmmword ptr [rsi]
mov [rsi+8], r15
movups xmmword ptr [rdi], xmm0
mov [rsi], r15
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
call _localeconv
mov [rbx+50h], rax
mov rcx, [rax+8]
test rcx, rcx
jz short loc_8A015
mov r15b, [rcx]
loc_8A015:
mov [rbx+58h], r15b
mov rax, [rax]
test rax, rax
jz short loc_8A025
mov al, [rax]
jmp short loc_8A027
loc_8A025:
xor eax, eax
loc_8A027:
mov [rbx+59h], al
lea rdi, [rbx+5Ah]
mov edx, 200h
xor esi, esi
call _memset
mov [rbx+25Ah], r14b
lea rdi, [rbx+260h]
lea rax, [rbx+270h]
mov [rbx+260h], rax
movsx edx, r14b
mov esi, 200h
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov [rbx+280h], ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_8A086
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8A086:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer(
long long a1,
__int128 *a2,
char a3,
int a4)
{
char v6; // r15
__int128 v7; // xmm0
long long v8; // rax
char *v9; // rcx
char *v10; // rax
char v11; // al
long long result; // rax
v6 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
v7 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
*(_OWORD *)a1 = v7;
*(_QWORD *)a2 = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
v8 = localeconv(a1);
*(_QWORD *)(a1 + 80) = v8;
v9 = *(char **)(v8 + 8);
if ( v9 )
v6 = *v9;
*(_BYTE *)(a1 + 88) = v6;
v10 = *(char **)v8;
if ( v10 )
v11 = *v10;
else
v11 = 0;
*(_BYTE *)(a1 + 89) = v11;
memset(a1 + 90, 0LL, 512LL);
*(_BYTE *)(a1 + 602) = a3;
*(_QWORD *)(a1 + 608) = a1 + 624;
result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3);
*(_DWORD *)(a1 + 640) = a4;
return result;
}
| serializer:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R14D,EDX
MOV RBX,RDI
XOR R15D,R15D
MOV qword ptr [RDI + 0x8],R15
MOVUPS XMM0,xmmword ptr [RSI]
MOV qword ptr [RSI + 0x8],R15
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RSI],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
CALL 0x00119ef0
MOV qword ptr [RBX + 0x50],RAX
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x0018a015
MOV R15B,byte ptr [RCX]
LAB_0018a015:
MOV byte ptr [RBX + 0x58],R15B
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x0018a025
MOV AL,byte ptr [RAX]
JMP 0x0018a027
LAB_0018a025:
XOR EAX,EAX
LAB_0018a027:
MOV byte ptr [RBX + 0x59],AL
LEA RDI,[RBX + 0x5a]
MOV EDX,0x200
XOR ESI,ESI
CALL 0x00119440
MOV byte ptr [RBX + 0x25a],R14B
LEA RDI,[RBX + 0x260]
LEA RAX,[RBX + 0x270]
MOV qword ptr [RBX + 0x260],RAX
LAB_0018a056:
MOVSX EDX,R14B
MOV ESI,0x200
CALL 0x00119900
LAB_0018a064:
MOV dword ptr [RBX + 0x280],EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>
>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::serializer(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,int8 *param_2,
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
param_3,int4 param_4)
{
int8 uVar1;
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
sVar2;
lconv *plVar3;
sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
*(int8 *)(this + 8) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)this = *param_2;
*(int8 *)(this + 8) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
plVar3 = localeconv();
*(lconv **)(this + 0x50) = plVar3;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->thousands_sep !=
(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->thousands_sep;
}
this[0x58] = sVar2;
if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->decimal_point ==
(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)0x0) {
sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
)0x0;
}
else {
sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)plVar3->decimal_point;
}
this[0x59] = sVar2;
memset(this + 0x5a,0,0x200);
this[0x25a] = param_3;
*(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
**)(this + 0x260) = this + 0x270;
/* try { // try from 0018a056 to 0018a063 has its CatchHandler @ 0018a075 */
std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0');
*(int4 *)(this + 0x280) = param_4;
return;
}
| |
40,772 | main | eloqsql/storage/maria/unittest/ma_pagecache_single.c | int main(int argc __attribute__((unused)),
char **argv __attribute__((unused)))
{
pthread_t tid;
pthread_attr_t thr_attr;
int *param, error;
size_t pagen;
File tmp_file;
MY_INIT(argv[0]);
#ifndef DBUG_OFF
#if defined(_WIN32)
default_dbug_option= "d:t:i:O,\\test_pagecache_single.trace";
#else
default_dbug_option= "d:t:i:o,/tmp/test_pagecache_single.trace";
#endif
if (argc > 1)
{
DBUG_SET(default_dbug_option);
DBUG_SET_INITIAL(default_dbug_option);
}
#endif
{
DBUG_ENTER("main");
DBUG_PRINT("info", ("Main thread: %s\n", my_thread_name()));
plan(18);
SKIP_BIG_TESTS(18)
{
char *test_dirname= create_tmpdir(argv[0]);
fn_format(file1_name, base_file1_name, test_dirname, "", MYF(0));
fn_format(file2_name, base_file2_name, test_dirname, "", MYF(0));
if ((tmp_file= my_open(file2_name, O_CREAT | O_TRUNC | O_RDWR,
MYF(MY_WME))) < 0)
exit(1);
if ((file1.file= my_open(file1_name,
O_CREAT | O_TRUNC | O_RDWR, MYF(0))) == -1)
{
fprintf(stderr, "Got error during file1 creation from open() (errno: %d)\n",
errno);
exit(1);
}
pagecache_file_set_null_hooks(&file1);
my_close(tmp_file, MYF(0));
my_delete(file2_name, MYF(0));
DBUG_PRINT("info", ("file1: %d", file1.file));
if (my_chmod(file1_name, 0777, MYF(MY_WME)))
exit(1);
my_pwrite(file1.file, (const uchar*)"test file", 9, 0, MYF(MY_WME));
if ((error= pthread_cond_init(&COND_thread_count, NULL)))
{
fprintf(stderr, "Got error: %d from pthread_cond_init (errno: %d)\n",
error, errno);
exit(1);
}
if ((error= pthread_mutex_init(&LOCK_thread_count, MY_MUTEX_INIT_FAST)))
{
fprintf(stderr, "Got error: %d from pthread_cond_init (errno: %d)\n",
error, errno);
exit(1);
}
if ((error= pthread_attr_init(&thr_attr)))
{
fprintf(stderr,"Got error: %d from pthread_attr_init (errno: %d)\n",
error,errno);
exit(1);
}
if ((error= pthread_attr_setdetachstate(&thr_attr, PTHREAD_CREATE_DETACHED)))
{
fprintf(stderr,
"Got error: %d from pthread_attr_setdetachstate (errno: %d)\n",
error,errno);
exit(1);
}
#ifdef HAVE_THR_SETCONCURRENCY
thr_setconcurrency(2);
#endif
if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0,
TEST_PAGE_SIZE, 0, MYF(MY_WME))) == 0)
{
fprintf(stderr,"Got error: init_pagecache() (errno: %d)\n",
errno);
exit(1);
}
DBUG_PRINT("info", ("Page cache %zd pages", pagen));
pthread_mutex_lock(&LOCK_thread_count);
param=(int*) malloc(sizeof(int));
*param= 1;
if ((error= pthread_create(&tid, &thr_attr, test_thread, (void*) param)))
{
fprintf(stderr,"Got error: %d from pthread_create (errno: %d)\n",
error,errno);
exit(1);
}
thread_count++;
DBUG_PRINT("info", ("Thread started"));
pthread_mutex_unlock(&LOCK_thread_count);
pthread_attr_destroy(&thr_attr);
pthread_mutex_lock(&LOCK_thread_count);
while (thread_count)
{
if ((error= pthread_cond_wait(&COND_thread_count,&LOCK_thread_count)))
fprintf(stderr,"Got error: %d from pthread_cond_wait\n",error);
}
pthread_mutex_unlock(&LOCK_thread_count);
DBUG_PRINT("info", ("thread ended"));
end_pagecache(&pagecache, 1);
DBUG_PRINT("info", ("Page cache ended"));
if (my_close(file1.file, MYF(MY_WME)))
exit(1);
my_delete(file1_name, MYF(0));
rmdir(test_dirname);
} /* SKIP_BIG_TESTS */
DBUG_PRINT("info", ("file1 (%d) closed", file1.file));
DBUG_PRINT("info", ("Program end"));
my_end(0);
}
return exit_status();
} | O3 | c | main:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rsi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq (%rsi), %rax
leaq 0xbd89a5(%rip), %rcx # 0xc0a050
movq %rax, (%rcx)
callq 0xa026c
movl $0x12, %edi
callq 0x920e7
leaq 0x3560d4(%rip), %rax # 0x387798
cmpl $0x0, (%rax)
je 0x316e1
leaq 0xa8f45(%rip), %rsi # 0xda615
movl $0x12, %edi
xorl %eax, %eax
callq 0x924ad
jmp 0x319cf
movq (%rbx), %rsi
leaq 0xafa0e(%rip), %rcx # 0xe10f9
leaq -0x230(%rbp), %rbx
movq %rbx, %rdi
movq %rcx, %rdx
movl $0x3, %r8d
callq 0x95900
movq %rbx, %rdi
callq 0x29350
cmpq $0x3, %rax
jb 0x31727
cmpb $0x2d, -0x2(%rax,%rbx)
jne 0x31727
cmpb $0x74, -0x1(%rax,%rbx)
jne 0x31727
movb $0x0, -0x232(%rbp,%rax)
leaq 0x3cd402(%rip), %rbx # 0x3feb30
leaq 0xa904a(%rip), %rsi # 0xda77f
leaq -0x230(%rbp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xd815c
movq %rbx, %rdi
movl $0x1ff, %esi # imm = 0x1FF
xorl %edx, %edx
callq 0xa10c0
leaq 0x3ccf72(%rip), %rdi # 0x3fe6d0
leaq 0xa901f(%rip), %rsi # 0xda784
leaq 0xaf98d(%rip), %r14 # 0xe10f9
movq %rbx, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x95900
leaq 0x3cd14f(%rip), %r15 # 0x3fe8d0
leaq 0xa9013(%rip), %rsi # 0xda79b
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x95900
movl $0x10, %edx
movq %r15, %rdi
movl $0x242, %esi # imm = 0x242
callq 0xa130c
testl %eax, %eax
js 0x31ac8
movl %eax, %ebx
leaq 0x3ccf14(%rip), %rdi # 0x3fe6d0
movl $0x242, %esi # imm = 0x242
xorl %edx, %edx
callq 0xa130c
movl %eax, 0x3ccec2(%rip) # 0x3fe690
cmpl $-0x1, %eax
je 0x31a1f
leaq 0x3ccea2(%rip), %rdi # 0x3fe680
callq 0x35a53
movl %ebx, %edi
xorl %esi, %esi
callq 0xa14b1
leaq 0x3cd0dd(%rip), %rdi # 0x3fe8d0
xorl %esi, %esi
callq 0x9ee8c
leaq 0x3ccecf(%rip), %rdi # 0x3fe6d0
movl $0x10, %edx
movl $0x1ff, %esi # imm = 0x1FF
callq 0xa7154
testl %eax, %eax
jne 0x31ac8
movl 0x3cce72(%rip), %edi # 0x3fe690
leaq 0xa8e32(%rip), %rsi # 0xda657
movl $0x9, %edx
movl $0x10, %r8d
xorl %ecx, %ecx
callq 0xa171a
leaq 0x3cd292(%rip), %rdi # 0x3fead0
xorl %esi, %esi
callq 0x29380
testl %eax, %eax
jne 0x319ff
leaq 0x3cd2ac(%rip), %rdi # 0x3feb00
leaq 0xbd9485(%rip), %rsi # 0xc0ace0
callq 0x29340
testl %eax, %eax
jne 0x319ff
leaq -0x230(%rbp), %rdi
callq 0x29140
testl %eax, %eax
jne 0x31a39
leaq -0x230(%rbp), %rdi
movl $0x1, %esi
callq 0x29660
testl %eax, %eax
jne 0x31a56
movq $0x10, (%rsp)
leaq 0x3ccbbc(%rip), %rdi # 0x3fe460
movl $0x28000000, %esi # imm = 0x28000000
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x10000, %r8d # imm = 0x10000
xorl %r9d, %r9d
callq 0x31d34
testq %rax, %rax
je 0x31a73
leaq 0x3cd235(%rip), %rdi # 0x3feb00
callq 0x29220
movl $0x4, %edi
callq 0x29710
movl $0x1, (%rax)
leaq 0x1eb(%rip), %rdx # 0x31ad2
leaq -0x238(%rbp), %rdi
leaq -0x230(%rbp), %rsi
movq %rax, %rcx
callq 0x298e0
testl %eax, %eax
jne 0x31a9c
incl 0x3cd21d(%rip) # 0x3feb28
leaq 0x3cd1ee(%rip), %rbx # 0x3feb00
movq %rbx, %rdi
callq 0x291e0
leaq -0x230(%rbp), %rdi
callq 0x295a0
movq %rbx, %rdi
callq 0x29220
cmpl $0x0, 0x3cd1f3(%rip) # 0x3feb28
je 0x31980
leaq 0x3cd192(%rip), %rbx # 0x3fead0
leaq 0x3cd1bb(%rip), %r14 # 0x3feb00
movq 0x354664(%rip), %r12 # 0x385fb0
leaq 0xa8e06(%rip), %r15 # 0xda759
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29430
testl %eax, %eax
je 0x31977
movq (%r12), %rdi
movl $0x1, %esi
movq %r15, %rdx
movl %eax, %ecx
xorl %eax, %eax
callq 0x29200
cmpl $0x0, 0x3cd1aa(%rip) # 0x3feb28
jne 0x31953
leaq 0x3cd179(%rip), %rdi # 0x3feb00
callq 0x291e0
leaq 0x3ccacd(%rip), %rdi # 0x3fe460
movl $0x1, %esi
callq 0x324af
movl 0x3ccced(%rip), %edi # 0x3fe690
movl $0x10, %esi
callq 0xa14b1
testl %eax, %eax
jne 0x31ac8
leaq 0x3ccd14(%rip), %rdi # 0x3fe6d0
xorl %esi, %esi
callq 0x9ee8c
leaq 0x3cd166(%rip), %rdi # 0x3feb30
callq 0x29370
xorl %edi, %edi
callq 0xa0407
callq 0x926d7
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x319fa
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
movl %eax, %ebx
movq 0x3545a8(%rip), %rax # 0x385fb0
movq (%rax), %r14
callq 0x297b0
movl (%rax), %r8d
leaq 0xa8c47(%rip), %rdx # 0xda661
jmp 0x31ab7
movq 0x35458a(%rip), %rax # 0x385fb0
movq (%rax), %rbx
callq 0x297b0
movl (%rax), %ecx
leaq 0xa8be7(%rip), %rdx # 0xda61e
jmp 0x31a8b
movl %eax, %ebx
movq 0x35456e(%rip), %rax # 0x385fb0
movq (%rax), %r14
callq 0x297b0
movl (%rax), %r8d
leaq 0xa8c3f(%rip), %rdx # 0xda693
jmp 0x31ab7
movl %eax, %ebx
movq 0x354551(%rip), %rax # 0x385fb0
movq (%rax), %r14
callq 0x297b0
movl (%rax), %r8d
leaq 0xa8c54(%rip), %rdx # 0xda6c5
jmp 0x31ab7
movq 0x354536(%rip), %rax # 0x385fb0
movq (%rax), %rbx
callq 0x297b0
movl (%rax), %ecx
leaq 0xa8c76(%rip), %rdx # 0xda701
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x29200
jmp 0x31ac8
movl %eax, %ebx
movq 0x35450b(%rip), %rax # 0x385fb0
movq (%rax), %r14
callq 0x297b0
movl (%rax), %r8d
leaq 0xa8c73(%rip), %rdx # 0xda72a
movq %r14, %rdi
movl $0x1, %esi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x29200
movl $0x1, %edi
callq 0x29540
| main:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
mov rax, [rsi]
lea rcx, my_progname
mov [rcx], rax
call my_init
mov edi, 12h
call plan
lea rax, skip_big_tests
cmp dword ptr [rax], 0
jz short loc_316E1
lea rsi, aBigTest; "big test"
mov edi, 12h
xor eax, eax
call skip
jmp loc_319CF
loc_316E1:
mov rsi, [rbx]
lea rcx, asc_E10F5+4; ""
lea rbx, [rbp+var_230]
mov rdi, rbx
mov rdx, rcx
mov r8d, 3
call fn_format
mov rdi, rbx
call _strlen
cmp rax, 3
jb short loc_31727
cmp byte ptr [rax+rbx-2], 2Dh ; '-'
jnz short loc_31727
cmp byte ptr [rax+rbx-1], 74h ; 't'
jnz short loc_31727
mov [rbp+rax+var_232], 0
loc_31727:
lea rbx, create_tmpdir_test_dirname
lea rsi, aTmp; "TMP-"
lea rdx, [rbp+var_230]
mov rdi, rbx
xor ecx, ecx
xor eax, eax
call strxmov
mov rdi, rbx
mov esi, 1FFh
xor edx, edx
call my_mkdir
lea rdi, file1_name
lea rsi, aPageCacheTestF; "page_cache_test_file_1"
lea r14, asc_E10F5+4; ""
mov rdx, rbx
mov rcx, r14
xor r8d, r8d
call fn_format
lea r15, file2_name
lea rsi, aPageCacheTestF_0; "page_cache_test_file_2"
mov rdi, r15
mov rdx, rbx
mov rcx, r14
xor r8d, r8d
call fn_format
mov edx, 10h
mov rdi, r15
mov esi, 242h
call my_open
test eax, eax
js loc_31AC8
mov ebx, eax
lea rdi, file1_name
mov esi, 242h
xor edx, edx
call my_open
mov cs:dword_3FE690, eax
cmp eax, 0FFFFFFFFh
jz loc_31A1F
lea rdi, file1
call pagecache_file_set_null_hooks
mov edi, ebx
xor esi, esi
call my_close
lea rdi, file2_name
xor esi, esi
call my_delete
lea rdi, file1_name
mov edx, 10h
mov esi, 1FFh
call my_chmod
test eax, eax
jnz loc_31AC8
mov edi, cs:dword_3FE690
lea rsi, aTestFile; "test file"
mov edx, 9
mov r8d, 10h
xor ecx, ecx
call my_pwrite
lea rdi, COND_thread_count
xor esi, esi
call _pthread_cond_init
test eax, eax
jnz loc_319FF
lea rdi, LOCK_thread_count
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
test eax, eax
jnz loc_319FF
lea rdi, [rbp+var_230]
call _pthread_attr_init
test eax, eax
jnz loc_31A39
lea rdi, [rbp+var_230]
mov esi, 1
call _pthread_attr_setdetachstate
test eax, eax
jnz loc_31A56
mov [rsp+240h+var_240], 10h
lea rdi, pagecache
mov esi, 28000000h
xor edx, edx
xor ecx, ecx
mov r8d, offset stru_10000
xor r9d, r9d
call init_pagecache
test rax, rax
jz loc_31A73
lea rdi, LOCK_thread_count
call _pthread_mutex_lock
mov edi, 4
call _malloc
mov dword ptr [rax], 1
lea rdx, test_thread
lea rdi, [rbp+var_238]
lea rsi, [rbp+var_230]
mov rcx, rax
call _pthread_create
test eax, eax
jnz loc_31A9C
inc cs:thread_count
lea rbx, LOCK_thread_count
mov rdi, rbx
call _pthread_mutex_unlock
lea rdi, [rbp+var_230]
call _pthread_attr_destroy
mov rdi, rbx
call _pthread_mutex_lock
cmp cs:thread_count, 0
jz short loc_31980
lea rbx, COND_thread_count
lea r14, LOCK_thread_count
mov r12, cs:stderr_ptr
lea r15, aGotErrorDFromP; "Got error: %d from pthread_cond_wait\n"
loc_31953:
mov rdi, rbx
mov rsi, r14
call _pthread_cond_wait
test eax, eax
jz short loc_31977
mov rdi, [r12]
mov esi, 1
mov rdx, r15
mov ecx, eax
xor eax, eax
call ___fprintf_chk
loc_31977:
cmp cs:thread_count, 0
jnz short loc_31953
loc_31980:
lea rdi, LOCK_thread_count
call _pthread_mutex_unlock
lea rdi, pagecache
mov esi, 1
call end_pagecache
mov edi, cs:dword_3FE690
mov esi, 10h
call my_close
test eax, eax
jnz loc_31AC8
lea rdi, file1_name
xor esi, esi
call my_delete
lea rdi, create_tmpdir_test_dirname
call _rmdir
loc_319CF:
xor edi, edi
call my_end
call exit_status
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_319FA
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_319FA:
call ___stack_chk_fail
loc_319FF:
mov ebx, eax
mov rax, cs:stderr_ptr
mov r14, [rax]
call ___errno_location
mov r8d, [rax]
lea rdx, aGotErrorDFromP_0; "Got error: %d from pthread_cond_init (e"...
jmp loc_31AB7
loc_31A1F:
mov rax, cs:stderr_ptr
mov rbx, [rax]
call ___errno_location
mov ecx, [rax]
lea rdx, aGotErrorDuring_2; "Got error during file1 creation from op"...
jmp short loc_31A8B
loc_31A39:
mov ebx, eax
mov rax, cs:stderr_ptr
mov r14, [rax]
call ___errno_location
mov r8d, [rax]
lea rdx, aGotErrorDFromP_1; "Got error: %d from pthread_attr_init (e"...
jmp short loc_31AB7
loc_31A56:
mov ebx, eax
mov rax, cs:stderr_ptr
mov r14, [rax]
call ___errno_location
mov r8d, [rax]
lea rdx, aGotErrorDFromP_2; "Got error: %d from pthread_attr_setdeta"...
jmp short loc_31AB7
loc_31A73:
mov rax, cs:stderr_ptr
mov rbx, [rax]
call ___errno_location
mov ecx, [rax]
lea rdx, aGotErrorInitPa; "Got error: init_pagecache() (errno: %d)"...
loc_31A8B:
mov rdi, rbx
mov esi, 1
xor eax, eax
call ___fprintf_chk
jmp short loc_31AC8
loc_31A9C:
mov ebx, eax
mov rax, cs:stderr_ptr
mov r14, [rax]
call ___errno_location
mov r8d, [rax]
lea rdx, aGotErrorDFromP_3; "Got error: %d from pthread_create (errn"...
loc_31AB7:
mov rdi, r14
mov esi, 1
mov ecx, ebx
xor eax, eax
call ___fprintf_chk
loc_31AC8:
mov edi, 1
call _exit
| int main(int argc, const char **argv, const char **envp)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
unsigned long long v7; // rax
int v8; // r8d
int v9; // r9d
int v10; // eax
unsigned int v11; // ebx
void *v12; // rdi
unsigned int v13; // eax
unsigned int v14; // eax
unsigned int v15; // eax
_DWORD *v16; // rax
unsigned int v17; // eax
int v18; // eax
unsigned int v20; // ebx
long long v21; // r14
long long v22; // r8
long long v23; // rbx
long long v24; // rcx
unsigned int v25; // ebx
long long v26; // r14
long long v27; // r8
unsigned int v28; // ebx
long long v29; // r14
long long v30; // r8
long long v31; // rbx
long long v32; // rcx
unsigned int v33; // ebx
long long v34; // r14
long long v35; // r8
_BYTE v36[8]; // [rsp+8h] [rbp-238h] BYREF
_BYTE v37[520]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v38; // [rsp+218h] [rbp-28h]
v38 = __readfsqword(0x28u);
my_progname = *argv;
my_init(argc, argv, envp);
plan(18LL);
if ( !skip_big_tests )
{
fn_format(v37, *argv, "", "", 3LL);
v7 = strlen(v37);
if ( v7 >= 3 && v37[v7 - 2] == 45 && v37[v7 - 1] == 116 )
v36[v7 + 6] = 0;
strxmov((unsigned int)&create_tmpdir_test_dirname, (unsigned int)"TMP-", (unsigned int)v37, 0, v8, v9);
my_mkdir(&create_tmpdir_test_dirname, 511LL, 0LL);
fn_format(&file1_name, "page_cache_test_file_1", &create_tmpdir_test_dirname, "", 0LL);
fn_format(&file2_name, "page_cache_test_file_2", &create_tmpdir_test_dirname, "", 0LL);
v10 = my_open(&file2_name, 578LL, 16LL);
if ( v10 >= 0 )
{
v11 = v10;
dword_3FE690 = my_open(&file1_name, 578LL, 0LL);
if ( dword_3FE690 == -1 )
{
v23 = stderr;
v24 = *(unsigned int *)__errno_location(&file1_name);
__fprintf_chk(v23, 1LL, "Got error during file1 creation from open() (errno: %d)\n", v24);
}
else
{
pagecache_file_set_null_hooks(&file1);
my_close(v11, 0LL);
my_delete(&file2_name, 0LL);
if ( !(unsigned int)my_chmod(&file1_name, 511LL, 16LL) )
{
my_pwrite((unsigned int)dword_3FE690, "test file", 9LL, 0LL, 16LL);
v12 = &COND_thread_count;
v13 = pthread_cond_init(&COND_thread_count, 0LL);
if ( v13
|| (v12 = &LOCK_thread_count, (v13 = pthread_mutex_init(&LOCK_thread_count, &my_fast_mutexattr)) != 0) )
{
v20 = v13;
v21 = stderr;
v22 = *(unsigned int *)__errno_location(v12);
__fprintf_chk(v21, 1LL, "Got error: %d from pthread_cond_init (errno: %d)\n", v20, v22);
}
else
{
v14 = pthread_attr_init(v37);
if ( v14 )
{
v25 = v14;
v26 = stderr;
v27 = *(unsigned int *)__errno_location(v37);
__fprintf_chk(v26, 1LL, "Got error: %d from pthread_attr_init (errno: %d)\n", v25, v27);
}
else
{
v15 = pthread_attr_setdetachstate(v37, 1LL);
if ( v15 )
{
v28 = v15;
v29 = stderr;
v30 = *(unsigned int *)__errno_location(v37);
__fprintf_chk(v29, 1LL, "Got error: %d from pthread_attr_setdetachstate (errno: %d)\n", v28, v30);
}
else if ( init_pagecache((unsigned int)&pagecache, 671088640, 0, 0, (unsigned int)&stru_10000, 0, 16LL) )
{
pthread_mutex_lock(&LOCK_thread_count);
v16 = (_DWORD *)malloc(4LL);
*v16 = 1;
v17 = pthread_create(v36, v37, test_thread, v16);
if ( v17 )
{
v33 = v17;
v34 = stderr;
v35 = *(unsigned int *)__errno_location(v36);
__fprintf_chk(v34, 1LL, "Got error: %d from pthread_create (errno: %d)\n", v33, v35);
}
else
{
++thread_count;
pthread_mutex_unlock(&LOCK_thread_count);
pthread_attr_destroy(v37);
pthread_mutex_lock(&LOCK_thread_count);
while ( thread_count )
{
v18 = pthread_cond_wait(&COND_thread_count, &LOCK_thread_count);
if ( v18 )
__fprintf_chk(stderr, 1LL, "Got error: %d from pthread_cond_wait\n", v18);
}
pthread_mutex_unlock(&LOCK_thread_count);
end_pagecache(&pagecache, 1LL);
if ( !(unsigned int)my_close((unsigned int)dword_3FE690, 16LL) )
{
my_delete(&file1_name, 0LL);
rmdir(&create_tmpdir_test_dirname);
goto LABEL_22;
}
}
}
else
{
v31 = stderr;
v32 = *(unsigned int *)__errno_location(&pagecache);
__fprintf_chk(v31, 1LL, "Got error: init_pagecache() (errno: %d)\n", v32);
}
}
}
}
}
}
exit(1LL);
}
skip(18, (unsigned int)"big test", v3, v4, v5, v6);
LABEL_22:
my_end(0LL);
return exit_status();
}
| main:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RSI]
LEA RCX,[0xd0a050]
MOV qword ptr [RCX],RAX
CALL 0x001a026c
MOV EDI,0x12
CALL 0x001920e7
LEA RAX,[0x487798]
CMP dword ptr [RAX],0x0
JZ 0x001316e1
LEA RSI,[0x1da615]
MOV EDI,0x12
XOR EAX,EAX
CALL 0x001924ad
JMP 0x001319cf
LAB_001316e1:
MOV RSI,qword ptr [RBX]
LEA RCX,[0x1e10f9]
LEA RBX,[RBP + -0x230]
MOV RDI,RBX
MOV RDX,RCX
MOV R8D,0x3
CALL 0x00195900
MOV RDI,RBX
CALL 0x00129350
CMP RAX,0x3
JC 0x00131727
CMP byte ptr [RAX + RBX*0x1 + -0x2],0x2d
JNZ 0x00131727
CMP byte ptr [RAX + RBX*0x1 + -0x1],0x74
JNZ 0x00131727
MOV byte ptr [RBP + RAX*0x1 + -0x232],0x0
LAB_00131727:
LEA RBX,[0x4feb30]
LEA RSI,[0x1da77f]
LEA RDX,[RBP + -0x230]
MOV RDI,RBX
XOR ECX,ECX
XOR EAX,EAX
CALL 0x001d815c
MOV RDI,RBX
MOV ESI,0x1ff
XOR EDX,EDX
CALL 0x001a10c0
LEA RDI,[0x4fe6d0]
LEA RSI,[0x1da784]
LEA R14,[0x1e10f9]
MOV RDX,RBX
MOV RCX,R14
XOR R8D,R8D
CALL 0x00195900
LEA R15,[0x4fe8d0]
LEA RSI,[0x1da79b]
MOV RDI,R15
MOV RDX,RBX
MOV RCX,R14
XOR R8D,R8D
CALL 0x00195900
MOV EDX,0x10
MOV RDI,R15
MOV ESI,0x242
CALL 0x001a130c
TEST EAX,EAX
JS 0x00131ac8
MOV EBX,EAX
LEA RDI,[0x4fe6d0]
MOV ESI,0x242
XOR EDX,EDX
CALL 0x001a130c
MOV dword ptr [0x004fe690],EAX
CMP EAX,-0x1
JZ 0x00131a1f
LEA RDI,[0x4fe680]
CALL 0x00135a53
MOV EDI,EBX
XOR ESI,ESI
CALL 0x001a14b1
LEA RDI,[0x4fe8d0]
XOR ESI,ESI
CALL 0x0019ee8c
LEA RDI,[0x4fe6d0]
MOV EDX,0x10
MOV ESI,0x1ff
CALL 0x001a7154
TEST EAX,EAX
JNZ 0x00131ac8
MOV EDI,dword ptr [0x004fe690]
LEA RSI,[0x1da657]
MOV EDX,0x9
MOV R8D,0x10
XOR ECX,ECX
CALL 0x001a171a
LEA RDI,[0x4fead0]
XOR ESI,ESI
CALL 0x00129380
TEST EAX,EAX
JNZ 0x001319ff
LEA RDI,[0x4feb00]
LEA RSI,[0xd0ace0]
CALL 0x00129340
TEST EAX,EAX
JNZ 0x001319ff
LEA RDI,[RBP + -0x230]
CALL 0x00129140
TEST EAX,EAX
JNZ 0x00131a39
LEA RDI,[RBP + -0x230]
MOV ESI,0x1
CALL 0x00129660
TEST EAX,EAX
JNZ 0x00131a56
MOV qword ptr [RSP],0x10
LEA RDI,[0x4fe460]
MOV ESI,0x28000000
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x10000
XOR R9D,R9D
CALL 0x00131d34
TEST RAX,RAX
JZ 0x00131a73
LEA RDI,[0x4feb00]
CALL 0x00129220
MOV EDI,0x4
CALL 0x00129710
MOV dword ptr [RAX],0x1
LEA RDX,[0x131ad2]
LEA RDI,[RBP + -0x238]
LEA RSI,[RBP + -0x230]
MOV RCX,RAX
CALL 0x001298e0
TEST EAX,EAX
JNZ 0x00131a9c
INC dword ptr [0x004feb28]
LEA RBX,[0x4feb00]
MOV RDI,RBX
CALL 0x001291e0
LEA RDI,[RBP + -0x230]
CALL 0x001295a0
MOV RDI,RBX
CALL 0x00129220
CMP dword ptr [0x004feb28],0x0
JZ 0x00131980
LEA RBX,[0x4fead0]
LEA R14,[0x4feb00]
MOV R12,qword ptr [0x00485fb0]
LEA R15,[0x1da759]
LAB_00131953:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00129430
TEST EAX,EAX
JZ 0x00131977
MOV RDI,qword ptr [R12]
MOV ESI,0x1
MOV RDX,R15
MOV ECX,EAX
XOR EAX,EAX
CALL 0x00129200
LAB_00131977:
CMP dword ptr [0x004feb28],0x0
JNZ 0x00131953
LAB_00131980:
LEA RDI,[0x4feb00]
CALL 0x001291e0
LEA RDI,[0x4fe460]
MOV ESI,0x1
CALL 0x001324af
MOV EDI,dword ptr [0x004fe690]
MOV ESI,0x10
CALL 0x001a14b1
TEST EAX,EAX
JNZ 0x00131ac8
LEA RDI,[0x4fe6d0]
XOR ESI,ESI
CALL 0x0019ee8c
LEA RDI,[0x4feb30]
CALL 0x00129370
LAB_001319cf:
XOR EDI,EDI
CALL 0x001a0407
CALL 0x001926d7
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x001319fa
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001319fa:
CALL 0x00129270
LAB_001319ff:
MOV EBX,EAX
MOV RAX,qword ptr [0x00485fb0]
MOV R14,qword ptr [RAX]
CALL 0x001297b0
MOV R8D,dword ptr [RAX]
LEA RDX,[0x1da661]
JMP 0x00131ab7
LAB_00131a1f:
MOV RAX,qword ptr [0x00485fb0]
MOV RBX,qword ptr [RAX]
CALL 0x001297b0
MOV ECX,dword ptr [RAX]
LEA RDX,[0x1da61e]
JMP 0x00131a8b
LAB_00131a39:
MOV EBX,EAX
MOV RAX,qword ptr [0x00485fb0]
MOV R14,qword ptr [RAX]
CALL 0x001297b0
MOV R8D,dword ptr [RAX]
LEA RDX,[0x1da693]
JMP 0x00131ab7
LAB_00131a56:
MOV EBX,EAX
MOV RAX,qword ptr [0x00485fb0]
MOV R14,qword ptr [RAX]
CALL 0x001297b0
MOV R8D,dword ptr [RAX]
LEA RDX,[0x1da6c5]
JMP 0x00131ab7
LAB_00131a73:
MOV RAX,qword ptr [0x00485fb0]
MOV RBX,qword ptr [RAX]
CALL 0x001297b0
MOV ECX,dword ptr [RAX]
LEA RDX,[0x1da701]
LAB_00131a8b:
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00129200
JMP 0x00131ac8
LAB_00131a9c:
MOV EBX,EAX
MOV RAX,qword ptr [0x00485fb0]
MOV R14,qword ptr [RAX]
CALL 0x001297b0
MOV R8D,dword ptr [RAX]
LEA RDX,[0x1da72a]
LAB_00131ab7:
MOV RDI,R14
MOV ESI,0x1
MOV ECX,EBX
XOR EAX,EAX
CALL 0x00129200
LAB_00131ac8:
MOV EDI,0x1
CALL 0x00129540
|
void main(int8 param_1,int8 *param_2)
{
int *puVar1;
int iVar2;
size_t sVar3;
long lVar4;
int4 *__arg;
int *piVar5;
char *pcVar6;
int8 uVar7;
int iVar8;
long in_FS_OFFSET;
int8 local_240;
pthread_attr_t local_238 [9];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
my_progname = *param_2;
my_init();
plan(0x12);
if (skip_big_tests != 0) {
skip(0x12,"big test");
LAB_001319cf:
my_end(0);
exit_status();
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
fn_format(local_238,*param_2,&DAT_001e10f9,&DAT_001e10f9,3);
sVar3 = strlen(local_238[0].__size);
if (((2 < sVar3) && (local_238[0].__size[sVar3 - 2] == '-')) &&
(local_238[0].__size[sVar3 - 1] == 't')) {
local_238[0].__size[sVar3 - 2] = '\0';
}
strxmov(create_tmpdir_test_dirname,&DAT_001da77f,local_238,0);
my_mkdir(create_tmpdir_test_dirname,0x1ff,0);
fn_format(file1_name,"page_cache_test_file_1",create_tmpdir_test_dirname,&DAT_001e10f9,0);
fn_format(file2_name,"page_cache_test_file_2",create_tmpdir_test_dirname,&DAT_001e10f9,0);
iVar2 = my_open(file2_name,0x242,0x10);
if (iVar2 < 0) goto LAB_00131ac8;
DAT_004fe690 = my_open(file1_name,0x242,0);
if (DAT_004fe690 == -1) {
uVar7 = *(int8 *)PTR_stderr_00485fb0;
piVar5 = __errno_location();
iVar2 = *piVar5;
pcVar6 = "Got error during file1 creation from open() (errno: %d)\n";
LAB_00131a8b:
__fprintf_chk(uVar7,1,pcVar6,iVar2);
}
else {
pagecache_file_set_null_hooks(&file1);
my_close(iVar2,0);
my_delete(file2_name,0);
iVar2 = my_chmod(file1_name,0x1ff,0x10);
if (iVar2 != 0) goto LAB_00131ac8;
my_pwrite(DAT_004fe690,"test file",9,0,0x10);
iVar2 = pthread_cond_init((pthread_cond_t *)COND_thread_count,(pthread_condattr_t *)0x0);
if ((iVar2 == 0) &&
(iVar2 = pthread_mutex_init((pthread_mutex_t *)LOCK_thread_count,
(pthread_mutexattr_t *)&my_fast_mutexattr), iVar2 == 0)) {
iVar2 = pthread_attr_init(local_238);
if (iVar2 == 0) {
iVar2 = pthread_attr_setdetachstate(local_238,1);
if (iVar2 == 0) {
lVar4 = init_pagecache(pagecache,0x28000000,0,0,0x10000,0,0x10);
if (lVar4 == 0) {
uVar7 = *(int8 *)PTR_stderr_00485fb0;
piVar5 = __errno_location();
iVar2 = *piVar5;
pcVar6 = "Got error: init_pagecache() (errno: %d)\n";
goto LAB_00131a8b;
}
pthread_mutex_lock((pthread_mutex_t *)LOCK_thread_count);
__arg = (int4 *)malloc(4);
*__arg = 1;
iVar2 = pthread_create(&local_240,local_238,test_thread,__arg);
if (iVar2 == 0) {
thread_count = thread_count + 1;
pthread_mutex_unlock((pthread_mutex_t *)LOCK_thread_count);
pthread_attr_destroy(local_238);
pthread_mutex_lock((pthread_mutex_t *)LOCK_thread_count);
puVar1 = PTR_stderr_00485fb0;
while (thread_count != 0) {
iVar2 = pthread_cond_wait((pthread_cond_t *)COND_thread_count,
(pthread_mutex_t *)LOCK_thread_count);
if (iVar2 != 0) {
__fprintf_chk(*(int8 *)puVar1,1,"Got error: %d from pthread_cond_wait\n",iVar2
);
}
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_thread_count);
end_pagecache(pagecache,1);
iVar2 = my_close(DAT_004fe690,0x10);
if (iVar2 == 0) {
my_delete(file1_name,0);
rmdir(create_tmpdir_test_dirname);
goto LAB_001319cf;
}
goto LAB_00131ac8;
}
uVar7 = *(int8 *)PTR_stderr_00485fb0;
piVar5 = __errno_location();
iVar8 = *piVar5;
pcVar6 = "Got error: %d from pthread_create (errno: %d)\n";
}
else {
uVar7 = *(int8 *)PTR_stderr_00485fb0;
piVar5 = __errno_location();
iVar8 = *piVar5;
pcVar6 = "Got error: %d from pthread_attr_setdetachstate (errno: %d)\n";
}
}
else {
uVar7 = *(int8 *)PTR_stderr_00485fb0;
piVar5 = __errno_location();
iVar8 = *piVar5;
pcVar6 = "Got error: %d from pthread_attr_init (errno: %d)\n";
}
}
else {
uVar7 = *(int8 *)PTR_stderr_00485fb0;
piVar5 = __errno_location();
iVar8 = *piVar5;
pcVar6 = "Got error: %d from pthread_cond_init (errno: %d)\n";
}
__fprintf_chk(uVar7,1,pcVar6,iVar2,iVar8);
}
LAB_00131ac8:
/* WARNING: Subroutine does not return */
exit(1);
}
| |
40,773 | rw_pr_init | eloqsql/mysys/thr_rwlock.c | int rw_pr_init(rw_pr_lock_t *rwlock)
{
pthread_mutex_init(&rwlock->lock, NULL);
pthread_cond_init(&rwlock->no_active_readers, NULL);
rwlock->active_readers= 0;
rwlock->writers_waiting_readers= 0;
rwlock->active_writer= FALSE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
return 0;
} | O3 | c | rw_pr_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x2a310
leaq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0x2a350
movq $0x0, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| rw_pr_init:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
xor esi, esi
call _pthread_mutex_init
lea rdi, [rbx+28h]
xor esi, esi
call _pthread_cond_init
mov qword ptr [rbx+58h], 0
mov byte ptr [rbx+60h], 0
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
| long long rw_pr_init(long long a1)
{
pthread_mutex_init(a1, 0LL);
pthread_cond_init(a1 + 40, 0LL);
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
return 0LL;
}
| rw_pr_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR ESI,ESI
CALL 0x0012a310
LEA RDI,[RBX + 0x28]
XOR ESI,ESI
CALL 0x0012a350
MOV qword ptr [RBX + 0x58],0x0
MOV byte ptr [RBX + 0x60],0x0
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_init(pthread_mutex_t *param_1)
{
pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0);
pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0);
*(int8 *)((long)param_1 + 0x58) = 0;
*(int1 *)((long)param_1 + 0x60) = 0;
return 0;
}
| |
40,774 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::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>::at<char const (&) [8], 0>(char const (&) [8]) | monkey531[P]llama/common/./json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O0 | 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>& 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>::at<char const (&) [8], 0>(char const (&) [8]):
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq 0xc0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xa2c80
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x11d878
jmp 0x11d954
movb $0x1, 0x83(%rsp)
movl $0x20, %edi
callq 0x50540
movq 0x20(%rsp), %rdi
movq %rax, 0x18(%rsp)
callq 0xa04c0
movq %rax, 0x90(%rsp)
leaq 0xb7880(%rip), %rsi # 0x1d5128
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x125a10
jmp 0x11d8bf
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x130, %esi # imm = 0x130
leaq 0x98(%rsp), %rdx
callq 0xbbd90
jmp 0x11d8dd
movq 0x18(%rsp), %rdi
movb $0x0, 0x83(%rsp)
leaq 0x134807(%rip), %rsi # 0x2520f8
leaq -0x7d388(%rip), %rdx # 0xa0570
callq 0x508f0
jmp 0x11dae5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x11d939
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x510c0
testb $0x1, 0x83(%rsp)
jne 0x11d945
jmp 0x11d94f
movq 0x18(%rsp), %rdi
callq 0x50c40
jmp 0x11dad8
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0xb8(%rsp), %rsi
callq 0x126b60
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x78(%rsp)
movq 0x8(%rax), %rdi
callq 0xa2ac0
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xbb9f0
testb $0x1, %al
jne 0x11d99d
jmp 0x11daae
movb $0x1, 0x2e(%rsp)
movl $0x20, %edi
callq 0x50540
movq %rax, (%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x2f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x50d60
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x61bd0
jmp 0x11d9e2
leaq 0xb796b(%rip), %rsi # 0x1d5354
leaq 0xb796a(%rip), %rcx # 0x1d535a
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x126c30
jmp 0x11da01
movq 0x20(%rsp), %rcx
movq (%rsp), %rdi
movl $0x193, %esi # imm = 0x193
leaq 0x50(%rsp), %rdx
callq 0xb9940
jmp 0x11da1b
movq (%rsp), %rdi
movb $0x0, 0x2e(%rsp)
leaq 0x1347b5(%rip), %rsi # 0x2521e0
leaq -0x64af2(%rip), %rdx # 0xb8f40
callq 0x508f0
jmp 0x11dae5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x11da90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x11da86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x510c0
leaq 0x30(%rsp), %rdi
callq 0x510c0
leaq 0x2f(%rsp), %rdi
callq 0x510a0
testb $0x1, 0x2e(%rsp)
jne 0x11daa3
jmp 0x11daac
movq (%rsp), %rdi
callq 0x50c40
jmp 0x11dad8
leaq 0x78(%rsp), %rdi
callq 0xbbbe0
movq 0x20(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
movq $-0x1, %rdx
callq 0x1258f0
addq $0xc8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x50940
nopw %cs:(%rax,%rax)
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
sub rsp, 0C8h
mov [rsp+0C8h+var_8], rdi
mov qword ptr [rsp+0C8h+var_10], rsi
mov rdi, [rsp+0C8h+var_8]
mov [rsp+0C8h+var_A8], rdi; int
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; 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>::is_object(void)
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_11D878
jmp loc_11D954
loc_11D878:
mov [rsp+0C8h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rdi, [rsp+0C8h+var_A8]
mov [rsp+0C8h+var_B0], rax; char
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)
mov qword ptr [rsp+0C8h+var_38], rax; char
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+0C8h+var_30]; int
lea rdx, [rsp+0C8h+var_38]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
jmp short $+2
loc_11D8BF:
mov rcx, [rsp+0C8h+var_A8]
mov rdi, [rsp+0C8h+var_B0]; int
mov esi, 130h
lea rdx, [rsp+0C8h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_11D8DD:
mov rdi, [rsp+0C8h+var_B0]; void *
mov [rsp+0C8h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_11DAE5
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_11D939
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_11D939:
test [rsp+arg_7B], 1
jnz short loc_11D945
jmp short loc_11D94F
loc_11D945:
mov rdi, [rsp+arg_10]; void *
call ___cxa_free_exception
loc_11D94F:
jmp loc_11DAD8
loc_11D954:
mov rax, [rsp+0C8h+var_A8]
mov rdi, [rax+8]
mov rsi, qword ptr [rsp+0C8h+var_10]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, rax
mov rax, [rsp+0C8h+var_A8]
mov qword ptr [rsp+0C8h+var_50], rcx; int
mov rdi, [rax+8]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov qword ptr [rsp+0C8h+var_58], rax; char
lea rdi, [rsp+0C8h+var_50]
lea rsi, [rsp+0C8h+var_58]
call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&)
test al, 1
jnz short loc_11D99D
jmp loc_11DAAE
loc_11D99D:
mov [rsp+0C8h+var_9A], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+0C8h+var_C8], rax; int
mov rax, qword ptr [rsp+0C8h+var_10]
mov qword ptr [rsp+0C8h+var_C0], rax; int
lea rdi, [rsp+0C8h+var_99]
mov qword ptr [rsp+0C8h+var_B8], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, qword ptr [rsp+0C8h+var_C0]
mov rdx, qword ptr [rsp+0C8h+var_B8]
lea rdi, [rsp+0C8h+var_99+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_11D9E2:
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+0C8h+var_78]; int
lea rdx, [rsp+0C8h+var_99+1]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
jmp short $+2
loc_11DA01:
mov rcx, [rsp+0C8h+var_A8]
mov rdi, [rsp+0C8h+var_C8]; int
mov esi, 193h
lea rdx, [rsp+0C8h+var_78]
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_11DA1B:
mov rdi, [rsp+0C8h+var_C8]; void *
mov [rsp+0C8h+var_9A], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_11DAE5
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_11DA90
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_11DA86
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_11DA86:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_11DA90:
lea rdi, [rsp+arg_27]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_26], 1
jnz short loc_11DAA3
jmp short loc_11DAAC
loc_11DAA3:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_11DAAC:
jmp short loc_11DAD8
loc_11DAAE:
lea rdi, [rsp+0C8h+var_50]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void)
mov rdi, [rsp+0C8h+var_A8]
mov rsi, rax
add rsi, 20h ; ' '
mov rdx, 0FFFFFFFFFFFFFFFFh
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m; 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>::set_parent(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>&,ulong)
add rsp, 0C8h
retn
loc_11DAD8:
mov rdi, [rsp+arg_80]
call __Unwind_Resume
loc_11DAE5:
nop word ptr [rax+rax+00000000h]
nop
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
long long a2)
{
int v2; // ecx
int v3; // r8d
int v4; // r9d
int v5; // r8d
int v6; // r9d
long long v7; // rax
int v9; // [rsp+0h] [rbp-C8h]
void *v10; // [rsp+0h] [rbp-C8h]
nlohmann::json_abi_v3_11_3::detail::out_of_range *v11; // [rsp+0h] [rbp-C8h]
void *v12; // [rsp+8h] [rbp-C0h]
long long v13; // [rsp+8h] [rbp-C0h]
int v14; // [rsp+10h] [rbp-B8h]
int v15; // [rsp+18h] [rbp-B0h]
void *exception; // [rsp+18h] [rbp-B0h]
nlohmann::json_abi_v3_11_3::detail::type_error *v17; // [rsp+18h] [rbp-B0h]
long long v18; // [rsp+20h] [rbp-A8h]
char v19; // [rsp+2Fh] [rbp-99h] BYREF
_BYTE v20[32]; // [rsp+30h] [rbp-98h] BYREF
int v21[8]; // [rsp+50h] [rbp-78h] BYREF
char v22[8]; // [rsp+70h] [rbp-58h] BYREF
int v23[2]; // [rsp+78h] [rbp-50h] BYREF
char v24; // [rsp+83h] [rbp-45h]
char v25[8]; // [rsp+90h] [rbp-38h] BYREF
int v26[8]; // [rsp+98h] [rbp-30h] BYREF
int v27[2]; // [rsp+B8h] [rbp-10h]
long long v28; // [rsp+C0h] [rbp-8h]
v28 = a1;
*(_QWORD *)v27 = a2;
if ( !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>::is_object((_BYTE *)a1) )
{
exception = __cxa_allocate_exception(0x20uLL);
*(_QWORD *)v25 = 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((_BYTE *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(int)v26,
(int)"cannot use at() with ",
(int)v25,
v2,
v3,
v4,
v9,
v12,
v14,
(long long)exception);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v17,
304,
(long long)v26,
a1);
v24 = 0;
__cxa_throw(
v17,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
*(_QWORD *)v23 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
*(_QWORD *)(a1 + 8),
*(_QWORD *)v27);
*(_QWORD *)v22 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8));
if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>(
(long long)v23,
(long long)v22) )
{
v10 = __cxa_allocate_exception(0x20uLL);
v13 = *(_QWORD *)v27;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v20, v13, (long long)&v19);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(int)v21,
(int)"key '",
(int)v20,
(int)"' not found",
v5,
v6,
v10,
v13,
(int)&v19,
v15,
a1);
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v11,
403,
(long long)v21,
v18);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range);
}
v7 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v23);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parent(
a1,
v7 + 32,
-1LL);
}
| |||
40,775 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::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>::at<char const (&) [8], 0>(char const (&) [8]) | monkey531[P]llama/common/./json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& 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>::at<char const (&) [8], 0>(char const (&) [8]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x6932b
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x69315
movq %rbx, %rdi
movq %r15, %rsi
callq 0x181a0
testl %eax, %eax
je 0x6930a
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0x692eb
jmp 0x6930d
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0x69389
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x18360
movq %rax, %rbx
movq %r14, %rdi
callq 0x3e096
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x53426(%rip), %rsi # 0xbc773
leaq 0x20(%rsp), %rdi
callq 0x6f3e3
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x49cf4
xorl %ebp, %ebp
leaq 0x84f40(%rip), %rsi # 0xee2b8
leaq -0x1cfcf(%rip), %rdx # 0x4c3b0
movq %rbx, %rdi
callq 0x18b30
jmp 0x69402
movl $0x20, %edi
callq 0x18360
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x18310
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x590a2
leaq 0x535e1(%rip), %rsi # 0xbc99f
leaq 0x535e0(%rip), %rcx # 0xbc9a5
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x6f9be
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x49008
xorl %ebp, %ebp
leaq 0x84fad(%rip), %rsi # 0xee3a0
leaq -0x1d04a(%rip), %rdx # 0x4c3b0
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x69420
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6946b
movq 0x10(%rsp), %rsi
jmp 0x69463
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x69475
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x69475
jmp 0x69472
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6946b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186a0
testb %bpl, %bpl
jne 0x69475
jmp 0x6947d
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
movq %r14, %rdi
callq 0x18b90
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_6932B
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_69315
loc_692EB:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6930A
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_692EB
jmp short loc_6930D
loc_6930A:
mov rax, rbx
loc_6930D:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_69315:
cmp rax, rbx
jz short loc_69389
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6932B:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_69402
loc_69389:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
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 rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_69402:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_69420
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_69420:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_6946B
mov rsi, [rsp+68h+var_58]
jmp short loc_69463
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_69475
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_69475
jmp short loc_69472
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6946B
mov rsi, [rsp+68h+var_38]
loc_69463:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6946B:
test bpl, bpl
jnz short loc_69475
jmp short loc_6947D
loc_69472:
mov r14, rax
loc_69475:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6947D:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)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(&)[22],char const*>(v11, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__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);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0016932b
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x00169315
LAB_001692eb:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001181a0
TEST EAX,EAX
JZ 0x0016930a
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001692eb
JMP 0x0016930d
LAB_0016930a:
MOV RAX,RBX
LAB_0016930d:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_00169315:
CMP RAX,RBX
JZ 0x00169389
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016932b:
MOV EDI,0x20
CALL 0x00118360
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013e096
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_00169346:
LEA RSI,[0x1bc773]
LEA RDI,[RSP + 0x20]
CALL 0x0016f3e3
MOV BPL,0x1
LAB_0016935a:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00149cf4
XOR EBP,EBP
LEA RSI,[0x1ee2b8]
LEA RDX,[0x14c3b0]
MOV RDI,RBX
CALL 0x00118b30
LAB_00169389:
MOV EDI,0x20
CALL 0x00118360
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00118310
LEA RDX,[RAX + R15*0x1]
LAB_001693ac:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001590a2
LAB_001693b7:
LEA RSI,[0x1bc99f]
LEA RCX,[0x1bc9a5]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0016f9be
MOV BPL,0x1
LAB_001693d5:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00149008
XOR EBP,EBP
LEA RSI,[0x1ee3a0]
LEA RDX,[0x14c3b0]
MOV RDI,RBX
CALL 0x00118b30
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 00169346 to 00169356 has its CatchHandler @ 00169472 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 0016935a to 00169386 has its CatchHandler @ 0016944d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001693ac to 001693b6 has its CatchHandler @ 0016944b */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001693b7 to 001693d1 has its CatchHandler @ 00169430 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001693d5 to 00169401 has its CatchHandler @ 00169402 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
40,776 | mariadb_stmt_execute_direct | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mariadb_stmt_execute_direct(MYSQL_STMT *stmt,
const char *stmt_str,
size_t length)
{
MYSQL *mysql;
my_bool emulate_cmd;
my_bool clear_result= 0;
if (!stmt)
return 1;
mysql= stmt->mysql;
if (!mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return 1;
}
emulate_cmd= !(!(stmt->mysql->server_capabilities & CLIENT_MYSQL) &&
(stmt->mysql->extension->mariadb_server_capabilities &
(MARIADB_CLIENT_STMT_BULK_OPERATIONS >> 32))) || mysql->net.compress;
/* Server versions < 10.2 don't support execute_direct, so we need to
emulate it */
if (emulate_cmd)
{
int rc;
/* avoid sending close + prepare in 2 packets */
if ((rc= mysql_stmt_prepare(stmt, stmt_str, (unsigned long)length)))
return rc;
return mysql_stmt_execute(stmt);
}
if (ma_multi_command(mysql, COM_MULTI_ENABLED))
{
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return 1;
}
if (length == (size_t) -1)
length= strlen(stmt_str);
/* clear flags */
CLEAR_CLIENT_STMT_ERROR(stmt);
CLEAR_CLIENT_ERROR(stmt->mysql);
stmt->upsert_status.affected_rows= mysql->affected_rows= (unsigned long long) ~0;
/* check if we have to clear results */
if (stmt->state > MYSQL_STMT_INITTED)
{
/* We need to semi-close the prepared statement:
reset stmt and free all buffers and close the statement
on server side. Statement handle will get a new stmt_id */
char stmt_id[STMT_ID_LENGTH];
if (mysql_stmt_internal_reset(stmt, 1))
goto fail;
ma_free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC));
ma_free_root(&((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root, MYF(0));
stmt->field_count= 0;
stmt->param_count= 0;
stmt->params= 0;
int4store(stmt_id, stmt->stmt_id);
if (mysql->methods->db_command(mysql, COM_STMT_CLOSE, stmt_id,
sizeof(stmt_id), 1, stmt))
goto fail;
}
stmt->stmt_id= -1;
if (mysql->methods->db_command(mysql, COM_STMT_PREPARE, stmt_str, length, 1, stmt))
goto fail;
/* in case prepare fails, we need to clear the result package from execute, which
is always an error packet (invalid statement id) */
clear_result= 1;
stmt->state= MYSQL_STMT_PREPARED;
/* Since we can't determine stmt_id here, we need to set it to -1, so server will know that the
* execute command belongs to previous prepare */
stmt->stmt_id= -1;
if (mysql_stmt_execute(stmt))
goto fail;
/* flush multi buffer */
if (ma_multi_command(mysql, COM_MULTI_END))
goto fail;
if (!mysql->options.extension->skip_read_response)
{
/* read prepare response */
if (mysql->methods->db_read_prepare_response &&
mysql->methods->db_read_prepare_response(stmt))
goto fail;
clear_result= 0;
/* read execute response packet */
return mthd_stmt_read_execute_response(stmt);
}
fail:
/* check if we need to set error message */
if (!mysql_stmt_errno(stmt))
UPDATE_STMT_ERROR(stmt);
if (clear_result) {
do {
stmt->mysql->methods->db_stmt_flush_unbuffered(stmt);
} while(mysql_stmt_more_results(stmt));
}
stmt->state= MYSQL_STMT_INITTED;
return 1;
} | O3 | c | mariadb_stmt_execute_direct:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl $0x1, %ebx
testq %rdi, %rdi
je 0x2262d
movq %rdi, %r14
movq 0x38(%rdi), %r15
testq %r15, %r15
je 0x225da
movq %rdx, %r13
movq %rsi, %r12
testb $0x1, 0x370(%r15)
jne 0x2259f
movq 0x4f0(%r15), %rax
testb $0x4, 0x70(%rax)
je 0x2259f
cmpb $0x0, 0x84(%r15)
je 0x22651
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x20f80
testl %eax, %eax
jne 0x2262d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x228df
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21b51
movl $0x7dd, 0x108(%r14) # imm = 0x7DD
leaq 0x30d(%r14), %rdi
leaq 0x2646d(%rip), %rax # 0x48a60
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r15d, %r15d
movb %r15b, 0x312(%r14)
leaq 0x10c(%r14), %rdi
leaq 0x26458(%rip), %rax # 0x48a70
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r15b, 0x30b(%r14)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x228df
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movl $0x2, %esi
callq 0x1602d
testl %eax, %eax
je 0x226a9
movl $0x7de, 0x108(%r14) # imm = 0x7DE
leaq 0x30d(%r14), %rdi
leaq 0x263e5(%rip), %rax # 0x48a60
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r15d, %r15d
movb %r15b, 0x312(%r14)
leaq 0x10c(%r14), %rdi
leaq 0x263d0(%rip), %rax # 0x48a70
movq 0x70(%rax), %rsi
jmp 0x2261c
cmpq $-0x1, %r13
jne 0x226ba
movq %r12, %rdi
callq 0x131c0
movq %rax, %r13
xorl %eax, %eax
movl %eax, 0x108(%r14)
movl $0x30303030, %ecx # imm = 0x30303030
movl %ecx, 0x30d(%r14)
movw $0x30, %dx
movw %dx, 0x311(%r14)
movb %al, 0x10c(%r14)
movq 0x38(%r14), %rsi
movl %eax, 0x90(%rsi)
movq 0x38(%r14), %rsi
movw %dx, 0x29b(%rsi)
movl %ecx, 0x297(%rsi)
movq 0x38(%r14), %rcx
movb %al, 0x97(%rcx)
movq 0x38(%r14), %rax
movq 0x2a0(%rax), %rax
testq %rax, %rax
je 0x2271e
movl $0x0, 0x4(%rax)
movq $-0x1, %rax
movq %rax, 0x338(%r15)
movq %rax, 0xf8(%r14)
cmpl $0x0, 0x50(%r14)
je 0x227a3
movq %r14, %rdi
movl $0x1, %esi
callq 0x1fcd4
testb %al, %al
jne 0x2279e
movq %r14, %rdi
movl $0x1, %esi
callq 0x1de3f
movq 0x340(%r14), %rdi
xorl %esi, %esi
callq 0x1de3f
xorl %eax, %eax
movq %rax, 0x60(%r14)
movq %rax, 0x70(%r14)
movl 0x40(%r14), %eax
leaq -0x34(%rbp), %rdx
movl %eax, (%rdx)
movq 0x4d0(%r15), %rax
movl $0x4, %ecx
movq %r15, %rdi
movl $0x19, %esi
movl $0x1, %r8d
movq %r14, %r9
callq *0x10(%rax)
testl %eax, %eax
je 0x227a3
movb $0x1, %r12b
jmp 0x22817
movq $-0x1, 0x40(%r14)
movq 0x4d0(%r15), %rax
movq %r15, %rdi
movl $0x16, %esi
movq %r12, %rdx
movq %r13, %rcx
movl $0x1, %r8d
movq %r14, %r9
callq *0x10(%rax)
movb $0x1, %r12b
testl %eax, %eax
jne 0x22817
movl $0x1, 0x50(%r14)
movq $-0x1, 0x40(%r14)
movq %r14, %rdi
callq 0x21b51
testl %eax, %eax
jne 0x22814
movq %r15, %rdi
movl $0x4, %esi
callq 0x1602d
testl %eax, %eax
jne 0x22814
movq 0x480(%r15), %rax
cmpb $0x0, 0x148(%rax)
je 0x228b3
xorl %r12d, %r12d
cmpl $0x0, 0x108(%r14)
jne 0x22878
leaq 0x30d(%r14), %rdi
leaq 0x10c(%r14), %r15
movq 0x38(%r14), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%r14)
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13220
xorl %r13d, %r13d
movb %r13b, 0x312(%r14)
movl $0x97, %esi
addq 0x38(%r14), %rsi
movl $0x200, %edx # imm = 0x200
movq %r15, %rdi
callq 0x13220
movb %r13b, 0x30b(%r14)
testb %r12b, %r12b
jne 0x228a6
movq 0x38(%r14), %rax
movq 0x4d0(%rax), %rax
movq %r14, %rdi
callq *0x78(%rax)
movq 0x38(%r14), %rax
testq %rax, %rax
je 0x228a6
movzwl 0x380(%rax), %ecx
testl $0x1008, %ecx # imm = 0x1008
jne 0x22881
movl $0x0, 0x50(%r14)
jmp 0x2262d
movq 0x4d0(%r15), %rax
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x228d0
movq %r14, %rdi
callq *%rax
testb %al, %al
jne 0x22814
movq %r14, %rdi
callq 0x21553
movl %eax, %ebx
jmp 0x2262d
callq 0x13500
| mariadb_stmt_execute_direct:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rax, fs:28h
mov [rbp+var_30], rax
mov ebx, 1
test rdi, rdi
jz loc_2262D
mov r14, rdi
mov r15, [rdi+38h]
test r15, r15
jz short loc_225DA
mov r13, rdx
mov r12, rsi
test byte ptr [r15+370h], 1
jnz short loc_2259F
mov rax, [r15+4F0h]
test byte ptr [rax+70h], 4
jz short loc_2259F
cmp byte ptr [r15+84h], 0
jz loc_22651
loc_2259F:
mov rdi, r14
mov rsi, r12
mov rdx, r13
call mysql_stmt_prepare
test eax, eax
jnz short loc_2262D
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_228DF
mov rdi, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp mysql_stmt_execute
loc_225DA:
mov dword ptr [r14+108h], 7DDh
lea rdi, [r14+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+312h], r15b
lea rdi, [r14+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
loc_2261C:
mov edx, 200h
call _strncpy
mov [r14+30Bh], r15b
loc_2262D:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_228DF
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_22651:
mov rdi, r15
mov esi, 2
call ma_multi_command
test eax, eax
jz short loc_226A9
mov dword ptr [r14+108h], 7DEh
lea rdi, [r14+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+312h], r15b
lea rdi, [r14+10Ch]
lea rax, client_errors
mov rsi, [rax+70h]
jmp loc_2261C
loc_226A9:
cmp r13, 0FFFFFFFFFFFFFFFFh
jnz short loc_226BA
mov rdi, r12
call _strlen
mov r13, rax
loc_226BA:
xor eax, eax
mov [r14+108h], eax
mov ecx, 30303030h
mov [r14+30Dh], ecx
mov dx, 30h ; '0'
mov [r14+311h], dx
mov [r14+10Ch], al
mov rsi, [r14+38h]
mov [rsi+90h], eax
mov rsi, [r14+38h]
mov [rsi+29Bh], dx
mov [rsi+297h], ecx
mov rcx, [r14+38h]
mov [rcx+97h], al
mov rax, [r14+38h]
mov rax, [rax+2A0h]
test rax, rax
jz short loc_2271E
mov dword ptr [rax+4], 0
loc_2271E:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [r15+338h], rax
mov [r14+0F8h], rax
cmp dword ptr [r14+50h], 0
jz short loc_227A3
mov rdi, r14
mov esi, 1
call mysql_stmt_internal_reset
test al, al
jnz short loc_2279E
mov rdi, r14
mov esi, 1
call ma_free_root
mov rdi, [r14+340h]
xor esi, esi
call ma_free_root
xor eax, eax
mov [r14+60h], rax
mov [r14+70h], rax
mov eax, [r14+40h]
lea rdx, [rbp+var_34]
mov [rdx], eax
mov rax, [r15+4D0h]
mov ecx, 4
mov rdi, r15
mov esi, 19h
mov r8d, 1
mov r9, r14
call qword ptr [rax+10h]
test eax, eax
jz short loc_227A3
loc_2279E:
mov r12b, 1
jmp short loc_22817
loc_227A3:
mov qword ptr [r14+40h], 0FFFFFFFFFFFFFFFFh
mov rax, [r15+4D0h]
mov rdi, r15
mov esi, 16h
mov rdx, r12
mov rcx, r13
mov r8d, 1
mov r9, r14
call qword ptr [rax+10h]
mov r12b, 1
test eax, eax
jnz short loc_22817
mov dword ptr [r14+50h], 1
mov qword ptr [r14+40h], 0FFFFFFFFFFFFFFFFh
mov rdi, r14
call mysql_stmt_execute
test eax, eax
jnz short loc_22814
mov rdi, r15
mov esi, 4
call ma_multi_command
test eax, eax
jnz short loc_22814
mov rax, [r15+480h]
cmp byte ptr [rax+148h], 0
jz loc_228B3
loc_22814:
xor r12d, r12d
loc_22817:
cmp dword ptr [r14+108h], 0
jnz short loc_22878
lea rdi, [r14+30Dh]
lea r15, [r14+10Ch]
mov rsi, [r14+38h]
mov eax, [rsi+90h]
mov [r14+108h], eax
add rsi, 297h
mov edx, 5
call _strncpy
xor r13d, r13d
mov [r14+312h], r13b
mov esi, 97h
add rsi, [r14+38h]
mov edx, 200h
mov rdi, r15
call _strncpy
mov [r14+30Bh], r13b
loc_22878:
test r12b, r12b
jnz short loc_228A6
mov rax, [r14+38h]
loc_22881:
mov rax, [rax+4D0h]
mov rdi, r14
call qword ptr [rax+78h]
mov rax, [r14+38h]
test rax, rax
jz short loc_228A6
movzx ecx, word ptr [rax+380h]
test ecx, 1008h
jnz short loc_22881
loc_228A6:
mov dword ptr [r14+50h], 0
jmp loc_2262D
loc_228B3:
mov rax, [r15+4D0h]
mov rax, [rax+40h]
test rax, rax
jz short loc_228D0
mov rdi, r14
call rax
test al, al
jnz loc_22814
loc_228D0:
mov rdi, r14
call mthd_stmt_read_execute_response
mov ebx, eax
jmp loc_2262D
loc_228DF:
call ___stack_chk_fail
| long long mariadb_stmt_execute_direct(long long a1, long long a2, long long a3)
{
unsigned int v3; // ebx
long long v5; // r15
long long v6; // r13
long long v8; // rdi
char *v9; // rsi
long long v10; // rax
char v11; // r12
long long v12; // rsi
long long v13; // rax
unsigned __int8 ( *v14)(long long); // rax
int v15; // [rsp+Ch] [rbp-34h] BYREF
unsigned long long v16; // [rsp+10h] [rbp-30h]
v16 = __readfsqword(0x28u);
v3 = 1;
if ( !a1 )
return v3;
v5 = *(_QWORD *)(a1 + 56);
if ( !v5 )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v8 = a1 + 268;
v9 = client_errors[13];
LABEL_9:
strncpy(v8, v9, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return v3;
}
v6 = a3;
if ( (*(_BYTE *)(v5 + 880) & 1) == 0 && (*(_BYTE *)(*(_QWORD *)(v5 + 1264) + 112LL) & 4) != 0 && !*(_BYTE *)(v5 + 132) )
{
if ( !(unsigned int)ma_multi_command(*(_QWORD *)(a1 + 56), 2) )
{
if ( v6 == -1 )
v6 = strlen(a2);
*(_DWORD *)(a1 + 264) = 0;
strcpy((char *)(a1 + 781), "00000");
*(_BYTE *)(a1 + 268) = 0;
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 0;
strcpy((char *)(*(_QWORD *)(a1 + 56) + 663LL), "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0;
v10 = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL);
if ( v10 )
*(_DWORD *)(v10 + 4) = 0;
*(_QWORD *)(v5 + 824) = -1LL;
*(_QWORD *)(a1 + 248) = -1LL;
if ( *(_DWORD *)(a1 + 80)
&& ((unsigned __int8)mysql_stmt_internal_reset(a1, 1)
|| (ma_free_root(a1, 1),
ma_free_root(*(_QWORD *)(a1 + 832), 0),
*(_QWORD *)(a1 + 96) = 0LL,
*(_QWORD *)(a1 + 112) = 0LL,
v15 = *(_DWORD *)(a1 + 64),
(*(unsigned int ( **)(long long, long long, int *, long long, long long, long long))(*(_QWORD *)(v5 + 1232)
+ 16LL))(
v5,
25LL,
&v15,
4LL,
1LL,
a1))) )
{
v11 = 1;
}
else
{
*(_QWORD *)(a1 + 64) = -1LL;
v11 = 1;
if ( !(*(unsigned int ( **)(long long, long long, long long, long long, long long, long long))(*(_QWORD *)(v5 + 1232) + 16LL))(
v5,
22LL,
a2,
v6,
1LL,
a1) )
{
*(_DWORD *)(a1 + 80) = 1;
*(_QWORD *)(a1 + 64) = -1LL;
if ( !(unsigned int)mysql_stmt_execute(a1)
&& !(unsigned int)ma_multi_command(v5, 4)
&& !*(_BYTE *)(*(_QWORD *)(v5 + 1152) + 328LL) )
{
v14 = *(unsigned __int8 ( **)(long long))(*(_QWORD *)(v5 + 1232) + 64LL);
if ( !v14 || !v14(a1) )
return (unsigned int)mthd_stmt_read_execute_response(a1);
}
v11 = 0;
}
}
if ( !*(_DWORD *)(a1 + 264) )
{
v12 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v12 + 144);
strncpy(a1 + 781, v12 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, *(_QWORD *)(a1 + 56) + 151LL, 512LL);
*(_BYTE *)(a1 + 779) = 0;
}
if ( !v11 )
{
v13 = *(_QWORD *)(a1 + 56);
do
{
(*(void ( **)(long long))(*(_QWORD *)(v13 + 1232) + 120LL))(a1);
v13 = *(_QWORD *)(a1 + 56);
}
while ( v13 && (*(_WORD *)(v13 + 896) & 0x1008) != 0 );
}
*(_DWORD *)(a1 + 80) = 0;
return v3;
}
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v8 = a1 + 268;
v9 = client_errors[14];
goto LABEL_9;
}
if ( !(unsigned int)mysql_stmt_prepare(a1, a2, a3) )
return mysql_stmt_execute(a1);
return v3;
}
| mariadb_stmt_execute_direct:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV EBX,0x1
TEST RDI,RDI
JZ 0x0012262d
MOV R14,RDI
MOV R15,qword ptr [RDI + 0x38]
TEST R15,R15
JZ 0x001225da
MOV R13,RDX
MOV R12,RSI
TEST byte ptr [R15 + 0x370],0x1
JNZ 0x0012259f
MOV RAX,qword ptr [R15 + 0x4f0]
TEST byte ptr [RAX + 0x70],0x4
JZ 0x0012259f
CMP byte ptr [R15 + 0x84],0x0
JZ 0x00122651
LAB_0012259f:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R13
CALL 0x00120f80
TEST EAX,EAX
JNZ 0x0012262d
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001228df
MOV RDI,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00121b51
LAB_001225da:
MOV dword ptr [R14 + 0x108],0x7dd
LEA RDI,[R14 + 0x30d]
LEA RAX,[0x148a60]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R15D,R15D
MOV byte ptr [R14 + 0x312],R15B
LEA RDI,[R14 + 0x10c]
LEA RAX,[0x148a70]
MOV RSI,qword ptr [RAX + 0x68]
LAB_0012261c:
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [R14 + 0x30b],R15B
LAB_0012262d:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001228df
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00122651:
MOV RDI,R15
MOV ESI,0x2
CALL 0x0011602d
TEST EAX,EAX
JZ 0x001226a9
MOV dword ptr [R14 + 0x108],0x7de
LEA RDI,[R14 + 0x30d]
LEA RAX,[0x148a60]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R15D,R15D
MOV byte ptr [R14 + 0x312],R15B
LEA RDI,[R14 + 0x10c]
LEA RAX,[0x148a70]
MOV RSI,qword ptr [RAX + 0x70]
JMP 0x0012261c
LAB_001226a9:
CMP R13,-0x1
JNZ 0x001226ba
MOV RDI,R12
CALL 0x001131c0
MOV R13,RAX
LAB_001226ba:
XOR EAX,EAX
MOV dword ptr [R14 + 0x108],EAX
MOV ECX,0x30303030
MOV dword ptr [R14 + 0x30d],ECX
MOV DX,0x30
MOV word ptr [R14 + 0x311],DX
MOV byte ptr [R14 + 0x10c],AL
MOV RSI,qword ptr [R14 + 0x38]
MOV dword ptr [RSI + 0x90],EAX
MOV RSI,qword ptr [R14 + 0x38]
MOV word ptr [RSI + 0x29b],DX
MOV dword ptr [RSI + 0x297],ECX
MOV RCX,qword ptr [R14 + 0x38]
MOV byte ptr [RCX + 0x97],AL
MOV RAX,qword ptr [R14 + 0x38]
MOV RAX,qword ptr [RAX + 0x2a0]
TEST RAX,RAX
JZ 0x0012271e
MOV dword ptr [RAX + 0x4],0x0
LAB_0012271e:
MOV RAX,-0x1
MOV qword ptr [R15 + 0x338],RAX
MOV qword ptr [R14 + 0xf8],RAX
CMP dword ptr [R14 + 0x50],0x0
JZ 0x001227a3
MOV RDI,R14
MOV ESI,0x1
CALL 0x0011fcd4
TEST AL,AL
JNZ 0x0012279e
MOV RDI,R14
MOV ESI,0x1
CALL 0x0011de3f
MOV RDI,qword ptr [R14 + 0x340]
XOR ESI,ESI
CALL 0x0011de3f
XOR EAX,EAX
MOV qword ptr [R14 + 0x60],RAX
MOV qword ptr [R14 + 0x70],RAX
MOV EAX,dword ptr [R14 + 0x40]
LEA RDX,[RBP + -0x34]
MOV dword ptr [RDX],EAX
MOV RAX,qword ptr [R15 + 0x4d0]
MOV ECX,0x4
MOV RDI,R15
MOV ESI,0x19
MOV R8D,0x1
MOV R9,R14
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JZ 0x001227a3
LAB_0012279e:
MOV R12B,0x1
JMP 0x00122817
LAB_001227a3:
MOV qword ptr [R14 + 0x40],-0x1
MOV RAX,qword ptr [R15 + 0x4d0]
MOV RDI,R15
MOV ESI,0x16
MOV RDX,R12
MOV RCX,R13
MOV R8D,0x1
MOV R9,R14
CALL qword ptr [RAX + 0x10]
MOV R12B,0x1
TEST EAX,EAX
JNZ 0x00122817
MOV dword ptr [R14 + 0x50],0x1
MOV qword ptr [R14 + 0x40],-0x1
MOV RDI,R14
CALL 0x00121b51
TEST EAX,EAX
JNZ 0x00122814
MOV RDI,R15
MOV ESI,0x4
CALL 0x0011602d
TEST EAX,EAX
JNZ 0x00122814
MOV RAX,qword ptr [R15 + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JZ 0x001228b3
LAB_00122814:
XOR R12D,R12D
LAB_00122817:
CMP dword ptr [R14 + 0x108],0x0
JNZ 0x00122878
LEA RDI,[R14 + 0x30d]
LEA R15,[R14 + 0x10c]
MOV RSI,qword ptr [R14 + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [R14 + 0x108],EAX
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113220
XOR R13D,R13D
MOV byte ptr [R14 + 0x312],R13B
MOV ESI,0x97
ADD RSI,qword ptr [R14 + 0x38]
MOV EDX,0x200
MOV RDI,R15
CALL 0x00113220
MOV byte ptr [R14 + 0x30b],R13B
LAB_00122878:
TEST R12B,R12B
JNZ 0x001228a6
MOV RAX,qword ptr [R14 + 0x38]
LAB_00122881:
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RDI,R14
CALL qword ptr [RAX + 0x78]
MOV RAX,qword ptr [R14 + 0x38]
TEST RAX,RAX
JZ 0x001228a6
MOVZX ECX,word ptr [RAX + 0x380]
TEST ECX,0x1008
JNZ 0x00122881
LAB_001228a6:
MOV dword ptr [R14 + 0x50],0x0
JMP 0x0012262d
LAB_001228b3:
MOV RAX,qword ptr [R15 + 0x4d0]
MOV RAX,qword ptr [RAX + 0x40]
TEST RAX,RAX
JZ 0x001228d0
MOV RDI,R14
CALL RAX
TEST AL,AL
JNZ 0x00122814
LAB_001228d0:
MOV RDI,R14
CALL 0x00121553
MOV EBX,EAX
JMP 0x0012262d
LAB_001228df:
CALL 0x00113500
|
ulong mariadb_stmt_execute_direct(long param_1,char *param_2,size_t param_3)
{
long lVar1;
code *pcVar2;
bool bVar3;
char cVar4;
int iVar5;
uint uVar6;
long lVar7;
ulong uVar8;
char *__src;
long in_FS_OFFSET;
int4 local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar8 = 1;
if (param_1 != 0) {
lVar7 = *(long *)(param_1 + 0x38);
if (lVar7 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_00148ad8;
LAB_0012261c:
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
}
else if ((((*(byte *)(lVar7 + 0x370) & 1) == 0) &&
((*(byte *)(*(long *)(lVar7 + 0x4f0) + 0x70) & 4) != 0)) &&
(*(char *)(lVar7 + 0x84) == '\0')) {
iVar5 = ma_multi_command(lVar7,2);
if (iVar5 != 0) {
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Commands_out_of_sync__you_can_t_r_00148ae0;
goto LAB_0012261c;
}
if (param_3 == 0xffffffffffffffff) {
param_3 = strlen(param_2);
}
*(int4 *)(param_1 + 0x108) = 0;
*(int4 *)(param_1 + 0x30d) = 0x30303030;
*(int2 *)(param_1 + 0x311) = 0x30;
*(int1 *)(param_1 + 0x10c) = 0;
*(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0;
lVar1 = *(long *)(param_1 + 0x38);
*(int2 *)(lVar1 + 0x29b) = 0x30;
*(int4 *)(lVar1 + 0x297) = 0x30303030;
*(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0;
lVar1 = *(long *)(*(long *)(param_1 + 0x38) + 0x2a0);
if (lVar1 != 0) {
*(int4 *)(lVar1 + 4) = 0;
}
*(int8 *)(lVar7 + 0x338) = 0xffffffffffffffff;
*(int8 *)(param_1 + 0xf8) = 0xffffffffffffffff;
if (*(int *)(param_1 + 0x50) == 0) {
LAB_001227a3:
*(int8 *)(param_1 + 0x40) = 0xffffffffffffffff;
iVar5 = (**(code **)(*(long *)(lVar7 + 0x4d0) + 0x10))(lVar7,0x16,param_2,param_3,1,param_1)
;
bVar3 = true;
if (iVar5 == 0) {
*(int4 *)(param_1 + 0x50) = 1;
*(int8 *)(param_1 + 0x40) = 0xffffffffffffffff;
iVar5 = mysql_stmt_execute(param_1);
if (iVar5 == 0) {
iVar5 = ma_multi_command(lVar7,4);
if ((iVar5 == 0) && (*(char *)(*(long *)(lVar7 + 0x480) + 0x148) == '\0')) {
pcVar2 = *(code **)(*(long *)(lVar7 + 0x4d0) + 0x40);
if (pcVar2 != (code *)0x0) {
cVar4 = (*pcVar2)(param_1);
if (cVar4 != '\0') goto LAB_00122814;
}
uVar6 = mthd_stmt_read_execute_response(param_1);
uVar8 = (ulong)uVar6;
goto LAB_0012262d;
}
}
LAB_00122814:
bVar3 = false;
}
}
else {
cVar4 = mysql_stmt_internal_reset(param_1,1);
if (cVar4 == '\0') {
ma_free_root(param_1,1);
ma_free_root(*(int8 *)(param_1 + 0x340),0);
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x70) = 0;
local_3c = *(int4 *)(param_1 + 0x40);
iVar5 = (**(code **)(*(long *)(lVar7 + 0x4d0) + 0x10))(lVar7,0x19,&local_3c,4,1,param_1);
if (iVar5 == 0) goto LAB_001227a3;
}
bVar3 = true;
}
if (*(int *)(param_1 + 0x108) == 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),(char *)(*(long *)(param_1 + 0x38) + 0x97),0x200);
*(int1 *)(param_1 + 0x30b) = 0;
}
if (!bVar3) {
lVar7 = *(long *)(param_1 + 0x38);
do {
(**(code **)(*(long *)(lVar7 + 0x4d0) + 0x78))(param_1);
lVar7 = *(long *)(param_1 + 0x38);
if (lVar7 == 0) break;
} while ((*(ushort *)(lVar7 + 0x380) & 0x1008) != 0);
}
*(int4 *)(param_1 + 0x50) = 0;
}
else {
iVar5 = mysql_stmt_prepare(param_1,param_2,param_3);
if (iVar5 == 0) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
uVar8 = mysql_stmt_execute(param_1);
return uVar8;
}
goto LAB_001228df;
}
}
}
LAB_0012262d:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar8;
}
LAB_001228df:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,777 | update_mutex_derived_flags() | eloqsql/storage/perfschema/pfs_instr.cc | void update_mutex_derived_flags()
{
global_mutex_container.apply_all(fct_update_mutex_derived_flags);
} | O3 | cpp | update_mutex_derived_flags():
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %cl
xorl %eax, %eax
leaq 0x39a0fe(%rip), %r15 # 0x3d2400
movl %ecx, -0x2c(%rbp)
leaq 0x35b054(%rip), %rcx # 0x393360
movq (%rcx,%rax,8), %r12
xorl %r13d, %r13d
movq 0xa8(%r12,%r13,8), %rax
testq %rax, %rax
je 0x3836c
movq 0x50(%rax), %r14
testq %r14, %r14
jle 0x3836c
movq 0x48(%rax), %rbx
shlq $0x7, %r14
addq %rbx, %r14
movq 0x18(%rbx), %rdi
callq 0x3ba6c
testq %rax, %rax
je 0x38364
cmpb $0x0, 0x4(%rax)
jne 0x3834c
xorl %ecx, %ecx
jmp 0x38350
movzbl (%r15), %ecx
movb %cl, 0x4(%rbx)
movb 0x5(%rax), %al
movb %al, 0x5(%rbx)
subq $-0x80, %rbx
cmpq %r14, %rbx
jb 0x38334
jmp 0x3836c
movb $0x0, 0x4(%rbx)
xorl %eax, %eax
jmp 0x38356
incq %r13
cmpq $0x400, %r13 # imm = 0x400
jne 0x38313
movl $0x1, %eax
testb $0x1, -0x2c(%rbp)
movl $0x0, %ecx
jne 0x38302
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z26update_mutex_derived_flagsv:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov cl, 1
xor eax, eax
lea r15, flag_global_instrumentation
loc_38302:
mov [rbp+var_2C], ecx
lea rcx, global_mutex_container
mov r12, [rcx+rax*8]
xor r13d, r13d
loc_38313:
mov rax, [r12+r13*8+0A8h]
test rax, rax
jz short loc_3836C
mov r14, [rax+50h]
test r14, r14
jle short loc_3836C
mov rbx, [rax+48h]
shl r14, 7
add r14, rbx
loc_38334:
mov rdi, [rbx+18h]
call _Z20sanitize_mutex_classP15PFS_mutex_class; sanitize_mutex_class(PFS_mutex_class *)
test rax, rax
jz short loc_38364
cmp byte ptr [rax+4], 0
jnz short loc_3834C
xor ecx, ecx
jmp short loc_38350
loc_3834C:
movzx ecx, byte ptr [r15]
loc_38350:
mov [rbx+4], cl
mov al, [rax+5]
loc_38356:
mov [rbx+5], al
sub rbx, 0FFFFFFFFFFFFFF80h
cmp rbx, r14
jb short loc_38334
jmp short loc_3836C
loc_38364:
mov byte ptr [rbx+4], 0
xor eax, eax
jmp short loc_38356
loc_3836C:
inc r13
cmp r13, 400h
jnz short loc_38313
mov eax, 1
test byte ptr [rbp+var_2C], 1
mov ecx, 0
jnz loc_38302
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long update_mutex_derived_flags(void)
{
char v0; // cl
long long result; // rax
long long v2; // r12
long long i; // r13
long long v4; // rax
long long v5; // r14
unsigned long long v6; // rbx
unsigned long long v7; // r14
long long v8; // rax
char v9; // cl
char v10; // al
char v11; // [rsp+0h] [rbp-2Ch]
v0 = 1;
result = 0LL;
do
{
v11 = v0;
v2 = global_mutex_container[result];
for ( i = 0LL; i != 1024; ++i )
{
v4 = *(_QWORD *)(v2 + 8 * i + 168);
if ( v4 )
{
v5 = *(_QWORD *)(v4 + 80);
if ( v5 > 0 )
{
v6 = *(_QWORD *)(v4 + 72);
v7 = v6 + (v5 << 7);
do
{
v8 = sanitize_mutex_class(*(_QWORD *)(v6 + 24));
if ( v8 )
{
if ( *(_BYTE *)(v8 + 4) )
v9 = flag_global_instrumentation[0];
else
v9 = 0;
*(_BYTE *)(v6 + 4) = v9;
v10 = *(_BYTE *)(v8 + 5);
}
else
{
*(_BYTE *)(v6 + 4) = 0;
v10 = 0;
}
*(_BYTE *)(v6 + 5) = v10;
v6 += 128LL;
}
while ( v6 < v7 );
}
}
}
result = 1LL;
v0 = 0;
}
while ( (v11 & 1) != 0 );
return result;
}
| update_mutex_derived_flags:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV CL,0x1
XOR EAX,EAX
LEA R15,[0x4d2400]
LAB_00138302:
MOV dword ptr [RBP + -0x2c],ECX
LEA RCX,[0x493360]
MOV R12,qword ptr [RCX + RAX*0x8]
XOR R13D,R13D
LAB_00138313:
MOV RAX,qword ptr [R12 + R13*0x8 + 0xa8]
TEST RAX,RAX
JZ 0x0013836c
MOV R14,qword ptr [RAX + 0x50]
TEST R14,R14
JLE 0x0013836c
MOV RBX,qword ptr [RAX + 0x48]
SHL R14,0x7
ADD R14,RBX
LAB_00138334:
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0013ba6c
TEST RAX,RAX
JZ 0x00138364
CMP byte ptr [RAX + 0x4],0x0
JNZ 0x0013834c
XOR ECX,ECX
JMP 0x00138350
LAB_0013834c:
MOVZX ECX,byte ptr [R15]
LAB_00138350:
MOV byte ptr [RBX + 0x4],CL
MOV AL,byte ptr [RAX + 0x5]
LAB_00138356:
MOV byte ptr [RBX + 0x5],AL
SUB RBX,-0x80
CMP RBX,R14
JC 0x00138334
JMP 0x0013836c
LAB_00138364:
MOV byte ptr [RBX + 0x4],0x0
XOR EAX,EAX
JMP 0x00138356
LAB_0013836c:
INC R13
CMP R13,0x400
JNZ 0x00138313
MOV EAX,0x1
TEST byte ptr [RBP + -0x2c],0x1
MOV ECX,0x0
JNZ 0x00138302
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* update_mutex_derived_flags() */
void update_mutex_derived_flags(void)
{
bool bVar1;
int1 uVar2;
long lVar3;
long lVar4;
bool bVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
lVar4 = 0;
bVar1 = true;
do {
bVar5 = bVar1;
lVar4 = (&global_mutex_container)[lVar4];
lVar7 = 0;
do {
lVar3 = *(long *)(lVar4 + 0xa8 + lVar7 * 8);
if ((lVar3 != 0) && (0 < *(long *)(lVar3 + 0x50))) {
uVar6 = *(ulong *)(lVar3 + 0x48);
uVar8 = *(long *)(lVar3 + 0x50) * 0x80 + uVar6;
do {
lVar3 = sanitize_mutex_class(*(PFS_mutex_class **)(uVar6 + 0x18));
if (lVar3 == 0) {
*(int1 *)(uVar6 + 4) = 0;
uVar2 = 0;
}
else {
uVar2 = flag_global_instrumentation;
if (*(char *)(lVar3 + 4) == '\0') {
uVar2 = 0;
}
*(int1 *)(uVar6 + 4) = uVar2;
uVar2 = *(int1 *)(lVar3 + 5);
}
*(int1 *)(uVar6 + 5) = uVar2;
uVar6 = uVar6 + 0x80;
} while (uVar6 < uVar8);
}
lVar7 = lVar7 + 1;
} while (lVar7 != 0x400);
lVar4 = 1;
bVar1 = false;
} while (bVar5);
return;
}
| |
40,778 | unpack_dirname | eloqsql/mysys/mf_pack.c | size_t unpack_dirname(char * to, const char *from)
{
size_t length, h_length;
char buff[FN_REFLEN+1+4],*suffix,*tilde_expansion;
DBUG_ENTER("unpack_dirname");
length= normalize_dirname(buff, from);
if (buff[0] == FN_HOMELIB)
{
suffix=buff+1; tilde_expansion=expand_tilde(&suffix);
if (tilde_expansion)
{
length-= (size_t) (suffix-buff)-1;
if (length+(h_length= strlen(tilde_expansion)) <= FN_REFLEN)
{
if ((h_length > 0) && (tilde_expansion[h_length-1] == FN_LIBCHAR))
h_length--;
if (buff+h_length < suffix)
bmove(buff+h_length,suffix,length);
else
bmove_upp((uchar*) buff+h_length+length, (uchar*) suffix+length, length);
bmove(buff,tilde_expansion,h_length);
}
}
}
#ifdef USE_SYMDIR
if (my_use_symdir)
symdirget(buff);
#endif
DBUG_RETURN(system_filename(to,buff)); /* Fix for open */
} | O0 | c | unpack_dirname:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp # imm = 0x250
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
callq 0x40480
movq %rax, -0x228(%rbp)
movsbl -0x210(%rbp), %eax
cmpl $0x7e, %eax
jne 0x40731
leaq -0x210(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x238(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x40780
movq %rax, -0x240(%rbp)
cmpq $0x0, -0x240(%rbp)
je 0x4072f
movq -0x238(%rbp), %rcx
leaq -0x210(%rbp), %rax
subq %rax, %rcx
subq $0x1, %rcx
movq -0x228(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x240(%rbp), %rdi
callq 0x25160
movq %rax, %rcx
movq -0x248(%rbp), %rax
movq %rcx, -0x230(%rbp)
addq %rcx, %rax
cmpq $0x200, %rax # imm = 0x200
ja 0x4072d
cmpq $0x0, -0x230(%rbp)
jbe 0x406aa
movq -0x240(%rbp), %rax
movq -0x230(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0x406aa
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
leaq -0x210(%rbp), %rax
addq -0x230(%rbp), %rax
cmpq -0x238(%rbp), %rax
jae 0x406e4
leaq -0x210(%rbp), %rdi
addq -0x230(%rbp), %rdi
movq -0x238(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x255c0
jmp 0x40713
leaq -0x210(%rbp), %rdi
addq -0x230(%rbp), %rdi
addq -0x228(%rbp), %rdi
movq -0x238(%rbp), %rsi
addq -0x228(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x43e90
leaq -0x210(%rbp), %rdi
movq -0x240(%rbp), %rsi
movq -0x230(%rbp), %rdx
callq 0x255c0
jmp 0x4072f
jmp 0x40731
jmp 0x40733
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x40840
movq %rax, -0x250(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4076f
movq -0x250(%rbp), %rax
addq $0x250, %rsp # imm = 0x250
popq %rbp
retq
callq 0x25380
nopw %cs:(%rax,%rax)
| unpack_dirname:
push rbp
mov rbp, rsp
sub rsp, 250h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
call normalize_dirname
mov [rbp+var_228], rax
movsx eax, [rbp+var_210]
cmp eax, 7Eh ; '~'
jnz loc_40731
lea rax, [rbp+var_210]
add rax, 1
mov [rbp+var_238], rax
lea rdi, [rbp+var_238]
call expand_tilde
mov [rbp+var_240], rax
cmp [rbp+var_240], 0
jz loc_4072F
mov rcx, [rbp+var_238]
lea rax, [rbp+var_210]
sub rcx, rax
sub rcx, 1
mov rax, [rbp+var_228]
sub rax, rcx
mov [rbp+var_228], rax
mov rax, [rbp+var_228]
mov [rbp+var_248], rax
mov rdi, [rbp+var_240]
call _strlen
mov rcx, rax
mov rax, [rbp+var_248]
mov [rbp+var_230], rcx
add rax, rcx
cmp rax, 200h
ja loc_4072D
cmp [rbp+var_230], 0
jbe short loc_406AA
mov rax, [rbp+var_240]
mov rcx, [rbp+var_230]
sub rcx, 1
movsx eax, byte ptr [rax+rcx]
cmp eax, 2Fh ; '/'
jnz short loc_406AA
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_406AA:
lea rax, [rbp+var_210]
add rax, [rbp+var_230]
cmp rax, [rbp+var_238]
jnb short loc_406E4
lea rdi, [rbp+var_210]
add rdi, [rbp+var_230]
mov rsi, [rbp+var_238]
mov rdx, [rbp+var_228]
call _memmove
jmp short loc_40713
loc_406E4:
lea rdi, [rbp+var_210]
add rdi, [rbp+var_230]
add rdi, [rbp+var_228]
mov rsi, [rbp+var_238]
add rsi, [rbp+var_228]
mov rdx, [rbp+var_228]
call bmove_upp
loc_40713:
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_240]
mov rdx, [rbp+var_230]
call _memmove
loc_4072D:
jmp short $+2
loc_4072F:
jmp short $+2
loc_40731:
jmp short $+2
loc_40733:
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call system_filename
mov [rbp+var_250], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4076F
mov rax, [rbp+var_250]
add rsp, 250h
pop rbp
retn
loc_4076F:
call ___stack_chk_fail
| long long unpack_dirname(long long a1, _BYTE *a2)
{
long long v3; // [rsp+8h] [rbp-248h]
long long v4; // [rsp+10h] [rbp-240h]
_BYTE *v5; // [rsp+18h] [rbp-238h] BYREF
long long v6; // [rsp+20h] [rbp-230h]
long long v7; // [rsp+28h] [rbp-228h]
_BYTE *v8; // [rsp+30h] [rbp-220h]
long long v9; // [rsp+38h] [rbp-218h]
char v10; // [rsp+40h] [rbp-210h] BYREF
_BYTE v11[527]; // [rsp+41h] [rbp-20Fh] BYREF
*(_QWORD *)&v11[519] = __readfsqword(0x28u);
v9 = a1;
v8 = a2;
v7 = normalize_dirname((long long)&v10, a2);
if ( v10 == 126 )
{
v5 = v11;
v4 = expand_tilde(&v5);
if ( v4 )
{
v7 -= v5 - &v10 - 1;
v3 = v7;
v6 = strlen(v4);
if ( (unsigned long long)(v6 + v3) <= 0x200 )
{
if ( v6 && *(_BYTE *)(v4 + v6 - 1) == 47 )
--v6;
if ( &v11[v6 - 1] >= v5 )
bmove_upp(&v11[v6 - 1 + v7], &v5[v7], v7);
else
memmove(&v11[v6 - 1], v5, v7);
memmove(&v10, v4, v6);
}
}
}
return system_filename(v9, &v10);
}
| unpack_dirname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x250
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
CALL 0x00140480
MOV qword ptr [RBP + -0x228],RAX
MOVSX EAX,byte ptr [RBP + -0x210]
CMP EAX,0x7e
JNZ 0x00140731
LEA RAX,[RBP + -0x210]
ADD RAX,0x1
MOV qword ptr [RBP + -0x238],RAX
LEA RDI,[RBP + -0x238]
CALL 0x00140780
MOV qword ptr [RBP + -0x240],RAX
CMP qword ptr [RBP + -0x240],0x0
JZ 0x0014072f
MOV RCX,qword ptr [RBP + -0x238]
LEA RAX,[RBP + -0x210]
SUB RCX,RAX
SUB RCX,0x1
MOV RAX,qword ptr [RBP + -0x228]
SUB RAX,RCX
MOV qword ptr [RBP + -0x228],RAX
MOV RAX,qword ptr [RBP + -0x228]
MOV qword ptr [RBP + -0x248],RAX
MOV RDI,qword ptr [RBP + -0x240]
CALL 0x00125160
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x248]
MOV qword ptr [RBP + -0x230],RCX
ADD RAX,RCX
CMP RAX,0x200
JA 0x0014072d
CMP qword ptr [RBP + -0x230],0x0
JBE 0x001406aa
MOV RAX,qword ptr [RBP + -0x240]
MOV RCX,qword ptr [RBP + -0x230]
SUB RCX,0x1
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x2f
JNZ 0x001406aa
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_001406aa:
LEA RAX,[RBP + -0x210]
ADD RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x238]
JNC 0x001406e4
LEA RDI,[RBP + -0x210]
ADD RDI,qword ptr [RBP + -0x230]
MOV RSI,qword ptr [RBP + -0x238]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x001255c0
JMP 0x00140713
LAB_001406e4:
LEA RDI,[RBP + -0x210]
ADD RDI,qword ptr [RBP + -0x230]
ADD RDI,qword ptr [RBP + -0x228]
MOV RSI,qword ptr [RBP + -0x238]
ADD RSI,qword ptr [RBP + -0x228]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x00143e90
LAB_00140713:
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x240]
MOV RDX,qword ptr [RBP + -0x230]
CALL 0x001255c0
LAB_0014072d:
JMP 0x0014072f
LAB_0014072f:
JMP 0x00140731
LAB_00140731:
JMP 0x00140733
LAB_00140733:
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x00140840
MOV qword ptr [RBP + -0x250],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014076f
MOV RAX,qword ptr [RBP + -0x250]
ADD RSP,0x250
POP RBP
RET
LAB_0014076f:
CALL 0x00125380
|
int8 unpack_dirname(int8 param_1,int8 param_2)
{
char *__s;
size_t sVar1;
int8 uVar2;
long in_FS_OFFSET;
char *local_240;
size_t local_238;
size_t local_230;
int8 local_228;
int8 local_220;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
local_230 = normalize_dirname(local_218,param_2);
if (local_218[0] == '~') {
local_240 = local_218 + 1;
__s = (char *)expand_tilde(&local_240);
if (__s != (char *)0x0) {
sVar1 = local_230 - (long)(local_240 + (-1 - (long)local_218));
local_230 = sVar1;
local_238 = strlen(__s);
if (sVar1 + local_238 < 0x201) {
if ((local_238 != 0) && (__s[local_238 - 1] == '/')) {
local_238 = local_238 - 1;
}
if (local_218 + local_238 < local_240) {
memmove(local_218 + local_238,local_240,local_230);
}
else {
bmove_upp(local_218 + local_230 + local_238,local_240 + local_230,local_230);
}
memmove(local_218,__s,local_238);
}
}
}
uVar2 = system_filename(local_220,local_218);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar2;
}
| |
40,779 | unpack_dirname | eloqsql/mysys/mf_pack.c | size_t unpack_dirname(char * to, const char *from)
{
size_t length, h_length;
char buff[FN_REFLEN+1+4],*suffix,*tilde_expansion;
DBUG_ENTER("unpack_dirname");
length= normalize_dirname(buff, from);
if (buff[0] == FN_HOMELIB)
{
suffix=buff+1; tilde_expansion=expand_tilde(&suffix);
if (tilde_expansion)
{
length-= (size_t) (suffix-buff)-1;
if (length+(h_length= strlen(tilde_expansion)) <= FN_REFLEN)
{
if ((h_length > 0) && (tilde_expansion[h_length-1] == FN_LIBCHAR))
h_length--;
if (buff+h_length < suffix)
bmove(buff+h_length,suffix,length);
else
bmove_upp((uchar*) buff+h_length+length, (uchar*) suffix+length, length);
bmove(buff,tilde_expansion,h_length);
}
}
}
#ifdef USE_SYMDIR
if (my_use_symdir)
symdirget(buff);
#endif
DBUG_RETURN(system_filename(to,buff)); /* Fix for open */
} | O3 | c | unpack_dirname:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rdi, -0x250(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x240(%rbp), %r13
movq %r13, %rdi
callq 0x35247
cmpb $0x7e, (%r13)
jne 0x35409
movq %rax, %r14
leaq -0x23f(%rbp), %r15
cmpb $0x2f, (%r15)
jne 0x35329
leaq 0x343d41(%rip), %rbx # 0x379068
jmp 0x35382
movq %r15, %rdi
movl $0x2f, %esi
callq 0x24130
movq %rax, %r12
testq %rax, %rax
jne 0x35349
movq %r15, %rdi
callq 0x6318c
movq %rax, %r12
movb (%r12), %al
movb %al, -0x241(%rbp)
movb $0x0, (%r12)
movq %r15, %rdi
callq 0x24270
movq %rax, %rbx
movb -0x241(%rbp), %al
movb %al, (%r12)
callq 0x24410
testq %rbx, %rbx
je 0x35409
addq $0x20, %rbx
movq %r12, %r15
movq (%rbx), %r12
testq %r12, %r12
je 0x35409
addq %r13, %r14
subq %r15, %r14
movq %r12, %rdi
callq 0x24170
movq %rax, %r13
addq %r14, %rax
incq %rax
cmpq $0x200, %rax # imm = 0x200
ja 0x35409
testq %r13, %r13
je 0x353be
xorl %eax, %eax
cmpb $0x2f, -0x1(%r12,%r13)
sete %al
subq %rax, %r13
jmp 0x353c1
xorl %r13d, %r13d
incq %r14
leaq -0x240(,%r13), %rdi
addq %rbp, %rdi
cmpq %r15, %rdi
jae 0x353e1
movq %r15, %rsi
movq %r14, %rdx
callq 0x24610
jmp 0x353f2
addq %r14, %rdi
addq %r14, %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0x36cb8
leaq -0x240(%rbp), %rdi
movl $0x205, %ecx # imm = 0x205
movq %r12, %rsi
movq %r13, %rdx
callq 0x24280
leaq -0x240(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
movq -0x250(%rbp), %rbx
movq %rbx, %rdi
callq 0x631d4
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x35448
subq %rbx, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x243e0
| unpack_dirname:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov [rbp+var_250], rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r13, [rbp+var_240]
mov rdi, r13
call normalize_dirname
cmp byte ptr [r13+0], 7Eh ; '~'
jnz loc_35409
mov r14, rax
lea r15, [rbp+var_23F]
cmp byte ptr [r15], 2Fh ; '/'
jnz short loc_35329
lea rbx, home_dir
jmp short loc_35382
loc_35329:
mov rdi, r15
mov esi, 2Fh ; '/'
call _strchr
mov r12, rax
test rax, rax
jnz short loc_35349
mov rdi, r15
call strend
mov r12, rax
loc_35349:
mov al, [r12]
mov [rbp+var_241], al
mov byte ptr [r12], 0
mov rdi, r15
call _getpwnam
mov rbx, rax
mov al, [rbp+var_241]
mov [r12], al
call _endpwent
test rbx, rbx
jz loc_35409
add rbx, 20h ; ' '
mov r15, r12
loc_35382:
mov r12, [rbx]
test r12, r12
jz short loc_35409
add r14, r13
sub r14, r15
mov rdi, r12
call _strlen
mov r13, rax
add rax, r14
inc rax
cmp rax, 200h
ja short loc_35409
test r13, r13
jz short loc_353BE
xor eax, eax
cmp byte ptr [r12+r13-1], 2Fh ; '/'
setz al
sub r13, rax
jmp short loc_353C1
loc_353BE:
xor r13d, r13d
loc_353C1:
inc r14
lea rdi, ds:0FFFFFFFFFFFFFDC0h[r13]
add rdi, rbp
cmp rdi, r15
jnb short loc_353E1
mov rsi, r15
mov rdx, r14
call _memmove
jmp short loc_353F2
loc_353E1:
add rdi, r14
add r15, r14
mov rsi, r15
mov rdx, r14
call bmove_upp
loc_353F2:
lea rdi, [rbp+var_240]
mov ecx, 205h
mov rsi, r12
mov rdx, r13
call ___memmove_chk
loc_35409:
lea rsi, [rbp+var_240]
mov edx, 1FFh
mov rbx, [rbp+var_250]
mov rdi, rbx
call strmake
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_35448
sub rax, rbx
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_35448:
call ___stack_chk_fail
| long long unpack_dirname(long long a1, _BYTE *a2)
{
long long v2; // rax
long long v3; // rdx
long long v4; // rcx
long long v5; // r14
char *v6; // r15
_QWORD *v7; // rbx
char *v8; // r12
long long v9; // rbx
long long v10; // r12
_BYTE *v11; // r14
long long v12; // r13
long long v13; // r13
_BYTE *v14; // r14
char *v15; // rdi
char v18; // [rsp+Fh] [rbp-241h]
char v19; // [rsp+10h] [rbp-240h] BYREF
_BYTE v20[527]; // [rsp+11h] [rbp-23Fh] BYREF
unsigned long long v21; // [rsp+220h] [rbp-30h]
long long savedregs; // [rsp+250h] [rbp+0h] BYREF
v21 = __readfsqword(0x28u);
v2 = normalize_dirname((long long)&v19, a2);
if ( v19 != 126 )
return strmake(a1, &v19, 511LL) - a1;
v5 = v2;
v6 = v20;
if ( v20[0] == 47 )
{
v7 = &home_dir;
LABEL_8:
v10 = *v7;
if ( *v7 )
{
v11 = (_BYTE *)(&v20[v5 - 1] - v6);
v12 = strlen(*v7);
if ( (unsigned long long)&v11[v12 + 1] <= 0x200 )
{
if ( v12 )
v13 = v12 - (*(_BYTE *)(v10 + v12 - 1) == 47);
else
v13 = 0LL;
v14 = v11 + 1;
v15 = (char *)&savedregs + v13 - 576;
if ( v15 >= v6 )
bmove_upp(&v15[(_QWORD)v14], &v6[(_QWORD)v14], v14);
else
memmove(v15, v6, v14);
__memmove_chk(&v19, v10, v13, 517LL);
}
}
return strmake(a1, &v19, 511LL) - a1;
}
v8 = (char *)strchr(v20, 47LL, v3, v4);
if ( !v8 )
v8 = (char *)strend(v20);
v18 = *v8;
*v8 = 0;
v9 = getpwnam(v20);
*v8 = v18;
endpwent();
if ( v9 )
{
v7 = (_QWORD *)(v9 + 32);
v6 = v8;
goto LABEL_8;
}
return strmake(a1, &v19, 511LL) - a1;
}
| unpack_dirname:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV qword ptr [RBP + -0x250],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R13,[RBP + -0x240]
MOV RDI,R13
CALL 0x00135247
CMP byte ptr [R13],0x7e
JNZ 0x00135409
MOV R14,RAX
LEA R15,[RBP + -0x23f]
CMP byte ptr [R15],0x2f
JNZ 0x00135329
LEA RBX,[0x479068]
JMP 0x00135382
LAB_00135329:
MOV RDI,R15
MOV ESI,0x2f
CALL 0x00124130
MOV R12,RAX
TEST RAX,RAX
JNZ 0x00135349
MOV RDI,R15
CALL 0x0016318c
MOV R12,RAX
LAB_00135349:
MOV AL,byte ptr [R12]
MOV byte ptr [RBP + -0x241],AL
MOV byte ptr [R12],0x0
MOV RDI,R15
CALL 0x00124270
MOV RBX,RAX
MOV AL,byte ptr [RBP + -0x241]
MOV byte ptr [R12],AL
CALL 0x00124410
TEST RBX,RBX
JZ 0x00135409
ADD RBX,0x20
MOV R15,R12
LAB_00135382:
MOV R12,qword ptr [RBX]
TEST R12,R12
JZ 0x00135409
ADD R14,R13
SUB R14,R15
MOV RDI,R12
CALL 0x00124170
MOV R13,RAX
ADD RAX,R14
INC RAX
CMP RAX,0x200
JA 0x00135409
TEST R13,R13
JZ 0x001353be
XOR EAX,EAX
CMP byte ptr [R12 + R13*0x1 + -0x1],0x2f
SETZ AL
SUB R13,RAX
JMP 0x001353c1
LAB_001353be:
XOR R13D,R13D
LAB_001353c1:
INC R14
LEA RDI,[-0x240 + R13*0x1]
ADD RDI,RBP
CMP RDI,R15
JNC 0x001353e1
MOV RSI,R15
MOV RDX,R14
CALL 0x00124610
JMP 0x001353f2
LAB_001353e1:
ADD RDI,R14
ADD R15,R14
MOV RSI,R15
MOV RDX,R14
CALL 0x00136cb8
LAB_001353f2:
LEA RDI,[RBP + -0x240]
MOV ECX,0x205
MOV RSI,R12
MOV RDX,R13
CALL 0x00124280
LAB_00135409:
LEA RSI,[RBP + -0x240]
MOV EDX,0x1ff
MOV RBX,qword ptr [RBP + -0x250]
MOV RDI,RBX
CALL 0x001631d4
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00135448
SUB RAX,RBX
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00135448:
CALL 0x001243e0
|
long unpack_dirname(long param_1)
{
char *pcVar1;
long lVar2;
char *__src;
passwd *ppVar3;
size_t sVar4;
char **ppcVar5;
char *__dest;
long lVar6;
char *__n;
long in_FS_OFFSET;
char acStack_48f [559];
code *pcStack_260;
long local_258;
char local_249;
char local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcStack_260 = (code *)0x135305;
local_258 = param_1;
lVar2 = normalize_dirname(local_248);
if (local_248[0] == '~') {
pcVar1 = local_248 + 1;
if (local_248[1] == '/') {
ppcVar5 = (char **)&home_dir;
__src = pcVar1;
}
else {
pcStack_260 = (code *)0x135336;
__src = strchr(pcVar1,0x2f);
if (__src == (char *)0x0) {
pcStack_260 = (code *)0x135346;
__src = (char *)strend(pcVar1);
}
local_249 = *__src;
*__src = '\0';
pcStack_260 = (code *)0x135360;
ppVar3 = getpwnam(pcVar1);
*__src = local_249;
pcStack_260 = (code *)0x135372;
endpwent();
if (ppVar3 == (passwd *)0x0) goto LAB_00135409;
ppcVar5 = &ppVar3->pw_dir;
}
pcVar1 = *ppcVar5;
if (pcVar1 != (char *)0x0) {
pcStack_260 = (code *)0x135398;
sVar4 = strlen(pcVar1);
if (local_248 + sVar4 + (lVar2 - (long)__src) + 1 < (char *)0x201) {
if (sVar4 == 0) {
lVar6 = 0;
}
else {
lVar6 = sVar4 - (pcVar1[sVar4 - 1] == '/');
}
__n = local_248 + (lVar2 - (long)__src) + 1;
__dest = local_248 + lVar6;
if (__dest < __src) {
pcStack_260 = (code *)0x1353df;
memmove(__dest,__src,(size_t)__n);
}
else {
pcStack_260 = (code *)0x1353f2;
bmove_upp(__dest + (long)__n,__src + (long)__n,__n);
}
pcStack_260 = (code *)0x135409;
__memmove_chk(local_248,pcVar1,lVar6,0x205);
}
}
}
LAB_00135409:
lVar2 = local_258;
pcStack_260 = (code *)0x135424;
lVar6 = strmake(local_258,local_248,0x1ff);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return lVar6 - lVar2;
}
/* WARNING: Subroutine does not return */
pcStack_260 = system_filename;
__stack_chk_fail();
}
| |
40,780 | ExampleGuardedVector<int>::shrink_to_fit() | BadAccessGuards/examples/GuardedVectorExample.h | void shrink_to_fit()
{
BA_GUARD_WRITE(BAShadow);
super::shrink_to_fit();
} | O3 | c | ExampleGuardedVector<int>::shrink_to_fit():
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testb $0x3, %dil
jne 0x30f2
movq %rbp, %r14
andq $-0x4, %r14
leaq 0x1(%r14), %rax
movq %rax, 0x18(%rbx)
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
je 0x30db
movq %rbx, %rdi
callq 0x3112
movq 0x18(%rbx), %rdi
movl %edi, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x30fe
movq %r14, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %esi
callq 0x2c8a
jmp 0x30ba
movl $0x1, %esi
callq 0x2c8a
jmp 0x30e9
movq %rax, %rdi
callq 0x2c7f
| _ZN20ExampleGuardedVectorIiE13shrink_to_fitEv:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi+18h]
test dil, 3
jnz short loc_30F2
loc_30BA:
mov r14, rbp
and r14, 0FFFFFFFFFFFFFFFCh
lea rax, [r14+1]
mov [rbx+18h], rax
mov rax, [rbx+10h]
cmp rax, [rbx+8]
jz short loc_30DB
mov rdi, rbx
call _ZNSt19__shrink_to_fit_auxISt6vectorIiSaIiEELb1EE8_S_do_itERS2_; std::__shrink_to_fit_aux<std::vector<int>,true>::_S_do_it(std::vector<int>&)
loc_30DB:
mov rdi, [rbx+18h]
mov eax, edi
and eax, 3
cmp eax, 1
jnz short loc_30FE
loc_30E9:
mov [rbx+18h], r14
pop rbx
pop r14
pop rbp
retn
loc_30F2:
mov esi, 1
call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState)
jmp short loc_30BA
loc_30FE:
mov esi, 1
call _Z22BAGuardHandleBadAccessm19BadAccessGuardState; BAGuardHandleBadAccess(ulong,BadAccessGuardState)
jmp short loc_30E9
mov rdi, rax
call __clang_call_terminate
| long long ExampleGuardedVector<int>::shrink_to_fit(_QWORD *a1)
{
long long v2; // rdi
long long result; // rax
long long savedregs; // [rsp+10h] [rbp+0h] BYREF
v2 = a1[3];
if ( (v2 & 3) != 0 )
BAGuardHandleBadAccess(v2, 1LL);
a1[3] = (char *)&savedregs + 1;
if ( a1[2] != a1[1] )
std::__shrink_to_fit_aux<std::vector<int>,true>::_S_do_it(a1);
result = a1[3] & 3LL;
if ( (_DWORD)result != 1 )
result = BAGuardHandleBadAccess(a1[3], 1LL);
a1[3] = &savedregs;
return result;
}
| shrink_to_fit:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
TEST DIL,0x3
JNZ 0x001030f2
LAB_001030ba:
MOV R14,RBP
AND R14,-0x4
LEA RAX,[R14 + 0x1]
MOV qword ptr [RBX + 0x18],RAX
MOV RAX,qword ptr [RBX + 0x10]
CMP RAX,qword ptr [RBX + 0x8]
JZ 0x001030db
MOV RDI,RBX
CALL 0x00103112
LAB_001030db:
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,EDI
AND EAX,0x3
CMP EAX,0x1
JNZ 0x001030fe
LAB_001030e9:
MOV qword ptr [RBX + 0x18],R14
POP RBX
POP R14
POP RBP
RET
LAB_001030f2:
MOV ESI,0x1
CALL 0x00102c8a
JMP 0x001030ba
LAB_001030fe:
MOV ESI,0x1
CALL 0x00102c8a
JMP 0x001030e9
|
/* ExampleGuardedVector<int>::shrink_to_fit() */
void __thiscall ExampleGuardedVector<int>::shrink_to_fit(ExampleGuardedVector<int> *this)
{
if ((*(ulong *)(this + 0x18) & 3) != 0) {
BAGuardHandleBadAccess(*(ulong *)(this + 0x18),1);
}
*(int1 **)(this + 0x18) = &stack0xfffffffffffffff9;
if (*(long *)(this + 0x10) != *(long *)(this + 8)) {
std::__shrink_to_fit_aux<std::vector<int,std::allocator<int>>,true>::_S_do_it((vector *)this);
}
if (((uint)*(int8 *)(this + 0x18) & 3) != 1) {
/* try { // try from 001030fe to 00103107 has its CatchHandler @ 0010310a */
BAGuardHandleBadAccess(*(int8 *)(this + 0x18),1);
}
*(int1 **)(this + 0x18) = &stack0xfffffffffffffff8;
return;
}
| |
40,781 | mysql_find_charset_nr | eloqsql/libmariadb/libmariadb/ma_charset.c | const MARIADB_CHARSET_INFO * mysql_find_charset_nr(unsigned int charsetnr)
{
const MARIADB_CHARSET_INFO * c = mariadb_compiled_charsets;
if (my_collation_id_is_uca1400(charsetnr))
charsetnr= my_uca1400_collation_id_uca400_compat(charsetnr);
do {
if (c->nr == charsetnr) {
return(c);
}
++c;
} while (c[0].nr != 0);
return(NULL);
} | O0 | c | mysql_find_charset_nr:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
leaq 0x1c016e(%rip), %rax # 0x235b60
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %edi
callq 0x75a50
cmpb $0x0, %al
je 0x75a0d
movl -0xc(%rbp), %edi
callq 0x75a80
movl %eax, -0xc(%rbp)
jmp 0x75a0f
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x75a24
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x75a41
movq -0x18(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x75a0f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mysql_find_charset_nr:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
lea rax, mariadb_compiled_charsets
mov [rbp+var_18], rax
mov edi, [rbp+var_C]
call my_collation_id_is_uca1400
cmp al, 0
jz short loc_75A0D
mov edi, [rbp+var_C]
call my_uca1400_collation_id_uca400_compat
mov [rbp+var_C], eax
loc_75A0D:
jmp short $+2
loc_75A0F:
mov rax, [rbp+var_18]
mov eax, [rax]
cmp eax, [rbp+var_C]
jnz short loc_75A24
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_75A41
loc_75A24:
mov rax, [rbp+var_18]
add rax, 48h ; 'H'
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jnz short loc_75A0F
mov [rbp+var_8], 0
loc_75A41:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_find_charset_nr(unsigned int a1)
{
_DWORD *v2; // [rsp+8h] [rbp-18h]
unsigned int v3; // [rsp+14h] [rbp-Ch]
v3 = a1;
v2 = &mariadb_compiled_charsets;
if ( (unsigned __int8)my_collation_id_is_uca1400(a1) )
v3 = my_uca1400_collation_id_uca400_compat(a1);
do
{
if ( *v2 == v3 )
return v2;
v2 += 18;
}
while ( *v2 );
return 0LL;
}
| mysql_find_charset_nr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
LEA RAX,[0x335b60]
MOV qword ptr [RBP + -0x18],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00175a50
CMP AL,0x0
JZ 0x00175a0d
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00175a80
MOV dword ptr [RBP + -0xc],EAX
LAB_00175a0d:
JMP 0x00175a0f
LAB_00175a0f:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x00175a24
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00175a41
LAB_00175a24:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x48
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JNZ 0x00175a0f
MOV qword ptr [RBP + -0x8],0x0
LAB_00175a41:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * mysql_find_charset_nr(int param_1)
{
char cVar1;
int *local_20;
int local_14;
local_20 = &mariadb_compiled_charsets;
cVar1 = my_collation_id_is_uca1400(param_1);
local_14 = param_1;
if (cVar1 != '\0') {
local_14 = my_uca1400_collation_id_uca400_compat(param_1);
}
do {
if (*local_20 == local_14) {
return local_20;
}
local_20 = local_20 + 0x12;
} while (*local_20 != 0);
return (int *)0x0;
}
| |
40,782 | my_mb_wc_utf16_quick | eloqsql/strings/ctype-utf16.h | static inline int
my_mb_wc_utf16_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/*
High bytes: 0xD[89AB] = B'110110??'
Low bytes: 0xD[CDEF] = B'110111??'
Surrogate mask: 0xFC = B'11111100'
*/
if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */
return MY_CS_ILSEQ;
*pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]);
return 4;
}
if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */
return MY_CS_ILSEQ;
*pwc= MY_UTF16_WC2(s[0], s[1]);
return 2;
} | O0 | c | my_mb_wc_utf16_quick:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x20(%rbp), %rax
jbe 0x5aa2a
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x5ab08
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xfc, %eax
cmpl $0xd8, %eax
jne 0x5aac7
movq -0x18(%rbp), %rax
addq $0x4, %rax
cmpq -0x20(%rbp), %rax
jbe 0x5aa5b
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x5ab08
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0xfc, %eax
cmpl $0xdc, %eax
je 0x5aa7b
movl $0x0, -0x4(%rbp)
jmp 0x5ab08
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0x3, %eax
shll $0x12, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0xa, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
andl $0x3, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
addl %ecx, %eax
addl $0x10000, %eax # imm = 0x10000
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x5ab08
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xfc, %eax
cmpl $0xdc, %eax
jne 0x5aae3
movl $0x0, -0x4(%rbp)
jmp 0x5ab08
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| my_mb_wc_utf16_quick:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_20]
jbe short loc_5AA2A
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_5AB08
loc_5AA2A:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
and eax, 0FCh
cmp eax, 0D8h
jnz loc_5AAC7
mov rax, [rbp+var_18]
add rax, 4
cmp rax, [rbp+var_20]
jbe short loc_5AA5B
mov [rbp+var_4], 0FFFFFF98h
jmp loc_5AB08
loc_5AA5B:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
and eax, 0FCh
cmp eax, 0DCh
jz short loc_5AA7B
mov [rbp+var_4], 0
jmp loc_5AB08
loc_5AA7B:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
and eax, 3
shl eax, 12h
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 0Ah
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
and ecx, 3
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
add eax, ecx
add eax, 10000h
movsxd rcx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_5AB08
loc_5AAC7:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
and eax, 0FCh
cmp eax, 0DCh
jnz short loc_5AAE3
mov [rbp+var_4], 0
jmp short loc_5AB08
loc_5AAE3:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
shl eax, 8
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 2
loc_5AB08:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf16_quick(_QWORD *a1, unsigned __int8 *a2, unsigned long long a3)
{
if ( (unsigned long long)(a2 + 2) <= a3 )
{
if ( (*a2 & 0xFC) == 0xD8 )
{
if ( (unsigned long long)(a2 + 4) <= a3 )
{
if ( (a2[2] & 0xFC) == 0xDC )
{
*a1 = a2[3] + ((a2[2] & 3) << 8) + (a2[1] << 10) + ((*a2 & 3) << 18) + 0x10000;
return 4;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-104;
}
}
else if ( (*a2 & 0xFC) == 0xDC )
{
return 0;
}
else
{
*a1 = a2[1] + (*a2 << 8);
return 2;
}
}
else
{
return (unsigned int)-102;
}
}
| my_mb_wc_utf16_quick:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0015aa2a
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0015ab08
LAB_0015aa2a:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xfc
CMP EAX,0xd8
JNZ 0x0015aac7
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0015aa5b
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x0015ab08
LAB_0015aa5b:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
AND EAX,0xfc
CMP EAX,0xdc
JZ 0x0015aa7b
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015ab08
LAB_0015aa7b:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x3
SHL EAX,0x12
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0xa
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
AND ECX,0x3
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
ADD EAX,ECX
ADD EAX,0x10000
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x0015ab08
LAB_0015aac7:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xfc
CMP EAX,0xdc
JNZ 0x0015aae3
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015ab08
LAB_0015aae3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
LAB_0015ab08:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf16_quick(long *param_1,byte *param_2,byte *param_3)
{
int4 local_c;
if (param_3 < param_2 + 2) {
local_c = 0xffffff9a;
}
else if ((*param_2 & 0xfc) == 0xd8) {
if (param_3 < param_2 + 4) {
local_c = 0xffffff98;
}
else if ((param_2[2] & 0xfc) == 0xdc) {
*param_1 = (long)(int)((*param_2 & 3) * 0x40000 + (uint)param_2[1] * 0x400 +
(param_2[2] & 3) * 0x100 + (uint)param_2[3] + 0x10000);
local_c = 4;
}
else {
local_c = 0;
}
}
else if ((*param_2 & 0xfc) == 0xdc) {
local_c = 0;
}
else {
*param_1 = (long)(int)((uint)*param_2 * 0x100 + (uint)param_2[1]);
local_c = 2;
}
return local_c;
}
| |
40,783 | google::protobuf::UninterpretedOption::ByteSizeLong() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | size_t UninterpretedOption::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
total_size += 1UL * this->_internal_name_size();
for (const auto& msg : this->_impl_.name_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional string identifier_value = 3;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_identifier_value());
}
// optional bytes string_value = 7;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->_internal_string_value());
}
// optional string aggregate_value = 8;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_aggregate_value());
}
// optional uint64 positive_int_value = 4;
if (cached_has_bits & 0x00000008u) {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_positive_int_value());
}
// optional int64 negative_int_value = 5;
if (cached_has_bits & 0x00000010u) {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_negative_int_value());
}
// optional double double_value = 6;
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 8;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
} | O0 | cpp | google::protobuf::UninterpretedOption::ByteSizeLong() const:
subq $0x58, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
callq 0x296f60
movl %eax, %ecx
movq 0x8(%rsp), %rax
movslq %ecx, %rcx
shlq $0x0, %rcx
addq 0x38(%rsp), %rcx
movq %rcx, 0x38(%rsp)
addq $0x10, %rax
addq $0x8, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2e4f40
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2e4f80
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2e4fe0
testb $0x1, %al
jne 0x2d3df1
jmp 0x2d3e20
leaq 0x20(%rsp), %rdi
callq 0x2e5000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2e5020
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2e5040
jmp 0x2d3ddc
movq 0x8(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
movq 0x50(%rsp), %rax
movslq 0x4c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
andl $0x3f, %eax
cmpl $0x0, %eax
je 0x2d3f47
movl 0x34(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2d3e83
movq 0x8(%rsp), %rdi
callq 0x2973e0
movq %rax, %rdi
callq 0x1587c0
addq $0x1, %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x34(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2d3eaf
movq 0x8(%rsp), %rdi
callq 0x297450
movq %rax, %rdi
callq 0x20adf0
addq $0x1, %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x34(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2d3edb
movq 0x8(%rsp), %rdi
callq 0x297780
movq %rax, %rdi
callq 0x1587c0
addq $0x1, %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x34(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x2d3f03
movq 0x8(%rsp), %rdi
callq 0x2972f0
movq %rax, %rdi
callq 0x164fe0
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x34(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x2d3f2b
movq 0x8(%rsp), %rdi
callq 0x297340
movq %rax, %rdi
callq 0x212e60
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x34(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x2d3f45
movq 0x38(%rsp), %rax
addq $0x9, %rax
movq %rax, 0x38(%rsp)
jmp 0x2d3f47
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rdi, %rdx
addq $0x10, %rdx
addq $0x4, %rdx
callq 0x1dbd10
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK6google8protobuf19UninterpretedOption12ByteSizeLongEv:
sub rsp, 58h
mov [rsp+58h+var_18], rdi
mov rdi, [rsp+58h+var_18]; this
mov [rsp+58h+var_50], rdi
mov [rsp+58h+var_20], 0
mov [rsp+58h+var_24], 0
call _ZNK6google8protobuf19UninterpretedOption19_internal_name_sizeEv; google::protobuf::UninterpretedOption::_internal_name_size(void)
mov ecx, eax
mov rax, [rsp+58h+var_50]
movsxd rcx, ecx
shl rcx, 0
add rcx, [rsp+58h+var_20]
mov [rsp+58h+var_20], rcx
add rax, 10h
add rax, 8
mov [rsp+58h+var_30], rax
mov rdi, [rsp+58h+var_30]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_28UninterpretedOption_NamePartEE5beginEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption_NamePart>::begin(void)
mov [rsp+58h+var_38], rax
mov rdi, [rsp+58h+var_30]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_28UninterpretedOption_NamePartEE3endEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption_NamePart>::end(void)
mov [rsp+58h+var_40], rax
loc_2D3DDC:
lea rdi, [rsp+58h+var_38]
lea rsi, [rsp+58h+var_40]; __int64
call _ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_28UninterpretedOption_NamePartEEES7_; google::protobuf::internal::operator!=(google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_NamePart const> const&,google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_NamePart const> const&)
test al, 1
jnz short loc_2D3DF1
jmp short loc_2D3E20
loc_2D3DF1:
lea rdi, [rsp+58h+var_38]
call _ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_28UninterpretedOption_NamePartEEdeEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_NamePart const>::operator*(void)
mov [rsp+58h+var_48], rax
mov rdi, [rsp+58h+var_48]
call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_28UninterpretedOption_NamePartEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::UninterpretedOption_NamePart>(google::protobuf::UninterpretedOption_NamePart const&)
add rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
lea rdi, [rsp+58h+var_38]
call _ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_28UninterpretedOption_NamePartEEppEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_NamePart const>::operator++(void)
jmp short loc_2D3DDC
loc_2D3E20:
mov rax, [rsp+58h+var_50]
add rax, 10h
mov [rsp+58h+var_8], rax
mov [rsp+58h+var_C], 0
mov rax, [rsp+58h+var_8]
movsxd rcx, [rsp+58h+var_C]
mov eax, [rax+rcx*4]
mov [rsp+58h+var_24], eax
mov eax, [rsp+58h+var_24]
and eax, 3Fh
cmp eax, 0
jz loc_2D3F47
mov eax, [rsp+58h+var_24]
and eax, 1
cmp eax, 0
jz short loc_2D3E83
mov rdi, [rsp+58h+var_50]
call _ZNK6google8protobuf19UninterpretedOption26_internal_identifier_valueB5cxx11Ev; google::protobuf::UninterpretedOption::_internal_identifier_value(void)
mov rdi, rax
call _ZN6google8protobuf8internal14WireFormatLite10StringSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::WireFormatLite::StringSize(std::string const&)
add rax, 1
add rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
loc_2D3E83:
mov eax, [rsp+58h+var_24]
and eax, 2
cmp eax, 0
jz short loc_2D3EAF
mov rdi, [rsp+58h+var_50]
call _ZNK6google8protobuf19UninterpretedOption22_internal_string_valueB5cxx11Ev; google::protobuf::UninterpretedOption::_internal_string_value(void)
mov rdi, rax
call _ZN6google8protobuf8internal14WireFormatLite9BytesSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::WireFormatLite::BytesSize(std::string const&)
add rax, 1
add rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
loc_2D3EAF:
mov eax, [rsp+58h+var_24]
and eax, 4
cmp eax, 0
jz short loc_2D3EDB
mov rdi, [rsp+58h+var_50]
call _ZNK6google8protobuf19UninterpretedOption25_internal_aggregate_valueB5cxx11Ev; google::protobuf::UninterpretedOption::_internal_aggregate_value(void)
mov rdi, rax
call _ZN6google8protobuf8internal14WireFormatLite10StringSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::WireFormatLite::StringSize(std::string const&)
add rax, 1
add rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
loc_2D3EDB:
mov eax, [rsp+58h+var_24]
and eax, 8
cmp eax, 0
jz short loc_2D3F03
mov rdi, [rsp+58h+var_50]; this
call _ZNK6google8protobuf19UninterpretedOption28_internal_positive_int_valueEv; google::protobuf::UninterpretedOption::_internal_positive_int_value(void)
mov rdi, rax; this
call _ZN6google8protobuf8internal14WireFormatLite17UInt64SizePlusOneEm; google::protobuf::internal::WireFormatLite::UInt64SizePlusOne(ulong)
add rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
loc_2D3F03:
mov eax, [rsp+58h+var_24]
and eax, 10h
cmp eax, 0
jz short loc_2D3F2B
mov rdi, [rsp+58h+var_50]; this
call _ZNK6google8protobuf19UninterpretedOption28_internal_negative_int_valueEv; google::protobuf::UninterpretedOption::_internal_negative_int_value(void)
mov rdi, rax; this
call _ZN6google8protobuf8internal14WireFormatLite16Int64SizePlusOneEl; google::protobuf::internal::WireFormatLite::Int64SizePlusOne(long)
add rax, [rsp+58h+var_20]
mov [rsp+58h+var_20], rax
loc_2D3F2B:
mov eax, [rsp+58h+var_24]
and eax, 20h
cmp eax, 0
jz short loc_2D3F45
mov rax, [rsp+58h+var_20]
add rax, 9
mov [rsp+58h+var_20], rax
loc_2D3F45:
jmp short $+2
loc_2D3F47:
mov rdi, [rsp+58h+var_50]; this
mov rsi, [rsp+58h+var_20]; unsigned __int64
mov rdx, rdi
add rdx, 10h
add rdx, 4; google::protobuf::internal::CachedSize *
call _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *)
add rsp, 58h
retn
| google::protobuf::internal * google::protobuf::UninterpretedOption::ByteSizeLong(
google::protobuf::UninterpretedOption *this)
{
long long v1; // rax
unsigned long long v2; // rax
long long v3; // rax
unsigned long long v4; // rax
long long v5; // rax
unsigned long long v6; // rax
long long v7; // rax
google::protobuf::internal::WireFormatLite *v8; // rax
long long v9; // rax
google::protobuf::internal::WireFormatLite *v10; // rax
long long v11; // rax
long long v13; // [rsp+10h] [rbp-48h]
unsigned long long v14; // [rsp+18h] [rbp-40h] BYREF
_QWORD v15[2]; // [rsp+20h] [rbp-38h] BYREF
int v16; // [rsp+34h] [rbp-24h]
unsigned long long v17; // [rsp+38h] [rbp-20h]
google::protobuf::UninterpretedOption *v18; // [rsp+40h] [rbp-18h]
int v19; // [rsp+4Ch] [rbp-Ch]
char *v20; // [rsp+50h] [rbp-8h]
v18 = this;
v16 = 0;
v17 = (int)google::protobuf::UninterpretedOption::_internal_name_size(this);
v15[1] = (char *)this + 24;
v15[0] = google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption_NamePart>::begin((char *)this + 24);
v14 = google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption_NamePart>::end((char *)this + 24);
while ( (google::protobuf::internal::operator!=(v15, &v14) & 1) != 0 )
{
v13 = google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_NamePart const>::operator*(v15);
v1 = google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::UninterpretedOption_NamePart>(v13);
v17 += v1;
google::protobuf::internal::RepeatedPtrIterator<google::protobuf::UninterpretedOption_NamePart const>::operator++(v15);
}
v20 = (char *)this + 16;
v19 = 0;
v16 = *((_DWORD *)this + 4);
if ( (v16 & 0x3F) != 0 )
{
if ( (v16 & 1) != 0 )
{
v2 = google::protobuf::UninterpretedOption::_internal_identifier_value[abi:cxx11]((long long)this);
v3 = google::protobuf::internal::WireFormatLite::StringSize(v2, (unsigned int)&v14);
v17 += v3 + 1;
}
if ( (v16 & 2) != 0 )
{
v4 = google::protobuf::UninterpretedOption::_internal_string_value[abi:cxx11]((long long)this);
v5 = google::protobuf::internal::WireFormatLite::BytesSize(v4, (unsigned int)&v14);
v17 += v5 + 1;
}
if ( (v16 & 4) != 0 )
{
v6 = google::protobuf::UninterpretedOption::_internal_aggregate_value[abi:cxx11]((long long)this);
v7 = google::protobuf::internal::WireFormatLite::StringSize(v6, (unsigned int)&v14);
v17 += v7 + 1;
}
if ( (v16 & 8) != 0 )
{
v8 = (google::protobuf::internal::WireFormatLite *)google::protobuf::UninterpretedOption::_internal_positive_int_value(this);
v9 = google::protobuf::internal::WireFormatLite::UInt64SizePlusOne(v8, (unsigned long long)&v14);
v17 += v9;
}
if ( (v16 & 0x10) != 0 )
{
v10 = (google::protobuf::internal::WireFormatLite *)google::protobuf::UninterpretedOption::_internal_negative_int_value(this);
v11 = google::protobuf::internal::WireFormatLite::Int64SizePlusOne(v10);
v17 += v11;
}
if ( (v16 & 0x20) != 0 )
v17 += 9LL;
}
return google::protobuf::Message::MaybeComputeUnknownFieldsSize(
this,
(const google::protobuf::UnknownFieldSet *)v17,
(google::protobuf::UninterpretedOption *)((char *)this + 20));
}
| |||
40,784 | google::protobuf::UninterpretedOption::ByteSizeLong() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | size_t UninterpretedOption::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UninterpretedOption)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .google.protobuf.UninterpretedOption.NamePart name = 2;
total_size += 1UL * this->_internal_name_size();
for (const auto& msg : this->_impl_.name_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional string identifier_value = 3;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_identifier_value());
}
// optional bytes string_value = 7;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->_internal_string_value());
}
// optional string aggregate_value = 8;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_aggregate_value());
}
// optional uint64 positive_int_value = 4;
if (cached_has_bits & 0x00000008u) {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_positive_int_value());
}
// optional int64 negative_int_value = 5;
if (cached_has_bits & 0x00000010u) {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_negative_int_value());
}
// optional double double_value = 6;
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 8;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
} | O3 | cpp | google::protobuf::UninterpretedOption::ByteSizeLong() const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x20(%rdi), %r14
movq 0x28(%rdi), %rax
leaq 0x8(%rax), %r15
testq %rax, %rax
cmoveq %rax, %r15
testq %r14, %r14
je 0xf80cc
leaq (,%r14,8), %r12
xorl %r13d, %r13d
movq (%r15,%r13), %rdi
callq 0xf7704
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
addq $0x8, %r13
cmpq %r13, %r12
jne 0xf80a3
jmp 0xf80cf
xorl %r14d, %r14d
movl 0x10(%rbx), %eax
testb $0x3f, %al
je 0xf819a
testb $0x1, %al
je 0xf8102
movq 0x30(%rbx), %rcx
andq $-0x4, %rcx
movq 0x8(%rcx), %rcx
addq %rcx, %r14
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb $0x2, %al
je 0xf812a
movq 0x38(%rbx), %rcx
andq $-0x4, %rcx
movq 0x8(%rcx), %rcx
addq %rcx, %r14
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb $0x4, %al
je 0xf8152
movq 0x40(%rbx), %rcx
andq $-0x4, %rcx
movq 0x8(%rcx), %rcx
addq %rcx, %r14
orl $0x1, %ecx
bsrl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
addl $0x49, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
incq %r14
testb $0x8, %al
je 0xf8171
movq 0x48(%rbx), %rcx
orq $0x1, %rcx
bsrq %rcx, %rcx
leal (%rcx,%rcx,8), %ecx
addl $0x89, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
testb $0x10, %al
je 0xf8190
movq 0x50(%rbx), %rcx
orq $0x1, %rcx
bsrq %rcx, %rcx
leal (%rcx,%rcx,8), %ecx
addl $0x89, %ecx
shrl $0x6, %ecx
addq %rcx, %r14
leaq 0x9(%r14), %rcx
testb $0x20, %al
cmovneq %rcx, %r14
leaq 0x14(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x9f36e
| _ZNK6google8protobuf19UninterpretedOption12ByteSizeLongEv:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
movsxd r14, dword ptr [rdi+20h]
mov rax, [rdi+28h]
lea r15, [rax+8]
test rax, rax
cmovz r15, rax
test r14, r14
jz short loc_F80CC
lea r12, ds:0[r14*8]
xor r13d, r13d
loc_F80A3:
mov rdi, [r15+r13]; this
call _ZNK6google8protobuf28UninterpretedOption_NamePart12ByteSizeLongEv; google::protobuf::UninterpretedOption_NamePart::ByteSizeLong(void)
add r14, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r14, rax
add r13, 8
cmp r12, r13
jnz short loc_F80A3
jmp short loc_F80CF
loc_F80CC:
xor r14d, r14d
loc_F80CF:
mov eax, [rbx+10h]
test al, 3Fh
jz loc_F819A
test al, 1
jz short loc_F8102
mov rcx, [rbx+30h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov rcx, [rcx+8]
add r14, rcx
or ecx, 1
bsr ecx, ecx
lea ecx, [rcx+rcx*8]
add ecx, 49h ; 'I'
shr ecx, 6
add r14, rcx
inc r14
loc_F8102:
test al, 2
jz short loc_F812A
mov rcx, [rbx+38h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov rcx, [rcx+8]
add r14, rcx
or ecx, 1
bsr ecx, ecx
lea ecx, [rcx+rcx*8]
add ecx, 49h ; 'I'
shr ecx, 6
add r14, rcx
inc r14
loc_F812A:
test al, 4
jz short loc_F8152
mov rcx, [rbx+40h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov rcx, [rcx+8]
add r14, rcx
or ecx, 1
bsr ecx, ecx
lea ecx, [rcx+rcx*8]
add ecx, 49h ; 'I'
shr ecx, 6
add r14, rcx
inc r14
loc_F8152:
test al, 8
jz short loc_F8171
mov rcx, [rbx+48h]
or rcx, 1
bsr rcx, rcx
lea ecx, [rcx+rcx*8]
add ecx, 89h
shr ecx, 6
add r14, rcx
loc_F8171:
test al, 10h
jz short loc_F8190
mov rcx, [rbx+50h]
or rcx, 1
bsr rcx, rcx
lea ecx, [rcx+rcx*8]
add ecx, 89h
shr ecx, 6
add r14, rcx
loc_F8190:
lea rcx, [r14+9]
test al, 20h
cmovnz r14, rcx
loc_F819A:
lea rdx, [rbx+14h]
mov rdi, rbx
mov rsi, r14
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *)
| char * google::protobuf::UninterpretedOption::ByteSizeLong(google::protobuf::UninterpretedOption *this)
{
long long v1; // r14
long long v2; // rax
long long v3; // r15
long long v4; // r12
long long v5; // r13
char *v6; // rax
char *v7; // r14
int v8; // eax
long long v9; // rcx
long long v10; // r14
long long v11; // rcx
long long v12; // r14
long long v13; // rcx
long long v14; // r14
unsigned long long v15; // rcx
unsigned long long v16; // rcx
v1 = *((int *)this + 8);
v2 = *((_QWORD *)this + 5);
v3 = v2 + 8;
if ( !v2 )
v3 = 0LL;
if ( *((_DWORD *)this + 8) )
{
v4 = 8 * v1;
v5 = 0LL;
do
{
v6 = google::protobuf::UninterpretedOption_NamePart::ByteSizeLong(*(google::protobuf::UninterpretedOption_NamePart **)(v3 + v5));
v7 = &v6[v1];
_BitScanReverse((unsigned int *)&v6, (unsigned int)v6 | 1);
v1 = (long long)&v7[(unsigned int)(9 * (_DWORD)v6 + 73) >> 6];
v5 += 8LL;
}
while ( v4 != v5 );
}
else
{
v1 = 0LL;
}
v8 = *((_DWORD *)this + 4);
if ( (v8 & 0x3F) != 0 )
{
if ( (v8 & 1) != 0 )
{
v9 = *(_QWORD *)((*((_QWORD *)this + 6) & 0xFFFFFFFFFFFFFFFCLL) + 8);
v10 = v9 + v1;
_BitScanReverse((unsigned int *)&v9, v9 | 1);
v1 = ((unsigned int)(9 * v9 + 73) >> 6) + v10 + 1;
}
if ( (v8 & 2) != 0 )
{
v11 = *(_QWORD *)((*((_QWORD *)this + 7) & 0xFFFFFFFFFFFFFFFCLL) + 8);
v12 = v11 + v1;
_BitScanReverse((unsigned int *)&v11, v11 | 1);
v1 = ((unsigned int)(9 * v11 + 73) >> 6) + v12 + 1;
}
if ( (v8 & 4) != 0 )
{
v13 = *(_QWORD *)((*((_QWORD *)this + 8) & 0xFFFFFFFFFFFFFFFCLL) + 8);
v14 = v13 + v1;
_BitScanReverse((unsigned int *)&v13, v13 | 1);
v1 = ((unsigned int)(9 * v13 + 73) >> 6) + v14 + 1;
}
if ( (v8 & 8) != 0 )
{
_BitScanReverse64(&v15, *((_QWORD *)this + 9) | 1LL);
v1 += (unsigned int)(9 * v15 + 137) >> 6;
}
if ( (v8 & 0x10) != 0 )
{
_BitScanReverse64(&v16, *((_QWORD *)this + 10) | 1LL);
v1 += (unsigned int)(9 * v16 + 137) >> 6;
}
if ( (v8 & 0x20) != 0 )
v1 += 9LL;
}
return google::protobuf::Message::MaybeComputeUnknownFieldsSize(
(long long)this,
(const google::protobuf::UnknownFieldSet *)v1,
(_DWORD *)this + 5);
}
| ByteSizeLong:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
MOVSXD R14,dword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
LEA R15,[RAX + 0x8]
TEST RAX,RAX
CMOVZ R15,RAX
TEST R14,R14
JZ 0x001f80cc
LEA R12,[R14*0x8]
XOR R13D,R13D
LAB_001f80a3:
MOV RDI,qword ptr [R15 + R13*0x1]
CALL 0x001f7704
ADD R14,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R14,RAX
ADD R13,0x8
CMP R12,R13
JNZ 0x001f80a3
JMP 0x001f80cf
LAB_001f80cc:
XOR R14D,R14D
LAB_001f80cf:
MOV EAX,dword ptr [RBX + 0x10]
TEST AL,0x3f
JZ 0x001f819a
TEST AL,0x1
JZ 0x001f8102
MOV RCX,qword ptr [RBX + 0x30]
AND RCX,-0x4
MOV RCX,qword ptr [RCX + 0x8]
ADD R14,RCX
OR ECX,0x1
BSR ECX,ECX
LEA ECX,[RCX + RCX*0x8]
ADD ECX,0x49
SHR ECX,0x6
ADD R14,RCX
INC R14
LAB_001f8102:
TEST AL,0x2
JZ 0x001f812a
MOV RCX,qword ptr [RBX + 0x38]
AND RCX,-0x4
MOV RCX,qword ptr [RCX + 0x8]
ADD R14,RCX
OR ECX,0x1
BSR ECX,ECX
LEA ECX,[RCX + RCX*0x8]
ADD ECX,0x49
SHR ECX,0x6
ADD R14,RCX
INC R14
LAB_001f812a:
TEST AL,0x4
JZ 0x001f8152
MOV RCX,qword ptr [RBX + 0x40]
AND RCX,-0x4
MOV RCX,qword ptr [RCX + 0x8]
ADD R14,RCX
OR ECX,0x1
BSR ECX,ECX
LEA ECX,[RCX + RCX*0x8]
ADD ECX,0x49
SHR ECX,0x6
ADD R14,RCX
INC R14
LAB_001f8152:
TEST AL,0x8
JZ 0x001f8171
MOV RCX,qword ptr [RBX + 0x48]
OR RCX,0x1
BSR RCX,RCX
LEA ECX,[RCX + RCX*0x8]
ADD ECX,0x89
SHR ECX,0x6
ADD R14,RCX
LAB_001f8171:
TEST AL,0x10
JZ 0x001f8190
MOV RCX,qword ptr [RBX + 0x50]
OR RCX,0x1
BSR RCX,RCX
LEA ECX,[RCX + RCX*0x8]
ADD ECX,0x89
SHR ECX,0x6
ADD R14,RCX
LAB_001f8190:
LEA RCX,[R14 + 0x9]
TEST AL,0x20
CMOVNZ R14,RCX
LAB_001f819a:
LEA RDX,[RBX + 0x14]
MOV RDI,RBX
MOV RSI,R14
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x0019f36e
|
/* google::protobuf::UninterpretedOption::ByteSizeLong() const */
void __thiscall google::protobuf::UninterpretedOption::ByteSizeLong(UninterpretedOption *this)
{
long lVar1;
int iVar2;
uint uVar3;
long lVar4;
uint uVar5;
long lVar6;
ulong uVar7;
long lVar8;
uVar7 = (ulong)*(int *)(this + 0x20);
lVar8 = *(long *)(this + 0x28) + 8;
if (*(long *)(this + 0x28) == 0) {
lVar8 = 0;
}
if (uVar7 == 0) {
uVar7 = 0;
}
else {
lVar1 = uVar7 * 8;
lVar6 = 0;
do {
lVar4 = UninterpretedOption_NamePart::ByteSizeLong
(*(UninterpretedOption_NamePart **)(lVar8 + lVar6));
uVar3 = (uint)lVar4 | 1;
iVar2 = 0x1f;
if (uVar3 != 0) {
for (; uVar3 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar7 = uVar7 + lVar4 + (ulong)(iVar2 * 9 + 0x49U >> 6);
lVar6 = lVar6 + 8;
} while (lVar1 - lVar6 != 0);
}
uVar3 = *(uint *)(this + 0x10);
if ((uVar3 & 0x3f) != 0) {
if ((uVar3 & 1) != 0) {
lVar8 = *(long *)((*(ulong *)(this + 0x30) & 0xfffffffffffffffc) + 8);
uVar5 = (uint)lVar8 | 1;
iVar2 = 0x1f;
if (uVar5 != 0) {
for (; uVar5 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar7 = uVar7 + lVar8 + (ulong)(iVar2 * 9 + 0x49U >> 6) + 1;
}
if ((uVar3 & 2) != 0) {
lVar8 = *(long *)((*(ulong *)(this + 0x38) & 0xfffffffffffffffc) + 8);
uVar5 = (uint)lVar8 | 1;
iVar2 = 0x1f;
if (uVar5 != 0) {
for (; uVar5 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar7 = uVar7 + lVar8 + (ulong)(iVar2 * 9 + 0x49U >> 6) + 1;
}
if ((uVar3 & 4) != 0) {
lVar8 = *(long *)((*(ulong *)(this + 0x40) & 0xfffffffffffffffc) + 8);
uVar5 = (uint)lVar8 | 1;
iVar2 = 0x1f;
if (uVar5 != 0) {
for (; uVar5 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar7 = uVar7 + lVar8 + (ulong)(iVar2 * 9 + 0x49U >> 6) + 1;
}
if ((uVar3 & 8) != 0) {
lVar8 = 0x3f;
if ((*(ulong *)(this + 0x48) | 1) != 0) {
for (; (*(ulong *)(this + 0x48) | 1) >> lVar8 == 0; lVar8 = lVar8 + -1) {
}
}
uVar7 = uVar7 + ((int)lVar8 * 9 + 0x89U >> 6);
}
if ((uVar3 & 0x10) != 0) {
lVar8 = 0x3f;
if ((*(ulong *)(this + 0x50) | 1) != 0) {
for (; (*(ulong *)(this + 0x50) | 1) >> lVar8 == 0; lVar8 = lVar8 + -1) {
}
}
uVar7 = uVar7 + ((int)lVar8 * 9 + 0x89U >> 6);
}
if ((uVar3 & 0x20) != 0) {
uVar7 = uVar7 + 9;
}
}
Message::MaybeComputeUnknownFieldsSize((Message *)this,uVar7,(CachedSize *)(this + 0x14));
return;
}
| |
40,785 | JS_NewClass1 | bluesky950520[P]quickjs/quickjs.c | static int JS_NewClass1(JSRuntime *rt, JSClassID class_id,
const JSClassDef *class_def, JSAtom name)
{
int new_size, i;
JSClass *cl, *new_class_array;
struct list_head *el;
if (class_id >= (1 << 16))
return -1;
if (class_id < rt->class_count &&
rt->class_array[class_id].class_id != 0)
return -1;
if (class_id >= rt->class_count) {
new_size = max_int(JS_CLASS_INIT_COUNT,
max_int(class_id + 1, rt->class_count * 3 / 2));
/* reallocate the context class prototype array, if any */
list_for_each(el, &rt->context_list) {
JSContext *ctx = list_entry(el, JSContext, link);
JSValue *new_tab;
new_tab = js_realloc_rt(rt, ctx->class_proto,
sizeof(ctx->class_proto[0]) * new_size);
if (!new_tab)
return -1;
for(i = rt->class_count; i < new_size; i++)
new_tab[i] = JS_NULL;
ctx->class_proto = new_tab;
}
/* reallocate the class array */
new_class_array = js_realloc_rt(rt, rt->class_array,
sizeof(JSClass) * new_size);
if (!new_class_array)
return -1;
memset(new_class_array + rt->class_count, 0,
(new_size - rt->class_count) * sizeof(JSClass));
rt->class_array = new_class_array;
rt->class_count = new_size;
}
cl = &rt->class_array[class_id];
cl->class_id = class_id;
cl->class_name = JS_DupAtomRT(rt, name);
cl->finalizer = class_def->finalizer;
cl->gc_mark = class_def->gc_mark;
cl->call = class_def->call;
cl->exotic = class_def->exotic;
return 0;
} | O0 | c | JS_NewClass1:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movq %rdx, 0x48(%rsp)
movl %ecx, 0x44(%rsp)
cmpl $0x10000, 0x54(%rsp) # imm = 0x10000
jb 0x2812d
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2839c
movl 0x54(%rsp), %eax
movq 0x58(%rsp), %rcx
cmpl 0x78(%rcx), %eax
jae 0x28164
movq 0x58(%rsp), %rax
movq 0x80(%rax), %rax
movl 0x54(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
je 0x28164
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2839c
movl 0x54(%rsp), %eax
movq 0x58(%rsp), %rcx
cmpl 0x78(%rcx), %eax
jb 0x2830d
movl 0x54(%rsp), %edi
addl $0x1, %edi
movq 0x58(%rsp), %rax
imull $0x3, 0x78(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
callq 0x5c050
movl %eax, %esi
movl $0x3d, %edi
callq 0x5c050
movl %eax, 0x40(%rsp)
movq 0x58(%rsp), %rax
movq 0x90(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x58(%rsp), %rcx
addq $0x88, %rcx
cmpq %rcx, %rax
je 0x28289
movq 0x20(%rsp), %rax
addq $-0x20, %rax
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rsi
movslq 0x40(%rsp), %rdx
shlq $0x4, %rdx
callq 0x20720
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x28214
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2839c
movq 0x58(%rsp), %rax
movl 0x78(%rax), %eax
movl %eax, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x40(%rsp), %eax
jge 0x28268
movq 0x10(%rsp), %rax
movslq 0x3c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, (%rsp)
movq $0x2, 0x8(%rsp)
movq (%rsp), %rcx
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x28220
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x281b6
movq 0x58(%rsp), %rdi
movq 0x58(%rsp), %rax
movq 0x80(%rax), %rsi
movslq 0x40(%rsp), %rax
imulq $0x28, %rax, %rdx
callq 0x20720
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x282c2
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2839c
movq 0x28(%rsp), %rdi
movq 0x58(%rsp), %rax
movslq 0x78(%rax), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
movl 0x40(%rsp), %eax
movq 0x58(%rsp), %rcx
subl 0x78(%rcx), %eax
cltq
imulq $0x28, %rax, %rdx
xorl %esi, %esi
callq 0xe340
movq 0x28(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x80(%rax)
movl 0x40(%rsp), %ecx
movq 0x58(%rsp), %rax
movl %ecx, 0x78(%rax)
movq 0x58(%rsp), %rax
movq 0x80(%rax), %rax
movl 0x54(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movl 0x54(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movq 0x58(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x5c380
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_NewClass1:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_14], esi
mov [rsp+68h+var_20], rdx
mov [rsp+68h+var_24], ecx
cmp [rsp+68h+var_14], 10000h
jb short loc_2812D
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_2839C
loc_2812D:
mov eax, [rsp+68h+var_14]
mov rcx, [rsp+68h+var_10]
cmp eax, [rcx+78h]
jnb short loc_28164
mov rax, [rsp+68h+var_10]
mov rax, [rax+80h]
mov ecx, [rsp+68h+var_14]
imul rcx, 28h ; '('
add rax, rcx
cmp dword ptr [rax], 0
jz short loc_28164
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_2839C
loc_28164:
mov eax, [rsp+68h+var_14]
mov rcx, [rsp+68h+var_10]
cmp eax, [rcx+78h]
jb loc_2830D
mov edi, [rsp+68h+var_14]
add edi, 1
mov rax, [rsp+68h+var_10]
imul eax, [rax+78h], 3
mov ecx, 2
cdq
idiv ecx
mov esi, eax
call max_int_0
mov esi, eax
mov edi, 3Dh ; '='
call max_int_0
mov [rsp+68h+var_28], eax
mov rax, [rsp+68h+var_10]
mov rax, [rax+90h]
mov [rsp+68h+var_48], rax
loc_281B6:
mov rax, [rsp+68h+var_48]
mov rcx, [rsp+68h+var_10]
add rcx, 88h
cmp rax, rcx
jz loc_28289
mov rax, [rsp+68h+var_48]
add rax, 0FFFFFFFFFFFFFFE0h
mov [rsp+68h+var_50], rax
mov rdi, [rsp+68h+var_10]
mov rax, [rsp+68h+var_50]
mov rsi, [rax+40h]
movsxd rdx, [rsp+68h+var_28]
shl rdx, 4
call js_realloc_rt
mov [rsp+68h+var_58], rax
cmp [rsp+68h+var_58], 0
jnz short loc_28214
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_2839C
loc_28214:
mov rax, [rsp+68h+var_10]
mov eax, [rax+78h]
mov [rsp+68h+var_2C], eax
loc_28220:
mov eax, [rsp+68h+var_2C]
cmp eax, [rsp+68h+var_28]
jge short loc_28268
mov rax, [rsp+68h+var_58]
movsxd rcx, [rsp+68h+var_2C]
shl rcx, 4
add rax, rcx
mov dword ptr [rsp+68h+var_68], 0
mov [rsp+68h+var_60], 2
mov rcx, [rsp+68h+var_68]
mov [rax], rcx
mov rcx, [rsp+68h+var_60]
mov [rax+8], rcx
mov eax, [rsp+68h+var_2C]
add eax, 1
mov [rsp+68h+var_2C], eax
jmp short loc_28220
loc_28268:
mov rcx, [rsp+68h+var_58]
mov rax, [rsp+68h+var_50]
mov [rax+40h], rcx
mov rax, [rsp+68h+var_48]
mov rax, [rax+8]
mov [rsp+68h+var_48], rax
jmp loc_281B6
loc_28289:
mov rdi, [rsp+68h+var_10]
mov rax, [rsp+68h+var_10]
mov rsi, [rax+80h]
movsxd rax, [rsp+68h+var_28]
imul rdx, rax, 28h ; '('
call js_realloc_rt
mov [rsp+68h+var_40], rax
cmp [rsp+68h+var_40], 0
jnz short loc_282C2
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_2839C
loc_282C2:
mov rdi, [rsp+68h+var_40]
mov rax, [rsp+68h+var_10]
movsxd rax, dword ptr [rax+78h]
imul rax, 28h ; '('
add rdi, rax
mov eax, [rsp+68h+var_28]
mov rcx, [rsp+68h+var_10]
sub eax, [rcx+78h]
cdqe
imul rdx, rax, 28h ; '('
xor esi, esi
call _memset
mov rcx, [rsp+68h+var_40]
mov rax, [rsp+68h+var_10]
mov [rax+80h], rcx
mov ecx, [rsp+68h+var_28]
mov rax, [rsp+68h+var_10]
mov [rax+78h], ecx
loc_2830D:
mov rax, [rsp+68h+var_10]
mov rax, [rax+80h]
mov ecx, [rsp+68h+var_14]
imul rcx, 28h ; '('
add rax, rcx
mov [rsp+68h+var_38], rax
mov ecx, [rsp+68h+var_14]
mov rax, [rsp+68h+var_38]
mov [rax], ecx
mov rdi, [rsp+68h+var_10]
mov esi, [rsp+68h+var_24]
call JS_DupAtomRT
mov ecx, eax
mov rax, [rsp+68h+var_38]
mov [rax+4], ecx
mov rax, [rsp+68h+var_20]
mov rcx, [rax+8]
mov rax, [rsp+68h+var_38]
mov [rax+8], rcx
mov rax, [rsp+68h+var_20]
mov rcx, [rax+10h]
mov rax, [rsp+68h+var_38]
mov [rax+10h], rcx
mov rax, [rsp+68h+var_20]
mov rcx, [rax+18h]
mov rax, [rsp+68h+var_38]
mov [rax+18h], rcx
mov rax, [rsp+68h+var_20]
mov rcx, [rax+20h]
mov rax, [rsp+68h+var_38]
mov [rax+20h], rcx
mov [rsp+68h+var_4], 0
loc_2839C:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
| long long JS_NewClass1(long long a1, unsigned int a2, _QWORD *a3, unsigned int a4)
{
long long v4; // rdx
unsigned int v5; // eax
long long v6; // rdx
_QWORD *v7; // rax
long long v9; // [rsp+0h] [rbp-68h]
long long v10; // [rsp+10h] [rbp-58h]
long long i; // [rsp+20h] [rbp-48h]
long long v12; // [rsp+28h] [rbp-40h]
long long v13; // [rsp+30h] [rbp-38h]
int j; // [rsp+3Ch] [rbp-2Ch]
int v15; // [rsp+40h] [rbp-28h]
if ( a2 < 0x10000 )
{
if ( a2 >= *(_DWORD *)(a1 + 120) || !*(_DWORD *)(40LL * a2 + *(_QWORD *)(a1 + 128)) )
{
if ( a2 >= *(_DWORD *)(a1 + 120) )
{
v4 = (unsigned int)((3 * *(_DWORD *)(a1 + 120)) >> 31);
LODWORD(v4) = 3 * *(_DWORD *)(a1 + 120) % 2;
v5 = max_int_0(a2 + 1, (unsigned int)(3 * *(_DWORD *)(a1 + 120) / 2), v4);
v15 = max_int_0(61LL, v5, v6);
for ( i = *(_QWORD *)(a1 + 144); i != a1 + 136; i = *(_QWORD *)(i + 8) )
{
v10 = js_realloc_rt(a1, *(_QWORD *)(i - 32 + 64), 16LL * v15);
if ( !v10 )
return (unsigned int)-1;
for ( j = *(_DWORD *)(a1 + 120); j < v15; ++j )
{
v7 = (_QWORD *)(16LL * j + v10);
LODWORD(v9) = 0;
*v7 = v9;
v7[1] = 2LL;
}
*(_QWORD *)(i - 32 + 64) = v10;
}
v12 = js_realloc_rt(a1, *(_QWORD *)(a1 + 128), 40LL * v15);
if ( !v12 )
return (unsigned int)-1;
memset(40LL * *(int *)(a1 + 120) + v12, 0LL, 40LL * (v15 - *(_DWORD *)(a1 + 120)));
*(_QWORD *)(a1 + 128) = v12;
*(_DWORD *)(a1 + 120) = v15;
}
v13 = 40LL * a2 + *(_QWORD *)(a1 + 128);
*(_DWORD *)v13 = a2;
*(_DWORD *)(v13 + 4) = JS_DupAtomRT(a1, a4);
*(_QWORD *)(v13 + 8) = a3[1];
*(_QWORD *)(v13 + 16) = a3[2];
*(_QWORD *)(v13 + 24) = a3[3];
*(_QWORD *)(v13 + 32) = a3[4];
return 0;
}
return (unsigned int)-1;
}
else
{
return (unsigned int)-1;
}
}
| JS_NewClass1:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV dword ptr [RSP + 0x54],ESI
MOV qword ptr [RSP + 0x48],RDX
MOV dword ptr [RSP + 0x44],ECX
CMP dword ptr [RSP + 0x54],0x10000
JC 0x0012812d
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0012839c
LAB_0012812d:
MOV EAX,dword ptr [RSP + 0x54]
MOV RCX,qword ptr [RSP + 0x58]
CMP EAX,dword ptr [RCX + 0x78]
JNC 0x00128164
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RSP + 0x54]
IMUL RCX,RCX,0x28
ADD RAX,RCX
CMP dword ptr [RAX],0x0
JZ 0x00128164
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0012839c
LAB_00128164:
MOV EAX,dword ptr [RSP + 0x54]
MOV RCX,qword ptr [RSP + 0x58]
CMP EAX,dword ptr [RCX + 0x78]
JC 0x0012830d
MOV EDI,dword ptr [RSP + 0x54]
ADD EDI,0x1
MOV RAX,qword ptr [RSP + 0x58]
IMUL EAX,dword ptr [RAX + 0x78],0x3
MOV ECX,0x2
CDQ
IDIV ECX
MOV ESI,EAX
CALL 0x0015c050
MOV ESI,EAX
MOV EDI,0x3d
CALL 0x0015c050
MOV dword ptr [RSP + 0x40],EAX
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x90]
MOV qword ptr [RSP + 0x20],RAX
LAB_001281b6:
MOV RAX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x58]
ADD RCX,0x88
CMP RAX,RCX
JZ 0x00128289
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,-0x20
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX + 0x40]
MOVSXD RDX,dword ptr [RSP + 0x40]
SHL RDX,0x4
CALL 0x00120720
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x00128214
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0012839c
LAB_00128214:
MOV RAX,qword ptr [RSP + 0x58]
MOV EAX,dword ptr [RAX + 0x78]
MOV dword ptr [RSP + 0x3c],EAX
LAB_00128220:
MOV EAX,dword ptr [RSP + 0x3c]
CMP EAX,dword ptr [RSP + 0x40]
JGE 0x00128268
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x3c]
SHL RCX,0x4
ADD RAX,RCX
MOV dword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x2
MOV RCX,qword ptr [RSP]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x00128220
LAB_00128268:
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001281b6
LAB_00128289:
MOV RDI,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RAX + 0x80]
MOVSXD RAX,dword ptr [RSP + 0x40]
IMUL RDX,RAX,0x28
CALL 0x00120720
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RSP + 0x28],0x0
JNZ 0x001282c2
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x0012839c
LAB_001282c2:
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RAX,dword ptr [RAX + 0x78]
IMUL RAX,RAX,0x28
ADD RDI,RAX
MOV EAX,dword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x58]
SUB EAX,dword ptr [RCX + 0x78]
CDQE
IMUL RDX,RAX,0x28
XOR ESI,ESI
CALL 0x0010e340
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x80],RCX
MOV ECX,dword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x78],ECX
LAB_0012830d:
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RSP + 0x54]
IMUL RCX,RCX,0x28
ADD RAX,RCX
MOV qword ptr [RSP + 0x30],RAX
MOV ECX,dword ptr [RSP + 0x54]
MOV RAX,qword ptr [RSP + 0x30]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x58]
MOV ESI,dword ptr [RSP + 0x44]
CALL 0x0015c380
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x20],RCX
MOV dword ptr [RSP + 0x64],0x0
LAB_0012839c:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4 JS_NewClass1(long param_1,uint param_2,long param_3,int4 param_4)
{
int4 uVar1;
int iVar2;
uint uVar3;
long lVar4;
long *plVar5;
uint *puVar6;
uint uStack_64;
long local_48;
int local_2c;
int4 local_4;
if (param_2 < 0x10000) {
if ((param_2 < *(uint *)(param_1 + 0x78)) &&
(*(int *)(*(long *)(param_1 + 0x80) + (ulong)param_2 * 0x28) != 0)) {
local_4 = 0xffffffff;
}
else {
if (*(uint *)(param_1 + 0x78) <= param_2) {
lVar4 = (long)(*(int *)(param_1 + 0x78) * 3);
uVar1 = max_int(param_2 + 1,lVar4 / 2 & 0xffffffff,lVar4 % 2 & 0xffffffff);
iVar2 = max_int(0x3d,uVar1);
for (local_48 = *(long *)(param_1 + 0x90); local_48 != param_1 + 0x88;
local_48 = *(long *)(local_48 + 8)) {
lVar4 = js_realloc_rt(param_1,*(int8 *)(local_48 + 0x20),(long)iVar2 << 4);
if (lVar4 == 0) {
return 0xffffffff;
}
for (local_2c = *(int *)(param_1 + 0x78); local_2c < iVar2; local_2c = local_2c + 1) {
plVar5 = (long *)(lVar4 + (long)local_2c * 0x10);
*plVar5 = (ulong)uStack_64 << 0x20;
plVar5[1] = 2;
}
*(long *)(local_48 + 0x20) = lVar4;
}
lVar4 = js_realloc_rt(param_1,*(int8 *)(param_1 + 0x80),(long)iVar2 * 0x28);
if (lVar4 == 0) {
return 0xffffffff;
}
memset((void *)(lVar4 + (long)*(int *)(param_1 + 0x78) * 0x28),0,
(long)(iVar2 - *(int *)(param_1 + 0x78)) * 0x28);
*(long *)(param_1 + 0x80) = lVar4;
*(int *)(param_1 + 0x78) = iVar2;
}
puVar6 = (uint *)(*(long *)(param_1 + 0x80) + (ulong)param_2 * 0x28);
*puVar6 = param_2;
uVar3 = JS_DupAtomRT(param_1,param_4);
puVar6[1] = uVar3;
*(int8 *)(puVar6 + 2) = *(int8 *)(param_3 + 8);
*(int8 *)(puVar6 + 4) = *(int8 *)(param_3 + 0x10);
*(int8 *)(puVar6 + 6) = *(int8 *)(param_3 + 0x18);
*(int8 *)(puVar6 + 8) = *(int8 *)(param_3 + 0x20);
local_4 = 0;
}
}
else {
local_4 = 0xffffffff;
}
return local_4;
}
| |
40,786 | JS_NewClass1 | bluesky950520[P]quickjs/quickjs.c | static int JS_NewClass1(JSRuntime *rt, JSClassID class_id,
const JSClassDef *class_def, JSAtom name)
{
int new_size, i;
JSClass *cl, *new_class_array;
struct list_head *el;
if (class_id >= (1 << 16))
return -1;
if (class_id < rt->class_count &&
rt->class_array[class_id].class_id != 0)
return -1;
if (class_id >= rt->class_count) {
new_size = max_int(JS_CLASS_INIT_COUNT,
max_int(class_id + 1, rt->class_count * 3 / 2));
/* reallocate the context class prototype array, if any */
list_for_each(el, &rt->context_list) {
JSContext *ctx = list_entry(el, JSContext, link);
JSValue *new_tab;
new_tab = js_realloc_rt(rt, ctx->class_proto,
sizeof(ctx->class_proto[0]) * new_size);
if (!new_tab)
return -1;
for(i = rt->class_count; i < new_size; i++)
new_tab[i] = JS_NULL;
ctx->class_proto = new_tab;
}
/* reallocate the class array */
new_class_array = js_realloc_rt(rt, rt->class_array,
sizeof(JSClass) * new_size);
if (!new_class_array)
return -1;
memset(new_class_array + rt->class_count, 0,
(new_size - rt->class_count) * sizeof(JSClass));
rt->class_array = new_class_array;
rt->class_count = new_size;
}
cl = &rt->class_array[class_id];
cl->class_id = class_id;
cl->class_name = JS_DupAtomRT(rt, name);
cl->finalizer = class_def->finalizer;
cl->gc_mark = class_def->gc_mark;
cl->call = class_def->call;
cl->exotic = class_def->exotic;
return 0;
} | O1 | c | JS_NewClass1:
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0xffff, %esi # imm = 0xFFFF
ja 0x1fec8
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movl 0x78(%rdi), %r9d
cmpl %esi, %r9d
jbe 0x1fd6d
movq 0x80(%r14), %rdi
movl %esi, %r8d
leaq (%r8,%r8,4), %r8
cmpl $0x0, (%rdi,%r8,8)
jne 0x1feba
cmpl %esi, %r9d
ja 0x1fe77
movl %ecx, 0x4(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
leal 0x1(%rsi), %ecx
movl %r9d, %edx
shrl %edx
addl %r9d, %edx
cmpl %edx, %ecx
cmovgl %ecx, %edx
cmpl $0x3e, %edx
movl $0x3d, %ebx
cmovgel %edx, %ebx
leaq 0x88(%r14), %r12
movq 0x90(%r14), %r15
movl %ebx, %ebp
cmpq %r12, %r15
je 0x1fe07
movq %rbp, %r13
shlq $0x4, %r13
movq 0x20(%r15), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x1beae
testq %rax, %rax
je 0x1feb5
movslq 0x78(%r14), %rdx
cmpl %ebx, %edx
jge 0x1fdfa
movq %rbp, %rcx
subq %rdx, %rcx
shlq $0x4, %rdx
addq %rax, %rdx
addq $0x8, %rdx
movl $0x0, -0x8(%rdx)
movq $0x2, (%rdx)
addq $0x10, %rdx
decq %rcx
jne 0x1fde3
movq %rax, 0x20(%r15)
movq 0x8(%r15), %r15
cmpq %r12, %r15
jne 0x1fdb2
movq 0x80(%r14), %rsi
shlq $0x3, %rbp
leaq (,%rbp,4), %rdx
addq %rbp, %rdx
movq %r14, %rdi
callq 0x1beae
movq %rax, %r13
testq %rax, %rax
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
je 0x1feba
movslq 0x78(%r14), %rax
leaq (%rax,%rax,4), %rcx
leaq (,%rcx,8), %rdi
addq %r13, %rdi
movslq %ebx, %rcx
subq %rax, %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,4), %rdx
xorl %esi, %esi
callq 0xe340
movq %r13, 0x80(%r14)
movl %ebx, 0x78(%r14)
movq 0x10(%rsp), %rdx
movl 0x4(%rsp), %ecx
movq 0x8(%rsp), %rsi
movq 0x80(%r14), %rax
movl %esi, %edi
leaq (%rdi,%rdi,4), %rdi
leaq (%rax,%rdi,8), %rax
movl %esi, (%rax)
cmpl $0xe0, %ecx
jl 0x1fe9e
movq 0x68(%r14), %rdi
movl %ecx, %esi
movq (%rdi,%rsi,8), %rsi
incl (%rsi)
movl %ecx, 0x4(%rax)
movups 0x8(%rdx), %xmm0
movups %xmm0, 0x8(%rax)
movups 0x18(%rdx), %xmm0
movups %xmm0, 0x18(%rax)
xorl %eax, %eax
jmp 0x1feba
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_NewClass1:
mov eax, 0FFFFFFFFh
cmp esi, 0FFFFh
ja locret_1FEC8
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdi
mov r9d, [rdi+78h]
cmp r9d, esi
jbe short loc_1FD6D
mov rdi, [r14+80h]
mov r8d, esi
lea r8, [r8+r8*4]
cmp dword ptr [rdi+r8*8], 0
jnz loc_1FEBA
cmp r9d, esi
ja loc_1FE77
loc_1FD6D:
mov [rsp+48h+var_44], ecx
mov [rsp+48h+var_38], rdx
mov [rsp+48h+var_40], rsi
lea ecx, [rsi+1]
mov edx, r9d
shr edx, 1
add edx, r9d
cmp ecx, edx
cmovg edx, ecx
cmp edx, 3Eh ; '>'
mov ebx, 3Dh ; '='
cmovge ebx, edx
lea r12, [r14+88h]
mov r15, [r14+90h]
mov ebp, ebx
cmp r15, r12
jz short loc_1FE07
mov r13, rbp
shl r13, 4
loc_1FDB2:
mov rsi, [r15+20h]
mov rdi, r14
mov rdx, r13
call js_realloc_rt
test rax, rax
jz loc_1FEB5
movsxd rdx, dword ptr [r14+78h]
cmp edx, ebx
jge short loc_1FDFA
mov rcx, rbp
sub rcx, rdx
shl rdx, 4
add rdx, rax
add rdx, 8
loc_1FDE3:
mov dword ptr [rdx-8], 0
mov qword ptr [rdx], 2
add rdx, 10h
dec rcx
jnz short loc_1FDE3
loc_1FDFA:
mov [r15+20h], rax
mov r15, [r15+8]
cmp r15, r12
jnz short loc_1FDB2
loc_1FE07:
mov rsi, [r14+80h]
shl rbp, 3
lea rdx, ds:0[rbp*4]
add rdx, rbp
mov rdi, r14
call js_realloc_rt
mov r13, rax
test rax, rax
mov eax, 0FFFFFFFFh
jz loc_1FEBA
movsxd rax, dword ptr [r14+78h]
lea rcx, [rax+rax*4]
lea rdi, ds:0[rcx*8]
add rdi, r13
movsxd rcx, ebx
sub rcx, rax
shl rcx, 3
lea rdx, [rcx+rcx*4]
xor esi, esi
call _memset
mov [r14+80h], r13
mov [r14+78h], ebx
mov rdx, [rsp+48h+var_38]
mov ecx, [rsp+48h+var_44]
mov rsi, [rsp+48h+var_40]
loc_1FE77:
mov rax, [r14+80h]
mov edi, esi
lea rdi, [rdi+rdi*4]
lea rax, [rax+rdi*8]
mov [rax], esi
cmp ecx, 0E0h
jl short loc_1FE9E
mov rdi, [r14+68h]
mov esi, ecx
mov rsi, [rdi+rsi*8]
inc dword ptr [rsi]
loc_1FE9E:
mov [rax+4], ecx
movups xmm0, xmmword ptr [rdx+8]
movups xmmword ptr [rax+8], xmm0
movups xmm0, xmmword ptr [rdx+18h]
movups xmmword ptr [rax+18h], xmm0
xor eax, eax
jmp short loc_1FEBA
loc_1FEB5:
mov eax, 0FFFFFFFFh
loc_1FEBA:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_1FEC8:
retn
| long long JS_NewClass1(long long a1, unsigned int a2, long long a3, int a4)
{
long long result; // rax
unsigned int v5; // r9d
int v6; // edx
unsigned int v7; // ebx
long long v8; // r15
long long v9; // rax
long long v10; // rdx
long long v11; // rcx
_QWORD *v12; // rdx
long long v13; // r13
long long v14; // rax
_DWORD *v15; // rsi
int v16; // [rsp+0h] [rbp-44h]
long long v17; // [rsp+Ch] [rbp-38h]
result = 0xFFFFFFFFLL;
if ( a2 > 0xFFFF )
return result;
v5 = *(_DWORD *)(a1 + 120);
if ( v5 > a2 )
{
if ( *(_DWORD *)(*(_QWORD *)(a1 + 128) + 40LL * a2) )
return result;
if ( v5 > a2 )
goto LABEL_17;
}
v16 = a4;
v17 = a3;
v6 = v5 + (v5 >> 1);
if ( (int)(a2 + 1) > v6 )
v6 = a2 + 1;
v7 = 61;
if ( v6 >= 62 )
v7 = v6;
v8 = *(_QWORD *)(a1 + 144);
if ( v8 == a1 + 136 )
{
LABEL_15:
v13 = js_realloc_rt(a1, *(_QWORD *)(a1 + 128), 40LL * v7);
result = 0xFFFFFFFFLL;
if ( !v13 )
return result;
memset(v13 + 40LL * *(int *)(a1 + 120), 0LL, 40 * ((int)v7 - (long long)*(int *)(a1 + 120)));
*(_QWORD *)(a1 + 128) = v13;
*(_DWORD *)(a1 + 120) = v7;
a3 = v17;
a4 = v16;
LABEL_17:
v14 = *(_QWORD *)(a1 + 128) + 40LL * a2;
*(_DWORD *)v14 = a2;
if ( a4 >= 224 )
{
v15 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)a4);
++*v15;
}
*(_DWORD *)(v14 + 4) = a4;
*(_OWORD *)(v14 + 8) = *(_OWORD *)(a3 + 8);
*(_OWORD *)(v14 + 24) = *(_OWORD *)(a3 + 24);
return 0LL;
}
while ( 1 )
{
v9 = js_realloc_rt(a1, *(_QWORD *)(v8 + 32), 16LL * v7);
if ( !v9 )
return 0xFFFFFFFFLL;
v10 = *(int *)(a1 + 120);
if ( (int)v10 < (int)v7 )
{
v11 = v7 - v10;
v12 = (_QWORD *)(v9 + 16 * v10 + 8);
do
{
*((_DWORD *)v12 - 2) = 0;
*v12 = 2LL;
v12 += 2;
--v11;
}
while ( v11 );
}
*(_QWORD *)(v8 + 32) = v9;
v8 = *(_QWORD *)(v8 + 8);
if ( v8 == a1 + 136 )
goto LABEL_15;
}
}
| JS_NewClass1:
MOV EAX,0xffffffff
CMP ESI,0xffff
JA 0x0011fec8
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDI
MOV R9D,dword ptr [RDI + 0x78]
CMP R9D,ESI
JBE 0x0011fd6d
MOV RDI,qword ptr [R14 + 0x80]
MOV R8D,ESI
LEA R8,[R8 + R8*0x4]
CMP dword ptr [RDI + R8*0x8],0x0
JNZ 0x0011feba
CMP R9D,ESI
JA 0x0011fe77
LAB_0011fd6d:
MOV dword ptr [RSP + 0x4],ECX
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x8],RSI
LEA ECX,[RSI + 0x1]
MOV EDX,R9D
SHR EDX,0x1
ADD EDX,R9D
CMP ECX,EDX
CMOVG EDX,ECX
CMP EDX,0x3e
MOV EBX,0x3d
CMOVGE EBX,EDX
LEA R12,[R14 + 0x88]
MOV R15,qword ptr [R14 + 0x90]
MOV EBP,EBX
CMP R15,R12
JZ 0x0011fe07
MOV R13,RBP
SHL R13,0x4
LAB_0011fdb2:
MOV RSI,qword ptr [R15 + 0x20]
MOV RDI,R14
MOV RDX,R13
CALL 0x0011beae
TEST RAX,RAX
JZ 0x0011feb5
MOVSXD RDX,dword ptr [R14 + 0x78]
CMP EDX,EBX
JGE 0x0011fdfa
MOV RCX,RBP
SUB RCX,RDX
SHL RDX,0x4
ADD RDX,RAX
ADD RDX,0x8
LAB_0011fde3:
MOV dword ptr [RDX + -0x8],0x0
MOV qword ptr [RDX],0x2
ADD RDX,0x10
DEC RCX
JNZ 0x0011fde3
LAB_0011fdfa:
MOV qword ptr [R15 + 0x20],RAX
MOV R15,qword ptr [R15 + 0x8]
CMP R15,R12
JNZ 0x0011fdb2
LAB_0011fe07:
MOV RSI,qword ptr [R14 + 0x80]
SHL RBP,0x3
LEA RDX,[RBP*0x4]
ADD RDX,RBP
MOV RDI,R14
CALL 0x0011beae
MOV R13,RAX
TEST RAX,RAX
MOV EAX,0xffffffff
JZ 0x0011feba
MOVSXD RAX,dword ptr [R14 + 0x78]
LEA RCX,[RAX + RAX*0x4]
LEA RDI,[RCX*0x8]
ADD RDI,R13
MOVSXD RCX,EBX
SUB RCX,RAX
SHL RCX,0x3
LEA RDX,[RCX + RCX*0x4]
XOR ESI,ESI
CALL 0x0010e340
MOV qword ptr [R14 + 0x80],R13
MOV dword ptr [R14 + 0x78],EBX
MOV RDX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x4]
MOV RSI,qword ptr [RSP + 0x8]
LAB_0011fe77:
MOV RAX,qword ptr [R14 + 0x80]
MOV EDI,ESI
LEA RDI,[RDI + RDI*0x4]
LEA RAX,[RAX + RDI*0x8]
MOV dword ptr [RAX],ESI
CMP ECX,0xe0
JL 0x0011fe9e
MOV RDI,qword ptr [R14 + 0x68]
MOV ESI,ECX
MOV RSI,qword ptr [RDI + RSI*0x8]
INC dword ptr [RSI]
LAB_0011fe9e:
MOV dword ptr [RAX + 0x4],ECX
MOVUPS XMM0,xmmword ptr [RDX + 0x8]
MOVUPS xmmword ptr [RAX + 0x8],XMM0
MOVUPS XMM0,xmmword ptr [RDX + 0x18]
MOVUPS xmmword ptr [RAX + 0x18],XMM0
XOR EAX,EAX
JMP 0x0011feba
LAB_0011feb5:
MOV EAX,0xffffffff
LAB_0011feba:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0011fec8:
RET
|
int8 JS_NewClass1(long param_1,uint param_2,long param_3,uint param_4)
{
uint *puVar1;
int iVar2;
int *piVar3;
int8 uVar4;
long lVar5;
long lVar6;
long lVar7;
uint uVar8;
int8 *puVar9;
uint uVar10;
ulong uVar11;
if (0xffff < param_2) {
return 0xffffffff;
}
uVar8 = *(uint *)(param_1 + 0x78);
if (param_2 < uVar8) {
if (*(int *)(*(long *)(param_1 + 0x80) + (ulong)param_2 * 0x28) != 0) {
return 0xffffffff;
}
if (param_2 < uVar8) goto LAB_0011fe77;
}
uVar8 = (uVar8 >> 1) + uVar8;
if ((int)uVar8 < (int)(param_2 + 1)) {
uVar8 = param_2 + 1;
}
uVar10 = 0x3d;
if (0x3d < (int)uVar8) {
uVar10 = uVar8;
}
lVar6 = *(long *)(param_1 + 0x90);
uVar11 = (ulong)uVar10;
if (lVar6 != param_1 + 0x88) {
do {
lVar5 = js_realloc_rt(param_1,*(int8 *)(lVar6 + 0x20),uVar11 << 4);
if (lVar5 == 0) {
return 0xffffffff;
}
iVar2 = *(int *)(param_1 + 0x78);
if (iVar2 < (int)uVar10) {
lVar7 = uVar11 - (long)iVar2;
puVar9 = (int8 *)((long)iVar2 * 0x10 + lVar5 + 8);
do {
*(int4 *)(puVar9 + -1) = 0;
*puVar9 = 2;
puVar9 = puVar9 + 2;
lVar7 = lVar7 + -1;
} while (lVar7 != 0);
}
*(long *)(lVar6 + 0x20) = lVar5;
lVar6 = *(long *)(lVar6 + 8);
} while (lVar6 != param_1 + 0x88);
}
lVar6 = js_realloc_rt(param_1,*(int8 *)(param_1 + 0x80),uVar11 * 0x28);
if (lVar6 == 0) {
return 0xffffffff;
}
memset((void *)((long)*(int *)(param_1 + 0x78) * 0x28 + lVar6),0,
((long)(int)uVar10 - (long)*(int *)(param_1 + 0x78)) * 0x28);
*(long *)(param_1 + 0x80) = lVar6;
*(uint *)(param_1 + 0x78) = uVar10;
LAB_0011fe77:
puVar1 = (uint *)(*(long *)(param_1 + 0x80) + (ulong)param_2 * 0x28);
*puVar1 = param_2;
if (0xdf < (int)param_4) {
piVar3 = *(int **)(*(long *)(param_1 + 0x68) + (ulong)param_4 * 8);
*piVar3 = *piVar3 + 1;
}
puVar1[1] = param_4;
uVar4 = *(int8 *)(param_3 + 0x10);
*(int8 *)(puVar1 + 2) = *(int8 *)(param_3 + 8);
*(int8 *)(puVar1 + 4) = uVar4;
uVar4 = *(int8 *)(param_3 + 0x20);
*(int8 *)(puVar1 + 6) = *(int8 *)(param_3 + 0x18);
*(int8 *)(puVar1 + 8) = uVar4;
return 0;
}
| |
40,787 | lunasvg::Font::xHeight() const | dmazzella[P]pylunasvg/lunasvg/source/graphics.cpp | float Font::xHeight() const
{
plutovg_rect_t extents = {0};
if(m_size > 0.f && !m_face.isNull())
plutovg_font_face_get_glyph_metrics(m_face.get(), m_size, 'x', nullptr, nullptr, &extents);
return extents.h;
} | O1 | cpp | lunasvg::Font::xHeight() const:
subq $0x18, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movss 0x8(%rdi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xd84b
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xd84b
movq %rsp, %r8
movl $0x78, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2501f
movss 0xc(%rsp), %xmm0
addq $0x18, %rsp
retq
| _ZNK7lunasvg4Font7xHeightEv:
sub rsp, 18h
xorps xmm0, xmm0
movaps [rsp+18h+var_18], xmm0
movss xmm0, dword ptr [rdi+8]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jbe short loc_D84B
mov rdi, [rdi]
test rdi, rdi
jz short loc_D84B
mov r8, rsp
mov esi, 78h ; 'x'
xor edx, edx
xor ecx, ecx
call plutovg_font_face_get_glyph_metrics
loc_D84B:
movss xmm0, dword ptr [rsp+18h+var_18+0Ch]
add rsp, 18h
retn
| float lunasvg::Font::xHeight(lunasvg::Font *this)
{
long long v1; // rdi
__int128 v3; // [rsp+0h] [rbp-18h] BYREF
v3 = 0LL;
if ( *((float *)this + 2) > 0.0 )
{
v1 = *(_QWORD *)this;
if ( v1 )
((void ( *)(long long, long long, _QWORD, _QWORD, __int128 *))plutovg_font_face_get_glyph_metrics)(
v1,
120LL,
0LL,
0LL,
&v3);
}
return *((float *)&v3 + 3);
}
| xHeight:
SUB RSP,0x18
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVSS XMM0,dword ptr [RDI + 0x8]
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JBE 0x0010d84b
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x0010d84b
MOV R8,RSP
MOV ESI,0x78
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0012501f
LAB_0010d84b:
MOVSS XMM0,dword ptr [RSP + 0xc]
ADD RSP,0x18
RET
|
/* lunasvg::Font::xHeight() const */
int4 __thiscall lunasvg::Font::xHeight(Font *this)
{
int8 local_18;
int8 uStack_10;
local_18 = 0;
uStack_10 = 0;
if ((0.0 < *(float *)(this + 8)) && (*(long *)this != 0)) {
plutovg_font_face_get_glyph_metrics(*(long *)this,0x78,0,0,&local_18);
}
return uStack_10._4_4_;
}
| |
40,788 | void OpenSubdiv::v3_6_0::Bfr::Surface<float>::GatherControlPoints<double>(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | void
Surface<REAL>::GatherControlPoints(
REAL_MESH const meshPoints[], PointDescriptor const & meshDesc,
REAL controlPoints[], PointDescriptor const & controlDesc) const {
//
// Assemble parameters of the point copy operation and apply:
//
typedef points::CopyConsecutive<REAL,REAL_MESH> PointCopier;
typename PointCopier::Parameters copyParams;
copyParams.pointData = meshPoints;
copyParams.pointSize = meshDesc.size;
copyParams.pointStride = meshDesc.stride;
copyParams.srcCount = GetNumControlPoints();
copyParams.srcIndices = _data.getCVIndices();
copyParams.resultData = controlPoints;
copyParams.resultStride = controlDesc.stride;
PointCopier::Apply(copyParams);
} | O0 | cpp | void OpenSubdiv::v3_6_0::Bfr::Surface<float>::GatherControlPoints<double>(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&) const:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x4c(%rbp)
callq 0xce660
movq -0x60(%rbp), %rdi
movl %eax, -0x40(%rbp)
callq 0xc5710
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x30(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xd4fc0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19GatherControlPointsIfEEvPKT_RKNS3_15PointDescriptorEPdSA_:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rdi, [rbp+var_8]
mov [rbp+var_60], rdi
mov rax, [rbp+var_10]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_50], eax
mov rax, [rbp+var_18]
mov eax, [rax+4]
mov [rbp+var_4C], eax
call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19GetNumControlPointsEv; OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumControlPoints(void)
mov rdi, [rbp+var_60]; this
mov [rbp+var_40], eax
call __ZNK10OpenSubdiv6v3_6_03Bfr8internal11SurfaceData12getCVIndicesEv; OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::getCVIndices(void)
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov eax, [rax+4]
mov [rbp+var_30], eax
lea rdi, [rbp+var_58]
call __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5ApplyERKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::Parameters const&)
add rsp, 60h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::GatherControlPoints<float>(
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a1,
long long a2,
_DWORD *a3,
long long a4,
long long a5)
{
long long v6; // [rsp+8h] [rbp-58h] BYREF
int v7; // [rsp+10h] [rbp-50h]
int v8; // [rsp+14h] [rbp-4Ch]
long long CVIndices; // [rsp+18h] [rbp-48h]
int NumControlPoints; // [rsp+20h] [rbp-40h]
long long v11; // [rsp+28h] [rbp-38h]
int v12; // [rsp+30h] [rbp-30h]
long long v13; // [rsp+38h] [rbp-28h]
long long v14; // [rsp+40h] [rbp-20h]
_DWORD *v15; // [rsp+48h] [rbp-18h]
long long v16; // [rsp+50h] [rbp-10h]
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v17; // [rsp+58h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v6 = a2;
v7 = *a3;
v8 = a3[1];
NumControlPoints = OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumControlPoints(a1);
CVIndices = OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData::getCVIndices(a1);
v11 = v14;
v12 = *(_DWORD *)(v13 + 4);
return OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::Apply(&v6);
}
| |||
40,789 | void OpenSubdiv::v3_6_0::Bfr::Surface<float>::GatherControlPoints<double>(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | void
Surface<REAL>::GatherControlPoints(
REAL_MESH const meshPoints[], PointDescriptor const & meshDesc,
REAL controlPoints[], PointDescriptor const & controlDesc) const {
//
// Assemble parameters of the point copy operation and apply:
//
typedef points::CopyConsecutive<REAL,REAL_MESH> PointCopier;
typename PointCopier::Parameters copyParams;
copyParams.pointData = meshPoints;
copyParams.pointSize = meshDesc.size;
copyParams.pointStride = meshDesc.stride;
copyParams.srcCount = GetNumControlPoints();
copyParams.srcIndices = _data.getCVIndices();
copyParams.resultData = controlPoints;
copyParams.resultStride = controlDesc.stride;
PointCopier::Apply(copyParams);
} | O1 | cpp | void OpenSubdiv::v3_6_0::Bfr::Surface<float>::GatherControlPoints<double>(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&) const:
subq $0x38, %rsp
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movl (%rdx), %esi
movl %esi, 0x8(%rax)
movl 0x4(%rdx), %edx
movl %edx, 0xc(%rax)
movl 0x8(%rdi), %edx
movl %edx, 0x18(%rax)
movq (%rdi), %rdx
movq %rdx, 0x10(%rax)
movq %rcx, 0x20(%rax)
movl 0x4(%r8), %ecx
movl %ecx, 0x28(%rax)
movq %rax, %rdi
callq 0x3bb80
addq $0x38, %rsp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19GatherControlPointsIfEEvPKT_RKNS3_15PointDescriptorEPdSA_:
sub rsp, 38h
lea rax, [rsp+38h+var_30]
mov [rax], rsi
mov esi, [rdx]
mov [rax+8], esi
mov edx, [rdx+4]
mov [rax+0Ch], edx
mov edx, [rdi+8]
mov [rax+18h], edx
mov rdx, [rdi]
mov [rax+10h], rdx
mov [rax+20h], rcx
mov ecx, [r8+4]
mov [rax+28h], ecx
mov rdi, rax
call __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5ApplyERKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::Parameters const&)
add rsp, 38h
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::GatherControlPoints<float>(
long long *a1,
long long a2,
int *a3,
long long a4,
long long a5)
{
long long v6; // [rsp+8h] [rbp-30h] BYREF
int v7; // [rsp+10h] [rbp-28h]
int v8; // [rsp+14h] [rbp-24h]
long long v9; // [rsp+18h] [rbp-20h]
int v10; // [rsp+20h] [rbp-18h]
long long v11; // [rsp+28h] [rbp-10h]
int v12; // [rsp+30h] [rbp-8h]
v6 = a2;
v7 = *a3;
v8 = a3[1];
v10 = *((_DWORD *)a1 + 2);
v9 = *a1;
v11 = a4;
v12 = *(_DWORD *)(a5 + 4);
return OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::Apply(&v6);
}
| GatherControlPoints<float>:
SUB RSP,0x38
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX],RSI
MOV ESI,dword ptr [RDX]
MOV dword ptr [RAX + 0x8],ESI
MOV EDX,dword ptr [RDX + 0x4]
MOV dword ptr [RAX + 0xc],EDX
MOV EDX,dword ptr [RDI + 0x8]
MOV dword ptr [RAX + 0x18],EDX
MOV RDX,qword ptr [RDI]
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RAX + 0x20],RCX
MOV ECX,dword ptr [R8 + 0x4]
MOV dword ptr [RAX + 0x28],ECX
MOV RDI,RAX
CALL 0x0013bb80
ADD RSP,0x38
RET
|
/* void OpenSubdiv::v3_6_0::Bfr::Surface<double>::GatherControlPoints<float>(float const*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<double>::GatherControlPoints<float>
(Surface<double> *this,float *param_1,PointDescriptor *param_2,double *param_3,
PointDescriptor *param_4)
{
float *local_30;
int4 local_28;
int4 local_24;
int8 local_20;
int4 local_18;
double *local_10;
int4 local_8;
local_28 = *(int4 *)param_2;
local_24 = *(int4 *)(param_2 + 4);
local_18 = *(int4 *)(this + 8);
local_20 = *(int8 *)this;
local_8 = *(int4 *)(param_4 + 4);
local_30 = param_1;
local_10 = param_3;
points::CopyConsecutive<double,float>::Apply((Parameters *)&local_30);
return;
}
| |
40,790 | void OpenSubdiv::v3_6_0::Bfr::Surface<float>::GatherControlPoints<double>(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | void
Surface<REAL>::GatherControlPoints(
REAL_MESH const meshPoints[], PointDescriptor const & meshDesc,
REAL controlPoints[], PointDescriptor const & controlDesc) const {
//
// Assemble parameters of the point copy operation and apply:
//
typedef points::CopyConsecutive<REAL,REAL_MESH> PointCopier;
typename PointCopier::Parameters copyParams;
copyParams.pointData = meshPoints;
copyParams.pointSize = meshDesc.size;
copyParams.pointStride = meshDesc.stride;
copyParams.srcCount = GetNumControlPoints();
copyParams.srcIndices = _data.getCVIndices();
copyParams.resultData = controlPoints;
copyParams.resultStride = controlDesc.stride;
PointCopier::Apply(copyParams);
} | O3 | cpp | void OpenSubdiv::v3_6_0::Bfr::Surface<float>::GatherControlPoints<double>(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&) const:
subq $0x38, %rsp
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq (%rdx), %rdx
movq %rdx, 0x8(%rax)
movl 0x8(%rdi), %edx
movl %edx, 0x18(%rax)
movq (%rdi), %rdx
movq %rdx, 0x10(%rax)
movq %rcx, 0x20(%rax)
movl 0x4(%r8), %ecx
movl %ecx, 0x28(%rax)
movq %rax, %rdi
callq 0x3b680
addq $0x38, %rsp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19GatherControlPointsIdEEvPKT_RKNS3_15PointDescriptorEPdSA_:
sub rsp, 38h
lea rax, [rsp+38h+var_30]
mov [rax], rsi
mov rdx, [rdx]
mov [rax+8], rdx
mov edx, [rdi+8]
mov [rax+18h], edx
mov rdx, [rdi]
mov [rax+10h], rdx
mov [rax+20h], rcx
mov ecx, [r8+4]
mov [rax+28h], ecx
mov rdi, rax
call __ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIddE5ApplyERKNS4_10ParametersE; OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,double>::Parameters const&)
add rsp, 38h
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::GatherControlPoints<double>(
long long *a1,
long long a2,
_QWORD *a3,
long long a4,
long long a5,
long long a6)
{
_QWORD v7[2]; // [rsp+8h] [rbp-30h] BYREF
long long v8; // [rsp+18h] [rbp-20h]
int v9; // [rsp+20h] [rbp-18h]
long long v10; // [rsp+28h] [rbp-10h]
v7[0] = a2;
v7[1] = *a3;
v9 = *((_DWORD *)a1 + 2);
v8 = *a1;
v10 = a4;
return OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,double>::Apply(
v7,
a2,
v8,
*(unsigned int *)(a5 + 4),
a5,
a6);
}
| GatherControlPoints<double>:
SUB RSP,0x38
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX],RSI
MOV RDX,qword ptr [RDX]
MOV qword ptr [RAX + 0x8],RDX
MOV EDX,dword ptr [RDI + 0x8]
MOV dword ptr [RAX + 0x18],EDX
MOV RDX,qword ptr [RDI]
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RAX + 0x20],RCX
MOV ECX,dword ptr [R8 + 0x4]
MOV dword ptr [RAX + 0x28],ECX
MOV RDI,RAX
CALL 0x0013b680
ADD RSP,0x38
RET
|
/* void OpenSubdiv::v3_6_0::Bfr::Surface<double>::GatherControlPoints<double>(double const*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<double>::GatherControlPoints<double>
(Surface<double> *this,double *param_1,PointDescriptor *param_2,double *param_3,
PointDescriptor *param_4)
{
double *local_30;
int8 local_28;
int8 local_20;
int4 local_18;
double *local_10;
int4 local_8;
local_28 = *(int8 *)param_2;
local_18 = *(int4 *)(this + 8);
local_20 = *(int8 *)this;
local_8 = *(int4 *)(param_4 + 4);
local_30 = param_1;
local_10 = param_3;
points::CopyConsecutive<double,double>::Apply((Parameters *)&local_30);
return;
}
| |
40,791 | ma_apply_redo_bitmap_new_page | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info,
LSN lsn __attribute__ ((unused)),
const uchar *header)
{
MARIA_SHARE *share= info->s;
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
my_bool error;
pgcache_page_no_t from, to, min_from;
DBUG_ENTER("_ma_apply_redo_bitmap_new_page");
from= page_korr(header);
to= page_korr(header + PAGE_STORE_SIZE);
DBUG_PRINT("info", ("from: %lu to: %lu", (ulong)from, (ulong)to));
if ((from > to) ||
(from % bitmap->pages_covered) != 0 ||
(to % bitmap->pages_covered) != 0)
{
error= TRUE; /* corrupted log record */
goto err;
}
min_from= (share->state.state.data_file_length / bitmap->block_size - 1) /
bitmap->pages_covered + 1;
min_from*= bitmap->pages_covered;
if (from < min_from)
{
DBUG_PRINT("info", ("overwrite bitmap pages from %lu", (ulong)min_from));
/*
We have to overwrite. It could be that there was a bitmap page in
memory, covering a data page which went to disk, then crash: the
bitmap page is now full of zeros and is ==min_from, we have to overwrite
it with correct checksum.
*/
}
share->state.changed|= STATE_CHANGED;
bzero(info->buff, bitmap->block_size);
if (!(error=
_ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to,
info->buff)))
share->state.state.data_file_length= (to + 1) * bitmap->block_size;
err:
DBUG_RETURN(error);
} | O0 | c | ma_apply_redo_bitmap_new_page:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x43fe0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
addq $0x5, %rdi
callq 0x43fe0
movq %rax, -0x40(%rbp)
jmp 0x4449d
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x444d5
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
cmpq $0x0, %rdx
jne 0x444d5
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
cmpq $0x0, %rdx
je 0x444de
movb $0x1, -0x29(%rbp)
jmp 0x445aa
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x28(%rbp), %rcx
movl 0x134(%rcx), %ecx
xorl %edx, %edx
divq %rcx
subq $0x1, %rax
movq -0x28(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x138(%rax), %rax
imulq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x44532
jmp 0x4452e
jmp 0x44530
jmp 0x44532
movq -0x20(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x170(%rax)
movq -0x8(%rbp), %rax
movq 0x378(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x378(%rax), %r8
callq 0x445c0
movb %al, -0x29(%rbp)
cmpb $0x0, %al
jne 0x445a8
movq -0x40(%rbp), %rcx
addq $0x1, %rcx
movq -0x28(%rbp), %rax
movl 0x134(%rax), %eax
imulq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x445aa
jmp 0x445ac
movb -0x29(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_apply_redo_bitmap_new_page:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, 0A10h
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
call uint5korr
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
add rdi, 5
call uint5korr
mov [rbp+var_40], rax
jmp short $+2
loc_4449D:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
ja short loc_444D5
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
cmp rdx, 0
jnz short loc_444D5
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
cmp rdx, 0
jz short loc_444DE
loc_444D5:
mov [rbp+var_29], 1
jmp loc_445AA
loc_444DE:
mov rax, [rbp+var_20]
mov rax, [rax+40h]
mov rcx, [rbp+var_28]
mov ecx, [rcx+134h]
xor edx, edx
div rcx
sub rax, 1
mov rcx, [rbp+var_28]
xor edx, edx
div qword ptr [rcx+138h]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rax, [rax+138h]
imul rax, [rbp+var_48]
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jnb short loc_44532
jmp short $+2
loc_4452E:
jmp short $+2
loc_44530:
jmp short $+2
loc_44532:
mov rax, [rbp+var_20]
mov ecx, [rax+170h]
or ecx, 1
mov [rax+170h], ecx
mov rax, [rbp+var_8]
mov rdi, [rax+378h]
mov rax, [rbp+var_28]
mov eax, [rax+134h]
mov edx, eax
xor esi, esi
call _memset
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_40]
mov rax, [rbp+var_8]
mov r8, [rax+378h]
call _ma_bitmap_create_missing_into_pagecache
mov [rbp+var_29], al
cmp al, 0
jnz short loc_445A8
mov rcx, [rbp+var_40]
add rcx, 1
mov rax, [rbp+var_28]
mov eax, [rax+134h]
imul rcx, rax
mov rax, [rbp+var_20]
mov [rax+40h], rcx
loc_445A8:
jmp short $+2
loc_445AA:
jmp short $+2
loc_445AC:
mov al, [rbp+var_29]
mov [rbp+var_49], al
mov al, [rbp+var_49]
add rsp, 50h
pop rbp
retn
| char ma_apply_redo_bitmap_new_page(long long *a1, long long a2, unsigned int *a3)
{
unsigned long long v4; // [rsp+10h] [rbp-40h]
unsigned long long v5; // [rsp+18h] [rbp-38h]
char missing_into_pagecache; // [rsp+27h] [rbp-29h]
long long v7; // [rsp+28h] [rbp-28h]
long long v8; // [rsp+30h] [rbp-20h]
v8 = *a1;
v7 = *a1 + 2576;
v5 = uint5korr(a3);
v4 = uint5korr((unsigned int *)((char *)a3 + 5));
if ( v5 > v4 || v5 % *(_QWORD *)(v7 + 312) || v4 % *(_QWORD *)(v7 + 312) )
return 1;
*(_DWORD *)(v8 + 368) |= 1u;
memset(a1[111], 0LL, *(unsigned int *)(v7 + 308));
missing_into_pagecache = ma_bitmap_create_missing_into_pagecache(v8, v7, v5, v4, a1[111]);
if ( !missing_into_pagecache )
*(_QWORD *)(v8 + 64) = *(unsigned int *)(v7 + 308) * (v4 + 1);
return missing_into_pagecache;
}
| _ma_apply_redo_bitmap_new_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fe0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x5
CALL 0x00143fe0
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0014449d
LAB_0014449d:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x001444d5
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
CMP RDX,0x0
JNZ 0x001444d5
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
CMP RDX,0x0
JZ 0x001444de
LAB_001444d5:
MOV byte ptr [RBP + -0x29],0x1
JMP 0x001445aa
LAB_001444de:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x134]
XOR EDX,EDX
DIV RCX
SUB RAX,0x1
MOV RCX,qword ptr [RBP + -0x28]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x138]
IMUL RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JNC 0x00144532
JMP 0x0014452e
LAB_0014452e:
JMP 0x00144530
LAB_00144530:
JMP 0x00144532
LAB_00144532:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x1
MOV dword ptr [RAX + 0x170],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x378]
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x8]
MOV R8,qword ptr [RAX + 0x378]
CALL 0x001445c0
MOV byte ptr [RBP + -0x29],AL
CMP AL,0x0
JNZ 0x001445a8
MOV RCX,qword ptr [RBP + -0x40]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x134]
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x40],RCX
LAB_001445a8:
JMP 0x001445aa
LAB_001445aa:
JMP 0x001445ac
LAB_001445ac:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x49],AL
MOV AL,byte ptr [RBP + -0x49]
ADD RSP,0x50
POP RBP
RET
|
char _ma_apply_redo_bitmap_new_page(long *param_1,int8 param_2,long param_3)
{
long lVar1;
ulong uVar2;
ulong uVar3;
char local_31;
lVar1 = *param_1;
uVar2 = uint5korr(param_3);
uVar3 = uint5korr(param_3 + 5);
if (((uVar3 < uVar2) || (uVar2 % *(ulong *)(lVar1 + 0xb48) != 0)) ||
(uVar3 % *(ulong *)(lVar1 + 0xb48) != 0)) {
local_31 = '\x01';
}
else {
*(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 1;
memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar1 + 0xb44));
local_31 = _ma_bitmap_create_missing_into_pagecache
(lVar1,lVar1 + 0xa10,uVar2,uVar3,param_1[0x6f]);
if (local_31 == '\0') {
*(ulong *)(lVar1 + 0x40) = (uVar3 + 1) * (ulong)*(uint *)(lVar1 + 0xb44);
}
}
return local_31;
}
| |
40,792 | nglog::(anonymous namespace)::LogCleaner::IsLogFromCurrentProject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | ng-log[P]ng-log/src/logging.cc | bool LogCleaner::IsLogFromCurrentProject(
const string& filepath, const string& base_filename,
const string& filename_extension) const {
// We should remove duplicated delimiters from `base_filename`, e.g.,
// before: "/tmp//<base_filename>.<create_time>.<pid>"
// after: "/tmp/<base_filename>.<create_time>.<pid>"
string cleaned_base_filename;
const char* const dir_delim_end =
possible_dir_delim + sizeof(possible_dir_delim);
size_t real_filepath_size = filepath.size();
for (char c : base_filename) {
if (cleaned_base_filename.empty()) {
cleaned_base_filename += c;
} else if (std::find(possible_dir_delim, dir_delim_end, c) ==
dir_delim_end ||
(!cleaned_base_filename.empty() &&
c != cleaned_base_filename[cleaned_base_filename.size() - 1])) {
cleaned_base_filename += c;
}
}
// Return early if the filename doesn't start with `cleaned_base_filename`.
if (filepath.find(cleaned_base_filename) != 0) {
return false;
}
// Check if in the string `filename_extension` is right next to
// `cleaned_base_filename` in `filepath` if the user
// has set a custom filename extension.
if (!filename_extension.empty()) {
if (cleaned_base_filename.size() >= real_filepath_size) {
return false;
}
// for origin version, `filename_extension` is middle of the `filepath`.
string ext = filepath.substr(cleaned_base_filename.size(),
filename_extension.size());
if (ext == filename_extension) {
cleaned_base_filename += filename_extension;
} else {
// for new version, `filename_extension` is right of the `filepath`.
if (filename_extension.size() >= real_filepath_size) {
return false;
}
real_filepath_size = filepath.size() - filename_extension.size();
if (filepath.substr(real_filepath_size) != filename_extension) {
return false;
}
}
}
// The characters after `cleaned_base_filename` should match the format:
// YYYYMMDD-HHMMSS.pid
for (size_t i = cleaned_base_filename.size(); i < real_filepath_size; i++) {
const char& c = filepath[i];
if (i <= cleaned_base_filename.size() + 7) { // 0 ~ 7 : YYYYMMDD
if (c < '0' || c > '9') {
return false;
}
} else if (i == cleaned_base_filename.size() + 8) { // 8: -
if (c != '-') {
return false;
}
} else if (i <= cleaned_base_filename.size() + 14) { // 9 ~ 14: HHMMSS
if (c < '0' || c > '9') {
return false;
}
} else if (i == cleaned_base_filename.size() + 15) { // 15: .
if (c != '.') {
return false;
}
} else if (i >= cleaned_base_filename.size() + 16) { // 16+: pid
if (c < '0' || c > '9') {
return false;
}
}
}
return true;
} | O0 | cpp | nglog::(anonymous namespace)::LogCleaner::IsLogFromCurrentProject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x9a60
leaq 0x37bad(%rip), %rax # 0x4d3f8
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x94f0
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x9690
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0x9d90
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x1b420
testb $0x1, %al
jne 0x15898
jmp 0x1598d
leaq -0x68(%rbp), %rdi
callq 0x1b460
movb (%rax), %al
movb %al, -0x71(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x9c30
testb $0x1, %al
jne 0x158b5
jmp 0x158dd
movsbl -0x71(%rbp), %esi
leaq -0x48(%rbp), %rdi
callq 0x9450
jmp 0x158c4
jmp 0x1597d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x15d7f
leaq 0x37b14(%rip), %rdi # 0x4d3f8
leaq 0x37b0e(%rip), %rsi # 0x4d3f9
leaq -0x71(%rbp), %rdx
callq 0x187e0
movq %rax, -0xe0(%rbp)
jmp 0x158fd
movq -0xe0(%rbp), %rax
leaq 0x37aed(%rip), %rcx # 0x4d3f8
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x1596a
leaq -0x48(%rbp), %rdi
callq 0x9c30
testb $0x1, %al
jne 0x1597b
movsbl -0x71(%rbp), %eax
movl %eax, -0xf4(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x94f0
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x9e40
movq %rax, -0xe8(%rbp)
jmp 0x15956
movl -0xf4(%rbp), %eax
movq -0xe8(%rbp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x1597b
movsbl -0x71(%rbp), %esi
leaq -0x48(%rbp), %rdi
callq 0x9450
jmp 0x15979
jmp 0x1597b
jmp 0x1597d
jmp 0x1597f
leaq -0x68(%rbp), %rdi
callq 0x1b480
jmp 0x15882
movq -0x18(%rbp), %rdi
leaq -0x48(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x9e50
cmpq $0x0, %rax
je 0x159b7
movb $0x0, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
jmp 0x15d68
movq -0x28(%rbp), %rdi
callq 0x9c30
testb $0x1, %al
jne 0x15b48
leaq -0x48(%rbp), %rdi
callq 0x94f0
cmpq -0x58(%rbp), %rax
jb 0x159ea
movb $0x0, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
jmp 0x15d68
movq -0x18(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x94f0
movq %rax, -0x100(%rbp)
movq -0x28(%rbp), %rdi
callq 0x94f0
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
movq %rax, %rcx
leaq -0xa8(%rbp), %rdi
callq 0x9750
jmp 0x15a2d
movq -0x28(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x1b4a0
testb $0x1, %al
jne 0x15a43
jmp 0x15a77
movq -0x28(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x9980
jmp 0x15a52
jmp 0x15b20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x9ea8
jmp 0x15d7f
movq -0x28(%rbp), %rdi
callq 0x94f0
cmpq -0x58(%rbp), %rax
jb 0x15a99
movb $0x0, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
jmp 0x15b2a
movq -0x18(%rbp), %rdi
callq 0x94f0
movq %rax, -0x110(%rbp)
movq -0x28(%rbp), %rdi
callq 0x94f0
movq %rax, %rcx
movq -0x110(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
movq $-0x1, %rcx
callq 0x9750
jmp 0x15ae0
movq -0x28(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x1b530
movb %al, -0x111(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x9ea8
movb -0x111(%rbp), %al
testb $0x1, %al
jne 0x15b0e
jmp 0x15b1e
movb $0x0, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
jmp 0x15b2a
jmp 0x15b20
movl $0x0, -0x88(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x9ea8
movl -0x88(%rbp), %eax
testl %eax, %eax
jne 0x15d68
jmp 0x15b46
jmp 0x15b48
leaq -0x48(%rbp), %rdi
callq 0x94f0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x15d5a
movq -0x18(%rbp), %rdi
movq -0xd0(%rbp), %rsi
callq 0x9800
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x94f0
movq %rax, %rcx
movq -0x120(%rbp), %rax
addq $0x7, %rcx
cmpq %rcx, %rax
ja 0x15be0
movq -0xd8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x15bc8
movq -0xd8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0x15bdb
movb $0x0, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
jmp 0x15d68
jmp 0x15d41
movq -0xd0(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x94f0
movq %rax, %rcx
movq -0x128(%rbp), %rax
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x15c31
movq -0xd8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x15c2c
movb $0x0, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
jmp 0x15d68
jmp 0x15d3f
movq -0xd0(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x94f0
movq %rax, %rcx
movq -0x130(%rbp), %rax
addq $0xe, %rcx
cmpq %rcx, %rax
ja 0x15c91
movq -0xd8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x15c79
movq -0xd8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0x15c8c
movb $0x0, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
jmp 0x15d68
jmp 0x15d3d
movq -0xd0(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x94f0
movq %rax, %rcx
movq -0x138(%rbp), %rax
addq $0xf, %rcx
cmpq %rcx, %rax
jne 0x15cdf
movq -0xd8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x15cdd
movb $0x0, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
jmp 0x15d68
jmp 0x15d3b
movq -0xd0(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x94f0
movq %rax, %rcx
movq -0x140(%rbp), %rax
addq $0x10, %rcx
cmpq %rcx, %rax
jb 0x15d39
movq -0xd8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x15d27
movq -0xd8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0x15d37
movb $0x0, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
jmp 0x15d68
jmp 0x15d39
jmp 0x15d3b
jmp 0x15d3d
jmp 0x15d3f
jmp 0x15d41
jmp 0x15d43
movq -0xd0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
jmp 0x15b58
movb $0x1, -0x1(%rbp)
movl $0x1, -0x88(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x9ea8
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
leaq -0x48(%rbp), %rdi
callq 0x9ea8
movq -0x80(%rbp), %rdi
callq 0x9d00
nopw %cs:(%rax,%rax)
| _ZNK5nglog12_GLOBAL__N_110LogCleaner23IsLogFromCurrentProjectERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_:
push rbp
mov rbp, rsp
sub rsp, 140h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
lea rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
lea rax, _ZN5nglog12_GLOBAL__N_118possible_dir_delimE; nglog::`anonymous namespace'::possible_dir_delim
add rax, 1
mov [rbp+var_50], rax
mov rdi, [rbp+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rdi, [rbp+var_60]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rbp+var_68], rax
mov rdi, [rbp+var_60]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rbp+var_70], rax
loc_15882:
lea rdi, [rbp+var_68]
lea rsi, [rbp+var_70]
call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&)
test al, 1
jnz short loc_15898
jmp loc_1598D
loc_15898:
lea rdi, [rbp+var_68]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
mov al, [rax]
mov [rbp+var_71], al
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_158B5
jmp short loc_158DD
loc_158B5:
movsx esi, [rbp+var_71]
lea rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_158C4:
jmp loc_1597D
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
jmp loc_15D7F
loc_158DD:
lea rdi, _ZN5nglog12_GLOBAL__N_118possible_dir_delimE; nglog::`anonymous namespace'::possible_dir_delim
lea rsi, _ZTSN5nglog4base6LoggerE; type descriptor name
lea rdx, [rbp+var_71]
call _ZSt4findIPKccET_S2_S2_RKT0_; std::find<char const*,char>(char const*,char const*,char const&)
mov [rbp+var_E0], rax
jmp short $+2
loc_158FD:
mov rax, [rbp+var_E0]
lea rcx, _ZN5nglog12_GLOBAL__N_118possible_dir_delimE; nglog::`anonymous namespace'::possible_dir_delim
add rcx, 1
cmp rax, rcx
jz short loc_1596A
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_1597B
movsx eax, [rbp+var_71]
mov [rbp+var_F4], eax
lea rdi, [rbp+var_48]
mov [rbp+var_F0], rdi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rbp+var_F0]
mov rsi, rax
dec rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov [rbp+var_E8], rax
jmp short $+2
loc_15956:
mov eax, [rbp+var_F4]
mov rcx, [rbp+var_E8]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_1597B
loc_1596A:
movsx esi, [rbp+var_71]
lea rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_15979:
jmp short $+2
loc_1597B:
jmp short $+2
loc_1597D:
jmp short $+2
loc_1597F:
lea rdi, [rbp+var_68]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
jmp loc_15882
loc_1598D:
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_48]
xor eax, eax
mov edx, eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m; std::string::find(std::string const&,ulong)
cmp rax, 0
jz short loc_159B7
mov [rbp+var_1], 0
mov [rbp+var_88], 1
jmp loc_15D68
loc_159B7:
mov rdi, [rbp+var_28]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_15B48
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
cmp rax, [rbp+var_58]
jb short loc_159EA
mov [rbp+var_1], 0
mov [rbp+var_88], 1
jmp loc_15D68
loc_159EA:
mov rax, [rbp+var_18]
mov [rbp+var_108], rax
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov [rbp+var_100], rax
mov rdi, [rbp+var_28]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rsi, [rbp+var_108]
mov rdx, [rbp+var_100]
mov rcx, rax
lea rdi, [rbp+var_A8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short $+2
loc_15A2D:
mov rsi, [rbp+var_28]
lea rdi, [rbp+var_A8]
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
test al, 1
jnz short loc_15A43
jmp short loc_15A77
loc_15A43:
mov rsi, [rbp+var_28]
lea rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_15A52:
jmp loc_15B20
mov rcx, rax
mov eax, edx
mov [rbp+var_80], rcx
mov [rbp+var_84], eax
lea rdi, [rbp+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_15D7F
loc_15A77:
mov rdi, [rbp+var_28]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
cmp rax, [rbp+var_58]
jb short loc_15A99
mov [rbp+var_1], 0
mov [rbp+var_88], 1
jmp loc_15B2A
loc_15A99:
mov rdi, [rbp+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov [rbp+var_110], rax
mov rdi, [rbp+var_28]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rbp+var_110]
sub rax, rcx
mov [rbp+var_58], rax
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_58]
lea rdi, [rbp+var_C8]
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short $+2
loc_15AE0:
mov rsi, [rbp+var_28]
lea rdi, [rbp+var_C8]
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&)
mov [rbp+var_111], al
lea rdi, [rbp+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, [rbp+var_111]
test al, 1
jnz short loc_15B0E
jmp short loc_15B1E
loc_15B0E:
mov [rbp+var_1], 0
mov [rbp+var_88], 1
jmp short loc_15B2A
loc_15B1E:
jmp short $+2
loc_15B20:
mov [rbp+var_88], 0
loc_15B2A:
lea rdi, [rbp+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov eax, [rbp+var_88]
test eax, eax
jnz loc_15D68
jmp short $+2
loc_15B46:
jmp short $+2
loc_15B48:
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov [rbp+var_D0], rax
loc_15B58:
mov rax, [rbp+var_D0]
cmp rax, [rbp+var_58]
jnb loc_15D5A
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_D0]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov [rbp+var_D8], rax
mov rax, [rbp+var_D0]
mov [rbp+var_120], rax
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rbp+var_120]
add rcx, 7
cmp rax, rcx
ja short loc_15BE0
mov rax, [rbp+var_D8]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_15BC8
mov rax, [rbp+var_D8]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jle short loc_15BDB
loc_15BC8:
mov [rbp+var_1], 0
mov [rbp+var_88], 1
jmp loc_15D68
loc_15BDB:
jmp loc_15D41
loc_15BE0:
mov rax, [rbp+var_D0]
mov [rbp+var_128], rax
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rbp+var_128]
add rcx, 8
cmp rax, rcx
jnz short loc_15C31
mov rax, [rbp+var_D8]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jz short loc_15C2C
mov [rbp+var_1], 0
mov [rbp+var_88], 1
jmp loc_15D68
loc_15C2C:
jmp loc_15D3F
loc_15C31:
mov rax, [rbp+var_D0]
mov [rbp+var_130], rax
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rbp+var_130]
add rcx, 0Eh
cmp rax, rcx
ja short loc_15C91
mov rax, [rbp+var_D8]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_15C79
mov rax, [rbp+var_D8]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jle short loc_15C8C
loc_15C79:
mov [rbp+var_1], 0
mov [rbp+var_88], 1
jmp loc_15D68
loc_15C8C:
jmp loc_15D3D
loc_15C91:
mov rax, [rbp+var_D0]
mov [rbp+var_138], rax
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rbp+var_138]
add rcx, 0Fh
cmp rax, rcx
jnz short loc_15CDF
mov rax, [rbp+var_D8]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jz short loc_15CDD
mov [rbp+var_1], 0
mov [rbp+var_88], 1
jmp loc_15D68
loc_15CDD:
jmp short loc_15D3B
loc_15CDF:
mov rax, [rbp+var_D0]
mov [rbp+var_140], rax
lea rdi, [rbp+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rbp+var_140]
add rcx, 10h
cmp rax, rcx
jb short loc_15D39
mov rax, [rbp+var_D8]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_15D27
mov rax, [rbp+var_D8]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jle short loc_15D37
loc_15D27:
mov [rbp+var_1], 0
mov [rbp+var_88], 1
jmp short loc_15D68
loc_15D37:
jmp short $+2
loc_15D39:
jmp short $+2
loc_15D3B:
jmp short $+2
loc_15D3D:
jmp short $+2
loc_15D3F:
jmp short $+2
loc_15D41:
jmp short $+2
loc_15D43:
mov rax, [rbp+var_D0]
add rax, 1
mov [rbp+var_D0], rax
jmp loc_15B58
loc_15D5A:
mov [rbp+var_1], 1
mov [rbp+var_88], 1
loc_15D68:
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, [rbp+var_1]
and al, 1
add rsp, 140h
pop rbp
retn
loc_15D7F:
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_80]
call __Unwind_Resume
| char nglog::`anonymous namespace'::LogCleaner::IsLogFromCurrentProject(
long long a1,
long long a2,
long long a3,
long long a4)
{
long long v4; // rsi
unsigned long long v5; // rax
long long v6; // rax
unsigned long long v7; // rax
char v9; // [rsp+2Fh] [rbp-111h]
long long v10; // [rsp+30h] [rbp-110h]
long long v11; // [rsp+38h] [rbp-108h]
long long v12; // [rsp+40h] [rbp-100h]
int v13; // [rsp+4Ch] [rbp-F4h]
_BYTE *v14; // [rsp+68h] [rbp-D8h]
unsigned long long i; // [rsp+70h] [rbp-D0h]
_BYTE v16[32]; // [rsp+78h] [rbp-C8h] BYREF
_BYTE v17[32]; // [rsp+98h] [rbp-A8h] BYREF
int v18; // [rsp+B8h] [rbp-88h]
char v19; // [rsp+CFh] [rbp-71h] BYREF
long long v20; // [rsp+D0h] [rbp-70h] BYREF
long long v21; // [rsp+D8h] [rbp-68h] BYREF
long long v22; // [rsp+E0h] [rbp-60h]
unsigned long long v23; // [rsp+E8h] [rbp-58h]
char *v24; // [rsp+F0h] [rbp-50h]
_BYTE v25[32]; // [rsp+F8h] [rbp-48h] BYREF
long long v26; // [rsp+118h] [rbp-28h]
long long v27; // [rsp+120h] [rbp-20h]
long long v28; // [rsp+128h] [rbp-18h]
long long v29; // [rsp+130h] [rbp-10h]
char v30; // [rsp+13Fh] [rbp-1h]
v29 = a1;
v28 = a2;
v27 = a3;
v26 = a4;
std::string::basic_string(v25);
v24 = (char *)&nglog::`anonymous namespace'::possible_dir_delim + 1;
v23 = std::string::size(v28);
v22 = v27;
v21 = std::string::begin(v27);
v20 = std::string::end(v22);
while ( (__gnu_cxx::operator!=<char const*,std::string>(&v21, &v20) & 1) != 0 )
{
v19 = *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(&v21);
if ( (std::string::empty(v25) & 1) != 0
|| (_UNKNOWN *)std::find<char const*,char>(
&nglog::`anonymous namespace'::possible_dir_delim,
"N5nglog4base6LoggerE",
&v19) == (_UNKNOWN *)((char *)&nglog::`anonymous namespace'::possible_dir_delim + 1)
|| (std::string::empty(v25) & 1) == 0
&& (v13 = v19, v4 = std::string::size(v25) - 1, v13 != *(char *)std::string::operator[](v25, v4)) )
{
std::string::operator+=(v25, (unsigned int)v19);
}
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(&v21);
}
if ( std::string::find(v28, v25, 0LL) )
{
v30 = 0;
v18 = 1;
goto LABEL_48;
}
if ( (std::string::empty(v26) & 1) == 0 )
{
v5 = std::string::size(v25);
if ( v5 >= v23 )
{
v30 = 0;
v18 = 1;
goto LABEL_48;
}
v11 = v28;
v12 = std::string::size(v25);
v6 = std::string::size(v26);
std::string::substr(v17, v11, v12, v6);
if ( (std::operator==<char>(v17, v26) & 1) != 0 )
{
std::string::operator+=(v25, v26);
}
else
{
v7 = std::string::size(v26);
if ( v7 >= v23 )
{
v30 = 0;
v18 = 1;
goto LABEL_21;
}
v10 = std::string::size(v28);
v23 = v10 - std::string::size(v26);
std::string::substr(v16, v28, v23, -1LL);
v9 = std::operator!=<char>(v16, v26);
std::string::~string(v16);
if ( (v9 & 1) != 0 )
{
v30 = 0;
v18 = 1;
goto LABEL_21;
}
}
v18 = 0;
LABEL_21:
std::string::~string(v17);
if ( v18 )
goto LABEL_48;
}
for ( i = std::string::size(v25); i < v23; ++i )
{
v14 = (_BYTE *)std::string::operator[](v28, i);
if ( i > std::string::size(v25) + 7 )
{
if ( i == std::string::size(v25) + 8 )
{
if ( *v14 != 45 )
{
v30 = 0;
v18 = 1;
goto LABEL_48;
}
}
else if ( i > std::string::size(v25) + 14 )
{
if ( i == std::string::size(v25) + 15 )
{
if ( *v14 != 46 )
{
v30 = 0;
v18 = 1;
goto LABEL_48;
}
}
else if ( i >= std::string::size(v25) + 16 && ((char)*v14 < 48 || (char)*v14 > 57) )
{
v30 = 0;
v18 = 1;
goto LABEL_48;
}
}
else if ( (char)*v14 < 48 || (char)*v14 > 57 )
{
v30 = 0;
v18 = 1;
goto LABEL_48;
}
}
else if ( (char)*v14 < 48 || (char)*v14 > 57 )
{
v30 = 0;
v18 = 1;
goto LABEL_48;
}
}
v30 = 1;
v18 = 1;
LABEL_48:
std::string::~string(v25);
return v30 & 1;
}
| IsLogFromCurrentProject:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
LEA RDI,[RBP + -0x48]
CALL 0x00109a60
LEA RAX,[0x14d3f8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001094f0
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00109690
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00109d90
MOV qword ptr [RBP + -0x70],RAX
LAB_00115882:
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x70]
CALL 0x0011b420
TEST AL,0x1
JNZ 0x00115898
JMP 0x0011598d
LAB_00115898:
LEA RDI,[RBP + -0x68]
CALL 0x0011b460
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x71],AL
LEA RDI,[RBP + -0x48]
CALL 0x00109c30
TEST AL,0x1
JNZ 0x001158b5
JMP 0x001158dd
LAB_001158b5:
MOVSX ESI,byte ptr [RBP + -0x71]
LAB_001158b9:
LEA RDI,[RBP + -0x48]
CALL 0x00109450
JMP 0x001158c4
LAB_001158c4:
JMP 0x0011597d
LAB_001158dd:
LEA RDI,[0x14d3f8]
LEA RSI,[0x14d3f9]
LEA RDX,[RBP + -0x71]
CALL 0x001187e0
MOV qword ptr [RBP + -0xe0],RAX
JMP 0x001158fd
LAB_001158fd:
MOV RAX,qword ptr [RBP + -0xe0]
LEA RCX,[0x14d3f8]
ADD RCX,0x1
CMP RAX,RCX
JZ 0x0011596a
LEA RDI,[RBP + -0x48]
CALL 0x00109c30
TEST AL,0x1
JNZ 0x0011597b
MOVSX EAX,byte ptr [RBP + -0x71]
MOV dword ptr [RBP + -0xf4],EAX
LEA RDI,[RBP + -0x48]
MOV qword ptr [RBP + -0xf0],RDI
CALL 0x001094f0
MOV RDI,qword ptr [RBP + -0xf0]
MOV RSI,RAX
DEC RSI
CALL 0x00109e40
MOV qword ptr [RBP + -0xe8],RAX
JMP 0x00115956
LAB_00115956:
MOV EAX,dword ptr [RBP + -0xf4]
MOV RCX,qword ptr [RBP + -0xe8]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x0011597b
LAB_0011596a:
MOVSX ESI,byte ptr [RBP + -0x71]
LEA RDI,[RBP + -0x48]
CALL 0x00109450
JMP 0x00115979
LAB_00115979:
JMP 0x0011597b
LAB_0011597b:
JMP 0x0011597d
LAB_0011597d:
JMP 0x0011597f
LAB_0011597f:
LEA RDI,[RBP + -0x68]
CALL 0x0011b480
JMP 0x00115882
LAB_0011598d:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x48]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00109e50
CMP RAX,0x0
JZ 0x001159b7
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x88],0x1
JMP 0x00115d68
LAB_001159b7:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00109c30
TEST AL,0x1
JNZ 0x00115b48
LEA RDI,[RBP + -0x48]
CALL 0x001094f0
CMP RAX,qword ptr [RBP + -0x58]
JC 0x001159ea
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x88],0x1
JMP 0x00115d68
LAB_001159ea:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x108],RAX
LEA RDI,[RBP + -0x48]
CALL 0x001094f0
MOV qword ptr [RBP + -0x100],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001094f0
MOV RSI,qword ptr [RBP + -0x108]
MOV RDX,qword ptr [RBP + -0x100]
MOV RCX,RAX
LEA RDI,[RBP + -0xa8]
CALL 0x00109750
JMP 0x00115a2d
LAB_00115a2d:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0xa8]
CALL 0x0011b4a0
TEST AL,0x1
JNZ 0x00115a43
JMP 0x00115a77
LAB_00115a43:
MOV RSI,qword ptr [RBP + -0x28]
LAB_00115a47:
LEA RDI,[RBP + -0x48]
CALL 0x00109980
JMP 0x00115a52
LAB_00115a52:
JMP 0x00115b20
LAB_00115a77:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001094f0
CMP RAX,qword ptr [RBP + -0x58]
JC 0x00115a99
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x88],0x1
JMP 0x00115b2a
LAB_00115a99:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001094f0
MOV qword ptr [RBP + -0x110],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001094f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x110]
SUB RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x58]
LEA RDI,[RBP + -0xc8]
MOV RCX,-0x1
CALL 0x00109750
LAB_00115ade:
JMP 0x00115ae0
LAB_00115ae0:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0xc8]
CALL 0x0011b530
MOV byte ptr [RBP + -0x111],AL
LEA RDI,[RBP + -0xc8]
CALL 0x00109ea8
MOV AL,byte ptr [RBP + -0x111]
TEST AL,0x1
JNZ 0x00115b0e
JMP 0x00115b1e
LAB_00115b0e:
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x88],0x1
JMP 0x00115b2a
LAB_00115b1e:
JMP 0x00115b20
LAB_00115b20:
MOV dword ptr [RBP + -0x88],0x0
LAB_00115b2a:
LEA RDI,[RBP + -0xa8]
CALL 0x00109ea8
MOV EAX,dword ptr [RBP + -0x88]
TEST EAX,EAX
JNZ 0x00115d68
JMP 0x00115b46
LAB_00115b46:
JMP 0x00115b48
LAB_00115b48:
LEA RDI,[RBP + -0x48]
CALL 0x001094f0
MOV qword ptr [RBP + -0xd0],RAX
LAB_00115b58:
MOV RAX,qword ptr [RBP + -0xd0]
CMP RAX,qword ptr [RBP + -0x58]
JNC 0x00115d5a
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0xd0]
CALL 0x00109800
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x120],RAX
LEA RDI,[RBP + -0x48]
CALL 0x001094f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x120]
ADD RCX,0x7
CMP RAX,RCX
JA 0x00115be0
MOV RAX,qword ptr [RBP + -0xd8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x00115bc8
MOV RAX,qword ptr [RBP + -0xd8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JLE 0x00115bdb
LAB_00115bc8:
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x88],0x1
JMP 0x00115d68
LAB_00115bdb:
JMP 0x00115d41
LAB_00115be0:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x128],RAX
LEA RDI,[RBP + -0x48]
CALL 0x001094f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x128]
ADD RCX,0x8
CMP RAX,RCX
JNZ 0x00115c31
MOV RAX,qword ptr [RBP + -0xd8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JZ 0x00115c2c
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x88],0x1
JMP 0x00115d68
LAB_00115c2c:
JMP 0x00115d3f
LAB_00115c31:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x130],RAX
LEA RDI,[RBP + -0x48]
CALL 0x001094f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x130]
ADD RCX,0xe
CMP RAX,RCX
JA 0x00115c91
MOV RAX,qword ptr [RBP + -0xd8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x00115c79
MOV RAX,qword ptr [RBP + -0xd8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JLE 0x00115c8c
LAB_00115c79:
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x88],0x1
JMP 0x00115d68
LAB_00115c8c:
JMP 0x00115d3d
LAB_00115c91:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x138],RAX
LEA RDI,[RBP + -0x48]
CALL 0x001094f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x138]
ADD RCX,0xf
CMP RAX,RCX
JNZ 0x00115cdf
MOV RAX,qword ptr [RBP + -0xd8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JZ 0x00115cdd
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x88],0x1
JMP 0x00115d68
LAB_00115cdd:
JMP 0x00115d3b
LAB_00115cdf:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x140],RAX
LEA RDI,[RBP + -0x48]
CALL 0x001094f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x140]
ADD RCX,0x10
CMP RAX,RCX
JC 0x00115d39
MOV RAX,qword ptr [RBP + -0xd8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x00115d27
MOV RAX,qword ptr [RBP + -0xd8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JLE 0x00115d37
LAB_00115d27:
MOV byte ptr [RBP + -0x1],0x0
MOV dword ptr [RBP + -0x88],0x1
JMP 0x00115d68
LAB_00115d37:
JMP 0x00115d39
LAB_00115d39:
JMP 0x00115d3b
LAB_00115d3b:
JMP 0x00115d3d
LAB_00115d3d:
JMP 0x00115d3f
LAB_00115d3f:
JMP 0x00115d41
LAB_00115d41:
JMP 0x00115d43
LAB_00115d43:
MOV RAX,qword ptr [RBP + -0xd0]
ADD RAX,0x1
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x00115b58
LAB_00115d5a:
MOV byte ptr [RBP + -0x1],0x1
MOV dword ptr [RBP + -0x88],0x1
LAB_00115d68:
LEA RDI,[RBP + -0x48]
CALL 0x00109ea8
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x140
POP RBP
RET
|
/* nglog::(anonymous namespace)::LogCleaner::IsLogFromCurrentProject(std::__cxx11::string const&,
std::__cxx11::string const&, std::__cxx11::string const&) const */
ulong __thiscall
nglog::(anonymous_namespace)::LogCleaner::IsLogFromCurrentProject
(LogCleaner *this,string *param_1,string *param_2,string *param_3)
{
char cVar1;
string *psVar2;
bool bVar3;
long lVar4;
ulong uVar5;
long lVar6;
char *pcVar7;
int8 uVar8;
ulong local_d8;
string local_d0 [32];
string local_b0 [32];
int local_90;
char local_79;
int8 local_78;
int8 local_70;
string *local_68;
ulong local_60;
char *local_58;
string local_50 [32];
string *local_30;
string *local_28;
string *local_20;
LogCleaner *local_18;
int1 local_9;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
std::__cxx11::string::string(local_50);
local_58 = "N5nglog4base6LoggerE";
local_60 = std::__cxx11::string::size();
local_68 = local_28;
local_70 = std::__cxx11::string::begin();
local_78 = std::__cxx11::string::end();
while (bVar3 = __gnu_cxx::operator!=
((__normal_iterator *)&local_70,(__normal_iterator *)&local_78), bVar3) {
pcVar7 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_70);
local_79 = *pcVar7;
uVar5 = std::__cxx11::string::empty();
if ((uVar5 & 1) == 0) {
pcVar7 = std::find<char_const*,char>("/N5nglog4base6LoggerE","N5nglog4base6LoggerE",&local_79)
;
if (pcVar7 == "N5nglog4base6LoggerE") {
LAB_0011596a:
std::__cxx11::string::operator+=(local_50,local_79);
}
else {
uVar5 = std::__cxx11::string::empty();
cVar1 = local_79;
if ((uVar5 & 1) == 0) {
std::__cxx11::string::size();
pcVar7 = (char *)std::__cxx11::string::operator[]((ulong)local_50);
if (cVar1 != *pcVar7) goto LAB_0011596a;
}
}
}
else {
/* try { // try from 001158b9 to 00115a2a has its CatchHandler @ 001158c9 */
std::__cxx11::string::operator+=(local_50,local_79);
}
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_70);
}
lVar4 = std::__cxx11::string::find(local_20,(ulong)local_50);
if (lVar4 != 0) {
local_9 = 0;
local_90 = 1;
goto LAB_00115d68;
}
uVar5 = std::__cxx11::string::empty();
if ((uVar5 & 1) == 0) {
uVar5 = std::__cxx11::string::size();
psVar2 = local_20;
if (local_60 <= uVar5) {
local_9 = 0;
local_90 = 1;
goto LAB_00115d68;
}
std::__cxx11::string::size();
std::__cxx11::string::size();
std::__cxx11::string::substr((ulong)local_b0,(ulong)psVar2);
uVar5 = std::operator==(local_b0,local_30);
if ((uVar5 & 1) == 0) {
uVar5 = std::__cxx11::string::size();
if (uVar5 < local_60) {
lVar4 = std::__cxx11::string::size();
lVar6 = std::__cxx11::string::size();
local_60 = lVar4 - lVar6;
std::__cxx11::string::substr((ulong)local_d0,(ulong)local_20);
bVar3 = std::operator!=(local_d0,local_30);
std::__cxx11::string::~string(local_d0);
if (!bVar3) goto LAB_00115b20;
local_9 = 0;
local_90 = 1;
}
else {
local_9 = 0;
local_90 = 1;
}
}
else {
/* try { // try from 00115a47 to 00115add has its CatchHandler @ 00115a57 */
std::__cxx11::string::operator+=(local_50,local_30);
LAB_00115b20:
local_90 = 0;
}
std::__cxx11::string::~string(local_b0);
if (local_90 != 0) goto LAB_00115d68;
}
for (local_d8 = std::__cxx11::string::size(); local_d8 < local_60; local_d8 = local_d8 + 1) {
pcVar7 = (char *)std::__cxx11::string::operator[]((ulong)local_20);
lVar4 = std::__cxx11::string::size();
if (lVar4 + 7U < local_d8) {
lVar4 = std::__cxx11::string::size();
if (local_d8 == lVar4 + 8U) {
if (*pcVar7 != '-') {
local_9 = 0;
local_90 = 1;
goto LAB_00115d68;
}
}
else {
lVar4 = std::__cxx11::string::size();
if (lVar4 + 0xeU < local_d8) {
lVar4 = std::__cxx11::string::size();
if (local_d8 == lVar4 + 0xfU) {
if (*pcVar7 != '.') {
local_9 = 0;
local_90 = 1;
goto LAB_00115d68;
}
}
else {
lVar4 = std::__cxx11::string::size();
if ((lVar4 + 0x10U <= local_d8) && ((*pcVar7 < '0' || ('9' < *pcVar7)))) {
local_9 = 0;
local_90 = 1;
goto LAB_00115d68;
}
}
}
else if ((*pcVar7 < '0') || ('9' < *pcVar7)) {
local_9 = 0;
local_90 = 1;
goto LAB_00115d68;
}
}
}
else if ((*pcVar7 < '0') || ('9' < *pcVar7)) {
local_9 = 0;
local_90 = 1;
goto LAB_00115d68;
}
}
local_9 = 1;
local_90 = 1;
LAB_00115d68:
uVar8 = std::__cxx11::string::~string(local_50);
return CONCAT71((int7)((ulong)uVar8 >> 8),local_9) & 0xffffffffffffff01;
}
| |
40,793 | LefDefParser::lefiTrackPattern::Destroy() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp | void
lefiTrackPattern::Destroy()
{
if (name_)
lefFree(name_);
clear();
name_ = 0;
start_ = 0;
numTracks_ = 0;
space_ = 0;
lefFree((char*) (layerNames_));
} | O3 | cpp | LefDefParser::lefiTrackPattern::Destroy():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xd798
callq 0x322d0
leaq 0x8(%rbx), %r14
cmpl $0x0, 0x28(%rbx)
jle 0xd7be
xorl %r15d, %r15d
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x322d0
incq %r15
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jl 0xd7a5
movq $0x0, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movl $0x0, 0x10(%r14)
movq 0x30(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x322d0
nop
| _ZN12LefDefParser16lefiTrackPattern7DestroyEv:
push r15
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi+8]; this
test rdi, rdi
jz short loc_D798
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_D798:
lea r14, [rbx+8]
cmp dword ptr [rbx+28h], 0
jle short loc_D7BE
xor r15d, r15d
loc_D7A5:
mov rax, [rbx+30h]
mov rdi, [rax+r15*8]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
inc r15
movsxd rax, dword ptr [rbx+28h]
cmp r15, rax
jl short loc_D7A5
loc_D7BE:
mov qword ptr [rbx+20h], 0
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
mov dword ptr [r14+10h], 0
mov rdi, [rbx+30h]; this
pop rbx
pop r14
pop r15
jmp _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
| long long LefDefParser::lefiTrackPattern::Destroy(LefDefParser::lefiTrackPattern *this, void *a2)
{
LefDefParser *v3; // rdi
long long v4; // r15
v3 = (LefDefParser *)*((_QWORD *)this + 1);
if ( v3 )
LefDefParser::lefFree(v3, a2);
if ( *((int *)this + 10) > 0 )
{
v4 = 0LL;
do
LefDefParser::lefFree(*(LefDefParser **)(*((_QWORD *)this + 6) + 8 * v4++), a2);
while ( v4 < *((int *)this + 10) );
}
*((_QWORD *)this + 4) = 0LL;
*(_OWORD *)((char *)this + 8) = 0LL;
*((_DWORD *)this + 6) = 0;
return LefDefParser::lefFree(*((LefDefParser **)this + 6), a2);
}
| Destroy:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
TEST RDI,RDI
JZ 0x0010d798
CALL 0x001322d0
LAB_0010d798:
LEA R14,[RBX + 0x8]
CMP dword ptr [RBX + 0x28],0x0
JLE 0x0010d7be
XOR R15D,R15D
LAB_0010d7a5:
MOV RAX,qword ptr [RBX + 0x30]
MOV RDI,qword ptr [RAX + R15*0x8]
CALL 0x001322d0
INC R15
MOVSXD RAX,dword ptr [RBX + 0x28]
CMP R15,RAX
JL 0x0010d7a5
LAB_0010d7be:
MOV qword ptr [RBX + 0x20],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
MOV dword ptr [R14 + 0x10],0x0
MOV RDI,qword ptr [RBX + 0x30]
POP RBX
POP R14
POP R15
JMP 0x001322d0
|
/* LefDefParser::lefiTrackPattern::Destroy() */
void __thiscall LefDefParser::lefiTrackPattern::Destroy(lefiTrackPattern *this)
{
long lVar1;
if (*(void **)(this + 8) != (void *)0x0) {
lefFree(*(void **)(this + 8));
}
if (0 < *(int *)(this + 0x28)) {
lVar1 = 0;
do {
lefFree(*(void **)(*(long *)(this + 0x30) + lVar1 * 8));
lVar1 = lVar1 + 1;
} while (lVar1 < *(int *)(this + 0x28));
}
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int4 *)(this + 0x18) = 0;
lefFree(*(void **)(this + 0x30));
return;
}
| |
40,794 | decrement_share_in_trans | eloqsql/storage/maria/maria_def.h | static inline void decrement_share_in_trans(MARIA_SHARE *share)
{
/* Internal tables doesn't have transactions */
DBUG_ASSERT(!share->internal_table);
if (!--share->in_trans)
free_maria_share(share);
else
mysql_mutex_unlock(&share->intern_lock);
} | O0 | c | decrement_share_in_trans:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x36e7e
movq -0x8(%rbp), %rcx
movl 0x7ac(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x7ac(%rcx)
cmpl $0x0, %eax
jne 0x36ea1
movq -0x8(%rbp), %rdi
callq 0x46e70
jmp 0x36eb1
movq -0x8(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x36540
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| decrement_share_in_trans:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_36E7E:
mov rcx, [rbp+var_8]
mov eax, [rcx+7ACh]
add eax, 0FFFFFFFFh
mov [rcx+7ACh], eax
cmp eax, 0
jnz short loc_36EA1
mov rdi, [rbp+var_8]
call free_maria_share
jmp short loc_36EB1
loc_36EA1:
mov rdi, [rbp+var_8]
add rdi, 8F0h
call inline_mysql_mutex_unlock_3
loc_36EB1:
add rsp, 10h
pop rbp
retn
| long long decrement_share_in_trans(long long a1)
{
int v1; // eax
v1 = *(_DWORD *)(a1 + 1964) - 1;
*(_DWORD *)(a1 + 1964) = v1;
if ( v1 )
return inline_mysql_mutex_unlock_3(a1 + 2288);
else
return free_maria_share(a1);
}
| decrement_share_in_trans:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00136e7e
LAB_00136e7e:
MOV RCX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RCX + 0x7ac]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x7ac],EAX
CMP EAX,0x0
JNZ 0x00136ea1
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00146e70
JMP 0x00136eb1
LAB_00136ea1:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8f0
CALL 0x00136540
LAB_00136eb1:
ADD RSP,0x10
POP RBP
RET
|
void decrement_share_in_trans(long param_1)
{
int iVar1;
iVar1 = *(int *)(param_1 + 0x7ac) + -1;
*(int *)(param_1 + 0x7ac) = iVar1;
if (iVar1 == 0) {
free_maria_share(param_1);
}
else {
inline_mysql_mutex_unlock(param_1 + 0x8f0);
}
return;
}
| |
40,795 | translog_mark_file_finished | eloqsql/storage/maria/ma_loghandler.c | static void translog_mark_file_finished(uint32 file)
{
int i;
struct st_file_counter *UNINIT_VAR(fc_ptr);
DBUG_ENTER("translog_mark_file_finished");
DBUG_PRINT("enter", ("file: %lu", (ulong) file));
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
DBUG_ASSERT(log_descriptor.unfinished_files.elements > 0);
for (i= 0;
i < (int) log_descriptor.unfinished_files.elements;
i++)
{
fc_ptr= dynamic_element(&log_descriptor.unfinished_files,
i, struct st_file_counter *);
if (fc_ptr->file == file)
{
break;
}
}
DBUG_ASSERT(i < (int) log_descriptor.unfinished_files.elements);
if (! --fc_ptr->counter)
delete_dynamic_element(&log_descriptor.unfinished_files, i);
mysql_mutex_unlock(&log_descriptor.unfinished_files_lock);
DBUG_VOID_RETURN;
} | O0 | c | translog_mark_file_finished:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x96575
leaq 0x3f1ea4(%rip), %rdi # 0x488420
addq $0x800e08, %rdi # imm = 0x800E08
leaq 0xc6f39(%rip), %rsi # 0x15d4c3
movl $0x58d, %edx # imm = 0x58D
callq 0x89fb0
jmp 0x96596
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0xbf2cd2(%rip), %eax # 0xc89278
jge 0x965d8
movq 0xbf2cc1(%rip), %rax # 0xc89270
movslq -0x8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x965cb
jmp 0x965d8
jmp 0x965cd
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x9659d
jmp 0x965da
jmp 0x965dc
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rcx)
cmpl $0x0, %eax
jne 0x96604
movl -0x8(%rbp), %esi
leaq 0x3f1e28(%rip), %rdi # 0x488420
addq $0x800e50, %rdi # imm = 0x800E50
callq 0xdfe70
leaq 0x3f1e15(%rip), %rdi # 0x488420
addq $0x800e08, %rdi # imm = 0x800E08
callq 0x8a020
jmp 0x96619
addq $0x10, %rsp
popq %rbp
retq
nop
| translog_mark_file_finished:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov rax, [rbp+var_10]
mov [rbp+var_10], rax
jmp short $+2
loc_96575:
lea rdi, log_descriptor
add rdi, 800E08h
lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 58Dh
call inline_mysql_mutex_lock_11
jmp short $+2
loc_96596:
mov [rbp+var_8], 0
loc_9659D:
mov eax, [rbp+var_8]
cmp eax, cs:dword_C89278
jge short loc_965D8
mov rax, cs:qword_C89270
movsxd rcx, [rbp+var_8]
shl rcx, 3
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov eax, [rax]
cmp eax, [rbp+var_4]
jnz short loc_965CB
jmp short loc_965D8
loc_965CB:
jmp short $+2
loc_965CD:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_8], eax
jmp short loc_9659D
loc_965D8:
jmp short $+2
loc_965DA:
jmp short $+2
loc_965DC:
mov rcx, [rbp+var_10]
mov eax, [rcx+4]
add eax, 0FFFFFFFFh
mov [rcx+4], eax
cmp eax, 0
jnz short loc_96604
mov esi, [rbp+var_8]
lea rdi, log_descriptor
add rdi, 800E50h
call delete_dynamic_element
loc_96604:
lea rdi, log_descriptor
add rdi, 800E08h
call inline_mysql_mutex_unlock_12
jmp short $+2
loc_96619:
add rsp, 10h
pop rbp
retn
| long long translog_mark_file_finished(int a1)
{
int v1; // eax
_DWORD *v3; // [rsp+0h] [rbp-10h]
int i; // [rsp+8h] [rbp-8h]
inline_mysql_mutex_lock_11(
(long long)&log_descriptor[1049025],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x58Du);
for ( i = 0; i < dword_C89278; ++i )
{
v3 = (_DWORD *)(8LL * i + qword_C89270);
if ( *v3 == a1 )
break;
}
v1 = v3[1] - 1;
v3[1] = v1;
if ( !v1 )
delete_dynamic_element(&log_descriptor[1049034], (unsigned int)i);
return inline_mysql_mutex_unlock_12((long long)&log_descriptor[1049025]);
}
| translog_mark_file_finished:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00196575
LAB_00196575:
LEA RDI,[0x588420]
ADD RDI,0x800e08
LEA RSI,[0x25d4c3]
MOV EDX,0x58d
CALL 0x00189fb0
JMP 0x00196596
LAB_00196596:
MOV dword ptr [RBP + -0x8],0x0
LAB_0019659d:
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [0x00d89278]
JGE 0x001965d8
MOV RAX,qword ptr [0x00d89270]
MOVSXD RCX,dword ptr [RBP + -0x8]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x4]
JNZ 0x001965cb
JMP 0x001965d8
LAB_001965cb:
JMP 0x001965cd
LAB_001965cd:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x0019659d
LAB_001965d8:
JMP 0x001965da
LAB_001965da:
JMP 0x001965dc
LAB_001965dc:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x4]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x4],EAX
CMP EAX,0x0
JNZ 0x00196604
MOV ESI,dword ptr [RBP + -0x8]
LEA RDI,[0x588420]
ADD RDI,0x800e50
CALL 0x001dfe70
LAB_00196604:
LEA RDI,[0x588420]
ADD RDI,0x800e08
CALL 0x0018a020
JMP 0x00196619
LAB_00196619:
ADD RSP,0x10
POP RBP
RET
|
void translog_mark_file_finished(int param_1)
{
int iVar1;
int *local_18;
int local_10;
inline_mysql_mutex_lock
(&DAT_00d89228,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x58d);
local_10 = 0;
while ((local_10 < DAT_00d89278 &&
(local_18 = (int *)(DAT_00d89270 + (long)local_10 * 8), *local_18 != param_1))) {
local_10 = local_10 + 1;
}
iVar1 = local_18[1];
local_18[1] = iVar1 + -1;
if (iVar1 + -1 == 0) {
delete_dynamic_element(&DAT_00d89270,local_10);
}
inline_mysql_mutex_unlock(&DAT_00d89228);
return;
}
| |
40,796 | google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/message_field.cc | void RepeatedImmutableMessageFieldGenerator::GenerateSerializedSizeCode(
io::Printer* printer) const {
printer->Print(
variables_,
"for (int i = 0; i < $name$_.size(); i++) {\n"
" size += com.google.protobuf.CodedOutputStream\n"
" .compute$group_or_message$Size($number$, $name$_.get(i));\n"
"}\n");
} | O0 | cpp | google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*) const:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x18, %rsi
leaq 0x2365e1(%rip), %rdx # 0x3ebb54
callq 0x3235f0
addq $0x18, %rsp
retq
nopl (%rax)
| _ZNK6google8protobuf8compiler4java38RepeatedImmutableMessageFieldGenerator26GenerateSerializedSizeCodeEPNS0_2io7PrinterE:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rsi, [rsp+18h+var_8]
mov rdi, [rsp+18h+var_10]
add rsi, 18h
lea rdx, aForIntI0INameS_0; "for (int i = 0; i < $name$_.size(); i++"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
add rsp, 18h
retn
| ||||
40,797 | google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/message_field.cc | void RepeatedImmutableMessageFieldGenerator::GenerateSerializedSizeCode(
io::Printer* printer) const {
printer->Print(
variables_,
"for (int i = 0; i < $name$_.size(); i++) {\n"
" size += com.google.protobuf.CodedOutputStream\n"
" .compute$group_or_message$Size($number$, $name$_.get(i));\n"
"}\n");
} | O3 | cpp | google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*) const:
movq %rsi, %rax
leaq 0x18(%rdi), %rsi
leaq 0xfefa6(%rip), %rdx # 0x1dcb20
movq %rax, %rdi
jmp 0x16cd32
| _ZNK6google8protobuf8compiler4java38RepeatedImmutableMessageFieldGenerator26GenerateSerializedSizeCodeEPNS0_2io7PrinterE:
mov rax, rsi
lea rsi, [rdi+18h]
lea rdx, aForIntI0INameS_0; "for (int i = 0; i < $name$_.size(); i++"...
mov rdi, rax; this
jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
| long long google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateSerializedSizeCode(
google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator *this,
google::protobuf::io::Printer *a2,
long long a3,
long long a4,
long long a5,
long long a6,
void *a7,
int a8,
char a9,
int a10,
int a11,
int a12,
int a13,
int a14,
int a15,
void *a16,
int a17,
char a18)
{
return google::protobuf::io::Printer::Print(a2, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18);
}
| GenerateSerializedSizeCode:
MOV RAX,RSI
LEA RSI,[RDI + 0x18]
LEA RDX,[0x2dcb20]
MOV RDI,RAX
JMP 0x0026cd32
|
/* google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateSerializedSizeCode(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateSerializedSizeCode
(RepeatedImmutableMessageFieldGenerator *this,Printer *param_1)
{
io::Printer::Print(param_1,(map *)(this + 0x18),
"for (int i = 0; i < $name$_.size(); i++) {\n size += com.google.protobuf.CodedOutputStream\n .compute$group_or_message$Size($number$, $name$_.get(i));\n}\n"
);
return;
}
| |
40,798 | parse_ident | bluesky950520[P]quickjs/quickjs.c | static JSAtom parse_ident(JSParseState *s, const uint8_t **pp,
BOOL *pident_has_escape, int c, BOOL is_private)
{
const uint8_t *p, *p_next;
char ident_buf[128], *buf;
size_t ident_size, ident_pos;
JSAtom atom = JS_ATOM_NULL;
p = *pp;
buf = ident_buf;
ident_size = sizeof(ident_buf);
ident_pos = 0;
if (is_private)
buf[ident_pos++] = '#';
for(;;) {
if (c < 0x80) {
buf[ident_pos++] = c;
} else {
ident_pos += utf8_encode((uint8_t*)buf + ident_pos, c);
}
c = *p;
p_next = p + 1;
if (c == '\\' && *p_next == 'u') {
c = lre_parse_escape(&p_next, TRUE);
*pident_has_escape = TRUE;
} else if (c >= 0x80) {
c = utf8_decode(p, &p_next);
/* no need to test for invalid UTF-8, 0xFFFD is not ident_next */
}
if (!lre_js_is_ident_next(c))
break;
p = p_next;
if (unlikely(ident_pos >= ident_size - UTF8_CHAR_LEN_MAX)) {
if (ident_realloc(s->ctx, &buf, &ident_size, ident_buf))
goto done;
}
}
/* buf is pure ASCII or UTF-8 encoded */
atom = JS_NewAtomLen(s->ctx, buf, ident_pos);
done:
if (unlikely(buf != ident_buf))
js_free(s->ctx, buf);
*pp = p;
return atom;
} | O3 | c | parse_ident:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %ecx, %r15d
movq %rdx, %r12
movq %rdi, 0x10(%rsp)
movq %rsi, 0x28(%rsp)
movq (%rsi), %r14
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x80, 0x20(%rsp)
testl %r8d, %r8d
je 0x6245e
movb $0x23, 0x30(%rsp)
movl $0x1, %ebp
jmp 0x62460
xorl %ebp, %ebp
leaq 0x43ee9(%rip), %r13 # 0xa6350
cmpl $0x7f, %r15d
jg 0x6247b
movq 0x8(%rsp), %rbx
movb %r15b, (%rbx,%rbp)
incq %rbp
jmp 0x6248f
movq 0x8(%rsp), %rbx
leaq (%rbx,%rbp), %rdi
movl %r15d, %esi
callq 0x1bfb4
addq %rax, %rbp
movzbl (%r14), %r15d
leaq 0x1(%r14), %rax
movq %rax, 0x18(%rsp)
cmpl $0x5c, %r15d
jne 0x624c9
movl $0x5c, %r15d
cmpb $0x75, (%rax)
jne 0x624e4
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x9707b
movl %eax, %r15d
movl $0x1, (%r12)
jmp 0x624de
testb %r15b, %r15b
jns 0x624de
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
callq 0x1c05a
movl %eax, %r15d
cmpl $0x7f, %r15d
ja 0x624fa
movl %r15d, %eax
shrl $0x5, %eax
movl (%r13,%rax,4), %ecx
xorl %eax, %eax
btl %r15d, %ecx
setb %al
jmp 0x6251b
movl %r15d, %edi
callq 0x9b278
testl %eax, %eax
setne %al
movl %r15d, %ecx
andl $-0x2, %ecx
cmpl $0x200c, %ecx # imm = 0x200C
sete %cl
orb %al, %cl
movzbl %cl, %eax
testl %eax, %eax
je 0x62563
movq 0x18(%rsp), %r14
movq 0x20(%rsp), %rax
addq $-0x4, %rax
cmpq %rax, %rbp
jb 0x62467
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x4ec17
testl %eax, %eax
je 0x62467
xorl %ebp, %ebp
movq 0x8(%rsp), %rbx
jmp 0x62578
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x2052b
movl %eax, %ebp
leaq 0x30(%rsp), %rax
cmpq %rax, %rbx
jne 0x6259e
movq 0x28(%rsp), %rax
movq %r14, (%rax)
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x1d481
jmp 0x62582
| parse_ident:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r15d, ecx
mov r12, rdx
mov [rsp+0E8h+var_D8], rdi
mov [rsp+0E8h+var_C0], rsi
mov r14, [rsi]
lea rax, [rsp+0E8h+var_B8]
mov [rsp+0E8h+var_E0], rax
mov [rsp+0E8h+var_C8], 80h
test r8d, r8d
jz short loc_6245E
mov [rsp+0E8h+var_B8], 23h ; '#'
mov ebp, 1
jmp short loc_62460
loc_6245E:
xor ebp, ebp
loc_62460:
lea r13, lre_id_continue_table_ascii
loc_62467:
cmp r15d, 7Fh
jg short loc_6247B
mov rbx, [rsp+0E8h+var_E0]
mov [rbx+rbp], r15b
inc rbp
jmp short loc_6248F
loc_6247B:
mov rbx, [rsp+0E8h+var_E0]
lea rdi, [rbx+rbp]
mov esi, r15d
call utf8_encode
add rbp, rax
loc_6248F:
movzx r15d, byte ptr [r14]
lea rax, [r14+1]
mov [rsp+0E8h+var_D0], rax
cmp r15d, 5Ch ; '\'
jnz short loc_624C9
mov r15d, 5Ch ; '\'
cmp byte ptr [rax], 75h ; 'u'
jnz short loc_624E4
lea rdi, [rsp+0E8h+var_D0]
mov esi, 1
call lre_parse_escape
mov r15d, eax
mov dword ptr [r12], 1
jmp short loc_624DE
loc_624C9:
test r15b, r15b
jns short loc_624DE
mov rdi, r14
lea rsi, [rsp+0E8h+var_D0]
call utf8_decode
mov r15d, eax
loc_624DE:
cmp r15d, 7Fh
ja short loc_624FA
loc_624E4:
mov eax, r15d
shr eax, 5
mov ecx, [r13+rax*4+0]
xor eax, eax
bt ecx, r15d
setb al
jmp short loc_6251B
loc_624FA:
mov edi, r15d
call lre_is_id_continue
test eax, eax
setnz al
mov ecx, r15d
and ecx, 0FFFFFFFEh
cmp ecx, 200Ch
setz cl
or cl, al
movzx eax, cl
loc_6251B:
test eax, eax
jz short loc_62563
mov r14, [rsp+0E8h+var_D0]
mov rax, [rsp+0E8h+var_C8]
add rax, 0FFFFFFFFFFFFFFFCh
cmp rbp, rax
jb loc_62467
mov rax, [rsp+0E8h+var_D8]
mov rdi, [rax]
lea rsi, [rsp+0E8h+var_E0]
lea rdx, [rsp+0E8h+var_C8]
lea rcx, [rsp+0E8h+var_B8]
call ident_realloc
test eax, eax
jz loc_62467
xor ebp, ebp
mov rbx, [rsp+0E8h+var_E0]
jmp short loc_62578
loc_62563:
mov rax, [rsp+0E8h+var_D8]
mov rdi, [rax]
mov rsi, rbx
mov rdx, rbp
call JS_NewAtomLen
mov ebp, eax
loc_62578:
lea rax, [rsp+0E8h+var_B8]
cmp rbx, rax
jnz short loc_6259E
loc_62582:
mov rax, [rsp+0E8h+var_C0]
mov [rax], r14
mov eax, ebp
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6259E:
mov rax, [rsp+0E8h+var_D8]
mov rdi, [rax]
mov rsi, rbx
call js_free
jmp short loc_62582
| long long parse_ident(long long *a1, char **a2, _DWORD *a3, unsigned int a4, int a5)
{
char *v7; // r14
unsigned long long v8; // rbp
unsigned __int8 *v9; // rbx
int v10; // ecx
int v11; // eax
unsigned int v12; // ebp
unsigned __int8 *v14; // [rsp+8h] [rbp-E0h] BYREF
long long *v15; // [rsp+10h] [rbp-D8h]
char *v16; // [rsp+18h] [rbp-D0h] BYREF
long long v17; // [rsp+20h] [rbp-C8h] BYREF
char **v18; // [rsp+28h] [rbp-C0h]
_BYTE v19[184]; // [rsp+30h] [rbp-B8h] BYREF
v15 = a1;
v18 = a2;
v7 = *a2;
v14 = v19;
v17 = 128LL;
if ( a5 )
{
v19[0] = 35;
v8 = 1LL;
}
else
{
v8 = 0LL;
}
while ( 1 )
{
v9 = v14;
if ( (int)a4 > 127 )
v8 += utf8_encode(&v14[v8], a4);
else
v14[v8++] = a4;
a4 = (unsigned __int8)*v7;
v16 = v7 + 1;
if ( a4 == 92 )
{
a4 = 92;
if ( v7[1] != 117 )
goto LABEL_13;
a4 = lre_parse_escape(&v16, 1LL);
*a3 = 1;
}
else if ( (a4 & 0x80u) != 0 )
{
a4 = utf8_decode(v7, &v16);
}
if ( a4 <= 0x7F )
{
LABEL_13:
v10 = lre_id_continue_table_ascii[a4 >> 5];
v11 = _bittest(&v10, a4);
goto LABEL_15;
}
v11 = (unsigned int)lre_is_id_continue(a4) != 0 || (a4 & 0xFFFFFFFE) == 8204;
LABEL_15:
if ( !v11 )
break;
v7 = v16;
if ( v8 >= v17 - 4 && (unsigned int)ident_realloc(*v15, (long long *)&v14, &v17, (long long)v19) )
{
v12 = 0;
v9 = v14;
goto LABEL_20;
}
}
v12 = JS_NewAtomLen(*v15, v9, v8);
LABEL_20:
if ( v9 != v19 )
js_free(*v15, (long long)v9);
*v18 = v7;
return v12;
}
| parse_ident:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R15D,ECX
MOV R12,RDX
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV R14,qword ptr [RSI]
LEA RAX,[RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x20],0x80
TEST R8D,R8D
JZ 0x0016245e
MOV byte ptr [RSP + 0x30],0x23
MOV EBP,0x1
JMP 0x00162460
LAB_0016245e:
XOR EBP,EBP
LAB_00162460:
LEA R13,[0x1a6350]
LAB_00162467:
CMP R15D,0x7f
JG 0x0016247b
MOV RBX,qword ptr [RSP + 0x8]
MOV byte ptr [RBX + RBP*0x1],R15B
INC RBP
JMP 0x0016248f
LAB_0016247b:
MOV RBX,qword ptr [RSP + 0x8]
LEA RDI,[RBX + RBP*0x1]
MOV ESI,R15D
CALL 0x0011bfb4
ADD RBP,RAX
LAB_0016248f:
MOVZX R15D,byte ptr [R14]
LEA RAX,[R14 + 0x1]
MOV qword ptr [RSP + 0x18],RAX
CMP R15D,0x5c
JNZ 0x001624c9
MOV R15D,0x5c
CMP byte ptr [RAX],0x75
JNZ 0x001624e4
LEA RDI,[RSP + 0x18]
MOV ESI,0x1
CALL 0x0019707b
MOV R15D,EAX
MOV dword ptr [R12],0x1
JMP 0x001624de
LAB_001624c9:
TEST R15B,R15B
JNS 0x001624de
MOV RDI,R14
LEA RSI,[RSP + 0x18]
CALL 0x0011c05a
MOV R15D,EAX
LAB_001624de:
CMP R15D,0x7f
JA 0x001624fa
LAB_001624e4:
MOV EAX,R15D
SHR EAX,0x5
MOV ECX,dword ptr [R13 + RAX*0x4]
XOR EAX,EAX
BT ECX,R15D
SETC AL
JMP 0x0016251b
LAB_001624fa:
MOV EDI,R15D
CALL 0x0019b278
TEST EAX,EAX
SETNZ AL
MOV ECX,R15D
AND ECX,0xfffffffe
CMP ECX,0x200c
SETZ CL
OR CL,AL
MOVZX EAX,CL
LAB_0016251b:
TEST EAX,EAX
JZ 0x00162563
MOV R14,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,-0x4
CMP RBP,RAX
JC 0x00162467
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x20]
LEA RCX,[RSP + 0x30]
CALL 0x0014ec17
TEST EAX,EAX
JZ 0x00162467
XOR EBP,EBP
MOV RBX,qword ptr [RSP + 0x8]
JMP 0x00162578
LAB_00162563:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,RBX
MOV RDX,RBP
CALL 0x0012052b
MOV EBP,EAX
LAB_00162578:
LEA RAX,[RSP + 0x30]
CMP RBX,RAX
JNZ 0x0016259e
LAB_00162582:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],R14
MOV EAX,EBP
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016259e:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,RBX
CALL 0x0011d481
JMP 0x00162582
|
int4
parse_ident(int8 *param_1,long *param_2,int4 *param_3,uint param_4,int param_5)
{
byte bVar1;
uint uVar2;
int iVar3;
int4 uVar4;
long lVar5;
int1 *puVar6;
ulong uVar7;
byte *pbVar8;
ulong uVar9;
bool bVar10;
int1 *local_e0;
int8 *local_d8;
byte *local_d0;
long local_c8;
long *local_c0;
int1 local_b8 [136];
uVar9 = (ulong)param_4;
local_e0 = local_b8;
local_c8 = 0x80;
if (param_5 != 0) {
local_b8[0] = 0x23;
}
uVar7 = (ulong)(param_5 != 0);
pbVar8 = (byte *)*param_2;
local_d8 = param_1;
local_c0 = param_2;
do {
puVar6 = local_e0;
if ((int)uVar9 < 0x80) {
local_e0[uVar7] = (char)uVar9;
uVar7 = uVar7 + 1;
}
else {
lVar5 = utf8_encode(local_e0 + uVar7,uVar9);
uVar7 = uVar7 + lVar5;
}
bVar1 = *pbVar8;
uVar9 = (ulong)bVar1;
local_d0 = pbVar8 + 1;
if (bVar1 == 0x5c) {
uVar9 = 0x5c;
if (*local_d0 == 0x75) {
uVar2 = lre_parse_escape(&local_d0,1);
uVar9 = (ulong)uVar2;
*param_3 = 1;
goto LAB_001624de;
}
LAB_001624e4:
bVar10 = (*(uint *)(lre_id_continue_table_ascii + (uVar9 >> 5) * 4) >> ((uint)uVar9 & 0x1f) &
1) != 0;
}
else {
if ((char)bVar1 < '\0') {
uVar2 = utf8_decode(pbVar8,&local_d0);
uVar9 = (ulong)uVar2;
}
LAB_001624de:
if ((uint)uVar9 < 0x80) goto LAB_001624e4;
iVar3 = lre_is_id_continue(uVar9);
bVar10 = ((uint)uVar9 & 0xfffffffe) == 0x200c || iVar3 != 0;
}
if (!bVar10) {
uVar4 = JS_NewAtomLen(*local_d8,puVar6,uVar7);
goto LAB_00162578;
}
pbVar8 = local_d0;
if ((local_c8 - 4U <= uVar7) &&
(iVar3 = ident_realloc(*local_d8,&local_e0,&local_c8,local_b8), iVar3 != 0)) {
uVar4 = 0;
puVar6 = local_e0;
LAB_00162578:
if (puVar6 != local_b8) {
js_free(*local_d8,puVar6);
}
*local_c0 = (long)pbVar8;
return uVar4;
}
} while( true );
}
| |
40,799 | show_progress | bluesky950520[P]quickjs/run-test262.c | void *show_progress(void *unused) {
int interval = 1000*1000*1000 / 4; // 250 ms
js_mutex_lock(&progress_mutex);
while (js_cond_timedwait(&progress_cond, &progress_mutex, interval)) {
/* output progress indicator: erase end of line and return to col 0 */
fprintf(stderr, "%d/%d/%d \r",
atomic_load(&test_failed),
atomic_load(&test_count),
atomic_load(&test_skipped));
fflush(stderr);
}
js_mutex_unlock(&progress_mutex);
return NULL;
} | O0 | c | show_progress:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0xee6b280, 0xc(%rsp) # imm = 0xEE6B280
leaq 0x12a440(%rip), %rdi # 0x13da28
callq 0x27220
movslq 0xc(%rsp), %rdx
leaq 0x12a457(%rip), %rdi # 0x13da50
leaq 0x12a428(%rip), %rsi # 0x13da28
callq 0x27360
cmpl $0x0, %eax
je 0x1365c
movq 0x1299e7(%rip), %rax # 0x13cff8
movq (%rax), %rdi
movl 0x12a3fe(%rip), %eax # 0x13da18
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %edx
movl 0x12a3ec(%rip), %eax # 0x13da14
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %ecx
movl 0x12a3e6(%rip), %eax # 0x13da1c
movl %eax, (%rsp)
movl (%rsp), %r8d
leaq 0xfbcee(%rip), %rsi # 0x10f332
movb $0x0, %al
callq 0xe5a0
movq 0x1299a6(%rip), %rax # 0x13cff8
movq (%rax), %rdi
callq 0xe6e0
jmp 0x135ed
leaq 0x12a3c5(%rip), %rdi # 0x13da28
callq 0x27240
xorl %eax, %eax
addq $0x18, %rsp
retq
nop
| show_progress:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_C], 0EE6B280h
lea rdi, progress_mutex
call js_mutex_lock
loc_135ED:
movsxd rdx, [rsp+18h+var_C]
lea rdi, progress_cond
lea rsi, progress_mutex
call js_cond_timedwait
cmp eax, 0
jz short loc_1365C
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov eax, cs:test_failed
mov [rsp+18h+var_10], eax
mov edx, [rsp+18h+var_10]
mov eax, cs:test_count
mov [rsp+18h+var_14], eax
mov ecx, [rsp+18h+var_14]
mov eax, cs:test_skipped
mov [rsp+18h+var_18], eax
mov r8d, [rsp+18h+var_18]
lea rsi, aDDD; "%d/%d/%d \r"
mov al, 0
call _fprintf
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fflush
jmp short loc_135ED
loc_1365C:
lea rdi, progress_mutex
call js_mutex_unlock
xor eax, eax
add rsp, 18h
retn
| long long show_progress()
{
long long v0; // rdx
js_mutex_lock(&progress_mutex);
while ( (unsigned int)js_cond_timedwait(&progress_cond, &progress_mutex, 250000000LL) )
{
fprintf(stderr, "%d/%d/%d \r", test_failed, test_count, test_skipped);
fflush(stderr);
}
js_mutex_unlock(&progress_mutex, &progress_mutex, v0);
return 0LL;
}
| show_progress:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV dword ptr [RSP + 0xc],0xee6b280
LEA RDI,[0x23da28]
CALL 0x00127220
LAB_001135ed:
MOVSXD RDX,dword ptr [RSP + 0xc]
LEA RDI,[0x23da50]
LEA RSI,[0x23da28]
CALL 0x00127360
CMP EAX,0x0
JZ 0x0011365c
MOV RAX,qword ptr [0x0023cff8]
MOV RDI,qword ptr [RAX]
MOV EAX,dword ptr [0x0023da18]
MOV dword ptr [RSP + 0x8],EAX
MOV EDX,dword ptr [RSP + 0x8]
MOV EAX,dword ptr [0x0023da14]
MOV dword ptr [RSP + 0x4],EAX
MOV ECX,dword ptr [RSP + 0x4]
MOV EAX,dword ptr [0x0023da1c]
MOV dword ptr [RSP],EAX
MOV R8D,dword ptr [RSP]
LEA RSI,[0x20f332]
MOV AL,0x0
CALL 0x0010e5a0
MOV RAX,qword ptr [0x0023cff8]
MOV RDI,qword ptr [RAX]
CALL 0x0010e6e0
JMP 0x001135ed
LAB_0011365c:
LEA RDI,[0x23da28]
CALL 0x00127240
XOR EAX,EAX
ADD RSP,0x18
RET
|
int8 show_progress(void)
{
int iVar1;
js_mutex_lock(progress_mutex);
while( true ) {
iVar1 = js_cond_timedwait(progress_cond,progress_mutex,250000000);
if (iVar1 == 0) break;
fprintf(*(FILE **)PTR_stderr_0023cff8,"%d/%d/%d \r",(ulong)test_failed,(ulong)test_count,
(ulong)test_skipped);
fflush(*(FILE **)PTR_stderr_0023cff8);
}
js_mutex_unlock(progress_mutex);
return 0;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.