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
28,600
rtree_estimate
eloqsql/storage/myisam/rt_index.c
ha_rows rtree_estimate(MI_INFO *info, uint keynr, uchar *key, uint key_length, uint flag) { MI_KEYDEF *keyinfo = info->s->keyinfo + keynr; my_off_t root; uint i = 0; uchar *k; uchar *last; uint nod_flag; uchar *page_buf; uint k_len; double area = 0; ha_rows res = 0; if (flag & MBR_DISJOINT) return HA_POS_ERROR; if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR) return HA_POS_ERROR; if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length))) return HA_POS_ERROR; if (!_mi_fetch_keypage(info, keyinfo, root, DFLT_INIT_HITS, page_buf, 0)) goto err1; nod_flag = mi_test_if_nod(page_buf); k_len = keyinfo->keylength - info->s->base.rec_reflength; k = rt_PAGE_FIRST_KEY(page_buf, nod_flag); last = rt_PAGE_END(page_buf); for (; k < last; k = rt_PAGE_NEXT_KEY(k, k_len, nod_flag), ++i) { if (nod_flag) { double k_area = rtree_rect_volume(keyinfo->seg, k, key_length); /* The following should be safe, even if we compare doubles */ if (k_area == 0) { if (flag & (MBR_CONTAIN | MBR_INTERSECT)) { area += 1; } else if (flag & (MBR_WITHIN | MBR_EQUAL)) { if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN)) area += 1; } else goto err1; } else { if (flag & (MBR_CONTAIN | MBR_INTERSECT)) { area += rtree_overlapping_area(keyinfo->seg, key, k, key_length) / k_area; } else if (flag & (MBR_WITHIN | MBR_EQUAL)) { if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN)) area += rtree_rect_volume(keyinfo->seg, key, key_length) / k_area; } else goto err1; } } else { if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, flag)) ++res; } } if (nod_flag) { if (i) res = (ha_rows) (area / i * info->state->records); else res = HA_POS_ERROR; } my_afree((uchar*)page_buf); return res; err1: my_afree((uchar*)page_buf); return HA_POS_ERROR; }
O0
c
rtree_estimate: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movl %esi, -0x1c(%rbp) movq %rdx, -0x28(%rbp) movl %ecx, -0x2c(%rbp) movl %r8d, -0x30(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movl $0x0, -0x44(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x78(%rbp) movq $0x0, -0x80(%rbp) movl -0x30(%rbp), %eax andl $0x1000, %eax # imm = 0x1000 cmpl $0x0, %eax je 0xc9d87 movq $-0x1, -0x10(%rbp) jmp 0xca113 movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x98(%rax), %rax movl -0x1c(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) cmpq $-0x1, %rax jne 0xc9db3 movq $-0x1, -0x10(%rbp) jmp 0xca113 movq -0x38(%rbp), %rax movzwl 0xe(%rax), %eax addl $0xf, %eax andl $-0x10, %eax movl %eax, %ecx movq %rsp, %rax subq %rcx, %rax movq %rax, %rsp movq %rax, -0x68(%rbp) cmpq $0x0, %rax jne 0xc9de3 movq $-0x1, -0x10(%rbp) jmp 0xca113 movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x68(%rbp), %r8 movl $0x3, %ecx xorl %r9d, %r9d callq 0xbd950 cmpq $0x0, %rax jne 0xc9e0b jmp 0xca10b movq -0x68(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc9e31 movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x8c(%rbp) jmp 0xc9e3b xorl %eax, %eax movl %eax, -0x8c(%rbp) jmp 0xc9e3b movl -0x8c(%rbp), %eax movl %eax, -0x5c(%rbp) movq -0x38(%rbp), %rax movzwl 0x12(%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx subl 0x178(%rcx), %eax movl %eax, -0x6c(%rbp) movq -0x68(%rbp), %rax addq $0x2, %rax movl -0x5c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x68(%rbp), %rax movq -0x68(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx movq -0x68(%rbp), %rdx movzbl (%rdx), %edx movzwl %dx, %edx shll $0x8, %edx orl %edx, %ecx movzwl %cx, %ecx andl $0x7fff, %ecx # imm = 0x7FFF movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax jae 0xca07c cmpl $0x0, -0x5c(%rbp) je 0xc9ff2 movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x50(%rbp), %rsi movl -0x2c(%rbp), %edx callq 0xcc4e0 movsd %xmm0, -0x88(%rbp) movsd -0x88(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0xc9f56 jp 0xc9f56 movl -0x30(%rbp), %eax andl $0x600, %eax # imm = 0x600 cmpl $0x0, %eax je 0xc9f06 movsd 0x95966(%rip), %xmm0 # 0x15f860 addsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) jmp 0xc9f51 movl -0x30(%rbp), %eax andl $0x2800, %eax # imm = 0x2800 cmpl $0x0, %eax je 0xc9f4a movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx movl $0x800, %r8d # imm = 0x800 callq 0xcaa90 cmpl $0x0, %eax jne 0xc9f48 movsd 0x95922(%rip), %xmm0 # 0x15f860 addsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) jmp 0xc9f4f jmp 0xca10b jmp 0xc9f51 jmp 0xc9ff0 movl -0x30(%rbp), %eax andl $0x600, %eax # imm = 0x600 cmpl $0x0, %eax je 0xc9f8f movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx callq 0xcece0 divsd -0x88(%rbp), %xmm0 addsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) jmp 0xc9fee movl -0x30(%rbp), %eax andl $0x2800, %eax # imm = 0x2800 cmpl $0x0, %eax je 0xc9fe7 movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx movl $0x800, %r8d # imm = 0x800 callq 0xcaa90 cmpl $0x0, %eax jne 0xc9fe5 movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movl -0x2c(%rbp), %edx callq 0xcc4e0 divsd -0x88(%rbp), %xmm0 addsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) jmp 0xc9fec jmp 0xca10b jmp 0xc9fee jmp 0xc9ff0 jmp 0xca021 movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx movl -0x30(%rbp), %r8d callq 0xcaa90 cmpl $0x0, %eax jne 0xca01f movq -0x80(%rbp), %rax addq $0x1, %rax movq %rax, -0x80(%rbp) jmp 0xca021 jmp 0xca023 movq -0x50(%rbp), %rax movl -0x6c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x98(%rbp) cmpl $0x0, -0x5c(%rbp) je 0xca045 movl -0x5c(%rbp), %eax movl %eax, -0x9c(%rbp) jmp 0xca058 movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x178(%rax), %eax movl %eax, -0x9c(%rbp) movq -0x98(%rbp), %rax movl -0x9c(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movl -0x44(%rbp), %eax addl $0x1, %eax movl %eax, -0x44(%rbp) jmp 0xc9e9e cmpl $0x0, -0x5c(%rbp) je 0xca101 cmpl $0x0, -0x44(%rbp) je 0xca0f7 movsd -0x78(%rbp), %xmm0 movl -0x44(%rbp), %eax cvtsi2sd %rax, %xmm1 divsd %xmm1, %xmm0 movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %xmm1 movaps 0x95a44(%rip), %xmm2 # 0x15faf0 punpckldq %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] movapd 0x95a48(%rip), %xmm2 # 0x15fb00 subpd %xmm2, %xmm1 movaps %xmm1, %xmm2 unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1] addsd %xmm2, %xmm1 mulsd %xmm1, %xmm0 movaps %xmm0, %xmm1 cvttsd2si %xmm1, %rax movq %rax, %rdx sarq $0x3f, %rdx movsd 0x95776(%rip), %xmm1 # 0x15f858 subsd %xmm1, %xmm0 cvttsd2si %xmm0, %rcx andq %rdx, %rcx orq %rcx, %rax movq %rax, -0x80(%rbp) jmp 0xca0ff movq $-0x1, -0x80(%rbp) jmp 0xca101 movq -0x80(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0xca113 movq $-0x1, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xa8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xca13c movq -0xa8(%rbp), %rax movq %rbp, %rsp popq %rbp retq callq 0x2a250 nopw %cs:(%rax,%rax)
rtree_estimate: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_2C], ecx mov [rbp+var_30], r8d mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx mov [rbp+var_38], rax mov [rbp+var_44], 0 xorps xmm0, xmm0 movsd [rbp+var_78], xmm0 mov [rbp+var_80], 0 mov eax, [rbp+var_30] and eax, 1000h cmp eax, 0 jz short loc_C9D87 mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh jmp loc_CA113 loc_C9D87: mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+98h] mov ecx, [rbp+var_1C] mov rax, [rax+rcx*8] mov [rbp+var_40], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_C9DB3 mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh jmp loc_CA113 loc_C9DB3: mov rax, [rbp+var_38] movzx eax, word ptr [rax+0Eh] add eax, 0Fh and eax, 0FFFFFFF0h mov ecx, eax mov rax, rsp sub rax, rcx mov rsp, rax mov [rbp+var_68], rax cmp rax, 0 jnz short loc_C9DE3 mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh jmp loc_CA113 loc_C9DE3: mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] mov rdx, [rbp+var_40] mov r8, [rbp+var_68] mov ecx, 3 xor r9d, r9d call _mi_fetch_keypage cmp rax, 0 jnz short loc_C9E0B jmp loc_CA10B loc_C9E0B: mov rax, [rbp+var_68] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C9E31 mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_8C], eax jmp short loc_C9E3B loc_C9E31: xor eax, eax mov [rbp+var_8C], eax jmp short $+2 loc_C9E3B: mov eax, [rbp+var_8C] mov [rbp+var_5C], eax mov rax, [rbp+var_38] movzx eax, word ptr [rax+12h] mov rcx, [rbp+var_18] mov rcx, [rcx] sub eax, [rcx+178h] mov [rbp+var_6C], eax mov rax, [rbp+var_68] add rax, 2 mov ecx, [rbp+var_5C] add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_68] mov rcx, [rbp+var_68] movzx ecx, byte ptr [rcx+1] movzx ecx, cx mov rdx, [rbp+var_68] movzx edx, byte ptr [rdx] movzx edx, dx shl edx, 8 or ecx, edx movzx ecx, cx and ecx, 7FFFh mov ecx, ecx add rax, rcx mov [rbp+var_58], rax loc_C9E9E: mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jnb loc_CA07C cmp [rbp+var_5C], 0 jz loc_C9FF2 mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_50] mov edx, [rbp+var_2C] call rtree_rect_volume movsd [rbp+var_88], xmm0 movsd xmm0, [rbp+var_88] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_C9F56 jp short loc_C9F56 mov eax, [rbp+var_30] and eax, 600h cmp eax, 0 jz short loc_C9F06 movsd xmm0, cs:qword_15F860 addsd xmm0, [rbp+var_78] movsd [rbp+var_78], xmm0 jmp short loc_C9F51 loc_C9F06: mov eax, [rbp+var_30] and eax, 2800h cmp eax, 0 jz short loc_C9F4A mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] mov r8d, 800h call rtree_key_cmp cmp eax, 0 jnz short loc_C9F48 movsd xmm0, cs:qword_15F860 addsd xmm0, [rbp+var_78] movsd [rbp+var_78], xmm0 loc_C9F48: jmp short loc_C9F4F loc_C9F4A: jmp loc_CA10B loc_C9F4F: jmp short $+2 loc_C9F51: jmp loc_C9FF0 loc_C9F56: mov eax, [rbp+var_30] and eax, 600h cmp eax, 0 jz short loc_C9F8F mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] call rtree_overlapping_area divsd xmm0, [rbp+var_88] addsd xmm0, [rbp+var_78] movsd [rbp+var_78], xmm0 jmp short loc_C9FEE loc_C9F8F: mov eax, [rbp+var_30] and eax, 2800h cmp eax, 0 jz short loc_C9FE7 mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] mov r8d, 800h call rtree_key_cmp cmp eax, 0 jnz short loc_C9FE5 mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov edx, [rbp+var_2C] call rtree_rect_volume divsd xmm0, [rbp+var_88] addsd xmm0, [rbp+var_78] movsd [rbp+var_78], xmm0 loc_C9FE5: jmp short loc_C9FEC loc_C9FE7: jmp loc_CA10B loc_C9FEC: jmp short $+2 loc_C9FEE: jmp short $+2 loc_C9FF0: jmp short loc_CA021 loc_C9FF2: mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] mov r8d, [rbp+var_30] call rtree_key_cmp cmp eax, 0 jnz short loc_CA01F mov rax, [rbp+var_80] add rax, 1 mov [rbp+var_80], rax loc_CA01F: jmp short $+2 loc_CA021: jmp short $+2 loc_CA023: mov rax, [rbp+var_50] mov ecx, [rbp+var_6C] add rax, rcx mov [rbp+var_98], rax cmp [rbp+var_5C], 0 jz short loc_CA045 mov eax, [rbp+var_5C] mov [rbp+var_9C], eax jmp short loc_CA058 loc_CA045: mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax+178h] mov [rbp+var_9C], eax loc_CA058: mov rax, [rbp+var_98] mov ecx, [rbp+var_9C] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov eax, [rbp+var_44] add eax, 1 mov [rbp+var_44], eax jmp loc_C9E9E loc_CA07C: cmp [rbp+var_5C], 0 jz short loc_CA101 cmp [rbp+var_44], 0 jz short loc_CA0F7 movsd xmm0, [rbp+var_78] mov eax, [rbp+var_44] cvtsi2sd xmm1, rax divsd xmm0, xmm1 mov rax, [rbp+var_18] mov rax, [rax+8] movq xmm1, qword ptr [rax] movaps xmm2, cs:xmmword_15FAF0 punpckldq xmm1, xmm2 movapd xmm2, cs:xmmword_15FB00 subpd xmm1, xmm2 movaps xmm2, xmm1 unpckhpd xmm1, xmm1 addsd xmm1, xmm2 mulsd xmm0, xmm1 movaps xmm1, xmm0 cvttsd2si rax, xmm1 mov rdx, rax sar rdx, 3Fh movsd xmm1, cs:qword_15F858 subsd xmm0, xmm1 cvttsd2si rcx, xmm0 and rcx, rdx or rax, rcx mov [rbp+var_80], rax jmp short loc_CA0FF loc_CA0F7: mov [rbp+var_80], 0FFFFFFFFFFFFFFFFh loc_CA0FF: jmp short $+2 loc_CA101: mov rax, [rbp+var_80] mov [rbp+var_10], rax jmp short loc_CA113 loc_CA10B: mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh loc_CA113: mov rax, [rbp+var_10] mov [rbp+var_A8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_CA13C mov rax, [rbp+var_A8] mov rsp, rbp pop rbp retn loc_CA13C: call ___stack_chk_fail
long long rtree_estimate(_QWORD *a1, unsigned int a2, long long a3, unsigned int a4, unsigned int a5) { char *v5; // rcx double v6; // xmm0_8 double v7; // xmm0_8 __m128d v8; // xmm2 long long v10; // [rsp+0h] [rbp-B0h] BYREF unsigned int v11; // [rsp+14h] [rbp-9Ch] unsigned long long v12; // [rsp+18h] [rbp-98h] unsigned int v13; // [rsp+24h] [rbp-8Ch] double v14; // [rsp+28h] [rbp-88h] long long v15; // [rsp+30h] [rbp-80h] double v16; // [rsp+38h] [rbp-78h] unsigned int v17; // [rsp+44h] [rbp-6Ch] unsigned __int16 *v18; // [rsp+48h] [rbp-68h] unsigned int v19; // [rsp+54h] [rbp-5Ch] char *v20; // [rsp+58h] [rbp-58h] unsigned long long v21; // [rsp+60h] [rbp-50h] int v22; // [rsp+6Ch] [rbp-44h] long long v23; // [rsp+70h] [rbp-40h] long long v24; // [rsp+78h] [rbp-38h] unsigned int v25; // [rsp+80h] [rbp-30h] unsigned int v26; // [rsp+84h] [rbp-2Ch] long long v27; // [rsp+88h] [rbp-28h] unsigned int v28; // [rsp+94h] [rbp-1Ch] _QWORD *v29; // [rsp+98h] [rbp-18h] unsigned long long v31; // [rsp+A8h] [rbp-8h] v31 = __readfsqword(0x28u); v29 = a1; v28 = a2; v27 = a3; v26 = a4; v25 = a5; v24 = 112LL * a2 + *(_QWORD *)(*a1 + 536LL); v22 = 0; v16 = 0.0; v15 = 0LL; if ( (a5 & 0x1000) != 0 ) return -1LL; v23 = *(_QWORD *)(*(_QWORD *)(*v29 + 152LL) + 8LL * v28); if ( v23 == -1 ) return -1LL; v5 = (char *)((*(unsigned __int16 *)(v24 + 14) + 15) & 0xFFFFFFF0); v18 = (unsigned __int16 *)((char *)&v10 - v5); if ( &v10 == (long long *)v5 ) return -1LL; if ( !mi_fetch_keypage(v29, v24, v23, 3, (int)v18, 0) ) return -1LL; if ( (*(_BYTE *)v18 & 0x80) != 0 ) v13 = *(_DWORD *)(*v29 + 380LL); else v13 = 0; v19 = v13; v17 = *(unsigned __int16 *)(v24 + 18) - *(_DWORD *)(*v29 + 376LL); v21 = (unsigned long long)v18 + v13 + 2; v20 = (char *)v18 + (_byteswap_ushort(*v18) & 0x7FFF); while ( v21 < (unsigned long long)v20 ) { if ( v19 ) { v14 = rtree_rect_volume(*(_QWORD *)(v24 + 40), v21, v26); if ( v14 == 0.0 ) { if ( (v25 & 0x600) != 0 ) { v16 = v16 + 1.0; } else { if ( (v25 & 0x2800) == 0 ) return -1LL; if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v24 + 40), v27, v21, v26, 2048LL) ) v16 = v16 + 1.0; } } else if ( (v25 & 0x600) != 0 ) { v6 = rtree_overlapping_area(*(_QWORD *)(v24 + 40), v27, v21, v26); v16 = v6 / v14 + v16; } else { if ( (v25 & 0x2800) == 0 ) return -1LL; if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v24 + 40), v27, v21, v26, 2048LL) ) { v7 = rtree_rect_volume(*(_QWORD *)(v24 + 40), v27, v26); v16 = v7 / v14 + v16; } } } else if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v24 + 40), v27, v21, v26, v25) ) { ++v15; } v12 = v17 + v21; if ( v19 ) v11 = v19; else v11 = *(_DWORD *)(*v29 + 376LL); v21 = v11 + v12; ++v22; } if ( v19 ) { if ( v22 ) { v8 = _mm_sub_pd( (__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64((const __m128i *)v29[1]), (__m128i)xmmword_15FAF0), (__m128d)xmmword_15FB00); return (unsigned int)(int)(v16 / (double)v22 * (_mm_unpackhi_pd(v8, v8).m128d_f64[0] + v8.m128d_f64[0])); } else { return -1LL; } } return v15; }
rtree_estimate: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x2c],ECX MOV dword ptr [RBP + -0x30],R8D MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x44],0x0 XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x78],XMM0 MOV qword ptr [RBP + -0x80],0x0 MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x1000 CMP EAX,0x0 JZ 0x001c9d87 MOV qword ptr [RBP + -0x10],-0x1 JMP 0x001ca113 LAB_001c9d87: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x98] MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x40],RAX CMP RAX,-0x1 JNZ 0x001c9db3 MOV qword ptr [RBP + -0x10],-0x1 JMP 0x001ca113 LAB_001c9db3: MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0xe] ADD EAX,0xf AND EAX,0xfffffff0 MOV ECX,EAX MOV RAX,RSP SUB RAX,RCX MOV RSP,RAX MOV qword ptr [RBP + -0x68],RAX CMP RAX,0x0 JNZ 0x001c9de3 MOV qword ptr [RBP + -0x10],-0x1 JMP 0x001ca113 LAB_001c9de3: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x68] MOV ECX,0x3 XOR R9D,R9D CALL 0x001bd950 CMP RAX,0x0 JNZ 0x001c9e0b JMP 0x001ca10b LAB_001c9e0b: MOV RAX,qword ptr [RBP + -0x68] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c9e31 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x8c],EAX JMP 0x001c9e3b LAB_001c9e31: XOR EAX,EAX MOV dword ptr [RBP + -0x8c],EAX JMP 0x001c9e3b LAB_001c9e3b: MOV EAX,dword ptr [RBP + -0x8c] MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0x12] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] SUB EAX,dword ptr [RCX + 0x178] MOV dword ptr [RBP + -0x6c],EAX MOV RAX,qword ptr [RBP + -0x68] ADD RAX,0x2 MOV ECX,dword ptr [RBP + -0x5c] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x68] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX MOV RDX,qword ptr [RBP + -0x68] MOVZX EDX,byte ptr [RDX] MOVZX EDX,DX SHL EDX,0x8 OR ECX,EDX MOVZX ECX,CX AND ECX,0x7fff MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX LAB_001c9e9e: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JNC 0x001ca07c CMP dword ptr [RBP + -0x5c],0x0 JZ 0x001c9ff2 MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x50] MOV EDX,dword ptr [RBP + -0x2c] CALL 0x001cc4e0 MOVSD qword ptr [RBP + -0x88],XMM0 MOVSD XMM0,qword ptr [RBP + -0x88] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x001c9f56 JP 0x001c9f56 MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x600 CMP EAX,0x0 JZ 0x001c9f06 MOVSD XMM0,qword ptr [0x0025f860] ADDSD XMM0,qword ptr [RBP + -0x78] MOVSD qword ptr [RBP + -0x78],XMM0 JMP 0x001c9f51 LAB_001c9f06: MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x2800 CMP EAX,0x0 JZ 0x001c9f4a MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV R8D,0x800 CALL 0x001caa90 CMP EAX,0x0 JNZ 0x001c9f48 MOVSD XMM0,qword ptr [0x0025f860] ADDSD XMM0,qword ptr [RBP + -0x78] MOVSD qword ptr [RBP + -0x78],XMM0 LAB_001c9f48: JMP 0x001c9f4f LAB_001c9f4a: JMP 0x001ca10b LAB_001c9f4f: JMP 0x001c9f51 LAB_001c9f51: JMP 0x001c9ff0 LAB_001c9f56: MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x600 CMP EAX,0x0 JZ 0x001c9f8f MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] CALL 0x001cece0 DIVSD XMM0,qword ptr [RBP + -0x88] ADDSD XMM0,qword ptr [RBP + -0x78] MOVSD qword ptr [RBP + -0x78],XMM0 JMP 0x001c9fee LAB_001c9f8f: MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x2800 CMP EAX,0x0 JZ 0x001c9fe7 MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV R8D,0x800 CALL 0x001caa90 CMP EAX,0x0 JNZ 0x001c9fe5 MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x2c] CALL 0x001cc4e0 DIVSD XMM0,qword ptr [RBP + -0x88] ADDSD XMM0,qword ptr [RBP + -0x78] MOVSD qword ptr [RBP + -0x78],XMM0 LAB_001c9fe5: JMP 0x001c9fec LAB_001c9fe7: JMP 0x001ca10b LAB_001c9fec: JMP 0x001c9fee LAB_001c9fee: JMP 0x001c9ff0 LAB_001c9ff0: JMP 0x001ca021 LAB_001c9ff2: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV R8D,dword ptr [RBP + -0x30] CALL 0x001caa90 CMP EAX,0x0 JNZ 0x001ca01f MOV RAX,qword ptr [RBP + -0x80] ADD RAX,0x1 MOV qword ptr [RBP + -0x80],RAX LAB_001ca01f: JMP 0x001ca021 LAB_001ca021: JMP 0x001ca023 LAB_001ca023: MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x6c] ADD RAX,RCX MOV qword ptr [RBP + -0x98],RAX CMP dword ptr [RBP + -0x5c],0x0 JZ 0x001ca045 MOV EAX,dword ptr [RBP + -0x5c] MOV dword ptr [RBP + -0x9c],EAX JMP 0x001ca058 LAB_001ca045: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x178] MOV dword ptr [RBP + -0x9c],EAX LAB_001ca058: MOV RAX,qword ptr [RBP + -0x98] MOV ECX,dword ptr [RBP + -0x9c] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x44] ADD EAX,0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x001c9e9e LAB_001ca07c: CMP dword ptr [RBP + -0x5c],0x0 JZ 0x001ca101 CMP dword ptr [RBP + -0x44],0x0 JZ 0x001ca0f7 MOVSD XMM0,qword ptr [RBP + -0x78] MOV EAX,dword ptr [RBP + -0x44] CVTSI2SD XMM1,RAX DIVSD XMM0,XMM1 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOVQ XMM1,qword ptr [RAX] MOVAPS XMM2,xmmword ptr [0x0025faf0] PUNPCKLDQ XMM1,XMM2 MOVAPD XMM2,xmmword ptr [0x0025fb00] SUBPD XMM1,XMM2 MOVAPS XMM2,XMM1 UNPCKHPD XMM1,XMM1 ADDSD XMM1,XMM2 MULSD XMM0,XMM1 MOVAPS XMM1,XMM0 CVTTSD2SI RAX,XMM1 MOV RDX,RAX SAR RDX,0x3f MOVSD XMM1,qword ptr [0x0025f858] SUBSD XMM0,XMM1 CVTTSD2SI RCX,XMM0 AND RCX,RDX OR RAX,RCX MOV qword ptr [RBP + -0x80],RAX JMP 0x001ca0ff LAB_001ca0f7: MOV qword ptr [RBP + -0x80],-0x1 LAB_001ca0ff: JMP 0x001ca101 LAB_001ca101: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x10],RAX JMP 0x001ca113 LAB_001ca10b: MOV qword ptr [RBP + -0x10],-0x1 LAB_001ca113: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001ca13c MOV RAX,qword ptr [RBP + -0xa8] MOV RSP,RBP POP RBP RET LAB_001ca13c: CALL 0x0012a250
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong rtree_estimate(long *param_1,uint param_2,int8 param_3,int4 param_4,uint param_5) { long lVar1; int8 uVar2; int8 uVar3; long lVar4; byte *pbVar5; uint uVar6; int4 uVar7; int iVar8; long lVar9; byte *pbVar10; long in_FS_OFFSET; double dVar11; int1 auVar12 [16]; int8 uStack_c0; byte abStack_b8 [8]; ulong local_b0; uint local_a4; byte *local_a0; uint local_94; double local_90; ulong local_88; double local_80; uint local_74; byte *local_70; uint local_64; byte *local_60; byte *local_58; uint local_4c; long local_48; long local_40; uint local_38; int4 local_34; int8 local_30; uint local_24; long *local_20; ulong local_18; long local_10; pbVar10 = abStack_b8; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar9 = *(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70; local_4c = 0; local_80 = 0.0; local_88 = 0; local_40 = lVar9; local_38 = param_5; local_34 = param_4; local_30 = param_3; local_24 = param_2; local_20 = param_1; if ((param_5 & 0x1000) == 0) { lVar1 = *(long *)(*(long *)(*param_1 + 0x98) + (ulong)param_2 * 8); local_48 = lVar1; if (lVar1 == -1) { local_18 = 0xffffffffffffffff; } else { lVar4 = -(ulong)(*(ushort *)(lVar9 + 0xe) + 0xf & 0xfffffff0); pbVar10 = abStack_b8 + lVar4; local_70 = pbVar10; if (pbVar10 == (byte *)0x0) { local_18 = 0xffffffffffffffff; } else { *(int8 *)((long)&uStack_c0 + lVar4) = 0x1c9e00; lVar9 = _mi_fetch_keypage(param_1,lVar9,lVar1,3,pbVar10,0); if (lVar9 == 0) { LAB_001ca10b: local_18 = 0xffffffffffffffff; } else { if ((*local_70 & 0x80) == 0) { local_94 = 0; } else { local_94 = *(uint *)(*local_20 + 0x17c); } local_64 = local_94; local_74 = (uint)*(ushort *)(local_40 + 0x12) - *(int *)(*local_20 + 0x178); local_60 = local_70 + ((uint)local_70[1] | (*local_70 & 0x7f) << 8); local_58 = local_70 + (ulong)local_94 + 2; while (uVar2 = local_30, uVar7 = local_34, uVar6 = local_38, pbVar5 = local_58, local_58 < local_60) { if (local_64 == 0) { uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1ca00e; iVar8 = rtree_key_cmp(uVar3,uVar2,pbVar5,uVar7,uVar6); if (iVar8 == 0) { local_88 = local_88 + 1; } } else { uVar2 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1c9eca; local_90 = (double)rtree_rect_volume(uVar2,pbVar5,uVar7); uVar2 = local_30; uVar7 = local_34; pbVar5 = local_58; if ((local_90 != 0.0) || (NAN(local_90))) { if ((local_38 & 0x600) == 0) { if ((local_38 & 0x2800) == 0) goto LAB_001ca10b; uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1c9fba; iVar8 = rtree_key_cmp(uVar3,uVar2,pbVar5,uVar7,0x800); uVar2 = local_30; uVar7 = local_34; if (iVar8 == 0) { uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1c9fd3; dVar11 = (double)rtree_rect_volume(uVar3,uVar2,uVar7); local_80 = dVar11 / local_90 + local_80; } } else { uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1c9f7b; dVar11 = (double)rtree_overlapping_area(uVar3,uVar2,pbVar5,uVar7); local_80 = dVar11 / local_90 + local_80; } } else if ((local_38 & 0x600) == 0) { if ((local_38 & 0x2800) == 0) goto LAB_001ca10b; uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1c9f31; iVar8 = rtree_key_cmp(uVar3,uVar2,pbVar5,uVar7,0x800); if (iVar8 == 0) { local_80 = DAT_0025f860 + local_80; } } else { local_80 = DAT_0025f860 + local_80; } } local_a0 = local_58 + local_74; if (local_64 == 0) { local_a4 = *(uint *)(*local_20 + 0x178); } else { local_a4 = local_64; } local_4c = local_4c + 1; local_58 = local_a0 + local_a4; } if (local_64 != 0) { if (local_4c == 0) { local_88 = 0xffffffffffffffff; } else { uVar2 = *(int8 *)local_20[1]; auVar12._8_4_ = (int)((ulong)uVar2 >> 0x20); auVar12._0_8_ = uVar2; auVar12._12_4_ = _UNK_0025faf4; dVar11 = (local_80 / (double)local_4c) * ((auVar12._8_8_ - _UNK_0025fb08) + ((double)CONCAT44(_DAT_0025faf0,(int)uVar2) - _DAT_0025fb00)); local_88 = (ulong)dVar11; local_88 = local_88 | (long)(dVar11 - DAT_0025f858) & (long)local_88 >> 0x3f; } } local_18 = local_88; } } } } else { local_18 = 0xffffffffffffffff; pbVar10 = abStack_b8; } local_b0 = local_18; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ pbVar10[-8] = 0x41; pbVar10[-7] = 0xa1; pbVar10[-6] = 0x1c; pbVar10[-5] = 0; pbVar10[-4] = 0; pbVar10[-3] = 0; pbVar10[-2] = 0; pbVar10[-1] = 0; __stack_chk_fail(); } return local_18; }
28,601
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool)
zkingston[P]unknot/build_O1/_deps/json-src/include/nlohmann/detail/input/json_sax.hpp
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false) { JSON_ASSERT(!keep_stack.empty()); // do not handle this value if we know it would be added to a discarded // container if (!keep_stack.back()) { return {false, nullptr}; } // create value auto value = BasicJsonType(std::forward<Value>(v)); // check callback const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value); // do not handle this value if we just learnt it shall be discarded if (!keep) { return {false, nullptr}; } if (ref_stack.empty()) { root = std::move(value); return {true, & root}; } // skip this value if we already decided to skip the parent // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) if (!ref_stack.back()) { return {false, nullptr}; } // we now only expect arrays and objects JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); // array if (ref_stack.back()->is_array()) { ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); return {true, & (ref_stack.back()->m_data.m_value.array->back())}; } // object JSON_ASSERT(ref_stack.back()->is_object()); // check if we should store an element for the current key JSON_ASSERT(!key_keep_stack.empty()); const bool store_element = key_keep_stack.back(); key_keep_stack.pop_back(); if (!store_element) { return {false, nullptr}; } JSON_ASSERT(object_element); *object_element = std::move(value); return {true, object_element}; }
O1
cpp
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool): pushq %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movl %edx, %ebp movq %rdi, %rbx movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000 movl 0x38(%rdi), %eax leaq -0x1(%rax), %rcx addq $0x3e, %rax testq %rcx, %rcx cmovnsq %rcx, %rax sarq $0x6, %rax shlq $0x3, %rax addq 0x30(%rdi), %rax leaq 0x3f(%r14), %rdx andq %rcx, %rdx xorl %edi, %edi cmpq %r14, %rdx setbe %dil movq -0x8(%rax,%rdi,8), %rax btq %rcx, %rax jae 0x36eae vxorps %xmm0, %xmm0, %xmm0 leaq 0x10(%rsp), %rdi vmovaps %xmm0, (%rdi) movq (%rsi), %rsi callq 0x36fd8 testb %bpl, %bpl jne 0x36e6b movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0x2c(%rsp) movb $0x5, 0xf(%rsp) cmpq $0x0, 0x90(%rbx) je 0x36fbd leaq 0x80(%rbx), %rdi leaq 0x2c(%rsp), %rsi leaq 0xf(%rsp), %rdx leaq 0x10(%rsp), %rcx callq *0x98(%rbx) testb %al, %al je 0x36fa0 movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0x36eb8 movq -0x8(%rax), %rax testq %rax, %rax je 0x36fa0 cmpb $0x2, (%rax) jne 0x36efd movq 0x8(%rax), %rdi leaq 0x10(%rsp), %rsi callq 0x2c08c movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %r14 addq $-0x10, %r14 jmp 0x36f9c xorl %ebx, %ebx xorl %r14d, %r14d jmp 0x36faf vmovaps 0x10(%rsp), %xmm0 leaq 0x40(%rsp), %rdi vmovaps %xmm0, (%rdi) movb $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movq (%rbx), %rax movb (%rax), %cl movb (%rdi), %dl movb %dl, (%rax) movb %cl, (%rdi) movq 0x8(%rax), %rcx movq 0x8(%rdi), %rdx movq %rdx, 0x8(%rax) movq %rcx, 0x8(%rdi) callq 0x2c524 movq (%rbx), %r14 jmp 0x36f9c movq 0x58(%rbx), %rax movl 0x60(%rbx), %edx leaq -0x1(%rdx), %rcx movq %rdx, %rsi addq $0x3e, %rsi testq %rcx, %rcx cmovnsq %rcx, %rsi sarq $0x6, %rsi leaq (%rax,%rsi,8), %rsi leaq 0x3f(%r14), %rdi andq %rcx, %rdi xorl %r8d, %r8d cmpq %r14, %rdi setbe %r8b movl $0x1, %edi shlxq %rcx, %rdi, %rcx andq -0x8(%rsi,%r8,8), %rcx subl $0x1, %edx movl %edx, 0x60(%rbx) jae 0x36f55 movl $0x3f, 0x60(%rbx) addq $-0x8, %rax movq %rax, 0x58(%rbx) testq %rcx, %rcx je 0x36fa0 vmovaps 0x10(%rsp), %xmm0 leaq 0x30(%rsp), %rdi vmovaps %xmm0, (%rdi) movb $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movq 0x70(%rbx), %rax movb (%rax), %cl movb (%rdi), %dl movb %dl, (%rax) movb %cl, (%rdi) movq 0x8(%rax), %rcx movq 0x8(%rdi), %rdx movq %rdx, 0x8(%rax) movq %rcx, 0x8(%rdi) callq 0x2c524 movq 0x70(%rbx), %r14 movb $0x1, %bl jmp 0x36fa5 xorl %ebx, %ebx xorl %r14d, %r14d leaq 0x10(%rsp), %rdi callq 0x2c524 movl %ebx, %eax movq %r14, %rdx addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq callq 0xf3b0 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x2c524 movq %rbx, %rdi callq 0x101c0 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b: push rbp push r14 push rbx sub rsp, 50h mov ebp, edx mov rbx, rdi mov r14, 8000000000000000h mov eax, [rdi+38h] lea rcx, [rax-1] add rax, 3Eh ; '>' test rcx, rcx cmovns rax, rcx sar rax, 6 shl rax, 3 add rax, [rdi+30h] lea rdx, [r14+3Fh] and rdx, rcx xor edi, edi cmp rdx, r14 setbe dil mov rax, [rax+rdi*8-8] bt rax, rcx jnb loc_36EAE vxorps xmm0, xmm0, xmm0 lea rdi, [rsp+68h+var_58] vmovaps xmmword ptr [rdi], xmm0 mov rsi, [rsi] call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_unsigned_t) test bpl, bpl jnz short loc_36E6B mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+68h+var_3C], eax mov [rsp+68h+var_59], 5 cmp qword ptr [rbx+90h], 0 jz loc_36FBD lea rdi, [rbx+80h] lea rsi, [rsp+68h+var_3C] lea rdx, [rsp+68h+var_59] lea rcx, [rsp+68h+var_58] call qword ptr [rbx+98h] test al, al jz loc_36FA0 loc_36E6B: mov rax, [rbx+10h] cmp [rbx+8], rax jz short loc_36EB8 mov rax, [rax-8] test rax, rax jz loc_36FA0 cmp byte ptr [rax], 2 jnz short loc_36EFD mov rdi, [rax+8] lea rsi, [rsp+68h+var_58] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) mov rax, [rbx+10h] mov rax, [rax-8] mov rax, [rax+8] mov r14, [rax+8] add r14, 0FFFFFFFFFFFFFFF0h jmp loc_36F9C loc_36EAE: xor ebx, ebx xor r14d, r14d jmp loc_36FAF loc_36EB8: vmovaps xmm0, [rsp+68h+var_58] lea rdi, [rsp+68h+var_28] vmovaps xmmword ptr [rdi], xmm0 mov byte ptr [rsp+68h+var_58], 0 mov qword ptr [rsp+68h+var_58+8], 0 mov rax, [rbx] mov cl, [rax] mov dl, [rdi] mov [rax], dl mov [rdi], cl mov rcx, [rax+8] mov rdx, [rdi+8] mov [rax+8], rdx mov [rdi+8], rcx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx] jmp loc_36F9C loc_36EFD: mov rax, [rbx+58h] mov edx, [rbx+60h] lea rcx, [rdx-1] mov rsi, rdx add rsi, 3Eh ; '>' test rcx, rcx cmovns rsi, rcx sar rsi, 6 lea rsi, [rax+rsi*8] lea rdi, [r14+3Fh] and rdi, rcx xor r8d, r8d cmp rdi, r14 setbe r8b mov edi, 1 shlx rcx, rdi, rcx and rcx, [rsi+r8*8-8] sub edx, 1 mov [rbx+60h], edx jnb short loc_36F55 mov dword ptr [rbx+60h], 3Fh ; '?' add rax, 0FFFFFFFFFFFFFFF8h mov [rbx+58h], rax loc_36F55: test rcx, rcx jz short loc_36FA0 vmovaps xmm0, [rsp+68h+var_58] lea rdi, [rsp+68h+var_38] vmovaps xmmword ptr [rdi], xmm0 mov byte ptr [rsp+68h+var_58], 0 mov qword ptr [rsp+68h+var_58+8], 0 mov rax, [rbx+70h] mov cl, [rax] mov dl, [rdi] mov [rax], dl mov [rdi], cl mov rcx, [rax+8] mov rdx, [rdi+8] mov [rax+8], rdx mov [rdi+8], rcx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx+70h] loc_36F9C: mov bl, 1 jmp short loc_36FA5 loc_36FA0: xor ebx, ebx xor r14d, r14d loc_36FA5: lea rdi, [rsp+68h+var_58] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_36FAF: mov eax, ebx mov rdx, r14 add rsp, 50h pop rbx pop r14 pop rbp retn loc_36FBD: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov rbx, rax lea rdi, [rsp+68h+var_58] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>( char **a1, _QWORD *a2, char a3, __m128 _XMM0) { char **v5; // rbx long long v6; // rax signed long long v7; // rcx long long v8; // rax long long v9; // rax char *v12; // rax long long v13; // rax char *v16; // rax char v17; // cl long long v18; // rcx char *v19; // rax long long v20; // rdx long long v21; // rsi long long v22; // rcx char *v25; // rax char v26; // cl long long v27; // rcx char v29; // [rsp+Fh] [rbp-59h] BYREF __int128 v30; // [rsp+10h] [rbp-58h] BYREF int v31; // [rsp+2Ch] [rbp-3Ch] BYREF void *v32; // [rsp+30h] [rbp-38h] BYREF long long v33; // [rsp+38h] [rbp-30h] void *v34; // [rsp+40h] [rbp-28h] BYREF long long v35; // [rsp+48h] [rbp-20h] v5 = a1; v6 = *((unsigned int *)a1 + 14); v7 = v6 - 1; v8 = v6 + 62; if ( v7 >= 0 ) v8 = v7; v9 = *(_QWORD *)&a1[6][8 * (v8 >> 6) - 8 + 8 * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL)]; if ( _bittest64(&v9, v7) ) { __asm { vxorps xmm0, xmm0, xmm0 } _RDI = &v30; __asm { vmovaps xmmword ptr [rdi], xmm0 } nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( &v30, *a2); if ( a3 ) goto LABEL_7; v31 = (unsigned long long)(v5[2] - v5[1]) >> 3; v29 = 5; if ( !v5[18] ) std::__throw_bad_function_call(); if ( ((unsigned __int8 ( *)(char **, int *, char *, __int128 *))v5[19])(v5 + 16, &v31, &v29, &v30) ) { LABEL_7: v12 = v5[2]; if ( v5[1] == v12 ) { __asm { vmovaps xmm0, [rsp+68h+var_58] } _RDI = &v34; __asm { vmovaps xmmword ptr [rdi], xmm0 } LOBYTE(v30) = 0; *((_QWORD *)&v30 + 1) = 0LL; v16 = *v5; v17 = **v5; *v16 = (char)v34; LOBYTE(v34) = v17; v18 = *((_QWORD *)v16 + 1); *((_QWORD *)v16 + 1) = v35; v35 = v18; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data( &v34, _XMM0); goto LABEL_19; } v13 = *((_QWORD *)v12 - 1); if ( v13 ) { if ( *(_BYTE *)v13 == 2 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( *(_QWORD *)(v13 + 8), (long long)&v30); LABEL_19: LOBYTE(v5) = 1; LABEL_21: nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data( (void **)&v30, _XMM0); return (unsigned int)v5; } v19 = v5[11]; v20 = *((unsigned int *)v5 + 24); v21 = v20 + 62; if ( v20 - 1 >= 0 ) v21 = v20 - 1; v22 = *(_QWORD *)&v19[8 * (v21 >> 6) - 8 + 8 * (((v20 - 1) & 0x800000000000003FLL) <= 0x8000000000000000LL)] & (1LL << ((unsigned __int8)v20 - 1)); *((_DWORD *)v5 + 24) = v20 - 1; if ( !(_DWORD)v20 ) { *((_DWORD *)v5 + 24) = 63; v5[11] = v19 - 8; } if ( v22 ) { __asm { vmovaps xmm0, [rsp+68h+var_58] } _RDI = &v32; __asm { vmovaps xmmword ptr [rdi], xmm0 } LOBYTE(v30) = 0; *((_QWORD *)&v30 + 1) = 0LL; v25 = v5[14]; v26 = *v25; *v25 = (char)v32; LOBYTE(v32) = v26; v27 = *((_QWORD *)v25 + 1); *((_QWORD *)v25 + 1) = v33; v33 = v27; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data( &v32, _XMM0); goto LABEL_19; } } } LODWORD(v5) = 0; goto LABEL_21; } LODWORD(v5) = 0; return (unsigned int)v5; }
handle_value<unsigned_long&>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x50 MOV EBP,EDX MOV RBX,RDI MOV R14,-0x8000000000000000 MOV EAX,dword ptr [RDI + 0x38] LEA RCX,[RAX + -0x1] ADD RAX,0x3e TEST RCX,RCX CMOVNS RAX,RCX SAR RAX,0x6 SHL RAX,0x3 ADD RAX,qword ptr [RDI + 0x30] LEA RDX,[R14 + 0x3f] AND RDX,RCX XOR EDI,EDI CMP RDX,R14 SETBE DIL MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8] BT RAX,RCX JNC 0x00136eae VXORPS XMM0,XMM0,XMM0 LEA RDI,[RSP + 0x10] VMOVAPS xmmword ptr [RDI],XMM0 MOV RSI,qword ptr [RSI] CALL 0x00136fd8 TEST BPL,BPL JNZ 0x00136e6b MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0x2c],EAX MOV byte ptr [RSP + 0xf],0x5 CMP qword ptr [RBX + 0x90],0x0 JZ 0x00136fbd LEA RDI,[RBX + 0x80] LAB_00136e4e: LEA RSI,[RSP + 0x2c] LEA RDX,[RSP + 0xf] LEA RCX,[RSP + 0x10] CALL qword ptr [RBX + 0x98] TEST AL,AL JZ 0x00136fa0 LAB_00136e6b: MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x00136eb8 MOV RAX,qword ptr [RAX + -0x8] TEST RAX,RAX JZ 0x00136fa0 CMP byte ptr [RAX],0x2 JNZ 0x00136efd MOV RDI,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x10] CALL 0x0012c08c MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV R14,qword ptr [RAX + 0x8] ADD R14,-0x10 JMP 0x00136f9c LAB_00136eae: XOR EBX,EBX XOR R14D,R14D JMP 0x00136faf LAB_00136eb8: VMOVAPS XMM0,xmmword ptr [RSP + 0x10] LEA RDI,[RSP + 0x40] VMOVAPS xmmword ptr [RDI],XMM0 MOV byte ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV RAX,qword ptr [RBX] MOV CL,byte ptr [RAX] MOV DL,byte ptr [RDI] MOV byte ptr [RAX],DL MOV byte ptr [RDI],CL MOV RCX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RDI + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RDI + 0x8],RCX CALL 0x0012c524 MOV R14,qword ptr [RBX] JMP 0x00136f9c LAB_00136efd: MOV RAX,qword ptr [RBX + 0x58] MOV EDX,dword ptr [RBX + 0x60] LEA RCX,[RDX + -0x1] MOV RSI,RDX ADD RSI,0x3e TEST RCX,RCX CMOVNS RSI,RCX SAR RSI,0x6 LEA RSI,[RAX + RSI*0x8] LEA RDI,[R14 + 0x3f] AND RDI,RCX XOR R8D,R8D CMP RDI,R14 SETBE R8B MOV EDI,0x1 SHLX RCX,RDI,RCX AND RCX,qword ptr [RSI + R8*0x8 + -0x8] SUB EDX,0x1 MOV dword ptr [RBX + 0x60],EDX JNC 0x00136f55 MOV dword ptr [RBX + 0x60],0x3f ADD RAX,-0x8 MOV qword ptr [RBX + 0x58],RAX LAB_00136f55: TEST RCX,RCX JZ 0x00136fa0 VMOVAPS XMM0,xmmword ptr [RSP + 0x10] LEA RDI,[RSP + 0x30] VMOVAPS xmmword ptr [RDI],XMM0 MOV byte ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV RAX,qword ptr [RBX + 0x70] MOV CL,byte ptr [RAX] MOV DL,byte ptr [RDI] MOV byte ptr [RAX],DL MOV byte ptr [RDI],CL MOV RCX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RDI + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RDI + 0x8],RCX CALL 0x0012c524 MOV R14,qword ptr [RBX + 0x70] LAB_00136f9c: MOV BL,0x1 JMP 0x00136fa5 LAB_00136fa0: XOR EBX,EBX XOR R14D,R14D LAB_00136fa5: LEA RDI,[RSP + 0x10] CALL 0x0012c524 LAB_00136faf: MOV EAX,EBX MOV RDX,R14 ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_00136fbd: CALL 0x0010f3b0
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::handle_value<unsigned_long&> (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,ulong *param_1,bool param_2) { data dVar1; uint uVar2; char *pcVar3; data *pdVar4; uint7 uVar5; int8 uVar6; int8 uVar7; char cVar8; ulong uVar9; ulong uVar10; long lVar11; int1 auVar12 [16]; int1 local_59; long local_58; int8 uStack_50; int4 local_3c; data local_38; uint7 uStack_37; int8 uStack_30; data local_28; uint7 uStack_27; int8 uStack_20; uVar10 = (ulong)*(uint *)(this + 0x38) - 1; uVar9 = (ulong)*(uint *)(this + 0x38) + 0x3e; if (-1 < (long)uVar10) { uVar9 = uVar10; } if ((*(ulong *)(((long)uVar9 >> 6) * 8 + *(long *)(this + 0x30) + -8 + (ulong)((uVar10 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar10 & 0x3f) & 1) == 0) { uVar10 = 0; lVar11 = 0; goto LAB_00136faf; } local_58 = 0; uStack_50 = 0; external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>:: construct<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (&local_58,*param_1); if (param_2) { LAB_00136e6b: uVar7 = _local_28; uVar6 = uStack_50; uVar5 = local_58._1_7_; local_28 = SUB81(local_58,0); if (*(long *)(this + 8) == *(long *)(this + 0x10)) { local_58 = (ulong)local_58._1_7_ << 8; uStack_50 = 0; pdVar4 = *(data **)this; dVar1 = *pdVar4; *pdVar4 = local_28; _local_28 = CONCAT71(uVar5,dVar1); uStack_20 = *(int8 *)(pdVar4 + 8); *(int8 *)(pdVar4 + 8) = uVar6; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(&local_28); lVar11 = *(long *)this; } else { pcVar3 = *(char **)(*(long *)(this + 0x10) + -8); if (pcVar3 == (char *)0x0) goto LAB_00136fa0; _local_28 = uVar7; if (*pcVar3 == '\x02') { std:: vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (*(vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(pcVar3 + 8),(basic_json *)&local_58); lVar11 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10; } else { uVar2 = *(uint *)(this + 0x60); uVar10 = (ulong)uVar2 - 1; uVar9 = (ulong)uVar2 + 0x3e; if (-1 < (long)uVar10) { uVar9 = uVar10; } uVar9 = *(ulong *)(*(long *)(this + 0x58) + ((long)uVar9 >> 6) * 8 + -8 + (ulong)((uVar10 & 0x800000000000003f) < 0x8000000000000001) * 8); *(uint *)(this + 0x60) = uVar2 - 1; if (uVar2 == 0) { *(int4 *)(this + 0x60) = 0x3f; *(long *)(this + 0x58) = *(long *)(this + 0x58) + -8; } if ((1L << (uVar10 & 0x3f) & uVar9) == 0) goto LAB_00136fa0; local_58 = (ulong)local_58._1_7_ << 8; uStack_50 = 0; pdVar4 = *(data **)(this + 0x70); dVar1 = *pdVar4; *pdVar4 = local_28; _local_38 = CONCAT71(uVar5,dVar1); uStack_30 = *(int8 *)(pdVar4 + 8); *(int8 *)(pdVar4 + 8) = uVar6; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(&local_38); lVar11 = *(long *)(this + 0x70); } } uVar10 = CONCAT71((int7)((ulong)this >> 8),1); } else { local_3c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_59 = 5; if (*(long *)(this + 0x90) == 0) { /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); } /* try { // try from 00136e4e to 00136fc1 has its CatchHandler @ 00136fc2 */ cVar8 = (**(code **)(this + 0x98))(this + 0x80,&local_3c,&local_59,&local_58); uVar7 = _local_28; if (cVar8 != '\0') goto LAB_00136e6b; LAB_00136fa0: _local_28 = uVar7; uVar10 = 0; lVar11 = 0; } basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_58); LAB_00136faf: auVar12._0_8_ = uVar10 & 0xffffffff; auVar12._8_8_ = lVar11; return auVar12; }
28,602
mariadb_compression_algorithm_str
eloqsql/libmariadb/libmariadb/ma_compress.c
const char *_mariadb_compression_algorithm_str(enum enum_ma_compression_algorithm algorithm) { switch(algorithm) { case COMPRESSION_NONE: case COMPRESSION_ZLIB: case COMPRESSION_ZSTD: return compression_algorithms[algorithm] ; default: return compression_algorithms[COMPRESSION_UNKNOWN]; } }
O0
c
mariadb_compression_algorithm_str: pushq %rbp movq %rsp, %rbp movl %edi, -0xc(%rbp) movl -0xc(%rbp), %eax subl $0x2, %eax ja 0x25217 jmp 0x25201 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x39a63(%rip), %rax # 0x5ec70 movq (%rax,%rcx,8), %rax movq %rax, -0x8(%rbp) jmp 0x25226 leaq 0x39a52(%rip), %rax # 0x5ec70 movq 0x18(%rax), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax)
_mariadb_compression_algorithm_str: push rbp mov rbp, rsp mov [rbp+var_C], edi mov eax, [rbp+var_C] sub eax, 2 ja short loc_25217 jmp short $+2 loc_25201: mov eax, [rbp+var_C] mov ecx, eax lea rax, compression_algorithms mov rax, [rax+rcx*8] mov [rbp+var_8], rax jmp short loc_25226 loc_25217: lea rax, compression_algorithms mov rax, [rax+18h] mov [rbp+var_8], rax loc_25226: mov rax, [rbp+var_8] pop rbp retn
char * mariadb_compression_algorithm_str(unsigned int a1) { if ( a1 > 2 ) return compression_algorithms[3]; else return compression_algorithms[a1]; }
_mariadb_compression_algorithm_str: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0xc],EDI MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x2 JA 0x00125217 JMP 0x00125201 LAB_00125201: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x15ec70] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x00125226 LAB_00125217: LEA RAX,[0x15ec70] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x8],RAX LAB_00125226: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int8 _mariadb_compression_algorithm_str(uint param_1) { int8 local_10; if (param_1 < 3) { local_10 = *(int8 *)(compression_algorithms + (ulong)param_1 * 8); } else { local_10 = compression_algorithms._24_8_; } return local_10; }
28,603
my_rmtree
eloqsql/mysys/my_delete.c
int my_rmtree(const char *dir, myf MyFlags) { char path[FN_REFLEN]; char sep[] = { FN_LIBCHAR, 0 }; int err = 0; uint i; MY_DIR *dir_info = my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT)); if (!dir_info) return 1; for (i = 0; i < dir_info->number_of_files; i++) { FILEINFO *file = dir_info->dir_entry + i; /* Skip "." and ".." */ if (!strcmp(file->name, ".") || !strcmp(file->name, "..")) continue; strxnmov(path, sizeof(path), dir, sep, file->name, NULL); if (!MY_S_ISDIR(file->mystat->st_mode)) { err = my_delete(path, MyFlags); #ifdef _WIN32 /* On Windows, check and possible reset readonly attribute. my_delete(), or DeleteFile does not remove theses files. */ if (err) { DWORD attr = GetFileAttributes(path); if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_READONLY)) { SetFileAttributes(path, attr &~FILE_ATTRIBUTE_READONLY); err = my_delete(path, MyFlags); } } #endif } else err = my_rmtree(path, MyFlags); if (err) break; } my_dirend(dir_info); if (!err) err = rmdir(dir); return err; }
O3
c
my_rmtree: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, -0x240(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movw $0x2f, -0x232(%rbp) movl $0x4000, %esi # imm = 0x4000 movq %rdi, -0x248(%rbp) callq 0xa00b5 testq %rax, %rax je 0x9e89d movq %rax, %r15 movl 0x8(%rax), %eax testl %eax, %eax je 0x9e884 movl $0x8, %r14d leaq -0x230(%rbp), %rbx xorl %r12d, %r12d movq (%r15), %r13 movq -0x8(%r13,%r14), %r8 cmpb $0x2e, (%r8) jne 0x9e80d cmpb $0x0, 0x1(%r8) je 0x9e872 cmpb $0x2e, 0x1(%r8) jne 0x9e80d cmpb $0x0, 0x2(%r8) je 0x9e872 movl $0x200, %esi # imm = 0x200 movq %rbx, %rdi movq -0x248(%rbp), %rdx leaq -0x232(%rbp), %rcx xorl %r9d, %r9d xorl %eax, %eax callq 0xd7b7c movq (%r13,%r14), %rax movl 0x18(%rax), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax movq %rbx, %rdi cmpl $0x4000, %eax # imm = 0x4000 jne 0x9e854 movq -0x240(%rbp), %rsi callq 0x9e781 jmp 0x9e860 movq -0x240(%rbp), %rsi callq 0x9e6ac movl %eax, %r13d testl %eax, %eax jne 0x9e8a5 movl 0x8(%r15), %eax leaq -0x230(%rbp), %rbx incq %r12 movl %eax, %ecx addq $0x10, %r14 cmpq %rcx, %r12 jb 0x9e7ea movq %r15, %rdi callq 0xa0084 movq -0x248(%rbp), %rdi callq 0x29370 movl %eax, %r13d jmp 0x9e8ad movl $0x1, %r13d jmp 0x9e8ad movq %r15, %rdi callq 0xa0084 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x9e8d1 movl %r13d, %eax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29260 nop
my_rmtree: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov [rbp+var_240], rsi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_232], 2Fh ; '/' mov esi, 4000h mov [rbp+var_248], rdi call my_dir test rax, rax jz loc_9E89D mov r15, rax mov eax, [rax+8] test eax, eax jz loc_9E884 mov r14d, 8 lea rbx, [rbp+var_230] xor r12d, r12d loc_9E7EA: mov r13, [r15] mov r8, [r13+r14-8] cmp byte ptr [r8], 2Eh ; '.' jnz short loc_9E80D cmp byte ptr [r8+1], 0 jz short loc_9E872 cmp byte ptr [r8+1], 2Eh ; '.' jnz short loc_9E80D cmp byte ptr [r8+2], 0 jz short loc_9E872 loc_9E80D: mov esi, 200h mov rdi, rbx mov rdx, [rbp+var_248] lea rcx, [rbp+var_232] xor r9d, r9d xor eax, eax call strxnmov mov rax, [r13+r14+0] mov eax, [rax+18h] mov ecx, 0F000h and eax, ecx mov rdi, rbx cmp eax, 4000h jnz short loc_9E854 mov rsi, [rbp+var_240] call my_rmtree jmp short loc_9E860 loc_9E854: mov rsi, [rbp+var_240] call my_delete loc_9E860: mov r13d, eax test eax, eax jnz short loc_9E8A5 mov eax, [r15+8] lea rbx, [rbp+var_230] loc_9E872: inc r12 mov ecx, eax add r14, 10h cmp r12, rcx jb loc_9E7EA loc_9E884: mov rdi, r15 call my_dirend mov rdi, [rbp+var_248] call _rmdir mov r13d, eax jmp short loc_9E8AD loc_9E89D: mov r13d, 1 jmp short loc_9E8AD loc_9E8A5: mov rdi, r15 call my_dirend loc_9E8AD: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_9E8D1 mov eax, r13d add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9E8D1: call ___stack_chk_fail
long long my_rmtree(long long a1, long long a2) { long long v2; // rax long long v3; // r15 unsigned int v4; // eax long long v5; // r14 unsigned long long i; // r12 long long v7; // r13 _BYTE *v8; // r8 unsigned int v9; // eax unsigned int v10; // r13d char v12; // [rsp+0h] [rbp-250h] __int16 v13; // [rsp+1Eh] [rbp-232h] BYREF _BYTE v14[512]; // [rsp+20h] [rbp-230h] BYREF unsigned long long v15; // [rsp+220h] [rbp-30h] v15 = __readfsqword(0x28u); v13 = 47; v2 = my_dir(a1, 0x4000LL); if ( v2 ) { v3 = v2; v4 = *(_DWORD *)(v2 + 8); if ( v4 ) { v5 = 8LL; for ( i = 0LL; i < v4; ++i ) { v7 = *(_QWORD *)v3; v8 = *(_BYTE **)(*(_QWORD *)v3 + v5 - 8); if ( *v8 != 46 || v8[1] && (v8[1] != 46 || v8[2]) ) { strxnmov((unsigned int)v14, 512, a1, (unsigned int)&v13, (_DWORD)v8, 0, v12); if ( (*(_DWORD *)(*(_QWORD *)(v7 + v5) + 24LL) & 0xF000) == 0x4000 ) v9 = my_rmtree(v14, a2); else v9 = my_delete((long long)v14, a2); v10 = v9; if ( v9 ) { my_dirend(v3); return v10; } v4 = *(_DWORD *)(v3 + 8); } v5 += 16LL; } } my_dirend(v3); return (unsigned int)rmdir(a1); } else { return 1; } }
my_rmtree: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV qword ptr [RBP + -0x240],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV word ptr [RBP + -0x232],0x2f MOV ESI,0x4000 MOV qword ptr [RBP + -0x248],RDI CALL 0x001a00b5 TEST RAX,RAX JZ 0x0019e89d MOV R15,RAX MOV EAX,dword ptr [RAX + 0x8] TEST EAX,EAX JZ 0x0019e884 MOV R14D,0x8 LEA RBX,[RBP + -0x230] XOR R12D,R12D LAB_0019e7ea: MOV R13,qword ptr [R15] MOV R8,qword ptr [R13 + R14*0x1 + -0x8] CMP byte ptr [R8],0x2e JNZ 0x0019e80d CMP byte ptr [R8 + 0x1],0x0 JZ 0x0019e872 CMP byte ptr [R8 + 0x1],0x2e JNZ 0x0019e80d CMP byte ptr [R8 + 0x2],0x0 JZ 0x0019e872 LAB_0019e80d: MOV ESI,0x200 MOV RDI,RBX MOV RDX,qword ptr [RBP + -0x248] LEA RCX,[RBP + -0x232] XOR R9D,R9D XOR EAX,EAX CALL 0x001d7b7c MOV RAX,qword ptr [R13 + R14*0x1] MOV EAX,dword ptr [RAX + 0x18] MOV ECX,0xf000 AND EAX,ECX MOV RDI,RBX CMP EAX,0x4000 JNZ 0x0019e854 MOV RSI,qword ptr [RBP + -0x240] CALL 0x0019e781 JMP 0x0019e860 LAB_0019e854: MOV RSI,qword ptr [RBP + -0x240] CALL 0x0019e6ac LAB_0019e860: MOV R13D,EAX TEST EAX,EAX JNZ 0x0019e8a5 MOV EAX,dword ptr [R15 + 0x8] LEA RBX,[RBP + -0x230] LAB_0019e872: INC R12 MOV ECX,EAX ADD R14,0x10 CMP R12,RCX JC 0x0019e7ea LAB_0019e884: MOV RDI,R15 CALL 0x001a0084 MOV RDI,qword ptr [RBP + -0x248] CALL 0x00129370 MOV R13D,EAX JMP 0x0019e8ad LAB_0019e89d: MOV R13D,0x1 JMP 0x0019e8ad LAB_0019e8a5: MOV RDI,R15 CALL 0x001a0084 LAB_0019e8ad: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0019e8d1 MOV EAX,R13D ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019e8d1: CALL 0x00129260
int my_rmtree(char *param_1,int8 param_2) { long lVar1; char *pcVar2; uint uVar3; int iVar4; long *plVar5; ulong uVar6; long lVar7; long in_FS_OFFSET; int2 local_23a; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_23a = 0x2f; plVar5 = (long *)my_dir(param_1,0x4000); if (plVar5 == (long *)0x0) { iVar4 = 1; } else { uVar3 = *(uint *)(plVar5 + 1); if (uVar3 != 0) { lVar7 = 8; uVar6 = 0; do { lVar1 = *plVar5; pcVar2 = *(char **)(lVar1 + -8 + lVar7); if ((*pcVar2 != '.') || ((pcVar2[1] != '\0' && ((pcVar2[1] != '.' || (pcVar2[2] != '\0'))))) ) { strxnmov(local_238,0x200,param_1,&local_23a,pcVar2,0); if ((*(uint *)(*(long *)(lVar1 + lVar7) + 0x18) & 0xf000) == 0x4000) { iVar4 = my_rmtree(local_238,param_2); } else { iVar4 = my_delete(local_238,param_2); } if (iVar4 != 0) { my_dirend(plVar5); goto LAB_0019e8ad; } uVar3 = *(uint *)(plVar5 + 1); } uVar6 = uVar6 + 1; lVar7 = lVar7 + 0x10; } while (uVar6 < uVar3); } my_dirend(plVar5); iVar4 = rmdir(param_1); } LAB_0019e8ad: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,604
JS_ReadString
bluesky950520[P]quickjs/quickjs.c
static JSString *JS_ReadString(BCReaderState *s) { uint32_t len; size_t size; BOOL is_wide_char; JSString *p; if (bc_get_leb128(s, &len)) return NULL; is_wide_char = len & 1; len >>= 1; p = js_alloc_string(s->ctx, len, is_wide_char); if (!p) { s->error_state = -1; return NULL; } size = (size_t)len << is_wide_char; if ((s->buf_end - s->ptr) < size) { bc_read_error_end(s); js_free_string(s->ctx->rt, p); return NULL; } memcpy(p->u.str8, s->ptr, size); s->ptr += size; if (is_wide_char) { if (is_be()) { uint32_t i; for (i = 0; i < len; i++) p->u.str16[i] = bswap16(p->u.str16[i]); } } else { p->u.str8[size] = '\0'; /* add the trailing zero for 8 bit strings */ } #ifdef DUMP_READ_OBJECT if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) { bc_read_trace(s, "%s", ""); // hex dump and indentation JS_DumpString(s->ctx->rt, p); printf("\n"); } #endif return p; }
O0
c
JS_ReadString: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq 0x28(%rsp), %rdi leaq 0x24(%rsp), %rsi callq 0x804d0 cmpl $0x0, %eax je 0x8062b movq $0x0, 0x30(%rsp) jmp 0x80774 movl 0x24(%rsp), %eax andl $0x1, %eax movl %eax, 0x14(%rsp) movl 0x24(%rsp), %eax shrl %eax movl %eax, 0x24(%rsp) movq 0x28(%rsp), %rax movq (%rax), %rdi movl 0x24(%rsp), %esi movl 0x14(%rsp), %edx callq 0x2fa50 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x8067c movq 0x28(%rsp), %rax movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF movq $0x0, 0x30(%rsp) jmp 0x80774 movl 0x24(%rsp), %eax movl 0x14(%rsp), %ecx shlq %cl, %rax movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rax movq 0x18(%rax), %rax movq 0x28(%rsp), %rcx movq 0x10(%rcx), %rcx subq %rcx, %rax cmpq 0x18(%rsp), %rax jae 0x806d6 movq 0x28(%rsp), %rdi callq 0x80780 movq 0x28(%rsp), %rax movq (%rax), %rax movq 0x18(%rax), %rdi movq 0x8(%rsp), %rsi callq 0x62e60 movq $0x0, 0x30(%rsp) jmp 0x80774 movq 0x8(%rsp), %rdi addq $0x18, %rdi movq 0x28(%rsp), %rax movq 0x10(%rax), %rsi movq 0x18(%rsp), %rdx callq 0xe610 movq 0x18(%rsp), %rcx movq 0x28(%rsp), %rax addq 0x10(%rax), %rcx movq %rcx, 0x10(%rax) cmpl $0x0, 0x14(%rsp) je 0x8075b callq 0x32f50 cmpb $0x0, %al je 0x80759 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x24(%rsp), %eax jae 0x80757 movq 0x8(%rsp), %rax movl 0x4(%rsp), %ecx movzwl 0x18(%rax,%rcx,2), %edi callq 0x7f840 movw %ax, %dx movq 0x8(%rsp), %rax movl 0x4(%rsp), %ecx movw %dx, 0x18(%rax,%rcx,2) movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x8071c jmp 0x80759 jmp 0x8076a movq 0x8(%rsp), %rax movq 0x18(%rsp), %rcx movb $0x0, 0x18(%rax,%rcx) movq 0x8(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
JS_ReadString: sub rsp, 38h mov [rsp+38h+var_10], rdi mov rdi, [rsp+38h+var_10] lea rsi, [rsp+38h+var_14] call bc_get_leb128 cmp eax, 0 jz short loc_8062B mov [rsp+38h+var_8], 0 jmp loc_80774 loc_8062B: mov eax, [rsp+38h+var_14] and eax, 1 mov [rsp+38h+var_24], eax mov eax, [rsp+38h+var_14] shr eax, 1 mov [rsp+38h+var_14], eax mov rax, [rsp+38h+var_10] mov rdi, [rax] mov esi, [rsp+38h+var_14] mov edx, [rsp+38h+var_24] call js_alloc_string mov [rsp+38h+var_30], rax cmp [rsp+38h+var_30], 0 jnz short loc_8067C mov rax, [rsp+38h+var_10] mov dword ptr [rax+30h], 0FFFFFFFFh mov [rsp+38h+var_8], 0 jmp loc_80774 loc_8067C: mov eax, [rsp+38h+var_14] mov ecx, [rsp+38h+var_24] shl rax, cl mov [rsp+38h+var_20], rax mov rax, [rsp+38h+var_10] mov rax, [rax+18h] mov rcx, [rsp+38h+var_10] mov rcx, [rcx+10h] sub rax, rcx cmp rax, [rsp+38h+var_20] jnb short loc_806D6 mov rdi, [rsp+38h+var_10] call bc_read_error_end mov rax, [rsp+38h+var_10] mov rax, [rax] mov rdi, [rax+18h] mov rsi, [rsp+38h+var_30] call js_free_string mov [rsp+38h+var_8], 0 jmp loc_80774 loc_806D6: mov rdi, [rsp+38h+var_30] add rdi, 18h mov rax, [rsp+38h+var_10] mov rsi, [rax+10h] mov rdx, [rsp+38h+var_20] call _memcpy mov rcx, [rsp+38h+var_20] mov rax, [rsp+38h+var_10] add rcx, [rax+10h] mov [rax+10h], rcx cmp [rsp+38h+var_24], 0 jz short loc_8075B call is_be_0 cmp al, 0 jz short loc_80759 mov [rsp+38h+var_34], 0 loc_8071C: mov eax, [rsp+38h+var_34] cmp eax, [rsp+38h+var_14] jnb short loc_80757 mov rax, [rsp+38h+var_30] mov ecx, [rsp+38h+var_34] movzx edi, word ptr [rax+rcx*2+18h] call bswap16 mov dx, ax mov rax, [rsp+38h+var_30] mov ecx, [rsp+38h+var_34] mov [rax+rcx*2+18h], dx mov eax, [rsp+38h+var_34] add eax, 1 mov [rsp+38h+var_34], eax jmp short loc_8071C loc_80757: jmp short $+2 loc_80759: jmp short loc_8076A loc_8075B: mov rax, [rsp+38h+var_30] mov rcx, [rsp+38h+var_20] mov byte ptr [rax+rcx+18h], 0 loc_8076A: mov rax, [rsp+38h+var_30] mov [rsp+38h+var_8], rax loc_80774: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long JS_ReadString(long long a1) { unsigned int i; // [rsp+4h] [rbp-34h] long long v3; // [rsp+8h] [rbp-30h] unsigned int v4; // [rsp+14h] [rbp-24h] unsigned long long v5; // [rsp+18h] [rbp-20h] unsigned int v6; // [rsp+24h] [rbp-14h] BYREF long long v7; // [rsp+28h] [rbp-10h] v7 = a1; if ( (unsigned int)bc_get_leb128(a1, &v6) ) return 0LL; v4 = v6 & 1; v6 >>= 1; v3 = js_alloc_string(*(_QWORD *)v7, v6, v4); if ( v3 ) { v5 = (unsigned long long)v6 << v4; if ( *(_QWORD *)(v7 + 24) - *(_QWORD *)(v7 + 16) >= v5 ) { memcpy(v3 + 24, *(_QWORD *)(v7 + 16), v5); *(_QWORD *)(v7 + 16) += v5; if ( v4 ) { if ( is_be_0() ) { for ( i = 0; i < v6; ++i ) *(_WORD *)(v3 + 2LL * i + 24) = bswap16(*(_WORD *)(v3 + 2LL * i + 24)); } } else { *(_BYTE *)(v3 + v5 + 24) = 0; } return v3; } else { bc_read_error_end(v7); js_free_string(*(_QWORD *)(*(_QWORD *)v7 + 24LL), v3); return 0LL; } } else { *(_DWORD *)(v7 + 48) = -1; return 0LL; } }
JS_ReadString: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x24] CALL 0x001804d0 CMP EAX,0x0 JZ 0x0018062b MOV qword ptr [RSP + 0x30],0x0 JMP 0x00180774 LAB_0018062b: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0x1 MOV dword ptr [RSP + 0x14],EAX MOV EAX,dword ptr [RSP + 0x24] SHR EAX,0x1 MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX] MOV ESI,dword ptr [RSP + 0x24] MOV EDX,dword ptr [RSP + 0x14] CALL 0x0012fa50 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x0018067c MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x30],0xffffffff MOV qword ptr [RSP + 0x30],0x0 JMP 0x00180774 LAB_0018067c: MOV EAX,dword ptr [RSP + 0x24] MOV ECX,dword ptr [RSP + 0x14] SHL RAX,CL MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RCX + 0x10] SUB RAX,RCX CMP RAX,qword ptr [RSP + 0x18] JNC 0x001806d6 MOV RDI,qword ptr [RSP + 0x28] CALL 0x00180780 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00162e60 MOV qword ptr [RSP + 0x30],0x0 JMP 0x00180774 LAB_001806d6: MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x18 MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0010e610 MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x28] ADD RCX,qword ptr [RAX + 0x10] MOV qword ptr [RAX + 0x10],RCX CMP dword ptr [RSP + 0x14],0x0 JZ 0x0018075b CALL 0x00132f50 CMP AL,0x0 JZ 0x00180759 MOV dword ptr [RSP + 0x4],0x0 LAB_0018071c: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x24] JNC 0x00180757 MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x4] MOVZX EDI,word ptr [RAX + RCX*0x2 + 0x18] CALL 0x0017f840 MOV DX,AX MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x4] MOV word ptr [RAX + RCX*0x2 + 0x18],DX MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x0018071c LAB_00180757: JMP 0x00180759 LAB_00180759: JMP 0x0018076a LAB_0018075b: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x18] MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 LAB_0018076a: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x30],RAX LAB_00180774: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
long JS_ReadString(long *param_1) { char cVar1; int2 uVar2; int iVar3; uint uVar4; long lVar5; ulong __n; uint local_34; uint local_14; long *local_10; long local_8; local_10 = param_1; iVar3 = bc_get_leb128(param_1,&local_14); if (iVar3 == 0) { uVar4 = local_14 & 1; local_14 = local_14 >> 1; lVar5 = js_alloc_string(*local_10,local_14,uVar4); if (lVar5 == 0) { *(int4 *)(local_10 + 6) = 0xffffffff; local_8 = 0; } else { __n = (ulong)local_14 << (sbyte)uVar4; if ((ulong)(local_10[3] - local_10[2]) < __n) { bc_read_error_end(local_10); js_free_string(*(int8 *)(*local_10 + 0x18),lVar5); local_8 = 0; } else { memcpy((void *)(lVar5 + 0x18),(void *)local_10[2],__n); local_10[2] = __n + local_10[2]; local_8 = lVar5; if (uVar4 == 0) { *(int1 *)(lVar5 + 0x18 + __n) = 0; } else { cVar1 = is_be(); if (cVar1 != '\0') { for (local_34 = 0; local_34 < local_14; local_34 = local_34 + 1) { uVar2 = bswap16(*(int2 *)(lVar5 + 0x18 + (ulong)local_34 * 2)); *(int2 *)(lVar5 + 0x18 + (ulong)local_34 * 2) = uVar2; } } } } } } else { local_8 = 0; } return local_8; }
28,605
JS_ReadString
bluesky950520[P]quickjs/quickjs.c
static JSString *JS_ReadString(BCReaderState *s) { uint32_t len; size_t size; BOOL is_wide_char; JSString *p; if (bc_get_leb128(s, &len)) return NULL; is_wide_char = len & 1; len >>= 1; p = js_alloc_string(s->ctx, len, is_wide_char); if (!p) { s->error_state = -1; return NULL; } size = (size_t)len << is_wide_char; if ((s->buf_end - s->ptr) < size) { bc_read_error_end(s); js_free_string(s->ctx->rt, p); return NULL; } memcpy(p->u.str8, s->ptr, size); s->ptr += size; if (is_wide_char) { if (is_be()) { uint32_t i; for (i = 0; i < len; i++) p->u.str16[i] = bswap16(p->u.str16[i]); } } else { p->u.str8[size] = '\0'; /* add the trailing zero for 8 bit strings */ } #ifdef DUMP_READ_OBJECT if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) { bc_read_trace(s, "%s", ""); // hex dump and indentation JS_DumpString(s->ctx->rt, p); printf("\n"); } #endif return p; }
O1
c
JS_ReadString: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 leaq 0xc(%rsp), %rsi callq 0x49ad1 testl %eax, %eax je 0x49b88 xorl %ebx, %ebx movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl 0xc(%rsp), %r15d movl %r15d, %r12d andl $0x1, %r12d shrl %r15d movl %r15d, 0xc(%rsp) movq (%r14), %rdi movl %r15d, %esi movl %r12d, %edx callq 0x24bcf testq %rax, %rax je 0x49c37 movq %rax, %rbx movl %r12d, %ecx shlq %cl, %r15 movq 0x10(%r14), %rsi movq 0x18(%r14), %rax subq %rsi, %rax cmpq %r15, %rax jae 0x49c44 cmpl $0x0, 0x30(%r14) jne 0x49be4 movq (%r14), %rdi leaq 0x59fc9(%rip), %rsi # 0xa3ba6 xorl %eax, %eax callq 0x2652d movl $0xffffffff, 0x30(%r14) # imm = 0xFFFFFFFF movq (%r14), %rax movq 0x18(%rax), %r14 movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) cmpl $0x1, %eax jg 0x49b75 movq 0x4(%rbx), %rax shrq $0x3e, %rax jne 0x49c6e decq 0x28(%r14) movq %rbx, %rdi callq *0x20(%r14) movq 0x30(%r14), %rcx movq 0x40(%r14), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%r14) movq %rbx, %rsi callq *0x10(%r14) jmp 0x49b75 movl $0xffffffff, 0x30(%r14) # imm = 0xFFFFFFFF jmp 0x49b75 movq %rbx, %r13 addq $0x18, %r13 movq %r13, %rdi movq %r15, %rdx callq 0xe620 addq %r15, 0x10(%r14) testl %r12d, %r12d jne 0x49b77 movb $0x0, (%r13,%r15) jmp 0x49b77 movq %r14, %rdi movq %rbx, %rsi callq 0x3f8bf jmp 0x49b75
JS_ReadString: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r14, rdi lea rsi, [rsp+38h+var_2C] call bc_get_leb128 test eax, eax jz short loc_49B88 loc_49B75: xor ebx, ebx loc_49B77: mov rax, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_49B88: mov r15d, [rsp+38h+var_2C] mov r12d, r15d and r12d, 1 shr r15d, 1 mov [rsp+38h+var_2C], r15d mov rdi, [r14] mov esi, r15d mov edx, r12d call js_alloc_string test rax, rax jz loc_49C37 mov rbx, rax mov ecx, r12d shl r15, cl mov rsi, [r14+10h] mov rax, [r14+18h] sub rax, rsi cmp rax, r15 jnb short loc_49C44 cmp dword ptr [r14+30h], 0 jnz short loc_49BE4 mov rdi, [r14] lea rsi, aReadAfterTheEn; "read after the end of the buffer" xor eax, eax call JS_ThrowSyntaxError loc_49BE4: mov dword ptr [r14+30h], 0FFFFFFFFh mov rax, [r14] mov r14, [rax+18h] mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx cmp eax, 1 jg loc_49B75 mov rax, [rbx+4] shr rax, 3Eh jnz short loc_49C6E dec qword ptr [r14+28h] mov rdi, rbx call qword ptr [r14+20h] mov rcx, [r14+30h] mov rdi, [r14+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [r14+30h], rcx mov rsi, rbx call qword ptr [r14+10h] jmp loc_49B75 loc_49C37: mov dword ptr [r14+30h], 0FFFFFFFFh jmp loc_49B75 loc_49C44: mov r13, rbx add r13, 18h mov rdi, r13 mov rdx, r15 call _memcpy add [r14+10h], r15 test r12d, r12d jnz loc_49B77 mov byte ptr [r13+r15+0], 0 jmp loc_49B77 loc_49C6E: mov rdi, r14 mov rsi, rbx call JS_FreeAtomStruct jmp loc_49B75
long long JS_ReadString( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, unsigned long long a13) { long long v13; // rbx unsigned int v15; // r12d long long v16; // r15 long long v17; // rax long long v18; // rdx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 unsigned long long v23; // r15 long long v24; // rsi long long v25; // r14 int v26; // eax long long v27; // rax long long v28; // rdi long long v29; // r13 char v30; // [rsp+0h] [rbp-38h] _DWORD v31[11]; // [rsp+Ch] [rbp-2Ch] BYREF if ( (unsigned int)bc_get_leb128(a1, v31, a11, a12, a13) ) return 0LL; v15 = v31[0] & 1; v16 = v31[0] >> 1; v31[0] = v16; v17 = js_alloc_string(*(_QWORD *)a1, (unsigned int)v16, v15); if ( !v17 ) { *(_DWORD *)(a1 + 48) = -1; return 0LL; } v13 = v17; v23 = v16 << v15; v24 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 24) - v24 < v23 ) { if ( !*(_DWORD *)(a1 + 48) ) JS_ThrowSyntaxError( *(_QWORD *)a1, (long long)"read after the end of the buffer", v18, v15, v19, v20, a2, a3, a4, a5, v21, v22, a8, a9, v30); *(_DWORD *)(a1 + 48) = -1; v25 = *(_QWORD *)(*(_QWORD *)a1 + 24LL); v26 = (*(_DWORD *)v13)--; if ( v26 <= 1 ) { if ( *(_QWORD *)(v13 + 4) >> 62 ) { JS_FreeAtomStruct(v25, v13); } else { --*(_QWORD *)(v25 + 40); v27 = (*(long long ( **)(long long))(v25 + 32))(v13); v28 = *(_QWORD *)(v25 + 64); *(_QWORD *)(v25 + 48) = *(_QWORD *)(v25 + 48) - v27 - 8; (*(void ( **)(long long, long long))(v25 + 16))(v28, v13); } } return 0LL; } v29 = v17 + 24; memcpy(v17 + 24, v24, v23); *(_QWORD *)(a1 + 16) += v23; if ( !v15 ) *(_BYTE *)(v29 + v23) = 0; return v13; }
JS_ReadString: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RDI LEA RSI,[RSP + 0xc] CALL 0x00149ad1 TEST EAX,EAX JZ 0x00149b88 LAB_00149b75: XOR EBX,EBX LAB_00149b77: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00149b88: MOV R15D,dword ptr [RSP + 0xc] MOV R12D,R15D AND R12D,0x1 SHR R15D,0x1 MOV dword ptr [RSP + 0xc],R15D MOV RDI,qword ptr [R14] MOV ESI,R15D MOV EDX,R12D CALL 0x00124bcf TEST RAX,RAX JZ 0x00149c37 MOV RBX,RAX MOV ECX,R12D SHL R15,CL MOV RSI,qword ptr [R14 + 0x10] MOV RAX,qword ptr [R14 + 0x18] SUB RAX,RSI CMP RAX,R15 JNC 0x00149c44 CMP dword ptr [R14 + 0x30],0x0 JNZ 0x00149be4 MOV RDI,qword ptr [R14] LEA RSI,[0x1a3ba6] XOR EAX,EAX CALL 0x0012652d LAB_00149be4: MOV dword ptr [R14 + 0x30],0xffffffff MOV RAX,qword ptr [R14] MOV R14,qword ptr [RAX + 0x18] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX CMP EAX,0x1 JG 0x00149b75 MOV RAX,qword ptr [RBX + 0x4] SHR RAX,0x3e JNZ 0x00149c6e DEC qword ptr [R14 + 0x28] MOV RDI,RBX CALL qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x30] MOV RDI,qword ptr [R14 + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [R14 + 0x30],RCX MOV RSI,RBX CALL qword ptr [R14 + 0x10] JMP 0x00149b75 LAB_00149c37: MOV dword ptr [R14 + 0x30],0xffffffff JMP 0x00149b75 LAB_00149c44: MOV R13,RBX ADD R13,0x18 MOV RDI,R13 MOV RDX,R15 CALL 0x0010e620 ADD qword ptr [R14 + 0x10],R15 TEST R12D,R12D JNZ 0x00149b77 MOV byte ptr [R13 + R15*0x1],0x0 JMP 0x00149b77 LAB_00149c6e: MOV RDI,R14 MOV RSI,RBX CALL 0x0013f8bf JMP 0x00149b75
int * JS_ReadString(long *param_1) { long lVar1; int iVar2; int *piVar3; long lVar4; uint uVar5; ulong uVar6; uint local_2c; iVar2 = bc_get_leb128(param_1,&local_2c); if (iVar2 == 0) { uVar5 = local_2c & 1; local_2c = local_2c >> 1; uVar6 = (ulong)local_2c; piVar3 = (int *)js_alloc_string(*param_1,local_2c,uVar5); if (piVar3 == (int *)0x0) { *(int4 *)(param_1 + 6) = 0xffffffff; } else { uVar6 = uVar6 << (sbyte)uVar5; if (uVar6 <= (ulong)(param_1[3] - param_1[2])) { memcpy(piVar3 + 6,(void *)param_1[2],uVar6); param_1[2] = param_1[2] + uVar6; if (uVar5 != 0) { return piVar3; } *(int1 *)((long)(piVar3 + 6) + uVar6) = 0; return piVar3; } if ((int)param_1[6] == 0) { JS_ThrowSyntaxError(*param_1,"read after the end of the buffer"); } *(int4 *)(param_1 + 6) = 0xffffffff; lVar1 = *(long *)(*param_1 + 0x18); iVar2 = *piVar3; *piVar3 = iVar2 + -1; if (iVar2 < 2) { if (*(ulong *)(piVar3 + 1) >> 0x3e == 0) { *(long *)(lVar1 + 0x28) = *(long *)(lVar1 + 0x28) + -1; lVar4 = (**(code **)(lVar1 + 0x20))(piVar3); *(long *)(lVar1 + 0x30) = (*(long *)(lVar1 + 0x30) - lVar4) + -8; (**(code **)(lVar1 + 0x10))(*(int8 *)(lVar1 + 0x40),piVar3); } else { JS_FreeAtomStruct(lVar1,piVar3); } } } } return (int *)0x0; }
28,606
JS_ReadString
bluesky950520[P]quickjs/quickjs.c
static JSString *JS_ReadString(BCReaderState *s) { uint32_t len; size_t size; BOOL is_wide_char; JSString *p; if (bc_get_leb128(s, &len)) return NULL; is_wide_char = len & 1; len >>= 1; p = js_alloc_string(s->ctx, len, is_wide_char); if (!p) { s->error_state = -1; return NULL; } size = (size_t)len << is_wide_char; if ((s->buf_end - s->ptr) < size) { bc_read_error_end(s); js_free_string(s->ctx->rt, p); return NULL; } memcpy(p->u.str8, s->ptr, size); s->ptr += size; if (is_wide_char) { if (is_be()) { uint32_t i; for (i = 0; i < len; i++) p->u.str16[i] = bswap16(p->u.str16[i]); } } else { p->u.str8[size] = '\0'; /* add the trailing zero for 8 bit strings */ } #ifdef DUMP_READ_OBJECT if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) { bc_read_trace(s, "%s", ""); // hex dump and indentation JS_DumpString(s->ctx->rt, p); printf("\n"); } #endif return p; }
O2
c
JS_ReadString: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0xc(%rsp), %rsi callq 0x40d44 testl %eax, %eax je 0x40da8 xorl %r14d, %r14d movq %r14, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl 0xc(%rsp), %r15d movl %r15d, %r12d andl $0x1, %r12d shrl %r15d movq (%rbx), %rdi movl %r15d, %esi movl %r12d, %edx callq 0x1e8f5 testq %rax, %rax je 0x40dfc movq %rax, %r14 movl %r12d, %ecx shlq %cl, %r15 movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rax subq %rsi, %rax cmpq %r15, %rax jae 0x40e02 movq %rbx, %rdi callq 0x40e2c movq (%rbx), %rax movq 0x18(%rax), %rdi movq %r14, %rsi callq 0x38294 jmp 0x40d94 orl $-0x1, 0x30(%rbx) jmp 0x40d94 movq %r14, %r13 addq $0x18, %r13 movq %r13, %rdi movq %r15, %rdx callq 0xe630 addq %r15, 0x10(%rbx) testl %r12d, %r12d jne 0x40d97 movb $0x0, (%r13,%r15) jmp 0x40d97
JS_ReadString: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdi lea rsi, [rsp+38h+var_2C] call bc_get_leb128 test eax, eax jz short loc_40DA8 loc_40D94: xor r14d, r14d loc_40D97: mov rax, r14 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_40DA8: mov r15d, [rsp+38h+var_2C] mov r12d, r15d and r12d, 1 shr r15d, 1 mov rdi, [rbx] mov esi, r15d mov edx, r12d call js_alloc_string test rax, rax jz short loc_40DFC mov r14, rax mov ecx, r12d shl r15, cl mov rsi, [rbx+10h] mov rax, [rbx+18h] sub rax, rsi cmp rax, r15 jnb short loc_40E02 mov rdi, rbx call bc_read_error_end mov rax, [rbx] mov rdi, [rax+18h] mov rsi, r14 call js_free_string jmp short loc_40D94 loc_40DFC: or dword ptr [rbx+30h], 0FFFFFFFFh jmp short loc_40D94 loc_40E02: mov r13, r14 add r13, 18h mov rdi, r13 mov rdx, r15 call _memcpy add [rbx+10h], r15 test r12d, r12d jnz loc_40D97 mov byte ptr [r13+r15+0], 0 jmp loc_40D97
long long JS_ReadString(long long a1) { long long v1; // r14 int v3; // r12d long long v4; // r15 long long v5; // rax unsigned long long v6; // r15 long long v7; // rsi long long v8; // r13 _DWORD v9[11]; // [rsp+Ch] [rbp-2Ch] BYREF if ( (unsigned int)bc_get_leb128(a1, v9) ) return 0LL; v3 = v9[0] & 1; v4 = v9[0] >> 1; v5 = js_alloc_string(*(_QWORD *)a1, v4, v9[0] & 1); if ( !v5 ) { *(_DWORD *)(a1 + 48) = -1; return 0LL; } v1 = v5; v6 = v4 << v3; v7 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 24) - v7 < v6 ) { bc_read_error_end(a1); js_free_string(*(_QWORD *)(*(_QWORD *)a1 + 24LL), v1); return 0LL; } v8 = v5 + 24; memcpy(v5 + 24, v7, v6); *(_QWORD *)(a1 + 16) += v6; if ( !v3 ) *(_BYTE *)(v8 + v6) = 0; return v1; }
JS_ReadString: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI LEA RSI,[RSP + 0xc] CALL 0x00140d44 TEST EAX,EAX JZ 0x00140da8 LAB_00140d94: XOR R14D,R14D LAB_00140d97: MOV RAX,R14 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00140da8: MOV R15D,dword ptr [RSP + 0xc] MOV R12D,R15D AND R12D,0x1 SHR R15D,0x1 MOV RDI,qword ptr [RBX] MOV ESI,R15D MOV EDX,R12D CALL 0x0011e8f5 TEST RAX,RAX JZ 0x00140dfc MOV R14,RAX MOV ECX,R12D SHL R15,CL MOV RSI,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RBX + 0x18] SUB RAX,RSI CMP RAX,R15 JNC 0x00140e02 MOV RDI,RBX CALL 0x00140e2c MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,R14 CALL 0x00138294 JMP 0x00140d94 LAB_00140dfc: OR dword ptr [RBX + 0x30],0xffffffff JMP 0x00140d94 LAB_00140e02: MOV R13,R14 ADD R13,0x18 MOV RDI,R13 MOV RDX,R15 CALL 0x0010e630 ADD qword ptr [RBX + 0x10],R15 TEST R12D,R12D JNZ 0x00140d97 MOV byte ptr [R13 + R15*0x1],0x0 JMP 0x00140d97
long JS_ReadString(long *param_1) { int iVar1; long lVar2; uint uVar3; ulong __n; uint local_2c; iVar1 = bc_get_leb128(param_1,&local_2c); if (iVar1 == 0) { uVar3 = local_2c & 1; lVar2 = js_alloc_string(*param_1,(ulong)(local_2c >> 1),uVar3); if (lVar2 == 0) { *(int4 *)(param_1 + 6) = 0xffffffff; } else { __n = (ulong)(local_2c >> 1) << (sbyte)uVar3; if (__n <= (ulong)(param_1[3] - param_1[2])) { memcpy((void *)(lVar2 + 0x18),(void *)param_1[2],__n); param_1[2] = param_1[2] + __n; if (uVar3 != 0) { return lVar2; } *(int1 *)(lVar2 + 0x18 + __n) = 0; return lVar2; } bc_read_error_end(param_1); js_free_string(*(int8 *)(*param_1 + 0x18),lVar2); } } return 0; }
28,607
process_int_arg
eloqsql/strings/my_vsnprintf.c
static char *process_int_arg(char *to, const char *end, size_t length, longlong par, char arg_type, uint print_type) { size_t res_length, to_length; char *store_start= to, *store_end; char buff[32]; if ((to_length= (size_t) (end-to)) < 16 || length) store_start= buff; if (arg_type == 'd' || arg_type == 'i') store_end= longlong10_to_str(par, store_start, -10); else if (arg_type == 'u') store_end= longlong10_to_str(par, store_start, 10); else if (arg_type == 'p') { store_start[0]= '0'; store_start[1]= 'x'; store_end= ll2str(par, store_start + 2, 16, 0); } else if (arg_type == 'o') { store_end= ll2str(par, store_start, 8, 0); } else { DBUG_ASSERT(arg_type == 'X' || arg_type =='x'); store_end= ll2str(par, store_start, 16, (arg_type == 'X')); } if ((res_length= (size_t) (store_end - store_start)) > to_length) return to; /* num doesn't fit in output */ /* If %#d syntax was used, we have to pre-zero/pre-space the string */ if (store_start == buff) { length= MY_MIN(length, to_length); if (res_length < length) { size_t diff= (length- res_length); bfill(to, diff, (print_type & PREZERO_ARG) ? '0' : ' '); if (arg_type == 'p' && print_type & PREZERO_ARG) { if (diff > 1) to[1]= 'x'; else store_start[0]= 'x'; store_start[1]= '0'; } to+= diff; } bmove(to, store_start, res_length); } to+= res_length; return to; }
O3
c
process_int_arg: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r13 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) subq %rdi, %r13 cmpq $0x10, %r13 setb %al movq %rdx, -0x68(%rbp) testq %rdx, %rdx setne %dl orb %al, %dl leaq -0x50(%rbp), %rax movq %rdi, %r15 cmovneq %rax, %r15 cmpl $0x6e, %r8d movl %r8d, -0x58(%rbp) movb %dl, -0x51(%rbp) movq %r9, -0x60(%rbp) jle 0x8f0ba cmpl $0x6f, %r8d je 0x8f0db cmpl $0x70, %r8d je 0x8f0eb movq %rax, %r12 cmpl $0x75, %r8d jne 0x8f10f movq %rcx, %rdi movq %r15, %rsi movl $0xa, %edx jmp 0x8f0d4 movq %rax, %r12 cmpl $0x64, %r8d je 0x8f0c9 cmpl $0x69, %r8d jne 0x8f10f movq %rcx, %rdi movq %r15, %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 callq 0x8dca6 jmp 0x8f12a movq %rax, %r12 movq %rcx, %rdi movq %r15, %rsi movl $0x8, %edx jmp 0x8f10b movb $0x30, (%r15) testb %dl, %dl movq %rbx, %rsi movq %rax, %r12 cmovneq %rax, %rsi movb $0x78, 0x1(%rsi) addq $0x2, %rsi movq %rcx, %rdi movl $0x10, %edx xorl %ecx, %ecx jmp 0x8f125 xorl %eax, %eax cmpb $0x58, %r8b sete %al movq %rcx, %rdi movq %r15, %rsi movl $0x10, %edx movl %eax, %ecx callq 0x8dbd0 movq %rax, %r14 subq %r15, %r14 cmpq %r13, %r14 ja 0x8f1a6 cmpq %r12, %r15 jne 0x8f1a3 movq -0x68(%rbp), %r12 cmpq %r12, %r13 cmovbq %r13, %r12 subq %r14, %r12 jbe 0x8f195 movq -0x60(%rbp), %rax andl $0x4, %eax sete %r13b leal 0x20(,%rax,4), %esi movq %rbx, %rdi movq %r12, %rdx callq 0x281c0 cmpb $0x70, -0x58(%rbp) setne %al orb %r13b, %al jne 0x8f192 leaq 0x1(%rbx), %rax cmpq $0x2, %r12 cmovbq %r15, %rax movb $0x78, (%rax) cmpb $0x0, -0x51(%rbp) leaq -0x50(%rbp), %rax cmoveq %rbx, %rax movb $0x30, 0x1(%rax) addq %r12, %rbx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x28650 addq %r14, %rbx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x8f1c7 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x283f0
process_int_arg: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax sub r13, rdi cmp r13, 10h setb al mov [rbp+var_68], rdx test rdx, rdx setnz dl or dl, al lea rax, [rbp+var_50] mov r15, rdi cmovnz r15, rax cmp r8d, 6Eh ; 'n' mov [rbp+var_58], r8d mov [rbp+var_51], dl mov [rbp+var_60], r9 jle short loc_8F0BA cmp r8d, 6Fh ; 'o' jz short loc_8F0DB cmp r8d, 70h ; 'p' jz short loc_8F0EB mov r12, rax cmp r8d, 75h ; 'u' jnz short loc_8F10F mov rdi, rcx mov rsi, r15 mov edx, 0Ah jmp short loc_8F0D4 loc_8F0BA: mov r12, rax cmp r8d, 64h ; 'd' jz short loc_8F0C9 cmp r8d, 69h ; 'i' jnz short loc_8F10F loc_8F0C9: mov rdi, rcx mov rsi, r15 mov edx, 0FFFFFFF6h loc_8F0D4: call int10_to_str jmp short loc_8F12A loc_8F0DB: mov r12, rax mov rdi, rcx mov rsi, r15 mov edx, 8 jmp short loc_8F10B loc_8F0EB: mov byte ptr [r15], 30h ; '0' test dl, dl mov rsi, rbx mov r12, rax cmovnz rsi, rax mov byte ptr [rsi+1], 78h ; 'x' add rsi, 2 mov rdi, rcx mov edx, 10h loc_8F10B: xor ecx, ecx jmp short loc_8F125 loc_8F10F: xor eax, eax cmp r8b, 58h ; 'X' setz al mov rdi, rcx mov rsi, r15 mov edx, 10h mov ecx, eax loc_8F125: call int2str loc_8F12A: mov r14, rax sub r14, r15 cmp r14, r13 ja short loc_8F1A6 cmp r15, r12 jnz short loc_8F1A3 mov r12, [rbp+var_68] cmp r13, r12 cmovb r12, r13 sub r12, r14 jbe short loc_8F195 mov rax, [rbp+var_60] and eax, 4 setz r13b lea esi, ds:20h[rax*4] mov rdi, rbx mov rdx, r12 call _memset cmp byte ptr [rbp+var_58], 70h ; 'p' setnz al or al, r13b jnz short loc_8F192 lea rax, [rbx+1] cmp r12, 2 cmovb rax, r15 mov byte ptr [rax], 78h ; 'x' cmp [rbp+var_51], 0 lea rax, [rbp+var_50] cmovz rax, rbx mov byte ptr [rax+1], 30h ; '0' loc_8F192: add rbx, r12 loc_8F195: mov rdi, rbx mov rsi, r15 mov rdx, r14 call _memmove loc_8F1A3: add rbx, r14 loc_8F1A6: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_8F1C7 mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8F1C7: call ___stack_chk_fail
_BYTE * process_int_arg(_BYTE *a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, char a6) { _BYTE *v6; // rbx unsigned long long v7; // r13 bool v8; // dl _BYTE *v9; // r15 unsigned long long v10; // rdi _BYTE *v11; // rsi int v12; // edx _BYTE *v13; // rax unsigned long long v14; // rdi _BYTE *v15; // rsi unsigned int v16; // edx _BYTE *v17; // rsi BOOL v18; // ecx unsigned long long v19; // r14 unsigned long long v20; // r12 bool v21; // cc unsigned long long v22; // r12 _BYTE *v23; // rax _BYTE *v24; // rax char v28; // [rsp+18h] [rbp-58h] bool v29; // [rsp+1Fh] [rbp-51h] _BYTE v30[32]; // [rsp+20h] [rbp-50h] BYREF unsigned long long v31; // [rsp+40h] [rbp-30h] v6 = a1; v31 = __readfsqword(0x28u); v7 = a2 - (_QWORD)a1; v8 = (unsigned long long)(a2 - (_QWORD)a1) < 0x10 || a3 != 0; v9 = a1; if ( v8 ) v9 = v30; v28 = a5; v29 = v8; if ( a5 <= 110 ) { if ( a5 == 100 || a5 == 105 ) { v10 = a4; v11 = v9; v12 = -10; goto LABEL_11; } goto LABEL_17; } switch ( a5 ) { case 'o': v14 = a4; v15 = v9; v16 = 8; break; case 'p': *v9 = 48; v17 = a1; if ( v8 ) v17 = v30; v17[1] = 120; v15 = v17 + 2; v14 = a4; v16 = 16; break; case 'u': v10 = a4; v11 = v9; v12 = 10; LABEL_11: v13 = int10_to_str(v10, v11, v12); goto LABEL_19; default: LABEL_17: v14 = a4; v15 = v9; v16 = 16; v18 = (_BYTE)a5 == 88; goto LABEL_18; } v18 = 0; LABEL_18: v13 = int2str(v14, v15, v16, v18); LABEL_19: v19 = v13 - v9; if ( v13 - v9 <= v7 ) { if ( v9 == v30 ) { v20 = a3; if ( v7 < a3 ) v20 = v7; v21 = v20 <= v19; v22 = v20 - v19; if ( !v21 ) { memset(v6, 4 * (a6 & 4u) + 32, v22); if ( (a6 & 4) != 0 && v28 == 112 ) { v23 = v6 + 1; if ( v22 < 2 ) v23 = v9; *v23 = 120; v24 = v30; if ( !v29 ) v24 = v6; v24[1] = 48; } v6 += v22; } memmove(v6, v9, v19); } v6 += v19; } return v6; }
process_int_arg: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX SUB R13,RDI CMP R13,0x10 SETC AL MOV qword ptr [RBP + -0x68],RDX TEST RDX,RDX SETNZ DL OR DL,AL LEA RAX,[RBP + -0x50] MOV R15,RDI CMOVNZ R15,RAX CMP R8D,0x6e MOV dword ptr [RBP + -0x58],R8D MOV byte ptr [RBP + -0x51],DL MOV qword ptr [RBP + -0x60],R9 JLE 0x0018f0ba CMP R8D,0x6f JZ 0x0018f0db CMP R8D,0x70 JZ 0x0018f0eb MOV R12,RAX CMP R8D,0x75 JNZ 0x0018f10f MOV RDI,RCX MOV RSI,R15 MOV EDX,0xa JMP 0x0018f0d4 LAB_0018f0ba: MOV R12,RAX CMP R8D,0x64 JZ 0x0018f0c9 CMP R8D,0x69 JNZ 0x0018f10f LAB_0018f0c9: MOV RDI,RCX MOV RSI,R15 MOV EDX,0xfffffff6 LAB_0018f0d4: CALL 0x0018dca6 JMP 0x0018f12a LAB_0018f0db: MOV R12,RAX MOV RDI,RCX MOV RSI,R15 MOV EDX,0x8 JMP 0x0018f10b LAB_0018f0eb: MOV byte ptr [R15],0x30 TEST DL,DL MOV RSI,RBX MOV R12,RAX CMOVNZ RSI,RAX MOV byte ptr [RSI + 0x1],0x78 ADD RSI,0x2 MOV RDI,RCX MOV EDX,0x10 LAB_0018f10b: XOR ECX,ECX JMP 0x0018f125 LAB_0018f10f: XOR EAX,EAX CMP R8B,0x58 SETZ AL MOV RDI,RCX MOV RSI,R15 MOV EDX,0x10 MOV ECX,EAX LAB_0018f125: CALL 0x0018dbd0 LAB_0018f12a: MOV R14,RAX SUB R14,R15 CMP R14,R13 JA 0x0018f1a6 CMP R15,R12 JNZ 0x0018f1a3 MOV R12,qword ptr [RBP + -0x68] CMP R13,R12 CMOVC R12,R13 SUB R12,R14 JBE 0x0018f195 MOV RAX,qword ptr [RBP + -0x60] AND EAX,0x4 SETZ R13B LEA ESI,[0x20 + RAX*0x4] MOV RDI,RBX MOV RDX,R12 CALL 0x001281c0 CMP byte ptr [RBP + -0x58],0x70 SETNZ AL OR AL,R13B JNZ 0x0018f192 LEA RAX,[RBX + 0x1] CMP R12,0x2 CMOVC RAX,R15 MOV byte ptr [RAX],0x78 CMP byte ptr [RBP + -0x51],0x0 LEA RAX,[RBP + -0x50] CMOVZ RAX,RBX MOV byte ptr [RAX + 0x1],0x30 LAB_0018f192: ADD RBX,R12 LAB_0018f195: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00128650 LAB_0018f1a3: ADD RBX,R14 LAB_0018f1a6: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0018f1c7 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018f1c7: CALL 0x001283f0
int1 * process_int_arg(int1 *param_1,long param_2,ulong param_3,int8 param_4,int param_5, uint param_6) { long lVar1; int1 *puVar2; int8 uVar3; ulong uVar4; ulong __n; int1 *__src; long in_FS_OFFSET; bool bVar5; bool bVar6; bool bVar7; int1 local_58 [32]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = param_2 - (long)param_1; bVar5 = uVar4 < 0x10; bVar6 = param_3 != 0; __src = param_1; if (bVar6 || bVar5) { __src = local_58; } puVar2 = __src; if (param_5 < 0x6f) { if ((param_5 == 100) || (param_5 == 0x69)) { uVar3 = 0xfffffff6; LAB_0018f0d4: lVar1 = int10_to_str(param_4,__src,uVar3); goto LAB_0018f12a; } LAB_0018f10f: bVar7 = (char)param_5 == 'X'; uVar3 = 0x10; } else { if (param_5 == 0x6f) { uVar3 = 8; } else { if (param_5 != 0x70) { if (param_5 != 0x75) goto LAB_0018f10f; uVar3 = 10; goto LAB_0018f0d4; } *__src = 0x30; puVar2 = param_1; if (bVar6 || bVar5) { puVar2 = local_58; } puVar2[1] = 0x78; uVar3 = 0x10; puVar2 = puVar2 + 2; } bVar7 = false; } lVar1 = int2str(param_4,puVar2,uVar3,bVar7); LAB_0018f12a: __n = lVar1 - (long)__src; if (__n <= uVar4) { if (__src == local_58) { if (uVar4 < param_3) { param_3 = uVar4; } uVar4 = param_3 - __n; if (__n <= param_3 && uVar4 != 0) { memset(param_1,(param_6 & 4) * 4 + 0x20,uVar4); if ((char)param_5 == 'p' && (param_6 & 4) != 0) { puVar2 = param_1 + 1; if (uVar4 < 2) { puVar2 = __src; } *puVar2 = 0x78; puVar2 = local_58; if (!bVar6 && !bVar5) { puVar2 = param_1; } puVar2[1] = 0x30; } param_1 = param_1 + uVar4; } memmove(param_1,__src,__n); } param_1 = param_1 + __n; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return param_1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,608
translog_buffer_lock
eloqsql/storage/maria/ma_loghandler.c
static void translog_buffer_lock(struct st_translog_buffer *buffer) { DBUG_ENTER("translog_buffer_lock"); DBUG_PRINT("enter", ("Lock buffer #%u: %p", buffer->buffer_no, buffer)); mysql_mutex_lock(&buffer->mutex); DBUG_VOID_RETURN; }
O3
c
translog_buffer_lock: pushq %rbp movq %rsp, %rbp movq %rdi, %rax addq $0x100090, %rdi # imm = 0x100090 cmpq $0x0, 0x1000d0(%rax) jne 0x6901d popq %rbp jmp 0x291d0 leaq 0x76da8(%rip), %rsi # 0xdfdcc movl $0x6cb, %edx # imm = 0x6CB popq %rbp jmp 0x2eee9
translog_buffer_lock: push rbp mov rbp, rsp mov rax, rdi add rdi, 100090h cmp ds:qword_1000D0[rax], 0 jnz short loc_6901D pop rbp jmp _pthread_mutex_lock loc_6901D: lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 6CBh pop rbp jmp psi_mutex_lock
long long translog_buffer_lock(long long a1) { long long v2; // rdi v2 = a1 + 1048720; if ( *(long long *)((char *)&qword_1000D0 + a1) ) return psi_mutex_lock(v2, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x6CBu); else return pthread_mutex_lock(v2); }
translog_buffer_lock: PUSH RBP MOV RBP,RSP MOV RAX,RDI ADD RDI,0x100090 CMP qword ptr [RAX + 0x1000d0],0x0 JNZ 0x0016901d POP RBP JMP 0x001291d0 LAB_0016901d: LEA RSI,[0x1dfdcc] MOV EDX,0x6cb POP RBP JMP 0x0012eee9
void translog_buffer_lock(long param_1) { pthread_mutex_t *__mutex; __mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1); if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + param_1) == 0) { pthread_mutex_lock(__mutex); return; } psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x6cb); return; }
28,609
ha_federated::real_connect()
eloqsql/storage/federated/ha_federated.cc
int ha_federated::real_connect() { char buffer[FEDERATED_QUERY_BUFFER_SIZE]; String sql_query(buffer, sizeof(buffer), &my_charset_bin); DBUG_ENTER("ha_federated::real_connect"); DBUG_ASSERT(mysql == NULL); if (!(mysql= mysql_init(NULL))) { remote_error_number= HA_ERR_OUT_OF_MEM; DBUG_RETURN(-1); } /* BUG# 17044 Federated Storage Engine is not UTF8 clean Add set names to whatever charset the table is at open of table */ /* this sets the csname like 'set names utf8' */ mysql_options(mysql,MYSQL_SET_CHARSET_NAME, this->table->s->table_charset->cs_name.str); sql_query.length(0); if (!mysql_real_connect(mysql, share->hostname, share->username, share->password, share->database, share->port, share->socket, 0)) { stash_remote_error(); mysql_close(mysql); mysql= NULL; my_error(ER_CONNECT_TO_FOREIGN_DATA_SOURCE, MYF(0), remote_error_buf); remote_error_number= -1; DBUG_RETURN(-1); } /* We have established a connection, lets try a simple dummy query just to check that the table and expected columns are present. */ sql_query.append(share->select_query, strlen(share->select_query)); sql_query.append(STRING_WITH_LEN(" WHERE 1=0")); if (mysql_real_query(mysql, sql_query.ptr(), sql_query.length())) { sql_query.length(0); sql_query.append(STRING_WITH_LEN("error: ")); sql_query.qs_append(mysql_errno(mysql)); sql_query.append(STRING_WITH_LEN(" '")); const char *errmsg= mysql_error(mysql); sql_query.append(errmsg, strlen(errmsg)); sql_query.append('\''); mysql_close(mysql); mysql= NULL; my_error(ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST, MYF(0), sql_query.c_ptr_safe()); remote_error_number= -1; DBUG_RETURN(-1); } /* Just throw away the result, no rows anyways but need to keep in sync */ mysql_free_result(mysql_store_result(mysql)); /* Since we do not support transactions at this version, we can let the client API silently reconnect. For future versions, we will need more logic to deal with transactions */ mysql->reconnect= 1; DBUG_RETURN(0); }
O3
cpp
ha_federated::real_connect(): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1c0, %rsp # imm = 0x1C0 movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) movq 0x6c65(%rip), %rax # 0x10f88 leaq -0x1d8(%rbp), %rbx movq %rax, -0x8(%rbx) leaq -0x1c0(%rbp), %rax movq %rax, (%rbx) movabsq $0x19000000190, %rax # imm = 0x19000000190 movq %rax, 0x8(%rbx) movl $0x0, 0x10(%rbx) movw $0x0, 0x14(%rbx) xorl %edi, %edi callq 0x84e0 movq %rax, 0x540(%r14) testq %rax, %rax je 0xa55a movq 0x10(%r14), %rcx movq (%rcx), %rcx movq 0x260(%rcx), %rcx movq 0x10(%rcx), %rdx movq %rax, %rdi movl $0x7, %esi callq 0x8590 movl $0x0, -0x1d0(%rbp) movq 0x538(%r14), %rax movq 0x540(%r14), %rdi movq 0x78(%rax), %rsi movq 0x80(%rax), %rdx movq 0x88(%rax), %rcx movq 0x90(%rax), %r8 movzwl 0xbc(%rax), %r9d pushq $0x0 pushq 0xa8(%rax) callq 0x8290 addq $0x10, %rsp testq %rax, %rax je 0xa567 movq 0x538(%r14), %rax movq 0x50(%rax), %r15 movq %r15, %rdi callq 0x8190 leaq -0x1e0(%rbp), %rdi movq %r15, %rsi movq %rax, %rdx callq 0x80f0 leaq 0x2dcf(%rip), %rsi # 0xd1d7 leaq -0x1e0(%rbp), %rdi movl $0xa, %edx callq 0x80f0 movq 0x540(%r14), %rdi movq -0x1d8(%rbp), %rsi movl -0x1d0(%rbp), %edx callq 0x8110 testl %eax, %eax je 0xa5dd leaq -0x1e0(%rbp), %rdi movl $0x0, 0x10(%rdi) leaq 0x2d93(%rip), %rsi # 0xd1e2 movl $0x7, %edx callq 0x80f0 movq 0x540(%r14), %rdi callq 0x8480 movl %eax, %esi movq %rbx, %rdi callq 0x84a0 leaq 0x2d74(%rip), %rsi # 0xd1ea leaq -0x1e0(%rbp), %rdi movl $0x3, %edx callq 0x80f0 movq 0x540(%r14), %rdi callq 0x8400 movq %rax, %r15 movq %rax, %rdi callq 0x8190 leaq -0x1e0(%rbp), %rdi movq %r15, %rsi movq %rax, %rdx callq 0x80f0 movl -0x1d0(%rbp), %esi cmpl -0x1cc(%rbp), %esi jb 0xa4d2 incl %esi movq %rbx, %rdi callq 0x8490 testb %al, %al jne 0xa4e8 movl -0x1d0(%rbp), %esi movq -0x1d8(%rbp), %rax leal 0x1(%rsi), %ecx movl %ecx, -0x1d0(%rbp) movl %esi, %ecx movb $0x27, (%rax,%rcx) movq 0x540(%r14), %rdi callq 0x80a0 movq $0x0, 0x540(%r14) movq 0x6a8a(%rip), %rax # 0x10f90 movq (%rax), %rax movq (%rax), %r15 movq -0x1d8(%rbp), %rax movl -0x1d0(%rbp), %r12d testq %rax, %rax je 0xa528 cmpl -0x1cc(%rbp), %r12d jb 0xa540 leaq 0x1(%r12), %rsi movq %rbx, %rdi callq 0x8530 testb %al, %al jne 0xa545 movq -0x1d8(%rbp), %rax movb $0x0, (%rax,%r12) movq -0x1d8(%rbp), %rdx movl $0x597, %edi # imm = 0x597 xorl %esi, %esi xorl %eax, %eax callq *%r15 jmp 0xa5a2 movl $0x80, 0x588(%r14) jmp 0xa5ad movq %r14, %rdi callq 0x82e0 movq 0x540(%r14), %rdi callq 0x80a0 movq $0x0, 0x540(%r14) movq 0x6a03(%rip), %rax # 0x10f90 movq (%rax), %rcx leaq 0x58c(%r14), %rdx movl $0x595, %edi # imm = 0x595 xorl %esi, %esi xorl %eax, %eax callq *(%rcx) movl $0xffffffff, 0x588(%r14) # imm = 0xFFFFFFFF movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq %rbx, %rdi callq 0x8510 movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0xa628 movl %r14d, %eax addq $0x1c0, %rsp # imm = 0x1C0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq 0x540(%r14), %rdi callq 0x82c0 movq %rax, %rdi callq 0x8160 movq 0x540(%r14), %rax movb $0x1, 0x495(%rax) xorl %r14d, %r14d jmp 0xa5b3 jmp 0xa606 movq %rax, %r14 movq %rbx, %rdi callq 0x8510 movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0xa628 movq %r14, %rdi callq 0x8560 callq 0x83a0 nop
_ZN12ha_federated12real_connectEv: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 1C0h mov r14, rdi mov rax, fs:28h mov [rbp+var_28], rax mov rax, cs:my_charset_bin_ptr lea rbx, [rbp+var_1D8] mov [rbx-8], rax lea rax, [rbp+var_1C0] mov [rbx], rax mov rax, 19000000190h mov [rbx+8], rax mov dword ptr [rbx+10h], 0 mov word ptr [rbx+14h], 0 xor edi, edi call _mysql_init mov [r14+540h], rax test rax, rax jz loc_A55A mov rcx, [r14+10h] mov rcx, [rcx] mov rcx, [rcx+260h] mov rdx, [rcx+10h] mov rdi, rax mov esi, 7 call _mysql_options mov [rbp+var_1D0], 0 mov rax, [r14+538h] mov rdi, [r14+540h] mov rsi, [rax+78h] mov rdx, [rax+80h] mov rcx, [rax+88h] mov r8, [rax+90h] movzx r9d, word ptr [rax+0BCh] push 0 push qword ptr [rax+0A8h] call _mysql_real_connect add rsp, 10h test rax, rax jz loc_A567 mov rax, [r14+538h] mov r15, [rax+50h] mov rdi, r15 call _strlen lea rdi, [rbp+var_1E0]; this mov rsi, r15; char * mov rdx, rax; unsigned __int64 call __ZN6String6appendEPKcm; String::append(char const*,ulong) lea rsi, aWhere10; " WHERE 1=0" lea rdi, [rbp+var_1E0]; this mov edx, 0Ah; unsigned __int64 call __ZN6String6appendEPKcm; String::append(char const*,ulong) mov rdi, [r14+540h] mov rsi, [rbp+var_1D8] mov edx, [rbp+var_1D0] call _mysql_real_query test eax, eax jz loc_A5DD lea rdi, [rbp+var_1E0]; this mov dword ptr [rdi+10h], 0 lea rsi, aError; "error: " mov edx, 7; unsigned __int64 call __ZN6String6appendEPKcm; String::append(char const*,ulong) mov rdi, [r14+540h] call _mysql_errno mov esi, eax; unsigned __int64 mov rdi, rbx; this call __ZN13Binary_string9qs_appendEy; Binary_string::qs_append(ulong long) lea rsi, asc_D1EA; " '" lea rdi, [rbp+var_1E0]; this mov edx, 3; unsigned __int64 call __ZN6String6appendEPKcm; String::append(char const*,ulong) mov rdi, [r14+540h] call _mysql_error mov r15, rax mov rdi, rax call _strlen lea rdi, [rbp+var_1E0]; this mov rsi, r15; char * mov rdx, rax; unsigned __int64 call __ZN6String6appendEPKcm; String::append(char const*,ulong) mov esi, [rbp+var_1D0] cmp esi, [rbp+var_1CC] jb short loc_A4D2 inc esi; unsigned __int64 mov rdi, rbx; this call __ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong) test al, al jnz short loc_A4E8 mov esi, [rbp+var_1D0] loc_A4D2: mov rax, [rbp+var_1D8] lea ecx, [rsi+1] mov [rbp+var_1D0], ecx mov ecx, esi mov byte ptr [rax+rcx], 27h ; ''' loc_A4E8: mov rdi, [r14+540h] call _mysql_close mov qword ptr [r14+540h], 0 mov rax, cs:my_print_error_service_ptr mov rax, [rax] mov r15, [rax] mov rax, [rbp+var_1D8] mov r12d, [rbp+var_1D0] test rax, rax jz short loc_A528 cmp r12d, [rbp+var_1CC] jb short loc_A540 loc_A528: lea rsi, [r12+1]; unsigned __int64 mov rdi, rbx; this call __ZN13Binary_string11realloc_rawEm; Binary_string::realloc_raw(ulong) test al, al jnz short loc_A545 mov rax, [rbp+var_1D8] loc_A540: mov byte ptr [rax+r12], 0 loc_A545: mov rdx, [rbp+var_1D8] mov edi, 597h xor esi, esi xor eax, eax call r15 jmp short loc_A5A2 loc_A55A: mov dword ptr [r14+588h], 80h jmp short loc_A5AD loc_A567: mov rdi, r14; this call __ZN12ha_federated18stash_remote_errorEv; ha_federated::stash_remote_error(void) mov rdi, [r14+540h] call _mysql_close mov qword ptr [r14+540h], 0 mov rax, cs:my_print_error_service_ptr mov rcx, [rax] lea rdx, [r14+58Ch] mov edi, 595h xor esi, esi xor eax, eax call qword ptr [rcx] loc_A5A2: mov dword ptr [r14+588h], 0FFFFFFFFh loc_A5AD: mov r14d, 0FFFFFFFFh loc_A5B3: mov rdi, rbx; this call __ZN13Binary_stringD2Ev; Binary_string::~Binary_string() mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_A628 mov eax, r14d add rsp, 1C0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A5DD: mov rdi, [r14+540h] call _mysql_store_result mov rdi, rax call _mysql_free_result mov rax, [r14+540h] mov byte ptr [rax+495h], 1 xor r14d, r14d jmp short loc_A5B3 jmp short $+2 loc_A606: mov r14, rax mov rdi, rbx; this call __ZN13Binary_stringD2Ev; Binary_string::~Binary_string() mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_A628 mov rdi, r14 call __Unwind_Resume loc_A628: call ___stack_chk_fail
long long ha_federated::real_connect(ha_federated *this) { long long v1; // rax long long v2; // rax const char *v3; // r15 unsigned long long v4; // rax unsigned int v5; // eax const char *v6; // r15 unsigned long long v7; // rax int v8; // esi void ( *v9)(long long, _QWORD, char *); // r15 char *v10; // rax long long v11; // r12 unsigned int v12; // r14d long long v14; // rax void *v15; // [rsp+0h] [rbp-1E0h] BYREF char *v16; // [rsp+8h] [rbp-1D8h] BYREF long long v17; // [rsp+10h] [rbp-1D0h] int v18; // [rsp+18h] [rbp-1C8h] __int16 v19; // [rsp+1Ch] [rbp-1C4h] char v20; // [rsp+20h] [rbp-1C0h] BYREF unsigned long long v21; // [rsp+1B8h] [rbp-28h] v21 = __readfsqword(0x28u); v15 = &my_charset_bin; v16 = &v20; v17 = 0x19000000190LL; v18 = 0; v19 = 0; v1 = mysql_init(0LL); *((_QWORD *)this + 168) = v1; if ( v1 ) { mysql_options(v1, 7LL, *(_QWORD *)(*(_QWORD *)(**((_QWORD **)this + 2) + 608LL) + 16LL)); LODWORD(v17) = 0; v2 = *((_QWORD *)this + 167); if ( !mysql_real_connect( *((_QWORD *)this + 168), *(_QWORD *)(v2 + 120), *(_QWORD *)(v2 + 128), *(_QWORD *)(v2 + 136), *(_QWORD *)(v2 + 144), *(unsigned __int16 *)(v2 + 188), *(_QWORD *)(v2 + 168), 0LL) ) { ha_federated::stash_remote_error(this); mysql_close(*((_QWORD *)this + 168)); *((_QWORD *)this + 168) = 0LL; ((void ( *)(long long, _QWORD, char *))*my_print_error_service)(1429LL, 0LL, (char *)this + 1420); goto LABEL_16; } v3 = *(const char **)(*((_QWORD *)this + 167) + 80LL); v4 = strlen(v3); String::append((String *)&v15, v3, v4); String::append((String *)&v15, " WHERE 1=0", 0xAuLL); if ( !(unsigned int)mysql_real_query(*((_QWORD *)this + 168), v16, (unsigned int)v17) ) { v14 = mysql_store_result(*((_QWORD *)this + 168)); mysql_free_result(v14); *(_BYTE *)(*((_QWORD *)this + 168) + 1173LL) = 1; v12 = 0; goto LABEL_18; } LODWORD(v17) = 0; String::append((String *)&v15, "error: ", 7uLL); v5 = mysql_errno(*((_QWORD *)this + 168)); Binary_string::qs_append((Binary_string *)&v16, v5); String::append((String *)&v15, " '", 3uLL); v6 = (const char *)mysql_error(*((_QWORD *)this + 168)); v7 = strlen(v6); String::append((String *)&v15, v6, v7); v8 = v17; if ( (unsigned int)v17 >= HIDWORD(v17) ) { if ( (unsigned __int8)Binary_string::realloc_with_extra((Binary_string *)&v16, (unsigned int)(v17 + 1)) ) { LABEL_8: mysql_close(*((_QWORD *)this + 168)); *((_QWORD *)this + 168) = 0LL; v9 = (void ( *)(long long, _QWORD, char *))*my_print_error_service; v10 = v16; v11 = (unsigned int)v17; if ( !v16 || (unsigned int)v17 >= HIDWORD(v17) ) { if ( (unsigned __int8)Binary_string::realloc_raw((Binary_string *)&v16, (unsigned int)v17 + 1LL) ) { LABEL_13: v9(1431LL, 0LL, v16); LABEL_16: *((_DWORD *)this + 354) = -1; goto LABEL_17; } v10 = v16; } v10[v11] = 0; goto LABEL_13; } v8 = v17; } LODWORD(v17) = v8 + 1; v16[v8] = 39; goto LABEL_8; } *((_DWORD *)this + 354) = 128; LABEL_17: v12 = -1; LABEL_18: Binary_string::~Binary_string((Binary_string *)&v16); return v12; }
real_connect: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1c0 MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [0x00110f88] LEA RBX,[RBP + -0x1d8] MOV qword ptr [RBX + -0x8],RAX LEA RAX,[RBP + -0x1c0] MOV qword ptr [RBX],RAX MOV RAX,0x19000000190 MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x10],0x0 MOV word ptr [RBX + 0x14],0x0 LAB_0010a353: XOR EDI,EDI CALL 0x001084e0 MOV qword ptr [R14 + 0x540],RAX TEST RAX,RAX JZ 0x0010a55a MOV RCX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x260] MOV RDX,qword ptr [RCX + 0x10] MOV RDI,RAX MOV ESI,0x7 CALL 0x00108590 MOV dword ptr [RBP + -0x1d0],0x0 MOV RAX,qword ptr [R14 + 0x538] MOV RDI,qword ptr [R14 + 0x540] MOV RSI,qword ptr [RAX + 0x78] MOV RDX,qword ptr [RAX + 0x80] MOV RCX,qword ptr [RAX + 0x88] MOV R8,qword ptr [RAX + 0x90] MOVZX R9D,word ptr [RAX + 0xbc] PUSH 0x0 PUSH qword ptr [RAX + 0xa8] CALL 0x00108290 ADD RSP,0x10 TEST RAX,RAX JZ 0x0010a567 MOV RAX,qword ptr [R14 + 0x538] MOV R15,qword ptr [RAX + 0x50] MOV RDI,R15 CALL 0x00108190 LEA RDI,[RBP + -0x1e0] MOV RSI,R15 MOV RDX,RAX CALL 0x001080f0 LEA RSI,[0x10d1d7] LEA RDI,[RBP + -0x1e0] MOV EDX,0xa CALL 0x001080f0 MOV RDI,qword ptr [R14 + 0x540] MOV RSI,qword ptr [RBP + -0x1d8] MOV EDX,dword ptr [RBP + -0x1d0] CALL 0x00108110 TEST EAX,EAX JZ 0x0010a5dd LEA RDI,[RBP + -0x1e0] MOV dword ptr [RDI + 0x10],0x0 LEA RSI,[0x10d1e2] MOV EDX,0x7 CALL 0x001080f0 MOV RDI,qword ptr [R14 + 0x540] CALL 0x00108480 MOV ESI,EAX MOV RDI,RBX CALL 0x001084a0 LEA RSI,[0x10d1ea] LEA RDI,[RBP + -0x1e0] MOV EDX,0x3 CALL 0x001080f0 MOV RDI,qword ptr [R14 + 0x540] LAB_0010a48e: CALL 0x00108400 MOV R15,RAX MOV RDI,RAX CALL 0x00108190 LEA RDI,[RBP + -0x1e0] MOV RSI,R15 MOV RDX,RAX CALL 0x001080f0 MOV ESI,dword ptr [RBP + -0x1d0] CMP ESI,dword ptr [RBP + -0x1cc] JC 0x0010a4d2 INC ESI MOV RDI,RBX CALL 0x00108490 TEST AL,AL JNZ 0x0010a4e8 MOV ESI,dword ptr [RBP + -0x1d0] LAB_0010a4d2: MOV RAX,qword ptr [RBP + -0x1d8] LEA ECX,[RSI + 0x1] MOV dword ptr [RBP + -0x1d0],ECX MOV ECX,ESI MOV byte ptr [RAX + RCX*0x1],0x27 LAB_0010a4e8: MOV RDI,qword ptr [R14 + 0x540] CALL 0x001080a0 MOV qword ptr [R14 + 0x540],0x0 MOV RAX,qword ptr [0x00110f90] MOV RAX,qword ptr [RAX] MOV R15,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x1d8] MOV R12D,dword ptr [RBP + -0x1d0] TEST RAX,RAX JZ 0x0010a528 CMP R12D,dword ptr [RBP + -0x1cc] JC 0x0010a540 LAB_0010a528: LEA RSI,[R12 + 0x1] MOV RDI,RBX CALL 0x00108530 TEST AL,AL JNZ 0x0010a545 MOV RAX,qword ptr [RBP + -0x1d8] LAB_0010a540: MOV byte ptr [RAX + R12*0x1],0x0 LAB_0010a545: MOV RDX,qword ptr [RBP + -0x1d8] MOV EDI,0x597 XOR ESI,ESI XOR EAX,EAX CALL R15 JMP 0x0010a5a2 LAB_0010a55a: MOV dword ptr [R14 + 0x588],0x80 JMP 0x0010a5ad LAB_0010a567: MOV RDI,R14 CALL 0x001082e0 MOV RDI,qword ptr [R14 + 0x540] CALL 0x001080a0 MOV qword ptr [R14 + 0x540],0x0 MOV RAX,qword ptr [0x00110f90] MOV RCX,qword ptr [RAX] LEA RDX,[R14 + 0x58c] MOV EDI,0x595 XOR ESI,ESI XOR EAX,EAX CALL qword ptr [RCX] LAB_0010a5a2: MOV dword ptr [R14 + 0x588],0xffffffff LAB_0010a5ad: MOV R14D,0xffffffff LAB_0010a5b3: MOV RDI,RBX CALL 0x00108510 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0010a628 MOV EAX,R14D ADD RSP,0x1c0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010a5dd: MOV RDI,qword ptr [R14 + 0x540] CALL 0x001082c0 MOV RDI,RAX CALL 0x00108160 LAB_0010a5f1: MOV RAX,qword ptr [R14 + 0x540] MOV byte ptr [RAX + 0x495],0x1 XOR R14D,R14D JMP 0x0010a5b3 LAB_0010a628: CALL 0x001083a0
/* ha_federated::real_connect() */ int8 __thiscall ha_federated::real_connect(ha_federated *this) { code *pcVar1; char cVar2; int iVar3; long lVar4; char *pcVar5; ulong uVar6; int8 uVar7; long in_FS_OFFSET; int *local_1e8; int1 *local_1e0; int8 local_1d8; int4 local_1d0; int2 local_1cc; int1 local_1c8 [408]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); local_1e8 = PTR_my_charset_bin_00110f88; local_1e0 = local_1c8; local_1d8 = 0x19000000190; local_1d0 = 0; local_1cc = 0; /* try { // try from 0010a353 to 0010a486 has its CatchHandler @ 0010a606 */ lVar4 = mysql_init(0); *(long *)(this + 0x540) = lVar4; if (lVar4 == 0) { *(int4 *)(this + 0x588) = 0x80; } else { mysql_options(lVar4,7,*(int8 *)(*(long *)(**(long **)(this + 0x10) + 0x260) + 0x10)); local_1d8 = local_1d8 & 0xffffffff00000000; lVar4 = *(long *)(this + 0x538); lVar4 = mysql_real_connect(*(int8 *)(this + 0x540),*(int8 *)(lVar4 + 0x78), *(int8 *)(lVar4 + 0x80),*(int8 *)(lVar4 + 0x88), *(int8 *)(lVar4 + 0x90),*(int2 *)(lVar4 + 0xbc), *(int8 *)(lVar4 + 0xa8),0); if (lVar4 == 0) { /* try { // try from 0010a567 to 0010a5f0 has its CatchHandler @ 0010a606 */ stash_remote_error(this); mysql_close(*(int8 *)(this + 0x540)); *(int8 *)(this + 0x540) = 0; (*(code *)**(int8 **)PTR_my_print_error_service_00110f90)(0x595,0,this + 0x58c); } else { pcVar5 = *(char **)(*(long *)(this + 0x538) + 0x50); strlen(pcVar5); String::append((char *)&local_1e8,(ulong)pcVar5); String::append((char *)&local_1e8,0x10d1d7); iVar3 = mysql_real_query(*(int8 *)(this + 0x540),local_1e0,local_1d8 & 0xffffffff); if (iVar3 == 0) { uVar7 = mysql_store_result(*(int8 *)(this + 0x540)); mysql_free_result(uVar7); *(int1 *)(*(long *)(this + 0x540) + 0x495) = 1; uVar7 = 0; goto LAB_0010a5b3; } local_1d8 = local_1d8 & 0xffffffff00000000; String::append((char *)&local_1e8,0x10d1e2); mysql_errno(*(int8 *)(this + 0x540)); Binary_string::qs_append((ulonglong)&local_1e0); String::append((char *)&local_1e8,0x10d1ea); /* try { // try from 0010a48e to 0010a557 has its CatchHandler @ 0010a604 */ pcVar5 = (char *)mysql_error(*(int8 *)(this + 0x540)); strlen(pcVar5); String::append((char *)&local_1e8,(ulong)pcVar5); if ((uint)local_1d8 < local_1d8._4_4_) { LAB_0010a4d2: uVar6 = (ulong)(uint)local_1d8; local_1d8 = CONCAT44(local_1d8._4_4_,(uint)local_1d8 + 1); local_1e0[uVar6] = 0x27; } else { cVar2 = Binary_string::realloc_with_extra ((Binary_string *)&local_1e0,(ulong)((uint)local_1d8 + 1)); if (cVar2 == '\0') { goto LAB_0010a4d2; } } mysql_close(*(int8 *)(this + 0x540)); *(int8 *)(this + 0x540) = 0; pcVar1 = (code *)**(int8 **)PTR_my_print_error_service_00110f90; uVar6 = local_1d8 & 0xffffffff; if (((local_1e0 != (int1 *)0x0) && ((uint)local_1d8 < local_1d8._4_4_)) || (cVar2 = Binary_string::realloc_raw((ulong)&local_1e0), cVar2 == '\0')) { local_1e0[uVar6] = 0; } (*pcVar1)(0x597,0,local_1e0); } *(int4 *)(this + 0x588) = 0xffffffff; } uVar7 = 0xffffffff; LAB_0010a5b3: Binary_string::~Binary_string((Binary_string *)&local_1e0); if (*(long *)(in_FS_OFFSET + 0x28) != local_30) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar7; }
28,610
my_xml_enter
eloqsql/strings/xml.c
static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len) { if (my_xml_attr_ensure_space(st, len + 1 /* the separator char */)) return MY_XML_ERROR; if (st->attr.end > st->attr.start) { st->attr.end[0]= '/'; st->attr.end++; } memcpy(st->attr.end, str, len); st->attr.end+= len; st->attr.end[0]= '\0'; if (st->flags & MY_XML_FLAG_RELATIVE_NAMES) return st->enter ? st->enter(st, str, len) : MY_XML_OK; else return st->enter ? st->enter(st, st->attr.start, st->attr.end - st->attr.start) : MY_XML_OK; }
O0
c
my_xml_enter: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x1, %rsi callq 0x814d0 cmpl $0x0, %eax je 0x81006 movl $0x1, -0x4(%rbp) jmp 0x8111c movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x118(%rcx), %rax jbe 0x81042 movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movb $0x2f, (%rax) movq -0x10(%rbp), %rax movq 0x120(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x120(%rax) movq -0x10(%rbp), %rax movq 0x120(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x25230 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x120(%rax), %rcx movq %rcx, 0x120(%rax) movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x810c7 movq -0x10(%rbp), %rax cmpq $0x0, 0x148(%rax) je 0x810b8 movq -0x10(%rbp), %rax movq 0x148(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq *%rax movl %eax, -0x24(%rbp) jmp 0x810bf xorl %eax, %eax movl %eax, -0x24(%rbp) jmp 0x810bf movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x8111c movq -0x10(%rbp), %rax cmpq $0x0, 0x148(%rax) je 0x8110f movq -0x10(%rbp), %rax movq 0x148(%rax), %rax movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x118(%rcx), %rsi movq -0x10(%rbp), %rcx movq 0x120(%rcx), %rdx movq -0x10(%rbp), %rcx movq 0x118(%rcx), %rcx subq %rcx, %rdx callq *%rax movl %eax, -0x28(%rbp) jmp 0x81116 xorl %eax, %eax movl %eax, -0x28(%rbp) jmp 0x81116 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_xml_enter: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] add rsi, 1 call my_xml_attr_ensure_space cmp eax, 0 jz short loc_81006 mov [rbp+var_4], 1 jmp loc_8111C loc_81006: mov rax, [rbp+var_10] mov rax, [rax+120h] mov rcx, [rbp+var_10] cmp rax, [rcx+118h] jbe short loc_81042 mov rax, [rbp+var_10] mov rax, [rax+120h] mov byte ptr [rax], 2Fh ; '/' mov rax, [rbp+var_10] mov rcx, [rax+120h] add rcx, 1 mov [rax+120h], rcx loc_81042: mov rax, [rbp+var_10] mov rdi, [rax+120h] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _memcpy mov rcx, [rbp+var_20] mov rax, [rbp+var_10] add rcx, [rax+120h] mov [rax+120h], rcx mov rax, [rbp+var_10] mov rax, [rax+120h] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov eax, [rax] and eax, 1 cmp eax, 0 jz short loc_810C7 mov rax, [rbp+var_10] cmp qword ptr [rax+148h], 0 jz short loc_810B8 mov rax, [rbp+var_10] mov rax, [rax+148h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call rax mov [rbp+var_24], eax jmp short loc_810BF loc_810B8: xor eax, eax mov [rbp+var_24], eax jmp short $+2 loc_810BF: mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_8111C loc_810C7: mov rax, [rbp+var_10] cmp qword ptr [rax+148h], 0 jz short loc_8110F mov rax, [rbp+var_10] mov rax, [rax+148h] mov rdi, [rbp+var_10] mov rcx, [rbp+var_10] mov rsi, [rcx+118h] mov rcx, [rbp+var_10] mov rdx, [rcx+120h] mov rcx, [rbp+var_10] mov rcx, [rcx+118h] sub rdx, rcx call rax mov [rbp+var_28], eax jmp short loc_81116 loc_8110F: xor eax, eax mov [rbp+var_28], eax jmp short $+2 loc_81116: mov eax, [rbp+var_28] mov [rbp+var_4], eax loc_8111C: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_xml_enter(long long a1, long long a2, long long a3) { if ( (unsigned int)my_xml_attr_ensure_space(a1, a3 + 1) ) { return 1; } else { if ( *(_QWORD *)(a1 + 288) > *(_QWORD *)(a1 + 280) ) *(_BYTE *)(*(_QWORD *)(a1 + 288))++ = 47; memcpy(*(_QWORD *)(a1 + 288), a2, a3); *(_QWORD *)(a1 + 288) += a3; **(_BYTE **)(a1 + 288) = 0; if ( (*(_DWORD *)a1 & 1) != 0 ) { if ( *(_QWORD *)(a1 + 328) ) return (unsigned int)(*(long long ( **)(long long, long long, long long))(a1 + 328))(a1, a2, a3); else return 0; } else if ( *(_QWORD *)(a1 + 328) ) { return (unsigned int)(*(long long ( **)(long long, _QWORD, _QWORD))(a1 + 328))( a1, *(_QWORD *)(a1 + 280), *(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280)); } else { return 0; } } }
my_xml_enter: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x1 CALL 0x001814d0 CMP EAX,0x0 JZ 0x00181006 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0018111c LAB_00181006: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x118] JBE 0x00181042 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV byte ptr [RAX],0x2f MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x120] ADD RCX,0x1 MOV qword ptr [RAX + 0x120],RCX LAB_00181042: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x120] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00125230 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x120] MOV qword ptr [RAX + 0x120],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x1 CMP EAX,0x0 JZ 0x001810c7 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x148],0x0 JZ 0x001810b8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x148] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL RAX MOV dword ptr [RBP + -0x24],EAX JMP 0x001810bf LAB_001810b8: XOR EAX,EAX MOV dword ptr [RBP + -0x24],EAX JMP 0x001810bf LAB_001810bf: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x0018111c LAB_001810c7: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x148],0x0 JZ 0x0018110f MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x148] MOV RDI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x118] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x120] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x118] SUB RDX,RCX CALL RAX MOV dword ptr [RBP + -0x28],EAX JMP 0x00181116 LAB_0018110f: XOR EAX,EAX MOV dword ptr [RBP + -0x28],EAX JMP 0x00181116 LAB_00181116: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX LAB_0018111c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_xml_enter(uint *param_1,void *param_2,size_t param_3) { int iVar1; int4 local_30; int4 local_2c; int4 local_c; iVar1 = my_xml_attr_ensure_space(param_1,param_3 + 1); if (iVar1 == 0) { if (*(ulong *)(param_1 + 0x46) < *(ulong *)(param_1 + 0x48)) { **(int1 **)(param_1 + 0x48) = 0x2f; *(long *)(param_1 + 0x48) = *(long *)(param_1 + 0x48) + 1; } memcpy(*(void **)(param_1 + 0x48),param_2,param_3); *(size_t *)(param_1 + 0x48) = param_3 + *(long *)(param_1 + 0x48); **(int1 **)(param_1 + 0x48) = 0; if ((*param_1 & 1) == 0) { if (*(long *)(param_1 + 0x52) == 0) { local_30 = 0; } else { local_30 = (**(code **)(param_1 + 0x52)) (param_1,*(int8 *)(param_1 + 0x46), *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x46)); } local_c = local_30; } else { if (*(long *)(param_1 + 0x52) == 0) { local_2c = 0; } else { local_2c = (**(code **)(param_1 + 0x52))(param_1,param_2,param_3); } local_c = local_2c; } } else { local_c = 1; } return local_c; }
28,611
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget()
llama.cpp/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(); } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget(): movb $0x1, 0x18(%rdi) decq 0x20(%rdi) movq 0x28(%rdi), %rax testq %rax, %rax je 0xe7877 leaq 0x28(%rdi), %rcx jmp 0xe7884 movq 0x30(%rdi), %rax testq %rax, %rax je 0xe788a leaq 0x30(%rdi), %rcx decq %rax movq %rax, (%rcx) cmpl $-0x1, 0x14(%rdi) je 0xe78a1 movq 0x40(%rdi), %rax cmpq %rax, 0x38(%rdi) je 0xe78a2 decq %rax movq %rax, 0x40(%rdi) retq pushq %rax leaq 0x9a99a(%rip), %rdi # 0x182244 leaq 0x8b561(%rip), %rdx # 0x172e12 leaq 0x8dcc9(%rip), %rcx # 0x175581 movl $0x2240, %esi # imm = 0x2240 xorl %eax, %eax callq 0x26090
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5ungetEv: mov byte ptr [rdi+18h], 1 dec qword ptr [rdi+20h] mov rax, [rdi+28h] test rax, rax jz short loc_E7877 lea rcx, [rdi+28h] jmp short loc_E7884 loc_E7877: mov rax, [rdi+30h] test rax, rax jz short loc_E788A lea rcx, [rdi+30h] loc_E7884: dec rax mov [rcx], rax loc_E788A: cmp dword ptr [rdi+14h], 0FFFFFFFFh jz short locret_E78A1 mov rax, [rdi+40h] cmp [rdi+38h], rax jz short loc_E78A2 dec rax mov [rdi+40h], rax locret_E78A1: retn loc_E78A2: push rax lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTokenStringEmp; "!token_string.empty()" mov esi, 2240h xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::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 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 8768LL, "GGML_ASSERT(%s) failed", "!token_string.empty()"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::reset("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp"); } else { 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 0x001e7877 LEA RCX,[RDI + 0x28] JMP 0x001e7884 LAB_001e7877: MOV RAX,qword ptr [RDI + 0x30] TEST RAX,RAX JZ 0x001e788a LEA RCX,[RDI + 0x30] LAB_001e7884: DEC RAX MOV qword ptr [RCX],RAX LAB_001e788a: CMP dword ptr [RDI + 0x14],-0x1 JZ 0x001e78a1 MOV RAX,qword ptr [RDI + 0x40] CMP qword ptr [RDI + 0x38],RAX JZ 0x001e78a2 DEC RAX MOV qword ptr [RDI + 0x40],RAX LAB_001e78a1: RET LAB_001e78a2: PUSH RAX LEA RDI,[0x282244] LEA RDX,[0x272e12] LEA RCX,[0x275581] MOV ESI,0x2240 XOR EAX,EAX CALL 0x00126090
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget() */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *this) { long lVar1; lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *plVar2; int8 in_R8; int8 in_R9; this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> )0x1; *(long *)(this + 0x20) = *(long *)(this + 0x20) + -1; lVar1 = *(long *)(this + 0x28); if (lVar1 == 0) { lVar1 = *(long *)(this + 0x30); if (lVar1 == 0) goto LAB_001e788a; plVar2 = this + 0x30; } else { plVar2 = this + 0x28; } *(long *)plVar2 = lVar1 + -1; LAB_001e788a: if (*(int *)(this + 0x14) != -1) { lVar1 = *(long *)(this + 0x40); if (*(long *)(this + 0x38) == lVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x2240, "GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1); } *(long *)(this + 0x40) = lVar1 + -1; } return; }
28,612
safe_hash_search
eloqsql/mysys/my_safehash.c
uchar *safe_hash_search(SAFE_HASH *hash, const uchar *key, uint length, uchar *def) { uchar *result; DBUG_ENTER("safe_hash_search"); mysql_rwlock_rdlock(&hash->mutex); result= my_hash_search(&hash->hash, key, length); mysql_rwlock_unlock(&hash->mutex); if (!result) result= def; else result= ((SAFE_HASH_ENTRY*) result)->data; DBUG_PRINT("exit",("data: %p", result)); DBUG_RETURN(result); }
O3
c
safe_hash_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movl %edx, %r12d movq %rsi, %r15 movq %rdi, %r14 cmpq $0x0, 0x90(%rdi) jne 0xc5fcf movq %r14, %rdi callq 0xc3d84 leaq 0x98(%r14), %rdi movl %r12d, %edx movq %r15, %rsi callq 0xaf3ee movq %rax, %r15 movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0xc5fe5 movq %r14, %rdi callq 0xc3eb2 testq %r15, %r15 je 0xc5fc3 movq 0x10(%r15), %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x3a9eb(%rip), %rsi # 0x1009c1 movq %r14, %rdi movl $0xa7, %edx callq 0x313ab jmp 0xc5f91 leaq 0x2e8a2c(%rip), %rax # 0x3aea18 movq (%rax), %rax callq *0x168(%rax) jmp 0xc5fb2
safe_hash_search: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r12d, edx mov r15, rsi mov r14, rdi cmp qword ptr [rdi+90h], 0 jnz short loc_C5FCF mov rdi, r14 call my_rw_rdlock loc_C5F91: lea rdi, [r14+98h] mov edx, r12d mov rsi, r15 call my_hash_search mov r15, rax mov rdi, [r14+90h] test rdi, rdi jnz short loc_C5FE5 loc_C5FB2: mov rdi, r14 call my_rw_unlock test r15, r15 jz short loc_C5FC3 mov rbx, [r15+10h] loc_C5FC3: mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_C5FCF: lea rsi, aWorkspaceLlm4b_53; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 mov edx, 0A7h call psi_rwlock_rdlock jmp short loc_C5F91 loc_C5FE5: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp short loc_C5FB2
long long safe_hash_search(long long a1, long long a2, unsigned int a3, long long a4) { long long v6; // r15 if ( *(_QWORD *)(a1 + 144) ) psi_rwlock_rdlock(a1, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c", 0xA7u); else my_rw_rdlock(a1); v6 = my_hash_search(a1 + 152, a2, a3); if ( *(_QWORD *)(a1 + 144) ) PSI_server[45](); my_rw_unlock(a1); if ( v6 ) return *(_QWORD *)(v6 + 16); return a4; }
safe_hash_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R12D,EDX MOV R15,RSI MOV R14,RDI CMP qword ptr [RDI + 0x90],0x0 JNZ 0x001c5fcf MOV RDI,R14 CALL 0x001c3d84 LAB_001c5f91: LEA RDI,[R14 + 0x98] MOV EDX,R12D MOV RSI,R15 CALL 0x001af3ee MOV R15,RAX MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x001c5fe5 LAB_001c5fb2: MOV RDI,R14 CALL 0x001c3eb2 TEST R15,R15 JZ 0x001c5fc3 MOV RBX,qword ptr [R15 + 0x10] LAB_001c5fc3: MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001c5fcf: LEA RSI,[0x2009c1] MOV RDI,R14 MOV EDX,0xa7 CALL 0x001313ab JMP 0x001c5f91 LAB_001c5fe5: LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x001c5fb2
int8 safe_hash_search(long param_1,int8 param_2,int4 param_3,int8 param_4) { long lVar1; if (*(long *)(param_1 + 0x90) == 0) { my_rw_rdlock(param_1); } else { psi_rwlock_rdlock(param_1,"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c",0xa7); } lVar1 = my_hash_search(param_1 + 0x98,param_2,param_3); if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(param_1); if (lVar1 != 0) { param_4 = *(int8 *)(lVar1 + 0x10); } return param_4; }
28,613
httpserver_select
qoraal-tictactoe/build_O0/_deps/qoraal_http-src/src/httpserver.c
int32_t httpserver_select (int server_sock, uint32_t timeout) { int32_t result ; fd_set fdread; fd_set fdex; struct timeval tv; if (server_sock<0) { return HTTP_SERVER_E_CONNECTION ; } FD_ZERO(&fdread) ; FD_ZERO(&fdex) ; FD_SET(server_sock, &fdread); FD_SET(server_sock, &fdex); tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout % 1000) * 1000; result = select(server_sock+1, &fdread, 0, &fdex, &tv) ; if (FD_ISSET(server_sock, &fdex)) { DBG_MESSAGE_HTTP_SERVER (DBG_MESSAGE_SEVERITY_REPORT, "HTTPD : : read exception on listening socket..."); return HTTP_SERVER_E_CONNECTION ; } else if (result < 0) { DBG_MESSAGE_HTTP_SERVER (DBG_MESSAGE_SEVERITY_LOG, "HTTPD : : read select failed with %d", result); return HTTP_SERVER_E_CONNECTION ; } else if (!FD_ISSET(server_sock, &fdread)) { return HTTP_SERVER_E_ERROR ; } return HTTP_SERVER_E_OK ; }
O0
c
httpserver_select: pushq %rbp movq %rsp, %rbp subq $0x150, %rsp # imm = 0x150 movl %edi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpl $0x0, -0x8(%rbp) jge 0x28ae3 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x28d25 jmp 0x28ae5 leaq -0x90(%rbp), %rax movq %rax, -0x130(%rbp) movl $0x0, -0x124(%rbp) movl -0x124(%rbp), %eax cmpq $0x10, %rax jae 0x28b2f movq -0x130(%rbp), %rax movl -0x124(%rbp), %ecx movq $0x0, (%rax,%rcx,8) movl -0x124(%rbp), %eax addl $0x1, %eax movl %eax, -0x124(%rbp) jmp 0x28afd jmp 0x28b31 jmp 0x28b33 leaq -0x110(%rbp), %rax movq %rax, -0x140(%rbp) movl $0x0, -0x134(%rbp) movl -0x134(%rbp), %eax cmpq $0x10, %rax jae 0x28b7d movq -0x140(%rbp), %rax movl -0x134(%rbp), %ecx movq $0x0, (%rax,%rcx,8) movl -0x134(%rbp), %eax addl $0x1, %eax movl %eax, -0x134(%rbp) jmp 0x28b4b jmp 0x28b7f movl -0x8(%rbp), %eax movl $0x40, %ecx cltd idivl %ecx movl %edx, %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax movq %rax, %rcx movl -0x8(%rbp), %eax movl $0x40, %esi cltd idivl %esi cltq orq -0x90(%rbp,%rax,8), %rcx movq %rcx, -0x90(%rbp,%rax,8) movl -0x8(%rbp), %eax movl $0x40, %ecx cltd idivl %ecx movl %edx, %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax movq %rax, %rcx movl -0x8(%rbp), %eax movl $0x40, %esi cltd idivl %esi cltq orq -0x110(%rbp,%rax,8), %rcx movq %rcx, -0x110(%rbp,%rax,8) movl -0xc(%rbp), %eax movl $0x3e8, %ecx # imm = 0x3E8 xorl %edx, %edx divl %ecx movl %eax, %eax movq %rax, -0x120(%rbp) movl -0xc(%rbp), %eax movl $0x3e8, %ecx # imm = 0x3E8 xorl %edx, %edx divl %ecx imull $0x3e8, %edx, %eax # imm = 0x3E8 movl %eax, %eax movq %rax, -0x118(%rbp) movl -0x8(%rbp), %edi addl $0x1, %edi leaq -0x90(%rbp), %rsi xorl %eax, %eax movl %eax, %edx leaq -0x110(%rbp), %rcx leaq -0x120(%rbp), %r8 callq 0x6380 movl %eax, -0x10(%rbp) movl -0x8(%rbp), %eax movl $0x40, %ecx cltd idivl %ecx cltq movq -0x110(%rbp,%rax,8), %rax movq %rax, -0x148(%rbp) movl -0x8(%rbp), %eax movl $0x40, %ecx cltd idivl %ecx movq -0x148(%rbp), %rax movl %edx, %ecx movl $0x1, %edx shlq %cl, %rdx movq %rdx, %rcx andq %rcx, %rax cmpq $0x0, %rax je 0x28ca6 movl $0x4, %edi xorl %esi, %esi leaq 0x17c32(%rip), %rdx # 0x408c8 movb $0x0, %al callq 0x1e560 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x28d25 cmpl $0x0, -0x10(%rbp) jge 0x28ccd movl -0x10(%rbp), %ecx movl $0x5, %edi xorl %esi, %esi leaq 0x17c3b(%rip), %rdx # 0x408f8 movb $0x0, %al callq 0x1e560 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x28d25 movl -0x8(%rbp), %eax movl $0x40, %ecx cltd idivl %ecx cltq movq -0x90(%rbp,%rax,8), %rax movq %rax, -0x150(%rbp) movl -0x8(%rbp), %eax movl $0x40, %ecx cltd idivl %ecx movq -0x150(%rbp), %rax movl %edx, %ecx movl $0x1, %edx shlq %cl, %rdx movq %rdx, %rcx andq %rcx, %rax cmpq $0x0, %rax jne 0x28d1a movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x28d25 jmp 0x28d1c jmp 0x28d1e movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x150, %rsp # imm = 0x150 popq %rbp retq nopw %cs:(%rax,%rax)
httpserver_select: push rbp mov rbp, rsp sub rsp, 150h mov [rbp+var_8], edi mov [rbp+var_C], esi cmp [rbp+var_8], 0 jge short loc_28AE3 mov [rbp+var_4], 0FFFFFFFEh jmp loc_28D25 loc_28AE3: jmp short $+2 loc_28AE5: lea rax, [rbp+var_90] mov [rbp+var_130], rax mov [rbp+var_124], 0 loc_28AFD: mov eax, [rbp+var_124] cmp rax, 10h jnb short loc_28B2F mov rax, [rbp+var_130] mov ecx, [rbp+var_124] mov qword ptr [rax+rcx*8], 0 mov eax, [rbp+var_124] add eax, 1 mov [rbp+var_124], eax jmp short loc_28AFD loc_28B2F: jmp short $+2 loc_28B31: jmp short $+2 loc_28B33: lea rax, [rbp+var_110] mov [rbp+var_140], rax mov [rbp+var_134], 0 loc_28B4B: mov eax, [rbp+var_134] cmp rax, 10h jnb short loc_28B7D mov rax, [rbp+var_140] mov ecx, [rbp+var_134] mov qword ptr [rax+rcx*8], 0 mov eax, [rbp+var_134] add eax, 1 mov [rbp+var_134], eax jmp short loc_28B4B loc_28B7D: jmp short $+2 loc_28B7F: mov eax, [rbp+var_8] mov ecx, 40h ; '@' cdq idiv ecx mov eax, edx mov ecx, eax mov eax, 1 shl rax, cl mov rcx, rax mov eax, [rbp+var_8] mov esi, 40h ; '@' cdq idiv esi cdqe or rcx, [rbp+rax*8+var_90] mov [rbp+rax*8+var_90], rcx mov eax, [rbp+var_8] mov ecx, 40h ; '@' cdq idiv ecx mov eax, edx mov ecx, eax mov eax, 1 shl rax, cl mov rcx, rax mov eax, [rbp+var_8] mov esi, 40h ; '@' cdq idiv esi cdqe or rcx, [rbp+rax*8+var_110] mov [rbp+rax*8+var_110], rcx mov eax, [rbp+var_C] mov ecx, 3E8h xor edx, edx div ecx mov eax, eax mov [rbp+var_120], rax mov eax, [rbp+var_C] mov ecx, 3E8h xor edx, edx div ecx imul eax, edx, 3E8h mov eax, eax mov [rbp+var_118], rax mov edi, [rbp+var_8] add edi, 1 lea rsi, [rbp+var_90] xor eax, eax mov edx, eax lea rcx, [rbp+var_110] lea r8, [rbp+var_120] call _select mov [rbp+var_10], eax mov eax, [rbp+var_8] mov ecx, 40h ; '@' cdq idiv ecx cdqe mov rax, [rbp+rax*8+var_110] mov [rbp+var_148], rax mov eax, [rbp+var_8] mov ecx, 40h ; '@' cdq idiv ecx mov rax, [rbp+var_148] mov ecx, edx mov edx, 1 shl rdx, cl mov rcx, rdx and rax, rcx cmp rax, 0 jz short loc_28CA6 mov edi, 4 xor esi, esi lea rdx, aHttpdReadExcep; "HTTPD : : read exception on listening s"... mov al, 0 call svc_logger_type_log mov [rbp+var_4], 0FFFFFFFEh jmp short loc_28D25 loc_28CA6: cmp [rbp+var_10], 0 jge short loc_28CCD mov ecx, [rbp+var_10] mov edi, 5 xor esi, esi lea rdx, aHttpdReadSelec; "HTTPD : : read select failed with %d" mov al, 0 call svc_logger_type_log mov [rbp+var_4], 0FFFFFFFEh jmp short loc_28D25 loc_28CCD: mov eax, [rbp+var_8] mov ecx, 40h ; '@' cdq idiv ecx cdqe mov rax, [rbp+rax*8+var_90] mov [rbp+var_150], rax mov eax, [rbp+var_8] mov ecx, 40h ; '@' cdq idiv ecx mov rax, [rbp+var_150] mov ecx, edx mov edx, 1 shl rdx, cl mov rcx, rdx and rax, rcx cmp rax, 0 jnz short loc_28D1A mov [rbp+var_4], 0FFFFFFFFh jmp short loc_28D25 loc_28D1A: jmp short $+2 loc_28D1C: jmp short $+2 loc_28D1E: mov [rbp+var_4], 0 loc_28D25: mov eax, [rbp+var_4] add rsp, 150h pop rbp retn
long long httpserver_select(int a1, unsigned int a2) { unsigned int j; // [rsp+1Ch] [rbp-134h] unsigned int i; // [rsp+2Ch] [rbp-124h] _QWORD v5[2]; // [rsp+30h] [rbp-120h] BYREF _QWORD v6[16]; // [rsp+40h] [rbp-110h] BYREF _QWORD v7[16]; // [rsp+C0h] [rbp-90h] BYREF int v8; // [rsp+140h] [rbp-10h] unsigned int v9; // [rsp+144h] [rbp-Ch] int v10; // [rsp+148h] [rbp-8h] v10 = a1; v9 = a2; if ( a1 >= 0 ) { for ( i = 0; i < 0x10uLL; ++i ) v7[i] = 0LL; for ( j = 0; j < 0x10uLL; ++j ) v6[j] = 0LL; v7[v10 / 64] |= 1LL << (v10 % 64); v6[v10 / 64] |= 1LL << (v10 % 64); v5[0] = v9 / 0x3E8; v5[1] = 1000 * (v9 % 0x3E8); v8 = select((unsigned int)(v10 + 1), v7, 0LL, v6, v5); if ( ((1LL << (v10 % 64)) & v6[v10 / 64]) != 0 ) { svc_logger_type_log(4u, 0, (long long)aHttpdReadExcep); return (unsigned int)-2; } else if ( v8 >= 0 ) { if ( ((1LL << (v10 % 64)) & v7[v10 / 64]) != 0 ) return 0; else return (unsigned int)-1; } else { svc_logger_type_log(5u, 0, (long long)"HTTPD : : read select failed with %d", v8); return (unsigned int)-2; } } else { return (unsigned int)-2; } }
httpserver_select: PUSH RBP MOV RBP,RSP SUB RSP,0x150 MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],ESI CMP dword ptr [RBP + -0x8],0x0 JGE 0x00128ae3 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x00128d25 LAB_00128ae3: JMP 0x00128ae5 LAB_00128ae5: LEA RAX,[RBP + -0x90] MOV qword ptr [RBP + -0x130],RAX MOV dword ptr [RBP + -0x124],0x0 LAB_00128afd: MOV EAX,dword ptr [RBP + -0x124] CMP RAX,0x10 JNC 0x00128b2f MOV RAX,qword ptr [RBP + -0x130] MOV ECX,dword ptr [RBP + -0x124] MOV qword ptr [RAX + RCX*0x8],0x0 MOV EAX,dword ptr [RBP + -0x124] ADD EAX,0x1 MOV dword ptr [RBP + -0x124],EAX JMP 0x00128afd LAB_00128b2f: JMP 0x00128b31 LAB_00128b31: JMP 0x00128b33 LAB_00128b33: LEA RAX,[RBP + -0x110] MOV qword ptr [RBP + -0x140],RAX MOV dword ptr [RBP + -0x134],0x0 LAB_00128b4b: MOV EAX,dword ptr [RBP + -0x134] CMP RAX,0x10 JNC 0x00128b7d MOV RAX,qword ptr [RBP + -0x140] MOV ECX,dword ptr [RBP + -0x134] MOV qword ptr [RAX + RCX*0x8],0x0 MOV EAX,dword ptr [RBP + -0x134] ADD EAX,0x1 MOV dword ptr [RBP + -0x134],EAX JMP 0x00128b4b LAB_00128b7d: JMP 0x00128b7f LAB_00128b7f: MOV EAX,dword ptr [RBP + -0x8] MOV ECX,0x40 CDQ IDIV ECX MOV EAX,EDX MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL MOV RCX,RAX MOV EAX,dword ptr [RBP + -0x8] MOV ESI,0x40 CDQ IDIV ESI CDQE OR RCX,qword ptr [RBP + RAX*0x8 + -0x90] MOV qword ptr [RBP + RAX*0x8 + -0x90],RCX MOV EAX,dword ptr [RBP + -0x8] MOV ECX,0x40 CDQ IDIV ECX MOV EAX,EDX MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL MOV RCX,RAX MOV EAX,dword ptr [RBP + -0x8] MOV ESI,0x40 CDQ IDIV ESI CDQE OR RCX,qword ptr [RBP + RAX*0x8 + -0x110] MOV qword ptr [RBP + RAX*0x8 + -0x110],RCX MOV EAX,dword ptr [RBP + -0xc] MOV ECX,0x3e8 XOR EDX,EDX DIV ECX MOV EAX,EAX MOV qword ptr [RBP + -0x120],RAX MOV EAX,dword ptr [RBP + -0xc] MOV ECX,0x3e8 XOR EDX,EDX DIV ECX IMUL EAX,EDX,0x3e8 MOV EAX,EAX MOV qword ptr [RBP + -0x118],RAX MOV EDI,dword ptr [RBP + -0x8] ADD EDI,0x1 LEA RSI,[RBP + -0x90] XOR EAX,EAX MOV EDX,EAX LEA RCX,[RBP + -0x110] LEA R8,[RBP + -0x120] CALL 0x00106380 MOV dword ptr [RBP + -0x10],EAX MOV EAX,dword ptr [RBP + -0x8] MOV ECX,0x40 CDQ IDIV ECX CDQE MOV RAX,qword ptr [RBP + RAX*0x8 + -0x110] MOV qword ptr [RBP + -0x148],RAX MOV EAX,dword ptr [RBP + -0x8] MOV ECX,0x40 CDQ IDIV ECX MOV RAX,qword ptr [RBP + -0x148] MOV ECX,EDX MOV EDX,0x1 SHL RDX,CL MOV RCX,RDX AND RAX,RCX CMP RAX,0x0 JZ 0x00128ca6 MOV EDI,0x4 XOR ESI,ESI LEA RDX,[0x1408c8] MOV AL,0x0 CALL 0x0011e560 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x00128d25 LAB_00128ca6: CMP dword ptr [RBP + -0x10],0x0 JGE 0x00128ccd MOV ECX,dword ptr [RBP + -0x10] MOV EDI,0x5 XOR ESI,ESI LEA RDX,[0x1408f8] MOV AL,0x0 CALL 0x0011e560 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x00128d25 LAB_00128ccd: MOV EAX,dword ptr [RBP + -0x8] MOV ECX,0x40 CDQ IDIV ECX CDQE MOV RAX,qword ptr [RBP + RAX*0x8 + -0x90] MOV qword ptr [RBP + -0x150],RAX MOV EAX,dword ptr [RBP + -0x8] MOV ECX,0x40 CDQ IDIV ECX MOV RAX,qword ptr [RBP + -0x150] MOV ECX,EDX MOV EDX,0x1 SHL RDX,CL MOV RCX,RDX AND RAX,RCX CMP RAX,0x0 JNZ 0x00128d1a MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00128d25 LAB_00128d1a: JMP 0x00128d1c LAB_00128d1c: JMP 0x00128d1e LAB_00128d1e: MOV dword ptr [RBP + -0x4],0x0 LAB_00128d25: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x150 POP RBP RET
int4 httpserver_select(int param_1,uint param_2) { uint local_13c; uint local_12c; timeval local_128; fd_set local_118; fd_set local_98; int local_18; uint local_14; int local_10; int4 local_c; local_10 = param_1; local_14 = param_2; if (param_1 < 0) { local_c = 0xfffffffe; } else { for (local_12c = 0; local_12c < 0x10; local_12c = local_12c + 1) { local_98.fds_bits[local_12c] = 0; } for (local_13c = 0; local_13c < 0x10; local_13c = local_13c + 1) { local_118.fds_bits[local_13c] = 0; } local_98.fds_bits[param_1 / 0x40] = 1L << ((byte)((long)param_1 % 0x40) & 0x3f) | local_98.fds_bits[param_1 / 0x40]; local_118.fds_bits[local_10 / 0x40] = 1L << ((byte)((long)local_10 % 0x40) & 0x3f) | local_118.fds_bits[local_10 / 0x40]; local_128.tv_sec = (ulong)local_14 / 1000; local_128.tv_usec = (__suseconds_t)((local_14 % 1000) * 1000); local_18 = select(local_10 + 1,&local_98,(fd_set *)0x0,&local_118,&local_128); if ((local_118.fds_bits[local_10 / 0x40] & 1L << ((byte)((long)local_10 % 0x40) & 0x3f)) == 0) { if (local_18 < 0) { svc_logger_type_log(5,0,s_HTTPD_____read_select_failed_wit_001408f8,local_18); local_c = 0xfffffffe; } else if ((local_98.fds_bits[local_10 / 0x40] & 1L << ((byte)((long)local_10 % 0x40) & 0x3f)) == 0) { local_c = 0xffffffff; } else { local_c = 0; } } else { svc_logger_type_log(4,0,s_HTTPD_____read_exception_on_list_001408c8); local_c = 0xfffffffe; } } return local_c; }
28,614
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::basic_ifstream<char, std::char_traits<char>>&>(std::basic_ifstream<char, std::char_traits<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
zkingston[P]unknot/build_O1/_deps/json-src/include/nlohmann/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::basic_ifstream<char, std::char_traits<char>>&>(std::basic_ifstream<char, std::char_traits<char>>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r14 pushq %rbx subq $0x100, %rsp # imm = 0x100 movl %r8d, %ebp movl %ecx, %r14d movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movq %rsi, 0x8(%rsp) movq (%rsi), %rax movq -0x18(%rax), %rax movq 0xe8(%rsi,%rax), %rax movq %rax, 0x10(%rsp) leaq 0x18(%rsp), %rdi movq %rdx, %rsi callq 0x311a0 movzbl %r14b, %ecx movzbl %bpl, %r8d leaq 0x38(%rsp), %rdi leaq 0x8(%rsp), %rsi leaq 0x18(%rsp), %rdx callq 0x31100 leaq 0x38(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x31204 leaq 0x60(%rsp), %r14 movq %r14, %rdi callq 0x318a4 movq -0x18(%r14), %rax testq %rax, %rax je 0x30cf2 leaq 0x38(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x28(%rsp), %rax testq %rax, %rax je 0x30d0b leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x8(%rsp), %rdi callq 0x31780 movq %rbx, %rax addq $0x100, %rsp # imm = 0x100 popq %rbx popq %r14 popq %rbp retq jmp 0x30d55 jmp 0x30d55 movq %rax, %r14 leaq 0x38(%rsp), %rdi callq 0x31752 jmp 0x30d3a movq %rax, %r14 movq 0x28(%rsp), %rax testq %rax, %rax je 0x30d60 leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x30d60 movq %rax, %rdi callq 0x14fdb movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x31780 movq %rbx, %rdi callq 0x2c524 movq %r14, %rdi callq 0x101c0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRSt14basic_ifstreamIcS7_EEESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r14 push rbx sub rsp, 100h mov ebp, r8d mov r14d, ecx mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov [rsp+118h+var_110], rsi mov rax, [rsi] mov rax, [rax-18h] mov rax, [rsi+rax+0E8h] mov [rsp+118h+var_108], rax lea rdi, [rsp+118h+var_100] mov rsi, rdx call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) movzx ecx, r14b movzx r8d, bpl lea rdi, [rsp+118h+var_E0] lea rsi, [rsp+118h+var_110] lea rdx, [rsp+118h+var_100] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail20input_stream_adapterEEENSF_6parserISD_T_EESI_St8functionIFbiNSF_13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parser<nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>(nlohmann::json_abi_v3_11_3::detail::input_stream_adapter,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) lea rdi, [rsp+118h+var_E0]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::parse(bool,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&) lea r14, [rsp+118h+var_B8] mov rdi, r14; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_30CF2 lea rdi, [rsp+118h+var_E0] mov rsi, rdi mov edx, 3 call rax loc_30CF2: mov rax, [rsp+118h+var_F0] test rax, rax jz short loc_30D0B lea rdi, [rsp+118h+var_100] mov rsi, rdi mov edx, 3 call rax loc_30D0B: lea rdi, [rsp+118h+var_110]; this call _ZN8nlohmann16json_abi_v3_11_36detail20input_stream_adapterD2Ev; nlohmann::json_abi_v3_11_3::detail::input_stream_adapter::~input_stream_adapter() mov rax, rbx add rsp, 100h pop rbx pop r14 pop rbp retn jmp short loc_30D55 jmp short loc_30D55 mov r14, rax lea rdi, [rsp+118h+var_E0] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::~parser() jmp short loc_30D3A mov r14, rax loc_30D3A: mov rax, [rsp+118h+var_F0] test rax, rax jz short loc_30D60 lea rdi, [rsp+118h+var_100] mov rsi, rdi mov edx, 3 call rax jmp short loc_30D60 loc_30D55: mov rdi, rax call __clang_call_terminate mov r14, rax loc_30D60: lea rdi, [rsp+118h+var_110]; this call _ZN8nlohmann16json_abi_v3_11_36detail20input_stream_adapterD2Ev; nlohmann::json_abi_v3_11_3::detail::input_stream_adapter::~input_stream_adapter() mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::ifstream &>( long long a1, _QWORD *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { _QWORD v8[2]; // [rsp+8h] [rbp-110h] BYREF _BYTE v9[16]; // [rsp+18h] [rbp-100h] BYREF void ( *v10)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-F0h] int v11[4]; // [rsp+38h] [rbp-E0h] BYREF void ( *v12)(int *, int *, long long); // [rsp+48h] [rbp-D0h] _BYTE v13[184]; // [rsp+60h] [rbp-B8h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; v8[0] = a2; v8[1] = *(_QWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24LL) + 232); std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( v9, a3); nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parser<nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>( v11, v8, v9, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::parse((int)v11); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::~lexer((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)v13); if ( v12 ) v12(v11, v11, 3LL); if ( v10 ) v10(v9, v9, 3LL); nlohmann::json_abi_v3_11_3::detail::input_stream_adapter::~input_stream_adapter((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)v8); return a1; }
parse<std::ifstream&>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x100 MOV EBP,R8D MOV R14D,ECX MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV qword ptr [RSP + 0x8],RSI MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + -0x18] MOV RAX,qword ptr [RSI + RAX*0x1 + 0xe8] MOV qword ptr [RSP + 0x10],RAX LAB_00130c92: LEA RDI,[RSP + 0x18] MOV RSI,RDX CALL 0x001311a0 LAB_00130c9f: MOVZX ECX,R14B MOVZX R8D,BPL LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x18] CALL 0x00131100 LAB_00130cbb: LEA RDI,[RSP + 0x38] MOV ESI,0x1 MOV RDX,RBX CALL 0x00131204 LEA R14,[RSP + 0x60] MOV RDI,R14 CALL 0x001318a4 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x00130cf2 LAB_00130ce3: LEA RDI,[RSP + 0x38] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00130cf2: MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x00130d0b LAB_00130cfc: LEA RDI,[RSP + 0x18] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00130d0b: LEA RDI,[RSP + 0x8] CALL 0x00131780 MOV RAX,RBX ADD RSP,0x100 POP RBX POP R14 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::parse<std::ifstream&>(std::ifstream&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::ifstream&> (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,long *param_1,function *param_3,int1 param_4,int1 param_5) { long *local_110; int8 local_108; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> local_100 [16]; code *local_f0; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_e0 [16]; code *local_d0; lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> local_b8 [160]; *this = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; *(int8 *)(this + 8) = 0; local_108 = *(int8 *)((long)param_1 + *(long *)(*param_1 + -0x18) + 0xe8); /* try { // try from 00130c92 to 00130c9e has its CatchHandler @ 00130d5d */ local_110 = param_1; std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function(local_100,param_3); /* try { // try from 00130c9f to 00130cba has its CatchHandler @ 00130d37 */ parser<nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> (local_e0,&local_110,local_100,param_4,param_5); /* try { // try from 00130cbb to 00130ccc has its CatchHandler @ 00130d28 */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::parse((parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *)local_e0,true,(basic_json *)this); detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::~lexer(local_b8); if (local_d0 != (code *)0x0) { /* try { // try from 00130ce3 to 00130cf1 has its CatchHandler @ 00130d26 */ (*local_d0)(local_e0,local_e0,3); } if (local_f0 != (code *)0x0) { /* try { // try from 00130cfc to 00130d0a has its CatchHandler @ 00130d24 */ (*local_f0)(local_100,local_100,3); } detail::input_stream_adapter::~input_stream_adapter((input_stream_adapter *)&local_110); return this; }
28,615
google::protobuf::compiler::cpp::EnumGenerator::EnumGenerator(google::protobuf::EnumDescriptor const*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<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&, google::protobuf::compiler::cpp::Options const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/enum.cc
EnumGenerator::EnumGenerator(const EnumDescriptor* descriptor, const std::map<std::string, std::string>& vars, const Options& options) : descriptor_(descriptor), classname_(ClassName(descriptor, false)), options_(options), generate_array_size_(ShouldGenerateArraySize(descriptor)), variables_(vars) { variables_["classname"] = classname_; variables_["classtype"] = QualifiedClassName(descriptor_, options); variables_["short_name"] = descriptor_->name(); variables_["nested_name"] = descriptor_->name(); variables_["resolved_name"] = ResolveKeyword(descriptor_->name()); variables_["prefix"] = (descriptor_->containing_type() == nullptr) ? "" : classname_ + "_"; }
O3
cpp
google::protobuf::compiler::cpp::EnumGenerator::EnumGenerator(google::protobuf::EnumDescriptor const*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<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&, google::protobuf::compiler::cpp::Options const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rcx, %r15 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx movq %rsi, (%rdi) leaq 0x8(%rdi), %r12 movq %r12, %rdi callq 0x34412 movq %r15, 0x28(%rbx) movq 0x28(%r14), %rcx movl 0x4(%rcx), %eax movslq 0x4(%r14), %rdx testq %rdx, %rdx jle 0xbfba4 shlq $0x5, %rdx xorl %esi, %esi movl 0x4(%rcx,%rsi), %edi cmpl %eax, %edi cmovgl %edi, %eax addq $0x20, %rsi cmpq %rsi, %rdx jne 0xbfb92 cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF setne 0x30(%rbx) leaq 0x38(%rbx), %r14 movq %r14, %rdi movq %r13, %rsi callq 0x7e61e leaq 0x10(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0xe68d2(%rip), %rsi # 0x1a649e leaq 0xe68d4(%rip), %rdx # 0x1a64a7 movq %rsp, %rdi callq 0x250b2 movq %rsp, %rsi movq %r14, %rdi callq 0x2e310 movq %rax, %rdi movq %r12, %rsi callq 0x1f260 movq (%rsp), %rdi cmpq %r13, %rdi je 0xbfbff callq 0x1f4a0 movq (%rbx), %rsi movq %rsp, %rdi movq %r15, %rdx callq 0x346a0 leaq 0x30(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0xec242(%rip), %rsi # 0x1abe60 leaq 0xec244(%rip), %rdx # 0x1abe69 leaq 0x20(%rsp), %rdi callq 0x250b2 leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x2e310 movq %rsp, %rsi movq %rax, %rdi callq 0x1f5d0 movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xbfc56 callq 0x1f4a0 movq (%rsp), %rdi cmpq %r13, %rdi je 0xbfc64 callq 0x1f4a0 movq (%rbx), %rax movq 0x8(%rax), %r15 movq %rsp, %rdi movq %r13, (%rdi) leaq 0x1069d6(%rip), %rsi # 0x1c664e leaq 0x1069d9(%rip), %rdx # 0x1c6658 callq 0x250b2 movq %rsp, %rsi movq %r14, %rdi callq 0x2e310 movq %rax, %rdi movq %r15, %rsi callq 0x1f260 movq (%rsp), %rdi cmpq %r13, %rdi je 0xbfca8 callq 0x1f4a0 movq (%rbx), %rax movq 0x8(%rax), %r15 movq %rsp, %rdi movq %r13, (%rdi) leaq 0xe8d02(%rip), %rsi # 0x1a89be leaq 0xe8d06(%rip), %rdx # 0x1a89c9 callq 0x250b2 movq %rsp, %rsi movq %r14, %rdi callq 0x2e310 movq %rax, %rdi movq %r15, %rsi callq 0x1f260 movq (%rsp), %rdi cmpq %r13, %rdi je 0xbfcec callq 0x1f4a0 movq (%rbx), %rax movq 0x8(%rax), %rsi movq %rsp, %rdi callq 0x34392 leaq 0x20(%rsp), %rdi movq %r12, (%rdi) leaq 0xe8697(%rip), %rsi # 0x1a83a1 leaq 0xe869d(%rip), %rdx # 0x1a83ae callq 0x250b2 leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x2e310 movq %rsp, %rsi movq %rax, %rdi callq 0x1f5d0 movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xbfd3d callq 0x1f4a0 movq (%rsp), %rdi cmpq %r13, %rdi je 0xbfd4b callq 0x1f4a0 movq (%rbx), %rax cmpq $0x0, 0x18(%rax) je 0xbfd7c movq %rsp, %rdi movq %r13, (%rdi) movq 0x8(%rbx), %rsi movq 0x10(%rbx), %rdx addq %rsi, %rdx callq 0x2586a leaq 0xe9c5f(%rip), %rsi # 0x1a99d1 movq %rsp, %rdi callq 0x1f8e0 jmp 0xbfd91 movq %rsp, %rdi movq %r13, (%rdi) leaq 0xda820(%rip), %rdx # 0x19a5a9 movq %rdx, %rsi callq 0x250b2 leaq 0x20(%rsp), %rdi movq %r12, (%rdi) leaq 0x105724(%rip), %rsi # 0x1c54c4 leaq 0x105723(%rip), %rdx # 0x1c54ca callq 0x250b2 leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x2e310 movq %rsp, %rsi movq %rax, %rdi callq 0x1f5d0 movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xbfdd3 callq 0x1f4a0 movq (%rsp), %rdi cmpq %r13, %rdi je 0xbfde1 callq 0x1f4a0 addq $0x40, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0xbfe27 jmp 0xbfe01 jmp 0xbfe27 jmp 0xbfe19 jmp 0xbfe01 jmp 0xbfe27 jmp 0xbfe19 jmp 0xbfe19 jmp 0xbfe19 movq %rax, %r15 movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xbfe2a callq 0x1f4a0 jmp 0xbfe2a jmp 0xbfe27 jmp 0xbfe19 movq %rax, %r15 jmp 0xbfe38 movq %rax, %r15 jmp 0xbfe40 jmp 0xbfe27 jmp 0xbfe27 movq %rax, %r15 movq (%rsp), %rdi cmpq %r13, %rdi je 0xbfe38 callq 0x1f4a0 movq %r14, %rdi callq 0x2e5e0 movq 0x8(%rbx), %rdi addq $0x18, %rbx cmpq %rbx, %rdi je 0xbfe52 callq 0x1f4a0 movq %r15, %rdi callq 0x1f860
_ZN6google8protobuf8compiler3cpp13EnumGeneratorC2EPKNS0_14EnumDescriptorERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4lessISD_ESaISt4pairIKSD_SD_EEERKNS2_7OptionsE: push r15 push r14 push r13 push r12 push rbx sub rsp, 40h mov r15, rcx mov r13, rdx mov r14, rsi mov rbx, rdi mov [rdi], rsi lea r12, [rdi+8] mov rdi, r12 call _ZN6google8protobuf8compiler3cpp9ClassNameB5cxx11EPKNS0_14EnumDescriptorE; google::protobuf::compiler::cpp::ClassName(google::protobuf::EnumDescriptor const*) mov [rbx+28h], r15 mov rcx, [r14+28h] mov eax, [rcx+4] movsxd rdx, dword ptr [r14+4] test rdx, rdx jle short loc_BFBA4 shl rdx, 5 xor esi, esi loc_BFB92: mov edi, [rcx+rsi+4] cmp edi, eax cmovg eax, edi add rsi, 20h ; ' ' cmp rdx, rsi jnz short loc_BFB92 loc_BFBA4: cmp eax, 7FFFFFFFh setnz byte ptr [rbx+30h] lea r14, [rbx+38h] mov rdi, r14 mov rsi, r13 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&) lea r13, [rsp+68h+var_58] mov [r13-10h], r13 lea rsi, aMetadataClassn+9; "classname" lea rdx, aMetadataClassn+12h; "" mov rdi, rsp 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 rsi, rsp mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdi, rax mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+68h+var_68]; void * cmp rdi, r13 jz short loc_BFBFF call __ZdlPv; operator delete(void *) loc_BFBFF: mov rsi, [rbx] mov rdi, rsp mov rdx, r15 call _ZN6google8protobuf8compiler3cpp18QualifiedClassNameB5cxx11EPKNS0_14EnumDescriptorERKNS2_7OptionsE; google::protobuf::compiler::cpp::QualifiedClassName(google::protobuf::EnumDescriptor const*,google::protobuf::compiler::cpp::Options const&) lea r12, [rsp+68h+var_38] mov [r12-10h], r12 lea rsi, aClasstype; "classtype" lea rdx, aClasstype+9; "" lea rdi, [rsp+68h+var_48] 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, [rsp+68h+var_48] mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rsi, rsp mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+68h+var_48]; void * cmp rdi, r12 jz short loc_BFC56 call __ZdlPv; operator delete(void *) loc_BFC56: mov rdi, [rsp+68h+var_68]; void * cmp rdi, r13 jz short loc_BFC64 call __ZdlPv; operator delete(void *) loc_BFC64: mov rax, [rbx] mov r15, [rax+8] mov rdi, rsp mov [rdi], r13 lea rsi, aShortName; "short_name" lea rdx, aShortName+0Ah; "" 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 rsi, rsp mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdi, rax mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+68h+var_68]; void * cmp rdi, r13 jz short loc_BFCA8 call __ZdlPv; operator delete(void *) loc_BFCA8: mov rax, [rbx] mov r15, [rax+8] mov rdi, rsp mov [rdi], r13 lea rsi, aNestedName; "nested_name" lea rdx, aNestedName+0Bh; "" 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 rsi, rsp mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdi, rax mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+68h+var_68]; void * cmp rdi, r13 jz short loc_BFCEC call __ZdlPv; operator delete(void *) loc_BFCEC: mov rax, [rbx] mov rsi, [rax+8] mov rdi, rsp call _ZN6google8protobuf8compiler3cpp14ResolveKeywordERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::cpp::ResolveKeyword(std::string const&) lea rdi, [rsp+68h+var_48] mov [rdi], r12 lea rsi, aResolvedName; "resolved_name" lea rdx, aResolvedName+0Dh; "" 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, [rsp+68h+var_48] mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rsi, rsp mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+68h+var_48]; void * cmp rdi, r12 jz short loc_BFD3D call __ZdlPv; operator delete(void *) loc_BFD3D: mov rdi, [rsp+68h+var_68]; void * cmp rdi, r13 jz short loc_BFD4B call __ZdlPv; operator delete(void *) loc_BFD4B: mov rax, [rbx] cmp qword ptr [rax+18h], 0 jz short loc_BFD7C mov rdi, rsp mov [rdi], r13 mov rsi, [rbx+8] mov rdx, [rbx+10h] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aPb_0+2; "_" mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_BFD91 loc_BFD7C: mov rdi, rsp mov [rdi], r13 lea rdx, asc_19A5A7+2; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_BFD91: lea rdi, [rsp+68h+var_48] mov [rdi], r12 lea rsi, aObjcPrefix+5; "prefix" lea rdx, aObjcPrefix+0Bh; "" 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, [rsp+68h+var_48] mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rsi, rsp mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+68h+var_48]; void * cmp rdi, r12 jz short loc_BFDD3 call __ZdlPv; operator delete(void *) loc_BFDD3: mov rdi, [rsp+68h+var_68]; void * cmp rdi, r13 jz short loc_BFDE1 call __ZdlPv; operator delete(void *) loc_BFDE1: add rsp, 40h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short loc_BFE27 jmp short loc_BFE01 jmp short loc_BFE27 jmp short loc_BFE19 jmp short loc_BFE01 jmp short loc_BFE27 jmp short loc_BFE19 jmp short loc_BFE19 jmp short loc_BFE19 loc_BFE01: mov r15, rax mov rdi, [rsp+arg_18]; void * cmp rdi, r12 jz short loc_BFE2A call __ZdlPv; operator delete(void *) jmp short loc_BFE2A jmp short loc_BFE27 jmp short $+2 loc_BFE19: mov r15, rax jmp short loc_BFE38 mov r15, rax jmp short loc_BFE40 jmp short loc_BFE27 jmp short $+2 loc_BFE27: mov r15, rax loc_BFE2A: mov rdi, [rsp+0]; void * cmp rdi, r13 jz short loc_BFE38 call __ZdlPv; operator delete(void *) loc_BFE38: mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() loc_BFE40: mov rdi, [rbx+8]; void * add rbx, 18h cmp rdi, rbx jz short loc_BFE52 call __ZdlPv; operator delete(void *) loc_BFE52: mov rdi, r15 call __Unwind_Resume
void google::protobuf::compiler::cpp::EnumGenerator::EnumGenerator( long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v8; // rcx int v9; // eax long long v10; // rdx long long v11; // rdx long long v12; // rsi long long v13; // rax int v14; // ecx int v15; // r8d int v16; // r9d long long v17; // rax long long v18; // r15 long long v19; // rax long long v20; // r15 long long v21; // rax long long v22; // rax long long v23; // rax void *v24[2]; // [rsp+0h] [rbp-68h] BYREF _BYTE v25[16]; // [rsp+10h] [rbp-58h] BYREF void *v26[2]; // [rsp+20h] [rbp-48h] BYREF _BYTE v27[56]; // [rsp+30h] [rbp-38h] BYREF *(_QWORD *)a1 = a2; google::protobuf::compiler::cpp::ClassName[abi:cxx11](a1 + 8, a2, a3, a4, a5, a6); *(_QWORD *)(a1 + 40) = a4; v8 = *(_QWORD *)(a2 + 40); v9 = *(_DWORD *)(v8 + 4); v10 = *(int *)(a2 + 4); if ( v10 > 0 ) { v11 = 32 * v10; v12 = 0LL; do { if ( *(_DWORD *)(v8 + v12 + 4) > v9 ) v9 = *(_DWORD *)(v8 + v12 + 4); v12 += 32LL; } while ( v11 != v12 ); } *(_BYTE *)(a1 + 48) = v9 != 0x7FFFFFFF; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree( a1 + 56, a3); v24[0] = v25; std::string::_M_construct<char const*>((long long)v24, "classname", (long long)""); v13 = std::map<std::string,std::string>::operator[](a1 + 56, (long long)v24); std::string::_M_assign(v13, a1 + 8); if ( v24[0] != v25 ) operator delete(v24[0]); google::protobuf::compiler::cpp::QualifiedClassName[abi:cxx11]((long long)v24, *(_QWORD *)a1, a4, v14, v15, v16); v26[0] = v27; std::string::_M_construct<char const*>((long long)v26, "classtype", (long long)""); v17 = std::map<std::string,std::string>::operator[](a1 + 56, (long long)v26); std::string::operator=(v17, v24); if ( v26[0] != v27 ) operator delete(v26[0]); if ( v24[0] != v25 ) operator delete(v24[0]); v18 = *(_QWORD *)(*(_QWORD *)a1 + 8LL); v24[0] = v25; std::string::_M_construct<char const*>((long long)v24, "short_name", (long long)""); v19 = std::map<std::string,std::string>::operator[](a1 + 56, (long long)v24); std::string::_M_assign(v19, v18); if ( v24[0] != v25 ) operator delete(v24[0]); v20 = *(_QWORD *)(*(_QWORD *)a1 + 8LL); v24[0] = v25; std::string::_M_construct<char const*>((long long)v24, "nested_name", (long long)""); v21 = std::map<std::string,std::string>::operator[](a1 + 56, (long long)v24); std::string::_M_assign(v21, v20); if ( v24[0] != v25 ) operator delete(v24[0]); google::protobuf::compiler::cpp::ResolveKeyword(v24, *(_BYTE ***)(*(_QWORD *)a1 + 8LL)); v26[0] = v27; std::string::_M_construct<char const*>((long long)v26, "resolved_name", (long long)""); v22 = std::map<std::string,std::string>::operator[](a1 + 56, (long long)v26); std::string::operator=(v22, v24); if ( v26[0] != v27 ) operator delete(v26[0]); if ( v24[0] != v25 ) operator delete(v24[0]); if ( *(_QWORD *)(*(_QWORD *)a1 + 24LL) ) { v24[0] = v25; std::string::_M_construct<char *>((long long)v24, *(_BYTE **)(a1 + 8), *(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 16)); std::string::append(v24, "_"); } else { v24[0] = v25; std::string::_M_construct<char const*>((long long)v24, "", (long long)""); } v26[0] = v27; std::string::_M_construct<char const*>((long long)v26, "prefix", (long long)""); v23 = std::map<std::string,std::string>::operator[](a1 + 56, (long long)v26); std::string::operator=(v23, v24); if ( v26[0] != v27 ) operator delete(v26[0]); if ( v24[0] != v25 ) operator delete(v24[0]); }
EnumGenerator: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R15,RCX MOV R13,RDX MOV R14,RSI MOV RBX,RDI MOV qword ptr [RDI],RSI LEA R12,[RDI + 0x8] MOV RDI,R12 CALL 0x00134412 MOV qword ptr [RBX + 0x28],R15 MOV RCX,qword ptr [R14 + 0x28] MOV EAX,dword ptr [RCX + 0x4] MOVSXD RDX,dword ptr [R14 + 0x4] TEST RDX,RDX JLE 0x001bfba4 SHL RDX,0x5 XOR ESI,ESI LAB_001bfb92: MOV EDI,dword ptr [RCX + RSI*0x1 + 0x4] CMP EDI,EAX CMOVG EAX,EDI ADD RSI,0x20 CMP RDX,RSI JNZ 0x001bfb92 LAB_001bfba4: CMP EAX,0x7fffffff SETNZ byte ptr [RBX + 0x30] LEA R14,[RBX + 0x38] LAB_001bfbb1: MOV RDI,R14 MOV RSI,R13 CALL 0x0017e61e LEA R13,[RSP + 0x10] MOV qword ptr [R13 + -0x10],R13 LAB_001bfbc5: LEA RSI,[0x2a649e] LEA RDX,[0x2a64a7] MOV RDI,RSP CALL 0x001250b2 LAB_001bfbdb: MOV RSI,RSP MOV RDI,R14 CALL 0x0012e310 MOV RDI,RAX MOV RSI,R12 CALL 0x0011f260 MOV RDI,qword ptr [RSP] CMP RDI,R13 JZ 0x001bfbff CALL 0x0011f4a0 LAB_001bfbff: MOV RSI,qword ptr [RBX] LAB_001bfc02: MOV RDI,RSP MOV RDX,R15 CALL 0x001346a0 LEA R12,[RSP + 0x30] MOV qword ptr [R12 + -0x10],R12 LAB_001bfc17: LEA RSI,[0x2abe60] LEA RDX,[0x2abe69] LEA RDI,[RSP + 0x20] CALL 0x001250b2 LAB_001bfc2f: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0012e310 MOV RSI,RSP MOV RDI,RAX CALL 0x0011f5d0 MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R12 JZ 0x001bfc56 CALL 0x0011f4a0 LAB_001bfc56: MOV RDI,qword ptr [RSP] CMP RDI,R13 JZ 0x001bfc64 CALL 0x0011f4a0 LAB_001bfc64: MOV RAX,qword ptr [RBX] MOV R15,qword ptr [RAX + 0x8] MOV RDI,RSP MOV qword ptr [RDI],R13 LAB_001bfc71: LEA RSI,[0x2c664e] LEA RDX,[0x2c6658] CALL 0x001250b2 LAB_001bfc84: MOV RSI,RSP MOV RDI,R14 CALL 0x0012e310 MOV RDI,RAX MOV RSI,R15 CALL 0x0011f260 MOV RDI,qword ptr [RSP] CMP RDI,R13 JZ 0x001bfca8 CALL 0x0011f4a0 LAB_001bfca8: MOV RAX,qword ptr [RBX] MOV R15,qword ptr [RAX + 0x8] MOV RDI,RSP MOV qword ptr [RDI],R13 LAB_001bfcb5: LEA RSI,[0x2a89be] LEA RDX,[0x2a89c9] CALL 0x001250b2 LAB_001bfcc8: MOV RSI,RSP MOV RDI,R14 CALL 0x0012e310 MOV RDI,RAX MOV RSI,R15 CALL 0x0011f260 MOV RDI,qword ptr [RSP] CMP RDI,R13 JZ 0x001bfcec CALL 0x0011f4a0 LAB_001bfcec: MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RAX + 0x8] LAB_001bfcf3: MOV RDI,RSP CALL 0x00134392 LEA RDI,[RSP + 0x20] MOV qword ptr [RDI],R12 LAB_001bfd03: LEA RSI,[0x2a83a1] LEA RDX,[0x2a83ae] CALL 0x001250b2 LAB_001bfd16: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0012e310 MOV RSI,RSP MOV RDI,RAX CALL 0x0011f5d0 MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R12 JZ 0x001bfd3d CALL 0x0011f4a0 LAB_001bfd3d: MOV RDI,qword ptr [RSP] CMP RDI,R13 JZ 0x001bfd4b CALL 0x0011f4a0 LAB_001bfd4b: MOV RAX,qword ptr [RBX] CMP qword ptr [RAX + 0x18],0x0 JZ 0x001bfd7c MOV RDI,RSP MOV qword ptr [RDI],R13 MOV RSI,qword ptr [RBX + 0x8] MOV RDX,qword ptr [RBX + 0x10] ADD RDX,RSI LAB_001bfd66: CALL 0x0012586a LAB_001bfd6b: LEA RSI,[0x2a99d1] MOV RDI,RSP CALL 0x0011f8e0 JMP 0x001bfd91 LAB_001bfd7c: MOV RDI,RSP MOV qword ptr [RDI],R13 LAB_001bfd82: LEA RDX,[0x29a5a9] MOV RSI,RDX CALL 0x001250b2 LAB_001bfd91: LEA RDI,[RSP + 0x20] MOV qword ptr [RDI],R12 LAB_001bfd99: LEA RSI,[0x2c54c4] LEA RDX,[0x2c54ca] CALL 0x001250b2 LAB_001bfdac: LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x0012e310 LAB_001bfdb9: MOV RSI,RSP MOV RDI,RAX CALL 0x0011f5d0 MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R12 JZ 0x001bfdd3 CALL 0x0011f4a0 LAB_001bfdd3: MOV RDI,qword ptr [RSP] CMP RDI,R13 JZ 0x001bfde1 CALL 0x0011f4a0 LAB_001bfde1: ADD RSP,0x40 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* google::protobuf::compiler::cpp::EnumGenerator::EnumGenerator(google::protobuf::EnumDescriptor const*, std::map<std::__cxx11::string, std::__cxx11::string, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&, google::protobuf::compiler::cpp::Options const&) */ void __thiscall google::protobuf::compiler::cpp::EnumGenerator::EnumGenerator (EnumGenerator *this,EnumDescriptor *param_1,map *param_2,Options *param_3) { _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *this_00; int iVar1; int iVar2; string *psVar3; long lVar4; int1 *local_68 [2]; int1 local_58 [16]; int1 *local_48 [2]; int1 local_38 [16]; *(EnumDescriptor **)this = param_1; ClassName_abi_cxx11_((cpp *)(this + 8),param_1); *(Options **)(this + 0x28) = param_3; iVar2 = *(int *)(*(long *)(param_1 + 0x28) + 4); if (0 < (long)*(int *)(param_1 + 4)) { lVar4 = 0; do { iVar1 = *(int *)(*(long *)(param_1 + 0x28) + 4 + lVar4); if (iVar2 < iVar1) { iVar2 = iVar1; } lVar4 = lVar4 + 0x20; } while ((long)*(int *)(param_1 + 4) * 0x20 != lVar4); } this[0x30] = (EnumGenerator)(iVar2 != 0x7fffffff); this_00 = (_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(this + 0x38); /* try { // try from 001bfbb1 to 001bfbbb has its CatchHandler @ 001bfe1e */ std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::_Rb_tree(this_00,(_Rb_tree *)param_2); local_68[0] = local_58; /* try { // try from 001bfbc5 to 001bfbda has its CatchHandler @ 001bfe19 */ std::__cxx11::string::_M_construct<char_const*>(local_68,"classname",""); /* try { // try from 001bfbdb to 001bfbf0 has its CatchHandler @ 001bfe27 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this_00,(string *)local_68); std::__cxx11::string::_M_assign(psVar3); if (local_68[0] != local_58) { operator_delete(local_68[0]); } /* try { // try from 001bfc02 to 001bfc0c has its CatchHandler @ 001bfe17 */ QualifiedClassName_abi_cxx11_((cpp *)local_68,*(EnumDescriptor **)this,param_3); /* try { // try from 001bfc17 to 001bfc2e has its CatchHandler @ 001bfe15 */ local_48[0] = local_38; std::__cxx11::string::_M_construct<char_const*>(local_48,"classtype",""); /* try { // try from 001bfc2f to 001bfc3b has its CatchHandler @ 001bfe01 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this_00,(string *)local_48); std::__cxx11::string::operator=(psVar3,(string *)local_68); if (local_48[0] != local_38) { operator_delete(local_48[0]); } if (local_68[0] != local_58) { operator_delete(local_68[0]); } local_68[0] = local_58; /* try { // try from 001bfc71 to 001bfc83 has its CatchHandler @ 001bfdff */ std::__cxx11::string::_M_construct<char_const*>(local_68,"short_name",""); /* try { // try from 001bfc84 to 001bfc99 has its CatchHandler @ 001bfe25 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this_00,(string *)local_68); std::__cxx11::string::_M_assign(psVar3); if (local_68[0] != local_58) { operator_delete(local_68[0]); } local_68[0] = local_58; /* try { // try from 001bfcb5 to 001bfcc7 has its CatchHandler @ 001bfdfd */ std::__cxx11::string::_M_construct<char_const*>(local_68,"nested_name",""); /* try { // try from 001bfcc8 to 001bfcdd has its CatchHandler @ 001bfe23 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this_00,(string *)local_68); std::__cxx11::string::_M_assign(psVar3); if (local_68[0] != local_58) { operator_delete(local_68[0]); } /* try { // try from 001bfcf3 to 001bfcfa has its CatchHandler @ 001bfdfb */ ResolveKeyword((cpp *)local_68,*(string **)(*(long *)this + 8)); local_48[0] = local_38; /* try { // try from 001bfd03 to 001bfd15 has its CatchHandler @ 001bfdf9 */ std::__cxx11::string::_M_construct<char_const*>(local_48,"resolved_name",""); /* try { // try from 001bfd16 to 001bfd22 has its CatchHandler @ 001bfdf7 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this_00,(string *)local_48); std::__cxx11::string::operator=(psVar3,(string *)local_68); if (local_48[0] != local_38) { operator_delete(local_48[0]); } if (local_68[0] != local_58) { operator_delete(local_68[0]); } if (*(long *)(*(long *)this + 0x18) == 0) { local_68[0] = local_58; /* try { // try from 001bfd82 to 001bfd90 has its CatchHandler @ 001bfdf5 */ std::__cxx11::string::_M_construct<char_const*>(local_68,&DAT_0029a5a9); } else { local_68[0] = local_58; /* try { // try from 001bfd66 to 001bfd6a has its CatchHandler @ 001bfdf5 */ std::__cxx11::string::_M_construct<char*> (local_68,*(long *)(this + 8),*(long *)(this + 0x10) + *(long *)(this + 8)); /* try { // try from 001bfd6b to 001bfd79 has its CatchHandler @ 001bfdef */ std::__cxx11::string::append((char *)local_68); } local_48[0] = local_38; /* try { // try from 001bfd99 to 001bfdab has its CatchHandler @ 001bfdf3 */ std::__cxx11::string::_M_construct<char_const*>(local_48,"prefix",""); /* try { // try from 001bfdac to 001bfdb8 has its CatchHandler @ 001bfdf1 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this_00,(string *)local_48); std::__cxx11::string::operator=(psVar3,(string *)local_68); if (local_48[0] != local_38) { operator_delete(local_48[0]); } if (local_68[0] != local_58) { operator_delete(local_68[0]); } return; }
28,616
uf_prespace_selected
eloqsql/storage/maria/ma_packrec.c
static void uf_prespace_selected(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill(to, spaces, ' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } else decode_bytes(rec,bit_buff,to,end); }
O3
c
uf_prespace_selected: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r8 movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x3b1e4 movl (%r14), %ebx decl %eax movl %eax, 0x4(%r14) btl %eax, %ebx jb 0x3b217 jmp 0x3b201 movq %r14, %rdi movq %r8, %rbx callq 0x3a694 movq %rbx, %r8 movl $0x1f, 0x4(%r14) movl (%r14), %ebx testl %ebx, %ebx js 0x3b212 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movq %r8, %rcx jmp 0x3b2b7 movl $0x1f, %eax movl 0x24(%r15), %r13d movl %eax, %ecx subl %r13d, %ecx jae 0x3b26d subl %eax, %r13d movl %eax, %eax leaq 0xa5ef2(%rip), %rcx # 0xe1120 andl (%rcx,%rax,4), %ebx movl %r13d, %ecx shll %cl, %ebx movq %r14, %rdi movq %r15, -0x30(%rbp) movq %r12, %r15 movq %r8, %r12 callq 0x3a694 movq %r12, %r8 movq %r15, %r12 movq -0x30(%rbp), %r15 movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r14) movl (%r14), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %ebx jmp 0x3b281 movl %ecx, 0x4(%r14) shrl %cl, %ebx movl 0x24(%r15), %eax leaq 0xa5ea2(%rip), %rcx # 0xe1120 andl (%rcx,%rax,4), %ebx movl %ebx, %edx leaq (%r12,%rdx), %r13 cmpq %r8, %r13 jbe 0x3b296 movl $0x1, 0x28(%r14) jmp 0x3b2ca movq %r12, %rdi movl $0x20, %esi movq %r8, %rbx callq 0x292c0 cmpq %rbx, %r13 je 0x3b2ca movq %rbx, %rcx movq %r15, %rdi movq %r14, %rsi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3a851 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
uf_prespace_selected: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r8, rcx mov r12, rdx mov r14, rsi mov r15, rdi mov eax, [rsi+4] test eax, eax jz short loc_3B1E4 mov ebx, [r14] dec eax mov [r14+4], eax bt ebx, eax jb short loc_3B217 jmp short loc_3B201 loc_3B1E4: mov rdi, r14 mov rbx, r8 call fill_buffer mov r8, rbx mov dword ptr [r14+4], 1Fh mov ebx, [r14] test ebx, ebx js short loc_3B212 loc_3B201: mov rdi, r15 mov rsi, r14 mov rdx, r12 mov rcx, r8 jmp loc_3B2B7 loc_3B212: mov eax, 1Fh loc_3B217: mov r13d, [r15+24h] mov ecx, eax sub ecx, r13d jnb short loc_3B26D sub r13d, eax mov eax, eax lea rcx, mask and ebx, [rcx+rax*4] mov ecx, r13d shl ebx, cl mov rdi, r14 mov [rbp+var_30], r15 mov r15, r12 mov r12, r8 call fill_buffer mov r8, r12 mov r12, r15 mov r15, [rbp+var_30] mov eax, 20h ; ' ' sub eax, r13d mov [r14+4], eax mov eax, [r14] neg r13d mov ecx, r13d shr eax, cl add ebx, eax jmp short loc_3B281 loc_3B26D: mov [r14+4], ecx shr ebx, cl mov eax, [r15+24h] lea rcx, mask and ebx, [rcx+rax*4] loc_3B281: mov edx, ebx lea r13, [r12+rdx] cmp r13, r8 jbe short loc_3B296 mov dword ptr [r14+28h], 1 jmp short loc_3B2CA loc_3B296: mov rdi, r12 mov esi, 20h ; ' ' mov rbx, r8 call _memset cmp r13, rbx jz short loc_3B2CA mov rcx, rbx mov rdi, r15 mov rsi, r14 mov rdx, r13 loc_3B2B7: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes loc_3B2CA: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long uf_prespace_selected(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4) { _BYTE *v4; // r8 long long v6; // r15 unsigned int v7; // eax unsigned int v8; // ebx unsigned int v9; // eax _BYTE *v11; // rdx _BYTE *v12; // rcx unsigned int v13; // r13d unsigned int v14; // ecx int v15; // r13d int v16; // ebx _BYTE *v17; // r15 _BYTE *v18; // r12 long long result; // rax unsigned int v20; // ebx long long v21; // rdx _BYTE *v22; // r13 _BYTE *v23; // rbx v4 = a4; v6 = a1; v7 = a2[1]; if ( v7 ) { v8 = *a2; v9 = v7 - 1; a2[1] = v9; if ( !_bittest((const int *)&v8, v9) ) goto LABEL_5; } else { fill_buffer((long long)a2); v4 = a4; a2[1] = 31; v8 = *a2; if ( (*a2 & 0x80000000) == 0 ) { LABEL_5: v11 = a3; v12 = v4; return (long long)decode_bytes(a1, (long long)a2, v11, v12); } v9 = 31; } v13 = *(_DWORD *)(a1 + 36); v14 = v9 - v13; if ( v9 >= v13 ) { a2[1] = v14; result = *(unsigned int *)(a1 + 36); v20 = mask[result] & (v8 >> v14); } else { v15 = v13 - v9; v16 = (mask[v9] & v8) << v15; v17 = a3; v18 = v4; fill_buffer((long long)a2); v4 = v18; a3 = v17; v6 = a1; a2[1] = 32 - v15; result = *a2 >> -(char)v15; v20 = result + v16; } v21 = v20; v22 = &a3[v20]; if ( v22 > v4 ) { a2[10] = 1; return result; } v23 = v4; result = memset(a3, 32LL, v21); if ( v22 != v23 ) { v12 = v23; a1 = v6; v11 = v22; return (long long)decode_bytes(a1, (long long)a2, v11, v12); } return result; }
uf_prespace_selected: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R8,RCX MOV R12,RDX MOV R14,RSI MOV R15,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x0013b1e4 MOV EBX,dword ptr [R14] DEC EAX MOV dword ptr [R14 + 0x4],EAX BT EBX,EAX JC 0x0013b217 JMP 0x0013b201 LAB_0013b1e4: MOV RDI,R14 MOV RBX,R8 CALL 0x0013a694 MOV R8,RBX MOV dword ptr [R14 + 0x4],0x1f MOV EBX,dword ptr [R14] TEST EBX,EBX JS 0x0013b212 LAB_0013b201: MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV RCX,R8 JMP 0x0013b2b7 LAB_0013b212: MOV EAX,0x1f LAB_0013b217: MOV R13D,dword ptr [R15 + 0x24] MOV ECX,EAX SUB ECX,R13D JNC 0x0013b26d SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x1e1120] AND EBX,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL EBX,CL MOV RDI,R14 MOV qword ptr [RBP + -0x30],R15 MOV R15,R12 MOV R12,R8 CALL 0x0013a694 MOV R8,R12 MOV R12,R15 MOV R15,qword ptr [RBP + -0x30] MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R14 + 0x4],EAX MOV EAX,dword ptr [R14] NEG R13D MOV ECX,R13D SHR EAX,CL ADD EBX,EAX JMP 0x0013b281 LAB_0013b26d: MOV dword ptr [R14 + 0x4],ECX SHR EBX,CL MOV EAX,dword ptr [R15 + 0x24] LEA RCX,[0x1e1120] AND EBX,dword ptr [RCX + RAX*0x4] LAB_0013b281: MOV EDX,EBX LEA R13,[R12 + RDX*0x1] CMP R13,R8 JBE 0x0013b296 MOV dword ptr [R14 + 0x28],0x1 JMP 0x0013b2ca LAB_0013b296: MOV RDI,R12 MOV ESI,0x20 MOV RBX,R8 CALL 0x001292c0 CMP R13,RBX JZ 0x0013b2ca MOV RCX,RBX MOV RDI,R15 MOV RSI,R14 MOV RDX,R13 LAB_0013b2b7: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013a851 LAB_0013b2ca: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void uf_prespace_selected(long param_1,uint *param_2,void *param_3,void *param_4) { void *pvVar1; uint uVar2; uint uVar3; uint uVar4; byte bVar5; uint uVar6; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar6 = *param_2; if (-1 < (int)uVar6) goto LAB_0013b2b7; uVar4 = 0x1f; } else { uVar6 = *param_2; uVar4 = param_2[1] - 1; param_2[1] = uVar4; if ((uVar6 >> (uVar4 & 0x1f) & 1) == 0) goto LAB_0013b2b7; } uVar2 = *(uint *)(param_1 + 0x24); if (uVar4 < uVar2) { uVar3 = (&mask)[uVar4]; bVar5 = (byte)(uVar2 - uVar4); fill_buffer(param_2); param_2[1] = 0x20 - (uVar2 - uVar4); uVar6 = ((uVar6 & uVar3) << (bVar5 & 0x1f)) + (*param_2 >> (-bVar5 & 0x1f)); } else { param_2[1] = uVar4 - uVar2; uVar6 = uVar6 >> ((byte)(uVar4 - uVar2) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)]; } pvVar1 = (void *)((long)param_3 + (ulong)uVar6); if (param_4 < pvVar1) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)uVar6); param_3 = pvVar1; if (pvVar1 != param_4) { LAB_0013b2b7: decode_bytes(param_1,param_2,param_3,param_4); return; } } return; }
28,617
my_well_formed_char_length_8bit
eloqsql/strings/ctype-simple.c
size_t my_well_formed_char_length_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *start, const char *end, size_t nchars, MY_STRCOPY_STATUS *status) { size_t nbytes= (size_t) (end - start); size_t res= MY_MIN(nbytes, nchars); status->m_well_formed_error_pos= NULL; status->m_source_end_pos= start + res; return res; }
O0
c
my_well_formed_char_length_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x5700b movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x57013 movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x10(%rbp), %rcx addq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax popq %rbp retq nopl (%rax)
my_well_formed_char_length_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jnb short loc_5700B mov rax, [rbp+var_30] mov [rbp+var_40], rax jmp short loc_57013 loc_5700B: mov rax, [rbp+var_20] mov [rbp+var_40], rax loc_57013: mov rax, [rbp+var_40] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov qword ptr [rax+8], 0 mov rcx, [rbp+var_10] add rcx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_38] pop rbp retn
unsigned long long my_well_formed_char_length_8bit( long long a1, long long a2, long long a3, unsigned long long a4, _QWORD *a5) { unsigned long long v6; // [rsp+0h] [rbp-40h] if ( a3 - a2 >= a4 ) v6 = a4; else v6 = a3 - a2; a5[1] = 0LL; *a5 = v6 + a2; return v6; }
my_well_formed_char_length_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0015700b MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX JMP 0x00157013 LAB_0015700b: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX LAB_00157013: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],0x0 MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] POP RBP RET
ulong my_well_formed_char_length_8bit (int8 param_1,long param_2,long param_3,ulong param_4,long *param_5) { ulong local_48; local_48 = param_4; if ((ulong)(param_3 - param_2) < param_4) { local_48 = param_3 - param_2; } param_5[1] = 0; *param_5 = param_2 + local_48; return local_48; }
28,618
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::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)
llama.cpp/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<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::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, %ebx movl %edx, %ebp movq %rdi, %r14 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 0x21110 movq %rax, 0x50(%r14) movq 0x8(%rax), %rcx testq %rcx, %rcx je 0x81104 movb (%rcx), %r15b movb %r15b, 0x58(%r14) movq (%rax), %rax testq %rax, %rax je 0x81114 movb (%rax), %al jmp 0x81116 xorl %eax, %eax leaq 0x8(%r14), %r15 movb %al, 0x59(%r14) leaq 0x5a(%r14), %rdi movl $0x200, %edx # imm = 0x200 xorl %esi, %esi callq 0x21570 movb %bpl, 0x25a(%r14) leaq 0x260(%r14), %rdi leaq 0x270(%r14), %rax movq %rax, 0x260(%r14) movsbl %bpl, %edx movl $0x200, %esi # imm = 0x200 callq 0x21ac0 movl %ebx, 0x280(%r14) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq %r15, %rdi callq 0x74104 movq %rbx, %rdi callq 0x21c10 nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE: push rbp push r15 push r14 push rbx push rax mov ebx, ecx mov ebp, edx mov r14, 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 [r14+50h], rax mov rcx, [rax+8] test rcx, rcx jz short loc_81104 mov r15b, [rcx] loc_81104: mov [r14+58h], r15b mov rax, [rax] test rax, rax jz short loc_81114 mov al, [rax] jmp short loc_81116 loc_81114: xor eax, eax loc_81116: lea r15, [r14+8] mov [r14+59h], al lea rdi, [r14+5Ah] mov edx, 200h xor esi, esi call _memset mov [r14+25Ah], bpl lea rdi, [r14+260h] lea rax, [r14+270h] mov [r14+260h], rax movsx edx, bpl mov esi, 200h call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov [r14+280h], ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::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 EBX,ECX MOV EBP,EDX MOV R14,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 0x00121110 MOV qword ptr [R14 + 0x50],RAX MOV RCX,qword ptr [RAX + 0x8] TEST RCX,RCX JZ 0x00181104 MOV R15B,byte ptr [RCX] LAB_00181104: MOV byte ptr [R14 + 0x58],R15B MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00181114 MOV AL,byte ptr [RAX] JMP 0x00181116 LAB_00181114: XOR EAX,EAX LAB_00181116: LEA R15,[R14 + 0x8] MOV byte ptr [R14 + 0x59],AL LEA RDI,[R14 + 0x5a] MOV EDX,0x200 XOR ESI,ESI CALL 0x00121570 MOV byte ptr [R14 + 0x25a],BPL LEA RDI,[R14 + 0x260] LEA RAX,[R14 + 0x270] MOV qword ptr [R14 + 0x260],RAX LAB_0018114a: MOVSX EDX,BPL MOV ESI,0x200 CALL 0x00121ac0 LAB_00181158: MOV dword ptr [R14 + 0x280],EBX 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<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::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<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::serializer(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,int8 *param_2, serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> param_3,int4 param_4) { int8 uVar1; serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> sVar2; lconv *plVar3; sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )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<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)plVar3->thousands_sep != (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)0x0) { sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)plVar3->thousands_sep; } this[0x58] = sVar2; if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)plVar3->decimal_point == (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)0x0) { sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x0; } else { sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)plVar3->decimal_point; } this[0x59] = sVar2; memset(this + 0x5a,0,0x200); this[0x25a] = param_3; *(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> **)(this + 0x260) = this + 0x270; /* try { // try from 0018114a to 00181157 has its CatchHandler @ 0018116a */ std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0'); *(int4 *)(this + 0x280) = param_4; return; }
28,619
testing::internal::DeathTestImpl::DeathTestImpl(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
DeathTestImpl(const char* a_statement, Matcher<const std::string&> matcher) : statement_(a_statement), matcher_(std::move(matcher)), spawned_(false), status_(-1), outcome_(IN_PROGRESS), read_fd_(-1), write_fd_(-1) {}
O0
cpp
testing::internal::DeathTestImpl::DeathTestImpl(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>): subq $0x38, %rsp movq %rdx, 0x8(%rsp) movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x30(%rsp), %rdi movq %rdi, (%rsp) callq 0xb0e30 movq (%rsp), %rdi movq 0x8(%rsp), %rsi leaq 0x94242(%rip), %rax # 0x176ea8 addq $0x10, %rax movq %rax, (%rdi) movq 0x28(%rsp), %rax movq %rax, 0x8(%rdi) addq $0x10, %rdi callq 0xe2770 jmp 0xe2c81 movq (%rsp), %rax movb $0x0, 0x28(%rax) movl $0xffffffff, 0x2c(%rax) # imm = 0xFFFFFFFF movl $0x0, 0x30(%rax) movl $0xffffffff, 0x34(%rax) # imm = 0xFFFFFFFF movl $0xffffffff, 0x38(%rax) # imm = 0xFFFFFFFF addq $0x38, %rsp retq movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) callq 0xec840 movq 0x18(%rsp), %rdi callq 0x14c80 nopl (%rax,%rax)
_ZN7testing8internal13DeathTestImplC2EPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE: sub rsp, 38h mov [rsp+38h+var_30], rdx mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rdi, [rsp+38h+var_8]; this mov [rsp+38h+var_38], rdi call _ZN7testing8internal9DeathTestC2Ev; testing::internal::DeathTest::DeathTest(void) mov rdi, [rsp+38h+var_38] mov rsi, [rsp+38h+var_30] lea rax, _ZTVN7testing8internal13DeathTestImplE; `vtable for'testing::internal::DeathTestImpl add rax, 10h mov [rdi], rax mov rax, [rsp+38h+var_10] mov [rdi+8], rax add rdi, 10h call _ZN7testing7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EOS9_; testing::Matcher<std::string const&>::Matcher(testing::Matcher<std::string const&>&&) jmp short $+2 loc_E2C81: mov rax, [rsp+38h+var_38] mov byte ptr [rax+28h], 0 mov dword ptr [rax+2Ch], 0FFFFFFFFh mov dword ptr [rax+30h], 0 mov dword ptr [rax+34h], 0FFFFFFFFh mov dword ptr [rax+38h], 0FFFFFFFFh add rsp, 38h retn mov rdi, [rsp+0]; this mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax call _ZN7testing8internal9DeathTestD2Ev; testing::internal::DeathTest::~DeathTest() mov rdi, [rsp+arg_10] call __Unwind_Resume
long long testing::internal::DeathTestImpl::DeathTestImpl(long long a1, long long a2, long long a3) { long long result; // rax testing::internal::DeathTest::DeathTest((testing::internal::DeathTest *)a1); *(_QWORD *)a1 = &`vtable for'testing::internal::DeathTestImpl + 2; *(_QWORD *)(a1 + 8) = a2; testing::Matcher<std::string const&>::Matcher((_QWORD *)(a1 + 16), a3); result = a1; *(_BYTE *)(a1 + 40) = 0; *(_DWORD *)(a1 + 44) = -1; *(_DWORD *)(a1 + 48) = 0; *(_DWORD *)(a1 + 52) = -1; *(_DWORD *)(a1 + 56) = -1; return result; }
DeathTestImpl: SUB RSP,0x38 MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP],RDI CALL 0x001b0e30 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] LEA RAX,[0x276ea8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RDI + 0x8],RAX ADD RDI,0x10 LAB_001e2c7a: CALL 0x001e2770 LAB_001e2c7f: JMP 0x001e2c81 LAB_001e2c81: MOV RAX,qword ptr [RSP] MOV byte ptr [RAX + 0x28],0x0 MOV dword ptr [RAX + 0x2c],0xffffffff MOV dword ptr [RAX + 0x30],0x0 MOV dword ptr [RAX + 0x34],0xffffffff MOV dword ptr [RAX + 0x38],0xffffffff ADD RSP,0x38 RET
/* testing::internal::DeathTestImpl::DeathTestImpl(char const*, testing::Matcher<std::__cxx11::string const&>) */ void __thiscall testing::internal::DeathTestImpl::DeathTestImpl (DeathTestImpl *this,int8 param_1,Matcher *param_3) { DeathTest::DeathTest((DeathTest *)this); *(int ***)this = &PTR__DeathTestImpl_00276eb8; *(int8 *)(this + 8) = param_1; /* try { // try from 001e2c7a to 001e2c7e has its CatchHandler @ 001e2caa */ Matcher<std::__cxx11::string_const&>::Matcher ((Matcher<std::__cxx11::string_const&> *)(this + 0x10),param_3); this[0x28] = (DeathTestImpl)0x0; *(int4 *)(this + 0x2c) = 0xffffffff; *(int4 *)(this + 0x30) = 0; *(int4 *)(this + 0x34) = 0xffffffff; *(int4 *)(this + 0x38) = 0xffffffff; return; }
28,620
test_ps_client_errors
eloqsql/libmariadb/unittest/libmariadb/errors.c
static int test_ps_client_errors(MYSQL *mysql) { int rc; MYSQL_STMT *stmt; const char *query= "DROP TABLE test_non_exists"; rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); check_mysql_rc(rc, mysql); stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL(query)); FAIL_IF(rc, mysql_stmt_error(stmt)); rc= mysql_stmt_execute(stmt); FAIL_IF(!rc, mysql_stmt_error(stmt)); FAIL_IF(!mysql_stmt_errno(stmt), "Error expected"); FAIL_IF(!strlen(mysql_stmt_error(stmt)), "Empty errormsg"); FAIL_IF(strcmp(mysql_stmt_sqlstate(stmt), "00000") == 0, "Invalid SQLstate"); mysql_stmt_close(stmt); return OK; }
O3
c
test_ps_client_errors: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 leaq 0x2084a(%rip), %rsi # 0x3573f callq 0x1b1fd testl %eax, %eax je 0x14f37 movl %eax, %ebx movq %r14, %rdi callq 0x1d276 movq %rax, %r15 movq %r14, %rdi callq 0x1d261 leaq 0x20233(%rip), %rdi # 0x3514d leaq 0x20843(%rip), %r8 # 0x35764 movl %ebx, %esi movq %r15, %rdx movl %eax, %ecx movl $0x79, %r9d xorl %eax, %eax callq 0x15af3 jmp 0x14f7f movq %r14, %rdi callq 0x218bc movq %rax, %rbx leaq 0x208c0(%rip), %rsi # 0x35809 movl $0x1a, %edx movq %rax, %rdi callq 0x21c80 testl %eax, %eax je 0x14f8f movq %rbx, %rdi callq 0x2135c leaq 0x2009f(%rip), %rdi # 0x35008 leaq 0x207f4(%rip), %rdx # 0x35764 movq %rax, %rsi movl $0x7d, %ecx xorl %eax, %eax callq 0x15af3 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi callq 0x22851 testl %eax, %eax je 0x14fdb movq %rbx, %rdi callq 0x21350 testl %eax, %eax je 0x14ffe movq %rbx, %rdi callq 0x2135c cmpb $0x0, (%rax) je 0x1501d movq %rbx, %rdi callq 0x22c71 leaq 0x208af(%rip), %rsi # 0x35872 movq %rax, %rdi callq 0x13640 testl %eax, %eax je 0x1503c movq %rbx, %rdi callq 0x212cd xorl %eax, %eax jmp 0x14f84 movq %rbx, %rdi callq 0x2135c leaq 0x2001e(%rip), %rdi # 0x35008 leaq 0x20773(%rip), %rdx # 0x35764 movq %rax, %rsi movl $0x80, %ecx jmp 0x14f78 leaq 0x20003(%rip), %rdi # 0x35008 leaq 0x20818(%rip), %rsi # 0x35824 leaq 0x20751(%rip), %rdx # 0x35764 movl $0x82, %ecx jmp 0x14f78 leaq 0x1ffe4(%rip), %rdi # 0x35008 leaq 0x20808(%rip), %rsi # 0x35833 leaq 0x20732(%rip), %rdx # 0x35764 movl $0x83, %ecx jmp 0x14f78 leaq 0x1ffc5(%rip), %rdi # 0x35008 leaq 0x207f8(%rip), %rsi # 0x35842 leaq 0x20713(%rip), %rdx # 0x35764 movl $0x84, %ecx jmp 0x14f78
test_ps_client_errors: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdi lea rsi, aDropTableIfExi; "DROP TABLE if exists test_non_exists" call mysql_query test eax, eax jz short loc_14F37 mov ebx, eax mov rdi, r14 call mysql_error mov r15, rax mov rdi, r14 call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, ebx mov rdx, r15 mov ecx, eax mov r9d, 79h ; 'y' xor eax, eax call diag jmp short loc_14F7F loc_14F37: mov rdi, r14 call mysql_stmt_init mov rbx, rax lea rsi, aDropTableTestN; "DROP TABLE test_non_exists" mov edx, 1Ah mov rdi, rax call mysql_stmt_prepare test eax, eax jz short loc_14F8F mov rdi, rbx call mysql_stmt_error lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov rsi, rax mov ecx, 7Dh ; '}' loc_14F78: xor eax, eax call diag loc_14F7F: mov eax, 1 loc_14F84: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_14F8F: mov rdi, rbx call mysql_stmt_execute test eax, eax jz short loc_14FDB mov rdi, rbx call mysql_stmt_errno test eax, eax jz short loc_14FFE mov rdi, rbx call mysql_stmt_error cmp byte ptr [rax], 0 jz short loc_1501D mov rdi, rbx call mysql_stmt_sqlstate lea rsi, aExpectedSqlsta+13h; "00000" mov rdi, rax call _strcmp test eax, eax jz short loc_1503C mov rdi, rbx call mysql_stmt_close xor eax, eax jmp short loc_14F84 loc_14FDB: mov rdi, rbx call mysql_stmt_error lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov rsi, rax mov ecx, 80h jmp loc_14F78 loc_14FFE: lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aErrorExpected; "Error expected" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 82h jmp loc_14F78 loc_1501D: lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aEmptyErrormsg; "Empty errormsg" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 83h jmp loc_14F78 loc_1503C: lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aInvalidSqlstat; "Invalid SQLstate" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 84h jmp loc_14F78
long long test_ps_client_errors(long long a1) { int v1; // eax int v2; // ebx int v3; // r15d int v4; // eax long long v5; // rbx const char *v6; // rsi int v7; // r8d int v8; // r9d int v9; // ecx long long v11; // rax v1 = mysql_query(a1, "DROP TABLE if exists test_non_exists"); if ( v1 ) { v2 = v1; v3 = mysql_error(a1); v4 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v2, v3, v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/errors.c", 121); } else { v5 = mysql_stmt_init(a1); if ( (unsigned int)mysql_stmt_prepare(v5, "DROP TABLE test_non_exists", 26LL) ) { LODWORD(v6) = mysql_stmt_error(v5); v9 = 125; } else if ( (unsigned int)mysql_stmt_execute(v5) ) { if ( (unsigned int)mysql_stmt_errno(v5) ) { if ( *(_BYTE *)mysql_stmt_error(v5) ) { v11 = mysql_stmt_sqlstate(v5); if ( (unsigned int)strcmp(v11, "00000") ) { mysql_stmt_close(v5); return 0LL; } v6 = "Invalid SQLstate"; v9 = 132; } else { v6 = "Empty errormsg"; v9 = 131; } } else { v6 = "Error expected"; v9 = 130; } } else { LODWORD(v6) = mysql_stmt_error(v5); v9 = 128; } diag( (unsigned int)"Error: %s (%s: %d)", (_DWORD)v6, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/errors.c", v9, v7, v8); } return 1LL; }
test_ps_client_errors: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI LEA RSI,[0x13573f] CALL 0x0011b1fd TEST EAX,EAX JZ 0x00114f37 MOV EBX,EAX MOV RDI,R14 CALL 0x0011d276 MOV R15,RAX MOV RDI,R14 CALL 0x0011d261 LEA RDI,[0x13514d] LEA R8,[0x135764] MOV ESI,EBX MOV RDX,R15 MOV ECX,EAX MOV R9D,0x79 XOR EAX,EAX CALL 0x00115af3 JMP 0x00114f7f LAB_00114f37: MOV RDI,R14 CALL 0x001218bc MOV RBX,RAX LEA RSI,[0x135809] MOV EDX,0x1a MOV RDI,RAX CALL 0x00121c80 TEST EAX,EAX JZ 0x00114f8f MOV RDI,RBX CALL 0x0012135c LEA RDI,[0x135008] LEA RDX,[0x135764] MOV RSI,RAX MOV ECX,0x7d LAB_00114f78: XOR EAX,EAX CALL 0x00115af3 LAB_00114f7f: MOV EAX,0x1 LAB_00114f84: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00114f8f: MOV RDI,RBX CALL 0x00122851 TEST EAX,EAX JZ 0x00114fdb MOV RDI,RBX CALL 0x00121350 TEST EAX,EAX JZ 0x00114ffe MOV RDI,RBX CALL 0x0012135c CMP byte ptr [RAX],0x0 JZ 0x0011501d MOV RDI,RBX CALL 0x00122c71 LEA RSI,[0x135872] MOV RDI,RAX CALL 0x00113640 TEST EAX,EAX JZ 0x0011503c MOV RDI,RBX CALL 0x001212cd XOR EAX,EAX JMP 0x00114f84 LAB_00114fdb: MOV RDI,RBX CALL 0x0012135c LEA RDI,[0x135008] LEA RDX,[0x135764] MOV RSI,RAX MOV ECX,0x80 JMP 0x00114f78 LAB_00114ffe: LEA RDI,[0x135008] LEA RSI,[0x135824] LEA RDX,[0x135764] MOV ECX,0x82 JMP 0x00114f78 LAB_0011501d: LEA RDI,[0x135008] LEA RSI,[0x135833] LEA RDX,[0x135764] MOV ECX,0x83 JMP 0x00114f78 LAB_0011503c: LEA RDI,[0x135008] LEA RSI,[0x135842] LEA RDX,[0x135764] MOV ECX,0x84 JMP 0x00114f78
int8 test_ps_client_errors(int8 param_1) { int iVar1; int4 uVar2; int8 uVar3; char *pcVar4; iVar1 = mysql_query(param_1,"DROP TABLE if exists test_non_exists"); if (iVar1 == 0) { uVar3 = mysql_stmt_init(param_1); iVar1 = mysql_stmt_prepare(uVar3,"DROP TABLE test_non_exists",0x1a); if (iVar1 == 0) { iVar1 = mysql_stmt_execute(uVar3); if (iVar1 == 0) { pcVar4 = (char *)mysql_stmt_error(uVar3); uVar3 = 0x80; } else { iVar1 = mysql_stmt_errno(uVar3); if (iVar1 == 0) { pcVar4 = "Error expected"; uVar3 = 0x82; } else { pcVar4 = (char *)mysql_stmt_error(uVar3); if (*pcVar4 == '\0') { pcVar4 = "Empty errormsg"; uVar3 = 0x83; } else { pcVar4 = (char *)mysql_stmt_sqlstate(uVar3); iVar1 = strcmp(pcVar4,"00000"); if (iVar1 != 0) { mysql_stmt_close(uVar3); return 0; } pcVar4 = "Invalid SQLstate"; uVar3 = 0x84; } } } } else { pcVar4 = (char *)mysql_stmt_error(uVar3); uVar3 = 0x7d; } diag("Error: %s (%s: %d)",pcVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/errors.c",uVar3); } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/errors.c",0x79); } return 1; }
28,621
ma_decrypt
eloqsql/storage/maria/ma_crypt.c
static int ma_decrypt(MARIA_SHARE *share, MARIA_CRYPT_DATA *crypt_data, const uchar *src, uchar *dst, uint size, uint pageno, LSN lsn, uint key_version) { int rc; uint32 dstlen= 0; /* Must be set because of error message */ rc= encryption_scheme_decrypt(src, size, dst, &dstlen, &crypt_data->scheme, key_version, crypt_data->space, pageno, lsn); DBUG_ASSERT(!my_assert_on_error || rc == MY_AES_OK); DBUG_ASSERT(!my_assert_on_error || dstlen == size); if (! (rc == MY_AES_OK && dstlen == size)) { my_errno= HA_ERR_DECRYPTION_FAILED; if (!share->silence_encryption_errors) my_printf_error(HA_ERR_DECRYPTION_FAILED, "failed to decrypt '%s' rc: %d dstlen: %u size: %u\n", MYF(ME_FATAL|ME_ERROR_LOG), share->open_file_name.str, rc, dstlen, size); return 1; } return 0; }
O3
c
ma_decrypt: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %r9d, %eax movl %r8d, %ebx movq %rsi, %r8 movq %rdi, %r14 movl 0x18(%rbp), %r9d movq 0x10(%rbp), %r11 leaq -0x24(%rbp), %r10 movl $0x0, (%r10) movl 0x60(%rsi), %r15d subq $0x8, %rsp movq %rdx, %rdi movl %ebx, %esi movq %rcx, %rdx movq %r10, %rcx pushq %r11 pushq %rax pushq %r15 callq 0x30be6 addq $0x20, %rsp movl %eax, %r12d testl %eax, %eax jne 0x723fe xorl %r15d, %r15d cmpl %ebx, -0x24(%rbp) je 0x72448 callq 0xa319a movl $0xc0, (%rax) movl $0x1, %r15d cmpb $0x0, 0x7ec(%r14) jne 0x72448 movq 0x5e0(%r14), %rcx movl -0x24(%rbp), %r9d subq $0x8, %rsp leaq 0x695f5(%rip), %rsi # 0xdba24 movl $0x1040, %edx # imm = 0x1040 movl $0xc0, %edi movl %r12d, %r8d xorl %eax, %eax pushq %rbx callq 0x9f899 addq $0x10, %rsp movl %r15d, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
ma_decrypt: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov eax, r9d mov ebx, r8d mov r8, rsi mov r14, rdi mov r9d, [rbp+arg_8] mov r11, [rbp+arg_0] lea r10, [rbp+var_24] mov dword ptr [r10], 0 mov r15d, [rsi+60h] sub rsp, 8 mov rdi, rdx mov esi, ebx mov rdx, rcx mov rcx, r10 push r11 push rax push r15 call encryption_scheme_decrypt add rsp, 20h mov r12d, eax test eax, eax jnz short loc_723FE xor r15d, r15d cmp [rbp+var_24], ebx jz short loc_72448 loc_723FE: call _my_thread_var mov dword ptr [rax], 0C0h mov r15d, 1 cmp byte ptr [r14+7ECh], 0 jnz short loc_72448 mov rcx, [r14+5E0h] mov r9d, [rbp+var_24] sub rsp, 8 lea rsi, aFailedToDecryp; "failed to decrypt '%s' rc: %d dstlen:"... mov edx, 1040h mov edi, 0C0h mov r8d, r12d xor eax, eax push rbx call my_printf_error add rsp, 10h loc_72448: mov eax, r15d add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ma_decrypt( long long a1, long long a2, long long a3, long long a4, unsigned int a5, unsigned int a6, long long a7, unsigned int a8) { int v11; // r12d unsigned int v12; // r15d _DWORD v14[9]; // [rsp+14h] [rbp-24h] BYREF v14[0] = 0; v11 = encryption_scheme_decrypt(a3, a5, a4, v14, a2, a8, *(unsigned int *)(a2 + 96), a6, a7); if ( v11 || (v12 = 0, v14[0] != a5) ) { *(_DWORD *)my_thread_var(a3) = 192; v12 = 1; if ( !*(_BYTE *)(a1 + 2028) ) my_printf_error( 192, (unsigned int)"failed to decrypt '%s' rc: %d dstlen: %u size: %u\n", 4160, *(_QWORD *)(a1 + 1504), v11, v14[0]); } return v12; }
ma_decrypt: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV EAX,R9D MOV EBX,R8D MOV R8,RSI MOV R14,RDI MOV R9D,dword ptr [RBP + 0x18] MOV R11,qword ptr [RBP + 0x10] LEA R10,[RBP + -0x24] MOV dword ptr [R10],0x0 MOV R15D,dword ptr [RSI + 0x60] SUB RSP,0x8 MOV RDI,RDX MOV ESI,EBX MOV RDX,RCX MOV RCX,R10 PUSH R11 PUSH RAX PUSH R15 CALL 0x00130be6 ADD RSP,0x20 MOV R12D,EAX TEST EAX,EAX JNZ 0x001723fe XOR R15D,R15D CMP dword ptr [RBP + -0x24],EBX JZ 0x00172448 LAB_001723fe: CALL 0x001a319a MOV dword ptr [RAX],0xc0 MOV R15D,0x1 CMP byte ptr [R14 + 0x7ec],0x0 JNZ 0x00172448 MOV RCX,qword ptr [R14 + 0x5e0] MOV R9D,dword ptr [RBP + -0x24] SUB RSP,0x8 LEA RSI,[0x1dba24] MOV EDX,0x1040 MOV EDI,0xc0 MOV R8D,R12D XOR EAX,EAX PUSH RBX CALL 0x0019f899 ADD RSP,0x10 LAB_00172448: MOV EAX,R15D ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 ma_decrypt(long param_1,long param_2,int8 param_3,int8 param_4,int param_5, int4 param_6,int8 param_7,int4 param_8) { int iVar1; int4 *puVar2; int8 uVar3; int local_2c; local_2c = 0; iVar1 = encryption_scheme_decrypt (param_3,param_5,param_4,&local_2c,param_2,param_8, *(int4 *)(param_2 + 0x60),param_6,param_7); if ((iVar1 != 0) || (uVar3 = 0, local_2c != param_5)) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0xc0; uVar3 = 1; if (*(char *)(param_1 + 0x7ec) == '\0') { my_printf_error(0xc0,"failed to decrypt \'%s\' rc: %d dstlen: %u size: %u\n",0x1040, *(int8 *)(param_1 + 0x5e0),iVar1,local_2c,param_5); } } return uVar3; }
28,622
ma_remove_table_from_trnman
eloqsql/storage/maria/ma_state.c
void _ma_remove_table_from_trnman(MARIA_HA *info) { MARIA_SHARE *share= info->s; TRN *trn= info->trn; MARIA_USED_TABLES *tables, **prev; DBUG_ENTER("_ma_remove_table_from_trnman"); DBUG_PRINT("enter", ("trn: %p used_tables: %p share: %p in_trans: %d", trn, trn->used_tables, share, share->in_trans)); mysql_mutex_assert_owner(&share->intern_lock); if (trn == &dummy_transaction_object) DBUG_VOID_RETURN; /* First remove share from used_tables */ for (prev= (MARIA_USED_TABLES**) (char*) &trn->used_tables; (tables= *prev); prev= &tables->next) { if (tables->share == share) { *prev= tables->next; /* We don't have to and can't call decrement_share_in_trans(share) here as we know there is an active MARIA_HA handler around. */ share->in_trans--; my_free(tables); break; } } if (!tables) { /* This can only happens in case of rename of intermediate table as part of alter table */ DBUG_PRINT("warning", ("share: %p where not in used_tables_list", share)); } /* Reset trn and remove table from used_instances */ _ma_reset_trn_for_table(info); DBUG_VOID_RETURN; }
O0
c
ma_remove_table_from_trnman: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) jmp 0x2cf05 jmp 0x2cf07 jmp 0x2cf09 leaq 0x480050(%rip), %rax # 0x4acf60 cmpq %rax, -0x18(%rbp) jne 0x2cf1a jmp 0x2cf18 jmp 0x2cf95 movq -0x18(%rbp), %rax addq $0x58, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0x2cf7d movq -0x20(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x10(%rbp), %rax jne 0x2cf71 movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movl 0x7ac(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x7ac(%rax) movq -0x20(%rbp), %rdi callq 0x11fa10 jmp 0x2cf7d jmp 0x2cf73 movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x2cf26 cmpq $0x0, -0x20(%rbp) jne 0x2cf8a jmp 0x2cf86 jmp 0x2cf88 jmp 0x2cf8a movq -0x8(%rbp), %rdi callq 0x2cfa0 jmp 0x2cf95 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_remove_table_from_trnman: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax jmp short $+2 loc_2CF05: jmp short $+2 loc_2CF07: jmp short $+2 loc_2CF09: lea rax, dummy_transaction_object cmp [rbp+var_18], rax jnz short loc_2CF1A jmp short $+2 loc_2CF18: jmp short loc_2CF95 loc_2CF1A: mov rax, [rbp+var_18] add rax, 58h ; 'X' mov [rbp+var_28], rax loc_2CF26: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax cmp rax, 0 jz short loc_2CF7D mov rax, [rbp+var_20] mov rax, [rax+8] cmp rax, [rbp+var_10] jnz short loc_2CF71 mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_10] mov ecx, [rax+7ACh] add ecx, 0FFFFFFFFh mov [rax+7ACh], ecx mov rdi, [rbp+var_20] call my_free jmp short loc_2CF7D loc_2CF71: jmp short $+2 loc_2CF73: mov rax, [rbp+var_20] mov [rbp+var_28], rax jmp short loc_2CF26 loc_2CF7D: cmp [rbp+var_20], 0 jnz short loc_2CF8A jmp short $+2 loc_2CF86: jmp short $+2 loc_2CF88: jmp short $+2 loc_2CF8A: mov rdi, [rbp+var_8] call _ma_reset_trn_for_table jmp short $+2 loc_2CF95: add rsp, 30h pop rbp retn
void * ma_remove_table_from_trnman(long long *a1) { void *result; // rax _QWORD *i; // [rsp+8h] [rbp-28h] _QWORD *v3; // [rsp+10h] [rbp-20h] char *v4; // [rsp+18h] [rbp-18h] long long v5; // [rsp+20h] [rbp-10h] v5 = *a1; v4 = (char *)a1[1]; result = &dummy_transaction_object; if ( v4 != (char *)&dummy_transaction_object ) { for ( i = v4 + 88; ; i = (_QWORD *)*i ) { v3 = (_QWORD *)*i; if ( !*i ) break; if ( v3[1] == v5 ) { *i = *v3; --*(_DWORD *)(v5 + 1964); my_free(v3); return (void *)ma_reset_trn_for_table(a1); } } return (void *)ma_reset_trn_for_table(a1); } return result; }
_ma_remove_table_from_trnman: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX JMP 0x0012cf05 LAB_0012cf05: JMP 0x0012cf07 LAB_0012cf07: JMP 0x0012cf09 LAB_0012cf09: LEA RAX,[0x5acf60] CMP qword ptr [RBP + -0x18],RAX JNZ 0x0012cf1a JMP 0x0012cf18 LAB_0012cf18: JMP 0x0012cf95 LAB_0012cf1a: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x58 MOV qword ptr [RBP + -0x28],RAX LAB_0012cf26: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x0012cf7d MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0012cf71 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x7ac] ADD ECX,-0x1 MOV dword ptr [RAX + 0x7ac],ECX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0021fa10 JMP 0x0012cf7d LAB_0012cf71: JMP 0x0012cf73 LAB_0012cf73: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX JMP 0x0012cf26 LAB_0012cf7d: CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0012cf8a JMP 0x0012cf86 LAB_0012cf86: JMP 0x0012cf88 LAB_0012cf88: JMP 0x0012cf8a LAB_0012cf8a: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012cfa0 JMP 0x0012cf95 LAB_0012cf95: ADD RSP,0x30 POP RBP RET
void _ma_remove_table_from_trnman(long *param_1) { long lVar1; long *plVar2; long *local_30; lVar1 = *param_1; if ((int1 *)param_1[1] != dummy_transaction_object) { plVar2 = (long *)((int1 *)param_1[1] + 0x58); do { local_30 = plVar2; plVar2 = (long *)*local_30; if (plVar2 == (long *)0x0) goto LAB_0012cf8a; } while (plVar2[1] != lVar1); *local_30 = *plVar2; *(int *)(lVar1 + 0x7ac) = *(int *)(lVar1 + 0x7ac) + -1; my_free(plVar2); LAB_0012cf8a: _ma_reset_trn_for_table(param_1); } return; }
28,623
LefDefParser::defiPinProp::propValue(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinProp.cpp
const char* defiPinProp::propValue(int index) const { char msg[160]; if (index < 0 || index >= numProps_) { sprintf (msg, "ERROR (DEFPARS-6120): The index number %d specified for the PIN PROPERTY is invalide.\nValid index number is from 0 to %d. Specify a valid index number and then try again.", index, numProps_); defiError(0, 6120, msg, defData); return 0; } return propValues_[index]; }
O3
cpp
LefDefParser::defiPinProp::propValue(int) const: pushq %r15 pushq %r14 pushq %rbx subq $0xa0, %rsp movl %esi, %edx movq %rdi, %r14 testl %esi, %esi setns %al movl 0x20(%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0x252fa movq 0x30(%r14), %rax movl %edx, %ecx movq (%rax,%rcx,8), %rbx jmp 0x25323 leaq 0x1dbc3(%rip), %rsi # 0x42ec4 xorl %ebx, %ebx movq %rsp, %r15 movq %r15, %rdi xorl %eax, %eax callq 0x6060 movq 0x48(%r14), %rcx xorl %edi, %edi movl $0x17e8, %esi # imm = 0x17E8 movq %r15, %rdx callq 0x18f80 movq %rbx, %rax addq $0xa0, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZNK12LefDefParser11defiPinProp9propValueEi: push r15 push r14 push rbx sub rsp, 0A0h mov edx, esi mov r14, rdi test esi, esi setns al mov ecx, [rdi+20h] cmp ecx, esi setnle sil test al, sil jz short loc_252FA mov rax, [r14+30h] mov ecx, edx mov rbx, [rax+rcx*8] jmp short loc_25323 loc_252FA: lea rsi, aErrorDefpars61_3; "ERROR (DEFPARS-6120): The index number "... xor ebx, ebx mov r15, rsp mov rdi, r15 xor eax, eax call _sprintf mov rcx, [r14+48h]; LefDefParser::defrData * xor edi, edi; this mov esi, 17E8h; int mov rdx, r15; char * call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) loc_25323: mov rax, rbx add rsp, 0A0h pop rbx pop r14 pop r15 retn
long long LefDefParser::defiPinProp::propValue(LefDefParser::defiPinProp *this, signed int a2) { int v2; // ecx long long v3; // rbx LefDefParser::defrData *v4; // r8 char v6[184]; // [rsp+0h] [rbp-B8h] BYREF v2 = *((_DWORD *)this + 8); if ( v2 > a2 && a2 >= 0 ) return *(_QWORD *)(*((_QWORD *)this + 6) + 8LL * (unsigned int)a2); v3 = 0LL; sprintf( v6, "ERROR (DEFPARS-6120): The index number %d specified for the PIN PROPERTY is invalide.\n" "Valid index number is from 0 to %d. Specify a valid index number and then try again.", a2, v2); LefDefParser::defiError(0LL, 6120, v6, *((LefDefParser::defrData **)this + 9), v4); return v3; }
propValue: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa0 MOV EDX,ESI MOV R14,RDI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI + 0x20] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x001252fa MOV RAX,qword ptr [R14 + 0x30] MOV ECX,EDX MOV RBX,qword ptr [RAX + RCX*0x8] JMP 0x00125323 LAB_001252fa: LEA RSI,[0x142ec4] XOR EBX,EBX MOV R15,RSP MOV RDI,R15 XOR EAX,EAX CALL 0x00106060 MOV RCX,qword ptr [R14 + 0x48] XOR EDI,EDI MOV ESI,0x17e8 MOV RDX,R15 CALL 0x00118f80 LAB_00125323: MOV RAX,RBX ADD RSP,0xa0 POP RBX POP R14 POP R15 RET
/* LefDefParser::defiPinProp::propValue(int) const */ int8 __thiscall LefDefParser::defiPinProp::propValue(defiPinProp *this,int param_1) { int8 uVar1; char acStack_b8 [160]; if (param_1 < 0 || *(int *)(this + 0x20) <= param_1) { uVar1 = 0; sprintf(acStack_b8, "ERROR (DEFPARS-6120): The index number %d specified for the PIN PROPERTY is invalide.\nValid index number is from 0 to %d. Specify a valid index number and then try again." ); defiError(0,0x17e8,acStack_b8,*(defrData **)(this + 0x48)); } else { uVar1 = *(int8 *)(*(long *)(this + 0x30) + (ulong)(uint)param_1 * 8); } return uVar1; }
28,624
ulight::css::match_escaped_code_point(std::basic_string_view<char8_t, std::char_traits<char8_t>>)
ulight/src/main/cpp/css.cpp
std::size_t match_escaped_code_point(std::u8string_view str) { // https://www.w3.org/TR/css-syntax-3/#consume-escaped-code-point if (str.empty()) { return 0; } std::size_t length = 0; while (is_ascii_hex_digit(str[length]) && length < 6 && length < str.length()) { ++length; } if (length != 0) { if (length < str.length() && is_css_whitespace(str[length])) { ++length; } return length; } return std::size_t(utf8::sequence_length(str[0])); }
O0
cpp
ulight::css::match_escaped_code_point(std::basic_string_view<char8_t, std::char_traits<char8_t>>): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x10(%rbp) leaq -0x18(%rbp), %rdi callq 0xb8a0 testb $0x1, %al jne 0xe50f jmp 0xe51c movq $0x0, -0x8(%rbp) jmp 0xe5fb movq $0x0, -0x20(%rbp) movq -0x20(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0xb8f0 movzbl (%rax), %edi callq 0xfb80 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, -0x21(%rbp) jne 0xe547 jmp 0xe574 xorl %eax, %eax cmpq $0x6, -0x20(%rbp) movb %al, -0x21(%rbp) jae 0xe574 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) leaq -0x18(%rbp), %rdi callq 0x7320 movq %rax, %rcx movq -0x30(%rbp), %rax cmpq %rcx, %rax setb %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0xe57d jmp 0xe58b movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0xe524 cmpq $0x0, -0x20(%rbp) je 0xe5e0 movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x18(%rbp), %rdi callq 0x7320 movq %rax, %rcx movq -0x38(%rbp), %rax cmpq %rcx, %rax jae 0xe5d6 movq -0x20(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0xb8f0 movzbl (%rax), %edi callq 0xfbb0 testb $0x1, %al jne 0xe5ca jmp 0xe5d6 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xe5fb leaq -0x18(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xb8f0 movzbl (%rax), %edi callq 0xc870 cltq movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN6ulight3css24match_escaped_code_pointESt17basic_string_viewIDuSt11char_traitsIDuEE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_18], rdi mov [rbp+var_10], rsi lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE5emptyEv; std::u8string_view::empty(void) test al, 1 jnz short loc_E50F jmp short loc_E51C loc_E50F: mov [rbp+var_8], 0 jmp loc_E5FB loc_E51C: mov [rbp+var_20], 0 loc_E524: mov rsi, [rbp+var_20] lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEEixEm; std::u8string_view::operator[](ulong) movzx edi, byte ptr [rax] call _ZN6ulight18is_ascii_hex_digitEDu; ulight::is_ascii_hex_digit(char8_t) mov cl, al xor eax, eax test cl, 1 mov [rbp+var_21], al jnz short loc_E547 jmp short loc_E574 loc_E547: xor eax, eax cmp [rbp+var_20], 6 mov [rbp+var_21], al jnb short loc_E574 mov rax, [rbp+var_20] mov [rbp+var_30], rax lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6lengthEv; std::u8string_view::length(void) mov rcx, rax mov rax, [rbp+var_30] cmp rax, rcx setb al mov [rbp+var_21], al loc_E574: mov al, [rbp+var_21] test al, 1 jnz short loc_E57D jmp short loc_E58B loc_E57D: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_E524 loc_E58B: cmp [rbp+var_20], 0 jz short loc_E5E0 mov rax, [rbp+var_20] mov [rbp+var_38], rax lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6lengthEv; std::u8string_view::length(void) mov rcx, rax mov rax, [rbp+var_38] cmp rax, rcx jnb short loc_E5D6 mov rsi, [rbp+var_20] lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEEixEm; std::u8string_view::operator[](ulong) movzx edi, byte ptr [rax] call _ZN6ulight17is_css_whitespaceEDu; ulight::is_css_whitespace(char8_t) test al, 1 jnz short loc_E5CA jmp short loc_E5D6 loc_E5CA: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax loc_E5D6: mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp short loc_E5FB loc_E5E0: lea rdi, [rbp+var_18] xor eax, eax mov esi, eax call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEEixEm; std::u8string_view::operator[](ulong) movzx edi, byte ptr [rax] call _ZN6ulight4utf815sequence_lengthEDu; ulight::utf8::sequence_length(char8_t) cdqe mov [rbp+var_8], rax loc_E5FB: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
unsigned long long ulight::css::match_escaped_code_point(long long a1, long long a2) { unsigned __int8 *v2; // rax unsigned __int8 *v3; // rax unsigned __int8 *v4; // rax bool v6; // [rsp+1Fh] [rbp-21h] unsigned long long i; // [rsp+20h] [rbp-20h] _QWORD v8[2]; // [rsp+28h] [rbp-18h] BYREF v8[0] = a1; v8[1] = a2; if ( std::u8string_view::empty(v8) ) return 0LL; for ( i = 0LL; ; ++i ) { v2 = (unsigned __int8 *)std::u8string_view::operator[]((long long)v8, i); v6 = 0; if ( (ulight::is_ascii_hex_digit(*v2) & 1) != 0 ) { v6 = 0; if ( i < 6 ) v6 = i < std::u8string_view::length((long long)v8); } if ( !v6 ) break; } if ( i ) { if ( i < std::u8string_view::length((long long)v8) ) { v3 = (unsigned __int8 *)std::u8string_view::operator[]((long long)v8, i); if ( (ulight::is_css_whitespace(*v3) & 1) != 0 ) ++i; } return i; } else { v4 = (unsigned __int8 *)std::u8string_view::operator[]((long long)v8, 0LL); return (int)ulight::utf8::sequence_length(*v4); } }
match_escaped_code_point: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x10],RSI LEA RDI,[RBP + -0x18] CALL 0x0010b8a0 TEST AL,0x1 JNZ 0x0010e50f JMP 0x0010e51c LAB_0010e50f: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0010e5fb LAB_0010e51c: MOV qword ptr [RBP + -0x20],0x0 LAB_0010e524: MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x18] CALL 0x0010b8f0 MOVZX EDI,byte ptr [RAX] CALL 0x0010fb80 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RBP + -0x21],AL JNZ 0x0010e547 JMP 0x0010e574 LAB_0010e547: XOR EAX,EAX CMP qword ptr [RBP + -0x20],0x6 MOV byte ptr [RBP + -0x21],AL JNC 0x0010e574 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x18] CALL 0x00107320 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,RCX SETC AL MOV byte ptr [RBP + -0x21],AL LAB_0010e574: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x0010e57d JMP 0x0010e58b LAB_0010e57d: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0010e524 LAB_0010e58b: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0010e5e0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX LEA RDI,[RBP + -0x18] CALL 0x00107320 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,RCX JNC 0x0010e5d6 MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x18] CALL 0x0010b8f0 MOVZX EDI,byte ptr [RAX] CALL 0x0010fbb0 TEST AL,0x1 JNZ 0x0010e5ca JMP 0x0010e5d6 LAB_0010e5ca: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX LAB_0010e5d6: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x0010e5fb LAB_0010e5e0: LEA RDI,[RBP + -0x18] XOR EAX,EAX MOV ESI,EAX CALL 0x0010b8f0 MOVZX EDI,byte ptr [RAX] CALL 0x0010c870 CDQE MOV qword ptr [RBP + -0x8],RAX LAB_0010e5fb: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
/* ulight::css::match_escaped_code_point(std::basic_string_view<char8_t, std::char_traits<char8_t> >) */ ulong __thiscall ulight::css::match_escaped_code_point(css *this,int8 param_2) { uint uVar1; int iVar2; ulong uVar3; uchar *puVar4; bool bVar5; ulong local_28; css *local_20; int8 local_18; ulong local_10; local_20 = this; local_18 = param_2; uVar3 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::empty ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20); if ((uVar3 & 1) == 0) { local_28 = 0; while( true ) { puVar4 = (uchar *)std::basic_string_view<char8_t,std::char_traits<char8_t>>::operator[] ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20 ,local_28); uVar1 = is_ascii_hex_digit(*puVar4); bVar5 = false; if (((uVar1 & 1) != 0) && (bVar5 = false, local_28 < 6)) { uVar3 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::length ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20); bVar5 = local_28 < uVar3; } if (!bVar5) break; local_28 = local_28 + 1; } if (local_28 == 0) { puVar4 = (uchar *)std::basic_string_view<char8_t,std::char_traits<char8_t>>::operator[] ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20 ,0); iVar2 = utf8::sequence_length(*puVar4); local_10 = (ulong)iVar2; } else { uVar3 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::length ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20); if (local_28 < uVar3) { puVar4 = (uchar *)std::basic_string_view<char8_t,std::char_traits<char8_t>>::operator[] ((basic_string_view<char8_t,std::char_traits<char8_t>> *) &local_20,local_28); uVar3 = is_css_whitespace(*puVar4); if ((uVar3 & 1) != 0) { local_28 = local_28 + 1; } } local_10 = local_28; } } else { local_10 = 0; } return local_10; }
28,625
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"; }
O3
cpp
minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type): pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) cmpl $0x12, %esi ja 0xa78c9 movl %esi, %eax leaq 0x55361(%rip), %rcx # 0xfcad0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x560ea(%rip), %rsi # 0xfd869 leaq 0x560e7(%rip), %rdx # 0xfd86d jmp 0xa78d7 leaq 0x56461(%rip), %rsi # 0xfdbf3 leaq 0x56463(%rip), %rdx # 0xfdbfc jmp 0xa78d7 leaq 0x56421(%rip), %rsi # 0xfdbc6 leaq 0x56422(%rip), %rdx # 0xfdbce jmp 0xa78d7 leaq 0x563e4(%rip), %rsi # 0xfdb9c leaq 0x563e3(%rip), %rdx # 0xfdba2 jmp 0xa78d7 leaq 0x562db(%rip), %rsi # 0xfdaa6 leaq 0x562d8(%rip), %rdx # 0xfdaaa jmp 0xa78d7 leaq 0x57448(%rip), %rsi # 0xfec26 leaq 0x57448(%rip), %rdx # 0xfec2d jmp 0xa78d7 leaq 0x56340(%rip), %rsi # 0xfdb31 leaq 0x56346(%rip), %rdx # 0xfdb3e jmp 0xa78d7 leaq 0x4e2a5(%rip), %rsi # 0xf5aa9 leaq 0x4e2a0(%rip), %rdx # 0xf5aab jmp 0xa78d7 leaq 0x563df(%rip), %rsi # 0xfdbf6 leaq 0x563de(%rip), %rdx # 0xfdbfc jmp 0xa78d7 leaq 0x562a2(%rip), %rsi # 0xfdacc leaq 0x5629f(%rip), %rdx # 0xfdad0 jmp 0xa78d7 leaq 0x562ed(%rip), %rsi # 0xfdb2a leaq 0x562ec(%rip), %rdx # 0xfdb30 jmp 0xa78d7 leaq 0x5644d(%rip), %rsi # 0xfdc9d leaq 0x56450(%rip), %rdx # 0xfdca7 jmp 0xa78d7 leaq 0x5639d(%rip), %rsi # 0xfdbfd leaq 0x5639b(%rip), %rdx # 0xfdc02 jmp 0xa78d7 leaq 0x56261(%rip), %rsi # 0xfdad1 leaq 0x5625f(%rip), %rdx # 0xfdad6 jmp 0xa78d7 leaq 0x56349(%rip), %rsi # 0xfdbc9 leaq 0x56347(%rip), %rdx # 0xfdbce jmp 0xa78d7 leaq 0x5629d(%rip), %rsi # 0xfdb2d leaq 0x56299(%rip), %rdx # 0xfdb30 jmp 0xa78d7 leaq 0x56363(%rip), %rsi # 0xfdc03 leaq 0x56364(%rip), %rdx # 0xfdc0b jmp 0xa78d7 leaq 0x5b426(%rip), %rsi # 0x102cd6 leaq 0x5b422(%rip), %rdx # 0x102cd9 jmp 0xa78d7 leaq 0x56274(%rip), %rsi # 0xfdb34 leaq 0x56277(%rip), %rdx # 0xfdb3e jmp 0xa78d7 leaq 0x5735e(%rip), %rsi # 0xfec2e leaq 0x5735e(%rip), %rdx # 0xfec35 movq %rbx, %rdi callq 0x2d630 movq %rbx, %rax popq %rbx retq
_ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE: push rbx mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax cmp esi, 12h; switch 19 cases ja def_A7776; jumptable 00000000000A7776 default case mov eax, esi lea rcx, jpt_A7776 movsxd rax, ds:(jpt_A7776 - 0FCAD0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_A7778: lea rsi, aText; jumptable 00000000000A7776 case 0 lea rdx, aText+4; "" jmp loc_A78D7 loc_A778B: lea rsi, aEndfilter; jumptable 00000000000A7776 case 16 lea rdx, aEndfilter+9; "" jmp loc_A78D7 loc_A779E: lea rsi, aEndmacro; jumptable 00000000000A7776 case 14 lea rdx, aEndmacro+8; "" jmp loc_A78D7 loc_A77B1: lea rsi, aEndset; jumptable 00000000000A7776 case 11 lea rdx, aEndset+6; "" jmp loc_A78D7 loc_A77C4: lea rsi, aElif; jumptable 00000000000A7776 case 4 lea rdx, aElif+4; "" jmp loc_A78D7 loc_A77D7: lea rsi, aComment; jumptable 00000000000A7776 case 12 lea rdx, aComment+7; "" jmp loc_A78D7 loc_A77EA: lea rsi, aEndgeneration; jumptable 00000000000A7776 case 9 lea rdx, aEndgeneration+0Dh; "" jmp loc_A78D7 loc_A77FD: lea rsi, aIf+1; jumptable 00000000000A7776 case 2 lea rdx, aIf+3; "" jmp loc_A78D7 loc_A7810: lea rsi, aEndfilter+3; jumptable 00000000000A7776 case 15 lea rdx, aEndfilter+9; "" jmp loc_A78D7 loc_A7823: lea rsi, aElse; jumptable 00000000000A7776 case 3 lea rdx, aElse+4; "" jmp loc_A78D7 loc_A7836: lea rsi, aEndfor; jumptable 00000000000A7776 case 7 lea rdx, aEndfor+6; "" jmp loc_A78D7 loc_A7849: lea rsi, aExpectedLeftSi_0+24h; jumptable 00000000000A7776 case 1 lea rdx, aExpectedLeftSi_0+2Eh; "" jmp short loc_A78D7 loc_A7859: lea rsi, aBreak; jumptable 00000000000A7776 case 17 lea rdx, aBreak+5; "" jmp short loc_A78D7 loc_A7869: lea rsi, aEndif; jumptable 00000000000A7776 case 5 lea rdx, aEndif+5; "" jmp short loc_A78D7 loc_A7879: lea rsi, aEndmacro+3; jumptable 00000000000A7776 case 13 lea rdx, aEndmacro+8; "" jmp short loc_A78D7 loc_A7889: lea rsi, aEndfor+3; jumptable 00000000000A7776 case 6 lea rdx, aEndfor+6; "" jmp short loc_A78D7 loc_A7899: lea rsi, aContinue; jumptable 00000000000A7776 case 18 lea rdx, aContinue+8; "" jmp short loc_A78D7 loc_A78A9: lea rsi, aAtLeastOneOfMi+2Fh; jumptable 00000000000A7776 case 10 lea rdx, aAtLeastOneOfMi+32h; "" jmp short loc_A78D7 loc_A78B9: lea rsi, aEndgeneration+3; jumptable 00000000000A7776 case 8 lea rdx, aEndgeneration+0Dh; "" jmp short loc_A78D7 def_A7776: lea rsi, aUnknown; jumptable 00000000000A7776 default case lea rdx, aUnknown+7; "" loc_A78D7: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx pop rbx retn
_QWORD * minja::TemplateToken::typeToString[abi:cxx11](_QWORD *a1, int a2) { char *v2; // rsi char *v3; // rdx *a1 = a1 + 2; switch ( a2 ) { case 0: v2 = "text"; v3 = (char *)""; break; case 1: v2 = (char *)"expression"; v3 = (char *)""; break; case 2: v2 = "if"; v3 = ""; break; case 3: v2 = "else"; v3 = ""; break; case 4: v2 = "elif"; v3 = ""; break; case 5: v2 = "endif"; v3 = ""; break; case 6: v2 = "for"; v3 = ""; break; case 7: v2 = "endfor"; v3 = ""; break; case 8: v2 = "generation"; v3 = ""; break; case 9: v2 = "endgeneration"; v3 = ""; break; case 10: v2 = (char *)"set"; v3 = (char *)""; break; case 11: v2 = "endset"; v3 = ""; break; case 12: v2 = "comment"; v3 = ""; break; case 13: v2 = "macro"; v3 = ""; break; case 14: v2 = "endmacro"; v3 = ""; break; case 15: v2 = "filter"; v3 = ""; break; case 16: v2 = "endfilter"; v3 = ""; break; case 17: v2 = "break"; v3 = ""; break; case 18: v2 = "continue"; v3 = ""; break; default: v2 = "Unknown"; v3 = ""; break; } std::string::_M_construct<char const*>((long long)a1, v2, (long long)v3); return a1; }
typeToString[abi:cxx11]: PUSH RBX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX CMP ESI,0x12 JA 0x001a78c9 MOV EAX,ESI LEA RCX,[0x1fcad0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RSI,[0x1fd869] LEA RDX,[0x1fd86d] JMP 0x001a78d7 caseD_10: LEA RSI,[0x1fdbf3] LEA RDX,[0x1fdbfc] JMP 0x001a78d7 caseD_e: LEA RSI,[0x1fdbc6] LEA RDX,[0x1fdbce] JMP 0x001a78d7 caseD_b: LEA RSI,[0x1fdb9c] LEA RDX,[0x1fdba2] JMP 0x001a78d7 caseD_4: LEA RSI,[0x1fdaa6] LEA RDX,[0x1fdaaa] JMP 0x001a78d7 caseD_c: LEA RSI,[0x1fec26] LEA RDX,[0x1fec2d] JMP 0x001a78d7 caseD_9: LEA RSI,[0x1fdb31] LEA RDX,[0x1fdb3e] JMP 0x001a78d7 caseD_2: LEA RSI,[0x1f5aa9] LEA RDX,[0x1f5aab] JMP 0x001a78d7 caseD_f: LEA RSI,[0x1fdbf6] LEA RDX,[0x1fdbfc] JMP 0x001a78d7 caseD_3: LEA RSI,[0x1fdacc] LEA RDX,[0x1fdad0] JMP 0x001a78d7 caseD_7: LEA RSI,[0x1fdb2a] LEA RDX,[0x1fdb30] JMP 0x001a78d7 caseD_1: LEA RSI,[0x1fdc9d] LEA RDX,[0x1fdca7] JMP 0x001a78d7 caseD_11: LEA RSI,[0x1fdbfd] LEA RDX,[0x1fdc02] JMP 0x001a78d7 caseD_5: LEA RSI,[0x1fdad1] LEA RDX,[0x1fdad6] JMP 0x001a78d7 caseD_d: LEA RSI,[0x1fdbc9] LEA RDX,[0x1fdbce] JMP 0x001a78d7 caseD_6: LEA RSI,[0x1fdb2d] LEA RDX,[0x1fdb30] JMP 0x001a78d7 caseD_12: LEA RSI,[0x1fdc03] LEA RDX,[0x1fdc0b] JMP 0x001a78d7 caseD_a: LEA RSI,[0x202cd6] LEA RDX,[0x202cd9] JMP 0x001a78d7 caseD_8: LEA RSI,[0x1fdb34] LEA RDX,[0x1fdb3e] JMP 0x001a78d7 default: LEA RSI,[0x1fec2e] LEA RDX,[0x1fec35] LAB_001a78d7: MOV RDI,RBX CALL 0x0012d630 MOV RAX,RBX POP RBX RET
/* minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type) */ TemplateToken * __thiscall minja::TemplateToken::typeToString_abi_cxx11_(TemplateToken *this,int4 param_2) { char *pcVar1; char *pcVar2; *(TemplateToken **)this = this + 0x10; switch(param_2) { case 0: pcVar2 = "text"; pcVar1 = ""; break; case 1: pcVar2 = "expression"; pcVar1 = ""; break; case 2: pcVar2 = "if"; pcVar1 = ""; break; case 3: pcVar2 = "else"; pcVar1 = ""; break; case 4: pcVar2 = "elif"; pcVar1 = ""; break; case 5: pcVar2 = "endif"; pcVar1 = ""; break; case 6: pcVar2 = "for"; pcVar1 = ""; break; case 7: pcVar2 = "endfor"; pcVar1 = ""; break; case 8: pcVar2 = "generation"; pcVar1 = ""; break; case 9: pcVar2 = "endgeneration"; pcVar1 = ""; break; case 10: pcVar2 = "set"; pcVar1 = ""; break; case 0xb: pcVar2 = "endset"; pcVar1 = ""; break; case 0xc: pcVar2 = "comment"; pcVar1 = ""; break; case 0xd: pcVar2 = "macro"; pcVar1 = ""; break; case 0xe: pcVar2 = "endmacro"; pcVar1 = ""; break; case 0xf: pcVar2 = "filter"; pcVar1 = ""; break; case 0x10: pcVar2 = "endfilter"; pcVar1 = ""; break; case 0x11: pcVar2 = "break"; pcVar1 = ""; break; case 0x12: pcVar2 = "continue"; pcVar1 = ""; break; default: pcVar2 = "Unknown"; pcVar1 = ""; } std::__cxx11::string::_M_construct<char_const*>(this,pcVar2,pcVar1); return this; }
28,626
queue_remove
eloqsql/mysys/queues.c
uchar *queue_remove(QUEUE *queue, uint idx) { uchar *element; DBUG_ASSERT(idx >= 1); DBUG_ASSERT(idx <= queue->elements); element= queue->root[idx]; queue->root[idx]= queue->root[queue->elements--]; queue_replace(queue, idx); return element; }
O3
c
queue_remove: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movl %esi, %ecx movq (%rax,%rcx,8), %rbx movl 0x10(%rdi), %edx leal -0x1(%rdx), %r8d movl %r8d, 0x10(%rdi) movq (%rax,%rdx,8), %rdx movq %rdx, (%rax,%rcx,8) callq 0xa3707 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
queue_remove: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov ecx, esi mov rbx, [rax+rcx*8] mov edx, [rdi+10h] lea r8d, [rdx-1] mov [rdi+10h], r8d mov rdx, [rax+rdx*8] mov [rax+rcx*8], rdx call queue_replace mov rax, rbx add rsp, 8 pop rbx pop rbp retn
long long queue_remove(long long *a1, unsigned int a2) { long long v2; // rax long long v3; // rbx long long v4; // rdx v2 = *a1; v3 = *(_QWORD *)(*a1 + 8LL * a2); v4 = *((unsigned int *)a1 + 4); *((_DWORD *)a1 + 4) = v4 - 1; *(_QWORD *)(v2 + 8LL * a2) = *(_QWORD *)(v2 + 8 * v4); queue_replace(a1); return v3; }
queue_remove: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV ECX,ESI MOV RBX,qword ptr [RAX + RCX*0x8] MOV EDX,dword ptr [RDI + 0x10] LEA R8D,[RDX + -0x1] MOV dword ptr [RDI + 0x10],R8D MOV RDX,qword ptr [RAX + RDX*0x8] MOV qword ptr [RAX + RCX*0x8],RDX CALL 0x001a3707 MOV RAX,RBX ADD RSP,0x8 POP RBX POP RBP RET
int8 queue_remove(long *param_1,uint param_2) { uint uVar1; long lVar2; int8 uVar3; lVar2 = *param_1; uVar3 = *(int8 *)(lVar2 + (ulong)param_2 * 8); uVar1 = *(uint *)(param_1 + 2); *(uint *)(param_1 + 2) = uVar1 - 1; *(int8 *)(lVar2 + (ulong)param_2 * 8) = *(int8 *)(lVar2 + (ulong)uVar1 * 8); queue_replace(); return uVar3; }
28,627
testing::internal::SuiteApiResolver<CustomAllocTest>::GetTearDownCaseOrSuite(char const*, int)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h
static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite(const char* filename, int line_num) { #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ SetUpTearDownSuiteFuncType test_case_fp = GetNotDefaultOrNull(&T::TearDownTestCase, &Test::TearDownTestCase); SetUpTearDownSuiteFuncType test_suite_fp = GetNotDefaultOrNull(&T::TearDownTestSuite, &Test::TearDownTestSuite); GTEST_CHECK_(!test_case_fp || !test_suite_fp) << "Test can not provide both TearDownTestSuite and TearDownTestCase," " please make sure there is only one present at" << filename << ":" << line_num; return test_case_fp != nullptr ? test_case_fp : test_suite_fp; #else (void)(filename); (void)(line_num); return &T::TearDownTestSuite; #endif }
O1
c
testing::internal::SuiteApiResolver<CustomAllocTest>::GetTearDownCaseOrSuite(char const*, int): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movl %esi, %ebx movq %rdi, %r14 movl $0x1, %edi callq 0x150b2 testb %al, %al jne 0xef5b leaq 0x31723(%rip), %rdx # 0x405ce leaq 0xc(%rsp), %rdi movl $0x3, %esi movl $0x223, %ecx # imm = 0x223 callq 0x1b13e movq 0x4b122(%rip), %rdi # 0x59fe8 leaq 0x31797(%rip), %rsi # 0x40664 movl $0x32, %edx callq 0x95a0 movq 0x4b10a(%rip), %r15 # 0x59fe8 leaq 0x3181d(%rip), %rsi # 0x40702 movl $0x6f, %edx movq %r15, %rdi callq 0x95a0 testq %r14, %r14 je 0xef13 movq %r14, %rdi callq 0x91f0 movq 0x4b0e2(%rip), %rdi # 0x59fe8 movq %r14, %rsi movq %rax, %rdx callq 0x95a0 jmp 0xef2b movq (%r15), %rax movq -0x18(%rax), %rax leaq (%r15,%rax), %rdi movl 0x20(%r15,%rax), %esi orl $0x1, %esi callq 0x9940 movq 0x4b0b6(%rip), %rdi # 0x59fe8 leaq 0x34ba3(%rip), %rsi # 0x43adc movl $0x1, %edx callq 0x95a0 movq 0x4b09e(%rip), %rdi # 0x59fe8 movl %ebx, %esi callq 0x9960 leaq 0xc(%rsp), %rdi callq 0x1b280 xorl %eax, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0xc(%rsp), %rdi callq 0x1b280 movq %rbx, %rdi callq 0x99a0
_ZN7testing8internal16SuiteApiResolverI15CustomAllocTestE22GetTearDownCaseOrSuiteEPKci: push r15 push r14 push rbx sub rsp, 10h mov ebx, esi mov r14, rdi mov edi, (offset dword_0+1); this call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool) test al, al jnz loc_EF5B lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+28h+var_1C] mov esi, 3 mov ecx, 223h call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aConditionTestC; "Condition !test_case_fp || !test_suite_"... mov edx, 32h ; '2' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r15, cs:_ZSt4cerr_ptr lea rsi, aTestCanNotProv_0; "Test can not provide both TearDownTestS"... mov edx, 6Fh ; 'o' mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r14, r14 jz short loc_EF13 mov rdi, r14 call _strlen mov rdi, cs:_ZSt4cerr_ptr mov rsi, r14 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_EF2B loc_EF13: mov rax, [r15] mov rax, [rax-18h] lea rdi, [r15+rax] mov esi, [r15+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_EF2B: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aTrace+6; ":" mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, cs:_ZSt4cerr_ptr mov esi, ebx call __ZNSolsEi; std::ostream::operator<<(int) lea rdi, [rsp+28h+var_1C]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() loc_EF5B: xor eax, eax add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_4]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() mov rdi, rbx call __Unwind_Resume
long long testing::internal::SuiteApiResolver<CustomAllocTest>::GetTearDownCaseOrSuite(long long a1, BOOL a2) { long long v2; // rax _BYTE v4[28]; // [rsp+Ch] [rbp-1Ch] BYREF if ( !(unsigned __int8)testing::internal::IsTrue((testing::internal *)((char *)&dword_0 + 1), a2) ) { testing::internal::GTestLog::GTestLog( v4, 3LL, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/incl" "ude/gtest/internal/gtest-internal.h", 547LL); std::__ostream_insert<char,std::char_traits<char>>( &std::cerr, "Condition !test_case_fp || !test_suite_fp failed. ", 50LL); std::__ostream_insert<char,std::char_traits<char>>( &std::cerr, "Test can not provide both TearDownTestSuite and TearDownTestCase, please make sure there is only one present at", 111LL); if ( a1 ) { v2 = strlen(a1); std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, a1, v2); } else { std::ios::clear( (char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL), *(_DWORD *)((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL) + 32) | 1u); } std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, ":", 1LL); std::ostream::operator<<(&std::cerr, a2); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v4); } return 0LL; }
GetTearDownCaseOrSuite: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV EBX,ESI MOV R14,RDI MOV EDI,0x1 CALL 0x001150b2 TEST AL,AL JNZ 0x0010ef5b LEA RDX,[0x1405ce] LEA RDI,[RSP + 0xc] MOV ESI,0x3 MOV ECX,0x223 CALL 0x0011b13e LAB_0010eebf: MOV RDI,qword ptr [0x00159fe8] LEA RSI,[0x140664] MOV EDX,0x32 CALL 0x001095a0 MOV R15,qword ptr [0x00159fe8] LEA RSI,[0x140702] MOV EDX,0x6f MOV RDI,R15 CALL 0x001095a0 TEST R14,R14 JZ 0x0010ef13 MOV RDI,R14 CALL 0x001091f0 MOV RDI,qword ptr [0x00159fe8] MOV RSI,R14 MOV RDX,RAX CALL 0x001095a0 JMP 0x0010ef2b LAB_0010ef13: MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[R15 + RAX*0x1] MOV ESI,dword ptr [R15 + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x00109940 LAB_0010ef2b: MOV RDI,qword ptr [0x00159fe8] LEA RSI,[0x143adc] MOV EDX,0x1 CALL 0x001095a0 MOV RDI,qword ptr [0x00159fe8] MOV ESI,EBX CALL 0x00109960 LAB_0010ef51: LEA RDI,[RSP + 0xc] CALL 0x0011b280 LAB_0010ef5b: XOR EAX,EAX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* testing::internal::SuiteApiResolver<CustomAllocTest>::GetTearDownCaseOrSuite(char const*, int) */ int8 testing::internal::SuiteApiResolver<CustomAllocTest>::GetTearDownCaseOrSuite (char *param_1,int param_2) { int *puVar1; char cVar2; size_t sVar3; GTestLog local_1c [4]; cVar2 = IsTrue(true); if (cVar2 == '\0') { GTestLog::GTestLog(local_1c,3, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h" ,0x223); /* try { // try from 0010eebf to 0010ef50 has its CatchHandler @ 0010ef67 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00159fe8,"Condition !test_case_fp || !test_suite_fp failed. ", 0x32); puVar1 = PTR_cerr_00159fe8; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00159fe8, "Test can not provide both TearDownTestSuite and TearDownTestCase, please make sure there is only one present at" ,0x6f); if (param_1 == (char *)0x0) { std::ios::clear(puVar1 + *(long *)(*(long *)puVar1 + -0x18), *(uint *)(puVar1 + *(long *)(*(long *)puVar1 + -0x18) + 0x20) | 1); } else { sVar3 = strlen(param_1); std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00159fe8,param_1,sVar3) ; } std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00159fe8,":",1); std::ostream::operator<<((ostream *)PTR_cerr_00159fe8,param_2); GTestLog::~GTestLog(local_1c); } return 0; }
28,628
google::protobuf::io::FileOutputStream::CopyingFileOutputStream::~CopyingFileOutputStream()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.cc
FileOutputStream::CopyingFileOutputStream::~CopyingFileOutputStream() { if (close_on_delete_) { if (!Close()) { GOOGLE_LOG(ERROR) << "close() failed: " << strerror(errno_); } } }
O3
cpp
google::protobuf::io::FileOutputStream::CopyingFileOutputStream::~CopyingFileOutputStream(): pushq %r14 pushq %rbx subq $0x48, %rsp leaq 0x14fdaa(%rip), %rax # 0x20bfa0 movq %rax, (%rdi) cmpb $0x1, 0xc(%rdi) jne 0xbc264 movq %rdi, %rbx callq 0xbc0f6 testb %al, %al jne 0xbc264 leaq 0xaf411(%rip), %rdx # 0x16b623 leaq 0x10(%rsp), %rdi movl $0x2, %esi movl $0xc2, %ecx callq 0x857c2 leaq 0xaf46b(%rip), %rsi # 0x16b698 leaq 0x10(%rsp), %rdi callq 0x852c0 movq %rax, %r14 movl 0x10(%rbx), %edi callq 0x2c4e0 movq %r14, %rdi movq %rax, %rsi callq 0x852c0 leaq 0xf(%rsp), %rdi movq %rax, %rsi callq 0x8539a leaq 0x10(%rsp), %rdi callq 0x857e0 addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rdi callq 0x33bfc
_ZN6google8protobuf2io16FileOutputStream23CopyingFileOutputStreamD2Ev: push r14 push rbx sub rsp, 48h lea rax, off_20BFA0 mov [rdi], rax cmp byte ptr [rdi+0Ch], 1 jnz short loc_BC264 mov rbx, rdi call _ZN6google8protobuf2io16FileOutputStream23CopyingFileOutputStream5CloseEv; google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Close(void) test al, al jnz short loc_BC264 lea rdx, aWorkspaceLlm4b_31; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+58h+var_48] mov esi, 2 mov ecx, 0C2h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCloseFailed; "close() failed: " lea rdi, [rsp+58h+var_48] call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov r14, rax mov edi, [rbx+10h] call _strerror mov rdi, r14 mov rsi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+58h+var_49] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_BC264: add rsp, 48h pop rbx pop r14 retn mov rdi, rax call __clang_call_terminate
void google::protobuf::io::FileOutputStream::CopyingFileOutputStream::~CopyingFileOutputStream( google::protobuf::io::FileOutputStream::CopyingFileOutputStream *this) { long long v1; // r14 long long v2; // rax google::protobuf::internal::LogMessage *v3; // rax char v4; // [rsp+Fh] [rbp-49h] BYREF _BYTE v5[72]; // [rsp+10h] [rbp-48h] BYREF *(_QWORD *)this = off_20BFA0; if ( *((_BYTE *)this + 12) == 1 && !google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Close(this) ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v5, 2, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.cc", 194); v1 = google::protobuf::internal::LogMessage::operator<<((long long)v5, (long long)"close() failed: "); v2 = strerror(*((unsigned int *)this + 4)); v3 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v1, v2); google::protobuf::internal::LogFinisher::operator=((long long)&v4, v3); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v5); } }
~CopyingFileOutputStream: PUSH R14 PUSH RBX SUB RSP,0x48 LEA RAX,[0x30bfa0] MOV qword ptr [RDI],RAX CMP byte ptr [RDI + 0xc],0x1 JNZ 0x001bc264 LAB_001bc1ff: MOV RBX,RDI CALL 0x001bc0f6 TEST AL,AL JNZ 0x001bc264 LEA RDX,[0x26b623] LEA RDI,[RSP + 0x10] MOV ESI,0x2 MOV ECX,0xc2 CALL 0x001857c2 LEA RSI,[0x26b698] LEA RDI,[RSP + 0x10] CALL 0x001852c0 MOV R14,RAX MOV EDI,dword ptr [RBX + 0x10] CALL 0x0012c4e0 MOV RDI,R14 MOV RSI,RAX CALL 0x001852c0 LEA RDI,[RSP + 0xf] MOV RSI,RAX CALL 0x0018539a LEA RDI,[RSP + 0x10] CALL 0x001857e0 LAB_001bc264: ADD RSP,0x48 POP RBX POP R14 RET
/* google::protobuf::io::FileOutputStream::CopyingFileOutputStream::~CopyingFileOutputStream() */ void __thiscall google::protobuf::io::FileOutputStream::CopyingFileOutputStream::~CopyingFileOutputStream (CopyingFileOutputStream *this) { char cVar1; LogMessage *pLVar2; char *pcVar3; LogFinisher local_49; LogMessage local_48 [56]; *(int ***)this = &PTR__CopyingFileOutputStream_0030bfa0; if (this[0xc] == (CopyingFileOutputStream)0x1) { /* try { // try from 001bc1ff to 001bc259 has its CatchHandler @ 001bc26c */ cVar1 = Close(this); if (cVar1 == '\0') { internal::LogMessage::LogMessage (local_48,2, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.cc" ,0xc2); pLVar2 = (LogMessage *)internal::LogMessage::operator<<(local_48,"close() failed: "); pcVar3 = strerror(*(int *)(this + 0x10)); pLVar2 = (LogMessage *)internal::LogMessage::operator<<(pLVar2,pcVar3); internal::LogFinisher::operator=(&local_49,pLVar2); internal::LogMessage::~LogMessage(local_48); } } return; }
28,629
lunasvg::SVGImageElement::fillBoundingBox() const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
Rect SVGImageElement::fillBoundingBox() const { LengthContext lengthContext(this); const Rect viewportRect = { lengthContext.valueForLength(m_x), lengthContext.valueForLength(m_y), lengthContext.valueForLength(m_width), lengthContext.valueForLength(m_height) }; return viewportRect; }
O0
cpp
lunasvg::SVGImageElement::fillBoundingBox() const: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x18(%rbp) movq -0x18(%rbp), %rsi movq %rsi, -0x48(%rbp) leaq -0x28(%rbp), %rdi movq %rdi, -0x40(%rbp) xorl %edx, %edx callq 0x20050 movq -0x48(%rbp), %rsi movq -0x40(%rbp), %rdi addq $0x98, %rsi callq 0x20080 movq -0x48(%rbp), %rsi movq -0x40(%rbp), %rdi movss %xmm0, -0x2c(%rbp) addq $0xb0, %rsi callq 0x20080 movq -0x48(%rbp), %rsi movq -0x40(%rbp), %rdi movss %xmm0, -0x34(%rbp) addq $0xc8, %rsi callq 0x20080 movq -0x48(%rbp), %rsi movq -0x40(%rbp), %rdi movss %xmm0, -0x30(%rbp) addq $0xe0, %rsi callq 0x20080 movss -0x34(%rbp), %xmm1 movss -0x30(%rbp), %xmm2 movaps %xmm0, %xmm3 movss -0x2c(%rbp), %xmm0 leaq -0x10(%rbp), %rdi callq 0x14ee0 movsd -0x10(%rbp), %xmm0 movsd -0x8(%rbp), %xmm1 addq $0x50, %rsp popq %rbp retq nopl (%rax)
_ZNK7lunasvg15SVGImageElement15fillBoundingBoxEv: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_18], rdi mov rsi, [rbp+var_18] mov [rbp+var_48], rsi lea rdi, [rbp+var_28] mov [rbp+var_40], rdi xor edx, edx call _ZN7lunasvg13LengthContextC2EPKNS_10SVGElementENS_5UnitsE; lunasvg::LengthContext::LengthContext(lunasvg::SVGElement const*,lunasvg::Units) mov rsi, [rbp+var_48] mov rdi, [rbp+var_40]; this add rsi, 98h; lunasvg::SVGLength * call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) mov rsi, [rbp+var_48] mov rdi, [rbp+var_40]; this movss [rbp+var_2C], xmm0 add rsi, 0B0h; lunasvg::SVGLength * call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) mov rsi, [rbp+var_48] mov rdi, [rbp+var_40]; this movss [rbp+var_34], xmm0 add rsi, 0C8h; lunasvg::SVGLength * call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) mov rsi, [rbp+var_48] mov rdi, [rbp+var_40]; this movss [rbp+var_30], xmm0 add rsi, 0E0h; lunasvg::SVGLength * call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movss xmm1, [rbp+var_34]; float movss xmm2, [rbp+var_30]; float movaps xmm3, xmm0; float movss xmm0, [rbp+var_2C]; float lea rdi, [rbp+var_10]; this call _ZN7lunasvg4RectC2Effff; lunasvg::Rect::Rect(float,float,float,float) movsd xmm0, [rbp+var_10] movsd xmm1, [rbp+var_8] add rsp, 50h pop rbp retn
double lunasvg::SVGImageElement::fillBoundingBox(lunasvg::SVGImageElement *this, float a2) { _BYTE v3[16]; // [rsp+28h] [rbp-28h] BYREF lunasvg::SVGImageElement *v4; // [rsp+38h] [rbp-18h] double v5; // [rsp+40h] [rbp-10h] BYREF v4 = this; lunasvg::LengthContext::LengthContext(v3, this, 0LL); lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v3, (lunasvg::SVGImageElement *)((char *)this + 152)); lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v3, (lunasvg::SVGImageElement *)((char *)this + 176)); lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v3, (lunasvg::SVGImageElement *)((char *)this + 200)); lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v3, (lunasvg::SVGImageElement *)((char *)this + 224)); lunasvg::Rect::Rect((lunasvg::Rect *)&v5, a2, a2, a2, a2); return v5; }
fillBoundingBox: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x18],RDI MOV RSI,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RSI LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0x40],RDI XOR EDX,EDX CALL 0x00120050 MOV RSI,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RBP + -0x40] ADD RSI,0x98 CALL 0x00120080 MOV RSI,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RBP + -0x40] MOVSS dword ptr [RBP + -0x2c],XMM0 ADD RSI,0xb0 CALL 0x00120080 MOV RSI,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RBP + -0x40] MOVSS dword ptr [RBP + -0x34],XMM0 ADD RSI,0xc8 CALL 0x00120080 MOV RSI,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RBP + -0x40] MOVSS dword ptr [RBP + -0x30],XMM0 ADD RSI,0xe0 CALL 0x00120080 MOVSS XMM1,dword ptr [RBP + -0x34] MOVSS XMM2,dword ptr [RBP + -0x30] MOVAPS XMM3,XMM0 MOVSS XMM0,dword ptr [RBP + -0x2c] LEA RDI,[RBP + -0x10] CALL 0x00114ee0 MOVSD XMM0,qword ptr [RBP + -0x10] MOVSD XMM1,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
/* lunasvg::SVGImageElement::fillBoundingBox() const */ int1 [16] __thiscall lunasvg::SVGImageElement::fillBoundingBox(SVGImageElement *this) { float fVar1; float fVar2; float fVar3; float fVar4; int1 auVar5 [16]; LengthContext local_30 [16]; SVGImageElement *local_20; Rect local_18 [16]; local_20 = this; LengthContext::LengthContext(local_30,this,0); fVar1 = (float)LengthContext::valueForLength(local_30,(SVGLength *)(this + 0x98)); fVar2 = (float)LengthContext::valueForLength(local_30,(SVGLength *)(this + 0xb0)); fVar3 = (float)LengthContext::valueForLength(local_30,(SVGLength *)(this + 200)); fVar4 = (float)LengthContext::valueForLength(local_30,(SVGLength *)(this + 0xe0)); Rect::Rect(local_18,fVar1,fVar2,fVar3,fVar4); auVar5[0] = local_18[0]; auVar5[1] = local_18[1]; auVar5[2] = local_18[2]; auVar5[3] = local_18[3]; auVar5[4] = local_18[4]; auVar5[5] = local_18[5]; auVar5[6] = local_18[6]; auVar5[7] = local_18[7]; auVar5[8] = local_18[8]; auVar5[9] = local_18[9]; auVar5[10] = local_18[10]; auVar5[0xb] = local_18[0xb]; auVar5[0xc] = local_18[0xc]; auVar5[0xd] = local_18[0xd]; auVar5[0xe] = local_18[0xe]; auVar5[0xf] = local_18[0xf]; return auVar5; }
28,630
lunasvg::SVGImageElement::fillBoundingBox() const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
Rect SVGImageElement::fillBoundingBox() const { LengthContext lengthContext(this); const Rect viewportRect = { lengthContext.valueForLength(m_x), lengthContext.valueForLength(m_y), lengthContext.valueForLength(m_width), lengthContext.valueForLength(m_height) }; return viewportRect; }
O1
cpp
lunasvg::SVGImageElement::fillBoundingBox() const: pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx leaq 0x38(%rsp), %r14 movq %rdi, (%r14) movb $0x0, 0x8(%r14) leaq 0xa4(%rdi), %rsi movzbl 0xa1(%rdi), %edx movq %r14, %rdi callq 0x1f7ea movaps %xmm0, 0x20(%rsp) leaq 0xbc(%rbx), %rsi movzbl 0xb9(%rbx), %edx movq %r14, %rdi callq 0x1f7ea movaps %xmm0, 0x10(%rsp) leaq 0xd4(%rbx), %rsi movzbl 0xd1(%rbx), %edx movq %r14, %rdi callq 0x1f7ea movaps %xmm0, (%rsp) movzbl 0xe9(%rbx), %edx addq $0xec, %rbx movq %r14, %rdi movq %rbx, %rsi callq 0x1f7ea movaps 0x20(%rsp), %xmm2 unpcklps 0x10(%rsp), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1] movaps (%rsp), %xmm1 unpcklps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] movaps %xmm2, %xmm0 addq $0x48, %rsp popq %rbx popq %r14 retq
_ZNK7lunasvg15SVGImageElement15fillBoundingBoxEv: push r14 push rbx sub rsp, 48h mov rbx, rdi lea r14, [rsp+58h+var_20] mov [r14], rdi mov byte ptr [r14+8], 0 lea rsi, [rdi+0A4h] movzx edx, byte ptr [rdi+0A1h] mov rdi, r14 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movaps [rsp+58h+var_38], xmm0 lea rsi, [rbx+0BCh] movzx edx, byte ptr [rbx+0B9h] mov rdi, r14 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movaps [rsp+58h+var_48], xmm0 lea rsi, [rbx+0D4h] movzx edx, byte ptr [rbx+0D1h] mov rdi, r14 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movaps [rsp+58h+var_58], xmm0 movzx edx, byte ptr [rbx+0E9h] add rbx, 0ECh mov rdi, r14 mov rsi, rbx call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movaps xmm2, [rsp+58h+var_38] unpcklps xmm2, [rsp+58h+var_48] movaps xmm1, [rsp+58h+var_58] unpcklps xmm1, xmm0 movaps xmm0, xmm2 add rsp, 48h pop rbx pop r14 retn
__m128 lunasvg::SVGImageElement::fillBoundingBox(lunasvg::SVGImageElement *this, __m128 a2) { __m128 v4; // [rsp+10h] [rbp-48h] __m128 v5; // [rsp+20h] [rbp-38h] lunasvg::SVGImageElement *v6; // [rsp+38h] [rbp-20h] BYREF char v7; // [rsp+40h] [rbp-18h] v6 = this; v7 = 0; *(double *)a2.m128_u64 = lunasvg::LengthContext::valueForLength( &v6, (char *)this + 164, *((unsigned __int8 *)this + 161)); v5 = a2; *(double *)a2.m128_u64 = lunasvg::LengthContext::valueForLength( &v6, (char *)this + 188, *((unsigned __int8 *)this + 185)); v4 = a2; lunasvg::LengthContext::valueForLength(&v6, (char *)this + 212, *((unsigned __int8 *)this + 209)); lunasvg::LengthContext::valueForLength(&v6, (char *)this + 236, *((unsigned __int8 *)this + 233)); return _mm_unpacklo_ps(v5, v4); }
fillBoundingBox: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RDI LEA R14,[RSP + 0x38] MOV qword ptr [R14],RDI MOV byte ptr [R14 + 0x8],0x0 LEA RSI,[RDI + 0xa4] MOVZX EDX,byte ptr [RDI + 0xa1] MOV RDI,R14 CALL 0x0011f7ea MOVAPS xmmword ptr [RSP + 0x20],XMM0 LEA RSI,[RBX + 0xbc] MOVZX EDX,byte ptr [RBX + 0xb9] MOV RDI,R14 CALL 0x0011f7ea MOVAPS xmmword ptr [RSP + 0x10],XMM0 LEA RSI,[RBX + 0xd4] MOVZX EDX,byte ptr [RBX + 0xd1] MOV RDI,R14 CALL 0x0011f7ea MOVAPS xmmword ptr [RSP],XMM0 MOVZX EDX,byte ptr [RBX + 0xe9] ADD RBX,0xec MOV RDI,R14 MOV RSI,RBX CALL 0x0011f7ea MOVAPS XMM2,xmmword ptr [RSP + 0x20] UNPCKLPS XMM2,xmmword ptr [RSP + 0x10] MOVAPS XMM1,xmmword ptr [RSP] UNPCKLPS XMM1,XMM0 MOVAPS XMM0,XMM2 ADD RSP,0x48 POP RBX POP R14 RET
/* lunasvg::SVGImageElement::fillBoundingBox() const */ int8 __thiscall lunasvg::SVGImageElement::fillBoundingBox(SVGImageElement *this) { int4 uVar1; int4 uVar2; SVGImageElement *local_20; int1 local_18; local_18 = 0; local_20 = this; uVar1 = LengthContext::valueForLength((LengthContext *)&local_20,this + 0xa4,this[0xa1]); uVar2 = LengthContext::valueForLength((LengthContext *)&local_20,this + 0xbc,this[0xb9]); LengthContext::valueForLength((LengthContext *)&local_20,this + 0xd4,this[0xd1]); LengthContext::valueForLength((LengthContext *)&local_20,this + 0xec,this[0xe9]); return CONCAT44(uVar2,uVar1); }
28,631
lunasvg::SVGImageElement::fillBoundingBox() const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
Rect SVGImageElement::fillBoundingBox() const { LengthContext lengthContext(this); const Rect viewportRect = { lengthContext.valueForLength(m_x), lengthContext.valueForLength(m_y), lengthContext.valueForLength(m_width), lengthContext.valueForLength(m_height) }; return viewportRect; }
O2
cpp
lunasvg::SVGImageElement::fillBoundingBox() const: pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %rbx leaq 0x38(%rsp), %r14 movq %rdi, (%r14) movb $0x0, 0x8(%r14) leaq 0x98(%rdi), %rsi movq %r14, %rdi callq 0x11c38 movaps %xmm0, 0x20(%rsp) leaq 0xb0(%rbx), %rsi movq %r14, %rdi callq 0x11c38 movaps %xmm0, 0x10(%rsp) leaq 0xc8(%rbx), %rsi movq %r14, %rdi callq 0x11c38 movaps %xmm0, (%rsp) addq $0xe0, %rbx movq %r14, %rdi movq %rbx, %rsi callq 0x11c38 movaps 0x20(%rsp), %xmm2 unpcklps 0x10(%rsp), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1] movaps (%rsp), %xmm1 unpcklps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] movaps %xmm2, %xmm0 addq $0x48, %rsp popq %rbx popq %r14 retq
_ZNK7lunasvg15SVGImageElement15fillBoundingBoxEv: push r14 push rbx sub rsp, 48h mov rbx, rdi lea r14, [rsp+58h+var_20] mov [r14], rdi mov byte ptr [r14+8], 0 lea rsi, [rdi+98h]; lunasvg::SVGLength * mov rdi, r14; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movaps [rsp+58h+var_38], xmm0 lea rsi, [rbx+0B0h]; lunasvg::SVGLength * mov rdi, r14; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movaps [rsp+58h+var_48], xmm0 lea rsi, [rbx+0C8h]; lunasvg::SVGLength * mov rdi, r14; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movaps [rsp+58h+var_58], xmm0 add rbx, 0E0h mov rdi, r14; this mov rsi, rbx; lunasvg::SVGLength * call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movaps xmm2, [rsp+58h+var_38] unpcklps xmm2, [rsp+58h+var_48] movaps xmm1, [rsp+58h+var_58] unpcklps xmm1, xmm0 movaps xmm0, xmm2 add rsp, 48h pop rbx pop r14 retn
__m128 lunasvg::SVGImageElement::fillBoundingBox(lunasvg::SVGImageElement *this, __m128 a2) { lunasvg::SVGImageElement *v3; // [rsp+38h] [rbp-20h] BYREF char v4; // [rsp+40h] [rbp-18h] v3 = this; v4 = 0; lunasvg::LengthContext::valueForLength( (lunasvg::LengthContext *)&v3, (lunasvg::SVGImageElement *)((char *)this + 152)); lunasvg::LengthContext::valueForLength( (lunasvg::LengthContext *)&v3, (lunasvg::SVGImageElement *)((char *)this + 176)); lunasvg::LengthContext::valueForLength( (lunasvg::LengthContext *)&v3, (lunasvg::SVGImageElement *)((char *)this + 200)); lunasvg::LengthContext::valueForLength( (lunasvg::LengthContext *)&v3, (lunasvg::SVGImageElement *)((char *)this + 224)); return _mm_unpacklo_ps(a2, a2); }
fillBoundingBox: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RDI LEA R14,[RSP + 0x38] MOV qword ptr [R14],RDI MOV byte ptr [R14 + 0x8],0x0 LEA RSI,[RDI + 0x98] MOV RDI,R14 CALL 0x00111c38 MOVAPS xmmword ptr [RSP + 0x20],XMM0 LEA RSI,[RBX + 0xb0] MOV RDI,R14 CALL 0x00111c38 MOVAPS xmmword ptr [RSP + 0x10],XMM0 LEA RSI,[RBX + 0xc8] MOV RDI,R14 CALL 0x00111c38 MOVAPS xmmword ptr [RSP],XMM0 ADD RBX,0xe0 MOV RDI,R14 MOV RSI,RBX CALL 0x00111c38 MOVAPS XMM2,xmmword ptr [RSP + 0x20] UNPCKLPS XMM2,xmmword ptr [RSP + 0x10] MOVAPS XMM1,xmmword ptr [RSP] UNPCKLPS XMM1,XMM0 MOVAPS XMM0,XMM2 ADD RSP,0x48 POP RBX POP R14 RET
/* lunasvg::SVGImageElement::fillBoundingBox() const */ int8 __thiscall lunasvg::SVGImageElement::fillBoundingBox(SVGImageElement *this) { int4 uVar1; int4 uVar2; SVGImageElement *local_20; int1 local_18; local_18 = 0; local_20 = this; uVar1 = LengthContext::valueForLength((LengthContext *)&local_20,(SVGLength *)(this + 0x98)); uVar2 = LengthContext::valueForLength((LengthContext *)&local_20,(SVGLength *)(this + 0xb0)); LengthContext::valueForLength((LengthContext *)&local_20,(SVGLength *)(this + 200)); LengthContext::valueForLength((LengthContext *)&local_20,(SVGLength *)(this + 0xe0)); return CONCAT44(uVar2,uVar1); }
28,632
TAEBlock::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/tae.hpp
ggml_tensor* forward(ggml_context* ctx, ggml_tensor* x) { // conv(n_in, n_out) ggml_tensor* h; h = ggml_nn_conv_2d(ctx, x, conv_0_w, conv_0_b, 1, 1, 1, 1); h = ggml_relu_inplace(ctx, h); h = ggml_nn_conv_2d(ctx, h, conv_1_w, conv_1_b, 1, 1, 1, 1); h = ggml_relu_inplace(ctx, h); h = ggml_nn_conv_2d(ctx, h, conv_2_w, conv_2_b, 1, 1, 1, 1); // skip connection if (in_channels != out_channels) { // skip = nn.Conv2d(n_in, n_out, 1, bias=False) if n_in != n_out else nn.Identity() x = ggml_nn_conv_2d(ctx, x, conv_skip_w, NULL, 1, 1, 1, 1); } h = ggml_add(ctx, h, x); h = ggml_relu_inplace(ctx, h); return h; }
O0
cpp
TAEBlock::forward(ggml_context*, ggml_tensor*): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x8(%rax), %rdx movq 0x10(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x361c0 movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x120910 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x28(%rsp) movq 0x38(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x18(%rax), %rdx movq 0x20(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x361c0 movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x120910 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x28(%rsp) movq 0x38(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x28(%rax), %rdx movq 0x30(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x361c0 movq 0x20(%rsp), %rcx movq %rax, 0x28(%rsp) movl (%rcx), %eax cmpl 0x4(%rcx), %eax je 0x87996 movq 0x20(%rsp), %rax movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rax), %rdx xorl %eax, %eax movl %eax, %ecx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x361c0 movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x11ea50 movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x120910 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax addq $0x48, %rsp retq nopl (%rax)
_ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx mov rax, [rsp+48h+var_8] mov [rsp+48h+var_28], rax mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_18] mov rdx, [rax+8] mov rcx, [rax+10h] mov r9d, 1 mov r8d, r9d mov [rsp+48h+var_48], 1 mov [rsp+48h+var_40], 1 mov [rsp+48h+var_38], 1 mov [rsp+48h+var_30], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+48h+var_20], rax mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_20] call ggml_relu_inplace mov rcx, rax mov rax, [rsp+48h+var_28] mov [rsp+48h+var_20], rcx mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_20] mov rdx, [rax+18h] mov rcx, [rax+20h] mov r9d, 1 mov r8d, r9d mov [rsp+48h+var_48], 1 mov [rsp+48h+var_40], 1 mov [rsp+48h+var_38], 1 mov [rsp+48h+var_30], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+48h+var_20], rax mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_20] call ggml_relu_inplace mov rcx, rax mov rax, [rsp+48h+var_28] mov [rsp+48h+var_20], rcx mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_20] mov rdx, [rax+28h] mov rcx, [rax+30h] mov r9d, 1 mov r8d, r9d mov [rsp+48h+var_48], 1 mov [rsp+48h+var_40], 1 mov [rsp+48h+var_38], 1 mov [rsp+48h+var_30], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov rcx, [rsp+48h+var_28] mov [rsp+48h+var_20], rax mov eax, [rcx] cmp eax, [rcx+4] jz short loc_87996 mov rax, [rsp+48h+var_28] mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_18] mov rdx, [rax+38h] xor eax, eax mov ecx, eax mov r9d, 1 mov r8d, r9d mov [rsp+48h+var_48], 1 mov [rsp+48h+var_40], 1 mov [rsp+48h+var_38], 1 mov [rsp+48h+var_30], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+48h+var_18], rax loc_87996: mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_18] call ggml_add mov [rsp+48h+var_20], rax mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_20] call ggml_relu_inplace mov [rsp+48h+var_20], rax mov rax, [rsp+48h+var_20] add rsp, 48h retn
long long TAEBlock::forward(long long a1, long long a2, long long a3) { long long v3; // rax int v4; // eax long long v5; // rax int v6; // eax long long v7; // rax long long v10; // [rsp+28h] [rbp-20h] long long v11; // [rsp+30h] [rbp-18h] v11 = a3; v3 = ggml_nn_conv_2d(a2, a3, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), 1, 1, 1, 1, 1, 1); v4 = ggml_relu_inplace(a2, v3); v5 = ggml_nn_conv_2d(a2, v4, *(_QWORD *)(a1 + 24), *(_QWORD *)(a1 + 32), 1, 1, 1, 1, 1, 1); v6 = ggml_relu_inplace(a2, v5); v10 = ggml_nn_conv_2d(a2, v6, *(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 48), 1, 1, 1, 1, 1, 1); if ( *(_DWORD *)a1 != *(_DWORD *)(a1 + 4) ) v11 = ggml_nn_conv_2d(a2, v11, *(_QWORD *)(a1 + 56), 0LL, 1, 1, 1, 1, 1, 1); v7 = ggml_add(a2, v10, v11); return ggml_relu_inplace(a2, v7); }
forward: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x10] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001361c0 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00220910 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x28],RCX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RAX + 0x20] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001361c0 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00220910 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x28],RCX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RAX + 0x30] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001361c0 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x28],RAX MOV EAX,dword ptr [RCX] CMP EAX,dword ptr [RCX + 0x4] JZ 0x00187996 MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RAX + 0x38] XOR EAX,EAX MOV ECX,EAX MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001361c0 MOV qword ptr [RSP + 0x30],RAX LAB_00187996: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] CALL 0x0021ea50 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00220910 MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0x48 RET
/* TAEBlock::forward(ggml_context*, ggml_tensor*) */ int8 __thiscall TAEBlock::forward(TAEBlock *this,ggml_context *param_1,ggml_tensor *param_2) { int8 uVar1; ggml_tensor *pgVar2; ggml_tensor *local_18; uVar1 = ggml_nn_conv_2d(param_1,param_2,*(ggml_tensor **)(this + 8),*(ggml_tensor **)(this + 0x10) ,1,1,1,1,1,1); pgVar2 = (ggml_tensor *)ggml_relu_inplace(param_1,uVar1); uVar1 = ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x18), *(ggml_tensor **)(this + 0x20),1,1,1,1,1,1); pgVar2 = (ggml_tensor *)ggml_relu_inplace(param_1,uVar1); uVar1 = ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x28), *(ggml_tensor **)(this + 0x30),1,1,1,1,1,1); local_18 = param_2; if (*(int *)this != *(int *)(this + 4)) { local_18 = (ggml_tensor *) ggml_nn_conv_2d(param_1,param_2,*(ggml_tensor **)(this + 0x38),(ggml_tensor *)0x0,1,1 ,1,1,1,1); } uVar1 = ggml_add(param_1,uVar1,local_18); uVar1 = ggml_relu_inplace(param_1,uVar1); return uVar1; }
28,633
TAEBlock::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/tae.hpp
ggml_tensor* forward(ggml_context* ctx, ggml_tensor* x) { // conv(n_in, n_out) ggml_tensor* h; h = ggml_nn_conv_2d(ctx, x, conv_0_w, conv_0_b, 1, 1, 1, 1); h = ggml_relu_inplace(ctx, h); h = ggml_nn_conv_2d(ctx, h, conv_1_w, conv_1_b, 1, 1, 1, 1); h = ggml_relu_inplace(ctx, h); h = ggml_nn_conv_2d(ctx, h, conv_2_w, conv_2_b, 1, 1, 1, 1); // skip connection if (in_channels != out_channels) { // skip = nn.Conv2d(n_in, n_out, 1, bias=False) if n_in != n_out else nn.Identity() x = ggml_nn_conv_2d(ctx, x, conv_skip_w, NULL, 1, 1, 1, 1); } h = ggml_add(ctx, h, x); h = ggml_relu_inplace(ctx, h); return h; }
O2
cpp
TAEBlock::forward(ggml_context*, ggml_tensor*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r12 movq 0x8(%rdi), %rdx movq 0x10(%rdi), %rcx pushq $0x1 popq %r15 movq %rsi, %rdi movq %r14, %rsi movl %r15d, %r8d movl %r15d, %r9d pushq %r15 pushq %r15 callq 0x1ce99 addq $0x10, %rsp movq %rbx, %rdi movq %rax, %rsi callq 0x6aaaa movq 0x18(%r12), %rdx movq 0x20(%r12), %rcx movq %rbx, %rdi movq %rax, %rsi movl %r15d, %r8d movl %r15d, %r9d pushq %r15 pushq %r15 callq 0x1ce99 addq $0x10, %rsp movq %rbx, %rdi movq %rax, %rsi callq 0x6aaaa movq 0x28(%r12), %rdx movq 0x30(%r12), %rcx movq %rbx, %rdi movq %rax, %rsi movl %r15d, %r8d movl %r15d, %r9d pushq %r15 pushq %r15 callq 0x1ce99 popq %rcx popq %rdx movq %rax, %r13 movl (%r12), %eax cmpl 0x4(%r12), %eax je 0x37a9d movq 0x38(%r12), %rsi subq $0x8, %rsp movq %rbx, %rdi movq %r14, %rdx movl %r15d, %ecx movl %r15d, %r8d movl %r15d, %r9d pushq %r15 pushq %r15 pushq %r15 callq 0x6d9f6 addq $0x20, %rsp movq %rax, %r14 movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x69a53 movq %rbx, %rdi movq %rax, %rsi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x6aaaa nop
_ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov rbx, rsi mov r12, rdi mov rdx, [rdi+8] mov rcx, [rdi+10h] push 1 pop r15 mov rdi, rsi mov rsi, r14 mov r8d, r15d mov r9d, r15d push r15 push r15 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) add rsp, 10h mov rdi, rbx mov rsi, rax call ggml_relu_inplace mov rdx, [r12+18h] mov rcx, [r12+20h] mov rdi, rbx mov rsi, rax mov r8d, r15d mov r9d, r15d push r15 push r15 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) add rsp, 10h mov rdi, rbx mov rsi, rax call ggml_relu_inplace mov rdx, [r12+28h] mov rcx, [r12+30h] mov rdi, rbx mov rsi, rax mov r8d, r15d mov r9d, r15d push r15 push r15 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) pop rcx pop rdx mov r13, rax mov eax, [r12] cmp eax, [r12+4] jz short loc_37A9D mov rsi, [r12+38h] sub rsp, 8 mov rdi, rbx mov rdx, r14 mov ecx, r15d mov r8d, r15d mov r9d, r15d push r15 push r15 push r15 call ggml_conv_2d add rsp, 20h mov r14, rax loc_37A9D: mov rdi, rbx mov rsi, r13 mov rdx, r14 call ggml_add mov rdi, rbx mov rsi, rax pop rbx pop r12 pop r13 pop r14 pop r15 jmp ggml_relu_inplace
long long TAEBlock::forward(long long a1, long long a2, long long a3) { long long v3; // r14 long long v5; // rax int v6; // eax long long v7; // rax int v8; // eax long long v9; // r13 long long v10; // rax v3 = a3; v5 = ggml_nn_conv_2d(a2, a3, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), 1, 1, 1, 1); v6 = ggml_relu_inplace(a2, v5); v7 = ggml_nn_conv_2d(a2, v6, *(_QWORD *)(a1 + 24), *(_QWORD *)(a1 + 32), 1, 1, 1, 1); v8 = ggml_relu_inplace(a2, v7); v9 = ggml_nn_conv_2d(a2, v8, *(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 48), 1, 1, 1, 1); if ( *(_DWORD *)a1 != *(_DWORD *)(a1 + 4) ) v3 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 56), v3, 1, 1, 1, 1, 1, 1); v10 = ggml_add(a2, v9, v3); return ggml_relu_inplace(a2, v10); }
forward: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV RBX,RSI MOV R12,RDI MOV RDX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI + 0x10] PUSH 0x1 POP R15 MOV RDI,RSI MOV RSI,R14 MOV R8D,R15D MOV R9D,R15D PUSH R15 PUSH R15 CALL 0x0011ce99 ADD RSP,0x10 MOV RDI,RBX MOV RSI,RAX CALL 0x0016aaaa MOV RDX,qword ptr [R12 + 0x18] MOV RCX,qword ptr [R12 + 0x20] MOV RDI,RBX MOV RSI,RAX MOV R8D,R15D MOV R9D,R15D PUSH R15 PUSH R15 CALL 0x0011ce99 ADD RSP,0x10 MOV RDI,RBX MOV RSI,RAX CALL 0x0016aaaa MOV RDX,qword ptr [R12 + 0x28] MOV RCX,qword ptr [R12 + 0x30] MOV RDI,RBX MOV RSI,RAX MOV R8D,R15D MOV R9D,R15D PUSH R15 PUSH R15 CALL 0x0011ce99 POP RCX POP RDX MOV R13,RAX MOV EAX,dword ptr [R12] CMP EAX,dword ptr [R12 + 0x4] JZ 0x00137a9d MOV RSI,qword ptr [R12 + 0x38] SUB RSP,0x8 MOV RDI,RBX MOV RDX,R14 MOV ECX,R15D MOV R8D,R15D MOV R9D,R15D PUSH R15 PUSH R15 PUSH R15 CALL 0x0016d9f6 ADD RSP,0x20 MOV R14,RAX LAB_00137a9d: MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x00169a53 MOV RDI,RBX MOV RSI,RAX POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x0016aaaa
/* TAEBlock::forward(ggml_context*, ggml_tensor*) */ void __thiscall TAEBlock::forward(TAEBlock *this,ggml_context *param_1,ggml_tensor *param_2) { int8 uVar1; ggml_tensor *pgVar2; int unaff_EBX; int unaff_R12D; uVar1 = ggml_nn_conv_2d(param_1,param_2,*(ggml_tensor **)(this + 8),*(ggml_tensor **)(this + 0x10) ,1,1,1,1,unaff_EBX,unaff_R12D); pgVar2 = (ggml_tensor *)ggml_relu_inplace(param_1,uVar1); uVar1 = ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x18), *(ggml_tensor **)(this + 0x20),1,1,1,1,unaff_EBX,unaff_R12D); pgVar2 = (ggml_tensor *)ggml_relu_inplace(param_1,uVar1); uVar1 = ggml_nn_conv_2d(param_1,pgVar2,*(ggml_tensor **)(this + 0x28), *(ggml_tensor **)(this + 0x30),1,1,1,1,unaff_EBX,unaff_R12D); if (*(int *)this != *(int *)(this + 4)) { param_2 = (ggml_tensor *)ggml_conv_2d(param_1,*(int8 *)(this + 0x38),param_2,1,1,1,1,1,1); } uVar1 = ggml_add(param_1,uVar1,param_2); ggml_relu_inplace(param_1,uVar1); return; }
28,634
TAEBlock::forward(ggml_context*, ggml_tensor*)
7CodeWizard[P]stablediffusion/tae.hpp
ggml_tensor* forward(ggml_context* ctx, ggml_tensor* x) { // conv(n_in, n_out) ggml_tensor* h; h = ggml_nn_conv_2d(ctx, x, conv_0_w, conv_0_b, 1, 1, 1, 1); h = ggml_relu_inplace(ctx, h); h = ggml_nn_conv_2d(ctx, h, conv_1_w, conv_1_b, 1, 1, 1, 1); h = ggml_relu_inplace(ctx, h); h = ggml_nn_conv_2d(ctx, h, conv_2_w, conv_2_b, 1, 1, 1, 1); // skip connection if (in_channels != out_channels) { // skip = nn.Conv2d(n_in, n_out, 1, bias=False) if n_in != n_out else nn.Identity() x = ggml_nn_conv_2d(ctx, x, conv_skip_w, NULL, 1, 1, 1, 1); } h = ggml_add(ctx, h, x); h = ggml_relu_inplace(ctx, h); return h; }
O3
cpp
TAEBlock::forward(ggml_context*, ggml_tensor*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq 0x8(%rdi), %rsi movq 0x10(%rdi), %r12 subq $0x8, %rsp movl $0x1, %ebp movq %rbx, %rdi movl $0x1, %ecx movl $0x1, %r8d movl $0x1, %r9d pushq %rbp pushq %rbp pushq %rbp callq 0x932c7 addq $0x20, %rsp movq %rax, %r13 testq %r12, %r12 je 0x54ee0 movq 0x10(%r12), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %rbx, %rdi movq %r12, %rsi callq 0x91eef movq %rbx, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x8f9f3 movq %rax, %r13 movq %rbx, %rdi movq %r13, %rsi callq 0x90bcf movq 0x18(%r15), %rsi movq 0x20(%r15), %r12 subq $0x8, %rsp movq %rbx, %rdi movq %rax, %rdx movl $0x1, %ecx movl $0x1, %r8d movl $0x1, %r9d pushq %rbp pushq %rbp pushq %rbp callq 0x932c7 addq $0x20, %rsp movq %rax, %r13 testq %r12, %r12 je 0x54f53 movq 0x10(%r12), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %rbx, %rdi movq %r12, %rsi callq 0x91eef movq %rbx, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x8f9f3 movq %rax, %r13 movq %rbx, %rdi movq %r13, %rsi callq 0x90bcf movq 0x28(%r15), %rsi movq 0x30(%r15), %r13 subq $0x8, %rsp movl $0x1, %r10d movq %rbx, %rdi movq %rax, %rdx movl $0x1, %ecx movl $0x1, %r8d movl $0x1, %r9d pushq %r10 pushq %r10 pushq %r10 callq 0x932c7 addq $0x20, %rsp movq %rax, %r12 testq %r13, %r13 je 0x54fce movq 0x10(%r13), %r8 movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r9d movq %rbx, %rdi movq %r13, %rsi callq 0x91eef movq %rbx, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x8f9f3 movq %rax, %r12 movl (%r15), %eax cmpl 0x4(%r15), %eax je 0x5500a movq 0x38(%r15), %rsi subq $0x8, %rsp movl $0x1, %eax movq %rbx, %rdi movq %r14, %rdx movl $0x1, %ecx movl $0x1, %r8d movl $0x1, %r9d pushq %rax pushq %rax pushq %rax callq 0x932c7 addq $0x20, %rsp movq %rax, %r14 movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x8f9f3 movq %rbx, %rdi movq %rax, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x90bcf nop
_ZN8TAEBlock7forwardEP12ggml_contextP11ggml_tensor: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov rbx, rsi mov r15, rdi mov rsi, [rdi+8] mov r12, [rdi+10h] sub rsp, 8 mov ebp, 1 mov rdi, rbx mov ecx, 1 mov r8d, 1 mov r9d, 1 push rbp push rbp push rbp call ggml_conv_2d add rsp, 20h mov r13, rax test r12, r12 jz short loc_54EE0 mov r8, [r12+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, rbx mov rsi, r12 call ggml_reshape_4d mov rdi, rbx mov rsi, r13 mov rdx, rax call ggml_add mov r13, rax loc_54EE0: mov rdi, rbx mov rsi, r13 call ggml_relu_inplace mov rsi, [r15+18h] mov r12, [r15+20h] sub rsp, 8 mov rdi, rbx mov rdx, rax mov ecx, 1 mov r8d, 1 mov r9d, 1 push rbp push rbp push rbp call ggml_conv_2d add rsp, 20h mov r13, rax test r12, r12 jz short loc_54F53 mov r8, [r12+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, rbx mov rsi, r12 call ggml_reshape_4d mov rdi, rbx mov rsi, r13 mov rdx, rax call ggml_add mov r13, rax loc_54F53: mov rdi, rbx mov rsi, r13 call ggml_relu_inplace mov rsi, [r15+28h] mov r13, [r15+30h] sub rsp, 8 mov r10d, 1 mov rdi, rbx mov rdx, rax mov ecx, 1 mov r8d, 1 mov r9d, 1 push r10 push r10 push r10 call ggml_conv_2d add rsp, 20h mov r12, rax test r13, r13 jz short loc_54FCE mov r8, [r13+10h] mov edx, 1 mov ecx, 1 mov r9d, 1 mov rdi, rbx mov rsi, r13 call ggml_reshape_4d mov rdi, rbx mov rsi, r12 mov rdx, rax call ggml_add mov r12, rax loc_54FCE: mov eax, [r15] cmp eax, [r15+4] jz short loc_5500A mov rsi, [r15+38h] sub rsp, 8 mov eax, 1 mov rdi, rbx mov rdx, r14 mov ecx, 1 mov r8d, 1 mov r9d, 1 push rax push rax push rax call ggml_conv_2d add rsp, 20h mov r14, rax loc_5500A: mov rdi, rbx mov rsi, r12 mov rdx, r14 call ggml_add mov rdi, rbx mov rsi, rax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp ggml_relu_inplace
long long TAEBlock::forward(long long a1, long long a2, long long a3) { long long v3; // r14 long long v4; // r12 long long v5; // r13 long long v6; // rax int v7; // eax long long v8; // r12 long long v9; // r13 long long v10; // rax int v11; // eax long long v12; // r13 long long v13; // r12 long long v14; // rax long long v15; // rax v3 = a3; v4 = *(_QWORD *)(a1 + 16); v5 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 8), a3, 1, 1, 1, 1, 1, 1); if ( v4 ) { v6 = ggml_reshape_4d(a2, v4, 1LL, 1LL, *(_QWORD *)(v4 + 16), 1LL); v5 = ggml_add(a2, v5, v6); } v7 = ggml_relu_inplace(a2, v5); v8 = *(_QWORD *)(a1 + 32); v9 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 24), v7, 1, 1, 1, 1, 1, 1); if ( v8 ) { v10 = ggml_reshape_4d(a2, v8, 1LL, 1LL, *(_QWORD *)(v8 + 16), 1LL); v9 = ggml_add(a2, v9, v10); } v11 = ggml_relu_inplace(a2, v9); v12 = *(_QWORD *)(a1 + 48); v13 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 40), v11, 1, 1, 1, 1, 1, 1); if ( v12 ) { v14 = ggml_reshape_4d(a2, v12, 1LL, 1LL, *(_QWORD *)(v12 + 16), 1LL); v13 = ggml_add(a2, v13, v14); } if ( *(_DWORD *)a1 != *(_DWORD *)(a1 + 4) ) v3 = ggml_conv_2d(a2, *(_QWORD *)(a1 + 56), v3, 1, 1, 1, 1, 1, 1); v15 = ggml_add(a2, v13, v3); return ggml_relu_inplace(a2, v15); }
28,635
bf_const_log2_rec
bluesky950520[P]quickjs/libbf.c
static void bf_const_log2_rec(bf_t *T, bf_t *P, bf_t *Q, limb_t n1, limb_t n2, BOOL need_P) { bf_context_t *s = T->ctx; if ((n2 - n1) == 1) { if (n1 == 0) { bf_set_ui(P, 3); } else { bf_set_ui(P, n1); P->sign = 1; } bf_set_ui(Q, 2 * n1 + 1); Q->expn += 2; bf_set(T, P); } else { limb_t m; bf_t T1_s, *T1 = &T1_s; bf_t P1_s, *P1 = &P1_s; bf_t Q1_s, *Q1 = &Q1_s; m = n1 + ((n2 - n1) >> 1); bf_const_log2_rec(T, P, Q, n1, m, TRUE); bf_init(s, T1); bf_init(s, P1); bf_init(s, Q1); bf_const_log2_rec(T1, P1, Q1, m, n2, need_P); bf_mul(T, T, Q1, BF_PREC_INF, BF_RNDZ); bf_mul(T1, T1, P, BF_PREC_INF, BF_RNDZ); bf_add(T, T, T1, BF_PREC_INF, BF_RNDZ); if (need_P) bf_mul(P, P, P1, BF_PREC_INF, BF_RNDZ); bf_mul(Q, Q, Q1, BF_PREC_INF, BF_RNDZ); bf_delete(T1); bf_delete(P1); bf_delete(Q1); } }
O2
c
bf_const_log2_rec: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rcx, %r13 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %r8, %r12 subq %rcx, %r12 cmpq $0x1, %r12 jne 0x7d419 testq %r13, %r13 je 0x7d56c movq %r14, %rdi movq %r13, %rsi callq 0x73106 movl $0x1, 0x8(%r14) jmp 0x7d577 movq %r8, %rbp movq %r14, 0x10(%rsp) movq (%r15), %r14 shrq %r12 addq %r13, %r12 pushq $0x1 popq %rax movq %r15, %rdi movq 0x10(%rsp), %rsi movq %rbx, 0x18(%rsp) movq %rbx, %rdx movq %r13, %rcx movq %r12, %r8 movl %r9d, 0xc(%rsp) movl %eax, %r9d callq 0x7d3cf leaq 0x70(%rsp), %r13 movq %r14, (%r13) andl $0x0, 0x8(%r13) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r13) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r13) leaq 0x20(%rsp), %rsi movq %r14, (%rsi) andl $0x0, 0x8(%rsi) leaq 0x48(%rsp), %rbx movq %r14, (%rbx) movq 0x10(%rsp), %r14 andl $0x0, 0x8(%rbx) movq %rax, 0x10(%rsi) movups %xmm0, 0x18(%rsi) movq %rax, 0x10(%rbx) movups %xmm0, 0x18(%rbx) movq %r13, %rdi movq %rbx, %rdx movq %r12, %rcx movq %rbp, %r8 movl 0xc(%rsp), %r12d movl %r12d, %r9d callq 0x7d3cf movq %r15, %rdi movq %r15, %rsi movq %rbx, %rdx movabsq $0x3fffffffffffffff, %rbx # imm = 0x3FFFFFFFFFFFFFFF movq %rbx, %rcx pushq $0x1 popq %rbp movl %ebp, %r8d callq 0x74959 movq %r13, %rdi movq %r13, %rsi movq %r14, %rdx movq %rbx, %rcx movl %ebp, %r8d callq 0x74959 movq %r15, %rdi movq %r15, %rsi movq %rbx, %r15 movq %r13, %rdx movq %rbx, %rcx movl %ebp, %r8d callq 0x757f9 testl %r12d, %r12d je 0x7d522 leaq 0x20(%rsp), %rdx pushq $0x1 popq %r8 movq %r14, %rdi movq %r14, %rsi movq %r15, %rcx callq 0x74959 leaq 0x48(%rsp), %rbx pushq $0x1 popq %r8 movq 0x18(%rsp), %rdi movq %rdi, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x74959 leaq 0x70(%rsp), %rdi callq 0x7500e leaq 0x20(%rsp), %rdi callq 0x7500e movq %rbx, %rdi callq 0x7500e addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x3 popq %rsi movq %r14, %rdi callq 0x73106 leaq 0x1(,%r13,2), %rsi movq %rbx, %rdi callq 0x73106 addq $0x2, 0x10(%rbx) movq %r15, %rdi movq %r14, %rsi addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x73216
bf_const_log2_rec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r13, rcx mov rbx, rdx mov r14, rsi mov r15, rdi mov r12, r8 sub r12, rcx cmp r12, 1 jnz short loc_7D419 test r13, r13 jz loc_7D56C mov rdi, r14 mov rsi, r13 call bf_set_ui mov dword ptr [r14+8], 1 jmp loc_7D577 loc_7D419: mov rbp, r8 mov [rsp+0C8h+var_B8], r14 mov r14, [r15] shr r12, 1 add r12, r13 push 1 pop rax mov rdi, r15 mov rsi, [rsp+0C8h+var_B8] mov [rsp+0C8h+var_B0], rbx mov rdx, rbx mov rcx, r13 mov r8, r12 mov [rsp+0C8h+var_BC], r9d mov r9d, eax call bf_const_log2_rec lea r13, [rsp+0C8h+var_58] mov [r13+0], r14 and dword ptr [r13+8], 0 mov rax, 8000000000000000h mov [r13+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r13+18h], xmm0 lea rsi, [rsp+0C8h+var_A8] mov [rsi], r14 and dword ptr [rsi+8], 0 lea rbx, [rsp+0C8h+var_80] mov [rbx], r14 mov r14, [rsp+0C8h+var_B8] and dword ptr [rbx+8], 0 mov [rsi+10h], rax movups xmmword ptr [rsi+18h], xmm0 mov [rbx+10h], rax movups xmmword ptr [rbx+18h], xmm0 mov rdi, r13 mov rdx, rbx mov rcx, r12 mov r8, rbp mov r12d, [rsp+0C8h+var_BC] mov r9d, r12d call bf_const_log2_rec mov rdi, r15 mov rsi, r15 mov rdx, rbx mov rbx, 3FFFFFFFFFFFFFFFh mov rcx, rbx push 1 pop rbp mov r8d, ebp call bf_mul mov rdi, r13 mov rsi, r13 mov rdx, r14 mov rcx, rbx mov r8d, ebp call bf_mul mov rdi, r15 mov rsi, r15 mov r15, rbx mov rdx, r13 mov rcx, rbx mov r8d, ebp call bf_add test r12d, r12d jz short loc_7D522 lea rdx, [rsp+0C8h+var_A8] push 1 pop r8 mov rdi, r14 mov rsi, r14 mov rcx, r15 call bf_mul loc_7D522: lea rbx, [rsp+0C8h+var_80] push 1 pop r8 mov rdi, [rsp+0C8h+var_B0] mov rsi, rdi mov rdx, rbx mov rcx, r15 call bf_mul lea rdi, [rsp+0C8h+var_58] call bf_delete_0 lea rdi, [rsp+0C8h+var_A8] call bf_delete_0 mov rdi, rbx call bf_delete_0 add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7D56C: push 3 pop rsi mov rdi, r14 call bf_set_ui loc_7D577: lea rsi, ds:1[r13*2] mov rdi, rbx call bf_set_ui add qword ptr [rbx+10h], 2 mov rdi, r15 mov rsi, r14 add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp bf_set
long long bf_const_log2_rec( long long *a1, long long a2, long long *a3, unsigned long long a4, long long a5, unsigned int a6) { long long v9; // r14 unsigned long long v10; // r12 long long v14; // [rsp+20h] [rbp-A8h] BYREF int v15; // [rsp+28h] [rbp-A0h] unsigned long long v16; // [rsp+30h] [rbp-98h] __int128 v17; // [rsp+38h] [rbp-90h] long long v18; // [rsp+48h] [rbp-80h] BYREF int v19; // [rsp+50h] [rbp-78h] unsigned long long v20; // [rsp+58h] [rbp-70h] __int128 v21; // [rsp+60h] [rbp-68h] long long v22; // [rsp+70h] [rbp-58h] BYREF int v23; // [rsp+78h] [rbp-50h] unsigned long long v24; // [rsp+80h] [rbp-48h] __int128 v25; // [rsp+88h] [rbp-40h] if ( a5 - a4 == 1 ) { if ( a4 ) { bf_set_ui(a2, a4); *(_DWORD *)(a2 + 8) = 1; } else { bf_set_ui(a2, 3uLL); } bf_set_ui((long long)a3, 2 * a4 + 1); a3[2] += 2LL; return bf_set((long long)a1, a2); } else { v9 = *a1; v10 = a4 + ((a5 - a4) >> 1); bf_const_log2_rec(a1, a2, a3, a4, v10, 1LL); v22 = v9; v23 = 0; v24 = 0x8000000000000000LL; v25 = 0LL; v14 = v9; v15 = 0; v18 = v9; v19 = 0; v16 = 0x8000000000000000LL; v17 = 0LL; v20 = 0x8000000000000000LL; v21 = 0LL; bf_const_log2_rec(&v22, &v14, &v18, v10, a5, a6); bf_mul(a1, a1, &v18, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_mul(&v22, &v22, (long long *)a2, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_add((long long)a1, (long long)a1, (long long)&v22, 0x3FFFFFFFFFFFFFFFLL, 1LL); if ( a6 ) bf_mul((long long *)a2, (long long *)a2, &v14, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_mul(a3, a3, &v18, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_delete_0(&v22); bf_delete_0(&v14); return bf_delete_0(&v18); } }
bf_const_log2_rec: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R13,RCX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV R12,R8 SUB R12,RCX CMP R12,0x1 JNZ 0x0017d419 TEST R13,R13 JZ 0x0017d56c MOV RDI,R14 MOV RSI,R13 CALL 0x00173106 MOV dword ptr [R14 + 0x8],0x1 JMP 0x0017d577 LAB_0017d419: MOV RBP,R8 MOV qword ptr [RSP + 0x10],R14 MOV R14,qword ptr [R15] SHR R12,0x1 ADD R12,R13 PUSH 0x1 POP RAX MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RBX MOV RDX,RBX MOV RCX,R13 MOV R8,R12 MOV dword ptr [RSP + 0xc],R9D MOV R9D,EAX CALL 0x0017d3cf LEA R13,[RSP + 0x70] MOV qword ptr [R13],R14 AND dword ptr [R13 + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R13 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R13 + 0x18],XMM0 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],R14 AND dword ptr [RSI + 0x8],0x0 LEA RBX,[RSP + 0x48] MOV qword ptr [RBX],R14 MOV R14,qword ptr [RSP + 0x10] AND dword ptr [RBX + 0x8],0x0 MOV qword ptr [RSI + 0x10],RAX MOVUPS xmmword ptr [RSI + 0x18],XMM0 MOV qword ptr [RBX + 0x10],RAX MOVUPS xmmword ptr [RBX + 0x18],XMM0 MOV RDI,R13 MOV RDX,RBX MOV RCX,R12 MOV R8,RBP MOV R12D,dword ptr [RSP + 0xc] MOV R9D,R12D CALL 0x0017d3cf MOV RDI,R15 MOV RSI,R15 MOV RDX,RBX MOV RBX,0x3fffffffffffffff MOV RCX,RBX PUSH 0x1 POP RBP MOV R8D,EBP CALL 0x00174959 MOV RDI,R13 MOV RSI,R13 MOV RDX,R14 MOV RCX,RBX MOV R8D,EBP CALL 0x00174959 MOV RDI,R15 MOV RSI,R15 MOV R15,RBX MOV RDX,R13 MOV RCX,RBX MOV R8D,EBP CALL 0x001757f9 TEST R12D,R12D JZ 0x0017d522 LEA RDX,[RSP + 0x20] PUSH 0x1 POP R8 MOV RDI,R14 MOV RSI,R14 MOV RCX,R15 CALL 0x00174959 LAB_0017d522: LEA RBX,[RSP + 0x48] PUSH 0x1 POP R8 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RDI MOV RDX,RBX MOV RCX,R15 CALL 0x00174959 LEA RDI,[RSP + 0x70] CALL 0x0017500e LEA RDI,[RSP + 0x20] CALL 0x0017500e MOV RDI,RBX CALL 0x0017500e ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017d56c: PUSH 0x3 POP RSI MOV RDI,R14 CALL 0x00173106 LAB_0017d577: LEA RSI,[0x1 + R13*0x2] MOV RDI,RBX CALL 0x00173106 ADD qword ptr [RBX + 0x10],0x2 MOV RDI,R15 MOV RSI,R14 ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00173216
void bf_const_log2_rec(int8 *param_1,long param_2,long param_3,long param_4,long param_5, int param_6) { int8 uVar1; long lVar2; int8 local_a8; int4 local_a0; int8 local_98; int8 local_90; int8 uStack_88; int8 local_80; int4 local_78; int8 local_70; int8 local_68; int8 uStack_60; int8 local_58; int4 local_50; int8 local_48; int8 local_40; int8 uStack_38; if (param_5 - param_4 == 1) { if (param_4 == 0) { bf_set_ui(param_2,3); } else { bf_set_ui(param_2,param_4); *(int4 *)(param_2 + 8) = 1; } bf_set_ui(param_3,param_4 * 2 + 1); *(long *)(param_3 + 0x10) = *(long *)(param_3 + 0x10) + 2; bf_set(param_1,param_2); return; } uVar1 = *param_1; lVar2 = ((ulong)(param_5 - param_4) >> 1) + param_4; bf_const_log2_rec(param_1,param_2,param_3,param_4,lVar2,1); local_50 = 0; local_48 = 0x8000000000000000; local_40 = 0; uStack_38 = 0; local_a0 = 0; local_78 = 0; local_98 = 0x8000000000000000; local_90 = 0; uStack_88 = 0; local_70 = 0x8000000000000000; local_68 = 0; uStack_60 = 0; local_a8 = uVar1; local_80 = uVar1; local_58 = uVar1; bf_const_log2_rec(&local_58,&local_a8,&local_80,lVar2,param_5,param_6); bf_mul(param_1,param_1,&local_80,0x3fffffffffffffff,1); bf_mul(&local_58,&local_58,param_2,0x3fffffffffffffff,1); bf_add(param_1,param_1,&local_58,0x3fffffffffffffff,1); if (param_6 != 0) { bf_mul(param_2,param_2,&local_a8,0x3fffffffffffffff,1); } bf_mul(param_3,param_3,&local_80,0x3fffffffffffffff,1); bf_delete(&local_58); bf_delete(&local_a8); bf_delete(&local_80); return; }
28,636
my_charlen_utf8mb3
eloqsql/strings/ctype-utf8.c
static int my_charlen_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0xf0) return my_valid_mbcharlen_utf8mb3(s, e); return MY_CS_ILSEQ; }
O3
c
my_charlen_utf8mb3: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rdx, %rsi jae 0x3050b movb (%rsi), %cl cmpb $-0x11, %cl ja 0x30509 movl $0x1, %eax testb %cl, %cl jns 0x3050b cmpb $-0x3e, %cl jae 0x3050d xorl %eax, %eax popq %rbp retq cmpb $-0x21, %cl ja 0x3052d leaq 0x2(%rsi), %rcx movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rdx, %rcx ja 0x3050b xorl %eax, %eax cmpb $-0x40, 0x1(%rsi) setl %al addl %eax, %eax jmp 0x3050b leaq 0x3(%rsi), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rdx, %rdi ja 0x3050b movb 0x1(%rsi), %dl cmpb $-0x41, %dl jg 0x30509 cmpb $-0x41, 0x2(%rsi) movl $0x0, %eax jg 0x3050b xorl %eax, %eax cmpb $-0x60, %dl setae %al cmpb $-0x20, %cl leal (%rax,%rax,2), %ecx movl $0x3, %eax cmovel %ecx, %eax jmp 0x3050b
my_charlen_utf8mb3: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rsi, rdx jnb short loc_3050B mov cl, [rsi] cmp cl, 0EFh ja short loc_30509 mov eax, 1 test cl, cl jns short loc_3050B cmp cl, 0C2h jnb short loc_3050D loc_30509: xor eax, eax loc_3050B: pop rbp retn loc_3050D: cmp cl, 0DFh ja short loc_3052D lea rcx, [rsi+2] mov eax, 0FFFFFF9Ah cmp rcx, rdx ja short loc_3050B xor eax, eax cmp byte ptr [rsi+1], 0C0h setl al add eax, eax jmp short loc_3050B loc_3052D: lea rdi, [rsi+3] mov eax, 0FFFFFF99h cmp rdi, rdx ja short loc_3050B mov dl, [rsi+1] cmp dl, 0BFh jg short loc_30509 cmp byte ptr [rsi+2], 0BFh mov eax, 0 jg short loc_3050B xor eax, eax cmp dl, 0A0h setnb al cmp cl, 0E0h lea ecx, [rax+rax*2] mov eax, 3 cmovz eax, ecx jmp short loc_3050B
long long my_charlen_utf8mb3(long long a1, char *a2, unsigned long long a3) { long long result; // rax char v4; // cl char v5; // dl result = 4294967195LL; if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( (unsigned __int8)*a2 > 0xEFu ) return 0LL; result = 1LL; if ( v4 >= 0 ) return result; if ( (unsigned __int8)v4 < 0xC2u ) return 0LL; if ( (unsigned __int8)v4 > 0xDFu ) { result = 4294967193LL; if ( (unsigned long long)(a2 + 3) <= a3 ) { v5 = a2[1]; if ( v5 > -65 ) return 0LL; result = 0LL; if ( a2[2] <= -65 ) { result = 3LL; if ( v4 == -32 ) return 3 * (unsigned int)((unsigned __int8)v5 >= 0xA0u); } } } else { result = 4294967194LL; if ( (unsigned long long)(a2 + 2) <= a3 ) return 2 * (unsigned int)(a2[1] < -64); } } return result; }
my_charlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RSI,RDX JNC 0x0013050b MOV CL,byte ptr [RSI] CMP CL,0xef JA 0x00130509 MOV EAX,0x1 TEST CL,CL JNS 0x0013050b CMP CL,0xc2 JNC 0x0013050d LAB_00130509: XOR EAX,EAX LAB_0013050b: POP RBP RET LAB_0013050d: CMP CL,0xdf JA 0x0013052d LEA RCX,[RSI + 0x2] MOV EAX,0xffffff9a CMP RCX,RDX JA 0x0013050b XOR EAX,EAX CMP byte ptr [RSI + 0x1],0xc0 SETL AL ADD EAX,EAX JMP 0x0013050b LAB_0013052d: LEA RDI,[RSI + 0x3] MOV EAX,0xffffff99 CMP RDI,RDX JA 0x0013050b MOV DL,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x00130509 CMP byte ptr [RSI + 0x2],0xbf MOV EAX,0x0 JG 0x0013050b XOR EAX,EAX CMP DL,0xa0 SETNC AL CMP CL,0xe0 LEA ECX,[RAX + RAX*0x2] MOV EAX,0x3 CMOVZ EAX,ECX JMP 0x0013050b
int my_charlen_utf8mb3(int8 param_1,byte *param_2,byte *param_3) { byte bVar1; if (param_3 <= param_2) { return -0x65; } bVar1 = *param_2; if (bVar1 < 0xf0) { if (-1 < (char)bVar1) { return 1; } if (0xc1 < bVar1) { if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { return -0x66; } return (uint)((char)param_2[1] < -0x40) * 2; } if (param_3 < param_2 + 3) { return -0x67; } if ((char)param_2[1] < -0x40) { if (-0x41 < (char)param_2[2]) { return 0; } if (bVar1 != 0xe0) { return 3; } return (uint)(0x9f < param_2[1]) * 3; } } } return 0; }
28,637
ratio
eloqsql/strings/dtoa.c
static double ratio(Bigint *a, Bigint *b) { U da, db; int k, ka, kb; dval(&da)= b2d(a, &ka); dval(&db)= b2d(b, &kb); k= ka - kb + 32*(a->wds - b->wds); if (k > 0) word0(&da)+= (ULong)(k*Exp_msk1 * 1.0); else { k= -k; word0(&db)+= k*Exp_msk1; } return dval(&da) / dval(&db); }
O0
c
ratio: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0x7c560 movsd %xmm0, -0x18(%rbp) movq -0x10(%rbp), %rdi leaq -0x2c(%rbp), %rsi callq 0x7c560 movsd %xmm0, -0x20(%rbp) movl -0x28(%rbp), %eax subl -0x2c(%rbp), %eax movq -0x8(%rbp), %rcx movl 0x14(%rcx), %ecx movq -0x10(%rbp), %rdx subl 0x14(%rdx), %ecx shll $0x5, %ecx addl %ecx, %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jle 0x7c204 movl -0x24(%rbp), %eax shll $0x14, %eax addl -0x14(%rbp), %eax movl %eax, -0x14(%rbp) jmp 0x7c218 xorl %eax, %eax subl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax shll $0x14, %eax addl -0x1c(%rbp), %eax movl %eax, -0x1c(%rbp) movsd -0x18(%rbp), %xmm0 divsd -0x20(%rbp), %xmm0 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
ratio: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] lea rsi, [rbp+var_28] call b2d movsd [rbp+var_18], xmm0 mov rdi, [rbp+var_10] lea rsi, [rbp+var_2C] call b2d movsd [rbp+var_20], xmm0 mov eax, [rbp+var_28] sub eax, [rbp+var_2C] mov rcx, [rbp+var_8] mov ecx, [rcx+14h] mov rdx, [rbp+var_10] sub ecx, [rdx+14h] shl ecx, 5 add eax, ecx mov [rbp+var_24], eax cmp [rbp+var_24], 0 jle short loc_7C204 mov eax, [rbp+var_24] shl eax, 14h add eax, dword ptr [rbp+var_18+4] mov dword ptr [rbp+var_18+4], eax jmp short loc_7C218 loc_7C204: xor eax, eax sub eax, [rbp+var_24] mov [rbp+var_24], eax mov eax, [rbp+var_24] shl eax, 14h add eax, dword ptr [rbp+var_20+4] mov dword ptr [rbp+var_20+4], eax loc_7C218: movsd xmm0, [rbp+var_18] divsd xmm0, [rbp+var_20] add rsp, 30h pop rbp retn
double ratio(long long a1, long long a2) { int v3; // [rsp+4h] [rbp-2Ch] BYREF int v4; // [rsp+8h] [rbp-28h] BYREF int v5; // [rsp+Ch] [rbp-24h] double v6; // [rsp+10h] [rbp-20h] double v7; // [rsp+18h] [rbp-18h] long long v8; // [rsp+20h] [rbp-10h] long long v9; // [rsp+28h] [rbp-8h] v9 = a1; v8 = a2; v7 = b2d(a1, &v4); v6 = b2d(v8, &v3); v5 = 32 * (*(_DWORD *)(v9 + 20) - *(_DWORD *)(v8 + 20)) + v4 - v3; if ( v5 <= 0 ) { v5 = -v5; HIDWORD(v6) += v5 << 20; } else { HIDWORD(v7) += v5 << 20; } return v7 / v6; }
ratio: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x28] CALL 0x0017c560 MOVSD qword ptr [RBP + -0x18],XMM0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x2c] CALL 0x0017c560 MOVSD qword ptr [RBP + -0x20],XMM0 MOV EAX,dword ptr [RBP + -0x28] SUB EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x14] MOV RDX,qword ptr [RBP + -0x10] SUB ECX,dword ptr [RDX + 0x14] SHL ECX,0x5 ADD EAX,ECX MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JLE 0x0017c204 MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x14 ADD EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x14],EAX JMP 0x0017c218 LAB_0017c204: XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x14 ADD EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x1c],EAX LAB_0017c218: MOVSD XMM0,qword ptr [RBP + -0x18] DIVSD XMM0,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
double ratio(long param_1,long param_2) { int iVar1; double dVar2; int local_34; int local_30 [2]; int8 local_28; int8 local_20; long local_18; long local_10; local_18 = param_2; local_10 = param_1; local_20 = (double)b2d(param_1,local_30); dVar2 = (double)b2d(local_18,&local_34); iVar1 = (local_30[0] - local_34) + (*(int *)(local_10 + 0x14) - *(int *)(local_18 + 0x14)) * 0x20; if (iVar1 < 1) { local_28._4_4_ = (int)((ulong)dVar2 >> 0x20); local_28 = (double)CONCAT44(iVar1 * -0x100000 + local_28._4_4_,SUB84(dVar2,0)); } else { local_20 = (double)CONCAT44(iVar1 * 0x100000 + local_20._4_4_,(int4)local_20); local_28 = dVar2; } return local_20 / local_28; }
28,638
my_long10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, long int val) { char buffer[66]; register char *p, *e; long int new_val; uint sign=0; unsigned long int uval = (unsigned long int) val; e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval= (unsigned long int)0 - uval; *dst++= '-'; len--; sign= 1; } } new_val = (long) (uval / 10); *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); val = new_val; while (val != 0) { new_val=val/10; *--p = '0' + (char) (val-new_val*10); val= new_val; } len= MY_MIN(len, (size_t) (e-p)); memcpy(dst, p, len); return len+sign; }
O3
c
my_long10_to_str_8bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r10 movq %rsi, %rdi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movb $0x0, -0x1f(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %cl orb %al, %cl jne 0xb57bf negq %r8 movb $0x2d, (%rdi) incq %rdi decq %r10 movl $0x1, %r14d jmp 0xb57c2 xorl %r14d, %r14d leaq -0x1f(%rbp), %rbx movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD movq %r8, %rax mulq %rcx movq %rdx, %r9 shrq $0x3, %r9 imull $0xf6, %r9d, %eax addl %r8d, %eax addb $0x30, %al leaq -0x20(%rbp), %rsi movb %al, (%rsi) cmpq $0xa, %r8 jb 0xb5819 movq %r9, %rax mulq %rcx shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %r9d, %eax addb $0x30, %al movb %al, -0x1(%rsi) decq %rsi cmpq $0x9, %r9 movq %rdx, %r9 ja 0xb57f5 subq %rsi, %rbx cmpq %rbx, %r10 cmovbq %r10, %rbx movq %rbx, %rdx callq 0x29080 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0xb5849 addq %r14, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x29250
my_long10_to_str_8bit: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r10, rdx mov rdi, rsi mov rax, fs:28h mov [rbp+var_18], rax mov [rbp+var_1F], 0 test ecx, ecx setns al test r8, r8 setns cl or cl, al jnz short loc_B57BF neg r8 mov byte ptr [rdi], 2Dh ; '-' inc rdi dec r10 mov r14d, 1 jmp short loc_B57C2 loc_B57BF: xor r14d, r14d loc_B57C2: lea rbx, [rbp+var_1F] mov rcx, 0CCCCCCCCCCCCCCCDh mov rax, r8 mul rcx mov r9, rdx shr r9, 3 imul eax, r9d, 0F6h add eax, r8d add al, 30h ; '0' lea rsi, [rbp+var_20] mov [rsi], al cmp r8, 0Ah jb short loc_B5819 loc_B57F5: mov rax, r9 mul rcx shr rdx, 3 imul eax, edx, 0F6h add eax, r9d add al, 30h ; '0' mov [rsi-1], al dec rsi cmp r9, 9 mov r9, rdx ja short loc_B57F5 loc_B5819: sub rbx, rsi cmp r10, rbx cmovb rbx, r10 mov rdx, rbx call _memcpy mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_B5849 add rbx, r14 mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_B5849: call ___stack_chk_fail
_BYTE * my_long10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5) { _BYTE *v5; // r10 _BYTE *v6; // rdi long long v7; // r14 unsigned long long v8; // r9 char *v9; // rsi bool v10; // cf bool v11; // zf _BYTE *v12; // rbx char v14; // [rsp+40h] [rbp-20h] BYREF _BYTE v15[7]; // [rsp+41h] [rbp-1Fh] BYREF unsigned long long v16; // [rsp+48h] [rbp-18h] v5 = a3; v6 = a2; v16 = __readfsqword(0x28u); v15[0] = 0; if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL ) { v7 = 0LL; } else { a5 = -(long long)a5; *a2 = 45; v6 = a2 + 1; v5 = a3 - 1; v7 = 1LL; } v8 = a5 / 0xA; v9 = &v14; v14 = a5 % 0xA + 48; if ( a5 >= 0xA ) { do { *--v9 = v8 % 0xA + 48; v10 = v8 < 9; v11 = v8 == 9; v8 /= 0xAuLL; } while ( !v10 && !v11 ); } v12 = (_BYTE *)(v15 - v9); if ( (unsigned long long)v5 < v15 - v9 ) v12 = v5; memcpy(v6, v9, v12); return &v12[v7]; }
my_long10_to_str_8bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R10,RDX MOV RDI,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV byte ptr [RBP + -0x1f],0x0 TEST ECX,ECX SETNS AL TEST R8,R8 SETNS CL OR CL,AL JNZ 0x001b57bf NEG R8 MOV byte ptr [RDI],0x2d INC RDI DEC R10 MOV R14D,0x1 JMP 0x001b57c2 LAB_001b57bf: XOR R14D,R14D LAB_001b57c2: LEA RBX,[RBP + -0x1f] MOV RCX,-0x3333333333333333 MOV RAX,R8 MUL RCX MOV R9,RDX SHR R9,0x3 IMUL EAX,R9D,0xf6 ADD EAX,R8D ADD AL,0x30 LEA RSI,[RBP + -0x20] MOV byte ptr [RSI],AL CMP R8,0xa JC 0x001b5819 LAB_001b57f5: MOV RAX,R9 MUL RCX SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,R9D ADD AL,0x30 MOV byte ptr [RSI + -0x1],AL DEC RSI CMP R9,0x9 MOV R9,RDX JA 0x001b57f5 LAB_001b5819: SUB RBX,RSI CMP R10,RBX CMOVC RBX,R10 MOV RDX,RBX CALL 0x00129080 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001b5849 ADD RBX,R14 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_001b5849: CALL 0x00129250
char * my_long10_to_str_8bit (int8 param_1,int1 *param_2,char *param_3,int param_4,ulong param_5) { ulong uVar1; ulong uVar2; char *__n; char *__src; long in_FS_OFFSET; bool bVar3; char local_29 [9]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_29[2] = 0; bVar3 = (long)param_5 < 0; if (bVar3 && param_4 < 0) { param_5 = -param_5; *param_2 = 0x2d; param_2 = param_2 + 1; param_3 = param_3 + -1; } local_29[1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0'; __src = local_29 + 1; uVar2 = param_5 / 10; while (uVar1 = uVar2, 9 < param_5) { __src[-1] = (char)(uVar1 / 10) * -10 + (char)uVar1 + '0'; __src = __src + -1; uVar2 = uVar1 / 10; param_5 = uVar1; } __n = local_29 + (2 - (long)__src); if (param_3 < local_29 + (2 - (long)__src)) { __n = param_3; } memcpy(param_2,__src,(size_t)__n); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return __n + (bVar3 && param_4 < 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,639
js_std_init_handlers
bluesky950520[P]quickjs/quickjs-libc.c
void js_std_init_handlers(JSRuntime *rt) { JSThreadState *ts; ts = js_mallocz_rt(rt, sizeof(*ts)); if (!ts) { fprintf(stderr, "Could not allocate memory for the worker"); exit(1); } init_list_head(&ts->os_rw_handlers); init_list_head(&ts->os_signal_handlers); init_list_head(&ts->os_timers); init_list_head(&ts->port_list); ts->next_timer_id = 1; ts->exc = JS_UNDEFINED; js_set_thread_state(rt, ts); JS_AddRuntimeFinalizer(rt, js_std_finalize, ts); #ifdef USE_WORKER /* set the SharedArrayBuffer memory handlers */ { JSSharedArrayBufferFunctions sf; memset(&sf, 0, sizeof(sf)); sf.sab_alloc = js_sab_alloc; sf.sab_free = js_sab_free; sf.sab_dup = js_sab_dup; JS_SetSharedArrayBufferFunctions(rt, &sf); } #endif }
O2
c
js_std_init_handlers: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movl $0x80, %esi callq 0x1ad58 testq %rax, %rax je 0x13d24 movq %rax, %r14 movq %rax, (%rax) movq %rax, 0x8(%rax) addq $0x10, %rax movq %rax, 0x10(%r14) movq %rax, 0x18(%r14) leaq 0x20(%r14), %rax movq %rax, 0x20(%r14) movq %rax, 0x28(%r14) movq %r14, %rax addq $0x30, %rax movq %rax, 0x30(%r14) movq %rax, 0x38(%r14) movq $0x1, 0x48(%r14) andl $0x0, 0x50(%r14) movq $0x3, 0x58(%r14) movq %rbx, %rdi movq %r14, %rsi callq 0x13d48 leaq 0x79(%rip), %rsi # 0x13d58 movq %rbx, %rdi movq %r14, %rdx callq 0x1b9b5 leaq 0x8(%rsp), %rsi andq $0x0, 0x18(%rsi) leaq 0x80(%rip), %rax # 0x13d7b movq %rax, (%rsi) leaq 0x95(%rip), %rax # 0x13d9a movq %rax, 0x8(%rsi) leaq 0x9d(%rip), %rax # 0x13dad movq %rax, 0x10(%rsi) movq %rbx, %rdi callq 0x1ba43 addq $0x28, %rsp popq %rbx popq %r14 retq movq 0xab2cd(%rip), %rax # 0xbeff8 movq (%rax), %rcx leaq 0x71ec2(%rip), %rdi # 0x85bf7 pushq $0x28 popq %rsi pushq $0x1 popq %rdx callq 0xe970 pushq $0x1 popq %rdi callq 0xe960
js_std_init_handlers: push r14 push rbx sub rsp, 28h mov rbx, rdi mov esi, 80h call js_mallocz_rt test rax, rax jz loc_13D24 mov r14, rax mov [rax], rax mov [rax+8], rax add rax, 10h mov [r14+10h], rax mov [r14+18h], rax lea rax, [r14+20h] mov [r14+20h], rax mov [r14+28h], rax mov rax, r14 add rax, 30h ; '0' mov [r14+30h], rax mov [r14+38h], rax mov qword ptr [r14+48h], 1 and dword ptr [r14+50h], 0 mov qword ptr [r14+58h], 3 mov rdi, rbx mov rsi, r14 call js_set_thread_state lea rsi, js_std_finalize mov rdi, rbx mov rdx, r14 call JS_AddRuntimeFinalizer lea rsi, [rsp+38h+var_30] and qword ptr [rsi+18h], 0 lea rax, js_sab_alloc mov [rsi], rax lea rax, js_sab_free mov [rsi+8], rax lea rax, js_sab_dup mov [rsi+10h], rax mov rdi, rbx call JS_SetSharedArrayBufferFunctions add rsp, 28h pop rbx pop r14 retn loc_13D24: mov rax, cs:stderr_ptr mov rcx, [rax] lea rdi, aCouldNotAlloca; "Could not allocate memory for the worke"... push 28h ; '(' pop rsi push 1 pop rdx call _fwrite push 1 pop rdi call _exit
long long js_std_init_handlers(long long a1) { _QWORD *v1; // rax _QWORD *v2; // r14 _QWORD *v3; // rax v1 = (_QWORD *)js_mallocz_rt(a1, 128LL); if ( !v1 ) { fwrite("Could not allocate memory for the worker", 40LL, 1LL, stderr); exit(1LL); } v2 = v1; *v1 = v1; v1[1] = v1; v3 = v1 + 2; v2[2] = v3; v2[3] = v3; v2[4] = v2 + 4; v2[5] = v2 + 4; v2[6] = v2 + 6; v2[7] = v2 + 6; v2[9] = 1LL; *((_DWORD *)v2 + 20) = 0; v2[11] = 3LL; js_set_thread_state(a1, v2); JS_AddRuntimeFinalizer(a1, js_std_finalize, v2); return JS_SetSharedArrayBufferFunctions(a1); }
js_std_init_handlers: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV ESI,0x80 CALL 0x0011ad58 TEST RAX,RAX JZ 0x00113d24 MOV R14,RAX MOV qword ptr [RAX],RAX MOV qword ptr [RAX + 0x8],RAX ADD RAX,0x10 MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [R14 + 0x18],RAX LEA RAX,[R14 + 0x20] MOV qword ptr [R14 + 0x20],RAX MOV qword ptr [R14 + 0x28],RAX MOV RAX,R14 ADD RAX,0x30 MOV qword ptr [R14 + 0x30],RAX MOV qword ptr [R14 + 0x38],RAX MOV qword ptr [R14 + 0x48],0x1 AND dword ptr [R14 + 0x50],0x0 MOV qword ptr [R14 + 0x58],0x3 MOV RDI,RBX MOV RSI,R14 CALL 0x00113d48 LEA RSI,[0x113d58] MOV RDI,RBX MOV RDX,R14 CALL 0x0011b9b5 LEA RSI,[RSP + 0x8] AND qword ptr [RSI + 0x18],0x0 LEA RAX,[0x113d7b] MOV qword ptr [RSI],RAX LEA RAX,[0x113d9a] MOV qword ptr [RSI + 0x8],RAX LEA RAX,[0x113dad] MOV qword ptr [RSI + 0x10],RAX MOV RDI,RBX CALL 0x0011ba43 ADD RSP,0x28 POP RBX POP R14 RET LAB_00113d24: MOV RAX,qword ptr [0x001beff8] MOV RCX,qword ptr [RAX] LEA RDI,[0x185bf7] PUSH 0x28 POP RSI PUSH 0x1 POP RDX CALL 0x0010e970 PUSH 0x1 POP RDI CALL 0x0010e960
void js_std_init_handlers(int8 param_1) { long lVar1; lVar1 = js_mallocz_rt(param_1,0x80); if (lVar1 != 0) { *(long *)lVar1 = lVar1; *(long *)(lVar1 + 8) = lVar1; *(long *)(lVar1 + 0x10) = lVar1 + 0x10; *(long *)(lVar1 + 0x18) = lVar1 + 0x10; *(long *)(lVar1 + 0x20) = lVar1 + 0x20; *(long *)(lVar1 + 0x28) = lVar1 + 0x20; *(long *)(lVar1 + 0x30) = lVar1 + 0x30; *(long *)(lVar1 + 0x38) = lVar1 + 0x30; *(int8 *)(lVar1 + 0x48) = 1; *(int4 *)(lVar1 + 0x50) = 0; *(int8 *)(lVar1 + 0x58) = 3; js_set_thread_state(param_1,lVar1); JS_AddRuntimeFinalizer(param_1,js_std_finalize,lVar1); JS_SetSharedArrayBufferFunctions(param_1); return; } fwrite("Could not allocate memory for the worker",0x28,1,*(FILE **)PTR_stderr_001beff8); /* WARNING: Subroutine does not return */ exit(1); }
28,640
common_log::~common_log()
monkey531[P]llama/common/log.cpp
~common_log() { pause(); if (file) { fclose(file); } }
O3
cpp
common_log::~common_log(): pushq %rbx movq %rdi, %rbx callq 0x95d90 movq 0x60(%rbx), %rdi testq %rdi, %rdi je 0x95d4d callq 0x196b0 movq 0xb0(%rbx), %rdi testq %rdi, %rdi je 0x95d68 movq 0xc0(%rbx), %rsi subq %rdi, %rsi callq 0x196d0 leaq 0x78(%rbx), %rdi callq 0x9643c leaq 0x30(%rbx), %rdi callq 0x19c60 cmpq $0x0, 0x28(%rbx) jne 0x95d83 popq %rbx retq callq 0x191a0 movq %rax, %rdi callq 0x2286d
_ZN10common_logD2Ev: push rbx mov rbx, rdi call _ZN10common_log5pauseEv; common_log::pause(void) mov rdi, [rbx+60h] test rdi, rdi jz short loc_95D4D call _fclose loc_95D4D: mov rdi, [rbx+0B0h]; void * test rdi, rdi jz short loc_95D68 mov rsi, [rbx+0C0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_95D68: lea rdi, [rbx+78h] call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector() lea rdi, [rbx+30h]; this call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable() cmp qword ptr [rbx+28h], 0 jnz short loc_95D83 pop rbx retn loc_95D83: call __ZSt9terminatev; std::terminate(void) mov rdi, rax call __clang_call_terminate
void common_log::~common_log(char *a1) { void *v2; // rdi common_log::pause((common_log *)a1); if ( *((_QWORD *)a1 + 12) ) fclose(); v2 = (void *)*((_QWORD *)a1 + 22); if ( v2 ) operator delete(v2, *((_QWORD *)a1 + 24) - (_QWORD)v2); std::vector<common_log_entry>::~vector(a1 + 120); std::condition_variable::~condition_variable((std::condition_variable *)(a1 + 48)); if ( *((_QWORD *)a1 + 5) ) std::terminate(); }
~common_log: PUSH RBX MOV RBX,RDI LAB_00195d3a: CALL 0x00195d90 LAB_00195d3f: MOV RDI,qword ptr [RBX + 0x60] TEST RDI,RDI JZ 0x00195d4d CALL 0x001196b0 LAB_00195d4d: MOV RDI,qword ptr [RBX + 0xb0] TEST RDI,RDI JZ 0x00195d68 MOV RSI,qword ptr [RBX + 0xc0] SUB RSI,RDI CALL 0x001196d0 LAB_00195d68: LEA RDI,[RBX + 0x78] CALL 0x0019643c LEA RDI,[RBX + 0x30] CALL 0x00119c60 CMP qword ptr [RBX + 0x28],0x0 JNZ 0x00195d83 POP RBX RET LAB_00195d83: CALL 0x001191a0
/* common_log::~common_log() */ void __thiscall common_log::~common_log(common_log *this) { void *pvVar1; /* try { // try from 00195d3a to 00195d3e has its CatchHandler @ 00195d88 */ pause(this); if (*(FILE **)(this + 0x60) != (FILE *)0x0) { fclose(*(FILE **)(this + 0x60)); } pvVar1 = *(void **)(this + 0xb0); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0xc0) - (long)pvVar1); } std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector ((vector<common_log_entry,std::allocator<common_log_entry>> *)(this + 0x78)); std::condition_variable::~condition_variable((condition_variable *)(this + 0x30)); if (*(long *)(this + 0x28) == 0) { return; } /* WARNING: Subroutine does not return */ std::terminate(); }
28,641
js_regexp_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { JSValue pattern, flags, bc, val; JSValue pat, flags1; JSRegExp *re; int pat_is_regexp; pat = argv[0]; flags1 = argv[1]; pat_is_regexp = js_is_regexp(ctx, pat); if (pat_is_regexp < 0) return JS_EXCEPTION; if (JS_IsUndefined(new_target)) { /* called as a function */ new_target = JS_GetActiveFunction(ctx); if (pat_is_regexp && JS_IsUndefined(flags1)) { JSValue ctor; BOOL res; ctor = JS_GetProperty(ctx, pat, JS_ATOM_constructor); if (JS_IsException(ctor)) return ctor; res = js_same_value(ctx, ctor, new_target); JS_FreeValue(ctx, ctor); if (res) return js_dup(pat); } } re = js_get_regexp(ctx, pat, FALSE); if (re) { pattern = js_dup(JS_MKPTR(JS_TAG_STRING, re->pattern)); if (JS_IsUndefined(flags1)) { bc = js_dup(JS_MKPTR(JS_TAG_STRING, re->bytecode)); goto no_compilation; } else { flags = JS_ToString(ctx, flags1); if (JS_IsException(flags)) goto fail; } } else { flags = JS_UNDEFINED; if (pat_is_regexp) { pattern = JS_GetProperty(ctx, pat, JS_ATOM_source); if (JS_IsException(pattern)) goto fail; if (JS_IsUndefined(flags1)) { flags = JS_GetProperty(ctx, pat, JS_ATOM_flags); if (JS_IsException(flags)) goto fail; } else { flags = js_dup(flags1); } } else { pattern = js_dup(pat); flags = js_dup(flags1); } if (JS_IsUndefined(pattern)) { pattern = JS_AtomToString(ctx, JS_ATOM_empty_string); } else { val = pattern; pattern = JS_ToString(ctx, val); JS_FreeValue(ctx, val); if (JS_IsException(pattern)) goto fail; } } bc = js_compile_regexp(ctx, pattern, flags); if (JS_IsException(bc)) goto fail; JS_FreeValue(ctx, flags); no_compilation: return js_regexp_constructor_internal(ctx, new_target, pattern, bc); fail: JS_FreeValue(ctx, pattern); JS_FreeValue(ctx, flags); return JS_EXCEPTION; }
O1
c
js_regexp_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r13 movq %rsi, %rbx movq (%r8), %r15 movq 0x8(%r8), %r12 movq 0x10(%r8), %rax movq %rax, 0x20(%rsp) movq 0x18(%r8), %rax movq %rax, 0x8(%rsp) movq %rdi, 0x40(%rsp) movq %r15, %rsi movq %r12, %rdx callq 0x4ba13 movl $0x6, %ebp testl %eax, %eax js 0x32cb1 movl %eax, %r14d movq %rbx, 0x28(%rsp) movq %r13, 0x30(%rsp) cmpl $0x3, %r13d jne 0x32d1d movq 0x40(%rsp), %rbx movq 0x18(%rbx), %rax movq 0x108(%rax), %rax movq 0x8(%rax), %rcx movq %rcx, 0x28(%rsp) movq 0x10(%rax), %rax movq %rax, 0x30(%rsp) testl %r14d, %r14d setne %al cmpl $0x3, 0x8(%rsp) sete %cl andb %al, %cl cmpb $0x1, %cl jne 0x32cb9 movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x3d, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x2238f addq $0x10, %rsp movq %rax, %r13 movq %rdx, %rbp cmpl $0x6, %ebp jne 0x32cbb movq %r13, %rbx shrq $0x20, %rbx xorl %eax, %eax jmp 0x32d15 xorl %r13d, %r13d jmp 0x32f57 jmp 0x32d1d movq %rbx, %rdi movq %r13, %rsi movq %rbp, %rdx movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 callq 0x2584d movl %eax, 0x3c(%rsp) movq 0x18(%rbx), %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1ccb2 cmpl $0x0, 0x3c(%rsp) je 0x32d10 movq %r15, 0x10(%rsp) cmpl $-0x9, %r12d jb 0x32cff movq 0x10(%rsp), %rax incl (%rax) movq %r15, %rbx shrq $0x20, %rbx xorl %eax, %eax movq %r15, %r13 movq %r12, %rbp jmp 0x32d15 movb $0x1, %al xorl %r13d, %r13d testb %al, %al je 0x32f57 movq %r15, 0x10(%rsp) cmpl $-0x1, %r12d jne 0x32d3a movq 0x10(%rsp), %rax cmpw $0x12, 0x6(%rax) jne 0x32d3a addq $0x30, %rax jmp 0x32d3c xorl %eax, %eax testq %rax, %rax movq 0x40(%rsp), %rbp je 0x32d77 movq (%rax), %r13 incl (%r13) movq 0x8(%rsp), %rdx cmpl $0x3, %edx jne 0x32dbb movq 0x8(%rax), %rax incl (%rax) movq %rax, 0x10(%rsp) movq $-0x7, 0x18(%rsp) movq $-0x7, %r14 jmp 0x32f21 testl %r14d, %r14d je 0x32de6 movq %rbp, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x6d, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x2238f addq $0x10, %rsp movq %rax, %r13 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x32e45 movl $0x3, %r15d xorl %r12d, %r12d jmp 0x32eea movq %rbp, %rdi movq 0x20(%rsp), %rsi xorl %ecx, %ecx callq 0x26ec9 movq %rax, %r12 movq %rdx, %r15 movq $-0x7, %r14 cmpl $0x6, %r15d jne 0x32ec7 jmp 0x32eea movq %r15, 0x10(%rsp) cmpl $-0x9, %r12d jb 0x32df8 movq 0x10(%rsp), %rax incl (%rax) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) cmpl $-0x9, 0x8(%rsp) jb 0x32e10 movq 0x10(%rsp), %rax incl (%rax) movq %r15, %r13 movq %r12, %r14 movq 0x8(%rsp), %r15 movq 0x20(%rsp), %r12 cmpl $0x3, %r14d jne 0x32e82 movq 0x18(%rbp), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %r13 incl (%r13) movq $-0x7, %r14 jmp 0x32ec7 movq 0x8(%rsp), %rax cmpl $0x3, %eax jne 0x32f73 movq %rbp, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x6e, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x2238f addq $0x10, %rsp movq %rax, %r12 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x32e20 jmp 0x32eea movq %rbp, %rdi movq %r13, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x26ec9 movq %r15, 0x8(%rsp) movq %rax, %r15 movq %r12, 0x20(%rsp) movq %rdx, %r12 movq 0x18(%rbp), %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1ccb2 movq %r15, %r13 movq 0x8(%rsp), %r15 movq %r12, %r14 cmpl $0x6, %r12d movq 0x20(%rsp), %r12 je 0x32eea movq %rbp, %rdi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq %r15, %r8 callq 0x3294e movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) cmpl $0x6, %edx jne 0x32f12 movq 0x18(%rbp), %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1ccb2 movq 0x18(%rbp), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1ccb2 xorl %r13d, %r13d movl $0x6, %ebp jmp 0x32f57 movq 0x18(%rbp), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x1ccb2 subq $0x10, %rsp movups 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rbp, %rdi movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx movq %r13, %rcx movq %r14, %r8 callq 0x3eb06 addq $0x10, %rsp movq %rax, %r13 movq %rdx, %rbp movq %rax, %rbx shrq $0x20, %rbx shlq $0x20, %rbx movl %r13d, %eax orq %rbx, %rax movq %rbp, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x20(%rsp), %r12 movq %r12, 0x10(%rsp) cmpl $-0x9, %eax movq %rax, %r15 jb 0x32e20 movq 0x10(%rsp), %rax incl (%rax) jmp 0x32e20
js_regexp_constructor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, rdx mov rbx, rsi mov r15, [r8] mov r12, [r8+8] mov rax, [r8+10h] mov [rsp+78h+var_58], rax mov rax, [r8+18h] mov [rsp+78h+var_70], rax mov [rsp+78h+var_38], rdi mov rsi, r15 mov rdx, r12 call js_is_regexp mov ebp, 6 test eax, eax js loc_32CB1 mov r14d, eax mov [rsp+78h+var_50], rbx mov [rsp+78h+var_48], r13 cmp r13d, 3 jnz loc_32D1D mov rbx, [rsp+78h+var_38] mov rax, [rbx+18h] mov rax, [rax+108h] mov rcx, [rax+8] mov [rsp+78h+var_50], rcx mov rax, [rax+10h] mov [rsp+78h+var_48], rax test r14d, r14d setnz al cmp dword ptr [rsp+78h+var_70], 3 setz cl and cl, al cmp cl, 1 jnz short loc_32CB9 mov rdi, rbx mov rsi, r15 mov rdx, r12 mov ecx, 3Dh ; '=' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r13, rax mov rbp, rdx cmp ebp, 6 jnz short loc_32CBB mov rbx, r13 shr rbx, 20h xor eax, eax jmp short loc_32D15 loc_32CB1: xor r13d, r13d jmp loc_32F57 loc_32CB9: jmp short loc_32D1D loc_32CBB: mov rdi, rbx mov rsi, r13 mov rdx, rbp mov rcx, [rsp+78h+var_50] mov r8, [rsp+78h+var_48] call js_same_value mov [rsp+78h+var_3C], eax mov rdi, [rbx+18h] mov rsi, r13 mov rdx, rbp call JS_FreeValueRT cmp [rsp+78h+var_3C], 0 jz short loc_32D10 mov qword ptr [rsp+78h+var_68], r15 cmp r12d, 0FFFFFFF7h jb short loc_32CFF mov rax, qword ptr [rsp+78h+var_68] inc dword ptr [rax] loc_32CFF: mov rbx, r15 shr rbx, 20h xor eax, eax mov r13, r15 mov rbp, r12 jmp short loc_32D15 loc_32D10: mov al, 1 xor r13d, r13d loc_32D15: test al, al jz loc_32F57 loc_32D1D: mov qword ptr [rsp+78h+var_68], r15 cmp r12d, 0FFFFFFFFh jnz short loc_32D3A mov rax, qword ptr [rsp+78h+var_68] cmp word ptr [rax+6], 12h jnz short loc_32D3A add rax, 30h ; '0' jmp short loc_32D3C loc_32D3A: xor eax, eax loc_32D3C: test rax, rax mov rbp, [rsp+78h+var_38] jz short loc_32D77 mov r13, [rax] inc dword ptr [r13+0] mov rdx, [rsp+78h+var_70] cmp edx, 3 jnz short loc_32DBB mov rax, [rax+8] inc dword ptr [rax] mov qword ptr [rsp+78h+var_68], rax mov qword ptr [rsp+78h+var_68+8], 0FFFFFFFFFFFFFFF9h mov r14, 0FFFFFFFFFFFFFFF9h jmp loc_32F21 loc_32D77: test r14d, r14d jz short loc_32DE6 mov rdi, rbp mov rsi, r15 mov rdx, r12 mov ecx, 6Dh ; 'm' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r13, rax mov r14, rdx cmp r14d, 6 jnz loc_32E45 mov r15d, 3 xor r12d, r12d jmp loc_32EEA loc_32DBB: mov rdi, rbp mov rsi, [rsp+78h+var_58] xor ecx, ecx call JS_ToStringInternal mov r12, rax mov r15, rdx mov r14, 0FFFFFFFFFFFFFFF9h cmp r15d, 6 jnz loc_32EC7 jmp loc_32EEA loc_32DE6: mov qword ptr [rsp+78h+var_68], r15 cmp r12d, 0FFFFFFF7h jb short loc_32DF8 mov rax, qword ptr [rsp+78h+var_68] inc dword ptr [rax] loc_32DF8: mov rax, [rsp+78h+var_58] mov qword ptr [rsp+78h+var_68], rax cmp dword ptr [rsp+78h+var_70], 0FFFFFFF7h jb short loc_32E10 mov rax, qword ptr [rsp+78h+var_68] inc dword ptr [rax] loc_32E10: mov r13, r15 mov r14, r12 mov r15, [rsp+78h+var_70] mov r12, [rsp+78h+var_58] loc_32E20: cmp r14d, 3 jnz short loc_32E82 mov rax, [rbp+18h] mov rax, [rax+68h] mov r13, [rax+178h] inc dword ptr [r13+0] mov r14, 0FFFFFFFFFFFFFFF9h jmp loc_32EC7 loc_32E45: mov rax, [rsp+78h+var_70] cmp eax, 3 jnz loc_32F73 mov rdi, rbp mov rsi, r15 mov rdx, r12 mov ecx, 6Eh ; 'n' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r12, rax mov r15, rdx cmp r15d, 6 jnz short loc_32E20 jmp short loc_32EEA loc_32E82: mov rdi, rbp mov rsi, r13 mov rdx, r14 xor ecx, ecx call JS_ToStringInternal mov [rsp+78h+var_70], r15 mov r15, rax mov [rsp+78h+var_58], r12 mov r12, rdx mov rdi, [rbp+18h] mov rsi, r13 mov rdx, r14 call JS_FreeValueRT mov r13, r15 mov r15, [rsp+78h+var_70] mov r14, r12 cmp r12d, 6 mov r12, [rsp+78h+var_58] jz short loc_32EEA loc_32EC7: mov rdi, rbp mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r8, r15 call js_compile_regexp mov qword ptr [rsp+78h+var_68], rax mov qword ptr [rsp+78h+var_68+8], rdx cmp edx, 6 jnz short loc_32F12 loc_32EEA: mov rdi, [rbp+18h] mov rsi, r13 mov rdx, r14 call JS_FreeValueRT mov rdi, [rbp+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT xor r13d, r13d mov ebp, 6 jmp short loc_32F57 loc_32F12: mov rdi, [rbp+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT loc_32F21: sub rsp, 10h movups xmm0, [rsp+88h+var_68] movups [rsp+88h+var_88], xmm0 mov rdi, rbp mov rsi, [rsp+88h+var_50] mov rdx, [rsp+88h+var_48] mov rcx, r13 mov r8, r14 call js_regexp_constructor_internal add rsp, 10h mov r13, rax mov rbp, rdx mov rbx, rax shr rbx, 20h loc_32F57: shl rbx, 20h mov eax, r13d or rax, rbx mov rdx, rbp add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_32F73: mov r12, [rsp+78h+var_58] mov qword ptr [rsp+78h+var_68], r12 cmp eax, 0FFFFFFF7h mov r15, rax jb loc_32E20 mov rax, qword ptr [rsp+78h+var_68] inc dword ptr [rax] jmp loc_32E20
unsigned long long js_regexp_constructor( long long a1, unsigned long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, unsigned long long *a13) { unsigned long long v14; // rbx unsigned long long v15; // r15 long long v16; // r12 int is_regexp; // eax long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 int v22; // r14d long long v23; // rax unsigned long long PropertyInternal2; // rax long long v25; // rdx _DWORD *v26; // r13 long long v27; // rbp char v28; // al unsigned long long v29; // rax _DWORD *v30; // rax long long v31; // r14 long long v32; // rdx long long v33; // r15 _DWORD *v34; // r12 long long v35; // rdx long long v36; // rdx unsigned long long v37; // r15 long long v38; // rdx long long v39; // r12 bool v40; // zf __int128 v41; // rax unsigned long long v42; // rax long long v44; // [rsp+18h] [rbp-70h] long long v45; // [rsp+18h] [rbp-70h] __int128 v46; // [rsp+20h] [rbp-68h] _DWORD *v47; // [rsp+30h] [rbp-58h] _DWORD *v48; // [rsp+30h] [rbp-58h] _DWORD *v49; // [rsp+38h] [rbp-50h] long long v50; // [rsp+40h] [rbp-48h] int v51; // [rsp+4Ch] [rbp-3Ch] v14 = a2; v15 = *a13; v16 = a13[1]; v47 = (_DWORD *)a13[2]; v44 = a13[3]; is_regexp = js_is_regexp(a1, *a13, v16); if ( is_regexp < 0 ) { LODWORD(v26) = 0; } else { v22 = is_regexp; LODWORD(v49) = a2; LODWORD(v50) = a3; if ( a3 != 3 ) goto LABEL_15; v14 = a1; v23 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL); v49 = *(_DWORD **)(v23 + 8); v50 = *(_QWORD *)(v23 + 16); if ( v22 == 0 || (_DWORD)v44 != 3 ) goto LABEL_15; PropertyInternal2 = JS_GetPropertyInternal2(a1, v15, v16, 0x3Du, v15, v16, 0LL, 0); v26 = (_DWORD *)PropertyInternal2; v27 = v25; if ( (_DWORD)v25 == 6 ) { v14 = HIDWORD(PropertyInternal2); v28 = 0; } else { v51 = js_same_value(a1, (_DWORD *)PropertyInternal2, v25, v49, v50); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v27); if ( v51 ) { if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*(_DWORD *)v15; v14 = HIDWORD(v15); v28 = 0; LODWORD(v26) = v15; } else { v28 = 1; LODWORD(v26) = 0; } } if ( v28 ) { LABEL_15: if ( (_DWORD)v16 == -1 && *(_WORD *)(v15 + 6) == 18 ) v29 = v15 + 48; else v29 = 0LL; if ( v29 ) { v26 = *(_DWORD **)v29; ++**(_DWORD **)v29; if ( (_DWORD)v44 == 3 ) { v30 = *(_DWORD **)(v29 + 8); ++*v30; *(_QWORD *)&v46 = v30; *((_QWORD *)&v46 + 1) = -7LL; LODWORD(v31) = -7; LABEL_40: v42 = js_regexp_constructor_internal(a1, (_DWORD)v49, v50, (_DWORD)v26, v31, v19, v46); LODWORD(v26) = v42; v14 = HIDWORD(v42); return (v14 << 32) | (unsigned int)v26; } v34 = (_DWORD *)JS_ToStringInternal(a1, (long long)v47, v44, 0, v18, v19, a4, a5, a6, a7, v20, v21, a10, a11); v33 = v35; v31 = -7LL; if ( (_DWORD)v35 == 6 ) goto LABEL_38; goto LABEL_37; } if ( v22 ) { v26 = (_DWORD *)JS_GetPropertyInternal2(a1, v15, v16, 0x6Du, v15, v16, 0LL, 0); v31 = v32; if ( (_DWORD)v32 == 6 ) { v33 = 3LL; v34 = 0LL; LABEL_38: JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v31); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v34, v33); LODWORD(v26) = 0; return (v14 << 32) | (unsigned int)v26; } if ( (_DWORD)v44 == 3 ) { v34 = (_DWORD *)JS_GetPropertyInternal2(a1, v15, v16, 0x6Eu, v15, v16, 0LL, 0); v33 = v36; if ( (_DWORD)v36 == 6 ) goto LABEL_38; } else { v34 = v47; v33 = v44; if ( (unsigned int)v44 >= 0xFFFFFFF7 ) ++*v47; } } else { if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*(_DWORD *)v15; if ( (unsigned int)v44 >= 0xFFFFFFF7 ) ++*v47; v26 = (_DWORD *)v15; v31 = v16; v33 = v44; v34 = v47; } if ( (_DWORD)v31 == 3 ) { v26 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*v26; v31 = -7LL; } else { v45 = v33; v37 = JS_ToStringInternal(a1, (long long)v26, v31, 0, v18, v19, a4, a5, a6, a7, v20, v21, a10, a11); v48 = v34; v39 = v38; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v31); v26 = (_DWORD *)v37; v33 = v45; v31 = v39; v40 = (_DWORD)v39 == 6; v34 = v48; if ( v40 ) goto LABEL_38; } LABEL_37: *(_QWORD *)&v41 = js_compile_regexp( a1, (long long)v26, v31, (long long)v34, v33, v19, a4, a5, a6, a7, v20, v21, a10, a11); v46 = v41; if ( DWORD2(v41) != 6 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v34, v33); goto LABEL_40; } goto LABEL_38; } } return (v14 << 32) | (unsigned int)v26; }
js_regexp_constructor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,RDX MOV RBX,RSI MOV R15,qword ptr [R8] MOV R12,qword ptr [R8 + 0x8] MOV RAX,qword ptr [R8 + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R8 + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x40],RDI MOV RSI,R15 MOV RDX,R12 CALL 0x0014ba13 MOV EBP,0x6 TEST EAX,EAX JS 0x00132cb1 MOV R14D,EAX MOV qword ptr [RSP + 0x28],RBX MOV qword ptr [RSP + 0x30],R13 CMP R13D,0x3 JNZ 0x00132d1d MOV RBX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x108] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x28],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x30],RAX TEST R14D,R14D SETNZ AL CMP dword ptr [RSP + 0x8],0x3 SETZ CL AND CL,AL CMP CL,0x1 JNZ 0x00132cb9 MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV ECX,0x3d MOV R8,R15 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x0012238f ADD RSP,0x10 MOV R13,RAX MOV RBP,RDX CMP EBP,0x6 JNZ 0x00132cbb MOV RBX,R13 SHR RBX,0x20 XOR EAX,EAX JMP 0x00132d15 LAB_00132cb1: XOR R13D,R13D JMP 0x00132f57 LAB_00132cb9: JMP 0x00132d1d LAB_00132cbb: MOV RDI,RBX MOV RSI,R13 MOV RDX,RBP MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] CALL 0x0012584d MOV dword ptr [RSP + 0x3c],EAX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R13 MOV RDX,RBP CALL 0x0011ccb2 CMP dword ptr [RSP + 0x3c],0x0 JZ 0x00132d10 MOV qword ptr [RSP + 0x10],R15 CMP R12D,-0x9 JC 0x00132cff MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_00132cff: MOV RBX,R15 SHR RBX,0x20 XOR EAX,EAX MOV R13,R15 MOV RBP,R12 JMP 0x00132d15 LAB_00132d10: MOV AL,0x1 XOR R13D,R13D LAB_00132d15: TEST AL,AL JZ 0x00132f57 LAB_00132d1d: MOV qword ptr [RSP + 0x10],R15 CMP R12D,-0x1 JNZ 0x00132d3a MOV RAX,qword ptr [RSP + 0x10] CMP word ptr [RAX + 0x6],0x12 JNZ 0x00132d3a ADD RAX,0x30 JMP 0x00132d3c LAB_00132d3a: XOR EAX,EAX LAB_00132d3c: TEST RAX,RAX MOV RBP,qword ptr [RSP + 0x40] JZ 0x00132d77 MOV R13,qword ptr [RAX] INC dword ptr [R13] MOV RDX,qword ptr [RSP + 0x8] CMP EDX,0x3 JNZ 0x00132dbb MOV RAX,qword ptr [RAX + 0x8] INC dword ptr [RAX] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],-0x7 MOV R14,-0x7 JMP 0x00132f21 LAB_00132d77: TEST R14D,R14D JZ 0x00132de6 MOV RDI,RBP MOV RSI,R15 MOV RDX,R12 MOV ECX,0x6d MOV R8,R15 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x0012238f ADD RSP,0x10 MOV R13,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x00132e45 MOV R15D,0x3 XOR R12D,R12D JMP 0x00132eea LAB_00132dbb: MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x20] XOR ECX,ECX CALL 0x00126ec9 MOV R12,RAX MOV R15,RDX MOV R14,-0x7 CMP R15D,0x6 JNZ 0x00132ec7 JMP 0x00132eea LAB_00132de6: MOV qword ptr [RSP + 0x10],R15 CMP R12D,-0x9 JC 0x00132df8 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_00132df8: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX CMP dword ptr [RSP + 0x8],-0x9 JC 0x00132e10 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] LAB_00132e10: MOV R13,R15 MOV R14,R12 MOV R15,qword ptr [RSP + 0x8] MOV R12,qword ptr [RSP + 0x20] LAB_00132e20: CMP R14D,0x3 JNZ 0x00132e82 MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV R13,qword ptr [RAX + 0x178] INC dword ptr [R13] MOV R14,-0x7 JMP 0x00132ec7 LAB_00132e45: MOV RAX,qword ptr [RSP + 0x8] CMP EAX,0x3 JNZ 0x00132f73 MOV RDI,RBP MOV RSI,R15 MOV RDX,R12 MOV ECX,0x6e MOV R8,R15 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x0012238f ADD RSP,0x10 MOV R12,RAX MOV R15,RDX CMP R15D,0x6 JNZ 0x00132e20 JMP 0x00132eea LAB_00132e82: MOV RDI,RBP MOV RSI,R13 MOV RDX,R14 XOR ECX,ECX CALL 0x00126ec9 MOV qword ptr [RSP + 0x8],R15 MOV R15,RAX MOV qword ptr [RSP + 0x20],R12 MOV R12,RDX MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R13 MOV RDX,R14 CALL 0x0011ccb2 MOV R13,R15 MOV R15,qword ptr [RSP + 0x8] MOV R14,R12 CMP R12D,0x6 MOV R12,qword ptr [RSP + 0x20] JZ 0x00132eea LAB_00132ec7: MOV RDI,RBP MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R8,R15 CALL 0x0013294e MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX CMP EDX,0x6 JNZ 0x00132f12 LAB_00132eea: MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R13 MOV RDX,R14 CALL 0x0011ccb2 MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011ccb2 XOR R13D,R13D MOV EBP,0x6 JMP 0x00132f57 LAB_00132f12: MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x0011ccb2 LAB_00132f21: SUB RSP,0x10 MOVUPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] MOV RCX,R13 MOV R8,R14 CALL 0x0013eb06 ADD RSP,0x10 MOV R13,RAX MOV RBP,RDX MOV RBX,RAX SHR RBX,0x20 LAB_00132f57: SHL RBX,0x20 MOV EAX,R13D OR RAX,RBX MOV RDX,RBP ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00132f73: MOV R12,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],R12 CMP EAX,-0x9 MOV R15,RAX JC 0x00132e20 MOV RAX,qword ptr [RSP + 0x10] INC dword ptr [RAX] JMP 0x00132e20
int1 [16] js_regexp_constructor (ulong param_1,ulong param_2,int8 param_3,int8 param_4, int1 (*param_5) [16]) { int1 (*pauVar1) [16]; int *piVar2; int *piVar3; long lVar4; bool bVar5; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; int iVar9; int iVar10; int *piVar12; int extraout_EDX; uint uVar14; int8 uVar15; int8 uVar16; int1 auVar17 [16]; int1 auVar18 [16]; int1 auVar19 [16]; uint local_70; ulong local_50; int8 local_48; ulong uVar11; ulong uVar13; piVar2 = *(int **)*param_5; uVar15 = *(int8 *)(*param_5 + 8); auVar18 = *param_5; pauVar1 = param_5 + 1; piVar3 = *(int **)*pauVar1; uVar16 = *(int8 *)(param_5[1] + 8); auVar8 = *pauVar1; auVar19 = *pauVar1; auVar7 = *pauVar1; auVar6 = *pauVar1; iVar9 = js_is_regexp(param_1,piVar2,uVar15); if (iVar9 < 0) { auVar17 = ZEXT816(6) << 0x40; goto LAB_00132f57; } uVar14 = (uint)uVar15; local_70 = (uint)uVar16; local_50 = param_2; local_48 = param_3; if ((int)param_3 == 3) { lVar4 = *(long *)(*(long *)(param_1 + 0x18) + 0x108); local_50 = *(ulong *)(lVar4 + 8); local_48 = *(int8 *)(lVar4 + 0x10); param_2 = param_1; if (local_70 == 3 && iVar9 != 0) { auVar17 = JS_GetPropertyInternal2(param_1,piVar2,uVar15,0x3d,piVar2,uVar15,0,0); uVar13 = auVar17._8_8_; uVar11 = auVar17._0_8_; if (auVar17._8_4_ == 6) { bVar5 = false; param_2 = uVar11 >> 0x20; } else { iVar10 = js_same_value(param_1,uVar11,uVar13,local_50,local_48); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar11,uVar13); if (iVar10 == 0) { bVar5 = true; auVar17._8_8_ = 0; auVar17._0_8_ = uVar13; auVar17 = auVar17 << 0x40; } else { if (0xfffffff6 < uVar14) { *piVar2 = *piVar2 + 1; } bVar5 = false; param_2 = (ulong)piVar2 >> 0x20; auVar17 = auVar18; } } if (!bVar5) goto LAB_00132f57; } } if ((uVar14 == 0xffffffff) && (*(short *)((long)piVar2 + 6) == 0x12)) { piVar12 = piVar2 + 0xc; } else { piVar12 = (int *)0x0; } if (piVar12 == (int *)0x0) { if (iVar9 == 0) { if (0xfffffff6 < uVar14) { *piVar2 = *piVar2 + 1; } if (0xfffffff6 < local_70) { *piVar3 = *piVar3 + 1; auVar19 = auVar8; } LAB_00132e20: uVar16 = auVar18._8_8_; uVar15 = auVar18._0_8_; if (auVar18._8_4_ != 3) { auVar18 = JS_ToStringInternal(param_1,uVar15,uVar16,0); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar15,uVar16); iVar9 = auVar18._8_4_; goto joined_r0x00132ec5; } piVar2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); *piVar2 = *piVar2 + 1; auVar18._8_8_ = 0xfffffffffffffff9; auVar18._0_8_ = piVar2; LAB_00132ec7: js_compile_regexp(param_1,auVar18._0_8_,auVar18._8_8_,auVar19._0_8_,auVar19._8_8_); if (extraout_EDX != 6) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar19._0_8_,auVar19._8_8_); goto LAB_00132f21; } } else { auVar18 = JS_GetPropertyInternal2(param_1,piVar2,uVar15,0x6d,piVar2,uVar15,0,0); if (auVar18._8_4_ != 6) { if (local_70 == 3) { auVar19 = JS_GetPropertyInternal2(param_1,piVar2,uVar15,0x6e,piVar2,uVar15,0,0); if (auVar19._8_4_ == 6) goto LAB_00132eea; } else { auVar19 = auVar6; if (0xfffffff6 < local_70) { *piVar3 = *piVar3 + 1; auVar19 = auVar7; } } goto LAB_00132e20; } auVar19 = ZEXT816(3) << 0x40; } } else { piVar2 = *(int **)piVar12; *piVar2 = *piVar2 + 1; if (local_70 == 3) { **(int **)(piVar12 + 2) = **(int **)(piVar12 + 2) + 1; auVar18._8_8_ = 0xfffffffffffffff9; auVar18._0_8_ = piVar2; LAB_00132f21: auVar17 = js_regexp_constructor_internal (param_1,local_50,local_48,auVar18._0_8_,auVar18._8_8_); param_2 = auVar17._0_8_ >> 0x20; goto LAB_00132f57; } auVar19 = JS_ToStringInternal(param_1,piVar3,uVar16,0); auVar18._8_8_ = 0xfffffffffffffff9; auVar18._0_8_ = piVar2; iVar9 = auVar19._8_4_; joined_r0x00132ec5: if (iVar9 != 6) goto LAB_00132ec7; } LAB_00132eea: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar18._0_8_,auVar18._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar19._0_8_,auVar19._8_8_); auVar17 = ZEXT816(6) << 0x40; LAB_00132f57: auVar19._0_8_ = auVar17._0_8_ & 0xffffffff | param_2 << 0x20; auVar19._8_8_ = auVar17._8_8_; return auVar19; }
28,642
js_regexp_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { JSValue pattern, flags, bc, val; JSValue pat, flags1; JSRegExp *re; int pat_is_regexp; pat = argv[0]; flags1 = argv[1]; pat_is_regexp = js_is_regexp(ctx, pat); if (pat_is_regexp < 0) return JS_EXCEPTION; if (JS_IsUndefined(new_target)) { /* called as a function */ new_target = JS_GetActiveFunction(ctx); if (pat_is_regexp && JS_IsUndefined(flags1)) { JSValue ctor; BOOL res; ctor = JS_GetProperty(ctx, pat, JS_ATOM_constructor); if (JS_IsException(ctor)) return ctor; res = js_same_value(ctx, ctor, new_target); JS_FreeValue(ctx, ctor); if (res) return js_dup(pat); } } re = js_get_regexp(ctx, pat, FALSE); if (re) { pattern = js_dup(JS_MKPTR(JS_TAG_STRING, re->pattern)); if (JS_IsUndefined(flags1)) { bc = js_dup(JS_MKPTR(JS_TAG_STRING, re->bytecode)); goto no_compilation; } else { flags = JS_ToString(ctx, flags1); if (JS_IsException(flags)) goto fail; } } else { flags = JS_UNDEFINED; if (pat_is_regexp) { pattern = JS_GetProperty(ctx, pat, JS_ATOM_source); if (JS_IsException(pattern)) goto fail; if (JS_IsUndefined(flags1)) { flags = JS_GetProperty(ctx, pat, JS_ATOM_flags); if (JS_IsException(flags)) goto fail; } else { flags = js_dup(flags1); } } else { pattern = js_dup(pat); flags = js_dup(flags1); } if (JS_IsUndefined(pattern)) { pattern = JS_AtomToString(ctx, JS_ATOM_empty_string); } else { val = pattern; pattern = JS_ToString(ctx, val); JS_FreeValue(ctx, val); if (JS_IsException(pattern)) goto fail; } } bc = js_compile_regexp(ctx, pattern, flags); if (JS_IsException(bc)) goto fail; JS_FreeValue(ctx, flags); no_compilation: return js_regexp_constructor_internal(ctx, new_target, pattern, bc); fail: JS_FreeValue(ctx, pattern); JS_FreeValue(ctx, flags); return JS_EXCEPTION; }
O2
c
js_regexp_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r15 movq %rsi, 0x28(%rsp) movq %rdi, %r14 movq (%r8), %r12 movq 0x8(%r8), %rbp movq 0x10(%r8), %rax movq %rax, 0x18(%rsp) movq 0x18(%r8), %rax movq %rax, 0x10(%rsp) movq %r12, %rsi movq %rbp, %rdx callq 0x40f26 pushq $0x6 popq %r13 testl %eax, %eax js 0x2c528 movl %eax, %ebx cmpl $0x3, %r15d jne 0x2c382 movq 0x18(%r14), %rax movq 0x108(%rax), %rax movq 0x8(%rax), %rcx movq %rcx, 0x28(%rsp) movq 0x10(%rax), %r15 testl %ebx, %ebx setne %al cmpl $0x3, 0x10(%rsp) sete %cl andb %al, %cl cmpb $0x1, %cl jne 0x2c382 movq %r15, 0x20(%rsp) pushq $0x3d popq %rcx movq %r14, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x1a4c7 movq %rax, %r13 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x2c32a movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r13, %rcx andq %rax, %rcx movq %r13, %r12 movq %r15, %r13 jmp 0x2c52d movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx movq 0x28(%rsp), %rcx movq 0x20(%rsp), %r8 callq 0x1f3b6 movl %eax, 0x34(%rsp) movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx movq 0x20(%rsp), %r15 callq 0x174a2 cmpl $0x0, 0x34(%rsp) pushq $0x6 popq %r13 je 0x2c382 cmpl $-0x9, %ebp jb 0x2c36d incl (%r12) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r12, %rcx movq %rbp, %r13 jmp 0x2c52d cmpl $-0x1, %ebp movq %r15, 0x20(%rsp) jne 0x2c3c8 cmpw $0x12, 0x6(%r12) jne 0x2c3c8 movq 0x30(%r12), %rbx incl (%rbx) movq 0x10(%rsp), %rdx cmpl $0x3, %edx jne 0x2c437 movq 0x38(%r12), %rax incl (%rax) movq %rax, 0x38(%rsp) movq $-0x7, 0x40(%rsp) pushq $-0x7 popq %r15 jmp 0x2c553 testl %ebx, %ebx je 0x2c3f4 pushq $0x6d popq %rcx movq %r14, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x1a4c7 movq %rax, %rbx movq %rdx, %r15 cmpl $0x6, %r15d jne 0x2c40c pushq $0x3 popq %rbp xorl %r12d, %r12d jmp 0x2c50c cmpl $-0x9, %ebp jb 0x2c3fd incl (%r12) cmpl $-0x9, 0x10(%rsp) jae 0x2c467 movq %r12, %rbx movq %rbp, %r15 jmp 0x2c47e movq 0x10(%rsp), %rax cmpl $0x3, %eax jne 0x2c45c pushq $0x6e popq %rcx movq %r14, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x1a4c7 movq %rax, %r12 movq %rdx, %rbp cmpl $0x6, %ebp jne 0x2c488 jmp 0x2c50c movq %r14, %rdi movq 0x18(%rsp), %rsi callq 0x1a4c0 movq %rax, %r12 movq %rdx, %rbp pushq $-0x7 popq %r15 cmpl $0x6, %ebp jne 0x2c4e9 jmp 0x2c50c movq %rbx, %r12 movq %r15, %rbp cmpl $-0xa, %eax jbe 0x2c47e movq 0x18(%rsp), %rax incl (%rax) movq %r12, %rbx movq %rax, %r12 movq %rbp, %r15 movq 0x10(%rsp), %rbp jmp 0x2c488 movq 0x10(%rsp), %rbp movq 0x18(%rsp), %r12 cmpl $0x3, %r15d jne 0x2c4a1 pushq $0x2f popq %rsi movq %r14, %rdi callq 0x19e14 movq %rax, %rbx movq %rdx, %r15 jmp 0x2c4e9 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x1a4c0 movq %r12, 0x18(%rsp) movq %rax, %r12 movq %rbp, 0x10(%rsp) movq %r13, %rbp movq %rdx, %r13 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x174a2 movq %r12, %rbx movq 0x18(%rsp), %r12 movq %r13, %r15 cmpl $0x6, %r13d movq %rbp, %r13 movq 0x10(%rsp), %rbp je 0x2c50c movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx movq %rbp, %r8 callq 0x2c041 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) cmpl $0x6, %edx jne 0x2c545 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x174a2 movq %r14, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x174a2 xorl %r12d, %r12d xorl %ecx, %ecx movl %r12d, %eax orq %rcx, %rax movq %r13, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi movq %r12, %rsi movq %rbp, %rdx callq 0x174a2 movups 0x38(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r14, %rdi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx movq %rbx, %rcx movq %r15, %r8 callq 0x36e7f movq %rax, %r12 movq %rdx, %r13 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x2c52d
js_regexp_constructor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rdx mov [rsp+78h+var_50], rsi mov r14, rdi mov r12, [r8] mov rbp, [r8+8] mov rax, [r8+10h] mov [rsp+78h+var_60], rax mov rax, [r8+18h] mov [rsp+78h+var_68], rax mov rsi, r12 mov rdx, rbp call js_is_regexp push 6 pop r13 test eax, eax js loc_2C528 mov ebx, eax cmp r15d, 3 jnz loc_2C382 mov rax, [r14+18h] mov rax, [rax+108h] mov rcx, [rax+8] mov [rsp+78h+var_50], rcx mov r15, [rax+10h] test ebx, ebx setnz al cmp dword ptr [rsp+78h+var_68], 3 setz cl and cl, al cmp cl, 1 jnz loc_2C382 mov [rsp+78h+var_58], r15 push 3Dh ; '=' pop rcx mov rdi, r14 mov rsi, r12 mov rdx, rbp call JS_GetProperty mov r13, rax mov r15, rdx cmp r15d, 6 jnz short loc_2C32A mov rax, 0FFFFFFFF00000000h mov rcx, r13 and rcx, rax mov r12, r13 mov r13, r15 jmp loc_2C52D loc_2C32A: mov rdi, r14 mov rsi, r13 mov rdx, r15 mov rcx, [rsp+78h+var_50] mov r8, [rsp+78h+var_58] call js_same_value mov [rsp+78h+var_44], eax mov rdi, r14 mov rsi, r13 mov rdx, r15 mov r15, [rsp+78h+var_58] call JS_FreeValue cmp [rsp+78h+var_44], 0 push 6 pop r13 jz short loc_2C382 cmp ebp, 0FFFFFFF7h jb short loc_2C36D inc dword ptr [r12] loc_2C36D: mov rcx, 0FFFFFFFF00000000h and rcx, r12 mov r13, rbp jmp loc_2C52D loc_2C382: cmp ebp, 0FFFFFFFFh mov [rsp+78h+var_58], r15 jnz short loc_2C3C8 cmp word ptr [r12+6], 12h jnz short loc_2C3C8 mov rbx, [r12+30h] inc dword ptr [rbx] mov rdx, [rsp+78h+var_68] cmp edx, 3 jnz loc_2C437 mov rax, [r12+38h] inc dword ptr [rax] mov qword ptr [rsp+78h+var_40], rax mov qword ptr [rsp+78h+var_40+8], 0FFFFFFFFFFFFFFF9h push 0FFFFFFFFFFFFFFF9h pop r15 jmp loc_2C553 loc_2C3C8: test ebx, ebx jz short loc_2C3F4 push 6Dh ; 'm' pop rcx mov rdi, r14 mov rsi, r12 mov rdx, rbp call JS_GetProperty mov rbx, rax mov r15, rdx cmp r15d, 6 jnz short loc_2C40C push 3 pop rbp xor r12d, r12d jmp loc_2C50C loc_2C3F4: cmp ebp, 0FFFFFFF7h jb short loc_2C3FD inc dword ptr [r12] loc_2C3FD: cmp dword ptr [rsp+78h+var_68], 0FFFFFFF7h jnb short loc_2C467 mov rbx, r12 mov r15, rbp jmp short loc_2C47E loc_2C40C: mov rax, [rsp+78h+var_68] cmp eax, 3 jnz short loc_2C45C push 6Eh ; 'n' pop rcx mov rdi, r14 mov rsi, r12 mov rdx, rbp call JS_GetProperty mov r12, rax mov rbp, rdx cmp ebp, 6 jnz short loc_2C488 jmp loc_2C50C loc_2C437: mov rdi, r14 mov rsi, [rsp+78h+var_60] call JS_ToString mov r12, rax mov rbp, rdx push 0FFFFFFFFFFFFFFF9h pop r15 cmp ebp, 6 jnz loc_2C4E9 jmp loc_2C50C loc_2C45C: mov r12, rbx mov rbp, r15 cmp eax, 0FFFFFFF6h jbe short loc_2C47E loc_2C467: mov rax, [rsp+78h+var_60] inc dword ptr [rax] mov rbx, r12 mov r12, rax mov r15, rbp mov rbp, [rsp+78h+var_68] jmp short loc_2C488 loc_2C47E: mov rbp, [rsp+78h+var_68] mov r12, [rsp+78h+var_60] loc_2C488: cmp r15d, 3 jnz short loc_2C4A1 push 2Fh ; '/' pop rsi mov rdi, r14 call JS_AtomToString mov rbx, rax mov r15, rdx jmp short loc_2C4E9 loc_2C4A1: mov rdi, r14 mov rsi, rbx mov rdx, r15 call JS_ToString mov [rsp+78h+var_60], r12 mov r12, rax mov [rsp+78h+var_68], rbp mov rbp, r13 mov r13, rdx mov rdi, r14 mov rsi, rbx mov rdx, r15 call JS_FreeValue mov rbx, r12 mov r12, [rsp+78h+var_60] mov r15, r13 cmp r13d, 6 mov r13, rbp mov rbp, [rsp+78h+var_68] jz short loc_2C50C loc_2C4E9: mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, r12 mov r8, rbp call js_compile_regexp mov qword ptr [rsp+78h+var_40], rax mov qword ptr [rsp+78h+var_40+8], rdx cmp edx, 6 jnz short loc_2C545 loc_2C50C: mov rdi, r14 mov rsi, rbx mov rdx, r15 call JS_FreeValue mov rdi, r14 mov rsi, r12 mov rdx, rbp call JS_FreeValue loc_2C528: xor r12d, r12d xor ecx, ecx loc_2C52D: mov eax, r12d or rax, rcx mov rdx, r13 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2C545: mov rdi, r14 mov rsi, r12 mov rdx, rbp call JS_FreeValue loc_2C553: movups xmm0, [rsp+78h+var_40] movups [rsp+78h+var_78], xmm0 mov rdi, r14 mov rsi, [rsp+78h+var_50] mov rdx, [rsp+78h+var_58] mov rcx, rbx mov r8, r15 call js_regexp_constructor_internal mov r12, rax mov r13, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax jmp short loc_2C52D
unsigned long long js_regexp_constructor( long long a1, int a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, unsigned long long *a13) { long long v13; // r15 unsigned long long v14; // r12 long long v15; // rbp int is_regexp; // eax int v17; // r9d int v18; // ebx long long v19; // rax long long Property; // rax long long v21; // rdx long long v22; // r13 unsigned long long v23; // rcx long long v24; // rdx _DWORD *v25; // rbx _DWORD *v26; // rax long long v27; // r15 long long v28; // rdx long long v29; // rbp long long v30; // r12 long long v31; // rdx double v32; // xmm4_8 double v33; // xmm5_8 long long v34; // rdx long long v35; // rdx long long v36; // r12 long long v37; // rdx long long v38; // r13 __int128 v39; // rax long long v41; // rax long long v42; // [rsp+10h] [rbp-68h] _DWORD *v43; // [rsp+18h] [rbp-60h] long long v44; // [rsp+18h] [rbp-60h] long long v45; // [rsp+20h] [rbp-58h] int v46; // [rsp+20h] [rbp-58h] _DWORD *v47; // [rsp+28h] [rbp-50h] int v48; // [rsp+34h] [rbp-44h] __int128 v49; // [rsp+38h] [rbp-40h] LODWORD(v13) = a3; LODWORD(v47) = a2; v14 = *a13; v15 = a13[1]; v43 = (_DWORD *)a13[2]; v42 = a13[3]; is_regexp = js_is_regexp(a1, *a13, v15); if ( is_regexp < 0 ) goto LABEL_34; v18 = is_regexp; if ( (_DWORD)v13 != 3 ) goto LABEL_10; v19 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL); v47 = *(_DWORD **)(v19 + 8); v13 = *(_QWORD *)(v19 + 16); if ( v18 == 0 || (_DWORD)v42 != 3 ) goto LABEL_10; v45 = *(_QWORD *)(v19 + 16); Property = JS_GetProperty(a1, v14, v15, 61); v22 = Property; v13 = v21; if ( (_DWORD)v21 == 6 ) { v23 = Property & 0xFFFFFFFF00000000LL; LODWORD(v14) = Property; return v23 | (unsigned int)v14; } v48 = js_same_value(a1, (_DWORD *)Property, v21, v47, v45); v24 = v13; LODWORD(v13) = v45; JS_FreeValue(a1, v22, v24); if ( !v48 ) { LABEL_10: v46 = v13; if ( (_DWORD)v15 == -1 && *(_WORD *)(v14 + 6) == 18 ) { v25 = *(_DWORD **)(v14 + 48); ++*v25; if ( (_DWORD)v42 == 3 ) { v26 = *(_DWORD **)(v14 + 56); ++*v26; *(_QWORD *)&v49 = v26; *((_QWORD *)&v49 + 1) = -7LL; LODWORD(v27) = -7; LABEL_37: v41 = js_regexp_constructor_internal(a1, (_DWORD)v47, v46, (_DWORD)v25, v27, v17, v49); LODWORD(v14) = v41; v23 = v41 & 0xFFFFFFFF00000000LL; return v23 | (unsigned int)v14; } v30 = JS_ToString(a1, (long long)v43, v42); v29 = v34; v27 = -7LL; if ( (_DWORD)v34 == 6 ) goto LABEL_33; goto LABEL_32; } if ( v18 ) { v25 = (_DWORD *)JS_GetProperty(a1, v14, v15, 109); v27 = v28; if ( (_DWORD)v28 == 6 ) { v29 = 3LL; v30 = 0LL; LABEL_33: JS_FreeValue(a1, (long long)v25, v27); JS_FreeValue(a1, v30, v29); LABEL_34: LODWORD(v14) = 0; v23 = 0LL; return v23 | (unsigned int)v14; } if ( (_DWORD)v42 == 3 ) { v30 = JS_GetProperty(a1, v14, v15, 110); v29 = v31; if ( (_DWORD)v31 == 6 ) goto LABEL_33; LABEL_29: if ( (_DWORD)v27 == 3 ) { v25 = (_DWORD *)JS_AtomToString(a1, 47); v27 = v35; } else { v44 = v30; v36 = JS_ToString(a1, (long long)v25, v27); v38 = v37; JS_FreeValue(a1, (long long)v25, v27); v25 = (_DWORD *)v36; v30 = v44; v27 = v38; if ( (_DWORD)v38 == 6 ) goto LABEL_33; } LABEL_32: *(_QWORD *)&v39 = js_compile_regexp(a1, (long long)v25, v27, v30, v29, a4, a5, a6, a7, v32, v33, a10, a11); v49 = v39; if ( DWORD2(v39) != 6 ) { JS_FreeValue(a1, v30, v29); goto LABEL_37; } goto LABEL_33; } v14 = (unsigned long long)v25; v15 = v28; if ( (unsigned int)v42 > 0xFFFFFFF6 ) { LABEL_27: ++*v43; v25 = (_DWORD *)v14; v30 = (long long)v43; v27 = v15; v29 = v42; goto LABEL_29; } } else { if ( (unsigned int)v15 >= 0xFFFFFFF7 ) ++*(_DWORD *)v14; if ( (unsigned int)v42 >= 0xFFFFFFF7 ) goto LABEL_27; v25 = (_DWORD *)v14; v27 = v15; } v29 = v42; v30 = (long long)v43; goto LABEL_29; } if ( (unsigned int)v15 >= 0xFFFFFFF7 ) ++*(_DWORD *)v14; v23 = v14 & 0xFFFFFFFF00000000LL; return v23 | (unsigned int)v14; }
js_regexp_constructor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RDX MOV qword ptr [RSP + 0x28],RSI MOV R14,RDI MOV R12,qword ptr [R8] MOV RBP,qword ptr [R8 + 0x8] MOV RAX,qword ptr [R8 + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [R8 + 0x18] MOV qword ptr [RSP + 0x10],RAX MOV RSI,R12 MOV RDX,RBP CALL 0x00140f26 PUSH 0x6 POP R13 TEST EAX,EAX JS 0x0012c528 MOV EBX,EAX CMP R15D,0x3 JNZ 0x0012c382 MOV RAX,qword ptr [R14 + 0x18] MOV RAX,qword ptr [RAX + 0x108] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x28],RCX MOV R15,qword ptr [RAX + 0x10] TEST EBX,EBX SETNZ AL CMP dword ptr [RSP + 0x10],0x3 SETZ CL AND CL,AL CMP CL,0x1 JNZ 0x0012c382 MOV qword ptr [RSP + 0x20],R15 PUSH 0x3d POP RCX MOV RDI,R14 MOV RSI,R12 MOV RDX,RBP CALL 0x0011a4c7 MOV R13,RAX MOV R15,RDX CMP R15D,0x6 JNZ 0x0012c32a MOV RAX,-0x100000000 MOV RCX,R13 AND RCX,RAX MOV R12,R13 MOV R13,R15 JMP 0x0012c52d LAB_0012c32a: MOV RDI,R14 MOV RSI,R13 MOV RDX,R15 MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x20] CALL 0x0011f3b6 MOV dword ptr [RSP + 0x34],EAX MOV RDI,R14 MOV RSI,R13 MOV RDX,R15 MOV R15,qword ptr [RSP + 0x20] CALL 0x001174a2 CMP dword ptr [RSP + 0x34],0x0 PUSH 0x6 POP R13 JZ 0x0012c382 CMP EBP,-0x9 JC 0x0012c36d INC dword ptr [R12] LAB_0012c36d: MOV RCX,-0x100000000 AND RCX,R12 MOV R13,RBP JMP 0x0012c52d LAB_0012c382: CMP EBP,-0x1 MOV qword ptr [RSP + 0x20],R15 JNZ 0x0012c3c8 CMP word ptr [R12 + 0x6],0x12 JNZ 0x0012c3c8 MOV RBX,qword ptr [R12 + 0x30] INC dword ptr [RBX] MOV RDX,qword ptr [RSP + 0x10] CMP EDX,0x3 JNZ 0x0012c437 MOV RAX,qword ptr [R12 + 0x38] INC dword ptr [RAX] MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],-0x7 PUSH -0x7 POP R15 JMP 0x0012c553 LAB_0012c3c8: TEST EBX,EBX JZ 0x0012c3f4 PUSH 0x6d POP RCX MOV RDI,R14 MOV RSI,R12 MOV RDX,RBP CALL 0x0011a4c7 MOV RBX,RAX MOV R15,RDX CMP R15D,0x6 JNZ 0x0012c40c PUSH 0x3 POP RBP XOR R12D,R12D JMP 0x0012c50c LAB_0012c3f4: CMP EBP,-0x9 JC 0x0012c3fd INC dword ptr [R12] LAB_0012c3fd: CMP dword ptr [RSP + 0x10],-0x9 JNC 0x0012c467 MOV RBX,R12 MOV R15,RBP JMP 0x0012c47e LAB_0012c40c: MOV RAX,qword ptr [RSP + 0x10] CMP EAX,0x3 JNZ 0x0012c45c PUSH 0x6e POP RCX MOV RDI,R14 MOV RSI,R12 MOV RDX,RBP CALL 0x0011a4c7 MOV R12,RAX MOV RBP,RDX CMP EBP,0x6 JNZ 0x0012c488 JMP 0x0012c50c LAB_0012c437: MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x18] CALL 0x0011a4c0 MOV R12,RAX MOV RBP,RDX PUSH -0x7 POP R15 CMP EBP,0x6 JNZ 0x0012c4e9 JMP 0x0012c50c LAB_0012c45c: MOV R12,RBX MOV RBP,R15 CMP EAX,-0xa JBE 0x0012c47e LAB_0012c467: MOV RAX,qword ptr [RSP + 0x18] INC dword ptr [RAX] MOV RBX,R12 MOV R12,RAX MOV R15,RBP MOV RBP,qword ptr [RSP + 0x10] JMP 0x0012c488 LAB_0012c47e: MOV RBP,qword ptr [RSP + 0x10] MOV R12,qword ptr [RSP + 0x18] LAB_0012c488: CMP R15D,0x3 JNZ 0x0012c4a1 PUSH 0x2f POP RSI MOV RDI,R14 CALL 0x00119e14 MOV RBX,RAX MOV R15,RDX JMP 0x0012c4e9 LAB_0012c4a1: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0011a4c0 MOV qword ptr [RSP + 0x18],R12 MOV R12,RAX MOV qword ptr [RSP + 0x10],RBP MOV RBP,R13 MOV R13,RDX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x001174a2 MOV RBX,R12 MOV R12,qword ptr [RSP + 0x18] MOV R15,R13 CMP R13D,0x6 MOV R13,RBP MOV RBP,qword ptr [RSP + 0x10] JZ 0x0012c50c LAB_0012c4e9: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 MOV R8,RBP CALL 0x0012c041 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX CMP EDX,0x6 JNZ 0x0012c545 LAB_0012c50c: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x001174a2 MOV RDI,R14 MOV RSI,R12 MOV RDX,RBP CALL 0x001174a2 LAB_0012c528: XOR R12D,R12D XOR ECX,ECX LAB_0012c52d: MOV EAX,R12D OR RAX,RCX MOV RDX,R13 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012c545: MOV RDI,R14 MOV RSI,R12 MOV RDX,RBP CALL 0x001174a2 LAB_0012c553: MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,RBX MOV R8,R15 CALL 0x00136e7f MOV R12,RAX MOV R13,RDX MOV RCX,-0x100000000 AND RCX,RAX JMP 0x0012c52d
int1 [16] js_regexp_constructor (long param_1,int8 param_2,int8 param_3,int8 param_4, int1 (*param_5) [16],int8 param_6) { int1 (*pauVar1) [16]; int *piVar2; int *piVar3; long lVar4; int *piVar5; int iVar6; int iVar7; ulong uVar8; int8 uVar9; uint uVar10; int8 uVar11; int1 auVar12 [16]; int1 auVar13 [16]; int1 auVar14 [16]; int1 auVar15 [12]; uint local_68; int8 local_50; int4 local_40; int4 uStack_38; piVar2 = *(int **)*param_5; uVar9 = *(int8 *)(*param_5 + 8); auVar14 = *param_5; pauVar1 = param_5 + 1; piVar3 = *(int **)*pauVar1; uVar11 = *(int8 *)(param_5[1] + 8); auVar13 = *pauVar1; iVar6 = js_is_regexp(param_1,piVar2,uVar9); if (-1 < iVar6) { uVar10 = (uint)uVar9; local_68 = (uint)uVar11; local_50 = param_2; if ((int)param_3 == 3) { lVar4 = *(long *)(*(long *)(param_1 + 0x18) + 0x108); local_50 = *(int8 *)(lVar4 + 8); param_3 = *(int8 *)(lVar4 + 0x10); if (local_68 == 3 && iVar6 != 0) { auVar12 = JS_GetProperty(param_1,piVar2,uVar9,0x3d); uVar8 = auVar12._0_8_; if (auVar12._8_4_ == 6) { uVar8 = uVar8 & 0xffffffff00000000; auVar14 = auVar12; goto LAB_0012c52d; } iVar7 = js_same_value(param_1,uVar8,auVar12._8_8_,local_50,param_3); JS_FreeValue(param_1,uVar8,auVar12._8_8_); if (iVar7 != 0) { if (0xfffffff6 < uVar10) { *piVar2 = *piVar2 + 1; } uVar8 = (ulong)piVar2 & 0xffffffff00000000; goto LAB_0012c52d; } } } if ((uVar10 == 0xffffffff) && (*(short *)((long)piVar2 + 6) == 0x12)) { piVar5 = *(int **)(piVar2 + 0xc); *piVar5 = *piVar5 + 1; if (local_68 == 3) { piVar2 = *(int **)(piVar2 + 0xe); *piVar2 = *piVar2 + 1; auVar15._8_4_ = 0xfffffff9; auVar15._0_8_ = piVar2; auVar14._8_8_ = 0xfffffffffffffff9; auVar14._0_8_ = piVar5; LAB_0012c553: uStack_38 = auVar15._8_4_; local_40 = auVar15._0_4_; auVar14 = js_regexp_constructor_internal (param_1,local_50,param_3,auVar14._0_8_,auVar14._8_8_,param_6,local_40, uStack_38); uVar8 = auVar14._0_8_ & 0xffffffff00000000; goto LAB_0012c52d; } auVar12 = JS_ToString(param_1,piVar3); auVar14._8_8_ = 0xfffffffffffffff9; auVar14._0_8_ = piVar5; iVar6 = auVar12._8_4_; joined_r0x0012c451: if (iVar6 != 6) goto LAB_0012c4e9; } else if (iVar6 == 0) { if (0xfffffff6 < uVar10) { *piVar2 = *piVar2 + 1; } joined_r0x0012c402: auVar12 = *pauVar1; if (0xfffffff6 < local_68) { *piVar3 = *piVar3 + 1; auVar12 = auVar13; } LAB_0012c488: uVar11 = auVar14._8_8_; uVar9 = auVar14._0_8_; if (auVar14._8_4_ != 3) { auVar14 = JS_ToString(param_1,uVar9,uVar11); JS_FreeValue(param_1,uVar9,uVar11); iVar6 = auVar14._8_4_; goto joined_r0x0012c451; } auVar14 = JS_AtomToString(param_1,0x2f); LAB_0012c4e9: auVar15 = js_compile_regexp(param_1,auVar14._0_8_,auVar14._8_8_,auVar12._0_8_,auVar12._8_8_); if (auVar15._8_4_ != 6) { JS_FreeValue(param_1,auVar12._0_8_,auVar12._8_8_); goto LAB_0012c553; } } else { auVar14 = JS_GetProperty(param_1,piVar2,uVar9,0x6d); if (auVar14._8_4_ != 6) { if (local_68 != 3) goto joined_r0x0012c402; auVar12 = JS_GetProperty(param_1,piVar2,uVar9,0x6e); if (auVar12._8_4_ == 6) goto LAB_0012c50c; goto LAB_0012c488; } auVar12 = ZEXT816(3) << 0x40; } LAB_0012c50c: JS_FreeValue(param_1,auVar14._0_8_,auVar14._8_8_); JS_FreeValue(param_1,auVar12._0_8_,auVar12._8_8_); } auVar14 = ZEXT816(6) << 0x40; uVar8 = 0; LAB_0012c52d: auVar13._0_8_ = auVar14._0_8_ & 0xffffffff | uVar8; auVar13._8_8_ = auVar14._8_8_; return auVar13; }
28,643
js_regexp_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { JSValue pattern, flags, bc, val; JSValue pat, flags1; JSRegExp *re; int pat_is_regexp; pat = argv[0]; flags1 = argv[1]; pat_is_regexp = js_is_regexp(ctx, pat); if (pat_is_regexp < 0) return JS_EXCEPTION; if (JS_IsUndefined(new_target)) { /* called as a function */ new_target = JS_GetActiveFunction(ctx); if (pat_is_regexp && JS_IsUndefined(flags1)) { JSValue ctor; BOOL res; ctor = JS_GetProperty(ctx, pat, JS_ATOM_constructor); if (JS_IsException(ctor)) return ctor; res = js_same_value(ctx, ctor, new_target); JS_FreeValue(ctx, ctor); if (res) return js_dup(pat); } } re = js_get_regexp(ctx, pat, FALSE); if (re) { pattern = js_dup(JS_MKPTR(JS_TAG_STRING, re->pattern)); if (JS_IsUndefined(flags1)) { bc = js_dup(JS_MKPTR(JS_TAG_STRING, re->bytecode)); goto no_compilation; } else { flags = JS_ToString(ctx, flags1); if (JS_IsException(flags)) goto fail; } } else { flags = JS_UNDEFINED; if (pat_is_regexp) { pattern = JS_GetProperty(ctx, pat, JS_ATOM_source); if (JS_IsException(pattern)) goto fail; if (JS_IsUndefined(flags1)) { flags = JS_GetProperty(ctx, pat, JS_ATOM_flags); if (JS_IsException(flags)) goto fail; } else { flags = js_dup(flags1); } } else { pattern = js_dup(pat); flags = js_dup(flags1); } if (JS_IsUndefined(pattern)) { pattern = JS_AtomToString(ctx, JS_ATOM_empty_string); } else { val = pattern; pattern = JS_ToString(ctx, val); JS_FreeValue(ctx, val); if (JS_IsException(pattern)) goto fail; } } bc = js_compile_regexp(ctx, pattern, flags); if (JS_IsException(bc)) goto fail; JS_FreeValue(ctx, flags); no_compilation: return js_regexp_constructor_internal(ctx, new_target, pattern, bc); fail: JS_FreeValue(ctx, pattern); JS_FreeValue(ctx, flags); return JS_EXCEPTION; }
O3
c
js_regexp_constructor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r13 movq %rsi, 0x18(%rsp) movq %rdi, %rbx movq (%r8), %rbp movq 0x8(%r8), %r15 movq 0x10(%r8), %rax movq %rax, 0x8(%rsp) movq 0x18(%r8), %r14 movq %rbp, %rsi movq %r15, %rdx callq 0x4d878 testl %eax, %eax js 0x33d9c movl %eax, %r12d cmpl $0x3, %r13d jne 0x33b89 movq 0x18(%rbx), %rax movq 0x108(%rax), %rax movq 0x8(%rax), %rcx movq %rcx, 0x18(%rsp) movq 0x10(%rax), %r13 testl %r12d, %r12d setne %al cmpl $0x3, %r14d sete %cl andb %al, %cl cmpb $0x1, %cl jne 0x33b89 movq %r13, 0x10(%rsp) movq %r14, 0x30(%rsp) movq %rbx, %rdi movq %rbp, %rsi movq %r15, %rdx movl $0x3d, %ecx movq %rbp, %r8 movq %r15, %r9 pushq $0x0 pushq $0x0 callq 0x22c0f addq $0x10, %rsp movq %rax, %r14 movq %rdx, %r13 cmpl $0x6, %r13d jne 0x33b1f movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r14, %rcx andq %rax, %rcx movq %r14, %rbp movq %r13, %r15 jmp 0x33da6 movq %rbx, %rdi movq %r14, %rsi movq %r13, %rdx movq 0x18(%rsp), %rcx movq 0x10(%rsp), %r8 callq 0x25ea9 cmpl $-0x9, %r13d jb 0x33b60 movq 0x18(%rbx), %rdi movl (%r14), %edx leal -0x1(%rdx), %ecx movl %ecx, (%r14) cmpl $0x1, %edx jg 0x33b60 movq %r14, %rsi movl %eax, %r14d movq %r13, %rdx callq 0x20d90 movl %r14d, %eax testl %eax, %eax movq 0x30(%rsp), %r14 movq 0x10(%rsp), %r13 je 0x33b89 cmpl $-0x9, %r15d jb 0x33b77 incl (%rbp) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rbp, %rcx jmp 0x33da6 cmpl $-0x1, %r15d movq %r13, 0x10(%rsp) jne 0x33bcd cmpw $0x12, 0x6(%rbp) jne 0x33bcd movq 0x30(%rbp), %r13 incl (%r13) cmpl $0x3, %r14d jne 0x33c68 movq 0x38(%rbp), %rax incl (%rax) movq %rax, 0x20(%rsp) movq $-0x7, 0x28(%rsp) movq $-0x7, %r15 jmp 0x33de0 testl %r12d, %r12d je 0x33c0f movq %rbx, %rdi movq %rbp, %rsi movq %r15, %rdx movl $0x6d, %ecx movq %rbp, %r8 movq %r15, %r9 pushq $0x0 pushq $0x0 callq 0x22c0f addq $0x10, %rsp movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x33c2d movl $0x3, %r14d xorl %ebp, %ebp movq %r12, %r15 jmp 0x33d52 cmpl $-0x9, %r15d jb 0x33c18 incl (%rbp) cmpl $-0x9, %r14d jae 0x33ca2 movq %rbp, %r13 movq %r15, %r12 jmp 0x33cb4 cmpl $0x3, %r14d jne 0x33c96 movq %rbx, %rdi movq %rbp, %rsi movq %r15, %rdx movl $0x6e, %ecx movq %rbp, %r8 movq %r15, %r9 pushq $0x0 pushq $0x0 callq 0x22c0f addq $0x10, %rsp movq %rax, %rbp movq %rdx, %r14 movq %r12, %r15 cmpl $0x6, %r14d jne 0x33cb9 jmp 0x33d52 movq %rbx, %rdi movq 0x8(%rsp), %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x27518 movq %rax, %rbp movq %rdx, %r14 cmpl $0x6, %r14d jne 0x33cd2 addq $0x18, %rbx movq $-0x7, %r15 jmp 0x33d5c movq %r13, %rbp movq %r12, %r15 cmpl $-0xa, %r14d jbe 0x33cb4 movq 0x8(%rsp), %rax incl (%rax) movq %rbp, %r13 movq %rax, %rbp movq %r15, %r12 jmp 0x33cb9 movq 0x8(%rsp), %rbp cmpl $0x3, %r12d jne 0x33cdb movq 0x18(%rbx), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %r13 incl (%r13) movq $-0x7, %r15 jmp 0x33d2f movq %rbp, 0x8(%rsp) movq %r14, %rbp movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0x27518 movq %rax, %r14 movq %rdx, %r15 cmpl $-0x9, %r12d jb 0x33d1e movq 0x18(%rbx), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x33d1e movq %r13, %rsi movq %r12, %rdx callq 0x20d90 movq %r14, %r13 cmpl $0x6, %r15d movq %rbp, %r14 movq 0x8(%rsp), %rbp je 0x33d52 movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx movq %rbp, %rcx movq %r14, %r8 callq 0x33773 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) cmpl $0x6, %edx jne 0x33dbd addq $0x18, %rbx cmpl $-0x9, %r15d jb 0x33d7a movq (%rbx), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x33d7a movq %r13, %rsi movq %r15, %rdx callq 0x20d90 cmpl $-0x9, %r14d jb 0x33d9c movq (%rbx), %rdi movl (%rbp), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbp) cmpl $0x1, %eax jg 0x33d9c movq %rbp, %rsi movq %r14, %rdx callq 0x20d90 xorl %ebp, %ebp xorl %ecx, %ecx movl $0x6, %r15d movl %ebp, %eax orq %rcx, %rax movq %r15, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $-0x9, %r14d jb 0x33de0 movq 0x18(%rbx), %rdi movl (%rbp), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbp) cmpl $0x1, %eax jg 0x33de0 movq %rbp, %rsi movq %r14, %rdx callq 0x20d90 subq $0x10, %rsp movups 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rbx, %rdi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx movq %r13, %rcx movq %r15, %r8 callq 0x402e0 addq $0x10, %rsp movq %rax, %rbp movq %rdx, %r15 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x33da6
js_regexp_constructor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r13, rdx mov [rsp+68h+var_50], rsi mov rbx, rdi mov rbp, [r8] mov r15, [r8+8] mov rax, [r8+10h] mov [rsp+68h+var_60], rax mov r14, [r8+18h] mov rsi, rbp mov rdx, r15 call js_is_regexp test eax, eax js loc_33D9C mov r12d, eax cmp r13d, 3 jnz loc_33B89 mov rax, [rbx+18h] mov rax, [rax+108h] mov rcx, [rax+8] mov [rsp+68h+var_50], rcx mov r13, [rax+10h] test r12d, r12d setnz al cmp r14d, 3 setz cl and cl, al cmp cl, 1 jnz loc_33B89 mov [rsp+68h+var_58], r13 mov [rsp+68h+var_38], r14 mov rdi, rbx mov rsi, rbp mov rdx, r15 mov ecx, 3Dh ; '=' mov r8, rbp mov r9, r15 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r14, rax mov r13, rdx cmp r13d, 6 jnz short loc_33B1F mov rax, 0FFFFFFFF00000000h mov rcx, r14 and rcx, rax mov rbp, r14 mov r15, r13 jmp loc_33DA6 loc_33B1F: mov rdi, rbx mov rsi, r14 mov rdx, r13 mov rcx, [rsp+68h+var_50] mov r8, [rsp+68h+var_58] call js_same_value cmp r13d, 0FFFFFFF7h jb short loc_33B60 mov rdi, [rbx+18h] mov edx, [r14] lea ecx, [rdx-1] mov [r14], ecx cmp edx, 1 jg short loc_33B60 mov rsi, r14 mov r14d, eax mov rdx, r13 call js_free_value_rt mov eax, r14d loc_33B60: test eax, eax mov r14, [rsp+68h+var_38] mov r13, [rsp+68h+var_58] jz short loc_33B89 cmp r15d, 0FFFFFFF7h jb short loc_33B77 inc dword ptr [rbp+0] loc_33B77: mov rcx, 0FFFFFFFF00000000h and rcx, rbp jmp loc_33DA6 loc_33B89: cmp r15d, 0FFFFFFFFh mov [rsp+68h+var_58], r13 jnz short loc_33BCD cmp word ptr [rbp+6], 12h jnz short loc_33BCD mov r13, [rbp+30h] inc dword ptr [r13+0] cmp r14d, 3 jnz loc_33C68 mov rax, [rbp+38h] inc dword ptr [rax] mov qword ptr [rsp+68h+var_48], rax mov qword ptr [rsp+68h+var_48+8], 0FFFFFFFFFFFFFFF9h mov r15, 0FFFFFFFFFFFFFFF9h jmp loc_33DE0 loc_33BCD: test r12d, r12d jz short loc_33C0F mov rdi, rbx mov rsi, rbp mov rdx, r15 mov ecx, 6Dh ; 'm' mov r8, rbp mov r9, r15 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r13, rax mov r12, rdx cmp r12d, 6 jnz short loc_33C2D mov r14d, 3 xor ebp, ebp mov r15, r12 jmp loc_33D52 loc_33C0F: cmp r15d, 0FFFFFFF7h jb short loc_33C18 inc dword ptr [rbp+0] loc_33C18: cmp r14d, 0FFFFFFF7h jnb loc_33CA2 mov r13, rbp mov r12, r15 jmp loc_33CB4 loc_33C2D: cmp r14d, 3 jnz short loc_33C96 mov rdi, rbx mov rsi, rbp mov rdx, r15 mov ecx, 6Eh ; 'n' mov r8, rbp mov r9, r15 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rbp, rax mov r14, rdx mov r15, r12 cmp r14d, 6 jnz short loc_33CB9 jmp loc_33D52 loc_33C68: mov rdi, rbx mov rsi, [rsp+68h+var_60] mov rdx, r14 xor ecx, ecx call JS_ToStringInternal mov rbp, rax mov r14, rdx cmp r14d, 6 jnz short loc_33CD2 add rbx, 18h mov r15, 0FFFFFFFFFFFFFFF9h jmp loc_33D5C loc_33C96: mov rbp, r13 mov r15, r12 cmp r14d, 0FFFFFFF6h jbe short loc_33CB4 loc_33CA2: mov rax, [rsp+68h+var_60] inc dword ptr [rax] mov r13, rbp mov rbp, rax mov r12, r15 jmp short loc_33CB9 loc_33CB4: mov rbp, [rsp+68h+var_60] loc_33CB9: cmp r12d, 3 jnz short loc_33CDB mov rax, [rbx+18h] mov rax, [rax+68h] mov r13, [rax+178h] inc dword ptr [r13+0] loc_33CD2: mov r15, 0FFFFFFFFFFFFFFF9h jmp short loc_33D2F loc_33CDB: mov [rsp+68h+var_60], rbp mov rbp, r14 mov rdi, rbx mov rsi, r13 mov rdx, r12 xor ecx, ecx call JS_ToStringInternal mov r14, rax mov r15, rdx cmp r12d, 0FFFFFFF7h jb short loc_33D1E mov rdi, [rbx+18h] mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg short loc_33D1E mov rsi, r13 mov rdx, r12 call js_free_value_rt loc_33D1E: mov r13, r14 cmp r15d, 6 mov r14, rbp mov rbp, [rsp+68h+var_60] jz short loc_33D52 loc_33D2F: mov rdi, rbx mov rsi, r13 mov rdx, r15 mov rcx, rbp mov r8, r14 call js_compile_regexp mov qword ptr [rsp+68h+var_48], rax mov qword ptr [rsp+68h+var_48+8], rdx cmp edx, 6 jnz short loc_33DBD loc_33D52: add rbx, 18h cmp r15d, 0FFFFFFF7h jb short loc_33D7A loc_33D5C: mov rdi, [rbx] mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg short loc_33D7A mov rsi, r13 mov rdx, r15 call js_free_value_rt loc_33D7A: cmp r14d, 0FFFFFFF7h jb short loc_33D9C mov rdi, [rbx] mov eax, [rbp+0] lea ecx, [rax-1] mov [rbp+0], ecx cmp eax, 1 jg short loc_33D9C mov rsi, rbp mov rdx, r14 call js_free_value_rt loc_33D9C: xor ebp, ebp xor ecx, ecx mov r15d, 6 loc_33DA6: mov eax, ebp or rax, rcx mov rdx, r15 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_33DBD: cmp r14d, 0FFFFFFF7h jb short loc_33DE0 mov rdi, [rbx+18h] mov eax, [rbp+0] lea ecx, [rax-1] mov [rbp+0], ecx cmp eax, 1 jg short loc_33DE0 mov rsi, rbp mov rdx, r14 call js_free_value_rt loc_33DE0: sub rsp, 10h movups xmm0, [rsp+78h+var_48] movups [rsp+78h+var_78], xmm0 mov rdi, rbx mov rsi, [rsp+78h+var_50] mov rdx, [rsp+78h+var_58] mov rcx, r13 mov r8, r15 call js_regexp_constructor_internal add rsp, 10h mov rbp, rax mov r15, rdx mov rcx, 0FFFFFFFF00000000h and rcx, rax jmp short loc_33DA6
unsigned long long js_regexp_constructor( long long a1, int a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long *a13) { long long v13; // r13 long long v15; // rbp long long v16; // r15 long long v17; // r14 int is_regexp; // eax long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 int v23; // r12d long long v24; // rax unsigned long long PropertyInternal2; // rax long long v26; // rdx int *v27; // r14 long long v28; // r13 unsigned long long v29; // rcx int v30; // eax long long v31; // rdi int v32; // edx long long v33; // rcx int *v34; // rsi int v35; // r14d int *v36; // r13 _DWORD *v37; // rax long long v38; // r15 unsigned long long v39; // rax long long v40; // rdx long long v41; // r12 int *v42; // rbp long long v43; // rdx long long v44; // rdx long long *v45; // rbx long long v46; // rbp unsigned long long v47; // r14 long long v48; // rdx long long v49; // rdi int v50; // eax long long v51; // rcx __int128 v52; // rax long long v53; // rdi int v54; // eax long long v55; // rcx long long v56; // rdi int v57; // eax long long v58; // rcx long long v60; // rdi int v61; // eax long long v62; // rcx long long v63; // rax int *v64; // [rsp+18h] [rbp-60h] int *v65; // [rsp+18h] [rbp-60h] long long v66; // [rsp+20h] [rbp-58h] int v67; // [rsp+20h] [rbp-58h] _DWORD *v68; // [rsp+28h] [rbp-50h] __int128 v69; // [rsp+30h] [rbp-48h] long long v70; // [rsp+40h] [rbp-38h] LODWORD(v13) = a3; LODWORD(v68) = a2; v15 = *a13; v16 = a13[1]; v64 = (int *)a13[2]; v17 = a13[3]; is_regexp = js_is_regexp(a1, *a13, v16); if ( is_regexp < 0 ) { LABEL_46: LODWORD(v15) = 0; v29 = 0LL; return v29 | (unsigned int)v15; } v23 = is_regexp; if ( (_DWORD)v13 != 3 ) goto LABEL_13; v24 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL); v68 = *(_DWORD **)(v24 + 8); v13 = *(_QWORD *)(v24 + 16); if ( v23 == 0 || (_DWORD)v17 != 3 ) goto LABEL_13; v66 = *(_QWORD *)(v24 + 16); v70 = v17; PropertyInternal2 = JS_GetPropertyInternal2(a1, v15, v16, 0x3Du, v15, v16, 0LL, 0); v27 = (int *)PropertyInternal2; v28 = v26; if ( (_DWORD)v26 == 6 ) { v29 = PropertyInternal2 & 0xFFFFFFFF00000000LL; LODWORD(v15) = PropertyInternal2; return v29 | (unsigned int)v15; } v30 = js_same_value(a1, (_DWORD *)PropertyInternal2, v26, v68, v66); if ( (unsigned int)v28 >= 0xFFFFFFF7 ) { v31 = *(_QWORD *)(a1 + 24); v32 = *v27; v33 = (unsigned int)(*v27 - 1); *v27 = v33; if ( v32 <= 1 ) { v34 = v27; v35 = v30; js_free_value_rt(v31, v34, v28, v33, v19, v20); v30 = v35; } } v17 = v70; LODWORD(v13) = v66; if ( !v30 ) { LABEL_13: v67 = v13; if ( (_DWORD)v16 == -1 && *(_WORD *)(v15 + 6) == 18 ) { v36 = *(int **)(v15 + 48); ++*v36; if ( (_DWORD)v17 == 3 ) { v37 = *(_DWORD **)(v15 + 56); ++*v37; *(_QWORD *)&v69 = v37; *((_QWORD *)&v69 + 1) = -7LL; LODWORD(v38) = -7; LABEL_51: v63 = js_regexp_constructor_internal(a1, (_DWORD)v68, v67, (_DWORD)v36, v38, v20, v69); LODWORD(v15) = v63; v29 = v63 & 0xFFFFFFFF00000000LL; return v29 | (unsigned int)v15; } v42 = (int *)JS_ToStringInternal(a1, v64, v17, 0LL, v19, v20, a4, a5, a6, a7, v21, v22, a10, a11); v17 = v44; if ( (_DWORD)v44 == 6 ) { v45 = (long long *)(a1 + 24); v38 = -7LL; goto LABEL_41; } goto LABEL_34; } if ( v23 ) { v39 = JS_GetPropertyInternal2(a1, v15, v16, 0x6Du, v15, v16, 0LL, 0); v36 = (int *)v39; v41 = v40; if ( (_DWORD)v40 == 6 ) { v17 = 3LL; v42 = 0LL; v38 = v40; goto LABEL_40; } if ( (_DWORD)v17 == 3 ) { v42 = (int *)JS_GetPropertyInternal2(a1, v15, v16, 0x6Eu, v15, v16, 0LL, 0); v17 = v43; v38 = v41; if ( (_DWORD)v43 == 6 ) goto LABEL_40; goto LABEL_32; } v15 = v39; v16 = v40; if ( (unsigned int)v17 > 0xFFFFFFF6 ) goto LABEL_30; } else { if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*(_DWORD *)v15; if ( (unsigned int)v17 >= 0xFFFFFFF7 ) { LABEL_30: ++*v64; v36 = (int *)v15; v42 = v64; v41 = v16; LABEL_32: if ( (_DWORD)v41 != 3 ) { v65 = v42; v46 = v17; v47 = JS_ToStringInternal(a1, v36, v41, 0LL, v19, v20, a4, a5, a6, a7, v21, v22, a10, a11); v38 = v48; if ( (unsigned int)v41 >= 0xFFFFFFF7 ) { v49 = *(_QWORD *)(a1 + 24); v50 = *v36; v51 = (unsigned int)(*v36 - 1); *v36 = v51; if ( v50 <= 1 ) js_free_value_rt(v49, v36, v41, v51, v19, v20); } v36 = (int *)v47; v17 = v46; v42 = v65; if ( (_DWORD)v38 == 6 ) goto LABEL_40; goto LABEL_39; } v36 = *(int **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*v36; LABEL_34: v38 = -7LL; LABEL_39: *(_QWORD *)&v52 = js_compile_regexp( a1, v36, v38, v42, v17, a4, a5, a6, a7, *(double *)v21.m128_u64, *(double *)v22.m128_u64, a10, a11); v69 = v52; if ( DWORD2(v52) != 6 ) { if ( (unsigned int)v17 >= 0xFFFFFFF7 ) { v60 = *(_QWORD *)(a1 + 24); v61 = *v42; v62 = (unsigned int)(*v42 - 1); *v42 = v62; if ( v61 <= 1 ) js_free_value_rt(v60, v42, v17, v62, v19, v20); } goto LABEL_51; } LABEL_40: v45 = (long long *)(a1 + 24); if ( (unsigned int)v38 < 0xFFFFFFF7 ) { LABEL_43: if ( (unsigned int)v17 >= 0xFFFFFFF7 ) { v56 = *v45; v57 = *v42; v58 = (unsigned int)(*v42 - 1); *v42 = v58; if ( v57 <= 1 ) js_free_value_rt(v56, v42, v17, v58, v19, v20); } goto LABEL_46; } LABEL_41: v53 = *v45; v54 = *v36; v55 = (unsigned int)(*v36 - 1); *v36 = v55; if ( v54 <= 1 ) js_free_value_rt(v53, v36, v38, v55, v19, v20); goto LABEL_43; } v36 = (int *)v15; v41 = v16; } v42 = v64; goto LABEL_32; } if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++*(_DWORD *)v15; v29 = v15 & 0xFFFFFFFF00000000LL; return v29 | (unsigned int)v15; }
js_regexp_constructor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R13,RDX MOV qword ptr [RSP + 0x18],RSI MOV RBX,RDI MOV RBP,qword ptr [R8] MOV R15,qword ptr [R8 + 0x8] MOV RAX,qword ptr [R8 + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV R14,qword ptr [R8 + 0x18] MOV RSI,RBP MOV RDX,R15 CALL 0x0014d878 TEST EAX,EAX JS 0x00133d9c MOV R12D,EAX CMP R13D,0x3 JNZ 0x00133b89 MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x108] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x18],RCX MOV R13,qword ptr [RAX + 0x10] TEST R12D,R12D SETNZ AL CMP R14D,0x3 SETZ CL AND CL,AL CMP CL,0x1 JNZ 0x00133b89 MOV qword ptr [RSP + 0x10],R13 MOV qword ptr [RSP + 0x30],R14 MOV RDI,RBX MOV RSI,RBP MOV RDX,R15 MOV ECX,0x3d MOV R8,RBP MOV R9,R15 PUSH 0x0 PUSH 0x0 CALL 0x00122c0f ADD RSP,0x10 MOV R14,RAX MOV R13,RDX CMP R13D,0x6 JNZ 0x00133b1f MOV RAX,-0x100000000 MOV RCX,R14 AND RCX,RAX MOV RBP,R14 MOV R15,R13 JMP 0x00133da6 LAB_00133b1f: MOV RDI,RBX MOV RSI,R14 MOV RDX,R13 MOV RCX,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x10] CALL 0x00125ea9 CMP R13D,-0x9 JC 0x00133b60 MOV RDI,qword ptr [RBX + 0x18] MOV EDX,dword ptr [R14] LEA ECX,[RDX + -0x1] MOV dword ptr [R14],ECX CMP EDX,0x1 JG 0x00133b60 MOV RSI,R14 MOV R14D,EAX MOV RDX,R13 CALL 0x00120d90 MOV EAX,R14D LAB_00133b60: TEST EAX,EAX MOV R14,qword ptr [RSP + 0x30] MOV R13,qword ptr [RSP + 0x10] JZ 0x00133b89 CMP R15D,-0x9 JC 0x00133b77 INC dword ptr [RBP] LAB_00133b77: MOV RCX,-0x100000000 AND RCX,RBP JMP 0x00133da6 LAB_00133b89: CMP R15D,-0x1 MOV qword ptr [RSP + 0x10],R13 JNZ 0x00133bcd CMP word ptr [RBP + 0x6],0x12 JNZ 0x00133bcd MOV R13,qword ptr [RBP + 0x30] INC dword ptr [R13] CMP R14D,0x3 JNZ 0x00133c68 MOV RAX,qword ptr [RBP + 0x38] INC dword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],-0x7 MOV R15,-0x7 JMP 0x00133de0 LAB_00133bcd: TEST R12D,R12D JZ 0x00133c0f MOV RDI,RBX MOV RSI,RBP MOV RDX,R15 MOV ECX,0x6d MOV R8,RBP MOV R9,R15 PUSH 0x0 PUSH 0x0 CALL 0x00122c0f ADD RSP,0x10 MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JNZ 0x00133c2d MOV R14D,0x3 XOR EBP,EBP MOV R15,R12 JMP 0x00133d52 LAB_00133c0f: CMP R15D,-0x9 JC 0x00133c18 INC dword ptr [RBP] LAB_00133c18: CMP R14D,-0x9 JNC 0x00133ca2 MOV R13,RBP MOV R12,R15 JMP 0x00133cb4 LAB_00133c2d: CMP R14D,0x3 JNZ 0x00133c96 MOV RDI,RBX MOV RSI,RBP MOV RDX,R15 MOV ECX,0x6e MOV R8,RBP MOV R9,R15 PUSH 0x0 PUSH 0x0 CALL 0x00122c0f ADD RSP,0x10 MOV RBP,RAX MOV R14,RDX MOV R15,R12 CMP R14D,0x6 JNZ 0x00133cb9 JMP 0x00133d52 LAB_00133c68: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R14 XOR ECX,ECX CALL 0x00127518 MOV RBP,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x00133cd2 ADD RBX,0x18 MOV R15,-0x7 JMP 0x00133d5c LAB_00133c96: MOV RBP,R13 MOV R15,R12 CMP R14D,-0xa JBE 0x00133cb4 LAB_00133ca2: MOV RAX,qword ptr [RSP + 0x8] INC dword ptr [RAX] MOV R13,RBP MOV RBP,RAX MOV R12,R15 JMP 0x00133cb9 LAB_00133cb4: MOV RBP,qword ptr [RSP + 0x8] LAB_00133cb9: CMP R12D,0x3 JNZ 0x00133cdb MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV R13,qword ptr [RAX + 0x178] INC dword ptr [R13] LAB_00133cd2: MOV R15,-0x7 JMP 0x00133d2f LAB_00133cdb: MOV qword ptr [RSP + 0x8],RBP MOV RBP,R14 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 XOR ECX,ECX CALL 0x00127518 MOV R14,RAX MOV R15,RDX CMP R12D,-0x9 JC 0x00133d1e MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x00133d1e MOV RSI,R13 MOV RDX,R12 CALL 0x00120d90 LAB_00133d1e: MOV R13,R14 CMP R15D,0x6 MOV R14,RBP MOV RBP,qword ptr [RSP + 0x8] JZ 0x00133d52 LAB_00133d2f: MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 MOV RCX,RBP MOV R8,R14 CALL 0x00133773 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX CMP EDX,0x6 JNZ 0x00133dbd LAB_00133d52: ADD RBX,0x18 CMP R15D,-0x9 JC 0x00133d7a LAB_00133d5c: MOV RDI,qword ptr [RBX] MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x00133d7a MOV RSI,R13 MOV RDX,R15 CALL 0x00120d90 LAB_00133d7a: CMP R14D,-0x9 JC 0x00133d9c MOV RDI,qword ptr [RBX] MOV EAX,dword ptr [RBP] LEA ECX,[RAX + -0x1] MOV dword ptr [RBP],ECX CMP EAX,0x1 JG 0x00133d9c MOV RSI,RBP MOV RDX,R14 CALL 0x00120d90 LAB_00133d9c: XOR EBP,EBP XOR ECX,ECX MOV R15D,0x6 LAB_00133da6: MOV EAX,EBP OR RAX,RCX MOV RDX,R15 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00133dbd: CMP R14D,-0x9 JC 0x00133de0 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RBP] LEA ECX,[RAX + -0x1] MOV dword ptr [RBP],ECX CMP EAX,0x1 JG 0x00133de0 MOV RSI,RBP MOV RDX,R14 CALL 0x00120d90 LAB_00133de0: SUB RSP,0x10 MOVUPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,R13 MOV R8,R15 CALL 0x001402e0 ADD RSP,0x10 MOV RBP,RAX MOV R15,RDX MOV RCX,-0x100000000 AND RCX,RAX JMP 0x00133da6
int1 [16] js_regexp_constructor (long param_1,int8 param_2,int8 param_3,int8 param_4, int1 (*param_5) [16]) { int1 (*pauVar1) [16]; int iVar2; int *piVar3; int8 uVar4; long lVar5; int8 uVar6; int iVar7; int iVar8; ulong uVar9; int extraout_EDX; int *piVar10; uint uVar11; int *piVar13; uint uVar14; int1 auVar15 [16]; int1 auVar16 [16]; int1 auVar17 [16]; int8 local_50; int8 uVar12; piVar10 = *(int **)*param_5; uVar12 = *(int8 *)(*param_5 + 8); auVar17 = *param_5; pauVar1 = param_5 + 1; piVar3 = *(int **)*pauVar1; uVar4 = *(int8 *)(param_5[1] + 8); auVar16 = *pauVar1; iVar7 = js_is_regexp(param_1,piVar10,uVar12); if (-1 < iVar7) { uVar14 = (uint)uVar12; uVar11 = (uint)uVar4; local_50 = param_2; if ((int)param_3 == 3) { lVar5 = *(long *)(*(long *)(param_1 + 0x18) + 0x108); local_50 = *(int8 *)(lVar5 + 8); param_3 = *(int8 *)(lVar5 + 0x10); if (uVar11 == 3 && iVar7 != 0) { auVar15 = JS_GetPropertyInternal2(param_1,piVar10,uVar12,0x3d,piVar10,uVar12,0,0); piVar13 = auVar15._0_8_; if (auVar15._8_4_ == 6) { uVar9 = (ulong)piVar13 & 0xffffffff00000000; auVar17 = auVar15; goto LAB_00133da6; } iVar8 = js_same_value(param_1,piVar13,auVar15._8_8_,local_50,param_3); if (0xfffffff6 < auVar15._8_4_) { uVar6 = *(int8 *)(param_1 + 0x18); iVar2 = *piVar13; *piVar13 = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar6,piVar13,auVar15._8_8_); } } if (iVar8 != 0) { if (0xfffffff6 < uVar14) { *piVar10 = *piVar10 + 1; } uVar9 = (ulong)piVar10 & 0xffffffff00000000; goto LAB_00133da6; } } } if ((uVar14 == 0xffffffff) && (*(short *)((long)piVar10 + 6) == 0x12)) { piVar13 = *(int **)(piVar10 + 0xc); *piVar13 = *piVar13 + 1; if (uVar11 == 3) { **(int **)(piVar10 + 0xe) = **(int **)(piVar10 + 0xe) + 1; auVar17._8_8_ = 0xfffffffffffffff9; auVar17._0_8_ = piVar13; LAB_00133de0: auVar17 = js_regexp_constructor_internal (param_1,local_50,param_3,auVar17._0_8_,auVar17._8_8_); uVar9 = auVar17._0_8_ & 0xffffffff00000000; goto LAB_00133da6; } auVar15 = JS_ToStringInternal(param_1,piVar3,uVar4,0); if (auVar15._8_4_ != 6) goto LAB_00133cd2; auVar17._8_8_ = 0xfffffffffffffff9; auVar17._0_8_ = piVar13; LAB_00133d5c: piVar10 = auVar17._0_8_; uVar12 = *(int8 *)(param_1 + 0x18); iVar7 = *piVar10; *piVar10 = iVar7 + -1; if (iVar7 < 2) { js_free_value_rt(uVar12,piVar10,auVar17._8_8_); } } else { if (iVar7 == 0) { if (0xfffffff6 < uVar14) { *piVar10 = *piVar10 + 1; } joined_r0x00133c1c: auVar15 = *pauVar1; if (0xfffffff6 < uVar11) { *piVar3 = *piVar3 + 1; auVar15 = auVar16; } LAB_00133cb9: uVar12 = auVar17._8_8_; piVar10 = auVar17._0_8_; uVar11 = auVar17._8_4_; if (uVar11 == 3) { piVar13 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); *piVar13 = *piVar13 + 1; LAB_00133cd2: auVar17._8_8_ = 0xfffffffffffffff9; auVar17._0_8_ = piVar13; } else { auVar17 = JS_ToStringInternal(param_1,piVar10,uVar12,0); if (0xfffffff6 < uVar11) { uVar4 = *(int8 *)(param_1 + 0x18); iVar7 = *piVar10; *piVar10 = iVar7 + -1; if (iVar7 < 2) { js_free_value_rt(uVar4,piVar10,uVar12); } } if (auVar17._8_4_ == 6) goto LAB_00133d52; } piVar10 = auVar15._0_8_; js_compile_regexp(param_1,auVar17._0_8_,auVar17._8_8_,piVar10,auVar15._8_8_); if (extraout_EDX != 6) { if (0xfffffff6 < auVar15._8_4_) { uVar12 = *(int8 *)(param_1 + 0x18); iVar7 = *piVar10; *piVar10 = iVar7 + -1; if (iVar7 < 2) { js_free_value_rt(uVar12,piVar10,auVar15._8_8_); } } goto LAB_00133de0; } } else { auVar17 = JS_GetPropertyInternal2(param_1,piVar10,uVar12,0x6d,piVar10,uVar12,0,0); if (auVar17._8_4_ != 6) { if (uVar11 != 3) goto joined_r0x00133c1c; auVar15 = JS_GetPropertyInternal2(param_1,piVar10,uVar12,0x6e,piVar10,uVar12,0,0); if (auVar15._8_4_ == 6) goto LAB_00133d52; goto LAB_00133cb9; } auVar15 = ZEXT816(3) << 0x40; } LAB_00133d52: if (0xfffffff6 < auVar17._8_4_) goto LAB_00133d5c; } piVar10 = auVar15._0_8_; if (0xfffffff6 < auVar15._8_4_) { uVar12 = *(int8 *)(param_1 + 0x18); iVar7 = *piVar10; *piVar10 = iVar7 + -1; if (iVar7 < 2) { js_free_value_rt(uVar12,piVar10,auVar15._8_8_); } } } uVar9 = 0; auVar17 = ZEXT816(6) << 0x40; LAB_00133da6: auVar16._0_8_ = auVar17._0_8_ & 0xffffffff | uVar9; auVar16._8_8_ = auVar17._8_8_; return auVar16; }
28,644
nglog::ReadEntireFile[abi:cxx11](_IO_FILE*)
ng-log[P]ng-log/src/googletest.h
static inline string ReadEntireFile(FILE* file) { const size_t file_size = GetFileSize(file); std::vector<char> content(file_size); size_t bytes_last_read = 0; // # of bytes read in the last fread() size_t bytes_read = 0; // # of bytes read so far fseek(file, 0, SEEK_SET); // Keep reading the file until we cannot read further or the // pre-determined file size is reached. do { bytes_last_read = fread(content.data() + bytes_read, 1, file_size - bytes_read, file); bytes_read += bytes_last_read; } while (bytes_last_read > 0 && bytes_read < file_size); return std::string(content.data(), bytes_read); }
O0
c
nglog::ReadEntireFile[abi:cxx11](_IO_FILE*): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x80(%rbp) movq %rdi, %rax movq %rax, -0x78(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0xc740 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x70(%rbp) leaq -0x31(%rbp), %rdi movq %rdi, -0x68(%rbp) callq 0x9d50 movq -0x70(%rbp), %rsi movq -0x68(%rbp), %rdx leaq -0x30(%rbp), %rdi callq 0x113e0 jmp 0xc5e3 leaq -0x31(%rbp), %rdi callq 0x97a0 movq $0x0, -0x50(%rbp) movq $0x0, -0x58(%rbp) movq -0x10(%rbp), %rdi xorl %edx, %edx movl %edx, %esi callq 0x9820 jmp 0xc60b jmp 0xc60d leaq -0x30(%rbp), %rdi callq 0x11450 movq %rax, %rdi movq -0x58(%rbp), %rax addq %rax, %rdi movq -0x18(%rbp), %rdx subq %rax, %rdx movq -0x10(%rbp), %rcx movl $0x1, %esi callq 0x9b60 movq %rax, -0x88(%rbp) jmp 0xc63e movq -0x88(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax addq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) xorl %eax, %eax cmpq $0x0, -0x50(%rbp) movb %al, -0x89(%rbp) jbe 0xc675 movq -0x58(%rbp), %rax cmpq -0x18(%rbp), %rax setb %al movb %al, -0x89(%rbp) movb -0x89(%rbp), %al testb $0x1, %al jne 0xc60d leaq -0x30(%rbp), %rdi callq 0x11450 movq %rax, -0xa8(%rbp) movq -0x58(%rbp), %rax movq %rax, -0xa0(%rbp) leaq -0x59(%rbp), %rdi movq %rdi, -0x98(%rbp) callq 0x9d50 movq -0x80(%rbp), %rdi movq -0xa8(%rbp), %rsi movq -0xa0(%rbp), %rdx movq -0x98(%rbp), %rcx callq 0x9840 jmp 0xc6ca leaq -0x59(%rbp), %rdi callq 0x97a0 leaq -0x30(%rbp), %rdi callq 0x11470 movq -0x78(%rbp), %rax addq $0xb0, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x31(%rbp), %rdi callq 0x97a0 jmp 0xc72c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0xc723 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x59(%rbp), %rdi callq 0x97a0 leaq -0x30(%rbp), %rdi callq 0x11470 movq -0x40(%rbp), %rdi callq 0x9d40 nopw %cs:(%rax,%rax)
_ZN5nglogL14ReadEntireFileB5cxx11EP8_IO_FILE: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_80], rdi mov rax, rdi mov [rbp+var_78], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] call _ZN5nglogL11GetFileSizeEP8_IO_FILE; nglog::GetFileSize(_IO_FILE *) mov [rbp+var_18], rax mov rax, [rbp+var_18] mov [rbp+var_70], rax lea rdi, [rbp+var_31] mov [rbp+var_68], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_70] mov rdx, [rbp+var_68] lea rdi, [rbp+var_30] call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&) jmp short $+2 loc_C5E3: lea rdi, [rbp+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_50], 0 mov [rbp+var_58], 0 mov rdi, [rbp+var_10] xor edx, edx mov esi, edx call _fseek jmp short $+2 loc_C60B: jmp short $+2 loc_C60D: lea rdi, [rbp+var_30] call _ZNSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void) mov rdi, rax mov rax, [rbp+var_58] add rdi, rax mov rdx, [rbp+var_18] sub rdx, rax mov rcx, [rbp+var_10] mov esi, 1 call _fread mov [rbp+var_88], rax jmp short $+2 loc_C63E: mov rax, [rbp+var_88] mov [rbp+var_50], rax mov rax, [rbp+var_50] add rax, [rbp+var_58] mov [rbp+var_58], rax xor eax, eax cmp [rbp+var_50], 0 mov [rbp+var_89], al jbe short loc_C675 mov rax, [rbp+var_58] cmp rax, [rbp+var_18] setb al mov [rbp+var_89], al loc_C675: mov al, [rbp+var_89] test al, 1 jnz short loc_C60D lea rdi, [rbp+var_30] call _ZNSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void) mov [rbp+var_A8], rax mov rax, [rbp+var_58] mov [rbp+var_A0], rax lea rdi, [rbp+var_59] mov [rbp+var_98], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_80] mov rsi, [rbp+var_A8] mov rdx, [rbp+var_A0] mov rcx, [rbp+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&) jmp short $+2 loc_C6CA: lea rdi, [rbp+var_59] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rbp+var_30] call _ZNSt6vectorIcSaIcEED2Ev; std::vector<char>::~vector() mov rax, [rbp+var_78] add rsp, 0B0h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_C72C mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_C723 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_59] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_C723: lea rdi, [rbp+var_30] call _ZNSt6vectorIcSaIcEED2Ev; std::vector<char>::~vector() loc_C72C: mov rdi, [rbp+var_40] call __Unwind_Resume
long long nglog::ReadEntireFile[abi:cxx11](long long a1, long long a2) { long long v2; // rax long long v4; // [rsp+8h] [rbp-A8h] unsigned long long v5; // [rsp+10h] [rbp-A0h] bool v6; // [rsp+27h] [rbp-89h] unsigned long long v7; // [rsp+40h] [rbp-70h] char v8; // [rsp+57h] [rbp-59h] BYREF unsigned long long v9; // [rsp+58h] [rbp-58h] long long v10; // [rsp+60h] [rbp-50h] char v11; // [rsp+7Fh] [rbp-31h] BYREF _BYTE v12[24]; // [rsp+80h] [rbp-30h] BYREF unsigned long long FileSize; // [rsp+98h] [rbp-18h] long long v14; // [rsp+A0h] [rbp-10h] long long v15; // [rsp+A8h] [rbp-8h] v15 = a1; v14 = a2; FileSize = nglog::GetFileSize(a2); v7 = FileSize; std::allocator<char>::allocator(); std::vector<char>::vector(v12, v7, &v11); std::allocator<char>::~allocator(&v11); v10 = 0LL; v9 = 0LL; fseek(v14, 0LL); do { v2 = std::vector<char>::data(v12); v10 = fread(v9 + v2, 1LL, FileSize - v9, v14); v9 += v10; v6 = 0; if ( v10 ) v6 = v9 < FileSize; } while ( v6 ); v4 = std::vector<char>::data(v12); v5 = v9; std::allocator<char>::allocator(); std::string::basic_string(a1, v4, v5, &v8); std::allocator<char>::~allocator(&v8); std::vector<char>::~vector(v12); return a1; }
ReadEntireFile[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x80],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x78],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010c740 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x70],RAX LEA RDI,[RBP + -0x31] MOV qword ptr [RBP + -0x68],RDI CALL 0x00109d50 MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x68] LAB_0010c5d8: LEA RDI,[RBP + -0x30] CALL 0x001113e0 JMP 0x0010c5e3 LAB_0010c5e3: LEA RDI,[RBP + -0x31] CALL 0x001097a0 MOV qword ptr [RBP + -0x50],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV RDI,qword ptr [RBP + -0x10] LAB_0010c600: XOR EDX,EDX MOV ESI,EDX CALL 0x00109820 JMP 0x0010c60b LAB_0010c60b: JMP 0x0010c60d LAB_0010c60d: LEA RDI,[RBP + -0x30] CALL 0x00111450 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x58] ADD RDI,RAX MOV RDX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV RCX,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00109b60 MOV qword ptr [RBP + -0x88],RAX JMP 0x0010c63e LAB_0010c63e: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX XOR EAX,EAX CMP qword ptr [RBP + -0x50],0x0 MOV byte ptr [RBP + -0x89],AL JBE 0x0010c675 MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x18] SETC AL MOV byte ptr [RBP + -0x89],AL LAB_0010c675: MOV AL,byte ptr [RBP + -0x89] TEST AL,0x1 JNZ 0x0010c60d LEA RDI,[RBP + -0x30] CALL 0x00111450 MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0xa0],RAX LEA RDI,[RBP + -0x59] MOV qword ptr [RBP + -0x98],RDI CALL 0x00109d50 MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0xa8] MOV RDX,qword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x98] LAB_0010c6c3: CALL 0x00109840 LAB_0010c6c8: JMP 0x0010c6ca LAB_0010c6ca: LEA RDI,[RBP + -0x59] CALL 0x001097a0 LEA RDI,[RBP + -0x30] CALL 0x00111470 MOV RAX,qword ptr [RBP + -0x78] ADD RSP,0xb0 POP RBP RET
/* nglog::ReadEntireFile[abi:cxx11](_IO_FILE*) */ nglog * __thiscall nglog::ReadEntireFile_abi_cxx11_(nglog *this,_IO_FILE *param_1) { ulong uVar1; long lVar2; char *pcVar3; bool local_91; allocator local_61; ulong local_60; size_t local_58; allocator local_39; vector<char,std::allocator<char>> local_38 [24]; ulong local_20; _IO_FILE *local_18; nglog *local_10; local_18 = param_1; local_10 = this; uVar1 = GetFileSize(param_1); local_20 = uVar1; std::allocator<char>::allocator(); /* try { // try from 0010c5d8 to 0010c5e0 has its CatchHandler @ 0010c6e9 */ std::vector<char,std::allocator<char>>::vector(local_38,uVar1,&local_39); std::allocator<char>::~allocator((allocator<char> *)&local_39); local_58 = 0; local_60 = 0; /* try { // try from 0010c600 to 0010c634 has its CatchHandler @ 0010c700 */ fseek(local_18,0,0); do { lVar2 = std::vector<char,std::allocator<char>>::data(local_38); local_58 = fread((void *)(lVar2 + local_60),1,local_20 - local_60,local_18); local_60 = local_58 + local_60; local_91 = local_58 != 0 && local_60 < local_20; } while (local_91); pcVar3 = (char *)std::vector<char,std::allocator<char>>::data(local_38); uVar1 = local_60; std::allocator<char>::allocator(); /* try { // try from 0010c6c3 to 0010c6c7 has its CatchHandler @ 0010c70e */ std::__cxx11::string::string((string *)this,pcVar3,uVar1,&local_61); std::allocator<char>::~allocator((allocator<char> *)&local_61); std::vector<char,std::allocator<char>>::~vector(local_38); return this; }
28,645
write_rest_of_head
eloqsql/storage/maria/ma_bitmap.c
static my_bool write_rest_of_head(MARIA_HA *info, uint position, ulong rest_length) { MARIA_SHARE *share= info->s; uint full_page_size= FULL_PAGE_SIZE(share); MARIA_BITMAP_BLOCK *block; DBUG_ENTER("write_rest_of_head"); DBUG_PRINT("enter", ("position: %u rest_length: %lu", position, rest_length)); if (position == 0) { /* Write out full pages */ uint pages= rest_length / full_page_size; rest_length%= full_page_size; if (rest_length >= MAX_TAIL_SIZE(share->block_size)) { /* Put tail on a full page */ pages++; rest_length= 0; } if (find_mid(info, pages, 1)) DBUG_RETURN(1); /* Insert empty block after full pages, to allow write_block_record() to split segment into used + free page */ block= dynamic_element(&info->bitmap_blocks, 2, MARIA_BITMAP_BLOCK*); block->page_count= 0; block->used= 0; } if (rest_length) { if (find_tail(info, rest_length, ELEMENTS_RESERVED_FOR_MAIN_PART - 1)) DBUG_RETURN(1); } else { /* Empty tail block */ block= dynamic_element(&info->bitmap_blocks, ELEMENTS_RESERVED_FOR_MAIN_PART - 1, MARIA_BITMAP_BLOCK *); block->page_count= 0; block->used= 0; } DBUG_RETURN(0); }
O3
c
write_rest_of_head: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx testl %esi, %esi jne 0x40d3a movq (%rbx), %r15 movl 0x7bc(%r15), %ecx movl 0xc18(%r15), %eax negl %eax leal (%rcx,%rax), %esi addl $-0xc, %esi movq %r14, %rax xorl %edx, %edx divq %rsi movq %rax, %r12 xorl %eax, %eax leal (%rcx,%rcx,2), %ecx shrl $0x2, %ecx movq %rdx, %r14 cmpq %rcx, %rdx cmovaeq %rax, %r14 sbbl $-0x1, %r12d addq $0xa10, %r15 # imm = 0xA10 movq 0x2c0(%rbx), %r13 addq $0x18, %r13 movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x4212f testq %rax, %rax jne 0x40d28 movq %rbx, %rdi movq %r15, %rsi callq 0x420ec testb %al, %al je 0x40cfd movb $0x1, %al jmp 0x40d6d movq 0x2c0(%rbx), %rax movl $0x0, 0x38(%rax) movb $0x0, 0x44(%rax) testq %r14, %r14 je 0x40d59 movq %rbx, %rdi movl %r14d, %esi movl $0x3, %edx callq 0x423fc movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x40d6d jmp 0x40d6b movq 0x2c0(%rbx), %rax movl $0x0, 0x50(%rax) movb $0x0, 0x5c(%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
write_rest_of_head: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov rbx, rdi test esi, esi jnz loc_40D3A mov r15, [rbx] mov ecx, [r15+7BCh] mov eax, [r15+0C18h] neg eax lea esi, [rcx+rax] add esi, 0FFFFFFF4h mov rax, r14 xor edx, edx div rsi mov r12, rax xor eax, eax lea ecx, [rcx+rcx*2] shr ecx, 2 mov r14, rdx cmp rdx, rcx cmovnb r14, rax sbb r12d, 0FFFFFFFFh add r15, 0A10h mov r13, [rbx+2C0h] add r13, 18h loc_40CFD: mov rdi, r15 mov rsi, r12 mov rdx, r13 mov ecx, 1 call allocate_full_pages test rax, rax jnz short loc_40D28 mov rdi, rbx mov rsi, r15 call move_to_next_bitmap test al, al jz short loc_40CFD mov al, 1 jmp short loc_40D6D loc_40D28: mov rax, [rbx+2C0h] mov dword ptr [rax+38h], 0 mov byte ptr [rax+44h], 0 loc_40D3A: test r14, r14 jz short loc_40D59 mov rdi, rbx mov esi, r14d mov edx, 3 call find_tail mov ecx, eax mov al, 1 test cl, cl jnz short loc_40D6D jmp short loc_40D6B loc_40D59: mov rax, [rbx+2C0h] mov dword ptr [rax+50h], 0 mov byte ptr [rax+5Ch], 0 loc_40D6B: xor eax, eax loc_40D6D: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char write_rest_of_head(_QWORD *a1, int a2, unsigned long long a3) { unsigned long long v3; // r14 int v4; // ecx unsigned long long v5; // rdx unsigned long long v6; // r12 unsigned long long v7; // rcx long long v8; // r12 long long v9; // r15 long long v10; // r13 long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 char result; // al long long v16; // rax char tail; // cl long long v18; // rax v3 = a3; if ( !a2 ) { v4 = *(_DWORD *)(*a1 + 1980LL); v5 = a3 % (unsigned int)(v4 - *(_DWORD *)(*a1 + 3096LL) - 12); v6 = v3 / (unsigned int)(v4 - *(_DWORD *)(*a1 + 3096LL) - 12); v7 = (unsigned int)(3 * v4) >> 2; v3 = v5; if ( v5 >= v7 ) v3 = 0LL; v8 = (unsigned int)v6 - ((v5 < v7) - 1); v9 = *a1 + 2576LL; v10 = a1[88] + 24LL; while ( !allocate_full_pages(v9, v8, v10, 1LL) ) { if ( (unsigned __int8)move_to_next_bitmap(a1, v9, v11, v12, v13, v14) ) return 1; } v16 = a1[88]; *(_DWORD *)(v16 + 56) = 0; *(_BYTE *)(v16 + 68) = 0; } if ( v3 ) { tail = find_tail(a1); result = 1; if ( tail ) return result; } else { v18 = a1[88]; *(_DWORD *)(v18 + 80) = 0; *(_BYTE *)(v18 + 92) = 0; } return 0; }
write_rest_of_head: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI TEST ESI,ESI JNZ 0x00140d3a MOV R15,qword ptr [RBX] MOV ECX,dword ptr [R15 + 0x7bc] MOV EAX,dword ptr [R15 + 0xc18] NEG EAX LEA ESI,[RCX + RAX*0x1] ADD ESI,-0xc MOV RAX,R14 XOR EDX,EDX DIV RSI MOV R12,RAX XOR EAX,EAX LEA ECX,[RCX + RCX*0x2] SHR ECX,0x2 MOV R14,RDX CMP RDX,RCX CMOVNC R14,RAX SBB R12D,-0x1 ADD R15,0xa10 MOV R13,qword ptr [RBX + 0x2c0] ADD R13,0x18 LAB_00140cfd: MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV ECX,0x1 CALL 0x0014212f TEST RAX,RAX JNZ 0x00140d28 MOV RDI,RBX MOV RSI,R15 CALL 0x001420ec TEST AL,AL JZ 0x00140cfd MOV AL,0x1 JMP 0x00140d6d LAB_00140d28: MOV RAX,qword ptr [RBX + 0x2c0] MOV dword ptr [RAX + 0x38],0x0 MOV byte ptr [RAX + 0x44],0x0 LAB_00140d3a: TEST R14,R14 JZ 0x00140d59 MOV RDI,RBX MOV ESI,R14D MOV EDX,0x3 CALL 0x001423fc MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00140d6d JMP 0x00140d6b LAB_00140d59: MOV RAX,qword ptr [RBX + 0x2c0] MOV dword ptr [RAX + 0x50],0x0 MOV byte ptr [RAX + 0x5c],0x0 LAB_00140d6b: XOR EAX,EAX LAB_00140d6d: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 write_rest_of_head(long *param_1,int param_2,ulong param_3) { long lVar1; long lVar2; ulong uVar3; char cVar4; long lVar5; int8 uVar6; uint uVar7; bool bVar8; if (param_2 == 0) { lVar1 = *param_1; uVar7 = (*(int *)(lVar1 + 0x7bc) - *(int *)(lVar1 + 0xc18)) - 0xc; uVar3 = param_3 / uVar7; param_3 = param_3 % (ulong)uVar7; bVar8 = param_3 < (uint)(*(int *)(lVar1 + 0x7bc) * 3) >> 2; if (!bVar8) { param_3 = 0; } lVar2 = param_1[0x58]; do { lVar5 = allocate_full_pages(lVar1 + 0xa10,((int)uVar3 + 1) - (uint)bVar8,lVar2 + 0x18,1); if (lVar5 != 0) { lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x38) = 0; *(int1 *)(lVar1 + 0x44) = 0; goto LAB_00140d3a; } cVar4 = move_to_next_bitmap(param_1,lVar1 + 0xa10); } while (cVar4 == '\0'); uVar6 = 1; } else { LAB_00140d3a: if (param_3 == 0) { lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x50) = 0; *(int1 *)(lVar1 + 0x5c) = 0; } else { cVar4 = find_tail(param_1,param_3 & 0xffffffff,3); if (cVar4 != '\0') { return 1; } } uVar6 = 0; } return uVar6; }
28,646
ftxui::MenuOption::Vertical()
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/component_options.cpp
MenuOption MenuOption::Vertical() { MenuOption option; option.entries_option.transform = [](const EntryState& state) { Element e = text((state.active ? "> " : " ") + state.label); // NOLINT if (state.focused) { e |= inverted; } if (state.active) { e |= bold; } if (!state.focused && !state.active) { e |= dim; } return e; }; return option; }
O2
cpp
ftxui::MenuOption::Vertical(): pushq %rbx subq $0x20, %rsp movq %rdi, %rbx callq 0x2d294 movups 0xa8(%rbx), %xmm0 movq %rsp, %rdi movaps %xmm0, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0xa8(%rbx) movups 0xb8(%rbx), %xmm0 leaq 0x8c6(%rip), %rax # 0x2c2f0 movq %rax, 0xb8(%rbx) movaps %xmm0, 0x10(%rdi) leaq 0x758(%rip), %rax # 0x2c194 movq %rax, 0xc0(%rbx) callq 0x13b10 movq %rbx, %rax addq $0x20, %rsp popq %rbx retq nop
_ZN5ftxui10MenuOption8VerticalEv: push rbx sub rsp, 20h mov rbx, rdi call _ZN5ftxui10MenuOptionC2Ev; ftxui::MenuOption::MenuOption(void) movups xmm0, xmmword ptr [rbx+0A8h] mov rdi, rsp; this movaps xmmword ptr [rdi], xmm0 xorps xmm0, xmm0 movups xmmword ptr [rbx+0A8h], xmm0 movups xmm0, xmmword ptr [rbx+0B8h] lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEERKNS1_10EntryStateEEZNS1_10MenuOption8VerticalEvE3$_0E10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&),ftxui::MenuOption::Vertical(void)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rbx+0B8h], rax movaps xmmword ptr [rdi+10h], xmm0 lea rax, _ZNSt17_Function_handlerIFSt10shared_ptrIN5ftxui4NodeEERKNS1_10EntryStateEEZNS1_10MenuOption8VerticalEvE3$_0E9_M_invokeERKSt9_Any_dataS6_; std::_Function_handler<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&),ftxui::MenuOption::Vertical(void)::$_0>::_M_invoke(std::_Any_data const&,ftxui::EntryState const&) mov [rbx+0C0h], rax call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rax, rbx add rsp, 20h pop rbx retn
ftxui::MenuOption * ftxui::MenuOption::Vertical(ftxui::MenuOption *this) { __int128 v1; // xmm0 _OWORD v3[2]; // [rsp+0h] [rbp-28h] BYREF ftxui::MenuOption::MenuOption(this); v3[0] = *(_OWORD *)((char *)this + 168); *(_OWORD *)((char *)this + 168) = 0LL; v1 = *(_OWORD *)((char *)this + 184); *((_QWORD *)this + 23) = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&),ftxui::MenuOption::Vertical(void)::$_0>::_M_manager; v3[1] = v1; *((_QWORD *)this + 24) = std::_Function_handler<std::shared_ptr<ftxui::Node> ()(ftxui::EntryState const&),ftxui::MenuOption::Vertical(void)::$_0>::_M_invoke; std::_Function_base::~_Function_base((std::_Function_base *)v3); return this; }
Vertical: PUSH RBX SUB RSP,0x20 MOV RBX,RDI CALL 0x0012d294 MOVUPS XMM0,xmmword ptr [RBX + 0xa8] MOV RDI,RSP MOVAPS xmmword ptr [RDI],XMM0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xa8],XMM0 MOVUPS XMM0,xmmword ptr [RBX + 0xb8] LEA RAX,[0x12c2f0] MOV qword ptr [RBX + 0xb8],RAX MOVAPS xmmword ptr [RDI + 0x10],XMM0 LEA RAX,[0x12c194] MOV qword ptr [RBX + 0xc0],RAX CALL 0x00113b10 MOV RAX,RBX ADD RSP,0x20 POP RBX RET
/* ftxui::MenuOption::Vertical() */ MenuOption * __thiscall ftxui::MenuOption::Vertical(MenuOption *this) { int8 local_28; int8 uStack_20; int8 local_18; int8 uStack_10; MenuOption(this); local_28 = *(int8 *)(this + 0xa8); uStack_20 = *(int8 *)(this + 0xb0); *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; local_18 = *(int8 *)(this + 0xb8); uStack_10 = *(int8 *)(this + 0xc0); *(code **)(this + 0xb8) = std:: _Function_handler<std::shared_ptr<ftxui::Node>(ftxui::EntryState_const&),ftxui::MenuOption::Vertical()::$_0> ::_M_manager; *(code **)(this + 0xc0) = std:: _Function_handler<std::shared_ptr<ftxui::Node>(ftxui::EntryState_const&),ftxui::MenuOption::Vertical()::$_0> ::_M_invoke; std::_Function_base::~_Function_base((_Function_base *)&local_28); return this; }
28,647
my_scan_8bit
eloqsql/strings/ctype-simple.c
size_t my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq) { const char *str0= str; switch (sq) { case MY_SEQ_INTTAIL: if (*str == '.') { for(str++ ; str != end && *str == '0' ; str++); return (size_t) (str - str0); } return 0; case MY_SEQ_SPACES: for ( ; str < end ; str++) { if (!my_isspace(cs,*str)) break; } return (size_t) (str - str0); case MY_SEQ_NONSPACES: for ( ; str < end ; str++) { if (my_isspace(cs, *str)) break; } return (size_t) (str - str0); default: return 0; } }
O3
c
my_scan_8bit: pushq %rbp movq %rsp, %rbp movq %rdx, %rax cmpl $0x1, %ecx je 0xb5f1e cmpl $0x2, %ecx je 0xb5ef2 cmpl $0x3, %ecx jne 0xb5f43 movq %rsi, %rcx cmpq %rax, %rsi jae 0xb5f16 movq 0x40(%rdi), %rdx movq %rsi, %rcx movzbl (%rcx), %edi testb $0x8, 0x1(%rdx,%rdi) jne 0xb5f16 incq %rcx cmpq %rax, %rcx jne 0xb5ede jmp 0xb5f13 movq %rsi, %rcx cmpq %rax, %rsi jae 0xb5f16 movq 0x40(%rdi), %rdx movq %rsi, %rcx movzbl (%rcx), %edi testb $0x8, 0x1(%rdx,%rdi) je 0xb5f16 incq %rcx cmpq %rax, %rcx jne 0xb5f01 movq %rax, %rcx subq %rsi, %rcx movq %rcx, %rax jmp 0xb5f45 cmpb $0x2e, (%rsi) jne 0xb5f43 leaq 0x1(%rsi), %rcx cmpq %rax, %rcx je 0xb5f3e leaq 0x1(%rcx), %rdx cmpb $0x30, (%rcx) movq %rdx, %rcx je 0xb5f27 decq %rdx movq %rdx, %rax subq %rsi, %rax jmp 0xb5f45 xorl %eax, %eax popq %rbp retq
my_scan_8bit: push rbp mov rbp, rsp mov rax, rdx cmp ecx, 1 jz short loc_B5F1E cmp ecx, 2 jz short loc_B5EF2 cmp ecx, 3 jnz short loc_B5F43 mov rcx, rsi cmp rsi, rax jnb short loc_B5F16 mov rdx, [rdi+40h] mov rcx, rsi loc_B5EDE: movzx edi, byte ptr [rcx] test byte ptr [rdx+rdi+1], 8 jnz short loc_B5F16 inc rcx cmp rcx, rax jnz short loc_B5EDE jmp short loc_B5F13 loc_B5EF2: mov rcx, rsi cmp rsi, rax jnb short loc_B5F16 mov rdx, [rdi+40h] mov rcx, rsi loc_B5F01: movzx edi, byte ptr [rcx] test byte ptr [rdx+rdi+1], 8 jz short loc_B5F16 inc rcx cmp rcx, rax jnz short loc_B5F01 loc_B5F13: mov rcx, rax loc_B5F16: sub rcx, rsi mov rax, rcx jmp short loc_B5F45 loc_B5F1E: cmp byte ptr [rsi], 2Eh ; '.' jnz short loc_B5F43 lea rcx, [rsi+1] loc_B5F27: cmp rcx, rax jz short loc_B5F3E lea rdx, [rcx+1] cmp byte ptr [rcx], 30h ; '0' mov rcx, rdx jz short loc_B5F27 dec rdx mov rax, rdx loc_B5F3E: sub rax, rsi jmp short loc_B5F45 loc_B5F43: xor eax, eax loc_B5F45: pop rbp retn
long long my_scan_8bit(long long a1, unsigned __int8 *a2, unsigned __int8 *a3, int a4) { unsigned __int8 *v4; // rax unsigned __int8 *v5; // rcx unsigned __int8 *v7; // rcx _BYTE *v8; // rdx v4 = a3; if ( a4 != 1 ) { if ( a4 == 2 ) { v5 = a2; if ( a2 < a3 ) { v5 = a2; while ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v5 + 1LL) & 8) != 0 ) { if ( ++v5 == a3 ) { LABEL_13: v5 = a3; return v5 - a2; } } } return v5 - a2; } if ( a4 == 3 ) { v5 = a2; if ( a2 < a3 ) { v5 = a2; while ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v5 + 1LL) & 8) == 0 ) { if ( ++v5 == a3 ) goto LABEL_13; } } return v5 - a2; } return 0LL; } if ( *a2 != 46 ) return 0LL; v7 = a2 + 1; while ( v7 != v4 ) { v8 = v7 + 1; if ( *v7++ != 48 ) { v4 = v8 - 1; return v4 - a2; } } return v4 - a2; }
my_scan_8bit: PUSH RBP MOV RBP,RSP MOV RAX,RDX CMP ECX,0x1 JZ 0x001b5f1e CMP ECX,0x2 JZ 0x001b5ef2 CMP ECX,0x3 JNZ 0x001b5f43 MOV RCX,RSI CMP RSI,RAX JNC 0x001b5f16 MOV RDX,qword ptr [RDI + 0x40] MOV RCX,RSI LAB_001b5ede: MOVZX EDI,byte ptr [RCX] TEST byte ptr [RDX + RDI*0x1 + 0x1],0x8 JNZ 0x001b5f16 INC RCX CMP RCX,RAX JNZ 0x001b5ede JMP 0x001b5f13 LAB_001b5ef2: MOV RCX,RSI CMP RSI,RAX JNC 0x001b5f16 MOV RDX,qword ptr [RDI + 0x40] MOV RCX,RSI LAB_001b5f01: MOVZX EDI,byte ptr [RCX] TEST byte ptr [RDX + RDI*0x1 + 0x1],0x8 JZ 0x001b5f16 INC RCX CMP RCX,RAX JNZ 0x001b5f01 LAB_001b5f13: MOV RCX,RAX LAB_001b5f16: SUB RCX,RSI MOV RAX,RCX JMP 0x001b5f45 LAB_001b5f1e: CMP byte ptr [RSI],0x2e JNZ 0x001b5f43 LEA RCX,[RSI + 0x1] LAB_001b5f27: CMP RCX,RAX JZ 0x001b5f3e LEA RDX,[RCX + 0x1] CMP byte ptr [RCX],0x30 MOV RCX,RDX JZ 0x001b5f27 DEC RDX MOV RAX,RDX LAB_001b5f3e: SUB RAX,RSI JMP 0x001b5f45 LAB_001b5f43: XOR EAX,EAX LAB_001b5f45: POP RBP RET
long my_scan_8bit(long param_1,byte *param_2,byte *param_3,int param_4) { byte bVar1; byte *pbVar2; long lVar3; byte *pbVar4; if (param_4 == 1) { if (*param_2 == 0x2e) { pbVar4 = param_2 + 1; do { pbVar2 = param_3; if (pbVar4 == param_3) break; bVar1 = *pbVar4; pbVar2 = pbVar4; pbVar4 = pbVar4 + 1; } while (bVar1 == 0x30); return (long)pbVar2 - (long)param_2; } LAB_001b5f43: lVar3 = 0; } else { pbVar4 = param_2; if (param_4 == 2) { if (param_2 < param_3) { pbVar2 = param_2; do { pbVar4 = pbVar2; if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar2) & 8) == 0) break; pbVar2 = pbVar2 + 1; pbVar4 = param_3; } while (pbVar2 != param_3); } } else { if (param_4 != 3) goto LAB_001b5f43; if (param_2 < param_3) { pbVar2 = param_2; do { pbVar4 = pbVar2; if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar2) & 8) != 0) break; pbVar2 = pbVar2 + 1; pbVar4 = param_3; } while (pbVar2 != param_3); } } lVar3 = (long)pbVar4 - (long)param_2; } return lVar3; }
28,648
useMinSpacingCB(LefDefParser::lefrCallbackType_e, LefDefParser::lefiUseMinSpacing*, void*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lefdiff/diffLefRW.cpp
int useMinSpacingCB(lefrCallbackType_e c, lefiUseMinSpacing* spacing, lefiUserData ud) { checkType(c); if (ud != userData) dataError(); fprintf(fout, "USEMINSPACING %s ", spacing->name()); if (spacing->value()) fprintf(fout, "USEMINSPACING ON\n"); else fprintf(fout, "USEMINSPACING OFF\n"); return 0; }
O3
cpp
useMinSpacingCB(LefDefParser::lefrCallbackType_e, LefDefParser::lefiUseMinSpacing*, void*): pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rbx cmpl $0x39, %edi jb 0xfa57 movq 0x679af(%rip), %rcx # 0x773f0 leaq 0x3b7af(%rip), %rdi # 0x4b1f7 movl $0x27, %esi movl $0x1, %edx callq 0x23b0 cmpq %r14, 0x679a2(%rip) # 0x77400 je 0xfa7d movq 0x67989(%rip), %rcx # 0x773f0 leaq 0x3b75e(%rip), %rdi # 0x4b1cc movl $0x2a, %esi movl $0x1, %edx callq 0x23b0 movq 0x6796c(%rip), %r14 # 0x773f0 movq %rbx, %rdi callq 0x1325c leaq 0x3d519(%rip), %rsi # 0x4cfac movq %r14, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x22c0 movq %rbx, %rdi callq 0x13260 movq 0x67941(%rip), %rcx # 0x773f0 testl %eax, %eax je 0xfac1 leaq 0x3d504(%rip), %rdi # 0x4cfbe movl $0x11, %esi jmp 0xfacd leaq 0x3d508(%rip), %rdi # 0x4cfd0 movl $0x12, %esi movl $0x1, %edx callq 0x23b0 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z15useMinSpacingCBN12LefDefParser18lefrCallbackType_eEPNS_17lefiUseMinSpacingEPv: push r14 push rbx push rax mov r14, rdx mov rbx, rsi cmp edi, 39h ; '9' jb short loc_FA57 mov rcx, cs:fout lea rdi, aErrorCallbackT; "ERROR: callback type is out of bounds!"... mov esi, 27h ; ''' mov edx, 1 call _fwrite loc_FA57: cmp cs:userData, r14 jz short loc_FA7D mov rcx, cs:fout lea rdi, aErrorReturnedU; "ERROR: returned user data is not correc"... mov esi, 2Ah ; '*' mov edx, 1 call _fwrite loc_FA7D: mov r14, cs:fout mov rdi, rbx; this call _ZNK12LefDefParser17lefiUseMinSpacing4nameEv; LefDefParser::lefiUseMinSpacing::name(void) lea rsi, aUseminspacingS; "USEMINSPACING %s " mov rdi, r14 mov rdx, rax xor eax, eax call _fprintf mov rdi, rbx; this call _ZNK12LefDefParser17lefiUseMinSpacing5valueEv; LefDefParser::lefiUseMinSpacing::value(void) mov rcx, cs:fout test eax, eax jz short loc_FAC1 lea rdi, aUseminspacingO; "USEMINSPACING ON\n" mov esi, 11h jmp short loc_FACD loc_FAC1: lea rdi, aUseminspacingO_0; "USEMINSPACING OFF\n" mov esi, 12h loc_FACD: mov edx, 1 call _fwrite xor eax, eax add rsp, 8 pop rbx pop r14 retn
long long useMinSpacingCB(unsigned int a1, LefDefParser::lefiUseMinSpacing *a2, long long a3) { long long v4; // r14 const char *v5; // rax const char *v6; // rdi long long v7; // rsi if ( a1 >= 0x39 ) fwrite("ERROR: callback type is out of bounds!\n", 39LL, 1LL, fout); if ( userData != a3 ) fwrite("ERROR: returned user data is not correct!\n", 42LL, 1LL, fout); v4 = fout; v5 = (const char *)LefDefParser::lefiUseMinSpacing::name(a2); fprintf(v4, "USEMINSPACING %s ", v5); if ( (unsigned int)LefDefParser::lefiUseMinSpacing::value(a2) ) { v6 = "USEMINSPACING ON\n"; v7 = 17LL; } else { v6 = "USEMINSPACING OFF\n"; v7 = 18LL; } fwrite(v6, v7, 1LL, fout); return 0LL; }
useMinSpacingCB: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RSI CMP EDI,0x39 JC 0x0010fa57 MOV RCX,qword ptr [0x001773f0] LEA RDI,[0x14b1f7] MOV ESI,0x27 MOV EDX,0x1 CALL 0x001023b0 LAB_0010fa57: CMP qword ptr [0x00177400],R14 JZ 0x0010fa7d MOV RCX,qword ptr [0x001773f0] LEA RDI,[0x14b1cc] MOV ESI,0x2a MOV EDX,0x1 CALL 0x001023b0 LAB_0010fa7d: MOV R14,qword ptr [0x001773f0] MOV RDI,RBX CALL 0x0011325c LEA RSI,[0x14cfac] MOV RDI,R14 MOV RDX,RAX XOR EAX,EAX CALL 0x001022c0 MOV RDI,RBX CALL 0x00113260 MOV RCX,qword ptr [0x001773f0] TEST EAX,EAX JZ 0x0010fac1 LEA RDI,[0x14cfbe] MOV ESI,0x11 JMP 0x0010facd LAB_0010fac1: LEA RDI,[0x14cfd0] MOV ESI,0x12 LAB_0010facd: MOV EDX,0x1 CALL 0x001023b0 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 RET
/* useMinSpacingCB(LefDefParser::lefrCallbackType_e, LefDefParser::lefiUseMinSpacing*, void*) */ int8 useMinSpacingCB(uint param_1,lefiUseMinSpacing *param_2,long param_3) { FILE *__stream; int iVar1; int8 uVar2; size_t __size; char *__ptr; if (0x38 < param_1) { fwrite("ERROR: callback type is out of bounds!\n",0x27,1,fout); } if (userData != param_3) { fwrite("ERROR: returned user data is not correct!\n",0x2a,1,fout); } __stream = fout; uVar2 = LefDefParser::lefiUseMinSpacing::name(param_2); fprintf(__stream,"USEMINSPACING %s ",uVar2); iVar1 = LefDefParser::lefiUseMinSpacing::value(param_2); if (iVar1 == 0) { __ptr = "USEMINSPACING OFF\n"; __size = 0x12; } else { __ptr = "USEMINSPACING ON\n"; __size = 0x11; } fwrite(__ptr,__size,1,fout); return 0; }
28,649
void chess::uci::moveToRep<false>(chess::Board, chess::Move const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
static void moveToRep(Board board, const Move &move, std::string &str) { if (handleCastling(move, str)) { return; } const PieceType pt = board.at(move.from()).type(); const bool isCapture = board.at(move.to()) != Piece::NONE || move.typeOf() == Move::ENPASSANT; assert(pt != PieceType::NONE); if (pt != PieceType::PAWN) { appendPieceSymbol(pt, str); } if constexpr (LAN) { appendSquare(move.from(), str); } else { if (pt == PieceType::PAWN) { str += isCapture ? static_cast<std::string>(move.from().file()) : ""; } else { resolveAmbiguity(board, move, pt, str); } } if (isCapture) { str += 'x'; } appendSquare(move.to(), str); if (move.typeOf() == Move::PROMOTION) appendPromotion(move, str); board.makeMove(move); if (board.inCheck()) appendCheckSymbol(board, str); }
O2
cpp
void chess::uci::moveToRep<false>(chess::Board, chess::Move const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq %rsi, %rdi movq %rdx, %rsi callq 0x9d58 testb %al, %al jne 0x9ca9 movq %r15, %rdi callq 0x9db8 movq %r14, %rdi movl %eax, %esi callq 0x43c4 leal -0x6(%rax), %ecx cmpb $0x6, %al movzbl %al, %eax movzbl %cl, %ebp cmovbl %eax, %ebp movq %r15, %rdi callq 0x9ddc movq %r14, %rdi movl %eax, %esi callq 0x43c4 cmpb $0xc, %al sete %al movzwl (%r15), %ecx andl $0xc000, %ecx # imm = 0xC000 negw %cx setno %r12b andb %al, %r12b testb %bpl, %bpl je 0x9bf9 movzbl %bpl, %ebp cmpl $0x6, %ebp je 0x9cb6 movl %ebp, %edi movq %rbx, %rsi callq 0x9dfc movq %r14, %rdi movq %r15, %rsi movl %ebp, %edx movq %rbx, %rcx callq 0x9e58 jmp 0x9c4b testb %r12b, %r12b je 0x9c16 leaq 0x6276(%rip), %rsi # 0xfe7b leaq 0x10(%rsp), %rdi leaq 0xe(%rsp), %rdx callq 0x5b44 jmp 0x9c31 movq %r15, %rdi callq 0x9db8 andb $0x7, %al leaq 0xf(%rsp), %rsi movb %al, (%rsi) leaq 0x10(%rsp), %rdi callq 0x6e36 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x23c0 leaq 0x10(%rsp), %rdi callq 0x20d0 testb %r12b, %r12b testb %r12b, %r12b jne 0x9c5b pushq $0x78 popq %rsi movq %rbx, %rdi callq 0x21f0 movq %r15, %rdi callq 0x9ddc movl %eax, %edi movq %rbx, %rsi callq 0x9fb6 movzwl (%r15), %eax andl $0xc000, %eax # imm = 0xC000 cmpw $0x4000, %ax # imm = 0x4000 jne 0x9c87 movq %r15, %rdi movq %rbx, %rsi callq 0xa03c movl (%r15), %esi movq %r14, %rdi callq 0x5f84 movq %r14, %rdi callq 0x736c testb %al, %al je 0x9ca9 movq %r14, %rdi movq %rbx, %rsi callq 0xa0b0 addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x6526(%rip), %rdi # 0x101e3 leaq 0x6138(%rip), %rsi # 0xfdfc leaq 0x652e(%rip), %rcx # 0x101f9 movl $0x1328, %edx # imm = 0x1328 callq 0x2160 movq %rax, %rbx jmp 0x9cea movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x20d0 testb %r12b, %r12b movq %rbx, %rdi callq 0x2360
_ZN5chess3uci9moveToRepILb0EEEvNS_5BoardERKNS_4MoveERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 30h mov rbx, rdx mov r15, rsi mov r14, rdi mov rdi, rsi; this mov rsi, rdx call _ZN5chess3uci14handleCastlingERKNS_4MoveERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::handleCastling(chess::Move const&,std::string &) test al, al jnz loc_9CA9 mov rdi, r15; this call _ZNK5chess4Move4fromEv; chess::Move::from(void) mov rdi, r14 mov esi, eax call _ZNK5chess5Board2atINS_5PieceEEET_NS_6SquareE; chess::Board::at<chess::Piece>(chess::Square) lea ecx, [rax-6] cmp al, 6 movzx eax, al movzx ebp, cl cmovb ebp, eax mov rdi, r15; this call _ZNK5chess4Move2toEv; chess::Move::to(void) mov rdi, r14 mov esi, eax call _ZNK5chess5Board2atINS_5PieceEEET_NS_6SquareE; chess::Board::at<chess::Piece>(chess::Square) cmp al, 0Ch setz al movzx ecx, word ptr [r15] and ecx, 0C000h neg cx setno r12b and r12b, al test bpl, bpl jz short loc_9BF9 movzx ebp, bpl cmp ebp, 6 jz loc_9CB6 mov edi, ebp mov rsi, rbx call _ZN5chess3uci17appendPieceSymbolENS_9PieceTypeERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::appendPieceSymbol(chess::PieceType,std::string &) mov rdi, r14 mov rsi, r15 mov edx, ebp mov rcx, rbx call _ZN5chess3uci16resolveAmbiguityERKNS_5BoardERKNS_4MoveENS_9PieceTypeERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::resolveAmbiguity(chess::Board const&,chess::Move const&,chess::PieceType,std::string &) jmp short loc_9C4B loc_9BF9: test r12b, r12b jz short loc_9C16 lea rsi, asc_FE79+2; "" lea rdi, [rsp+58h+var_48] lea rdx, [rsp+58h+var_4A] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short loc_9C31 loc_9C16: mov rdi, r15; this call _ZNK5chess4Move4fromEv; chess::Move::from(void) and al, 7 lea rsi, [rsp+58h+var_49] mov [rsi], al lea rdi, [rsp+58h+var_48] call _ZNK5chess4FilecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; chess::File::operator std::string(void) loc_9C31: lea rsi, [rsp+58h+var_48] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+58h+var_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r12b, r12b loc_9C4B: test r12b, r12b jnz short loc_9C5B push 78h ; 'x' pop rsi mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_9C5B: mov rdi, r15; this call _ZNK5chess4Move2toEv; chess::Move::to(void) mov edi, eax mov rsi, rbx call _ZN5chess3uci12appendSquareENS_6SquareERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::appendSquare(chess::Square,std::string &) movzx eax, word ptr [r15] and eax, 0C000h cmp ax, 4000h jnz short loc_9C87 mov rdi, r15 mov rsi, rbx call _ZN5chess3uci15appendPromotionERKNS_4MoveERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::appendPromotion(chess::Move const&,std::string &) loc_9C87: mov esi, [r15] mov rdi, r14 call _ZN5chess5Board8makeMoveILb0EEEvNS_4MoveE; chess::Board::makeMove<false>(chess::Move) mov rdi, r14; this call _ZNK5chess5Board7inCheckEv; chess::Board::inCheck(void) test al, al jz short loc_9CA9 mov rdi, r14 mov rsi, rbx call _ZN5chess3uci17appendCheckSymbolERNS_5BoardERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::appendCheckSymbol(chess::Board &,std::string &) loc_9CA9: add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_9CB6: lea rdi, aPtPiecetypeNon; "pt != PieceType::NONE" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aStaticVoidChes_1; "static void chess::uci::moveToRep(Board"... mov edx, 1328h call ___assert_fail mov rbx, rax jmp short loc_9CEA mov rbx, rax lea rdi, [rsp+58h+var_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r12b, r12b loc_9CEA: mov rdi, rbx call __Unwind_Resume
long long chess::uci::moveToRep<false>(chess::Board *this, chess::Move *a2, long long a3) { long long result; // rax unsigned int v5; // eax char v6; // al unsigned __int8 v7; // bp unsigned int v8; // eax char v9; // al int v10; // edx int v11; // r8d int v12; // r9d int v13; // ecx char v14; // r12 long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 int v19; // eax int v20; // edx int v21; // ecx int v22; // r8d int v23; // r9d int v24; // edx int v25; // ecx int v26; // r8d int v27; // r9d int v28; // [rsp+0h] [rbp-58h] char v29; // [rsp+0h] [rbp-58h] char v30; // [rsp+Fh] [rbp-49h] BYREF _QWORD v31[9]; // [rsp+10h] [rbp-48h] BYREF result = chess::uci::handleCastling(a2); if ( !(_BYTE)result ) { v5 = chess::Move::from(a2); v6 = chess::Board::at<chess::Piece>((long long)this, v5); v7 = v6 - 6; if ( (unsigned __int8)v6 < 6u ) v7 = v6; v8 = chess::Move::to(a2); v9 = chess::Board::at<chess::Piece>((long long)this, v8); v13 = *(_WORD *)a2 & 0xC000; LOWORD(v13) = -(__int16)v13; v14 = (v9 == 12) & !__OFSUB__((_WORD)v13, 1); if ( v7 ) { if ( v7 == 6 ) __assert_fail( "pt != PieceType::NONE", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 4904LL, "static void chess::uci::moveToRep(Board, const Move &, std::string &) [LAN = false]"); chess::uci::appendPieceSymbol(v7, a3, v10, v13, v11, v12); chess::uci::resolveAmbiguity(this, a2, v7, a3); } else { if ( v14 ) { std::string::basic_string<std::allocator<char>>(v31, ""); } else { v30 = chess::Move::from(a2) & 7; chess::File::operator std::string(v31, &v30); } std::string::append(a3, v31); std::string::~string(v31, v31, v15, v16, v17, v18); } if ( !v14 ) std::string::push_back(a3, 120LL); v19 = chess::Move::to(a2); chess::uci::appendSquare(v19, a3, v20, v21, v22, v23, v28); if ( (*(_WORD *)a2 & 0xC000) == 0x4000 ) chess::uci::appendPromotion((_DWORD)a2, a3, v24, v25, v26, v27, v29); chess::Board::makeMove<false>((long long)this, *(_DWORD *)a2); result = chess::Board::inCheck(this); if ( (_BYTE)result ) return chess::uci::appendCheckSymbol(this, a3); } return result; }
moveToRep<false>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV RDI,RSI MOV RSI,RDX CALL 0x00109d58 TEST AL,AL JNZ 0x00109ca9 MOV RDI,R15 CALL 0x00109db8 MOV RDI,R14 MOV ESI,EAX CALL 0x001043c4 LEA ECX,[RAX + -0x6] CMP AL,0x6 MOVZX EAX,AL MOVZX EBP,CL CMOVC EBP,EAX MOV RDI,R15 CALL 0x00109ddc MOV RDI,R14 MOV ESI,EAX CALL 0x001043c4 CMP AL,0xc SETZ AL MOVZX ECX,word ptr [R15] AND ECX,0xc000 NEG CX SETNO R12B AND R12B,AL TEST BPL,BPL JZ 0x00109bf9 MOVZX EBP,BPL CMP EBP,0x6 JZ 0x00109cb6 MOV EDI,EBP MOV RSI,RBX CALL 0x00109dfc MOV RDI,R14 MOV RSI,R15 MOV EDX,EBP MOV RCX,RBX CALL 0x00109e58 JMP 0x00109c4b LAB_00109bf9: TEST R12B,R12B JZ 0x00109c16 LAB_00109bfe: LEA RSI,[0x10fe7b] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xe] CALL 0x00105b44 LAB_00109c14: JMP 0x00109c31 LAB_00109c16: MOV RDI,R15 CALL 0x00109db8 AND AL,0x7 LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],AL LEA RDI,[RSP + 0x10] CALL 0x00106e36 LAB_00109c31: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x001023c0 LAB_00109c3e: LEA RDI,[RSP + 0x10] CALL 0x001020d0 TEST R12B,R12B LAB_00109c4b: TEST R12B,R12B JNZ 0x00109c5b PUSH 0x78 POP RSI MOV RDI,RBX CALL 0x001021f0 LAB_00109c5b: MOV RDI,R15 CALL 0x00109ddc MOV EDI,EAX MOV RSI,RBX CALL 0x00109fb6 MOVZX EAX,word ptr [R15] AND EAX,0xc000 CMP AX,0x4000 JNZ 0x00109c87 MOV RDI,R15 MOV RSI,RBX CALL 0x0010a03c LAB_00109c87: MOV ESI,dword ptr [R15] MOV RDI,R14 CALL 0x00105f84 MOV RDI,R14 CALL 0x0010736c TEST AL,AL JZ 0x00109ca9 MOV RDI,R14 MOV RSI,RBX CALL 0x0010a0b0 LAB_00109ca9: ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00109cb6: LEA RDI,[0x1101e3] LEA RSI,[0x10fdfc] LEA RCX,[0x1101f9] MOV EDX,0x1328 CALL 0x00102160
/* void chess::uci::moveToRep<false>(chess::Board, chess::Move const&, std::__cxx11::string&) */ void chess::uci::moveToRep<false>(Board *param_1,Move *param_2,string *param_3) { byte bVar1; char cVar2; byte bVar3; int4 uVar4; int8 extraout_RDX; allocator local_4a; byte local_49; string local_48 [32]; cVar2 = handleCastling(param_2,param_3); if (cVar2 == '\0') { uVar4 = Move::from(param_2); bVar3 = Board::at<chess::Piece>(param_1,uVar4); bVar1 = bVar3 - 6; if (bVar3 < 6) { bVar1 = bVar3; } uVar4 = Move::to(param_2); cVar2 = Board::at<chess::Piece>(param_1,uVar4); if (bVar1 == 0) { if (cVar2 != '\f') { local_49 = Move::from(param_2); local_49 = local_49 & 7; File::operator_cast_to_string((File *)local_48); } else { /* try { // try from 00109bfe to 00109c13 has its CatchHandler @ 00109cd5 */ std::__cxx11::string::string<std::allocator<char>>(local_48,"",&local_4a); } /* try { // try from 00109c31 to 00109c3d has its CatchHandler @ 00109cda */ std::__cxx11::string::append(param_3); std::__cxx11::string::~string(local_48); } else { if (bVar1 == 6) { /* WARNING: Subroutine does not return */ __assert_fail("pt != PieceType::NONE", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x1328, "static void chess::uci::moveToRep(Board, const Move &, std::string &) [LAN = false]" ); } appendPieceSymbol(bVar1,param_3,extraout_RDX,-(*(ushort *)param_2 & 0xc000)); resolveAmbiguity(param_1,param_2,bVar1,param_3); } if (cVar2 != '\f') { std::__cxx11::string::push_back((char)param_3); } uVar4 = Move::to(param_2); appendSquare(uVar4,param_3); if ((*(ushort *)param_2 & 0xc000) == 0x4000) { appendPromotion(param_2,param_3); } Board::makeMove<false>(param_1,*(int4 *)param_2); cVar2 = Board::inCheck(param_1); if (cVar2 != '\0') { appendCheckSymbol(param_1,param_3); } } return; }
28,650
void chess::uci::moveToRep<false>(chess::Board, chess::Move const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
static void moveToRep(Board board, const Move &move, std::string &str) { if (handleCastling(move, str)) { return; } const PieceType pt = board.at(move.from()).type(); const bool isCapture = board.at(move.to()) != Piece::NONE || move.typeOf() == Move::ENPASSANT; assert(pt != PieceType::NONE); if (pt != PieceType::PAWN) { appendPieceSymbol(pt, str); } if constexpr (LAN) { appendSquare(move.from(), str); } else { if (pt == PieceType::PAWN) { str += isCapture ? static_cast<std::string>(move.from().file()) : ""; } else { resolveAmbiguity(board, move, pt, str); } } if (isCapture) { str += 'x'; } appendSquare(move.to(), str); if (move.typeOf() == Move::PROMOTION) appendPromotion(move, str); board.makeMove(move); if (board.inCheck()) appendCheckSymbol(board, str); }
O3
cpp
void chess::uci::moveToRep<false>(chess::Board, chess::Move const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq %rsi, %rdi movq %rdx, %rsi callq 0x94a8 testb %al, %al jne 0x9411 movzwl (%r15), %edx movl %edx, %eax shrl $0x6, %eax movl %eax, %ecx andl $0x3f, %ecx movzbl 0x60(%r14,%rcx), %esi leal -0x6(%rsi), %ecx cmpb $0x6, %sil movzbl %cl, %ecx cmovbl %esi, %ecx movl %edx, %esi andl $0x3f, %esi cmpb $0xc, 0x60(%r14,%rsi) setne %sil andl $0xc000, %edx # imm = 0xC000 negw %dx seto %r12b orb %sil, %r12b testb %cl, %cl je 0x9330 movzbl %cl, %ebp cmpl $0x6, %ebp je 0x941e movl %ebp, %edi movq %rbx, %rsi callq 0x94fe movq %r14, %rdi movq %r15, %rsi movl %ebp, %edx movq %rbx, %rcx callq 0x957c jmp 0x939b testb %r12b, %r12b je 0x9354 andb $0x7, %al addb $0x61, %al leaq 0x10(%rsp), %rcx movq %rcx, -0x10(%rcx) movzbl %al, %edx movq %rsp, %rdi movl $0x1, %esi callq 0x2250 jmp 0x936f leaq 0x10(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x58c7(%rip), %rdx # 0xec2b movq %rsp, %rdi movq %rdx, %rsi callq 0x3ff8 movq (%rsp), %rsi movq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x2070 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x939b movq 0x10(%rsp), %rsi incq %rsi callq 0x2210 testb %r12b, %r12b je 0x93ad movq %rbx, %rdi movl $0x78, %esi callq 0x21d0 movzwl (%r15), %edi andl $0x3f, %edi movq %rbx, %rsi callq 0x9750 movzwl (%r15), %eax andl $0xc000, %eax # imm = 0xC000 cmpl $0x4000, %eax # imm = 0x4000 jne 0x93d7 movq %r15, %rdi movq %rbx, %rsi callq 0x981e movl (%r15), %esi movq %r14, %rdi callq 0x5df6 movq %r14, %rdi callq 0x734a testb %al, %al je 0x9411 movq %r14, %rdi callq 0x6fe0 shrq $0x20, %rax xorl %ecx, %ecx cmpl $0x1, %eax setne %cl leal 0x23(,%rcx,8), %esi movq %rbx, %rdi callq 0x21d0 addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x5c16(%rip), %rdi # 0xf03b leaq 0x5780(%rip), %rsi # 0xebac leaq 0x5c1e(%rip), %rcx # 0xf051 movl $0x1328, %edx # imm = 0x1328 callq 0x2130 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x945b movq 0x10(%rsp), %rsi incq %rsi callq 0x2210 movq %rbx, %rdi callq 0x2350 nop
_ZN5chess3uci9moveToRepILb0EEEvNS_5BoardERKNS_4MoveERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov rbx, rdx mov r15, rsi mov r14, rdi mov rdi, rsi mov rsi, rdx call _ZN5chess3uci14handleCastlingERKNS_4MoveERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::handleCastling(chess::Move const&,std::string &) test al, al jnz loc_9411 movzx edx, word ptr [r15] mov eax, edx shr eax, 6 mov ecx, eax and ecx, 3Fh movzx esi, byte ptr [r14+rcx+60h] lea ecx, [rsi-6] cmp sil, 6 movzx ecx, cl cmovb ecx, esi mov esi, edx and esi, 3Fh cmp byte ptr [r14+rsi+60h], 0Ch setnz sil and edx, 0C000h neg dx seto r12b or r12b, sil test cl, cl jz short loc_9330 movzx ebp, cl cmp ebp, 6 jz loc_941E mov edi, ebp mov rsi, rbx call _ZN5chess3uci17appendPieceSymbolENS_9PieceTypeERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::appendPieceSymbol(chess::PieceType,std::string &) mov rdi, r14 mov rsi, r15 mov edx, ebp mov rcx, rbx call _ZN5chess3uci16resolveAmbiguityERKNS_5BoardERKNS_4MoveENS_9PieceTypeERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::resolveAmbiguity(chess::Board const&,chess::Move const&,chess::PieceType,std::string &) jmp short loc_939B loc_9330: test r12b, r12b jz short loc_9354 and al, 7 add al, 61h ; 'a' lea rcx, [rsp+48h+var_38] mov [rcx-10h], rcx movzx edx, al mov rdi, rsp mov esi, 1 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) jmp short loc_936F loc_9354: lea rax, [rsp+48h+var_38] mov [rax-10h], rax lea rdx, asc_EC29+2; "" mov rdi, rsp mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_936F: mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_939B mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_939B: test r12b, r12b jz short loc_93AD mov rdi, rbx mov esi, 78h ; 'x' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_93AD: movzx edi, word ptr [r15] and edi, 3Fh; int mov rsi, rbx; int call _ZN5chess3uci12appendSquareENS_6SquareERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::appendSquare(chess::Square,std::string &) movzx eax, word ptr [r15] and eax, 0C000h cmp eax, 4000h jnz short loc_93D7 mov rdi, r15 mov rsi, rbx call _ZN5chess3uci15appendPromotionERKNS_4MoveERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; chess::uci::appendPromotion(chess::Move const&,std::string &) loc_93D7: mov esi, [r15] mov rdi, r14 call _ZN5chess5Board8makeMoveILb0EEEvNS_4MoveE; chess::Board::makeMove<false>(chess::Move) mov rdi, r14; this call _ZNK5chess5Board7inCheckEv; chess::Board::inCheck(void) test al, al jz short loc_9411 mov rdi, r14; this call _ZNK5chess5Board10isGameOverEv; chess::Board::isGameOver(void) shr rax, 20h xor ecx, ecx cmp eax, 1 setnz cl lea esi, ds:23h[rcx*8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_9411: add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_941E: lea rdi, aPtPiecetypeNon; "pt != PieceType::NONE" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aStaticVoidChes_1; "static void chess::uci::moveToRep(Board"... mov edx, 1328h call ___assert_fail mov rbx, rax lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_945B mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_945B: mov rdi, rbx call __Unwind_Resume
long long chess::uci::moveToRep<false>(chess::Board *this, unsigned int *a2, long long a3) { long long result; // rax int v6; // r8d int v7; // r9d __int16 v8; // dx int v9; // eax unsigned __int8 v10; // si int v11; // ecx bool v12; // si int v13; // edx char v14; // r12 unsigned int v15; // ebp int v16; // edx int v17; // ecx int v18; // r8d int v19; // r9d int v20; // edx int v21; // ecx int v22; // r8d int v23; // r9d unsigned long long isGameOver; // rax long long *v25; // [rsp+0h] [rbp-48h] BYREF long long v26; // [rsp+8h] [rbp-40h] long long v27[7]; // [rsp+10h] [rbp-38h] BYREF result = chess::uci::handleCastling(a2, a3); if ( !(_BYTE)result ) { v8 = *(_WORD *)a2; v9 = *(unsigned __int16 *)a2 >> 6; v10 = *((_BYTE *)this + (v9 & 0x3F) + 96); v11 = (unsigned __int8)(v10 - 6); if ( v10 < 6u ) v11 = *((unsigned __int8 *)this + (v9 & 0x3F) + 96); v12 = *((_BYTE *)this + (v8 & 0x3F) + 96) != 12; v13 = v8 & 0xC000; LOWORD(v13) = -(__int16)v13; v14 = v12 | __OFSUB__((_WORD)v13, 1); if ( (_BYTE)v11 ) { v15 = (unsigned __int8)v11; if ( (unsigned __int8)v11 == 6 ) __assert_fail( "pt != PieceType::NONE", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 4904LL, "static void chess::uci::moveToRep(Board, const Move &, std::string &) [LAN = false]"); chess::uci::appendPieceSymbol((unsigned __int8)v11, a3, v13, v11, v6, v7, (_DWORD)v25, v26, v27[0]); chess::uci::resolveAmbiguity(this, a2, v15, a3); } else { v25 = v27; if ( v14 ) std::string::_M_construct(&v25, 1LL, (unsigned __int8)((v9 & 7) + 97)); else std::string::_M_construct<char const*>((long long)&v25, "", (long long)""); std::string::_M_append(a3, v25, v26); if ( v25 != v27 ) operator delete(v25, v27[0] + 1); } if ( v14 ) std::string::push_back(a3, 120LL); chess::uci::appendSquare(*(_WORD *)a2 & 0x3F, a3, v16, v17, v18, v19, v25, v26, v27[0]); if ( (*(_WORD *)a2 & 0xC000) == 0x4000 ) chess::uci::appendPromotion((_DWORD)a2, a3, v20, v21, v22, v23, (_DWORD)v25, v26, v27[0]); chess::Board::makeMove<false>((long long)this, *a2); result = chess::Board::inCheck(this); if ( (_BYTE)result ) { isGameOver = chess::Board::isGameOver(this); return std::string::push_back(a3, 8 * (unsigned int)(HIDWORD(isGameOver) != 1) + 35); } } return result; }
moveToRep<false>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV RDI,RSI MOV RSI,RDX CALL 0x001094a8 TEST AL,AL JNZ 0x00109411 MOVZX EDX,word ptr [R15] MOV EAX,EDX SHR EAX,0x6 MOV ECX,EAX AND ECX,0x3f MOVZX ESI,byte ptr [R14 + RCX*0x1 + 0x60] LEA ECX,[RSI + -0x6] CMP SIL,0x6 MOVZX ECX,CL CMOVC ECX,ESI MOV ESI,EDX AND ESI,0x3f CMP byte ptr [R14 + RSI*0x1 + 0x60],0xc SETNZ SIL AND EDX,0xc000 NEG DX SETO R12B OR R12B,SIL TEST CL,CL JZ 0x00109330 MOVZX EBP,CL CMP EBP,0x6 JZ 0x0010941e MOV EDI,EBP MOV RSI,RBX CALL 0x001094fe MOV RDI,R14 MOV RSI,R15 MOV EDX,EBP MOV RCX,RBX CALL 0x0010957c JMP 0x0010939b LAB_00109330: TEST R12B,R12B JZ 0x00109354 AND AL,0x7 ADD AL,0x61 LEA RCX,[RSP + 0x10] MOV qword ptr [RCX + -0x10],RCX MOVZX EDX,AL MOV RDI,RSP MOV ESI,0x1 CALL 0x00102250 JMP 0x0010936f LAB_00109354: LEA RAX,[RSP + 0x10] MOV qword ptr [RAX + -0x10],RAX LEA RDX,[0x10ec2b] MOV RDI,RSP MOV RSI,RDX CALL 0x00103ff8 LAB_0010936f: MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LAB_00109378: MOV RDI,RBX CALL 0x00102070 LAB_00109380: LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010939b MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00102210 LAB_0010939b: TEST R12B,R12B JZ 0x001093ad MOV RDI,RBX MOV ESI,0x78 CALL 0x001021d0 LAB_001093ad: MOVZX EDI,word ptr [R15] AND EDI,0x3f MOV RSI,RBX CALL 0x00109750 MOVZX EAX,word ptr [R15] AND EAX,0xc000 CMP EAX,0x4000 JNZ 0x001093d7 MOV RDI,R15 MOV RSI,RBX CALL 0x0010981e LAB_001093d7: MOV ESI,dword ptr [R15] MOV RDI,R14 CALL 0x00105df6 MOV RDI,R14 CALL 0x0010734a TEST AL,AL JZ 0x00109411 MOV RDI,R14 CALL 0x00106fe0 SHR RAX,0x20 XOR ECX,ECX CMP EAX,0x1 SETNZ CL LEA ESI,[0x23 + RCX*0x8] MOV RDI,RBX CALL 0x001021d0 LAB_00109411: ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010941e: LEA RDI,[0x10f03b] LEA RSI,[0x10ebac] LEA RCX,[0x10f051] MOV EDX,0x1328 CALL 0x00102130
/* void chess::uci::moveToRep<false>(chess::Board, chess::Move const&, std::__cxx11::string&) */ void chess::uci::moveToRep<false>(Board *param_1,ushort *param_2,string *param_3) { Board BVar1; ushort uVar2; char cVar3; Board BVar4; long *local_48 [2]; long local_38 [2]; cVar3 = handleCastling((Move *)param_2,param_3); if (cVar3 == '\0') { uVar2 = *param_2; BVar1 = param_1[(ulong)(uVar2 >> 6 & 0x3f) + 0x60]; BVar4 = (Board)((char)BVar1 - 6); if ((byte)BVar1 < 6) { BVar4 = BVar1; } BVar1 = param_1[(ulong)(uVar2 & 0x3f) + 0x60]; if (BVar4 == (Board)0x0) { if (BVar1 == (Board)0xc) { local_48[0] = local_38; std::__cxx11::string::_M_construct<char_const*>(local_48,&DAT_0010ec2b); } else { local_48[0] = local_38; std::__cxx11::string::_M_construct((ulong)local_48,'\x01'); } /* try { // try from 00109378 to 0010937f has its CatchHandler @ 0010943d */ std::__cxx11::string::_M_append((char *)param_3,(ulong)local_48[0]); if (local_48[0] != local_38) { operator_delete(local_48[0],local_38[0] + 1); } } else { if (BVar4 == (Board)0x6) { /* WARNING: Subroutine does not return */ __assert_fail("pt != PieceType::NONE", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x1328, "static void chess::uci::moveToRep(Board, const Move &, std::string &) [LAN = false]" ); } appendPieceSymbol(BVar4,param_3,-(uVar2 & 0xc000)); resolveAmbiguity(param_1,param_2,BVar4,param_3); } if (BVar1 != (Board)0xc) { std::__cxx11::string::push_back((char)param_3); } appendSquare(*param_2 & 0x3f,param_3); if ((*param_2 & 0xc000) == 0x4000) { appendPromotion((Move *)param_2,param_3); } Board::makeMove<false>(param_1,*(int4 *)param_2); cVar3 = Board::inCheck(param_1); if (cVar3 != '\0') { Board::isGameOver(param_1); std::__cxx11::string::push_back((char)param_3); } } return; }
28,651
ma_pvio_cache_read
eloqsql/libmariadb/libmariadb/ma_pvio.c
ssize_t ma_pvio_cache_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length) { ssize_t r; if (!pvio) return -1; if (!pvio->cache) return ma_pvio_read(pvio, buffer, length); if (pvio->cache + pvio->cache_size > pvio->cache_pos) { ssize_t remaining = pvio->cache + pvio->cache_size - pvio->cache_pos; assert(remaining > 0); r= MIN((ssize_t)length, remaining); memcpy(buffer, pvio->cache_pos, r); pvio->cache_pos+= r; } else if (length >= PVIO_READ_AHEAD_CACHE_MIN_SIZE) { r= ma_pvio_read(pvio, buffer, length); } else { r= ma_pvio_read(pvio, pvio->cache, PVIO_READ_AHEAD_CACHE_SIZE); if (r > 0) { if (length < (size_t)r) { pvio->cache_size= r; pvio->cache_pos= pvio->cache + length; r= length; } memcpy(buffer, pvio->cache, r); } } return r; }
O0
c
ma_pvio_cache_read: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x7e418 movq $-0x1, -0x8(%rbp) jmp 0x7e559 movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0x7e43d movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x7e010 movq %rax, -0x8(%rbp) jmp 0x7e559 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx addq 0x18(%rcx), %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax jbe 0x7e4c4 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx addq 0x18(%rcx), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jge 0x7e48a movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x7e492 movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x28(%rbp), %rdx callq 0x3b0c0 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x10(%rax), %rcx movq %rcx, 0x10(%rax) jmp 0x7e551 cmpq $0x800, -0x20(%rbp) # imm = 0x800 jb 0x7e4e5 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x7e010 movq %rax, -0x28(%rbp) jmp 0x7e54f movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movl $0x4000, %edx # imm = 0x4000 callq 0x7e010 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jle 0x7e54d movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x7e538 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx addq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movq -0x28(%rbp), %rdx callq 0x3b0c0 jmp 0x7e54f jmp 0x7e551 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_pvio_cache_read: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_10], 0 jnz short loc_7E418 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_7E559 loc_7E418: mov rax, [rbp+var_10] cmp qword ptr [rax+8], 0 jnz short loc_7E43D mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call ma_pvio_read mov [rbp+var_8], rax jmp loc_7E559 loc_7E43D: mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] add rax, [rcx+18h] mov rcx, [rbp+var_10] cmp rax, [rcx+10h] jbe short loc_7E4C4 mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] add rax, [rcx+18h] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jge short loc_7E48A mov rax, [rbp+var_20] mov [rbp+var_38], rax jmp short loc_7E492 loc_7E48A: mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_7E492: mov rax, [rbp+var_38] mov [rbp+var_28], rax mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rdx, [rbp+var_28] call _memcpy mov rcx, [rbp+var_28] mov rax, [rbp+var_10] add rcx, [rax+10h] mov [rax+10h], rcx jmp loc_7E551 loc_7E4C4: cmp [rbp+var_20], 800h jb short loc_7E4E5 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call ma_pvio_read mov [rbp+var_28], rax jmp short loc_7E54F loc_7E4E5: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax+8] mov edx, 4000h call ma_pvio_read mov [rbp+var_28], rax cmp [rbp+var_28], 0 jle short loc_7E54D mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jnb short loc_7E538 mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_10] mov rcx, [rax+8] add rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_20] mov [rbp+var_28], rax loc_7E538: mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rsi, [rax+8] mov rdx, [rbp+var_28] call _memcpy loc_7E54D: jmp short $+2 loc_7E54F: jmp short $+2 loc_7E551: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_7E559: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_pvio_cache_read(_QWORD *a1, long long a2, unsigned long long a3) { unsigned long long v4; // [rsp+8h] [rbp-38h] long long v5; // [rsp+18h] [rbp-28h] if ( !a1 ) return -1LL; if ( !a1[1] ) return ma_pvio_read(a1, a2, a3); if ( a1[3] + a1[1] <= a1[2] ) { if ( a3 < 0x800 ) { v5 = ma_pvio_read(a1, a1[1], 0x4000LL); if ( v5 > 0 ) { if ( a3 < v5 ) { a1[3] = v5; a1[2] = a3 + a1[1]; v5 = a3; } memcpy(a2, a1[1], v5); } } else { return ma_pvio_read(a1, a2, a3); } } else { if ( (signed long long)a3 >= a1[3] + a1[1] - a1[2] ) v4 = a1[3] + a1[1] - a1[2]; else v4 = a3; v5 = v4; memcpy(a2, a1[2], v4); a1[2] += v4; } return v5; }
ma_pvio_cache_read: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x10],0x0 JNZ 0x0017e418 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x0017e559 LAB_0017e418: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0017e43d MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0017e010 MOV qword ptr [RBP + -0x8],RAX JMP 0x0017e559 LAB_0017e43d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RCX + 0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JBE 0x0017e4c4 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RCX + 0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JGE 0x0017e48a MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX JMP 0x0017e492 LAB_0017e48a: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_0017e492: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0013b0c0 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x10] MOV qword ptr [RAX + 0x10],RCX JMP 0x0017e551 LAB_0017e4c4: CMP qword ptr [RBP + -0x20],0x800 JC 0x0017e4e5 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0017e010 MOV qword ptr [RBP + -0x28],RAX JMP 0x0017e54f LAB_0017e4e5: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV EDX,0x4000 CALL 0x0017e010 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JLE 0x0017e54d MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JNC 0x0017e538 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX LAB_0017e538: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0013b0c0 LAB_0017e54d: JMP 0x0017e54f LAB_0017e54f: JMP 0x0017e551 LAB_0017e551: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0017e559: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
ulong ma_pvio_cache_read(long param_1,void *param_2,ulong param_3) { size_t local_40; ulong local_30; ulong local_10; if (param_1 == 0) { local_10 = 0xffffffffffffffff; } else if (*(long *)(param_1 + 8) == 0) { local_10 = ma_pvio_read(param_1,param_2,param_3); } else { if (*(ulong *)(param_1 + 0x10) < (ulong)(*(long *)(param_1 + 8) + *(long *)(param_1 + 0x18))) { local_40 = (*(long *)(param_1 + 8) + *(long *)(param_1 + 0x18)) - *(long *)(param_1 + 0x10); if ((long)param_3 < (long)local_40) { local_40 = param_3; } local_30 = local_40; memcpy(param_2,*(void **)(param_1 + 0x10),local_40); *(size_t *)(param_1 + 0x10) = local_40 + *(long *)(param_1 + 0x10); } else if (param_3 < 0x800) { local_30 = ma_pvio_read(param_1,*(int8 *)(param_1 + 8),0x4000); if (0 < (long)local_30) { if (param_3 < local_30) { *(ulong *)(param_1 + 0x18) = local_30; *(ulong *)(param_1 + 0x10) = *(long *)(param_1 + 8) + param_3; local_30 = param_3; } memcpy(param_2,*(void **)(param_1 + 8),local_30); } } else { local_30 = ma_pvio_read(param_1,param_2,param_3); } local_10 = local_30; } return local_10; }
28,652
ma_pvio_cache_read
eloqsql/libmariadb/libmariadb/ma_pvio.c
ssize_t ma_pvio_cache_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length) { ssize_t r; if (!pvio) return -1; if (!pvio->cache) return ma_pvio_read(pvio, buffer, length); if (pvio->cache + pvio->cache_size > pvio->cache_pos) { ssize_t remaining = pvio->cache + pvio->cache_size - pvio->cache_pos; assert(remaining > 0); r= MIN((ssize_t)length, remaining); memcpy(buffer, pvio->cache_pos, r); pvio->cache_pos+= r; } else if (length >= PVIO_READ_AHEAD_CACHE_MIN_SIZE) { r= ma_pvio_read(pvio, buffer, length); } else { r= ma_pvio_read(pvio, pvio->cache, PVIO_READ_AHEAD_CACHE_SIZE); if (r > 0) { if (length < (size_t)r) { pvio->cache_size= r; pvio->cache_pos= pvio->cache + length; r= length; } memcpy(buffer, pvio->cache, r); } } return r; }
O3
c
ma_pvio_cache_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx testq %rdi, %rdi je 0x6151d movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x8(%rdi), %rsi testq %rsi, %rsi je 0x61539 movq 0x18(%r15), %rcx addq %rsi, %rcx movq 0x10(%r15), %rax subq %rax, %rcx jbe 0x61530 cmpq %rbx, %rcx cmovlq %rcx, %rbx movq %r14, %rdi movq %rax, %rsi movq %rbx, %rdx callq 0x3a0c0 addq %rbx, 0x10(%r15) movq %rbx, %r12 jmp 0x61524 movq $-0x1, %r12 movq %r12, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpq $0x800, %rbx # imm = 0x800 jb 0x6154f movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x612b0 movl $0x4000, %edx # imm = 0x4000 movq %r15, %rdi callq 0x612b0 movq %rax, %r12 testq %rax, %rax jle 0x61524 movq 0x8(%r15), %rsi cmpq %rbx, %r12 jbe 0x6157e movq %r12, 0x18(%r15) leaq (%rsi,%rbx), %rax movq %rax, 0x10(%r15) movq %rbx, %r12 jmp 0x61581 movq %r12, %rbx movq %r14, %rdi movq %rbx, %rdx callq 0x3a0c0 jmp 0x61524
ma_pvio_cache_read: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx test rdi, rdi jz short loc_6151D mov rbx, rdx mov r14, rsi mov r15, rdi mov rsi, [rdi+8] test rsi, rsi jz short loc_61539 mov rcx, [r15+18h] add rcx, rsi mov rax, [r15+10h] sub rcx, rax jbe short loc_61530 cmp rcx, rbx cmovl rbx, rcx mov rdi, r14 mov rsi, rax mov rdx, rbx call _memcpy add [r15+10h], rbx mov r12, rbx jmp short loc_61524 loc_6151D: mov r12, 0FFFFFFFFFFFFFFFFh loc_61524: mov rax, r12 pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_61530: cmp rbx, 800h jb short loc_6154F loc_61539: mov rdi, r15 mov rsi, r14 mov rdx, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp ma_pvio_read loc_6154F: mov edx, 4000h mov rdi, r15 call ma_pvio_read mov r12, rax test rax, rax jle short loc_61524 mov rsi, [r15+8] cmp r12, rbx jbe short loc_6157E mov [r15+18h], r12 lea rax, [rsi+rbx] mov [r15+10h], rax mov r12, rbx jmp short loc_61581 loc_6157E: mov rbx, r12 loc_61581: mov rdi, r14 mov rdx, rbx call _memcpy jmp short loc_61524
long long ma_pvio_cache_read(_QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6) { unsigned long long v6; // rbx long long v8; // rsi unsigned long long v9; // rcx unsigned long long v10; // rax bool v11; // cc long long v12; // rcx long long v13; // r12 long long v15; // rax long long v16; // rcx long long v17; // r8 long long v18; // r9 long long v19; // rsi if ( !a1 ) return -1LL; v6 = a3; v8 = a1[1]; if ( v8 ) { v9 = v8 + a1[3]; v10 = a1[2]; v11 = v9 <= v10; v12 = v9 - v10; if ( !v11 ) { if ( v12 < a3 ) v6 = v12; memcpy(a2, a1[2], v6, v12, a5, a6); a1[2] += v6; return v6; } if ( (unsigned long long)a3 < 0x800 ) { v15 = ma_pvio_read((long long)a1, v8, 0x4000LL); v13 = v15; if ( v15 > 0 ) { v19 = a1[1]; if ( v15 <= v6 ) { v6 = v15; } else { a1[3] = v15; a1[2] = v19 + v6; v13 = v6; } memcpy(a2, v19, v6, v16, v17, v18); } return v13; } } return ma_pvio_read((long long)a1, a2, a3); }
ma_pvio_cache_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX TEST RDI,RDI JZ 0x0016151d MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RSI,qword ptr [RDI + 0x8] TEST RSI,RSI JZ 0x00161539 MOV RCX,qword ptr [R15 + 0x18] ADD RCX,RSI MOV RAX,qword ptr [R15 + 0x10] SUB RCX,RAX JBE 0x00161530 CMP RCX,RBX CMOVL RBX,RCX MOV RDI,R14 MOV RSI,RAX MOV RDX,RBX CALL 0x0013a0c0 ADD qword ptr [R15 + 0x10],RBX MOV R12,RBX JMP 0x00161524 LAB_0016151d: MOV R12,-0x1 LAB_00161524: MOV RAX,R12 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00161530: CMP RBX,0x800 JC 0x0016154f LAB_00161539: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001612b0 LAB_0016154f: MOV EDX,0x4000 MOV RDI,R15 CALL 0x001612b0 MOV R12,RAX TEST RAX,RAX JLE 0x00161524 MOV RSI,qword ptr [R15 + 0x8] CMP R12,RBX JBE 0x0016157e MOV qword ptr [R15 + 0x18],R12 LEA RAX,[RSI + RBX*0x1] MOV qword ptr [R15 + 0x10],RAX MOV R12,RBX JMP 0x00161581 LAB_0016157e: MOV RBX,R12 LAB_00161581: MOV RDI,R14 MOV RDX,RBX CALL 0x0013a0c0 JMP 0x00161524
ulong ma_pvio_cache_read(long param_1,void *param_2,ulong param_3) { long lVar1; void *__src; ulong uVar2; void *pvVar3; size_t sVar4; if (param_1 == 0) { uVar2 = 0xffffffffffffffff; } else { lVar1 = *(long *)(param_1 + 8); if (lVar1 == 0) { LAB_00161539: uVar2 = ma_pvio_read(param_1,param_2,param_3); return uVar2; } pvVar3 = (void *)(*(long *)(param_1 + 0x18) + lVar1); __src = *(void **)(param_1 + 0x10); sVar4 = (long)pvVar3 - (long)__src; if (pvVar3 < __src || sVar4 == 0) { if (0x7ff < param_3) goto LAB_00161539; uVar2 = ma_pvio_read(param_1,lVar1,0x4000); if (0 < (long)uVar2) { if (param_3 < uVar2) { *(ulong *)(param_1 + 0x18) = uVar2; *(ulong *)(param_1 + 0x10) = (long)*(void **)(param_1 + 8) + param_3; uVar2 = param_3; } memcpy(param_2,*(void **)(param_1 + 8),uVar2); } } else { uVar2 = param_3; if ((long)sVar4 < (long)param_3) { uVar2 = sVar4; } memcpy(param_2,__src,uVar2); *(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + uVar2; } } return uVar2; }
28,653
nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key() const
monkey531[P]llama/common/json.hpp
const typename object_t::key_type& key() const { JSON_ASSERT(m_object != nullptr); if (JSON_HEDLEY_LIKELY(m_object->is_object())) { return m_it.object_iterator->first; } JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object)); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key() const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq (%rdi), %rax testq %rax, %rax je 0xad891 movq %rdi, %r14 cmpb $0x1, (%rax) jne 0xad833 movq 0x8(%r14), %rax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1a460 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x42a73(%rip), %rsi # 0xf02c3 leaq 0x42a95(%rip), %rdx # 0xf02ec leaq 0x8(%rsp), %rdi callq 0x222de movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xcf, %esi callq 0x5ea6e xorl %ebp, %ebp leaq 0x7c696(%rip), %rsi # 0x129f18 leaq -0x52725(%rip), %rdx # 0x5b164 movq %rbx, %rdi callq 0x1af40 leaq 0x3e7ab(%rip), %rdi # 0xec043 leaq 0x38a02(%rip), %rdx # 0xe62a1 leaq 0x439a7(%rip), %rcx # 0xf124d movl $0x3519, %esi # imm = 0x3519 xorl %eax, %eax callq 0x1aed0 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0xad8cc movq 0x18(%rsp), %rsi incq %rsi callq 0x1a900 testb %bpl, %bpl jne 0xad8d6 jmp 0xad8de movq %rax, %r14 movq %rbx, %rdi callq 0x1a690 movq %r14, %rdi callq 0x1afd0
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov rax, [rdi] test rax, rax jz short loc_AD891 mov r14, rdi cmp byte ptr [rax], 1 jnz short loc_AD833 mov rax, [r14+8] add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_AD833: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotUseKeyFo; "cannot use key() for non-object iterato"... lea rdx, aCannotUseKeyFo+29h; "" lea rdi, [rsp+48h+var_40] 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 rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0CFh; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_AD891: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3519h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_AD8CC mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AD8CC: test bpl, bpl jnz short loc_AD8D6 jmp short loc_AD8DE mov r14, rax loc_AD8D6: mov rdi, rbx; void * call ___cxa_free_exception loc_AD8DE: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key( _QWORD *a1) { void *v1; // rbx char v2; // bp void *v3; // r15 nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx long long v6; // r14 void *v7[2]; // [rsp+8h] [rbp-40h] BYREF long long v8; // [rsp+18h] [rbp-30h] BYREF if ( !*a1 ) { v6 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 13593LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); if ( v7[0] != v3 ) operator delete(v7[0], v8 + 1); if ( v2 ) __cxa_free_exception(v1); _Unwind_Resume(v6); } if ( *(_BYTE *)*a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v7[0] = &v8; std::string::_M_construct<char const*>((long long)v7, "cannot use key() for non-object iterators", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 207, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return a1[1]; }
key: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001ad891 MOV R14,RDI CMP byte ptr [RAX],0x1 JNZ 0x001ad833 MOV RAX,qword ptr [R14 + 0x8] ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_001ad833: MOV EDI,0x20 CALL 0x0011a460 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_001ad849: LEA RSI,[0x1f02c3] LEA RDX,[0x1f02ec] LEA RDI,[RSP + 0x8] CALL 0x001222de MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_001ad867: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xcf CALL 0x0015ea6e XOR EBP,EBP LEA RSI,[0x229f18] LEA RDX,[0x15b164] MOV RDI,RBX CALL 0x0011af40 LAB_001ad891: LEA RDI,[0x1ec043] LEA RDX,[0x1e62a1] LEA RCX,[0x1f124d] MOV ESI,0x3519 XOR EAX,EAX CALL 0x0011aed0
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<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> >::key() const */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<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>> ::key(iter_impl<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 uVar1; int1 *local_40 [2]; int1 local_30 [16]; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3519, "GGML_ASSERT(%s) failed","m_object != nullptr"); } if (**(char **)this == '\x01') { return *(int8 *)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 001ad849 to 001ad860 has its CatchHandler @ 001ad8d3 */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot use key() for non-object iterators",""); /* try { // try from 001ad867 to 001ad890 has its CatchHandler @ 001ad8b2 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0xcf,local_40,*(int8 *)this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&invalid_iterator::typeinfo,exception::~exception); }
28,654
OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch(int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/../vtr/level.h
FVarLevel const & getFVarLevel(int channel) const { return *_fvarChannels[channel]; }
O1
c
OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch(int, int) const: movslq %edx, %rax movq 0x1c8(%rdi), %rcx movq (%rcx,%rax,8), %rax movslq %esi, %rcx movq 0x30(%rax), %rax testb $0x1, (%rax,%rcx) sete %al retq nop
_ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25doesEdgeFVarTopologyMatchEii: movsxd rax, edx mov rcx, [rdi+1C8h] mov rax, [rcx+rax*8] movsxd rcx, esi mov rax, [rax+30h] test byte ptr [rax+rcx], 1 setz al retn
bool OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch( OpenSubdiv::v3_6_0::Vtr::internal::Level *this, int a2, int a3) { return (*(_BYTE *)(*(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 57) + 8LL * a3) + 48LL) + a2) & 1) == 0; }
doesEdgeFVarTopologyMatch: MOVSXD RAX,EDX MOV RCX,qword ptr [RDI + 0x1c8] MOV RAX,qword ptr [RCX + RAX*0x8] MOVSXD RCX,ESI MOV RAX,qword ptr [RAX + 0x30] TEST byte ptr [RAX + RCX*0x1],0x1 SETZ AL RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch(int, int) const */ int8 __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch (Level *this,int param_1,int param_2) { long lVar1; lVar1 = *(long *)(*(long *)(*(long *)(this + 0x1c8) + (long)param_2 * 8) + 0x30); return CONCAT71((int7)((ulong)lVar1 >> 8),(*(byte *)(lVar1 + param_1) & 1) == 0); }
28,655
OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch(int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/../vtr/level.h
FVarLevel const & getFVarLevel(int channel) const { return *_fvarChannels[channel]; }
O2
c
OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch(int, int) const: movslq %edx, %rax movq 0x1c8(%rdi), %rcx movq (%rcx,%rax,8), %rax movslq %esi, %rcx movq 0x60(%rax), %rdx movq 0xa8(%rax), %rax movslq (%rdx,%rcx,4), %rcx testb $0x1, (%rax,%rcx) sete %al retq
_ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level27doesVertexFVarTopologyMatchEii: movsxd rax, edx mov rcx, [rdi+1C8h] mov rax, [rcx+rax*8] movsxd rcx, esi mov rdx, [rax+60h] mov rax, [rax+0A8h] movsxd rcx, dword ptr [rdx+rcx*4] test byte ptr [rax+rcx], 1 setz al retn
bool OpenSubdiv::v3_6_0::Vtr::internal::Level::doesVertexFVarTopologyMatch( OpenSubdiv::v3_6_0::Vtr::internal::Level *this, int a2, int a3) { long long v3; // rax v3 = *(_QWORD *)(*((_QWORD *)this + 57) + 8LL * a3); return (*(_BYTE *)(*(_QWORD *)(v3 + 168) + *(int *)(*(_QWORD *)(v3 + 96) + 4LL * a2)) & 1) == 0; }
doesVertexFVarTopologyMatch: MOVSXD RAX,EDX MOV RCX,qword ptr [RDI + 0x1c8] MOV RAX,qword ptr [RCX + RAX*0x8] MOVSXD RCX,ESI MOV RDX,qword ptr [RAX + 0x60] MOV RAX,qword ptr [RAX + 0xa8] MOVSXD RCX,dword ptr [RDX + RCX*0x4] TEST byte ptr [RAX + RCX*0x1],0x1 SETZ AL RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::doesVertexFVarTopologyMatch(int, int) const */ int8 __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Level::doesVertexFVarTopologyMatch (Level *this,int param_1,int param_2) { long lVar1; long lVar2; lVar1 = *(long *)(*(long *)(this + 0x1c8) + (long)param_2 * 8); lVar2 = *(long *)(lVar1 + 0xa8); return CONCAT71((int7)((ulong)lVar2 >> 8), (*(byte *)(lVar2 + *(int *)(*(long *)(lVar1 + 0x60) + (long)param_1 * 4)) & 1) == 0); }
28,656
OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch(int, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/../vtr/level.h
FVarLevel const & getFVarLevel(int channel) const { return *_fvarChannels[channel]; }
O3
c
OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch(int, int) const: movslq %edx, %rax movq 0x1c8(%rdi), %rcx movq (%rcx,%rax,8), %rax movslq %esi, %rcx movq 0x30(%rax), %rax testb $0x1, (%rax,%rcx) sete %al retq nop
_ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25doesEdgeFVarTopologyMatchEii: movsxd rax, edx mov rcx, [rdi+1C8h] mov rax, [rcx+rax*8] movsxd rcx, esi mov rax, [rax+30h] test byte ptr [rax+rcx], 1 setz al retn
bool OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch( OpenSubdiv::v3_6_0::Vtr::internal::Level *this, int a2, int a3) { return (*(_BYTE *)(*(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 57) + 8LL * a3) + 48LL) + a2) & 1) == 0; }
doesEdgeFVarTopologyMatch: MOVSXD RAX,EDX MOV RCX,qword ptr [RDI + 0x1c8] MOV RAX,qword ptr [RCX + RAX*0x8] MOVSXD RCX,ESI MOV RAX,qword ptr [RAX + 0x30] TEST byte ptr [RAX + RCX*0x1],0x1 SETZ AL RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch(int, int) const */ int8 __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Level::doesEdgeFVarTopologyMatch (Level *this,int param_1,int param_2) { long lVar1; lVar1 = *(long *)(*(long *)(*(long *)(this + 0x1c8) + (long)param_2 * 8) + 0x30); return CONCAT71((int7)((ulong)lVar1 >> 8),(*(byte *)(lVar1 + param_1) & 1) == 0); }
28,657
common_log::common_log(unsigned long)
monkey531[P]llama/common/log.cpp
common_log(size_t capacity) { file = nullptr; prefix = false; timestamps = false; running = false; t_start = t_us(); // initial message size - will be expanded if longer messages arrive entries.resize(capacity); for (auto & entry : entries) { entry.msg.resize(256); } head = 0; tail = 0; resume(); }
O3
cpp
common_log::common_log(unsigned long): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %r12 movq %rdi, %rbx leaq 0x30(%rdi), %r14 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movq %r14, %rdi callq 0x18920 leaq 0x78(%rbx), %r15 xorl %eax, %eax movq %rax, 0x88(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x78(%rbx) movups %xmm0, 0xb0(%rbx) movq %rax, 0xc0(%rbx) movq %rax, 0x60(%rbx) movl $0x0, 0x67(%rbx) callq 0x18080 movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x7, %rdx addq %rax, %rdx movq %rdx, 0x70(%rbx) movq %r15, %rdi movq %r12, %rsi callq 0x7fa42 movq 0x78(%rbx), %r12 movq 0x80(%rbx), %r13 cmpq %r13, %r12 je 0x7f9de leaq 0x10(%r12), %rdi movl $0x100, %esi # imm = 0x100 callq 0x2abea addq $0x30, %r12 jmp 0x7f9c4 xorps %xmm0, %xmm0 movups %xmm0, 0x90(%rbx) movq %rbx, %rdi callq 0x7f460 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x7f9fc movq %rax, %r12 leaq 0xb0(%rbx), %rax movq (%rax), %rdi testq %rdi, %rdi je 0x7fa1d movq 0xc0(%rbx), %rsi subq %rdi, %rsi callq 0x186a0 movq %r15, %rdi callq 0x7fa84 movq %r14, %rdi callq 0x18bf0 cmpq $0x0, 0x28(%rbx) jne 0x7fa3c movq %r12, %rdi callq 0x18b90 callq 0x18190 nop
_ZN10common_logC2Em: push r15 push r14 push r13 push r12 push rbx mov r12, rsi mov rbx, rdi lea r14, [rdi+30h] xorps xmm0, xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, r14; this call __ZNSt18condition_variableC1Ev; std::condition_variable::condition_variable(void) lea r15, [rbx+78h] xor eax, eax mov [rbx+88h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+78h], xmm0 movups xmmword ptr [rbx+0B0h], xmm0 mov [rbx+0C0h], rax mov [rbx+60h], rax mov dword ptr [rbx+67h], 0 call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov rcx, 20C49BA5E353F7CFh imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 7 add rdx, rax mov [rbx+70h], rdx mov rdi, r15 mov rsi, r12 call _ZNSt6vectorI16common_log_entrySaIS0_EE6resizeEm; std::vector<common_log_entry>::resize(ulong) mov r12, [rbx+78h] mov r13, [rbx+80h] loc_7F9C4: cmp r12, r13 jz short loc_7F9DE lea rdi, [r12+10h] mov esi, 100h call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong) add r12, 30h ; '0' jmp short loc_7F9C4 loc_7F9DE: xorps xmm0, xmm0 movups xmmword ptr [rbx+90h], xmm0 mov rdi, rbx; this call _ZN10common_log6resumeEv; common_log::resume(void) pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_7F9FC: mov r12, rax lea rax, [rbx+0B0h] mov rdi, [rax]; void * test rdi, rdi jz short loc_7FA1D mov rsi, [rbx+0C0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7FA1D: mov rdi, r15 call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector() mov rdi, r14; this call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable() cmp qword ptr [rbx+28h], 0 jnz short loc_7FA3C mov rdi, r12 call __Unwind_Resume loc_7FA3C: call __ZSt9terminatev; std::terminate(void)
void common_log::common_log(common_log *this, long long a2) { std::condition_variable *v3; // rdi long long v4; // r12 long long v5; // r13 *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 1) = 0LL; *(_OWORD *)this = 0LL; v3 = (common_log *)((char *)this + 48); std::condition_variable::condition_variable(v3); *((_QWORD *)this + 17) = 0LL; *(_OWORD *)((char *)this + 120) = 0LL; *((_OWORD *)this + 11) = 0LL; *((_QWORD *)this + 24) = 0LL; *((_QWORD *)this + 12) = 0LL; *(_DWORD *)((char *)this + 103) = 0; *((_QWORD *)this + 14) = std::chrono::_V2::system_clock::now(v3) / 1000LL; std::vector<common_log_entry>::resize((char *)this + 120, a2); v4 = *((_QWORD *)this + 15); v5 = *((_QWORD *)this + 16); while ( v4 != v5 ) { std::vector<char>::resize((_QWORD *)(v4 + 16), 0x100uLL); v4 += 48LL; } *((_OWORD *)this + 9) = 0LL; common_log::resume(this); }
common_log: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R12,RSI MOV RBX,RDI LEA R14,[RDI + 0x30] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI,R14 CALL 0x00118920 LEA R15,[RBX + 0x78] XOR EAX,EAX MOV qword ptr [RBX + 0x88],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x78],XMM0 MOVUPS xmmword ptr [RBX + 0xb0],XMM0 MOV qword ptr [RBX + 0xc0],RAX MOV qword ptr [RBX + 0x60],RAX MOV dword ptr [RBX + 0x67],0x0 CALL 0x00118080 MOV RCX,0x20c49ba5e353f7cf IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x7 ADD RDX,RAX MOV qword ptr [RBX + 0x70],RDX LAB_0017f9ae: MOV RDI,R15 MOV RSI,R12 CALL 0x0017fa42 MOV R12,qword ptr [RBX + 0x78] MOV R13,qword ptr [RBX + 0x80] LAB_0017f9c4: CMP R12,R13 JZ 0x0017f9de LEA RDI,[R12 + 0x10] LAB_0017f9ce: MOV ESI,0x100 CALL 0x0012abea ADD R12,0x30 JMP 0x0017f9c4 LAB_0017f9de: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x90],XMM0 LAB_0017f9e8: MOV RDI,RBX CALL 0x0017f460 LAB_0017f9f0: POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* common_log::common_log(unsigned long) */ void __thiscall common_log::common_log(common_log *this,ulong param_1) { long lVar1; long lVar2; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; std::condition_variable::condition_variable((condition_variable *)(this + 0x30)); *(int8 *)(this + 0x88) = 0; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 0x60) = 0; *(int4 *)(this + 0x67) = 0; lVar2 = std::chrono::_V2::system_clock::now(); *(long *)(this + 0x70) = lVar2 / 1000; /* try { // try from 0017f9ae to 0017f9b8 has its CatchHandler @ 0017f9fa */ std::vector<common_log_entry,std::allocator<common_log_entry>>::resize ((vector<common_log_entry,std::allocator<common_log_entry>> *)(this + 0x78),param_1); lVar1 = *(long *)(this + 0x80); for (lVar2 = *(long *)(this + 0x78); lVar2 != lVar1; lVar2 = lVar2 + 0x30) { /* try { // try from 0017f9ce to 0017f9d7 has its CatchHandler @ 0017f9fc */ std::vector<char,std::allocator<char>>::resize ((vector<char,std::allocator<char>> *)(lVar2 + 0x10),0x100); } *(int8 *)(this + 0x90) = 0; *(int8 *)(this + 0x98) = 0; /* try { // try from 0017f9e8 to 0017f9ef has its CatchHandler @ 0017f9fa */ resume(this); return; }
28,658
DrawFPS
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
void DrawFPS(int posX, int posY) { Color color = LIME; // Good FPS int fps = GetFPS(); if ((fps < 30) && (fps >= 15)) color = ORANGE; // Warning FPS else if (fps < 15) color = RED; // Low FPS DrawText(TextFormat("%2i FPS", fps), posX, posY, 20, color); }
O2
c
DrawFPS: pushq %rbp pushq %r14 pushq %rbx movl %esi, %ebx movl %edi, %ebp callq 0x634e3 leal -0xf(%rax), %ecx cmpl $0xf, %ecx jae 0x718f8 movl $0xff000000, %ecx # imm = 0xFF000000 movl $0xa100, %edx # imm = 0xA100 movl $0xff, %r14d jmp 0x7191c cmpl $0xe, %eax jg 0x7190f movl $0xff370000, %ecx # imm = 0xFF370000 movl $0x2900, %edx # imm = 0x2900 movl $0xe6, %r14d jmp 0x7191c movl $0xff2f0000, %ecx # imm = 0xFF2F0000 movl $0x9e00, %edx # imm = 0x9E00 xorl %r14d, %r14d orl %edx, %r14d orl %ecx, %r14d leaq 0x5d353(%rip), %rdi # 0xcec7c movl %eax, %esi xorl %eax, %eax callq 0x719ab pushq $0x14 popq %rcx movq %rax, %rdi movl %ebp, %esi movl %ebx, %edx movl %r14d, %r8d popq %rbx popq %r14 popq %rbp jmp 0x71948
DrawFPS: push rbp push r14 push rbx mov ebx, esi mov ebp, edi call GetFPS lea ecx, [rax-0Fh] cmp ecx, 0Fh jnb short loc_718F8 mov ecx, 0FF000000h mov edx, 0A100h mov r14d, 0FFh jmp short loc_7191C loc_718F8: cmp eax, 0Eh jg short loc_7190F mov ecx, 0FF370000h mov edx, 2900h mov r14d, 0E6h jmp short loc_7191C loc_7190F: mov ecx, 0FF2F0000h mov edx, 9E00h xor r14d, r14d loc_7191C: or r14d, edx or r14d, ecx lea rdi, a2iFps; "%2i FPS" mov esi, eax xor eax, eax call TextFormat push 14h pop rcx mov rdi, rax mov esi, ebp mov edx, ebx mov r8d, r14d pop rbx pop r14 pop rbp jmp $+5
double DrawFPS( unsigned int a1, unsigned int a2, double a3, double a4, double a5, double a6, double a7, double a8, double a9, double a10) { int FPS; // eax int v11; // r8d int v12; // r9d int v13; // ecx int v14; // edx int v15; // r14d unsigned int v16; // r14d long long v17; // rax FPS = GetFPS(a3, a4, a5, a6, a7, a8, a9, a10); if ( (unsigned int)(FPS - 15) >= 0xF ) { if ( FPS > 14 ) { v13 = -13697024; v14 = 40448; v15 = 0; } else { v13 = -13172736; v14 = 10496; v15 = 230; } } else { v13 = -16777216; v14 = 41216; v15 = 255; } v16 = v13 | v14 | v15; v17 = TextFormat((unsigned int)"%2i FPS", FPS, v14, v13, v11, v12); return DrawText(v17, a1, a2, 20LL, v16); }
DrawFPS: PUSH RBP PUSH R14 PUSH RBX MOV EBX,ESI MOV EBP,EDI CALL 0x001634e3 LEA ECX,[RAX + -0xf] CMP ECX,0xf JNC 0x001718f8 MOV ECX,0xff000000 MOV EDX,0xa100 MOV R14D,0xff JMP 0x0017191c LAB_001718f8: CMP EAX,0xe JG 0x0017190f MOV ECX,0xff370000 MOV EDX,0x2900 MOV R14D,0xe6 JMP 0x0017191c LAB_0017190f: MOV ECX,0xff2f0000 MOV EDX,0x9e00 XOR R14D,R14D LAB_0017191c: OR R14D,EDX OR R14D,ECX LEA RDI,[0x1cec7c] MOV ESI,EAX XOR EAX,EAX CALL 0x001719ab PUSH 0x14 POP RCX MOV RDI,RAX MOV ESI,EBP MOV EDX,EBX MOV R8D,R14D POP RBX POP R14 POP RBP JMP 0x00171948
void DrawFPS(int4 param_1,int4 param_2) { int iVar1; int8 uVar2; uint uVar3; uint uVar4; uint uVar5; iVar1 = GetFPS(); if (iVar1 - 0xfU < 0xf) { uVar3 = 0xff000000; uVar4 = 0xa100; uVar5 = 0xff; } else if (iVar1 < 0xf) { uVar3 = 0xff370000; uVar4 = 0x2900; uVar5 = 0xe6; } else { uVar3 = 0xff2f0000; uVar4 = 0x9e00; uVar5 = 0; } uVar2 = TextFormat("%2i FPS",iVar1); DrawText(uVar2,param_1,param_2,0x14,uVar5 | uVar4 | uVar3); return; }
28,659
DrawFPS
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
void DrawFPS(int posX, int posY) { Color color = LIME; // Good FPS int fps = GetFPS(); if ((fps < 30) && (fps >= 15)) color = ORANGE; // Warning FPS else if (fps < 15) color = RED; // Low FPS DrawText(TextFormat("%2i FPS", fps), posX, posY, 20, color); }
O3
c
DrawFPS: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movl %esi, %ebp movl %edi, %ebx callq 0x7599f leal -0xf(%rax), %ecx cmpl $0xf, %ecx jae 0x84bed movl $0xff000000, %r15d # imm = 0xFF000000 movl $0xa100, %r14d # imm = 0xA100 movl $0xff, %r12d jmp 0x84c15 cmpl $0xe, %eax jg 0x84c06 movl $0xff370000, %r15d # imm = 0xFF370000 movl $0x2900, %r14d # imm = 0x2900 movl $0xe6, %r12d jmp 0x84c15 movl $0xff2f0000, %r15d # imm = 0xFF2F0000 movl $0x9e00, %r14d # imm = 0x9E00 xorl %r12d, %r12d leaq 0x63f20(%rip), %rdi # 0xe8b3c movl %eax, %esi xorl %eax, %eax callq 0x84cfb cmpl $0x0, 0xbcce0(%rip) # 0x14190c je 0x84c81 orl %r12d, %r14d orl %r15d, %r14d movd %ebp, %xmm0 movd %ebx, %xmm1 punpckldq %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] cvtdq2ps %xmm1, %xmm0 movups 0xbccd6(%rip), %xmm1 # 0x141920 movups %xmm1, 0x20(%rsp) movups 0xbccba(%rip), %xmm1 # 0x141910 movups %xmm1, 0x10(%rsp) movups 0xbcc9e(%rip), %xmm1 # 0x141900 movups %xmm1, (%rsp) movss 0x4eeaa(%rip), %xmm1 # 0xd3b18 movss 0x5865e(%rip), %xmm2 # 0xdd2d4 movq %rax, %rdi movl %r14d, %esi callq 0x84dff addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
DrawFPS: push rbp push r15 push r14 push r12 push rbx sub rsp, 30h mov ebp, esi mov ebx, edi call GetFPS lea ecx, [rax-0Fh] cmp ecx, 0Fh jnb short loc_84BED mov r15d, 0FF000000h mov r14d, 0A100h mov r12d, 0FFh jmp short loc_84C15 loc_84BED: cmp eax, 0Eh jg short loc_84C06 mov r15d, 0FF370000h mov r14d, 2900h mov r12d, 0E6h jmp short loc_84C15 loc_84C06: mov r15d, 0FF2F0000h mov r14d, 9E00h xor r12d, r12d loc_84C15: lea rdi, a2iFps; "%2i FPS" mov esi, eax xor eax, eax call TextFormat cmp dword ptr cs:defaultFont+0Ch, 0 jz short loc_84C81 or r14d, r12d or r14d, r15d movd xmm0, ebp movd xmm1, ebx punpckldq xmm1, xmm0 cvtdq2ps xmm0, xmm1 movups xmm1, cs:xmmword_141920 movups [rsp+58h+var_38], xmm1 movups xmm1, cs:xmmword_141910 movups [rsp+58h+var_48], xmm1 movups xmm1, cs:defaultFont movups [rsp+58h+var_58], xmm1 movss xmm1, cs:dword_D3B18 movss xmm2, cs:dword_DD2D4 mov rdi, rax mov esi, r14d call DrawTextEx loc_84C81: add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long DrawFPS(double a1, double a2, double a3, double a4, double a5) { int FPS; // eax int v6; // edx int v7; // r8d int v8; // r9d int v9; // r15d int v10; // r14d int v11; // r12d long long result; // rax int v13; // edx int v14; // ecx int v15; // r8d int v16; // r9d FPS = GetFPS(a1, a2, a3, a4, a5); if ( (unsigned int)(FPS - 15) >= 0xF ) { if ( FPS > 14 ) { v9 = -13697024; v10 = 40448; v11 = 0; } else { v9 = -13172736; v10 = 10496; v11 = 230; } } else { v9 = -16777216; v10 = 41216; v11 = 255; } result = TextFormat((unsigned int)"%2i FPS", FPS, v6, FPS - 15, v7, v8); if ( HIDWORD(defaultFont) ) return DrawTextEx(result, v9 | v11 | (unsigned int)v10, v13, v14, v15, v16, defaultFont); return result; }
DrawFPS: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV EBP,ESI MOV EBX,EDI CALL 0x0017599f LEA ECX,[RAX + -0xf] CMP ECX,0xf JNC 0x00184bed MOV R15D,0xff000000 MOV R14D,0xa100 MOV R12D,0xff JMP 0x00184c15 LAB_00184bed: CMP EAX,0xe JG 0x00184c06 MOV R15D,0xff370000 MOV R14D,0x2900 MOV R12D,0xe6 JMP 0x00184c15 LAB_00184c06: MOV R15D,0xff2f0000 MOV R14D,0x9e00 XOR R12D,R12D LAB_00184c15: LEA RDI,[0x1e8b3c] MOV ESI,EAX XOR EAX,EAX CALL 0x00184cfb CMP dword ptr [0x0024190c],0x0 JZ 0x00184c81 OR R14D,R12D OR R14D,R15D MOVD XMM0,EBP MOVD XMM1,EBX PUNPCKLDQ XMM1,XMM0 CVTDQ2PS XMM0,XMM1 MOVUPS XMM1,xmmword ptr [0x00241920] MOVUPS xmmword ptr [RSP + 0x20],XMM1 MOVUPS XMM1,xmmword ptr [0x00241910] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS XMM1,xmmword ptr [0x00241900] MOVUPS xmmword ptr [RSP],XMM1 MOVSS XMM1,dword ptr [0x001d3b18] MOVSS XMM2,dword ptr [0x001dd2d4] MOV RDI,RAX MOV ESI,R14D CALL 0x00184dff LAB_00184c81: ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void DrawFPS(void) { int iVar1; int8 uVar2; uint uVar3; uint uVar4; uint uVar5; iVar1 = GetFPS(); if (iVar1 - 0xfU < 0xf) { uVar5 = 0xff000000; uVar4 = 0xa100; uVar3 = 0xff; } else if (iVar1 < 0xf) { uVar5 = 0xff370000; uVar4 = 0x2900; uVar3 = 0xe6; } else { uVar5 = 0xff2f0000; uVar4 = 0x9e00; uVar3 = 0; } uVar2 = TextFormat("%2i FPS",iVar1); if (defaultFont._12_4_ != 0) { DrawTextEx(uVar2,uVar4 | uVar3 | uVar5); } return; }
28,660
thai2sortable
eloqsql/strings/ctype-tis620.c
static size_t thai2sortable(uchar *tstr, size_t len) { uchar *p; size_t tlen; uchar l2bias; tlen= len; l2bias= 256 - 8; for (p= tstr; tlen > 0; p++, tlen--) { uchar c= *p; if (isthai(c)) { const int *t_ctype0= t_ctype[c]; if (isconsnt(c)) l2bias -= 8; if (isldvowel(c) && tlen != 1 && isconsnt(p[1])) { /* simply swap between leading-vowel and consonant */ *p= p[1]; p[1]= c; tlen--; p++; continue; } /* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */ if (t_ctype0[1] >= L2_GARAN) { /* l2bias use to control position weight of l2char example (*=l2char) XX*X must come before X*XX */ memmove((char*) p, (char*) (p+1), tlen-1); tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1; p--; continue; } } else { l2bias-= 8; *p= to_lower_tis620[c]; } } return len; }
O3
c
thai2sortable: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, -0x38(%rbp) movq %rsi, -0x30(%rbp) testq %rsi, %rsi je 0xb7b48 movb $-0x8, %r13b leaq 0x1aec15(%rip), %r12 # 0x2666a0 leaq 0x2f839e(%rip), %r8 # 0x3afe30 movq -0x38(%rbp), %r15 movq -0x30(%rbp), %rbx movb (%r15), %al movzbl %al, %ecx testb %cl, %cl js 0xb7abc addb $-0x8, %r13b movb (%rcx,%r8), %al movb %al, (%r15) incq %r15 decq %rbx jne 0xb7a9a jmp 0xb7b48 leaq (%rcx,%rcx,4), %rcx movl 0x10(%r12,%rcx,4), %edx leal -0x8(%r13), %esi testb $0x10, %dl movzbl %r13b, %edi movzbl %sil, %r13d cmovel %edi, %r13d cmpq $0x1, %rbx je 0xb7af5 andl $0x20, %edx je 0xb7af5 movzbl 0x1(%r15), %edx leaq -0xcf(%rdx), %rsi cmpq $-0x2e, %rsi jae 0xb7b36 leaq (%r12,%rcx,4), %rax movl 0x4(%rax), %r14d cmpl $0x9, %r14d jl 0xb7aaf leaq 0x1(%r15), %rsi leaq -0x1(%rbx), %rdx movq %r15, %rdi callq 0x29120 leaq 0x2f8316(%rip), %r8 # 0x3afe30 addb %r13b, %r14b addb $-0x8, %r14b movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movb %r14b, -0x1(%rcx,%rax) decq %r15 jmp 0xb7aaf movb %dl, (%r15) movb %al, 0x1(%r15) incq %r15 decq %rbx jmp 0xb7aaf movq -0x30(%rbp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
thai2sortable: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdi mov [rbp+var_30], rsi test rsi, rsi jz loc_B7B48 mov r13b, 0F8h lea r12, t_ctype lea r8, to_lower_tis620 mov r15, [rbp+var_38] mov rbx, [rbp+var_30] loc_B7A9A: mov al, [r15] movzx ecx, al test cl, cl js short loc_B7ABC add r13b, 0F8h mov al, [rcx+r8] mov [r15], al loc_B7AAF: inc r15 dec rbx jnz short loc_B7A9A jmp loc_B7B48 loc_B7ABC: lea rcx, [rcx+rcx*4] mov edx, [r12+rcx*4+10h] lea esi, [r13-8] test dl, 10h movzx edi, r13b movzx r13d, sil cmovz r13d, edi cmp rbx, 1 jz short loc_B7AF5 and edx, 20h jz short loc_B7AF5 movzx edx, byte ptr [r15+1] lea rsi, [rdx-0CFh] cmp rsi, 0FFFFFFFFFFFFFFD2h jnb short loc_B7B36 loc_B7AF5: lea rax, [r12+rcx*4] mov r14d, [rax+4] cmp r14d, 9 jl short loc_B7AAF lea rsi, [r15+1] lea rdx, [rbx-1] mov rdi, r15 call _memmove lea r8, to_lower_tis620 add r14b, r13b add r14b, 0F8h mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov [rcx+rax-1], r14b dec r15 jmp loc_B7AAF loc_B7B36: mov [r15], dl mov [r15+1], al inc r15 dec rbx jmp loc_B7AAF loc_B7B48: mov rax, [rbp+var_30] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long thai2sortable(unsigned __int8 *a1, long long a2) { char v2; // r13 unsigned __int8 *v3; // r15 long long v4; // rbx unsigned __int8 v5; // al long long v6; // rcx long long v7; // rcx int v8; // edx char v9; // di long long v10; // rdx int v11; // r14d if ( a2 ) { v2 = -8; v3 = a1; v4 = a2; do { v5 = *v3; v6 = *v3; if ( (v6 & 0x80u) != 0LL ) { v7 = 5 * v6; v8 = t_ctype[v7 + 4]; v9 = v2; v2 -= 8; if ( (v8 & 0x10) == 0 ) v2 = v9; if ( v4 != 1 && (v8 & 0x20) != 0 && (v10 = v3[1], (unsigned long long)(v10 - 207) >= 0xFFFFFFFFFFFFFFD2LL) ) { *v3 = v10; *++v3 = v5; --v4; } else { v11 = t_ctype[v7 + 1]; if ( v11 >= 9 ) { memmove(v3, v3 + 1, v4 - 1); a1[a2 - 1] = v2 + v11 - 8; --v3; } } } else { v2 -= 8; *v3 = to_lower_tis620[v6]; } ++v3; --v4; } while ( v4 ); } return a2; }
thai2sortable: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x30],RSI TEST RSI,RSI JZ 0x001b7b48 MOV R13B,0xf8 LEA R12,[0x3666a0] LEA R8,[0x4afe30] MOV R15,qword ptr [RBP + -0x38] MOV RBX,qword ptr [RBP + -0x30] LAB_001b7a9a: MOV AL,byte ptr [R15] MOVZX ECX,AL TEST CL,CL JS 0x001b7abc ADD R13B,0xf8 MOV AL,byte ptr [RCX + R8*0x1] MOV byte ptr [R15],AL LAB_001b7aaf: INC R15 DEC RBX JNZ 0x001b7a9a JMP 0x001b7b48 LAB_001b7abc: LEA RCX,[RCX + RCX*0x4] MOV EDX,dword ptr [R12 + RCX*0x4 + 0x10] LEA ESI,[R13 + -0x8] TEST DL,0x10 MOVZX EDI,R13B MOVZX R13D,SIL CMOVZ R13D,EDI CMP RBX,0x1 JZ 0x001b7af5 AND EDX,0x20 JZ 0x001b7af5 MOVZX EDX,byte ptr [R15 + 0x1] LEA RSI,[RDX + -0xcf] CMP RSI,-0x2e JNC 0x001b7b36 LAB_001b7af5: LEA RAX,[R12 + RCX*0x4] MOV R14D,dword ptr [RAX + 0x4] CMP R14D,0x9 JL 0x001b7aaf LEA RSI,[R15 + 0x1] LEA RDX,[RBX + -0x1] MOV RDI,R15 CALL 0x00129120 LEA R8,[0x4afe30] ADD R14B,R13B ADD R14B,0xf8 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV byte ptr [RCX + RAX*0x1 + -0x1],R14B DEC R15 JMP 0x001b7aaf LAB_001b7b36: MOV byte ptr [R15],DL MOV byte ptr [R15 + 0x1],AL INC R15 DEC RBX JMP 0x001b7aaf LAB_001b7b48: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long thai2sortable(byte *param_1,long param_2) { byte bVar1; int iVar2; char cVar3; ulong uVar4; long lVar5; char cVar6; byte *__dest; if (param_2 != 0) { cVar6 = -8; lVar5 = param_2; __dest = param_1; do { bVar1 = *__dest; uVar4 = (ulong)bVar1; if ((char)bVar1 < '\0') { cVar3 = cVar6 + -8; if ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x10) == 0) { cVar3 = cVar6; } cVar6 = cVar3; if (((lVar5 == 1) || ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x20) == 0)) || ((ulong)__dest[1] - 0xcf < 0xffffffffffffffd2)) { iVar2 = *(int *)(t_ctype + uVar4 * 0x14 + 4); if (8 < iVar2) { memmove(__dest,__dest + 1,lVar5 - 1); param_1[param_2 + -1] = ((char)iVar2 + cVar3) - 8; __dest = __dest + -1; } } else { *__dest = __dest[1]; __dest[1] = bVar1; __dest = __dest + 1; lVar5 = lVar5 + -1; } } else { *__dest = to_lower_tis620[uVar4]; cVar6 = cVar6 + -8; } __dest = __dest + 1; lVar5 = lVar5 + -1; } while (lVar5 != 0); } return param_2; }
28,661
async_func_free
bluesky950520[P]quickjs/quickjs.c
static void async_func_free(JSRuntime *rt, JSAsyncFunctionState *s) { JSStackFrame *sf; JSValue *sp; sf = &s->frame; /* close the closure variables. */ close_var_refs(rt, sf); if (sf->arg_buf) { /* cannot free the function if it is running */ assert(sf->cur_sp != NULL); for(sp = sf->arg_buf; sp < sf->cur_sp; sp++) { JS_FreeValueRT(rt, *sp); } js_free_rt(rt, sf->arg_buf); } JS_FreeValueRT(rt, sf->cur_func); JS_FreeValueRT(rt, s->this_val); }
O0
c
async_func_free: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x18(%rsp), %rax addq $0x18, %rax movq %rax, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x625c0 movq 0x10(%rsp), %rax cmpq $0x0, 0x18(%rax) je 0x6258e movq 0x10(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx cmpq 0x48(%rcx), %rax jae 0x6257b movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x2a000 movq 0x8(%rsp), %rax addq $0x10, %rax movq %rax, 0x8(%rsp) jmp 0x62545 movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rax movq 0x18(%rax), %rsi callq 0x27c50 movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rax movq 0x8(%rax), %rsi movq 0x10(%rax), %rdx callq 0x2a000 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x2a000 addq $0x28, %rsp retq
async_func_free: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_10] add rax, 18h mov [rsp+28h+var_18], rax mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_18] call close_var_refs mov rax, [rsp+28h+var_18] cmp qword ptr [rax+18h], 0 jz short loc_6258E mov rax, [rsp+28h+var_18] mov rax, [rax+18h] mov [rsp+28h+var_20], rax loc_62545: mov rax, [rsp+28h+var_20] mov rcx, [rsp+28h+var_18] cmp rax, [rcx+48h] jnb short loc_6257B mov rdi, [rsp+28h+var_8] mov rax, [rsp+28h+var_20] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValueRT mov rax, [rsp+28h+var_20] add rax, 10h mov [rsp+28h+var_20], rax jmp short loc_62545 loc_6257B: mov rdi, [rsp+28h+var_8] mov rax, [rsp+28h+var_18] mov rsi, [rax+18h] call js_free_rt loc_6258E: mov rdi, [rsp+28h+var_8] mov rax, [rsp+28h+var_18] mov rsi, [rax+8] mov rdx, [rax+10h] call JS_FreeValueRT mov rdi, [rsp+28h+var_8] mov rax, [rsp+28h+var_10] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValueRT add rsp, 28h retn
long long async_func_free(long long a1, long long a2) { unsigned long long i; // [rsp+8h] [rbp-20h] close_var_refs(a1, a2 + 24); if ( *(_QWORD *)(a2 + 48) ) { for ( i = *(_QWORD *)(a2 + 48); i < *(_QWORD *)(a2 + 96); i += 16LL ) JS_FreeValueRT(a1, *(_DWORD **)i, *(_QWORD *)(i + 8)); js_free_rt(a1, *(_QWORD *)(a2 + 48)); } JS_FreeValueRT(a1, *(_DWORD **)(a2 + 32), *(_QWORD *)(a2 + 40)); return JS_FreeValueRT(a1, *(_DWORD **)a2, *(_QWORD *)(a2 + 8)); }
async_func_free: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x18 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x10] CALL 0x001625c0 MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x18],0x0 JZ 0x0016258e MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x8],RAX LAB_00162545: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RCX + 0x48] JNC 0x0016257b MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0012a000 MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x10 MOV qword ptr [RSP + 0x8],RAX JMP 0x00162545 LAB_0016257b: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RAX + 0x18] CALL 0x00127c50 LAB_0016258e: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x10] CALL 0x0012a000 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0012a000 ADD RSP,0x28 RET
void async_func_free(int8 param_1,int8 *param_2) { int8 *local_20; close_var_refs(param_1,param_2 + 3); if (param_2[6] != 0) { for (local_20 = (int8 *)param_2[6]; local_20 < (int8 *)param_2[0xc]; local_20 = local_20 + 2) { JS_FreeValueRT(param_1,*local_20,local_20[1]); } js_free_rt(param_1,param_2[6]); } JS_FreeValueRT(param_1,param_2[4],param_2[5]); JS_FreeValueRT(param_1,*param_2,param_2[1]); return; }
28,662
async_func_free
bluesky950520[P]quickjs/quickjs.c
static void async_func_free(JSRuntime *rt, JSAsyncFunctionState *s) { JSStackFrame *sf; JSValue *sp; sf = &s->frame; /* close the closure variables. */ close_var_refs(rt, sf); if (sf->arg_buf) { /* cannot free the function if it is running */ assert(sf->cur_sp != NULL); for(sp = sf->arg_buf; sp < sf->cur_sp; sp++) { JS_FreeValueRT(rt, *sp); } js_free_rt(rt, sf->arg_buf); } JS_FreeValueRT(rt, sf->cur_func); JS_FreeValueRT(rt, s->this_val); }
O2
c
async_func_free: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx addq $0x18, %rsi callq 0x37e89 movq 0x30(%r14), %r15 testq %r15, %r15 jne 0x37e53 jmp 0x37e65 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbx, %rdi callq 0x1bbe1 addq $0x10, %r15 cmpq 0x60(%r14), %r15 jb 0x37e40 movq 0x30(%r14), %rsi movq %rbx, %rdi callq 0x1ac7b movq 0x20(%r14), %rsi movq 0x28(%r14), %rdx movq %rbx, %rdi callq 0x1bbe1 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x1bbe1
async_func_free: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi add rsi, 18h call close_var_refs mov r15, [r14+30h] test r15, r15 jnz short loc_37E53 jmp short loc_37E65 loc_37E40: mov rsi, [r15] mov rdx, [r15+8] mov rdi, rbx call JS_FreeValueRT add r15, 10h loc_37E53: cmp r15, [r14+60h] jb short loc_37E40 mov rsi, [r14+30h] mov rdi, rbx call js_free_rt loc_37E65: mov rsi, [r14+20h] mov rdx, [r14+28h] mov rdi, rbx call JS_FreeValueRT mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx pop rbx pop r14 pop r15 jmp JS_FreeValueRT
long long async_func_free(long long a1, long long a2) { unsigned long long v2; // r15 close_var_refs(a1, a2 + 24); v2 = *(_QWORD *)(a2 + 48); if ( v2 ) { while ( v2 < *(_QWORD *)(a2 + 96) ) { JS_FreeValueRT(a1, *(unsigned int **)v2, *(_QWORD *)(v2 + 8)); v2 += 16LL; } js_free_rt(a1, *(_QWORD *)(a2 + 48)); } JS_FreeValueRT(a1, *(unsigned int **)(a2 + 32), *(_QWORD *)(a2 + 40)); return JS_FreeValueRT(a1, *(unsigned int **)a2, *(_QWORD *)(a2 + 8)); }
async_func_free: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI ADD RSI,0x18 CALL 0x00137e89 MOV R15,qword ptr [R14 + 0x30] TEST R15,R15 JNZ 0x00137e53 JMP 0x00137e65 LAB_00137e40: MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x0011bbe1 ADD R15,0x10 LAB_00137e53: CMP R15,qword ptr [R14 + 0x60] JC 0x00137e40 MOV RSI,qword ptr [R14 + 0x30] MOV RDI,RBX CALL 0x0011ac7b LAB_00137e65: MOV RSI,qword ptr [R14 + 0x20] MOV RDX,qword ptr [R14 + 0x28] MOV RDI,RBX CALL 0x0011bbe1 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x0011bbe1
void async_func_free(int8 param_1,int8 *param_2) { int8 *puVar1; close_var_refs(param_1,param_2 + 3); puVar1 = (int8 *)param_2[6]; if (puVar1 != (int8 *)0x0) { for (; puVar1 < (int8 *)param_2[0xc]; puVar1 = puVar1 + 2) { JS_FreeValueRT(param_1,*puVar1,puVar1[1]); } js_free_rt(param_1,param_2[6]); } JS_FreeValueRT(param_1,param_2[4],param_2[5]); JS_FreeValueRT(param_1,*param_2,param_2[1]); return; }
28,663
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override) { auto vocab = llama_model_get_vocab(model); std::string default_template_src = chat_template_override; std::string template_tool_use_src = chat_template_override; bool has_explicit_template = !chat_template_override.empty(); if (chat_template_override.empty()) { auto str = llama_model_chat_template(model, /* name */ nullptr); if (str) { default_template_src = str; has_explicit_template = true; } str = llama_model_chat_template(model, /* name */ "tool_use"); if (str) { template_tool_use_src = str; has_explicit_template = true; } } if (default_template_src.empty() || default_template_src == "chatml") { if (!template_tool_use_src.empty()) { default_template_src = template_tool_use_src; } else { default_template_src = R"( {%- for message in messages -%} {{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}} {%- endfor -%} {%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}} {%- endif -%} )"; } } const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) { if (token == LLAMA_TOKEN_NULL) { if (default_template_src.find(jinja_variable_name) != std::string::npos || template_tool_use_src.find(jinja_variable_name) != std::string::npos) { LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name); } return std::string(); } else { return common_token_to_piece(vocab, token, true); } }; auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token"); auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token"); return { has_explicit_template, std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos), template_tool_use_src.empty() ? nullptr : std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos) }; }
O1
cpp
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %rdi callq 0x19fb0 movq %rax, 0x48(%rsp) leaq 0x38(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x20e70 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x20e70 cmpq $0x0, 0x8(%r13) setne %r15b jne 0x53688 movq %r12, %rdi xorl %esi, %esi callq 0x19350 movq %rax, %r13 testq %rax, %rax je 0x53648 leaq 0x28(%rsp), %rbp movq 0x8(%rbp), %r14 movq %r13, %rdi callq 0x19360 movb $0x1, %r15b movq %rbp, %rdi leaq 0x38(%rsp), %rbp xorl %esi, %esi movq %r14, %rdx leaq 0x28(%rsp), %r14 movq %r13, %rcx movq %rax, %r8 callq 0x19c30 leaq 0x63cf6(%rip), %rsi # 0xb7345 movq %r12, %rdi callq 0x19350 movq %rax, %r12 testq %rax, %rax je 0x53688 leaq 0x8(%rsp), %rax movq 0x8(%rax), %r13 movq %r12, %rdi callq 0x19360 movb $0x1, %r15b leaq 0x8(%rsp), %rdi xorl %esi, %esi movq %r13, %rdx movq %r12, %rcx movq %rax, %r8 callq 0x19c30 cmpq $0x0, 0x30(%rsp) je 0x536a5 leaq 0x63cb7(%rip), %rsi # 0xb734e leaq 0x28(%rsp), %rdi callq 0x191d0 testl %eax, %eax jne 0x536db cmpq $0x0, 0x10(%rsp) je 0x536be leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x19410 jmp 0x536db leaq 0x28(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x63c87(%rip), %rcx # 0xb7355 movl $0x145, %r8d # imm = 0x145 xorl %esi, %esi callq 0x19c30 movq %r14, 0x90(%rsp) leaq 0x8(%rsp), %rax movq %rax, 0x98(%rsp) leaq 0x48(%rsp), %rax movq %rax, 0xa0(%rsp) movq (%rax), %rdi callq 0x19640 leaq 0x63d8f(%rip), %rcx # 0xb749b leaq 0x60d60(%rip), %r8 # 0xb4473 leaq 0x70(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x53914 movq 0x48(%rsp), %rdi callq 0x19090 leaq 0x63d67(%rip), %rcx # 0xb749f leaq 0x60d3e(%rip), %r8 # 0xb447d leaq 0x50(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x53914 movb %r15b, (%rbx) movl $0x80, %edi callq 0x19790 movq %rax, %r15 leaq 0x28(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x5564e movq %r15, 0x8(%rbx) cmpq $0x0, 0x10(%rsp) je 0x537ac movl $0x80, %edi callq 0x19790 movq %rax, %r15 leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x5564e jmp 0x537b7 movq $0x0, 0x10(%rbx) xorl %r15d, %r15d movq %r15, 0x10(%rbx) leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x537d6 movq 0x60(%rsp), %rsi incq %rsi callq 0x197a0 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x537f7 movq 0x80(%rsp), %rsi incq %rsi callq 0x197a0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x53813 movq 0x18(%rsp), %rsi incq %rsi callq 0x197a0 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x5382a movq 0x38(%rsp), %rsi incq %rsi callq 0x197a0 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x538d5 movq %rax, %r14 movl $0x80, %esi movq %r15, %rdi callq 0x197a0 jmp 0x53859 movq %rax, %r14 addq $0x8, %rbx movq (%rbx), %rsi testq %rsi, %rsi je 0x5386d movq %rbx, %rdi callq 0x4b8d4 movq $0x0, (%rbx) jmp 0x5388b movq %rax, %r14 movl $0x80, %esi movq %r15, %rdi callq 0x197a0 jmp 0x5388b movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x538b2 movq 0x60(%rsp), %rsi incq %rsi callq 0x197a0 jmp 0x538b2 movq %rax, %r14 jmp 0x538f4 jmp 0x538d5 movq %rax, %r14 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x538d8 movq 0x80(%rsp), %rsi incq %rsi callq 0x197a0 jmp 0x538d8 movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x538f4 movq 0x18(%rsp), %rsi incq %rsi callq 0x197a0 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x5390b movq 0x38(%rsp), %rsi incq %rsi callq 0x197a0 movq %r14, %rdi callq 0x19e00 nop
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp; int push r15; __int64 push r14; int push r13; void * push r12; int push rbx; int sub rsp, 0A8h mov r13, rdx mov r12, rsi mov rbx, rdi mov rdi, rsi call _llama_model_get_vocab mov qword ptr [rsp+0D8h+var_90], rax; int lea rbp, [rsp+0D8h+var_A0] mov [rbp-10h], rbp mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea r14, [rsp+0D8h+var_B0] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, [rsp+0D8h+var_C0] mov [rax-10h], rax mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea rdi, [rsp+0D8h+var_D0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) cmp qword ptr [r13+8], 0 setnz r15b jnz loc_53688 mov rdi, r12 xor esi, esi call _llama_model_chat_template mov r13, rax test rax, rax jz short loc_53648 lea rbp, [rsp+0D8h+var_B0] mov r14, [rbp+8] mov rdi, r13 call _strlen mov r15b, 1 mov rdi, rbp lea rbp, [rsp+0D8h+var_A0] xor esi, esi mov rdx, r14 lea r14, [rsp+0D8h+var_B0] mov rcx, r13 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_53648: lea rsi, aToolUse; "tool_use" mov rdi, r12 call _llama_model_chat_template mov r12, rax test rax, rax jz short loc_53688 lea rax, [rsp+0D8h+var_D0] mov r13, [rax+8] mov rdi, r12 call _strlen mov r15b, 1 lea rdi, [rsp+0D8h+var_D0] xor esi, esi mov rdx, r13 mov rcx, r12 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_53688: cmp [rsp+0D8h+var_A8], 0 jz short loc_536A5 lea rsi, aChatml; "chatml" lea rdi, [rsp+0D8h+var_B0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_536DB loc_536A5: cmp [rsp+0D8h+var_C8], 0 jz short loc_536BE lea rdi, [rsp+0D8h+var_B0] lea rsi, [rsp+0D8h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_536DB loc_536BE: lea rdi, [rsp+0D8h+var_B0] mov rdx, [rdi+8] lea rcx, aForMessageInMe; "\n {%- for message in me"... mov r8d, 145h xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_536DB: mov qword ptr [rsp+0D8h+var_48], r14; int lea rax, [rsp+0D8h+var_D0] mov qword ptr [rsp+0D8h+var_40], rax; int lea rax, [rsp+0D8h+var_90] mov qword ptr [rsp+0D8h+var_38], rax; int mov rdi, [rax] call _llama_vocab_bos lea rcx, aBos; "BOS" lea r8, aBosToken; "bos_token" lea rdi, [rsp+0D8h+var_68] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov rdi, qword ptr [rsp+0D8h+var_90] call _llama_vocab_eos lea rcx, aEos; "EOS" lea r8, aEosToken; "eos_token" lea rdi, [rsp+0D8h+var_88] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov [rbx], r15b mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, [rsp+0D8h+var_B0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) mov [rbx+8], r15 cmp [rsp+0D8h+var_C8], 0 jz short loc_537AC mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, [rsp+0D8h+var_D0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) jmp short loc_537B7 loc_537AC: mov qword ptr [rbx+10h], 0 xor r15d, r15d loc_537B7: mov [rbx+10h], r15 lea rax, [rsp+0D8h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_537D6 mov rsi, [rsp+0D8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_537D6: lea rax, [rsp+0D8h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_537F7 mov rsi, [rsp+0D8h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_537F7: mov rdi, [rsp+0D8h+var_D0]; void * lea rax, [rsp+0D8h+var_C0] cmp rdi, rax jz short loc_53813 mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_53813: mov rdi, [rsp+0D8h+var_B0]; void * cmp rdi, rbp jz short loc_5382A mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5382A: mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_538D5 mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_53859 mov r14, rax loc_53859: add rbx, 8 mov rsi, [rbx] test rsi, rsi jz short loc_5386D mov rdi, rbx call _ZNKSt14default_deleteIN5minja13chat_templateEEclEPS1_; std::default_delete<minja::chat_template>::operator()(minja::chat_template*) loc_5386D: mov qword ptr [rbx], 0 jmp short loc_5388B mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5388B mov r14, rax loc_5388B: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_538B2 mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_538B2 mov r14, rax jmp short loc_538F4 jmp short loc_538D5 mov r14, rax loc_538B2: lea rax, [rsp+arg_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_538D8 mov rsi, [rsp+arg_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_538D8 loc_538D5: mov r14, rax loc_538D8: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_538F4 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_538F4: mov rdi, [rsp+arg_20]; void * cmp rdi, rbp jz short loc_5390B mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5390B: mov rdi, r14 call __Unwind_Resume
long long common_chat_templates_from_model(long long a1, long long a2, _BYTE **a3) { bool v4; // r15 long long v5; // rax long long v6; // r13 long long v7; // r14 long long v8; // rax long long v9; // r12 long long v10; // r13 long long v11; // rax unsigned int v12; // eax unsigned int v13; // eax long long v14; // r15 long long v15; // r15 void *v17; // [rsp+8h] [rbp-D0h] BYREF long long v18; // [rsp+10h] [rbp-C8h] _QWORD v19[2]; // [rsp+18h] [rbp-C0h] BYREF void *v20; // [rsp+28h] [rbp-B0h] BYREF long long v21; // [rsp+30h] [rbp-A8h] _QWORD v22[2]; // [rsp+38h] [rbp-A0h] BYREF int v23[2]; // [rsp+48h] [rbp-90h] BYREF int v24[4]; // [rsp+50h] [rbp-88h] BYREF long long v25; // [rsp+60h] [rbp-78h] BYREF int v26[4]; // [rsp+70h] [rbp-68h] BYREF long long v27; // [rsp+80h] [rbp-58h] BYREF int v28[2]; // [rsp+90h] [rbp-48h] BYREF int v29[2]; // [rsp+98h] [rbp-40h] int v30[2]; // [rsp+A0h] [rbp-38h] *(_QWORD *)v23 = llama_model_get_vocab(a2); v20 = v22; std::string::_M_construct<char *>(&v20, *a3, (long long)&a3[1][(_QWORD)*a3]); v17 = v19; std::string::_M_construct<char *>(&v17, *a3, (long long)&a3[1][(_QWORD)*a3]); v4 = a3[1] != 0LL; if ( !a3[1] ) { v5 = llama_model_chat_template(a2, 0LL); v6 = v5; if ( v5 ) { v7 = v21; v8 = strlen(v5); v4 = 1; std::string::_M_replace(&v20, 0LL, v7, v6, v8); } v9 = llama_model_chat_template(a2, "tool_use"); if ( v9 ) { v10 = v18; v11 = strlen(v9); v4 = 1; std::string::_M_replace(&v17, 0LL, v10, v9, v11); } } if ( !v21 || !(unsigned int)std::string::compare(&v20, "chatml") ) { if ( v18 ) std::string::_M_assign(&v20, &v17); else std::string::_M_replace( &v20, 0LL, v21, "\n" " {%- for message in messages -%}\n" " {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n" " {%- endfor -%}\n" " {%- if add_generation_prompt -%}\n" " {{- \"<|im_start|>assistant\\n\" -}}\n" " {%- endif -%}\n" " ", 325LL); } *(_QWORD *)v28 = &v20; *(_QWORD *)v29 = &v17; *(_QWORD *)v30 = v23; v12 = llama_vocab_bos(*(_QWORD *)v23); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v26, v28, v12, "BOS", "bos_token"); v13 = llama_vocab_eos(*(_QWORD *)v23); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v24, v28, v13, "EOS", "eos_token"); *(_BYTE *)a1 = v4; v14 = operator new(0x80uLL); minja::chat_template::chat_template(v14, &v20, v26, v24); *(_QWORD *)(a1 + 8) = v14; if ( v18 ) { v15 = operator new(0x80uLL); minja::chat_template::chat_template(v15, &v17, v26, v24); } else { *(_QWORD *)(a1 + 16) = 0LL; v15 = 0LL; } *(_QWORD *)(a1 + 16) = v15; if ( *(long long **)v24 != &v25 ) operator delete(*(void **)v24, v25 + 1); if ( *(long long **)v26 != &v27 ) operator delete(*(void **)v26, v27 + 1); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v20 != v22 ) operator delete(v20, v22[0] + 1LL); return a1; }
common_chat_templates_from_model: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x00119fb0 MOV qword ptr [RSP + 0x48],RAX LEA RBP,[RSP + 0x38] MOV qword ptr [RBP + -0x10],RBP MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x00120e70 LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LAB_001535ec: LEA RDI,[RSP + 0x8] CALL 0x00120e70 CMP qword ptr [R13 + 0x8],0x0 SETNZ R15B JNZ 0x00153688 LAB_00153605: MOV RDI,R12 XOR ESI,ESI CALL 0x00119350 MOV R13,RAX TEST RAX,RAX JZ 0x00153648 LEA RBP,[RSP + 0x28] MOV R14,qword ptr [RBP + 0x8] MOV RDI,R13 CALL 0x00119360 MOV R15B,0x1 MOV RDI,RBP LEA RBP,[RSP + 0x38] XOR ESI,ESI MOV RDX,R14 LEA R14,[RSP + 0x28] MOV RCX,R13 MOV R8,RAX CALL 0x00119c30 LAB_00153648: LEA RSI,[0x1b7345] MOV RDI,R12 CALL 0x00119350 MOV R12,RAX TEST RAX,RAX JZ 0x00153688 LEA RAX,[RSP + 0x8] MOV R13,qword ptr [RAX + 0x8] MOV RDI,R12 CALL 0x00119360 MOV R15B,0x1 LEA RDI,[RSP + 0x8] XOR ESI,ESI MOV RDX,R13 MOV RCX,R12 MOV R8,RAX CALL 0x00119c30 LAB_00153688: CMP qword ptr [RSP + 0x30],0x0 JZ 0x001536a5 LEA RSI,[0x1b734e] LEA RDI,[RSP + 0x28] CALL 0x001191d0 TEST EAX,EAX JNZ 0x001536db LAB_001536a5: CMP qword ptr [RSP + 0x10],0x0 JZ 0x001536be LAB_001536ad: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x00119410 JMP 0x001536db LAB_001536be: LEA RDI,[RSP + 0x28] MOV RDX,qword ptr [RDI + 0x8] LEA RCX,[0x1b7355] MOV R8D,0x145 XOR ESI,ESI CALL 0x00119c30 LAB_001536db: MOV qword ptr [RSP + 0x90],R14 LEA RAX,[RSP + 0x8] MOV qword ptr [RSP + 0x98],RAX LEA RAX,[RSP + 0x48] MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RAX] LAB_00153700: CALL 0x00119640 LEA RCX,[0x1b749b] LEA R8,[0x1b4473] LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00153914 MOV RDI,qword ptr [RSP + 0x48] LAB_0015372c: CALL 0x00119090 LEA RCX,[0x1b749f] LEA R8,[0x1b447d] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00153914 MOV byte ptr [RBX],R15B LAB_00153756: MOV EDI,0x80 CALL 0x00119790 LAB_00153760: MOV R15,RAX LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x0015564e MOV qword ptr [RBX + 0x8],R15 CMP qword ptr [RSP + 0x10],0x0 JZ 0x001537ac LAB_00153786: MOV EDI,0x80 CALL 0x00119790 LAB_00153790: MOV R15,RAX LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x0015564e LAB_001537aa: JMP 0x001537b7 LAB_001537ac: MOV qword ptr [RBX + 0x10],0x0 XOR R15D,R15D LAB_001537b7: MOV qword ptr [RBX + 0x10],R15 LEA RAX,[RSP + 0x60] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001537d6 MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x001197a0 LAB_001537d6: LEA RAX,[RSP + 0x80] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001537f7 MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x001197a0 LAB_001537f7: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00153813 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001197a0 LAB_00153813: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,RBP JZ 0x0015382a MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001197a0 LAB_0015382a: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */ llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2) { char *pcVar1; int iVar2; uint uVar3; char *pcVar4; chat_template *pcVar5; long *in_RDX; llama_model lVar6; long *local_d0; char *local_c8; long local_c0 [2]; long *local_b0; char *local_a8; long local_a0 [2]; int8 local_90; long *local_88 [2]; long local_78 [2]; long *local_68 [2]; long local_58 [2]; int8 **local_48; int8 **local_40; int8 *local_38; local_90 = llama_model_get_vocab(param_2); local_b0 = local_a0; std::__cxx11::string::_M_construct<char*>(&local_b0,*in_RDX,in_RDX[1] + *in_RDX); local_d0 = local_c0; /* try { // try from 001535ec to 001535f5 has its CatchHandler @ 001538a8 */ std::__cxx11::string::_M_construct<char*>(&local_d0,*in_RDX,in_RDX[1] + *in_RDX); lVar6 = (llama_model)(in_RDX[1] != 0); if (!(bool)lVar6) { /* try { // try from 00153605 to 00153687 has its CatchHandler @ 001538ad */ pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_a8; if (pcVar4 != (char *)0x0) { strlen(pcVar4); std::__cxx11::string::_M_replace((ulong)&local_b0,0,pcVar1,(ulong)pcVar4); } lVar6 = (llama_model)(pcVar4 != (char *)0x0 || (bool)lVar6); pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_c8; if (pcVar4 != (char *)0x0) { strlen(pcVar4); lVar6 = (llama_model)0x1; std::__cxx11::string::_M_replace((ulong)&local_d0,0,pcVar1,(ulong)pcVar4); } } if (local_a8 != (char *)0x0) { iVar2 = std::__cxx11::string::compare((char *)&local_b0); if (iVar2 != 0) goto LAB_001536db; } if (local_c8 == (char *)0x0) { std::__cxx11::string::_M_replace((ulong)&local_b0,0,local_a8,0x1b7355); } else { /* try { // try from 001536ad to 001536da has its CatchHandler @ 0015383f */ std::__cxx11::string::_M_assign((string *)&local_b0); } LAB_001536db: local_40 = &local_d0; local_38 = &local_90; local_48 = &local_b0; /* try { // try from 00153700 to 00153726 has its CatchHandler @ 001538d5 */ uVar3 = llama_vocab_bos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_68,(char *)&local_48,(char *)(ulong)uVar3); /* try { // try from 0015372c to 00153752 has its CatchHandler @ 001538af */ uVar3 = llama_vocab_eos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_88,(char *)&local_48,(char *)(ulong)uVar3); *param_1 = lVar6; /* try { // try from 00153756 to 0015375f has its CatchHandler @ 00153888 */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 00153760 to 00153779 has its CatchHandler @ 00153876 */ minja::chat_template::chat_template (pcVar5,(string *)&local_b0,(string *)local_68,(string *)local_88); *(chat_template **)(param_1 + 8) = pcVar5; if (local_c8 == (char *)0x0) { *(int8 *)(param_1 + 0x10) = 0; pcVar5 = (chat_template *)0x0; } else { /* try { // try from 00153786 to 0015378f has its CatchHandler @ 00153856 */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 00153790 to 001537a9 has its CatchHandler @ 00153844 */ minja::chat_template::chat_template (pcVar5,(string *)&local_d0,(string *)local_68,(string *)local_88); } *(chat_template **)(param_1 + 0x10) = pcVar5; if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_68[0] != local_58) { operator_delete(local_68[0],local_58[0] + 1); } if (local_d0 != local_c0) { operator_delete(local_d0,local_c0[0] + 1); } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } return param_1; }
28,664
my_hash_sort_utf32_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf32_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((res= my_utf32_uni(cs, &wc, (uchar*) s, (uchar*) e)) > 0) { my_tosort_utf32(uni_plane, &wc); MY_HASH_ADD(m1, m2, (uint) (wc >> 24)); MY_HASH_ADD(m1, m2, (uint) (wc >> 16) & 0xFF); MY_HASH_ADD(m1, m2, (uint) (wc >> 8) & 0xFF); MY_HASH_ADD(m1, m2, (uint) (wc & 0xFF)); s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf32_nopad: 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 -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0xaad50 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0xafe47 movq -0x48(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0xafe70 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x18, %rcx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0xafd73 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x10, %rcx andl $0xff, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0xafdb4 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x8, %rcx andl $0xff, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0xafdf5 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xff, %rcx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0xafd0a movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf32_nopad: 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 rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_AFD0A: mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_utf32_uni mov [rbp+var_34], eax cmp eax, 0 jle loc_AFE47 mov rdi, [rbp+var_48] lea rsi, [rbp+var_30] call my_tosort_utf32 mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 18h mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_AFD73: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 10h and ecx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_AFDB4: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 8 and ecx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_AFDF5: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_AFD0A loc_AFE47: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_utf32_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax long long v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+10h] [rbp-50h] long long v10; // [rsp+10h] [rbp-50h] long long v11; // [rsp+10h] [rbp-50h] long long v12; // [rsp+10h] [rbp-50h] long long v13; // [rsp+18h] [rbp-48h] long long v14; // [rsp+20h] [rbp-40h] int v15; // [rsp+2Ch] [rbp-34h] unsigned long long v16; // [rsp+30h] [rbp-30h] BYREF _QWORD *v17; // [rsp+38h] [rbp-28h] long long *v18; // [rsp+40h] [rbp-20h] long long v19; // [rsp+48h] [rbp-18h] long long v20; // [rsp+50h] [rbp-10h] long long v21; // [rsp+58h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; v18 = a4; v17 = a5; v14 = a3 + a2; v13 = *(_QWORD *)(a1 + 120); v9 = *a4; v7 = *a5; while ( 1 ) { v15 = my_utf32_uni(v21, (long long)&v16, v20, v14, (long long)a5, a6); if ( v15 <= 0 ) break; my_tosort_utf32(v13, &v16); v10 = v9 ^ ((v9 << 8) + (unsigned int)(v16 >> 24) * (v7 + (v9 & 0x3F))); v8 = v7 + 3; v11 = v10 ^ ((v10 << 8) + BYTE2(v16) * (v8 + (v10 & 0x3F))); v8 += 3LL; v12 = v11 ^ ((v11 << 8) + BYTE1(v16) * (v8 + (v11 & 0x3F))); v8 += 3LL; v9 = v12 ^ ((v12 << 8) + (unsigned __int8)v16 * (v8 + (v12 & 0x3F))); v7 = v8 + 3; v20 += v15; } *v18 = v9; result = v17; *v17 = v7; return result; }
my_hash_sort_utf32_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_001afd0a: MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x001aad50 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x001afe47 MOV RDI,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0x30] CALL 0x001afe70 MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x18 MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x001afd73 LAB_001afd73: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x10 AND ECX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x001afdb4 LAB_001afdb4: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x8 AND ECX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x001afdf5 LAB_001afdf5: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001afd0a LAB_001afe47: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_utf32_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; int iVar2; long local_60; ulong local_58; ulong local_38; long *local_30; ulong *local_28; long local_20; long local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { iVar2 = my_utf32_uni(local_10,&local_38,local_18,param_2 + param_3); if (iVar2 < 1) break; my_tosort_utf32(uVar1,&local_38); local_58 = ((local_58 & 0x3f) + local_60) * (local_38 >> 0x18 & 0xffffffff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)((uint)(local_38 >> 0x10) & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 8) & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 9) * (ulong)((uint)local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_60 = local_60 + 0xc; local_18 = local_18 + iVar2; } *local_28 = local_58; *local_30 = local_60; return; }
28,665
PFS_memory_stat::partial_aggregate_to(PFS_memory_stat*)
eloqsql/storage/perfschema/pfs_stat.h
inline void partial_aggregate_to(PFS_memory_stat *stat) { if (! m_used) return; size_t base; stat->m_used= true; base= std::min<size_t>(m_alloc_count, m_free_count); if (base != 0) { stat->m_alloc_count+= base; stat->m_free_count+= base; m_alloc_count-= base; m_free_count-= base; } base= std::min<size_t>(m_alloc_size, m_free_size); if (base != 0) { stat->m_alloc_size+= base; stat->m_free_size+= base; m_alloc_size-= base; m_free_size-= base; } stat->m_alloc_count_capacity+= m_alloc_count_capacity; stat->m_free_count_capacity+= m_free_count_capacity; stat->m_alloc_size_capacity+= m_alloc_size_capacity; stat->m_free_size_capacity+= m_free_size_capacity; m_alloc_count_capacity= 0; m_free_count_capacity= 0; m_alloc_size_capacity= 0; m_free_size_capacity= 0; }
O0
c
PFS_memory_stat::partial_aggregate_to(PFS_memory_stat*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) testb $0x1, (%rax) jne 0x3ecd2 jmp 0x3ee05 movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rax movb $0x1, (%rax) movq %rsi, %rdi addq $0x8, %rdi addq $0x10, %rsi callq 0x3f780 movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x3ed3d movq -0x20(%rbp), %rax movq -0x18(%rbp), %rdx movq -0x10(%rbp), %rcx addq 0x8(%rcx), %rdx movq %rdx, 0x8(%rcx) movq -0x18(%rbp), %rdx movq -0x10(%rbp), %rcx addq 0x10(%rcx), %rdx movq %rdx, 0x10(%rcx) movq -0x18(%rbp), %rdx movq 0x8(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rdx movq 0x10(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rsi movq %rsi, %rdi addq $0x18, %rdi addq $0x20, %rsi callq 0x3f780 movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x3eda1 movq -0x20(%rbp), %rax movq -0x18(%rbp), %rdx movq -0x10(%rbp), %rcx addq 0x18(%rcx), %rdx movq %rdx, 0x18(%rcx) movq -0x18(%rbp), %rdx movq -0x10(%rbp), %rcx addq 0x20(%rcx), %rdx movq %rdx, 0x20(%rcx) movq -0x18(%rbp), %rdx movq 0x18(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rdx movq 0x20(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x20(%rax) movq -0x20(%rbp), %rax movq 0x28(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x28(%rcx), %rdx movq %rdx, 0x28(%rcx) movq 0x30(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x30(%rcx), %rdx movq %rdx, 0x30(%rcx) movq 0x38(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x38(%rcx), %rdx movq %rdx, 0x38(%rcx) movq 0x40(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x40(%rcx), %rdx movq %rdx, 0x40(%rcx) movq $0x0, 0x28(%rax) movq $0x0, 0x30(%rax) movq $0x0, 0x38(%rax) movq $0x0, 0x40(%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN15PFS_memory_stat20partial_aggregate_toEPS_: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_20], rax test byte ptr [rax], 1 jnz short loc_3ECD2 jmp loc_3EE05 loc_3ECD2: mov rsi, [rbp+var_20] mov rax, [rbp+var_10] mov byte ptr [rax], 1 mov rdi, rsi add rdi, 8 add rsi, 10h call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&) mov rax, [rax] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_3ED3D mov rax, [rbp+var_20] mov rdx, [rbp+var_18] mov rcx, [rbp+var_10] add rdx, [rcx+8] mov [rcx+8], rdx mov rdx, [rbp+var_18] mov rcx, [rbp+var_10] add rdx, [rcx+10h] mov [rcx+10h], rdx mov rdx, [rbp+var_18] mov rcx, [rax+8] sub rcx, rdx mov [rax+8], rcx mov rdx, [rbp+var_18] mov rcx, [rax+10h] sub rcx, rdx mov [rax+10h], rcx loc_3ED3D: mov rsi, [rbp+var_20] mov rdi, rsi add rdi, 18h add rsi, 20h ; ' ' call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&) mov rax, [rax] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_3EDA1 mov rax, [rbp+var_20] mov rdx, [rbp+var_18] mov rcx, [rbp+var_10] add rdx, [rcx+18h] mov [rcx+18h], rdx mov rdx, [rbp+var_18] mov rcx, [rbp+var_10] add rdx, [rcx+20h] mov [rcx+20h], rdx mov rdx, [rbp+var_18] mov rcx, [rax+18h] sub rcx, rdx mov [rax+18h], rcx mov rdx, [rbp+var_18] mov rcx, [rax+20h] sub rcx, rdx mov [rax+20h], rcx loc_3EDA1: mov rax, [rbp+var_20] mov rdx, [rax+28h] mov rcx, [rbp+var_10] add rdx, [rcx+28h] mov [rcx+28h], rdx mov rdx, [rax+30h] mov rcx, [rbp+var_10] add rdx, [rcx+30h] mov [rcx+30h], rdx mov rdx, [rax+38h] mov rcx, [rbp+var_10] add rdx, [rcx+38h] mov [rcx+38h], rdx mov rdx, [rax+40h] mov rcx, [rbp+var_10] add rdx, [rcx+40h] mov [rcx+40h], rdx mov qword ptr [rax+28h], 0 mov qword ptr [rax+30h], 0 mov qword ptr [rax+38h], 0 mov qword ptr [rax+40h], 0 loc_3EE05: add rsp, 20h pop rbp retn
PFS_memory_stat * PFS_memory_stat::partial_aggregate_to(PFS_memory_stat *this, PFS_memory_stat *a2) { PFS_memory_stat *result; // rax long long v3; // [rsp+8h] [rbp-18h] long long v4; // [rsp+8h] [rbp-18h] result = this; if ( (*(_BYTE *)this & 1) != 0 ) { *(_BYTE *)a2 = 1; v3 = *(_QWORD *)std::min<unsigned long>((char *)this + 8, (char *)this + 16); if ( v3 ) { *((_QWORD *)a2 + 1) += v3; *((_QWORD *)a2 + 2) += v3; *((_QWORD *)this + 1) -= v3; *((_QWORD *)this + 2) -= v3; } v4 = *(_QWORD *)std::min<unsigned long>((char *)this + 24, (char *)this + 32); if ( v4 ) { *((_QWORD *)a2 + 3) += v4; *((_QWORD *)a2 + 4) += v4; *((_QWORD *)this + 3) -= v4; *((_QWORD *)this + 4) -= v4; } result = this; *((_QWORD *)a2 + 5) += *((_QWORD *)this + 5); *((_QWORD *)a2 + 6) += *((_QWORD *)this + 6); *((_QWORD *)a2 + 7) += *((_QWORD *)this + 7); *((_QWORD *)a2 + 8) += *((_QWORD *)this + 8); *((_QWORD *)this + 5) = 0LL; *((_QWORD *)this + 6) = 0LL; *((_QWORD *)this + 7) = 0LL; *((_QWORD *)this + 8) = 0LL; } return result; }
partial_aggregate_to: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX TEST byte ptr [RAX],0x1 JNZ 0x0013ecd2 JMP 0x0013ee05 LAB_0013ecd2: MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x1 MOV RDI,RSI ADD RDI,0x8 ADD RSI,0x10 CALL 0x0013f780 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013ed3d MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x8] MOV qword ptr [RCX + 0x8],RDX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x10] MOV qword ptr [RCX + 0x10],RDX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x8] SUB RCX,RDX MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX MOV qword ptr [RAX + 0x10],RCX LAB_0013ed3d: MOV RSI,qword ptr [RBP + -0x20] MOV RDI,RSI ADD RDI,0x18 ADD RSI,0x20 CALL 0x0013f780 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013eda1 MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x18] MOV qword ptr [RCX + 0x18],RDX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x20] MOV qword ptr [RCX + 0x20],RDX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x18] SUB RCX,RDX MOV qword ptr [RAX + 0x18],RCX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x20] SUB RCX,RDX MOV qword ptr [RAX + 0x20],RCX LAB_0013eda1: MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x28] MOV qword ptr [RCX + 0x28],RDX MOV RDX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x30] MOV qword ptr [RCX + 0x30],RDX MOV RDX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x38] MOV qword ptr [RCX + 0x38],RDX MOV RDX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x40] MOV qword ptr [RCX + 0x40],RDX MOV qword ptr [RAX + 0x28],0x0 MOV qword ptr [RAX + 0x30],0x0 MOV qword ptr [RAX + 0x38],0x0 MOV qword ptr [RAX + 0x40],0x0 LAB_0013ee05: ADD RSP,0x20 POP RBP RET
/* PFS_memory_stat::partial_aggregate_to(PFS_memory_stat*) */ void __thiscall PFS_memory_stat::partial_aggregate_to(PFS_memory_stat *this,PFS_memory_stat *param_1) { ulong uVar1; ulong *puVar2; if (((byte)*this & 1) != 0) { *param_1 = (PFS_memory_stat)0x1; puVar2 = std::min<unsigned_long>((ulong *)(this + 8),(ulong *)(this + 0x10)); uVar1 = *puVar2; if (uVar1 != 0) { *(ulong *)(param_1 + 8) = uVar1 + *(long *)(param_1 + 8); *(ulong *)(param_1 + 0x10) = uVar1 + *(long *)(param_1 + 0x10); *(ulong *)(this + 8) = *(long *)(this + 8) - uVar1; *(ulong *)(this + 0x10) = *(long *)(this + 0x10) - uVar1; } puVar2 = std::min<unsigned_long>((ulong *)(this + 0x18),(ulong *)(this + 0x20)); uVar1 = *puVar2; if (uVar1 != 0) { *(ulong *)(param_1 + 0x18) = uVar1 + *(long *)(param_1 + 0x18); *(ulong *)(param_1 + 0x20) = uVar1 + *(long *)(param_1 + 0x20); *(ulong *)(this + 0x18) = *(long *)(this + 0x18) - uVar1; *(ulong *)(this + 0x20) = *(long *)(this + 0x20) - uVar1; } *(long *)(param_1 + 0x28) = *(long *)(this + 0x28) + *(long *)(param_1 + 0x28); *(long *)(param_1 + 0x30) = *(long *)(this + 0x30) + *(long *)(param_1 + 0x30); *(long *)(param_1 + 0x38) = *(long *)(this + 0x38) + *(long *)(param_1 + 0x38); *(long *)(param_1 + 0x40) = *(long *)(this + 0x40) + *(long *)(param_1 + 0x40); *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; } return; }
28,666
mi_find_writepos
eloqsql/storage/myisam/mi_dynrec.c
static int _mi_find_writepos(MI_INFO *info, ulong reclength, /* record length */ my_off_t *filepos, /* Return file pos */ ulong *length) /* length of block at filepos */ { MI_BLOCK_INFO block_info; ulong tmp; DBUG_ENTER("_mi_find_writepos"); if (info->s->state.dellink != HA_OFFSET_ERROR && !info->append_insert_at_end) { /* Deleted blocks exists; Get last used block */ *filepos=info->s->state.dellink; block_info.second_read=0; info->rec_cache.seek_not_done=1; if (!(_mi_get_block_info(&block_info,info->dfile,info->s->state.dellink) & BLOCK_DELETED)) { DBUG_PRINT("error",("Delete link crashed")); my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(-1); } info->s->state.dellink=block_info.next_filepos; info->state->del--; info->state->empty-= block_info.block_len; *length= block_info.block_len; } else { /* No deleted blocks; Allocate a new block */ *filepos=info->state->data_file_length; if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) < info->s->base.min_block_length) tmp= info->s->base.min_block_length; else tmp= ((tmp+MI_DYN_ALIGN_SIZE-1) & (~ (ulong) (MI_DYN_ALIGN_SIZE-1))); if (info->state->data_file_length > (info->s->base.max_data_file_length - tmp)) { my_errno=HA_ERR_RECORD_FILE_FULL; DBUG_RETURN(-1); } if (tmp > MI_MAX_BLOCK_LENGTH) tmp=MI_MAX_BLOCK_LENGTH; *length= tmp; info->state->data_file_length+= tmp; info->s->state.split++; info->update|=HA_STATE_WRITE_AT_END; } DBUG_RETURN(0); }
O0
c
mi_find_writepos: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movq %rcx, -0x88(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax cmpq $-0x1, 0x58(%rax) je 0xacc23 movq -0x70(%rbp), %rax cmpb $0x0, 0x33a(%rax) jne 0xacc23 movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x58(%rax), %rcx movq -0x80(%rbp), %rax movq %rcx, (%rax) movl $0x0, -0x10(%rbp) movq -0x70(%rbp), %rax movl $0x1, 0x300(%rax) movq -0x70(%rbp), %rax movl 0x1c0(%rax), %esi movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x58(%rax), %rdx leaq -0x60(%rbp), %rdi callq 0xa9d10 andl $0x4, %eax cmpl $0x0, %eax jne 0xacbd6 jmp 0xacbbd jmp 0xacbbf callq 0xf60c0 movl $0x7f, (%rax) movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0xacd4d movq -0x20(%rbp), %rcx movq -0x70(%rbp), %rax movq (%rax), %rax movq %rcx, 0x58(%rax) movq -0x70(%rbp), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdx movq -0x70(%rbp), %rax movq 0x8(%rax), %rax movq 0x10(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x10(%rax) movq -0x38(%rbp), %rcx movq -0x88(%rbp), %rax movq %rcx, (%rax) jmp 0xacd44 movq -0x70(%rbp), %rax movq 0x8(%rax), %rax movq 0x28(%rax), %rcx movq -0x80(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax addq $0x3, %rax movq -0x78(%rbp), %rsi xorl %ecx, %ecx movl $0x1, %edx cmpq $0xffed, %rsi # imm = 0xFFED cmovael %edx, %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x90(%rbp) movq -0x70(%rbp), %rcx movq (%rcx), %rcx cmpq 0x160(%rcx), %rax jae 0xacc87 movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x160(%rax), %rax movq %rax, -0x90(%rbp) jmp 0xacca1 movq -0x90(%rbp), %rax addq $0x4, %rax subq $0x1, %rax andq $-0x4, %rax movq %rax, -0x90(%rbp) movq -0x70(%rbp), %rax movq 0x8(%rax), %rax movq 0x28(%rax), %rax movq -0x70(%rbp), %rcx movq (%rcx), %rcx movq 0x110(%rcx), %rcx subq -0x90(%rbp), %rcx cmpq %rcx, %rax jbe 0xaccdb callq 0xf60c0 movl $0x87, (%rax) movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF jmp 0xacd4d cmpq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC jbe 0xaccf3 movq $0xfffffc, -0x90(%rbp) # imm = 0xFFFFFC movq -0x90(%rbp), %rcx movq -0x88(%rbp), %rax movq %rcx, (%rax) movq -0x90(%rbp), %rcx movq -0x70(%rbp), %rax movq 0x8(%rax), %rax addq 0x28(%rax), %rcx movq %rcx, 0x28(%rax) movq -0x70(%rbp), %rax movq (%rax), %rax movq 0x50(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x50(%rax) movq -0x70(%rbp), %rax movl 0x1d0(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0x1d0(%rax) jmp 0xacd46 movl $0x0, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x94(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xacd77 movl -0x94(%rbp), %eax addq $0xa0, %rsp popq %rbp retq callq 0x2a270 nopl (%rax)
_mi_find_writepos: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov [rbp+var_88], rcx mov rax, [rbp+var_70] mov rax, [rax] cmp qword ptr [rax+58h], 0FFFFFFFFFFFFFFFFh jz loc_ACC23 mov rax, [rbp+var_70] cmp byte ptr [rax+33Ah], 0 jnz loc_ACC23 mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+58h] mov rax, [rbp+var_80] mov [rax], rcx mov [rbp+var_10], 0 mov rax, [rbp+var_70] mov dword ptr [rax+300h], 1 mov rax, [rbp+var_70] mov esi, [rax+1C0h] mov rax, [rbp+var_70] mov rax, [rax] mov rdx, [rax+58h] lea rdi, [rbp+var_60] call _mi_get_block_info and eax, 4 cmp eax, 0 jnz short loc_ACBD6 jmp short $+2 loc_ACBBD: jmp short $+2 loc_ACBBF: call _my_thread_var mov dword ptr [rax], 7Fh mov [rbp+var_64], 0FFFFFFFFh jmp loc_ACD4D loc_ACBD6: mov rcx, [rbp+var_20] mov rax, [rbp+var_70] mov rax, [rax] mov [rax+58h], rcx mov rax, [rbp+var_70] mov rax, [rax+8] mov rcx, [rax+8] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+8], rcx mov rdx, [rbp+var_38] mov rax, [rbp+var_70] mov rax, [rax+8] mov rcx, [rax+10h] sub rcx, rdx mov [rax+10h], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_88] mov [rax], rcx jmp loc_ACD44 loc_ACC23: mov rax, [rbp+var_70] mov rax, [rax+8] mov rcx, [rax+28h] mov rax, [rbp+var_80] mov [rax], rcx mov rax, [rbp+var_78] add rax, 3 mov rsi, [rbp+var_78] xor ecx, ecx mov edx, 1 cmp rsi, 0FFEDh cmovnb ecx, edx movsxd rcx, ecx add rax, rcx mov [rbp+var_90], rax mov rcx, [rbp+var_70] mov rcx, [rcx] cmp rax, [rcx+160h] jnb short loc_ACC87 mov rax, [rbp+var_70] mov rax, [rax] mov rax, [rax+160h] mov [rbp+var_90], rax jmp short loc_ACCA1 loc_ACC87: mov rax, [rbp+var_90] add rax, 4 sub rax, 1 and rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_90], rax loc_ACCA1: mov rax, [rbp+var_70] mov rax, [rax+8] mov rax, [rax+28h] mov rcx, [rbp+var_70] mov rcx, [rcx] mov rcx, [rcx+110h] sub rcx, [rbp+var_90] cmp rax, rcx jbe short loc_ACCDB call _my_thread_var mov dword ptr [rax], 87h mov [rbp+var_64], 0FFFFFFFFh jmp short loc_ACD4D loc_ACCDB: cmp [rbp+var_90], 0FFFFFCh jbe short loc_ACCF3 mov [rbp+var_90], 0FFFFFCh loc_ACCF3: mov rcx, [rbp+var_90] mov rax, [rbp+var_88] mov [rax], rcx mov rcx, [rbp+var_90] mov rax, [rbp+var_70] mov rax, [rax+8] add rcx, [rax+28h] mov [rax+28h], rcx mov rax, [rbp+var_70] mov rax, [rax] mov rcx, [rax+50h] add rcx, 1 mov [rax+50h], rcx mov rax, [rbp+var_70] mov ecx, [rax+1D0h] or ecx, 100h mov [rax+1D0h], ecx loc_ACD44: jmp short $+2 loc_ACD46: mov [rbp+var_64], 0 loc_ACD4D: mov eax, [rbp+var_64] mov [rbp+var_94], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_ACD77 mov eax, [rbp+var_94] add rsp, 0A0h pop rbp retn loc_ACD77: call ___stack_chk_fail
long long mi_find_writepos(_QWORD *a1, const char *a2, _QWORD *a3, unsigned long long *a4) { const char *v4; // rsi unsigned long long v6; // [rsp+10h] [rbp-90h] unsigned long long v7; // [rsp+10h] [rbp-90h] char v10[40]; // [rsp+40h] [rbp-60h] BYREF unsigned long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+80h] [rbp-20h] int v13; // [rsp+90h] [rbp-10h] unsigned long long v14; // [rsp+98h] [rbp-8h] v14 = __readfsqword(0x28u); if ( *(_QWORD *)(*a1 + 88LL) == -1LL || *((_BYTE *)a1 + 826) ) { *a3 = *(_QWORD *)(a1[1] + 40LL); v6 = (unsigned long long)&a2[((unsigned long long)a2 >= 0xFFED) + 3]; if ( v6 >= *(_QWORD *)(*a1 + 352LL) ) v7 = (v6 + 3) & 0xFFFFFFFFFFFFFFFCLL; else v7 = *(_QWORD *)(*a1 + 352LL); if ( *(_QWORD *)(a1[1] + 40LL) > *(_QWORD *)(*a1 + 272LL) - v7 ) { *(_DWORD *)my_thread_var(a1, a2) = 135; return (unsigned int)-1; } if ( v7 > 0xFFFFFC ) v7 = 16777212LL; *a4 = v7; *(_QWORD *)(a1[1] + 40LL) += v7; ++*(_QWORD *)(*a1 + 80LL); *((_DWORD *)a1 + 116) |= 0x100u; return 0; } *a3 = *(_QWORD *)(*a1 + 88LL); v13 = 0; *((_DWORD *)a1 + 192) = 1; v4 = (const char *)*((unsigned int *)a1 + 112); if ( (mi_get_block_info(v10, v4, *(_QWORD *)(*a1 + 88LL)) & 4) != 0 ) { *(_QWORD *)(*a1 + 88LL) = v12; --*(_QWORD *)(a1[1] + 8LL); *(_QWORD *)(a1[1] + 16LL) -= v11; *a4 = v11; return 0; } *(_DWORD *)my_thread_var(v10, v4) = 127; return (unsigned int)-1; }
_mi_find_writepos: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV qword ptr [RBP + -0x88],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x58],-0x1 JZ 0x001acc23 MOV RAX,qword ptr [RBP + -0x70] CMP byte ptr [RAX + 0x33a],0x0 JNZ 0x001acc23 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x70] MOV dword ptr [RAX + 0x300],0x1 MOV RAX,qword ptr [RBP + -0x70] MOV ESI,dword ptr [RAX + 0x1c0] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x58] LEA RDI,[RBP + -0x60] CALL 0x001a9d10 AND EAX,0x4 CMP EAX,0x0 JNZ 0x001acbd6 JMP 0x001acbbd LAB_001acbbd: JMP 0x001acbbf LAB_001acbbf: CALL 0x001f60c0 MOV dword ptr [RAX],0x7f MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x001acd4d LAB_001acbd6: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x58],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,-0x1 MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RAX],RCX JMP 0x001acd44 LAB_001acc23: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x3 MOV RSI,qword ptr [RBP + -0x78] XOR ECX,ECX MOV EDX,0x1 CMP RSI,0xffed CMOVNC ECX,EDX MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x90],RAX MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x160] JNC 0x001acc87 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x160] MOV qword ptr [RBP + -0x90],RAX JMP 0x001acca1 LAB_001acc87: MOV RAX,qword ptr [RBP + -0x90] ADD RAX,0x4 SUB RAX,0x1 AND RAX,-0x4 MOV qword ptr [RBP + -0x90],RAX LAB_001acca1: MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x70] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x110] SUB RCX,qword ptr [RBP + -0x90] CMP RAX,RCX JBE 0x001accdb CALL 0x001f60c0 MOV dword ptr [RAX],0x87 MOV dword ptr [RBP + -0x64],0xffffffff JMP 0x001acd4d LAB_001accdb: CMP qword ptr [RBP + -0x90],0xfffffc JBE 0x001accf3 MOV qword ptr [RBP + -0x90],0xfffffc LAB_001accf3: MOV RCX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX + 0x8] ADD RCX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x50] ADD RCX,0x1 MOV qword ptr [RAX + 0x50],RCX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x1d0] OR ECX,0x100 MOV dword ptr [RAX + 0x1d0],ECX LAB_001acd44: JMP 0x001acd46 LAB_001acd46: MOV dword ptr [RBP + -0x64],0x0 LAB_001acd4d: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x94],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001acd77 MOV EAX,dword ptr [RBP + -0x94] ADD RSP,0xa0 POP RBP RET LAB_001acd77: CALL 0x0012a270
int4 _mi_find_writepos(long *param_1,ulong param_2,int8 *param_3,ulong *param_4) { uint uVar1; int4 *puVar2; ulong uVar3; long in_FS_OFFSET; ulong local_98; int4 local_6c; int1 local_68 [40]; ulong local_40; int8 local_28; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if ((*(long *)(*param_1 + 0x58) == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) { *param_3 = *(int8 *)(param_1[1] + 0x28); uVar3 = param_2 + 3 + (long)(int)(uint)(0xffec < param_2); if (uVar3 < *(ulong *)(*param_1 + 0x160)) { local_98 = *(ulong *)(*param_1 + 0x160); } else { local_98 = uVar3 + 3 & 0xfffffffffffffffc; } if (*(long *)(*param_1 + 0x110) - local_98 < *(ulong *)(param_1[1] + 0x28)) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x87; local_6c = 0xffffffff; goto LAB_001acd4d; } if (0xfffffc < local_98) { local_98 = 0xfffffc; } *param_4 = local_98; *(ulong *)(param_1[1] + 0x28) = local_98 + *(long *)(param_1[1] + 0x28); *(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1; *(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 0x100; } else { *param_3 = *(int8 *)(*param_1 + 0x58); local_18 = 0; *(int4 *)(param_1 + 0x60) = 1; uVar1 = _mi_get_block_info(local_68,(int)param_1[0x38],*(int8 *)(*param_1 + 0x58)); if ((uVar1 & 4) == 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7f; local_6c = 0xffffffff; goto LAB_001acd4d; } *(int8 *)(*param_1 + 0x58) = local_28; *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1; *(ulong *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - local_40; *param_4 = local_40; } local_6c = 0; LAB_001acd4d: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_6c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,667
ftxui::Screen::Screen(int, int)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/screen/screen.cpp
Screen::Screen(int dimx, int dimy) : stencil{0, dimx - 1, 0, dimy - 1}, dimx_(dimx), dimy_(dimy), pixels_(dimy, std::vector<Pixel>(dimx)) { #if defined(_WIN32) // The placement of this call is a bit weird, however we can assume that // anybody who instantiates a Screen object eventually wants to output // something to the console. // As we require UTF8 for all input/output operations we will just switch to // UTF8 encoding here SetConsoleOutputCP(CP_UTF8); SetConsoleCP(CP_UTF8); WindowsEmulateVT100Terminal(); #endif }
O2
cpp
ftxui::Screen::Screen(int, int): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 andl $0x0, (%rdi) movl %edx, %r15d leal -0x1(%rsi), %eax movl %eax, 0x4(%rdi) andl $0x0, 0x8(%rdi) leal -0x1(%r15), %eax movl %eax, 0xc(%rdi) movl %esi, 0x10(%rdi) movl %edx, 0x14(%rdi) movslq %esi, %rsi leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x2926c leaq 0x18(%r14), %rbx movslq %r15d, %rsi leaq 0x10(%rsp), %rdx leaq 0xe(%rsp), %rcx movq %rbx, %rdi callq 0x292be leaq 0x10(%rsp), %rdi callq 0x137ae andq $0x0, 0x30(%r14) leaq 0x2d75(%rip), %rsi # 0x32be1 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x1017c addq $0x40, %r14 leaq 0x10(%rsp), %rsi pushq $0x1 popq %rdx leaq 0xe(%rsp), %rcx movq %r14, %rdi callq 0x30d4e leaq 0x10(%rsp), %rdi callq 0xc8c8 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0xc8c8 jmp 0x2feba movq %rax, %r14 movq %rbx, %rdi callq 0x13740 jmp 0x2fed6 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x137ae jmp 0x2fed6 movq %rax, %r14 movq %r14, %rdi callq 0xc7f0
_ZN5ftxui6ScreenC2Eii: push r15; Alternative name is 'ftxui::Screen::Screen(int, int)' push r14 push rbx sub rsp, 30h mov r14, rdi and dword ptr [rdi], 0 mov r15d, edx lea eax, [rsi-1] mov [rdi+4], eax and dword ptr [rdi+8], 0 lea eax, [r15-1] mov [rdi+0Ch], eax mov [rdi+10h], esi mov [rdi+14h], edx movsxd rsi, esi lea rdi, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] call _ZNSt6vectorIN5ftxui5PixelESaIS1_EEC2EmRKS2_; std::vector<ftxui::Pixel>::vector(ulong,std::allocator<ftxui::Pixel> const&) lea rbx, [r14+18h] movsxd rsi, r15d lea rdx, [rsp+48h+var_38] lea rcx, [rsp+48h+var_3A] mov rdi, rbx call _ZNSt6vectorIS_IN5ftxui5PixelESaIS1_EESaIS3_EEC2EmRKS3_RKS4_; std::vector<std::vector<ftxui::Pixel>>::vector(ulong,std::vector<ftxui::Pixel> const&,std::allocator<std::vector<ftxui::Pixel>> const&) lea rdi, [rsp+48h+var_38] call _ZNSt6vectorIN5ftxui5PixelESaIS1_EED2Ev; std::vector<ftxui::Pixel>::~vector() and qword ptr [r14+30h], 0 lea rsi, asc_32BDF+2; "" lea rdi, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) add r14, 40h ; '@' lea rsi, [rsp+48h+var_38] push 1 pop rdx lea rcx, [rsp+48h+var_3A] mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ESt16initializer_listIS5_ERKS6_; std::vector<std::string>::vector(std::initializer_list<std::string>,std::allocator<std::string> const&) lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rsp, 30h pop rbx pop r14 pop r15 retn mov r14, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2FEBA mov r14, rax loc_2FEBA: mov rdi, rbx call _ZNSt6vectorIS_IN5ftxui5PixelESaIS1_EESaIS3_EED2Ev; std::vector<std::vector<ftxui::Pixel>>::~vector() jmp short loc_2FED6 mov r14, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorIN5ftxui5PixelESaIS1_EED2Ev; std::vector<ftxui::Pixel>::~vector() jmp short loc_2FED6 mov r14, rax loc_2FED6: mov rdi, r14 call __Unwind_Resume
void ftxui::Screen::Screen(ftxui::Screen *this, int a2, int a3) { char v4; // [rsp+Eh] [rbp-3Ah] BYREF char v5; // [rsp+Fh] [rbp-39h] BYREF _QWORD v6[7]; // [rsp+10h] [rbp-38h] BYREF *(_DWORD *)this = 0; *((_DWORD *)this + 1) = a2 - 1; *((_DWORD *)this + 2) = 0; *((_DWORD *)this + 3) = a3 - 1; *((_DWORD *)this + 4) = a2; *((_DWORD *)this + 5) = a3; std::vector<ftxui::Pixel>::vector((long long)v6, a2, (long long)&v5); std::vector<std::vector<ftxui::Pixel>>::vector((long long)this + 24, a3, (long long)v6, (long long)&v4); std::vector<ftxui::Pixel>::~vector(v6); *((_QWORD *)this + 6) = 0LL; std::string::basic_string<std::allocator<char>>(v6, (long long)""); std::vector<std::string>::vector((char *)this + 64, v6, 1LL, &v4); std::string::~string(v6); }
Screen: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI AND dword ptr [RDI],0x0 MOV R15D,EDX LEA EAX,[RSI + -0x1] MOV dword ptr [RDI + 0x4],EAX AND dword ptr [RDI + 0x8],0x0 LEA EAX,[R15 + -0x1] MOV dword ptr [RDI + 0xc],EAX MOV dword ptr [RDI + 0x10],ESI MOV dword ptr [RDI + 0x14],EDX MOVSXD RSI,ESI LAB_0012fe2e: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x0012926c LEA RBX,[R14 + 0x18] MOVSXD RSI,R15D LAB_0012fe44: LEA RDX,[RSP + 0x10] LEA RCX,[RSP + 0xe] MOV RDI,RBX CALL 0x001292be LEA RDI,[RSP + 0x10] CALL 0x001137ae AND qword ptr [R14 + 0x30],0x0 LAB_0012fe65: LEA RSI,[0x132be1] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x0011017c ADD R14,0x40 LAB_0012fe7f: LEA RSI,[RSP + 0x10] PUSH 0x1 POP RDX LEA RCX,[RSP + 0xe] MOV RDI,R14 CALL 0x00130d4e LAB_0012fe94: LEA RDI,[RSP + 0x10] CALL 0x0010c8c8 ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* ftxui::Screen::Screen(int, int) */ void __thiscall ftxui::Screen::Screen(Screen *this,int param_1,int param_2) { allocator local_3a; allocator local_39; vector<ftxui::Pixel,std::allocator<ftxui::Pixel>> local_38 [32]; *(int4 *)this = 0; *(int *)(this + 4) = param_1 + -1; *(int4 *)(this + 8) = 0; *(int *)(this + 0xc) = param_2 + -1; *(int *)(this + 0x10) = param_1; *(int *)(this + 0x14) = param_2; /* try { // try from 0012fe2e to 0012fe3c has its CatchHandler @ 0012fed3 */ std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>::vector(local_38,(long)param_1,&local_39); /* try { // try from 0012fe44 to 0012fe55 has its CatchHandler @ 0012fec4 */ std:: vector<std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>,std::allocator<std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>>> ::vector((vector<std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>,std::allocator<std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>>> *)(this + 0x18),(long)param_2,(vector *)local_38,&local_3a); std::vector<ftxui::Pixel,std::allocator<ftxui::Pixel>>::~vector(local_38); *(int8 *)(this + 0x30) = 0; /* try { // try from 0012fe65 to 0012fe7a has its CatchHandler @ 0012feb7 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_38,"",&local_39); /* try { // try from 0012fe7f to 0012fe93 has its CatchHandler @ 0012fea8 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40), local_38,1,&local_3a); std::__cxx11::string::~string((string *)local_38); return; }
28,668
ma_seq_search
eloqsql/storage/maria/ma_search.c
int _ma_seq_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page, uint32 comp_flag, uchar **ret_pos, uchar *buff, my_bool *last_key) { int UNINIT_VAR(flag); uint page_flag, nod_flag, UNINIT_VAR(length), not_used[2]; uchar t_buff[MARIA_MAX_KEY_BUFF], *end; uchar *page; MARIA_KEYDEF *keyinfo= key->keyinfo; MARIA_SHARE *share= keyinfo->share; MARIA_KEY tmp_key; DBUG_ENTER("_ma_seq_search"); page_flag= ma_page->flag; nod_flag= ma_page->node; page= ma_page->buff; end= page + ma_page->size; page+= share->keypage_header + nod_flag; *ret_pos= page; t_buff[0]=0; /* Avoid bugs */ tmp_key.data= t_buff; tmp_key.keyinfo= keyinfo; while (page < end) { length=(*keyinfo->get_key)(&tmp_key, page_flag, nod_flag, &page); if (length == 0 || page > end) { _ma_set_fatal_error_with_share(share, HA_ERR_CRASHED); DBUG_PRINT("error", ("Found wrong key: length: %u page: %p end: %p", length, page, end)); DBUG_RETURN(MARIA_FOUND_WRONG_KEY); } if ((flag= ha_key_cmp(keyinfo->seg, t_buff, key->data, key->data_length + key->ref_length, comp_flag | tmp_key.flag, not_used)) >= 0) break; DBUG_PRINT("loop_extra",("page:%p key: '%s' flag: %d", page, t_buff, flag)); memcpy(buff,t_buff,length); *ret_pos=page; } if (flag == 0) memcpy(buff,t_buff,length); /* Result is first key */ *last_key= page == end; DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos)); DBUG_RETURN(flag); }
O3
c
ma_seq_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa58, %rsp # imm = 0xA58 movq %r9, -0xa48(%rbp) movq %r8, -0xa38(%rbp) movl %edx, -0xa24(%rbp) movq %rdi, %r13 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x8(%rdi), %r14 movq (%r14), %rdx movl 0x2c(%rsi), %eax movl %eax, -0xa2c(%rbp) movl 0x28(%rsi), %edi movq 0x10(%rsi), %rax movl 0x20(%rsi), %esi movq %rsi, %r8 addq %rax, %r8 movq %r8, -0xa20(%rbp) movq %rdx, -0xa40(%rbp) movl 0x744(%rdx), %edx movl %edi, -0xa28(%rbp) addl %edi, %edx addq %rdx, %rax movq %rax, -0xa18(%rbp) movq %rcx, -0xa50(%rbp) movq %rax, (%rcx) leaq -0xa10(%rbp), %rax movb $0x0, (%rax) movq %rax, -0xa70(%rbp) movq %r14, -0xa68(%rbp) cmpl %esi, %edx jae 0x6d2fe leaq -0xa10(%rbp), %r12 leaq -0xa70(%rbp), %rdi movl -0xa2c(%rbp), %esi movl -0xa28(%rbp), %edx leaq -0xa18(%rbp), %rcx callq *0xe0(%r14) testl %eax, %eax je 0x6d2cc movl %eax, %r15d movq -0xa20(%rbp), %rax cmpq %rax, -0xa18(%rbp) ja 0x6d2cc movq 0xc0(%r14), %rdi movq (%r13), %rdx movl 0x14(%r13), %ecx addl 0x10(%r13), %ecx movl -0xa58(%rbp), %r8d orl -0xa24(%rbp), %r8d movq %r12, %rsi leaq -0xa78(%rbp), %r9 callq 0x9f112 movl %eax, %ebx testl %eax, %eax jns 0x6d2e4 movl %r15d, %edx movq -0xa38(%rbp), %rdi movq %r12, %rsi callq 0x29080 movq -0xa18(%rbp), %rax movq -0xa50(%rbp), %rcx movq %rax, (%rcx) cmpq -0xa20(%rbp), %rax jb 0x6d22c jmp 0x6d2fe movq -0xa40(%rbp), %rdi movl $0x7e, %esi callq 0x405da movl $0x7fffffff, %ebx # imm = 0x7FFFFFFF jmp 0x6d316 jne 0x6d2fe movl %r15d, %edx leaq -0xa10(%rbp), %rsi movq -0xa38(%rbp), %rdi callq 0x29080 xorl %ebx, %ebx movq -0xa20(%rbp), %rax cmpq %rax, -0xa18(%rbp) movq -0xa48(%rbp), %rax sete (%rax) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x6d339 movl %ebx, %eax addq $0xa58, %rsp # imm = 0xA58 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29260
_ma_seq_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A58h mov [rbp+var_A48], r9 mov [rbp+var_A38], r8 mov [rbp+var_A24], edx mov r13, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r14, [rdi+8] mov rdx, [r14] mov eax, [rsi+2Ch] mov [rbp+var_A2C], eax mov edi, [rsi+28h] mov rax, [rsi+10h] mov esi, [rsi+20h] mov r8, rsi add r8, rax mov [rbp+var_A20], r8 mov [rbp+var_A40], rdx mov edx, [rdx+744h] mov [rbp+var_A28], edi add edx, edi add rax, rdx mov [rbp+var_A18], rax mov [rbp+var_A50], rcx mov [rcx], rax lea rax, [rbp+var_A10] mov byte ptr [rax], 0 mov [rbp+var_A70], rax mov [rbp+var_A68], r14 cmp edx, esi jnb loc_6D2FE lea r12, [rbp+var_A10] loc_6D22C: lea rdi, [rbp+var_A70] mov esi, [rbp+var_A2C] mov edx, [rbp+var_A28] lea rcx, [rbp+var_A18] call qword ptr [r14+0E0h] test eax, eax jz short loc_6D2CC mov r15d, eax mov rax, [rbp+var_A20] cmp [rbp+var_A18], rax ja short loc_6D2CC mov rdi, [r14+0C0h] mov rdx, [r13+0] mov ecx, [r13+14h] add ecx, [r13+10h] mov r8d, [rbp+var_A58] or r8d, [rbp+var_A24] mov rsi, r12 lea r9, [rbp+var_A78] call ha_key_cmp mov ebx, eax test eax, eax jns short loc_6D2E4 mov edx, r15d mov rdi, [rbp+var_A38] mov rsi, r12 call _memcpy mov rax, [rbp+var_A18] mov rcx, [rbp+var_A50] mov [rcx], rax cmp rax, [rbp+var_A20] jb loc_6D22C jmp short loc_6D2FE loc_6D2CC: mov rdi, [rbp+var_A40] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share mov ebx, 7FFFFFFFh jmp short loc_6D316 loc_6D2E4: jnz short loc_6D2FE mov edx, r15d lea rsi, [rbp+var_A10] mov rdi, [rbp+var_A38] call _memcpy xor ebx, ebx loc_6D2FE: mov rax, [rbp+var_A20] cmp [rbp+var_A18], rax mov rax, [rbp+var_A48] setz byte ptr [rax] loc_6D316: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_6D339 mov eax, ebx add rsp, 0A58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6D339: call ___stack_chk_fail
long long ma_seq_search(long long a1, long long a2, int a3, unsigned long long *a4, long long a5, bool *a6) { unsigned int v6; // ebx long long v8; // r14 long long v9; // rdx unsigned int v10; // edi long long v11; // rax long long v12; // rsi long long v13; // rdx unsigned int v14; // eax long long v15; // rdx long long v16; // rcx long long v17; // r8 int v18; // r9d unsigned int v19; // r15d int v20; // eax unsigned long long v21; // rax char v23[8]; // [rsp+8h] [rbp-A78h] BYREF _QWORD v24[3]; // [rsp+10h] [rbp-A70h] BYREF unsigned int v25; // [rsp+28h] [rbp-A58h] unsigned long long *v26; // [rsp+30h] [rbp-A50h] bool *v27; // [rsp+38h] [rbp-A48h] long long v28; // [rsp+40h] [rbp-A40h] long long v29; // [rsp+48h] [rbp-A38h] unsigned int v30; // [rsp+54h] [rbp-A2Ch] unsigned int v31; // [rsp+58h] [rbp-A28h] int v32; // [rsp+5Ch] [rbp-A24h] unsigned long long v33; // [rsp+60h] [rbp-A20h] unsigned long long v34; // [rsp+68h] [rbp-A18h] BYREF _BYTE v35[2528]; // [rsp+70h] [rbp-A10h] BYREF unsigned long long v36; // [rsp+A50h] [rbp-30h] v27 = a6; v29 = a5; v32 = a3; v36 = __readfsqword(0x28u); v8 = *(_QWORD *)(a1 + 8); v9 = *(_QWORD *)v8; v30 = *(_DWORD *)(a2 + 44); v10 = *(_DWORD *)(a2 + 40); v11 = *(_QWORD *)(a2 + 16); v12 = *(unsigned int *)(a2 + 32); v33 = v11 + v12; v28 = v9; LODWORD(v9) = *(_DWORD *)(v9 + 1860); v31 = v10; v13 = v10 + (unsigned int)v9; v34 = v13 + v11; v26 = a4; *a4 = v13 + v11; v35[0] = 0; v24[0] = v35; v24[1] = v8; if ( (unsigned int)v13 < (unsigned int)v12 ) { while ( 1 ) { v14 = (*(long long ( **)(_QWORD *, _QWORD, _QWORD, unsigned long long *))(v8 + 224))(v24, v30, v31, &v34); if ( !v14 || (v19 = v14, v34 > v33) ) { ma_set_fatal_error_with_share(v28, 126, v15, v16, v17, v18); return 0x7FFFFFFF; } v20 = ha_key_cmp( *(_QWORD *)(v8 + 192), v35, *(_QWORD *)a1, (unsigned int)(*(_DWORD *)(a1 + 16) + *(_DWORD *)(a1 + 20)), v32 | v25, v23); v6 = v20; if ( v20 >= 0 ) break; memcpy(v29, v35, v19); v21 = v34; *v26 = v34; if ( v21 >= v33 ) goto LABEL_10; } if ( !v20 ) { memcpy(v29, v35, v19); v6 = 0; } } LABEL_10: *v27 = v34 == v33; return v6; }
_ma_seq_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa58 MOV qword ptr [RBP + -0xa48],R9 MOV qword ptr [RBP + -0xa38],R8 MOV dword ptr [RBP + -0xa24],EDX MOV R13,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R14,qword ptr [RDI + 0x8] MOV RDX,qword ptr [R14] MOV EAX,dword ptr [RSI + 0x2c] MOV dword ptr [RBP + -0xa2c],EAX MOV EDI,dword ptr [RSI + 0x28] MOV RAX,qword ptr [RSI + 0x10] MOV ESI,dword ptr [RSI + 0x20] MOV R8,RSI ADD R8,RAX MOV qword ptr [RBP + -0xa20],R8 MOV qword ptr [RBP + -0xa40],RDX MOV EDX,dword ptr [RDX + 0x744] MOV dword ptr [RBP + -0xa28],EDI ADD EDX,EDI ADD RAX,RDX MOV qword ptr [RBP + -0xa18],RAX MOV qword ptr [RBP + -0xa50],RCX MOV qword ptr [RCX],RAX LEA RAX,[RBP + -0xa10] MOV byte ptr [RAX],0x0 MOV qword ptr [RBP + -0xa70],RAX MOV qword ptr [RBP + -0xa68],R14 CMP EDX,ESI JNC 0x0016d2fe LEA R12,[RBP + -0xa10] LAB_0016d22c: LEA RDI,[RBP + -0xa70] MOV ESI,dword ptr [RBP + -0xa2c] MOV EDX,dword ptr [RBP + -0xa28] LEA RCX,[RBP + -0xa18] CALL qword ptr [R14 + 0xe0] TEST EAX,EAX JZ 0x0016d2cc MOV R15D,EAX MOV RAX,qword ptr [RBP + -0xa20] CMP qword ptr [RBP + -0xa18],RAX JA 0x0016d2cc MOV RDI,qword ptr [R14 + 0xc0] MOV RDX,qword ptr [R13] MOV ECX,dword ptr [R13 + 0x14] ADD ECX,dword ptr [R13 + 0x10] MOV R8D,dword ptr [RBP + -0xa58] OR R8D,dword ptr [RBP + -0xa24] MOV RSI,R12 LEA R9,[RBP + -0xa78] CALL 0x0019f112 MOV EBX,EAX TEST EAX,EAX JNS 0x0016d2e4 MOV EDX,R15D MOV RDI,qword ptr [RBP + -0xa38] MOV RSI,R12 CALL 0x00129080 MOV RAX,qword ptr [RBP + -0xa18] MOV RCX,qword ptr [RBP + -0xa50] MOV qword ptr [RCX],RAX CMP RAX,qword ptr [RBP + -0xa20] JC 0x0016d22c JMP 0x0016d2fe LAB_0016d2cc: MOV RDI,qword ptr [RBP + -0xa40] MOV ESI,0x7e CALL 0x001405da MOV EBX,0x7fffffff JMP 0x0016d316 LAB_0016d2e4: JNZ 0x0016d2fe MOV EDX,R15D LEA RSI,[RBP + -0xa10] MOV RDI,qword ptr [RBP + -0xa38] CALL 0x00129080 XOR EBX,EBX LAB_0016d2fe: MOV RAX,qword ptr [RBP + -0xa20] CMP qword ptr [RBP + -0xa18],RAX MOV RAX,qword ptr [RBP + -0xa48] SETZ byte ptr [RAX] LAB_0016d316: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0016d339 MOV EAX,EBX ADD RSP,0xa58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016d339: CALL 0x00129260
int _ma_seq_search(int8 *param_1,long param_2,uint param_3,ulong *param_4,void *param_5, int8 param_6) { long *plVar1; uint uVar2; uint uVar3; int unaff_EBX; long in_FS_OFFSET; int1 local_a80 [8]; int1 *local_a78; long *local_a70; uint local_a60; ulong *local_a58; int8 local_a50; long local_a48; void *local_a40; int4 local_a34; int local_a30; uint local_a2c; ulong local_a28; ulong local_a20; int1 local_a18 [2528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); plVar1 = (long *)param_1[1]; local_a48 = *plVar1; local_a34 = *(int4 *)(param_2 + 0x2c); local_a30 = *(int *)(param_2 + 0x28); uVar2 = *(uint *)(param_2 + 0x20); local_a28 = (ulong)uVar2 + *(long *)(param_2 + 0x10); uVar3 = *(int *)(local_a48 + 0x744) + local_a30; local_a20 = *(long *)(param_2 + 0x10) + (ulong)uVar3; *param_4 = local_a20; local_a78 = local_a18; local_a18[0] = 0; local_a70 = plVar1; local_a58 = param_4; local_a50 = param_6; local_a40 = param_5; local_a2c = param_3; if (uVar3 < uVar2) { do { uVar2 = (*(code *)plVar1[0x1c])(&local_a78,local_a34,local_a30,&local_a20); if ((uVar2 == 0) || (local_a28 < local_a20)) { _ma_set_fatal_error_with_share(local_a48,0x7e); unaff_EBX = 0x7fffffff; goto LAB_0016d316; } unaff_EBX = ha_key_cmp(plVar1[0x18],local_a18,*param_1, *(int *)((long)param_1 + 0x14) + *(int *)(param_1 + 2), local_a60 | local_a2c,local_a80); if (-1 < unaff_EBX) { if (unaff_EBX == 0) { memcpy(local_a40,local_a18,(ulong)uVar2); unaff_EBX = 0; } break; } memcpy(local_a40,local_a18,(ulong)uVar2); *local_a58 = local_a20; } while (local_a20 < local_a28); } *(bool *)local_a50 = local_a20 == local_a28; LAB_0016d316: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return unaff_EBX; }
28,669
ImageFlipVertical
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
void ImageFlipVertical(Image *image) { // Security check to avoid program crash if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return; if (image->mipmaps > 1) TRACELOG(LOG_WARNING, "Image manipulation only applied to base mipmap level"); if (image->format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "Image manipulation not supported for compressed formats"); else { int bytesPerPixel = GetPixelDataSize(1, 1, image->format); unsigned char *flippedData = (unsigned char *)RL_MALLOC(image->width*image->height*bytesPerPixel); for (int i = (image->height - 1), offsetSize = 0; i >= 0; i--) { memcpy(flippedData + offsetSize, ((unsigned char *)image->data) + i*image->width*bytesPerPixel, image->width*bytesPerPixel); offsetSize += image->width*bytesPerPixel; } RL_FREE(image->data); image->data = flippedData; } }
O0
c
ImageFlipVertical: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x104d1a movq -0x8(%rbp), %rax cmpl $0x0, 0x8(%rax) je 0x104d1a movq -0x8(%rbp), %rax cmpl $0x0, 0xc(%rax) jne 0x104d1f jmp 0x104e19 movq -0x8(%rbp), %rax cmpl $0x1, 0x10(%rax) jle 0x104d3c movl $0x4, %edi leaq 0xbc9eb(%rip), %rsi # 0x1c1720 movb $0x0, %al callq 0x182c40 movq -0x8(%rbp), %rax cmpl $0xe, 0x14(%rax) jl 0x104d5e movl $0x4, %edi leaq 0xbca03(%rip), %rsi # 0x1c1755 movb $0x0, %al callq 0x182c40 jmp 0x104e19 movq -0x8(%rbp), %rax movl 0x14(%rax), %edx movl $0x1, %esi movl %esi, %edi callq 0xfb840 movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movq -0x8(%rbp), %rcx imull 0xc(%rcx), %eax imull -0xc(%rbp), %eax movslq %eax, %rdi callq 0xa6e0 movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0xc(%rax), %eax subl $0x1, %eax movl %eax, -0x1c(%rbp) movl $0x0, -0x20(%rbp) cmpl $0x0, -0x1c(%rbp) jl 0x104e02 movq -0x18(%rbp), %rdi movslq -0x20(%rbp), %rax addq %rax, %rdi movq -0x8(%rbp), %rax movq (%rax), %rsi movl -0x1c(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x8(%rcx), %eax imull -0xc(%rbp), %eax cltq addq %rax, %rsi movq -0x8(%rbp), %rax movl 0x8(%rax), %eax imull -0xc(%rbp), %eax movslq %eax, %rdx callq 0xa400 movq -0x8(%rbp), %rax movl 0x8(%rax), %eax imull -0xc(%rbp), %eax addl -0x20(%rbp), %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x104da7 movq -0x8(%rbp), %rax movq (%rax), %rdi callq 0xa640 movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) addq $0x20, %rsp popq %rbp retq nop
ImageFlipVertical: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_104D1A mov rax, [rbp+var_8] cmp dword ptr [rax+8], 0 jz short loc_104D1A mov rax, [rbp+var_8] cmp dword ptr [rax+0Ch], 0 jnz short loc_104D1F loc_104D1A: jmp loc_104E19 loc_104D1F: mov rax, [rbp+var_8] cmp dword ptr [rax+10h], 1 jle short loc_104D3C mov edi, 4 lea rsi, aImageManipulat; "Image manipulation only applied to base"... mov al, 0 call TraceLog loc_104D3C: mov rax, [rbp+var_8] cmp dword ptr [rax+14h], 0Eh jl short loc_104D5E mov edi, 4 lea rsi, aImageManipulat_0; "Image manipulation not supported for co"... mov al, 0 call TraceLog jmp loc_104E19 loc_104D5E: mov rax, [rbp+var_8] mov edx, [rax+14h] mov esi, 1 mov edi, esi call GetPixelDataSize mov [rbp+var_C], eax mov rax, [rbp+var_8] mov eax, [rax+8] mov rcx, [rbp+var_8] imul eax, [rcx+0Ch] imul eax, [rbp+var_C] movsxd rdi, eax call _malloc mov [rbp+var_18], rax mov rax, [rbp+var_8] mov eax, [rax+0Ch] sub eax, 1 mov [rbp+var_1C], eax mov [rbp+var_20], 0 loc_104DA7: cmp [rbp+var_1C], 0 jl short loc_104E02 mov rdi, [rbp+var_18] movsxd rax, [rbp+var_20] add rdi, rax mov rax, [rbp+var_8] mov rsi, [rax] mov eax, [rbp+var_1C] mov rcx, [rbp+var_8] imul eax, [rcx+8] imul eax, [rbp+var_C] cdqe add rsi, rax mov rax, [rbp+var_8] mov eax, [rax+8] imul eax, [rbp+var_C] movsxd rdx, eax call _memcpy mov rax, [rbp+var_8] mov eax, [rax+8] imul eax, [rbp+var_C] add eax, [rbp+var_20] mov [rbp+var_20], eax mov eax, [rbp+var_1C] add eax, 0FFFFFFFFh mov [rbp+var_1C], eax jmp short loc_104DA7 loc_104E02: mov rax, [rbp+var_8] mov rdi, [rax] call _free mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax], rcx loc_104E19: add rsp, 20h pop rbp retn
long long ImageFlipVertical(long long a1, long long a2, int a3, int a4, int a5, int a6) { long long result; // rax int v7; // [rsp+0h] [rbp-20h] int v8; // [rsp+4h] [rbp-1Ch] long long v9; // [rsp+8h] [rbp-18h] int PixelDataSize; // [rsp+14h] [rbp-Ch] result = a1; if ( *(_QWORD *)a1 ) { result = a1; if ( *(_DWORD *)(a1 + 8) ) { result = a1; if ( *(_DWORD *)(a1 + 12) ) { if ( *(int *)(a1 + 16) > 1 ) TraceLog(4, (unsigned int)"Image manipulation only applied to base mipmap level", a3, a4, a5, a6); if ( *(int *)(a1 + 20) < 14 ) { PixelDataSize = GetPixelDataSize(1, 1, *(_DWORD *)(a1 + 20)); v9 = malloc(PixelDataSize * *(_DWORD *)(a1 + 12) * *(_DWORD *)(a1 + 8)); v8 = *(_DWORD *)(a1 + 12) - 1; v7 = 0; while ( v8 >= 0 ) { memcpy( v7 + v9, PixelDataSize * *(_DWORD *)(a1 + 8) * v8 + *(_QWORD *)a1, PixelDataSize * *(_DWORD *)(a1 + 8)); v7 += PixelDataSize * *(_DWORD *)(a1 + 8); --v8; } free(*(_QWORD *)a1); result = a1; *(_QWORD *)a1 = v9; } else { return TraceLog(4, (unsigned int)"Image manipulation not supported for compressed formats", a3, a4, a5, a6); } } } } return result; }
28,670
ImageFlipVertical
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
void ImageFlipVertical(Image *image) { // Security check to avoid program crash if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return; if (image->mipmaps > 1) TRACELOG(LOG_WARNING, "Image manipulation only applied to base mipmap level"); if (image->format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "Image manipulation not supported for compressed formats"); else { int bytesPerPixel = GetPixelDataSize(1, 1, image->format); unsigned char *flippedData = (unsigned char *)RL_MALLOC(image->width*image->height*bytesPerPixel); for (int i = (image->height - 1), offsetSize = 0; i >= 0; i--) { memcpy(flippedData + offsetSize, ((unsigned char *)image->data) + i*image->width*bytesPerPixel, image->width*bytesPerPixel); offsetSize += image->width*bytesPerPixel; } RL_FREE(image->data); image->data = flippedData; } }
O2
c
ImageFlipVertical: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq $0x0, (%rdi) je 0x8390c movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0x8390c cmpl $0x0, 0xc(%rbx) je 0x8390c cmpl $0x2, 0x10(%rbx) jl 0x83883 leaq 0x4f86f(%rip), %rsi # 0xd30e8 pushq $0x4 popq %rdi xorl %eax, %eax callq 0xa128b movl 0x14(%rbx), %edx cmpl $0xe, %edx jl 0x838aa leaq 0x4f88b(%rip), %rsi # 0xd311d pushq $0x4 popq %rdi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa128b pushq $0x1 popq %rdi movl %edi, %esi callq 0x7df87 movl %eax, %ebp imull 0x8(%rbx), %ebp movslq 0xc(%rbx), %r13 movl %ebp, %eax imull %r13d, %eax movslq %eax, %rdi callq 0x96e0 movq %rax, %r14 movslq %ebp, %r15 leal -0x1(%r13), %ebp imull %r15d, %ebp movq %rax, %r12 testq %r13, %r13 jle 0x83901 decq %r13 movslq %ebp, %rbp movq (%rbx), %rsi addq %rbp, %rsi movq %r12, %rdi movq %r15, %rdx callq 0x9400 addq %r15, %r12 subl %r15d, %ebp jmp 0x838dd movq (%rbx), %rdi callq 0x9640 movq %r14, (%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ImageFlipVertical: push rbp push r15 push r14 push r13 push r12 push rbx push rax cmp qword ptr [rdi], 0 jz loc_8390C mov rbx, rdi cmp dword ptr [rdi+8], 0 jz loc_8390C cmp dword ptr [rbx+0Ch], 0 jz loc_8390C cmp dword ptr [rbx+10h], 2 jl short loc_83883 lea rsi, aImageManipulat; "Image manipulation only applied to base"... push 4 pop rdi xor eax, eax call TraceLog loc_83883: mov edx, [rbx+14h] cmp edx, 0Eh jl short loc_838AA lea rsi, aImageManipulat_0; "Image manipulation not supported for co"... push 4 pop rdi xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp TraceLog loc_838AA: push 1 pop rdi mov esi, edi call GetPixelDataSize mov ebp, eax imul ebp, [rbx+8] movsxd r13, dword ptr [rbx+0Ch] mov eax, ebp imul eax, r13d movsxd rdi, eax call _malloc mov r14, rax movsxd r15, ebp lea ebp, [r13-1] imul ebp, r15d mov r12, rax loc_838DD: test r13, r13 jle short loc_83901 dec r13 movsxd rbp, ebp mov rsi, [rbx] add rsi, rbp mov rdi, r12 mov rdx, r15 call _memcpy add r12, r15 sub ebp, r15d jmp short loc_838DD loc_83901: mov rdi, [rbx] call _free mov [rbx], r14 loc_8390C: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void ImageFlipVertical(long long a1, long long a2, int a3, int a4, int a5, int a6) { int v6; // edx int v7; // ebp long long v8; // r13 long long v9; // r14 long long v10; // r15 int v11; // ebp long long v12; // r12 if ( *(_QWORD *)a1 && *(_DWORD *)(a1 + 8) && *(_DWORD *)(a1 + 12) ) { if ( *(int *)(a1 + 16) >= 2 ) TraceLog(4, (unsigned int)"Image manipulation only applied to base mipmap level", a3, a4, a5, a6); v6 = *(_DWORD *)(a1 + 20); if ( v6 < 14 ) { v7 = *(_DWORD *)(a1 + 8) * GetPixelDataSize(1, 1, v6); v8 = *(int *)(a1 + 12); v9 = malloc((int)v8 * v7); v10 = v7; v11 = v7 * (v8 - 1); v12 = v9; while ( v8 > 0 ) { --v8; memcpy(v12, v11 + *(_QWORD *)a1, v10); v12 += v10; v11 -= v10; } free(*(_QWORD *)a1); *(_QWORD *)a1 = v9; } else { TraceLog(4, (unsigned int)"Image manipulation not supported for compressed formats", v6, a4, a5, a6); } } }
ImageFlipVertical: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP qword ptr [RDI],0x0 JZ 0x0018390c MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x0018390c CMP dword ptr [RBX + 0xc],0x0 JZ 0x0018390c CMP dword ptr [RBX + 0x10],0x2 JL 0x00183883 LEA RSI,[0x1d30e8] PUSH 0x4 POP RDI XOR EAX,EAX CALL 0x001a128b LAB_00183883: MOV EDX,dword ptr [RBX + 0x14] CMP EDX,0xe JL 0x001838aa LEA RSI,[0x1d311d] PUSH 0x4 POP RDI XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a128b LAB_001838aa: PUSH 0x1 POP RDI MOV ESI,EDI CALL 0x0017df87 MOV EBP,EAX IMUL EBP,dword ptr [RBX + 0x8] MOVSXD R13,dword ptr [RBX + 0xc] MOV EAX,EBP IMUL EAX,R13D MOVSXD RDI,EAX CALL 0x001096e0 MOV R14,RAX MOVSXD R15,EBP LEA EBP,[R13 + -0x1] IMUL EBP,R15D MOV R12,RAX LAB_001838dd: TEST R13,R13 JLE 0x00183901 DEC R13 MOVSXD RBP,EBP MOV RSI,qword ptr [RBX] ADD RSI,RBP MOV RDI,R12 MOV RDX,R15 CALL 0x00109400 ADD R12,R15 SUB EBP,R15D JMP 0x001838dd LAB_00183901: MOV RDI,qword ptr [RBX] CALL 0x00109640 MOV qword ptr [RBX],R14 LAB_0018390c: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void ImageFlipVertical(long *param_1) { int iVar1; int iVar2; void *pvVar3; int iVar4; void *__dest; long lVar5; if (((*param_1 != 0) && ((int)param_1[1] != 0)) && (*(int *)((long)param_1 + 0xc) != 0)) { if (1 < (int)param_1[2]) { TraceLog(4,"Image manipulation only applied to base mipmap level"); } if (0xd < *(int *)((long)param_1 + 0x14)) { TraceLog(4,"Image manipulation not supported for compressed formats"); return; } iVar2 = GetPixelDataSize(1,1); iVar2 = iVar2 * (int)param_1[1]; iVar1 = *(int *)((long)param_1 + 0xc); pvVar3 = malloc((long)(iVar2 * iVar1)); iVar4 = (iVar1 + -1) * iVar2; __dest = pvVar3; for (lVar5 = (long)iVar1; 0 < lVar5; lVar5 = lVar5 + -1) { memcpy(__dest,(void *)(*param_1 + (long)iVar4),(long)iVar2); __dest = (void *)((long)__dest + (long)iVar2); iVar4 = iVar4 - iVar2; } free((void *)*param_1); *param_1 = (long)pvVar3; } return; }
28,671
ImageFlipVertical
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
void ImageFlipVertical(Image *image) { // Security check to avoid program crash if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return; if (image->mipmaps > 1) TRACELOG(LOG_WARNING, "Image manipulation only applied to base mipmap level"); if (image->format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "Image manipulation not supported for compressed formats"); else { int bytesPerPixel = GetPixelDataSize(1, 1, image->format); unsigned char *flippedData = (unsigned char *)RL_MALLOC(image->width*image->height*bytesPerPixel); for (int i = (image->height - 1), offsetSize = 0; i >= 0; i--) { memcpy(flippedData + offsetSize, ((unsigned char *)image->data) + i*image->width*bytesPerPixel, image->width*bytesPerPixel); offsetSize += image->width*bytesPerPixel; } RL_FREE(image->data); image->data = flippedData; } }
O3
c
ImageFlipVertical: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq $0x0, (%rdi) je 0x981d1 movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0x981d1 cmpl $0x0, 0xc(%rbx) je 0x981d1 cmpl $0x2, 0x10(%rbx) jl 0x98130 leaq 0x54ecc(%rip), %rsi # 0xecff0 movl $0x4, %edi xorl %eax, %eax callq 0xb9db7 movl 0x14(%rbx), %edx cmpl $0xe, %edx jl 0x98159 leaq 0x54ee6(%rip), %rsi # 0xed025 movl $0x4, %edi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xb9db7 movl $0x1, %edi movl $0x1, %esi callq 0x9225b movl %eax, %r13d imull 0x8(%rbx), %r13d movslq 0xc(%rbx), %rbp movl %r13d, %eax imull %ebp, %eax movslq %eax, %rdi callq 0xa6f0 movq %rax, (%rsp) movq (%rbx), %r15 testq %rbp, %rbp jle 0x981c2 movslq %r13d, %r12 movq %rbp, %r14 incq %r14 decl %ebp imull %r13d, %ebp movq (%rsp), %r13 movslq %ebp, %rbp leaq (%r15,%rbp), %rsi movq %r13, %rdi movq %r12, %rdx callq 0xa410 decq %r14 subl %r12d, %ebp addq %r12, %r13 cmpq $0x1, %r14 ja 0x981a1 movq %r15, %rdi callq 0xa650 movq (%rsp), %rax movq %rax, (%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ImageFlipVertical: push rbp push r15 push r14 push r13 push r12 push rbx push rax cmp qword ptr [rdi], 0 jz loc_981D1 mov rbx, rdi cmp dword ptr [rdi+8], 0 jz loc_981D1 cmp dword ptr [rbx+0Ch], 0 jz loc_981D1 cmp dword ptr [rbx+10h], 2 jl short loc_98130 lea rsi, aImageManipulat; "Image manipulation only applied to base"... mov edi, 4 xor eax, eax call TraceLog loc_98130: mov edx, [rbx+14h] cmp edx, 0Eh jl short loc_98159 lea rsi, aImageManipulat_0; "Image manipulation not supported for co"... mov edi, 4 xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp TraceLog loc_98159: mov edi, 1 mov esi, 1 call GetPixelDataSize mov r13d, eax imul r13d, [rbx+8] movsxd rbp, dword ptr [rbx+0Ch] mov eax, r13d imul eax, ebp movsxd rdi, eax call _malloc mov [rsp+38h+var_38], rax mov r15, [rbx] test rbp, rbp jle short loc_981C2 movsxd r12, r13d mov r14, rbp inc r14 dec ebp imul ebp, r13d mov r13, [rsp+38h+var_38] loc_981A1: movsxd rbp, ebp lea rsi, [r15+rbp] mov rdi, r13 mov rdx, r12 call _memcpy dec r14 sub ebp, r12d add r13, r12 cmp r14, 1 ja short loc_981A1 loc_981C2: mov rdi, r15 call _free mov rax, [rsp+38h+var_38] mov [rbx], rax loc_981D1: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ImageFlipVertical(int *a1, long long a2, int a3, int a4, int a5, int a6) { int v6; // edx long long result; // rax int v8; // r13d long long v9; // rbp long long v10; // r15 long long v11; // r12 unsigned long long v12; // r14 int v13; // ebp long long v14; // r13 long long v15; // [rsp+0h] [rbp-38h] if ( *(_QWORD *)a1 && a1[2] && a1[3] ) { if ( a1[4] >= 2 ) TraceLog(4, (unsigned int)"Image manipulation only applied to base mipmap level", a3, a4, a5, a6); v6 = a1[5]; if ( v6 < 14 ) { v8 = a1[2] * GetPixelDataSize(1, 1, v6); v9 = a1[3]; v15 = malloc((int)v9 * v8); v10 = *(_QWORD *)a1; if ( v9 > 0 ) { v11 = v8; v12 = v9 + 1; v13 = v8 * (v9 - 1); v14 = v15; do { memcpy(v14); --v12; v13 -= v11; v14 += v11; } while ( v12 > 1 ); } free(v10); result = v15; *(_QWORD *)a1 = v15; } else { return TraceLog(4, (unsigned int)"Image manipulation not supported for compressed formats", v6, a4, a5, a6); } } return result; }
ImageFlipVertical: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP qword ptr [RDI],0x0 JZ 0x001981d1 MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x001981d1 CMP dword ptr [RBX + 0xc],0x0 JZ 0x001981d1 CMP dword ptr [RBX + 0x10],0x2 JL 0x00198130 LEA RSI,[0x1ecff0] MOV EDI,0x4 XOR EAX,EAX CALL 0x001b9db7 LAB_00198130: MOV EDX,dword ptr [RBX + 0x14] CMP EDX,0xe JL 0x00198159 LEA RSI,[0x1ed025] MOV EDI,0x4 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001b9db7 LAB_00198159: MOV EDI,0x1 MOV ESI,0x1 CALL 0x0019225b MOV R13D,EAX IMUL R13D,dword ptr [RBX + 0x8] MOVSXD RBP,dword ptr [RBX + 0xc] MOV EAX,R13D IMUL EAX,EBP MOVSXD RDI,EAX CALL 0x0010a6f0 MOV qword ptr [RSP],RAX MOV R15,qword ptr [RBX] TEST RBP,RBP JLE 0x001981c2 MOVSXD R12,R13D MOV R14,RBP INC R14 DEC EBP IMUL EBP,R13D MOV R13,qword ptr [RSP] LAB_001981a1: MOVSXD RBP,EBP LEA RSI,[R15 + RBP*0x1] MOV RDI,R13 MOV RDX,R12 CALL 0x0010a410 DEC R14 SUB EBP,R12D ADD R13,R12 CMP R14,0x1 JA 0x001981a1 LAB_001981c2: MOV RDI,R15 CALL 0x0010a650 MOV RAX,qword ptr [RSP] MOV qword ptr [RBX],RAX LAB_001981d1: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void ImageFlipVertical(long *param_1) { void *__ptr; int iVar1; void *pvVar2; int iVar3; void *__dest; ulong uVar4; if (((*param_1 != 0) && ((int)param_1[1] != 0)) && (*(int *)((long)param_1 + 0xc) != 0)) { if (1 < (int)param_1[2]) { TraceLog(4,"Image manipulation only applied to base mipmap level"); } if (0xd < *(int *)((long)param_1 + 0x14)) { TraceLog(4,"Image manipulation not supported for compressed formats"); return; } iVar1 = GetPixelDataSize(1,1); iVar1 = iVar1 * (int)param_1[1]; iVar3 = *(int *)((long)param_1 + 0xc); pvVar2 = malloc((long)(iVar1 * iVar3)); __ptr = (void *)*param_1; if (0 < (long)iVar3) { uVar4 = (long)iVar3 + 1; iVar3 = (iVar3 + -1) * iVar1; __dest = pvVar2; do { memcpy(__dest,(void *)((long)__ptr + (long)iVar3),(long)iVar1); uVar4 = uVar4 - 1; iVar3 = iVar3 - iVar1; __dest = (void *)((long)__dest + (long)iVar1); } while (1 < uVar4); } free(__ptr); *param_1 = (long)pvVar2; } return; }
28,672
psi_cond_wait
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_cond_wait(mysql_cond_t *that, mysql_mutex_t *mutex, const char *file, uint line) { PSI_cond_locker_state state; PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait) (&state, that->m_psi, mutex->m_psi, PSI_COND_WAIT, file, line); int result= my_cond_wait(&that->m_cond, &mutex->m_mutex); if (locker) PSI_COND_CALL(end_cond_wait)(locker, result); return result; }
O0
c
psi_cond_wait: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) leaq 0x1c97fa(%rip), %rax # 0x2c1238 movq (%rax), %rax movq 0x1c0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rsi movq -0x10(%rbp), %rcx movq 0x40(%rcx), %rdx movq -0x18(%rbp), %r8 movl -0x1c(%rbp), %r9d leaq -0x58(%rbp), %rdi xorl %ecx, %ecx callq *%rax movq %rax, -0x60(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x2a400 movl %eax, -0x64(%rbp) cmpq $0x0, -0x60(%rbp) je 0xf7a9d leaq 0x1c97ae(%rip), %rax # 0x2c1238 movq (%rax), %rax movq 0x1c8(%rax), %rax movq -0x60(%rbp), %rdi movl -0x64(%rbp), %esi callq *%rax movl -0x64(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_cond_wait: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C0h] mov rcx, [rbp+var_8] mov rsi, [rcx+30h] mov rcx, [rbp+var_10] mov rdx, [rcx+40h] mov r8, [rbp+var_18] mov r9d, [rbp+var_1C] lea rdi, [rbp+var_58] xor ecx, ecx call rax mov [rbp+var_60], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _pthread_cond_wait mov [rbp+var_64], eax cmp [rbp+var_60], 0 jz short loc_F7A9D lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C8h] mov rdi, [rbp+var_60] mov esi, [rbp+var_64] call rax loc_F7A9D: mov eax, [rbp+var_64] add rsp, 70h pop rbp retn
long long psi_cond_wait(long long a1, long long a2, long long a3, unsigned int a4) { unsigned int v5; // [rsp+Ch] [rbp-64h] long long v6; // [rsp+10h] [rbp-60h] _BYTE v7[60]; // [rsp+18h] [rbp-58h] BYREF unsigned int v8; // [rsp+54h] [rbp-1Ch] long long v9; // [rsp+58h] [rbp-18h] long long v10; // [rsp+60h] [rbp-10h] long long v11; // [rsp+68h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v6 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, _QWORD, long long, _QWORD))PSI_server[56])( v7, *(_QWORD *)(a1 + 48), *(_QWORD *)(a2 + 64), 0LL, a3, a4); v5 = pthread_cond_wait(v11, v10); if ( v6 ) ((void ( *)(long long, _QWORD))PSI_server[57])(v6, v5); return v5; }
psi_cond_wait: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX LEA RAX,[0x3c1238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x40] MOV R8,qword ptr [RBP + -0x18] MOV R9D,dword ptr [RBP + -0x1c] LEA RDI,[RBP + -0x58] XOR ECX,ECX CALL RAX MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0012a400 MOV dword ptr [RBP + -0x64],EAX CMP qword ptr [RBP + -0x60],0x0 JZ 0x001f7a9d LEA RAX,[0x3c1238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c8] MOV RDI,qword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + -0x64] CALL RAX LAB_001f7a9d: MOV EAX,dword ptr [RBP + -0x64] ADD RSP,0x70 POP RBP RET
int psi_cond_wait(pthread_cond_t *param_1,pthread_mutex_t *param_2,int8 param_3, int4 param_4) { int iVar1; long lVar2; int1 local_60 [60]; int4 local_24; int8 local_20; pthread_mutex_t *local_18; pthread_cond_t *local_10; local_24 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1c0)) (local_60,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),0,param_3, param_4); iVar1 = pthread_cond_wait(local_10,local_18); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1c8))(lVar2,iVar1); } return iVar1; }
28,673
my_get_err_msg
eloqsql/mysys/my_error.c
const char *my_get_err_msg(uint nr) { const char *format; struct my_err_head *meh_p; /* Search for the range this error is in. */ for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next) if (nr <= meh_p->meh_last) break; /* If we found the range this error number is in, get the format string. If the string is empty, or a NULL pointer, or if we're out of return, we return NULL. */ if (!(format= (meh_p && (nr >= meh_p->meh_first)) ? meh_p->get_errmsgs(nr)[nr - meh_p->meh_first] : NULL) || !*format) return NULL; return format; }
O0
c
my_get_err_msg: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0xc(%rbp) movq 0x19ef16(%rip), %rax # 0x1cc978 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x2da8a movl -0xc(%rbp), %eax movq -0x20(%rbp), %rcx cmpl 0x14(%rcx), %eax ja 0x2da7b jmp 0x2da8a jmp 0x2da7d movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x2da66 cmpq $0x0, -0x20(%rbp) je 0x2dac0 movl -0xc(%rbp), %eax movq -0x20(%rbp), %rcx cmpl 0x10(%rcx), %eax jb 0x2dac0 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl -0xc(%rbp), %edi callq *%rax movl -0xc(%rbp), %ecx movq -0x20(%rbp), %rdx subl 0x10(%rdx), %ecx movl %ecx, %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) jmp 0x2dac8 xorl %eax, %eax movq %rax, -0x28(%rbp) jmp 0x2dac8 movq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax je 0x2dadf movq -0x18(%rbp), %rax cmpb $0x0, (%rax) jne 0x2dae9 movq $0x0, -0x8(%rbp) jmp 0x2daf1 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_get_err_msg: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_C], edi mov rax, cs:my_errmsgs_list mov [rbp+var_20], rax loc_2DA66: cmp [rbp+var_20], 0 jz short loc_2DA8A mov eax, [rbp+var_C] mov rcx, [rbp+var_20] cmp eax, [rcx+14h] ja short loc_2DA7B jmp short loc_2DA8A loc_2DA7B: jmp short $+2 loc_2DA7D: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_20], rax jmp short loc_2DA66 loc_2DA8A: cmp [rbp+var_20], 0 jz short loc_2DAC0 mov eax, [rbp+var_C] mov rcx, [rbp+var_20] cmp eax, [rcx+10h] jb short loc_2DAC0 mov rax, [rbp+var_20] mov rax, [rax+8] mov edi, [rbp+var_C] call rax mov ecx, [rbp+var_C] mov rdx, [rbp+var_20] sub ecx, [rdx+10h] mov ecx, ecx mov rax, [rax+rcx*8] mov [rbp+var_28], rax jmp short loc_2DAC8 loc_2DAC0: xor eax, eax mov [rbp+var_28], rax jmp short $+2 loc_2DAC8: mov rax, [rbp+var_28] mov [rbp+var_18], rax cmp rax, 0 jz short loc_2DADF mov rax, [rbp+var_18] cmp byte ptr [rax], 0 jnz short loc_2DAE9 loc_2DADF: mov [rbp+var_8], 0 jmp short loc_2DAF1 loc_2DAE9: mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_2DAF1: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
_BYTE * my_get_err_msg(unsigned int a1) { _BYTE *v2; // [rsp+8h] [rbp-28h] long long *i; // [rsp+10h] [rbp-20h] for ( i = my_errmsgs_list; i && a1 > *((_DWORD *)i + 5); i = (long long *)*i ) ; if ( i && a1 >= *((_DWORD *)i + 4) ) v2 = *(_BYTE **)(((long long ( *)(_QWORD))i[1])(a1) + 8LL * (a1 - *((_DWORD *)i + 4))); else v2 = 0LL; if ( v2 && *v2 ) return v2; else return 0LL; }
my_get_err_msg: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0xc],EDI MOV RAX,qword ptr [0x002cc978] MOV qword ptr [RBP + -0x20],RAX LAB_0012da66: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0012da8a MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x20] CMP EAX,dword ptr [RCX + 0x14] JA 0x0012da7b JMP 0x0012da8a LAB_0012da7b: JMP 0x0012da7d LAB_0012da7d: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x0012da66 LAB_0012da8a: CMP qword ptr [RBP + -0x20],0x0 JZ 0x0012dac0 MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x20] CMP EAX,dword ptr [RCX + 0x10] JC 0x0012dac0 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV EDI,dword ptr [RBP + -0xc] CALL RAX MOV ECX,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x20] SUB ECX,dword ptr [RDX + 0x10] MOV ECX,ECX MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX JMP 0x0012dac8 LAB_0012dac0: XOR EAX,EAX MOV qword ptr [RBP + -0x28],RAX JMP 0x0012dac8 LAB_0012dac8: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JZ 0x0012dadf MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX],0x0 JNZ 0x0012dae9 LAB_0012dadf: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012daf1 LAB_0012dae9: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_0012daf1: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * my_get_err_msg(uint param_1) { long lVar1; char *local_30; int8 *local_28; char *local_10; for (local_28 = (int8 *)my_errmsgs_list; (local_28 != (int8 *)0x0 && (*(uint *)((long)local_28 + 0x14) < param_1)); local_28 = (int8 *)*local_28) { } if ((local_28 == (int8 *)0x0) || (param_1 < *(uint *)(local_28 + 2))) { local_30 = (char *)0x0; } else { lVar1 = (*(code *)local_28[1])(param_1); local_30 = *(char **)(lVar1 + (ulong)(param_1 - *(int *)(local_28 + 2)) * 8); } if ((local_30 == (char *)0x0) || (*local_30 == '\0')) { local_10 = (char *)0x0; } else { local_10 = local_30; } return local_10; }
28,674
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O3
c
my_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0xb71d62(%rip), %rax # 0xc30620 cmpb $0x0, (%rax) je 0xbe8ca xorl %eax, %eax jmp 0xbe9b2 leaq 0xb71d53(%rip), %rcx # 0xc30624 incl (%rcx) movb $0x1, (%rax) leaq 0x2efbeb(%rip), %r14 # 0x3ae4c8 movl $0x1b0, (%r14) # imm = 0x1B0 leaq 0x2efbe1(%rip), %rbx # 0x3ae4cc movl $0x1c0, (%rbx) # imm = 0x1C0 leaq 0xb72200(%rip), %rax # 0xc30af8 movq $0x0, (%rax) leaq 0x41b55(%rip), %rdi # 0x10045b callq 0x2a6b0 testq %rax, %rax je 0xbe920 movq %rax, %rdi callq 0xbe9ee orl $0x180, %eax # imm = 0x180 movl %eax, (%r14) leaq 0x41b3a(%rip), %rdi # 0x100461 callq 0x2a6b0 testq %rax, %rax je 0xbe940 movq %rax, %rdi callq 0xbe9ee orl $0x1c0, %eax # imm = 0x1C0 movl %eax, (%rbx) callq 0xc8a08 movq 0x2ed694(%rip), %rax # 0x3abfe0 movq (%rax), %rax movq %rax, 0xb71cda(%rip) # 0xc30630 leaq 0xb71cd3(%rip), %rax # 0xc30630 movq $0x0, 0xb71cd0(%rip) # 0xc30638 leaq 0xb71cb9(%rip), %rcx # 0xc30628 movq %rax, (%rcx) leaq 0x41af2(%rip), %rax # 0x10046b leaq 0xb71d58(%rip), %r14 # 0xc306d8 movq %rax, (%r14) leaq 0xb71d46(%rip), %rax # 0xc306d0 movq (%rax), %rbx testq %rbx, %rbx je 0xbe9a0 movq %rbx, %rdi callq 0xb0158 addq %rbx, %rax movq %rax, (%r14) callq 0xc3c98 callq 0xc15e4 movl %eax, %ecx movb $0x1, %al testb %cl, %cl je 0xbe9b7 popq %rbx popq %r14 popq %rbp retq leaq 0x41226(%rip), %rdi # 0xffbe4 callq 0x2a6b0 leaq 0xb71cfe(%rip), %rbx # 0xc306c8 movq %rax, (%rbx) testq %rax, %rax je 0xbe9e4 leaq 0xb71f07(%rip), %rdi # 0xc308e0 movq %rax, %rsi callq 0xb777d movq %rax, (%rbx) callq 0xbdb3c jmp 0xbe8c3
my_init: push rbp mov rbp, rsp push r14 push rbx lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_BE8CA loc_BE8C3: xor eax, eax jmp loc_BE9B2 loc_BE8CA: lea rcx, mysys_usage_id inc dword ptr [rcx] mov byte ptr [rax], 1 lea r14, my_umask mov dword ptr [r14], 1B0h lea rbx, my_umask_dir mov dword ptr [rbx], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv test rax, rax jz short loc_BE920 mov rdi, rax call atoi_octal or eax, 180h mov [r14], eax loc_BE920: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv test rax, rax jz short loc_BE940 mov rdi, rax call atoi_octal or eax, 1C0h mov [rbx], eax loc_BE940: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax lea rax, instrumented_stdin mov cs:qword_C30638, 0 lea rcx, mysql_stdin mov [rcx], rax lea rax, aUnknown_0; "unknown" lea r14, my_progname_short mov [r14], rax lea rax, my_progname mov rbx, [rax] test rbx, rbx jz short loc_BE9A0 mov rdi, rbx call dirname_length add rax, rbx mov [r14], rax loc_BE9A0: call my_mutex_init call my_thread_global_init mov ecx, eax mov al, 1 test cl, cl jz short loc_BE9B7 loc_BE9B2: pop rbx pop r14 pop rbp retn loc_BE9B7: lea rdi, aMariadbHome+8; "HOME" call _getenv lea rbx, home_dir mov [rbx], rax test rax, rax jz short loc_BE9E4 lea rdi, home_dir_buff mov rsi, rax call intern_filename mov [rbx], rax loc_BE9E4: call my_time_init jmp loc_BE8C3
char my_init() { char result; // al long long v1; // rax long long v2; // rax const char *v3; // rbx char v4; // cl _BYTE *v5; // rax if ( my_init_done ) return 0; ++mysys_usage_id; my_init_done = 1; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v1 = getenv("UMASK"); if ( v1 ) my_umask = atoi_octal(v1) | 0x180; v2 = getenv("UMASK_DIR"); if ( v2 ) my_umask_dir = atoi_octal(v2) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_C30638 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; v3 = my_progname; if ( my_progname ) my_progname_short = &v3[dirname_length(my_progname)]; my_mutex_init(); v4 = my_thread_global_init(); result = 1; if ( !v4 ) { v5 = (_BYTE *)getenv("HOME"); home_dir = v5; if ( v5 ) home_dir = intern_filename((long long)&home_dir_buff, v5); my_time_init(); return 0; } return result; }
my_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA RAX,[0xd30620] CMP byte ptr [RAX],0x0 JZ 0x001be8ca LAB_001be8c3: XOR EAX,EAX JMP 0x001be9b2 LAB_001be8ca: LEA RCX,[0xd30624] INC dword ptr [RCX] MOV byte ptr [RAX],0x1 LEA R14,[0x4ae4c8] MOV dword ptr [R14],0x1b0 LEA RBX,[0x4ae4cc] MOV dword ptr [RBX],0x1c0 LEA RAX,[0xd30af8] MOV qword ptr [RAX],0x0 LEA RDI,[0x20045b] CALL 0x0012a6b0 TEST RAX,RAX JZ 0x001be920 MOV RDI,RAX CALL 0x001be9ee OR EAX,0x180 MOV dword ptr [R14],EAX LAB_001be920: LEA RDI,[0x200461] CALL 0x0012a6b0 TEST RAX,RAX JZ 0x001be940 MOV RDI,RAX CALL 0x001be9ee OR EAX,0x1c0 MOV dword ptr [RBX],EAX LAB_001be940: CALL 0x001c8a08 MOV RAX,qword ptr [0x004abfe0] MOV RAX,qword ptr [RAX] MOV qword ptr [0x00d30630],RAX LEA RAX,[0xd30630] MOV qword ptr [0x00d30638],0x0 LEA RCX,[0xd30628] MOV qword ptr [RCX],RAX LEA RAX,[0x20046b] LEA R14,[0xd306d8] MOV qword ptr [R14],RAX LEA RAX,[0xd306d0] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x001be9a0 MOV RDI,RBX CALL 0x001b0158 ADD RAX,RBX MOV qword ptr [R14],RAX LAB_001be9a0: CALL 0x001c3c98 CALL 0x001c15e4 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JZ 0x001be9b7 LAB_001be9b2: POP RBX POP R14 POP RBP RET LAB_001be9b7: LEA RDI,[0x1ffbe4] CALL 0x0012a6b0 LEA RBX,[0xd306c8] MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x001be9e4 LEA RDI,[0xd308e0] MOV RSI,RAX CALL 0x001b777d MOV qword ptr [RBX],RAX LAB_001be9e4: CALL 0x001bdb3c JMP 0x001be8c3
int8 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; if (my_init_done == '\0') { mysys_usage_id = mysys_usage_id + 1; my_init_done = '\x01'; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_004abfe0; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar5 + lVar1); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 != '\0') { return 1; } home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); } return 0; }
28,675
is_group
eloqsql/libmariadb/libmariadb/ma_default.c
static my_bool is_group(char *ptr, const char **groups) { while (*groups) { if (!strcmp(ptr, *groups)) return 1; groups++; } return 0; }
O0
c
is_group: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0x47dc3 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi callq 0x135f0 cmpl $0x0, %eax jne 0x47db5 movb $0x1, -0x1(%rbp) jmp 0x47dc7 movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0x47d90 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq
is_group: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi loc_47D90: mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_47DC3 mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax] call _strcmp cmp eax, 0 jnz short loc_47DB5 mov [rbp+var_1], 1 jmp short loc_47DC7 loc_47DB5: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_47D90 loc_47DC3: mov [rbp+var_1], 0 loc_47DC7: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char is_group(long long a1, _QWORD *a2) { while ( *a2 ) { if ( !(unsigned int)strcmp(a1, *a2) ) return 1; ++a2; } return 0; }
is_group: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LAB_00147d90: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x00147dc3 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] CALL 0x001135f0 CMP EAX,0x0 JNZ 0x00147db5 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00147dc7 LAB_00147db5: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x00147d90 LAB_00147dc3: MOV byte ptr [RBP + -0x1],0x0 LAB_00147dc7: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 is_group(char *param_1,long *param_2) { int iVar1; long *local_20; local_20 = param_2; while( true ) { if (*local_20 == 0) { return 0; } iVar1 = strcmp(param_1,(char *)*local_20); if (iVar1 == 0) break; local_20 = local_20 + 1; } return 1; }
28,676
ggml_compute_forward_argsort_f32
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_argsort_f32( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; GGML_TENSOR_UNARY_OP_LOCALS GGML_ASSERT(nb0 == sizeof(float)); const int ith = params->ith; const int nth = params->nth; const int64_t nr = ggml_nrows(src0); enum ggml_sort_order order = (enum ggml_sort_order) ggml_get_op_params_i32(dst, 0); for (int64_t i = ith; i < nr; i += nth) { int32_t * dst_data = (int32_t *)((char *) dst->data + i*nb1); const float * src_data = (float *)((char *) src0->data + i*nb01); for (int64_t j = 0; j < ne0; j++) { dst_data[j] = j; } // C doesn't have a functional sort, so we do a bubble sort instead for (int64_t j = 0; j < ne0; j++) { for (int64_t k = j + 1; k < ne0; k++) { if ((order == GGML_SORT_ORDER_ASC && src_data[dst_data[j]] > src_data[dst_data[k]]) || (order == GGML_SORT_ORDER_DESC && src_data[dst_data[j]] < src_data[dst_data[k]])) { int32_t tmp = dst_data[j]; dst_data[j] = dst_data[k]; dst_data[k] = tmp; } } } } }
O0
c
ggml_compute_forward_argsort_f32: subq $0xe8, %rsp movq %rdi, 0xe0(%rsp) movq %rsi, 0xd8(%rsp) movq 0xd8(%rsp), %rax movq 0x98(%rax), %rax movq %rax, 0xd0(%rsp) movq 0xd0(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0xc8(%rsp) movq 0xd0(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0xc0(%rsp) movq 0xd0(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0xb8(%rsp) movq 0xd0(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0xb0(%rsp) movq 0xd0(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0xa8(%rsp) movq 0xd0(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0xa0(%rsp) movq 0xd0(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x98(%rsp) movq 0xd0(%rsp), %rax movq 0x48(%rax), %rax movq %rax, 0x90(%rsp) movq 0xd8(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x88(%rsp) movq 0xd8(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x80(%rsp) movq 0xd8(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x78(%rsp) movq 0xd8(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0x70(%rsp) movq 0xd8(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x68(%rsp) movq 0xd8(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x60(%rsp) movq 0xd8(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x58(%rsp) movq 0xd8(%rsp), %rax movq 0x48(%rax), %rax movq %rax, 0x50(%rsp) cmpq $0x4, 0x68(%rsp) je 0x38425 leaq 0x7974f(%rip), %rdi # 0xb1b5a movl $0x2a0c, %esi # imm = 0x2A0C leaq 0x7979a(%rip), %rdx # 0xb1bb1 leaq 0x79cc8(%rip), %rcx # 0xb20e6 movb $0x0, %al callq 0xd030 movq 0xe0(%rsp), %rax movl (%rax), %eax movl %eax, 0x4c(%rsp) movq 0xe0(%rsp), %rax movl 0x4(%rax), %eax movl %eax, 0x48(%rsp) movq 0xd0(%rsp), %rdi callq 0xcae0 movq %rax, 0x40(%rsp) movq 0xd8(%rsp), %rdi xorl %esi, %esi callq 0x18fd0 movl %eax, 0x3c(%rsp) movslq 0x4c(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax cmpq 0x40(%rsp), %rax jge 0x38633 movq 0xd8(%rsp), %rax movq 0xf8(%rax), %rax movq 0x30(%rsp), %rcx imulq 0x60(%rsp), %rcx addq %rcx, %rax movq %rax, 0x28(%rsp) movq 0xd0(%rsp), %rax movq 0xf8(%rax), %rax movq 0x30(%rsp), %rcx imulq 0xa0(%rsp), %rcx addq %rcx, %rax movq %rax, 0x20(%rsp) movq $0x0, 0x18(%rsp) movq 0x18(%rsp), %rax cmpq 0x88(%rsp), %rax jge 0x38504 movq 0x18(%rsp), %rax movl %eax, %edx movq 0x28(%rsp), %rax movq 0x18(%rsp), %rcx movl %edx, (%rax,%rcx,4) movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) jmp 0x384d1 movq $0x0, 0x10(%rsp) movq 0x10(%rsp), %rax cmpq 0x88(%rsp), %rax jge 0x3861d movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax cmpq 0x88(%rsp), %rax jge 0x38608 cmpl $0x0, 0x3c(%rsp) jne 0x3857a movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x10(%rsp), %rdx movslq (%rcx,%rdx,4), %rcx vmovss (%rax,%rcx,4), %xmm0 movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x8(%rsp), %rdx movslq (%rcx,%rdx,4), %rcx vucomiss (%rax,%rcx,4), %xmm0 ja 0x385b7 cmpl $0x1, 0x3c(%rsp) jne 0x385f3 movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x10(%rsp), %rdx movslq (%rcx,%rdx,4), %rcx vmovss (%rax,%rcx,4), %xmm1 movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x8(%rsp), %rdx movslq (%rcx,%rdx,4), %rcx vmovss (%rax,%rcx,4), %xmm0 vucomiss %xmm1, %xmm0 jbe 0x385f3 movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x4(%rsp) movq 0x28(%rsp), %rax movq 0x8(%rsp), %rcx movl (%rax,%rcx,4), %edx movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x4(%rsp), %edx movq 0x28(%rsp), %rax movq 0x8(%rsp), %rcx movl %edx, (%rax,%rcx,4) jmp 0x385f5 movq 0x8(%rsp), %rax addq $0x1, %rax movq %rax, 0x8(%rsp) jmp 0x3852e jmp 0x3860a movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0x3850d jmp 0x3861f movslq 0x48(%rsp), %rax addq 0x30(%rsp), %rax movq %rax, 0x30(%rsp) jmp 0x38471 addq $0xe8, %rsp retq nopl (%rax,%rax)
ggml_compute_forward_argsort_f32: sub rsp, 0E8h mov [rsp+0E8h+var_8], rdi mov [rsp+0E8h+var_10], rsi mov rax, [rsp+0E8h+var_10] mov rax, [rax+98h] mov [rsp+0E8h+var_18], rax mov rax, [rsp+0E8h+var_18] mov rax, [rax+10h] mov [rsp+0E8h+var_20], rax mov rax, [rsp+0E8h+var_18] mov rax, [rax+18h] mov [rsp+0E8h+var_28], rax mov rax, [rsp+0E8h+var_18] mov rax, [rax+20h] mov [rsp+0E8h+var_30], rax mov rax, [rsp+0E8h+var_18] mov rax, [rax+28h] mov [rsp+0E8h+var_38], rax mov rax, [rsp+0E8h+var_18] mov rax, [rax+30h] mov [rsp+0E8h+var_40], rax mov rax, [rsp+0E8h+var_18] mov rax, [rax+38h] mov [rsp+0E8h+var_48], rax mov rax, [rsp+0E8h+var_18] mov rax, [rax+40h] mov [rsp+0E8h+var_50], rax mov rax, [rsp+0E8h+var_18] mov rax, [rax+48h] mov [rsp+0E8h+var_58], rax mov rax, [rsp+0E8h+var_10] mov rax, [rax+10h] mov [rsp+0E8h+var_60], rax mov rax, [rsp+0E8h+var_10] mov rax, [rax+18h] mov [rsp+0E8h+var_68], rax mov rax, [rsp+0E8h+var_10] mov rax, [rax+20h] mov [rsp+0E8h+var_70], rax mov rax, [rsp+0E8h+var_10] mov rax, [rax+28h] mov [rsp+0E8h+var_78], rax mov rax, [rsp+0E8h+var_10] mov rax, [rax+30h] mov [rsp+0E8h+var_80], rax mov rax, [rsp+0E8h+var_10] mov rax, [rax+38h] mov [rsp+0E8h+var_88], rax mov rax, [rsp+0E8h+var_10] mov rax, [rax+40h] mov [rsp+0E8h+var_90], rax mov rax, [rsp+0E8h+var_10] mov rax, [rax+48h] mov [rsp+0E8h+var_98], rax cmp [rsp+0E8h+var_80], 4 jz short loc_38425 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 2A0Ch lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNb0SizeofFloat; "nb0 == sizeof(float)" mov al, 0 call _ggml_abort loc_38425: mov rax, [rsp+0E8h+var_8] mov eax, [rax] mov [rsp+0E8h+var_9C], eax mov rax, [rsp+0E8h+var_8] mov eax, [rax+4] mov [rsp+0E8h+var_A0], eax mov rdi, [rsp+0E8h+var_18] call _ggml_nrows mov [rsp+0E8h+var_A8], rax mov rdi, [rsp+0E8h+var_10] xor esi, esi call ggml_get_op_params_i32 mov [rsp+0E8h+var_AC], eax movsxd rax, [rsp+0E8h+var_9C] mov [rsp+0E8h+var_B8], rax loc_38471: mov rax, [rsp+0E8h+var_B8] cmp rax, [rsp+0E8h+var_A8] jge loc_38633 mov rax, [rsp+0E8h+var_10] mov rax, [rax+0F8h] mov rcx, [rsp+0E8h+var_B8] imul rcx, [rsp+0E8h+var_88] add rax, rcx mov [rsp+0E8h+var_C0], rax mov rax, [rsp+0E8h+var_18] mov rax, [rax+0F8h] mov rcx, [rsp+0E8h+var_B8] imul rcx, [rsp+0E8h+var_48] add rax, rcx mov [rsp+0E8h+var_C8], rax mov [rsp+0E8h+var_D0], 0 loc_384D1: mov rax, [rsp+0E8h+var_D0] cmp rax, [rsp+0E8h+var_60] jge short loc_38504 mov rax, [rsp+0E8h+var_D0] mov edx, eax mov rax, [rsp+0E8h+var_C0] mov rcx, [rsp+0E8h+var_D0] mov [rax+rcx*4], edx mov rax, [rsp+0E8h+var_D0] add rax, 1 mov [rsp+0E8h+var_D0], rax jmp short loc_384D1 loc_38504: mov [rsp+0E8h+var_D8], 0 loc_3850D: mov rax, [rsp+0E8h+var_D8] cmp rax, [rsp+0E8h+var_60] jge loc_3861D mov rax, [rsp+0E8h+var_D8] add rax, 1 mov [rsp+0E8h+var_E0], rax loc_3852E: mov rax, [rsp+0E8h+var_E0] cmp rax, [rsp+0E8h+var_60] jge loc_38608 cmp [rsp+0E8h+var_AC], 0 jnz short loc_3857A mov rax, [rsp+0E8h+var_C8] mov rcx, [rsp+0E8h+var_C0] mov rdx, [rsp+0E8h+var_D8] movsxd rcx, dword ptr [rcx+rdx*4] vmovss xmm0, dword ptr [rax+rcx*4] mov rax, [rsp+0E8h+var_C8] mov rcx, [rsp+0E8h+var_C0] mov rdx, [rsp+0E8h+var_E0] movsxd rcx, dword ptr [rcx+rdx*4] vucomiss xmm0, dword ptr [rax+rcx*4] ja short loc_385B7 loc_3857A: cmp [rsp+0E8h+var_AC], 1 jnz short loc_385F3 mov rax, [rsp+0E8h+var_C8] mov rcx, [rsp+0E8h+var_C0] mov rdx, [rsp+0E8h+var_D8] movsxd rcx, dword ptr [rcx+rdx*4] vmovss xmm1, dword ptr [rax+rcx*4] mov rax, [rsp+0E8h+var_C8] mov rcx, [rsp+0E8h+var_C0] mov rdx, [rsp+0E8h+var_E0] movsxd rcx, dword ptr [rcx+rdx*4] vmovss xmm0, dword ptr [rax+rcx*4] vucomiss xmm0, xmm1 jbe short loc_385F3 loc_385B7: mov rax, [rsp+0E8h+var_C0] mov rcx, [rsp+0E8h+var_D8] mov eax, [rax+rcx*4] mov [rsp+0E8h+var_E4], eax mov rax, [rsp+0E8h+var_C0] mov rcx, [rsp+0E8h+var_E0] mov edx, [rax+rcx*4] mov rax, [rsp+0E8h+var_C0] mov rcx, [rsp+0E8h+var_D8] mov [rax+rcx*4], edx mov edx, [rsp+0E8h+var_E4] mov rax, [rsp+0E8h+var_C0] mov rcx, [rsp+0E8h+var_E0] mov [rax+rcx*4], edx loc_385F3: jmp short $+2 loc_385F5: mov rax, [rsp+0E8h+var_E0] add rax, 1 mov [rsp+0E8h+var_E0], rax jmp loc_3852E loc_38608: jmp short $+2 loc_3860A: mov rax, [rsp+0E8h+var_D8] add rax, 1 mov [rsp+0E8h+var_D8], rax jmp loc_3850D loc_3861D: jmp short $+2 loc_3861F: movsxd rax, [rsp+0E8h+var_A0] add rax, [rsp+0E8h+var_B8] mov [rsp+0E8h+var_B8], rax jmp loc_38471 loc_38633: add rsp, 0E8h retn
long long ggml_compute_forward_argsort_f32(int *a1, _QWORD *a2) { long long result; // rax long long m; // [rsp+8h] [rbp-E0h] long long k; // [rsp+10h] [rbp-D8h] long long j; // [rsp+18h] [rbp-D0h] long long v17; // [rsp+20h] [rbp-C8h] long long v18; // [rsp+28h] [rbp-C0h] long long i; // [rsp+30h] [rbp-B8h] int op_params_i32; // [rsp+3Ch] [rbp-ACh] long long v21; // [rsp+40h] [rbp-A8h] int v22; // [rsp+48h] [rbp-A0h] int v23; // [rsp+4Ch] [rbp-9Ch] long long v24; // [rsp+60h] [rbp-88h] long long v25; // [rsp+88h] [rbp-60h] long long v26; // [rsp+A0h] [rbp-48h] long long v27; // [rsp+D0h] [rbp-18h] v27 = a2[19]; v26 = *(_QWORD *)(v27 + 56); v25 = a2[2]; v24 = a2[7]; if ( a2[6] != 4LL ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 10764LL, "GGML_ASSERT(%s) failed", "nb0 == sizeof(float)"); v23 = *a1; v22 = a1[1]; v21 = ggml_nrows(v27); op_params_i32 = ggml_get_op_params_i32((long long)a2, 0); for ( i = v23; ; i += v22 ) { result = i; if ( i >= v21 ) break; v18 = v24 * i + a2[31]; v17 = v26 * i + *(_QWORD *)(v27 + 248); for ( j = 0LL; j < v25; ++j ) *(_DWORD *)(v18 + 4 * j) = j; for ( k = 0LL; k < v25; ++k ) { for ( m = k + 1; m < v25; ++m ) { if ( !op_params_i32 ) { _RAX = v17; _RCX = *(int *)(v18 + 4 * k); __asm { vmovss xmm0, dword ptr [rax+rcx*4] } _RAX = v17; _RCX = *(int *)(v18 + 4 * m); __asm { vucomiss xmm0, dword ptr [rax+rcx*4] } } if ( op_params_i32 == 1 ) { _RAX = v17; _RCX = *(int *)(v18 + 4 * k); __asm { vmovss xmm1, dword ptr [rax+rcx*4] } _RAX = v17; _RCX = *(int *)(v18 + 4 * m); __asm { vmovss xmm0, dword ptr [rax+rcx*4] vucomiss xmm0, xmm1 } } } } } return result; }
ggml_compute_forward_argsort_f32: SUB RSP,0xe8 MOV qword ptr [RSP + 0xe0],RDI MOV qword ptr [RSP + 0xd8],RSI MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0xc8],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RSP + 0x50],RAX CMP qword ptr [RSP + 0x68],0x4 JZ 0x00138425 LEA RDI,[0x1b1b5a] MOV ESI,0x2a0c LEA RDX,[0x1b1bb1] LEA RCX,[0x1b20e6] MOV AL,0x0 CALL 0x0010d030 LAB_00138425: MOV RAX,qword ptr [RSP + 0xe0] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x4c],EAX MOV RAX,qword ptr [RSP + 0xe0] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0x48],EAX MOV RDI,qword ptr [RSP + 0xd0] CALL 0x0010cae0 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0xd8] XOR ESI,ESI CALL 0x00118fd0 MOV dword ptr [RSP + 0x3c],EAX MOVSXD RAX,dword ptr [RSP + 0x4c] MOV qword ptr [RSP + 0x30],RAX LAB_00138471: MOV RAX,qword ptr [RSP + 0x30] CMP RAX,qword ptr [RSP + 0x40] JGE 0x00138633 MOV RAX,qword ptr [RSP + 0xd8] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RSP + 0x30] IMUL RCX,qword ptr [RSP + 0x60] ADD RAX,RCX MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0xd0] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RSP + 0x30] IMUL RCX,qword ptr [RSP + 0xa0] ADD RAX,RCX MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x18],0x0 LAB_001384d1: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0x88] JGE 0x00138504 MOV RAX,qword ptr [RSP + 0x18] MOV EDX,EAX MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + RCX*0x4],EDX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX JMP 0x001384d1 LAB_00138504: MOV qword ptr [RSP + 0x10],0x0 LAB_0013850d: MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RSP + 0x88] JGE 0x0013861d MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x8],RAX LAB_0013852e: MOV RAX,qword ptr [RSP + 0x8] CMP RAX,qword ptr [RSP + 0x88] JGE 0x00138608 CMP dword ptr [RSP + 0x3c],0x0 JNZ 0x0013857a MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RCX + RDX*0x4] VMOVSS XMM0,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RCX + RDX*0x4] VUCOMISS XMM0,dword ptr [RAX + RCX*0x4] JA 0x001385b7 LAB_0013857a: CMP dword ptr [RSP + 0x3c],0x1 JNZ 0x001385f3 MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RCX + RDX*0x4] VMOVSS XMM1,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RCX + RDX*0x4] VMOVSS XMM0,dword ptr [RAX + RCX*0x4] VUCOMISS XMM0,XMM1 JBE 0x001385f3 LAB_001385b7: MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x4],EAX MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + RCX*0x4],EDX MOV EDX,dword ptr [RSP + 0x4] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + RCX*0x4],EDX LAB_001385f3: JMP 0x001385f5 LAB_001385f5: MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x1 MOV qword ptr [RSP + 0x8],RAX JMP 0x0013852e LAB_00138608: JMP 0x0013860a LAB_0013860a: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX JMP 0x0013850d LAB_0013861d: JMP 0x0013861f LAB_0013861f: MOVSXD RAX,dword ptr [RSP + 0x48] ADD RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x30],RAX JMP 0x00138471 LAB_00138633: ADD RSP,0xe8 RET
void ggml_compute_forward_argsort_f32(int *param_1,long param_2) { int iVar1; int iVar2; int4 uVar3; long lVar4; long lVar5; long lVar6; long lVar7; int iVar8; long lVar9; long lVar10; long lVar11; long local_e0; long local_d8; long local_d0; long local_b8; lVar4 = *(long *)(param_2 + 0x98); lVar5 = *(long *)(lVar4 + 0x38); lVar6 = *(long *)(param_2 + 0x10); lVar7 = *(long *)(param_2 + 0x38); if (*(long *)(param_2 + 0x30) == 4) { iVar1 = *param_1; iVar2 = param_1[1]; lVar9 = ggml_nrows(lVar4); iVar8 = ggml_get_op_params_i32(param_2,0); for (local_b8 = (long)iVar1; local_b8 < lVar9; local_b8 = iVar2 + local_b8) { lVar10 = *(long *)(param_2 + 0xf8) + local_b8 * lVar7; lVar11 = *(long *)(lVar4 + 0xf8) + local_b8 * lVar5; for (local_d0 = 0; local_d0 < lVar6; local_d0 = local_d0 + 1) { *(int *)(lVar10 + local_d0 * 4) = (int)local_d0; } for (local_d8 = 0; local_e0 = local_d8, local_d8 < lVar6; local_d8 = local_d8 + 1) { while (local_e0 = local_e0 + 1, local_e0 < lVar6) { if (((iVar8 == 0) && (*(float *)(lVar11 + (long)*(int *)(lVar10 + local_e0 * 4) * 4) < *(float *)(lVar11 + (long)*(int *)(lVar10 + local_d8 * 4) * 4))) || ((iVar8 == 1 && (*(float *)(lVar11 + (long)*(int *)(lVar10 + local_d8 * 4) * 4) < *(float *)(lVar11 + (long)*(int *)(lVar10 + local_e0 * 4) * 4))))) { uVar3 = *(int4 *)(lVar10 + local_d8 * 4); *(int4 *)(lVar10 + local_d8 * 4) = *(int4 *)(lVar10 + local_e0 * 4); *(int4 *)(lVar10 + local_e0 * 4) = uVar3; } } } } return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2a0c,"GGML_ASSERT(%s) failed","nb0 == sizeof(float)"); }
28,677
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(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>&)
llama.cpp/common/json.hpp
static ReferenceType get_ref_impl(ThisType& obj) { // delegate the call to get_ptr<>() auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); if (JSON_HEDLEY_LIKELY(ptr != nullptr)) { return *ptr; } JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj)); }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0xd12b8 movq 0x8(%r14), %rax testq %rax, %rax je 0xd12b8 addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x20650 movq %rax, %rbx movq %r14, %rdi callq 0x8a248 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x4eaa5(%rip), %rsi # 0x11fd81 leaq 0x10(%rsp), %rdi callq 0xc8ba2 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12f, %esi # imm = 0x12F movq %r14, %rcx callq 0x8a070 xorl %ebp, %ebp leaq 0x8ed39(%rip), %rsi # 0x160040 leaq -0x5b1f6(%rip), %rdx # 0x76118 movq %rbx, %rdi callq 0x20a50 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xd1334 movq 0x20(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xd133e jmp 0xd1346 movq %rax, %r14 movq %rbx, %rdi callq 0x20f10 movq %r14, %rdi callq 0x20af0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_: push rbp; void * push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_D12B8 mov rax, [r14+8] test rax, rax jz short loc_D12B8 add rsp, 30h pop rbx pop r14 pop rbp retn loc_D12B8: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Fh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_D1334 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D1334: test bpl, bpl jnz short loc_D133E jmp short loc_D1346 mov r14, rax loc_D133E: mov rdi, rbx; void * call ___cxa_free_exception loc_D1346: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( long long a1) { long long result; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v3; // [rsp+8h] [rbp-40h] BYREF _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); 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>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>( (long long)v4, (long long)"incompatible ReferenceType for get_ref, actual type is ", &v3); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 303, v4); __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); } return result; }
get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x001d12b8 MOV RAX,qword ptr [R14 + 0x8] TEST RAX,RAX JZ 0x001d12b8 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001d12b8: MOV EDI,0x20 CALL 0x00120650 MOV RBX,RAX MOV RDI,R14 CALL 0x0018a248 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001d12d5: LEA RSI,[0x21fd81] LEA RDI,[RSP + 0x10] CALL 0x001c8ba2 MOV BPL,0x1 LAB_001d12e9: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12f MOV RCX,R14 CALL 0x0018a070 XOR EBP,EBP LEA RSI,[0x260040] LEA RDX,[0x176118] MOV RDI,RBX CALL 0x00120a50
/* std::__cxx11::string& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::get_ref_impl<std::__cxx11::string&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(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>&) */ string * nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) { return *(string **)(param_1 + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name((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); /* try { // try from 001d12d5 to 001d12e5 has its CatchHandler @ 001d133b */ detail::concat<std::__cxx11::string,char_const(&)[56],char_const*> (local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40); /* try { // try from 001d12e9 to 001d1315 has its CatchHandler @ 001d1316 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x12f,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
28,678
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/sampling.cpp
std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) { std::vector<int> idxs(draft.size() + 1); for (size_t i = 0; i < idxs.size(); ++i) { idxs[i] = i; } return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first); }
O0
cpp
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool): subq $0x98, %rsp movq %rdi, 0x18(%rsp) movb %r8b, %al movq %rdi, %r8 movq %r8, 0x20(%rsp) movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq %rdx, 0x80(%rsp) movq %rcx, 0x78(%rsp) andb $0x1, %al movb %al, 0x77(%rsp) movq 0x78(%rsp), %rdi callq 0x61cc0 incq %rax movq %rax, 0x28(%rsp) leaq 0x57(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x61bb0 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x58(%rsp), %rdi callq 0xf81b0 jmp 0x1c3071 leaq 0x57(%rsp), %rdi callq 0x61cb0 movq $0x0, 0x38(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x58(%rsp), %rdi callq 0x61cc0 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax jae 0x1c30ed movq 0x38(%rsp), %rax movl %eax, 0xc(%rsp) movq 0x38(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x61ce0 movl 0xc(%rsp), %ecx movl %ecx, (%rax) movq 0x38(%rsp), %rax addq $0x1, %rax movq %rax, 0x38(%rsp) jmp 0x1c3084 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x57(%rsp), %rdi callq 0x61cb0 jmp 0x1c314c movq 0x18(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x80(%rsp), %rdx movq 0x78(%rsp), %r8 movzbl 0x77(%rsp), %r9d andl $0x1, %r9d leaq 0x58(%rsp), %rcx callq 0x1c2d70 jmp 0x1c311d leaq 0x58(%rsp), %rdi callq 0x61c50 movq 0x20(%rsp), %rax addq $0x98, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x58(%rsp), %rdi callq 0x61c50 movq 0x48(%rsp), %rdi callq 0x5aba0 nopw %cs:(%rax,%rax)
_Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb: sub rsp, 98h mov [rsp+98h+var_80], rdi mov al, r8b mov r8, rdi mov [rsp+98h+var_78], r8 mov [rsp+98h+var_8], rdi mov [rsp+98h+var_10], rsi mov [rsp+98h+var_18], rdx mov [rsp+98h+var_20], rcx and al, 1 mov [rsp+98h+var_21], al mov rdi, [rsp+98h+var_20] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) inc rax mov [rsp+98h+var_70], rax lea rdi, [rsp+98h+var_41] mov [rsp+98h+var_68], rdi call _ZNSaIiEC2Ev; std::allocator<int>::allocator(void) mov rsi, [rsp+98h+var_70] mov rdx, [rsp+98h+var_68] lea rdi, [rsp+98h+var_40] call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&) jmp short $+2 loc_1C3071: lea rdi, [rsp+98h+var_41] call _ZNSaIiED2Ev; std::allocator<int>::~allocator() mov [rsp+98h+var_60], 0 loc_1C3084: mov rax, [rsp+98h+var_60] mov [rsp+98h+var_88], rax lea rdi, [rsp+98h+var_40] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov rcx, rax mov rax, [rsp+98h+var_88] cmp rax, rcx jnb short loc_1C30ED mov rax, [rsp+98h+var_60] mov [rsp+98h+var_8C], eax mov rsi, [rsp+98h+var_60] lea rdi, [rsp+98h+var_40] call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov ecx, [rsp+98h+var_8C] mov [rax], ecx mov rax, [rsp+98h+var_60] add rax, 1 mov [rsp+98h+var_60], rax jmp short loc_1C3084 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_4F] call _ZNSaIiED2Ev; std::allocator<int>::~allocator() jmp short loc_1C314C loc_1C30ED: mov rdi, [rsp+98h+var_80] mov rsi, [rsp+98h+var_10] mov rdx, [rsp+98h+var_18] mov r8, [rsp+98h+var_20] movzx r9d, [rsp+98h+var_21] and r9d, 1 lea rcx, [rsp+98h+var_40] call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool) jmp short $+2 loc_1C311D: lea rdi, [rsp+98h+var_40] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rax, [rsp+98h+var_78] add rsp, 98h retn mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_50] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() loc_1C314C: mov rdi, [rsp+arg_40] call __Unwind_Resume
long long common_sampler_sample_and_accept_n(long long a1, common_sampler *a2, long long a3, _QWORD *a4, char a5) { unsigned long long v6; // [rsp+28h] [rbp-70h] unsigned long long i; // [rsp+38h] [rbp-60h] char v8; // [rsp+57h] [rbp-41h] BYREF long long v9[3]; // [rsp+58h] [rbp-40h] BYREF char v10; // [rsp+77h] [rbp-21h] _QWORD *v11; // [rsp+78h] [rbp-20h] long long v12; // [rsp+80h] [rbp-18h] common_sampler *v13; // [rsp+88h] [rbp-10h] long long v14; // [rsp+90h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v10 = a5 & 1; v6 = std::vector<int>::size(a4) + 1; std::allocator<int>::allocator((long long)&v8); std::vector<int>::vector((long long)v9, v6, (long long)&v8); std::allocator<int>::~allocator((long long)&v8); for ( i = 0LL; i < std::vector<int>::size(v9); ++i ) *(_DWORD *)std::vector<int>::operator[](v9, i) = i; common_sampler_sample_and_accept_n(a1, v13, v12, v9, v11, v10 & 1); std::vector<int>::~vector(v9); return a1; }
28,679
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/sampling.cpp
std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) { std::vector<int> idxs(draft.size() + 1); for (size_t i = 0; i < idxs.size(); ++i) { idxs[i] = i; } return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first); }
O3
cpp
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq 0x8(%rcx), %rsi subq (%rcx), %rsi sarq $0x2, %rsi incq %rsi leaq 0x10(%rsp), %r13 leaq 0xf(%rsp), %rdx movq %r13, %rdi callq 0x78ccc movq (%r13), %rax movq 0x8(%r13), %rdx subq %rax, %rdx je 0xcd624 sarq $0x2, %rdx cmpq $0x1, %rdx adcq $0x0, %rdx leaq 0x1(%rdx), %rcx andq $-0x2, %rcx decq %rdx movq %rdx, %xmm0 pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1] movdqa 0x17a5e(%rip), %xmm1 # 0xe5010 xorl %edx, %edx movdqa 0x17a64(%rip), %xmm2 # 0xe5020 pxor %xmm2, %xmm0 pcmpeqd %xmm3, %xmm3 movdqa 0x17a64(%rip), %xmm4 # 0xe5030 movdqa %xmm1, %xmm5 pxor %xmm2, %xmm5 movdqa %xmm5, %xmm6 pcmpgtd %xmm0, %xmm6 pcmpeqd %xmm0, %xmm5 pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3] pand %xmm6, %xmm7 pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3] por %xmm7, %xmm5 movd %xmm5, %esi notl %esi testb $0x1, %sil je 0xcd601 movl %edx, (%rax,%rdx,4) pxor %xmm3, %xmm5 pextrw $0x4, %xmm5, %esi testb $0x1, %sil je 0xcd617 leal 0x1(%rdx), %esi movl %esi, 0x4(%rax,%rdx,4) addq $0x2, %rdx paddq %xmm4, %xmm1 cmpq %rdx, %rcx jne 0xcd5cc movzbl %bpl, %r9d leaq 0x10(%rsp), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %r8 callq 0xcd3a5 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xcd655 movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x1a8c0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xcd681 movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x1a8c0 movq %rbx, %rdi callq 0x1af80
_Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, r8d mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov rsi, [rcx+8] sub rsi, [rcx] sar rsi, 2 inc rsi lea r13, [rsp+58h+var_48] lea rdx, [rsp+58h+var_49] mov rdi, r13 call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&) mov rax, [r13+0] mov rdx, [r13+8] sub rdx, rax jz loc_CD624 sar rdx, 2 cmp rdx, 1 adc rdx, 0 lea rcx, [rdx+1] and rcx, 0FFFFFFFFFFFFFFFEh dec rdx movq xmm0, rdx pshufd xmm0, xmm0, 44h ; 'D' movdqa xmm1, cs:xmmword_E5010 xor edx, edx movdqa xmm2, cs:xmmword_E5020 pxor xmm0, xmm2 pcmpeqd xmm3, xmm3 movdqa xmm4, cs:xmmword_E5030 loc_CD5CC: movdqa xmm5, xmm1 pxor xmm5, xmm2 movdqa xmm6, xmm5 pcmpgtd xmm6, xmm0 pcmpeqd xmm5, xmm0 pshufd xmm7, xmm5, 0F5h pand xmm7, xmm6 pshufd xmm5, xmm6, 0F5h por xmm5, xmm7 movd esi, xmm5 not esi test sil, 1 jz short loc_CD601 mov [rax+rdx*4], edx loc_CD601: pxor xmm5, xmm3 pextrw esi, xmm5, 4 test sil, 1 jz short loc_CD617 lea esi, [rdx+1] mov [rax+rdx*4+4], esi loc_CD617: add rdx, 2 paddq xmm1, xmm4 cmp rcx, rdx jnz short loc_CD5CC loc_CD624: movzx r9d, bpl lea rcx, [rsp+58h+var_48] mov rdi, rbx mov rsi, r12 mov rdx, r15 mov r8, r14 call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool) mov rdi, [rsp+58h+var_48]; void * test rdi, rdi jz short loc_CD655 mov rsi, [rsp+58h+var_38] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CD655: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_8]; void * test rdi, rdi jz short loc_CD681 mov rsi, [rsp+arg_18] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CD681: mov rdi, rbx call __Unwind_Resume
long long * common_sampler_sample_and_accept_n( long long *a1, _QWORD *a2, long long a3, long long *a4, unsigned __int8 a5, __m128i a6, __m128i si128) { _DWORD *v10; // rax long long v11; // rdx unsigned long long v12; // rcx __m128i v13; // xmm0 long long v14; // rdx __m128i v15; // xmm2 __m128i v16; // xmm4 __m128i v17; // xmm5 __m128i v18; // xmm6 __m128i v19; // xmm5 void *v21; // [rsp+10h] [rbp-48h] BYREF _BYTE *v22; // [rsp+18h] [rbp-40h] long long v23; // [rsp+20h] [rbp-38h] std::vector<int>::vector((long long)&v21, ((a4[1] - *a4) >> 2) + 1); v10 = v21; if ( v22 != v21 ) { v11 = ((v22 - (_BYTE *)v21) >> 2 == 0) + ((v22 - (_BYTE *)v21) >> 2); v12 = (v11 + 1) & 0xFFFFFFFFFFFFFFFELL; v13 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v11 - 1), 68); si128 = _mm_load_si128((const __m128i *)&xmmword_E5010); v14 = 0LL; v15 = _mm_load_si128((const __m128i *)&xmmword_E5020); a6 = _mm_xor_si128(v13, v15); v16 = _mm_load_si128((const __m128i *)&xmmword_E5030); do { v17 = _mm_xor_si128(si128, v15); v18 = _mm_cmpgt_epi32(v17, a6); v19 = _mm_or_si128( _mm_shuffle_epi32(v18, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v17, a6), 245), v18)); if ( (~_mm_cvtsi128_si32(v19) & 1) != 0 ) v10[v14] = v14; if ( (_mm_extract_epi16(_mm_xor_si128(v19, (__m128i)-1LL), 4) & 1) != 0 ) v10[v14 + 1] = v14 + 1; v14 += 2LL; si128 = _mm_add_epi64(si128, v16); } while ( v12 != v14 ); } common_sampler_sample_and_accept_n(a1, a2, a3, &v21, a4, a5, *(double *)a6.m128i_i64, *(double *)si128.m128i_i64); if ( v21 ) operator delete(v21, v23 - (_QWORD)v21); return a1; }
common_sampler_sample_and_accept_n: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV RSI,qword ptr [RCX + 0x8] SUB RSI,qword ptr [RCX] SAR RSI,0x2 INC RSI LEA R13,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RDI,R13 CALL 0x00178ccc MOV RAX,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] SUB RDX,RAX JZ 0x001cd624 SAR RDX,0x2 CMP RDX,0x1 ADC RDX,0x0 LEA RCX,[RDX + 0x1] AND RCX,-0x2 DEC RDX MOVQ XMM0,RDX PSHUFD XMM0,XMM0,0x44 MOVDQA XMM1,xmmword ptr [0x001e5010] XOR EDX,EDX MOVDQA XMM2,xmmword ptr [0x001e5020] PXOR XMM0,XMM2 PCMPEQD XMM3,XMM3 MOVDQA XMM4,xmmword ptr [0x001e5030] LAB_001cd5cc: MOVDQA XMM5,XMM1 PXOR XMM5,XMM2 MOVDQA XMM6,XMM5 PCMPGTD XMM6,XMM0 PCMPEQD XMM5,XMM0 PSHUFD XMM7,XMM5,0xf5 PAND XMM7,XMM6 PSHUFD XMM5,XMM6,0xf5 POR XMM5,XMM7 MOVD ESI,XMM5 NOT ESI TEST SIL,0x1 JZ 0x001cd601 MOV dword ptr [RAX + RDX*0x4],EDX LAB_001cd601: PXOR XMM5,XMM3 PEXTRW ESI,XMM5,0x4 TEST SIL,0x1 JZ 0x001cd617 LEA ESI,[RDX + 0x1] MOV dword ptr [RAX + RDX*0x4 + 0x4],ESI LAB_001cd617: ADD RDX,0x2 PADDQ XMM1,XMM4 CMP RCX,RDX JNZ 0x001cd5cc LAB_001cd624: MOVZX R9D,BPL LEA RCX,[RSP + 0x10] MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV R8,R14 CALL 0x001cd3a5 LAB_001cd63e: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001cd655 MOV RSI,qword ptr [RSP + 0x20] SUB RSI,RDI CALL 0x0011a8c0 LAB_001cd655: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int> > const&, bool) */ common_sampler * common_sampler_sample_and_accept_n (common_sampler *param_1,llama_context *param_2,vector *param_3,bool param_4) { int1 auVar1 [16]; long lVar2; long lVar3; int7 in_register_00000009; long lVar4; long lVar5; ulong uVar6; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; void *local_48; long local_40; long local_38; std::vector<int,std::allocator<int>>::vector ((ulong)&local_48, (allocator *) ((((long *)CONCAT71(in_register_00000009,param_4))[1] - *(long *)CONCAT71(in_register_00000009,param_4) >> 2) + 1)); lVar3 = _UNK_001e5038; lVar2 = _DAT_001e5030; auVar1 = _DAT_001e5020; if (local_40 - (long)local_48 != 0) { lVar4 = local_40 - (long)local_48 >> 2; lVar4 = lVar4 + (ulong)(lVar4 == 0); lVar5 = lVar4 + -1; auVar7._8_4_ = (int)lVar5; auVar7._0_8_ = lVar5; auVar7._12_4_ = (int)((ulong)lVar5 >> 0x20); uVar6 = 0; auVar7 = auVar7 ^ _DAT_001e5020; auVar8 = _DAT_001e5010; do { auVar9 = auVar8 ^ auVar1; if ((bool)(~(auVar9._4_4_ == auVar7._4_4_ && auVar7._0_4_ < auVar9._0_4_ || auVar7._4_4_ < auVar9._4_4_) & 1)) { *(int *)((long)local_48 + uVar6 * 4) = (int)uVar6; } if ((auVar9._12_4_ != auVar7._12_4_ || auVar9._8_4_ <= auVar7._8_4_) && auVar9._12_4_ <= auVar7._12_4_) { *(int *)((long)local_48 + uVar6 * 4 + 4) = (int)uVar6 + 1; } uVar6 = uVar6 + 2; lVar5 = auVar8._8_8_; auVar8._0_8_ = auVar8._0_8_ + lVar2; auVar8._8_8_ = lVar5 + lVar3; } while ((lVar4 + 1U & 0xfffffffffffffffe) != uVar6); } /* try { // try from 001cd624 to 001cd63d has its CatchHandler @ 001cd667 */ common_sampler_sample_and_accept_n(param_1,param_2,param_3,(vector *)&local_48,param_4); if (local_48 != (void *)0x0) { operator_delete(local_48,local_38 - (long)local_48); } return param_1; }
28,680
minja::Parser::parseDictionary()
llama.cpp/common/minja/minja.hpp
std::shared_ptr<Expression> parseDictionary() { if (consumeToken("{").empty()) return nullptr; std::vector<std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>>> elements; if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } auto parseKeyValuePair = [&]() { auto key = parseExpression(); if (!key) throw std::runtime_error("Expected key in dictionary"); if (consumeToken(":").empty()) throw std::runtime_error("Expected colon betweek key & value in dictionary"); auto value = parseExpression(); if (!value) throw std::runtime_error("Expected value in dictionary"); elements.emplace_back(std::pair(std::move(key), std::move(value))); }; parseKeyValuePair(); while (it != end) { if (!consumeToken(",").empty()) { parseKeyValuePair(); } else if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } else { throw std::runtime_error("Expected comma or closing brace in dictionary"); } } throw std::runtime_error("Expected closing brace"); }
O3
cpp
minja::Parser::parseDictionary(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x36b2a(%rip), %rsi # 0x11f03a leaq 0x36b24(%rip), %rdx # 0x11f03b movq %rsp, %rdi callq 0x2c720 movq %rbx, 0x60(%rsp) leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0xe2742 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %rbx cmpq %rax, %rdi je 0xe8558 movq 0x30(%rsp), %rsi incq %rsi callq 0x211a0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xe8573 movq 0x10(%rsp), %rsi incq %rsi callq 0x211a0 xorps %xmm0, %xmm0 testq %rbx, %rbx je 0xe8633 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) movq %rsp, %rdi leaq 0x10(%rsp), %rax movq %rax, (%rdi) leaq 0x39d94(%rip), %rsi # 0x122333 leaq 0x39d8e(%rip), %rdx # 0x122334 callq 0x2c720 leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0xe2742 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rbx leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0xe85e1 movq 0x30(%rsp), %rsi incq %rsi callq 0x211a0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xe85fc movq 0x10(%rsp), %rsi incq %rsi callq 0x211a0 testq %rbx, %rbx je 0xe8640 movq (%r14), %rax movq %rax, 0x20(%rsp) movq 0x8(%r14), %rax movq %rax, 0x28(%rsp) testq %rax, %rax je 0xe8797 movq 0x7d96e(%rip), %rcx # 0x165f90 cmpb $0x0, (%rcx) je 0xe8793 incl 0x8(%rax) jmp 0xe8797 movq 0x60(%rsp), %rbx movups %xmm0, (%rbx) jmp 0xe889b leaq 0x68(%rsp), %rdi movq %r14, (%rdi) leaq 0x40(%rsp), %rax movq %rax, 0x8(%rdi) callq 0xe98e4 leaq 0x2cf39(%rip), %r12 # 0x115596 movq %rsp, %r13 leaq 0x20(%rsp), %rbp leaq 0x68(%rsp), %rbx movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0xe88ad leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %r13, %rdi leaq 0x2cf0a(%rip), %rsi # 0x115595 movq %r12, %rdx callq 0x2c720 movq %rbp, %rdi movq %r14, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0xe2742 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %r15 leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0xe86c7 movq 0x30(%rsp), %rsi incq %rsi callq 0x211a0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xe86e2 movq 0x10(%rsp), %rsi incq %rsi callq 0x211a0 testq %r15, %r15 je 0xe86f4 movq %rbx, %rdi callq 0xe98e4 jmp 0xe866a movq %rsp, %rdi leaq 0x10(%rsp), %rax movq %rax, (%rdi) leaq 0x39c2d(%rip), %rsi # 0x122333 leaq 0x39c27(%rip), %rdx # 0x122334 callq 0x2c720 leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0xe2742 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rbx leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0xe8748 movq 0x30(%rsp), %rsi incq %rsi callq 0x211a0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xe8763 movq 0x10(%rsp), %rsi incq %rsi callq 0x211a0 testq %rbx, %rbx je 0xe88df movq (%r14), %rax movq %rax, 0x20(%rsp) movq 0x8(%r14), %rax movq %rax, 0x28(%rsp) testq %rax, %rax je 0xe87b8 movq 0x7d807(%rip), %rcx # 0x165f90 cmpb $0x0, (%rcx) je 0xe87b4 incl 0x8(%rax) jmp 0xe87b8 lock incl 0x8(%rax) leaq 0x28(%rsp), %r15 movq 0x20(%r14), %rbx subq 0x10(%r14), %rbx movq %rbx, 0x8(%r15) movl $0x48, %edi callq 0x21250 jmp 0xe87d3 lock incl 0x8(%rax) leaq 0x28(%rsp), %r15 movq 0x20(%r14), %rbx subq 0x10(%r14), %rbx movq %rbx, 0x8(%r15) movl $0x48, %edi callq 0x21250 leaq 0x8(%rsp), %rdi movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x7c393(%rip), %rcx # 0x164b80 addq $0x10, %rcx movq %rcx, (%rax) movq %rax, %rcx addq $0x10, %rcx leaq 0x7c1ce(%rip), %rdx # 0x1649d0 addq $0x10, %rdx movq %rdx, 0x10(%rax) movq 0x20(%rsp), %rdx movq %rdx, 0x18(%rax) movq 0x28(%rsp), %rdx movq %rdx, 0x20(%rax) testq %rdx, %rdx je 0xe883b movq 0x7d768(%rip), %rsi # 0x165f90 cmpb $0x0, (%rsi) je 0xe8832 incl 0x8(%rdx) jmp 0xe883b lock incl 0x8(%rdx) movq 0x30(%rsp), %rbx movq %rbx, 0x28(%rax) leaq 0x7c38a(%rip), %rdx # 0x164bd0 addq $0x10, %rdx movq %rdx, 0x10(%rax) movaps 0x40(%rsp), %xmm0 movups %xmm0, 0x30(%rax) movq 0x50(%rsp), %rdx movq %rdx, 0x40(%rax) xorl %edx, %edx movq %rdx, 0x50(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movq 0x60(%rsp), %rbx movq %rcx, (%rbx) movq %rdx, 0x8(%rsp) movq %rax, 0x8(%rbx) movq %rdx, (%rsp) callq 0x74104 movq %r15, %rdi callq 0x74104 leaq 0x40(%rsp), %rdi callq 0xe9b10 movq %rbx, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x21700 movq %rax, %r14 leaq 0x3c14c(%rip), %rsi # 0x124a0d movq %rax, %rdi callq 0x21490 movq 0x7d6e8(%rip), %rsi # 0x165fb8 movq 0x7d6a1(%rip), %rdx # 0x165f78 movq %r14, %rdi callq 0x21b50 movl $0x10, %edi callq 0x21700 movq %rax, %r14 leaq 0x3c0ec(%rip), %rsi # 0x1249df movq %rax, %rdi callq 0x21490 jmp 0xe88c9 jmp 0xe893b jmp 0xe8905 jmp 0xe8961 jmp 0xe894c movq %rax, %rbx movq %r15, %rdi callq 0x74104 jmp 0xe894f jmp 0xe8961 jmp 0xe894c movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xe8959 movq 0x10(%rsp), %rsi incq %rsi callq 0x211a0 jmp 0xe8959 movq %rax, %rbx jmp 0xe8959 movq %rax, %rbx movq %r14, %rdi callq 0x220a0 jmp 0xe894f jmp 0xe894c jmp 0xe894c movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0xe9b10 movq %rbx, %rdi callq 0x21c10 movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xe894f movq 0x10(%rsp), %rsi incq %rsi callq 0x211a0 jmp 0xe894f nop
_ZN5minja6Parser15parseDictionaryEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi mov rbx, rdi lea rax, [rsp+0A8h+var_98] mov [rax-10h], rax lea rsi, aLlamaCompletio+15h; "{" lea rdx, aLlamaCompletio+16h; "" mov rdi, rsp 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 [rsp+0A8h+var_48], rbx lea rdi, [rsp+0A8h+var_88] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rax, [rsp+0A8h+var_78] mov rdi, [rax-10h]; void * mov rbx, [rax-8] cmp rdi, rax jz short loc_E8558 mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E8558: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_E8573 mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E8573: xorps xmm0, xmm0 test rbx, rbx jz loc_E8633 movaps [rsp+0A8h+var_68], xmm0 mov [rsp+0A8h+var_58], 0 mov rdi, rsp lea rax, [rsp+0A8h+var_98] mov [rdi], rax lea rsi, aForMessageInMe+0CFh; "}" lea rdx, aForMessageInMe+0D0h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_88] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0A8h+var_88]; void * mov rbx, [rsp+0A8h+var_80] lea rax, [rsp+0A8h+var_78] cmp rdi, rax jz short loc_E85E1 mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E85E1: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_E85FC mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E85FC: test rbx, rbx jz short loc_E8640 mov rax, [r14] mov [rsp+0A8h+var_88], rax mov rax, [r14+8] mov [rsp+0A8h+var_80], rax test rax, rax jz loc_E8797 mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rcx], 0 jz loc_E8793 inc dword ptr [rax+8] jmp loc_E8797 loc_E8633: mov rbx, [rsp+0A8h+var_48] movups xmmword ptr [rbx], xmm0 jmp loc_E889B loc_E8640: lea rdi, [rsp+0A8h+var_40] mov [rdi], r14 lea rax, [rsp+0A8h+var_68] mov [rdi+8], rax call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) lea r12, asc_115592+4; "" mov r13, rsp lea rbp, [rsp+0A8h+var_88] lea rbx, [rsp+0A8h+var_40] loc_E866A: mov rax, [r14+20h] cmp rax, [r14+18h] jz loc_E88AD lea rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_A8], rax mov rdi, r13 lea rsi, asc_115592+3; "," mov rdx, r12 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, rbp mov rsi, r14 mov rdx, r13 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0A8h+var_88]; void * mov r15, [rsp+0A8h+var_80] lea rax, [rsp+0A8h+var_78] cmp rdi, rax jz short loc_E86C7 mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E86C7: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_E86E2 mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E86E2: test r15, r15 jz short loc_E86F4 mov rdi, rbx call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) jmp loc_E866A loc_E86F4: mov rdi, rsp lea rax, [rsp+0A8h+var_98] mov [rdi], rax lea rsi, aForMessageInMe+0CFh; "}" lea rdx, aForMessageInMe+0D0h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_88] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0A8h+var_88]; void * mov rbx, [rsp+0A8h+var_80] lea rax, [rsp+0A8h+var_78] cmp rdi, rax jz short loc_E8748 mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E8748: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_E8763 mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E8763: test rbx, rbx jz loc_E88DF mov rax, [r14] mov [rsp+0A8h+var_88], rax mov rax, [r14+8] mov [rsp+0A8h+var_80], rax test rax, rax jz short loc_E87B8 mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rcx], 0 jz short loc_E87B4 inc dword ptr [rax+8] jmp short loc_E87B8 loc_E8793: lock inc dword ptr [rax+8] loc_E8797: lea r15, [rsp+0A8h+var_80] mov rbx, [r14+20h] sub rbx, [r14+10h] mov [r15+8], rbx mov edi, 48h ; 'H'; unsigned __int64 call __Znwm; operator new(ulong) jmp short loc_E87D3 loc_E87B4: lock inc dword ptr [rax+8] loc_E87B8: lea r15, [rsp+0A8h+var_80] mov rbx, [r14+20h] sub rbx, [r14+10h] mov [r15+8], rbx mov edi, 48h ; 'H'; unsigned __int64 call __Znwm; operator new(ulong) loc_E87D3: lea rdi, [rsp+0A8h+var_A0] mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja8DictExprESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx mov rcx, rax add rcx, 10h lea rdx, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rdx, 10h mov [rax+10h], rdx mov rdx, [rsp+0A8h+var_88] mov [rax+18h], rdx mov rdx, [rsp+0A8h+var_80] mov [rax+20h], rdx test rdx, rdx jz short loc_E883B mov rsi, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rsi], 0 jz short loc_E8832 inc dword ptr [rdx+8] jmp short loc_E883B loc_E8832: lock inc dword ptr [rdx+8] mov rbx, [rsp+0A8h+var_78] loc_E883B: mov [rax+28h], rbx lea rdx, _ZTVN5minja8DictExprE; `vtable for'minja::DictExpr add rdx, 10h mov [rax+10h], rdx movaps xmm0, [rsp+0A8h+var_68] movups xmmword ptr [rax+30h], xmm0 mov rdx, [rsp+0A8h+var_58] mov [rax+40h], rdx xor edx, edx mov [rsp+0A8h+var_58], rdx xorps xmm0, xmm0 movaps [rsp+0A8h+var_68], xmm0 mov rbx, [rsp+0A8h+var_48] mov [rbx], rcx mov [rsp+0A8h+var_A0], rdx mov [rbx+8], rax mov [rsp+0A8h+var_A8], rdx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0A8h+var_68] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_E889B: mov rax, rbx add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_E88AD: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedClosin_5; "Expected closing brace" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_E88C9: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_E88DF: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedCommaO_0; "Expected comma or closing brace in dict"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_E88C9 jmp short loc_E893B jmp short loc_E8905 jmp short loc_E8961 jmp short loc_E894C loc_E8905: mov rbx, rax mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_E894F jmp short loc_E8961 jmp short loc_E894C mov rbx, rax mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_E8959 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E8959 mov rbx, rax jmp short loc_E8959 loc_E893B: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_E894F jmp short loc_E894C jmp short $+2 loc_E894C: mov rbx, rax loc_E894F: lea rdi, [rsp+arg_38] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_E8959: mov rdi, rbx call __Unwind_Resume loc_E8961: mov rbx, rax mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_E894F mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E894F
minja::Parser * minja::Parser::parseDictionary(minja::Parser *this, long long a2) { volatile signed __int32 *v2; // rbx volatile signed __int32 *v3; // rbx volatile signed __int32 *v4; // rax minja::Parser *v5; // rbx volatile signed __int32 *v6; // r15 volatile signed __int32 *v7; // rbx volatile signed __int32 *v8; // rax long long v9; // rbx long long v10; // rax volatile signed __int32 *v11; // rdx std::runtime_error *exception; // r14 void *v14; // [rsp+0h] [rbp-A8h] BYREF volatile signed __int32 *v15; // [rsp+8h] [rbp-A0h] BYREF _QWORD v16[2]; // [rsp+10h] [rbp-98h] BYREF void *v17; // [rsp+20h] [rbp-88h] BYREF volatile signed __int32 *v18; // [rsp+28h] [rbp-80h] BYREF _QWORD v19[2]; // [rsp+30h] [rbp-78h] BYREF __int128 v20; // [rsp+40h] [rbp-68h] BYREF long long v21; // [rsp+50h] [rbp-58h] minja::Parser *v22; // [rsp+60h] [rbp-48h] long long v23; // [rsp+68h] [rbp-40h] __int128 *v24; // [rsp+70h] [rbp-38h] v14 = v16; std::string::_M_construct<char const*>((long long)&v14, "{", (long long)""); v22 = this; minja::Parser::consumeToken(&v17, a2, (_BYTE **)&v14, 1u); v2 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); if ( !v2 ) { v5 = v22; *(_OWORD *)v22 = 0LL; return v5; } v20 = 0LL; v21 = 0LL; v14 = v16; std::string::_M_construct<char const*>((long long)&v14, "}", (long long)""); minja::Parser::consumeToken(&v17, a2, (_BYTE **)&v14, 1u); v3 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); if ( v3 ) { v17 = *(void **)a2; v4 = *(volatile signed __int32 **)(a2 + 8); v18 = v4; if ( v4 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v4 + 2); else _InterlockedIncrement(v4 + 2); } goto LABEL_34; } v23 = a2; v24 = &v20; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); while ( 1 ) { if ( *(_QWORD *)(a2 + 32) == *(_QWORD *)(a2 + 24) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected closing brace"); goto LABEL_41; } v14 = v16; std::string::_M_construct<char const*>((long long)&v14, ",", (long long)""); minja::Parser::consumeToken(&v17, a2, (_BYTE **)&v14, 1u); v6 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); if ( !v6 ) break; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); } v14 = v16; std::string::_M_construct<char const*>((long long)&v14, "}", (long long)""); minja::Parser::consumeToken(&v17, a2, (_BYTE **)&v14, 1u); v7 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); if ( !v7 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected comma or closing brace in dictionary"); LABEL_41: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v17 = *(void **)a2; v8 = *(volatile signed __int32 **)(a2 + 8); v18 = v8; if ( v8 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v8 + 2); else _InterlockedIncrement(v8 + 2); } LABEL_34: v9 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16); v19[0] = v9; v10 = operator new(0x48uLL); *(_QWORD *)(v10 + 8) = 0x100000001LL; *(_QWORD *)v10 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2> + 2; *(_QWORD *)(v10 + 16) = &`vtable for'minja::Expression + 2; *(_QWORD *)(v10 + 24) = v17; v11 = v18; *(_QWORD *)(v10 + 32) = v18; if ( v11 ) { if ( _libc_single_threaded ) { ++*((_DWORD *)v11 + 2); } else { _InterlockedIncrement(v11 + 2); v9 = v19[0]; } } *(_QWORD *)(v10 + 40) = v9; *(_QWORD *)(v10 + 16) = &`vtable for'minja::DictExpr + 2; *(_OWORD *)(v10 + 48) = v20; *(_QWORD *)(v10 + 64) = v21; v21 = 0LL; v20 = 0LL; v5 = v22; *(_QWORD *)v22 = v10 + 16; v15 = 0LL; *((_QWORD *)v5 + 1) = v10; v14 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v18); std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector(&v20); return v5; }
parseDictionary: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RSI MOV RBX,RDI LEA RAX,[RSP + 0x10] MOV qword ptr [RAX + -0x10],RAX LAB_001e8509: LEA RSI,[0x21f03a] LEA RDX,[0x21f03b] MOV RDI,RSP CALL 0x0012c720 LAB_001e851f: MOV qword ptr [RSP + 0x60],RBX LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x001e2742 LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] MOV RBX,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x001e8558 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001211a0 LAB_001e8558: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001e8573 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001211a0 LAB_001e8573: XORPS XMM0,XMM0 TEST RBX,RBX JZ 0x001e8633 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x50],0x0 MOV RDI,RSP LEA RAX,[RSP + 0x10] MOV qword ptr [RDI],RAX LAB_001e8598: LEA RSI,[0x222333] LEA RDX,[0x222334] CALL 0x0012c720 LAB_001e85ab: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x001e2742 MOV RDI,qword ptr [RSP + 0x20] MOV RBX,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x001e85e1 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001211a0 LAB_001e85e1: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001e85fc MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001211a0 LAB_001e85fc: TEST RBX,RBX JZ 0x001e8640 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x001e8797 MOV RCX,qword ptr [0x00265f90] CMP byte ptr [RCX],0x0 JZ 0x001e8793 INC dword ptr [RAX + 0x8] JMP 0x001e8797 LAB_001e8633: MOV RBX,qword ptr [RSP + 0x60] MOVUPS xmmword ptr [RBX],XMM0 JMP 0x001e889b LAB_001e8640: LEA RDI,[RSP + 0x68] MOV qword ptr [RDI],R14 LEA RAX,[RSP + 0x40] MOV qword ptr [RDI + 0x8],RAX LAB_001e8651: CALL 0x001e98e4 LEA R12,[0x215596] MOV R13,RSP LEA RBP,[RSP + 0x20] LEA RBX,[RSP + 0x68] LAB_001e866a: MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x001e88ad LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_001e8681: MOV RDI,R13 LEA RSI,[0x215595] MOV RDX,R12 CALL 0x0012c720 LAB_001e8693: MOV RDI,RBP MOV RSI,R14 MOV RDX,R13 MOV ECX,0x1 CALL 0x001e2742 MOV RDI,qword ptr [RSP + 0x20] MOV R15,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x001e86c7 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001211a0 LAB_001e86c7: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001e86e2 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001211a0 LAB_001e86e2: TEST R15,R15 JZ 0x001e86f4 LAB_001e86e7: MOV RDI,RBX CALL 0x001e98e4 JMP 0x001e866a LAB_001e86f4: MOV RDI,RSP LEA RAX,[RSP + 0x10] MOV qword ptr [RDI],RAX LAB_001e86ff: LEA RSI,[0x222333] LEA RDX,[0x222334] CALL 0x0012c720 LAB_001e8712: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x001e2742 MOV RDI,qword ptr [RSP + 0x20] MOV RBX,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x001e8748 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001211a0 LAB_001e8748: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001e8763 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001211a0 LAB_001e8763: TEST RBX,RBX JZ 0x001e88df MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x001e87b8 MOV RCX,qword ptr [0x00265f90] CMP byte ptr [RCX],0x0 JZ 0x001e87b4 INC dword ptr [RAX + 0x8] JMP 0x001e87b8 LAB_001e8793: INC.LOCK dword ptr [RAX + 0x8] LAB_001e8797: LEA R15,[RSP + 0x28] MOV RBX,qword ptr [R14 + 0x20] SUB RBX,qword ptr [R14 + 0x10] MOV qword ptr [R15 + 0x8],RBX LAB_001e87a8: MOV EDI,0x48 CALL 0x00121250 JMP 0x001e87d3 LAB_001e87b4: INC.LOCK dword ptr [RAX + 0x8] LAB_001e87b8: LEA R15,[RSP + 0x28] MOV RBX,qword ptr [R14 + 0x20] SUB RBX,qword ptr [R14 + 0x10] MOV qword ptr [R15 + 0x8],RBX LAB_001e87c9: MOV EDI,0x48 CALL 0x00121250 LAB_001e87d3: LEA RDI,[RSP + 0x8] MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x264b80] ADD RCX,0x10 MOV qword ptr [RAX],RCX MOV RCX,RAX ADD RCX,0x10 LEA RDX,[0x2649d0] ADD RDX,0x10 MOV qword ptr [RAX + 0x10],RDX MOV RDX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x18],RDX MOV RDX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x20],RDX TEST RDX,RDX JZ 0x001e883b MOV RSI,qword ptr [0x00265f90] CMP byte ptr [RSI],0x0 JZ 0x001e8832 INC dword ptr [RDX + 0x8] JMP 0x001e883b LAB_001e8832: INC.LOCK dword ptr [RDX + 0x8] MOV RBX,qword ptr [RSP + 0x30] LAB_001e883b: MOV qword ptr [RAX + 0x28],RBX LEA RDX,[0x264bd0] ADD RDX,0x10 MOV qword ptr [RAX + 0x10],RDX MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOV RDX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x40],RDX XOR EDX,EDX MOV qword ptr [RSP + 0x50],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV RBX,qword ptr [RSP + 0x60] MOV qword ptr [RBX],RCX MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RBX + 0x8],RAX MOV qword ptr [RSP],RDX CALL 0x00174104 MOV RDI,R15 CALL 0x00174104 LEA RDI,[RSP + 0x40] CALL 0x001e9b10 LAB_001e889b: MOV RAX,RBX ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001e88ad: MOV EDI,0x10 CALL 0x00121700 MOV R14,RAX LAB_001e88ba: LEA RSI,[0x224a0d] MOV RDI,RAX CALL 0x00121490 LAB_001e88c9: MOV RSI,qword ptr [0x00265fb8] MOV RDX,qword ptr [0x00265f78] MOV RDI,R14 CALL 0x00121b50 LAB_001e88df: MOV EDI,0x10 CALL 0x00121700 MOV R14,RAX LAB_001e88ec: LEA RSI,[0x2249df] MOV RDI,RAX CALL 0x00121490 LAB_001e88fb: JMP 0x001e88c9
/* minja::Parser::parseDictionary() */ int8 * minja::Parser::parseDictionary(void) { int8 *puVar1; runtime_error *this; long lVar2; int8 *in_RSI; int8 *in_RDI; long *local_a8; int8 local_a0; long local_98 [2]; long *local_88; long local_80; long local_78 [2]; int8 local_68; int8 uStack_60; int8 local_58; int8 *local_48; _lambda___1_ local_40 [8]; int8 *local_38; local_a8 = local_98; /* try { // try from 001e8509 to 001e851e has its CatchHandler @ 001e8936 */ std::__cxx11::string::_M_construct<char_const*>(&local_a8,"{",""); /* try { // try from 001e851f to 001e8538 has its CatchHandler @ 001e8916 */ local_48 = in_RDI; consumeToken(&local_88); lVar2 = local_80; if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8 != local_98) { operator_delete(local_a8,local_98[0] + 1); } if (lVar2 == 0) { *local_48 = 0; local_48[1] = 0; } else { local_68 = 0; uStack_60 = 0; local_58 = 0; local_a8 = local_98; /* try { // try from 001e8598 to 001e85aa has its CatchHandler @ 001e8914 */ std::__cxx11::string::_M_construct<char_const*>(&local_a8,"}",""); /* try { // try from 001e85ab to 001e85bf has its CatchHandler @ 001e8912 */ consumeToken(&local_88); lVar2 = local_80; if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8 != local_98) { operator_delete(local_a8,local_98[0] + 1); } if (lVar2 == 0) { local_38 = &local_68; /* try { // try from 001e8651 to 001e8655 has its CatchHandler @ 001e8948 */ parseDictionary()::{lambda()#1}::operator()(local_40); do { if (in_RSI[4] == in_RSI[3]) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001e88ba to 001e88c8 has its CatchHandler @ 001e893b */ std::runtime_error::runtime_error(this,"Expected closing brace"); LAB_001e88c9: /* try { // try from 001e88c9 to 001e88de has its CatchHandler @ 001e8948 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00265fb8,PTR__runtime_error_00265f78); } local_a8 = local_98; /* try { // try from 001e8681 to 001e8692 has its CatchHandler @ 001e894c */ std::__cxx11::string::_M_construct<char_const*>(&local_a8,&DAT_00215595,&DAT_00215596); /* try { // try from 001e8693 to 001e86a5 has its CatchHandler @ 001e8961 */ consumeToken(&local_88); lVar2 = local_80; if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8 != local_98) { operator_delete(local_a8,local_98[0] + 1); } if (lVar2 == 0) { local_a8 = local_98; /* try { // try from 001e86ff to 001e8711 has its CatchHandler @ 001e8903 */ std::__cxx11::string::_M_construct<char_const*>(&local_a8,"}",""); /* try { // try from 001e8712 to 001e8726 has its CatchHandler @ 001e8901 */ consumeToken(&local_88); if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8 != local_98) { operator_delete(local_a8,local_98[0] + 1); } if (local_80 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001e88ec to 001e88fa has its CatchHandler @ 001e88fd */ std::runtime_error::runtime_error(this,"Expected comma or closing brace in dictionary"); goto LAB_001e88c9; } local_88 = (long *)*in_RSI; local_80 = in_RSI[1]; if (local_80 != 0) { if (*PTR___libc_single_threaded_00265f90 == '\0') { LOCK(); *(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1; UNLOCK(); } else { *(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1; } } lVar2 = in_RSI[4] - in_RSI[2]; local_78[0] = lVar2; /* try { // try from 001e87c9 to 001e87d2 has its CatchHandler @ 001e88ff */ puVar1 = (int8 *)operator_new(0x48); goto LAB_001e87d3; } /* try { // try from 001e86e7 to 001e86ee has its CatchHandler @ 001e894a */ parseDictionary()::{lambda()#1}::operator()(local_40); } while( true ); } local_88 = (long *)*in_RSI; local_80 = in_RSI[1]; if (local_80 != 0) { if (*PTR___libc_single_threaded_00265f90 == '\0') { LOCK(); *(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1; UNLOCK(); } else { *(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1; } } lVar2 = in_RSI[4] - in_RSI[2]; local_78[0] = lVar2; /* try { // try from 001e87a8 to 001e87b1 has its CatchHandler @ 001e8905 */ puVar1 = (int8 *)operator_new(0x48); LAB_001e87d3: puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_base_00264b90; puVar1[2] = &PTR___cxa_pure_virtual_002649e0; puVar1[3] = local_88; puVar1[4] = local_80; if (local_80 != 0) { if (*PTR___libc_single_threaded_00265f90 == '\0') { LOCK(); *(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1; UNLOCK(); lVar2 = local_78[0]; } else { *(int *)(local_80 + 8) = *(int *)(local_80 + 8) + 1; } } puVar1[5] = lVar2; puVar1[2] = &PTR_do_evaluate_00264be0; puVar1[6] = local_68; puVar1[7] = uStack_60; puVar1[8] = local_58; local_58 = 0; local_68 = 0; uStack_60 = 0; *local_48 = puVar1 + 2; local_a0 = 0; local_48[1] = puVar1; local_a8 = (long *)0x0; 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 ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_80); std:: vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> ::~vector((vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> *)&local_68); } return local_48; }
28,681
void google::protobuf::internal::SwapFieldHelper::SwapInlinedStrings<true>(google::protobuf::Reflection const*, google::protobuf::Message*, google::protobuf::Message*, google::protobuf::FieldDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc
void SwapFieldHelper::SwapInlinedStrings(const Reflection* r, Message* lhs, Message* rhs, const FieldDescriptor* field) { // Inlined string field. Arena* lhs_arena = lhs->GetArenaForAllocation(); Arena* rhs_arena = rhs->GetArenaForAllocation(); auto* lhs_string = r->MutableRaw<InlinedStringField>(lhs, field); auto* rhs_string = r->MutableRaw<InlinedStringField>(rhs, field); uint32_t index = r->schema_.InlinedStringIndex(field); GOOGLE_DCHECK_GT(index, 0); uint32_t* lhs_array = r->MutableInlinedStringDonatedArray(lhs); uint32_t* rhs_array = r->MutableInlinedStringDonatedArray(rhs); uint32_t* lhs_state = &lhs_array[index / 32]; uint32_t* rhs_state = &rhs_array[index / 32]; bool lhs_arena_dtor_registered = (lhs_array[0] & 0x1u) == 0; bool rhs_arena_dtor_registered = (rhs_array[0] & 0x1u) == 0; const uint32_t mask = ~(static_cast<uint32_t>(1) << (index % 32)); if (unsafe_shallow_swap || lhs_arena == rhs_arena) { InlinedStringField::InternalSwap(lhs_string, lhs_arena, lhs_arena_dtor_registered, lhs, rhs_string, rhs_arena, rhs_arena_dtor_registered, rhs); } else { const std::string temp = lhs_string->Get(); lhs_string->Set(rhs_string->Get(), lhs_arena, r->IsInlinedStringDonated(*lhs, field), lhs_state, mask, lhs); rhs_string->Set(temp, rhs_arena, r->IsInlinedStringDonated(*rhs, field), rhs_state, mask, rhs); } }
O0
cpp
void google::protobuf::internal::SwapFieldHelper::SwapInlinedStrings<true>(google::protobuf::Reflection const*, google::protobuf::Message*, google::protobuf::Message*, google::protobuf::FieldDescriptor const*): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0xd0(%rsp) movq %rsi, 0xc8(%rsp) movq %rdx, 0xc0(%rsp) movq %rcx, 0xb8(%rsp) movq 0xc8(%rsp), %rdi callq 0x1d8160 movq %rax, 0xb0(%rsp) movq 0xc0(%rsp), %rdi callq 0x1d8160 movq %rax, 0xa8(%rsp) movq 0xd0(%rsp), %rdi movq 0xc8(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x413470 movq %rax, 0xa0(%rsp) movq 0xd0(%rsp), %rdi movq 0xc0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x413470 movq %rax, 0x98(%rsp) movq 0xd0(%rsp), %rdi addq $0x8, %rdi movq 0xb8(%rsp), %rsi callq 0x414c10 movl %eax, 0x94(%rsp) xorl %eax, %eax testb $0x1, %al jne 0x41a5d6 jmp 0x41a677 movl 0x94(%rsp), %eax movb $0x0, 0x57(%rsp) cmpl $0x0, %eax jbe 0x41a5e9 jmp 0x41a639 leaq 0x1d8990(%rip), %rdx # 0x5f2f80 leaq 0x58(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x3, %esi movl $0x218, %ecx # imm = 0x218 callq 0x3ef0b0 movq 0x8(%rsp), %rdi movb $0x1, 0x57(%rsp) leaq 0x1d8eff(%rip), %rsi # 0x5f3519 callq 0x3ee970 movq %rax, 0x10(%rsp) jmp 0x41a626 movq 0x10(%rsp), %rsi leaq 0x43(%rsp), %rdi callq 0x3eeb20 jmp 0x41a637 jmp 0x41a639 testb $0x1, 0x57(%rsp) jne 0x41a642 jmp 0x41a64c leaq 0x58(%rsp), %rdi callq 0x3ef0f0 jmp 0x41a5cb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) testb $0x1, 0x57(%rsp) jne 0x41a668 jmp 0x41a672 leaq 0x58(%rsp), %rdi callq 0x3ef0f0 jmp 0x41a7e5 movq 0xd0(%rsp), %rdi movq 0xc8(%rsp), %rsi callq 0x413130 movq %rax, 0x38(%rsp) movq 0xd0(%rsp), %rdi movq 0xc0(%rsp), %rsi callq 0x413130 movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax movl 0x94(%rsp), %ecx shrl $0x5, %ecx movl %ecx, %ecx shlq $0x2, %rcx addq %rcx, %rax movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rax movl 0x94(%rsp), %ecx shrl $0x5, %ecx movl %ecx, %ecx shlq $0x2, %rcx addq %rcx, %rax movq %rax, 0x20(%rsp) movq 0x38(%rsp), %rax movl (%rax), %eax andl $0x1, %eax cmpl $0x0, %eax sete %al andb $0x1, %al movb %al, 0x1f(%rsp) movq 0x30(%rsp), %rax movl (%rax), %eax andl $0x1, %eax cmpl $0x0, %eax sete %al andb $0x1, %al movb %al, 0x1e(%rsp) movl 0x94(%rsp), %ecx andl $0x1f, %ecx movl $0x1, %eax shll %cl, %eax xorl $-0x1, %eax movl %eax, 0x18(%rsp) movq 0xa0(%rsp), %r10 movq 0xb0(%rsp), %r9 movb 0x1f(%rsp), %r8b movq 0xc8(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0xa8(%rsp), %rdx movb 0x1e(%rsp), %cl movq 0xc0(%rsp), %rax movq %r10, 0x110(%rsp) movq %r9, 0x108(%rsp) andb $0x1, %r8b movb %r8b, 0x107(%rsp) movq %rdi, 0xf8(%rsp) movq %rsi, 0xf0(%rsp) movq %rdx, 0xe8(%rsp) andb $0x1, %cl movb %cl, 0xe7(%rsp) movq %rax, 0xd8(%rsp) movq 0x110(%rsp), %rax movq %rax, 0x120(%rsp) movq 0x120(%rsp), %rdi movq 0xf0(%rsp), %rax movq %rax, 0x118(%rsp) movq 0x118(%rsp), %rsi callq 0x1a61e0 addq $0x128, %rsp # imm = 0x128 retq movq 0x48(%rsp), %rdi callq 0x198ce0 nop
_ZN6google8protobuf8internal15SwapFieldHelper18SwapInlinedStringsILb1EEEvPKNS0_10ReflectionEPNS0_7MessageES8_PKNS0_15FieldDescriptorE: sub rsp, 128h mov [rsp+128h+var_58], rdi mov [rsp+128h+var_60], rsi mov [rsp+128h+var_68], rdx mov [rsp+128h+var_70], rcx mov rdi, [rsp+128h+var_60]; this call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov [rsp+128h+var_78], rax mov rdi, [rsp+128h+var_68]; this call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov [rsp+128h+var_80], rax mov rdi, [rsp+128h+var_58] mov rsi, [rsp+128h+var_60] mov rdx, [rsp+128h+var_70] call _ZNK6google8protobuf10Reflection10MutableRawINS0_8internal18InlinedStringFieldEEEPT_PNS0_7MessageEPKNS0_15FieldDescriptorE; google::protobuf::Reflection::MutableRaw<google::protobuf::internal::InlinedStringField>(google::protobuf::Message *,google::protobuf::FieldDescriptor const*) mov [rsp+128h+var_88], rax mov rdi, [rsp+128h+var_58] mov rsi, [rsp+128h+var_68] mov rdx, [rsp+128h+var_70] call _ZNK6google8protobuf10Reflection10MutableRawINS0_8internal18InlinedStringFieldEEEPT_PNS0_7MessageEPKNS0_15FieldDescriptorE; google::protobuf::Reflection::MutableRaw<google::protobuf::internal::InlinedStringField>(google::protobuf::Message *,google::protobuf::FieldDescriptor const*) mov [rsp+128h+var_90], rax mov rdi, [rsp+128h+var_58] add rdi, 8; this mov rsi, [rsp+128h+var_70]; google::protobuf::FieldDescriptor * call _ZNK6google8protobuf8internal16ReflectionSchema18InlinedStringIndexEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::InlinedStringIndex(google::protobuf::FieldDescriptor const*) mov [rsp+128h+var_94], eax loc_41A5CB: xor eax, eax test al, 1 jnz short loc_41A5D6 jmp loc_41A677 loc_41A5D6: mov eax, [rsp+128h+var_94] mov [rsp+128h+var_D1], 0 cmp eax, 0 jbe short loc_41A5E9 jmp short loc_41A639 loc_41A5E9: lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+128h+var_D0] mov [rsp+128h+var_120], rdi mov esi, 3 mov ecx, 218h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+128h+var_120] mov [rsp+128h+var_D1], 1 lea rsi, aCheckFailedInd_1; "CHECK failed: (index) > (0): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+128h+var_118], rax jmp short $+2 loc_41A626: mov rsi, [rsp+128h+var_118] lea rdi, [rsp+128h+var_E5] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_41A637: jmp short $+2 loc_41A639: test [rsp+128h+var_D1], 1 jnz short loc_41A642 jmp short loc_41A64C loc_41A642: lea rdi, [rsp+128h+var_D0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_41A64C: jmp loc_41A5CB mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax test [rsp+arg_4F], 1 jnz short loc_41A668 jmp short loc_41A672 loc_41A668: lea rdi, [rsp+arg_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_41A672: jmp loc_41A7E5 loc_41A677: mov rdi, [rsp+128h+var_58]; this mov rsi, [rsp+128h+var_60]; google::protobuf::Message * call _ZNK6google8protobuf10Reflection32MutableInlinedStringDonatedArrayEPNS0_7MessageE; google::protobuf::Reflection::MutableInlinedStringDonatedArray(google::protobuf::Message *) mov [rsp+128h+var_F0], rax mov rdi, [rsp+128h+var_58]; this mov rsi, [rsp+128h+var_68]; google::protobuf::Message * call _ZNK6google8protobuf10Reflection32MutableInlinedStringDonatedArrayEPNS0_7MessageE; google::protobuf::Reflection::MutableInlinedStringDonatedArray(google::protobuf::Message *) mov [rsp+128h+var_F8], rax mov rax, [rsp+128h+var_F0] mov ecx, [rsp+128h+var_94] shr ecx, 5 mov ecx, ecx shl rcx, 2 add rax, rcx mov [rsp+128h+var_100], rax mov rax, [rsp+128h+var_F8] mov ecx, [rsp+128h+var_94] shr ecx, 5 mov ecx, ecx shl rcx, 2 add rax, rcx mov [rsp+128h+var_108], rax mov rax, [rsp+128h+var_F0] mov eax, [rax] and eax, 1 cmp eax, 0 setz al and al, 1 mov [rsp+128h+var_109], al mov rax, [rsp+128h+var_F8] mov eax, [rax] and eax, 1 cmp eax, 0 setz al and al, 1 mov [rsp+128h+var_10A], al mov ecx, [rsp+128h+var_94] and ecx, 1Fh mov eax, 1 shl eax, cl xor eax, 0FFFFFFFFh mov [rsp+128h+var_110], eax mov r10, [rsp+128h+var_88] mov r9, [rsp+128h+var_78] mov r8b, [rsp+128h+var_109] mov rdi, [rsp+128h+var_60] mov rsi, [rsp+128h+var_90] mov rdx, [rsp+128h+var_80] mov cl, [rsp+128h+var_10A] mov rax, [rsp+128h+var_68] mov [rsp+128h+var_18], r10 mov [rsp+128h+var_20], r9 and r8b, 1 mov [rsp+128h+var_21], r8b mov [rsp+128h+var_30], rdi mov [rsp+128h+var_38], rsi mov [rsp+128h+var_40], rdx and cl, 1 mov [rsp+128h+var_41], cl mov [rsp+128h+var_50], rax mov rax, [rsp+128h+var_18] mov [rsp+128h+var_8], rax mov rdi, [rsp+128h+var_8] mov rax, [rsp+128h+var_38] mov [rsp+128h+var_10], rax mov rsi, [rsp+128h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4swapERS4_; std::string::swap(std::string&) add rsp, 128h retn loc_41A7E5: mov rdi, [rsp+arg_40] call __Unwind_Resume
long long google::protobuf::internal::SwapFieldHelper::SwapInlinedStrings<true>( long long a1, google::protobuf::MessageLite *a2, google::protobuf::MessageLite *a3, const google::protobuf::FieldDescriptor *a4) { long long v5; // [rsp+98h] [rbp-90h] long long v6; // [rsp+A0h] [rbp-88h] google::protobuf::MessageLite::GetArenaForAllocation(a2); google::protobuf::MessageLite::GetArenaForAllocation(a3); v6 = google::protobuf::Reflection::MutableRaw<google::protobuf::internal::InlinedStringField>(a1, (long long)a2, a4); v5 = google::protobuf::Reflection::MutableRaw<google::protobuf::internal::InlinedStringField>(a1, (long long)a3, a4); google::protobuf::internal::ReflectionSchema::InlinedStringIndex( (google::protobuf::internal::ReflectionSchema *)(a1 + 8), a4); google::protobuf::Reflection::MutableInlinedStringDonatedArray((google::protobuf::Reflection *)a1, a2); google::protobuf::Reflection::MutableInlinedStringDonatedArray((google::protobuf::Reflection *)a1, a3); return std::string::swap(v6, v5); }
__miter_base<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>: MOV qword ptr [RSP + -0x10],RDI MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RSP + -0x8],RAX MOV RAX,qword ptr [RSP + -0x8] RET
/* __gnu_cxx::__normal_iterator<std::__cxx11::string const*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > > std::__miter_base<__gnu_cxx::__normal_iterator<std::__cxx11::string const*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > > >(__gnu_cxx::__normal_iterator<std::__cxx11::string const*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >) */ int8 std:: __miter_base<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>> (int8 param_1) { return param_1; }
28,682
Vector3Distance
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI float Vector3Distance(Vector3 v1, Vector3 v2) { float result = 0.0f; float dx = v2.x - v1.x; float dy = v2.y - v1.y; float dz = v2.z - v1.z; result = sqrtf(dx*dx + dy*dy + dz*dz); return result; }
O2
c
Vector3Distance: subps %xmm0, %xmm2 subss %xmm1, %xmm3 movaps %xmm2, %xmm0 mulps %xmm2, %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] mulss %xmm2, %xmm2 addss %xmm0, %xmm2 mulss %xmm3, %xmm3 addss %xmm2, %xmm3 sqrtss %xmm3, %xmm0 retq
Vector3Distance: subps xmm2, xmm0 subss xmm3, xmm1 movaps xmm0, xmm2 mulps xmm0, xmm2 shufps xmm0, xmm0, 55h ; 'U' mulss xmm2, xmm2 addss xmm2, xmm0 mulss xmm3, xmm3 addss xmm3, xmm2 sqrtss xmm0, xmm3 retn
float Vector3Distance(__m128 a1, float a2, __m128 a3, float a4) { __m128 v4; // xmm2 __m128 v5; // xmm0 v4 = _mm_sub_ps(a3, a1); v5 = _mm_mul_ps(v4, v4); return fsqrt( (float)((float)(a4 - a2) * (float)(a4 - a2)) + (float)((float)(v4.m128_f32[0] * v4.m128_f32[0]) + _mm_shuffle_ps(v5, v5, 85).m128_f32[0])); }
Vector3Distance: SUBPS XMM2,XMM0 SUBSS XMM3,XMM1 MOVAPS XMM0,XMM2 MULPS XMM0,XMM2 SHUFPS XMM0,XMM0,0x55 MULSS XMM2,XMM2 ADDSS XMM2,XMM0 MULSS XMM3,XMM3 ADDSS XMM3,XMM2 SQRTSS XMM0,XMM3 RET
int8 Vector3Distance(int8 param_1,float param_2,int8 param_3,float param_4) { float fVar1; float fVar2; fVar1 = (float)param_3 - (float)param_1; fVar2 = (float)((ulong)param_3 >> 0x20) - (float)((ulong)param_1 >> 0x20); fVar2 = fVar2 * fVar2; return CONCAT44(fVar2,SQRT((param_4 - param_2) * (param_4 - param_2) + fVar1 * fVar1 + fVar2)); }
28,683
Vector3Distance
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI float Vector3Distance(Vector3 v1, Vector3 v2) { float result = 0.0f; float dx = v2.x - v1.x; float dy = v2.y - v1.y; float dz = v2.z - v1.z; result = sqrtf(dx*dx + dy*dy + dz*dz); return result; }
O3
c
Vector3Distance: subps %xmm0, %xmm2 subss %xmm1, %xmm3 movaps %xmm2, %xmm0 mulps %xmm2, %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] mulss %xmm2, %xmm2 addss %xmm0, %xmm2 mulss %xmm3, %xmm3 addss %xmm2, %xmm3 xorps %xmm0, %xmm0 sqrtss %xmm3, %xmm0 retq
Vector3Distance: subps xmm2, xmm0 subss xmm3, xmm1 movaps xmm0, xmm2 mulps xmm0, xmm2 shufps xmm0, xmm0, 55h ; 'U' mulss xmm2, xmm2 addss xmm2, xmm0 mulss xmm3, xmm3 addss xmm3, xmm2 xorps xmm0, xmm0 sqrtss xmm0, xmm3 retn
float Vector3Distance(__m128 a1, float a2, __m128 a3, float a4) { __m128 v4; // xmm2 __m128 v5; // xmm0 v4 = _mm_sub_ps(a3, a1); v5 = _mm_mul_ps(v4, v4); return fsqrt( (float)((float)(a4 - a2) * (float)(a4 - a2)) + (float)((float)(v4.m128_f32[0] * v4.m128_f32[0]) + _mm_shuffle_ps(v5, v5, 85).m128_f32[0])); }
Vector3Distance: SUBPS XMM2,XMM0 SUBSS XMM3,XMM1 MOVAPS XMM0,XMM2 MULPS XMM0,XMM2 SHUFPS XMM0,XMM0,0x55 MULSS XMM2,XMM2 ADDSS XMM2,XMM0 MULSS XMM3,XMM3 ADDSS XMM3,XMM2 XORPS XMM0,XMM0 SQRTSS XMM0,XMM3 RET
float Vector3Distance(int8 param_1,float param_2,int8 param_3,float param_4) { float fVar1; float fVar2; fVar1 = (float)param_3 - (float)param_1; fVar2 = (float)((ulong)param_3 >> 0x20) - (float)((ulong)param_1 >> 0x20); return SQRT((param_4 - param_2) * (param_4 - param_2) + fVar1 * fVar1 + fVar2 * fVar2); }
28,684
uf_space_prespace_selected
eloqsql/storage/maria/ma_packrec.c
static void uf_space_prespace_selected(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill(to, (end-to), ' '); else { if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill(to, spaces, ' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } else decode_bytes(rec,bit_buff,to,end); } }
O0
c
uf_space_prespace_selected: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x3a407 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x3a42b jmp 0x3a449 movq -0x10(%rbp), %rdi callq 0x39690 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x3a449 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx movl $0x20, %esi callq 0x2a2c0 jmp 0x3a572 movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x3a47b movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x3a4a3 jmp 0x3a55b movq -0x10(%rbp), %rdi callq 0x39690 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x3a55b movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x24(%rcx), %eax jb 0x3a4e6 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %ecx movl %ecx, %edx leaq 0x282e02(%rip), %rcx # 0x2bd2e0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0x3a4f9 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x24(%rax), %esi callq 0x38e40 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0x3a51b movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0x3a572 movq -0x18(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2c0 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0x3a559 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x24(%rbp), %eax addq %rax, %rdx movq -0x20(%rbp), %rcx callq 0x399d0 jmp 0x3a570 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x399d0 jmp 0x3a572 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
uf_space_prespace_selected: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_3A407 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_3A42B jmp short loc_3A449 loc_3A407: mov rdi, [rbp+var_10] call fill_buffer mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_3A449 loc_3A42B: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax mov esi, 20h ; ' ' call _memset jmp loc_3A572 loc_3A449: mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_3A47B mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_3A4A3 jmp loc_3A55B loc_3A47B: mov rdi, [rbp+var_10] call fill_buffer mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz loc_3A55B loc_3A4A3: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+24h] jb short loc_3A4E6 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+24h] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+24h] mov edx, ecx lea rcx, mask and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_3A4F9 loc_3A4E6: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+24h] call fill_and_get_bits mov [rbp+var_28], eax loc_3A4F9: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_3A51B mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_3A572 loc_3A51B: mov rdi, [rbp+var_18] mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_3A559 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov eax, [rbp+var_24] add rdx, rax mov rcx, [rbp+var_20] call decode_bytes loc_3A559: jmp short loc_3A570 loc_3A55B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes loc_3A570: jmp short $+2 loc_3A572: add rsp, 30h pop rbp retn
long long uf_space_prespace_selected(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx long long result; // rax int v7; // eax int v8; // ecx unsigned int v9; // eax int v10; // ecx unsigned int bits; // [rsp+8h] [rbp-28h] if ( !a2[1] ) { fill_buffer((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) goto LABEL_6; return memset(a3, 32LL, a4 - a3); } v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) != 0 ) return memset(a3, 32LL, a4 - a3); LABEL_6: if ( a2[1] ) { v7 = *a2; v8 = a2[1] - 1; a2[1] = v8; if ( ((1 << v8) & v7) == 0 ) return decode_bytes(a1, (long long)a2, a3, a4); } else { fill_buffer((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) return decode_bytes(a1, (long long)a2, a3, a4); } if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) ) { bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36)); } else { v9 = *a2; v10 = a2[1] - *(_DWORD *)(a1 + 36); a2[1] = v10; bits = mask[*(unsigned int *)(a1 + 36)] & (v9 >> v10); } if ( &a3[bits] <= a4 ) { memset(a3, 32LL, bits); result = (long long)&a3[bits]; if ( (_BYTE *)result != a4 ) return decode_bytes(a1, (long long)a2, &a3[bits], a4); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_space_prespace_selected: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x0013a407 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0013a42b JMP 0x0013a449 LAB_0013a407: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00139690 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0013a449 LAB_0013a42b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV ESI,0x20 CALL 0x0012a2c0 JMP 0x0013a572 LAB_0013a449: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x0013a47b MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0013a4a3 JMP 0x0013a55b LAB_0013a47b: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00139690 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0013a55b LAB_0013a4a3: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x24] JC 0x0013a4e6 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x24] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x24] MOV EDX,ECX LEA RCX,[0x3bd2e0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x0013a4f9 LAB_0013a4e6: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x24] CALL 0x00138e40 MOV dword ptr [RBP + -0x28],EAX LAB_0013a4f9: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x0013a51b MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x0013a572 LAB_0013a51b: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x0013a559 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x20] CALL 0x001399d0 LAB_0013a559: JMP 0x0013a570 LAB_0013a55b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001399d0 LAB_0013a570: JMP 0x0013a572 LAB_0013a572: ADD RSP,0x30 POP RBP RET
void uf_space_prespace_selected(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { decode_bytes(param_1,param_2,param_3,param_4); } else { if (param_2[1] < *(uint *)(param_1 + 0x24)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x24); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)local_30); if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4); } } } } else { memset(param_3,0x20,param_4 - (long)param_3); } return; }
28,685
uf_space_prespace_selected
eloqsql/storage/maria/ma_packrec.c
static void uf_space_prespace_selected(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill(to, (end-to), ' '); else { if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill(to, spaces, ' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } else decode_bytes(rec,bit_buff,to,end); } }
O3
c
uf_space_prespace_selected: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %r13 movl 0x4(%rsi), %eax testl %eax, %eax je 0x3af80 movl (%r14), %r15d decl %eax movl %eax, 0x4(%r14) btl %eax, %r15d jb 0x3aff5 testl %eax, %eax jne 0x3af9d movq %r14, %rdi callq 0x3a694 movl $0x1f, 0x4(%r14) movl (%r14), %r15d testl %r15d, %r15d jns 0x3b016 movl $0x1f, %eax jmp 0x3afa9 movq %r14, %rdi callq 0x3a694 movl $0x1f, 0x4(%r14) movl (%r14), %r15d movl $0x1f, %eax testl %r15d, %r15d js 0x3aff5 decl %eax movl %eax, 0x4(%r14) btl %eax, %r15d jae 0x3b016 movq %r13, %rdx movl 0x24(%r13), %r13d movl %eax, %ecx subl %r13d, %ecx movq %rdx, -0x30(%rbp) jae 0x3b021 subl %eax, %r13d movl %eax, %eax leaq 0xa6159(%rip), %rcx # 0xe1120 andl (%rcx,%rax,4), %r15d movl %r13d, %ecx shll %cl, %r15d movq %r14, %rdi callq 0x3a694 movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r14) movl (%r14), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %r15d jmp 0x3b036 subq %r12, %rbx movq %r12, %rdi movl $0x20, %esi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x292c0 movq %r13, %rdi movq %r14, %rsi movq %r12, %rdx jmp 0x3b068 movl %ecx, 0x4(%r14) shrl %cl, %r15d movl 0x24(%rdx), %eax leaq 0xa60ee(%rip), %rcx # 0xe1120 andl (%rcx,%rax,4), %r15d movl %r15d, %edx leaq (%r12,%rdx), %r13 cmpq %rbx, %r13 jbe 0x3b04c movl $0x1, 0x28(%r14) jmp 0x3b07e movq %r12, %rdi movl $0x20, %esi callq 0x292c0 cmpq %rbx, %r13 je 0x3b07e movq -0x30(%rbp), %rdi movq %r14, %rsi movq %r13, %rdx movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3a851 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
uf_space_prespace_selected: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r12, rdx mov r14, rsi mov r13, rdi mov eax, [rsi+4] test eax, eax jz short loc_3AF80 mov r15d, [r14] dec eax mov [r14+4], eax bt r15d, eax jb loc_3AFF5 test eax, eax jnz short loc_3AF9D mov rdi, r14 call fill_buffer mov dword ptr [r14+4], 1Fh mov r15d, [r14] test r15d, r15d jns loc_3B016 mov eax, 1Fh jmp short loc_3AFA9 loc_3AF80: mov rdi, r14 call fill_buffer mov dword ptr [r14+4], 1Fh mov r15d, [r14] mov eax, 1Fh test r15d, r15d js short loc_3AFF5 loc_3AF9D: dec eax mov [r14+4], eax bt r15d, eax jnb short loc_3B016 loc_3AFA9: mov rdx, r13 mov r13d, [r13+24h] mov ecx, eax sub ecx, r13d mov [rbp+var_30], rdx jnb short loc_3B021 sub r13d, eax mov eax, eax lea rcx, mask and r15d, [rcx+rax*4] mov ecx, r13d shl r15d, cl mov rdi, r14 call fill_buffer mov eax, 20h ; ' ' sub eax, r13d mov [r14+4], eax mov eax, [r14] neg r13d mov ecx, r13d shr eax, cl add r15d, eax jmp short loc_3B036 loc_3AFF5: sub rbx, r12 mov rdi, r12 mov esi, 20h ; ' ' mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset loc_3B016: mov rdi, r13 mov rsi, r14 mov rdx, r12 jmp short loc_3B068 loc_3B021: mov [r14+4], ecx shr r15d, cl mov eax, [rdx+24h] lea rcx, mask and r15d, [rcx+rax*4] loc_3B036: mov edx, r15d lea r13, [r12+rdx] cmp r13, rbx jbe short loc_3B04C mov dword ptr [r14+28h], 1 jmp short loc_3B07E loc_3B04C: mov rdi, r12 mov esi, 20h ; ' ' call _memset cmp r13, rbx jz short loc_3B07E mov rdi, [rbp+var_30] mov rsi, r14 mov rdx, r13 loc_3B068: mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes loc_3B07E: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long uf_space_prespace_selected(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4) { unsigned int v6; // eax unsigned int v7; // r15d unsigned int v8; // eax unsigned int v9; // eax unsigned int v10; // r13d unsigned int v11; // ecx int v12; // r13d int v13; // r15d long long result; // rax unsigned int v15; // r15d _BYTE *v16; // rdx _BYTE *v17; // r13 v6 = a2[1]; if ( !v6 ) { fill_buffer((long long)a2); a2[1] = 31; v7 = *a2; v8 = 31; if ( (*a2 & 0x80000000) == 0 ) goto LABEL_7; return memset(a3, 32LL, a4 - a3); } v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest((const int *)&v7, v8) ) return memset(a3, 32LL, a4 - a3); if ( !v8 ) { fill_buffer((long long)a2); a2[1] = 31; v7 = *a2; if ( (*a2 & 0x80000000) != 0 ) { v9 = 31; goto LABEL_8; } LABEL_11: v16 = a3; return (long long)decode_bytes(a1, (long long)a2, v16, a4); } LABEL_7: v9 = v8 - 1; a2[1] = v9; if ( !_bittest((const int *)&v7, v9) ) goto LABEL_11; LABEL_8: v10 = *(_DWORD *)(a1 + 36); v11 = v9 - v10; if ( v9 >= v10 ) { a2[1] = v11; result = *(unsigned int *)(a1 + 36); v15 = mask[result] & (v7 >> v11); } else { v12 = v10 - v9; v13 = (mask[v9] & v7) << v12; fill_buffer((long long)a2); a2[1] = 32 - v12; result = *a2 >> -(char)v12; v15 = result + v13; } v17 = &a3[v15]; if ( v17 > a4 ) { a2[10] = 1; return result; } result = memset(a3, 32LL, v15); if ( v17 != a4 ) { v16 = &a3[v15]; return (long long)decode_bytes(a1, (long long)a2, v16, a4); } return result; }
uf_space_prespace_selected: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R12,RDX MOV R14,RSI MOV R13,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x0013af80 MOV R15D,dword ptr [R14] DEC EAX MOV dword ptr [R14 + 0x4],EAX BT R15D,EAX JC 0x0013aff5 TEST EAX,EAX JNZ 0x0013af9d MOV RDI,R14 CALL 0x0013a694 MOV dword ptr [R14 + 0x4],0x1f MOV R15D,dword ptr [R14] TEST R15D,R15D JNS 0x0013b016 MOV EAX,0x1f JMP 0x0013afa9 LAB_0013af80: MOV RDI,R14 CALL 0x0013a694 MOV dword ptr [R14 + 0x4],0x1f MOV R15D,dword ptr [R14] MOV EAX,0x1f TEST R15D,R15D JS 0x0013aff5 LAB_0013af9d: DEC EAX MOV dword ptr [R14 + 0x4],EAX BT R15D,EAX JNC 0x0013b016 LAB_0013afa9: MOV RDX,R13 MOV R13D,dword ptr [R13 + 0x24] MOV ECX,EAX SUB ECX,R13D MOV qword ptr [RBP + -0x30],RDX JNC 0x0013b021 SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x1e1120] AND R15D,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL R15D,CL MOV RDI,R14 CALL 0x0013a694 MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R14 + 0x4],EAX MOV EAX,dword ptr [R14] NEG R13D MOV ECX,R13D SHR EAX,CL ADD R15D,EAX JMP 0x0013b036 LAB_0013aff5: SUB RBX,R12 MOV RDI,R12 MOV ESI,0x20 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001292c0 LAB_0013b016: MOV RDI,R13 MOV RSI,R14 MOV RDX,R12 JMP 0x0013b068 LAB_0013b021: MOV dword ptr [R14 + 0x4],ECX SHR R15D,CL MOV EAX,dword ptr [RDX + 0x24] LEA RCX,[0x1e1120] AND R15D,dword ptr [RCX + RAX*0x4] LAB_0013b036: MOV EDX,R15D LEA R13,[R12 + RDX*0x1] CMP R13,RBX JBE 0x0013b04c MOV dword ptr [R14 + 0x28],0x1 JMP 0x0013b07e LAB_0013b04c: MOV RDI,R12 MOV ESI,0x20 CALL 0x001292c0 CMP R13,RBX JZ 0x0013b07e MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R14 MOV RDX,R13 LAB_0013b068: MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013a851 LAB_0013b07e: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void uf_space_prespace_selected(long param_1,uint *param_2,void *param_3,void *param_4) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; void *pvVar5; uint uVar6; pvVar5 = param_3; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar6 = *param_2; uVar3 = 0x1f; if ((int)uVar6 < 0) goto LAB_0013aff5; LAB_0013af9d: uVar3 = uVar3 - 1; param_2[1] = uVar3; if ((uVar6 >> (uVar3 & 0x1f) & 1) == 0) goto LAB_0013b068; } else { uVar6 = *param_2; uVar3 = param_2[1] - 1; param_2[1] = uVar3; if ((uVar6 >> (uVar3 & 0x1f) & 1) != 0) { LAB_0013aff5: memset(param_3,0x20,(long)param_4 - (long)param_3); return; } if (uVar3 != 0) goto LAB_0013af9d; fill_buffer(param_2); param_2[1] = 0x1f; uVar6 = *param_2; if (-1 < (int)uVar6) goto LAB_0013b068; uVar3 = 0x1f; } uVar1 = *(uint *)(param_1 + 0x24); if (uVar3 < uVar1) { uVar2 = (&mask)[uVar3]; bVar4 = (byte)(uVar1 - uVar3); fill_buffer(param_2); param_2[1] = 0x20 - (uVar1 - uVar3); uVar6 = ((uVar6 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f)); } else { param_2[1] = uVar3 - uVar1; uVar6 = uVar6 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)]; } pvVar5 = (void *)((long)param_3 + (ulong)uVar6); if (param_4 < pvVar5) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)uVar6); if (pvVar5 != param_4) { LAB_0013b068: decode_bytes(param_1,param_2,pvVar5,param_4); return; } } return; }
28,686
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceTopology.cpp
void FaceTopology::Initialize(int faceSize) { _faceSize = faceSize; _numFaceVertsTotal = 0; _combinedTag.Clear(); _isInitialized = true; _isFinalized = false; _corner.SetSize(faceSize); }
O1
cpp
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movl %esi, 0x8(%rdi) movl $0x0, 0x10(%rdi) movw $0x0, 0x14(%rdi) movb 0x16(%rdi), %al andb $-0x4, %al incb %al movb %al, 0x16(%rdi) cmpl $0x0, 0x20(%rdi) je 0x869cc xorl %r15d, %r15d xorl %r12d, %r12d movq 0x18(%r14), %rdi addq %r15, %rdi callq 0x384c0 incq %r12 movl 0x20(%r14), %eax addq $0xe0, %r15 cmpq %rax, %r12 jb 0x869ad testl %ebx, %ebx je 0x86a11 cmpl %ebx, 0x24(%r14) jae 0x86a2d movq 0x3a8(%r14), %rdi callq 0x3a0c0 leaq 0x28(%r14), %rax movq %rax, 0x18(%r14) movl $0x4, 0x24(%r14) movl %ebx, %eax imulq $0xe0, %rax, %rdi callq 0x3a230 movq %rax, 0x3a8(%r14) movq %rax, 0x18(%r14) movl %ebx, 0x24(%r14) jmp 0x86a2d movq 0x3a8(%r14), %rdi callq 0x3a0c0 leaq 0x28(%r14), %rax movq %rax, 0x18(%r14) movl $0x4, 0x24(%r14) movl %ebx, 0x20(%r14) testl %ebx, %ebx je 0x86a8c movq 0x18(%r14), %rax movl %ebx, %ecx addq $0x70, %rax movabsq $0x1000000000, %rdx # imm = 0x1000000000 xorl %esi, %esi movabsq $0x800000000, %rdi # imm = 0x800000000 leaq -0x58(%rax), %r8 movq %r8, -0x68(%rax) movq %rdx, -0x60(%rax) movq %rsi, -0x18(%rax) movq %rax, -0x10(%rax) movq %rdi, -0x8(%rax) movq %rsi, 0x20(%rax) leaq 0x48(%rax), %r8 movq %r8, 0x38(%rax) movq %rdx, 0x40(%rax) movq %rsi, 0x68(%rax) addq $0xe0, %rax decq %rcx jne 0x86a55 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN10OpenSubdiv6v3_6_03Bfr12FaceTopology10InitializeEi: push r15 push r14 push r12 push rbx push rax mov ebx, esi mov r14, rdi mov [rdi+8], esi mov dword ptr [rdi+10h], 0 mov word ptr [rdi+14h], 0 mov al, [rdi+16h] and al, 0FCh inc al mov [rdi+16h], al cmp dword ptr [rdi+20h], 0 jz short loc_869CC xor r15d, r15d xor r12d, r12d loc_869AD: mov rdi, [r14+18h] add rdi, r15; this call __ZN10OpenSubdiv6v3_6_03Bfr10FaceVertexD2Ev; OpenSubdiv::v3_6_0::Bfr::FaceVertex::~FaceVertex() inc r12 mov eax, [r14+20h] add r15, 0E0h cmp r12, rax jb short loc_869AD loc_869CC: test ebx, ebx jz short loc_86A11 cmp [r14+24h], ebx jnb short loc_86A2D mov rdi, [r14+3A8h]; void * call __ZdlPv; operator delete(void *) lea rax, [r14+28h] mov [r14+18h], rax mov dword ptr [r14+24h], 4 mov eax, ebx imul rdi, rax, 0E0h; unsigned __int64 call __Znwm; operator new(ulong) mov [r14+3A8h], rax mov [r14+18h], rax mov [r14+24h], ebx jmp short loc_86A2D loc_86A11: mov rdi, [r14+3A8h]; void * call __ZdlPv; operator delete(void *) lea rax, [r14+28h] mov [r14+18h], rax mov dword ptr [r14+24h], 4 loc_86A2D: mov [r14+20h], ebx test ebx, ebx jz short loc_86A8C mov rax, [r14+18h] mov ecx, ebx add rax, 70h ; 'p' mov rdx, 1000000000h xor esi, esi mov rdi, 800000000h loc_86A55: lea r8, [rax-58h] mov [rax-68h], r8 mov [rax-60h], rdx mov [rax-18h], rsi mov [rax-10h], rax mov [rax-8], rdi mov [rax+20h], rsi lea r8, [rax+48h] mov [rax+38h], r8 mov [rax+40h], rdx mov [rax+68h], rsi add rax, 0E0h dec rcx jnz short loc_86A55 loc_86A8C: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
char OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize( OpenSubdiv::v3_6_0::Bfr::FaceTopology *this, unsigned int a2) { unsigned long long v2; // rax long long v3; // r15 unsigned long long v4; // r12 long long v5; // rcx *((_DWORD *)this + 2) = a2; *((_DWORD *)this + 4) = 0; *((_WORD *)this + 10) = 0; LOBYTE(v2) = (*((_BYTE *)this + 22) & 0xFC) + 1; *((_BYTE *)this + 22) = v2; if ( *((_DWORD *)this + 8) ) { v3 = 0LL; v4 = 0LL; do { OpenSubdiv::v3_6_0::Bfr::FaceVertex::~FaceVertex((OpenSubdiv::v3_6_0::Bfr::FaceVertex *)(v3 + *((_QWORD *)this + 3))); ++v4; v2 = *((unsigned int *)this + 8); v3 += 224LL; } while ( v4 < v2 ); } if ( a2 ) { if ( *((_DWORD *)this + 9) < a2 ) { operator delete(*((void **)this + 117)); *((_QWORD *)this + 3) = (char *)this + 40; *((_DWORD *)this + 9) = 4; v2 = operator new(224LL * a2); *((_QWORD *)this + 117) = v2; *((_QWORD *)this + 3) = v2; *((_DWORD *)this + 9) = a2; } } else { operator delete(*((void **)this + 117)); LOBYTE(v2) = (_BYTE)this + 40; *((_QWORD *)this + 3) = (char *)this + 40; *((_DWORD *)this + 9) = 4; } *((_DWORD *)this + 8) = a2; if ( a2 ) { v5 = a2; v2 = *((_QWORD *)this + 3) + 112LL; do { *(_QWORD *)(v2 - 104) = v2 - 88; *(_QWORD *)(v2 - 96) = 0x1000000000LL; *(_QWORD *)(v2 - 24) = 0LL; *(_QWORD *)(v2 - 16) = v2; *(_QWORD *)(v2 - 8) = 0x800000000LL; *(_QWORD *)(v2 + 32) = 0LL; *(_QWORD *)(v2 + 56) = v2 + 72; *(_QWORD *)(v2 + 64) = 0x1000000000LL; *(_QWORD *)(v2 + 104) = 0LL; v2 += 224LL; --v5; } while ( v5 ); } return v2; }
Initialize: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV dword ptr [RDI + 0x8],ESI MOV dword ptr [RDI + 0x10],0x0 MOV word ptr [RDI + 0x14],0x0 MOV AL,byte ptr [RDI + 0x16] AND AL,0xfc INC AL MOV byte ptr [RDI + 0x16],AL CMP dword ptr [RDI + 0x20],0x0 JZ 0x001869cc XOR R15D,R15D XOR R12D,R12D LAB_001869ad: MOV RDI,qword ptr [R14 + 0x18] ADD RDI,R15 CALL 0x001384c0 INC R12 MOV EAX,dword ptr [R14 + 0x20] ADD R15,0xe0 CMP R12,RAX JC 0x001869ad LAB_001869cc: TEST EBX,EBX JZ 0x00186a11 CMP dword ptr [R14 + 0x24],EBX JNC 0x00186a2d MOV RDI,qword ptr [R14 + 0x3a8] CALL 0x0013a0c0 LEA RAX,[R14 + 0x28] MOV qword ptr [R14 + 0x18],RAX MOV dword ptr [R14 + 0x24],0x4 MOV EAX,EBX IMUL RDI,RAX,0xe0 CALL 0x0013a230 MOV qword ptr [R14 + 0x3a8],RAX MOV qword ptr [R14 + 0x18],RAX MOV dword ptr [R14 + 0x24],EBX JMP 0x00186a2d LAB_00186a11: MOV RDI,qword ptr [R14 + 0x3a8] CALL 0x0013a0c0 LEA RAX,[R14 + 0x28] MOV qword ptr [R14 + 0x18],RAX MOV dword ptr [R14 + 0x24],0x4 LAB_00186a2d: MOV dword ptr [R14 + 0x20],EBX TEST EBX,EBX JZ 0x00186a8c MOV RAX,qword ptr [R14 + 0x18] MOV ECX,EBX ADD RAX,0x70 MOV RDX,0x1000000000 XOR ESI,ESI MOV RDI,0x800000000 LAB_00186a55: LEA R8,[RAX + -0x58] MOV qword ptr [RAX + -0x68],R8 MOV qword ptr [RAX + -0x60],RDX MOV qword ptr [RAX + -0x18],RSI MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RDI MOV qword ptr [RAX + 0x20],RSI LEA R8,[RAX + 0x48] MOV qword ptr [RAX + 0x38],R8 MOV qword ptr [RAX + 0x40],RDX MOV qword ptr [RAX + 0x68],RSI ADD RAX,0xe0 DEC RCX JNZ 0x00186a55 LAB_00186a8c: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(int) */ void __thiscall OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(FaceTopology *this,int param_1) { void *pvVar1; ulong uVar2; ulong uVar3; long lVar4; uVar2 = (ulong)(uint)param_1; *(int *)(this + 8) = param_1; *(int4 *)(this + 0x10) = 0; *(int2 *)(this + 0x14) = 0; this[0x16] = (FaceTopology)(((byte)this[0x16] & 0xfc) + 1); if (*(int *)(this + 0x20) != 0) { lVar4 = 0; uVar3 = 0; do { FaceVertex::~FaceVertex((FaceVertex *)(*(long *)(this + 0x18) + lVar4)); uVar3 = uVar3 + 1; lVar4 = lVar4 + 0xe0; } while (uVar3 < *(uint *)(this + 0x20)); } if (param_1 == 0) { operator_delete(*(void **)(this + 0x3a8)); *(FaceTopology **)(this + 0x18) = this + 0x28; *(int4 *)(this + 0x24) = 4; } else if (*(uint *)(this + 0x24) < (uint)param_1) { operator_delete(*(void **)(this + 0x3a8)); *(FaceTopology **)(this + 0x18) = this + 0x28; *(int4 *)(this + 0x24) = 4; pvVar1 = operator_new(uVar2 * 0xe0); *(void **)(this + 0x3a8) = pvVar1; *(void **)(this + 0x18) = pvVar1; *(int *)(this + 0x24) = param_1; } *(int *)(this + 0x20) = param_1; if (param_1 != 0) { lVar4 = *(long *)(this + 0x18) + 0x70; do { *(long *)(lVar4 + -0x68) = lVar4 + -0x58; *(int8 *)(lVar4 + -0x60) = 0x1000000000; *(int8 *)(lVar4 + -0x18) = 0; *(long *)(lVar4 + -0x10) = lVar4; *(int8 *)(lVar4 + -8) = 0x800000000; *(int8 *)(lVar4 + 0x20) = 0; *(long *)(lVar4 + 0x38) = lVar4 + 0x48; *(int8 *)(lVar4 + 0x40) = 0x1000000000; *(int8 *)(lVar4 + 0x68) = 0; lVar4 = lVar4 + 0xe0; uVar2 = uVar2 - 1; } while (uVar2 != 0); } return; }
28,687
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceTopology.cpp
void FaceTopology::Initialize(int faceSize) { _faceSize = faceSize; _numFaceVertsTotal = 0; _combinedTag.Clear(); _isInitialized = true; _isFinalized = false; _corner.SetSize(faceSize); }
O2
cpp
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(int): movl %esi, 0x8(%rdi) andl $0x0, 0x10(%rdi) andw $0x0, 0x14(%rdi) movb 0x16(%rdi), %al andb $-0x4, %al incb %al movb %al, 0x16(%rdi) addq $0x18, %rdi jmp 0x552c0 nop
_ZN10OpenSubdiv6v3_6_03Bfr12FaceTopology10InitializeEi: mov [rdi+8], esi and dword ptr [rdi+10h], 0 and word ptr [rdi+14h], 0 mov al, [rdi+16h] and al, 0FCh inc al mov [rdi+16h], al add rdi, 18h jmp __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferINS0_3Bfr10FaceVertexELj4ELb0EE7SetSizeEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Bfr::FaceVertex,4u,false>::SetSize(uint)
long long OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize( OpenSubdiv::v3_6_0::Bfr::FaceTopology *this, int a2) { *((_DWORD *)this + 2) = a2; *((_DWORD *)this + 4) = 0; *((_WORD *)this + 10) = 0; *((_BYTE *)this + 22) = (*((_BYTE *)this + 22) & 0xFC) + 1; return OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Bfr::FaceVertex,4u,false>::SetSize((char *)this + 24); }
Initialize: MOV dword ptr [RDI + 0x8],ESI AND dword ptr [RDI + 0x10],0x0 AND word ptr [RDI + 0x14],0x0 MOV AL,byte ptr [RDI + 0x16] AND AL,0xfc INC AL MOV byte ptr [RDI + 0x16],AL ADD RDI,0x18 JMP 0x001552c0
/* OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(int) */ void __thiscall OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(FaceTopology *this,int param_1) { *(int *)(this + 8) = param_1; *(int4 *)(this + 0x10) = 0; *(int2 *)(this + 0x14) = 0; this[0x16] = (FaceTopology)(((byte)this[0x16] & 0xfc) + 1); Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Bfr::FaceVertex,4u,false>::SetSize ((StackBuffer<OpenSubdiv::v3_6_0::Bfr::FaceVertex,4u,false> *)(this + 0x18),param_1); return; }
28,688
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceTopology.cpp
void FaceTopology::Initialize(int faceSize) { _faceSize = faceSize; _numFaceVertsTotal = 0; _combinedTag.Clear(); _isInitialized = true; _isFinalized = false; _corner.SetSize(faceSize); }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx movl %esi, 0x8(%rdi) movl $0x0, 0x10(%rdi) movw $0x0, 0x14(%rdi) movb 0x16(%rdi), %al andb $-0x4, %al incb %al movb %al, 0x16(%rdi) cmpl $0x0, 0x20(%rdi) je 0x891aa xorl %r14d, %r14d xorl %r15d, %r15d movq 0x18(%rbx), %rdi addq %r14, %rdi callq 0x384c0 incq %r15 movl 0x20(%rbx), %eax addq $0xe0, %r14 cmpq %rax, %r15 jb 0x8918c testl %ebp, %ebp je 0x891ed cmpl %ebp, 0x24(%rbx) jae 0x89211 movq 0x3a8(%rbx), %rdi callq 0x3a0a0 leaq 0x28(%rbx), %rax movq %rax, 0x18(%rbx) movl $0x4, 0x24(%rbx) movl %ebp, %r14d imulq $0xe0, %r14, %rdi callq 0x3a210 movq %rax, 0x3a8(%rbx) movq %rax, 0x18(%rbx) movl %ebp, 0x24(%rbx) jmp 0x89218 movq 0x3a8(%rbx), %rdi callq 0x3a0a0 leaq 0x28(%rbx), %rax movq %rax, 0x18(%rbx) movabsq $0x400000000, %rax # imm = 0x400000000 movq %rax, 0x20(%rbx) jmp 0x8926c movq 0x18(%rbx), %rax movl %ebp, %r14d movl %ebp, 0x20(%rbx) addq $0x70, %rax movabsq $0x1000000000, %rcx # imm = 0x1000000000 xorl %edx, %edx movabsq $0x800000000, %rsi # imm = 0x800000000 leaq -0x58(%rax), %rdi movq %rdi, -0x68(%rax) movq %rcx, -0x60(%rax) movq %rdx, -0x18(%rax) movq %rax, -0x10(%rax) movq %rsi, -0x8(%rax) movq %rdx, 0x20(%rax) leaq 0x48(%rax), %rdi movq %rdi, 0x38(%rax) movq %rcx, 0x40(%rax) movq %rdx, 0x68(%rax) addq $0xe0, %rax decq %r14 jne 0x89235 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
_ZN10OpenSubdiv6v3_6_03Bfr12FaceTopology10InitializeEi: push rbp push r15 push r14 push rbx push rax mov ebp, esi mov rbx, rdi mov [rdi+8], esi mov dword ptr [rdi+10h], 0 mov word ptr [rdi+14h], 0 mov al, [rdi+16h] and al, 0FCh inc al mov [rdi+16h], al cmp dword ptr [rdi+20h], 0 jz short loc_891AA xor r14d, r14d xor r15d, r15d loc_8918C: mov rdi, [rbx+18h] add rdi, r14; this call __ZN10OpenSubdiv6v3_6_03Bfr10FaceVertexD2Ev; OpenSubdiv::v3_6_0::Bfr::FaceVertex::~FaceVertex() inc r15 mov eax, [rbx+20h] add r14, 0E0h cmp r15, rax jb short loc_8918C loc_891AA: test ebp, ebp jz short loc_891ED cmp [rbx+24h], ebp jnb short loc_89211 mov rdi, [rbx+3A8h]; void * call __ZdlPv; operator delete(void *) lea rax, [rbx+28h] mov [rbx+18h], rax mov dword ptr [rbx+24h], 4 mov r14d, ebp imul rdi, r14, 0E0h; unsigned __int64 call __Znwm; operator new(ulong) mov [rbx+3A8h], rax mov [rbx+18h], rax mov [rbx+24h], ebp jmp short loc_89218 loc_891ED: mov rdi, [rbx+3A8h]; void * call __ZdlPv; operator delete(void *) lea rax, [rbx+28h] mov [rbx+18h], rax mov rax, 400000000h mov [rbx+20h], rax jmp short loc_8926C loc_89211: mov rax, [rbx+18h] mov r14d, ebp loc_89218: mov [rbx+20h], ebp add rax, 70h ; 'p' mov rcx, 1000000000h xor edx, edx mov rsi, 800000000h loc_89235: lea rdi, [rax-58h] mov [rax-68h], rdi mov [rax-60h], rcx mov [rax-18h], rdx mov [rax-10h], rax mov [rax-8], rsi mov [rax+20h], rdx lea rdi, [rax+48h] mov [rax+38h], rdi mov [rax+40h], rcx mov [rax+68h], rdx add rax, 0E0h dec r14 jnz short loc_89235 loc_8926C: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize( OpenSubdiv::v3_6_0::Bfr::FaceTopology *this, unsigned int a2) { long long v2; // r14 unsigned long long v3; // r15 long long v4; // r14 long long v5; // rax long long result; // rax *((_DWORD *)this + 2) = a2; *((_DWORD *)this + 4) = 0; *((_WORD *)this + 10) = 0; *((_BYTE *)this + 22) = (*((_BYTE *)this + 22) & 0xFC) + 1; if ( *((_DWORD *)this + 8) ) { v2 = 0LL; v3 = 0LL; do { OpenSubdiv::v3_6_0::Bfr::FaceVertex::~FaceVertex((OpenSubdiv::v3_6_0::Bfr::FaceVertex *)(v2 + *((_QWORD *)this + 3))); ++v3; v2 += 224LL; } while ( v3 < *((unsigned int *)this + 8) ); } if ( a2 ) { if ( *((_DWORD *)this + 9) >= a2 ) { v5 = *((_QWORD *)this + 3); v4 = a2; } else { operator delete(*((void **)this + 117)); *((_QWORD *)this + 3) = (char *)this + 40; *((_DWORD *)this + 9) = 4; v4 = a2; v5 = operator new(224LL * a2); *((_QWORD *)this + 117) = v5; *((_QWORD *)this + 3) = v5; *((_DWORD *)this + 9) = a2; } *((_DWORD *)this + 8) = a2; result = v5 + 112; do { *(_QWORD *)(result - 104) = result - 88; *(_QWORD *)(result - 96) = 0x1000000000LL; *(_QWORD *)(result - 24) = 0LL; *(_QWORD *)(result - 16) = result; *(_QWORD *)(result - 8) = 0x800000000LL; *(_QWORD *)(result + 32) = 0LL; *(_QWORD *)(result + 56) = result + 72; *(_QWORD *)(result + 64) = 0x1000000000LL; *(_QWORD *)(result + 104) = 0LL; result += 224LL; --v4; } while ( v4 ); } else { operator delete(*((void **)this + 117)); *((_QWORD *)this + 3) = (char *)this + 40; result = 0x400000000LL; *((_QWORD *)this + 4) = 0x400000000LL; } return result; }
Initialize: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI MOV dword ptr [RDI + 0x8],ESI MOV dword ptr [RDI + 0x10],0x0 MOV word ptr [RDI + 0x14],0x0 MOV AL,byte ptr [RDI + 0x16] AND AL,0xfc INC AL MOV byte ptr [RDI + 0x16],AL CMP dword ptr [RDI + 0x20],0x0 JZ 0x001891aa XOR R14D,R14D XOR R15D,R15D LAB_0018918c: MOV RDI,qword ptr [RBX + 0x18] ADD RDI,R14 CALL 0x001384c0 INC R15 MOV EAX,dword ptr [RBX + 0x20] ADD R14,0xe0 CMP R15,RAX JC 0x0018918c LAB_001891aa: TEST EBP,EBP JZ 0x001891ed CMP dword ptr [RBX + 0x24],EBP JNC 0x00189211 MOV RDI,qword ptr [RBX + 0x3a8] CALL 0x0013a0a0 LEA RAX,[RBX + 0x28] MOV qword ptr [RBX + 0x18],RAX MOV dword ptr [RBX + 0x24],0x4 MOV R14D,EBP IMUL RDI,R14,0xe0 CALL 0x0013a210 MOV qword ptr [RBX + 0x3a8],RAX MOV qword ptr [RBX + 0x18],RAX MOV dword ptr [RBX + 0x24],EBP JMP 0x00189218 LAB_001891ed: MOV RDI,qword ptr [RBX + 0x3a8] CALL 0x0013a0a0 LEA RAX,[RBX + 0x28] MOV qword ptr [RBX + 0x18],RAX MOV RAX,0x400000000 MOV qword ptr [RBX + 0x20],RAX JMP 0x0018926c LAB_00189211: MOV RAX,qword ptr [RBX + 0x18] MOV R14D,EBP LAB_00189218: MOV dword ptr [RBX + 0x20],EBP ADD RAX,0x70 MOV RCX,0x1000000000 XOR EDX,EDX MOV RSI,0x800000000 LAB_00189235: LEA RDI,[RAX + -0x58] MOV qword ptr [RAX + -0x68],RDI MOV qword ptr [RAX + -0x60],RCX MOV qword ptr [RAX + -0x18],RDX MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RSI MOV qword ptr [RAX + 0x20],RDX LEA RDI,[RAX + 0x48] MOV qword ptr [RAX + 0x38],RDI MOV qword ptr [RAX + 0x40],RCX MOV qword ptr [RAX + 0x68],RDX ADD RAX,0xe0 DEC R14 JNZ 0x00189235 LAB_0018926c: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(int) */ void __thiscall OpenSubdiv::v3_6_0::Bfr::FaceTopology::Initialize(FaceTopology *this,int param_1) { void *pvVar1; long lVar2; ulong uVar3; ulong uVar4; uVar3 = (ulong)(uint)param_1; *(int *)(this + 8) = param_1; *(int4 *)(this + 0x10) = 0; *(int2 *)(this + 0x14) = 0; this[0x16] = (FaceTopology)(((byte)this[0x16] & 0xfc) + 1); if (*(int *)(this + 0x20) != 0) { lVar2 = 0; uVar4 = 0; do { FaceVertex::~FaceVertex((FaceVertex *)(*(long *)(this + 0x18) + lVar2)); uVar4 = uVar4 + 1; lVar2 = lVar2 + 0xe0; } while (uVar4 < *(uint *)(this + 0x20)); } if (param_1 == 0) { operator_delete(*(void **)(this + 0x3a8)); *(FaceTopology **)(this + 0x18) = this + 0x28; *(int8 *)(this + 0x20) = 0x400000000; } else { if (*(uint *)(this + 0x24) < (uint)param_1) { operator_delete(*(void **)(this + 0x3a8)); *(FaceTopology **)(this + 0x18) = this + 0x28; *(int4 *)(this + 0x24) = 4; pvVar1 = operator_new(uVar3 * 0xe0); *(void **)(this + 0x3a8) = pvVar1; *(void **)(this + 0x18) = pvVar1; *(int *)(this + 0x24) = param_1; } else { pvVar1 = *(void **)(this + 0x18); } *(int *)(this + 0x20) = param_1; lVar2 = (long)pvVar1 + 0x70; do { *(long *)(lVar2 + -0x68) = lVar2 + -0x58; *(int8 *)(lVar2 + -0x60) = 0x1000000000; *(int8 *)(lVar2 + -0x18) = 0; *(long *)(lVar2 + -0x10) = lVar2; *(int8 *)(lVar2 + -8) = 0x800000000; *(int8 *)(lVar2 + 0x20) = 0; *(long *)(lVar2 + 0x38) = lVar2 + 0x48; *(int8 *)(lVar2 + 0x40) = 0x1000000000; *(int8 *)(lVar2 + 0x68) = 0; lVar2 = lVar2 + 0xe0; uVar3 = uVar3 - 1; } while (uVar3 != 0); } return; }
28,689
main
corofx/tests/test_task_move.cpp
auto main() -> int { auto x = do_foo(); auto x2 = std::move(x); check(std::move(x2)() == marker0); x = do_foo(); check(std::move(x)() == marker0); auto x3 = do_foo(); x3 = std::move(x3); check(std::move(x3)() == marker0); auto y = do_bar().with(handler_of<bar>([](auto&& e, auto&&) -> task<int> { check(e.x == marker1); co_return marker2; })); auto y2 = std::move(y); check(std::move(y2)() == marker2); auto y3 = do_bar().with(handler_of<bar>([](auto&& e, auto&&) -> task<int> { check(e.x == marker1); co_return marker2; })); y3 = std::move(y3); check(std::move(y3)() == marker2); }
O3
cpp
main: endbr64 pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movl $0x30, %edi callq 0x1190 leaq 0x403(%rip), %rbx # 0x187f movq %rbx, (%rax) leaq 0x432(%rip), %r14 # 0x18b8 movq %r14, 0x8(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movb $0x0, 0x28(%rax) movq $0x0, -0x88(%rbp) leaq -0x90(%rbp), %rdi movq %rax, (%rdi) callq 0x1a8c xorl %edi, %edi cmpl $0x12, %eax sete %dil leaq 0x2799(%rip), %rsi # 0x3c58 callq 0x1b5c movl $0x30, %edi callq 0x1190 movq %rbx, (%rax) movq %r14, 0x8(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movb $0x0, 0x28(%rax) movq -0x88(%rbp), %rdi movq %rax, -0x88(%rbp) testq %rdi, %rdi je 0x14f6 callq *0x8(%rdi) leaq -0x88(%rbp), %rdi callq 0x1a8c xorl %edi, %edi cmpl $0x12, %eax sete %dil leaq 0x275e(%rip), %rsi # 0x3c70 callq 0x1b5c movl $0x30, %edi callq 0x1190 movq %rbx, (%rax) movq %r14, 0x8(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movb $0x0, 0x28(%rax) leaq -0x98(%rbp), %rdi movq %rax, (%rdi) callq 0x1a8c xorl %edi, %edi cmpl $0x12, %eax sete %dil leaq 0x2736(%rip), %rsi # 0x3c88 callq 0x1b5c movl $0x58, %edi callq 0x1190 leaq 0x363(%rip), %rbx # 0x18cb movq %rbx, (%rax) leaq 0x3c2(%rip), %r14 # 0x1934 movq %r14, 0x8(%rax) xorl %ecx, %ecx movq %rcx, 0x10(%rax) movb %cl, 0x50(%rax) leaq -0x40(%rbp), %rdx movq %rax, -0x8(%rdx) leaq 0x2752(%rip), %rsi # 0x3ce0 movq %rsi, (%rdx) movq %rcx, 0x10(%rdx) movq %rdx, 0x20(%rax) leaq -0x78(%rbp), %rsi movb %cl, 0x4(%rsi) movq %rsi, 0x18(%rdx) movq %rsi, 0x18(%rax) movq %rax, %rdi callq 0x18cb cmpb $0x0, -0x74(%rbp) je 0x16a1 xorl %edi, %edi cmpl $0x14, -0x78(%rbp) sete %dil leaq 0x26d5(%rip), %rsi # 0x3ca0 callq 0x1b5c movl $0x58, %edi callq 0x1190 movq %rbx, (%rax) movq %r14, 0x8(%rax) xorl %ecx, %ecx movq %rcx, 0x10(%rax) movb %cl, 0x50(%rax) leaq -0x70(%rbp), %rdx leaq 0x271b(%rip), %rsi # 0x3d10 movq %rsi, (%rdx) movq %rax, -0x8(%rdx) movq %rcx, 0x10(%rdx) movq %rdx, 0x20(%rax) leaq -0x80(%rbp), %rsi movb %cl, 0x4(%rsi) movq %rsi, 0x18(%rdx) movq %rsi, 0x18(%rax) movq %rax, %rdi callq 0x18cb cmpb $0x0, -0x7c(%rbp) je 0x16b9 xorl %edi, %edi cmpl $0x14, -0x80(%rbp) sete %dil leaq 0x2682(%rip), %rsi # 0x3cb8 callq 0x1b5c movq -0x78(%rbp), %rdi testq %rdi, %rdi je 0x1647 callq *0x8(%rdi) movq -0x48(%rbp), %rdi testq %rdi, %rdi je 0x1653 callq *0x8(%rdi) movq -0x98(%rbp), %rdi testq %rdi, %rdi je 0x1662 callq *0x8(%rdi) movq -0x90(%rbp), %rdi testq %rdi, %rdi je 0x1671 callq *0x8(%rdi) movq -0x88(%rbp), %rdi testq %rdi, %rdi je 0x1680 callq *0x8(%rdi) movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x1791 xorl %eax, %eax addq $0x90, %rsp popq %rbx popq %r14 popq %rbp retq movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x1791 callq 0x1223 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x1791 callq 0x1246 endbr64 jmp 0x17a0 endbr64 jmp 0x17a0 endbr64 jmp 0x17a0 endbr64 jmp 0x17a0 endbr64 jmp 0x17a0 endbr64 jmp 0x17a0 endbr64 jmp 0x17a0 endbr64 movq %rax, %rbx movq -0x48(%rbp), %rdi testq %rdi, %rdi je 0x1738 callq *0x8(%rdi) jmp 0x1738 endbr64 jmp 0x17a0 endbr64 jmp 0x17a0 endbr64 movq %rax, %rbx movq -0x98(%rbp), %rdi testq %rdi, %rdi je 0x175c callq *0x8(%rdi) jmp 0x175c endbr64 jmp 0x17a0 endbr64 jmp 0x1759 endbr64 movq %rax, %rbx movq -0x90(%rbp), %rdi testq %rdi, %rdi je 0x176b callq *0x8(%rdi) movq -0x88(%rbp), %rdi testq %rdi, %rdi je 0x177a callq *0x8(%rdi) movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x1791 movq %rbx, %rdi callq 0x11f0 callq 0x11b0 endbr64 jmp 0x17a0 endbr64 movq %rax, %rdi callq 0x1aea
main: endbr64 push rbp mov rbp, rsp push r14 push rbx sub rsp, 90h mov rax, fs:28h mov [rbp+var_18], rax mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) lea rbx, _Z6do_foov_resume; do_foo(void) [clone] mov [rax], rbx lea r14, _Z6do_foov_destroy; do_foo(void) [clone] mov [rax+8], r14 xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov byte ptr [rax+28h], 0 mov [rbp+var_88], 0 lea rdi, [rbp+var_90] mov [rdi], rax call _ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty xor edi, edi cmp eax, 12h setz dil lea rsi, off_3C58; "/workspace/llm4binary/github2025/corofx"... call _ZN6corofx5checkEbSt15source_location; corofx::check(bool,std::source_location) mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], rbx mov [rax+8], r14 xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov byte ptr [rax+28h], 0 mov rdi, [rbp+var_88] mov [rbp+var_88], rax test rdi, rdi jz short loc_14F6 call qword ptr [rdi+8] loc_14F6: lea rdi, [rbp+var_88] call _ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty xor edi, edi cmp eax, 12h setz dil lea rsi, off_3C70; "/workspace/llm4binary/github2025/corofx"... call _ZN6corofx5checkEbSt15source_location; corofx::check(bool,std::source_location) mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], rbx mov [rax+8], r14 xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov byte ptr [rax+28h], 0 lea rdi, [rbp+var_98] mov [rdi], rax call _ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty xor edi, edi cmp eax, 12h setz dil lea rsi, off_3C88; "/workspace/llm4binary/github2025/corofx"... call _ZN6corofx5checkEbSt15source_location; corofx::check(bool,std::source_location) mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) lea rbx, _Z6do_barv_resume; do_bar(void) [clone] mov [rax], rbx lea r14, _Z6do_barv_destroy; do_bar(void) [clone] mov [rax+8], r14 xor ecx, ecx mov [rax+10h], rcx mov [rax+50h], cl lea rdx, [rbp+var_40] mov [rdx-8], rax lea rsi, off_3CE0 mov [rdx], rsi mov [rdx+10h], rcx mov [rax+20h], rdx lea rsi, [rbp+var_78] mov [rsi+4], cl mov [rdx+18h], rsi mov [rax+18h], rsi mov rdi, rax call _Z6do_barv_resume; do_bar(void) [clone] cmp byte ptr [rbp+var_78+4], 0 jz loc_16A1 xor edi, edi cmp dword ptr [rbp+var_78], 14h setz dil lea rsi, off_3CA0; "/workspace/llm4binary/github2025/corofx"... call _ZN6corofx5checkEbSt15source_location; corofx::check(bool,std::source_location) mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], rbx mov [rax+8], r14 xor ecx, ecx mov [rax+10h], rcx mov [rax+50h], cl lea rdx, [rbp+var_70] lea rsi, off_3D10 mov [rdx], rsi mov [rdx-8], rax mov [rdx+10h], rcx mov [rax+20h], rdx lea rsi, [rbp+var_80] mov [rsi+4], cl mov [rdx+18h], rsi mov [rax+18h], rsi mov rdi, rax call _Z6do_barv_resume; do_bar(void) [clone] cmp [rbp+var_7C], 0 jz loc_16B9 xor edi, edi cmp [rbp+var_80], 14h setz dil lea rsi, off_3CB8; "/workspace/llm4binary/github2025/corofx"... call _ZN6corofx5checkEbSt15source_location; corofx::check(bool,std::source_location) mov rdi, [rbp+var_78] test rdi, rdi jz short loc_1647 call qword ptr [rdi+8] loc_1647: mov rdi, [rbp+var_48] test rdi, rdi jz short loc_1653 call qword ptr [rdi+8] loc_1653: mov rdi, [rbp+var_98] test rdi, rdi jz short loc_1662 call qword ptr [rdi+8] loc_1662: mov rdi, [rbp+var_90] test rdi, rdi jz short loc_1671 call qword ptr [rdi+8] loc_1671: mov rdi, [rbp+var_88] test rdi, rdi jz short loc_1680 call qword ptr [rdi+8] loc_1680: mov rax, fs:28h cmp rax, [rbp+var_18] jnz loc_1791 xor eax, eax add rsp, 90h pop rbx pop r14 pop rbp retn loc_16A1: mov rax, fs:28h cmp rax, [rbp+var_18] jnz loc_1791 call main_cold_1 loc_16B9: mov rax, fs:28h cmp rax, [rbp+var_18] jnz loc_1791 call main_cold_2 endbr64 jmp loc_17A0 endbr64 jmp loc_17A0 endbr64 jmp loc_17A0 endbr64 jmp loc_17A0 endbr64 jmp loc_17A0 endbr64 jmp loc_17A0 endbr64 jmp loc_17A0 endbr64 mov rbx, rax mov rdi, [rbp+var_48] test rdi, rdi jz short loc_1738 call qword ptr [rdi+8] jmp short loc_1738 endbr64 jmp short loc_17A0 endbr64 jmp short loc_17A0 endbr64 mov rbx, rax loc_1738: mov rdi, [rbp+var_98] test rdi, rdi jz short loc_175C call qword ptr [rdi+8] jmp short loc_175C endbr64 jmp short loc_17A0 endbr64 jmp short loc_1759 endbr64 loc_1759: mov rbx, rax loc_175C: mov rdi, [rbp+var_90] test rdi, rdi jz short loc_176B call qword ptr [rdi+8] loc_176B: mov rdi, [rbp+var_88] test rdi, rdi jz short loc_177A call qword ptr [rdi+8] loc_177A: mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_1791 mov rdi, rbx call __Unwind_Resume loc_1791: call ___stack_chk_fail endbr64 jmp short loc_17A0 endbr64 loc_17A0: mov rdi, rax call __clang_call_terminate
int main(int argc, const char **argv, const char **envp) { long long v3; // rax int v4; // eax long long v5; // rax long long v6; // rdi int v7; // eax long long v8; // rax int v9; // eax long long v10; // rax long long v11; // rax long long v13; // [rsp+8h] [rbp-98h] BYREF long long v14; // [rsp+10h] [rbp-90h] BYREF long long v15; // [rsp+18h] [rbp-88h] BYREF int v16; // [rsp+20h] [rbp-80h] BYREF char v17; // [rsp+24h] [rbp-7Ch] long long v18; // [rsp+28h] [rbp-78h] BYREF _QWORD v19[5]; // [rsp+30h] [rbp-70h] BYREF long long v20; // [rsp+58h] [rbp-48h] _QWORD v21[8]; // [rsp+60h] [rbp-40h] BYREF v21[5] = __readfsqword(0x28u); v3 = operator new(0x30uLL); *(_QWORD *)v3 = do_foo; *(_QWORD *)(v3 + 8) = do_foo; *(_OWORD *)(v3 + 16) = 0LL; *(_BYTE *)(v3 + 40) = 0; v15 = 0LL; v14 = v3; v4 = corofx::task<int>::operator()(&v14, argv); corofx::check(v4 == 18, off_3C58); v5 = operator new(0x30uLL); *(_QWORD *)v5 = do_foo; *(_QWORD *)(v5 + 8) = do_foo; *(_OWORD *)(v5 + 16) = 0LL; *(_BYTE *)(v5 + 40) = 0; v6 = v15; v15 = v5; if ( v6 ) (*(void (**)(void))(v6 + 8))(); v7 = corofx::task<int>::operator()(&v15, off_3C58); corofx::check(v7 == 18, off_3C70); v8 = operator new(0x30uLL); *(_QWORD *)v8 = do_foo; *(_QWORD *)(v8 + 8) = do_foo; *(_OWORD *)(v8 + 16) = 0LL; *(_BYTE *)(v8 + 40) = 0; v13 = v8; v9 = corofx::task<int>::operator()(&v13, off_3C70); corofx::check(v9 == 18, off_3C88); v10 = operator new(0x58uLL); *(_QWORD *)v10 = do_bar; *(_QWORD *)(v10 + 8) = do_bar; *(_QWORD *)(v10 + 16) = 0LL; *(_BYTE *)(v10 + 80) = 0; v20 = v10; v21[0] = &off_3CE0; v21[2] = 0LL; *(_QWORD *)(v10 + 32) = v21; BYTE4(v18) = 0; v21[3] = &v18; *(_QWORD *)(v10 + 24) = &v18; do_bar(v10); if ( !BYTE4(v18) ) main_cold_1(); corofx::check((_DWORD)v18 == 20, off_3CA0); v11 = operator new(0x58uLL); *(_QWORD *)v11 = do_bar; *(_QWORD *)(v11 + 8) = do_bar; *(_QWORD *)(v11 + 16) = 0LL; *(_BYTE *)(v11 + 80) = 0; v19[0] = &off_3D10; v18 = v11; v19[2] = 0LL; *(_QWORD *)(v11 + 32) = v19; v17 = 0; v19[3] = &v16; *(_QWORD *)(v11 + 24) = &v16; do_bar(v11); if ( !v17 ) main_cold_2(); corofx::check(v16 == 20, off_3CB8); if ( v18 ) (*(void (**)(void))(v18 + 8))(); if ( v20 ) (*(void (**)(void))(v20 + 8))(); if ( v13 ) (*(void (**)(void))(v13 + 8))(); if ( v14 ) (*(void (**)(void))(v14 + 8))(); if ( v15 ) (*(void (**)(void))(v15 + 8))(); return 0; }
main: ENDBR64 PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV EDI,0x30 CALL 0x00101190 LEA RBX,[0x10187f] MOV qword ptr [RAX],RBX LEA R14,[0x1018b8] MOV qword ptr [RAX + 0x8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV byte ptr [RAX + 0x28],0x0 MOV qword ptr [RBP + -0x88],0x0 LEA RDI,[RBP + -0x90] MOV qword ptr [RDI],RAX CALL 0x00101a8c XOR EDI,EDI CMP EAX,0x12 SETZ DIL LEA RSI,[0x103c58] CALL 0x00101b5c LAB_001014c4: MOV EDI,0x30 CALL 0x00101190 MOV qword ptr [RAX],RBX MOV qword ptr [RAX + 0x8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV byte ptr [RAX + 0x28],0x0 MOV RDI,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x88],RAX TEST RDI,RDI JZ 0x001014f6 LAB_001014f3: CALL qword ptr [RDI + 0x8] LAB_001014f6: LEA RDI,[RBP + -0x88] CALL 0x00101a8c XOR EDI,EDI CMP EAX,0x12 SETZ DIL LEA RSI,[0x103c70] CALL 0x00101b5c LAB_00101517: MOV EDI,0x30 CALL 0x00101190 MOV qword ptr [RAX],RBX MOV qword ptr [RAX + 0x8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV byte ptr [RAX + 0x28],0x0 LEA RDI,[RBP + -0x98] MOV qword ptr [RDI],RAX CALL 0x00101a8c XOR EDI,EDI CMP EAX,0x12 SETZ DIL LEA RSI,[0x103c88] CALL 0x00101b5c LAB_00101557: MOV EDI,0x58 CALL 0x00101190 LEA RBX,[0x1018cb] MOV qword ptr [RAX],RBX LEA R14,[0x101934] MOV qword ptr [RAX + 0x8],R14 XOR ECX,ECX MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RAX + 0x50],CL LEA RDX,[RBP + -0x40] MOV qword ptr [RDX + -0x8],RAX LEA RSI,[0x103ce0] MOV qword ptr [RDX],RSI MOV qword ptr [RDX + 0x10],RCX MOV qword ptr [RAX + 0x20],RDX LEA RSI,[RBP + -0x78] MOV byte ptr [RSI + 0x4],CL MOV qword ptr [RDX + 0x18],RSI MOV qword ptr [RAX + 0x18],RSI LAB_001015a8: MOV RDI,RAX CALL 0x001018cb CMP byte ptr [RBP + -0x74],0x0 JZ 0x001016a1 XOR EDI,EDI CMP dword ptr [RBP + -0x78],0x14 SETZ DIL LEA RSI,[0x103ca0] CALL 0x00101b5c LAB_001015d0: MOV EDI,0x58 CALL 0x00101190 MOV qword ptr [RAX],RBX MOV qword ptr [RAX + 0x8],R14 XOR ECX,ECX MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RAX + 0x50],CL LEA RDX,[RBP + -0x70] LEA RSI,[0x103d10] MOV qword ptr [RDX],RSI MOV qword ptr [RDX + -0x8],RAX MOV qword ptr [RDX + 0x10],RCX MOV qword ptr [RAX + 0x20],RDX LEA RSI,[RBP + -0x80] MOV byte ptr [RSI + 0x4],CL MOV qword ptr [RDX + 0x18],RSI MOV qword ptr [RAX + 0x18],RSI LAB_00101613: MOV RDI,RAX CALL 0x001018cb CMP byte ptr [RBP + -0x7c],0x0 JZ 0x001016b9 XOR EDI,EDI CMP dword ptr [RBP + -0x80],0x14 SETZ DIL LEA RSI,[0x103cb8] CALL 0x00101b5c MOV RDI,qword ptr [RBP + -0x78] TEST RDI,RDI JZ 0x00101647 LAB_00101644: CALL qword ptr [RDI + 0x8] LAB_00101647: MOV RDI,qword ptr [RBP + -0x48] TEST RDI,RDI JZ 0x00101653 LAB_00101650: CALL qword ptr [RDI + 0x8] LAB_00101653: MOV RDI,qword ptr [RBP + -0x98] TEST RDI,RDI JZ 0x00101662 LAB_0010165f: CALL qword ptr [RDI + 0x8] LAB_00101662: MOV RDI,qword ptr [RBP + -0x90] TEST RDI,RDI JZ 0x00101671 LAB_0010166e: CALL qword ptr [RDI + 0x8] LAB_00101671: MOV RDI,qword ptr [RBP + -0x88] TEST RDI,RDI JZ 0x00101680 LAB_0010167d: CALL qword ptr [RDI + 0x8] LAB_00101680: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00101791 XOR EAX,EAX ADD RSP,0x90 POP RBX POP R14 POP RBP RET LAB_001016a1: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00101791 CALL 0x00101223 LAB_001016b9: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00101791 CALL 0x00101246 LAB_001016d1: ENDBR64 JMP 0x001017a0 LAB_00101791: CALL 0x001011b0 LAB_001017a0: MOV RDI,RAX CALL 0x00101aea
int8 main(void) { int8 *puVar1; int iVar2; int8 *puVar3; int8 *puVar4; int8 uVar5; long in_FS_OFFSET; int8 *local_90; int local_88; char local_84; int8 local_80; int **local_78 [2]; int8 local_68; int *local_60; int8 *local_50; int **local_48 [2]; int8 local_38; int8 *local_30; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); puVar3 = (int8 *)operator_new(0x30); *puVar3 = do_foo; puVar3[1] = do_foo; puVar3[2] = 0; puVar3[3] = 0; *(int1 *)(puVar3 + 5) = 0; local_90 = (int8 *)0x0; iVar2 = _ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty(); corofx::check(iVar2 == 0x12,&PTR_s__workspace_llm4binary_github2025_00103c58); /* try { // try from 001014c4 to 001014cd has its CatchHandler @ 00101755 */ puVar4 = (int8 *)operator_new(0x30); *puVar4 = do_foo; puVar4[1] = do_foo; puVar4[2] = 0; puVar4[3] = 0; *(int1 *)(puVar4 + 5) = 0; if (local_90 != (int8 *)0x0) { puVar1 = local_90 + 1; /* try { // try from 001014f3 to 001014f5 has its CatchHandler @ 001016fe */ local_90 = puVar4; (*(code *)*puVar1)(); puVar4 = local_90; } local_90 = puVar4; iVar2 = _ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty(&local_90); corofx::check(iVar2 == 0x12,&PTR_s__workspace_llm4binary_github2025_00103c70); /* try { // try from 00101517 to 00101520 has its CatchHandler @ 0010174f */ puVar4 = (int8 *)operator_new(0x30); *puVar4 = do_foo; puVar4[1] = do_foo; puVar4[2] = 0; puVar4[3] = 0; *(int1 *)(puVar4 + 5) = 0; iVar2 = _ZNO6corofx4taskIiJEEclEvQsr12effect_typesE5empty(); corofx::check(iVar2 == 0x12,&PTR_s__workspace_llm4binary_github2025_00103c88); /* try { // try from 00101557 to 00101560 has its CatchHandler @ 00101731 */ local_50 = (int8 *)operator_new(0x58); *local_50 = do_bar; local_50[1] = do_bar; local_50[2] = 0; *(int1 *)(local_50 + 10) = 0; local_48[0] = &PTR_handle_00103ce0; local_38 = 0; local_50[4] = local_48; local_30 = &local_80; local_80._0_5_ = (uint5)(uint)local_80; local_50[3] = local_30; /* try { // try from 001015a8 to 001015af has its CatchHandler @ 0010172b */ do_bar(); if (local_80._4_1_ == '\0') { if (*(long *)(in_FS_OFFSET + 0x28) != local_20) goto LAB_00101791; main_cold_1(); } else { corofx::check((uint)local_80 == 0x14,&PTR_s__workspace_llm4binary_github2025_00103ca0); /* try { // try from 001015d0 to 001015d9 has its CatchHandler @ 00101710 */ local_80 = (int8 *)operator_new(0x58); *local_80 = do_bar; local_80[1] = do_bar; local_80[2] = 0; *(int1 *)(local_80 + 10) = 0; local_78[0] = &PTR_handle_00103d10; local_68 = 0; local_80[4] = local_78; local_60 = &local_88; local_84 = '\0'; local_80[3] = local_60; /* try { // try from 00101613 to 0010161a has its CatchHandler @ 00101707 */ do_bar(); if (local_84 != '\0') { corofx::check(local_88 == 0x14,&PTR_s__workspace_llm4binary_github2025_00103cb8); if (local_80 != (int8 *)0x0) { /* try { // try from 00101644 to 00101646 has its CatchHandler @ 001016f5 */ (*(code *)local_80[1])(); } if (local_50 != (int8 *)0x0) { /* try { // try from 00101650 to 00101652 has its CatchHandler @ 001016ec */ (*(code *)local_50[1])(); } if (puVar4 != (int8 *)0x0) { /* try { // try from 0010165f to 00101661 has its CatchHandler @ 001016e3 */ (*(code *)puVar4[1])(); } if (puVar3 != (int8 *)0x0) { /* try { // try from 0010166e to 00101670 has its CatchHandler @ 001016da */ (*(code *)puVar3[1])(); } if (local_90 != (int8 *)0x0) { /* try { // try from 0010167d to 0010167f has its CatchHandler @ 001016d1 */ (*(code *)local_90[1])(); } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return 0; } goto LAB_00101791; } } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { uVar5 = main_cold_2(); /* WARNING: Subroutine does not return */ __clang_call_terminate(uVar5); /* catch(type#1 @ 00000000) { ... } // from try @ 0010167d with catch @ 001016d1 */ } LAB_00101791: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,690
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/./minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O0
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): subq $0x88, %rsp movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x68(%rsp) movq %r8, 0x60(%rsp) movq 0x80(%rsp), %rdi movq %rdi, 0x30(%rsp) movq 0x78(%rsp), %rsi callq 0xfa350 movq 0x30(%rsp), %rdi leaq 0x14cd62(%rip), %rax # 0x2532e8 addq $0x10, %rax movq %rax, (%rdi) addq $0x20, %rdi movq %rdi, 0x18(%rsp) movq 0x70(%rsp), %rsi callq 0xd5e60 movq 0x30(%rsp), %rdi addq $0x30, %rdi movq %rdi, 0x20(%rsp) movq 0x68(%rsp), %rsi callq 0xd82b0 movq 0x30(%rsp), %rdi addq $0x48, %rdi movq %rdi, 0x28(%rsp) movq 0x60(%rsp), %rsi callq 0xf76a0 movq 0x30(%rsp), %rdi addq $0x58, %rdi movq %rdi, 0x38(%rsp) callq 0x1066e0 movq $0x0, 0x58(%rsp) movq 0x30(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) addq $0x30, %rdi callq 0xd5030 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax jae 0x1066c3 movq 0x30(%rsp), %rdi addq $0x30, %rdi movq 0x58(%rsp), %rsi callq 0x1066f0 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi callq 0x503b0 testb $0x1, %al jne 0x1066ae movq 0x30(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, (%rsp) addq $0x58, %rdi movq 0x50(%rsp), %rsi callq 0x106710 movq %rax, 0x8(%rsp) jmp 0x10665e movq 0x8(%rsp), %rax movq (%rsp), %rcx movq %rcx, (%rax) jmp 0x1066ae movq 0x38(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) callq 0x106740 movq 0x28(%rsp), %rdi callq 0x6e6f0 movq 0x20(%rsp), %rdi callq 0x79cc0 movq 0x18(%rsp), %rdi callq 0x79d20 movq 0x30(%rsp), %rdi callq 0xfa610 jmp 0x1066cb jmp 0x1066b0 movq 0x58(%rsp), %rax addq $0x1, %rax movq %rax, 0x58(%rsp) jmp 0x1065ec addq $0x88, %rsp retq movq 0x48(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nop
_ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE: sub rsp, 88h mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_20], rcx mov [rsp+88h+var_28], r8 mov rdi, [rsp+88h+var_8]; this mov [rsp+88h+var_58], rdi mov rsi, [rsp+88h+var_10]; minja::Location * call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&) mov rdi, [rsp+88h+var_58] lea rax, _ZTVN5minja9MacroNodeE; `vtable for'minja::MacroNode add rax, 10h mov [rdi], rax add rdi, 20h ; ' ' mov [rsp+88h+var_70], rdi mov rsi, [rsp+88h+var_18] call _ZNSt10shared_ptrIN5minja12VariableExprEEC2EOS2_; std::shared_ptr<minja::VariableExpr>::shared_ptr(std::shared_ptr<minja::VariableExpr>&&) mov rdi, [rsp+88h+var_58] add rdi, 30h ; '0' mov [rsp+88h+var_68], rdi mov rsi, [rsp+88h+var_20] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EEC2EOSD_; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::vector(std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>&&) mov rdi, [rsp+88h+var_58] add rdi, 48h ; 'H' mov [rsp+88h+var_60], rdi mov rsi, [rsp+88h+var_28] call _ZNSt10shared_ptrIN5minja12TemplateNodeEEC2EOS2_; std::shared_ptr<minja::TemplateNode>::shared_ptr(std::shared_ptr<minja::TemplateNode>&&) mov rdi, [rsp+88h+var_58] add rdi, 58h ; 'X' mov [rsp+88h+var_50], rdi call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEEC2Ev; std::unordered_map<std::string,ulong>::unordered_map(void) mov [rsp+88h+var_30], 0 loc_1065EC: mov rdi, [rsp+88h+var_58] mov rax, [rsp+88h+var_30] mov [rsp+88h+var_78], rax add rdi, 30h ; '0' call _ZNKSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EE4sizeEv; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::size(void) mov rcx, rax mov rax, [rsp+88h+var_78] cmp rax, rcx jnb loc_1066C3 mov rdi, [rsp+88h+var_58] add rdi, 30h ; '0' mov rsi, [rsp+88h+var_30] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EEixEm; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::operator[](ulong) mov [rsp+88h+var_38], rax mov rdi, [rsp+88h+var_38] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_1066AE mov rdi, [rsp+88h+var_58] mov rax, [rsp+88h+var_30] mov [rsp+88h+var_88], rax add rdi, 58h ; 'X' mov rsi, [rsp+88h+var_38] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEEixERSB_; std::unordered_map<std::string,ulong>::operator[](std::string const&) mov [rsp+88h+var_80], rax jmp short $+2 loc_10665E: mov rax, [rsp+88h+var_80] mov rcx, [rsp+88h+var_88] mov [rax], rcx jmp short loc_1066AE mov rdi, [rsp+arg_30] mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_mEEED2Ev; std::unordered_map<std::string,ulong>::~unordered_map() mov rdi, [rsp+arg_20] call _ZNSt10shared_ptrIN5minja12TemplateNodeEED2Ev; std::shared_ptr<minja::TemplateNode>::~shared_ptr() mov rdi, [rsp+arg_18] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector() mov rdi, [rsp+arg_10] call _ZNSt10shared_ptrIN5minja12VariableExprEED2Ev; std::shared_ptr<minja::VariableExpr>::~shared_ptr() mov rdi, [rsp+arg_28]; this call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode() jmp short loc_1066CB loc_1066AE: jmp short $+2 loc_1066B0: mov rax, [rsp+88h+var_30] add rax, 1 mov [rsp+88h+var_30], rax jmp loc_1065EC loc_1066C3: add rsp, 88h retn loc_1066CB: mov rdi, [rsp+arg_40] call __Unwind_Resume
unsigned long long minja::MacroNode::MacroNode( minja::TemplateNode *a1, const minja::Location *a2, long long a3, long long a4, long long a5) { unsigned long long v5; // rcx unsigned long long result; // rax long long v7; // [rsp+50h] [rbp-38h] unsigned long long i; // [rsp+58h] [rbp-30h] minja::TemplateNode::TemplateNode(a1, a2); *(_QWORD *)a1 = &`vtable for'minja::MacroNode + 2; std::shared_ptr<minja::VariableExpr>::shared_ptr((long long)a1 + 32, a3); std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::vector((long long)a1 + 48, a4); std::shared_ptr<minja::TemplateNode>::shared_ptr((long long)a1 + 72, a5); std::unordered_map<std::string,unsigned long>::unordered_map(); for ( i = 0LL; ; ++i ) { v5 = std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::size((_QWORD *)a1 + 6); result = i; if ( i >= v5 ) break; v7 = std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::operator[]((char *)a1 + 48, i); if ( (std::string::empty(v7) & 1) == 0 ) *(_QWORD *)std::unordered_map<std::string,unsigned long>::operator[]((char *)a1 + 88, v7) = i; } return result; }
28,691
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/./minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O2
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rdi, %rbx callq 0x55f10 leaq 0x87c36(%rip), %rax # 0xe1478 movq %rax, (%rbx) leaq 0x28(%rbx), %rax movq %rax, 0x10(%rsp) andq $0x0, 0x28(%rbx) movups (%r13), %xmm0 andq $0x0, 0x8(%r13) movups %xmm0, 0x20(%rbx) andq $0x0, (%r13) movups (%r12), %xmm0 movups %xmm0, 0x30(%rbx) movq 0x10(%r12), %rax movq %rax, 0x40(%rbx) xorps %xmm0, %xmm0 andq $0x0, 0x10(%r12) movups %xmm0, (%r12) andq $0x0, 0x50(%rbx) movups (%r15), %xmm1 andq $0x0, 0x8(%r15) movups %xmm1, 0x48(%rbx) andq $0x0, (%r15) leaq 0x30(%rbx), %rax movq %rax, 0x8(%rsp) leaq 0x50(%rbx), %r12 leaq 0x58(%rbx), %r13 leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) movq $0x1, 0x60(%rbx) movups %xmm0, 0x68(%rbx) movl $0x3f800000, 0x78(%rbx) # imm = 0x3F800000 movups %xmm0, 0x80(%rbx) xorl %ebp, %ebp pushq $0x30 popq %r14 xorl %r15d, %r15d movq 0x30(%rbx), %rsi movq 0x38(%rbx), %rax subq %rsi, %rax cqto idivq %r14 cmpq %rax, %r15 jae 0x5990f cmpq $0x0, 0x8(%rsi,%rbp) je 0x59906 addq %rbp, %rsi movq %r13, %rdi callq 0x59b04 movq %r15, (%rax) incq %r15 addq $0x30, %rbp jmp 0x598db addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbp movq %r13, %rdi callq 0x59f92 movq %r12, %rdi callq 0x2eeb2 movq 0x8(%rsp), %rdi callq 0x30168 movq 0x10(%rsp), %rdi callq 0x2eeb2 movq %rbx, %rdi callq 0x5ae9c movq %rbp, %rdi callq 0x20b90 nop
_ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, r8 mov r12, rcx mov r13, rdx mov rbx, rdi call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&) lea rax, off_E1478 mov [rbx], rax lea rax, [rbx+28h] mov [rsp+48h+var_38], rax and qword ptr [rbx+28h], 0 movups xmm0, xmmword ptr [r13+0] and qword ptr [r13+8], 0 movups xmmword ptr [rbx+20h], xmm0 and qword ptr [r13+0], 0 movups xmm0, xmmword ptr [r12] movups xmmword ptr [rbx+30h], xmm0 mov rax, [r12+10h] mov [rbx+40h], rax xorps xmm0, xmm0 and qword ptr [r12+10h], 0 movups xmmword ptr [r12], xmm0 and qword ptr [rbx+50h], 0 movups xmm1, xmmword ptr [r15] and qword ptr [r15+8], 0 movups xmmword ptr [rbx+48h], xmm1 and qword ptr [r15], 0 lea rax, [rbx+30h] mov [rsp+48h+var_40], rax lea r12, [rbx+50h] lea r13, [rbx+58h] lea rax, [rbx+88h] mov [rbx+58h], rax mov qword ptr [rbx+60h], 1 movups xmmword ptr [rbx+68h], xmm0 mov dword ptr [rbx+78h], 3F800000h movups xmmword ptr [rbx+80h], xmm0 xor ebp, ebp push 30h ; '0' pop r14 xor r15d, r15d loc_598DB: mov rsi, [rbx+30h] mov rax, [rbx+38h] sub rax, rsi cqo idiv r14 cmp r15, rax jnb short loc_5990F cmp qword ptr [rsi+rbp+8], 0 jz short loc_59906 add rsi, rbp mov rdi, r13 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&) mov [rax], r15 loc_59906: inc r15 add rbp, 30h ; '0' jmp short loc_598DB loc_5990F: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbp, rax mov rdi, r13 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+arg_0] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector() mov rdi, [rsp+arg_8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx; this call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode() mov rdi, rbp call __Unwind_Resume
unsigned long long minja::MacroNode::MacroNode(long long a1, _QWORD *a2, __int128 *a3, long long a4, __int128 *a5) { int v8; // ecx int v9; // r8d int v10; // r9d __int128 v11; // xmm0 __int128 v12; // xmm1 long long v13; // rbp unsigned long long i; // r15 long long v15; // rsi unsigned long long result; // rax char v17; // [rsp+0h] [rbp-48h] minja::TemplateNode::TemplateNode((_QWORD *)a1, a2); *(_QWORD *)a1 = &off_E1478; *(_QWORD *)(a1 + 40) = 0LL; v11 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v11; *(_QWORD *)a3 = 0LL; *(_OWORD *)(a1 + 48) = *(_OWORD *)a4; *(_QWORD *)(a1 + 64) = *(_QWORD *)(a4 + 16); *(_QWORD *)(a4 + 16) = 0LL; *(_OWORD *)a4 = 0LL; *(_QWORD *)(a1 + 80) = 0LL; v12 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v12; *(_QWORD *)a5 = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; v13 = 0LL; for ( i = 0LL; ; ++i ) { v15 = *(_QWORD *)(a1 + 48); result = (*(_QWORD *)(a1 + 56) - v15) / 48; if ( i >= result ) break; if ( *(_QWORD *)(v15 + v13 + 8) ) *(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[]( (int)a1 + 88, (int)v13 + (int)v15, (*(_QWORD *)(a1 + 56) - v15) % 48, v8, v9, v10, v17) = i; v13 += 48LL; } return result; }
28,692
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/./minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O3
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq 0x18(%rdi), %r15 movq 0x20(%rdi), %r12 cmpq %r12, %r15 je 0x7842f movq (%rsi), %rbx movq 0x8(%rsi), %r14 cmpq %r14, 0x8(%r15) jne 0x78426 movb $0x1, %bpl testq %r14, %r14 je 0x78431 movq (%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x186e0 testl %eax, %eax je 0x78431 addq $0x70, %r15 cmpq %r12, %r15 jne 0x78406 xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN5minja14ArgumentsValue9has_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx mov r15, [rdi+18h] mov r12, [rdi+20h] cmp r15, r12 jz short loc_7842F mov rbx, [rsi] mov r14, [rsi+8] loc_78406: cmp [r15+8], r14 jnz short loc_78426 mov bpl, 1 test r14, r14 jz short loc_78431 mov rdi, [r15] mov rsi, rbx mov rdx, r14 call _bcmp test eax, eax jz short loc_78431 loc_78426: add r15, 70h ; 'p' cmp r15, r12 jnz short loc_78406 loc_7842F: xor ebp, ebp loc_78431: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long minja::ArgumentsValue::has_named(long long a1, long long *a2) { unsigned int v2; // ebp _QWORD *v3; // r15 _QWORD *v4; // r12 long long v5; // rbx long long v6; // r14 v3 = *(_QWORD **)(a1 + 24); v4 = *(_QWORD **)(a1 + 32); if ( v3 == v4 ) { return 0; } else { v5 = *a2; v6 = a2[1]; while ( 1 ) { if ( v3[1] == v6 ) { LOBYTE(v2) = 1; if ( !v6 || !(unsigned int)bcmp(*v3, v5) ) break; } v3 += 14; if ( v3 == v4 ) return 0; } } return v2; }
has_named: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15,qword ptr [RDI + 0x18] MOV R12,qword ptr [RDI + 0x20] CMP R15,R12 JZ 0x0017842f MOV RBX,qword ptr [RSI] MOV R14,qword ptr [RSI + 0x8] LAB_00178406: CMP qword ptr [R15 + 0x8],R14 JNZ 0x00178426 MOV BPL,0x1 TEST R14,R14 JZ 0x00178431 MOV RDI,qword ptr [R15] MOV RSI,RBX MOV RDX,R14 CALL 0x001186e0 TEST EAX,EAX JZ 0x00178431 LAB_00178426: ADD R15,0x70 CMP R15,R12 JNZ 0x00178406 LAB_0017842f: XOR EBP,EBP LAB_00178431: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* minja::ArgumentsValue::has_named(std::__cxx11::string const&) */ ulong __thiscall minja::ArgumentsValue::has_named(ArgumentsValue *this,string *param_1) { int8 *puVar1; void *__s2; size_t __n; int iVar2; ulong unaff_RBP; int8 *puVar3; puVar3 = *(int8 **)(this + 0x18); puVar1 = *(int8 **)(this + 0x20); if (puVar3 != puVar1) { __s2 = *(void **)param_1; __n = *(size_t *)(param_1 + 8); do { if (puVar3[1] == __n) { unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),1); if (__n == 0) goto LAB_00178431; iVar2 = bcmp((void *)*puVar3,__s2,__n); if (iVar2 == 0) goto LAB_00178431; } puVar3 = puVar3 + 0xe; } while (puVar3 != puVar1); } unaff_RBP = 0; LAB_00178431: return unaff_RBP & 0xffffffff; }
28,693
js_module_loader_so
bluesky950520[P]quickjs/quickjs-libc.c
static JSModuleDef *js_module_loader_so(JSContext *ctx, const char *module_name) { JSModuleDef *m; void *hd; JSInitModuleFunc *init; char *filename; if (!strchr(module_name, '/')) { /* must add a '/' so that the DLL is not searched in the system library paths */ filename = js_malloc(ctx, strlen(module_name) + 2 + 1); if (!filename) return NULL; strcpy(filename, "./"); strcpy(filename + 2, module_name); } else { filename = (char *)module_name; } /* C module */ hd = dlopen(filename, RTLD_NOW | RTLD_LOCAL); if (filename != module_name) js_free(ctx, filename); if (!hd) { JS_ThrowReferenceError(ctx, "could not load module filename '%s' as shared library: %s", module_name, dlerror()); goto fail; } *(void **) (&init) = dlsym(hd, "js_init_module"); if (!init) { JS_ThrowReferenceError(ctx, "could not load module filename '%s': js_init_module not found", module_name); goto fail; } m = init(ctx, module_name); if (!m) { JS_ThrowReferenceError(ctx, "could not load module filename '%s': initialization error", module_name); fail: if (hd) dlclose(hd); return NULL; } return m; }
O0
c
js_module_loader_so: subq $0x88, %rsp movq %rdi, 0x78(%rsp) movq %rsi, 0x70(%rsp) movq 0x70(%rsp), %rdi movl $0x2f, %esi callq 0xe270 cmpq $0x0, %rax jne 0x105f3 movq 0x78(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x70(%rsp), %rdi callq 0xe240 movq 0x18(%rsp), %rdi movq %rax, %rsi addq $0x2, %rsi addq $0x1, %rsi callq 0x21cb0 movq %rax, 0x50(%rsp) cmpq $0x0, 0x50(%rsp) jne 0x105cd movq $0x0, 0x80(%rsp) jmp 0x10726 movq 0x50(%rsp), %rdi leaq 0xf951e(%rip), %rsi # 0x109af7 callq 0xe100 movq 0x50(%rsp), %rdi addq $0x2, %rdi movq 0x70(%rsp), %rsi callq 0xe100 jmp 0x105fd movq 0x70(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi movl $0x2, %esi callq 0xe530 movq %rax, 0x60(%rsp) movq 0x50(%rsp), %rax cmpq 0x70(%rsp), %rax je 0x1062c movq 0x78(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x21db0 cmpq $0x0, 0x60(%rsp) jne 0x10677 movq 0x78(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) callq 0xe050 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rdx movq %rax, %rcx leaq 0xf9499(%rip), %rsi # 0x109afa movb $0x0, %al callq 0x2d3f0 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) jmp 0x106f9 movq 0x60(%rsp), %rdi leaq 0xf94b1(%rip), %rsi # 0x109b34 callq 0xe830 movq %rax, 0x58(%rsp) cmpq $0x0, 0x58(%rsp) jne 0x106b9 movq 0x78(%rsp), %rdi movq 0x70(%rsp), %rdx leaq 0xf949d(%rip), %rsi # 0x109b43 movb $0x0, %al callq 0x2d3f0 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) jmp 0x106f9 movq 0x58(%rsp), %rax movq 0x78(%rsp), %rdi movq 0x70(%rsp), %rsi callq *%rax movq %rax, 0x68(%rsp) cmpq $0x0, 0x68(%rsp) jne 0x10719 movq 0x78(%rsp), %rdi movq 0x70(%rsp), %rdx leaq 0xf9499(%rip), %rsi # 0x109b81 movb $0x0, %al callq 0x2d3f0 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) cmpq $0x0, 0x60(%rsp) je 0x1070b movq 0x60(%rsp), %rdi callq 0xe930 movq $0x0, 0x80(%rsp) jmp 0x10726 movq 0x68(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax addq $0x88, %rsp retq nopw %cs:(%rax,%rax)
js_module_loader_so: sub rsp, 88h mov [rsp+88h+var_10], rdi mov [rsp+88h+var_18], rsi mov rdi, [rsp+88h+var_18] mov esi, 2Fh ; '/' call _strchr cmp rax, 0 jnz short loc_105F3 mov rax, [rsp+88h+var_10] mov [rsp+88h+var_70], rax mov rdi, [rsp+88h+var_18] call _strlen mov rdi, [rsp+88h+var_70] mov rsi, rax add rsi, 2 add rsi, 1 call js_malloc mov [rsp+88h+var_38], rax cmp [rsp+88h+var_38], 0 jnz short loc_105CD mov [rsp+88h+var_8], 0 jmp loc_10726 loc_105CD: mov rdi, [rsp+88h+var_38] lea rsi, asc_109AF7; "./" call _strcpy mov rdi, [rsp+88h+var_38] add rdi, 2 mov rsi, [rsp+88h+var_18] call _strcpy jmp short loc_105FD loc_105F3: mov rax, [rsp+88h+var_18] mov [rsp+88h+var_38], rax loc_105FD: mov rdi, [rsp+88h+var_38] mov esi, 2 call _dlopen mov [rsp+88h+var_28], rax mov rax, [rsp+88h+var_38] cmp rax, [rsp+88h+var_18] jz short loc_1062C mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_38] call js_free loc_1062C: cmp [rsp+88h+var_28], 0 jnz short loc_10677 mov rax, [rsp+88h+var_10] mov [rsp+88h+var_80], rax mov rax, [rsp+88h+var_18] mov [rsp+88h+var_78], rax call _dlerror mov rdi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rcx, rax lea rsi, aCouldNotLoadMo_0; "could not load module filename '%s' as "... mov al, 0 call JS_ThrowReferenceError mov [rsp+88h+var_48], rax mov [rsp+88h+var_40], rdx jmp loc_106F9 loc_10677: mov rdi, [rsp+88h+var_28] lea rsi, aJsInitModule; "js_init_module" call _dlsym mov [rsp+88h+var_30], rax cmp [rsp+88h+var_30], 0 jnz short loc_106B9 mov rdi, [rsp+88h+var_10] mov rdx, [rsp+88h+var_18] lea rsi, aCouldNotLoadMo_1; "could not load module filename '%s': js"... mov al, 0 call JS_ThrowReferenceError mov [rsp+88h+var_58], rax mov [rsp+88h+var_50], rdx jmp short loc_106F9 loc_106B9: mov rax, [rsp+88h+var_30] mov rdi, [rsp+88h+var_10] mov rsi, [rsp+88h+var_18] call rax mov [rsp+88h+var_20], rax cmp [rsp+88h+var_20], 0 jnz short loc_10719 mov rdi, [rsp+88h+var_10] mov rdx, [rsp+88h+var_18] lea rsi, aCouldNotLoadMo_2; "could not load module filename '%s': in"... mov al, 0 call JS_ThrowReferenceError mov [rsp+88h+var_68], rax mov [rsp+88h+var_60], rdx loc_106F9: cmp [rsp+88h+var_28], 0 jz short loc_1070B mov rdi, [rsp+88h+var_28] call _dlclose loc_1070B: mov [rsp+88h+var_8], 0 jmp short loc_10726 loc_10719: mov rax, [rsp+88h+var_20] mov [rsp+88h+var_8], rax loc_10726: mov rax, [rsp+88h+var_8] add rsp, 88h retn
long long js_module_loader_so(long long a1, long long a2) { long long v2; // rax int v3; // eax int v4; // r8d int v5; // r9d int v6; // ecx int v7; // r8d int v8; // r9d int v9; // ecx int v10; // r8d int v11; // r9d long long v13; // [rsp+50h] [rbp-38h] long long ( *v14)(long long, long long); // [rsp+58h] [rbp-30h] long long v15; // [rsp+60h] [rbp-28h] long long v16; // [rsp+68h] [rbp-20h] if ( strchr(a2, 47LL) ) { v13 = a2; } else { v2 = strlen(a2); v13 = js_malloc(a1, v2 + 3); if ( !v13 ) return 0LL; strcpy(v13, "./"); strcpy(v13 + 2, a2); } v15 = dlopen(v13, 2LL); if ( v13 != a2 ) js_free(a1, v13); if ( v15 ) { v14 = (long long ( *)(long long, long long))dlsym(v15, "js_init_module"); if ( v14 ) { v16 = v14(a1, a2); if ( v16 ) return v16; JS_ThrowReferenceError( a1, (unsigned int)"could not load module filename '%s': initialization error", a2, v9, v10, v11); } else { JS_ThrowReferenceError( a1, (unsigned int)"could not load module filename '%s': js_init_module not found", a2, v6, v7, v8); } } else { v3 = dlerror(); JS_ThrowReferenceError( a1, (unsigned int)"could not load module filename '%s' as shared library: %s", a2, v3, v4, v5); } if ( v15 ) dlclose(v15); return 0LL; }
js_module_loader_so: SUB RSP,0x88 MOV qword ptr [RSP + 0x78],RDI MOV qword ptr [RSP + 0x70],RSI MOV RDI,qword ptr [RSP + 0x70] MOV ESI,0x2f CALL 0x0010e270 CMP RAX,0x0 JNZ 0x001105f3 MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x70] CALL 0x0010e240 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,RAX ADD RSI,0x2 ADD RSI,0x1 CALL 0x00121cb0 MOV qword ptr [RSP + 0x50],RAX CMP qword ptr [RSP + 0x50],0x0 JNZ 0x001105cd MOV qword ptr [RSP + 0x80],0x0 JMP 0x00110726 LAB_001105cd: MOV RDI,qword ptr [RSP + 0x50] LEA RSI,[0x209af7] CALL 0x0010e100 MOV RDI,qword ptr [RSP + 0x50] ADD RDI,0x2 MOV RSI,qword ptr [RSP + 0x70] CALL 0x0010e100 JMP 0x001105fd LAB_001105f3: MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x50],RAX LAB_001105fd: MOV RDI,qword ptr [RSP + 0x50] MOV ESI,0x2 CALL 0x0010e530 MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x50] CMP RAX,qword ptr [RSP + 0x70] JZ 0x0011062c MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x50] CALL 0x00121db0 LAB_0011062c: CMP qword ptr [RSP + 0x60],0x0 JNZ 0x00110677 MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX CALL 0x0010e050 MOV RDI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] MOV RCX,RAX LEA RSI,[0x209afa] MOV AL,0x0 CALL 0x0012d3f0 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX JMP 0x001106f9 LAB_00110677: MOV RDI,qword ptr [RSP + 0x60] LEA RSI,[0x209b34] CALL 0x0010e830 MOV qword ptr [RSP + 0x58],RAX CMP qword ptr [RSP + 0x58],0x0 JNZ 0x001106b9 MOV RDI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x70] LEA RSI,[0x209b43] MOV AL,0x0 CALL 0x0012d3f0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX JMP 0x001106f9 LAB_001106b9: MOV RAX,qword ptr [RSP + 0x58] MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x70] CALL RAX MOV qword ptr [RSP + 0x68],RAX CMP qword ptr [RSP + 0x68],0x0 JNZ 0x00110719 MOV RDI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x70] LEA RSI,[0x209b81] MOV AL,0x0 CALL 0x0012d3f0 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX LAB_001106f9: CMP qword ptr [RSP + 0x60],0x0 JZ 0x0011070b MOV RDI,qword ptr [RSP + 0x60] CALL 0x0010e930 LAB_0011070b: MOV qword ptr [RSP + 0x80],0x0 JMP 0x00110726 LAB_00110719: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x80],RAX LAB_00110726: MOV RAX,qword ptr [RSP + 0x80] ADD RSP,0x88 RET
long js_module_loader_so(int8 param_1,char *param_2) { char *pcVar1; size_t sVar2; long lVar3; int8 uVar4; code *pcVar5; long lVar6; char *local_38; pcVar1 = strchr(param_2,0x2f); local_38 = param_2; if (pcVar1 == (char *)0x0) { sVar2 = strlen(param_2); local_38 = (char *)js_malloc(param_1,sVar2 + 3); if (local_38 == (char *)0x0) { return 0; } strcpy(local_38,"./"); strcpy(local_38 + 2,param_2); } lVar3 = dlopen(local_38,2); if (local_38 != param_2) { js_free(param_1,local_38); } if (lVar3 == 0) { uVar4 = dlerror(); JS_ThrowReferenceError (param_1,"could not load module filename \'%s\' as shared library: %s",param_2,uVar4); } else { pcVar5 = (code *)dlsym(lVar3,"js_init_module"); if (pcVar5 == (code *)0x0) { JS_ThrowReferenceError (param_1,"could not load module filename \'%s\': js_init_module not found",param_2); } else { lVar6 = (*pcVar5)(param_1,param_2); if (lVar6 != 0) { return lVar6; } JS_ThrowReferenceError (param_1,"could not load module filename \'%s\': initialization error",param_2); } } if (lVar3 != 0) { dlclose(lVar3); } return 0; }
28,694
emittra::Emittra::get_or_create_event_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
angrymouse[P]emittra/src/emittra.cpp
std::shared_ptr<Emittra::EventData> Emittra::get_or_create_event_data(const std::string& event_name) { { std::shared_lock<std::shared_mutex> lock(events_mutex); if (auto it = events.find(event_name); it != events.end() && it->second) { return it->second; } } std::unique_lock<std::shared_mutex> lock(events_mutex); auto& event_data = events[event_name]; if (!event_data) { event_data = std::make_shared<EventData>(initial_queue_size); } return event_data; }
O0
cpp
emittra::Emittra::get_or_create_event_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0xa8, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movq %rdx, 0x90(%rsp) movq 0x98(%rsp), %rsi movq %rsi, 0x20(%rsp) leaq 0x80(%rsp), %rdi callq 0xe750 movq 0x20(%rsp), %rdi addq $0x38, %rdi movq 0x90(%rsp), %rsi callq 0xfce0 movq %rax, 0x28(%rsp) jmp 0xa433 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rax movq %rax, 0x78(%rsp) addq $0x38, %rdi callq 0xe900 movq %rax, 0x60(%rsp) leaq 0x78(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0xe7b0 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0xf(%rsp) jne 0xa46e jmp 0xa488 leaq 0x78(%rsp), %rdi callq 0xfd10 movq %rax, %rdi addq $0x20, %rdi callq 0xfd30 movb %al, 0xf(%rsp) movb 0xf(%rsp), %al testb $0x1, %al jne 0xa492 jmp 0xa4d7 leaq 0x78(%rsp), %rdi callq 0xfd10 movq 0x10(%rsp), %rdi movq %rax, %rsi addq $0x20, %rsi callq 0xfd50 movl $0x1, 0x5c(%rsp) jmp 0xa4df movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x80(%rsp), %rdi callq 0xe840 jmp 0xa5b5 movl $0x0, 0x5c(%rsp) leaq 0x80(%rsp), %rdi callq 0xe840 movl 0x5c(%rsp), %eax testl %eax, %eax je 0xa4fb jmp 0xa4f6 jmp 0xa5a8 movq 0x20(%rsp), %rsi leaq 0x48(%rsp), %rdi callq 0xe170 movq 0x20(%rsp), %rdi addq $0x38, %rdi movq 0x90(%rsp), %rsi callq 0xfd80 movq %rax, (%rsp) jmp 0xa526 movq (%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rdi callq 0xfd30 testb $0x1, %al jne 0xa587 movq 0x20(%rsp), %rsi addq $0x70, %rsi leaq 0x30(%rsp), %rdi callq 0xfdb0 jmp 0xa552 movq 0x40(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0xfe30 leaq 0x30(%rsp), %rdi callq 0x6970 jmp 0xa587 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x48(%rsp), %rdi callq 0xe1e0 jmp 0xa5b5 movq 0x10(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0xfd50 movl $0x1, 0x5c(%rsp) leaq 0x48(%rsp), %rdi callq 0xe1e0 movq 0x18(%rsp), %rax addq $0xa8, %rsp retq movq 0x70(%rsp), %rdi callq 0x4490 nop
_ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 0A8h mov [rsp+0A8h+var_98], rdi mov rax, rdi mov [rsp+0A8h+var_90], rax mov [rsp+0A8h+var_8], rdi mov [rsp+0A8h+var_10], rsi mov [rsp+0A8h+var_18], rdx mov rsi, [rsp+0A8h+var_10] mov [rsp+0A8h+var_88], rsi lea rdi, [rsp+0A8h+var_28] call _ZNSt11shared_lockISt12shared_mutexEC2ERS0_; std::shared_lock<std::shared_mutex>::shared_lock(std::shared_mutex&) mov rdi, [rsp+0A8h+var_88] add rdi, 38h ; '8' mov rsi, [rsp+0A8h+var_18] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7emittra7Emittra9EventDataEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_SA_EEE4findERSG_; std::unordered_map<std::string,std::shared_ptr<emittra::Emittra::EventData>>::find(std::string const&) mov [rsp+0A8h+var_80], rax jmp short $+2 loc_A433: mov rdi, [rsp+0A8h+var_88] mov rax, [rsp+0A8h+var_80] mov [rsp+0A8h+var_30], rax add rdi, 38h ; '8' call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7emittra7Emittra9EventDataEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_SA_EEE3endEv; std::unordered_map<std::string,std::shared_ptr<emittra::Emittra::EventData>>::end(void) mov [rsp+0A8h+var_48], rax lea rdi, [rsp+0A8h+var_30] lea rsi, [rsp+0A8h+var_48] call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7emittra7Emittra9EventDataEEELb1EEESH_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,true> const&) mov cl, al xor eax, eax test cl, 1 mov [rsp+0A8h+var_99], al jnz short loc_A46E jmp short loc_A488 loc_A46E: lea rdi, [rsp+0A8h+var_30] call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7emittra7Emittra9EventDataEEELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,false,true>::operator->(void) mov rdi, rax add rdi, 20h ; ' ' call _ZNKSt12__shared_ptrIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::operator bool(void) mov [rsp+0A8h+var_99], al loc_A488: mov al, [rsp+0A8h+var_99] test al, 1 jnz short loc_A492 jmp short loc_A4D7 loc_A492: lea rdi, [rsp+0A8h+var_30] call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7emittra7Emittra9EventDataEEELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,false,true>::operator->(void) mov rdi, [rsp+0A8h+var_98] mov rsi, rax add rsi, 20h ; ' ' call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEEC2ERKS3_; std::shared_ptr<emittra::Emittra::EventData>::shared_ptr(std::shared_ptr<emittra::Emittra::EventData> const&) mov [rsp+0A8h+var_4C], 1 jmp short loc_A4DF mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_78] call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock() jmp loc_A5B5 loc_A4D7: mov [rsp+0A8h+var_4C], 0 loc_A4DF: lea rdi, [rsp+0A8h+var_28] call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock() mov eax, [rsp+0A8h+var_4C] test eax, eax jz short loc_A4FB jmp short $+2 loc_A4F6: jmp loc_A5A8 loc_A4FB: mov rsi, [rsp+0A8h+var_88] lea rdi, [rsp+0A8h+var_60] call _ZNSt11unique_lockISt12shared_mutexEC2ERS0_; std::unique_lock<std::shared_mutex>::unique_lock(std::shared_mutex&) mov rdi, [rsp+0A8h+var_88] add rdi, 38h ; '8' mov rsi, [rsp+0A8h+var_18] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7emittra7Emittra9EventDataEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_SA_EEEixERSG_; std::unordered_map<std::string,std::shared_ptr<emittra::Emittra::EventData>>::operator[](std::string const&) mov [rsp+0A8h+var_A8], rax jmp short $+2 loc_A526: mov rax, [rsp+0A8h+var_A8] mov [rsp+0A8h+var_68], rax mov rdi, [rsp+0A8h+var_68] call _ZNKSt12__shared_ptrIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_A587 mov rsi, [rsp+0A8h+var_88] add rsi, 70h ; 'p' lea rdi, [rsp+0A8h+var_78] call _ZSt11make_sharedIN7emittra7Emittra9EventDataEJRmEESt10shared_ptrIT_EDpOT0_; std::make_shared<emittra::Emittra::EventData,ulong &>(ulong &) jmp short $+2 loc_A552: mov rdi, [rsp+0A8h+var_68] lea rsi, [rsp+0A8h+var_78] call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEEaSEOS3_; std::shared_ptr<emittra::Emittra::EventData>::operator=(std::shared_ptr<emittra::Emittra::EventData>&&) lea rdi, [rsp+0A8h+var_78] call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEED2Ev; std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr() jmp short loc_A587 mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_40] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() jmp short loc_A5B5 loc_A587: mov rdi, [rsp+0A8h+var_98] mov rsi, [rsp+0A8h+var_68] call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEEC2ERKS3_; std::shared_ptr<emittra::Emittra::EventData>::shared_ptr(std::shared_ptr<emittra::Emittra::EventData> const&) mov [rsp+0A8h+var_4C], 1 lea rdi, [rsp+0A8h+var_60] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() loc_A5A8: mov rax, [rsp+0A8h+var_90] add rsp, 0A8h retn loc_A5B5: mov rdi, [rsp+arg_68] call __Unwind_Resume
long long emittra::Emittra::get_or_create_event_data(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v10; // [rsp+0h] [rbp-A8h] char v11; // [rsp+Fh] [rbp-99h] _BYTE v12[16]; // [rsp+30h] [rbp-78h] BYREF long long v13; // [rsp+40h] [rbp-68h] _BYTE v14[20]; // [rsp+48h] [rbp-60h] BYREF int v15; // [rsp+5Ch] [rbp-4Ch] long long v16[3]; // [rsp+60h] [rbp-48h] BYREF long long v17; // [rsp+78h] [rbp-30h] BYREF _BYTE v18[16]; // [rsp+80h] [rbp-28h] BYREF long long v19; // [rsp+90h] [rbp-18h] long long v20; // [rsp+98h] [rbp-10h] long long v21; // [rsp+A0h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; std::shared_lock<std::shared_mutex>::shared_lock(v18); v17 = std::unordered_map<std::string,std::shared_ptr<emittra::Emittra::EventData>>::find(a2 + 56, v19); v16[0] = std::unordered_map<std::string,std::shared_ptr<emittra::Emittra::EventData>>::end(a2 + 56); v11 = 0; if ( (std::__detail::operator!=(&v17, v16) & 1) != 0 ) { v3 = std::__detail::_Node_iterator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,false,true>::operator->(&v17); v11 = std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::operator bool(v3 + 32); } if ( (v11 & 1) != 0 ) { v4 = std::__detail::_Node_iterator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,false,true>::operator->(&v17); std::shared_ptr<emittra::Emittra::EventData>::shared_ptr(a1, v4 + 32); v15 = 1; } else { v15 = 0; } std::shared_lock<std::shared_mutex>::~shared_lock(v18); if ( !v15 ) { std::unique_lock<std::shared_mutex>::unique_lock(v14, a2); v10 = std::unordered_map<std::string,std::shared_ptr<emittra::Emittra::EventData>>::operator[](a2 + 56, v19); v13 = v10; if ( (std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::operator bool(v10) & 1) == 0 ) { std::make_shared<emittra::Emittra::EventData,unsigned long &>((unsigned int)v12, a2 + 112, v5, v6, v7, v8, v10); std::shared_ptr<emittra::Emittra::EventData>::operator=(v13, v12); std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr((long long)v12); } std::shared_ptr<emittra::Emittra::EventData>::shared_ptr(a1, v13); v15 = 1; std::unique_lock<std::shared_mutex>::~unique_lock(v14); } return a1; }
get_or_create_event_data: SUB RSP,0xa8 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0xa0],RDI MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0x90],RDX MOV RSI,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x20],RSI LEA RDI,[RSP + 0x80] CALL 0x0010e750 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x38 MOV RSI,qword ptr [RSP + 0x90] LAB_0010a427: CALL 0x0010fce0 LAB_0010a42c: MOV qword ptr [RSP + 0x28],RAX JMP 0x0010a433 LAB_0010a433: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x78],RAX ADD RDI,0x38 CALL 0x0010e900 MOV qword ptr [RSP + 0x60],RAX LEA RDI,[RSP + 0x78] LEA RSI,[RSP + 0x60] CALL 0x0010e7b0 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0xf],AL JNZ 0x0010a46e JMP 0x0010a488 LAB_0010a46e: LEA RDI,[RSP + 0x78] CALL 0x0010fd10 MOV RDI,RAX ADD RDI,0x20 CALL 0x0010fd30 MOV byte ptr [RSP + 0xf],AL LAB_0010a488: MOV AL,byte ptr [RSP + 0xf] TEST AL,0x1 JNZ 0x0010a492 JMP 0x0010a4d7 LAB_0010a492: LEA RDI,[RSP + 0x78] CALL 0x0010fd10 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX ADD RSI,0x20 CALL 0x0010fd50 MOV dword ptr [RSP + 0x5c],0x1 JMP 0x0010a4df LAB_0010a4d7: MOV dword ptr [RSP + 0x5c],0x0 LAB_0010a4df: LEA RDI,[RSP + 0x80] CALL 0x0010e840 MOV EAX,dword ptr [RSP + 0x5c] TEST EAX,EAX JZ 0x0010a4fb JMP 0x0010a4f6 LAB_0010a4f6: JMP 0x0010a5a8 LAB_0010a4fb: MOV RSI,qword ptr [RSP + 0x20] LEA RDI,[RSP + 0x48] CALL 0x0010e170 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x38 MOV RSI,qword ptr [RSP + 0x90] LAB_0010a51b: CALL 0x0010fd80 MOV qword ptr [RSP],RAX JMP 0x0010a526 LAB_0010a526: MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x40] CALL 0x0010fd30 TEST AL,0x1 JNZ 0x0010a587 MOV RSI,qword ptr [RSP + 0x20] ADD RSI,0x70 LEA RDI,[RSP + 0x30] CALL 0x0010fdb0 LAB_0010a550: JMP 0x0010a552 LAB_0010a552: MOV RDI,qword ptr [RSP + 0x40] LEA RSI,[RSP + 0x30] CALL 0x0010fe30 LEA RDI,[RSP + 0x30] CALL 0x00106970 JMP 0x0010a587 LAB_0010a587: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x40] CALL 0x0010fd50 MOV dword ptr [RSP + 0x5c],0x1 LEA RDI,[RSP + 0x48] CALL 0x0010e1e0 LAB_0010a5a8: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0xa8 RET
/* emittra::Emittra::get_or_create_event_data(std::__cxx11::string const&) */ string * emittra::Emittra::get_or_create_event_data(string *param_1) { bool bVar1; uint uVar2; long lVar3; string *in_RDX; shared_mutex *in_RSI; bool local_99; shared_ptr local_78 [16]; __shared_ptr *local_68; unique_lock<std::shared_mutex> local_60 [20]; uint local_4c; int8 local_48 [3]; int8 local_30; shared_lock<std::shared_mutex> local_28 [16]; string *local_18; string *local_8; local_18 = in_RDX; local_8 = param_1; std::shared_lock<std::shared_mutex>::shared_lock(local_28,in_RSI); /* try { // try from 0010a427 to 0010a42b has its CatchHandler @ 0010a4b7 */ local_30 = std:: unordered_map<std::__cxx11::string,std::shared_ptr<emittra::Emittra::EventData>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>> ::find((unordered_map<std::__cxx11::string,std::shared_ptr<emittra::Emittra::EventData>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>> *)(in_RSI + 0x38),local_18); local_48[0] = std:: unordered_map<std::__cxx11::string,std::shared_ptr<emittra::Emittra::EventData>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>> ::end(); uVar2 = std::__detail::operator!= ((_Node_iterator_base *)&local_30,(_Node_iterator_base *)local_48); local_99 = false; if ((uVar2 & 1) != 0) { lVar3 = std::__detail:: _Node_iterator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,false,true> ::operator->((_Node_iterator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,false,true> *)&local_30); local_99 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)(lVar3 + 0x20)); } if (local_99 != false) { lVar3 = std::__detail:: _Node_iterator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,false,true> ::operator->((_Node_iterator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,false,true> *)&local_30); std::shared_ptr<emittra::Emittra::EventData>::shared_ptr ((shared_ptr<emittra::Emittra::EventData> *)param_1,(shared_ptr *)(lVar3 + 0x20)); } local_4c = (uint)(local_99 != false); std::shared_lock<std::shared_mutex>::~shared_lock(local_28); if (local_4c == 0) { std::unique_lock<std::shared_mutex>::unique_lock(local_60,in_RSI); /* try { // try from 0010a51b to 0010a54f has its CatchHandler @ 0010a56d */ local_68 = (__shared_ptr *) std:: unordered_map<std::__cxx11::string,std::shared_ptr<emittra::Emittra::EventData>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>> ::operator[]((unordered_map<std::__cxx11::string,std::shared_ptr<emittra::Emittra::EventData>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>> *)(in_RSI + 0x38),local_18); bVar1 = std::__shared_ptr::operator_cast_to_bool(local_68); if (!bVar1) { std::make_shared<emittra::Emittra::EventData,unsigned_long&>((ulong *)local_78); std::shared_ptr<emittra::Emittra::EventData>::operator= ((shared_ptr<emittra::Emittra::EventData> *)local_68,local_78); std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr ((shared_ptr<emittra::Emittra::EventData> *)local_78); } std::shared_ptr<emittra::Emittra::EventData>::shared_ptr ((shared_ptr<emittra::Emittra::EventData> *)param_1,(shared_ptr *)local_68); local_4c = 1; std::unique_lock<std::shared_mutex>::~unique_lock(local_60); } return param_1; }
28,695
emittra::Emittra::get_or_create_event_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
angrymouse[P]emittra/src/emittra.cpp
std::shared_ptr<Emittra::EventData> Emittra::get_or_create_event_data(const std::string& event_name) { { std::shared_lock<std::shared_mutex> lock(events_mutex); if (auto it = events.find(event_name); it != events.end() && it->second) { return it->second; } } std::unique_lock<std::shared_mutex> lock(events_mutex); auto& event_data = events[event_name]; if (!event_data) { event_data = std::make_shared<EventData>(initial_queue_size); } return event_data; }
O1
cpp
emittra::Emittra::get_or_create_event_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi callq 0x938a leaq 0x38(%r14), %r12 movq %r12, %rdi movq %r15, %rsi callq 0xaaf8 testq %rax, %rax je 0x4cb7 movq 0x28(%rax), %rcx testq %rcx, %rcx je 0x4cb7 movq %rcx, (%rbx) movq 0x30(%rax), %rax movq %rax, 0x8(%rbx) testq %rax, %rax je 0x4d77 movq 0xd312(%rip), %rcx # 0x11fb8 cmpb $0x0, (%rcx) je 0x4d73 incl 0x8(%rax) jmp 0x4d77 movq %r14, %rdi callq 0x3330 leaq 0x20(%rsp), %r13 movq %r14, (%r13) movb $0x0, 0x8(%r13) movq %r13, %rdi callq 0x78e6 movb $0x1, 0x8(%r13) movq %r12, %rdi movq %r15, %rsi callq 0xab32 movq %rax, %r15 cmpq $0x0, (%rax) jne 0x4d3f addq $0x70, %r14 leaq 0x18(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x10(%rsp), %rsi leaq 0xf(%rsp), %rdx movq %r14, %rcx callq 0xae98 movaps 0x10(%rsp), %xmm0 xorps %xmm1, %xmm1 movaps %xmm1, 0x10(%rsp) movq 0x8(%r15), %rdi movups %xmm0, (%r15) testq %rdi, %rdi je 0x4d30 callq 0x4352 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x4d3f callq 0x4352 movq (%r15), %rax movq %rax, (%rbx) movq 0x8(%r15), %rax movq %rax, 0x8(%rbx) testq %rax, %rax je 0x4d67 movq 0xd25f(%rip), %rcx # 0x11fb8 cmpb $0x0, (%rcx) je 0x4d63 incl 0x8(%rax) jmp 0x4d67 lock incl 0x8(%rax) leaq 0x20(%rsp), %rdi callq 0x656c jmp 0x4d7f lock incl 0x8(%rax) movq %r14, %rdi callq 0x3330 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x4d92 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x656c jmp 0x4dac movq %rax, %rbx movq %r14, %rdi callq 0x3330 movq %rbx, %rdi callq 0x3450
_ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov r15, rdx mov r14, rsi mov rbx, rdi mov rdi, rsi; this call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void) lea r12, [r14+38h] mov rdi, r12 mov rsi, r15 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN7emittra7Emittra9EventDataEEESaISD_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSF_18_Mod_range_hashingENSF_20_Default_ranged_hashENSF_20_Prime_rehash_policyENSF_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) test rax, rax jz short loc_4CB7 mov rcx, [rax+28h] test rcx, rcx jz short loc_4CB7 mov [rbx], rcx mov rax, [rax+30h] mov [rbx+8], rax test rax, rax jz loc_4D77 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz loc_4D73 inc dword ptr [rax+8] jmp loc_4D77 loc_4CB7: mov rdi, r14 call _pthread_rwlock_unlock lea r13, [rsp+58h+var_38] mov [r13+0], r14 mov byte ptr [r13+8], 0 mov rdi, r13 call _ZNSt11unique_lockISt12shared_mutexE4lockEv; std::unique_lock<std::shared_mutex>::lock(void) mov byte ptr [r13+8], 1 mov rdi, r12 mov rsi, r15 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_St10shared_ptrIN7emittra7Emittra9EventDataEEESaISE_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&) mov r15, rax cmp qword ptr [rax], 0 jnz short loc_4D3F add r14, 70h ; 'p' lea rdi, [rsp+58h+var_48+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+58h+var_48] lea rdx, [rsp+58h+var_49] mov rcx, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN7emittra7Emittra9EventDataESaIS6_EJRmEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<emittra::Emittra::EventData,std::allocator<emittra::Emittra::EventData>,ulong &>(emittra::Emittra::EventData *&,std::_Sp_alloc_shared_tag<std::allocator<emittra::Emittra::EventData>>,ulong &) movaps xmm0, [rsp+58h+var_48] xorps xmm1, xmm1 movaps [rsp+58h+var_48], xmm1 mov rdi, [r15+8] movups xmmword ptr [r15], xmm0 test rdi, rdi jz short loc_4D30 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4D30: mov rdi, qword ptr [rsp+58h+var_48+8] test rdi, rdi jz short loc_4D3F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4D3F: mov rax, [r15] mov [rbx], rax mov rax, [r15+8] mov [rbx+8], rax test rax, rax jz short loc_4D67 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_4D63 inc dword ptr [rax+8] jmp short loc_4D67 loc_4D63: lock inc dword ptr [rax+8] loc_4D67: lea rdi, [rsp+58h+var_38] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() jmp short loc_4D7F loc_4D73: lock inc dword ptr [rax+8] loc_4D77: mov rdi, r14 call _pthread_rwlock_unlock loc_4D7F: mov rax, rbx add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_4D92: mov rbx, rax lea rdi, [rsp+arg_18] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() jmp short loc_4DAC mov rbx, rax mov rdi, r14 call _pthread_rwlock_unlock loc_4DAC: mov rdi, rbx call __Unwind_Resume
_QWORD * emittra::Emittra::get_or_create_event_data(_QWORD *a1, std::__shared_mutex_pthread *a2, long long a3) { long long v5; // rax long long v6; // rcx long long v7; // rax int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long v12; // r15 __int128 v13; // xmm0 volatile signed __int32 *v14; // rdi long long v15; // rax char v17; // [rsp+Fh] [rbp-49h] BYREF __int128 v18; // [rsp+10h] [rbp-48h] BYREF std::__shared_mutex_pthread *v19; // [rsp+20h] [rbp-38h] BYREF char v20; // [rsp+28h] [rbp-30h] std::__shared_mutex_pthread::lock_shared(a2); v5 = std::_Hashtable<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( (char *)a2 + 56, a3); if ( v5 && (v6 = *(_QWORD *)(v5 + 40)) != 0 ) { *a1 = v6; v7 = *(_QWORD *)(v5 + 48); a1[1] = v7; if ( v7 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v7 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v7 + 8)); } pthread_rwlock_unlock(a2); } else { pthread_rwlock_unlock(a2); v19 = a2; v20 = 0; std::unique_lock<std::shared_mutex>::lock(&v19); v20 = 1; v12 = std::__detail::_Map_base<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[]( (int)a2 + 56, a3, v8, v9, v10, v11); if ( !*(_QWORD *)v12 ) { *(_QWORD *)&v18 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<emittra::Emittra::EventData,std::allocator<emittra::Emittra::EventData>,unsigned long &>( (char *)&v18 + 8, &v18, &v17, (char *)a2 + 112); v13 = v18; v18 = 0LL; v14 = *(volatile signed __int32 **)(v12 + 8); *(_OWORD *)v12 = v13; if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); if ( *((_QWORD *)&v18 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v18 + 1)); } *a1 = *(_QWORD *)v12; v15 = *(_QWORD *)(v12 + 8); a1[1] = v15; if ( v15 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v15 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v15 + 8)); } std::unique_lock<std::shared_mutex>::~unique_lock(&v19); } return a1; }
get_or_create_event_data: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x0010938a LEA R12,[R14 + 0x38] LAB_00104c72: MOV RDI,R12 MOV RSI,R15 CALL 0x0010aaf8 LAB_00104c7d: TEST RAX,RAX JZ 0x00104cb7 MOV RCX,qword ptr [RAX + 0x28] TEST RCX,RCX JZ 0x00104cb7 MOV qword ptr [RBX],RCX MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBX + 0x8],RAX TEST RAX,RAX JZ 0x00104d77 MOV RCX,qword ptr [0x00111fb8] CMP byte ptr [RCX],0x0 JZ 0x00104d73 INC dword ptr [RAX + 0x8] JMP 0x00104d77 LAB_00104cb7: MOV RDI,R14 CALL 0x00103330 LEA R13,[RSP + 0x20] MOV qword ptr [R13],R14 MOV byte ptr [R13 + 0x8],0x0 MOV RDI,R13 CALL 0x001078e6 MOV byte ptr [R13 + 0x8],0x1 LAB_00104cda: MOV RDI,R12 MOV RSI,R15 CALL 0x0010ab32 MOV R15,RAX CMP qword ptr [RAX],0x0 JNZ 0x00104d3f ADD R14,0x70 LEA RDI,[RSP + 0x18] MOV qword ptr [RDI + -0x8],0x0 LAB_00104cff: LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RCX,R14 CALL 0x0010ae98 LAB_00104d11: MOVAPS XMM0,xmmword ptr [RSP + 0x10] XORPS XMM1,XMM1 MOVAPS xmmword ptr [RSP + 0x10],XMM1 MOV RDI,qword ptr [R15 + 0x8] MOVUPS xmmword ptr [R15],XMM0 TEST RDI,RDI JZ 0x00104d30 CALL 0x00104352 LAB_00104d30: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x00104d3f CALL 0x00104352 LAB_00104d3f: MOV RAX,qword ptr [R15] MOV qword ptr [RBX],RAX MOV RAX,qword ptr [R15 + 0x8] MOV qword ptr [RBX + 0x8],RAX TEST RAX,RAX JZ 0x00104d67 MOV RCX,qword ptr [0x00111fb8] CMP byte ptr [RCX],0x0 JZ 0x00104d63 INC dword ptr [RAX + 0x8] JMP 0x00104d67 LAB_00104d63: INC.LOCK dword ptr [RAX + 0x8] LAB_00104d67: LEA RDI,[RSP + 0x20] CALL 0x0010656c JMP 0x00104d7f LAB_00104d73: INC.LOCK dword ptr [RAX + 0x8] LAB_00104d77: MOV RDI,R14 CALL 0x00103330 LAB_00104d7f: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* emittra::Emittra::get_or_create_event_data(std::__cxx11::string const&) */ string * emittra::Emittra::get_or_create_event_data(string *param_1) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; long lVar2; long *plVar3; string *in_RDX; pthread_rwlock_t *in_RSI; int1 local_49; long local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40; unique_lock<std::shared_mutex> local_38 [8]; int1 local_30; std::__shared_mutex_pthread::lock_shared((__shared_mutex_pthread *)&in_RSI->__data); /* try { // try from 00104c72 to 00104c7c has its CatchHandler @ 00104da1 */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)&in_RSI[1].__data,in_RDX); if ((lVar2 == 0) || (*(long *)(lVar2 + 0x28) == 0)) { pthread_rwlock_unlock(in_RSI); local_30 = 0; std::unique_lock<std::shared_mutex>::lock(local_38); local_30 = 1; /* try { // try from 00104cda to 00104ce4 has its CatchHandler @ 00104d92 */ plVar3 = (long *)std::__detail:: _Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> ::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> *)&in_RSI[1].__data,in_RDX); if (*plVar3 == 0) { local_48 = 0; /* try { // try from 00104cff to 00104d10 has its CatchHandler @ 00104d90 */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<emittra::Emittra::EventData,std::allocator<emittra::Emittra::EventData>,unsigned_long&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&p_Stack_40,&local_48,&local_49, in_RSI + 2); p_Var1 = p_Stack_40; lVar2 = local_48; local_48 = 0; p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)plVar3[1]; *plVar3 = lVar2; plVar3[1] = (long)p_Var1; if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); } if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40); } } *(long *)param_1 = *plVar3; lVar2 = plVar3[1]; *(long *)(param_1 + 8) = lVar2; if (lVar2 != 0) { if (*PTR___libc_single_threaded_00111fb8 == '\0') { LOCK(); *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; UNLOCK(); } else { *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; } } std::unique_lock<std::shared_mutex>::~unique_lock(local_38); } else { *(long *)param_1 = *(long *)(lVar2 + 0x28); lVar2 = *(long *)(lVar2 + 0x30); *(long *)(param_1 + 8) = lVar2; if (lVar2 != 0) { if (*PTR___libc_single_threaded_00111fb8 == '\0') { LOCK(); *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; UNLOCK(); } else { *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; } } pthread_rwlock_unlock(in_RSI); } return param_1; }
28,696
emittra::Emittra::get_or_create_event_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
angrymouse[P]emittra/src/emittra.cpp
std::shared_ptr<Emittra::EventData> Emittra::get_or_create_event_data(const std::string& event_name) { { std::shared_lock<std::shared_mutex> lock(events_mutex); if (auto it = events.find(event_name); it != events.end() && it->second) { return it->second; } } std::unique_lock<std::shared_mutex> lock(events_mutex); auto& event_data = events[event_name]; if (!event_data) { event_data = std::make_shared<EventData>(initial_queue_size); } return event_data; }
O2
cpp
emittra::Emittra::get_or_create_event_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %rsi, 0x8(%rsp) movb $0x1, 0x10(%rsp) movq %rsi, %rdi callq 0x84ae leaq 0x38(%r14), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x9a32 testq %rax, %rax je 0x498e cmpq $0x0, 0x28(%rax) je 0x498e addq $0x28, %rax movq %rbx, %rdi movq %rax, %rsi callq 0x684c leaq 0x8(%rsp), %rdi callq 0x5edc jmp 0x49f6 leaq 0x8(%rsp), %rdi callq 0x5edc leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x5d80 movq %r12, %rdi movq %r15, %rsi callq 0x9a60 movq %rax, %r15 cmpq $0x0, (%rax) jne 0x49e1 addq $0x70, %r14 leaq 0x18(%rsp), %rdi movq %r14, %rsi callq 0x63d8 leaq 0x18(%rsp), %rsi movq %r15, %rdi callq 0x9ff2 leaq 0x20(%rsp), %rdi callq 0x3f84 movq %rbx, %rdi movq %r15, %rsi callq 0x684c leaq 0x8(%rsp), %rdi callq 0x5d96 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x4a07 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x5d96 jmp 0x4a23 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x5edc movq %rbx, %rdi callq 0x3440 nop
_ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 28h mov r15, rdx mov r14, rsi mov rbx, rdi mov [rsp+48h+var_40], rsi mov [rsp+48h+var_38], 1 mov rdi, rsi; this call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void) lea r12, [r14+38h] mov rdi, r12 mov rsi, r15 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN7emittra7Emittra9EventDataEEESaISD_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSF_18_Mod_range_hashingENSF_20_Default_ranged_hashENSF_20_Prime_rehash_policyENSF_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) test rax, rax jz short loc_498E cmp qword ptr [rax+28h], 0 jz short loc_498E add rax, 28h ; '(' mov rdi, rbx mov rsi, rax call _ZNSt12__shared_ptrIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2EEC2ERKS5_; std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2> const&) lea rdi, [rsp+48h+var_40] call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock() jmp short loc_49F6 loc_498E: lea rdi, [rsp+48h+var_40] call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock() lea rdi, [rsp+48h+var_40] mov rsi, r14 call _ZNSt11unique_lockISt12shared_mutexEC2ERS0_; std::unique_lock<std::shared_mutex>::unique_lock(std::shared_mutex&) mov rdi, r12 mov rsi, r15 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_St10shared_ptrIN7emittra7Emittra9EventDataEEESaISE_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&) mov r15, rax cmp qword ptr [rax], 0 jnz short loc_49E1 add r14, 70h ; 'p' lea rdi, [rsp+48h+var_30] mov rsi, r14 call _ZSt11make_sharedIN7emittra7Emittra9EventDataEJRmEESt10shared_ptrIT_EDpOT0_; std::make_shared<emittra::Emittra::EventData,ulong &>(ulong &) lea rsi, [rsp+48h+var_30] mov rdi, r15 call _ZNSt12__shared_ptrIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2EEaSEOS5_; std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>&&) lea rdi, [rsp+48h+var_28] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_49E1: mov rdi, rbx mov rsi, r15 call _ZNSt12__shared_ptrIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2EEC2ERKS5_; std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2> const&) lea rdi, [rsp+48h+var_40] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() loc_49F6: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_4A07: mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() jmp short loc_4A23 mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock() loc_4A23: mov rdi, rbx call __Unwind_Resume
long long emittra::Emittra::get_or_create_event_data(long long a1, std::__shared_mutex_pthread *a2, long long a3) { long long v4; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d _QWORD *v9; // r15 std::__shared_mutex_pthread *v11; // [rsp+8h] [rbp-40h] BYREF char v12; // [rsp+10h] [rbp-38h] _BYTE v13[8]; // [rsp+18h] [rbp-30h] BYREF _QWORD v14[5]; // [rsp+20h] [rbp-28h] BYREF v11 = a2; v12 = 1; std::__shared_mutex_pthread::lock_shared(a2); v4 = std::_Hashtable<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( (char *)a2 + 56, a3); if ( v4 && *(_QWORD *)(v4 + 40) ) { std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(a1, v4 + 40); std::shared_lock<std::shared_mutex>::~shared_lock(&v11); } else { std::shared_lock<std::shared_mutex>::~shared_lock(&v11); std::unique_lock<std::shared_mutex>::unique_lock(&v11, a2); v9 = (_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[]( (int)a2 + 56, a3, v5, v6, v7, v8); if ( !*v9 ) { std::make_shared<emittra::Emittra::EventData,unsigned long &>(v13, (char *)a2 + 112); std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::operator=(v9, v13); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v14); } std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(a1, v9); std::unique_lock<std::shared_mutex>::~unique_lock(&v11); } return a1; }
get_or_create_event_data: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI MOV byte ptr [RSP + 0x10],0x1 MOV RDI,RSI CALL 0x001084ae LEA R12,[R14 + 0x38] LAB_0010495c: MOV RDI,R12 MOV RSI,R15 CALL 0x00109a32 LAB_00104967: TEST RAX,RAX JZ 0x0010498e CMP qword ptr [RAX + 0x28],0x0 JZ 0x0010498e ADD RAX,0x28 MOV RDI,RBX MOV RSI,RAX CALL 0x0010684c LEA RDI,[RSP + 0x8] CALL 0x00105edc JMP 0x001049f6 LAB_0010498e: LEA RDI,[RSP + 0x8] CALL 0x00105edc LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x00105d80 LAB_001049a5: MOV RDI,R12 MOV RSI,R15 CALL 0x00109a60 MOV R15,RAX CMP qword ptr [RAX],0x0 JNZ 0x001049e1 ADD R14,0x70 LAB_001049bd: LEA RDI,[RSP + 0x18] MOV RSI,R14 CALL 0x001063d8 LAB_001049ca: LEA RSI,[RSP + 0x18] MOV RDI,R15 CALL 0x00109ff2 LEA RDI,[RSP + 0x20] CALL 0x00103f84 LAB_001049e1: MOV RDI,RBX MOV RSI,R15 CALL 0x0010684c LEA RDI,[RSP + 0x8] CALL 0x00105d96 LAB_001049f6: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* emittra::Emittra::get_or_create_event_data(std::__cxx11::string const&) */ string * emittra::Emittra::get_or_create_event_data(string *param_1) { long lVar1; __shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2> *this; string *in_RDX; __shared_mutex_pthread *in_RSI; shared_lock<std::shared_mutex> local_40 [8]; int1 local_38; __shared_ptr local_30 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_28 [8]; local_38 = 1; std::__shared_mutex_pthread::lock_shared(in_RSI); /* try { // try from 0010495c to 00104966 has its CatchHandler @ 00104a16 */ lVar1 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)(in_RSI + 0x38),in_RDX); if ((lVar1 == 0) || (*(long *)(lVar1 + 0x28) == 0)) { std::shared_lock<std::shared_mutex>::~shared_lock(local_40); std::unique_lock<std::shared_mutex>::unique_lock ((unique_lock<std::shared_mutex> *)local_40,(shared_mutex *)in_RSI); /* try { // try from 001049a5 to 001049af has its CatchHandler @ 00104a07 */ this = (__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2> *) std::__detail:: _Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> ::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> *)(in_RSI + 0x38),in_RDX); if (*(long *)this == 0) { /* try { // try from 001049bd to 001049c9 has its CatchHandler @ 00104a05 */ std::make_shared<emittra::Emittra::EventData,unsigned_long&>((ulong *)local_30); std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::operator= (this,local_30); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_28); } std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::__shared_ptr ((__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2> *)param_1, (__shared_ptr *)this); std::unique_lock<std::shared_mutex>::~unique_lock((unique_lock<std::shared_mutex> *)local_40); } else { std::__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2>::__shared_ptr ((__shared_ptr<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2> *)param_1, (__shared_ptr *)(lVar1 + 0x28)); std::shared_lock<std::shared_mutex>::~shared_lock(local_40); } return param_1; }
28,697
emittra::Emittra::get_or_create_event_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
angrymouse[P]emittra/src/emittra.cpp
std::shared_ptr<Emittra::EventData> Emittra::get_or_create_event_data(const std::string& event_name) { { std::shared_lock<std::shared_mutex> lock(events_mutex); if (auto it = events.find(event_name); it != events.end() && it->second) { return it->second; } } std::unique_lock<std::shared_mutex> lock(events_mutex); auto& event_data = events[event_name]; if (!event_data) { event_data = std::make_shared<EventData>(initial_queue_size); } return event_data; }
O3
cpp
emittra::Emittra::get_or_create_event_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi callq 0x9226 leaq 0x38(%r14), %r12 movq %r12, %rdi movq %r15, %rsi callq 0xa96e testq %rax, %rax je 0x4c8f movq 0x28(%rax), %rcx testq %rcx, %rcx je 0x4c8f movq %rcx, (%rbx) movq 0x30(%rax), %rax movq %rax, 0x8(%rbx) testq %rax, %rax je 0x4d51 movq 0xd33a(%rip), %rcx # 0x11fb8 cmpb $0x0, (%rcx) je 0x4d4d incl 0x8(%rax) jmp 0x4d51 movq %r14, %rdi callq 0x3330 leaq 0x20(%rsp), %r13 movq %r14, (%r13) movb $0x0, 0x8(%r13) movq %r13, %rdi callq 0x787e movb $0x1, 0x8(%r13) movq %r12, %rdi movq %r15, %rsi callq 0xa9a8 movq %rax, %r15 movq (%rax), %rax testq %rax, %rax jne 0x4d1c addq $0x70, %r14 leaq 0x18(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x10(%rsp), %rsi leaq 0xf(%rsp), %rdx movq %r14, %rcx callq 0xad04 movaps 0x10(%rsp), %xmm0 xorps %xmm1, %xmm1 movaps %xmm1, 0x10(%rsp) movq 0x8(%r15), %rdi movups %xmm0, (%r15) testq %rdi, %rdi je 0x4d19 callq 0x4334 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x4d19 callq 0x4334 movq (%r15), %rax movq %rax, (%rbx) movq 0x8(%r15), %rax movq %rax, 0x8(%rbx) testq %rax, %rax je 0x4d41 movq 0xd285(%rip), %rcx # 0x11fb8 cmpb $0x0, (%rcx) je 0x4d3d incl 0x8(%rax) jmp 0x4d41 lock incl 0x8(%rax) leaq 0x20(%rsp), %rdi callq 0x654a jmp 0x4d59 lock incl 0x8(%rax) movq %r14, %rdi callq 0x3330 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x4d6c movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x654a jmp 0x4d86 movq %rax, %rbx movq %r14, %rdi callq 0x3330 movq %rbx, %rdi callq 0x3450
_ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov r15, rdx mov r14, rsi mov rbx, rdi mov rdi, rsi; this call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void) lea r12, [r14+38h] mov rdi, r12 mov rsi, r15 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN7emittra7Emittra9EventDataEEESaISD_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSF_18_Mod_range_hashingENSF_20_Default_ranged_hashENSF_20_Prime_rehash_policyENSF_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) test rax, rax jz short loc_4C8F mov rcx, [rax+28h] test rcx, rcx jz short loc_4C8F mov [rbx], rcx mov rax, [rax+30h] mov [rbx+8], rax test rax, rax jz loc_4D51 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz loc_4D4D inc dword ptr [rax+8] jmp loc_4D51 loc_4C8F: mov rdi, r14 call _pthread_rwlock_unlock lea r13, [rsp+58h+var_38] mov [r13+0], r14 mov byte ptr [r13+8], 0 mov rdi, r13 call _ZNSt11unique_lockISt12shared_mutexE4lockEv; std::unique_lock<std::shared_mutex>::lock(void) mov byte ptr [r13+8], 1 mov rdi, r12 mov rsi, r15 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_St10shared_ptrIN7emittra7Emittra9EventDataEEESaISE_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&) mov r15, rax mov rax, [rax] test rax, rax jnz short loc_4D1C add r14, 70h ; 'p' lea rdi, [rsp+58h+var_48+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+58h+var_48] lea rdx, [rsp+58h+var_49] mov rcx, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN7emittra7Emittra9EventDataESaIS6_EJRmEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<emittra::Emittra::EventData,std::allocator<emittra::Emittra::EventData>,ulong &>(emittra::Emittra::EventData *&,std::_Sp_alloc_shared_tag<std::allocator<emittra::Emittra::EventData>>,ulong &) movaps xmm0, [rsp+58h+var_48] xorps xmm1, xmm1 movaps [rsp+58h+var_48], xmm1 mov rdi, [r15+8] movups xmmword ptr [r15], xmm0 test rdi, rdi jz short loc_4D19 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) mov rdi, qword ptr [rsp+58h+var_48+8] test rdi, rdi jz short loc_4D19 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4D19: mov rax, [r15] loc_4D1C: mov [rbx], rax mov rax, [r15+8] mov [rbx+8], rax test rax, rax jz short loc_4D41 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_4D3D inc dword ptr [rax+8] jmp short loc_4D41 loc_4D3D: lock inc dword ptr [rax+8] loc_4D41: lea rdi, [rsp+58h+var_38] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() jmp short loc_4D59 loc_4D4D: lock inc dword ptr [rax+8] loc_4D51: mov rdi, r14 call _pthread_rwlock_unlock loc_4D59: mov rax, rbx add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_4D6C: mov rbx, rax lea rdi, [rsp+arg_18] call _ZNSt11unique_lockISt12shared_mutexED2Ev; std::unique_lock<std::shared_mutex>::~unique_lock() jmp short loc_4D86 mov rbx, rax mov rdi, r14 call _pthread_rwlock_unlock loc_4D86: mov rdi, rbx call __Unwind_Resume
_QWORD * emittra::Emittra::get_or_create_event_data(_QWORD *a1, std::__shared_mutex_pthread *a2, long long a3) { long long v5; // rax long long v6; // rcx long long v7; // rax int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long *v12; // r15 long long v13; // rax __int128 v14; // xmm0 volatile signed __int32 *v15; // rdi long long v16; // rax char v18; // [rsp+Fh] [rbp-49h] BYREF __int128 v19; // [rsp+10h] [rbp-48h] BYREF std::__shared_mutex_pthread *v20; // [rsp+20h] [rbp-38h] BYREF char v21; // [rsp+28h] [rbp-30h] std::__shared_mutex_pthread::lock_shared(a2); v5 = std::_Hashtable<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( (char *)a2 + 56, a3); if ( v5 && (v6 = *(_QWORD *)(v5 + 40)) != 0 ) { *a1 = v6; v7 = *(_QWORD *)(v5 + 48); a1[1] = v7; if ( v7 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v7 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v7 + 8)); } pthread_rwlock_unlock(a2); } else { pthread_rwlock_unlock(a2); v20 = a2; v21 = 0; std::unique_lock<std::shared_mutex>::lock(&v20); v21 = 1; v12 = (long long *)std::__detail::_Map_base<std::string,std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::string const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[]( (int)a2 + 56, a3, v8, v9, v10, v11); v13 = *v12; if ( !*v12 ) { *(_QWORD *)&v19 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<emittra::Emittra::EventData,std::allocator<emittra::Emittra::EventData>,unsigned long &>( (char *)&v19 + 8, &v19, &v18, (char *)a2 + 112); v14 = v19; v19 = 0LL; v15 = (volatile signed __int32 *)v12[1]; *(_OWORD *)v12 = v14; if ( v15 ) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); if ( *((_QWORD *)&v19 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v19 + 1)); } v13 = *v12; } *a1 = v13; v16 = v12[1]; a1[1] = v16; if ( v16 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v16 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v16 + 8)); } std::unique_lock<std::shared_mutex>::~unique_lock(&v20); } return a1; }
get_or_create_event_data: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x00109226 LEA R12,[R14 + 0x38] LAB_00104c4a: MOV RDI,R12 MOV RSI,R15 CALL 0x0010a96e LAB_00104c55: TEST RAX,RAX JZ 0x00104c8f MOV RCX,qword ptr [RAX + 0x28] TEST RCX,RCX JZ 0x00104c8f MOV qword ptr [RBX],RCX MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBX + 0x8],RAX TEST RAX,RAX JZ 0x00104d51 MOV RCX,qword ptr [0x00111fb8] CMP byte ptr [RCX],0x0 JZ 0x00104d4d INC dword ptr [RAX + 0x8] JMP 0x00104d51 LAB_00104c8f: MOV RDI,R14 CALL 0x00103330 LEA R13,[RSP + 0x20] MOV qword ptr [R13],R14 MOV byte ptr [R13 + 0x8],0x0 MOV RDI,R13 CALL 0x0010787e MOV byte ptr [R13 + 0x8],0x1 LAB_00104cb2: MOV RDI,R12 MOV RSI,R15 CALL 0x0010a9a8 MOV R15,RAX MOV RAX,qword ptr [RAX] TEST RAX,RAX JNZ 0x00104d1c ADD R14,0x70 LEA RDI,[RSP + 0x18] MOV qword ptr [RDI + -0x8],0x0 LAB_00104cd9: LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RCX,R14 CALL 0x0010ad04 LAB_00104ceb: MOVAPS XMM0,xmmword ptr [RSP + 0x10] XORPS XMM1,XMM1 MOVAPS xmmword ptr [RSP + 0x10],XMM1 MOV RDI,qword ptr [R15 + 0x8] MOVUPS xmmword ptr [R15],XMM0 TEST RDI,RDI JZ 0x00104d19 CALL 0x00104334 MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x00104d19 CALL 0x00104334 LAB_00104d19: MOV RAX,qword ptr [R15] LAB_00104d1c: MOV qword ptr [RBX],RAX MOV RAX,qword ptr [R15 + 0x8] MOV qword ptr [RBX + 0x8],RAX TEST RAX,RAX JZ 0x00104d41 MOV RCX,qword ptr [0x00111fb8] CMP byte ptr [RCX],0x0 JZ 0x00104d3d INC dword ptr [RAX + 0x8] JMP 0x00104d41 LAB_00104d3d: INC.LOCK dword ptr [RAX + 0x8] LAB_00104d41: LEA RDI,[RSP + 0x20] CALL 0x0010654a JMP 0x00104d59 LAB_00104d4d: INC.LOCK dword ptr [RAX + 0x8] LAB_00104d51: MOV RDI,R14 CALL 0x00103330 LAB_00104d59: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* emittra::Emittra::get_or_create_event_data(std::__cxx11::string const&) */ string * emittra::Emittra::get_or_create_event_data(string *param_1) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; long lVar2; long *plVar3; string *in_RDX; pthread_rwlock_t *in_RSI; int1 local_49; long local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40; unique_lock<std::shared_mutex> local_38 [8]; int1 local_30; std::__shared_mutex_pthread::lock_shared((__shared_mutex_pthread *)&in_RSI->__data); /* try { // try from 00104c4a to 00104c54 has its CatchHandler @ 00104d7b */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)&in_RSI[1].__data,in_RDX); if ((lVar2 == 0) || (*(long *)(lVar2 + 0x28) == 0)) { pthread_rwlock_unlock(in_RSI); local_30 = 0; std::unique_lock<std::shared_mutex>::lock(local_38); local_30 = 1; /* try { // try from 00104cb2 to 00104cbc has its CatchHandler @ 00104d6c */ plVar3 = (long *)std::__detail:: _Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> ::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<emittra::Emittra::EventData>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> *)&in_RSI[1].__data,in_RDX); lVar2 = *plVar3; if (lVar2 == 0) { local_48 = 0; /* try { // try from 00104cd9 to 00104cea has its CatchHandler @ 00104d6a */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<emittra::Emittra::EventData,std::allocator<emittra::Emittra::EventData>,unsigned_long&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&p_Stack_40,&local_48,&local_49, in_RSI + 2); p_Var1 = p_Stack_40; lVar2 = local_48; local_48 = 0; p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)plVar3[1]; *plVar3 = lVar2; plVar3[1] = (long)p_Var1; if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40); } } lVar2 = *plVar3; } *(long *)param_1 = lVar2; lVar2 = plVar3[1]; *(long *)(param_1 + 8) = lVar2; if (lVar2 != 0) { if (*PTR___libc_single_threaded_00111fb8 == '\0') { LOCK(); *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; UNLOCK(); } else { *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; } } std::unique_lock<std::shared_mutex>::~unique_lock(local_38); } else { *(long *)param_1 = *(long *)(lVar2 + 0x28); lVar2 = *(long *)(lVar2 + 0x30); *(long *)(param_1 + 8) = lVar2; if (lVar2 != 0) { if (*PTR___libc_single_threaded_00111fb8 == '\0') { LOCK(); *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; UNLOCK(); } else { *(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1; } } pthread_rwlock_unlock(in_RSI); } return param_1; }
28,698
my_snprintf_8bit
eloqsql/strings/ctype-simple.c
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n __attribute__((unused)), const char* fmt, ...) { va_list args; size_t result; va_start(args,fmt); result= my_vsnprintf(to, n, fmt, args); va_end(args); return result; }
O3
c
my_snprintf_8bit: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rsi, %rdi leaq -0xd0(%rbp), %rsi movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x70c19 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) leaq -0x20(%rbp), %rax movq %rsi, 0x10(%rax) leaq 0x10(%rbp), %rsi movq %rsi, 0x8(%rax) movabsq $0x3000000020, %rsi # imm = 0x3000000020 movq %rsi, (%rax) movq %rdx, %rsi movq %rcx, %rdx movq %rax, %rcx callq 0x928cd addq $0xd0, %rsp popq %rbp retq
my_snprintf_8bit: push rbp mov rbp, rsp sub rsp, 0D0h mov rdi, rsi lea rsi, [rbp+var_D0] mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_70C19 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_70C19: lea rax, [rbp+var_20] mov [rax+10h], rsi lea rsi, [rbp+arg_0] mov [rax+8], rsi mov rsi, 3000000020h mov [rax], rsi mov rsi, rdx mov rdx, rcx mov rcx, rax call my_vsnprintf add rsp, 0D0h pop rbp retn
long long my_snprintf_8bit( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14, char a15) { char v16; // [rsp+0h] [rbp-D0h] BYREF long long v17; // [rsp+20h] [rbp-B0h] long long v18; // [rsp+28h] [rbp-A8h] __m128 v19; // [rsp+30h] [rbp-A0h] __m128 v20; // [rsp+40h] [rbp-90h] __m128 v21; // [rsp+50h] [rbp-80h] __m128 v22; // [rsp+60h] [rbp-70h] __m128 v23; // [rsp+70h] [rbp-60h] __m128 v24; // [rsp+80h] [rbp-50h] __m128 v25; // [rsp+90h] [rbp-40h] __m128 v26; // [rsp+A0h] [rbp-30h] long long v27; // [rsp+B0h] [rbp-20h] char *v28; // [rsp+B8h] [rbp-18h] char *v29; // [rsp+C0h] [rbp-10h] v19 = a1; v20 = a2; v21 = a3; v22 = a4; v23 = a5; v24 = a6; v25 = a7; v26 = a8; v17 = a13; v18 = a14; v29 = &v16; v28 = &a15; v27 = 0x3000000020LL; return my_vsnprintf(a10, a11, a12); }
my_snprintf_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RDI,RSI LEA RSI,[RBP + -0xd0] MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x00170c19 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_00170c19: LEA RAX,[RBP + -0x20] MOV qword ptr [RAX + 0x10],RSI LEA RSI,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RSI MOV RSI,0x3000000020 MOV qword ptr [RAX],RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,RAX CALL 0x001928cd ADD RSP,0xd0 POP RBP RET
void my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_d8 [32]; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000020; local_b8 = param_13; local_b0 = param_14; my_vsnprintf(param_10,param_11,param_12,&local_28); return; }
28,699
sdflib::OctreeSdf::computeMinBorderValue()
aimrt_mujoco_sim/_deps/sdflib-src/src/sdf/OctreeSdf.cpp
void OctreeSdf::computeMinBorderValue() { const std::array<glm::vec3, 8> childrens = { glm::vec3(-1.0f, -1.0f, -1.0f), glm::vec3(1.0f, -1.0f, -1.0f), glm::vec3(-1.0f, 1.0f, -1.0f), glm::vec3(1.0f, 1.0f, -1.0f), glm::vec3(-1.0f, -1.0f, 1.0f), glm::vec3(1.0f, -1.0f, 1.0f), glm::vec3(-1.0f, 1.0f, 1.0f), glm::vec3(1.0f, 1.0f, 1.0f) }; std::function<float(uint32_t nIdx, glm::vec3 pos, float halfSize)> processNode; processNode = [&](uint32_t nIdx, glm::vec3 pos, float halfSize) -> float { if(!mOctreeData[nIdx].isLeaf()) { float minValue = INFINITY; for(uint32_t i=0; i < 8; i++) { const glm::vec3 cp = pos + 0.5f * halfSize * childrens[i]; if(cp.x < halfSize || cp.y < halfSize || cp.z < halfSize || cp.x > (1.0f-halfSize) || cp.y > (1.0f-halfSize) || cp.z > (1.0f-halfSize)) { minValue = glm::min(minValue, processNode(mOctreeData[nIdx].getChildrenIndex() + i, cp, 0.5f * halfSize)); } } return minValue; } else { float minValue = INFINITY; for(uint32_t i=0; i < 8; i++) { const glm::vec3 sp = pos + halfSize * childrens[i]; if(sp.x < 1e-4 || sp.y < 1e-4 || sp.z < 1e-4 || sp.x > (1.0f-1e-4) || sp.y > (1.0f-1e-4) || sp.z > (1.0f-1e-4)) { std::array<float, InterpolationMethod::NUM_COEFFICIENTS>* coeff = reinterpret_cast<std::array<float, InterpolationMethod::NUM_COEFFICIENTS>*>( &mOctreeData[mOctreeData[nIdx].getChildrenIndex()]); minValue = glm::min(minValue, InterpolationMethod::interpolateValue(*coeff, 0.5f * childrens[i] + glm::vec3(0.5f))); float val = InterpolationMethod::interpolateValue(*coeff, 0.5f * childrens[i] + glm::vec3(0.5f)); } } return minValue; } return INFINITY; }; const float gridCellSize = 1.0f / static_cast<float>(mStartGridSize); float minValue = INFINITY; for(uint32_t k=0; k < mStartGridSize; k++) { for(uint32_t j=0; j < mStartGridSize; j++) { for(uint32_t i=0; i < mStartGridSize; i++) { const uint32_t idx = k * mStartGridXY + j * mStartGridSize + i; const glm::vec3 pos((static_cast<float>(i) + 0.5f) * gridCellSize, (static_cast<float>(j) + 0.5f) * gridCellSize, (static_cast<float>(k) + 0.5f) * gridCellSize); minValue = glm::min(minValue, processNode(idx, pos, 0.5f * gridCellSize)); } } } mMinBorderValue = minValue; }
O3
cpp
sdflib::OctreeSdf::computeMinBorderValue(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa0, %rsp movq %rdi, %rbx leaq 0x34017(%rip), %rsi # 0x4b968 leaq 0x40(%rsp), %r14 movl $0x18, %ecx movq %r14, %rdi rep movsl (%rsi), %es:(%rdi) movl $0x18, %edi callq 0xaa30 movq %rbx, (%rax) movq %r14, 0x8(%rax) leaq 0x10(%rsp), %rcx movq %rcx, 0x10(%rax) movq %rax, (%rcx) movq $0x0, 0x8(%rcx) leaq 0x11242(%rip), %rax # 0x28bce movq %rax, 0x10(%rcx) leaq 0x10f95(%rip), %rdx # 0x2892c movq %rdx, 0x18(%rcx) movl 0x28(%rbx), %esi testl %esi, %esi je 0x17aa1 cvtsi2ss %esi, %xmm0 movss 0x32cee(%rip), %xmm1 # 0x4a6a0 divss %xmm0, %xmm1 movss 0x32cf2(%rip), %xmm0 # 0x4a6b0 movss %xmm1, (%rsp) mulss %xmm1, %xmm0 movss %xmm0, 0x4(%rsp) xorl %ebp, %ebp movss 0x32ce1(%rip), %xmm0 # 0x4a6b8 leaq 0x10(%rsp), %r14 movl %ebp, %eax xorps %xmm1, %xmm1 cvtsi2ss %rax, %xmm1 addss 0x32cc2(%rip), %xmm1 # 0x4a6b0 mulss (%rsp), %xmm1 movss %xmm1, 0x8(%rsp) xorl %r15d, %r15d movl %r15d, %eax xorps %xmm1, %xmm1 cvtsi2ss %rax, %xmm1 addss 0x32ca1(%rip), %xmm1 # 0x4a6b0 mulss (%rsp), %xmm1 movaps %xmm1, 0x30(%rsp) xorl %r12d, %r12d movss %xmm0, 0xc(%rsp) movl %r12d, %eax xorps %xmm0, %xmm0 cvtsi2ss %rax, %xmm0 movl 0x2c(%rbx), %eax imull %ebp, %eax imull %r15d, %esi addl %r12d, %esi addl %eax, %esi addss 0x32c6c(%rip), %xmm0 # 0x4a6b0 mulss (%rsp), %xmm0 unpcklps 0x30(%rsp), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] movq %r14, %rdi movss 0x8(%rsp), %xmm1 movss 0x4(%rsp), %xmm2 callq 0x196b2 movss 0xc(%rsp), %xmm1 minss %xmm0, %xmm1 movaps %xmm1, %xmm0 incl %r12d movl 0x28(%rbx), %esi cmpl %esi, %r12d jb 0x17a1c incl %r15d cmpl %esi, %r15d jb 0x179fc incl %ebp cmpl %esi, %ebp jb 0x179dc movq 0x20(%rsp), %rax movss %xmm0, 0x24(%rbx) testq %rax, %rax jne 0x17aa8 jmp 0x17ab7 movl $0x7f800000, 0x24(%rbx) # imm = 0x7F800000 leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax addq $0xa0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x17aed movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x17ae5 leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0xa950 movq %rax, %rdi callq 0xcb19 nop
_ZN6sdflib9OctreeSdf21computeMinBorderValueEv: push rbp push r15 push r14 push r12 push rbx sub rsp, 0A0h mov rbx, rdi lea rsi, unk_4B968 lea r14, [rsp+0C8h+var_88] mov ecx, 18h mov rdi, r14 rep movsd mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], rbx mov [rax+8], r14 lea rcx, [rsp+0C8h+var_B8] mov [rax+10h], rcx mov [rcx], rax mov qword ptr [rcx+8], 0 lea rax, _ZNSt17_Function_handlerIFfjN3glm5tvec3IfLNS0_9precisionE0EEEfEZN6sdflib9OctreeSdf21computeMinBorderValueEvE3$_0E10_M_managerERSt9_Any_dataRKS9_St18_Manager_operation; std::_Function_handler<float ()(uint,glm::tvec3<float,(glm::precision)0>,float),sdflib::OctreeSdf::computeMinBorderValue(void)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rcx+10h], rax lea rdx, _ZNSt17_Function_handlerIFfjN3glm5tvec3IfLNS0_9precisionE0EEEfEZN6sdflib9OctreeSdf21computeMinBorderValueEvE3$_0E9_M_invokeERKSt9_Any_dataOjOS3_Of; std::_Function_handler<float ()(uint,glm::tvec3<float,(glm::precision)0>,float),sdflib::OctreeSdf::computeMinBorderValue(void)::$_0>::_M_invoke(std::_Any_data const&,uint &&,glm::tvec3<float,(glm::precision)0>&&,float &&) mov [rcx+18h], rdx mov esi, [rbx+28h] test esi, esi jz loc_17AA1 cvtsi2ss xmm0, esi movss xmm1, cs:dword_4A6A0 divss xmm1, xmm0 movss xmm0, cs:dword_4A6B0 movss [rsp+0C8h+var_C8], xmm1 mulss xmm0, xmm1 movss [rsp+0C8h+var_C4], xmm0 xor ebp, ebp movss xmm0, cs:dword_4A6B8 lea r14, [rsp+0C8h+var_B8] loc_179DC: mov eax, ebp xorps xmm1, xmm1 cvtsi2ss xmm1, rax addss xmm1, cs:dword_4A6B0 mulss xmm1, [rsp+0C8h+var_C8] movss [rsp+0C8h+var_C0], xmm1 xor r15d, r15d loc_179FC: mov eax, r15d xorps xmm1, xmm1 cvtsi2ss xmm1, rax addss xmm1, cs:dword_4A6B0 mulss xmm1, [rsp+0C8h+var_C8] movaps [rsp+0C8h+var_98], xmm1 xor r12d, r12d loc_17A1C: movss [rsp+0C8h+var_BC], xmm0 mov eax, r12d xorps xmm0, xmm0 cvtsi2ss xmm0, rax mov eax, [rbx+2Ch] imul eax, ebp imul esi, r15d add esi, r12d add esi, eax addss xmm0, cs:dword_4A6B0 mulss xmm0, [rsp+0C8h+var_C8] unpcklps xmm0, [rsp+0C8h+var_98] mov rdi, r14 movss xmm1, [rsp+0C8h+var_C0] movss xmm2, [rsp+0C8h+var_C4] call _ZNKSt8functionIFfjN3glm5tvec3IfLNS0_9precisionE0EEEfEEclEjS3_f; std::function<float ()(uint,glm::tvec3<float,(glm::precision)0>,float)>::operator()(uint,glm::tvec3<float,(glm::precision)0>,float) movss xmm1, [rsp+0C8h+var_BC] minss xmm1, xmm0 movaps xmm0, xmm1 inc r12d mov esi, [rbx+28h] cmp r12d, esi jb short loc_17A1C inc r15d cmp r15d, esi jb loc_179FC inc ebp cmp ebp, esi jb loc_179DC mov rax, [rsp+0C8h+var_A8] movss dword ptr [rbx+24h], xmm0 test rax, rax jnz short loc_17AA8 jmp short loc_17AB7 loc_17AA1: mov dword ptr [rbx+24h], 7F800000h loc_17AA8: lea rdi, [rsp+0C8h+var_B8] mov rsi, rdi mov edx, 3 call rax loc_17AB7: add rsp, 0A0h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short loc_17AED mov rbx, rax mov rax, [rsp+0C8h+var_A8] test rax, rax jz short loc_17AE5 lea rdi, [rsp+0C8h+var_B8] mov rsi, rdi mov edx, 3 call rax loc_17AE5: mov rdi, rbx call __Unwind_Resume loc_17AED: mov rdi, rax call __clang_call_terminate
long long ( * sdflib::OctreeSdf::computeMinBorderValue(sdflib::OctreeSdf *this, double a2))() { _DWORD *v3; // rsi long long v4; // rcx _DWORD *v5; // rdi _QWORD *v6; // rax long long ( *result)(); // rax unsigned int v8; // esi int v9; // ebp int v10; // r15d __m128 v11; // xmm1 int v12; // r12d __m128 v13; // xmm0 double v14; // xmm1_8 float v15; // [rsp+0h] [rbp-C8h] float v16; // [rsp+Ch] [rbp-BCh] _QWORD v17[2]; // [rsp+10h] [rbp-B8h] BYREF long long ( *v18)(); // [rsp+20h] [rbp-A8h] long long ( *v19)(); // [rsp+28h] [rbp-A0h] __m128 v20; // [rsp+30h] [rbp-98h] _BYTE v21[136]; // [rsp+40h] [rbp-88h] BYREF v3 = &unk_4B968; v4 = 24LL; v5 = v21; while ( v4 ) { *v5++ = *v3++; --v4; } v6 = (_QWORD *)operator new(0x18uLL); *v6 = this; v6[1] = v21; v6[2] = v17; v17[0] = v6; v17[1] = 0LL; result = std::_Function_handler<float ()(unsigned int,glm::tvec3<float,(glm::precision)0>,float),sdflib::OctreeSdf::computeMinBorderValue(void)::$_0>::_M_manager; v18 = std::_Function_handler<float ()(unsigned int,glm::tvec3<float,(glm::precision)0>,float),sdflib::OctreeSdf::computeMinBorderValue(void)::$_0>::_M_manager; v19 = std::_Function_handler<float ()(unsigned int,glm::tvec3<float,(glm::precision)0>,float),sdflib::OctreeSdf::computeMinBorderValue(void)::$_0>::_M_invoke; v8 = *((_DWORD *)this + 10); if ( !v8 ) { *((_DWORD *)this + 9) = 2139095040; return (long long ( *)())((long long ( *)(_QWORD *, _QWORD *, long long, double))result)( v17, v17, 3LL, a2); } v15 = 1.0 / (float)(int)v8; v9 = 0; LODWORD(a2) = 2139095040; do { v10 = 0; do { v11 = 0LL; v11.m128_f32[0] = (float)((float)v10 + 0.5) * v15; v20 = v11; v12 = 0; do { v16 = *(float *)&a2; v13 = 0LL; v13.m128_f32[0] = (float)((float)v12 + 0.5) * v15; *(_QWORD *)&v14 = LODWORD(v16); *(float *)&v14 = fminf( v16, std::function<float ()(unsigned int,glm::tvec3<float,(glm::precision)0>,float)>::operator()( v17, v9 * *((_DWORD *)this + 11) + v12 + v10 * v8, *(double *)_mm_unpacklo_ps(v13, v20).m128_u64, (float)((float)v9 + 0.5) * v15, 0.5 * v15)); a2 = v14; ++v12; v8 = *((_DWORD *)this + 10); } while ( v12 < v8 ); ++v10; } while ( v10 < v8 ); ++v9; } while ( v9 < v8 ); result = v18; *((_DWORD *)this + 9) = LODWORD(v14); if ( result ) return (long long ( *)())((long long ( *)(_QWORD *, _QWORD *, long long, double))result)( v17, v17, 3LL, a2); return result; }
computeMinBorderValue: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xa0 MOV RBX,RDI LEA RSI,[0x14b968] LEA R14,[RSP + 0x40] MOV ECX,0x18 MOV RDI,R14 MOVSD.REP RDI,RSI MOV EDI,0x18 CALL 0x0010aa30 MOV qword ptr [RAX],RBX MOV qword ptr [RAX + 0x8],R14 LEA RCX,[RSP + 0x10] MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RCX],RAX MOV qword ptr [RCX + 0x8],0x0 LEA RAX,[0x128bce] MOV qword ptr [RCX + 0x10],RAX LEA RDX,[0x12892c] MOV qword ptr [RCX + 0x18],RDX MOV ESI,dword ptr [RBX + 0x28] TEST ESI,ESI JZ 0x00117aa1 CVTSI2SS XMM0,ESI MOVSS XMM1,dword ptr [0x0014a6a0] DIVSS XMM1,XMM0 MOVSS XMM0,dword ptr [0x0014a6b0] MOVSS dword ptr [RSP],XMM1 MULSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x4],XMM0 XOR EBP,EBP MOVSS XMM0,dword ptr [0x0014a6b8] LEA R14,[RSP + 0x10] LAB_001179dc: MOV EAX,EBP XORPS XMM1,XMM1 CVTSI2SS XMM1,RAX ADDSS XMM1,dword ptr [0x0014a6b0] MULSS XMM1,dword ptr [RSP] MOVSS dword ptr [RSP + 0x8],XMM1 XOR R15D,R15D LAB_001179fc: MOV EAX,R15D XORPS XMM1,XMM1 CVTSI2SS XMM1,RAX ADDSS XMM1,dword ptr [0x0014a6b0] MULSS XMM1,dword ptr [RSP] MOVAPS xmmword ptr [RSP + 0x30],XMM1 XOR R12D,R12D LAB_00117a1c: MOVSS dword ptr [RSP + 0xc],XMM0 MOV EAX,R12D XORPS XMM0,XMM0 CVTSI2SS XMM0,RAX MOV EAX,dword ptr [RBX + 0x2c] IMUL EAX,EBP IMUL ESI,R15D ADD ESI,R12D ADD ESI,EAX ADDSS XMM0,dword ptr [0x0014a6b0] MULSS XMM0,dword ptr [RSP] UNPCKLPS XMM0,xmmword ptr [RSP + 0x30] LAB_00117a4e: MOV RDI,R14 MOVSS XMM1,dword ptr [RSP + 0x8] MOVSS XMM2,dword ptr [RSP + 0x4] CALL 0x001196b2 MOVSS XMM1,dword ptr [RSP + 0xc] MINSS XMM1,XMM0 MOVAPS XMM0,XMM1 INC R12D MOV ESI,dword ptr [RBX + 0x28] CMP R12D,ESI JC 0x00117a1c INC R15D CMP R15D,ESI JC 0x001179fc INC EBP CMP EBP,ESI JC 0x001179dc MOV RAX,qword ptr [RSP + 0x20] MOVSS dword ptr [RBX + 0x24],XMM0 TEST RAX,RAX JNZ 0x00117aa8 JMP 0x00117ab7 LAB_00117aa1: MOV dword ptr [RBX + 0x24],0x7f800000 LAB_00117aa8: LEA RDI,[RSP + 0x10] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00117ab7: ADD RSP,0xa0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* sdflib::OctreeSdf::computeMinBorderValue() */ void __thiscall sdflib::OctreeSdf::computeMinBorderValue(OctreeSdf *this) { long lVar1; uint uVar2; uint uVar3; int4 *puVar4; int4 *puVar5; uint uVar6; uint uVar7; float fVar8; float fVar9; float fVar10; float fVar11; float fVar12; int8 *local_b8; int8 local_b0; code *local_a8; code *local_a0; int1 local_98 [16]; int4 local_88 [24]; puVar4 = &DAT_0014b968; puVar5 = local_88; for (lVar1 = 0x18; lVar1 != 0; lVar1 = lVar1 + -1) { *puVar5 = *puVar4; puVar4 = puVar4 + 1; puVar5 = puVar5 + 1; } local_b8 = (int8 *)operator_new(0x18); *local_b8 = this; local_b8[1] = local_88; local_b8[2] = &local_b8; local_b0 = 0; local_a8 = std:: _Function_handler<float(unsigned_int,glm::tvec3<float,(glm::precision)0>,float),sdflib::OctreeSdf::computeMinBorderValue()::$_0> ::_M_manager; local_a0 = std:: _Function_handler<float(unsigned_int,glm::tvec3<float,(glm::precision)0>,float),sdflib::OctreeSdf::computeMinBorderValue()::$_0> ::_M_invoke; uVar3 = *(uint *)(this + 0x28); if (uVar3 == 0) { *(int4 *)(this + 0x24) = 0x7f800000; } else { fVar11 = DAT_0014a6a0 / (float)(int)uVar3; fVar8 = DAT_0014a6b0 * fVar11; uVar2 = 0; fVar9 = DAT_0014a6b8; do { fVar12 = (float)uVar2 + DAT_0014a6b0; uVar7 = 0; do { local_98 = ZEXT416((uint)(((float)uVar7 + DAT_0014a6b0) * fVar11)); uVar6 = 0; do { /* try { // try from 00117a4e to 00117a61 has its CatchHandler @ 00117ac9 */ fVar10 = (float)std:: function<float(unsigned_int,glm::tvec3<float,(glm::precision)0>,float)>:: operator()(((float)uVar6 + DAT_0014a6b0) * fVar11,fVar12 * fVar11,fVar8, &local_b8,uVar3 * uVar7 + uVar6 + *(int *)(this + 0x2c) * uVar2 ); if (fVar10 <= fVar9) { fVar9 = fVar10; } uVar6 = uVar6 + 1; uVar3 = *(uint *)(this + 0x28); } while (uVar6 < uVar3); uVar7 = uVar7 + 1; } while (uVar7 < uVar3); uVar2 = uVar2 + 1; } while (uVar2 < uVar3); *(float *)(this + 0x24) = fVar9; if (local_a8 == (code *)0x0) { return; } } /* try { // try from 00117aa8 to 00117ab6 has its CatchHandler @ 00117ac7 */ (*local_a8)(&local_b8,&local_b8,3); return; }